@lovrabet/rabetbase-cli 2.5.4-beta.4 → 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 +15 -0
- 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 +21 -12
- 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.manifest.json +8 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a282_0x2222(){const _0x38777f=['INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','.failurePolicy','flowName','9reNkSh','FIXED\x20assignee\x20requires\x20userIds.','.expression','NOTIFICATION\x20node\x20requires\x20config.','get','conditionType','message','cc.recipientUserIds\x20supports\x20at\x20most\x20','.async','replace','.configCode','.scriptName','approval_sys_initiatorUserId','pageId\x20must\x20be\x20a\x20non-negative\x20integer.','.timeout.resultVariable','INDEPENDENT_FLOW','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','CONDITION','Duplicate\x20BPMN\x20element\x20id:\x20','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','result','approval_sys_processInstanceId','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','.value','parse','.recipients','.cc.recipientUserIds[','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','approvalMode','nodes\x20must\x20be\x20an\x20array.','template','value\x20must\x20be\x20a\x20non-empty\x20string.','edges','\x20facts.','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','Unsupported\x20approval\x20mode:\x20','EXECUTE_BFF','name','detailMarkdown','.approvalMode','defaultFlow','^[A-Za-z_][A-Za-z0-9_]*$','delete','recipientUserIds','pageMode','array','scriptName','FIXED','variables','Notification\x20recipients\x20must\x20be\x20an\x20array.','approval.simple-flow.v1','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','Notification\x20recipient\x20must\x20be\x20an\x20object.','flowJson\x20must\x20be\x20an\x20object.','mode','bindDatasetCode','version','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','metadata','failurePolicy','value','.url','Edge\x20target\x20node\x20not\x20found:\x20','schemaVersion','Node\x20has\x20no\x20outgoing\x20edge.','2435870eEeZXE','AUTO_APPROVE','recipients','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.assignee.userIds[',',\x20but\x20node\x20','Notification\x20template.','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','1469615pBHkls','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','.assignee.roleId','edge\x20target\x20is\x20required.','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','6efGqov','#/$defs/position','formDefinitions','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','Notification\x20action.url\x20is\x20required.','templateName','.text','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.assignee.strategy','number','flowJson.nodes','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','\x20was\x20empty\x20and\x20was\x20removed.','edge\x20source\x20is\x20required.','defaultFlow\x20must\x20be\x20a\x20boolean.','AUTO_REJECT','appCode','.timeout','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','indexOf','.template','type','585957HLNoMT','Unsupported\x20schemaVersion:\x20','assignee','timeout\x20must\x20be\x20an\x20object.','.version','keys','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','flowJson.startPageId','utf8','add','size','START','.cc.visible','\x20->\x20','MINUTES','.timeout.duration','Notification\x20fact.','isSafeInteger','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.','call','Duplicate\x20value:\x20','length','every','.cc.recipientUserIds','position.','.resultVariable','overwrite','forEach','PLATFORM_FORM','boolean','unit','text','sourceNodeId','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','has','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','includes','timeout.interrupting\x20must\x20be\x20a\x20boolean.','END','map','.target','NaN','edges\x20must\x20be\x20an\x20array.','startsWith','NOTIFICATION\x20node\x20requires\x20template.','.cc','transferCandidates','.source','toUpperCase','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','target','.tmp','flowJson.','.timeout.action','Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.','roleId','interrupting','.timeout.scriptName','approval_sys_operationType','flowDesc','context','Edge\x20source\x20node\x20not\x20found:\x20','CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.','flowJson.startPath','pid','slice','approval_sys_datasetCode','200RqLqLm','APPROVAL','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','.id','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','Unsupported\x20pageMode:\x20','DAYS','Duplicate\x20cc\x20recipient\x20userId:\x20','Duplicate\x20resultVariable:\x20','131540JyQQIu','approval_sys_pageId','.conditionType','.facts','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','14765RCEHjU','flowType','filter','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','Notification\x20template\x20supports\x20at\x20most\x20','FAIL','Every\x20node\x20requires\x20a\x20non-empty\x20name.','SCRIPT','HANDLE','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','cc\x20must\x20be\x20an\x20object.','USER','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','role','].taskMode','expression','url','integer','FORM_FLOW','configCode','.transferCandidates.userIds','waypoint.','SECONDS','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','targetNodeId','.cc.readSources','https://json-schema.org/draft/2020-12/schema','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','retryInterval','failurePolicy\x20must\x20be\x20a\x20string.','Unsupported\x20notification\x20version:\x20','flowKey','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','startPath\x20must\x20be\x20a\x20non-empty\x20string.','value\x20must\x20be\x20an\x20array.','timeout.enabled\x20must\x20be\x20a\x20boolean.','warnings','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','retryCount','flowJson.nodes.','async\x20must\x20be\x20an\x20object.','config','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','catch','object','#/$defs/userId','isInteger','SINGLE','Duplicate\x20edge\x20route:\x20','readSources','some','REJECTED','approval_sys_','ROLE','.waypoints','.role','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','isArray','https://lovrabet.com/schema/rabetbase-flow-config.json','transferCandidates\x20must\x20be\x20an\x20object.','empty_metadata_removed','strategy','flowName\x20is\x20required.','legacy_field_removed','datasetCode\x20must\x20be\x20a\x20string.','Node\x20has\x20no\x20incoming\x20edge.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','nodes','approval_sys_dataId','pageId','ANY','path','APPROVED','NOTIFICATION','Notification\x20action.text\x20is\x20required.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','action','Notification\x20fact\x20must\x20be\x20an\x20object.','actions','.async.retryInterval','stringify','timeout','prototype','userIds','Notification\x20template.facts\x20must\x20be\x20an\x20array.','test','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','470352ejWJvq','#/$defs/timeAmount','.path','.assignee.userIds','flowJson.schemaVersion','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','.type','1998096qZIBpz','taskMode','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','flowJson.edges','event','.taskMode','.transferCandidates.userIds[','flowDesc\x20must\x20be\x20a\x20string.','formSchema','formPermission','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','Notification\x20action\x20must\x20be\x20an\x20object.','string','flowJson.pageMode','.actions','CUSTOM_PAGE','.unit','Node\x20is\x20not\x20reachable\x20from\x20START.','^[1-9][0-9]*$','.pageId','Notification\x20recipient.type\x20is\x20required.','.name','sequential','trim','\x20must\x20be\x20a\x20finite\x20number.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','.defaultFlow','startPageId','async','ALWAYS','enabled','label','.transferCandidates.strategy','push','resultVariable','hasOwnProperty','HOURS','scriptResult','startPath','edge\x20must\x20be\x20an\x20object.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','findIndex','Notification\x20template.actions\x20must\x20be\x20an\x20array.','.timeout.interrupting','position','.position.','.\x20This\x20CLI\x20supports\x20only\x20','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','waypoints','flowJson','.async.enabled','datasetCode','\x20actions.','isFinite','.detailMarkdown','source','ALL','EXPRESSION','Unsupported\x20condition\x20type:\x20','flowJson.nodes[','set','.waypoints[','entries'];a282_0x2222=function(){return _0x38777f;};return a282_0x2222();}const a282_0x44ca9e=a282_0x58dc;(function(_0x1fbedd,_0x328008){const _0x54e919=a282_0x58dc,_0x57b1c2=_0x1fbedd();while(!![]){try{const _0x402ad2=-parseInt(_0x54e919(0x1b5))/0x1+parseInt(_0x54e919(0xb3))/0x2+parseInt(_0x54e919(0x164))/0x3+parseInt(_0x54e919(0x1aa))/0x4*(parseInt(_0x54e919(0x1ba))/0x5)+-parseInt(_0x54e919(0x14d))/0x6*(-parseInt(_0x54e919(0x148))/0x7)+-parseInt(_0x54e919(0xba))/0x8*(parseInt(_0x54e919(0xff))/0x9)+-parseInt(_0x54e919(0x140))/0xa;if(_0x402ad2===_0x328008)break;else _0x57b1c2['push'](_0x57b1c2['shift']());}catch(_0x19acf4){_0x57b1c2['push'](_0x57b1c2['shift']());}}}(a282_0x2222,0x27d81));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_0x44ca9e(0x1d5),'$id':a282_0x44ca9e(0x1f8),'title':'Rabetbase\x20FlowConfig','type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0xfe),a282_0x44ca9e(0x1bb),'flowJson'],'$defs':{'userId':{'anyOf':[{'type':a282_0x44ca9e(0xc7),'minLength':0x1},{'type':a282_0x44ca9e(0x1cb),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a282_0x44ca9e(0x157),'minimum':0x0},'y':{'type':a282_0x44ca9e(0x157),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':'object','required':[a282_0x44ca9e(0x13b),'unit'],'properties':{'value':{'type':a282_0x44ca9e(0x1cb),'minimum':0x1},'unit':{'enum':[a282_0x44ca9e(0x1d0),a282_0x44ca9e(0x173),a282_0x44ca9e(0xe0),a282_0x44ca9e(0x1b2)]}},'additionalProperties':!![]},'flowNode':{'type':a282_0x44ca9e(0x1ea),'required':['id',a282_0x44ca9e(0x163),'name',a282_0x44ca9e(0xe9)],'properties':{'id':{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0x128)},'type':{'enum':[a282_0x44ca9e(0x170),a282_0x44ca9e(0x18c),'APPROVAL',a282_0x44ca9e(0x110),a282_0x44ca9e(0x1c1),'NOTIFICATION']},'name':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'path':{'type':'string','minLength':0x1},'position':{'$ref':a282_0x44ca9e(0x14e)},'approvalMode':{'enum':[a282_0x44ca9e(0x1ed),a282_0x44ca9e(0xf5),a282_0x44ca9e(0xa2)]},'taskMode':{'enum':[a282_0x44ca9e(0x1ab),a282_0x44ca9e(0x1c2)]},'assignee':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0x1fb)],'properties':{'strategy':{'enum':[a282_0x44ca9e(0x12e),a282_0x44ca9e(0x1f3)]},'userIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':a282_0x44ca9e(0x1eb)}},'roleId':{'anyOf':[{'type':a282_0x44ca9e(0x1cb),'minimum':0x1},{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0xcd)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a282_0x44ca9e(0x1fb),a282_0x44ca9e(0xaf)],'properties':{'strategy':{'const':a282_0x44ca9e(0x12e)},'userIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':a282_0x44ca9e(0x1eb)}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1)]},'scriptName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'resultVariable':{'type':a282_0x44ca9e(0xc7),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':'object','properties':{'enabled':{'type':a282_0x44ca9e(0x183)},'retryCount':{'type':a282_0x44ca9e(0x1cb),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a282_0x44ca9e(0xb4)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a282_0x44ca9e(0x183)},'duration':{'$ref':a282_0x44ca9e(0xb4)},'action':{'enum':[a282_0x44ca9e(0x141),a282_0x44ca9e(0x15d),'EXECUTE_BFF']},'interrupting':{'type':a282_0x44ca9e(0x183)},'scriptName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'resultVariable':{'type':a282_0x44ca9e(0xc7),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'}},'additionalProperties':!![]},'cc':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0x12a)],'properties':{'recipientUserIds':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'visible':{'type':a282_0x44ca9e(0x12c),'uniqueItems':!![],'items':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':['configCode','template'],'properties':{'version':{'enum':['v1']},'configCode':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE',a282_0x44ca9e(0x1bf)]},'template':{'type':a282_0x44ca9e(0x1ea),'required':['title','summary'],'properties':{'title':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'summary':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'detailMarkdown':{'type':a282_0x44ca9e(0xc7)},'facts':{'type':'array','maxItems':0x8,'items':{'type':a282_0x44ca9e(0x1ea),'required':[a282_0x44ca9e(0xdb),a282_0x44ca9e(0x13b)],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a282_0x44ca9e(0x12c),'maxItems':0x2,'items':{'type':'object','required':[a282_0x44ca9e(0x185),a282_0x44ca9e(0x1ca)],'properties':{'text':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'url':{'type':a282_0x44ca9e(0xc7),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a282_0x44ca9e(0x12c),'items':{'type':'object','required':[a282_0x44ca9e(0x163),a282_0x44ca9e(0x13b)],'properties':{'type':{'enum':['USER',a282_0x44ca9e(0x1f3),'EMAIL']},'value':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'role':{'enum':['TO','CC','BCC']}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a282_0x44ca9e(0x1ea),'properties':{'id':{'type':a282_0x44ca9e(0xc7),'pattern':a282_0x44ca9e(0x128)},'source':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'target':{'type':'string','minLength':0x1},'sourceNodeId':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':[a282_0x44ca9e(0xd9),a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1),a282_0x44ca9e(0xf6)]},'expression':{'type':a282_0x44ca9e(0xc7)},'defaultFlow':{'type':'boolean'},'name':{'type':a282_0x44ca9e(0xc7)},'waypoints':{'type':a282_0x44ca9e(0x12c),'items':{'$ref':a282_0x44ca9e(0x14e)}}},'allOf':[{'anyOf':[{'required':[a282_0x44ca9e(0xf4)]},{'required':[a282_0x44ca9e(0x186)]}]},{'anyOf':[{'required':['target']},{'required':[a282_0x44ca9e(0x1d3)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'flowDesc':{'type':a282_0x44ca9e(0xc7)},'flowType':{'enum':[a282_0x44ca9e(0x1cc),a282_0x44ca9e(0x10e)]},'datasetCode':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'pageId':{'type':a282_0x44ca9e(0x1cb)},'templateName':![],'flowJson':{'type':'object','required':['nodes','edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':a282_0x44ca9e(0xc7),'const':'approval.simple-flow.v1','description':a282_0x44ca9e(0x16a)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a282_0x44ca9e(0xca)},'startPageId':![],'startPath':{'type':a282_0x44ca9e(0xc7),'minLength':0x1},'nodes':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':'#/$defs/flowNode'}},'edges':{'type':a282_0x44ca9e(0x12c),'minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode',a282_0x44ca9e(0xfe),a282_0x44ca9e(0x136),a282_0x44ca9e(0xf0),a282_0x44ca9e(0x15e),'pageId','templateName'],REMOVED_ROOT_FIELDS=['id',a282_0x44ca9e(0x15e),a282_0x44ca9e(0x152)],DEFAULT_FLOW_SCHEMA_VERSION=a282_0x44ca9e(0x131),NODE_TYPES=new Set([a282_0x44ca9e(0x170),a282_0x44ca9e(0x18c),a282_0x44ca9e(0x1ab),'CONDITION',a282_0x44ca9e(0x1c1),a282_0x44ca9e(0xa5)]),CONDITION_TYPES=new Set(['ALWAYS',a282_0x44ca9e(0xa4),a282_0x44ca9e(0x1f1),a282_0x44ca9e(0xf6)]),APPROVAL_MODES=new Set([a282_0x44ca9e(0x1ed),'ALL',a282_0x44ca9e(0xa2)]),APPROVAL_TASK_MODES=new Set([a282_0x44ca9e(0x1ab),'HANDLE']),FLOW_TIME_UNITS=new Set(['SECONDS',a282_0x44ca9e(0x173),'HOURS',a282_0x44ca9e(0x1b2)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a282_0x44ca9e(0x141),'AUTO_REJECT',a282_0x44ca9e(0x123)]),FLOW_TYPES=new Set([a282_0x44ca9e(0x1cc),a282_0x44ca9e(0x10e)]),FLOW_PAGE_MODES=new Set([a282_0x44ca9e(0xca),a282_0x44ca9e(0x182)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set(['CONTINUE',a282_0x44ca9e(0x1bf)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a282_0x44ca9e(0x1c5),a282_0x44ca9e(0x1f3),'EMAIL']),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_0x44ca9e(0xe1),UNSUPPORTED_FORM_MESSAGE='Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.',UNSUPPORTED_PLATFORM_FORM_MESSAGE=a282_0x44ca9e(0x198),RESERVED_RESULT_VARIABLES=new Set(['formData','approved','approval_sys_appCode',a282_0x44ca9e(0x114),a282_0x44ca9e(0x10b),'approval_sys_initiatorUsername',a282_0x44ca9e(0x1a9),a282_0x44ca9e(0x1b6),a282_0x44ca9e(0x1a1),a282_0x44ca9e(0xa0)]);export function normalizeFlowConfig(_0x1a6b2b){const _0x32dd02=a282_0x44ca9e;if(!isRecord(_0x1a6b2b))throw new TypeError('FlowConfig\x20must\x20be\x20a\x20JSON\x20object.');const _0xa83fea=cloneJsonValue(_0x1a6b2b),_0x5b0cb0=_0xa83fea[_0x32dd02(0xee)],_0x546436=isRecord(_0x5b0cb0)?cloneJsonValue(_0x5b0cb0):{},_0x350418=[],_0x8afb47=[];for(const _0x47ff01 of REMOVED_ROOT_FIELDS){if(!Object['prototype'][_0x32dd02(0xdf)][_0x32dd02(0x179)](_0xa83fea,_0x47ff01))continue;delete _0xa83fea[_0x47ff01],_0x8afb47[_0x32dd02(0xdd)](_0x47ff01),_0x350418[_0x32dd02(0xdd)]({'code':_0x32dd02(0x1fd),'path':_0x47ff01,'message':_0x47ff01+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x299d14 of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype']['hasOwnProperty']['call'](_0x546436,_0x299d14))continue;const _0x4aa000=_0x32dd02(0x19b)+_0x299d14;delete _0x546436[_0x299d14],_0x8afb47[_0x32dd02(0xdd)](_0x4aa000),_0x350418[_0x32dd02(0xdd)]({'code':'legacy_field_removed','path':_0x4aa000,'message':_0x4aa000+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}if(Object[_0x32dd02(0xae)]['hasOwnProperty']['call'](_0x546436,'schemaVersion')){const _0x41d63a=_0x546436['schemaVersion'],_0x3b943b=typeof _0x41d63a===_0x32dd02(0xc7)?_0x41d63a[_0x32dd02(0xd2)]():_0x41d63a;if(isEmptyJsonValue(_0x41d63a)||_0x3b943b===DEFAULT_FLOW_SCHEMA_VERSION){const _0x448990=_0x32dd02(0xb7);delete _0x546436[_0x32dd02(0x13e)],_0x8afb47['push'](_0x448990),_0x350418[_0x32dd02(0xdd)]({'code':_0x32dd02(0x1fd),'path':_0x448990,'message':_0x448990+_0x32dd02(0x160)+DEFAULT_FLOW_SCHEMA_VERSION+_0x32dd02(0x1c6)});}}removeEmptyMetadata(_0x546436,_0x32dd02(0xee),_0x350418,_0x8afb47);_0xa83fea['flowType']===_0x32dd02(0x10e)&&!Object['prototype'][_0x32dd02(0xdf)]['call'](_0x546436,'pageMode')&&(_0x546436[_0x32dd02(0x12b)]=_0x32dd02(0xca));_0xa83fea[_0x32dd02(0xee)]=_0x546436;if(typeof _0xa83fea[_0x32dd02(0xfe)]==='string')_0xa83fea[_0x32dd02(0xfe)]=_0xa83fea[_0x32dd02(0xfe)][_0x32dd02(0xd2)]();return{'config':_0xa83fea,'warnings':_0x350418,'removedPaths':_0x8afb47};}export function validateFlowConfig(_0x34c344){const _0x204d9c=a282_0x44ca9e;let _0x27d439;try{_0x27d439=normalizeFlowConfig(_0x34c344);}catch(_0x36a913){const _0x5d0cd0=_0x36a913 instanceof Error?_0x36a913[_0x204d9c(0x105)]:String(_0x36a913),_0x1ed424={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x5d0cd0}],'warnings':[],'normalized':_0x1ed424,'validationConfig':_0x1ed424};}const _0x12fbbb=_0x27d439[_0x204d9c(0x1e7)],_0x162cd3=cloneJsonValue(_0x12fbbb),_0x481a46=_0x162cd3[_0x204d9c(0xee)];_0x481a46[_0x204d9c(0x1da)]='__rabetbase_local_validation__',_0x481a46['flowName']=_0x12fbbb[_0x204d9c(0xfe)];typeof _0x12fbbb[_0x204d9c(0xf0)]===_0x204d9c(0xc7)&&_0x12fbbb[_0x204d9c(0xf0)][_0x204d9c(0xd2)]()&&(_0x481a46[_0x204d9c(0x136)]=_0x12fbbb[_0x204d9c(0xf0)][_0x204d9c(0xd2)]());const _0x2a1f3c=[];return validateOuterMetadata(_0x12fbbb,_0x2a1f3c),validateFlowClassification(_0x12fbbb,_0x2a1f3c),validateGraph(_0x12fbbb[_0x204d9c(0xee)],_0x2a1f3c),{'valid':_0x2a1f3c[_0x204d9c(0x17b)]===0x0,'errors':_0x2a1f3c,'warnings':_0x27d439[_0x204d9c(0x1e1)],'normalized':_0x12fbbb,'validationConfig':_0x162cd3};}function validateFlowClassification(_0x46f08b,_0x1e4372){const _0x19d50c=a282_0x44ca9e;if(!isRecord(_0x46f08b[_0x19d50c(0xee)]))return;const _0x514561=_0x46f08b[_0x19d50c(0x1bb)],_0x2b04f2=_0x46f08b[_0x19d50c(0xee)][_0x19d50c(0x12b)];_0x2b04f2!==undefined&&(typeof _0x2b04f2!==_0x19d50c(0xc7)||!FLOW_PAGE_MODES[_0x19d50c(0x188)](_0x2b04f2))&&_0x1e4372[_0x19d50c(0xdd)]({'path':_0x19d50c(0xc8),'message':_0x19d50c(0x1b1)+String(_0x2b04f2)+'.'});_0x514561===_0x19d50c(0x1cc)&&_0x2b04f2!==undefined&&_0x1e4372[_0x19d50c(0xdd)]({'path':'flowJson.pageMode','message':_0x19d50c(0xc4)});_0x514561===_0x19d50c(0x10e)&&_0x2b04f2===_0x19d50c(0x182)&&_0x1e4372[_0x19d50c(0xdd)]({'path':'flowJson.pageMode','message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x514561===_0x19d50c(0x1cc)||_0x514561===_0x19d50c(0x10e))&&validateCustomPageNavigation(_0x46f08b,_0x514561,_0x2b04f2,_0x1e4372);if(_0x514561!==_0x19d50c(0x1cc)||!Array['isArray'](_0x46f08b['flowJson']['nodes']))return;_0x46f08b[_0x19d50c(0xee)][_0x19d50c(0x9f)][_0x19d50c(0x181)]((_0xcfa2c9,_0x48dac0)=>{const _0x3b537b=_0x19d50c;isRecord(_0xcfa2c9)&&_0xcfa2c9['type']===_0x3b537b(0x1ab)&&_0xcfa2c9[_0x3b537b(0xbb)]===_0x3b537b(0x1c2)&&_0x1e4372[_0x3b537b(0xdd)]({'path':'flowJson.nodes['+_0x48dac0+_0x3b537b(0x1c8),'message':_0x3b537b(0xa7)});});}function validateCustomPageNavigation(_0x344448,_0x391fb4,_0x32c1a8,_0x1e418c){const _0x3b02ea=a282_0x44ca9e,_0xf4117=_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0xd7)];_0xf4117!==undefined&&_0x1e418c[_0x3b02ea(0xdd)]({'path':_0x3b02ea(0x16c),'message':_0x3b02ea(0x9e)});const _0x47dabe=_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0xe2)];_0x47dabe!==undefined&&(typeof _0x47dabe!==_0x3b02ea(0xc7)||_0x47dabe[_0x3b02ea(0xd2)]()==='')&&_0x1e418c['push']({'path':'flowJson.startPath','message':_0x3b02ea(0x1de)});const _0x32fcea=Array[_0x3b02ea(0x1f7)](_0x344448['flowJson'][_0x3b02ea(0x9f)])?_0x344448[_0x3b02ea(0xee)][_0x3b02ea(0x9f)][_0x3b02ea(0x18d)]((_0xb0bc1a,_0x9fd931)=>({'node':_0xb0bc1a,'index':_0x9fd931}))[_0x3b02ea(0x1bc)](({node:_0x11b98b})=>isRecord(_0x11b98b)&&_0x11b98b[_0x3b02ea(0xa3)]!==undefined):[],_0x48cae3=_0x47dabe!==undefined||_0x32fcea[_0x3b02ea(0x17b)]>0x0,_0x6c29d8=_0x32c1a8===undefined&&_0x391fb4===_0x3b02ea(0x10e)?'CUSTOM_PAGE':_0x32c1a8;_0x48cae3&&(_0x391fb4!==_0x3b02ea(0x10e)||_0x6c29d8!==_0x3b02ea(0xca))&&(_0x47dabe!==undefined&&_0x1e418c[_0x3b02ea(0xdd)]({'path':_0x3b02ea(0x1a6),'message':_0x3b02ea(0xec)}),_0x32fcea['forEach'](({index:_0x5f0851})=>{const _0x550511=_0x3b02ea;_0x1e418c['push']({'path':_0x550511(0xf8)+_0x5f0851+'].path','message':'node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.'});}));}export async function writeNormalizedFlowConfig(_0x4efa75,_0x50a932,_0x43ff06={}){const _0x240f0b=a282_0x44ca9e,_0x32ee04=resolve(_0x4efa75),_0x2c0a11=_0x32ee04+'.'+process[_0x240f0b(0x1a7)]+'.'+randomUUID()+_0x240f0b(0x19a),_0x300b5d=JSON[_0x240f0b(0xac)](_0x50a932,null,0x2)+'\x0a';let _0x5b1f90;try{try{_0x5b1f90=(await stat(_0x32ee04))[_0x240f0b(0x135)]&0x1ff;}catch{_0x5b1f90=undefined;}await writeFile(_0x2c0a11,_0x300b5d,{'encoding':_0x240f0b(0x16d),'flag':'wx','mode':_0x5b1f90??0x1a4});if(_0x5b1f90!==undefined)await chmod(_0x2c0a11,_0x5b1f90);_0x43ff06[_0x240f0b(0x180)]===![]?(await link(_0x2c0a11,_0x32ee04),await unlink(_0x2c0a11)):await rename(_0x2c0a11,_0x32ee04);}finally{await unlink(_0x2c0a11)[_0x240f0b(0x1e9)](()=>undefined);}}function validateOuterMetadata(_0x183a88,_0x23b78f){const _0x4d360f=a282_0x44ca9e;(typeof _0x183a88[_0x4d360f(0xfe)]!==_0x4d360f(0xc7)||_0x183a88[_0x4d360f(0xfe)][_0x4d360f(0xd2)]()==='')&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xfe),'message':_0x4d360f(0x1fc)});_0x183a88[_0x4d360f(0x1a2)]!==undefined&&typeof _0x183a88['flowDesc']!==_0x4d360f(0xc7)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1a2),'message':_0x4d360f(0xc1)});if(_0x183a88['flowType']===undefined||_0x183a88[_0x4d360f(0x1bb)]===null)_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1bb),'message':'flowType\x20is\x20required.'});else(typeof _0x183a88[_0x4d360f(0x1bb)]!==_0x4d360f(0xc7)||!FLOW_TYPES[_0x4d360f(0x188)](_0x183a88[_0x4d360f(0x1bb)]))&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0x1bb),'message':'Unsupported\x20flowType:\x20'+String(_0x183a88[_0x4d360f(0x1bb)])+'.'});_0x183a88[_0x4d360f(0xf0)]!==undefined&&typeof _0x183a88['datasetCode']!==_0x4d360f(0xc7)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xf0),'message':_0x4d360f(0x9c)}),_0x183a88[_0x4d360f(0xa1)]!==undefined&&(!Number[_0x4d360f(0x1ec)](_0x183a88[_0x4d360f(0xa1)])||_0x183a88['pageId']<0x0)&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xa1),'message':_0x4d360f(0x10c)}),_0x183a88[_0x4d360f(0x1bb)]==='INDEPENDENT_FLOW'&&_0x183a88[_0x4d360f(0xf0)]!==undefined&&_0x23b78f['push']({'path':_0x4d360f(0xf0),'message':_0x4d360f(0xfc)}),_0x183a88[_0x4d360f(0x1bb)]===_0x4d360f(0x10e)&&_0x183a88[_0x4d360f(0xa1)]!==undefined&&_0x23b78f[_0x4d360f(0xdd)]({'path':_0x4d360f(0xa1),'message':_0x4d360f(0x16b)});}function validateGraph(_0x39ff9b,_0x6d3cbb){const _0x2f0cfd=a282_0x44ca9e;if(!isRecord(_0x39ff9b)){_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xee),'message':_0x2f0cfd(0x134)});return;}!Array[_0x2f0cfd(0x1f7)](_0x39ff9b[_0x2f0cfd(0x9f)])&&_0x6d3cbb['push']({'path':_0x2f0cfd(0x158),'message':_0x2f0cfd(0x11c)});!Array['isArray'](_0x39ff9b[_0x2f0cfd(0x11f)])&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xbd),'message':_0x2f0cfd(0x190)});Object[_0x2f0cfd(0xae)][_0x2f0cfd(0xdf)][_0x2f0cfd(0x179)](_0x39ff9b,_0x2f0cfd(0x13e))&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0xb7),'message':_0x2f0cfd(0x165)+String(_0x39ff9b[_0x2f0cfd(0x13e)])+_0x2f0cfd(0xeb)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x594c13 of[_0x2f0cfd(0xc2),_0x2f0cfd(0x14f),'formPermissions']){Object[_0x2f0cfd(0xae)][_0x2f0cfd(0xdf)][_0x2f0cfd(0x179)](_0x39ff9b,_0x594c13)&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':'flowJson.'+_0x594c13,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2f0cfd(0x1f7)](_0x39ff9b['nodes'])||!Array[_0x2f0cfd(0x1f7)](_0x39ff9b[_0x2f0cfd(0x11f)]))return;const _0xe9542a=new Map(),_0x1a4671=[],_0xd48d93=[],_0x44d2f9=new Map(),_0x25b2c1=new Map(),_0x4a7eae=new Set();let _0x3476b5=0x0;_0x39ff9b[_0x2f0cfd(0x9f)][_0x2f0cfd(0x181)]((_0x190fd4,_0xbfb73a)=>{const _0xf472da=_0x2f0cfd,_0x3c9e14=_0xf472da(0xf8)+_0xbfb73a+']';if(!isRecord(_0x190fd4)){_0x6d3cbb['push']({'path':_0x3c9e14,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x3d82a7=_0x190fd4;if(typeof _0x3d82a7['id']!=='string'||!BPMN_ID_PATTERN[_0xf472da(0xb1)](_0x3d82a7['id']))_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+_0xf472da(0x1af),'message':_0xf472da(0x143)});else _0xe9542a[_0xf472da(0x188)](_0x3d82a7['id'])?_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+_0xf472da(0x1af),'message':'Duplicate\x20node\x20id:\x20'+_0x3d82a7['id']+'.'}):(_0xe9542a[_0xf472da(0xf9)](_0x3d82a7['id'],_0x3d82a7),_0x4a7eae['add'](_0x3d82a7['id']));if(!NODE_TYPES['has'](_0x3d82a7['type']))_0x6d3cbb[_0xf472da(0xdd)]({'path':_0x3c9e14+'.type','message':'Unsupported\x20node\x20type:\x20'+String(_0x3d82a7[_0xf472da(0x163)])+'.'});else{if(_0x3d82a7[_0xf472da(0x163)]==='START')_0x1a4671[_0xf472da(0xdd)](_0x3d82a7['id']);else _0x3d82a7['type']===_0xf472da(0x18c)&&_0xd48d93[_0xf472da(0xdd)](_0x3d82a7['id']);}_0x3d82a7[_0xf472da(0x163)]===_0xf472da(0x1ab)&&(_0x3d82a7['taskMode']===undefined||_0x3d82a7[_0xf472da(0xbb)]==='APPROVAL')&&(_0x3476b5+=0x1);validateNode(_0x3d82a7,_0x3c9e14,_0x6d3cbb);if(_0x3d82a7[_0xf472da(0x163)]==='SCRIPT'){const _0x36d259=resolveEffectiveResultVariable(_0x3d82a7[_0xf472da(0xde)],![]);_0x36d259&&(registerResultVariableOwner(_0x25b2c1,_0x36d259,_0x3d82a7['id'],_0x6d3cbb),!_0x44d2f9[_0xf472da(0x188)](_0x36d259)&&_0x44d2f9[_0xf472da(0xf9)](_0x36d259,_0x3d82a7['id']));}if(_0x3d82a7[_0xf472da(0x163)]==='APPROVAL'&&isRecord(_0x3d82a7[_0xf472da(0xad)])&&_0x3d82a7[_0xf472da(0xad)][_0xf472da(0xda)]===!![]&&_0x3d82a7[_0xf472da(0xad)][_0xf472da(0xa8)]===_0xf472da(0x123)){const _0x5e0d94=resolveEffectiveResultVariable(_0x3d82a7[_0xf472da(0xad)]['resultVariable'],!![]);_0x5e0d94&®isterResultVariableOwner(_0x25b2c1,_0x5e0d94,_0x3d82a7['id']+_0xf472da(0x15f),_0x6d3cbb);}});_0x1a4671[_0x2f0cfd(0x17b)]!==0x1&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':_0x2f0cfd(0x158),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0xd48d93[_0x2f0cfd(0x17b)]===0x0&&_0x6d3cbb[_0x2f0cfd(0xdd)]({'path':'flowJson.nodes','message':_0x2f0cfd(0xd4)});const _0x226ddb=new Map(),_0xb5e6dc=new Map(),_0x5cfebb=new Map(),_0x111bf1=new Set();_0x39ff9b[_0x2f0cfd(0x11f)]['forEach']((_0x57211f,_0xfe5934)=>{const _0x154c03=_0x2f0cfd,_0x249c61='flowJson.edges['+_0xfe5934+']';if(!isRecord(_0x57211f)){_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61,'message':_0x154c03(0xe3)});return;}const _0xc34e99=_0x57211f;_0x5cfebb[_0x154c03(0xf9)](_0xc34e99,_0x249c61);const _0x509e11=resolveEdgeEndpoint(_0xc34e99[_0x154c03(0xf4)],_0xc34e99[_0x154c03(0x186)]),_0x234a2a=resolveEdgeEndpoint(_0xc34e99[_0x154c03(0x199)],_0xc34e99[_0x154c03(0x1d3)]);if(!_0x509e11)_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x195),'message':_0x154c03(0x15b)});if(!_0x234a2a)_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+'.target','message':_0x154c03(0x14b)});_0x509e11&&!_0xe9542a[_0x154c03(0x188)](_0x509e11)&&_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x195),'message':_0x154c03(0x1a4)+_0x509e11+'.'});_0x234a2a&&!_0xe9542a[_0x154c03(0x188)](_0x234a2a)&&_0x6d3cbb['push']({'path':_0x249c61+_0x154c03(0x18e),'message':_0x154c03(0x13d)+_0x234a2a+'.'});if(_0xc34e99['id']!==undefined){if(typeof _0xc34e99['id']!==_0x154c03(0xc7)||!BPMN_ID_PATTERN[_0x154c03(0xb1)](_0xc34e99['id']))_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61+_0x154c03(0x1af),'message':_0x154c03(0x1ad)});else{if(_0x4a7eae[_0x154c03(0x188)](_0xc34e99['id']))_0x6d3cbb['push']({'path':_0x249c61+_0x154c03(0x1af),'message':_0x154c03(0x111)+_0xc34e99['id']+'.'});else!_0x4a7eae[_0x154c03(0x188)](_0xc34e99['id'])&&_0x4a7eae[_0x154c03(0x16e)](_0xc34e99['id']);}}if(_0x509e11&&_0x234a2a){const _0x1e0dca=_0x509e11+'\x00'+_0x234a2a+'\x00'+(_0xc34e99[_0x154c03(0x104)]??_0x154c03(0xd9));_0x111bf1[_0x154c03(0x188)](_0x1e0dca)?_0x6d3cbb[_0x154c03(0xdd)]({'path':_0x249c61,'message':_0x154c03(0x1ee)+_0x509e11+_0x154c03(0x172)+_0x234a2a+'\x20('+(_0xc34e99['conditionType']??'ALWAYS')+').'}):_0x111bf1['add'](_0x1e0dca);}validateEdge(_0xc34e99,_0x249c61,_0x6d3cbb),_0x509e11&&_0x234a2a&&(_0x226ddb['get'](_0x509e11)?.[_0x154c03(0xdd)](_0xc34e99)??_0x226ddb[_0x154c03(0xf9)](_0x509e11,[_0xc34e99]),_0xb5e6dc[_0x154c03(0x103)](_0x234a2a)?.['push'](_0xc34e99)??_0xb5e6dc[_0x154c03(0xf9)](_0x234a2a,[_0xc34e99]));});if(_0x1a4671[_0x2f0cfd(0x17b)]!==0x1)return;validateGraphShape(_0xe9542a,_0x1a4671[0x0],_0xd48d93,_0x226ddb,_0xb5e6dc,_0x5cfebb,_0x6d3cbb),validateScriptResultReferences(_0xe9542a,_0x1a4671[0x0],_0x226ddb,_0xb5e6dc,_0x5cfebb,_0x44d2f9,_0x6d3cbb),validateApprovalResults(_0xe9542a,_0x3476b5,_0xd48d93,_0x6d3cbb);}function validateNode(_0x639431,_0xc67069,_0xc908b7){const _0x4ce6e1=a282_0x44ca9e;for(const _0x1869e8 of['form',_0x4ce6e1(0xc3)]){Object[_0x4ce6e1(0xae)][_0x4ce6e1(0xdf)][_0x4ce6e1(0x179)](_0x639431,_0x1869e8)&&_0xc908b7['push']({'path':_0xc67069+'.'+_0x1869e8,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x4ce6e1(0x188)](_0x639431[_0x4ce6e1(0x163)]))return;(typeof _0x639431[_0x4ce6e1(0x124)]!==_0x4ce6e1(0xc7)||_0x639431[_0x4ce6e1(0x124)][_0x4ce6e1(0xd2)]()==='')&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xd0),'message':_0x4ce6e1(0x1c0)});_0x639431['pageId']!==undefined&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xce),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x639431[_0x4ce6e1(0xa3)]!==undefined){if(typeof _0x639431[_0x4ce6e1(0xa3)]!==_0x4ce6e1(0xc7)||_0x639431[_0x4ce6e1(0xa3)][_0x4ce6e1(0xd2)]()==='')_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xb5),'message':_0x4ce6e1(0x1d2)});else _0x639431['type']!==_0x4ce6e1(0x1ab)&&_0x639431[_0x4ce6e1(0x163)]!=='END'&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.path','message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x35eed3=_0x639431['position'];if(!isRecord(_0x35eed3))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.position','message':_0x4ce6e1(0x1e2)});else for(const _0x9540f0 of['x','y']){const _0x1fc672=_0x35eed3[_0x9540f0];(typeof _0x1fc672!==_0x4ce6e1(0x157)||!Number['isFinite'](_0x1fc672)||_0x1fc672<0x0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xea)+_0x9540f0,'message':_0x4ce6e1(0x17e)+_0x9540f0+_0x4ce6e1(0x1d6)});}if(_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0x1ab)){const _0x3cf992=_0x639431[_0x4ce6e1(0x11b)]??_0x4ce6e1(0x1ed),_0x2d36c0=_0x639431['taskMode']??_0x4ce6e1(0x1ab);!APPROVAL_TASK_MODES['has'](_0x2d36c0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xbf),'message':'Unsupported\x20task\x20mode:\x20'+String(_0x2d36c0)+'.'});!APPROVAL_MODES['has'](_0x3cf992)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x126),'message':_0x4ce6e1(0x122)+String(_0x3cf992)+'.'});if(!isRecord(_0x639431[_0x4ce6e1(0x166)]))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.assignee','message':'APPROVAL\x20node\x20requires\x20assignee.'});else{const _0x4bcba5=_0x639431['assignee'][_0x4ce6e1(0x1fb)];_0x4bcba5!==_0x4ce6e1(0x12e)&&_0x4bcba5!==_0x4ce6e1(0x1f3)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x156),'message':'assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.'});if(_0x4bcba5===_0x4ce6e1(0x12e)){const _0x16d844=_0x639431[_0x4ce6e1(0x166)][_0x4ce6e1(0xaf)];if(!Array[_0x4ce6e1(0x1f7)](_0x16d844)||_0x16d844['length']===0x0)_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.assignee.userIds','message':_0x4ce6e1(0x100)});else{const _0x1d5206=_0x16d844[_0x4ce6e1(0xe6)](_0x2f4735=>!isValidUserId(_0x2f4735));_0x1d5206>=0x0&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x144)+_0x1d5206+']','message':_0x4ce6e1(0x147)});const _0x5f2892=new Set(_0x16d844[_0x4ce6e1(0x1bc)](isValidUserId)[_0x4ce6e1(0x18d)](_0x333595=>String(_0x333595)[_0x4ce6e1(0xd2)]()));_0x3cf992===_0x4ce6e1(0x1ed)&&_0x5f2892[_0x4ce6e1(0x16f)]>0x1&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xb6),'message':_0x4ce6e1(0x1ae)});}}if(_0x4bcba5===_0x4ce6e1(0x1f3)){const _0x199595=_0x639431[_0x4ce6e1(0x166)][_0x4ce6e1(0x19e)],_0x270eca=typeof _0x199595==='number'||typeof _0x199595===_0x4ce6e1(0xc7)?Number(String(_0x199595)[_0x4ce6e1(0xd2)]()):Number[_0x4ce6e1(0x18f)];(!Number[_0x4ce6e1(0x176)](_0x270eca)||_0x270eca<=0x0)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x14a),'message':_0x4ce6e1(0x112)});}}if(_0x639431[_0x4ce6e1(0x194)]!==undefined){if(!isRecord(_0x639431['transferCandidates']))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.transferCandidates','message':_0x4ce6e1(0x1f9)});else{if(_0x639431[_0x4ce6e1(0x194)]['strategy']!=='FIXED')_0xc908b7['push']({'path':_0xc67069+_0x4ce6e1(0xdc),'message':_0x4ce6e1(0x149)});else{const _0x9d3fdc=_0x639431['transferCandidates'][_0x4ce6e1(0xaf)];if(!Array[_0x4ce6e1(0x1f7)](_0x9d3fdc)||_0x9d3fdc[_0x4ce6e1(0x17b)]===0x0)_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x1ce),'message':_0x4ce6e1(0x1dc)});else{const _0x4bd278=_0x9d3fdc[_0x4ce6e1(0xe6)](_0x4e3054=>!isValidUserId(_0x4e3054));_0x4bd278>=0x0&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0xc0)+_0x4bd278+']','message':_0x4ce6e1(0x155)});}}}}}_0x639431[_0x4ce6e1(0xd1)]!==undefined&&typeof _0x639431[_0x4ce6e1(0xd1)]!==_0x4ce6e1(0x183)&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+'.sequential','message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0x1c1)){(typeof _0x639431[_0x4ce6e1(0x12d)]!=='string'||_0x639431['scriptName'][_0x4ce6e1(0xd2)]()==='')&&_0xc908b7['push']({'path':_0xc67069+_0x4ce6e1(0x10a),'message':'SCRIPT\x20node\x20requires\x20scriptName.'});if(_0x639431[_0x4ce6e1(0xde)]!==undefined){if(typeof _0x639431['resultVariable']!==_0x4ce6e1(0xc7)||!VARIABLE_PATTERN[_0x4ce6e1(0xb1)](_0x639431[_0x4ce6e1(0xde)]))_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x17f),'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x4ce6e1(0x188)](_0x639431['resultVariable'])||_0x639431[_0x4ce6e1(0xde)][_0x4ce6e1(0x191)](_0x4ce6e1(0x1f2)))&&_0xc908b7[_0x4ce6e1(0xdd)]({'path':_0xc67069+_0x4ce6e1(0x17f),'message':'Reserved\x20resultVariable:\x20'+_0x639431[_0x4ce6e1(0xde)]+'.'});}}validateAsyncExecution(_0x639431,_0xc67069,_0xc908b7),validateApprovalTimeout(_0x639431,_0xc67069,_0xc908b7),validateCcConfig(_0x639431,_0xc67069,_0xc908b7),_0x639431[_0x4ce6e1(0x163)]===_0x4ce6e1(0xa5)&&validateNotificationConfig(_0x639431['config'],_0xc67069+'.config',_0xc908b7);}function validateAsyncExecution(_0x5f0bd3,_0xb8d003,_0x2e65bc){const _0x1aac89=a282_0x44ca9e;if(_0x5f0bd3['async']===undefined)return;if(!isRecord(_0x5f0bd3['async'])){_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+_0x1aac89(0x107),'message':_0x1aac89(0x1e6)});return;}if(_0x5f0bd3['async'][_0x1aac89(0xda)]!==undefined&&typeof _0x5f0bd3[_0x1aac89(0xd8)]['enabled']!=='boolean'){_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+_0x1aac89(0xef),'message':'async.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0xda)]!==!![])return;_0x5f0bd3['type']!==_0x1aac89(0x1c1)&&_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+'.async','message':_0x1aac89(0x10f)});const _0x13848d=_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1e4)]??0x3;(!Number[_0x1aac89(0x1ec)](_0x13848d)||_0x13848d<0x1||_0x13848d>MAX_ASYNC_RETRY_COUNT)&&_0x2e65bc[_0x1aac89(0xdd)]({'path':_0xb8d003+'.async.retryCount','message':_0x1aac89(0x150)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1d7)]!==undefined&&validateTimeAmount(_0x5f0bd3[_0x1aac89(0xd8)][_0x1aac89(0x1d7)],_0xb8d003+_0x1aac89(0xab),_0x2e65bc);}function validateApprovalTimeout(_0x958645,_0x4ba496,_0x1566c1){const _0xb3b0e2=a282_0x44ca9e;if(_0x958645['timeout']===undefined)return;if(!isRecord(_0x958645[_0xb3b0e2(0xad)])){_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0x15f),'message':_0xb3b0e2(0x167)});return;}if(_0x958645[_0xb3b0e2(0xad)]['enabled']!==undefined&&typeof _0x958645[_0xb3b0e2(0xad)]['enabled']!==_0xb3b0e2(0x183)){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+'.timeout.enabled','message':_0xb3b0e2(0x1e0)});return;}if(_0x958645['timeout']['enabled']!==!![])return;if(_0x958645[_0xb3b0e2(0xad)]['interrupting']!==undefined&&typeof _0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x19f)]!=='boolean'){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0xe8),'message':_0xb3b0e2(0x18b)});return;}_0x958645['type']!=='APPROVAL'&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x15f),'message':_0xb3b0e2(0x1b9)});validateTimeAmount(_0x958645[_0xb3b0e2(0xad)]['duration'],_0x4ba496+_0xb3b0e2(0x174),_0x1566c1);const _0x3645d2=_0x958645[_0xb3b0e2(0xad)]['action'];if(!APPROVAL_TIMEOUT_ACTIONS[_0xb3b0e2(0x188)](_0x3645d2)){_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x19c),'message':_0xb3b0e2(0x14c)});return;}(_0x958645[_0xb3b0e2(0xbb)]??_0xb3b0e2(0x1ab))===_0xb3b0e2(0x1c2)&&_0x3645d2!==_0xb3b0e2(0x123)&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+_0xb3b0e2(0x19c),'message':_0xb3b0e2(0x177)});const _0x217eab=_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x19f)]??_0x3645d2!==_0xb3b0e2(0x123);if(_0x3645d2===_0xb3b0e2(0x123))_0x217eab&&_0x1566c1[_0xb3b0e2(0xdd)]({'path':_0x4ba496+'.timeout.interrupting','message':_0xb3b0e2(0x121)}),(typeof _0x958645[_0xb3b0e2(0xad)]['scriptName']!=='string'||_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0x12d)][_0xb3b0e2(0xd2)]()==='')&&_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0x1a0),'message':_0xb3b0e2(0x1c3)}),validateOptionalResultVariable(_0x958645[_0xb3b0e2(0xad)][_0xb3b0e2(0xde)],_0x4ba496+_0xb3b0e2(0x10d),_0x1566c1);else!_0x217eab&&_0x1566c1['push']({'path':_0x4ba496+_0xb3b0e2(0xe8),'message':_0x3645d2+_0xb3b0e2(0x1e3)});}function validateTimeAmount(_0x5a15c2,_0x8205be,_0x31b775){const _0x599ce9=a282_0x44ca9e;if(!isRecord(_0x5a15c2)){_0x31b775['push']({'path':_0x8205be,'message':'duration\x20requires\x20value\x20and\x20unit.'});return;}(!Number[_0x599ce9(0x1ec)](_0x5a15c2['value'])||Number(_0x5a15c2[_0x599ce9(0x13b)])<=0x0)&&_0x31b775[_0x599ce9(0xdd)]({'path':_0x8205be+'.value','message':_0x599ce9(0x1bd)}),!FLOW_TIME_UNITS[_0x599ce9(0x188)](_0x5a15c2[_0x599ce9(0x184)])&&_0x31b775['push']({'path':_0x8205be+_0x599ce9(0xcb),'message':_0x599ce9(0x1dd)});}function validateOptionalResultVariable(_0x1f620a,_0x319809,_0xbdcc52){const _0x59a2ca=a282_0x44ca9e;if(_0x1f620a===undefined||_0x1f620a===null||_0x1f620a==='')return;if(typeof _0x1f620a!==_0x59a2ca(0xc7)||!VARIABLE_PATTERN[_0x59a2ca(0xb1)](_0x1f620a))_0xbdcc52[_0x59a2ca(0xdd)]({'path':_0x319809,'message':_0x59a2ca(0xb2)});else(RESERVED_RESULT_VARIABLES[_0x59a2ca(0x188)](_0x1f620a)||_0x1f620a[_0x59a2ca(0x191)](_0x59a2ca(0x1f2)))&&_0xbdcc52['push']({'path':_0x319809,'message':'Reserved\x20resultVariable:\x20'+_0x1f620a+'.'});}function validateCcConfig(_0x22f5b2,_0x537b3e,_0x32808c){const _0x2a8001=a282_0x44ca9e;if(_0x22f5b2['cc']===undefined)return;if(!isRecord(_0x22f5b2['cc'])){_0x32808c['push']({'path':_0x537b3e+_0x2a8001(0x193),'message':_0x2a8001(0x1c4)});return;}_0x22f5b2[_0x2a8001(0x163)]!==_0x2a8001(0x18c)&&_0x22f5b2[_0x2a8001(0x163)]!==_0x2a8001(0x1ab)&&_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x193),'message':_0x2a8001(0xd5)});Object[_0x2a8001(0xae)][_0x2a8001(0xdf)][_0x2a8001(0x179)](_0x22f5b2['cc'],_0x2a8001(0x1ef))&&_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x1d4),'message':UNSUPPORTED_FORM_MESSAGE});const _0x48f2a6=_0x22f5b2['cc'][_0x2a8001(0x12a)];if(!Array['isArray'](_0x48f2a6)||_0x48f2a6[_0x2a8001(0x17b)]===0x0)_0x32808c[_0x2a8001(0xdd)]({'path':_0x537b3e+_0x2a8001(0x17d),'message':_0x2a8001(0x1ac)});else{_0x48f2a6[_0x2a8001(0x17b)]>MAX_CC_RECIPIENTS&&_0x32808c['push']({'path':_0x537b3e+_0x2a8001(0x17d),'message':_0x2a8001(0x106)+MAX_CC_RECIPIENTS+'\x20users.'});const _0x6ffab=new Set();_0x48f2a6[_0x2a8001(0x181)]((_0x600924,_0x3a4ea1)=>{const _0xd8c4d8=_0x2a8001;if(typeof _0x600924!=='string'||_0x600924['trim']()==='')_0x32808c[_0xd8c4d8(0xdd)]({'path':_0x537b3e+_0xd8c4d8(0x119)+_0x3a4ea1+']','message':_0xd8c4d8(0x1b0)});else _0x6ffab[_0xd8c4d8(0x188)](_0x600924[_0xd8c4d8(0xd2)]())?_0x32808c['push']({'path':_0x537b3e+'.cc.recipientUserIds['+_0x3a4ea1+']','message':_0xd8c4d8(0x1b3)+_0x600924['trim']()+'.'}):_0x6ffab[_0xd8c4d8(0x16e)](_0x600924[_0xd8c4d8(0xd2)]());});}validateStringArray(_0x22f5b2['cc']['visible'],_0x537b3e+_0x2a8001(0x171),_0x32808c);}function validateStringArray(_0x2e5122,_0x1349e4,_0x1022f0){const _0xaea9b7=a282_0x44ca9e;if(_0x2e5122===undefined)return;if(!Array[_0xaea9b7(0x1f7)](_0x2e5122)){_0x1022f0[_0xaea9b7(0xdd)]({'path':_0x1349e4,'message':_0xaea9b7(0x1df)});return;}const _0x1ca7f5=new Set();_0x2e5122[_0xaea9b7(0x181)]((_0x4e4513,_0x429b61)=>{const _0x4f1a55=_0xaea9b7;if(typeof _0x4e4513!=='string'||_0x4e4513[_0x4f1a55(0xd2)]()==='')_0x1022f0[_0x4f1a55(0xdd)]({'path':_0x1349e4+'['+_0x429b61+']','message':_0x4f1a55(0x11e)});else _0x1ca7f5[_0x4f1a55(0x188)](_0x4e4513[_0x4f1a55(0xd2)]())?_0x1022f0[_0x4f1a55(0xdd)]({'path':_0x1349e4+'['+_0x429b61+']','message':_0x4f1a55(0x17a)+_0x4e4513[_0x4f1a55(0xd2)]()+'.'}):_0x1ca7f5[_0x4f1a55(0x16e)](_0x4e4513[_0x4f1a55(0xd2)]());});}function validateNotificationConfig(_0x515411,_0x33c19d,_0x4a6805){const _0x1cb913=a282_0x44ca9e;if(!isRecord(_0x515411)){_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d,'message':_0x1cb913(0x102)});return;}if(_0x515411['version']!==undefined&&_0x515411[_0x1cb913(0x137)]!==null){if(typeof _0x515411['version']!==_0x1cb913(0xc7))_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.version','message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x515411[_0x1cb913(0x137)][_0x1cb913(0xd2)]()&&_0x515411[_0x1cb913(0x137)][_0x1cb913(0xd2)]()!=='v1'&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+_0x1cb913(0x168),'message':_0x1cb913(0x1d9)+_0x515411[_0x1cb913(0x137)]+'.'});}const _0xa3243d=requireNotificationString(_0x515411[_0x1cb913(0x1cd)],_0x33c19d+_0x1cb913(0x109),'Notification\x20configCode\x20is\x20required.',_0x4a6805);_0xa3243d?.[_0x1cb913(0x18a)]('${')&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.configCode','message':_0x1cb913(0x178)});if(_0x515411[_0x1cb913(0x13a)]!==undefined&&_0x515411[_0x1cb913(0x13a)]!==null){if(typeof _0x515411[_0x1cb913(0x13a)]!=='string')_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.failurePolicy','message':_0x1cb913(0x1d8)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x515411[_0x1cb913(0x13a)]['trim']()[_0x1cb913(0x196)]())&&_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+_0x1cb913(0xfd),'message':_0x1cb913(0x159)});}!isRecord(_0x515411[_0x1cb913(0x11d)])?_0x4a6805[_0x1cb913(0xdd)]({'path':_0x33c19d+'.template','message':_0x1cb913(0x192)}):validateNotificationTemplate(_0x515411['template'],_0x33c19d+_0x1cb913(0x162),_0x4a6805),validateNotificationRecipients(_0x515411[_0x1cb913(0x142)],_0x33c19d+_0x1cb913(0x118),_0x4a6805);}function validateNotificationTemplate(_0x2359a2,_0x26d9c7,_0x185ddf){const _0x50a9cb=a282_0x44ca9e;for(const _0x10bd4f of['title','summary']){const _0x5ecd79=requireNotificationString(_0x2359a2[_0x10bd4f],_0x26d9c7+'.'+_0x10bd4f,_0x50a9cb(0x146)+_0x10bd4f+'\x20is\x20required.',_0x185ddf);if(_0x5ecd79)validateNotificationPlaceholders(_0x5ecd79,_0x26d9c7+'.'+_0x10bd4f,_0x185ddf);}_0x2359a2['detailMarkdown']!==undefined&&_0x2359a2[_0x50a9cb(0x125)]!==null&&(typeof _0x2359a2[_0x50a9cb(0x125)]!==_0x50a9cb(0xc7)?_0x185ddf['push']({'path':_0x26d9c7+_0x50a9cb(0xf3),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x2359a2[_0x50a9cb(0x125)],_0x26d9c7+_0x50a9cb(0xf3),_0x185ddf)),validateNotificationFacts(_0x2359a2['facts'],_0x26d9c7+_0x50a9cb(0x1b8),_0x185ddf),validateNotificationActions(_0x2359a2[_0x50a9cb(0xaa)],_0x26d9c7+_0x50a9cb(0xc9),_0x185ddf);}function validateNotificationFacts(_0xe051ac,_0x1c36e5,_0x5754f4){const _0x31ac3c=a282_0x44ca9e;if(_0xe051ac===undefined||_0xe051ac===null)return;if(!Array[_0x31ac3c(0x1f7)](_0xe051ac)){_0x5754f4['push']({'path':_0x1c36e5,'message':_0x31ac3c(0xb0)});return;}_0xe051ac[_0x31ac3c(0x17b)]>MAX_NOTIFICATION_FACTS&&_0x5754f4['push']({'path':_0x1c36e5,'message':_0x31ac3c(0x1be)+MAX_NOTIFICATION_FACTS+_0x31ac3c(0x120)}),_0xe051ac[_0x31ac3c(0x181)]((_0x22f3f4,_0x39d9b3)=>{const _0x4fecbf=_0x31ac3c,_0x53a908=_0x1c36e5+'['+_0x39d9b3+']';if(!isRecord(_0x22f3f4)){_0x5754f4['push']({'path':_0x53a908,'message':_0x4fecbf(0xa9)});return;}for(const _0x1ae849 of[_0x4fecbf(0xdb),'value']){const _0x72ef69=requireNotificationString(_0x22f3f4[_0x1ae849],_0x53a908+'.'+_0x1ae849,_0x4fecbf(0x175)+_0x1ae849+'\x20is\x20required.',_0x5754f4);_0x72ef69&&validateNotificationPlaceholders(_0x72ef69,_0x53a908+'.'+_0x1ae849,_0x5754f4);}});}function validateNotificationActions(_0x3799d3,_0x13d61b,_0x3b2200){const _0x4b4e6c=a282_0x44ca9e;if(_0x3799d3===undefined||_0x3799d3===null)return;if(!Array['isArray'](_0x3799d3)){_0x3b2200[_0x4b4e6c(0xdd)]({'path':_0x13d61b,'message':_0x4b4e6c(0xe7)});return;}_0x3799d3[_0x4b4e6c(0x17b)]>MAX_NOTIFICATION_ACTIONS&&_0x3b2200[_0x4b4e6c(0xdd)]({'path':_0x13d61b,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x4b4e6c(0xf1)}),_0x3799d3[_0x4b4e6c(0x181)]((_0x587369,_0x2e8e76)=>{const _0x767aad=_0x4b4e6c,_0x2c9ac3=_0x13d61b+'['+_0x2e8e76+']';if(!isRecord(_0x587369)){_0x3b2200[_0x767aad(0xdd)]({'path':_0x2c9ac3,'message':_0x767aad(0xc6)});return;}const _0x512f5f=requireNotificationString(_0x587369[_0x767aad(0x185)],_0x2c9ac3+_0x767aad(0x153),_0x767aad(0xa6),_0x3b2200);if(_0x512f5f)validateNotificationPlaceholders(_0x512f5f,_0x2c9ac3+_0x767aad(0x153),_0x3b2200);const _0x9ec75e=requireNotificationString(_0x587369[_0x767aad(0x1ca)],_0x2c9ac3+_0x767aad(0x13c),_0x767aad(0x151),_0x3b2200);if(!_0x9ec75e)return;validateNotificationPlaceholders(_0x9ec75e,_0x2c9ac3+_0x767aad(0x13c),_0x3b2200),!/^https?:\/\//i[_0x767aad(0xb1)](_0x9ec75e)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN['test'](_0x9ec75e)&&_0x3b2200[_0x767aad(0xdd)]({'path':_0x2c9ac3+_0x767aad(0x13c),'message':_0x767aad(0x19d)});});}function validateNotificationRecipients(_0xa608a1,_0x3a777d,_0x20bdb6){const _0x1003f3=a282_0x44ca9e;if(_0xa608a1===undefined||_0xa608a1===null)return;if(!Array['isArray'](_0xa608a1)){_0x20bdb6[_0x1003f3(0xdd)]({'path':_0x3a777d,'message':_0x1003f3(0x130)});return;}let _0x1eac07=![];_0xa608a1[_0x1003f3(0x181)]((_0x25b419,_0x42d603)=>{const _0x31c582=_0x1003f3,_0x35c0b1=_0x3a777d+'['+_0x42d603+']';if(!isRecord(_0x25b419)){_0x20bdb6['push']({'path':_0x35c0b1,'message':_0x31c582(0x133)});return;}const _0x276525=requireNotificationString(_0x25b419[_0x31c582(0x163)],_0x35c0b1+_0x31c582(0xb9),_0x31c582(0xcf),_0x20bdb6);_0x276525&&!NOTIFICATION_RECIPIENT_TYPES[_0x31c582(0x188)](_0x276525[_0x31c582(0x196)]())&&_0x20bdb6[_0x31c582(0xdd)]({'path':_0x35c0b1+_0x31c582(0xb9),'message':_0x31c582(0x154)});let _0x58cdab='TO';_0x25b419['role']!==undefined&&_0x25b419[_0x31c582(0x1c7)]!==null&&(typeof _0x25b419[_0x31c582(0x1c7)]!==_0x31c582(0xc7)?(_0x20bdb6[_0x31c582(0xdd)]({'path':_0x35c0b1+_0x31c582(0x1f5),'message':_0x31c582(0x1db)}),_0x58cdab=''):(_0x58cdab=_0x25b419[_0x31c582(0x1c7)]['trim']()[_0x31c582(0x196)](),!NOTIFICATION_RECIPIENT_ROLES['has'](_0x58cdab)&&_0x20bdb6['push']({'path':_0x35c0b1+_0x31c582(0x1f5),'message':_0x31c582(0x1e8)})));if(_0x58cdab==='TO')_0x1eac07=!![];const _0x13b3aa=requireNotificationString(_0x25b419[_0x31c582(0x13b)],_0x35c0b1+'.value','Notification\x20recipient.value\x20is\x20required.',_0x20bdb6);_0x13b3aa&&validateNotificationPlaceholders(_0x13b3aa,_0x35c0b1+_0x31c582(0x116),_0x20bdb6);}),_0xa608a1[_0x1003f3(0x17b)]>0x0&&!_0x1eac07&&_0x20bdb6['push']({'path':_0x3a777d,'message':_0x1003f3(0x11a)});}function requireNotificationString(_0x5767a2,_0x1529f5,_0x1443b5,_0x2bc8e2){const _0x33df3d=a282_0x44ca9e;if(typeof _0x5767a2!==_0x33df3d(0xc7)||_0x5767a2[_0x33df3d(0xd2)]()==='')return _0x2bc8e2['push']({'path':_0x1529f5,'message':_0x1443b5}),undefined;return _0x5767a2[_0x33df3d(0xd2)]();}function validateNotificationPlaceholders(_0x3db46c,_0x4fca05,_0x440be0){const _0x4f5040=a282_0x44ca9e;for(const _0x285f4f of _0x3db46c['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x250e8f=_0x285f4f[0x1]?.[_0x4f5040(0xd2)]()??'',_0x283d4d=_0x250e8f[_0x4f5040(0x161)]('.'),_0x224b40=_0x283d4d>=0x0?_0x250e8f[_0x4f5040(0x1a8)](0x0,_0x283d4d):_0x250e8f,_0x2e1d4b=_0x283d4d>=0x0?_0x250e8f[_0x4f5040(0x1a8)](_0x283d4d+0x1)[_0x4f5040(0xd2)]():'';(![_0x4f5040(0xbe),_0x4f5040(0x1a3),_0x4f5040(0x12f)][_0x4f5040(0x18a)](_0x224b40)||_0x2e1d4b==='')&&_0x440be0[_0x4f5040(0xdd)]({'path':_0x4fca05,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x285f4f[0x0]+'.'});}_0x3db46c[_0x4f5040(0x108)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x440be0[_0x4f5040(0xdd)]({'path':_0x4fca05,'message':'Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.'});}function validateEdge(_0x1c96cc,_0x267a4e,_0x40c8db){const _0x47458=a282_0x44ca9e;_0x1c96cc['name']!==undefined&&typeof _0x1c96cc['name']!=='string'&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0xd0),'message':'edge\x20name\x20must\x20be\x20a\x20string.'}),_0x1c96cc[_0x47458(0x127)]!==undefined&&typeof _0x1c96cc[_0x47458(0x127)]!==_0x47458(0x183)&&_0x40c8db['push']({'path':_0x267a4e+_0x47458(0xd6),'message':_0x47458(0x15c)}),_0x1c96cc[_0x47458(0xed)]!==undefined&&(!Array[_0x47458(0x1f7)](_0x1c96cc[_0x47458(0xed)])?_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0x1f4),'message':'waypoints\x20must\x20be\x20an\x20array.'}):_0x1c96cc[_0x47458(0xed)][_0x47458(0x181)]((_0x111de2,_0x191000)=>{const _0xd29851=_0x47458;if(!isRecord(_0x111de2)){_0x40c8db[_0xd29851(0xdd)]({'path':_0x267a4e+_0xd29851(0xfa)+_0x191000+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x9c9f8e of['x','y']){const _0x21dc87=_0x111de2[_0x9c9f8e];(typeof _0x21dc87!==_0xd29851(0x157)||!Number[_0xd29851(0xf2)](_0x21dc87))&&_0x40c8db[_0xd29851(0xdd)]({'path':_0x267a4e+_0xd29851(0xfa)+_0x191000+'].'+_0x9c9f8e,'message':_0xd29851(0x1cf)+_0x9c9f8e+_0xd29851(0xd3)});}})),_0x1c96cc['conditionType']!==undefined&&!CONDITION_TYPES[_0x47458(0x188)](_0x1c96cc[_0x47458(0x104)])&&_0x40c8db['push']({'path':_0x267a4e+_0x47458(0x1b7),'message':_0x47458(0xf7)+String(_0x1c96cc[_0x47458(0x104)])+'.'}),_0x1c96cc[_0x47458(0x104)]===_0x47458(0xf6)&&(typeof _0x1c96cc[_0x47458(0x1c9)]!==_0x47458(0xc7)||_0x1c96cc[_0x47458(0x1c9)][_0x47458(0xd2)]()==='')&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0x101),'message':'EXPRESSION\x20edge\x20requires\x20expression.'}),_0x1c96cc[_0x47458(0x127)]===!![]&&_0x1c96cc[_0x47458(0x104)]!==_0x47458(0xd9)&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+_0x47458(0xd6),'message':_0x47458(0xb8)}),_0x1c96cc[_0x47458(0x127)]===!![]&&typeof _0x1c96cc['expression']===_0x47458(0xc7)&&_0x1c96cc[_0x47458(0x1c9)][_0x47458(0xd2)]()!==''&&_0x40c8db[_0x47458(0xdd)]({'path':_0x267a4e+'.expression','message':_0x47458(0x115)});}function validateGraphShape(_0x2273f9,_0xd59304,_0x434c71,_0x4d921d,_0x2ee086,_0x14576a,_0x5d5206){const _0x10ff0c=a282_0x44ca9e;for(const [_0x4507b2,_0x1f955e]of _0x2273f9){const _0x273838=_0x2ee086[_0x10ff0c(0x103)](_0x4507b2)??[],_0xb7a3bd=_0x4d921d[_0x10ff0c(0x103)](_0x4507b2)??[];_0x1f955e[_0x10ff0c(0x163)]!==_0x10ff0c(0x170)&&_0x273838[_0x10ff0c(0x17b)]===0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x9d)});_0x1f955e[_0x10ff0c(0x163)]!=='END'&&_0xb7a3bd[_0x10ff0c(0x17b)]===0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x13f)});_0x1f955e[_0x10ff0c(0x163)]===_0x10ff0c(0x170)&&_0x273838[_0x10ff0c(0x17b)]>0x0&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x132)});_0x1f955e[_0x10ff0c(0x163)]===_0x10ff0c(0x18c)&&_0xb7a3bd['length']>0x0&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':'END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.'});if(_0x1f955e['type']===_0x10ff0c(0x110)){_0xb7a3bd['length']<0x2&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0xe5)});const _0x12347d=_0xb7a3bd['filter'](_0x53b50d=>_0x53b50d[_0x10ff0c(0x127)]===!![]);_0x12347d[_0x10ff0c(0x17b)]!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x1d1)});if(_0x12347d[_0x10ff0c(0x17b)]===0x1){const _0x2fdb26=_0x12347d[0x0],_0x2da5bd=_0x14576a[_0x10ff0c(0x103)](_0x2fdb26)??'flowJson.edges';_0x2fdb26[_0x10ff0c(0x104)]!==_0x10ff0c(0xd9)&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x2da5bd+_0x10ff0c(0x1b7),'message':_0x10ff0c(0x1f6)});_0x2fdb26[_0x10ff0c(0x1c9)]!==undefined&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x2da5bd+_0x10ff0c(0x101),'message':'CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.'});for(const _0x2cf26e of _0xb7a3bd){if(_0x2cf26e===_0x2fdb26)continue;const _0x3d1bbc=_0x14576a[_0x10ff0c(0x103)](_0x2cf26e)??'flowJson.edges';if(_0x2cf26e[_0x10ff0c(0x104)]!==_0x10ff0c(0xf6))_0x5d5206['push']({'path':_0x3d1bbc+_0x10ff0c(0x1b7),'message':_0x10ff0c(0x189)});else(typeof _0x2cf26e['expression']!==_0x10ff0c(0xc7)||_0x2cf26e[_0x10ff0c(0x1c9)][_0x10ff0c(0xd2)]()==='')&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x3d1bbc+'.expression','message':_0x10ff0c(0x1a5)});}}}if(_0x1f955e[_0x10ff0c(0x163)]==='APPROVAL'&&(_0x1f955e[_0x10ff0c(0xbb)]??_0x10ff0c(0x1ab))===_0x10ff0c(0x1c2)){if(_0xb7a3bd[_0x10ff0c(0x17b)]!==0x1)_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0x138)});else{const _0xdd8e84=_0xb7a3bd[0x0];((_0xdd8e84['conditionType']??_0x10ff0c(0xd9))!=='ALWAYS'||_0xdd8e84[_0x10ff0c(0x127)]===!![]||typeof _0xdd8e84['expression']===_0x10ff0c(0xc7)&&_0xdd8e84[_0x10ff0c(0x1c9)][_0x10ff0c(0xd2)]()!=='')&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x14576a['get'](_0xdd8e84)??'flowJson.edges','message':_0x10ff0c(0xbc)});}}else{if(_0x1f955e[_0x10ff0c(0x163)]==='APPROVAL'){const _0xe5906e=_0xb7a3bd[_0x10ff0c(0x18d)](_0x25dac8=>_0x25dac8['conditionType']??_0x10ff0c(0xd9)),_0x3df4ce=_0xe5906e['filter'](_0x17f62a=>_0x17f62a!==_0x10ff0c(0xa4)&&_0x17f62a!==_0x10ff0c(0x1f1));_0x3df4ce[_0x10ff0c(0x17b)]>0x0&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':_0x10ff0c(0xc5)}),_0xe5906e[_0x10ff0c(0x1bc)](_0x3660d1=>_0x3660d1===_0x10ff0c(0xa4))[_0x10ff0c(0x17b)]!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':'flowJson.nodes.'+_0x4507b2,'message':_0x10ff0c(0x187)}),_0xe5906e[_0x10ff0c(0x1bc)](_0x30c6d8=>_0x30c6d8===_0x10ff0c(0x1f1))['length']!==0x1&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x4507b2,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0xb7a3bd[_0x10ff0c(0x1f0)](_0x471913=>_0x471913[_0x10ff0c(0x127)]===!![])&&_0x5d5206[_0x10ff0c(0xdd)]({'path':'flowJson.nodes.'+_0x4507b2,'message':'APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.'});}}}const _0xfa2c63=new Set(),_0xe33385=_0x4bdae6=>{const _0x5b9046=_0x10ff0c;if(_0xfa2c63['has'](_0x4bdae6))return;_0xfa2c63[_0x5b9046(0x16e)](_0x4bdae6);for(const _0x520f65 of _0x4d921d[_0x5b9046(0x103)](_0x4bdae6)??[]){const _0x21986e=resolveEdgeEndpoint(_0x520f65[_0x5b9046(0x199)],_0x520f65[_0x5b9046(0x1d3)]);if(_0x21986e&&_0x2273f9['has'](_0x21986e))_0xe33385(_0x21986e);}};_0xe33385(_0xd59304);for(const _0x370c64 of _0x2273f9['keys']()){!_0xfa2c63[_0x10ff0c(0x188)](_0x370c64)&&_0x5d5206[_0x10ff0c(0xdd)]({'path':_0x10ff0c(0x1e5)+_0x370c64,'message':_0x10ff0c(0xcc)});}const _0x4403f2=_0x434c71[_0x10ff0c(0x1f0)](_0x3071cb=>_0xfa2c63[_0x10ff0c(0x188)](_0x3071cb));if(!_0x4403f2){_0x5d5206['push']({'path':_0x10ff0c(0xbd),'message':_0x10ff0c(0x197)});return;}const _0x485d3e=new Set(),_0x2851d7=_0x2b39e9=>{const _0x24b729=_0x10ff0c;if(_0x485d3e['has'](_0x2b39e9))return;_0x485d3e[_0x24b729(0x16e)](_0x2b39e9);for(const _0x5151ab of _0x2ee086['get'](_0x2b39e9)??[]){const _0x29dd96=resolveEdgeEndpoint(_0x5151ab['source'],_0x5151ab[_0x24b729(0x186)]);if(_0x29dd96&&_0x2273f9[_0x24b729(0x188)](_0x29dd96))_0x2851d7(_0x29dd96);}};for(const _0xb2d6fd of _0x434c71){if(_0x2273f9[_0x10ff0c(0x188)](_0xb2d6fd))_0x2851d7(_0xb2d6fd);}for(const _0xcdfa75 of _0xfa2c63){!_0x485d3e[_0x10ff0c(0x188)](_0xcdfa75)&&_0x5d5206['push']({'path':_0x10ff0c(0x1e5)+_0xcdfa75,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0x5e6865,_0xfb3456,_0x2dd74e,_0x2c2f2f){const _0x46885f=a282_0x44ca9e;if(_0xfb3456===0x0)return;const _0x3ef91d=new Set(_0x2dd74e['map'](_0x26ef9b=>_0x5e6865[_0x46885f(0x103)](_0x26ef9b)?.[_0x46885f(0x113)])[_0x46885f(0x1bc)](_0x54f100=>typeof _0x54f100===_0x46885f(0xc7)));for(const _0x2f1888 of[_0x46885f(0xa4),_0x46885f(0x1f1)]){!_0x3ef91d[_0x46885f(0x188)](_0x2f1888)&&_0x2c2f2f[_0x46885f(0xdd)]({'path':_0x46885f(0x158),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x2f1888+'.'});}}function validateScriptResultReferences(_0x533ae9,_0x1e4085,_0xc7240d,_0x26b9b3,_0xa9bd61,_0x2fe80f,_0x274148){const _0x5b160e=a282_0x44ca9e;if(_0x2fe80f[_0x5b160e(0x16f)]===0x0)return;const _0x40d8f2=new Set(),_0x1c8aca=_0x3863b7=>{const _0x58abb6=_0x5b160e;if(!_0x40d8f2[_0x58abb6(0x188)](_0x3863b7)&&_0x533ae9['has'](_0x3863b7)){_0x40d8f2[_0x58abb6(0x16e)](_0x3863b7);for(const _0x5b3bf3 of _0xc7240d[_0x58abb6(0x103)](_0x3863b7)??[]){const _0x1f9d82=resolveEdgeEndpoint(_0x5b3bf3['target'],_0x5b3bf3[_0x58abb6(0x1d3)]);if(_0x1f9d82)_0x1c8aca(_0x1f9d82);}}};_0x1c8aca(_0x1e4085);const _0x3e0650=new Map();for(const _0x2c64c9 of _0x40d8f2){_0x3e0650['set'](_0x2c64c9,_0x2c64c9===_0x1e4085?new Set([_0x1e4085]):new Set(_0x40d8f2));}let _0x158bdc=!![];while(_0x158bdc){_0x158bdc=![];for(const _0x57a16c of _0x40d8f2){if(_0x57a16c===_0x1e4085)continue;const _0x384444=(_0x26b9b3[_0x5b160e(0x103)](_0x57a16c)??[])[_0x5b160e(0x18d)](_0xde7470=>resolveEdgeEndpoint(_0xde7470['source'],_0xde7470[_0x5b160e(0x186)]))[_0x5b160e(0x1bc)](_0xafe7d5=>Boolean(_0xafe7d5&&_0x40d8f2[_0x5b160e(0x188)](_0xafe7d5)));if(_0x384444['length']===0x0)continue;const _0xfa9745=new Set(_0x3e0650[_0x5b160e(0x103)](_0x384444[0x0])??[]);for(const _0x504708 of _0x384444[_0x5b160e(0x1a8)](0x1)){const _0x32c1c8=_0x3e0650[_0x5b160e(0x103)](_0x504708)??new Set();for(const _0x3b0c8b of _0xfa9745){if(!_0x32c1c8['has'](_0x3b0c8b))_0xfa9745[_0x5b160e(0x129)](_0x3b0c8b);}}_0xfa9745['add'](_0x57a16c);const _0x308868=_0x3e0650['get'](_0x57a16c);!setsEqual(_0x308868,_0xfa9745)&&(_0x3e0650[_0x5b160e(0xf9)](_0x57a16c,_0xfa9745),_0x158bdc=!![]);}}for(const [_0x1aaa11,_0x4cb60c]of _0xc7240d){const _0x38ef9b=_0x3e0650['get'](_0x1aaa11);if(!_0x38ef9b)continue;for(const _0x1ad4c7 of _0x4cb60c){if(_0x1ad4c7[_0x5b160e(0x104)]!=='EXPRESSION'||typeof _0x1ad4c7[_0x5b160e(0x1c9)]!==_0x5b160e(0xc7))continue;for(const [_0x4f0223,_0x52a91a]of _0x2fe80f){expressionReferencesVariable(_0x1ad4c7[_0x5b160e(0x1c9)],_0x4f0223)&&!_0x38ef9b[_0x5b160e(0x188)](_0x52a91a)&&_0x274148[_0x5b160e(0xdd)]({'path':(_0xa9bd61['get'](_0x1ad4c7)??_0x5b160e(0xbd))+_0x5b160e(0x101),'message':'Expression\x20references\x20SCRIPT\x20resultVariable\x20'+_0x4f0223+_0x5b160e(0x145)+_0x52a91a+_0x5b160e(0xe4)+_0x1aaa11+'.'});}}}}function expressionReferencesVariable(_0x46b0d0,_0x33bfd5){const _0x3bffab=a282_0x44ca9e;let _0x68fb2d=0x0;while(_0x68fb2d<_0x46b0d0['length']){const _0xbf53cf=_0x46b0d0[_0x68fb2d];if(_0xbf53cf==='\x27'||_0xbf53cf==='\x22'){_0x68fb2d=skipQuotedExpressionSegment(_0x46b0d0,_0x68fb2d,_0xbf53cf);continue;}if(!/[A-Za-z_]/[_0x3bffab(0xb1)](_0xbf53cf)){_0x68fb2d+=0x1;continue;}const _0x2f920c=_0x68fb2d;_0x68fb2d+=0x1;while(_0x68fb2d<_0x46b0d0[_0x3bffab(0x17b)]&&/[A-Za-z0-9_]/['test'](_0x46b0d0[_0x68fb2d])){_0x68fb2d+=0x1;}if(_0x46b0d0[_0x3bffab(0x1a8)](_0x2f920c,_0x68fb2d)!==_0x33bfd5)continue;let _0x52514d=_0x2f920c-0x1;while(_0x52514d>=0x0&&/\s/[_0x3bffab(0xb1)](_0x46b0d0[_0x52514d])){_0x52514d-=0x1;}if(_0x46b0d0[_0x52514d]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x2403f1,_0x4398a7,_0x3b0a40){let _0xfb1a5a=_0x4398a7+0x1;while(_0xfb1a5a<_0x2403f1['length']){if(_0x2403f1[_0xfb1a5a]==='\x5c'){_0xfb1a5a+=0x2;continue;}if(_0x2403f1[_0xfb1a5a]===_0x3b0a40)return _0xfb1a5a+0x1;_0xfb1a5a+=0x1;}return _0xfb1a5a;}function resolveEffectiveResultVariable(_0x54c1ab,_0x5656d8){const _0x5f40a3=a282_0x44ca9e;if(_0x54c1ab===undefined||_0x54c1ab===null||_0x5656d8&&_0x54c1ab==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x54c1ab!==_0x5f40a3(0xc7)||!VARIABLE_PATTERN[_0x5f40a3(0xb1)](_0x54c1ab)||RESERVED_RESULT_VARIABLES[_0x5f40a3(0x188)](_0x54c1ab)||_0x54c1ab['startsWith'](_0x5f40a3(0x1f2)))return undefined;return _0x54c1ab;}function registerResultVariableOwner(_0x21ddf1,_0x37bd94,_0x35a1bd,_0x9d2d65){const _0x2d0618=a282_0x44ca9e;if(_0x21ddf1['has'](_0x37bd94)){_0x9d2d65[_0x2d0618(0xdd)]({'path':'flowJson.nodes','message':_0x2d0618(0x1b4)+_0x37bd94+'.'});return;}_0x21ddf1[_0x2d0618(0xf9)](_0x37bd94,_0x35a1bd);}function setsEqual(_0x2f4c2a,_0x37279b){const _0x41b3b6=a282_0x44ca9e;return _0x2f4c2a[_0x41b3b6(0x16f)]===_0x37279b[_0x41b3b6(0x16f)]&&[..._0x2f4c2a][_0x41b3b6(0x17c)](_0x3a5389=>_0x37279b['has'](_0x3a5389));}function isValidUserId(_0x1fa315){const _0x5a735d=a282_0x44ca9e;if(typeof _0x1fa315===_0x5a735d(0xc7))return _0x1fa315[_0x5a735d(0xd2)]()['length']>0x0;return Number[_0x5a735d(0x176)](_0x1fa315)&&Number(_0x1fa315)>0x0;}function a282_0x58dc(_0x2f0180,_0x4dd807){_0x2f0180=_0x2f0180-0x9c;const _0x222247=a282_0x2222();let _0x58dcb3=_0x222247[_0x2f0180];return _0x58dcb3;}function resolveEdgeEndpoint(_0x278376,_0x2d452f){const _0x31afcd=a282_0x44ca9e;if(typeof _0x278376===_0x31afcd(0xc7)&&_0x278376[_0x31afcd(0xd2)]())return _0x278376[_0x31afcd(0xd2)]();if(typeof _0x2d452f===_0x31afcd(0xc7)&&_0x2d452f[_0x31afcd(0xd2)]())return _0x2d452f[_0x31afcd(0xd2)]();return undefined;}function removeEmptyMetadata(_0x4b9398,_0x5cee1c,_0x5ce9a2,_0x4f049e){const _0x3a8832=a282_0x44ca9e;if(Array[_0x3a8832(0x1f7)](_0x4b9398)){_0x4b9398[_0x3a8832(0x181)]((_0x24667a,_0x534136)=>removeEmptyMetadata(_0x24667a,_0x5cee1c+'['+_0x534136+']',_0x5ce9a2,_0x4f049e));return;}if(!isRecord(_0x4b9398))return;for(const [_0x6b5891,_0x3a49a4]of Object[_0x3a8832(0xfb)](_0x4b9398)){const _0x27d985=_0x5cee1c+'.'+_0x6b5891;if(_0x6b5891===_0x3a8832(0x139)&&isEmptyJsonValue(_0x3a49a4)){delete _0x4b9398[_0x6b5891],_0x4f049e['push'](_0x27d985),_0x5ce9a2['push']({'code':_0x3a8832(0x1fa),'path':_0x27d985,'message':_0x27d985+_0x3a8832(0x15a)});continue;}removeEmptyMetadata(_0x3a49a4,_0x27d985,_0x5ce9a2,_0x4f049e);}}function isEmptyJsonValue(_0x5b74c9){const _0x4a764f=a282_0x44ca9e;if(_0x5b74c9===null||_0x5b74c9===undefined)return!![];if(typeof _0x5b74c9===_0x4a764f(0xc7))return _0x5b74c9[_0x4a764f(0xd2)]()==='';if(Array['isArray'](_0x5b74c9))return _0x5b74c9[_0x4a764f(0x17b)]===0x0;return isRecord(_0x5b74c9)&&Object[_0x4a764f(0x169)](_0x5b74c9)['length']===0x0;}function isRecord(_0x64b9a5){return typeof _0x64b9a5==='object'&&_0x64b9a5!==null&&!Array['isArray'](_0x64b9a5);}function cloneJsonValue(_0x8fd739){const _0xd7e738=a282_0x44ca9e;return JSON[_0xd7e738(0x117)](JSON[_0xd7e738(0xac)](_0x8fd739));}export async function readFlowConfigFile(_0x34cc9c){const _0x52b419=a282_0x44ca9e,_0xa77295=await readFile(resolve(_0x34cc9c),_0x52b419(0x16d));return JSON['parse'](_0xa77295);}
|
|
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_0x9d2c59=a284_0x3a85;(function(_0x569b3c,_0x5c1cd5){const _0x250843=a284_0x3a85,_0x1a2334=_0x569b3c();while(!![]){try{const _0x3b26b3=-parseInt(_0x250843(0xf1))/0x1*(parseInt(_0x250843(0xc5))/0x2)+parseInt(_0x250843(0xc7))/0x3*(-parseInt(_0x250843(0xb3))/0x4)+parseInt(_0x250843(0xfb))/0x5+-parseInt(_0x250843(0xc0))/0x6*(-parseInt(_0x250843(0xed))/0x7)+parseInt(_0x250843(0xc9))/0x8*(parseInt(_0x250843(0xf6))/0x9)+-parseInt(_0x250843(0xa7))/0xa*(-parseInt(_0x250843(0xa3))/0xb)+parseInt(_0x250843(0xda))/0xc*(-parseInt(_0x250843(0xd2))/0xd);if(_0x3b26b3===_0x5c1cd5)break;else _0x1a2334['push'](_0x1a2334['shift']());}catch(_0x37f61e){_0x1a2334['push'](_0x1a2334['shift']());}}}(a284_0x3fec,0x67768));function a284_0x3a85(_0x481708,_0x44d3da){_0x481708=_0x481708-0xa3;const _0x3fec19=a284_0x3fec();let _0x3a85b5=_0x3fec19[_0x481708];return _0x3a85b5;}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a284_0x9d2c59(0xb7),'profile',a284_0x9d2c59(0xc1),a284_0x9d2c59(0xf2),a284_0x9d2c59(0xfc),'timingsMs'],HIT_KEYS=[a284_0x9d2c59(0xc3),a284_0x9d2c59(0xb8),a284_0x9d2c59(0xc4),'scope',a284_0x9d2c59(0xe1),a284_0x9d2c59(0xcf),a284_0x9d2c59(0xd7),a284_0x9d2c59(0xb9),a284_0x9d2c59(0xab),'finalScore',a284_0x9d2c59(0xe5)];export function normalizeKbServiceOrigin(_0x39a02e){const _0x2165c1=a284_0x9d2c59,_0x4f9457=()=>CliErrors[_0x2165c1(0xd1)](_0x2165c1(0xdb)),_0x196110=_0x39a02e?.[_0x2165c1(0xd0)]();if(!_0x196110||/[\u0000-\u0020\u007f]/[_0x2165c1(0xfe)](_0x196110)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x2165c1(0xfe)](_0x196110))throw _0x4f9457();let _0x430a78;try{_0x430a78=new URL(_0x196110);}catch{throw _0x4f9457();}if(_0x430a78['protocol']!==_0x2165c1(0xd8)||!_0x430a78['hostname']||_0x430a78[_0x2165c1(0xdc)]||_0x430a78['password']||_0x430a78[_0x2165c1(0xe8)]!=='/'||_0x430a78[_0x2165c1(0xae)]||_0x430a78[_0x2165c1(0xdf)])throw _0x4f9457();return _0x430a78[_0x2165c1(0xea)];}export async function searchDirectKnowledge(_0x3bab89){const _0x56a339=a284_0x9d2c59,_0x2a82ac=_0x3bab89[_0x56a339(0xb1)][_0x56a339(0xd0)](),_0x471497=_0x3bab89[_0x56a339(0xf4)]['trim']();if(!_0x2a82ac)throw CliErrors[_0x56a339(0xd1)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0x3bab89[_0x56a339(0xe6)]['trim']())throw CliErrors[_0x56a339(0xf9)]();if(!_0x471497)throw CliErrors['validation'](_0x56a339(0xc8));validateTopK(_0x3bab89['topK']);const _0x3a652a=normalizeKbServiceOrigin(_0x3bab89[_0x56a339(0xce)]),_0x2977bb=AbortSignal[_0x56a339(0xac)](0xea60),_0x487092=_0x3bab89['signal']?AbortSignal[_0x56a339(0xe3)]([_0x3bab89[_0x56a339(0xb2)],_0x2977bb]):_0x2977bb;let _0xd49c0c;try{_0xd49c0c=await fetch(_0x3a652a+_0x56a339(0xbd)+encodeURIComponent(_0x2a82ac)+_0x56a339(0xfd),{'method':'POST','redirect':_0x56a339(0xf8),'headers':{'Content-Type':_0x56a339(0xf7),'Cookie':_0x3bab89[_0x56a339(0xe6)],'X-Invoke-Source':_0x56a339(0xeb)},'body':JSON[_0x56a339(0xbe)]({'query':_0x471497,..._0x3bab89[_0x56a339(0xcb)]!==undefined?{'topK':_0x3bab89[_0x56a339(0xcb)]}:{}}),'signal':_0x487092});}catch(_0x4bfa46){if(_0x3bab89[_0x56a339(0xb2)]?.[_0x56a339(0xa8)])throw new DOMException(_0x56a339(0xec),_0x56a339(0xd5));if(_0x4bfa46 instanceof Error&&_0x4bfa46[_0x56a339(0xbb)]===_0x56a339(0xf3))throw CliErrors[_0x56a339(0xef)](_0x56a339(0xaa));throw CliErrors[_0x56a339(0xef)](_0x56a339(0xe2));}if(_0xd49c0c['status']===0x191)throw CliErrors[_0x56a339(0xf9)]();if(_0xd49c0c['status']===0x1ad)throw CliErrors['apiError'](_0x56a339(0xee));if(!_0xd49c0c['ok'])throw CliErrors[_0x56a339(0xff)]('KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20'+_0xd49c0c[_0x56a339(0xde)]+').');if(!hasNoStore(_0xd49c0c['headers']))throw CliErrors[_0x56a339(0xff)](_0x56a339(0xe9));if(!(_0xd49c0c['headers'][_0x56a339(0xe7)](_0x56a339(0xc2))??'')['toLowerCase']()[_0x56a339(0xa4)](_0x56a339(0xf7)))throw CliErrors[_0x56a339(0xff)](_0x56a339(0xb0));let _0x182411;try{_0x182411=await _0xd49c0c['json']();}catch(_0x1d9c0d){if(_0x3bab89[_0x56a339(0xb2)]?.[_0x56a339(0xa8)])throw new DOMException(_0x56a339(0xec),_0x56a339(0xd5));if(_0x2977bb[_0x56a339(0xa8)]||_0x1d9c0d instanceof Error&&_0x1d9c0d[_0x56a339(0xbb)]===_0x56a339(0xf3))throw CliErrors[_0x56a339(0xef)](_0x56a339(0xaa));throw CliErrors['apiError'](_0x56a339(0xa6));}try{const _0xf1d3a5=requireExactRecord(_0x182411,['hits','strategyFingerprint',_0x56a339(0xb6)],_0x56a339(0xb5));if(!Array['isArray'](_0xf1d3a5[_0x56a339(0xf2)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':'development','total':_0xf1d3a5['hits'][_0x56a339(0xd6)],'hits':_0xf1d3a5['hits'],'strategyFingerprint':_0xf1d3a5[_0x56a339(0xfc)],'timingsMs':_0xf1d3a5[_0x56a339(0xb6)]},_0x3bab89['topK']??0xa);}catch(_0x5e2859){if(_0x5e2859 instanceof CliError)throw CliErrors['apiError'](_0x56a339(0xf0));throw _0x5e2859;}}function a284_0x3fec(){const _0x3cad23=['Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','2337144nUAqjx','Knowledge\x20search\x20query\x20is\x20required.','24pVQqKG','isArray','topK','toLowerCase','no-store','serviceUrl','text','trim','validation','299HdnGiC','string','finalScore','AbortError','length','tags','https:','number','52788VzKAjz','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','username','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','status','hash','sort','title','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','any','keys','scoreKind','cookie','get','pathname','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','origin','cli:rabetbase','Knowledge\x20search\x20cancelled.','15981vgpsVl','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','networkError','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','146vjEQYM','hits','TimeoutError','query','map','1162899lxhXjz','application/json','error','authRequired','isSafeInteger','1886015zklFYC','strategyFingerprint','/knowledge/search','test','apiError','2211oJTkCL','includes','some','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','23020wLtzQO','aborted','public','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','rawScore','timeout','development','search','scope','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','appCode','signal','4tEQrpd','profile','response','timingsMs','schemaVersion','revision','rank','object','name','entries','/v2/development/apps/','stringify','company','450MkvUIk','total','content-type','documentId','chunkId','1298mxyRVh'];a284_0x3fec=function(){return _0x3cad23;};return a284_0x3fec();}function validateTopK(_0x2573e0){const _0x1cc1f0=a284_0x9d2c59;if(_0x2573e0!==undefined&&(!Number[_0x1cc1f0(0xfa)](_0x2573e0)||_0x2573e0<0x1||_0x2573e0>0x32))throw CliErrors[_0x1cc1f0(0xd1)](_0x1cc1f0(0xc6));}function hasNoStore(_0x38616f){const _0x9b47ee=a284_0x9d2c59;return(_0x38616f[_0x9b47ee(0xe7)]('cache-control')??'')['split'](',')['some'](_0x3435f3=>_0x3435f3[_0x9b47ee(0xd0)]()[_0x9b47ee(0xcc)]()===_0x9b47ee(0xcd));}function parseDevelopmentSearchResponse(_0xcdd559,_0x38f371){const _0xfd5702=a284_0x9d2c59,_0x45ceb6=requireExactRecord(_0xcdd559,RESPONSE_KEYS,_0xfd5702(0xb5));if(_0x45ceb6['schemaVersion']!==0x2||_0x45ceb6[_0xfd5702(0xb4)]!==_0xfd5702(0xad))throw invalidContract(_0xfd5702(0xb4));if(!Array['isArray'](_0x45ceb6[_0xfd5702(0xf2)])||_0x45ceb6[_0xfd5702(0xf2)][_0xfd5702(0xd6)]>(_0x38f371??0x32))throw invalidContract(_0xfd5702(0xf2));if(typeof _0x45ceb6[_0xfd5702(0xfc)]!==_0xfd5702(0xd3)||!/^sha256:[0-9a-f]{64}$/[_0xfd5702(0xfe)](_0x45ceb6['strategyFingerprint']))throw invalidContract(_0xfd5702(0xfc));const _0x48a1fd=requireRecord(_0x45ceb6['timingsMs'],_0xfd5702(0xb6)),_0x328550={};for(const [_0x1a68cf,_0xf21910]of Object[_0xfd5702(0xbc)](_0x48a1fd)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xfd5702(0xfe)](_0x1a68cf)||typeof _0xf21910!==_0xfd5702(0xd9)||!Number['isFinite'](_0xf21910)||_0xf21910<0x0)throw invalidContract(_0xfd5702(0xb6));_0x328550[_0x1a68cf]=_0xf21910;}const _0x5530c6=_0x45ceb6[_0xfd5702(0xf2)][_0xfd5702(0xf5)]((_0x299553,_0x817503)=>parseHit(_0x299553,_0x817503));if(!Number['isSafeInteger'](_0x45ceb6[_0xfd5702(0xc1)])||_0x45ceb6[_0xfd5702(0xc1)]!==_0x5530c6[_0xfd5702(0xd6)])throw invalidContract(_0xfd5702(0xc1));return{'schemaVersion':_0x45ceb6[_0xfd5702(0xb7)],'profile':_0x45ceb6[_0xfd5702(0xb4)],'total':_0x45ceb6[_0xfd5702(0xc1)],'strategyFingerprint':_0x45ceb6[_0xfd5702(0xfc)],'timingsMs':_0x328550,'hits':_0x5530c6};}function parseHit(_0x2e1836,_0x4ca4b4){const _0x501747=a284_0x9d2c59,_0x4f2b79=requireExactRecord(_0x2e1836,HIT_KEYS,'hits['+_0x4ca4b4+']'),_0xb0716=_0x469af7=>{const _0x4eb373=a284_0x3a85,_0x166cd0=_0x4f2b79[_0x469af7];if(typeof _0x166cd0!==_0x4eb373(0xd3)||!_0x166cd0)throw invalidContract(_0x469af7);return _0x166cd0;};if(!Number['isSafeInteger'](_0x4f2b79['revision'])||_0x4f2b79[_0x501747(0xb8)]<0x1)throw invalidContract('revision');if(_0x4f2b79[_0x501747(0xaf)]!==_0x501747(0xa9)&&_0x4f2b79[_0x501747(0xaf)]!==_0x501747(0xbf))throw invalidContract(_0x501747(0xaf));if(typeof _0x4f2b79[_0x501747(0xe1)]!==_0x501747(0xd3)||typeof _0x4f2b79['text']!==_0x501747(0xd3))throw invalidContract(_0x501747(0xcf));if(!Array[_0x501747(0xca)](_0x4f2b79[_0x501747(0xd7)])||_0x4f2b79[_0x501747(0xd7)][_0x501747(0xa5)](_0x11faa6=>typeof _0x11faa6!=='string'))throw invalidContract(_0x501747(0xd7));if(!Number[_0x501747(0xfa)](_0x4f2b79['rank'])||_0x4f2b79[_0x501747(0xb9)]!==_0x4ca4b4+0x1)throw invalidContract(_0x501747(0xb9));if(!isFiniteNumber(_0x4f2b79[_0x501747(0xab)])||!isFiniteNumber(_0x4f2b79[_0x501747(0xd4)]))throw invalidContract('score');return{'documentId':_0xb0716(_0x501747(0xc3)),'revision':_0x4f2b79[_0x501747(0xb8)],'chunkId':_0xb0716(_0x501747(0xc4)),'scope':_0x4f2b79[_0x501747(0xaf)],'title':_0x4f2b79[_0x501747(0xe1)],'text':_0x4f2b79['text'],'tags':[..._0x4f2b79['tags']],'rank':_0x4f2b79[_0x501747(0xb9)],'rawScore':_0x4f2b79['rawScore'],'finalScore':_0x4f2b79[_0x501747(0xd4)],'scoreKind':_0xb0716(_0x501747(0xe5))};}function requireExactRecord(_0x3bc5ec,_0x3f29bd,_0x12e3db){const _0x1b026e=a284_0x9d2c59,_0x2ddbc9=requireRecord(_0x3bc5ec,_0x12e3db),_0x1dd943=Object[_0x1b026e(0xe4)](_0x2ddbc9)[_0x1b026e(0xe0)](),_0x5e1e83=[..._0x3f29bd][_0x1b026e(0xe0)]();if(_0x1dd943[_0x1b026e(0xd6)]!==_0x5e1e83[_0x1b026e(0xd6)]||_0x1dd943[_0x1b026e(0xa5)]((_0x528083,_0x1f4a3f)=>_0x528083!==_0x5e1e83[_0x1f4a3f]))throw invalidContract(_0x12e3db);return _0x2ddbc9;}function requireRecord(_0x3f233d,_0x143d2b){const _0x28ea5a=a284_0x9d2c59;if(!_0x3f233d||typeof _0x3f233d!==_0x28ea5a(0xba)||Array[_0x28ea5a(0xca)](_0x3f233d))throw invalidContract(_0x143d2b);return _0x3f233d;}function isFiniteNumber(_0x339523){return typeof _0x339523==='number'&&Number['isFinite'](_0x339523);}function invalidContract(_0x2cc7a9){const _0x1eed13=a284_0x9d2c59;return CliErrors[_0x1eed13(0xff)](_0x1eed13(0xdd)+_0x2cc7a9+'\x20contract.');}
|
|
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
|
-
(function(
|
|
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();}
|