@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-beta.2
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.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.d.ts +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -28
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a299_0x85c6cc=a299_0x3b20;function a299_0x3b20(_0x2648fc,_0x290d05){_0x2648fc=_0x2648fc-0x188;const _0x45b9f6=a299_0x45b9();let _0x3b206e=_0x45b9f6[_0x2648fc];return _0x3b206e;}(function(_0x53d4a9,_0x5ca5f8){const _0x13d707=a299_0x3b20,_0x2b2b51=_0x53d4a9();while(!![]){try{const _0x28512b=parseInt(_0x13d707(0x1f3))/0x1+-parseInt(_0x13d707(0x1f4))/0x2+parseInt(_0x13d707(0x26a))/0x3+parseInt(_0x13d707(0x29b))/0x4+-parseInt(_0x13d707(0x24f))/0x5*(parseInt(_0x13d707(0x18c))/0x6)+-parseInt(_0x13d707(0x2cd))/0x7*(parseInt(_0x13d707(0x27a))/0x8)+parseInt(_0x13d707(0x2bf))/0x9*(parseInt(_0x13d707(0x259))/0xa);if(_0x28512b===_0x5ca5f8)break;else _0x2b2b51['push'](_0x2b2b51['shift']());}catch(_0x6553b3){_0x2b2b51['push'](_0x2b2b51['shift']());}}}(a299_0x45b9,0xb2dee));function a299_0x45b9(){const _0x4f998c=['Notification\x20template\x20supports\x20at\x20most\x20','path','.\x20This\x20CLI\x20supports\x20only\x20','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','get','Unsupported\x20flowType:\x20','async','templateName','.sequential','#/$defs/userId','context','boolean','Reserved\x20resultVariable:\x20','MAX_SAFE_INTEGER','1783496EEUkxQ','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','Duplicate\x20node\x20id:\x20','flowJson.nodes[','Duplicate\x20value:\x20','.tmp','.cc.recipientUserIds[','startsWith','schemaVersion','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','isSafeInteger','.type','formPermission','approval_sys_datasetCode','readSources','target','assignee','.waypoints','.timeout','flowJson.pageMode','Notification\x20recipient.value\x20is\x20required.','every','text','async\x20must\x20be\x20an\x20object.','scriptName','version','enabled','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','isArray','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','.config','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','BCC','NOTIFICATION\x20node\x20requires\x20config.','detailMarkdown','6606vOIjMq','defaultFlow','configCode','number','delete','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','includes','flowName\x20is\x20required.','ALL','utf8','.assignee.roleId','Notification\x20version\x20must\x20be\x20a\x20string.','.expression','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','6671DWBtrD','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','flowJson.nodes.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','Notification\x20configCode\x20is\x20required.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.text','\x20must\x20be\x20a\x20finite\x20number.','test','approval_sys_operationType','.transferCandidates.userIds','waypoints','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','.name','action','taskMode','array','config','.path','ROLE','Duplicate\x20resultVariable:\x20','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.cc','event','parse','NOTIFICATION','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','async.enabled\x20must\x20be\x20a\x20boolean.','flowJson.schemaVersion','SINGLE','INDEPENDENT_FLOW','APPROVAL\x20node\x20requires\x20assignee.','actions','flowJson.edges','.assignee.strategy','size','edge\x20target\x20is\x20required.','3936VzczgD','nodes','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','datasetCode','flowKey','type','label','flowName','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','#/$defs/flowEdge','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','.cc.visible','.assignee.userIds','.assignee.userIds[','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','ALWAYS','name','facts','value\x20must\x20be\x20an\x20array.','Notification\x20recipients\x20must\x20be\x20an\x20array.','summary','pageId','approval_sys_initiatorUsername','empty_metadata_removed','#/$defs/flowNode','toUpperCase','CUSTOM_PAGE','SECONDS','\x20actions.','.async.retryCount','DAYS','overwrite','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','sequential\x20must\x20be\x20a\x20boolean.','call','approval_sys_pageId','START','.version','Notification\x20template.facts\x20must\x20be\x20an\x20array.','approvalMode','cc\x20must\x20be\x20an\x20object.','approval_sys_processInstanceId','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','role','Duplicate\x20cc\x20recipient\x20userId:\x20','expression','Notification\x20recipient\x20must\x20be\x20an\x20object.','bindDatasetCode','string','hasOwnProperty','sequential','.url','flowJson.startPageId','position.','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','matchAll','flowType','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','object','targetNodeId','flowCode','Unsupported\x20pageMode:\x20','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','flowJson\x20must\x20be\x20an\x20object.','AUTO_APPROVE','length','CONDITION','.timeout.action','.resultVariable','approval_sys_initiatorUserId','findIndex','\x20is\x20required.','Node\x20has\x20no\x20outgoing\x20edge.',',\x20but\x20node\x20','SCRIPT\x20node\x20requires\x20scriptName.','END','.value','join','set','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Unsupported\x20task\x20mode:\x20','slice','HANDLE','SCRIPT','.transferCandidates.strategy','interrupting','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','APPROVED','CONTINUE','add','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','ANY','has','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','flowJson.nodes','map','flowType\x20is\x20required.','.failurePolicy','MINUTES','#/$defs/timeAmount','catch','125837guycOk','1342314emwSEp','sourceNodeId','timeout\x20must\x20be\x20an\x20object.','formDefinitions','template','Notification\x20template.','.async.retryInterval','.pageId','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','trim','edge\x20name\x20must\x20be\x20a\x20string.','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','APPROVAL','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','.cc.readSources','EMAIL','Node\x20has\x20no\x20incoming\x20edge.','\x20was\x20empty\x20and\x20was\x20removed.','url','flowDesc','node\x20must\x20be\x20an\x20object.','.unit','pid','flowJson.edges[','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','indexOf','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','appCode','\x20->\x20','edge\x20source\x20is\x20required.','Unsupported\x20node\x20type:\x20','Notification\x20fact.','defaultFlow\x20must\x20be\x20a\x20boolean.','formPermissions','Notification\x20action\x20must\x20be\x20an\x20object.','pageMode','integer','stringify','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','duration','approval.simple-flow.v1','.target','userIds','.async','.source','.timeout.duration','.timeout.resultVariable','retryCount','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','.detailMarkdown','FIXED\x20assignee\x20requires\x20userIds.','edges','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','.id','cc.recipientUserIds\x20supports\x20at\x20most\x20','resultVariable','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','prototype','strategy','#/$defs/position','.waypoints[','USER','source','.scriptName','timeout.interrupting\x20must\x20be\x20a\x20boolean.','keys','filter','.facts','Unsupported\x20condition\x20type:\x20','.defaultFlow','.configCode','edge\x20must\x20be\x20an\x20object.','HOURS','formSchema','.assignee','position','Unsupported\x20schemaVersion:\x20','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.role','Duplicate\x20BPMN\x20element\x20id:\x20','.approvalMode','EXPRESSION','Edge\x20target\x20node\x20not\x20found:\x20','duration\x20requires\x20value\x20and\x20unit.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','^[A-Za-z_][A-Za-z0-9_]*$','.conditionType','mode','title','REJECTED','820xUVKFE','push','replace','unit','flowJson.','Edge\x20source\x20node\x20not\x20found:\x20','.position.','https://json-schema.org/draft/2020-12/schema','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','PLATFORM_FORM','19830fvhSXw','failurePolicy','Notification\x20fact\x20must\x20be\x20an\x20object.','approval_sys_','waypoint.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','isInteger','retryInterval','FORM_FLOW','some','FIXED','.timeout.interrupting','].path','AUTO_REJECT','entries','startPath','\x20facts.','2034813BMxccY','conditionType','Every\x20node\x20requires\x20a\x20non-empty\x20name.','.cc.recipientUserIds','isFinite','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','legacy_field_removed','forEach','pageIds','timeout.enabled\x20must\x20be\x20a\x20boolean.','.transferCandidates','form','timeout','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','10024zZsjhK','Duplicate\x20edge\x20route:\x20','.position','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','flowJson','Unsupported\x20approval\x20mode:\x20','NaN','roleId','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','EXECUTE_BFF','.timeout.scriptName','.actions','https://lovrabet.com/schema/rabetbase-flow-config.json','recipientUserIds','transferCandidates','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','value','.async.enabled'];a299_0x45b9=function(){return _0x4f998c;};return a299_0x45b9();}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_0x85c6cc(0x256),'$id':a299_0x85c6cc(0x286),'title':'Rabetbase\x20FlowConfig','type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x193),a299_0x85c6cc(0x1c4),a299_0x85c6cc(0x27e)],'$defs':{'userId':{'anyOf':[{'type':'string','minLength':0x1},{'type':'integer','minimum':0x1}]},'position':{'type':a299_0x85c6cc(0x1c6),'required':['x','y'],'properties':{'x':{'type':a299_0x85c6cc(0x2c2),'minimum':0x0},'y':{'type':a299_0x85c6cc(0x2c2),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x28a),'unit'],'properties':{'value':{'type':a299_0x85c6cc(0x218),'minimum':0x1},'unit':{'enum':[a299_0x85c6cc(0x1a7),a299_0x85c6cc(0x1f0),a299_0x85c6cc(0x23d),a299_0x85c6cc(0x1aa)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0x85c6cc(0x1c6),'required':['id','type','name',a299_0x85c6cc(0x240)],'properties':{'id':{'type':a299_0x85c6cc(0x1bc),'pattern':a299_0x85c6cc(0x24a)},'type':{'enum':[a299_0x85c6cc(0x1b0),a299_0x85c6cc(0x1d9),a299_0x85c6cc(0x200),'CONDITION',a299_0x85c6cc(0x1e1),a299_0x85c6cc(0x2e7)]},'name':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'path':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'position':{'$ref':a299_0x85c6cc(0x230)},'approvalMode':{'enum':[a299_0x85c6cc(0x2eb),a299_0x85c6cc(0x2c7),a299_0x85c6cc(0x1e9)]},'taskMode':{'enum':['APPROVAL',a299_0x85c6cc(0x1e0)]},'assignee':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x22f)],'properties':{'strategy':{'enum':[a299_0x85c6cc(0x263),a299_0x85c6cc(0x2e1)]},'userIds':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x296)}},'roleId':{'anyOf':[{'type':a299_0x85c6cc(0x218),'minimum':0x1},{'type':a299_0x85c6cc(0x1bc),'pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x22f),'userIds'],'properties':{'strategy':{'const':a299_0x85c6cc(0x263)},'userIds':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x296)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x85c6cc(0x298)},'result':{'enum':[a299_0x85c6cc(0x1e5),a299_0x85c6cc(0x24e)]},'scriptName':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x85c6cc(0x24a)},'async':{'type':'object','properties':{'enabled':{'type':a299_0x85c6cc(0x298)},'retryCount':{'type':a299_0x85c6cc(0x218),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x85c6cc(0x1f1)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0x85c6cc(0x298)},'duration':{'$ref':a299_0x85c6cc(0x1f1)},'action':{'enum':['AUTO_APPROVE',a299_0x85c6cc(0x266),a299_0x85c6cc(0x283)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'resultVariable':{'type':a299_0x85c6cc(0x1bc),'pattern':a299_0x85c6cc(0x24a)}},'additionalProperties':!![]},'cc':{'type':'object','required':[a299_0x85c6cc(0x287)],'properties':{'recipientUserIds':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1}},'visible':{'type':a299_0x85c6cc(0x2de),'uniqueItems':!![],'items':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x2c1),a299_0x85c6cc(0x1f8)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE','FAIL']},'template':{'type':'object','required':[a299_0x85c6cc(0x24d),a299_0x85c6cc(0x1a0)],'properties':{'title':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'summary':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'detailMarkdown':{'type':a299_0x85c6cc(0x1bc)},'facts':{'type':a299_0x85c6cc(0x2de),'maxItems':0x8,'items':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x192),a299_0x85c6cc(0x28a)],'properties':{'label':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'value':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x85c6cc(0x2de),'maxItems':0x2,'items':{'type':'object','required':[a299_0x85c6cc(0x2b1),'url'],'properties':{'text':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x85c6cc(0x2de),'items':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x191),a299_0x85c6cc(0x28a)],'properties':{'type':{'enum':[a299_0x85c6cc(0x232),a299_0x85c6cc(0x2e1),'EMAIL']},'value':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x85c6cc(0x2bc)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x85c6cc(0x1c6),'properties':{'id':{'type':a299_0x85c6cc(0x1bc),'pattern':a299_0x85c6cc(0x24a)},'source':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'target':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'conditionType':{'enum':[a299_0x85c6cc(0x19b),a299_0x85c6cc(0x1e5),a299_0x85c6cc(0x24e),a299_0x85c6cc(0x246)]},'expression':{'type':'string'},'defaultFlow':{'type':a299_0x85c6cc(0x298)},'name':{'type':'string'},'waypoints':{'type':a299_0x85c6cc(0x2de),'items':{'$ref':a299_0x85c6cc(0x230)}}},'allOf':[{'anyOf':[{'required':[a299_0x85c6cc(0x233)]},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a299_0x85c6cc(0x2aa)]},{'required':[a299_0x85c6cc(0x1c7)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'flowDesc':{'type':a299_0x85c6cc(0x1bc)},'flowType':{'enum':[a299_0x85c6cc(0x261),a299_0x85c6cc(0x2ec)]},'datasetCode':{'type':a299_0x85c6cc(0x1bc),'minLength':0x1},'pageId':{'type':a299_0x85c6cc(0x218),'minimum':0x1,'maximum':Number[a299_0x85c6cc(0x29a)]},'pageIds':{'type':a299_0x85c6cc(0x2de),'items':{'type':a299_0x85c6cc(0x218),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':a299_0x85c6cc(0x1c6),'required':[a299_0x85c6cc(0x18d),a299_0x85c6cc(0x228)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x85c6cc(0x21c),'description':a299_0x85c6cc(0x2da)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x85c6cc(0x1a6)},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x1a4)}},'edges':{'type':a299_0x85c6cc(0x2de),'minItems':0x1,'items':{'$ref':a299_0x85c6cc(0x195)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x85c6cc(0x190),a299_0x85c6cc(0x1c8),'flowName',a299_0x85c6cc(0x1bb),'datasetCode',a299_0x85c6cc(0x20f),a299_0x85c6cc(0x1a1),a299_0x85c6cc(0x294)],REMOVED_ROOT_FIELDS=['id','appCode',a299_0x85c6cc(0x294)],DEFAULT_FLOW_SCHEMA_VERSION='approval.simple-flow.v1',NODE_TYPES=new Set(['START',a299_0x85c6cc(0x1d9),a299_0x85c6cc(0x200),'CONDITION','SCRIPT',a299_0x85c6cc(0x2e7)]),CONDITION_TYPES=new Set([a299_0x85c6cc(0x19b),'APPROVED',a299_0x85c6cc(0x24e),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0x85c6cc(0x2eb),a299_0x85c6cc(0x2c7),a299_0x85c6cc(0x1e9)]),APPROVAL_TASK_MODES=new Set([a299_0x85c6cc(0x200),a299_0x85c6cc(0x1e0)]),FLOW_TIME_UNITS=new Set(['SECONDS',a299_0x85c6cc(0x1f0),a299_0x85c6cc(0x23d),a299_0x85c6cc(0x1aa)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x85c6cc(0x1ce),'AUTO_REJECT',a299_0x85c6cc(0x283)]),FLOW_TYPES=new Set([a299_0x85c6cc(0x261),a299_0x85c6cc(0x2ec)]),FLOW_PAGE_MODES=new Set([a299_0x85c6cc(0x1a6),a299_0x85c6cc(0x258)]),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_0x85c6cc(0x1e6),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x85c6cc(0x232),a299_0x85c6cc(0x2e1),a299_0x85c6cc(0x203)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x85c6cc(0x2bc)]),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='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set(['formData','approved','approval_sys_appCode',a299_0x85c6cc(0x1b5),a299_0x85c6cc(0x1d3),a299_0x85c6cc(0x1a2),a299_0x85c6cc(0x2a8),a299_0x85c6cc(0x1af),a299_0x85c6cc(0x2d6),'approval_sys_dataId']);export function normalizeFlowConfig(_0x26c177){const _0x3819a8=a299_0x85c6cc;if(!isRecord(_0x26c177))throw new TypeError(_0x3819a8(0x1ff));const _0x1095de=cloneJsonValue(_0x26c177),_0x5c05c8=_0x1095de['flowJson'],_0x50882d=isRecord(_0x5c05c8)?cloneJsonValue(_0x5c05c8):{},_0x313b02=[],_0x1da674=[];for(const _0x1d0332 of REMOVED_ROOT_FIELDS){if(!Object['prototype']['hasOwnProperty'][_0x3819a8(0x1ae)](_0x1095de,_0x1d0332))continue;delete _0x1095de[_0x1d0332],_0x1da674[_0x3819a8(0x250)](_0x1d0332),_0x313b02[_0x3819a8(0x250)]({'code':_0x3819a8(0x271),'path':_0x1d0332,'message':_0x1d0332+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x5031f0 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x3819a8(0x22e)][_0x3819a8(0x1bd)][_0x3819a8(0x1ae)](_0x50882d,_0x5031f0))continue;const _0x5cc87d=_0x3819a8(0x253)+_0x5031f0;delete _0x50882d[_0x5031f0],_0x1da674['push'](_0x5cc87d),_0x313b02[_0x3819a8(0x250)]({'code':'legacy_field_removed','path':_0x5cc87d,'message':_0x5cc87d+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x3819a8(0x22e)]['hasOwnProperty'][_0x3819a8(0x1ae)](_0x50882d,_0x3819a8(0x2a3))){const _0x2eb396=_0x50882d[_0x3819a8(0x2a3)],_0x5137fa=typeof _0x2eb396===_0x3819a8(0x1bc)?_0x2eb396[_0x3819a8(0x1fd)]():_0x2eb396;if(isEmptyJsonValue(_0x2eb396)||_0x5137fa===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4eac9f=_0x3819a8(0x2ea);delete _0x50882d['schemaVersion'],_0x1da674[_0x3819a8(0x250)](_0x4eac9f),_0x313b02[_0x3819a8(0x250)]({'code':_0x3819a8(0x271),'path':_0x4eac9f,'message':_0x4eac9f+_0x3819a8(0x1cc)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x50882d,_0x3819a8(0x27e),_0x313b02,_0x1da674);_0x1095de['flowType']===_0x3819a8(0x2ec)&&!Object[_0x3819a8(0x22e)]['hasOwnProperty'][_0x3819a8(0x1ae)](_0x50882d,_0x3819a8(0x217))&&(_0x50882d[_0x3819a8(0x217)]=_0x3819a8(0x1a6));_0x1095de['flowJson']=_0x50882d;if(typeof _0x1095de['flowName']===_0x3819a8(0x1bc))_0x1095de[_0x3819a8(0x193)]=_0x1095de[_0x3819a8(0x193)][_0x3819a8(0x1fd)]();return{'config':_0x1095de,'warnings':_0x313b02,'removedPaths':_0x1da674};}export function validateFlowConfig(_0x244972){const _0x4a6ead=a299_0x85c6cc;let _0x583dcb;try{_0x583dcb=normalizeFlowConfig(_0x244972);}catch(_0x25c6b0){const _0x46b227=_0x25c6b0 instanceof Error?_0x25c6b0['message']:String(_0x25c6b0),_0x345dbf={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x46b227}],'warnings':[],'normalized':_0x345dbf,'validationConfig':_0x345dbf};}const _0x3d6612=_0x583dcb[_0x4a6ead(0x2df)],_0x30b31d=cloneJsonValue(_0x3d6612),_0x16e501=_0x30b31d[_0x4a6ead(0x27e)];_0x16e501['flowKey']='__rabetbase_local_validation__',_0x16e501[_0x4a6ead(0x193)]=_0x3d6612[_0x4a6ead(0x193)];typeof _0x3d6612[_0x4a6ead(0x18f)]===_0x4a6ead(0x1bc)&&_0x3d6612[_0x4a6ead(0x18f)][_0x4a6ead(0x1fd)]()&&(_0x16e501['bindDatasetCode']=_0x3d6612[_0x4a6ead(0x18f)][_0x4a6ead(0x1fd)]());const _0x24556d=[];return validateOuterMetadata(_0x3d6612,_0x24556d),validateFlowClassification(_0x3d6612,_0x24556d),validateGraph(_0x3d6612[_0x4a6ead(0x27e)],_0x24556d),{'valid':_0x24556d[_0x4a6ead(0x1cf)]===0x0,'errors':_0x24556d,'warnings':_0x583dcb['warnings'],'normalized':_0x3d6612,'validationConfig':_0x30b31d};}function validateFlowClassification(_0x315bdb,_0x350544){const _0x25c489=a299_0x85c6cc;if(!isRecord(_0x315bdb[_0x25c489(0x27e)]))return;const _0x36e081=_0x315bdb[_0x25c489(0x1c4)],_0x48bb42=_0x315bdb['flowJson'][_0x25c489(0x217)];_0x48bb42!==undefined&&(typeof _0x48bb42!==_0x25c489(0x1bc)||!FLOW_PAGE_MODES[_0x25c489(0x1ea)](_0x48bb42))&&_0x350544['push']({'path':'flowJson.pageMode','message':_0x25c489(0x1c9)+String(_0x48bb42)+'.'});_0x36e081===_0x25c489(0x261)&&_0x48bb42!==undefined&&_0x350544[_0x25c489(0x250)]({'path':'flowJson.pageMode','message':_0x25c489(0x249)});_0x36e081===_0x25c489(0x2ec)&&_0x48bb42===_0x25c489(0x258)&&_0x350544[_0x25c489(0x250)]({'path':_0x25c489(0x2ae),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x36e081===_0x25c489(0x261)||_0x36e081===_0x25c489(0x2ec))&&validateCustomPageNavigation(_0x315bdb,_0x36e081,_0x48bb42,_0x350544);if(_0x36e081!=='FORM_FLOW'||!Array[_0x25c489(0x2b7)](_0x315bdb[_0x25c489(0x27e)]['nodes']))return;_0x315bdb[_0x25c489(0x27e)][_0x25c489(0x18d)][_0x25c489(0x272)]((_0x43786e,_0x551878)=>{const _0xcc8fa=_0x25c489;isRecord(_0x43786e)&&_0x43786e[_0xcc8fa(0x191)]===_0xcc8fa(0x200)&&_0x43786e[_0xcc8fa(0x2dd)]==='HANDLE'&&_0x350544[_0xcc8fa(0x250)]({'path':_0xcc8fa(0x29e)+_0x551878+'].taskMode','message':_0xcc8fa(0x225)});});}function validateCustomPageNavigation(_0x30ff44,_0x59fe04,_0x266bbb,_0x20532a){const _0x260188=a299_0x85c6cc,_0x361751=_0x30ff44[_0x260188(0x27e)]['startPageId'];_0x361751!==undefined&&_0x20532a[_0x260188(0x250)]({'path':_0x260188(0x1c0),'message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x2a7c32=_0x30ff44[_0x260188(0x27e)][_0x260188(0x268)];_0x2a7c32!==undefined&&(typeof _0x2a7c32!=='string'||_0x2a7c32[_0x260188(0x1fd)]()==='')&&_0x20532a[_0x260188(0x250)]({'path':'flowJson.startPath','message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0xc5ff8b=Array[_0x260188(0x2b7)](_0x30ff44[_0x260188(0x27e)][_0x260188(0x18d)])?_0x30ff44[_0x260188(0x27e)][_0x260188(0x18d)]['map']((_0xa00a11,_0x35ae31)=>({'node':_0xa00a11,'index':_0x35ae31}))['filter'](({node:_0x171ce3})=>isRecord(_0x171ce3)&&_0x171ce3[_0x260188(0x28d)]!==undefined):[],_0x10d9ba=_0x2a7c32!==undefined||_0xc5ff8b[_0x260188(0x1cf)]>0x0,_0x16c5f9=_0x266bbb===undefined&&_0x59fe04==='INDEPENDENT_FLOW'?_0x260188(0x1a6):_0x266bbb;_0x10d9ba&&(_0x59fe04!==_0x260188(0x2ec)||_0x16c5f9!=='CUSTOM_PAGE')&&(_0x2a7c32!==undefined&&_0x20532a[_0x260188(0x250)]({'path':'flowJson.startPath','message':_0x260188(0x2cc)}),_0xc5ff8b[_0x260188(0x272)](({index:_0x1f1d43})=>{const _0x1f174b=_0x260188;_0x20532a[_0x1f174b(0x250)]({'path':_0x1f174b(0x29e)+_0x1f1d43+_0x1f174b(0x265),'message':_0x1f174b(0x257)});}));}export async function writeNormalizedFlowConfig(_0x3d4641,_0x1e63f1,_0x42974a={}){const _0x5ea033=a299_0x85c6cc,_0x36deb0=resolve(_0x3d4641),_0x2777c3=_0x36deb0+'.'+process[_0x5ea033(0x20a)]+'.'+randomUUID()+_0x5ea033(0x2a0),_0xe396a5=JSON[_0x5ea033(0x219)](_0x1e63f1,null,0x2)+'\x0a';let _0x34b0ad;try{try{_0x34b0ad=(await stat(_0x36deb0))[_0x5ea033(0x24c)]&0x1ff;}catch{_0x34b0ad=undefined;}await writeFile(_0x2777c3,_0xe396a5,{'encoding':'utf8','flag':'wx','mode':_0x34b0ad??0x1a4});if(_0x34b0ad!==undefined)await chmod(_0x2777c3,_0x34b0ad);_0x42974a[_0x5ea033(0x1ab)]===![]?(await link(_0x2777c3,_0x36deb0),await unlink(_0x2777c3)):await rename(_0x2777c3,_0x36deb0);}finally{await unlink(_0x2777c3)[_0x5ea033(0x1f2)](()=>undefined);}}function validateOuterMetadata(_0x16eb60,_0x4230f3){const _0x26cf9a=a299_0x85c6cc;(typeof _0x16eb60[_0x26cf9a(0x193)]!==_0x26cf9a(0x1bc)||_0x16eb60[_0x26cf9a(0x193)][_0x26cf9a(0x1fd)]()==='')&&_0x4230f3['push']({'path':_0x26cf9a(0x193),'message':_0x26cf9a(0x2c6)});_0x16eb60[_0x26cf9a(0x207)]!==undefined&&typeof _0x16eb60['flowDesc']!==_0x26cf9a(0x1bc)&&_0x4230f3[_0x26cf9a(0x250)]({'path':'flowDesc','message':'flowDesc\x20must\x20be\x20a\x20string.'});if(_0x16eb60[_0x26cf9a(0x1c4)]===undefined||_0x16eb60[_0x26cf9a(0x1c4)]===null)_0x4230f3[_0x26cf9a(0x250)]({'path':'flowType','message':_0x26cf9a(0x1ee)});else(typeof _0x16eb60[_0x26cf9a(0x1c4)]!==_0x26cf9a(0x1bc)||!FLOW_TYPES[_0x26cf9a(0x1ea)](_0x16eb60[_0x26cf9a(0x1c4)]))&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x1c4),'message':_0x26cf9a(0x292)+String(_0x16eb60[_0x26cf9a(0x1c4)])+'.'});_0x16eb60[_0x26cf9a(0x18f)]!==undefined&&typeof _0x16eb60[_0x26cf9a(0x18f)]!==_0x26cf9a(0x1bc)&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x18f),'message':'datasetCode\x20must\x20be\x20a\x20string.'});_0x16eb60['pageIds']===undefined&&_0x16eb60[_0x26cf9a(0x1a1)]!==undefined&&(!Number['isSafeInteger'](_0x16eb60['pageId'])||_0x16eb60[_0x26cf9a(0x1a1)]<=0x0)&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x1a1),'message':_0x26cf9a(0x20c)});if(_0x16eb60['pageIds']!==undefined){if(!Array[_0x26cf9a(0x2b7)](_0x16eb60['pageIds'])||_0x16eb60[_0x26cf9a(0x273)][_0x26cf9a(0x262)](_0x2ba639=>!Number[_0x26cf9a(0x2a5)](_0x2ba639)||_0x2ba639<=0x0))_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x273),'message':_0x26cf9a(0x1ac)});else[...new Set(_0x16eb60[_0x26cf9a(0x273)])][_0x26cf9a(0x1db)](',')[_0x26cf9a(0x1cf)]>0x800&&_0x4230f3['push']({'path':'pageIds','message':'pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.'});_0x16eb60[_0x26cf9a(0x1c4)]===_0x26cf9a(0x2ec)&&Array['isArray'](_0x16eb60[_0x26cf9a(0x273)])&&_0x16eb60[_0x26cf9a(0x273)]['length']>0x0&&_0x4230f3[_0x26cf9a(0x250)]({'path':_0x26cf9a(0x273),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.'});}_0x16eb60[_0x26cf9a(0x1c4)]===_0x26cf9a(0x2ec)&&_0x16eb60[_0x26cf9a(0x18f)]!==undefined&&_0x4230f3[_0x26cf9a(0x250)]({'path':'datasetCode','message':_0x26cf9a(0x25e)}),_0x16eb60[_0x26cf9a(0x1c4)]===_0x26cf9a(0x2ec)&&_0x16eb60['pageIds']===undefined&&_0x16eb60['pageId']!==undefined&&_0x4230f3['push']({'path':'pageId','message':_0x26cf9a(0x270)});}function validateGraph(_0x263738,_0x58715e){const _0x759e43=a299_0x85c6cc;if(!isRecord(_0x263738)){_0x58715e['push']({'path':_0x759e43(0x27e),'message':_0x759e43(0x1cd)});return;}!Array[_0x759e43(0x2b7)](_0x263738[_0x759e43(0x18d)])&&_0x58715e[_0x759e43(0x250)]({'path':_0x759e43(0x1ec),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array['isArray'](_0x263738[_0x759e43(0x228)])&&_0x58715e['push']({'path':_0x759e43(0x188),'message':'edges\x20must\x20be\x20an\x20array.'});Object[_0x759e43(0x22e)]['hasOwnProperty'][_0x759e43(0x1ae)](_0x263738,_0x759e43(0x2a3))&&_0x58715e[_0x759e43(0x250)]({'path':_0x759e43(0x2ea),'message':_0x759e43(0x241)+String(_0x263738[_0x759e43(0x2a3)])+_0x759e43(0x28e)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x4c96f9 of[_0x759e43(0x23e),_0x759e43(0x1f7),_0x759e43(0x215)]){Object[_0x759e43(0x22e)]['hasOwnProperty'][_0x759e43(0x1ae)](_0x263738,_0x4c96f9)&&_0x58715e[_0x759e43(0x250)]({'path':_0x759e43(0x253)+_0x4c96f9,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x759e43(0x2b7)](_0x263738[_0x759e43(0x18d)])||!Array[_0x759e43(0x2b7)](_0x263738['edges']))return;const _0x10991e=new Map(),_0x7e2625=[],_0x560a58=[],_0x511be5=new Map(),_0x1b8c30=new Map(),_0x5d365d=new Set();let _0x44564e=0x0;_0x263738[_0x759e43(0x18d)][_0x759e43(0x272)]((_0x37198f,_0x309971)=>{const _0x311c75=_0x759e43,_0x3d9762=_0x311c75(0x29e)+_0x309971+']';if(!isRecord(_0x37198f)){_0x58715e['push']({'path':_0x3d9762,'message':_0x311c75(0x208)});return;}const _0x374e34=_0x37198f;if(typeof _0x374e34['id']!==_0x311c75(0x1bc)||!BPMN_ID_PATTERN[_0x311c75(0x2d5)](_0x374e34['id']))_0x58715e['push']({'path':_0x3d9762+'.id','message':_0x311c75(0x2e3)});else _0x10991e['has'](_0x374e34['id'])?_0x58715e[_0x311c75(0x250)]({'path':_0x3d9762+_0x311c75(0x22a),'message':_0x311c75(0x29d)+_0x374e34['id']+'.'}):(_0x10991e['set'](_0x374e34['id'],_0x374e34),_0x5d365d[_0x311c75(0x1e7)](_0x374e34['id']));if(!NODE_TYPES[_0x311c75(0x1ea)](_0x374e34[_0x311c75(0x191)]))_0x58715e[_0x311c75(0x250)]({'path':_0x3d9762+_0x311c75(0x2a6),'message':_0x311c75(0x212)+String(_0x374e34[_0x311c75(0x191)])+'.'});else{if(_0x374e34[_0x311c75(0x191)]===_0x311c75(0x1b0))_0x7e2625['push'](_0x374e34['id']);else _0x374e34[_0x311c75(0x191)]==='END'&&_0x560a58[_0x311c75(0x250)](_0x374e34['id']);}_0x374e34['type']===_0x311c75(0x200)&&(_0x374e34[_0x311c75(0x2dd)]===undefined||_0x374e34['taskMode']===_0x311c75(0x200))&&(_0x44564e+=0x1);validateNode(_0x374e34,_0x3d9762,_0x58715e);if(_0x374e34[_0x311c75(0x191)]===_0x311c75(0x1e1)){const _0x16c549=resolveEffectiveResultVariable(_0x374e34[_0x311c75(0x22c)],![]);_0x16c549&&(registerResultVariableOwner(_0x1b8c30,_0x16c549,_0x374e34['id'],_0x58715e),!_0x511be5['has'](_0x16c549)&&_0x511be5[_0x311c75(0x1dc)](_0x16c549,_0x374e34['id']));}if(_0x374e34['type']==='APPROVAL'&&isRecord(_0x374e34[_0x311c75(0x277)])&&_0x374e34[_0x311c75(0x277)][_0x311c75(0x2b5)]===!![]&&_0x374e34[_0x311c75(0x277)][_0x311c75(0x2dc)]===_0x311c75(0x283)){const _0x417a53=resolveEffectiveResultVariable(_0x374e34[_0x311c75(0x277)]['resultVariable'],!![]);_0x417a53&®isterResultVariableOwner(_0x1b8c30,_0x417a53,_0x374e34['id']+'.timeout',_0x58715e);}});_0x7e2625[_0x759e43(0x1cf)]!==0x1&&_0x58715e[_0x759e43(0x250)]({'path':'flowJson.nodes','message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x560a58[_0x759e43(0x1cf)]===0x0&&_0x58715e['push']({'path':_0x759e43(0x1ec),'message':_0x759e43(0x282)});const _0x49733b=new Map(),_0x38e512=new Map(),_0x1c4be2=new Map(),_0x24905=new Set();_0x263738[_0x759e43(0x228)]['forEach']((_0x82d864,_0x7d13c9)=>{const _0x592d31=_0x759e43,_0x1313b1=_0x592d31(0x20b)+_0x7d13c9+']';if(!isRecord(_0x82d864)){_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1,'message':_0x592d31(0x23c)});return;}const _0x121f73=_0x82d864;_0x1c4be2['set'](_0x121f73,_0x1313b1);const _0x2d0a76=resolveEdgeEndpoint(_0x121f73['source'],_0x121f73[_0x592d31(0x1f5)]),_0x23a2dc=resolveEdgeEndpoint(_0x121f73['target'],_0x121f73[_0x592d31(0x1c7)]);if(!_0x2d0a76)_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+_0x592d31(0x220),'message':_0x592d31(0x211)});if(!_0x23a2dc)_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+_0x592d31(0x21d),'message':_0x592d31(0x18b)});_0x2d0a76&&!_0x10991e[_0x592d31(0x1ea)](_0x2d0a76)&&_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+'.source','message':_0x592d31(0x254)+_0x2d0a76+'.'});_0x23a2dc&&!_0x10991e['has'](_0x23a2dc)&&_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+'.target','message':_0x592d31(0x247)+_0x23a2dc+'.'});if(_0x121f73['id']!==undefined){if(typeof _0x121f73['id']!==_0x592d31(0x1bc)||!BPMN_ID_PATTERN[_0x592d31(0x2d5)](_0x121f73['id']))_0x58715e['push']({'path':_0x1313b1+_0x592d31(0x22a),'message':_0x592d31(0x1b6)});else{if(_0x5d365d['has'](_0x121f73['id']))_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1+'.id','message':_0x592d31(0x244)+_0x121f73['id']+'.'});else!_0x5d365d[_0x592d31(0x1ea)](_0x121f73['id'])&&_0x5d365d[_0x592d31(0x1e7)](_0x121f73['id']);}}if(_0x2d0a76&&_0x23a2dc){const _0x58de1f=_0x2d0a76+'\x00'+_0x23a2dc+'\x00'+(_0x121f73['conditionType']??_0x592d31(0x19b));_0x24905[_0x592d31(0x1ea)](_0x58de1f)?_0x58715e[_0x592d31(0x250)]({'path':_0x1313b1,'message':_0x592d31(0x27b)+_0x2d0a76+_0x592d31(0x210)+_0x23a2dc+'\x20('+(_0x121f73['conditionType']??_0x592d31(0x19b))+').'}):_0x24905[_0x592d31(0x1e7)](_0x58de1f);}validateEdge(_0x121f73,_0x1313b1,_0x58715e),_0x2d0a76&&_0x23a2dc&&(_0x49733b[_0x592d31(0x291)](_0x2d0a76)?.[_0x592d31(0x250)](_0x121f73)??_0x49733b[_0x592d31(0x1dc)](_0x2d0a76,[_0x121f73]),_0x38e512['get'](_0x23a2dc)?.[_0x592d31(0x250)](_0x121f73)??_0x38e512[_0x592d31(0x1dc)](_0x23a2dc,[_0x121f73]));});if(_0x7e2625[_0x759e43(0x1cf)]!==0x1)return;validateGraphShape(_0x10991e,_0x7e2625[0x0],_0x560a58,_0x49733b,_0x38e512,_0x1c4be2,_0x58715e),validateScriptResultReferences(_0x10991e,_0x7e2625[0x0],_0x49733b,_0x38e512,_0x1c4be2,_0x511be5,_0x58715e),validateApprovalResults(_0x10991e,_0x44564e,_0x560a58,_0x58715e);}function validateNode(_0x30fe1f,_0xd311a4,_0x27c62a){const _0x3fa573=a299_0x85c6cc;for(const _0x18862d of[_0x3fa573(0x276),_0x3fa573(0x2a7)]){Object[_0x3fa573(0x22e)][_0x3fa573(0x1bd)][_0x3fa573(0x1ae)](_0x30fe1f,_0x18862d)&&_0x27c62a['push']({'path':_0xd311a4+'.'+_0x18862d,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x3fa573(0x1ea)](_0x30fe1f[_0x3fa573(0x191)]))return;(typeof _0x30fe1f['name']!==_0x3fa573(0x1bc)||_0x30fe1f[_0x3fa573(0x19c)][_0x3fa573(0x1fd)]()==='')&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x2db),'message':_0x3fa573(0x26c)});_0x30fe1f['pageId']!==undefined&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x1fb),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x30fe1f['path']!==undefined){if(typeof _0x30fe1f['path']!==_0x3fa573(0x1bc)||_0x30fe1f[_0x3fa573(0x28d)][_0x3fa573(0x1fd)]()==='')_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2e0),'message':_0x3fa573(0x1c5)});else _0x30fe1f[_0x3fa573(0x191)]!==_0x3fa573(0x200)&&_0x30fe1f[_0x3fa573(0x191)]!==_0x3fa573(0x1d9)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2e0),'message':_0x3fa573(0x2d2)});}const _0x48cbef=_0x30fe1f[_0x3fa573(0x240)];if(!isRecord(_0x48cbef))_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x27c),'message':'Every\x20node\x20requires\x20position.x\x20and\x20position.y.'});else for(const _0x4a06be of['x','y']){const _0x437473=_0x48cbef[_0x4a06be];(typeof _0x437473!==_0x3fa573(0x2c2)||!Number[_0x3fa573(0x26e)](_0x437473)||_0x437473<0x0)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x255)+_0x4a06be,'message':_0x3fa573(0x1c1)+_0x4a06be+_0x3fa573(0x2e8)});}if(_0x30fe1f[_0x3fa573(0x191)]===_0x3fa573(0x200)){const _0xd871b3=_0x30fe1f[_0x3fa573(0x1b3)]??_0x3fa573(0x2eb),_0x44a24a=_0x30fe1f['taskMode']??'APPROVAL';!APPROVAL_TASK_MODES[_0x3fa573(0x1ea)](_0x44a24a)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+'.taskMode','message':_0x3fa573(0x1de)+String(_0x44a24a)+'.'});!APPROVAL_MODES['has'](_0xd871b3)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x245),'message':_0x3fa573(0x27f)+String(_0xd871b3)+'.'});if(!isRecord(_0x30fe1f[_0x3fa573(0x2ab)]))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x23f),'message':_0x3fa573(0x2ed)});else{const _0x2354a9=_0x30fe1f['assignee'][_0x3fa573(0x22f)];_0x2354a9!=='FIXED'&&_0x2354a9!==_0x3fa573(0x2e1)&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x189),'message':_0x3fa573(0x28f)});if(_0x2354a9===_0x3fa573(0x263)){const _0xc4c55d=_0x30fe1f['assignee'][_0x3fa573(0x21e)];if(!Array[_0x3fa573(0x2b7)](_0xc4c55d)||_0xc4c55d['length']===0x0)_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x198),'message':_0x3fa573(0x227)});else{const _0x4c44ec=_0xc4c55d[_0x3fa573(0x1d4)](_0x335ecf=>!isValidUserId(_0x335ecf));_0x4c44ec>=0x0&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x199)+_0x4c44ec+']','message':_0x3fa573(0x1ca)});const _0x2aab0d=new Set(_0xc4c55d[_0x3fa573(0x237)](isValidUserId)[_0x3fa573(0x1ed)](_0x21c590=>String(_0x21c590)[_0x3fa573(0x1fd)]()));_0xd871b3===_0x3fa573(0x2eb)&&_0x2aab0d['size']>0x1&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x198),'message':_0x3fa573(0x2b6)});}}if(_0x2354a9==='ROLE'){const _0x3591b0=_0x30fe1f['assignee'][_0x3fa573(0x281)],_0x2b713a=typeof _0x3591b0===_0x3fa573(0x2c2)||typeof _0x3591b0===_0x3fa573(0x1bc)?Number(String(_0x3591b0)[_0x3fa573(0x1fd)]()):Number[_0x3fa573(0x280)];(!Number[_0x3fa573(0x2a5)](_0x2b713a)||_0x2b713a<=0x0)&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2c9),'message':_0x3fa573(0x19a)});}}if(_0x30fe1f[_0x3fa573(0x288)]!==undefined){if(!isRecord(_0x30fe1f[_0x3fa573(0x288)]))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x275),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x30fe1f[_0x3fa573(0x288)][_0x3fa573(0x22f)]!==_0x3fa573(0x263))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x1e2),'message':_0x3fa573(0x2d9)});else{const _0x568ae6=_0x30fe1f['transferCandidates'][_0x3fa573(0x21e)];if(!Array[_0x3fa573(0x2b7)](_0x568ae6)||_0x568ae6[_0x3fa573(0x1cf)]===0x0)_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x2d7),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x3ab2fb=_0x568ae6[_0x3fa573(0x1d4)](_0x4c7a20=>!isValidUserId(_0x4c7a20));_0x3ab2fb>=0x0&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+'.transferCandidates.userIds['+_0x3ab2fb+']','message':_0x3fa573(0x290)});}}}}}_0x30fe1f[_0x3fa573(0x1be)]!==undefined&&typeof _0x30fe1f['sequential']!=='boolean'&&_0x27c62a['push']({'path':_0xd311a4+_0x3fa573(0x295),'message':_0x3fa573(0x1ad)});if(_0x30fe1f[_0x3fa573(0x191)]===_0x3fa573(0x1e1)){(typeof _0x30fe1f[_0x3fa573(0x2b3)]!==_0x3fa573(0x1bc)||_0x30fe1f['scriptName'][_0x3fa573(0x1fd)]()==='')&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x234),'message':_0x3fa573(0x1d8)});if(_0x30fe1f[_0x3fa573(0x22c)]!==undefined){if(typeof _0x30fe1f['resultVariable']!==_0x3fa573(0x1bc)||!VARIABLE_PATTERN[_0x3fa573(0x2d5)](_0x30fe1f[_0x3fa573(0x22c)]))_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+'.resultVariable','message':_0x3fa573(0x278)});else(RESERVED_RESULT_VARIABLES[_0x3fa573(0x1ea)](_0x30fe1f['resultVariable'])||_0x30fe1f[_0x3fa573(0x22c)]['startsWith'](_0x3fa573(0x25c)))&&_0x27c62a[_0x3fa573(0x250)]({'path':_0xd311a4+_0x3fa573(0x1d2),'message':_0x3fa573(0x299)+_0x30fe1f[_0x3fa573(0x22c)]+'.'});}}validateAsyncExecution(_0x30fe1f,_0xd311a4,_0x27c62a),validateApprovalTimeout(_0x30fe1f,_0xd311a4,_0x27c62a),validateCcConfig(_0x30fe1f,_0xd311a4,_0x27c62a),_0x30fe1f[_0x3fa573(0x191)]===_0x3fa573(0x2e7)&&validateNotificationConfig(_0x30fe1f[_0x3fa573(0x2df)],_0xd311a4+_0x3fa573(0x2ba),_0x27c62a);}function validateAsyncExecution(_0x183344,_0x18b944,_0x1daca6){const _0x568414=a299_0x85c6cc;if(_0x183344[_0x568414(0x293)]===undefined)return;if(!isRecord(_0x183344[_0x568414(0x293)])){_0x1daca6[_0x568414(0x250)]({'path':_0x18b944+_0x568414(0x21f),'message':_0x568414(0x2b2)});return;}if(_0x183344['async']['enabled']!==undefined&&typeof _0x183344[_0x568414(0x293)][_0x568414(0x2b5)]!==_0x568414(0x298)){_0x1daca6[_0x568414(0x250)]({'path':_0x18b944+_0x568414(0x28b),'message':_0x568414(0x2e9)});return;}if(_0x183344[_0x568414(0x293)][_0x568414(0x2b5)]!==!![])return;_0x183344[_0x568414(0x191)]!==_0x568414(0x1e1)&&_0x1daca6['push']({'path':_0x18b944+_0x568414(0x21f),'message':_0x568414(0x242)});const _0x243762=_0x183344[_0x568414(0x293)][_0x568414(0x223)]??0x3;(!Number[_0x568414(0x25f)](_0x243762)||_0x243762<0x1||_0x243762>MAX_ASYNC_RETRY_COUNT)&&_0x1daca6['push']({'path':_0x18b944+_0x568414(0x1a9),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0x183344[_0x568414(0x293)][_0x568414(0x260)]!==undefined&&validateTimeAmount(_0x183344[_0x568414(0x293)][_0x568414(0x260)],_0x18b944+_0x568414(0x1fa),_0x1daca6);}function validateApprovalTimeout(_0x3241b8,_0x234091,_0x15a4d0){const _0x36ae36=a299_0x85c6cc;if(_0x3241b8[_0x36ae36(0x277)]===undefined)return;if(!isRecord(_0x3241b8[_0x36ae36(0x277)])){_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x2ad),'message':_0x36ae36(0x1f6)});return;}if(_0x3241b8['timeout']['enabled']!==undefined&&typeof _0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b5)]!=='boolean'){_0x15a4d0['push']({'path':_0x234091+'.timeout.enabled','message':_0x36ae36(0x274)});return;}if(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b5)]!==!![])return;if(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x1e3)]!==undefined&&typeof _0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x1e3)]!==_0x36ae36(0x298)){_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x264),'message':_0x36ae36(0x235)});return;}_0x3241b8[_0x36ae36(0x191)]!==_0x36ae36(0x200)&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x2ad),'message':_0x36ae36(0x29c)});validateTimeAmount(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x21b)],_0x234091+_0x36ae36(0x221),_0x15a4d0);const _0x475f33=_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2dc)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x36ae36(0x1ea)](_0x475f33)){_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x1d1),'message':_0x36ae36(0x194)});return;}(_0x3241b8['taskMode']??_0x36ae36(0x200))===_0x36ae36(0x1e0)&&_0x475f33!==_0x36ae36(0x283)&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x1d1),'message':_0x36ae36(0x27d)});const _0x48130b=_0x3241b8[_0x36ae36(0x277)]['interrupting']??_0x475f33!==_0x36ae36(0x283);if(_0x475f33===_0x36ae36(0x283))_0x48130b&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x264),'message':_0x36ae36(0x1dd)}),(typeof _0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b3)]!==_0x36ae36(0x1bc)||_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x2b3)][_0x36ae36(0x1fd)]()==='')&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x284),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x3241b8[_0x36ae36(0x277)][_0x36ae36(0x22c)],_0x234091+_0x36ae36(0x222),_0x15a4d0);else!_0x48130b&&_0x15a4d0[_0x36ae36(0x250)]({'path':_0x234091+_0x36ae36(0x264),'message':_0x475f33+'\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.'});}function validateTimeAmount(_0xa317ea,_0x55cbb3,_0x2bfaa7){const _0x47f744=a299_0x85c6cc;if(!isRecord(_0xa317ea)){_0x2bfaa7[_0x47f744(0x250)]({'path':_0x55cbb3,'message':_0x47f744(0x248)});return;}(!Number['isInteger'](_0xa317ea['value'])||Number(_0xa317ea[_0x47f744(0x28a)])<=0x0)&&_0x2bfaa7[_0x47f744(0x250)]({'path':_0x55cbb3+_0x47f744(0x1da),'message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x47f744(0x1ea)](_0xa317ea[_0x47f744(0x252)])&&_0x2bfaa7[_0x47f744(0x250)]({'path':_0x55cbb3+_0x47f744(0x209),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x12c9ef,_0x434bd6,_0x3b14a8){const _0x422040=a299_0x85c6cc;if(_0x12c9ef===undefined||_0x12c9ef===null||_0x12c9ef==='')return;if(typeof _0x12c9ef!==_0x422040(0x1bc)||!VARIABLE_PATTERN['test'](_0x12c9ef))_0x3b14a8[_0x422040(0x250)]({'path':_0x434bd6,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x422040(0x1ea)](_0x12c9ef)||_0x12c9ef[_0x422040(0x2a2)]('approval_sys_'))&&_0x3b14a8[_0x422040(0x250)]({'path':_0x434bd6,'message':_0x422040(0x299)+_0x12c9ef+'.'});}function validateCcConfig(_0x3f04e0,_0x55c087,_0x2b22e8){const _0x576630=a299_0x85c6cc;if(_0x3f04e0['cc']===undefined)return;if(!isRecord(_0x3f04e0['cc'])){_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x2e4),'message':_0x576630(0x1b4)});return;}_0x3f04e0[_0x576630(0x191)]!==_0x576630(0x1d9)&&_0x3f04e0[_0x576630(0x191)]!==_0x576630(0x200)&&_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x2e4),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x576630(0x22e)][_0x576630(0x1bd)][_0x576630(0x1ae)](_0x3f04e0['cc'],_0x576630(0x2a9))&&_0x2b22e8['push']({'path':_0x55c087+_0x576630(0x202),'message':UNSUPPORTED_FORM_MESSAGE});const _0xe660d1=_0x3f04e0['cc'][_0x576630(0x287)];if(!Array[_0x576630(0x2b7)](_0xe660d1)||_0xe660d1[_0x576630(0x1cf)]===0x0)_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x26d),'message':_0x576630(0x18e)});else{_0xe660d1['length']>MAX_CC_RECIPIENTS&&_0x2b22e8[_0x576630(0x250)]({'path':_0x55c087+_0x576630(0x26d),'message':_0x576630(0x22b)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x2d3ffc=new Set();_0xe660d1[_0x576630(0x272)]((_0x2020da,_0x2e9f11)=>{const _0x751727=_0x576630;if(typeof _0x2020da!=='string'||_0x2020da[_0x751727(0x1fd)]()==='')_0x2b22e8[_0x751727(0x250)]({'path':_0x55c087+'.cc.recipientUserIds['+_0x2e9f11+']','message':_0x751727(0x2c4)});else _0x2d3ffc[_0x751727(0x1ea)](_0x2020da[_0x751727(0x1fd)]())?_0x2b22e8[_0x751727(0x250)]({'path':_0x55c087+_0x751727(0x2a1)+_0x2e9f11+']','message':_0x751727(0x1b8)+_0x2020da['trim']()+'.'}):_0x2d3ffc['add'](_0x2020da[_0x751727(0x1fd)]());});}validateStringArray(_0x3f04e0['cc']['visible'],_0x55c087+_0x576630(0x197),_0x2b22e8);}function validateStringArray(_0x25179d,_0x58bfaf,_0xa1aaf8){const _0x4cb2ec=a299_0x85c6cc;if(_0x25179d===undefined)return;if(!Array[_0x4cb2ec(0x2b7)](_0x25179d)){_0xa1aaf8[_0x4cb2ec(0x250)]({'path':_0x58bfaf,'message':_0x4cb2ec(0x19e)});return;}const _0x164f9d=new Set();_0x25179d[_0x4cb2ec(0x272)]((_0x1f5e9f,_0x49a3e1)=>{const _0x18620e=_0x4cb2ec;if(typeof _0x1f5e9f!==_0x18620e(0x1bc)||_0x1f5e9f[_0x18620e(0x1fd)]()==='')_0xa1aaf8[_0x18620e(0x250)]({'path':_0x58bfaf+'['+_0x49a3e1+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x164f9d['has'](_0x1f5e9f[_0x18620e(0x1fd)]())?_0xa1aaf8[_0x18620e(0x250)]({'path':_0x58bfaf+'['+_0x49a3e1+']','message':_0x18620e(0x29f)+_0x1f5e9f[_0x18620e(0x1fd)]()+'.'}):_0x164f9d['add'](_0x1f5e9f[_0x18620e(0x1fd)]());});}function validateNotificationConfig(_0x1d2834,_0x45ea8b,_0x42818e){const _0x51cad5=a299_0x85c6cc;if(!isRecord(_0x1d2834)){_0x42818e['push']({'path':_0x45ea8b,'message':_0x51cad5(0x2bd)});return;}if(_0x1d2834[_0x51cad5(0x2b4)]!==undefined&&_0x1d2834['version']!==null){if(typeof _0x1d2834[_0x51cad5(0x2b4)]!=='string')_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+'.version','message':_0x51cad5(0x2ca)});else _0x1d2834[_0x51cad5(0x2b4)][_0x51cad5(0x1fd)]()&&_0x1d2834[_0x51cad5(0x2b4)][_0x51cad5(0x1fd)]()!=='v1'&&_0x42818e['push']({'path':_0x45ea8b+_0x51cad5(0x1b1),'message':'Unsupported\x20notification\x20version:\x20'+_0x1d2834[_0x51cad5(0x2b4)]+'.'});}const _0x3b3f14=requireNotificationString(_0x1d2834['configCode'],_0x45ea8b+_0x51cad5(0x23b),_0x51cad5(0x2d1),_0x42818e);_0x3b3f14?.['includes']('${')&&_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+'.configCode','message':_0x51cad5(0x2b9)});if(_0x1d2834[_0x51cad5(0x25a)]!==undefined&&_0x1d2834[_0x51cad5(0x25a)]!==null){if(typeof _0x1d2834[_0x51cad5(0x25a)]!=='string')_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+_0x51cad5(0x1ef),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x51cad5(0x1ea)](_0x1d2834[_0x51cad5(0x25a)][_0x51cad5(0x1fd)]()[_0x51cad5(0x1a5)]())&&_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+_0x51cad5(0x1ef),'message':_0x51cad5(0x2b8)});}!isRecord(_0x1d2834[_0x51cad5(0x1f8)])?_0x42818e[_0x51cad5(0x250)]({'path':_0x45ea8b+'.template','message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x1d2834[_0x51cad5(0x1f8)],_0x45ea8b+'.template',_0x42818e),validateNotificationRecipients(_0x1d2834['recipients'],_0x45ea8b+'.recipients',_0x42818e);}function validateNotificationTemplate(_0x10ac58,_0x427007,_0x265052){const _0xbf836=a299_0x85c6cc;for(const _0x469e30 of[_0xbf836(0x24d),_0xbf836(0x1a0)]){const _0x5c6771=requireNotificationString(_0x10ac58[_0x469e30],_0x427007+'.'+_0x469e30,_0xbf836(0x1f9)+_0x469e30+_0xbf836(0x1d5),_0x265052);if(_0x5c6771)validateNotificationPlaceholders(_0x5c6771,_0x427007+'.'+_0x469e30,_0x265052);}_0x10ac58[_0xbf836(0x2be)]!==undefined&&_0x10ac58['detailMarkdown']!==null&&(typeof _0x10ac58['detailMarkdown']!=='string'?_0x265052[_0xbf836(0x250)]({'path':_0x427007+'.detailMarkdown','message':_0xbf836(0x2d0)}):validateNotificationPlaceholders(_0x10ac58[_0xbf836(0x2be)],_0x427007+_0xbf836(0x226),_0x265052)),validateNotificationFacts(_0x10ac58[_0xbf836(0x19d)],_0x427007+_0xbf836(0x238),_0x265052),validateNotificationActions(_0x10ac58[_0xbf836(0x2ee)],_0x427007+_0xbf836(0x285),_0x265052);}function validateNotificationFacts(_0x32d064,_0x34dfa2,_0x4b7c85){const _0x2973d5=a299_0x85c6cc;if(_0x32d064===undefined||_0x32d064===null)return;if(!Array['isArray'](_0x32d064)){_0x4b7c85[_0x2973d5(0x250)]({'path':_0x34dfa2,'message':_0x2973d5(0x1b2)});return;}_0x32d064[_0x2973d5(0x1cf)]>MAX_NOTIFICATION_FACTS&&_0x4b7c85[_0x2973d5(0x250)]({'path':_0x34dfa2,'message':_0x2973d5(0x28c)+MAX_NOTIFICATION_FACTS+_0x2973d5(0x269)}),_0x32d064[_0x2973d5(0x272)]((_0x51f82f,_0x5a0a01)=>{const _0x1ee1e=_0x2973d5,_0x2bc8d1=_0x34dfa2+'['+_0x5a0a01+']';if(!isRecord(_0x51f82f)){_0x4b7c85[_0x1ee1e(0x250)]({'path':_0x2bc8d1,'message':_0x1ee1e(0x25b)});return;}for(const _0x833fb of[_0x1ee1e(0x192),_0x1ee1e(0x28a)]){const _0x19f452=requireNotificationString(_0x51f82f[_0x833fb],_0x2bc8d1+'.'+_0x833fb,_0x1ee1e(0x213)+_0x833fb+_0x1ee1e(0x1d5),_0x4b7c85);_0x19f452&&validateNotificationPlaceholders(_0x19f452,_0x2bc8d1+'.'+_0x833fb,_0x4b7c85);}});}function validateNotificationActions(_0x31a52e,_0x56a61d,_0xcf2cce){const _0x5e5cea=a299_0x85c6cc;if(_0x31a52e===undefined||_0x31a52e===null)return;if(!Array[_0x5e5cea(0x2b7)](_0x31a52e)){_0xcf2cce[_0x5e5cea(0x250)]({'path':_0x56a61d,'message':_0x5e5cea(0x1cb)});return;}_0x31a52e['length']>MAX_NOTIFICATION_ACTIONS&&_0xcf2cce[_0x5e5cea(0x250)]({'path':_0x56a61d,'message':_0x5e5cea(0x28c)+MAX_NOTIFICATION_ACTIONS+_0x5e5cea(0x1a8)}),_0x31a52e[_0x5e5cea(0x272)]((_0x5ab1c7,_0x3a5aea)=>{const _0x160267=_0x5e5cea,_0xc16511=_0x56a61d+'['+_0x3a5aea+']';if(!isRecord(_0x5ab1c7)){_0xcf2cce['push']({'path':_0xc16511,'message':_0x160267(0x216)});return;}const _0x238dca=requireNotificationString(_0x5ab1c7[_0x160267(0x2b1)],_0xc16511+_0x160267(0x2d3),'Notification\x20action.text\x20is\x20required.',_0xcf2cce);if(_0x238dca)validateNotificationPlaceholders(_0x238dca,_0xc16511+_0x160267(0x2d3),_0xcf2cce);const _0x4ab284=requireNotificationString(_0x5ab1c7[_0x160267(0x206)],_0xc16511+_0x160267(0x1bf),'Notification\x20action.url\x20is\x20required.',_0xcf2cce);if(!_0x4ab284)return;validateNotificationPlaceholders(_0x4ab284,_0xc16511+_0x160267(0x1bf),_0xcf2cce),!/^https?:\/\//i[_0x160267(0x2d5)](_0x4ab284)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x160267(0x2d5)](_0x4ab284)&&_0xcf2cce[_0x160267(0x250)]({'path':_0xc16511+_0x160267(0x1bf),'message':_0x160267(0x196)});});}function validateNotificationRecipients(_0x17c640,_0x513bce,_0x114440){const _0x4ed102=a299_0x85c6cc;if(_0x17c640===undefined||_0x17c640===null)return;if(!Array['isArray'](_0x17c640)){_0x114440['push']({'path':_0x513bce,'message':_0x4ed102(0x19f)});return;}let _0x5a5445=![];_0x17c640[_0x4ed102(0x272)]((_0x1d565c,_0x190a5e)=>{const _0x5d3c21=_0x4ed102,_0x38d203=_0x513bce+'['+_0x190a5e+']';if(!isRecord(_0x1d565c)){_0x114440[_0x5d3c21(0x250)]({'path':_0x38d203,'message':_0x5d3c21(0x1ba)});return;}const _0x3db5ef=requireNotificationString(_0x1d565c[_0x5d3c21(0x191)],_0x38d203+_0x5d3c21(0x2a6),'Notification\x20recipient.type\x20is\x20required.',_0x114440);_0x3db5ef&&!NOTIFICATION_RECIPIENT_TYPES[_0x5d3c21(0x1ea)](_0x3db5ef['toUpperCase']())&&_0x114440[_0x5d3c21(0x250)]({'path':_0x38d203+'.type','message':_0x5d3c21(0x1eb)});let _0x293bad='TO';_0x1d565c[_0x5d3c21(0x1b7)]!==undefined&&_0x1d565c[_0x5d3c21(0x1b7)]!==null&&(typeof _0x1d565c[_0x5d3c21(0x1b7)]!=='string'?(_0x114440[_0x5d3c21(0x250)]({'path':_0x38d203+'.role','message':_0x5d3c21(0x201)}),_0x293bad=''):(_0x293bad=_0x1d565c['role'][_0x5d3c21(0x1fd)]()[_0x5d3c21(0x1a5)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x293bad)&&_0x114440['push']({'path':_0x38d203+_0x5d3c21(0x243),'message':_0x5d3c21(0x21a)})));if(_0x293bad==='TO')_0x5a5445=!![];const _0x3754aa=requireNotificationString(_0x1d565c[_0x5d3c21(0x28a)],_0x38d203+_0x5d3c21(0x1da),_0x5d3c21(0x2af),_0x114440);_0x3754aa&&validateNotificationPlaceholders(_0x3754aa,_0x38d203+_0x5d3c21(0x1da),_0x114440);}),_0x17c640[_0x4ed102(0x1cf)]>0x0&&!_0x5a5445&&_0x114440[_0x4ed102(0x250)]({'path':_0x513bce,'message':_0x4ed102(0x2bb)});}function requireNotificationString(_0x3c5e89,_0x189d3c,_0x1ff43f,_0x1ec7a9){const _0x1efb93=a299_0x85c6cc;if(typeof _0x3c5e89!=='string'||_0x3c5e89[_0x1efb93(0x1fd)]()==='')return _0x1ec7a9['push']({'path':_0x189d3c,'message':_0x1ff43f}),undefined;return _0x3c5e89['trim']();}function validateNotificationPlaceholders(_0x44f653,_0x5e234b,_0x4f399d){const _0x427ef0=a299_0x85c6cc;for(const _0x21d2e5 of _0x44f653[_0x427ef0(0x1c3)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x14af57=_0x21d2e5[0x1]?.[_0x427ef0(0x1fd)]()??'',_0x181442=_0x14af57[_0x427ef0(0x20d)]('.'),_0x3fd0c3=_0x181442>=0x0?_0x14af57[_0x427ef0(0x1df)](0x0,_0x181442):_0x14af57,_0x135bf0=_0x181442>=0x0?_0x14af57[_0x427ef0(0x1df)](_0x181442+0x1)[_0x427ef0(0x1fd)]():'';(![_0x427ef0(0x2e5),_0x427ef0(0x297),'variables'][_0x427ef0(0x2c5)](_0x3fd0c3)||_0x135bf0==='')&&_0x4f399d[_0x427ef0(0x250)]({'path':_0x5e234b,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x21d2e5[0x0]+'.'});}_0x44f653[_0x427ef0(0x251)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x4f399d[_0x427ef0(0x250)]({'path':_0x5e234b,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x213596,_0x4e8532,_0x392417){const _0xbfdfb6=a299_0x85c6cc;_0x213596['name']!==undefined&&typeof _0x213596['name']!==_0xbfdfb6(0x1bc)&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x2db),'message':_0xbfdfb6(0x1fe)}),_0x213596[_0xbfdfb6(0x2c0)]!==undefined&&typeof _0x213596['defaultFlow']!==_0xbfdfb6(0x298)&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x23a),'message':_0xbfdfb6(0x214)}),_0x213596[_0xbfdfb6(0x2d8)]!==undefined&&(!Array[_0xbfdfb6(0x2b7)](_0x213596[_0xbfdfb6(0x2d8)])?_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x2ac),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x213596['waypoints'][_0xbfdfb6(0x272)]((_0x132f10,_0x54722b)=>{const _0x2f563e=_0xbfdfb6;if(!isRecord(_0x132f10)){_0x392417[_0x2f563e(0x250)]({'path':_0x4e8532+_0x2f563e(0x231)+_0x54722b+']','message':_0x2f563e(0x20e)});return;}for(const _0x2ecda3 of['x','y']){const _0x235149=_0x132f10[_0x2ecda3];(typeof _0x235149!==_0x2f563e(0x2c2)||!Number[_0x2f563e(0x26e)](_0x235149))&&_0x392417['push']({'path':_0x4e8532+_0x2f563e(0x231)+_0x54722b+'].'+_0x2ecda3,'message':_0x2f563e(0x25d)+_0x2ecda3+_0x2f563e(0x2d4)});}})),_0x213596[_0xbfdfb6(0x26b)]!==undefined&&!CONDITION_TYPES[_0xbfdfb6(0x1ea)](_0x213596[_0xbfdfb6(0x26b)])&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x24b),'message':_0xbfdfb6(0x239)+String(_0x213596[_0xbfdfb6(0x26b)])+'.'}),_0x213596['conditionType']===_0xbfdfb6(0x246)&&(typeof _0x213596[_0xbfdfb6(0x1b9)]!==_0xbfdfb6(0x1bc)||_0x213596[_0xbfdfb6(0x1b9)][_0xbfdfb6(0x1fd)]()==='')&&_0x392417[_0xbfdfb6(0x250)]({'path':_0x4e8532+_0xbfdfb6(0x2cb),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x213596[_0xbfdfb6(0x2c0)]===!![]&&_0x213596[_0xbfdfb6(0x26b)]!=='ALWAYS'&&_0x392417['push']({'path':_0x4e8532+_0xbfdfb6(0x23a),'message':_0xbfdfb6(0x1c2)}),_0x213596[_0xbfdfb6(0x2c0)]===!![]&&typeof _0x213596[_0xbfdfb6(0x1b9)]===_0xbfdfb6(0x1bc)&&_0x213596[_0xbfdfb6(0x1b9)][_0xbfdfb6(0x1fd)]()!==''&&_0x392417['push']({'path':_0x4e8532+_0xbfdfb6(0x2cb),'message':_0xbfdfb6(0x279)});}function validateGraphShape(_0x541ab,_0x46c4d2,_0x376dee,_0x4a1dcd,_0x4f85b9,_0x3547c5,_0x52005a){const _0x45cfb8=a299_0x85c6cc;for(const [_0x1d3e3d,_0xd62a34]of _0x541ab){const _0xe447b8=_0x4f85b9[_0x45cfb8(0x291)](_0x1d3e3d)??[],_0x5d110f=_0x4a1dcd[_0x45cfb8(0x291)](_0x1d3e3d)??[];_0xd62a34[_0x45cfb8(0x191)]!==_0x45cfb8(0x1b0)&&_0xe447b8['length']===0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x204)});_0xd62a34[_0x45cfb8(0x191)]!==_0x45cfb8(0x1d9)&&_0x5d110f[_0x45cfb8(0x1cf)]===0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':'flowJson.nodes.'+_0x1d3e3d,'message':_0x45cfb8(0x1d6)});_0xd62a34[_0x45cfb8(0x191)]===_0x45cfb8(0x1b0)&&_0xe447b8[_0x45cfb8(0x1cf)]>0x0&&_0x52005a['push']({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0xd62a34[_0x45cfb8(0x191)]===_0x45cfb8(0x1d9)&&_0x5d110f[_0x45cfb8(0x1cf)]>0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x1e4)});if(_0xd62a34[_0x45cfb8(0x191)]===_0x45cfb8(0x1d0)){_0x5d110f[_0x45cfb8(0x1cf)]<0x2&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x5d93da=_0x5d110f[_0x45cfb8(0x237)](_0x187ddc=>_0x187ddc['defaultFlow']===!![]);_0x5d93da[_0x45cfb8(0x1cf)]!==0x1&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x26f)});if(_0x5d93da[_0x45cfb8(0x1cf)]===0x1){const _0x227c48=_0x5d93da[0x0],_0xa8eed9=_0x3547c5[_0x45cfb8(0x291)](_0x227c48)??_0x45cfb8(0x188);_0x227c48[_0x45cfb8(0x26b)]!==_0x45cfb8(0x19b)&&_0x52005a[_0x45cfb8(0x250)]({'path':_0xa8eed9+_0x45cfb8(0x24b),'message':_0x45cfb8(0x1e8)});_0x227c48[_0x45cfb8(0x1b9)]!==undefined&&_0x52005a[_0x45cfb8(0x250)]({'path':_0xa8eed9+_0x45cfb8(0x2cb),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x4194d3 of _0x5d110f){if(_0x4194d3===_0x227c48)continue;const _0x3b796f=_0x3547c5[_0x45cfb8(0x291)](_0x4194d3)??_0x45cfb8(0x188);if(_0x4194d3[_0x45cfb8(0x26b)]!=='EXPRESSION')_0x52005a[_0x45cfb8(0x250)]({'path':_0x3b796f+'.conditionType','message':_0x45cfb8(0x2a4)});else(typeof _0x4194d3[_0x45cfb8(0x1b9)]!==_0x45cfb8(0x1bc)||_0x4194d3['expression'][_0x45cfb8(0x1fd)]()==='')&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x3b796f+_0x45cfb8(0x2cb),'message':_0x45cfb8(0x1fc)});}}}if(_0xd62a34['type']==='APPROVAL'&&(_0xd62a34[_0x45cfb8(0x2dd)]??_0x45cfb8(0x200))===_0x45cfb8(0x1e0)){if(_0x5d110f[_0x45cfb8(0x1cf)]!==0x1)_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x316cdf=_0x5d110f[0x0];((_0x316cdf[_0x45cfb8(0x26b)]??_0x45cfb8(0x19b))!=='ALWAYS'||_0x316cdf[_0x45cfb8(0x2c0)]===!![]||typeof _0x316cdf['expression']==='string'&&_0x316cdf['expression'][_0x45cfb8(0x1fd)]()!=='')&&_0x52005a['push']({'path':_0x3547c5[_0x45cfb8(0x291)](_0x316cdf)??_0x45cfb8(0x188),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0xd62a34['type']===_0x45cfb8(0x200)){const _0x2e3372=_0x5d110f['map'](_0x1cd120=>_0x1cd120[_0x45cfb8(0x26b)]??_0x45cfb8(0x19b)),_0x21a226=_0x2e3372[_0x45cfb8(0x237)](_0x20d6b9=>_0x20d6b9!==_0x45cfb8(0x1e5)&&_0x20d6b9!==_0x45cfb8(0x24e));_0x21a226['length']>0x0&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x2ce)}),_0x2e3372[_0x45cfb8(0x237)](_0x256122=>_0x256122===_0x45cfb8(0x1e5))[_0x45cfb8(0x1cf)]!==0x1&&_0x52005a[_0x45cfb8(0x250)]({'path':'flowJson.nodes.'+_0x1d3e3d,'message':_0x45cfb8(0x289)}),_0x2e3372[_0x45cfb8(0x237)](_0x3ed10e=>_0x3ed10e===_0x45cfb8(0x24e))[_0x45cfb8(0x1cf)]!==0x1&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x5d110f[_0x45cfb8(0x262)](_0x4a7f39=>_0x4a7f39['defaultFlow']===!![])&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x1d3e3d,'message':_0x45cfb8(0x224)});}}}const _0x30f072=new Set(),_0x4ab9f4=_0x1b6763=>{const _0x46be5d=_0x45cfb8;if(_0x30f072[_0x46be5d(0x1ea)](_0x1b6763))return;_0x30f072[_0x46be5d(0x1e7)](_0x1b6763);for(const _0x26c146 of _0x4a1dcd[_0x46be5d(0x291)](_0x1b6763)??[]){const _0x7bb6bc=resolveEdgeEndpoint(_0x26c146['target'],_0x26c146[_0x46be5d(0x1c7)]);if(_0x7bb6bc&&_0x541ab[_0x46be5d(0x1ea)](_0x7bb6bc))_0x4ab9f4(_0x7bb6bc);}};_0x4ab9f4(_0x46c4d2);for(const _0x594d9d of _0x541ab['keys']()){!_0x30f072[_0x45cfb8(0x1ea)](_0x594d9d)&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x594d9d,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x295052=_0x376dee[_0x45cfb8(0x262)](_0x163306=>_0x30f072[_0x45cfb8(0x1ea)](_0x163306));if(!_0x295052){_0x52005a['push']({'path':_0x45cfb8(0x188),'message':_0x45cfb8(0x22d)});return;}const _0x41528f=new Set(),_0x3d1e40=_0x3c1e0b=>{const _0x37bd10=_0x45cfb8;if(_0x41528f['has'](_0x3c1e0b))return;_0x41528f['add'](_0x3c1e0b);for(const _0x509c38 of _0x4f85b9[_0x37bd10(0x291)](_0x3c1e0b)??[]){const _0x397632=resolveEdgeEndpoint(_0x509c38[_0x37bd10(0x233)],_0x509c38[_0x37bd10(0x1f5)]);if(_0x397632&&_0x541ab[_0x37bd10(0x1ea)](_0x397632))_0x3d1e40(_0x397632);}};for(const _0x42eae4 of _0x376dee){if(_0x541ab['has'](_0x42eae4))_0x3d1e40(_0x42eae4);}for(const _0x424e3f of _0x30f072){!_0x41528f[_0x45cfb8(0x1ea)](_0x424e3f)&&_0x52005a[_0x45cfb8(0x250)]({'path':_0x45cfb8(0x2cf)+_0x424e3f,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0x3f0998,_0x15fedf,_0x1c18f7,_0x3c089d){const _0x34076c=a299_0x85c6cc;if(_0x15fedf===0x0)return;const _0x315cea=new Set(_0x1c18f7[_0x34076c(0x1ed)](_0x1e4340=>_0x3f0998[_0x34076c(0x291)](_0x1e4340)?.['result'])[_0x34076c(0x237)](_0x1cbd6b=>typeof _0x1cbd6b===_0x34076c(0x1bc)));for(const _0x30c8c2 of['APPROVED',_0x34076c(0x24e)]){!_0x315cea[_0x34076c(0x1ea)](_0x30c8c2)&&_0x3c089d[_0x34076c(0x250)]({'path':_0x34076c(0x1ec),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x30c8c2+'.'});}}function validateScriptResultReferences(_0x59fc72,_0x7ff29a,_0x4e7b54,_0x290ccb,_0x5529a1,_0x2661d2,_0x3912cc){const _0x543f3d=a299_0x85c6cc;if(_0x2661d2['size']===0x0)return;const _0x14bda2=new Set(),_0x470403=_0x12483f=>{const _0x3661da=a299_0x3b20;if(!_0x14bda2[_0x3661da(0x1ea)](_0x12483f)&&_0x59fc72['has'](_0x12483f)){_0x14bda2[_0x3661da(0x1e7)](_0x12483f);for(const _0x28ad23 of _0x4e7b54[_0x3661da(0x291)](_0x12483f)??[]){const _0x4553f9=resolveEdgeEndpoint(_0x28ad23['target'],_0x28ad23[_0x3661da(0x1c7)]);if(_0x4553f9)_0x470403(_0x4553f9);}}};_0x470403(_0x7ff29a);const _0xbfc942=new Map();for(const _0x49fb16 of _0x14bda2){_0xbfc942[_0x543f3d(0x1dc)](_0x49fb16,_0x49fb16===_0x7ff29a?new Set([_0x7ff29a]):new Set(_0x14bda2));}let _0x144cfc=!![];while(_0x144cfc){_0x144cfc=![];for(const _0x17c99e of _0x14bda2){if(_0x17c99e===_0x7ff29a)continue;const _0x48255a=(_0x290ccb[_0x543f3d(0x291)](_0x17c99e)??[])[_0x543f3d(0x1ed)](_0x455109=>resolveEdgeEndpoint(_0x455109[_0x543f3d(0x233)],_0x455109[_0x543f3d(0x1f5)]))[_0x543f3d(0x237)](_0x54eebc=>Boolean(_0x54eebc&&_0x14bda2['has'](_0x54eebc)));if(_0x48255a[_0x543f3d(0x1cf)]===0x0)continue;const _0x3993e1=new Set(_0xbfc942['get'](_0x48255a[0x0])??[]);for(const _0x400aa6 of _0x48255a['slice'](0x1)){const _0x3b555d=_0xbfc942['get'](_0x400aa6)??new Set();for(const _0x5644de of _0x3993e1){if(!_0x3b555d['has'](_0x5644de))_0x3993e1[_0x543f3d(0x2c3)](_0x5644de);}}_0x3993e1[_0x543f3d(0x1e7)](_0x17c99e);const _0x391378=_0xbfc942[_0x543f3d(0x291)](_0x17c99e);!setsEqual(_0x391378,_0x3993e1)&&(_0xbfc942[_0x543f3d(0x1dc)](_0x17c99e,_0x3993e1),_0x144cfc=!![]);}}for(const [_0x4c1b4c,_0x7eb097]of _0x4e7b54){const _0x1f2224=_0xbfc942[_0x543f3d(0x291)](_0x4c1b4c);if(!_0x1f2224)continue;for(const _0x510de1 of _0x7eb097){if(_0x510de1['conditionType']!==_0x543f3d(0x246)||typeof _0x510de1['expression']!==_0x543f3d(0x1bc))continue;for(const [_0x591ce8,_0xed3150]of _0x2661d2){expressionReferencesVariable(_0x510de1[_0x543f3d(0x1b9)],_0x591ce8)&&!_0x1f2224[_0x543f3d(0x1ea)](_0xed3150)&&_0x3912cc['push']({'path':(_0x5529a1[_0x543f3d(0x291)](_0x510de1)??'flowJson.edges')+_0x543f3d(0x2cb),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x591ce8+_0x543f3d(0x1d7)+_0xed3150+_0x543f3d(0x229)+_0x4c1b4c+'.'});}}}}function expressionReferencesVariable(_0x55528d,_0x5922e2){const _0x3f8564=a299_0x85c6cc;let _0x389146=0x0;while(_0x389146<_0x55528d[_0x3f8564(0x1cf)]){const _0x434f6a=_0x55528d[_0x389146];if(_0x434f6a==='\x27'||_0x434f6a==='\x22'){_0x389146=skipQuotedExpressionSegment(_0x55528d,_0x389146,_0x434f6a);continue;}if(!/[A-Za-z_]/['test'](_0x434f6a)){_0x389146+=0x1;continue;}const _0x37bbda=_0x389146;_0x389146+=0x1;while(_0x389146<_0x55528d['length']&&/[A-Za-z0-9_]/[_0x3f8564(0x2d5)](_0x55528d[_0x389146])){_0x389146+=0x1;}if(_0x55528d['slice'](_0x37bbda,_0x389146)!==_0x5922e2)continue;let _0xf49353=_0x37bbda-0x1;while(_0xf49353>=0x0&&/\s/[_0x3f8564(0x2d5)](_0x55528d[_0xf49353])){_0xf49353-=0x1;}if(_0x55528d[_0xf49353]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x1e483f,_0xb547d4,_0x138651){let _0x38180c=_0xb547d4+0x1;while(_0x38180c<_0x1e483f['length']){if(_0x1e483f[_0x38180c]==='\x5c'){_0x38180c+=0x2;continue;}if(_0x1e483f[_0x38180c]===_0x138651)return _0x38180c+0x1;_0x38180c+=0x1;}return _0x38180c;}function resolveEffectiveResultVariable(_0x5f3dd9,_0x2614b0){const _0x154933=a299_0x85c6cc;if(_0x5f3dd9===undefined||_0x5f3dd9===null||_0x2614b0&&_0x5f3dd9==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x5f3dd9!==_0x154933(0x1bc)||!VARIABLE_PATTERN['test'](_0x5f3dd9)||RESERVED_RESULT_VARIABLES['has'](_0x5f3dd9)||_0x5f3dd9[_0x154933(0x2a2)](_0x154933(0x25c)))return undefined;return _0x5f3dd9;}function registerResultVariableOwner(_0x2a7a57,_0x51009f,_0x19ea0a,_0x9c8542){const _0x3d90b3=a299_0x85c6cc;if(_0x2a7a57[_0x3d90b3(0x1ea)](_0x51009f)){_0x9c8542[_0x3d90b3(0x250)]({'path':_0x3d90b3(0x1ec),'message':_0x3d90b3(0x2e2)+_0x51009f+'.'});return;}_0x2a7a57[_0x3d90b3(0x1dc)](_0x51009f,_0x19ea0a);}function setsEqual(_0x5dfd3c,_0x5787bc){const _0x13d119=a299_0x85c6cc;return _0x5dfd3c[_0x13d119(0x18a)]===_0x5787bc[_0x13d119(0x18a)]&&[..._0x5dfd3c][_0x13d119(0x2b0)](_0x178702=>_0x5787bc['has'](_0x178702));}function isValidUserId(_0xb58d8e){const _0x35cfd0=a299_0x85c6cc;if(typeof _0xb58d8e==='string')return _0xb58d8e[_0x35cfd0(0x1fd)]()['length']>0x0;return Number[_0x35cfd0(0x2a5)](_0xb58d8e)&&Number(_0xb58d8e)>0x0;}function resolveEdgeEndpoint(_0x422730,_0xbe4f8f){const _0x386b0c=a299_0x85c6cc;if(typeof _0x422730===_0x386b0c(0x1bc)&&_0x422730[_0x386b0c(0x1fd)]())return _0x422730['trim']();if(typeof _0xbe4f8f===_0x386b0c(0x1bc)&&_0xbe4f8f['trim']())return _0xbe4f8f[_0x386b0c(0x1fd)]();return undefined;}function removeEmptyMetadata(_0x3d7ef8,_0x21f0c1,_0x4652b0,_0x4edb14){const _0x28f6aa=a299_0x85c6cc;if(Array[_0x28f6aa(0x2b7)](_0x3d7ef8)){_0x3d7ef8[_0x28f6aa(0x272)]((_0x587a60,_0x15c653)=>removeEmptyMetadata(_0x587a60,_0x21f0c1+'['+_0x15c653+']',_0x4652b0,_0x4edb14));return;}if(!isRecord(_0x3d7ef8))return;for(const [_0x310edf,_0x39efcc]of Object[_0x28f6aa(0x267)](_0x3d7ef8)){const _0xfd9819=_0x21f0c1+'.'+_0x310edf;if(_0x310edf==='metadata'&&isEmptyJsonValue(_0x39efcc)){delete _0x3d7ef8[_0x310edf],_0x4edb14[_0x28f6aa(0x250)](_0xfd9819),_0x4652b0[_0x28f6aa(0x250)]({'code':_0x28f6aa(0x1a3),'path':_0xfd9819,'message':_0xfd9819+_0x28f6aa(0x205)});continue;}removeEmptyMetadata(_0x39efcc,_0xfd9819,_0x4652b0,_0x4edb14);}}function isEmptyJsonValue(_0x5879c1){const _0x585bed=a299_0x85c6cc;if(_0x5879c1===null||_0x5879c1===undefined)return!![];if(typeof _0x5879c1===_0x585bed(0x1bc))return _0x5879c1[_0x585bed(0x1fd)]()==='';if(Array['isArray'](_0x5879c1))return _0x5879c1[_0x585bed(0x1cf)]===0x0;return isRecord(_0x5879c1)&&Object[_0x585bed(0x236)](_0x5879c1)[_0x585bed(0x1cf)]===0x0;}function isRecord(_0x1cb4a8){const _0x399b35=a299_0x85c6cc;return typeof _0x1cb4a8==='object'&&_0x1cb4a8!==null&&!Array[_0x399b35(0x2b7)](_0x1cb4a8);}function cloneJsonValue(_0xeff6a9){const _0x78e7c0=a299_0x85c6cc;return JSON[_0x78e7c0(0x2e6)](JSON[_0x78e7c0(0x219)](_0xeff6a9));}export async function readFlowConfigFile(_0x130b5e){const _0x5b3f5c=a299_0x85c6cc,_0x22cc55=await readFile(resolve(_0x130b5e),_0x5b3f5c(0x2c8));return JSON['parse'](_0x22cc55);}
|
|
1
|
+
const a299_0x1427a8=a299_0x4bfc;(function(_0x1fe657,_0x27a3b2){const _0x37354d=a299_0x4bfc,_0x36db09=_0x1fe657();while(!![]){try{const _0xe84bc7=-parseInt(_0x37354d(0x218))/0x1*(parseInt(_0x37354d(0x1b3))/0x2)+-parseInt(_0x37354d(0x11b))/0x3+-parseInt(_0x37354d(0x15a))/0x4+-parseInt(_0x37354d(0x171))/0x5+-parseInt(_0x37354d(0x1dc))/0x6+parseInt(_0x37354d(0x1c3))/0x7*(-parseInt(_0x37354d(0xee))/0x8)+parseInt(_0x37354d(0xda))/0x9;if(_0xe84bc7===_0x27a3b2)break;else _0x36db09['push'](_0x36db09['shift']());}catch(_0x53a456){_0x36db09['push'](_0x36db09['shift']());}}}(a299_0x1951,0xd220d));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_0x1427a8(0x194),'$id':a299_0x1427a8(0x12d),'title':a299_0x1427a8(0x1f5),'type':'object','required':['flowName',a299_0x1427a8(0x122),a299_0x1427a8(0xc8)],'$defs':{'userId':{'anyOf':[{'type':a299_0x1427a8(0xe4),'minLength':0x1},{'type':a299_0x1427a8(0x21c),'minimum':0x1}]},'position':{'type':a299_0x1427a8(0x219),'required':['x','y'],'properties':{'x':{'type':a299_0x1427a8(0x21f),'minimum':0x0},'y':{'type':a299_0x1427a8(0x21f),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a299_0x1427a8(0x1c8),a299_0x1427a8(0xf5)],'properties':{'value':{'type':a299_0x1427a8(0x21c),'minimum':0x1},'unit':{'enum':[a299_0x1427a8(0xe6),a299_0x1427a8(0x206),'HOURS','DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a299_0x1427a8(0x219),'required':['id','type',a299_0x1427a8(0x1fe),'position'],'properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':[a299_0x1427a8(0xe1),a299_0x1427a8(0x103),a299_0x1427a8(0x129),a299_0x1427a8(0x178),a299_0x1427a8(0x159),a299_0x1427a8(0x13f)]},'name':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'path':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'position':{'$ref':a299_0x1427a8(0x106)},'approvalMode':{'enum':[a299_0x1427a8(0x13b),'ALL',a299_0x1427a8(0x120)]},'taskMode':{'enum':[a299_0x1427a8(0x129),'HANDLE']},'assignee':{'type':a299_0x1427a8(0x219),'required':[a299_0x1427a8(0x155)],'properties':{'strategy':{'enum':[a299_0x1427a8(0xde),'ROLE']},'userIds':{'type':a299_0x1427a8(0x148),'minItems':0x1,'items':{'$ref':a299_0x1427a8(0x1b9)}},'roleId':{'anyOf':[{'type':a299_0x1427a8(0x21c),'minimum':0x1},{'type':a299_0x1427a8(0xe4),'pattern':a299_0x1427a8(0xdc)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a299_0x1427a8(0x155),a299_0x1427a8(0x11c)],'properties':{'strategy':{'const':a299_0x1427a8(0xde)},'userIds':{'type':a299_0x1427a8(0x148),'minItems':0x1,'items':{'$ref':a299_0x1427a8(0x1b9)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x1427a8(0x183)},'result':{'enum':[a299_0x1427a8(0x22b),a299_0x1427a8(0x10a)]},'scriptName':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'resultVariable':{'type':a299_0x1427a8(0xe4),'pattern':a299_0x1427a8(0x1b6)},'async':{'type':a299_0x1427a8(0x219),'properties':{'enabled':{'type':'boolean'},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a299_0x1427a8(0x219),'properties':{'enabled':{'type':a299_0x1427a8(0x183)},'duration':{'$ref':a299_0x1427a8(0x10c)},'action':{'enum':[a299_0x1427a8(0x199),a299_0x1427a8(0x18e),a299_0x1427a8(0x18b)]},'interrupting':{'type':a299_0x1427a8(0x183)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x1427a8(0xe4),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a299_0x1427a8(0x219),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a299_0x1427a8(0x148),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x1427a8(0xe4),'minLength':0x1}},'visible':{'type':a299_0x1427a8(0x148),'uniqueItems':!![],'items':{'type':a299_0x1427a8(0xe4),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x1427a8(0x219),'required':['configCode',a299_0x1427a8(0xc7)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'failurePolicy':{'enum':[a299_0x1427a8(0x158),'FAIL']},'template':{'type':a299_0x1427a8(0x219),'required':[a299_0x1427a8(0x1bd),'summary'],'properties':{'title':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'summary':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'detailMarkdown':{'type':a299_0x1427a8(0xe4)},'facts':{'type':a299_0x1427a8(0x148),'maxItems':0x8,'items':{'type':a299_0x1427a8(0x219),'required':[a299_0x1427a8(0x1fa),a299_0x1427a8(0x1c8)],'properties':{'label':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'value':{'type':a299_0x1427a8(0xe4),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x1427a8(0x148),'maxItems':0x2,'items':{'type':'object','required':[a299_0x1427a8(0xcf),a299_0x1427a8(0x1d4)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x1427a8(0x148),'items':{'type':a299_0x1427a8(0x219),'required':['type',a299_0x1427a8(0x1c8)],'properties':{'type':{'enum':[a299_0x1427a8(0xc5),'ROLE',a299_0x1427a8(0x226)]},'value':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x1427a8(0x14e)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x1427a8(0x219),'properties':{'id':{'type':a299_0x1427a8(0xe4),'pattern':a299_0x1427a8(0x1b6)},'source':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'target':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'conditionType':{'enum':[a299_0x1427a8(0x117),a299_0x1427a8(0x22b),a299_0x1427a8(0x10a),a299_0x1427a8(0x175)]},'expression':{'type':a299_0x1427a8(0xe4)},'defaultFlow':{'type':a299_0x1427a8(0x183)},'name':{'type':a299_0x1427a8(0xe4)},'waypoints':{'type':a299_0x1427a8(0x148),'items':{'$ref':a299_0x1427a8(0x106)}}},'allOf':[{'anyOf':[{'required':[a299_0x1427a8(0x18a)]},{'required':[a299_0x1427a8(0x1bc)]}]},{'anyOf':[{'required':[a299_0x1427a8(0x222)]},{'required':[a299_0x1427a8(0x189)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'flowDesc':{'type':a299_0x1427a8(0xe4)},'flowType':{'enum':[a299_0x1427a8(0x12f),a299_0x1427a8(0x20d)]},'datasetCode':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'pageId':{'type':a299_0x1427a8(0x21c),'minimum':0x1,'maximum':Number[a299_0x1427a8(0x1eb)]},'pageIds':{'type':'array','items':{'type':a299_0x1427a8(0x21c),'minimum':0x1,'maximum':Number[a299_0x1427a8(0x1eb)]}},'templateName':![],'flowJson':{'type':a299_0x1427a8(0x219),'required':['nodes',a299_0x1427a8(0x203)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x1427a8(0x22c),'description':a299_0x1427a8(0x128)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':a299_0x1427a8(0xe4),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x1427a8(0x21e)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode','flowName',a299_0x1427a8(0x145),a299_0x1427a8(0xfd),a299_0x1427a8(0x105),a299_0x1427a8(0x193),'templateName'],REMOVED_ROOT_FIELDS=['id',a299_0x1427a8(0x105),a299_0x1427a8(0x154)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x1427a8(0x22c),NODE_TYPES=new Set(['START',a299_0x1427a8(0x103),'APPROVAL',a299_0x1427a8(0x178),a299_0x1427a8(0x159),a299_0x1427a8(0x13f)]),CONDITION_TYPES=new Set([a299_0x1427a8(0x117),'APPROVED',a299_0x1427a8(0x10a),a299_0x1427a8(0x175)]),APPROVAL_MODES=new Set([a299_0x1427a8(0x13b),a299_0x1427a8(0x22a),'ANY']),APPROVAL_TASK_MODES=new Set([a299_0x1427a8(0x129),a299_0x1427a8(0x1b4)]),FLOW_TIME_UNITS=new Set([a299_0x1427a8(0xe6),a299_0x1427a8(0x206),a299_0x1427a8(0x15c),a299_0x1427a8(0x22f)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x1427a8(0x199),a299_0x1427a8(0x18e),a299_0x1427a8(0x18b)]),FLOW_TYPES=new Set([a299_0x1427a8(0x12f),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a299_0x1427a8(0x1ed),a299_0x1427a8(0x1c6)]),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_0x1427a8(0x158),a299_0x1427a8(0x1df)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x1427a8(0xc5),a299_0x1427a8(0x17e),a299_0x1427a8(0x226)]),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=a299_0x1427a8(0x112),UNSUPPORTED_FORM_MESSAGE=a299_0x1427a8(0x139),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x1427a8(0x119),RESERVED_RESULT_VARIABLES=new Set(['formData',a299_0x1427a8(0x1f4),a299_0x1427a8(0x16c),a299_0x1427a8(0x1da),a299_0x1427a8(0x1d9),a299_0x1427a8(0x162),a299_0x1427a8(0x15d),a299_0x1427a8(0x1e1),a299_0x1427a8(0x185),a299_0x1427a8(0xd0)]);export function normalizeFlowConfig(_0x1a5560){const _0x42e332=a299_0x1427a8;if(!isRecord(_0x1a5560))throw new TypeError(_0x42e332(0xdf));const _0x25aa80=cloneJsonValue(_0x1a5560),_0x5ef3f3=_0x25aa80[_0x42e332(0xc8)],_0x51ae4e=isRecord(_0x5ef3f3)?cloneJsonValue(_0x5ef3f3):{},_0x11b1fd=[],_0x765782=[];for(const _0x18ecfe of REMOVED_ROOT_FIELDS){if(!Object[_0x42e332(0xf3)][_0x42e332(0x1e7)][_0x42e332(0x161)](_0x25aa80,_0x18ecfe))continue;delete _0x25aa80[_0x18ecfe],_0x765782[_0x42e332(0xe8)](_0x18ecfe),_0x11b1fd['push']({'code':'legacy_field_removed','path':_0x18ecfe,'message':_0x18ecfe+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x18b13c of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x42e332(0xf3)][_0x42e332(0x1e7)]['call'](_0x51ae4e,_0x18b13c))continue;const _0x2aa325=_0x42e332(0x13c)+_0x18b13c;delete _0x51ae4e[_0x18b13c],_0x765782['push'](_0x2aa325),_0x11b1fd[_0x42e332(0xe8)]({'code':'legacy_field_removed','path':_0x2aa325,'message':_0x2aa325+_0x42e332(0x157)});}if(Object[_0x42e332(0xf3)][_0x42e332(0x1e7)][_0x42e332(0x161)](_0x51ae4e,_0x42e332(0x209))){const _0x2bc656=_0x51ae4e[_0x42e332(0x209)],_0x63e9f1=typeof _0x2bc656===_0x42e332(0xe4)?_0x2bc656[_0x42e332(0x1ec)]():_0x2bc656;if(isEmptyJsonValue(_0x2bc656)||_0x63e9f1===DEFAULT_FLOW_SCHEMA_VERSION){const _0x33e694=_0x42e332(0x1fd);delete _0x51ae4e['schemaVersion'],_0x765782[_0x42e332(0xe8)](_0x33e694),_0x11b1fd[_0x42e332(0xe8)]({'code':_0x42e332(0x176),'path':_0x33e694,'message':_0x33e694+_0x42e332(0x125)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x51ae4e,_0x42e332(0xc8),_0x11b1fd,_0x765782);_0x25aa80[_0x42e332(0x122)]===_0x42e332(0x20d)&&!Object[_0x42e332(0xf3)][_0x42e332(0x1e7)][_0x42e332(0x161)](_0x51ae4e,_0x42e332(0x1b2))&&(_0x51ae4e['pageMode']='CUSTOM_PAGE');_0x25aa80[_0x42e332(0xc8)]=_0x51ae4e;if(typeof _0x25aa80['flowName']===_0x42e332(0xe4))_0x25aa80[_0x42e332(0x220)]=_0x25aa80[_0x42e332(0x220)]['trim']();return{'config':_0x25aa80,'warnings':_0x11b1fd,'removedPaths':_0x765782};}export function validateFlowConfig(_0x370300){const _0x130cce=a299_0x1427a8;let _0xb23261;try{_0xb23261=normalizeFlowConfig(_0x370300);}catch(_0x308a5c){const _0xb3c24e=_0x308a5c instanceof Error?_0x308a5c[_0x130cce(0x179)]:String(_0x308a5c),_0x494574={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0xb3c24e}],'warnings':[],'normalized':_0x494574,'validationConfig':_0x494574};}const _0x14a7b3=_0xb23261[_0x130cce(0x16d)],_0x1eb1b5=cloneJsonValue(_0x14a7b3),_0x2cd2e8=_0x1eb1b5[_0x130cce(0xc8)];_0x2cd2e8[_0x130cce(0x20b)]='__rabetbase_local_validation__',_0x2cd2e8[_0x130cce(0x220)]=_0x14a7b3[_0x130cce(0x220)];typeof _0x14a7b3[_0x130cce(0xfd)]==='string'&&_0x14a7b3[_0x130cce(0xfd)][_0x130cce(0x1ec)]()&&(_0x2cd2e8[_0x130cce(0x145)]=_0x14a7b3[_0x130cce(0xfd)][_0x130cce(0x1ec)]());const _0x1278d9=[];return validateOuterMetadata(_0x14a7b3,_0x1278d9),validateFlowClassification(_0x14a7b3,_0x1278d9),validateGraph(_0x14a7b3[_0x130cce(0xc8)],_0x1278d9),{'valid':_0x1278d9[_0x130cce(0x131)]===0x0,'errors':_0x1278d9,'warnings':_0xb23261[_0x130cce(0x1c4)],'normalized':_0x14a7b3,'validationConfig':_0x1eb1b5};}function a299_0x4bfc(_0x1713eb,_0x55d4b2){_0x1713eb=_0x1713eb-0xc1;const _0x1951cb=a299_0x1951();let _0x4bfc69=_0x1951cb[_0x1713eb];return _0x4bfc69;}function validateFlowClassification(_0x1ffc35,_0x62433c){const _0x756300=a299_0x1427a8;if(!isRecord(_0x1ffc35[_0x756300(0xc8)]))return;const _0x12ab4d=_0x1ffc35['flowType'],_0xab98dd=_0x1ffc35['flowJson']['pageMode'];_0xab98dd!==undefined&&(typeof _0xab98dd!==_0x756300(0xe4)||!FLOW_PAGE_MODES[_0x756300(0x1cb)](_0xab98dd))&&_0x62433c['push']({'path':_0x756300(0x102),'message':_0x756300(0x1ad)+String(_0xab98dd)+'.'});_0x12ab4d===_0x756300(0x12f)&&_0xab98dd!==undefined&&_0x62433c['push']({'path':_0x756300(0x102),'message':_0x756300(0x174)});_0x12ab4d===_0x756300(0x20d)&&_0xab98dd==='PLATFORM_FORM'&&_0x62433c[_0x756300(0xe8)]({'path':_0x756300(0x102),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x12ab4d==='FORM_FLOW'||_0x12ab4d===_0x756300(0x20d))&&validateCustomPageNavigation(_0x1ffc35,_0x12ab4d,_0xab98dd,_0x62433c);if(_0x12ab4d!=='FORM_FLOW'||!Array[_0x756300(0xe9)](_0x1ffc35[_0x756300(0xc8)][_0x756300(0x221)]))return;_0x1ffc35[_0x756300(0xc8)][_0x756300(0x221)]['forEach']((_0x478bbf,_0x51db22)=>{const _0x532637=_0x756300;isRecord(_0x478bbf)&&_0x478bbf[_0x532637(0xed)]===_0x532637(0x129)&&_0x478bbf[_0x532637(0x182)]==='HANDLE'&&_0x62433c['push']({'path':_0x532637(0x1d6)+_0x51db22+_0x532637(0x204),'message':_0x532637(0x110)});});}function a299_0x1951(){const _0x492e55=['ALL','APPROVED','approval.simple-flow.v1','Duplicate\x20BPMN\x20element\x20id:\x20','indexOf','DAYS','get','transferCandidates','conditionType','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','USER','Duplicate\x20cc\x20recipient\x20userId:\x20','template','flowJson','.taskMode','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','pid','roleId','.timeout','.timeout.action','text','approval_sys_dataId','empty_metadata_removed','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','.transferCandidates.strategy','NaN','.timeout.scriptName','flowJson.nodes.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','.resultVariable','join','58469283xUyPxq','add','^[1-9][0-9]*$','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','FIXED','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','.config','START','findIndex','Notification\x20fact\x20must\x20be\x20an\x20object.','string','Notification\x20recipient.value\x20is\x20required.','SECONDS','flowJson.nodes','push','isArray','defaultFlow\x20must\x20be\x20a\x20boolean.','includes','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','type','32whSKau','.timeout.interrupting','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.actions','.approvalMode','prototype','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','unit','.position.','node\x20must\x20be\x20an\x20object.','role','keys','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','Unsupported\x20task\x20mode:\x20','NOTIFICATION\x20node\x20requires\x20template.','datasetCode','.target','\x20was\x20empty\x20and\x20was\x20removed.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','Notification\x20fact.','flowJson.pageMode','END','FIXED\x20assignee\x20requires\x20userIds.','appCode','#/$defs/position','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','formSchema','Notification\x20action.text\x20is\x20required.','REJECTED','replace','#/$defs/timeAmount','Notification\x20template.actions\x20must\x20be\x20an\x20array.','summary','.unit','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','timeout.enabled\x20must\x20be\x20a\x20boolean.','scriptResult','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','enabled','edges\x20must\x20be\x20an\x20array.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','ALWAYS','matchAll','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','map','2818695VpFVOz','userIds','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','flowJson.startPath','startPageId','ANY','metadata','flowType','flowDesc\x20must\x20be\x20a\x20string.','.configCode','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','recipientUserIds','Unsupported\x20approval\x20mode:\x20','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','APPROVAL','.type','.assignee','.conditionType','https://lovrabet.com/schema/rabetbase-flow-config.json','NOTIFICATION\x20node\x20requires\x20config.','FORM_FLOW','formDefinitions','length','edge\x20name\x20must\x20be\x20a\x20string.','\x20facts.','isFinite','retryCount','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','approval_sys_','flowJson\x20must\x20be\x20an\x20object.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','flowDesc','SINGLE','flowJson.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.async','NOTIFICATION','.\x20This\x20CLI\x20supports\x20only\x20','Unsupported\x20schemaVersion:\x20','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Unsupported\x20notification\x20version:\x20','waypoint.','bindDatasetCode','test','\x20actions.','array','Notification\x20action.url\x20is\x20required.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','result','.async.retryInterval','BCC','flowType\x20is\x20required.','.cc.recipientUserIds','catch','formPermission','.text','templateName','strategy','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','CONTINUE','SCRIPT','762796cQqACG','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','HOURS','approval_sys_datasetCode','.defaultFlow','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20template\x20supports\x20at\x20most\x20','call','approval_sys_initiatorUsername','.transferCandidates','slice','context','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','.facts','.timeout.enabled','approvalMode','isInteger','edge\x20target\x20is\x20required.','approval_sys_appCode','config','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','.assignee.strategy','Every\x20node\x20requires\x20a\x20non-empty\x20name.','5838780jwPLsp','.expression','position','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','EXPRESSION','legacy_field_removed','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','CONDITION','message','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','.tmp','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.timeout.duration','ROLE','async\x20must\x20be\x20an\x20object.','action','expression','taskMode','boolean','sequential\x20must\x20be\x20a\x20boolean.','approval_sys_operationType','interrupting','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','targetNodeId','source','EXECUTE_BFF','datasetCode\x20must\x20be\x20a\x20string.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','AUTO_REJECT','isSafeInteger','APPROVAL\x20node\x20requires\x20assignee.','timeout','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','pageId','https://json-schema.org/draft/2020-12/schema','visible','retryInterval','.assignee.userIds','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','AUTO_APPROVE','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','flowName\x20is\x20required.','entries','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','form','variables','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','Unsupported\x20condition\x20type:\x20','some','configCode','timeout\x20must\x20be\x20an\x20object.','forEach','Edge\x20source\x20node\x20not\x20found:\x20','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.',',\x20but\x20node\x20','recipients','flowJson.edges[','startsWith','.cc','Unsupported\x20pageMode:\x20','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','resultVariable','Unsupported\x20flowType:\x20','Notification\x20recipient.type\x20is\x20required.','pageMode','27322MzeYuQ','HANDLE','facts','^[A-Za-z_][A-Za-z0-9_]*$','.cc.recipientUserIds[','transferCandidates\x20must\x20be\x20an\x20object.','#/$defs/userId','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','stringify','sourceNodeId','title','failurePolicy\x20must\x20be\x20a\x20string.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20configCode\x20is\x20required.','.failurePolicy','\x20->\x20','1751883ZIuJql','warnings','.timeout.resultVariable','PLATFORM_FORM','async.enabled\x20must\x20be\x20a\x20boolean.','value','actions','Node\x20has\x20no\x20outgoing\x20edge.','has','Duplicate\x20edge\x20route:\x20','async','value\x20must\x20be\x20an\x20array.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','parse','flowJson.edges','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','sequential','url','utf8','flowJson.nodes[','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','approval_sys_initiatorUserId','approval_sys_processInstanceId','.position','7299624tgpHti','defaultFlow','set','FAIL','.detailMarkdown','approval_sys_pageId','edge\x20source\x20is\x20required.','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','.id','.value','.path','hasOwnProperty','version','.version','path','MAX_SAFE_INTEGER','trim','CUSTOM_PAGE','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','pageIds','.cc.readSources','readSources','filter','waypoints','approved','Rabetbase\x20FlowConfig','.waypoints[','Reserved\x20resultVariable:\x20','Edge\x20target\x20node\x20not\x20found:\x20','.name','label','.url','.cc.visible','flowJson.schemaVersion','name','waypoints\x20must\x20be\x20an\x20array.','.role','.recipients','Duplicate\x20resultVariable:\x20','edges','].taskMode','.pageId','MINUTES','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','detailMarkdown','schemaVersion','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowKey','\x20users.','INDEPENDENT_FLOW','.template','.source','.sequential','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','every','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','size','failurePolicy','\x20is\x20required.','Node\x20cannot\x20reach\x20any\x20END.','82QXOlcr','object','Unsupported\x20notification\x20placeholder:\x20','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','integer','flowJson.startPageId','#/$defs/flowEdge','number','flowName','nodes','target','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','toUpperCase','].path','EMAIL','timeout.interrupting\x20must\x20be\x20a\x20boolean.','scriptName','Node\x20is\x20not\x20reachable\x20from\x20START.'];a299_0x1951=function(){return _0x492e55;};return a299_0x1951();}function validateCustomPageNavigation(_0x2b7d37,_0x3bca5a,_0x3f6eb8,_0x452fe4){const _0x5119f0=a299_0x1427a8,_0x1cbfd1=_0x2b7d37[_0x5119f0(0xc8)][_0x5119f0(0x11f)];_0x1cbfd1!==undefined&&_0x452fe4[_0x5119f0(0xe8)]({'path':_0x5119f0(0x21d),'message':_0x5119f0(0x15b)});const _0x3ee0ad=_0x2b7d37[_0x5119f0(0xc8)]['startPath'];_0x3ee0ad!==undefined&&(typeof _0x3ee0ad!==_0x5119f0(0xe4)||_0x3ee0ad[_0x5119f0(0x1ec)]()==='')&&_0x452fe4[_0x5119f0(0xe8)]({'path':_0x5119f0(0x11e),'message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0x3ef932=Array[_0x5119f0(0xe9)](_0x2b7d37[_0x5119f0(0xc8)][_0x5119f0(0x221)])?_0x2b7d37[_0x5119f0(0xc8)][_0x5119f0(0x221)][_0x5119f0(0x11a)]((_0x19ed3b,_0x2b9b30)=>({'node':_0x19ed3b,'index':_0x2b9b30}))['filter'](({node:_0x25dddf})=>isRecord(_0x25dddf)&&_0x25dddf[_0x5119f0(0x1ea)]!==undefined):[],_0x666343=_0x3ee0ad!==undefined||_0x3ef932['length']>0x0,_0x3f93a4=_0x3f6eb8===undefined&&_0x3bca5a===_0x5119f0(0x20d)?_0x5119f0(0x1ed):_0x3f6eb8;_0x666343&&(_0x3bca5a!=='INDEPENDENT_FLOW'||_0x3f93a4!==_0x5119f0(0x1ed))&&(_0x3ee0ad!==undefined&&_0x452fe4[_0x5119f0(0xe8)]({'path':_0x5119f0(0x11e),'message':_0x5119f0(0xc4)}),_0x3ef932[_0x5119f0(0x1a5)](({index:_0x5d0bcf})=>{const _0x1d4eb0=_0x5119f0;_0x452fe4['push']({'path':_0x1d4eb0(0x1d6)+_0x5d0bcf+_0x1d4eb0(0x225),'message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x54f904,_0x50a68a,_0x23432a={}){const _0x51fb0d=a299_0x1427a8,_0x5d6879=resolve(_0x54f904),_0x3ab335=_0x5d6879+'.'+process[_0x51fb0d(0xcb)]+'.'+randomUUID()+_0x51fb0d(0x17b),_0x17d608=JSON['stringify'](_0x50a68a,null,0x2)+'\x0a';let _0x2c6e65;try{try{_0x2c6e65=(await stat(_0x5d6879))['mode']&0x1ff;}catch{_0x2c6e65=undefined;}await writeFile(_0x3ab335,_0x17d608,{'encoding':_0x51fb0d(0x1d5),'flag':'wx','mode':_0x2c6e65??0x1a4});if(_0x2c6e65!==undefined)await chmod(_0x3ab335,_0x2c6e65);_0x23432a['overwrite']===![]?(await link(_0x3ab335,_0x5d6879),await unlink(_0x3ab335)):await rename(_0x3ab335,_0x5d6879);}finally{await unlink(_0x3ab335)[_0x51fb0d(0x151)](()=>undefined);}}function validateOuterMetadata(_0x1313dc,_0x55bcf2){const _0x44141a=a299_0x1427a8;(typeof _0x1313dc[_0x44141a(0x220)]!=='string'||_0x1313dc[_0x44141a(0x220)][_0x44141a(0x1ec)]()==='')&&_0x55bcf2['push']({'path':'flowName','message':_0x44141a(0x19b)});_0x1313dc[_0x44141a(0x13a)]!==undefined&&typeof _0x1313dc['flowDesc']!==_0x44141a(0xe4)&&_0x55bcf2[_0x44141a(0xe8)]({'path':_0x44141a(0x13a),'message':_0x44141a(0x123)});if(_0x1313dc['flowType']===undefined||_0x1313dc[_0x44141a(0x122)]===null)_0x55bcf2['push']({'path':_0x44141a(0x122),'message':_0x44141a(0x14f)});else(typeof _0x1313dc[_0x44141a(0x122)]!==_0x44141a(0xe4)||!FLOW_TYPES[_0x44141a(0x1cb)](_0x1313dc[_0x44141a(0x122)]))&&_0x55bcf2['push']({'path':_0x44141a(0x122),'message':_0x44141a(0x1b0)+String(_0x1313dc[_0x44141a(0x122)])+'.'});_0x1313dc['datasetCode']!==undefined&&typeof _0x1313dc['datasetCode']!=='string'&&_0x55bcf2['push']({'path':'datasetCode','message':_0x44141a(0x18c)});_0x1313dc['pageIds']===undefined&&_0x1313dc[_0x44141a(0x193)]!==undefined&&(!Number[_0x44141a(0x18f)](_0x1313dc['pageId'])||_0x1313dc[_0x44141a(0x193)]<=0x0)&&_0x55bcf2[_0x44141a(0xe8)]({'path':_0x44141a(0x193),'message':'pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.'});if(_0x1313dc['pageIds']!==undefined){if(!Array[_0x44141a(0xe9)](_0x1313dc[_0x44141a(0x1ef)])||_0x1313dc[_0x44141a(0x1ef)][_0x44141a(0x1a2)](_0x2c2bbe=>!Number[_0x44141a(0x18f)](_0x2c2bbe)||_0x2c2bbe<=0x0))_0x55bcf2[_0x44141a(0xe8)]({'path':_0x44141a(0x1ef),'message':_0x44141a(0x107)});else[...new Set(_0x1313dc[_0x44141a(0x1ef)])][_0x44141a(0xd9)](',')[_0x44141a(0x131)]>0x800&&_0x55bcf2['push']({'path':_0x44141a(0x1ef),'message':_0x44141a(0xca)});_0x1313dc[_0x44141a(0x122)]===_0x44141a(0x20d)&&Array[_0x44141a(0xe9)](_0x1313dc[_0x44141a(0x1ef)])&&_0x1313dc[_0x44141a(0x1ef)][_0x44141a(0x131)]>0x0&&_0x55bcf2[_0x44141a(0xe8)]({'path':_0x44141a(0x1ef),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.'});}_0x1313dc[_0x44141a(0x122)]===_0x44141a(0x20d)&&_0x1313dc[_0x44141a(0xfd)]!==undefined&&_0x55bcf2[_0x44141a(0xe8)]({'path':_0x44141a(0xfd),'message':_0x44141a(0x177)}),_0x1313dc[_0x44141a(0x122)]===_0x44141a(0x20d)&&_0x1313dc[_0x44141a(0x1ef)]===undefined&&_0x1313dc['pageId']!==undefined&&_0x55bcf2[_0x44141a(0xe8)]({'path':_0x44141a(0x193),'message':_0x44141a(0x156)});}function validateGraph(_0x2fdfb8,_0x6b9707){const _0x4b097a=a299_0x1427a8;if(!isRecord(_0x2fdfb8)){_0x6b9707[_0x4b097a(0xe8)]({'path':_0x4b097a(0xc8),'message':_0x4b097a(0x138)});return;}!Array['isArray'](_0x2fdfb8[_0x4b097a(0x221)])&&_0x6b9707[_0x4b097a(0xe8)]({'path':_0x4b097a(0xe7),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x4b097a(0xe9)](_0x2fdfb8[_0x4b097a(0x203)])&&_0x6b9707['push']({'path':_0x4b097a(0x1d1),'message':_0x4b097a(0x115)});Object[_0x4b097a(0xf3)][_0x4b097a(0x1e7)]['call'](_0x2fdfb8,_0x4b097a(0x209))&&_0x6b9707[_0x4b097a(0xe8)]({'path':_0x4b097a(0x1fd),'message':_0x4b097a(0x141)+String(_0x2fdfb8['schemaVersion'])+_0x4b097a(0x140)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x4f4d77 of[_0x4b097a(0x108),_0x4b097a(0x130),'formPermissions']){Object[_0x4b097a(0xf3)][_0x4b097a(0x1e7)]['call'](_0x2fdfb8,_0x4f4d77)&&_0x6b9707['push']({'path':'flowJson.'+_0x4f4d77,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x4b097a(0xe9)](_0x2fdfb8[_0x4b097a(0x221)])||!Array[_0x4b097a(0xe9)](_0x2fdfb8[_0x4b097a(0x203)]))return;const _0x42f045=new Map(),_0x3be409=[],_0x46a424=[],_0x58acde=new Map(),_0x3d097f=new Map(),_0x1cc905=new Set();let _0x190f5a=0x0;_0x2fdfb8[_0x4b097a(0x221)][_0x4b097a(0x1a5)]((_0xe80a65,_0x5968b2)=>{const _0x5aa507=_0x4b097a,_0x41b52b=_0x5aa507(0x1d6)+_0x5968b2+']';if(!isRecord(_0xe80a65)){_0x6b9707[_0x5aa507(0xe8)]({'path':_0x41b52b,'message':_0x5aa507(0xf7)});return;}const _0x49fbcd=_0xe80a65;if(typeof _0x49fbcd['id']!==_0x5aa507(0xe4)||!BPMN_ID_PATTERN[_0x5aa507(0x146)](_0x49fbcd['id']))_0x6b9707[_0x5aa507(0xe8)]({'path':_0x41b52b+_0x5aa507(0x1e4),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x42f045[_0x5aa507(0x1cb)](_0x49fbcd['id'])?_0x6b9707['push']({'path':_0x41b52b+'.id','message':'Duplicate\x20node\x20id:\x20'+_0x49fbcd['id']+'.'}):(_0x42f045['set'](_0x49fbcd['id'],_0x49fbcd),_0x1cc905[_0x5aa507(0xdb)](_0x49fbcd['id']));if(!NODE_TYPES['has'](_0x49fbcd[_0x5aa507(0xed)]))_0x6b9707[_0x5aa507(0xe8)]({'path':_0x41b52b+_0x5aa507(0x12a),'message':'Unsupported\x20node\x20type:\x20'+String(_0x49fbcd[_0x5aa507(0xed)])+'.'});else{if(_0x49fbcd[_0x5aa507(0xed)]==='START')_0x3be409[_0x5aa507(0xe8)](_0x49fbcd['id']);else _0x49fbcd[_0x5aa507(0xed)]===_0x5aa507(0x103)&&_0x46a424[_0x5aa507(0xe8)](_0x49fbcd['id']);}_0x49fbcd[_0x5aa507(0xed)]==='APPROVAL'&&(_0x49fbcd[_0x5aa507(0x182)]===undefined||_0x49fbcd[_0x5aa507(0x182)]===_0x5aa507(0x129))&&(_0x190f5a+=0x1);validateNode(_0x49fbcd,_0x41b52b,_0x6b9707);if(_0x49fbcd['type']==='SCRIPT'){const _0x55ea69=resolveEffectiveResultVariable(_0x49fbcd['resultVariable'],![]);_0x55ea69&&(registerResultVariableOwner(_0x3d097f,_0x55ea69,_0x49fbcd['id'],_0x6b9707),!_0x58acde['has'](_0x55ea69)&&_0x58acde['set'](_0x55ea69,_0x49fbcd['id']));}if(_0x49fbcd[_0x5aa507(0xed)]===_0x5aa507(0x129)&&isRecord(_0x49fbcd[_0x5aa507(0x191)])&&_0x49fbcd[_0x5aa507(0x191)][_0x5aa507(0x114)]===!![]&&_0x49fbcd[_0x5aa507(0x191)][_0x5aa507(0x180)]===_0x5aa507(0x18b)){const _0xf21077=resolveEffectiveResultVariable(_0x49fbcd[_0x5aa507(0x191)]['resultVariable'],!![]);_0xf21077&®isterResultVariableOwner(_0x3d097f,_0xf21077,_0x49fbcd['id']+_0x5aa507(0xcd),_0x6b9707);}});_0x3be409[_0x4b097a(0x131)]!==0x1&&_0x6b9707[_0x4b097a(0xe8)]({'path':_0x4b097a(0xe7),'message':_0x4b097a(0xf4)});_0x46a424['length']===0x0&&_0x6b9707['push']({'path':_0x4b097a(0xe7),'message':_0x4b097a(0x18d)});const _0x226914=new Map(),_0x1fc74a=new Map(),_0x142a1c=new Map(),_0x538300=new Set();_0x2fdfb8['edges']['forEach']((_0x5a9bc8,_0x1470a8)=>{const _0x1f4687=_0x4b097a,_0x29002c=_0x1f4687(0x1aa)+_0x1470a8+']';if(!isRecord(_0x5a9bc8)){_0x6b9707[_0x1f4687(0xe8)]({'path':_0x29002c,'message':'edge\x20must\x20be\x20an\x20object.'});return;}const _0x1f59c9=_0x5a9bc8;_0x142a1c[_0x1f4687(0x1de)](_0x1f59c9,_0x29002c);const _0x18bdf8=resolveEdgeEndpoint(_0x1f59c9[_0x1f4687(0x18a)],_0x1f59c9['sourceNodeId']),_0x1da97b=resolveEdgeEndpoint(_0x1f59c9[_0x1f4687(0x222)],_0x1f59c9[_0x1f4687(0x189)]);if(!_0x18bdf8)_0x6b9707[_0x1f4687(0xe8)]({'path':_0x29002c+_0x1f4687(0x20f),'message':_0x1f4687(0x1e2)});if(!_0x1da97b)_0x6b9707['push']({'path':_0x29002c+_0x1f4687(0xfe),'message':_0x1f4687(0x16b)});_0x18bdf8&&!_0x42f045[_0x1f4687(0x1cb)](_0x18bdf8)&&_0x6b9707[_0x1f4687(0xe8)]({'path':_0x29002c+_0x1f4687(0x20f),'message':_0x1f4687(0x1a6)+_0x18bdf8+'.'});_0x1da97b&&!_0x42f045['has'](_0x1da97b)&&_0x6b9707[_0x1f4687(0xe8)]({'path':_0x29002c+_0x1f4687(0xfe),'message':_0x1f4687(0x1f8)+_0x1da97b+'.'});if(_0x1f59c9['id']!==undefined){if(typeof _0x1f59c9['id']!=='string'||!BPMN_ID_PATTERN[_0x1f4687(0x146)](_0x1f59c9['id']))_0x6b9707['push']({'path':_0x29002c+'.id','message':_0x1f4687(0x1d8)});else{if(_0x1cc905['has'](_0x1f59c9['id']))_0x6b9707[_0x1f4687(0xe8)]({'path':_0x29002c+'.id','message':_0x1f4687(0x22d)+_0x1f59c9['id']+'.'});else!_0x1cc905[_0x1f4687(0x1cb)](_0x1f59c9['id'])&&_0x1cc905['add'](_0x1f59c9['id']);}}if(_0x18bdf8&&_0x1da97b){const _0x543e01=_0x18bdf8+'\x00'+_0x1da97b+'\x00'+(_0x1f59c9['conditionType']??_0x1f4687(0x117));_0x538300[_0x1f4687(0x1cb)](_0x543e01)?_0x6b9707[_0x1f4687(0xe8)]({'path':_0x29002c,'message':_0x1f4687(0x1cc)+_0x18bdf8+_0x1f4687(0x1c2)+_0x1da97b+'\x20('+(_0x1f59c9[_0x1f4687(0xc3)]??_0x1f4687(0x117))+').'}):_0x538300['add'](_0x543e01);}validateEdge(_0x1f59c9,_0x29002c,_0x6b9707),_0x18bdf8&&_0x1da97b&&(_0x226914[_0x1f4687(0xc1)](_0x18bdf8)?.['push'](_0x1f59c9)??_0x226914[_0x1f4687(0x1de)](_0x18bdf8,[_0x1f59c9]),_0x1fc74a[_0x1f4687(0xc1)](_0x1da97b)?.[_0x1f4687(0xe8)](_0x1f59c9)??_0x1fc74a[_0x1f4687(0x1de)](_0x1da97b,[_0x1f59c9]));});if(_0x3be409[_0x4b097a(0x131)]!==0x1)return;validateGraphShape(_0x42f045,_0x3be409[0x0],_0x46a424,_0x226914,_0x1fc74a,_0x142a1c,_0x6b9707),validateScriptResultReferences(_0x42f045,_0x3be409[0x0],_0x226914,_0x1fc74a,_0x142a1c,_0x58acde,_0x6b9707),validateApprovalResults(_0x42f045,_0x190f5a,_0x46a424,_0x6b9707);}function validateNode(_0x974dfb,_0x15d965,_0x3c5084){const _0x3120d7=a299_0x1427a8;for(const _0x2f3cbd of[_0x3120d7(0x19e),_0x3120d7(0x152)]){Object[_0x3120d7(0xf3)][_0x3120d7(0x1e7)][_0x3120d7(0x161)](_0x974dfb,_0x2f3cbd)&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+'.'+_0x2f3cbd,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES['has'](_0x974dfb[_0x3120d7(0xed)]))return;(typeof _0x974dfb[_0x3120d7(0x1fe)]!==_0x3120d7(0xe4)||_0x974dfb[_0x3120d7(0x1fe)][_0x3120d7(0x1ec)]()==='')&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0x1f9),'message':_0x3120d7(0x170)});_0x974dfb[_0x3120d7(0x193)]!==undefined&&_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0x205),'message':_0x3120d7(0x198)});if(_0x974dfb[_0x3120d7(0x1ea)]!==undefined){if(typeof _0x974dfb[_0x3120d7(0x1ea)]!==_0x3120d7(0xe4)||_0x974dfb['path']['trim']()==='')_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0x1e6),'message':_0x3120d7(0x113)});else _0x974dfb['type']!==_0x3120d7(0x129)&&_0x974dfb['type']!==_0x3120d7(0x103)&&_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0x1e6),'message':_0x3120d7(0x13d)});}const _0x2b0dc7=_0x974dfb[_0x3120d7(0x173)];if(!isRecord(_0x2b0dc7))_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0x1db),'message':_0x3120d7(0x223)});else for(const _0xb01401 of['x','y']){const _0x2f41dd=_0x2b0dc7[_0xb01401];(typeof _0x2f41dd!=='number'||!Number[_0x3120d7(0x134)](_0x2f41dd)||_0x2f41dd<0x0)&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0xf6)+_0xb01401,'message':'position.'+_0xb01401+_0x3120d7(0x20a)});}if(_0x974dfb['type']===_0x3120d7(0x129)){const _0x3a22cd=_0x974dfb[_0x3120d7(0x169)]??_0x3120d7(0x13b),_0xc3bf10=_0x974dfb[_0x3120d7(0x182)]??_0x3120d7(0x129);!APPROVAL_TASK_MODES['has'](_0xc3bf10)&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0xc9),'message':_0x3120d7(0xfb)+String(_0xc3bf10)+'.'});!APPROVAL_MODES['has'](_0x3a22cd)&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0xf2),'message':_0x3120d7(0x127)+String(_0x3a22cd)+'.'});if(!isRecord(_0x974dfb['assignee']))_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0x12b),'message':_0x3120d7(0x190)});else{const _0x56da78=_0x974dfb['assignee']['strategy'];_0x56da78!==_0x3120d7(0xde)&&_0x56da78!==_0x3120d7(0x17e)&&_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0x16f),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x56da78===_0x3120d7(0xde)){const _0x24bf25=_0x974dfb['assignee'][_0x3120d7(0x11c)];if(!Array['isArray'](_0x24bf25)||_0x24bf25[_0x3120d7(0x131)]===0x0)_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0x197),'message':_0x3120d7(0x104)});else{const _0x1b3e69=_0x24bf25['findIndex'](_0x5ac410=>!isValidUserId(_0x5ac410));_0x1b3e69>=0x0&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+'.assignee.userIds['+_0x1b3e69+']','message':_0x3120d7(0xf0)});const _0x208ff1=new Set(_0x24bf25['filter'](isValidUserId)['map'](_0x54e620=>String(_0x54e620)[_0x3120d7(0x1ec)]()));_0x3a22cd===_0x3120d7(0x13b)&&_0x208ff1[_0x3120d7(0x214)]>0x1&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0x197),'message':_0x3120d7(0x192)});}}if(_0x56da78==='ROLE'){const _0x15e62e=_0x974dfb['assignee'][_0x3120d7(0xcc)],_0x5d6bf9=typeof _0x15e62e==='number'||typeof _0x15e62e==='string'?Number(String(_0x15e62e)[_0x3120d7(0x1ec)]()):Number[_0x3120d7(0xd4)];(!Number[_0x3120d7(0x18f)](_0x5d6bf9)||_0x5d6bf9<=0x0)&&_0x3c5084['push']({'path':_0x15d965+'.assignee.roleId','message':_0x3120d7(0x166)});}}if(_0x974dfb['transferCandidates']!==undefined){if(!isRecord(_0x974dfb[_0x3120d7(0xc2)]))_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0x163),'message':_0x3120d7(0x1b8)});else{if(_0x974dfb[_0x3120d7(0xc2)][_0x3120d7(0x155)]!==_0x3120d7(0xde))_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0xd3),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0xca738=_0x974dfb['transferCandidates']['userIds'];if(!Array['isArray'](_0xca738)||_0xca738[_0x3120d7(0x131)]===0x0)_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+'.transferCandidates.userIds','message':_0x3120d7(0x1a0)});else{const _0xb62baa=_0xca738[_0x3120d7(0xe2)](_0x1a691c=>!isValidUserId(_0x1a691c));_0xb62baa>=0x0&&_0x3c5084['push']({'path':_0x15d965+'.transferCandidates.userIds['+_0xb62baa+']','message':_0x3120d7(0x116)});}}}}}_0x974dfb[_0x3120d7(0x1d3)]!==undefined&&typeof _0x974dfb['sequential']!=='boolean'&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0x210),'message':_0x3120d7(0x184)});if(_0x974dfb[_0x3120d7(0xed)]==='SCRIPT'){(typeof _0x974dfb['scriptName']!==_0x3120d7(0xe4)||_0x974dfb[_0x3120d7(0x228)][_0x3120d7(0x1ec)]()==='')&&_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+'.scriptName','message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x974dfb[_0x3120d7(0x1af)]!==undefined){if(typeof _0x974dfb[_0x3120d7(0x1af)]!=='string'||!VARIABLE_PATTERN['test'](_0x974dfb[_0x3120d7(0x1af)]))_0x3c5084[_0x3120d7(0xe8)]({'path':_0x15d965+_0x3120d7(0xd8),'message':_0x3120d7(0x1bf)});else(RESERVED_RESULT_VARIABLES[_0x3120d7(0x1cb)](_0x974dfb['resultVariable'])||_0x974dfb[_0x3120d7(0x1af)][_0x3120d7(0x1ab)](_0x3120d7(0x137)))&&_0x3c5084['push']({'path':_0x15d965+_0x3120d7(0xd8),'message':_0x3120d7(0x1f7)+_0x974dfb['resultVariable']+'.'});}}validateAsyncExecution(_0x974dfb,_0x15d965,_0x3c5084),validateApprovalTimeout(_0x974dfb,_0x15d965,_0x3c5084),validateCcConfig(_0x974dfb,_0x15d965,_0x3c5084),_0x974dfb['type']===_0x3120d7(0x13f)&&validateNotificationConfig(_0x974dfb[_0x3120d7(0x16d)],_0x15d965+_0x3120d7(0xe0),_0x3c5084);}function validateAsyncExecution(_0x3e9368,_0x3bc72c,_0x29dc47){const _0x302c68=a299_0x1427a8;if(_0x3e9368[_0x302c68(0x1cd)]===undefined)return;if(!isRecord(_0x3e9368[_0x302c68(0x1cd)])){_0x29dc47[_0x302c68(0xe8)]({'path':_0x3bc72c+_0x302c68(0x13e),'message':_0x302c68(0x17f)});return;}if(_0x3e9368['async'][_0x302c68(0x114)]!==undefined&&typeof _0x3e9368['async'][_0x302c68(0x114)]!==_0x302c68(0x183)){_0x29dc47[_0x302c68(0xe8)]({'path':_0x3bc72c+'.async.enabled','message':_0x302c68(0x1c7)});return;}if(_0x3e9368[_0x302c68(0x1cd)][_0x302c68(0x114)]!==!![])return;_0x3e9368[_0x302c68(0xed)]!==_0x302c68(0x159)&&_0x29dc47['push']({'path':_0x3bc72c+'.async','message':'async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.'});const _0x1a7581=_0x3e9368['async'][_0x302c68(0x135)]??0x3;(!Number['isInteger'](_0x1a7581)||_0x1a7581<0x1||_0x1a7581>MAX_ASYNC_RETRY_COUNT)&&_0x29dc47['push']({'path':_0x3bc72c+'.async.retryCount','message':_0x302c68(0x1ee)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x3e9368[_0x302c68(0x1cd)][_0x302c68(0x196)]!==undefined&&validateTimeAmount(_0x3e9368[_0x302c68(0x1cd)]['retryInterval'],_0x3bc72c+_0x302c68(0x14d),_0x29dc47);}function validateApprovalTimeout(_0x36f7d1,_0x433c8f,_0x5cbe01){const _0xbe1621=a299_0x1427a8;if(_0x36f7d1[_0xbe1621(0x191)]===undefined)return;if(!isRecord(_0x36f7d1[_0xbe1621(0x191)])){_0x5cbe01[_0xbe1621(0xe8)]({'path':_0x433c8f+_0xbe1621(0xcd),'message':_0xbe1621(0x1a4)});return;}if(_0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x114)]!==undefined&&typeof _0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x114)]!==_0xbe1621(0x183)){_0x5cbe01['push']({'path':_0x433c8f+_0xbe1621(0x168),'message':_0xbe1621(0x111)});return;}if(_0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x114)]!==!![])return;if(_0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x186)]!==undefined&&typeof _0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x186)]!=='boolean'){_0x5cbe01['push']({'path':_0x433c8f+_0xbe1621(0xef),'message':_0xbe1621(0x227)});return;}_0x36f7d1[_0xbe1621(0xed)]!=='APPROVAL'&&_0x5cbe01['push']({'path':_0x433c8f+'.timeout','message':_0xbe1621(0xd2)});validateTimeAmount(_0x36f7d1[_0xbe1621(0x191)]['duration'],_0x433c8f+_0xbe1621(0x17d),_0x5cbe01);const _0x2c2229=_0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x180)];if(!APPROVAL_TIMEOUT_ACTIONS[_0xbe1621(0x1cb)](_0x2c2229)){_0x5cbe01[_0xbe1621(0xe8)]({'path':_0x433c8f+_0xbe1621(0xce),'message':_0xbe1621(0xfa)});return;}(_0x36f7d1[_0xbe1621(0x182)]??'APPROVAL')==='HANDLE'&&_0x2c2229!=='EXECUTE_BFF'&&_0x5cbe01[_0xbe1621(0xe8)]({'path':_0x433c8f+'.timeout.action','message':_0xbe1621(0x136)});const _0x3cbfc0=_0x36f7d1['timeout'][_0xbe1621(0x186)]??_0x2c2229!=='EXECUTE_BFF';if(_0x2c2229==='EXECUTE_BFF')_0x3cbfc0&&_0x5cbe01[_0xbe1621(0xe8)]({'path':_0x433c8f+_0xbe1621(0xef),'message':'EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.'}),(typeof _0x36f7d1[_0xbe1621(0x191)][_0xbe1621(0x228)]!=='string'||_0x36f7d1[_0xbe1621(0x191)]['scriptName'][_0xbe1621(0x1ec)]()==='')&&_0x5cbe01['push']({'path':_0x433c8f+_0xbe1621(0xd5),'message':_0xbe1621(0xdd)}),validateOptionalResultVariable(_0x36f7d1['timeout'][_0xbe1621(0x1af)],_0x433c8f+_0xbe1621(0x1c5),_0x5cbe01);else!_0x3cbfc0&&_0x5cbe01[_0xbe1621(0xe8)]({'path':_0x433c8f+'.timeout.interrupting','message':_0x2c2229+_0xbe1621(0x187)});}function validateTimeAmount(_0x36904c,_0x9a014b,_0x280de0){const _0x466228=a299_0x1427a8;if(!isRecord(_0x36904c)){_0x280de0[_0x466228(0xe8)]({'path':_0x9a014b,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x466228(0x16a)](_0x36904c[_0x466228(0x1c8)])||Number(_0x36904c[_0x466228(0x1c8)])<=0x0)&&_0x280de0[_0x466228(0xe8)]({'path':_0x9a014b+_0x466228(0x1e5),'message':_0x466228(0x1cf)}),!FLOW_TIME_UNITS['has'](_0x36904c[_0x466228(0xf5)])&&_0x280de0[_0x466228(0xe8)]({'path':_0x9a014b+_0x466228(0x10f),'message':_0x466228(0x188)});}function validateOptionalResultVariable(_0x12226d,_0x484be9,_0x44b6f6){const _0x22b6c5=a299_0x1427a8;if(_0x12226d===undefined||_0x12226d===null||_0x12226d==='')return;if(typeof _0x12226d!==_0x22b6c5(0xe4)||!VARIABLE_PATTERN[_0x22b6c5(0x146)](_0x12226d))_0x44b6f6['push']({'path':_0x484be9,'message':_0x22b6c5(0x1bf)});else(RESERVED_RESULT_VARIABLES[_0x22b6c5(0x1cb)](_0x12226d)||_0x12226d[_0x22b6c5(0x1ab)]('approval_sys_'))&&_0x44b6f6['push']({'path':_0x484be9,'message':_0x22b6c5(0x1f7)+_0x12226d+'.'});}function validateCcConfig(_0x54ffc6,_0x4bb542,_0x2b50ff){const _0x196cbd=a299_0x1427a8;if(_0x54ffc6['cc']===undefined)return;if(!isRecord(_0x54ffc6['cc'])){_0x2b50ff['push']({'path':_0x4bb542+_0x196cbd(0x1ac),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x54ffc6[_0x196cbd(0xed)]!==_0x196cbd(0x103)&&_0x54ffc6[_0x196cbd(0xed)]!=='APPROVAL'&&_0x2b50ff[_0x196cbd(0xe8)]({'path':_0x4bb542+_0x196cbd(0x1ac),'message':'Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.'});Object[_0x196cbd(0xf3)][_0x196cbd(0x1e7)][_0x196cbd(0x161)](_0x54ffc6['cc'],_0x196cbd(0x1f1))&&_0x2b50ff['push']({'path':_0x4bb542+_0x196cbd(0x1f0),'message':UNSUPPORTED_FORM_MESSAGE});const _0x16bb66=_0x54ffc6['cc'][_0x196cbd(0x126)];if(!Array['isArray'](_0x16bb66)||_0x16bb66[_0x196cbd(0x131)]===0x0)_0x2b50ff[_0x196cbd(0xe8)]({'path':_0x4bb542+_0x196cbd(0x150),'message':_0x196cbd(0x1e3)});else{_0x16bb66[_0x196cbd(0x131)]>MAX_CC_RECIPIENTS&&_0x2b50ff['push']({'path':_0x4bb542+_0x196cbd(0x150),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x196cbd(0x20c)});const _0x24fcd6=new Set();_0x16bb66[_0x196cbd(0x1a5)]((_0x202696,_0x4ae4d1)=>{const _0x4772a8=_0x196cbd;if(typeof _0x202696!=='string'||_0x202696['trim']()==='')_0x2b50ff['push']({'path':_0x4bb542+'.cc.recipientUserIds['+_0x4ae4d1+']','message':_0x4772a8(0x15f)});else _0x24fcd6['has'](_0x202696[_0x4772a8(0x1ec)]())?_0x2b50ff[_0x4772a8(0xe8)]({'path':_0x4bb542+_0x4772a8(0x1b7)+_0x4ae4d1+']','message':_0x4772a8(0xc6)+_0x202696[_0x4772a8(0x1ec)]()+'.'}):_0x24fcd6[_0x4772a8(0xdb)](_0x202696['trim']());});}validateStringArray(_0x54ffc6['cc'][_0x196cbd(0x195)],_0x4bb542+_0x196cbd(0x1fc),_0x2b50ff);}function validateStringArray(_0x1a93e1,_0x3f96d6,_0x57ead3){const _0x478d7d=a299_0x1427a8;if(_0x1a93e1===undefined)return;if(!Array[_0x478d7d(0xe9)](_0x1a93e1)){_0x57ead3[_0x478d7d(0xe8)]({'path':_0x3f96d6,'message':_0x478d7d(0x1ce)});return;}const _0x4a01c9=new Set();_0x1a93e1[_0x478d7d(0x1a5)]((_0x5368b4,_0x2b6286)=>{const _0x22f982=_0x478d7d;if(typeof _0x5368b4!==_0x22f982(0xe4)||_0x5368b4[_0x22f982(0x1ec)]()==='')_0x57ead3[_0x22f982(0xe8)]({'path':_0x3f96d6+'['+_0x2b6286+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x4a01c9[_0x22f982(0x1cb)](_0x5368b4[_0x22f982(0x1ec)]())?_0x57ead3[_0x22f982(0xe8)]({'path':_0x3f96d6+'['+_0x2b6286+']','message':'Duplicate\x20value:\x20'+_0x5368b4[_0x22f982(0x1ec)]()+'.'}):_0x4a01c9[_0x22f982(0xdb)](_0x5368b4[_0x22f982(0x1ec)]());});}function validateNotificationConfig(_0x5083bd,_0x554410,_0x46563b){const _0xa6ff31=a299_0x1427a8;if(!isRecord(_0x5083bd)){_0x46563b['push']({'path':_0x554410,'message':_0xa6ff31(0x12e)});return;}if(_0x5083bd[_0xa6ff31(0x1e8)]!==undefined&&_0x5083bd[_0xa6ff31(0x1e8)]!==null){if(typeof _0x5083bd[_0xa6ff31(0x1e8)]!==_0xa6ff31(0xe4))_0x46563b[_0xa6ff31(0xe8)]({'path':_0x554410+_0xa6ff31(0x1e9),'message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x5083bd[_0xa6ff31(0x1e8)][_0xa6ff31(0x1ec)]()&&_0x5083bd['version'][_0xa6ff31(0x1ec)]()!=='v1'&&_0x46563b[_0xa6ff31(0xe8)]({'path':_0x554410+'.version','message':_0xa6ff31(0x143)+_0x5083bd[_0xa6ff31(0x1e8)]+'.'});}const _0x3bc830=requireNotificationString(_0x5083bd[_0xa6ff31(0x1a3)],_0x554410+_0xa6ff31(0x124),_0xa6ff31(0x1c0),_0x46563b);_0x3bc830?.['includes']('${')&&_0x46563b[_0xa6ff31(0xe8)]({'path':_0x554410+_0xa6ff31(0x124),'message':_0xa6ff31(0x1a7)});if(_0x5083bd[_0xa6ff31(0x215)]!==undefined&&_0x5083bd[_0xa6ff31(0x215)]!==null){if(typeof _0x5083bd[_0xa6ff31(0x215)]!==_0xa6ff31(0xe4))_0x46563b[_0xa6ff31(0xe8)]({'path':_0x554410+_0xa6ff31(0x1c1),'message':_0xa6ff31(0x1be)});else!NOTIFICATION_FAILURE_POLICIES[_0xa6ff31(0x1cb)](_0x5083bd[_0xa6ff31(0x215)]['trim']()[_0xa6ff31(0x224)]())&&_0x46563b[_0xa6ff31(0xe8)]({'path':_0x554410+_0xa6ff31(0x1c1),'message':_0xa6ff31(0x142)});}!isRecord(_0x5083bd[_0xa6ff31(0xc7)])?_0x46563b['push']({'path':_0x554410+'.template','message':_0xa6ff31(0xfc)}):validateNotificationTemplate(_0x5083bd[_0xa6ff31(0xc7)],_0x554410+_0xa6ff31(0x20e),_0x46563b),validateNotificationRecipients(_0x5083bd[_0xa6ff31(0x1a9)],_0x554410+_0xa6ff31(0x201),_0x46563b);}function validateNotificationTemplate(_0x2aef83,_0x57048d,_0x3706d4){const _0x2c73f0=a299_0x1427a8;for(const _0x220847 of[_0x2c73f0(0x1bd),_0x2c73f0(0x10e)]){const _0x4e55ea=requireNotificationString(_0x2aef83[_0x220847],_0x57048d+'.'+_0x220847,'Notification\x20template.'+_0x220847+_0x2c73f0(0x216),_0x3706d4);if(_0x4e55ea)validateNotificationPlaceholders(_0x4e55ea,_0x57048d+'.'+_0x220847,_0x3706d4);}_0x2aef83[_0x2c73f0(0x208)]!==undefined&&_0x2aef83[_0x2c73f0(0x208)]!==null&&(typeof _0x2aef83[_0x2c73f0(0x208)]!==_0x2c73f0(0xe4)?_0x3706d4[_0x2c73f0(0xe8)]({'path':_0x57048d+_0x2c73f0(0x1e0),'message':_0x2c73f0(0x19a)}):validateNotificationPlaceholders(_0x2aef83[_0x2c73f0(0x208)],_0x57048d+_0x2c73f0(0x1e0),_0x3706d4)),validateNotificationFacts(_0x2aef83[_0x2c73f0(0x1b5)],_0x57048d+_0x2c73f0(0x167),_0x3706d4),validateNotificationActions(_0x2aef83[_0x2c73f0(0x1c9)],_0x57048d+_0x2c73f0(0xf1),_0x3706d4);}function validateNotificationFacts(_0x26fbdb,_0x48c410,_0x4ca303){const _0x38d914=a299_0x1427a8;if(_0x26fbdb===undefined||_0x26fbdb===null)return;if(!Array[_0x38d914(0xe9)](_0x26fbdb)){_0x4ca303[_0x38d914(0xe8)]({'path':_0x48c410,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x26fbdb[_0x38d914(0x131)]>MAX_NOTIFICATION_FACTS&&_0x4ca303[_0x38d914(0xe8)]({'path':_0x48c410,'message':_0x38d914(0x160)+MAX_NOTIFICATION_FACTS+_0x38d914(0x133)}),_0x26fbdb[_0x38d914(0x1a5)]((_0x9d7a8f,_0x1a9e1c)=>{const _0x1da79b=_0x38d914,_0x3e53d6=_0x48c410+'['+_0x1a9e1c+']';if(!isRecord(_0x9d7a8f)){_0x4ca303[_0x1da79b(0xe8)]({'path':_0x3e53d6,'message':_0x1da79b(0xe3)});return;}for(const _0x357189 of['label','value']){const _0x3ed034=requireNotificationString(_0x9d7a8f[_0x357189],_0x3e53d6+'.'+_0x357189,_0x1da79b(0x101)+_0x357189+_0x1da79b(0x216),_0x4ca303);_0x3ed034&&validateNotificationPlaceholders(_0x3ed034,_0x3e53d6+'.'+_0x357189,_0x4ca303);}});}function validateNotificationActions(_0x544118,_0x429604,_0x110eba){const _0x4d61ec=a299_0x1427a8;if(_0x544118===undefined||_0x544118===null)return;if(!Array[_0x4d61ec(0xe9)](_0x544118)){_0x110eba['push']({'path':_0x429604,'message':_0x4d61ec(0x10d)});return;}_0x544118['length']>MAX_NOTIFICATION_ACTIONS&&_0x110eba[_0x4d61ec(0xe8)]({'path':_0x429604,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x4d61ec(0x147)}),_0x544118[_0x4d61ec(0x1a5)]((_0x31653d,_0x227568)=>{const _0x7ee99e=_0x4d61ec,_0x2cba43=_0x429604+'['+_0x227568+']';if(!isRecord(_0x31653d)){_0x110eba[_0x7ee99e(0xe8)]({'path':_0x2cba43,'message':'Notification\x20action\x20must\x20be\x20an\x20object.'});return;}const _0x3e88ee=requireNotificationString(_0x31653d['text'],_0x2cba43+'.text',_0x7ee99e(0x109),_0x110eba);if(_0x3e88ee)validateNotificationPlaceholders(_0x3e88ee,_0x2cba43+_0x7ee99e(0x153),_0x110eba);const _0x4be6e6=requireNotificationString(_0x31653d[_0x7ee99e(0x1d4)],_0x2cba43+_0x7ee99e(0x1fb),_0x7ee99e(0x149),_0x110eba);if(!_0x4be6e6)return;validateNotificationPlaceholders(_0x4be6e6,_0x2cba43+_0x7ee99e(0x1fb),_0x110eba),!/^https?:\/\//i[_0x7ee99e(0x146)](_0x4be6e6)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN['test'](_0x4be6e6)&&_0x110eba[_0x7ee99e(0xe8)]({'path':_0x2cba43+'.url','message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function validateNotificationRecipients(_0x2b5348,_0x476e98,_0xfc1086){const _0x3c78d0=a299_0x1427a8;if(_0x2b5348===undefined||_0x2b5348===null)return;if(!Array[_0x3c78d0(0xe9)](_0x2b5348)){_0xfc1086[_0x3c78d0(0xe8)]({'path':_0x476e98,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x1df9ee=![];_0x2b5348[_0x3c78d0(0x1a5)]((_0x2ee159,_0x50aabd)=>{const _0x22abfe=_0x3c78d0,_0x509c21=_0x476e98+'['+_0x50aabd+']';if(!isRecord(_0x2ee159)){_0xfc1086[_0x22abfe(0xe8)]({'path':_0x509c21,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x2a4a1f=requireNotificationString(_0x2ee159[_0x22abfe(0xed)],_0x509c21+_0x22abfe(0x12a),_0x22abfe(0x1b1),_0xfc1086);_0x2a4a1f&&!NOTIFICATION_RECIPIENT_TYPES[_0x22abfe(0x1cb)](_0x2a4a1f[_0x22abfe(0x224)]())&&_0xfc1086['push']({'path':_0x509c21+_0x22abfe(0x12a),'message':_0x22abfe(0x1d7)});let _0x3e3f41='TO';_0x2ee159[_0x22abfe(0xf8)]!==undefined&&_0x2ee159[_0x22abfe(0xf8)]!==null&&(typeof _0x2ee159[_0x22abfe(0xf8)]!==_0x22abfe(0xe4)?(_0xfc1086['push']({'path':_0x509c21+_0x22abfe(0x200),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x3e3f41=''):(_0x3e3f41=_0x2ee159[_0x22abfe(0xf8)]['trim']()[_0x22abfe(0x224)](),!NOTIFICATION_RECIPIENT_ROLES[_0x22abfe(0x1cb)](_0x3e3f41)&&_0xfc1086['push']({'path':_0x509c21+_0x22abfe(0x200),'message':_0x22abfe(0x211)})));if(_0x3e3f41==='TO')_0x1df9ee=!![];const _0xb71b2f=requireNotificationString(_0x2ee159[_0x22abfe(0x1c8)],_0x509c21+'.value',_0x22abfe(0xe5),_0xfc1086);_0xb71b2f&&validateNotificationPlaceholders(_0xb71b2f,_0x509c21+_0x22abfe(0x1e5),_0xfc1086);}),_0x2b5348['length']>0x0&&!_0x1df9ee&&_0xfc1086[_0x3c78d0(0xe8)]({'path':_0x476e98,'message':_0x3c78d0(0x1ba)});}function requireNotificationString(_0x55c1c1,_0x4319e2,_0x47a59d,_0x51b54b){const _0x4f5ecf=a299_0x1427a8;if(typeof _0x55c1c1!==_0x4f5ecf(0xe4)||_0x55c1c1['trim']()==='')return _0x51b54b[_0x4f5ecf(0xe8)]({'path':_0x4319e2,'message':_0x47a59d}),undefined;return _0x55c1c1['trim']();}function validateNotificationPlaceholders(_0xcb6927,_0x2de187,_0x26a096){const _0x5de392=a299_0x1427a8;for(const _0xc7445c of _0xcb6927[_0x5de392(0x118)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x518942=_0xc7445c[0x1]?.[_0x5de392(0x1ec)]()??'',_0x2bbb5c=_0x518942[_0x5de392(0x22e)]('.'),_0x1548b3=_0x2bbb5c>=0x0?_0x518942[_0x5de392(0x164)](0x0,_0x2bbb5c):_0x518942,_0xb7b701=_0x2bbb5c>=0x0?_0x518942[_0x5de392(0x164)](_0x2bbb5c+0x1)[_0x5de392(0x1ec)]():'';(!['event',_0x5de392(0x165),_0x5de392(0x19f)][_0x5de392(0xeb)](_0x1548b3)||_0xb7b701==='')&&_0x26a096['push']({'path':_0x2de187,'message':_0x5de392(0x21a)+_0xc7445c[0x0]+'.'});}_0xcb6927[_0x5de392(0x10b)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x5de392(0xeb)]('${')&&_0x26a096[_0x5de392(0xe8)]({'path':_0x2de187,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x4ce1ad,_0x648abd,_0x136034){const _0x268922=a299_0x1427a8;_0x4ce1ad[_0x268922(0x1fe)]!==undefined&&typeof _0x4ce1ad[_0x268922(0x1fe)]!==_0x268922(0xe4)&&_0x136034[_0x268922(0xe8)]({'path':_0x648abd+'.name','message':_0x268922(0x132)}),_0x4ce1ad[_0x268922(0x1dd)]!==undefined&&typeof _0x4ce1ad[_0x268922(0x1dd)]!==_0x268922(0x183)&&_0x136034['push']({'path':_0x648abd+_0x268922(0x15e),'message':_0x268922(0xea)}),_0x4ce1ad[_0x268922(0x1f3)]!==undefined&&(!Array[_0x268922(0xe9)](_0x4ce1ad[_0x268922(0x1f3)])?_0x136034[_0x268922(0xe8)]({'path':_0x648abd+'.waypoints','message':_0x268922(0x1ff)}):_0x4ce1ad[_0x268922(0x1f3)][_0x268922(0x1a5)]((_0x1441fe,_0x15e3b3)=>{const _0x618720=_0x268922;if(!isRecord(_0x1441fe)){_0x136034['push']({'path':_0x648abd+_0x618720(0x1f6)+_0x15e3b3+']','message':_0x618720(0x207)});return;}for(const _0x589e81 of['x','y']){const _0x31cdb1=_0x1441fe[_0x589e81];(typeof _0x31cdb1!==_0x618720(0x21f)||!Number['isFinite'](_0x31cdb1))&&_0x136034['push']({'path':_0x648abd+_0x618720(0x1f6)+_0x15e3b3+'].'+_0x589e81,'message':_0x618720(0x144)+_0x589e81+'\x20must\x20be\x20a\x20finite\x20number.'});}})),_0x4ce1ad[_0x268922(0xc3)]!==undefined&&!CONDITION_TYPES[_0x268922(0x1cb)](_0x4ce1ad['conditionType'])&&_0x136034[_0x268922(0xe8)]({'path':_0x648abd+'.conditionType','message':_0x268922(0x1a1)+String(_0x4ce1ad['conditionType'])+'.'}),_0x4ce1ad[_0x268922(0xc3)]===_0x268922(0x175)&&(typeof _0x4ce1ad[_0x268922(0x181)]!==_0x268922(0xe4)||_0x4ce1ad[_0x268922(0x181)]['trim']()==='')&&_0x136034[_0x268922(0xe8)]({'path':_0x648abd+_0x268922(0x172),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x4ce1ad[_0x268922(0x1dd)]===!![]&&_0x4ce1ad[_0x268922(0xc3)]!=='ALWAYS'&&_0x136034['push']({'path':_0x648abd+_0x268922(0x15e),'message':_0x268922(0x17a)}),_0x4ce1ad[_0x268922(0x1dd)]===!![]&&typeof _0x4ce1ad['expression']==='string'&&_0x4ce1ad['expression'][_0x268922(0x1ec)]()!==''&&_0x136034['push']({'path':_0x648abd+_0x268922(0x172),'message':_0x268922(0x1d2)});}function validateGraphShape(_0x4e1be0,_0x58b9f3,_0x3fe40c,_0xa331b9,_0x545420,_0x1308c2,_0x4a3150){const _0x3600ed=a299_0x1427a8;for(const [_0x218776,_0x1c7a4e]of _0x4e1be0){const _0x48e588=_0x545420[_0x3600ed(0xc1)](_0x218776)??[],_0x347579=_0xa331b9['get'](_0x218776)??[];_0x1c7a4e[_0x3600ed(0xed)]!==_0x3600ed(0xe1)&&_0x48e588['length']===0x0&&_0x4a3150['push']({'path':_0x3600ed(0xd6)+_0x218776,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x1c7a4e[_0x3600ed(0xed)]!=='END'&&_0x347579['length']===0x0&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':_0x3600ed(0x1ca)});_0x1c7a4e[_0x3600ed(0xed)]==='START'&&_0x48e588[_0x3600ed(0x131)]>0x0&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':_0x3600ed(0x14b)});_0x1c7a4e['type']===_0x3600ed(0x103)&&_0x347579['length']>0x0&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':_0x3600ed(0x11d)});if(_0x1c7a4e[_0x3600ed(0xed)]==='CONDITION'){_0x347579['length']<0x2&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':_0x3600ed(0x17c)});const _0xf8a7c0=_0x347579['filter'](_0x49f719=>_0x49f719[_0x3600ed(0x1dd)]===!![]);_0xf8a7c0[_0x3600ed(0x131)]!==0x1&&_0x4a3150[_0x3600ed(0xe8)]({'path':'flowJson.nodes.'+_0x218776,'message':_0x3600ed(0x1ae)});if(_0xf8a7c0[_0x3600ed(0x131)]===0x1){const _0x101b18=_0xf8a7c0[0x0],_0x19fbd7=_0x1308c2[_0x3600ed(0xc1)](_0x101b18)??_0x3600ed(0x1d1);_0x101b18[_0x3600ed(0xc3)]!=='ALWAYS'&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x19fbd7+'.conditionType','message':'CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.'});_0x101b18[_0x3600ed(0x181)]!==undefined&&_0x4a3150['push']({'path':_0x19fbd7+_0x3600ed(0x172),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x5a9325 of _0x347579){if(_0x5a9325===_0x101b18)continue;const _0x289eb9=_0x1308c2['get'](_0x5a9325)??_0x3600ed(0x1d1);if(_0x5a9325[_0x3600ed(0xc3)]!==_0x3600ed(0x175))_0x4a3150['push']({'path':_0x289eb9+_0x3600ed(0x12c),'message':_0x3600ed(0x213)});else(typeof _0x5a9325['expression']!=='string'||_0x5a9325[_0x3600ed(0x181)]['trim']()==='')&&_0x4a3150['push']({'path':_0x289eb9+_0x3600ed(0x172),'message':_0x3600ed(0x100)});}}}if(_0x1c7a4e[_0x3600ed(0xed)]===_0x3600ed(0x129)&&(_0x1c7a4e[_0x3600ed(0x182)]??'APPROVAL')===_0x3600ed(0x1b4)){if(_0x347579[_0x3600ed(0x131)]!==0x1)_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':_0x3600ed(0xec)});else{const _0x4b93cf=_0x347579[0x0];((_0x4b93cf['conditionType']??_0x3600ed(0x117))!==_0x3600ed(0x117)||_0x4b93cf[_0x3600ed(0x1dd)]===!![]||typeof _0x4b93cf[_0x3600ed(0x181)]===_0x3600ed(0xe4)&&_0x4b93cf[_0x3600ed(0x181)][_0x3600ed(0x1ec)]()!=='')&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x1308c2[_0x3600ed(0xc1)](_0x4b93cf)??'flowJson.edges','message':_0x3600ed(0x19d)});}}else{if(_0x1c7a4e[_0x3600ed(0xed)]===_0x3600ed(0x129)){const _0x40e0c7=_0x347579[_0x3600ed(0x11a)](_0x567633=>_0x567633[_0x3600ed(0xc3)]??_0x3600ed(0x117)),_0x3480c2=_0x40e0c7[_0x3600ed(0x1f2)](_0x4c15e3=>_0x4c15e3!==_0x3600ed(0x22b)&&_0x4c15e3!==_0x3600ed(0x10a));_0x3480c2[_0x3600ed(0x131)]>0x0&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x40e0c7[_0x3600ed(0x1f2)](_0x5e16f0=>_0x5e16f0==='APPROVED')[_0x3600ed(0x131)]!==0x1&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':_0x3600ed(0x14a)}),_0x40e0c7['filter'](_0x34fbe1=>_0x34fbe1===_0x3600ed(0x10a))[_0x3600ed(0x131)]!==0x1&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x347579[_0x3600ed(0x1a2)](_0x31255d=>_0x31255d[_0x3600ed(0x1dd)]===!![])&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x218776,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x29aa61=new Set(),_0x115c67=_0x1ddfbe=>{const _0x39e7c0=_0x3600ed;if(_0x29aa61[_0x39e7c0(0x1cb)](_0x1ddfbe))return;_0x29aa61['add'](_0x1ddfbe);for(const _0x1d35bf of _0xa331b9[_0x39e7c0(0xc1)](_0x1ddfbe)??[]){const _0x43c476=resolveEdgeEndpoint(_0x1d35bf['target'],_0x1d35bf[_0x39e7c0(0x189)]);if(_0x43c476&&_0x4e1be0['has'](_0x43c476))_0x115c67(_0x43c476);}};_0x115c67(_0x58b9f3);for(const _0x5241ea of _0x4e1be0['keys']()){!_0x29aa61[_0x3600ed(0x1cb)](_0x5241ea)&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x5241ea,'message':_0x3600ed(0x229)});}const _0x560b79=_0x3fe40c['some'](_0x2cfe07=>_0x29aa61[_0x3600ed(0x1cb)](_0x2cfe07));if(!_0x560b79){_0x4a3150['push']({'path':'flowJson.edges','message':_0x3600ed(0x16e)});return;}const _0x54fb10=new Set(),_0x217107=_0x17f34a=>{const _0x2c8a4c=_0x3600ed;if(_0x54fb10[_0x2c8a4c(0x1cb)](_0x17f34a))return;_0x54fb10[_0x2c8a4c(0xdb)](_0x17f34a);for(const _0x3d06f4 of _0x545420[_0x2c8a4c(0xc1)](_0x17f34a)??[]){const _0x453000=resolveEdgeEndpoint(_0x3d06f4['source'],_0x3d06f4[_0x2c8a4c(0x1bc)]);if(_0x453000&&_0x4e1be0[_0x2c8a4c(0x1cb)](_0x453000))_0x217107(_0x453000);}};for(const _0x4eaff9 of _0x3fe40c){if(_0x4e1be0[_0x3600ed(0x1cb)](_0x4eaff9))_0x217107(_0x4eaff9);}for(const _0x38fdf3 of _0x29aa61){!_0x54fb10[_0x3600ed(0x1cb)](_0x38fdf3)&&_0x4a3150[_0x3600ed(0xe8)]({'path':_0x3600ed(0xd6)+_0x38fdf3,'message':_0x3600ed(0x217)});}}function validateApprovalResults(_0x475f3d,_0x3af4f9,_0x3b3048,_0xbcc53a){const _0x45e253=a299_0x1427a8;if(_0x3af4f9===0x0)return;const _0x197c4f=new Set(_0x3b3048[_0x45e253(0x11a)](_0x346cc1=>_0x475f3d['get'](_0x346cc1)?.[_0x45e253(0x14c)])[_0x45e253(0x1f2)](_0x33b5fe=>typeof _0x33b5fe==='string'));for(const _0x1db3f0 of[_0x45e253(0x22b),_0x45e253(0x10a)]){!_0x197c4f[_0x45e253(0x1cb)](_0x1db3f0)&&_0xbcc53a[_0x45e253(0xe8)]({'path':_0x45e253(0xe7),'message':_0x45e253(0x21b)+_0x1db3f0+'.'});}}function validateScriptResultReferences(_0x75bfb3,_0x13fb86,_0x4261a8,_0x1f45bc,_0x9b4666,_0x4f89dc,_0x1833ce){const _0x6c6bce=a299_0x1427a8;if(_0x4f89dc[_0x6c6bce(0x214)]===0x0)return;const _0x6d47eb=new Set(),_0x4b0290=_0x901375=>{const _0x4490e7=_0x6c6bce;if(!_0x6d47eb['has'](_0x901375)&&_0x75bfb3[_0x4490e7(0x1cb)](_0x901375)){_0x6d47eb[_0x4490e7(0xdb)](_0x901375);for(const _0x17cdd7 of _0x4261a8[_0x4490e7(0xc1)](_0x901375)??[]){const _0x5c4936=resolveEdgeEndpoint(_0x17cdd7['target'],_0x17cdd7[_0x4490e7(0x189)]);if(_0x5c4936)_0x4b0290(_0x5c4936);}}};_0x4b0290(_0x13fb86);const _0x4fea1d=new Map();for(const _0x5c78a7 of _0x6d47eb){_0x4fea1d['set'](_0x5c78a7,_0x5c78a7===_0x13fb86?new Set([_0x13fb86]):new Set(_0x6d47eb));}let _0x1238e8=!![];while(_0x1238e8){_0x1238e8=![];for(const _0x2f3058 of _0x6d47eb){if(_0x2f3058===_0x13fb86)continue;const _0x567435=(_0x1f45bc[_0x6c6bce(0xc1)](_0x2f3058)??[])[_0x6c6bce(0x11a)](_0x170bb1=>resolveEdgeEndpoint(_0x170bb1[_0x6c6bce(0x18a)],_0x170bb1[_0x6c6bce(0x1bc)]))['filter'](_0x2d8a43=>Boolean(_0x2d8a43&&_0x6d47eb[_0x6c6bce(0x1cb)](_0x2d8a43)));if(_0x567435[_0x6c6bce(0x131)]===0x0)continue;const _0x42cd1d=new Set(_0x4fea1d[_0x6c6bce(0xc1)](_0x567435[0x0])??[]);for(const _0x18052f of _0x567435['slice'](0x1)){const _0x3fedc4=_0x4fea1d[_0x6c6bce(0xc1)](_0x18052f)??new Set();for(const _0x1449f1 of _0x42cd1d){if(!_0x3fedc4[_0x6c6bce(0x1cb)](_0x1449f1))_0x42cd1d['delete'](_0x1449f1);}}_0x42cd1d['add'](_0x2f3058);const _0x4a7913=_0x4fea1d[_0x6c6bce(0xc1)](_0x2f3058);!setsEqual(_0x4a7913,_0x42cd1d)&&(_0x4fea1d[_0x6c6bce(0x1de)](_0x2f3058,_0x42cd1d),_0x1238e8=!![]);}}for(const [_0x4befe4,_0x7b2321]of _0x4261a8){const _0x2daeb9=_0x4fea1d['get'](_0x4befe4);if(!_0x2daeb9)continue;for(const _0x24c4ef of _0x7b2321){if(_0x24c4ef[_0x6c6bce(0xc3)]!==_0x6c6bce(0x175)||typeof _0x24c4ef[_0x6c6bce(0x181)]!==_0x6c6bce(0xe4))continue;for(const [_0x41bd9e,_0x1b840a]of _0x4f89dc){expressionReferencesVariable(_0x24c4ef[_0x6c6bce(0x181)],_0x41bd9e)&&!_0x2daeb9[_0x6c6bce(0x1cb)](_0x1b840a)&&_0x1833ce[_0x6c6bce(0xe8)]({'path':(_0x9b4666[_0x6c6bce(0xc1)](_0x24c4ef)??_0x6c6bce(0x1d1))+'.expression','message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x41bd9e+_0x6c6bce(0x1a8)+_0x1b840a+_0x6c6bce(0xd7)+_0x4befe4+'.'});}}}}function expressionReferencesVariable(_0x4661e0,_0x53fe2f){const _0x3e8184=a299_0x1427a8;let _0x5d009f=0x0;while(_0x5d009f<_0x4661e0[_0x3e8184(0x131)]){const _0x5f9374=_0x4661e0[_0x5d009f];if(_0x5f9374==='\x27'||_0x5f9374==='\x22'){_0x5d009f=skipQuotedExpressionSegment(_0x4661e0,_0x5d009f,_0x5f9374);continue;}if(!/[A-Za-z_]/['test'](_0x5f9374)){_0x5d009f+=0x1;continue;}const _0x480d1c=_0x5d009f;_0x5d009f+=0x1;while(_0x5d009f<_0x4661e0[_0x3e8184(0x131)]&&/[A-Za-z0-9_]/[_0x3e8184(0x146)](_0x4661e0[_0x5d009f])){_0x5d009f+=0x1;}if(_0x4661e0['slice'](_0x480d1c,_0x5d009f)!==_0x53fe2f)continue;let _0xc98d35=_0x480d1c-0x1;while(_0xc98d35>=0x0&&/\s/[_0x3e8184(0x146)](_0x4661e0[_0xc98d35])){_0xc98d35-=0x1;}if(_0x4661e0[_0xc98d35]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0xe4c22,_0x531322,_0x4b095f){const _0x2acbe5=a299_0x1427a8;let _0x48c27f=_0x531322+0x1;while(_0x48c27f<_0xe4c22[_0x2acbe5(0x131)]){if(_0xe4c22[_0x48c27f]==='\x5c'){_0x48c27f+=0x2;continue;}if(_0xe4c22[_0x48c27f]===_0x4b095f)return _0x48c27f+0x1;_0x48c27f+=0x1;}return _0x48c27f;}function resolveEffectiveResultVariable(_0x4b06c6,_0x3528ab){const _0x2fe11f=a299_0x1427a8;if(_0x4b06c6===undefined||_0x4b06c6===null||_0x3528ab&&_0x4b06c6==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x4b06c6!=='string'||!VARIABLE_PATTERN['test'](_0x4b06c6)||RESERVED_RESULT_VARIABLES[_0x2fe11f(0x1cb)](_0x4b06c6)||_0x4b06c6[_0x2fe11f(0x1ab)]('approval_sys_'))return undefined;return _0x4b06c6;}function registerResultVariableOwner(_0x4b165e,_0x2511fc,_0x6a013f,_0x357677){const _0x16292d=a299_0x1427a8;if(_0x4b165e[_0x16292d(0x1cb)](_0x2511fc)){_0x357677[_0x16292d(0xe8)]({'path':_0x16292d(0xe7),'message':_0x16292d(0x202)+_0x2511fc+'.'});return;}_0x4b165e[_0x16292d(0x1de)](_0x2511fc,_0x6a013f);}function setsEqual(_0x13f369,_0xa6552){const _0x147d6d=a299_0x1427a8;return _0x13f369['size']===_0xa6552[_0x147d6d(0x214)]&&[..._0x13f369][_0x147d6d(0x212)](_0x4b6a36=>_0xa6552['has'](_0x4b6a36));}function isValidUserId(_0x2119fa){const _0x177e58=a299_0x1427a8;if(typeof _0x2119fa===_0x177e58(0xe4))return _0x2119fa[_0x177e58(0x1ec)]()[_0x177e58(0x131)]>0x0;return Number[_0x177e58(0x18f)](_0x2119fa)&&Number(_0x2119fa)>0x0;}function resolveEdgeEndpoint(_0x4e8305,_0x3af7f){const _0x16d19b=a299_0x1427a8;if(typeof _0x4e8305===_0x16d19b(0xe4)&&_0x4e8305[_0x16d19b(0x1ec)]())return _0x4e8305['trim']();if(typeof _0x3af7f==='string'&&_0x3af7f[_0x16d19b(0x1ec)]())return _0x3af7f['trim']();return undefined;}function removeEmptyMetadata(_0x15ef47,_0x12c4bb,_0x381f01,_0xb0e10d){const _0x92ddf8=a299_0x1427a8;if(Array[_0x92ddf8(0xe9)](_0x15ef47)){_0x15ef47[_0x92ddf8(0x1a5)]((_0x20b877,_0x10a392)=>removeEmptyMetadata(_0x20b877,_0x12c4bb+'['+_0x10a392+']',_0x381f01,_0xb0e10d));return;}if(!isRecord(_0x15ef47))return;for(const [_0x47c5b9,_0x208983]of Object[_0x92ddf8(0x19c)](_0x15ef47)){const _0x1e3dfe=_0x12c4bb+'.'+_0x47c5b9;if(_0x47c5b9===_0x92ddf8(0x121)&&isEmptyJsonValue(_0x208983)){delete _0x15ef47[_0x47c5b9],_0xb0e10d['push'](_0x1e3dfe),_0x381f01[_0x92ddf8(0xe8)]({'code':_0x92ddf8(0xd1),'path':_0x1e3dfe,'message':_0x1e3dfe+_0x92ddf8(0xff)});continue;}removeEmptyMetadata(_0x208983,_0x1e3dfe,_0x381f01,_0xb0e10d);}}function isEmptyJsonValue(_0x2dd556){const _0x2885f1=a299_0x1427a8;if(_0x2dd556===null||_0x2dd556===undefined)return!![];if(typeof _0x2dd556===_0x2885f1(0xe4))return _0x2dd556[_0x2885f1(0x1ec)]()==='';if(Array['isArray'](_0x2dd556))return _0x2dd556[_0x2885f1(0x131)]===0x0;return isRecord(_0x2dd556)&&Object[_0x2885f1(0xf9)](_0x2dd556)[_0x2885f1(0x131)]===0x0;}function isRecord(_0x6bfb92){const _0x2b50f2=a299_0x1427a8;return typeof _0x6bfb92===_0x2b50f2(0x219)&&_0x6bfb92!==null&&!Array[_0x2b50f2(0xe9)](_0x6bfb92);}function cloneJsonValue(_0x34d1da){const _0x3fe474=a299_0x1427a8;return JSON[_0x3fe474(0x1d0)](JSON[_0x3fe474(0x1bb)](_0x34d1da));}export async function readFlowConfigFile(_0x3b8da9){const _0x473fba=a299_0x1427a8,_0x4ba4ba=await readFile(resolve(_0x3b8da9),_0x473fba(0x1d5));return JSON['parse'](_0x4ba4ba);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a300_0x461c37=a300_0x151c;(function(_0x53aadd,_0x2bd9b0){const _0x1e7611=a300_0x151c,_0x1ae128=_0x53aadd();while(!![]){try{const _0x4ea4d0=parseInt(_0x1e7611(0x9c))/0x1*(parseInt(_0x1e7611(0x7b))/0x2)+-parseInt(_0x1e7611(0x79))/0x3*(parseInt(_0x1e7611(0xa6))/0x4)+-parseInt(_0x1e7611(0x8b))/0x5+-parseInt(_0x1e7611(0x6c))/0x6*(-parseInt(_0x1e7611(0x6d))/0x7)+parseInt(_0x1e7611(0x8a))/0x8+-parseInt(_0x1e7611(0x9e))/0x9+parseInt(_0x1e7611(0x78))/0xa;if(_0x4ea4d0===_0x2bd9b0)break;else _0x1ae128['push'](_0x1ae128['shift']());}catch(_0x5beaa0){_0x1ae128['push'](_0x1ae128['shift']());}}}(a300_0x4629,0x30c4d));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';function a300_0x151c(_0x52eadd,_0x9744d3){_0x52eadd=_0x52eadd-0x6c;const _0x4629af=a300_0x4629();let _0x151c20=_0x4629af[_0x52eadd];return _0x151c20;}export const INSTANT_API_POLICY_RELATIVE_ROOT=a300_0x461c37(0x77);export const INSTANT_API_POLICY_FILE_NAME=a300_0x461c37(0x72);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;function a300_0x4629(){const _0x220423=['trim','ENOENT','object','size','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','rules','force','1186088IZkzLu','805190mghLGU','instant_api_policy_file_unreadable','instant_api_policy_version_invalid','Review\x20the\x20file\x20before\x20retrying.','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','defaults','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','overwritten','byteLength','isArray','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','version','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_exists','1iPFyqi','unchanged','756108oSlfmq','instant_api_policy_file_unwritable','includes','utf8','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','stringify','decode','224108WLWQIS','allow','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','6IhSOEC','1953049GimLkp','pid','code','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','string','policy.json','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','Policy\x20defaults.instantApi\x20is\x20required.','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','instant_api_policy_app_code_invalid','.rabetbase/instant-api-policy','955310FpvFjw','15fYkahc','instant_api_policy_file_missing','404286oIDnVm','appCode','policyRoot','instant_api_policy_app_code_mismatch','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','length','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','policyFilePath'];a300_0x4629=function(){return _0x220423;};return a300_0x4629();}export function instantApiPolicyError(_0x4e6030,_0x1b7db8,_0x174b4a){return new CliError(_0x4e6030,0x1,_0x1b7db8,_0x174b4a);}export function loadInstantApiPolicyLocalConfig(_0x2d39ae,_0x53d0ff){assertSafeAppCode(_0x2d39ae);const _0x3a3f9f=resolve(_0x53d0ff??findProjectRootDirectory()),_0x3ce6e9=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x2d39ae+'/'+INSTANT_API_POLICY_FILE_NAME,_0x3d550c=resolve(_0x3a3f9f,INSTANT_API_POLICY_RELATIVE_ROOT,_0x2d39ae),_0x433445=resolve(_0x3d550c,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x3a3f9f,'appCode':_0x2d39ae,'policyRoot':_0x3d550c,'policyFilePath':_0x433445,'policyRelativePath':_0x3ce6e9};}export function createDefaultInstantApiPolicyConfig(_0x5a9fff,_0x37bf44=a300_0x461c37(0xa7)){return assertSafeAppCode(_0x5a9fff),{'version':'2','appCode':_0x5a9fff,'defaults':{'instantApi':_0x37bf44},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x13adae){const _0xc6bdcf=a300_0x461c37;let _0xd01421;try{_0xd01421=await stat(_0x13adae[_0xc6bdcf(0x82)]);}catch(_0x1772f1){throw instantApiPolicyError(_0xc6bdcf(0x7a),_0xc6bdcf(0x70)+_0x13adae[_0xc6bdcf(0x82)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0xd01421['isFile']())throw instantApiPolicyError('instant_api_policy_file_invalid',_0xc6bdcf(0x99)+_0x13adae[_0xc6bdcf(0x82)]);if(_0xd01421[_0xc6bdcf(0x86)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0xc6bdcf(0x8f),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x3ca553;try{_0x3ca553=await readFile(_0x13adae[_0xc6bdcf(0x82)]);}catch{throw instantApiPolicyError(_0xc6bdcf(0x8c),_0xc6bdcf(0x7f)+_0x13adae[_0xc6bdcf(0x82)]);}if(_0x3ca553[_0xc6bdcf(0x95)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0xc6bdcf(0x8f),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x323d04;try{_0x323d04=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0xc6bdcf(0xa5)](_0x3ca553);}catch{throw instantApiPolicyError(_0xc6bdcf(0xa2),_0xc6bdcf(0x90)+_0x13adae[_0xc6bdcf(0x82)]);}let _0x3c51ff;try{_0x3c51ff=JSON['parse'](_0x323d04);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0xc6bdcf(0x81)+_0x13adae[_0xc6bdcf(0x82)]);}return assertLocalPolicyContract(_0x3c51ff,_0x13adae[_0xc6bdcf(0x7c)]);}export async function writeInstantApiPolicyConfigFile(_0x32a541,_0x3a4cb3,_0x333159={}){const _0x373dad=a300_0x461c37,_0x5e8299=assertLocalPolicyContract(_0x3a4cb3,_0x32a541['appCode']),_0x4e82d5=JSON[_0x373dad(0xa4)](_0x5e8299,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x4e82d5,_0x373dad(0xa1))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x373dad(0x8f),_0x373dad(0xa3));await mkdir(_0x32a541[_0x373dad(0x7d)],{'recursive':!![]});let _0x5550b7;try{_0x5550b7=await readFile(_0x32a541[_0x373dad(0x82)],'utf8');}catch(_0x1256f4){if(!isMissingFile(_0x1256f4))throw instantApiPolicyError(_0x373dad(0x8c),_0x373dad(0x9a)+_0x32a541[_0x373dad(0x82)]);}if(_0x5550b7===_0x4e82d5)return{'action':_0x373dad(0x9d),'filePath':_0x32a541['policyFilePath']};if(_0x5550b7!==undefined&&!_0x333159[_0x373dad(0x89)])throw instantApiPolicyError(_0x373dad(0x9b),_0x373dad(0x73)+_0x32a541[_0x373dad(0x82)],_0x373dad(0x75));if(_0x5550b7===undefined)try{return await writeFile(_0x32a541['policyFilePath'],_0x4e82d5,{'encoding':'utf8','flag':'wx'}),{'action':'created','filePath':_0x32a541[_0x373dad(0x82)]};}catch(_0x3ded22){if(!isAlreadyExists(_0x3ded22))throw instantApiPolicyError(_0x373dad(0x9f),_0x373dad(0x91)+_0x32a541['policyFilePath']);if(!_0x333159[_0x373dad(0x89)])throw instantApiPolicyError(_0x373dad(0x9b),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x32a541[_0x373dad(0x82)],_0x373dad(0x8e));}const _0x41cdd8=resolve(dirname(_0x32a541['policyFilePath']),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x373dad(0x6e)]+'.'+randomUUID()+'.tmp');try{await writeFile(_0x41cdd8,_0x4e82d5,{'encoding':'utf8','flag':'wx'}),await rename(_0x41cdd8,_0x32a541[_0x373dad(0x82)]);}catch{await unlink(_0x41cdd8)['catch'](()=>undefined);throw instantApiPolicyError(_0x373dad(0x9f),'Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20'+_0x32a541[_0x373dad(0x82)]);}return{'action':_0x373dad(0x94),'filePath':_0x32a541[_0x373dad(0x82)]};}function assertSafeAppCode(_0x54449a){const _0x5239d2=a300_0x461c37,_0x3421a0=_0x54449a[_0x5239d2(0x83)]();if(!_0x3421a0||_0x3421a0!==_0x54449a||_0x3421a0[_0x5239d2(0x80)]>0x64||_0x3421a0==='.'||_0x3421a0==='..'||_0x3421a0['includes']('/')||_0x3421a0['includes']('\x5c')||_0x3421a0[_0x5239d2(0xa0)]('\x00'))throw instantApiPolicyError(_0x5239d2(0x76),_0x5239d2(0x97));}function assertLocalPolicyContract(_0x3ea414,_0x2ed377){const _0x37d131=a300_0x461c37;if(!isObject(_0x3ea414))throw instantApiPolicyError('instant_api_policy_json_invalid',_0x37d131(0x87));if(_0x3ea414[_0x37d131(0x98)]!=='1'&&_0x3ea414[_0x37d131(0x98)]!=='2')throw instantApiPolicyError(_0x37d131(0x8d),_0x37d131(0xa8),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x3ea414[_0x37d131(0x7c)]!==_0x2ed377)throw instantApiPolicyError(_0x37d131(0x7e),_0x37d131(0x93)+_0x2ed377+'.');if(!isObject(_0x3ea414[_0x37d131(0x92)])||typeof _0x3ea414[_0x37d131(0x92)]['instantApi']!==_0x37d131(0x71))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x37d131(0x74));if(_0x3ea414['rules']!==undefined&&_0x3ea414[_0x37d131(0x88)]!==null&&!Array[_0x37d131(0x96)](_0x3ea414[_0x37d131(0x88)]))throw instantApiPolicyError('instant_api_policy_rules_invalid','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x3ea414;}function isObject(_0x504aa2){const _0xb61c17=a300_0x461c37;return _0x504aa2!==null&&typeof _0x504aa2===_0xb61c17(0x85)&&!Array['isArray'](_0x504aa2);}function isMissingFile(_0x4b7670){const _0x2ef81f=a300_0x461c37;return Boolean(_0x4b7670&&typeof _0x4b7670===_0x2ef81f(0x85)&&_0x4b7670[_0x2ef81f(0x6f)]===_0x2ef81f(0x84));}function isAlreadyExists(_0x1abbd3){const _0x405d90=a300_0x461c37;return Boolean(_0x1abbd3&&typeof _0x1abbd3==='object'&&_0x1abbd3[_0x405d90(0x6f)]==='EEXIST');}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const INSTANT_API_POLICY_PATHS: Readonly<{
|
|
2
|
+
current: "/smartapi/instant-api-policy/current";
|
|
3
|
+
validate: "/smartapi/instant-api-policy/validate";
|
|
4
|
+
publish: "/smartapi/instant-api-policy/publish";
|
|
5
|
+
revisions: "/smartapi/instant-api-policy/revisions";
|
|
6
|
+
revision: "/smartapi/instant-api-policy/revision";
|
|
7
|
+
rollback: "/smartapi/instant-api-policy/rollback";
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a301_0x437c4e=a301_0x4785;function a301_0x225b(){const _0x25d500=['276316WnpAMF','51461NxFdRO','72rjwzid','/publish','240562BCkKsX','/current','/revisions','2lLGKLk','freeze','295815sNzsPE','2759790BoONxB','2259580RIDTKy','5200533CSKuQF','/validate'];a301_0x225b=function(){return _0x25d500;};return a301_0x225b();}function a301_0x4785(_0x46708f,_0x28fc4c){_0x46708f=_0x46708f-0x151;const _0x225b68=a301_0x225b();let _0x4785c1=_0x225b68[_0x46708f];return _0x4785c1;}(function(_0x2cbc2c,_0x308a74){const _0x3c32d3=a301_0x4785,_0x647ce1=_0x2cbc2c();while(!![]){try{const _0x5cd233=parseInt(_0x3c32d3(0x157))/0x1*(-parseInt(_0x3c32d3(0x15d))/0x2)+parseInt(_0x3c32d3(0x151))/0x3+parseInt(_0x3c32d3(0x156))/0x4+parseInt(_0x3c32d3(0x153))/0x5+-parseInt(_0x3c32d3(0x152))/0x6+parseInt(_0x3c32d3(0x15a))/0x7*(-parseInt(_0x3c32d3(0x158))/0x8)+parseInt(_0x3c32d3(0x154))/0x9;if(_0x5cd233===_0x308a74)break;else _0x647ce1['push'](_0x647ce1['shift']());}catch(_0x5db71c){_0x647ce1['push'](_0x647ce1['shift']());}}}(a301_0x225b,0x5bf8d));const base='/smartapi/instant-api-policy';export const INSTANT_API_POLICY_PATHS=Object[a301_0x437c4e(0x15e)]({'current':base+a301_0x437c4e(0x15b),'validate':base+a301_0x437c4e(0x155),'publish':base+a301_0x437c4e(0x159),'revisions':base+a301_0x437c4e(0x15c),'revision':base+'/revision','rollback':base+'/rollback'});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KnowledgeClient, type KnowledgeRequestOptions } from "@lovrabet/sdk";
|
|
1
2
|
import { CliError } from "../errors.js";
|
|
2
3
|
export declare class KbManagementError extends CliError {
|
|
3
4
|
readonly transportFailure: boolean;
|
|
@@ -8,12 +9,5 @@ export declare class KbManagementError extends CliError {
|
|
|
8
9
|
}
|
|
9
10
|
/** Pin credential destination and cancellation for every read/write in one command. */
|
|
10
11
|
export declare function withKbManagementSession<T>(signal: AbortSignal | undefined, action: () => T): T;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
label: string;
|
|
14
|
-
method?: "POST";
|
|
15
|
-
body?: Record<string, unknown>;
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
}
|
|
18
|
-
/** Cookie-only unified transport. No retries and no upstream error-body disclosure. */
|
|
19
|
-
export declare function kbManagementRequest<T>(path: string, options: KbManagementOptions): Promise<T>;
|
|
12
|
+
/** Preserve CLI session/error semantics while callers invoke typed SDK resource methods. */
|
|
13
|
+
export declare function withKbManagementClient<T>(cookie: string, action: (client: Pick<KnowledgeClient, "company" | "rules">, options: KnowledgeRequestOptions) => Promise<T>, requestOptions?: KnowledgeRequestOptions): Promise<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a302_0xe12157=a302_0x491d;(function(_0x48fa33,_0x279f92){const _0xaabe90=a302_0x491d,_0x4a9700=_0x48fa33();while(!![]){try{const _0x4fe9e9=parseInt(_0xaabe90(0xf8))/0x1+parseInt(_0xaabe90(0xe6))/0x2*(parseInt(_0xaabe90(0xed))/0x3)+-parseInt(_0xaabe90(0xdb))/0x4*(-parseInt(_0xaabe90(0xdc))/0x5)+parseInt(_0xaabe90(0xe5))/0x6+-parseInt(_0xaabe90(0xe3))/0x7*(parseInt(_0xaabe90(0xee))/0x8)+-parseInt(_0xaabe90(0xec))/0x9*(-parseInt(_0xaabe90(0xe8))/0xa)+-parseInt(_0xaabe90(0xda))/0xb;if(_0x4fe9e9===_0x279f92)break;else _0x4a9700['push'](_0x4a9700['shift']());}catch(_0x570989){_0x4a9700['push'](_0x4a9700['shift']());}}}(a302_0x2ad6,0x5e0b0));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_0xe12157(0xf4),session=new AsyncLocalStorage();export class KbManagementError extends CliError{[a302_0xe12157(0xf1)];[a302_0xe12157(0xd8)];['httpStatus'];['pageTooLarge'];constructor(_0x542ddf,_0x19a0d7=![],_0x2d2359,_0x47d0ed,_0x807ee1=![]){const _0x45f08b=a302_0xe12157;super(_0x45f08b(0xf3),0x1,_0x542ddf,_0x2d2359?_0x45f08b(0xea)+_0x2d2359:undefined),this['transportFailure']=_0x19a0d7,this[_0x45f08b(0xd8)]=_0x2d2359,this[_0x45f08b(0xf9)]=_0x47d0ed,this[_0x45f08b(0xe1)]=_0x807ee1;if(_0x2d2359)Object['defineProperty'](this,_0x45f08b(0xf6),{'value':{'remoteErrorCode':_0x2d2359},'enumerable':![]});}}function resolveOrigin(){const _0x528abf=a302_0xe12157,_0x678fc0=getKbServiceDomain();if(!_0x678fc0)throw CliErrors[_0x528abf(0xef)](_0x528abf(0xeb));try{return normalizeKbServiceOrigin(_0x678fc0);}catch{throw CliErrors[_0x528abf(0xef)](_0x528abf(0xe7));}}function a302_0x491d(_0x16d0a4,_0x7aaae2){_0x16d0a4=_0x16d0a4-0xd7;const _0x2ad67c=a302_0x2ad6();let _0x491d10=_0x2ad67c[_0x16d0a4];return _0x491d10;}function a302_0x2ad6(){const _0x5a2597=['remoteErrorCode','trim','7472916fGWUEd','8484hyygDw','1305vxVJet','auth','cookie','code','cancelled','pageTooLarge','kind','167111hcWpbL','run','73050WgNnKZ','23134kOTNvO','Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','96290ixbMGy','authRequired','API\x20error\x20code:\x20','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','234CjySDl','117PNJgKx','248STQzOD','validation','origin','transportFailure','writeUncertain','api_error','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','signal','data','cli:rabetbase','537396LwaoMJ','httpStatus','message','getStore'];a302_0x2ad6=function(){return _0x5a2597;};return a302_0x2ad6();}export function withKbManagementSession(_0xa9309e,_0x142528){const _0x2331da=a302_0xe12157;return session[_0x2331da(0xe4)]({'origin':resolveOrigin(),'signal':_0xa9309e},_0x142528);}export async function withKbManagementClient(_0x1d3fb9,_0x5a9ced,_0x738063={}){const _0x1055e3=a302_0xe12157,_0xf28c4e=session[_0x1055e3(0xd7)]()?.[_0x1055e3(0xf0)]??resolveOrigin();if(!_0x1d3fb9[_0x1055e3(0xd9)]())throw CliErrors['authRequired']();const _0x20f2fd=_0x738063[_0x1055e3(0xf5)]??session[_0x1055e3(0xd7)]()?.[_0x1055e3(0xf5)];if(_0x20f2fd?.['aborted'])throw CliErrors[_0x1055e3(0xe0)]('Knowledge\x20management\x20request\x20cancelled.');try{const _0x376bb0=createKnowledgeClient({'kbServiceDomain':_0xf28c4e,'authMode':_0x1055e3(0xde),'cookie':_0x1d3fb9,'invokeSource':_0x1055e3(0xf7)});return await _0x5a9ced(_0x376bb0,{'signal':_0x20f2fd});}catch(_0x378807){if(!(_0x378807 instanceof KnowledgeServiceError))throw _0x378807;if(_0x378807['kind']===_0x1055e3(0xdd))throw CliErrors[_0x1055e3(0xe9)]();if(_0x378807[_0x1055e3(0xe2)]===_0x1055e3(0xef))throw CliErrors[_0x1055e3(0xef)](_0x378807[_0x1055e3(0xfa)]);const _0x1c251f=_0x378807[_0x1055e3(0xe2)]==='network'||_0x378807[_0x1055e3(0xe2)]==='timeout'||_0x378807[_0x1055e3(0xe2)]==='cancelled';throw new KbManagementError(_0x378807[_0x1055e3(0xfa)]+(_0x378807[_0x1055e3(0xf2)]?WRITE_RECONCILIATION:''),_0x1c251f,/^\d+$/['test'](_0x378807[_0x1055e3(0xdf)]??'')?_0x378807[_0x1055e3(0xdf)]:undefined,_0x378807['status'],_0x378807[_0x1055e3(0xe1)]);}}
|
|
@@ -30,9 +30,6 @@ export interface DevelopmentKnowledgeSearchInput {
|
|
|
30
30
|
export interface DirectKnowledgeSearchInput extends DevelopmentKnowledgeSearchInput {
|
|
31
31
|
serviceUrl: string;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
export declare function parseKnowledgeJson(text: string): unknown;
|
|
35
|
-
/** Accept only an explicit TLS origin; never infer a credential destination. */
|
|
33
|
+
/** Map SDK origin validation to the stable CLI validation error. */
|
|
36
34
|
export declare function normalizeKbServiceOrigin(input: string): string;
|
|
37
|
-
/** Search directly through the authenticated unified knowledge contract. */
|
|
38
35
|
export declare function searchDirectKnowledge(input: DirectKnowledgeSearchInput): Promise<DevelopmentKnowledgeSearchResult>;
|