@lovrabet/rabetbase-cli 2.5.3 → 2.5.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- 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/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.d.ts +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/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/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/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.d.ts +2 -0
- 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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.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/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/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.d.ts +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.d.ts +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.d.ts +4 -0
- 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.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- 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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +11 -10
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -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.d.ts +5 -2
- 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 +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- 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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +31 -17
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +33 -11
- package/skills/rabetbase/guides/best-practices.md +1 -1
- package/skills/rabetbase/guides/conflict-detection.md +44 -92
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +642 -0
- package/skills/rabetbase/guides/custom-page-flow-timeline-display.md +289 -0
- package/skills/rabetbase/guides/custom-page-workflow.md +12 -3
- package/skills/rabetbase/guides/sql-creation-workflow.md +44 -26
- package/skills/rabetbase/guides/sql-mybatis.md +18 -49
- package/skills/rabetbase/guides/typescript-sdk.md +18 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +22 -6
- package/skills/rabetbase/knowledge/components.md +34 -28
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +8 -4
- package/skills/rabetbase/references/rabetbase-flow-resources.md +3 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +2 -0
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +14 -4
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -1
- package/skills/rabetbase/references/rabetbase-page-custom-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +5 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +12 -6
- package/skills/rabetbase.manifest.json +5 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a281_0x17c8d0=a281_0x2049;(function(_0xd2d8b1,_0x500899){const _0x2cf864=a281_0x2049,_0x18eeb2=_0xd2d8b1();while(!![]){try{const _0x5ce98d=parseInt(_0x2cf864(0x1eb))/0x1+parseInt(_0x2cf864(0x1d5))/0x2*(parseInt(_0x2cf864(0x2d2))/0x3)+-parseInt(_0x2cf864(0x22d))/0x4+parseInt(_0x2cf864(0x2ca))/0x5*(parseInt(_0x2cf864(0x233))/0x6)+-parseInt(_0x2cf864(0x2fc))/0x7+-parseInt(_0x2cf864(0x260))/0x8+-parseInt(_0x2cf864(0x29e))/0x9*(parseInt(_0x2cf864(0x26a))/0xa);if(_0x5ce98d===_0x500899)break;else _0x18eeb2['push'](_0x18eeb2['shift']());}catch(_0x5b7c3c){_0x18eeb2['push'](_0x18eeb2['shift']());}}}(a281_0x5028,0x8ad15));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':'https://json-schema.org/draft/2020-12/schema','$id':a281_0x17c8d0(0x313),'title':a281_0x17c8d0(0x288),'type':'object','required':[a281_0x17c8d0(0x217),a281_0x17c8d0(0x277),a281_0x17c8d0(0x24e)],'$defs':{'userId':{'anyOf':[{'type':'string','minLength':0x1},{'type':a281_0x17c8d0(0x2dd),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a281_0x17c8d0(0x246),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x205),a281_0x17c8d0(0x22e)],'properties':{'value':{'type':a281_0x17c8d0(0x2dd),'minimum':0x1},'unit':{'enum':[a281_0x17c8d0(0x263),a281_0x17c8d0(0x1f5),a281_0x17c8d0(0x274),a281_0x17c8d0(0x218)]}},'additionalProperties':!![]},'flowNode':{'type':a281_0x17c8d0(0x1f8),'required':['id',a281_0x17c8d0(0x2c1),a281_0x17c8d0(0x28d),'position'],'properties':{'id':{'type':a281_0x17c8d0(0x30c),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':[a281_0x17c8d0(0x30f),'END',a281_0x17c8d0(0x31b),a281_0x17c8d0(0x221),a281_0x17c8d0(0x2a9),a281_0x17c8d0(0x1cc)]},'name':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'pageId':{'type':'integer','minimum':0x1},'position':{'$ref':a281_0x17c8d0(0x2d6)},'approvalMode':{'enum':[a281_0x17c8d0(0x279),a281_0x17c8d0(0x271),'ANY']},'taskMode':{'enum':[a281_0x17c8d0(0x31b),'HANDLE']},'assignee':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x1da)],'properties':{'strategy':{'enum':[a281_0x17c8d0(0x320),a281_0x17c8d0(0x315)]},'userIds':{'type':'array','minItems':0x1,'items':{'$ref':'#/$defs/userId'}},'roleId':{'anyOf':[{'type':a281_0x17c8d0(0x2dd),'minimum':0x1},{'type':'string','pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x1da),a281_0x17c8d0(0x2b9)],'properties':{'strategy':{'const':a281_0x17c8d0(0x320)},'userIds':{'type':a281_0x17c8d0(0x1f2),'minItems':0x1,'items':{'$ref':a281_0x17c8d0(0x29d)}}},'additionalProperties':!![]},'sequential':{'type':a281_0x17c8d0(0x228)},'result':{'enum':[a281_0x17c8d0(0x20d),a281_0x17c8d0(0x2cc)]},'scriptName':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'resultVariable':{'type':a281_0x17c8d0(0x30c),'pattern':a281_0x17c8d0(0x258)},'async':{'type':'object','properties':{'enabled':{'type':a281_0x17c8d0(0x228)},'retryCount':{'type':a281_0x17c8d0(0x2dd),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a281_0x17c8d0(0x1f8),'properties':{'enabled':{'type':a281_0x17c8d0(0x228)},'duration':{'$ref':a281_0x17c8d0(0x272)},'action':{'enum':[a281_0x17c8d0(0x208),a281_0x17c8d0(0x1e9),a281_0x17c8d0(0x2ba)]},'interrupting':{'type':a281_0x17c8d0(0x228)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a281_0x17c8d0(0x30c),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a281_0x17c8d0(0x1f8),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a281_0x17c8d0(0x1f2),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a281_0x17c8d0(0x30c),'minLength':0x1}},'visible':{'type':a281_0x17c8d0(0x1f2),'uniqueItems':!![],'items':{'type':a281_0x17c8d0(0x30c),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x20a),a281_0x17c8d0(0x311)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'failurePolicy':{'enum':[a281_0x17c8d0(0x2ae),'FAIL']},'template':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x293),a281_0x17c8d0(0x264)],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'detailMarkdown':{'type':a281_0x17c8d0(0x30c)},'facts':{'type':a281_0x17c8d0(0x1f2),'maxItems':0x8,'items':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x1d9),a281_0x17c8d0(0x205)],'properties':{'label':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'value':{'type':a281_0x17c8d0(0x30c),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a281_0x17c8d0(0x1f2),'maxItems':0x2,'items':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x2f3),a281_0x17c8d0(0x2ce)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a281_0x17c8d0(0x30c),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x2c1),a281_0x17c8d0(0x205)],'properties':{'type':{'enum':[a281_0x17c8d0(0x308),a281_0x17c8d0(0x315),a281_0x17c8d0(0x1df)]},'value':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a281_0x17c8d0(0x1f8),'properties':{'id':{'type':'string','pattern':a281_0x17c8d0(0x258)},'source':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'target':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'sourceNodeId':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'targetNodeId':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'conditionType':{'enum':[a281_0x17c8d0(0x28a),a281_0x17c8d0(0x20d),a281_0x17c8d0(0x2cc),a281_0x17c8d0(0x22f)]},'expression':{'type':a281_0x17c8d0(0x30c)},'defaultFlow':{'type':a281_0x17c8d0(0x228)},'name':{'type':a281_0x17c8d0(0x30c)},'waypoints':{'type':a281_0x17c8d0(0x1f2),'items':{'$ref':a281_0x17c8d0(0x2d6)}}},'allOf':[{'anyOf':[{'required':['source']},{'required':['sourceNodeId']}]},{'anyOf':[{'required':[a281_0x17c8d0(0x2ab)]},{'required':[a281_0x17c8d0(0x201)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a281_0x17c8d0(0x2d9),a281_0x17c8d0(0x230)]},'datasetCode':{'type':a281_0x17c8d0(0x30c),'minLength':0x1},'pageId':{'type':a281_0x17c8d0(0x2dd)},'templateName':![],'flowJson':{'type':a281_0x17c8d0(0x1f8),'required':[a281_0x17c8d0(0x212),a281_0x17c8d0(0x24d)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a281_0x17c8d0(0x30c),'const':a281_0x17c8d0(0x2a4),'description':a281_0x17c8d0(0x21e)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a281_0x17c8d0(0x2f8)},'startPageId':{'type':a281_0x17c8d0(0x2dd),'minimum':0x1},'nodes':{'type':a281_0x17c8d0(0x1f2),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a281_0x17c8d0(0x1f2),'minItems':0x1,'items':{'$ref':a281_0x17c8d0(0x323)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a281_0x17c8d0(0x2dc),a281_0x17c8d0(0x2fa),a281_0x17c8d0(0x217),a281_0x17c8d0(0x2a6),a281_0x17c8d0(0x284),a281_0x17c8d0(0x30b),a281_0x17c8d0(0x232),'templateName'],REMOVED_ROOT_FIELDS=['id',a281_0x17c8d0(0x30b),a281_0x17c8d0(0x304)],DEFAULT_FLOW_SCHEMA_VERSION=a281_0x17c8d0(0x2a4),NODE_TYPES=new Set([a281_0x17c8d0(0x30f),a281_0x17c8d0(0x1e6),'APPROVAL','CONDITION',a281_0x17c8d0(0x2a9),a281_0x17c8d0(0x1cc)]),CONDITION_TYPES=new Set(['ALWAYS','APPROVED',a281_0x17c8d0(0x2cc),a281_0x17c8d0(0x22f)]),APPROVAL_MODES=new Set([a281_0x17c8d0(0x279),'ALL',a281_0x17c8d0(0x2b0)]),APPROVAL_TASK_MODES=new Set([a281_0x17c8d0(0x31b),a281_0x17c8d0(0x299)]),FLOW_TIME_UNITS=new Set([a281_0x17c8d0(0x263),'MINUTES',a281_0x17c8d0(0x274),a281_0x17c8d0(0x218)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a281_0x17c8d0(0x1e9),a281_0x17c8d0(0x2ba)]),FLOW_TYPES=new Set([a281_0x17c8d0(0x2d9),a281_0x17c8d0(0x230)]),FLOW_PAGE_MODES=new Set([a281_0x17c8d0(0x2f8),a281_0x17c8d0(0x269)]),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([a281_0x17c8d0(0x2ae),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a281_0x17c8d0(0x308),'ROLE',a281_0x17c8d0(0x1df)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a281_0x17c8d0(0x1fd)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a281_0x17c8d0(0x282),UNSUPPORTED_FORM_MESSAGE=a281_0x17c8d0(0x2f1),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a281_0x17c8d0(0x325),RESERVED_RESULT_VARIABLES=new Set([a281_0x17c8d0(0x21b),'approved',a281_0x17c8d0(0x238),a281_0x17c8d0(0x20c),a281_0x17c8d0(0x211),a281_0x17c8d0(0x27f),a281_0x17c8d0(0x2ee),a281_0x17c8d0(0x2eb),a281_0x17c8d0(0x281),a281_0x17c8d0(0x302)]);export function normalizeFlowConfig(_0x4bb59e){const _0x2c7c6d=a281_0x17c8d0;if(!isRecord(_0x4bb59e))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0x55e96b=cloneJsonValue(_0x4bb59e),_0xf43653=_0x55e96b['flowJson'],_0x183c2b=isRecord(_0xf43653)?cloneJsonValue(_0xf43653):{},_0x59ff63=[],_0x32c49e=[];for(const _0x586740 of REMOVED_ROOT_FIELDS){if(!Object[_0x2c7c6d(0x24a)][_0x2c7c6d(0x328)][_0x2c7c6d(0x265)](_0x55e96b,_0x586740))continue;delete _0x55e96b[_0x586740],_0x32c49e[_0x2c7c6d(0x26f)](_0x586740),_0x59ff63[_0x2c7c6d(0x26f)]({'code':_0x2c7c6d(0x29b),'path':_0x586740,'message':_0x586740+_0x2c7c6d(0x28e)});}for(const _0x22ec37 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x2c7c6d(0x24a)][_0x2c7c6d(0x328)][_0x2c7c6d(0x265)](_0x183c2b,_0x22ec37))continue;const _0x19528a=_0x2c7c6d(0x240)+_0x22ec37;delete _0x183c2b[_0x22ec37],_0x32c49e[_0x2c7c6d(0x26f)](_0x19528a),_0x59ff63['push']({'code':_0x2c7c6d(0x29b),'path':_0x19528a,'message':_0x19528a+_0x2c7c6d(0x28e)});}if(Object[_0x2c7c6d(0x24a)][_0x2c7c6d(0x328)][_0x2c7c6d(0x265)](_0x183c2b,_0x2c7c6d(0x310))){const _0x198485=_0x183c2b['schemaVersion'],_0x134e83=typeof _0x198485===_0x2c7c6d(0x30c)?_0x198485[_0x2c7c6d(0x253)]():_0x198485;if(isEmptyJsonValue(_0x198485)||_0x134e83===DEFAULT_FLOW_SCHEMA_VERSION){const _0x5ce42b='flowJson.schemaVersion';delete _0x183c2b['schemaVersion'],_0x32c49e['push'](_0x5ce42b),_0x59ff63[_0x2c7c6d(0x26f)]({'code':_0x2c7c6d(0x29b),'path':_0x5ce42b,'message':_0x5ce42b+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+_0x2c7c6d(0x262)});}}removeEmptyMetadata(_0x183c2b,_0x2c7c6d(0x24e),_0x59ff63,_0x32c49e);_0x55e96b[_0x2c7c6d(0x277)]==='INDEPENDENT_FLOW'&&!Object[_0x2c7c6d(0x24a)][_0x2c7c6d(0x328)][_0x2c7c6d(0x265)](_0x183c2b,_0x2c7c6d(0x1f3))&&(_0x183c2b[_0x2c7c6d(0x1f3)]=_0x2c7c6d(0x2f8));_0x55e96b[_0x2c7c6d(0x24e)]=_0x183c2b;if(typeof _0x55e96b[_0x2c7c6d(0x217)]==='string')_0x55e96b[_0x2c7c6d(0x217)]=_0x55e96b[_0x2c7c6d(0x217)][_0x2c7c6d(0x253)]();return{'config':_0x55e96b,'warnings':_0x59ff63,'removedPaths':_0x32c49e};}export function validateFlowConfig(_0x2885a3){const _0x2997da=a281_0x17c8d0;let _0x2001fe;try{_0x2001fe=normalizeFlowConfig(_0x2885a3);}catch(_0x32705a){const _0x593118=_0x32705a instanceof Error?_0x32705a[_0x2997da(0x2fb)]:String(_0x32705a),_0x54923d={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x593118}],'warnings':[],'normalized':_0x54923d,'validationConfig':_0x54923d};}const _0x532700=_0x2001fe[_0x2997da(0x2cf)],_0x2c131a=cloneJsonValue(_0x532700),_0xcffba=_0x2c131a[_0x2997da(0x24e)];_0xcffba[_0x2997da(0x2dc)]=_0x2997da(0x24f),_0xcffba[_0x2997da(0x217)]=_0x532700[_0x2997da(0x217)];typeof _0x532700[_0x2997da(0x284)]===_0x2997da(0x30c)&&_0x532700[_0x2997da(0x284)][_0x2997da(0x253)]()&&(_0xcffba[_0x2997da(0x2a6)]=_0x532700['datasetCode'][_0x2997da(0x253)]());const _0x32bda3=[];return validateOuterMetadata(_0x532700,_0x32bda3),validateFlowClassification(_0x532700,_0x32bda3),validateGraph(_0x532700[_0x2997da(0x24e)],_0x32bda3),{'valid':_0x32bda3[_0x2997da(0x2ef)]===0x0,'errors':_0x32bda3,'warnings':_0x2001fe['warnings'],'normalized':_0x532700,'validationConfig':_0x2c131a};}function validateFlowClassification(_0x581e73,_0x5f4486){const _0x5778b3=a281_0x17c8d0;if(!isRecord(_0x581e73[_0x5778b3(0x24e)]))return;const _0x3bf2c1=_0x581e73[_0x5778b3(0x277)],_0x992942=_0x581e73[_0x5778b3(0x24e)][_0x5778b3(0x1f3)];_0x992942!==undefined&&(typeof _0x992942!==_0x5778b3(0x30c)||!FLOW_PAGE_MODES['has'](_0x992942))&&_0x5f4486[_0x5778b3(0x26f)]({'path':_0x5778b3(0x2b3),'message':'Unsupported\x20pageMode:\x20'+String(_0x992942)+'.'});_0x3bf2c1==='FORM_FLOW'&&_0x992942!==undefined&&_0x5f4486[_0x5778b3(0x26f)]({'path':_0x5778b3(0x2b3),'message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0x3bf2c1===_0x5778b3(0x230)&&_0x992942==='PLATFORM_FORM'&&_0x5f4486[_0x5778b3(0x26f)]({'path':_0x5778b3(0x2b3),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x3bf2c1===_0x5778b3(0x2d9)||_0x3bf2c1===_0x5778b3(0x230))&&validateCustomPageNavigation(_0x581e73,_0x3bf2c1,_0x992942,_0x5f4486);if(_0x3bf2c1!=='FORM_FLOW'||!Array[_0x5778b3(0x2b5)](_0x581e73[_0x5778b3(0x24e)][_0x5778b3(0x212)]))return;_0x581e73[_0x5778b3(0x24e)][_0x5778b3(0x212)]['forEach']((_0x39f1d1,_0x47042d)=>{const _0x30ac2a=_0x5778b3;isRecord(_0x39f1d1)&&_0x39f1d1[_0x30ac2a(0x2c1)]===_0x30ac2a(0x31b)&&_0x39f1d1[_0x30ac2a(0x296)]==='HANDLE'&&_0x5f4486[_0x30ac2a(0x26f)]({'path':'flowJson.nodes['+_0x47042d+_0x30ac2a(0x294),'message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x22f85d,_0x5cedfd,_0x4d0b39,_0x1877a5){const _0x3b7085=a281_0x17c8d0,_0x15c9ae=_0x22f85d[_0x3b7085(0x24e)]['startPageId'];_0x15c9ae!==undefined&&(!Number[_0x3b7085(0x322)](_0x15c9ae)||_0x15c9ae<=0x0)&&_0x1877a5[_0x3b7085(0x26f)]({'path':_0x3b7085(0x326),'message':_0x3b7085(0x2a8)});const _0x55d412=Array[_0x3b7085(0x2b5)](_0x22f85d['flowJson'][_0x3b7085(0x212)])?_0x22f85d[_0x3b7085(0x24e)][_0x3b7085(0x212)][_0x3b7085(0x24b)]((_0x168b39,_0x673e4d)=>({'node':_0x168b39,'index':_0x673e4d}))[_0x3b7085(0x204)](({node:_0x375f04})=>isRecord(_0x375f04)&&_0x375f04[_0x3b7085(0x232)]!==undefined):[],_0x65f4e=_0x15c9ae!==undefined||_0x55d412[_0x3b7085(0x2ef)]>0x0,_0x52e61d=_0x4d0b39===undefined&&_0x5cedfd===_0x3b7085(0x230)?_0x3b7085(0x2f8):_0x4d0b39;_0x65f4e&&(_0x5cedfd!==_0x3b7085(0x230)||_0x52e61d!==_0x3b7085(0x2f8))&&(_0x15c9ae!==undefined&&_0x1877a5[_0x3b7085(0x26f)]({'path':_0x3b7085(0x326),'message':'startPageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'}),_0x55d412[_0x3b7085(0x2e9)](({index:_0x563eb5})=>{const _0x5ca24b=_0x3b7085;_0x1877a5['push']({'path':_0x5ca24b(0x2f0)+_0x563eb5+_0x5ca24b(0x1ea),'message':_0x5ca24b(0x2bc)});}));}export async function writeNormalizedFlowConfig(_0x5e1060,_0x43efb0,_0x4898af={}){const _0x10f734=a281_0x17c8d0,_0x44b87b=resolve(_0x5e1060),_0x5436bc=_0x44b87b+'.'+process[_0x10f734(0x2e0)]+'.'+randomUUID()+_0x10f734(0x31d),_0x3ef070=JSON[_0x10f734(0x216)](_0x43efb0,null,0x2)+'\x0a';let _0x155c4d;try{try{_0x155c4d=(await stat(_0x44b87b))[_0x10f734(0x210)]&0x1ff;}catch{_0x155c4d=undefined;}await writeFile(_0x5436bc,_0x3ef070,{'encoding':_0x10f734(0x2a2),'flag':'wx','mode':_0x155c4d??0x1a4});if(_0x155c4d!==undefined)await chmod(_0x5436bc,_0x155c4d);_0x4898af['overwrite']===![]?(await link(_0x5436bc,_0x44b87b),await unlink(_0x5436bc)):await rename(_0x5436bc,_0x44b87b);}finally{await unlink(_0x5436bc)['catch'](()=>undefined);}}function validateOuterMetadata(_0x170e16,_0x306869){const _0x477b8d=a281_0x17c8d0;(typeof _0x170e16['flowName']!==_0x477b8d(0x30c)||_0x170e16[_0x477b8d(0x217)][_0x477b8d(0x253)]()==='')&&_0x306869[_0x477b8d(0x26f)]({'path':_0x477b8d(0x217),'message':_0x477b8d(0x257)});_0x170e16[_0x477b8d(0x2bd)]!==undefined&&typeof _0x170e16[_0x477b8d(0x2bd)]!==_0x477b8d(0x30c)&&_0x306869[_0x477b8d(0x26f)]({'path':'flowDesc','message':_0x477b8d(0x229)});if(_0x170e16[_0x477b8d(0x277)]===undefined||_0x170e16[_0x477b8d(0x277)]===null)_0x306869[_0x477b8d(0x26f)]({'path':'flowType','message':_0x477b8d(0x21a)});else(typeof _0x170e16[_0x477b8d(0x277)]!==_0x477b8d(0x30c)||!FLOW_TYPES['has'](_0x170e16[_0x477b8d(0x277)]))&&_0x306869['push']({'path':_0x477b8d(0x277),'message':_0x477b8d(0x2f7)+String(_0x170e16['flowType'])+'.'});_0x170e16[_0x477b8d(0x284)]!==undefined&&typeof _0x170e16[_0x477b8d(0x284)]!==_0x477b8d(0x30c)&&_0x306869[_0x477b8d(0x26f)]({'path':_0x477b8d(0x284),'message':_0x477b8d(0x2e4)}),_0x170e16[_0x477b8d(0x232)]!==undefined&&(!Number[_0x477b8d(0x259)](_0x170e16[_0x477b8d(0x232)])||_0x170e16[_0x477b8d(0x232)]<0x0)&&_0x306869[_0x477b8d(0x26f)]({'path':_0x477b8d(0x232),'message':'pageId\x20must\x20be\x20a\x20non-negative\x20integer.'}),_0x170e16[_0x477b8d(0x277)]===_0x477b8d(0x230)&&_0x170e16['datasetCode']!==undefined&&_0x306869[_0x477b8d(0x26f)]({'path':_0x477b8d(0x284),'message':_0x477b8d(0x316)}),_0x170e16['flowType']===_0x477b8d(0x230)&&_0x170e16['pageId']!==undefined&&_0x306869[_0x477b8d(0x26f)]({'path':_0x477b8d(0x232),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x49520d,_0x18fd5d){const _0x43110e=a281_0x17c8d0;if(!isRecord(_0x49520d)){_0x18fd5d[_0x43110e(0x26f)]({'path':_0x43110e(0x24e),'message':_0x43110e(0x307)});return;}!Array[_0x43110e(0x2b5)](_0x49520d[_0x43110e(0x212)])&&_0x18fd5d[_0x43110e(0x26f)]({'path':_0x43110e(0x327),'message':_0x43110e(0x2ec)});!Array['isArray'](_0x49520d[_0x43110e(0x24d)])&&_0x18fd5d[_0x43110e(0x26f)]({'path':_0x43110e(0x1e8),'message':_0x43110e(0x2df)});Object['prototype'][_0x43110e(0x328)][_0x43110e(0x265)](_0x49520d,_0x43110e(0x310))&&_0x18fd5d[_0x43110e(0x26f)]({'path':_0x43110e(0x28b),'message':'Unsupported\x20schemaVersion:\x20'+String(_0x49520d['schemaVersion'])+_0x43110e(0x23c)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x325474 of[_0x43110e(0x291),_0x43110e(0x2ea),_0x43110e(0x1e5)]){Object['prototype']['hasOwnProperty'][_0x43110e(0x265)](_0x49520d,_0x325474)&&_0x18fd5d[_0x43110e(0x26f)]({'path':_0x43110e(0x240)+_0x325474,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x43110e(0x2b5)](_0x49520d[_0x43110e(0x212)])||!Array['isArray'](_0x49520d[_0x43110e(0x24d)]))return;const _0x3ae5fb=new Map(),_0x31d1ba=[],_0x2f75d0=[],_0x4000c9=new Map(),_0x2a2ae7=new Map(),_0x3e9802=new Set();let _0x193ecd=0x0;_0x49520d[_0x43110e(0x212)][_0x43110e(0x2e9)]((_0x1a6b9e,_0x38dcef)=>{const _0x48d4ff=_0x43110e,_0x217366=_0x48d4ff(0x2f0)+_0x38dcef+']';if(!isRecord(_0x1a6b9e)){_0x18fd5d[_0x48d4ff(0x26f)]({'path':_0x217366,'message':_0x48d4ff(0x2c9)});return;}const _0xc1d2ad=_0x1a6b9e;if(typeof _0xc1d2ad['id']!==_0x48d4ff(0x30c)||!BPMN_ID_PATTERN[_0x48d4ff(0x2be)](_0xc1d2ad['id']))_0x18fd5d[_0x48d4ff(0x26f)]({'path':_0x217366+_0x48d4ff(0x1fe),'message':_0x48d4ff(0x1e4)});else _0x3ae5fb[_0x48d4ff(0x1dc)](_0xc1d2ad['id'])?_0x18fd5d['push']({'path':_0x217366+_0x48d4ff(0x1fe),'message':_0x48d4ff(0x295)+_0xc1d2ad['id']+'.'}):(_0x3ae5fb[_0x48d4ff(0x20b)](_0xc1d2ad['id'],_0xc1d2ad),_0x3e9802[_0x48d4ff(0x301)](_0xc1d2ad['id']));if(!NODE_TYPES[_0x48d4ff(0x1dc)](_0xc1d2ad[_0x48d4ff(0x2c1)]))_0x18fd5d[_0x48d4ff(0x26f)]({'path':_0x217366+_0x48d4ff(0x2ff),'message':_0x48d4ff(0x224)+String(_0xc1d2ad[_0x48d4ff(0x2c1)])+'.'});else{if(_0xc1d2ad['type']===_0x48d4ff(0x30f))_0x31d1ba['push'](_0xc1d2ad['id']);else _0xc1d2ad[_0x48d4ff(0x2c1)]===_0x48d4ff(0x1e6)&&_0x2f75d0[_0x48d4ff(0x26f)](_0xc1d2ad['id']);}_0xc1d2ad[_0x48d4ff(0x2c1)]===_0x48d4ff(0x31b)&&(_0xc1d2ad[_0x48d4ff(0x296)]===undefined||_0xc1d2ad[_0x48d4ff(0x296)]===_0x48d4ff(0x31b))&&(_0x193ecd+=0x1);validateNode(_0xc1d2ad,_0x217366,_0x18fd5d);if(_0xc1d2ad[_0x48d4ff(0x2c1)]===_0x48d4ff(0x2a9)){const _0x29122e=resolveEffectiveResultVariable(_0xc1d2ad[_0x48d4ff(0x252)],![]);_0x29122e&&(registerResultVariableOwner(_0x2a2ae7,_0x29122e,_0xc1d2ad['id'],_0x18fd5d),!_0x4000c9[_0x48d4ff(0x1dc)](_0x29122e)&&_0x4000c9['set'](_0x29122e,_0xc1d2ad['id']));}if(_0xc1d2ad['type']===_0x48d4ff(0x31b)&&isRecord(_0xc1d2ad[_0x48d4ff(0x20e)])&&_0xc1d2ad['timeout'][_0x48d4ff(0x1d6)]===!![]&&_0xc1d2ad[_0x48d4ff(0x20e)][_0x48d4ff(0x2f9)]===_0x48d4ff(0x2ba)){const _0x125182=resolveEffectiveResultVariable(_0xc1d2ad[_0x48d4ff(0x20e)][_0x48d4ff(0x252)],!![]);_0x125182&®isterResultVariableOwner(_0x2a2ae7,_0x125182,_0xc1d2ad['id']+'.timeout',_0x18fd5d);}});_0x31d1ba[_0x43110e(0x2ef)]!==0x1&&_0x18fd5d[_0x43110e(0x26f)]({'path':_0x43110e(0x327),'message':_0x43110e(0x1f1)});_0x2f75d0[_0x43110e(0x2ef)]===0x0&&_0x18fd5d['push']({'path':_0x43110e(0x327),'message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x420c87=new Map(),_0x376173=new Map(),_0x50c7c7=new Map(),_0x30a3a6=new Set();_0x49520d[_0x43110e(0x24d)][_0x43110e(0x2e9)]((_0x5d7ada,_0x455e11)=>{const _0x5626a5=_0x43110e,_0x2ed093=_0x5626a5(0x255)+_0x455e11+']';if(!isRecord(_0x5d7ada)){_0x18fd5d[_0x5626a5(0x26f)]({'path':_0x2ed093,'message':_0x5626a5(0x314)});return;}const _0x8edc88=_0x5d7ada;_0x50c7c7['set'](_0x8edc88,_0x2ed093);const _0x17b5f8=resolveEdgeEndpoint(_0x8edc88['source'],_0x8edc88[_0x5626a5(0x30e)]),_0xa150c3=resolveEdgeEndpoint(_0x8edc88[_0x5626a5(0x2ab)],_0x8edc88[_0x5626a5(0x201)]);if(!_0x17b5f8)_0x18fd5d[_0x5626a5(0x26f)]({'path':_0x2ed093+_0x5626a5(0x20f),'message':_0x5626a5(0x241)});if(!_0xa150c3)_0x18fd5d['push']({'path':_0x2ed093+'.target','message':_0x5626a5(0x202)});_0x17b5f8&&!_0x3ae5fb[_0x5626a5(0x1dc)](_0x17b5f8)&&_0x18fd5d[_0x5626a5(0x26f)]({'path':_0x2ed093+_0x5626a5(0x20f),'message':_0x5626a5(0x237)+_0x17b5f8+'.'});_0xa150c3&&!_0x3ae5fb[_0x5626a5(0x1dc)](_0xa150c3)&&_0x18fd5d[_0x5626a5(0x26f)]({'path':_0x2ed093+_0x5626a5(0x2f4),'message':'Edge\x20target\x20node\x20not\x20found:\x20'+_0xa150c3+'.'});if(_0x8edc88['id']!==undefined){if(typeof _0x8edc88['id']!==_0x5626a5(0x30c)||!BPMN_ID_PATTERN[_0x5626a5(0x2be)](_0x8edc88['id']))_0x18fd5d[_0x5626a5(0x26f)]({'path':_0x2ed093+'.id','message':_0x5626a5(0x2db)});else{if(_0x3e9802['has'](_0x8edc88['id']))_0x18fd5d[_0x5626a5(0x26f)]({'path':_0x2ed093+_0x5626a5(0x1fe),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x8edc88['id']+'.'});else!_0x3e9802['has'](_0x8edc88['id'])&&_0x3e9802[_0x5626a5(0x301)](_0x8edc88['id']);}}if(_0x17b5f8&&_0xa150c3){const _0x30f3ea=_0x17b5f8+'\x00'+_0xa150c3+'\x00'+(_0x8edc88[_0x5626a5(0x1f7)]??_0x5626a5(0x28a));_0x30a3a6[_0x5626a5(0x1dc)](_0x30f3ea)?_0x18fd5d['push']({'path':_0x2ed093,'message':_0x5626a5(0x324)+_0x17b5f8+'\x20->\x20'+_0xa150c3+'\x20('+(_0x8edc88[_0x5626a5(0x1f7)]??_0x5626a5(0x28a))+').'}):_0x30a3a6['add'](_0x30f3ea);}validateEdge(_0x8edc88,_0x2ed093,_0x18fd5d),_0x17b5f8&&_0xa150c3&&(_0x420c87[_0x5626a5(0x306)](_0x17b5f8)?.[_0x5626a5(0x26f)](_0x8edc88)??_0x420c87[_0x5626a5(0x20b)](_0x17b5f8,[_0x8edc88]),_0x376173[_0x5626a5(0x306)](_0xa150c3)?.['push'](_0x8edc88)??_0x376173[_0x5626a5(0x20b)](_0xa150c3,[_0x8edc88]));});if(_0x31d1ba['length']!==0x1)return;validateGraphShape(_0x3ae5fb,_0x31d1ba[0x0],_0x2f75d0,_0x420c87,_0x376173,_0x50c7c7,_0x18fd5d),validateScriptResultReferences(_0x3ae5fb,_0x31d1ba[0x0],_0x420c87,_0x376173,_0x50c7c7,_0x4000c9,_0x18fd5d),validateApprovalResults(_0x3ae5fb,_0x193ecd,_0x2f75d0,_0x18fd5d);}function validateNode(_0xa7bb77,_0x137a62,_0x551cb7){const _0x294546=a281_0x17c8d0;for(const _0x434c12 of[_0x294546(0x2b4),_0x294546(0x25c)]){Object[_0x294546(0x24a)][_0x294546(0x328)][_0x294546(0x265)](_0xa7bb77,_0x434c12)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+'.'+_0x434c12,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x294546(0x1dc)](_0xa7bb77[_0x294546(0x2c1)]))return;(typeof _0xa7bb77[_0x294546(0x28d)]!==_0x294546(0x30c)||_0xa7bb77[_0x294546(0x28d)][_0x294546(0x253)]()==='')&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x1db),'message':_0x294546(0x287)});if(_0xa7bb77['pageId']!==undefined){if(!Number[_0x294546(0x322)](_0xa7bb77[_0x294546(0x232)])||_0xa7bb77[_0x294546(0x232)]<=0x0)_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2aa),'message':_0x294546(0x2e1)});else _0xa7bb77[_0x294546(0x2c1)]!=='APPROVAL'&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2aa),'message':_0x294546(0x227)});}const _0x5d27af=_0xa7bb77[_0x294546(0x2ad)];if(!isRecord(_0x5d27af))_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2b6),'message':_0x294546(0x226)});else for(const _0xf18d72 of['x','y']){const _0x33bd67=_0x5d27af[_0xf18d72];(typeof _0x33bd67!==_0x294546(0x246)||!Number[_0x294546(0x236)](_0x33bd67)||_0x33bd67<0x0)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x261)+_0xf18d72,'message':_0x294546(0x251)+_0xf18d72+_0x294546(0x243)});}if(_0xa7bb77[_0x294546(0x2c1)]===_0x294546(0x31b)){const _0x324693=_0xa7bb77['approvalMode']??_0x294546(0x279),_0x8a9c14=_0xa7bb77['taskMode']??'APPROVAL';!APPROVAL_TASK_MODES[_0x294546(0x1dc)](_0x8a9c14)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+'.taskMode','message':_0x294546(0x22b)+String(_0x8a9c14)+'.'});!APPROVAL_MODES[_0x294546(0x1dc)](_0x324693)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2a7),'message':'Unsupported\x20approval\x20mode:\x20'+String(_0x324693)+'.'});if(!isRecord(_0xa7bb77[_0x294546(0x2ed)]))_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2de),'message':_0x294546(0x28f)});else{const _0x50b931=_0xa7bb77[_0x294546(0x2ed)][_0x294546(0x1da)];_0x50b931!==_0x294546(0x320)&&_0x50b931!==_0x294546(0x315)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x1de),'message':_0x294546(0x234)});if(_0x50b931===_0x294546(0x320)){const _0x40d870=_0xa7bb77[_0x294546(0x2ed)]['userIds'];if(!Array[_0x294546(0x2b5)](_0x40d870)||_0x40d870[_0x294546(0x2ef)]===0x0)_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x317),'message':_0x294546(0x1dd)});else{const _0x1b6f55=_0x40d870['findIndex'](_0x530326=>!isValidUserId(_0x530326));_0x1b6f55>=0x0&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+'.assignee.userIds['+_0x1b6f55+']','message':_0x294546(0x22a)});const _0x277fad=new Set(_0x40d870[_0x294546(0x204)](isValidUserId)[_0x294546(0x24b)](_0x141067=>String(_0x141067)['trim']()));_0x324693===_0x294546(0x279)&&_0x277fad['size']>0x1&&_0x551cb7['push']({'path':_0x137a62+_0x294546(0x317),'message':_0x294546(0x200)});}}if(_0x50b931==='ROLE'){const _0x3012a6=_0xa7bb77[_0x294546(0x2ed)]['roleId'],_0x383583=typeof _0x3012a6==='number'||typeof _0x3012a6===_0x294546(0x30c)?Number(String(_0x3012a6)[_0x294546(0x253)]()):Number[_0x294546(0x305)];(!Number['isSafeInteger'](_0x383583)||_0x383583<=0x0)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2e8),'message':'ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.'});}}if(_0xa7bb77['transferCandidates']!==undefined){if(!isRecord(_0xa7bb77[_0x294546(0x25b)]))_0x551cb7['push']({'path':_0x137a62+_0x294546(0x270),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0xa7bb77[_0x294546(0x25b)][_0x294546(0x1da)]!=='FIXED')_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x1d1),'message':_0x294546(0x1ed)});else{const _0x3b0f9e=_0xa7bb77[_0x294546(0x25b)][_0x294546(0x2b9)];if(!Array['isArray'](_0x3b0f9e)||_0x3b0f9e[_0x294546(0x2ef)]===0x0)_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+'.transferCandidates.userIds','message':_0x294546(0x2c6)});else{const _0x4a2b16=_0x3b0f9e[_0x294546(0x24c)](_0x166735=>!isValidUserId(_0x166735));_0x4a2b16>=0x0&&_0x551cb7['push']({'path':_0x137a62+'.transferCandidates.userIds['+_0x4a2b16+']','message':_0x294546(0x2b1)});}}}}}_0xa7bb77['sequential']!==undefined&&typeof _0xa7bb77[_0x294546(0x29c)]!==_0x294546(0x228)&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+_0x294546(0x2c3),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0xa7bb77[_0x294546(0x2c1)]===_0x294546(0x2a9)){(typeof _0xa7bb77[_0x294546(0x289)]!==_0x294546(0x30c)||_0xa7bb77['scriptName'][_0x294546(0x253)]()==='')&&_0x551cb7[_0x294546(0x26f)]({'path':_0x137a62+'.scriptName','message':_0x294546(0x1f0)});if(_0xa7bb77[_0x294546(0x252)]!==undefined){if(typeof _0xa7bb77[_0x294546(0x252)]!==_0x294546(0x30c)||!VARIABLE_PATTERN[_0x294546(0x2be)](_0xa7bb77[_0x294546(0x252)]))_0x551cb7['push']({'path':_0x137a62+_0x294546(0x21d),'message':_0x294546(0x214)});else(RESERVED_RESULT_VARIABLES[_0x294546(0x1dc)](_0xa7bb77[_0x294546(0x252)])||_0xa7bb77[_0x294546(0x252)][_0x294546(0x25d)](_0x294546(0x2c5)))&&_0x551cb7['push']({'path':_0x137a62+_0x294546(0x21d),'message':_0x294546(0x1d3)+_0xa7bb77[_0x294546(0x252)]+'.'});}}validateAsyncExecution(_0xa7bb77,_0x137a62,_0x551cb7),validateApprovalTimeout(_0xa7bb77,_0x137a62,_0x551cb7),validateCcConfig(_0xa7bb77,_0x137a62,_0x551cb7),_0xa7bb77[_0x294546(0x2c1)]===_0x294546(0x1cc)&&validateNotificationConfig(_0xa7bb77[_0x294546(0x2cf)],_0x137a62+_0x294546(0x207),_0x551cb7);}function validateAsyncExecution(_0x1fd4e8,_0x19da76,_0x5c9067){const _0x54a554=a281_0x17c8d0;if(_0x1fd4e8[_0x54a554(0x23d)]===undefined)return;if(!isRecord(_0x1fd4e8[_0x54a554(0x23d)])){_0x5c9067[_0x54a554(0x26f)]({'path':_0x19da76+'.async','message':'async\x20must\x20be\x20an\x20object.'});return;}if(_0x1fd4e8[_0x54a554(0x23d)][_0x54a554(0x1d6)]!==undefined&&typeof _0x1fd4e8[_0x54a554(0x23d)]['enabled']!==_0x54a554(0x228)){_0x5c9067['push']({'path':_0x19da76+'.async.enabled','message':_0x54a554(0x2cb)});return;}if(_0x1fd4e8['async'][_0x54a554(0x1d6)]!==!![])return;_0x1fd4e8['type']!==_0x54a554(0x2a9)&&_0x5c9067[_0x54a554(0x26f)]({'path':_0x19da76+_0x54a554(0x1d2),'message':_0x54a554(0x254)});const _0x5559ed=_0x1fd4e8[_0x54a554(0x23d)][_0x54a554(0x2f2)]??0x3;(!Number[_0x54a554(0x259)](_0x5559ed)||_0x5559ed<0x1||_0x5559ed>MAX_ASYNC_RETRY_COUNT)&&_0x5c9067[_0x54a554(0x26f)]({'path':_0x19da76+_0x54a554(0x209),'message':_0x54a554(0x2d5)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x1fd4e8[_0x54a554(0x23d)][_0x54a554(0x2f5)]!==undefined&&validateTimeAmount(_0x1fd4e8[_0x54a554(0x23d)][_0x54a554(0x2f5)],_0x19da76+_0x54a554(0x275),_0x5c9067);}function validateApprovalTimeout(_0x1c6917,_0x2f1910,_0x438ed9){const _0x555c0e=a281_0x17c8d0;if(_0x1c6917[_0x555c0e(0x20e)]===undefined)return;if(!isRecord(_0x1c6917[_0x555c0e(0x20e)])){_0x438ed9[_0x555c0e(0x26f)]({'path':_0x2f1910+_0x555c0e(0x2d1),'message':_0x555c0e(0x2fe)});return;}if(_0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x1d6)]!==undefined&&typeof _0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x1d6)]!==_0x555c0e(0x228)){_0x438ed9[_0x555c0e(0x26f)]({'path':_0x2f1910+_0x555c0e(0x1cd),'message':_0x555c0e(0x2d3)});return;}if(_0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x1d6)]!==!![])return;if(_0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x2d4)]!==undefined&&typeof _0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x2d4)]!==_0x555c0e(0x228)){_0x438ed9['push']({'path':_0x2f1910+_0x555c0e(0x1f4),'message':_0x555c0e(0x309)});return;}_0x1c6917[_0x555c0e(0x2c1)]!==_0x555c0e(0x31b)&&_0x438ed9[_0x555c0e(0x26f)]({'path':_0x2f1910+_0x555c0e(0x2d1),'message':_0x555c0e(0x2c7)});validateTimeAmount(_0x1c6917['timeout'][_0x555c0e(0x25a)],_0x2f1910+_0x555c0e(0x23b),_0x438ed9);const _0x4180e6=_0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x2f9)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x4180e6)){_0x438ed9['push']({'path':_0x2f1910+'.timeout.action','message':_0x555c0e(0x2bf)});return;}(_0x1c6917['taskMode']??_0x555c0e(0x31b))===_0x555c0e(0x299)&&_0x4180e6!==_0x555c0e(0x2ba)&&_0x438ed9[_0x555c0e(0x26f)]({'path':_0x2f1910+_0x555c0e(0x30d),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x4f5ba5=_0x1c6917[_0x555c0e(0x20e)]['interrupting']??_0x4180e6!=='EXECUTE_BFF';if(_0x4180e6==='EXECUTE_BFF')_0x4f5ba5&&_0x438ed9[_0x555c0e(0x26f)]({'path':_0x2f1910+_0x555c0e(0x1f4),'message':_0x555c0e(0x2cd)}),(typeof _0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x289)]!=='string'||_0x1c6917[_0x555c0e(0x20e)][_0x555c0e(0x289)][_0x555c0e(0x253)]()==='')&&_0x438ed9[_0x555c0e(0x26f)]({'path':_0x2f1910+_0x555c0e(0x303),'message':_0x555c0e(0x2a0)}),validateOptionalResultVariable(_0x1c6917['timeout'][_0x555c0e(0x252)],_0x2f1910+_0x555c0e(0x2ac),_0x438ed9);else!_0x4f5ba5&&_0x438ed9['push']({'path':_0x2f1910+_0x555c0e(0x1f4),'message':_0x4180e6+_0x555c0e(0x267)});}function validateTimeAmount(_0x1e1917,_0x294e78,_0xcbc961){const _0x354bea=a281_0x17c8d0;if(!isRecord(_0x1e1917)){_0xcbc961[_0x354bea(0x26f)]({'path':_0x294e78,'message':_0x354bea(0x247)});return;}(!Number[_0x354bea(0x259)](_0x1e1917[_0x354bea(0x205)])||Number(_0x1e1917[_0x354bea(0x205)])<=0x0)&&_0xcbc961[_0x354bea(0x26f)]({'path':_0x294e78+'.value','message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS['has'](_0x1e1917[_0x354bea(0x22e)])&&_0xcbc961[_0x354bea(0x26f)]({'path':_0x294e78+_0x354bea(0x2e6),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x15012b,_0xd0c448,_0x3a96cf){const _0x3a4311=a281_0x17c8d0;if(_0x15012b===undefined||_0x15012b===null||_0x15012b==='')return;if(typeof _0x15012b!==_0x3a4311(0x30c)||!VARIABLE_PATTERN['test'](_0x15012b))_0x3a96cf['push']({'path':_0xd0c448,'message':_0x3a4311(0x214)});else(RESERVED_RESULT_VARIABLES[_0x3a4311(0x1dc)](_0x15012b)||_0x15012b[_0x3a4311(0x25d)](_0x3a4311(0x2c5)))&&_0x3a96cf[_0x3a4311(0x26f)]({'path':_0xd0c448,'message':'Reserved\x20resultVariable:\x20'+_0x15012b+'.'});}function validateCcConfig(_0x696d8e,_0x54d273,_0x5a685a){const _0x1ada58=a281_0x17c8d0;if(_0x696d8e['cc']===undefined)return;if(!isRecord(_0x696d8e['cc'])){_0x5a685a[_0x1ada58(0x26f)]({'path':_0x54d273+_0x1ada58(0x298),'message':_0x1ada58(0x249)});return;}_0x696d8e[_0x1ada58(0x2c1)]!=='END'&&_0x696d8e['type']!==_0x1ada58(0x31b)&&_0x5a685a[_0x1ada58(0x26f)]({'path':_0x54d273+_0x1ada58(0x298),'message':_0x1ada58(0x1cf)});Object['prototype'][_0x1ada58(0x328)][_0x1ada58(0x265)](_0x696d8e['cc'],_0x1ada58(0x286))&&_0x5a685a[_0x1ada58(0x26f)]({'path':_0x54d273+_0x1ada58(0x290),'message':UNSUPPORTED_FORM_MESSAGE});const _0x198879=_0x696d8e['cc']['recipientUserIds'];if(!Array['isArray'](_0x198879)||_0x198879[_0x1ada58(0x2ef)]===0x0)_0x5a685a[_0x1ada58(0x26f)]({'path':_0x54d273+_0x1ada58(0x1f6),'message':_0x1ada58(0x1fb)});else{_0x198879[_0x1ada58(0x2ef)]>MAX_CC_RECIPIENTS&&_0x5a685a[_0x1ada58(0x26f)]({'path':_0x54d273+_0x1ada58(0x1f6),'message':'cc.recipientUserIds\x20supports\x20at\x20most\x20'+MAX_CC_RECIPIENTS+_0x1ada58(0x1d7)});const _0x358d8c=new Set();_0x198879['forEach']((_0x44e57d,_0x531a81)=>{const _0x195fa1=_0x1ada58;if(typeof _0x44e57d!=='string'||_0x44e57d[_0x195fa1(0x253)]()==='')_0x5a685a[_0x195fa1(0x26f)]({'path':_0x54d273+_0x195fa1(0x2a1)+_0x531a81+']','message':_0x195fa1(0x1ec)});else _0x358d8c['has'](_0x44e57d[_0x195fa1(0x253)]())?_0x5a685a[_0x195fa1(0x26f)]({'path':_0x54d273+_0x195fa1(0x2a1)+_0x531a81+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x44e57d[_0x195fa1(0x253)]()+'.'}):_0x358d8c[_0x195fa1(0x301)](_0x44e57d[_0x195fa1(0x253)]());});}validateStringArray(_0x696d8e['cc'][_0x1ada58(0x220)],_0x54d273+_0x1ada58(0x22c),_0x5a685a);}function validateStringArray(_0x486ab0,_0x26b630,_0x2506b6){const _0x90ef61=a281_0x17c8d0;if(_0x486ab0===undefined)return;if(!Array[_0x90ef61(0x2b5)](_0x486ab0)){_0x2506b6[_0x90ef61(0x26f)]({'path':_0x26b630,'message':_0x90ef61(0x1d0)});return;}const _0x5116c2=new Set();_0x486ab0[_0x90ef61(0x2e9)]((_0x298b0b,_0x33a115)=>{const _0x2a2dd0=_0x90ef61;if(typeof _0x298b0b!==_0x2a2dd0(0x30c)||_0x298b0b[_0x2a2dd0(0x253)]()==='')_0x2506b6[_0x2a2dd0(0x26f)]({'path':_0x26b630+'['+_0x33a115+']','message':_0x2a2dd0(0x266)});else _0x5116c2[_0x2a2dd0(0x1dc)](_0x298b0b[_0x2a2dd0(0x253)]())?_0x2506b6['push']({'path':_0x26b630+'['+_0x33a115+']','message':_0x2a2dd0(0x1e1)+_0x298b0b['trim']()+'.'}):_0x5116c2['add'](_0x298b0b[_0x2a2dd0(0x253)]());});}function validateNotificationConfig(_0x1da4b8,_0xfcc891,_0x50328a){const _0x2d8cb0=a281_0x17c8d0;if(!isRecord(_0x1da4b8)){_0x50328a['push']({'path':_0xfcc891,'message':_0x2d8cb0(0x1ff)});return;}if(_0x1da4b8[_0x2d8cb0(0x27c)]!==undefined&&_0x1da4b8['version']!==null){if(typeof _0x1da4b8[_0x2d8cb0(0x27c)]!==_0x2d8cb0(0x30c))_0x50328a['push']({'path':_0xfcc891+'.version','message':_0x2d8cb0(0x2da)});else _0x1da4b8[_0x2d8cb0(0x27c)][_0x2d8cb0(0x253)]()&&_0x1da4b8['version'][_0x2d8cb0(0x253)]()!=='v1'&&_0x50328a[_0x2d8cb0(0x26f)]({'path':_0xfcc891+'.version','message':_0x2d8cb0(0x31f)+_0x1da4b8[_0x2d8cb0(0x27c)]+'.'});}const _0x567f59=requireNotificationString(_0x1da4b8['configCode'],_0xfcc891+_0x2d8cb0(0x23a),_0x2d8cb0(0x28c),_0x50328a);_0x567f59?.['includes']('${')&&_0x50328a[_0x2d8cb0(0x26f)]({'path':_0xfcc891+_0x2d8cb0(0x23a),'message':_0x2d8cb0(0x242)});if(_0x1da4b8[_0x2d8cb0(0x2e5)]!==undefined&&_0x1da4b8['failurePolicy']!==null){if(typeof _0x1da4b8['failurePolicy']!==_0x2d8cb0(0x30c))_0x50328a[_0x2d8cb0(0x26f)]({'path':_0xfcc891+_0x2d8cb0(0x26b),'message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x2d8cb0(0x1dc)](_0x1da4b8[_0x2d8cb0(0x2e5)]['trim']()[_0x2d8cb0(0x1fa)]())&&_0x50328a['push']({'path':_0xfcc891+_0x2d8cb0(0x26b),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x1da4b8[_0x2d8cb0(0x311)])?_0x50328a['push']({'path':_0xfcc891+_0x2d8cb0(0x25f),'message':_0x2d8cb0(0x245)}):validateNotificationTemplate(_0x1da4b8['template'],_0xfcc891+'.template',_0x50328a),validateNotificationRecipients(_0x1da4b8[_0x2d8cb0(0x23f)],_0xfcc891+'.recipients',_0x50328a);}function validateNotificationTemplate(_0x2ef6b5,_0x236f5e,_0x235837){const _0x44efd2=a281_0x17c8d0;for(const _0x5ab6ac of[_0x44efd2(0x293),_0x44efd2(0x264)]){const _0x3414e2=requireNotificationString(_0x2ef6b5[_0x5ab6ac],_0x236f5e+'.'+_0x5ab6ac,_0x44efd2(0x1ce)+_0x5ab6ac+_0x44efd2(0x278),_0x235837);if(_0x3414e2)validateNotificationPlaceholders(_0x3414e2,_0x236f5e+'.'+_0x5ab6ac,_0x235837);}_0x2ef6b5['detailMarkdown']!==undefined&&_0x2ef6b5[_0x44efd2(0x2b2)]!==null&&(typeof _0x2ef6b5[_0x44efd2(0x2b2)]!==_0x44efd2(0x30c)?_0x235837[_0x44efd2(0x26f)]({'path':_0x236f5e+'.detailMarkdown','message':_0x44efd2(0x248)}):validateNotificationPlaceholders(_0x2ef6b5[_0x44efd2(0x2b2)],_0x236f5e+_0x44efd2(0x26d),_0x235837)),validateNotificationFacts(_0x2ef6b5['facts'],_0x236f5e+'.facts',_0x235837),validateNotificationActions(_0x2ef6b5[_0x44efd2(0x321)],_0x236f5e+_0x44efd2(0x2a5),_0x235837);}function validateNotificationFacts(_0x3d6cef,_0x27f754,_0xd6eb67){const _0x3955ed=a281_0x17c8d0;if(_0x3d6cef===undefined||_0x3d6cef===null)return;if(!Array[_0x3955ed(0x2b5)](_0x3d6cef)){_0xd6eb67['push']({'path':_0x27f754,'message':_0x3955ed(0x297)});return;}_0x3d6cef[_0x3955ed(0x2ef)]>MAX_NOTIFICATION_FACTS&&_0xd6eb67['push']({'path':_0x27f754,'message':_0x3955ed(0x1e3)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x3d6cef[_0x3955ed(0x2e9)]((_0x2c6deb,_0x5b8dc4)=>{const _0x32a25b=_0x3955ed,_0x2f9de3=_0x27f754+'['+_0x5b8dc4+']';if(!isRecord(_0x2c6deb)){_0xd6eb67[_0x32a25b(0x26f)]({'path':_0x2f9de3,'message':_0x32a25b(0x25e)});return;}for(const _0x275594 of[_0x32a25b(0x1d9),'value']){const _0x45ad48=requireNotificationString(_0x2c6deb[_0x275594],_0x2f9de3+'.'+_0x275594,'Notification\x20fact.'+_0x275594+'\x20is\x20required.',_0xd6eb67);_0x45ad48&&validateNotificationPlaceholders(_0x45ad48,_0x2f9de3+'.'+_0x275594,_0xd6eb67);}});}function validateNotificationActions(_0x51b80c,_0x1d2423,_0xc407e3){const _0x3496c4=a281_0x17c8d0;if(_0x51b80c===undefined||_0x51b80c===null)return;if(!Array[_0x3496c4(0x2b5)](_0x51b80c)){_0xc407e3['push']({'path':_0x1d2423,'message':_0x3496c4(0x1cb)});return;}_0x51b80c['length']>MAX_NOTIFICATION_ACTIONS&&_0xc407e3['push']({'path':_0x1d2423,'message':_0x3496c4(0x1e3)+MAX_NOTIFICATION_ACTIONS+_0x3496c4(0x239)}),_0x51b80c[_0x3496c4(0x2e9)]((_0x56720d,_0x17ff35)=>{const _0x18e76f=_0x3496c4,_0x4b26a1=_0x1d2423+'['+_0x17ff35+']';if(!isRecord(_0x56720d)){_0xc407e3[_0x18e76f(0x26f)]({'path':_0x4b26a1,'message':_0x18e76f(0x2d8)});return;}const _0xffa3a4=requireNotificationString(_0x56720d['text'],_0x4b26a1+'.text',_0x18e76f(0x1e2),_0xc407e3);if(_0xffa3a4)validateNotificationPlaceholders(_0xffa3a4,_0x4b26a1+'.text',_0xc407e3);const _0x3d160c=requireNotificationString(_0x56720d[_0x18e76f(0x2ce)],_0x4b26a1+'.url',_0x18e76f(0x312),_0xc407e3);if(!_0x3d160c)return;validateNotificationPlaceholders(_0x3d160c,_0x4b26a1+_0x18e76f(0x29f),_0xc407e3),!/^https?:\/\//i[_0x18e76f(0x2be)](_0x3d160c)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x18e76f(0x2be)](_0x3d160c)&&_0xc407e3['push']({'path':_0x4b26a1+'.url','message':_0x18e76f(0x2e2)});});}function validateNotificationRecipients(_0xde3dc9,_0x5393f,_0x38be5f){const _0x52750c=a281_0x17c8d0;if(_0xde3dc9===undefined||_0xde3dc9===null)return;if(!Array['isArray'](_0xde3dc9)){_0x38be5f[_0x52750c(0x26f)]({'path':_0x5393f,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x1b5efd=![];_0xde3dc9[_0x52750c(0x2e9)]((_0x276f30,_0x34cb4e)=>{const _0x479d03=_0x52750c,_0x312090=_0x5393f+'['+_0x34cb4e+']';if(!isRecord(_0x276f30)){_0x38be5f[_0x479d03(0x26f)]({'path':_0x312090,'message':'Notification\x20recipient\x20must\x20be\x20an\x20object.'});return;}const _0x41730f=requireNotificationString(_0x276f30[_0x479d03(0x2c1)],_0x312090+_0x479d03(0x2ff),_0x479d03(0x292),_0x38be5f);_0x41730f&&!NOTIFICATION_RECIPIENT_TYPES[_0x479d03(0x1dc)](_0x41730f[_0x479d03(0x1fa)]())&&_0x38be5f[_0x479d03(0x26f)]({'path':_0x312090+_0x479d03(0x2ff),'message':_0x479d03(0x31e)});let _0xadaf86='TO';_0x276f30[_0x479d03(0x1fc)]!==undefined&&_0x276f30[_0x479d03(0x1fc)]!==null&&(typeof _0x276f30[_0x479d03(0x1fc)]!==_0x479d03(0x30c)?(_0x38be5f[_0x479d03(0x26f)]({'path':_0x312090+_0x479d03(0x213),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0xadaf86=''):(_0xadaf86=_0x276f30['role']['trim']()[_0x479d03(0x1fa)](),!NOTIFICATION_RECIPIENT_ROLES[_0x479d03(0x1dc)](_0xadaf86)&&_0x38be5f[_0x479d03(0x26f)]({'path':_0x312090+'.role','message':_0x479d03(0x29a)})));if(_0xadaf86==='TO')_0x1b5efd=!![];const _0x86c5df=requireNotificationString(_0x276f30[_0x479d03(0x205)],_0x312090+_0x479d03(0x26c),_0x479d03(0x235),_0x38be5f);_0x86c5df&&validateNotificationPlaceholders(_0x86c5df,_0x312090+_0x479d03(0x26c),_0x38be5f);}),_0xde3dc9[_0x52750c(0x2ef)]>0x0&&!_0x1b5efd&&_0x38be5f['push']({'path':_0x5393f,'message':_0x52750c(0x283)});}function requireNotificationString(_0x49a298,_0x38b3bf,_0x3e49bb,_0x1f78ea){const _0x219944=a281_0x17c8d0;if(typeof _0x49a298!==_0x219944(0x30c)||_0x49a298[_0x219944(0x253)]()==='')return _0x1f78ea[_0x219944(0x26f)]({'path':_0x38b3bf,'message':_0x3e49bb}),undefined;return _0x49a298[_0x219944(0x253)]();}function validateNotificationPlaceholders(_0x4d2951,_0x52a34c,_0x51e3df){const _0x292254=a281_0x17c8d0;for(const _0x568b6e of _0x4d2951['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x3d1a46=_0x568b6e[0x1]?.['trim']()??'',_0x313106=_0x3d1a46[_0x292254(0x206)]('.'),_0x55fc32=_0x313106>=0x0?_0x3d1a46[_0x292254(0x2b8)](0x0,_0x313106):_0x3d1a46,_0x2a097c=_0x313106>=0x0?_0x3d1a46['slice'](_0x313106+0x1)['trim']():'';(![_0x292254(0x319),_0x292254(0x1ef),'variables'][_0x292254(0x2c8)](_0x55fc32)||_0x2a097c==='')&&_0x51e3df[_0x292254(0x26f)]({'path':_0x52a34c,'message':_0x292254(0x2c0)+_0x568b6e[0x0]+'.'});}_0x4d2951[_0x292254(0x2d7)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x51e3df[_0x292254(0x26f)]({'path':_0x52a34c,'message':_0x292254(0x2e3)});}function validateEdge(_0x4f68d6,_0x3bb1a1,_0x1b07fc){const _0x59550b=a281_0x17c8d0;_0x4f68d6[_0x59550b(0x28d)]!==undefined&&typeof _0x4f68d6['name']!==_0x59550b(0x30c)&&_0x1b07fc[_0x59550b(0x26f)]({'path':_0x3bb1a1+_0x59550b(0x1db),'message':_0x59550b(0x250)}),_0x4f68d6['defaultFlow']!==undefined&&typeof _0x4f68d6['defaultFlow']!=='boolean'&&_0x1b07fc[_0x59550b(0x26f)]({'path':_0x3bb1a1+_0x59550b(0x285),'message':_0x59550b(0x21c)}),_0x4f68d6[_0x59550b(0x280)]!==undefined&&(!Array[_0x59550b(0x2b5)](_0x4f68d6[_0x59550b(0x280)])?_0x1b07fc[_0x59550b(0x26f)]({'path':_0x3bb1a1+_0x59550b(0x27b),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x4f68d6[_0x59550b(0x280)]['forEach']((_0x422a07,_0x39192e)=>{const _0x2144f8=_0x59550b;if(!isRecord(_0x422a07)){_0x1b07fc[_0x2144f8(0x26f)]({'path':_0x3bb1a1+'.waypoints['+_0x39192e+']','message':_0x2144f8(0x30a)});return;}for(const _0x52ee02 of['x','y']){const _0x101141=_0x422a07[_0x52ee02];(typeof _0x101141!==_0x2144f8(0x246)||!Number[_0x2144f8(0x236)](_0x101141))&&_0x1b07fc[_0x2144f8(0x26f)]({'path':_0x3bb1a1+'.waypoints['+_0x39192e+'].'+_0x52ee02,'message':_0x2144f8(0x1ca)+_0x52ee02+_0x2144f8(0x300)});}})),_0x4f68d6[_0x59550b(0x1f7)]!==undefined&&!CONDITION_TYPES[_0x59550b(0x1dc)](_0x4f68d6[_0x59550b(0x1f7)])&&_0x1b07fc[_0x59550b(0x26f)]({'path':_0x3bb1a1+_0x59550b(0x27d),'message':_0x59550b(0x1e0)+String(_0x4f68d6[_0x59550b(0x1f7)])+'.'}),_0x4f68d6[_0x59550b(0x1f7)]===_0x59550b(0x22f)&&(typeof _0x4f68d6['expression']!==_0x59550b(0x30c)||_0x4f68d6['expression'][_0x59550b(0x253)]()==='')&&_0x1b07fc[_0x59550b(0x26f)]({'path':_0x3bb1a1+_0x59550b(0x2c2),'message':_0x59550b(0x318)}),_0x4f68d6[_0x59550b(0x21f)]===!![]&&_0x4f68d6['conditionType']!=='ALWAYS'&&_0x1b07fc['push']({'path':_0x3bb1a1+_0x59550b(0x285),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x4f68d6[_0x59550b(0x21f)]===!![]&&typeof _0x4f68d6[_0x59550b(0x1f9)]===_0x59550b(0x30c)&&_0x4f68d6[_0x59550b(0x1f9)]['trim']()!==''&&_0x1b07fc['push']({'path':_0x3bb1a1+_0x59550b(0x2c2),'message':_0x59550b(0x2b7)});}function a281_0x5028(){const _0x529848=['value','indexOf','.config','AUTO_APPROVE','.async.retryCount','configCode','set','approval_sys_processInstanceId','APPROVED','timeout','.source','mode','approval_sys_initiatorUserId','nodes','.role','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','some','stringify','flowName','DAYS','(?<![A-Za-z0-9_])','flowType\x20is\x20required.','formData','defaultFlow\x20must\x20be\x20a\x20boolean.','.resultVariable','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','defaultFlow','visible','CONDITION','Node\x20has\x20no\x20incoming\x20edge.','flowJson.nodes.','Unsupported\x20node\x20type:\x20','Duplicate\x20resultVariable:\x20','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','node\x20pageId\x20is\x20supported\x20only\x20on\x20APPROVAL\x20user\x20tasks.','boolean','flowDesc\x20must\x20be\x20a\x20string.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','Unsupported\x20task\x20mode:\x20','.cc.visible','1041908helcBS','unit','EXPRESSION','INDEPENDENT_FLOW','Node\x20cannot\x20reach\x20any\x20END.','pageId','114VdxHcA','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','Notification\x20recipient.value\x20is\x20required.','isFinite','Edge\x20source\x20node\x20not\x20found:\x20','approval_sys_appCode','\x20actions.','.configCode','.timeout.duration','.\x20This\x20CLI\x20supports\x20only\x20','async','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','recipients','flowJson.','edge\x20source\x20is\x20required.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','size','NOTIFICATION\x20node\x20requires\x20template.','number','duration\x20requires\x20value\x20and\x20unit.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','cc\x20must\x20be\x20an\x20object.','prototype','map','findIndex','edges','flowJson','__rabetbase_local_validation__','edge\x20name\x20must\x20be\x20a\x20string.','position.','resultVariable','trim','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','flowJson.edges[','Expression\x20references\x20SCRIPT\x20resultVariable\x20','flowName\x20is\x20required.','^[A-Za-z_][A-Za-z0-9_]*$','isInteger','duration','transferCandidates','formPermission','startsWith','Notification\x20fact\x20must\x20be\x20an\x20object.','.template','469040YBUGQU','.position.','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','SECONDS','summary','call','value\x20must\x20be\x20a\x20non-empty\x20string.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','PLATFORM_FORM','9066990sOKyND','.failurePolicy','.value','.detailMarkdown','(?![A-Za-z0-9_])','push','.transferCandidates','ALL','#/$defs/timeAmount','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','HOURS','.async.retryInterval','Node\x20is\x20not\x20reachable\x20from\x20START.','flowType','\x20is\x20required.','SINGLE','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','.waypoints','version','.conditionType','\x20was\x20empty\x20and\x20was\x20removed.','approval_sys_initiatorUsername','waypoints','approval_sys_operationType','scriptResult','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','datasetCode','.defaultFlow','readSources','Every\x20node\x20requires\x20a\x20non-empty\x20name.','Rabetbase\x20FlowConfig','scriptName','ALWAYS','flowJson.schemaVersion','Notification\x20configCode\x20is\x20required.','name','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','APPROVAL\x20node\x20requires\x20assignee.','.cc.readSources','formSchema','Notification\x20recipient.type\x20is\x20required.','title','].taskMode','Duplicate\x20node\x20id:\x20','taskMode','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.cc','HANDLE','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','legacy_field_removed','sequential','#/$defs/userId','9rIEwCC','.url','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','.cc.recipientUserIds[','utf8','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','approval.simple-flow.v1','.actions','bindDatasetCode','.approvalMode','startPageId\x20must\x20be\x20a\x20positive\x20integer.','SCRIPT','.pageId','target','.timeout.resultVariable','position','CONTINUE','Node\x20has\x20no\x20outgoing\x20edge.','ANY','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','detailMarkdown','flowJson.pageMode','form','isArray','.position','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','slice','userIds','EXECUTE_BFF','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','node\x20pageId\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','flowDesc','test','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','Unsupported\x20notification\x20placeholder:\x20','type','.expression','.sequential','entries','approval_sys_','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','includes','node\x20must\x20be\x20an\x20object.','60675SYDUcL','async.enabled\x20must\x20be\x20a\x20boolean.','REJECTED','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','url','config','metadata','.timeout','1729449yTJnHR','timeout.enabled\x20must\x20be\x20a\x20boolean.','interrupting','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','#/$defs/position','replace','Notification\x20action\x20must\x20be\x20an\x20object.','FORM_FLOW','Notification\x20version\x20must\x20be\x20a\x20string.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','flowKey','integer','.assignee','edges\x20must\x20be\x20an\x20array.','pid','node\x20pageId\x20must\x20be\x20a\x20positive\x20integer.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','datasetCode\x20must\x20be\x20a\x20string.','failurePolicy','.unit','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','.assignee.roleId','forEach','formDefinitions','approval_sys_pageId','nodes\x20must\x20be\x20an\x20array.','assignee','approval_sys_datasetCode','length','flowJson.nodes[','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','retryCount','text','.target','retryInterval','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','Unsupported\x20flowType:\x20','CUSTOM_PAGE','action','flowCode','message','917420rDvHzy','empty_metadata_removed','timeout\x20must\x20be\x20an\x20object.','.type','\x20must\x20be\x20a\x20finite\x20number.','add','approval_sys_dataId','.timeout.scriptName','templateName','NaN','get','flowJson\x20must\x20be\x20an\x20object.','USER','timeout.interrupting\x20must\x20be\x20a\x20boolean.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','appCode','string','.timeout.action','sourceNodeId','START','schemaVersion','template','Notification\x20action.url\x20is\x20required.','https://lovrabet.com/schema/rabetbase-flow-config.json','edge\x20must\x20be\x20an\x20object.','ROLE','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.assignee.userIds','EXPRESSION\x20edge\x20requires\x20expression.','event','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','APPROVAL','parse','.tmp','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','Unsupported\x20notification\x20version:\x20','FIXED','actions','isSafeInteger','#/$defs/flowEdge','Duplicate\x20edge\x20route:\x20','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','flowJson.startPageId','flowJson.nodes','hasOwnProperty','waypoint.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','NOTIFICATION','.timeout.enabled','Notification\x20template.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','value\x20must\x20be\x20an\x20array.','.transferCandidates.strategy','.async','Reserved\x20resultVariable:\x20','every','2WAwgHk','enabled','\x20users.','keys','label','strategy','.name','has','FIXED\x20assignee\x20requires\x20userIds.','.assignee.strategy','EMAIL','Unsupported\x20condition\x20type:\x20','Duplicate\x20value:\x20','Notification\x20action.text\x20is\x20required.','Notification\x20template\x20supports\x20at\x20most\x20','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','formPermissions','END','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','flowJson.edges','AUTO_REJECT','].pageId','1118415tyinku','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','source','context','SCRIPT\x20node\x20requires\x20scriptName.','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','array','pageMode','.timeout.interrupting','MINUTES','.cc.recipientUserIds','conditionType','object','expression','toUpperCase','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','role','BCC','.id','NOTIFICATION\x20node\x20requires\x20config.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','targetNodeId','edge\x20target\x20is\x20required.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','filter'];a281_0x5028=function(){return _0x529848;};return a281_0x5028();}function validateGraphShape(_0x5e279d,_0x252469,_0x14bfc1,_0x2bfc8c,_0x1b89ed,_0x38b1ce,_0x2d951){const _0x4ecf39=a281_0x17c8d0;for(const [_0x17302d,_0xf1efd2]of _0x5e279d){const _0x365f81=_0x1b89ed[_0x4ecf39(0x306)](_0x17302d)??[],_0x1da730=_0x2bfc8c[_0x4ecf39(0x306)](_0x17302d)??[];_0xf1efd2['type']!=='START'&&_0x365f81[_0x4ecf39(0x2ef)]===0x0&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x222)});_0xf1efd2['type']!==_0x4ecf39(0x1e6)&&_0x1da730[_0x4ecf39(0x2ef)]===0x0&&_0x2d951['push']({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x2af)});_0xf1efd2['type']===_0x4ecf39(0x30f)&&_0x365f81[_0x4ecf39(0x2ef)]>0x0&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x2e7)});_0xf1efd2[_0x4ecf39(0x2c1)]==='END'&&_0x1da730[_0x4ecf39(0x2ef)]>0x0&&_0x2d951['push']({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x27a)});if(_0xf1efd2[_0x4ecf39(0x2c1)]===_0x4ecf39(0x221)){_0x1da730[_0x4ecf39(0x2ef)]<0x2&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x5bcfb7=_0x1da730[_0x4ecf39(0x204)](_0x59f193=>_0x59f193[_0x4ecf39(0x21f)]===!![]);_0x5bcfb7['length']!==0x1&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x273)});if(_0x5bcfb7[_0x4ecf39(0x2ef)]===0x1){const _0x39a81a=_0x5bcfb7[0x0],_0x20a84e=_0x38b1ce[_0x4ecf39(0x306)](_0x39a81a)??_0x4ecf39(0x1e8);_0x39a81a[_0x4ecf39(0x1f7)]!==_0x4ecf39(0x28a)&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x20a84e+'.conditionType','message':_0x4ecf39(0x203)});_0x39a81a['expression']!==undefined&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x20a84e+_0x4ecf39(0x2c2),'message':_0x4ecf39(0x1e7)});for(const _0x319a0c of _0x1da730){if(_0x319a0c===_0x39a81a)continue;const _0x1c6c83=_0x38b1ce[_0x4ecf39(0x306)](_0x319a0c)??_0x4ecf39(0x1e8);if(_0x319a0c['conditionType']!==_0x4ecf39(0x22f))_0x2d951[_0x4ecf39(0x26f)]({'path':_0x1c6c83+_0x4ecf39(0x27d),'message':_0x4ecf39(0x2bb)});else(typeof _0x319a0c[_0x4ecf39(0x1f9)]!==_0x4ecf39(0x30c)||_0x319a0c[_0x4ecf39(0x1f9)][_0x4ecf39(0x253)]()==='')&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x1c6c83+_0x4ecf39(0x2c2),'message':_0x4ecf39(0x2a3)});}}}if(_0xf1efd2[_0x4ecf39(0x2c1)]===_0x4ecf39(0x31b)&&(_0xf1efd2[_0x4ecf39(0x296)]??_0x4ecf39(0x31b))===_0x4ecf39(0x299)){if(_0x1da730[_0x4ecf39(0x2ef)]!==0x1)_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x23e)});else{const _0x2b6b70=_0x1da730[0x0];((_0x2b6b70[_0x4ecf39(0x1f7)]??_0x4ecf39(0x28a))!==_0x4ecf39(0x28a)||_0x2b6b70[_0x4ecf39(0x21f)]===!![]||typeof _0x2b6b70['expression']==='string'&&_0x2b6b70[_0x4ecf39(0x1f9)][_0x4ecf39(0x253)]()!=='')&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x38b1ce['get'](_0x2b6b70)??_0x4ecf39(0x1e8),'message':_0x4ecf39(0x2f6)});}}else{if(_0xf1efd2[_0x4ecf39(0x2c1)]===_0x4ecf39(0x31b)){const _0xd5e7c4=_0x1da730['map'](_0x17064c=>_0x17064c[_0x4ecf39(0x1f7)]??_0x4ecf39(0x28a)),_0x57c8fa=_0xd5e7c4[_0x4ecf39(0x204)](_0x4a2e5d=>_0x4a2e5d!==_0x4ecf39(0x20d)&&_0x4a2e5d!==_0x4ecf39(0x2cc));_0x57c8fa['length']>0x0&&_0x2d951['push']({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x268)}),_0xd5e7c4['filter'](_0x12018c=>_0x12018c===_0x4ecf39(0x20d))[_0x4ecf39(0x2ef)]!==0x1&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.'}),_0xd5e7c4[_0x4ecf39(0x204)](_0x56d223=>_0x56d223===_0x4ecf39(0x2cc))['length']!==0x1&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x17302d,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x1da730[_0x4ecf39(0x215)](_0x5e3df4=>_0x5e3df4[_0x4ecf39(0x21f)]===!![])&&_0x2d951['push']({'path':_0x4ecf39(0x223)+_0x17302d,'message':_0x4ecf39(0x31a)});}}}const _0x42e0ad=new Set(),_0x1d0b6e=_0x49a4dd=>{const _0x2dbba5=_0x4ecf39;if(_0x42e0ad[_0x2dbba5(0x1dc)](_0x49a4dd))return;_0x42e0ad['add'](_0x49a4dd);for(const _0x1789a8 of _0x2bfc8c[_0x2dbba5(0x306)](_0x49a4dd)??[]){const _0x134c3a=resolveEdgeEndpoint(_0x1789a8[_0x2dbba5(0x2ab)],_0x1789a8['targetNodeId']);if(_0x134c3a&&_0x5e279d[_0x2dbba5(0x1dc)](_0x134c3a))_0x1d0b6e(_0x134c3a);}};_0x1d0b6e(_0x252469);for(const _0x1407e9 of _0x5e279d[_0x4ecf39(0x1d8)]()){!_0x42e0ad['has'](_0x1407e9)&&_0x2d951[_0x4ecf39(0x26f)]({'path':'flowJson.nodes.'+_0x1407e9,'message':_0x4ecf39(0x276)});}const _0x30fc0d=_0x14bfc1[_0x4ecf39(0x215)](_0x5057e4=>_0x42e0ad[_0x4ecf39(0x1dc)](_0x5057e4));if(!_0x30fc0d){_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x1e8),'message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x55ed1b=new Set(),_0x1e6067=_0x4be62a=>{const _0x2e05f7=_0x4ecf39;if(_0x55ed1b[_0x2e05f7(0x1dc)](_0x4be62a))return;_0x55ed1b[_0x2e05f7(0x301)](_0x4be62a);for(const _0x426ce9 of _0x1b89ed[_0x2e05f7(0x306)](_0x4be62a)??[]){const _0x41ab81=resolveEdgeEndpoint(_0x426ce9[_0x2e05f7(0x1ee)],_0x426ce9[_0x2e05f7(0x30e)]);if(_0x41ab81&&_0x5e279d[_0x2e05f7(0x1dc)](_0x41ab81))_0x1e6067(_0x41ab81);}};for(const _0x572dc7 of _0x14bfc1){if(_0x5e279d[_0x4ecf39(0x1dc)](_0x572dc7))_0x1e6067(_0x572dc7);}for(const _0x276488 of _0x42e0ad){!_0x55ed1b['has'](_0x276488)&&_0x2d951[_0x4ecf39(0x26f)]({'path':_0x4ecf39(0x223)+_0x276488,'message':_0x4ecf39(0x231)});}}function validateApprovalResults(_0xd3aee4,_0x220012,_0x53a664,_0x208fbd){const _0x577a8a=a281_0x17c8d0;if(_0x220012===0x0)return;const _0x2b97cb=new Set(_0x53a664['map'](_0x2cbb36=>_0xd3aee4[_0x577a8a(0x306)](_0x2cbb36)?.['result'])[_0x577a8a(0x204)](_0x7fb96=>typeof _0x7fb96===_0x577a8a(0x30c)));for(const _0x53a2df of['APPROVED',_0x577a8a(0x2cc)]){!_0x2b97cb[_0x577a8a(0x1dc)](_0x53a2df)&&_0x208fbd[_0x577a8a(0x26f)]({'path':_0x577a8a(0x327),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x53a2df+'.'});}}function validateScriptResultReferences(_0x39fa01,_0x4801ef,_0x4e7a05,_0x23b7e8,_0x23b241,_0x1c9a7f,_0x4093e3){const _0x295c4d=a281_0x17c8d0;if(_0x1c9a7f[_0x295c4d(0x244)]===0x0)return;const _0x175178=new Set(),_0x32d8dc=_0x5f3695=>{const _0x970410=_0x295c4d;if(!_0x175178[_0x970410(0x1dc)](_0x5f3695)&&_0x39fa01[_0x970410(0x1dc)](_0x5f3695)){_0x175178[_0x970410(0x301)](_0x5f3695);for(const _0x308716 of _0x4e7a05[_0x970410(0x306)](_0x5f3695)??[]){const _0xf66ac=resolveEdgeEndpoint(_0x308716[_0x970410(0x2ab)],_0x308716['targetNodeId']);if(_0xf66ac)_0x32d8dc(_0xf66ac);}}};_0x32d8dc(_0x4801ef);const _0x5aad63=new Map();for(const _0x376b46 of _0x175178){_0x5aad63[_0x295c4d(0x20b)](_0x376b46,_0x376b46===_0x4801ef?new Set([_0x4801ef]):new Set(_0x175178));}let _0x403531=!![];while(_0x403531){_0x403531=![];for(const _0x5884a7 of _0x175178){if(_0x5884a7===_0x4801ef)continue;const _0x46b05f=(_0x23b7e8[_0x295c4d(0x306)](_0x5884a7)??[])[_0x295c4d(0x24b)](_0x2631bb=>resolveEdgeEndpoint(_0x2631bb[_0x295c4d(0x1ee)],_0x2631bb['sourceNodeId']))[_0x295c4d(0x204)](_0x533c29=>Boolean(_0x533c29&&_0x175178[_0x295c4d(0x1dc)](_0x533c29)));if(_0x46b05f[_0x295c4d(0x2ef)]===0x0)continue;const _0x33a267=new Set(_0x5aad63[_0x295c4d(0x306)](_0x46b05f[0x0])??[]);for(const _0x3e429d of _0x46b05f[_0x295c4d(0x2b8)](0x1)){const _0xda4ddc=_0x5aad63[_0x295c4d(0x306)](_0x3e429d)??new Set();for(const _0x2c6e79 of _0x33a267){if(!_0xda4ddc[_0x295c4d(0x1dc)](_0x2c6e79))_0x33a267['delete'](_0x2c6e79);}}_0x33a267[_0x295c4d(0x301)](_0x5884a7);const _0x1fdd69=_0x5aad63[_0x295c4d(0x306)](_0x5884a7);!setsEqual(_0x1fdd69,_0x33a267)&&(_0x5aad63[_0x295c4d(0x20b)](_0x5884a7,_0x33a267),_0x403531=!![]);}}for(const [_0x20ffe8,_0x530195]of _0x4e7a05){const _0x193e5f=_0x5aad63[_0x295c4d(0x306)](_0x20ffe8);if(!_0x193e5f)continue;for(const _0x1d22f7 of _0x530195){if(_0x1d22f7[_0x295c4d(0x1f7)]!==_0x295c4d(0x22f)||typeof _0x1d22f7['expression']!==_0x295c4d(0x30c))continue;for(const [_0x26d18f,_0x55559f]of _0x1c9a7f){expressionReferencesVariable(_0x1d22f7[_0x295c4d(0x1f9)],_0x26d18f)&&!_0x193e5f[_0x295c4d(0x1dc)](_0x55559f)&&_0x4093e3[_0x295c4d(0x26f)]({'path':(_0x23b241[_0x295c4d(0x306)](_0x1d22f7)??'flowJson.edges')+_0x295c4d(0x2c2),'message':_0x295c4d(0x256)+_0x26d18f+',\x20but\x20node\x20'+_0x55559f+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x20ffe8+'.'});}}}}function expressionReferencesVariable(_0x450280,_0x3800ee){const _0x57dca8=a281_0x17c8d0,_0x50d3fd=_0x3800ee[_0x57dca8(0x2d7)](/[.*+?^${}()|[\]\\]/g,'\x5c$&');return new RegExp(_0x57dca8(0x219)+_0x50d3fd+_0x57dca8(0x26e))[_0x57dca8(0x2be)](_0x450280);}function resolveEffectiveResultVariable(_0x4821ff,_0x44cf1d){const _0x427246=a281_0x17c8d0;if(_0x4821ff===undefined||_0x4821ff===null||_0x44cf1d&&_0x4821ff==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x4821ff!==_0x427246(0x30c)||!VARIABLE_PATTERN[_0x427246(0x2be)](_0x4821ff)||RESERVED_RESULT_VARIABLES['has'](_0x4821ff)||_0x4821ff[_0x427246(0x25d)]('approval_sys_'))return undefined;return _0x4821ff;}function registerResultVariableOwner(_0x31a07d,_0x29b37d,_0x3fa558,_0x36e1e0){const _0x56f118=a281_0x17c8d0;if(_0x31a07d[_0x56f118(0x1dc)](_0x29b37d)){_0x36e1e0[_0x56f118(0x26f)]({'path':'flowJson.nodes','message':_0x56f118(0x225)+_0x29b37d+'.'});return;}_0x31a07d[_0x56f118(0x20b)](_0x29b37d,_0x3fa558);}function setsEqual(_0x2a602c,_0x3ea001){const _0x344630=a281_0x17c8d0;return _0x2a602c[_0x344630(0x244)]===_0x3ea001[_0x344630(0x244)]&&[..._0x2a602c][_0x344630(0x1d4)](_0x2a5842=>_0x3ea001[_0x344630(0x1dc)](_0x2a5842));}function isValidUserId(_0x361dbf){const _0x201719=a281_0x17c8d0;if(typeof _0x361dbf===_0x201719(0x30c))return _0x361dbf[_0x201719(0x253)]()[_0x201719(0x2ef)]>0x0;return Number[_0x201719(0x322)](_0x361dbf)&&Number(_0x361dbf)>0x0;}function resolveEdgeEndpoint(_0x55561b,_0x262251){const _0x4e023f=a281_0x17c8d0;if(typeof _0x55561b===_0x4e023f(0x30c)&&_0x55561b[_0x4e023f(0x253)]())return _0x55561b[_0x4e023f(0x253)]();if(typeof _0x262251===_0x4e023f(0x30c)&&_0x262251['trim']())return _0x262251[_0x4e023f(0x253)]();return undefined;}function a281_0x2049(_0x184871,_0x314570){_0x184871=_0x184871-0x1ca;const _0x502885=a281_0x5028();let _0x20494e=_0x502885[_0x184871];return _0x20494e;}function removeEmptyMetadata(_0x5a00a4,_0x3af7fa,_0x53df2a,_0x4c5b97){const _0x50486d=a281_0x17c8d0;if(Array['isArray'](_0x5a00a4)){_0x5a00a4['forEach']((_0x215f08,_0x5279f0)=>removeEmptyMetadata(_0x215f08,_0x3af7fa+'['+_0x5279f0+']',_0x53df2a,_0x4c5b97));return;}if(!isRecord(_0x5a00a4))return;for(const [_0xd5c706,_0xa1ec7a]of Object[_0x50486d(0x2c4)](_0x5a00a4)){const _0x506f6e=_0x3af7fa+'.'+_0xd5c706;if(_0xd5c706===_0x50486d(0x2d0)&&isEmptyJsonValue(_0xa1ec7a)){delete _0x5a00a4[_0xd5c706],_0x4c5b97[_0x50486d(0x26f)](_0x506f6e),_0x53df2a[_0x50486d(0x26f)]({'code':_0x50486d(0x2fd),'path':_0x506f6e,'message':_0x506f6e+_0x50486d(0x27e)});continue;}removeEmptyMetadata(_0xa1ec7a,_0x506f6e,_0x53df2a,_0x4c5b97);}}function isEmptyJsonValue(_0x24a8e8){const _0xbd19d2=a281_0x17c8d0;if(_0x24a8e8===null||_0x24a8e8===undefined)return!![];if(typeof _0x24a8e8===_0xbd19d2(0x30c))return _0x24a8e8['trim']()==='';if(Array[_0xbd19d2(0x2b5)](_0x24a8e8))return _0x24a8e8[_0xbd19d2(0x2ef)]===0x0;return isRecord(_0x24a8e8)&&Object[_0xbd19d2(0x1d8)](_0x24a8e8)[_0xbd19d2(0x2ef)]===0x0;}function isRecord(_0x2b6083){const _0x5d28d9=a281_0x17c8d0;return typeof _0x2b6083===_0x5d28d9(0x1f8)&&_0x2b6083!==null&&!Array['isArray'](_0x2b6083);}function cloneJsonValue(_0x1db6ef){const _0xe1f9f6=a281_0x17c8d0;return JSON['parse'](JSON[_0xe1f9f6(0x216)](_0x1db6ef));}export async function readFlowConfigFile(_0x54a309){const _0x1776e3=a281_0x17c8d0,_0xa2f24=await readFile(resolve(_0x54a309),_0x1776e3(0x2a2));return JSON[_0x1776e3(0x31c)](_0xa2f24);}
|
|
1
|
+
const a281_0x3406bd=a281_0x102f;(function(_0x34602a,_0x4d7cdd){const _0x3bc465=a281_0x102f,_0x1906d4=_0x34602a();while(!![]){try{const _0x3a6160=parseInt(_0x3bc465(0x179))/0x1*(-parseInt(_0x3bc465(0x1b9))/0x2)+-parseInt(_0x3bc465(0x234))/0x3*(parseInt(_0x3bc465(0x241))/0x4)+parseInt(_0x3bc465(0x23a))/0x5*(parseInt(_0x3bc465(0x22d))/0x6)+-parseInt(_0x3bc465(0x290))/0x7+-parseInt(_0x3bc465(0x1db))/0x8*(parseInt(_0x3bc465(0x172))/0x9)+-parseInt(_0x3bc465(0x142))/0xa*(-parseInt(_0x3bc465(0x239))/0xb)+-parseInt(_0x3bc465(0x1e4))/0xc*(-parseInt(_0x3bc465(0x1e9))/0xd);if(_0x3a6160===_0x4d7cdd)break;else _0x1906d4['push'](_0x1906d4['shift']());}catch(_0x1d4cf4){_0x1906d4['push'](_0x1906d4['shift']());}}}(a281_0x1c91,0x810d7));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':a281_0x3406bd(0x1cf),'$id':a281_0x3406bd(0x213),'title':a281_0x3406bd(0x195),'type':a281_0x3406bd(0x190),'required':['flowName',a281_0x3406bd(0x151),a281_0x3406bd(0x283)],'$defs':{'userId':{'anyOf':[{'type':a281_0x3406bd(0x1fe),'minLength':0x1},{'type':a281_0x3406bd(0x14a),'minimum':0x1}]},'position':{'type':a281_0x3406bd(0x190),'required':['x','y'],'properties':{'x':{'type':a281_0x3406bd(0x297),'minimum':0x0},'y':{'type':a281_0x3406bd(0x297),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a281_0x3406bd(0x190),'required':[a281_0x3406bd(0x21e),a281_0x3406bd(0x284)],'properties':{'value':{'type':a281_0x3406bd(0x14a),'minimum':0x1},'unit':{'enum':[a281_0x3406bd(0x194),a281_0x3406bd(0x24a),a281_0x3406bd(0x21d),a281_0x3406bd(0x25d)]}},'additionalProperties':!![]},'flowNode':{'type':a281_0x3406bd(0x190),'required':['id',a281_0x3406bd(0x279),a281_0x3406bd(0x206),a281_0x3406bd(0x23f)],'properties':{'id':{'type':a281_0x3406bd(0x1fe),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'type':{'enum':[a281_0x3406bd(0x286),a281_0x3406bd(0x1a4),a281_0x3406bd(0x271),a281_0x3406bd(0x281),a281_0x3406bd(0x215),'NOTIFICATION']},'name':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'path':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a281_0x3406bd(0x27b),'ALL','ANY']},'taskMode':{'enum':['APPROVAL','HANDLE']},'assignee':{'type':a281_0x3406bd(0x190),'required':[a281_0x3406bd(0x1b8)],'properties':{'strategy':{'enum':['FIXED','ROLE']},'userIds':{'type':a281_0x3406bd(0x27a),'minItems':0x1,'items':{'$ref':a281_0x3406bd(0x157)}},'roleId':{'anyOf':[{'type':a281_0x3406bd(0x14a),'minimum':0x1},{'type':a281_0x3406bd(0x1fe),'pattern':a281_0x3406bd(0x187)}]}},'additionalProperties':!![]},'transferCandidates':{'type':a281_0x3406bd(0x190),'required':[a281_0x3406bd(0x1b8),a281_0x3406bd(0x15d)],'properties':{'strategy':{'const':a281_0x3406bd(0x19a)},'userIds':{'type':a281_0x3406bd(0x27a),'minItems':0x1,'items':{'$ref':a281_0x3406bd(0x157)}}},'additionalProperties':!![]},'sequential':{'type':a281_0x3406bd(0x28f)},'result':{'enum':[a281_0x3406bd(0x293),a281_0x3406bd(0x1cd)]},'scriptName':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'resultVariable':{'type':'string','pattern':a281_0x3406bd(0x144)},'async':{'type':a281_0x3406bd(0x190),'properties':{'enabled':{'type':a281_0x3406bd(0x28f)},'retryCount':{'type':a281_0x3406bd(0x14a),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a281_0x3406bd(0x208)}},'additionalProperties':!![]},'timeout':{'type':a281_0x3406bd(0x190),'properties':{'enabled':{'type':a281_0x3406bd(0x28f)},'duration':{'$ref':a281_0x3406bd(0x208)},'action':{'enum':[a281_0x3406bd(0x1f4),a281_0x3406bd(0x1f6),a281_0x3406bd(0x1c8)]},'interrupting':{'type':a281_0x3406bd(0x28f)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a281_0x3406bd(0x1fe),'pattern':a281_0x3406bd(0x144)}},'additionalProperties':!![]},'cc':{'type':a281_0x3406bd(0x190),'required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':a281_0x3406bd(0x27a),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a281_0x3406bd(0x1fe),'minLength':0x1}},'visible':{'type':a281_0x3406bd(0x27a),'uniqueItems':!![],'items':{'type':'string','minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a281_0x3406bd(0x1b2),a281_0x3406bd(0x2a6)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':[a281_0x3406bd(0x2af),a281_0x3406bd(0x292)]},'template':{'type':a281_0x3406bd(0x190),'required':[a281_0x3406bd(0x204),a281_0x3406bd(0x15e)],'properties':{'title':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a281_0x3406bd(0x1fe)},'facts':{'type':a281_0x3406bd(0x27a),'maxItems':0x8,'items':{'type':'object','required':[a281_0x3406bd(0x158),'value'],'properties':{'label':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'value':{'type':a281_0x3406bd(0x1fe),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a281_0x3406bd(0x27a),'maxItems':0x2,'items':{'type':'object','required':[a281_0x3406bd(0x1f1),a281_0x3406bd(0x209)],'properties':{'text':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'url':{'type':a281_0x3406bd(0x1fe),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':'array','items':{'type':'object','required':[a281_0x3406bd(0x279),a281_0x3406bd(0x21e)],'properties':{'type':{'enum':[a281_0x3406bd(0x1e2),a281_0x3406bd(0x16f),a281_0x3406bd(0x1aa)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a281_0x3406bd(0x1da)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a281_0x3406bd(0x190),'properties':{'id':{'type':'string','pattern':a281_0x3406bd(0x144)},'source':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'target':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'conditionType':{'enum':[a281_0x3406bd(0x25e),a281_0x3406bd(0x293),a281_0x3406bd(0x1cd),a281_0x3406bd(0x171)]},'expression':{'type':a281_0x3406bd(0x1fe)},'defaultFlow':{'type':'boolean'},'name':{'type':a281_0x3406bd(0x1fe)},'waypoints':{'type':'array','items':{'$ref':a281_0x3406bd(0x162)}}},'allOf':[{'anyOf':[{'required':[a281_0x3406bd(0x199)]},{'required':[a281_0x3406bd(0x22b)]}]},{'anyOf':[{'required':[a281_0x3406bd(0x257)]},{'required':[a281_0x3406bd(0x1e6)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a281_0x3406bd(0x1fe)},'flowType':{'enum':['FORM_FLOW',a281_0x3406bd(0x19e)]},'datasetCode':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'pageId':{'type':a281_0x3406bd(0x14a)},'templateName':![],'flowJson':{'type':'object','required':[a281_0x3406bd(0x1a0),a281_0x3406bd(0x22a)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a281_0x3406bd(0x1fe),'const':a281_0x3406bd(0x21f),'description':a281_0x3406bd(0x210)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':a281_0x3406bd(0x1fe),'minLength':0x1},'nodes':{'type':a281_0x3406bd(0x27a),'minItems':0x1,'items':{'$ref':a281_0x3406bd(0x1a9)}},'edges':{'type':a281_0x3406bd(0x27a),'minItems':0x1,'items':{'$ref':a281_0x3406bd(0x25a)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a281_0x3406bd(0x20f),a281_0x3406bd(0x156),a281_0x3406bd(0x14f),a281_0x3406bd(0x1f5),a281_0x3406bd(0x201),a281_0x3406bd(0x177),a281_0x3406bd(0x1af),a281_0x3406bd(0x193)],REMOVED_ROOT_FIELDS=['id',a281_0x3406bd(0x177),a281_0x3406bd(0x193)],DEFAULT_FLOW_SCHEMA_VERSION=a281_0x3406bd(0x21f),NODE_TYPES=new Set([a281_0x3406bd(0x286),a281_0x3406bd(0x1a4),a281_0x3406bd(0x271),a281_0x3406bd(0x281),a281_0x3406bd(0x215),a281_0x3406bd(0x1d8)]),CONDITION_TYPES=new Set([a281_0x3406bd(0x25e),a281_0x3406bd(0x293),a281_0x3406bd(0x1cd),a281_0x3406bd(0x171)]),APPROVAL_MODES=new Set([a281_0x3406bd(0x27b),a281_0x3406bd(0x299),a281_0x3406bd(0x1c9)]),APPROVAL_TASK_MODES=new Set([a281_0x3406bd(0x271),'HANDLE']),FLOW_TIME_UNITS=new Set(['SECONDS',a281_0x3406bd(0x24a),a281_0x3406bd(0x21d),a281_0x3406bd(0x25d)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a281_0x3406bd(0x1f4),a281_0x3406bd(0x1f6),a281_0x3406bd(0x1c8)]),FLOW_TYPES=new Set(['FORM_FLOW','INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set(['CUSTOM_PAGE',a281_0x3406bd(0x2ac)]),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([a281_0x3406bd(0x2af),a281_0x3406bd(0x292)]),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER',a281_0x3406bd(0x16f),a281_0x3406bd(0x1aa)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a281_0x3406bd(0x1da)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE='scriptResult',UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE=a281_0x3406bd(0x1ac),RESERVED_RESULT_VARIABLES=new Set([a281_0x3406bd(0x176),a281_0x3406bd(0x147),'approval_sys_appCode',a281_0x3406bd(0x261),a281_0x3406bd(0x24b),'approval_sys_initiatorUsername',a281_0x3406bd(0x198),a281_0x3406bd(0x1ef),a281_0x3406bd(0x24c),a281_0x3406bd(0x196)]);export function normalizeFlowConfig(_0x540089){const _0x587928=a281_0x3406bd;if(!isRecord(_0x540089))throw new TypeError(_0x587928(0x1e0));const _0x139e2d=cloneJsonValue(_0x540089),_0x9d5e4a=_0x139e2d[_0x587928(0x283)],_0x55220b=isRecord(_0x9d5e4a)?cloneJsonValue(_0x9d5e4a):{},_0x52af1b=[],_0x15affb=[];for(const _0x1462d2 of REMOVED_ROOT_FIELDS){if(!Object[_0x587928(0x1f7)][_0x587928(0x1ed)][_0x587928(0x256)](_0x139e2d,_0x1462d2))continue;delete _0x139e2d[_0x1462d2],_0x15affb[_0x587928(0x262)](_0x1462d2),_0x52af1b[_0x587928(0x262)]({'code':_0x587928(0x24d),'path':_0x1462d2,'message':_0x1462d2+_0x587928(0x143)});}for(const _0x34a705 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x587928(0x1f7)]['hasOwnProperty'][_0x587928(0x256)](_0x55220b,_0x34a705))continue;const _0x504ae6=_0x587928(0x237)+_0x34a705;delete _0x55220b[_0x34a705],_0x15affb['push'](_0x504ae6),_0x52af1b[_0x587928(0x262)]({'code':'legacy_field_removed','path':_0x504ae6,'message':_0x504ae6+_0x587928(0x143)});}if(Object['prototype'][_0x587928(0x1ed)][_0x587928(0x256)](_0x55220b,_0x587928(0x14d))){const _0x31667e=_0x55220b[_0x587928(0x14d)],_0x32c4ad=typeof _0x31667e===_0x587928(0x1fe)?_0x31667e[_0x587928(0x26a)]():_0x31667e;if(isEmptyJsonValue(_0x31667e)||_0x32c4ad===DEFAULT_FLOW_SCHEMA_VERSION){const _0x176150=_0x587928(0x1c5);delete _0x55220b[_0x587928(0x14d)],_0x15affb[_0x587928(0x262)](_0x176150),_0x52af1b[_0x587928(0x262)]({'code':'legacy_field_removed','path':_0x176150,'message':_0x176150+_0x587928(0x25b)+DEFAULT_FLOW_SCHEMA_VERSION+_0x587928(0x218)});}}removeEmptyMetadata(_0x55220b,_0x587928(0x283),_0x52af1b,_0x15affb);_0x139e2d[_0x587928(0x151)]==='INDEPENDENT_FLOW'&&!Object['prototype'][_0x587928(0x1ed)]['call'](_0x55220b,_0x587928(0x276))&&(_0x55220b[_0x587928(0x276)]=_0x587928(0x1c4));_0x139e2d[_0x587928(0x283)]=_0x55220b;if(typeof _0x139e2d[_0x587928(0x14f)]==='string')_0x139e2d['flowName']=_0x139e2d['flowName'][_0x587928(0x26a)]();return{'config':_0x139e2d,'warnings':_0x52af1b,'removedPaths':_0x15affb};}export function validateFlowConfig(_0x20ae3a){const _0x527f94=a281_0x3406bd;let _0x55ea6e;try{_0x55ea6e=normalizeFlowConfig(_0x20ae3a);}catch(_0xe60742){const _0x1accf3=_0xe60742 instanceof Error?_0xe60742['message']:String(_0xe60742),_0x10e2be={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x1accf3}],'warnings':[],'normalized':_0x10e2be,'validationConfig':_0x10e2be};}const _0x3f002d=_0x55ea6e[_0x527f94(0x1eb)],_0x59867a=cloneJsonValue(_0x3f002d),_0x1c24cb=_0x59867a[_0x527f94(0x283)];_0x1c24cb[_0x527f94(0x20f)]=_0x527f94(0x202),_0x1c24cb['flowName']=_0x3f002d['flowName'];typeof _0x3f002d[_0x527f94(0x201)]===_0x527f94(0x1fe)&&_0x3f002d[_0x527f94(0x201)][_0x527f94(0x26a)]()&&(_0x1c24cb['bindDatasetCode']=_0x3f002d[_0x527f94(0x201)][_0x527f94(0x26a)]());const _0x25ed8c=[];return validateOuterMetadata(_0x3f002d,_0x25ed8c),validateFlowClassification(_0x3f002d,_0x25ed8c),validateGraph(_0x3f002d[_0x527f94(0x283)],_0x25ed8c),{'valid':_0x25ed8c[_0x527f94(0x203)]===0x0,'errors':_0x25ed8c,'warnings':_0x55ea6e[_0x527f94(0x247)],'normalized':_0x3f002d,'validationConfig':_0x59867a};}function validateFlowClassification(_0x8b5121,_0x3b5f25){const _0x34bd52=a281_0x3406bd;if(!isRecord(_0x8b5121[_0x34bd52(0x283)]))return;const _0x1b0b4c=_0x8b5121[_0x34bd52(0x151)],_0x31f52a=_0x8b5121[_0x34bd52(0x283)][_0x34bd52(0x276)];_0x31f52a!==undefined&&(typeof _0x31f52a!==_0x34bd52(0x1fe)||!FLOW_PAGE_MODES[_0x34bd52(0x152)](_0x31f52a))&&_0x3b5f25['push']({'path':_0x34bd52(0x1d2),'message':_0x34bd52(0x272)+String(_0x31f52a)+'.'});_0x1b0b4c===_0x34bd52(0x17e)&&_0x31f52a!==undefined&&_0x3b5f25[_0x34bd52(0x262)]({'path':_0x34bd52(0x1d2),'message':_0x34bd52(0x188)});_0x1b0b4c==='INDEPENDENT_FLOW'&&_0x31f52a==='PLATFORM_FORM'&&_0x3b5f25[_0x34bd52(0x262)]({'path':_0x34bd52(0x1d2),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x1b0b4c==='FORM_FLOW'||_0x1b0b4c===_0x34bd52(0x19e))&&validateCustomPageNavigation(_0x8b5121,_0x1b0b4c,_0x31f52a,_0x3b5f25);if(_0x1b0b4c!==_0x34bd52(0x17e)||!Array[_0x34bd52(0x1fb)](_0x8b5121[_0x34bd52(0x283)][_0x34bd52(0x1a0)]))return;_0x8b5121['flowJson'][_0x34bd52(0x1a0)][_0x34bd52(0x269)]((_0x5643f9,_0x52c9f6)=>{const _0x7fbedb=_0x34bd52;isRecord(_0x5643f9)&&_0x5643f9[_0x7fbedb(0x279)]===_0x7fbedb(0x271)&&_0x5643f9['taskMode']==='HANDLE'&&_0x3b5f25[_0x7fbedb(0x262)]({'path':'flowJson.nodes['+_0x52c9f6+_0x7fbedb(0x1ff),'message':_0x7fbedb(0x1bd)});});}function validateCustomPageNavigation(_0xb66e75,_0x2ee0af,_0x4aa555,_0x118143){const _0x48329e=a281_0x3406bd,_0x49a478=_0xb66e75[_0x48329e(0x283)]['startPageId'];_0x49a478!==undefined&&_0x118143['push']({'path':'flowJson.startPageId','message':_0x48329e(0x16d)});const _0x35ad31=_0xb66e75['flowJson'][_0x48329e(0x141)];_0x35ad31!==undefined&&(typeof _0x35ad31!==_0x48329e(0x1fe)||_0x35ad31['trim']()==='')&&_0x118143[_0x48329e(0x262)]({'path':_0x48329e(0x2a4),'message':_0x48329e(0x221)});const _0x300040=Array[_0x48329e(0x1fb)](_0xb66e75['flowJson'][_0x48329e(0x1a0)])?_0xb66e75['flowJson'][_0x48329e(0x1a0)][_0x48329e(0x1e5)]((_0x119f7b,_0x1c947b)=>({'node':_0x119f7b,'index':_0x1c947b}))['filter'](({node:_0x5e056a})=>isRecord(_0x5e056a)&&_0x5e056a[_0x48329e(0x223)]!==undefined):[],_0x9f3150=_0x35ad31!==undefined||_0x300040[_0x48329e(0x203)]>0x0,_0x556890=_0x4aa555===undefined&&_0x2ee0af==='INDEPENDENT_FLOW'?'CUSTOM_PAGE':_0x4aa555;_0x9f3150&&(_0x2ee0af!=='INDEPENDENT_FLOW'||_0x556890!==_0x48329e(0x1c4))&&(_0x35ad31!==undefined&&_0x118143[_0x48329e(0x262)]({'path':'flowJson.startPath','message':_0x48329e(0x220)}),_0x300040[_0x48329e(0x269)](({index:_0x4d4c6d})=>{const _0x5b21b9=_0x48329e;_0x118143[_0x5b21b9(0x262)]({'path':_0x5b21b9(0x1a5)+_0x4d4c6d+_0x5b21b9(0x255),'message':_0x5b21b9(0x164)});}));}export async function writeNormalizedFlowConfig(_0x2d056c,_0x42ea13,_0x1312f7={}){const _0x58183d=a281_0x3406bd,_0x83f354=resolve(_0x2d056c),_0x3e7799=_0x83f354+'.'+process['pid']+'.'+randomUUID()+_0x58183d(0x28a),_0x589649=JSON[_0x58183d(0x249)](_0x42ea13,null,0x2)+'\x0a';let _0x12d196;try{try{_0x12d196=(await stat(_0x83f354))['mode']&0x1ff;}catch{_0x12d196=undefined;}await writeFile(_0x3e7799,_0x589649,{'encoding':'utf8','flag':'wx','mode':_0x12d196??0x1a4});if(_0x12d196!==undefined)await chmod(_0x3e7799,_0x12d196);_0x1312f7[_0x58183d(0x1be)]===![]?(await link(_0x3e7799,_0x83f354),await unlink(_0x3e7799)):await rename(_0x3e7799,_0x83f354);}finally{await unlink(_0x3e7799)[_0x58183d(0x2ab)](()=>undefined);}}function validateOuterMetadata(_0x578105,_0x14f87f){const _0x5b4e25=a281_0x3406bd;(typeof _0x578105['flowName']!==_0x5b4e25(0x1fe)||_0x578105['flowName'][_0x5b4e25(0x26a)]()==='')&&_0x14f87f[_0x5b4e25(0x262)]({'path':'flowName','message':_0x5b4e25(0x20e)});_0x578105[_0x5b4e25(0x20a)]!==undefined&&typeof _0x578105[_0x5b4e25(0x20a)]!==_0x5b4e25(0x1fe)&&_0x14f87f[_0x5b4e25(0x262)]({'path':_0x5b4e25(0x20a),'message':_0x5b4e25(0x19d)});if(_0x578105['flowType']===undefined||_0x578105['flowType']===null)_0x14f87f[_0x5b4e25(0x262)]({'path':_0x5b4e25(0x151),'message':_0x5b4e25(0x1b4)});else(typeof _0x578105[_0x5b4e25(0x151)]!==_0x5b4e25(0x1fe)||!FLOW_TYPES[_0x5b4e25(0x152)](_0x578105[_0x5b4e25(0x151)]))&&_0x14f87f[_0x5b4e25(0x262)]({'path':_0x5b4e25(0x151),'message':_0x5b4e25(0x27d)+String(_0x578105[_0x5b4e25(0x151)])+'.'});_0x578105[_0x5b4e25(0x201)]!==undefined&&typeof _0x578105[_0x5b4e25(0x201)]!==_0x5b4e25(0x1fe)&&_0x14f87f[_0x5b4e25(0x262)]({'path':_0x5b4e25(0x201),'message':'datasetCode\x20must\x20be\x20a\x20string.'}),_0x578105[_0x5b4e25(0x1af)]!==undefined&&(!Number[_0x5b4e25(0x231)](_0x578105[_0x5b4e25(0x1af)])||_0x578105[_0x5b4e25(0x1af)]<0x0)&&_0x14f87f[_0x5b4e25(0x262)]({'path':_0x5b4e25(0x1af),'message':_0x5b4e25(0x1ce)}),_0x578105[_0x5b4e25(0x151)]===_0x5b4e25(0x19e)&&_0x578105[_0x5b4e25(0x201)]!==undefined&&_0x14f87f[_0x5b4e25(0x262)]({'path':_0x5b4e25(0x201),'message':_0x5b4e25(0x238)}),_0x578105[_0x5b4e25(0x151)]===_0x5b4e25(0x19e)&&_0x578105[_0x5b4e25(0x1af)]!==undefined&&_0x14f87f['push']({'path':_0x5b4e25(0x1af),'message':_0x5b4e25(0x28c)});}function validateGraph(_0x5a9cb9,_0xfb8c07){const _0x3b1569=a281_0x3406bd;if(!isRecord(_0x5a9cb9)){_0xfb8c07[_0x3b1569(0x262)]({'path':_0x3b1569(0x283),'message':_0x3b1569(0x1ae)});return;}!Array[_0x3b1569(0x1fb)](_0x5a9cb9[_0x3b1569(0x1a0)])&&_0xfb8c07[_0x3b1569(0x262)]({'path':_0x3b1569(0x291),'message':_0x3b1569(0x20b)});!Array[_0x3b1569(0x1fb)](_0x5a9cb9[_0x3b1569(0x22a)])&&_0xfb8c07[_0x3b1569(0x262)]({'path':_0x3b1569(0x167),'message':_0x3b1569(0x244)});Object[_0x3b1569(0x1f7)][_0x3b1569(0x1ed)][_0x3b1569(0x256)](_0x5a9cb9,_0x3b1569(0x14d))&&_0xfb8c07['push']({'path':_0x3b1569(0x1c5),'message':_0x3b1569(0x15f)+String(_0x5a9cb9[_0x3b1569(0x14d)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x53baf6 of[_0x3b1569(0x1ea),_0x3b1569(0x1d6),_0x3b1569(0x277)]){Object[_0x3b1569(0x1f7)][_0x3b1569(0x1ed)]['call'](_0x5a9cb9,_0x53baf6)&&_0xfb8c07['push']({'path':_0x3b1569(0x237)+_0x53baf6,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x3b1569(0x1fb)](_0x5a9cb9[_0x3b1569(0x1a0)])||!Array[_0x3b1569(0x1fb)](_0x5a9cb9[_0x3b1569(0x22a)]))return;const _0x33b12=new Map(),_0x55edf=[],_0x4bc0f2=[],_0x27d103=new Map(),_0x260011=new Map(),_0xc6d021=new Set();let _0x36de67=0x0;_0x5a9cb9['nodes']['forEach']((_0x22f65e,_0x2c2530)=>{const _0x190016=_0x3b1569,_0x52eab1=_0x190016(0x1a5)+_0x2c2530+']';if(!isRecord(_0x22f65e)){_0xfb8c07[_0x190016(0x262)]({'path':_0x52eab1,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x243324=_0x22f65e;if(typeof _0x243324['id']!==_0x190016(0x1fe)||!BPMN_ID_PATTERN['test'](_0x243324['id']))_0xfb8c07['push']({'path':_0x52eab1+_0x190016(0x1a1),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x33b12[_0x190016(0x152)](_0x243324['id'])?_0xfb8c07[_0x190016(0x262)]({'path':_0x52eab1+_0x190016(0x1a1),'message':_0x190016(0x28d)+_0x243324['id']+'.'}):(_0x33b12[_0x190016(0x26b)](_0x243324['id'],_0x243324),_0xc6d021['add'](_0x243324['id']));if(!NODE_TYPES[_0x190016(0x152)](_0x243324['type']))_0xfb8c07[_0x190016(0x262)]({'path':_0x52eab1+_0x190016(0x267),'message':'Unsupported\x20node\x20type:\x20'+String(_0x243324[_0x190016(0x279)])+'.'});else{if(_0x243324[_0x190016(0x279)]==='START')_0x55edf['push'](_0x243324['id']);else _0x243324[_0x190016(0x279)]===_0x190016(0x1a4)&&_0x4bc0f2[_0x190016(0x262)](_0x243324['id']);}_0x243324['type']===_0x190016(0x271)&&(_0x243324[_0x190016(0x173)]===undefined||_0x243324['taskMode']===_0x190016(0x271))&&(_0x36de67+=0x1);validateNode(_0x243324,_0x52eab1,_0xfb8c07);if(_0x243324[_0x190016(0x279)]==='SCRIPT'){const _0x2256e8=resolveEffectiveResultVariable(_0x243324[_0x190016(0x28b)],![]);_0x2256e8&&(registerResultVariableOwner(_0x260011,_0x2256e8,_0x243324['id'],_0xfb8c07),!_0x27d103['has'](_0x2256e8)&&_0x27d103['set'](_0x2256e8,_0x243324['id']));}if(_0x243324['type']===_0x190016(0x271)&&isRecord(_0x243324[_0x190016(0x227)])&&_0x243324[_0x190016(0x227)]['enabled']===!![]&&_0x243324[_0x190016(0x227)][_0x190016(0x2a3)]===_0x190016(0x1c8)){const _0x4b6ce9=resolveEffectiveResultVariable(_0x243324[_0x190016(0x227)]['resultVariable'],!![]);_0x4b6ce9&®isterResultVariableOwner(_0x260011,_0x4b6ce9,_0x243324['id']+_0x190016(0x22c),_0xfb8c07);}});_0x55edf[_0x3b1569(0x203)]!==0x1&&_0xfb8c07[_0x3b1569(0x262)]({'path':'flowJson.nodes','message':_0x3b1569(0x1c2)});_0x4bc0f2[_0x3b1569(0x203)]===0x0&&_0xfb8c07['push']({'path':_0x3b1569(0x291),'message':_0x3b1569(0x25f)});const _0xbc5efb=new Map(),_0x49d431=new Map(),_0x69a235=new Map(),_0x381286=new Set();_0x5a9cb9[_0x3b1569(0x22a)][_0x3b1569(0x269)]((_0x422e96,_0x28cdba)=>{const _0x5c9427=_0x3b1569,_0x59176e=_0x5c9427(0x16c)+_0x28cdba+']';if(!isRecord(_0x422e96)){_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e,'message':_0x5c9427(0x226)});return;}const _0x330e56=_0x422e96;_0x69a235['set'](_0x330e56,_0x59176e);const _0x5e1ab1=resolveEdgeEndpoint(_0x330e56[_0x5c9427(0x199)],_0x330e56[_0x5c9427(0x22b)]),_0x11448e=resolveEdgeEndpoint(_0x330e56[_0x5c9427(0x257)],_0x330e56[_0x5c9427(0x1e6)]);if(!_0x5e1ab1)_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e+_0x5c9427(0x2a1),'message':_0x5c9427(0x1d7)});if(!_0x11448e)_0xfb8c07['push']({'path':_0x59176e+'.target','message':'edge\x20target\x20is\x20required.'});_0x5e1ab1&&!_0x33b12[_0x5c9427(0x152)](_0x5e1ab1)&&_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e+'.source','message':_0x5c9427(0x233)+_0x5e1ab1+'.'});_0x11448e&&!_0x33b12[_0x5c9427(0x152)](_0x11448e)&&_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e+_0x5c9427(0x236),'message':'Edge\x20target\x20node\x20not\x20found:\x20'+_0x11448e+'.'});if(_0x330e56['id']!==undefined){if(typeof _0x330e56['id']!==_0x5c9427(0x1fe)||!BPMN_ID_PATTERN['test'](_0x330e56['id']))_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e+_0x5c9427(0x1a1),'message':_0x5c9427(0x1a8)});else{if(_0xc6d021[_0x5c9427(0x152)](_0x330e56['id']))_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e+_0x5c9427(0x1a1),'message':_0x5c9427(0x20d)+_0x330e56['id']+'.'});else!_0xc6d021[_0x5c9427(0x152)](_0x330e56['id'])&&_0xc6d021[_0x5c9427(0x224)](_0x330e56['id']);}}if(_0x5e1ab1&&_0x11448e){const _0x32b517=_0x5e1ab1+'\x00'+_0x11448e+'\x00'+(_0x330e56[_0x5c9427(0x264)]??'ALWAYS');_0x381286[_0x5c9427(0x152)](_0x32b517)?_0xfb8c07[_0x5c9427(0x262)]({'path':_0x59176e,'message':_0x5c9427(0x216)+_0x5e1ab1+_0x5c9427(0x295)+_0x11448e+'\x20('+(_0x330e56[_0x5c9427(0x264)]??_0x5c9427(0x25e))+').'}):_0x381286[_0x5c9427(0x224)](_0x32b517);}validateEdge(_0x330e56,_0x59176e,_0xfb8c07),_0x5e1ab1&&_0x11448e&&(_0xbc5efb[_0x5c9427(0x1d9)](_0x5e1ab1)?.[_0x5c9427(0x262)](_0x330e56)??_0xbc5efb[_0x5c9427(0x26b)](_0x5e1ab1,[_0x330e56]),_0x49d431[_0x5c9427(0x1d9)](_0x11448e)?.['push'](_0x330e56)??_0x49d431[_0x5c9427(0x26b)](_0x11448e,[_0x330e56]));});if(_0x55edf[_0x3b1569(0x203)]!==0x1)return;validateGraphShape(_0x33b12,_0x55edf[0x0],_0x4bc0f2,_0xbc5efb,_0x49d431,_0x69a235,_0xfb8c07),validateScriptResultReferences(_0x33b12,_0x55edf[0x0],_0xbc5efb,_0x49d431,_0x69a235,_0x27d103,_0xfb8c07),validateApprovalResults(_0x33b12,_0x36de67,_0x4bc0f2,_0xfb8c07);}function validateNode(_0x418903,_0xab4347,_0x411380){const _0x17917d=a281_0x3406bd;for(const _0x4b4be5 of[_0x17917d(0x1f3),'formPermission']){Object[_0x17917d(0x1f7)][_0x17917d(0x1ed)]['call'](_0x418903,_0x4b4be5)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+'.'+_0x4b4be5,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x17917d(0x152)](_0x418903[_0x17917d(0x279)]))return;(typeof _0x418903['name']!==_0x17917d(0x1fe)||_0x418903[_0x17917d(0x206)]['trim']()==='')&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x19c),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x418903[_0x17917d(0x1af)]!==undefined&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x165),'message':_0x17917d(0x214)});if(_0x418903[_0x17917d(0x223)]!==undefined){if(typeof _0x418903[_0x17917d(0x223)]!==_0x17917d(0x1fe)||_0x418903['path'][_0x17917d(0x26a)]()==='')_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x2a5),'message':_0x17917d(0x170)});else _0x418903[_0x17917d(0x279)]!==_0x17917d(0x271)&&_0x418903[_0x17917d(0x279)]!==_0x17917d(0x1a4)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x2a5),'message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x4ab451=_0x418903[_0x17917d(0x23f)];if(!isRecord(_0x4ab451))_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x168),'message':_0x17917d(0x1e3)});else for(const _0x10de0a of['x','y']){const _0x4395b0=_0x4ab451[_0x10de0a];(typeof _0x4395b0!==_0x17917d(0x297)||!Number[_0x17917d(0x1a6)](_0x4395b0)||_0x4395b0<0x0)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x22f)+_0x10de0a,'message':_0x17917d(0x1ee)+_0x10de0a+_0x17917d(0x1c0)});}if(_0x418903['type']===_0x17917d(0x271)){const _0x445b18=_0x418903[_0x17917d(0x1bf)]??'SINGLE',_0x19f8ed=_0x418903[_0x17917d(0x173)]??_0x17917d(0x271);!APPROVAL_TASK_MODES[_0x17917d(0x152)](_0x19f8ed)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x296),'message':_0x17917d(0x24f)+String(_0x19f8ed)+'.'});!APPROVAL_MODES['has'](_0x445b18)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x1e1),'message':'Unsupported\x20approval\x20mode:\x20'+String(_0x445b18)+'.'});if(!isRecord(_0x418903[_0x17917d(0x26d)]))_0x411380['push']({'path':_0xab4347+'.assignee','message':_0x17917d(0x246)});else{const _0x8f24fd=_0x418903[_0x17917d(0x26d)][_0x17917d(0x1b8)];_0x8f24fd!==_0x17917d(0x19a)&&_0x8f24fd!==_0x17917d(0x16f)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x1ca),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x8f24fd===_0x17917d(0x19a)){const _0x2290c4=_0x418903[_0x17917d(0x26d)]['userIds'];if(!Array[_0x17917d(0x1fb)](_0x2290c4)||_0x2290c4[_0x17917d(0x203)]===0x0)_0x411380[_0x17917d(0x262)]({'path':_0xab4347+'.assignee.userIds','message':_0x17917d(0x1ec)});else{const _0x43d521=_0x2290c4[_0x17917d(0x21b)](_0x46e5ec=>!isValidUserId(_0x46e5ec));_0x43d521>=0x0&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+'.assignee.userIds['+_0x43d521+']','message':_0x17917d(0x19b)});const _0x4f1dcc=new Set(_0x2290c4[_0x17917d(0x191)](isValidUserId)[_0x17917d(0x1e5)](_0x139f4b=>String(_0x139f4b)[_0x17917d(0x26a)]()));_0x445b18===_0x17917d(0x27b)&&_0x4f1dcc['size']>0x1&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x178),'message':_0x17917d(0x14e)});}}if(_0x8f24fd===_0x17917d(0x16f)){const _0x1bb9ef=_0x418903['assignee'][_0x17917d(0x1bb)],_0x3517c4=typeof _0x1bb9ef===_0x17917d(0x297)||typeof _0x1bb9ef===_0x17917d(0x1fe)?Number(String(_0x1bb9ef)[_0x17917d(0x26a)]()):Number[_0x17917d(0x21a)];(!Number[_0x17917d(0x169)](_0x3517c4)||_0x3517c4<=0x0)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x24e),'message':_0x17917d(0x1a2)});}}if(_0x418903[_0x17917d(0x1e7)]!==undefined){if(!isRecord(_0x418903[_0x17917d(0x1e7)]))_0x411380[_0x17917d(0x262)]({'path':_0xab4347+'.transferCandidates','message':_0x17917d(0x14c)});else{if(_0x418903[_0x17917d(0x1e7)][_0x17917d(0x1b8)]!==_0x17917d(0x19a))_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x280),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x427801=_0x418903[_0x17917d(0x1e7)]['userIds'];if(!Array[_0x17917d(0x1fb)](_0x427801)||_0x427801[_0x17917d(0x203)]===0x0)_0x411380['push']({'path':_0xab4347+_0x17917d(0x29f),'message':_0x17917d(0x16a)});else{const _0x47445e=_0x427801['findIndex'](_0x3899e4=>!isValidUserId(_0x3899e4));_0x47445e>=0x0&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x27c)+_0x47445e+']','message':_0x17917d(0x260)});}}}}}_0x418903['sequential']!==undefined&&typeof _0x418903[_0x17917d(0x18d)]!==_0x17917d(0x28f)&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+'.sequential','message':_0x17917d(0x18f)});if(_0x418903[_0x17917d(0x279)]===_0x17917d(0x215)){(typeof _0x418903[_0x17917d(0x184)]!==_0x17917d(0x1fe)||_0x418903[_0x17917d(0x184)][_0x17917d(0x26a)]()==='')&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x228),'message':_0x17917d(0x1a7)});if(_0x418903[_0x17917d(0x28b)]!==undefined){if(typeof _0x418903[_0x17917d(0x28b)]!==_0x17917d(0x1fe)||!VARIABLE_PATTERN[_0x17917d(0x285)](_0x418903[_0x17917d(0x28b)]))_0x411380[_0x17917d(0x262)]({'path':_0xab4347+_0x17917d(0x1f8),'message':_0x17917d(0x211)});else(RESERVED_RESULT_VARIABLES[_0x17917d(0x152)](_0x418903[_0x17917d(0x28b)])||_0x418903[_0x17917d(0x28b)]['startsWith'](_0x17917d(0x183)))&&_0x411380[_0x17917d(0x262)]({'path':_0xab4347+'.resultVariable','message':_0x17917d(0x1dd)+_0x418903['resultVariable']+'.'});}}validateAsyncExecution(_0x418903,_0xab4347,_0x411380),validateApprovalTimeout(_0x418903,_0xab4347,_0x411380),validateCcConfig(_0x418903,_0xab4347,_0x411380),_0x418903['type']===_0x17917d(0x1d8)&&validateNotificationConfig(_0x418903[_0x17917d(0x1eb)],_0xab4347+_0x17917d(0x29b),_0x411380);}function validateAsyncExecution(_0x191460,_0x2f8cc2,_0x57383e){const _0x45f10d=a281_0x3406bd;if(_0x191460[_0x45f10d(0x266)]===undefined)return;if(!isRecord(_0x191460['async'])){_0x57383e[_0x45f10d(0x262)]({'path':_0x2f8cc2+'.async','message':'async\x20must\x20be\x20an\x20object.'});return;}if(_0x191460[_0x45f10d(0x266)]['enabled']!==undefined&&typeof _0x191460['async']['enabled']!==_0x45f10d(0x28f)){_0x57383e['push']({'path':_0x2f8cc2+_0x45f10d(0x17b),'message':_0x45f10d(0x1d1)});return;}if(_0x191460[_0x45f10d(0x266)]['enabled']!==!![])return;_0x191460['type']!==_0x45f10d(0x215)&&_0x57383e[_0x45f10d(0x262)]({'path':_0x2f8cc2+_0x45f10d(0x275),'message':_0x45f10d(0x205)});const _0x5ba7cb=_0x191460[_0x45f10d(0x266)]['retryCount']??0x3;(!Number[_0x45f10d(0x231)](_0x5ba7cb)||_0x5ba7cb<0x1||_0x5ba7cb>MAX_ASYNC_RETRY_COUNT)&&_0x57383e[_0x45f10d(0x262)]({'path':_0x2f8cc2+'.async.retryCount','message':_0x45f10d(0x1f2)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x191460['async'][_0x45f10d(0x207)]!==undefined&&validateTimeAmount(_0x191460[_0x45f10d(0x266)][_0x45f10d(0x207)],_0x2f8cc2+_0x45f10d(0x27f),_0x57383e);}function a281_0x102f(_0x2c7563,_0x917277){_0x2c7563=_0x2c7563-0x141;const _0x1c91b9=a281_0x1c91();let _0x102f71=_0x1c91b9[_0x2c7563];return _0x102f71;}function validateApprovalTimeout(_0x4d069d,_0x49374a,_0x328ff8){const _0x33af46=a281_0x3406bd;if(_0x4d069d['timeout']===undefined)return;if(!isRecord(_0x4d069d[_0x33af46(0x227)])){_0x328ff8[_0x33af46(0x262)]({'path':_0x49374a+_0x33af46(0x22c),'message':_0x33af46(0x254)});return;}if(_0x4d069d['timeout']['enabled']!==undefined&&typeof _0x4d069d[_0x33af46(0x227)][_0x33af46(0x2ad)]!=='boolean'){_0x328ff8[_0x33af46(0x262)]({'path':_0x49374a+'.timeout.enabled','message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x4d069d[_0x33af46(0x227)][_0x33af46(0x2ad)]!==!![])return;if(_0x4d069d[_0x33af46(0x227)]['interrupting']!==undefined&&typeof _0x4d069d[_0x33af46(0x227)]['interrupting']!==_0x33af46(0x28f)){_0x328ff8['push']({'path':_0x49374a+_0x33af46(0x1b7),'message':_0x33af46(0x258)});return;}_0x4d069d[_0x33af46(0x279)]!==_0x33af46(0x271)&&_0x328ff8['push']({'path':_0x49374a+'.timeout','message':_0x33af46(0x259)});validateTimeAmount(_0x4d069d[_0x33af46(0x227)]['duration'],_0x49374a+_0x33af46(0x252),_0x328ff8);const _0x12c6f2=_0x4d069d[_0x33af46(0x227)][_0x33af46(0x2a3)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x33af46(0x152)](_0x12c6f2)){_0x328ff8[_0x33af46(0x262)]({'path':_0x49374a+_0x33af46(0x16b),'message':_0x33af46(0x1c6)});return;}(_0x4d069d[_0x33af46(0x173)]??_0x33af46(0x271))===_0x33af46(0x163)&&_0x12c6f2!==_0x33af46(0x1c8)&&_0x328ff8['push']({'path':_0x49374a+_0x33af46(0x16b),'message':_0x33af46(0x154)});const _0x2c2c40=_0x4d069d[_0x33af46(0x227)]['interrupting']??_0x12c6f2!==_0x33af46(0x1c8);if(_0x12c6f2===_0x33af46(0x1c8))_0x2c2c40&&_0x328ff8[_0x33af46(0x262)]({'path':_0x49374a+_0x33af46(0x1b7),'message':_0x33af46(0x1fd)}),(typeof _0x4d069d[_0x33af46(0x227)][_0x33af46(0x184)]!==_0x33af46(0x1fe)||_0x4d069d[_0x33af46(0x227)][_0x33af46(0x184)]['trim']()==='')&&_0x328ff8[_0x33af46(0x262)]({'path':_0x49374a+_0x33af46(0x268),'message':_0x33af46(0x160)}),validateOptionalResultVariable(_0x4d069d[_0x33af46(0x227)][_0x33af46(0x28b)],_0x49374a+_0x33af46(0x145),_0x328ff8);else!_0x2c2c40&&_0x328ff8[_0x33af46(0x262)]({'path':_0x49374a+_0x33af46(0x1b7),'message':_0x12c6f2+_0x33af46(0x175)});}function validateTimeAmount(_0x4e3e64,_0x559e19,_0x2e5919){const _0x4c3e0d=a281_0x3406bd;if(!isRecord(_0x4e3e64)){_0x2e5919[_0x4c3e0d(0x262)]({'path':_0x559e19,'message':_0x4c3e0d(0x2a2)});return;}(!Number[_0x4c3e0d(0x231)](_0x4e3e64[_0x4c3e0d(0x21e)])||Number(_0x4e3e64[_0x4c3e0d(0x21e)])<=0x0)&&_0x2e5919[_0x4c3e0d(0x262)]({'path':_0x559e19+'.value','message':_0x4c3e0d(0x161)}),!FLOW_TIME_UNITS[_0x4c3e0d(0x152)](_0x4e3e64['unit'])&&_0x2e5919[_0x4c3e0d(0x262)]({'path':_0x559e19+'.unit','message':_0x4c3e0d(0x242)});}function validateOptionalResultVariable(_0x25da3a,_0x3ceaec,_0x5abadd){const _0x461cf0=a281_0x3406bd;if(_0x25da3a===undefined||_0x25da3a===null||_0x25da3a==='')return;if(typeof _0x25da3a!==_0x461cf0(0x1fe)||!VARIABLE_PATTERN['test'](_0x25da3a))_0x5abadd[_0x461cf0(0x262)]({'path':_0x3ceaec,'message':_0x461cf0(0x211)});else(RESERVED_RESULT_VARIABLES[_0x461cf0(0x152)](_0x25da3a)||_0x25da3a[_0x461cf0(0x150)](_0x461cf0(0x183)))&&_0x5abadd[_0x461cf0(0x262)]({'path':_0x3ceaec,'message':'Reserved\x20resultVariable:\x20'+_0x25da3a+'.'});}function validateCcConfig(_0x2bf48c,_0x143ae4,_0x58516a){const _0x1e7ae2=a281_0x3406bd;if(_0x2bf48c['cc']===undefined)return;if(!isRecord(_0x2bf48c['cc'])){_0x58516a['push']({'path':_0x143ae4+_0x1e7ae2(0x21c),'message':_0x1e7ae2(0x18c)});return;}_0x2bf48c[_0x1e7ae2(0x279)]!==_0x1e7ae2(0x1a4)&&_0x2bf48c[_0x1e7ae2(0x279)]!==_0x1e7ae2(0x271)&&_0x58516a[_0x1e7ae2(0x262)]({'path':_0x143ae4+_0x1e7ae2(0x21c),'message':_0x1e7ae2(0x278)});Object[_0x1e7ae2(0x1f7)][_0x1e7ae2(0x1ed)][_0x1e7ae2(0x256)](_0x2bf48c['cc'],'readSources')&&_0x58516a[_0x1e7ae2(0x262)]({'path':_0x143ae4+_0x1e7ae2(0x23e),'message':UNSUPPORTED_FORM_MESSAGE});const _0x1ae637=_0x2bf48c['cc'][_0x1e7ae2(0x29e)];if(!Array[_0x1e7ae2(0x1fb)](_0x1ae637)||_0x1ae637[_0x1e7ae2(0x203)]===0x0)_0x58516a[_0x1e7ae2(0x262)]({'path':_0x143ae4+_0x1e7ae2(0x25c),'message':_0x1e7ae2(0x26c)});else{_0x1ae637[_0x1e7ae2(0x203)]>MAX_CC_RECIPIENTS&&_0x58516a[_0x1e7ae2(0x262)]({'path':_0x143ae4+'.cc.recipientUserIds','message':_0x1e7ae2(0x166)+MAX_CC_RECIPIENTS+_0x1e7ae2(0x22e)});const _0x38613d=new Set();_0x1ae637[_0x1e7ae2(0x269)]((_0x283db5,_0x21d1ea)=>{const _0x5b0736=_0x1e7ae2;if(typeof _0x283db5!=='string'||_0x283db5[_0x5b0736(0x26a)]()==='')_0x58516a[_0x5b0736(0x262)]({'path':_0x143ae4+'.cc.recipientUserIds['+_0x21d1ea+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x38613d[_0x5b0736(0x152)](_0x283db5[_0x5b0736(0x26a)]())?_0x58516a[_0x5b0736(0x262)]({'path':_0x143ae4+'.cc.recipientUserIds['+_0x21d1ea+']','message':_0x5b0736(0x240)+_0x283db5['trim']()+'.'}):_0x38613d[_0x5b0736(0x224)](_0x283db5[_0x5b0736(0x26a)]());});}validateStringArray(_0x2bf48c['cc']['visible'],_0x143ae4+_0x1e7ae2(0x146),_0x58516a);}function validateStringArray(_0x4a2125,_0x3a6aaf,_0x2366ad){const _0x62d0f4=a281_0x3406bd;if(_0x4a2125===undefined)return;if(!Array[_0x62d0f4(0x1fb)](_0x4a2125)){_0x2366ad['push']({'path':_0x3a6aaf,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0x19fdc5=new Set();_0x4a2125['forEach']((_0x3849d7,_0x202dcb)=>{const _0x591d64=_0x62d0f4;if(typeof _0x3849d7!==_0x591d64(0x1fe)||_0x3849d7[_0x591d64(0x26a)]()==='')_0x2366ad[_0x591d64(0x262)]({'path':_0x3a6aaf+'['+_0x202dcb+']','message':_0x591d64(0x263)});else _0x19fdc5[_0x591d64(0x152)](_0x3849d7[_0x591d64(0x26a)]())?_0x2366ad['push']({'path':_0x3a6aaf+'['+_0x202dcb+']','message':_0x591d64(0x29c)+_0x3849d7[_0x591d64(0x26a)]()+'.'}):_0x19fdc5[_0x591d64(0x224)](_0x3849d7['trim']());});}function validateNotificationConfig(_0x15591b,_0x3e1ce4,_0x238a7e){const _0x2cede1=a281_0x3406bd;if(!isRecord(_0x15591b)){_0x238a7e[_0x2cede1(0x262)]({'path':_0x3e1ce4,'message':_0x2cede1(0x155)});return;}if(_0x15591b[_0x2cede1(0x225)]!==undefined&&_0x15591b[_0x2cede1(0x225)]!==null){if(typeof _0x15591b[_0x2cede1(0x225)]!=='string')_0x238a7e[_0x2cede1(0x262)]({'path':_0x3e1ce4+_0x2cede1(0x230),'message':_0x2cede1(0x1fa)});else _0x15591b[_0x2cede1(0x225)][_0x2cede1(0x26a)]()&&_0x15591b[_0x2cede1(0x225)][_0x2cede1(0x26a)]()!=='v1'&&_0x238a7e[_0x2cede1(0x262)]({'path':_0x3e1ce4+'.version','message':_0x2cede1(0x15b)+_0x15591b[_0x2cede1(0x225)]+'.'});}const _0x221e92=requireNotificationString(_0x15591b[_0x2cede1(0x1b2)],_0x3e1ce4+_0x2cede1(0x1cb),_0x2cede1(0x294),_0x238a7e);_0x221e92?.['includes']('${')&&_0x238a7e[_0x2cede1(0x262)]({'path':_0x3e1ce4+'.configCode','message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x15591b[_0x2cede1(0x1b0)]!==undefined&&_0x15591b[_0x2cede1(0x1b0)]!==null){if(typeof _0x15591b[_0x2cede1(0x1b0)]!==_0x2cede1(0x1fe))_0x238a7e['push']({'path':_0x3e1ce4+'.failurePolicy','message':'failurePolicy\x20must\x20be\x20a\x20string.'});else!NOTIFICATION_FAILURE_POLICIES[_0x2cede1(0x152)](_0x15591b[_0x2cede1(0x1b0)][_0x2cede1(0x26a)]()[_0x2cede1(0x273)]())&&_0x238a7e[_0x2cede1(0x262)]({'path':_0x3e1ce4+_0x2cede1(0x222),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x15591b[_0x2cede1(0x2a6)])?_0x238a7e[_0x2cede1(0x262)]({'path':_0x3e1ce4+_0x2cede1(0x217),'message':_0x2cede1(0x16e)}):validateNotificationTemplate(_0x15591b[_0x2cede1(0x2a6)],_0x3e1ce4+'.template',_0x238a7e),validateNotificationRecipients(_0x15591b[_0x2cede1(0x253)],_0x3e1ce4+_0x2cede1(0x20c),_0x238a7e);}function validateNotificationTemplate(_0x20171b,_0x5cde72,_0x2fa6b5){const _0x4a2c43=a281_0x3406bd;for(const _0x5ac714 of['title','summary']){const _0x4bd61f=requireNotificationString(_0x20171b[_0x5ac714],_0x5cde72+'.'+_0x5ac714,_0x4a2c43(0x182)+_0x5ac714+_0x4a2c43(0x29a),_0x2fa6b5);if(_0x4bd61f)validateNotificationPlaceholders(_0x4bd61f,_0x5cde72+'.'+_0x5ac714,_0x2fa6b5);}_0x20171b['detailMarkdown']!==undefined&&_0x20171b[_0x4a2c43(0x200)]!==null&&(typeof _0x20171b['detailMarkdown']!==_0x4a2c43(0x1fe)?_0x2fa6b5[_0x4a2c43(0x262)]({'path':_0x5cde72+_0x4a2c43(0x1f0),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x20171b['detailMarkdown'],_0x5cde72+_0x4a2c43(0x1f0),_0x2fa6b5)),validateNotificationFacts(_0x20171b[_0x4a2c43(0x197)],_0x5cde72+'.facts',_0x2fa6b5),validateNotificationActions(_0x20171b[_0x4a2c43(0x2a9)],_0x5cde72+_0x4a2c43(0x1f9),_0x2fa6b5);}function validateNotificationFacts(_0x177e4c,_0x20321a,_0x3568fd){const _0x4c1279=a281_0x3406bd;if(_0x177e4c===undefined||_0x177e4c===null)return;if(!Array[_0x4c1279(0x1fb)](_0x177e4c)){_0x3568fd['push']({'path':_0x20321a,'message':_0x4c1279(0x1fc)});return;}_0x177e4c[_0x4c1279(0x203)]>MAX_NOTIFICATION_FACTS&&_0x3568fd['push']({'path':_0x20321a,'message':_0x4c1279(0x15c)+MAX_NOTIFICATION_FACTS+'\x20facts.'}),_0x177e4c[_0x4c1279(0x269)]((_0x15687c,_0x1badff)=>{const _0x12de03=_0x4c1279,_0xef95cf=_0x20321a+'['+_0x1badff+']';if(!isRecord(_0x15687c)){_0x3568fd[_0x12de03(0x262)]({'path':_0xef95cf,'message':_0x12de03(0x1a3)});return;}for(const _0x3edf99 of[_0x12de03(0x158),'value']){const _0x55e495=requireNotificationString(_0x15687c[_0x3edf99],_0xef95cf+'.'+_0x3edf99,_0x12de03(0x153)+_0x3edf99+'\x20is\x20required.',_0x3568fd);_0x55e495&&validateNotificationPlaceholders(_0x55e495,_0xef95cf+'.'+_0x3edf99,_0x3568fd);}});}function validateNotificationActions(_0x513d7a,_0x68bb65,_0x41bbff){const _0x49418c=a281_0x3406bd;if(_0x513d7a===undefined||_0x513d7a===null)return;if(!Array[_0x49418c(0x1fb)](_0x513d7a)){_0x41bbff[_0x49418c(0x262)]({'path':_0x68bb65,'message':_0x49418c(0x2aa)});return;}_0x513d7a[_0x49418c(0x203)]>MAX_NOTIFICATION_ACTIONS&&_0x41bbff['push']({'path':_0x68bb65,'message':_0x49418c(0x15c)+MAX_NOTIFICATION_ACTIONS+_0x49418c(0x23d)}),_0x513d7a[_0x49418c(0x269)]((_0x18833f,_0x2c6137)=>{const _0xb0b077=_0x49418c,_0x23cc2c=_0x68bb65+'['+_0x2c6137+']';if(!isRecord(_0x18833f)){_0x41bbff[_0xb0b077(0x262)]({'path':_0x23cc2c,'message':_0xb0b077(0x18b)});return;}const _0x4ee48f=requireNotificationString(_0x18833f[_0xb0b077(0x1f1)],_0x23cc2c+_0xb0b077(0x1c7),_0xb0b077(0x243),_0x41bbff);if(_0x4ee48f)validateNotificationPlaceholders(_0x4ee48f,_0x23cc2c+_0xb0b077(0x1c7),_0x41bbff);const _0x29ccfc=requireNotificationString(_0x18833f[_0xb0b077(0x209)],_0x23cc2c+_0xb0b077(0x270),_0xb0b077(0x1b6),_0x41bbff);if(!_0x29ccfc)return;validateNotificationPlaceholders(_0x29ccfc,_0x23cc2c+_0xb0b077(0x270),_0x41bbff),!/^https?:\/\//i['test'](_0x29ccfc)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0xb0b077(0x285)](_0x29ccfc)&&_0x41bbff['push']({'path':_0x23cc2c+_0xb0b077(0x270),'message':_0xb0b077(0x2a8)});});}function validateNotificationRecipients(_0x13ccf6,_0x310e0f,_0x5e0dde){const _0x3d5fc1=a281_0x3406bd;if(_0x13ccf6===undefined||_0x13ccf6===null)return;if(!Array[_0x3d5fc1(0x1fb)](_0x13ccf6)){_0x5e0dde['push']({'path':_0x310e0f,'message':_0x3d5fc1(0x265)});return;}let _0x341f9a=![];_0x13ccf6['forEach']((_0x333e68,_0x249c1e)=>{const _0x4fc9bb=_0x3d5fc1,_0x2e4c90=_0x310e0f+'['+_0x249c1e+']';if(!isRecord(_0x333e68)){_0x5e0dde['push']({'path':_0x2e4c90,'message':_0x4fc9bb(0x149)});return;}const _0x16653a=requireNotificationString(_0x333e68[_0x4fc9bb(0x279)],_0x2e4c90+'.type','Notification\x20recipient.type\x20is\x20required.',_0x5e0dde);_0x16653a&&!NOTIFICATION_RECIPIENT_TYPES[_0x4fc9bb(0x152)](_0x16653a[_0x4fc9bb(0x273)]())&&_0x5e0dde['push']({'path':_0x2e4c90+_0x4fc9bb(0x267),'message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x22c59b='TO';_0x333e68[_0x4fc9bb(0x2ae)]!==undefined&&_0x333e68['role']!==null&&(typeof _0x333e68['role']!==_0x4fc9bb(0x1fe)?(_0x5e0dde[_0x4fc9bb(0x262)]({'path':_0x2e4c90+_0x4fc9bb(0x17d),'message':'Notification\x20recipient.role\x20must\x20be\x20a\x20string.'}),_0x22c59b=''):(_0x22c59b=_0x333e68[_0x4fc9bb(0x2ae)]['trim']()[_0x4fc9bb(0x273)](),!NOTIFICATION_RECIPIENT_ROLES[_0x4fc9bb(0x152)](_0x22c59b)&&_0x5e0dde[_0x4fc9bb(0x262)]({'path':_0x2e4c90+_0x4fc9bb(0x17d),'message':_0x4fc9bb(0x1b3)})));if(_0x22c59b==='TO')_0x341f9a=!![];const _0x5c609d=requireNotificationString(_0x333e68[_0x4fc9bb(0x21e)],_0x2e4c90+_0x4fc9bb(0x232),'Notification\x20recipient.value\x20is\x20required.',_0x5e0dde);_0x5c609d&&validateNotificationPlaceholders(_0x5c609d,_0x2e4c90+_0x4fc9bb(0x232),_0x5e0dde);}),_0x13ccf6['length']>0x0&&!_0x341f9a&&_0x5e0dde[_0x3d5fc1(0x262)]({'path':_0x310e0f,'message':_0x3d5fc1(0x1ad)});}function requireNotificationString(_0x4b9a24,_0x1d105e,_0x48a3f6,_0x2522ff){const _0x8022ca=a281_0x3406bd;if(typeof _0x4b9a24!==_0x8022ca(0x1fe)||_0x4b9a24[_0x8022ca(0x26a)]()==='')return _0x2522ff['push']({'path':_0x1d105e,'message':_0x48a3f6}),undefined;return _0x4b9a24[_0x8022ca(0x26a)]();}function validateNotificationPlaceholders(_0x9a737d,_0x5639c2,_0x20b62d){const _0x29fe29=a281_0x3406bd;for(const _0x21240d of _0x9a737d['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4e53bf=_0x21240d[0x1]?.[_0x29fe29(0x26a)]()??'',_0x4e66d1=_0x4e53bf['indexOf']('.'),_0x1aa69=_0x4e66d1>=0x0?_0x4e53bf['slice'](0x0,_0x4e66d1):_0x4e53bf,_0x476fe6=_0x4e66d1>=0x0?_0x4e53bf['slice'](_0x4e66d1+0x1)[_0x29fe29(0x26a)]():'';(![_0x29fe29(0x181),'context',_0x29fe29(0x219)][_0x29fe29(0x28e)](_0x1aa69)||_0x476fe6==='')&&_0x20b62d[_0x29fe29(0x262)]({'path':_0x5639c2,'message':_0x29fe29(0x26f)+_0x21240d[0x0]+'.'});}_0x9a737d[_0x29fe29(0x18e)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x20b62d['push']({'path':_0x5639c2,'message':_0x29fe29(0x23c)});}function validateEdge(_0x26c40d,_0x2f8b07,_0x3f7fac){const _0x45f309=a281_0x3406bd;_0x26c40d[_0x45f309(0x206)]!==undefined&&typeof _0x26c40d[_0x45f309(0x206)]!==_0x45f309(0x1fe)&&_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+'.name','message':_0x45f309(0x18a)}),_0x26c40d[_0x45f309(0x2a0)]!==undefined&&typeof _0x26c40d[_0x45f309(0x2a0)]!==_0x45f309(0x28f)&&_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+_0x45f309(0x2a7),'message':_0x45f309(0x248)}),_0x26c40d[_0x45f309(0x235)]!==undefined&&(!Array[_0x45f309(0x1fb)](_0x26c40d[_0x45f309(0x235)])?_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+_0x45f309(0x148),'message':_0x45f309(0x23b)}):_0x26c40d[_0x45f309(0x235)][_0x45f309(0x269)]((_0x44ab59,_0x2f3bd5)=>{const _0x1002b6=_0x45f309;if(!isRecord(_0x44ab59)){_0x3f7fac['push']({'path':_0x2f8b07+_0x1002b6(0x15a)+_0x2f3bd5+']','message':_0x1002b6(0x1b5)});return;}for(const _0x83f294 of['x','y']){const _0x1f6bb2=_0x44ab59[_0x83f294];(typeof _0x1f6bb2!==_0x1002b6(0x297)||!Number[_0x1002b6(0x1a6)](_0x1f6bb2))&&_0x3f7fac['push']({'path':_0x2f8b07+_0x1002b6(0x15a)+_0x2f3bd5+'].'+_0x83f294,'message':_0x1002b6(0x1dc)+_0x83f294+_0x1002b6(0x1bc)});}})),_0x26c40d[_0x45f309(0x264)]!==undefined&&!CONDITION_TYPES[_0x45f309(0x152)](_0x26c40d[_0x45f309(0x264)])&&_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+'.conditionType','message':_0x45f309(0x1de)+String(_0x26c40d[_0x45f309(0x264)])+'.'}),_0x26c40d[_0x45f309(0x264)]===_0x45f309(0x171)&&(typeof _0x26c40d[_0x45f309(0x1ab)]!=='string'||_0x26c40d[_0x45f309(0x1ab)][_0x45f309(0x26a)]()==='')&&_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+'.expression','message':_0x45f309(0x287)}),_0x26c40d['defaultFlow']===!![]&&_0x26c40d['conditionType']!==_0x45f309(0x25e)&&_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+_0x45f309(0x2a7),'message':_0x45f309(0x1cc)}),_0x26c40d[_0x45f309(0x2a0)]===!![]&&typeof _0x26c40d[_0x45f309(0x1ab)]===_0x45f309(0x1fe)&&_0x26c40d[_0x45f309(0x1ab)][_0x45f309(0x26a)]()!==''&&_0x3f7fac[_0x45f309(0x262)]({'path':_0x2f8b07+_0x45f309(0x1d5),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x8359e2,_0x83ecc1,_0x48e4c0,_0xf20880,_0x38c822,_0xa2728c,_0x3324f4){const _0x3475c1=a281_0x3406bd;for(const [_0x1b41dd,_0xdf86b0]of _0x8359e2){const _0x4fb8e5=_0x38c822[_0x3475c1(0x1d9)](_0x1b41dd)??[],_0xd050a=_0xf20880[_0x3475c1(0x1d9)](_0x1b41dd)??[];_0xdf86b0[_0x3475c1(0x279)]!==_0x3475c1(0x286)&&_0x4fb8e5[_0x3475c1(0x203)]===0x0&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x189)});_0xdf86b0[_0x3475c1(0x279)]!==_0x3475c1(0x1a4)&&_0xd050a[_0x3475c1(0x203)]===0x0&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x159)});_0xdf86b0['type']===_0x3475c1(0x286)&&_0x4fb8e5['length']>0x0&&_0x3324f4['push']({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x1e8)});_0xdf86b0[_0x3475c1(0x279)]===_0x3475c1(0x1a4)&&_0xd050a['length']>0x0&&_0x3324f4['push']({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x212)});if(_0xdf86b0[_0x3475c1(0x279)]==='CONDITION'){_0xd050a[_0x3475c1(0x203)]<0x2&&_0x3324f4['push']({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x1b1)});const _0x445685=_0xd050a[_0x3475c1(0x191)](_0x7b2b86=>_0x7b2b86[_0x3475c1(0x2a0)]===!![]);_0x445685[_0x3475c1(0x203)]!==0x1&&_0x3324f4['push']({'path':'flowJson.nodes.'+_0x1b41dd,'message':_0x3475c1(0x180)});if(_0x445685[_0x3475c1(0x203)]===0x1){const _0xe6bb61=_0x445685[0x0],_0x92dc6f=_0xa2728c[_0x3475c1(0x1d9)](_0xe6bb61)??'flowJson.edges';_0xe6bb61[_0x3475c1(0x264)]!==_0x3475c1(0x25e)&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x92dc6f+_0x3475c1(0x29d),'message':_0x3475c1(0x250)});_0xe6bb61[_0x3475c1(0x1ab)]!==undefined&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x92dc6f+_0x3475c1(0x1d5),'message':_0x3475c1(0x282)});for(const _0x2f6b41 of _0xd050a){if(_0x2f6b41===_0xe6bb61)continue;const _0x34334b=_0xa2728c[_0x3475c1(0x1d9)](_0x2f6b41)??'flowJson.edges';if(_0x2f6b41[_0x3475c1(0x264)]!==_0x3475c1(0x171))_0x3324f4[_0x3475c1(0x262)]({'path':_0x34334b+_0x3475c1(0x29d),'message':_0x3475c1(0x298)});else(typeof _0x2f6b41[_0x3475c1(0x1ab)]!=='string'||_0x2f6b41['expression']['trim']()==='')&&_0x3324f4['push']({'path':_0x34334b+_0x3475c1(0x1d5),'message':_0x3475c1(0x17a)});}}}if(_0xdf86b0[_0x3475c1(0x279)]==='APPROVAL'&&(_0xdf86b0[_0x3475c1(0x173)]??_0x3475c1(0x271))===_0x3475c1(0x163)){if(_0xd050a['length']!==0x1)_0x3324f4[_0x3475c1(0x262)]({'path':'flowJson.nodes.'+_0x1b41dd,'message':_0x3475c1(0x1c3)});else{const _0x5453d6=_0xd050a[0x0];((_0x5453d6[_0x3475c1(0x264)]??'ALWAYS')!==_0x3475c1(0x25e)||_0x5453d6[_0x3475c1(0x2a0)]===!![]||typeof _0x5453d6[_0x3475c1(0x1ab)]===_0x3475c1(0x1fe)&&_0x5453d6[_0x3475c1(0x1ab)]['trim']()!=='')&&_0x3324f4[_0x3475c1(0x262)]({'path':_0xa2728c[_0x3475c1(0x1d9)](_0x5453d6)??_0x3475c1(0x167),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0xdf86b0[_0x3475c1(0x279)]===_0x3475c1(0x271)){const _0x28232d=_0xd050a[_0x3475c1(0x1e5)](_0x5859a0=>_0x5859a0[_0x3475c1(0x264)]??_0x3475c1(0x25e)),_0x3be986=_0x28232d[_0x3475c1(0x191)](_0xd6215b=>_0xd6215b!=='APPROVED'&&_0xd6215b!=='REJECTED');_0x3be986[_0x3475c1(0x203)]>0x0&&_0x3324f4['push']({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x274)}),_0x28232d[_0x3475c1(0x191)](_0x589145=>_0x589145==='APPROVED')[_0x3475c1(0x203)]!==0x1&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x17f)}),_0x28232d['filter'](_0x2c94a3=>_0x2c94a3===_0x3475c1(0x1cd))[_0x3475c1(0x203)]!==0x1&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x251)}),_0xd050a[_0x3475c1(0x288)](_0x1ad248=>_0x1ad248[_0x3475c1(0x2a0)]===!![])&&_0x3324f4['push']({'path':_0x3475c1(0x1df)+_0x1b41dd,'message':_0x3475c1(0x1d4)});}}}const _0x501131=new Set(),_0x198d0a=_0xf1feed=>{const _0x597295=_0x3475c1;if(_0x501131[_0x597295(0x152)](_0xf1feed))return;_0x501131[_0x597295(0x224)](_0xf1feed);for(const _0x493e2c of _0xf20880[_0x597295(0x1d9)](_0xf1feed)??[]){const _0x8341d0=resolveEdgeEndpoint(_0x493e2c[_0x597295(0x257)],_0x493e2c['targetNodeId']);if(_0x8341d0&&_0x8359e2[_0x597295(0x152)](_0x8341d0))_0x198d0a(_0x8341d0);}};_0x198d0a(_0x83ecc1);for(const _0x6aaed1 of _0x8359e2[_0x3475c1(0x17c)]()){!_0x501131[_0x3475c1(0x152)](_0x6aaed1)&&_0x3324f4[_0x3475c1(0x262)]({'path':_0x3475c1(0x1df)+_0x6aaed1,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x34d205=_0x48e4c0[_0x3475c1(0x288)](_0x2c4ed7=>_0x501131[_0x3475c1(0x152)](_0x2c4ed7));if(!_0x34d205){_0x3324f4[_0x3475c1(0x262)]({'path':_0x3475c1(0x167),'message':_0x3475c1(0x1ba)});return;}const _0x1fcd99=new Set(),_0x2f024d=_0x577afc=>{const _0x271791=_0x3475c1;if(_0x1fcd99[_0x271791(0x152)](_0x577afc))return;_0x1fcd99[_0x271791(0x224)](_0x577afc);for(const _0x3f08fc of _0x38c822['get'](_0x577afc)??[]){const _0x5152cd=resolveEdgeEndpoint(_0x3f08fc['source'],_0x3f08fc[_0x271791(0x22b)]);if(_0x5152cd&&_0x8359e2[_0x271791(0x152)](_0x5152cd))_0x2f024d(_0x5152cd);}};for(const _0x129c30 of _0x48e4c0){if(_0x8359e2['has'](_0x129c30))_0x2f024d(_0x129c30);}for(const _0x379e51 of _0x501131){!_0x1fcd99[_0x3475c1(0x152)](_0x379e51)&&_0x3324f4[_0x3475c1(0x262)]({'path':'flowJson.nodes.'+_0x379e51,'message':_0x3475c1(0x245)});}}function validateApprovalResults(_0xc420e6,_0x404f4f,_0x1f17ad,_0xe708b3){const _0x21b9e0=a281_0x3406bd;if(_0x404f4f===0x0)return;const _0x264ada=new Set(_0x1f17ad[_0x21b9e0(0x1e5)](_0x1c6f10=>_0xc420e6[_0x21b9e0(0x1d9)](_0x1c6f10)?.[_0x21b9e0(0x192)])['filter'](_0x104065=>typeof _0x104065===_0x21b9e0(0x1fe)));for(const _0x40cb39 of[_0x21b9e0(0x293),_0x21b9e0(0x1cd)]){!_0x264ada[_0x21b9e0(0x152)](_0x40cb39)&&_0xe708b3[_0x21b9e0(0x262)]({'path':_0x21b9e0(0x291),'message':_0x21b9e0(0x174)+_0x40cb39+'.'});}}function validateScriptResultReferences(_0x5c2f81,_0x2a76cb,_0x1617c0,_0x531581,_0x4cb35d,_0xab24b3,_0x1f4ef3){const _0x3f7156=a281_0x3406bd;if(_0xab24b3[_0x3f7156(0x1c1)]===0x0)return;const _0x13d05c=new Set(),_0x421693=_0x2fd266=>{const _0x1b5252=_0x3f7156;if(!_0x13d05c['has'](_0x2fd266)&&_0x5c2f81[_0x1b5252(0x152)](_0x2fd266)){_0x13d05c[_0x1b5252(0x224)](_0x2fd266);for(const _0x33bab0 of _0x1617c0[_0x1b5252(0x1d9)](_0x2fd266)??[]){const _0x36636a=resolveEdgeEndpoint(_0x33bab0['target'],_0x33bab0['targetNodeId']);if(_0x36636a)_0x421693(_0x36636a);}}};_0x421693(_0x2a76cb);const _0x6a934e=new Map();for(const _0x4f223e of _0x13d05c){_0x6a934e[_0x3f7156(0x26b)](_0x4f223e,_0x4f223e===_0x2a76cb?new Set([_0x2a76cb]):new Set(_0x13d05c));}let _0x43f89e=!![];while(_0x43f89e){_0x43f89e=![];for(const _0x943ed8 of _0x13d05c){if(_0x943ed8===_0x2a76cb)continue;const _0x4026a2=(_0x531581[_0x3f7156(0x1d9)](_0x943ed8)??[])[_0x3f7156(0x1e5)](_0x59a8c3=>resolveEdgeEndpoint(_0x59a8c3[_0x3f7156(0x199)],_0x59a8c3[_0x3f7156(0x22b)]))[_0x3f7156(0x191)](_0x4aca58=>Boolean(_0x4aca58&&_0x13d05c[_0x3f7156(0x152)](_0x4aca58)));if(_0x4026a2[_0x3f7156(0x203)]===0x0)continue;const _0x73a7a1=new Set(_0x6a934e[_0x3f7156(0x1d9)](_0x4026a2[0x0])??[]);for(const _0x11c9da of _0x4026a2[_0x3f7156(0x1d0)](0x1)){const _0x3d0f55=_0x6a934e[_0x3f7156(0x1d9)](_0x11c9da)??new Set();for(const _0x416e92 of _0x73a7a1){if(!_0x3d0f55['has'](_0x416e92))_0x73a7a1[_0x3f7156(0x289)](_0x416e92);}}_0x73a7a1[_0x3f7156(0x224)](_0x943ed8);const _0x22615d=_0x6a934e[_0x3f7156(0x1d9)](_0x943ed8);!setsEqual(_0x22615d,_0x73a7a1)&&(_0x6a934e[_0x3f7156(0x26b)](_0x943ed8,_0x73a7a1),_0x43f89e=!![]);}}for(const [_0x35c398,_0x29e271]of _0x1617c0){const _0x180b26=_0x6a934e[_0x3f7156(0x1d9)](_0x35c398);if(!_0x180b26)continue;for(const _0x282d4c of _0x29e271){if(_0x282d4c[_0x3f7156(0x264)]!==_0x3f7156(0x171)||typeof _0x282d4c[_0x3f7156(0x1ab)]!==_0x3f7156(0x1fe))continue;for(const [_0x53eee7,_0x1f66d3]of _0xab24b3){expressionReferencesVariable(_0x282d4c[_0x3f7156(0x1ab)],_0x53eee7)&&!_0x180b26[_0x3f7156(0x152)](_0x1f66d3)&&_0x1f4ef3[_0x3f7156(0x262)]({'path':(_0x4cb35d[_0x3f7156(0x1d9)](_0x282d4c)??'flowJson.edges')+_0x3f7156(0x1d5),'message':_0x3f7156(0x1d3)+_0x53eee7+_0x3f7156(0x26e)+_0x1f66d3+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x35c398+'.'});}}}}function expressionReferencesVariable(_0x5539e7,_0x6e796b){const _0x580400=a281_0x3406bd;let _0x2d59c5=0x0;while(_0x2d59c5<_0x5539e7[_0x580400(0x203)]){const _0x42a00c=_0x5539e7[_0x2d59c5];if(_0x42a00c==='\x27'||_0x42a00c==='\x22'){_0x2d59c5=skipQuotedExpressionSegment(_0x5539e7,_0x2d59c5,_0x42a00c);continue;}if(!/[A-Za-z_]/[_0x580400(0x285)](_0x42a00c)){_0x2d59c5+=0x1;continue;}const _0x1944de=_0x2d59c5;_0x2d59c5+=0x1;while(_0x2d59c5<_0x5539e7['length']&&/[A-Za-z0-9_]/[_0x580400(0x285)](_0x5539e7[_0x2d59c5])){_0x2d59c5+=0x1;}if(_0x5539e7[_0x580400(0x1d0)](_0x1944de,_0x2d59c5)!==_0x6e796b)continue;let _0x4cfc1c=_0x1944de-0x1;while(_0x4cfc1c>=0x0&&/\s/[_0x580400(0x285)](_0x5539e7[_0x4cfc1c])){_0x4cfc1c-=0x1;}if(_0x5539e7[_0x4cfc1c]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x347bb7,_0x14c03b,_0x2d3221){let _0x190537=_0x14c03b+0x1;while(_0x190537<_0x347bb7['length']){if(_0x347bb7[_0x190537]==='\x5c'){_0x190537+=0x2;continue;}if(_0x347bb7[_0x190537]===_0x2d3221)return _0x190537+0x1;_0x190537+=0x1;}return _0x190537;}function resolveEffectiveResultVariable(_0x3c9047,_0x1ff1bc){const _0x2134f1=a281_0x3406bd;if(_0x3c9047===undefined||_0x3c9047===null||_0x1ff1bc&&_0x3c9047==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x3c9047!==_0x2134f1(0x1fe)||!VARIABLE_PATTERN['test'](_0x3c9047)||RESERVED_RESULT_VARIABLES['has'](_0x3c9047)||_0x3c9047['startsWith']('approval_sys_'))return undefined;return _0x3c9047;}function registerResultVariableOwner(_0x3fa43d,_0x55ff55,_0x528948,_0x11f336){const _0x51552d=a281_0x3406bd;if(_0x3fa43d[_0x51552d(0x152)](_0x55ff55)){_0x11f336[_0x51552d(0x262)]({'path':_0x51552d(0x291),'message':'Duplicate\x20resultVariable:\x20'+_0x55ff55+'.'});return;}_0x3fa43d[_0x51552d(0x26b)](_0x55ff55,_0x528948);}function setsEqual(_0x1a7aa2,_0x5e35e9){const _0x58c9f1=a281_0x3406bd;return _0x1a7aa2[_0x58c9f1(0x1c1)]===_0x5e35e9[_0x58c9f1(0x1c1)]&&[..._0x1a7aa2][_0x58c9f1(0x185)](_0x1572d9=>_0x5e35e9[_0x58c9f1(0x152)](_0x1572d9));}function isValidUserId(_0x580c0e){const _0x946f28=a281_0x3406bd;if(typeof _0x580c0e==='string')return _0x580c0e[_0x946f28(0x26a)]()[_0x946f28(0x203)]>0x0;return Number[_0x946f28(0x169)](_0x580c0e)&&Number(_0x580c0e)>0x0;}function a281_0x1c91(){const _0x48a035=['Node\x20has\x20no\x20incoming\x20edge.','edge\x20name\x20must\x20be\x20a\x20string.','Notification\x20action\x20must\x20be\x20an\x20object.','cc\x20must\x20be\x20an\x20object.','sequential','replace','sequential\x20must\x20be\x20a\x20boolean.','object','filter','result','templateName','SECONDS','Rabetbase\x20FlowConfig','approval_sys_dataId','facts','approval_sys_datasetCode','source','FIXED','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.name','flowDesc\x20must\x20be\x20a\x20string.','INDEPENDENT_FLOW','utf8','nodes','.id','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','Notification\x20fact\x20must\x20be\x20an\x20object.','END','flowJson.nodes[','isFinite','SCRIPT\x20node\x20requires\x20scriptName.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','#/$defs/flowNode','EMAIL','expression','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','flowJson\x20must\x20be\x20an\x20object.','pageId','failurePolicy','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','configCode','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','flowType\x20is\x20required.','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','Notification\x20action.url\x20is\x20required.','.timeout.interrupting','strategy','37438qFqGbP','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','roleId','\x20must\x20be\x20a\x20finite\x20number.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','overwrite','approvalMode','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','size','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','CUSTOM_PAGE','flowJson.schemaVersion','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','.text','EXECUTE_BFF','ANY','.assignee.strategy','.configCode','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','REJECTED','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','https://json-schema.org/draft/2020-12/schema','slice','async.enabled\x20must\x20be\x20a\x20boolean.','flowJson.pageMode','Expression\x20references\x20SCRIPT\x20resultVariable\x20','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.expression','formDefinitions','edge\x20source\x20is\x20required.','NOTIFICATION','get','BCC','384LJEnTq','waypoint.','Reserved\x20resultVariable:\x20','Unsupported\x20condition\x20type:\x20','flowJson.nodes.','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','.approvalMode','USER','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','8476800DXSKPh','map','targetNodeId','transferCandidates','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','26sBzegH','formSchema','config','FIXED\x20assignee\x20requires\x20userIds.','hasOwnProperty','position.','approval_sys_pageId','.detailMarkdown','text','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','form','AUTO_APPROVE','bindDatasetCode','AUTO_REJECT','prototype','.resultVariable','.actions','Notification\x20version\x20must\x20be\x20a\x20string.','isArray','Notification\x20template.facts\x20must\x20be\x20an\x20array.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','string','].taskMode','detailMarkdown','datasetCode','__rabetbase_local_validation__','length','title','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','name','retryInterval','#/$defs/timeAmount','url','flowDesc','nodes\x20must\x20be\x20an\x20array.','.recipients','Duplicate\x20BPMN\x20element\x20id:\x20','flowName\x20is\x20required.','flowKey','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','https://lovrabet.com/schema/rabetbase-flow-config.json','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','SCRIPT','Duplicate\x20edge\x20route:\x20','.template','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','variables','NaN','findIndex','.cc','HOURS','value','approval.simple-flow.v1','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','.failurePolicy','path','add','version','edge\x20must\x20be\x20an\x20object.','timeout','.scriptName','\x20was\x20empty\x20and\x20was\x20removed.','edges','sourceNodeId','.timeout','534nwwbZP','\x20users.','.position.','.version','isInteger','.value','Edge\x20source\x20node\x20not\x20found:\x20','102WDsggj','waypoints','.target','flowJson.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','3187426NLYTeP','16305CoVPDq','waypoints\x20must\x20be\x20an\x20array.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','\x20actions.','.cc.readSources','position','Duplicate\x20cc\x20recipient\x20userId:\x20','13616LRHrwj','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','Notification\x20action.text\x20is\x20required.','edges\x20must\x20be\x20an\x20array.','Node\x20cannot\x20reach\x20any\x20END.','APPROVAL\x20node\x20requires\x20assignee.','warnings','defaultFlow\x20must\x20be\x20a\x20boolean.','stringify','MINUTES','approval_sys_initiatorUserId','approval_sys_operationType','legacy_field_removed','.assignee.roleId','Unsupported\x20task\x20mode:\x20','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','.timeout.duration','recipients','timeout\x20must\x20be\x20an\x20object.','].path','call','target','timeout.interrupting\x20must\x20be\x20a\x20boolean.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','#/$defs/flowEdge','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','.cc.recipientUserIds','DAYS','ALWAYS','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','approval_sys_processInstanceId','push','value\x20must\x20be\x20a\x20non-empty\x20string.','conditionType','Notification\x20recipients\x20must\x20be\x20an\x20array.','async','.type','.timeout.scriptName','forEach','trim','set','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','assignee',',\x20but\x20node\x20','Unsupported\x20notification\x20placeholder:\x20','.url','APPROVAL','Unsupported\x20pageMode:\x20','toUpperCase','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','.async','pageMode','formPermissions','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','type','array','SINGLE','.transferCandidates.userIds[','Unsupported\x20flowType:\x20','metadata','.async.retryInterval','.transferCandidates.strategy','CONDITION','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','flowJson','unit','test','START','EXPRESSION\x20edge\x20requires\x20expression.','some','delete','.tmp','resultVariable','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','Duplicate\x20node\x20id:\x20','includes','boolean','6351310psiOfU','flowJson.nodes','FAIL','APPROVED','Notification\x20configCode\x20is\x20required.','\x20->\x20','.taskMode','number','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','ALL','\x20is\x20required.','.config','Duplicate\x20value:\x20','.conditionType','recipientUserIds','.transferCandidates.userIds','defaultFlow','.source','duration\x20requires\x20value\x20and\x20unit.','action','flowJson.startPath','.path','template','.defaultFlow','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','actions','Notification\x20template.actions\x20must\x20be\x20an\x20array.','catch','PLATFORM_FORM','enabled','role','CONTINUE','startPath','30UBwtCw','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','^[A-Za-z_][A-Za-z0-9_]*$','.timeout.resultVariable','.cc.visible','approved','.waypoints','Notification\x20recipient\x20must\x20be\x20an\x20object.','integer','entries','transferCandidates\x20must\x20be\x20an\x20object.','schemaVersion','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','flowName','startsWith','flowType','has','Notification\x20fact.','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','NOTIFICATION\x20node\x20requires\x20config.','flowCode','#/$defs/userId','label','Node\x20has\x20no\x20outgoing\x20edge.','.waypoints[','Unsupported\x20notification\x20version:\x20','Notification\x20template\x20supports\x20at\x20most\x20','userIds','summary','Unsupported\x20schemaVersion:\x20','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','#/$defs/position','HANDLE','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.pageId','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowJson.edges','.position','isSafeInteger','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.timeout.action','flowJson.edges[','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','NOTIFICATION\x20node\x20requires\x20template.','ROLE','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','EXPRESSION','156276IRARKE','taskMode','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','formData','appCode','.assignee.userIds','10pUYaub','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','.async.enabled','keys','.role','FORM_FLOW','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','event','Notification\x20template.','approval_sys_','scriptName','every','empty_metadata_removed','^[1-9][0-9]*$','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'];a281_0x1c91=function(){return _0x48a035;};return a281_0x1c91();}function resolveEdgeEndpoint(_0x591a9a,_0x38e17c){const _0x44320c=a281_0x3406bd;if(typeof _0x591a9a==='string'&&_0x591a9a[_0x44320c(0x26a)]())return _0x591a9a['trim']();if(typeof _0x38e17c==='string'&&_0x38e17c['trim']())return _0x38e17c[_0x44320c(0x26a)]();return undefined;}function removeEmptyMetadata(_0x270fda,_0x458aae,_0x2ea90b,_0x7292e2){const _0x1093a7=a281_0x3406bd;if(Array[_0x1093a7(0x1fb)](_0x270fda)){_0x270fda[_0x1093a7(0x269)]((_0x415639,_0x24d666)=>removeEmptyMetadata(_0x415639,_0x458aae+'['+_0x24d666+']',_0x2ea90b,_0x7292e2));return;}if(!isRecord(_0x270fda))return;for(const [_0x2dcb2a,_0x5c23cf]of Object[_0x1093a7(0x14b)](_0x270fda)){const _0x4ab9c8=_0x458aae+'.'+_0x2dcb2a;if(_0x2dcb2a===_0x1093a7(0x27e)&&isEmptyJsonValue(_0x5c23cf)){delete _0x270fda[_0x2dcb2a],_0x7292e2[_0x1093a7(0x262)](_0x4ab9c8),_0x2ea90b[_0x1093a7(0x262)]({'code':_0x1093a7(0x186),'path':_0x4ab9c8,'message':_0x4ab9c8+_0x1093a7(0x229)});continue;}removeEmptyMetadata(_0x5c23cf,_0x4ab9c8,_0x2ea90b,_0x7292e2);}}function isEmptyJsonValue(_0x37f856){const _0x9f8954=a281_0x3406bd;if(_0x37f856===null||_0x37f856===undefined)return!![];if(typeof _0x37f856==='string')return _0x37f856[_0x9f8954(0x26a)]()==='';if(Array[_0x9f8954(0x1fb)](_0x37f856))return _0x37f856[_0x9f8954(0x203)]===0x0;return isRecord(_0x37f856)&&Object[_0x9f8954(0x17c)](_0x37f856)['length']===0x0;}function isRecord(_0x206d82){const _0x1c35a9=a281_0x3406bd;return typeof _0x206d82===_0x1c35a9(0x190)&&_0x206d82!==null&&!Array[_0x1c35a9(0x1fb)](_0x206d82);}function cloneJsonValue(_0x4f3362){return JSON['parse'](JSON['stringify'](_0x4f3362));}export async function readFlowConfigFile(_0x562aaf){const _0x593a54=a281_0x3406bd,_0x51896f=await readFile(resolve(_0x562aaf),_0x593a54(0x19f));return JSON['parse'](_0x51896f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a282_0x225467=a282_0x5f4b;(function(_0xda442f,_0x5b38fa){const _0x4fc885=a282_0x5f4b,_0x25c661=_0xda442f();while(!![]){try{const _0x17d099=parseInt(_0x4fc885(0x1df))/0x1*(-parseInt(_0x4fc885(0x1cf))/0x2)+parseInt(_0x4fc885(0x1c0))/0x3+-parseInt(_0x4fc885(0x1c1))/0x4*(-parseInt(_0x4fc885(0x1d0))/0x5)+-parseInt(_0x4fc885(0x1b4))/0x6*(parseInt(_0x4fc885(0x1bb))/0x7)+-parseInt(_0x4fc885(0x1ca))/0x8+parseInt(_0x4fc885(0x1ac))/0x9+parseInt(_0x4fc885(0x1c2))/0xa*(parseInt(_0x4fc885(0x1a2))/0xb);if(_0x17d099===_0x5b38fa)break;else _0x25c661['push'](_0x25c661['shift']());}catch(_0x3a4a3e){_0x25c661['push'](_0x25c661['shift']());}}}(a282_0x57e0,0x85226));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a282_0x225467(0x1c3);export const INSTANT_API_POLICY_FILE_NAME=a282_0x225467(0x1cc);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x14027d,_0x21eb23,_0x278390){return new CliError(_0x14027d,0x1,_0x21eb23,_0x278390);}export function loadInstantApiPolicyLocalConfig(_0x27af35,_0x465110){assertSafeAppCode(_0x27af35);const _0x5e1f54=resolve(_0x465110??findProjectRootDirectory()),_0x4d9d39=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x27af35+'/'+INSTANT_API_POLICY_FILE_NAME,_0x4e7a9d=resolve(_0x5e1f54,INSTANT_API_POLICY_RELATIVE_ROOT,_0x27af35),_0x32e247=resolve(_0x4e7a9d,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x5e1f54,'appCode':_0x27af35,'policyRoot':_0x4e7a9d,'policyFilePath':_0x32e247,'policyRelativePath':_0x4d9d39};}export function createDefaultInstantApiPolicyConfig(_0x5f5652,_0x27becb='allow'){return assertSafeAppCode(_0x5f5652),{'version':'2','appCode':_0x5f5652,'defaults':{'instantApi':_0x27becb},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x296d8d){const _0x2d2cb7=a282_0x225467;let _0x10d40b;try{_0x10d40b=await stat(_0x296d8d[_0x2d2cb7(0x1c8)]);}catch(_0x966322){throw instantApiPolicyError('instant_api_policy_file_missing',_0x2d2cb7(0x1b1)+_0x296d8d[_0x2d2cb7(0x1c8)],_0x2d2cb7(0x1b9));}if(!_0x10d40b[_0x2d2cb7(0x1b8)]())throw instantApiPolicyError(_0x2d2cb7(0x1bc),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x296d8d[_0x2d2cb7(0x1c8)]);if(_0x10d40b[_0x2d2cb7(0x1dd)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x2d2cb7(0x1e0),_0x2d2cb7(0x1e1));let _0x233536;try{_0x233536=await readFile(_0x296d8d[_0x2d2cb7(0x1c8)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0x296d8d[_0x2d2cb7(0x1c8)]);}if(_0x233536[_0x2d2cb7(0x1d1)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x2d2cb7(0x1e1));let _0x41bb88;try{_0x41bb88=new TextDecoder(_0x2d2cb7(0x1a8),{'fatal':!![],'ignoreBOM':!![]})[_0x2d2cb7(0x1bd)](_0x233536);}catch{throw instantApiPolicyError(_0x2d2cb7(0x1bc),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x296d8d[_0x2d2cb7(0x1c8)]);}let _0x192520;try{_0x192520=JSON[_0x2d2cb7(0x1ae)](_0x41bb88);}catch{throw instantApiPolicyError(_0x2d2cb7(0x1ce),_0x2d2cb7(0x1d7)+_0x296d8d[_0x2d2cb7(0x1c8)]);}return assertLocalPolicyContract(_0x192520,_0x296d8d[_0x2d2cb7(0x1ba)]);}export async function writeInstantApiPolicyConfigFile(_0x4eacc8,_0x25eb85,_0x4e6ce7={}){const _0x193f29=a282_0x225467,_0x450f3a=assertLocalPolicyContract(_0x25eb85,_0x4eacc8[_0x193f29(0x1ba)]),_0x179cad=JSON[_0x193f29(0x1ad)](_0x450f3a,null,0x2)+'\x0a';if(Buffer[_0x193f29(0x1d1)](_0x179cad,_0x193f29(0x1c4))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x4eacc8[_0x193f29(0x1c5)],{'recursive':!![]});let _0x37e3b2;try{_0x37e3b2=await readFile(_0x4eacc8['policyFilePath'],'utf8');}catch(_0xafb6c3){if(!isMissingFile(_0xafb6c3))throw instantApiPolicyError(_0x193f29(0x1e2),_0x193f29(0x1b0)+_0x4eacc8['policyFilePath']);}if(_0x37e3b2===_0x179cad)return{'action':_0x193f29(0x1cb),'filePath':_0x4eacc8[_0x193f29(0x1c8)]};if(_0x37e3b2!==undefined&&!_0x4e6ce7[_0x193f29(0x1d4)])throw instantApiPolicyError(_0x193f29(0x1cd),_0x193f29(0x1d3)+_0x4eacc8[_0x193f29(0x1c8)],_0x193f29(0x1b2));if(_0x37e3b2===undefined)try{return await writeFile(_0x4eacc8[_0x193f29(0x1c8)],_0x179cad,{'encoding':'utf8','flag':'wx'}),{'action':_0x193f29(0x1da),'filePath':_0x4eacc8[_0x193f29(0x1c8)]};}catch(_0x4dea87){if(!isAlreadyExists(_0x4dea87))throw instantApiPolicyError(_0x193f29(0x1e3),_0x193f29(0x1bf)+_0x4eacc8[_0x193f29(0x1c8)]);if(!_0x4e6ce7[_0x193f29(0x1d4)])throw instantApiPolicyError('instant_api_policy_file_exists','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x4eacc8[_0x193f29(0x1c8)],'Review\x20the\x20file\x20before\x20retrying.');}const _0xe15054=resolve(dirname(_0x4eacc8['policyFilePath']),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x193f29(0x1c6)]+'.'+randomUUID()+_0x193f29(0x1a5));try{await writeFile(_0xe15054,_0x179cad,{'encoding':_0x193f29(0x1c4),'flag':'wx'}),await rename(_0xe15054,_0x4eacc8[_0x193f29(0x1c8)]);}catch{await unlink(_0xe15054)['catch'](()=>undefined);throw instantApiPolicyError(_0x193f29(0x1e3),_0x193f29(0x1ab)+_0x4eacc8[_0x193f29(0x1c8)]);}return{'action':_0x193f29(0x1a7),'filePath':_0x4eacc8['policyFilePath']};}function assertSafeAppCode(_0x24bc20){const _0x346522=a282_0x225467,_0x455fbb=_0x24bc20['trim']();if(!_0x455fbb||_0x455fbb!==_0x24bc20||_0x455fbb['length']>0x64||_0x455fbb==='.'||_0x455fbb==='..'||_0x455fbb['includes']('/')||_0x455fbb[_0x346522(0x1a3)]('\x5c')||_0x455fbb[_0x346522(0x1a3)]('\x00'))throw instantApiPolicyError(_0x346522(0x1a4),_0x346522(0x1b3));}function assertLocalPolicyContract(_0x3e874d,_0x503ac2){const _0x2a3291=a282_0x225467;if(!isObject(_0x3e874d))throw instantApiPolicyError(_0x2a3291(0x1ce),_0x2a3291(0x1c7));if(_0x3e874d[_0x2a3291(0x1de)]!=='1'&&_0x3e874d[_0x2a3291(0x1de)]!=='2')throw instantApiPolicyError(_0x2a3291(0x1d9),_0x2a3291(0x1af),_0x2a3291(0x1d8));if(_0x3e874d['appCode']!==_0x503ac2)throw instantApiPolicyError(_0x2a3291(0x1be),'Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x503ac2+'.');if(!isObject(_0x3e874d[_0x2a3291(0x1b6)])||typeof _0x3e874d[_0x2a3291(0x1b6)][_0x2a3291(0x1aa)]!==_0x2a3291(0x1b5))throw instantApiPolicyError(_0x2a3291(0x1c9),_0x2a3291(0x1d2));if(_0x3e874d[_0x2a3291(0x1a6)]!==undefined&&_0x3e874d[_0x2a3291(0x1a6)]!==null&&!Array[_0x2a3291(0x1a9)](_0x3e874d[_0x2a3291(0x1a6)]))throw instantApiPolicyError(_0x2a3291(0x1d6),_0x2a3291(0x1dc));return _0x3e874d;}function isObject(_0x39bfef){const _0x30109c=a282_0x225467;return _0x39bfef!==null&&typeof _0x39bfef===_0x30109c(0x1db)&&!Array['isArray'](_0x39bfef);}function isMissingFile(_0x8606aa){const _0x30978e=a282_0x225467;return Boolean(_0x8606aa&&typeof _0x8606aa===_0x30978e(0x1db)&&_0x8606aa['code']===_0x30978e(0x1b7));}function isAlreadyExists(_0x50ca0d){const _0x18548d=a282_0x225467;return Boolean(_0x50ca0d&&typeof _0x50ca0d==='object'&&_0x50ca0d['code']===_0x18548d(0x1d5));}function a282_0x5f4b(_0x5c50f2,_0x2965bc){_0x5c50f2=_0x5c50f2-0x1a2;const _0x57e052=a282_0x57e0();let _0x5f4bb5=_0x57e052[_0x5c50f2];return _0x5f4bb5;}function a282_0x57e0(){const _0x1d30a0=['Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','size','version','1ixgxJx','instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','instant_api_policy_file_unreadable','instant_api_policy_file_unwritable','22WySNbO','includes','instant_api_policy_app_code_invalid','.tmp','rules','overwritten','utf-8','isArray','instantApi','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','1063845Bitafk','stringify','parse','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','6uCuTpl','string','defaults','ENOENT','isFile','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','appCode','5468449ZgRohw','instant_api_policy_file_invalid','decode','instant_api_policy_app_code_mismatch','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','1531314vJaflg','176EQKfdi','6252350JFPpHw','.rabetbase/instant-api-policy','utf8','policyRoot','pid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','policyFilePath','instant_api_policy_defaults_invalid','3785136CqBqIf','unchanged','policy.json','instant_api_policy_file_exists','instant_api_policy_json_invalid','172532fScUZD','775ZruivH','byteLength','Policy\x20defaults.instantApi\x20is\x20required.','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','force','EEXIST','instant_api_policy_rules_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','instant_api_policy_version_invalid','created','object'];a282_0x57e0=function(){return _0x1d30a0;};return a282_0x57e0();}
|
|
@@ -27,4 +27,10 @@ export interface DevelopmentKnowledgeSearchInput {
|
|
|
27
27
|
topK?: number;
|
|
28
28
|
signal?: AbortSignal;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export interface DirectKnowledgeSearchInput extends DevelopmentKnowledgeSearchInput {
|
|
31
|
+
serviceUrl: string;
|
|
32
|
+
}
|
|
33
|
+
/** Accept only an explicit TLS origin; never infer a credential destination. */
|
|
34
|
+
export declare function normalizeKbServiceOrigin(input: string): string;
|
|
35
|
+
/** Search directly through the authenticated KB Service V2 contract. */
|
|
36
|
+
export declare function searchDirectKnowledge(input: DirectKnowledgeSearchInput): Promise<DevelopmentKnowledgeSearchResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a283_0x27bc92=a283_0x59e0;(function(_0xd6d088,_0xb32c1f){const _0x11d515=a283_0x59e0,_0x13945f=_0xd6d088();while(!![]){try{const _0x444547=parseInt(_0x11d515(0x19a))/0x1+-parseInt(_0x11d515(0x1af))/0x2*(-parseInt(_0x11d515(0x1ba))/0x3)+-parseInt(_0x11d515(0x1bf))/0x4*(-parseInt(_0x11d515(0x1a5))/0x5)+parseInt(_0x11d515(0x18f))/0x6+-parseInt(_0x11d515(0x1cf))/0x7+parseInt(_0x11d515(0x1a0))/0x8*(parseInt(_0x11d515(0x1a7))/0x9)+-parseInt(_0x11d515(0x1b0))/0xa;if(_0x444547===_0xb32c1f)break;else _0x13945f['push'](_0x13945f['shift']());}catch(_0x8cfcc){_0x13945f['push'](_0x13945f['shift']());}}}(a283_0x2e4c,0xe9eb3));function a283_0x59e0(_0xa7ea39,_0x5de048){_0xa7ea39=_0xa7ea39-0x186;const _0x2e4c8f=a283_0x2e4c();let _0x59e0b0=_0x2e4c8f[_0xa7ea39];return _0x59e0b0;}function a283_0x2e4c(){const _0x9b0d87=['hits','schemaVersion','88yvAghS','some','sort','apiError','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','20tuSJaE','networkError','340344ypBWQw','isArray','revision','AbortError','isSafeInteger','object','number','score','690542UcOspc','18259600rYqjPW','timingsMs','trim','text','public','isFinite','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','split','get','documentId','9jIxTUw','query','keys','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','title','1312704pnteEi','application/json','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','company','rank','development','strategyFingerprint','string','response\x20envelope','name','content-type','chunkId','scope','authRequired','finalScore','stringify','8212673CiqyzQ','profile','validation','length','test','map','toLowerCase','no-store','total','hits[','622782EHkJmV','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','status','json','Knowledge\x20search\x20appCode\x20is\x20required.','data','rawScore','tags','topK','headers','scoreKind','1089040kJJcqu','response','cli:rabetbase','\x20contract.'];a283_0x2e4c=function(){return _0x9b0d87;};return a283_0x2e4c();}import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a283_0x27bc92(0x19f),'profile',a283_0x27bc92(0x18d),a283_0x27bc92(0x19e),a283_0x27bc92(0x1c5),a283_0x27bc92(0x1b1)],HIT_KEYS=['documentId',a283_0x27bc92(0x1a9),a283_0x27bc92(0x1ca),a283_0x27bc92(0x1cb),a283_0x27bc92(0x1be),a283_0x27bc92(0x1b3),a283_0x27bc92(0x196),a283_0x27bc92(0x1c3),a283_0x27bc92(0x195),a283_0x27bc92(0x1cd),a283_0x27bc92(0x199)];export async function searchDevelopmentKnowledge(_0x3cde1f){const _0x5bd4c3=a283_0x27bc92,_0x455fcb=_0x3cde1f['appCode'][_0x5bd4c3(0x1b2)](),_0x580317=_0x3cde1f[_0x5bd4c3(0x1bb)][_0x5bd4c3(0x1b2)]();if(!_0x455fcb)throw CliErrors[_0x5bd4c3(0x187)](_0x5bd4c3(0x193));if(!_0x3cde1f['cookie'][_0x5bd4c3(0x1b2)]())throw CliErrors[_0x5bd4c3(0x1cc)]();if(!_0x580317)throw CliErrors[_0x5bd4c3(0x187)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x3cde1f[_0x5bd4c3(0x197)]);const _0x54a373=getKbDomain()+'/smartapi/knowledge/company-public/search';let _0x1181bd;try{_0x1181bd=await fetch(_0x54a373,{'method':'POST','headers':{'Content-Type':_0x5bd4c3(0x1c0),'Cookie':_0x3cde1f['cookie'],'X-Invoke-Source':_0x5bd4c3(0x19c)},'body':JSON[_0x5bd4c3(0x1ce)]({'appCode':_0x455fcb,'query':_0x580317,..._0x3cde1f[_0x5bd4c3(0x197)]!==undefined?{'topK':_0x3cde1f['topK']}:{}}),'signal':_0x3cde1f['signal']});}catch(_0x425c70){if(_0x425c70 instanceof CliError)throw _0x425c70;if(_0x425c70 instanceof Error&&_0x425c70[_0x5bd4c3(0x1c8)]===_0x5bd4c3(0x1aa))throw _0x425c70;throw CliErrors[_0x5bd4c3(0x1a6)]('SmartCode\x20knowledge\x20search\x20request\x20failed.');}if(!hasNoStore(_0x1181bd[_0x5bd4c3(0x198)]))throw CliErrors['apiError'](_0x5bd4c3(0x190));if(_0x1181bd[_0x5bd4c3(0x191)]===0x191)throw CliErrors[_0x5bd4c3(0x1cc)]();if(!_0x1181bd['ok'])throw CliErrors[_0x5bd4c3(0x1a3)](_0x5bd4c3(0x1a4)+_0x1181bd[_0x5bd4c3(0x191)]+').');if(!(_0x1181bd[_0x5bd4c3(0x198)][_0x5bd4c3(0x1b8)](_0x5bd4c3(0x1c9))??'')[_0x5bd4c3(0x18b)]()['includes']('application/json'))throw CliErrors[_0x5bd4c3(0x1a3)](_0x5bd4c3(0x1bd));let _0x56471c;try{_0x56471c=await _0x1181bd[_0x5bd4c3(0x192)]();}catch{throw CliErrors[_0x5bd4c3(0x1a3)]('SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}return parseDevelopmentSearchResponse(readEnvelopeData(_0x56471c),_0x3cde1f[_0x5bd4c3(0x197)]);}function readEnvelopeData(_0xb656d4){const _0x5e6e9f=a283_0x27bc92,_0x2a2b3c=requireRecord(_0xb656d4,_0x5e6e9f(0x1c7));if(_0x2a2b3c['success']===![])throw CliErrors['apiError']('SmartCode\x20knowledge\x20search\x20failed.');if(!(_0x5e6e9f(0x194)in _0x2a2b3c))throw invalidContract(_0x5e6e9f(0x1c7));return _0x2a2b3c[_0x5e6e9f(0x194)];}function validateTopK(_0xbb10af){const _0x30e9b7=a283_0x27bc92;if(_0xbb10af!==undefined&&(!Number['isSafeInteger'](_0xbb10af)||_0xbb10af<0x1||_0xbb10af>0x32))throw CliErrors[_0x30e9b7(0x187)](_0x30e9b7(0x1c1));}function hasNoStore(_0x4c6e57){const _0x29ec48=a283_0x27bc92;return(_0x4c6e57[_0x29ec48(0x1b8)]('cache-control')??'')[_0x29ec48(0x1b7)](',')[_0x29ec48(0x1a1)](_0x38849e=>_0x38849e[_0x29ec48(0x1b2)]()[_0x29ec48(0x18b)]()===_0x29ec48(0x18c));}function parseDevelopmentSearchResponse(_0x4a124d,_0x170323){const _0xb19949=a283_0x27bc92,_0x2c5a58=requireExactRecord(_0x4a124d,RESPONSE_KEYS,_0xb19949(0x19b));if(_0x2c5a58[_0xb19949(0x19f)]!==0x2||_0x2c5a58[_0xb19949(0x186)]!==_0xb19949(0x1c4))throw invalidContract(_0xb19949(0x186));if(!Array[_0xb19949(0x1a8)](_0x2c5a58[_0xb19949(0x19e)])||_0x2c5a58[_0xb19949(0x19e)][_0xb19949(0x188)]>(_0x170323??0x32))throw invalidContract(_0xb19949(0x19e));if(typeof _0x2c5a58[_0xb19949(0x1c5)]!==_0xb19949(0x1c6)||!/^sha256:[0-9a-f]{64}$/[_0xb19949(0x189)](_0x2c5a58[_0xb19949(0x1c5)]))throw invalidContract(_0xb19949(0x1c5));const _0x4390b8=requireRecord(_0x2c5a58[_0xb19949(0x1b1)],_0xb19949(0x1b1)),_0x5db3d2={};for(const [_0x20595e,_0x6a1c0e]of Object['entries'](_0x4390b8)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xb19949(0x189)](_0x20595e)||typeof _0x6a1c0e!=='number'||!Number['isFinite'](_0x6a1c0e)||_0x6a1c0e<0x0)throw invalidContract(_0xb19949(0x1b1));_0x5db3d2[_0x20595e]=_0x6a1c0e;}const _0x43a2cc=_0x2c5a58[_0xb19949(0x19e)][_0xb19949(0x18a)]((_0xaa9382,_0x3bfd2a)=>parseHit(_0xaa9382,_0x3bfd2a));if(!Number['isSafeInteger'](_0x2c5a58[_0xb19949(0x18d)])||_0x2c5a58['total']!==_0x43a2cc[_0xb19949(0x188)])throw invalidContract(_0xb19949(0x18d));return{'schemaVersion':_0x2c5a58['schemaVersion'],'profile':_0x2c5a58[_0xb19949(0x186)],'total':_0x2c5a58[_0xb19949(0x18d)],'strategyFingerprint':_0x2c5a58[_0xb19949(0x1c5)],'timingsMs':_0x5db3d2,'hits':_0x43a2cc};}function parseHit(_0x1a6c7c,_0xb3d33e){const _0x13f4e4=a283_0x27bc92,_0x32bac8=requireExactRecord(_0x1a6c7c,HIT_KEYS,_0x13f4e4(0x18e)+_0xb3d33e+']'),_0x103045=_0x2828fd=>{const _0x3e6dcb=_0x13f4e4,_0x5c5528=_0x32bac8[_0x2828fd];if(typeof _0x5c5528!==_0x3e6dcb(0x1c6)||!_0x5c5528)throw invalidContract(_0x2828fd);return _0x5c5528;};if(!Number[_0x13f4e4(0x1ab)](_0x32bac8['revision'])||_0x32bac8[_0x13f4e4(0x1a9)]<0x1)throw invalidContract(_0x13f4e4(0x1a9));if(_0x32bac8[_0x13f4e4(0x1cb)]!==_0x13f4e4(0x1b4)&&_0x32bac8[_0x13f4e4(0x1cb)]!==_0x13f4e4(0x1c2))throw invalidContract(_0x13f4e4(0x1cb));if(typeof _0x32bac8['title']!==_0x13f4e4(0x1c6)||typeof _0x32bac8[_0x13f4e4(0x1b3)]!==_0x13f4e4(0x1c6))throw invalidContract(_0x13f4e4(0x1b3));if(!Array[_0x13f4e4(0x1a8)](_0x32bac8[_0x13f4e4(0x196)])||_0x32bac8[_0x13f4e4(0x196)]['some'](_0x32b1f0=>typeof _0x32b1f0!==_0x13f4e4(0x1c6)))throw invalidContract(_0x13f4e4(0x196));if(!Number['isSafeInteger'](_0x32bac8[_0x13f4e4(0x1c3)])||_0x32bac8[_0x13f4e4(0x1c3)]!==_0xb3d33e+0x1)throw invalidContract(_0x13f4e4(0x1c3));if(!isFiniteNumber(_0x32bac8[_0x13f4e4(0x195)])||!isFiniteNumber(_0x32bac8[_0x13f4e4(0x1cd)]))throw invalidContract(_0x13f4e4(0x1ae));return{'documentId':_0x103045(_0x13f4e4(0x1b9)),'revision':_0x32bac8[_0x13f4e4(0x1a9)],'chunkId':_0x103045(_0x13f4e4(0x1ca)),'scope':_0x32bac8[_0x13f4e4(0x1cb)],'title':_0x32bac8[_0x13f4e4(0x1be)],'text':_0x32bac8[_0x13f4e4(0x1b3)],'tags':[..._0x32bac8[_0x13f4e4(0x196)]],'rank':_0x32bac8['rank'],'rawScore':_0x32bac8[_0x13f4e4(0x195)],'finalScore':_0x32bac8[_0x13f4e4(0x1cd)],'scoreKind':_0x103045('scoreKind')};}function requireExactRecord(_0x40da8f,_0x34c337,_0x2f907a){const _0x24c1aa=a283_0x27bc92,_0x15edd8=requireRecord(_0x40da8f,_0x2f907a),_0x483997=Object[_0x24c1aa(0x1bc)](_0x15edd8)[_0x24c1aa(0x1a2)](),_0x59149a=[..._0x34c337]['sort']();if(_0x483997[_0x24c1aa(0x188)]!==_0x59149a[_0x24c1aa(0x188)]||_0x483997[_0x24c1aa(0x1a1)]((_0x525989,_0x5893e6)=>_0x525989!==_0x59149a[_0x5893e6]))throw invalidContract(_0x2f907a);return _0x15edd8;}function requireRecord(_0x3b0c7c,_0x2cff6a){const _0x8a9329=a283_0x27bc92;if(!_0x3b0c7c||typeof _0x3b0c7c!==_0x8a9329(0x1ac)||Array[_0x8a9329(0x1a8)](_0x3b0c7c))throw invalidContract(_0x2cff6a);return _0x3b0c7c;}function isFiniteNumber(_0x21dbd0){const _0x5d9f1d=a283_0x27bc92;return typeof _0x21dbd0===_0x5d9f1d(0x1ad)&&Number[_0x5d9f1d(0x1b5)](_0x21dbd0);}function invalidContract(_0x416895){const _0x9bce01=a283_0x27bc92;return CliErrors[_0x9bce01(0x1a3)](_0x9bce01(0x1b6)+_0x416895+_0x9bce01(0x19d));}
|
|
1
|
+
const a283_0x2f5a00=a283_0x51f0;(function(_0x3da0e2,_0x5ccd8d){const _0x51009b=a283_0x51f0,_0x26830f=_0x3da0e2();while(!![]){try{const _0x4dc969=parseInt(_0x51009b(0x1cc))/0x1+-parseInt(_0x51009b(0x1a4))/0x2+parseInt(_0x51009b(0x1ca))/0x3*(parseInt(_0x51009b(0x1b9))/0x4)+-parseInt(_0x51009b(0x1d0))/0x5*(-parseInt(_0x51009b(0x18d))/0x6)+parseInt(_0x51009b(0x1aa))/0x7*(-parseInt(_0x51009b(0x1ce))/0x8)+parseInt(_0x51009b(0x1cd))/0x9*(-parseInt(_0x51009b(0x1a2))/0xa)+-parseInt(_0x51009b(0x188))/0xb*(parseInt(_0x51009b(0x1c9))/0xc);if(_0x4dc969===_0x5ccd8d)break;else _0x26830f['push'](_0x26830f['shift']());}catch(_0x228e19){_0x26830f['push'](_0x26830f['shift']());}}}(a283_0x4235,0x9b4af));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a283_0x2f5a00(0x1c5),a283_0x2f5a00(0x196),'total','hits',a283_0x2f5a00(0x1d4),'timingsMs'],HIT_KEYS=['documentId',a283_0x2f5a00(0x1bf),'chunkId',a283_0x2f5a00(0x1b4),a283_0x2f5a00(0x1bd),'text',a283_0x2f5a00(0x195),'rank','rawScore',a283_0x2f5a00(0x1c6),a283_0x2f5a00(0x18e)];export function normalizeKbServiceOrigin(_0x17248b){const _0x38efc1=a283_0x2f5a00,_0x58f522=()=>CliErrors[_0x38efc1(0x1d3)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.'),_0x4d845a=_0x17248b?.[_0x38efc1(0x197)]();if(!_0x4d845a||/[\u0000-\u0020\u007f]/[_0x38efc1(0x1be)](_0x4d845a)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x38efc1(0x1be)](_0x4d845a))throw _0x58f522();let _0x2bf1f2;try{_0x2bf1f2=new URL(_0x4d845a);}catch{throw _0x58f522();}if(_0x2bf1f2[_0x38efc1(0x1ac)]!=='https:'||!_0x2bf1f2[_0x38efc1(0x192)]||_0x2bf1f2[_0x38efc1(0x199)]||_0x2bf1f2[_0x38efc1(0x198)]||_0x2bf1f2[_0x38efc1(0x19f)]!=='/'||_0x2bf1f2[_0x38efc1(0x1cf)]||_0x2bf1f2['hash'])throw _0x58f522();return _0x2bf1f2['origin'];}function a283_0x4235(){const _0x318451=['hits','response','company','text','Knowledge\x20search\x20appCode\x20is\x20required.','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','scope','toLowerCase','name','\x20contract.','serviceUrl','4327436jvWlSc','string','isSafeInteger','apiError','title','test','revision','status','query','application/json','documentId','error','schemaVersion','finalScore','POST','timingsMs','12FpoOQg','3aHUGHR','signal','794385XIbtzZ','63XrQZfa','14704uyKYZw','search','4076210sldxal','object','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','validation','strategyFingerprint','public','TimeoutError','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','number','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','aborted','stringify','isArray','headers','keys','Knowledge\x20search\x20cancelled.','rank','total','map','isFinite','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','length','5602124aHAIGx','entries','rawScore','development','hits[','6BkzQdk','scoreKind','/v2/development/apps/','some','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','hostname','appCode','topK','tags','profile','trim','password','username','score','no-store','any','sort','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','pathname','get','content-type','900130FBLuyI','cookie','644716oQFanO','includes','chunkId','cli:rabetbase','cache-control','AbortError','2261mbAyZV','networkError','protocol','authRequired'];a283_0x4235=function(){return _0x318451;};return a283_0x4235();}export async function searchDirectKnowledge(_0x59abe7){const _0x2855c9=a283_0x2f5a00,_0x5a7818=_0x59abe7[_0x2855c9(0x193)][_0x2855c9(0x197)](),_0x156fdf=_0x59abe7[_0x2855c9(0x1c1)][_0x2855c9(0x197)]();if(!_0x5a7818)throw CliErrors['validation'](_0x2855c9(0x1b2));if(!_0x59abe7[_0x2855c9(0x1a3)][_0x2855c9(0x197)]())throw CliErrors[_0x2855c9(0x1ad)]();if(!_0x156fdf)throw CliErrors[_0x2855c9(0x1d3)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x59abe7['topK']);const _0xbf2a5b=normalizeKbServiceOrigin(_0x59abe7[_0x2855c9(0x1b8)]),_0x13f450=AbortSignal['timeout'](0xea60),_0xe5f1f1=_0x59abe7[_0x2855c9(0x1cb)]?AbortSignal[_0x2855c9(0x19c)]([_0x59abe7[_0x2855c9(0x1cb)],_0x13f450]):_0x13f450;let _0x4bf794;try{_0x4bf794=await fetch(_0xbf2a5b+_0x2855c9(0x18f)+encodeURIComponent(_0x5a7818)+'/knowledge/search',{'method':_0x2855c9(0x1c7),'redirect':_0x2855c9(0x1c4),'headers':{'Content-Type':_0x2855c9(0x1c2),'Cookie':_0x59abe7[_0x2855c9(0x1a3)],'X-Invoke-Source':_0x2855c9(0x1a7)},'body':JSON[_0x2855c9(0x1db)]({'query':_0x156fdf,..._0x59abe7[_0x2855c9(0x194)]!==undefined?{'topK':_0x59abe7[_0x2855c9(0x194)]}:{}}),'signal':_0xe5f1f1});}catch(_0x1842b1){if(_0x59abe7[_0x2855c9(0x1cb)]?.[_0x2855c9(0x1da)])throw new DOMException(_0x2855c9(0x181),'AbortError');if(_0x1842b1 instanceof Error&&_0x1842b1[_0x2855c9(0x1b6)]===_0x2855c9(0x1d6))throw CliErrors[_0x2855c9(0x1ab)](_0x2855c9(0x191));throw CliErrors['networkError']('KB\x20Service\x20knowledge\x20search\x20request\x20failed.');}if(_0x4bf794[_0x2855c9(0x1c0)]===0x191)throw CliErrors[_0x2855c9(0x1ad)]();if(_0x4bf794[_0x2855c9(0x1c0)]===0x1ad)throw CliErrors[_0x2855c9(0x1bc)](_0x2855c9(0x19e));if(!_0x4bf794['ok'])throw CliErrors[_0x2855c9(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'+_0x4bf794[_0x2855c9(0x1c0)]+').');if(!hasNoStore(_0x4bf794[_0x2855c9(0x17f)]))throw CliErrors[_0x2855c9(0x1bc)](_0x2855c9(0x1b3));if(!(_0x4bf794[_0x2855c9(0x17f)][_0x2855c9(0x1a0)](_0x2855c9(0x1a1))??'')[_0x2855c9(0x1b5)]()[_0x2855c9(0x1a5)](_0x2855c9(0x1c2)))throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.');let _0xd1d367;try{_0xd1d367=await _0x4bf794['json']();}catch(_0x3437c0){if(_0x59abe7[_0x2855c9(0x1cb)]?.[_0x2855c9(0x1da)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x2855c9(0x1a9));if(_0x13f450['aborted']||_0x3437c0 instanceof Error&&_0x3437c0['name']===_0x2855c9(0x1d6))throw CliErrors[_0x2855c9(0x1ab)](_0x2855c9(0x191));throw CliErrors[_0x2855c9(0x1bc)](_0x2855c9(0x1d7));}try{const _0xb19465=requireExactRecord(_0xd1d367,[_0x2855c9(0x1ae),_0x2855c9(0x1d4),_0x2855c9(0x1c8)],_0x2855c9(0x1af));if(!Array[_0x2855c9(0x17e)](_0xb19465['hits']))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x2855c9(0x18b),'total':_0xb19465['hits'][_0x2855c9(0x187)],'hits':_0xb19465[_0x2855c9(0x1ae)],'strategyFingerprint':_0xb19465[_0x2855c9(0x1d4)],'timingsMs':_0xb19465[_0x2855c9(0x1c8)]},_0x59abe7[_0x2855c9(0x194)]??0xa);}catch(_0x5b9053){if(_0x5b9053 instanceof CliError)throw CliErrors[_0x2855c9(0x1bc)](_0x2855c9(0x1d2));throw _0x5b9053;}}function validateTopK(_0x4cb33e){const _0x4e030d=a283_0x2f5a00;if(_0x4cb33e!==undefined&&(!Number[_0x4e030d(0x1bb)](_0x4cb33e)||_0x4cb33e<0x1||_0x4cb33e>0x32))throw CliErrors['validation'](_0x4e030d(0x1d9));}function a283_0x51f0(_0x394298,_0x4be45c){_0x394298=_0x394298-0x17e;const _0x423543=a283_0x4235();let _0x51f0d8=_0x423543[_0x394298];return _0x51f0d8;}function hasNoStore(_0x5c8c30){const _0x1a7575=a283_0x2f5a00;return(_0x5c8c30[_0x1a7575(0x1a0)](_0x1a7575(0x1a8))??'')['split'](',')[_0x1a7575(0x190)](_0xb2c5b5=>_0xb2c5b5['trim']()[_0x1a7575(0x1b5)]()===_0x1a7575(0x19b));}function parseDevelopmentSearchResponse(_0x2d6aaf,_0x3b0188){const _0x3a3ddb=a283_0x2f5a00,_0x52a685=requireExactRecord(_0x2d6aaf,RESPONSE_KEYS,_0x3a3ddb(0x1af));if(_0x52a685[_0x3a3ddb(0x1c5)]!==0x2||_0x52a685[_0x3a3ddb(0x196)]!==_0x3a3ddb(0x18b))throw invalidContract(_0x3a3ddb(0x196));if(!Array[_0x3a3ddb(0x17e)](_0x52a685[_0x3a3ddb(0x1ae)])||_0x52a685['hits']['length']>(_0x3b0188??0x32))throw invalidContract(_0x3a3ddb(0x1ae));if(typeof _0x52a685[_0x3a3ddb(0x1d4)]!==_0x3a3ddb(0x1ba)||!/^sha256:[0-9a-f]{64}$/['test'](_0x52a685[_0x3a3ddb(0x1d4)]))throw invalidContract(_0x3a3ddb(0x1d4));const _0x5280ac=requireRecord(_0x52a685[_0x3a3ddb(0x1c8)],_0x3a3ddb(0x1c8)),_0x2f7ab8={};for(const [_0x413d41,_0x99567b]of Object[_0x3a3ddb(0x189)](_0x5280ac)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x3a3ddb(0x1be)](_0x413d41)||typeof _0x99567b!==_0x3a3ddb(0x1d8)||!Number[_0x3a3ddb(0x185)](_0x99567b)||_0x99567b<0x0)throw invalidContract(_0x3a3ddb(0x1c8));_0x2f7ab8[_0x413d41]=_0x99567b;}const _0x244444=_0x52a685['hits'][_0x3a3ddb(0x184)]((_0x3f3196,_0x4c5f8e)=>parseHit(_0x3f3196,_0x4c5f8e));if(!Number[_0x3a3ddb(0x1bb)](_0x52a685[_0x3a3ddb(0x183)])||_0x52a685[_0x3a3ddb(0x183)]!==_0x244444[_0x3a3ddb(0x187)])throw invalidContract(_0x3a3ddb(0x183));return{'schemaVersion':_0x52a685['schemaVersion'],'profile':_0x52a685['profile'],'total':_0x52a685[_0x3a3ddb(0x183)],'strategyFingerprint':_0x52a685[_0x3a3ddb(0x1d4)],'timingsMs':_0x2f7ab8,'hits':_0x244444};}function parseHit(_0x107f44,_0x73cad1){const _0x5912cc=a283_0x2f5a00,_0x119b8a=requireExactRecord(_0x107f44,HIT_KEYS,_0x5912cc(0x18c)+_0x73cad1+']'),_0x41fc02=_0x56feb2=>{const _0x45603c=_0x5912cc,_0xf88c47=_0x119b8a[_0x56feb2];if(typeof _0xf88c47!==_0x45603c(0x1ba)||!_0xf88c47)throw invalidContract(_0x56feb2);return _0xf88c47;};if(!Number[_0x5912cc(0x1bb)](_0x119b8a[_0x5912cc(0x1bf)])||_0x119b8a[_0x5912cc(0x1bf)]<0x1)throw invalidContract('revision');if(_0x119b8a[_0x5912cc(0x1b4)]!==_0x5912cc(0x1d5)&&_0x119b8a[_0x5912cc(0x1b4)]!==_0x5912cc(0x1b0))throw invalidContract(_0x5912cc(0x1b4));if(typeof _0x119b8a[_0x5912cc(0x1bd)]!=='string'||typeof _0x119b8a['text']!==_0x5912cc(0x1ba))throw invalidContract(_0x5912cc(0x1b1));if(!Array[_0x5912cc(0x17e)](_0x119b8a[_0x5912cc(0x195)])||_0x119b8a[_0x5912cc(0x195)][_0x5912cc(0x190)](_0x50da87=>typeof _0x50da87!==_0x5912cc(0x1ba)))throw invalidContract('tags');if(!Number[_0x5912cc(0x1bb)](_0x119b8a[_0x5912cc(0x182)])||_0x119b8a[_0x5912cc(0x182)]!==_0x73cad1+0x1)throw invalidContract(_0x5912cc(0x182));if(!isFiniteNumber(_0x119b8a[_0x5912cc(0x18a)])||!isFiniteNumber(_0x119b8a[_0x5912cc(0x1c6)]))throw invalidContract(_0x5912cc(0x19a));return{'documentId':_0x41fc02(_0x5912cc(0x1c3)),'revision':_0x119b8a['revision'],'chunkId':_0x41fc02(_0x5912cc(0x1a6)),'scope':_0x119b8a[_0x5912cc(0x1b4)],'title':_0x119b8a[_0x5912cc(0x1bd)],'text':_0x119b8a[_0x5912cc(0x1b1)],'tags':[..._0x119b8a[_0x5912cc(0x195)]],'rank':_0x119b8a[_0x5912cc(0x182)],'rawScore':_0x119b8a[_0x5912cc(0x18a)],'finalScore':_0x119b8a[_0x5912cc(0x1c6)],'scoreKind':_0x41fc02(_0x5912cc(0x18e))};}function requireExactRecord(_0x471d28,_0xc70032,_0x4c0457){const _0x91cfce=a283_0x2f5a00,_0x20dcae=requireRecord(_0x471d28,_0x4c0457),_0x2cec8d=Object[_0x91cfce(0x180)](_0x20dcae)[_0x91cfce(0x19d)](),_0x4a81c5=[..._0xc70032][_0x91cfce(0x19d)]();if(_0x2cec8d['length']!==_0x4a81c5['length']||_0x2cec8d[_0x91cfce(0x190)]((_0x362a4c,_0x14d891)=>_0x362a4c!==_0x4a81c5[_0x14d891]))throw invalidContract(_0x4c0457);return _0x20dcae;}function requireRecord(_0x52fe1f,_0x5376f8){const _0x3b52e3=a283_0x2f5a00;if(!_0x52fe1f||typeof _0x52fe1f!==_0x3b52e3(0x1d1)||Array[_0x3b52e3(0x17e)](_0x52fe1f))throw invalidContract(_0x5376f8);return _0x52fe1f;}function isFiniteNumber(_0x32000d){const _0x4343ba=a283_0x2f5a00;return typeof _0x32000d===_0x4343ba(0x1d8)&&Number[_0x4343ba(0x185)](_0x32000d);}function invalidContract(_0x1cfc76){const _0xcf29ea=a283_0x2f5a00;return CliErrors[_0xcf29ea(0x1bc)](_0xcf29ea(0x186)+_0x1cfc76+_0xcf29ea(0x1b7));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x241411,_0x11afcf){const _0x3e2919=a284_0x1ac6,_0x550291=_0x241411();while(!![]){try{const _0x1847db=parseInt(_0x3e2919(0x96))/0x1+parseInt(_0x3e2919(0x92))/0x2+parseInt(_0x3e2919(0x97))/0x3+-parseInt(_0x3e2919(0x88))/0x4+-parseInt(_0x3e2919(0x87))/0x5+-parseInt(_0x3e2919(0x83))/0x6+parseInt(_0x3e2919(0x89))/0x7;if(_0x1847db===_0x11afcf)break;else _0x550291['push'](_0x550291['shift']());}catch(_0x1281a8){_0x550291['push'](_0x550291['shift']());}}}(a284_0x2e1f,0x550d7));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a284_0x1ac6(_0x16f6c4,_0x272433){_0x16f6c4=_0x16f6c4-0x7f;const _0x2e1f6c=a284_0x2e1f();let _0x1ac698=_0x2e1f6c[_0x16f6c4];return _0x1ac698;}export function loadPageProjectConfig(_0x2b7dde,_0x7cd1f3=process['cwd']()){const _0x441e69=a284_0x1ac6,_0x5ae6f8=resolve(_0x7cd1f3),_0x5d7952=join(_0x5ae6f8,'.rabetbase',_0x441e69(0x8b));return{'projectRoot':_0x5ae6f8,'pagesBaseDir':_0x5d7952,'appPagesDir':join(_0x5d7952,_0x2b7dde),'lockFilePath':join(_0x5ae6f8,_0x441e69(0x84),_0x441e69(0x8c))};}function a284_0x2e1f(){const _0x5529b7=['isFile','1269828dMRVCa','.rabetbase','trim','toUpperCase','1843825KqOEoq','819736AKpbCi','5620426fDloCv','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','page','page.lock.json','Unsupported\x20file\x20in\x20page\x20directory:\x20','appPagesDir','sort','.json','name','211308uSqIkI','utf8','Page\x20directory\x20not\x20found:\x20','split','142170cyKwrx','248910qaiwPl','page-dir','validation','F_OK','isDirectory'];a284_0x2e1f=function(){return _0x5529b7;};return a284_0x2e1f();}export function buildPageFileName(_0x2fd739,_0x461db6){const _0x4889b1=a284_0x1ac6;return _0x2fd739+'-'+_0x461db6[_0x4889b1(0x86)]()+_0x4889b1(0x90);}export function resolvePageFilePath(_0x3357b8,_0x24b6b4,_0x25ac6f){const _0x334d69=a284_0x1ac6;return join(_0x3357b8[_0x334d69(0x8e)],buildPageFileName(_0x24b6b4,_0x25ac6f));}export async function ensureParentDirectory(_0x2bdf7c){await mkdir(dirname(_0x2bdf7c),{'recursive':!![]});}export async function fileExists(_0xfd5255){const _0x1d4904=a284_0x1ac6;try{return await access(_0xfd5255,constants[_0x1d4904(0x80)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0xbcc5b9){const _0x215bd4=a284_0x1ac6,_0x55a86b=_0xbcc5b9[_0x215bd4(0x85)]();if(!_0x55a86b)throw CliErrors['flagMissing'](_0x215bd4(0x98));const _0x233b8a=resolve(_0x55a86b);let _0x2481c9;try{_0x2481c9=await lstat(_0x233b8a);}catch{throw CliErrors[_0x215bd4(0x7f)](_0x215bd4(0x94)+_0x55a86b);}if(!_0x2481c9[_0x215bd4(0x81)]())throw CliErrors[_0x215bd4(0x7f)](_0x215bd4(0x8a)+_0x55a86b);const _0x445dce={};return await readDirectory(_0x233b8a,_0x233b8a,_0x445dce),_0x445dce;}async function readDirectory(_0x57779f,_0x593675,_0x35061f){const _0x49d0af=a284_0x1ac6,_0xed7e3c=await readdir(_0x593675,{'withFileTypes':!![]});for(const _0x556e62 of _0xed7e3c[_0x49d0af(0x8f)]((_0x5628e4,_0x57e1ee)=>_0x5628e4[_0x49d0af(0x91)]['localeCompare'](_0x57e1ee['name']))){const _0x1831d2=join(_0x593675,_0x556e62[_0x49d0af(0x91)]);if(_0x556e62[_0x49d0af(0x81)]()){await readDirectory(_0x57779f,_0x1831d2,_0x35061f);continue;}if(!_0x556e62[_0x49d0af(0x82)]())throw CliErrors[_0x49d0af(0x7f)](_0x49d0af(0x8d)+_0x1831d2);_0x35061f[relative(_0x57779f,_0x1831d2)[_0x49d0af(0x95)](sep)['join']('/')]=await readFile(_0x1831d2,_0x49d0af(0x93));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28ff8d,_0x325ff3){const _0x29140b=a285_0x32ea,_0xb1f66b=_0x28ff8d();while(!![]){try{const _0x406e95=-parseInt(_0x29140b(0xac))/0x1*(parseInt(_0x29140b(0xb4))/0x2)+parseInt(_0x29140b(0xb9))/0x3+parseInt(_0x29140b(0xb7))/0x4*(parseInt(_0x29140b(0xb6))/0x5)+-parseInt(_0x29140b(0xb2))/0x6+-parseInt(_0x29140b(0xae))/0x7+-parseInt(_0x29140b(0xad))/0x8+-parseInt(_0x29140b(0xb5))/0x9*(-parseInt(_0x29140b(0xb8))/0xa);if(_0x406e95===_0x325ff3)break;else _0xb1f66b['push'](_0xb1f66b['shift']());}catch(_0x132852){_0xb1f66b['push'](_0xb1f66b['shift']());}}}(a285_0x3bc6,0xf3c46));function a285_0x3bc6(){const _0x13465a=['4755459ucbrMk','7KNHGZP','10558848VLgiLX','12783155XTWLmA','stringify','md5','hex','10796748EGPuqh','utf8','454186pLXgfa','776151TEdHvY','238985jzrgfp','72YONTRi','590eywbkU'];a285_0x3bc6=function(){return _0x13465a;};return a285_0x3bc6();}import a285_0x18242e from'node:crypto';function a285_0x32ea(_0x31b57c,_0x2b77ac){_0x31b57c=_0x31b57c-0xac;const _0x3bc698=a285_0x3bc6();let _0x32ea53=_0x3bc698[_0x31b57c];return _0x32ea53;}import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x20eaed){const _0x53a636=a285_0x32ea;return JSON[_0x53a636(0xaf)](JSON['parse'](_0x20eaed),null,0x2)+'\x0a';}export function computePageContentHash(_0x602ea6){const _0x5bcb1a=a285_0x32ea;return a285_0x18242e['createHash'](_0x5bcb1a(0xb0))['update'](_0x602ea6)['digest'](_0x5bcb1a(0xb1));}export function computeSerializedSchemaHash(_0x1d2478){return computePageContentHash(serializePageSchemaForFile(_0x1d2478));}export async function computePageFileHash(_0x2e8ecd){const _0x48a037=a285_0x32ea,_0x332b37=await readFile(_0x2e8ecd,_0x48a037(0xb3));return computePageContentHash(_0x332b37);}
|