@lovrabet/rabetbase-cli 2.5.11 → 2.5.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.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/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.d.ts +1 -0
- 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.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.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- 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.d.ts +2 -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/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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a299_0x48fad8=a299_0x1582;(function(_0x2734a8,_0x30a631){const _0x446296=a299_0x1582,_0x3b80b7=_0x2734a8();while(!![]){try{const _0x2399b2=-parseInt(_0x446296(0x1af))/0x1*(parseInt(_0x446296(0x1dc))/0x2)+-parseInt(_0x446296(0x212))/0x3+parseInt(_0x446296(0x2a5))/0x4*(-parseInt(_0x446296(0x22d))/0x5)+-parseInt(_0x446296(0x1a4))/0x6+parseInt(_0x446296(0x26d))/0x7*(-parseInt(_0x446296(0x16d))/0x8)+parseInt(_0x446296(0x27e))/0x9+parseInt(_0x446296(0x248))/0xa*(parseInt(_0x446296(0x1a0))/0xb);if(_0x2399b2===_0x30a631)break;else _0x3b80b7['push'](_0x3b80b7['shift']());}catch(_0xbfb929){_0x3b80b7['push'](_0x3b80b7['shift']());}}}(a299_0x4ba9,0xb0979));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_0x48fad8(0x242),'$id':a299_0x48fad8(0x199),'title':'Rabetbase\x20FlowConfig','type':a299_0x48fad8(0x1c0),'required':[a299_0x48fad8(0x166),a299_0x48fad8(0x191),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a299_0x48fad8(0x238),'minLength':0x1},{'type':a299_0x48fad8(0x29f),'minimum':0x1}]},'position':{'type':a299_0x48fad8(0x1c0),'required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a299_0x48fad8(0x1b7),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x48fad8(0x1c0),'required':['value','unit'],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':[a299_0x48fad8(0x15d),'MINUTES',a299_0x48fad8(0x1c7),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':'object','required':['id','type',a299_0x48fad8(0x20e),'position'],'properties':{'id':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':['START',a299_0x48fad8(0x193),a299_0x48fad8(0x27f),a299_0x48fad8(0x15c),a299_0x48fad8(0x15f),'NOTIFICATION']},'name':{'type':a299_0x48fad8(0x238),'minLength':0x1},'path':{'type':a299_0x48fad8(0x238),'minLength':0x1},'position':{'$ref':a299_0x48fad8(0x22b)},'approvalMode':{'enum':[a299_0x48fad8(0x190),a299_0x48fad8(0x1b3),'ANY']},'taskMode':{'enum':[a299_0x48fad8(0x27f),'HANDLE']},'assignee':{'type':a299_0x48fad8(0x1c0),'required':['strategy'],'properties':{'strategy':{'enum':[a299_0x48fad8(0x18b),'ROLE']},'userIds':{'type':a299_0x48fad8(0x24e),'minItems':0x1,'items':{'$ref':a299_0x48fad8(0x280)}},'roleId':{'anyOf':[{'type':a299_0x48fad8(0x29f),'minimum':0x1},{'type':a299_0x48fad8(0x238),'pattern':a299_0x48fad8(0x1d0)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x48fad8(0x1c0),'required':[a299_0x48fad8(0x229),a299_0x48fad8(0x223)],'properties':{'strategy':{'const':a299_0x48fad8(0x18b)},'userIds':{'type':a299_0x48fad8(0x24e),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0x48fad8(0x219),'REJECTED']},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x48fad8(0x238),'pattern':a299_0x48fad8(0x240)},'async':{'type':'object','properties':{'enabled':{'type':a299_0x48fad8(0x170)},'retryCount':{'type':a299_0x48fad8(0x29f),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x48fad8(0x20f)}},'additionalProperties':!![]},'timeout':{'type':a299_0x48fad8(0x1c0),'properties':{'enabled':{'type':a299_0x48fad8(0x170)},'duration':{'$ref':'#/$defs/timeAmount'},'action':{'enum':[a299_0x48fad8(0x1c4),a299_0x48fad8(0x1b1),a299_0x48fad8(0x160)]},'interrupting':{'type':a299_0x48fad8(0x170)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x48fad8(0x238),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':'object','required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a299_0x48fad8(0x24e),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x48fad8(0x238),'minLength':0x1}},'visible':{'type':a299_0x48fad8(0x24e),'uniqueItems':!![],'items':{'type':a299_0x48fad8(0x238),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x48fad8(0x1c0),'required':[a299_0x48fad8(0x2a1),a299_0x48fad8(0x2a6)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x48fad8(0x238),'minLength':0x1},'failurePolicy':{'enum':[a299_0x48fad8(0x292),a299_0x48fad8(0x2b4)]},'template':{'type':a299_0x48fad8(0x1c0),'required':[a299_0x48fad8(0x1a6),a299_0x48fad8(0x267)],'properties':{'title':{'type':a299_0x48fad8(0x238),'minLength':0x1},'summary':{'type':a299_0x48fad8(0x238),'minLength':0x1},'detailMarkdown':{'type':a299_0x48fad8(0x238)},'facts':{'type':a299_0x48fad8(0x24e),'maxItems':0x8,'items':{'type':a299_0x48fad8(0x1c0),'required':['label',a299_0x48fad8(0x231)],'properties':{'label':{'type':a299_0x48fad8(0x238),'minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x48fad8(0x24e),'maxItems':0x2,'items':{'type':a299_0x48fad8(0x1c0),'required':['text',a299_0x48fad8(0x2b6)],'properties':{'text':{'type':a299_0x48fad8(0x238),'minLength':0x1},'url':{'type':a299_0x48fad8(0x238),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x48fad8(0x24e),'items':{'type':a299_0x48fad8(0x1c0),'required':[a299_0x48fad8(0x290),a299_0x48fad8(0x231)],'properties':{'type':{'enum':[a299_0x48fad8(0x23b),a299_0x48fad8(0x176),a299_0x48fad8(0x2b9)]},'value':{'type':a299_0x48fad8(0x238),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x48fad8(0x1c0),'properties':{'id':{'type':a299_0x48fad8(0x238),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a299_0x48fad8(0x238),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a299_0x48fad8(0x238),'minLength':0x1},'targetNodeId':{'type':a299_0x48fad8(0x238),'minLength':0x1},'conditionType':{'enum':[a299_0x48fad8(0x16f),'APPROVED',a299_0x48fad8(0x28f),a299_0x48fad8(0x1d6)]},'expression':{'type':a299_0x48fad8(0x238)},'defaultFlow':{'type':'boolean'},'name':{'type':a299_0x48fad8(0x238)},'waypoints':{'type':a299_0x48fad8(0x24e),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x48fad8(0x1d2)]},{'required':[a299_0x48fad8(0x162)]}]},{'anyOf':[{'required':['target']},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x48fad8(0x238),'minLength':0x1},'flowDesc':{'type':a299_0x48fad8(0x238)},'flowType':{'enum':[a299_0x48fad8(0x236),a299_0x48fad8(0x2a8)]},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a299_0x48fad8(0x29f),'minimum':0x1,'maximum':Number[a299_0x48fad8(0x29b)]},'pageIds':{'type':a299_0x48fad8(0x24e),'items':{'type':'integer','minimum':0x1,'maximum':Number[a299_0x48fad8(0x29b)]}},'templateName':![],'flowJson':{'type':a299_0x48fad8(0x1c0),'required':[a299_0x48fad8(0x2b0),a299_0x48fad8(0x215)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x48fad8(0x181),'description':a299_0x48fad8(0x19f)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x48fad8(0x28a)},'startPageId':![],'startPath':{'type':a299_0x48fad8(0x238),'minLength':0x1},'nodes':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x48fad8(0x286)}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':a299_0x48fad8(0x2b2)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x48fad8(0x2c0),a299_0x48fad8(0x2b8),a299_0x48fad8(0x166),a299_0x48fad8(0x1bf),a299_0x48fad8(0x19d),a299_0x48fad8(0x211),a299_0x48fad8(0x188),a299_0x48fad8(0x1d1)],REMOVED_ROOT_FIELDS=['id',a299_0x48fad8(0x211),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x48fad8(0x181),NODE_TYPES=new Set([a299_0x48fad8(0x18f),a299_0x48fad8(0x193),a299_0x48fad8(0x27f),a299_0x48fad8(0x15c),a299_0x48fad8(0x15f),a299_0x48fad8(0x1ef)]),CONDITION_TYPES=new Set([a299_0x48fad8(0x16f),a299_0x48fad8(0x219),a299_0x48fad8(0x28f),a299_0x48fad8(0x1d6)]),APPROVAL_MODES=new Set([a299_0x48fad8(0x190),a299_0x48fad8(0x1b3),a299_0x48fad8(0x207)]),APPROVAL_TASK_MODES=new Set([a299_0x48fad8(0x27f),a299_0x48fad8(0x1ba)]),FLOW_TIME_UNITS=new Set(['SECONDS',a299_0x48fad8(0x1db),a299_0x48fad8(0x1c7),a299_0x48fad8(0x295)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a299_0x48fad8(0x1b1),a299_0x48fad8(0x160)]),FLOW_TYPES=new Set([a299_0x48fad8(0x236),a299_0x48fad8(0x2a8)]),FLOW_PAGE_MODES=new Set([a299_0x48fad8(0x28a),a299_0x48fad8(0x185)]),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(['CONTINUE',a299_0x48fad8(0x2b4)]),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER',a299_0x48fad8(0x176),a299_0x48fad8(0x2b9)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x48fad8(0x27d)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x48fad8(0x1d3),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([a299_0x48fad8(0x270),'approved',a299_0x48fad8(0x1f8),a299_0x48fad8(0x26b),'approval_sys_initiatorUserId',a299_0x48fad8(0x216),a299_0x48fad8(0x2a9),a299_0x48fad8(0x2bf),a299_0x48fad8(0x22a),a299_0x48fad8(0x2a4)]);export function normalizeFlowConfig(_0x4c497e){const _0x5e5d9e=a299_0x48fad8;if(!isRecord(_0x4c497e))throw new TypeError(_0x5e5d9e(0x175));const _0x253f63=cloneJsonValue(_0x4c497e),_0x28c0c7=_0x253f63[_0x5e5d9e(0x168)],_0x3b2739=isRecord(_0x28c0c7)?cloneJsonValue(_0x28c0c7):{},_0x57cc8f=[],_0x425729=[];for(const _0x21f26c of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x5e5d9e(0x24a)]['call'](_0x253f63,_0x21f26c))continue;delete _0x253f63[_0x21f26c],_0x425729['push'](_0x21f26c),_0x57cc8f[_0x5e5d9e(0x1d7)]({'code':_0x5e5d9e(0x247),'path':_0x21f26c,'message':_0x21f26c+_0x5e5d9e(0x164)});}for(const _0x5bef9f of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0x5e5d9e(0x24a)][_0x5e5d9e(0x29c)](_0x3b2739,_0x5bef9f))continue;const _0xb65415=_0x5e5d9e(0x1dd)+_0x5bef9f;delete _0x3b2739[_0x5bef9f],_0x425729[_0x5e5d9e(0x1d7)](_0xb65415),_0x57cc8f[_0x5e5d9e(0x1d7)]({'code':_0x5e5d9e(0x247),'path':_0xb65415,'message':_0xb65415+_0x5e5d9e(0x164)});}if(Object[_0x5e5d9e(0x28c)]['hasOwnProperty']['call'](_0x3b2739,_0x5e5d9e(0x1da))){const _0x5759be=_0x3b2739[_0x5e5d9e(0x1da)],_0x437e0d=typeof _0x5759be==='string'?_0x5759be[_0x5e5d9e(0x2ba)]():_0x5759be;if(isEmptyJsonValue(_0x5759be)||_0x437e0d===DEFAULT_FLOW_SCHEMA_VERSION){const _0xb2fe0f=_0x5e5d9e(0x15b);delete _0x3b2739[_0x5e5d9e(0x1da)],_0x425729[_0x5e5d9e(0x1d7)](_0xb2fe0f),_0x57cc8f[_0x5e5d9e(0x1d7)]({'code':_0x5e5d9e(0x247),'path':_0xb2fe0f,'message':_0xb2fe0f+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x5e5d9e(0x189)});}}removeEmptyMetadata(_0x3b2739,_0x5e5d9e(0x168),_0x57cc8f,_0x425729);_0x253f63[_0x5e5d9e(0x191)]===_0x5e5d9e(0x2a8)&&!Object[_0x5e5d9e(0x28c)][_0x5e5d9e(0x24a)]['call'](_0x3b2739,_0x5e5d9e(0x2b7))&&(_0x3b2739[_0x5e5d9e(0x2b7)]=_0x5e5d9e(0x28a));_0x253f63['flowJson']=_0x3b2739;if(typeof _0x253f63[_0x5e5d9e(0x166)]===_0x5e5d9e(0x238))_0x253f63[_0x5e5d9e(0x166)]=_0x253f63[_0x5e5d9e(0x166)][_0x5e5d9e(0x2ba)]();return{'config':_0x253f63,'warnings':_0x57cc8f,'removedPaths':_0x425729};}export function validateFlowConfig(_0xa00df1){const _0x10315b=a299_0x48fad8;let _0xae2cbb;try{_0xae2cbb=normalizeFlowConfig(_0xa00df1);}catch(_0x144178){const _0x440990=_0x144178 instanceof Error?_0x144178[_0x10315b(0x234)]:String(_0x144178),_0x36d13e={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x440990}],'warnings':[],'normalized':_0x36d13e,'validationConfig':_0x36d13e};}const _0x26895f=_0xae2cbb[_0x10315b(0x192)],_0x372adb=cloneJsonValue(_0x26895f),_0x43058a=_0x372adb[_0x10315b(0x168)];_0x43058a[_0x10315b(0x2c0)]='__rabetbase_local_validation__',_0x43058a[_0x10315b(0x166)]=_0x26895f[_0x10315b(0x166)];typeof _0x26895f[_0x10315b(0x19d)]===_0x10315b(0x238)&&_0x26895f[_0x10315b(0x19d)][_0x10315b(0x2ba)]()&&(_0x43058a[_0x10315b(0x1bf)]=_0x26895f[_0x10315b(0x19d)][_0x10315b(0x2ba)]());const _0x2131e8=[];return validateOuterMetadata(_0x26895f,_0x2131e8),validateFlowClassification(_0x26895f,_0x2131e8),validateGraph(_0x26895f[_0x10315b(0x168)],_0x2131e8),{'valid':_0x2131e8['length']===0x0,'errors':_0x2131e8,'warnings':_0xae2cbb[_0x10315b(0x1fa)],'normalized':_0x26895f,'validationConfig':_0x372adb};}function validateFlowClassification(_0x580f69,_0x1a396f){const _0x1d2a57=a299_0x48fad8;if(!isRecord(_0x580f69[_0x1d2a57(0x168)]))return;const _0x2fcef6=_0x580f69['flowType'],_0x15bb4d=_0x580f69[_0x1d2a57(0x168)][_0x1d2a57(0x2b7)];_0x15bb4d!==undefined&&(typeof _0x15bb4d!==_0x1d2a57(0x238)||!FLOW_PAGE_MODES[_0x1d2a57(0x298)](_0x15bb4d))&&_0x1a396f[_0x1d2a57(0x1d7)]({'path':_0x1d2a57(0x197),'message':_0x1d2a57(0x274)+String(_0x15bb4d)+'.'});_0x2fcef6===_0x1d2a57(0x236)&&_0x15bb4d!==undefined&&_0x1a396f['push']({'path':_0x1d2a57(0x197),'message':_0x1d2a57(0x241)});_0x2fcef6==='INDEPENDENT_FLOW'&&_0x15bb4d==='PLATFORM_FORM'&&_0x1a396f['push']({'path':_0x1d2a57(0x197),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x2fcef6==='FORM_FLOW'||_0x2fcef6===_0x1d2a57(0x2a8))&&validateCustomPageNavigation(_0x580f69,_0x2fcef6,_0x15bb4d,_0x1a396f);if(_0x2fcef6!==_0x1d2a57(0x236)||!Array['isArray'](_0x580f69[_0x1d2a57(0x168)][_0x1d2a57(0x2b0)]))return;_0x580f69[_0x1d2a57(0x168)][_0x1d2a57(0x2b0)][_0x1d2a57(0x18e)]((_0x219593,_0x1f1ed7)=>{const _0x368eab=_0x1d2a57;isRecord(_0x219593)&&_0x219593[_0x368eab(0x290)]==='APPROVAL'&&_0x219593['taskMode']==='HANDLE'&&_0x1a396f[_0x368eab(0x1d7)]({'path':'flowJson.nodes['+_0x1f1ed7+_0x368eab(0x18d),'message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x2b6d10,_0x493f09,_0x4f66b9,_0x7790f4){const _0x5390ee=a299_0x48fad8,_0x5bce29=_0x2b6d10['flowJson']['startPageId'];_0x5bce29!==undefined&&_0x7790f4[_0x5390ee(0x1d7)]({'path':_0x5390ee(0x17d),'message':_0x5390ee(0x294)});const _0x353646=_0x2b6d10['flowJson']['startPath'];_0x353646!==undefined&&(typeof _0x353646!==_0x5390ee(0x238)||_0x353646[_0x5390ee(0x2ba)]()==='')&&_0x7790f4[_0x5390ee(0x1d7)]({'path':_0x5390ee(0x2ac),'message':_0x5390ee(0x17e)});const _0x365b46=Array[_0x5390ee(0x2ae)](_0x2b6d10[_0x5390ee(0x168)][_0x5390ee(0x2b0)])?_0x2b6d10[_0x5390ee(0x168)][_0x5390ee(0x2b0)][_0x5390ee(0x1a8)]((_0x104785,_0x104c88)=>({'node':_0x104785,'index':_0x104c88}))[_0x5390ee(0x26e)](({node:_0x4453d2})=>isRecord(_0x4453d2)&&_0x4453d2[_0x5390ee(0x271)]!==undefined):[],_0x255630=_0x353646!==undefined||_0x365b46['length']>0x0,_0x444aa3=_0x4f66b9===undefined&&_0x493f09==='INDEPENDENT_FLOW'?'CUSTOM_PAGE':_0x4f66b9;_0x255630&&(_0x493f09!==_0x5390ee(0x2a8)||_0x444aa3!==_0x5390ee(0x28a))&&(_0x353646!==undefined&&_0x7790f4['push']({'path':_0x5390ee(0x2ac),'message':_0x5390ee(0x22e)}),_0x365b46[_0x5390ee(0x18e)](({index:_0x3bf219})=>{const _0x30bd20=_0x5390ee;_0x7790f4[_0x30bd20(0x1d7)]({'path':_0x30bd20(0x1ed)+_0x3bf219+_0x30bd20(0x285),'message':_0x30bd20(0x1ca)});}));}export async function writeNormalizedFlowConfig(_0x526bab,_0x15ca30,_0x57f250={}){const _0x57af12=a299_0x48fad8,_0x41ea7e=resolve(_0x526bab),_0x2d487e=_0x41ea7e+'.'+process[_0x57af12(0x2ab)]+'.'+randomUUID()+_0x57af12(0x1cd),_0x25216b=JSON[_0x57af12(0x228)](_0x15ca30,null,0x2)+'\x0a';let _0x3a3f2a;try{try{_0x3a3f2a=(await stat(_0x41ea7e))[_0x57af12(0x1a1)]&0x1ff;}catch{_0x3a3f2a=undefined;}await writeFile(_0x2d487e,_0x25216b,{'encoding':'utf8','flag':'wx','mode':_0x3a3f2a??0x1a4});if(_0x3a3f2a!==undefined)await chmod(_0x2d487e,_0x3a3f2a);_0x57f250[_0x57af12(0x179)]===![]?(await link(_0x2d487e,_0x41ea7e),await unlink(_0x2d487e)):await rename(_0x2d487e,_0x41ea7e);}finally{await unlink(_0x2d487e)[_0x57af12(0x161)](()=>undefined);}}function validateOuterMetadata(_0x33ba15,_0x1f7f8c){const _0x1e2d14=a299_0x48fad8;(typeof _0x33ba15[_0x1e2d14(0x166)]!=='string'||_0x33ba15['flowName'][_0x1e2d14(0x2ba)]()==='')&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x166),'message':'flowName\x20is\x20required.'});_0x33ba15[_0x1e2d14(0x21c)]!==undefined&&typeof _0x33ba15[_0x1e2d14(0x21c)]!==_0x1e2d14(0x238)&&_0x1f7f8c['push']({'path':_0x1e2d14(0x21c),'message':_0x1e2d14(0x1b5)});if(_0x33ba15[_0x1e2d14(0x191)]===undefined||_0x33ba15[_0x1e2d14(0x191)]===null)_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x191),'message':'flowType\x20is\x20required.'});else(typeof _0x33ba15['flowType']!==_0x1e2d14(0x238)||!FLOW_TYPES[_0x1e2d14(0x298)](_0x33ba15['flowType']))&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x191),'message':_0x1e2d14(0x24d)+String(_0x33ba15[_0x1e2d14(0x191)])+'.'});_0x33ba15[_0x1e2d14(0x19d)]!==undefined&&typeof _0x33ba15[_0x1e2d14(0x19d)]!==_0x1e2d14(0x238)&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x19d),'message':_0x1e2d14(0x2b3)});_0x33ba15[_0x1e2d14(0x1c5)]===undefined&&_0x33ba15['pageId']!==undefined&&(!Number[_0x1e2d14(0x1df)](_0x33ba15[_0x1e2d14(0x188)])||_0x33ba15[_0x1e2d14(0x188)]<=0x0)&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x188),'message':_0x1e2d14(0x299)});if(_0x33ba15['pageIds']!==undefined){if(!Array[_0x1e2d14(0x2ae)](_0x33ba15[_0x1e2d14(0x1c5)])||_0x33ba15[_0x1e2d14(0x1c5)]['some'](_0x2790e9=>!Number[_0x1e2d14(0x1df)](_0x2790e9)||_0x2790e9<=0x0))_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':'pageIds','message':'pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.'});else[...new Set(_0x33ba15[_0x1e2d14(0x1c5)])][_0x1e2d14(0x1ce)](',')[_0x1e2d14(0x252)]>0x800&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x1c5),'message':'pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.'});_0x33ba15[_0x1e2d14(0x191)]==='INDEPENDENT_FLOW'&&Array[_0x1e2d14(0x2ae)](_0x33ba15[_0x1e2d14(0x1c5)])&&_0x33ba15[_0x1e2d14(0x1c5)][_0x1e2d14(0x252)]>0x0&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x1c5),'message':_0x1e2d14(0x25e)});}_0x33ba15[_0x1e2d14(0x191)]===_0x1e2d14(0x2a8)&&_0x33ba15[_0x1e2d14(0x19d)]!==undefined&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':_0x1e2d14(0x19d),'message':_0x1e2d14(0x1f1)}),_0x33ba15[_0x1e2d14(0x191)]===_0x1e2d14(0x2a8)&&_0x33ba15['pageIds']===undefined&&_0x33ba15['pageId']!==undefined&&_0x1f7f8c[_0x1e2d14(0x1d7)]({'path':'pageId','message':_0x1e2d14(0x265)});}function validateGraph(_0x57d7b0,_0x3de0b9){const _0x4333ce=a299_0x48fad8;if(!isRecord(_0x57d7b0)){_0x3de0b9['push']({'path':'flowJson','message':_0x4333ce(0x1f0)});return;}!Array[_0x4333ce(0x2ae)](_0x57d7b0['nodes'])&&_0x3de0b9[_0x4333ce(0x1d7)]({'path':'flowJson.nodes','message':_0x4333ce(0x204)});!Array[_0x4333ce(0x2ae)](_0x57d7b0['edges'])&&_0x3de0b9[_0x4333ce(0x1d7)]({'path':_0x4333ce(0x16a),'message':_0x4333ce(0x1b0)});Object['prototype']['hasOwnProperty'][_0x4333ce(0x29c)](_0x57d7b0,'schemaVersion')&&_0x3de0b9['push']({'path':'flowJson.schemaVersion','message':_0x4333ce(0x276)+String(_0x57d7b0[_0x4333ce(0x1da)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0xd7a58f of[_0x4333ce(0x1ea),_0x4333ce(0x1f9),_0x4333ce(0x172)]){Object['prototype'][_0x4333ce(0x24a)][_0x4333ce(0x29c)](_0x57d7b0,_0xd7a58f)&&_0x3de0b9['push']({'path':'flowJson.'+_0xd7a58f,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x4333ce(0x2ae)](_0x57d7b0[_0x4333ce(0x2b0)])||!Array[_0x4333ce(0x2ae)](_0x57d7b0[_0x4333ce(0x215)]))return;const _0x5458b9=new Map(),_0x4b4ff9=[],_0x498fb4=[],_0x370f24=new Map(),_0x559df5=new Map(),_0x267043=new Set();let _0x258c95=0x0;_0x57d7b0[_0x4333ce(0x2b0)][_0x4333ce(0x18e)]((_0x21b5da,_0x1138f4)=>{const _0x4bb3e0=_0x4333ce,_0x21b5a1=_0x4bb3e0(0x1ed)+_0x1138f4+']';if(!isRecord(_0x21b5da)){_0x3de0b9[_0x4bb3e0(0x1d7)]({'path':_0x21b5a1,'message':_0x4bb3e0(0x171)});return;}const _0x3a5a95=_0x21b5da;if(typeof _0x3a5a95['id']!==_0x4bb3e0(0x238)||!BPMN_ID_PATTERN['test'](_0x3a5a95['id']))_0x3de0b9[_0x4bb3e0(0x1d7)]({'path':_0x21b5a1+_0x4bb3e0(0x214),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x5458b9[_0x4bb3e0(0x298)](_0x3a5a95['id'])?_0x3de0b9[_0x4bb3e0(0x1d7)]({'path':_0x21b5a1+_0x4bb3e0(0x214),'message':_0x4bb3e0(0x1d4)+_0x3a5a95['id']+'.'}):(_0x5458b9[_0x4bb3e0(0x24c)](_0x3a5a95['id'],_0x3a5a95),_0x267043[_0x4bb3e0(0x1ff)](_0x3a5a95['id']));if(!NODE_TYPES['has'](_0x3a5a95['type']))_0x3de0b9[_0x4bb3e0(0x1d7)]({'path':_0x21b5a1+_0x4bb3e0(0x18a),'message':'Unsupported\x20node\x20type:\x20'+String(_0x3a5a95[_0x4bb3e0(0x290)])+'.'});else{if(_0x3a5a95['type']===_0x4bb3e0(0x18f))_0x4b4ff9[_0x4bb3e0(0x1d7)](_0x3a5a95['id']);else _0x3a5a95[_0x4bb3e0(0x290)]===_0x4bb3e0(0x193)&&_0x498fb4[_0x4bb3e0(0x1d7)](_0x3a5a95['id']);}_0x3a5a95[_0x4bb3e0(0x290)]===_0x4bb3e0(0x27f)&&(_0x3a5a95[_0x4bb3e0(0x23a)]===undefined||_0x3a5a95[_0x4bb3e0(0x23a)]===_0x4bb3e0(0x27f))&&(_0x258c95+=0x1);validateNode(_0x3a5a95,_0x21b5a1,_0x3de0b9);if(_0x3a5a95[_0x4bb3e0(0x290)]==='SCRIPT'){const _0x266df9=resolveEffectiveResultVariable(_0x3a5a95['resultVariable'],![]);_0x266df9&&(registerResultVariableOwner(_0x559df5,_0x266df9,_0x3a5a95['id'],_0x3de0b9),!_0x370f24[_0x4bb3e0(0x298)](_0x266df9)&&_0x370f24[_0x4bb3e0(0x24c)](_0x266df9,_0x3a5a95['id']));}if(_0x3a5a95['type']===_0x4bb3e0(0x27f)&&isRecord(_0x3a5a95[_0x4bb3e0(0x222)])&&_0x3a5a95['timeout']['enabled']===!![]&&_0x3a5a95['timeout'][_0x4bb3e0(0x2aa)]==='EXECUTE_BFF'){const _0xc893d7=resolveEffectiveResultVariable(_0x3a5a95['timeout']['resultVariable'],!![]);_0xc893d7&®isterResultVariableOwner(_0x559df5,_0xc893d7,_0x3a5a95['id']+_0x4bb3e0(0x25d),_0x3de0b9);}});_0x4b4ff9[_0x4333ce(0x252)]!==0x1&&_0x3de0b9[_0x4333ce(0x1d7)]({'path':'flowJson.nodes','message':_0x4333ce(0x184)});_0x498fb4[_0x4333ce(0x252)]===0x0&&_0x3de0b9[_0x4333ce(0x1d7)]({'path':_0x4333ce(0x194),'message':_0x4333ce(0x1ac)});const _0xb321be=new Map(),_0x3e8948=new Map(),_0x2d6a2e=new Map(),_0x4acc96=new Set();_0x57d7b0[_0x4333ce(0x215)][_0x4333ce(0x18e)]((_0x109f82,_0x3949f8)=>{const _0x539d7d=_0x4333ce,_0x53bea2='flowJson.edges['+_0x3949f8+']';if(!isRecord(_0x109f82)){_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2,'message':'edge\x20must\x20be\x20an\x20object.'});return;}const _0x311d75=_0x109f82;_0x2d6a2e[_0x539d7d(0x24c)](_0x311d75,_0x53bea2);const _0x8ef0d6=resolveEdgeEndpoint(_0x311d75['source'],_0x311d75['sourceNodeId']),_0x1df1f9=resolveEdgeEndpoint(_0x311d75[_0x539d7d(0x21a)],_0x311d75[_0x539d7d(0x165)]);if(!_0x8ef0d6)_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2+_0x539d7d(0x256),'message':_0x539d7d(0x180)});if(!_0x1df1f9)_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2+'.target','message':_0x539d7d(0x218)});_0x8ef0d6&&!_0x5458b9[_0x539d7d(0x298)](_0x8ef0d6)&&_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2+_0x539d7d(0x256),'message':'Edge\x20source\x20node\x20not\x20found:\x20'+_0x8ef0d6+'.'});_0x1df1f9&&!_0x5458b9[_0x539d7d(0x298)](_0x1df1f9)&&_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2+_0x539d7d(0x187),'message':'Edge\x20target\x20node\x20not\x20found:\x20'+_0x1df1f9+'.'});if(_0x311d75['id']!==undefined){if(typeof _0x311d75['id']!=='string'||!BPMN_ID_PATTERN[_0x539d7d(0x283)](_0x311d75['id']))_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2+_0x539d7d(0x214),'message':_0x539d7d(0x27a)});else{if(_0x267043[_0x539d7d(0x298)](_0x311d75['id']))_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2+_0x539d7d(0x214),'message':_0x539d7d(0x2b5)+_0x311d75['id']+'.'});else!_0x267043[_0x539d7d(0x298)](_0x311d75['id'])&&_0x267043['add'](_0x311d75['id']);}}if(_0x8ef0d6&&_0x1df1f9){const _0x2ac5ec=_0x8ef0d6+'\x00'+_0x1df1f9+'\x00'+(_0x311d75['conditionType']??'ALWAYS');_0x4acc96[_0x539d7d(0x298)](_0x2ac5ec)?_0x3de0b9[_0x539d7d(0x1d7)]({'path':_0x53bea2,'message':_0x539d7d(0x296)+_0x8ef0d6+_0x539d7d(0x273)+_0x1df1f9+'\x20('+(_0x311d75[_0x539d7d(0x253)]??'ALWAYS')+').'}):_0x4acc96['add'](_0x2ac5ec);}validateEdge(_0x311d75,_0x53bea2,_0x3de0b9),_0x8ef0d6&&_0x1df1f9&&(_0xb321be[_0x539d7d(0x1f2)](_0x8ef0d6)?.[_0x539d7d(0x1d7)](_0x311d75)??_0xb321be['set'](_0x8ef0d6,[_0x311d75]),_0x3e8948[_0x539d7d(0x1f2)](_0x1df1f9)?.[_0x539d7d(0x1d7)](_0x311d75)??_0x3e8948['set'](_0x1df1f9,[_0x311d75]));});if(_0x4b4ff9[_0x4333ce(0x252)]!==0x1)return;validateGraphShape(_0x5458b9,_0x4b4ff9[0x0],_0x498fb4,_0xb321be,_0x3e8948,_0x2d6a2e,_0x3de0b9),validateScriptResultReferences(_0x5458b9,_0x4b4ff9[0x0],_0xb321be,_0x3e8948,_0x2d6a2e,_0x370f24,_0x3de0b9),validateApprovalResults(_0x5458b9,_0x258c95,_0x498fb4,_0x3de0b9);}function validateNode(_0x4667d0,_0x27f2d6,_0x2ad128){const _0x3b7b7c=a299_0x48fad8;for(const _0x2cb57e of[_0x3b7b7c(0x272),_0x3b7b7c(0x297)]){Object[_0x3b7b7c(0x28c)][_0x3b7b7c(0x24a)][_0x3b7b7c(0x29c)](_0x4667d0,_0x2cb57e)&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+'.'+_0x2cb57e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x3b7b7c(0x298)](_0x4667d0[_0x3b7b7c(0x290)]))return;(typeof _0x4667d0[_0x3b7b7c(0x20e)]!==_0x3b7b7c(0x238)||_0x4667d0[_0x3b7b7c(0x20e)]['trim']()==='')&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x1b6),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x4667d0[_0x3b7b7c(0x188)]!==undefined&&_0x2ad128['push']({'path':_0x27f2d6+_0x3b7b7c(0x28d),'message':_0x3b7b7c(0x186)});if(_0x4667d0['path']!==undefined){if(typeof _0x4667d0[_0x3b7b7c(0x271)]!==_0x3b7b7c(0x238)||_0x4667d0['path'][_0x3b7b7c(0x2ba)]()==='')_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+'.path','message':_0x3b7b7c(0x1bc)});else _0x4667d0['type']!=='APPROVAL'&&_0x4667d0[_0x3b7b7c(0x290)]!==_0x3b7b7c(0x193)&&_0x2ad128['push']({'path':_0x27f2d6+_0x3b7b7c(0x24f),'message':_0x3b7b7c(0x1a3)});}const _0x52e6cf=_0x4667d0['position'];if(!isRecord(_0x52e6cf))_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x202),'message':_0x3b7b7c(0x19c)});else for(const _0x26117c of['x','y']){const _0x4d74ed=_0x52e6cf[_0x26117c];(typeof _0x4d74ed!=='number'||!Number['isFinite'](_0x4d74ed)||_0x4d74ed<0x0)&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+'.position.'+_0x26117c,'message':_0x3b7b7c(0x235)+_0x26117c+_0x3b7b7c(0x291)});}if(_0x4667d0[_0x3b7b7c(0x290)]==='APPROVAL'){const _0x27ca39=_0x4667d0[_0x3b7b7c(0x237)]??_0x3b7b7c(0x190),_0x4d07f9=_0x4667d0[_0x3b7b7c(0x23a)]??_0x3b7b7c(0x27f);!APPROVAL_TASK_MODES[_0x3b7b7c(0x298)](_0x4d07f9)&&_0x2ad128['push']({'path':_0x27f2d6+_0x3b7b7c(0x1bd),'message':_0x3b7b7c(0x200)+String(_0x4d07f9)+'.'});!APPROVAL_MODES[_0x3b7b7c(0x298)](_0x27ca39)&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x1e4),'message':'Unsupported\x20approval\x20mode:\x20'+String(_0x27ca39)+'.'});if(!isRecord(_0x4667d0[_0x3b7b7c(0x1d5)]))_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x1bb),'message':_0x3b7b7c(0x1eb)});else{const _0x13ea0f=_0x4667d0[_0x3b7b7c(0x1d5)]['strategy'];_0x13ea0f!==_0x3b7b7c(0x18b)&&_0x13ea0f!==_0x3b7b7c(0x176)&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+'.assignee.strategy','message':_0x3b7b7c(0x2bc)});if(_0x13ea0f===_0x3b7b7c(0x18b)){const _0x3c4858=_0x4667d0[_0x3b7b7c(0x1d5)][_0x3b7b7c(0x223)];if(!Array[_0x3b7b7c(0x2ae)](_0x3c4858)||_0x3c4858[_0x3b7b7c(0x252)]===0x0)_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x1e0),'message':'FIXED\x20assignee\x20requires\x20userIds.'});else{const _0x39a563=_0x3c4858[_0x3b7b7c(0x198)](_0x42afdb=>!isValidUserId(_0x42afdb));_0x39a563>=0x0&&_0x2ad128['push']({'path':_0x27f2d6+'.assignee.userIds['+_0x39a563+']','message':_0x3b7b7c(0x224)});const _0x490e15=new Set(_0x3c4858['filter'](isValidUserId)[_0x3b7b7c(0x1a8)](_0x2a40bb=>String(_0x2a40bb)[_0x3b7b7c(0x2ba)]()));_0x27ca39===_0x3b7b7c(0x190)&&_0x490e15[_0x3b7b7c(0x173)]>0x1&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x1e0),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x13ea0f===_0x3b7b7c(0x176)){const _0x405ac4=_0x4667d0[_0x3b7b7c(0x1d5)][_0x3b7b7c(0x183)],_0x4bec0f=typeof _0x405ac4===_0x3b7b7c(0x1b7)||typeof _0x405ac4===_0x3b7b7c(0x238)?Number(String(_0x405ac4)['trim']()):Number['NaN'];(!Number[_0x3b7b7c(0x1df)](_0x4bec0f)||_0x4bec0f<=0x0)&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+'.assignee.roleId','message':_0x3b7b7c(0x264)});}}if(_0x4667d0[_0x3b7b7c(0x196)]!==undefined){if(!isRecord(_0x4667d0['transferCandidates']))_0x2ad128['push']({'path':_0x27f2d6+_0x3b7b7c(0x249),'message':_0x3b7b7c(0x1f7)});else{if(_0x4667d0[_0x3b7b7c(0x196)][_0x3b7b7c(0x229)]!==_0x3b7b7c(0x18b))_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x195),'message':_0x3b7b7c(0x21d)});else{const _0xb5f37c=_0x4667d0[_0x3b7b7c(0x196)][_0x3b7b7c(0x223)];if(!Array[_0x3b7b7c(0x2ae)](_0xb5f37c)||_0xb5f37c['length']===0x0)_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x2a2),'message':_0x3b7b7c(0x260)});else{const _0x52e30d=_0xb5f37c[_0x3b7b7c(0x198)](_0x294d16=>!isValidUserId(_0x294d16));_0x52e30d>=0x0&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x233)+_0x52e30d+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x4667d0['sequential']!==undefined&&typeof _0x4667d0[_0x3b7b7c(0x16c)]!==_0x3b7b7c(0x170)&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x182),'message':_0x3b7b7c(0x1e5)});if(_0x4667d0[_0x3b7b7c(0x290)]==='SCRIPT'){(typeof _0x4667d0[_0x3b7b7c(0x28b)]!==_0x3b7b7c(0x238)||_0x4667d0[_0x3b7b7c(0x28b)][_0x3b7b7c(0x2ba)]()==='')&&_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x20a),'message':_0x3b7b7c(0x281)});if(_0x4667d0[_0x3b7b7c(0x19b)]!==undefined){if(typeof _0x4667d0[_0x3b7b7c(0x19b)]!==_0x3b7b7c(0x238)||!VARIABLE_PATTERN['test'](_0x4667d0[_0x3b7b7c(0x19b)]))_0x2ad128[_0x3b7b7c(0x1d7)]({'path':_0x27f2d6+_0x3b7b7c(0x263),'message':_0x3b7b7c(0x288)});else(RESERVED_RESULT_VARIABLES[_0x3b7b7c(0x298)](_0x4667d0[_0x3b7b7c(0x19b)])||_0x4667d0[_0x3b7b7c(0x19b)]['startsWith']('approval_sys_'))&&_0x2ad128['push']({'path':_0x27f2d6+_0x3b7b7c(0x263),'message':_0x3b7b7c(0x1e7)+_0x4667d0[_0x3b7b7c(0x19b)]+'.'});}}validateAsyncExecution(_0x4667d0,_0x27f2d6,_0x2ad128),validateApprovalTimeout(_0x4667d0,_0x27f2d6,_0x2ad128),validateCcConfig(_0x4667d0,_0x27f2d6,_0x2ad128),_0x4667d0[_0x3b7b7c(0x290)]===_0x3b7b7c(0x1ef)&&validateNotificationConfig(_0x4667d0[_0x3b7b7c(0x192)],_0x27f2d6+'.config',_0x2ad128);}function validateAsyncExecution(_0x4a1542,_0x1ab055,_0x196b8f){const _0x2bd10a=a299_0x48fad8;if(_0x4a1542[_0x2bd10a(0x26a)]===undefined)return;if(!isRecord(_0x4a1542[_0x2bd10a(0x26a)])){_0x196b8f[_0x2bd10a(0x1d7)]({'path':_0x1ab055+'.async','message':_0x2bd10a(0x278)});return;}if(_0x4a1542[_0x2bd10a(0x26a)][_0x2bd10a(0x25b)]!==undefined&&typeof _0x4a1542[_0x2bd10a(0x26a)][_0x2bd10a(0x25b)]!==_0x2bd10a(0x170)){_0x196b8f['push']({'path':_0x1ab055+_0x2bd10a(0x1e3),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x4a1542[_0x2bd10a(0x26a)][_0x2bd10a(0x25b)]!==!![])return;_0x4a1542[_0x2bd10a(0x290)]!=='SCRIPT'&&_0x196b8f[_0x2bd10a(0x1d7)]({'path':_0x1ab055+_0x2bd10a(0x22f),'message':_0x2bd10a(0x1cc)});const _0x39fa7c=_0x4a1542['async'][_0x2bd10a(0x221)]??0x3;(!Number[_0x2bd10a(0x1fd)](_0x39fa7c)||_0x39fa7c<0x1||_0x39fa7c>MAX_ASYNC_RETRY_COUNT)&&_0x196b8f[_0x2bd10a(0x1d7)]({'path':_0x1ab055+_0x2bd10a(0x251),'message':_0x2bd10a(0x269)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x4a1542[_0x2bd10a(0x26a)][_0x2bd10a(0x277)]!==undefined&&validateTimeAmount(_0x4a1542[_0x2bd10a(0x26a)][_0x2bd10a(0x277)],_0x1ab055+'.async.retryInterval',_0x196b8f);}function validateApprovalTimeout(_0x56aad4,_0x2a3a03,_0xfd96c8){const _0x9ef465=a299_0x48fad8;if(_0x56aad4['timeout']===undefined)return;if(!isRecord(_0x56aad4['timeout'])){_0xfd96c8['push']({'path':_0x2a3a03+_0x9ef465(0x25d),'message':'timeout\x20must\x20be\x20an\x20object.'});return;}if(_0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x25b)]!==undefined&&typeof _0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x25b)]!==_0x9ef465(0x170)){_0xfd96c8[_0x9ef465(0x1d7)]({'path':_0x2a3a03+_0x9ef465(0x208),'message':_0x9ef465(0x232)});return;}if(_0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x25b)]!==!![])return;if(_0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x167)]!==undefined&&typeof _0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x167)]!=='boolean'){_0xfd96c8['push']({'path':_0x2a3a03+'.timeout.interrupting','message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x56aad4[_0x9ef465(0x290)]!==_0x9ef465(0x27f)&&_0xfd96c8['push']({'path':_0x2a3a03+'.timeout','message':_0x9ef465(0x169)});validateTimeAmount(_0x56aad4['timeout'][_0x9ef465(0x1c6)],_0x2a3a03+_0x9ef465(0x16b),_0xfd96c8);const _0x3ad03e=_0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x2aa)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x3ad03e)){_0xfd96c8['push']({'path':_0x2a3a03+_0x9ef465(0x250),'message':_0x9ef465(0x1be)});return;}(_0x56aad4[_0x9ef465(0x23a)]??_0x9ef465(0x27f))==='HANDLE'&&_0x3ad03e!==_0x9ef465(0x160)&&_0xfd96c8[_0x9ef465(0x1d7)]({'path':_0x2a3a03+_0x9ef465(0x250),'message':_0x9ef465(0x206)});const _0x165b47=_0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x167)]??_0x3ad03e!==_0x9ef465(0x160);if(_0x3ad03e==='EXECUTE_BFF')_0x165b47&&_0xfd96c8['push']({'path':_0x2a3a03+_0x9ef465(0x23f),'message':_0x9ef465(0x1c3)}),(typeof _0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x28b)]!==_0x9ef465(0x238)||_0x56aad4[_0x9ef465(0x222)][_0x9ef465(0x28b)][_0x9ef465(0x2ba)]()==='')&&_0xfd96c8[_0x9ef465(0x1d7)]({'path':_0x2a3a03+_0x9ef465(0x19a),'message':_0x9ef465(0x225)}),validateOptionalResultVariable(_0x56aad4[_0x9ef465(0x222)]['resultVariable'],_0x2a3a03+_0x9ef465(0x289),_0xfd96c8);else!_0x165b47&&_0xfd96c8[_0x9ef465(0x1d7)]({'path':_0x2a3a03+_0x9ef465(0x23f),'message':_0x3ad03e+_0x9ef465(0x2bb)});}function validateTimeAmount(_0xccca84,_0x5b030b,_0x4919d9){const _0x194aa5=a299_0x48fad8;if(!isRecord(_0xccca84)){_0x4919d9[_0x194aa5(0x1d7)]({'path':_0x5b030b,'message':_0x194aa5(0x15e)});return;}(!Number[_0x194aa5(0x1fd)](_0xccca84[_0x194aa5(0x231)])||Number(_0xccca84[_0x194aa5(0x231)])<=0x0)&&_0x4919d9[_0x194aa5(0x1d7)]({'path':_0x5b030b+_0x194aa5(0x25a),'message':_0x194aa5(0x243)}),!FLOW_TIME_UNITS[_0x194aa5(0x298)](_0xccca84['unit'])&&_0x4919d9['push']({'path':_0x5b030b+'.unit','message':_0x194aa5(0x26f)});}function a299_0x1582(_0x28c3ec,_0x332763){_0x28c3ec=_0x28c3ec-0x15b;const _0x4ba9ac=a299_0x4ba9();let _0x158254=_0x4ba9ac[_0x28c3ec];return _0x158254;}function validateOptionalResultVariable(_0x2dd695,_0x30c7d7,_0x5b8c0e){const _0x9c33f0=a299_0x48fad8;if(_0x2dd695===undefined||_0x2dd695===null||_0x2dd695==='')return;if(typeof _0x2dd695!=='string'||!VARIABLE_PATTERN[_0x9c33f0(0x283)](_0x2dd695))_0x5b8c0e['push']({'path':_0x30c7d7,'message':_0x9c33f0(0x288)});else(RESERVED_RESULT_VARIABLES['has'](_0x2dd695)||_0x2dd695[_0x9c33f0(0x17a)](_0x9c33f0(0x261)))&&_0x5b8c0e[_0x9c33f0(0x1d7)]({'path':_0x30c7d7,'message':_0x9c33f0(0x1e7)+_0x2dd695+'.'});}function validateCcConfig(_0x1d85d4,_0x5ed47c,_0x1777da){const _0x24223f=a299_0x48fad8;if(_0x1d85d4['cc']===undefined)return;if(!isRecord(_0x1d85d4['cc'])){_0x1777da[_0x24223f(0x1d7)]({'path':_0x5ed47c+'.cc','message':_0x24223f(0x1b9)});return;}_0x1d85d4[_0x24223f(0x290)]!==_0x24223f(0x193)&&_0x1d85d4[_0x24223f(0x290)]!==_0x24223f(0x27f)&&_0x1777da[_0x24223f(0x1d7)]({'path':_0x5ed47c+'.cc','message':_0x24223f(0x2af)});Object[_0x24223f(0x28c)]['hasOwnProperty'][_0x24223f(0x29c)](_0x1d85d4['cc'],_0x24223f(0x268))&&_0x1777da[_0x24223f(0x1d7)]({'path':_0x5ed47c+_0x24223f(0x1e1),'message':UNSUPPORTED_FORM_MESSAGE});const _0xd2152f=_0x1d85d4['cc'][_0x24223f(0x226)];if(!Array[_0x24223f(0x2ae)](_0xd2152f)||_0xd2152f['length']===0x0)_0x1777da['push']({'path':_0x5ed47c+'.cc.recipientUserIds','message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0xd2152f[_0x24223f(0x252)]>MAX_CC_RECIPIENTS&&_0x1777da[_0x24223f(0x1d7)]({'path':_0x5ed47c+_0x24223f(0x20b),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x24223f(0x27c)});const _0x675377=new Set();_0xd2152f[_0x24223f(0x18e)]((_0x47bba7,_0x54d262)=>{const _0x5cbdd8=_0x24223f;if(typeof _0x47bba7!==_0x5cbdd8(0x238)||_0x47bba7[_0x5cbdd8(0x2ba)]()==='')_0x1777da[_0x5cbdd8(0x1d7)]({'path':_0x5ed47c+'.cc.recipientUserIds['+_0x54d262+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x675377['has'](_0x47bba7['trim']())?_0x1777da[_0x5cbdd8(0x1d7)]({'path':_0x5ed47c+_0x5cbdd8(0x174)+_0x54d262+']','message':_0x5cbdd8(0x1fb)+_0x47bba7[_0x5cbdd8(0x2ba)]()+'.'}):_0x675377[_0x5cbdd8(0x1ff)](_0x47bba7['trim']());});}validateStringArray(_0x1d85d4['cc'][_0x24223f(0x203)],_0x5ed47c+_0x24223f(0x210),_0x1777da);}function validateStringArray(_0x142e55,_0x2a2d92,_0x1ccd75){const _0x20dc50=a299_0x48fad8;if(_0x142e55===undefined)return;if(!Array[_0x20dc50(0x2ae)](_0x142e55)){_0x1ccd75['push']({'path':_0x2a2d92,'message':_0x20dc50(0x1e9)});return;}const _0x542d4a=new Set();_0x142e55[_0x20dc50(0x18e)]((_0x360425,_0x12f9a4)=>{const _0x23926c=_0x20dc50;if(typeof _0x360425!==_0x23926c(0x238)||_0x360425['trim']()==='')_0x1ccd75['push']({'path':_0x2a2d92+'['+_0x12f9a4+']','message':_0x23926c(0x1e2)});else _0x542d4a[_0x23926c(0x298)](_0x360425[_0x23926c(0x2ba)]())?_0x1ccd75[_0x23926c(0x1d7)]({'path':_0x2a2d92+'['+_0x12f9a4+']','message':_0x23926c(0x287)+_0x360425['trim']()+'.'}):_0x542d4a[_0x23926c(0x1ff)](_0x360425['trim']());});}function validateNotificationConfig(_0x53512f,_0x36dd9b,_0x292287){const _0x330a23=a299_0x48fad8;if(!isRecord(_0x53512f)){_0x292287[_0x330a23(0x1d7)]({'path':_0x36dd9b,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x53512f[_0x330a23(0x25f)]!==undefined&&_0x53512f['version']!==null){if(typeof _0x53512f[_0x330a23(0x25f)]!==_0x330a23(0x238))_0x292287[_0x330a23(0x1d7)]({'path':_0x36dd9b+_0x330a23(0x227),'message':_0x330a23(0x24b)});else _0x53512f[_0x330a23(0x25f)][_0x330a23(0x2ba)]()&&_0x53512f['version'][_0x330a23(0x2ba)]()!=='v1'&&_0x292287[_0x330a23(0x1d7)]({'path':_0x36dd9b+_0x330a23(0x227),'message':'Unsupported\x20notification\x20version:\x20'+_0x53512f[_0x330a23(0x25f)]+'.'});}const _0x17d468=requireNotificationString(_0x53512f[_0x330a23(0x2a1)],_0x36dd9b+_0x330a23(0x266),_0x330a23(0x1a9),_0x292287);_0x17d468?.[_0x330a23(0x23d)]('${')&&_0x292287[_0x330a23(0x1d7)]({'path':_0x36dd9b+'.configCode','message':_0x330a23(0x18c)});if(_0x53512f[_0x330a23(0x27b)]!==undefined&&_0x53512f[_0x330a23(0x27b)]!==null){if(typeof _0x53512f[_0x330a23(0x27b)]!==_0x330a23(0x238))_0x292287['push']({'path':_0x36dd9b+'.failurePolicy','message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x330a23(0x298)](_0x53512f[_0x330a23(0x27b)][_0x330a23(0x2ba)]()['toUpperCase']())&&_0x292287[_0x330a23(0x1d7)]({'path':_0x36dd9b+'.failurePolicy','message':_0x330a23(0x213)});}!isRecord(_0x53512f[_0x330a23(0x2a6)])?_0x292287[_0x330a23(0x1d7)]({'path':_0x36dd9b+'.template','message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x53512f[_0x330a23(0x2a6)],_0x36dd9b+_0x330a23(0x230),_0x292287),validateNotificationRecipients(_0x53512f[_0x330a23(0x293)],_0x36dd9b+'.recipients',_0x292287);}function validateNotificationTemplate(_0x2020f7,_0x164185,_0x3c99cc){const _0x2839b2=a299_0x48fad8;for(const _0x9b3acb of[_0x2839b2(0x1a6),_0x2839b2(0x267)]){const _0x268deb=requireNotificationString(_0x2020f7[_0x9b3acb],_0x164185+'.'+_0x9b3acb,_0x2839b2(0x28e)+_0x9b3acb+_0x2839b2(0x1a7),_0x3c99cc);if(_0x268deb)validateNotificationPlaceholders(_0x268deb,_0x164185+'.'+_0x9b3acb,_0x3c99cc);}_0x2020f7[_0x2839b2(0x17c)]!==undefined&&_0x2020f7['detailMarkdown']!==null&&(typeof _0x2020f7[_0x2839b2(0x17c)]!==_0x2839b2(0x238)?_0x3c99cc[_0x2839b2(0x1d7)]({'path':_0x164185+_0x2839b2(0x1d9),'message':_0x2839b2(0x255)}):validateNotificationPlaceholders(_0x2020f7[_0x2839b2(0x17c)],_0x164185+_0x2839b2(0x1d9),_0x3c99cc)),validateNotificationFacts(_0x2020f7['facts'],_0x164185+'.facts',_0x3c99cc),validateNotificationActions(_0x2020f7[_0x2839b2(0x1f6)],_0x164185+_0x2839b2(0x2a7),_0x3c99cc);}function validateNotificationFacts(_0x29a4e1,_0x1b5072,_0x5679a0){const _0xe1f866=a299_0x48fad8;if(_0x29a4e1===undefined||_0x29a4e1===null)return;if(!Array[_0xe1f866(0x2ae)](_0x29a4e1)){_0x5679a0[_0xe1f866(0x1d7)]({'path':_0x1b5072,'message':_0xe1f866(0x21b)});return;}_0x29a4e1[_0xe1f866(0x252)]>MAX_NOTIFICATION_FACTS&&_0x5679a0['push']({'path':_0x1b5072,'message':_0xe1f866(0x1c8)+MAX_NOTIFICATION_FACTS+_0xe1f866(0x1b8)}),_0x29a4e1[_0xe1f866(0x18e)]((_0x1a2b5e,_0x4967c5)=>{const _0x4c1a78=_0xe1f866,_0xc1f505=_0x1b5072+'['+_0x4967c5+']';if(!isRecord(_0x1a2b5e)){_0x5679a0['push']({'path':_0xc1f505,'message':_0x4c1a78(0x2a0)});return;}for(const _0x1c594a of[_0x4c1a78(0x1b4),_0x4c1a78(0x231)]){const _0xf03fb=requireNotificationString(_0x1a2b5e[_0x1c594a],_0xc1f505+'.'+_0x1c594a,_0x4c1a78(0x1ad)+_0x1c594a+'\x20is\x20required.',_0x5679a0);_0xf03fb&&validateNotificationPlaceholders(_0xf03fb,_0xc1f505+'.'+_0x1c594a,_0x5679a0);}});}function validateNotificationActions(_0x36f6cc,_0x3e1041,_0x371110){const _0x1f35a7=a299_0x48fad8;if(_0x36f6cc===undefined||_0x36f6cc===null)return;if(!Array[_0x1f35a7(0x2ae)](_0x36f6cc)){_0x371110[_0x1f35a7(0x1d7)]({'path':_0x3e1041,'message':_0x1f35a7(0x17f)});return;}_0x36f6cc['length']>MAX_NOTIFICATION_ACTIONS&&_0x371110[_0x1f35a7(0x1d7)]({'path':_0x3e1041,'message':_0x1f35a7(0x1c8)+MAX_NOTIFICATION_ACTIONS+_0x1f35a7(0x1cb)}),_0x36f6cc[_0x1f35a7(0x18e)]((_0x1427b4,_0x3a79c4)=>{const _0x60ca35=_0x1f35a7,_0x3920ff=_0x3e1041+'['+_0x3a79c4+']';if(!isRecord(_0x1427b4)){_0x371110['push']({'path':_0x3920ff,'message':_0x60ca35(0x1f3)});return;}const _0x57a15b=requireNotificationString(_0x1427b4[_0x60ca35(0x1cf)],_0x3920ff+_0x60ca35(0x1ec),'Notification\x20action.text\x20is\x20required.',_0x371110);if(_0x57a15b)validateNotificationPlaceholders(_0x57a15b,_0x3920ff+_0x60ca35(0x1ec),_0x371110);const _0x28414f=requireNotificationString(_0x1427b4['url'],_0x3920ff+_0x60ca35(0x205),_0x60ca35(0x254),_0x371110);if(!_0x28414f)return;validateNotificationPlaceholders(_0x28414f,_0x3920ff+'.url',_0x371110),!/^https?:\/\//i['test'](_0x28414f)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x60ca35(0x283)](_0x28414f)&&_0x371110[_0x60ca35(0x1d7)]({'path':_0x3920ff+'.url','message':_0x60ca35(0x29a)});});}function validateNotificationRecipients(_0x363ace,_0xd2f960,_0x3edbd7){const _0x232c1a=a299_0x48fad8;if(_0x363ace===undefined||_0x363ace===null)return;if(!Array['isArray'](_0x363ace)){_0x3edbd7[_0x232c1a(0x1d7)]({'path':_0xd2f960,'message':_0x232c1a(0x1fc)});return;}let _0x4c972d=![];_0x363ace[_0x232c1a(0x18e)]((_0x230c30,_0x4abe4a)=>{const _0x12f99e=_0x232c1a,_0x38886c=_0xd2f960+'['+_0x4abe4a+']';if(!isRecord(_0x230c30)){_0x3edbd7['push']({'path':_0x38886c,'message':_0x12f99e(0x1c2)});return;}const _0x4d5f68=requireNotificationString(_0x230c30[_0x12f99e(0x290)],_0x38886c+'.type',_0x12f99e(0x1ee),_0x3edbd7);_0x4d5f68&&!NOTIFICATION_RECIPIENT_TYPES[_0x12f99e(0x298)](_0x4d5f68[_0x12f99e(0x2ad)]())&&_0x3edbd7[_0x12f99e(0x1d7)]({'path':_0x38886c+'.type','message':_0x12f99e(0x23c)});let _0x36ad5b='TO';_0x230c30[_0x12f99e(0x244)]!==undefined&&_0x230c30[_0x12f99e(0x244)]!==null&&(typeof _0x230c30['role']!=='string'?(_0x3edbd7[_0x12f99e(0x1d7)]({'path':_0x38886c+'.role','message':_0x12f99e(0x1ae)}),_0x36ad5b=''):(_0x36ad5b=_0x230c30[_0x12f99e(0x244)][_0x12f99e(0x2ba)]()[_0x12f99e(0x2ad)](),!NOTIFICATION_RECIPIENT_ROLES[_0x12f99e(0x298)](_0x36ad5b)&&_0x3edbd7[_0x12f99e(0x1d7)]({'path':_0x38886c+_0x12f99e(0x2a3),'message':_0x12f99e(0x177)})));if(_0x36ad5b==='TO')_0x4c972d=!![];const _0x308a5f=requireNotificationString(_0x230c30['value'],_0x38886c+_0x12f99e(0x25a),_0x12f99e(0x29e),_0x3edbd7);_0x308a5f&&validateNotificationPlaceholders(_0x308a5f,_0x38886c+_0x12f99e(0x25a),_0x3edbd7);}),_0x363ace['length']>0x0&&!_0x4c972d&&_0x3edbd7[_0x232c1a(0x1d7)]({'path':_0xd2f960,'message':_0x232c1a(0x1c9)});}function requireNotificationString(_0x12d564,_0x268021,_0xc98cfd,_0x309df9){const _0x2cbd50=a299_0x48fad8;if(typeof _0x12d564!==_0x2cbd50(0x238)||_0x12d564[_0x2cbd50(0x2ba)]()==='')return _0x309df9['push']({'path':_0x268021,'message':_0xc98cfd}),undefined;return _0x12d564[_0x2cbd50(0x2ba)]();}function validateNotificationPlaceholders(_0x40d79b,_0x26a746,_0xf04eb4){const _0x10423a=a299_0x48fad8;for(const _0x278941 of _0x40d79b[_0x10423a(0x21e)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x1ccafc=_0x278941[0x1]?.['trim']()??'',_0x35deed=_0x1ccafc[_0x10423a(0x2b1)]('.'),_0x315af1=_0x35deed>=0x0?_0x1ccafc[_0x10423a(0x246)](0x0,_0x35deed):_0x1ccafc,_0x2df18d=_0x35deed>=0x0?_0x1ccafc[_0x10423a(0x246)](_0x35deed+0x1)[_0x10423a(0x2ba)]():'';(!['event','context','variables'][_0x10423a(0x23d)](_0x315af1)||_0x2df18d==='')&&_0xf04eb4[_0x10423a(0x1d7)]({'path':_0x26a746,'message':_0x10423a(0x21f)+_0x278941[0x0]+'.'});}_0x40d79b['replace'](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x10423a(0x23d)]('${')&&_0xf04eb4['push']({'path':_0x26a746,'message':_0x10423a(0x259)});}function a299_0x4ba9(){const _0x1532c4=['some','actions','transferCandidates\x20must\x20be\x20an\x20object.','approval_sys_appCode','formDefinitions','warnings','Duplicate\x20cc\x20recipient\x20userId:\x20','Notification\x20recipients\x20must\x20be\x20an\x20array.','isInteger','metadata','add','Unsupported\x20task\x20mode:\x20','Node\x20is\x20not\x20reachable\x20from\x20START.','.position','visible','nodes\x20must\x20be\x20an\x20array.','.url','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','ANY','.timeout.enabled','Expression\x20references\x20SCRIPT\x20resultVariable\x20','.scriptName','.cc.recipientUserIds','isFinite','entries','name','#/$defs/timeAmount','.cc.visible','appCode','1519563RkKCSi','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','.id','edges','approval_sys_initiatorUsername','waypoints\x20must\x20be\x20an\x20array.','edge\x20target\x20is\x20required.','APPROVED','target','Notification\x20template.facts\x20must\x20be\x20an\x20array.','flowDesc','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','matchAll','Unsupported\x20notification\x20placeholder:\x20','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','retryCount','timeout','userIds','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','recipientUserIds','.version','stringify','strategy','approval_sys_operationType','#/$defs/position','.defaultFlow','5aACrwM','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.async','.template','value','timeout.enabled\x20must\x20be\x20a\x20boolean.','.transferCandidates.userIds[','message','position.','FORM_FLOW','approvalMode','string','parse','taskMode','USER','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','includes','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','.timeout.interrupting','^[A-Za-z_][A-Za-z0-9_]*$','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','https://json-schema.org/draft/2020-12/schema','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','role','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','slice','legacy_field_removed','2599880HUMoGL','.transferCandidates','hasOwnProperty','Notification\x20version\x20must\x20be\x20a\x20string.','set','Unsupported\x20flowType:\x20','array','.path','.timeout.action','.async.retryCount','length','conditionType','Notification\x20action.url\x20is\x20required.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','.source','\x20must\x20be\x20a\x20finite\x20number.','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.value','enabled','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','.timeout','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','version','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','approval_sys_','defaultFlow','.resultVariable','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','.configCode','summary','readSources','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','async','approval_sys_processInstanceId','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','5019217jIpkNK','filter','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','formData','path','form','\x20->\x20','Unsupported\x20pageMode:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','Unsupported\x20schemaVersion:\x20','retryInterval','async\x20must\x20be\x20an\x20object.','defaultFlow\x20must\x20be\x20a\x20boolean.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','failurePolicy','\x20users.','BCC','12786282aCxtro','APPROVAL','#/$defs/userId','SCRIPT\x20node\x20requires\x20scriptName.','flowJson.nodes.','test',',\x20but\x20node\x20','].path','#/$defs/flowNode','Duplicate\x20value:\x20','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.timeout.resultVariable','CUSTOM_PAGE','scriptName','prototype','.pageId','Notification\x20template.','REJECTED','type','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','CONTINUE','recipients','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','DAYS','Duplicate\x20edge\x20route:\x20','formPermission','has','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','MAX_SAFE_INTEGER','call','every','Notification\x20recipient.value\x20is\x20required.','integer','Notification\x20fact\x20must\x20be\x20an\x20object.','configCode','.transferCandidates.userIds','.role','approval_sys_dataId','3777252NsxSJh','template','.actions','INDEPENDENT_FLOW','approval_sys_datasetCode','action','pid','flowJson.startPath','toUpperCase','isArray','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','nodes','indexOf','#/$defs/flowEdge','datasetCode\x20must\x20be\x20a\x20string.','FAIL','Duplicate\x20BPMN\x20element\x20id:\x20','url','pageMode','flowCode','EMAIL','trim','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','.waypoints[','Node\x20has\x20no\x20incoming\x20edge.','approval_sys_pageId','flowKey','flowJson.schemaVersion','CONDITION','SECONDS','duration\x20requires\x20value\x20and\x20unit.','SCRIPT','EXECUTE_BFF','catch','sourceNodeId','empty_metadata_removed','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','targetNodeId','flowName','interrupting','flowJson','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','flowJson.edges','.timeout.duration','sequential','16VxUTzE','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','ALWAYS','boolean','node\x20must\x20be\x20an\x20object.','formPermissions','size','.cc.recipientUserIds[','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','ROLE','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','overwrite','startsWith','keys','detailMarkdown','flowJson.startPageId','startPath\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','edge\x20source\x20is\x20required.','approval.simple-flow.v1','.sequential','roleId','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','PLATFORM_FORM','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','.target','pageId','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','.type','FIXED','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','].taskMode','forEach','START','SINGLE','flowType','config','END','flowJson.nodes','.transferCandidates.strategy','transferCandidates','flowJson.pageMode','findIndex','https://lovrabet.com/schema/rabetbase-flow-config.json','.timeout.scriptName','resultVariable','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','datasetCode','Node\x20has\x20no\x20outgoing\x20edge.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','143SCrAzU','mode','expression','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','3936834CeMCxC','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','title','\x20is\x20required.','map','Notification\x20configCode\x20is\x20required.','.expression','Node\x20cannot\x20reach\x20any\x20END.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Notification\x20fact.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','14tFVsWI','edges\x20must\x20be\x20an\x20array.','AUTO_REJECT','utf8','ALL','label','flowDesc\x20must\x20be\x20a\x20string.','.name','number','\x20facts.','cc\x20must\x20be\x20an\x20object.','HANDLE','.assignee','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.taskMode','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','bindDatasetCode','object','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','Notification\x20recipient\x20must\x20be\x20an\x20object.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','AUTO_APPROVE','pageIds','duration','HOURS','Notification\x20template\x20supports\x20at\x20most\x20','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','\x20actions.','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.tmp','join','text','^[1-9][0-9]*$','templateName','source','scriptResult','Duplicate\x20node\x20id:\x20','assignee','EXPRESSION','push','.conditionType','.detailMarkdown','schemaVersion','MINUTES','76598VfCund','flowJson.','result','isSafeInteger','.assignee.userIds','.cc.readSources','value\x20must\x20be\x20a\x20non-empty\x20string.','.async.enabled','.approvalMode','sequential\x20must\x20be\x20a\x20boolean.','waypoints','Reserved\x20resultVariable:\x20','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','value\x20must\x20be\x20an\x20array.','formSchema','APPROVAL\x20node\x20requires\x20assignee.','.text','flowJson.nodes[','Notification\x20recipient.type\x20is\x20required.','NOTIFICATION','flowJson\x20must\x20be\x20an\x20object.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','get','Notification\x20action\x20must\x20be\x20an\x20object.','.waypoints'];a299_0x4ba9=function(){return _0x1532c4;};return a299_0x4ba9();}function validateEdge(_0x36fd7b,_0x298c60,_0x5a594d){const _0x397e8c=a299_0x48fad8;_0x36fd7b[_0x397e8c(0x20e)]!==undefined&&typeof _0x36fd7b[_0x397e8c(0x20e)]!==_0x397e8c(0x238)&&_0x5a594d[_0x397e8c(0x1d7)]({'path':_0x298c60+'.name','message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x36fd7b[_0x397e8c(0x262)]!==undefined&&typeof _0x36fd7b[_0x397e8c(0x262)]!==_0x397e8c(0x170)&&_0x5a594d[_0x397e8c(0x1d7)]({'path':_0x298c60+_0x397e8c(0x22c),'message':_0x397e8c(0x279)}),_0x36fd7b['waypoints']!==undefined&&(!Array[_0x397e8c(0x2ae)](_0x36fd7b[_0x397e8c(0x1e6)])?_0x5a594d[_0x397e8c(0x1d7)]({'path':_0x298c60+_0x397e8c(0x1f4),'message':_0x397e8c(0x217)}):_0x36fd7b[_0x397e8c(0x1e6)][_0x397e8c(0x18e)]((_0x4d5484,_0x529bf7)=>{const _0x2fee62=_0x397e8c;if(!isRecord(_0x4d5484)){_0x5a594d[_0x2fee62(0x1d7)]({'path':_0x298c60+_0x2fee62(0x2bd)+_0x529bf7+']','message':_0x2fee62(0x1e8)});return;}for(const _0x58f7a9 of['x','y']){const _0x565659=_0x4d5484[_0x58f7a9];(typeof _0x565659!==_0x2fee62(0x1b7)||!Number[_0x2fee62(0x20c)](_0x565659))&&_0x5a594d[_0x2fee62(0x1d7)]({'path':_0x298c60+_0x2fee62(0x2bd)+_0x529bf7+'].'+_0x58f7a9,'message':'waypoint.'+_0x58f7a9+_0x2fee62(0x257)});}})),_0x36fd7b[_0x397e8c(0x253)]!==undefined&&!CONDITION_TYPES[_0x397e8c(0x298)](_0x36fd7b[_0x397e8c(0x253)])&&_0x5a594d['push']({'path':_0x298c60+_0x397e8c(0x1d8),'message':'Unsupported\x20condition\x20type:\x20'+String(_0x36fd7b[_0x397e8c(0x253)])+'.'}),_0x36fd7b['conditionType']===_0x397e8c(0x1d6)&&(typeof _0x36fd7b[_0x397e8c(0x1a2)]!==_0x397e8c(0x238)||_0x36fd7b[_0x397e8c(0x1a2)][_0x397e8c(0x2ba)]()==='')&&_0x5a594d['push']({'path':_0x298c60+_0x397e8c(0x1aa),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x36fd7b[_0x397e8c(0x262)]===!![]&&_0x36fd7b[_0x397e8c(0x253)]!==_0x397e8c(0x16f)&&_0x5a594d[_0x397e8c(0x1d7)]({'path':_0x298c60+_0x397e8c(0x22c),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x36fd7b['defaultFlow']===!![]&&typeof _0x36fd7b[_0x397e8c(0x1a2)]===_0x397e8c(0x238)&&_0x36fd7b['expression'][_0x397e8c(0x2ba)]()!==''&&_0x5a594d[_0x397e8c(0x1d7)]({'path':_0x298c60+_0x397e8c(0x1aa),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x2d230e,_0x4a7cd7,_0x2189dc,_0x5d49cd,_0x46f266,_0x4c9e7b,_0xa31fdb){const _0xe3fe2a=a299_0x48fad8;for(const [_0x42043f,_0x3e7e48]of _0x2d230e){const _0x45478f=_0x46f266[_0xe3fe2a(0x1f2)](_0x42043f)??[],_0x5e9811=_0x5d49cd['get'](_0x42043f)??[];_0x3e7e48['type']!==_0xe3fe2a(0x18f)&&_0x45478f[_0xe3fe2a(0x252)]===0x0&&_0xa31fdb['push']({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x2be)});_0x3e7e48['type']!=='END'&&_0x5e9811['length']===0x0&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x19e)});_0x3e7e48['type']===_0xe3fe2a(0x18f)&&_0x45478f[_0xe3fe2a(0x252)]>0x0&&_0xa31fdb['push']({'path':'flowJson.nodes.'+_0x42043f,'message':_0xe3fe2a(0x1c1)});_0x3e7e48[_0xe3fe2a(0x290)]===_0xe3fe2a(0x193)&&_0x5e9811[_0xe3fe2a(0x252)]>0x0&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x1a5)});if(_0x3e7e48[_0xe3fe2a(0x290)]==='CONDITION'){_0x5e9811['length']<0x2&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x220)});const _0xe5b126=_0x5e9811[_0xe3fe2a(0x26e)](_0x27aedc=>_0x27aedc[_0xe3fe2a(0x262)]===!![]);_0xe5b126[_0xe3fe2a(0x252)]!==0x1&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':'CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.'});if(_0xe5b126['length']===0x1){const _0x13519e=_0xe5b126[0x0],_0x4fc722=_0x4c9e7b[_0xe3fe2a(0x1f2)](_0x13519e)??'flowJson.edges';_0x13519e[_0xe3fe2a(0x253)]!=='ALWAYS'&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0x4fc722+_0xe3fe2a(0x1d8),'message':'CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.'});_0x13519e[_0xe3fe2a(0x1a2)]!==undefined&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0x4fc722+_0xe3fe2a(0x1aa),'message':_0xe3fe2a(0x26c)});for(const _0x1f28de of _0x5e9811){if(_0x1f28de===_0x13519e)continue;const _0x5ced76=_0x4c9e7b['get'](_0x1f28de)??_0xe3fe2a(0x16a);if(_0x1f28de[_0xe3fe2a(0x253)]!==_0xe3fe2a(0x1d6))_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0x5ced76+_0xe3fe2a(0x1d8),'message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0x1f28de['expression']!==_0xe3fe2a(0x238)||_0x1f28de['expression'][_0xe3fe2a(0x2ba)]()==='')&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0x5ced76+_0xe3fe2a(0x1aa),'message':_0xe3fe2a(0x275)});}}}if(_0x3e7e48[_0xe3fe2a(0x290)]===_0xe3fe2a(0x27f)&&(_0x3e7e48[_0xe3fe2a(0x23a)]??_0xe3fe2a(0x27f))===_0xe3fe2a(0x1ba)){if(_0x5e9811['length']!==0x1)_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x16e)});else{const _0x252ae2=_0x5e9811[0x0];((_0x252ae2[_0xe3fe2a(0x253)]??_0xe3fe2a(0x16f))!==_0xe3fe2a(0x16f)||_0x252ae2['defaultFlow']===!![]||typeof _0x252ae2[_0xe3fe2a(0x1a2)]===_0xe3fe2a(0x238)&&_0x252ae2['expression'][_0xe3fe2a(0x2ba)]()!=='')&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0x4c9e7b['get'](_0x252ae2)??_0xe3fe2a(0x16a),'message':_0xe3fe2a(0x25c)});}}else{if(_0x3e7e48[_0xe3fe2a(0x290)]===_0xe3fe2a(0x27f)){const _0x589796=_0x5e9811[_0xe3fe2a(0x1a8)](_0x596dce=>_0x596dce['conditionType']??_0xe3fe2a(0x16f)),_0x442d73=_0x589796[_0xe3fe2a(0x26e)](_0x157c10=>_0x157c10!==_0xe3fe2a(0x219)&&_0x157c10!=='REJECTED');_0x442d73[_0xe3fe2a(0x252)]>0x0&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x589796[_0xe3fe2a(0x26e)](_0x46faf3=>_0x46faf3===_0xe3fe2a(0x219))[_0xe3fe2a(0x252)]!==0x1&&_0xa31fdb['push']({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x245)}),_0x589796[_0xe3fe2a(0x26e)](_0x279526=>_0x279526===_0xe3fe2a(0x28f))['length']!==0x1&&_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x23e)}),_0x5e9811[_0xe3fe2a(0x1f5)](_0x2270d4=>_0x2270d4['defaultFlow']===!![])&&_0xa31fdb['push']({'path':_0xe3fe2a(0x282)+_0x42043f,'message':_0xe3fe2a(0x178)});}}}const _0x170371=new Set(),_0x3ecbed=_0x16c902=>{const _0x5b0fde=_0xe3fe2a;if(_0x170371['has'](_0x16c902))return;_0x170371[_0x5b0fde(0x1ff)](_0x16c902);for(const _0x209a12 of _0x5d49cd[_0x5b0fde(0x1f2)](_0x16c902)??[]){const _0x50613f=resolveEdgeEndpoint(_0x209a12[_0x5b0fde(0x21a)],_0x209a12['targetNodeId']);if(_0x50613f&&_0x2d230e[_0x5b0fde(0x298)](_0x50613f))_0x3ecbed(_0x50613f);}};_0x3ecbed(_0x4a7cd7);for(const _0x16a6ba of _0x2d230e['keys']()){!_0x170371['has'](_0x16a6ba)&&_0xa31fdb['push']({'path':_0xe3fe2a(0x282)+_0x16a6ba,'message':_0xe3fe2a(0x201)});}const _0x56ef87=_0x2189dc[_0xe3fe2a(0x1f5)](_0x3ae5ab=>_0x170371['has'](_0x3ae5ab));if(!_0x56ef87){_0xa31fdb[_0xe3fe2a(0x1d7)]({'path':_0xe3fe2a(0x16a),'message':_0xe3fe2a(0x258)});return;}const _0x677780=new Set(),_0x567e04=_0x5645d7=>{const _0x38e461=_0xe3fe2a;if(_0x677780['has'](_0x5645d7))return;_0x677780[_0x38e461(0x1ff)](_0x5645d7);for(const _0x532df9 of _0x46f266['get'](_0x5645d7)??[]){const _0x18d4d6=resolveEdgeEndpoint(_0x532df9[_0x38e461(0x1d2)],_0x532df9[_0x38e461(0x162)]);if(_0x18d4d6&&_0x2d230e[_0x38e461(0x298)](_0x18d4d6))_0x567e04(_0x18d4d6);}};for(const _0x216d75 of _0x2189dc){if(_0x2d230e[_0xe3fe2a(0x298)](_0x216d75))_0x567e04(_0x216d75);}for(const _0x2a32b of _0x170371){!_0x677780[_0xe3fe2a(0x298)](_0x2a32b)&&_0xa31fdb['push']({'path':_0xe3fe2a(0x282)+_0x2a32b,'message':_0xe3fe2a(0x1ab)});}}function validateApprovalResults(_0x5e1107,_0x3da6fb,_0x1c4f57,_0x1d7603){const _0x1ce336=a299_0x48fad8;if(_0x3da6fb===0x0)return;const _0x478e89=new Set(_0x1c4f57[_0x1ce336(0x1a8)](_0x54c3f9=>_0x5e1107[_0x1ce336(0x1f2)](_0x54c3f9)?.[_0x1ce336(0x1de)])[_0x1ce336(0x26e)](_0x41fec3=>typeof _0x41fec3===_0x1ce336(0x238)));for(const _0x293d3b of['APPROVED',_0x1ce336(0x28f)]){!_0x478e89['has'](_0x293d3b)&&_0x1d7603['push']({'path':_0x1ce336(0x194),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x293d3b+'.'});}}function validateScriptResultReferences(_0x55f9aa,_0x2b15a0,_0x1005e0,_0x3d9279,_0x5f4857,_0xb6df5f,_0x3e195a){const _0x44d4e7=a299_0x48fad8;if(_0xb6df5f['size']===0x0)return;const _0xe79b67=new Set(),_0x3adeb2=_0x51972d=>{const _0xf3a5df=a299_0x1582;if(!_0xe79b67[_0xf3a5df(0x298)](_0x51972d)&&_0x55f9aa[_0xf3a5df(0x298)](_0x51972d)){_0xe79b67[_0xf3a5df(0x1ff)](_0x51972d);for(const _0x6e5e00 of _0x1005e0[_0xf3a5df(0x1f2)](_0x51972d)??[]){const _0xbf069f=resolveEdgeEndpoint(_0x6e5e00[_0xf3a5df(0x21a)],_0x6e5e00[_0xf3a5df(0x165)]);if(_0xbf069f)_0x3adeb2(_0xbf069f);}}};_0x3adeb2(_0x2b15a0);const _0x44c1ed=new Map();for(const _0x2d3f1d of _0xe79b67){_0x44c1ed[_0x44d4e7(0x24c)](_0x2d3f1d,_0x2d3f1d===_0x2b15a0?new Set([_0x2b15a0]):new Set(_0xe79b67));}let _0x3e71a6=!![];while(_0x3e71a6){_0x3e71a6=![];for(const _0x45eebf of _0xe79b67){if(_0x45eebf===_0x2b15a0)continue;const _0x4d02fd=(_0x3d9279[_0x44d4e7(0x1f2)](_0x45eebf)??[])[_0x44d4e7(0x1a8)](_0x5a6c90=>resolveEdgeEndpoint(_0x5a6c90['source'],_0x5a6c90['sourceNodeId']))[_0x44d4e7(0x26e)](_0xa6273d=>Boolean(_0xa6273d&&_0xe79b67['has'](_0xa6273d)));if(_0x4d02fd['length']===0x0)continue;const _0x3dd486=new Set(_0x44c1ed['get'](_0x4d02fd[0x0])??[]);for(const _0xbe06ae of _0x4d02fd[_0x44d4e7(0x246)](0x1)){const _0x239374=_0x44c1ed[_0x44d4e7(0x1f2)](_0xbe06ae)??new Set();for(const _0x577983 of _0x3dd486){if(!_0x239374[_0x44d4e7(0x298)](_0x577983))_0x3dd486['delete'](_0x577983);}}_0x3dd486['add'](_0x45eebf);const _0x5172aa=_0x44c1ed[_0x44d4e7(0x1f2)](_0x45eebf);!setsEqual(_0x5172aa,_0x3dd486)&&(_0x44c1ed[_0x44d4e7(0x24c)](_0x45eebf,_0x3dd486),_0x3e71a6=!![]);}}for(const [_0x399506,_0x41ff5f]of _0x1005e0){const _0x4900ac=_0x44c1ed['get'](_0x399506);if(!_0x4900ac)continue;for(const _0x48e278 of _0x41ff5f){if(_0x48e278[_0x44d4e7(0x253)]!==_0x44d4e7(0x1d6)||typeof _0x48e278[_0x44d4e7(0x1a2)]!=='string')continue;for(const [_0x40beb0,_0x22f13d]of _0xb6df5f){expressionReferencesVariable(_0x48e278[_0x44d4e7(0x1a2)],_0x40beb0)&&!_0x4900ac[_0x44d4e7(0x298)](_0x22f13d)&&_0x3e195a[_0x44d4e7(0x1d7)]({'path':(_0x5f4857[_0x44d4e7(0x1f2)](_0x48e278)??'flowJson.edges')+_0x44d4e7(0x1aa),'message':_0x44d4e7(0x209)+_0x40beb0+_0x44d4e7(0x284)+_0x22f13d+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x399506+'.'});}}}}function expressionReferencesVariable(_0xedd65e,_0x323de3){const _0x5a3f51=a299_0x48fad8;let _0x1dde8c=0x0;while(_0x1dde8c<_0xedd65e[_0x5a3f51(0x252)]){const _0x2180be=_0xedd65e[_0x1dde8c];if(_0x2180be==='\x27'||_0x2180be==='\x22'){_0x1dde8c=skipQuotedExpressionSegment(_0xedd65e,_0x1dde8c,_0x2180be);continue;}if(!/[A-Za-z_]/[_0x5a3f51(0x283)](_0x2180be)){_0x1dde8c+=0x1;continue;}const _0x475f86=_0x1dde8c;_0x1dde8c+=0x1;while(_0x1dde8c<_0xedd65e[_0x5a3f51(0x252)]&&/[A-Za-z0-9_]/[_0x5a3f51(0x283)](_0xedd65e[_0x1dde8c])){_0x1dde8c+=0x1;}if(_0xedd65e[_0x5a3f51(0x246)](_0x475f86,_0x1dde8c)!==_0x323de3)continue;let _0x51f8bc=_0x475f86-0x1;while(_0x51f8bc>=0x0&&/\s/[_0x5a3f51(0x283)](_0xedd65e[_0x51f8bc])){_0x51f8bc-=0x1;}if(_0xedd65e[_0x51f8bc]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x3de012,_0x85785e,_0x1e581a){const _0x1e1c12=a299_0x48fad8;let _0x3b2c95=_0x85785e+0x1;while(_0x3b2c95<_0x3de012[_0x1e1c12(0x252)]){if(_0x3de012[_0x3b2c95]==='\x5c'){_0x3b2c95+=0x2;continue;}if(_0x3de012[_0x3b2c95]===_0x1e581a)return _0x3b2c95+0x1;_0x3b2c95+=0x1;}return _0x3b2c95;}function resolveEffectiveResultVariable(_0x10233e,_0x35972c){const _0xeba707=a299_0x48fad8;if(_0x10233e===undefined||_0x10233e===null||_0x35972c&&_0x10233e==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x10233e!==_0xeba707(0x238)||!VARIABLE_PATTERN[_0xeba707(0x283)](_0x10233e)||RESERVED_RESULT_VARIABLES[_0xeba707(0x298)](_0x10233e)||_0x10233e[_0xeba707(0x17a)](_0xeba707(0x261)))return undefined;return _0x10233e;}function registerResultVariableOwner(_0x184b0d,_0x14f4eb,_0x315371,_0x5727ff){const _0x346c3e=a299_0x48fad8;if(_0x184b0d[_0x346c3e(0x298)](_0x14f4eb)){_0x5727ff[_0x346c3e(0x1d7)]({'path':_0x346c3e(0x194),'message':'Duplicate\x20resultVariable:\x20'+_0x14f4eb+'.'});return;}_0x184b0d[_0x346c3e(0x24c)](_0x14f4eb,_0x315371);}function setsEqual(_0x1d8008,_0x531dda){const _0x4c10a8=a299_0x48fad8;return _0x1d8008[_0x4c10a8(0x173)]===_0x531dda[_0x4c10a8(0x173)]&&[..._0x1d8008][_0x4c10a8(0x29d)](_0x59fef5=>_0x531dda[_0x4c10a8(0x298)](_0x59fef5));}function isValidUserId(_0x45791c){const _0x22645c=a299_0x48fad8;if(typeof _0x45791c==='string')return _0x45791c['trim']()[_0x22645c(0x252)]>0x0;return Number[_0x22645c(0x1df)](_0x45791c)&&Number(_0x45791c)>0x0;}function resolveEdgeEndpoint(_0x4c8c33,_0x54b179){const _0xe7f75e=a299_0x48fad8;if(typeof _0x4c8c33===_0xe7f75e(0x238)&&_0x4c8c33[_0xe7f75e(0x2ba)]())return _0x4c8c33[_0xe7f75e(0x2ba)]();if(typeof _0x54b179===_0xe7f75e(0x238)&&_0x54b179[_0xe7f75e(0x2ba)]())return _0x54b179[_0xe7f75e(0x2ba)]();return undefined;}function removeEmptyMetadata(_0x30e066,_0x39259f,_0x4b8896,_0x243c6f){const _0x442774=a299_0x48fad8;if(Array[_0x442774(0x2ae)](_0x30e066)){_0x30e066['forEach']((_0x4a8034,_0x480775)=>removeEmptyMetadata(_0x4a8034,_0x39259f+'['+_0x480775+']',_0x4b8896,_0x243c6f));return;}if(!isRecord(_0x30e066))return;for(const [_0x1ab051,_0x4bf42e]of Object[_0x442774(0x20d)](_0x30e066)){const _0x58bb55=_0x39259f+'.'+_0x1ab051;if(_0x1ab051===_0x442774(0x1fe)&&isEmptyJsonValue(_0x4bf42e)){delete _0x30e066[_0x1ab051],_0x243c6f['push'](_0x58bb55),_0x4b8896[_0x442774(0x1d7)]({'code':_0x442774(0x163),'path':_0x58bb55,'message':_0x58bb55+'\x20was\x20empty\x20and\x20was\x20removed.'});continue;}removeEmptyMetadata(_0x4bf42e,_0x58bb55,_0x4b8896,_0x243c6f);}}function isEmptyJsonValue(_0x266d1e){const _0x25fc64=a299_0x48fad8;if(_0x266d1e===null||_0x266d1e===undefined)return!![];if(typeof _0x266d1e===_0x25fc64(0x238))return _0x266d1e[_0x25fc64(0x2ba)]()==='';if(Array[_0x25fc64(0x2ae)](_0x266d1e))return _0x266d1e[_0x25fc64(0x252)]===0x0;return isRecord(_0x266d1e)&&Object[_0x25fc64(0x17b)](_0x266d1e)[_0x25fc64(0x252)]===0x0;}function isRecord(_0x565801){const _0x3e0684=a299_0x48fad8;return typeof _0x565801===_0x3e0684(0x1c0)&&_0x565801!==null&&!Array[_0x3e0684(0x2ae)](_0x565801);}function cloneJsonValue(_0x539b88){const _0x44f73c=a299_0x48fad8;return JSON[_0x44f73c(0x239)](JSON[_0x44f73c(0x228)](_0x539b88));}export async function readFlowConfigFile(_0x371c0c){const _0x2d622e=a299_0x48fad8,_0x61f52b=await readFile(resolve(_0x371c0c),_0x2d622e(0x1b2));return JSON[_0x2d622e(0x239)](_0x61f52b);}
|
|
1
|
+
const a299_0xf21873=a299_0x1204;(function(_0x4d10ce,_0x466ad5){const _0x416a7e=a299_0x1204,_0x2b79c4=_0x4d10ce();while(!![]){try{const _0x29a9be=-parseInt(_0x416a7e(0x25d))/0x1*(parseInt(_0x416a7e(0x20c))/0x2)+parseInt(_0x416a7e(0x257))/0x3*(-parseInt(_0x416a7e(0x292))/0x4)+parseInt(_0x416a7e(0x204))/0x5+-parseInt(_0x416a7e(0x328))/0x6+-parseInt(_0x416a7e(0x23b))/0x7*(-parseInt(_0x416a7e(0x310))/0x8)+parseInt(_0x416a7e(0x217))/0x9+parseInt(_0x416a7e(0x1cf))/0xa;if(_0x29a9be===_0x466ad5)break;else _0x2b79c4['push'](_0x2b79c4['shift']());}catch(_0x11039a){_0x2b79c4['push'](_0x2b79c4['shift']());}}}(a299_0xb9a6,0xdd3b8));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_0xf21873(0x31c),'$id':a299_0xf21873(0x200),'title':a299_0xf21873(0x2c2),'type':a299_0xf21873(0x23a),'required':['flowName',a299_0xf21873(0x315),a299_0xf21873(0x309)],'$defs':{'userId':{'anyOf':[{'type':a299_0xf21873(0x21e),'minLength':0x1},{'type':a299_0xf21873(0x20e),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0xf21873(0x285),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a299_0xf21873(0x29c),a299_0xf21873(0x1ee)],'properties':{'value':{'type':a299_0xf21873(0x20e),'minimum':0x1},'unit':{'enum':['SECONDS',a299_0xf21873(0x206),a299_0xf21873(0x262),a299_0xf21873(0x2f8)]}},'additionalProperties':!![]},'flowNode':{'type':a299_0xf21873(0x23a),'required':['id',a299_0xf21873(0x1f0),a299_0xf21873(0x26e),a299_0xf21873(0x2ec)],'properties':{'id':{'type':a299_0xf21873(0x21e),'pattern':a299_0xf21873(0x2ed)},'type':{'enum':[a299_0xf21873(0x22d),a299_0xf21873(0x318),a299_0xf21873(0x2dc),a299_0xf21873(0x1f8),a299_0xf21873(0x32d),a299_0xf21873(0x2c6)]},'name':{'type':a299_0xf21873(0x21e),'minLength':0x1},'path':{'type':a299_0xf21873(0x21e),'minLength':0x1},'position':{'$ref':a299_0xf21873(0x230)},'approvalMode':{'enum':[a299_0xf21873(0x2d0),a299_0xf21873(0x2a1),'ANY']},'taskMode':{'enum':[a299_0xf21873(0x2dc),a299_0xf21873(0x2d1)]},'assignee':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x327)],'properties':{'strategy':{'enum':[a299_0xf21873(0x211),'ROLE']},'userIds':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a299_0xf21873(0x20e),'minimum':0x1},{'type':'string','pattern':a299_0xf21873(0x264)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x327),'userIds'],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':a299_0xf21873(0x1ef)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0xf21873(0x248),'REJECTED']},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0xf21873(0x21e),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a299_0xf21873(0x275)},'retryCount':{'type':a299_0xf21873(0x20e),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0xf21873(0x208)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0xf21873(0x275)},'duration':{'$ref':a299_0xf21873(0x208)},'action':{'enum':[a299_0xf21873(0x283),'AUTO_REJECT',a299_0xf21873(0x2bb)]},'interrupting':{'type':a299_0xf21873(0x275)},'scriptName':{'type':a299_0xf21873(0x21e),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0xf21873(0x2ed)}},'additionalProperties':!![]},'cc':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x297)],'properties':{'recipientUserIds':{'type':a299_0xf21873(0x22b),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0xf21873(0x21e),'minLength':0x1}},'visible':{'type':a299_0xf21873(0x22b),'uniqueItems':!![],'items':{'type':a299_0xf21873(0x21e),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x272),'template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0xf21873(0x21e),'minLength':0x1},'failurePolicy':{'enum':[a299_0xf21873(0x2fc),'FAIL']},'template':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x268),a299_0xf21873(0x301)],'properties':{'title':{'type':a299_0xf21873(0x21e),'minLength':0x1},'summary':{'type':a299_0xf21873(0x21e),'minLength':0x1},'detailMarkdown':{'type':a299_0xf21873(0x21e)},'facts':{'type':a299_0xf21873(0x22b),'maxItems':0x8,'items':{'type':a299_0xf21873(0x23a),'required':['label',a299_0xf21873(0x29c)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a299_0xf21873(0x21e),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0xf21873(0x22b),'maxItems':0x2,'items':{'type':'object','required':['text',a299_0xf21873(0x1d9)],'properties':{'text':{'type':a299_0xf21873(0x21e),'minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0xf21873(0x22b),'items':{'type':a299_0xf21873(0x23a),'required':['type','value'],'properties':{'type':{'enum':[a299_0xf21873(0x31e),a299_0xf21873(0x252),a299_0xf21873(0x308)]},'value':{'type':a299_0xf21873(0x21e),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0xf21873(0x23a),'properties':{'id':{'type':a299_0xf21873(0x21e),'pattern':a299_0xf21873(0x2ed)},'source':{'type':a299_0xf21873(0x21e),'minLength':0x1},'target':{'type':a299_0xf21873(0x21e),'minLength':0x1},'sourceNodeId':{'type':a299_0xf21873(0x21e),'minLength':0x1},'targetNodeId':{'type':a299_0xf21873(0x21e),'minLength':0x1},'conditionType':{'enum':[a299_0xf21873(0x30f),a299_0xf21873(0x248),a299_0xf21873(0x1e6),a299_0xf21873(0x306)]},'expression':{'type':a299_0xf21873(0x21e)},'defaultFlow':{'type':a299_0xf21873(0x275)},'name':{'type':'string'},'waypoints':{'type':a299_0xf21873(0x22b),'items':{'$ref':a299_0xf21873(0x230)}}},'allOf':[{'anyOf':[{'required':[a299_0xf21873(0x267)]},{'required':[a299_0xf21873(0x2c9)]}]},{'anyOf':[{'required':[a299_0xf21873(0x2b4)]},{'required':[a299_0xf21873(0x1cd)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0xf21873(0x21e),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a299_0xf21873(0x2e0),a299_0xf21873(0x260)]},'datasetCode':{'type':a299_0xf21873(0x21e),'minLength':0x1},'pageId':{'type':'integer','minimum':0x1,'maximum':Number[a299_0xf21873(0x210)]},'pageIds':{'type':a299_0xf21873(0x22b),'items':{'type':a299_0xf21873(0x20e),'minimum':0x1,'maximum':Number[a299_0xf21873(0x210)]}},'templateName':![],'flowJson':{'type':a299_0xf21873(0x23a),'required':[a299_0xf21873(0x1c9),a299_0xf21873(0x1e8)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a299_0xf21873(0x21e),'const':'approval.simple-flow.v1','description':a299_0xf21873(0x1fe)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0xf21873(0x1ce)},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':a299_0xf21873(0x30c)}},'edges':{'type':a299_0xf21873(0x22b),'minItems':0x1,'items':{'$ref':a299_0xf21873(0x31b)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0xf21873(0x23e),a299_0xf21873(0x302),'flowName',a299_0xf21873(0x265),'datasetCode',a299_0xf21873(0x219),a299_0xf21873(0x2e3),a299_0xf21873(0x21d)],REMOVED_ROOT_FIELDS=['id',a299_0xf21873(0x219),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION=a299_0xf21873(0x2e7),NODE_TYPES=new Set(['START',a299_0xf21873(0x318),'APPROVAL',a299_0xf21873(0x1f8),'SCRIPT',a299_0xf21873(0x2c6)]),CONDITION_TYPES=new Set([a299_0xf21873(0x30f),a299_0xf21873(0x248),a299_0xf21873(0x1e6),'EXPRESSION']),APPROVAL_MODES=new Set([a299_0xf21873(0x2d0),a299_0xf21873(0x2a1),a299_0xf21873(0x2d8)]),APPROVAL_TASK_MODES=new Set([a299_0xf21873(0x2dc),'HANDLE']),FLOW_TIME_UNITS=new Set([a299_0xf21873(0x1cc),a299_0xf21873(0x206),a299_0xf21873(0x262),a299_0xf21873(0x2f8)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0xf21873(0x283),a299_0xf21873(0x2d2),'EXECUTE_BFF']),FLOW_TYPES=new Set([a299_0xf21873(0x2e0),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a299_0xf21873(0x28b)]),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_0xf21873(0x2fc),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER',a299_0xf21873(0x252),a299_0xf21873(0x308)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0xf21873(0x23f)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0xf21873(0x2cf),UNSUPPORTED_FORM_MESSAGE=a299_0xf21873(0x216),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0xf21873(0x215),RESERVED_RESULT_VARIABLES=new Set([a299_0xf21873(0x21f),a299_0xf21873(0x27f),'approval_sys_appCode',a299_0xf21873(0x2cb),'approval_sys_initiatorUserId',a299_0xf21873(0x27d),a299_0xf21873(0x2b7),'approval_sys_pageId',a299_0xf21873(0x220),'approval_sys_dataId']);export function normalizeFlowConfig(_0x66cb15){const _0x21ca37=a299_0xf21873;if(!isRecord(_0x66cb15))throw new TypeError(_0x21ca37(0x317));const _0x28876a=cloneJsonValue(_0x66cb15),_0x436939=_0x28876a[_0x21ca37(0x309)],_0x1eb536=isRecord(_0x436939)?cloneJsonValue(_0x436939):{},_0x5990f1=[],_0x1093ae=[];for(const _0x266be2 of REMOVED_ROOT_FIELDS){if(!Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x28876a,_0x266be2))continue;delete _0x28876a[_0x266be2],_0x1093ae[_0x21ca37(0x2c1)](_0x266be2),_0x5990f1['push']({'code':_0x21ca37(0x2ba),'path':_0x266be2,'message':_0x266be2+_0x21ca37(0x2b8)});}for(const _0x3af03d of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x1eb536,_0x3af03d))continue;const _0x4e3409=_0x21ca37(0x1dc)+_0x3af03d;delete _0x1eb536[_0x3af03d],_0x1093ae[_0x21ca37(0x2c1)](_0x4e3409),_0x5990f1['push']({'code':'legacy_field_removed','path':_0x4e3409,'message':_0x4e3409+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x1eb536,'schemaVersion')){const _0x361e8c=_0x1eb536[_0x21ca37(0x2c0)],_0x585812=typeof _0x361e8c===_0x21ca37(0x21e)?_0x361e8c[_0x21ca37(0x325)]():_0x361e8c;if(isEmptyJsonValue(_0x361e8c)||_0x585812===DEFAULT_FLOW_SCHEMA_VERSION){const _0x3b5e8b='flowJson.schemaVersion';delete _0x1eb536['schemaVersion'],_0x1093ae['push'](_0x3b5e8b),_0x5990f1[_0x21ca37(0x2c1)]({'code':'legacy_field_removed','path':_0x3b5e8b,'message':_0x3b5e8b+_0x21ca37(0x287)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x1eb536,_0x21ca37(0x309),_0x5990f1,_0x1093ae);_0x28876a[_0x21ca37(0x315)]===_0x21ca37(0x260)&&!Object[_0x21ca37(0x31d)][_0x21ca37(0x2fd)][_0x21ca37(0x20b)](_0x1eb536,'pageMode')&&(_0x1eb536[_0x21ca37(0x1e7)]=_0x21ca37(0x1ce));_0x28876a[_0x21ca37(0x309)]=_0x1eb536;if(typeof _0x28876a[_0x21ca37(0x282)]===_0x21ca37(0x21e))_0x28876a['flowName']=_0x28876a[_0x21ca37(0x282)]['trim']();return{'config':_0x28876a,'warnings':_0x5990f1,'removedPaths':_0x1093ae};}export function validateFlowConfig(_0x40473b){const _0xa2716=a299_0xf21873;let _0x1c78c9;try{_0x1c78c9=normalizeFlowConfig(_0x40473b);}catch(_0x270c53){const _0x31c0c4=_0x270c53 instanceof Error?_0x270c53[_0xa2716(0x2fe)]:String(_0x270c53),_0x5437d1={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x31c0c4}],'warnings':[],'normalized':_0x5437d1,'validationConfig':_0x5437d1};}const _0x55dfd5=_0x1c78c9[_0xa2716(0x22f)],_0x5dcb32=cloneJsonValue(_0x55dfd5),_0x4faaeb=_0x5dcb32[_0xa2716(0x309)];_0x4faaeb['flowKey']='__rabetbase_local_validation__',_0x4faaeb[_0xa2716(0x282)]=_0x55dfd5[_0xa2716(0x282)];typeof _0x55dfd5[_0xa2716(0x274)]===_0xa2716(0x21e)&&_0x55dfd5[_0xa2716(0x274)][_0xa2716(0x325)]()&&(_0x4faaeb[_0xa2716(0x265)]=_0x55dfd5['datasetCode'][_0xa2716(0x325)]());const _0x309104=[];return validateOuterMetadata(_0x55dfd5,_0x309104),validateFlowClassification(_0x55dfd5,_0x309104),validateGraph(_0x55dfd5[_0xa2716(0x309)],_0x309104),{'valid':_0x309104[_0xa2716(0x24f)]===0x0,'errors':_0x309104,'warnings':_0x1c78c9[_0xa2716(0x266)],'normalized':_0x55dfd5,'validationConfig':_0x5dcb32};}function validateFlowClassification(_0x31f301,_0x3c1091){const _0x1a05af=a299_0xf21873;if(!isRecord(_0x31f301[_0x1a05af(0x309)]))return;const _0x53eac6=_0x31f301[_0x1a05af(0x315)],_0x1e71ab=_0x31f301[_0x1a05af(0x309)][_0x1a05af(0x1e7)];_0x1e71ab!==undefined&&(typeof _0x1e71ab!==_0x1a05af(0x21e)||!FLOW_PAGE_MODES['has'](_0x1e71ab))&&_0x3c1091[_0x1a05af(0x2c1)]({'path':'flowJson.pageMode','message':_0x1a05af(0x29d)+String(_0x1e71ab)+'.'});_0x53eac6===_0x1a05af(0x2e0)&&_0x1e71ab!==undefined&&_0x3c1091[_0x1a05af(0x2c1)]({'path':_0x1a05af(0x1e2),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0x53eac6===_0x1a05af(0x260)&&_0x1e71ab==='PLATFORM_FORM'&&_0x3c1091[_0x1a05af(0x2c1)]({'path':_0x1a05af(0x1e2),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x53eac6===_0x1a05af(0x2e0)||_0x53eac6===_0x1a05af(0x260))&&validateCustomPageNavigation(_0x31f301,_0x53eac6,_0x1e71ab,_0x3c1091);if(_0x53eac6!=='FORM_FLOW'||!Array[_0x1a05af(0x1f1)](_0x31f301[_0x1a05af(0x309)][_0x1a05af(0x1c9)]))return;_0x31f301[_0x1a05af(0x309)][_0x1a05af(0x1c9)][_0x1a05af(0x32a)]((_0x56775b,_0x44edc3)=>{const _0x5dbac2=_0x1a05af;isRecord(_0x56775b)&&_0x56775b['type']===_0x5dbac2(0x2dc)&&_0x56775b[_0x5dbac2(0x279)]===_0x5dbac2(0x2d1)&&_0x3c1091['push']({'path':_0x5dbac2(0x300)+_0x44edc3+_0x5dbac2(0x289),'message':_0x5dbac2(0x307)});});}function validateCustomPageNavigation(_0x58172f,_0x2cda5c,_0xe27b01,_0x2a4ef6){const _0x4e4860=a299_0xf21873,_0x1d4c95=_0x58172f[_0x4e4860(0x309)][_0x4e4860(0x2c5)];_0x1d4c95!==undefined&&_0x2a4ef6[_0x4e4860(0x2c1)]({'path':_0x4e4860(0x2f5),'message':_0x4e4860(0x269)});const _0x3e4907=_0x58172f[_0x4e4860(0x309)][_0x4e4860(0x223)];_0x3e4907!==undefined&&(typeof _0x3e4907!==_0x4e4860(0x21e)||_0x3e4907[_0x4e4860(0x325)]()==='')&&_0x2a4ef6[_0x4e4860(0x2c1)]({'path':'flowJson.startPath','message':_0x4e4860(0x1e4)});const _0x2aebbe=Array[_0x4e4860(0x1f1)](_0x58172f[_0x4e4860(0x309)]['nodes'])?_0x58172f[_0x4e4860(0x309)][_0x4e4860(0x1c9)][_0x4e4860(0x253)]((_0x286835,_0x3c4bf5)=>({'node':_0x286835,'index':_0x3c4bf5}))[_0x4e4860(0x2a3)](({node:_0x1a72d9})=>isRecord(_0x1a72d9)&&_0x1a72d9[_0x4e4860(0x27a)]!==undefined):[],_0x3d2127=_0x3e4907!==undefined||_0x2aebbe[_0x4e4860(0x24f)]>0x0,_0xcc29d7=_0xe27b01===undefined&&_0x2cda5c===_0x4e4860(0x260)?_0x4e4860(0x1ce):_0xe27b01;_0x3d2127&&(_0x2cda5c!==_0x4e4860(0x260)||_0xcc29d7!==_0x4e4860(0x1ce))&&(_0x3e4907!==undefined&&_0x2a4ef6['push']({'path':_0x4e4860(0x214),'message':_0x4e4860(0x235)}),_0x2aebbe[_0x4e4860(0x32a)](({index:_0x29a36d})=>{const _0x3e6cb6=_0x4e4860;_0x2a4ef6[_0x3e6cb6(0x2c1)]({'path':_0x3e6cb6(0x300)+_0x29a36d+_0x3e6cb6(0x1fb),'message':_0x3e6cb6(0x26f)});}));}export async function writeNormalizedFlowConfig(_0x270866,_0x5db509,_0x34beda={}){const _0x3d1e49=a299_0xf21873,_0x1c2e54=resolve(_0x270866),_0x28fb6e=_0x1c2e54+'.'+process[_0x3d1e49(0x29b)]+'.'+randomUUID()+_0x3d1e49(0x2a0),_0x204164=JSON[_0x3d1e49(0x21a)](_0x5db509,null,0x2)+'\x0a';let _0x45dfbc;try{try{_0x45dfbc=(await stat(_0x1c2e54))[_0x3d1e49(0x1e9)]&0x1ff;}catch{_0x45dfbc=undefined;}await writeFile(_0x28fb6e,_0x204164,{'encoding':_0x3d1e49(0x278),'flag':'wx','mode':_0x45dfbc??0x1a4});if(_0x45dfbc!==undefined)await chmod(_0x28fb6e,_0x45dfbc);_0x34beda[_0x3d1e49(0x251)]===![]?(await link(_0x28fb6e,_0x1c2e54),await unlink(_0x28fb6e)):await rename(_0x28fb6e,_0x1c2e54);}finally{await unlink(_0x28fb6e)[_0x3d1e49(0x1f4)](()=>undefined);}}function validateOuterMetadata(_0x5cccf8,_0x49a551){const _0x397636=a299_0xf21873;(typeof _0x5cccf8[_0x397636(0x282)]!=='string'||_0x5cccf8[_0x397636(0x282)][_0x397636(0x325)]()==='')&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x282),'message':_0x397636(0x329)});_0x5cccf8[_0x397636(0x2a4)]!==undefined&&typeof _0x5cccf8[_0x397636(0x2a4)]!==_0x397636(0x21e)&&_0x49a551['push']({'path':_0x397636(0x2a4),'message':_0x397636(0x26d)});if(_0x5cccf8[_0x397636(0x315)]===undefined||_0x5cccf8[_0x397636(0x315)]===null)_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x315),'message':_0x397636(0x311)});else(typeof _0x5cccf8[_0x397636(0x315)]!==_0x397636(0x21e)||!FLOW_TYPES[_0x397636(0x2fb)](_0x5cccf8['flowType']))&&_0x49a551['push']({'path':'flowType','message':_0x397636(0x2a5)+String(_0x5cccf8[_0x397636(0x315)])+'.'});_0x5cccf8[_0x397636(0x274)]!==undefined&&typeof _0x5cccf8['datasetCode']!==_0x397636(0x21e)&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x274),'message':_0x397636(0x24b)});_0x5cccf8[_0x397636(0x22a)]===undefined&&_0x5cccf8[_0x397636(0x2e3)]!==undefined&&(!Number['isSafeInteger'](_0x5cccf8[_0x397636(0x2e3)])||_0x5cccf8[_0x397636(0x2e3)]<=0x0)&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x2e3),'message':_0x397636(0x1cb)});if(_0x5cccf8['pageIds']!==undefined){if(!Array[_0x397636(0x1f1)](_0x5cccf8[_0x397636(0x22a)])||_0x5cccf8[_0x397636(0x22a)]['some'](_0x1f9732=>!Number[_0x397636(0x1d4)](_0x1f9732)||_0x1f9732<=0x0))_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x22a),'message':'pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.'});else[...new Set(_0x5cccf8['pageIds'])][_0x397636(0x2f9)](',')[_0x397636(0x24f)]>0x800&&_0x49a551[_0x397636(0x2c1)]({'path':'pageIds','message':_0x397636(0x1fd)});_0x5cccf8[_0x397636(0x315)]==='INDEPENDENT_FLOW'&&Array[_0x397636(0x1f1)](_0x5cccf8['pageIds'])&&_0x5cccf8[_0x397636(0x22a)][_0x397636(0x24f)]>0x0&&_0x49a551['push']({'path':_0x397636(0x22a),'message':_0x397636(0x29e)});}_0x5cccf8['flowType']===_0x397636(0x260)&&_0x5cccf8[_0x397636(0x274)]!==undefined&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x274),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.'}),_0x5cccf8[_0x397636(0x315)]==='INDEPENDENT_FLOW'&&_0x5cccf8[_0x397636(0x22a)]===undefined&&_0x5cccf8['pageId']!==undefined&&_0x49a551[_0x397636(0x2c1)]({'path':_0x397636(0x2e3),'message':_0x397636(0x24a)});}function validateGraph(_0x255619,_0x3d54f5){const _0x33b7f4=a299_0xf21873;if(!isRecord(_0x255619)){_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x309),'message':_0x33b7f4(0x28e)});return;}!Array[_0x33b7f4(0x1f1)](_0x255619[_0x33b7f4(0x1c9)])&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':'flowJson.nodes','message':_0x33b7f4(0x23d)});!Array[_0x33b7f4(0x1f1)](_0x255619['edges'])&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x233),'message':_0x33b7f4(0x31a)});Object[_0x33b7f4(0x31d)]['hasOwnProperty'][_0x33b7f4(0x20b)](_0x255619,_0x33b7f4(0x2c0))&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':'flowJson.schemaVersion','message':'Unsupported\x20schemaVersion:\x20'+String(_0x255619[_0x33b7f4(0x2c0)])+_0x33b7f4(0x1ca)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x26fecc of[_0x33b7f4(0x218),_0x33b7f4(0x2a2),'formPermissions']){Object['prototype'][_0x33b7f4(0x2fd)][_0x33b7f4(0x20b)](_0x255619,_0x26fecc)&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x1dc)+_0x26fecc,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x255619[_0x33b7f4(0x1c9)])||!Array[_0x33b7f4(0x1f1)](_0x255619['edges']))return;const _0x249796=new Map(),_0x45d2e3=[],_0x800a34=[],_0x7d899a=new Map(),_0xbada06=new Map(),_0x2a00bc=new Set();let _0x406a1c=0x0;_0x255619[_0x33b7f4(0x1c9)][_0x33b7f4(0x32a)]((_0xeb1db7,_0x5523c2)=>{const _0x218e95=_0x33b7f4,_0x2b3d90=_0x218e95(0x300)+_0x5523c2+']';if(!isRecord(_0xeb1db7)){_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90,'message':_0x218e95(0x2b6)});return;}const _0x3df17f=_0xeb1db7;if(typeof _0x3df17f['id']!==_0x218e95(0x21e)||!BPMN_ID_PATTERN[_0x218e95(0x2eb)](_0x3df17f['id']))_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90+_0x218e95(0x2fa),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x249796[_0x218e95(0x2fb)](_0x3df17f['id'])?_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90+'.id','message':_0x218e95(0x2e1)+_0x3df17f['id']+'.'}):(_0x249796[_0x218e95(0x227)](_0x3df17f['id'],_0x3df17f),_0x2a00bc[_0x218e95(0x32f)](_0x3df17f['id']));if(!NODE_TYPES[_0x218e95(0x2fb)](_0x3df17f['type']))_0x3d54f5[_0x218e95(0x2c1)]({'path':_0x2b3d90+_0x218e95(0x2ca),'message':_0x218e95(0x246)+String(_0x3df17f[_0x218e95(0x1f0)])+'.'});else{if(_0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x22d))_0x45d2e3[_0x218e95(0x2c1)](_0x3df17f['id']);else _0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x318)&&_0x800a34[_0x218e95(0x2c1)](_0x3df17f['id']);}_0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x2dc)&&(_0x3df17f[_0x218e95(0x279)]===undefined||_0x3df17f['taskMode']==='APPROVAL')&&(_0x406a1c+=0x1);validateNode(_0x3df17f,_0x2b3d90,_0x3d54f5);if(_0x3df17f['type']===_0x218e95(0x32d)){const _0x4797de=resolveEffectiveResultVariable(_0x3df17f[_0x218e95(0x2a7)],![]);_0x4797de&&(registerResultVariableOwner(_0xbada06,_0x4797de,_0x3df17f['id'],_0x3d54f5),!_0x7d899a[_0x218e95(0x2fb)](_0x4797de)&&_0x7d899a[_0x218e95(0x227)](_0x4797de,_0x3df17f['id']));}if(_0x3df17f[_0x218e95(0x1f0)]===_0x218e95(0x2dc)&&isRecord(_0x3df17f[_0x218e95(0x2aa)])&&_0x3df17f[_0x218e95(0x2aa)][_0x218e95(0x32c)]===!![]&&_0x3df17f['timeout'][_0x218e95(0x26b)]===_0x218e95(0x2bb)){const _0x2e886a=resolveEffectiveResultVariable(_0x3df17f[_0x218e95(0x2aa)][_0x218e95(0x2a7)],!![]);_0x2e886a&®isterResultVariableOwner(_0xbada06,_0x2e886a,_0x3df17f['id']+'.timeout',_0x3d54f5);}});_0x45d2e3['length']!==0x1&&_0x3d54f5[_0x33b7f4(0x2c1)]({'path':_0x33b7f4(0x26c),'message':_0x33b7f4(0x229)});_0x800a34[_0x33b7f4(0x24f)]===0x0&&_0x3d54f5['push']({'path':_0x33b7f4(0x26c),'message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x57bd17=new Map(),_0x575fc4=new Map(),_0x37c28c=new Map(),_0x338e66=new Set();_0x255619['edges']['forEach']((_0x351cb9,_0x26060a)=>{const _0xf63826=_0x33b7f4,_0x51f61e=_0xf63826(0x232)+_0x26060a+']';if(!isRecord(_0x351cb9)){_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e,'message':_0xf63826(0x259)});return;}const _0x4846d9=_0x351cb9;_0x37c28c[_0xf63826(0x227)](_0x4846d9,_0x51f61e);const _0x111f19=resolveEdgeEndpoint(_0x4846d9[_0xf63826(0x267)],_0x4846d9['sourceNodeId']),_0x7f85e4=resolveEdgeEndpoint(_0x4846d9['target'],_0x4846d9[_0xf63826(0x1cd)]);if(!_0x111f19)_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x21b),'message':'edge\x20source\x20is\x20required.'});if(!_0x7f85e4)_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x2af),'message':_0xf63826(0x281)});_0x111f19&&!_0x249796[_0xf63826(0x2fb)](_0x111f19)&&_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x21b),'message':_0xf63826(0x24c)+_0x111f19+'.'});_0x7f85e4&&!_0x249796[_0xf63826(0x2fb)](_0x7f85e4)&&_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+'.target','message':_0xf63826(0x2bd)+_0x7f85e4+'.'});if(_0x4846d9['id']!==undefined){if(typeof _0x4846d9['id']!==_0xf63826(0x21e)||!BPMN_ID_PATTERN['test'](_0x4846d9['id']))_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x2fa),'message':'edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else{if(_0x2a00bc[_0xf63826(0x2fb)](_0x4846d9['id']))_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e+_0xf63826(0x2fa),'message':_0xf63826(0x322)+_0x4846d9['id']+'.'});else!_0x2a00bc[_0xf63826(0x2fb)](_0x4846d9['id'])&&_0x2a00bc[_0xf63826(0x32f)](_0x4846d9['id']);}}if(_0x111f19&&_0x7f85e4){const _0x55e3a9=_0x111f19+'\x00'+_0x7f85e4+'\x00'+(_0x4846d9[_0xf63826(0x261)]??'ALWAYS');_0x338e66[_0xf63826(0x2fb)](_0x55e3a9)?_0x3d54f5[_0xf63826(0x2c1)]({'path':_0x51f61e,'message':'Duplicate\x20edge\x20route:\x20'+_0x111f19+_0xf63826(0x1dd)+_0x7f85e4+'\x20('+(_0x4846d9[_0xf63826(0x261)]??_0xf63826(0x30f))+').'}):_0x338e66[_0xf63826(0x32f)](_0x55e3a9);}validateEdge(_0x4846d9,_0x51f61e,_0x3d54f5),_0x111f19&&_0x7f85e4&&(_0x57bd17['get'](_0x111f19)?.['push'](_0x4846d9)??_0x57bd17[_0xf63826(0x227)](_0x111f19,[_0x4846d9]),_0x575fc4[_0xf63826(0x2f6)](_0x7f85e4)?.[_0xf63826(0x2c1)](_0x4846d9)??_0x575fc4['set'](_0x7f85e4,[_0x4846d9]));});if(_0x45d2e3['length']!==0x1)return;validateGraphShape(_0x249796,_0x45d2e3[0x0],_0x800a34,_0x57bd17,_0x575fc4,_0x37c28c,_0x3d54f5),validateScriptResultReferences(_0x249796,_0x45d2e3[0x0],_0x57bd17,_0x575fc4,_0x37c28c,_0x7d899a,_0x3d54f5),validateApprovalResults(_0x249796,_0x406a1c,_0x800a34,_0x3d54f5);}function validateNode(_0x686ed7,_0x315520,_0x19b8f7){const _0x3b1740=a299_0xf21873;for(const _0x49c990 of[_0x3b1740(0x207),_0x3b1740(0x202)]){Object['prototype'][_0x3b1740(0x2fd)][_0x3b1740(0x20b)](_0x686ed7,_0x49c990)&&_0x19b8f7['push']({'path':_0x315520+'.'+_0x49c990,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x3b1740(0x2fb)](_0x686ed7[_0x3b1740(0x1f0)]))return;(typeof _0x686ed7[_0x3b1740(0x26e)]!==_0x3b1740(0x21e)||_0x686ed7['name'][_0x3b1740(0x325)]()==='')&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+'.name','message':_0x3b1740(0x255)});_0x686ed7[_0x3b1740(0x2e3)]!==undefined&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x2cd),'message':_0x3b1740(0x2c7)});if(_0x686ed7['path']!==undefined){if(typeof _0x686ed7[_0x3b1740(0x27a)]!=='string'||_0x686ed7['path']['trim']()==='')_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x224),'message':_0x3b1740(0x2d4)});else _0x686ed7['type']!=='APPROVAL'&&_0x686ed7[_0x3b1740(0x1f0)]!==_0x3b1740(0x318)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x224),'message':_0x3b1740(0x1f2)});}const _0x39efa2=_0x686ed7[_0x3b1740(0x2ec)];if(!isRecord(_0x39efa2))_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x228),'message':_0x3b1740(0x1d2)});else for(const _0x254d6b of['x','y']){const _0x4b604e=_0x39efa2[_0x254d6b];(typeof _0x4b604e!==_0x3b1740(0x285)||!Number[_0x3b1740(0x209)](_0x4b604e)||_0x4b604e<0x0)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2d7)+_0x254d6b,'message':_0x3b1740(0x212)+_0x254d6b+_0x3b1740(0x32b)});}if(_0x686ed7['type']==='APPROVAL'){const _0x16baa6=_0x686ed7[_0x3b1740(0x249)]??_0x3b1740(0x2d0),_0xa347d8=_0x686ed7[_0x3b1740(0x279)]??_0x3b1740(0x2dc);!APPROVAL_TASK_MODES[_0x3b1740(0x2fb)](_0xa347d8)&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x271),'message':_0x3b1740(0x25c)+String(_0xa347d8)+'.'});!APPROVAL_MODES[_0x3b1740(0x2fb)](_0x16baa6)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x237),'message':_0x3b1740(0x28c)+String(_0x16baa6)+'.'});if(!isRecord(_0x686ed7[_0x3b1740(0x20f)]))_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x2e6),'message':_0x3b1740(0x273)});else{const _0x31b23f=_0x686ed7[_0x3b1740(0x20f)][_0x3b1740(0x327)];_0x31b23f!=='FIXED'&&_0x31b23f!==_0x3b1740(0x252)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+'.assignee.strategy','message':_0x3b1740(0x333)});if(_0x31b23f===_0x3b1740(0x211)){const _0x23434a=_0x686ed7[_0x3b1740(0x20f)][_0x3b1740(0x290)];if(!Array['isArray'](_0x23434a)||_0x23434a[_0x3b1740(0x24f)]===0x0)_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x1db),'message':_0x3b1740(0x2ee)});else{const _0x1f428e=_0x23434a[_0x3b1740(0x276)](_0x2a0c24=>!isValidUserId(_0x2a0c24));_0x1f428e>=0x0&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x24e)+_0x1f428e+']','message':_0x3b1740(0x226)});const _0x190976=new Set(_0x23434a[_0x3b1740(0x2a3)](isValidUserId)[_0x3b1740(0x253)](_0x19b9d4=>String(_0x19b9d4)[_0x3b1740(0x325)]()));_0x16baa6==='SINGLE'&&_0x190976[_0x3b1740(0x2df)]>0x1&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x1db),'message':'SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.'});}}if(_0x31b23f===_0x3b1740(0x252)){const _0x2646c1=_0x686ed7[_0x3b1740(0x20f)][_0x3b1740(0x2de)],_0x170158=typeof _0x2646c1===_0x3b1740(0x285)||typeof _0x2646c1===_0x3b1740(0x21e)?Number(String(_0x2646c1)['trim']()):Number['NaN'];(!Number[_0x3b1740(0x1d4)](_0x170158)||_0x170158<=0x0)&&_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x1ff),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0x686ed7[_0x3b1740(0x250)]!==undefined){if(!isRecord(_0x686ed7[_0x3b1740(0x250)]))_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x24d),'message':_0x3b1740(0x1e5)});else{if(_0x686ed7[_0x3b1740(0x250)]['strategy']!==_0x3b1740(0x211))_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2d6),'message':_0x3b1740(0x2f0)});else{const _0x1ec60d=_0x686ed7[_0x3b1740(0x250)][_0x3b1740(0x290)];if(!Array[_0x3b1740(0x1f1)](_0x1ec60d)||_0x1ec60d[_0x3b1740(0x24f)]===0x0)_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2ce),'message':_0x3b1740(0x2a6)});else{const _0x1bf46d=_0x1ec60d['findIndex'](_0x340610=>!isValidUserId(_0x340610));_0x1bf46d>=0x0&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x1ea)+_0x1bf46d+']','message':_0x3b1740(0x25b)});}}}}}_0x686ed7[_0x3b1740(0x1d3)]!==undefined&&typeof _0x686ed7['sequential']!==_0x3b1740(0x275)&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x1f9),'message':_0x3b1740(0x299)});if(_0x686ed7[_0x3b1740(0x1f0)]===_0x3b1740(0x32d)){(typeof _0x686ed7[_0x3b1740(0x304)]!=='string'||_0x686ed7[_0x3b1740(0x304)][_0x3b1740(0x325)]()==='')&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x2c4),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x686ed7[_0x3b1740(0x2a7)]!==undefined){if(typeof _0x686ed7[_0x3b1740(0x2a7)]!==_0x3b1740(0x21e)||!VARIABLE_PATTERN[_0x3b1740(0x2eb)](_0x686ed7[_0x3b1740(0x2a7)]))_0x19b8f7['push']({'path':_0x315520+_0x3b1740(0x239),'message':_0x3b1740(0x28f)});else(RESERVED_RESULT_VARIABLES[_0x3b1740(0x2fb)](_0x686ed7[_0x3b1740(0x2a7)])||_0x686ed7[_0x3b1740(0x2a7)][_0x3b1740(0x240)](_0x3b1740(0x2f4)))&&_0x19b8f7[_0x3b1740(0x2c1)]({'path':_0x315520+_0x3b1740(0x239),'message':_0x3b1740(0x332)+_0x686ed7[_0x3b1740(0x2a7)]+'.'});}}validateAsyncExecution(_0x686ed7,_0x315520,_0x19b8f7),validateApprovalTimeout(_0x686ed7,_0x315520,_0x19b8f7),validateCcConfig(_0x686ed7,_0x315520,_0x19b8f7),_0x686ed7[_0x3b1740(0x1f0)]===_0x3b1740(0x2c6)&&validateNotificationConfig(_0x686ed7[_0x3b1740(0x22f)],_0x315520+_0x3b1740(0x27b),_0x19b8f7);}function validateAsyncExecution(_0x496b8c,_0x41b280,_0x2edad6){const _0x3a67d1=a299_0xf21873;if(_0x496b8c[_0x3a67d1(0x213)]===undefined)return;if(!isRecord(_0x496b8c['async'])){_0x2edad6[_0x3a67d1(0x2c1)]({'path':_0x41b280+_0x3a67d1(0x324),'message':'async\x20must\x20be\x20an\x20object.'});return;}if(_0x496b8c[_0x3a67d1(0x213)][_0x3a67d1(0x32c)]!==undefined&&typeof _0x496b8c[_0x3a67d1(0x213)][_0x3a67d1(0x32c)]!=='boolean'){_0x2edad6['push']({'path':_0x41b280+_0x3a67d1(0x2a9),'message':_0x3a67d1(0x222)});return;}if(_0x496b8c['async'][_0x3a67d1(0x32c)]!==!![])return;_0x496b8c[_0x3a67d1(0x1f0)]!==_0x3a67d1(0x32d)&&_0x2edad6[_0x3a67d1(0x2c1)]({'path':_0x41b280+'.async','message':_0x3a67d1(0x22c)});const _0x5bffdb=_0x496b8c[_0x3a67d1(0x213)]['retryCount']??0x3;(!Number[_0x3a67d1(0x323)](_0x5bffdb)||_0x5bffdb<0x1||_0x5bffdb>MAX_ASYNC_RETRY_COUNT)&&_0x2edad6[_0x3a67d1(0x2c1)]({'path':_0x41b280+_0x3a67d1(0x2d5),'message':'SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20'+MAX_ASYNC_RETRY_COUNT+'.'}),_0x496b8c[_0x3a67d1(0x213)][_0x3a67d1(0x20a)]!==undefined&&validateTimeAmount(_0x496b8c[_0x3a67d1(0x213)]['retryInterval'],_0x41b280+_0x3a67d1(0x27e),_0x2edad6);}function validateApprovalTimeout(_0x1dcc11,_0x31a22b,_0x31a843){const _0x35efae=a299_0xf21873;if(_0x1dcc11[_0x35efae(0x2aa)]===undefined)return;if(!isRecord(_0x1dcc11[_0x35efae(0x2aa)])){_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x314),'message':_0x35efae(0x31f)});return;}if(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x32c)]!==undefined&&typeof _0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x32c)]!=='boolean'){_0x31a843['push']({'path':_0x31a22b+_0x35efae(0x2e2),'message':_0x35efae(0x277)});return;}if(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x32c)]!==!![])return;if(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x1eb)]!==undefined&&typeof _0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x1eb)]!==_0x35efae(0x275)){_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x221),'message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x1dcc11[_0x35efae(0x1f0)]!==_0x35efae(0x2dc)&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x314),'message':_0x35efae(0x1d7)});validateTimeAmount(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x2bf)],_0x31a22b+_0x35efae(0x2be),_0x31a843);const _0x26b9fd=_0x1dcc11['timeout'][_0x35efae(0x26b)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x35efae(0x2fb)](_0x26b9fd)){_0x31a843['push']({'path':_0x31a22b+_0x35efae(0x247),'message':_0x35efae(0x1e1)});return;}(_0x1dcc11[_0x35efae(0x279)]??_0x35efae(0x2dc))===_0x35efae(0x2d1)&&_0x26b9fd!=='EXECUTE_BFF'&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x247),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x435e53=_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x1eb)]??_0x26b9fd!==_0x35efae(0x2bb);if(_0x26b9fd===_0x35efae(0x2bb))_0x435e53&&_0x31a843['push']({'path':_0x31a22b+_0x35efae(0x221),'message':_0x35efae(0x2b3)}),(typeof _0x1dcc11['timeout'][_0x35efae(0x304)]!==_0x35efae(0x21e)||_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x304)]['trim']()==='')&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x1f3),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x1dcc11[_0x35efae(0x2aa)][_0x35efae(0x2a7)],_0x31a22b+_0x35efae(0x30d),_0x31a843);else!_0x435e53&&_0x31a843[_0x35efae(0x2c1)]({'path':_0x31a22b+_0x35efae(0x221),'message':_0x26b9fd+_0x35efae(0x25f)});}function validateTimeAmount(_0x3ba573,_0x4be071,_0x10b234){const _0x356a09=a299_0xf21873;if(!isRecord(_0x3ba573)){_0x10b234[_0x356a09(0x2c1)]({'path':_0x4be071,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number['isInteger'](_0x3ba573[_0x356a09(0x29c)])||Number(_0x3ba573['value'])<=0x0)&&_0x10b234['push']({'path':_0x4be071+_0x356a09(0x294),'message':_0x356a09(0x30a)}),!FLOW_TIME_UNITS[_0x356a09(0x2fb)](_0x3ba573[_0x356a09(0x1ee)])&&_0x10b234[_0x356a09(0x2c1)]({'path':_0x4be071+'.unit','message':_0x356a09(0x293)});}function validateOptionalResultVariable(_0x1e87d1,_0x1a9031,_0x847cd){const _0x55c728=a299_0xf21873;if(_0x1e87d1===undefined||_0x1e87d1===null||_0x1e87d1==='')return;if(typeof _0x1e87d1!=='string'||!VARIABLE_PATTERN[_0x55c728(0x2eb)](_0x1e87d1))_0x847cd['push']({'path':_0x1a9031,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x55c728(0x2fb)](_0x1e87d1)||_0x1e87d1[_0x55c728(0x240)]('approval_sys_'))&&_0x847cd[_0x55c728(0x2c1)]({'path':_0x1a9031,'message':_0x55c728(0x332)+_0x1e87d1+'.'});}function validateCcConfig(_0x1c0d1b,_0x4b331a,_0xfa119f){const _0x13de8b=a299_0xf21873;if(_0x1c0d1b['cc']===undefined)return;if(!isRecord(_0x1c0d1b['cc'])){_0xfa119f[_0x13de8b(0x2c1)]({'path':_0x4b331a+_0x13de8b(0x295),'message':_0x13de8b(0x2cc)});return;}_0x1c0d1b['type']!==_0x13de8b(0x318)&&_0x1c0d1b['type']!==_0x13de8b(0x2dc)&&_0xfa119f['push']({'path':_0x4b331a+_0x13de8b(0x295),'message':_0x13de8b(0x203)});Object[_0x13de8b(0x31d)][_0x13de8b(0x2fd)][_0x13de8b(0x20b)](_0x1c0d1b['cc'],_0x13de8b(0x26a))&&_0xfa119f[_0x13de8b(0x2c1)]({'path':_0x4b331a+_0x13de8b(0x296),'message':UNSUPPORTED_FORM_MESSAGE});const _0x3af51f=_0x1c0d1b['cc']['recipientUserIds'];if(!Array[_0x13de8b(0x1f1)](_0x3af51f)||_0x3af51f[_0x13de8b(0x24f)]===0x0)_0xfa119f['push']({'path':_0x4b331a+_0x13de8b(0x2ad),'message':_0x13de8b(0x23c)});else{_0x3af51f[_0x13de8b(0x24f)]>MAX_CC_RECIPIENTS&&_0xfa119f[_0x13de8b(0x2c1)]({'path':_0x4b331a+'.cc.recipientUserIds','message':_0x13de8b(0x238)+MAX_CC_RECIPIENTS+_0x13de8b(0x1ec)});const _0x5d351a=new Set();_0x3af51f[_0x13de8b(0x32a)]((_0x23d5f0,_0x440f7e)=>{const _0x4c9ae5=_0x13de8b;if(typeof _0x23d5f0!==_0x4c9ae5(0x21e)||_0x23d5f0[_0x4c9ae5(0x325)]()==='')_0xfa119f['push']({'path':_0x4b331a+'.cc.recipientUserIds['+_0x440f7e+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x5d351a['has'](_0x23d5f0[_0x4c9ae5(0x325)]())?_0xfa119f['push']({'path':_0x4b331a+'.cc.recipientUserIds['+_0x440f7e+']','message':_0x4c9ae5(0x2b9)+_0x23d5f0[_0x4c9ae5(0x325)]()+'.'}):_0x5d351a['add'](_0x23d5f0[_0x4c9ae5(0x325)]());});}validateStringArray(_0x1c0d1b['cc'][_0x13de8b(0x29a)],_0x4b331a+_0x13de8b(0x241),_0xfa119f);}function validateStringArray(_0x2a8fe1,_0x2edfdd,_0x5e9051){const _0x355aeb=a299_0xf21873;if(_0x2a8fe1===undefined)return;if(!Array[_0x355aeb(0x1f1)](_0x2a8fe1)){_0x5e9051[_0x355aeb(0x2c1)]({'path':_0x2edfdd,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0x3e956b=new Set();_0x2a8fe1[_0x355aeb(0x32a)]((_0x170250,_0xffdd8f)=>{const _0xa3f780=_0x355aeb;if(typeof _0x170250!==_0xa3f780(0x21e)||_0x170250['trim']()==='')_0x5e9051[_0xa3f780(0x2c1)]({'path':_0x2edfdd+'['+_0xffdd8f+']','message':'value\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x3e956b[_0xa3f780(0x2fb)](_0x170250[_0xa3f780(0x325)]())?_0x5e9051[_0xa3f780(0x2c1)]({'path':_0x2edfdd+'['+_0xffdd8f+']','message':_0xa3f780(0x1df)+_0x170250['trim']()+'.'}):_0x3e956b[_0xa3f780(0x32f)](_0x170250[_0xa3f780(0x325)]());});}function validateNotificationConfig(_0x535337,_0x1a753d,_0x18afa9){const _0x2d1aa8=a299_0xf21873;if(!isRecord(_0x535337)){_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x535337[_0x2d1aa8(0x2f2)]!==undefined&&_0x535337[_0x2d1aa8(0x2f2)]!==null){if(typeof _0x535337[_0x2d1aa8(0x2f2)]!==_0x2d1aa8(0x21e))_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+_0x2d1aa8(0x1e0),'message':_0x2d1aa8(0x331)});else _0x535337[_0x2d1aa8(0x2f2)]['trim']()&&_0x535337['version'][_0x2d1aa8(0x325)]()!=='v1'&&_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+_0x2d1aa8(0x1e0),'message':_0x2d1aa8(0x1f5)+_0x535337['version']+'.'});}const _0x2e60f7=requireNotificationString(_0x535337[_0x2d1aa8(0x272)],_0x1a753d+'.configCode',_0x2d1aa8(0x2c8),_0x18afa9);_0x2e60f7?.['includes']('${')&&_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+_0x2d1aa8(0x2b0),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x535337[_0x2d1aa8(0x2b1)]!==undefined&&_0x535337[_0x2d1aa8(0x2b1)]!==null){if(typeof _0x535337[_0x2d1aa8(0x2b1)]!==_0x2d1aa8(0x21e))_0x18afa9[_0x2d1aa8(0x2c1)]({'path':_0x1a753d+'.failurePolicy','message':_0x2d1aa8(0x1d1)});else!NOTIFICATION_FAILURE_POLICIES[_0x2d1aa8(0x2fb)](_0x535337[_0x2d1aa8(0x2b1)][_0x2d1aa8(0x325)]()['toUpperCase']())&&_0x18afa9['push']({'path':_0x1a753d+_0x2d1aa8(0x305),'message':_0x2d1aa8(0x286)});}!isRecord(_0x535337[_0x2d1aa8(0x32e)])?_0x18afa9['push']({'path':_0x1a753d+_0x2d1aa8(0x291),'message':_0x2d1aa8(0x2d3)}):validateNotificationTemplate(_0x535337[_0x2d1aa8(0x32e)],_0x1a753d+'.template',_0x18afa9),validateNotificationRecipients(_0x535337['recipients'],_0x1a753d+_0x2d1aa8(0x28d),_0x18afa9);}function validateNotificationTemplate(_0x3f6480,_0x33f95c,_0x45d7cc){const _0x143142=a299_0xf21873;for(const _0x30a760 of['title',_0x143142(0x301)]){const _0x2ca39f=requireNotificationString(_0x3f6480[_0x30a760],_0x33f95c+'.'+_0x30a760,'Notification\x20template.'+_0x30a760+_0x143142(0x303),_0x45d7cc);if(_0x2ca39f)validateNotificationPlaceholders(_0x2ca39f,_0x33f95c+'.'+_0x30a760,_0x45d7cc);}_0x3f6480[_0x143142(0x1d8)]!==undefined&&_0x3f6480[_0x143142(0x1d8)]!==null&&(typeof _0x3f6480['detailMarkdown']!==_0x143142(0x21e)?_0x45d7cc[_0x143142(0x2c1)]({'path':_0x33f95c+_0x143142(0x288),'message':_0x143142(0x319)}):validateNotificationPlaceholders(_0x3f6480[_0x143142(0x1d8)],_0x33f95c+_0x143142(0x288),_0x45d7cc)),validateNotificationFacts(_0x3f6480[_0x143142(0x1da)],_0x33f95c+_0x143142(0x2ff),_0x45d7cc),validateNotificationActions(_0x3f6480[_0x143142(0x234)],_0x33f95c+_0x143142(0x242),_0x45d7cc);}function validateNotificationFacts(_0x41fdc1,_0x32b372,_0x6291e7){const _0x347efe=a299_0xf21873;if(_0x41fdc1===undefined||_0x41fdc1===null)return;if(!Array[_0x347efe(0x1f1)](_0x41fdc1)){_0x6291e7['push']({'path':_0x32b372,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x41fdc1[_0x347efe(0x24f)]>MAX_NOTIFICATION_FACTS&&_0x6291e7[_0x347efe(0x2c1)]({'path':_0x32b372,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x41fdc1[_0x347efe(0x32a)]((_0xc60312,_0x34695b)=>{const _0x248f86=_0x347efe,_0x53c881=_0x32b372+'['+_0x34695b+']';if(!isRecord(_0xc60312)){_0x6291e7[_0x248f86(0x2c1)]({'path':_0x53c881,'message':_0x248f86(0x27c)});return;}for(const _0x1f6a7 of[_0x248f86(0x2f7),_0x248f86(0x29c)]){const _0x42794f=requireNotificationString(_0xc60312[_0x1f6a7],_0x53c881+'.'+_0x1f6a7,_0x248f86(0x321)+_0x1f6a7+_0x248f86(0x303),_0x6291e7);_0x42794f&&validateNotificationPlaceholders(_0x42794f,_0x53c881+'.'+_0x1f6a7,_0x6291e7);}});}function validateNotificationActions(_0x4d93b9,_0x5471b0,_0x43d112){const _0x3a8d9e=a299_0xf21873;if(_0x4d93b9===undefined||_0x4d93b9===null)return;if(!Array[_0x3a8d9e(0x1f1)](_0x4d93b9)){_0x43d112['push']({'path':_0x5471b0,'message':_0x3a8d9e(0x2dd)});return;}_0x4d93b9[_0x3a8d9e(0x24f)]>MAX_NOTIFICATION_ACTIONS&&_0x43d112[_0x3a8d9e(0x2c1)]({'path':_0x5471b0,'message':_0x3a8d9e(0x22e)+MAX_NOTIFICATION_ACTIONS+_0x3a8d9e(0x254)}),_0x4d93b9['forEach']((_0x454a7a,_0x305c8d)=>{const _0x492324=_0x3a8d9e,_0x4ba8c4=_0x5471b0+'['+_0x305c8d+']';if(!isRecord(_0x454a7a)){_0x43d112[_0x492324(0x2c1)]({'path':_0x4ba8c4,'message':_0x492324(0x30e)});return;}const _0x39d671=requireNotificationString(_0x454a7a[_0x492324(0x298)],_0x4ba8c4+'.text',_0x492324(0x1e3),_0x43d112);if(_0x39d671)validateNotificationPlaceholders(_0x39d671,_0x4ba8c4+_0x492324(0x2f3),_0x43d112);const _0x1a8b33=requireNotificationString(_0x454a7a['url'],_0x4ba8c4+_0x492324(0x2b5),'Notification\x20action.url\x20is\x20required.',_0x43d112);if(!_0x1a8b33)return;validateNotificationPlaceholders(_0x1a8b33,_0x4ba8c4+_0x492324(0x2b5),_0x43d112),!/^https?:\/\//i['test'](_0x1a8b33)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x492324(0x2eb)](_0x1a8b33)&&_0x43d112[_0x492324(0x2c1)]({'path':_0x4ba8c4+_0x492324(0x2b5),'message':_0x492324(0x2ea)});});}function validateNotificationRecipients(_0x5bb3bb,_0x532b7d,_0x321613){const _0x49cb0d=a299_0xf21873;if(_0x5bb3bb===undefined||_0x5bb3bb===null)return;if(!Array[_0x49cb0d(0x1f1)](_0x5bb3bb)){_0x321613[_0x49cb0d(0x2c1)]({'path':_0x532b7d,'message':_0x49cb0d(0x1fc)});return;}let _0x3e38d8=![];_0x5bb3bb[_0x49cb0d(0x32a)]((_0x11b2b0,_0xb296ef)=>{const _0x2b1267=_0x49cb0d,_0x21af51=_0x532b7d+'['+_0xb296ef+']';if(!isRecord(_0x11b2b0)){_0x321613[_0x2b1267(0x2c1)]({'path':_0x21af51,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x18d4a4=requireNotificationString(_0x11b2b0[_0x2b1267(0x1f0)],_0x21af51+_0x2b1267(0x2ca),_0x2b1267(0x225),_0x321613);_0x18d4a4&&!NOTIFICATION_RECIPIENT_TYPES[_0x2b1267(0x2fb)](_0x18d4a4[_0x2b1267(0x25a)]())&&_0x321613['push']({'path':_0x21af51+_0x2b1267(0x2ca),'message':_0x2b1267(0x2ae)});let _0x164028='TO';_0x11b2b0['role']!==undefined&&_0x11b2b0[_0x2b1267(0x1d6)]!==null&&(typeof _0x11b2b0['role']!==_0x2b1267(0x21e)?(_0x321613[_0x2b1267(0x2c1)]({'path':_0x21af51+_0x2b1267(0x312),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x164028=''):(_0x164028=_0x11b2b0[_0x2b1267(0x1d6)]['trim']()[_0x2b1267(0x25a)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x164028)&&_0x321613[_0x2b1267(0x2c1)]({'path':_0x21af51+_0x2b1267(0x312),'message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x164028==='TO')_0x3e38d8=!![];const _0x311eff=requireNotificationString(_0x11b2b0[_0x2b1267(0x29c)],_0x21af51+_0x2b1267(0x294),_0x2b1267(0x28a),_0x321613);_0x311eff&&validateNotificationPlaceholders(_0x311eff,_0x21af51+_0x2b1267(0x294),_0x321613);}),_0x5bb3bb['length']>0x0&&!_0x3e38d8&&_0x321613['push']({'path':_0x532b7d,'message':_0x49cb0d(0x284)});}function requireNotificationString(_0x447d8d,_0x3b64a4,_0x4a0810,_0x35f18b){const _0x4b31cf=a299_0xf21873;if(typeof _0x447d8d!=='string'||_0x447d8d['trim']()==='')return _0x35f18b[_0x4b31cf(0x2c1)]({'path':_0x3b64a4,'message':_0x4a0810}),undefined;return _0x447d8d[_0x4b31cf(0x325)]();}function validateNotificationPlaceholders(_0x240192,_0x1a62c8,_0x100d70){const _0xcb36b1=a299_0xf21873;for(const _0x5bf163 of _0x240192[_0xcb36b1(0x243)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x31c4c8=_0x5bf163[0x1]?.[_0xcb36b1(0x325)]()??'',_0x42a928=_0x31c4c8['indexOf']('.'),_0x5b97d5=_0x42a928>=0x0?_0x31c4c8[_0xcb36b1(0x263)](0x0,_0x42a928):_0x31c4c8,_0x49df97=_0x42a928>=0x0?_0x31c4c8[_0xcb36b1(0x263)](_0x42a928+0x1)[_0xcb36b1(0x325)]():'';(![_0xcb36b1(0x2d9),'context','variables'][_0xcb36b1(0x334)](_0x5b97d5)||_0x49df97==='')&&_0x100d70[_0xcb36b1(0x2c1)]({'path':_0x1a62c8,'message':_0xcb36b1(0x316)+_0x5bf163[0x0]+'.'});}_0x240192['replace'](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0xcb36b1(0x334)]('${')&&_0x100d70[_0xcb36b1(0x2c1)]({'path':_0x1a62c8,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function a299_0xb9a6(){const _0x3f6bbf=['transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Unsupported\x20task\x20mode:\x20','83MsJpox','flowJson.nodes.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','INDEPENDENT_FLOW','conditionType','HOURS','slice','^[1-9][0-9]*$','bindDatasetCode','warnings','source','title','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','readSources','action','flowJson.nodes','flowDesc\x20must\x20be\x20a\x20string.','name','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.taskMode','configCode','APPROVAL\x20node\x20requires\x20assignee.','datasetCode','boolean','findIndex','timeout.enabled\x20must\x20be\x20a\x20boolean.','utf8','taskMode','path','.config','Notification\x20fact\x20must\x20be\x20an\x20object.','approval_sys_initiatorUsername','.async.retryInterval','approved','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','edge\x20target\x20is\x20required.','flowName','AUTO_APPROVE','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','number','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.detailMarkdown','].taskMode','Notification\x20recipient.value\x20is\x20required.','PLATFORM_FORM','Unsupported\x20approval\x20mode:\x20','.recipients','flowJson\x20must\x20be\x20an\x20object.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','userIds','.template','4rgaaJk','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','.value','.cc','.cc.readSources','recipientUserIds','text','sequential\x20must\x20be\x20a\x20boolean.','visible','pid','value','Unsupported\x20pageMode:\x20','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','.defaultFlow','.tmp','ALL','formDefinitions','filter','flowDesc','Unsupported\x20flowType:\x20','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','resultVariable','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','.async.enabled','timeout','empty_metadata_removed','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','.cc.recipientUserIds','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.target','.configCode','failurePolicy','Node\x20cannot\x20reach\x20any\x20END.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','target','.url','node\x20must\x20be\x20an\x20object.','approval_sys_datasetCode','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','Duplicate\x20cc\x20recipient\x20userId:\x20','legacy_field_removed','EXECUTE_BFF','waypoint.','Edge\x20target\x20node\x20not\x20found:\x20','.timeout.duration','duration','schemaVersion','push','Rabetbase\x20FlowConfig',',\x20but\x20node\x20','.scriptName','startPageId','NOTIFICATION','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','Notification\x20configCode\x20is\x20required.','sourceNodeId','.type','approval_sys_processInstanceId','cc\x20must\x20be\x20an\x20object.','.pageId','.transferCandidates.userIds','scriptResult','SINGLE','HANDLE','AUTO_REJECT','NOTIFICATION\x20node\x20requires\x20template.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.async.retryCount','.transferCandidates.strategy','.position.','ANY','event','\x20must\x20be\x20a\x20finite\x20number.','.expression','APPROVAL','Notification\x20template.actions\x20must\x20be\x20an\x20array.','roleId','size','FORM_FLOW','Duplicate\x20node\x20id:\x20','.timeout.enabled','pageId','.waypoints[','Node\x20has\x20no\x20outgoing\x20edge.','.assignee','approval.simple-flow.v1','some','defaultFlow\x20must\x20be\x20a\x20boolean.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','test','position','^[A-Za-z_][A-Za-z0-9_]*$','FIXED\x20assignee\x20requires\x20userIds.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','Node\x20is\x20not\x20reachable\x20from\x20START.','version','.text','approval_sys_','flowJson.startPageId','get','label','DAYS','join','.id','has','CONTINUE','hasOwnProperty','message','.facts','flowJson.nodes[','summary','flowCode','\x20is\x20required.','scriptName','.failurePolicy','EXPRESSION','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','EMAIL','flowJson','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','#/$defs/flowNode','.timeout.resultVariable','Notification\x20action\x20must\x20be\x20an\x20object.','ALWAYS','38104PfOrHc','flowType\x20is\x20required.','.role','waypoints','.timeout','flowType','Unsupported\x20notification\x20placeholder:\x20','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','END','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','edges\x20must\x20be\x20an\x20array.','#/$defs/flowEdge','https://json-schema.org/draft/2020-12/schema','prototype','USER','timeout\x20must\x20be\x20an\x20object.','entries','Notification\x20fact.','Duplicate\x20BPMN\x20element\x20id:\x20','isInteger','.async','trim','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','strategy','3172182RDqpIA','flowName\x20is\x20required.','forEach','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','enabled','SCRIPT','template','add','metadata','Notification\x20version\x20must\x20be\x20a\x20string.','Reserved\x20resultVariable:\x20','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','includes','nodes','.\x20This\x20CLI\x20supports\x20only\x20','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','SECONDS','targetNodeId','CUSTOM_PAGE','4239420dDBVuW','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','failurePolicy\x20must\x20be\x20a\x20string.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','sequential','isSafeInteger','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','role','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','detailMarkdown','url','facts','.assignee.userIds','flowJson.','\x20->\x20','expression','Duplicate\x20value:\x20','.version','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','flowJson.pageMode','Notification\x20action.text\x20is\x20required.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','transferCandidates\x20must\x20be\x20an\x20object.','REJECTED','pageMode','edges','mode','.transferCandidates.userIds[','interrupting','\x20users.','edge\x20name\x20must\x20be\x20a\x20string.','unit','#/$defs/userId','type','isArray','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.timeout.scriptName','catch','Unsupported\x20notification\x20version:\x20','parse','Node\x20has\x20no\x20incoming\x20edge.','CONDITION','.sequential','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','].path','Notification\x20recipients\x20must\x20be\x20an\x20array.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','.assignee.roleId','https://lovrabet.com/schema/rabetbase-flow-config.json','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','formPermission','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','7165085HWmyyY','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','MINUTES','form','#/$defs/timeAmount','isFinite','retryInterval','call','35270iuMhTA','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','integer','assignee','MAX_SAFE_INTEGER','FIXED','position.','async','flowJson.startPath','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','9041706sjrVaH','formSchema','appCode','stringify','.source','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','templateName','string','formData','approval_sys_operationType','.timeout.interrupting','async.enabled\x20must\x20be\x20a\x20boolean.','startPath','.path','Notification\x20recipient.type\x20is\x20required.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','set','.position','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','pageIds','array','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','START','Notification\x20template\x20supports\x20at\x20most\x20','config','#/$defs/position','Expression\x20references\x20SCRIPT\x20resultVariable\x20','flowJson.edges[','flowJson.edges','actions','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.conditionType','.approvalMode','cc.recipientUserIds\x20supports\x20at\x20most\x20','.resultVariable','object','2219hUaAvj','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','nodes\x20must\x20be\x20an\x20array.','flowKey','BCC','startsWith','.cc.visible','.actions','matchAll','defaultFlow','Unsupported\x20condition\x20type:\x20','Unsupported\x20node\x20type:\x20','.timeout.action','APPROVED','approvalMode','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','datasetCode\x20must\x20be\x20a\x20string.','Edge\x20source\x20node\x20not\x20found:\x20','.transferCandidates','.assignee.userIds[','length','transferCandidates','overwrite','ROLE','map','\x20actions.','Every\x20node\x20requires\x20a\x20non-empty\x20name.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','4418682RjCXjA','keys','edge\x20must\x20be\x20an\x20object.','toUpperCase'];a299_0xb9a6=function(){return _0x3f6bbf;};return a299_0xb9a6();}function validateEdge(_0x100049,_0x1cbb54,_0x25a455){const _0x1871b6=a299_0xf21873;_0x100049['name']!==undefined&&typeof _0x100049[_0x1871b6(0x26e)]!==_0x1871b6(0x21e)&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+'.name','message':_0x1871b6(0x1ed)}),_0x100049['defaultFlow']!==undefined&&typeof _0x100049[_0x1871b6(0x244)]!==_0x1871b6(0x275)&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x29f),'message':_0x1871b6(0x2e9)}),_0x100049['waypoints']!==undefined&&(!Array[_0x1871b6(0x1f1)](_0x100049[_0x1871b6(0x313)])?_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+'.waypoints','message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x100049[_0x1871b6(0x313)][_0x1871b6(0x32a)]((_0x429e38,_0x2b88d8)=>{const _0x477cca=_0x1871b6;if(!isRecord(_0x429e38)){_0x25a455[_0x477cca(0x2c1)]({'path':_0x1cbb54+_0x477cca(0x2e4)+_0x2b88d8+']','message':_0x477cca(0x30b)});return;}for(const _0x21f0a7 of['x','y']){const _0x186a70=_0x429e38[_0x21f0a7];(typeof _0x186a70!==_0x477cca(0x285)||!Number[_0x477cca(0x209)](_0x186a70))&&_0x25a455[_0x477cca(0x2c1)]({'path':_0x1cbb54+_0x477cca(0x2e4)+_0x2b88d8+'].'+_0x21f0a7,'message':_0x477cca(0x2bc)+_0x21f0a7+_0x477cca(0x2da)});}})),_0x100049[_0x1871b6(0x261)]!==undefined&&!CONDITION_TYPES['has'](_0x100049[_0x1871b6(0x261)])&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x236),'message':_0x1871b6(0x245)+String(_0x100049[_0x1871b6(0x261)])+'.'}),_0x100049[_0x1871b6(0x261)]===_0x1871b6(0x306)&&(typeof _0x100049[_0x1871b6(0x1de)]!==_0x1871b6(0x21e)||_0x100049[_0x1871b6(0x1de)][_0x1871b6(0x325)]()==='')&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x2db),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x100049[_0x1871b6(0x244)]===!![]&&_0x100049[_0x1871b6(0x261)]!==_0x1871b6(0x30f)&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x29f),'message':_0x1871b6(0x201)}),_0x100049['defaultFlow']===!![]&&typeof _0x100049[_0x1871b6(0x1de)]===_0x1871b6(0x21e)&&_0x100049['expression'][_0x1871b6(0x325)]()!==''&&_0x25a455[_0x1871b6(0x2c1)]({'path':_0x1cbb54+_0x1871b6(0x2db),'message':_0x1871b6(0x326)});}function validateGraphShape(_0x4bd347,_0x242868,_0x263c6a,_0x1651b8,_0x5257c7,_0x14691b,_0x4c4fd2){const _0x480d78=a299_0xf21873;for(const [_0x47ea71,_0x4ce6b8]of _0x4bd347){const _0x5e6a7a=_0x5257c7['get'](_0x47ea71)??[],_0x175c7d=_0x1651b8[_0x480d78(0x2f6)](_0x47ea71)??[];_0x4ce6b8[_0x480d78(0x1f0)]!=='START'&&_0x5e6a7a['length']===0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x1f7)});_0x4ce6b8[_0x480d78(0x1f0)]!=='END'&&_0x175c7d['length']===0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x2e5)});_0x4ce6b8[_0x480d78(0x1f0)]===_0x480d78(0x22d)&&_0x5e6a7a[_0x480d78(0x24f)]>0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x1d5)});_0x4ce6b8[_0x480d78(0x1f0)]==='END'&&_0x175c7d[_0x480d78(0x24f)]>0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x1d0)});if(_0x4ce6b8[_0x480d78(0x1f0)]===_0x480d78(0x1f8)){_0x175c7d['length']<0x2&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':'flowJson.nodes.'+_0x47ea71,'message':_0x480d78(0x2a8)});const _0x5a5ee0=_0x175c7d[_0x480d78(0x2a3)](_0x1786d6=>_0x1786d6['defaultFlow']===!![]);_0x5a5ee0['length']!==0x1&&_0x4c4fd2['push']({'path':_0x480d78(0x25e)+_0x47ea71,'message':'CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.'});if(_0x5a5ee0['length']===0x1){const _0x5092dc=_0x5a5ee0[0x0],_0x5ead8e=_0x14691b[_0x480d78(0x2f6)](_0x5092dc)??_0x480d78(0x233);_0x5092dc[_0x480d78(0x261)]!==_0x480d78(0x30f)&&_0x4c4fd2['push']({'path':_0x5ead8e+'.conditionType','message':_0x480d78(0x20d)});_0x5092dc['expression']!==undefined&&_0x4c4fd2['push']({'path':_0x5ead8e+'.expression','message':_0x480d78(0x280)});for(const _0x5abdef of _0x175c7d){if(_0x5abdef===_0x5092dc)continue;const _0x5a4eaf=_0x14691b[_0x480d78(0x2f6)](_0x5abdef)??_0x480d78(0x233);if(_0x5abdef['conditionType']!==_0x480d78(0x306))_0x4c4fd2['push']({'path':_0x5a4eaf+_0x480d78(0x236),'message':_0x480d78(0x2ef)});else(typeof _0x5abdef[_0x480d78(0x1de)]!==_0x480d78(0x21e)||_0x5abdef[_0x480d78(0x1de)][_0x480d78(0x325)]()==='')&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x5a4eaf+_0x480d78(0x2db),'message':_0x480d78(0x270)});}}}if(_0x4ce6b8[_0x480d78(0x1f0)]==='APPROVAL'&&(_0x4ce6b8[_0x480d78(0x279)]??_0x480d78(0x2dc))===_0x480d78(0x2d1)){if(_0x175c7d[_0x480d78(0x24f)]!==0x1)_0x4c4fd2[_0x480d78(0x2c1)]({'path':'flowJson.nodes.'+_0x47ea71,'message':'HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.'});else{const _0x915cec=_0x175c7d[0x0];((_0x915cec['conditionType']??_0x480d78(0x30f))!==_0x480d78(0x30f)||_0x915cec[_0x480d78(0x244)]===!![]||typeof _0x915cec[_0x480d78(0x1de)]===_0x480d78(0x21e)&&_0x915cec[_0x480d78(0x1de)][_0x480d78(0x325)]()!=='')&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x14691b['get'](_0x915cec)??_0x480d78(0x233),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x4ce6b8[_0x480d78(0x1f0)]===_0x480d78(0x2dc)){const _0x2653ff=_0x175c7d[_0x480d78(0x253)](_0x3d5890=>_0x3d5890[_0x480d78(0x261)]??_0x480d78(0x30f)),_0x4217d3=_0x2653ff['filter'](_0x4dfe05=>_0x4dfe05!==_0x480d78(0x248)&&_0x4dfe05!==_0x480d78(0x1e6));_0x4217d3[_0x480d78(0x24f)]>0x0&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x205)}),_0x2653ff[_0x480d78(0x2a3)](_0x12f6a8=>_0x12f6a8==='APPROVED')['length']!==0x1&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x2ac)}),_0x2653ff[_0x480d78(0x2a3)](_0x3d232d=>_0x3d232d==='REJECTED')[_0x480d78(0x24f)]!==0x1&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':_0x480d78(0x21c)}),_0x175c7d[_0x480d78(0x2e8)](_0x393a95=>_0x393a95[_0x480d78(0x244)]===!![])&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x47ea71,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x1b380f=new Set(),_0x51414f=_0x5dd72a=>{const _0x1a039a=_0x480d78;if(_0x1b380f['has'](_0x5dd72a))return;_0x1b380f[_0x1a039a(0x32f)](_0x5dd72a);for(const _0x4426ec of _0x1651b8[_0x1a039a(0x2f6)](_0x5dd72a)??[]){const _0x5c221c=resolveEdgeEndpoint(_0x4426ec['target'],_0x4426ec['targetNodeId']);if(_0x5c221c&&_0x4bd347[_0x1a039a(0x2fb)](_0x5c221c))_0x51414f(_0x5c221c);}};_0x51414f(_0x242868);for(const _0x597f47 of _0x4bd347[_0x480d78(0x258)]()){!_0x1b380f[_0x480d78(0x2fb)](_0x597f47)&&_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x25e)+_0x597f47,'message':_0x480d78(0x2f1)});}const _0x3c25cf=_0x263c6a['some'](_0x40fd43=>_0x1b380f[_0x480d78(0x2fb)](_0x40fd43));if(!_0x3c25cf){_0x4c4fd2[_0x480d78(0x2c1)]({'path':_0x480d78(0x233),'message':_0x480d78(0x1fa)});return;}const _0x3341d3=new Set(),_0x32c717=_0x116112=>{const _0x5b73a7=_0x480d78;if(_0x3341d3[_0x5b73a7(0x2fb)](_0x116112))return;_0x3341d3[_0x5b73a7(0x32f)](_0x116112);for(const _0x5470cf of _0x5257c7['get'](_0x116112)??[]){const _0x45de94=resolveEdgeEndpoint(_0x5470cf[_0x5b73a7(0x267)],_0x5470cf[_0x5b73a7(0x2c9)]);if(_0x45de94&&_0x4bd347[_0x5b73a7(0x2fb)](_0x45de94))_0x32c717(_0x45de94);}};for(const _0x145af2 of _0x263c6a){if(_0x4bd347[_0x480d78(0x2fb)](_0x145af2))_0x32c717(_0x145af2);}for(const _0x1b82b1 of _0x1b380f){!_0x3341d3['has'](_0x1b82b1)&&_0x4c4fd2['push']({'path':_0x480d78(0x25e)+_0x1b82b1,'message':_0x480d78(0x2b2)});}}function a299_0x1204(_0x12d06b,_0x5d4ace){_0x12d06b=_0x12d06b-0x1c9;const _0xb9a6f8=a299_0xb9a6();let _0x120489=_0xb9a6f8[_0x12d06b];return _0x120489;}function validateApprovalResults(_0x2db0c8,_0x183e70,_0x26fc51,_0xdb24d3){const _0x45bb6a=a299_0xf21873;if(_0x183e70===0x0)return;const _0x4c7d3b=new Set(_0x26fc51[_0x45bb6a(0x253)](_0x353cfa=>_0x2db0c8[_0x45bb6a(0x2f6)](_0x353cfa)?.['result'])[_0x45bb6a(0x2a3)](_0x1ff2bf=>typeof _0x1ff2bf===_0x45bb6a(0x21e)));for(const _0x5dcdc1 of[_0x45bb6a(0x248),'REJECTED']){!_0x4c7d3b[_0x45bb6a(0x2fb)](_0x5dcdc1)&&_0xdb24d3[_0x45bb6a(0x2c1)]({'path':_0x45bb6a(0x26c),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x5dcdc1+'.'});}}function validateScriptResultReferences(_0x310df1,_0x4a951b,_0x422c3b,_0x401cfe,_0x1008a6,_0x47fe7b,_0x2d4de4){const _0x401952=a299_0xf21873;if(_0x47fe7b[_0x401952(0x2df)]===0x0)return;const _0x40fe05=new Set(),_0x595c76=_0x573c59=>{const _0x5bdd12=_0x401952;if(!_0x40fe05['has'](_0x573c59)&&_0x310df1[_0x5bdd12(0x2fb)](_0x573c59)){_0x40fe05[_0x5bdd12(0x32f)](_0x573c59);for(const _0x585af2 of _0x422c3b['get'](_0x573c59)??[]){const _0x3ae032=resolveEdgeEndpoint(_0x585af2[_0x5bdd12(0x2b4)],_0x585af2['targetNodeId']);if(_0x3ae032)_0x595c76(_0x3ae032);}}};_0x595c76(_0x4a951b);const _0x4c1f11=new Map();for(const _0x5a6e8c of _0x40fe05){_0x4c1f11['set'](_0x5a6e8c,_0x5a6e8c===_0x4a951b?new Set([_0x4a951b]):new Set(_0x40fe05));}let _0x444665=!![];while(_0x444665){_0x444665=![];for(const _0x5eb75a of _0x40fe05){if(_0x5eb75a===_0x4a951b)continue;const _0x2dfe9e=(_0x401cfe[_0x401952(0x2f6)](_0x5eb75a)??[])[_0x401952(0x253)](_0x2384a1=>resolveEdgeEndpoint(_0x2384a1[_0x401952(0x267)],_0x2384a1[_0x401952(0x2c9)]))[_0x401952(0x2a3)](_0x99f7fd=>Boolean(_0x99f7fd&&_0x40fe05[_0x401952(0x2fb)](_0x99f7fd)));if(_0x2dfe9e[_0x401952(0x24f)]===0x0)continue;const _0x4dde8f=new Set(_0x4c1f11[_0x401952(0x2f6)](_0x2dfe9e[0x0])??[]);for(const _0x4f58e4 of _0x2dfe9e[_0x401952(0x263)](0x1)){const _0x12b9a6=_0x4c1f11[_0x401952(0x2f6)](_0x4f58e4)??new Set();for(const _0x3ba69a of _0x4dde8f){if(!_0x12b9a6[_0x401952(0x2fb)](_0x3ba69a))_0x4dde8f['delete'](_0x3ba69a);}}_0x4dde8f[_0x401952(0x32f)](_0x5eb75a);const _0x438e88=_0x4c1f11['get'](_0x5eb75a);!setsEqual(_0x438e88,_0x4dde8f)&&(_0x4c1f11[_0x401952(0x227)](_0x5eb75a,_0x4dde8f),_0x444665=!![]);}}for(const [_0x508a94,_0x181b6a]of _0x422c3b){const _0x9d078c=_0x4c1f11['get'](_0x508a94);if(!_0x9d078c)continue;for(const _0x3fd773 of _0x181b6a){if(_0x3fd773[_0x401952(0x261)]!=='EXPRESSION'||typeof _0x3fd773[_0x401952(0x1de)]!==_0x401952(0x21e))continue;for(const [_0x31098b,_0x2bd404]of _0x47fe7b){expressionReferencesVariable(_0x3fd773[_0x401952(0x1de)],_0x31098b)&&!_0x9d078c[_0x401952(0x2fb)](_0x2bd404)&&_0x2d4de4['push']({'path':(_0x1008a6['get'](_0x3fd773)??_0x401952(0x233))+_0x401952(0x2db),'message':_0x401952(0x231)+_0x31098b+_0x401952(0x2c3)+_0x2bd404+_0x401952(0x256)+_0x508a94+'.'});}}}}function expressionReferencesVariable(_0x19d389,_0x51223d){const _0x3c6463=a299_0xf21873;let _0x27da3e=0x0;while(_0x27da3e<_0x19d389[_0x3c6463(0x24f)]){const _0x1361b3=_0x19d389[_0x27da3e];if(_0x1361b3==='\x27'||_0x1361b3==='\x22'){_0x27da3e=skipQuotedExpressionSegment(_0x19d389,_0x27da3e,_0x1361b3);continue;}if(!/[A-Za-z_]/[_0x3c6463(0x2eb)](_0x1361b3)){_0x27da3e+=0x1;continue;}const _0x2b6a43=_0x27da3e;_0x27da3e+=0x1;while(_0x27da3e<_0x19d389[_0x3c6463(0x24f)]&&/[A-Za-z0-9_]/[_0x3c6463(0x2eb)](_0x19d389[_0x27da3e])){_0x27da3e+=0x1;}if(_0x19d389[_0x3c6463(0x263)](_0x2b6a43,_0x27da3e)!==_0x51223d)continue;let _0x3cf75f=_0x2b6a43-0x1;while(_0x3cf75f>=0x0&&/\s/[_0x3c6463(0x2eb)](_0x19d389[_0x3cf75f])){_0x3cf75f-=0x1;}if(_0x19d389[_0x3cf75f]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x2f2ee4,_0x208c34,_0x842d){const _0x18ef93=a299_0xf21873;let _0x28f212=_0x208c34+0x1;while(_0x28f212<_0x2f2ee4[_0x18ef93(0x24f)]){if(_0x2f2ee4[_0x28f212]==='\x5c'){_0x28f212+=0x2;continue;}if(_0x2f2ee4[_0x28f212]===_0x842d)return _0x28f212+0x1;_0x28f212+=0x1;}return _0x28f212;}function resolveEffectiveResultVariable(_0x8c2684,_0x4073cf){const _0x5e5684=a299_0xf21873;if(_0x8c2684===undefined||_0x8c2684===null||_0x4073cf&&_0x8c2684==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x8c2684!==_0x5e5684(0x21e)||!VARIABLE_PATTERN['test'](_0x8c2684)||RESERVED_RESULT_VARIABLES[_0x5e5684(0x2fb)](_0x8c2684)||_0x8c2684[_0x5e5684(0x240)](_0x5e5684(0x2f4)))return undefined;return _0x8c2684;}function registerResultVariableOwner(_0x9569dc,_0xf23ba2,_0x133dd2,_0x3c8ddf){const _0x58ecee=a299_0xf21873;if(_0x9569dc[_0x58ecee(0x2fb)](_0xf23ba2)){_0x3c8ddf['push']({'path':_0x58ecee(0x26c),'message':'Duplicate\x20resultVariable:\x20'+_0xf23ba2+'.'});return;}_0x9569dc[_0x58ecee(0x227)](_0xf23ba2,_0x133dd2);}function setsEqual(_0x396d42,_0xf6f1cb){const _0xb218b0=a299_0xf21873;return _0x396d42['size']===_0xf6f1cb[_0xb218b0(0x2df)]&&[..._0x396d42]['every'](_0x4f19d2=>_0xf6f1cb[_0xb218b0(0x2fb)](_0x4f19d2));}function isValidUserId(_0x507a5b){const _0x24c015=a299_0xf21873;if(typeof _0x507a5b===_0x24c015(0x21e))return _0x507a5b[_0x24c015(0x325)]()[_0x24c015(0x24f)]>0x0;return Number[_0x24c015(0x1d4)](_0x507a5b)&&Number(_0x507a5b)>0x0;}function resolveEdgeEndpoint(_0x3e3945,_0x512d23){const _0x56fac3=a299_0xf21873;if(typeof _0x3e3945===_0x56fac3(0x21e)&&_0x3e3945[_0x56fac3(0x325)]())return _0x3e3945[_0x56fac3(0x325)]();if(typeof _0x512d23===_0x56fac3(0x21e)&&_0x512d23['trim']())return _0x512d23[_0x56fac3(0x325)]();return undefined;}function removeEmptyMetadata(_0x41d580,_0x278e51,_0x4f30bc,_0x9ef19a){const _0x264290=a299_0xf21873;if(Array['isArray'](_0x41d580)){_0x41d580[_0x264290(0x32a)]((_0x3f8a21,_0x1d507b)=>removeEmptyMetadata(_0x3f8a21,_0x278e51+'['+_0x1d507b+']',_0x4f30bc,_0x9ef19a));return;}if(!isRecord(_0x41d580))return;for(const [_0x3a75d3,_0x5e0111]of Object[_0x264290(0x320)](_0x41d580)){const _0x7ddb80=_0x278e51+'.'+_0x3a75d3;if(_0x3a75d3===_0x264290(0x330)&&isEmptyJsonValue(_0x5e0111)){delete _0x41d580[_0x3a75d3],_0x9ef19a[_0x264290(0x2c1)](_0x7ddb80),_0x4f30bc[_0x264290(0x2c1)]({'code':_0x264290(0x2ab),'path':_0x7ddb80,'message':_0x7ddb80+'\x20was\x20empty\x20and\x20was\x20removed.'});continue;}removeEmptyMetadata(_0x5e0111,_0x7ddb80,_0x4f30bc,_0x9ef19a);}}function isEmptyJsonValue(_0x114058){const _0x3c5c94=a299_0xf21873;if(_0x114058===null||_0x114058===undefined)return!![];if(typeof _0x114058===_0x3c5c94(0x21e))return _0x114058['trim']()==='';if(Array[_0x3c5c94(0x1f1)](_0x114058))return _0x114058['length']===0x0;return isRecord(_0x114058)&&Object[_0x3c5c94(0x258)](_0x114058)['length']===0x0;}function isRecord(_0x236363){const _0x2e1e6b=a299_0xf21873;return typeof _0x236363===_0x2e1e6b(0x23a)&&_0x236363!==null&&!Array[_0x2e1e6b(0x1f1)](_0x236363);}function cloneJsonValue(_0x262115){const _0x1e2ad5=a299_0xf21873;return JSON[_0x1e2ad5(0x1f6)](JSON['stringify'](_0x262115));}export async function readFlowConfigFile(_0x4932a0){const _0x26facc=a299_0xf21873,_0x5ae55d=await readFile(resolve(_0x4932a0),'utf8');return JSON[_0x26facc(0x1f6)](_0x5ae55d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a300_0x19b80b=a300_0x26e3;(function(_0x5326bd,_0x613b4a){const _0x2c4150=a300_0x26e3,_0x52aac7=_0x5326bd();while(!![]){try{const _0x460e8d=parseInt(_0x2c4150(0x16c))/0x1*(-parseInt(_0x2c4150(0x161))/0x2)+parseInt(_0x2c4150(0x14f))/0x3*(-parseInt(_0x2c4150(0x172))/0x4)+-parseInt(_0x2c4150(0x15f))/0x5+-parseInt(_0x2c4150(0x169))/0x6+parseInt(_0x2c4150(0x177))/0x7*(parseInt(_0x2c4150(0x150))/0x8)+-parseInt(_0x2c4150(0x16f))/0x9+parseInt(_0x2c4150(0x17b))/0xa;if(_0x460e8d===_0x613b4a)break;else _0x52aac7['push'](_0x52aac7['shift']());}catch(_0x314691){_0x52aac7['push'](_0x52aac7['shift']());}}}(a300_0x2da3,0xb1d69));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_0x26e3(_0xf2a102,_0x2a869a){_0xf2a102=_0xf2a102-0x142;const _0x2da35c=a300_0x2da3();let _0x26e35a=_0x2da35c[_0xf2a102];return _0x26e35a;}export const INSTANT_API_POLICY_RELATIVE_ROOT='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a300_0x19b80b(0x160);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x110e2d,_0xfd4154,_0x56da67){return new CliError(_0x110e2d,0x1,_0xfd4154,_0x56da67);}export function loadInstantApiPolicyLocalConfig(_0x539df4,_0x58baf3){assertSafeAppCode(_0x539df4);const _0x48a4ea=resolve(_0x58baf3??findProjectRootDirectory()),_0x444f28=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x539df4+'/'+INSTANT_API_POLICY_FILE_NAME,_0x57bed6=resolve(_0x48a4ea,INSTANT_API_POLICY_RELATIVE_ROOT,_0x539df4),_0x583794=resolve(_0x57bed6,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x48a4ea,'appCode':_0x539df4,'policyRoot':_0x57bed6,'policyFilePath':_0x583794,'policyRelativePath':_0x444f28};}export function createDefaultInstantApiPolicyConfig(_0x96590f,_0x3f0659=a300_0x19b80b(0x16d)){return assertSafeAppCode(_0x96590f),{'version':'2','appCode':_0x96590f,'defaults':{'instantApi':_0x3f0659},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x142104){const _0x548f03=a300_0x19b80b;let _0x406009;try{_0x406009=await stat(_0x142104[_0x548f03(0x159)]);}catch(_0x196613){throw instantApiPolicyError(_0x548f03(0x181),'Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'+_0x142104[_0x548f03(0x159)],'Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.');}if(!_0x406009[_0x548f03(0x15a)]())throw instantApiPolicyError(_0x548f03(0x158),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x142104[_0x548f03(0x159)]);if(_0x406009[_0x548f03(0x147)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x548f03(0x14d),_0x548f03(0x171));let _0x4c2f62;try{_0x4c2f62=await readFile(_0x142104[_0x548f03(0x159)]);}catch{throw instantApiPolicyError(_0x548f03(0x179),_0x548f03(0x145)+_0x142104[_0x548f03(0x159)]);}if(_0x4c2f62[_0x548f03(0x14b)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x548f03(0x14d),_0x548f03(0x171));let _0x2fe742;try{_0x2fe742=new TextDecoder(_0x548f03(0x142),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x4c2f62);}catch{throw instantApiPolicyError(_0x548f03(0x158),_0x548f03(0x178)+_0x142104[_0x548f03(0x159)]);}let _0x49b7a3;try{_0x49b7a3=JSON[_0x548f03(0x180)](_0x2fe742);}catch{throw instantApiPolicyError(_0x548f03(0x144),_0x548f03(0x151)+_0x142104[_0x548f03(0x159)]);}return assertLocalPolicyContract(_0x49b7a3,_0x142104['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x4664e6,_0x36e26c,_0x382be2={}){const _0x3aa824=a300_0x19b80b,_0x3c14b4=assertLocalPolicyContract(_0x36e26c,_0x4664e6[_0x3aa824(0x152)]),_0x9463e6=JSON['stringify'](_0x3c14b4,null,0x2)+'\x0a';if(Buffer[_0x3aa824(0x14b)](_0x9463e6,_0x3aa824(0x163))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x3aa824(0x14d),_0x3aa824(0x171));await mkdir(_0x4664e6[_0x3aa824(0x162)],{'recursive':!![]});let _0x573f9c;try{_0x573f9c=await readFile(_0x4664e6['policyFilePath'],_0x3aa824(0x163));}catch(_0x3a9372){if(!isMissingFile(_0x3a9372))throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x3aa824(0x15e)+_0x4664e6[_0x3aa824(0x159)]);}if(_0x573f9c===_0x9463e6)return{'action':'unchanged','filePath':_0x4664e6[_0x3aa824(0x159)]};if(_0x573f9c!==undefined&&!_0x382be2[_0x3aa824(0x146)])throw instantApiPolicyError(_0x3aa824(0x170),'Instant\x20API\x20policy\x20file\x20already\x20exists:\x20'+_0x4664e6['policyFilePath'],_0x3aa824(0x154));if(_0x573f9c===undefined)try{return await writeFile(_0x4664e6['policyFilePath'],_0x9463e6,{'encoding':_0x3aa824(0x163),'flag':'wx'}),{'action':_0x3aa824(0x17e),'filePath':_0x4664e6[_0x3aa824(0x159)]};}catch(_0x4e3012){if(!isAlreadyExists(_0x4e3012))throw instantApiPolicyError(_0x3aa824(0x14a),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x4664e6[_0x3aa824(0x159)]);if(!_0x382be2[_0x3aa824(0x146)])throw instantApiPolicyError(_0x3aa824(0x170),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x4664e6['policyFilePath'],_0x3aa824(0x17f));}const _0x44ea75=resolve(dirname(_0x4664e6[_0x3aa824(0x159)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x3aa824(0x16e));try{await writeFile(_0x44ea75,_0x9463e6,{'encoding':_0x3aa824(0x163),'flag':'wx'}),await rename(_0x44ea75,_0x4664e6['policyFilePath']);}catch{await unlink(_0x44ea75)['catch'](()=>undefined);throw instantApiPolicyError(_0x3aa824(0x14a),_0x3aa824(0x168)+_0x4664e6[_0x3aa824(0x159)]);}return{'action':_0x3aa824(0x17c),'filePath':_0x4664e6[_0x3aa824(0x159)]};}function assertSafeAppCode(_0x1b567a){const _0x43ede2=a300_0x19b80b,_0x31e741=_0x1b567a[_0x43ede2(0x167)]();if(!_0x31e741||_0x31e741!==_0x1b567a||_0x31e741[_0x43ede2(0x155)]>0x64||_0x31e741==='.'||_0x31e741==='..'||_0x31e741[_0x43ede2(0x156)]('/')||_0x31e741[_0x43ede2(0x156)]('\x5c')||_0x31e741[_0x43ede2(0x156)]('\x00'))throw instantApiPolicyError(_0x43ede2(0x17a),_0x43ede2(0x143));}function a300_0x2da3(){const _0x51e2bf=['Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','appCode','rules','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','length','includes','instant_api_policy_app_code_mismatch','instant_api_policy_file_invalid','policyFilePath','isFile','ENOENT','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','string','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','4424705vEcmEN','policy.json','2zwbluW','policyRoot','utf8','instantApi','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','trim','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','8053116DcYPdM','code','instant_api_policy_rules_invalid','712633MluzuW','allow','.tmp','7801605yqDpIV','instant_api_policy_file_exists','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','4OltOJc','EEXIST','isArray','Policy\x20defaults.instantApi\x20is\x20required.','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','1905736GOrkGx','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','instant_api_policy_file_unreadable','instant_api_policy_app_code_invalid','47770710nkayHI','overwritten','object','created','Review\x20the\x20file\x20before\x20retrying.','parse','instant_api_policy_file_missing','utf-8','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_json_invalid','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','force','size','defaults','instant_api_policy_version_invalid','instant_api_policy_file_unwritable','byteLength','version','instant_api_policy_file_too_large','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','1542867yRTMDL','8MlQqzD'];a300_0x2da3=function(){return _0x51e2bf;};return a300_0x2da3();}function assertLocalPolicyContract(_0x4ca25d,_0x5b70d6){const _0xd5c6e8=a300_0x19b80b;if(!isObject(_0x4ca25d))throw instantApiPolicyError('instant_api_policy_json_invalid',_0xd5c6e8(0x166));if(_0x4ca25d[_0xd5c6e8(0x14c)]!=='1'&&_0x4ca25d['version']!=='2')throw instantApiPolicyError(_0xd5c6e8(0x149),_0xd5c6e8(0x176),_0xd5c6e8(0x165));if(_0x4ca25d[_0xd5c6e8(0x152)]!==_0x5b70d6)throw instantApiPolicyError(_0xd5c6e8(0x157),_0xd5c6e8(0x14e)+_0x5b70d6+'.');if(!isObject(_0x4ca25d[_0xd5c6e8(0x148)])||typeof _0x4ca25d['defaults'][_0xd5c6e8(0x164)]!==_0xd5c6e8(0x15d))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0xd5c6e8(0x175));if(_0x4ca25d[_0xd5c6e8(0x153)]!==undefined&&_0x4ca25d[_0xd5c6e8(0x153)]!==null&&!Array[_0xd5c6e8(0x174)](_0x4ca25d[_0xd5c6e8(0x153)]))throw instantApiPolicyError(_0xd5c6e8(0x16b),_0xd5c6e8(0x15c));return _0x4ca25d;}function isObject(_0x479b42){const _0x2b2253=a300_0x19b80b;return _0x479b42!==null&&typeof _0x479b42===_0x2b2253(0x17d)&&!Array[_0x2b2253(0x174)](_0x479b42);}function isMissingFile(_0x50c898){const _0x1b3d50=a300_0x19b80b;return Boolean(_0x50c898&&typeof _0x50c898===_0x1b3d50(0x17d)&&_0x50c898[_0x1b3d50(0x16a)]===_0x1b3d50(0x15b));}function isAlreadyExists(_0x3435dd){const _0x419665=a300_0x19b80b;return Boolean(_0x3435dd&&typeof _0x3435dd==='object'&&_0x3435dd['code']===_0x419665(0x173));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a301_0x29b0(_0xb28db7,_0x577eb3){_0xb28db7=_0xb28db7-0x17b;const _0x24282f=a301_0x2428();let _0x29b048=_0x24282f[_0xb28db7];return _0x29b048;}const a301_0x281eaa=a301_0x29b0;(function(_0x4b2674,_0x230e09){const _0x182f38=a301_0x29b0,_0x38ff1a=_0x4b2674();while(!![]){try{const _0x520806=parseInt(_0x182f38(0x18c))/0x1*(parseInt(_0x182f38(0x17d))/0x2)+-parseInt(_0x182f38(0x187))/0x3+parseInt(_0x182f38(0x184))/0x4*(-parseInt(_0x182f38(0x183))/0x5)+parseInt(_0x182f38(0x186))/0x6*(-parseInt(_0x182f38(0x17f))/0x7)+parseInt(_0x182f38(0x18b))/0x8+-parseInt(_0x182f38(0x180))/0x9+-parseInt(_0x182f38(0x18a))/0xa*(-parseInt(_0x182f38(0x185))/0xb);if(_0x520806===_0x230e09)break;else _0x38ff1a['push'](_0x38ff1a['shift']());}catch(_0x4a837a){_0x38ff1a['push'](_0x38ff1a['shift']());}}}(a301_0x2428,0xe2789));const base='/smartapi/instant-api-policy';function a301_0x2428(){const _0x86b514=['4776400VnvJEh','261094AIURGa','/revision','/revisions','8LwdImu','/publish','33803GvEbTT','8794386vmQAAw','/rollback','/current','5xICREh','4644796NNdRxl','81697OLODEC','1164LOQDVw','4368300Ysuhgc','freeze','/validate','5140tVKOmg'];a301_0x2428=function(){return _0x86b514;};return a301_0x2428();}export const INSTANT_API_POLICY_PATHS=Object[a301_0x281eaa(0x188)]({'current':base+a301_0x281eaa(0x182),'validate':base+a301_0x281eaa(0x189),'publish':base+a301_0x281eaa(0x17e),'revisions':base+a301_0x281eaa(0x17c),'revision':base+a301_0x281eaa(0x17b),'rollback':base+a301_0x281eaa(0x181)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a302_0x4a09eb=a302_0xf2e7;function a302_0x24a8(){const _0x48b085=['Knowledge\x20management\x20request\x20cancelled.','network','549288XeKdVl','signal','run','httpStatus','36642vvwjvv','735YwQwBw','authRequired','1004493xvSXft','defineProperty','message','\x20The\x20entry\x20may\x20already\x20have\x20been\x20saved.\x20Use\x20read-only\x20detail\x20or\x20list\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','3319985JdUwes','191621AQEsAL','origin','2362070tAJGhJ','cancelled','validation','kind','code','trim','Configure\x20kbServiceDomain\x20with\x20a\x20trusted\x20HTTPS\x20origin\x20for\x20knowledge\x20management.','auth','remoteErrorCode','getStore','pageTooLarge','api_error','54FkKKSL','transportFailure','status','4tdCpGM','cookie','data','540312eDkKYO','API\x20error\x20code:\x20'];a302_0x24a8=function(){return _0x48b085;};return a302_0x24a8();}(function(_0x42d94e,_0x27e668){const _0x34bbbd=a302_0xf2e7,_0x172068=_0x42d94e();while(!![]){try{const _0x4190f3=parseInt(_0x34bbbd(0x91))/0x1*(parseInt(_0x34bbbd(0xa2))/0x2)+parseInt(_0x34bbbd(0xb0))/0x3+-parseInt(_0x34bbbd(0xa5))/0x4+parseInt(_0x34bbbd(0x90))/0x5+parseInt(_0x34bbbd(0xad))/0x6*(parseInt(_0x34bbbd(0xae))/0x7)+-parseInt(_0x34bbbd(0xa9))/0x8+parseInt(_0x34bbbd(0x9f))/0x9*(-parseInt(_0x34bbbd(0x93))/0xa);if(_0x4190f3===_0x27e668)break;else _0x172068['push'](_0x172068['shift']());}catch(_0x338614){_0x172068['push'](_0x172068['shift']());}}}(a302_0x24a8,0x62394));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';function a302_0xf2e7(_0x7937e8,_0x3efb65){_0x7937e8=_0x7937e8-0x8d;const _0x24a836=a302_0x24a8();let _0xf2e74c=_0x24a836[_0x7937e8];return _0xf2e74c;}import{CliError,CliErrors}from'../errors.js';const WRITE_RECONCILIATION=a302_0x4a09eb(0x8f),session=new AsyncLocalStorage();export class KbManagementError extends CliError{['transportFailure'];[a302_0x4a09eb(0x9b)];[a302_0x4a09eb(0xac)];[a302_0x4a09eb(0x9d)];constructor(_0x2e44e5,_0x29ead7=![],_0x1aca30,_0x1b6cb4,_0xdc101b=![]){const _0x13621b=a302_0x4a09eb;super(_0x13621b(0x9e),0x1,_0x2e44e5,_0x1aca30?_0x13621b(0xa6)+_0x1aca30:undefined),this[_0x13621b(0xa0)]=_0x29ead7,this['remoteErrorCode']=_0x1aca30,this[_0x13621b(0xac)]=_0x1b6cb4,this[_0x13621b(0x9d)]=_0xdc101b;if(_0x1aca30)Object[_0x13621b(0x8d)](this,_0x13621b(0xa4),{'value':{'remoteErrorCode':_0x1aca30},'enumerable':![]});}}function resolveOrigin(){const _0x50c9e1=a302_0x4a09eb,_0x14d0f2=getKbServiceDomain();if(!_0x14d0f2)throw CliErrors[_0x50c9e1(0x95)](_0x50c9e1(0x99));try{return normalizeKbServiceOrigin(_0x14d0f2);}catch{throw CliErrors[_0x50c9e1(0x95)]('Invalid\x20kbServiceDomain:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.');}}export function withKbManagementSession(_0x339334,_0x8768a8){const _0xb082c2=a302_0x4a09eb;return session[_0xb082c2(0xab)]({'origin':resolveOrigin(),'signal':_0x339334},_0x8768a8);}export async function withKbManagementClient(_0x1fdf10,_0x553746,_0x406d9d={}){const _0x231835=a302_0x4a09eb,_0x7dd8e9=session[_0x231835(0x9c)]()?.[_0x231835(0x92)]??resolveOrigin();if(!_0x1fdf10[_0x231835(0x98)]())throw CliErrors['authRequired']();const _0x238ce8=_0x406d9d[_0x231835(0xaa)]??session[_0x231835(0x9c)]()?.[_0x231835(0xaa)];if(_0x238ce8?.['aborted'])throw CliErrors[_0x231835(0x94)](_0x231835(0xa7));try{const _0x3fd507=createKnowledgeClient({'kbServiceDomain':_0x7dd8e9,'authMode':_0x231835(0xa3),'cookie':_0x1fdf10,'invokeSource':'cli:rabetbase'});return await _0x553746(_0x3fd507,{'signal':_0x238ce8});}catch(_0x28451f){if(!(_0x28451f instanceof KnowledgeServiceError))throw _0x28451f;if(_0x28451f[_0x231835(0x96)]===_0x231835(0x9a))throw CliErrors[_0x231835(0xaf)]();if(_0x28451f[_0x231835(0x96)]===_0x231835(0x95))throw CliErrors[_0x231835(0x95)](_0x28451f[_0x231835(0x8e)]);const _0x115a06=_0x28451f['kind']===_0x231835(0xa8)||_0x28451f[_0x231835(0x96)]==='timeout'||_0x28451f[_0x231835(0x96)]===_0x231835(0x94);throw new KbManagementError(_0x28451f[_0x231835(0x8e)]+(_0x28451f['writeUncertain']?WRITE_RECONCILIATION:''),_0x115a06,/^\d+$/['test'](_0x28451f[_0x231835(0x97)]??'')?_0x28451f[_0x231835(0x97)]:undefined,_0x28451f[_0x231835(0xa1)],_0x28451f['pageTooLarge']);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x388389,_0x4f748d){const _0x204eb4=a303_0x4b87,_0x32face=_0x388389();while(!![]){try{const _0x1029e8=-parseInt(_0x204eb4(0x1c1))/0x1+parseInt(_0x204eb4(0x1ae))/0x2+parseInt(_0x204eb4(0x1b9))/0x3+parseInt(_0x204eb4(0x1b7))/0x4+-parseInt(_0x204eb4(0x1c8))/0x5*(parseInt(_0x204eb4(0x1c3))/0x6)+-parseInt(_0x204eb4(0x1b8))/0x7*(parseInt(_0x204eb4(0x1b0))/0x8)+parseInt(_0x204eb4(0x1bd))/0x9*(parseInt(_0x204eb4(0x1af))/0xa);if(_0x1029e8===_0x4f748d)break;else _0x32face['push'](_0x32face['shift']());}catch(_0xfc8dae){_0x32face['push'](_0x32face['shift']());}}}(a303_0x22c8,0x6f4fd));import{createKnowledgeClient,KnowledgeServiceError,normalizeKnowledgeServiceOrigin}from'@lovrabet/sdk';function a303_0x4b87(_0x1f06b4,_0x39d71c){_0x1f06b4=_0x1f06b4-0x1a9;const _0x22c802=a303_0x22c8();let _0x4b8719=_0x22c802[_0x1f06b4];return _0x4b8719;}import{CliErrors}from'../errors.js';export function normalizeKbServiceOrigin(_0x27776a){const _0x58e564=a303_0x4b87;try{return normalizeKnowledgeServiceOrigin(_0x27776a);}catch{throw CliErrors[_0x58e564(0x1ca)](_0x58e564(0x1cc));}}export async function searchDirectKnowledge(_0x185b9e){const _0x4ee9d2=a303_0x4b87,_0xe97e09=_0x185b9e[_0x4ee9d2(0x1c7)][_0x4ee9d2(0x1d1)](),_0x2e710c=_0x185b9e['query'][_0x4ee9d2(0x1d1)]();if(!_0xe97e09)throw CliErrors[_0x4ee9d2(0x1ca)](_0x4ee9d2(0x1c0));if(!_0x2e710c)throw CliErrors[_0x4ee9d2(0x1ca)](_0x4ee9d2(0x1c6));if(!_0x185b9e['cookie']['trim']())throw CliErrors['authRequired']();const _0x2d290b=normalizeKbServiceOrigin(_0x185b9e[_0x4ee9d2(0x1bc)]);try{const _0x4cde01=createKnowledgeClient({'kbServiceDomain':_0x2d290b,'authMode':'cookie','cookie':_0x185b9e['cookie'],'invokeSource':_0x4ee9d2(0x1c9)}),_0x1af3fa=await _0x4cde01['search']({'appCode':_0xe97e09,'query':_0x2e710c,'scopes':['public',_0x4ee9d2(0x1ba)],..._0x185b9e['topK']!==undefined?{'topK':_0x185b9e[_0x4ee9d2(0x1cf)]}:{}},{'signal':_0x185b9e['signal']});return{..._0x1af3fa,'hits':_0x1af3fa[_0x4ee9d2(0x1bb)],'schemaVersion':0x2,'profile':'development','total':_0x1af3fa[_0x4ee9d2(0x1bb)][_0x4ee9d2(0x1c5)]};}catch(_0xcd7be5){if(!(_0xcd7be5 instanceof KnowledgeServiceError))throw _0xcd7be5;if(_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1b3))throw CliErrors[_0x4ee9d2(0x1b1)]();if(_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1ca))throw CliErrors['validation'](_0xcd7be5[_0x4ee9d2(0x1c4)]);if(_0xcd7be5['kind']===_0x4ee9d2(0x1b6))throw new DOMException('Knowledge\x20search\x20cancelled.',_0x4ee9d2(0x1b2));if(_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1ad)||_0xcd7be5[_0x4ee9d2(0x1bf)]==='timeout')throw CliErrors[_0x4ee9d2(0x1ac)](_0xcd7be5[_0x4ee9d2(0x1bf)]==='timeout'?'KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.':_0x4ee9d2(0x1d0));const _0x5149e7=_0xcd7be5[_0x4ee9d2(0x1bf)]===_0x4ee9d2(0x1aa)&&_0xcd7be5[_0x4ee9d2(0x1c4)][_0x4ee9d2(0x1cd)]('out-of-scope')?_0x4ee9d2(0x1b4):_0xcd7be5[_0x4ee9d2(0x1c4)],_0x1503dd=CliErrors['apiError'](_0xcd7be5[_0x4ee9d2(0x1a9)]!==undefined&&_0xcd7be5[_0x4ee9d2(0x1a9)]!==0xc8&&!_0x5149e7['includes'](_0x4ee9d2(0x1be)+_0xcd7be5['status'])?_0x5149e7+_0x4ee9d2(0x1b5)+_0xcd7be5['status']+')':_0x5149e7);if(/^\d+$/[_0x4ee9d2(0x1c2)](_0xcd7be5['code']??''))Object[_0x4ee9d2(0x1ce)](_0x1503dd,_0x4ee9d2(0x1ab),{'value':{'remoteErrorCode':_0xcd7be5[_0x4ee9d2(0x1cb)]},'enumerable':![]});throw _0x1503dd;}}function a303_0x22c8(){const _0x9a67e8=['kind','Knowledge\x20search\x20appCode\x20is\x20required.','154279MiCMKm','test','109566gzulOj','message','length','Knowledge\x20search\x20query\x20is\x20required.','appCode','220SwCDub','cli:rabetbase','validation','code','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','includes','defineProperty','topK','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','trim','status','contract','data','networkError','network','921510tapTfc','241970QOYSTA','8UtkmwZ','authRequired','AbortError','auth','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','\x20(HTTP\x20','cancelled','1305432JcsUGe','3903221NQZLby','140781iSFuEX','company','hits','serviceUrl','423ZoDGkZ','HTTP\x20'];a303_0x22c8=function(){return _0x9a67e8;};return a303_0x22c8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a304_0x2df38b=a304_0x2ea7;(function(_0x27b7ad,_0x45bcfe){const _0x204264=a304_0x2ea7,_0x41ba8b=_0x27b7ad();while(!![]){try{const _0x38ebb5=parseInt(_0x204264(0x1a4))/0x1*(-parseInt(_0x204264(0x1a3))/0x2)+-parseInt(_0x204264(0x1aa))/0x3*(parseInt(_0x204264(0x1b0))/0x4)+parseInt(_0x204264(0x1b2))/0x5+parseInt(_0x204264(0x1af))/0x6*(parseInt(_0x204264(0x1a6))/0x7)+-parseInt(_0x204264(0x1a5))/0x8+parseInt(_0x204264(0x1ab))/0x9+parseInt(_0x204264(0x1ac))/0xa;if(_0x38ebb5===_0x45bcfe)break;else _0x41ba8b['push'](_0x41ba8b['shift']());}catch(_0xa2315d){_0x41ba8b['push'](_0x41ba8b['shift']());}}}(a304_0x2f5f,0xbe548));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x3a6261,_0x2dfaec=process[a304_0x2df38b(0x19d)]()){const _0x558189=a304_0x2df38b,_0x439e7c=resolve(_0x2dfaec),_0x4a7f69=join(_0x439e7c,_0x558189(0x199),_0x558189(0x19e));return{'projectRoot':_0x439e7c,'pagesBaseDir':_0x4a7f69,'appPagesDir':join(_0x4a7f69,_0x3a6261),'lockFilePath':join(_0x439e7c,_0x558189(0x199),_0x558189(0x1a1))};}export function buildPageFileName(_0x53ebfa,_0x887fb0){const _0x41e191=a304_0x2df38b;return _0x53ebfa+'-'+_0x887fb0[_0x41e191(0x1a8)]()+_0x41e191(0x1a7);}export function resolvePageFilePath(_0x14121b,_0x5cadd1,_0x3db5e2){return join(_0x14121b['appPagesDir'],buildPageFileName(_0x5cadd1,_0x3db5e2));}export async function ensureParentDirectory(_0x26fef6){await mkdir(dirname(_0x26fef6),{'recursive':!![]});}export async function fileExists(_0x3bf0fd){const _0x540669=a304_0x2df38b;try{return await access(_0x3bf0fd,constants[_0x540669(0x1ad)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x465d5c){const _0x3133cd=a304_0x2df38b,_0x5da7f0=_0x465d5c[_0x3133cd(0x196)]();if(!_0x5da7f0)throw CliErrors[_0x3133cd(0x1a2)](_0x3133cd(0x19c));const _0x5688be=resolve(_0x5da7f0);let _0x2cd79b;try{_0x2cd79b=await lstat(_0x5688be);}catch{throw CliErrors[_0x3133cd(0x19f)](_0x3133cd(0x19a)+_0x5da7f0);}if(!_0x2cd79b[_0x3133cd(0x198)]())throw CliErrors['validation'](_0x3133cd(0x1a9)+_0x5da7f0);const _0x2572ee={};return await readDirectory(_0x5688be,_0x5688be,_0x2572ee),_0x2572ee;}function a304_0x2f5f(){const _0x5234b4=['Page\x20directory\x20not\x20found:\x20','split','page-dir','cwd','page','validation','name','page.lock.json','flagMissing','2xGFpnC','893674tlunEh','7397448KbzzZH','1918iSYvke','.json','toUpperCase','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','3ouLUVp','2733372Qsjqtk','25924420pqQpbX','F_OK','isFile','16194udEUlS','4701668wJQLBn','Unsupported\x20file\x20in\x20page\x20directory:\x20','688440NMFmVh','utf8','join','trim','sort','isDirectory','.rabetbase'];a304_0x2f5f=function(){return _0x5234b4;};return a304_0x2f5f();}function a304_0x2ea7(_0xc132a,_0x478420){_0xc132a=_0xc132a-0x196;const _0x2f5f45=a304_0x2f5f();let _0x2ea753=_0x2f5f45[_0xc132a];return _0x2ea753;}async function readDirectory(_0xfda313,_0x2bda68,_0x26c566){const _0x2c9c1c=a304_0x2df38b,_0x2582d4=await readdir(_0x2bda68,{'withFileTypes':!![]});for(const _0x1306db of _0x2582d4[_0x2c9c1c(0x197)]((_0xfea17c,_0x487d90)=>_0xfea17c[_0x2c9c1c(0x1a0)]['localeCompare'](_0x487d90['name']))){const _0x1c30fa=join(_0x2bda68,_0x1306db['name']);if(_0x1306db[_0x2c9c1c(0x198)]()){await readDirectory(_0xfda313,_0x1c30fa,_0x26c566);continue;}if(!_0x1306db[_0x2c9c1c(0x1ae)]())throw CliErrors[_0x2c9c1c(0x19f)](_0x2c9c1c(0x1b1)+_0x1c30fa);_0x26c566[relative(_0xfda313,_0x1c30fa)[_0x2c9c1c(0x19b)](sep)[_0x2c9c1c(0x1b4)]('/')]=await readFile(_0x1c30fa,_0x2c9c1c(0x1b3));}}
|