@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/core/flow-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a299_0x565b99=a299_0x386c;(function(_0x31b24b,_0x59fb57){const _0x7fb5e8=a299_0x386c,_0x1c143b=_0x31b24b();while(!![]){try{const _0xeb3771=-parseInt(_0x7fb5e8(0x11b))/0x1+-parseInt(_0x7fb5e8(0xe8))/0x2+-parseInt(_0x7fb5e8(0x20d))/0x3+-parseInt(_0x7fb5e8(0x16e))/0x4+parseInt(_0x7fb5e8(0x20b))/0x5*(-parseInt(_0x7fb5e8(0xe9))/0x6)+-parseInt(_0x7fb5e8(0x1ec))/0x7*(-parseInt(_0x7fb5e8(0xf2))/0x8)+-parseInt(_0x7fb5e8(0x18c))/0x9*(-parseInt(_0x7fb5e8(0x1aa))/0xa);if(_0xeb3771===_0x59fb57)break;else _0x1c143b['push'](_0x1c143b['shift']());}catch(_0xa9518e){_0x1c143b['push'](_0x1c143b['shift']());}}}(a299_0x5e1f,0x8aed2));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0x565b99(0x17f),'$id':a299_0x565b99(0x10a),'title':'Rabetbase\x20FlowConfig','type':'object','required':[a299_0x565b99(0x179),'flowType',a299_0x565b99(0x1f9)],'$defs':{'userId':{'anyOf':[{'type':a299_0x565b99(0x21b),'minLength':0x1},{'type':a299_0x565b99(0x135),'minimum':0x1}]},'position':{'type':'object','required':['x','y'],'properties':{'x':{'type':a299_0x565b99(0x1c0),'minimum':0x0},'y':{'type':a299_0x565b99(0x1c0),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x149),a299_0x565b99(0x1ce)],'properties':{'value':{'type':a299_0x565b99(0x135),'minimum':0x1},'unit':{'enum':['SECONDS','MINUTES',a299_0x565b99(0x13b),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a299_0x565b99(0x1e4),'required':['id',a299_0x565b99(0x174),a299_0x565b99(0xf4),'position'],'properties':{'id':{'type':a299_0x565b99(0x21b),'pattern':a299_0x565b99(0xc5)},'type':{'enum':[a299_0x565b99(0xd1),a299_0x565b99(0x199),'APPROVAL',a299_0x565b99(0x1a1),a299_0x565b99(0x1df),a299_0x565b99(0x11e)]},'name':{'type':'string','minLength':0x1},'path':{'type':a299_0x565b99(0x21b),'minLength':0x1},'position':{'$ref':a299_0x565b99(0x124)},'approvalMode':{'enum':['SINGLE',a299_0x565b99(0xe6),a299_0x565b99(0x12b)]},'taskMode':{'enum':['APPROVAL',a299_0x565b99(0x1ea)]},'assignee':{'type':'object','required':[a299_0x565b99(0x162)],'properties':{'strategy':{'enum':[a299_0x565b99(0x134),a299_0x565b99(0x18a)]},'userIds':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x120)}},'roleId':{'anyOf':[{'type':'integer','minimum':0x1},{'type':a299_0x565b99(0x21b),'pattern':'^[1-9][0-9]*$'}]}},'additionalProperties':!![]},'transferCandidates':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x162),a299_0x565b99(0x1c9)],'properties':{'strategy':{'const':a299_0x565b99(0x134)},'userIds':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x120)}}},'additionalProperties':!![]},'sequential':{'type':a299_0x565b99(0x1e9)},'result':{'enum':[a299_0x565b99(0x219),a299_0x565b99(0xdd)]},'scriptName':{'type':a299_0x565b99(0x21b),'minLength':0x1},'resultVariable':{'type':'string','pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a299_0x565b99(0x1e4),'properties':{'enabled':{'type':a299_0x565b99(0x1e9)},'retryCount':{'type':a299_0x565b99(0x135),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x565b99(0xfb)}},'additionalProperties':!![]},'timeout':{'type':'object','properties':{'enabled':{'type':a299_0x565b99(0x1e9)},'duration':{'$ref':a299_0x565b99(0xfb)},'action':{'enum':['AUTO_APPROVE',a299_0x565b99(0x225),a299_0x565b99(0xd5)]},'interrupting':{'type':a299_0x565b99(0x1e9)},'scriptName':{'type':a299_0x565b99(0x21b),'minLength':0x1},'resultVariable':{'type':'string','pattern':a299_0x565b99(0xc5)}},'additionalProperties':!![]},'cc':{'type':'object','required':['recipientUserIds'],'properties':{'recipientUserIds':{'type':'array','minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x565b99(0x21b),'minLength':0x1}},'visible':{'type':a299_0x565b99(0x18f),'uniqueItems':!![],'items':{'type':a299_0x565b99(0x21b),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':'object','required':[a299_0x565b99(0x215),a299_0x565b99(0x1f4)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x565b99(0x21b),'minLength':0x1},'failurePolicy':{'enum':[a299_0x565b99(0xd6),a299_0x565b99(0x1e7)]},'template':{'type':a299_0x565b99(0x1e4),'required':['title','summary'],'properties':{'title':{'type':a299_0x565b99(0x21b),'minLength':0x1},'summary':{'type':'string','minLength':0x1},'detailMarkdown':{'type':a299_0x565b99(0x21b)},'facts':{'type':a299_0x565b99(0x18f),'maxItems':0x8,'items':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x222),a299_0x565b99(0x149)],'properties':{'label':{'type':a299_0x565b99(0x21b),'minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x565b99(0x18f),'maxItems':0x2,'items':{'type':a299_0x565b99(0x1e4),'required':['text',a299_0x565b99(0x126)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':'string','minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x565b99(0x18f),'items':{'type':a299_0x565b99(0x1e4),'required':['type',a299_0x565b99(0x149)],'properties':{'type':{'enum':[a299_0x565b99(0x14e),a299_0x565b99(0x18a),a299_0x565b99(0x1fe)]},'value':{'type':'string','minLength':0x1},'role':{'enum':['TO','CC',a299_0x565b99(0x202)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x565b99(0x1e4),'properties':{'id':{'type':a299_0x565b99(0x21b),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'source':{'type':a299_0x565b99(0x21b),'minLength':0x1},'target':{'type':a299_0x565b99(0x21b),'minLength':0x1},'sourceNodeId':{'type':a299_0x565b99(0x21b),'minLength':0x1},'targetNodeId':{'type':'string','minLength':0x1},'conditionType':{'enum':['ALWAYS',a299_0x565b99(0x219),a299_0x565b99(0xdd),a299_0x565b99(0x115)]},'expression':{'type':'string'},'defaultFlow':{'type':'boolean'},'name':{'type':'string'},'waypoints':{'type':'array','items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x565b99(0x192)]},{'required':[a299_0x565b99(0x1fa)]}]},{'anyOf':[{'required':['target']},{'required':[a299_0x565b99(0x1cd)]}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':a299_0x565b99(0x21b),'minLength':0x1},'flowDesc':{'type':a299_0x565b99(0x21b)},'flowType':{'enum':[a299_0x565b99(0xe1),a299_0x565b99(0x1d1)]},'datasetCode':{'type':'string','minLength':0x1},'pageId':{'type':a299_0x565b99(0x135),'minimum':0x1,'maximum':Number[a299_0x565b99(0xc4)]},'pageIds':{'type':a299_0x565b99(0x18f),'items':{'type':a299_0x565b99(0x135),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':a299_0x565b99(0x1e4),'required':[a299_0x565b99(0x1d8),'edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x565b99(0xff),'description':'Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.'},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x565b99(0x12c)},'startPageId':![],'startPath':{'type':a299_0x565b99(0x21b),'minLength':0x1},'nodes':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x1c3)}},'edges':{'type':a299_0x565b99(0x18f),'minItems':0x1,'items':{'$ref':a299_0x565b99(0x177)}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=['flowKey','flowCode',a299_0x565b99(0x179),'bindDatasetCode',a299_0x565b99(0x136),a299_0x565b99(0x19c),a299_0x565b99(0x1d0),a299_0x565b99(0x193)],REMOVED_ROOT_FIELDS=['id',a299_0x565b99(0x19c),'templateName'],DEFAULT_FLOW_SCHEMA_VERSION='approval.simple-flow.v1',NODE_TYPES=new Set([a299_0x565b99(0xd1),a299_0x565b99(0x199),a299_0x565b99(0x11f),a299_0x565b99(0x1a1),'SCRIPT',a299_0x565b99(0x11e)]),CONDITION_TYPES=new Set([a299_0x565b99(0x167),a299_0x565b99(0x219),a299_0x565b99(0xdd),a299_0x565b99(0x115)]),APPROVAL_MODES=new Set([a299_0x565b99(0x188),'ALL',a299_0x565b99(0x12b)]),APPROVAL_TASK_MODES=new Set([a299_0x565b99(0x11f),a299_0x565b99(0x1ea)]),FLOW_TIME_UNITS=new Set([a299_0x565b99(0x130),a299_0x565b99(0xe3),a299_0x565b99(0x13b),a299_0x565b99(0x172)]),APPROVAL_TIMEOUT_ACTIONS=new Set(['AUTO_APPROVE',a299_0x565b99(0x225),a299_0x565b99(0xd5)]),FLOW_TYPES=new Set([a299_0x565b99(0xe1),a299_0x565b99(0x1d1)]),FLOW_PAGE_MODES=new Set([a299_0x565b99(0x12c),a299_0x565b99(0xf3)]),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0x565b99(0xd6),a299_0x565b99(0x1e7)]),NOTIFICATION_RECIPIENT_TYPES=new Set([a299_0x565b99(0x14e),'ROLE',a299_0x565b99(0x1fe)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x565b99(0x202)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x565b99(0x1d3),UNSUPPORTED_FORM_MESSAGE=a299_0x565b99(0x17b),UNSUPPORTED_PLATFORM_FORM_MESSAGE='PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.',RESERVED_RESULT_VARIABLES=new Set([a299_0x565b99(0x198),'approved',a299_0x565b99(0x121),a299_0x565b99(0x11a),'approval_sys_initiatorUserId',a299_0x565b99(0x168),a299_0x565b99(0x157),a299_0x565b99(0x1ef),'approval_sys_operationType',a299_0x565b99(0x1a2)]);export function normalizeFlowConfig(_0x2fdf1b){const _0xc4e90a=a299_0x565b99;if(!isRecord(_0x2fdf1b))throw new TypeError(_0xc4e90a(0xc9));const _0x38208d=cloneJsonValue(_0x2fdf1b),_0x23b3b3=_0x38208d[_0xc4e90a(0x1f9)],_0x8e24b3=isRecord(_0x23b3b3)?cloneJsonValue(_0x23b3b3):{},_0x5514b7=[],_0x1d8c64=[];for(const _0x4ac5fd of REMOVED_ROOT_FIELDS){if(!Object[_0xc4e90a(0x106)][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x38208d,_0x4ac5fd))continue;delete _0x38208d[_0x4ac5fd],_0x1d8c64['push'](_0x4ac5fd),_0x5514b7[_0xc4e90a(0x13a)]({'code':'legacy_field_removed','path':_0x4ac5fd,'message':_0x4ac5fd+'\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.'});}for(const _0x1b3d79 of REMOVED_FLOW_JSON_FIELDS){if(!Object[_0xc4e90a(0x106)][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x8e24b3,_0x1b3d79))continue;const _0x328519=_0xc4e90a(0x196)+_0x1b3d79;delete _0x8e24b3[_0x1b3d79],_0x1d8c64[_0xc4e90a(0x13a)](_0x328519),_0x5514b7['push']({'code':_0xc4e90a(0x220),'path':_0x328519,'message':_0x328519+_0xc4e90a(0xd3)});}if(Object['prototype'][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x8e24b3,_0xc4e90a(0xd0))){const _0x225518=_0x8e24b3['schemaVersion'],_0x268d39=typeof _0x225518===_0xc4e90a(0x21b)?_0x225518[_0xc4e90a(0x201)]():_0x225518;if(isEmptyJsonValue(_0x225518)||_0x268d39===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4351bc='flowJson.schemaVersion';delete _0x8e24b3[_0xc4e90a(0xd0)],_0x1d8c64[_0xc4e90a(0x13a)](_0x4351bc),_0x5514b7[_0xc4e90a(0x13a)]({'code':_0xc4e90a(0x220),'path':_0x4351bc,'message':_0x4351bc+_0xc4e90a(0x161)+DEFAULT_FLOW_SCHEMA_VERSION+_0xc4e90a(0xe7)});}}removeEmptyMetadata(_0x8e24b3,_0xc4e90a(0x1f9),_0x5514b7,_0x1d8c64);_0x38208d[_0xc4e90a(0x145)]===_0xc4e90a(0x1d1)&&!Object[_0xc4e90a(0x106)][_0xc4e90a(0x18e)][_0xc4e90a(0x19a)](_0x8e24b3,_0xc4e90a(0x14c))&&(_0x8e24b3[_0xc4e90a(0x14c)]='CUSTOM_PAGE');_0x38208d[_0xc4e90a(0x1f9)]=_0x8e24b3;if(typeof _0x38208d[_0xc4e90a(0x179)]==='string')_0x38208d[_0xc4e90a(0x179)]=_0x38208d[_0xc4e90a(0x179)][_0xc4e90a(0x201)]();return{'config':_0x38208d,'warnings':_0x5514b7,'removedPaths':_0x1d8c64};}export function validateFlowConfig(_0x59acd9){const _0x3f4b43=a299_0x565b99;let _0x139ac2;try{_0x139ac2=normalizeFlowConfig(_0x59acd9);}catch(_0x3064dd){const _0x50f19c=_0x3064dd instanceof Error?_0x3064dd[_0x3f4b43(0x13c)]:String(_0x3064dd),_0x290622={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x50f19c}],'warnings':[],'normalized':_0x290622,'validationConfig':_0x290622};}const _0x4a494e=_0x139ac2[_0x3f4b43(0x214)],_0x34339d=cloneJsonValue(_0x4a494e),_0x718ba5=_0x34339d['flowJson'];_0x718ba5[_0x3f4b43(0x176)]=_0x3f4b43(0x14f),_0x718ba5[_0x3f4b43(0x179)]=_0x4a494e[_0x3f4b43(0x179)];typeof _0x4a494e['datasetCode']===_0x3f4b43(0x21b)&&_0x4a494e[_0x3f4b43(0x136)][_0x3f4b43(0x201)]()&&(_0x718ba5['bindDatasetCode']=_0x4a494e[_0x3f4b43(0x136)][_0x3f4b43(0x201)]());const _0x5dee94=[];return validateOuterMetadata(_0x4a494e,_0x5dee94),validateFlowClassification(_0x4a494e,_0x5dee94),validateGraph(_0x4a494e['flowJson'],_0x5dee94),{'valid':_0x5dee94[_0x3f4b43(0x10e)]===0x0,'errors':_0x5dee94,'warnings':_0x139ac2[_0x3f4b43(0x1bf)],'normalized':_0x4a494e,'validationConfig':_0x34339d};}function validateFlowClassification(_0x1b100b,_0x386651){const _0xb5469a=a299_0x565b99;if(!isRecord(_0x1b100b[_0xb5469a(0x1f9)]))return;const _0xa51590=_0x1b100b['flowType'],_0x1f36ea=_0x1b100b[_0xb5469a(0x1f9)][_0xb5469a(0x14c)];_0x1f36ea!==undefined&&(typeof _0x1f36ea!==_0xb5469a(0x21b)||!FLOW_PAGE_MODES['has'](_0x1f36ea))&&_0x386651[_0xb5469a(0x13a)]({'path':_0xb5469a(0xf9),'message':'Unsupported\x20pageMode:\x20'+String(_0x1f36ea)+'.'});_0xa51590==='FORM_FLOW'&&_0x1f36ea!==undefined&&_0x386651[_0xb5469a(0x13a)]({'path':'flowJson.pageMode','message':'pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.'});_0xa51590==='INDEPENDENT_FLOW'&&_0x1f36ea===_0xb5469a(0xf3)&&_0x386651[_0xb5469a(0x13a)]({'path':_0xb5469a(0xf9),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0xa51590===_0xb5469a(0xe1)||_0xa51590===_0xb5469a(0x1d1))&&validateCustomPageNavigation(_0x1b100b,_0xa51590,_0x1f36ea,_0x386651);if(_0xa51590!==_0xb5469a(0xe1)||!Array[_0xb5469a(0x182)](_0x1b100b['flowJson'][_0xb5469a(0x1d8)]))return;_0x1b100b['flowJson']['nodes'][_0xb5469a(0x1e2)]((_0x11b47d,_0x55e020)=>{const _0x30e433=_0xb5469a;isRecord(_0x11b47d)&&_0x11b47d[_0x30e433(0x174)]==='APPROVAL'&&_0x11b47d[_0x30e433(0x16d)]===_0x30e433(0x1ea)&&_0x386651[_0x30e433(0x13a)]({'path':'flowJson.nodes['+_0x55e020+_0x30e433(0x1a5),'message':'FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.'});});}function validateCustomPageNavigation(_0x1f8130,_0x1d77b3,_0x50f602,_0xc2211d){const _0x26e5c2=a299_0x565b99,_0x590bdc=_0x1f8130['flowJson'][_0x26e5c2(0x17a)];_0x590bdc!==undefined&&_0xc2211d[_0x26e5c2(0x13a)]({'path':'flowJson.startPageId','message':'startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.'});const _0x25db63=_0x1f8130[_0x26e5c2(0x1f9)][_0x26e5c2(0x1c1)];_0x25db63!==undefined&&(typeof _0x25db63!=='string'||_0x25db63[_0x26e5c2(0x201)]()==='')&&_0xc2211d[_0x26e5c2(0x13a)]({'path':_0x26e5c2(0x1de),'message':'startPath\x20must\x20be\x20a\x20non-empty\x20string.'});const _0x46fd08=Array[_0x26e5c2(0x182)](_0x1f8130[_0x26e5c2(0x1f9)]['nodes'])?_0x1f8130[_0x26e5c2(0x1f9)][_0x26e5c2(0x1d8)]['map']((_0x263326,_0x50da8a)=>({'node':_0x263326,'index':_0x50da8a}))[_0x26e5c2(0x1b3)](({node:_0x5bcf7b})=>isRecord(_0x5bcf7b)&&_0x5bcf7b['path']!==undefined):[],_0x219a53=_0x25db63!==undefined||_0x46fd08[_0x26e5c2(0x10e)]>0x0,_0x5e9c2=_0x50f602===undefined&&_0x1d77b3===_0x26e5c2(0x1d1)?_0x26e5c2(0x12c):_0x50f602;_0x219a53&&(_0x1d77b3!==_0x26e5c2(0x1d1)||_0x5e9c2!=='CUSTOM_PAGE')&&(_0x25db63!==undefined&&_0xc2211d[_0x26e5c2(0x13a)]({'path':_0x26e5c2(0x1de),'message':_0x26e5c2(0x21a)}),_0x46fd08['forEach'](({index:_0x6ebe9f})=>{const _0x59391c=_0x26e5c2;_0xc2211d[_0x59391c(0x13a)]({'path':_0x59391c(0x1da)+_0x6ebe9f+'].path','message':_0x59391c(0x12a)});}));}export async function writeNormalizedFlowConfig(_0x2b8160,_0x1740de,_0x4ad12f={}){const _0x4f63fc=a299_0x565b99,_0x47d23f=resolve(_0x2b8160),_0x3d8340=_0x47d23f+'.'+process[_0x4f63fc(0xcd)]+'.'+randomUUID()+_0x4f63fc(0x1e3),_0xcdecc3=JSON[_0x4f63fc(0x150)](_0x1740de,null,0x2)+'\x0a';let _0x8abfdc;try{try{_0x8abfdc=(await stat(_0x47d23f))[_0x4f63fc(0x200)]&0x1ff;}catch{_0x8abfdc=undefined;}await writeFile(_0x3d8340,_0xcdecc3,{'encoding':_0x4f63fc(0x153),'flag':'wx','mode':_0x8abfdc??0x1a4});if(_0x8abfdc!==undefined)await chmod(_0x3d8340,_0x8abfdc);_0x4ad12f['overwrite']===![]?(await link(_0x3d8340,_0x47d23f),await unlink(_0x3d8340)):await rename(_0x3d8340,_0x47d23f);}finally{await unlink(_0x3d8340)['catch'](()=>undefined);}}function validateOuterMetadata(_0x5b39f0,_0x457544){const _0x50af88=a299_0x565b99;(typeof _0x5b39f0[_0x50af88(0x179)]!==_0x50af88(0x21b)||_0x5b39f0[_0x50af88(0x179)][_0x50af88(0x201)]()==='')&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x179),'message':_0x50af88(0x218)});_0x5b39f0[_0x50af88(0xf6)]!==undefined&&typeof _0x5b39f0[_0x50af88(0xf6)]!==_0x50af88(0x21b)&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0xf6),'message':_0x50af88(0x11d)});if(_0x5b39f0['flowType']===undefined||_0x5b39f0['flowType']===null)_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x145),'message':_0x50af88(0x1f2)});else(typeof _0x5b39f0['flowType']!=='string'||!FLOW_TYPES[_0x50af88(0x119)](_0x5b39f0[_0x50af88(0x145)]))&&_0x457544['push']({'path':_0x50af88(0x145),'message':_0x50af88(0x1ed)+String(_0x5b39f0[_0x50af88(0x145)])+'.'});_0x5b39f0[_0x50af88(0x136)]!==undefined&&typeof _0x5b39f0[_0x50af88(0x136)]!==_0x50af88(0x21b)&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x136),'message':_0x50af88(0xde)});_0x5b39f0['pageIds']===undefined&&_0x5b39f0[_0x50af88(0x1d0)]!==undefined&&(!Number[_0x50af88(0x10d)](_0x5b39f0[_0x50af88(0x1d0)])||_0x5b39f0[_0x50af88(0x1d0)]<=0x0)&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x1d0),'message':_0x50af88(0xda)});if(_0x5b39f0[_0x50af88(0x156)]!==undefined){if(!Array[_0x50af88(0x182)](_0x5b39f0[_0x50af88(0x156)])||_0x5b39f0['pageIds']['some'](_0x196c6a=>!Number[_0x50af88(0x10d)](_0x196c6a)||_0x196c6a<=0x0))_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x156),'message':_0x50af88(0x1b2)});else[...new Set(_0x5b39f0[_0x50af88(0x156)])][_0x50af88(0x143)](',')[_0x50af88(0x10e)]>0x800&&_0x457544['push']({'path':_0x50af88(0x156),'message':_0x50af88(0x1fc)});_0x5b39f0['flowType']===_0x50af88(0x1d1)&&Array['isArray'](_0x5b39f0[_0x50af88(0x156)])&&_0x5b39f0[_0x50af88(0x156)][_0x50af88(0x10e)]>0x0&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x156),'message':_0x50af88(0x186)});}_0x5b39f0[_0x50af88(0x145)]===_0x50af88(0x1d1)&&_0x5b39f0['datasetCode']!==undefined&&_0x457544[_0x50af88(0x13a)]({'path':_0x50af88(0x136),'message':_0x50af88(0x15c)}),_0x5b39f0[_0x50af88(0x145)]==='INDEPENDENT_FLOW'&&_0x5b39f0[_0x50af88(0x156)]===undefined&&_0x5b39f0['pageId']!==undefined&&_0x457544[_0x50af88(0x13a)]({'path':'pageId','message':_0x50af88(0x19b)});}function validateGraph(_0x378861,_0x4d3f26){const _0x2f482b=a299_0x565b99;if(!isRecord(_0x378861)){_0x4d3f26['push']({'path':_0x2f482b(0x1f9),'message':_0x2f482b(0x178)});return;}!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0x1d8)])&&_0x4d3f26[_0x2f482b(0x13a)]({'path':_0x2f482b(0x1e0),'message':'nodes\x20must\x20be\x20an\x20array.'});!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0xe5)])&&_0x4d3f26['push']({'path':_0x2f482b(0x107),'message':'edges\x20must\x20be\x20an\x20array.'});Object['prototype'][_0x2f482b(0x18e)][_0x2f482b(0x19a)](_0x378861,_0x2f482b(0xd0))&&_0x4d3f26['push']({'path':_0x2f482b(0x114),'message':_0x2f482b(0xfa)+String(_0x378861[_0x2f482b(0xd0)])+'.\x20This\x20CLI\x20supports\x20only\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x523281 of['formSchema',_0x2f482b(0x103),_0x2f482b(0x11c)]){Object['prototype'][_0x2f482b(0x18e)][_0x2f482b(0x19a)](_0x378861,_0x523281)&&_0x4d3f26[_0x2f482b(0x13a)]({'path':_0x2f482b(0x196)+_0x523281,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0x1d8)])||!Array[_0x2f482b(0x182)](_0x378861[_0x2f482b(0xe5)]))return;const _0x57833d=new Map(),_0x35e71d=[],_0x12b565=[],_0x4b6e1e=new Map(),_0x2338fa=new Map(),_0x506504=new Set();let _0x555e6c=0x0;_0x378861[_0x2f482b(0x1d8)][_0x2f482b(0x1e2)]((_0x2a643d,_0x361347)=>{const _0x3c38c1=_0x2f482b,_0x26f3f2='flowJson.nodes['+_0x361347+']';if(!isRecord(_0x2a643d)){_0x4d3f26[_0x3c38c1(0x13a)]({'path':_0x26f3f2,'message':'node\x20must\x20be\x20an\x20object.'});return;}const _0x5c7a5d=_0x2a643d;if(typeof _0x5c7a5d['id']!==_0x3c38c1(0x21b)||!BPMN_ID_PATTERN[_0x3c38c1(0x140)](_0x5c7a5d['id']))_0x4d3f26[_0x3c38c1(0x13a)]({'path':_0x26f3f2+_0x3c38c1(0x21d),'message':_0x3c38c1(0x1dd)});else _0x57833d[_0x3c38c1(0x119)](_0x5c7a5d['id'])?_0x4d3f26[_0x3c38c1(0x13a)]({'path':_0x26f3f2+_0x3c38c1(0x21d),'message':_0x3c38c1(0x1dc)+_0x5c7a5d['id']+'.'}):(_0x57833d[_0x3c38c1(0x191)](_0x5c7a5d['id'],_0x5c7a5d),_0x506504['add'](_0x5c7a5d['id']));if(!NODE_TYPES['has'](_0x5c7a5d[_0x3c38c1(0x174)]))_0x4d3f26['push']({'path':_0x26f3f2+_0x3c38c1(0x21f),'message':_0x3c38c1(0x1d9)+String(_0x5c7a5d[_0x3c38c1(0x174)])+'.'});else{if(_0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0xd1))_0x35e71d[_0x3c38c1(0x13a)](_0x5c7a5d['id']);else _0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0x199)&&_0x12b565[_0x3c38c1(0x13a)](_0x5c7a5d['id']);}_0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0x11f)&&(_0x5c7a5d[_0x3c38c1(0x16d)]===undefined||_0x5c7a5d[_0x3c38c1(0x16d)]===_0x3c38c1(0x11f))&&(_0x555e6c+=0x1);validateNode(_0x5c7a5d,_0x26f3f2,_0x4d3f26);if(_0x5c7a5d[_0x3c38c1(0x174)]===_0x3c38c1(0x1df)){const _0x3ad905=resolveEffectiveResultVariable(_0x5c7a5d[_0x3c38c1(0x208)],![]);_0x3ad905&&(registerResultVariableOwner(_0x2338fa,_0x3ad905,_0x5c7a5d['id'],_0x4d3f26),!_0x4b6e1e['has'](_0x3ad905)&&_0x4b6e1e['set'](_0x3ad905,_0x5c7a5d['id']));}if(_0x5c7a5d['type']===_0x3c38c1(0x11f)&&isRecord(_0x5c7a5d[_0x3c38c1(0x13d)])&&_0x5c7a5d[_0x3c38c1(0x13d)]['enabled']===!![]&&_0x5c7a5d[_0x3c38c1(0x13d)]['action']===_0x3c38c1(0xd5)){const _0x3bc922=resolveEffectiveResultVariable(_0x5c7a5d[_0x3c38c1(0x13d)][_0x3c38c1(0x208)],!![]);_0x3bc922&®isterResultVariableOwner(_0x2338fa,_0x3bc922,_0x5c7a5d['id']+'.timeout',_0x4d3f26);}});_0x35e71d[_0x2f482b(0x10e)]!==0x1&&_0x4d3f26[_0x2f482b(0x13a)]({'path':'flowJson.nodes','message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x12b565['length']===0x0&&_0x4d3f26[_0x2f482b(0x13a)]({'path':_0x2f482b(0x1e0),'message':'Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.'});const _0x5014b5=new Map(),_0x2ffadd=new Map(),_0x2e2db2=new Map(),_0x4d48f1=new Set();_0x378861[_0x2f482b(0xe5)][_0x2f482b(0x1e2)]((_0x17843e,_0xd8a30b)=>{const _0xe2d912=_0x2f482b,_0x1e3125=_0xe2d912(0x148)+_0xd8a30b+']';if(!isRecord(_0x17843e)){_0x4d3f26['push']({'path':_0x1e3125,'message':_0xe2d912(0x10f)});return;}const _0x4d8aa3=_0x17843e;_0x2e2db2[_0xe2d912(0x191)](_0x4d8aa3,_0x1e3125);const _0x404732=resolveEdgeEndpoint(_0x4d8aa3['source'],_0x4d8aa3[_0xe2d912(0x1fa)]),_0x108d62=resolveEdgeEndpoint(_0x4d8aa3[_0xe2d912(0x1c8)],_0x4d8aa3[_0xe2d912(0x1cd)]);if(!_0x404732)_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+'.source','message':_0xe2d912(0x1e1)});if(!_0x108d62)_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0xed),'message':_0xe2d912(0x138)});_0x404732&&!_0x57833d['has'](_0x404732)&&_0x4d3f26['push']({'path':_0x1e3125+'.source','message':_0xe2d912(0x1c6)+_0x404732+'.'});_0x108d62&&!_0x57833d['has'](_0x108d62)&&_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0xed),'message':_0xe2d912(0x129)+_0x108d62+'.'});if(_0x4d8aa3['id']!==undefined){if(typeof _0x4d8aa3['id']!==_0xe2d912(0x21b)||!BPMN_ID_PATTERN[_0xe2d912(0x140)](_0x4d8aa3['id']))_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0x21d),'message':_0xe2d912(0x221)});else{if(_0x506504[_0xe2d912(0x119)](_0x4d8aa3['id']))_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125+_0xe2d912(0x21d),'message':'Duplicate\x20BPMN\x20element\x20id:\x20'+_0x4d8aa3['id']+'.'});else!_0x506504[_0xe2d912(0x119)](_0x4d8aa3['id'])&&_0x506504[_0xe2d912(0xce)](_0x4d8aa3['id']);}}if(_0x404732&&_0x108d62){const _0x95b23f=_0x404732+'\x00'+_0x108d62+'\x00'+(_0x4d8aa3[_0xe2d912(0x1b7)]??_0xe2d912(0x167));_0x4d48f1[_0xe2d912(0x119)](_0x95b23f)?_0x4d3f26[_0xe2d912(0x13a)]({'path':_0x1e3125,'message':_0xe2d912(0x19e)+_0x404732+_0xe2d912(0xee)+_0x108d62+'\x20('+(_0x4d8aa3['conditionType']??_0xe2d912(0x167))+').'}):_0x4d48f1['add'](_0x95b23f);}validateEdge(_0x4d8aa3,_0x1e3125,_0x4d3f26),_0x404732&&_0x108d62&&(_0x5014b5[_0xe2d912(0x1c2)](_0x404732)?.[_0xe2d912(0x13a)](_0x4d8aa3)??_0x5014b5['set'](_0x404732,[_0x4d8aa3]),_0x2ffadd[_0xe2d912(0x1c2)](_0x108d62)?.['push'](_0x4d8aa3)??_0x2ffadd['set'](_0x108d62,[_0x4d8aa3]));});if(_0x35e71d[_0x2f482b(0x10e)]!==0x1)return;validateGraphShape(_0x57833d,_0x35e71d[0x0],_0x12b565,_0x5014b5,_0x2ffadd,_0x2e2db2,_0x4d3f26),validateScriptResultReferences(_0x57833d,_0x35e71d[0x0],_0x5014b5,_0x2ffadd,_0x2e2db2,_0x4b6e1e,_0x4d3f26),validateApprovalResults(_0x57833d,_0x555e6c,_0x12b565,_0x4d3f26);}function validateNode(_0x3f1270,_0x55fa00,_0x239c44){const _0x10624f=a299_0x565b99;for(const _0x1642a7 of[_0x10624f(0xea),_0x10624f(0x1a0)]){Object['prototype']['hasOwnProperty'][_0x10624f(0x19a)](_0x3f1270,_0x1642a7)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.'+_0x1642a7,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x10624f(0x119)](_0x3f1270['type']))return;(typeof _0x3f1270[_0x10624f(0xf4)]!=='string'||_0x3f1270[_0x10624f(0xf4)]['trim']()==='')&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x194),'message':_0x10624f(0x15f)});_0x3f1270[_0x10624f(0x1d0)]!==undefined&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x183),'message':_0x10624f(0x12f)});if(_0x3f1270[_0x10624f(0x15d)]!==undefined){if(typeof _0x3f1270[_0x10624f(0x15d)]!=='string'||_0x3f1270[_0x10624f(0x15d)][_0x10624f(0x201)]()==='')_0x239c44['push']({'path':_0x55fa00+_0x10624f(0x1d5),'message':_0x10624f(0x170)});else _0x3f1270[_0x10624f(0x174)]!==_0x10624f(0x11f)&&_0x3f1270[_0x10624f(0x174)]!==_0x10624f(0x199)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1d5),'message':_0x10624f(0x1d4)});}const _0x5d905e=_0x3f1270[_0x10624f(0x14b)];if(!isRecord(_0x5d905e))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0xca),'message':_0x10624f(0x160)});else for(const _0x26261d of['x','y']){const _0x37b2f4=_0x5d905e[_0x26261d];(typeof _0x37b2f4!==_0x10624f(0x1c0)||!Number[_0x10624f(0x1fd)](_0x37b2f4)||_0x37b2f4<0x0)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x20f)+_0x26261d,'message':_0x10624f(0x224)+_0x26261d+_0x10624f(0x113)});}if(_0x3f1270[_0x10624f(0x174)]===_0x10624f(0x11f)){const _0x674811=_0x3f1270[_0x10624f(0x1f0)]??_0x10624f(0x188),_0x4e72b7=_0x3f1270['taskMode']??'APPROVAL';!APPROVAL_TASK_MODES[_0x10624f(0x119)](_0x4e72b7)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.taskMode','message':'Unsupported\x20task\x20mode:\x20'+String(_0x4e72b7)+'.'});!APPROVAL_MODES[_0x10624f(0x119)](_0x674811)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x154),'message':_0x10624f(0x211)+String(_0x674811)+'.'});if(!isRecord(_0x3f1270['assignee']))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x128),'message':_0x10624f(0xfe)});else{const _0x2f8bcf=_0x3f1270[_0x10624f(0x109)][_0x10624f(0x162)];_0x2f8bcf!=='FIXED'&&_0x2f8bcf!==_0x10624f(0x18a)&&_0x239c44['push']({'path':_0x55fa00+_0x10624f(0xdf),'message':_0x10624f(0x1fb)});if(_0x2f8bcf===_0x10624f(0x134)){const _0x4f5b9d=_0x3f1270[_0x10624f(0x109)][_0x10624f(0x1c9)];if(!Array[_0x10624f(0x182)](_0x4f5b9d)||_0x4f5b9d[_0x10624f(0x10e)]===0x0)_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x13e),'message':_0x10624f(0x1b4)});else{const _0x51dd32=_0x4f5b9d[_0x10624f(0x223)](_0x40c221=>!isValidUserId(_0x40c221));_0x51dd32>=0x0&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1ca)+_0x51dd32+']','message':'fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});const _0x16e840=new Set(_0x4f5b9d[_0x10624f(0x1b3)](isValidUserId)[_0x10624f(0xfc)](_0x3c91f6=>String(_0x3c91f6)[_0x10624f(0x201)]()));_0x674811===_0x10624f(0x188)&&_0x16e840[_0x10624f(0xf8)]>0x1&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x13e),'message':_0x10624f(0x1ab)});}}if(_0x2f8bcf===_0x10624f(0x18a)){const _0x381fe4=_0x3f1270[_0x10624f(0x109)][_0x10624f(0x164)],_0x436e7f=typeof _0x381fe4==='number'||typeof _0x381fe4==='string'?Number(String(_0x381fe4)['trim']()):Number['NaN'];(!Number[_0x10624f(0x10d)](_0x436e7f)||_0x436e7f<=0x0)&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x16c),'message':_0x10624f(0x137)});}}if(_0x3f1270[_0x10624f(0xd8)]!==undefined){if(!isRecord(_0x3f1270[_0x10624f(0xd8)]))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.transferCandidates','message':_0x10624f(0x1be)});else{if(_0x3f1270['transferCandidates']['strategy']!=='FIXED')_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x14a),'message':'transferCandidates\x20currently\x20supports\x20FIXED\x20only.'});else{const _0x3d4391=_0x3f1270[_0x10624f(0xd8)]['userIds'];if(!Array['isArray'](_0x3d4391)||_0x3d4391[_0x10624f(0x10e)]===0x0)_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1c7),'message':_0x10624f(0xcc)});else{const _0x488fb0=_0x3d4391[_0x10624f(0x223)](_0x5e4d4f=>!isValidUserId(_0x5e4d4f));_0x488fb0>=0x0&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x1a3)+_0x488fb0+']','message':_0x10624f(0x1cc)});}}}}}_0x3f1270[_0x10624f(0x110)]!==undefined&&typeof _0x3f1270['sequential']!==_0x10624f(0x1e9)&&_0x239c44['push']({'path':_0x55fa00+_0x10624f(0x112),'message':_0x10624f(0x19f)});if(_0x3f1270[_0x10624f(0x174)]===_0x10624f(0x1df)){(typeof _0x3f1270[_0x10624f(0x209)]!==_0x10624f(0x21b)||_0x3f1270[_0x10624f(0x209)][_0x10624f(0x201)]()==='')&&_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+'.scriptName','message':_0x10624f(0x173)});if(_0x3f1270['resultVariable']!==undefined){if(typeof _0x3f1270[_0x10624f(0x208)]!=='string'||!VARIABLE_PATTERN['test'](_0x3f1270[_0x10624f(0x208)]))_0x239c44[_0x10624f(0x13a)]({'path':_0x55fa00+_0x10624f(0x101),'message':_0x10624f(0x20e)});else(RESERVED_RESULT_VARIABLES[_0x10624f(0x119)](_0x3f1270[_0x10624f(0x208)])||_0x3f1270['resultVariable'][_0x10624f(0xc7)](_0x10624f(0x1ee)))&&_0x239c44['push']({'path':_0x55fa00+_0x10624f(0x101),'message':_0x10624f(0xc6)+_0x3f1270['resultVariable']+'.'});}}validateAsyncExecution(_0x3f1270,_0x55fa00,_0x239c44),validateApprovalTimeout(_0x3f1270,_0x55fa00,_0x239c44),validateCcConfig(_0x3f1270,_0x55fa00,_0x239c44),_0x3f1270[_0x10624f(0x174)]===_0x10624f(0x11e)&&validateNotificationConfig(_0x3f1270['config'],_0x55fa00+_0x10624f(0x1c5),_0x239c44);}function validateAsyncExecution(_0x1a0a0d,_0x205f03,_0x105adb){const _0x38cddb=a299_0x565b99;if(_0x1a0a0d[_0x38cddb(0xd9)]===undefined)return;if(!isRecord(_0x1a0a0d[_0x38cddb(0xd9)])){_0x105adb[_0x38cddb(0x13a)]({'path':_0x205f03+'.async','message':_0x38cddb(0x206)});return;}if(_0x1a0a0d[_0x38cddb(0xd9)][_0x38cddb(0xec)]!==undefined&&typeof _0x1a0a0d[_0x38cddb(0xd9)]['enabled']!==_0x38cddb(0x1e9)){_0x105adb[_0x38cddb(0x13a)]({'path':_0x205f03+_0x38cddb(0xf1),'message':_0x38cddb(0xf5)});return;}if(_0x1a0a0d[_0x38cddb(0xd9)][_0x38cddb(0xec)]!==!![])return;_0x1a0a0d['type']!==_0x38cddb(0x1df)&&_0x105adb['push']({'path':_0x205f03+_0x38cddb(0x171),'message':'async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.'});const _0x5b1127=_0x1a0a0d[_0x38cddb(0xd9)]['retryCount']??0x3;(!Number[_0x38cddb(0x1ac)](_0x5b1127)||_0x5b1127<0x1||_0x5b1127>MAX_ASYNC_RETRY_COUNT)&&_0x105adb['push']({'path':_0x205f03+_0x38cddb(0x17d),'message':_0x38cddb(0x1e5)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x1a0a0d[_0x38cddb(0xd9)][_0x38cddb(0x142)]!==undefined&&validateTimeAmount(_0x1a0a0d['async'][_0x38cddb(0x142)],_0x205f03+_0x38cddb(0x131),_0x105adb);}function validateApprovalTimeout(_0x4c129e,_0x484285,_0x444d55){const _0x4d2d14=a299_0x565b99;if(_0x4c129e[_0x4d2d14(0x13d)]===undefined)return;if(!isRecord(_0x4c129e[_0x4d2d14(0x13d)])){_0x444d55['push']({'path':_0x484285+_0x4d2d14(0x147),'message':_0x4d2d14(0x158)});return;}if(_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0xec)]!==undefined&&typeof _0x4c129e['timeout']['enabled']!==_0x4d2d14(0x1e9)){_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+'.timeout.enabled','message':'timeout.enabled\x20must\x20be\x20a\x20boolean.'});return;}if(_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0xec)]!==!![])return;if(_0x4c129e['timeout'][_0x4d2d14(0x1a8)]!==undefined&&typeof _0x4c129e['timeout'][_0x4d2d14(0x1a8)]!==_0x4d2d14(0x1e9)){_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0x189),'message':_0x4d2d14(0x1eb)});return;}_0x4c129e[_0x4d2d14(0x174)]!==_0x4d2d14(0x11f)&&_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0x147),'message':_0x4d2d14(0x17c)});validateTimeAmount(_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0x104)],_0x484285+'.timeout.duration',_0x444d55);const _0x2756dd=_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0x1ad)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x4d2d14(0x119)](_0x2756dd)){_0x444d55['push']({'path':_0x484285+_0x4d2d14(0x123),'message':_0x4d2d14(0x1f5)});return;}(_0x4c129e['taskMode']??_0x4d2d14(0x11f))===_0x4d2d14(0x1ea)&&_0x2756dd!==_0x4d2d14(0xd5)&&_0x444d55['push']({'path':_0x484285+'.timeout.action','message':_0x4d2d14(0x1db)});const _0x4551fa=_0x4c129e[_0x4d2d14(0x13d)][_0x4d2d14(0x1a8)]??_0x2756dd!==_0x4d2d14(0xd5);if(_0x2756dd===_0x4d2d14(0xd5))_0x4551fa&&_0x444d55['push']({'path':_0x484285+_0x4d2d14(0x189),'message':_0x4d2d14(0x184)}),(typeof _0x4c129e['timeout']['scriptName']!=='string'||_0x4c129e[_0x4d2d14(0x13d)]['scriptName']['trim']()==='')&&_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0xf7),'message':_0x4d2d14(0x204)}),validateOptionalResultVariable(_0x4c129e['timeout']['resultVariable'],_0x484285+'.timeout.resultVariable',_0x444d55);else!_0x4551fa&&_0x444d55[_0x4d2d14(0x13a)]({'path':_0x484285+_0x4d2d14(0x189),'message':_0x2756dd+_0x4d2d14(0xcb)});}function validateTimeAmount(_0x539eae,_0x3fc0da,_0x1f84b7){const _0x32dc07=a299_0x565b99;if(!isRecord(_0x539eae)){_0x1f84b7[_0x32dc07(0x13a)]({'path':_0x3fc0da,'message':_0x32dc07(0x1a4)});return;}(!Number['isInteger'](_0x539eae[_0x32dc07(0x149)])||Number(_0x539eae['value'])<=0x0)&&_0x1f84b7[_0x32dc07(0x13a)]({'path':_0x3fc0da+'.value','message':'duration\x20value\x20must\x20be\x20a\x20positive\x20integer.'}),!FLOW_TIME_UNITS[_0x32dc07(0x119)](_0x539eae[_0x32dc07(0x1ce)])&&_0x1f84b7[_0x32dc07(0x13a)]({'path':_0x3fc0da+_0x32dc07(0x122),'message':'duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.'});}function validateOptionalResultVariable(_0x271e9d,_0x466898,_0x65176f){const _0x510439=a299_0x565b99;if(_0x271e9d===undefined||_0x271e9d===null||_0x271e9d==='')return;if(typeof _0x271e9d!=='string'||!VARIABLE_PATTERN[_0x510439(0x140)](_0x271e9d))_0x65176f[_0x510439(0x13a)]({'path':_0x466898,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES['has'](_0x271e9d)||_0x271e9d['startsWith'](_0x510439(0x1ee)))&&_0x65176f[_0x510439(0x13a)]({'path':_0x466898,'message':'Reserved\x20resultVariable:\x20'+_0x271e9d+'.'});}function validateCcConfig(_0x4680be,_0x4bc83f,_0x2e68f5){const _0x23221b=a299_0x565b99;if(_0x4680be['cc']===undefined)return;if(!isRecord(_0x4680be['cc'])){_0x2e68f5['push']({'path':_0x4bc83f+_0x23221b(0x116),'message':'cc\x20must\x20be\x20an\x20object.'});return;}_0x4680be[_0x23221b(0x174)]!==_0x23221b(0x199)&&_0x4680be['type']!==_0x23221b(0x11f)&&_0x2e68f5[_0x23221b(0x13a)]({'path':_0x4bc83f+_0x23221b(0x116),'message':_0x23221b(0x1ae)});Object[_0x23221b(0x106)][_0x23221b(0x18e)][_0x23221b(0x19a)](_0x4680be['cc'],'readSources')&&_0x2e68f5['push']({'path':_0x4bc83f+'.cc.readSources','message':UNSUPPORTED_FORM_MESSAGE});const _0x5127de=_0x4680be['cc'][_0x23221b(0xe4)];if(!Array[_0x23221b(0x182)](_0x5127de)||_0x5127de['length']===0x0)_0x2e68f5['push']({'path':_0x4bc83f+'.cc.recipientUserIds','message':_0x23221b(0x18b)});else{_0x5127de[_0x23221b(0x10e)]>MAX_CC_RECIPIENTS&&_0x2e68f5[_0x23221b(0x13a)]({'path':_0x4bc83f+_0x23221b(0xef),'message':_0x23221b(0x14d)+MAX_CC_RECIPIENTS+_0x23221b(0x133)});const _0x56dc28=new Set();_0x5127de[_0x23221b(0x1e2)]((_0x386128,_0x2783be)=>{const _0x2baff2=_0x23221b;if(typeof _0x386128!=='string'||_0x386128[_0x2baff2(0x201)]()==='')_0x2e68f5['push']({'path':_0x4bc83f+_0x2baff2(0x132)+_0x2783be+']','message':_0x2baff2(0x100)});else _0x56dc28[_0x2baff2(0x119)](_0x386128['trim']())?_0x2e68f5[_0x2baff2(0x13a)]({'path':_0x4bc83f+_0x2baff2(0x132)+_0x2783be+']','message':_0x2baff2(0x163)+_0x386128[_0x2baff2(0x201)]()+'.'}):_0x56dc28['add'](_0x386128['trim']());});}validateStringArray(_0x4680be['cc']['visible'],_0x4bc83f+'.cc.visible',_0x2e68f5);}function validateStringArray(_0x27c692,_0x50bd64,_0x46a387){const _0x1577ea=a299_0x565b99;if(_0x27c692===undefined)return;if(!Array[_0x1577ea(0x182)](_0x27c692)){_0x46a387['push']({'path':_0x50bd64,'message':_0x1577ea(0x217)});return;}const _0xf9dbd4=new Set();_0x27c692['forEach']((_0x57f3d0,_0x15ffe2)=>{const _0x185bec=_0x1577ea;if(typeof _0x57f3d0!=='string'||_0x57f3d0['trim']()==='')_0x46a387[_0x185bec(0x13a)]({'path':_0x50bd64+'['+_0x15ffe2+']','message':_0x185bec(0x1af)});else _0xf9dbd4[_0x185bec(0x119)](_0x57f3d0[_0x185bec(0x201)]())?_0x46a387[_0x185bec(0x13a)]({'path':_0x50bd64+'['+_0x15ffe2+']','message':_0x185bec(0x15e)+_0x57f3d0[_0x185bec(0x201)]()+'.'}):_0xf9dbd4[_0x185bec(0xce)](_0x57f3d0[_0x185bec(0x201)]());});}function validateNotificationConfig(_0x559856,_0x37b1db,_0xaceaeb){const _0x48ae14=a299_0x565b99;if(!isRecord(_0x559856)){_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db,'message':'NOTIFICATION\x20node\x20requires\x20config.'});return;}if(_0x559856[_0x48ae14(0xdb)]!==undefined&&_0x559856[_0x48ae14(0xdb)]!==null){if(typeof _0x559856[_0x48ae14(0xdb)]!=='string')_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db+_0x48ae14(0x190),'message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x559856[_0x48ae14(0xdb)]['trim']()&&_0x559856[_0x48ae14(0xdb)][_0x48ae14(0x201)]()!=='v1'&&_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db+_0x48ae14(0x190),'message':_0x48ae14(0x151)+_0x559856[_0x48ae14(0xdb)]+'.'});}const _0x2e6f18=requireNotificationString(_0x559856[_0x48ae14(0x215)],_0x37b1db+_0x48ae14(0x205),'Notification\x20configCode\x20is\x20required.',_0xaceaeb);_0x2e6f18?.[_0x48ae14(0x165)]('${')&&_0xaceaeb['push']({'path':_0x37b1db+_0x48ae14(0x205),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x559856[_0x48ae14(0x1d6)]!==undefined&&_0x559856[_0x48ae14(0x1d6)]!==null){if(typeof _0x559856['failurePolicy']!=='string')_0xaceaeb[_0x48ae14(0x13a)]({'path':_0x37b1db+_0x48ae14(0x16a),'message':_0x48ae14(0x1ba)});else!NOTIFICATION_FAILURE_POLICIES[_0x48ae14(0x119)](_0x559856[_0x48ae14(0x1d6)][_0x48ae14(0x201)]()[_0x48ae14(0x1f6)]())&&_0xaceaeb['push']({'path':_0x37b1db+_0x48ae14(0x16a),'message':_0x48ae14(0x1d2)});}!isRecord(_0x559856[_0x48ae14(0x1f4)])?_0xaceaeb['push']({'path':_0x37b1db+_0x48ae14(0x146),'message':_0x48ae14(0x187)}):validateNotificationTemplate(_0x559856[_0x48ae14(0x1f4)],_0x37b1db+'.template',_0xaceaeb),validateNotificationRecipients(_0x559856[_0x48ae14(0x203)],_0x37b1db+'.recipients',_0xaceaeb);}function validateNotificationTemplate(_0x2f6de7,_0x155230,_0x2f156c){const _0x5a6c20=a299_0x565b99;for(const _0x2f4661 of[_0x5a6c20(0x13f),'summary']){const _0xe83d18=requireNotificationString(_0x2f6de7[_0x2f4661],_0x155230+'.'+_0x2f4661,_0x5a6c20(0x166)+_0x2f4661+'\x20is\x20required.',_0x2f156c);if(_0xe83d18)validateNotificationPlaceholders(_0xe83d18,_0x155230+'.'+_0x2f4661,_0x2f156c);}_0x2f6de7[_0x5a6c20(0x216)]!==undefined&&_0x2f6de7[_0x5a6c20(0x216)]!==null&&(typeof _0x2f6de7['detailMarkdown']!=='string'?_0x2f156c[_0x5a6c20(0x13a)]({'path':_0x155230+_0x5a6c20(0x185),'message':_0x5a6c20(0x127)}):validateNotificationPlaceholders(_0x2f6de7[_0x5a6c20(0x216)],_0x155230+_0x5a6c20(0x185),_0x2f156c)),validateNotificationFacts(_0x2f6de7[_0x5a6c20(0x195)],_0x155230+_0x5a6c20(0x1f1),_0x2f156c),validateNotificationActions(_0x2f6de7['actions'],_0x155230+_0x5a6c20(0x10b),_0x2f156c);}function validateNotificationFacts(_0x2ff232,_0x3f2b9c,_0x39a38f){const _0xa6c8f9=a299_0x565b99;if(_0x2ff232===undefined||_0x2ff232===null)return;if(!Array[_0xa6c8f9(0x182)](_0x2ff232)){_0x39a38f[_0xa6c8f9(0x13a)]({'path':_0x3f2b9c,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0x2ff232[_0xa6c8f9(0x10e)]>MAX_NOTIFICATION_FACTS&&_0x39a38f[_0xa6c8f9(0x13a)]({'path':_0x3f2b9c,'message':_0xa6c8f9(0xeb)+MAX_NOTIFICATION_FACTS+_0xa6c8f9(0x175)}),_0x2ff232[_0xa6c8f9(0x1e2)]((_0x221457,_0x5afa53)=>{const _0x1b856f=_0xa6c8f9,_0x46be2a=_0x3f2b9c+'['+_0x5afa53+']';if(!isRecord(_0x221457)){_0x39a38f[_0x1b856f(0x13a)]({'path':_0x46be2a,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x30d6b5 of[_0x1b856f(0x222),'value']){const _0x4233a0=requireNotificationString(_0x221457[_0x30d6b5],_0x46be2a+'.'+_0x30d6b5,_0x1b856f(0x139)+_0x30d6b5+_0x1b856f(0x1a7),_0x39a38f);_0x4233a0&&validateNotificationPlaceholders(_0x4233a0,_0x46be2a+'.'+_0x30d6b5,_0x39a38f);}});}function validateNotificationActions(_0x228e29,_0x43df1a,_0x2abde7){const _0x4c56b2=a299_0x565b99;if(_0x228e29===undefined||_0x228e29===null)return;if(!Array[_0x4c56b2(0x182)](_0x228e29)){_0x2abde7['push']({'path':_0x43df1a,'message':_0x4c56b2(0x105)});return;}_0x228e29[_0x4c56b2(0x10e)]>MAX_NOTIFICATION_ACTIONS&&_0x2abde7[_0x4c56b2(0x13a)]({'path':_0x43df1a,'message':_0x4c56b2(0xeb)+MAX_NOTIFICATION_ACTIONS+_0x4c56b2(0x17e)}),_0x228e29[_0x4c56b2(0x1e2)]((_0x1a0a21,_0x25cd17)=>{const _0x140029=_0x4c56b2,_0x252127=_0x43df1a+'['+_0x25cd17+']';if(!isRecord(_0x1a0a21)){_0x2abde7[_0x140029(0x13a)]({'path':_0x252127,'message':_0x140029(0x12e)});return;}const _0x8b2f57=requireNotificationString(_0x1a0a21['text'],_0x252127+_0x140029(0x169),'Notification\x20action.text\x20is\x20required.',_0x2abde7);if(_0x8b2f57)validateNotificationPlaceholders(_0x8b2f57,_0x252127+_0x140029(0x169),_0x2abde7);const _0x19d875=requireNotificationString(_0x1a0a21[_0x140029(0x126)],_0x252127+_0x140029(0x102),'Notification\x20action.url\x20is\x20required.',_0x2abde7);if(!_0x19d875)return;validateNotificationPlaceholders(_0x19d875,_0x252127+_0x140029(0x102),_0x2abde7),!/^https?:\/\//i['test'](_0x19d875)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0x140029(0x140)](_0x19d875)&&_0x2abde7[_0x140029(0x13a)]({'path':_0x252127+_0x140029(0x102),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function validateNotificationRecipients(_0x20dc2c,_0x2a1ae5,_0x51e1cb){const _0x44444b=a299_0x565b99;if(_0x20dc2c===undefined||_0x20dc2c===null)return;if(!Array[_0x44444b(0x182)](_0x20dc2c)){_0x51e1cb[_0x44444b(0x13a)]({'path':_0x2a1ae5,'message':_0x44444b(0x1f3)});return;}let _0xd3770f=![];_0x20dc2c['forEach']((_0xcb0947,_0x10b5a7)=>{const _0x404e12=_0x44444b,_0x5bcf77=_0x2a1ae5+'['+_0x10b5a7+']';if(!isRecord(_0xcb0947)){_0x51e1cb['push']({'path':_0x5bcf77,'message':_0x404e12(0x1cf)});return;}const _0x2bbef0=requireNotificationString(_0xcb0947['type'],_0x5bcf77+'.type','Notification\x20recipient.type\x20is\x20required.',_0x51e1cb);_0x2bbef0&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x2bbef0[_0x404e12(0x1f6)]())&&_0x51e1cb[_0x404e12(0x13a)]({'path':_0x5bcf77+'.type','message':_0x404e12(0x16b)});let _0x196100='TO';_0xcb0947['role']!==undefined&&_0xcb0947[_0x404e12(0x1cb)]!==null&&(typeof _0xcb0947[_0x404e12(0x1cb)]!==_0x404e12(0x21b)?(_0x51e1cb[_0x404e12(0x13a)]({'path':_0x5bcf77+_0x404e12(0x19d),'message':_0x404e12(0x1b1)}),_0x196100=''):(_0x196100=_0xcb0947['role'][_0x404e12(0x201)]()[_0x404e12(0x1f6)](),!NOTIFICATION_RECIPIENT_ROLES[_0x404e12(0x119)](_0x196100)&&_0x51e1cb[_0x404e12(0x13a)]({'path':_0x5bcf77+_0x404e12(0x19d),'message':_0x404e12(0xd4)})));if(_0x196100==='TO')_0xd3770f=!![];const _0x1b5605=requireNotificationString(_0xcb0947[_0x404e12(0x149)],_0x5bcf77+_0x404e12(0x1c4),_0x404e12(0x144),_0x51e1cb);_0x1b5605&&validateNotificationPlaceholders(_0x1b5605,_0x5bcf77+_0x404e12(0x1c4),_0x51e1cb);}),_0x20dc2c[_0x44444b(0x10e)]>0x0&&!_0xd3770f&&_0x51e1cb[_0x44444b(0x13a)]({'path':_0x2a1ae5,'message':'Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.'});}function requireNotificationString(_0x161bb3,_0x28c9c1,_0x39f279,_0x58669c){const _0x279f41=a299_0x565b99;if(typeof _0x161bb3!==_0x279f41(0x21b)||_0x161bb3['trim']()==='')return _0x58669c[_0x279f41(0x13a)]({'path':_0x28c9c1,'message':_0x39f279}),undefined;return _0x161bb3[_0x279f41(0x201)]();}function validateNotificationPlaceholders(_0x1dd105,_0x44d1e0,_0xc512d5){const _0x2a45ed=a299_0x565b99;for(const _0x25c47b of _0x1dd105['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x36b5e3=_0x25c47b[0x1]?.[_0x2a45ed(0x201)]()??'',_0x44379e=_0x36b5e3[_0x2a45ed(0x1e8)]('.'),_0x350693=_0x44379e>=0x0?_0x36b5e3[_0x2a45ed(0xdc)](0x0,_0x44379e):_0x36b5e3,_0x233752=_0x44379e>=0x0?_0x36b5e3[_0x2a45ed(0xdc)](_0x44379e+0x1)[_0x2a45ed(0x201)]():'';(![_0x2a45ed(0xd2),_0x2a45ed(0xc8),_0x2a45ed(0x1a6)][_0x2a45ed(0x165)](_0x350693)||_0x233752==='')&&_0xc512d5[_0x2a45ed(0x13a)]({'path':_0x44d1e0,'message':'Unsupported\x20notification\x20placeholder:\x20'+_0x25c47b[0x0]+'.'});}_0x1dd105[_0x2a45ed(0x18d)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0xc512d5[_0x2a45ed(0x13a)]({'path':_0x44d1e0,'message':_0x2a45ed(0x207)});}function validateEdge(_0x3e49e4,_0x3c431d,_0x42754a){const _0x33d473=a299_0x565b99;_0x3e49e4[_0x33d473(0xf4)]!==undefined&&typeof _0x3e49e4['name']!==_0x33d473(0x21b)&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x194),'message':_0x33d473(0x1f8)}),_0x3e49e4['defaultFlow']!==undefined&&typeof _0x3e49e4['defaultFlow']!=='boolean'&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x152),'message':_0x33d473(0x111)}),_0x3e49e4['waypoints']!==undefined&&(!Array[_0x33d473(0x182)](_0x3e49e4[_0x33d473(0x213)])?_0x42754a['push']({'path':_0x3c431d+'.waypoints','message':_0x33d473(0x1bc)}):_0x3e49e4[_0x33d473(0x213)][_0x33d473(0x1e2)]((_0x247a31,_0x4f54e6)=>{const _0x1495db=_0x33d473;if(!isRecord(_0x247a31)){_0x42754a[_0x1495db(0x13a)]({'path':_0x3c431d+_0x1495db(0x15a)+_0x4f54e6+']','message':'waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.'});return;}for(const _0x19f916 of['x','y']){const _0x3b0088=_0x247a31[_0x19f916];(typeof _0x3b0088!==_0x1495db(0x1c0)||!Number[_0x1495db(0x1fd)](_0x3b0088))&&_0x42754a[_0x1495db(0x13a)]({'path':_0x3c431d+'.waypoints['+_0x4f54e6+'].'+_0x19f916,'message':_0x1495db(0x197)+_0x19f916+_0x1495db(0x1b6)});}})),_0x3e49e4[_0x33d473(0x1b7)]!==undefined&&!CONDITION_TYPES['has'](_0x3e49e4[_0x33d473(0x1b7)])&&_0x42754a['push']({'path':_0x3c431d+_0x33d473(0x1ff),'message':_0x33d473(0x1f7)+String(_0x3e49e4[_0x33d473(0x1b7)])+'.'}),_0x3e49e4[_0x33d473(0x1b7)]==='EXPRESSION'&&(typeof _0x3e49e4['expression']!=='string'||_0x3e49e4['expression']['trim']()==='')&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x181),'message':_0x33d473(0xf0)}),_0x3e49e4[_0x33d473(0x155)]===!![]&&_0x3e49e4[_0x33d473(0x1b7)]!==_0x33d473(0x167)&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x152),'message':'A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.'}),_0x3e49e4[_0x33d473(0x155)]===!![]&&typeof _0x3e49e4['expression']===_0x33d473(0x21b)&&_0x3e49e4['expression'][_0x33d473(0x201)]()!==''&&_0x42754a[_0x33d473(0x13a)]({'path':_0x3c431d+_0x33d473(0x181),'message':_0x33d473(0x108)});}function validateGraphShape(_0x5d5915,_0x4c7ffa,_0x4bfff4,_0x93164d,_0x3abd42,_0x2650eb,_0x354e27){const _0x597472=a299_0x565b99;for(const [_0x109f40,_0x30c5d2]of _0x5d5915){const _0x1cf9eb=_0x3abd42[_0x597472(0x1c2)](_0x109f40)??[],_0x193bac=_0x93164d[_0x597472(0x1c2)](_0x109f40)??[];_0x30c5d2[_0x597472(0x174)]!==_0x597472(0xd1)&&_0x1cf9eb['length']===0x0&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':'Node\x20has\x20no\x20incoming\x20edge.'});_0x30c5d2['type']!==_0x597472(0x199)&&_0x193bac[_0x597472(0x10e)]===0x0&&_0x354e27[_0x597472(0x13a)]({'path':'flowJson.nodes.'+_0x109f40,'message':_0x597472(0x180)});_0x30c5d2[_0x597472(0x174)]===_0x597472(0xd1)&&_0x1cf9eb[_0x597472(0x10e)]>0x0&&_0x354e27[_0x597472(0x13a)]({'path':'flowJson.nodes.'+_0x109f40,'message':_0x597472(0x1b5)});_0x30c5d2['type']===_0x597472(0x199)&&_0x193bac[_0x597472(0x10e)]>0x0&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0xfd)});if(_0x30c5d2[_0x597472(0x174)]==='CONDITION'){_0x193bac[_0x597472(0x10e)]<0x2&&_0x354e27['push']({'path':'flowJson.nodes.'+_0x109f40,'message':_0x597472(0xe2)});const _0x5dd762=_0x193bac['filter'](_0x94ba60=>_0x94ba60['defaultFlow']===!![]);_0x5dd762['length']!==0x1&&_0x354e27['push']({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x20a)});if(_0x5dd762[_0x597472(0x10e)]===0x1){const _0x6772e6=_0x5dd762[0x0],_0x2c22e4=_0x2650eb[_0x597472(0x1c2)](_0x6772e6)??_0x597472(0x107);_0x6772e6['conditionType']!==_0x597472(0x167)&&_0x354e27[_0x597472(0x13a)]({'path':_0x2c22e4+_0x597472(0x1ff),'message':_0x597472(0x1d7)});_0x6772e6['expression']!==undefined&&_0x354e27[_0x597472(0x13a)]({'path':_0x2c22e4+_0x597472(0x181),'message':_0x597472(0xe0)});for(const _0x133134 of _0x193bac){if(_0x133134===_0x6772e6)continue;const _0xb6c1ac=_0x2650eb[_0x597472(0x1c2)](_0x133134)??_0x597472(0x107);if(_0x133134[_0x597472(0x1b7)]!==_0x597472(0x115))_0x354e27['push']({'path':_0xb6c1ac+'.conditionType','message':_0x597472(0x20c)});else(typeof _0x133134['expression']!==_0x597472(0x21b)||_0x133134[_0x597472(0x117)][_0x597472(0x201)]()==='')&&_0x354e27[_0x597472(0x13a)]({'path':_0xb6c1ac+_0x597472(0x181),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x30c5d2[_0x597472(0x174)]===_0x597472(0x11f)&&(_0x30c5d2[_0x597472(0x16d)]??_0x597472(0x11f))===_0x597472(0x1ea)){if(_0x193bac[_0x597472(0x10e)]!==0x1)_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x210)});else{const _0x3ca4a2=_0x193bac[0x0];((_0x3ca4a2[_0x597472(0x1b7)]??_0x597472(0x167))!==_0x597472(0x167)||_0x3ca4a2[_0x597472(0x155)]===!![]||typeof _0x3ca4a2['expression']===_0x597472(0x21b)&&_0x3ca4a2[_0x597472(0x117)][_0x597472(0x201)]()!=='')&&_0x354e27[_0x597472(0x13a)]({'path':_0x2650eb['get'](_0x3ca4a2)??'flowJson.edges','message':_0x597472(0x1a9)});}}else{if(_0x30c5d2[_0x597472(0x174)]==='APPROVAL'){const _0x575b4d=_0x193bac['map'](_0xe90572=>_0xe90572[_0x597472(0x1b7)]??_0x597472(0x167)),_0x547bad=_0x575b4d['filter'](_0x2d7759=>_0x2d7759!==_0x597472(0x219)&&_0x2d7759!=='REJECTED');_0x547bad[_0x597472(0x10e)]>0x0&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':'APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.'}),_0x575b4d[_0x597472(0x1b3)](_0x9e99a5=>_0x9e99a5===_0x597472(0x219))[_0x597472(0x10e)]!==0x1&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x125)}),_0x575b4d['filter'](_0xebe12f=>_0xebe12f===_0x597472(0xdd))[_0x597472(0x10e)]!==0x1&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0xcf)}),_0x193bac[_0x597472(0x1bb)](_0x5974f3=>_0x5974f3[_0x597472(0x155)]===!![])&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x109f40,'message':_0x597472(0x10c)});}}}const _0x26fb2e=new Set(),_0x2ce328=_0x19a652=>{const _0xd04563=_0x597472;if(_0x26fb2e[_0xd04563(0x119)](_0x19a652))return;_0x26fb2e['add'](_0x19a652);for(const _0x838b65 of _0x93164d[_0xd04563(0x1c2)](_0x19a652)??[]){const _0x4fa56f=resolveEdgeEndpoint(_0x838b65[_0xd04563(0x1c8)],_0x838b65[_0xd04563(0x1cd)]);if(_0x4fa56f&&_0x5d5915[_0xd04563(0x119)](_0x4fa56f))_0x2ce328(_0x4fa56f);}};_0x2ce328(_0x4c7ffa);for(const _0x45cf7b of _0x5d5915[_0x597472(0x21c)]()){!_0x26fb2e[_0x597472(0x119)](_0x45cf7b)&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x45cf7b,'message':'Node\x20is\x20not\x20reachable\x20from\x20START.'});}const _0x1672df=_0x4bfff4[_0x597472(0x1bb)](_0x3580af=>_0x26fb2e[_0x597472(0x119)](_0x3580af));if(!_0x1672df){_0x354e27[_0x597472(0x13a)]({'path':'flowJson.edges','message':_0x597472(0x21e)});return;}const _0x3ad58a=new Set(),_0x5776e9=_0x2deba7=>{const _0x41311c=_0x597472;if(_0x3ad58a[_0x41311c(0x119)](_0x2deba7))return;_0x3ad58a[_0x41311c(0xce)](_0x2deba7);for(const _0x53d704 of _0x3abd42['get'](_0x2deba7)??[]){const _0x29439f=resolveEdgeEndpoint(_0x53d704['source'],_0x53d704[_0x41311c(0x1fa)]);if(_0x29439f&&_0x5d5915[_0x41311c(0x119)](_0x29439f))_0x5776e9(_0x29439f);}};for(const _0x304c3c of _0x4bfff4){if(_0x5d5915[_0x597472(0x119)](_0x304c3c))_0x5776e9(_0x304c3c);}for(const _0x5e1aa0 of _0x26fb2e){!_0x3ad58a[_0x597472(0x119)](_0x5e1aa0)&&_0x354e27[_0x597472(0x13a)]({'path':_0x597472(0x1b0)+_0x5e1aa0,'message':_0x597472(0x212)});}}function a299_0x5e1f(){const _0x489457=['EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','.detailMarkdown','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.','NOTIFICATION\x20node\x20requires\x20template.','SINGLE','.timeout.interrupting','ROLE','cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.','261VUjCel','replace','hasOwnProperty','array','.version','set','source','templateName','.name','facts','flowJson.','waypoint.','formData','END','call','INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.','appCode','.role','Duplicate\x20edge\x20route:\x20','sequential\x20must\x20be\x20a\x20boolean.','formPermission','CONDITION','approval_sys_dataId','.transferCandidates.userIds[','duration\x20requires\x20value\x20and\x20unit.','].taskMode','variables','\x20is\x20required.','interrupting','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','530470azEWTH','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','isInteger','action','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','value\x20must\x20be\x20a\x20non-empty\x20string.','flowJson.nodes.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','filter','FIXED\x20assignee\x20requires\x20userIds.','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','\x20must\x20be\x20a\x20finite\x20number.','conditionType','entries','Expression\x20references\x20SCRIPT\x20resultVariable\x20','failurePolicy\x20must\x20be\x20a\x20string.','some','waypoints\x20must\x20be\x20an\x20array.','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','transferCandidates\x20must\x20be\x20an\x20object.','warnings','number','startPath','get','#/$defs/flowNode','.value','.config','Edge\x20source\x20node\x20not\x20found:\x20','.transferCandidates.userIds','target','userIds','.assignee.userIds[','role','transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','targetNodeId','unit','Notification\x20recipient\x20must\x20be\x20an\x20object.','pageId','INDEPENDENT_FLOW','failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.','scriptResult','node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.','.path','failurePolicy','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','nodes','Unsupported\x20node\x20type:\x20','flowJson.nodes[','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','Duplicate\x20node\x20id:\x20','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','flowJson.startPath','SCRIPT','flowJson.nodes','edge\x20source\x20is\x20required.','forEach','.tmp','object','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','result','FAIL','indexOf','boolean','HANDLE','timeout.interrupting\x20must\x20be\x20a\x20boolean.','7SnRqgD','Unsupported\x20flowType:\x20','approval_sys_','approval_sys_pageId','approvalMode','.facts','flowType\x20is\x20required.','Notification\x20recipients\x20must\x20be\x20an\x20array.','template','timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.','toUpperCase','Unsupported\x20condition\x20type:\x20','edge\x20name\x20must\x20be\x20a\x20string.','flowJson','sourceNodeId','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','isFinite','EMAIL','.conditionType','mode','trim','BCC','recipients','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','.configCode','async\x20must\x20be\x20an\x20object.','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','resultVariable','scriptName','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','5FyAGWh','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','1864956QcGSPC','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','.position.','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','Unsupported\x20approval\x20mode:\x20','Node\x20cannot\x20reach\x20any\x20END.','waypoints','config','configCode','detailMarkdown','value\x20must\x20be\x20an\x20array.','flowName\x20is\x20required.','APPROVED','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','string','keys','.id','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','.type','legacy_field_removed','edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','label','findIndex','position.','AUTO_REJECT','MAX_SAFE_INTEGER','^[A-Za-z_][A-Za-z0-9_]*$','Reserved\x20resultVariable:\x20','startsWith','context','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','.position','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.','pid','add','APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.','schemaVersion','START','event','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.','EXECUTE_BFF','CONTINUE','every','transferCandidates','async','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','version','slice','REJECTED','datasetCode\x20must\x20be\x20a\x20string.','.assignee.strategy','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','FORM_FLOW','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','MINUTES','recipientUserIds','edges','ALL','\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.','609806fIdmqc','1541874Ohafge','form','Notification\x20template\x20supports\x20at\x20most\x20','enabled','.target','\x20->\x20','.cc.recipientUserIds','EXPRESSION\x20edge\x20requires\x20expression.','.async.enabled','4734352fBdqLS','PLATFORM_FORM','name','async.enabled\x20must\x20be\x20a\x20boolean.','flowDesc','.timeout.scriptName','size','flowJson.pageMode','Unsupported\x20schemaVersion:\x20','#/$defs/timeAmount','map','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','APPROVAL\x20node\x20requires\x20assignee.','approval.simple-flow.v1','cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.','.resultVariable','.url','formDefinitions','duration','Notification\x20template.actions\x20must\x20be\x20an\x20array.','prototype','flowJson.edges','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','assignee','https://lovrabet.com/schema/rabetbase-flow-config.json','.actions','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','isSafeInteger','length','edge\x20must\x20be\x20an\x20object.','sequential','defaultFlow\x20must\x20be\x20a\x20boolean.','.sequential','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','flowJson.schemaVersion','EXPRESSION','.cc','expression',',\x20but\x20node\x20','has','approval_sys_processInstanceId','122534YSICbD','formPermissions','flowDesc\x20must\x20be\x20a\x20string.','NOTIFICATION','APPROVAL','#/$defs/userId','approval_sys_appCode','.unit','.timeout.action','#/$defs/position','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','url','Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.','.assignee','Edge\x20target\x20node\x20not\x20found:\x20','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','ANY','CUSTOM_PAGE','parse','Notification\x20action\x20must\x20be\x20an\x20object.','node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.','SECONDS','.async.retryInterval','.cc.recipientUserIds[','\x20users.','FIXED','integer','datasetCode','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','edge\x20target\x20is\x20required.','Notification\x20fact.','push','HOURS','message','timeout','.assignee.userIds','title','test','metadata','retryInterval','join','Notification\x20recipient.value\x20is\x20required.','flowType','.template','.timeout','flowJson.edges[','value','.transferCandidates.strategy','position','pageMode','cc.recipientUserIds\x20supports\x20at\x20most\x20','USER','__rabetbase_local_validation__','stringify','Unsupported\x20notification\x20version:\x20','.defaultFlow','utf8','.approvalMode','defaultFlow','pageIds','approval_sys_datasetCode','timeout\x20must\x20be\x20an\x20object.','\x20was\x20empty\x20and\x20was\x20removed.','.waypoints[','delete','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','path','Duplicate\x20value:\x20','Every\x20node\x20requires\x20a\x20non-empty\x20name.','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','\x20was\x20empty\x20or\x20used\x20the\x20default\x20','strategy','Duplicate\x20cc\x20recipient\x20userId:\x20','roleId','includes','Notification\x20template.','ALWAYS','approval_sys_initiatorUsername','.text','.failurePolicy','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.assignee.roleId','taskMode','1020188zANMuq','empty_metadata_removed','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','.async','DAYS','SCRIPT\x20node\x20requires\x20scriptName.','type','\x20facts.','flowKey','#/$defs/flowEdge','flowJson\x20must\x20be\x20an\x20object.','flowName','startPageId','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.','.async.retryCount','\x20actions.','https://json-schema.org/draft/2020-12/schema','Node\x20has\x20no\x20outgoing\x20edge.','.expression','isArray','.pageId'];a299_0x5e1f=function(){return _0x489457;};return a299_0x5e1f();}function validateApprovalResults(_0x20e29c,_0x21b5b0,_0x3b543f,_0x58d317){const _0x3c09c7=a299_0x565b99;if(_0x21b5b0===0x0)return;const _0x1cd557=new Set(_0x3b543f['map'](_0x1cc6d9=>_0x20e29c[_0x3c09c7(0x1c2)](_0x1cc6d9)?.[_0x3c09c7(0x1e6)])['filter'](_0x5d8f2d=>typeof _0x5d8f2d===_0x3c09c7(0x21b)));for(const _0x582523 of[_0x3c09c7(0x219),_0x3c09c7(0xdd)]){!_0x1cd557[_0x3c09c7(0x119)](_0x582523)&&_0x58d317['push']({'path':_0x3c09c7(0x1e0),'message':'Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20'+_0x582523+'.'});}}function validateScriptResultReferences(_0x8846b2,_0x3792fd,_0x4c3aa8,_0xb7fcc7,_0x1aaad3,_0x374417,_0x132c9c){const _0x23082b=a299_0x565b99;if(_0x374417[_0x23082b(0xf8)]===0x0)return;const _0xaf49e4=new Set(),_0x1bbb79=_0x188a71=>{const _0x5802dd=_0x23082b;if(!_0xaf49e4['has'](_0x188a71)&&_0x8846b2['has'](_0x188a71)){_0xaf49e4[_0x5802dd(0xce)](_0x188a71);for(const _0x4aa35b of _0x4c3aa8[_0x5802dd(0x1c2)](_0x188a71)??[]){const _0x46c590=resolveEdgeEndpoint(_0x4aa35b['target'],_0x4aa35b[_0x5802dd(0x1cd)]);if(_0x46c590)_0x1bbb79(_0x46c590);}}};_0x1bbb79(_0x3792fd);const _0x6bdc8b=new Map();for(const _0x5466b6 of _0xaf49e4){_0x6bdc8b['set'](_0x5466b6,_0x5466b6===_0x3792fd?new Set([_0x3792fd]):new Set(_0xaf49e4));}let _0x566215=!![];while(_0x566215){_0x566215=![];for(const _0x149e0f of _0xaf49e4){if(_0x149e0f===_0x3792fd)continue;const _0xcb2d77=(_0xb7fcc7[_0x23082b(0x1c2)](_0x149e0f)??[])[_0x23082b(0xfc)](_0x478507=>resolveEdgeEndpoint(_0x478507[_0x23082b(0x192)],_0x478507[_0x23082b(0x1fa)]))[_0x23082b(0x1b3)](_0x246af5=>Boolean(_0x246af5&&_0xaf49e4['has'](_0x246af5)));if(_0xcb2d77[_0x23082b(0x10e)]===0x0)continue;const _0x5142ff=new Set(_0x6bdc8b[_0x23082b(0x1c2)](_0xcb2d77[0x0])??[]);for(const _0x3a4550 of _0xcb2d77[_0x23082b(0xdc)](0x1)){const _0x23b0ba=_0x6bdc8b['get'](_0x3a4550)??new Set();for(const _0x130aa1 of _0x5142ff){if(!_0x23b0ba['has'](_0x130aa1))_0x5142ff[_0x23082b(0x15b)](_0x130aa1);}}_0x5142ff[_0x23082b(0xce)](_0x149e0f);const _0x5d4638=_0x6bdc8b[_0x23082b(0x1c2)](_0x149e0f);!setsEqual(_0x5d4638,_0x5142ff)&&(_0x6bdc8b[_0x23082b(0x191)](_0x149e0f,_0x5142ff),_0x566215=!![]);}}for(const [_0x2950ac,_0x30c21a]of _0x4c3aa8){const _0x34408f=_0x6bdc8b[_0x23082b(0x1c2)](_0x2950ac);if(!_0x34408f)continue;for(const _0x2654af of _0x30c21a){if(_0x2654af[_0x23082b(0x1b7)]!==_0x23082b(0x115)||typeof _0x2654af[_0x23082b(0x117)]!=='string')continue;for(const [_0x32576f,_0x507213]of _0x374417){expressionReferencesVariable(_0x2654af[_0x23082b(0x117)],_0x32576f)&&!_0x34408f[_0x23082b(0x119)](_0x507213)&&_0x132c9c[_0x23082b(0x13a)]({'path':(_0x1aaad3['get'](_0x2654af)??_0x23082b(0x107))+'.expression','message':_0x23082b(0x1b9)+_0x32576f+_0x23082b(0x118)+_0x507213+_0x23082b(0x1bd)+_0x2950ac+'.'});}}}}function expressionReferencesVariable(_0x28fa0d,_0x4a3f77){const _0x4dc9a3=a299_0x565b99;let _0x79e970=0x0;while(_0x79e970<_0x28fa0d[_0x4dc9a3(0x10e)]){const _0x1777f0=_0x28fa0d[_0x79e970];if(_0x1777f0==='\x27'||_0x1777f0==='\x22'){_0x79e970=skipQuotedExpressionSegment(_0x28fa0d,_0x79e970,_0x1777f0);continue;}if(!/[A-Za-z_]/['test'](_0x1777f0)){_0x79e970+=0x1;continue;}const _0x2defb9=_0x79e970;_0x79e970+=0x1;while(_0x79e970<_0x28fa0d[_0x4dc9a3(0x10e)]&&/[A-Za-z0-9_]/[_0x4dc9a3(0x140)](_0x28fa0d[_0x79e970])){_0x79e970+=0x1;}if(_0x28fa0d[_0x4dc9a3(0xdc)](_0x2defb9,_0x79e970)!==_0x4a3f77)continue;let _0x503c7a=_0x2defb9-0x1;while(_0x503c7a>=0x0&&/\s/[_0x4dc9a3(0x140)](_0x28fa0d[_0x503c7a])){_0x503c7a-=0x1;}if(_0x28fa0d[_0x503c7a]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x5f1068,_0xd1056b,_0x391d11){let _0x45805e=_0xd1056b+0x1;while(_0x45805e<_0x5f1068['length']){if(_0x5f1068[_0x45805e]==='\x5c'){_0x45805e+=0x2;continue;}if(_0x5f1068[_0x45805e]===_0x391d11)return _0x45805e+0x1;_0x45805e+=0x1;}return _0x45805e;}function resolveEffectiveResultVariable(_0x9919eb,_0x1a1bfe){const _0x3364e1=a299_0x565b99;if(_0x9919eb===undefined||_0x9919eb===null||_0x1a1bfe&&_0x9919eb==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x9919eb!==_0x3364e1(0x21b)||!VARIABLE_PATTERN[_0x3364e1(0x140)](_0x9919eb)||RESERVED_RESULT_VARIABLES[_0x3364e1(0x119)](_0x9919eb)||_0x9919eb['startsWith'](_0x3364e1(0x1ee)))return undefined;return _0x9919eb;}function registerResultVariableOwner(_0x46513c,_0x36bda,_0x3b5811,_0x4793f0){const _0x239dc7=a299_0x565b99;if(_0x46513c[_0x239dc7(0x119)](_0x36bda)){_0x4793f0[_0x239dc7(0x13a)]({'path':_0x239dc7(0x1e0),'message':'Duplicate\x20resultVariable:\x20'+_0x36bda+'.'});return;}_0x46513c[_0x239dc7(0x191)](_0x36bda,_0x3b5811);}function setsEqual(_0x86d06c,_0x1e2695){const _0x16b30a=a299_0x565b99;return _0x86d06c['size']===_0x1e2695[_0x16b30a(0xf8)]&&[..._0x86d06c][_0x16b30a(0xd7)](_0x3688bd=>_0x1e2695[_0x16b30a(0x119)](_0x3688bd));}function isValidUserId(_0x5b99fa){const _0x4b17dd=a299_0x565b99;if(typeof _0x5b99fa===_0x4b17dd(0x21b))return _0x5b99fa[_0x4b17dd(0x201)]()[_0x4b17dd(0x10e)]>0x0;return Number[_0x4b17dd(0x10d)](_0x5b99fa)&&Number(_0x5b99fa)>0x0;}function resolveEdgeEndpoint(_0x54aac0,_0x3c7022){const _0x378665=a299_0x565b99;if(typeof _0x54aac0===_0x378665(0x21b)&&_0x54aac0[_0x378665(0x201)]())return _0x54aac0[_0x378665(0x201)]();if(typeof _0x3c7022==='string'&&_0x3c7022[_0x378665(0x201)]())return _0x3c7022[_0x378665(0x201)]();return undefined;}function a299_0x386c(_0x45e0d7,_0x19cca8){_0x45e0d7=_0x45e0d7-0xc4;const _0x5e1f5c=a299_0x5e1f();let _0x386c9c=_0x5e1f5c[_0x45e0d7];return _0x386c9c;}function removeEmptyMetadata(_0x21e025,_0x11e373,_0x49957e,_0x2b691d){const _0x319ff6=a299_0x565b99;if(Array[_0x319ff6(0x182)](_0x21e025)){_0x21e025['forEach']((_0x41155f,_0x155979)=>removeEmptyMetadata(_0x41155f,_0x11e373+'['+_0x155979+']',_0x49957e,_0x2b691d));return;}if(!isRecord(_0x21e025))return;for(const [_0x439f1f,_0x555878]of Object[_0x319ff6(0x1b8)](_0x21e025)){const _0x45c19d=_0x11e373+'.'+_0x439f1f;if(_0x439f1f===_0x319ff6(0x141)&&isEmptyJsonValue(_0x555878)){delete _0x21e025[_0x439f1f],_0x2b691d[_0x319ff6(0x13a)](_0x45c19d),_0x49957e[_0x319ff6(0x13a)]({'code':_0x319ff6(0x16f),'path':_0x45c19d,'message':_0x45c19d+_0x319ff6(0x159)});continue;}removeEmptyMetadata(_0x555878,_0x45c19d,_0x49957e,_0x2b691d);}}function isEmptyJsonValue(_0x6d9f98){const _0x34adcf=a299_0x565b99;if(_0x6d9f98===null||_0x6d9f98===undefined)return!![];if(typeof _0x6d9f98===_0x34adcf(0x21b))return _0x6d9f98[_0x34adcf(0x201)]()==='';if(Array[_0x34adcf(0x182)](_0x6d9f98))return _0x6d9f98[_0x34adcf(0x10e)]===0x0;return isRecord(_0x6d9f98)&&Object[_0x34adcf(0x21c)](_0x6d9f98)['length']===0x0;}function isRecord(_0x2f178f){const _0x33cdc1=a299_0x565b99;return typeof _0x2f178f===_0x33cdc1(0x1e4)&&_0x2f178f!==null&&!Array[_0x33cdc1(0x182)](_0x2f178f);}function cloneJsonValue(_0x4a1d1e){const _0x3dc927=a299_0x565b99;return JSON[_0x3dc927(0x12d)](JSON[_0x3dc927(0x150)](_0x4a1d1e));}export async function readFlowConfigFile(_0x489cf8){const _0x115f3b=a299_0x565b99,_0x436fde=await readFile(resolve(_0x489cf8),_0x115f3b(0x153));return JSON['parse'](_0x436fde);}
|
|
1
|
+
const a299_0x4b7b87=a299_0x8afb;(function(_0x3383af,_0x35f362){const _0x2cf71f=a299_0x8afb,_0x33ad25=_0x3383af();while(!![]){try{const _0x2954cb=-parseInt(_0x2cf71f(0x262))/0x1*(parseInt(_0x2cf71f(0x24b))/0x2)+-parseInt(_0x2cf71f(0x1d6))/0x3+-parseInt(_0x2cf71f(0x23d))/0x4*(parseInt(_0x2cf71f(0x1ab))/0x5)+parseInt(_0x2cf71f(0x2ab))/0x6*(-parseInt(_0x2cf71f(0x2db))/0x7)+parseInt(_0x2cf71f(0x288))/0x8+parseInt(_0x2cf71f(0x26b))/0x9+parseInt(_0x2cf71f(0x209))/0xa;if(_0x2954cb===_0x35f362)break;else _0x33ad25['push'](_0x33ad25['shift']());}catch(_0x2d8d94){_0x33ad25['push'](_0x33ad25['shift']());}}}(a299_0x830f,0xcae57));import{randomUUID}from'node:crypto';import{chmod,link,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{resolve}from'node:path';export const FLOW_CONFIG_JSON_SCHEMA={'$schema':a299_0x4b7b87(0x2dd),'$id':a299_0x4b7b87(0x258),'title':'Rabetbase\x20FlowConfig','type':a299_0x4b7b87(0x197),'required':['flowName','flowType',a299_0x4b7b87(0x192)],'$defs':{'userId':{'anyOf':[{'type':a299_0x4b7b87(0x20d),'minLength':0x1},{'type':a299_0x4b7b87(0x215),'minimum':0x1}]},'position':{'type':a299_0x4b7b87(0x197),'required':['x','y'],'properties':{'x':{'type':a299_0x4b7b87(0x2d8),'minimum':0x0},'y':{'type':a299_0x4b7b87(0x2d8),'minimum':0x0}},'additionalProperties':!![]},'timeAmount':{'type':a299_0x4b7b87(0x197),'required':['value',a299_0x4b7b87(0x28c)],'properties':{'value':{'type':'integer','minimum':0x1},'unit':{'enum':[a299_0x4b7b87(0x1ad),a299_0x4b7b87(0x23c),a299_0x4b7b87(0x1d8),'DAYS']}},'additionalProperties':!![]},'flowNode':{'type':a299_0x4b7b87(0x197),'required':['id',a299_0x4b7b87(0x19b),a299_0x4b7b87(0x274),a299_0x4b7b87(0x254)],'properties':{'id':{'type':'string','pattern':a299_0x4b7b87(0x17f)},'type':{'enum':[a299_0x4b7b87(0x299),a299_0x4b7b87(0x233),a299_0x4b7b87(0x2c1),a299_0x4b7b87(0x23a),'SCRIPT',a299_0x4b7b87(0x207)]},'name':{'type':'string','minLength':0x1},'path':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'position':{'$ref':a299_0x4b7b87(0x1dd)},'approvalMode':{'enum':[a299_0x4b7b87(0x22d),'ALL','ANY']},'taskMode':{'enum':[a299_0x4b7b87(0x2c1),a299_0x4b7b87(0x20c)]},'assignee':{'type':a299_0x4b7b87(0x197),'required':[a299_0x4b7b87(0x2b6)],'properties':{'strategy':{'enum':[a299_0x4b7b87(0x1ea),'ROLE']},'userIds':{'type':a299_0x4b7b87(0x1b8),'minItems':0x1,'items':{'$ref':a299_0x4b7b87(0x1a5)}},'roleId':{'anyOf':[{'type':a299_0x4b7b87(0x215),'minimum':0x1},{'type':'string','pattern':a299_0x4b7b87(0x23b)}]}},'additionalProperties':!![]},'transferCandidates':{'type':'object','required':[a299_0x4b7b87(0x2b6),a299_0x4b7b87(0x25f)],'properties':{'strategy':{'const':'FIXED'},'userIds':{'type':a299_0x4b7b87(0x1b8),'minItems':0x1,'items':{'$ref':'#/$defs/userId'}}},'additionalProperties':!![]},'sequential':{'type':'boolean'},'result':{'enum':[a299_0x4b7b87(0x2e1),a299_0x4b7b87(0x2c6)]},'scriptName':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'resultVariable':{'type':a299_0x4b7b87(0x20d),'pattern':'^[A-Za-z_][A-Za-z0-9_]*$'},'async':{'type':a299_0x4b7b87(0x197),'properties':{'enabled':{'type':a299_0x4b7b87(0x1d7)},'retryCount':{'type':a299_0x4b7b87(0x215),'minimum':0x1,'maximum':0xa},'retryInterval':{'$ref':a299_0x4b7b87(0x1ba)}},'additionalProperties':!![]},'timeout':{'type':a299_0x4b7b87(0x197),'properties':{'enabled':{'type':a299_0x4b7b87(0x1d7)},'duration':{'$ref':a299_0x4b7b87(0x1ba)},'action':{'enum':[a299_0x4b7b87(0x2ac),a299_0x4b7b87(0x24c),'EXECUTE_BFF']},'interrupting':{'type':a299_0x4b7b87(0x1d7)},'scriptName':{'type':'string','minLength':0x1},'resultVariable':{'type':a299_0x4b7b87(0x20d),'pattern':a299_0x4b7b87(0x17f)}},'additionalProperties':!![]},'cc':{'type':a299_0x4b7b87(0x197),'required':[a299_0x4b7b87(0x2d6)],'properties':{'recipientUserIds':{'type':a299_0x4b7b87(0x1b8),'minItems':0x1,'maxItems':0x64,'uniqueItems':!![],'items':{'type':a299_0x4b7b87(0x20d),'minLength':0x1}},'visible':{'type':a299_0x4b7b87(0x1b8),'uniqueItems':!![],'items':{'type':a299_0x4b7b87(0x20d),'minLength':0x1}},'readSources':![]},'additionalProperties':!![]},'config':{'type':a299_0x4b7b87(0x197),'required':['configCode',a299_0x4b7b87(0x241)],'properties':{'version':{'enum':['v1']},'configCode':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'failurePolicy':{'enum':['CONTINUE','FAIL']},'template':{'type':a299_0x4b7b87(0x197),'required':[a299_0x4b7b87(0x243),a299_0x4b7b87(0x2ba)],'properties':{'title':{'type':'string','minLength':0x1},'summary':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'detailMarkdown':{'type':a299_0x4b7b87(0x20d)},'facts':{'type':'array','maxItems':0x8,'items':{'type':a299_0x4b7b87(0x197),'required':[a299_0x4b7b87(0x229),'value'],'properties':{'label':{'type':'string','minLength':0x1},'value':{'type':'string','minLength':0x1}},'additionalProperties':!![]}},'actions':{'type':a299_0x4b7b87(0x1b8),'maxItems':0x2,'items':{'type':a299_0x4b7b87(0x197),'required':[a299_0x4b7b87(0x272),a299_0x4b7b87(0x1a2)],'properties':{'text':{'type':'string','minLength':0x1},'url':{'type':a299_0x4b7b87(0x20d),'minLength':0x1}},'additionalProperties':!![]}}},'additionalProperties':!![]},'recipients':{'type':a299_0x4b7b87(0x1b8),'items':{'type':a299_0x4b7b87(0x197),'required':[a299_0x4b7b87(0x19b),a299_0x4b7b87(0x235)],'properties':{'type':{'enum':[a299_0x4b7b87(0x2cb),a299_0x4b7b87(0x1a3),a299_0x4b7b87(0x1af)]},'value':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'role':{'enum':['TO','CC',a299_0x4b7b87(0x2d2)]}},'additionalProperties':!![]}}},'additionalProperties':!![]},'form':![],'formPermission':![]},'additionalProperties':!![]},'flowEdge':{'type':a299_0x4b7b87(0x197),'properties':{'id':{'type':a299_0x4b7b87(0x20d),'pattern':a299_0x4b7b87(0x17f)},'source':{'type':'string','minLength':0x1},'target':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'sourceNodeId':{'type':'string','minLength':0x1},'targetNodeId':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'conditionType':{'enum':[a299_0x4b7b87(0x217),'APPROVED',a299_0x4b7b87(0x2c6),a299_0x4b7b87(0x248)]},'expression':{'type':a299_0x4b7b87(0x20d)},'defaultFlow':{'type':a299_0x4b7b87(0x1d7)},'name':{'type':a299_0x4b7b87(0x20d)},'waypoints':{'type':a299_0x4b7b87(0x1b8),'items':{'$ref':'#/$defs/position'}}},'allOf':[{'anyOf':[{'required':[a299_0x4b7b87(0x295)]},{'required':[a299_0x4b7b87(0x188)]}]},{'anyOf':[{'required':[a299_0x4b7b87(0x1c6)]},{'required':['targetNodeId']}]}],'additionalProperties':!![]}},'properties':{'id':![],'appCode':![],'flowName':{'type':'string','minLength':0x1},'flowDesc':{'type':a299_0x4b7b87(0x20d)},'flowType':{'enum':[a299_0x4b7b87(0x27e),a299_0x4b7b87(0x1db)]},'datasetCode':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'pageId':{'type':a299_0x4b7b87(0x215),'minimum':0x1,'maximum':Number[a299_0x4b7b87(0x1f4)]},'pageIds':{'type':a299_0x4b7b87(0x1b8),'items':{'type':a299_0x4b7b87(0x215),'minimum':0x1,'maximum':Number['MAX_SAFE_INTEGER']}},'templateName':![],'flowJson':{'type':'object','required':[a299_0x4b7b87(0x203),'edges'],'properties':{'flowKey':![],'flowCode':![],'flowName':![],'bindDatasetCode':![],'datasetCode':![],'appCode':![],'pageId':![],'templateName':![],'schemaVersion':{'type':'string','const':a299_0x4b7b87(0x2cc),'description':a299_0x4b7b87(0x1e5)},'formSchema':![],'formDefinitions':![],'formPermissions':![],'pageMode':{'const':a299_0x4b7b87(0x2c7)},'startPageId':![],'startPath':{'type':a299_0x4b7b87(0x20d),'minLength':0x1},'nodes':{'type':a299_0x4b7b87(0x1b8),'minItems':0x1,'items':{'$ref':a299_0x4b7b87(0x2b8)}},'edges':{'type':'array','minItems':0x1,'items':{'$ref':'#/$defs/flowEdge'}}},'additionalProperties':!![]}},'additionalProperties':!![]};const REMOVED_FLOW_JSON_FIELDS=[a299_0x4b7b87(0x221),a299_0x4b7b87(0x1a1),'flowName',a299_0x4b7b87(0x297),a299_0x4b7b87(0x2bd),a299_0x4b7b87(0x1b7),a299_0x4b7b87(0x2be),a299_0x4b7b87(0x186)],REMOVED_ROOT_FIELDS=['id',a299_0x4b7b87(0x1b7),a299_0x4b7b87(0x186)],DEFAULT_FLOW_SCHEMA_VERSION=a299_0x4b7b87(0x2cc),NODE_TYPES=new Set([a299_0x4b7b87(0x299),a299_0x4b7b87(0x233),a299_0x4b7b87(0x2c1),a299_0x4b7b87(0x23a),a299_0x4b7b87(0x1ee),a299_0x4b7b87(0x207)]),CONDITION_TYPES=new Set([a299_0x4b7b87(0x217),a299_0x4b7b87(0x2e1),'REJECTED',a299_0x4b7b87(0x248)]),APPROVAL_MODES=new Set([a299_0x4b7b87(0x22d),a299_0x4b7b87(0x29c),a299_0x4b7b87(0x1c8)]),APPROVAL_TASK_MODES=new Set([a299_0x4b7b87(0x2c1),a299_0x4b7b87(0x20c)]),FLOW_TIME_UNITS=new Set([a299_0x4b7b87(0x1ad),a299_0x4b7b87(0x23c),'HOURS',a299_0x4b7b87(0x19a)]),APPROVAL_TIMEOUT_ACTIONS=new Set([a299_0x4b7b87(0x2ac),a299_0x4b7b87(0x24c),a299_0x4b7b87(0x249)]),FLOW_TYPES=new Set([a299_0x4b7b87(0x27e),a299_0x4b7b87(0x1db)]),FLOW_PAGE_MODES=new Set([a299_0x4b7b87(0x2c7),'PLATFORM_FORM']),BPMN_ID_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,VARIABLE_PATTERN=/^[A-Za-z_][A-Za-z0-9_]*$/,NOTIFICATION_PLACEHOLDER_PATTERN=/\$\{([^{}]+)\}/g,NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN=/^\$\{(?:event|context|variables)\.[^{}]+\}$/,NOTIFICATION_FAILURE_POLICIES=new Set([a299_0x4b7b87(0x1cc),a299_0x4b7b87(0x2c2)]),NOTIFICATION_RECIPIENT_TYPES=new Set(['USER',a299_0x4b7b87(0x1a3),a299_0x4b7b87(0x1af)]),NOTIFICATION_RECIPIENT_ROLES=new Set(['TO','CC',a299_0x4b7b87(0x2d2)]),MAX_NOTIFICATION_FACTS=0x8,MAX_NOTIFICATION_ACTIONS=0x2,MAX_ASYNC_RETRY_COUNT=0xa,MAX_CC_RECIPIENTS=0x64,DEFAULT_SCRIPT_RESULT_VARIABLE=a299_0x4b7b87(0x284),UNSUPPORTED_FORM_MESSAGE=a299_0x4b7b87(0x2ce),UNSUPPORTED_PLATFORM_FORM_MESSAGE=a299_0x4b7b87(0x1a4),RESERVED_RESULT_VARIABLES=new Set(['formData','approved','approval_sys_appCode',a299_0x4b7b87(0x265),a299_0x4b7b87(0x2bf),'approval_sys_initiatorUsername',a299_0x4b7b87(0x20a),'approval_sys_pageId',a299_0x4b7b87(0x18d),'approval_sys_dataId']);export function normalizeFlowConfig(_0xf5dd01){const _0x6b2ca4=a299_0x4b7b87;if(!isRecord(_0xf5dd01))throw new TypeError(_0x6b2ca4(0x2c0));const _0x4fb48e=cloneJsonValue(_0xf5dd01),_0x20a239=_0x4fb48e[_0x6b2ca4(0x192)],_0x5d383c=isRecord(_0x20a239)?cloneJsonValue(_0x20a239):{},_0x24bf8f=[],_0x55f160=[];for(const _0x3c934a of REMOVED_ROOT_FIELDS){if(!Object[_0x6b2ca4(0x2d1)][_0x6b2ca4(0x22f)]['call'](_0x4fb48e,_0x3c934a))continue;delete _0x4fb48e[_0x3c934a],_0x55f160[_0x6b2ca4(0x1bf)](_0x3c934a),_0x24bf8f[_0x6b2ca4(0x1bf)]({'code':'legacy_field_removed','path':_0x3c934a,'message':_0x3c934a+_0x6b2ca4(0x24d)});}for(const _0x215fc4 of REMOVED_FLOW_JSON_FIELDS){if(!Object['prototype'][_0x6b2ca4(0x22f)][_0x6b2ca4(0x21d)](_0x5d383c,_0x215fc4))continue;const _0x151007=_0x6b2ca4(0x1f7)+_0x215fc4;delete _0x5d383c[_0x215fc4],_0x55f160[_0x6b2ca4(0x1bf)](_0x151007),_0x24bf8f['push']({'code':_0x6b2ca4(0x2e2),'path':_0x151007,'message':_0x151007+_0x6b2ca4(0x24d)});}if(Object[_0x6b2ca4(0x2d1)]['hasOwnProperty'][_0x6b2ca4(0x21d)](_0x5d383c,_0x6b2ca4(0x1e6))){const _0x2c6ea2=_0x5d383c[_0x6b2ca4(0x1e6)],_0x293176=typeof _0x2c6ea2===_0x6b2ca4(0x20d)?_0x2c6ea2[_0x6b2ca4(0x1b3)]():_0x2c6ea2;if(isEmptyJsonValue(_0x2c6ea2)||_0x293176===DEFAULT_FLOW_SCHEMA_VERSION){const _0x4f323b=_0x6b2ca4(0x1d4);delete _0x5d383c[_0x6b2ca4(0x1e6)],_0x55f160[_0x6b2ca4(0x1bf)](_0x4f323b),_0x24bf8f[_0x6b2ca4(0x1bf)]({'code':_0x6b2ca4(0x2e2),'path':_0x4f323b,'message':_0x4f323b+'\x20was\x20empty\x20or\x20used\x20the\x20default\x20'+DEFAULT_FLOW_SCHEMA_VERSION+'\x20value\x20and\x20was\x20removed\x20from\x20the\x20portable\x20FlowConfig.'});}}removeEmptyMetadata(_0x5d383c,'flowJson',_0x24bf8f,_0x55f160);_0x4fb48e[_0x6b2ca4(0x252)]===_0x6b2ca4(0x1db)&&!Object['prototype'][_0x6b2ca4(0x22f)][_0x6b2ca4(0x21d)](_0x5d383c,_0x6b2ca4(0x225))&&(_0x5d383c['pageMode']=_0x6b2ca4(0x2c7));_0x4fb48e[_0x6b2ca4(0x192)]=_0x5d383c;if(typeof _0x4fb48e[_0x6b2ca4(0x1a7)]===_0x6b2ca4(0x20d))_0x4fb48e[_0x6b2ca4(0x1a7)]=_0x4fb48e[_0x6b2ca4(0x1a7)]['trim']();return{'config':_0x4fb48e,'warnings':_0x24bf8f,'removedPaths':_0x55f160};}export function validateFlowConfig(_0x16edf9){const _0x91add4=a299_0x4b7b87;let _0x5a7c95;try{_0x5a7c95=normalizeFlowConfig(_0x16edf9);}catch(_0x4ecd07){const _0x414f8a=_0x4ecd07 instanceof Error?_0x4ecd07[_0x91add4(0x282)]:String(_0x4ecd07),_0x1d03a4={'flowJson':{}};return{'valid':![],'errors':[{'path':'$','message':_0x414f8a}],'warnings':[],'normalized':_0x1d03a4,'validationConfig':_0x1d03a4};}const _0x54d944=_0x5a7c95['config'],_0x40f2b7=cloneJsonValue(_0x54d944),_0x3c40f3=_0x40f2b7[_0x91add4(0x192)];_0x3c40f3['flowKey']=_0x91add4(0x2b0),_0x3c40f3['flowName']=_0x54d944[_0x91add4(0x1a7)];typeof _0x54d944['datasetCode']===_0x91add4(0x20d)&&_0x54d944[_0x91add4(0x2bd)]['trim']()&&(_0x3c40f3[_0x91add4(0x297)]=_0x54d944['datasetCode'][_0x91add4(0x1b3)]());const _0x2c0f10=[];return validateOuterMetadata(_0x54d944,_0x2c0f10),validateFlowClassification(_0x54d944,_0x2c0f10),validateGraph(_0x54d944[_0x91add4(0x192)],_0x2c0f10),{'valid':_0x2c0f10[_0x91add4(0x1da)]===0x0,'errors':_0x2c0f10,'warnings':_0x5a7c95['warnings'],'normalized':_0x54d944,'validationConfig':_0x40f2b7};}function validateFlowClassification(_0x448296,_0x59d547){const _0x536fdd=a299_0x4b7b87;if(!isRecord(_0x448296[_0x536fdd(0x192)]))return;const _0x5b4e5f=_0x448296[_0x536fdd(0x252)],_0x31e336=_0x448296['flowJson'][_0x536fdd(0x225)];_0x31e336!==undefined&&(typeof _0x31e336!==_0x536fdd(0x20d)||!FLOW_PAGE_MODES[_0x536fdd(0x267)](_0x31e336))&&_0x59d547[_0x536fdd(0x1bf)]({'path':_0x536fdd(0x182),'message':_0x536fdd(0x1ae)+String(_0x31e336)+'.'});_0x5b4e5f===_0x536fdd(0x27e)&&_0x31e336!==undefined&&_0x59d547[_0x536fdd(0x1bf)]({'path':_0x536fdd(0x182),'message':_0x536fdd(0x19f)});_0x5b4e5f===_0x536fdd(0x1db)&&_0x31e336===_0x536fdd(0x2a7)&&_0x59d547[_0x536fdd(0x1bf)]({'path':_0x536fdd(0x182),'message':UNSUPPORTED_PLATFORM_FORM_MESSAGE});(_0x5b4e5f===_0x536fdd(0x27e)||_0x5b4e5f==='INDEPENDENT_FLOW')&&validateCustomPageNavigation(_0x448296,_0x5b4e5f,_0x31e336,_0x59d547);if(_0x5b4e5f!==_0x536fdd(0x27e)||!Array[_0x536fdd(0x1cb)](_0x448296[_0x536fdd(0x192)]['nodes']))return;_0x448296[_0x536fdd(0x192)][_0x536fdd(0x203)][_0x536fdd(0x1f0)]((_0xeb2300,_0x1a7d17)=>{const _0x2f2b58=_0x536fdd;isRecord(_0xeb2300)&&_0xeb2300['type']==='APPROVAL'&&_0xeb2300[_0x2f2b58(0x2ae)]===_0x2f2b58(0x20c)&&_0x59d547[_0x2f2b58(0x1bf)]({'path':_0x2f2b58(0x291)+_0x1a7d17+_0x2f2b58(0x190),'message':_0x2f2b58(0x246)});});}function validateCustomPageNavigation(_0x30f1c7,_0x748025,_0x48e8d0,_0x1e4eee){const _0x33813d=a299_0x4b7b87,_0x5b4903=_0x30f1c7[_0x33813d(0x192)][_0x33813d(0x226)];_0x5b4903!==undefined&&_0x1e4eee[_0x33813d(0x1bf)]({'path':_0x33813d(0x230),'message':_0x33813d(0x18b)});const _0x29332b=_0x30f1c7[_0x33813d(0x192)][_0x33813d(0x2a5)];_0x29332b!==undefined&&(typeof _0x29332b!==_0x33813d(0x20d)||_0x29332b[_0x33813d(0x1b3)]()==='')&&_0x1e4eee[_0x33813d(0x1bf)]({'path':_0x33813d(0x25d),'message':_0x33813d(0x245)});const _0xba4bf6=Array[_0x33813d(0x1cb)](_0x30f1c7['flowJson']['nodes'])?_0x30f1c7[_0x33813d(0x192)][_0x33813d(0x203)]['map']((_0x2b46bf,_0x1f4bf5)=>({'node':_0x2b46bf,'index':_0x1f4bf5}))['filter'](({node:_0x399eb4})=>isRecord(_0x399eb4)&&_0x399eb4[_0x33813d(0x212)]!==undefined):[],_0x4b25c7=_0x29332b!==undefined||_0xba4bf6[_0x33813d(0x1da)]>0x0,_0x5afe86=_0x48e8d0===undefined&&_0x748025===_0x33813d(0x1db)?_0x33813d(0x2c7):_0x48e8d0;_0x4b25c7&&(_0x748025!==_0x33813d(0x1db)||_0x5afe86!==_0x33813d(0x2c7))&&(_0x29332b!==undefined&&_0x1e4eee[_0x33813d(0x1bf)]({'path':_0x33813d(0x25d),'message':_0x33813d(0x210)}),_0xba4bf6[_0x33813d(0x1f0)](({index:_0x2e13f0})=>{const _0x103087=_0x33813d;_0x1e4eee[_0x103087(0x1bf)]({'path':_0x103087(0x291)+_0x2e13f0+_0x103087(0x2e0),'message':_0x103087(0x22a)});}));}export async function writeNormalizedFlowConfig(_0x53beda,_0x1dbe7e,_0x2c5d74={}){const _0x4c15d8=a299_0x4b7b87,_0x1bd151=resolve(_0x53beda),_0x4b210e=_0x1bd151+'.'+process['pid']+'.'+randomUUID()+_0x4c15d8(0x279),_0x96f73c=JSON[_0x4c15d8(0x1c9)](_0x1dbe7e,null,0x2)+'\x0a';let _0x510126;try{try{_0x510126=(await stat(_0x1bd151))[_0x4c15d8(0x23e)]&0x1ff;}catch{_0x510126=undefined;}await writeFile(_0x4b210e,_0x96f73c,{'encoding':'utf8','flag':'wx','mode':_0x510126??0x1a4});if(_0x510126!==undefined)await chmod(_0x4b210e,_0x510126);_0x2c5d74[_0x4c15d8(0x18c)]===![]?(await link(_0x4b210e,_0x1bd151),await unlink(_0x4b210e)):await rename(_0x4b210e,_0x1bd151);}finally{await unlink(_0x4b210e)[_0x4c15d8(0x1e0)](()=>undefined);}}function validateOuterMetadata(_0x46ffa5,_0x1cb6f5){const _0x4ccc80=a299_0x4b7b87;(typeof _0x46ffa5[_0x4ccc80(0x1a7)]!==_0x4ccc80(0x20d)||_0x46ffa5[_0x4ccc80(0x1a7)][_0x4ccc80(0x1b3)]()==='')&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x1a7),'message':'flowName\x20is\x20required.'});_0x46ffa5['flowDesc']!==undefined&&typeof _0x46ffa5[_0x4ccc80(0x1a8)]!=='string'&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x1a8),'message':_0x4ccc80(0x202)});if(_0x46ffa5[_0x4ccc80(0x252)]===undefined||_0x46ffa5[_0x4ccc80(0x252)]===null)_0x1cb6f5['push']({'path':_0x4ccc80(0x252),'message':'flowType\x20is\x20required.'});else(typeof _0x46ffa5['flowType']!=='string'||!FLOW_TYPES['has'](_0x46ffa5[_0x4ccc80(0x252)]))&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x252),'message':_0x4ccc80(0x29e)+String(_0x46ffa5['flowType'])+'.'});_0x46ffa5[_0x4ccc80(0x2bd)]!==undefined&&typeof _0x46ffa5[_0x4ccc80(0x2bd)]!=='string'&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x2bd),'message':_0x4ccc80(0x1ed)});_0x46ffa5[_0x4ccc80(0x187)]===undefined&&_0x46ffa5[_0x4ccc80(0x2be)]!==undefined&&(!Number['isSafeInteger'](_0x46ffa5['pageId'])||_0x46ffa5['pageId']<=0x0)&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x2be),'message':_0x4ccc80(0x1c1)});if(_0x46ffa5[_0x4ccc80(0x187)]!==undefined){if(!Array[_0x4ccc80(0x1cb)](_0x46ffa5['pageIds'])||_0x46ffa5[_0x4ccc80(0x187)][_0x4ccc80(0x292)](_0x1117ff=>!Number[_0x4ccc80(0x27d)](_0x1117ff)||_0x1117ff<=0x0))_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x187),'message':_0x4ccc80(0x2a9)});else[...new Set(_0x46ffa5['pageIds'])][_0x4ccc80(0x250)](',')[_0x4ccc80(0x1da)]>0x800&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x187),'message':_0x4ccc80(0x2ca)});_0x46ffa5[_0x4ccc80(0x252)]===_0x4ccc80(0x1db)&&Array[_0x4ccc80(0x1cb)](_0x46ffa5[_0x4ccc80(0x187)])&&_0x46ffa5['pageIds'][_0x4ccc80(0x1da)]>0x0&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':_0x4ccc80(0x187),'message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageIds.'});}_0x46ffa5[_0x4ccc80(0x252)]==='INDEPENDENT_FLOW'&&_0x46ffa5['datasetCode']!==undefined&&_0x1cb6f5['push']({'path':_0x4ccc80(0x2bd),'message':_0x4ccc80(0x276)}),_0x46ffa5[_0x4ccc80(0x252)]===_0x4ccc80(0x1db)&&_0x46ffa5[_0x4ccc80(0x187)]===undefined&&_0x46ffa5[_0x4ccc80(0x2be)]!==undefined&&_0x1cb6f5[_0x4ccc80(0x1bf)]({'path':'pageId','message':'INDEPENDENT_FLOW\x20cannot\x20bind\x20pageId.'});}function validateGraph(_0x25a134,_0x2af3e6){const _0x141bb6=a299_0x4b7b87;if(!isRecord(_0x25a134)){_0x2af3e6[_0x141bb6(0x1bf)]({'path':_0x141bb6(0x192),'message':'flowJson\x20must\x20be\x20an\x20object.'});return;}!Array['isArray'](_0x25a134[_0x141bb6(0x203)])&&_0x2af3e6[_0x141bb6(0x1bf)]({'path':_0x141bb6(0x263),'message':_0x141bb6(0x2de)});!Array[_0x141bb6(0x1cb)](_0x25a134[_0x141bb6(0x1d3)])&&_0x2af3e6[_0x141bb6(0x1bf)]({'path':_0x141bb6(0x1de),'message':_0x141bb6(0x1b4)});Object[_0x141bb6(0x2d1)]['hasOwnProperty']['call'](_0x25a134,'schemaVersion')&&_0x2af3e6[_0x141bb6(0x1bf)]({'path':_0x141bb6(0x1d4),'message':_0x141bb6(0x283)+String(_0x25a134[_0x141bb6(0x1e6)])+_0x141bb6(0x242)+DEFAULT_FLOW_SCHEMA_VERSION+'.'});for(const _0x24cded of[_0x141bb6(0x28d),'formDefinitions','formPermissions']){Object[_0x141bb6(0x2d1)]['hasOwnProperty'][_0x141bb6(0x21d)](_0x25a134,_0x24cded)&&_0x2af3e6[_0x141bb6(0x1bf)]({'path':_0x141bb6(0x1f7)+_0x24cded,'message':UNSUPPORTED_FORM_MESSAGE});}if(!Array['isArray'](_0x25a134[_0x141bb6(0x203)])||!Array[_0x141bb6(0x1cb)](_0x25a134[_0x141bb6(0x1d3)]))return;const _0x6867b9=new Map(),_0x239916=[],_0x5de077=[],_0x4a9bd3=new Map(),_0x5788b5=new Map(),_0x3a057a=new Set();let _0x1f8d0d=0x0;_0x25a134[_0x141bb6(0x203)]['forEach']((_0x321403,_0x352268)=>{const _0x4e41f1=_0x141bb6,_0x25f599=_0x4e41f1(0x291)+_0x352268+']';if(!isRecord(_0x321403)){_0x2af3e6[_0x4e41f1(0x1bf)]({'path':_0x25f599,'message':_0x4e41f1(0x273)});return;}const _0x17b43b=_0x321403;if(typeof _0x17b43b['id']!=='string'||!BPMN_ID_PATTERN[_0x4e41f1(0x1ce)](_0x17b43b['id']))_0x2af3e6[_0x4e41f1(0x1bf)]({'path':_0x25f599+_0x4e41f1(0x1f1),'message':_0x4e41f1(0x2b5)});else _0x6867b9[_0x4e41f1(0x267)](_0x17b43b['id'])?_0x2af3e6['push']({'path':_0x25f599+'.id','message':'Duplicate\x20node\x20id:\x20'+_0x17b43b['id']+'.'}):(_0x6867b9[_0x4e41f1(0x184)](_0x17b43b['id'],_0x17b43b),_0x3a057a['add'](_0x17b43b['id']));if(!NODE_TYPES[_0x4e41f1(0x267)](_0x17b43b[_0x4e41f1(0x19b)]))_0x2af3e6[_0x4e41f1(0x1bf)]({'path':_0x25f599+'.type','message':_0x4e41f1(0x260)+String(_0x17b43b[_0x4e41f1(0x19b)])+'.'});else{if(_0x17b43b['type']===_0x4e41f1(0x299))_0x239916[_0x4e41f1(0x1bf)](_0x17b43b['id']);else _0x17b43b['type']===_0x4e41f1(0x233)&&_0x5de077[_0x4e41f1(0x1bf)](_0x17b43b['id']);}_0x17b43b['type']==='APPROVAL'&&(_0x17b43b['taskMode']===undefined||_0x17b43b[_0x4e41f1(0x2ae)]===_0x4e41f1(0x2c1))&&(_0x1f8d0d+=0x1);validateNode(_0x17b43b,_0x25f599,_0x2af3e6);if(_0x17b43b['type']===_0x4e41f1(0x1ee)){const _0xc0d2eb=resolveEffectiveResultVariable(_0x17b43b[_0x4e41f1(0x1bc)],![]);_0xc0d2eb&&(registerResultVariableOwner(_0x5788b5,_0xc0d2eb,_0x17b43b['id'],_0x2af3e6),!_0x4a9bd3[_0x4e41f1(0x267)](_0xc0d2eb)&&_0x4a9bd3[_0x4e41f1(0x184)](_0xc0d2eb,_0x17b43b['id']));}if(_0x17b43b[_0x4e41f1(0x19b)]===_0x4e41f1(0x2c1)&&isRecord(_0x17b43b[_0x4e41f1(0x234)])&&_0x17b43b[_0x4e41f1(0x234)][_0x4e41f1(0x19e)]===!![]&&_0x17b43b[_0x4e41f1(0x234)][_0x4e41f1(0x1f6)]===_0x4e41f1(0x249)){const _0x34278c=resolveEffectiveResultVariable(_0x17b43b[_0x4e41f1(0x234)][_0x4e41f1(0x1bc)],!![]);_0x34278c&®isterResultVariableOwner(_0x5788b5,_0x34278c,_0x17b43b['id']+_0x4e41f1(0x2b4),_0x2af3e6);}});_0x239916[_0x141bb6(0x1da)]!==0x1&&_0x2af3e6['push']({'path':_0x141bb6(0x263),'message':'Flow\x20must\x20contain\x20exactly\x20one\x20START\x20node.'});_0x5de077[_0x141bb6(0x1da)]===0x0&&_0x2af3e6[_0x141bb6(0x1bf)]({'path':_0x141bb6(0x263),'message':_0x141bb6(0x22b)});const _0x199c93=new Map(),_0x4b1c96=new Map(),_0x357d81=new Map(),_0x45b08e=new Set();_0x25a134[_0x141bb6(0x1d3)][_0x141bb6(0x1f0)]((_0x58a593,_0x1fe6d5)=>{const _0x10a98e=_0x141bb6,_0x5c5ba5=_0x10a98e(0x1c7)+_0x1fe6d5+']';if(!isRecord(_0x58a593)){_0x2af3e6[_0x10a98e(0x1bf)]({'path':_0x5c5ba5,'message':_0x10a98e(0x296)});return;}const _0x3b64c3=_0x58a593;_0x357d81[_0x10a98e(0x184)](_0x3b64c3,_0x5c5ba5);const _0x369cc3=resolveEdgeEndpoint(_0x3b64c3[_0x10a98e(0x295)],_0x3b64c3[_0x10a98e(0x188)]),_0x88a684=resolveEdgeEndpoint(_0x3b64c3[_0x10a98e(0x1c6)],_0x3b64c3[_0x10a98e(0x24e)]);if(!_0x369cc3)_0x2af3e6['push']({'path':_0x5c5ba5+_0x10a98e(0x21e),'message':'edge\x20source\x20is\x20required.'});if(!_0x88a684)_0x2af3e6['push']({'path':_0x5c5ba5+'.target','message':_0x10a98e(0x255)});_0x369cc3&&!_0x6867b9[_0x10a98e(0x267)](_0x369cc3)&&_0x2af3e6[_0x10a98e(0x1bf)]({'path':_0x5c5ba5+_0x10a98e(0x21e),'message':_0x10a98e(0x28b)+_0x369cc3+'.'});_0x88a684&&!_0x6867b9[_0x10a98e(0x267)](_0x88a684)&&_0x2af3e6[_0x10a98e(0x1bf)]({'path':_0x5c5ba5+'.target','message':_0x10a98e(0x280)+_0x88a684+'.'});if(_0x3b64c3['id']!==undefined){if(typeof _0x3b64c3['id']!==_0x10a98e(0x20d)||!BPMN_ID_PATTERN[_0x10a98e(0x1ce)](_0x3b64c3['id']))_0x2af3e6[_0x10a98e(0x1bf)]({'path':_0x5c5ba5+'.id','message':'edge\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else{if(_0x3a057a[_0x10a98e(0x267)](_0x3b64c3['id']))_0x2af3e6['push']({'path':_0x5c5ba5+_0x10a98e(0x1f1),'message':_0x10a98e(0x18e)+_0x3b64c3['id']+'.'});else!_0x3a057a[_0x10a98e(0x267)](_0x3b64c3['id'])&&_0x3a057a[_0x10a98e(0x224)](_0x3b64c3['id']);}}if(_0x369cc3&&_0x88a684){const _0x4d0fd0=_0x369cc3+'\x00'+_0x88a684+'\x00'+(_0x3b64c3['conditionType']??_0x10a98e(0x217));_0x45b08e['has'](_0x4d0fd0)?_0x2af3e6[_0x10a98e(0x1bf)]({'path':_0x5c5ba5,'message':_0x10a98e(0x293)+_0x369cc3+_0x10a98e(0x1fd)+_0x88a684+'\x20('+(_0x3b64c3['conditionType']??_0x10a98e(0x217))+').'}):_0x45b08e[_0x10a98e(0x224)](_0x4d0fd0);}validateEdge(_0x3b64c3,_0x5c5ba5,_0x2af3e6),_0x369cc3&&_0x88a684&&(_0x199c93['get'](_0x369cc3)?.[_0x10a98e(0x1bf)](_0x3b64c3)??_0x199c93[_0x10a98e(0x184)](_0x369cc3,[_0x3b64c3]),_0x4b1c96['get'](_0x88a684)?.[_0x10a98e(0x1bf)](_0x3b64c3)??_0x4b1c96['set'](_0x88a684,[_0x3b64c3]));});if(_0x239916['length']!==0x1)return;validateGraphShape(_0x6867b9,_0x239916[0x0],_0x5de077,_0x199c93,_0x4b1c96,_0x357d81,_0x2af3e6),validateScriptResultReferences(_0x6867b9,_0x239916[0x0],_0x199c93,_0x4b1c96,_0x357d81,_0x4a9bd3,_0x2af3e6),validateApprovalResults(_0x6867b9,_0x1f8d0d,_0x5de077,_0x2af3e6);}function validateNode(_0x3fdb8f,_0x145839,_0x1f5a69){const _0x223431=a299_0x4b7b87;for(const _0x55ec81 of['form',_0x223431(0x1a9)]){Object[_0x223431(0x2d1)]['hasOwnProperty']['call'](_0x3fdb8f,_0x55ec81)&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+'.'+_0x55ec81,'message':UNSUPPORTED_FORM_MESSAGE});}if(!NODE_TYPES[_0x223431(0x267)](_0x3fdb8f[_0x223431(0x19b)]))return;(typeof _0x3fdb8f['name']!==_0x223431(0x20d)||_0x3fdb8f['name'][_0x223431(0x1b3)]()==='')&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x266),'message':_0x223431(0x220)});_0x3fdb8f[_0x223431(0x2be)]!==undefined&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x27c),'message':'node\x20pageId\x20is\x20no\x20longer\x20supported;\x20use\x20node\x20path\x20instead.'});if(_0x3fdb8f['path']!==undefined){if(typeof _0x3fdb8f[_0x223431(0x212)]!==_0x223431(0x20d)||_0x3fdb8f[_0x223431(0x212)]['trim']()==='')_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+'.path','message':_0x223431(0x208)});else _0x3fdb8f[_0x223431(0x19b)]!=='APPROVAL'&&_0x3fdb8f['type']!==_0x223431(0x233)&&_0x1f5a69['push']({'path':_0x145839+_0x223431(0x196),'message':'node\x20path\x20is\x20supported\x20only\x20on\x20APPROVAL\x20or\x20END\x20nodes.'});}const _0x5982dd=_0x3fdb8f['position'];if(!isRecord(_0x5982dd))_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x247),'message':_0x223431(0x1f2)});else for(const _0x20d33d of['x','y']){const _0xa038d2=_0x5982dd[_0x20d33d];(typeof _0xa038d2!=='number'||!Number[_0x223431(0x191)](_0xa038d2)||_0xa038d2<0x0)&&_0x1f5a69['push']({'path':_0x145839+_0x223431(0x227)+_0x20d33d,'message':_0x223431(0x237)+_0x20d33d+_0x223431(0x214)});}if(_0x3fdb8f[_0x223431(0x19b)]===_0x223431(0x2c1)){const _0x985d6d=_0x3fdb8f[_0x223431(0x29f)]??_0x223431(0x22d),_0x55504d=_0x3fdb8f[_0x223431(0x2ae)]??_0x223431(0x2c1);!APPROVAL_TASK_MODES[_0x223431(0x267)](_0x55504d)&&_0x1f5a69['push']({'path':_0x145839+_0x223431(0x181),'message':_0x223431(0x222)+String(_0x55504d)+'.'});!APPROVAL_MODES[_0x223431(0x267)](_0x985d6d)&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+'.approvalMode','message':'Unsupported\x20approval\x20mode:\x20'+String(_0x985d6d)+'.'});if(!isRecord(_0x3fdb8f[_0x223431(0x1c4)]))_0x1f5a69['push']({'path':_0x145839+_0x223431(0x198),'message':_0x223431(0x2d5)});else{const _0x37ab88=_0x3fdb8f[_0x223431(0x1c4)][_0x223431(0x2b6)];_0x37ab88!==_0x223431(0x1ea)&&_0x37ab88!==_0x223431(0x1a3)&&_0x1f5a69['push']({'path':_0x145839+_0x223431(0x26e),'message':_0x223431(0x18f)});if(_0x37ab88===_0x223431(0x1ea)){const _0x4adc5b=_0x3fdb8f[_0x223431(0x1c4)][_0x223431(0x25f)];if(!Array[_0x223431(0x1cb)](_0x4adc5b)||_0x4adc5b[_0x223431(0x1da)]===0x0)_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x2a2),'message':_0x223431(0x1be)});else{const _0x10f797=_0x4adc5b[_0x223431(0x1e9)](_0x2f338b=>!isValidUserId(_0x2f338b));_0x10f797>=0x0&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x1bb)+_0x10f797+']','message':_0x223431(0x259)});const _0x4a5593=new Set(_0x4adc5b['filter'](isValidUserId)[_0x223431(0x199)](_0xf8a93a=>String(_0xf8a93a)[_0x223431(0x1b3)]()));_0x985d6d===_0x223431(0x22d)&&_0x4a5593[_0x223431(0x1fc)]>0x1&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+'.assignee.userIds','message':_0x223431(0x277)});}}if(_0x37ab88===_0x223431(0x1a3)){const _0x33451b=_0x3fdb8f[_0x223431(0x1c4)][_0x223431(0x1b5)],_0x17c4c7=typeof _0x33451b===_0x223431(0x2d8)||typeof _0x33451b===_0x223431(0x20d)?Number(String(_0x33451b)[_0x223431(0x1b3)]()):Number['NaN'];(!Number[_0x223431(0x27d)](_0x17c4c7)||_0x17c4c7<=0x0)&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x2d0),'message':_0x223431(0x22c)});}}if(_0x3fdb8f[_0x223431(0x1eb)]!==undefined){if(!isRecord(_0x3fdb8f[_0x223431(0x1eb)]))_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x1cf),'message':'transferCandidates\x20must\x20be\x20an\x20object.'});else{if(_0x3fdb8f[_0x223431(0x1eb)]['strategy']!=='FIXED')_0x1f5a69['push']({'path':_0x145839+_0x223431(0x2d9),'message':_0x223431(0x26f)});else{const _0x2c6d2b=_0x3fdb8f['transferCandidates'][_0x223431(0x25f)];if(!Array[_0x223431(0x1cb)](_0x2c6d2b)||_0x2c6d2b[_0x223431(0x1da)]===0x0)_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x204),'message':'FIXED\x20transferCandidates\x20requires\x20non-empty\x20userIds.'});else{const _0x1bfd94=_0x2c6d2b[_0x223431(0x1e9)](_0xa8a5d8=>!isValidUserId(_0xa8a5d8));_0x1bfd94>=0x0&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x25b)+_0x1bfd94+']','message':'transfer\x20candidate\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.'});}}}}}_0x3fdb8f['sequential']!==undefined&&typeof _0x3fdb8f[_0x223431(0x271)]!=='boolean'&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x25a),'message':'sequential\x20must\x20be\x20a\x20boolean.'});if(_0x3fdb8f[_0x223431(0x19b)]===_0x223431(0x1ee)){(typeof _0x3fdb8f['scriptName']!==_0x223431(0x20d)||_0x3fdb8f['scriptName'][_0x223431(0x1b3)]()==='')&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+'.scriptName','message':_0x223431(0x287)});if(_0x3fdb8f[_0x223431(0x1bc)]!==undefined){if(typeof _0x3fdb8f[_0x223431(0x1bc)]!=='string'||!VARIABLE_PATTERN[_0x223431(0x1ce)](_0x3fdb8f[_0x223431(0x1bc)]))_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x2d3),'message':_0x223431(0x294)});else(RESERVED_RESULT_VARIABLES[_0x223431(0x267)](_0x3fdb8f[_0x223431(0x1bc)])||_0x3fdb8f['resultVariable'][_0x223431(0x1b9)](_0x223431(0x185)))&&_0x1f5a69[_0x223431(0x1bf)]({'path':_0x145839+_0x223431(0x2d3),'message':_0x223431(0x205)+_0x3fdb8f[_0x223431(0x1bc)]+'.'});}}validateAsyncExecution(_0x3fdb8f,_0x145839,_0x1f5a69),validateApprovalTimeout(_0x3fdb8f,_0x145839,_0x1f5a69),validateCcConfig(_0x3fdb8f,_0x145839,_0x1f5a69),_0x3fdb8f[_0x223431(0x19b)]===_0x223431(0x207)&&validateNotificationConfig(_0x3fdb8f['config'],_0x145839+_0x223431(0x26d),_0x1f5a69);}function validateAsyncExecution(_0x3b84ae,_0x39c4d7,_0x1dd15a){const _0x20d61d=a299_0x4b7b87;if(_0x3b84ae[_0x20d61d(0x27b)]===undefined)return;if(!isRecord(_0x3b84ae[_0x20d61d(0x27b)])){_0x1dd15a[_0x20d61d(0x1bf)]({'path':_0x39c4d7+_0x20d61d(0x2b3),'message':_0x20d61d(0x1d2)});return;}if(_0x3b84ae[_0x20d61d(0x27b)][_0x20d61d(0x19e)]!==undefined&&typeof _0x3b84ae[_0x20d61d(0x27b)][_0x20d61d(0x19e)]!==_0x20d61d(0x1d7)){_0x1dd15a[_0x20d61d(0x1bf)]({'path':_0x39c4d7+_0x20d61d(0x2cd),'message':_0x20d61d(0x1f8)});return;}if(_0x3b84ae['async'][_0x20d61d(0x19e)]!==!![])return;_0x3b84ae[_0x20d61d(0x19b)]!==_0x20d61d(0x1ee)&&_0x1dd15a[_0x20d61d(0x1bf)]({'path':_0x39c4d7+'.async','message':_0x20d61d(0x2a3)});const _0x3c221b=_0x3b84ae[_0x20d61d(0x27b)][_0x20d61d(0x1c2)]??0x3;(!Number[_0x20d61d(0x251)](_0x3c221b)||_0x3c221b<0x1||_0x3c221b>MAX_ASYNC_RETRY_COUNT)&&_0x1dd15a[_0x20d61d(0x1bf)]({'path':_0x39c4d7+_0x20d61d(0x25e),'message':_0x20d61d(0x264)+MAX_ASYNC_RETRY_COUNT+'.'}),_0x3b84ae['async'][_0x20d61d(0x1ec)]!==undefined&&validateTimeAmount(_0x3b84ae[_0x20d61d(0x27b)]['retryInterval'],_0x39c4d7+'.async.retryInterval',_0x1dd15a);}function validateApprovalTimeout(_0x1c8a94,_0x4a771d,_0x3aef32){const _0x16982b=a299_0x4b7b87;if(_0x1c8a94['timeout']===undefined)return;if(!isRecord(_0x1c8a94[_0x16982b(0x234)])){_0x3aef32[_0x16982b(0x1bf)]({'path':_0x4a771d+_0x16982b(0x2b4),'message':_0x16982b(0x1e4)});return;}if(_0x1c8a94[_0x16982b(0x234)][_0x16982b(0x19e)]!==undefined&&typeof _0x1c8a94[_0x16982b(0x234)]['enabled']!==_0x16982b(0x1d7)){_0x3aef32[_0x16982b(0x1bf)]({'path':_0x4a771d+_0x16982b(0x219),'message':_0x16982b(0x180)});return;}if(_0x1c8a94[_0x16982b(0x234)][_0x16982b(0x19e)]!==!![])return;if(_0x1c8a94[_0x16982b(0x234)]['interrupting']!==undefined&&typeof _0x1c8a94[_0x16982b(0x234)][_0x16982b(0x1dc)]!==_0x16982b(0x1d7)){_0x3aef32['push']({'path':_0x4a771d+_0x16982b(0x25c),'message':'timeout.interrupting\x20must\x20be\x20a\x20boolean.'});return;}_0x1c8a94[_0x16982b(0x19b)]!=='APPROVAL'&&_0x3aef32[_0x16982b(0x1bf)]({'path':_0x4a771d+_0x16982b(0x2b4),'message':'timeout\x20is\x20only\x20supported\x20by\x20APPROVAL\x20node.'});validateTimeAmount(_0x1c8a94[_0x16982b(0x234)]['duration'],_0x4a771d+_0x16982b(0x2b2),_0x3aef32);const _0x6496a1=_0x1c8a94[_0x16982b(0x234)][_0x16982b(0x1f6)];if(!APPROVAL_TIMEOUT_ACTIONS[_0x16982b(0x267)](_0x6496a1)){_0x3aef32[_0x16982b(0x1bf)]({'path':_0x4a771d+_0x16982b(0x298),'message':'timeout.action\x20must\x20be\x20AUTO_APPROVE,\x20AUTO_REJECT,\x20or\x20EXECUTE_BFF.'});return;}(_0x1c8a94['taskMode']??_0x16982b(0x2c1))===_0x16982b(0x20c)&&_0x6496a1!=='EXECUTE_BFF'&&_0x3aef32[_0x16982b(0x1bf)]({'path':_0x4a771d+_0x16982b(0x298),'message':_0x16982b(0x1d9)});const _0x334cea=_0x1c8a94[_0x16982b(0x234)]['interrupting']??_0x6496a1!==_0x16982b(0x249);if(_0x6496a1===_0x16982b(0x249))_0x334cea&&_0x3aef32['push']({'path':_0x4a771d+_0x16982b(0x25c),'message':_0x16982b(0x2a8)}),(typeof _0x1c8a94['timeout'][_0x16982b(0x20b)]!==_0x16982b(0x20d)||_0x1c8a94[_0x16982b(0x234)][_0x16982b(0x20b)][_0x16982b(0x1b3)]()==='')&&_0x3aef32[_0x16982b(0x1bf)]({'path':_0x4a771d+_0x16982b(0x1e2),'message':_0x16982b(0x213)}),validateOptionalResultVariable(_0x1c8a94[_0x16982b(0x234)][_0x16982b(0x1bc)],_0x4a771d+'.timeout.resultVariable',_0x3aef32);else!_0x334cea&&_0x3aef32['push']({'path':_0x4a771d+_0x16982b(0x25c),'message':_0x6496a1+_0x16982b(0x29b)});}function validateTimeAmount(_0x53b2ee,_0x1fcab3,_0x53c88b){const _0x5e9209=a299_0x4b7b87;if(!isRecord(_0x53b2ee)){_0x53c88b[_0x5e9209(0x1bf)]({'path':_0x1fcab3,'message':_0x5e9209(0x261)});return;}(!Number['isInteger'](_0x53b2ee[_0x5e9209(0x235)])||Number(_0x53b2ee[_0x5e9209(0x235)])<=0x0)&&_0x53c88b['push']({'path':_0x1fcab3+_0x5e9209(0x2cf),'message':_0x5e9209(0x1f5)}),!FLOW_TIME_UNITS[_0x5e9209(0x267)](_0x53b2ee[_0x5e9209(0x28c)])&&_0x53c88b[_0x5e9209(0x1bf)]({'path':_0x1fcab3+'.unit','message':_0x5e9209(0x24f)});}function validateOptionalResultVariable(_0x3f85e4,_0x252516,_0x4faed1){const _0x36f36e=a299_0x4b7b87;if(_0x3f85e4===undefined||_0x3f85e4===null||_0x3f85e4==='')return;if(typeof _0x3f85e4!==_0x36f36e(0x20d)||!VARIABLE_PATTERN[_0x36f36e(0x1ce)](_0x3f85e4))_0x4faed1[_0x36f36e(0x1bf)]({'path':_0x252516,'message':'resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.'});else(RESERVED_RESULT_VARIABLES[_0x36f36e(0x267)](_0x3f85e4)||_0x3f85e4[_0x36f36e(0x1b9)](_0x36f36e(0x185)))&&_0x4faed1[_0x36f36e(0x1bf)]({'path':_0x252516,'message':_0x36f36e(0x205)+_0x3f85e4+'.'});}function validateCcConfig(_0x20e932,_0x47162a,_0x45eb90){const _0x3262a5=a299_0x4b7b87;if(_0x20e932['cc']===undefined)return;if(!isRecord(_0x20e932['cc'])){_0x45eb90[_0x3262a5(0x1bf)]({'path':_0x47162a+'.cc','message':_0x3262a5(0x1fe)});return;}_0x20e932[_0x3262a5(0x19b)]!==_0x3262a5(0x233)&&_0x20e932[_0x3262a5(0x19b)]!==_0x3262a5(0x2c1)&&_0x45eb90[_0x3262a5(0x1bf)]({'path':_0x47162a+_0x3262a5(0x1fb),'message':_0x3262a5(0x2bb)});Object['prototype']['hasOwnProperty'][_0x3262a5(0x21d)](_0x20e932['cc'],_0x3262a5(0x22e))&&_0x45eb90[_0x3262a5(0x1bf)]({'path':_0x47162a+_0x3262a5(0x268),'message':UNSUPPORTED_FORM_MESSAGE});const _0x54c1df=_0x20e932['cc'][_0x3262a5(0x2d6)];if(!Array[_0x3262a5(0x1cb)](_0x54c1df)||_0x54c1df[_0x3262a5(0x1da)]===0x0)_0x45eb90['push']({'path':_0x47162a+_0x3262a5(0x1b6),'message':'cc.recipientUserIds\x20must\x20be\x20a\x20non-empty\x20array.'});else{_0x54c1df[_0x3262a5(0x1da)]>MAX_CC_RECIPIENTS&&_0x45eb90['push']({'path':_0x47162a+'.cc.recipientUserIds','message':_0x3262a5(0x290)+MAX_CC_RECIPIENTS+_0x3262a5(0x289)});const _0x5d7bda=new Set();_0x54c1df[_0x3262a5(0x1f0)]((_0x3f1085,_0x4744ac)=>{const _0x5b97ca=_0x3262a5;if(typeof _0x3f1085!==_0x5b97ca(0x20d)||_0x3f1085[_0x5b97ca(0x1b3)]()==='')_0x45eb90['push']({'path':_0x47162a+_0x5b97ca(0x2c3)+_0x4744ac+']','message':'cc\x20recipient\x20userId\x20must\x20be\x20a\x20non-empty\x20string.'});else _0x5d7bda[_0x5b97ca(0x267)](_0x3f1085['trim']())?_0x45eb90[_0x5b97ca(0x1bf)]({'path':_0x47162a+_0x5b97ca(0x2c3)+_0x4744ac+']','message':_0x5b97ca(0x2bc)+_0x3f1085[_0x5b97ca(0x1b3)]()+'.'}):_0x5d7bda[_0x5b97ca(0x224)](_0x3f1085[_0x5b97ca(0x1b3)]());});}validateStringArray(_0x20e932['cc'][_0x3262a5(0x1ff)],_0x47162a+_0x3262a5(0x2b7),_0x45eb90);}function validateStringArray(_0x13a6d7,_0x35d990,_0x49a114){const _0xe3a509=a299_0x4b7b87;if(_0x13a6d7===undefined)return;if(!Array[_0xe3a509(0x1cb)](_0x13a6d7)){_0x49a114[_0xe3a509(0x1bf)]({'path':_0x35d990,'message':_0xe3a509(0x28e)});return;}const _0x335edf=new Set();_0x13a6d7[_0xe3a509(0x1f0)]((_0x5440b7,_0x2bee11)=>{const _0x55eaa8=_0xe3a509;if(typeof _0x5440b7!=='string'||_0x5440b7[_0x55eaa8(0x1b3)]()==='')_0x49a114[_0x55eaa8(0x1bf)]({'path':_0x35d990+'['+_0x2bee11+']','message':_0x55eaa8(0x21b)});else _0x335edf[_0x55eaa8(0x267)](_0x5440b7['trim']())?_0x49a114[_0x55eaa8(0x1bf)]({'path':_0x35d990+'['+_0x2bee11+']','message':_0x55eaa8(0x21a)+_0x5440b7[_0x55eaa8(0x1b3)]()+'.'}):_0x335edf[_0x55eaa8(0x224)](_0x5440b7[_0x55eaa8(0x1b3)]());});}function validateNotificationConfig(_0x5b14c6,_0x1f215e,_0x570df9){const _0x12563a=a299_0x4b7b87;if(!isRecord(_0x5b14c6)){_0x570df9[_0x12563a(0x1bf)]({'path':_0x1f215e,'message':_0x12563a(0x1f9)});return;}if(_0x5b14c6[_0x12563a(0x200)]!==undefined&&_0x5b14c6['version']!==null){if(typeof _0x5b14c6['version']!==_0x12563a(0x20d))_0x570df9[_0x12563a(0x1bf)]({'path':_0x1f215e+'.version','message':'Notification\x20version\x20must\x20be\x20a\x20string.'});else _0x5b14c6[_0x12563a(0x200)][_0x12563a(0x1b3)]()&&_0x5b14c6[_0x12563a(0x200)][_0x12563a(0x1b3)]()!=='v1'&&_0x570df9[_0x12563a(0x1bf)]({'path':_0x1f215e+_0x12563a(0x2d7),'message':_0x12563a(0x201)+_0x5b14c6[_0x12563a(0x200)]+'.'});}const _0x20a739=requireNotificationString(_0x5b14c6[_0x12563a(0x26a)],_0x1f215e+'.configCode','Notification\x20configCode\x20is\x20required.',_0x570df9);_0x20a739?.[_0x12563a(0x1cd)]('${')&&_0x570df9[_0x12563a(0x1bf)]({'path':_0x1f215e+_0x12563a(0x1b1),'message':'Notification\x20configCode\x20must\x20be\x20a\x20fixed\x20value.'});if(_0x5b14c6[_0x12563a(0x2c8)]!==undefined&&_0x5b14c6['failurePolicy']!==null){if(typeof _0x5b14c6[_0x12563a(0x2c8)]!=='string')_0x570df9[_0x12563a(0x1bf)]({'path':_0x1f215e+'.failurePolicy','message':_0x12563a(0x286)});else!NOTIFICATION_FAILURE_POLICIES['has'](_0x5b14c6['failurePolicy'][_0x12563a(0x1b3)]()[_0x12563a(0x281)]())&&_0x570df9['push']({'path':_0x1f215e+_0x12563a(0x1ac),'message':'failurePolicy\x20must\x20be\x20CONTINUE\x20or\x20FAIL.'});}!isRecord(_0x5b14c6['template'])?_0x570df9[_0x12563a(0x1bf)]({'path':_0x1f215e+'.template','message':'NOTIFICATION\x20node\x20requires\x20template.'}):validateNotificationTemplate(_0x5b14c6[_0x12563a(0x241)],_0x1f215e+_0x12563a(0x21f),_0x570df9),validateNotificationRecipients(_0x5b14c6[_0x12563a(0x1d1)],_0x1f215e+_0x12563a(0x232),_0x570df9);}function a299_0x8afb(_0x3bc3ff,_0x10fab7){_0x3bc3ff=_0x3bc3ff-0x17f;const _0x830fa9=a299_0x830f();let _0x8afb44=_0x830fa9[_0x3bc3ff];return _0x8afb44;}function validateNotificationTemplate(_0x11acd4,_0x46e116,_0x464ec1){const _0x46f4f1=a299_0x4b7b87;for(const _0xe5faea of['title',_0x46f4f1(0x2ba)]){const _0x27cff7=requireNotificationString(_0x11acd4[_0xe5faea],_0x46e116+'.'+_0xe5faea,'Notification\x20template.'+_0xe5faea+_0x46f4f1(0x1f3),_0x464ec1);if(_0x27cff7)validateNotificationPlaceholders(_0x27cff7,_0x46e116+'.'+_0xe5faea,_0x464ec1);}_0x11acd4[_0x46f4f1(0x26c)]!==undefined&&_0x11acd4[_0x46f4f1(0x26c)]!==null&&(typeof _0x11acd4[_0x46f4f1(0x26c)]!=='string'?_0x464ec1[_0x46f4f1(0x1bf)]({'path':_0x46e116+_0x46f4f1(0x2c5),'message':'Notification\x20template.detailMarkdown\x20must\x20be\x20a\x20string.'}):validateNotificationPlaceholders(_0x11acd4[_0x46f4f1(0x26c)],_0x46e116+'.detailMarkdown',_0x464ec1)),validateNotificationFacts(_0x11acd4['facts'],_0x46e116+_0x46f4f1(0x29d),_0x464ec1),validateNotificationActions(_0x11acd4[_0x46f4f1(0x28f)],_0x46e116+'.actions',_0x464ec1);}function validateNotificationFacts(_0xc05744,_0x45850b,_0x3bd258){const _0x29671d=a299_0x4b7b87;if(_0xc05744===undefined||_0xc05744===null)return;if(!Array[_0x29671d(0x1cb)](_0xc05744)){_0x3bd258[_0x29671d(0x1bf)]({'path':_0x45850b,'message':'Notification\x20template.facts\x20must\x20be\x20an\x20array.'});return;}_0xc05744['length']>MAX_NOTIFICATION_FACTS&&_0x3bd258[_0x29671d(0x1bf)]({'path':_0x45850b,'message':_0x29671d(0x1c0)+MAX_NOTIFICATION_FACTS+_0x29671d(0x216)}),_0xc05744[_0x29671d(0x1f0)]((_0x34f73a,_0x454c9c)=>{const _0x50c456=_0x29671d,_0x49ecc3=_0x45850b+'['+_0x454c9c+']';if(!isRecord(_0x34f73a)){_0x3bd258['push']({'path':_0x49ecc3,'message':'Notification\x20fact\x20must\x20be\x20an\x20object.'});return;}for(const _0x5362ef of['label',_0x50c456(0x235)]){const _0x44b925=requireNotificationString(_0x34f73a[_0x5362ef],_0x49ecc3+'.'+_0x5362ef,'Notification\x20fact.'+_0x5362ef+_0x50c456(0x1f3),_0x3bd258);_0x44b925&&validateNotificationPlaceholders(_0x44b925,_0x49ecc3+'.'+_0x5362ef,_0x3bd258);}});}function validateNotificationActions(_0x2fa00d,_0x4eacef,_0x3e80bc){const _0x5a0bfd=a299_0x4b7b87;if(_0x2fa00d===undefined||_0x2fa00d===null)return;if(!Array[_0x5a0bfd(0x1cb)](_0x2fa00d)){_0x3e80bc['push']({'path':_0x4eacef,'message':_0x5a0bfd(0x2c9)});return;}_0x2fa00d[_0x5a0bfd(0x1da)]>MAX_NOTIFICATION_ACTIONS&&_0x3e80bc[_0x5a0bfd(0x1bf)]({'path':_0x4eacef,'message':'Notification\x20template\x20supports\x20at\x20most\x20'+MAX_NOTIFICATION_ACTIONS+_0x5a0bfd(0x19c)}),_0x2fa00d[_0x5a0bfd(0x1f0)]((_0x55b63d,_0x586952)=>{const _0xa03259=_0x5a0bfd,_0x3e7b14=_0x4eacef+'['+_0x586952+']';if(!isRecord(_0x55b63d)){_0x3e80bc[_0xa03259(0x1bf)]({'path':_0x3e7b14,'message':_0xa03259(0x1ca)});return;}const _0x34c03c=requireNotificationString(_0x55b63d[_0xa03259(0x272)],_0x3e7b14+'.text','Notification\x20action.text\x20is\x20required.',_0x3e80bc);if(_0x34c03c)validateNotificationPlaceholders(_0x34c03c,_0x3e7b14+_0xa03259(0x223),_0x3e80bc);const _0x149c46=requireNotificationString(_0x55b63d[_0xa03259(0x1a2)],_0x3e7b14+_0xa03259(0x2df),'Notification\x20action.url\x20is\x20required.',_0x3e80bc);if(!_0x149c46)return;validateNotificationPlaceholders(_0x149c46,_0x3e7b14+_0xa03259(0x2df),_0x3e80bc),!/^https?:\/\//i[_0xa03259(0x1ce)](_0x149c46)&&!NOTIFICATION_ACTION_URL_PLACEHOLDER_PATTERN[_0xa03259(0x1ce)](_0x149c46)&&_0x3e80bc[_0xa03259(0x1bf)]({'path':_0x3e7b14+_0xa03259(0x2df),'message':'Notification\x20action.url\x20must\x20use\x20http/https\x20or\x20a\x20complete\x20supported\x20placeholder.'});});}function validateNotificationRecipients(_0x2e7192,_0x1c61a8,_0x5b130e){const _0x3e43fe=a299_0x4b7b87;if(_0x2e7192===undefined||_0x2e7192===null)return;if(!Array['isArray'](_0x2e7192)){_0x5b130e['push']({'path':_0x1c61a8,'message':_0x3e43fe(0x1df)});return;}let _0x5b02f0=![];_0x2e7192[_0x3e43fe(0x1f0)]((_0xf9f4f8,_0x4a31cf)=>{const _0x50946e=_0x3e43fe,_0x1fdb8f=_0x1c61a8+'['+_0x4a31cf+']';if(!isRecord(_0xf9f4f8)){_0x5b130e[_0x50946e(0x1bf)]({'path':_0x1fdb8f,'message':_0x50946e(0x195)});return;}const _0x11cc09=requireNotificationString(_0xf9f4f8[_0x50946e(0x19b)],_0x1fdb8f+'.type',_0x50946e(0x20f),_0x5b130e);_0x11cc09&&!NOTIFICATION_RECIPIENT_TYPES['has'](_0x11cc09[_0x50946e(0x281)]())&&_0x5b130e[_0x50946e(0x1bf)]({'path':_0x1fdb8f+_0x50946e(0x238),'message':_0x50946e(0x1e1)});let _0x1a260f='TO';_0xf9f4f8[_0x50946e(0x244)]!==undefined&&_0xf9f4f8[_0x50946e(0x244)]!==null&&(typeof _0xf9f4f8[_0x50946e(0x244)]!==_0x50946e(0x20d)?(_0x5b130e[_0x50946e(0x1bf)]({'path':_0x1fdb8f+_0x50946e(0x2da),'message':_0x50946e(0x256)}),_0x1a260f=''):(_0x1a260f=_0xf9f4f8[_0x50946e(0x244)]['trim']()['toUpperCase'](),!NOTIFICATION_RECIPIENT_ROLES[_0x50946e(0x267)](_0x1a260f)&&_0x5b130e[_0x50946e(0x1bf)]({'path':_0x1fdb8f+_0x50946e(0x2da),'message':'Notification\x20recipient.role\x20must\x20be\x20TO,\x20CC,\x20or\x20BCC.'})));if(_0x1a260f==='TO')_0x5b02f0=!![];const _0x5f33b1=requireNotificationString(_0xf9f4f8[_0x50946e(0x235)],_0x1fdb8f+_0x50946e(0x2cf),_0x50946e(0x28a),_0x5b130e);_0x5f33b1&&validateNotificationPlaceholders(_0x5f33b1,_0x1fdb8f+_0x50946e(0x2cf),_0x5b130e);}),_0x2e7192[_0x3e43fe(0x1da)]>0x0&&!_0x5b02f0&&_0x5b130e[_0x3e43fe(0x1bf)]({'path':_0x1c61a8,'message':_0x3e43fe(0x18a)});}function requireNotificationString(_0x152b38,_0x3206cf,_0x595704,_0x32d82f){const _0x1df0f1=a299_0x4b7b87;if(typeof _0x152b38!==_0x1df0f1(0x20d)||_0x152b38[_0x1df0f1(0x1b3)]()==='')return _0x32d82f[_0x1df0f1(0x1bf)]({'path':_0x3206cf,'message':_0x595704}),undefined;return _0x152b38[_0x1df0f1(0x1b3)]();}function validateNotificationPlaceholders(_0x3611bf,_0x596790,_0x82c8ed){const _0x2e4d48=a299_0x4b7b87;for(const _0x54a10c of _0x3611bf['matchAll'](NOTIFICATION_PLACEHOLDER_PATTERN)){const _0x3692c2=_0x54a10c[0x1]?.['trim']()??'',_0x5a47ab=_0x3692c2[_0x2e4d48(0x27f)]('.'),_0x5551e0=_0x5a47ab>=0x0?_0x3692c2[_0x2e4d48(0x269)](0x0,_0x5a47ab):_0x3692c2,_0x20b194=_0x5a47ab>=0x0?_0x3692c2[_0x2e4d48(0x269)](_0x5a47ab+0x1)[_0x2e4d48(0x1b3)]():'';(![_0x2e4d48(0x253),'context',_0x2e4d48(0x228)][_0x2e4d48(0x1cd)](_0x5551e0)||_0x20b194==='')&&_0x82c8ed[_0x2e4d48(0x1bf)]({'path':_0x596790,'message':_0x2e4d48(0x2c4)+_0x54a10c[0x0]+'.'});}_0x3611bf[_0x2e4d48(0x24a)](NOTIFICATION_PLACEHOLDER_PATTERN,'')['includes']('${')&&_0x82c8ed[_0x2e4d48(0x1bf)]({'path':_0x596790,'message':_0x2e4d48(0x2dc)});}function validateEdge(_0x183558,_0x2b4db2,_0x11a502){const _0x246c6a=a299_0x4b7b87;_0x183558[_0x246c6a(0x274)]!==undefined&&typeof _0x183558[_0x246c6a(0x274)]!==_0x246c6a(0x20d)&&_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+_0x246c6a(0x266),'message':_0x246c6a(0x218)}),_0x183558[_0x246c6a(0x2e3)]!==undefined&&typeof _0x183558[_0x246c6a(0x2e3)]!==_0x246c6a(0x1d7)&&_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+_0x246c6a(0x231),'message':_0x246c6a(0x285)}),_0x183558[_0x246c6a(0x1e7)]!==undefined&&(!Array['isArray'](_0x183558[_0x246c6a(0x1e7)])?_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+_0x246c6a(0x194),'message':_0x246c6a(0x278)}):_0x183558[_0x246c6a(0x1e7)][_0x246c6a(0x1f0)]((_0x2861c9,_0x3b90e9)=>{const _0x284011=_0x246c6a;if(!isRecord(_0x2861c9)){_0x11a502['push']({'path':_0x2b4db2+_0x284011(0x21c)+_0x3b90e9+']','message':_0x284011(0x206)});return;}for(const _0x648910 of['x','y']){const _0x3e9f29=_0x2861c9[_0x648910];(typeof _0x3e9f29!=='number'||!Number[_0x284011(0x191)](_0x3e9f29))&&_0x11a502[_0x284011(0x1bf)]({'path':_0x2b4db2+'.waypoints['+_0x3b90e9+'].'+_0x648910,'message':_0x284011(0x2d4)+_0x648910+_0x284011(0x2aa)});}})),_0x183558[_0x246c6a(0x1d0)]!==undefined&&!CONDITION_TYPES['has'](_0x183558['conditionType'])&&_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+'.conditionType','message':_0x246c6a(0x2a1)+String(_0x183558[_0x246c6a(0x1d0)])+'.'}),_0x183558[_0x246c6a(0x1d0)]===_0x246c6a(0x248)&&(typeof _0x183558[_0x246c6a(0x1e3)]!==_0x246c6a(0x20d)||_0x183558[_0x246c6a(0x1e3)][_0x246c6a(0x1b3)]()==='')&&_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+'.expression','message':_0x246c6a(0x27a)}),_0x183558['defaultFlow']===!![]&&_0x183558[_0x246c6a(0x1d0)]!=='ALWAYS'&&_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+_0x246c6a(0x231),'message':_0x246c6a(0x19d)}),_0x183558['defaultFlow']===!![]&&typeof _0x183558[_0x246c6a(0x1e3)]===_0x246c6a(0x20d)&&_0x183558[_0x246c6a(0x1e3)][_0x246c6a(0x1b3)]()!==''&&_0x11a502[_0x246c6a(0x1bf)]({'path':_0x2b4db2+_0x246c6a(0x29a),'message':_0x246c6a(0x275)});}function validateGraphShape(_0xe8fa5c,_0x95893e,_0xd658f7,_0xe9e30,_0xf248ba,_0x248fed,_0x49c3ae){const _0x45a451=a299_0x4b7b87;for(const [_0x59bf08,_0x2a9cce]of _0xe8fa5c){const _0x1c8cbf=_0xf248ba[_0x45a451(0x2b1)](_0x59bf08)??[],_0x9ed1a0=_0xe9e30['get'](_0x59bf08)??[];_0x2a9cce['type']!==_0x45a451(0x299)&&_0x1c8cbf[_0x45a451(0x1da)]===0x0&&_0x49c3ae[_0x45a451(0x1bf)]({'path':'flowJson.nodes.'+_0x59bf08,'message':_0x45a451(0x1bd)});_0x2a9cce[_0x45a451(0x19b)]!==_0x45a451(0x233)&&_0x9ed1a0[_0x45a451(0x1da)]===0x0&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x211)});_0x2a9cce[_0x45a451(0x19b)]===_0x45a451(0x299)&&_0x1c8cbf[_0x45a451(0x1da)]>0x0&&_0x49c3ae[_0x45a451(0x1bf)]({'path':'flowJson.nodes.'+_0x59bf08,'message':_0x45a451(0x1b2)});_0x2a9cce['type']===_0x45a451(0x233)&&_0x9ed1a0['length']>0x0&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x1fa)});if(_0x2a9cce[_0x45a451(0x19b)]===_0x45a451(0x23a)){_0x9ed1a0['length']<0x2&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x2b9)});const _0x1aebed=_0x9ed1a0[_0x45a451(0x1d5)](_0x1ee95f=>_0x1ee95f['defaultFlow']===!![]);_0x1aebed[_0x45a451(0x1da)]!==0x1&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x1b0)});if(_0x1aebed['length']===0x1){const _0x570c9a=_0x1aebed[0x0],_0x4ca48e=_0x248fed[_0x45a451(0x2b1)](_0x570c9a)??'flowJson.edges';_0x570c9a[_0x45a451(0x1d0)]!=='ALWAYS'&&_0x49c3ae['push']({'path':_0x4ca48e+'.conditionType','message':_0x45a451(0x270)});_0x570c9a['expression']!==undefined&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x4ca48e+'.expression','message':_0x45a451(0x257)});for(const _0x5e56b1 of _0x9ed1a0){if(_0x5e56b1===_0x570c9a)continue;const _0x53e7a7=_0x248fed[_0x45a451(0x2b1)](_0x5e56b1)??_0x45a451(0x1de);if(_0x5e56b1[_0x45a451(0x1d0)]!==_0x45a451(0x248))_0x49c3ae['push']({'path':_0x53e7a7+_0x45a451(0x2a4),'message':_0x45a451(0x193)});else(typeof _0x5e56b1[_0x45a451(0x1e3)]!==_0x45a451(0x20d)||_0x5e56b1[_0x45a451(0x1e3)][_0x45a451(0x1b3)]()==='')&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x53e7a7+_0x45a451(0x29a),'message':'CONDITION\x20non-default\x20edge\x20requires\x20a\x20non-empty\x20expression.'});}}}if(_0x2a9cce[_0x45a451(0x19b)]===_0x45a451(0x2c1)&&(_0x2a9cce[_0x45a451(0x2ae)]??_0x45a451(0x2c1))===_0x45a451(0x20c)){if(_0x9ed1a0[_0x45a451(0x1da)]!==0x1)_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x1a6)});else{const _0x3479b1=_0x9ed1a0[0x0];((_0x3479b1[_0x45a451(0x1d0)]??_0x45a451(0x217))!=='ALWAYS'||_0x3479b1[_0x45a451(0x2e3)]===!![]||typeof _0x3479b1['expression']===_0x45a451(0x20d)&&_0x3479b1['expression']['trim']()!=='')&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x248fed[_0x45a451(0x2b1)](_0x3479b1)??_0x45a451(0x1de),'message':_0x45a451(0x1aa)});}}else{if(_0x2a9cce[_0x45a451(0x19b)]===_0x45a451(0x2c1)){const _0x30c03d=_0x9ed1a0[_0x45a451(0x199)](_0x22c33b=>_0x22c33b['conditionType']??_0x45a451(0x217)),_0x395708=_0x30c03d['filter'](_0x36648a=>_0x36648a!==_0x45a451(0x2e1)&&_0x36648a!=='REJECTED');_0x395708[_0x45a451(0x1da)]>0x0&&_0x49c3ae['push']({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x240)}),_0x30c03d[_0x45a451(0x1d5)](_0x1878cf=>_0x1878cf==='APPROVED')[_0x45a451(0x1da)]!==0x1&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x2a6)}),_0x30c03d[_0x45a451(0x1d5)](_0x2a9964=>_0x2a9964===_0x45a451(0x2c6))[_0x45a451(0x1da)]!==0x1&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':'APPROVAL\x20node\x20requires\x20exactly\x20one\x20REJECTED\x20outgoing\x20edge.'}),_0x9ed1a0[_0x45a451(0x292)](_0xbd731d=>_0xbd731d[_0x45a451(0x2e3)]===!![])&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x59bf08,'message':_0x45a451(0x2af)});}}}const _0x429763=new Set(),_0x32b299=_0xe02ed9=>{const _0x5954d7=_0x45a451;if(_0x429763[_0x5954d7(0x267)](_0xe02ed9))return;_0x429763['add'](_0xe02ed9);for(const _0x588ee1 of _0xe9e30['get'](_0xe02ed9)??[]){const _0xdf6555=resolveEdgeEndpoint(_0x588ee1['target'],_0x588ee1[_0x5954d7(0x24e)]);if(_0xdf6555&&_0xe8fa5c[_0x5954d7(0x267)](_0xdf6555))_0x32b299(_0xdf6555);}};_0x32b299(_0x95893e);for(const _0x36ad72 of _0xe8fa5c[_0x45a451(0x183)]()){!_0x429763[_0x45a451(0x267)](_0x36ad72)&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x36ad72,'message':_0x45a451(0x20e)});}const _0x212822=_0xd658f7[_0x45a451(0x292)](_0x4c53cd=>_0x429763['has'](_0x4c53cd));if(!_0x212822){_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x1de),'message':_0x45a451(0x1e8)});return;}const _0x1fb281=new Set(),_0x4d44b6=_0x13a998=>{const _0x509a62=_0x45a451;if(_0x1fb281[_0x509a62(0x267)](_0x13a998))return;_0x1fb281[_0x509a62(0x224)](_0x13a998);for(const _0x5b450f of _0xf248ba[_0x509a62(0x2b1)](_0x13a998)??[]){const _0x5f5975=resolveEdgeEndpoint(_0x5b450f['source'],_0x5b450f[_0x509a62(0x188)]);if(_0x5f5975&&_0xe8fa5c[_0x509a62(0x267)](_0x5f5975))_0x4d44b6(_0x5f5975);}};for(const _0xcd63b8 of _0xd658f7){if(_0xe8fa5c['has'](_0xcd63b8))_0x4d44b6(_0xcd63b8);}for(const _0x3089e0 of _0x429763){!_0x1fb281[_0x45a451(0x267)](_0x3089e0)&&_0x49c3ae[_0x45a451(0x1bf)]({'path':_0x45a451(0x2a0)+_0x3089e0,'message':'Node\x20cannot\x20reach\x20any\x20END.'});}}function validateApprovalResults(_0x14de64,_0x393561,_0x44a88f,_0x1343c8){const _0x42daf0=a299_0x4b7b87;if(_0x393561===0x0)return;const _0x4a9f9e=new Set(_0x44a88f[_0x42daf0(0x199)](_0xfa8836=>_0x14de64['get'](_0xfa8836)?.[_0x42daf0(0x2ad)])[_0x42daf0(0x1d5)](_0x5f8316=>typeof _0x5f8316==='string'));for(const _0x2ef4fa of[_0x42daf0(0x2e1),'REJECTED']){!_0x4a9f9e[_0x42daf0(0x267)](_0x2ef4fa)&&_0x1343c8['push']({'path':_0x42daf0(0x263),'message':_0x42daf0(0x236)+_0x2ef4fa+'.'});}}function validateScriptResultReferences(_0x594bc3,_0x176712,_0x12bdcc,_0x1b933b,_0x5ebcb6,_0x26118e,_0x53d13c){const _0x5c42e4=a299_0x4b7b87;if(_0x26118e[_0x5c42e4(0x1fc)]===0x0)return;const _0x3fa7d4=new Set(),_0x4cbfac=_0x4ee5df=>{const _0x3d174e=_0x5c42e4;if(!_0x3fa7d4[_0x3d174e(0x267)](_0x4ee5df)&&_0x594bc3[_0x3d174e(0x267)](_0x4ee5df)){_0x3fa7d4[_0x3d174e(0x224)](_0x4ee5df);for(const _0xe64bbb of _0x12bdcc[_0x3d174e(0x2b1)](_0x4ee5df)??[]){const _0x233cd8=resolveEdgeEndpoint(_0xe64bbb[_0x3d174e(0x1c6)],_0xe64bbb[_0x3d174e(0x24e)]);if(_0x233cd8)_0x4cbfac(_0x233cd8);}}};_0x4cbfac(_0x176712);const _0x29f0e9=new Map();for(const _0x45573d of _0x3fa7d4){_0x29f0e9[_0x5c42e4(0x184)](_0x45573d,_0x45573d===_0x176712?new Set([_0x176712]):new Set(_0x3fa7d4));}let _0xe1a3de=!![];while(_0xe1a3de){_0xe1a3de=![];for(const _0x560e66 of _0x3fa7d4){if(_0x560e66===_0x176712)continue;const _0x1981a6=(_0x1b933b[_0x5c42e4(0x2b1)](_0x560e66)??[])[_0x5c42e4(0x199)](_0x5a1654=>resolveEdgeEndpoint(_0x5a1654[_0x5c42e4(0x295)],_0x5a1654[_0x5c42e4(0x188)]))[_0x5c42e4(0x1d5)](_0x517cee=>Boolean(_0x517cee&&_0x3fa7d4[_0x5c42e4(0x267)](_0x517cee)));if(_0x1981a6[_0x5c42e4(0x1da)]===0x0)continue;const _0x343a86=new Set(_0x29f0e9[_0x5c42e4(0x2b1)](_0x1981a6[0x0])??[]);for(const _0x31758a of _0x1981a6[_0x5c42e4(0x269)](0x1)){const _0x3d6769=_0x29f0e9[_0x5c42e4(0x2b1)](_0x31758a)??new Set();for(const _0x191f02 of _0x343a86){if(!_0x3d6769[_0x5c42e4(0x267)](_0x191f02))_0x343a86[_0x5c42e4(0x23f)](_0x191f02);}}_0x343a86[_0x5c42e4(0x224)](_0x560e66);const _0x5e9260=_0x29f0e9[_0x5c42e4(0x2b1)](_0x560e66);!setsEqual(_0x5e9260,_0x343a86)&&(_0x29f0e9[_0x5c42e4(0x184)](_0x560e66,_0x343a86),_0xe1a3de=!![]);}}for(const [_0x1d799a,_0x29cdbc]of _0x12bdcc){const _0x3c4d5c=_0x29f0e9['get'](_0x1d799a);if(!_0x3c4d5c)continue;for(const _0x1807f2 of _0x29cdbc){if(_0x1807f2['conditionType']!==_0x5c42e4(0x248)||typeof _0x1807f2[_0x5c42e4(0x1e3)]!==_0x5c42e4(0x20d))continue;for(const [_0x9b590f,_0x42d38c]of _0x26118e){expressionReferencesVariable(_0x1807f2[_0x5c42e4(0x1e3)],_0x9b590f)&&!_0x3c4d5c[_0x5c42e4(0x267)](_0x42d38c)&&_0x53d13c[_0x5c42e4(0x1bf)]({'path':(_0x5ebcb6[_0x5c42e4(0x2b1)](_0x1807f2)??_0x5c42e4(0x1de))+_0x5c42e4(0x29a),'message':_0x5c42e4(0x1c3)+_0x9b590f+_0x5c42e4(0x1ef)+_0x42d38c+_0x5c42e4(0x1c5)+_0x1d799a+'.'});}}}}function expressionReferencesVariable(_0x1db14a,_0x3afc3f){const _0x507b45=a299_0x4b7b87;let _0x1d4822=0x0;while(_0x1d4822<_0x1db14a[_0x507b45(0x1da)]){const _0x2ba986=_0x1db14a[_0x1d4822];if(_0x2ba986==='\x27'||_0x2ba986==='\x22'){_0x1d4822=skipQuotedExpressionSegment(_0x1db14a,_0x1d4822,_0x2ba986);continue;}if(!/[A-Za-z_]/[_0x507b45(0x1ce)](_0x2ba986)){_0x1d4822+=0x1;continue;}const _0x4cf7c0=_0x1d4822;_0x1d4822+=0x1;while(_0x1d4822<_0x1db14a[_0x507b45(0x1da)]&&/[A-Za-z0-9_]/[_0x507b45(0x1ce)](_0x1db14a[_0x1d4822])){_0x1d4822+=0x1;}if(_0x1db14a[_0x507b45(0x269)](_0x4cf7c0,_0x1d4822)!==_0x3afc3f)continue;let _0xfa2121=_0x4cf7c0-0x1;while(_0xfa2121>=0x0&&/\s/['test'](_0x1db14a[_0xfa2121])){_0xfa2121-=0x1;}if(_0x1db14a[_0xfa2121]!=='.')return!![];}return![];}function skipQuotedExpressionSegment(_0x17dba7,_0x3500eb,_0x3944b8){const _0xf4c44a=a299_0x4b7b87;let _0xb4a7ef=_0x3500eb+0x1;while(_0xb4a7ef<_0x17dba7[_0xf4c44a(0x1da)]){if(_0x17dba7[_0xb4a7ef]==='\x5c'){_0xb4a7ef+=0x2;continue;}if(_0x17dba7[_0xb4a7ef]===_0x3944b8)return _0xb4a7ef+0x1;_0xb4a7ef+=0x1;}return _0xb4a7ef;}function resolveEffectiveResultVariable(_0x536066,_0x311cfa){const _0x532407=a299_0x4b7b87;if(_0x536066===undefined||_0x536066===null||_0x311cfa&&_0x536066==='')return DEFAULT_SCRIPT_RESULT_VARIABLE;if(typeof _0x536066!=='string'||!VARIABLE_PATTERN['test'](_0x536066)||RESERVED_RESULT_VARIABLES[_0x532407(0x267)](_0x536066)||_0x536066[_0x532407(0x1b9)]('approval_sys_'))return undefined;return _0x536066;}function registerResultVariableOwner(_0xa5c2a0,_0x23fac3,_0x32a67b,_0x25af18){const _0x311f0b=a299_0x4b7b87;if(_0xa5c2a0[_0x311f0b(0x267)](_0x23fac3)){_0x25af18['push']({'path':_0x311f0b(0x263),'message':_0x311f0b(0x1a0)+_0x23fac3+'.'});return;}_0xa5c2a0['set'](_0x23fac3,_0x32a67b);}function setsEqual(_0x1464c8,_0x1be0c6){const _0x696d4a=a299_0x4b7b87;return _0x1464c8[_0x696d4a(0x1fc)]===_0x1be0c6[_0x696d4a(0x1fc)]&&[..._0x1464c8]['every'](_0x171ea3=>_0x1be0c6[_0x696d4a(0x267)](_0x171ea3));}function isValidUserId(_0x4a6c1f){const _0x42e5ea=a299_0x4b7b87;if(typeof _0x4a6c1f==='string')return _0x4a6c1f[_0x42e5ea(0x1b3)]()[_0x42e5ea(0x1da)]>0x0;return Number[_0x42e5ea(0x27d)](_0x4a6c1f)&&Number(_0x4a6c1f)>0x0;}function resolveEdgeEndpoint(_0x35ee5d,_0x3b4a57){const _0x1655a4=a299_0x4b7b87;if(typeof _0x35ee5d==='string'&&_0x35ee5d[_0x1655a4(0x1b3)]())return _0x35ee5d[_0x1655a4(0x1b3)]();if(typeof _0x3b4a57===_0x1655a4(0x20d)&&_0x3b4a57[_0x1655a4(0x1b3)]())return _0x3b4a57[_0x1655a4(0x1b3)]();return undefined;}function removeEmptyMetadata(_0x2f9f5d,_0x2e4e24,_0x56f146,_0x3e6b61){const _0x116f3d=a299_0x4b7b87;if(Array[_0x116f3d(0x1cb)](_0x2f9f5d)){_0x2f9f5d['forEach']((_0xf80ec7,_0x621d45)=>removeEmptyMetadata(_0xf80ec7,_0x2e4e24+'['+_0x621d45+']',_0x56f146,_0x3e6b61));return;}if(!isRecord(_0x2f9f5d))return;for(const [_0x44bea8,_0x5f3585]of Object['entries'](_0x2f9f5d)){const _0x5cee76=_0x2e4e24+'.'+_0x44bea8;if(_0x44bea8===_0x116f3d(0x239)&&isEmptyJsonValue(_0x5f3585)){delete _0x2f9f5d[_0x44bea8],_0x3e6b61[_0x116f3d(0x1bf)](_0x5cee76),_0x56f146[_0x116f3d(0x1bf)]({'code':'empty_metadata_removed','path':_0x5cee76,'message':_0x5cee76+_0x116f3d(0x189)});continue;}removeEmptyMetadata(_0x5f3585,_0x5cee76,_0x56f146,_0x3e6b61);}}function a299_0x830f(){const _0x51ddc9=['indexOf','Edge\x20target\x20node\x20not\x20found:\x20','toUpperCase','message','Unsupported\x20schemaVersion:\x20','scriptResult','defaultFlow\x20must\x20be\x20a\x20boolean.','failurePolicy\x20must\x20be\x20a\x20string.','SCRIPT\x20node\x20requires\x20scriptName.','4167856TgVvpg','\x20users.','Notification\x20recipient.value\x20is\x20required.','Edge\x20source\x20node\x20not\x20found:\x20','unit','formSchema','value\x20must\x20be\x20an\x20array.','actions','cc.recipientUserIds\x20supports\x20at\x20most\x20','flowJson.nodes[','some','Duplicate\x20edge\x20route:\x20','resultVariable\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','source','edge\x20must\x20be\x20an\x20object.','bindDatasetCode','.timeout.action','START','.expression','\x20timeout\x20must\x20interrupt\x20the\x20approval\x20task.','ALL','.facts','Unsupported\x20flowType:\x20','approvalMode','flowJson.nodes.','Unsupported\x20condition\x20type:\x20','.assignee.userIds','async\x20execution\x20is\x20only\x20supported\x20by\x20SCRIPT\x20node.','.conditionType','startPath','APPROVAL\x20node\x20requires\x20exactly\x20one\x20APPROVED\x20outgoing\x20edge.','PLATFORM_FORM','EXECUTE_BFF\x20timeout\x20must\x20not\x20interrupt\x20the\x20approval\x20task.','pageIds\x20must\x20be\x20an\x20array\x20of\x20positive\x20safe\x20integers.','\x20must\x20be\x20a\x20finite\x20number.','410418wxUSFU','AUTO_APPROVE','result','taskMode','APPROVAL\x20task\x20decision\x20edges\x20must\x20not\x20be\x20default\x20flows.','__rabetbase_local_validation__','get','.timeout.duration','.async','.timeout','node\x20id\x20must\x20match\x20[A-Za-z_][A-Za-z0-9_]*.','strategy','.cc.visible','#/$defs/flowNode','CONDITION\x20node\x20requires\x20at\x20least\x20two\x20outgoing\x20edges.','summary','Default\x20cc\x20is\x20only\x20supported\x20by\x20APPROVAL\x20or\x20END\x20node.','Duplicate\x20cc\x20recipient\x20userId:\x20','datasetCode','pageId','approval_sys_initiatorUserId','FlowConfig\x20must\x20be\x20a\x20JSON\x20object.','APPROVAL','FAIL','.cc.recipientUserIds[','Unsupported\x20notification\x20placeholder:\x20','.detailMarkdown','REJECTED','CUSTOM_PAGE','failurePolicy','Notification\x20template.actions\x20must\x20be\x20an\x20array.','pageIds\x20exceeds\x20the\x202048-character\x20binding\x20limit.','USER','approval.simple-flow.v1','.async.enabled','Custom\x20form\x20configuration\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20a\x20business\x20custom\x20page\x20instead.','.value','.assignee.roleId','prototype','BCC','.resultVariable','waypoint.','APPROVAL\x20node\x20requires\x20assignee.','recipientUserIds','.version','number','.transferCandidates.strategy','.role','70ITBmGE','Notification\x20text\x20contains\x20a\x20malformed\x20placeholder.','https://json-schema.org/draft/2020-12/schema','nodes\x20must\x20be\x20an\x20array.','.url','].path','APPROVED','legacy_field_removed','defaultFlow','^[A-Za-z_][A-Za-z0-9_]*$','timeout.enabled\x20must\x20be\x20a\x20boolean.','.taskMode','flowJson.pageMode','keys','set','approval_sys_','templateName','pageIds','sourceNodeId','\x20was\x20empty\x20and\x20was\x20removed.','Explicit\x20notification\x20recipients\x20require\x20at\x20least\x20one\x20TO.','startPageId\x20is\x20no\x20longer\x20supported;\x20use\x20startPath\x20instead.','overwrite','approval_sys_operationType','Duplicate\x20BPMN\x20element\x20id:\x20','assignee.strategy\x20must\x20be\x20FIXED\x20or\x20ROLE.','].taskMode','isFinite','flowJson','CONDITION\x20non-default\x20edge\x20must\x20use\x20conditionType\x20EXPRESSION.','.waypoints','Notification\x20recipient\x20must\x20be\x20an\x20object.','.path','object','.assignee','map','DAYS','type','\x20actions.','A\x20default\x20flow\x20must\x20use\x20conditionType\x20ALWAYS.','enabled','pageMode\x20applies\x20only\x20to\x20INDEPENDENT_FLOW.','Duplicate\x20resultVariable:\x20','flowCode','url','ROLE','PLATFORM_FORM\x20is\x20not\x20supported\x20by\x20this\x20rabetbase\x20version;\x20use\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','#/$defs/userId','HANDLE\x20task\x20requires\x20exactly\x20one\x20outgoing\x20edge.','flowName','flowDesc','formPermission','HANDLE\x20task\x20outgoing\x20edge\x20must\x20use\x20ALWAYS\x20without\x20defaultFlow\x20or\x20expression.','60650exgiJg','.failurePolicy','SECONDS','Unsupported\x20pageMode:\x20','EMAIL','CONDITION\x20node\x20requires\x20exactly\x20one\x20default\x20outgoing\x20edge.','.configCode','START\x20node\x20must\x20not\x20have\x20incoming\x20edges.','trim','edges\x20must\x20be\x20an\x20array.','roleId','.cc.recipientUserIds','appCode','array','startsWith','#/$defs/timeAmount','.assignee.userIds[','resultVariable','Node\x20has\x20no\x20incoming\x20edge.','FIXED\x20assignee\x20requires\x20userIds.','push','Notification\x20template\x20supports\x20at\x20most\x20','pageId\x20must\x20be\x20a\x20positive\x20safe\x20integer.','retryCount','Expression\x20references\x20SCRIPT\x20resultVariable\x20','assignee','\x20is\x20not\x20on\x20every\x20upstream\x20path\x20to\x20','target','flowJson.edges[','ANY','stringify','Notification\x20action\x20must\x20be\x20an\x20object.','isArray','CONTINUE','includes','test','.transferCandidates','conditionType','recipients','async\x20must\x20be\x20an\x20object.','edges','flowJson.schemaVersion','filter','3239352MVCFrI','boolean','HOURS','HANDLE\x20task\x20timeout\x20only\x20supports\x20EXECUTE_BFF.','length','INDEPENDENT_FLOW','interrupting','#/$defs/position','flowJson.edges','Notification\x20recipients\x20must\x20be\x20an\x20array.','catch','Notification\x20recipient.type\x20must\x20be\x20USER,\x20ROLE,\x20or\x20EMAIL.','.timeout.scriptName','expression','timeout\x20must\x20be\x20an\x20object.','Accepted\x20as\x20legacy\x20input\x20and\x20removed\x20during\x20normalization;\x20other\x20versions\x20are\x20unsupported.','schemaVersion','waypoints','No\x20END\x20node\x20is\x20reachable\x20from\x20START.','findIndex','FIXED','transferCandidates','retryInterval','datasetCode\x20must\x20be\x20a\x20string.','SCRIPT',',\x20but\x20node\x20','forEach','.id','Every\x20node\x20requires\x20position.x\x20and\x20position.y.','\x20is\x20required.','MAX_SAFE_INTEGER','duration\x20value\x20must\x20be\x20a\x20positive\x20integer.','action','flowJson.','async.enabled\x20must\x20be\x20a\x20boolean.','NOTIFICATION\x20node\x20requires\x20config.','END\x20node\x20must\x20not\x20have\x20outgoing\x20edges.','.cc','size','\x20->\x20','cc\x20must\x20be\x20an\x20object.','visible','version','Unsupported\x20notification\x20version:\x20','flowDesc\x20must\x20be\x20a\x20string.','nodes','.transferCandidates.userIds','Reserved\x20resultVariable:\x20','waypoint\x20must\x20contain\x20numeric\x20x\x20and\x20y\x20coordinates.','NOTIFICATION','node\x20path\x20must\x20be\x20a\x20non-empty\x20string.','40257130dMUSno','approval_sys_datasetCode','scriptName','HANDLE','string','Node\x20is\x20not\x20reachable\x20from\x20START.','Notification\x20recipient.type\x20is\x20required.','startPath\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Node\x20has\x20no\x20outgoing\x20edge.','path','EXECUTE_BFF\x20timeout\x20requires\x20scriptName.','\x20must\x20be\x20a\x20finite\x20number\x20greater\x20than\x20or\x20equal\x20to\x200.','integer','\x20facts.','ALWAYS','edge\x20name\x20must\x20be\x20a\x20string.','.timeout.enabled','Duplicate\x20value:\x20','value\x20must\x20be\x20a\x20non-empty\x20string.','.waypoints[','call','.source','.template','Every\x20node\x20requires\x20a\x20non-empty\x20name.','flowKey','Unsupported\x20task\x20mode:\x20','.text','add','pageMode','startPageId','.position.','variables','label','node\x20path\x20applies\x20only\x20to\x20INDEPENDENT_FLOW\x20with\x20CUSTOM_PAGE.','Flow\x20must\x20contain\x20at\x20least\x20one\x20END\x20node.','ROLE\x20assignee\x20requires\x20a\x20positive\x20integer\x20roleId.','SINGLE','readSources','hasOwnProperty','flowJson.startPageId','.defaultFlow','.recipients','END','timeout','value','Approval\x20flow\x20requires\x20an\x20END\x20node\x20with\x20result\x20','position.','.type','metadata','CONDITION','^[1-9][0-9]*$','MINUTES','172LmBtby','mode','delete','APPROVAL\x20node\x20outgoing\x20edges\x20must\x20use\x20APPROVED\x20or\x20REJECTED.','template','.\x20This\x20CLI\x20supports\x20only\x20','title','role','startPath\x20must\x20be\x20a\x20non-empty\x20string.','FORM_FLOW\x20is\x20an\x20approval\x20flow\x20and\x20cannot\x20contain\x20HANDLE\x20tasks;\x20use\x20INDEPENDENT_FLOW\x20for\x20workflows.','.position','EXPRESSION','EXECUTE_BFF','replace','2SWmdgU','AUTO_REJECT','\x20is\x20not\x20part\x20of\x20the\x20portable\x20FlowConfig\x20and\x20was\x20removed.','targetNodeId','duration\x20unit\x20must\x20be\x20SECONDS,\x20MINUTES,\x20HOURS,\x20or\x20DAYS.','join','isInteger','flowType','event','position','edge\x20target\x20is\x20required.','Notification\x20recipient.role\x20must\x20be\x20a\x20string.','CONDITION\x20default\x20edge\x20must\x20not\x20define\x20expression.','https://lovrabet.com/schema/rabetbase-flow-config.json','fixed\x20assignee\x20userId\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20positive\x20integer.','.sequential','.transferCandidates.userIds[','.timeout.interrupting','flowJson.startPath','.async.retryCount','userIds','Unsupported\x20node\x20type:\x20','duration\x20requires\x20value\x20and\x20unit.','1639781kYCvTU','flowJson.nodes','SCRIPT\x20async\x20retryCount\x20must\x20be\x20between\x201\x20and\x20','approval_sys_processInstanceId','.name','has','.cc.readSources','slice','configCode','1885977DjdgUU','detailMarkdown','.config','.assignee.strategy','transferCandidates\x20currently\x20supports\x20FIXED\x20only.','CONDITION\x20default\x20edge\x20must\x20use\x20conditionType\x20ALWAYS.','sequential','text','node\x20must\x20be\x20an\x20object.','name','A\x20default\x20flow\x20must\x20not\x20have\x20an\x20expression.','INDEPENDENT_FLOW\x20cannot\x20bind\x20datasetCode.','SINGLE\x20approval\x20supports\x20only\x20one\x20fixed\x20user.','waypoints\x20must\x20be\x20an\x20array.','.tmp','EXPRESSION\x20edge\x20requires\x20expression.','async','.pageId','isSafeInteger','FORM_FLOW'];a299_0x830f=function(){return _0x51ddc9;};return a299_0x830f();}function isEmptyJsonValue(_0x135ea9){const _0x4ee211=a299_0x4b7b87;if(_0x135ea9===null||_0x135ea9===undefined)return!![];if(typeof _0x135ea9===_0x4ee211(0x20d))return _0x135ea9['trim']()==='';if(Array[_0x4ee211(0x1cb)](_0x135ea9))return _0x135ea9[_0x4ee211(0x1da)]===0x0;return isRecord(_0x135ea9)&&Object[_0x4ee211(0x183)](_0x135ea9)[_0x4ee211(0x1da)]===0x0;}function isRecord(_0x21d706){const _0x14b1fc=a299_0x4b7b87;return typeof _0x21d706===_0x14b1fc(0x197)&&_0x21d706!==null&&!Array[_0x14b1fc(0x1cb)](_0x21d706);}function cloneJsonValue(_0x24084c){return JSON['parse'](JSON['stringify'](_0x24084c));}export async function readFlowConfigFile(_0x4720b3){const _0xa25837=await readFile(resolve(_0x4720b3),'utf8');return JSON['parse'](_0xa25837);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a300_0x143698=a300_0x2762;(function(_0x343031,_0x5a844c){const _0xb02a02=a300_0x2762,_0x6166da=_0x343031();while(!![]){try{const _0x2e7edb=parseInt(_0xb02a02(0x1fa))/0x1+parseInt(_0xb02a02(0x20d))/0x2*(parseInt(_0xb02a02(0x20a))/0x3)+parseInt(_0xb02a02(0x20e))/0x4+-parseInt(_0xb02a02(0x208))/0x5*(parseInt(_0xb02a02(0x224))/0x6)+parseInt(_0xb02a02(0x1ef))/0x7+parseInt(_0xb02a02(0x22d))/0x8+-parseInt(_0xb02a02(0x21e))/0x9*(parseInt(_0xb02a02(0x1f4))/0xa);if(_0x2e7edb===_0x5a844c)break;else _0x6166da['push'](_0x6166da['shift']());}catch(_0x15611c){_0x6166da['push'](_0x6166da['shift']());}}}(a300_0x4c6f,0x97530));function a300_0x2762(_0x237d6c,_0x3a3e31){_0x237d6c=_0x237d6c-0x1ee;const _0x4c6f83=a300_0x4c6f();let _0x2762ba=_0x4c6f83[_0x237d6c];return _0x2762ba;}import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a300_0x143698(0x22c);export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;function a300_0x4c6f(){const _0xdab4e5=['EEXIST','allow','instant_api_policy_file_exists','policyFilePath','5xXVlHb','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','4317POakuQ','overwritten','instant_api_policy_file_missing','626EWygXr','2441488ALZKXN','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','appCode','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','decode','instant_api_policy_version_invalid','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','isArray','catch','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','.tmp','instant_api_policy_file_unreadable','length','instant_api_policy_rules_invalid','pid','72ITJvIK','defaults','created','string','byteLength','ENOENT','1176228tGQvOF','code','size','instant_api_policy_file_unwritable','version','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','.rabetbase/instant-api-policy','7382640ZCnEOa','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','1444702bStxKp','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_file_too_large','utf8','instant_api_policy_app_code_invalid','2210660lXbfHP','unchanged','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','includes','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','rules','394395LOELPd','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','isFile','Policy\x20defaults.instantApi\x20is\x20required.','force','object','instant_api_policy_app_code_mismatch','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'];a300_0x4c6f=function(){return _0xdab4e5;};return a300_0x4c6f();}export function instantApiPolicyError(_0x540004,_0x1dfaea,_0x425a8b){return new CliError(_0x540004,0x1,_0x1dfaea,_0x425a8b);}export function loadInstantApiPolicyLocalConfig(_0x4f2661,_0x2f39ff){assertSafeAppCode(_0x4f2661);const _0x533c57=resolve(_0x2f39ff??findProjectRootDirectory()),_0x37f0f9=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x4f2661+'/'+INSTANT_API_POLICY_FILE_NAME,_0x166e60=resolve(_0x533c57,INSTANT_API_POLICY_RELATIVE_ROOT,_0x4f2661),_0x1a6b93=resolve(_0x166e60,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x533c57,'appCode':_0x4f2661,'policyRoot':_0x166e60,'policyFilePath':_0x1a6b93,'policyRelativePath':_0x37f0f9};}export function createDefaultInstantApiPolicyConfig(_0x3e38ec,_0x545b36=a300_0x143698(0x205)){return assertSafeAppCode(_0x3e38ec),{'version':'2','appCode':_0x3e38ec,'defaults':{'instantApi':_0x545b36},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x1c8649){const _0x462bab=a300_0x143698;let _0x41934f;try{_0x41934f=await stat(_0x1c8649[_0x462bab(0x207)]);}catch(_0x101301){throw instantApiPolicyError(_0x462bab(0x20c),_0x462bab(0x1f6)+_0x1c8649['policyFilePath'],_0x462bab(0x1f0));}if(!_0x41934f[_0x462bab(0x1fe)]())throw instantApiPolicyError(_0x462bab(0x22a),'Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1c8649[_0x462bab(0x207)]);if(_0x41934f[_0x462bab(0x226)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x462bab(0x1f1),'Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x5e9fc2;try{_0x5e9fc2=await readFile(_0x1c8649[_0x462bab(0x207)]);}catch{throw instantApiPolicyError('instant_api_policy_file_unreadable',_0x462bab(0x214)+_0x1c8649[_0x462bab(0x207)]);}if(_0x5e9fc2[_0x462bab(0x222)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x462bab(0x1f1),_0x462bab(0x1ee));let _0x5e7423;try{_0x5e7423=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x462bab(0x212)](_0x5e9fc2);}catch{throw instantApiPolicyError('instant_api_policy_file_invalid',_0x462bab(0x1fb)+_0x1c8649[_0x462bab(0x207)]);}let _0x4342d4;try{_0x4342d4=JSON['parse'](_0x5e7423);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0x462bab(0x203)+_0x1c8649[_0x462bab(0x207)]);}return assertLocalPolicyContract(_0x4342d4,_0x1c8649[_0x462bab(0x210)]);}export async function writeInstantApiPolicyConfigFile(_0x3abb38,_0x57ffe1,_0x129665={}){const _0x567c60=a300_0x143698,_0x50c08b=assertLocalPolicyContract(_0x57ffe1,_0x3abb38[_0x567c60(0x210)]),_0x51e539=JSON['stringify'](_0x50c08b,null,0x2)+'\x0a';if(Buffer[_0x567c60(0x222)](_0x51e539,'utf8')>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x567c60(0x1f1),_0x567c60(0x1ee));await mkdir(_0x3abb38['policyRoot'],{'recursive':!![]});let _0x2e9cd2;try{_0x2e9cd2=await readFile(_0x3abb38['policyFilePath'],_0x567c60(0x1f2));}catch(_0x27bcea){if(!isMissingFile(_0x27bcea))throw instantApiPolicyError(_0x567c60(0x21a),_0x567c60(0x209)+_0x3abb38['policyFilePath']);}if(_0x2e9cd2===_0x51e539)return{'action':_0x567c60(0x1f5),'filePath':_0x3abb38[_0x567c60(0x207)]};if(_0x2e9cd2!==undefined&&!_0x129665[_0x567c60(0x200)])throw instantApiPolicyError(_0x567c60(0x206),_0x567c60(0x211)+_0x3abb38[_0x567c60(0x207)],_0x567c60(0x218));if(_0x2e9cd2===undefined)try{return await writeFile(_0x3abb38[_0x567c60(0x207)],_0x51e539,{'encoding':_0x567c60(0x1f2),'flag':'wx'}),{'action':_0x567c60(0x220),'filePath':_0x3abb38[_0x567c60(0x207)]};}catch(_0x5890e5){if(!isAlreadyExists(_0x5890e5))throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x567c60(0x20f)+_0x3abb38[_0x567c60(0x207)]);if(!_0x129665[_0x567c60(0x200)])throw instantApiPolicyError(_0x567c60(0x206),_0x567c60(0x1fc)+_0x3abb38['policyFilePath'],'Review\x20the\x20file\x20before\x20retrying.');}const _0x12a17e=resolve(dirname(_0x3abb38[_0x567c60(0x207)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x567c60(0x21d)]+'.'+randomUUID()+_0x567c60(0x219));try{await writeFile(_0x12a17e,_0x51e539,{'encoding':_0x567c60(0x1f2),'flag':'wx'}),await rename(_0x12a17e,_0x3abb38['policyFilePath']);}catch{await unlink(_0x12a17e)[_0x567c60(0x217)](()=>undefined);throw instantApiPolicyError(_0x567c60(0x227),_0x567c60(0x215)+_0x3abb38[_0x567c60(0x207)]);}return{'action':_0x567c60(0x20b),'filePath':_0x3abb38[_0x567c60(0x207)]};}function assertSafeAppCode(_0x4d71ff){const _0x429b42=a300_0x143698,_0x2e71c4=_0x4d71ff['trim']();if(!_0x2e71c4||_0x2e71c4!==_0x4d71ff||_0x2e71c4[_0x429b42(0x21b)]>0x64||_0x2e71c4==='.'||_0x2e71c4==='..'||_0x2e71c4[_0x429b42(0x1f7)]('/')||_0x2e71c4[_0x429b42(0x1f7)]('\x5c')||_0x2e71c4[_0x429b42(0x1f7)]('\x00'))throw instantApiPolicyError(_0x429b42(0x1f3),_0x429b42(0x1fd));}function assertLocalPolicyContract(_0x1716d1,_0x29e6df){const _0x3153a6=a300_0x143698;if(!isObject(_0x1716d1))throw instantApiPolicyError('instant_api_policy_json_invalid',_0x3153a6(0x22b));if(_0x1716d1[_0x3153a6(0x228)]!=='1'&&_0x1716d1[_0x3153a6(0x228)]!=='2')throw instantApiPolicyError(_0x3153a6(0x213),'Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x1716d1[_0x3153a6(0x210)]!==_0x29e6df)throw instantApiPolicyError(_0x3153a6(0x202),_0x3153a6(0x229)+_0x29e6df+'.');if(!isObject(_0x1716d1[_0x3153a6(0x21f)])||typeof _0x1716d1[_0x3153a6(0x21f)]['instantApi']!==_0x3153a6(0x221))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x3153a6(0x1ff));if(_0x1716d1[_0x3153a6(0x1f9)]!==undefined&&_0x1716d1[_0x3153a6(0x1f9)]!==null&&!Array[_0x3153a6(0x216)](_0x1716d1[_0x3153a6(0x1f9)]))throw instantApiPolicyError(_0x3153a6(0x21c),_0x3153a6(0x1f8));return _0x1716d1;}function isObject(_0x3c429e){const _0x62d4be=a300_0x143698;return _0x3c429e!==null&&typeof _0x3c429e===_0x62d4be(0x201)&&!Array['isArray'](_0x3c429e);}function isMissingFile(_0x229534){const _0x25d631=a300_0x143698;return Boolean(_0x229534&&typeof _0x229534===_0x25d631(0x201)&&_0x229534[_0x25d631(0x225)]===_0x25d631(0x223));}function isAlreadyExists(_0x4d9ce0){const _0x12c46f=a300_0x143698;return Boolean(_0x4d9ce0&&typeof _0x4d9ce0===_0x12c46f(0x201)&&_0x4d9ce0[_0x12c46f(0x225)]===_0x12c46f(0x204));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a301_0x113ba7=a301_0x2606;(function(_0x1521b8,_0x327e40){const _0x3d2cf8=a301_0x2606,_0x5dbefc=_0x1521b8();while(!![]){try{const _0x4da2d5=-parseInt(_0x3d2cf8(0x1be))/0x1*(-parseInt(_0x3d2cf8(0x17b))/0x2)+-parseInt(_0x3d2cf8(0x197))/0x3+-parseInt(_0x3d2cf8(0x18b))/0x4*(parseInt(_0x3d2cf8(0x1a8))/0x5)+parseInt(_0x3d2cf8(0x1a9))/0x6*(-parseInt(_0x3d2cf8(0x19a))/0x7)+-parseInt(_0x3d2cf8(0x183))/0x8+-parseInt(_0x3d2cf8(0x1c2))/0x9*(parseInt(_0x3d2cf8(0x1ce))/0xa)+-parseInt(_0x3d2cf8(0x179))/0xb*(-parseInt(_0x3d2cf8(0x1b2))/0xc);if(_0x4da2d5===_0x327e40)break;else _0x5dbefc['push'](_0x5dbefc['shift']());}catch(_0x59b09e){_0x5dbefc['push'](_0x5dbefc['shift']());}}}(a301_0x22e4,0xa6df3));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=['schemaVersion',a301_0x113ba7(0x19d),a301_0x113ba7(0x1ac),a301_0x113ba7(0x1a4),a301_0x113ba7(0x194),a301_0x113ba7(0x193)],HIT_KEYS=[a301_0x113ba7(0x184),a301_0x113ba7(0x1c3),a301_0x113ba7(0x1ba),a301_0x113ba7(0x191),'title',a301_0x113ba7(0x19c),a301_0x113ba7(0x182),'rank',a301_0x113ba7(0x18f),'finalScore',a301_0x113ba7(0x192)];function a301_0x22e4(){const _0x1aabfe=['2670ZDbPpX','company','schemaVersion','password','Knowledge\x20search\x20cancelled.','trim','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','hostname','/v2/development/apps/','length','64361aGqvwo','hash','1052322kEqcQf','signal','\x20contract.','response','number','AbortError','split','tags','2384080UKarIL','documentId','sort','keys','map','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','name','isSafeInteger','36guCDdp','appCode','cookie','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','rawScore','rank','scope','scoreKind','timingsMs','strategyFingerprint','https:','topK','1735380dAsxvI','cli:rabetbase','finalScore','35Zysfjp','/knowledge/search','text','profile','score','no-store','authRequired','toLowerCase','Knowledge\x20search\x20appCode\x20is\x20required.','validation','hits','TimeoutError','json','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','307655OQukUX','1295166FKHVvf','string','timeout','total','stringify','POST','some','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','error','4632GqDDoT','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','isArray','status','headers','application/json','networkError','title','chunkId','query','apiError','protocol','2ErmTuY','test','isFinite','Knowledge\x20search\x20query\x20is\x20required.','3969LlptPj','revision','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','search','entries','pathname','serviceUrl','content-type','hits[','aborted','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','development'];a301_0x22e4=function(){return _0x1aabfe;};return a301_0x22e4();}export function normalizeKbServiceOrigin(_0x32899f){const _0x244f7e=a301_0x113ba7,_0x2ad3d7=()=>CliErrors['validation'](_0x244f7e(0x1b3)),_0x11c334=_0x32899f?.[_0x244f7e(0x1d3)]();if(!_0x11c334||/[\u0000-\u0020\u007f]/[_0x244f7e(0x1bf)](_0x11c334)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x244f7e(0x1bf)](_0x11c334))throw _0x2ad3d7();let _0x1455fe;try{_0x1455fe=new URL(_0x11c334);}catch{throw _0x2ad3d7();}if(_0x1455fe[_0x244f7e(0x1bd)]!==_0x244f7e(0x195)||!_0x1455fe[_0x244f7e(0x1d5)]||_0x1455fe['username']||_0x1455fe[_0x244f7e(0x1d1)]||_0x1455fe[_0x244f7e(0x1c7)]!=='/'||_0x1455fe[_0x244f7e(0x1c5)]||_0x1455fe[_0x244f7e(0x17a)])throw _0x2ad3d7();return _0x1455fe['origin'];}export async function searchDirectKnowledge(_0x5e3db5){const _0x4df210=a301_0x113ba7,_0x2efe7d=_0x5e3db5[_0x4df210(0x18c)][_0x4df210(0x1d3)](),_0x714d1f=_0x5e3db5[_0x4df210(0x1bb)][_0x4df210(0x1d3)]();if(!_0x2efe7d)throw CliErrors[_0x4df210(0x1a3)](_0x4df210(0x1a2));if(!_0x5e3db5[_0x4df210(0x18d)][_0x4df210(0x1d3)]())throw CliErrors['authRequired']();if(!_0x714d1f)throw CliErrors[_0x4df210(0x1a3)](_0x4df210(0x1c1));validateTopK(_0x5e3db5[_0x4df210(0x196)]);const _0x106c8f=normalizeKbServiceOrigin(_0x5e3db5[_0x4df210(0x1c8)]),_0x414c18=AbortSignal[_0x4df210(0x1ab)](0xea60),_0x26b918=_0x5e3db5[_0x4df210(0x17c)]?AbortSignal['any']([_0x5e3db5[_0x4df210(0x17c)],_0x414c18]):_0x414c18;let _0x64e95;try{_0x64e95=await fetch(_0x106c8f+_0x4df210(0x1d6)+encodeURIComponent(_0x2efe7d)+_0x4df210(0x19b),{'method':_0x4df210(0x1ae),'redirect':_0x4df210(0x1b1),'headers':{'Content-Type':_0x4df210(0x1b7),'Cookie':_0x5e3db5['cookie'],'X-Invoke-Source':_0x4df210(0x198)},'body':JSON[_0x4df210(0x1ad)]({'query':_0x714d1f,..._0x5e3db5['topK']!==undefined?{'topK':_0x5e3db5[_0x4df210(0x196)]}:{}}),'signal':_0x26b918});}catch(_0x514851){if(_0x5e3db5[_0x4df210(0x17c)]?.[_0x4df210(0x1cb)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x4df210(0x180));if(_0x514851 instanceof Error&&_0x514851[_0x4df210(0x189)]==='TimeoutError')throw CliErrors[_0x4df210(0x1b8)](_0x4df210(0x188));throw CliErrors['networkError'](_0x4df210(0x1d4));}if(_0x64e95[_0x4df210(0x1b5)]===0x191)throw CliErrors[_0x4df210(0x1a0)]();if(_0x64e95[_0x4df210(0x1b5)]===0x1ad)throw CliErrors[_0x4df210(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x64e95['ok'])throw CliErrors[_0x4df210(0x1bc)](_0x4df210(0x18e)+_0x64e95[_0x4df210(0x1b5)]+').');if(!hasNoStore(_0x64e95[_0x4df210(0x1b6)]))throw CliErrors[_0x4df210(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x64e95['headers']['get'](_0x4df210(0x1c9))??'')[_0x4df210(0x1a1)]()['includes']('application/json'))throw CliErrors[_0x4df210(0x1bc)](_0x4df210(0x1b0));let _0x3607d0;try{_0x3607d0=await _0x64e95[_0x4df210(0x1a6)]();}catch(_0x2fca33){if(_0x5e3db5['signal']?.['aborted'])throw new DOMException(_0x4df210(0x1d2),_0x4df210(0x180));if(_0x414c18[_0x4df210(0x1cb)]||_0x2fca33 instanceof Error&&_0x2fca33[_0x4df210(0x189)]===_0x4df210(0x1a5))throw CliErrors[_0x4df210(0x1b8)]('KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.');throw CliErrors[_0x4df210(0x1bc)]('KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}try{const _0x40621d=requireExactRecord(_0x3607d0,[_0x4df210(0x1a4),_0x4df210(0x194),'timingsMs'],_0x4df210(0x17e));if(!Array['isArray'](_0x40621d[_0x4df210(0x1a4)]))throw invalidContract(_0x4df210(0x1a4));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':'development','total':_0x40621d[_0x4df210(0x1a4)][_0x4df210(0x1d7)],'hits':_0x40621d[_0x4df210(0x1a4)],'strategyFingerprint':_0x40621d[_0x4df210(0x194)],'timingsMs':_0x40621d[_0x4df210(0x193)]},_0x5e3db5[_0x4df210(0x196)]??0xa);}catch(_0x27152f){if(_0x27152f instanceof CliError)throw CliErrors[_0x4df210(0x1bc)](_0x4df210(0x1a7));throw _0x27152f;}}function validateTopK(_0x29ab56){const _0x404c41=a301_0x113ba7;if(_0x29ab56!==undefined&&(!Number[_0x404c41(0x18a)](_0x29ab56)||_0x29ab56<0x1||_0x29ab56>0x32))throw CliErrors[_0x404c41(0x1a3)](_0x404c41(0x1cc));}function hasNoStore(_0x1d730f){const _0x348f69=a301_0x113ba7;return(_0x1d730f['get']('cache-control')??'')[_0x348f69(0x181)](',')[_0x348f69(0x1af)](_0x32e88d=>_0x32e88d['trim']()[_0x348f69(0x1a1)]()===_0x348f69(0x19f));}function parseDevelopmentSearchResponse(_0x4225d9,_0x50ff24){const _0x44f43c=a301_0x113ba7,_0x4d00d2=requireExactRecord(_0x4225d9,RESPONSE_KEYS,_0x44f43c(0x17e));if(_0x4d00d2[_0x44f43c(0x1d0)]!==0x2||_0x4d00d2[_0x44f43c(0x19d)]!==_0x44f43c(0x1cd))throw invalidContract(_0x44f43c(0x19d));if(!Array[_0x44f43c(0x1b4)](_0x4d00d2[_0x44f43c(0x1a4)])||_0x4d00d2[_0x44f43c(0x1a4)][_0x44f43c(0x1d7)]>(_0x50ff24??0x32))throw invalidContract(_0x44f43c(0x1a4));if(typeof _0x4d00d2[_0x44f43c(0x194)]!==_0x44f43c(0x1aa)||!/^sha256:[0-9a-f]{64}$/[_0x44f43c(0x1bf)](_0x4d00d2[_0x44f43c(0x194)]))throw invalidContract('strategyFingerprint');const _0x117873=requireRecord(_0x4d00d2[_0x44f43c(0x193)],_0x44f43c(0x193)),_0x50d0c4={};for(const [_0x3a8ae1,_0xdd89c0]of Object[_0x44f43c(0x1c6)](_0x117873)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x44f43c(0x1bf)](_0x3a8ae1)||typeof _0xdd89c0!=='number'||!Number[_0x44f43c(0x1c0)](_0xdd89c0)||_0xdd89c0<0x0)throw invalidContract(_0x44f43c(0x193));_0x50d0c4[_0x3a8ae1]=_0xdd89c0;}const _0x117756=_0x4d00d2[_0x44f43c(0x1a4)][_0x44f43c(0x187)]((_0x5cadf3,_0x33ed42)=>parseHit(_0x5cadf3,_0x33ed42));if(!Number['isSafeInteger'](_0x4d00d2[_0x44f43c(0x1ac)])||_0x4d00d2[_0x44f43c(0x1ac)]!==_0x117756['length'])throw invalidContract(_0x44f43c(0x1ac));return{'schemaVersion':_0x4d00d2[_0x44f43c(0x1d0)],'profile':_0x4d00d2['profile'],'total':_0x4d00d2[_0x44f43c(0x1ac)],'strategyFingerprint':_0x4d00d2['strategyFingerprint'],'timingsMs':_0x50d0c4,'hits':_0x117756};}function parseHit(_0x3a7418,_0x6b986b){const _0x4bafbd=a301_0x113ba7,_0x15f4c2=requireExactRecord(_0x3a7418,HIT_KEYS,_0x4bafbd(0x1ca)+_0x6b986b+']'),_0x389c2f=_0x1276bb=>{const _0x12e911=_0x4bafbd,_0x1567a2=_0x15f4c2[_0x1276bb];if(typeof _0x1567a2!==_0x12e911(0x1aa)||!_0x1567a2)throw invalidContract(_0x1276bb);return _0x1567a2;};if(!Number[_0x4bafbd(0x18a)](_0x15f4c2['revision'])||_0x15f4c2['revision']<0x1)throw invalidContract(_0x4bafbd(0x1c3));if(_0x15f4c2[_0x4bafbd(0x191)]!=='public'&&_0x15f4c2['scope']!==_0x4bafbd(0x1cf))throw invalidContract(_0x4bafbd(0x191));if(typeof _0x15f4c2[_0x4bafbd(0x1b9)]!==_0x4bafbd(0x1aa)||typeof _0x15f4c2[_0x4bafbd(0x19c)]!==_0x4bafbd(0x1aa))throw invalidContract(_0x4bafbd(0x19c));if(!Array[_0x4bafbd(0x1b4)](_0x15f4c2[_0x4bafbd(0x182)])||_0x15f4c2[_0x4bafbd(0x182)][_0x4bafbd(0x1af)](_0x414dbc=>typeof _0x414dbc!==_0x4bafbd(0x1aa)))throw invalidContract(_0x4bafbd(0x182));if(!Number['isSafeInteger'](_0x15f4c2[_0x4bafbd(0x190)])||_0x15f4c2[_0x4bafbd(0x190)]!==_0x6b986b+0x1)throw invalidContract(_0x4bafbd(0x190));if(!isFiniteNumber(_0x15f4c2['rawScore'])||!isFiniteNumber(_0x15f4c2['finalScore']))throw invalidContract(_0x4bafbd(0x19e));return{'documentId':_0x389c2f('documentId'),'revision':_0x15f4c2[_0x4bafbd(0x1c3)],'chunkId':_0x389c2f(_0x4bafbd(0x1ba)),'scope':_0x15f4c2[_0x4bafbd(0x191)],'title':_0x15f4c2['title'],'text':_0x15f4c2[_0x4bafbd(0x19c)],'tags':[..._0x15f4c2[_0x4bafbd(0x182)]],'rank':_0x15f4c2['rank'],'rawScore':_0x15f4c2[_0x4bafbd(0x18f)],'finalScore':_0x15f4c2[_0x4bafbd(0x199)],'scoreKind':_0x389c2f(_0x4bafbd(0x192))};}function requireExactRecord(_0x3c3ba1,_0x3cf94c,_0x27c507){const _0x4759dd=a301_0x113ba7,_0x1a0d54=requireRecord(_0x3c3ba1,_0x27c507),_0x184b64=Object[_0x4759dd(0x186)](_0x1a0d54)[_0x4759dd(0x185)](),_0x333b99=[..._0x3cf94c][_0x4759dd(0x185)]();if(_0x184b64[_0x4759dd(0x1d7)]!==_0x333b99['length']||_0x184b64[_0x4759dd(0x1af)]((_0x243058,_0x2b5312)=>_0x243058!==_0x333b99[_0x2b5312]))throw invalidContract(_0x27c507);return _0x1a0d54;}function requireRecord(_0x250856,_0x235000){const _0x1615be=a301_0x113ba7;if(!_0x250856||typeof _0x250856!=='object'||Array[_0x1615be(0x1b4)](_0x250856))throw invalidContract(_0x235000);return _0x250856;}function isFiniteNumber(_0x1b9956){const _0x2818e3=a301_0x113ba7;return typeof _0x1b9956===_0x2818e3(0x17f)&&Number[_0x2818e3(0x1c0)](_0x1b9956);}function a301_0x2606(_0x45e2bc,_0x366347){_0x45e2bc=_0x45e2bc-0x179;const _0x22e4a2=a301_0x22e4();let _0x260633=_0x22e4a2[_0x45e2bc];return _0x260633;}function invalidContract(_0x4b0595){const _0xc984fe=a301_0x113ba7;return CliErrors[_0xc984fe(0x1bc)](_0xc984fe(0x1c4)+_0x4b0595+_0xc984fe(0x17d));}
|
|
1
|
+
const a301_0x41c679=a301_0x4e1e;(function(_0x874245,_0x490f4c){const _0x33a0e1=a301_0x4e1e,_0x52e321=_0x874245();while(!![]){try{const _0x53146b=-parseInt(_0x33a0e1(0x1e7))/0x1*(-parseInt(_0x33a0e1(0x1ee))/0x2)+-parseInt(_0x33a0e1(0x1ff))/0x3+-parseInt(_0x33a0e1(0x202))/0x4*(parseInt(_0x33a0e1(0x1f2))/0x5)+parseInt(_0x33a0e1(0x22e))/0x6*(-parseInt(_0x33a0e1(0x217))/0x7)+-parseInt(_0x33a0e1(0x22a))/0x8*(parseInt(_0x33a0e1(0x214))/0x9)+parseInt(_0x33a0e1(0x221))/0xa*(-parseInt(_0x33a0e1(0x218))/0xb)+parseInt(_0x33a0e1(0x20f))/0xc;if(_0x53146b===_0x490f4c)break;else _0x52e321['push'](_0x52e321['shift']());}catch(_0x40b2f7){_0x52e321['push'](_0x52e321['shift']());}}}(a301_0x3978,0xcdb5b));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a301_0x41c679(0x220),'profile',a301_0x41c679(0x213),a301_0x41c679(0x219),a301_0x41c679(0x1dd),a301_0x41c679(0x212)],HIT_KEYS=['documentId',a301_0x41c679(0x21b),a301_0x41c679(0x225),a301_0x41c679(0x1e4),a301_0x41c679(0x205),a301_0x41c679(0x21d),a301_0x41c679(0x222),a301_0x41c679(0x209),a301_0x41c679(0x22b),a301_0x41c679(0x21c),a301_0x41c679(0x21e)];function a301_0x4e1e(_0x1dc7c4,_0x2434ce){_0x1dc7c4=_0x1dc7c4-0x1d5;const _0x3978a7=a301_0x3978();let _0x4e1e2c=_0x3978a7[_0x1dc7c4];return _0x4e1e2c;}export function normalizeKbServiceOrigin(_0x9565cc){const _0x1657eb=a301_0x41c679,_0x46fac4=()=>CliErrors[_0x1657eb(0x1e5)](_0x1657eb(0x20a)),_0x1800fd=_0x9565cc?.[_0x1657eb(0x1df)]();if(!_0x1800fd||/[\u0000-\u0020\u007f]/[_0x1657eb(0x1e0)](_0x1800fd)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x1657eb(0x1e0)](_0x1800fd))throw _0x46fac4();let _0x1ed739;try{_0x1ed739=new URL(_0x1800fd);}catch{throw _0x46fac4();}if(_0x1ed739['protocol']!=='https:'||!_0x1ed739[_0x1657eb(0x1d6)]||_0x1ed739[_0x1657eb(0x1eb)]||_0x1ed739[_0x1657eb(0x1e1)]||_0x1ed739[_0x1657eb(0x216)]!=='/'||_0x1ed739[_0x1657eb(0x1e8)]||_0x1ed739[_0x1657eb(0x1f5)])throw _0x46fac4();return _0x1ed739[_0x1657eb(0x22c)];}export async function searchDirectKnowledge(_0x2cb948){const _0x5add11=a301_0x41c679,_0x5a7139=_0x2cb948[_0x5add11(0x21a)][_0x5add11(0x1df)](),_0x1eb519=_0x2cb948['query']['trim']();if(!_0x5a7139)throw CliErrors['validation'](_0x5add11(0x1f0));if(!_0x2cb948[_0x5add11(0x1f7)]['trim']())throw CliErrors[_0x5add11(0x230)]();if(!_0x1eb519)throw CliErrors[_0x5add11(0x1e5)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x2cb948[_0x5add11(0x1dc)]);const _0x362c97=normalizeKbServiceOrigin(_0x2cb948[_0x5add11(0x1f6)]),_0x12ddd3=AbortSignal['timeout'](0xea60),_0x214517=_0x2cb948['signal']?AbortSignal[_0x5add11(0x1fe)]([_0x2cb948[_0x5add11(0x203)],_0x12ddd3]):_0x12ddd3;let _0x127df4;try{_0x127df4=await fetch(_0x362c97+_0x5add11(0x20b)+encodeURIComponent(_0x5a7139)+_0x5add11(0x1fb),{'method':'POST','redirect':_0x5add11(0x20d),'headers':{'Content-Type':_0x5add11(0x1d8),'Cookie':_0x2cb948[_0x5add11(0x1f7)],'X-Invoke-Source':_0x5add11(0x22d)},'body':JSON[_0x5add11(0x207)]({'query':_0x1eb519,..._0x2cb948[_0x5add11(0x1dc)]!==undefined?{'topK':_0x2cb948[_0x5add11(0x1dc)]}:{}}),'signal':_0x214517});}catch(_0x329117){if(_0x2cb948[_0x5add11(0x203)]?.[_0x5add11(0x1fc)])throw new DOMException(_0x5add11(0x1ef),_0x5add11(0x227));if(_0x329117 instanceof Error&&_0x329117[_0x5add11(0x1ea)]===_0x5add11(0x226))throw CliErrors[_0x5add11(0x1f9)](_0x5add11(0x229));throw CliErrors[_0x5add11(0x1f9)](_0x5add11(0x224));}if(_0x127df4[_0x5add11(0x200)]===0x191)throw CliErrors[_0x5add11(0x230)]();if(_0x127df4['status']===0x1ad)throw CliErrors[_0x5add11(0x1f8)]('KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).');if(!_0x127df4['ok'])throw CliErrors[_0x5add11(0x1f8)](_0x5add11(0x1db)+_0x127df4['status']+').');if(!hasNoStore(_0x127df4[_0x5add11(0x1d5)]))throw CliErrors[_0x5add11(0x1f8)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x127df4['headers'][_0x5add11(0x20e)](_0x5add11(0x20c))??'')['toLowerCase']()[_0x5add11(0x1e3)](_0x5add11(0x1d8)))throw CliErrors['apiError'](_0x5add11(0x210));let _0x3b84b3;try{_0x3b84b3=await _0x127df4['json']();}catch(_0x433876){if(_0x2cb948['signal']?.['aborted'])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x5add11(0x227));if(_0x12ddd3[_0x5add11(0x1fc)]||_0x433876 instanceof Error&&_0x433876['name']===_0x5add11(0x226))throw CliErrors[_0x5add11(0x1f9)](_0x5add11(0x229));throw CliErrors['apiError'](_0x5add11(0x1e9));}try{const _0x1d3196=requireExactRecord(_0x3b84b3,[_0x5add11(0x219),'strategyFingerprint',_0x5add11(0x212)],_0x5add11(0x211));if(!Array['isArray'](_0x1d3196[_0x5add11(0x219)]))throw invalidContract(_0x5add11(0x219));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x5add11(0x21f),'total':_0x1d3196['hits']['length'],'hits':_0x1d3196['hits'],'strategyFingerprint':_0x1d3196['strategyFingerprint'],'timingsMs':_0x1d3196['timingsMs']},_0x2cb948['topK']??0xa);}catch(_0x11da4e){if(_0x11da4e instanceof CliError)throw CliErrors['apiError'](_0x5add11(0x1e2));throw _0x11da4e;}}function validateTopK(_0x1ef4c){const _0x5600e0=a301_0x41c679;if(_0x1ef4c!==undefined&&(!Number[_0x5600e0(0x231)](_0x1ef4c)||_0x1ef4c<0x1||_0x1ef4c>0x32))throw CliErrors[_0x5600e0(0x1e5)](_0x5600e0(0x1da));}function hasNoStore(_0x15b570){const _0x295a19=a301_0x41c679;return(_0x15b570[_0x295a19(0x20e)](_0x295a19(0x1de))??'')['split'](',')[_0x295a19(0x215)](_0x1cbbaf=>_0x1cbbaf[_0x295a19(0x1df)]()[_0x295a19(0x223)]()===_0x295a19(0x201));}function a301_0x3978(){const _0x359081=['KB\x20Service\x20knowledge\x20search\x20request\x20failed.','chunkId','TimeoutError','AbortError','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','1507672hXLJUl','rawScore','origin','cli:rabetbase','812136HOZSKk','documentId','authRequired','isSafeInteger','headers','hostname','public','application/json','profile','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','topK','strategyFingerprint','cache-control','trim','test','password','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','includes','scope','validation','string','26307vdLiUP','search','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','name','username','company','score','92JUiZEK','Knowledge\x20search\x20cancelled.','Knowledge\x20search\x20appCode\x20is\x20required.','sort','10PJIsgL','isFinite','\x20contract.','hash','serviceUrl','cookie','apiError','networkError','hits[','/knowledge/search','aborted','isArray','any','664869CIEBDy','status','no-store','3316100DyazSm','signal','length','title','map','stringify','number','rank','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','/v2/development/apps/','content-type','error','get','48128508tcbfdt','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','response','timingsMs','total','54RBqGaC','some','pathname','7QNdgqL','13557071eErGgy','hits','appCode','revision','finalScore','text','scoreKind','development','schemaVersion','10UaMvln','tags','toLowerCase'];a301_0x3978=function(){return _0x359081;};return a301_0x3978();}function parseDevelopmentSearchResponse(_0x40c8e7,_0x5f405d){const _0x584457=a301_0x41c679,_0x40259e=requireExactRecord(_0x40c8e7,RESPONSE_KEYS,_0x584457(0x211));if(_0x40259e[_0x584457(0x220)]!==0x2||_0x40259e[_0x584457(0x1d9)]!==_0x584457(0x21f))throw invalidContract('profile');if(!Array[_0x584457(0x1fd)](_0x40259e[_0x584457(0x219)])||_0x40259e['hits'][_0x584457(0x204)]>(_0x5f405d??0x32))throw invalidContract(_0x584457(0x219));if(typeof _0x40259e[_0x584457(0x1dd)]!==_0x584457(0x1e6)||!/^sha256:[0-9a-f]{64}$/['test'](_0x40259e['strategyFingerprint']))throw invalidContract(_0x584457(0x1dd));const _0x351a59=requireRecord(_0x40259e['timingsMs'],_0x584457(0x212)),_0x39c4e6={};for(const [_0x1ba819,_0x4ade7b]of Object['entries'](_0x351a59)){if(!/^[A-Za-z][A-Za-z0-9]*$/['test'](_0x1ba819)||typeof _0x4ade7b!==_0x584457(0x208)||!Number[_0x584457(0x1f3)](_0x4ade7b)||_0x4ade7b<0x0)throw invalidContract(_0x584457(0x212));_0x39c4e6[_0x1ba819]=_0x4ade7b;}const _0xa9064b=_0x40259e[_0x584457(0x219)][_0x584457(0x206)]((_0x4b225d,_0x5755f7)=>parseHit(_0x4b225d,_0x5755f7));if(!Number[_0x584457(0x231)](_0x40259e['total'])||_0x40259e[_0x584457(0x213)]!==_0xa9064b[_0x584457(0x204)])throw invalidContract(_0x584457(0x213));return{'schemaVersion':_0x40259e[_0x584457(0x220)],'profile':_0x40259e[_0x584457(0x1d9)],'total':_0x40259e[_0x584457(0x213)],'strategyFingerprint':_0x40259e[_0x584457(0x1dd)],'timingsMs':_0x39c4e6,'hits':_0xa9064b};}function parseHit(_0x147d1b,_0x5799ba){const _0x14e797=a301_0x41c679,_0x2e94c8=requireExactRecord(_0x147d1b,HIT_KEYS,_0x14e797(0x1fa)+_0x5799ba+']'),_0x5691c4=_0x477c62=>{const _0x1fa015=_0x14e797,_0x607fbb=_0x2e94c8[_0x477c62];if(typeof _0x607fbb!==_0x1fa015(0x1e6)||!_0x607fbb)throw invalidContract(_0x477c62);return _0x607fbb;};if(!Number[_0x14e797(0x231)](_0x2e94c8[_0x14e797(0x21b)])||_0x2e94c8['revision']<0x1)throw invalidContract(_0x14e797(0x21b));if(_0x2e94c8['scope']!==_0x14e797(0x1d7)&&_0x2e94c8[_0x14e797(0x1e4)]!==_0x14e797(0x1ec))throw invalidContract('scope');if(typeof _0x2e94c8['title']!==_0x14e797(0x1e6)||typeof _0x2e94c8[_0x14e797(0x21d)]!=='string')throw invalidContract(_0x14e797(0x21d));if(!Array[_0x14e797(0x1fd)](_0x2e94c8['tags'])||_0x2e94c8[_0x14e797(0x222)][_0x14e797(0x215)](_0x3314ed=>typeof _0x3314ed!==_0x14e797(0x1e6)))throw invalidContract(_0x14e797(0x222));if(!Number[_0x14e797(0x231)](_0x2e94c8['rank'])||_0x2e94c8[_0x14e797(0x209)]!==_0x5799ba+0x1)throw invalidContract(_0x14e797(0x209));if(!isFiniteNumber(_0x2e94c8['rawScore'])||!isFiniteNumber(_0x2e94c8[_0x14e797(0x21c)]))throw invalidContract(_0x14e797(0x1ed));return{'documentId':_0x5691c4(_0x14e797(0x22f)),'revision':_0x2e94c8[_0x14e797(0x21b)],'chunkId':_0x5691c4(_0x14e797(0x225)),'scope':_0x2e94c8[_0x14e797(0x1e4)],'title':_0x2e94c8[_0x14e797(0x205)],'text':_0x2e94c8[_0x14e797(0x21d)],'tags':[..._0x2e94c8[_0x14e797(0x222)]],'rank':_0x2e94c8[_0x14e797(0x209)],'rawScore':_0x2e94c8[_0x14e797(0x22b)],'finalScore':_0x2e94c8[_0x14e797(0x21c)],'scoreKind':_0x5691c4('scoreKind')};}function requireExactRecord(_0x1e130e,_0x1c6a58,_0x218541){const _0x423f45=a301_0x41c679,_0x52c5c6=requireRecord(_0x1e130e,_0x218541),_0x3ef18b=Object['keys'](_0x52c5c6)[_0x423f45(0x1f1)](),_0xf0838e=[..._0x1c6a58]['sort']();if(_0x3ef18b[_0x423f45(0x204)]!==_0xf0838e[_0x423f45(0x204)]||_0x3ef18b[_0x423f45(0x215)]((_0x9d8ce9,_0x304abc)=>_0x9d8ce9!==_0xf0838e[_0x304abc]))throw invalidContract(_0x218541);return _0x52c5c6;}function requireRecord(_0x39badc,_0x176c9d){if(!_0x39badc||typeof _0x39badc!=='object'||Array['isArray'](_0x39badc))throw invalidContract(_0x176c9d);return _0x39badc;}function isFiniteNumber(_0x1543f6){const _0x204bc8=a301_0x41c679;return typeof _0x1543f6==='number'&&Number[_0x204bc8(0x1f3)](_0x1543f6);}function invalidContract(_0x4021c8){const _0x27769a=a301_0x41c679;return CliErrors[_0x27769a(0x1f8)](_0x27769a(0x228)+_0x4021c8+_0x27769a(0x1f4));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a302_0x17d5ba=a302_0x56e6;function a302_0x56e6(_0x424eef,_0x5d474a){_0x424eef=_0x424eef-0x1db;const _0xfc4352=a302_0xfc43();let _0x56e6cc=_0xfc4352[_0x424eef];return _0x56e6cc;}(function(_0x4ce6a8,_0x1f1496){const _0x262af4=a302_0x56e6,_0x460f83=_0x4ce6a8();while(!![]){try{const _0x12f24d=parseInt(_0x262af4(0x1e4))/0x1+-parseInt(_0x262af4(0x1ec))/0x2+-parseInt(_0x262af4(0x1e9))/0x3*(-parseInt(_0x262af4(0x1f4))/0x4)+parseInt(_0x262af4(0x1f0))/0x5*(-parseInt(_0x262af4(0x1f9))/0x6)+-parseInt(_0x262af4(0x1dd))/0x7*(-parseInt(_0x262af4(0x1f1))/0x8)+parseInt(_0x262af4(0x1db))/0x9+-parseInt(_0x262af4(0x1f7))/0xa*(parseInt(_0x262af4(0x1e5))/0xb);if(_0x12f24d===_0x1f1496)break;else _0x460f83['push'](_0x460f83['shift']());}catch(_0x5c8ef3){_0x460f83['push'](_0x460f83['shift']());}}}(a302_0xfc43,0xc9d36));import{constants}from'node:fs';function a302_0xfc43(){const _0x577142=['120GeyfcE','Page\x20directory\x20not\x20found:\x20','60ABAHRH','.rabetbase','8686116IViJxR','.json','558803hDNQDM','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','toUpperCase','isFile','cwd','isDirectory','utf8','383588WbPnYv','1028731ramdeO','split','F_OK','appPagesDir','33CqeenD','validation','localeCompare','2318496dNvAmE','name','sort','trim','552110xmWIrv','136AVwlIm','page-dir','flagMissing','547852AzIGcu','page','page.lock.json'];a302_0xfc43=function(){return _0x577142;};return a302_0xfc43();}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(_0x30dc4c,_0x539376=process[a302_0x17d5ba(0x1e1)]()){const _0x1786e7=a302_0x17d5ba,_0x23562e=resolve(_0x539376),_0x545006=join(_0x23562e,_0x1786e7(0x1fa),_0x1786e7(0x1f5));return{'projectRoot':_0x23562e,'pagesBaseDir':_0x545006,'appPagesDir':join(_0x545006,_0x30dc4c),'lockFilePath':join(_0x23562e,_0x1786e7(0x1fa),_0x1786e7(0x1f6))};}export function buildPageFileName(_0x181823,_0x472ba7){const _0x13f607=a302_0x17d5ba;return _0x181823+'-'+_0x472ba7[_0x13f607(0x1df)]()+_0x13f607(0x1dc);}export function resolvePageFilePath(_0x2f0f8c,_0x1c29d9,_0x2d7082){const _0x569cec=a302_0x17d5ba;return join(_0x2f0f8c[_0x569cec(0x1e8)],buildPageFileName(_0x1c29d9,_0x2d7082));}export async function ensureParentDirectory(_0x382c4f){await mkdir(dirname(_0x382c4f),{'recursive':!![]});}export async function fileExists(_0x2fd2ee){const _0x552718=a302_0x17d5ba;try{return await access(_0x2fd2ee,constants[_0x552718(0x1e7)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x4a0cf2){const _0x1b29fe=a302_0x17d5ba,_0x484808=_0x4a0cf2[_0x1b29fe(0x1ef)]();if(!_0x484808)throw CliErrors[_0x1b29fe(0x1f3)](_0x1b29fe(0x1f2));const _0x513982=resolve(_0x484808);let _0xd5a85a;try{_0xd5a85a=await lstat(_0x513982);}catch{throw CliErrors[_0x1b29fe(0x1ea)](_0x1b29fe(0x1f8)+_0x484808);}if(!_0xd5a85a[_0x1b29fe(0x1e2)]())throw CliErrors[_0x1b29fe(0x1ea)](_0x1b29fe(0x1de)+_0x484808);const _0x395fa1={};return await readDirectory(_0x513982,_0x513982,_0x395fa1),_0x395fa1;}async function readDirectory(_0x2f35d3,_0x40ca4b,_0x3482d1){const _0x455f43=a302_0x17d5ba,_0x5a9aca=await readdir(_0x40ca4b,{'withFileTypes':!![]});for(const _0x1c9474 of _0x5a9aca[_0x455f43(0x1ee)]((_0x1dc1c8,_0x37aae2)=>_0x1dc1c8[_0x455f43(0x1ed)][_0x455f43(0x1eb)](_0x37aae2['name']))){const _0x35e415=join(_0x40ca4b,_0x1c9474['name']);if(_0x1c9474[_0x455f43(0x1e2)]()){await readDirectory(_0x2f35d3,_0x35e415,_0x3482d1);continue;}if(!_0x1c9474[_0x455f43(0x1e0)]())throw CliErrors[_0x455f43(0x1ea)]('Unsupported\x20file\x20in\x20page\x20directory:\x20'+_0x35e415);_0x3482d1[relative(_0x2f35d3,_0x35e415)[_0x455f43(0x1e6)](sep)['join']('/')]=await readFile(_0x35e415,_0x455f43(0x1e3));}}
|
package/lib/core/page/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e564a,_0x21412a){const _0x135b35=a303_0x9547,_0x17c8e3=_0x1e564a();while(!![]){try{const _0x38df10=-parseInt(_0x135b35(0xc7))/0x1*(parseInt(_0x135b35(0xc4))/0x2)+parseInt(_0x135b35(0xc6))/0x3+parseInt(_0x135b35(0xc5))/0x4+parseInt(_0x135b35(0xc9))/0x5*(parseInt(_0x135b35(0xcc))/0x6)+parseInt(_0x135b35(0xce))/0x7*(-parseInt(_0x135b35(0xca))/0x8)+parseInt(_0x135b35(0xc3))/0x9+-parseInt(_0x135b35(0xc2))/0xa;if(_0x38df10===_0x21412a)break;else _0x17c8e3['push'](_0x17c8e3['shift']());}catch(_0x2ffe8d){_0x17c8e3['push'](_0x17c8e3['shift']());}}}(a303_0x1d87,0x5980b));import a303_0x2bd286 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x10a311){const _0x475da6=a303_0x9547;return JSON[_0x475da6(0xcd)](JSON['parse'](_0x10a311),null,0x2)+'\x0a';}export function computePageContentHash(_0x1f9faa){const _0x35fb06=a303_0x9547;return a303_0x2bd286['createHash'](_0x35fb06(0xc0))[_0x35fb06(0xc1)](_0x1f9faa)[_0x35fb06(0xcb)](_0x35fb06(0xc8));}export function computeSerializedSchemaHash(_0x1e87ec){return computePageContentHash(serializePageSchemaForFile(_0x1e87ec));}function a303_0x1d87(){const _0xf6fcc8=['2010423IAwOyc','4yYSiVR','hex','171725pScyOH','8RbLQnF','digest','54bAcOIu','stringify','4343920vMytmA','utf8','md5','update','5150660aaQaui','4381731coaVzM','101554CHhlFr','956928IUicVn'];a303_0x1d87=function(){return _0xf6fcc8;};return a303_0x1d87();}function a303_0x9547(_0x21baa0,_0x5db106){_0x21baa0=_0x21baa0-0xc0;const _0x1d87e0=a303_0x1d87();let _0x9547f6=_0x1d87e0[_0x21baa0];return _0x9547f6;}export async function computePageFileHash(_0x3a0e32){const _0x1c3a88=a303_0x9547,_0x1695fc=await readFile(_0x3a0e32,_0x1c3a88(0xcf));return computePageContentHash(_0x1695fc);}
|