@lovrabet/rabetbase-cli 2.5.10 → 2.5.11-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 (376) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a299_0x2ba7aa=a299_0xf187;(function(_0x104676,_0x3d93f7){const _0x1cd8cc=a299_0xf187,_0x1600c8=_0x104676();while(!![]){try{const _0x3568f3=parseInt(_0x1cd8cc(0x125))/0x1+-parseInt(_0x1cd8cc(0x184))/0x2*(parseInt(_0x1cd8cc(0x129))/0x3)+parseInt(_0x1cd8cc(0x22f))/0x4+-parseInt(_0x1cd8cc(0x1e4))/0x5*(parseInt(_0x1cd8cc(0x1ca))/0x6)+-parseInt(_0x1cd8cc(0x118))/0x7+-parseInt(_0x1cd8cc(0x257))/0x8+parseInt(_0x1cd8cc(0x189))/0x9;if(_0x3568f3===_0x3d93f7)break;else _0x1600c8['push'](_0x1600c8['shift']());}catch(_0x5de68a){_0x1600c8['push'](_0x1600c8['shift']());}}}(a299_0x3e72,0x6953b));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0x2ba7aa(0x237),'$id':a299_0x2ba7aa(0x21d),'title':'Rabetbase\x20FlowConfig','type':'object','required':[a299_0x2ba7aa(0x112),a299_0x2ba7aa(0x16d),a299_0x2ba7aa(0x153)],'$defs':{'userId':{'anyOf':[{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1}]},'position':{'type':a299_0x2ba7aa(0x1f5),'required':['x','y'],'properties':{'x':{'type':a299_0x2ba7aa(0x264),'minimum':0x0},'y':{'type':a299_0x2ba7aa(0x264),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a299_0x2ba7aa(0x160),a299_0x2ba7aa(0x1bb)],'properties':{'value':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1},'unit':{'enum':[a299_0x2ba7aa(0x1b0),a299_0x2ba7aa(0x126),'HOURS',a299_0x2ba7aa(0x123)]}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id',a299_0x2ba7aa(0x23b),a299_0x2ba7aa(0x11b),a299_0x2ba7aa(0x10c)],'properties':{'id':{'type':a299_0x2ba7aa(0x16f),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':[a299_0x2ba7aa(0x1c1),a299_0x2ba7aa(0x22d),a299_0x2ba7aa(0x121),a299_0x2ba7aa(0x140),a299_0x2ba7aa(0x243),a299_0x2ba7aa(0x24e)]},'name':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'path':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'position':{'$ref':a299_0x2ba7aa(0x224)},'approvalMode':{'enum':[a299_0x2ba7aa(0x196),'ALL',a299_0x2ba7aa(0x234)]},'taskMode':{'enum':[a299_0x2ba7aa(0x121),'HANDLE']},'assignee':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x1b6)],'properties':{'strategy':{'enum':[a299_0x2ba7aa(0x176),a299_0x2ba7aa(0x171)]},'userIds':{'type':a299_0x2ba7aa(0x1af),'minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x17c)}},'roleId':{'anyOf':[{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1},{'type':a299_0x2ba7aa(0x16f),'pattern':a299_0x2ba7aa(0x222)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':['strategy',a299_0x2ba7aa(0x261)],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':a299_0x2ba7aa(0x1af),'minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x17c)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0x2ba7aa(0x199),a299_0x2ba7aa(0x262)]},'scriptName':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'resultVariable':{'type':a299_0x2ba7aa(0x16f),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a299_0x2ba7aa(0x1f5),'properties':{'enabled':{'type':a299_0x2ba7aa(0x175)},'retryCount':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a299_0x2ba7aa(0x1f5),'properties':{'enabled':{'type':a299_0x2ba7aa(0x175)},'duration':{'$ref':a299_0x2ba7aa(0x113)},'action':{'enum':[a299_0x2ba7aa(0x14c),a299_0x2ba7aa(0x127),a299_0x2ba7aa(0x19c)]},'interrupting':{'type':a299_0x2ba7aa(0x175)},'scriptName':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'resultVariable':{'type':a299_0x2ba7aa(0x16f),'pattern':a299_0x2ba7aa(0x219)}},'additionalProperties':!![]},'cc':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x122)],'properties':{'recipientUserIds':{'type':a299_0x2ba7aa(0x1af),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'visible':{'type':a299_0x2ba7aa(0x1af),'uniqueItems':!![],'items':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':['configCode',a299_0x2ba7aa(0x1e6)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'failurePolicy':{'enum':[a299_0x2ba7aa(0x21b),a299_0x2ba7aa(0x268)]},'template':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x1ef),a299_0x2ba7aa(0x247)],'properties':{'title':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x2ba7aa(0x16f)},'facts':{'type':a299_0x2ba7aa(0x1af),'maxItems':0x8,'items':{'type':'object','required':['label','value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x2ba7aa(0x1af),'maxItems':0x2,'items':{'type':a299_0x2ba7aa(0x1f5),'required':['text',a299_0x2ba7aa(0x16b)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x2ba7aa(0x1af),'items':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x23b),a299_0x2ba7aa(0x160)],'properties':{'type':{'enum':['USER',a299_0x2ba7aa(0x171),a299_0x2ba7aa(0x15d)]},'value':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x2ba7aa(0x165)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x2ba7aa(0x1f5),'properties':{'id':{'type':a299_0x2ba7aa(0x16f),'pattern':a299_0x2ba7aa(0x219)},'source':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'target':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'sourceNodeId':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'targetNodeId':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'conditionType':{'enum':[a299_0x2ba7aa(0x1e1),a299_0x2ba7aa(0x199),a299_0x2ba7aa(0x262),'EXPRESSION']},'expression':{'type':'string'},'defaultFlow':{'type':a299_0x2ba7aa(0x175)},'name':{'type':'string'},'waypoints':{'type':a299_0x2ba7aa(0x1af),'items':{'$ref':a299_0x2ba7aa(0x224)}}},'allOf':[{'anyOf':[{'required':[a299_0x2ba7aa(0x148)]},{'required':[a299_0x2ba7aa(0x229)]}]},{'anyOf':[{'required':[a299_0x2ba7aa(0x22e)]},{'required':[a299_0x2ba7aa(0x15c)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a299_0x2ba7aa(0x16f)},'flowType':{'enum':[a299_0x2ba7aa(0x1c2),a299_0x2ba7aa(0x22c)]},'datasetCode':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'pageId':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1,'maximum':Number[a299_0x2ba7aa(0x259)]},'pageIds':{'type':a299_0x2ba7aa(0x1af),'items':{'type':a299_0x2ba7aa(0x1d8),'minimum':0x1,'maximum':Number[a299_0x2ba7aa(0x259)]}},'templateName':![],'flowJson':{'type':a299_0x2ba7aa(0x1f5),'required':[a299_0x2ba7aa(0x210),'edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0x2ba7aa(0x16f),'const':'approval.simple-flow.v1','description':a299_0x2ba7aa(0x137)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x2ba7aa(0x1e2)},'startPageId':![],'startPath':{'type':a299_0x2ba7aa(0x16f),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x206)}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x2ba7aa(0x1c5)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a299_0x2ba7aa(0x13b),a299_0x2ba7aa(0x112),a299_0x2ba7aa(0x144),a299_0x2ba7aa(0x212),'appCode',a299_0x2ba7aa(0x20d),a299_0x2ba7aa(0x149)],REMOVED_ROOT_FIELDS=['id',a299_0x2ba7aa(0x21f),a299_0x2ba7aa(0x149)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x2ba7aa(0x1e0),NODE_TYPES=new Set(['START',a299_0x2ba7aa(0x22d),a299_0x2ba7aa(0x121),a299_0x2ba7aa(0x140),a299_0x2ba7aa(0x243),a299_0x2ba7aa(0x24e)]),CONDITION_TYPES=new Set([a299_0x2ba7aa(0x1e1),a299_0x2ba7aa(0x199),'REJECTED','EXPRESSION']),APPROVAL_MODES=new Set(['SINGLE',a299_0x2ba7aa(0x24f),a299_0x2ba7aa(0x234)]),APPROVAL_TASK_MODES=new Set([a299_0x2ba7aa(0x121),a299_0x2ba7aa(0x25d)]),FLOW_TIME_UNITS=new Set([a299_0x2ba7aa(0x1b0),a299_0x2ba7aa(0x126),a299_0x2ba7aa(0x15a),a299_0x2ba7aa(0x123)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x2ba7aa(0x14c),a299_0x2ba7aa(0x127),a299_0x2ba7aa(0x19c)]),FLOW_TYPES=new Set(['FORM_FLOW',a299_0x2ba7aa(0x22c)]),FLOW_PAGE_MODES=new Set([a299_0x2ba7aa(0x1e2),a299_0x2ba7aa(0x211)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0x2ba7aa(0x21b),a299_0x2ba7aa(0x268)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x2ba7aa(0x1cc),a299_0x2ba7aa(0x171),a299_0x2ba7aa(0x15d)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x2ba7aa(0x165)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x2ba7aa(0x244),UNSUPPORTED_FORM_MESSAGE=a299_0x2ba7aa(0x161),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x2ba7aa(0x22b),RESERVED_RESULT_VARIABLES=new Set([a299_0x2ba7aa(0x1de),a299_0x2ba7aa(0x1c0),a299_0x2ba7aa(0x1e7),a299_0x2ba7aa(0x1b2),a299_0x2ba7aa(0x1d7),a299_0x2ba7aa(0x1f3),a299_0x2ba7aa(0x11c),a299_0x2ba7aa(0x263),a299_0x2ba7aa(0x16e),a299_0x2ba7aa(0x145)]);function a299_0xf187(_0x3b1fa5,_0x1a20e6){_0x3b1fa5=_0x3b1fa5-0xfe;const _0x3e7227=a299_0x3e72();let _0xf187a1=_0x3e7227[_0x3b1fa5];return _0xf187a1;}export function normalizeFlowConfig(_0x23f046){const _0x53946a=a299_0x2ba7aa;if(!isRecord(_0x23f046))throw new TypeError(_0x53946a(0x173));const _0x3af649=cloneJsonValue(_0x23f046),_0x25ad59=_0x3af649[_0x53946a(0x153)],_0x4f77de=isRecord(_0x25ad59)?cloneJsonValue(_0x25ad59):{},_0x2a3876=[],_0x1a10cd=[];for(const _0x50ec21 of REMOVED_ROOT_FIELDS){if(!Object[_0x53946a(0x13c)][_0x53946a(0x156)][_0x53946a(0x231)](_0x3af649,_0x50ec21))continue;delete _0x3af649[_0x50ec21],_0x1a10cd[_0x53946a(0x225)](_0x50ec21),_0x2a3876['push']({'code':'legacy_field_removed','path':_0x50ec21,'message':_0x50ec21+_0x53946a(0x24c)});}for(const _0x25b0a8 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x53946a(0x13c)][_0x53946a(0x156)][_0x53946a(0x231)](_0x4f77de,_0x25b0a8))continue;const _0x1c1eb4=_0x53946a(0x1ee)+_0x25b0a8;delete _0x4f77de[_0x25b0a8],_0x1a10cd[_0x53946a(0x225)](_0x1c1eb4),_0x2a3876['push']({'code':_0x53946a(0x13a),'path':_0x1c1eb4,'message':_0x1c1eb4+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x53946a(0x13c)]['hasOwnProperty'][_0x53946a(0x231)](_0x4f77de,'schemaVersion')){const _0x2da6e6=_0x4f77de[_0x53946a(0x164)],_0x406323=typeof _0x2da6e6===_0x53946a(0x16f)?_0x2da6e6[_0x53946a(0x1f9)]():_0x2da6e6;if(isEmptyJsonValue(_0x2da6e6)||_0x406323===DEFAULT_FLOW_SCHEMA_VERSION){const _0x7877ca='flowJson.schemaVersion';delete _0x4f77de['schemaVersion'],_0x1a10cd[_0x53946a(0x225)](_0x7877ca),_0x2a3876[_0x53946a(0x225)]({'code':_0x53946a(0x13a),'path':_0x7877ca,'message':_0x7877ca+_0x53946a(0x105)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x4f77de,_0x53946a(0x153),_0x2a3876,_0x1a10cd);_0x3af649['flowType']===_0x53946a(0x22c)&&!Object[_0x53946a(0x13c)][_0x53946a(0x156)][_0x53946a(0x231)](_0x4f77de,_0x53946a(0x169))&&(_0x4f77de['pageMode']=_0x53946a(0x1e2));_0x3af649['flowJson']=_0x4f77de;if(typeof _0x3af649['flowName']==='string')_0x3af649[_0x53946a(0x112)]=_0x3af649[_0x53946a(0x112)][_0x53946a(0x1f9)]();return{'config':_0x3af649,'warnings':_0x2a3876,'removedPaths':_0x1a10cd};}export function validateFlowConfig(_0x450a87){const _0x1ab808=a299_0x2ba7aa;let _0x17cb99;try{_0x17cb99=normalizeFlowConfig(_0x450a87);}catch(_0x471647){const _0x13c682=_0x471647 instanceof Error?_0x471647[_0x1ab808(0x26d)]:String(_0x471647),_0x649912={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x13c682}],'warnings':[],'normalized':_0x649912,'validationConfig':_0x649912};}const _0x41ca5a=_0x17cb99[_0x1ab808(0x124)],_0xd3ada0=cloneJsonValue(_0x41ca5a),_0x35e13c=_0xd3ada0[_0x1ab808(0x153)];_0x35e13c[_0x1ab808(0x1ad)]=_0x1ab808(0x106),_0x35e13c['flowName']=_0x41ca5a[_0x1ab808(0x112)];typeof _0x41ca5a['datasetCode']===_0x1ab808(0x16f)&&_0x41ca5a['datasetCode'][_0x1ab808(0x1f9)]()&&(_0x35e13c[_0x1ab808(0x144)]=_0x41ca5a[_0x1ab808(0x212)][_0x1ab808(0x1f9)]());const _0x24f992=[];return validateOuterMetadata(_0x41ca5a,_0x24f992),validateFlowClassification(_0x41ca5a,_0x24f992),validateGraph(_0x41ca5a[_0x1ab808(0x153)],_0x24f992),{'valid':_0x24f992[_0x1ab808(0x227)]===0x0,'errors':_0x24f992,'warnings':_0x17cb99[_0x1ab808(0x133)],'normalized':_0x41ca5a,'validationConfig':_0xd3ada0};}function validateFlowClassification(_0x1786e7,_0x11d85f){const _0x558de6=a299_0x2ba7aa;if(!isRecord(_0x1786e7[_0x558de6(0x153)]))return;const _0x4edeba=_0x1786e7[_0x558de6(0x16d)],_0xe2b26d=_0x1786e7[_0x558de6(0x153)]['pageMode'];_0xe2b26d!==undefined&&(typeof _0xe2b26d!==_0x558de6(0x16f)||!FLOW_PAGE_MODES['has'](_0xe2b26d))&&_0x11d85f['push']({'path':_0x558de6(0x172),'message':'Unsupported\x20pageMode:\x20'+String(_0xe2b26d)+'.'});_0x4edeba===_0x558de6(0x1c2)&&_0xe2b26d!==undefined&&_0x11d85f[_0x558de6(0x225)]({'path':_0x558de6(0x172),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0x4edeba===_0x558de6(0x22c)&&_0xe2b26d===_0x558de6(0x211)&&_0x11d85f['push']({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x4edeba==='FORM_FLOW'||_0x4edeba==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0x1786e7,_0x4edeba,_0xe2b26d,_0x11d85f);if(_0x4edeba!=='FORM_FLOW'||!Array[_0x558de6(0x116)](_0x1786e7[_0x558de6(0x153)][_0x558de6(0x210)]))return;_0x1786e7[_0x558de6(0x153)][_0x558de6(0x210)][_0x558de6(0x1f1)]((_0x74ee19,_0x52c84c)=>{const _0x2d444e=_0x558de6;isRecord(_0x74ee19)&&_0x74ee19[_0x2d444e(0x23b)]===_0x2d444e(0x121)&&_0x74ee19['taskMode']==='HANDLE'&&_0x11d85f[_0x2d444e(0x225)]({'path':'flowJson.nodes['+_0x52c84c+_0x2d444e(0x1b5),'message':_0x2d444e(0x168)});});}function validateCustomPageNavigation(_0x4f8c6d,_0x409b6e,_0x324865,_0x4d51ab){const _0x13d0b1=a299_0x2ba7aa,_0x219a46=_0x4f8c6d[_0x13d0b1(0x153)][_0x13d0b1(0x242)];_0x219a46!==undefined&&_0x4d51ab[_0x13d0b1(0x225)]({'path':_0x13d0b1(0x235),'message':_0x13d0b1(0x1f2)});const _0x1fa056=_0x4f8c6d[_0x13d0b1(0x153)][_0x13d0b1(0x14a)];_0x1fa056!==undefined&&(typeof _0x1fa056!==_0x13d0b1(0x16f)||_0x1fa056['trim']()==='')&&_0x4d51ab['push']({'path':_0x13d0b1(0x26a),'message':_0x13d0b1(0x179)});const _0x50cc9c=Array[_0x13d0b1(0x116)](_0x4f8c6d['flowJson'][_0x13d0b1(0x210)])?_0x4f8c6d[_0x13d0b1(0x153)][_0x13d0b1(0x210)][_0x13d0b1(0x1d6)]((_0x57013b,_0x4e54fc)=>({'node':_0x57013b,'index':_0x4e54fc}))[_0x13d0b1(0x1ff)](({node:_0x2e2ff4})=>isRecord(_0x2e2ff4)&&_0x2e2ff4['path']!==undefined):[],_0xf52dee=_0x1fa056!==undefined||_0x50cc9c[_0x13d0b1(0x227)]>0x0,_0x21e6c6=_0x324865===undefined&&_0x409b6e===_0x13d0b1(0x22c)?_0x13d0b1(0x1e2):_0x324865;_0xf52dee&&(_0x409b6e!==_0x13d0b1(0x22c)||_0x21e6c6!=='CUSTOM_PAGE')&&(_0x1fa056!==undefined&&_0x4d51ab['push']({'path':_0x13d0b1(0x26a),'message':'startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x50cc9c[_0x13d0b1(0x1f1)](({index:_0x5def9a})=>{const _0x826d6f=_0x13d0b1;_0x4d51ab['push']({'path':'flowJson.nodes['+_0x5def9a+_0x826d6f(0x12c),'message':_0x826d6f(0x1d9)});}));}export async function writeNormalizedFlowConfig(_0x59ef37,_0x39ac08,_0x5703af={}){const _0x164ef2=a299_0x2ba7aa,_0x114f94=resolve(_0x59ef37),_0x2c7f3d=_0x114f94+'.'+process[_0x164ef2(0x24b)]+'.'+randomUUID()+_0x164ef2(0x142),_0x5a7739=JSON[_0x164ef2(0x12a)](_0x39ac08,null,0x2)+'\x0a';let _0x238f86;try{try{_0x238f86=(await stat(_0x114f94))[_0x164ef2(0x217)]&0x1ff;}catch{_0x238f86=undefined;}await writeFile(_0x2c7f3d,_0x5a7739,{'encoding':_0x164ef2(0x181),'flag':'wx','mode':_0x238f86??0x1a4});if(_0x238f86!==undefined)await chmod(_0x2c7f3d,_0x238f86);_0x5703af[_0x164ef2(0x1f0)]===![]?(await link(_0x2c7f3d,_0x114f94),await unlink(_0x2c7f3d)):await rename(_0x2c7f3d,_0x114f94);}finally{await unlink(_0x2c7f3d)[_0x164ef2(0x23f)](()=>undefined);}}function validateOuterMetadata(_0x76cba,_0x54383e){const _0x5782e0=a299_0x2ba7aa;(typeof _0x76cba[_0x5782e0(0x112)]!=='string'||_0x76cba[_0x5782e0(0x112)][_0x5782e0(0x1f9)]()==='')&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x112),'message':_0x5782e0(0x178)});_0x76cba[_0x5782e0(0x20b)]!==undefined&&typeof _0x76cba[_0x5782e0(0x20b)]!==_0x5782e0(0x16f)&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x20b),'message':_0x5782e0(0x1a6)});if(_0x76cba['flowType']===undefined||_0x76cba[_0x5782e0(0x16d)]===null)_0x54383e[_0x5782e0(0x225)]({'path':'flowType','message':'flowType\x20is\x20required.'});else(typeof _0x76cba[_0x5782e0(0x16d)]!=='string'||!FLOW_TYPES[_0x5782e0(0x1aa)](_0x76cba[_0x5782e0(0x16d)]))&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x16d),'message':_0x5782e0(0x139)+String(_0x76cba[_0x5782e0(0x16d)])+'.'});_0x76cba[_0x5782e0(0x212)]!==undefined&&typeof _0x76cba[_0x5782e0(0x212)]!==_0x5782e0(0x16f)&&_0x54383e['push']({'path':_0x5782e0(0x212),'message':_0x5782e0(0x245)});_0x76cba[_0x5782e0(0x266)]===undefined&&_0x76cba['pageId']!==undefined&&(!Number[_0x5782e0(0x14f)](_0x76cba[_0x5782e0(0x20d)])||_0x76cba['pageId']<=0x0)&&_0x54383e[_0x5782e0(0x225)]({'path':'pageId','message':_0x5782e0(0x240)});if(_0x76cba['pageIds']!==undefined){if(!Array[_0x5782e0(0x116)](_0x76cba[_0x5782e0(0x266)])||_0x76cba['pageIds']['some'](_0x20766c=>!Number[_0x5782e0(0x14f)](_0x20766c)||_0x20766c<=0x0))_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x266),'message':_0x5782e0(0x19e)});else[...new Set(_0x76cba['pageIds'])]['join'](',')[_0x5782e0(0x227)]>0x800&&_0x54383e[_0x5782e0(0x225)]({'path':_0x5782e0(0x266),'message':_0x5782e0(0x252)});_0x76cba[_0x5782e0(0x16d)]===_0x5782e0(0x22c)&&Array[_0x5782e0(0x116)](_0x76cba[_0x5782e0(0x266)])&&_0x76cba[_0x5782e0(0x266)][_0x5782e0(0x227)]>0x0&&_0x54383e['push']({'path':_0x5782e0(0x266),'message':_0x5782e0(0x223)});}_0x76cba[_0x5782e0(0x16d)]==='INDEPENDENT_FLOW'&&_0x76cba[_0x5782e0(0x212)]!==undefined&&_0x54383e['push']({'path':_0x5782e0(0x212),'message':_0x5782e0(0x22a)}),_0x76cba[_0x5782e0(0x16d)]===_0x5782e0(0x22c)&&_0x76cba[_0x5782e0(0x266)]===undefined&&_0x76cba['pageId']!==undefined&&_0x54383e['push']({'path':_0x5782e0(0x20d),'message':_0x5782e0(0x26b)});}function validateGraph(_0xa676ac,_0x154787){const _0x36642e=a299_0x2ba7aa;if(!isRecord(_0xa676ac)){_0x154787['push']({'path':_0x36642e(0x153),'message':_0x36642e(0x25e)});return;}!Array['isArray'](_0xa676ac['nodes'])&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x236),'message':_0x36642e(0x157)});!Array[_0x36642e(0x116)](_0xa676ac[_0x36642e(0x25a)])&&_0x154787['push']({'path':_0x36642e(0x162),'message':_0x36642e(0x1dc)});Object[_0x36642e(0x13c)][_0x36642e(0x156)][_0x36642e(0x231)](_0xa676ac,_0x36642e(0x164))&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x14d),'message':_0x36642e(0x1f4)+String(_0xa676ac[_0x36642e(0x164)])+_0x36642e(0x26c)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x31648b of[_0x36642e(0x1a4),'formDefinitions',_0x36642e(0x14e)]){Object[_0x36642e(0x13c)][_0x36642e(0x156)][_0x36642e(0x231)](_0xa676ac,_0x31648b)&&_0x154787[_0x36642e(0x225)]({'path':'flowJson.'+_0x31648b,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x36642e(0x116)](_0xa676ac[_0x36642e(0x210)])||!Array[_0x36642e(0x116)](_0xa676ac[_0x36642e(0x25a)]))return;const _0x5cb19b=new Map(),_0xab5cd=[],_0x2fc0b1=[],_0x14d4aa=new Map(),_0x1249ef=new Map(),_0x47a37a=new Set();let _0x2979ca=0x0;_0xa676ac['nodes'][_0x36642e(0x1f1)]((_0x1a4034,_0x2fdffd)=>{const _0x50a6b0=_0x36642e,_0x2ccbc3=_0x50a6b0(0xfe)+_0x2fdffd+']';if(!isRecord(_0x1a4034)){_0x154787[_0x50a6b0(0x225)]({'path':_0x2ccbc3,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x1132f8=_0x1a4034;if(typeof _0x1132f8['id']!==_0x50a6b0(0x16f)||!BPMN_ID_PATTERN[_0x50a6b0(0x18e)](_0x1132f8['id']))_0x154787['push']({'path':_0x2ccbc3+'.id','message':_0x50a6b0(0x239)});else _0x5cb19b[_0x50a6b0(0x1aa)](_0x1132f8['id'])?_0x154787[_0x50a6b0(0x225)]({'path':_0x2ccbc3+_0x50a6b0(0x213),'message':_0x50a6b0(0x120)+_0x1132f8['id']+'.'}):(_0x5cb19b[_0x50a6b0(0x101)](_0x1132f8['id'],_0x1132f8),_0x47a37a[_0x50a6b0(0x205)](_0x1132f8['id']));if(!NODE_TYPES[_0x50a6b0(0x1aa)](_0x1132f8[_0x50a6b0(0x23b)]))_0x154787[_0x50a6b0(0x225)]({'path':_0x2ccbc3+_0x50a6b0(0x150),'message':_0x50a6b0(0x1c4)+String(_0x1132f8[_0x50a6b0(0x23b)])+'.'});else{if(_0x1132f8['type']==='START')_0xab5cd[_0x50a6b0(0x225)](_0x1132f8['id']);else _0x1132f8['type']===_0x50a6b0(0x22d)&&_0x2fc0b1[_0x50a6b0(0x225)](_0x1132f8['id']);}_0x1132f8[_0x50a6b0(0x23b)]===_0x50a6b0(0x121)&&(_0x1132f8[_0x50a6b0(0x1ea)]===undefined||_0x1132f8[_0x50a6b0(0x1ea)]===_0x50a6b0(0x121))&&(_0x2979ca+=0x1);validateNode(_0x1132f8,_0x2ccbc3,_0x154787);if(_0x1132f8['type']===_0x50a6b0(0x243)){const _0xdf3d41=resolveEffectiveResultVariable(_0x1132f8[_0x50a6b0(0x203)],![]);_0xdf3d41&&(registerResultVariableOwner(_0x1249ef,_0xdf3d41,_0x1132f8['id'],_0x154787),!_0x14d4aa[_0x50a6b0(0x1aa)](_0xdf3d41)&&_0x14d4aa[_0x50a6b0(0x101)](_0xdf3d41,_0x1132f8['id']));}if(_0x1132f8['type']==='APPROVAL'&&isRecord(_0x1132f8[_0x50a6b0(0x19f)])&&_0x1132f8['timeout'][_0x50a6b0(0x13e)]===!![]&&_0x1132f8[_0x50a6b0(0x19f)][_0x50a6b0(0x17b)]===_0x50a6b0(0x19c)){const _0x413175=resolveEffectiveResultVariable(_0x1132f8['timeout']['resultVariable'],!![]);_0x413175&&registerResultVariableOwner(_0x1249ef,_0x413175,_0x1132f8['id']+_0x50a6b0(0x250),_0x154787);}});_0xab5cd[_0x36642e(0x227)]!==0x1&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x236),'message':_0x36642e(0x158)});_0x2fc0b1[_0x36642e(0x227)]===0x0&&_0x154787[_0x36642e(0x225)]({'path':_0x36642e(0x236),'message':_0x36642e(0x16c)});const _0x5ab8c9=new Map(),_0x2ebae1=new Map(),_0x3e0307=new Map(),_0x3c6c22=new Set();_0xa676ac[_0x36642e(0x25a)][_0x36642e(0x1f1)]((_0x356979,_0x404d4b)=>{const _0x2b762c=_0x36642e,_0x3fa879=_0x2b762c(0x20e)+_0x404d4b+']';if(!isRecord(_0x356979)){_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879,'message':_0x2b762c(0x183)});return;}const _0x17d4a9=_0x356979;_0x3e0307[_0x2b762c(0x101)](_0x17d4a9,_0x3fa879);const _0x14a543=resolveEdgeEndpoint(_0x17d4a9[_0x2b762c(0x148)],_0x17d4a9[_0x2b762c(0x229)]),_0x4e59e0=resolveEdgeEndpoint(_0x17d4a9[_0x2b762c(0x22e)],_0x17d4a9[_0x2b762c(0x15c)]);if(!_0x14a543)_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+'.source','message':'edge\x20source\x20is\x20required.'});if(!_0x4e59e0)_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+'.target','message':_0x2b762c(0x23d)});_0x14a543&&!_0x5cb19b[_0x2b762c(0x1aa)](_0x14a543)&&_0x154787['push']({'path':_0x3fa879+_0x2b762c(0x17d),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x14a543+'.'});_0x4e59e0&&!_0x5cb19b[_0x2b762c(0x1aa)](_0x4e59e0)&&_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+_0x2b762c(0x1ae),'message':_0x2b762c(0x185)+_0x4e59e0+'.'});if(_0x17d4a9['id']!==undefined){if(typeof _0x17d4a9['id']!==_0x2b762c(0x16f)||!BPMN_ID_PATTERN['test'](_0x17d4a9['id']))_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+_0x2b762c(0x213),'message':_0x2b762c(0x21a)});else{if(_0x47a37a['has'](_0x17d4a9['id']))_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879+_0x2b762c(0x213),'message':_0x2b762c(0x265)+_0x17d4a9['id']+'.'});else!_0x47a37a[_0x2b762c(0x1aa)](_0x17d4a9['id'])&&_0x47a37a[_0x2b762c(0x205)](_0x17d4a9['id']);}}if(_0x14a543&&_0x4e59e0){const _0x58fc58=_0x14a543+'\x00'+_0x4e59e0+'\x00'+(_0x17d4a9['conditionType']??_0x2b762c(0x1e1));_0x3c6c22[_0x2b762c(0x1aa)](_0x58fc58)?_0x154787[_0x2b762c(0x225)]({'path':_0x3fa879,'message':_0x2b762c(0x119)+_0x14a543+'\x20->\x20'+_0x4e59e0+'\x20('+(_0x17d4a9[_0x2b762c(0x110)]??_0x2b762c(0x1e1))+').'}):_0x3c6c22['add'](_0x58fc58);}validateEdge(_0x17d4a9,_0x3fa879,_0x154787),_0x14a543&&_0x4e59e0&&(_0x5ab8c9[_0x2b762c(0x216)](_0x14a543)?.[_0x2b762c(0x225)](_0x17d4a9)??_0x5ab8c9[_0x2b762c(0x101)](_0x14a543,[_0x17d4a9]),_0x2ebae1['get'](_0x4e59e0)?.['push'](_0x17d4a9)??_0x2ebae1['set'](_0x4e59e0,[_0x17d4a9]));});if(_0xab5cd[_0x36642e(0x227)]!==0x1)return;validateGraphShape(_0x5cb19b,_0xab5cd[0x0],_0x2fc0b1,_0x5ab8c9,_0x2ebae1,_0x3e0307,_0x154787),validateScriptResultReferences(_0x5cb19b,_0xab5cd[0x0],_0x5ab8c9,_0x2ebae1,_0x3e0307,_0x14d4aa,_0x154787),validateApprovalResults(_0x5cb19b,_0x2979ca,_0x2fc0b1,_0x154787);}function validateNode(_0x48b01a,_0x27a07f,_0x557339){const _0x2b0b69=a299_0x2ba7aa;for(const _0x57068e of[_0x2b0b69(0x248),_0x2b0b69(0x10d)]){Object[_0x2b0b69(0x13c)][_0x2b0b69(0x156)][_0x2b0b69(0x231)](_0x48b01a,_0x57068e)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.'+_0x57068e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x2b0b69(0x1aa)](_0x48b01a[_0x2b0b69(0x23b)]))return;(typeof _0x48b01a[_0x2b0b69(0x11b)]!==_0x2b0b69(0x16f)||_0x48b01a[_0x2b0b69(0x11b)][_0x2b0b69(0x1f9)]()==='')&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x1dd),'message':_0x2b0b69(0x1ac)});_0x48b01a['pageId']!==undefined&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x197),'message':_0x2b0b69(0x104)});if(_0x48b01a['path']!==undefined){if(typeof _0x48b01a['path']!==_0x2b0b69(0x16f)||_0x48b01a[_0x2b0b69(0x1d4)][_0x2b0b69(0x1f9)]()==='')_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1a7),'message':_0x2b0b69(0x1a9)});else _0x48b01a[_0x2b0b69(0x23b)]!==_0x2b0b69(0x121)&&_0x48b01a[_0x2b0b69(0x23b)]!==_0x2b0b69(0x22d)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1a7),'message':_0x2b0b69(0x107)});}const _0x586473=_0x48b01a['position'];if(!isRecord(_0x586473))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x186),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x4b1348 of['x','y']){const _0x4739b6=_0x586473[_0x4b1348];(typeof _0x4739b6!==_0x2b0b69(0x264)||!Number[_0x2b0b69(0x130)](_0x4739b6)||_0x4739b6<0x0)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x114)+_0x4b1348,'message':_0x2b0b69(0x136)+_0x4b1348+_0x2b0b69(0x19d)});}if(_0x48b01a[_0x2b0b69(0x23b)]===_0x2b0b69(0x121)){const _0x3c99c7=_0x48b01a[_0x2b0b69(0x143)]??'SINGLE',_0x5d6ff0=_0x48b01a[_0x2b0b69(0x1ea)]??_0x2b0b69(0x121);!APPROVAL_TASK_MODES[_0x2b0b69(0x1aa)](_0x5d6ff0)&&_0x557339['push']({'path':_0x27a07f+'.taskMode','message':_0x2b0b69(0x1c8)+String(_0x5d6ff0)+'.'});!APPROVAL_MODES['has'](_0x3c99c7)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.approvalMode','message':_0x2b0b69(0x1db)+String(_0x3c99c7)+'.'});if(!isRecord(_0x48b01a[_0x2b0b69(0x269)]))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1e3),'message':_0x2b0b69(0x159)});else{const _0x155871=_0x48b01a[_0x2b0b69(0x269)][_0x2b0b69(0x1b6)];_0x155871!=='FIXED'&&_0x155871!==_0x2b0b69(0x171)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x232),'message':_0x2b0b69(0x1a5)});if(_0x155871===_0x2b0b69(0x176)){const _0x29ed54=_0x48b01a[_0x2b0b69(0x269)][_0x2b0b69(0x261)];if(!Array['isArray'](_0x29ed54)||_0x29ed54[_0x2b0b69(0x227)]===0x0)_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x15b),'message':_0x2b0b69(0x1ba)});else{const _0x5a2de0=_0x29ed54['findIndex'](_0x52d9d9=>!isValidUserId(_0x52d9d9));_0x5a2de0>=0x0&&_0x557339['push']({'path':_0x27a07f+'.assignee.userIds['+_0x5a2de0+']','message':_0x2b0b69(0x154)});const _0x22d0e5=new Set(_0x29ed54[_0x2b0b69(0x1ff)](isValidUserId)[_0x2b0b69(0x1d6)](_0x548585=>String(_0x548585)[_0x2b0b69(0x1f9)]()));_0x3c99c7===_0x2b0b69(0x196)&&_0x22d0e5[_0x2b0b69(0x1b9)]>0x1&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x15b),'message':_0x2b0b69(0x11a)});}}if(_0x155871===_0x2b0b69(0x171)){const _0x1eb652=_0x48b01a[_0x2b0b69(0x269)][_0x2b0b69(0x11f)],_0x3ae7f1=typeof _0x1eb652===_0x2b0b69(0x264)||typeof _0x1eb652===_0x2b0b69(0x16f)?Number(String(_0x1eb652)['trim']()):Number[_0x2b0b69(0x109)];(!Number[_0x2b0b69(0x14f)](_0x3ae7f1)||_0x3ae7f1<=0x0)&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x102),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x48b01a['transferCandidates']!==undefined){if(!isRecord(_0x48b01a[_0x2b0b69(0x220)]))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.transferCandidates','message':_0x2b0b69(0x1da)});else{if(_0x48b01a[_0x2b0b69(0x220)][_0x2b0b69(0x1b6)]!==_0x2b0b69(0x176))_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x191),'message':_0x2b0b69(0x12f)});else{const _0x36f28b=_0x48b01a[_0x2b0b69(0x220)][_0x2b0b69(0x261)];if(!Array[_0x2b0b69(0x116)](_0x36f28b)||_0x36f28b[_0x2b0b69(0x227)]===0x0)_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+'.transferCandidates.userIds','message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x4b9666=_0x36f28b[_0x2b0b69(0x10f)](_0x29d1b4=>!isValidUserId(_0x29d1b4));_0x4b9666>=0x0&&_0x557339['push']({'path':_0x27a07f+'.transferCandidates.userIds['+_0x4b9666+']','message':_0x2b0b69(0x1bf)});}}}}}_0x48b01a['sequential']!==undefined&&typeof _0x48b01a[_0x2b0b69(0x23c)]!==_0x2b0b69(0x175)&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x18c),'message':_0x2b0b69(0x1a2)});if(_0x48b01a[_0x2b0b69(0x23b)]===_0x2b0b69(0x243)){(typeof _0x48b01a['scriptName']!==_0x2b0b69(0x16f)||_0x48b01a[_0x2b0b69(0x1b8)]['trim']()==='')&&_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x1c3),'message':_0x2b0b69(0x1a1)});if(_0x48b01a[_0x2b0b69(0x203)]!==undefined){if(typeof _0x48b01a[_0x2b0b69(0x203)]!==_0x2b0b69(0x16f)||!VARIABLE_PATTERN[_0x2b0b69(0x18e)](_0x48b01a[_0x2b0b69(0x203)]))_0x557339[_0x2b0b69(0x225)]({'path':_0x27a07f+_0x2b0b69(0x155),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x2b0b69(0x1aa)](_0x48b01a[_0x2b0b69(0x203)])||_0x48b01a['resultVariable']['startsWith'](_0x2b0b69(0x1fc)))&&_0x557339['push']({'path':_0x27a07f+_0x2b0b69(0x155),'message':'Reserved\x20resultVariable:\x20'+_0x48b01a[_0x2b0b69(0x203)]+'.'});}}validateAsyncExecution(_0x48b01a,_0x27a07f,_0x557339),validateApprovalTimeout(_0x48b01a,_0x27a07f,_0x557339),validateCcConfig(_0x48b01a,_0x27a07f,_0x557339),_0x48b01a['type']==='NOTIFICATION'&&validateNotificationConfig(_0x48b01a[_0x2b0b69(0x124)],_0x27a07f+'.config',_0x557339);}function validateAsyncExecution(_0x473d6f,_0x2bb8e6,_0x3cf2c0){const _0x4adacc=a299_0x2ba7aa;if(_0x473d6f[_0x4adacc(0x167)]===undefined)return;if(!isRecord(_0x473d6f[_0x4adacc(0x167)])){_0x3cf2c0['push']({'path':_0x2bb8e6+'.async','message':_0x4adacc(0x228)});return;}if(_0x473d6f[_0x4adacc(0x167)][_0x4adacc(0x13e)]!==undefined&&typeof _0x473d6f[_0x4adacc(0x167)]['enabled']!=='boolean'){_0x3cf2c0[_0x4adacc(0x225)]({'path':_0x2bb8e6+'.async.enabled','message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x473d6f[_0x4adacc(0x167)][_0x4adacc(0x13e)]!==!![])return;_0x473d6f[_0x4adacc(0x23b)]!==_0x4adacc(0x243)&&_0x3cf2c0[_0x4adacc(0x225)]({'path':_0x2bb8e6+'.async','message':_0x4adacc(0x13d)});const _0x2010a2=_0x473d6f[_0x4adacc(0x167)]['retryCount']??0x3;(!Number[_0x4adacc(0xff)](_0x2010a2)||_0x2010a2<0x1||_0x2010a2>MAX_ASYNC_RETRY_COUNT)&&_0x3cf2c0[_0x4adacc(0x225)]({'path':_0x2bb8e6+_0x4adacc(0x226),'message':_0x4adacc(0x163)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x473d6f['async'][_0x4adacc(0x10a)]!==undefined&&validateTimeAmount(_0x473d6f[_0x4adacc(0x167)]['retryInterval'],_0x2bb8e6+_0x4adacc(0x151),_0x3cf2c0);}function validateApprovalTimeout(_0x5c8eb2,_0x22506f,_0x149631){const _0x3d9f37=a299_0x2ba7aa;if(_0x5c8eb2[_0x3d9f37(0x19f)]===undefined)return;if(!isRecord(_0x5c8eb2['timeout'])){_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+'.timeout','message':_0x3d9f37(0x20a)});return;}if(_0x5c8eb2[_0x3d9f37(0x19f)]['enabled']!==undefined&&typeof _0x5c8eb2['timeout'][_0x3d9f37(0x13e)]!==_0x3d9f37(0x175)){_0x149631['push']({'path':_0x22506f+'.timeout.enabled','message':_0x3d9f37(0x17a)});return;}if(_0x5c8eb2[_0x3d9f37(0x19f)]['enabled']!==!![])return;if(_0x5c8eb2[_0x3d9f37(0x19f)][_0x3d9f37(0x1cf)]!==undefined&&typeof _0x5c8eb2[_0x3d9f37(0x19f)][_0x3d9f37(0x1cf)]!=='boolean'){_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x201),'message':_0x3d9f37(0x1a3)});return;}_0x5c8eb2[_0x3d9f37(0x23b)]!=='APPROVAL'&&_0x149631['push']({'path':_0x22506f+'.timeout','message':_0x3d9f37(0x233)});validateTimeAmount(_0x5c8eb2['timeout']['duration'],_0x22506f+_0x3d9f37(0x11d),_0x149631);const _0x574942=_0x5c8eb2[_0x3d9f37(0x19f)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0x3d9f37(0x1aa)](_0x574942)){_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x193),'message':_0x3d9f37(0x182)});return;}(_0x5c8eb2[_0x3d9f37(0x1ea)]??_0x3d9f37(0x121))==='HANDLE'&&_0x574942!==_0x3d9f37(0x19c)&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x193),'message':_0x3d9f37(0x1bd)});const _0x4fb1d5=_0x5c8eb2['timeout']['interrupting']??_0x574942!=='EXECUTE_BFF';if(_0x574942===_0x3d9f37(0x19c))_0x4fb1d5&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+_0x3d9f37(0x201),'message':_0x3d9f37(0x187)}),(typeof _0x5c8eb2['timeout'][_0x3d9f37(0x1b8)]!==_0x3d9f37(0x16f)||_0x5c8eb2[_0x3d9f37(0x19f)]['scriptName'][_0x3d9f37(0x1f9)]()==='')&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+'.timeout.scriptName','message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x5c8eb2[_0x3d9f37(0x19f)][_0x3d9f37(0x203)],_0x22506f+'.timeout.resultVariable',_0x149631);else!_0x4fb1d5&&_0x149631[_0x3d9f37(0x225)]({'path':_0x22506f+'.timeout.interrupting','message':_0x574942+_0x3d9f37(0x1be)});}function validateTimeAmount(_0x39282,_0x1606e5,_0x1e3b40){const _0x5881ea=a299_0x2ba7aa;if(!isRecord(_0x39282)){_0x1e3b40['push']({'path':_0x1606e5,'message':_0x5881ea(0x18f)});return;}(!Number['isInteger'](_0x39282[_0x5881ea(0x160)])||Number(_0x39282[_0x5881ea(0x160)])<=0x0)&&_0x1e3b40[_0x5881ea(0x225)]({'path':_0x1606e5+_0x5881ea(0x1d0),'message':_0x5881ea(0x190)}),!FLOW_TIME_UNITS['has'](_0x39282[_0x5881ea(0x1bb)])&&_0x1e3b40[_0x5881ea(0x225)]({'path':_0x1606e5+_0x5881ea(0x200),'message':_0x5881ea(0x147)});}function validateOptionalResultVariable(_0x5ef29a,_0x3daa31,_0x442fe3){const _0x33f533=a299_0x2ba7aa;if(_0x5ef29a===undefined||_0x5ef29a===null||_0x5ef29a==='')return;if(typeof _0x5ef29a!==_0x33f533(0x16f)||!VARIABLE_PATTERN[_0x33f533(0x18e)](_0x5ef29a))_0x442fe3[_0x33f533(0x225)]({'path':_0x3daa31,'message':_0x33f533(0x238)});else(RESERVED_RESULT_VARIABLES['has'](_0x5ef29a)||_0x5ef29a[_0x33f533(0x117)](_0x33f533(0x1fc)))&&_0x442fe3[_0x33f533(0x225)]({'path':_0x3daa31,'message':_0x33f533(0x267)+_0x5ef29a+'.'});}function validateCcConfig(_0x585797,_0xed9620,_0x573c0e){const _0x433a8c=a299_0x2ba7aa;if(_0x585797['cc']===undefined)return;if(!isRecord(_0x585797['cc'])){_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+_0x433a8c(0x174),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x585797[_0x433a8c(0x23b)]!=='END'&&_0x585797[_0x433a8c(0x23b)]!==_0x433a8c(0x121)&&_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+_0x433a8c(0x174),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x433a8c(0x13c)][_0x433a8c(0x156)][_0x433a8c(0x231)](_0x585797['cc'],'readSources')&&_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x497413=_0x585797['cc']['recipientUserIds'];if(!Array[_0x433a8c(0x116)](_0x497413)||_0x497413[_0x433a8c(0x227)]===0x0)_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+_0x433a8c(0x180),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x497413[_0x433a8c(0x227)]>MAX_CC_RECIPIENTS&&_0x573c0e[_0x433a8c(0x225)]({'path':_0xed9620+'.cc.recipientUserIds','message':_0x433a8c(0x177)+MAX_CC_RECIPIENTS+_0x433a8c(0x17e)});const _0x3f4b7e=new Set();_0x497413['forEach']((_0x4de287,_0x173325)=>{const _0x426577=_0x433a8c;if(typeof _0x4de287!==_0x426577(0x16f)||_0x4de287[_0x426577(0x1f9)]()==='')_0x573c0e['push']({'path':_0xed9620+_0x426577(0x195)+_0x173325+']','message':_0x426577(0x146)});else _0x3f4b7e[_0x426577(0x1aa)](_0x4de287[_0x426577(0x1f9)]())?_0x573c0e[_0x426577(0x225)]({'path':_0xed9620+_0x426577(0x195)+_0x173325+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x4de287[_0x426577(0x1f9)]()+'.'}):_0x3f4b7e['add'](_0x4de287[_0x426577(0x1f9)]());});}validateStringArray(_0x585797['cc'][_0x433a8c(0x1cb)],_0xed9620+_0x433a8c(0x1fa),_0x573c0e);}function validateStringArray(_0xb80fca,_0x1ffed8,_0x579323){const _0x3b8880=a299_0x2ba7aa;if(_0xb80fca===undefined)return;if(!Array[_0x3b8880(0x116)](_0xb80fca)){_0x579323['push']({'path':_0x1ffed8,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0xe72a07=new Set();_0xb80fca['forEach']((_0x12479e,_0x3bfcb2)=>{const _0x3ef560=_0x3b8880;if(typeof _0x12479e!==_0x3ef560(0x16f)||_0x12479e[_0x3ef560(0x1f9)]()==='')_0x579323[_0x3ef560(0x225)]({'path':_0x1ffed8+'['+_0x3bfcb2+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0xe72a07[_0x3ef560(0x1aa)](_0x12479e[_0x3ef560(0x1f9)]())?_0x579323[_0x3ef560(0x225)]({'path':_0x1ffed8+'['+_0x3bfcb2+']','message':_0x3ef560(0x221)+_0x12479e[_0x3ef560(0x1f9)]()+'.'}):_0xe72a07[_0x3ef560(0x205)](_0x12479e[_0x3ef560(0x1f9)]());});}function validateNotificationConfig(_0x21d7b6,_0x163992,_0x2874b4){const _0x282789=a299_0x2ba7aa;if(!isRecord(_0x21d7b6)){_0x2874b4[_0x282789(0x225)]({'path':_0x163992,'message':_0x282789(0x166)});return;}if(_0x21d7b6[_0x282789(0x25c)]!==undefined&&_0x21d7b6[_0x282789(0x25c)]!==null){if(typeof _0x21d7b6[_0x282789(0x25c)]!==_0x282789(0x16f))_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x111),'message':_0x282789(0x13f)});else _0x21d7b6[_0x282789(0x25c)][_0x282789(0x1f9)]()&&_0x21d7b6['version'][_0x282789(0x1f9)]()!=='v1'&&_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x111),'message':_0x282789(0x1e9)+_0x21d7b6[_0x282789(0x25c)]+'.'});}const _0x504074=requireNotificationString(_0x21d7b6[_0x282789(0x14b)],_0x163992+_0x282789(0x1d1),_0x282789(0x103),_0x2874b4);_0x504074?.[_0x282789(0x18b)]('${')&&_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x1d1),'message':_0x282789(0x135)});if(_0x21d7b6[_0x282789(0x138)]!==undefined&&_0x21d7b6[_0x282789(0x138)]!==null){if(typeof _0x21d7b6[_0x282789(0x138)]!==_0x282789(0x16f))_0x2874b4['push']({'path':_0x163992+_0x282789(0x1ec),'message':_0x282789(0x1d5)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x21d7b6[_0x282789(0x138)]['trim']()[_0x282789(0x260)]())&&_0x2874b4[_0x282789(0x225)]({'path':_0x163992+'.failurePolicy','message':_0x282789(0x188)});}!isRecord(_0x21d7b6[_0x282789(0x1e6)])?_0x2874b4[_0x282789(0x225)]({'path':_0x163992+_0x282789(0x1e8),'message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x21d7b6[_0x282789(0x1e6)],_0x163992+_0x282789(0x1e8),_0x2874b4),validateNotificationRecipients(_0x21d7b6['recipients'],_0x163992+'.recipients',_0x2874b4);}function validateNotificationTemplate(_0x17be4e,_0x828d0e,_0x47a915){const _0x1d7447=a299_0x2ba7aa;for(const _0x13a855 of['title',_0x1d7447(0x247)]){const _0xa04eeb=requireNotificationString(_0x17be4e[_0x13a855],_0x828d0e+'.'+_0x13a855,_0x1d7447(0x15e)+_0x13a855+_0x1d7447(0x249),_0x47a915);if(_0xa04eeb)validateNotificationPlaceholders(_0xa04eeb,_0x828d0e+'.'+_0x13a855,_0x47a915);}_0x17be4e[_0x1d7447(0x214)]!==undefined&&_0x17be4e[_0x1d7447(0x214)]!==null&&(typeof _0x17be4e[_0x1d7447(0x214)]!==_0x1d7447(0x16f)?_0x47a915[_0x1d7447(0x225)]({'path':_0x828d0e+_0x1d7447(0x1fb),'message':_0x1d7447(0x18a)}):validateNotificationPlaceholders(_0x17be4e[_0x1d7447(0x214)],_0x828d0e+_0x1d7447(0x1fb),_0x47a915)),validateNotificationFacts(_0x17be4e[_0x1d7447(0x12e)],_0x828d0e+_0x1d7447(0x202),_0x47a915),validateNotificationActions(_0x17be4e[_0x1d7447(0x10e)],_0x828d0e+_0x1d7447(0x141),_0x47a915);}function validateNotificationFacts(_0x42d70e,_0x3917ea,_0x2334e3){const _0x1fbefc=a299_0x2ba7aa;if(_0x42d70e===undefined||_0x42d70e===null)return;if(!Array[_0x1fbefc(0x116)](_0x42d70e)){_0x2334e3['push']({'path':_0x3917ea,'message':_0x1fbefc(0x17f)});return;}_0x42d70e[_0x1fbefc(0x227)]>MAX_NOTIFICATION_FACTS&&_0x2334e3['push']({'path':_0x3917ea,'message':_0x1fbefc(0x1fd)+MAX_NOTIFICATION_FACTS+_0x1fbefc(0x1d3)}),_0x42d70e[_0x1fbefc(0x1f1)]((_0x1ba13c,_0x31b012)=>{const _0x567f91=_0x1fbefc,_0x3cdb03=_0x3917ea+'['+_0x31b012+']';if(!isRecord(_0x1ba13c)){_0x2334e3[_0x567f91(0x225)]({'path':_0x3cdb03,'message':_0x567f91(0x1a8)});return;}for(const _0x580ea8 of[_0x567f91(0x1ed),_0x567f91(0x160)]){const _0x34630c=requireNotificationString(_0x1ba13c[_0x580ea8],_0x3cdb03+'.'+_0x580ea8,_0x567f91(0x23a)+_0x580ea8+'\x20is\x20required.',_0x2334e3);_0x34630c&&validateNotificationPlaceholders(_0x34630c,_0x3cdb03+'.'+_0x580ea8,_0x2334e3);}});}function validateNotificationActions(_0x5d2001,_0x14cd4f,_0x37f3b8){const _0x55f754=a299_0x2ba7aa;if(_0x5d2001===undefined||_0x5d2001===null)return;if(!Array[_0x55f754(0x116)](_0x5d2001)){_0x37f3b8[_0x55f754(0x225)]({'path':_0x14cd4f,'message':_0x55f754(0x1ce)});return;}_0x5d2001[_0x55f754(0x227)]>MAX_NOTIFICATION_ACTIONS&&_0x37f3b8[_0x55f754(0x225)]({'path':_0x14cd4f,'message':_0x55f754(0x1fd)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x5d2001[_0x55f754(0x1f1)]((_0x199bd5,_0x57f178)=>{const _0x7191ad=_0x55f754,_0x5f4cdc=_0x14cd4f+'['+_0x57f178+']';if(!isRecord(_0x199bd5)){_0x37f3b8[_0x7191ad(0x225)]({'path':_0x5f4cdc,'message':_0x7191ad(0x246)});return;}const _0x10c465=requireNotificationString(_0x199bd5[_0x7191ad(0x207)],_0x5f4cdc+'.text',_0x7191ad(0x23e),_0x37f3b8);if(_0x10c465)validateNotificationPlaceholders(_0x10c465,_0x5f4cdc+_0x7191ad(0x1ab),_0x37f3b8);const _0x209add=requireNotificationString(_0x199bd5[_0x7191ad(0x16b)],_0x5f4cdc+'.url',_0x7191ad(0x198),_0x37f3b8);if(!_0x209add)return;validateNotificationPlaceholders(_0x209add,_0x5f4cdc+_0x7191ad(0x152),_0x37f3b8),!/^https?:\/\//i[_0x7191ad(0x18e)](_0x209add)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x7191ad(0x18e)](_0x209add)&&_0x37f3b8['push']({'path':_0x5f4cdc+_0x7191ad(0x152),'message':_0x7191ad(0x108)});});}function validateNotificationRecipients(_0x97f410,_0x2bd98e,_0x554c56){const _0x4f05ed=a299_0x2ba7aa;if(_0x97f410===undefined||_0x97f410===null)return;if(!Array[_0x4f05ed(0x116)](_0x97f410)){_0x554c56[_0x4f05ed(0x225)]({'path':_0x2bd98e,'message':_0x4f05ed(0x192)});return;}let _0x4e8310=![];_0x97f410[_0x4f05ed(0x1f1)]((_0x3c943f,_0x4562af)=>{const _0x3d990d=_0x4f05ed,_0x495437=_0x2bd98e+'['+_0x4562af+']';if(!isRecord(_0x3c943f)){_0x554c56[_0x3d990d(0x225)]({'path':_0x495437,'message':_0x3d990d(0x1b1)});return;}const _0xc6e6dc=requireNotificationString(_0x3c943f['type'],_0x495437+_0x3d990d(0x150),'Notification\x20recipient.type\x20is\x20required.',_0x554c56);_0xc6e6dc&&!NOTIFICATION_RECIPIENT_TYPES[_0x3d990d(0x1aa)](_0xc6e6dc[_0x3d990d(0x260)]())&&_0x554c56['push']({'path':_0x495437+'.type','message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x319425='TO';_0x3c943f[_0x3d990d(0x20f)]!==undefined&&_0x3c943f['role']!==null&&(typeof _0x3c943f[_0x3d990d(0x20f)]!=='string'?(_0x554c56[_0x3d990d(0x225)]({'path':_0x495437+_0x3d990d(0x21e),'message':_0x3d990d(0x128)}),_0x319425=''):(_0x319425=_0x3c943f[_0x3d990d(0x20f)][_0x3d990d(0x1f9)]()[_0x3d990d(0x260)](),!NOTIFICATION_RECIPIENT_ROLES[_0x3d990d(0x1aa)](_0x319425)&&_0x554c56['push']({'path':_0x495437+_0x3d990d(0x21e),'message':_0x3d990d(0x1e5)})));if(_0x319425==='TO')_0x4e8310=!![];const _0x4640a6=requireNotificationString(_0x3c943f[_0x3d990d(0x160)],_0x495437+_0x3d990d(0x1d0),_0x3d990d(0x251),_0x554c56);_0x4640a6&&validateNotificationPlaceholders(_0x4640a6,_0x495437+_0x3d990d(0x1d0),_0x554c56);}),_0x97f410['length']>0x0&&!_0x4e8310&&_0x554c56[_0x4f05ed(0x225)]({'path':_0x2bd98e,'message':_0x4f05ed(0x1bc)});}function requireNotificationString(_0x221540,_0x1177be,_0x45df2c,_0x2ef33d){const _0x232ee2=a299_0x2ba7aa;if(typeof _0x221540!==_0x232ee2(0x16f)||_0x221540[_0x232ee2(0x1f9)]()==='')return _0x2ef33d[_0x232ee2(0x225)]({'path':_0x1177be,'message':_0x45df2c}),undefined;return _0x221540[_0x232ee2(0x1f9)]();}function validateNotificationPlaceholders(_0x3f2085,_0x76f018,_0x2a5704){const _0x5ea186=a299_0x2ba7aa;for(const _0x17bbe5 of _0x3f2085['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x3c7f8d=_0x17bbe5[0x1]?.[_0x5ea186(0x1f9)]()??'',_0x5a4bb5=_0x3c7f8d[_0x5ea186(0x194)]('.'),_0x3f6c04=_0x5a4bb5>=0x0?_0x3c7f8d[_0x5ea186(0x20c)](0x0,_0x5a4bb5):_0x3c7f8d,_0x4f42cf=_0x5a4bb5>=0x0?_0x3c7f8d[_0x5ea186(0x20c)](_0x5a4bb5+0x1)[_0x5ea186(0x1f9)]():'';(![_0x5ea186(0x253),'context','variables'][_0x5ea186(0x18b)](_0x3f6c04)||_0x4f42cf==='')&&_0x2a5704[_0x5ea186(0x225)]({'path':_0x76f018,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x17bbe5[0x0]+'.'});}_0x3f2085[_0x5ea186(0x256)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x5ea186(0x18b)]('${')&&_0x2a5704['push']({'path':_0x76f018,'message':_0x5ea186(0x1eb)});}function validateEdge(_0x4d5cb3,_0x1762ee,_0x2c3fbb){const _0x311602=a299_0x2ba7aa;_0x4d5cb3[_0x311602(0x11b)]!==undefined&&typeof _0x4d5cb3[_0x311602(0x11b)]!==_0x311602(0x16f)&&_0x2c3fbb['push']({'path':_0x1762ee+_0x311602(0x1dd),'message':_0x311602(0x24d)}),_0x4d5cb3[_0x311602(0x10b)]!==undefined&&typeof _0x4d5cb3[_0x311602(0x10b)]!==_0x311602(0x175)&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+_0x311602(0x1c7),'message':_0x311602(0x1c9)}),_0x4d5cb3[_0x311602(0x241)]!==undefined&&(!Array[_0x311602(0x116)](_0x4d5cb3[_0x311602(0x241)])?_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+'.waypoints','message':_0x311602(0x209)}):_0x4d5cb3[_0x311602(0x241)][_0x311602(0x1f1)]((_0x25f320,_0x4904c4)=>{const _0x15b9c4=_0x311602;if(!isRecord(_0x25f320)){_0x2c3fbb[_0x15b9c4(0x225)]({'path':_0x1762ee+'.waypoints['+_0x4904c4+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x4fa220 of['x','y']){const _0x70c4f9=_0x25f320[_0x4fa220];(typeof _0x70c4f9!=='number'||!Number['isFinite'](_0x70c4f9))&&_0x2c3fbb[_0x15b9c4(0x225)]({'path':_0x1762ee+_0x15b9c4(0x12d)+_0x4904c4+'].'+_0x4fa220,'message':_0x15b9c4(0x134)+_0x4fa220+_0x15b9c4(0x218)});}})),_0x4d5cb3[_0x311602(0x110)]!==undefined&&!CONDITION_TYPES[_0x311602(0x1aa)](_0x4d5cb3[_0x311602(0x110)])&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+_0x311602(0x254),'message':_0x311602(0x255)+String(_0x4d5cb3['conditionType'])+'.'}),_0x4d5cb3[_0x311602(0x110)]===_0x311602(0x170)&&(typeof _0x4d5cb3[_0x311602(0x1df)]!==_0x311602(0x16f)||_0x4d5cb3[_0x311602(0x1df)]['trim']()==='')&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+'.expression','message':_0x311602(0x258)}),_0x4d5cb3[_0x311602(0x10b)]===!![]&&_0x4d5cb3['conditionType']!==_0x311602(0x1e1)&&_0x2c3fbb[_0x311602(0x225)]({'path':_0x1762ee+_0x311602(0x1c7),'message':_0x311602(0x100)}),_0x4d5cb3[_0x311602(0x10b)]===!![]&&typeof _0x4d5cb3[_0x311602(0x1df)]==='string'&&_0x4d5cb3[_0x311602(0x1df)][_0x311602(0x1f9)]()!==''&&_0x2c3fbb['push']({'path':_0x1762ee+_0x311602(0x1cd),'message':_0x311602(0x1f7)});}function validateGraphShape(_0x2fcec7,_0x5398d6,_0x3e7a34,_0x3689d2,_0x29a1df,_0x402a0b,_0x16bf5b){const _0x69941=a299_0x2ba7aa;for(const [_0x590b08,_0x4f087c]of _0x2fcec7){const _0x439615=_0x29a1df[_0x69941(0x216)](_0x590b08)??[],_0x173ff3=_0x3689d2[_0x69941(0x216)](_0x590b08)??[];_0x4f087c[_0x69941(0x23b)]!==_0x69941(0x1c1)&&_0x439615[_0x69941(0x227)]===0x0&&_0x16bf5b['push']({'path':'flowJson.nodes.'+_0x590b08,'message':_0x69941(0x11e)});_0x4f087c[_0x69941(0x23b)]!==_0x69941(0x22d)&&_0x173ff3[_0x69941(0x227)]===0x0&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x4f087c['type']==='START'&&_0x439615[_0x69941(0x227)]>0x0&&_0x16bf5b['push']({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x115)});_0x4f087c[_0x69941(0x23b)]===_0x69941(0x22d)&&_0x173ff3[_0x69941(0x227)]>0x0&&_0x16bf5b['push']({'path':'flowJson.nodes.'+_0x590b08,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x4f087c[_0x69941(0x23b)]===_0x69941(0x140)){_0x173ff3['length']<0x2&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x14e2c5=_0x173ff3[_0x69941(0x1ff)](_0x2a4794=>_0x2a4794[_0x69941(0x10b)]===!![]);_0x14e2c5[_0x69941(0x227)]!==0x1&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x208)});if(_0x14e2c5[_0x69941(0x227)]===0x1){const _0x5b907a=_0x14e2c5[0x0],_0x12b7b6=_0x402a0b[_0x69941(0x216)](_0x5b907a)??_0x69941(0x162);_0x5b907a['conditionType']!==_0x69941(0x1e1)&&_0x16bf5b[_0x69941(0x225)]({'path':_0x12b7b6+_0x69941(0x254),'message':_0x69941(0x16a)});_0x5b907a[_0x69941(0x1df)]!==undefined&&_0x16bf5b[_0x69941(0x225)]({'path':_0x12b7b6+_0x69941(0x1cd),'message':_0x69941(0x215)});for(const _0x26465c of _0x173ff3){if(_0x26465c===_0x5b907a)continue;const _0x4816df=_0x402a0b['get'](_0x26465c)??'flowJson.edges';if(_0x26465c[_0x69941(0x110)]!==_0x69941(0x170))_0x16bf5b['push']({'path':_0x4816df+'.conditionType','message':_0x69941(0x24a)});else(typeof _0x26465c['expression']!=='string'||_0x26465c['expression'][_0x69941(0x1f9)]()==='')&&_0x16bf5b[_0x69941(0x225)]({'path':_0x4816df+_0x69941(0x1cd),'message':_0x69941(0x12b)});}}}if(_0x4f087c[_0x69941(0x23b)]===_0x69941(0x121)&&(_0x4f087c['taskMode']??_0x69941(0x121))===_0x69941(0x25d)){if(_0x173ff3[_0x69941(0x227)]!==0x1)_0x16bf5b[_0x69941(0x225)]({'path':'flowJson.nodes.'+_0x590b08,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x30aa34=_0x173ff3[0x0];((_0x30aa34['conditionType']??_0x69941(0x1e1))!==_0x69941(0x1e1)||_0x30aa34[_0x69941(0x10b)]===!![]||typeof _0x30aa34['expression']===_0x69941(0x16f)&&_0x30aa34[_0x69941(0x1df)][_0x69941(0x1f9)]()!=='')&&_0x16bf5b[_0x69941(0x225)]({'path':_0x402a0b[_0x69941(0x216)](_0x30aa34)??'flowJson.edges','message':_0x69941(0x18d)});}}else{if(_0x4f087c[_0x69941(0x23b)]===_0x69941(0x121)){const _0x57f2da=_0x173ff3[_0x69941(0x1d6)](_0x1f207c=>_0x1f207c[_0x69941(0x110)]??_0x69941(0x1e1)),_0x476795=_0x57f2da[_0x69941(0x1ff)](_0x9ffabc=>_0x9ffabc!==_0x69941(0x199)&&_0x9ffabc!==_0x69941(0x262));_0x476795[_0x69941(0x227)]>0x0&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x1f6)}),_0x57f2da['filter'](_0x105077=>_0x105077===_0x69941(0x199))[_0x69941(0x227)]!==0x1&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x131)}),_0x57f2da['filter'](_0x1f7edc=>_0x1f7edc===_0x69941(0x262))['length']!==0x1&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x590b08,'message':_0x69941(0x1fe)}),_0x173ff3[_0x69941(0x25b)](_0x3060ab=>_0x3060ab[_0x69941(0x10b)]===!![])&&_0x16bf5b[_0x69941(0x225)]({'path':'flowJson.nodes.'+_0x590b08,'message':_0x69941(0x1b7)});}}}const _0x443dbd=new Set(),_0x558a06=_0x173aa9=>{const _0x5c228b=_0x69941;if(_0x443dbd['has'](_0x173aa9))return;_0x443dbd['add'](_0x173aa9);for(const _0x48047f of _0x3689d2[_0x5c228b(0x216)](_0x173aa9)??[]){const _0x55f759=resolveEdgeEndpoint(_0x48047f[_0x5c228b(0x22e)],_0x48047f[_0x5c228b(0x15c)]);if(_0x55f759&&_0x2fcec7[_0x5c228b(0x1aa)](_0x55f759))_0x558a06(_0x55f759);}};_0x558a06(_0x5398d6);for(const _0x54193f of _0x2fcec7[_0x69941(0x1d2)]()){!_0x443dbd[_0x69941(0x1aa)](_0x54193f)&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x54193f,'message':_0x69941(0x204)});}const _0x9b39a8=_0x3e7a34[_0x69941(0x25b)](_0x406692=>_0x443dbd[_0x69941(0x1aa)](_0x406692));if(!_0x9b39a8){_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x162),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x1b6489=new Set(),_0x32769a=_0x4009aa=>{const _0x2dba93=_0x69941;if(_0x1b6489['has'](_0x4009aa))return;_0x1b6489[_0x2dba93(0x205)](_0x4009aa);for(const _0x1c83bf of _0x29a1df[_0x2dba93(0x216)](_0x4009aa)??[]){const _0xbe91a=resolveEdgeEndpoint(_0x1c83bf[_0x2dba93(0x148)],_0x1c83bf[_0x2dba93(0x229)]);if(_0xbe91a&&_0x2fcec7['has'](_0xbe91a))_0x32769a(_0xbe91a);}};for(const _0x359129 of _0x3e7a34){if(_0x2fcec7[_0x69941(0x1aa)](_0x359129))_0x32769a(_0x359129);}for(const _0x2216a4 of _0x443dbd){!_0x1b6489['has'](_0x2216a4)&&_0x16bf5b[_0x69941(0x225)]({'path':_0x69941(0x19a)+_0x2216a4,'message':_0x69941(0x15f)});}}function validateApprovalResults(_0x293558,_0x4d6a7e,_0x5b4114,_0x1edc7a){const _0x35b394=a299_0x2ba7aa;if(_0x4d6a7e===0x0)return;const _0x1bc963=new Set(_0x5b4114['map'](_0x4d60e8=>_0x293558['get'](_0x4d60e8)?.[_0x35b394(0x25f)])[_0x35b394(0x1ff)](_0x3b0a8b=>typeof _0x3b0a8b===_0x35b394(0x16f)));for(const _0x259fa2 of[_0x35b394(0x199),_0x35b394(0x262)]){!_0x1bc963[_0x35b394(0x1aa)](_0x259fa2)&&_0x1edc7a[_0x35b394(0x225)]({'path':_0x35b394(0x236),'message':_0x35b394(0x1c6)+_0x259fa2+'.'});}}function validateScriptResultReferences(_0x23148b,_0x25b1fc,_0x4ee184,_0x1e531f,_0x4e57ba,_0x4e3168,_0x145057){const _0x39b840=a299_0x2ba7aa;if(_0x4e3168[_0x39b840(0x1b9)]===0x0)return;const _0x39ce9b=new Set(),_0x181b85=_0x409b4b=>{const _0x58db4b=_0x39b840;if(!_0x39ce9b[_0x58db4b(0x1aa)](_0x409b4b)&&_0x23148b['has'](_0x409b4b)){_0x39ce9b[_0x58db4b(0x205)](_0x409b4b);for(const _0x31f9f7 of _0x4ee184[_0x58db4b(0x216)](_0x409b4b)??[]){const _0x2bf1e1=resolveEdgeEndpoint(_0x31f9f7[_0x58db4b(0x22e)],_0x31f9f7[_0x58db4b(0x15c)]);if(_0x2bf1e1)_0x181b85(_0x2bf1e1);}}};_0x181b85(_0x25b1fc);const _0x44c8f8=new Map();for(const _0x46453b of _0x39ce9b){_0x44c8f8[_0x39b840(0x101)](_0x46453b,_0x46453b===_0x25b1fc?new Set([_0x25b1fc]):new Set(_0x39ce9b));}let _0x3d82a3=!![];while(_0x3d82a3){_0x3d82a3=![];for(const _0x8527ac of _0x39ce9b){if(_0x8527ac===_0x25b1fc)continue;const _0x42d336=(_0x1e531f[_0x39b840(0x216)](_0x8527ac)??[])[_0x39b840(0x1d6)](_0x4cfb73=>resolveEdgeEndpoint(_0x4cfb73[_0x39b840(0x148)],_0x4cfb73[_0x39b840(0x229)]))[_0x39b840(0x1ff)](_0xb153d0=>Boolean(_0xb153d0&&_0x39ce9b[_0x39b840(0x1aa)](_0xb153d0)));if(_0x42d336[_0x39b840(0x227)]===0x0)continue;const _0x156664=new Set(_0x44c8f8[_0x39b840(0x216)](_0x42d336[0x0])??[]);for(const _0x5bf23e of _0x42d336[_0x39b840(0x20c)](0x1)){const _0x27cbd4=_0x44c8f8[_0x39b840(0x216)](_0x5bf23e)??new Set();for(const _0x45a10c of _0x156664){if(!_0x27cbd4['has'](_0x45a10c))_0x156664[_0x39b840(0x19b)](_0x45a10c);}}_0x156664['add'](_0x8527ac);const _0x5a4ff4=_0x44c8f8[_0x39b840(0x216)](_0x8527ac);!setsEqual(_0x5a4ff4,_0x156664)&&(_0x44c8f8[_0x39b840(0x101)](_0x8527ac,_0x156664),_0x3d82a3=!![]);}}for(const [_0x2e9161,_0x283b0c]of _0x4ee184){const _0x5001d9=_0x44c8f8[_0x39b840(0x216)](_0x2e9161);if(!_0x5001d9)continue;for(const _0x57d8b6 of _0x283b0c){if(_0x57d8b6[_0x39b840(0x110)]!==_0x39b840(0x170)||typeof _0x57d8b6[_0x39b840(0x1df)]!==_0x39b840(0x16f))continue;for(const [_0x321d0a,_0x1a8988]of _0x4e3168){expressionReferencesVariable(_0x57d8b6['expression'],_0x321d0a)&&!_0x5001d9[_0x39b840(0x1aa)](_0x1a8988)&&_0x145057[_0x39b840(0x225)]({'path':(_0x4e57ba[_0x39b840(0x216)](_0x57d8b6)??_0x39b840(0x162))+_0x39b840(0x1cd),'message':_0x39b840(0x1f8)+_0x321d0a+_0x39b840(0x230)+_0x1a8988+_0x39b840(0x21c)+_0x2e9161+'.'});}}}}function expressionReferencesVariable(_0x40e624,_0x1601b7){const _0x489760=a299_0x2ba7aa;let _0x3d52fa=0x0;while(_0x3d52fa<_0x40e624[_0x489760(0x227)]){const _0x19a498=_0x40e624[_0x3d52fa];if(_0x19a498==='\x27'||_0x19a498==='\x22'){_0x3d52fa=skipQuotedExpressionSegment(_0x40e624,_0x3d52fa,_0x19a498);continue;}if(!/[A-Za-z_]/['test'](_0x19a498)){_0x3d52fa+=0x1;continue;}const _0x4c50d7=_0x3d52fa;_0x3d52fa+=0x1;while(_0x3d52fa<_0x40e624[_0x489760(0x227)]&&/[A-Za-z0-9_]/[_0x489760(0x18e)](_0x40e624[_0x3d52fa])){_0x3d52fa+=0x1;}if(_0x40e624[_0x489760(0x20c)](_0x4c50d7,_0x3d52fa)!==_0x1601b7)continue;let _0x41b5e4=_0x4c50d7-0x1;while(_0x41b5e4>=0x0&&/\s/[_0x489760(0x18e)](_0x40e624[_0x41b5e4])){_0x41b5e4-=0x1;}if(_0x40e624[_0x41b5e4]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x29a0b0,_0x1125d1,_0x54ff30){const _0x4a7101=a299_0x2ba7aa;let _0x4a8eda=_0x1125d1+0x1;while(_0x4a8eda<_0x29a0b0[_0x4a7101(0x227)]){if(_0x29a0b0[_0x4a8eda]==='\x5c'){_0x4a8eda+=0x2;continue;}if(_0x29a0b0[_0x4a8eda]===_0x54ff30)return _0x4a8eda+0x1;_0x4a8eda+=0x1;}return _0x4a8eda;}function resolveEffectiveResultVariable(_0x110860,_0x4c4ebd){const _0x1b5086=a299_0x2ba7aa;if(_0x110860===undefined||_0x110860===null||_0x4c4ebd&&_0x110860==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x110860!==_0x1b5086(0x16f)||!VARIABLE_PATTERN[_0x1b5086(0x18e)](_0x110860)||RESERVED_RESULT_VARIABLES['has'](_0x110860)||_0x110860['startsWith'](_0x1b5086(0x1fc)))return undefined;return _0x110860;}function registerResultVariableOwner(_0x1e1c9a,_0x2daeb5,_0x21e442,_0x5f4a14){const _0x302f17=a299_0x2ba7aa;if(_0x1e1c9a[_0x302f17(0x1aa)](_0x2daeb5)){_0x5f4a14[_0x302f17(0x225)]({'path':_0x302f17(0x236),'message':'Duplicate\x20resultVariable:\x20'+_0x2daeb5+'.'});return;}_0x1e1c9a[_0x302f17(0x101)](_0x2daeb5,_0x21e442);}function a299_0x3e72(){const _0x505a8b=['FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','.cc','boolean','FIXED','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowName\x20is\x20required.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','timeout.enabled\x20must\x20be\x20a\x20boolean.','action','#/$defs/userId','.source','\x20users.','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.cc.recipientUserIds','utf8','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','edge\x20must\x20be\x20an\x20object.','4YOeRSe','Edge\x20target\x20node\x20not\x20found:\x20','.position','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','16555275OaFTft','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','includes','.sequential','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','test','duration\x20requires\x20value\x20and\x20unit.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','.transferCandidates.strategy','Notification\x20recipients\x20must\x20be\x20an\x20array.','.timeout.action','indexOf','.cc.recipientUserIds[','SINGLE','.pageId','Notification\x20action.url\x20is\x20required.','APPROVED','flowJson.nodes.','delete','EXECUTE_BFF','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','timeout','empty_metadata_removed','SCRIPT\x20node\x20requires\x20scriptName.','sequential\x20must\x20be\x20a\x20boolean.','timeout.interrupting\x20must\x20be\x20a\x20boolean.','formSchema','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','flowDesc\x20must\x20be\x20a\x20string.','.path','Notification\x20fact\x20must\x20be\x20an\x20object.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','has','.text','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowKey','.target','array','SECONDS','Notification\x20recipient\x20must\x20be\x20an\x20object.','approval_sys_processInstanceId','metadata','parse','].taskMode','strategy','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','scriptName','size','FIXED\x20assignee\x20requires\x20userIds.','unit','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','approved','START','FORM_FLOW','.scriptName','Unsupported\x20node\x20type:\x20','#/$defs/flowEdge','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','.defaultFlow','Unsupported\x20task\x20mode:\x20','defaultFlow\x20must\x20be\x20a\x20boolean.','10380DCWigt','visible','USER','.expression','Notification\x20template.actions\x20must\x20be\x20an\x20array.','interrupting','.value','.configCode','keys','\x20facts.','path','failurePolicy\x20must\x20be\x20a\x20string.','map','approval_sys_initiatorUserId','integer','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','transferCandidates\x20must\x20be\x20an\x20object.','Unsupported\x20approval\x20mode:\x20','edges\x20must\x20be\x20an\x20array.','.name','formData','expression','approval.simple-flow.v1','ALWAYS','CUSTOM_PAGE','.assignee','815VBgOKF','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','template','approval_sys_appCode','.template','Unsupported\x20notification\x20version:\x20','taskMode','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.failurePolicy','label','flowJson.','title','overwrite','forEach','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','approval_sys_initiatorUsername','Unsupported\x20schemaVersion:\x20','object','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','Expression\x20references\x20SCRIPT\x20resultVariable\x20','trim','.cc.visible','.detailMarkdown','approval_sys_','Notification\x20template\x20supports\x20at\x20most\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','filter','.unit','.timeout.interrupting','.facts','resultVariable','Node\x20is\x20not\x20reachable\x20from\x20START.','add','#/$defs/flowNode','text','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','waypoints\x20must\x20be\x20an\x20array.','timeout\x20must\x20be\x20an\x20object.','flowDesc','slice','pageId','flowJson.edges[','role','nodes','PLATFORM_FORM','datasetCode','.id','detailMarkdown','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','get','mode','\x20must\x20be\x20a\x20finite\x20number.','^[A-Za-z_][A-Za-z0-9_]*$','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','CONTINUE','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','https://lovrabet.com/schema/rabetbase-flow-config.json','.role','appCode','transferCandidates','Duplicate\x20value:\x20','^[1-9][0-9]*$','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','#/$defs/position','push','.async.retryCount','length','async\x20must\x20be\x20an\x20object.','sourceNodeId','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','INDEPENDENT_FLOW','END','target','562588anHPpv',',\x20but\x20node\x20','call','.assignee.strategy','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','ANY','flowJson.startPageId','flowJson.nodes','https://json-schema.org/draft/2020-12/schema','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20fact.','type','sequential','edge\x20target\x20is\x20required.','Notification\x20action.text\x20is\x20required.','catch','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','waypoints','startPageId','SCRIPT','scriptResult','datasetCode\x20must\x20be\x20a\x20string.','Notification\x20action\x20must\x20be\x20an\x20object.','summary','form','\x20is\x20required.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','pid','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','edge\x20name\x20must\x20be\x20a\x20string.','NOTIFICATION','ALL','.timeout','Notification\x20recipient.value\x20is\x20required.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','event','.conditionType','Unsupported\x20condition\x20type:\x20','replace','3563416lwWsQN','EXPRESSION\x20edge\x20requires\x20expression.','MAX_SAFE_INTEGER','edges','some','version','HANDLE','flowJson\x20must\x20be\x20an\x20object.','result','toUpperCase','userIds','REJECTED','approval_sys_pageId','number','Duplicate\x20BPMN\x20element\x20id:\x20','pageIds','Reserved\x20resultVariable:\x20','FAIL','assignee','flowJson.startPath','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','.\x20This\x20CLI\x20supports\x20only\x20','message','flowJson.nodes[','isInteger','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','set','.assignee.roleId','Notification\x20configCode\x20is\x20required.','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','__rabetbase_local_validation__','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','NaN','retryInterval','defaultFlow','position','formPermission','actions','findIndex','conditionType','.version','flowName','#/$defs/timeAmount','.position.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','isArray','startsWith','4141235HHIzTU','Duplicate\x20edge\x20route:\x20','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','name','approval_sys_datasetCode','.timeout.duration','Node\x20has\x20no\x20incoming\x20edge.','roleId','Duplicate\x20node\x20id:\x20','APPROVAL','recipientUserIds','DAYS','config','112905nKImNF','MINUTES','AUTO_REJECT','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','513879eIrHMV','stringify','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','].path','.waypoints[','facts','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','isFinite','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','\x20was\x20empty\x20and\x20was\x20removed.','warnings','waypoint.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','position.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','failurePolicy','Unsupported\x20flowType:\x20','legacy_field_removed','flowCode','prototype','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','enabled','Notification\x20version\x20must\x20be\x20a\x20string.','CONDITION','.actions','.tmp','approvalMode','bindDatasetCode','approval_sys_dataId','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','source','templateName','startPath','configCode','AUTO_APPROVE','flowJson.schemaVersion','formPermissions','isSafeInteger','.type','.async.retryInterval','.url','flowJson','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.resultVariable','hasOwnProperty','nodes\x20must\x20be\x20an\x20array.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','APPROVAL\x20node\x20requires\x20assignee.','HOURS','.assignee.userIds','targetNodeId','EMAIL','Notification\x20template.','Node\x20cannot\x20reach\x20any\x20END.','value','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','flowJson.edges','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','schemaVersion','BCC','NOTIFICATION\x20node\x20requires\x20config.','async','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','pageMode','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','url','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','flowType','approval_sys_operationType','string','EXPRESSION','ROLE','flowJson.pageMode'];a299_0x3e72=function(){return _0x505a8b;};return a299_0x3e72();}function setsEqual(_0x1e3e5f,_0x2dd129){const _0x133071=a299_0x2ba7aa;return _0x1e3e5f[_0x133071(0x1b9)]===_0x2dd129[_0x133071(0x1b9)]&&[..._0x1e3e5f]['every'](_0x357af2=>_0x2dd129[_0x133071(0x1aa)](_0x357af2));}function isValidUserId(_0x3a709a){const _0x9da6de=a299_0x2ba7aa;if(typeof _0x3a709a===_0x9da6de(0x16f))return _0x3a709a[_0x9da6de(0x1f9)]()[_0x9da6de(0x227)]>0x0;return Number[_0x9da6de(0x14f)](_0x3a709a)&&Number(_0x3a709a)>0x0;}function resolveEdgeEndpoint(_0x5845d0,_0x455748){const _0x202496=a299_0x2ba7aa;if(typeof _0x5845d0===_0x202496(0x16f)&&_0x5845d0[_0x202496(0x1f9)]())return _0x5845d0[_0x202496(0x1f9)]();if(typeof _0x455748===_0x202496(0x16f)&&_0x455748['trim']())return _0x455748[_0x202496(0x1f9)]();return undefined;}function removeEmptyMetadata(_0x12e1d5,_0x3d4155,_0x262e1a,_0x1204a0){const _0x50c7fa=a299_0x2ba7aa;if(Array['isArray'](_0x12e1d5)){_0x12e1d5[_0x50c7fa(0x1f1)]((_0x5db218,_0x43330b)=>removeEmptyMetadata(_0x5db218,_0x3d4155+'['+_0x43330b+']',_0x262e1a,_0x1204a0));return;}if(!isRecord(_0x12e1d5))return;for(const [_0x149d21,_0x210966]of Object['entries'](_0x12e1d5)){const _0x54b7b0=_0x3d4155+'.'+_0x149d21;if(_0x149d21===_0x50c7fa(0x1b3)&&isEmptyJsonValue(_0x210966)){delete _0x12e1d5[_0x149d21],_0x1204a0[_0x50c7fa(0x225)](_0x54b7b0),_0x262e1a[_0x50c7fa(0x225)]({'code':_0x50c7fa(0x1a0),'path':_0x54b7b0,'message':_0x54b7b0+_0x50c7fa(0x132)});continue;}removeEmptyMetadata(_0x210966,_0x54b7b0,_0x262e1a,_0x1204a0);}}function isEmptyJsonValue(_0x3be9d7){const _0x1753c2=a299_0x2ba7aa;if(_0x3be9d7===null||_0x3be9d7===undefined)return!![];if(typeof _0x3be9d7==='string')return _0x3be9d7[_0x1753c2(0x1f9)]()==='';if(Array[_0x1753c2(0x116)](_0x3be9d7))return _0x3be9d7[_0x1753c2(0x227)]===0x0;return isRecord(_0x3be9d7)&&Object[_0x1753c2(0x1d2)](_0x3be9d7)[_0x1753c2(0x227)]===0x0;}function isRecord(_0x72f334){const _0x384535=a299_0x2ba7aa;return typeof _0x72f334===_0x384535(0x1f5)&&_0x72f334!==null&&!Array['isArray'](_0x72f334);}function cloneJsonValue(_0x2beea9){const _0x27d276=a299_0x2ba7aa;return JSON[_0x27d276(0x1b4)](JSON['stringify'](_0x2beea9));}export async function readFlowConfigFile(_0x19e0b1){const _0x3f4667=a299_0x2ba7aa,_0xec7e1a=await readFile(resolve(_0x19e0b1),_0x3f4667(0x181));return JSON[_0x3f4667(0x1b4)](_0xec7e1a);}
1
+ const a299_0x4a86f2=a299_0x3bd6;(function(_0x14705b,_0x476334){const _0x3c65b7=a299_0x3bd6,_0x288420=_0x14705b();while(!![]){try{const _0x413120=-parseInt(_0x3c65b7(0x232))/0x1*(parseInt(_0x3c65b7(0x1f2))/0x2)+parseInt(_0x3c65b7(0x1bb))/0x3*(-parseInt(_0x3c65b7(0x1b9))/0x4)+-parseInt(_0x3c65b7(0x1e2))/0x5*(parseInt(_0x3c65b7(0x210))/0x6)+-parseInt(_0x3c65b7(0x1ff))/0x7*(-parseInt(_0x3c65b7(0x1d1))/0x8)+parseInt(_0x3c65b7(0x2ae))/0x9+-parseInt(_0x3c65b7(0x2f3))/0xa+parseInt(_0x3c65b7(0x266))/0xb;if(_0x413120===_0x476334)break;else _0x288420['push'](_0x288420['shift']());}catch(_0x18d003){_0x288420['push'](_0x288420['shift']());}}}(a299_0x43eb,0xec4e8));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0x4a86f2(0x247),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':a299_0x4a86f2(0x23e),'type':'object','required':[a299_0x4a86f2(0x2b2),a299_0x4a86f2(0x1f0),a299_0x4a86f2(0x2f0)],'$defs':{'userId':{'anyOf':[{'type':a299_0x4a86f2(0x28c),'minLength':0x1},{'type':a299_0x4a86f2(0x2a1),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a299_0x4a86f2(0x249),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x22d),a299_0x4a86f2(0x209)],'properties':{'value':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1},'unit':{'enum':[a299_0x4a86f2(0x2b9),a299_0x4a86f2(0x2dd),'HOURS','DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a299_0x4a86f2(0x1ce),'required':['id','type',a299_0x4a86f2(0x2bb),a299_0x4a86f2(0x263)],'properties':{'id':{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x1b8)},'type':{'enum':[a299_0x4a86f2(0x218),'END',a299_0x4a86f2(0x274),'CONDITION',a299_0x4a86f2(0x290),a299_0x4a86f2(0x2fd)]},'name':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':a299_0x4a86f2(0x2b4)},'approvalMode':{'enum':['SINGLE','ALL','ANY']},'taskMode':{'enum':['APPROVAL',a299_0x4a86f2(0x283)]},'assignee':{'type':'object','required':[a299_0x4a86f2(0x226)],'properties':{'strategy':{'enum':[a299_0x4a86f2(0x1f7),'ROLE']},'userIds':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'items':{'$ref':a299_0x4a86f2(0x271)}},'roleId':{'anyOf':[{'type':a299_0x4a86f2(0x2a1),'minimum':0x1},{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x214)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':['strategy',a299_0x4a86f2(0x1d9)],'properties':{'strategy':{'const':a299_0x4a86f2(0x1f7)},'userIds':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'items':{'$ref':a299_0x4a86f2(0x271)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x4a86f2(0x1ad)},'result':{'enum':[a299_0x4a86f2(0x238),a299_0x4a86f2(0x1b4)]},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x1b8)},'async':{'type':a299_0x4a86f2(0x1ce),'properties':{'enabled':{'type':'boolean'},'retryCount':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0x4a86f2(0x1ad)},'duration':{'$ref':a299_0x4a86f2(0x1e4)},'action':{'enum':['AUTO_APPROVE',a299_0x4a86f2(0x24c),'EXECUTE_BFF']},'interrupting':{'type':a299_0x4a86f2(0x1ad)},'scriptName':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x4a86f2(0x1b8)}},'additionalProperties':!![]},'cc':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x1cf)],'properties':{'recipientUserIds':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'visible':{'type':a299_0x4a86f2(0x277),'uniqueItems':!![],'items':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x2d5),a299_0x4a86f2(0x2fc)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a299_0x4a86f2(0x203)]},'template':{'type':'object','required':['title',a299_0x4a86f2(0x1ea)],'properties':{'title':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'summary':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'detailMarkdown':{'type':a299_0x4a86f2(0x28c)},'facts':{'type':a299_0x4a86f2(0x277),'maxItems':0x8,'items':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x2bc),a299_0x4a86f2(0x22d)],'properties':{'label':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'value':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x4a86f2(0x277),'maxItems':0x2,'items':{'type':'object','required':[a299_0x4a86f2(0x1be),a299_0x4a86f2(0x251)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x4a86f2(0x28c),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x4a86f2(0x277),'items':{'type':'object','required':[a299_0x4a86f2(0x2e9),'value'],'properties':{'type':{'enum':[a299_0x4a86f2(0x1fa),'ROLE',a299_0x4a86f2(0x219)]},'value':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x4a86f2(0x1e7)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x4a86f2(0x1ce),'properties':{'id':{'type':a299_0x4a86f2(0x28c),'pattern':a299_0x4a86f2(0x1b8)},'source':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'target':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'sourceNodeId':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'targetNodeId':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'conditionType':{'enum':[a299_0x4a86f2(0x250),a299_0x4a86f2(0x238),a299_0x4a86f2(0x1b4),'EXPRESSION']},'expression':{'type':a299_0x4a86f2(0x28c)},'defaultFlow':{'type':a299_0x4a86f2(0x1ad)},'name':{'type':'string'},'waypoints':{'type':a299_0x4a86f2(0x277),'items':{'$ref':a299_0x4a86f2(0x2b4)}}},'allOf':[{'anyOf':[{'required':[a299_0x4a86f2(0x304)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0x4a86f2(0x215)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a299_0x4a86f2(0x28c)},'flowType':{'enum':[a299_0x4a86f2(0x2a5),a299_0x4a86f2(0x267)]},'datasetCode':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'pageId':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1,'maximum':Number[a299_0x4a86f2(0x26f)]},'pageIds':{'type':a299_0x4a86f2(0x277),'items':{'type':a299_0x4a86f2(0x2a1),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':a299_0x4a86f2(0x1ce),'required':[a299_0x4a86f2(0x2cf),a299_0x4a86f2(0x217)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x4a86f2(0x282),'description':a299_0x4a86f2(0x208)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x4a86f2(0x272)},'startPageId':![],'startPath':{'type':a299_0x4a86f2(0x28c),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x4a86f2(0x1fc)}},'edges':{'type':a299_0x4a86f2(0x277),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey',a299_0x4a86f2(0x302),a299_0x4a86f2(0x2b2),a299_0x4a86f2(0x1dd),a299_0x4a86f2(0x22e),a299_0x4a86f2(0x20a),a299_0x4a86f2(0x206),a299_0x4a86f2(0x268)],REMOVED_ROOT_FIELDS=['id',a299_0x4a86f2(0x20a),a299_0x4a86f2(0x268)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x4a86f2(0x282),NODE_TYPES=new Set(['START','END',a299_0x4a86f2(0x274),'CONDITION','SCRIPT',a299_0x4a86f2(0x2fd)]),CONDITION_TYPES=new Set([a299_0x4a86f2(0x250),a299_0x4a86f2(0x238),a299_0x4a86f2(0x1b4),a299_0x4a86f2(0x2a0)]),APPROVAL_MODES=new Set(['SINGLE','ALL','ANY']),APPROVAL_TASK_MODES=new Set([a299_0x4a86f2(0x274),a299_0x4a86f2(0x283)]),FLOW_TIME_UNITS=new Set(['SECONDS',a299_0x4a86f2(0x2dd),a299_0x4a86f2(0x2d3),a299_0x4a86f2(0x1c9)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x4a86f2(0x1bc),a299_0x4a86f2(0x24c),a299_0x4a86f2(0x224)]),FLOW_TYPES=new Set([a299_0x4a86f2(0x2a5),a299_0x4a86f2(0x267)]),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE','PLATFORM_FORM']),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0x4a86f2(0x2e7),a299_0x4a86f2(0x203)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x4a86f2(0x1fa),a299_0x4a86f2(0x1eb),a299_0x4a86f2(0x219)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE='scriptResult',UNSUPPORTED_FORM_MESSAGE=a299_0x4a86f2(0x253),UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a299_0x4a86f2(0x1ab),a299_0x4a86f2(0x1d6),'approval_sys_appCode',a299_0x4a86f2(0x205),a299_0x4a86f2(0x1c2),'approval_sys_initiatorUsername','approval_sys_datasetCode',a299_0x4a86f2(0x221),a299_0x4a86f2(0x2ea),a299_0x4a86f2(0x29e)]);export function normalizeFlowConfig(_0x595833){const _0x54e081=a299_0x4a86f2;if(!isRecord(_0x595833))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x46d0f1=cloneJsonValue(_0x595833),_0x488ee6=_0x46d0f1[_0x54e081(0x2f0)],_0x3bfe1e=isRecord(_0x488ee6)?cloneJsonValue(_0x488ee6):{},_0x3b3964=[],_0xa2ea=[];for(const _0x3464a9 of REMOVED_ROOT_FIELDS){if(!Object[_0x54e081(0x242)][_0x54e081(0x1d8)][_0x54e081(0x2c9)](_0x46d0f1,_0x3464a9))continue;delete _0x46d0f1[_0x3464a9],_0xa2ea[_0x54e081(0x1d2)](_0x3464a9),_0x3b3964[_0x54e081(0x1d2)]({'code':_0x54e081(0x2c6),'path':_0x3464a9,'message':_0x3464a9+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x1549a1 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x54e081(0x242)]['hasOwnProperty']['call'](_0x3bfe1e,_0x1549a1))continue;const _0x955a3c=_0x54e081(0x2ba)+_0x1549a1;delete _0x3bfe1e[_0x1549a1],_0xa2ea[_0x54e081(0x1d2)](_0x955a3c),_0x3b3964[_0x54e081(0x1d2)]({'code':'legacy_field_removed','path':_0x955a3c,'message':_0x955a3c+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x54e081(0x242)][_0x54e081(0x1d8)][_0x54e081(0x2c9)](_0x3bfe1e,_0x54e081(0x2e4))){const _0x26e709=_0x3bfe1e[_0x54e081(0x2e4)],_0x47544e=typeof _0x26e709==='string'?_0x26e709[_0x54e081(0x260)]():_0x26e709;if(isEmptyJsonValue(_0x26e709)||_0x47544e===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5bfc3f='flowJson.schemaVersion';delete _0x3bfe1e[_0x54e081(0x2e4)],_0xa2ea[_0x54e081(0x1d2)](_0x5bfc3f),_0x3b3964[_0x54e081(0x1d2)]({'code':'legacy_field_removed','path':_0x5bfc3f,'message':_0x5bfc3f+_0x54e081(0x24f)+DEFAULT_FLOW_SCHEMA_VERSION+_0x54e081(0x1b2)});}}removeEmptyMetadata(_0x3bfe1e,_0x54e081(0x2f0),_0x3b3964,_0xa2ea);_0x46d0f1[_0x54e081(0x1f0)]==='INDEPENDENT_FLOW'&&!Object[_0x54e081(0x242)][_0x54e081(0x1d8)][_0x54e081(0x2c9)](_0x3bfe1e,_0x54e081(0x2e3))&&(_0x3bfe1e['pageMode']=_0x54e081(0x272));_0x46d0f1[_0x54e081(0x2f0)]=_0x3bfe1e;if(typeof _0x46d0f1[_0x54e081(0x2b2)]===_0x54e081(0x28c))_0x46d0f1[_0x54e081(0x2b2)]=_0x46d0f1[_0x54e081(0x2b2)][_0x54e081(0x260)]();return{'config':_0x46d0f1,'warnings':_0x3b3964,'removedPaths':_0xa2ea};}export function validateFlowConfig(_0x56bf14){const _0x4ef0d6=a299_0x4a86f2;let _0x5c227e;try{_0x5c227e=normalizeFlowConfig(_0x56bf14);}catch(_0x2998d4){const _0x425cdb=_0x2998d4 instanceof Error?_0x2998d4['message']:String(_0x2998d4),_0x2c98cf={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x425cdb}],'warnings':[],'normalized':_0x2c98cf,'validationConfig':_0x2c98cf};}const _0x4299e8=_0x5c227e[_0x4ef0d6(0x1dc)],_0x4abbdc=cloneJsonValue(_0x4299e8),_0x5646e5=_0x4abbdc[_0x4ef0d6(0x2f0)];_0x5646e5['flowKey']='__rabetbase_local_validation__',_0x5646e5[_0x4ef0d6(0x2b2)]=_0x4299e8[_0x4ef0d6(0x2b2)];typeof _0x4299e8['datasetCode']===_0x4ef0d6(0x28c)&&_0x4299e8[_0x4ef0d6(0x22e)][_0x4ef0d6(0x260)]()&&(_0x5646e5['bindDatasetCode']=_0x4299e8[_0x4ef0d6(0x22e)][_0x4ef0d6(0x260)]());const _0x49064b=[];return validateOuterMetadata(_0x4299e8,_0x49064b),validateFlowClassification(_0x4299e8,_0x49064b),validateGraph(_0x4299e8[_0x4ef0d6(0x2f0)],_0x49064b),{'valid':_0x49064b['length']===0x0,'errors':_0x49064b,'warnings':_0x5c227e['warnings'],'normalized':_0x4299e8,'validationConfig':_0x4abbdc};}function validateFlowClassification(_0x3cc04e,_0x9766a0){const _0x179c24=a299_0x4a86f2;if(!isRecord(_0x3cc04e[_0x179c24(0x2f0)]))return;const _0xdcf2e0=_0x3cc04e[_0x179c24(0x1f0)],_0x2dc210=_0x3cc04e['flowJson'][_0x179c24(0x2e3)];_0x2dc210!==undefined&&(typeof _0x2dc210!==_0x179c24(0x28c)||!FLOW_PAGE_MODES[_0x179c24(0x2f7)](_0x2dc210))&&_0x9766a0[_0x179c24(0x1d2)]({'path':_0x179c24(0x255),'message':_0x179c24(0x2b7)+String(_0x2dc210)+'.'});_0xdcf2e0==='FORM_FLOW'&&_0x2dc210!==undefined&&_0x9766a0[_0x179c24(0x1d2)]({'path':_0x179c24(0x255),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0xdcf2e0===_0x179c24(0x267)&&_0x2dc210==='PLATFORM_FORM'&&_0x9766a0['push']({'path':_0x179c24(0x255),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xdcf2e0===_0x179c24(0x2a5)||_0xdcf2e0===_0x179c24(0x267))&&validateCustomPageNavigation(_0x3cc04e,_0xdcf2e0,_0x2dc210,_0x9766a0);if(_0xdcf2e0!==_0x179c24(0x2a5)||!Array[_0x179c24(0x202)](_0x3cc04e[_0x179c24(0x2f0)]['nodes']))return;_0x3cc04e[_0x179c24(0x2f0)][_0x179c24(0x2cf)][_0x179c24(0x281)]((_0x45c59e,_0x3497a2)=>{const _0x5c53ae=_0x179c24;isRecord(_0x45c59e)&&_0x45c59e[_0x5c53ae(0x2e9)]===_0x5c53ae(0x274)&&_0x45c59e[_0x5c53ae(0x1df)]===_0x5c53ae(0x283)&&_0x9766a0[_0x5c53ae(0x1d2)]({'path':_0x5c53ae(0x1ba)+_0x3497a2+'].taskMode','message':_0x5c53ae(0x24d)});});}function a299_0x3bd6(_0x1ce71a,_0x4c4c37){_0x1ce71a=_0x1ce71a-0x1aa;const _0x43ebda=a299_0x43eb();let _0x3bd686=_0x43ebda[_0x1ce71a];return _0x3bd686;}function validateCustomPageNavigation(_0x24c330,_0x45aab9,_0x5136f1,_0x5dab07){const _0x4ce6a9=a299_0x4a86f2,_0x21f821=_0x24c330[_0x4ce6a9(0x2f0)][_0x4ce6a9(0x2cd)];_0x21f821!==undefined&&_0x5dab07['push']({'path':_0x4ce6a9(0x1ed),'message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0xeeec47=_0x24c330['flowJson'][_0x4ce6a9(0x2d9)];_0xeeec47!==undefined&&(typeof _0xeeec47!==_0x4ce6a9(0x28c)||_0xeeec47[_0x4ce6a9(0x260)]()==='')&&_0x5dab07[_0x4ce6a9(0x1d2)]({'path':_0x4ce6a9(0x2fb),'message':_0x4ce6a9(0x25a)});const _0x382a05=Array['isArray'](_0x24c330[_0x4ce6a9(0x2f0)][_0x4ce6a9(0x2cf)])?_0x24c330[_0x4ce6a9(0x2f0)][_0x4ce6a9(0x2cf)][_0x4ce6a9(0x2bd)]((_0x496edb,_0x235a19)=>({'node':_0x496edb,'index':_0x235a19}))[_0x4ce6a9(0x235)](({node:_0x1636a9})=>isRecord(_0x1636a9)&&_0x1636a9[_0x4ce6a9(0x248)]!==undefined):[],_0xb10682=_0xeeec47!==undefined||_0x382a05[_0x4ce6a9(0x2a2)]>0x0,_0x4ad584=_0x5136f1===undefined&&_0x45aab9===_0x4ce6a9(0x267)?_0x4ce6a9(0x272):_0x5136f1;_0xb10682&&(_0x45aab9!==_0x4ce6a9(0x267)||_0x4ad584!=='CUSTOM_PAGE')&&(_0xeeec47!==undefined&&_0x5dab07['push']({'path':_0x4ce6a9(0x2fb),'message':_0x4ce6a9(0x292)}),_0x382a05[_0x4ce6a9(0x281)](({index:_0x240fdf})=>{const _0x5c093a=_0x4ce6a9;_0x5dab07['push']({'path':_0x5c093a(0x1ba)+_0x240fdf+_0x5c093a(0x2d0),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x20aa8d,_0x3fbbdd,_0x547a4b={}){const _0x3234c9=a299_0x4a86f2,_0x3aa225=resolve(_0x20aa8d),_0xbf633=_0x3aa225+'.'+process[_0x3234c9(0x303)]+'.'+randomUUID()+_0x3234c9(0x2ac),_0x44932=JSON[_0x3234c9(0x287)](_0x3fbbdd,null,0x2)+'\x0a';let _0x1e6bce;try{try{_0x1e6bce=(await stat(_0x3aa225))['mode']&0x1ff;}catch{_0x1e6bce=undefined;}await writeFile(_0xbf633,_0x44932,{'encoding':'utf8','flag':'wx','mode':_0x1e6bce??0x1a4});if(_0x1e6bce!==undefined)await chmod(_0xbf633,_0x1e6bce);_0x547a4b[_0x3234c9(0x1e0)]===![]?(await link(_0xbf633,_0x3aa225),await unlink(_0xbf633)):await rename(_0xbf633,_0x3aa225);}finally{await unlink(_0xbf633)[_0x3234c9(0x288)](()=>undefined);}}function a299_0x43eb(){const _0x55a343=['END','Notification\x20recipient\x20must\x20be\x20an\x20object.','.assignee.strategy','variables','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','title','flowType\x20is\x20required.','.timeout.action','indexOf','.text','approval_sys_dataId','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','EXPRESSION','integer','length','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','utf8','FORM_FLOW','async.enabled\x20must\x20be\x20a\x20boolean.','waypoints\x20must\x20be\x20an\x20array.','\x20is\x20required.','result','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.async','.tmp','\x20actions.','3335076ZdwSdH','.role','version','flowJson.schemaVersion','flowName','targetNodeId','#/$defs/position','SINGLE','defaultFlow','Unsupported\x20pageMode:\x20','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','SECONDS','flowJson.','name','label','map','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.cc','Every\x20node\x20requires\x20a\x20non-empty\x20name.','timeout\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','nodes\x20must\x20be\x20an\x20array.','flowJson.nodes','.version','legacy_field_removed','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','isInteger','call','slice','edge\x20target\x20is\x20required.','Duplicate\x20value:\x20','startPageId','toUpperCase','nodes','].path','enabled','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','HOURS','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','configCode','.path','context','parse','startPath','.approvalMode','flowDesc','waypoint.','MINUTES','transferCandidates\x20must\x20be\x20an\x20object.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.id','.timeout.resultVariable','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','pageMode','schemaVersion','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.nodes.','CONTINUE','flowJson.edges','type','approval_sys_operationType','scriptName','Notification\x20template.','.async.enabled','value\x20must\x20be\x20a\x20non-empty\x20string.','NOTIFICATION\x20node\x20requires\x20template.','flowJson','NOTIFICATION\x20node\x20requires\x20config.','\x20facts.','7160090eORXQz','async\x20must\x20be\x20an\x20object.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','.timeout.scriptName','has','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','datasetCode\x20must\x20be\x20a\x20string.','.async.retryCount','flowJson.startPath','template','NOTIFICATION','keys','isSafeInteger','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','actions','flowCode','pid','source','.position.','Expression\x20references\x20SCRIPT\x20resultVariable\x20','formData','cc.recipientUserIds\x20supports\x20at\x20most\x20','boolean','formDefinitions','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','includes','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','.value','REJECTED','.target','duration\x20requires\x20value\x20and\x20unit.','Notification\x20fact.','^[A-Za-z_][A-Za-z0-9_]*$','1158348pCzJkj','flowJson.nodes[','9uOZtSx','AUTO_APPROVE','action','text','.cc.visible','formSchema','Unsupported\x20task\x20mode:\x20','approval_sys_initiatorUserId','.timeout.duration','role','entries','.actions','.configCode','roleId','DAYS','resultVariable','formPermission','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','object','recipientUserIds','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','16JPrSQU','push','Duplicate\x20BPMN\x20element\x20id:\x20','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','add','approved','Notification\x20recipients\x20must\x20be\x20an\x20array.','hasOwnProperty','userIds','delete','.transferCandidates.userIds','config','bindDatasetCode','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','taskMode','overwrite','Reserved\x20resultVariable:\x20','15iwSAZk','\x20was\x20empty\x20and\x20was\x20removed.','#/$defs/timeAmount','transferCandidates','edge\x20must\x20be\x20an\x20object.','BCC','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','Unsupported\x20notification\x20placeholder:\x20','summary','ROLE','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','flowJson.startPageId','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.taskMode','flowType','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','320iDdaTA','.waypoints','Notification\x20version\x20must\x20be\x20a\x20string.','detailMarkdown','.unit','FIXED','Duplicate\x20edge\x20route:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','USER','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','#/$defs/flowNode','.name','.timeout','6722464PiUkAE','.detailMarkdown','.conditionType','isArray','FAIL','\x20users.','approval_sys_processInstanceId','pageId','expression','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','unit','appCode','Notification\x20action.text\x20is\x20required.','.waypoints[','defaultFlow\x20must\x20be\x20a\x20boolean.','pageIds','EXPRESSION\x20edge\x20requires\x20expression.','2130330BBTFZT','.assignee.userIds[','edges\x20must\x20be\x20an\x20array.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','^[1-9][0-9]*$','target','flowJson\x20must\x20be\x20an\x20object.','edges','START','EMAIL','.type','interrupting','.cc.readSources','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','findIndex','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.position','approval_sys_pageId','Unsupported\x20notification\x20version:\x20','Edge\x20target\x20node\x20not\x20found:\x20','EXECUTE_BFF','test','strategy','failurePolicy\x20must\x20be\x20a\x20string.','\x20->\x20','NaN','.cc.recipientUserIds[','startsWith','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','value','datasetCode','timeout','every','sourceNodeId','4918psfuAu','.timeout.interrupting','.resultVariable','filter','join','assignee','APPROVED','duration','.source','form','edge\x20source\x20is\x20required.','set','Rabetbase\x20FlowConfig','Duplicate\x20cc\x20recipient\x20userId:\x20','Duplicate\x20resultVariable:\x20','Notification\x20fact\x20must\x20be\x20an\x20object.','prototype','.assignee','replace','some','Notification\x20configCode\x20is\x20required.','https://json-schema.org/draft/2020-12/schema','path','number','formPermissions','conditionType','AUTO_REJECT','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','visible','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','ALWAYS','url','readSources','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.defaultFlow','flowJson.pageMode','retryInterval','flowName\x20is\x20required.','Notification\x20action\x20must\x20be\x20an\x20object.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','.assignee.userIds','.transferCandidates','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','\x20must\x20be\x20a\x20finite\x20number.','Notification\x20recipient.type\x20is\x20required.','trim','flowJson.edges[','FIXED\x20assignee\x20requires\x20userIds.','position','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','value\x20must\x20be\x20an\x20array.','23248049WxQOIc','INDEPENDENT_FLOW','templateName','Unsupported\x20schemaVersion:\x20','.failurePolicy','APPROVAL\x20node\x20requires\x20assignee.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','approval_sys_','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','MAX_SAFE_INTEGER','.url','#/$defs/userId','CUSTOM_PAGE','empty_metadata_removed','APPROVAL','retryCount',',\x20but\x20node\x20','array','Unsupported\x20approval\x20mode:\x20','.cc.recipientUserIds','Notification\x20template\x20supports\x20at\x20most\x20','facts','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','Node\x20cannot\x20reach\x20any\x20END.','failurePolicy','.expression','size','forEach','approval.simple-flow.v1','HANDLE','async','get','.transferCandidates.strategy','stringify','catch','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','sequential','.config','string','metadata','waypoints','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','SCRIPT','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'];a299_0x43eb=function(){return _0x55a343;};return a299_0x43eb();}function validateOuterMetadata(_0x57c531,_0x5df1aa){const _0x26e420=a299_0x4a86f2;(typeof _0x57c531['flowName']!==_0x26e420(0x28c)||_0x57c531[_0x26e420(0x2b2)][_0x26e420(0x260)]()==='')&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x2b2),'message':_0x26e420(0x257)});_0x57c531[_0x26e420(0x2db)]!==undefined&&typeof _0x57c531[_0x26e420(0x2db)]!==_0x26e420(0x28c)&&_0x5df1aa[_0x26e420(0x1d2)]({'path':'flowDesc','message':'flowDesc\x20must\x20be\x20a\x20string.'});if(_0x57c531['flowType']===undefined||_0x57c531[_0x26e420(0x1f0)]===null)_0x5df1aa['push']({'path':_0x26e420(0x1f0),'message':_0x26e420(0x29a)});else(typeof _0x57c531['flowType']!=='string'||!FLOW_TYPES[_0x26e420(0x2f7)](_0x57c531[_0x26e420(0x1f0)]))&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x1f0),'message':'Unsupported\x20flowType:\x20'+String(_0x57c531[_0x26e420(0x1f0)])+'.'});_0x57c531[_0x26e420(0x22e)]!==undefined&&typeof _0x57c531[_0x26e420(0x22e)]!=='string'&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x22e),'message':_0x26e420(0x2f9)});_0x57c531[_0x26e420(0x20e)]===undefined&&_0x57c531[_0x26e420(0x206)]!==undefined&&(!Number[_0x26e420(0x2ff)](_0x57c531[_0x26e420(0x206)])||_0x57c531['pageId']<=0x0)&&_0x5df1aa[_0x26e420(0x1d2)]({'path':'pageId','message':'pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.'});if(_0x57c531[_0x26e420(0x20e)]!==undefined){if(!Array['isArray'](_0x57c531[_0x26e420(0x20e)])||_0x57c531['pageIds']['some'](_0x478c07=>!Number['isSafeInteger'](_0x478c07)||_0x478c07<=0x0))_0x5df1aa[_0x26e420(0x1d2)]({'path':'pageIds','message':_0x26e420(0x1e8)});else[...new Set(_0x57c531[_0x26e420(0x20e)])][_0x26e420(0x236)](',')[_0x26e420(0x2a2)]>0x800&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x20e),'message':_0x26e420(0x2e2)});_0x57c531['flowType']===_0x26e420(0x267)&&Array['isArray'](_0x57c531[_0x26e420(0x20e)])&&_0x57c531[_0x26e420(0x20e)]['length']>0x0&&_0x5df1aa[_0x26e420(0x1d2)]({'path':'pageIds','message':_0x26e420(0x2f5)});}_0x57c531['flowType']===_0x26e420(0x267)&&_0x57c531[_0x26e420(0x22e)]!==undefined&&_0x5df1aa[_0x26e420(0x1d2)]({'path':_0x26e420(0x22e),'message':_0x26e420(0x2aa)}),_0x57c531[_0x26e420(0x1f0)]==='INDEPENDENT_FLOW'&&_0x57c531[_0x26e420(0x20e)]===undefined&&_0x57c531[_0x26e420(0x206)]!==undefined&&_0x5df1aa['push']({'path':'pageId','message':_0x26e420(0x1b1)});}function validateGraph(_0x34d08c,_0x52d21e){const _0x47517d=a299_0x4a86f2;if(!isRecord(_0x34d08c)){_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2f0),'message':_0x47517d(0x216)});return;}!Array[_0x47517d(0x202)](_0x34d08c[_0x47517d(0x2cf)])&&_0x52d21e[_0x47517d(0x1d2)]({'path':'flowJson.nodes','message':_0x47517d(0x2c3)});!Array[_0x47517d(0x202)](_0x34d08c[_0x47517d(0x217)])&&_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2e8),'message':_0x47517d(0x212)});Object[_0x47517d(0x242)][_0x47517d(0x1d8)][_0x47517d(0x2c9)](_0x34d08c,_0x47517d(0x2e4))&&_0x52d21e['push']({'path':_0x47517d(0x2b1),'message':_0x47517d(0x269)+String(_0x34d08c[_0x47517d(0x2e4)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x56e643 of[_0x47517d(0x1c0),_0x47517d(0x1ae),_0x47517d(0x24a)]){Object['prototype'][_0x47517d(0x1d8)][_0x47517d(0x2c9)](_0x34d08c,_0x56e643)&&_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2ba)+_0x56e643,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x47517d(0x202)](_0x34d08c[_0x47517d(0x2cf)])||!Array['isArray'](_0x34d08c[_0x47517d(0x217)]))return;const _0x2b0759=new Map(),_0x1b6b17=[],_0x247773=[],_0x766560=new Map(),_0xcb0c17=new Map(),_0x218713=new Set();let _0x2b67c3=0x0;_0x34d08c[_0x47517d(0x2cf)][_0x47517d(0x281)]((_0x5a2839,_0xabed1c)=>{const _0x5ede74=_0x47517d,_0x49e622='flowJson.nodes['+_0xabed1c+']';if(!isRecord(_0x5a2839)){_0x52d21e['push']({'path':_0x49e622,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x1a169b=_0x5a2839;if(typeof _0x1a169b['id']!==_0x5ede74(0x28c)||!BPMN_ID_PATTERN[_0x5ede74(0x225)](_0x1a169b['id']))_0x52d21e[_0x5ede74(0x1d2)]({'path':_0x49e622+_0x5ede74(0x2e0),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x2b0759[_0x5ede74(0x2f7)](_0x1a169b['id'])?_0x52d21e[_0x5ede74(0x1d2)]({'path':_0x49e622+_0x5ede74(0x2e0),'message':'Duplicate\x20node\x20id:\x20'+_0x1a169b['id']+'.'}):(_0x2b0759[_0x5ede74(0x23d)](_0x1a169b['id'],_0x1a169b),_0x218713['add'](_0x1a169b['id']));if(!NODE_TYPES['has'](_0x1a169b[_0x5ede74(0x2e9)]))_0x52d21e[_0x5ede74(0x1d2)]({'path':_0x49e622+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x1a169b['type'])+'.'});else{if(_0x1a169b[_0x5ede74(0x2e9)]==='START')_0x1b6b17['push'](_0x1a169b['id']);else _0x1a169b[_0x5ede74(0x2e9)]===_0x5ede74(0x294)&&_0x247773['push'](_0x1a169b['id']);}_0x1a169b['type']===_0x5ede74(0x274)&&(_0x1a169b[_0x5ede74(0x1df)]===undefined||_0x1a169b[_0x5ede74(0x1df)]==='APPROVAL')&&(_0x2b67c3+=0x1);validateNode(_0x1a169b,_0x49e622,_0x52d21e);if(_0x1a169b['type']==='SCRIPT'){const _0x205935=resolveEffectiveResultVariable(_0x1a169b[_0x5ede74(0x1ca)],![]);_0x205935&&(registerResultVariableOwner(_0xcb0c17,_0x205935,_0x1a169b['id'],_0x52d21e),!_0x766560[_0x5ede74(0x2f7)](_0x205935)&&_0x766560[_0x5ede74(0x23d)](_0x205935,_0x1a169b['id']));}if(_0x1a169b[_0x5ede74(0x2e9)]===_0x5ede74(0x274)&&isRecord(_0x1a169b[_0x5ede74(0x22f)])&&_0x1a169b[_0x5ede74(0x22f)][_0x5ede74(0x2d1)]===!![]&&_0x1a169b[_0x5ede74(0x22f)][_0x5ede74(0x1bd)]===_0x5ede74(0x224)){const _0x193801=resolveEffectiveResultVariable(_0x1a169b['timeout'][_0x5ede74(0x1ca)],!![]);_0x193801&&registerResultVariableOwner(_0xcb0c17,_0x193801,_0x1a169b['id']+_0x5ede74(0x1fe),_0x52d21e);}});_0x1b6b17[_0x47517d(0x2a2)]!==0x1&&_0x52d21e[_0x47517d(0x1d2)]({'path':_0x47517d(0x2c4),'message':_0x47517d(0x1d4)});_0x247773[_0x47517d(0x2a2)]===0x0&&_0x52d21e['push']({'path':'flowJson.nodes','message':_0x47517d(0x25d)});const _0x38c58c=new Map(),_0x406b3a=new Map(),_0x5d3386=new Map(),_0xa88a95=new Set();_0x34d08c[_0x47517d(0x217)][_0x47517d(0x281)]((_0x32ac4d,_0x35ae8d)=>{const _0x570abb=_0x47517d,_0x52a935=_0x570abb(0x261)+_0x35ae8d+']';if(!isRecord(_0x32ac4d)){_0x52d21e['push']({'path':_0x52a935,'message':_0x570abb(0x1e6)});return;}const _0x11ba15=_0x32ac4d;_0x5d3386['set'](_0x11ba15,_0x52a935);const _0x21b1f8=resolveEdgeEndpoint(_0x11ba15[_0x570abb(0x304)],_0x11ba15[_0x570abb(0x231)]),_0x201aa3=resolveEdgeEndpoint(_0x11ba15[_0x570abb(0x215)],_0x11ba15[_0x570abb(0x2b3)]);if(!_0x21b1f8)_0x52d21e['push']({'path':_0x52a935+'.source','message':_0x570abb(0x23c)});if(!_0x201aa3)_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+_0x570abb(0x1b5),'message':_0x570abb(0x2cb)});_0x21b1f8&&!_0x2b0759[_0x570abb(0x2f7)](_0x21b1f8)&&_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+_0x570abb(0x23a),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x21b1f8+'.'});_0x201aa3&&!_0x2b0759['has'](_0x201aa3)&&_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+_0x570abb(0x1b5),'message':_0x570abb(0x223)+_0x201aa3+'.'});if(_0x11ba15['id']!==undefined){if(typeof _0x11ba15['id']!==_0x570abb(0x28c)||!BPMN_ID_PATTERN[_0x570abb(0x225)](_0x11ba15['id']))_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+'.id','message':_0x570abb(0x21f)});else{if(_0x218713[_0x570abb(0x2f7)](_0x11ba15['id']))_0x52d21e[_0x570abb(0x1d2)]({'path':_0x52a935+'.id','message':_0x570abb(0x1d3)+_0x11ba15['id']+'.'});else!_0x218713[_0x570abb(0x2f7)](_0x11ba15['id'])&&_0x218713['add'](_0x11ba15['id']);}}if(_0x21b1f8&&_0x201aa3){const _0xb2b61f=_0x21b1f8+'\x00'+_0x201aa3+'\x00'+(_0x11ba15[_0x570abb(0x24b)]??_0x570abb(0x250));_0xa88a95[_0x570abb(0x2f7)](_0xb2b61f)?_0x52d21e['push']({'path':_0x52a935,'message':_0x570abb(0x1f8)+_0x21b1f8+_0x570abb(0x228)+_0x201aa3+'\x20('+(_0x11ba15['conditionType']??_0x570abb(0x250))+').'}):_0xa88a95['add'](_0xb2b61f);}validateEdge(_0x11ba15,_0x52a935,_0x52d21e),_0x21b1f8&&_0x201aa3&&(_0x38c58c[_0x570abb(0x285)](_0x21b1f8)?.[_0x570abb(0x1d2)](_0x11ba15)??_0x38c58c[_0x570abb(0x23d)](_0x21b1f8,[_0x11ba15]),_0x406b3a[_0x570abb(0x285)](_0x201aa3)?.['push'](_0x11ba15)??_0x406b3a[_0x570abb(0x23d)](_0x201aa3,[_0x11ba15]));});if(_0x1b6b17['length']!==0x1)return;validateGraphShape(_0x2b0759,_0x1b6b17[0x0],_0x247773,_0x38c58c,_0x406b3a,_0x5d3386,_0x52d21e),validateScriptResultReferences(_0x2b0759,_0x1b6b17[0x0],_0x38c58c,_0x406b3a,_0x5d3386,_0x766560,_0x52d21e),validateApprovalResults(_0x2b0759,_0x2b67c3,_0x247773,_0x52d21e);}function validateNode(_0x47355c,_0xc66171,_0xdc3aee){const _0x493a67=a299_0x4a86f2;for(const _0x283f3d of[_0x493a67(0x23b),_0x493a67(0x1cb)]){Object[_0x493a67(0x242)][_0x493a67(0x1d8)]['call'](_0x47355c,_0x283f3d)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.'+_0x283f3d,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x47355c[_0x493a67(0x2e9)]))return;(typeof _0x47355c[_0x493a67(0x2bb)]!==_0x493a67(0x28c)||_0x47355c[_0x493a67(0x2bb)][_0x493a67(0x260)]()==='')&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x1fd),'message':_0x493a67(0x2c0)});_0x47355c[_0x493a67(0x206)]!==undefined&&_0xdc3aee['push']({'path':_0xc66171+'.pageId','message':_0x493a67(0x1ec)});if(_0x47355c[_0x493a67(0x248)]!==undefined){if(typeof _0x47355c[_0x493a67(0x248)]!==_0x493a67(0x28c)||_0x47355c['path']['trim']()==='')_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x2d6),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x47355c[_0x493a67(0x2e9)]!==_0x493a67(0x274)&&_0x47355c['type']!==_0x493a67(0x294)&&_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x2d6),'message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x37d598=_0x47355c['position'];if(!isRecord(_0x37d598))_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x220),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x3867f0 of['x','y']){const _0x13e1ea=_0x37d598[_0x3867f0];(typeof _0x13e1ea!=='number'||!Number['isFinite'](_0x13e1ea)||_0x13e1ea<0x0)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x305)+_0x3867f0,'message':'position.'+_0x3867f0+_0x493a67(0x26e)});}if(_0x47355c[_0x493a67(0x2e9)]===_0x493a67(0x274)){const _0x2b901b=_0x47355c['approvalMode']??'SINGLE',_0x2d8e9a=_0x47355c[_0x493a67(0x1df)]??_0x493a67(0x274);!APPROVAL_TASK_MODES[_0x493a67(0x2f7)](_0x2d8e9a)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x1ef),'message':_0x493a67(0x1c1)+String(_0x2d8e9a)+'.'});!APPROVAL_MODES[_0x493a67(0x2f7)](_0x2b901b)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x2da),'message':_0x493a67(0x278)+String(_0x2b901b)+'.'});if(!isRecord(_0x47355c[_0x493a67(0x237)]))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x243),'message':_0x493a67(0x26b)});else{const _0x1ca945=_0x47355c['assignee'][_0x493a67(0x226)];_0x1ca945!==_0x493a67(0x1f7)&&_0x1ca945!=='ROLE'&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x296),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x1ca945===_0x493a67(0x1f7)){const _0x42e544=_0x47355c[_0x493a67(0x237)]['userIds'];if(!Array[_0x493a67(0x202)](_0x42e544)||_0x42e544[_0x493a67(0x2a2)]===0x0)_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x25b),'message':_0x493a67(0x262)});else{const _0x3c425c=_0x42e544[_0x493a67(0x21e)](_0x47cec4=>!isValidUserId(_0x47cec4));_0x3c425c>=0x0&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x211)+_0x3c425c+']','message':_0x493a67(0x1ee)});const _0x16e4e8=new Set(_0x42e544[_0x493a67(0x235)](isValidUserId)['map'](_0x344bdb=>String(_0x344bdb)[_0x493a67(0x260)]()));_0x2b901b===_0x493a67(0x2b5)&&_0x16e4e8[_0x493a67(0x280)]>0x1&&_0xdc3aee['push']({'path':_0xc66171+_0x493a67(0x25b),'message':_0x493a67(0x2c7)});}}if(_0x1ca945===_0x493a67(0x1eb)){const _0x3d68a8=_0x47355c[_0x493a67(0x237)][_0x493a67(0x1c8)],_0x235d39=typeof _0x3d68a8===_0x493a67(0x249)||typeof _0x3d68a8===_0x493a67(0x28c)?Number(String(_0x3d68a8)[_0x493a67(0x260)]()):Number[_0x493a67(0x229)];(!Number[_0x493a67(0x2ff)](_0x235d39)||_0x235d39<=0x0)&&_0xdc3aee['push']({'path':_0xc66171+'.assignee.roleId','message':_0x493a67(0x289)});}}if(_0x47355c['transferCandidates']!==undefined){if(!isRecord(_0x47355c['transferCandidates']))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x25c),'message':_0x493a67(0x2de)});else{if(_0x47355c[_0x493a67(0x1e5)][_0x493a67(0x226)]!==_0x493a67(0x1f7))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x286),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x3cbc81=_0x47355c[_0x493a67(0x1e5)][_0x493a67(0x1d9)];if(!Array[_0x493a67(0x202)](_0x3cbc81)||_0x3cbc81[_0x493a67(0x2a2)]===0x0)_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x1db),'message':_0x493a67(0x2df)});else{const _0x4625a0=_0x3cbc81['findIndex'](_0x2bf05f=>!isValidUserId(_0x2bf05f));_0x4625a0>=0x0&&_0xdc3aee['push']({'path':_0xc66171+'.transferCandidates.userIds['+_0x4625a0+']','message':_0x493a67(0x1f1)});}}}}}_0x47355c[_0x493a67(0x28a)]!==undefined&&typeof _0x47355c['sequential']!==_0x493a67(0x1ad)&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.sequential','message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x47355c[_0x493a67(0x2e9)]===_0x493a67(0x290)){(typeof _0x47355c[_0x493a67(0x2eb)]!==_0x493a67(0x28c)||_0x47355c[_0x493a67(0x2eb)][_0x493a67(0x260)]()==='')&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.scriptName','message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x47355c[_0x493a67(0x1ca)]!==undefined){if(typeof _0x47355c[_0x493a67(0x1ca)]!==_0x493a67(0x28c)||!VARIABLE_PATTERN[_0x493a67(0x225)](_0x47355c[_0x493a67(0x1ca)]))_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+'.resultVariable','message':_0x493a67(0x1cd)});else(RESERVED_RESULT_VARIABLES[_0x493a67(0x2f7)](_0x47355c[_0x493a67(0x1ca)])||_0x47355c[_0x493a67(0x1ca)]['startsWith']('approval_sys_'))&&_0xdc3aee[_0x493a67(0x1d2)]({'path':_0xc66171+_0x493a67(0x234),'message':_0x493a67(0x1e1)+_0x47355c['resultVariable']+'.'});}}validateAsyncExecution(_0x47355c,_0xc66171,_0xdc3aee),validateApprovalTimeout(_0x47355c,_0xc66171,_0xdc3aee),validateCcConfig(_0x47355c,_0xc66171,_0xdc3aee),_0x47355c[_0x493a67(0x2e9)]==='NOTIFICATION'&&validateNotificationConfig(_0x47355c[_0x493a67(0x1dc)],_0xc66171+_0x493a67(0x28b),_0xdc3aee);}function validateAsyncExecution(_0x562d7d,_0x5cca50,_0x5b4eb9){const _0x480d66=a299_0x4a86f2;if(_0x562d7d['async']===undefined)return;if(!isRecord(_0x562d7d[_0x480d66(0x284)])){_0x5b4eb9['push']({'path':_0x5cca50+_0x480d66(0x2ab),'message':_0x480d66(0x2f4)});return;}if(_0x562d7d[_0x480d66(0x284)][_0x480d66(0x2d1)]!==undefined&&typeof _0x562d7d[_0x480d66(0x284)]['enabled']!==_0x480d66(0x1ad)){_0x5b4eb9[_0x480d66(0x1d2)]({'path':_0x5cca50+_0x480d66(0x2ed),'message':_0x480d66(0x2a6)});return;}if(_0x562d7d[_0x480d66(0x284)][_0x480d66(0x2d1)]!==!![])return;_0x562d7d[_0x480d66(0x2e9)]!==_0x480d66(0x290)&&_0x5b4eb9['push']({'path':_0x5cca50+_0x480d66(0x2ab),'message':_0x480d66(0x1f9)});const _0x566424=_0x562d7d['async'][_0x480d66(0x275)]??0x3;(!Number[_0x480d66(0x2c8)](_0x566424)||_0x566424<0x1||_0x566424>MAX_ASYNC_RETRY_COUNT)&&_0x5b4eb9[_0x480d66(0x1d2)]({'path':_0x5cca50+_0x480d66(0x2fa),'message':_0x480d66(0x1de)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x562d7d[_0x480d66(0x284)][_0x480d66(0x256)]!==undefined&&validateTimeAmount(_0x562d7d[_0x480d66(0x284)][_0x480d66(0x256)],_0x5cca50+'.async.retryInterval',_0x5b4eb9);}function validateApprovalTimeout(_0x54b49f,_0x17e952,_0x5eddbf){const _0x159e78=a299_0x4a86f2;if(_0x54b49f[_0x159e78(0x22f)]===undefined)return;if(!isRecord(_0x54b49f[_0x159e78(0x22f)])){_0x5eddbf['push']({'path':_0x17e952+'.timeout','message':_0x159e78(0x2c1)});return;}if(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x2d1)]!==undefined&&typeof _0x54b49f[_0x159e78(0x22f)]['enabled']!==_0x159e78(0x1ad)){_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+'.timeout.enabled','message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x2d1)]!==!![])return;if(_0x54b49f[_0x159e78(0x22f)]['interrupting']!==undefined&&typeof _0x54b49f[_0x159e78(0x22f)][_0x159e78(0x21b)]!==_0x159e78(0x1ad)){_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x233),'message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x54b49f['type']!==_0x159e78(0x274)&&_0x5eddbf['push']({'path':_0x17e952+_0x159e78(0x1fe),'message':_0x159e78(0x300)});validateTimeAmount(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x239)],_0x17e952+_0x159e78(0x1c3),_0x5eddbf);const _0x9b0abc=_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x1bd)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x159e78(0x2f7)](_0x9b0abc)){_0x5eddbf['push']({'path':_0x17e952+_0x159e78(0x29b),'message':_0x159e78(0x26c)});return;}(_0x54b49f['taskMode']??_0x159e78(0x274))===_0x159e78(0x283)&&_0x9b0abc!==_0x159e78(0x224)&&_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x29b),'message':_0x159e78(0x29f)});const _0xc31857=_0x54b49f['timeout'][_0x159e78(0x21b)]??_0x9b0abc!==_0x159e78(0x224);if(_0x9b0abc===_0x159e78(0x224))_0xc31857&&_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x233),'message':_0x159e78(0x2d4)}),(typeof _0x54b49f[_0x159e78(0x22f)][_0x159e78(0x2eb)]!=='string'||_0x54b49f['timeout'][_0x159e78(0x2eb)]['trim']()==='')&&_0x5eddbf['push']({'path':_0x17e952+_0x159e78(0x2f6),'message':_0x159e78(0x2b8)}),validateOptionalResultVariable(_0x54b49f[_0x159e78(0x22f)][_0x159e78(0x1ca)],_0x17e952+_0x159e78(0x2e1),_0x5eddbf);else!_0xc31857&&_0x5eddbf[_0x159e78(0x1d2)]({'path':_0x17e952+_0x159e78(0x233),'message':_0x9b0abc+_0x159e78(0x28f)});}function validateTimeAmount(_0x244d9c,_0x2b80da,_0x509d93){const _0x163bfd=a299_0x4a86f2;if(!isRecord(_0x244d9c)){_0x509d93['push']({'path':_0x2b80da,'message':_0x163bfd(0x1b6)});return;}(!Number[_0x163bfd(0x2c8)](_0x244d9c['value'])||Number(_0x244d9c[_0x163bfd(0x22d)])<=0x0)&&_0x509d93[_0x163bfd(0x1d2)]({'path':_0x2b80da+_0x163bfd(0x1b3),'message':_0x163bfd(0x213)}),!FLOW_TIME_UNITS[_0x163bfd(0x2f7)](_0x244d9c[_0x163bfd(0x209)])&&_0x509d93['push']({'path':_0x2b80da+_0x163bfd(0x1f6),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0xa75a0,_0x17b3af,_0x191461){const _0x2d5b49=a299_0x4a86f2;if(_0xa75a0===undefined||_0xa75a0===null||_0xa75a0==='')return;if(typeof _0xa75a0!==_0x2d5b49(0x28c)||!VARIABLE_PATTERN[_0x2d5b49(0x225)](_0xa75a0))_0x191461['push']({'path':_0x17b3af,'message':_0x2d5b49(0x1cd)});else(RESERVED_RESULT_VARIABLES[_0x2d5b49(0x2f7)](_0xa75a0)||_0xa75a0[_0x2d5b49(0x22b)](_0x2d5b49(0x26d)))&&_0x191461[_0x2d5b49(0x1d2)]({'path':_0x17b3af,'message':'Reserved\x20resultVariable:\x20'+_0xa75a0+'.'});}function validateCcConfig(_0x1c0341,_0x5ea8af,_0x3149eb){const _0x1b853c=a299_0x4a86f2;if(_0x1c0341['cc']===undefined)return;if(!isRecord(_0x1c0341['cc'])){_0x3149eb[_0x1b853c(0x1d2)]({'path':_0x5ea8af+'.cc','message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x1c0341[_0x1b853c(0x2e9)]!==_0x1b853c(0x294)&&_0x1c0341['type']!=='APPROVAL'&&_0x3149eb['push']({'path':_0x5ea8af+_0x1b853c(0x2bf),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x1b853c(0x242)][_0x1b853c(0x1d8)][_0x1b853c(0x2c9)](_0x1c0341['cc'],_0x1b853c(0x252))&&_0x3149eb[_0x1b853c(0x1d2)]({'path':_0x5ea8af+_0x1b853c(0x21c),'message':UNSUPPORTED_FORM_MESSAGE});const _0x2402f2=_0x1c0341['cc'][_0x1b853c(0x1cf)];if(!Array[_0x1b853c(0x202)](_0x2402f2)||_0x2402f2[_0x1b853c(0x2a2)]===0x0)_0x3149eb['push']({'path':_0x5ea8af+_0x1b853c(0x279),'message':_0x1b853c(0x27c)});else{_0x2402f2['length']>MAX_CC_RECIPIENTS&&_0x3149eb[_0x1b853c(0x1d2)]({'path':_0x5ea8af+'.cc.recipientUserIds','message':_0x1b853c(0x1ac)+MAX_CC_RECIPIENTS+_0x1b853c(0x204)});const _0x45b892=new Set();_0x2402f2['forEach']((_0x2e3714,_0x1f0c8a)=>{const _0x4cab67=_0x1b853c;if(typeof _0x2e3714!==_0x4cab67(0x28c)||_0x2e3714[_0x4cab67(0x260)]()==='')_0x3149eb[_0x4cab67(0x1d2)]({'path':_0x5ea8af+_0x4cab67(0x22a)+_0x1f0c8a+']','message':_0x4cab67(0x264)});else _0x45b892[_0x4cab67(0x2f7)](_0x2e3714[_0x4cab67(0x260)]())?_0x3149eb[_0x4cab67(0x1d2)]({'path':_0x5ea8af+'.cc.recipientUserIds['+_0x1f0c8a+']','message':_0x4cab67(0x23f)+_0x2e3714[_0x4cab67(0x260)]()+'.'}):_0x45b892[_0x4cab67(0x1d5)](_0x2e3714['trim']());});}validateStringArray(_0x1c0341['cc'][_0x1b853c(0x24e)],_0x5ea8af+_0x1b853c(0x1bf),_0x3149eb);}function validateStringArray(_0x3a1cd8,_0xc6075b,_0x26488e){const _0x3daf01=a299_0x4a86f2;if(_0x3a1cd8===undefined)return;if(!Array[_0x3daf01(0x202)](_0x3a1cd8)){_0x26488e[_0x3daf01(0x1d2)]({'path':_0xc6075b,'message':_0x3daf01(0x265)});return;}const _0x5c1ad7=new Set();_0x3a1cd8[_0x3daf01(0x281)]((_0x4006bc,_0x450e07)=>{const _0x2f4125=_0x3daf01;if(typeof _0x4006bc!==_0x2f4125(0x28c)||_0x4006bc[_0x2f4125(0x260)]()==='')_0x26488e[_0x2f4125(0x1d2)]({'path':_0xc6075b+'['+_0x450e07+']','message':_0x2f4125(0x2ee)});else _0x5c1ad7[_0x2f4125(0x2f7)](_0x4006bc[_0x2f4125(0x260)]())?_0x26488e[_0x2f4125(0x1d2)]({'path':_0xc6075b+'['+_0x450e07+']','message':_0x2f4125(0x2cc)+_0x4006bc[_0x2f4125(0x260)]()+'.'}):_0x5c1ad7[_0x2f4125(0x1d5)](_0x4006bc[_0x2f4125(0x260)]());});}function validateNotificationConfig(_0x442a27,_0x4a632f,_0x559bf6){const _0x62a0d3=a299_0x4a86f2;if(!isRecord(_0x442a27)){_0x559bf6['push']({'path':_0x4a632f,'message':_0x62a0d3(0x2f1)});return;}if(_0x442a27[_0x62a0d3(0x2b0)]!==undefined&&_0x442a27['version']!==null){if(typeof _0x442a27[_0x62a0d3(0x2b0)]!==_0x62a0d3(0x28c))_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x2c5),'message':_0x62a0d3(0x1f4)});else _0x442a27['version'][_0x62a0d3(0x260)]()&&_0x442a27['version'][_0x62a0d3(0x260)]()!=='v1'&&_0x559bf6['push']({'path':_0x4a632f+_0x62a0d3(0x2c5),'message':_0x62a0d3(0x222)+_0x442a27['version']+'.'});}const _0x4adf66=requireNotificationString(_0x442a27[_0x62a0d3(0x2d5)],_0x4a632f+_0x62a0d3(0x1c7),_0x62a0d3(0x246),_0x559bf6);_0x4adf66?.[_0x62a0d3(0x1b0)]('${')&&_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x1c7),'message':_0x62a0d3(0x2be)});if(_0x442a27['failurePolicy']!==undefined&&_0x442a27[_0x62a0d3(0x27e)]!==null){if(typeof _0x442a27[_0x62a0d3(0x27e)]!==_0x62a0d3(0x28c))_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x26a),'message':_0x62a0d3(0x227)});else!NOTIFICATION_FAILURE_POLICIES[_0x62a0d3(0x2f7)](_0x442a27[_0x62a0d3(0x27e)][_0x62a0d3(0x260)]()[_0x62a0d3(0x2ce)]())&&_0x559bf6[_0x62a0d3(0x1d2)]({'path':_0x4a632f+_0x62a0d3(0x26a),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x442a27[_0x62a0d3(0x2fc)])?_0x559bf6['push']({'path':_0x4a632f+'.template','message':_0x62a0d3(0x2ef)}):validateNotificationTemplate(_0x442a27[_0x62a0d3(0x2fc)],_0x4a632f+'.template',_0x559bf6),validateNotificationRecipients(_0x442a27['recipients'],_0x4a632f+'.recipients',_0x559bf6);}function validateNotificationTemplate(_0x519965,_0x4d7f54,_0x137f59){const _0x4c8e24=a299_0x4a86f2;for(const _0x3ced6f of[_0x4c8e24(0x299),'summary']){const _0x5b3c5c=requireNotificationString(_0x519965[_0x3ced6f],_0x4d7f54+'.'+_0x3ced6f,_0x4c8e24(0x2ec)+_0x3ced6f+_0x4c8e24(0x2a8),_0x137f59);if(_0x5b3c5c)validateNotificationPlaceholders(_0x5b3c5c,_0x4d7f54+'.'+_0x3ced6f,_0x137f59);}_0x519965[_0x4c8e24(0x1f5)]!==undefined&&_0x519965[_0x4c8e24(0x1f5)]!==null&&(typeof _0x519965[_0x4c8e24(0x1f5)]!==_0x4c8e24(0x28c)?_0x137f59['push']({'path':_0x4d7f54+_0x4c8e24(0x200),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x519965[_0x4c8e24(0x1f5)],_0x4d7f54+_0x4c8e24(0x200),_0x137f59)),validateNotificationFacts(_0x519965[_0x4c8e24(0x27b)],_0x4d7f54+'.facts',_0x137f59),validateNotificationActions(_0x519965[_0x4c8e24(0x301)],_0x4d7f54+_0x4c8e24(0x1c6),_0x137f59);}function validateNotificationFacts(_0x3548c8,_0x212931,_0x4bb3a1){const _0x5b5843=a299_0x4a86f2;if(_0x3548c8===undefined||_0x3548c8===null)return;if(!Array[_0x5b5843(0x202)](_0x3548c8)){_0x4bb3a1[_0x5b5843(0x1d2)]({'path':_0x212931,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x3548c8[_0x5b5843(0x2a2)]>MAX_NOTIFICATION_FACTS&&_0x4bb3a1[_0x5b5843(0x1d2)]({'path':_0x212931,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x5b5843(0x2f2)}),_0x3548c8[_0x5b5843(0x281)]((_0xfbd375,_0x3b716f)=>{const _0x307e69=_0x5b5843,_0x2fda5b=_0x212931+'['+_0x3b716f+']';if(!isRecord(_0xfbd375)){_0x4bb3a1[_0x307e69(0x1d2)]({'path':_0x2fda5b,'message':_0x307e69(0x241)});return;}for(const _0x5dc5d5 of[_0x307e69(0x2bc),_0x307e69(0x22d)]){const _0x5a898f=requireNotificationString(_0xfbd375[_0x5dc5d5],_0x2fda5b+'.'+_0x5dc5d5,_0x307e69(0x1b7)+_0x5dc5d5+_0x307e69(0x2a8),_0x4bb3a1);_0x5a898f&&validateNotificationPlaceholders(_0x5a898f,_0x2fda5b+'.'+_0x5dc5d5,_0x4bb3a1);}});}function validateNotificationActions(_0x1b014d,_0x1489c1,_0x549aa0){const _0x25c443=a299_0x4a86f2;if(_0x1b014d===undefined||_0x1b014d===null)return;if(!Array['isArray'](_0x1b014d)){_0x549aa0[_0x25c443(0x1d2)]({'path':_0x1489c1,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x1b014d['length']>MAX_NOTIFICATION_ACTIONS&&_0x549aa0[_0x25c443(0x1d2)]({'path':_0x1489c1,'message':_0x25c443(0x27a)+MAX_NOTIFICATION_ACTIONS+_0x25c443(0x2ad)}),_0x1b014d[_0x25c443(0x281)]((_0x359da6,_0x536571)=>{const _0x211a13=_0x25c443,_0x309be0=_0x1489c1+'['+_0x536571+']';if(!isRecord(_0x359da6)){_0x549aa0[_0x211a13(0x1d2)]({'path':_0x309be0,'message':_0x211a13(0x258)});return;}const _0x56d1fa=requireNotificationString(_0x359da6['text'],_0x309be0+_0x211a13(0x29d),_0x211a13(0x20b),_0x549aa0);if(_0x56d1fa)validateNotificationPlaceholders(_0x56d1fa,_0x309be0+_0x211a13(0x29d),_0x549aa0);const _0x1ef31f=requireNotificationString(_0x359da6['url'],_0x309be0+_0x211a13(0x270),'Notification\x20action.url\x20is\x20required.',_0x549aa0);if(!_0x1ef31f)return;validateNotificationPlaceholders(_0x1ef31f,_0x309be0+_0x211a13(0x270),_0x549aa0),!/^https?:\/\//i['test'](_0x1ef31f)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x211a13(0x225)](_0x1ef31f)&&_0x549aa0[_0x211a13(0x1d2)]({'path':_0x309be0+_0x211a13(0x270),'message':_0x211a13(0x1fb)});});}function validateNotificationRecipients(_0x534dd3,_0x1d45f9,_0x3dc697){const _0x15d695=a299_0x4a86f2;if(_0x534dd3===undefined||_0x534dd3===null)return;if(!Array[_0x15d695(0x202)](_0x534dd3)){_0x3dc697['push']({'path':_0x1d45f9,'message':_0x15d695(0x1d7)});return;}let _0x283f6a=![];_0x534dd3[_0x15d695(0x281)]((_0x1a0a7c,_0x501441)=>{const _0x4a3710=_0x15d695,_0x3979ce=_0x1d45f9+'['+_0x501441+']';if(!isRecord(_0x1a0a7c)){_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce,'message':_0x4a3710(0x295)});return;}const _0x58fcfc=requireNotificationString(_0x1a0a7c['type'],_0x3979ce+'.type',_0x4a3710(0x25f),_0x3dc697);_0x58fcfc&&!NOTIFICATION_RECIPIENT_TYPES[_0x4a3710(0x2f7)](_0x58fcfc[_0x4a3710(0x2ce)]())&&_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce+_0x4a3710(0x21a),'message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0xc85fb='TO';_0x1a0a7c['role']!==undefined&&_0x1a0a7c[_0x4a3710(0x1c4)]!==null&&(typeof _0x1a0a7c[_0x4a3710(0x1c4)]!==_0x4a3710(0x28c)?(_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce+_0x4a3710(0x2af),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0xc85fb=''):(_0xc85fb=_0x1a0a7c[_0x4a3710(0x1c4)][_0x4a3710(0x260)]()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0x4a3710(0x2f7)](_0xc85fb)&&_0x3dc697[_0x4a3710(0x1d2)]({'path':_0x3979ce+_0x4a3710(0x2af),'message':_0x4a3710(0x2d2)})));if(_0xc85fb==='TO')_0x283f6a=!![];const _0x1f5252=requireNotificationString(_0x1a0a7c['value'],_0x3979ce+_0x4a3710(0x1b3),'Notification\x20recipient.value\x20is\x20required.',_0x3dc697);_0x1f5252&&validateNotificationPlaceholders(_0x1f5252,_0x3979ce+_0x4a3710(0x1b3),_0x3dc697);}),_0x534dd3[_0x15d695(0x2a2)]>0x0&&!_0x283f6a&&_0x3dc697[_0x15d695(0x1d2)]({'path':_0x1d45f9,'message':_0x15d695(0x291)});}function requireNotificationString(_0x34513b,_0x5a790f,_0x61cfcd,_0x562c8a){const _0x297b9c=a299_0x4a86f2;if(typeof _0x34513b!=='string'||_0x34513b['trim']()==='')return _0x562c8a['push']({'path':_0x5a790f,'message':_0x61cfcd}),undefined;return _0x34513b[_0x297b9c(0x260)]();}function validateNotificationPlaceholders(_0x3cbe4f,_0x2daa8a,_0x188b2e){const _0x1c914b=a299_0x4a86f2;for(const _0x66a986 of _0x3cbe4f['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x5c7a53=_0x66a986[0x1]?.[_0x1c914b(0x260)]()??'',_0x2ddf8c=_0x5c7a53[_0x1c914b(0x29c)]('.'),_0x5b1798=_0x2ddf8c>=0x0?_0x5c7a53[_0x1c914b(0x2ca)](0x0,_0x2ddf8c):_0x5c7a53,_0x5e5033=_0x2ddf8c>=0x0?_0x5c7a53[_0x1c914b(0x2ca)](_0x2ddf8c+0x1)[_0x1c914b(0x260)]():'';(!['event',_0x1c914b(0x2d7),_0x1c914b(0x297)][_0x1c914b(0x1b0)](_0x5b1798)||_0x5e5033==='')&&_0x188b2e['push']({'path':_0x2daa8a,'message':_0x1c914b(0x1e9)+_0x66a986[0x0]+'.'});}_0x3cbe4f[_0x1c914b(0x244)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x188b2e[_0x1c914b(0x1d2)]({'path':_0x2daa8a,'message':_0x1c914b(0x2c2)});}function validateEdge(_0x15724f,_0x36e688,_0x534ea9){const _0x5b61bf=a299_0x4a86f2;_0x15724f[_0x5b61bf(0x2bb)]!==undefined&&typeof _0x15724f[_0x5b61bf(0x2bb)]!==_0x5b61bf(0x28c)&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x1fd),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x15724f[_0x5b61bf(0x2b6)]!==undefined&&typeof _0x15724f[_0x5b61bf(0x2b6)]!=='boolean'&&_0x534ea9['push']({'path':_0x36e688+'.defaultFlow','message':_0x5b61bf(0x20d)}),_0x15724f[_0x5b61bf(0x28e)]!==undefined&&(!Array[_0x5b61bf(0x202)](_0x15724f[_0x5b61bf(0x28e)])?_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x1f3),'message':_0x5b61bf(0x2a7)}):_0x15724f[_0x5b61bf(0x28e)][_0x5b61bf(0x281)]((_0x446fac,_0xa28c34)=>{const _0x314a27=_0x5b61bf;if(!isRecord(_0x446fac)){_0x534ea9['push']({'path':_0x36e688+_0x314a27(0x20c)+_0xa28c34+']','message':_0x314a27(0x2a3)});return;}for(const _0x564cc0 of['x','y']){const _0x490d1d=_0x446fac[_0x564cc0];(typeof _0x490d1d!=='number'||!Number['isFinite'](_0x490d1d))&&_0x534ea9[_0x314a27(0x1d2)]({'path':_0x36e688+_0x314a27(0x20c)+_0xa28c34+'].'+_0x564cc0,'message':_0x314a27(0x2dc)+_0x564cc0+_0x314a27(0x25e)});}})),_0x15724f[_0x5b61bf(0x24b)]!==undefined&&!CONDITION_TYPES['has'](_0x15724f[_0x5b61bf(0x24b)])&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x201),'message':'Unsupported\x20condition\x20type:\x20'+String(_0x15724f[_0x5b61bf(0x24b)])+'.'}),_0x15724f[_0x5b61bf(0x24b)]===_0x5b61bf(0x2a0)&&(typeof _0x15724f['expression']!=='string'||_0x15724f['expression'][_0x5b61bf(0x260)]()==='')&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x27f),'message':_0x5b61bf(0x20f)}),_0x15724f[_0x5b61bf(0x2b6)]===!![]&&_0x15724f[_0x5b61bf(0x24b)]!=='ALWAYS'&&_0x534ea9[_0x5b61bf(0x1d2)]({'path':_0x36e688+_0x5b61bf(0x254),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x15724f[_0x5b61bf(0x2b6)]===!![]&&typeof _0x15724f[_0x5b61bf(0x207)]===_0x5b61bf(0x28c)&&_0x15724f[_0x5b61bf(0x207)][_0x5b61bf(0x260)]()!==''&&_0x534ea9['push']({'path':_0x36e688+_0x5b61bf(0x27f),'message':_0x5b61bf(0x22c)});}function validateGraphShape(_0x1a9326,_0x5d98f0,_0x3fb992,_0x413e1e,_0xf88ffe,_0x41649d,_0x49694f){const _0x2a2a27=a299_0x4a86f2;for(const [_0xdad9b6,_0x451662]of _0x1a9326){const _0x1b9659=_0xf88ffe[_0x2a2a27(0x285)](_0xdad9b6)??[],_0x385f7d=_0x413e1e[_0x2a2a27(0x285)](_0xdad9b6)??[];_0x451662[_0x2a2a27(0x2e9)]!==_0x2a2a27(0x218)&&_0x1b9659[_0x2a2a27(0x2a2)]===0x0&&_0x49694f[_0x2a2a27(0x1d2)]({'path':'flowJson.nodes.'+_0xdad9b6,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x451662[_0x2a2a27(0x2e9)]!=='END'&&_0x385f7d[_0x2a2a27(0x2a2)]===0x0&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x451662[_0x2a2a27(0x2e9)]===_0x2a2a27(0x218)&&_0x1b9659[_0x2a2a27(0x2a2)]>0x0&&_0x49694f['push']({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x1cc)});_0x451662['type']===_0x2a2a27(0x294)&&_0x385f7d['length']>0x0&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x2f8)});if(_0x451662[_0x2a2a27(0x2e9)]==='CONDITION'){_0x385f7d['length']<0x2&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x4f77f9=_0x385f7d[_0x2a2a27(0x235)](_0x55686d=>_0x55686d[_0x2a2a27(0x2b6)]===!![]);_0x4f77f9['length']!==0x1&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x1af)});if(_0x4f77f9[_0x2a2a27(0x2a2)]===0x1){const _0x5a0f95=_0x4f77f9[0x0],_0x4586dc=_0x41649d['get'](_0x5a0f95)??_0x2a2a27(0x2e8);_0x5a0f95[_0x2a2a27(0x24b)]!==_0x2a2a27(0x250)&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x4586dc+'.conditionType','message':_0x2a2a27(0x21d)});_0x5a0f95['expression']!==undefined&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x4586dc+_0x2a2a27(0x27f),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x14ba0b of _0x385f7d){if(_0x14ba0b===_0x5a0f95)continue;const _0x41cf69=_0x41649d[_0x2a2a27(0x285)](_0x14ba0b)??_0x2a2a27(0x2e8);if(_0x14ba0b[_0x2a2a27(0x24b)]!==_0x2a2a27(0x2a0))_0x49694f['push']({'path':_0x41cf69+'.conditionType','message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0x14ba0b[_0x2a2a27(0x207)]!==_0x2a2a27(0x28c)||_0x14ba0b[_0x2a2a27(0x207)]['trim']()==='')&&_0x49694f['push']({'path':_0x41cf69+_0x2a2a27(0x27f),'message':_0x2a2a27(0x259)});}}}if(_0x451662[_0x2a2a27(0x2e9)]===_0x2a2a27(0x274)&&(_0x451662[_0x2a2a27(0x1df)]??_0x2a2a27(0x274))===_0x2a2a27(0x283)){if(_0x385f7d[_0x2a2a27(0x2a2)]!==0x1)_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x2cec82=_0x385f7d[0x0];((_0x2cec82[_0x2a2a27(0x24b)]??'ALWAYS')!=='ALWAYS'||_0x2cec82[_0x2a2a27(0x2b6)]===!![]||typeof _0x2cec82[_0x2a2a27(0x207)]===_0x2a2a27(0x28c)&&_0x2cec82[_0x2a2a27(0x207)][_0x2a2a27(0x260)]()!=='')&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x41649d[_0x2a2a27(0x285)](_0x2cec82)??_0x2a2a27(0x2e8),'message':_0x2a2a27(0x2e5)});}}else{if(_0x451662['type']===_0x2a2a27(0x274)){const _0x136f64=_0x385f7d[_0x2a2a27(0x2bd)](_0x23953c=>_0x23953c[_0x2a2a27(0x24b)]??_0x2a2a27(0x250)),_0x1b20d9=_0x136f64[_0x2a2a27(0x235)](_0x2e8cc2=>_0x2e8cc2!=='APPROVED'&&_0x2e8cc2!==_0x2a2a27(0x1b4));_0x1b20d9['length']>0x0&&_0x49694f['push']({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x136f64[_0x2a2a27(0x235)](_0x5c01ce=>_0x5c01ce===_0x2a2a27(0x238))['length']!==0x1&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':_0x2a2a27(0x298)}),_0x136f64[_0x2a2a27(0x235)](_0x52f385=>_0x52f385===_0x2a2a27(0x1b4))[_0x2a2a27(0x2a2)]!==0x1&&_0x49694f[_0x2a2a27(0x1d2)]({'path':'flowJson.nodes.'+_0xdad9b6,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x385f7d[_0x2a2a27(0x245)](_0x323ecd=>_0x323ecd[_0x2a2a27(0x2b6)]===!![])&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0xdad9b6,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x1453b8=new Set(),_0x42da54=_0x420bc6=>{const _0x4894b3=_0x2a2a27;if(_0x1453b8[_0x4894b3(0x2f7)](_0x420bc6))return;_0x1453b8[_0x4894b3(0x1d5)](_0x420bc6);for(const _0x40d5fb of _0x413e1e['get'](_0x420bc6)??[]){const _0x30c8c4=resolveEdgeEndpoint(_0x40d5fb[_0x4894b3(0x215)],_0x40d5fb[_0x4894b3(0x2b3)]);if(_0x30c8c4&&_0x1a9326['has'](_0x30c8c4))_0x42da54(_0x30c8c4);}};_0x42da54(_0x5d98f0);for(const _0x37795d of _0x1a9326[_0x2a2a27(0x2fe)]()){!_0x1453b8[_0x2a2a27(0x2f7)](_0x37795d)&&_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e6)+_0x37795d,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x1c6871=_0x3fb992[_0x2a2a27(0x245)](_0x333401=>_0x1453b8['has'](_0x333401));if(!_0x1c6871){_0x49694f[_0x2a2a27(0x1d2)]({'path':_0x2a2a27(0x2e8),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x5af535=new Set(),_0x3b5ee2=_0x333362=>{const _0x35cf8a=_0x2a2a27;if(_0x5af535[_0x35cf8a(0x2f7)](_0x333362))return;_0x5af535[_0x35cf8a(0x1d5)](_0x333362);for(const _0x217669 of _0xf88ffe[_0x35cf8a(0x285)](_0x333362)??[]){const _0x456a3c=resolveEdgeEndpoint(_0x217669[_0x35cf8a(0x304)],_0x217669[_0x35cf8a(0x231)]);if(_0x456a3c&&_0x1a9326['has'](_0x456a3c))_0x3b5ee2(_0x456a3c);}};for(const _0x37a433 of _0x3fb992){if(_0x1a9326[_0x2a2a27(0x2f7)](_0x37a433))_0x3b5ee2(_0x37a433);}for(const _0x657038 of _0x1453b8){!_0x5af535[_0x2a2a27(0x2f7)](_0x657038)&&_0x49694f[_0x2a2a27(0x1d2)]({'path':'flowJson.nodes.'+_0x657038,'message':_0x2a2a27(0x27d)});}}function validateApprovalResults(_0x27096f,_0x39a305,_0x57577d,_0x40f0c1){const _0x422071=a299_0x4a86f2;if(_0x39a305===0x0)return;const _0x5047dd=new Set(_0x57577d[_0x422071(0x2bd)](_0x1df767=>_0x27096f['get'](_0x1df767)?.[_0x422071(0x2a9)])[_0x422071(0x235)](_0x50adf9=>typeof _0x50adf9==='string'));for(const _0x3d1551 of[_0x422071(0x238),'REJECTED']){!_0x5047dd['has'](_0x3d1551)&&_0x40f0c1['push']({'path':_0x422071(0x2c4),'message':_0x422071(0x293)+_0x3d1551+'.'});}}function validateScriptResultReferences(_0x3a7359,_0x2b56ab,_0x827033,_0x265c10,_0xb5f703,_0x32c604,_0x132d2b){const _0x53f539=a299_0x4a86f2;if(_0x32c604['size']===0x0)return;const _0x2c4b51=new Set(),_0x261a1d=_0x3fb001=>{const _0x3ece4c=a299_0x3bd6;if(!_0x2c4b51[_0x3ece4c(0x2f7)](_0x3fb001)&&_0x3a7359['has'](_0x3fb001)){_0x2c4b51[_0x3ece4c(0x1d5)](_0x3fb001);for(const _0x102f7c of _0x827033[_0x3ece4c(0x285)](_0x3fb001)??[]){const _0x10946a=resolveEdgeEndpoint(_0x102f7c[_0x3ece4c(0x215)],_0x102f7c['targetNodeId']);if(_0x10946a)_0x261a1d(_0x10946a);}}};_0x261a1d(_0x2b56ab);const _0x373aaf=new Map();for(const _0x1fd4bc of _0x2c4b51){_0x373aaf['set'](_0x1fd4bc,_0x1fd4bc===_0x2b56ab?new Set([_0x2b56ab]):new Set(_0x2c4b51));}let _0x1397e7=!![];while(_0x1397e7){_0x1397e7=![];for(const _0x17a2fe of _0x2c4b51){if(_0x17a2fe===_0x2b56ab)continue;const _0x18ae52=(_0x265c10[_0x53f539(0x285)](_0x17a2fe)??[])[_0x53f539(0x2bd)](_0x26f335=>resolveEdgeEndpoint(_0x26f335[_0x53f539(0x304)],_0x26f335[_0x53f539(0x231)]))[_0x53f539(0x235)](_0x824048=>Boolean(_0x824048&&_0x2c4b51[_0x53f539(0x2f7)](_0x824048)));if(_0x18ae52[_0x53f539(0x2a2)]===0x0)continue;const _0x2d88de=new Set(_0x373aaf[_0x53f539(0x285)](_0x18ae52[0x0])??[]);for(const _0x2c5da8 of _0x18ae52[_0x53f539(0x2ca)](0x1)){const _0x437fad=_0x373aaf[_0x53f539(0x285)](_0x2c5da8)??new Set();for(const _0x36992a of _0x2d88de){if(!_0x437fad['has'](_0x36992a))_0x2d88de[_0x53f539(0x1da)](_0x36992a);}}_0x2d88de['add'](_0x17a2fe);const _0x561f80=_0x373aaf[_0x53f539(0x285)](_0x17a2fe);!setsEqual(_0x561f80,_0x2d88de)&&(_0x373aaf[_0x53f539(0x23d)](_0x17a2fe,_0x2d88de),_0x1397e7=!![]);}}for(const [_0x25d36d,_0x41644c]of _0x827033){const _0x3e73ab=_0x373aaf[_0x53f539(0x285)](_0x25d36d);if(!_0x3e73ab)continue;for(const _0x1e8573 of _0x41644c){if(_0x1e8573['conditionType']!==_0x53f539(0x2a0)||typeof _0x1e8573['expression']!=='string')continue;for(const [_0x244046,_0x5924c2]of _0x32c604){expressionReferencesVariable(_0x1e8573['expression'],_0x244046)&&!_0x3e73ab[_0x53f539(0x2f7)](_0x5924c2)&&_0x132d2b[_0x53f539(0x1d2)]({'path':(_0xb5f703[_0x53f539(0x285)](_0x1e8573)??'flowJson.edges')+_0x53f539(0x27f),'message':_0x53f539(0x1aa)+_0x244046+_0x53f539(0x276)+_0x5924c2+_0x53f539(0x1d0)+_0x25d36d+'.'});}}}}function expressionReferencesVariable(_0xda7a2,_0x23238f){const _0x1a0718=a299_0x4a86f2;let _0x17aaad=0x0;while(_0x17aaad<_0xda7a2[_0x1a0718(0x2a2)]){const _0x4b93ed=_0xda7a2[_0x17aaad];if(_0x4b93ed==='\x27'||_0x4b93ed==='\x22'){_0x17aaad=skipQuotedExpressionSegment(_0xda7a2,_0x17aaad,_0x4b93ed);continue;}if(!/[A-Za-z_]/[_0x1a0718(0x225)](_0x4b93ed)){_0x17aaad+=0x1;continue;}const _0x39f249=_0x17aaad;_0x17aaad+=0x1;while(_0x17aaad<_0xda7a2[_0x1a0718(0x2a2)]&&/[A-Za-z0-9_]/[_0x1a0718(0x225)](_0xda7a2[_0x17aaad])){_0x17aaad+=0x1;}if(_0xda7a2['slice'](_0x39f249,_0x17aaad)!==_0x23238f)continue;let _0x444e28=_0x39f249-0x1;while(_0x444e28>=0x0&&/\s/[_0x1a0718(0x225)](_0xda7a2[_0x444e28])){_0x444e28-=0x1;}if(_0xda7a2[_0x444e28]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x112a18,_0x9a46fc,_0x26a1b5){const _0x6db55b=a299_0x4a86f2;let _0x955910=_0x9a46fc+0x1;while(_0x955910<_0x112a18[_0x6db55b(0x2a2)]){if(_0x112a18[_0x955910]==='\x5c'){_0x955910+=0x2;continue;}if(_0x112a18[_0x955910]===_0x26a1b5)return _0x955910+0x1;_0x955910+=0x1;}return _0x955910;}function resolveEffectiveResultVariable(_0x2ef7d7,_0x1a23f6){const _0x5cadbc=a299_0x4a86f2;if(_0x2ef7d7===undefined||_0x2ef7d7===null||_0x1a23f6&&_0x2ef7d7==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x2ef7d7!=='string'||!VARIABLE_PATTERN[_0x5cadbc(0x225)](_0x2ef7d7)||RESERVED_RESULT_VARIABLES[_0x5cadbc(0x2f7)](_0x2ef7d7)||_0x2ef7d7['startsWith'](_0x5cadbc(0x26d)))return undefined;return _0x2ef7d7;}function registerResultVariableOwner(_0x211b5c,_0x1eee05,_0x5a8808,_0x52ce63){const _0xc9060=a299_0x4a86f2;if(_0x211b5c['has'](_0x1eee05)){_0x52ce63[_0xc9060(0x1d2)]({'path':'flowJson.nodes','message':_0xc9060(0x240)+_0x1eee05+'.'});return;}_0x211b5c[_0xc9060(0x23d)](_0x1eee05,_0x5a8808);}function setsEqual(_0x22a96f,_0x57acec){const _0x4e384f=a299_0x4a86f2;return _0x22a96f[_0x4e384f(0x280)]===_0x57acec[_0x4e384f(0x280)]&&[..._0x22a96f][_0x4e384f(0x230)](_0x226182=>_0x57acec[_0x4e384f(0x2f7)](_0x226182));}function isValidUserId(_0x30231c){const _0x541ce7=a299_0x4a86f2;if(typeof _0x30231c===_0x541ce7(0x28c))return _0x30231c[_0x541ce7(0x260)]()['length']>0x0;return Number[_0x541ce7(0x2ff)](_0x30231c)&&Number(_0x30231c)>0x0;}function resolveEdgeEndpoint(_0x2bde54,_0x3c64bf){const _0x2a0bd6=a299_0x4a86f2;if(typeof _0x2bde54==='string'&&_0x2bde54[_0x2a0bd6(0x260)]())return _0x2bde54[_0x2a0bd6(0x260)]();if(typeof _0x3c64bf==='string'&&_0x3c64bf['trim']())return _0x3c64bf[_0x2a0bd6(0x260)]();return undefined;}function removeEmptyMetadata(_0x5a3749,_0x266d8e,_0x380b0a,_0x3409d2){const _0x23ceac=a299_0x4a86f2;if(Array[_0x23ceac(0x202)](_0x5a3749)){_0x5a3749['forEach']((_0x535523,_0x3a6640)=>removeEmptyMetadata(_0x535523,_0x266d8e+'['+_0x3a6640+']',_0x380b0a,_0x3409d2));return;}if(!isRecord(_0x5a3749))return;for(const [_0x440e96,_0x446d86]of Object[_0x23ceac(0x1c5)](_0x5a3749)){const _0x318fe9=_0x266d8e+'.'+_0x440e96;if(_0x440e96===_0x23ceac(0x28d)&&isEmptyJsonValue(_0x446d86)){delete _0x5a3749[_0x440e96],_0x3409d2[_0x23ceac(0x1d2)](_0x318fe9),_0x380b0a['push']({'code':_0x23ceac(0x273),'path':_0x318fe9,'message':_0x318fe9+_0x23ceac(0x1e3)});continue;}removeEmptyMetadata(_0x446d86,_0x318fe9,_0x380b0a,_0x3409d2);}}function isEmptyJsonValue(_0x2a5566){const _0x108a2f=a299_0x4a86f2;if(_0x2a5566===null||_0x2a5566===undefined)return!![];if(typeof _0x2a5566===_0x108a2f(0x28c))return _0x2a5566[_0x108a2f(0x260)]()==='';if(Array[_0x108a2f(0x202)](_0x2a5566))return _0x2a5566['length']===0x0;return isRecord(_0x2a5566)&&Object[_0x108a2f(0x2fe)](_0x2a5566)[_0x108a2f(0x2a2)]===0x0;}function isRecord(_0x25c842){const _0x45988e=a299_0x4a86f2;return typeof _0x25c842===_0x45988e(0x1ce)&&_0x25c842!==null&&!Array[_0x45988e(0x202)](_0x25c842);}function cloneJsonValue(_0xd4ad5e){const _0x2584c4=a299_0x4a86f2;return JSON[_0x2584c4(0x2d8)](JSON[_0x2584c4(0x287)](_0xd4ad5e));}export async function readFlowConfigFile(_0x42e99e){const _0x5b803a=a299_0x4a86f2,_0x118657=await readFile(resolve(_0x42e99e),_0x5b803a(0x2a4));return JSON[_0x5b803a(0x2d8)](_0x118657);}
@@ -1 +1 @@
1
- const a300_0x2efa8b=a300_0x1380;(function(_0x34a899,_0x2c1357){const _0x40acd2=a300_0x1380,_0x68612f=_0x34a899();while(!![]){try{const _0x3c3ac4=parseInt(_0x40acd2(0xa4))/0x1+-parseInt(_0x40acd2(0xa8))/0x2*(parseInt(_0x40acd2(0x78))/0x3)+-parseInt(_0x40acd2(0xa1))/0x4+parseInt(_0x40acd2(0x7a))/0x5+-parseInt(_0x40acd2(0x7f))/0x6*(-parseInt(_0x40acd2(0x8b))/0x7)+parseInt(_0x40acd2(0x95))/0x8*(parseInt(_0x40acd2(0x90))/0x9)+-parseInt(_0x40acd2(0x8d))/0xa*(-parseInt(_0x40acd2(0x7e))/0xb);if(_0x3c3ac4===_0x2c1357)break;else _0x68612f['push'](_0x68612f['shift']());}catch(_0x2975b1){_0x68612f['push'](_0x68612f['shift']());}}}(a300_0x49d2,0x69725));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a300_0x2efa8b(0x8f);export const INSTANT_API_POLICY_FILE_NAME=a300_0x2efa8b(0x87);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x3d2b40,_0x54343a,_0x5f3855){return new CliError(_0x3d2b40,0x1,_0x54343a,_0x5f3855);}export function loadInstantApiPolicyLocalConfig(_0x4fd59,_0x3f49b3){assertSafeAppCode(_0x4fd59);const _0x34fc20=resolve(_0x3f49b3??findProjectRootDirectory()),_0x3a57e3=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x4fd59+'/'+INSTANT_API_POLICY_FILE_NAME,_0x4bd3c6=resolve(_0x34fc20,INSTANT_API_POLICY_RELATIVE_ROOT,_0x4fd59),_0x2163c2=resolve(_0x4bd3c6,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x34fc20,'appCode':_0x4fd59,'policyRoot':_0x4bd3c6,'policyFilePath':_0x2163c2,'policyRelativePath':_0x3a57e3};}export function createDefaultInstantApiPolicyConfig(_0x210f27,_0x8a0122=a300_0x2efa8b(0x8a)){return assertSafeAppCode(_0x210f27),{'version':'2','appCode':_0x210f27,'defaults':{'instantApi':_0x8a0122},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x408652){const _0x408d7f=a300_0x2efa8b;let _0x4abadf;try{_0x4abadf=await stat(_0x408652['policyFilePath']);}catch(_0x79279){throw instantApiPolicyError(_0x408d7f(0x73),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x408652[_0x408d7f(0x6d)],_0x408d7f(0x97));}if(!_0x4abadf[_0x408d7f(0x6c)]())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x408d7f(0x75)+_0x408652[_0x408d7f(0x6d)]);if(_0x4abadf[_0x408d7f(0x91)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x408d7f(0xa5),_0x408d7f(0x7c));let _0x2acfc0;try{_0x2acfc0=await readFile(_0x408652[_0x408d7f(0x6d)]);}catch{throw instantApiPolicyError(_0x408d7f(0x72),_0x408d7f(0x9b)+_0x408652[_0x408d7f(0x6d)]);}if(_0x2acfc0[_0x408d7f(0x71)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x408d7f(0xa5),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x3522e2;try{_0x3522e2=new TextDecoder(_0x408d7f(0x98),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x2acfc0);}catch{throw instantApiPolicyError(_0x408d7f(0x68),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x408652[_0x408d7f(0x6d)]);}let _0x52e88a;try{_0x52e88a=JSON['parse'](_0x3522e2);}catch{throw instantApiPolicyError(_0x408d7f(0x84),_0x408d7f(0x82)+_0x408652[_0x408d7f(0x6d)]);}return assertLocalPolicyContract(_0x52e88a,_0x408652[_0x408d7f(0x93)]);}export async function writeInstantApiPolicyConfigFile(_0x1d9977,_0x17ecc8,_0x436b6={}){const _0x56c13d=a300_0x2efa8b,_0x2c7268=assertLocalPolicyContract(_0x17ecc8,_0x1d9977['appCode']),_0x281aff=JSON[_0x56c13d(0x99)](_0x2c7268,null,0x2)+'\x0a';if(Buffer[_0x56c13d(0x71)](_0x281aff,_0x56c13d(0x9d))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x56c13d(0x7c));await mkdir(_0x1d9977[_0x56c13d(0xa3)],{'recursive':!![]});let _0x26edfc;try{_0x26edfc=await readFile(_0x1d9977[_0x56c13d(0x6d)],_0x56c13d(0x9d));}catch(_0x4e74c9){if(!isMissingFile(_0x4e74c9))throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x56c13d(0x83)+_0x1d9977[_0x56c13d(0x6d)]);}if(_0x26edfc===_0x281aff)return{'action':_0x56c13d(0x80),'filePath':_0x1d9977[_0x56c13d(0x6d)]};if(_0x26edfc!==undefined&&!_0x436b6[_0x56c13d(0xa7)])throw instantApiPolicyError(_0x56c13d(0x8e),_0x56c13d(0x6e)+_0x1d9977[_0x56c13d(0x6d)],_0x56c13d(0x85));if(_0x26edfc===undefined)try{return await writeFile(_0x1d9977['policyFilePath'],_0x281aff,{'encoding':_0x56c13d(0x9d),'flag':'wx'}),{'action':_0x56c13d(0x70),'filePath':_0x1d9977[_0x56c13d(0x6d)]};}catch(_0x93584e){if(!isAlreadyExists(_0x93584e))throw instantApiPolicyError(_0x56c13d(0x89),_0x56c13d(0x77)+_0x1d9977[_0x56c13d(0x6d)]);if(!_0x436b6['force'])throw instantApiPolicyError(_0x56c13d(0x8e),_0x56c13d(0xa6)+_0x1d9977['policyFilePath'],'Review\x20the\x20file\x20before\x20retrying.');}const _0x65473c=resolve(dirname(_0x1d9977[_0x56c13d(0x6d)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x56c13d(0x81)]+'.'+randomUUID()+_0x56c13d(0x9a));try{await writeFile(_0x65473c,_0x281aff,{'encoding':_0x56c13d(0x9d),'flag':'wx'}),await rename(_0x65473c,_0x1d9977[_0x56c13d(0x6d)]);}catch{await unlink(_0x65473c)['catch'](()=>undefined);throw instantApiPolicyError(_0x56c13d(0x89),_0x56c13d(0x6a)+_0x1d9977[_0x56c13d(0x6d)]);}return{'action':_0x56c13d(0x74),'filePath':_0x1d9977[_0x56c13d(0x6d)]};}function a300_0x49d2(){const _0x47b720=['Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_json_invalid','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','rules','policy.json','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_file_unwritable','allow','12271mphbfM','instant_api_policy_rules_invalid','4490lPegxQ','instant_api_policy_file_exists','.rabetbase/instant-api-policy','3406041AMhgTf','size','ENOENT','appCode','Policy\x20defaults.instantApi\x20is\x20required.','8IQLbxa','code','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','utf-8','stringify','.tmp','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','version','utf8','object','includes','string','771504HFtWSo','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','policyRoot','7731CDKkhX','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','force','859682axsvxc','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_file_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','trim','isFile','policyFilePath','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','created','byteLength','instant_api_policy_file_unreadable','instant_api_policy_file_missing','overwritten','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','length','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','6CAhaDm','instant_api_policy_app_code_invalid','2012260mxrGVy','defaults','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','instant_api_policy_version_invalid','15587CJMqAM','204Vsyozz','unchanged','pid'];a300_0x49d2=function(){return _0x47b720;};return a300_0x49d2();}function assertSafeAppCode(_0xc938a0){const _0x55405e=a300_0x2efa8b,_0x4c5897=_0xc938a0[_0x55405e(0x6b)]();if(!_0x4c5897||_0x4c5897!==_0xc938a0||_0x4c5897[_0x55405e(0x76)]>0x64||_0x4c5897==='.'||_0x4c5897==='..'||_0x4c5897['includes']('/')||_0x4c5897['includes']('\x5c')||_0x4c5897[_0x55405e(0x9f)]('\x00'))throw instantApiPolicyError(_0x55405e(0x79),_0x55405e(0x69));}function assertLocalPolicyContract(_0x1849a0,_0x434b41){const _0x43861d=a300_0x2efa8b;if(!isObject(_0x1849a0))throw instantApiPolicyError(_0x43861d(0x84),_0x43861d(0x6f));if(_0x1849a0[_0x43861d(0x9c)]!=='1'&&_0x1849a0[_0x43861d(0x9c)]!=='2')throw instantApiPolicyError(_0x43861d(0x7d),_0x43861d(0x88),_0x43861d(0xa9));if(_0x1849a0[_0x43861d(0x93)]!==_0x434b41)throw instantApiPolicyError('instant_api_policy_app_code_mismatch',_0x43861d(0xa2)+_0x434b41+'.');if(!isObject(_0x1849a0['defaults'])||typeof _0x1849a0[_0x43861d(0x7b)]['instantApi']!==_0x43861d(0xa0))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x43861d(0x94));if(_0x1849a0[_0x43861d(0x86)]!==undefined&&_0x1849a0[_0x43861d(0x86)]!==null&&!Array['isArray'](_0x1849a0[_0x43861d(0x86)]))throw instantApiPolicyError(_0x43861d(0x8c),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x1849a0;}function isObject(_0x2d8d99){const _0x1902f0=a300_0x2efa8b;return _0x2d8d99!==null&&typeof _0x2d8d99===_0x1902f0(0x9e)&&!Array['isArray'](_0x2d8d99);}function a300_0x1380(_0xa4a40e,_0x2db33b){_0xa4a40e=_0xa4a40e-0x68;const _0x49d2af=a300_0x49d2();let _0x1380f5=_0x49d2af[_0xa4a40e];return _0x1380f5;}function isMissingFile(_0x4d24c7){const _0x218b78=a300_0x2efa8b;return Boolean(_0x4d24c7&&typeof _0x4d24c7===_0x218b78(0x9e)&&_0x4d24c7['code']===_0x218b78(0x92));}function isAlreadyExists(_0x103589){const _0x221b03=a300_0x2efa8b;return Boolean(_0x103589&&typeof _0x103589==='object'&&_0x103589[_0x221b03(0x96)]==='EEXIST');}
1
+ const a300_0x1a2d71=a300_0x1d56;(function(_0x2f1af2,_0x260797){const _0x42176e=a300_0x1d56,_0x3ef821=_0x2f1af2();while(!![]){try{const _0x38e66c=-parseInt(_0x42176e(0x7d))/0x1*(parseInt(_0x42176e(0x9a))/0x2)+-parseInt(_0x42176e(0x93))/0x3*(parseInt(_0x42176e(0x92))/0x4)+-parseInt(_0x42176e(0x8e))/0x5+parseInt(_0x42176e(0x91))/0x6+-parseInt(_0x42176e(0x82))/0x7+-parseInt(_0x42176e(0x9d))/0x8*(-parseInt(_0x42176e(0x84))/0x9)+parseInt(_0x42176e(0x81))/0xa;if(_0x38e66c===_0x260797)break;else _0x3ef821['push'](_0x3ef821['shift']());}catch(_0x3cc2fd){_0x3ef821['push'](_0x3ef821['shift']());}}}(a300_0x375e,0x4acf6));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a300_0x1a2d71(0x87);export const INSTANT_API_POLICY_FILE_NAME=a300_0x1a2d71(0xad);function a300_0x375e(){const _0x279963=['includes','instant_api_policy_file_unwritable','808JIzoSZ','allow','Policy\x20defaults.instantApi\x20is\x20required.','size','Review\x20the\x20file\x20before\x20retrying.','code','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','unchanged','length','instant_api_policy_rules_invalid','force','instant_api_policy_file_unreadable','instantApi','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','version','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','policy.json','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_app_code_invalid','instant_api_policy_file_too_large','object','EEXIST','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','isArray','25bGPLZE','instant_api_policy_file_missing','parse','decode','8279970RpZuvA','1966615YoQxjI','stringify','39987syuIBS','policyFilePath','byteLength','.rabetbase/instant-api-policy','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','rules','utf8','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','instant_api_policy_app_code_mismatch','instant_api_policy_file_invalid','667910nHbzLg','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','created','2241666UCMDLF','1908508kkHKNX','3oqqoNK','defaults','appCode','instant_api_policy_json_invalid','ENOENT','trim','instant_api_policy_file_exists','36182FDCTRX'];a300_0x375e=function(){return _0x279963;};return a300_0x375e();}export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;function a300_0x1d56(_0x5d6b35,_0x4b63c4){_0x5d6b35=_0x5d6b35-0x75;const _0x375ef0=a300_0x375e();let _0x1d5665=_0x375ef0[_0x5d6b35];return _0x1d5665;}export function instantApiPolicyError(_0x5efca7,_0x3108f0,_0xed6b32){return new CliError(_0x5efca7,0x1,_0x3108f0,_0xed6b32);}export function loadInstantApiPolicyLocalConfig(_0xa97e9b,_0x3b965f){assertSafeAppCode(_0xa97e9b);const _0x5ab8f3=resolve(_0x3b965f??findProjectRootDirectory()),_0x3af175=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0xa97e9b+'/'+INSTANT_API_POLICY_FILE_NAME,_0x3ddb6e=resolve(_0x5ab8f3,INSTANT_API_POLICY_RELATIVE_ROOT,_0xa97e9b),_0x5ab3e9=resolve(_0x3ddb6e,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x5ab8f3,'appCode':_0xa97e9b,'policyRoot':_0x3ddb6e,'policyFilePath':_0x5ab3e9,'policyRelativePath':_0x3af175};}export function createDefaultInstantApiPolicyConfig(_0x47044a,_0x46040e=a300_0x1a2d71(0x9e)){return assertSafeAppCode(_0x47044a),{'version':'2','appCode':_0x47044a,'defaults':{'instantApi':_0x46040e},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x1865f1){const _0x324f36=a300_0x1a2d71;let _0xd04025;try{_0xd04025=await stat(_0x1865f1[_0x324f36(0x85)]);}catch(_0x278556){throw instantApiPolicyError(_0x324f36(0x7e),_0x324f36(0x7a)+_0x1865f1[_0x324f36(0x85)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0xd04025['isFile']())throw instantApiPolicyError(_0x324f36(0x8d),_0x324f36(0x8f)+_0x1865f1[_0x324f36(0x85)]);if(_0xd04025[_0x324f36(0xa0)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x324f36(0x77),_0x324f36(0xa3));let _0x5da4cc;try{_0x5da4cc=await readFile(_0x1865f1[_0x324f36(0x85)]);}catch{throw instantApiPolicyError(_0x324f36(0xa8),_0x324f36(0x88)+_0x1865f1[_0x324f36(0x85)]);}if(_0x5da4cc[_0x324f36(0x86)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x324f36(0xa3));let _0x77c0dd;try{_0x77c0dd=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x324f36(0x80)](_0x5da4cc);}catch{throw instantApiPolicyError(_0x324f36(0x8d),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x1865f1[_0x324f36(0x85)]);}let _0x1c44e2;try{_0x1c44e2=JSON[_0x324f36(0x7f)](_0x77c0dd);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x1865f1[_0x324f36(0x85)]);}return assertLocalPolicyContract(_0x1c44e2,_0x1865f1['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x3a3ab1,_0x5ea2b5,_0x529d9c={}){const _0x37517c=a300_0x1a2d71,_0x36594a=assertLocalPolicyContract(_0x5ea2b5,_0x3a3ab1[_0x37517c(0x95)]),_0x5dd19d=JSON[_0x37517c(0x83)](_0x36594a,null,0x2)+'\x0a';if(Buffer[_0x37517c(0x86)](_0x5dd19d,'utf8')>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x37517c(0x77),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x3a3ab1['policyRoot'],{'recursive':!![]});let _0x239d3e;try{_0x239d3e=await readFile(_0x3a3ab1['policyFilePath'],_0x37517c(0x8a));}catch(_0x2f93a0){if(!isMissingFile(_0x2f93a0))throw instantApiPolicyError(_0x37517c(0xa8),'Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20'+_0x3a3ab1[_0x37517c(0x85)]);}if(_0x239d3e===_0x5dd19d)return{'action':_0x37517c(0xa4),'filePath':_0x3a3ab1['policyFilePath']};if(_0x239d3e!==undefined&&!_0x529d9c[_0x37517c(0xa7)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x37517c(0xac)+_0x3a3ab1[_0x37517c(0x85)],_0x37517c(0xaa));if(_0x239d3e===undefined)try{return await writeFile(_0x3a3ab1[_0x37517c(0x85)],_0x5dd19d,{'encoding':_0x37517c(0x8a),'flag':'wx'}),{'action':_0x37517c(0x90),'filePath':_0x3a3ab1[_0x37517c(0x85)]};}catch(_0x49126c){if(!isAlreadyExists(_0x49126c))throw instantApiPolicyError(_0x37517c(0x9c),_0x37517c(0x75)+_0x3a3ab1[_0x37517c(0x85)]);if(!_0x529d9c[_0x37517c(0xa7)])throw instantApiPolicyError(_0x37517c(0x99),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x3a3ab1[_0x37517c(0x85)],_0x37517c(0xa1));}const _0x25d2d9=resolve(dirname(_0x3a3ab1[_0x37517c(0x85)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+'.tmp');try{await writeFile(_0x25d2d9,_0x5dd19d,{'encoding':'utf8','flag':'wx'}),await rename(_0x25d2d9,_0x3a3ab1[_0x37517c(0x85)]);}catch{await unlink(_0x25d2d9)['catch'](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x3a3ab1['policyFilePath']);}return{'action':'overwritten','filePath':_0x3a3ab1[_0x37517c(0x85)]};}function assertSafeAppCode(_0x4cecce){const _0x58e0=a300_0x1a2d71,_0x41f6f6=_0x4cecce[_0x58e0(0x98)]();if(!_0x41f6f6||_0x41f6f6!==_0x4cecce||_0x41f6f6[_0x58e0(0xa5)]>0x64||_0x41f6f6==='.'||_0x41f6f6==='..'||_0x41f6f6[_0x58e0(0x9b)]('/')||_0x41f6f6['includes']('\x5c')||_0x41f6f6['includes']('\x00'))throw instantApiPolicyError(_0x58e0(0x76),'appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x35d4ce,_0x420cb8){const _0x45b868=a300_0x1a2d71;if(!isObject(_0x35d4ce))throw instantApiPolicyError(_0x45b868(0x96),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x35d4ce[_0x45b868(0xab)]!=='1'&&_0x35d4ce[_0x45b868(0xab)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0x45b868(0x7b),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x35d4ce[_0x45b868(0x95)]!==_0x420cb8)throw instantApiPolicyError(_0x45b868(0x8c),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x420cb8+'.');if(!isObject(_0x35d4ce[_0x45b868(0x94)])||typeof _0x35d4ce['defaults'][_0x45b868(0xa9)]!=='string')throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x45b868(0x9f));if(_0x35d4ce[_0x45b868(0x89)]!==undefined&&_0x35d4ce[_0x45b868(0x89)]!==null&&!Array[_0x45b868(0x7c)](_0x35d4ce['rules']))throw instantApiPolicyError(_0x45b868(0xa6),_0x45b868(0x8b));return _0x35d4ce;}function isObject(_0x4f0eb7){const _0x5548b5=a300_0x1a2d71;return _0x4f0eb7!==null&&typeof _0x4f0eb7===_0x5548b5(0x78)&&!Array[_0x5548b5(0x7c)](_0x4f0eb7);}function isMissingFile(_0x385059){const _0x3a94dd=a300_0x1a2d71;return Boolean(_0x385059&&typeof _0x385059===_0x3a94dd(0x78)&&_0x385059[_0x3a94dd(0xa2)]===_0x3a94dd(0x97));}function isAlreadyExists(_0x1bedd3){const _0x4f3873=a300_0x1a2d71;return Boolean(_0x1bedd3&&typeof _0x1bedd3===_0x4f3873(0x78)&&_0x1bedd3[_0x4f3873(0xa2)]===_0x4f3873(0x79));}
@@ -1 +1 @@
1
- const a301_0x287f8c=a301_0x5b73;(function(_0x58c9c0,_0xf1da49){const _0x38153e=a301_0x5b73,_0x12a567=_0x58c9c0();while(!![]){try{const _0x28c003=-parseInt(_0x38153e(0x117))/0x1+-parseInt(_0x38153e(0x119))/0x2*(parseInt(_0x38153e(0x11e))/0x3)+-parseInt(_0x38153e(0x11b))/0x4*(-parseInt(_0x38153e(0x11c))/0x5)+-parseInt(_0x38153e(0x11a))/0x6+-parseInt(_0x38153e(0x113))/0x7+parseInt(_0x38153e(0x118))/0x8*(parseInt(_0x38153e(0x116))/0x9)+parseInt(_0x38153e(0x11f))/0xa;if(_0x28c003===_0xf1da49)break;else _0x12a567['push'](_0x12a567['shift']());}catch(_0x17134b){_0x12a567['push'](_0x12a567['shift']());}}}(a301_0x29e9,0x5357c));function a301_0x5b73(_0x3518e4,_0x63c0e){_0x3518e4=_0x3518e4-0x113;const _0x29e9a2=a301_0x29e9();let _0x5b73b6=_0x29e9a2[_0x3518e4];return _0x5b73b6;}const base='/smartapi/instant-api-policy';function a301_0x29e9(){const _0x2b64a6=['freeze','/revisions','1314SzTwkX','540105fDMlfe','13544wiHPvV','1018154VImsam','1268772sPIfIF','48qSqBQE','275815CFvPMN','/revision','3RXebKb','7595050xVCmyI','466361GGbSQZ'];a301_0x29e9=function(){return _0x2b64a6;};return a301_0x29e9();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x287f8c(0x114)]({'current':base+'/current','validate':base+'/validate','publish':base+'/publish','revisions':base+a301_0x287f8c(0x115),'revision':base+a301_0x287f8c(0x11d),'rollback':base+'/rollback'});
1
+ function a301_0x258a(_0x5c519e,_0x4aaf84){_0x5c519e=_0x5c519e-0xdd;const _0xede9a1=a301_0xede9();let _0x258a88=_0xede9a1[_0x5c519e];return _0x258a88;}const a301_0x8101cf=a301_0x258a;(function(_0x219e03,_0x1ea113){const _0x50601d=a301_0x258a,_0x1c25b8=_0x219e03();while(!![]){try{const _0x449af7=parseInt(_0x50601d(0xe7))/0x1+parseInt(_0x50601d(0xe5))/0x2+parseInt(_0x50601d(0xe8))/0x3*(-parseInt(_0x50601d(0xeb))/0x4)+-parseInt(_0x50601d(0xe6))/0x5*(parseInt(_0x50601d(0xe1))/0x6)+-parseInt(_0x50601d(0xde))/0x7+parseInt(_0x50601d(0xe4))/0x8*(-parseInt(_0x50601d(0xe3))/0x9)+-parseInt(_0x50601d(0xe0))/0xa*(-parseInt(_0x50601d(0xe2))/0xb);if(_0x449af7===_0x1ea113)break;else _0x1c25b8['push'](_0x1c25b8['shift']());}catch(_0x6e1f3a){_0x1c25b8['push'](_0x1c25b8['shift']());}}}(a301_0xede9,0x35faf));function a301_0xede9(){const _0x37e542=['103176NOnJSi','96fyjFMX','86830NPYWMd','1186435fWLCiH','69439ZfPrLt','1201110QbMMhJ','/revision','/rollback','4PVwyRp','/smartapi/instant-api-policy','2259586XNmqwE','/revisions','20480sfqUVO','6CQOlhX','6479KUPibQ'];a301_0xede9=function(){return _0x37e542;};return a301_0xede9();}const base=a301_0x8101cf(0xdd);export const INSTANT_API_POLICY_PATHS=Object['freeze']({'current':base+'/current','validate':base+'/validate','publish':base+'/publish','revisions':base+a301_0x8101cf(0xdf),'revision':base+a301_0x8101cf(0xe9),'rollback':base+a301_0x8101cf(0xea)});
@@ -1 +1 @@
1
- function a302_0x5f39(){const _0x3f534c=['getStore','signal','aborted','network','940qisZjn','auth','11838uDRnrp','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','5918aqQrLF','15lRSWZn','182pdSKvZ','Knowledge\x20management\x20request\x20cancelled.','transportFailure','242096qsHQZy','211216qaxjli','validation','API\x20error\x20code:\x20','2723508TMgPCY','pageTooLarge','code','httpStatus','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','run','560BTrWHG','cancelled','trim','remoteErrorCode','18rVrQyU','authRequired','defineProperty','17028qOoRxW','cli:rabetbase','message','1101aUvuYB','kind','writeUncertain'];a302_0x5f39=function(){return _0x3f534c;};return a302_0x5f39();}const a302_0x15997e=a302_0x14c0;(function(_0x244849,_0x4dc841){const _0x275247=a302_0x14c0,_0x530cf6=_0x244849();while(!![]){try{const _0x54f345=-parseInt(_0x275247(0x144))/0x1+-parseInt(_0x275247(0x14e))/0x2*(-parseInt(_0x275247(0x147))/0x3)+-parseInt(_0x275247(0x158))/0x4*(parseInt(_0x275247(0x153))/0x5)+parseInt(_0x275247(0x150))/0x6*(-parseInt(_0x275247(0x154))/0x7)+-parseInt(_0x275247(0x157))/0x8*(parseInt(_0x275247(0x165))/0x9)+-parseInt(_0x275247(0x161))/0xa*(-parseInt(_0x275247(0x152))/0xb)+parseInt(_0x275247(0x15b))/0xc;if(_0x54f345===_0x4dc841)break;else _0x530cf6['push'](_0x530cf6['shift']());}catch(_0x11fd9c){_0x530cf6['push'](_0x530cf6['shift']());}}}(a302_0x5f39,0x22beb));import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';function a302_0x14c0(_0x3973e9,_0x5f508a){_0x3973e9=_0x3973e9-0x144;const _0x5f3972=a302_0x5f39();let _0x14c01a=_0x5f3972[_0x3973e9];return _0x14c01a;}import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a302_0x15997e(0x15f),session=new AsyncLocalStorage();export class KbManagementError extends CliError{['transportFailure'];[a302_0x15997e(0x164)];[a302_0x15997e(0x15e)];['pageTooLarge'];constructor(_0x44fa0b,_0x4c37b8=![],_0x2e1bd7,_0x5be0ba,_0x30ea5d=![]){const _0x5cb462=a302_0x15997e;super('api_error',0x1,_0x44fa0b,_0x2e1bd7?_0x5cb462(0x15a)+_0x2e1bd7:undefined),this[_0x5cb462(0x156)]=_0x4c37b8,this[_0x5cb462(0x164)]=_0x2e1bd7,this[_0x5cb462(0x15e)]=_0x5be0ba,this[_0x5cb462(0x15c)]=_0x30ea5d;if(_0x2e1bd7)Object[_0x5cb462(0x167)](this,'data',{'value':{'remoteErrorCode':_0x2e1bd7},'enumerable':![]});}}function resolveOrigin(){const _0x159cb5=a302_0x15997e,_0x302118=getKbServiceDomain();if(!_0x302118)throw CliErrors[_0x159cb5(0x159)](_0x159cb5(0x151));try{return normalizeKbServiceOrigin(_0x302118);}catch{throw CliErrors[_0x159cb5(0x159)]('Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export function withKbManagementSession(_0x2c2070,_0x7118a8){const _0xfc5705=a302_0x15997e;return session[_0xfc5705(0x160)]({'origin':resolveOrigin(),'signal':_0x2c2070},_0x7118a8);}export async function withKbManagementClient(_0x3d3958,_0x2442bf,_0x30a0b4={}){const _0x4cfcd3=a302_0x15997e,_0x1d1bff=session[_0x4cfcd3(0x14a)]()?.['origin']??resolveOrigin();if(!_0x3d3958[_0x4cfcd3(0x163)]())throw CliErrors[_0x4cfcd3(0x166)]();const _0x324000=_0x30a0b4[_0x4cfcd3(0x14b)]??session['getStore']()?.[_0x4cfcd3(0x14b)];if(_0x324000?.[_0x4cfcd3(0x14c)])throw CliErrors[_0x4cfcd3(0x162)](_0x4cfcd3(0x155));try{const _0x42f287=createKnowledgeClient({'kbServiceDomain':_0x1d1bff,'authMode':'cookie','cookie':_0x3d3958,'invokeSource':_0x4cfcd3(0x145)});return await _0x2442bf(_0x42f287,{'signal':_0x324000});}catch(_0xd0c9a8){if(!(_0xd0c9a8 instanceof KnowledgeServiceError))throw _0xd0c9a8;if(_0xd0c9a8[_0x4cfcd3(0x148)]===_0x4cfcd3(0x14f))throw CliErrors['authRequired']();if(_0xd0c9a8[_0x4cfcd3(0x148)]===_0x4cfcd3(0x159))throw CliErrors[_0x4cfcd3(0x159)](_0xd0c9a8[_0x4cfcd3(0x146)]);const _0xbe1c5e=_0xd0c9a8[_0x4cfcd3(0x148)]===_0x4cfcd3(0x14d)||_0xd0c9a8[_0x4cfcd3(0x148)]==='timeout'||_0xd0c9a8[_0x4cfcd3(0x148)]==='cancelled';throw new KbManagementError(_0xd0c9a8[_0x4cfcd3(0x146)]+(_0xd0c9a8[_0x4cfcd3(0x149)]?WRITE_RECONCILIATION:''),_0xbe1c5e,/^\d+$/['test'](_0xd0c9a8[_0x4cfcd3(0x15d)]??'')?_0xd0c9a8['code']:undefined,_0xd0c9a8['status'],_0xd0c9a8[_0x4cfcd3(0x15c)]);}}
1
+ const a302_0x3f2611=a302_0x5795;function a302_0x5795(_0x542eb4,_0x2983f4){_0x542eb4=_0x542eb4-0x1f3;const _0x36b0fb=a302_0x36b0();let _0x5795c3=_0x36b0fb[_0x542eb4];return _0x5795c3;}(function(_0x4aa7a3,_0x410d8c){const _0x419866=a302_0x5795,_0x368287=_0x4aa7a3();while(!![]){try{const _0x4f3d1d=parseInt(_0x419866(0x209))/0x1+parseInt(_0x419866(0x204))/0x2+-parseInt(_0x419866(0x214))/0x3*(parseInt(_0x419866(0x20c))/0x4)+parseInt(_0x419866(0x1f6))/0x5+-parseInt(_0x419866(0x20d))/0x6+-parseInt(_0x419866(0x1ff))/0x7*(-parseInt(_0x419866(0x205))/0x8)+parseInt(_0x419866(0x203))/0x9;if(_0x4f3d1d===_0x410d8c)break;else _0x368287['push'](_0x368287['shift']());}catch(_0x16df0c){_0x368287['push'](_0x368287['shift']());}}}(a302_0x36b0,0xed269));import{createKnowledgeClient,KnowledgeServiceError}from'@lovrabet/sdk';import{AsyncLocalStorage}from'node:async_hooks';import{getKbServiceDomain}from'../constant/domain.js';import{normalizeKbServiceOrigin}from'../core/kb-search-client.js';import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a302_0x3f2611(0x1fb),session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0x3f2611(0x217)];[a302_0x3f2611(0x20e)];[a302_0x3f2611(0x1f4)];[a302_0x3f2611(0x212)];constructor(_0x1c83da,_0x4fe95a=![],_0x241c92,_0x327872,_0x262d0f=![]){const _0x5b74ec=a302_0x3f2611;super(_0x5b74ec(0x1fc),0x1,_0x1c83da,_0x241c92?_0x5b74ec(0x213)+_0x241c92:undefined),this[_0x5b74ec(0x217)]=_0x4fe95a,this[_0x5b74ec(0x20e)]=_0x241c92,this['httpStatus']=_0x327872,this[_0x5b74ec(0x212)]=_0x262d0f;if(_0x241c92)Object[_0x5b74ec(0x202)](this,_0x5b74ec(0x1fa),{'value':{'remoteErrorCode':_0x241c92},'enumerable':![]});}}function resolveOrigin(){const _0x3489b6=a302_0x3f2611,_0x2ec377=getKbServiceDomain();if(!_0x2ec377)throw CliErrors[_0x3489b6(0x1f8)]('Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.');try{return normalizeKbServiceOrigin(_0x2ec377);}catch{throw CliErrors[_0x3489b6(0x1f8)](_0x3489b6(0x20a));}}export function withKbManagementSession(_0x2d537b,_0x39ab94){const _0x47135b=a302_0x3f2611;return session[_0x47135b(0x218)]({'origin':resolveOrigin(),'signal':_0x2d537b},_0x39ab94);}function a302_0x36b0(){const _0x308159=['code','test','defineProperty','5100147ibUzNR','91120GTmXbX','10159000ZxoWnc','getStore','network','aborted','359879QZzOPK','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','authRequired','4dDKKiY','8432586WhTeEs','remoteErrorCode','trim','signal','message','pageTooLarge','API\x20error\x20code:\x20','1236363dehSRB','timeout','cookie','transportFailure','run','cancelled','httpStatus','writeUncertain','2734620YxSmPw','auth','validation','origin','data','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','api_error','status','kind','7wlFyuj'];a302_0x36b0=function(){return _0x308159;};return a302_0x36b0();}export async function withKbManagementClient(_0x1fa13c,_0x232b30,_0x33fc55={}){const _0x55c6ff=a302_0x3f2611,_0x204a71=session[_0x55c6ff(0x206)]()?.[_0x55c6ff(0x1f9)]??resolveOrigin();if(!_0x1fa13c[_0x55c6ff(0x20f)]())throw CliErrors[_0x55c6ff(0x20b)]();const _0x1ebb4e=_0x33fc55['signal']??session[_0x55c6ff(0x206)]()?.[_0x55c6ff(0x210)];if(_0x1ebb4e?.[_0x55c6ff(0x208)])throw CliErrors[_0x55c6ff(0x1f3)]('Knowledge\x20management\x20request\x20cancelled.');try{const _0x2f5aad=createKnowledgeClient({'kbServiceDomain':_0x204a71,'authMode':_0x55c6ff(0x216),'cookie':_0x1fa13c,'invokeSource':'cli:rabetbase'});return await _0x232b30(_0x2f5aad,{'signal':_0x1ebb4e});}catch(_0x417d25){if(!(_0x417d25 instanceof KnowledgeServiceError))throw _0x417d25;if(_0x417d25['kind']===_0x55c6ff(0x1f7))throw CliErrors[_0x55c6ff(0x20b)]();if(_0x417d25[_0x55c6ff(0x1fe)]===_0x55c6ff(0x1f8))throw CliErrors['validation'](_0x417d25[_0x55c6ff(0x211)]);const _0xe9d4ac=_0x417d25['kind']===_0x55c6ff(0x207)||_0x417d25[_0x55c6ff(0x1fe)]===_0x55c6ff(0x215)||_0x417d25['kind']==='cancelled';throw new KbManagementError(_0x417d25[_0x55c6ff(0x211)]+(_0x417d25[_0x55c6ff(0x1f5)]?WRITE_RECONCILIATION:''),_0xe9d4ac,/^\d+$/[_0x55c6ff(0x201)](_0x417d25[_0x55c6ff(0x200)]??'')?_0x417d25[_0x55c6ff(0x200)]:undefined,_0x417d25[_0x55c6ff(0x1fd)],_0x417d25[_0x55c6ff(0x212)]);}}
@@ -1 +1 @@
1
- (function(_0x53300a,_0x23ea79){const _0x277bd9=a303_0x2f94,_0x24619a=_0x53300a();while(!![]){try{const _0xdb67bf=parseInt(_0x277bd9(0x8b))/0x1*(parseInt(_0x277bd9(0x93))/0x2)+parseInt(_0x277bd9(0x88))/0x3*(-parseInt(_0x277bd9(0x9e))/0x4)+parseInt(_0x277bd9(0x85))/0x5*(-parseInt(_0x277bd9(0xad))/0x6)+-parseInt(_0x277bd9(0x9c))/0x7+parseInt(_0x277bd9(0x98))/0x8*(-parseInt(_0x277bd9(0x99))/0x9)+-parseInt(_0x277bd9(0x90))/0xa+parseInt(_0x277bd9(0x8d))/0xb;if(_0xdb67bf===_0x23ea79)break;else _0x24619a['push'](_0x24619a['shift']());}catch(_0x23fcc7){_0x24619a['push'](_0x24619a['shift']());}}}(a303_0xd55e,0x88f00));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x47fe9a){try{return normalizeKnowledgeServiceOrigin(_0x47fe9a);}catch{throw CliErrors['validation']('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export async function searchDirectKnowledge(_0x830d73){const _0x19accf=a303_0x2f94,_0x37e68c=_0x830d73['appCode'][_0x19accf(0x8c)](),_0x1947ee=_0x830d73[_0x19accf(0x87)]['trim']();if(!_0x37e68c)throw CliErrors[_0x19accf(0x96)](_0x19accf(0x94));if(!_0x1947ee)throw CliErrors[_0x19accf(0x96)](_0x19accf(0x95));if(!_0x830d73[_0x19accf(0x9d)][_0x19accf(0x8c)]())throw CliErrors[_0x19accf(0xae)]();const _0x4ef55e=normalizeKbServiceOrigin(_0x830d73[_0x19accf(0xa8)]);try{const _0x26b860=createKnowledgeClient({'kbServiceDomain':_0x4ef55e,'authMode':_0x19accf(0x9d),'cookie':_0x830d73[_0x19accf(0x9d)],'invokeSource':'cli:rabetbase'}),_0x405fec=await _0x26b860[_0x19accf(0x91)]({'appCode':_0x37e68c,'query':_0x1947ee,'scopes':[_0x19accf(0xa2),_0x19accf(0x89)],..._0x830d73['topK']!==undefined?{'topK':_0x830d73[_0x19accf(0xb0)]}:{}},{'signal':_0x830d73[_0x19accf(0xa0)]});return{..._0x405fec,'hits':_0x405fec[_0x19accf(0x92)],'schemaVersion':0x2,'profile':_0x19accf(0xaa),'total':_0x405fec[_0x19accf(0x92)][_0x19accf(0x84)]};}catch(_0x13ff1c){if(!(_0x13ff1c instanceof KnowledgeServiceError))throw _0x13ff1c;if(_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0xa3))throw CliErrors[_0x19accf(0xae)]();if(_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0x96))throw CliErrors[_0x19accf(0x96)](_0x13ff1c[_0x19accf(0xa9)]);if(_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0x97))throw new DOMException(_0x19accf(0x8a),'AbortError');if(_0x13ff1c['kind']==='network'||_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0x86))throw CliErrors['networkError'](_0x13ff1c['kind']==='timeout'?_0x19accf(0xb1):_0x19accf(0x9a));const _0x286614=_0x13ff1c[_0x19accf(0xaf)]===_0x19accf(0xa4)&&_0x13ff1c[_0x19accf(0xa9)]['includes'](_0x19accf(0xa5))?_0x19accf(0xac):_0x13ff1c['message'],_0x2b16a8=CliErrors[_0x19accf(0x8f)](_0x13ff1c['status']!==undefined&&_0x13ff1c['status']!==0xc8&&!_0x286614['includes'](_0x19accf(0x9f)+_0x13ff1c[_0x19accf(0xa6)])?_0x286614+_0x19accf(0x8e)+_0x13ff1c[_0x19accf(0xa6)]+')':_0x286614);if(/^\d+$/[_0x19accf(0xab)](_0x13ff1c[_0x19accf(0x9b)]??''))Object[_0x19accf(0xa7)](_0x2b16a8,_0x19accf(0xa1),{'value':{'remoteErrorCode':_0x13ff1c['code']},'enumerable':![]});throw _0x2b16a8;}}function a303_0x2f94(_0x2d4f24,_0x539f65){_0x2d4f24=_0x2d4f24-0x84;const _0xd55ebe=a303_0xd55e();let _0x2f9413=_0xd55ebe[_0x2d4f24];return _0x2f9413;}function a303_0xd55e(){const _0x4def9b=['KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','length','2610eEsanE','timeout','query','36uhDhGX','company','Knowledge\x20search\x20cancelled.','859KDYbul','trim','30172912Ebvtlb','\x20(HTTP\x20','apiError','2753560hpAULd','search','hits','2098fCkehr','Knowledge\x20search\x20appCode\x20is\x20required.','Knowledge\x20search\x20query\x20is\x20required.','validation','cancelled','7906544pixdIA','9aVLPTV','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','code','2042383cImfyK','cookie','337684pYJGgH','HTTP\x20','signal','data','public','auth','contract','out-of-scope','status','defineProperty','serviceUrl','message','development','test','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','5916ScRJmy','authRequired','kind','topK'];a303_0xd55e=function(){return _0x4def9b;};return a303_0xd55e();}
1
+ (function(_0x44bd70,_0x65b834){const _0x1c328f=a303_0x225e,_0x21258e=_0x44bd70();while(!![]){try{const _0x2927ca=parseInt(_0x1c328f(0x1c2))/0x1+parseInt(_0x1c328f(0x1c0))/0x2*(-parseInt(_0x1c328f(0x1ea))/0x3)+-parseInt(_0x1c328f(0x1e4))/0x4*(parseInt(_0x1c328f(0x1c1))/0x5)+parseInt(_0x1c328f(0x1d0))/0x6+-parseInt(_0x1c328f(0x1e0))/0x7+-parseInt(_0x1c328f(0x1c9))/0x8+parseInt(_0x1c328f(0x1be))/0x9*(parseInt(_0x1c328f(0x1e3))/0xa);if(_0x2927ca===_0x65b834)break;else _0x21258e['push'](_0x21258e['shift']());}catch(_0x5233af){_0x21258e['push'](_0x21258e['shift']());}}}(a303_0x1e9c,0x73fa9));function a303_0x225e(_0x2bef02,_0x4476b2){_0x2bef02=_0x2bef02-0x1bc;const _0x1e9c40=a303_0x1e9c();let _0x225e0c=_0x1e9c40[_0x2bef02];return _0x225e0c;}import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x1e9c(){const _0x330014=['topK','code','3613326XRMJNT','defineProperty','includes','HTTP\x20','apiError','authRequired','auth','AbortError','Knowledge\x20search\x20cancelled.','query','serviceUrl','validation','status','cli:rabetbase','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','3616760wVcVOM','development','company','691510DzfQku','68bkWxZF','search','contract','data','\x20(HTTP\x20','networkError','31539QJiSlN','hits','length','27xIkRqH','message','60zkCuVC','12235xAgMHY','712760qVVkMs','timeout','cookie','kind','trim','appCode','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','1389728oXrsOo','Knowledge\x20search\x20query\x20is\x20required.','test','network','signal'];a303_0x1e9c=function(){return _0x330014;};return a303_0x1e9c();}import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0xab7cd2){const _0x445844=a303_0x225e;try{return normalizeKnowledgeServiceOrigin(_0xab7cd2);}catch{throw CliErrors[_0x445844(0x1db)](_0x445844(0x1df));}}export async function searchDirectKnowledge(_0x1637ec){const _0x18e0d0=a303_0x225e,_0x2f3c2c=_0x1637ec[_0x18e0d0(0x1c7)][_0x18e0d0(0x1c6)](),_0x1d3ab3=_0x1637ec[_0x18e0d0(0x1d9)]['trim']();if(!_0x2f3c2c)throw CliErrors[_0x18e0d0(0x1db)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0x1d3ab3)throw CliErrors[_0x18e0d0(0x1db)](_0x18e0d0(0x1ca));if(!_0x1637ec['cookie'][_0x18e0d0(0x1c6)]())throw CliErrors[_0x18e0d0(0x1d5)]();const _0x2e283b=normalizeKbServiceOrigin(_0x1637ec[_0x18e0d0(0x1da)]);try{const _0xe58700=createKnowledgeClient({'kbServiceDomain':_0x2e283b,'authMode':_0x18e0d0(0x1c4),'cookie':_0x1637ec['cookie'],'invokeSource':_0x18e0d0(0x1dd)}),_0x2c3624=await _0xe58700[_0x18e0d0(0x1e5)]({'appCode':_0x2f3c2c,'query':_0x1d3ab3,'scopes':['public',_0x18e0d0(0x1e2)],..._0x1637ec[_0x18e0d0(0x1ce)]!==undefined?{'topK':_0x1637ec[_0x18e0d0(0x1ce)]}:{}},{'signal':_0x1637ec[_0x18e0d0(0x1cd)]});return{..._0x2c3624,'hits':_0x2c3624['hits'],'schemaVersion':0x2,'profile':_0x18e0d0(0x1e1),'total':_0x2c3624[_0x18e0d0(0x1bc)][_0x18e0d0(0x1bd)]};}catch(_0x3f03df){if(!(_0x3f03df instanceof KnowledgeServiceError))throw _0x3f03df;if(_0x3f03df[_0x18e0d0(0x1c5)]===_0x18e0d0(0x1d6))throw CliErrors[_0x18e0d0(0x1d5)]();if(_0x3f03df[_0x18e0d0(0x1c5)]==='validation')throw CliErrors[_0x18e0d0(0x1db)](_0x3f03df[_0x18e0d0(0x1bf)]);if(_0x3f03df[_0x18e0d0(0x1c5)]==='cancelled')throw new DOMException(_0x18e0d0(0x1d8),_0x18e0d0(0x1d7));if(_0x3f03df[_0x18e0d0(0x1c5)]===_0x18e0d0(0x1cc)||_0x3f03df['kind']===_0x18e0d0(0x1c3))throw CliErrors[_0x18e0d0(0x1e9)](_0x3f03df[_0x18e0d0(0x1c5)]===_0x18e0d0(0x1c3)?_0x18e0d0(0x1de):_0x18e0d0(0x1c8));const _0x57805d=_0x3f03df['kind']===_0x18e0d0(0x1e6)&&_0x3f03df[_0x18e0d0(0x1bf)][_0x18e0d0(0x1d2)]('out-of-scope')?'KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.':_0x3f03df['message'],_0x3bef9a=CliErrors[_0x18e0d0(0x1d4)](_0x3f03df[_0x18e0d0(0x1dc)]!==undefined&&_0x3f03df['status']!==0xc8&&!_0x57805d[_0x18e0d0(0x1d2)](_0x18e0d0(0x1d3)+_0x3f03df[_0x18e0d0(0x1dc)])?_0x57805d+_0x18e0d0(0x1e8)+_0x3f03df[_0x18e0d0(0x1dc)]+')':_0x57805d);if(/^\d+$/[_0x18e0d0(0x1cb)](_0x3f03df[_0x18e0d0(0x1cf)]??''))Object[_0x18e0d0(0x1d1)](_0x3bef9a,_0x18e0d0(0x1e7),{'value':{'remoteErrorCode':_0x3f03df[_0x18e0d0(0x1cf)]},'enumerable':![]});throw _0x3bef9a;}}
@@ -1 +1 @@
1
- const a304_0x26fc71=a304_0x74c7;(function(_0x51e2b1,_0xb66377){const _0x511fcb=a304_0x74c7,_0xeebcd=_0x51e2b1();while(!![]){try{const _0x4c9a38=-parseInt(_0x511fcb(0xad))/0x1*(-parseInt(_0x511fcb(0xae))/0x2)+-parseInt(_0x511fcb(0xbe))/0x3*(-parseInt(_0x511fcb(0xb2))/0x4)+-parseInt(_0x511fcb(0xb3))/0x5*(-parseInt(_0x511fcb(0xb7))/0x6)+-parseInt(_0x511fcb(0xa6))/0x7*(-parseInt(_0x511fcb(0xb6))/0x8)+-parseInt(_0x511fcb(0xb9))/0x9+-parseInt(_0x511fcb(0xaf))/0xa*(-parseInt(_0x511fcb(0xb8))/0xb)+-parseInt(_0x511fcb(0xab))/0xc*(parseInt(_0x511fcb(0xa3))/0xd);if(_0x4c9a38===_0xb66377)break;else _0xeebcd['push'](_0xeebcd['shift']());}catch(_0x25c696){_0xeebcd['push'](_0xeebcd['shift']());}}}(a304_0x1b93,0x2c78c));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a304_0x74c7(_0x3ed78b,_0x33ee65){_0x3ed78b=_0x3ed78b-0xa2;const _0x1b93a4=a304_0x1b93();let _0x74c738=_0x1b93a4[_0x3ed78b];return _0x74c738;}export function loadPageProjectConfig(_0x544c29,_0x2f7de8=process[a304_0x26fc71(0xaa)]()){const _0x228e42=a304_0x26fc71,_0x52a0f5=resolve(_0x2f7de8),_0x4621c4=join(_0x52a0f5,_0x228e42(0xbc),_0x228e42(0xb5));return{'projectRoot':_0x52a0f5,'pagesBaseDir':_0x4621c4,'appPagesDir':join(_0x4621c4,_0x544c29),'lockFilePath':join(_0x52a0f5,'.rabetbase',_0x228e42(0xa5))};}export function buildPageFileName(_0x2c644c,_0x4d8706){const _0x3f4c6c=a304_0x26fc71;return _0x2c644c+'-'+_0x4d8706[_0x3f4c6c(0xb1)]()+_0x3f4c6c(0xb4);}export function resolvePageFilePath(_0x82cf41,_0x32e88e,_0x4abb56){const _0x3fb8fa=a304_0x26fc71;return join(_0x82cf41[_0x3fb8fa(0xa9)],buildPageFileName(_0x32e88e,_0x4abb56));}export async function ensureParentDirectory(_0x585179){await mkdir(dirname(_0x585179),{'recursive':!![]});}export async function fileExists(_0x52b5f4){try{return await access(_0x52b5f4,constants['F_OK']),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x25b8f9){const _0x2f846c=a304_0x26fc71,_0x146c3f=_0x25b8f9['trim']();if(!_0x146c3f)throw CliErrors[_0x2f846c(0xa7)](_0x2f846c(0xb0));const _0x5455fb=resolve(_0x146c3f);let _0x489d77;try{_0x489d77=await lstat(_0x5455fb);}catch{throw CliErrors['validation'](_0x2f846c(0xbb)+_0x146c3f);}if(!_0x489d77[_0x2f846c(0xa8)]())throw CliErrors[_0x2f846c(0xac)]('Page\x20directory\x20is\x20not\x20a\x20directory:\x20'+_0x146c3f);const _0x4eeef9={};return await readDirectory(_0x5455fb,_0x5455fb,_0x4eeef9),_0x4eeef9;}async function readDirectory(_0x20236e,_0x33cac5,_0x5c45fd){const _0x5c81f0=a304_0x26fc71,_0xe5b1f5=await readdir(_0x33cac5,{'withFileTypes':!![]});for(const _0x4df0a2 of _0xe5b1f5['sort']((_0x22c0b9,_0xe86b18)=>_0x22c0b9[_0x5c81f0(0xbd)]['localeCompare'](_0xe86b18[_0x5c81f0(0xbd)]))){const _0x36a03a=join(_0x33cac5,_0x4df0a2['name']);if(_0x4df0a2[_0x5c81f0(0xa8)]()){await readDirectory(_0x20236e,_0x36a03a,_0x5c45fd);continue;}if(!_0x4df0a2['isFile']())throw CliErrors[_0x5c81f0(0xac)](_0x5c81f0(0xa4)+_0x36a03a);_0x5c45fd[relative(_0x20236e,_0x36a03a)[_0x5c81f0(0xba)](sep)[_0x5c81f0(0xa2)]('/')]=await readFile(_0x36a03a,'utf8');}}function a304_0x1b93(){const _0x7fe455=['toUpperCase','705044hRMxXL','1730NSnKVI','.json','page','8WOjKDS','2634pCaMEt','330LiEvTM','59418uWKwmg','split','Page\x20directory\x20not\x20found:\x20','.rabetbase','name','3znnsSu','join','2171HRCLFd','Unsupported\x20file\x20in\x20page\x20directory:\x20','page.lock.json','258545wWyNwP','flagMissing','isDirectory','appPagesDir','cwd','32748LJCarj','validation','917pIsxdh','606vTIrrv','520WydjCo','page-dir'];a304_0x1b93=function(){return _0x7fe455;};return a304_0x1b93();}
1
+ const a304_0x45a5f=a304_0x56a4;(function(_0x48089f,_0x265da1){const _0x236751=a304_0x56a4,_0xd3b337=_0x48089f();while(!![]){try{const _0x3850a1=-parseInt(_0x236751(0x110))/0x1+-parseInt(_0x236751(0x10f))/0x2*(parseInt(_0x236751(0x10e))/0x3)+parseInt(_0x236751(0x11f))/0x4+-parseInt(_0x236751(0x122))/0x5*(-parseInt(_0x236751(0x117))/0x6)+parseInt(_0x236751(0x116))/0x7*(-parseInt(_0x236751(0x11a))/0x8)+-parseInt(_0x236751(0x10a))/0x9*(-parseInt(_0x236751(0x123))/0xa)+parseInt(_0x236751(0x120))/0xb;if(_0x3850a1===_0x265da1)break;else _0xd3b337['push'](_0xd3b337['shift']());}catch(_0x5bcc2f){_0xd3b337['push'](_0xd3b337['shift']());}}}(a304_0x2d09,0x47f10));import{constants}from'node:fs';function a304_0x2d09(){const _0x48571e=['split','1613300gRLtsO','1739694DjAhMO','Unsupported\x20file\x20in\x20page\x20directory:\x20','1018865SwyEPF','347870JrMsgH','trim','isDirectory','page-dir','sort','.json','81dcIOXO','utf8','flagMissing','appPagesDir','870951kYcJNV','2BOVbJG','386020jzBPkO','name','toUpperCase','validation','isFile','cwd','1442fysxMH','6SGiFpC','page','F_OK','4168FFfyrh','page.lock.json','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','.rabetbase'];a304_0x2d09=function(){return _0x48571e;};return a304_0x2d09();}import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x5a86ab,_0x321965=process[a304_0x45a5f(0x115)]()){const _0x453b2f=a304_0x45a5f,_0xabc002=resolve(_0x321965),_0xf3cfc3=join(_0xabc002,_0x453b2f(0x11d),_0x453b2f(0x118));return{'projectRoot':_0xabc002,'pagesBaseDir':_0xf3cfc3,'appPagesDir':join(_0xf3cfc3,_0x5a86ab),'lockFilePath':join(_0xabc002,_0x453b2f(0x11d),_0x453b2f(0x11b))};}export function buildPageFileName(_0x6a944d,_0x1f08ba){const _0x31912e=a304_0x45a5f;return _0x6a944d+'-'+_0x1f08ba[_0x31912e(0x112)]()+_0x31912e(0x128);}export function resolvePageFilePath(_0x16ce56,_0x3d4690,_0x323eb9){const _0x2ecba3=a304_0x45a5f;return join(_0x16ce56[_0x2ecba3(0x10d)],buildPageFileName(_0x3d4690,_0x323eb9));}function a304_0x56a4(_0x452f61,_0x9548ae){_0x452f61=_0x452f61-0x10a;const _0x2d0904=a304_0x2d09();let _0x56a42b=_0x2d0904[_0x452f61];return _0x56a42b;}export async function ensureParentDirectory(_0x52d8e8){await mkdir(dirname(_0x52d8e8),{'recursive':!![]});}export async function fileExists(_0x37cce6){const _0x4566fc=a304_0x45a5f;try{return await access(_0x37cce6,constants[_0x4566fc(0x119)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x4d3bee){const _0x55ad72=a304_0x45a5f,_0xfb0427=_0x4d3bee[_0x55ad72(0x124)]();if(!_0xfb0427)throw CliErrors[_0x55ad72(0x10c)](_0x55ad72(0x126));const _0x1eb9aa=resolve(_0xfb0427);let _0x5498a7;try{_0x5498a7=await lstat(_0x1eb9aa);}catch{throw CliErrors['validation']('Page\x20directory\x20not\x20found:\x20'+_0xfb0427);}if(!_0x5498a7[_0x55ad72(0x125)]())throw CliErrors['validation'](_0x55ad72(0x11c)+_0xfb0427);const _0x46d26f={};return await readDirectory(_0x1eb9aa,_0x1eb9aa,_0x46d26f),_0x46d26f;}async function readDirectory(_0x38d68e,_0x53bdb2,_0x1ac7eb){const _0x3ce068=a304_0x45a5f,_0x2df7dc=await readdir(_0x53bdb2,{'withFileTypes':!![]});for(const _0x2cd5a1 of _0x2df7dc[_0x3ce068(0x127)]((_0x4d3f09,_0x3f8b19)=>_0x4d3f09[_0x3ce068(0x111)]['localeCompare'](_0x3f8b19[_0x3ce068(0x111)]))){const _0x5da8ae=join(_0x53bdb2,_0x2cd5a1['name']);if(_0x2cd5a1[_0x3ce068(0x125)]()){await readDirectory(_0x38d68e,_0x5da8ae,_0x1ac7eb);continue;}if(!_0x2cd5a1[_0x3ce068(0x114)]())throw CliErrors[_0x3ce068(0x113)](_0x3ce068(0x121)+_0x5da8ae);_0x1ac7eb[relative(_0x38d68e,_0x5da8ae)[_0x3ce068(0x11e)](sep)['join']('/')]=await readFile(_0x5da8ae,_0x3ce068(0x10b));}}