@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.5
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 +8 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/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.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.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +16 -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.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +22 -13
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +8 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a282_0x1fda(_0x42b5c5,_0x20e0da){_0x42b5c5=_0x42b5c5-0xbd;const _0x55a9a0=a282_0x55a9();let _0x1fda97=_0x55a9a0[_0x42b5c5];return _0x1fda97;}const a282_0x13f12c=a282_0x1fda;(function(_0x565795,_0x9b2f45){const _0x226088=a282_0x1fda,_0x5021a8=_0x565795();while(!![]){try{const _0x11afa8=parseInt(_0x226088(0xf2))/0x1*(parseInt(_0x226088(0xd7))/0x2)+parseInt(_0x226088(0x166))/0x3*(parseInt(_0x226088(0x15a))/0x4)+parseInt(_0x226088(0x118))/0x5*(-parseInt(_0x226088(0x1a1))/0x6)+-parseInt(_0x226088(0xf4))/0x7*(parseInt(_0x226088(0x1a2))/0x8)+-parseInt(_0x226088(0xff))/0x9+parseInt(_0x226088(0x1e7))/0xa+-parseInt(_0x226088(0x20e))/0xb*(-parseInt(_0x226088(0xdb))/0xc);if(_0x11afa8===_0x9b2f45)break;else _0x5021a8['push'](_0x5021a8['shift']());}catch(_0x159a48){_0x5021a8['push'](_0x5021a8['shift']());}}}(a282_0x55a9,0x326d8));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':a282_0x13f12c(0x1ff),'$id':a282_0x13f12c(0xfb),'title':a282_0x13f12c(0x1c4),'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0x19f),a282_0x13f12c(0x148),a282_0x13f12c(0xfd)],'$defs':{'userId':{'anyOf':[{'type':a282_0x13f12c(0xd2),'minLength':0x1},{'type':'integer','minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a282_0x13f12c(0x1fa),'minimum':0x0},'y':{'type':'number','minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0x1a9),'unit'],'properties':{'value':{'type':a282_0x13f12c(0x112),'minimum':0x1},'unit':{'enum':[a282_0x13f12c(0x205),'MINUTES',a282_0x13f12c(0x10a),a282_0x13f12c(0x1d9)]}},'additionalProperties':!![]},'flowNode':{'type':a282_0x13f12c(0x1ea),'required':['id',a282_0x13f12c(0x199),a282_0x13f12c(0x15e),a282_0x13f12c(0x109)],'properties':{'id':{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x17f)},'type':{'enum':[a282_0x13f12c(0x158),'END',a282_0x13f12c(0x196),a282_0x13f12c(0x1aa),a282_0x13f12c(0xc9),a282_0x13f12c(0x18c)]},'name':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'path':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a282_0x13f12c(0x124),a282_0x13f12c(0x16d),a282_0x13f12c(0x1cf)]},'taskMode':{'enum':['APPROVAL',a282_0x13f12c(0xf9)]},'assignee':{'type':'object','required':[a282_0x13f12c(0x188)],'properties':{'strategy':{'enum':[a282_0x13f12c(0x143),a282_0x13f12c(0x1f4)]},'userIds':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':a282_0x13f12c(0x1b0)}},'roleId':{'anyOf':[{'type':a282_0x13f12c(0x112),'minimum':0x1},{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x142)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a282_0x13f12c(0x188),a282_0x13f12c(0x15c)],'properties':{'strategy':{'const':a282_0x13f12c(0x143)},'userIds':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':a282_0x13f12c(0x1b0)}}},'additionalProperties':!![]},'sequential':{'type':a282_0x13f12c(0xf3)},'result':{'enum':['APPROVED','REJECTED']},'scriptName':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'resultVariable':{'type':'string','pattern':a282_0x13f12c(0x17f)},'async':{'type':a282_0x13f12c(0x1ea),'properties':{'enabled':{'type':a282_0x13f12c(0xf3)},'retryCount':{'type':'integer','minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':a282_0x13f12c(0x1ea),'properties':{'enabled':{'type':a282_0x13f12c(0xf3)},'duration':{'$ref':a282_0x13f12c(0x18f)},'action':{'enum':[a282_0x13f12c(0x1e4),a282_0x13f12c(0x21d),a282_0x13f12c(0x13e)]},'interrupting':{'type':'boolean'},'scriptName':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'resultVariable':{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x17f)}},'additionalProperties':!![]},'cc':{'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0xea)],'properties':{'recipientUserIds':{'type':a282_0x13f12c(0x210),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a282_0x13f12c(0xd2),'minLength':0x1}},'visible':{'type':a282_0x13f12c(0x210),'uniqueItems':!![],'items':{'type':a282_0x13f12c(0xd2),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a282_0x13f12c(0xee),a282_0x13f12c(0x15f)],'properties':{'version':{'enum':['v1']},'configCode':{'type':'string','minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a282_0x13f12c(0x1e1)]},'template':{'type':'object','required':['title',a282_0x13f12c(0x115)],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'detailMarkdown':{'type':a282_0x13f12c(0xd2)},'facts':{'type':a282_0x13f12c(0x210),'maxItems':0x8,'items':{'type':'object','required':[a282_0x13f12c(0xe2),a282_0x13f12c(0x1a9)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':'array','maxItems':0x2,'items':{'type':a282_0x13f12c(0x1ea),'required':[a282_0x13f12c(0x181),a282_0x13f12c(0x1d3)],'properties':{'text':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'url':{'type':a282_0x13f12c(0xd2),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a282_0x13f12c(0x210),'items':{'type':a282_0x13f12c(0x1ea),'required':['type','value'],'properties':{'type':{'enum':[a282_0x13f12c(0x1e5),a282_0x13f12c(0x1f4),a282_0x13f12c(0x182)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a282_0x13f12c(0x150)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':'object','properties':{'id':{'type':a282_0x13f12c(0xd2),'pattern':a282_0x13f12c(0x17f)},'source':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'target':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'sourceNodeId':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a282_0x13f12c(0x198),a282_0x13f12c(0x1b8),a282_0x13f12c(0x1db),'EXPRESSION']},'expression':{'type':a282_0x13f12c(0xd2)},'defaultFlow':{'type':a282_0x13f12c(0xf3)},'name':{'type':'string'},'waypoints':{'type':a282_0x13f12c(0x210),'items':{'$ref':a282_0x13f12c(0x1df)}}},'allOf':[{'anyOf':[{'required':[a282_0x13f12c(0x19a)]},{'required':[a282_0x13f12c(0x170)]}]},{'anyOf':[{'required':['target']},{'required':[a282_0x13f12c(0x165)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a282_0x13f12c(0x197),'INDEPENDENT_FLOW']},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':'integer'},'templateName':![],'flowJson':{'type':a282_0x13f12c(0x1ea),'required':['nodes',a282_0x13f12c(0x1a8)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a282_0x13f12c(0xd2),'const':a282_0x13f12c(0x204),'description':a282_0x13f12c(0x141)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a282_0x13f12c(0x1f5)},'startPageId':![],'startPath':{'type':a282_0x13f12c(0xd2),'minLength':0x1},'nodes':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a282_0x13f12c(0x210),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode','flowName',a282_0x13f12c(0x1a4),a282_0x13f12c(0x164),'appCode','pageId',a282_0x13f12c(0x1d4)],REMOVED_ROOT_FIELDS=['id',a282_0x13f12c(0x11f),a282_0x13f12c(0x1d4)],DEFAULT_FLOW_SCHEMA_VERSION=a282_0x13f12c(0x204),NODE_TYPES=new Set([a282_0x13f12c(0x158),a282_0x13f12c(0x207),a282_0x13f12c(0x196),a282_0x13f12c(0x1aa),'SCRIPT',a282_0x13f12c(0x18c)]),CONDITION_TYPES=new Set([a282_0x13f12c(0x198),a282_0x13f12c(0x1b8),a282_0x13f12c(0x1db),'EXPRESSION']),APPROVAL_MODES=new Set([a282_0x13f12c(0x124),a282_0x13f12c(0x16d),a282_0x13f12c(0x1cf)]),APPROVAL_TASK_MODES=new Set(['APPROVAL',a282_0x13f12c(0xf9)]),FLOW_TIME_UNITS=new Set([a282_0x13f12c(0x205),'MINUTES','HOURS','DAYS']),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a282_0x13f12c(0x21d),a282_0x13f12c(0x13e)]),FLOW_TYPES=new Set([a282_0x13f12c(0x197),'INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a282_0x13f12c(0x1f5),a282_0x13f12c(0xbf)]),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([a282_0x13f12c(0x173),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a282_0x13f12c(0x1e5),'ROLE',a282_0x13f12c(0x182)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC','BCC']),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a282_0x13f12c(0x1fe),UNSUPPORTED_FORM_MESSAGE=a282_0x13f12c(0x192),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a282_0x13f12c(0x127),RESERVED_RESULT_VARIABLES=new Set([a282_0x13f12c(0x105),a282_0x13f12c(0x1c9),a282_0x13f12c(0xe4),'approval_sys_processInstanceId',a282_0x13f12c(0xcb),a282_0x13f12c(0x221),a282_0x13f12c(0x160),a282_0x13f12c(0x10f),a282_0x13f12c(0x1c2),a282_0x13f12c(0x1ad)]);export function normalizeFlowConfig(_0x264a22){const _0x66bd2d=a282_0x13f12c;if(!isRecord(_0x264a22))throw new TypeError(_0x66bd2d(0x14f));const _0x52f682=cloneJsonValue(_0x264a22),_0x167483=_0x52f682[_0x66bd2d(0xfd)],_0x46a934=isRecord(_0x167483)?cloneJsonValue(_0x167483):{},_0x140028=[],_0x17a1d9=[];for(const _0x19c39d of REMOVED_ROOT_FIELDS){if(!Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)][_0x66bd2d(0x13b)](_0x52f682,_0x19c39d))continue;delete _0x52f682[_0x19c39d],_0x17a1d9[_0x66bd2d(0x1ba)](_0x19c39d),_0x140028[_0x66bd2d(0x1ba)]({'code':_0x66bd2d(0x11c),'path':_0x19c39d,'message':_0x19c39d+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x50b260 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)][_0x66bd2d(0x13b)](_0x46a934,_0x50b260))continue;const _0x2f8c9f=_0x66bd2d(0x1c3)+_0x50b260;delete _0x46a934[_0x50b260],_0x17a1d9[_0x66bd2d(0x1ba)](_0x2f8c9f),_0x140028[_0x66bd2d(0x1ba)]({'code':_0x66bd2d(0x11c),'path':_0x2f8c9f,'message':_0x2f8c9f+_0x66bd2d(0xc4)});}if(Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)]['call'](_0x46a934,_0x66bd2d(0x1ce))){const _0x11abc6=_0x46a934[_0x66bd2d(0x1ce)],_0x233ff7=typeof _0x11abc6===_0x66bd2d(0xd2)?_0x11abc6['trim']():_0x11abc6;if(isEmptyJsonValue(_0x11abc6)||_0x233ff7===DEFAULT_FLOW_SCHEMA_VERSION){const _0x2aefc9=_0x66bd2d(0xc0);delete _0x46a934[_0x66bd2d(0x1ce)],_0x17a1d9[_0x66bd2d(0x1ba)](_0x2aefc9),_0x140028['push']({'code':_0x66bd2d(0x11c),'path':_0x2aefc9,'message':_0x2aefc9+_0x66bd2d(0x161)+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x46a934,'flowJson',_0x140028,_0x17a1d9);_0x52f682[_0x66bd2d(0x148)]===_0x66bd2d(0x209)&&!Object[_0x66bd2d(0x110)][_0x66bd2d(0x21e)][_0x66bd2d(0x13b)](_0x46a934,_0x66bd2d(0xef))&&(_0x46a934['pageMode']=_0x66bd2d(0x1f5));_0x52f682[_0x66bd2d(0xfd)]=_0x46a934;if(typeof _0x52f682['flowName']===_0x66bd2d(0xd2))_0x52f682[_0x66bd2d(0x19f)]=_0x52f682[_0x66bd2d(0x19f)]['trim']();return{'config':_0x52f682,'warnings':_0x140028,'removedPaths':_0x17a1d9};}export function validateFlowConfig(_0x2a714c){const _0x511052=a282_0x13f12c;let _0x38fff1;try{_0x38fff1=normalizeFlowConfig(_0x2a714c);}catch(_0xd95f0f){const _0x3679b2=_0xd95f0f instanceof Error?_0xd95f0f[_0x511052(0x1e3)]:String(_0xd95f0f),_0x495f26={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x3679b2}],'warnings':[],'normalized':_0x495f26,'validationConfig':_0x495f26};}const _0xbc02f1=_0x38fff1[_0x511052(0x14b)],_0x4db239=cloneJsonValue(_0xbc02f1),_0x1ca089=_0x4db239[_0x511052(0xfd)];_0x1ca089[_0x511052(0xf6)]=_0x511052(0x19b),_0x1ca089['flowName']=_0xbc02f1['flowName'];typeof _0xbc02f1['datasetCode']===_0x511052(0xd2)&&_0xbc02f1[_0x511052(0x164)][_0x511052(0x216)]()&&(_0x1ca089[_0x511052(0x1a4)]=_0xbc02f1[_0x511052(0x164)][_0x511052(0x216)]());const _0x4135f3=[];return validateOuterMetadata(_0xbc02f1,_0x4135f3),validateFlowClassification(_0xbc02f1,_0x4135f3),validateGraph(_0xbc02f1[_0x511052(0xfd)],_0x4135f3),{'valid':_0x4135f3[_0x511052(0x1dc)]===0x0,'errors':_0x4135f3,'warnings':_0x38fff1[_0x511052(0x21f)],'normalized':_0xbc02f1,'validationConfig':_0x4db239};}function validateFlowClassification(_0xc39f85,_0xf58fd7){const _0x452633=a282_0x13f12c;if(!isRecord(_0xc39f85[_0x452633(0xfd)]))return;const _0x55f9d0=_0xc39f85[_0x452633(0x148)],_0xecdee3=_0xc39f85['flowJson'][_0x452633(0xef)];_0xecdee3!==undefined&&(typeof _0xecdee3!=='string'||!FLOW_PAGE_MODES[_0x452633(0x212)](_0xecdee3))&&_0xf58fd7[_0x452633(0x1ba)]({'path':_0x452633(0x1bb),'message':_0x452633(0x125)+String(_0xecdee3)+'.'});_0x55f9d0===_0x452633(0x197)&&_0xecdee3!==undefined&&_0xf58fd7['push']({'path':_0x452633(0x1bb),'message':_0x452633(0x185)});_0x55f9d0===_0x452633(0x209)&&_0xecdee3===_0x452633(0xbf)&&_0xf58fd7[_0x452633(0x1ba)]({'path':_0x452633(0x1bb),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x55f9d0===_0x452633(0x197)||_0x55f9d0==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0xc39f85,_0x55f9d0,_0xecdee3,_0xf58fd7);if(_0x55f9d0!==_0x452633(0x197)||!Array[_0x452633(0x126)](_0xc39f85[_0x452633(0xfd)][_0x452633(0x138)]))return;_0xc39f85[_0x452633(0xfd)][_0x452633(0x138)]['forEach']((_0x5daf0f,_0x37d3cb)=>{const _0x37306e=_0x452633;isRecord(_0x5daf0f)&&_0x5daf0f[_0x37306e(0x199)]==='APPROVAL'&&_0x5daf0f[_0x37306e(0x1d1)]===_0x37306e(0xf9)&&_0xf58fd7[_0x37306e(0x1ba)]({'path':_0x37306e(0x1c1)+_0x37d3cb+_0x37306e(0x10c),'message':_0x37306e(0x113)});});}function validateCustomPageNavigation(_0x9571f1,_0x30ecbd,_0x463bae,_0x5e6473){const _0x2735c7=a282_0x13f12c,_0x4c0c44=_0x9571f1[_0x2735c7(0xfd)]['startPageId'];_0x4c0c44!==undefined&&_0x5e6473[_0x2735c7(0x1ba)]({'path':_0x2735c7(0xdd),'message':_0x2735c7(0x11d)});const _0x1a41ce=_0x9571f1[_0x2735c7(0xfd)][_0x2735c7(0x12f)];_0x1a41ce!==undefined&&(typeof _0x1a41ce!==_0x2735c7(0xd2)||_0x1a41ce['trim']()==='')&&_0x5e6473[_0x2735c7(0x1ba)]({'path':_0x2735c7(0xce),'message':_0x2735c7(0xdf)});const _0x5b808d=Array[_0x2735c7(0x126)](_0x9571f1[_0x2735c7(0xfd)][_0x2735c7(0x138)])?_0x9571f1[_0x2735c7(0xfd)][_0x2735c7(0x138)][_0x2735c7(0xe0)]((_0x4ec1ca,_0x4a80a5)=>({'node':_0x4ec1ca,'index':_0x4a80a5}))[_0x2735c7(0x226)](({node:_0x5f466c})=>isRecord(_0x5f466c)&&_0x5f466c[_0x2735c7(0xd8)]!==undefined):[],_0x36d68e=_0x1a41ce!==undefined||_0x5b808d['length']>0x0,_0x5e60aa=_0x463bae===undefined&&_0x30ecbd==='INDEPENDENT_FLOW'?'CUSTOM_PAGE':_0x463bae;_0x36d68e&&(_0x30ecbd!=='INDEPENDENT_FLOW'||_0x5e60aa!==_0x2735c7(0x1f5))&&(_0x1a41ce!==undefined&&_0x5e6473[_0x2735c7(0x1ba)]({'path':_0x2735c7(0xce),'message':_0x2735c7(0x123)}),_0x5b808d[_0x2735c7(0x1f2)](({index:_0x2d52ce})=>{const _0x17fdb4=_0x2735c7;_0x5e6473['push']({'path':'flowJson.nodes['+_0x2d52ce+'].path','message':_0x17fdb4(0x151)});}));}export async function writeNormalizedFlowConfig(_0x331d31,_0x175420,_0x404326={}){const _0x1205a7=a282_0x13f12c,_0xb0f143=resolve(_0x331d31),_0x27412b=_0xb0f143+'.'+process[_0x1205a7(0x190)]+'.'+randomUUID()+_0x1205a7(0x1bc),_0x49bfb6=JSON['stringify'](_0x175420,null,0x2)+'\x0a';let _0xde774a;try{try{_0xde774a=(await stat(_0xb0f143))[_0x1205a7(0x134)]&0x1ff;}catch{_0xde774a=undefined;}await writeFile(_0x27412b,_0x49bfb6,{'encoding':'utf8','flag':'wx','mode':_0xde774a??0x1a4});if(_0xde774a!==undefined)await chmod(_0x27412b,_0xde774a);_0x404326[_0x1205a7(0xd5)]===![]?(await link(_0x27412b,_0xb0f143),await unlink(_0x27412b)):await rename(_0x27412b,_0xb0f143);}finally{await unlink(_0x27412b)[_0x1205a7(0x1dd)](()=>undefined);}}function validateOuterMetadata(_0xc5c097,_0x396c9c){const _0x1d88a8=a282_0x13f12c;(typeof _0xc5c097[_0x1d88a8(0x19f)]!==_0x1d88a8(0xd2)||_0xc5c097[_0x1d88a8(0x19f)][_0x1d88a8(0x216)]()==='')&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x19f),'message':_0x1d88a8(0x1d8)});_0xc5c097[_0x1d88a8(0x22b)]!==undefined&&typeof _0xc5c097[_0x1d88a8(0x22b)]!==_0x1d88a8(0xd2)&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x22b),'message':_0x1d88a8(0xc8)});if(_0xc5c097[_0x1d88a8(0x148)]===undefined||_0xc5c097[_0x1d88a8(0x148)]===null)_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x148),'message':_0x1d88a8(0x1ec)});else(typeof _0xc5c097['flowType']!==_0x1d88a8(0xd2)||!FLOW_TYPES['has'](_0xc5c097[_0x1d88a8(0x148)]))&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x148),'message':'Unsupported\x20flowType:\x20'+String(_0xc5c097[_0x1d88a8(0x148)])+'.'});_0xc5c097[_0x1d88a8(0x164)]!==undefined&&typeof _0xc5c097[_0x1d88a8(0x164)]!==_0x1d88a8(0xd2)&&_0x396c9c['push']({'path':_0x1d88a8(0x164),'message':'datasetCode\x20must\x20be\x20a\x20string.'}),_0xc5c097[_0x1d88a8(0x13a)]!==undefined&&(!Number[_0x1d88a8(0x16a)](_0xc5c097['pageId'])||_0xc5c097[_0x1d88a8(0x13a)]<0x0)&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x13a),'message':_0x1d88a8(0x12a)}),_0xc5c097['flowType']===_0x1d88a8(0x209)&&_0xc5c097['datasetCode']!==undefined&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x164),'message':_0x1d88a8(0x21b)}),_0xc5c097[_0x1d88a8(0x148)]==='INDEPENDENT_FLOW'&&_0xc5c097[_0x1d88a8(0x13a)]!==undefined&&_0x396c9c[_0x1d88a8(0x1ba)]({'path':_0x1d88a8(0x13a),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x349e9c,_0x38411a){const _0x2b5b42=a282_0x13f12c;if(!isRecord(_0x349e9c)){_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0xfd),'message':_0x2b5b42(0x104)});return;}!Array['isArray'](_0x349e9c['nodes'])&&_0x38411a['push']({'path':_0x2b5b42(0x228),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x2b5b42(0x126)](_0x349e9c['edges'])&&_0x38411a[_0x2b5b42(0x1ba)]({'path':'flowJson.edges','message':_0x2b5b42(0x21a)});Object[_0x2b5b42(0x110)][_0x2b5b42(0x21e)][_0x2b5b42(0x13b)](_0x349e9c,_0x2b5b42(0x1ce))&&_0x38411a[_0x2b5b42(0x1ba)]({'path':'flowJson.schemaVersion','message':_0x2b5b42(0x140)+String(_0x349e9c[_0x2b5b42(0x1ce)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0xeea4f of[_0x2b5b42(0x1a7),'formDefinitions',_0x2b5b42(0xf7)]){Object['prototype'][_0x2b5b42(0x21e)][_0x2b5b42(0x13b)](_0x349e9c,_0xeea4f)&&_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0x1c3)+_0xeea4f,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2b5b42(0x126)](_0x349e9c[_0x2b5b42(0x138)])||!Array['isArray'](_0x349e9c[_0x2b5b42(0x1a8)]))return;const _0x2e30c6=new Map(),_0x3d4cbe=[],_0x4bfd48=[],_0x36bd5b=new Map(),_0x3b3056=new Map(),_0x2b02d1=new Set();let _0x3d2689=0x0;_0x349e9c[_0x2b5b42(0x138)][_0x2b5b42(0x1f2)]((_0x232d29,_0x2052f4)=>{const _0x355580=_0x2b5b42,_0x26724d=_0x355580(0x1c1)+_0x2052f4+']';if(!isRecord(_0x232d29)){_0x38411a['push']({'path':_0x26724d,'message':_0x355580(0x102)});return;}const _0x2535ab=_0x232d29;if(typeof _0x2535ab['id']!=='string'||!BPMN_ID_PATTERN[_0x355580(0x154)](_0x2535ab['id']))_0x38411a['push']({'path':_0x26724d+_0x355580(0x177),'message':'node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else _0x2e30c6[_0x355580(0x212)](_0x2535ab['id'])?_0x38411a[_0x355580(0x1ba)]({'path':_0x26724d+_0x355580(0x177),'message':_0x355580(0x187)+_0x2535ab['id']+'.'}):(_0x2e30c6['set'](_0x2535ab['id'],_0x2535ab),_0x2b02d1[_0x355580(0x203)](_0x2535ab['id']));if(!NODE_TYPES[_0x355580(0x212)](_0x2535ab[_0x355580(0x199)]))_0x38411a[_0x355580(0x1ba)]({'path':_0x26724d+_0x355580(0x1fc),'message':_0x355580(0x13d)+String(_0x2535ab['type'])+'.'});else{if(_0x2535ab['type']==='START')_0x3d4cbe[_0x355580(0x1ba)](_0x2535ab['id']);else _0x2535ab[_0x355580(0x199)]===_0x355580(0x207)&&_0x4bfd48[_0x355580(0x1ba)](_0x2535ab['id']);}_0x2535ab[_0x355580(0x199)]===_0x355580(0x196)&&(_0x2535ab[_0x355580(0x1d1)]===undefined||_0x2535ab[_0x355580(0x1d1)]===_0x355580(0x196))&&(_0x3d2689+=0x1);validateNode(_0x2535ab,_0x26724d,_0x38411a);if(_0x2535ab[_0x355580(0x199)]===_0x355580(0xc9)){const _0x384a3b=resolveEffectiveResultVariable(_0x2535ab[_0x355580(0x223)],![]);_0x384a3b&&(registerResultVariableOwner(_0x3b3056,_0x384a3b,_0x2535ab['id'],_0x38411a),!_0x36bd5b[_0x355580(0x212)](_0x384a3b)&&_0x36bd5b['set'](_0x384a3b,_0x2535ab['id']));}if(_0x2535ab['type']===_0x355580(0x196)&&isRecord(_0x2535ab['timeout'])&&_0x2535ab[_0x355580(0x1b9)][_0x355580(0x1b5)]===!![]&&_0x2535ab[_0x355580(0x1b9)]['action']===_0x355580(0x13e)){const _0xb60562=resolveEffectiveResultVariable(_0x2535ab['timeout'][_0x355580(0x223)],!![]);_0xb60562&®isterResultVariableOwner(_0x3b3056,_0xb60562,_0x2535ab['id']+'.timeout',_0x38411a);}});_0x3d4cbe[_0x2b5b42(0x1dc)]!==0x1&&_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0x228),'message':_0x2b5b42(0x1f0)});_0x4bfd48[_0x2b5b42(0x1dc)]===0x0&&_0x38411a[_0x2b5b42(0x1ba)]({'path':_0x2b5b42(0x228),'message':_0x2b5b42(0x100)});const _0x33926c=new Map(),_0x215856=new Map(),_0x18f67c=new Map(),_0x4c17d7=new Set();_0x349e9c[_0x2b5b42(0x1a8)][_0x2b5b42(0x1f2)]((_0x214357,_0xadf3e3)=>{const _0x5b3155=_0x2b5b42,_0x671c8f='flowJson.edges['+_0xadf3e3+']';if(!isRecord(_0x214357)){_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f,'message':_0x5b3155(0x186)});return;}const _0x588230=_0x214357;_0x18f67c[_0x5b3155(0x1af)](_0x588230,_0x671c8f);const _0x27d58b=resolveEdgeEndpoint(_0x588230[_0x5b3155(0x19a)],_0x588230[_0x5b3155(0x170)]),_0x369851=resolveEdgeEndpoint(_0x588230[_0x5b3155(0xc2)],_0x588230[_0x5b3155(0x165)]);if(!_0x27d58b)_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x189),'message':_0x5b3155(0x15b)});if(!_0x369851)_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x130),'message':_0x5b3155(0x191)});_0x27d58b&&!_0x2e30c6['has'](_0x27d58b)&&_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x189),'message':_0x5b3155(0x1a6)+_0x27d58b+'.'});_0x369851&&!_0x2e30c6['has'](_0x369851)&&_0x38411a['push']({'path':_0x671c8f+_0x5b3155(0x130),'message':_0x5b3155(0x135)+_0x369851+'.'});if(_0x588230['id']!==undefined){if(typeof _0x588230['id']!==_0x5b3155(0xd2)||!BPMN_ID_PATTERN['test'](_0x588230['id']))_0x38411a['push']({'path':_0x671c8f+_0x5b3155(0x177),'message':_0x5b3155(0xca)});else{if(_0x2b02d1[_0x5b3155(0x212)](_0x588230['id']))_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f+_0x5b3155(0x177),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x588230['id']+'.'});else!_0x2b02d1[_0x5b3155(0x212)](_0x588230['id'])&&_0x2b02d1[_0x5b3155(0x203)](_0x588230['id']);}}if(_0x27d58b&&_0x369851){const _0x2995eb=_0x27d58b+'\x00'+_0x369851+'\x00'+(_0x588230['conditionType']??'ALWAYS');_0x4c17d7['has'](_0x2995eb)?_0x38411a[_0x5b3155(0x1ba)]({'path':_0x671c8f,'message':_0x5b3155(0x19e)+_0x27d58b+_0x5b3155(0x1de)+_0x369851+'\x20('+(_0x588230[_0x5b3155(0x20a)]??_0x5b3155(0x198))+').'}):_0x4c17d7['add'](_0x2995eb);}validateEdge(_0x588230,_0x671c8f,_0x38411a),_0x27d58b&&_0x369851&&(_0x33926c['get'](_0x27d58b)?.['push'](_0x588230)??_0x33926c[_0x5b3155(0x1af)](_0x27d58b,[_0x588230]),_0x215856[_0x5b3155(0x13c)](_0x369851)?.[_0x5b3155(0x1ba)](_0x588230)??_0x215856[_0x5b3155(0x1af)](_0x369851,[_0x588230]));});if(_0x3d4cbe[_0x2b5b42(0x1dc)]!==0x1)return;validateGraphShape(_0x2e30c6,_0x3d4cbe[0x0],_0x4bfd48,_0x33926c,_0x215856,_0x18f67c,_0x38411a),validateScriptResultReferences(_0x2e30c6,_0x3d4cbe[0x0],_0x33926c,_0x215856,_0x18f67c,_0x36bd5b,_0x38411a),validateApprovalResults(_0x2e30c6,_0x3d2689,_0x4bfd48,_0x38411a);}function validateNode(_0x4c5950,_0x46031c,_0x2d9dd7){const _0x161983=a282_0x13f12c;for(const _0x32e36e of['form',_0x161983(0x1d2)]){Object['prototype'][_0x161983(0x21e)][_0x161983(0x13b)](_0x4c5950,_0x32e36e)&&_0x2d9dd7['push']({'path':_0x46031c+'.'+_0x32e36e,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x161983(0x212)](_0x4c5950['type']))return;(typeof _0x4c5950['name']!==_0x161983(0xd2)||_0x4c5950[_0x161983(0x15e)][_0x161983(0x216)]()==='')&&_0x2d9dd7['push']({'path':_0x46031c+_0x161983(0x15d),'message':_0x161983(0xcc)});_0x4c5950['pageId']!==undefined&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.pageId','message':_0x161983(0x1a3)});if(_0x4c5950[_0x161983(0xd8)]!==undefined){if(typeof _0x4c5950['path']!==_0x161983(0xd2)||_0x4c5950[_0x161983(0xd8)][_0x161983(0x216)]()==='')_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x175),'message':'node\x20path\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x4c5950[_0x161983(0x199)]!=='APPROVAL'&&_0x4c5950[_0x161983(0x199)]!==_0x161983(0x207)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.path','message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x4d75b1=_0x4c5950[_0x161983(0x109)];if(!isRecord(_0x4d75b1))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x176),'message':_0x161983(0x184)});else for(const _0xa7204d of['x','y']){const _0x3fa761=_0x4d75b1[_0xa7204d];(typeof _0x3fa761!==_0x161983(0x1fa)||!Number[_0x161983(0x16e)](_0x3fa761)||_0x3fa761<0x0)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.position.'+_0xa7204d,'message':'position.'+_0xa7204d+_0x161983(0x10e)});}if(_0x4c5950[_0x161983(0x199)]===_0x161983(0x196)){const _0x13ef78=_0x4c5950[_0x161983(0x229)]??_0x161983(0x124),_0x159d4b=_0x4c5950[_0x161983(0x1d1)]??_0x161983(0x196);!APPROVAL_TASK_MODES[_0x161983(0x212)](_0x159d4b)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0xe7),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x159d4b)+'.'});!APPROVAL_MODES[_0x161983(0x212)](_0x13ef78)&&_0x2d9dd7['push']({'path':_0x46031c+_0x161983(0xeb),'message':_0x161983(0x1f1)+String(_0x13ef78)+'.'});if(!isRecord(_0x4c5950['assignee']))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x116),'message':_0x161983(0x180)});else{const _0x1888bc=_0x4c5950[_0x161983(0x119)][_0x161983(0x188)];_0x1888bc!==_0x161983(0x143)&&_0x1888bc!==_0x161983(0x1f4)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x167),'message':_0x161983(0x224)});if(_0x1888bc===_0x161983(0x143)){const _0x438072=_0x4c5950[_0x161983(0x119)][_0x161983(0x15c)];if(!Array[_0x161983(0x126)](_0x438072)||_0x438072[_0x161983(0x1dc)]===0x0)_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0xd0),'message':_0x161983(0xbd)});else{const _0x515c29=_0x438072[_0x161983(0x12c)](_0x78be62=>!isValidUserId(_0x78be62));_0x515c29>=0x0&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x1b7)+_0x515c29+']','message':_0x161983(0x1fd)});const _0x236948=new Set(_0x438072[_0x161983(0x226)](isValidUserId)[_0x161983(0xe0)](_0x1c33fb=>String(_0x1c33fb)['trim']()));_0x13ef78==='SINGLE'&&_0x236948[_0x161983(0x10d)]>0x1&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.assignee.userIds','message':_0x161983(0xda)});}}if(_0x1888bc===_0x161983(0x1f4)){const _0x1a3439=_0x4c5950[_0x161983(0x119)][_0x161983(0x1bd)],_0x4368d6=typeof _0x1a3439==='number'||typeof _0x1a3439==='string'?Number(String(_0x1a3439)[_0x161983(0x216)]()):Number[_0x161983(0x1b3)];(!Number['isSafeInteger'](_0x4368d6)||_0x4368d6<=0x0)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+'.assignee.roleId','message':_0x161983(0x145)});}}if(_0x4c5950[_0x161983(0xd6)]!==undefined){if(!isRecord(_0x4c5950[_0x161983(0xd6)]))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x218),'message':_0x161983(0x1b1)});else{if(_0x4c5950[_0x161983(0xd6)][_0x161983(0x188)]!=='FIXED')_0x2d9dd7['push']({'path':_0x46031c+'.transferCandidates.strategy','message':_0x161983(0x17b)});else{const _0x49d211=_0x4c5950[_0x161983(0xd6)]['userIds'];if(!Array[_0x161983(0x126)](_0x49d211)||_0x49d211[_0x161983(0x1dc)]===0x0)_0x2d9dd7['push']({'path':_0x46031c+_0x161983(0x215),'message':_0x161983(0x162)});else{const _0x4089c2=_0x49d211['findIndex'](_0xa857ba=>!isValidUserId(_0xa857ba));_0x4089c2>=0x0&&_0x2d9dd7['push']({'path':_0x46031c+'.transferCandidates.userIds['+_0x4089c2+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x4c5950[_0x161983(0x1e2)]!==undefined&&typeof _0x4c5950[_0x161983(0x1e2)]!==_0x161983(0xf3)&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x149),'message':_0x161983(0x22a)});if(_0x4c5950[_0x161983(0x199)]===_0x161983(0xc9)){(typeof _0x4c5950[_0x161983(0xe5)]!==_0x161983(0xd2)||_0x4c5950[_0x161983(0xe5)][_0x161983(0x216)]()==='')&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x16b),'message':_0x161983(0x219)});if(_0x4c5950[_0x161983(0x223)]!==undefined){if(typeof _0x4c5950[_0x161983(0x223)]!=='string'||!VARIABLE_PATTERN[_0x161983(0x154)](_0x4c5950[_0x161983(0x223)]))_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x1be),'message':_0x161983(0x214)});else(RESERVED_RESULT_VARIABLES[_0x161983(0x212)](_0x4c5950[_0x161983(0x223)])||_0x4c5950[_0x161983(0x223)][_0x161983(0x1f9)](_0x161983(0x131)))&&_0x2d9dd7[_0x161983(0x1ba)]({'path':_0x46031c+_0x161983(0x1be),'message':_0x161983(0x156)+_0x4c5950[_0x161983(0x223)]+'.'});}}validateAsyncExecution(_0x4c5950,_0x46031c,_0x2d9dd7),validateApprovalTimeout(_0x4c5950,_0x46031c,_0x2d9dd7),validateCcConfig(_0x4c5950,_0x46031c,_0x2d9dd7),_0x4c5950[_0x161983(0x199)]===_0x161983(0x18c)&&validateNotificationConfig(_0x4c5950[_0x161983(0x14b)],_0x46031c+_0x161983(0x1cc),_0x2d9dd7);}function validateAsyncExecution(_0x5981f8,_0x5929a7,_0x171fef){const _0x5a1312=a282_0x13f12c;if(_0x5981f8[_0x5a1312(0x1e0)]===undefined)return;if(!isRecord(_0x5981f8[_0x5a1312(0x1e0)])){_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+_0x5a1312(0x1c7),'message':_0x5a1312(0x16f)});return;}if(_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x1b5)]!==undefined&&typeof _0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x1b5)]!=='boolean'){_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+'.async.enabled','message':_0x5a1312(0x1c0)});return;}if(_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x1b5)]!==!![])return;_0x5981f8[_0x5a1312(0x199)]!==_0x5a1312(0xc9)&&_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+_0x5a1312(0x1c7),'message':_0x5a1312(0x20b)});const _0x271049=_0x5981f8['async'][_0x5a1312(0xd4)]??0x3;(!Number[_0x5a1312(0x16a)](_0x271049)||_0x271049<0x1||_0x271049>MAX_ASYNC_RETRY_COUNT)&&_0x171fef[_0x5a1312(0x1ba)]({'path':_0x5929a7+'.async.retryCount','message':_0x5a1312(0x144)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x111)]!==undefined&&validateTimeAmount(_0x5981f8[_0x5a1312(0x1e0)][_0x5a1312(0x111)],_0x5929a7+_0x5a1312(0x146),_0x171fef);}function validateApprovalTimeout(_0x43f3fd,_0x188953,_0x408dee){const _0x25b49a=a282_0x13f12c;if(_0x43f3fd[_0x25b49a(0x1b9)]===undefined)return;if(!isRecord(_0x43f3fd[_0x25b49a(0x1b9)])){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+'.timeout','message':_0x25b49a(0xd1)});return;}if(_0x43f3fd['timeout']['enabled']!==undefined&&typeof _0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x1b5)]!==_0x25b49a(0xf3)){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x1ef),'message':_0x25b49a(0x1a5)});return;}if(_0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x1b5)]!==!![])return;if(_0x43f3fd[_0x25b49a(0x1b9)]['interrupting']!==undefined&&typeof _0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x178)]!=='boolean'){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+'.timeout.interrupting','message':_0x25b49a(0x1f3)});return;}_0x43f3fd['type']!==_0x25b49a(0x196)&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x157),'message':_0x25b49a(0x206)});validateTimeAmount(_0x43f3fd['timeout']['duration'],_0x188953+_0x25b49a(0x1b4),_0x408dee);const _0x4ec34c=_0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0xe9)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x25b49a(0x212)](_0x4ec34c)){_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+'.timeout.action','message':_0x25b49a(0x195)});return;}(_0x43f3fd[_0x25b49a(0x1d1)]??_0x25b49a(0x196))==='HANDLE'&&_0x4ec34c!==_0x25b49a(0x13e)&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x227),'message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x1a8515=_0x43f3fd[_0x25b49a(0x1b9)][_0x25b49a(0x178)]??_0x4ec34c!=='EXECUTE_BFF';if(_0x4ec34c==='EXECUTE_BFF')_0x1a8515&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x171),'message':_0x25b49a(0x14a)}),(typeof _0x43f3fd[_0x25b49a(0x1b9)]['scriptName']!=='string'||_0x43f3fd['timeout'][_0x25b49a(0xe5)][_0x25b49a(0x216)]()==='')&&_0x408dee['push']({'path':_0x188953+_0x25b49a(0x106),'message':'EXECUTE_BFF\x20timeout\x20requires\x20scriptName.'}),validateOptionalResultVariable(_0x43f3fd['timeout'][_0x25b49a(0x223)],_0x188953+_0x25b49a(0x1f6),_0x408dee);else!_0x1a8515&&_0x408dee[_0x25b49a(0x1ba)]({'path':_0x188953+_0x25b49a(0x171),'message':_0x4ec34c+_0x25b49a(0x202)});}function validateTimeAmount(_0x1cf87d,_0x3ab03a,_0x529fae){const _0x1809b5=a282_0x13f12c;if(!isRecord(_0x1cf87d)){_0x529fae[_0x1809b5(0x1ba)]({'path':_0x3ab03a,'message':_0x1809b5(0x129)});return;}(!Number[_0x1809b5(0x16a)](_0x1cf87d['value'])||Number(_0x1cf87d[_0x1809b5(0x1a9)])<=0x0)&&_0x529fae[_0x1809b5(0x1ba)]({'path':_0x3ab03a+'.value','message':_0x1809b5(0x220)}),!FLOW_TIME_UNITS[_0x1809b5(0x212)](_0x1cf87d[_0x1809b5(0x1ed)])&&_0x529fae[_0x1809b5(0x1ba)]({'path':_0x3ab03a+_0x1809b5(0x13f),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0xb368af,_0x10c6a7,_0x26145d){const _0x472f47=a282_0x13f12c;if(_0xb368af===undefined||_0xb368af===null||_0xb368af==='')return;if(typeof _0xb368af!=='string'||!VARIABLE_PATTERN['test'](_0xb368af))_0x26145d[_0x472f47(0x1ba)]({'path':_0x10c6a7,'message':_0x472f47(0x214)});else(RESERVED_RESULT_VARIABLES['has'](_0xb368af)||_0xb368af[_0x472f47(0x1f9)]('approval_sys_'))&&_0x26145d['push']({'path':_0x10c6a7,'message':_0x472f47(0x156)+_0xb368af+'.'});}function validateCcConfig(_0x5a87f6,_0x2ffa37,_0x3237b7){const _0x3b6d68=a282_0x13f12c;if(_0x5a87f6['cc']===undefined)return;if(!isRecord(_0x5a87f6['cc'])){_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+'.cc','message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x5a87f6[_0x3b6d68(0x199)]!==_0x3b6d68(0x207)&&_0x5a87f6[_0x3b6d68(0x199)]!=='APPROVAL'&&_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+_0x3b6d68(0x1c8),'message':_0x3b6d68(0x133)});Object[_0x3b6d68(0x110)][_0x3b6d68(0x21e)]['call'](_0x5a87f6['cc'],_0x3b6d68(0x1a0))&&_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x32166b=_0x5a87f6['cc']['recipientUserIds'];if(!Array[_0x3b6d68(0x126)](_0x32166b)||_0x32166b[_0x3b6d68(0x1dc)]===0x0)_0x3237b7[_0x3b6d68(0x1ba)]({'path':_0x2ffa37+_0x3b6d68(0x20c),'message':_0x3b6d68(0xde)});else{_0x32166b[_0x3b6d68(0x1dc)]>MAX_CC_RECIPIENTS&&_0x3237b7['push']({'path':_0x2ffa37+_0x3b6d68(0x20c),'message':_0x3b6d68(0x1eb)+MAX_CC_RECIPIENTS+_0x3b6d68(0x17d)});const _0x3f9b53=new Set();_0x32166b[_0x3b6d68(0x1f2)]((_0x38d38e,_0x50a9cb)=>{const _0x42ae6b=_0x3b6d68;if(typeof _0x38d38e!==_0x42ae6b(0xd2)||_0x38d38e['trim']()==='')_0x3237b7[_0x42ae6b(0x1ba)]({'path':_0x2ffa37+_0x42ae6b(0x20f)+_0x50a9cb+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x3f9b53[_0x42ae6b(0x212)](_0x38d38e[_0x42ae6b(0x216)]())?_0x3237b7[_0x42ae6b(0x1ba)]({'path':_0x2ffa37+_0x42ae6b(0x20f)+_0x50a9cb+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x38d38e[_0x42ae6b(0x216)]()+'.'}):_0x3f9b53['add'](_0x38d38e['trim']());});}validateStringArray(_0x5a87f6['cc'][_0x3b6d68(0x147)],_0x2ffa37+_0x3b6d68(0x18e),_0x3237b7);}function validateStringArray(_0x424026,_0x4a472e,_0x39fd64){const _0x17aaef=a282_0x13f12c;if(_0x424026===undefined)return;if(!Array[_0x17aaef(0x126)](_0x424026)){_0x39fd64[_0x17aaef(0x1ba)]({'path':_0x4a472e,'message':'value\x20must\x20be\x20an\x20array.'});return;}const _0xe1c7f=new Set();_0x424026[_0x17aaef(0x1f2)]((_0x4c9e4e,_0x3fbbba)=>{const _0x2da070=_0x17aaef;if(typeof _0x4c9e4e!==_0x2da070(0xd2)||_0x4c9e4e[_0x2da070(0x216)]()==='')_0x39fd64[_0x2da070(0x1ba)]({'path':_0x4a472e+'['+_0x3fbbba+']','message':_0x2da070(0xf8)});else _0xe1c7f[_0x2da070(0x212)](_0x4c9e4e[_0x2da070(0x216)]())?_0x39fd64[_0x2da070(0x1ba)]({'path':_0x4a472e+'['+_0x3fbbba+']','message':'Duplicate\x20value:\x20'+_0x4c9e4e[_0x2da070(0x216)]()+'.'}):_0xe1c7f['add'](_0x4c9e4e[_0x2da070(0x216)]());});}function validateNotificationConfig(_0x50b9bc,_0x236827,_0x35357f){const _0x519cbf=a282_0x13f12c;if(!isRecord(_0x50b9bc)){_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827,'message':_0x519cbf(0xf5)});return;}if(_0x50b9bc[_0x519cbf(0xec)]!==undefined&&_0x50b9bc['version']!==null){if(typeof _0x50b9bc['version']!==_0x519cbf(0xd2))_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0xdc),'message':_0x519cbf(0x19d)});else _0x50b9bc[_0x519cbf(0xec)][_0x519cbf(0x216)]()&&_0x50b9bc[_0x519cbf(0xec)]['trim']()!=='v1'&&_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0xdc),'message':_0x519cbf(0x1f8)+_0x50b9bc['version']+'.'});}const _0x2f2937=requireNotificationString(_0x50b9bc[_0x519cbf(0xee)],_0x236827+'.configCode',_0x519cbf(0xf0),_0x35357f);_0x2f2937?.[_0x519cbf(0x1da)]('${')&&_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0x201),'message':_0x519cbf(0x225)});if(_0x50b9bc[_0x519cbf(0x14e)]!==undefined&&_0x50b9bc[_0x519cbf(0x14e)]!==null){if(typeof _0x50b9bc[_0x519cbf(0x14e)]!==_0x519cbf(0xd2))_0x35357f['push']({'path':_0x236827+_0x519cbf(0x194),'message':_0x519cbf(0x17c)});else!NOTIFICATION_FAILURE_POLICIES[_0x519cbf(0x212)](_0x50b9bc['failurePolicy'][_0x519cbf(0x216)]()['toUpperCase']())&&_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0x194),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x50b9bc[_0x519cbf(0x15f)])?_0x35357f[_0x519cbf(0x1ba)]({'path':_0x236827+_0x519cbf(0x18a),'message':_0x519cbf(0x1ca)}):validateNotificationTemplate(_0x50b9bc[_0x519cbf(0x15f)],_0x236827+_0x519cbf(0x18a),_0x35357f),validateNotificationRecipients(_0x50b9bc[_0x519cbf(0x193)],_0x236827+_0x519cbf(0x117),_0x35357f);}function a282_0x55a9(){const _0xf81405=['INDEPENDENT_FLOW','conditionType','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.cc.recipientUserIds','isSafeInteger','357401TBZRCL','.cc.recipientUserIds[','array','.detailMarkdown','has','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.transferCandidates.userIds','trim','Duplicate\x20resultVariable:\x20','.transferCandidates','SCRIPT\x20node\x20requires\x20scriptName.','edges\x20must\x20be\x20an\x20array.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','AUTO_REJECT','hasOwnProperty','warnings','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','approval_sys_initiatorUsername','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','resultVariable','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','filter','.timeout.action','flowJson.nodes','approvalMode','sequential\x20must\x20be\x20a\x20boolean.','flowDesc','FIXED\x20assignee\x20requires\x20userIds.','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','PLATFORM_FORM','flowJson.schemaVersion','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','target','Notification\x20template\x20supports\x20at\x20most\x20','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','.url','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','.waypoints[','flowDesc\x20must\x20be\x20a\x20string.','SCRIPT','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','approval_sys_initiatorUserId','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowJson.nodes.','flowJson.startPath','.waypoints','.assignee.userIds','timeout\x20must\x20be\x20an\x20object.','string','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','retryCount','overwrite','transferCandidates','60Oslfxa','path','flowJson.edges','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','12MBDSHk','.version','flowJson.startPageId','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','map','detailMarkdown','label','title','approval_sys_appCode','scriptName','matchAll','.taskMode','Node\x20has\x20no\x20outgoing\x20edge.','action','recipientUserIds','.approvalMode','version','replace','configCode','pageMode','Notification\x20configCode\x20is\x20required.','facts','11087NPQIXf','boolean','7AclZTC','NOTIFICATION\x20node\x20requires\x20config.','flowKey','formPermissions','value\x20must\x20be\x20a\x20non-empty\x20string.','HANDLE','entries','https://lovrabet.com/schema/rabetbase-flow-config.json','Notification\x20recipients\x20must\x20be\x20an\x20array.','flowJson','waypoints','2144025eVOqkQ','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Node\x20is\x20not\x20reachable\x20from\x20START.','node\x20must\x20be\x20an\x20object.','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','flowJson\x20must\x20be\x20an\x20object.','formData','.timeout.scriptName','Unsupported\x20notification\x20placeholder:\x20','delete','position','HOURS','.expression','].taskMode','size','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','approval_sys_pageId','prototype','retryInterval','integer','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','summary','.assignee','.recipients','2013115jfgfUW','assignee','toUpperCase','EXPRESSION\x20edge\x20requires\x20expression.','legacy_field_removed','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.',',\x20but\x20node\x20','appCode','Notification\x20action.url\x20is\x20required.','waypoint.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','SINGLE','Unsupported\x20pageMode:\x20','isArray','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','duration\x20requires\x20value\x20and\x20unit.','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','findIndex','Notification\x20recipient.type\x20is\x20required.','Notification\x20template.actions\x20must\x20be\x20an\x20array.','startPath','.target','approval_sys_','waypoints\x20must\x20be\x20an\x20array.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','mode','Edge\x20target\x20node\x20not\x20found:\x20','defaultFlow\x20must\x20be\x20a\x20boolean.','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','nodes','indexOf','pageId','call','get','Unsupported\x20node\x20type:\x20','EXECUTE_BFF','.unit','Unsupported\x20schemaVersion:\x20','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','^[1-9][0-9]*$','FIXED','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','.async.retryInterval','visible','flowType','.sequential','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','config','actions','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','failurePolicy','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','BCC','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','variables','\x20facts.','test','slice','Reserved\x20resultVariable:\x20','.timeout','START','\x20is\x20required.','1265324RGPtzN','edge\x20source\x20is\x20required.','userIds','.name','name','template','approval_sys_datasetCode','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','result','datasetCode','targetNodeId','3JtbYzr','.assignee.strategy','Notification\x20fact.','metadata','isInteger','.scriptName','Notification\x20action.text\x20is\x20required.','ALL','isFinite','async\x20must\x20be\x20an\x20object.','sourceNodeId','.timeout.interrupting','keys','CONTINUE','empty_metadata_removed','.path','.position','.id','interrupting','.defaultFlow','every','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','failurePolicy\x20must\x20be\x20a\x20string.','\x20users.','event','^[A-Za-z_][A-Za-z0-9_]*$','APPROVAL\x20node\x20requires\x20assignee.','text','EMAIL','utf8','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','edge\x20must\x20be\x20an\x20object.','Duplicate\x20node\x20id:\x20','strategy','.source','.template','\x20actions.','NOTIFICATION','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','.cc.visible','#/$defs/timeAmount','pid','edge\x20target\x20is\x20required.','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','recipients','.failurePolicy','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','APPROVAL','FORM_FLOW','ALWAYS','type','source','__rabetbase_local_validation__','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Notification\x20version\x20must\x20be\x20a\x20string.','Duplicate\x20edge\x20route:\x20','flowName','readSources','6IQvQSM','891544entzgk','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','bindDatasetCode','timeout.enabled\x20must\x20be\x20a\x20boolean.','Edge\x20source\x20node\x20not\x20found:\x20','formSchema','edges','value','CONDITION','some','expression','approval_sys_dataId','Unsupported\x20condition\x20type:\x20','set','#/$defs/userId','transferCandidates\x20must\x20be\x20an\x20object.','EXPRESSION','NaN','.timeout.duration','enabled','Notification\x20recipient.value\x20is\x20required.','.assignee.userIds[','APPROVED','timeout','push','flowJson.pageMode','.tmp','roleId','.resultVariable','parse','async.enabled\x20must\x20be\x20a\x20boolean.','flowJson.nodes[','approval_sys_operationType','flowJson.','Rabetbase\x20FlowConfig','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','Notification\x20template.facts\x20must\x20be\x20an\x20array.','.async','.cc','approved','NOTIFICATION\x20node\x20requires\x20template.','defaultFlow','.config','edge\x20name\x20must\x20be\x20a\x20string.','schemaVersion','ANY','role','taskMode','formPermission','url','templateName','Notification\x20fact\x20must\x20be\x20an\x20object.','.value','.conditionType','flowName\x20is\x20required.','DAYS','includes','REJECTED','length','catch','\x20->\x20','#/$defs/position','async','FAIL','sequential','message','AUTO_APPROVE','USER','stringify','2774110KuXIfy','Notification\x20template.','Notification\x20recipient\x20must\x20be\x20an\x20object.','object','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowType\x20is\x20required.','unit','Notification\x20action\x20must\x20be\x20an\x20object.','.timeout.enabled','Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.','Unsupported\x20approval\x20mode:\x20','forEach','timeout.interrupting\x20must\x20be\x20a\x20boolean.','ROLE','CUSTOM_PAGE','.timeout.resultVariable','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','Unsupported\x20notification\x20version:\x20','startsWith','number','.role','.type','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','scriptResult','https://json-schema.org/draft/2020-12/schema','Node\x20cannot\x20reach\x20any\x20END.','.configCode','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','add','approval.simple-flow.v1','SECONDS','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','END','\x20was\x20empty\x20and\x20was\x20removed.'];a282_0x55a9=function(){return _0xf81405;};return a282_0x55a9();}function validateNotificationTemplate(_0x164065,_0x1a50d3,_0x2b526d){const _0x55bb2b=a282_0x13f12c;for(const _0xf91927 of[_0x55bb2b(0xe3),'summary']){const _0x6116cc=requireNotificationString(_0x164065[_0xf91927],_0x1a50d3+'.'+_0xf91927,_0x55bb2b(0x1e8)+_0xf91927+_0x55bb2b(0x159),_0x2b526d);if(_0x6116cc)validateNotificationPlaceholders(_0x6116cc,_0x1a50d3+'.'+_0xf91927,_0x2b526d);}_0x164065['detailMarkdown']!==undefined&&_0x164065[_0x55bb2b(0xe1)]!==null&&(typeof _0x164065[_0x55bb2b(0xe1)]!==_0x55bb2b(0xd2)?_0x2b526d['push']({'path':_0x1a50d3+_0x55bb2b(0x211),'message':_0x55bb2b(0x114)}):validateNotificationPlaceholders(_0x164065[_0x55bb2b(0xe1)],_0x1a50d3+_0x55bb2b(0x211),_0x2b526d)),validateNotificationFacts(_0x164065[_0x55bb2b(0xf1)],_0x1a50d3+'.facts',_0x2b526d),validateNotificationActions(_0x164065[_0x55bb2b(0x14c)],_0x1a50d3+'.actions',_0x2b526d);}function validateNotificationFacts(_0x5328b0,_0x131dc4,_0x394eb3){const _0x2dfcdd=a282_0x13f12c;if(_0x5328b0===undefined||_0x5328b0===null)return;if(!Array['isArray'](_0x5328b0)){_0x394eb3[_0x2dfcdd(0x1ba)]({'path':_0x131dc4,'message':_0x2dfcdd(0x1c6)});return;}_0x5328b0[_0x2dfcdd(0x1dc)]>MAX_NOTIFICATION_FACTS&&_0x394eb3[_0x2dfcdd(0x1ba)]({'path':_0x131dc4,'message':_0x2dfcdd(0xc3)+MAX_NOTIFICATION_FACTS+_0x2dfcdd(0x153)}),_0x5328b0['forEach']((_0x2c076b,_0x3be4fc)=>{const _0x1d4305=_0x2dfcdd,_0x2723a8=_0x131dc4+'['+_0x3be4fc+']';if(!isRecord(_0x2c076b)){_0x394eb3[_0x1d4305(0x1ba)]({'path':_0x2723a8,'message':_0x1d4305(0x1d5)});return;}for(const _0x5674cb of[_0x1d4305(0xe2),_0x1d4305(0x1a9)]){const _0x5d95ab=requireNotificationString(_0x2c076b[_0x5674cb],_0x2723a8+'.'+_0x5674cb,_0x1d4305(0x168)+_0x5674cb+_0x1d4305(0x159),_0x394eb3);_0x5d95ab&&validateNotificationPlaceholders(_0x5d95ab,_0x2723a8+'.'+_0x5674cb,_0x394eb3);}});}function validateNotificationActions(_0x1d0932,_0x4cd20b,_0x25b502){const _0x2cba42=a282_0x13f12c;if(_0x1d0932===undefined||_0x1d0932===null)return;if(!Array[_0x2cba42(0x126)](_0x1d0932)){_0x25b502[_0x2cba42(0x1ba)]({'path':_0x4cd20b,'message':_0x2cba42(0x12e)});return;}_0x1d0932[_0x2cba42(0x1dc)]>MAX_NOTIFICATION_ACTIONS&&_0x25b502['push']({'path':_0x4cd20b,'message':_0x2cba42(0xc3)+MAX_NOTIFICATION_ACTIONS+_0x2cba42(0x18b)}),_0x1d0932[_0x2cba42(0x1f2)]((_0xa59ad8,_0x17af71)=>{const _0xe7ed65=_0x2cba42,_0x4fdc65=_0x4cd20b+'['+_0x17af71+']';if(!isRecord(_0xa59ad8)){_0x25b502['push']({'path':_0x4fdc65,'message':_0xe7ed65(0x1ee)});return;}const _0x33c039=requireNotificationString(_0xa59ad8[_0xe7ed65(0x181)],_0x4fdc65+'.text',_0xe7ed65(0x16c),_0x25b502);if(_0x33c039)validateNotificationPlaceholders(_0x33c039,_0x4fdc65+'.text',_0x25b502);const _0x2dab18=requireNotificationString(_0xa59ad8[_0xe7ed65(0x1d3)],_0x4fdc65+'.url',_0xe7ed65(0x120),_0x25b502);if(!_0x2dab18)return;validateNotificationPlaceholders(_0x2dab18,_0x4fdc65+_0xe7ed65(0xc5),_0x25b502),!/^https?:\/\//i['test'](_0x2dab18)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0xe7ed65(0x154)](_0x2dab18)&&_0x25b502[_0xe7ed65(0x1ba)]({'path':_0x4fdc65+_0xe7ed65(0xc5),'message':_0xe7ed65(0xbe)});});}function validateNotificationRecipients(_0x18e173,_0x5beab5,_0x175500){const _0x5828c5=a282_0x13f12c;if(_0x18e173===undefined||_0x18e173===null)return;if(!Array[_0x5828c5(0x126)](_0x18e173)){_0x175500[_0x5828c5(0x1ba)]({'path':_0x5beab5,'message':_0x5828c5(0xfc)});return;}let _0x2c729a=![];_0x18e173[_0x5828c5(0x1f2)]((_0x57f0ec,_0x4d6d09)=>{const _0x251a77=_0x5828c5,_0x238c3a=_0x5beab5+'['+_0x4d6d09+']';if(!isRecord(_0x57f0ec)){_0x175500[_0x251a77(0x1ba)]({'path':_0x238c3a,'message':_0x251a77(0x1e9)});return;}const _0x478d80=requireNotificationString(_0x57f0ec[_0x251a77(0x199)],_0x238c3a+_0x251a77(0x1fc),_0x251a77(0x12d),_0x175500);_0x478d80&&!NOTIFICATION_RECIPIENT_TYPES[_0x251a77(0x212)](_0x478d80['toUpperCase']())&&_0x175500[_0x251a77(0x1ba)]({'path':_0x238c3a+_0x251a77(0x1fc),'message':_0x251a77(0x1c5)});let _0x2e82fe='TO';_0x57f0ec[_0x251a77(0x1d0)]!==undefined&&_0x57f0ec[_0x251a77(0x1d0)]!==null&&(typeof _0x57f0ec['role']!==_0x251a77(0xd2)?(_0x175500['push']({'path':_0x238c3a+_0x251a77(0x1fb),'message':_0x251a77(0xc1)}),_0x2e82fe=''):(_0x2e82fe=_0x57f0ec['role']['trim']()[_0x251a77(0x11a)](),!NOTIFICATION_RECIPIENT_ROLES[_0x251a77(0x212)](_0x2e82fe)&&_0x175500[_0x251a77(0x1ba)]({'path':_0x238c3a+'.role','message':_0x251a77(0x213)})));if(_0x2e82fe==='TO')_0x2c729a=!![];const _0x4eaf2f=requireNotificationString(_0x57f0ec[_0x251a77(0x1a9)],_0x238c3a+_0x251a77(0x1d6),_0x251a77(0x1b6),_0x175500);_0x4eaf2f&&validateNotificationPlaceholders(_0x4eaf2f,_0x238c3a+_0x251a77(0x1d6),_0x175500);}),_0x18e173['length']>0x0&&!_0x2c729a&&_0x175500[_0x5828c5(0x1ba)]({'path':_0x5beab5,'message':_0x5828c5(0x222)});}function requireNotificationString(_0x57c4e7,_0x4320a8,_0x1831c6,_0x32bac1){const _0x7e747a=a282_0x13f12c;if(typeof _0x57c4e7!==_0x7e747a(0xd2)||_0x57c4e7[_0x7e747a(0x216)]()==='')return _0x32bac1['push']({'path':_0x4320a8,'message':_0x1831c6}),undefined;return _0x57c4e7[_0x7e747a(0x216)]();}function validateNotificationPlaceholders(_0x4142b6,_0x5c8941,_0x194a74){const _0x200556=a282_0x13f12c;for(const _0x21f3b2 of _0x4142b6[_0x200556(0xe6)](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x4b2e33=_0x21f3b2[0x1]?.[_0x200556(0x216)]()??'',_0x413223=_0x4b2e33[_0x200556(0x139)]('.'),_0x3b44db=_0x413223>=0x0?_0x4b2e33['slice'](0x0,_0x413223):_0x4b2e33,_0x42df75=_0x413223>=0x0?_0x4b2e33['slice'](_0x413223+0x1)['trim']():'';(![_0x200556(0x17e),'context',_0x200556(0x152)][_0x200556(0x1da)](_0x3b44db)||_0x42df75==='')&&_0x194a74[_0x200556(0x1ba)]({'path':_0x5c8941,'message':_0x200556(0x107)+_0x21f3b2[0x0]+'.'});}_0x4142b6[_0x200556(0xed)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x200556(0x1da)]('${')&&_0x194a74['push']({'path':_0x5c8941,'message':_0x200556(0xc6)});}function validateEdge(_0x217907,_0xdb29db,_0x2bdd5e){const _0x2ee75c=a282_0x13f12c;_0x217907[_0x2ee75c(0x15e)]!==undefined&&typeof _0x217907[_0x2ee75c(0x15e)]!==_0x2ee75c(0xd2)&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0x15d),'message':_0x2ee75c(0x1cd)}),_0x217907['defaultFlow']!==undefined&&typeof _0x217907[_0x2ee75c(0x1cb)]!=='boolean'&&_0x2bdd5e['push']({'path':_0xdb29db+'.defaultFlow','message':_0x2ee75c(0x136)}),_0x217907['waypoints']!==undefined&&(!Array[_0x2ee75c(0x126)](_0x217907[_0x2ee75c(0xfe)])?_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0xcf),'message':_0x2ee75c(0x132)}):_0x217907[_0x2ee75c(0xfe)][_0x2ee75c(0x1f2)]((_0x5d3033,_0x413991)=>{const _0x1f208e=_0x2ee75c;if(!isRecord(_0x5d3033)){_0x2bdd5e[_0x1f208e(0x1ba)]({'path':_0xdb29db+'.waypoints['+_0x413991+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x4175ac of['x','y']){const _0xc2748c=_0x5d3033[_0x4175ac];(typeof _0xc2748c!=='number'||!Number['isFinite'](_0xc2748c))&&_0x2bdd5e['push']({'path':_0xdb29db+_0x1f208e(0xc7)+_0x413991+'].'+_0x4175ac,'message':_0x1f208e(0x121)+_0x4175ac+'\x20must\x20be\x20a\x20finite\x20number.'});}})),_0x217907['conditionType']!==undefined&&!CONDITION_TYPES[_0x2ee75c(0x212)](_0x217907[_0x2ee75c(0x20a)])&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+'.conditionType','message':_0x2ee75c(0x1ae)+String(_0x217907[_0x2ee75c(0x20a)])+'.'}),_0x217907[_0x2ee75c(0x20a)]===_0x2ee75c(0x1b2)&&(typeof _0x217907[_0x2ee75c(0x1ac)]!==_0x2ee75c(0xd2)||_0x217907[_0x2ee75c(0x1ac)][_0x2ee75c(0x216)]()==='')&&_0x2bdd5e['push']({'path':_0xdb29db+_0x2ee75c(0x10b),'message':_0x2ee75c(0x11b)}),_0x217907[_0x2ee75c(0x1cb)]===!![]&&_0x217907['conditionType']!==_0x2ee75c(0x198)&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0x179),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x217907[_0x2ee75c(0x1cb)]===!![]&&typeof _0x217907[_0x2ee75c(0x1ac)]===_0x2ee75c(0xd2)&&_0x217907[_0x2ee75c(0x1ac)][_0x2ee75c(0x216)]()!==''&&_0x2bdd5e[_0x2ee75c(0x1ba)]({'path':_0xdb29db+_0x2ee75c(0x10b),'message':'A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.'});}function validateGraphShape(_0x50c80d,_0x5973c4,_0x13656c,_0x3bf33f,_0x446649,_0x495a57,_0x5d05bb){const _0x22b28c=a282_0x13f12c;for(const [_0xc8d519,_0x3515d4]of _0x50c80d){const _0x4e8cd8=_0x446649['get'](_0xc8d519)??[],_0x3de100=_0x3bf33f['get'](_0xc8d519)??[];_0x3515d4[_0x22b28c(0x199)]!==_0x22b28c(0x158)&&_0x4e8cd8['length']===0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x3515d4[_0x22b28c(0x199)]!=='END'&&_0x3de100[_0x22b28c(0x1dc)]===0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0xe8)});_0x3515d4[_0x22b28c(0x199)]==='START'&&_0x4e8cd8['length']>0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':'flowJson.nodes.'+_0xc8d519,'message':'START\x20node\x20must\x20not\x20have\x20incoming\x20edges.'});_0x3515d4[_0x22b28c(0x199)]===_0x22b28c(0x207)&&_0x3de100[_0x22b28c(0x1dc)]>0x0&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':'flowJson.nodes.'+_0xc8d519,'message':_0x22b28c(0x103)});if(_0x3515d4['type']===_0x22b28c(0x1aa)){_0x3de100[_0x22b28c(0x1dc)]<0x2&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x44de89=_0x3de100[_0x22b28c(0x226)](_0x3d3330=>_0x3d3330[_0x22b28c(0x1cb)]===!![]);_0x44de89[_0x22b28c(0x1dc)]!==0x1&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':'flowJson.nodes.'+_0xc8d519,'message':_0x22b28c(0xd3)});if(_0x44de89['length']===0x1){const _0x16b26b=_0x44de89[0x0],_0xf352d1=_0x495a57[_0x22b28c(0x13c)](_0x16b26b)??'flowJson.edges';_0x16b26b[_0x22b28c(0x20a)]!==_0x22b28c(0x198)&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0xf352d1+_0x22b28c(0x1d7),'message':_0x22b28c(0x12b)});_0x16b26b[_0x22b28c(0x1ac)]!==undefined&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0xf352d1+'.expression','message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0xf89b48 of _0x3de100){if(_0xf89b48===_0x16b26b)continue;const _0x4989d1=_0x495a57[_0x22b28c(0x13c)](_0xf89b48)??_0x22b28c(0xd9);if(_0xf89b48[_0x22b28c(0x20a)]!==_0x22b28c(0x1b2))_0x5d05bb['push']({'path':_0x4989d1+_0x22b28c(0x1d7),'message':'CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.'});else(typeof _0xf89b48[_0x22b28c(0x1ac)]!=='string'||_0xf89b48['expression']['trim']()==='')&&_0x5d05bb['push']({'path':_0x4989d1+'.expression','message':_0x22b28c(0x21c)});}}}if(_0x3515d4[_0x22b28c(0x199)]==='APPROVAL'&&(_0x3515d4['taskMode']??_0x22b28c(0x196))==='HANDLE'){if(_0x3de100[_0x22b28c(0x1dc)]!==0x1)_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x128)});else{const _0x2ff72c=_0x3de100[0x0];((_0x2ff72c[_0x22b28c(0x20a)]??'ALWAYS')!==_0x22b28c(0x198)||_0x2ff72c['defaultFlow']===!![]||typeof _0x2ff72c['expression']===_0x22b28c(0xd2)&&_0x2ff72c['expression']['trim']()!=='')&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x495a57[_0x22b28c(0x13c)](_0x2ff72c)??_0x22b28c(0xd9),'message':'HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.'});}}else{if(_0x3515d4['type']===_0x22b28c(0x196)){const _0x32f3e1=_0x3de100[_0x22b28c(0xe0)](_0x5401a1=>_0x5401a1['conditionType']??_0x22b28c(0x198)),_0x4bd193=_0x32f3e1[_0x22b28c(0x226)](_0x3f7532=>_0x3f7532!==_0x22b28c(0x1b8)&&_0x3f7532!==_0x22b28c(0x1db));_0x4bd193[_0x22b28c(0x1dc)]>0x0&&_0x5d05bb['push']({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x18d)}),_0x32f3e1[_0x22b28c(0x226)](_0x31a252=>_0x31a252===_0x22b28c(0x1b8))[_0x22b28c(0x1dc)]!==0x1&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x137)}),_0x32f3e1[_0x22b28c(0x226)](_0x2621b9=>_0x2621b9==='REJECTED')['length']!==0x1&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':_0x22b28c(0x122)}),_0x3de100[_0x22b28c(0x1ab)](_0x34b692=>_0x34b692[_0x22b28c(0x1cb)]===!![])&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0xc8d519,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0x3212c6=new Set(),_0x3fdb14=_0x1b5dd7=>{const _0xc7916b=_0x22b28c;if(_0x3212c6[_0xc7916b(0x212)](_0x1b5dd7))return;_0x3212c6[_0xc7916b(0x203)](_0x1b5dd7);for(const _0x4c2beb of _0x3bf33f[_0xc7916b(0x13c)](_0x1b5dd7)??[]){const _0x7e2c17=resolveEdgeEndpoint(_0x4c2beb[_0xc7916b(0xc2)],_0x4c2beb[_0xc7916b(0x165)]);if(_0x7e2c17&&_0x50c80d[_0xc7916b(0x212)](_0x7e2c17))_0x3fdb14(_0x7e2c17);}};_0x3fdb14(_0x5973c4);for(const _0x1acd5d of _0x50c80d[_0x22b28c(0x172)]()){!_0x3212c6[_0x22b28c(0x212)](_0x1acd5d)&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0x1acd5d,'message':_0x22b28c(0x101)});}const _0x274ef0=_0x13656c[_0x22b28c(0x1ab)](_0x3db954=>_0x3212c6[_0x22b28c(0x212)](_0x3db954));if(!_0x274ef0){_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xd9),'message':_0x22b28c(0x14d)});return;}const _0x38d1ef=new Set(),_0xddb9ce=_0x412b38=>{const _0x564005=_0x22b28c;if(_0x38d1ef[_0x564005(0x212)](_0x412b38))return;_0x38d1ef[_0x564005(0x203)](_0x412b38);for(const _0x2636b2 of _0x446649[_0x564005(0x13c)](_0x412b38)??[]){const _0x496ce8=resolveEdgeEndpoint(_0x2636b2[_0x564005(0x19a)],_0x2636b2[_0x564005(0x170)]);if(_0x496ce8&&_0x50c80d[_0x564005(0x212)](_0x496ce8))_0xddb9ce(_0x496ce8);}};for(const _0x19b873 of _0x13656c){if(_0x50c80d['has'](_0x19b873))_0xddb9ce(_0x19b873);}for(const _0x304c40 of _0x3212c6){!_0x38d1ef[_0x22b28c(0x212)](_0x304c40)&&_0x5d05bb[_0x22b28c(0x1ba)]({'path':_0x22b28c(0xcd)+_0x304c40,'message':_0x22b28c(0x200)});}}function validateApprovalResults(_0x12e26c,_0x337e3e,_0x38a4ec,_0x4b6aae){const _0x96c54a=a282_0x13f12c;if(_0x337e3e===0x0)return;const _0x123c29=new Set(_0x38a4ec[_0x96c54a(0xe0)](_0x2dbd83=>_0x12e26c[_0x96c54a(0x13c)](_0x2dbd83)?.[_0x96c54a(0x163)])[_0x96c54a(0x226)](_0x3663bd=>typeof _0x3663bd===_0x96c54a(0xd2)));for(const _0x1acd6a of[_0x96c54a(0x1b8),_0x96c54a(0x1db)]){!_0x123c29[_0x96c54a(0x212)](_0x1acd6a)&&_0x4b6aae[_0x96c54a(0x1ba)]({'path':_0x96c54a(0x228),'message':_0x96c54a(0x1f7)+_0x1acd6a+'.'});}}function validateScriptResultReferences(_0x38b26c,_0x1b4dea,_0x1af10b,_0x2b4c82,_0x4990ec,_0x38de67,_0x3d7bff){const _0x4e1051=a282_0x13f12c;if(_0x38de67[_0x4e1051(0x10d)]===0x0)return;const _0x3ab23a=new Set(),_0x4cf2e3=_0x39e763=>{const _0x333995=_0x4e1051;if(!_0x3ab23a['has'](_0x39e763)&&_0x38b26c[_0x333995(0x212)](_0x39e763)){_0x3ab23a['add'](_0x39e763);for(const _0xa9da9b of _0x1af10b[_0x333995(0x13c)](_0x39e763)??[]){const _0x4b1f58=resolveEdgeEndpoint(_0xa9da9b[_0x333995(0xc2)],_0xa9da9b[_0x333995(0x165)]);if(_0x4b1f58)_0x4cf2e3(_0x4b1f58);}}};_0x4cf2e3(_0x1b4dea);const _0x3fb307=new Map();for(const _0x5307c2 of _0x3ab23a){_0x3fb307[_0x4e1051(0x1af)](_0x5307c2,_0x5307c2===_0x1b4dea?new Set([_0x1b4dea]):new Set(_0x3ab23a));}let _0x683a25=!![];while(_0x683a25){_0x683a25=![];for(const _0x40096a of _0x3ab23a){if(_0x40096a===_0x1b4dea)continue;const _0x5f1f72=(_0x2b4c82['get'](_0x40096a)??[])[_0x4e1051(0xe0)](_0x48193f=>resolveEdgeEndpoint(_0x48193f[_0x4e1051(0x19a)],_0x48193f[_0x4e1051(0x170)]))['filter'](_0x17e3c6=>Boolean(_0x17e3c6&&_0x3ab23a[_0x4e1051(0x212)](_0x17e3c6)));if(_0x5f1f72[_0x4e1051(0x1dc)]===0x0)continue;const _0x4620d5=new Set(_0x3fb307[_0x4e1051(0x13c)](_0x5f1f72[0x0])??[]);for(const _0x129e70 of _0x5f1f72['slice'](0x1)){const _0x3cf12c=_0x3fb307[_0x4e1051(0x13c)](_0x129e70)??new Set();for(const _0xe80323 of _0x4620d5){if(!_0x3cf12c[_0x4e1051(0x212)](_0xe80323))_0x4620d5[_0x4e1051(0x108)](_0xe80323);}}_0x4620d5['add'](_0x40096a);const _0x506add=_0x3fb307['get'](_0x40096a);!setsEqual(_0x506add,_0x4620d5)&&(_0x3fb307['set'](_0x40096a,_0x4620d5),_0x683a25=!![]);}}for(const [_0xb4a7c0,_0x466de8]of _0x1af10b){const _0x4fbfda=_0x3fb307[_0x4e1051(0x13c)](_0xb4a7c0);if(!_0x4fbfda)continue;for(const _0x348de0 of _0x466de8){if(_0x348de0[_0x4e1051(0x20a)]!==_0x4e1051(0x1b2)||typeof _0x348de0[_0x4e1051(0x1ac)]!=='string')continue;for(const [_0x259ca2,_0x431078]of _0x38de67){expressionReferencesVariable(_0x348de0[_0x4e1051(0x1ac)],_0x259ca2)&&!_0x4fbfda[_0x4e1051(0x212)](_0x431078)&&_0x3d7bff[_0x4e1051(0x1ba)]({'path':(_0x4990ec[_0x4e1051(0x13c)](_0x348de0)??'flowJson.edges')+_0x4e1051(0x10b),'message':_0x4e1051(0x19c)+_0x259ca2+_0x4e1051(0x11e)+_0x431078+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0xb4a7c0+'.'});}}}}function expressionReferencesVariable(_0x419b08,_0x1a0242){const _0x3f389f=a282_0x13f12c;let _0x485660=0x0;while(_0x485660<_0x419b08['length']){const _0x5335fc=_0x419b08[_0x485660];if(_0x5335fc==='\x27'||_0x5335fc==='\x22'){_0x485660=skipQuotedExpressionSegment(_0x419b08,_0x485660,_0x5335fc);continue;}if(!/[A-Za-z_]/[_0x3f389f(0x154)](_0x5335fc)){_0x485660+=0x1;continue;}const _0x536da9=_0x485660;_0x485660+=0x1;while(_0x485660<_0x419b08[_0x3f389f(0x1dc)]&&/[A-Za-z0-9_]/[_0x3f389f(0x154)](_0x419b08[_0x485660])){_0x485660+=0x1;}if(_0x419b08[_0x3f389f(0x155)](_0x536da9,_0x485660)!==_0x1a0242)continue;let _0x2ae3f9=_0x536da9-0x1;while(_0x2ae3f9>=0x0&&/\s/['test'](_0x419b08[_0x2ae3f9])){_0x2ae3f9-=0x1;}if(_0x419b08[_0x2ae3f9]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x57fff3,_0x5b33ac,_0x28645d){const _0x5b0baf=a282_0x13f12c;let _0x1f91d4=_0x5b33ac+0x1;while(_0x1f91d4<_0x57fff3[_0x5b0baf(0x1dc)]){if(_0x57fff3[_0x1f91d4]==='\x5c'){_0x1f91d4+=0x2;continue;}if(_0x57fff3[_0x1f91d4]===_0x28645d)return _0x1f91d4+0x1;_0x1f91d4+=0x1;}return _0x1f91d4;}function resolveEffectiveResultVariable(_0x4bbdcd,_0xb6b34b){const _0x5d56e3=a282_0x13f12c;if(_0x4bbdcd===undefined||_0x4bbdcd===null||_0xb6b34b&&_0x4bbdcd==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x4bbdcd!==_0x5d56e3(0xd2)||!VARIABLE_PATTERN[_0x5d56e3(0x154)](_0x4bbdcd)||RESERVED_RESULT_VARIABLES[_0x5d56e3(0x212)](_0x4bbdcd)||_0x4bbdcd[_0x5d56e3(0x1f9)](_0x5d56e3(0x131)))return undefined;return _0x4bbdcd;}function registerResultVariableOwner(_0x1d57bc,_0x547e67,_0x329590,_0x52190b){const _0x38ba9f=a282_0x13f12c;if(_0x1d57bc[_0x38ba9f(0x212)](_0x547e67)){_0x52190b[_0x38ba9f(0x1ba)]({'path':'flowJson.nodes','message':_0x38ba9f(0x217)+_0x547e67+'.'});return;}_0x1d57bc[_0x38ba9f(0x1af)](_0x547e67,_0x329590);}function setsEqual(_0x4b7968,_0xb8b808){const _0x2d793a=a282_0x13f12c;return _0x4b7968[_0x2d793a(0x10d)]===_0xb8b808[_0x2d793a(0x10d)]&&[..._0x4b7968][_0x2d793a(0x17a)](_0x6c930d=>_0xb8b808[_0x2d793a(0x212)](_0x6c930d));}function isValidUserId(_0x57281b){const _0x37dea6=a282_0x13f12c;if(typeof _0x57281b===_0x37dea6(0xd2))return _0x57281b['trim']()[_0x37dea6(0x1dc)]>0x0;return Number[_0x37dea6(0x20d)](_0x57281b)&&Number(_0x57281b)>0x0;}function resolveEdgeEndpoint(_0x133631,_0x3700a9){const _0xa39d6e=a282_0x13f12c;if(typeof _0x133631===_0xa39d6e(0xd2)&&_0x133631['trim']())return _0x133631['trim']();if(typeof _0x3700a9===_0xa39d6e(0xd2)&&_0x3700a9[_0xa39d6e(0x216)]())return _0x3700a9[_0xa39d6e(0x216)]();return undefined;}function removeEmptyMetadata(_0x2bd840,_0x504730,_0x2c4ec0,_0x590ad2){const _0x3df664=a282_0x13f12c;if(Array[_0x3df664(0x126)](_0x2bd840)){_0x2bd840[_0x3df664(0x1f2)]((_0x387483,_0x4a9469)=>removeEmptyMetadata(_0x387483,_0x504730+'['+_0x4a9469+']',_0x2c4ec0,_0x590ad2));return;}if(!isRecord(_0x2bd840))return;for(const [_0x16bdfe,_0x25513d]of Object[_0x3df664(0xfa)](_0x2bd840)){const _0x238525=_0x504730+'.'+_0x16bdfe;if(_0x16bdfe===_0x3df664(0x169)&&isEmptyJsonValue(_0x25513d)){delete _0x2bd840[_0x16bdfe],_0x590ad2['push'](_0x238525),_0x2c4ec0[_0x3df664(0x1ba)]({'code':_0x3df664(0x174),'path':_0x238525,'message':_0x238525+_0x3df664(0x208)});continue;}removeEmptyMetadata(_0x25513d,_0x238525,_0x2c4ec0,_0x590ad2);}}function isEmptyJsonValue(_0x4b3e51){const _0x990f46=a282_0x13f12c;if(_0x4b3e51===null||_0x4b3e51===undefined)return!![];if(typeof _0x4b3e51===_0x990f46(0xd2))return _0x4b3e51[_0x990f46(0x216)]()==='';if(Array[_0x990f46(0x126)](_0x4b3e51))return _0x4b3e51[_0x990f46(0x1dc)]===0x0;return isRecord(_0x4b3e51)&&Object['keys'](_0x4b3e51)[_0x990f46(0x1dc)]===0x0;}function isRecord(_0x12b2bb){return typeof _0x12b2bb==='object'&&_0x12b2bb!==null&&!Array['isArray'](_0x12b2bb);}function cloneJsonValue(_0x298573){const _0xc96de3=a282_0x13f12c;return JSON[_0xc96de3(0x1bf)](JSON[_0xc96de3(0x1e6)](_0x298573));}export async function readFlowConfigFile(_0x12bdd4){const _0x24a2ae=a282_0x13f12c,_0x58dceb=await readFile(resolve(_0x12bdd4),_0x24a2ae(0x183));return JSON['parse'](_0x58dceb);}
|
|
1
|
+
const a287_0x42ed67=a287_0x2794;(function(_0x214dc0,_0x1e6ec2){const _0x39e569=a287_0x2794,_0x42f740=_0x214dc0();while(!![]){try{const _0x14af4e=-parseInt(_0x39e569(0x198))/0x1+parseInt(_0x39e569(0x1a3))/0x2+parseInt(_0x39e569(0x14b))/0x3*(-parseInt(_0x39e569(0x10c))/0x4)+-parseInt(_0x39e569(0x1c2))/0x5+parseInt(_0x39e569(0x164))/0x6*(parseInt(_0x39e569(0x1f3))/0x7)+parseInt(_0x39e569(0x249))/0x8*(-parseInt(_0x39e569(0x182))/0x9)+parseInt(_0x39e569(0x180))/0xa*(parseInt(_0x39e569(0x1ee))/0xb);if(_0x14af4e===_0x1e6ec2)break;else _0x42f740['push'](_0x42f740['shift']());}catch(_0xf755cd){_0x42f740['push'](_0x42f740['shift']());}}}(a287_0x4293,0xb4d64));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':a287_0x42ed67(0x21c),'$id':'https://lovrabet.com/schema/rabetbase-flow-config.json','title':'Rabetbase\x20FlowConfig','type':'object','required':[a287_0x42ed67(0x1d4),'flowType',a287_0x42ed67(0x25c)],'$defs':{'userId':{'anyOf':[{'type':a287_0x42ed67(0x129),'minLength':0x1},{'type':a287_0x42ed67(0x147),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':'number','minimum':0x0},'y':{'type':a287_0x42ed67(0x227),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x169),a287_0x42ed67(0x15e)],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':[a287_0x42ed67(0x138),a287_0x42ed67(0x172),a287_0x42ed67(0x115),a287_0x42ed67(0x245)]}},'additionalProperties':!![]},'flowNode':{'type':a287_0x42ed67(0x241),'required':['id',a287_0x42ed67(0x14f),a287_0x42ed67(0x1e5),a287_0x42ed67(0x11d)],'properties':{'id':{'type':a287_0x42ed67(0x129),'pattern':a287_0x42ed67(0x10a)},'type':{'enum':[a287_0x42ed67(0x243),'END','APPROVAL',a287_0x42ed67(0x1b2),a287_0x42ed67(0x12e),a287_0x42ed67(0x256)]},'name':{'type':a287_0x42ed67(0x129),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':'#/$defs/position'},'approvalMode':{'enum':[a287_0x42ed67(0x236),a287_0x42ed67(0x1cd),'ANY']},'taskMode':{'enum':[a287_0x42ed67(0x196),a287_0x42ed67(0x23a)]},'assignee':{'type':'object','required':[a287_0x42ed67(0x12f)],'properties':{'strategy':{'enum':[a287_0x42ed67(0x18c),a287_0x42ed67(0x1d1)]},'userIds':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':a287_0x42ed67(0x174)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':'string','pattern':a287_0x42ed67(0x1a7)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a287_0x42ed67(0x12f),a287_0x42ed67(0x116)],'properties':{'strategy':{'const':a287_0x42ed67(0x18c)},'userIds':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':a287_0x42ed67(0x1db)},'result':{'enum':[a287_0x42ed67(0x1e0),a287_0x42ed67(0x144)]},'scriptName':{'type':a287_0x42ed67(0x129),'minLength':0x1},'resultVariable':{'type':a287_0x42ed67(0x129),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a287_0x42ed67(0x241),'properties':{'enabled':{'type':a287_0x42ed67(0x1db)},'retryCount':{'type':a287_0x42ed67(0x147),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':'#/$defs/timeAmount'}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a287_0x42ed67(0x1db)},'duration':{'$ref':a287_0x42ed67(0x1d6)},'action':{'enum':['AUTO_APPROVE',a287_0x42ed67(0x17c),a287_0x42ed67(0x12d)]},'interrupting':{'type':a287_0x42ed67(0x1db)},'scriptName':{'type':a287_0x42ed67(0x129),'minLength':0x1},'resultVariable':{'type':a287_0x42ed67(0x129),'pattern':a287_0x42ed67(0x10a)}},'additionalProperties':!![]},'cc':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x1c5)],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'visible':{'type':a287_0x42ed67(0x1ba),'uniqueItems':!![],'items':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x255),'template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a287_0x42ed67(0x129),'minLength':0x1},'failurePolicy':{'enum':[a287_0x42ed67(0x231),a287_0x42ed67(0x244)]},'template':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x163),a287_0x42ed67(0x207)],'properties':{'title':{'type':a287_0x42ed67(0x129),'minLength':0x1},'summary':{'type':a287_0x42ed67(0x129),'minLength':0x1},'detailMarkdown':{'type':a287_0x42ed67(0x129)},'facts':{'type':a287_0x42ed67(0x1ba),'maxItems':0x8,'items':{'type':a287_0x42ed67(0x241),'required':[a287_0x42ed67(0x15b),'value'],'properties':{'label':{'type':a287_0x42ed67(0x129),'minLength':0x1},'value':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a287_0x42ed67(0x1ba),'maxItems':0x2,'items':{'type':a287_0x42ed67(0x241),'required':['text',a287_0x42ed67(0x185)],'properties':{'text':{'type':a287_0x42ed67(0x129),'minLength':0x1},'url':{'type':a287_0x42ed67(0x129),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a287_0x42ed67(0x1ba),'items':{'type':a287_0x42ed67(0x241),'required':['type',a287_0x42ed67(0x169)],'properties':{'type':{'enum':['USER',a287_0x42ed67(0x1d1),'EMAIL']},'value':{'type':a287_0x42ed67(0x129),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a287_0x42ed67(0x241),'properties':{'id':{'type':a287_0x42ed67(0x129),'pattern':a287_0x42ed67(0x10a)},'source':{'type':'string','minLength':0x1},'target':{'type':a287_0x42ed67(0x129),'minLength':0x1},'sourceNodeId':{'type':a287_0x42ed67(0x129),'minLength':0x1},'targetNodeId':{'type':a287_0x42ed67(0x129),'minLength':0x1},'conditionType':{'enum':['ALWAYS','APPROVED','REJECTED',a287_0x42ed67(0x1de)]},'expression':{'type':a287_0x42ed67(0x129)},'defaultFlow':{'type':a287_0x42ed67(0x1db)},'name':{'type':a287_0x42ed67(0x129)},'waypoints':{'type':a287_0x42ed67(0x1ba),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a287_0x42ed67(0x125)]},{'required':[a287_0x42ed67(0x10f)]}]},{'anyOf':[{'required':[a287_0x42ed67(0x197)]},{'required':[a287_0x42ed67(0x259)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a287_0x42ed67(0x129),'minLength':0x1},'flowDesc':{'type':'string'},'flowType':{'enum':[a287_0x42ed67(0x135),a287_0x42ed67(0x1bd)]},'datasetCode':{'type':a287_0x42ed67(0x129),'minLength':0x1},'pageId':{'type':a287_0x42ed67(0x147)},'templateName':![],'flowJson':{'type':a287_0x42ed67(0x241),'required':['nodes',a287_0x42ed67(0x14c)],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a287_0x42ed67(0x129),'const':'approval.simple-flow.v1','description':a287_0x42ed67(0x23d)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':'CUSTOM_PAGE'},'startPageId':![],'startPath':{'type':'string','minLength':0x1},'nodes':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':a287_0x42ed67(0x156)}},'edges':{'type':a287_0x42ed67(0x1ba),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a287_0x42ed67(0x141),a287_0x42ed67(0x260),'flowName',a287_0x42ed67(0x218),a287_0x42ed67(0x1f0),a287_0x42ed67(0xff),'pageId',a287_0x42ed67(0x1e8)],REMOVED_ROOT_FIELDS=['id',a287_0x42ed67(0xff),a287_0x42ed67(0x1e8)],DEFAULT_FLOW_SCHEMA_VERSION=a287_0x42ed67(0x132),NODE_TYPES=new Set([a287_0x42ed67(0x243),a287_0x42ed67(0x232),a287_0x42ed67(0x196),'CONDITION',a287_0x42ed67(0x12e),a287_0x42ed67(0x256)]),CONDITION_TYPES=new Set([a287_0x42ed67(0x12b),a287_0x42ed67(0x1e0),a287_0x42ed67(0x144),a287_0x42ed67(0x1de)]),APPROVAL_MODES=new Set(['SINGLE',a287_0x42ed67(0x1cd),'ANY']),APPROVAL_TASK_MODES=new Set([a287_0x42ed67(0x196),'HANDLE']),FLOW_TIME_UNITS=new Set([a287_0x42ed67(0x138),'MINUTES',a287_0x42ed67(0x115),a287_0x42ed67(0x245)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a287_0x42ed67(0x120),'AUTO_REJECT',a287_0x42ed67(0x12d)]),FLOW_TYPES=new Set(['FORM_FLOW','INDEPENDENT_FLOW']),FLOW_PAGE_MODES=new Set([a287_0x42ed67(0x24b),a287_0x42ed67(0x151)]),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([a287_0x42ed67(0x231),'FAIL']),NOTIFICATION_RECIPIENT_TYPES=new Set([a287_0x42ed67(0x119),a287_0x42ed67(0x1d1),a287_0x42ed67(0x22a)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a287_0x42ed67(0x1d5)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a287_0x42ed67(0x18e),UNSUPPORTED_FORM_MESSAGE=a287_0x42ed67(0x15c),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a287_0x42ed67(0x22b),RESERVED_RESULT_VARIABLES=new Set([a287_0x42ed67(0x114),'approved',a287_0x42ed67(0x1a2),a287_0x42ed67(0x1b5),a287_0x42ed67(0x1eb),'approval_sys_initiatorUsername',a287_0x42ed67(0x155),a287_0x42ed67(0x13c),a287_0x42ed67(0x252),a287_0x42ed67(0x203)]);export function normalizeFlowConfig(_0x3dfaa4){const _0x4dcf27=a287_0x42ed67;if(!isRecord(_0x3dfaa4))throw new TypeError(_0x4dcf27(0x128));const _0x2c2302=cloneJsonValue(_0x3dfaa4),_0x37f439=_0x2c2302[_0x4dcf27(0x25c)],_0x372f56=isRecord(_0x37f439)?cloneJsonValue(_0x37f439):{},_0x4e5447=[],_0x3b6b96=[];for(const _0xa7de4b of REMOVED_ROOT_FIELDS){if(!Object[_0x4dcf27(0x192)][_0x4dcf27(0x127)][_0x4dcf27(0x189)](_0x2c2302,_0xa7de4b))continue;delete _0x2c2302[_0xa7de4b],_0x3b6b96['push'](_0xa7de4b),_0x4e5447['push']({'code':_0x4dcf27(0x170),'path':_0xa7de4b,'message':_0xa7de4b+_0x4dcf27(0x230)});}for(const _0x33e384 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0x4dcf27(0x192)]['hasOwnProperty'][_0x4dcf27(0x189)](_0x372f56,_0x33e384))continue;const _0x354c31=_0x4dcf27(0x1b6)+_0x33e384;delete _0x372f56[_0x33e384],_0x3b6b96[_0x4dcf27(0x1fb)](_0x354c31),_0x4e5447['push']({'code':'legacy_field_removed','path':_0x354c31,'message':_0x354c31+_0x4dcf27(0x230)});}if(Object['prototype'][_0x4dcf27(0x127)][_0x4dcf27(0x189)](_0x372f56,_0x4dcf27(0x1ec))){const _0x1b6f63=_0x372f56[_0x4dcf27(0x1ec)],_0x476247=typeof _0x1b6f63==='string'?_0x1b6f63['trim']():_0x1b6f63;if(isEmptyJsonValue(_0x1b6f63)||_0x476247===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4df545='flowJson.schemaVersion';delete _0x372f56['schemaVersion'],_0x3b6b96[_0x4dcf27(0x1fb)](_0x4df545),_0x4e5447[_0x4dcf27(0x1fb)]({'code':'legacy_field_removed','path':_0x4df545,'message':_0x4df545+_0x4dcf27(0x211)+DEFAULT_FLOW_SCHEMA_VERSION+_0x4dcf27(0x167)});}}removeEmptyMetadata(_0x372f56,_0x4dcf27(0x25c),_0x4e5447,_0x3b6b96);_0x2c2302['flowType']===_0x4dcf27(0x1bd)&&!Object[_0x4dcf27(0x192)][_0x4dcf27(0x127)][_0x4dcf27(0x189)](_0x372f56,_0x4dcf27(0x254))&&(_0x372f56[_0x4dcf27(0x254)]=_0x4dcf27(0x24b));_0x2c2302['flowJson']=_0x372f56;if(typeof _0x2c2302['flowName']===_0x4dcf27(0x129))_0x2c2302[_0x4dcf27(0x1d4)]=_0x2c2302['flowName'][_0x4dcf27(0x1dd)]();return{'config':_0x2c2302,'warnings':_0x4e5447,'removedPaths':_0x3b6b96};}export function validateFlowConfig(_0x2a1aad){const _0x13514b=a287_0x42ed67;let _0x3197a1;try{_0x3197a1=normalizeFlowConfig(_0x2a1aad);}catch(_0x17ddb8){const _0x278e05=_0x17ddb8 instanceof Error?_0x17ddb8[_0x13514b(0x205)]:String(_0x17ddb8),_0x1d2207={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x278e05}],'warnings':[],'normalized':_0x1d2207,'validationConfig':_0x1d2207};}const _0x13a588=_0x3197a1[_0x13514b(0x242)],_0x2ca4f6=cloneJsonValue(_0x13a588),_0x3931ba=_0x2ca4f6['flowJson'];_0x3931ba[_0x13514b(0x141)]='__rabetbase_local_validation__',_0x3931ba[_0x13514b(0x1d4)]=_0x13a588[_0x13514b(0x1d4)];typeof _0x13a588[_0x13514b(0x1f0)]===_0x13514b(0x129)&&_0x13a588[_0x13514b(0x1f0)][_0x13514b(0x1dd)]()&&(_0x3931ba[_0x13514b(0x218)]=_0x13a588['datasetCode']['trim']());const _0x1006cc=[];return validateOuterMetadata(_0x13a588,_0x1006cc),validateFlowClassification(_0x13a588,_0x1006cc),validateGraph(_0x13a588[_0x13514b(0x25c)],_0x1006cc),{'valid':_0x1006cc['length']===0x0,'errors':_0x1006cc,'warnings':_0x3197a1[_0x13514b(0x1da)],'normalized':_0x13a588,'validationConfig':_0x2ca4f6};}function validateFlowClassification(_0x2b97fb,_0x230871){const _0x58f48d=a287_0x42ed67;if(!isRecord(_0x2b97fb[_0x58f48d(0x25c)]))return;const _0xd56326=_0x2b97fb[_0x58f48d(0x210)],_0x2c6e39=_0x2b97fb['flowJson'][_0x58f48d(0x254)];_0x2c6e39!==undefined&&(typeof _0x2c6e39!=='string'||!FLOW_PAGE_MODES[_0x58f48d(0x18b)](_0x2c6e39))&&_0x230871['push']({'path':'flowJson.pageMode','message':_0x58f48d(0x21e)+String(_0x2c6e39)+'.'});_0xd56326===_0x58f48d(0x135)&&_0x2c6e39!==undefined&&_0x230871[_0x58f48d(0x1fb)]({'path':'flowJson.pageMode','message':_0x58f48d(0x17d)});_0xd56326==='INDEPENDENT_FLOW'&&_0x2c6e39===_0x58f48d(0x151)&&_0x230871['push']({'path':_0x58f48d(0x224),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xd56326===_0x58f48d(0x135)||_0xd56326===_0x58f48d(0x1bd))&&validateCustomPageNavigation(_0x2b97fb,_0xd56326,_0x2c6e39,_0x230871);if(_0xd56326!==_0x58f48d(0x135)||!Array[_0x58f48d(0x186)](_0x2b97fb['flowJson'][_0x58f48d(0x1c1)]))return;_0x2b97fb[_0x58f48d(0x25c)][_0x58f48d(0x1c1)][_0x58f48d(0x204)]((_0x3ac150,_0x54571d)=>{const _0x342ee3=_0x58f48d;isRecord(_0x3ac150)&&_0x3ac150['type']==='APPROVAL'&&_0x3ac150[_0x342ee3(0x166)]===_0x342ee3(0x23a)&&_0x230871[_0x342ee3(0x1fb)]({'path':'flowJson.nodes['+_0x54571d+'].taskMode','message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x7c65e7,_0x17ac96,_0x31f76d,_0x2debfe){const _0x370543=a287_0x42ed67,_0x3bf695=_0x7c65e7[_0x370543(0x25c)][_0x370543(0x1dc)];_0x3bf695!==undefined&&_0x2debfe['push']({'path':'flowJson.startPageId','message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x51ff2c=_0x7c65e7[_0x370543(0x25c)][_0x370543(0x20c)];_0x51ff2c!==undefined&&(typeof _0x51ff2c!==_0x370543(0x129)||_0x51ff2c[_0x370543(0x1dd)]()==='')&&_0x2debfe['push']({'path':'flowJson.startPath','message':_0x370543(0x25f)});const _0xef691=Array[_0x370543(0x186)](_0x7c65e7[_0x370543(0x25c)][_0x370543(0x1c1)])?_0x7c65e7[_0x370543(0x25c)][_0x370543(0x1c1)][_0x370543(0x19d)]((_0x1ab21e,_0x4f7c07)=>({'node':_0x1ab21e,'index':_0x4f7c07}))['filter'](({node:_0x468312})=>isRecord(_0x468312)&&_0x468312[_0x370543(0x1ce)]!==undefined):[],_0x213d7d=_0x51ff2c!==undefined||_0xef691[_0x370543(0x16c)]>0x0,_0x4032eb=_0x31f76d===undefined&&_0x17ac96===_0x370543(0x1bd)?_0x370543(0x24b):_0x31f76d;_0x213d7d&&(_0x17ac96!==_0x370543(0x1bd)||_0x4032eb!==_0x370543(0x24b))&&(_0x51ff2c!==undefined&&_0x2debfe['push']({'path':_0x370543(0x17a),'message':_0x370543(0x110)}),_0xef691[_0x370543(0x204)](({index:_0x388530})=>{const _0x30bedc=_0x370543;_0x2debfe[_0x30bedc(0x1fb)]({'path':_0x30bedc(0x18d)+_0x388530+_0x30bedc(0x19b),'message':_0x30bedc(0x1a9)});}));}export async function writeNormalizedFlowConfig(_0x3b3488,_0x360de4,_0x57f3f1={}){const _0x6ec0eb=a287_0x42ed67,_0x5cb599=resolve(_0x3b3488),_0x8a94cc=_0x5cb599+'.'+process[_0x6ec0eb(0x1fe)]+'.'+randomUUID()+_0x6ec0eb(0xfd),_0x446343=JSON[_0x6ec0eb(0x157)](_0x360de4,null,0x2)+'\x0a';let _0x4eead0;try{try{_0x4eead0=(await stat(_0x5cb599))['mode']&0x1ff;}catch{_0x4eead0=undefined;}await writeFile(_0x8a94cc,_0x446343,{'encoding':_0x6ec0eb(0x102),'flag':'wx','mode':_0x4eead0??0x1a4});if(_0x4eead0!==undefined)await chmod(_0x8a94cc,_0x4eead0);_0x57f3f1[_0x6ec0eb(0xfe)]===![]?(await link(_0x8a94cc,_0x5cb599),await unlink(_0x8a94cc)):await rename(_0x8a94cc,_0x5cb599);}finally{await unlink(_0x8a94cc)[_0x6ec0eb(0x1c4)](()=>undefined);}}function validateOuterMetadata(_0x4a4682,_0x264c8c){const _0xb6c7f2=a287_0x42ed67;(typeof _0x4a4682[_0xb6c7f2(0x1d4)]!==_0xb6c7f2(0x129)||_0x4a4682[_0xb6c7f2(0x1d4)][_0xb6c7f2(0x1dd)]()==='')&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x1d4),'message':_0xb6c7f2(0x190)});_0x4a4682['flowDesc']!==undefined&&typeof _0x4a4682[_0xb6c7f2(0x24a)]!==_0xb6c7f2(0x129)&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x24a),'message':_0xb6c7f2(0x1ca)});if(_0x4a4682[_0xb6c7f2(0x210)]===undefined||_0x4a4682['flowType']===null)_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x210),'message':_0xb6c7f2(0x24f)});else(typeof _0x4a4682['flowType']!==_0xb6c7f2(0x129)||!FLOW_TYPES[_0xb6c7f2(0x18b)](_0x4a4682[_0xb6c7f2(0x210)]))&&_0x264c8c['push']({'path':_0xb6c7f2(0x210),'message':_0xb6c7f2(0x216)+String(_0x4a4682[_0xb6c7f2(0x210)])+'.'});_0x4a4682[_0xb6c7f2(0x1f0)]!==undefined&&typeof _0x4a4682[_0xb6c7f2(0x1f0)]!==_0xb6c7f2(0x129)&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x1f0),'message':_0xb6c7f2(0x1c8)}),_0x4a4682['pageId']!==undefined&&(!Number[_0xb6c7f2(0x176)](_0x4a4682[_0xb6c7f2(0x19c)])||_0x4a4682['pageId']<0x0)&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x19c),'message':_0xb6c7f2(0x25a)}),_0x4a4682[_0xb6c7f2(0x210)]===_0xb6c7f2(0x1bd)&&_0x4a4682[_0xb6c7f2(0x1f0)]!==undefined&&_0x264c8c[_0xb6c7f2(0x1fb)]({'path':_0xb6c7f2(0x1f0),'message':_0xb6c7f2(0x159)}),_0x4a4682['flowType']===_0xb6c7f2(0x1bd)&&_0x4a4682[_0xb6c7f2(0x19c)]!==undefined&&_0x264c8c['push']({'path':_0xb6c7f2(0x19c),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x5c3e03,_0x4ffc07){const _0x34d978=a287_0x42ed67;if(!isRecord(_0x5c3e03)){_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x25c),'message':_0x34d978(0xfc)});return;}!Array[_0x34d978(0x186)](_0x5c3e03[_0x34d978(0x1c1)])&&_0x4ffc07['push']({'path':'flowJson.nodes','message':_0x34d978(0x1f8)});!Array['isArray'](_0x5c3e03[_0x34d978(0x14c)])&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x193),'message':'edges\x20must\x20be\x20an\x20array.'});Object[_0x34d978(0x192)][_0x34d978(0x127)]['call'](_0x5c3e03,_0x34d978(0x1ec))&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x109),'message':_0x34d978(0x134)+String(_0x5c3e03[_0x34d978(0x1ec)])+_0x34d978(0x11b)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0xb114da of[_0x34d978(0xfb),_0x34d978(0x20e),_0x34d978(0x148)]){Object[_0x34d978(0x192)][_0x34d978(0x127)]['call'](_0x5c3e03,_0xb114da)&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x1b6)+_0xb114da,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x34d978(0x186)](_0x5c3e03[_0x34d978(0x1c1)])||!Array[_0x34d978(0x186)](_0x5c3e03[_0x34d978(0x14c)]))return;const _0x1e0943=new Map(),_0x3ee53b=[],_0x7b660=[],_0x4ddd20=new Map(),_0x51961b=new Map(),_0x55683d=new Set();let _0x4710ef=0x0;_0x5c3e03['nodes'][_0x34d978(0x204)]((_0x7cbad5,_0x2e2a80)=>{const _0x53df62=_0x34d978,_0x21bb99=_0x53df62(0x18d)+_0x2e2a80+']';if(!isRecord(_0x7cbad5)){_0x4ffc07['push']({'path':_0x21bb99,'message':_0x53df62(0x13a)});return;}const _0x472528=_0x7cbad5;if(typeof _0x472528['id']!==_0x53df62(0x129)||!BPMN_ID_PATTERN['test'](_0x472528['id']))_0x4ffc07['push']({'path':_0x21bb99+_0x53df62(0x1f7),'message':_0x53df62(0x257)});else _0x1e0943['has'](_0x472528['id'])?_0x4ffc07['push']({'path':_0x21bb99+'.id','message':_0x53df62(0x22c)+_0x472528['id']+'.'}):(_0x1e0943[_0x53df62(0x237)](_0x472528['id'],_0x472528),_0x55683d[_0x53df62(0x168)](_0x472528['id']));if(!NODE_TYPES['has'](_0x472528[_0x53df62(0x14f)]))_0x4ffc07[_0x53df62(0x1fb)]({'path':_0x21bb99+_0x53df62(0x20a),'message':_0x53df62(0x1ed)+String(_0x472528[_0x53df62(0x14f)])+'.'});else{if(_0x472528[_0x53df62(0x14f)]===_0x53df62(0x243))_0x3ee53b[_0x53df62(0x1fb)](_0x472528['id']);else _0x472528[_0x53df62(0x14f)]===_0x53df62(0x232)&&_0x7b660[_0x53df62(0x1fb)](_0x472528['id']);}_0x472528[_0x53df62(0x14f)]===_0x53df62(0x196)&&(_0x472528[_0x53df62(0x166)]===undefined||_0x472528[_0x53df62(0x166)]===_0x53df62(0x196))&&(_0x4710ef+=0x1);validateNode(_0x472528,_0x21bb99,_0x4ffc07);if(_0x472528['type']===_0x53df62(0x12e)){const _0x47dd1a=resolveEffectiveResultVariable(_0x472528[_0x53df62(0x1d8)],![]);_0x47dd1a&&(registerResultVariableOwner(_0x51961b,_0x47dd1a,_0x472528['id'],_0x4ffc07),!_0x4ddd20[_0x53df62(0x18b)](_0x47dd1a)&&_0x4ddd20[_0x53df62(0x237)](_0x47dd1a,_0x472528['id']));}if(_0x472528[_0x53df62(0x14f)]==='APPROVAL'&&isRecord(_0x472528['timeout'])&&_0x472528['timeout'][_0x53df62(0xfa)]===!![]&&_0x472528[_0x53df62(0x222)]['action']==='EXECUTE_BFF'){const _0x2d2ef1=resolveEffectiveResultVariable(_0x472528[_0x53df62(0x222)]['resultVariable'],!![]);_0x2d2ef1&®isterResultVariableOwner(_0x51961b,_0x2d2ef1,_0x472528['id']+'.timeout',_0x4ffc07);}});_0x3ee53b['length']!==0x1&&_0x4ffc07[_0x34d978(0x1fb)]({'path':_0x34d978(0x226),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x7b660[_0x34d978(0x16c)]===0x0&&_0x4ffc07[_0x34d978(0x1fb)]({'path':'flowJson.nodes','message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x46781c=new Map(),_0x152e06=new Map(),_0x4ee49e=new Map(),_0x10add0=new Set();_0x5c3e03[_0x34d978(0x14c)]['forEach']((_0x5e2bd4,_0x2a7af8)=>{const _0x33d995=_0x34d978,_0x4b9b5f=_0x33d995(0x1be)+_0x2a7af8+']';if(!isRecord(_0x5e2bd4)){_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f,'message':_0x33d995(0x12a)});return;}const _0x44cc72=_0x5e2bd4;_0x4ee49e[_0x33d995(0x237)](_0x44cc72,_0x4b9b5f);const _0x4cf2bf=resolveEdgeEndpoint(_0x44cc72[_0x33d995(0x125)],_0x44cc72[_0x33d995(0x10f)]),_0x269ff1=resolveEdgeEndpoint(_0x44cc72[_0x33d995(0x197)],_0x44cc72[_0x33d995(0x259)]);if(!_0x4cf2bf)_0x4ffc07['push']({'path':_0x4b9b5f+_0x33d995(0x1a4),'message':_0x33d995(0x1f2)});if(!_0x269ff1)_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1c7),'message':_0x33d995(0x23c)});_0x4cf2bf&&!_0x1e0943[_0x33d995(0x18b)](_0x4cf2bf)&&_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1a4),'message':_0x33d995(0x139)+_0x4cf2bf+'.'});_0x269ff1&&!_0x1e0943[_0x33d995(0x18b)](_0x269ff1)&&_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+'.target','message':_0x33d995(0x248)+_0x269ff1+'.'});if(_0x44cc72['id']!==undefined){if(typeof _0x44cc72['id']!==_0x33d995(0x129)||!BPMN_ID_PATTERN[_0x33d995(0x240)](_0x44cc72['id']))_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1f7),'message':_0x33d995(0x1a5)});else{if(_0x55683d[_0x33d995(0x18b)](_0x44cc72['id']))_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f+_0x33d995(0x1f7),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x44cc72['id']+'.'});else!_0x55683d['has'](_0x44cc72['id'])&&_0x55683d[_0x33d995(0x168)](_0x44cc72['id']);}}if(_0x4cf2bf&&_0x269ff1){const _0x4ec7ec=_0x4cf2bf+'\x00'+_0x269ff1+'\x00'+(_0x44cc72[_0x33d995(0x11c)]??_0x33d995(0x12b));_0x10add0[_0x33d995(0x18b)](_0x4ec7ec)?_0x4ffc07[_0x33d995(0x1fb)]({'path':_0x4b9b5f,'message':'Duplicate\x20edge\x20route:\x20'+_0x4cf2bf+_0x33d995(0x118)+_0x269ff1+'\x20('+(_0x44cc72[_0x33d995(0x11c)]??_0x33d995(0x12b))+').'}):_0x10add0[_0x33d995(0x168)](_0x4ec7ec);}validateEdge(_0x44cc72,_0x4b9b5f,_0x4ffc07),_0x4cf2bf&&_0x269ff1&&(_0x46781c['get'](_0x4cf2bf)?.[_0x33d995(0x1fb)](_0x44cc72)??_0x46781c[_0x33d995(0x237)](_0x4cf2bf,[_0x44cc72]),_0x152e06[_0x33d995(0x1e3)](_0x269ff1)?.[_0x33d995(0x1fb)](_0x44cc72)??_0x152e06['set'](_0x269ff1,[_0x44cc72]));});if(_0x3ee53b[_0x34d978(0x16c)]!==0x1)return;validateGraphShape(_0x1e0943,_0x3ee53b[0x0],_0x7b660,_0x46781c,_0x152e06,_0x4ee49e,_0x4ffc07),validateScriptResultReferences(_0x1e0943,_0x3ee53b[0x0],_0x46781c,_0x152e06,_0x4ee49e,_0x4ddd20,_0x4ffc07),validateApprovalResults(_0x1e0943,_0x4710ef,_0x7b660,_0x4ffc07);}function validateNode(_0x553a0a,_0x29714d,_0x31cbea){const _0xfbc7d2=a287_0x42ed67;for(const _0x1cb648 of['form','formPermission']){Object[_0xfbc7d2(0x192)][_0xfbc7d2(0x127)]['call'](_0x553a0a,_0x1cb648)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.'+_0x1cb648,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0xfbc7d2(0x18b)](_0x553a0a[_0xfbc7d2(0x14f)]))return;(typeof _0x553a0a[_0xfbc7d2(0x1e5)]!==_0xfbc7d2(0x129)||_0x553a0a[_0xfbc7d2(0x1e5)][_0xfbc7d2(0x1dd)]()==='')&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x10b),'message':'Every\x20node\x20requires\x20a\x20non-empty\x20name.'});_0x553a0a['pageId']!==undefined&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x234),'message':_0xfbc7d2(0x13f)});if(_0x553a0a['path']!==undefined){if(typeof _0x553a0a['path']!==_0xfbc7d2(0x129)||_0x553a0a[_0xfbc7d2(0x1ce)][_0xfbc7d2(0x1dd)]()==='')_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x111),'message':_0xfbc7d2(0x160)});else _0x553a0a[_0xfbc7d2(0x14f)]!==_0xfbc7d2(0x196)&&_0x553a0a[_0xfbc7d2(0x14f)]!=='END'&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x111),'message':_0xfbc7d2(0x140)});}const _0x32ce6f=_0x553a0a[_0xfbc7d2(0x11d)];if(!isRecord(_0x32ce6f))_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x219),'message':_0xfbc7d2(0x17b)});else for(const _0x4bf6cb of['x','y']){const _0x1d3b87=_0x32ce6f[_0x4bf6cb];(typeof _0x1d3b87!==_0xfbc7d2(0x227)||!Number['isFinite'](_0x1d3b87)||_0x1d3b87<0x0)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x208)+_0x4bf6cb,'message':_0xfbc7d2(0x24d)+_0x4bf6cb+_0xfbc7d2(0x1b9)});}if(_0x553a0a[_0xfbc7d2(0x14f)]===_0xfbc7d2(0x196)){const _0x314470=_0x553a0a['approvalMode']??_0xfbc7d2(0x236),_0x52bb32=_0x553a0a['taskMode']??_0xfbc7d2(0x196);!APPROVAL_TASK_MODES[_0xfbc7d2(0x18b)](_0x52bb32)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x1e6),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x52bb32)+'.'});!APPROVAL_MODES[_0xfbc7d2(0x18b)](_0x314470)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.approvalMode','message':_0xfbc7d2(0x220)+String(_0x314470)+'.'});if(!isRecord(_0x553a0a[_0xfbc7d2(0x107)]))_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x137),'message':_0xfbc7d2(0x1b1)});else{const _0x2a634d=_0x553a0a[_0xfbc7d2(0x107)][_0xfbc7d2(0x12f)];_0x2a634d!==_0xfbc7d2(0x18c)&&_0x2a634d!=='ROLE'&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x13d),'message':_0xfbc7d2(0x223)});if(_0x2a634d===_0xfbc7d2(0x18c)){const _0x1cbb66=_0x553a0a[_0xfbc7d2(0x107)]['userIds'];if(!Array[_0xfbc7d2(0x186)](_0x1cbb66)||_0x1cbb66[_0xfbc7d2(0x16c)]===0x0)_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x1a1),'message':_0xfbc7d2(0x14e)});else{const _0x34031b=_0x1cbb66['findIndex'](_0x1bbcd7=>!isValidUserId(_0x1bbcd7));_0x34031b>=0x0&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x1cf)+_0x34031b+']','message':_0xfbc7d2(0x1f6)});const _0x23ebf6=new Set(_0x1cbb66[_0xfbc7d2(0x17e)](isValidUserId)[_0xfbc7d2(0x19d)](_0x4c90cb=>String(_0x4c90cb)[_0xfbc7d2(0x1dd)]()));_0x314470===_0xfbc7d2(0x236)&&_0x23ebf6[_0xfbc7d2(0x21d)]>0x1&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.assignee.userIds','message':_0xfbc7d2(0x1d3)});}}if(_0x2a634d===_0xfbc7d2(0x1d1)){const _0x173674=_0x553a0a[_0xfbc7d2(0x107)][_0xfbc7d2(0x1cb)],_0x3924de=typeof _0x173674===_0xfbc7d2(0x227)||typeof _0x173674==='string'?Number(String(_0x173674)[_0xfbc7d2(0x1dd)]()):Number[_0xfbc7d2(0x20b)];(!Number[_0xfbc7d2(0x1ae)](_0x3924de)||_0x3924de<=0x0)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x22e),'message':_0xfbc7d2(0x13e)});}}if(_0x553a0a[_0xfbc7d2(0x11f)]!==undefined){if(!isRecord(_0x553a0a[_0xfbc7d2(0x11f)]))_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x152),'message':_0xfbc7d2(0x25b)});else{if(_0x553a0a[_0xfbc7d2(0x11f)][_0xfbc7d2(0x12f)]!==_0xfbc7d2(0x18c))_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x24e),'message':_0xfbc7d2(0x1c0)});else{const _0x241d10=_0x553a0a[_0xfbc7d2(0x11f)][_0xfbc7d2(0x116)];if(!Array[_0xfbc7d2(0x186)](_0x241d10)||_0x241d10[_0xfbc7d2(0x16c)]===0x0)_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x195),'message':_0xfbc7d2(0x1b7)});else{const _0x20513d=_0x241d10[_0xfbc7d2(0x238)](_0x300202=>!isValidUserId(_0x300202));_0x20513d>=0x0&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x1ef)+_0x20513d+']','message':_0xfbc7d2(0x21b)});}}}}}_0x553a0a[_0xfbc7d2(0x15a)]!==undefined&&typeof _0x553a0a['sequential']!==_0xfbc7d2(0x1db)&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+_0xfbc7d2(0x131),'message':_0xfbc7d2(0x175)});if(_0x553a0a[_0xfbc7d2(0x14f)]==='SCRIPT'){(typeof _0x553a0a[_0xfbc7d2(0x122)]!=='string'||_0x553a0a['scriptName'][_0xfbc7d2(0x1dd)]()==='')&&_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.scriptName','message':_0xfbc7d2(0x179)});if(_0x553a0a[_0xfbc7d2(0x1d8)]!==undefined){if(typeof _0x553a0a[_0xfbc7d2(0x1d8)]!=='string'||!VARIABLE_PATTERN[_0xfbc7d2(0x240)](_0x553a0a['resultVariable']))_0x31cbea[_0xfbc7d2(0x1fb)]({'path':_0x29714d+'.resultVariable','message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0xfbc7d2(0x18b)](_0x553a0a[_0xfbc7d2(0x1d8)])||_0x553a0a[_0xfbc7d2(0x1d8)][_0xfbc7d2(0x16e)](_0xfbc7d2(0x161)))&&_0x31cbea['push']({'path':_0x29714d+_0xfbc7d2(0x19a),'message':_0xfbc7d2(0x1ad)+_0x553a0a[_0xfbc7d2(0x1d8)]+'.'});}}validateAsyncExecution(_0x553a0a,_0x29714d,_0x31cbea),validateApprovalTimeout(_0x553a0a,_0x29714d,_0x31cbea),validateCcConfig(_0x553a0a,_0x29714d,_0x31cbea),_0x553a0a[_0xfbc7d2(0x14f)]===_0xfbc7d2(0x256)&&validateNotificationConfig(_0x553a0a['config'],_0x29714d+_0xfbc7d2(0x108),_0x31cbea);}function validateAsyncExecution(_0x43f368,_0x5a4f77,_0x428a26){const _0x3081d0=a287_0x42ed67;if(_0x43f368[_0x3081d0(0x10e)]===undefined)return;if(!isRecord(_0x43f368[_0x3081d0(0x10e)])){_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+'.async','message':_0x3081d0(0x19e)});return;}if(_0x43f368['async'][_0x3081d0(0xfa)]!==undefined&&typeof _0x43f368[_0x3081d0(0x10e)]['enabled']!==_0x3081d0(0x1db)){_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+_0x3081d0(0x258),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x43f368[_0x3081d0(0x10e)][_0x3081d0(0xfa)]!==!![])return;_0x43f368[_0x3081d0(0x14f)]!==_0x3081d0(0x12e)&&_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+_0x3081d0(0x173),'message':_0x3081d0(0x199)});const _0x4bf636=_0x43f368['async']['retryCount']??0x3;(!Number['isInteger'](_0x4bf636)||_0x4bf636<0x1||_0x4bf636>MAX_ASYNC_RETRY_COUNT)&&_0x428a26[_0x3081d0(0x1fb)]({'path':_0x5a4f77+'.async.retryCount','message':_0x3081d0(0x183)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x43f368['async']['retryInterval']!==undefined&&validateTimeAmount(_0x43f368[_0x3081d0(0x10e)]['retryInterval'],_0x5a4f77+_0x3081d0(0x106),_0x428a26);}function validateApprovalTimeout(_0x53683e,_0x9341f4,_0x180d00){const _0xb47829=a287_0x42ed67;if(_0x53683e['timeout']===undefined)return;if(!isRecord(_0x53683e['timeout'])){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x239),'message':'timeout\x20must\x20be\x20an\x20object.'});return;}if(_0x53683e[_0xb47829(0x222)]['enabled']!==undefined&&typeof _0x53683e['timeout'][_0xb47829(0xfa)]!=='boolean'){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x12c),'message':_0xb47829(0x209)});return;}if(_0x53683e[_0xb47829(0x222)][_0xb47829(0xfa)]!==!![])return;if(_0x53683e[_0xb47829(0x222)]['interrupting']!==undefined&&typeof _0x53683e[_0xb47829(0x222)][_0xb47829(0x22d)]!==_0xb47829(0x1db)){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+'.timeout.interrupting','message':_0xb47829(0x221)});return;}_0x53683e['type']!==_0xb47829(0x196)&&_0x180d00['push']({'path':_0x9341f4+_0xb47829(0x239),'message':_0xb47829(0x229)});validateTimeAmount(_0x53683e[_0xb47829(0x222)][_0xb47829(0x191)],_0x9341f4+_0xb47829(0x16b),_0x180d00);const _0x1e9ee8=_0x53683e[_0xb47829(0x222)][_0xb47829(0x146)];if(!APPROVAL_TIMEOUT_ACTIONS['has'](_0x1e9ee8)){_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x1f9),'message':'timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.'});return;}(_0x53683e['taskMode']??_0xb47829(0x196))===_0xb47829(0x23a)&&_0x1e9ee8!==_0xb47829(0x12d)&&_0x180d00['push']({'path':_0x9341f4+'.timeout.action','message':'HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.'});const _0x50afb8=_0x53683e[_0xb47829(0x222)]['interrupting']??_0x1e9ee8!==_0xb47829(0x12d);if(_0x1e9ee8==='EXECUTE_BFF')_0x50afb8&&_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+'.timeout.interrupting','message':_0xb47829(0x235)}),(typeof _0x53683e['timeout'][_0xb47829(0x122)]!==_0xb47829(0x129)||_0x53683e[_0xb47829(0x222)]['scriptName'][_0xb47829(0x1dd)]()==='')&&_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x11a),'message':_0xb47829(0x1d7)}),validateOptionalResultVariable(_0x53683e['timeout'][_0xb47829(0x1d8)],_0x9341f4+'.timeout.resultVariable',_0x180d00);else!_0x50afb8&&_0x180d00[_0xb47829(0x1fb)]({'path':_0x9341f4+_0xb47829(0x1c9),'message':_0x1e9ee8+_0xb47829(0x18f)});}function validateTimeAmount(_0x166dd8,_0x2f4735,_0x3dfdf7){const _0x2e8c56=a287_0x42ed67;if(!isRecord(_0x166dd8)){_0x3dfdf7[_0x2e8c56(0x1fb)]({'path':_0x2f4735,'message':_0x2e8c56(0x1b3)});return;}(!Number['isInteger'](_0x166dd8[_0x2e8c56(0x169)])||Number(_0x166dd8[_0x2e8c56(0x169)])<=0x0)&&_0x3dfdf7[_0x2e8c56(0x1fb)]({'path':_0x2f4735+_0x2e8c56(0x181),'message':_0x2e8c56(0x225)}),!FLOW_TIME_UNITS[_0x2e8c56(0x18b)](_0x166dd8['unit'])&&_0x3dfdf7['push']({'path':_0x2f4735+_0x2e8c56(0x253),'message':_0x2e8c56(0x1ea)});}function validateOptionalResultVariable(_0x3b3ff2,_0x12bf7e,_0x2b40a4){const _0x5004b6=a287_0x42ed67;if(_0x3b3ff2===undefined||_0x3b3ff2===null||_0x3b3ff2==='')return;if(typeof _0x3b3ff2!=='string'||!VARIABLE_PATTERN[_0x5004b6(0x240)](_0x3b3ff2))_0x2b40a4[_0x5004b6(0x1fb)]({'path':_0x12bf7e,'message':_0x5004b6(0x19f)});else(RESERVED_RESULT_VARIABLES[_0x5004b6(0x18b)](_0x3b3ff2)||_0x3b3ff2['startsWith']('approval_sys_'))&&_0x2b40a4[_0x5004b6(0x1fb)]({'path':_0x12bf7e,'message':_0x5004b6(0x1ad)+_0x3b3ff2+'.'});}function validateCcConfig(_0x4f6999,_0x10ce86,_0x48d71c){const _0xaa5a94=a287_0x42ed67;if(_0x4f6999['cc']===undefined)return;if(!isRecord(_0x4f6999['cc'])){_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+_0xaa5a94(0x14d),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x4f6999['type']!=='END'&&_0x4f6999['type']!=='APPROVAL'&&_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+'.cc','message':_0xaa5a94(0x16a)});Object['prototype'][_0xaa5a94(0x127)][_0xaa5a94(0x189)](_0x4f6999['cc'],'readSources')&&_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+_0xaa5a94(0x113),'message':UNSUPPORTED_FORM_MESSAGE});const _0x59506e=_0x4f6999['cc'][_0xaa5a94(0x1c5)];if(!Array['isArray'](_0x59506e)||_0x59506e[_0xaa5a94(0x16c)]===0x0)_0x48d71c['push']({'path':_0x10ce86+_0xaa5a94(0x136),'message':_0xaa5a94(0x228)});else{_0x59506e[_0xaa5a94(0x16c)]>MAX_CC_RECIPIENTS&&_0x48d71c[_0xaa5a94(0x1fb)]({'path':_0x10ce86+_0xaa5a94(0x136),'message':_0xaa5a94(0x194)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x27169a=new Set();_0x59506e['forEach']((_0x433589,_0x3bb0c8)=>{const _0x1a6a32=_0xaa5a94;if(typeof _0x433589!=='string'||_0x433589[_0x1a6a32(0x1dd)]()==='')_0x48d71c['push']({'path':_0x10ce86+_0x1a6a32(0x1cc)+_0x3bb0c8+']','message':_0x1a6a32(0x16d)});else _0x27169a[_0x1a6a32(0x18b)](_0x433589[_0x1a6a32(0x1dd)]())?_0x48d71c['push']({'path':_0x10ce86+_0x1a6a32(0x1cc)+_0x3bb0c8+']','message':'Duplicate\x20cc\x20recipient\x20userId:\x20'+_0x433589[_0x1a6a32(0x1dd)]()+'.'}):_0x27169a[_0x1a6a32(0x168)](_0x433589[_0x1a6a32(0x1dd)]());});}validateStringArray(_0x4f6999['cc'][_0xaa5a94(0x1a8)],_0x10ce86+_0xaa5a94(0x1d0),_0x48d71c);}function validateStringArray(_0x2d54a9,_0x416bf6,_0x4210e8){const _0x31adce=a287_0x42ed67;if(_0x2d54a9===undefined)return;if(!Array[_0x31adce(0x186)](_0x2d54a9)){_0x4210e8[_0x31adce(0x1fb)]({'path':_0x416bf6,'message':_0x31adce(0x247)});return;}const _0xc31f28=new Set();_0x2d54a9[_0x31adce(0x204)]((_0x2ddb71,_0xf3ada6)=>{const _0x1273ce=_0x31adce;if(typeof _0x2ddb71!=='string'||_0x2ddb71[_0x1273ce(0x1dd)]()==='')_0x4210e8[_0x1273ce(0x1fb)]({'path':_0x416bf6+'['+_0xf3ada6+']','message':_0x1273ce(0x21f)});else _0xc31f28[_0x1273ce(0x18b)](_0x2ddb71['trim']())?_0x4210e8['push']({'path':_0x416bf6+'['+_0xf3ada6+']','message':_0x1273ce(0x162)+_0x2ddb71[_0x1273ce(0x1dd)]()+'.'}):_0xc31f28['add'](_0x2ddb71[_0x1273ce(0x1dd)]());});}function validateNotificationConfig(_0x926648,_0x20c89a,_0xa6c5b3){const _0x1c84f2=a287_0x42ed67;if(!isRecord(_0x926648)){_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a,'message':_0x1c84f2(0x25d)});return;}if(_0x926648[_0x1c84f2(0x1a6)]!==undefined&&_0x926648[_0x1c84f2(0x1a6)]!==null){if(typeof _0x926648[_0x1c84f2(0x1a6)]!==_0x1c84f2(0x129))_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+_0x1c84f2(0x105),'message':_0x1c84f2(0x1f4)});else _0x926648[_0x1c84f2(0x1a6)][_0x1c84f2(0x1dd)]()&&_0x926648[_0x1c84f2(0x1a6)][_0x1c84f2(0x1dd)]()!=='v1'&&_0xa6c5b3['push']({'path':_0x20c89a+_0x1c84f2(0x105),'message':_0x1c84f2(0x246)+_0x926648['version']+'.'});}const _0x2c82fc=requireNotificationString(_0x926648['configCode'],_0x20c89a+_0x1c84f2(0x23b),_0x1c84f2(0x22f),_0xa6c5b3);_0x2c82fc?.[_0x1c84f2(0x165)]('${')&&_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+_0x1c84f2(0x23b),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x926648[_0x1c84f2(0x1bc)]!==undefined&&_0x926648[_0x1c84f2(0x1bc)]!==null){if(typeof _0x926648[_0x1c84f2(0x1bc)]!==_0x1c84f2(0x129))_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+'.failurePolicy','message':_0x1c84f2(0x21a)});else!NOTIFICATION_FAILURE_POLICIES[_0x1c84f2(0x18b)](_0x926648[_0x1c84f2(0x1bc)][_0x1c84f2(0x1dd)]()[_0x1c84f2(0x158)]())&&_0xa6c5b3['push']({'path':_0x20c89a+_0x1c84f2(0x187),'message':_0x1c84f2(0x215)});}!isRecord(_0x926648[_0x1c84f2(0x124)])?_0xa6c5b3[_0x1c84f2(0x1fb)]({'path':_0x20c89a+_0x1c84f2(0x130),'message':_0x1c84f2(0x133)}):validateNotificationTemplate(_0x926648['template'],_0x20c89a+_0x1c84f2(0x130),_0xa6c5b3),validateNotificationRecipients(_0x926648[_0x1c84f2(0x1ac)],_0x20c89a+_0x1c84f2(0x251),_0xa6c5b3);}function validateNotificationTemplate(_0x5db74a,_0x5c2658,_0x1498a2){const _0x49f82c=a287_0x42ed67;for(const _0x4d632a of[_0x49f82c(0x163),_0x49f82c(0x207)]){const _0x34cab5=requireNotificationString(_0x5db74a[_0x4d632a],_0x5c2658+'.'+_0x4d632a,_0x49f82c(0x117)+_0x4d632a+'\x20is\x20required.',_0x1498a2);if(_0x34cab5)validateNotificationPlaceholders(_0x34cab5,_0x5c2658+'.'+_0x4d632a,_0x1498a2);}_0x5db74a[_0x49f82c(0x1bf)]!==undefined&&_0x5db74a[_0x49f82c(0x1bf)]!==null&&(typeof _0x5db74a[_0x49f82c(0x1bf)]!=='string'?_0x1498a2[_0x49f82c(0x1fb)]({'path':_0x5c2658+_0x49f82c(0x13b),'message':_0x49f82c(0x1bb)}):validateNotificationPlaceholders(_0x5db74a[_0x49f82c(0x1bf)],_0x5c2658+'.detailMarkdown',_0x1498a2)),validateNotificationFacts(_0x5db74a[_0x49f82c(0x16f)],_0x5c2658+_0x49f82c(0x1b8),_0x1498a2),validateNotificationActions(_0x5db74a[_0x49f82c(0x1b4)],_0x5c2658+_0x49f82c(0x1b0),_0x1498a2);}function validateNotificationFacts(_0x4cd85b,_0x3ea9cd,_0x4d4084){const _0x4dd596=a287_0x42ed67;if(_0x4cd85b===undefined||_0x4cd85b===null)return;if(!Array['isArray'](_0x4cd85b)){_0x4d4084[_0x4dd596(0x1fb)]({'path':_0x3ea9cd,'message':_0x4dd596(0x1e7)});return;}_0x4cd85b[_0x4dd596(0x16c)]>MAX_NOTIFICATION_FACTS&&_0x4d4084[_0x4dd596(0x1fb)]({'path':_0x3ea9cd,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_FACTS+_0x4dd596(0x104)}),_0x4cd85b[_0x4dd596(0x204)]((_0x51b4cb,_0x1631e5)=>{const _0x3f7975=_0x4dd596,_0x8c47ac=_0x3ea9cd+'['+_0x1631e5+']';if(!isRecord(_0x51b4cb)){_0x4d4084[_0x3f7975(0x1fb)]({'path':_0x8c47ac,'message':_0x3f7975(0x217)});return;}for(const _0x17e7a8 of[_0x3f7975(0x15b),_0x3f7975(0x169)]){const _0x33cce9=requireNotificationString(_0x51b4cb[_0x17e7a8],_0x8c47ac+'.'+_0x17e7a8,_0x3f7975(0x213)+_0x17e7a8+'\x20is\x20required.',_0x4d4084);_0x33cce9&&validateNotificationPlaceholders(_0x33cce9,_0x8c47ac+'.'+_0x17e7a8,_0x4d4084);}});}function validateNotificationActions(_0x1c8751,_0x4681ce,_0x3d08de){const _0x597e73=a287_0x42ed67;if(_0x1c8751===undefined||_0x1c8751===null)return;if(!Array['isArray'](_0x1c8751)){_0x3d08de['push']({'path':_0x4681ce,'message':'Notification\x20template.actions\x20must\x20be\x20an\x20array.'});return;}_0x1c8751['length']>MAX_NOTIFICATION_ACTIONS&&_0x3d08de[_0x597e73(0x1fb)]({'path':_0x4681ce,'message':_0x597e73(0x200)+MAX_NOTIFICATION_ACTIONS+'\x20actions.'}),_0x1c8751[_0x597e73(0x204)]((_0x36e72b,_0x565559)=>{const _0x554fa3=_0x597e73,_0x5b404f=_0x4681ce+'['+_0x565559+']';if(!isRecord(_0x36e72b)){_0x3d08de[_0x554fa3(0x1fb)]({'path':_0x5b404f,'message':_0x554fa3(0x10d)});return;}const _0x2c37b8=requireNotificationString(_0x36e72b[_0x554fa3(0x1d9)],_0x5b404f+'.text',_0x554fa3(0x20d),_0x3d08de);if(_0x2c37b8)validateNotificationPlaceholders(_0x2c37b8,_0x5b404f+'.text',_0x3d08de);const _0x583bcc=requireNotificationString(_0x36e72b[_0x554fa3(0x185)],_0x5b404f+_0x554fa3(0x121),'Notification\x20action.url\x20is\x20required.',_0x3d08de);if(!_0x583bcc)return;validateNotificationPlaceholders(_0x583bcc,_0x5b404f+_0x554fa3(0x121),_0x3d08de),!/^https?:\/\//i[_0x554fa3(0x240)](_0x583bcc)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x554fa3(0x240)](_0x583bcc)&&_0x3d08de[_0x554fa3(0x1fb)]({'path':_0x5b404f+_0x554fa3(0x121),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function a287_0x4293(){const _0x21d3d6=['assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','flowJson.pageMode','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','flowJson.nodes','number','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','EMAIL','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Duplicate\x20node\x20id:\x20','interrupting','.assignee.roleId','Notification\x20configCode\x20is\x20required.','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','CONTINUE','END','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','.pageId','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','SINGLE','set','findIndex','.timeout','HANDLE','.configCode','edge\x20target\x20is\x20required.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','Notification\x20recipient.value\x20is\x20required.','test','object','config','START','FAIL','DAYS','Unsupported\x20notification\x20version:\x20','value\x20must\x20be\x20an\x20array.','Edge\x20target\x20node\x20not\x20found:\x20','1300504BzVXUe','flowDesc','CUSTOM_PAGE','result','position.','.transferCandidates.strategy','flowType\x20is\x20required.','metadata','.recipients','approval_sys_operationType','.unit','pageMode','configCode','NOTIFICATION','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.async.enabled','targetNodeId','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','transferCandidates\x20must\x20be\x20an\x20object.','flowJson','NOTIFICATION\x20node\x20requires\x20config.','entries','startPath\x20must\x20be\x20a\x20non-empty\x20string.','flowCode','enabled','formSchema','flowJson\x20must\x20be\x20an\x20object.','.tmp','overwrite','appCode','isFinite','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','utf8','Unsupported\x20notification\x20placeholder:\x20','\x20facts.','.version','.async.retryInterval','assignee','.config','flowJson.schemaVersion','^[A-Za-z_][A-Za-z0-9_]*$','.name','8DLUkDe','Notification\x20action\x20must\x20be\x20an\x20object.','async','sourceNodeId','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','.path','.expression','.cc.readSources','formData','HOURS','userIds','Notification\x20template.','\x20->\x20','USER','.timeout.scriptName','.\x20This\x20CLI\x20supports\x20only\x20','conditionType','position','Notification\x20recipient.type\x20is\x20required.','transferCandidates','AUTO_APPROVE','.url','scriptName','.waypoints[','template','source','Node\x20is\x20not\x20reachable\x20from\x20START.','hasOwnProperty','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','string','edge\x20must\x20be\x20an\x20object.','ALWAYS','.timeout.enabled','EXECUTE_BFF','SCRIPT','strategy','.template','.sequential','approval.simple-flow.v1','NOTIFICATION\x20node\x20requires\x20template.','Unsupported\x20schemaVersion:\x20','FORM_FLOW','.cc.recipientUserIds','.assignee','SECONDS','Edge\x20source\x20node\x20not\x20found:\x20','node\x20must\x20be\x20an\x20object.','.detailMarkdown','approval_sys_pageId','.assignee.strategy','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','flowKey','role','replace','REJECTED','Node\x20cannot\x20reach\x20any\x20END.','action','integer','formPermissions','\x20must\x20be\x20a\x20finite\x20number.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','838461QlYbbb','edges','.cc','FIXED\x20assignee\x20requires\x20userIds.','type','EXPRESSION\x20edge\x20requires\x20expression.','PLATFORM_FORM','.transferCandidates','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','Node\x20has\x20no\x20incoming\x20edge.','approval_sys_datasetCode','#/$defs/flowNode','stringify','toUpperCase','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','sequential','label','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','\x20was\x20empty\x20and\x20was\x20removed.','unit','parse','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','approval_sys_','Duplicate\x20value:\x20','title','834sBFOaI','includes','taskMode','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','add','value','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.timeout.duration','length','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','startsWith','facts','legacy_field_removed','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','MINUTES','.async','#/$defs/userId','sequential\x20must\x20be\x20a\x20boolean.','isInteger','waypoints','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','SCRIPT\x20node\x20requires\x20scriptName.','flowJson.startPath','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','AUTO_REJECT','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','filter','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','91820OHPDbR','.value','27eRBqva','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','url','isArray','.failurePolicy','keys','call','slice','has','FIXED','flowJson.nodes[','scriptResult','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','flowName\x20is\x20required.','duration','prototype','flowJson.edges','cc.recipientUserIds\x20supports\x20at\x20most\x20','.transferCandidates.userIds','APPROVAL','target','449330LvaQYR','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.resultVariable','].path','pageId','map','async\x20must\x20be\x20an\x20object.','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','Notification\x20recipient\x20must\x20be\x20an\x20object.','.assignee.userIds','approval_sys_appCode','1963398EdPrEq','.source','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','version','^[1-9][0-9]*$','visible','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','defaultFlow','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','recipients','Reserved\x20resultVariable:\x20','isSafeInteger','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','.actions','APPROVAL\x20node\x20requires\x20assignee.','CONDITION','duration\x20requires\x20value\x20and\x20unit.','actions','approval_sys_processInstanceId','flowJson.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','.facts','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','array','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','failurePolicy','INDEPENDENT_FLOW','flowJson.edges[','detailMarkdown','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','nodes','4933435CuuAxv','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','catch','recipientUserIds','context','.target','datasetCode\x20must\x20be\x20a\x20string.','.timeout.interrupting','flowDesc\x20must\x20be\x20a\x20string.','roleId','.cc.recipientUserIds[','ALL','path','.assignee.userIds[','.cc.visible','ROLE','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','flowName','BCC','#/$defs/timeAmount','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','resultVariable','text','warnings','boolean','startPageId','trim','EXPRESSION','.waypoints','APPROVED','Duplicate\x20resultVariable:\x20','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','get','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','name','.taskMode','Notification\x20template.facts\x20must\x20be\x20an\x20array.','templateName','some','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','approval_sys_initiatorUserId','schemaVersion','Unsupported\x20node\x20type:\x20','2343cslewx','.transferCandidates.userIds[','datasetCode','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','edge\x20source\x20is\x20required.','14399EImkSW','Notification\x20version\x20must\x20be\x20a\x20string.','.defaultFlow','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.id','nodes\x20must\x20be\x20an\x20array.','.timeout.action','.role','push','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','pid','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','Notification\x20template\x20supports\x20at\x20most\x20','expression','.conditionType','approval_sys_dataId','forEach','message','waypoint.','summary','.position.','timeout.enabled\x20must\x20be\x20a\x20boolean.','.type','NaN','startPath','Notification\x20action.text\x20is\x20required.','formDefinitions','flowJson.nodes.','flowType','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','Expression\x20references\x20SCRIPT\x20resultVariable\x20','Notification\x20fact.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','Unsupported\x20flowType:\x20','Notification\x20fact\x20must\x20be\x20an\x20object.','bindDatasetCode','.position','failurePolicy\x20must\x20be\x20a\x20string.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','https://json-schema.org/draft/2020-12/schema','size','Unsupported\x20pageMode:\x20','value\x20must\x20be\x20a\x20non-empty\x20string.','Unsupported\x20approval\x20mode:\x20','timeout.interrupting\x20must\x20be\x20a\x20boolean.','timeout'];a287_0x4293=function(){return _0x21d3d6;};return a287_0x4293();}function validateNotificationRecipients(_0x1f2a50,_0x59ffba,_0x50da0d){const _0xd52054=a287_0x42ed67;if(_0x1f2a50===undefined||_0x1f2a50===null)return;if(!Array[_0xd52054(0x186)](_0x1f2a50)){_0x50da0d[_0xd52054(0x1fb)]({'path':_0x59ffba,'message':'Notification\x20recipients\x20must\x20be\x20an\x20array.'});return;}let _0x15c3d4=![];_0x1f2a50[_0xd52054(0x204)]((_0x324d87,_0x458dfd)=>{const _0xb075c6=_0xd52054,_0x18c5f1=_0x59ffba+'['+_0x458dfd+']';if(!isRecord(_0x324d87)){_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1,'message':_0xb075c6(0x1a0)});return;}const _0x2a786f=requireNotificationString(_0x324d87[_0xb075c6(0x14f)],_0x18c5f1+_0xb075c6(0x20a),_0xb075c6(0x11e),_0x50da0d);_0x2a786f&&!NOTIFICATION_RECIPIENT_TYPES[_0xb075c6(0x18b)](_0x2a786f[_0xb075c6(0x158)]())&&_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1+'.type','message':'Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.'});let _0x1ae413='TO';_0x324d87[_0xb075c6(0x142)]!==undefined&&_0x324d87[_0xb075c6(0x142)]!==null&&(typeof _0x324d87['role']!=='string'?(_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1+'.role','message':_0xb075c6(0x14a)}),_0x1ae413=''):(_0x1ae413=_0x324d87[_0xb075c6(0x142)]['trim']()[_0xb075c6(0x158)](),!NOTIFICATION_RECIPIENT_ROLES[_0xb075c6(0x18b)](_0x1ae413)&&_0x50da0d[_0xb075c6(0x1fb)]({'path':_0x18c5f1+_0xb075c6(0x1fa),'message':_0xb075c6(0x1ab)})));if(_0x1ae413==='TO')_0x15c3d4=!![];const _0x412e03=requireNotificationString(_0x324d87[_0xb075c6(0x169)],_0x18c5f1+'.value',_0xb075c6(0x23f),_0x50da0d);_0x412e03&&validateNotificationPlaceholders(_0x412e03,_0x18c5f1+'.value',_0x50da0d);}),_0x1f2a50[_0xd52054(0x16c)]>0x0&&!_0x15c3d4&&_0x50da0d[_0xd52054(0x1fb)]({'path':_0x59ffba,'message':_0xd52054(0x1e2)});}function requireNotificationString(_0x1af8ec,_0x55d4e1,_0xa64955,_0x491430){const _0xb74828=a287_0x42ed67;if(typeof _0x1af8ec!=='string'||_0x1af8ec['trim']()==='')return _0x491430[_0xb74828(0x1fb)]({'path':_0x55d4e1,'message':_0xa64955}),undefined;return _0x1af8ec[_0xb74828(0x1dd)]();}function validateNotificationPlaceholders(_0x1f1def,_0x3bff26,_0x3c61f9){const _0x152cf6=a287_0x42ed67;for(const _0x320068 of _0x1f1def['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0xfee8e=_0x320068[0x1]?.[_0x152cf6(0x1dd)]()??'',_0x58786f=_0xfee8e['indexOf']('.'),_0x3a282b=_0x58786f>=0x0?_0xfee8e[_0x152cf6(0x18a)](0x0,_0x58786f):_0xfee8e,_0x36d8bb=_0x58786f>=0x0?_0xfee8e[_0x152cf6(0x18a)](_0x58786f+0x1)['trim']():'';(!['event',_0x152cf6(0x1c6),'variables'][_0x152cf6(0x165)](_0x3a282b)||_0x36d8bb==='')&&_0x3c61f9['push']({'path':_0x3bff26,'message':_0x152cf6(0x103)+_0x320068[0x0]+'.'});}_0x1f1def[_0x152cf6(0x143)](NOTIFICATION_PLACEHOLDER_PATTERN,'')[_0x152cf6(0x165)]('${')&&_0x3c61f9[_0x152cf6(0x1fb)]({'path':_0x3bff26,'message':_0x152cf6(0x214)});}function validateEdge(_0x45e9aa,_0xd0dc00,_0x244315){const _0x248443=a287_0x42ed67;_0x45e9aa[_0x248443(0x1e5)]!==undefined&&typeof _0x45e9aa['name']!==_0x248443(0x129)&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x10b),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x45e9aa['defaultFlow']!==undefined&&typeof _0x45e9aa['defaultFlow']!=='boolean'&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x1f5),'message':'defaultFlow\x20must\x20be\x20a\x20boolean.'}),_0x45e9aa[_0x248443(0x177)]!==undefined&&(!Array[_0x248443(0x186)](_0x45e9aa[_0x248443(0x177)])?_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x1df),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x45e9aa[_0x248443(0x177)][_0x248443(0x204)]((_0x479e28,_0x349615)=>{const _0x3cc128=_0x248443;if(!isRecord(_0x479e28)){_0x244315[_0x3cc128(0x1fb)]({'path':_0xd0dc00+_0x3cc128(0x123)+_0x349615+']','message':_0x3cc128(0x233)});return;}for(const _0x4a0754 of['x','y']){const _0x4c709b=_0x479e28[_0x4a0754];(typeof _0x4c709b!==_0x3cc128(0x227)||!Number[_0x3cc128(0x100)](_0x4c709b))&&_0x244315[_0x3cc128(0x1fb)]({'path':_0xd0dc00+_0x3cc128(0x123)+_0x349615+'].'+_0x4a0754,'message':_0x3cc128(0x206)+_0x4a0754+_0x3cc128(0x149)});}})),_0x45e9aa[_0x248443(0x11c)]!==undefined&&!CONDITION_TYPES['has'](_0x45e9aa[_0x248443(0x11c)])&&_0x244315['push']({'path':_0xd0dc00+_0x248443(0x202),'message':'Unsupported\x20condition\x20type:\x20'+String(_0x45e9aa[_0x248443(0x11c)])+'.'}),_0x45e9aa[_0x248443(0x11c)]==='EXPRESSION'&&(typeof _0x45e9aa[_0x248443(0x201)]!==_0x248443(0x129)||_0x45e9aa[_0x248443(0x201)]['trim']()==='')&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x112),'message':_0x248443(0x150)}),_0x45e9aa[_0x248443(0x1aa)]===!![]&&_0x45e9aa['conditionType']!==_0x248443(0x12b)&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+_0x248443(0x1f5),'message':_0x248443(0x171)}),_0x45e9aa[_0x248443(0x1aa)]===!![]&&typeof _0x45e9aa['expression']===_0x248443(0x129)&&_0x45e9aa[_0x248443(0x201)][_0x248443(0x1dd)]()!==''&&_0x244315[_0x248443(0x1fb)]({'path':_0xd0dc00+'.expression','message':_0x248443(0x1d2)});}function validateGraphShape(_0x8c733,_0x2fa3d9,_0x3ba089,_0x5cdf9f,_0x139585,_0x418542,_0x2863e6){const _0x183717=a287_0x42ed67;for(const [_0x40d866,_0x1177e8]of _0x8c733){const _0x2faa9c=_0x139585['get'](_0x40d866)??[],_0x32014f=_0x5cdf9f['get'](_0x40d866)??[];_0x1177e8['type']!==_0x183717(0x243)&&_0x2faa9c['length']===0x0&&_0x2863e6['push']({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x154)});_0x1177e8[_0x183717(0x14f)]!=='END'&&_0x32014f[_0x183717(0x16c)]===0x0&&_0x2863e6['push']({'path':'flowJson.nodes.'+_0x40d866,'message':'Node\x20has\x20no\x20outgoing\x20edge.'});_0x1177e8[_0x183717(0x14f)]===_0x183717(0x243)&&_0x2faa9c['length']>0x0&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1f1)});_0x1177e8[_0x183717(0x14f)]===_0x183717(0x232)&&_0x32014f[_0x183717(0x16c)]>0x0&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x1177e8[_0x183717(0x14f)]==='CONDITION'){_0x32014f[_0x183717(0x16c)]<0x2&&_0x2863e6[_0x183717(0x1fb)]({'path':'flowJson.nodes.'+_0x40d866,'message':'CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.'});const _0x1a420b=_0x32014f['filter'](_0x4669f6=>_0x4669f6[_0x183717(0x1aa)]===!![]);_0x1a420b[_0x183717(0x16c)]!==0x1&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x153)});if(_0x1a420b[_0x183717(0x16c)]===0x1){const _0xef9c28=_0x1a420b[0x0],_0x94c4fe=_0x418542['get'](_0xef9c28)??_0x183717(0x193);_0xef9c28[_0x183717(0x11c)]!==_0x183717(0x12b)&&_0x2863e6['push']({'path':_0x94c4fe+'.conditionType','message':_0x183717(0x1c3)});_0xef9c28[_0x183717(0x201)]!==undefined&&_0x2863e6['push']({'path':_0x94c4fe+_0x183717(0x112),'message':_0x183717(0x23e)});for(const _0x5be15f of _0x32014f){if(_0x5be15f===_0xef9c28)continue;const _0x436c82=_0x418542['get'](_0x5be15f)??_0x183717(0x193);if(_0x5be15f[_0x183717(0x11c)]!=='EXPRESSION')_0x2863e6['push']({'path':_0x436c82+'.conditionType','message':_0x183717(0x1fd)});else(typeof _0x5be15f['expression']!==_0x183717(0x129)||_0x5be15f[_0x183717(0x201)][_0x183717(0x1dd)]()==='')&&_0x2863e6['push']({'path':_0x436c82+_0x183717(0x112),'message':_0x183717(0x17f)});}}}if(_0x1177e8[_0x183717(0x14f)]===_0x183717(0x196)&&(_0x1177e8[_0x183717(0x166)]??_0x183717(0x196))===_0x183717(0x23a)){if(_0x32014f[_0x183717(0x16c)]!==0x1)_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1e4)});else{const _0x2ea0a0=_0x32014f[0x0];((_0x2ea0a0[_0x183717(0x11c)]??_0x183717(0x12b))!==_0x183717(0x12b)||_0x2ea0a0['defaultFlow']===!![]||typeof _0x2ea0a0[_0x183717(0x201)]===_0x183717(0x129)&&_0x2ea0a0['expression']['trim']()!=='')&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x418542['get'](_0x2ea0a0)??_0x183717(0x193),'message':_0x183717(0x1ff)});}}else{if(_0x1177e8[_0x183717(0x14f)]===_0x183717(0x196)){const _0xedd219=_0x32014f[_0x183717(0x19d)](_0x27baa8=>_0x27baa8[_0x183717(0x11c)]??'ALWAYS'),_0x2fe32e=_0xedd219[_0x183717(0x17e)](_0xe7e243=>_0xe7e243!==_0x183717(0x1e0)&&_0xe7e243!==_0x183717(0x144));_0x2fe32e[_0x183717(0x16c)]>0x0&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1fc)}),_0xedd219[_0x183717(0x17e)](_0xee2c14=>_0xee2c14===_0x183717(0x1e0))[_0x183717(0x16c)]!==0x1&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x184)}),_0xedd219['filter'](_0x38bcd3=>_0x38bcd3===_0x183717(0x144))[_0x183717(0x16c)]!==0x1&&_0x2863e6['push']({'path':'flowJson.nodes.'+_0x40d866,'message':_0x183717(0x101)}),_0x32014f[_0x183717(0x1e9)](_0x40ea44=>_0x40ea44['defaultFlow']===!![])&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x40d866,'message':_0x183717(0x1af)});}}}const _0x39d4f8=new Set(),_0xda4d2a=_0x40eaf9=>{const _0x560676=_0x183717;if(_0x39d4f8[_0x560676(0x18b)](_0x40eaf9))return;_0x39d4f8['add'](_0x40eaf9);for(const _0x2298f6 of _0x5cdf9f[_0x560676(0x1e3)](_0x40eaf9)??[]){const _0x88bf39=resolveEdgeEndpoint(_0x2298f6['target'],_0x2298f6[_0x560676(0x259)]);if(_0x88bf39&&_0x8c733['has'](_0x88bf39))_0xda4d2a(_0x88bf39);}};_0xda4d2a(_0x2fa3d9);for(const _0x46df7a of _0x8c733[_0x183717(0x188)]()){!_0x39d4f8[_0x183717(0x18b)](_0x46df7a)&&_0x2863e6[_0x183717(0x1fb)]({'path':_0x183717(0x20f)+_0x46df7a,'message':_0x183717(0x126)});}const _0x53c7a9=_0x3ba089[_0x183717(0x1e9)](_0x439c20=>_0x39d4f8[_0x183717(0x18b)](_0x439c20));if(!_0x53c7a9){_0x2863e6[_0x183717(0x1fb)]({'path':'flowJson.edges','message':'No\x20END\x20node\x20is\x20reachable\x20from\x20START.'});return;}const _0x2ed5ac=new Set(),_0x10d968=_0x48d1d0=>{const _0x157245=_0x183717;if(_0x2ed5ac[_0x157245(0x18b)](_0x48d1d0))return;_0x2ed5ac['add'](_0x48d1d0);for(const _0x5ef43d of _0x139585[_0x157245(0x1e3)](_0x48d1d0)??[]){const _0x6f6f97=resolveEdgeEndpoint(_0x5ef43d['source'],_0x5ef43d[_0x157245(0x10f)]);if(_0x6f6f97&&_0x8c733[_0x157245(0x18b)](_0x6f6f97))_0x10d968(_0x6f6f97);}};for(const _0x285593 of _0x3ba089){if(_0x8c733[_0x183717(0x18b)](_0x285593))_0x10d968(_0x285593);}for(const _0x2000a6 of _0x39d4f8){!_0x2ed5ac['has'](_0x2000a6)&&_0x2863e6[_0x183717(0x1fb)]({'path':'flowJson.nodes.'+_0x2000a6,'message':_0x183717(0x145)});}}function validateApprovalResults(_0x12c17c,_0x1a3082,_0x2f6ca6,_0x5995e2){const _0x2d26bc=a287_0x42ed67;if(_0x1a3082===0x0)return;const _0x2058f8=new Set(_0x2f6ca6[_0x2d26bc(0x19d)](_0x511a62=>_0x12c17c[_0x2d26bc(0x1e3)](_0x511a62)?.[_0x2d26bc(0x24c)])[_0x2d26bc(0x17e)](_0x24e42e=>typeof _0x24e42e===_0x2d26bc(0x129)));for(const _0x2389e6 of[_0x2d26bc(0x1e0),_0x2d26bc(0x144)]){!_0x2058f8[_0x2d26bc(0x18b)](_0x2389e6)&&_0x5995e2['push']({'path':_0x2d26bc(0x226),'message':_0x2d26bc(0x178)+_0x2389e6+'.'});}}function validateScriptResultReferences(_0x1f984d,_0x286519,_0x24d302,_0x46e11e,_0x298619,_0xcadf79,_0x469838){const _0x506e0b=a287_0x42ed67;if(_0xcadf79['size']===0x0)return;const _0x3220f1=new Set(),_0x2305b6=_0x340023=>{const _0x4f2a3d=a287_0x2794;if(!_0x3220f1['has'](_0x340023)&&_0x1f984d[_0x4f2a3d(0x18b)](_0x340023)){_0x3220f1['add'](_0x340023);for(const _0x37c415 of _0x24d302['get'](_0x340023)??[]){const _0x48de67=resolveEdgeEndpoint(_0x37c415[_0x4f2a3d(0x197)],_0x37c415[_0x4f2a3d(0x259)]);if(_0x48de67)_0x2305b6(_0x48de67);}}};_0x2305b6(_0x286519);const _0x28931b=new Map();for(const _0x13a022 of _0x3220f1){_0x28931b[_0x506e0b(0x237)](_0x13a022,_0x13a022===_0x286519?new Set([_0x286519]):new Set(_0x3220f1));}let _0x21e0e7=!![];while(_0x21e0e7){_0x21e0e7=![];for(const _0x2c7c25 of _0x3220f1){if(_0x2c7c25===_0x286519)continue;const _0x4ce30a=(_0x46e11e[_0x506e0b(0x1e3)](_0x2c7c25)??[])[_0x506e0b(0x19d)](_0x3391bd=>resolveEdgeEndpoint(_0x3391bd[_0x506e0b(0x125)],_0x3391bd[_0x506e0b(0x10f)]))['filter'](_0x1c3bfd=>Boolean(_0x1c3bfd&&_0x3220f1[_0x506e0b(0x18b)](_0x1c3bfd)));if(_0x4ce30a[_0x506e0b(0x16c)]===0x0)continue;const _0x3c6e90=new Set(_0x28931b[_0x506e0b(0x1e3)](_0x4ce30a[0x0])??[]);for(const _0x5de646 of _0x4ce30a['slice'](0x1)){const _0x51c8b5=_0x28931b[_0x506e0b(0x1e3)](_0x5de646)??new Set();for(const _0x59a251 of _0x3c6e90){if(!_0x51c8b5[_0x506e0b(0x18b)](_0x59a251))_0x3c6e90['delete'](_0x59a251);}}_0x3c6e90[_0x506e0b(0x168)](_0x2c7c25);const _0x30b9ae=_0x28931b['get'](_0x2c7c25);!setsEqual(_0x30b9ae,_0x3c6e90)&&(_0x28931b['set'](_0x2c7c25,_0x3c6e90),_0x21e0e7=!![]);}}for(const [_0x178fa9,_0x1f005b]of _0x24d302){const _0x5b69d8=_0x28931b['get'](_0x178fa9);if(!_0x5b69d8)continue;for(const _0x37fe6 of _0x1f005b){if(_0x37fe6['conditionType']!==_0x506e0b(0x1de)||typeof _0x37fe6[_0x506e0b(0x201)]!==_0x506e0b(0x129))continue;for(const [_0x2f7f72,_0x26a5c1]of _0xcadf79){expressionReferencesVariable(_0x37fe6['expression'],_0x2f7f72)&&!_0x5b69d8[_0x506e0b(0x18b)](_0x26a5c1)&&_0x469838[_0x506e0b(0x1fb)]({'path':(_0x298619[_0x506e0b(0x1e3)](_0x37fe6)??_0x506e0b(0x193))+'.expression','message':_0x506e0b(0x212)+_0x2f7f72+',\x20but\x20node\x20'+_0x26a5c1+'\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20'+_0x178fa9+'.'});}}}}function a287_0x2794(_0x1ecf13,_0x540b67){_0x1ecf13=_0x1ecf13-0xfa;const _0x429382=a287_0x4293();let _0x279430=_0x429382[_0x1ecf13];return _0x279430;}function expressionReferencesVariable(_0x24271d,_0x2f0491){const _0x3f3764=a287_0x42ed67;let _0xb32e21=0x0;while(_0xb32e21<_0x24271d[_0x3f3764(0x16c)]){const _0x281fff=_0x24271d[_0xb32e21];if(_0x281fff==='\x27'||_0x281fff==='\x22'){_0xb32e21=skipQuotedExpressionSegment(_0x24271d,_0xb32e21,_0x281fff);continue;}if(!/[A-Za-z_]/[_0x3f3764(0x240)](_0x281fff)){_0xb32e21+=0x1;continue;}const _0x4a1d9f=_0xb32e21;_0xb32e21+=0x1;while(_0xb32e21<_0x24271d[_0x3f3764(0x16c)]&&/[A-Za-z0-9_]/['test'](_0x24271d[_0xb32e21])){_0xb32e21+=0x1;}if(_0x24271d['slice'](_0x4a1d9f,_0xb32e21)!==_0x2f0491)continue;let _0x3e6d83=_0x4a1d9f-0x1;while(_0x3e6d83>=0x0&&/\s/['test'](_0x24271d[_0x3e6d83])){_0x3e6d83-=0x1;}if(_0x24271d[_0x3e6d83]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x5528e3,_0x31060f,_0x26e604){const _0x33f1ec=a287_0x42ed67;let _0x33cb75=_0x31060f+0x1;while(_0x33cb75<_0x5528e3[_0x33f1ec(0x16c)]){if(_0x5528e3[_0x33cb75]==='\x5c'){_0x33cb75+=0x2;continue;}if(_0x5528e3[_0x33cb75]===_0x26e604)return _0x33cb75+0x1;_0x33cb75+=0x1;}return _0x33cb75;}function resolveEffectiveResultVariable(_0x48525f,_0x48ce4e){const _0xd596ff=a287_0x42ed67;if(_0x48525f===undefined||_0x48525f===null||_0x48ce4e&&_0x48525f==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x48525f!==_0xd596ff(0x129)||!VARIABLE_PATTERN['test'](_0x48525f)||RESERVED_RESULT_VARIABLES['has'](_0x48525f)||_0x48525f[_0xd596ff(0x16e)]('approval_sys_'))return undefined;return _0x48525f;}function registerResultVariableOwner(_0x1adfbe,_0x2d7327,_0x16ddb1,_0x59e6c6){const _0x142222=a287_0x42ed67;if(_0x1adfbe[_0x142222(0x18b)](_0x2d7327)){_0x59e6c6[_0x142222(0x1fb)]({'path':'flowJson.nodes','message':_0x142222(0x1e1)+_0x2d7327+'.'});return;}_0x1adfbe[_0x142222(0x237)](_0x2d7327,_0x16ddb1);}function setsEqual(_0x195c40,_0x348a21){const _0x4ca7b2=a287_0x42ed67;return _0x195c40[_0x4ca7b2(0x21d)]===_0x348a21[_0x4ca7b2(0x21d)]&&[..._0x195c40]['every'](_0x56107e=>_0x348a21['has'](_0x56107e));}function isValidUserId(_0x34a972){const _0x2ad2b7=a287_0x42ed67;if(typeof _0x34a972===_0x2ad2b7(0x129))return _0x34a972[_0x2ad2b7(0x1dd)]()['length']>0x0;return Number[_0x2ad2b7(0x1ae)](_0x34a972)&&Number(_0x34a972)>0x0;}function resolveEdgeEndpoint(_0xb3cac,_0x42902a){const _0x3884ef=a287_0x42ed67;if(typeof _0xb3cac===_0x3884ef(0x129)&&_0xb3cac[_0x3884ef(0x1dd)]())return _0xb3cac[_0x3884ef(0x1dd)]();if(typeof _0x42902a==='string'&&_0x42902a[_0x3884ef(0x1dd)]())return _0x42902a[_0x3884ef(0x1dd)]();return undefined;}function removeEmptyMetadata(_0x551e3e,_0x320be7,_0x57d9e3,_0x2bd202){const _0x2dc2a7=a287_0x42ed67;if(Array[_0x2dc2a7(0x186)](_0x551e3e)){_0x551e3e['forEach']((_0x4fe9c7,_0xa47a0)=>removeEmptyMetadata(_0x4fe9c7,_0x320be7+'['+_0xa47a0+']',_0x57d9e3,_0x2bd202));return;}if(!isRecord(_0x551e3e))return;for(const [_0x5d7098,_0x562482]of Object[_0x2dc2a7(0x25e)](_0x551e3e)){const _0x160b0f=_0x320be7+'.'+_0x5d7098;if(_0x5d7098===_0x2dc2a7(0x250)&&isEmptyJsonValue(_0x562482)){delete _0x551e3e[_0x5d7098],_0x2bd202['push'](_0x160b0f),_0x57d9e3[_0x2dc2a7(0x1fb)]({'code':'empty_metadata_removed','path':_0x160b0f,'message':_0x160b0f+_0x2dc2a7(0x15d)});continue;}removeEmptyMetadata(_0x562482,_0x160b0f,_0x57d9e3,_0x2bd202);}}function isEmptyJsonValue(_0x5ee825){const _0x3e7f2a=a287_0x42ed67;if(_0x5ee825===null||_0x5ee825===undefined)return!![];if(typeof _0x5ee825===_0x3e7f2a(0x129))return _0x5ee825[_0x3e7f2a(0x1dd)]()==='';if(Array[_0x3e7f2a(0x186)](_0x5ee825))return _0x5ee825['length']===0x0;return isRecord(_0x5ee825)&&Object[_0x3e7f2a(0x188)](_0x5ee825)[_0x3e7f2a(0x16c)]===0x0;}function isRecord(_0x5b123b){const _0x2d4f2f=a287_0x42ed67;return typeof _0x5b123b===_0x2d4f2f(0x241)&&_0x5b123b!==null&&!Array[_0x2d4f2f(0x186)](_0x5b123b);}function cloneJsonValue(_0x127a49){const _0x58f05d=a287_0x42ed67;return JSON[_0x58f05d(0x15f)](JSON[_0x58f05d(0x157)](_0x127a49));}export async function readFlowConfigFile(_0x1c7247){const _0x437ca8=await readFile(resolve(_0x1c7247),'utf8');return JSON['parse'](_0x437ca8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a288_0x19ee56=a288_0x2cc1;(function(_0x33c054,_0x2809a3){const _0x40a1e6=a288_0x2cc1,_0x53da08=_0x33c054();while(!![]){try{const _0x171d95=parseInt(_0x40a1e6(0x1ac))/0x1*(-parseInt(_0x40a1e6(0x1d3))/0x2)+parseInt(_0x40a1e6(0x1bf))/0x3*(-parseInt(_0x40a1e6(0x199))/0x4)+-parseInt(_0x40a1e6(0x1d2))/0x5+parseInt(_0x40a1e6(0x1c9))/0x6*(parseInt(_0x40a1e6(0x192))/0x7)+-parseInt(_0x40a1e6(0x1b8))/0x8+-parseInt(_0x40a1e6(0x1d1))/0x9*(-parseInt(_0x40a1e6(0x1a4))/0xa)+parseInt(_0x40a1e6(0x1a1))/0xb*(parseInt(_0x40a1e6(0x1ca))/0xc);if(_0x171d95===_0x2809a3)break;else _0x53da08['push'](_0x53da08['shift']());}catch(_0xa95792){_0x53da08['push'](_0x53da08['shift']());}}}(a288_0x45d9,0xe0a2e));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';function a288_0x45d9(){const _0x47f3ec=['113QNlZFF','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','force','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','policyRoot','allow','decode','rules','code','utf8','pid','defaults','8490296YJYdvv','policy.json','includes','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','instant_api_policy_json_invalid','string','Review\x20the\x20file\x20before\x20retrying.','6LiTnOp','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','unchanged','instantApi','object','trim','overwritten','instant_api_policy_file_unwritable','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_file_invalid','6vqOilM','2664beEpzJ','instant_api_policy_file_missing','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','version','instant_api_policy_file_unreadable','instant_api_policy_file_too_large','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','935433fcgZQt','1895195WcDuBz','20066PzgFzP','instant_api_policy_rules_invalid','3060743ifXpPa','length','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','EEXIST','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_version_invalid','policyFilePath','2144172ChduEV','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','catch','isArray','.tmp','Policy\x20defaults.instantApi\x20is\x20required.','instant_api_policy_app_code_invalid','byteLength','173690MDQNZJ','parse','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','60auhWCE','instant_api_policy_file_exists','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','stringify','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','utf-8','appCode','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20'];a288_0x45d9=function(){return _0x47f3ec;};return a288_0x45d9();}import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT='.rabetbase/instant-api-policy';export const INSTANT_API_POLICY_FILE_NAME=a288_0x19ee56(0x1b9);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x227888,_0xc909e2,_0x53fa81){return new CliError(_0x227888,0x1,_0xc909e2,_0x53fa81);}export function loadInstantApiPolicyLocalConfig(_0x507f64,_0x4de7d8){assertSafeAppCode(_0x507f64);const _0x969514=resolve(_0x4de7d8??findProjectRootDirectory()),_0x11c5db=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x507f64+'/'+INSTANT_API_POLICY_FILE_NAME,_0x301dca=resolve(_0x969514,INSTANT_API_POLICY_RELATIVE_ROOT,_0x507f64),_0xf021ca=resolve(_0x301dca,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x969514,'appCode':_0x507f64,'policyRoot':_0x301dca,'policyFilePath':_0xf021ca,'policyRelativePath':_0x11c5db};}export function createDefaultInstantApiPolicyConfig(_0x57f8de,_0x35688f=a288_0x19ee56(0x1b1)){return assertSafeAppCode(_0x57f8de),{'version':'2','appCode':_0x57f8de,'defaults':{'instantApi':_0x35688f},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0xe20ef0){const _0x9c1d08=a288_0x19ee56;let _0x133530;try{_0x133530=await stat(_0xe20ef0[_0x9c1d08(0x198)]);}catch(_0x584e49){throw instantApiPolicyError(_0x9c1d08(0x1cb),_0x9c1d08(0x1ab)+_0xe20ef0[_0x9c1d08(0x198)],_0x9c1d08(0x1d0));}if(!_0x133530['isFile']())throw instantApiPolicyError(_0x9c1d08(0x1c8),_0x9c1d08(0x1a3)+_0xe20ef0[_0x9c1d08(0x198)]);if(_0x133530['size']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x9c1d08(0x1cf),_0x9c1d08(0x1ad));let _0x3e1b44;try{_0x3e1b44=await readFile(_0xe20ef0['policyFilePath']);}catch{throw instantApiPolicyError(_0x9c1d08(0x1ce),'Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'+_0xe20ef0[_0x9c1d08(0x198)]);}if(_0x3e1b44[_0x9c1d08(0x1a0)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x9c1d08(0x1ad));let _0x1c4d4a;try{_0x1c4d4a=new TextDecoder(_0x9c1d08(0x1a9),{'fatal':!![],'ignoreBOM':!![]})[_0x9c1d08(0x1b2)](_0x3e1b44);}catch{throw instantApiPolicyError(_0x9c1d08(0x1c8),_0x9c1d08(0x1cc)+_0xe20ef0[_0x9c1d08(0x198)]);}let _0x9d9baa;try{_0x9d9baa=JSON[_0x9c1d08(0x1a2)](_0x1c4d4a);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0x9c1d08(0x1bb)+_0xe20ef0[_0x9c1d08(0x198)]);}return assertLocalPolicyContract(_0x9d9baa,_0xe20ef0[_0x9c1d08(0x1aa)]);}export async function writeInstantApiPolicyConfigFile(_0x23243a,_0x4a6232,_0x42ed75={}){const _0x1e49fe=a288_0x19ee56,_0x5d0361=assertLocalPolicyContract(_0x4a6232,_0x23243a[_0x1e49fe(0x1aa)]),_0x751ed9=JSON[_0x1e49fe(0x1a7)](_0x5d0361,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x751ed9,_0x1e49fe(0x1b5))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1e49fe(0x1cf),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');await mkdir(_0x23243a[_0x1e49fe(0x1b0)],{'recursive':!![]});let _0x3c743d;try{_0x3c743d=await readFile(_0x23243a['policyFilePath'],_0x1e49fe(0x1b5));}catch(_0x3e9206){if(!isMissingFile(_0x3e9206))throw instantApiPolicyError(_0x1e49fe(0x1ce),_0x1e49fe(0x194)+_0x23243a[_0x1e49fe(0x198)]);}if(_0x3c743d===_0x751ed9)return{'action':_0x1e49fe(0x1c1),'filePath':_0x23243a[_0x1e49fe(0x198)]};if(_0x3c743d!==undefined&&!_0x42ed75[_0x1e49fe(0x1ae)])throw instantApiPolicyError(_0x1e49fe(0x1a5),_0x1e49fe(0x1c0)+_0x23243a[_0x1e49fe(0x198)],_0x1e49fe(0x1af));if(_0x3c743d===undefined)try{return await writeFile(_0x23243a['policyFilePath'],_0x751ed9,{'encoding':_0x1e49fe(0x1b5),'flag':'wx'}),{'action':'created','filePath':_0x23243a[_0x1e49fe(0x198)]};}catch(_0x299878){if(!isAlreadyExists(_0x299878))throw instantApiPolicyError(_0x1e49fe(0x1c6),_0x1e49fe(0x1a6)+_0x23243a[_0x1e49fe(0x198)]);if(!_0x42ed75['force'])throw instantApiPolicyError(_0x1e49fe(0x1a5),_0x1e49fe(0x1a8)+_0x23243a['policyFilePath'],_0x1e49fe(0x1be));}const _0x5c74b6=resolve(dirname(_0x23243a[_0x1e49fe(0x198)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x1e49fe(0x1b6)]+'.'+randomUUID()+_0x1e49fe(0x19d));try{await writeFile(_0x5c74b6,_0x751ed9,{'encoding':_0x1e49fe(0x1b5),'flag':'wx'}),await rename(_0x5c74b6,_0x23243a['policyFilePath']);}catch{await unlink(_0x5c74b6)[_0x1e49fe(0x19b)](()=>undefined);throw instantApiPolicyError(_0x1e49fe(0x1c6),_0x1e49fe(0x196)+_0x23243a[_0x1e49fe(0x198)]);}return{'action':_0x1e49fe(0x1c5),'filePath':_0x23243a[_0x1e49fe(0x198)]};}function assertSafeAppCode(_0x4159e2){const _0x5e37a4=a288_0x19ee56,_0x506744=_0x4159e2[_0x5e37a4(0x1c4)]();if(!_0x506744||_0x506744!==_0x4159e2||_0x506744[_0x5e37a4(0x193)]>0x64||_0x506744==='.'||_0x506744==='..'||_0x506744[_0x5e37a4(0x1ba)]('/')||_0x506744['includes']('\x5c')||_0x506744[_0x5e37a4(0x1ba)]('\x00'))throw instantApiPolicyError(_0x5e37a4(0x19f),_0x5e37a4(0x1c7));}function assertLocalPolicyContract(_0x4055bf,_0x20150b){const _0x5c59bc=a288_0x19ee56;if(!isObject(_0x4055bf))throw instantApiPolicyError(_0x5c59bc(0x1bc),'Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x4055bf['version']!=='1'&&_0x4055bf[_0x5c59bc(0x1cd)]!=='2')throw instantApiPolicyError(_0x5c59bc(0x197),_0x5c59bc(0x19a),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x4055bf[_0x5c59bc(0x1aa)]!==_0x20150b)throw instantApiPolicyError('instant_api_policy_app_code_mismatch','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x20150b+'.');if(!isObject(_0x4055bf['defaults'])||typeof _0x4055bf[_0x5c59bc(0x1b7)][_0x5c59bc(0x1c2)]!==_0x5c59bc(0x1bd))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x5c59bc(0x19e));if(_0x4055bf['rules']!==undefined&&_0x4055bf['rules']!==null&&!Array[_0x5c59bc(0x19c)](_0x4055bf[_0x5c59bc(0x1b3)]))throw instantApiPolicyError(_0x5c59bc(0x191),'Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.');return _0x4055bf;}function a288_0x2cc1(_0x356583,_0x4af705){_0x356583=_0x356583-0x191;const _0x45d9f8=a288_0x45d9();let _0x2cc1c2=_0x45d9f8[_0x356583];return _0x2cc1c2;}function isObject(_0x5377d1){const _0x5c06a4=a288_0x19ee56;return _0x5377d1!==null&&typeof _0x5377d1===_0x5c06a4(0x1c3)&&!Array[_0x5c06a4(0x19c)](_0x5377d1);}function isMissingFile(_0x2529b8){const _0x1961d4=a288_0x19ee56;return Boolean(_0x2529b8&&typeof _0x2529b8===_0x1961d4(0x1c3)&&_0x2529b8[_0x1961d4(0x1b4)]==='ENOENT');}function isAlreadyExists(_0x33658b){const _0x334d92=a288_0x19ee56;return Boolean(_0x33658b&&typeof _0x33658b==='object'&&_0x33658b[_0x334d92(0x1b4)]===_0x334d92(0x195));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a284_0x14a355=a284_0x338d;(function(_0x4eed81,_0x126f67){const _0xfdd0db=a284_0x338d,_0x3e0597=_0x4eed81();while(!![]){try{const _0x2643aa=parseInt(_0xfdd0db(0x158))/0x1*(-parseInt(_0xfdd0db(0x16c))/0x2)+parseInt(_0xfdd0db(0x18b))/0x3+parseInt(_0xfdd0db(0x14c))/0x4+parseInt(_0xfdd0db(0x163))/0x5+-parseInt(_0xfdd0db(0x194))/0x6*(-parseInt(_0xfdd0db(0x17c))/0x7)+-parseInt(_0xfdd0db(0x159))/0x8+-parseInt(_0xfdd0db(0x14e))/0x9*(-parseInt(_0xfdd0db(0x18f))/0xa);if(_0x2643aa===_0x126f67)break;else _0x3e0597['push'](_0x3e0597['shift']());}catch(_0xf3c66e){_0x3e0597['push'](_0x3e0597['shift']());}}}(a284_0x3bdf,0x56712));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a284_0x14a355(0x197),a284_0x14a355(0x16b),a284_0x14a355(0x15e),a284_0x14a355(0x190),a284_0x14a355(0x19b),a284_0x14a355(0x18d)],HIT_KEYS=[a284_0x14a355(0x145),a284_0x14a355(0x18c),a284_0x14a355(0x184),a284_0x14a355(0x18a),a284_0x14a355(0x164),a284_0x14a355(0x189),a284_0x14a355(0x161),a284_0x14a355(0x154),'rawScore',a284_0x14a355(0x17d),a284_0x14a355(0x17e)];export function normalizeKbServiceOrigin(_0x2ab3e9){const _0x2573ba=a284_0x14a355,_0x565f77=()=>CliErrors[_0x2573ba(0x153)](_0x2573ba(0x176)),_0x31ac8e=_0x2ab3e9?.[_0x2573ba(0x14f)]();if(!_0x31ac8e||/[\u0000-\u0020\u007f]/[_0x2573ba(0x193)](_0x31ac8e)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x2573ba(0x193)](_0x31ac8e))throw _0x565f77();let _0x4c6c7e;try{_0x4c6c7e=new URL(_0x31ac8e);}catch{throw _0x565f77();}if(_0x4c6c7e[_0x2573ba(0x192)]!==_0x2573ba(0x178)||!_0x4c6c7e[_0x2573ba(0x172)]||_0x4c6c7e[_0x2573ba(0x18e)]||_0x4c6c7e[_0x2573ba(0x173)]||_0x4c6c7e[_0x2573ba(0x170)]!=='/'||_0x4c6c7e[_0x2573ba(0x19c)]||_0x4c6c7e[_0x2573ba(0x182)])throw _0x565f77();return _0x4c6c7e[_0x2573ba(0x15c)];}export async function searchDirectKnowledge(_0x1638a2){const _0x22bfc8=a284_0x14a355,_0x24044c=_0x1638a2[_0x22bfc8(0x15d)]['trim'](),_0x3ab6c5=_0x1638a2[_0x22bfc8(0x14b)][_0x22bfc8(0x14f)]();if(!_0x24044c)throw CliErrors[_0x22bfc8(0x153)](_0x22bfc8(0x17b));if(!_0x1638a2[_0x22bfc8(0x14a)][_0x22bfc8(0x14f)]())throw CliErrors[_0x22bfc8(0x162)]();if(!_0x3ab6c5)throw CliErrors[_0x22bfc8(0x153)](_0x22bfc8(0x171));validateTopK(_0x1638a2['topK']);const _0x565980=normalizeKbServiceOrigin(_0x1638a2[_0x22bfc8(0x169)]),_0x34e0b6=AbortSignal[_0x22bfc8(0x148)](0xea60),_0x2751ea=_0x1638a2[_0x22bfc8(0x147)]?AbortSignal['any']([_0x1638a2[_0x22bfc8(0x147)],_0x34e0b6]):_0x34e0b6;let _0x597a27;try{_0x597a27=await fetch(_0x565980+_0x22bfc8(0x181)+encodeURIComponent(_0x24044c)+'/knowledge/search',{'method':_0x22bfc8(0x160),'redirect':'error','headers':{'Content-Type':'application/json','Cookie':_0x1638a2[_0x22bfc8(0x14a)],'X-Invoke-Source':_0x22bfc8(0x174)},'body':JSON[_0x22bfc8(0x188)]({'query':_0x3ab6c5,..._0x1638a2['topK']!==undefined?{'topK':_0x1638a2[_0x22bfc8(0x157)]}:{}}),'signal':_0x2751ea});}catch(_0x4d44af){if(_0x1638a2[_0x22bfc8(0x147)]?.[_0x22bfc8(0x14d)])throw new DOMException(_0x22bfc8(0x191),_0x22bfc8(0x151));if(_0x4d44af instanceof Error&&_0x4d44af['name']==='TimeoutError')throw CliErrors['networkError'](_0x22bfc8(0x15b));throw CliErrors['networkError']('KB\x20Service\x20knowledge\x20search\x20request\x20failed.');}if(_0x597a27[_0x22bfc8(0x180)]===0x191)throw CliErrors['authRequired']();if(_0x597a27['status']===0x1ad)throw CliErrors[_0x22bfc8(0x17f)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x597a27['ok'])throw CliErrors[_0x22bfc8(0x17f)]('KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'+_0x597a27['status']+').');if(!hasNoStore(_0x597a27['headers']))throw CliErrors[_0x22bfc8(0x17f)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x597a27[_0x22bfc8(0x19a)][_0x22bfc8(0x16a)](_0x22bfc8(0x199))??'')[_0x22bfc8(0x156)]()[_0x22bfc8(0x19e)](_0x22bfc8(0x168)))throw CliErrors['apiError'](_0x22bfc8(0x187));let _0x3328a3;try{_0x3328a3=await _0x597a27[_0x22bfc8(0x155)]();}catch(_0x3b0587){if(_0x1638a2[_0x22bfc8(0x147)]?.[_0x22bfc8(0x14d)])throw new DOMException(_0x22bfc8(0x191),_0x22bfc8(0x151));if(_0x34e0b6[_0x22bfc8(0x14d)]||_0x3b0587 instanceof Error&&_0x3b0587['name']===_0x22bfc8(0x152))throw CliErrors[_0x22bfc8(0x198)](_0x22bfc8(0x15b));throw CliErrors['apiError'](_0x22bfc8(0x16e));}try{const _0x3fbff3=requireExactRecord(_0x3328a3,[_0x22bfc8(0x190),_0x22bfc8(0x19b),_0x22bfc8(0x18d)],'response');if(!Array['isArray'](_0x3fbff3[_0x22bfc8(0x190)]))throw invalidContract(_0x22bfc8(0x190));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x22bfc8(0x167),'total':_0x3fbff3[_0x22bfc8(0x190)]['length'],'hits':_0x3fbff3[_0x22bfc8(0x190)],'strategyFingerprint':_0x3fbff3[_0x22bfc8(0x19b)],'timingsMs':_0x3fbff3['timingsMs']},_0x1638a2[_0x22bfc8(0x157)]??0xa);}catch(_0x5e5748){if(_0x5e5748 instanceof CliError)throw CliErrors[_0x22bfc8(0x17f)](_0x22bfc8(0x149));throw _0x5e5748;}}function validateTopK(_0x1a06b0){const _0x5e5270=a284_0x14a355;if(_0x1a06b0!==undefined&&(!Number[_0x5e5270(0x195)](_0x1a06b0)||_0x1a06b0<0x1||_0x1a06b0>0x32))throw CliErrors[_0x5e5270(0x153)]('Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');}function a284_0x338d(_0x1930ef,_0x3f70c8){_0x1930ef=_0x1930ef-0x145;const _0x3bdffc=a284_0x3bdf();let _0x338d63=_0x3bdffc[_0x1930ef];return _0x338d63;}function hasNoStore(_0x5ad713){const _0x4a54f6=a284_0x14a355;return(_0x5ad713[_0x4a54f6(0x16a)](_0x4a54f6(0x16f))??'')[_0x4a54f6(0x15f)](',')[_0x4a54f6(0x186)](_0xd0825a=>_0xd0825a[_0x4a54f6(0x14f)]()[_0x4a54f6(0x156)]()==='no-store');}function parseDevelopmentSearchResponse(_0x2c4f52,_0x37598c){const _0xbbd0e6=a284_0x14a355,_0x2da629=requireExactRecord(_0x2c4f52,RESPONSE_KEYS,_0xbbd0e6(0x17a));if(_0x2da629['schemaVersion']!==0x2||_0x2da629[_0xbbd0e6(0x16b)]!==_0xbbd0e6(0x167))throw invalidContract('profile');if(!Array[_0xbbd0e6(0x16d)](_0x2da629[_0xbbd0e6(0x190)])||_0x2da629[_0xbbd0e6(0x190)][_0xbbd0e6(0x165)]>(_0x37598c??0x32))throw invalidContract(_0xbbd0e6(0x190));if(typeof _0x2da629[_0xbbd0e6(0x19b)]!==_0xbbd0e6(0x185)||!/^sha256:[0-9a-f]{64}$/['test'](_0x2da629[_0xbbd0e6(0x19b)]))throw invalidContract(_0xbbd0e6(0x19b));const _0x1622b2=requireRecord(_0x2da629[_0xbbd0e6(0x18d)],'timingsMs'),_0x4eefdd={};for(const [_0x4ae7df,_0x17bebb]of Object['entries'](_0x1622b2)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xbbd0e6(0x193)](_0x4ae7df)||typeof _0x17bebb!==_0xbbd0e6(0x177)||!Number['isFinite'](_0x17bebb)||_0x17bebb<0x0)throw invalidContract(_0xbbd0e6(0x18d));_0x4eefdd[_0x4ae7df]=_0x17bebb;}const _0xfd002c=_0x2da629[_0xbbd0e6(0x190)]['map']((_0xfbb4f4,_0x571076)=>parseHit(_0xfbb4f4,_0x571076));if(!Number[_0xbbd0e6(0x195)](_0x2da629[_0xbbd0e6(0x15e)])||_0x2da629['total']!==_0xfd002c[_0xbbd0e6(0x165)])throw invalidContract(_0xbbd0e6(0x15e));return{'schemaVersion':_0x2da629[_0xbbd0e6(0x197)],'profile':_0x2da629[_0xbbd0e6(0x16b)],'total':_0x2da629[_0xbbd0e6(0x15e)],'strategyFingerprint':_0x2da629[_0xbbd0e6(0x19b)],'timingsMs':_0x4eefdd,'hits':_0xfd002c};}function parseHit(_0x34434d,_0x213286){const _0x54c29c=a284_0x14a355,_0x4e939b=requireExactRecord(_0x34434d,HIT_KEYS,'hits['+_0x213286+']'),_0x450c3d=_0x3c2f5d=>{const _0x3616ac=a284_0x338d,_0xb93a6a=_0x4e939b[_0x3c2f5d];if(typeof _0xb93a6a!==_0x3616ac(0x185)||!_0xb93a6a)throw invalidContract(_0x3c2f5d);return _0xb93a6a;};if(!Number[_0x54c29c(0x195)](_0x4e939b['revision'])||_0x4e939b[_0x54c29c(0x18c)]<0x1)throw invalidContract(_0x54c29c(0x18c));if(_0x4e939b[_0x54c29c(0x18a)]!==_0x54c29c(0x196)&&_0x4e939b[_0x54c29c(0x18a)]!==_0x54c29c(0x183))throw invalidContract(_0x54c29c(0x18a));if(typeof _0x4e939b[_0x54c29c(0x164)]!==_0x54c29c(0x185)||typeof _0x4e939b[_0x54c29c(0x189)]!==_0x54c29c(0x185))throw invalidContract(_0x54c29c(0x189));if(!Array['isArray'](_0x4e939b[_0x54c29c(0x161)])||_0x4e939b[_0x54c29c(0x161)][_0x54c29c(0x186)](_0x48f18a=>typeof _0x48f18a!=='string'))throw invalidContract(_0x54c29c(0x161));if(!Number[_0x54c29c(0x195)](_0x4e939b[_0x54c29c(0x154)])||_0x4e939b[_0x54c29c(0x154)]!==_0x213286+0x1)throw invalidContract(_0x54c29c(0x154));if(!isFiniteNumber(_0x4e939b['rawScore'])||!isFiniteNumber(_0x4e939b[_0x54c29c(0x17d)]))throw invalidContract(_0x54c29c(0x166));return{'documentId':_0x450c3d(_0x54c29c(0x145)),'revision':_0x4e939b[_0x54c29c(0x18c)],'chunkId':_0x450c3d(_0x54c29c(0x184)),'scope':_0x4e939b[_0x54c29c(0x18a)],'title':_0x4e939b['title'],'text':_0x4e939b[_0x54c29c(0x189)],'tags':[..._0x4e939b[_0x54c29c(0x161)]],'rank':_0x4e939b[_0x54c29c(0x154)],'rawScore':_0x4e939b['rawScore'],'finalScore':_0x4e939b[_0x54c29c(0x17d)],'scoreKind':_0x450c3d(_0x54c29c(0x17e))};}function requireExactRecord(_0x59a549,_0x40614d,_0x2c5c88){const _0x2f1205=a284_0x14a355,_0x25473d=requireRecord(_0x59a549,_0x2c5c88),_0x6ca0a3=Object[_0x2f1205(0x15a)](_0x25473d)[_0x2f1205(0x175)](),_0x101c31=[..._0x40614d][_0x2f1205(0x175)]();if(_0x6ca0a3['length']!==_0x101c31[_0x2f1205(0x165)]||_0x6ca0a3[_0x2f1205(0x186)]((_0xa6ff0e,_0x57e9b9)=>_0xa6ff0e!==_0x101c31[_0x57e9b9]))throw invalidContract(_0x2c5c88);return _0x25473d;}function a284_0x3bdf(){const _0x32fb75=['username','30gVcFXA','hits','Knowledge\x20search\x20cancelled.','protocol','test','6hoTFWT','isSafeInteger','public','schemaVersion','networkError','content-type','headers','strategyFingerprint','search','\x20contract.','includes','documentId','object','signal','timeout','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','cookie','query','1285068mlvOeg','aborted','224244HclZUM','trim','isFinite','AbortError','TimeoutError','validation','rank','json','toLowerCase','topK','65383sudCfH','2764520ZfauYG','keys','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','origin','appCode','total','split','POST','tags','authRequired','1766175kenspX','title','length','score','development','application/json','serviceUrl','get','profile','8LeIYCb','isArray','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','cache-control','pathname','Knowledge\x20search\x20query\x20is\x20required.','hostname','password','cli:rabetbase','sort','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','number','https:','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','response','Knowledge\x20search\x20appCode\x20is\x20required.','1440782YHbcIj','finalScore','scoreKind','apiError','status','/v2/development/apps/','hash','company','chunkId','string','some','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','stringify','text','scope','18261EZKZXI','revision','timingsMs'];a284_0x3bdf=function(){return _0x32fb75;};return a284_0x3bdf();}function requireRecord(_0x3f39c8,_0x126e7d){const _0x3e5a69=a284_0x14a355;if(!_0x3f39c8||typeof _0x3f39c8!==_0x3e5a69(0x146)||Array[_0x3e5a69(0x16d)](_0x3f39c8))throw invalidContract(_0x126e7d);return _0x3f39c8;}function isFiniteNumber(_0x599285){const _0x4f45c3=a284_0x14a355;return typeof _0x599285==='number'&&Number[_0x4f45c3(0x150)](_0x599285);}function invalidContract(_0x5ec168){const _0x11f1e7=a284_0x14a355;return CliErrors[_0x11f1e7(0x17f)](_0x11f1e7(0x179)+_0x5ec168+_0x11f1e7(0x19d));}
|
|
1
|
+
const a289_0x1df4cf=a289_0x11c9;function a289_0x11c9(_0xe7f1cb,_0x38c8bc){_0xe7f1cb=_0xe7f1cb-0x11f;const _0x13de66=a289_0x13de();let _0x11c9a4=_0x13de66[_0xe7f1cb];return _0x11c9a4;}(function(_0x42d8c8,_0x3c2004){const _0x5ad8e8=a289_0x11c9,_0x491962=_0x42d8c8();while(!![]){try{const _0x320aa3=parseInt(_0x5ad8e8(0x164))/0x1*(-parseInt(_0x5ad8e8(0x161))/0x2)+parseInt(_0x5ad8e8(0x14c))/0x3*(parseInt(_0x5ad8e8(0x16b))/0x4)+parseInt(_0x5ad8e8(0x15a))/0x5+-parseInt(_0x5ad8e8(0x131))/0x6+-parseInt(_0x5ad8e8(0x16f))/0x7+-parseInt(_0x5ad8e8(0x159))/0x8*(-parseInt(_0x5ad8e8(0x142))/0x9)+-parseInt(_0x5ad8e8(0x134))/0xa*(-parseInt(_0x5ad8e8(0x145))/0xb);if(_0x320aa3===_0x3c2004)break;else _0x491962['push'](_0x491962['shift']());}catch(_0xf07ff5){_0x491962['push'](_0x491962['shift']());}}}(a289_0x13de,0x6a1f6));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x1df4cf(0x15c),a289_0x1df4cf(0x15d),'total','hits',a289_0x1df4cf(0x143),a289_0x1df4cf(0x173)],HIT_KEYS=[a289_0x1df4cf(0x171),a289_0x1df4cf(0x12f),a289_0x1df4cf(0x150),a289_0x1df4cf(0x15e),a289_0x1df4cf(0x165),a289_0x1df4cf(0x170),a289_0x1df4cf(0x154),a289_0x1df4cf(0x16d),'rawScore',a289_0x1df4cf(0x14f),'scoreKind'];export function normalizeKbServiceOrigin(_0x4eb303){const _0x335053=a289_0x1df4cf,_0x5d3e4d=()=>CliErrors[_0x335053(0x127)](_0x335053(0x125)),_0x3bb0fb=_0x4eb303?.[_0x335053(0x148)]();if(!_0x3bb0fb||/[\u0000-\u0020\u007f]/[_0x335053(0x178)](_0x3bb0fb)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x335053(0x178)](_0x3bb0fb))throw _0x5d3e4d();let _0x330910;try{_0x330910=new URL(_0x3bb0fb);}catch{throw _0x5d3e4d();}if(_0x330910[_0x335053(0x15f)]!==_0x335053(0x153)||!_0x330910['hostname']||_0x330910[_0x335053(0x132)]||_0x330910[_0x335053(0x15b)]||_0x330910[_0x335053(0x158)]!=='/'||_0x330910[_0x335053(0x157)]||_0x330910[_0x335053(0x130)])throw _0x5d3e4d();return _0x330910[_0x335053(0x168)];}export async function searchDirectKnowledge(_0x25dccb){const _0x336401=a289_0x1df4cf,_0x30f732=_0x25dccb[_0x336401(0x155)][_0x336401(0x148)](),_0x5ad898=_0x25dccb[_0x336401(0x12c)][_0x336401(0x148)]();if(!_0x30f732)throw CliErrors[_0x336401(0x127)](_0x336401(0x12b));if(!_0x25dccb[_0x336401(0x16a)][_0x336401(0x148)]())throw CliErrors['authRequired']();if(!_0x5ad898)throw CliErrors['validation']('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x25dccb[_0x336401(0x14e)]);const _0x5d9ea1=normalizeKbServiceOrigin(_0x25dccb[_0x336401(0x137)]),_0x5288d8=AbortSignal[_0x336401(0x13b)](0xea60),_0x168105=_0x25dccb[_0x336401(0x152)]?AbortSignal[_0x336401(0x122)]([_0x25dccb[_0x336401(0x152)],_0x5288d8]):_0x5288d8;let _0x58c646;try{_0x58c646=await fetch(_0x5d9ea1+'/v2/development/apps/'+encodeURIComponent(_0x30f732)+'/knowledge/search',{'method':_0x336401(0x139),'redirect':_0x336401(0x175),'headers':{'Content-Type':_0x336401(0x13d),'Cookie':_0x25dccb[_0x336401(0x16a)],'X-Invoke-Source':'cli:rabetbase'},'body':JSON[_0x336401(0x16c)]({'query':_0x5ad898,..._0x25dccb[_0x336401(0x14e)]!==undefined?{'topK':_0x25dccb[_0x336401(0x14e)]}:{}}),'signal':_0x168105});}catch(_0x4943e9){if(_0x25dccb[_0x336401(0x152)]?.[_0x336401(0x120)])throw new DOMException(_0x336401(0x147),_0x336401(0x149));if(_0x4943e9 instanceof Error&&_0x4943e9['name']===_0x336401(0x160))throw CliErrors[_0x336401(0x13f)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x336401(0x13f)](_0x336401(0x12a));}if(_0x58c646['status']===0x191)throw CliErrors[_0x336401(0x126)]();if(_0x58c646['status']===0x1ad)throw CliErrors[_0x336401(0x141)](_0x336401(0x14d));if(!_0x58c646['ok'])throw CliErrors[_0x336401(0x141)](_0x336401(0x129)+_0x58c646[_0x336401(0x174)]+').');if(!hasNoStore(_0x58c646[_0x336401(0x13c)]))throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x58c646['headers'][_0x336401(0x179)](_0x336401(0x163))??'')[_0x336401(0x162)]()['includes']('application/json'))throw CliErrors[_0x336401(0x141)](_0x336401(0x140));let _0x4fdfa3;try{_0x4fdfa3=await _0x58c646[_0x336401(0x133)]();}catch(_0x1f773d){if(_0x25dccb[_0x336401(0x152)]?.[_0x336401(0x120)])throw new DOMException(_0x336401(0x147),'AbortError');if(_0x5288d8[_0x336401(0x120)]||_0x1f773d instanceof Error&&_0x1f773d[_0x336401(0x12e)]===_0x336401(0x160))throw CliErrors[_0x336401(0x13f)](_0x336401(0x166));throw CliErrors[_0x336401(0x141)]('KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}try{const _0x5dc917=requireExactRecord(_0x4fdfa3,[_0x336401(0x176),_0x336401(0x143),'timingsMs'],_0x336401(0x177));if(!Array[_0x336401(0x156)](_0x5dc917['hits']))throw invalidContract(_0x336401(0x176));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x336401(0x14a),'total':_0x5dc917[_0x336401(0x176)][_0x336401(0x167)],'hits':_0x5dc917[_0x336401(0x176)],'strategyFingerprint':_0x5dc917['strategyFingerprint'],'timingsMs':_0x5dc917[_0x336401(0x173)]},_0x25dccb[_0x336401(0x14e)]??0xa);}catch(_0x23782e){if(_0x23782e instanceof CliError)throw CliErrors['apiError'](_0x336401(0x121));throw _0x23782e;}}function validateTopK(_0x42cf18){const _0x7cd4a5=a289_0x1df4cf;if(_0x42cf18!==undefined&&(!Number[_0x7cd4a5(0x172)](_0x42cf18)||_0x42cf18<0x1||_0x42cf18>0x32))throw CliErrors[_0x7cd4a5(0x127)](_0x7cd4a5(0x144));}function a289_0x13de(){const _0x4a8115=['chunkId','object','signal','https:','tags','appCode','isArray','search','pathname','232OpIrCl','926720VdhvMc','password','schemaVersion','profile','scope','protocol','TimeoutError','2HfjTnQ','toLowerCase','content-type','670974XLgCfg','title','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','length','origin','cache-control','cookie','4QWsyRH','stringify','rank','hits[','1061774EArNaO','text','documentId','isSafeInteger','timingsMs','status','error','hits','response','test','get','isFinite','aborted','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','any','split','rawScore','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','authRequired','validation','no-store','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','Knowledge\x20search\x20appCode\x20is\x20required.','query','string','name','revision','hash','3408456WsSWUt','username','json','910790MeyGSU','total','map','serviceUrl','\x20contract.','POST','scoreKind','timeout','headers','application/json','entries','networkError','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','apiError','228564iPUQbv','strategyFingerprint','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','11jeGfsC','some','Knowledge\x20search\x20cancelled.','trim','AbortError','development','sort','2437509kKIfnv','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','topK','finalScore'];a289_0x13de=function(){return _0x4a8115;};return a289_0x13de();}function hasNoStore(_0x589b1c){const _0x1acd59=a289_0x1df4cf;return(_0x589b1c[_0x1acd59(0x179)](_0x1acd59(0x169))??'')[_0x1acd59(0x123)](',')[_0x1acd59(0x146)](_0x5c4489=>_0x5c4489[_0x1acd59(0x148)]()[_0x1acd59(0x162)]()===_0x1acd59(0x128));}function parseDevelopmentSearchResponse(_0x1f74f2,_0x20ac59){const _0x50fe4b=a289_0x1df4cf,_0x125da4=requireExactRecord(_0x1f74f2,RESPONSE_KEYS,_0x50fe4b(0x177));if(_0x125da4['schemaVersion']!==0x2||_0x125da4[_0x50fe4b(0x15d)]!==_0x50fe4b(0x14a))throw invalidContract(_0x50fe4b(0x15d));if(!Array['isArray'](_0x125da4[_0x50fe4b(0x176)])||_0x125da4[_0x50fe4b(0x176)][_0x50fe4b(0x167)]>(_0x20ac59??0x32))throw invalidContract('hits');if(typeof _0x125da4['strategyFingerprint']!==_0x50fe4b(0x12d)||!/^sha256:[0-9a-f]{64}$/['test'](_0x125da4['strategyFingerprint']))throw invalidContract('strategyFingerprint');const _0x53764f=requireRecord(_0x125da4[_0x50fe4b(0x173)],_0x50fe4b(0x173)),_0xd090fb={};for(const [_0x4f7b59,_0xd88340]of Object[_0x50fe4b(0x13e)](_0x53764f)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x50fe4b(0x178)](_0x4f7b59)||typeof _0xd88340!=='number'||!Number[_0x50fe4b(0x11f)](_0xd88340)||_0xd88340<0x0)throw invalidContract(_0x50fe4b(0x173));_0xd090fb[_0x4f7b59]=_0xd88340;}const _0x1a902c=_0x125da4['hits'][_0x50fe4b(0x136)]((_0x1c0a3e,_0x431654)=>parseHit(_0x1c0a3e,_0x431654));if(!Number['isSafeInteger'](_0x125da4['total'])||_0x125da4[_0x50fe4b(0x135)]!==_0x1a902c[_0x50fe4b(0x167)])throw invalidContract('total');return{'schemaVersion':_0x125da4['schemaVersion'],'profile':_0x125da4[_0x50fe4b(0x15d)],'total':_0x125da4[_0x50fe4b(0x135)],'strategyFingerprint':_0x125da4[_0x50fe4b(0x143)],'timingsMs':_0xd090fb,'hits':_0x1a902c};}function parseHit(_0x25ac5c,_0x43c344){const _0x2c49ec=a289_0x1df4cf,_0x279716=requireExactRecord(_0x25ac5c,HIT_KEYS,_0x2c49ec(0x16e)+_0x43c344+']'),_0x555a4b=_0x28aeb1=>{const _0x4b42bc=_0x2c49ec,_0x24994d=_0x279716[_0x28aeb1];if(typeof _0x24994d!==_0x4b42bc(0x12d)||!_0x24994d)throw invalidContract(_0x28aeb1);return _0x24994d;};if(!Number[_0x2c49ec(0x172)](_0x279716[_0x2c49ec(0x12f)])||_0x279716[_0x2c49ec(0x12f)]<0x1)throw invalidContract('revision');if(_0x279716['scope']!=='public'&&_0x279716[_0x2c49ec(0x15e)]!=='company')throw invalidContract(_0x2c49ec(0x15e));if(typeof _0x279716['title']!==_0x2c49ec(0x12d)||typeof _0x279716[_0x2c49ec(0x170)]!==_0x2c49ec(0x12d))throw invalidContract(_0x2c49ec(0x170));if(!Array[_0x2c49ec(0x156)](_0x279716[_0x2c49ec(0x154)])||_0x279716['tags'][_0x2c49ec(0x146)](_0xcdcc88=>typeof _0xcdcc88!=='string'))throw invalidContract(_0x2c49ec(0x154));if(!Number[_0x2c49ec(0x172)](_0x279716[_0x2c49ec(0x16d)])||_0x279716[_0x2c49ec(0x16d)]!==_0x43c344+0x1)throw invalidContract(_0x2c49ec(0x16d));if(!isFiniteNumber(_0x279716[_0x2c49ec(0x124)])||!isFiniteNumber(_0x279716[_0x2c49ec(0x14f)]))throw invalidContract('score');return{'documentId':_0x555a4b(_0x2c49ec(0x171)),'revision':_0x279716[_0x2c49ec(0x12f)],'chunkId':_0x555a4b(_0x2c49ec(0x150)),'scope':_0x279716['scope'],'title':_0x279716[_0x2c49ec(0x165)],'text':_0x279716['text'],'tags':[..._0x279716[_0x2c49ec(0x154)]],'rank':_0x279716['rank'],'rawScore':_0x279716['rawScore'],'finalScore':_0x279716[_0x2c49ec(0x14f)],'scoreKind':_0x555a4b(_0x2c49ec(0x13a))};}function requireExactRecord(_0x4d9aa1,_0x13d788,_0x23dc0d){const _0x178f20=a289_0x1df4cf,_0x35fd7c=requireRecord(_0x4d9aa1,_0x23dc0d),_0x119c33=Object['keys'](_0x35fd7c)['sort'](),_0x580d13=[..._0x13d788][_0x178f20(0x14b)]();if(_0x119c33[_0x178f20(0x167)]!==_0x580d13['length']||_0x119c33[_0x178f20(0x146)]((_0x329c2f,_0x3e69ff)=>_0x329c2f!==_0x580d13[_0x3e69ff]))throw invalidContract(_0x23dc0d);return _0x35fd7c;}function requireRecord(_0x532583,_0x2e1010){const _0x3f435f=a289_0x1df4cf;if(!_0x532583||typeof _0x532583!==_0x3f435f(0x151)||Array[_0x3f435f(0x156)](_0x532583))throw invalidContract(_0x2e1010);return _0x532583;}function isFiniteNumber(_0x263809){const _0x2c4688=a289_0x1df4cf;return typeof _0x263809==='number'&&Number[_0x2c4688(0x11f)](_0x263809);}function invalidContract(_0x1575bb){const _0x171d8c=a289_0x1df4cf;return CliErrors[_0x171d8c(0x141)]('SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20'+_0x1575bb+_0x171d8c(0x138));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ea2aa,_0xe2d1cf){const _0x3dc8f0=a290_0x22ac,_0x556e7f=_0x2ea2aa();while(!![]){try{const _0x29b713=-parseInt(_0x3dc8f0(0x198))/0x1*(-parseInt(_0x3dc8f0(0x18d))/0x2)+parseInt(_0x3dc8f0(0x18a))/0x3+parseInt(_0x3dc8f0(0x193))/0x4+parseInt(_0x3dc8f0(0x194))/0x5*(parseInt(_0x3dc8f0(0x187))/0x6)+-parseInt(_0x3dc8f0(0x18b))/0x7*(parseInt(_0x3dc8f0(0x188))/0x8)+-parseInt(_0x3dc8f0(0x183))/0x9+-parseInt(_0x3dc8f0(0x180))/0xa;if(_0x29b713===_0xe2d1cf)break;else _0x556e7f['push'](_0x556e7f['shift']());}catch(_0x94192d){_0x556e7f['push'](_0x556e7f['shift']());}}}(a290_0x529e,0xdae7b));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x20c7f8,_0x141502=process['cwd']()){const _0x412f70=a290_0x22ac,_0x289668=resolve(_0x141502),_0x4b0c11=join(_0x289668,'.rabetbase','page');return{'projectRoot':_0x289668,'pagesBaseDir':_0x4b0c11,'appPagesDir':join(_0x4b0c11,_0x20c7f8),'lockFilePath':join(_0x289668,_0x412f70(0x189),_0x412f70(0x18f))};}export function buildPageFileName(_0x28d3ef,_0x4a0473){const _0x33053e=a290_0x22ac;return _0x28d3ef+'-'+_0x4a0473[_0x33053e(0x18e)]()+_0x33053e(0x181);}function a290_0x22ac(_0x2f7492,_0x3ab336){_0x2f7492=_0x2f7492-0x17f;const _0x529e96=a290_0x529e();let _0x22ac7a=_0x529e96[_0x2f7492];return _0x22ac7a;}function a290_0x529e(){const _0xe4cf67=['12dKLrUC','14301088wyzltE','.rabetbase','1250526XAhCSE','7qTkbIv','flagMissing','8dEsZWO','toUpperCase','page.lock.json','localeCompare','appPagesDir','split','4054424HNMdsi','3664410pfDLic','validation','Unsupported\x20file\x20in\x20page\x20directory:\x20','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','349603xNThPK','trim','name','page-dir','9590660VTvwgi','.json','utf8','5861583gcHYAy','isDirectory','F_OK','sort'];a290_0x529e=function(){return _0xe4cf67;};return a290_0x529e();}export function resolvePageFilePath(_0x44e909,_0xeb8fc3,_0x239e88){const _0x46e870=a290_0x22ac;return join(_0x44e909[_0x46e870(0x191)],buildPageFileName(_0xeb8fc3,_0x239e88));}export async function ensureParentDirectory(_0x8c3a03){await mkdir(dirname(_0x8c3a03),{'recursive':!![]});}export async function fileExists(_0x454d65){const _0x3167bd=a290_0x22ac;try{return await access(_0x454d65,constants[_0x3167bd(0x185)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x12127a){const _0x21a8be=a290_0x22ac,_0x4c6e05=_0x12127a[_0x21a8be(0x199)]();if(!_0x4c6e05)throw CliErrors[_0x21a8be(0x18c)](_0x21a8be(0x17f));const _0x54fa4f=resolve(_0x4c6e05);let _0x82a34a;try{_0x82a34a=await lstat(_0x54fa4f);}catch{throw CliErrors[_0x21a8be(0x195)]('Page\x20directory\x20not\x20found:\x20'+_0x4c6e05);}if(!_0x82a34a[_0x21a8be(0x184)]())throw CliErrors[_0x21a8be(0x195)](_0x21a8be(0x197)+_0x4c6e05);const _0x3510bb={};return await readDirectory(_0x54fa4f,_0x54fa4f,_0x3510bb),_0x3510bb;}async function readDirectory(_0x3b9014,_0x3e5059,_0x3bc4a9){const _0x199143=a290_0x22ac,_0x23f552=await readdir(_0x3e5059,{'withFileTypes':!![]});for(const _0x7c9c13 of _0x23f552[_0x199143(0x186)]((_0x116671,_0x489510)=>_0x116671[_0x199143(0x19a)][_0x199143(0x190)](_0x489510[_0x199143(0x19a)]))){const _0x67b601=join(_0x3e5059,_0x7c9c13['name']);if(_0x7c9c13[_0x199143(0x184)]()){await readDirectory(_0x3b9014,_0x67b601,_0x3bc4a9);continue;}if(!_0x7c9c13['isFile']())throw CliErrors[_0x199143(0x195)](_0x199143(0x196)+_0x67b601);_0x3bc4a9[relative(_0x3b9014,_0x67b601)[_0x199143(0x192)](sep)['join']('/')]=await readFile(_0x67b601,_0x199143(0x182));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a291_0x2b0b(_0x5aeb23,_0x115b84){_0x5aeb23=_0x5aeb23-0xe6;const _0x27fba1=a291_0x27fb();let _0x2b0bfa=_0x27fba1[_0x5aeb23];return _0x2b0bfa;}(function(_0x2389f2,_0x1822dc){const _0x836c8a=a291_0x2b0b,_0x594831=_0x2389f2();while(!![]){try{const _0x18a534=-parseInt(_0x836c8a(0xef))/0x1+parseInt(_0x836c8a(0xed))/0x2+parseInt(_0x836c8a(0xf0))/0x3+-parseInt(_0x836c8a(0xeb))/0x4+parseInt(_0x836c8a(0xe6))/0x5+-parseInt(_0x836c8a(0xf1))/0x6*(-parseInt(_0x836c8a(0xee))/0x7)+-parseInt(_0x836c8a(0xe9))/0x8;if(_0x18a534===_0x1822dc)break;else _0x594831['push'](_0x594831['shift']());}catch(_0x17e3e7){_0x594831['push'](_0x594831['shift']());}}}(a291_0x27fb,0x6bd1f));import a291_0x3989fd from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x16c78b){const _0x540408=a291_0x2b0b;return JSON[_0x540408(0xec)](JSON[_0x540408(0xea)](_0x16c78b),null,0x2)+'\x0a';}export function computePageContentHash(_0x4e05d0){const _0x108d3c=a291_0x2b0b;return a291_0x3989fd['createHash'](_0x108d3c(0xf2))[_0x108d3c(0xe8)](_0x4e05d0)[_0x108d3c(0xe7)]('hex');}export function computeSerializedSchemaHash(_0x2d7e91){return computePageContentHash(serializePageSchemaForFile(_0x2d7e91));}export async function computePageFileHash(_0x48e83d){const _0x1008d3=await readFile(_0x48e83d,'utf8');return computePageContentHash(_0x1008d3);}function a291_0x27fb(){const _0x54b380=['105574ZCfNYE','798900IZjkXu','473808shhUaB','186xeGrVz','md5','2323155eIOtEO','digest','update','148816EgiWIz','parse','2338788ddTDUD','stringify','1507442TXuktx'];a291_0x27fb=function(){return _0x54b380;};return a291_0x27fb();}
|