@treasuredata/tdx 2026.7.1 → 2026.7.3
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/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.d.ts +20 -0
- package/dist/commands/cas-command.d.ts.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-command.js.map +1 -1
- package/dist/commands/cas-segment-command.d.ts +24 -0
- package/dist/commands/cas-segment-command.d.ts.map +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/cas-segment-command.js.map +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +11 -2
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.d.ts +16 -0
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +83 -3
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.d.ts +149 -0
- package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -0
- package/dist/sdk/cas/cas-audience-schema.js +1 -0
- package/dist/sdk/cas/cas-audience-schema.js.map +1 -0
- package/dist/sdk/cas/cas-audience-validator.d.ts +57 -0
- package/dist/sdk/cas/cas-audience-validator.d.ts.map +1 -0
- package/dist/sdk/cas/cas-audience-validator.js +1 -0
- package/dist/sdk/cas/cas-audience-validator.js.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -1
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
- package/dist/sdk/cas/cas-segment-yaml.d.ts +30 -2
- package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js.map +1 -1
- package/dist/sdk/cas/index.d.ts +21 -0
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.d.ts +131 -0
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js.map +1 -1
- package/dist/sdk/cas/types.d.ts +33 -4
- package/dist/sdk/cas/types.d.ts.map +1 -1
- package/dist/sdk/cas/validate-files.d.ts +64 -0
- package/dist/sdk/cas/validate-files.d.ts.map +1 -0
- package/dist/sdk/cas/validate-files.js +1 -0
- package/dist/sdk/cas/validate-files.js.map +1 -0
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.d.ts +11 -1
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.d.ts +5 -1
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/oauth-refresh.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.d.ts +20 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.d.ts +16 -7
- package/dist/sdk/segment/resolution-context.d.ts.map +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/resolution-context.js.map +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cas.d.ts +99 -26
- package/dist/sdk/types/cas.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.d.ts +29 -0
- package/dist/utils/proxy-fetch.d.ts.map +1 -0
- package/dist/utils/proxy-fetch.js +1 -0
- package/dist/utils/proxy-fetch.js.map +1 -0
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x154263,_0x463f0a){const _0x30e6ab=a150_0x5562,_0x5b2d0b=_0x154263();while(!![]){try{const _0x108836=-parseInt(_0x30e6ab(0x13e))/0x1*(parseInt(_0x30e6ab(0x126))/0x2)+parseInt(_0x30e6ab(0x177))/0x3*(-parseInt(_0x30e6ab(0x171))/0x4)+parseInt(_0x30e6ab(0x111))/0x5+parseInt(_0x30e6ab(0x181))/0x6+-parseInt(_0x30e6ab(0x123))/0x7*(-parseInt(_0x30e6ab(0x125))/0x8)+-parseInt(_0x30e6ab(0x1a6))/0x9+parseInt(_0x30e6ab(0x13d))/0xa;if(_0x108836===_0x463f0a)break;else _0x5b2d0b['push'](_0x5b2d0b['shift']());}catch(_0x48976e){_0x5b2d0b['push'](_0x5b2d0b['shift']());}}}(a150_0x4d62,0x90cf1));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x43cddd,_0x1adf06,_0x40a2de,_0x5216d6,_0x3593a7,_0x5c2d89){const _0x4c2f63=a150_0x5562;return{'level':_0x43cddd,'path':_0x1adf06,'code':_0x40a2de,'message':_0x5216d6,'location':getLocationFromPath(_0x3593a7[_0x4c2f63(0x16c)],_0x3593a7[_0x4c2f63(0x142)],pathToArray(_0x5c2d89??_0x1adf06))};}function validateVersionStructure(_0x23a0af,_0x55fe8c){const _0x4efa72=a150_0x5562,_0x46eaac=[];return _0x23a0af[_0x4efa72(0x12e)]>MAX_STAGES&&_0x46eaac[_0x4efa72(0x180)](createIssue(_0x4efa72(0x11c),_0x4efa72(0x1a1),_0x4efa72(0x10d),'Journey\x20has\x20'+_0x23a0af['length']+_0x4efa72(0x174)+MAX_STAGES,_0x55fe8c)),_0x46eaac;}function validateStageStructure(_0x284a9a,_0x2099cd,_0x1fb398,_0x16c67a){const _0x3176c1=a150_0x5562,_0xdbf597=[],_0x372b2a=_0x3176c1(0x105)+_0x2099cd+']';_0x2099cd===0x0&&!_0x284a9a[_0x3176c1(0x15f)]&&_0xdbf597[_0x3176c1(0x180)](createIssue('error',_0x372b2a+_0x3176c1(0x122),_0x3176c1(0x141),_0x3176c1(0x191)+_0x284a9a[_0x3176c1(0x179)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x16c67a,_0x372b2a));const _0xba803=_0x2099cd===_0x1fb398-0x1;!_0xba803&&!_0x284a9a[_0x3176c1(0x18f)]&&_0xdbf597[_0x3176c1(0x180)](createIssue(_0x3176c1(0x11c),_0x372b2a+_0x3176c1(0x16d),_0x3176c1(0x152),_0x3176c1(0x191)+_0x284a9a[_0x3176c1(0x179)]+_0x3176c1(0x1af),_0x16c67a,_0x372b2a));(!_0x284a9a[_0x3176c1(0x169)]||_0x284a9a[_0x3176c1(0x169)][_0x3176c1(0x12e)]===0x0)&&_0xdbf597['push'](createIssue(_0x3176c1(0x128),_0x372b2a+_0x3176c1(0x145),_0x3176c1(0x119),'Stage\x20\x27'+_0x284a9a[_0x3176c1(0x179)]+_0x3176c1(0xfa),_0x16c67a,_0x372b2a));const _0x1f4aba=_0x284a9a[_0x3176c1(0x18a)]?.[_0x3176c1(0x12e)]??0x0;if(_0x1f4aba===0x0)_0xdbf597[_0x3176c1(0x180)](createIssue(_0x3176c1(0x11c),_0x372b2a+_0x3176c1(0x11e),_0x3176c1(0x185),_0x3176c1(0x191)+_0x284a9a[_0x3176c1(0x179)]+_0x3176c1(0x140),_0x16c67a,_0x372b2a+_0x3176c1(0x11e)));else{if(_0x1f4aba===0x1)_0xdbf597[_0x3176c1(0x180)](createIssue(_0x3176c1(0x128),_0x372b2a+_0x3176c1(0x11e),_0x3176c1(0x185),_0x3176c1(0x191)+_0x284a9a[_0x3176c1(0x179)]+_0x3176c1(0x151),_0x16c67a,_0x372b2a+_0x3176c1(0x11e)));else _0x1f4aba<=0x3&&_0xdbf597[_0x3176c1(0x180)](createIssue(_0x3176c1(0x128),_0x372b2a+_0x3176c1(0x11e),'FEW_STEPS',_0x3176c1(0x191)+_0x284a9a[_0x3176c1(0x179)]+_0x3176c1(0x1ac)+_0x1f4aba+_0x3176c1(0x106),_0x16c67a,_0x372b2a+_0x3176c1(0x11e)));}return _0xdbf597;}function validateStep(_0xdf51ca,_0x29b9c3,_0x300f13,_0x1c6e8f){const _0x1f31c9=a150_0x5562,_0x2d2b64=[];if(_0xdf51ca['type']===_0x1f31c9(0x161))return _0xdf51ca[_0x1f31c9(0x134)]&&_0x2d2b64['push'](createIssue(_0x1f31c9(0x11c),_0x29b9c3+_0x1f31c9(0x127),_0x1f31c9(0x198),_0x1f31c9(0x132)+_0xdf51ca['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x300f13)),_0x1f31c9(0x116)in _0xdf51ca&&_0xdf51ca[_0x1f31c9(0x116)]!==undefined&&_0x2d2b64[_0x1f31c9(0x180)](createIssue(_0x1f31c9(0x11c),_0x29b9c3+_0x1f31c9(0x1aa),_0x1f31c9(0x198),'End\x20step\x20\x27'+_0xdf51ca[_0x1f31c9(0x179)]+_0x1f31c9(0x10b),_0x300f13)),_0x2d2b64;_0xdf51ca[_0x1f31c9(0x134)]&&(_0x300f13[_0x1f31c9(0x153)]&&!_0x300f13[_0x1f31c9(0x153)][_0x1f31c9(0xfe)](_0xdf51ca[_0x1f31c9(0x134)])&&_0x2d2b64['push'](createIssue(_0x1f31c9(0x11c),_0x29b9c3+'.next','INVALID_NEXT_REFERENCE',_0x1f31c9(0x192)+_0xdf51ca[_0x1f31c9(0x134)]+'\x27',_0x300f13)));switch(_0xdf51ca[_0x1f31c9(0x15d)]){case _0x1f31c9(0x1ae):_0x2d2b64[_0x1f31c9(0x180)](...validateWaitStep(_0xdf51ca,_0x29b9c3,_0x300f13,_0x1c6e8f));break;case _0x1f31c9(0x14b):_0x2d2b64[_0x1f31c9(0x180)](...validateActivationStep(_0xdf51ca,_0x29b9c3,_0x300f13));break;case _0x1f31c9(0x184):_0x2d2b64['push'](...validateDecisionPointStep(_0xdf51ca,_0x29b9c3,_0x300f13,_0x1c6e8f));break;case _0x1f31c9(0xf9):_0x2d2b64[_0x1f31c9(0x180)](...validateAbTestStep(_0xdf51ca,_0x29b9c3,_0x300f13,_0x1c6e8f));break;case'jump':_0x2d2b64['push'](...validateJumpStep(_0xdf51ca,_0x29b9c3,_0x300f13));break;}return _0x2d2b64;}function a150_0x5562(_0x6329b8,_0x4c4dad){_0x6329b8=_0x6329b8-0xf9;const _0x4d62d1=a150_0x4d62();let _0x556201=_0x4d62d1[_0x6329b8];return _0x556201;}function validateWaitStep(_0x3f3188,_0x42d4b1,_0x27c7cd,_0x5aa219){const _0x46bb52=a150_0x5562,_0xdba84d=[];if(!_0x3f3188[_0x46bb52(0x116)])return _0xdba84d[_0x46bb52(0x180)](createIssue(_0x46bb52(0x11c),_0x42d4b1+_0x46bb52(0x1aa),'MISSING_WAIT_PARAMS',_0x46bb52(0x167),_0x27c7cd,_0x42d4b1)),_0xdba84d;if(_0x3f3188[_0x46bb52(0x116)][_0x46bb52(0x131)]){const _0x5deab5=_0x3f3188[_0x46bb52(0x116)]['condition'];if(_0x5deab5[_0x46bb52(0x189)]){_0x27c7cd[_0x46bb52(0x15b)]?.['add'](_0x5deab5[_0x46bb52(0x189)]);!_0x5deab5['segment']['startsWith'](_0x46bb52(0x13a))&&(_0x27c7cd[_0x46bb52(0x183)]&&!_0x27c7cd['embeddedSegments']['has'](_0x5deab5['segment'])&&_0xdba84d[_0x46bb52(0x180)](createIssue(_0x46bb52(0x11c),_0x42d4b1+'.with.condition.segment',_0x46bb52(0x12d),_0x46bb52(0x15e)+_0x5deab5[_0x46bb52(0x189)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x27c7cd)));_0x5deab5[_0x46bb52(0x134)]&&_0x27c7cd[_0x46bb52(0x153)]&&!_0x27c7cd[_0x46bb52(0x153)][_0x46bb52(0xfe)](_0x5deab5[_0x46bb52(0x134)])&&_0xdba84d[_0x46bb52(0x180)](createIssue('error',_0x42d4b1+'.with.condition.next','INVALID_NEXT_REFERENCE',_0x46bb52(0x16a)+_0x5deab5[_0x46bb52(0x134)]+'\x27',_0x27c7cd));_0x5deab5[_0x46bb52(0x14f)]?.[_0x46bb52(0x134)]&&_0x27c7cd[_0x46bb52(0x153)]&&!_0x27c7cd[_0x46bb52(0x153)][_0x46bb52(0xfe)](_0x5deab5[_0x46bb52(0x14f)][_0x46bb52(0x134)])&&_0xdba84d[_0x46bb52(0x180)](createIssue(_0x46bb52(0x11c),_0x42d4b1+'.with.condition.timeout.next',_0x46bb52(0x1b0),_0x46bb52(0x12a)+_0x5deab5[_0x46bb52(0x14f)]['next']+'\x27',_0x27c7cd));const _0x1796e2=_0x5deab5[_0x46bb52(0x134)]||_0x3f3188[_0x46bb52(0x134)],_0x214a04=_0x5deab5[_0x46bb52(0x14f)]?.[_0x46bb52(0x134)]||_0x3f3188['next'];if(_0x1796e2){const _0x1bcc19=_0x5aa219[_0x46bb52(0x117)](_0x1796e2);_0x1bcc19?.[_0x46bb52(0x15d)]===_0x46bb52(0x197)&&_0xdba84d['push'](createIssue(_0x46bb52(0x128),_0x42d4b1+'.with.condition.next',_0x46bb52(0x173),_0x46bb52(0x16f)+_0x1796e2+_0x46bb52(0xfc),_0x27c7cd,_0x42d4b1+'.with.condition'));}if(_0x214a04){const _0x201e09=_0x5aa219[_0x46bb52(0x117)](_0x214a04);_0x201e09?.[_0x46bb52(0x15d)]==='merge'&&_0xdba84d[_0x46bb52(0x180)](createIssue(_0x46bb52(0x128),_0x42d4b1+_0x46bb52(0x109),'BRANCH_DIRECTLY_TO_MERGE',_0x46bb52(0x170)+_0x214a04+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x27c7cd,_0x42d4b1+_0x46bb52(0x17d)));}}}return _0xdba84d;}function validateActivationStep(_0x3c146d,_0xafe22e,_0x427c58){const _0xd0afd2=a150_0x5562,_0x447af1=[];if(!_0x3c146d[_0xd0afd2(0x116)]?.[_0xd0afd2(0x14b)])return _0x447af1[_0xd0afd2(0x180)](createIssue(_0xd0afd2(0x11c),_0xafe22e+_0xd0afd2(0x159),_0xd0afd2(0x133),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x427c58,_0xafe22e)),_0x447af1;const _0x2c5816=_0x3c146d[_0xd0afd2(0x116)][_0xd0afd2(0x14b)];return _0x427c58['activationKeys']&&!_0x2c5816['startsWith'](_0xd0afd2(0x13a))&&(!_0x427c58[_0xd0afd2(0x13f)]['has'](_0x2c5816)&&_0x447af1['push'](createIssue(_0xd0afd2(0x11c),_0xafe22e+_0xd0afd2(0x159),'MISSING_ACTIVATION_DEFINITION',_0xd0afd2(0x160)+_0x2c5816+_0xd0afd2(0x147),_0x427c58))),_0x447af1;}function validateDecisionPointStep(_0x466852,_0x48d65d,_0x3955a2,_0x4a1637){const _0x3d6567=a150_0x5562,_0x4ea64b=[];if(!_0x466852['with']?.[_0x3d6567(0x10a)]||_0x466852[_0x3d6567(0x116)][_0x3d6567(0x10a)][_0x3d6567(0x12e)]===0x0)return _0x4ea64b[_0x3d6567(0x180)](createIssue(_0x3d6567(0x11c),_0x48d65d+_0x3d6567(0x148),_0x3d6567(0x108),_0x3d6567(0x1a4),_0x3955a2,_0x48d65d)),_0x4ea64b;for(let _0x9a2465=0x0;_0x9a2465<_0x466852[_0x3d6567(0x116)][_0x3d6567(0x10a)][_0x3d6567(0x12e)];_0x9a2465++){const _0x4c0407=_0x466852[_0x3d6567(0x116)]['branches'][_0x9a2465],_0x494cba=_0x48d65d+_0x3d6567(0x176)+_0x9a2465+']';_0x4c0407['segment']&&!_0x4c0407[_0x3d6567(0x18b)]&&(_0x3955a2[_0x3d6567(0x15b)]?.[_0x3d6567(0x136)](_0x4c0407[_0x3d6567(0x189)]),!_0x4c0407[_0x3d6567(0x189)]['startsWith']('ref:')&&(_0x3955a2[_0x3d6567(0x183)]&&!_0x3955a2[_0x3d6567(0x183)][_0x3d6567(0xfe)](_0x4c0407['segment'])&&_0x4ea64b[_0x3d6567(0x180)](createIssue(_0x3d6567(0x11c),_0x494cba+_0x3d6567(0x1ab),'MISSING_SEGMENT_REFERENCE',_0x3d6567(0xfd)+_0x4c0407[_0x3d6567(0x189)]+'\x27',_0x3955a2))));_0x4c0407[_0x3d6567(0x134)]&&_0x3955a2[_0x3d6567(0x153)]&&!_0x3955a2[_0x3d6567(0x153)][_0x3d6567(0xfe)](_0x4c0407['next'])&&_0x4ea64b[_0x3d6567(0x180)](createIssue(_0x3d6567(0x11c),_0x494cba+_0x3d6567(0x127),_0x3d6567(0x1b0),_0x3d6567(0x162)+_0x4c0407[_0x3d6567(0x134)]+'\x27',_0x3955a2));if(_0x4c0407[_0x3d6567(0x134)]){const _0x1ae0a6=_0x4a1637[_0x3d6567(0x117)](_0x4c0407[_0x3d6567(0x134)]);_0x1ae0a6?.[_0x3d6567(0x15d)]===_0x3d6567(0x197)&&_0x4ea64b['push'](createIssue(_0x3d6567(0x128),_0x494cba+_0x3d6567(0x127),'BRANCH_DIRECTLY_TO_MERGE',_0x3d6567(0x11d)+_0x4c0407['name']+_0x3d6567(0x149)+_0x4c0407['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x3955a2));}}return _0x4ea64b;}function validateAbTestStep(_0x16d07e,_0x37a706,_0x213073,_0x5824e4){const _0x5a2dd7=a150_0x5562,_0xaa05cf=[];if(!_0x16d07e[_0x5a2dd7(0x116)]?.['variants']||_0x16d07e[_0x5a2dd7(0x116)][_0x5a2dd7(0x138)][_0x5a2dd7(0x12e)]===0x0)return _0xaa05cf['push'](createIssue(_0x5a2dd7(0x11c),_0x37a706+'.with.variants',_0x5a2dd7(0x108),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x213073,_0x37a706)),_0xaa05cf;const _0x1269aa=_0x16d07e[_0x5a2dd7(0x116)][_0x5a2dd7(0x138)][_0x5a2dd7(0x186)]((_0x1b7a29,_0x5d4695)=>_0x1b7a29+(_0x5d4695[_0x5a2dd7(0x100)]||0x0),0x0);Math[_0x5a2dd7(0x118)](_0x1269aa-0x64)>0.01&&_0xaa05cf[_0x5a2dd7(0x180)](createIssue(_0x5a2dd7(0x11c),_0x37a706+_0x5a2dd7(0x146),'INVALID_AB_TEST_PERCENTAGES',_0x5a2dd7(0x1a0)+_0x1269aa+'%)',_0x213073));for(let _0x326f06=0x0;_0x326f06<_0x16d07e[_0x5a2dd7(0x116)][_0x5a2dd7(0x138)][_0x5a2dd7(0x12e)];_0x326f06++){const _0x28a8d4=_0x16d07e[_0x5a2dd7(0x116)][_0x5a2dd7(0x138)][_0x326f06],_0x713660=_0x37a706+_0x5a2dd7(0x1a5)+_0x326f06+']';_0x28a8d4[_0x5a2dd7(0x134)]&&_0x213073[_0x5a2dd7(0x153)]&&!_0x213073['stepNames'][_0x5a2dd7(0xfe)](_0x28a8d4[_0x5a2dd7(0x134)])&&_0xaa05cf[_0x5a2dd7(0x180)](createIssue(_0x5a2dd7(0x11c),_0x713660+_0x5a2dd7(0x127),_0x5a2dd7(0x1b0),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x28a8d4[_0x5a2dd7(0x134)]+'\x27',_0x213073));if(_0x28a8d4[_0x5a2dd7(0x134)]){const _0xc8d2b3=_0x5824e4[_0x5a2dd7(0x117)](_0x28a8d4[_0x5a2dd7(0x134)]);_0xc8d2b3?.[_0x5a2dd7(0x15d)]===_0x5a2dd7(0x197)&&_0xaa05cf[_0x5a2dd7(0x180)](createIssue(_0x5a2dd7(0x128),_0x713660+_0x5a2dd7(0x127),_0x5a2dd7(0x173),_0x5a2dd7(0x17f)+_0x28a8d4[_0x5a2dd7(0x179)]+_0x5a2dd7(0x149)+_0x28a8d4[_0x5a2dd7(0x134)]+_0x5a2dd7(0x130),_0x213073));}}return _0xaa05cf;}function validateJumpStep(_0x43b6a8,_0x880e85,_0x304415){const _0x2a2d91=a150_0x5562,_0x5433ee=[];if(!_0x43b6a8[_0x2a2d91(0x116)]?.[_0x2a2d91(0x158)])return _0x5433ee[_0x2a2d91(0x180)](createIssue(_0x2a2d91(0x11c),_0x880e85+'.with.target',_0x2a2d91(0x102),_0x2a2d91(0x164),_0x304415,_0x880e85)),_0x5433ee;return(!_0x43b6a8['with'][_0x2a2d91(0x158)]['journey']||!_0x43b6a8['with']['target'][_0x2a2d91(0x19c)])&&_0x5433ee[_0x2a2d91(0x180)](createIssue('error',_0x880e85+'.with.target',_0x2a2d91(0x102),_0x2a2d91(0x172),_0x304415)),_0x5433ee;}function buildConvergenceMap(_0x5627ea){const _0x24217e=a150_0x5562,_0x3f5926=new Map();function _0x42f172(_0x1e71e8,_0x290c6c){const _0x4dc44c=a150_0x5562,_0x4f8505=_0x3f5926[_0x4dc44c(0x117)](_0x1e71e8)||[];_0x4f8505[_0x4dc44c(0x180)](_0x290c6c),_0x3f5926[_0x4dc44c(0x14e)](_0x1e71e8,_0x4f8505);}for(const _0x502981 of _0x5627ea){_0x502981[_0x24217e(0x134)]&&_0x42f172(_0x502981['next'],{'stepName':_0x502981[_0x24217e(0x179)],'description':_0x24217e(0x15c)+_0x502981[_0x24217e(0x179)]+'\x27'});if(_0x502981[_0x24217e(0x15d)]===_0x24217e(0x184)&&_0x502981[_0x24217e(0x116)]?.[_0x24217e(0x10a)])for(const _0x1a69cc of _0x502981['with'][_0x24217e(0x10a)]){_0x1a69cc[_0x24217e(0x134)]&&_0x42f172(_0x1a69cc['next'],{'stepName':_0x502981[_0x24217e(0x179)],'description':_0x24217e(0x163)+_0x1a69cc['name']+'\x27\x20of\x20\x27'+_0x502981['name']+'\x27'});}if(_0x502981['type']==='ab_test'&&_0x502981[_0x24217e(0x116)]?.[_0x24217e(0x138)])for(const _0x79a62f of _0x502981[_0x24217e(0x116)][_0x24217e(0x138)]){_0x79a62f[_0x24217e(0x134)]&&_0x42f172(_0x79a62f['next'],{'stepName':_0x502981['name'],'description':'variant\x20\x27'+_0x79a62f[_0x24217e(0x179)]+_0x24217e(0x12f)+_0x502981['name']+'\x27'});}_0x502981[_0x24217e(0x15d)]===_0x24217e(0x1ae)&&_0x502981[_0x24217e(0x116)]?.[_0x24217e(0x131)]&&(_0x502981['with'][_0x24217e(0x131)]['next']&&_0x42f172(_0x502981[_0x24217e(0x116)][_0x24217e(0x131)]['next'],{'stepName':_0x502981[_0x24217e(0x179)],'description':_0x24217e(0x190)+_0x502981[_0x24217e(0x179)]+'\x27'}),_0x502981[_0x24217e(0x116)][_0x24217e(0x131)][_0x24217e(0x14f)]?.[_0x24217e(0x134)]&&_0x42f172(_0x502981[_0x24217e(0x116)][_0x24217e(0x131)][_0x24217e(0x14f)]['next'],{'stepName':_0x502981[_0x24217e(0x179)],'description':'timeout\x20of\x20\x27'+_0x502981[_0x24217e(0x179)]+'\x27'}));}return _0x3f5926;}function a150_0x4d62(){const _0x543957=['\x20with\x20latest:\x20true','UNUSED_EMBEDDED_SEGMENT','.exit_criteria','.with.variants','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.with.branches','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','match','activation','splice','Journey\x20can\x20have\x20at\x20most\x20one\x20','set','timeout','SINGLE_INPUT_MERGE','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','MISSING_MILESTONE','stepNames','.rule','data','\x20(across\x20','size','target','.with.activation','replace','referencedSegments','step\x20\x27','type','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','entry_criteria','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','end','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','branch\x20\x27','Jump\x20step\x20requires\x20a\x20target','some','goal','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','journeys','exit_criteria','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','safeParse','document','.milestone','indices','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','4cTODsL','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','BRANCH_DIRECTLY_TO_MERGE','\x20stages\x20but\x20maximum\x20is\x20','Criteria\x20references\x20undefined\x20segment\x20\x27','.with.branches[','2111700koTKeO','rule','name','CONVERGENCE_WITHOUT_MERGE','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','endsWith','.with.condition.timeout','Duplicate\x20step\x20name\x20\x27','A/B\x20test\x20variant\x20\x27','push','5783196qZDQEz','latest','embeddedSegments','decision_point','INSUFFICIENT_STEPS','reduce','path','code','segment','steps','excluded','entries','state','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','milestone','condition\x20of\x20\x27','Stage\x20\x27','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20(from:\x20','symbol','skipSchema','Journey\x20name\x20is\x20required','merge','END_STEP_HAS_NEXT_OR_WITH','launched',').\x20Merge\x20is\x20unnecessary.','MISSING_NAME','stage','MISSING_STAGES','description','values','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','stages','map','issues','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.with.variants[','6226497WHjxZS','Embedded\x20segment\x20\x27',').\x20Use\x20a\x20merge\x20step.','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','.with','.segment','\x27\x20has\x20only\x20','trim','wait','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','INVALID_NEXT_REFERENCE','ab_test','\x27\x20has\x20no\x20exit_criteria\x20defined','success','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','has','Journey\x20has\x20no\x20goal\x20defined','percentage','versions','INVALID_JUMP_TARGET','ACTIVATION_SCHEMA_ERROR','MISSING_END_STEP','stages[','\x20steps\x20(may\x20be\x20too\x20simple)','segments','MISSING_CONDITIONS','.with.condition.timeout.next','branches','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','activations','TOO_MANY_STAGES','keys','journeys[','filter','2347585icCrQc','message','includes','level','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','with','get','abs','MISSING_EXIT_CRITERIA','MERGE_TO_MERGE_CHAIN','JOURNEY_SCHEMA_ERROR','error','Decision\x20branch\x20\x27','.steps','goalIsInherited','MISSING_GOAL','excluded_','.entry_criteria','1105048yqGyym','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','40Pqfpbv','3314OjagDL','.next','warning','DUPLICATE_LATEST','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','version','journeys,\x20stages,\x20or\x20versions','MISSING_SEGMENT_REFERENCE','length','\x27\x20of\x20\x27','\x27\x20with\x20no\x20action\x20in\x20between','condition','End\x20step\x20\x27','MISSING_ACTIVATION_REF','next','Merge\x20step\x20\x27','add','startsWith','variants','join','ref:','segments.','.type','1356780jTtipH','223cGglWL','activationKeys','\x27\x20has\x20no\x20steps','MISSING_ENTRY_CRITERIA','source'];a150_0x4d62=function(){return _0x543957;};return a150_0x4d62();}function validateFlowControl(_0x36baf5,_0x5c3961,_0x8664f8){const _0x2585ae=a150_0x5562,_0x2f7ba1=[],_0x977e31=_0x2585ae(0x105)+_0x5c3961+']',_0x3d3068=_0x36baf5['steps']||[];if(_0x3d3068[_0x2585ae(0x12e)]===0x0)return _0x2f7ba1;const _0x28e825=new Map();for(const _0x1b1b70 of _0x3d3068){_0x1b1b70[_0x2585ae(0x179)]&&_0x28e825[_0x2585ae(0x14e)](_0x1b1b70[_0x2585ae(0x179)],_0x1b1b70);}const _0x447899=buildConvergenceMap(_0x3d3068),_0x56c236=_0x3d3068[_0x2585ae(0x165)](_0x905e87=>_0x905e87[_0x2585ae(0x15d)]===_0x2585ae(0x161));!_0x56c236&&_0x2f7ba1[_0x2585ae(0x180)](createIssue('error',_0x977e31+_0x2585ae(0x11e),_0x2585ae(0x104),_0x2585ae(0x191)+_0x36baf5[_0x2585ae(0x179)]+'\x27\x20has\x20no\x20end\x20step',_0x8664f8));for(const [_0x59c151,_0x50c315]of _0x447899){const _0x1b78f2=_0x28e825[_0x2585ae(0x117)](_0x59c151);if(!_0x1b78f2)continue;if(_0x50c315[_0x2585ae(0x12e)]>0x1&&_0x1b78f2[_0x2585ae(0x15d)]!==_0x2585ae(0x197)){const _0x57cc7b=_0x50c315[_0x2585ae(0x1a2)](_0xf55376=>_0xf55376[_0x2585ae(0x19e)])[_0x2585ae(0x139)](',\x20');_0x2f7ba1['push'](createIssue(_0x2585ae(0x11c),_0x977e31+_0x2585ae(0x11e),_0x2585ae(0x17a),_0x2585ae(0x18e)+_0x59c151+_0x2585ae(0x193)+_0x57cc7b+_0x2585ae(0x1a8),_0x8664f8));}_0x50c315[_0x2585ae(0x12e)]===0x1&&_0x1b78f2[_0x2585ae(0x15d)]==='merge'&&_0x2f7ba1[_0x2585ae(0x180)](createIssue('warning',_0x977e31+'.steps',_0x2585ae(0x150),'Merge\x20step\x20\x27'+_0x59c151+_0x2585ae(0x17b)+_0x50c315[0x0][_0x2585ae(0x19e)]+_0x2585ae(0x19a),_0x8664f8));}for(const _0x68bc75 of _0x3d3068){if(_0x68bc75[_0x2585ae(0x15d)]===_0x2585ae(0x197)&&_0x68bc75[_0x2585ae(0x134)]){const _0x1d3ede=_0x28e825[_0x2585ae(0x117)](_0x68bc75['next']);_0x1d3ede?.[_0x2585ae(0x15d)]==='merge'&&_0x2f7ba1[_0x2585ae(0x180)](createIssue('error',_0x977e31+_0x2585ae(0x11e),_0x2585ae(0x11a),_0x2585ae(0x135)+_0x68bc75[_0x2585ae(0x179)]+_0x2585ae(0x1a9)+_0x68bc75[_0x2585ae(0x134)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x8664f8));}}return _0x2f7ba1;}function validateCriteria(_0x5eb22b,_0x29883f,_0x3f5dcb){const _0x524f0f=a150_0x5562,_0x13e7cb=[];return _0x5eb22b['segment']&&(_0x3f5dcb[_0x524f0f(0x15b)]?.['add'](_0x5eb22b['segment']),!_0x5eb22b[_0x524f0f(0x189)][_0x524f0f(0x137)]('ref:')&&(_0x3f5dcb['embeddedSegments']&&!_0x3f5dcb[_0x524f0f(0x183)][_0x524f0f(0xfe)](_0x5eb22b[_0x524f0f(0x189)])&&_0x13e7cb[_0x524f0f(0x180)](createIssue(_0x524f0f(0x11c),_0x29883f+_0x524f0f(0x1ab),_0x524f0f(0x12d),_0x524f0f(0x175)+_0x5eb22b['segment']+'\x27',_0x3f5dcb)))),_0x13e7cb;}function validateEmbeddedSegment(_0x405c91,_0x2c6ff7,_0x4a26e6){const _0x2fd400=a150_0x5562,_0x53e2ef=[];return _0x405c91['rule']&&_0x53e2ef['push'](...validateRuleDef(_0x405c91[_0x2fd400(0x178)],_0x2c6ff7+_0x2fd400(0x154),_0x4a26e6)),_0x53e2ef;}function validateStage(_0x3cc63a,_0x5d0aa4,_0x3e9e40,_0x39cfa7){const _0x2f2359=a150_0x5562,_0x55bf81=[],_0x619fbf=_0x2f2359(0x105)+_0x5d0aa4+']',_0x271bc1=new Map(),_0x293dd0=new Map();if(_0x3cc63a[_0x2f2359(0x18a)]){for(let _0x50cc7f=0x0;_0x50cc7f<_0x3cc63a[_0x2f2359(0x18a)]['length'];_0x50cc7f++){const _0x460ce7=_0x3cc63a[_0x2f2359(0x18a)][_0x50cc7f];_0x460ce7[_0x2f2359(0x179)]&&_0x271bc1[_0x2f2359(0x14e)](_0x460ce7[_0x2f2359(0x179)],_0x460ce7);}for(let _0x5528c0=0x0;_0x5528c0<_0x3cc63a[_0x2f2359(0x18a)][_0x2f2359(0x12e)];_0x5528c0++){const _0x4f6a78=_0x3cc63a[_0x2f2359(0x18a)][_0x5528c0],_0x3b1a2d=_0x619fbf+'.steps['+_0x5528c0+']';if(_0x4f6a78['name']){if(_0x293dd0['has'](_0x4f6a78[_0x2f2359(0x179)])){const _0x8f4561=_0x293dd0[_0x2f2359(0x117)](_0x4f6a78['name']);_0x55bf81['push'](createIssue(_0x2f2359(0x11c),_0x3b1a2d+'.name','DUPLICATE_STEP_NAME',_0x2f2359(0x17e)+_0x4f6a78[_0x2f2359(0x179)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x8f4561+'])',_0x39cfa7));}else _0x293dd0[_0x2f2359(0x14e)](_0x4f6a78[_0x2f2359(0x179)],_0x5528c0);}_0x55bf81['push'](...validateStep(_0x4f6a78,_0x3b1a2d,_0x39cfa7,_0x271bc1));}}_0x3cc63a['entry_criteria']&&_0x55bf81[_0x2f2359(0x180)](...validateCriteria(_0x3cc63a['entry_criteria'],_0x619fbf+_0x2f2359(0x122),_0x39cfa7));if(_0x3cc63a['exit_criteria'])for(let _0x3de522=0x0;_0x3de522<_0x3cc63a[_0x2f2359(0x169)][_0x2f2359(0x12e)];_0x3de522++){_0x55bf81[_0x2f2359(0x180)](...validateCriteria(_0x3cc63a[_0x2f2359(0x169)][_0x3de522],_0x619fbf+'.exit_criteria['+_0x3de522+']',_0x39cfa7));}return _0x3cc63a[_0x2f2359(0x18f)]&&_0x55bf81[_0x2f2359(0x180)](...validateCriteria(_0x3cc63a[_0x2f2359(0x18f)],_0x619fbf+_0x2f2359(0x16d),_0x39cfa7)),_0x55bf81[_0x2f2359(0x180)](...validateStageStructure(_0x3cc63a,_0x5d0aa4,_0x3e9e40,_0x39cfa7)),_0x55bf81[_0x2f2359(0x180)](...validateFlowControl(_0x3cc63a,_0x5d0aa4,_0x39cfa7)),_0x55bf81;}function validateStagesForVersion(_0x2aa1af,_0x43627f,_0x53b3ee,_0x35d43e,_0x14662c,_0x561527,_0x1fda5d){const _0x473694=a150_0x5562;if(_0x2aa1af[_0x473694(0x12e)]===0x0){_0x14662c[_0x473694(0x180)]({'level':_0x473694(0x11c),'path':_0x35d43e+_0x473694(0x1a1),'code':'MISSING_STAGES','message':_0x473694(0x124),'location':getLocationFromPath(_0x53b3ee['document'],_0x53b3ee[_0x473694(0x142)],[_0x473694(0x1a1)])});return;}const _0x5c55c9=new Set();for(const _0x38940f of _0x2aa1af){if(_0x38940f[_0x473694(0x18a)])for(const _0x2fc1d8 of _0x38940f[_0x473694(0x18a)]){_0x2fc1d8[_0x473694(0x179)]&&_0x5c55c9['add'](_0x2fc1d8[_0x473694(0x179)]);}}const _0x59921f={..._0x53b3ee,'stepNames':_0x5c55c9},_0x27862f=validateVersionStructure(_0x2aa1af,_0x59921f);for(const _0x3f2d0d of _0x27862f){const _0x2a6573=_0x35d43e?{..._0x3f2d0d,'path':''+_0x35d43e+_0x3f2d0d[_0x473694(0x187)]}:_0x3f2d0d;if(_0x2a6573[_0x473694(0x114)]===_0x473694(0x11c))_0x14662c[_0x473694(0x180)](_0x2a6573);else _0x561527[_0x473694(0x180)](_0x2a6573);}for(let _0x57ac38=0x0;_0x57ac38<_0x2aa1af[_0x473694(0x12e)];_0x57ac38++){const _0x103108=validateStage(_0x2aa1af[_0x57ac38],_0x57ac38,_0x2aa1af[_0x473694(0x12e)],_0x59921f);for(const _0x5db9e9 of _0x103108){const _0x5e2efd=_0x35d43e?{..._0x5db9e9,'path':''+_0x35d43e+_0x5db9e9['path']}:_0x5db9e9;if(_0x5e2efd[_0x473694(0x114)]===_0x473694(0x11c))_0x14662c[_0x473694(0x180)](_0x5e2efd);else _0x561527[_0x473694(0x180)](_0x5e2efd);}}if(_0x43627f['goal']){const _0xca0143=_0x1fda5d?.[_0x473694(0x11f)]?_0x473694(0x166):_0x35d43e+_0x473694(0x166),_0x31bb0a=validateCriteria(_0x43627f[_0x473694(0x166)],_0xca0143,_0x59921f);for(const _0x290634 of _0x31bb0a){if(_0x290634[_0x473694(0x114)]===_0x473694(0x11c))_0x14662c[_0x473694(0x180)](_0x290634);else _0x561527[_0x473694(0x180)](_0x290634);}}}function extractVersionIndex(_0x349aa2){const _0x4bc23=a150_0x5562,_0x1a381b=_0x349aa2[_0x4bc23(0x14a)](/^journeys\[(\d+)\]\./);return _0x1a381b?_0x1a381b[0x1]:undefined;}function deduplicateAcrossVersions(_0x40dea0){const _0x53e17a=a150_0x5562,_0x1b5172=new Map();for(let _0x12e7e9=0x0;_0x12e7e9<_0x40dea0[_0x53e17a(0x12e)];_0x12e7e9++){const _0x58a5ba=_0x40dea0[_0x12e7e9][_0x53e17a(0x188)]+':'+_0x40dea0[_0x12e7e9][_0x53e17a(0x112)],_0x4c2302=extractVersionIndex(_0x40dea0[_0x12e7e9][_0x53e17a(0x187)]),_0x2a39d1=_0x1b5172[_0x53e17a(0x117)](_0x58a5ba);if(_0x2a39d1){_0x2a39d1[_0x53e17a(0x16e)][_0x53e17a(0x180)](_0x12e7e9);if(_0x4c2302)_0x2a39d1['versions']['add'](_0x4c2302);}else _0x1b5172[_0x53e17a(0x14e)](_0x58a5ba,{'indices':[_0x12e7e9],'versions':new Set(_0x4c2302?[_0x4c2302]:[])});}const _0x8ae110=new Set();for(const {indices:_0x3d5e08,versions:_0x2df7c8}of _0x1b5172[_0x53e17a(0x19f)]()){if(_0x2df7c8[_0x53e17a(0x157)]<=0x1)continue;const _0x15ab39=_0x40dea0[_0x3d5e08[0x0]];_0x15ab39['path']=_0x15ab39[_0x53e17a(0x187)][_0x53e17a(0x15a)](/^journeys\[\d+\]\./,''),_0x15ab39[_0x53e17a(0x112)]=_0x15ab39[_0x53e17a(0x112)]+_0x53e17a(0x156)+_0x2df7c8['size']+'\x20versions)';for(let _0x402e25=0x1;_0x402e25<_0x3d5e08[_0x53e17a(0x12e)];_0x402e25++){_0x8ae110[_0x53e17a(0x136)](_0x3d5e08[_0x402e25]);}}const _0x15fafa=[..._0x8ae110]['sort']((_0x22273a,_0x498308)=>_0x498308-_0x22273a);for(const _0xc7f384 of _0x15fafa){_0x40dea0[_0x53e17a(0x14c)](_0xc7f384,0x1);}}export function validateJourneyDef(_0x161b69,_0x5e57e2={},_0x18680c={}){const _0xab25ee=a150_0x5562;if(_0x18680c[_0xab25ee(0x195)])return runJourneySemanticChecks(_0x161b69,_0x5e57e2);const _0x18652b=JourneyDefSchema[_0xab25ee(0x16b)](_0x161b69);if(_0x18652b[_0xab25ee(0xfb)])return runJourneySemanticChecks(_0x18652b[_0xab25ee(0x155)],_0x5e57e2);return zodErrorsToJourneyValidationResult(_0x18652b[_0xab25ee(0x11c)],_0x5e57e2);}function zodErrorsToJourneyValidationResult(_0x48db27,_0x3ae6cb){const _0xe2d7d4=a150_0x5562,_0x4b5b05=flattenZodIssues(_0x48db27[_0xe2d7d4(0x1a3)]),_0x3268b3=_0x4b5b05['map'](_0x79aa3a=>{const _0x50d9bc=_0xe2d7d4,_0x5b273c=formatZodPath(_0x79aa3a[_0x50d9bc(0x187)]),_0x47afe4=mapJourneyZodIssueToCode(_0x79aa3a,_0x5b273c),_0x1f7115=getLocationFromPath(_0x3ae6cb[_0x50d9bc(0x16c)],_0x3ae6cb[_0x50d9bc(0x142)],_0x79aa3a[_0x50d9bc(0x187)][_0x50d9bc(0x1a2)](_0xae24c6=>typeof _0xae24c6===_0x50d9bc(0x194)?String(_0xae24c6):_0xae24c6));return{'level':_0x50d9bc(0x11c),'path':_0x5b273c,'code':_0x47afe4,'message':_0x79aa3a['message'],..._0x1f7115&&{'location':_0x1f7115}};});return{'valid':![],'errors':_0x3268b3,'warnings':[]};}function mapJourneyZodIssueToCode(_0x583652,_0x29661e){const _0x490c6a=a150_0x5562;if(_0x29661e==='name')return'MISSING_NAME';if(_0x29661e['endsWith'](_0x490c6a(0x13c))&&_0x29661e[_0x490c6a(0x113)](_0x490c6a(0x18a)))return _0x490c6a(0x11b);if(_0x29661e===_0x490c6a(0x1a1)||_0x29661e[_0x490c6a(0x17c)]('.stages'))return _0x490c6a(0x19d);if(_0x29661e===''&&_0x583652[_0x490c6a(0x112)][_0x490c6a(0x113)](_0x490c6a(0x12c)))return'MISSING_STAGES';if(_0x29661e[_0x490c6a(0x113)]('activation'))return _0x490c6a(0x103);return _0x490c6a(0x11b);}function runJourneySemanticChecks(_0x2ad587,_0x2c2274){const _0x2938cc=a150_0x5562,_0x4fbaf7=[],_0x2fbd79=[];(!_0x2ad587[_0x2938cc(0x179)]||_0x2ad587[_0x2938cc(0x179)][_0x2938cc(0x1ad)]()==='')&&_0x4fbaf7[_0x2938cc(0x180)]({'level':_0x2938cc(0x11c),'path':_0x2938cc(0x179),'code':_0x2938cc(0x19b),'message':_0x2938cc(0x196),'location':getLocationFromPath(_0x2c2274['document'],_0x2c2274[_0x2938cc(0x142)],[_0x2938cc(0x179)])});const _0x2841df=new Set();if(_0x2ad587['segments'])for(const _0x3707eb of Object['keys'](_0x2ad587[_0x2938cc(0x107)])){_0x2841df[_0x2938cc(0x136)](_0x3707eb);}const _0x338f9c=new Set();if(_0x2ad587['activations'])for(const _0x5b6bcd of Object[_0x2938cc(0x10e)](_0x2ad587[_0x2938cc(0x10c)])){_0x338f9c[_0x2938cc(0x136)](_0x5b6bcd);}const _0xad4d8c=new Set(),_0x404108={..._0x2c2274,'embeddedSegments':_0x2841df,'referencedSegments':_0xad4d8c,'activationKeys':_0x338f9c[_0x2938cc(0x157)]>0x0?_0x338f9c:undefined};if(_0x2ad587['segments'])for(const [_0x2e945d,_0x450f6c]of Object[_0x2938cc(0x18c)](_0x2ad587[_0x2938cc(0x107)])){const _0xc7249f=validateEmbeddedSegment(_0x450f6c,_0x2938cc(0x13b)+_0x2e945d,_0x404108);for(const _0x4df29d of _0xc7249f){if(_0x4df29d[_0x2938cc(0x114)]===_0x2938cc(0x11c))_0x4fbaf7[_0x2938cc(0x180)](_0x4df29d);else _0x2fbd79['push'](_0x4df29d);}}const _0x4cff56=!!_0x2ad587[_0x2938cc(0x166)],_0x29a459=_0x2ad587[_0x2938cc(0x168)]?.['every'](_0x25aa91=>!!_0x25aa91[_0x2938cc(0x166)])??![];!_0x4cff56&&!_0x29a459&&_0x2fbd79[_0x2938cc(0x180)]({'level':_0x2938cc(0x128),'path':_0x2938cc(0x166),'code':_0x2938cc(0x120),'message':_0x2938cc(0xff),'location':getLocationFromPath(_0x2c2274['document'],_0x2c2274[_0x2938cc(0x142)],[_0x2938cc(0x166)])});const _0x95236=_0x2ad587[_0x2938cc(0x168)]??_0x2ad587[_0x2938cc(0x101)];if(_0x95236&&_0x95236[_0x2938cc(0x110)](_0x3151e2=>_0x3151e2[_0x2938cc(0x182)]===!![])[_0x2938cc(0x12e)]>0x1){const _0x3bcf46=_0x2ad587['journeys']?_0x2938cc(0x168):_0x2938cc(0x101);_0x4fbaf7['push']({'level':_0x2938cc(0x11c),'path':_0x3bcf46,'code':_0x2938cc(0x129),'message':_0x2938cc(0x14d)+(_0x3bcf46===_0x2938cc(0x168)?'journey\x20entry':_0x2938cc(0x12b))+_0x2938cc(0x143),'location':getLocationFromPath(_0x2c2274[_0x2938cc(0x16c)],_0x2c2274[_0x2938cc(0x142)],[_0x3bcf46])});}if(_0x2ad587[_0x2938cc(0x168)]&&_0x2ad587[_0x2938cc(0x168)][_0x2938cc(0x12e)]>0x0)for(let _0x5c7629=0x0;_0x5c7629<_0x2ad587['journeys']['length'];_0x5c7629++){const _0x4c93c7=_0x2ad587['journeys'][_0x5c7629];if(_0x2ad587[_0x2938cc(0x168)][_0x2938cc(0x12e)]>0x1&&_0x4c93c7[_0x2938cc(0x18d)]===_0x2938cc(0x199))continue;const _0x2d4259=_0x4c93c7[_0x2938cc(0x1a1)]||[],_0x5dbb1a=_0x2938cc(0x10f)+_0x5c7629+'].',_0x13c29d=!!_0x4c93c7[_0x2938cc(0x166)],_0x118656=_0x13c29d?{..._0x2ad587,'goal':_0x4c93c7['goal']}:_0x2ad587;validateStagesForVersion(_0x2d4259,_0x118656,_0x404108,_0x5dbb1a,_0x4fbaf7,_0x2fbd79,{'goalIsInherited':!_0x13c29d});}else{if(_0x2ad587['versions']&&_0x2ad587[_0x2938cc(0x101)][_0x2938cc(0x12e)]>0x0)for(let _0xb582f1=0x0;_0xb582f1<_0x2ad587[_0x2938cc(0x101)][_0x2938cc(0x12e)];_0xb582f1++){const _0xee0bef=_0x2ad587[_0x2938cc(0x101)][_0xb582f1];if(_0x2ad587[_0x2938cc(0x101)][_0x2938cc(0x12e)]>0x1&&_0xee0bef[_0x2938cc(0x18d)]===_0x2938cc(0x199))continue;const _0x414c12=_0xee0bef[_0x2938cc(0x1a1)]||[],_0x5e28ef='versions['+_0xb582f1+'].';validateStagesForVersion(_0x414c12,_0x2ad587,_0x404108,_0x5e28ef,_0x4fbaf7,_0x2fbd79);}else{const _0x4e6e9e=_0x2ad587[_0x2938cc(0x1a1)]||[];validateStagesForVersion(_0x4e6e9e,_0x2ad587,_0x404108,'',_0x4fbaf7,_0x2fbd79);}}_0x2ad587['journeys']&&_0x2ad587['journeys'][_0x2938cc(0x12e)]>0x1&&(deduplicateAcrossVersions(_0x4fbaf7),deduplicateAcrossVersions(_0x2fbd79));for(const _0x1dd58f of _0x2841df){!_0xad4d8c[_0x2938cc(0xfe)](_0x1dd58f)&&!_0x1dd58f['startsWith'](_0x2938cc(0x121))&&_0x2fbd79['push']({'level':_0x2938cc(0x128),'path':_0x2938cc(0x13b)+_0x1dd58f,'code':_0x2938cc(0x144),'message':_0x2938cc(0x1a7)+_0x1dd58f+_0x2938cc(0x115),'location':getLocationFromPath(_0x2c2274['document'],_0x2c2274['source'],[_0x2938cc(0x107),_0x1dd58f])});}return{'valid':_0x4fbaf7[_0x2938cc(0x12e)]===0x0,'errors':_0x4fbaf7,'warnings':_0x2fbd79};}
|
|
1
|
+
function a153_0x538a(){const _0x195eb8=['INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','exit_criteria','\x27\x20of\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','error','4550488IzjLkO','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','referencedSegments','add','abs','.milestone','Jump\x20step\x20requires\x20a\x20target','launched','with','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','endsWith','end','timeout','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20(from:\x20','activationKeys','timeout\x20of\x20\x27','7292558HQyxkc',').\x20Use\x20a\x20merge\x20step.','MISSING_CONDITIONS','TOO_MANY_STAGES','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','data','activations','JOURNEY_SCHEMA_ERROR','goalIsInherited','segment','CONVERGENCE_WITHOUT_MERGE','get','versions','ACTIVATION_SCHEMA_ERROR','4kvJwBq','UNUSED_EMBEDDED_SEGMENT','filter','goal','wait','18220419aJWwKt','some','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','size','\x27\x20has\x20only\x20','description','\x27\x20has\x20no\x20exit_criteria\x20defined','journeys[','version','Duplicate\x20step\x20name\x20\x27','\x27\x20(first\x20defined\x20at\x20steps[','jump','.exit_criteria','stages[','type','state','branch\x20\x27','6300395CXXmEm','Embedded\x20segment\x20\x27','branches','\x20stages\x20but\x20maximum\x20is\x20','activation','set','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','percentage','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','merge','startsWith','includes','.with.condition.segment','.steps','Journey\x20can\x20have\x20at\x20most\x20one\x20','milestone','stage','decision_point','journeys,\x20stages,\x20or\x20versions','embeddedSegments','2009976VpwTag','keys','Stage\x20\x27','issues','.with','variant\x20\x27','journey','level','.segment','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','3595173UybbUU','stages','message','next','FEW_STEPS','.with.condition.timeout.next','END_STEP_HAS_NEXT_OR_WITH','path','MISSING_ACTIVATION_REF','ref:','Merge\x20step\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','journeys','push','MERGE_TO_MERGE_CHAIN','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','entry_criteria','.name','MISSING_ACTIVATION_DEFINITION','excluded_','segments','End\x20step\x20\x27','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MISSING_EXIT_CRITERIA','Journey\x20name\x20is\x20required','419722xTFlAm','\x27\x20has\x20no\x20steps','trim','.rule','warning','.with.activation','4wMBesB','segments.','MISSING_STAGES','\x20versions)','journey\x20entry','has','ab_test','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','INVALID_NEXT_REFERENCE','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','condition','step\x20\x27','length','10HLTQHY','\x20with\x20latest:\x20true','Journey\x20has\x20no\x20goal\x20defined','stepNames','.with.target','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','MISSING_SEGMENT_REFERENCE','\x27\x20with\x20no\x20action\x20in\x20between','condition\x20of\x20\x27','map','.with.condition.timeout','MISSING_NAME','.with.condition','A/B\x20test\x20variant\x20\x27','.with.variants[','INSUFFICIENT_STEPS','\x20(across\x20','.next','target','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','safeParse','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','excluded','.steps[','BRANCH_DIRECTLY_TO_MERGE','.with.condition.next','code','latest','MISSING_END_STEP','replace','document','Decision\x20branch\x20\x27','.with.branches[','source','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','\x27\x20has\x20no\x20end\x20step','.entry_criteria','name','steps','rule','variants','DUPLICATE_LATEST','versions[','indices'];a153_0x538a=function(){return _0x195eb8;};return a153_0x538a();}(function(_0x579371,_0x51cba6){const _0x4a4ea5=a153_0x3061,_0x231a6c=_0x579371();while(!![]){try{const _0x53fa7a=-parseInt(_0x4a4ea5(0xbe))/0x1*(-parseInt(_0x4a4ea5(0xb8))/0x2)+parseInt(_0x4a4ea5(0x9f))/0x3*(parseInt(_0x4a4ea5(0x11d))/0x4)+-parseInt(_0x4a4ea5(0x81))/0x5+parseInt(_0x4a4ea5(0x95))/0x6+parseInt(_0x4a4ea5(0x10f))/0x7+parseInt(_0x4a4ea5(0xfe))/0x8+parseInt(_0x4a4ea5(0x6f))/0x9*(-parseInt(_0x4a4ea5(0xcb))/0xa);if(_0x53fa7a===_0x51cba6)break;else _0x231a6c['push'](_0x231a6c['shift']());}catch(_0x3037c1){_0x231a6c['push'](_0x231a6c['shift']());}}}(a153_0x538a,0xaa9f2));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1f5873,_0x339554,_0x24433e,_0x593815,_0xaabd63,_0x2b1670){const _0x4310a4=a153_0x3061;return{'level':_0x1f5873,'path':_0x339554,'code':_0x24433e,'message':_0x593815,'location':getLocationFromPath(_0xaabd63['document'],_0xaabd63[_0x4310a4(0xed)],pathToArray(_0x2b1670??_0x339554))};}function validateVersionStructure(_0x18abd,_0x2db4a3){const _0x2e8190=a153_0x3061,_0x4c0b95=[];return _0x18abd[_0x2e8190(0xca)]>MAX_STAGES&&_0x4c0b95[_0x2e8190(0xac)](createIssue('error',_0x2e8190(0xa0),_0x2e8190(0x112),'Journey\x20has\x20'+_0x18abd[_0x2e8190(0xca)]+_0x2e8190(0x84)+MAX_STAGES,_0x2db4a3)),_0x4c0b95;}function validateStageStructure(_0x4ff7b5,_0x3a0184,_0x52d92b,_0x443c85){const _0x59f5e9=a153_0x3061,_0x4e6f2a=[],_0x1d863a='stages['+_0x3a0184+']';_0x3a0184===0x0&&!_0x4ff7b5[_0x59f5e9(0xaf)]&&_0x4e6f2a['push'](createIssue('error',_0x1d863a+_0x59f5e9(0xf0),'MISSING_ENTRY_CRITERIA',_0x59f5e9(0x97)+_0x4ff7b5['name']+_0x59f5e9(0xaa),_0x443c85,_0x1d863a));const _0xe741e2=_0x3a0184===_0x52d92b-0x1;!_0xe741e2&&!_0x4ff7b5[_0x59f5e9(0x90)]&&_0x4e6f2a['push'](createIssue(_0x59f5e9(0xfd),_0x1d863a+_0x59f5e9(0x103),'MISSING_MILESTONE',_0x59f5e9(0x97)+_0x4ff7b5[_0x59f5e9(0xf1)]+_0x59f5e9(0x87),_0x443c85,_0x1d863a));(!_0x4ff7b5[_0x59f5e9(0xfa)]||_0x4ff7b5[_0x59f5e9(0xfa)][_0x59f5e9(0xca)]===0x0)&&_0x4e6f2a[_0x59f5e9(0xac)](createIssue(_0x59f5e9(0xbc),_0x1d863a+_0x59f5e9(0x7c),_0x59f5e9(0xb6),_0x59f5e9(0x97)+_0x4ff7b5[_0x59f5e9(0xf1)]+_0x59f5e9(0x76),_0x443c85,_0x1d863a));const _0x3866d7=_0x4ff7b5[_0x59f5e9(0xf2)]?.['length']??0x0;if(_0x3866d7===0x0)_0x4e6f2a[_0x59f5e9(0xac)](createIssue(_0x59f5e9(0xfd),_0x1d863a+_0x59f5e9(0x8e),_0x59f5e9(0xda),_0x59f5e9(0x97)+_0x4ff7b5['name']+_0x59f5e9(0xb9),_0x443c85,_0x1d863a+_0x59f5e9(0x8e)));else{if(_0x3866d7===0x1)_0x4e6f2a[_0x59f5e9(0xac)](createIssue('warning',_0x1d863a+_0x59f5e9(0x8e),_0x59f5e9(0xda),_0x59f5e9(0x97)+_0x4ff7b5['name']+_0x59f5e9(0x107),_0x443c85,_0x1d863a+_0x59f5e9(0x8e)));else _0x3866d7<=0x3&&_0x4e6f2a[_0x59f5e9(0xac)](createIssue(_0x59f5e9(0xbc),_0x1d863a+_0x59f5e9(0x8e),_0x59f5e9(0xa3),_0x59f5e9(0x97)+_0x4ff7b5[_0x59f5e9(0xf1)]+_0x59f5e9(0x74)+_0x3866d7+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x443c85,_0x1d863a+_0x59f5e9(0x8e)));}return _0x4e6f2a;}function validateStep(_0x5b4e41,_0x23400,_0x339a15,_0x3dcc42){const _0x28739e=a153_0x3061,_0x49b032=[];if(_0x5b4e41[_0x28739e(0x7e)]===_0x28739e(0x109))return _0x5b4e41[_0x28739e(0xa2)]&&_0x49b032['push'](createIssue(_0x28739e(0xfd),_0x23400+_0x28739e(0xdc),_0x28739e(0xa5),_0x28739e(0xb4)+_0x5b4e41[_0x28739e(0xf1)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x339a15)),_0x28739e(0x106)in _0x5b4e41&&_0x5b4e41[_0x28739e(0x106)]!==undefined&&_0x49b032[_0x28739e(0xac)](createIssue(_0x28739e(0xfd),_0x23400+_0x28739e(0x99),_0x28739e(0xa5),_0x28739e(0xb4)+_0x5b4e41['name']+_0x28739e(0xff),_0x339a15)),_0x49b032;_0x5b4e41['next']&&(_0x339a15[_0x28739e(0xce)]&&!_0x339a15[_0x28739e(0xce)][_0x28739e(0xc3)](_0x5b4e41[_0x28739e(0xa2)])&&_0x49b032[_0x28739e(0xac)](createIssue(_0x28739e(0xfd),_0x23400+'.next',_0x28739e(0xc6),_0x28739e(0x10b)+_0x5b4e41[_0x28739e(0xa2)]+'\x27',_0x339a15)));switch(_0x5b4e41[_0x28739e(0x7e)]){case'wait':_0x49b032[_0x28739e(0xac)](...validateWaitStep(_0x5b4e41,_0x23400,_0x339a15,_0x3dcc42));break;case'activation':_0x49b032[_0x28739e(0xac)](...validateActivationStep(_0x5b4e41,_0x23400,_0x339a15));break;case _0x28739e(0x92):_0x49b032['push'](...validateDecisionPointStep(_0x5b4e41,_0x23400,_0x339a15,_0x3dcc42));break;case _0x28739e(0xc4):_0x49b032[_0x28739e(0xac)](...validateAbTestStep(_0x5b4e41,_0x23400,_0x339a15,_0x3dcc42));break;case _0x28739e(0x7b):_0x49b032[_0x28739e(0xac)](...validateJumpStep(_0x5b4e41,_0x23400,_0x339a15));break;}return _0x49b032;}function validateWaitStep(_0x4c49ac,_0x30c1cf,_0x541786,_0x26e60c){const _0x4c1af1=a153_0x3061,_0x5afd7b=[];if(!_0x4c49ac['with'])return _0x5afd7b[_0x4c1af1(0xac)](createIssue(_0x4c1af1(0xfd),_0x30c1cf+_0x4c1af1(0x99),'MISSING_WAIT_PARAMS','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x541786,_0x30c1cf)),_0x5afd7b;if(_0x4c49ac[_0x4c1af1(0x106)]['condition']){const _0x5dcbe8=_0x4c49ac[_0x4c1af1(0x106)][_0x4c1af1(0xc8)];if(_0x5dcbe8['segment']){_0x541786[_0x4c1af1(0x100)]?.['add'](_0x5dcbe8[_0x4c1af1(0x118)]);!_0x5dcbe8[_0x4c1af1(0x118)][_0x4c1af1(0x8b)](_0x4c1af1(0xa8))&&(_0x541786['embeddedSegments']&&!_0x541786[_0x4c1af1(0x94)][_0x4c1af1(0xc3)](_0x5dcbe8[_0x4c1af1(0x118)])&&_0x5afd7b['push'](createIssue('error',_0x30c1cf+_0x4c1af1(0x8d),_0x4c1af1(0xd1),_0x4c1af1(0xae)+_0x5dcbe8[_0x4c1af1(0x118)]+_0x4c1af1(0xde),_0x541786)));_0x5dcbe8[_0x4c1af1(0xa2)]&&_0x541786[_0x4c1af1(0xce)]&&!_0x541786[_0x4c1af1(0xce)][_0x4c1af1(0xc3)](_0x5dcbe8[_0x4c1af1(0xa2)])&&_0x5afd7b[_0x4c1af1(0xac)](createIssue(_0x4c1af1(0xfd),_0x30c1cf+_0x4c1af1(0xe5),_0x4c1af1(0xc6),_0x4c1af1(0xb5)+_0x5dcbe8[_0x4c1af1(0xa2)]+'\x27',_0x541786));_0x5dcbe8[_0x4c1af1(0x10a)]?.[_0x4c1af1(0xa2)]&&_0x541786[_0x4c1af1(0xce)]&&!_0x541786[_0x4c1af1(0xce)]['has'](_0x5dcbe8[_0x4c1af1(0x10a)][_0x4c1af1(0xa2)])&&_0x5afd7b[_0x4c1af1(0xac)](createIssue(_0x4c1af1(0xfd),_0x30c1cf+_0x4c1af1(0xa4),_0x4c1af1(0xc6),_0x4c1af1(0xe1)+_0x5dcbe8[_0x4c1af1(0x10a)][_0x4c1af1(0xa2)]+'\x27',_0x541786));const _0x2eaac9=_0x5dcbe8['next']||_0x4c49ac['next'],_0x4af236=_0x5dcbe8[_0x4c1af1(0x10a)]?.[_0x4c1af1(0xa2)]||_0x4c49ac['next'];if(_0x2eaac9){const _0x146128=_0x26e60c[_0x4c1af1(0x11a)](_0x2eaac9);_0x146128?.[_0x4c1af1(0x7e)]===_0x4c1af1(0x8a)&&_0x5afd7b[_0x4c1af1(0xac)](createIssue(_0x4c1af1(0xbc),_0x30c1cf+_0x4c1af1(0xe5),'BRANCH_DIRECTLY_TO_MERGE',_0x4c1af1(0xfc)+_0x2eaac9+_0x4c1af1(0xee),_0x541786,_0x30c1cf+_0x4c1af1(0xd7)));}if(_0x4af236){const _0x30e633=_0x26e60c[_0x4c1af1(0x11a)](_0x4af236);_0x30e633?.[_0x4c1af1(0x7e)]===_0x4c1af1(0x8a)&&_0x5afd7b[_0x4c1af1(0xac)](createIssue(_0x4c1af1(0xbc),_0x30c1cf+_0x4c1af1(0xa4),_0x4c1af1(0xe4),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4af236+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x541786,_0x30c1cf+_0x4c1af1(0xd5)));}}}return _0x5afd7b;}function validateActivationStep(_0x3cfafc,_0x1b4b61,_0x1cefd7){const _0xfd4c5b=a153_0x3061,_0x44337d=[];if(!_0x3cfafc[_0xfd4c5b(0x106)]?.[_0xfd4c5b(0x85)])return _0x44337d['push'](createIssue(_0xfd4c5b(0xfd),_0x1b4b61+_0xfd4c5b(0xbd),_0xfd4c5b(0xa7),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x1cefd7,_0x1b4b61)),_0x44337d;const _0x2e0653=_0x3cfafc[_0xfd4c5b(0x106)][_0xfd4c5b(0x85)];return _0x1cefd7[_0xfd4c5b(0x10d)]&&!_0x2e0653['startsWith'](_0xfd4c5b(0xa8))&&(!_0x1cefd7[_0xfd4c5b(0x10d)][_0xfd4c5b(0xc3)](_0x2e0653)&&_0x44337d[_0xfd4c5b(0xac)](createIssue('error',_0x1b4b61+_0xfd4c5b(0xbd),_0xfd4c5b(0xb1),_0xfd4c5b(0x9e)+_0x2e0653+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x1cefd7))),_0x44337d;}function validateDecisionPointStep(_0x415fd0,_0x1193f4,_0x2b8c2d,_0x394591){const _0x3f7833=a153_0x3061,_0x34fbf4=[];if(!_0x415fd0[_0x3f7833(0x106)]?.[_0x3f7833(0x83)]||_0x415fd0['with'][_0x3f7833(0x83)][_0x3f7833(0xca)]===0x0)return _0x34fbf4[_0x3f7833(0xac)](createIssue(_0x3f7833(0xfd),_0x1193f4+'.with.branches',_0x3f7833(0x111),_0x3f7833(0xe0),_0x2b8c2d,_0x1193f4)),_0x34fbf4;for(let _0x41e76d=0x0;_0x41e76d<_0x415fd0[_0x3f7833(0x106)][_0x3f7833(0x83)][_0x3f7833(0xca)];_0x41e76d++){const _0x3be1d7=_0x415fd0[_0x3f7833(0x106)][_0x3f7833(0x83)][_0x41e76d],_0x2686e2=_0x1193f4+_0x3f7833(0xec)+_0x41e76d+']';_0x3be1d7[_0x3f7833(0x118)]&&!_0x3be1d7[_0x3f7833(0xe2)]&&(_0x2b8c2d[_0x3f7833(0x100)]?.[_0x3f7833(0x101)](_0x3be1d7[_0x3f7833(0x118)]),!_0x3be1d7[_0x3f7833(0x118)][_0x3f7833(0x8b)](_0x3f7833(0xa8))&&(_0x2b8c2d[_0x3f7833(0x94)]&&!_0x2b8c2d[_0x3f7833(0x94)][_0x3f7833(0xc3)](_0x3be1d7[_0x3f7833(0x118)])&&_0x34fbf4['push'](createIssue('error',_0x2686e2+_0x3f7833(0x9d),'MISSING_SEGMENT_REFERENCE','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x3be1d7['segment']+'\x27',_0x2b8c2d))));_0x3be1d7[_0x3f7833(0xa2)]&&_0x2b8c2d[_0x3f7833(0xce)]&&!_0x2b8c2d[_0x3f7833(0xce)][_0x3f7833(0xc3)](_0x3be1d7['next'])&&_0x34fbf4[_0x3f7833(0xac)](createIssue(_0x3f7833(0xfd),_0x2686e2+_0x3f7833(0xdc),_0x3f7833(0xc6),_0x3f7833(0x113)+_0x3be1d7[_0x3f7833(0xa2)]+'\x27',_0x2b8c2d));if(_0x3be1d7[_0x3f7833(0xa2)]){const _0x40ef23=_0x394591['get'](_0x3be1d7[_0x3f7833(0xa2)]);_0x40ef23?.[_0x3f7833(0x7e)]==='merge'&&_0x34fbf4[_0x3f7833(0xac)](createIssue(_0x3f7833(0xbc),_0x2686e2+'.next',_0x3f7833(0xe4),_0x3f7833(0xeb)+_0x3be1d7[_0x3f7833(0xf1)]+_0x3f7833(0x89)+_0x3be1d7[_0x3f7833(0xa2)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2b8c2d));}}return _0x34fbf4;}function validateAbTestStep(_0x3dbbc9,_0x355a14,_0x2deeca,_0x21c62e){const _0x4bc21e=a153_0x3061,_0x1358ae=[];if(!_0x3dbbc9[_0x4bc21e(0x106)]?.[_0x4bc21e(0xf4)]||_0x3dbbc9[_0x4bc21e(0x106)]['variants']['length']===0x0)return _0x1358ae[_0x4bc21e(0xac)](createIssue(_0x4bc21e(0xfd),_0x355a14+'.with.variants',_0x4bc21e(0x111),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x2deeca,_0x355a14)),_0x1358ae;const _0x86eead=_0x3dbbc9[_0x4bc21e(0x106)][_0x4bc21e(0xf4)]['reduce']((_0x36857d,_0x3294dd)=>_0x36857d+(_0x3294dd[_0x4bc21e(0x88)]||0x0),0x0);Math[_0x4bc21e(0x102)](_0x86eead-0x64)>0.01&&_0x1358ae[_0x4bc21e(0xac)](createIssue(_0x4bc21e(0xfd),_0x355a14+'.with.variants','INVALID_AB_TEST_PERCENTAGES',_0x4bc21e(0x72)+_0x86eead+'%)',_0x2deeca));for(let _0x4fc4a5=0x0;_0x4fc4a5<_0x3dbbc9[_0x4bc21e(0x106)][_0x4bc21e(0xf4)]['length'];_0x4fc4a5++){const _0x1a6b45=_0x3dbbc9['with'][_0x4bc21e(0xf4)][_0x4fc4a5],_0x47bee3=_0x355a14+_0x4bc21e(0xd9)+_0x4fc4a5+']';_0x1a6b45[_0x4bc21e(0xa2)]&&_0x2deeca[_0x4bc21e(0xce)]&&!_0x2deeca[_0x4bc21e(0xce)]['has'](_0x1a6b45[_0x4bc21e(0xa2)])&&_0x1358ae[_0x4bc21e(0xac)](createIssue(_0x4bc21e(0xfd),_0x47bee3+'.next',_0x4bc21e(0xc6),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x1a6b45[_0x4bc21e(0xa2)]+'\x27',_0x2deeca));if(_0x1a6b45[_0x4bc21e(0xa2)]){const _0x40e381=_0x21c62e[_0x4bc21e(0x11a)](_0x1a6b45[_0x4bc21e(0xa2)]);_0x40e381?.[_0x4bc21e(0x7e)]===_0x4bc21e(0x8a)&&_0x1358ae['push'](createIssue(_0x4bc21e(0xbc),_0x47bee3+_0x4bc21e(0xdc),_0x4bc21e(0xe4),_0x4bc21e(0xd8)+_0x1a6b45[_0x4bc21e(0xf1)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x1a6b45[_0x4bc21e(0xa2)]+_0x4bc21e(0xd2),_0x2deeca));}}return _0x1358ae;}function validateJumpStep(_0x300268,_0x14dd13,_0x479396){const _0x51f168=a153_0x3061,_0x276190=[];if(!_0x300268[_0x51f168(0x106)]?.['target'])return _0x276190[_0x51f168(0xac)](createIssue('error',_0x14dd13+_0x51f168(0xcf),_0x51f168(0xf8),_0x51f168(0x104),_0x479396,_0x14dd13)),_0x276190;return(!_0x300268[_0x51f168(0x106)][_0x51f168(0xdd)][_0x51f168(0x9b)]||!_0x300268[_0x51f168(0x106)]['target'][_0x51f168(0x91)])&&_0x276190[_0x51f168(0xac)](createIssue(_0x51f168(0xfd),_0x14dd13+'.with.target',_0x51f168(0xf8),_0x51f168(0xf9),_0x479396)),_0x276190;}function buildConvergenceMap(_0x2c6446){const _0x5909e3=a153_0x3061,_0x4d2ff1=new Map();function _0x4dc42d(_0x543639,_0x2b33c6){const _0xe7f763=a153_0x3061,_0x2f8944=_0x4d2ff1[_0xe7f763(0x11a)](_0x543639)||[];_0x2f8944['push'](_0x2b33c6),_0x4d2ff1[_0xe7f763(0x86)](_0x543639,_0x2f8944);}for(const _0x23a5b6 of _0x2c6446){_0x23a5b6[_0x5909e3(0xa2)]&&_0x4dc42d(_0x23a5b6[_0x5909e3(0xa2)],{'stepName':_0x23a5b6['name'],'description':_0x5909e3(0xc9)+_0x23a5b6[_0x5909e3(0xf1)]+'\x27'});if(_0x23a5b6[_0x5909e3(0x7e)]===_0x5909e3(0x92)&&_0x23a5b6['with']?.[_0x5909e3(0x83)])for(const _0x59dd61 of _0x23a5b6[_0x5909e3(0x106)][_0x5909e3(0x83)]){_0x59dd61[_0x5909e3(0xa2)]&&_0x4dc42d(_0x59dd61[_0x5909e3(0xa2)],{'stepName':_0x23a5b6[_0x5909e3(0xf1)],'description':_0x5909e3(0x80)+_0x59dd61[_0x5909e3(0xf1)]+'\x27\x20of\x20\x27'+_0x23a5b6['name']+'\x27'});}if(_0x23a5b6[_0x5909e3(0x7e)]===_0x5909e3(0xc4)&&_0x23a5b6[_0x5909e3(0x106)]?.['variants'])for(const _0x112404 of _0x23a5b6[_0x5909e3(0x106)]['variants']){_0x112404['next']&&_0x4dc42d(_0x112404[_0x5909e3(0xa2)],{'stepName':_0x23a5b6[_0x5909e3(0xf1)],'description':_0x5909e3(0x9a)+_0x112404['name']+_0x5909e3(0xfb)+_0x23a5b6['name']+'\x27'});}_0x23a5b6[_0x5909e3(0x7e)]===_0x5909e3(0x6e)&&_0x23a5b6[_0x5909e3(0x106)]?.[_0x5909e3(0xc8)]&&(_0x23a5b6[_0x5909e3(0x106)][_0x5909e3(0xc8)][_0x5909e3(0xa2)]&&_0x4dc42d(_0x23a5b6['with'][_0x5909e3(0xc8)][_0x5909e3(0xa2)],{'stepName':_0x23a5b6['name'],'description':_0x5909e3(0xd3)+_0x23a5b6[_0x5909e3(0xf1)]+'\x27'}),_0x23a5b6[_0x5909e3(0x106)][_0x5909e3(0xc8)][_0x5909e3(0x10a)]?.[_0x5909e3(0xa2)]&&_0x4dc42d(_0x23a5b6[_0x5909e3(0x106)]['condition'][_0x5909e3(0x10a)]['next'],{'stepName':_0x23a5b6[_0x5909e3(0xf1)],'description':_0x5909e3(0x10e)+_0x23a5b6['name']+'\x27'}));}return _0x4d2ff1;}function validateFlowControl(_0x5a735d,_0x124364,_0x54c4d1){const _0x34fff2=a153_0x3061,_0x1710d3=[],_0x1a5d41=_0x34fff2(0x7d)+_0x124364+']',_0x35951b=_0x5a735d['steps']||[];if(_0x35951b['length']===0x0)return _0x1710d3;const _0x39b15a=new Map();for(const _0x2f422e of _0x35951b){_0x2f422e[_0x34fff2(0xf1)]&&_0x39b15a[_0x34fff2(0x86)](_0x2f422e[_0x34fff2(0xf1)],_0x2f422e);}const _0x55dfa8=buildConvergenceMap(_0x35951b),_0x371434=_0x35951b[_0x34fff2(0x70)](_0x351492=>_0x351492[_0x34fff2(0x7e)]===_0x34fff2(0x109));!_0x371434&&_0x1710d3[_0x34fff2(0xac)](createIssue(_0x34fff2(0xfd),_0x1a5d41+_0x34fff2(0x8e),_0x34fff2(0xe8),'Stage\x20\x27'+_0x5a735d[_0x34fff2(0xf1)]+_0x34fff2(0xef),_0x54c4d1));for(const [_0x20f4c5,_0x8a2e9c]of _0x55dfa8){const _0x29ac68=_0x39b15a[_0x34fff2(0x11a)](_0x20f4c5);if(!_0x29ac68)continue;if(_0x8a2e9c['length']>0x1&&_0x29ac68[_0x34fff2(0x7e)]!==_0x34fff2(0x8a)){const _0x2f2bed=_0x8a2e9c[_0x34fff2(0xd4)](_0x11eaff=>_0x11eaff['description'])['join'](',\x20');_0x1710d3[_0x34fff2(0xac)](createIssue(_0x34fff2(0xfd),_0x1a5d41+_0x34fff2(0x8e),_0x34fff2(0x119),_0x34fff2(0xc5)+_0x20f4c5+_0x34fff2(0x10c)+_0x2f2bed+_0x34fff2(0x110),_0x54c4d1));}_0x8a2e9c['length']===0x1&&_0x29ac68[_0x34fff2(0x7e)]===_0x34fff2(0x8a)&&_0x1710d3['push'](createIssue(_0x34fff2(0xbc),_0x1a5d41+'.steps','SINGLE_INPUT_MERGE','Merge\x20step\x20\x27'+_0x20f4c5+_0x34fff2(0x71)+_0x8a2e9c[0x0][_0x34fff2(0x75)]+').\x20Merge\x20is\x20unnecessary.',_0x54c4d1));}for(const _0x498a45 of _0x35951b){if(_0x498a45['type']===_0x34fff2(0x8a)&&_0x498a45[_0x34fff2(0xa2)]){const _0x427726=_0x39b15a[_0x34fff2(0x11a)](_0x498a45['next']);_0x427726?.['type']===_0x34fff2(0x8a)&&_0x1710d3['push'](createIssue(_0x34fff2(0xfd),_0x1a5d41+_0x34fff2(0x8e),_0x34fff2(0xad),_0x34fff2(0xa9)+_0x498a45[_0x34fff2(0xf1)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x498a45['next']+_0x34fff2(0xc7),_0x54c4d1));}}return _0x1710d3;}function validateCriteria(_0x2c94c6,_0x4fdb27,_0x32bb36){const _0x2d614d=a153_0x3061,_0x523dd5=[];return _0x2c94c6[_0x2d614d(0x118)]&&(_0x32bb36[_0x2d614d(0x100)]?.[_0x2d614d(0x101)](_0x2c94c6[_0x2d614d(0x118)]),!_0x2c94c6['segment'][_0x2d614d(0x8b)]('ref:')&&(_0x32bb36[_0x2d614d(0x94)]&&!_0x32bb36[_0x2d614d(0x94)][_0x2d614d(0xc3)](_0x2c94c6[_0x2d614d(0x118)])&&_0x523dd5[_0x2d614d(0xac)](createIssue(_0x2d614d(0xfd),_0x4fdb27+_0x2d614d(0x9d),_0x2d614d(0xd1),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x2c94c6[_0x2d614d(0x118)]+'\x27',_0x32bb36)))),_0x523dd5;}function validateEmbeddedSegment(_0x4eefec,_0xd4513e,_0x2c3c74){const _0x226ba6=a153_0x3061,_0x3e93c1=[];return _0x4eefec[_0x226ba6(0xf3)]&&_0x3e93c1[_0x226ba6(0xac)](...validateRuleDef(_0x4eefec[_0x226ba6(0xf3)],_0xd4513e+_0x226ba6(0xbb),_0x2c3c74)),_0x3e93c1;}function validateStage(_0x157ea9,_0xd7a0db,_0x4e9436,_0xfcf5ac){const _0x4ebc7c=a153_0x3061,_0x558e12=[],_0x2273ed=_0x4ebc7c(0x7d)+_0xd7a0db+']',_0x5cce3c=new Map(),_0x220163=new Map();if(_0x157ea9[_0x4ebc7c(0xf2)]){for(let _0x259d1c=0x0;_0x259d1c<_0x157ea9['steps'][_0x4ebc7c(0xca)];_0x259d1c++){const _0x189b46=_0x157ea9[_0x4ebc7c(0xf2)][_0x259d1c];_0x189b46['name']&&_0x5cce3c[_0x4ebc7c(0x86)](_0x189b46[_0x4ebc7c(0xf1)],_0x189b46);}for(let _0x51594b=0x0;_0x51594b<_0x157ea9[_0x4ebc7c(0xf2)][_0x4ebc7c(0xca)];_0x51594b++){const _0x8f686f=_0x157ea9[_0x4ebc7c(0xf2)][_0x51594b],_0x34cf90=_0x2273ed+_0x4ebc7c(0xe3)+_0x51594b+']';if(_0x8f686f[_0x4ebc7c(0xf1)]){if(_0x220163[_0x4ebc7c(0xc3)](_0x8f686f[_0x4ebc7c(0xf1)])){const _0x5bd9ec=_0x220163[_0x4ebc7c(0x11a)](_0x8f686f[_0x4ebc7c(0xf1)]);_0x558e12[_0x4ebc7c(0xac)](createIssue('error',_0x34cf90+_0x4ebc7c(0xb0),'DUPLICATE_STEP_NAME',_0x4ebc7c(0x79)+_0x8f686f['name']+_0x4ebc7c(0x7a)+_0x5bd9ec+'])',_0xfcf5ac));}else _0x220163['set'](_0x8f686f['name'],_0x51594b);}_0x558e12[_0x4ebc7c(0xac)](...validateStep(_0x8f686f,_0x34cf90,_0xfcf5ac,_0x5cce3c));}}_0x157ea9[_0x4ebc7c(0xaf)]&&_0x558e12[_0x4ebc7c(0xac)](...validateCriteria(_0x157ea9[_0x4ebc7c(0xaf)],_0x2273ed+_0x4ebc7c(0xf0),_0xfcf5ac));if(_0x157ea9[_0x4ebc7c(0xfa)])for(let _0x16e188=0x0;_0x16e188<_0x157ea9[_0x4ebc7c(0xfa)][_0x4ebc7c(0xca)];_0x16e188++){_0x558e12['push'](...validateCriteria(_0x157ea9[_0x4ebc7c(0xfa)][_0x16e188],_0x2273ed+'.exit_criteria['+_0x16e188+']',_0xfcf5ac));}return _0x157ea9[_0x4ebc7c(0x90)]&&_0x558e12['push'](...validateCriteria(_0x157ea9['milestone'],_0x2273ed+_0x4ebc7c(0x103),_0xfcf5ac)),_0x558e12['push'](...validateStageStructure(_0x157ea9,_0xd7a0db,_0x4e9436,_0xfcf5ac)),_0x558e12[_0x4ebc7c(0xac)](...validateFlowControl(_0x157ea9,_0xd7a0db,_0xfcf5ac)),_0x558e12;}function validateStagesForVersion(_0x427afd,_0x4000ad,_0x2eccca,_0x440c0f,_0x1bf70d,_0x4d257c,_0x5c7c9b){const _0x24d4fa=a153_0x3061;if(_0x427afd[_0x24d4fa(0xca)]===0x0){_0x1bf70d[_0x24d4fa(0xac)]({'level':'error','path':_0x440c0f+'stages','code':_0x24d4fa(0xc0),'message':_0x24d4fa(0xd0),'location':getLocationFromPath(_0x2eccca[_0x24d4fa(0xea)],_0x2eccca['source'],['stages'])});return;}const _0x556907=new Set();for(const _0x53bd23 of _0x427afd){if(_0x53bd23['steps'])for(const _0x273f49 of _0x53bd23[_0x24d4fa(0xf2)]){_0x273f49[_0x24d4fa(0xf1)]&&_0x556907[_0x24d4fa(0x101)](_0x273f49[_0x24d4fa(0xf1)]);}}const _0x2ffde8={..._0x2eccca,'stepNames':_0x556907},_0x273cbc=validateVersionStructure(_0x427afd,_0x2ffde8);for(const _0x2875f0 of _0x273cbc){const _0x30b5a3=_0x440c0f?{..._0x2875f0,'path':''+_0x440c0f+_0x2875f0[_0x24d4fa(0xa6)]}:_0x2875f0;if(_0x30b5a3['level']==='error')_0x1bf70d[_0x24d4fa(0xac)](_0x30b5a3);else _0x4d257c[_0x24d4fa(0xac)](_0x30b5a3);}for(let _0x3de786=0x0;_0x3de786<_0x427afd[_0x24d4fa(0xca)];_0x3de786++){const _0x33f0f1=validateStage(_0x427afd[_0x3de786],_0x3de786,_0x427afd[_0x24d4fa(0xca)],_0x2ffde8);for(const _0x6a4c57 of _0x33f0f1){const _0x5f5058=_0x440c0f?{..._0x6a4c57,'path':''+_0x440c0f+_0x6a4c57[_0x24d4fa(0xa6)]}:_0x6a4c57;if(_0x5f5058['level']===_0x24d4fa(0xfd))_0x1bf70d['push'](_0x5f5058);else _0x4d257c[_0x24d4fa(0xac)](_0x5f5058);}}if(_0x4000ad[_0x24d4fa(0x120)]){const _0x53c28b=_0x5c7c9b?.[_0x24d4fa(0x117)]?'goal':_0x440c0f+'goal',_0x4ad9d1=validateCriteria(_0x4000ad[_0x24d4fa(0x120)],_0x53c28b,_0x2ffde8);for(const _0xab4182 of _0x4ad9d1){if(_0xab4182[_0x24d4fa(0x9c)]===_0x24d4fa(0xfd))_0x1bf70d[_0x24d4fa(0xac)](_0xab4182);else _0x4d257c[_0x24d4fa(0xac)](_0xab4182);}}}function extractVersionIndex(_0x4c7f68){const _0x2ed6d4=_0x4c7f68['match'](/^journeys\[(\d+)\]\./);return _0x2ed6d4?_0x2ed6d4[0x1]:undefined;}function deduplicateAcrossVersions(_0x3f94cc){const _0x5784e3=a153_0x3061,_0x5429f1=new Map();for(let _0x4646f6=0x0;_0x4646f6<_0x3f94cc['length'];_0x4646f6++){const _0x2c47db=_0x3f94cc[_0x4646f6][_0x5784e3(0xe6)]+':'+_0x3f94cc[_0x4646f6][_0x5784e3(0xa1)],_0x13b5db=extractVersionIndex(_0x3f94cc[_0x4646f6][_0x5784e3(0xa6)]),_0x2c6a3d=_0x5429f1['get'](_0x2c47db);if(_0x2c6a3d){_0x2c6a3d[_0x5784e3(0xf7)][_0x5784e3(0xac)](_0x4646f6);if(_0x13b5db)_0x2c6a3d['versions'][_0x5784e3(0x101)](_0x13b5db);}else _0x5429f1[_0x5784e3(0x86)](_0x2c47db,{'indices':[_0x4646f6],'versions':new Set(_0x13b5db?[_0x13b5db]:[])});}const _0x558e51=new Set();for(const {indices:_0x3309e2,versions:_0x21785c}of _0x5429f1['values']()){if(_0x21785c[_0x5784e3(0x73)]<=0x1)continue;const _0x8e49be=_0x3f94cc[_0x3309e2[0x0]];_0x8e49be['path']=_0x8e49be[_0x5784e3(0xa6)][_0x5784e3(0xe9)](/^journeys\[\d+\]\./,''),_0x8e49be[_0x5784e3(0xa1)]=_0x8e49be[_0x5784e3(0xa1)]+_0x5784e3(0xdb)+_0x21785c['size']+_0x5784e3(0xc1);for(let _0x27eafe=0x1;_0x27eafe<_0x3309e2['length'];_0x27eafe++){_0x558e51[_0x5784e3(0x101)](_0x3309e2[_0x27eafe]);}}const _0x54af50=[..._0x558e51]['sort']((_0x562ab8,_0xf5bb29)=>_0xf5bb29-_0x562ab8);for(const _0x565d12 of _0x54af50){_0x3f94cc['splice'](_0x565d12,0x1);}}export function validateJourneyDef(_0x4476ae,_0xac11fe={},_0x43cc87={}){const _0x59e8c4=a153_0x3061;if(_0x43cc87['skipSchema'])return runJourneySemanticChecks(_0x4476ae,_0xac11fe);const _0x419880=JourneyDefSchema[_0x59e8c4(0xdf)](_0x4476ae);if(_0x419880['success'])return runJourneySemanticChecks(_0x419880[_0x59e8c4(0x114)],_0xac11fe);return zodErrorsToJourneyValidationResult(_0x419880[_0x59e8c4(0xfd)],_0xac11fe);}function zodErrorsToJourneyValidationResult(_0x3e7e54,_0x47fb37){const _0x86cf90=a153_0x3061,_0x26a0c1=flattenZodIssues(_0x3e7e54[_0x86cf90(0x98)]),_0x40a927=_0x26a0c1[_0x86cf90(0xd4)](_0x244eda=>{const _0x576dfe=_0x86cf90,_0xdb9e1c=formatZodPath(_0x244eda[_0x576dfe(0xa6)]),_0x106c0a=mapJourneyZodIssueToCode(_0x244eda,_0xdb9e1c),_0x5e3514=getLocationFromPath(_0x47fb37[_0x576dfe(0xea)],_0x47fb37[_0x576dfe(0xed)],_0x244eda[_0x576dfe(0xa6)][_0x576dfe(0xd4)](_0x300e58=>typeof _0x300e58==='symbol'?String(_0x300e58):_0x300e58));return{'level':_0x576dfe(0xfd),'path':_0xdb9e1c,'code':_0x106c0a,'message':_0x244eda[_0x576dfe(0xa1)],..._0x5e3514&&{'location':_0x5e3514}};});return{'valid':![],'errors':_0x40a927,'warnings':[]};}function a153_0x3061(_0x11b4fd,_0x5808b6){_0x11b4fd=_0x11b4fd-0x6e;const _0x538af4=a153_0x538a();let _0x3061a2=_0x538af4[_0x11b4fd];return _0x3061a2;}function mapJourneyZodIssueToCode(_0x48be85,_0x12fb3b){const _0x382301=a153_0x3061;if(_0x12fb3b===_0x382301(0xf1))return _0x382301(0xd6);if(_0x12fb3b[_0x382301(0x108)]('.type')&&_0x12fb3b[_0x382301(0x8c)]('steps'))return _0x382301(0x116);if(_0x12fb3b==='stages'||_0x12fb3b[_0x382301(0x108)]('.stages'))return _0x382301(0xc0);if(_0x12fb3b===''&&_0x48be85[_0x382301(0xa1)][_0x382301(0x8c)](_0x382301(0x93)))return _0x382301(0xc0);if(_0x12fb3b[_0x382301(0x8c)](_0x382301(0x85)))return _0x382301(0x11c);return _0x382301(0x116);}function runJourneySemanticChecks(_0x24ec28,_0x23971e){const _0x4d25c9=a153_0x3061,_0x2823aa=[],_0x4f2301=[];(!_0x24ec28['name']||_0x24ec28['name'][_0x4d25c9(0xba)]()==='')&&_0x2823aa['push']({'level':'error','path':'name','code':'MISSING_NAME','message':_0x4d25c9(0xb7),'location':getLocationFromPath(_0x23971e[_0x4d25c9(0xea)],_0x23971e[_0x4d25c9(0xed)],[_0x4d25c9(0xf1)])});const _0x4fd6b5=new Set();if(_0x24ec28[_0x4d25c9(0xb3)])for(const _0x2ededc of Object[_0x4d25c9(0x96)](_0x24ec28[_0x4d25c9(0xb3)])){_0x4fd6b5[_0x4d25c9(0x101)](_0x2ededc);}const _0x123595=new Set();if(_0x24ec28[_0x4d25c9(0x115)])for(const _0x164265 of Object['keys'](_0x24ec28[_0x4d25c9(0x115)])){_0x123595[_0x4d25c9(0x101)](_0x164265);}const _0x43df89=new Set(),_0x32e3c9={..._0x23971e,'embeddedSegments':_0x4fd6b5,'referencedSegments':_0x43df89,'activationKeys':_0x123595[_0x4d25c9(0x73)]>0x0?_0x123595:undefined};if(_0x24ec28[_0x4d25c9(0xb3)])for(const [_0x5ce88b,_0x120114]of Object['entries'](_0x24ec28[_0x4d25c9(0xb3)])){const _0x4b6e78=validateEmbeddedSegment(_0x120114,_0x4d25c9(0xbf)+_0x5ce88b,_0x32e3c9);for(const _0x598b6a of _0x4b6e78){if(_0x598b6a[_0x4d25c9(0x9c)]===_0x4d25c9(0xfd))_0x2823aa[_0x4d25c9(0xac)](_0x598b6a);else _0x4f2301[_0x4d25c9(0xac)](_0x598b6a);}}const _0x352cff=!!_0x24ec28[_0x4d25c9(0x120)],_0x5c1c25=_0x24ec28['journeys']?.['every'](_0xd97bf9=>!!_0xd97bf9['goal'])??![];!_0x352cff&&!_0x5c1c25&&_0x4f2301[_0x4d25c9(0xac)]({'level':_0x4d25c9(0xbc),'path':_0x4d25c9(0x120),'code':'MISSING_GOAL','message':_0x4d25c9(0xcd),'location':getLocationFromPath(_0x23971e[_0x4d25c9(0xea)],_0x23971e[_0x4d25c9(0xed)],['goal'])});const _0x84f744=_0x24ec28[_0x4d25c9(0xab)]??_0x24ec28['versions'];if(_0x84f744&&_0x84f744[_0x4d25c9(0x11f)](_0x394044=>_0x394044[_0x4d25c9(0xe7)]===!![])[_0x4d25c9(0xca)]>0x1){const _0x12b350=_0x24ec28['journeys']?_0x4d25c9(0xab):_0x4d25c9(0x11b);_0x2823aa[_0x4d25c9(0xac)]({'level':'error','path':_0x12b350,'code':_0x4d25c9(0xf5),'message':_0x4d25c9(0x8f)+(_0x12b350===_0x4d25c9(0xab)?_0x4d25c9(0xc2):_0x4d25c9(0x78))+_0x4d25c9(0xcc),'location':getLocationFromPath(_0x23971e[_0x4d25c9(0xea)],_0x23971e[_0x4d25c9(0xed)],[_0x12b350])});}if(_0x24ec28[_0x4d25c9(0xab)]&&_0x24ec28[_0x4d25c9(0xab)][_0x4d25c9(0xca)]>0x0)for(let _0x3f660b=0x0;_0x3f660b<_0x24ec28[_0x4d25c9(0xab)][_0x4d25c9(0xca)];_0x3f660b++){const _0x1b4d01=_0x24ec28[_0x4d25c9(0xab)][_0x3f660b];if(_0x24ec28[_0x4d25c9(0xab)][_0x4d25c9(0xca)]>0x1&&_0x1b4d01[_0x4d25c9(0x7f)]===_0x4d25c9(0x105))continue;const _0x5a3b14=_0x1b4d01[_0x4d25c9(0xa0)]||[],_0x3e3481=_0x4d25c9(0x77)+_0x3f660b+'].',_0x400065=!!_0x1b4d01[_0x4d25c9(0x120)],_0x3de576=_0x400065?{..._0x24ec28,'goal':_0x1b4d01[_0x4d25c9(0x120)]}:_0x24ec28;validateStagesForVersion(_0x5a3b14,_0x3de576,_0x32e3c9,_0x3e3481,_0x2823aa,_0x4f2301,{'goalIsInherited':!_0x400065});}else{if(_0x24ec28[_0x4d25c9(0x11b)]&&_0x24ec28['versions']['length']>0x0)for(let _0xc5ed9a=0x0;_0xc5ed9a<_0x24ec28[_0x4d25c9(0x11b)][_0x4d25c9(0xca)];_0xc5ed9a++){const _0x301193=_0x24ec28[_0x4d25c9(0x11b)][_0xc5ed9a];if(_0x24ec28[_0x4d25c9(0x11b)]['length']>0x1&&_0x301193[_0x4d25c9(0x7f)]==='launched')continue;const _0x252bb2=_0x301193[_0x4d25c9(0xa0)]||[],_0x5c1682=_0x4d25c9(0xf6)+_0xc5ed9a+'].';validateStagesForVersion(_0x252bb2,_0x24ec28,_0x32e3c9,_0x5c1682,_0x2823aa,_0x4f2301);}else{const _0x35931f=_0x24ec28[_0x4d25c9(0xa0)]||[];validateStagesForVersion(_0x35931f,_0x24ec28,_0x32e3c9,'',_0x2823aa,_0x4f2301);}}_0x24ec28[_0x4d25c9(0xab)]&&_0x24ec28[_0x4d25c9(0xab)]['length']>0x1&&(deduplicateAcrossVersions(_0x2823aa),deduplicateAcrossVersions(_0x4f2301));for(const _0x107035 of _0x4fd6b5){!_0x43df89[_0x4d25c9(0xc3)](_0x107035)&&!_0x107035[_0x4d25c9(0x8b)](_0x4d25c9(0xb2))&&_0x4f2301['push']({'level':_0x4d25c9(0xbc),'path':'segments.'+_0x107035,'code':_0x4d25c9(0x11e),'message':_0x4d25c9(0x82)+_0x107035+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x23971e[_0x4d25c9(0xea)],_0x23971e[_0x4d25c9(0xed)],[_0x4d25c9(0xb3),_0x107035])});}return{'valid':_0x2823aa[_0x4d25c9(0xca)]===0x0,'errors':_0x2823aa,'warnings':_0x4f2301};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x50badf,_0x5a4c5){const _0x1580f6=a151_0x4992,_0x10d6f0=_0x50badf();while(!![]){try{const _0x172426=-parseInt(_0x1580f6(0x194))/0x1+-parseInt(_0x1580f6(0x130))/0x2+parseInt(_0x1580f6(0x136))/0x3+parseInt(_0x1580f6(0x149))/0x4+parseInt(_0x1580f6(0x1e6))/0x5+parseInt(_0x1580f6(0x193))/0x6+parseInt(_0x1580f6(0x18a))/0x7;if(_0x172426===_0x5a4c5)break;else _0x10d6f0['push'](_0x10d6f0['shift']());}catch(_0x314725){_0x10d6f0['push'](_0x10d6f0['shift']());}}}(a151_0x4ff2,0xc14e6));import*as a151_0xdcc9b1 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';function a151_0x4992(_0x21554b,_0x16fd8a){_0x21554b=_0x21554b-0x12e;const _0x4ff219=a151_0x4ff2();let _0x4992c3=_0x4ff219[_0x21554b];return _0x4992c3;}import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x5452d3){const _0x388ef2=a151_0x4992,_0xc1e6c7=_0x5452d3[_0x388ef2(0x15d)]();if(_0xc1e6c7===_0x388ef2(0x12e)||_0xc1e6c7===_0x388ef2(0x146))return _0x388ef2(0x146);if(_0xc1e6c7==='weeks'||_0xc1e6c7===_0x388ef2(0x170))return _0x388ef2(0x170);return _0x5452d3;}export function journeyResponseToDefSync(_0x24ff89){const _0x2de7b0=a151_0x4992,_0x28e607=_0x24ff89[_0x2de7b0(0x1b0)],_0x2244a1=_0x28e607[_0x2de7b0(0x161)]||_0x28e607[_0x2de7b0(0x155)],_0x53bef3={'stages':_0x28e607[_0x2de7b0(0x1d6)][_0x2de7b0(0x18c)](convertApiStageToYaml),'id':_0x24ff89['id']};_0x28e607[_0x2de7b0(0x13b)]&&(_0x53bef3['goal']=convertApiCriteriaToYaml(_0x28e607[_0x2de7b0(0x13b)]));_0x28e607['name']&&_0x28e607[_0x2de7b0(0x155)]!==_0x2244a1&&(_0x53bef3[_0x2de7b0(0x1cd)]=_0x28e607[_0x2de7b0(0x155)]);_0x28e607[_0x2de7b0(0x1a3)]!==undefined&&(_0x53bef3[_0x2de7b0(0x1a8)]=_0x28e607[_0x2de7b0(0x1a3)]);_0x28e607[_0x2de7b0(0x134)]&&(_0x53bef3[_0x2de7b0(0x134)]=_0x28e607[_0x2de7b0(0x134)]===_0x2de7b0(0x13a)?_0x2de7b0(0x13a):'draft');const _0x2ae3de={'type':_0x2de7b0(0x173),'name':_0x2244a1,'journeys':[_0x53bef3]};_0x28e607[_0x2de7b0(0x1e1)]&&(_0x2ae3de[_0x2de7b0(0x1e1)]=_0x28e607[_0x2de7b0(0x1e1)]);_0x28e607[_0x2de7b0(0x13b)]&&(_0x2ae3de[_0x2de7b0(0x13b)]=convertApiCriteriaToYaml(_0x28e607['goal']));if(_0x28e607[_0x2de7b0(0x135)])_0x2ae3de[_0x2de7b0(0x14b)]=_0x28e607[_0x2de7b0(0x135)];else _0x28e607[_0x2de7b0(0x1ab)]!==undefined&&(_0x2ae3de[_0x2de7b0(0x14b)]=_0x28e607[_0x2de7b0(0x1ab)]?_0x2de7b0(0x1c8):_0x2de7b0(0x145));return _0x28e607['journeyBundleId']&&(_0x2ae3de[_0x2de7b0(0x1e4)]=_0x28e607[_0x2de7b0(0x1d7)]),_0x28e607['journeyBundleName']&&(_0x2ae3de['bundle_name']=_0x28e607[_0x2de7b0(0x161)]),_0x24ff89[_0x2de7b0(0x1b9)]?.[_0x2de7b0(0x1a7)]?.[_0x2de7b0(0x1de)]?.['id']&&(_0x2ae3de[_0x2de7b0(0x18d)]=_0x24ff89[_0x2de7b0(0x1b9)][_0x2de7b0(0x1a7)][_0x2de7b0(0x1de)]['id']),_0x2ae3de;}export async function journeyResponseToDef(_0x162127,_0x5721db){const _0x504eaf=a151_0x4992,_0x415769=journeyResponseToDefSync(_0x162127);if(!_0x5721db)return _0x415769;const _0x44417e=new Set();collectSegmentIdsFromJourney(_0x415769,_0x44417e);const _0x2c480f=new Set();collectActivationIdsFromJourney(_0x415769,_0x2c480f);const _0x5129de={},_0x3beafc=new Map();for(const _0x1582e8 of Array[_0x504eaf(0x15a)](_0x44417e)[_0x504eaf(0x1e0)]()){if(_0x5721db[_0x504eaf(0x199)]){const _0x147b5c=await _0x5721db[_0x504eaf(0x199)](_0x1582e8);if(_0x147b5c[_0x504eaf(0x1c0)]){_0x3beafc[_0x504eaf(0x175)](_0x1582e8,_0x147b5c[_0x504eaf(0x155)]);if(_0x147b5c['definition']){const _0x4978df={..._0x147b5c[_0x504eaf(0x15b)],'rule':deepSortObject(_0x147b5c[_0x504eaf(0x15b)][_0x504eaf(0x1c1)])};_0x5129de[_0x147b5c[_0x504eaf(0x155)]]=_0x4978df;}}else _0x3beafc[_0x504eaf(0x175)](_0x1582e8,makeSegmentRef(_0x147b5c[_0x504eaf(0x155)]));}else{if(_0x5721db[_0x504eaf(0x158)]){const _0x3c5008=await _0x5721db['resolveSegmentName'](_0x1582e8);_0x3beafc[_0x504eaf(0x175)](_0x1582e8,_0x3c5008);}}}const _0x5790fc={},_0x7c7331=new Map();for(const _0x697c7e of Array[_0x504eaf(0x15a)](_0x2c480f)[_0x504eaf(0x1e0)]()){if(_0x5721db['resolveActivation']){const _0x202cd0=await _0x5721db[_0x504eaf(0x181)](_0x697c7e);_0x202cd0['isJourneyLocal']?(_0x7c7331['set'](_0x697c7e,_0x202cd0[_0x504eaf(0x155)]),_0x202cd0[_0x504eaf(0x15b)]&&(_0x5790fc[_0x202cd0[_0x504eaf(0x155)]]=_0x202cd0['definition'])):_0x7c7331[_0x504eaf(0x175)](_0x697c7e,makeSegmentRef(_0x202cd0[_0x504eaf(0x155)]));}else{if(_0x5721db['resolveActivationName']){const _0x579310=await _0x5721db[_0x504eaf(0x1da)](_0x697c7e);_0x7c7331[_0x504eaf(0x175)](_0x697c7e,_0x579310);}}}_0x3beafc[_0x504eaf(0x1ce)]>0x0&&replaceSegmentIdsInJourney(_0x415769,_0x3beafc);_0x7c7331[_0x504eaf(0x1ce)]>0x0&&replaceActivationIdsInJourney(_0x415769,_0x7c7331);if(_0x5721db[_0x504eaf(0x1b4)]){const _0x64c939=[];collectJumpTargetsFromJourney(_0x415769,_0x64c939);if(_0x64c939[_0x504eaf(0x16d)]>0x0){const _0x1605fb=new Map();for(const _0x1a04c7 of _0x64c939){try{const _0x5e9a46=await _0x5721db[_0x504eaf(0x1b4)](_0x1a04c7[_0x504eaf(0x182)],_0x1a04c7[_0x504eaf(0x184)]);_0x1605fb[_0x504eaf(0x175)](_0x1a04c7[_0x504eaf(0x182)]+':'+_0x1a04c7[_0x504eaf(0x184)],_0x5e9a46);}catch{}}_0x1605fb['size']>0x0&&replaceJumpTargetsInJourney(_0x415769,_0x1605fb);}}return Object[_0x504eaf(0x17f)](_0x5129de)[_0x504eaf(0x16d)]>0x0&&(_0x415769[_0x504eaf(0x1cb)]=_0x5129de),Object[_0x504eaf(0x17f)](_0x5790fc)['length']>0x0&&(_0x415769[_0x504eaf(0x172)]=_0x5790fc),_0x415769;}function collectSegmentIdsFromJourney(_0x234a0f,_0x1aa2f7){const _0x2df134=a151_0x4992;_0x234a0f['goal']?.[_0x2df134(0x1a2)]&&_0x1aa2f7[_0x2df134(0x1a4)](_0x234a0f['goal'][_0x2df134(0x1a2)]);const _0x231b7d=_0x4739f6=>{const _0x119a77=_0x2df134;for(const _0x32a04d of _0x4739f6){_0x32a04d[_0x119a77(0x152)]?.[_0x119a77(0x1a2)]&&_0x1aa2f7[_0x119a77(0x1a4)](_0x32a04d[_0x119a77(0x152)][_0x119a77(0x1a2)]);if(_0x32a04d[_0x119a77(0x1d9)])for(const _0x4b3bc7 of _0x32a04d[_0x119a77(0x1d9)]){_0x4b3bc7[_0x119a77(0x1a2)]&&_0x1aa2f7[_0x119a77(0x1a4)](_0x4b3bc7[_0x119a77(0x1a2)]);}_0x32a04d['milestone']?.[_0x119a77(0x1a2)]&&_0x1aa2f7['add'](_0x32a04d[_0x119a77(0x133)][_0x119a77(0x1a2)]);if(_0x32a04d[_0x119a77(0x167)])for(const _0x1f25cc of _0x32a04d[_0x119a77(0x167)]){if(_0x1f25cc[_0x119a77(0x1e3)]===_0x119a77(0x1dc)){const _0x32ad4f=_0x1f25cc;for(const _0x5c8aff of _0x32ad4f[_0x119a77(0x14a)][_0x119a77(0x1c2)]){_0x5c8aff['segment']&&_0x1aa2f7[_0x119a77(0x1a4)](_0x5c8aff[_0x119a77(0x1a2)]);}}else{if(_0x1f25cc[_0x119a77(0x1e3)]===_0x119a77(0x187)){const _0x4b5b39=_0x1f25cc;_0x4b5b39['with'][_0x119a77(0x1b3)]?.[_0x119a77(0x1a2)]&&_0x1aa2f7[_0x119a77(0x1a4)](_0x4b5b39['with'][_0x119a77(0x1b3)][_0x119a77(0x1a2)]);}}}}};if(_0x234a0f[_0x2df134(0x13d)])for(const _0x4c19cd of _0x234a0f['journeys']){_0x4c19cd[_0x2df134(0x13b)]?.[_0x2df134(0x1a2)]&&_0x1aa2f7['add'](_0x4c19cd[_0x2df134(0x13b)]['segment']),_0x231b7d(_0x4c19cd[_0x2df134(0x18f)]);}_0x234a0f[_0x2df134(0x18f)]&&_0x231b7d(_0x234a0f[_0x2df134(0x18f)]);if(_0x234a0f[_0x2df134(0x1c4)])for(const _0xef19b of _0x234a0f['versions']){_0x231b7d(_0xef19b[_0x2df134(0x18f)]);}}function replaceSegmentIdsInJourney(_0x238dd5,_0x4960a1){const _0x524eb8=a151_0x4992,_0x5bdecd=_0x3b680b=>_0x4960a1[_0x524eb8(0x17c)](_0x3b680b)||_0x3b680b;_0x238dd5[_0x524eb8(0x13b)]?.['segment']&&(_0x238dd5[_0x524eb8(0x13b)]['segment']=_0x5bdecd(_0x238dd5['goal']['segment']));const _0x3981b9=_0x505867=>{const _0x47eb37=_0x524eb8;for(const _0x468e6d of _0x505867){_0x468e6d[_0x47eb37(0x152)]?.[_0x47eb37(0x1a2)]&&(_0x468e6d[_0x47eb37(0x152)][_0x47eb37(0x1a2)]=_0x5bdecd(_0x468e6d[_0x47eb37(0x152)]['segment']));if(_0x468e6d[_0x47eb37(0x1d9)])for(const _0x5ba1d0 of _0x468e6d['exit_criteria']){_0x5ba1d0[_0x47eb37(0x1a2)]&&(_0x5ba1d0[_0x47eb37(0x1a2)]=_0x5bdecd(_0x5ba1d0[_0x47eb37(0x1a2)]));}_0x468e6d['milestone']?.[_0x47eb37(0x1a2)]&&(_0x468e6d[_0x47eb37(0x133)]['segment']=_0x5bdecd(_0x468e6d['milestone'][_0x47eb37(0x1a2)]));if(_0x468e6d[_0x47eb37(0x167)])for(const _0x1815b7 of _0x468e6d[_0x47eb37(0x167)]){if(_0x1815b7[_0x47eb37(0x1e3)]===_0x47eb37(0x1dc)){const _0x486f6a=_0x1815b7;for(const _0x418f8b of _0x486f6a[_0x47eb37(0x14a)][_0x47eb37(0x1c2)]){_0x418f8b[_0x47eb37(0x1a2)]&&(_0x418f8b['segment']=_0x5bdecd(_0x418f8b[_0x47eb37(0x1a2)]));}}else{if(_0x1815b7[_0x47eb37(0x1e3)]===_0x47eb37(0x187)){const _0x1d8812=_0x1815b7;_0x1d8812[_0x47eb37(0x14a)][_0x47eb37(0x1b3)]?.[_0x47eb37(0x1a2)]&&(_0x1d8812[_0x47eb37(0x14a)][_0x47eb37(0x1b3)][_0x47eb37(0x1a2)]=_0x5bdecd(_0x1d8812[_0x47eb37(0x14a)][_0x47eb37(0x1b3)][_0x47eb37(0x1a2)]));}}}}};if(_0x238dd5[_0x524eb8(0x13d)])for(const _0x5b7ee3 of _0x238dd5['journeys']){_0x5b7ee3[_0x524eb8(0x13b)]?.[_0x524eb8(0x1a2)]&&(_0x5b7ee3['goal'][_0x524eb8(0x1a2)]=_0x5bdecd(_0x5b7ee3[_0x524eb8(0x13b)][_0x524eb8(0x1a2)])),_0x3981b9(_0x5b7ee3[_0x524eb8(0x18f)]);}_0x238dd5[_0x524eb8(0x18f)]&&_0x3981b9(_0x238dd5[_0x524eb8(0x18f)]);if(_0x238dd5['versions'])for(const _0x6be5e8 of _0x238dd5['versions']){_0x3981b9(_0x6be5e8['stages']);}}function collectActivationIdsFromJourney(_0x248d4a,_0x5b1a82){const _0x5f54f6=a151_0x4992,_0x4bd9bb=_0x59c583=>{const _0x3e5289=a151_0x4992;for(const _0x3cf546 of _0x59c583){if(_0x3cf546['steps'])for(const _0x122050 of _0x3cf546[_0x3e5289(0x167)]){if(_0x122050[_0x3e5289(0x1e3)]==='activation'){const _0x275cf2=_0x122050;_0x275cf2[_0x3e5289(0x14a)][_0x3e5289(0x197)]&&/^\d+$/[_0x3e5289(0x140)](_0x275cf2[_0x3e5289(0x14a)][_0x3e5289(0x197)])&&_0x5b1a82['add'](_0x275cf2[_0x3e5289(0x14a)][_0x3e5289(0x197)]);}}}};if(_0x248d4a['journeys'])for(const _0x34a649 of _0x248d4a[_0x5f54f6(0x13d)]){_0x4bd9bb(_0x34a649[_0x5f54f6(0x18f)]);}_0x248d4a[_0x5f54f6(0x18f)]&&_0x4bd9bb(_0x248d4a[_0x5f54f6(0x18f)]);if(_0x248d4a[_0x5f54f6(0x1c4)])for(const _0x4c375e of _0x248d4a[_0x5f54f6(0x1c4)]){_0x4bd9bb(_0x4c375e[_0x5f54f6(0x18f)]);}}function replaceActivationIdsInJourney(_0x5a0c06,_0x576fce){const _0x2e5a5d=a151_0x4992,_0x1847de=_0x2ec339=>_0x576fce[_0x2e5a5d(0x17c)](_0x2ec339)||_0x2ec339,_0x5a7118=_0x41e5de=>{const _0x5c789d=_0x2e5a5d;for(const _0x39c1fe of _0x41e5de){if(_0x39c1fe['steps'])for(const _0x297575 of _0x39c1fe[_0x5c789d(0x167)]){if(_0x297575[_0x5c789d(0x1e3)]===_0x5c789d(0x197)){const _0x5253e0=_0x297575;_0x5253e0['with'][_0x5c789d(0x197)]&&(_0x5253e0[_0x5c789d(0x14a)]['activation']=_0x1847de(_0x5253e0[_0x5c789d(0x14a)]['activation']));}}}};if(_0x5a0c06[_0x2e5a5d(0x13d)])for(const _0x17364d of _0x5a0c06[_0x2e5a5d(0x13d)]){_0x5a7118(_0x17364d[_0x2e5a5d(0x18f)]);}_0x5a0c06[_0x2e5a5d(0x18f)]&&_0x5a7118(_0x5a0c06[_0x2e5a5d(0x18f)]);if(_0x5a0c06[_0x2e5a5d(0x1c4)])for(const _0x5b396c of _0x5a0c06[_0x2e5a5d(0x1c4)]){_0x5a7118(_0x5b396c[_0x2e5a5d(0x18f)]);}}function collectJumpTargetsFromJourney(_0x2639c3,_0x30436c){const _0x2d6b4f=a151_0x4992,_0xeb850a=new Set(),_0x259ed3=_0x19b421=>{const _0x313ff5=a151_0x4992;for(const _0x33dca5 of _0x19b421){if(_0x33dca5[_0x313ff5(0x167)])for(const _0x1ea0f3 of _0x33dca5['steps']){if(_0x1ea0f3[_0x313ff5(0x1e3)]==='jump'){const _0x683853=_0x1ea0f3,_0x4312c1=_0x683853[_0x313ff5(0x14a)][_0x313ff5(0x1ae)];if(_0x4312c1[_0x313ff5(0x173)]&&_0x4312c1['stage']&&/^\d+$/[_0x313ff5(0x140)](_0x4312c1['journey'])&&/^\d+$/[_0x313ff5(0x140)](_0x4312c1[_0x313ff5(0x16e)])){const _0x98ade1=_0x4312c1[_0x313ff5(0x173)]+':'+_0x4312c1[_0x313ff5(0x16e)];!_0xeb850a[_0x313ff5(0x164)](_0x98ade1)&&(_0xeb850a[_0x313ff5(0x1a4)](_0x98ade1),_0x30436c[_0x313ff5(0x1e5)]({'journeyId':_0x4312c1[_0x313ff5(0x173)],'stageId':_0x4312c1['stage']}));}}}}};if(_0x2639c3[_0x2d6b4f(0x13d)])for(const _0x28c24d of _0x2639c3[_0x2d6b4f(0x13d)]){_0x259ed3(_0x28c24d[_0x2d6b4f(0x18f)]);}_0x2639c3['stages']&&_0x259ed3(_0x2639c3[_0x2d6b4f(0x18f)]);if(_0x2639c3[_0x2d6b4f(0x1c4)])for(const _0xed6cef of _0x2639c3[_0x2d6b4f(0x1c4)]){_0x259ed3(_0xed6cef[_0x2d6b4f(0x18f)]);}}function replaceJumpTargetsInJourney(_0x220932,_0x528f45){const _0x29a757=a151_0x4992,_0x3bedda=_0x52f8df=>{const _0x3c075c=a151_0x4992;for(const _0x12d835 of _0x52f8df){if(_0x12d835[_0x3c075c(0x167)])for(const _0x569ff0 of _0x12d835[_0x3c075c(0x167)]){if(_0x569ff0['type']===_0x3c075c(0x1ac)){const _0x2c1919=_0x569ff0,_0x4a7a4e=_0x2c1919[_0x3c075c(0x14a)][_0x3c075c(0x1ae)],_0x2e49eb=_0x4a7a4e['journey']+':'+_0x4a7a4e[_0x3c075c(0x16e)],_0x478674=_0x528f45[_0x3c075c(0x17c)](_0x2e49eb);_0x478674&&(_0x4a7a4e[_0x3c075c(0x173)]=_0x478674[_0x3c075c(0x16b)],_0x4a7a4e[_0x3c075c(0x16e)]=_0x478674['stageName']);}}}};if(_0x220932[_0x29a757(0x13d)])for(const _0x52e61c of _0x220932['journeys']){_0x3bedda(_0x52e61c['stages']);}_0x220932['stages']&&_0x3bedda(_0x220932[_0x29a757(0x18f)]);if(_0x220932[_0x29a757(0x1c4)])for(const _0x59ce60 of _0x220932[_0x29a757(0x1c4)]){_0x3bedda(_0x59ce60[_0x29a757(0x18f)]);}}function generateReadableStepName(_0x23ceb7,_0x508b7a){const _0xd692d3=a151_0x4992;if(_0x23ceb7[_0xd692d3(0x155)]&&_0x23ceb7[_0xd692d3(0x155)]!==_0x23ceb7[_0xd692d3(0x1e3)]){const _0x2a4586=_0x23ceb7[_0xd692d3(0x155)]['trim']();if(_0x2a4586&&/[a-z0-9\p{L}]/iu['test'](_0x2a4586))return _0x2a4586;}const _0xda5a5b=_0x23ceb7[_0xd692d3(0x1e3)][_0xd692d3(0x15d)]()[_0xd692d3(0x1c6)](/step$/i,'');return _0xda5a5b+'_'+(_0x508b7a+0x1);}function getStepNextRefs(_0x5f576d){const _0x3cf1f2=a151_0x4992,_0x1df76e=[];if(_0x5f576d[_0x3cf1f2(0x14d)])_0x1df76e[_0x3cf1f2(0x1e5)](_0x5f576d[_0x3cf1f2(0x14d)]);if(_0x5f576d[_0x3cf1f2(0x1c2)])for(const _0x19768e of _0x5f576d[_0x3cf1f2(0x1c2)]){if(_0x19768e[_0x3cf1f2(0x14d)])_0x1df76e[_0x3cf1f2(0x1e5)](_0x19768e[_0x3cf1f2(0x14d)]);}if(_0x5f576d['variants'])for(const _0x4ed622 of _0x5f576d[_0x3cf1f2(0x1af)]){if(_0x4ed622[_0x3cf1f2(0x14d)])_0x1df76e[_0x3cf1f2(0x1e5)](_0x4ed622[_0x3cf1f2(0x14d)]);}if(_0x5f576d[_0x3cf1f2(0x1b5)])for(const _0x17e629 of _0x5f576d['conditions']){if(_0x17e629[_0x3cf1f2(0x14d)])_0x1df76e[_0x3cf1f2(0x1e5)](_0x17e629['next']);}return _0x1df76e;}function parseJumpTargetDisplayName(_0x4216b7){const _0x1573d5=a151_0x4992,_0x5ca220=_0x4216b7[_0x1573d5(0x1df)](/^(.+?)\s*\(([^/)]+)/);if(!_0x5ca220)return undefined;const _0x172dc5=_0x5ca220[0x1][_0x1573d5(0x17e)](),_0x3f3c36=_0x5ca220[0x2]['trim']();if(!_0x172dc5||!_0x3f3c36)return undefined;return{'stageName':_0x172dc5,'journeyName':_0x3f3c36};}function orderStepsFromRoot(_0x9f0324,_0x5d4c46){const _0x3eb47b=a151_0x4992,_0x4d7bfc=Object[_0x3eb47b(0x151)](_0x9f0324);if(_0x4d7bfc[_0x3eb47b(0x16d)]===0x0)return[];const _0x5abe4b=new Set(_0x4d7bfc['map'](([_0x2075db])=>_0x2075db)),_0x2bd1c7=new Set();for(const [,_0x330e04]of _0x4d7bfc){for(const _0x522426 of getStepNextRefs(_0x330e04)){if(_0x5abe4b[_0x3eb47b(0x164)](_0x522426))_0x2bd1c7['add'](_0x522426);}}let _0x236554=_0x5d4c46&&_0x5abe4b[_0x3eb47b(0x164)](_0x5d4c46)?_0x5d4c46:undefined;if(!_0x236554){const _0x492a81=_0x4d7bfc[_0x3eb47b(0x179)](([_0xa3576b])=>!_0x2bd1c7[_0x3eb47b(0x164)](_0xa3576b));_0x492a81[_0x3eb47b(0x16d)]>0x0?_0x236554=_0x492a81[0x0][0x0]:_0x236554=_0x4d7bfc[0x0][0x0];}const _0xcb463c=[],_0x2e19bb=new Set(),_0x2a6092=[_0x236554];while(_0x2a6092[_0x3eb47b(0x16d)]>0x0){const _0x2a4fef=_0x2a6092[_0x3eb47b(0x1ea)]();if(_0x2e19bb[_0x3eb47b(0x164)](_0x2a4fef))continue;_0x2e19bb[_0x3eb47b(0x1a4)](_0x2a4fef);const _0x368398=_0x9f0324[_0x2a4fef];if(!_0x368398)continue;_0xcb463c[_0x3eb47b(0x1e5)]({'uuid':_0x2a4fef,'step':_0x368398});for(const _0x419878 of getStepNextRefs(_0x368398)){_0x5abe4b['has'](_0x419878)&&!_0x2e19bb[_0x3eb47b(0x164)](_0x419878)&&_0x2a6092[_0x3eb47b(0x1e5)](_0x419878);}}for(const [_0x58211a,_0x3ee6b5]of _0x4d7bfc){!_0x2e19bb[_0x3eb47b(0x164)](_0x58211a)&&_0xcb463c['push']({'uuid':_0x58211a,'step':_0x3ee6b5});}return _0xcb463c;}function resolveStepReferences(_0x9f8b20,_0x2c28bb,_0x3c6f64,_0x445312){const _0x17f975=a151_0x4992;if(_0x9f8b20[_0x17f975(0x1e3)]!=='end'){_0x9f8b20[_0x17f975(0x14d)]&&_0x445312[_0x17f975(0x164)](_0x9f8b20[_0x17f975(0x14d)])&&(_0x9f8b20[_0x17f975(0x14d)]=_0x445312[_0x17f975(0x17c)](_0x9f8b20[_0x17f975(0x14d)]));const _0x3ee081=_0x2c28bb+0x1;if(_0x3ee081<_0x3c6f64[_0x17f975(0x16d)]){const _0x1c5046=_0x445312[_0x17f975(0x17c)](_0x3c6f64[_0x3ee081][_0x17f975(0x162)]);_0x9f8b20['next']===_0x1c5046&&delete _0x9f8b20[_0x17f975(0x14d)];}}if(_0x9f8b20[_0x17f975(0x1e3)]===_0x17f975(0x1dc))for(const _0x25254f of _0x9f8b20[_0x17f975(0x14a)]['branches']){_0x25254f[_0x17f975(0x14d)]&&_0x445312[_0x17f975(0x164)](_0x25254f['next'])&&(_0x25254f[_0x17f975(0x14d)]=_0x445312[_0x17f975(0x17c)](_0x25254f['next']));}if(_0x9f8b20['type']===_0x17f975(0x1dd))for(const _0x5662b4 of _0x9f8b20[_0x17f975(0x14a)][_0x17f975(0x1af)]){_0x5662b4[_0x17f975(0x14d)]&&_0x445312['has'](_0x5662b4[_0x17f975(0x14d)])&&(_0x5662b4['next']=_0x445312[_0x17f975(0x17c)](_0x5662b4[_0x17f975(0x14d)]));}if(_0x9f8b20['type']==='wait'&&_0x9f8b20[_0x17f975(0x14a)][_0x17f975(0x1b3)]){const _0x3bcf3e=_0x9f8b20['with']['condition'];_0x3bcf3e[_0x17f975(0x14d)]&&_0x445312[_0x17f975(0x164)](_0x3bcf3e[_0x17f975(0x14d)])&&(_0x3bcf3e[_0x17f975(0x14d)]=_0x445312['get'](_0x3bcf3e[_0x17f975(0x14d)])),_0x3bcf3e[_0x17f975(0x1c3)]?.[_0x17f975(0x14d)]&&_0x445312[_0x17f975(0x164)](_0x3bcf3e['timeout'][_0x17f975(0x14d)])&&(_0x3bcf3e['timeout']['next']=_0x445312[_0x17f975(0x17c)](_0x3bcf3e[_0x17f975(0x1c3)][_0x17f975(0x14d)]));}}function convertApiStageToYaml(_0x42c306){const _0x28ad54=a151_0x4992,_0x235388={'name':_0x42c306['name']};_0x42c306['id']&&(_0x235388['id']=_0x42c306['id']);_0x42c306['description']&&(_0x235388['description']=_0x42c306[_0x28ad54(0x1e1)]);_0x42c306[_0x28ad54(0x148)]&&(_0x235388[_0x28ad54(0x152)]=convertApiCriteriaToYaml(_0x42c306[_0x28ad54(0x148)]));_0x42c306[_0x28ad54(0x17a)]&&_0x42c306[_0x28ad54(0x17a)]['length']>0x0&&(_0x235388[_0x28ad54(0x1d9)]=_0x42c306[_0x28ad54(0x17a)][_0x28ad54(0x18c)](convertApiCriteriaToYaml));_0x42c306['milestone']&&(_0x235388[_0x28ad54(0x133)]=convertApiCriteriaToYaml(_0x42c306[_0x28ad54(0x133)]));if(_0x42c306[_0x28ad54(0x167)]&&Object[_0x28ad54(0x17f)](_0x42c306[_0x28ad54(0x167)])['length']>0x0){const _0x5b7152=orderStepsFromRoot(_0x42c306[_0x28ad54(0x167)],_0x42c306['rootStep']),_0x337be7=new Map(),_0x2dc846=new Set();for(let _0x2ecbc1=0x0;_0x2ecbc1<_0x5b7152[_0x28ad54(0x16d)];_0x2ecbc1++){const {uuid:_0x314e3d,step:_0x320aac}=_0x5b7152[_0x2ecbc1];let _0x42caa9=generateReadableStepName(_0x320aac,_0x2ecbc1),_0xd77621=_0x42caa9,_0x466aba=0x2;while(_0x2dc846[_0x28ad54(0x164)](_0xd77621)){_0xd77621=_0x42caa9+'_'+_0x466aba,_0x466aba++;}_0x2dc846[_0x28ad54(0x1a4)](_0xd77621),_0x337be7[_0x28ad54(0x175)](_0x314e3d,_0xd77621);}_0x235388[_0x28ad54(0x167)]=_0x5b7152[_0x28ad54(0x18c)](({uuid:_0x1c9a61,step:_0x353a03},_0x10170b)=>{const _0x21269a=_0x28ad54,_0x264705=convertApiStepToYaml(_0x353a03,_0x337be7[_0x21269a(0x17c)](_0x1c9a61));return resolveStepReferences(_0x264705,_0x10170b,_0x5b7152,_0x337be7),_0x264705;});}return _0x235388;}function convertApiCriteriaToYaml(_0x5ab49e){const _0x508a33=a151_0x4992,_0x11248b={'name':_0x5ab49e['name'],'segment':_0x5ab49e[_0x508a33(0x188)]};_0x5ab49e['description']&&(_0x11248b[_0x508a33(0x1e1)]=_0x5ab49e[_0x508a33(0x1e1)]);if(_0x5ab49e[_0x508a33(0x1ae)]){let _0x17672d=_0x5ab49e['target']['journeyId'],_0x2824d0=_0x5ab49e[_0x508a33(0x1ae)][_0x508a33(0x160)];if(_0x5ab49e[_0x508a33(0x1ae)]['journeyName']){const _0x512565=parseJumpTargetDisplayName(_0x5ab49e[_0x508a33(0x1ae)][_0x508a33(0x16b)]);_0x512565&&(_0x2824d0=_0x512565[_0x508a33(0x1bb)],_0x17672d=_0x512565['journeyName']);}_0x11248b[_0x508a33(0x1ae)]={'journey':_0x17672d,'stage':_0x2824d0},_0x5ab49e[_0x508a33(0x1ae)][_0x508a33(0x1d7)]&&(_0x11248b[_0x508a33(0x1ae)]['bundle_id']=_0x5ab49e[_0x508a33(0x1ae)][_0x508a33(0x1d7)]);}return _0x11248b;}function convertApiStepToYaml(_0x316ac8,_0x444ed3){const _0x5493f1=a151_0x4992;switch(_0x316ac8['type']){case _0x5493f1(0x1b6):{const _0x1845ff={};if(_0x316ac8[_0x5493f1(0x169)]===_0x5493f1(0x16f)&&_0x316ac8[_0x5493f1(0x178)]!==undefined)_0x1845ff[_0x5493f1(0x137)]=_0x316ac8[_0x5493f1(0x178)],_0x1845ff['unit']=_0x316ac8[_0x5493f1(0x1d0)];else{if(_0x316ac8['waitStepType']===_0x5493f1(0x1d5)&&_0x316ac8[_0x5493f1(0x1ca)])_0x1845ff[_0x5493f1(0x1cf)]=_0x316ac8[_0x5493f1(0x1ca)];else{if(_0x316ac8['waitStepType']==='DaysOfTheWeek'&&_0x316ac8[_0x5493f1(0x177)])_0x1845ff[_0x5493f1(0x168)]=_0x316ac8[_0x5493f1(0x177)];else{if(_0x316ac8[_0x5493f1(0x169)]===_0x5493f1(0x1d2)){if(_0x316ac8[_0x5493f1(0x1b5)]&&_0x316ac8[_0x5493f1(0x1b5)][_0x5493f1(0x16d)]>0x0){const _0x2b85e4=_0x316ac8[_0x5493f1(0x1b5)]['find'](_0x2be5e3=>!_0x2be5e3['timedOutPath']),_0x3a4290=_0x316ac8[_0x5493f1(0x1b5)][_0x5493f1(0x17d)](_0x573a92=>_0x573a92[_0x5493f1(0x19f)]);_0x2b85e4?.[_0x5493f1(0x188)]&&(_0x1845ff[_0x5493f1(0x1b3)]={'segment':_0x2b85e4[_0x5493f1(0x188)],..._0x2b85e4[_0x5493f1(0x14d)]?{'next':_0x2b85e4[_0x5493f1(0x14d)]}:{}},_0x3a4290&&_0x3a4290[_0x5493f1(0x19c)]!==undefined&&_0x3a4290[_0x5493f1(0x15f)]&&(_0x1845ff['condition']['timeout']={'duration':_0x3a4290['moveAfter'],'unit':_0x3a4290['unit'],..._0x3a4290[_0x5493f1(0x14d)]?{'next':_0x3a4290[_0x5493f1(0x14d)]}:{}}));}else _0x316ac8['conditionSegmentId']&&(_0x1845ff[_0x5493f1(0x1b3)]={'segment':_0x316ac8['conditionSegmentId']},_0x316ac8[_0x5493f1(0x1b7)]!==undefined&&_0x316ac8[_0x5493f1(0x192)]&&(_0x1845ff[_0x5493f1(0x1b3)][_0x5493f1(0x1c3)]={'duration':_0x316ac8['conditionTimeoutDuration'],'unit':_0x316ac8[_0x5493f1(0x192)]}));}}}}const _0x3978ba={'type':_0x5493f1(0x187),'name':_0x444ed3,..._0x316ac8['next']?{'next':_0x316ac8[_0x5493f1(0x14d)]}:{},'with':_0x1845ff};return _0x3978ba;}case _0x5493f1(0x144):{const _0x58ba1a={'type':_0x5493f1(0x197),'name':_0x444ed3,..._0x316ac8[_0x5493f1(0x14d)]?{'next':_0x316ac8['next']}:{},'with':{'activation':_0x316ac8[_0x5493f1(0x174)]||''}};return _0x58ba1a;}case _0x5493f1(0x1e2):{const _0x27a3c6={'type':_0x5493f1(0x1dc),'name':_0x444ed3,..._0x316ac8[_0x5493f1(0x14d)]?{'next':_0x316ac8['next']}:{},'with':{'branches':(_0x316ac8[_0x5493f1(0x1c2)]||[])[_0x5493f1(0x18c)](_0xc860fe=>({'name':_0xc860fe['name'],'segment':_0xc860fe['segmentId'],'excluded':_0xc860fe['excludedPath'],..._0xc860fe['next']?{'next':_0xc860fe[_0x5493f1(0x14d)]}:{}}))}};return _0x27a3c6;}case'ABTest':case _0x5493f1(0x14e):case _0x5493f1(0x19d):{const _0x1cc846=_0x316ac8[_0x5493f1(0x1af)]||(_0x316ac8[_0x5493f1(0x1c2)]||[])[_0x5493f1(0x18c)](_0x4ec3d3=>({'name':_0x4ec3d3[_0x5493f1(0x155)],'percentage':0x0,'next':_0x4ec3d3[_0x5493f1(0x14d)]})),_0x1c5db7={'type':_0x5493f1(0x1dd),'name':_0x444ed3,..._0x316ac8[_0x5493f1(0x14d)]?{'next':_0x316ac8[_0x5493f1(0x14d)]}:{},'with':{'customized_split':_0x316ac8[_0x5493f1(0x157)],'unique_id':_0x316ac8[_0x5493f1(0x1be)],'variants':_0x1cc846[_0x5493f1(0x18c)](_0x4562bc=>({'name':_0x4562bc[_0x5493f1(0x155)],'percentage':_0x4562bc[_0x5493f1(0x1c5)],..._0x4562bc[_0x5493f1(0x14d)]?{'next':_0x4562bc['next']}:{}}))}};return _0x1c5db7;}case _0x5493f1(0x132):{const _0xdafca1={'type':_0x5493f1(0x186),'name':_0x444ed3,..._0x316ac8[_0x5493f1(0x14d)]?{'next':_0x316ac8['next']}:{}};return _0xdafca1;}case'Jump':{let _0x1dc0b9='',_0x141343='',_0x23b8d0;if(_0x316ac8[_0x5493f1(0x1ae)]){_0x1dc0b9=_0x316ac8[_0x5493f1(0x1ae)][_0x5493f1(0x182)],_0x141343=_0x316ac8[_0x5493f1(0x1ae)]['journeyStageId'],_0x23b8d0=_0x316ac8['target'][_0x5493f1(0x1d7)];if(_0x316ac8[_0x5493f1(0x1ae)][_0x5493f1(0x16b)]){const _0xb48dc6=parseJumpTargetDisplayName(_0x316ac8['target'][_0x5493f1(0x16b)]);_0xb48dc6&&(_0x141343=_0xb48dc6[_0x5493f1(0x1bb)],_0x1dc0b9=_0xb48dc6[_0x5493f1(0x16b)]);}}const _0xf5840b={'type':_0x5493f1(0x1ac),'name':_0x444ed3,..._0x316ac8[_0x5493f1(0x14d)]?{'next':_0x316ac8[_0x5493f1(0x14d)]}:{},'with':{'target':{'journey':_0x1dc0b9,'stage':_0x141343,..._0x23b8d0?{'bundle_id':_0x23b8d0}:{}}}};return _0xf5840b;}case _0x5493f1(0x1a1):{const _0x285ca4={'type':_0x5493f1(0x14c),'name':_0x444ed3};return _0x285ca4;}default:{const _0x552ff1={'type':_0x5493f1(0x14c),'name':_0x444ed3};return _0x552ff1;}}}export async function journeyDefToRequest(_0x243505,_0x35ae9f,_0x469788){const _0x416f42=a151_0x4992,_0x47e66f=_0x243505[_0x416f42(0x18f)]||getActiveStages(_0x243505),_0x58265d=isJourneysArrayMode(_0x243505)||isMultiVersionMode(_0x243505)?getLatestJourneyEntry(_0x243505):undefined,_0x3ff6bd=_0x58265d?.[_0x416f42(0x1cd)]??_0x243505[_0x416f42(0x155)],_0x1e356d=_0x243505[_0x416f42(0x1cb)]||{},_0x14b1a1=_0x243505[_0x416f42(0x172)]||{},_0x52a17f={'type':_0x416f42(0x173),'attributes':{'name':_0x3ff6bd,'audienceId':_0x35ae9f,'journeyStages':await Promise[_0x416f42(0x142)](_0x47e66f[_0x416f42(0x18c)](_0x1d9ed6=>convertYamlStageToApi(_0x1d9ed6,_0x469788,_0x1e356d,_0x14b1a1)))}},_0x201b71=_0x58265d?.['id']??_0x243505['id'];_0x201b71&&(_0x52a17f['id']=_0x201b71);_0x243505[_0x416f42(0x1e1)]&&(_0x52a17f[_0x416f42(0x1b0)]['description']=_0x243505['description']);const _0x493405=getEffectiveGoal(_0x243505);_0x493405&&(_0x52a17f[_0x416f42(0x1b0)][_0x416f42(0x13b)]=await convertYamlCriteriaToApi(_0x493405,_0x469788,_0x1e356d));const _0x1d6ba4=getEffectiveReentry(_0x243505);return _0x1d6ba4&&(_0x52a17f[_0x416f42(0x1b0)]['reentryMode']=_0x1d6ba4,_0x52a17f['attributes']['allowReentry']=_0x1d6ba4!=='no_reentry'),_0x243505['folder_id']&&(_0x52a17f[_0x416f42(0x1b9)]={'parentFolder':{'data':{'id':_0x243505['folder_id'],'type':_0x416f42(0x18b)}}}),_0x52a17f;}async function convertYamlStageToApi(_0x80ed0a,_0x2f90fa,_0x3ca384={},_0x5bb4ca={}){const _0x1a614f=a151_0x4992,_0x2b8f1a={'name':_0x80ed0a[_0x1a614f(0x155)]};_0x80ed0a['id']&&(_0x2b8f1a['id']=_0x80ed0a['id']);_0x80ed0a[_0x1a614f(0x1e1)]&&(_0x2b8f1a[_0x1a614f(0x1e1)]=_0x80ed0a[_0x1a614f(0x1e1)]);_0x80ed0a[_0x1a614f(0x152)]&&(_0x2b8f1a['entryCriteria']=await convertYamlCriteriaToApi(_0x80ed0a[_0x1a614f(0x152)],_0x2f90fa,_0x3ca384));_0x80ed0a[_0x1a614f(0x1d9)]&&_0x80ed0a[_0x1a614f(0x1d9)]['length']>0x0&&(_0x2b8f1a['exitCriterias']=await Promise[_0x1a614f(0x142)](_0x80ed0a[_0x1a614f(0x1d9)][_0x1a614f(0x18c)](_0x1e8613=>convertYamlCriteriaToApi(_0x1e8613,_0x2f90fa,_0x3ca384))));_0x80ed0a[_0x1a614f(0x133)]&&(_0x2b8f1a[_0x1a614f(0x133)]=await convertYamlCriteriaToApi(_0x80ed0a[_0x1a614f(0x133)],_0x2f90fa,_0x3ca384));if(_0x80ed0a['steps']&&_0x80ed0a[_0x1a614f(0x167)][_0x1a614f(0x16d)]>0x0){const _0x5f33ef={},_0x1ea646=_0x80ed0a['steps'][_0x1a614f(0x18c)]((_0x5f3c0c,_0x57ff65)=>{const _0x29b2a9=_0x1a614f,_0x582a70=_0x5f3c0c[_0x29b2a9(0x162)]||generateUUID(),_0x36bcc2=_0x5f3c0c['name']||_0x5f3c0c['type']+'_'+_0x57ff65;return _0x5f33ef[_0x36bcc2]=_0x582a70,{..._0x5f3c0c,'name':_0x36bcc2};});_0x2b8f1a[_0x1a614f(0x1ba)]=_0x5f33ef[_0x1ea646[0x0][_0x1a614f(0x155)]],_0x2b8f1a[_0x1a614f(0x167)]={};for(let _0x4fcb55=0x0;_0x4fcb55<_0x1ea646['length'];_0x4fcb55++){const _0x1b83d3=_0x1ea646[_0x4fcb55],_0x407e58=_0x5f33ef[_0x1b83d3[_0x1a614f(0x155)]],_0x560906=!_0x1b83d3[_0x1a614f(0x14d)]&&_0x4fcb55<_0x1ea646[_0x1a614f(0x16d)]-0x1&&_0x1b83d3[_0x1a614f(0x1e3)]!=='end'?_0x1ea646[_0x4fcb55+0x1][_0x1a614f(0x155)]:_0x1b83d3['next'],_0x241d08=_0x560906!==_0x1b83d3[_0x1a614f(0x14d)]?{..._0x1b83d3,'next':_0x560906}:_0x1b83d3;_0x2b8f1a['steps'][_0x407e58]=await convertYamlStepToApi(_0x241d08,_0x2f90fa,_0x3ca384,_0x5f33ef,_0x5bb4ca);}}else _0x80ed0a['root_step']&&(_0x2b8f1a[_0x1a614f(0x1ba)]=_0x80ed0a['root_step']);return _0x2b8f1a;}async function convertYamlCriteriaToApi(_0x2721ec,_0x12d3e6,_0x208b5c={}){const _0x3ca31f=a151_0x4992;let _0x5d7148=_0x2721ec[_0x3ca31f(0x1a2)];if(_0x5d7148&&!/^\d+$/['test'](_0x5d7148)){const _0x5cc3de=parseSegmentRef(_0x5d7148);if(_0x5cc3de['type']===_0x3ca31f(0x147))_0x12d3e6?.[_0x3ca31f(0x1c9)]&&(_0x5d7148=await _0x12d3e6[_0x3ca31f(0x1c9)](_0x5cc3de[_0x3ca31f(0x155)]));else{if(_0x5cc3de[_0x3ca31f(0x1e3)]===_0x3ca31f(0x1aa)&&_0x208b5c[_0x5cc3de['name']])_0x12d3e6?.['resolveEmbeddedSegmentId']&&(_0x5d7148=await _0x12d3e6[_0x3ca31f(0x196)](_0x5cc3de[_0x3ca31f(0x155)],_0x208b5c[_0x5cc3de[_0x3ca31f(0x155)]]));else _0x12d3e6?.['resolveSegmentId']&&(_0x5d7148=await _0x12d3e6[_0x3ca31f(0x1c9)](_0x5cc3de['name']));}}const _0x14bbf7={'name':_0x2721ec[_0x3ca31f(0x155)],'segmentId':_0x5d7148};_0x2721ec[_0x3ca31f(0x1e1)]&&(_0x14bbf7[_0x3ca31f(0x1e1)]=_0x2721ec['description']);if(_0x2721ec['target']){const _0x329f69=_0x2721ec[_0x3ca31f(0x1ae)][_0x3ca31f(0x173)],_0x2db7e9=_0x2721ec[_0x3ca31f(0x1ae)][_0x3ca31f(0x16e)];let _0x8dd7fa=_0x2721ec['target'][_0x3ca31f(0x173)];_0x12d3e6?.[_0x3ca31f(0x143)]&&!/^\d+$/['test'](_0x8dd7fa)&&(_0x8dd7fa=await _0x12d3e6[_0x3ca31f(0x143)](_0x8dd7fa));let _0x2a3eed=_0x2721ec['target'][_0x3ca31f(0x16e)];_0x12d3e6?.[_0x3ca31f(0x176)]&&!/^\d+$/[_0x3ca31f(0x140)](_0x2a3eed)&&(_0x2a3eed=await _0x12d3e6['resolveStageId'](_0x8dd7fa,_0x2a3eed));const _0x2e6a2b=!/^\d+$/[_0x3ca31f(0x140)](_0x329f69)&&!isLocalJourneyRef(_0x329f69)?formatApiJourneyName(_0x329f69,_0x2db7e9):undefined;_0x14bbf7[_0x3ca31f(0x1ae)]={'journeyId':_0x8dd7fa,'journeyStageId':_0x2a3eed,'journeyName':_0x2e6a2b,'confirmed':!![]},_0x2721ec[_0x3ca31f(0x1ae)][_0x3ca31f(0x1e4)]&&(_0x14bbf7[_0x3ca31f(0x1ae)][_0x3ca31f(0x1d7)]=_0x2721ec[_0x3ca31f(0x1ae)][_0x3ca31f(0x1e4)]);}return _0x14bbf7;}async function convertYamlStepToApi(_0x2689f6,_0x514616,_0x284bb6={},_0x9142c8={},_0x24207d={}){const _0x4c1ede=a151_0x4992,_0x2ab782=async _0x3f9328=>{const _0x1ea1e6=a151_0x4992;if(/^\d+$/[_0x1ea1e6(0x140)](_0x3f9328))return _0x3f9328;const _0x497740=parseSegmentRef(_0x3f9328);if(_0x497740[_0x1ea1e6(0x1e3)]===_0x1ea1e6(0x147)){if(_0x514616?.[_0x1ea1e6(0x1c9)])return await _0x514616[_0x1ea1e6(0x1c9)](_0x497740[_0x1ea1e6(0x155)]);}else{if(_0x497740[_0x1ea1e6(0x1e3)]===_0x1ea1e6(0x1aa)&&_0x284bb6[_0x497740['name']]){if(_0x514616?.[_0x1ea1e6(0x196)])return await _0x514616['resolveEmbeddedSegmentId'](_0x497740[_0x1ea1e6(0x155)],_0x284bb6[_0x497740['name']]);}else{if(_0x514616?.['resolveSegmentId'])return await _0x514616[_0x1ea1e6(0x1c9)](_0x497740['name']);}}return _0x3f9328;},_0x2aa8ca=async _0x59ba95=>{const _0x5afcf8=a151_0x4992;if(/^\d+$/['test'](_0x59ba95))return _0x59ba95;const _0x57dede=parseSegmentRef(_0x59ba95);if(_0x57dede[_0x5afcf8(0x1e3)]===_0x5afcf8(0x147)){if(_0x514616?.['resolveActivationId'])return await _0x514616[_0x5afcf8(0x1b1)](_0x57dede['name']);return _0x57dede[_0x5afcf8(0x155)];}else{if(_0x57dede[_0x5afcf8(0x1e3)]===_0x5afcf8(0x1aa)&&_0x24207d[_0x57dede[_0x5afcf8(0x155)]]){if(_0x514616?.[_0x5afcf8(0x1b8)])return await _0x514616[_0x5afcf8(0x1b8)](_0x57dede[_0x5afcf8(0x155)],_0x24207d[_0x57dede[_0x5afcf8(0x155)]]);if(_0x514616?.[_0x5afcf8(0x1b1)])return await _0x514616[_0x5afcf8(0x1b1)](_0x57dede[_0x5afcf8(0x155)]);}else{if(_0x514616?.['resolveActivationId'])return await _0x514616['resolveActivationId'](_0x57dede[_0x5afcf8(0x155)]);}}return _0x59ba95;},_0xc5b26c=_0x5c772e=>{const _0x594c4b=a151_0x4992;if(!_0x5c772e)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x594c4b(0x140)](_0x5c772e))return _0x5c772e;return _0x9142c8[_0x5c772e]||_0x5c772e;};switch(_0x2689f6[_0x4c1ede(0x1e3)]){case _0x4c1ede(0x187):{const _0x47cb7b=_0x2689f6,_0x449d35=_0x47cb7b[_0x4c1ede(0x14a)],_0x1b04c5={'type':_0x4c1ede(0x1b6),'name':_0x47cb7b['name'],'next':_0xc5b26c(_0x47cb7b[_0x4c1ede(0x14d)])};if(_0x449d35[_0x4c1ede(0x137)]!==undefined&&_0x449d35[_0x4c1ede(0x15f)])_0x1b04c5[_0x4c1ede(0x169)]=_0x4c1ede(0x16f),_0x1b04c5[_0x4c1ede(0x178)]=_0x449d35[_0x4c1ede(0x137)],_0x1b04c5[_0x4c1ede(0x1d0)]=normalizeWaitUnit(_0x449d35['unit']);else{if(_0x449d35['wait_until'])_0x1b04c5[_0x4c1ede(0x169)]=_0x4c1ede(0x1d5),_0x1b04c5['waitUntilDate']=_0x449d35[_0x4c1ede(0x1cf)];else{if(_0x449d35['days_of_week'])_0x1b04c5[_0x4c1ede(0x169)]=_0x4c1ede(0x1d3),_0x1b04c5[_0x4c1ede(0x177)]=_0x449d35[_0x4c1ede(0x168)];else{if(_0x449d35[_0x4c1ede(0x1b3)]){_0x1b04c5[_0x4c1ede(0x169)]='Condition';const _0x8b7d7a=await _0x2ab782(_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1a2)]),_0x4790b7=_0x449d35['condition']['timeout']?.['next']!==undefined;if(_0x4790b7){const _0x3b7353=[];_0x3b7353[_0x4c1ede(0x1e5)]({'id':generateUUID(),'segmentId':_0x8b7d7a,'timedOutPath':![],'name':_0x4c1ede(0x171),'next':_0xc5b26c(_0x449d35[_0x4c1ede(0x1b3)]['next']??_0x47cb7b['next'])});if(_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1c3)]){const _0x1678e9=_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1c3)][_0x4c1ede(0x137)],_0x2b150f=normalizeWaitUnit(_0x449d35['condition'][_0x4c1ede(0x1c3)][_0x4c1ede(0x15f)]);_0x3b7353[_0x4c1ede(0x1e5)]({'id':generateUUID(),'timedOutPath':!![],'name':'*Max\x20wait\x20'+_0x1678e9+'\x20'+_0x2b150f,'moveAfter':_0x1678e9,'unit':_0x2b150f,'next':_0xc5b26c(_0x449d35['condition']['timeout'][_0x4c1ede(0x14d)])});}_0x1b04c5[_0x4c1ede(0x1b5)]=_0x3b7353,delete _0x1b04c5['next'];}else _0x1b04c5[_0x4c1ede(0x14f)]=_0x8b7d7a,_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1c3)]&&(_0x1b04c5[_0x4c1ede(0x1b7)]=_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1c3)]['duration'],_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1c3)][_0x4c1ede(0x15f)]&&(_0x1b04c5['conditionTimeoutUnit']=normalizeWaitUnit(_0x449d35[_0x4c1ede(0x1b3)][_0x4c1ede(0x1c3)][_0x4c1ede(0x15f)])));}}}}return _0x1b04c5;}case _0x4c1ede(0x197):{const _0x5ce3db=_0x2689f6,_0x2e4ae6=_0x5ce3db[_0x4c1ede(0x14a)][_0x4c1ede(0x197)],_0x29d765=await _0x2aa8ca(_0x2e4ae6);return{'type':_0x4c1ede(0x144),'name':_0x5ce3db[_0x4c1ede(0x155)],'journeyActivationStepId':_0x29d765,'next':_0xc5b26c(_0x5ce3db['next'])};}case _0x4c1ede(0x1dc):{const _0x1102ec=_0x2689f6,_0x4cd801=_0x1102ec['with'][_0x4c1ede(0x1c2)];return{'type':_0x4c1ede(0x1e2),'name':_0x1102ec['name'],'branches':await Promise['all'](_0x4cd801[_0x4c1ede(0x18c)](async _0x48adb9=>{const _0x3aa6d0=_0x4c1ede;let _0x14b447='';if(!_0x48adb9[_0x3aa6d0(0x1a9)]){const _0x2683f7=_0x48adb9[_0x3aa6d0(0x1a2)]||_0x48adb9['segment_id']||'';_0x14b447=_0x2683f7?await _0x2ab782(_0x2683f7):'';}return{'id':crypto[_0x3aa6d0(0x141)](),'name':_0x48adb9['name'],'description':null,'segmentId':_0x14b447,'excludedPath':_0x48adb9[_0x3aa6d0(0x1a9)]??![],'next':_0xc5b26c(_0x48adb9['next'])};})),'next':_0xc5b26c(_0x1102ec[_0x4c1ede(0x14d)])};}case _0x4c1ede(0x1dd):{const _0x20e7c6=_0x2689f6,_0x446c9c=_0x20e7c6[_0x4c1ede(0x14a)];return{'type':'ABTest','name':_0x20e7c6['name'],'customizedSplit':_0x446c9c[_0x4c1ede(0x185)],'uniqueId':_0x446c9c[_0x4c1ede(0x191)],'variants':_0x446c9c[_0x4c1ede(0x1af)][_0x4c1ede(0x18c)](_0x50a906=>({'id':_0x50a906['id']||generateUUID(),'name':_0x50a906[_0x4c1ede(0x155)],'percentage':_0x50a906[_0x4c1ede(0x1c5)],'next':_0xc5b26c(_0x50a906[_0x4c1ede(0x14d)])})),'next':_0xc5b26c(_0x20e7c6[_0x4c1ede(0x14d)])};}case _0x4c1ede(0x186):return{'type':_0x4c1ede(0x132),'name':_0x2689f6['name'],'next':_0xc5b26c(_0x2689f6['next'])};case'jump':{const _0x59e1ff=_0x2689f6,_0x1333f2=_0x59e1ff[_0x4c1ede(0x14a)][_0x4c1ede(0x1ae)],_0x58e26a=_0x1333f2[_0x4c1ede(0x173)],_0x1f0d73=_0x1333f2[_0x4c1ede(0x16e)];let _0x5b4726=_0x1333f2['journey'];_0x514616?.['resolveJourneyId']&&!/^\d+$/['test'](_0x5b4726)&&(_0x5b4726=await _0x514616[_0x4c1ede(0x143)](_0x5b4726));let _0x40927a=_0x1333f2['stage'];_0x514616?.['resolveStageId']&&!/^\d+$/[_0x4c1ede(0x140)](_0x40927a)&&(_0x40927a=await _0x514616[_0x4c1ede(0x176)](_0x5b4726,_0x40927a));const _0x1eb15c=!/^\d+$/['test'](_0x58e26a)&&!isLocalJourneyRef(_0x58e26a)?formatApiJourneyName(_0x58e26a,_0x1f0d73):undefined;return{'type':_0x4c1ede(0x138),'name':_0x59e1ff[_0x4c1ede(0x155)],'target':{'journeyId':_0x5b4726,'journeyStageId':_0x40927a,'journeyBundleId':_0x1333f2[_0x4c1ede(0x1e4)],'journeyName':_0x1eb15c,'confirmed':!![]},'next':_0xc5b26c(_0x59e1ff[_0x4c1ede(0x14d)])};}case _0x4c1ede(0x14c):return{'type':_0x4c1ede(0x1a1),'name':_0x2689f6[_0x4c1ede(0x155)]};default:{const _0x52a47b=_0x2689f6;return{'type':_0x4c1ede(0x1a1),'name':_0x52a47b[_0x4c1ede(0x155)]};}}}export function toYamlString(_0x208b70){const _0x246430=a151_0x4992,_0x479cdd=stripInternalFields(_0x208b70),_0xb8b7b3=a151_0xdcc9b1['stringify'](_0x479cdd,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x246430(0x1e7)}),_0x10499b=[_0x246430(0x163),_0x246430(0x19a),_0x246430(0x189),'reentry:','journeys:',_0x246430(0x13c),_0x246430(0x131)];let _0x2180f8=_0xb8b7b3;for(const _0x418bcb of _0x10499b){_0x2180f8=_0x2180f8[_0x246430(0x1c6)](new RegExp('^('+_0x418bcb+')','m'),(_0xd8772c,_0x1e1b2d,_0x430a52)=>{if(_0x430a52===0x0||_0x2180f8[_0x430a52-0x1]==='\x0a'&&_0x2180f8[_0x430a52-0x2]==='\x0a')return _0x1e1b2d;return'\x0a'+_0x1e1b2d;});}return _0x2180f8;}function stripInternalFields(_0x5b97c9){const _0x50642f=a151_0x4992,{id:_0x1d7313,folder_id:_0x222963,bundle_id:_0x22c673,bundle_name:_0x10444a,version:_0x1911fc,allow_reentry:_0x1eec5f,..._0x16e8b7}=_0x5b97c9;return _0x16e8b7['journeys']&&(_0x16e8b7['journeys']=_0x16e8b7['journeys'][_0x50642f(0x18c)](_0x21c7fd=>{const _0x2d42ba=_0x50642f,{id:_0x7f094e,..._0x8eaa88}=_0x21c7fd;return{..._0x8eaa88,'stages':_0x8eaa88['stages']['map'](stripStageInternalFields),..._0x21c7fd[_0x2d42ba(0x180)]===!![]?{'latest':!![]}:{},..._0x16e8b7[_0x2d42ba(0x13d)][_0x2d42ba(0x16d)]===0x1&&_0x8eaa88[_0x2d42ba(0x1cd)]==='v1'?{'version':undefined}:{}};})),_0x16e8b7[_0x50642f(0x18f)]&&(_0x16e8b7[_0x50642f(0x18f)]=_0x16e8b7[_0x50642f(0x18f)][_0x50642f(0x18c)](stripStageInternalFields)),_0x16e8b7['versions']&&(_0x16e8b7[_0x50642f(0x1c4)]=_0x16e8b7['versions'][_0x50642f(0x18c)](_0x1abaaa=>{const _0x48ac61=_0x50642f,{id:_0x484702,..._0x855126}=_0x1abaaa;return{..._0x855126,'stages':_0x855126['stages'][_0x48ac61(0x18c)](stripStageInternalFields),..._0x1abaaa[_0x48ac61(0x180)]===!![]?{'latest':!![]}:{}};})),_0x16e8b7;}function stripStageInternalFields(_0x5a6e13){const {id:_0x3961f5,..._0x4b480f}=_0x5a6e13;return _0x4b480f;}export function parseYamlString(_0x48e617){return safeParseYaml(_0x48e617,JourneyDefSchema);}export function isJourneyDef(_0x546fc8,_0x383341){const _0x1255cb=a151_0x4992;if(_0x383341&&(_0x383341['endsWith'](_0x1255cb(0x156))||_0x383341['endsWith'](_0x1255cb(0x1d4))))return!![];return typeof _0x546fc8===_0x1255cb(0x1db)&&_0x546fc8!==null&&_0x1255cb(0x1e3)in _0x546fc8&&_0x546fc8[_0x1255cb(0x1e3)]===_0x1255cb(0x173);}export function generateTemplate(_0x17a695,_0x2fd618){const _0xce8645=a151_0x4992,_0x87c888={'type':_0xce8645(0x173),'name':_0x17a695,'description':'Journey\x20description','reentry':_0xce8645(0x145),'goal':{'name':_0xce8645(0x1a5),'segment':_0xce8645(0x1d1)},'stages':[{'name':'Stage\x201','description':_0xce8645(0x1c7),'entry_criteria':{'name':_0xce8645(0x1bc),'segment':_0x2fd618},'steps':[{'type':'wait','name':_0xce8645(0x18e),'with':{'duration':0x1,'unit':_0xce8645(0x146)}},{'type':'activation','name':'Send\x20Notification','with':{'activation':'your-activation-name'}},{'type':_0xce8645(0x14c),'name':_0xce8645(0x12f)}]}]};return toYamlString(_0x87c888);}function generateUUID(){const _0x27821f=a151_0x4992;return crypto[_0x27821f(0x141)]();}export const SEGMENT_REF_PREFIX='ref:';export function parseSegmentRef(_0x5a023d){const _0x39f21f=a151_0x4992;if(_0x5a023d[_0x39f21f(0x15c)](SEGMENT_REF_PREFIX))return{'type':_0x39f21f(0x147),'name':_0x5a023d['slice'](SEGMENT_REF_PREFIX[_0x39f21f(0x16d)])};if(/^\d+$/[_0x39f21f(0x140)](_0x5a023d))return{'type':'id','name':_0x5a023d};return{'type':_0x39f21f(0x1aa),'name':_0x5a023d};}export function makeSegmentRef(_0x2ac0f1){return''+SEGMENT_REF_PREFIX+_0x2ac0f1;}export function isExternalSegmentRef(_0x4192e9){return _0x4192e9['startsWith'](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x1dae88){const _0x278f32=a151_0x4992;return!!(_0x1dae88['journeys']&&_0x1dae88['journeys'][_0x278f32(0x16d)]>0x0);}export function isMultiVersionMode(_0x7b62d3){const _0x5445e1=a151_0x4992;return!!(_0x7b62d3['versions']&&_0x7b62d3[_0x5445e1(0x1c4)][_0x5445e1(0x16d)]>0x0);}export function isSingleVersionMode(_0x447018){const _0x3e181c=a151_0x4992;return!!(_0x447018['stages']&&_0x447018[_0x3e181c(0x18f)]['length']>0x0);}export function hasMultipleVersions(_0x301725){const _0x56f748=a151_0x4992;if(isJourneysArrayMode(_0x301725))return(_0x301725[_0x56f748(0x13d)]?.[_0x56f748(0x16d)]||0x0)>0x1;if(isMultiVersionMode(_0x301725))return(_0x301725['versions']?.[_0x56f748(0x16d)]||0x0)>0x1;return![];}function a151_0x4ff2(){const _0x3baa0d=['JOURNEY_SYNTAX_ERROR','from','definition','startsWith','toLowerCase','\x20\x20rule:\x0a','unit','journeyStageId','journeyBundleName','uuid','segments:','has','isArray','all_columns','steps','days_of_week','waitStepType','values','journeyName','Expected\x20format:\x0a','length','stage','Duration','week','Met\x20condition(s)','activations','journey','journeyActivationStepId','set','resolveStageId','daysOfWeek','waitStep','filter','exitCriterias','\x20\x20\x20\x20conditions:\x0a','get','find','trim','keys','latest','resolveActivation','journeyId','waitCondition','stageId','customized_split','merge','wait','segmentId','goal:','5128690oYnMHS','folder','map','folder_id','Wait\x201\x20Day','stages','columns','unique_id','conditionTimeoutUnit','2258034HHKyHQ','973911soaBPn','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','resolveEmbeddedSegmentId','activation','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','resolveSegment','activations:','rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27','moveAfter','Variant','connection','timedOutPath','notification','End','segment','versionNumber','add','Goal\x20Achieved','Composite','parentFolder','version_number','excluded','embedded','allowReentry','jump','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','target','variants','attributes','resolveActivationId','behavior','condition','resolveJumpTarget','conditions','WaitStep','conditionTimeoutDuration','resolveEmbeddedActivationId','relationships','rootStep','stageName','Entry\x20Criteria','schedule','uniqueId','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','isJourneyLocal','rule','branches','timeout','versions','percentage','replace','First\x20stage\x20of\x20the\x20journey','reentry_always','resolveSegmentId','waitUntilDate','segments','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','version','size','wait_until','waitStepUnit','goal-segment','Condition','DaysOfTheWeek','.journey.yaml','Date','journeyStages','journeyBundleId','connector_config','exit_criteria','resolveActivationName','object','decision_point','ab_test','data','match','sort','description','DecisionPoint','type','bundle_id','push','1783585VWKhMr','null','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','includes','shift','days','Stage\x20Complete','1570796RgGIlc','versions:','Merge','milestone','state','reentryMode','1807062bAQRTX','duration','Jump','\x27:\x20','launched','goal','stages:','journeys','activation_template_id','(missing)','test','randomUUID','all','resolveJourneyId','Activation','no_reentry','day','ref','entryCriteria','1932044JKMaOa','with','reentry','end','next','AbTest','conditionSegmentId','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','entries','entry_criteria','\x20\x20\x20\x20type:\x20','\x27.\x0a','name','.journey.yml','customizedSplit','resolveSegmentName'];a151_0x4ff2=function(){return _0x3baa0d;};return a151_0x4ff2();}export function normalizeToJourneysFormat(_0x5c9469){const _0x4ecc04=a151_0x4992;if(isJourneysArrayMode(_0x5c9469))return _0x5c9469;if(isSingleVersionMode(_0x5c9469)){const {stages:_0x39ebe6,id:_0x5c6f4f,version:_0x4bd3fc,version_number:_0x4343cc,..._0x5833f}=_0x5c9469;return{..._0x5833f,'journeys':[{'version':_0x4bd3fc||'v1','stages':_0x39ebe6||[],'id':_0x5c6f4f,'version_number':_0x4343cc}]};}if(isMultiVersionMode(_0x5c9469)){const {versions:_0x38eb97,..._0x18bf8f}=_0x5c9469;return{..._0x18bf8f,'journeys':(_0x38eb97||[])[_0x4ecc04(0x18c)](_0x1f16ee=>({'version':_0x1f16ee[_0x4ecc04(0x155)],'state':_0x1f16ee['state'],'latest':_0x1f16ee[_0x4ecc04(0x180)],'stages':_0x1f16ee[_0x4ecc04(0x18f)],'id':_0x1f16ee['id'],'version_number':_0x1f16ee[_0x4ecc04(0x1a8)]}))};}return _0x5c9469;}export function normalizeJourneyDef(_0x157703,_0x271402){const _0x3c04cc=a151_0x4992,_0x4dcdfa=normalizeToJourneysFormat(_0x157703),_0x3ff441=_0x271402?.[_0x3c04cc(0x1cb)]?Object[_0x3c04cc(0x17f)](_0x271402[_0x3c04cc(0x1cb)]):undefined,_0x45619f=_0x271402?.[_0x3c04cc(0x172)]?Object[_0x3c04cc(0x17f)](_0x271402[_0x3c04cc(0x172)]):undefined;return{'type':'journey','name':_0x4dcdfa[_0x3c04cc(0x155)],..._0x4dcdfa[_0x3c04cc(0x1e1)]!==undefined&&{'description':_0x4dcdfa['description']},..._0x4dcdfa[_0x3c04cc(0x13b)]&&{'goal':normalizeJourneyCriteria(_0x4dcdfa[_0x3c04cc(0x13b)])},..._0x4dcdfa['reentry']!==undefined&&{'reentry':_0x4dcdfa['reentry']},..._0x4dcdfa[_0x3c04cc(0x1cb)]&&{'segments':normalizeEmbeddedSegments(_0x4dcdfa[_0x3c04cc(0x1cb)],_0x3ff441)},..._0x4dcdfa[_0x3c04cc(0x172)]&&{'activations':normalizeEmbeddedActivations(_0x4dcdfa[_0x3c04cc(0x172)],_0x45619f)},..._0x4dcdfa[_0x3c04cc(0x13d)]&&{'journeys':_0x4dcdfa[_0x3c04cc(0x13d)][_0x3c04cc(0x18c)](_0x3e8a5a=>normalizeJourneyEntry(_0x3e8a5a,_0x4dcdfa[_0x3c04cc(0x13d)]['length']===0x1))}};}function normalizeJourneyEntry(_0x46d066,_0xe0732c){const _0x566ab1=a151_0x4992;return{...!_0xe0732c&&_0x46d066[_0x566ab1(0x1cd)]!==undefined&&{'version':_0x46d066[_0x566ab1(0x1cd)]},..._0x46d066[_0x566ab1(0x134)]!==undefined&&{'state':_0x46d066[_0x566ab1(0x134)]},...!_0xe0732c&&_0x46d066[_0x566ab1(0x180)]!==undefined&&{'latest':_0x46d066['latest']},..._0x46d066[_0x566ab1(0x1a8)]!==undefined&&{'version_number':_0x46d066[_0x566ab1(0x1a8)]},..._0x46d066[_0x566ab1(0x13b)]&&{'goal':normalizeJourneyCriteria(_0x46d066['goal'])},..._0x46d066[_0x566ab1(0x14b)]!==undefined&&{'reentry':_0x46d066['reentry']},'stages':_0x46d066['stages'][_0x566ab1(0x18c)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x15231b){const _0x238383=a151_0x4992;return{'name':_0x15231b['name'],..._0x15231b[_0x238383(0x1e1)]!==undefined&&{'description':_0x15231b[_0x238383(0x1e1)]},..._0x15231b[_0x238383(0x152)]&&{'entry_criteria':normalizeJourneyCriteria(_0x15231b[_0x238383(0x152)])},..._0x15231b[_0x238383(0x1d9)]&&{'exit_criteria':_0x15231b[_0x238383(0x1d9)][_0x238383(0x18c)](normalizeJourneyCriteria)},..._0x15231b[_0x238383(0x133)]&&{'milestone':normalizeJourneyCriteria(_0x15231b[_0x238383(0x133)])},..._0x15231b[_0x238383(0x167)]&&{'steps':normalizeStepsWithImplicitNext(_0x15231b[_0x238383(0x167)])}};}function normalizeStepsWithImplicitNext(_0x459fb1){return _0x459fb1['map']((_0x40d7b7,_0x5f2074)=>{const _0x18bfe6=a151_0x4992,_0x28c6e7=_0x5f2074<_0x459fb1[_0x18bfe6(0x16d)]-0x1?_0x459fb1[_0x5f2074+0x1][_0x18bfe6(0x155)]:undefined;return normalizeJourneyStep(_0x40d7b7,_0x28c6e7);});}function normalizeJourneyCriteria(_0x4c8f25){const _0x4792d9=a151_0x4992;return{'name':_0x4c8f25[_0x4792d9(0x155)],..._0x4c8f25['description']!==undefined&&{'description':_0x4c8f25[_0x4792d9(0x1e1)]},'segment':_0x4c8f25[_0x4792d9(0x1a2)],..._0x4c8f25[_0x4792d9(0x1ae)]&&{'target':normalizeJumpTarget(_0x4c8f25[_0x4792d9(0x1ae)])}};}function normalizeJourneyStep(_0xa206ea,_0x10940b){const _0x2fff85=a151_0x4992,_0x50780e=_0xa206ea[_0x2fff85(0x14d)]!==undefined&&_0xa206ea[_0x2fff85(0x14d)]!==_0x10940b,_0x10f328={'type':_0xa206ea[_0x2fff85(0x1e3)],'name':_0xa206ea[_0x2fff85(0x155)],..._0x50780e&&{'next':_0xa206ea[_0x2fff85(0x14d)]}};if(_0x2fff85(0x14a)in _0xa206ea&&_0xa206ea[_0x2fff85(0x14a)])return{..._0x10f328,'with':normalizeStepParams(_0xa206ea['type'],_0xa206ea[_0x2fff85(0x14a)])};return _0x10f328;}function normalizeStepParams(_0x196bdc,_0x302418){const _0x40cca1=a151_0x4992;switch(_0x196bdc){case _0x40cca1(0x187):{const _0x3d5895=_0x302418;let _0x3f1cb;return _0x3d5895['condition']&&(_0x3f1cb={'segment':_0x3d5895['condition'][_0x40cca1(0x1a2)],..._0x3d5895[_0x40cca1(0x1b3)][_0x40cca1(0x14d)]!==undefined&&{'next':_0x3d5895['condition'][_0x40cca1(0x14d)]},..._0x3d5895['condition']['timeout']&&{'timeout':{'duration':_0x3d5895['condition']['timeout'][_0x40cca1(0x137)],'unit':_0x3d5895[_0x40cca1(0x1b3)]['timeout'][_0x40cca1(0x15f)],..._0x3d5895['condition']['timeout'][_0x40cca1(0x14d)]!==undefined&&{'next':_0x3d5895[_0x40cca1(0x1b3)][_0x40cca1(0x1c3)][_0x40cca1(0x14d)]}}}}),{..._0x3d5895[_0x40cca1(0x137)]!==undefined&&{'duration':_0x3d5895[_0x40cca1(0x137)]},..._0x3d5895[_0x40cca1(0x15f)]!==undefined&&{'unit':_0x3d5895[_0x40cca1(0x15f)]},..._0x3d5895[_0x40cca1(0x1cf)]!==undefined&&{'wait_until':_0x3d5895['wait_until']},..._0x3d5895['days_of_week']!==undefined&&{'days_of_week':_0x3d5895['days_of_week']},..._0x3f1cb&&{'condition':_0x3f1cb}};}case'activation':{const _0x4db3e1=_0x302418;return{'activation':_0x4db3e1[_0x40cca1(0x197)]};}case _0x40cca1(0x1dc):{const _0x3bc32b=_0x302418;return{'branches':_0x3bc32b[_0x40cca1(0x1c2)][_0x40cca1(0x18c)](normalizeDecisionBranch)};}case _0x40cca1(0x1dd):{const _0x49f88d=_0x302418;return{..._0x49f88d[_0x40cca1(0x185)]!==undefined&&{'customized_split':_0x49f88d[_0x40cca1(0x185)]},..._0x49f88d[_0x40cca1(0x191)]!==undefined&&{'unique_id':_0x49f88d[_0x40cca1(0x191)]},'variants':_0x49f88d['variants']['map'](normalizeAbTestVariant)};}case'jump':{const _0x114839=_0x302418;return{'target':normalizeJumpTarget(_0x114839['target'])};}default:return _0x302418;}}function normalizeDecisionBranch(_0x28f7d6){const _0x2da662=a151_0x4992;return{'name':_0x28f7d6['name'],..._0x28f7d6['segment']!==undefined&&{'segment':_0x28f7d6[_0x2da662(0x1a2)]},..._0x28f7d6['excluded']!==undefined&&{'excluded':_0x28f7d6[_0x2da662(0x1a9)]},..._0x28f7d6[_0x2da662(0x14d)]!==undefined&&{'next':_0x28f7d6[_0x2da662(0x14d)]}};}function normalizeAbTestVariant(_0x45a470){const _0x1c2ffe=a151_0x4992;return{..._0x45a470['id']!==undefined&&{'id':_0x45a470['id']},'name':_0x45a470[_0x1c2ffe(0x155)],'percentage':_0x45a470['percentage'],..._0x45a470[_0x1c2ffe(0x14d)]!==undefined&&{'next':_0x45a470[_0x1c2ffe(0x14d)]}};}function normalizeJumpTarget(_0x3d6e31){const _0x3f4d3d=a151_0x4992;return{'journey':_0x3d6e31[_0x3f4d3d(0x173)],'stage':_0x3d6e31[_0x3f4d3d(0x16e)],..._0x3d6e31[_0x3f4d3d(0x1e4)]!==undefined&&{'bundle_id':_0x3d6e31[_0x3f4d3d(0x1e4)]}};}function normalizeEmbeddedSegments(_0x2d6c5b,_0x303f8d){const _0x47cc73=a151_0x4992,_0x5acef8={},_0x58a631=Object[_0x47cc73(0x17f)](_0x2d6c5b),_0x42810a=_0x303f8d?[..._0x303f8d[_0x47cc73(0x179)](_0x542de6=>_0x58a631[_0x47cc73(0x1e9)](_0x542de6)),..._0x58a631['filter'](_0x3dbefd=>!_0x303f8d[_0x47cc73(0x1e9)](_0x3dbefd))[_0x47cc73(0x1e0)]()]:_0x58a631[_0x47cc73(0x1e0)]();for(const _0x49904a of _0x42810a){const _0x3168b8=_0x2d6c5b[_0x49904a];if(_0x3168b8[_0x47cc73(0x1c1)]){const _0x247a83=_0x3168b8[_0x47cc73(0x1c1)];if(_0x247a83[_0x47cc73(0x1e3)]!=='And'&&_0x247a83[_0x47cc73(0x1e3)]!=='Or'&&_0x247a83[_0x47cc73(0x1e3)]!==_0x47cc73(0x1a6)){const _0x50aec6=_0x247a83[_0x47cc73(0x1e3)]??_0x47cc73(0x13f);throw new SDKError(ErrorCode[_0x47cc73(0x159)],_0x47cc73(0x1cc)+_0x49904a+'\x27:\x20'+(_0x47cc73(0x19b)+_0x50aec6+_0x47cc73(0x154))+'Expected\x20format:\x0a'+_0x47cc73(0x15e)+'\x20\x20\x20\x20type:\x20And\x0a'+_0x47cc73(0x17b)+_0x47cc73(0x150)+_0x47cc73(0x195)+_0x47cc73(0x198));}if(!_0x247a83[_0x47cc73(0x1b5)]||!Array['isArray'](_0x247a83['conditions']))throw new SDKError(ErrorCode[_0x47cc73(0x159)],'Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27'+_0x49904a+_0x47cc73(0x139)+_0x47cc73(0x1ad)+_0x47cc73(0x16c)+_0x47cc73(0x15e)+(_0x47cc73(0x153)+_0x247a83[_0x47cc73(0x1e3)]+'\x0a')+_0x47cc73(0x17b)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x47cc73(0x195)+_0x47cc73(0x198));}_0x5acef8[_0x49904a]={..._0x3168b8[_0x47cc73(0x1e1)]&&_0x3168b8['description'][_0x47cc73(0x17e)]()&&{'description':_0x3168b8[_0x47cc73(0x1e1)]},..._0x3168b8[_0x47cc73(0x1c1)]&&{'rule':deepSortObject(_0x3168b8[_0x47cc73(0x1c1)])}};}return _0x5acef8;}function normalizeEmbeddedActivations(_0x549a25,_0x5a308c){const _0x58a5a7=a151_0x4992,_0x42ffcd={},_0x47e850=Object[_0x58a5a7(0x17f)](_0x549a25),_0x14f5d1=_0x5a308c?[..._0x5a308c[_0x58a5a7(0x179)](_0x3c798a=>_0x47e850[_0x58a5a7(0x1e9)](_0x3c798a)),..._0x47e850[_0x58a5a7(0x179)](_0x56eed5=>!_0x5a308c[_0x58a5a7(0x1e9)](_0x56eed5))['sort']()]:_0x47e850[_0x58a5a7(0x1e0)]();for(const _0x48cbfd of _0x14f5d1){const _0x42837c=_0x549a25[_0x48cbfd];_0x42ffcd[_0x48cbfd]={'name':_0x42837c[_0x58a5a7(0x155)],'connection':_0x42837c[_0x58a5a7(0x19e)],..._0x42837c['description']!==undefined&&{'description':_0x42837c['description']},..._0x42837c[_0x58a5a7(0x166)]!==undefined&&{'all_columns':_0x42837c[_0x58a5a7(0x166)]},..._0x42837c[_0x58a5a7(0x190)]!==undefined&&{'columns':_0x42837c['columns']},..._0x42837c[_0x58a5a7(0x1b2)]!==undefined&&{'behavior':_0x42837c[_0x58a5a7(0x1b2)]},..._0x42837c[_0x58a5a7(0x1bd)]!==undefined&&{'schedule':_0x42837c[_0x58a5a7(0x1bd)]},..._0x42837c[_0x58a5a7(0x1a0)]!==undefined&&{'notification':_0x42837c[_0x58a5a7(0x1a0)]},..._0x42837c[_0x58a5a7(0x1d8)]!==undefined&&{'connector_config':_0x42837c[_0x58a5a7(0x1d8)]},..._0x42837c[_0x58a5a7(0x13e)]!==undefined&&{'activation_template_id':_0x42837c['activation_template_id']}};}return _0x42ffcd;}export function getActiveStages(_0x244392){const _0x17abf7=a151_0x4992;if(isJourneysArrayMode(_0x244392)){const _0x18e2a7=_0x244392['journeys']||[],_0x1656c0=_0x18e2a7[_0x17abf7(0x17d)](_0x4241fd=>_0x4241fd[_0x17abf7(0x180)]===!![])||_0x18e2a7[0x0];return _0x1656c0?.['stages']||[];}if(isSingleVersionMode(_0x244392))return _0x244392[_0x17abf7(0x18f)]||[];if(isMultiVersionMode(_0x244392)){const _0x16d701=_0x244392[_0x17abf7(0x1c4)]||[],_0x13f0c=_0x16d701[_0x17abf7(0x17d)](_0x1975a4=>_0x1975a4[_0x17abf7(0x180)]===!![])||_0x16d701[0x0];return _0x13f0c?.[_0x17abf7(0x18f)]||[];}return[];}export function getLatestJourneyEntry(_0x57b4a7){const _0x559777=a151_0x4992;if(isJourneysArrayMode(_0x57b4a7)){const _0x269607=_0x57b4a7[_0x559777(0x13d)]||[];return _0x269607[_0x559777(0x17d)](_0x27131f=>_0x27131f['latest']===!![])||_0x269607[0x0];}if(isMultiVersionMode(_0x57b4a7)){const _0x580f0f=_0x57b4a7[_0x559777(0x1c4)]||[],_0x511056=_0x580f0f[_0x559777(0x17d)](_0x6640eb=>_0x6640eb[_0x559777(0x180)]===!![])||_0x580f0f[0x0];if(_0x511056)return{'version':_0x511056[_0x559777(0x155)],'state':_0x511056['state'],'latest':_0x511056['latest'],'stages':_0x511056[_0x559777(0x18f)],'id':_0x511056['id'],'version_number':_0x511056[_0x559777(0x1a8)]};}if(isSingleVersionMode(_0x57b4a7))return{'version':_0x57b4a7['version']||'v1','state':'draft','stages':_0x57b4a7[_0x559777(0x18f)]||[],'id':_0x57b4a7['id'],'version_number':_0x57b4a7[_0x559777(0x1a8)],'goal':_0x57b4a7[_0x559777(0x13b)],'reentry':_0x57b4a7[_0x559777(0x14b)]};return undefined;}export function getLatestVersion(_0x4ff005){const _0x1931c4=a151_0x4992;if(!isMultiVersionMode(_0x4ff005))return undefined;const _0x1eee76=_0x4ff005[_0x1931c4(0x1c4)]||[];return _0x1eee76[_0x1931c4(0x17d)](_0x1f39da=>_0x1f39da['latest']===!![])||_0x1eee76[0x0];}export function getEffectiveGoal(_0x86eb30){const _0x5d03b4=a151_0x4992,_0x30fe4f=getLatestJourneyEntry(_0x86eb30);return _0x30fe4f?.['goal']||_0x86eb30[_0x5d03b4(0x13b)];}export function getEffectiveReentry(_0x4be3fe){const _0xb27d43=a151_0x4992,_0x6e36b2=getLatestJourneyEntry(_0x4be3fe);return _0x6e36b2?.[_0xb27d43(0x14b)]||_0x4be3fe[_0xb27d43(0x14b)];}export function collectSegmentRefs(_0x54dca2){const _0x51a258=a151_0x4992,_0x476a4a=new Set();_0x54dca2['goal']?.[_0x51a258(0x1a2)]&&_0x476a4a[_0x51a258(0x1a4)](_0x54dca2[_0x51a258(0x13b)][_0x51a258(0x1a2)]);const _0x6e65b9=_0x30bc33=>{const _0x2475bf=_0x51a258;for(const _0x33f069 of _0x30bc33){_0x33f069[_0x2475bf(0x152)]?.[_0x2475bf(0x1a2)]&&_0x476a4a['add'](_0x33f069['entry_criteria'][_0x2475bf(0x1a2)]);if(_0x33f069[_0x2475bf(0x1d9)])for(const _0x223de2 of _0x33f069['exit_criteria']){_0x223de2['segment']&&_0x476a4a[_0x2475bf(0x1a4)](_0x223de2[_0x2475bf(0x1a2)]);}_0x33f069[_0x2475bf(0x133)]?.['segment']&&_0x476a4a[_0x2475bf(0x1a4)](_0x33f069[_0x2475bf(0x133)]['segment']);if(_0x33f069['steps'])for(const _0x50fa85 of _0x33f069[_0x2475bf(0x167)]){if(_0x50fa85[_0x2475bf(0x1e3)]===_0x2475bf(0x1dc)){const _0x4b3dba=_0x50fa85;for(const _0x1e8017 of _0x4b3dba[_0x2475bf(0x14a)][_0x2475bf(0x1c2)]){_0x1e8017['segment']&&_0x476a4a[_0x2475bf(0x1a4)](_0x1e8017[_0x2475bf(0x1a2)]);}}else{if(_0x50fa85[_0x2475bf(0x1e3)]===_0x2475bf(0x187)){const _0x3258ca=_0x50fa85;_0x3258ca[_0x2475bf(0x14a)]['condition']?.[_0x2475bf(0x1a2)]&&_0x476a4a[_0x2475bf(0x1a4)](_0x3258ca[_0x2475bf(0x14a)]['condition'][_0x2475bf(0x1a2)]);}}}}};_0x54dca2[_0x51a258(0x18f)]&&_0x6e65b9(_0x54dca2['stages']);if(_0x54dca2[_0x51a258(0x1c4)])for(const _0xf9f674 of _0x54dca2['versions']){_0x6e65b9(_0xf9f674[_0x51a258(0x18f)]);}return _0x476a4a;}export function validateSegmentRefs(_0x23ab1a){const _0xdb2139=a151_0x4992,_0x4ffc46=[],_0x25e138=collectSegmentRefs(_0x23ab1a),_0x5a9d4f=new Set(Object[_0xdb2139(0x17f)](_0x23ab1a[_0xdb2139(0x1cb)]||{}));for(const _0x361c61 of _0x25e138){const _0x17abe9=parseSegmentRef(_0x361c61);_0x17abe9[_0xdb2139(0x1e3)]===_0xdb2139(0x1aa)&&!_0x5a9d4f[_0xdb2139(0x164)](_0x17abe9[_0xdb2139(0x155)])&&_0x4ffc46[_0xdb2139(0x1e5)]('Unknown\x20segment\x20\x22'+_0x17abe9['name']+_0xdb2139(0x1bf)+_0x17abe9[_0xdb2139(0x155)]+_0xdb2139(0x1e8));}return _0x4ffc46;}export function collectSegmentIdsFromJourneyApi(_0x19bd0f){const _0x38aae8=a151_0x4992,_0x457c6c=new Set();_0x19bd0f[_0x38aae8(0x1b0)][_0x38aae8(0x13b)]?.[_0x38aae8(0x188)]&&_0x457c6c[_0x38aae8(0x1a4)](_0x19bd0f['attributes'][_0x38aae8(0x13b)][_0x38aae8(0x188)]);const _0x931f6c=_0x19bd0f[_0x38aae8(0x1b0)]['journeyStages'];if(Array[_0x38aae8(0x165)](_0x931f6c))for(const _0x5d2be7 of _0x931f6c){_0x5d2be7['entryCriteria']?.[_0x38aae8(0x188)]&&_0x457c6c[_0x38aae8(0x1a4)](_0x5d2be7[_0x38aae8(0x148)][_0x38aae8(0x188)]);const _0x9a7203=_0x5d2be7[_0x38aae8(0x17a)]??_0x5d2be7['exitCriteria'];if(Array[_0x38aae8(0x165)](_0x9a7203))for(const _0x40e9be of _0x9a7203){_0x40e9be[_0x38aae8(0x188)]&&_0x457c6c[_0x38aae8(0x1a4)](_0x40e9be[_0x38aae8(0x188)]);}_0x5d2be7[_0x38aae8(0x133)]?.[_0x38aae8(0x188)]&&_0x457c6c['add'](_0x5d2be7[_0x38aae8(0x133)][_0x38aae8(0x188)]);if(_0x5d2be7[_0x38aae8(0x167)]&&typeof _0x5d2be7[_0x38aae8(0x167)]===_0x38aae8(0x1db)){const _0x2d7105=Array[_0x38aae8(0x165)](_0x5d2be7[_0x38aae8(0x167)])?_0x5d2be7[_0x38aae8(0x167)]:Object[_0x38aae8(0x16a)](_0x5d2be7[_0x38aae8(0x167)]);for(const _0xfa8060 of _0x2d7105){_0xfa8060[_0x38aae8(0x183)]?.['segmentId']&&_0x457c6c[_0x38aae8(0x1a4)](_0xfa8060[_0x38aae8(0x183)][_0x38aae8(0x188)]);const _0x4cae33=_0xfa8060;_0x4cae33['conditionSegmentId']&&_0x457c6c['add'](_0x4cae33[_0x38aae8(0x14f)]);if(Array[_0x38aae8(0x165)](_0x4cae33['conditions']))for(const _0x2a5c89 of _0x4cae33[_0x38aae8(0x1b5)]){_0x2a5c89['segmentId']&&_0x457c6c[_0x38aae8(0x1a4)](_0x2a5c89[_0x38aae8(0x188)]);}if(Array[_0x38aae8(0x165)](_0xfa8060[_0x38aae8(0x1c2)]))for(const _0x285adf of _0xfa8060[_0x38aae8(0x1c2)]){_0x285adf[_0x38aae8(0x188)]&&_0x457c6c[_0x38aae8(0x1a4)](_0x285adf[_0x38aae8(0x188)]);}}}}return _0x457c6c;}
|
|
1
|
+
const a154_0x257841=a154_0x2d30;(function(_0x5888d8,_0xc3982f){const _0x8179d=a154_0x2d30,_0xcb699b=_0x5888d8();while(!![]){try{const _0x8a72b8=parseInt(_0x8179d(0x1c7))/0x1*(-parseInt(_0x8179d(0x1bb))/0x2)+-parseInt(_0x8179d(0x152))/0x3*(parseInt(_0x8179d(0x197))/0x4)+parseInt(_0x8179d(0x191))/0x5+parseInt(_0x8179d(0x19a))/0x6*(parseInt(_0x8179d(0x1eb))/0x7)+parseInt(_0x8179d(0x206))/0x8*(-parseInt(_0x8179d(0x172))/0x9)+parseInt(_0x8179d(0x177))/0xa+parseInt(_0x8179d(0x207))/0xb*(parseInt(_0x8179d(0x181))/0xc);if(_0x8a72b8===_0xc3982f)break;else _0xcb699b['push'](_0xcb699b['shift']());}catch(_0x5aea22){_0xcb699b['push'](_0xcb699b['shift']());}}}(a154_0x1b0e,0xe01b2));import*as a154_0x50d26f from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x39d803){const _0x4dd60a=a154_0x2d30,_0x1ced6e=_0x39d803['toLowerCase']();if(_0x1ced6e===_0x4dd60a(0x1d0)||_0x1ced6e===_0x4dd60a(0x17f))return'day';if(_0x1ced6e===_0x4dd60a(0x171)||_0x1ced6e===_0x4dd60a(0x1d9))return _0x4dd60a(0x1d9);return _0x39d803;}export function journeyResponseToDefSync(_0x4eea97){const _0xe09206=a154_0x2d30,_0x49dc8e=_0x4eea97[_0xe09206(0x18f)],_0x224f18=_0x49dc8e[_0xe09206(0x1c0)]||_0x49dc8e['name'],_0x574328={'stages':_0x49dc8e[_0xe09206(0x14f)][_0xe09206(0x173)](convertApiStageToYaml),'id':_0x4eea97['id']};_0x49dc8e['goal']&&(_0x574328[_0xe09206(0x205)]=convertApiCriteriaToYaml(_0x49dc8e[_0xe09206(0x205)]));_0x49dc8e['name']&&_0x49dc8e[_0xe09206(0x193)]!==_0x224f18&&(_0x574328[_0xe09206(0x1cc)]=_0x49dc8e['name']);_0x49dc8e['versionNumber']!==undefined&&(_0x574328[_0xe09206(0x16c)]=_0x49dc8e['versionNumber']);_0x49dc8e[_0xe09206(0x199)]&&(_0x574328['state']=_0x49dc8e[_0xe09206(0x199)]===_0xe09206(0x16a)?_0xe09206(0x16a):'draft');const _0x53c4ce={'type':_0xe09206(0x1df),'name':_0x224f18,'journeys':[_0x574328]};_0x49dc8e['description']&&(_0x53c4ce[_0xe09206(0x209)]=_0x49dc8e[_0xe09206(0x209)]);_0x49dc8e[_0xe09206(0x205)]&&(_0x53c4ce[_0xe09206(0x205)]=convertApiCriteriaToYaml(_0x49dc8e[_0xe09206(0x205)]));if(_0x49dc8e[_0xe09206(0x1fd)])_0x53c4ce['reentry']=_0x49dc8e['reentryMode'];else _0x49dc8e[_0xe09206(0x1b3)]!==undefined&&(_0x53c4ce[_0xe09206(0x1f1)]=_0x49dc8e['allowReentry']?_0xe09206(0x176):'no_reentry');return _0x49dc8e['journeyBundleId']&&(_0x53c4ce[_0xe09206(0x167)]=_0x49dc8e[_0xe09206(0x14b)]),_0x49dc8e['journeyBundleName']&&(_0x53c4ce['bundle_name']=_0x49dc8e[_0xe09206(0x1c0)]),_0x4eea97[_0xe09206(0x19f)]?.[_0xe09206(0x1e5)]?.[_0xe09206(0x1e2)]?.['id']&&(_0x53c4ce[_0xe09206(0x16d)]=_0x4eea97[_0xe09206(0x19f)][_0xe09206(0x1e5)][_0xe09206(0x1e2)]['id']),_0x53c4ce;}export async function journeyResponseToDef(_0x7819f6,_0x26b3ff){const _0x48e575=a154_0x2d30,_0x247b7c=journeyResponseToDefSync(_0x7819f6);if(!_0x26b3ff)return _0x247b7c;const _0x35071e=new Set();collectSegmentIdsFromJourney(_0x247b7c,_0x35071e);const _0x5064ad=new Set();collectActivationIdsFromJourney(_0x247b7c,_0x5064ad);const _0x492bbb={},_0x2ba616=new Map();for(const _0x4e4db9 of Array[_0x48e575(0x161)](_0x35071e)[_0x48e575(0x18b)]()){if(_0x26b3ff['resolveSegment']){const _0x520cda=await _0x26b3ff[_0x48e575(0x1ca)](_0x4e4db9);if(_0x520cda[_0x48e575(0x1ba)]){_0x2ba616[_0x48e575(0x184)](_0x4e4db9,_0x520cda[_0x48e575(0x193)]);if(_0x520cda[_0x48e575(0x202)]){const _0x2ce0b4={..._0x520cda[_0x48e575(0x202)],'rule':deepSortObject(_0x520cda[_0x48e575(0x202)]['rule'])};_0x492bbb[_0x520cda['name']]=_0x2ce0b4;}}else _0x2ba616[_0x48e575(0x184)](_0x4e4db9,makeSegmentRef(_0x520cda[_0x48e575(0x193)]));}else{if(_0x26b3ff[_0x48e575(0x1dc)]){const _0x4203d2=await _0x26b3ff[_0x48e575(0x1dc)](_0x4e4db9);_0x2ba616[_0x48e575(0x184)](_0x4e4db9,_0x4203d2);}}}const _0x3f3d4a={},_0x135ec7=new Map();for(const _0x4c36d6 of Array[_0x48e575(0x161)](_0x5064ad)[_0x48e575(0x18b)]()){if(_0x26b3ff['resolveActivation']){const _0x2e2e3e=await _0x26b3ff[_0x48e575(0x1b8)](_0x4c36d6);_0x2e2e3e['isJourneyLocal']?(_0x135ec7['set'](_0x4c36d6,_0x2e2e3e[_0x48e575(0x193)]),_0x2e2e3e[_0x48e575(0x202)]&&(_0x3f3d4a[_0x2e2e3e[_0x48e575(0x193)]]=_0x2e2e3e[_0x48e575(0x202)])):_0x135ec7[_0x48e575(0x184)](_0x4c36d6,makeSegmentRef(_0x2e2e3e[_0x48e575(0x193)]));}else{if(_0x26b3ff[_0x48e575(0x14a)]){const _0x42f0d2=await _0x26b3ff['resolveActivationName'](_0x4c36d6);_0x135ec7['set'](_0x4c36d6,_0x42f0d2);}}}_0x2ba616[_0x48e575(0x1b2)]>0x0&&replaceSegmentIdsInJourney(_0x247b7c,_0x2ba616);_0x135ec7[_0x48e575(0x1b2)]>0x0&&replaceActivationIdsInJourney(_0x247b7c,_0x135ec7);if(_0x26b3ff[_0x48e575(0x1e8)]){const _0x5b6b99=[];collectJumpTargetsFromJourney(_0x247b7c,_0x5b6b99);if(_0x5b6b99[_0x48e575(0x17a)]>0x0){const _0x9ca51=new Map();for(const _0x1be544 of _0x5b6b99){try{const _0x4081f5=await _0x26b3ff['resolveJumpTarget'](_0x1be544['journeyId'],_0x1be544[_0x48e575(0x1d5)]);_0x9ca51['set'](_0x1be544[_0x48e575(0x1c2)]+':'+_0x1be544['stageId'],_0x4081f5);}catch{}}_0x9ca51[_0x48e575(0x1b2)]>0x0&&replaceJumpTargetsInJourney(_0x247b7c,_0x9ca51);}}return Object['keys'](_0x492bbb)[_0x48e575(0x17a)]>0x0&&(_0x247b7c[_0x48e575(0x1cb)]=_0x492bbb),Object[_0x48e575(0x1a5)](_0x3f3d4a)[_0x48e575(0x17a)]>0x0&&(_0x247b7c['activations']=_0x3f3d4a),_0x247b7c;}function collectSegmentIdsFromJourney(_0x592a13,_0x50d472){const _0x2d777f=a154_0x2d30;_0x592a13[_0x2d777f(0x205)]?.[_0x2d777f(0x1f5)]&&_0x50d472[_0x2d777f(0x14e)](_0x592a13[_0x2d777f(0x205)][_0x2d777f(0x1f5)]);const _0x56c4db=_0x125e0e=>{const _0x30d22d=_0x2d777f;for(const _0x10f1d0 of _0x125e0e){_0x10f1d0[_0x30d22d(0x198)]?.[_0x30d22d(0x1f5)]&&_0x50d472[_0x30d22d(0x14e)](_0x10f1d0['entry_criteria']['segment']);if(_0x10f1d0['exit_criteria'])for(const _0x3a9e74 of _0x10f1d0['exit_criteria']){_0x3a9e74[_0x30d22d(0x1f5)]&&_0x50d472[_0x30d22d(0x14e)](_0x3a9e74[_0x30d22d(0x1f5)]);}_0x10f1d0[_0x30d22d(0x1ed)]?.[_0x30d22d(0x1f5)]&&_0x50d472[_0x30d22d(0x14e)](_0x10f1d0[_0x30d22d(0x1ed)]['segment']);if(_0x10f1d0[_0x30d22d(0x17c)])for(const _0x2672ca of _0x10f1d0[_0x30d22d(0x17c)]){if(_0x2672ca[_0x30d22d(0x19b)]===_0x30d22d(0x148)){const _0x35ff16=_0x2672ca;for(const _0x42009a of _0x35ff16['with'][_0x30d22d(0x1b0)]){_0x42009a['segment']&&_0x50d472[_0x30d22d(0x14e)](_0x42009a[_0x30d22d(0x1f5)]);}}else{if(_0x2672ca['type']===_0x30d22d(0x1cf)){const _0x2f34a7=_0x2672ca;_0x2f34a7['with'][_0x30d22d(0x1e3)]?.[_0x30d22d(0x1f5)]&&_0x50d472['add'](_0x2f34a7[_0x30d22d(0x190)]['condition'][_0x30d22d(0x1f5)]);}}}}};if(_0x592a13['journeys'])for(const _0x2d813b of _0x592a13[_0x2d777f(0x18e)]){_0x2d813b[_0x2d777f(0x205)]?.[_0x2d777f(0x1f5)]&&_0x50d472[_0x2d777f(0x14e)](_0x2d813b[_0x2d777f(0x205)][_0x2d777f(0x1f5)]),_0x56c4db(_0x2d813b[_0x2d777f(0x1da)]);}_0x592a13[_0x2d777f(0x1da)]&&_0x56c4db(_0x592a13[_0x2d777f(0x1da)]);if(_0x592a13['versions'])for(const _0x3c5ecf of _0x592a13['versions']){_0x56c4db(_0x3c5ecf[_0x2d777f(0x1da)]);}}function replaceSegmentIdsInJourney(_0x346028,_0x8c5159){const _0x4dcd17=a154_0x2d30,_0x4aacd9=_0x20955a=>_0x8c5159['get'](_0x20955a)||_0x20955a;_0x346028['goal']?.[_0x4dcd17(0x1f5)]&&(_0x346028[_0x4dcd17(0x205)][_0x4dcd17(0x1f5)]=_0x4aacd9(_0x346028[_0x4dcd17(0x205)]['segment']));const _0x144417=_0x1885cb=>{const _0x5a6ec9=_0x4dcd17;for(const _0x478ff7 of _0x1885cb){_0x478ff7[_0x5a6ec9(0x198)]?.[_0x5a6ec9(0x1f5)]&&(_0x478ff7[_0x5a6ec9(0x198)][_0x5a6ec9(0x1f5)]=_0x4aacd9(_0x478ff7[_0x5a6ec9(0x198)][_0x5a6ec9(0x1f5)]));if(_0x478ff7[_0x5a6ec9(0x195)])for(const _0x4f0fee of _0x478ff7[_0x5a6ec9(0x195)]){_0x4f0fee[_0x5a6ec9(0x1f5)]&&(_0x4f0fee['segment']=_0x4aacd9(_0x4f0fee[_0x5a6ec9(0x1f5)]));}_0x478ff7['milestone']?.['segment']&&(_0x478ff7[_0x5a6ec9(0x1ed)][_0x5a6ec9(0x1f5)]=_0x4aacd9(_0x478ff7[_0x5a6ec9(0x1ed)][_0x5a6ec9(0x1f5)]));if(_0x478ff7[_0x5a6ec9(0x17c)])for(const _0x52a9ca of _0x478ff7[_0x5a6ec9(0x17c)]){if(_0x52a9ca[_0x5a6ec9(0x19b)]===_0x5a6ec9(0x148)){const _0x213a52=_0x52a9ca;for(const _0x54e226 of _0x213a52['with']['branches']){_0x54e226['segment']&&(_0x54e226[_0x5a6ec9(0x1f5)]=_0x4aacd9(_0x54e226[_0x5a6ec9(0x1f5)]));}}else{if(_0x52a9ca[_0x5a6ec9(0x19b)]===_0x5a6ec9(0x1cf)){const _0xac535=_0x52a9ca;_0xac535[_0x5a6ec9(0x190)]['condition']?.['segment']&&(_0xac535[_0x5a6ec9(0x190)][_0x5a6ec9(0x1e3)][_0x5a6ec9(0x1f5)]=_0x4aacd9(_0xac535[_0x5a6ec9(0x190)][_0x5a6ec9(0x1e3)][_0x5a6ec9(0x1f5)]));}}}}};if(_0x346028['journeys'])for(const _0x3c2e71 of _0x346028[_0x4dcd17(0x18e)]){_0x3c2e71[_0x4dcd17(0x205)]?.[_0x4dcd17(0x1f5)]&&(_0x3c2e71[_0x4dcd17(0x205)][_0x4dcd17(0x1f5)]=_0x4aacd9(_0x3c2e71['goal'][_0x4dcd17(0x1f5)])),_0x144417(_0x3c2e71[_0x4dcd17(0x1da)]);}_0x346028[_0x4dcd17(0x1da)]&&_0x144417(_0x346028['stages']);if(_0x346028[_0x4dcd17(0x14c)])for(const _0x1862a7 of _0x346028[_0x4dcd17(0x14c)]){_0x144417(_0x1862a7[_0x4dcd17(0x1da)]);}}function collectActivationIdsFromJourney(_0x84ef2c,_0x4f3fa1){const _0x57fd30=a154_0x2d30,_0x4916b6=_0x3137d7=>{const _0x46ec75=a154_0x2d30;for(const _0x4cc091 of _0x3137d7){if(_0x4cc091[_0x46ec75(0x17c)])for(const _0x206372 of _0x4cc091[_0x46ec75(0x17c)]){if(_0x206372[_0x46ec75(0x19b)]===_0x46ec75(0x187)){const _0x360869=_0x206372;_0x360869[_0x46ec75(0x190)][_0x46ec75(0x187)]&&/^\d+$/['test'](_0x360869[_0x46ec75(0x190)][_0x46ec75(0x187)])&&_0x4f3fa1[_0x46ec75(0x14e)](_0x360869[_0x46ec75(0x190)]['activation']);}}}};if(_0x84ef2c[_0x57fd30(0x18e)])for(const _0x63f3a6 of _0x84ef2c['journeys']){_0x4916b6(_0x63f3a6[_0x57fd30(0x1da)]);}_0x84ef2c[_0x57fd30(0x1da)]&&_0x4916b6(_0x84ef2c[_0x57fd30(0x1da)]);if(_0x84ef2c[_0x57fd30(0x14c)])for(const _0x26f929 of _0x84ef2c['versions']){_0x4916b6(_0x26f929['stages']);}}function replaceActivationIdsInJourney(_0x3936ad,_0x182ccf){const _0x398d63=a154_0x2d30,_0x32d1a0=_0x52b10e=>_0x182ccf[_0x398d63(0x18a)](_0x52b10e)||_0x52b10e,_0xb2326=_0x10ddac=>{const _0x14ba42=_0x398d63;for(const _0x56c860 of _0x10ddac){if(_0x56c860[_0x14ba42(0x17c)])for(const _0x55c2ef of _0x56c860[_0x14ba42(0x17c)]){if(_0x55c2ef[_0x14ba42(0x19b)]===_0x14ba42(0x187)){const _0x581cde=_0x55c2ef;_0x581cde['with'][_0x14ba42(0x187)]&&(_0x581cde[_0x14ba42(0x190)]['activation']=_0x32d1a0(_0x581cde[_0x14ba42(0x190)]['activation']));}}}};if(_0x3936ad[_0x398d63(0x18e)])for(const _0x35f22b of _0x3936ad[_0x398d63(0x18e)]){_0xb2326(_0x35f22b[_0x398d63(0x1da)]);}_0x3936ad[_0x398d63(0x1da)]&&_0xb2326(_0x3936ad['stages']);if(_0x3936ad[_0x398d63(0x14c)])for(const _0x4fbeec of _0x3936ad['versions']){_0xb2326(_0x4fbeec[_0x398d63(0x1da)]);}}function collectJumpTargetsFromJourney(_0x58503c,_0x3d7fd2){const _0x41618a=a154_0x2d30,_0x4d9054=new Set(),_0x344168=_0x32dd1b=>{const _0x59a81b=a154_0x2d30;for(const _0xc344d4 of _0x32dd1b){if(_0xc344d4['steps'])for(const _0x3ef7c2 of _0xc344d4[_0x59a81b(0x17c)]){if(_0x3ef7c2[_0x59a81b(0x19b)]===_0x59a81b(0x164)){const _0xe8495=_0x3ef7c2,_0x2dccbd=_0xe8495[_0x59a81b(0x190)][_0x59a81b(0x1aa)];if(_0x2dccbd[_0x59a81b(0x1df)]&&_0x2dccbd['stage']&&/^\d+$/[_0x59a81b(0x1fb)](_0x2dccbd[_0x59a81b(0x1df)])&&/^\d+$/['test'](_0x2dccbd[_0x59a81b(0x1ec)])){const _0x2b49ea=_0x2dccbd[_0x59a81b(0x1df)]+':'+_0x2dccbd[_0x59a81b(0x1ec)];!_0x4d9054[_0x59a81b(0x163)](_0x2b49ea)&&(_0x4d9054['add'](_0x2b49ea),_0x3d7fd2['push']({'journeyId':_0x2dccbd[_0x59a81b(0x1df)],'stageId':_0x2dccbd[_0x59a81b(0x1ec)]}));}}}}};if(_0x58503c[_0x41618a(0x18e)])for(const _0x13c64c of _0x58503c['journeys']){_0x344168(_0x13c64c[_0x41618a(0x1da)]);}_0x58503c[_0x41618a(0x1da)]&&_0x344168(_0x58503c[_0x41618a(0x1da)]);if(_0x58503c['versions'])for(const _0xc0b794 of _0x58503c[_0x41618a(0x14c)]){_0x344168(_0xc0b794[_0x41618a(0x1da)]);}}function a154_0x2d30(_0xd4aed4,_0x55bfc){_0xd4aed4=_0xd4aed4-0x148;const _0x1b0e0a=a154_0x1b0e();let _0x2d30f9=_0x1b0e0a[_0xd4aed4];return _0x2d30f9;}function replaceJumpTargetsInJourney(_0x1257c1,_0x1700fc){const _0x7d9f15=a154_0x2d30,_0x10bfd4=_0x20e9ca=>{const _0x58c7ce=a154_0x2d30;for(const _0x36121d of _0x20e9ca){if(_0x36121d[_0x58c7ce(0x17c)])for(const _0x5c9963 of _0x36121d['steps']){if(_0x5c9963['type']==='jump'){const _0xd9cf88=_0x5c9963,_0x18f57e=_0xd9cf88[_0x58c7ce(0x190)][_0x58c7ce(0x1aa)],_0x1b3c14=_0x18f57e[_0x58c7ce(0x1df)]+':'+_0x18f57e[_0x58c7ce(0x1ec)],_0x1ab768=_0x1700fc[_0x58c7ce(0x18a)](_0x1b3c14);_0x1ab768&&(_0x18f57e[_0x58c7ce(0x1df)]=_0x1ab768[_0x58c7ce(0x1ae)],_0x18f57e['stage']=_0x1ab768[_0x58c7ce(0x15a)]);}}}};if(_0x1257c1[_0x7d9f15(0x18e)])for(const _0x10269c of _0x1257c1[_0x7d9f15(0x18e)]){_0x10bfd4(_0x10269c[_0x7d9f15(0x1da)]);}_0x1257c1[_0x7d9f15(0x1da)]&&_0x10bfd4(_0x1257c1[_0x7d9f15(0x1da)]);if(_0x1257c1['versions'])for(const _0x36547a of _0x1257c1[_0x7d9f15(0x14c)]){_0x10bfd4(_0x36547a[_0x7d9f15(0x1da)]);}}function generateReadableStepName(_0x4e2cfb,_0x1a00f8){const _0x34908d=a154_0x2d30;if(_0x4e2cfb[_0x34908d(0x193)]&&_0x4e2cfb[_0x34908d(0x193)]!==_0x4e2cfb[_0x34908d(0x19b)]){const _0x27fea5=_0x4e2cfb[_0x34908d(0x193)][_0x34908d(0x20c)]();if(_0x27fea5&&/[a-z0-9\p{L}]/iu['test'](_0x27fea5))return _0x27fea5;}const _0x642b1c=_0x4e2cfb[_0x34908d(0x19b)][_0x34908d(0x165)]()[_0x34908d(0x1dd)](/step$/i,'');return _0x642b1c+'_'+(_0x1a00f8+0x1);}function getStepNextRefs(_0x9acc06){const _0x2ce77a=a154_0x2d30,_0xeb1503=[];if(_0x9acc06[_0x2ce77a(0x1ab)])_0xeb1503[_0x2ce77a(0x20d)](_0x9acc06[_0x2ce77a(0x1ab)]);if(_0x9acc06[_0x2ce77a(0x1b0)])for(const _0x597e27 of _0x9acc06['branches']){if(_0x597e27['next'])_0xeb1503[_0x2ce77a(0x20d)](_0x597e27['next']);}if(_0x9acc06[_0x2ce77a(0x15c)])for(const _0x12d02d of _0x9acc06[_0x2ce77a(0x15c)]){if(_0x12d02d['next'])_0xeb1503[_0x2ce77a(0x20d)](_0x12d02d[_0x2ce77a(0x1ab)]);}if(_0x9acc06[_0x2ce77a(0x1d4)])for(const _0x59948d of _0x9acc06[_0x2ce77a(0x1d4)]){if(_0x59948d[_0x2ce77a(0x1ab)])_0xeb1503[_0x2ce77a(0x20d)](_0x59948d[_0x2ce77a(0x1ab)]);}return _0xeb1503;}function parseJumpTargetDisplayName(_0x498ee3){const _0x113d7a=a154_0x2d30,_0x2e620c=_0x498ee3['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x2e620c)return undefined;const _0x2a3786=_0x2e620c[0x1][_0x113d7a(0x20c)](),_0x299995=_0x2e620c[0x2][_0x113d7a(0x20c)]();if(!_0x2a3786||!_0x299995)return undefined;return{'stageName':_0x2a3786,'journeyName':_0x299995};}function orderStepsFromRoot(_0x2ae737,_0x562e12){const _0x3b57f5=a154_0x2d30,_0x305a1a=Object[_0x3b57f5(0x208)](_0x2ae737);if(_0x305a1a[_0x3b57f5(0x17a)]===0x0)return[];const _0x3f0b63=new Set(_0x305a1a[_0x3b57f5(0x173)](([_0x469a85])=>_0x469a85)),_0x13936f=new Set();for(const [,_0x49ef44]of _0x305a1a){for(const _0x168bda of getStepNextRefs(_0x49ef44)){if(_0x3f0b63[_0x3b57f5(0x163)](_0x168bda))_0x13936f[_0x3b57f5(0x14e)](_0x168bda);}}let _0x52c3b9=_0x562e12&&_0x3f0b63[_0x3b57f5(0x163)](_0x562e12)?_0x562e12:undefined;if(!_0x52c3b9){const _0x1ce124=_0x305a1a[_0x3b57f5(0x19c)](([_0x451c49])=>!_0x13936f[_0x3b57f5(0x163)](_0x451c49));_0x1ce124[_0x3b57f5(0x17a)]>0x0?_0x52c3b9=_0x1ce124[0x0][0x0]:_0x52c3b9=_0x305a1a[0x0][0x0];}const _0x3c494c=[],_0x3f90b2=new Set(),_0x30ea9c=[_0x52c3b9];while(_0x30ea9c[_0x3b57f5(0x17a)]>0x0){const _0x1c7bcb=_0x30ea9c[_0x3b57f5(0x1a8)]();if(_0x3f90b2[_0x3b57f5(0x163)](_0x1c7bcb))continue;_0x3f90b2['add'](_0x1c7bcb);const _0x2d56c4=_0x2ae737[_0x1c7bcb];if(!_0x2d56c4)continue;_0x3c494c['push']({'uuid':_0x1c7bcb,'step':_0x2d56c4});for(const _0x43f22b of getStepNextRefs(_0x2d56c4)){_0x3f0b63[_0x3b57f5(0x163)](_0x43f22b)&&!_0x3f90b2[_0x3b57f5(0x163)](_0x43f22b)&&_0x30ea9c[_0x3b57f5(0x20d)](_0x43f22b);}}for(const [_0x57a518,_0x2a213b]of _0x305a1a){!_0x3f90b2['has'](_0x57a518)&&_0x3c494c[_0x3b57f5(0x20d)]({'uuid':_0x57a518,'step':_0x2a213b});}return _0x3c494c;}function resolveStepReferences(_0x456fe3,_0x4e5b58,_0x35ad37,_0x1c06e2){const _0x171c45=a154_0x2d30;if(_0x456fe3[_0x171c45(0x19b)]!==_0x171c45(0x1b5)){_0x456fe3[_0x171c45(0x1ab)]&&_0x1c06e2[_0x171c45(0x163)](_0x456fe3[_0x171c45(0x1ab)])&&(_0x456fe3[_0x171c45(0x1ab)]=_0x1c06e2[_0x171c45(0x18a)](_0x456fe3[_0x171c45(0x1ab)]));const _0x5bd74d=_0x4e5b58+0x1;if(_0x5bd74d<_0x35ad37[_0x171c45(0x17a)]){const _0x439de9=_0x1c06e2['get'](_0x35ad37[_0x5bd74d][_0x171c45(0x19d)]);_0x456fe3[_0x171c45(0x1ab)]===_0x439de9&&delete _0x456fe3['next'];}}if(_0x456fe3[_0x171c45(0x19b)]===_0x171c45(0x148))for(const _0x2adac0 of _0x456fe3[_0x171c45(0x190)][_0x171c45(0x1b0)]){_0x2adac0[_0x171c45(0x1ab)]&&_0x1c06e2['has'](_0x2adac0[_0x171c45(0x1ab)])&&(_0x2adac0['next']=_0x1c06e2['get'](_0x2adac0[_0x171c45(0x1ab)]));}if(_0x456fe3['type']===_0x171c45(0x185))for(const _0x2d686a of _0x456fe3[_0x171c45(0x190)][_0x171c45(0x15c)]){_0x2d686a[_0x171c45(0x1ab)]&&_0x1c06e2['has'](_0x2d686a[_0x171c45(0x1ab)])&&(_0x2d686a['next']=_0x1c06e2['get'](_0x2d686a[_0x171c45(0x1ab)]));}if(_0x456fe3['type']===_0x171c45(0x1cf)&&_0x456fe3[_0x171c45(0x190)][_0x171c45(0x1e3)]){const _0x2bd9a0=_0x456fe3['with'][_0x171c45(0x1e3)];_0x2bd9a0[_0x171c45(0x1ab)]&&_0x1c06e2[_0x171c45(0x163)](_0x2bd9a0[_0x171c45(0x1ab)])&&(_0x2bd9a0[_0x171c45(0x1ab)]=_0x1c06e2[_0x171c45(0x18a)](_0x2bd9a0[_0x171c45(0x1ab)])),_0x2bd9a0[_0x171c45(0x1b7)]?.[_0x171c45(0x1ab)]&&_0x1c06e2[_0x171c45(0x163)](_0x2bd9a0['timeout'][_0x171c45(0x1ab)])&&(_0x2bd9a0['timeout']['next']=_0x1c06e2[_0x171c45(0x18a)](_0x2bd9a0['timeout'][_0x171c45(0x1ab)]));}}function convertApiStageToYaml(_0x1029e1){const _0x158366=a154_0x2d30,_0x1e9c4d={'name':_0x1029e1[_0x158366(0x193)]};_0x1029e1['id']&&(_0x1e9c4d['id']=_0x1029e1['id']);_0x1029e1[_0x158366(0x209)]&&(_0x1e9c4d[_0x158366(0x209)]=_0x1029e1[_0x158366(0x209)]);_0x1029e1['entryCriteria']&&(_0x1e9c4d[_0x158366(0x198)]=convertApiCriteriaToYaml(_0x1029e1[_0x158366(0x1f3)]));_0x1029e1[_0x158366(0x169)]&&_0x1029e1[_0x158366(0x169)][_0x158366(0x17a)]>0x0&&(_0x1e9c4d[_0x158366(0x195)]=_0x1029e1[_0x158366(0x169)][_0x158366(0x173)](convertApiCriteriaToYaml));_0x1029e1[_0x158366(0x1ed)]&&(_0x1e9c4d[_0x158366(0x1ed)]=convertApiCriteriaToYaml(_0x1029e1[_0x158366(0x1ed)]));if(_0x1029e1[_0x158366(0x17c)]&&Object[_0x158366(0x1a5)](_0x1029e1['steps'])[_0x158366(0x17a)]>0x0){const _0x43ee99=orderStepsFromRoot(_0x1029e1[_0x158366(0x17c)],_0x1029e1[_0x158366(0x1d3)]),_0x47a93e=new Map(),_0x354002=new Set();for(let _0x120bd4=0x0;_0x120bd4<_0x43ee99[_0x158366(0x17a)];_0x120bd4++){const {uuid:_0x597f74,step:_0x42eb2b}=_0x43ee99[_0x120bd4];let _0x4c6dda=generateReadableStepName(_0x42eb2b,_0x120bd4),_0x72b12b=_0x4c6dda,_0x30146a=0x2;while(_0x354002[_0x158366(0x163)](_0x72b12b)){_0x72b12b=_0x4c6dda+'_'+_0x30146a,_0x30146a++;}_0x354002[_0x158366(0x14e)](_0x72b12b),_0x47a93e['set'](_0x597f74,_0x72b12b);}_0x1e9c4d['steps']=_0x43ee99[_0x158366(0x173)](({uuid:_0x17c274,step:_0x4070b4},_0x495ed4)=>{const _0x41f2b4=_0x158366,_0x4af224=convertApiStepToYaml(_0x4070b4,_0x47a93e[_0x41f2b4(0x18a)](_0x17c274));return resolveStepReferences(_0x4af224,_0x495ed4,_0x43ee99,_0x47a93e),_0x4af224;});}return _0x1e9c4d;}function convertApiCriteriaToYaml(_0x32e4ac){const _0x459bce=a154_0x2d30,_0x59eae0={'name':_0x32e4ac[_0x459bce(0x193)],'segment':_0x32e4ac[_0x459bce(0x1a2)]};_0x32e4ac[_0x459bce(0x209)]&&(_0x59eae0[_0x459bce(0x209)]=_0x32e4ac[_0x459bce(0x209)]);if(_0x32e4ac[_0x459bce(0x1aa)]){let _0x29ab79=_0x32e4ac[_0x459bce(0x1aa)][_0x459bce(0x1c2)],_0x420b10=_0x32e4ac[_0x459bce(0x1aa)][_0x459bce(0x1e6)];if(_0x32e4ac[_0x459bce(0x1aa)][_0x459bce(0x1ae)]){const _0x356388=parseJumpTargetDisplayName(_0x32e4ac[_0x459bce(0x1aa)][_0x459bce(0x1ae)]);_0x356388&&(_0x420b10=_0x356388[_0x459bce(0x15a)],_0x29ab79=_0x356388[_0x459bce(0x1ae)]);}_0x59eae0['target']={'journey':_0x29ab79,'stage':_0x420b10},_0x32e4ac[_0x459bce(0x1aa)][_0x459bce(0x14b)]&&(_0x59eae0[_0x459bce(0x1aa)][_0x459bce(0x167)]=_0x32e4ac['target']['journeyBundleId']);}return _0x59eae0;}function convertApiStepToYaml(_0x44d9d1,_0x523b87){const _0x3ab948=a154_0x2d30;switch(_0x44d9d1[_0x3ab948(0x19b)]){case _0x3ab948(0x1c4):{const _0x4e792e={};if(_0x44d9d1[_0x3ab948(0x188)]==='Duration'&&_0x44d9d1[_0x3ab948(0x1ce)]!==undefined)_0x4e792e[_0x3ab948(0x15b)]=_0x44d9d1[_0x3ab948(0x1ce)],_0x4e792e['unit']=_0x44d9d1[_0x3ab948(0x14d)];else{if(_0x44d9d1[_0x3ab948(0x188)]===_0x3ab948(0x18c)&&_0x44d9d1[_0x3ab948(0x16e)])_0x4e792e[_0x3ab948(0x1a9)]=_0x44d9d1[_0x3ab948(0x16e)];else{if(_0x44d9d1[_0x3ab948(0x188)]==='DaysOfTheWeek'&&_0x44d9d1[_0x3ab948(0x179)])_0x4e792e['days_of_week']=_0x44d9d1[_0x3ab948(0x179)];else{if(_0x44d9d1[_0x3ab948(0x188)]==='Condition'){if(_0x44d9d1[_0x3ab948(0x1d4)]&&_0x44d9d1[_0x3ab948(0x1d4)][_0x3ab948(0x17a)]>0x0){const _0x4ace81=_0x44d9d1[_0x3ab948(0x1d4)][_0x3ab948(0x1c6)](_0x49016c=>!_0x49016c[_0x3ab948(0x1af)]),_0x521817=_0x44d9d1[_0x3ab948(0x1d4)][_0x3ab948(0x1c6)](_0xf6da47=>_0xf6da47[_0x3ab948(0x1af)]);_0x4ace81?.['segmentId']&&(_0x4e792e[_0x3ab948(0x1e3)]={'segment':_0x4ace81[_0x3ab948(0x1a2)],..._0x4ace81[_0x3ab948(0x1ab)]?{'next':_0x4ace81['next']}:{}},_0x521817&&_0x521817['moveAfter']!==undefined&&_0x521817[_0x3ab948(0x1cd)]&&(_0x4e792e[_0x3ab948(0x1e3)][_0x3ab948(0x1b7)]={'duration':_0x521817[_0x3ab948(0x175)],'unit':_0x521817[_0x3ab948(0x1cd)],..._0x521817[_0x3ab948(0x1ab)]?{'next':_0x521817[_0x3ab948(0x1ab)]}:{}}));}else _0x44d9d1['conditionSegmentId']&&(_0x4e792e[_0x3ab948(0x1e3)]={'segment':_0x44d9d1[_0x3ab948(0x1d7)]},_0x44d9d1['conditionTimeoutDuration']!==undefined&&_0x44d9d1[_0x3ab948(0x1a4)]&&(_0x4e792e['condition'][_0x3ab948(0x1b7)]={'duration':_0x44d9d1[_0x3ab948(0x1bf)],'unit':_0x44d9d1[_0x3ab948(0x1a4)]}));}}}}const _0x279b24={'type':_0x3ab948(0x1cf),'name':_0x523b87,..._0x44d9d1[_0x3ab948(0x1ab)]?{'next':_0x44d9d1[_0x3ab948(0x1ab)]}:{},'with':_0x4e792e};return _0x279b24;}case'Activation':{const _0x22101f={'type':_0x3ab948(0x187),'name':_0x523b87,..._0x44d9d1[_0x3ab948(0x1ab)]?{'next':_0x44d9d1[_0x3ab948(0x1ab)]}:{},'with':{'activation':_0x44d9d1[_0x3ab948(0x174)]||''}};return _0x22101f;}case _0x3ab948(0x1b4):{const _0x45a2ca={'type':_0x3ab948(0x148),'name':_0x523b87,..._0x44d9d1['next']?{'next':_0x44d9d1['next']}:{},'with':{'branches':(_0x44d9d1['branches']||[])[_0x3ab948(0x173)](_0x2236e0=>({'name':_0x2236e0[_0x3ab948(0x193)],'segment':_0x2236e0[_0x3ab948(0x1a2)],'excluded':_0x2236e0['excludedPath'],..._0x2236e0['next']?{'next':_0x2236e0[_0x3ab948(0x1ab)]}:{}}))}};return _0x45a2ca;}case _0x3ab948(0x158):case _0x3ab948(0x1b6):case'Variant':{const _0x2c8b1e=_0x44d9d1[_0x3ab948(0x15c)]||(_0x44d9d1[_0x3ab948(0x1b0)]||[])[_0x3ab948(0x173)](_0x2e6926=>({'name':_0x2e6926[_0x3ab948(0x193)],'percentage':0x0,'next':_0x2e6926['next']})),_0x3c2e1c={'type':'ab_test','name':_0x523b87,..._0x44d9d1[_0x3ab948(0x1ab)]?{'next':_0x44d9d1[_0x3ab948(0x1ab)]}:{},'with':{'customized_split':_0x44d9d1[_0x3ab948(0x1a3)],'unique_id':_0x44d9d1[_0x3ab948(0x168)],'variants':_0x2c8b1e[_0x3ab948(0x173)](_0x538e14=>({'name':_0x538e14[_0x3ab948(0x193)],'percentage':_0x538e14[_0x3ab948(0x1d6)],..._0x538e14[_0x3ab948(0x1ab)]?{'next':_0x538e14['next']}:{}}))}};return _0x3c2e1c;}case _0x3ab948(0x200):{const _0x2c41fa={'type':_0x3ab948(0x203),'name':_0x523b87,..._0x44d9d1[_0x3ab948(0x1ab)]?{'next':_0x44d9d1[_0x3ab948(0x1ab)]}:{}};return _0x2c41fa;}case _0x3ab948(0x201):{let _0x36c674='',_0x17ea76='',_0x52d014;if(_0x44d9d1[_0x3ab948(0x1aa)]){_0x36c674=_0x44d9d1[_0x3ab948(0x1aa)][_0x3ab948(0x1c2)],_0x17ea76=_0x44d9d1[_0x3ab948(0x1aa)][_0x3ab948(0x1e6)],_0x52d014=_0x44d9d1['target'][_0x3ab948(0x14b)];if(_0x44d9d1[_0x3ab948(0x1aa)]['journeyName']){const _0x2d5a08=parseJumpTargetDisplayName(_0x44d9d1[_0x3ab948(0x1aa)][_0x3ab948(0x1ae)]);_0x2d5a08&&(_0x17ea76=_0x2d5a08[_0x3ab948(0x15a)],_0x36c674=_0x2d5a08['journeyName']);}}const _0x596e56={'type':'jump','name':_0x523b87,..._0x44d9d1[_0x3ab948(0x1ab)]?{'next':_0x44d9d1['next']}:{},'with':{'target':{'journey':_0x36c674,'stage':_0x17ea76,..._0x52d014?{'bundle_id':_0x52d014}:{}}}};return _0x596e56;}case'End':{const _0x128c73={'type':'end','name':_0x523b87};return _0x128c73;}default:{const _0x319de5={'type':_0x3ab948(0x1b5),'name':_0x523b87};return _0x319de5;}}}export async function journeyDefToRequest(_0x92da15,_0x26a552,_0x29f461){const _0xcfd44e=a154_0x2d30,_0x34dda6=_0x92da15['stages']||getActiveStages(_0x92da15),_0x353bb3=isJourneysArrayMode(_0x92da15)||isMultiVersionMode(_0x92da15)?getLatestJourneyEntry(_0x92da15):undefined,_0x24e1ae=_0x353bb3?.[_0xcfd44e(0x1cc)]??_0x92da15[_0xcfd44e(0x193)],_0x22979c=_0x92da15[_0xcfd44e(0x1cb)]||{},_0x5ae5a4=_0x92da15[_0xcfd44e(0x15e)]||{},_0x1e578d={'type':_0xcfd44e(0x1df),'attributes':{'name':_0x24e1ae,'audienceId':_0x26a552,'journeyStages':await Promise[_0xcfd44e(0x20a)](_0x34dda6['map'](_0x1752e5=>convertYamlStageToApi(_0x1752e5,_0x29f461,_0x22979c,_0x5ae5a4)))}},_0x113e93=_0x353bb3?.['id']??_0x92da15['id'];_0x113e93&&(_0x1e578d['id']=_0x113e93);_0x92da15[_0xcfd44e(0x209)]&&(_0x1e578d[_0xcfd44e(0x18f)][_0xcfd44e(0x209)]=_0x92da15[_0xcfd44e(0x209)]);const _0x28700e=getEffectiveGoal(_0x92da15);_0x28700e&&(_0x1e578d[_0xcfd44e(0x18f)]['goal']=await convertYamlCriteriaToApi(_0x28700e,_0x29f461,_0x22979c));const _0x4cc17d=getEffectiveReentry(_0x92da15);return _0x4cc17d&&(_0x1e578d['attributes']['reentryMode']=_0x4cc17d,_0x1e578d['attributes']['allowReentry']=_0x4cc17d!==_0xcfd44e(0x155)),_0x92da15[_0xcfd44e(0x16d)]&&(_0x1e578d[_0xcfd44e(0x19f)]={'parentFolder':{'data':{'id':_0x92da15[_0xcfd44e(0x16d)],'type':_0xcfd44e(0x183)}}}),_0x1e578d;}async function convertYamlStageToApi(_0x5c1f25,_0xcf4dba,_0x5a1580={},_0x2bb03e={}){const _0x4acb49=a154_0x2d30,_0x54d054={'name':_0x5c1f25[_0x4acb49(0x193)]};_0x5c1f25['id']&&(_0x54d054['id']=_0x5c1f25['id']);_0x5c1f25[_0x4acb49(0x209)]&&(_0x54d054[_0x4acb49(0x209)]=_0x5c1f25[_0x4acb49(0x209)]);_0x5c1f25[_0x4acb49(0x198)]&&(_0x54d054[_0x4acb49(0x1f3)]=await convertYamlCriteriaToApi(_0x5c1f25[_0x4acb49(0x198)],_0xcf4dba,_0x5a1580));_0x5c1f25['exit_criteria']&&_0x5c1f25[_0x4acb49(0x195)][_0x4acb49(0x17a)]>0x0&&(_0x54d054[_0x4acb49(0x169)]=await Promise['all'](_0x5c1f25[_0x4acb49(0x195)][_0x4acb49(0x173)](_0x3bc8d9=>convertYamlCriteriaToApi(_0x3bc8d9,_0xcf4dba,_0x5a1580))));_0x5c1f25[_0x4acb49(0x1ed)]&&(_0x54d054['milestone']=await convertYamlCriteriaToApi(_0x5c1f25[_0x4acb49(0x1ed)],_0xcf4dba,_0x5a1580));if(_0x5c1f25[_0x4acb49(0x17c)]&&_0x5c1f25[_0x4acb49(0x17c)][_0x4acb49(0x17a)]>0x0){const _0x2ba360={},_0x12a6b6=_0x5c1f25[_0x4acb49(0x17c)][_0x4acb49(0x173)]((_0x336514,_0xb0fa21)=>{const _0xda5d4d=_0x4acb49,_0x58ec42=_0x336514[_0xda5d4d(0x19d)]||generateUUID(),_0x367186=_0x336514['name']||_0x336514[_0xda5d4d(0x19b)]+'_'+_0xb0fa21;return _0x2ba360[_0x367186]=_0x58ec42,{..._0x336514,'name':_0x367186};});_0x54d054['rootStep']=_0x2ba360[_0x12a6b6[0x0][_0x4acb49(0x193)]],_0x54d054[_0x4acb49(0x17c)]={};for(let _0x5a42e0=0x0;_0x5a42e0<_0x12a6b6[_0x4acb49(0x17a)];_0x5a42e0++){const _0x1fdbc1=_0x12a6b6[_0x5a42e0],_0x317788=_0x2ba360[_0x1fdbc1['name']],_0x36e8ff=!_0x1fdbc1[_0x4acb49(0x1ab)]&&_0x5a42e0<_0x12a6b6['length']-0x1&&_0x1fdbc1['type']!=='end'?_0x12a6b6[_0x5a42e0+0x1][_0x4acb49(0x193)]:_0x1fdbc1[_0x4acb49(0x1ab)],_0xc4891e=_0x36e8ff!==_0x1fdbc1['next']?{..._0x1fdbc1,'next':_0x36e8ff}:_0x1fdbc1;_0x54d054[_0x4acb49(0x17c)][_0x317788]=await convertYamlStepToApi(_0xc4891e,_0xcf4dba,_0x5a1580,_0x2ba360,_0x2bb03e);}}else _0x5c1f25[_0x4acb49(0x1f0)]&&(_0x54d054[_0x4acb49(0x1d3)]=_0x5c1f25['root_step']);return _0x54d054;}async function convertYamlCriteriaToApi(_0x58177d,_0x23f673,_0x415a37={}){const _0x40089b=a154_0x2d30;let _0x25ebd3=_0x58177d[_0x40089b(0x1f5)];if(_0x25ebd3&&!/^\d+$/[_0x40089b(0x1fb)](_0x25ebd3)){const _0x4591d0=parseSegmentRef(_0x25ebd3);if(_0x4591d0[_0x40089b(0x19b)]==='ref')_0x23f673?.[_0x40089b(0x196)]&&(_0x25ebd3=await _0x23f673[_0x40089b(0x196)](_0x4591d0['name']));else{if(_0x4591d0[_0x40089b(0x19b)]===_0x40089b(0x1ad)&&_0x415a37[_0x4591d0['name']])_0x23f673?.[_0x40089b(0x189)]&&(_0x25ebd3=await _0x23f673[_0x40089b(0x189)](_0x4591d0['name'],_0x415a37[_0x4591d0[_0x40089b(0x193)]]));else _0x23f673?.[_0x40089b(0x196)]&&(_0x25ebd3=await _0x23f673[_0x40089b(0x196)](_0x4591d0['name']));}}const _0xc65200={'name':_0x58177d[_0x40089b(0x193)],'segmentId':_0x25ebd3};_0x58177d[_0x40089b(0x209)]&&(_0xc65200[_0x40089b(0x209)]=_0x58177d[_0x40089b(0x209)]);if(_0x58177d[_0x40089b(0x1aa)]){const _0x7d85a7=_0x58177d[_0x40089b(0x1aa)][_0x40089b(0x1df)],_0x4bd254=_0x58177d['target']['stage'];let _0x31e3bd=_0x58177d[_0x40089b(0x1aa)][_0x40089b(0x1df)];_0x23f673?.['resolveJourneyId']&&!/^\d+$/['test'](_0x31e3bd)&&(_0x31e3bd=await _0x23f673['resolveJourneyId'](_0x31e3bd));let _0x3aaafc=_0x58177d[_0x40089b(0x1aa)][_0x40089b(0x1ec)];_0x23f673?.[_0x40089b(0x1b9)]&&!/^\d+$/['test'](_0x3aaafc)&&(_0x3aaafc=await _0x23f673[_0x40089b(0x1b9)](_0x31e3bd,_0x3aaafc));const _0x513a41=!/^\d+$/['test'](_0x7d85a7)&&!isLocalJourneyRef(_0x7d85a7)?formatApiJourneyName(_0x7d85a7,_0x4bd254):undefined;_0xc65200[_0x40089b(0x1aa)]={'journeyId':_0x31e3bd,'journeyStageId':_0x3aaafc,'journeyName':_0x513a41,'confirmed':!![]},_0x58177d[_0x40089b(0x1aa)][_0x40089b(0x167)]&&(_0xc65200['target'][_0x40089b(0x14b)]=_0x58177d[_0x40089b(0x1aa)][_0x40089b(0x167)]);}return _0xc65200;}async function convertYamlStepToApi(_0x3cdac5,_0x48746d,_0x5271a8={},_0x58e59a={},_0x5959c4={}){const _0xc9fab0=a154_0x2d30,_0xbb8b44=async _0x2416d0=>{const _0x219c09=a154_0x2d30;if(/^\d+$/[_0x219c09(0x1fb)](_0x2416d0))return _0x2416d0;const _0x1eee32=parseSegmentRef(_0x2416d0);if(_0x1eee32['type']==='ref'){if(_0x48746d?.[_0x219c09(0x196)])return await _0x48746d[_0x219c09(0x196)](_0x1eee32[_0x219c09(0x193)]);}else{if(_0x1eee32[_0x219c09(0x19b)]===_0x219c09(0x1ad)&&_0x5271a8[_0x1eee32[_0x219c09(0x193)]]){if(_0x48746d?.[_0x219c09(0x189)])return await _0x48746d['resolveEmbeddedSegmentId'](_0x1eee32['name'],_0x5271a8[_0x1eee32['name']]);}else{if(_0x48746d?.[_0x219c09(0x196)])return await _0x48746d[_0x219c09(0x196)](_0x1eee32['name']);}}return _0x2416d0;},_0x235b0e=async _0x58571c=>{const _0x1e590f=a154_0x2d30;if(/^\d+$/[_0x1e590f(0x1fb)](_0x58571c))return _0x58571c;const _0x25d535=parseSegmentRef(_0x58571c);if(_0x25d535['type']===_0x1e590f(0x1fa)){if(_0x48746d?.[_0x1e590f(0x170)])return await _0x48746d[_0x1e590f(0x170)](_0x25d535[_0x1e590f(0x193)]);return _0x25d535['name'];}else{if(_0x25d535[_0x1e590f(0x19b)]===_0x1e590f(0x1ad)&&_0x5959c4[_0x25d535['name']]){if(_0x48746d?.[_0x1e590f(0x17d)])return await _0x48746d[_0x1e590f(0x17d)](_0x25d535['name'],_0x5959c4[_0x25d535[_0x1e590f(0x193)]]);if(_0x48746d?.[_0x1e590f(0x170)])return await _0x48746d[_0x1e590f(0x170)](_0x25d535['name']);}else{if(_0x48746d?.[_0x1e590f(0x170)])return await _0x48746d[_0x1e590f(0x170)](_0x25d535['name']);}}return _0x58571c;},_0x511534=_0x49fdd4=>{const _0x3f3119=a154_0x2d30;if(!_0x49fdd4)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x3f3119(0x1fb)](_0x49fdd4))return _0x49fdd4;return _0x58e59a[_0x49fdd4]||_0x49fdd4;};switch(_0x3cdac5[_0xc9fab0(0x19b)]){case _0xc9fab0(0x1cf):{const _0x8ef3bb=_0x3cdac5,_0x2f4382=_0x8ef3bb['with'],_0x2eeffe={'type':_0xc9fab0(0x1c4),'name':_0x8ef3bb['name'],'next':_0x511534(_0x8ef3bb[_0xc9fab0(0x1ab)])};if(_0x2f4382[_0xc9fab0(0x15b)]!==undefined&&_0x2f4382[_0xc9fab0(0x1cd)])_0x2eeffe[_0xc9fab0(0x188)]=_0xc9fab0(0x1d1),_0x2eeffe[_0xc9fab0(0x1ce)]=_0x2f4382[_0xc9fab0(0x15b)],_0x2eeffe['waitStepUnit']=normalizeWaitUnit(_0x2f4382[_0xc9fab0(0x1cd)]);else{if(_0x2f4382['wait_until'])_0x2eeffe[_0xc9fab0(0x188)]=_0xc9fab0(0x18c),_0x2eeffe[_0xc9fab0(0x16e)]=_0x2f4382[_0xc9fab0(0x1a9)];else{if(_0x2f4382[_0xc9fab0(0x1e0)])_0x2eeffe['waitStepType']='DaysOfTheWeek',_0x2eeffe['daysOfWeek']=_0x2f4382[_0xc9fab0(0x1e0)];else{if(_0x2f4382[_0xc9fab0(0x1e3)]){_0x2eeffe[_0xc9fab0(0x188)]='Condition';const _0xbddef8=await _0xbb8b44(_0x2f4382[_0xc9fab0(0x1e3)]['segment']),_0x569053=_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1b7)]?.[_0xc9fab0(0x1ab)]!==undefined;if(_0x569053){const _0x41f238=[];_0x41f238['push']({'id':generateUUID(),'segmentId':_0xbddef8,'timedOutPath':![],'name':_0xc9fab0(0x1f4),'next':_0x511534(_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1ab)]??_0x8ef3bb[_0xc9fab0(0x1ab)])});if(_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1b7)]){const _0x2a5cd8=_0x2f4382[_0xc9fab0(0x1e3)]['timeout']['duration'],_0x2b8aec=normalizeWaitUnit(_0x2f4382['condition'][_0xc9fab0(0x1b7)][_0xc9fab0(0x1cd)]);_0x41f238['push']({'id':generateUUID(),'timedOutPath':!![],'name':_0xc9fab0(0x1e7)+_0x2a5cd8+'\x20'+_0x2b8aec,'moveAfter':_0x2a5cd8,'unit':_0x2b8aec,'next':_0x511534(_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1b7)]['next'])});}_0x2eeffe['conditions']=_0x41f238,delete _0x2eeffe[_0xc9fab0(0x1ab)];}else _0x2eeffe[_0xc9fab0(0x1d7)]=_0xbddef8,_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1b7)]&&(_0x2eeffe[_0xc9fab0(0x1bf)]=_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1b7)][_0xc9fab0(0x15b)],_0x2f4382[_0xc9fab0(0x1e3)][_0xc9fab0(0x1b7)]['unit']&&(_0x2eeffe['conditionTimeoutUnit']=normalizeWaitUnit(_0x2f4382[_0xc9fab0(0x1e3)]['timeout'][_0xc9fab0(0x1cd)])));}}}}return _0x2eeffe;}case _0xc9fab0(0x187):{const _0x576e32=_0x3cdac5,_0x454e79=_0x576e32['with'][_0xc9fab0(0x187)],_0x450ec3=await _0x235b0e(_0x454e79);return{'type':_0xc9fab0(0x1c8),'name':_0x576e32[_0xc9fab0(0x193)],'journeyActivationStepId':_0x450ec3,'next':_0x511534(_0x576e32[_0xc9fab0(0x1ab)])};}case _0xc9fab0(0x148):{const _0x17bbe5=_0x3cdac5,_0x2cf7ab=_0x17bbe5['with'][_0xc9fab0(0x1b0)];return{'type':_0xc9fab0(0x1b4),'name':_0x17bbe5[_0xc9fab0(0x193)],'branches':await Promise[_0xc9fab0(0x20a)](_0x2cf7ab[_0xc9fab0(0x173)](async _0x4adcb9=>{const _0x5e1255=_0xc9fab0;let _0x1d2506='';if(!_0x4adcb9[_0x5e1255(0x156)]){const _0x4ad48a=_0x4adcb9[_0x5e1255(0x1f5)]||_0x4adcb9[_0x5e1255(0x15f)]||'';_0x1d2506=_0x4ad48a?await _0xbb8b44(_0x4ad48a):'';}return{'id':crypto['randomUUID'](),'name':_0x4adcb9[_0x5e1255(0x193)],'description':null,'segmentId':_0x1d2506,'excludedPath':_0x4adcb9[_0x5e1255(0x156)]??![],'next':_0x511534(_0x4adcb9[_0x5e1255(0x1ab)])};})),'next':_0x511534(_0x17bbe5[_0xc9fab0(0x1ab)])};}case _0xc9fab0(0x185):{const _0x525d60=_0x3cdac5,_0x43c1f6=_0x525d60[_0xc9fab0(0x190)];return{'type':'ABTest','name':_0x525d60[_0xc9fab0(0x193)],'customizedSplit':_0x43c1f6[_0xc9fab0(0x186)],'uniqueId':_0x43c1f6['unique_id'],'variants':_0x43c1f6['variants'][_0xc9fab0(0x173)](_0x41a0b8=>({'id':_0x41a0b8['id']||generateUUID(),'name':_0x41a0b8[_0xc9fab0(0x193)],'percentage':_0x41a0b8[_0xc9fab0(0x1d6)],'next':_0x511534(_0x41a0b8['next'])})),'next':_0x511534(_0x525d60['next'])};}case _0xc9fab0(0x203):return{'type':'Merge','name':_0x3cdac5['name'],'next':_0x511534(_0x3cdac5['next'])};case _0xc9fab0(0x164):{const _0x461632=_0x3cdac5,_0x50e901=_0x461632[_0xc9fab0(0x190)][_0xc9fab0(0x1aa)],_0x891923=_0x50e901[_0xc9fab0(0x1df)],_0x4c8d48=_0x50e901[_0xc9fab0(0x1ec)];let _0x1a1e63=_0x50e901[_0xc9fab0(0x1df)];_0x48746d?.[_0xc9fab0(0x1f9)]&&!/^\d+$/['test'](_0x1a1e63)&&(_0x1a1e63=await _0x48746d['resolveJourneyId'](_0x1a1e63));let _0x5533b3=_0x50e901[_0xc9fab0(0x1ec)];_0x48746d?.['resolveStageId']&&!/^\d+$/[_0xc9fab0(0x1fb)](_0x5533b3)&&(_0x5533b3=await _0x48746d['resolveStageId'](_0x1a1e63,_0x5533b3));const _0x3a9306=!/^\d+$/['test'](_0x891923)&&!isLocalJourneyRef(_0x891923)?formatApiJourneyName(_0x891923,_0x4c8d48):undefined;return{'type':'Jump','name':_0x461632[_0xc9fab0(0x193)],'target':{'journeyId':_0x1a1e63,'journeyStageId':_0x5533b3,'journeyBundleId':_0x50e901[_0xc9fab0(0x167)],'journeyName':_0x3a9306,'confirmed':!![]},'next':_0x511534(_0x461632[_0xc9fab0(0x1ab)])};}case _0xc9fab0(0x1b5):return{'type':'End','name':_0x3cdac5[_0xc9fab0(0x193)]};default:{const _0x5ded68=_0x3cdac5;return{'type':_0xc9fab0(0x1ee),'name':_0x5ded68[_0xc9fab0(0x193)]};}}}export function toYamlString(_0x418d44){const _0x498f6c=a154_0x2d30,_0x55a158=stripInternalFields(_0x418d44),_0x545416=a154_0x50d26f[_0x498f6c(0x166)](_0x55a158,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x498f6c(0x204)}),_0x532b7f=[_0x498f6c(0x1f8),_0x498f6c(0x1c1),_0x498f6c(0x178),_0x498f6c(0x162),_0x498f6c(0x17e),_0x498f6c(0x15d),'versions:'];let _0x5ac305=_0x545416;for(const _0x5858ea of _0x532b7f){_0x5ac305=_0x5ac305[_0x498f6c(0x1dd)](new RegExp('^('+_0x5858ea+')','m'),(_0x1c8247,_0x150acb,_0x321d26)=>{if(_0x321d26===0x0||_0x5ac305[_0x321d26-0x1]==='\x0a'&&_0x5ac305[_0x321d26-0x2]==='\x0a')return _0x150acb;return'\x0a'+_0x150acb;});}return _0x5ac305;}function stripInternalFields(_0xe5480d){const _0xdbbceb=a154_0x2d30,{id:_0x57954e,folder_id:_0x5a73df,bundle_id:_0x1efd53,bundle_name:_0x383a7e,version:_0x578b44,allow_reentry:_0x330e63,..._0x191f0f}=_0xe5480d;return _0x191f0f['journeys']&&(_0x191f0f[_0xdbbceb(0x18e)]=_0x191f0f[_0xdbbceb(0x18e)][_0xdbbceb(0x173)](_0x1062dc=>{const _0x487a4f=_0xdbbceb,{id:_0x5eb217,..._0x245849}=_0x1062dc;return{..._0x245849,'stages':_0x245849['stages'][_0x487a4f(0x173)](stripStageInternalFields),..._0x1062dc['latest']===!![]?{'latest':!![]}:{},..._0x191f0f[_0x487a4f(0x18e)][_0x487a4f(0x17a)]===0x1&&_0x245849[_0x487a4f(0x1cc)]==='v1'?{'version':undefined}:{}};})),_0x191f0f[_0xdbbceb(0x1da)]&&(_0x191f0f[_0xdbbceb(0x1da)]=_0x191f0f[_0xdbbceb(0x1da)][_0xdbbceb(0x173)](stripStageInternalFields)),_0x191f0f[_0xdbbceb(0x14c)]&&(_0x191f0f['versions']=_0x191f0f[_0xdbbceb(0x14c)][_0xdbbceb(0x173)](_0x42407e=>{const _0x479eda=_0xdbbceb,{id:_0x32436c,..._0x4c9ece}=_0x42407e;return{..._0x4c9ece,'stages':_0x4c9ece[_0x479eda(0x1da)][_0x479eda(0x173)](stripStageInternalFields),..._0x42407e[_0x479eda(0x16b)]===!![]?{'latest':!![]}:{}};})),_0x191f0f;}function stripStageInternalFields(_0x17aa79){const {id:_0x1add3b,..._0x8f53a7}=_0x17aa79;return _0x8f53a7;}export function parseYamlString(_0x565b25){return safeParseYaml(_0x565b25,JourneyDefSchema);}export function isJourneyDef(_0xa57646,_0xc2fe35){const _0x557c60=a154_0x2d30;if(_0xc2fe35&&(_0xc2fe35['endsWith'](_0x557c60(0x192))||_0xc2fe35[_0x557c60(0x149)]('.journey.yaml')))return!![];return typeof _0xa57646==='object'&&_0xa57646!==null&&_0x557c60(0x19b)in _0xa57646&&_0xa57646[_0x557c60(0x19b)]===_0x557c60(0x1df);}export function generateTemplate(_0x5825f4,_0x18d2ee){const _0x431280=a154_0x2d30,_0x356419={'type':'journey','name':_0x5825f4,'description':'Journey\x20description','reentry':_0x431280(0x155),'goal':{'name':'Goal\x20Achieved','segment':'goal-segment'},'stages':[{'name':_0x431280(0x1ac),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':_0x431280(0x1e1),'segment':_0x18d2ee},'steps':[{'type':_0x431280(0x1cf),'name':_0x431280(0x1e4),'with':{'duration':0x1,'unit':_0x431280(0x17f)}},{'type':_0x431280(0x187),'name':_0x431280(0x1c3),'with':{'activation':'your-activation-name'}},{'type':_0x431280(0x1b5),'name':_0x431280(0x1bc)}]}]};return toYamlString(_0x356419);}function generateUUID(){const _0x988c59=a154_0x2d30;return crypto[_0x988c59(0x1ea)]();}export const SEGMENT_REF_PREFIX=a154_0x257841(0x160);export function parseSegmentRef(_0x2e3039){const _0x226605=a154_0x257841;if(_0x2e3039['startsWith'](SEGMENT_REF_PREFIX))return{'type':_0x226605(0x1fa),'name':_0x2e3039[_0x226605(0x180)](SEGMENT_REF_PREFIX[_0x226605(0x17a)])};if(/^\d+$/[_0x226605(0x1fb)](_0x2e3039))return{'type':'id','name':_0x2e3039};return{'type':_0x226605(0x1ad),'name':_0x2e3039};}export function makeSegmentRef(_0x403b83){return''+SEGMENT_REF_PREFIX+_0x403b83;}export function isExternalSegmentRef(_0x3bfd7a){const _0x1ca1a7=a154_0x257841;return _0x3bfd7a[_0x1ca1a7(0x18d)](SEGMENT_REF_PREFIX);}function a154_0x1b0e(){const _0x213163=['8oJrJFg','8063ILchRW','entries','description','all','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','trim','push','decision_point','endsWith','resolveActivationName','journeyBundleId','versions','waitStepUnit','add','journeyStages','rule','JOURNEY_SYNTAX_ERROR','6RYlbWw','(missing)','values','no_reentry','excluded','\x20\x20\x20\x20type:\x20','ABTest','\x20\x20\x20\x20type:\x20And\x0a','stageName','duration','variants','stages:','activations','segment_id','ref:','from','reentry:','has','jump','toLowerCase','stringify','bundle_id','uniqueId','exitCriterias','launched','latest','version_number','folder_id','waitUntilDate','includes','resolveActivationId','weeks','12896541AtsJDW','map','journeyActivationStepId','moveAfter','reentry_always','1282680MKlIon','goal:','daysOfWeek','length','unique_id','steps','resolveEmbeddedActivationId','journeys:','day','slice','33684SCAMoD','object','folder','set','ab_test','customized_split','activation','waitStepType','resolveEmbeddedSegmentId','get','sort','Date','startsWith','journeys','attributes','with','5715885otxDQh','.journey.yml','name','columns','exit_criteria','resolveSegmentId','1727460ogkxxG','entry_criteria','state','5185848GZnOxB','type','filter','uuid','Expected\x20format:\x0a','relationships','connection','notification','segmentId','customizedSplit','conditionTimeoutUnit','keys','\x20\x20\x20\x20conditions:\x0a','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','shift','wait_until','target','next','Stage\x201','embedded','journeyName','timedOutPath','branches','all_columns','size','allowReentry','DecisionPoint','end','AbTest','timeout','resolveActivation','resolveStageId','isJourneyLocal','1957334KqaIeI','Stage\x20Complete','draft','activation_template_id','conditionTimeoutDuration','journeyBundleName','activations:','journeyId','Send\x20Notification','WaitStep','\x27:\x20','find','1nYzCuv','Activation','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','resolveSegment','segments','version','unit','waitStep','wait','days','Duration','exitCriteria','rootStep','conditions','stageId','percentage','conditionSegmentId','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','week','stages','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','resolveSegmentName','replace','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','journey','days_of_week','Entry\x20Criteria','data','condition','Wait\x201\x20Day','parentFolder','journeyStageId','*Max\x20wait\x20','resolveJumpTarget','schedule','randomUUID','7pOuvkX','stage','milestone','End','\x27.\x0a','root_step','reentry','connector_config','entryCriteria','Met\x20condition(s)','segment','behavior','isArray','segments:','resolveJourneyId','ref','test','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','reentryMode','waitCondition','And','Merge','Jump','definition','merge','null','goal'];a154_0x1b0e=function(){return _0x213163;};return a154_0x1b0e();}export function isJourneysArrayMode(_0xb1f214){const _0x4f32b0=a154_0x257841;return!!(_0xb1f214[_0x4f32b0(0x18e)]&&_0xb1f214[_0x4f32b0(0x18e)][_0x4f32b0(0x17a)]>0x0);}export function isMultiVersionMode(_0x3044c1){const _0x4847a3=a154_0x257841;return!!(_0x3044c1[_0x4847a3(0x14c)]&&_0x3044c1[_0x4847a3(0x14c)][_0x4847a3(0x17a)]>0x0);}export function isSingleVersionMode(_0x48277a){const _0x3bcb6d=a154_0x257841;return!!(_0x48277a[_0x3bcb6d(0x1da)]&&_0x48277a[_0x3bcb6d(0x1da)][_0x3bcb6d(0x17a)]>0x0);}export function hasMultipleVersions(_0x4c6ad4){const _0x1968b3=a154_0x257841;if(isJourneysArrayMode(_0x4c6ad4))return(_0x4c6ad4[_0x1968b3(0x18e)]?.[_0x1968b3(0x17a)]||0x0)>0x1;if(isMultiVersionMode(_0x4c6ad4))return(_0x4c6ad4['versions']?.[_0x1968b3(0x17a)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x7ff87e){const _0x199bf1=a154_0x257841;if(isJourneysArrayMode(_0x7ff87e))return _0x7ff87e;if(isSingleVersionMode(_0x7ff87e)){const {stages:_0x4cdbee,id:_0x58946f,version:_0x16a7c8,version_number:_0x3fed70,..._0x40853c}=_0x7ff87e;return{..._0x40853c,'journeys':[{'version':_0x16a7c8||'v1','stages':_0x4cdbee||[],'id':_0x58946f,'version_number':_0x3fed70}]};}if(isMultiVersionMode(_0x7ff87e)){const {versions:_0x36c852,..._0x27b3b5}=_0x7ff87e;return{..._0x27b3b5,'journeys':(_0x36c852||[])['map'](_0x329879=>({'version':_0x329879[_0x199bf1(0x193)],'state':_0x329879[_0x199bf1(0x199)],'latest':_0x329879[_0x199bf1(0x16b)],'stages':_0x329879[_0x199bf1(0x1da)],'id':_0x329879['id'],'version_number':_0x329879[_0x199bf1(0x16c)]}))};}return _0x7ff87e;}export function normalizeJourneyDef(_0x3a8a87,_0x2f8730){const _0x453370=a154_0x257841,_0x1cb618=normalizeToJourneysFormat(_0x3a8a87),_0x45c55b=_0x2f8730?.[_0x453370(0x1cb)]?Object[_0x453370(0x1a5)](_0x2f8730[_0x453370(0x1cb)]):undefined,_0x224a0b=_0x2f8730?.[_0x453370(0x15e)]?Object['keys'](_0x2f8730['activations']):undefined;return{'type':'journey','name':_0x1cb618[_0x453370(0x193)],..._0x1cb618[_0x453370(0x209)]!==undefined&&{'description':_0x1cb618['description']},..._0x1cb618['goal']&&{'goal':normalizeJourneyCriteria(_0x1cb618[_0x453370(0x205)])},..._0x1cb618['reentry']!==undefined&&{'reentry':_0x1cb618[_0x453370(0x1f1)]},..._0x1cb618['segments']&&{'segments':normalizeEmbeddedSegments(_0x1cb618[_0x453370(0x1cb)],_0x45c55b)},..._0x1cb618[_0x453370(0x15e)]&&{'activations':normalizeEmbeddedActivations(_0x1cb618['activations'],_0x224a0b)},..._0x1cb618['journeys']&&{'journeys':_0x1cb618['journeys'][_0x453370(0x173)](_0x2cf0c=>normalizeJourneyEntry(_0x2cf0c,_0x1cb618[_0x453370(0x18e)][_0x453370(0x17a)]===0x1))}};}function normalizeJourneyEntry(_0x1d1cd4,_0x2e2be7){const _0x48ce9e=a154_0x257841;return{...!_0x2e2be7&&_0x1d1cd4[_0x48ce9e(0x1cc)]!==undefined&&{'version':_0x1d1cd4[_0x48ce9e(0x1cc)]},..._0x1d1cd4['state']!==undefined&&{'state':_0x1d1cd4[_0x48ce9e(0x199)]},...!_0x2e2be7&&_0x1d1cd4[_0x48ce9e(0x16b)]!==undefined&&{'latest':_0x1d1cd4[_0x48ce9e(0x16b)]},..._0x1d1cd4[_0x48ce9e(0x16c)]!==undefined&&{'version_number':_0x1d1cd4[_0x48ce9e(0x16c)]},..._0x1d1cd4[_0x48ce9e(0x205)]&&{'goal':normalizeJourneyCriteria(_0x1d1cd4[_0x48ce9e(0x205)])},..._0x1d1cd4['reentry']!==undefined&&{'reentry':_0x1d1cd4['reentry']},'stages':_0x1d1cd4[_0x48ce9e(0x1da)][_0x48ce9e(0x173)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x312250){const _0x2ff1a=a154_0x257841;return{'name':_0x312250[_0x2ff1a(0x193)],..._0x312250[_0x2ff1a(0x209)]!==undefined&&{'description':_0x312250[_0x2ff1a(0x209)]},..._0x312250[_0x2ff1a(0x198)]&&{'entry_criteria':normalizeJourneyCriteria(_0x312250[_0x2ff1a(0x198)])},..._0x312250[_0x2ff1a(0x195)]&&{'exit_criteria':_0x312250[_0x2ff1a(0x195)][_0x2ff1a(0x173)](normalizeJourneyCriteria)},..._0x312250['milestone']&&{'milestone':normalizeJourneyCriteria(_0x312250[_0x2ff1a(0x1ed)])},..._0x312250[_0x2ff1a(0x17c)]&&{'steps':normalizeStepsWithImplicitNext(_0x312250[_0x2ff1a(0x17c)])}};}function normalizeStepsWithImplicitNext(_0x899950){const _0x4d5e3c=a154_0x257841;return _0x899950[_0x4d5e3c(0x173)]((_0xe6e8c4,_0x32121b)=>{const _0x3beb8c=_0x4d5e3c,_0xdf44fc=_0x32121b<_0x899950[_0x3beb8c(0x17a)]-0x1?_0x899950[_0x32121b+0x1][_0x3beb8c(0x193)]:undefined;return normalizeJourneyStep(_0xe6e8c4,_0xdf44fc);});}function normalizeJourneyCriteria(_0x421244){const _0x29fb7e=a154_0x257841;return{'name':_0x421244[_0x29fb7e(0x193)],..._0x421244[_0x29fb7e(0x209)]!==undefined&&{'description':_0x421244['description']},'segment':_0x421244[_0x29fb7e(0x1f5)],..._0x421244[_0x29fb7e(0x1aa)]&&{'target':normalizeJumpTarget(_0x421244[_0x29fb7e(0x1aa)])}};}function normalizeJourneyStep(_0x23c783,_0x2695cc){const _0x6c8562=a154_0x257841,_0x162e3d=_0x23c783['next']!==undefined&&_0x23c783['next']!==_0x2695cc,_0x4f49f4={'type':_0x23c783[_0x6c8562(0x19b)],'name':_0x23c783[_0x6c8562(0x193)],..._0x162e3d&&{'next':_0x23c783[_0x6c8562(0x1ab)]}};if(_0x6c8562(0x190)in _0x23c783&&_0x23c783[_0x6c8562(0x190)])return{..._0x4f49f4,'with':normalizeStepParams(_0x23c783['type'],_0x23c783[_0x6c8562(0x190)])};return _0x4f49f4;}function normalizeStepParams(_0x4fcf8f,_0x38c90b){const _0x3d8bc4=a154_0x257841;switch(_0x4fcf8f){case'wait':{const _0x36fa94=_0x38c90b;let _0x107450;return _0x36fa94[_0x3d8bc4(0x1e3)]&&(_0x107450={'segment':_0x36fa94['condition']['segment'],..._0x36fa94[_0x3d8bc4(0x1e3)][_0x3d8bc4(0x1ab)]!==undefined&&{'next':_0x36fa94['condition'][_0x3d8bc4(0x1ab)]},..._0x36fa94[_0x3d8bc4(0x1e3)][_0x3d8bc4(0x1b7)]&&{'timeout':{'duration':_0x36fa94[_0x3d8bc4(0x1e3)][_0x3d8bc4(0x1b7)][_0x3d8bc4(0x15b)],'unit':_0x36fa94[_0x3d8bc4(0x1e3)]['timeout'][_0x3d8bc4(0x1cd)],..._0x36fa94[_0x3d8bc4(0x1e3)][_0x3d8bc4(0x1b7)][_0x3d8bc4(0x1ab)]!==undefined&&{'next':_0x36fa94[_0x3d8bc4(0x1e3)][_0x3d8bc4(0x1b7)][_0x3d8bc4(0x1ab)]}}}}),{..._0x36fa94[_0x3d8bc4(0x15b)]!==undefined&&{'duration':_0x36fa94[_0x3d8bc4(0x15b)]},..._0x36fa94[_0x3d8bc4(0x1cd)]!==undefined&&{'unit':_0x36fa94[_0x3d8bc4(0x1cd)]},..._0x36fa94[_0x3d8bc4(0x1a9)]!==undefined&&{'wait_until':_0x36fa94[_0x3d8bc4(0x1a9)]},..._0x36fa94['days_of_week']!==undefined&&{'days_of_week':_0x36fa94[_0x3d8bc4(0x1e0)]},..._0x107450&&{'condition':_0x107450}};}case _0x3d8bc4(0x187):{const _0x53e33f=_0x38c90b;return{'activation':_0x53e33f[_0x3d8bc4(0x187)]};}case'decision_point':{const _0x2ce28a=_0x38c90b;return{'branches':_0x2ce28a[_0x3d8bc4(0x1b0)][_0x3d8bc4(0x173)](normalizeDecisionBranch)};}case _0x3d8bc4(0x185):{const _0x995fe=_0x38c90b;return{..._0x995fe[_0x3d8bc4(0x186)]!==undefined&&{'customized_split':_0x995fe[_0x3d8bc4(0x186)]},..._0x995fe[_0x3d8bc4(0x17b)]!==undefined&&{'unique_id':_0x995fe[_0x3d8bc4(0x17b)]},'variants':_0x995fe[_0x3d8bc4(0x15c)][_0x3d8bc4(0x173)](normalizeAbTestVariant)};}case _0x3d8bc4(0x164):{const _0x232ff4=_0x38c90b;return{'target':normalizeJumpTarget(_0x232ff4['target'])};}default:return _0x38c90b;}}function normalizeDecisionBranch(_0x2159ab){const _0x4f5161=a154_0x257841;return{'name':_0x2159ab[_0x4f5161(0x193)],..._0x2159ab[_0x4f5161(0x1f5)]!==undefined&&{'segment':_0x2159ab[_0x4f5161(0x1f5)]},..._0x2159ab['excluded']!==undefined&&{'excluded':_0x2159ab[_0x4f5161(0x156)]},..._0x2159ab['next']!==undefined&&{'next':_0x2159ab[_0x4f5161(0x1ab)]}};}function normalizeAbTestVariant(_0x32df2a){const _0x1b0cc5=a154_0x257841;return{..._0x32df2a['id']!==undefined&&{'id':_0x32df2a['id']},'name':_0x32df2a[_0x1b0cc5(0x193)],'percentage':_0x32df2a[_0x1b0cc5(0x1d6)],..._0x32df2a[_0x1b0cc5(0x1ab)]!==undefined&&{'next':_0x32df2a['next']}};}function normalizeJumpTarget(_0x42c7fa){const _0x18ceee=a154_0x257841;return{'journey':_0x42c7fa['journey'],'stage':_0x42c7fa[_0x18ceee(0x1ec)],..._0x42c7fa[_0x18ceee(0x167)]!==undefined&&{'bundle_id':_0x42c7fa[_0x18ceee(0x167)]}};}function normalizeEmbeddedSegments(_0x239eda,_0x121fc8){const _0x36e7f8=a154_0x257841,_0x2a80f={},_0x179c3d=Object['keys'](_0x239eda),_0x1a87c6=_0x121fc8?[..._0x121fc8[_0x36e7f8(0x19c)](_0xd0803c=>_0x179c3d[_0x36e7f8(0x16f)](_0xd0803c)),..._0x179c3d[_0x36e7f8(0x19c)](_0x45bb9b=>!_0x121fc8[_0x36e7f8(0x16f)](_0x45bb9b))['sort']()]:_0x179c3d[_0x36e7f8(0x18b)]();for(const _0xa54966 of _0x1a87c6){const _0x53f46b=_0x239eda[_0xa54966];if(_0x53f46b[_0x36e7f8(0x150)]){const _0x363396=_0x53f46b[_0x36e7f8(0x150)];if(_0x363396[_0x36e7f8(0x19b)]!==_0x36e7f8(0x1ff)&&_0x363396['type']!=='Or'&&_0x363396[_0x36e7f8(0x19b)]!=='Composite'){const _0x49e888=_0x363396[_0x36e7f8(0x19b)]??_0x36e7f8(0x153);throw new SDKError(ErrorCode[_0x36e7f8(0x151)],_0x36e7f8(0x20b)+_0xa54966+_0x36e7f8(0x1c5)+('rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27'+_0x49e888+_0x36e7f8(0x1ef))+_0x36e7f8(0x19e)+'\x20\x20rule:\x0a'+_0x36e7f8(0x159)+_0x36e7f8(0x1a6)+_0x36e7f8(0x1db)+_0x36e7f8(0x1c9)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x363396[_0x36e7f8(0x1d4)]||!Array['isArray'](_0x363396[_0x36e7f8(0x1d4)]))throw new SDKError(ErrorCode[_0x36e7f8(0x151)],_0x36e7f8(0x20b)+_0xa54966+'\x27:\x20'+_0x36e7f8(0x1d8)+_0x36e7f8(0x19e)+'\x20\x20rule:\x0a'+(_0x36e7f8(0x157)+_0x363396[_0x36e7f8(0x19b)]+'\x0a')+_0x36e7f8(0x1a6)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x36e7f8(0x1a7));}_0x2a80f[_0xa54966]={..._0x53f46b[_0x36e7f8(0x209)]&&_0x53f46b[_0x36e7f8(0x209)][_0x36e7f8(0x20c)]()&&{'description':_0x53f46b['description']},..._0x53f46b[_0x36e7f8(0x150)]&&{'rule':deepSortObject(_0x53f46b['rule'])}};}return _0x2a80f;}function normalizeEmbeddedActivations(_0xeca49b,_0x2be73d){const _0x4bc802=a154_0x257841,_0x3ae961={},_0x2a5d12=Object[_0x4bc802(0x1a5)](_0xeca49b),_0x1b0855=_0x2be73d?[..._0x2be73d[_0x4bc802(0x19c)](_0x4395f1=>_0x2a5d12['includes'](_0x4395f1)),..._0x2a5d12[_0x4bc802(0x19c)](_0xdc8ba6=>!_0x2be73d['includes'](_0xdc8ba6))[_0x4bc802(0x18b)]()]:_0x2a5d12['sort']();for(const _0x40a71f of _0x1b0855){const _0x3ff5f1=_0xeca49b[_0x40a71f];_0x3ae961[_0x40a71f]={'name':_0x3ff5f1[_0x4bc802(0x193)],'connection':_0x3ff5f1[_0x4bc802(0x1a0)],..._0x3ff5f1[_0x4bc802(0x209)]!==undefined&&{'description':_0x3ff5f1[_0x4bc802(0x209)]},..._0x3ff5f1[_0x4bc802(0x1b1)]!==undefined&&{'all_columns':_0x3ff5f1[_0x4bc802(0x1b1)]},..._0x3ff5f1[_0x4bc802(0x194)]!==undefined&&{'columns':_0x3ff5f1[_0x4bc802(0x194)]},..._0x3ff5f1[_0x4bc802(0x1f6)]!==undefined&&{'behavior':_0x3ff5f1[_0x4bc802(0x1f6)]},..._0x3ff5f1[_0x4bc802(0x1e9)]!==undefined&&{'schedule':_0x3ff5f1[_0x4bc802(0x1e9)]},..._0x3ff5f1[_0x4bc802(0x1a1)]!==undefined&&{'notification':_0x3ff5f1[_0x4bc802(0x1a1)]},..._0x3ff5f1[_0x4bc802(0x1f2)]!==undefined&&{'connector_config':_0x3ff5f1['connector_config']},..._0x3ff5f1[_0x4bc802(0x1be)]!==undefined&&{'activation_template_id':_0x3ff5f1[_0x4bc802(0x1be)]}};}return _0x3ae961;}export function getActiveStages(_0x2dd916){const _0x15923c=a154_0x257841;if(isJourneysArrayMode(_0x2dd916)){const _0x45c231=_0x2dd916[_0x15923c(0x18e)]||[],_0x4234f3=_0x45c231[_0x15923c(0x1c6)](_0x563960=>_0x563960['latest']===!![])||_0x45c231[0x0];return _0x4234f3?.[_0x15923c(0x1da)]||[];}if(isSingleVersionMode(_0x2dd916))return _0x2dd916['stages']||[];if(isMultiVersionMode(_0x2dd916)){const _0x53fe2f=_0x2dd916['versions']||[],_0x87bd06=_0x53fe2f[_0x15923c(0x1c6)](_0x4346a7=>_0x4346a7[_0x15923c(0x16b)]===!![])||_0x53fe2f[0x0];return _0x87bd06?.[_0x15923c(0x1da)]||[];}return[];}export function getLatestJourneyEntry(_0x49d4d7){const _0x365d4a=a154_0x257841;if(isJourneysArrayMode(_0x49d4d7)){const _0x3d6eee=_0x49d4d7[_0x365d4a(0x18e)]||[];return _0x3d6eee[_0x365d4a(0x1c6)](_0x56a6c3=>_0x56a6c3[_0x365d4a(0x16b)]===!![])||_0x3d6eee[0x0];}if(isMultiVersionMode(_0x49d4d7)){const _0x56edd2=_0x49d4d7['versions']||[],_0x1dea4c=_0x56edd2[_0x365d4a(0x1c6)](_0x1c8a4c=>_0x1c8a4c['latest']===!![])||_0x56edd2[0x0];if(_0x1dea4c)return{'version':_0x1dea4c[_0x365d4a(0x193)],'state':_0x1dea4c[_0x365d4a(0x199)],'latest':_0x1dea4c[_0x365d4a(0x16b)],'stages':_0x1dea4c[_0x365d4a(0x1da)],'id':_0x1dea4c['id'],'version_number':_0x1dea4c[_0x365d4a(0x16c)]};}if(isSingleVersionMode(_0x49d4d7))return{'version':_0x49d4d7[_0x365d4a(0x1cc)]||'v1','state':_0x365d4a(0x1bd),'stages':_0x49d4d7[_0x365d4a(0x1da)]||[],'id':_0x49d4d7['id'],'version_number':_0x49d4d7[_0x365d4a(0x16c)],'goal':_0x49d4d7['goal'],'reentry':_0x49d4d7[_0x365d4a(0x1f1)]};return undefined;}export function getLatestVersion(_0x532409){const _0x43fd21=a154_0x257841;if(!isMultiVersionMode(_0x532409))return undefined;const _0x21d2dd=_0x532409[_0x43fd21(0x14c)]||[];return _0x21d2dd[_0x43fd21(0x1c6)](_0x3058da=>_0x3058da['latest']===!![])||_0x21d2dd[0x0];}export function getEffectiveGoal(_0x500f3d){const _0x47ef52=a154_0x257841,_0xa3e909=getLatestJourneyEntry(_0x500f3d);return _0xa3e909?.[_0x47ef52(0x205)]||_0x500f3d['goal'];}export function getEffectiveReentry(_0x4addef){const _0x372d81=a154_0x257841,_0x113918=getLatestJourneyEntry(_0x4addef);return _0x113918?.['reentry']||_0x4addef[_0x372d81(0x1f1)];}export function collectSegmentRefs(_0xcbdefe){const _0x2b2e21=a154_0x257841,_0x217a6e=new Set();_0xcbdefe[_0x2b2e21(0x205)]?.[_0x2b2e21(0x1f5)]&&_0x217a6e['add'](_0xcbdefe[_0x2b2e21(0x205)][_0x2b2e21(0x1f5)]);const _0x5dc52c=_0x45e2a0=>{const _0x15e572=_0x2b2e21;for(const _0x91f572 of _0x45e2a0){_0x91f572[_0x15e572(0x198)]?.[_0x15e572(0x1f5)]&&_0x217a6e['add'](_0x91f572[_0x15e572(0x198)][_0x15e572(0x1f5)]);if(_0x91f572[_0x15e572(0x195)])for(const _0x3d8c98 of _0x91f572[_0x15e572(0x195)]){_0x3d8c98[_0x15e572(0x1f5)]&&_0x217a6e['add'](_0x3d8c98[_0x15e572(0x1f5)]);}_0x91f572[_0x15e572(0x1ed)]?.[_0x15e572(0x1f5)]&&_0x217a6e[_0x15e572(0x14e)](_0x91f572[_0x15e572(0x1ed)][_0x15e572(0x1f5)]);if(_0x91f572[_0x15e572(0x17c)])for(const _0x31f460 of _0x91f572[_0x15e572(0x17c)]){if(_0x31f460[_0x15e572(0x19b)]===_0x15e572(0x148)){const _0x5c3517=_0x31f460;for(const _0x2f4927 of _0x5c3517[_0x15e572(0x190)][_0x15e572(0x1b0)]){_0x2f4927[_0x15e572(0x1f5)]&&_0x217a6e[_0x15e572(0x14e)](_0x2f4927[_0x15e572(0x1f5)]);}}else{if(_0x31f460[_0x15e572(0x19b)]===_0x15e572(0x1cf)){const _0x5edd75=_0x31f460;_0x5edd75['with'][_0x15e572(0x1e3)]?.[_0x15e572(0x1f5)]&&_0x217a6e[_0x15e572(0x14e)](_0x5edd75[_0x15e572(0x190)]['condition'][_0x15e572(0x1f5)]);}}}}};_0xcbdefe[_0x2b2e21(0x1da)]&&_0x5dc52c(_0xcbdefe[_0x2b2e21(0x1da)]);if(_0xcbdefe['versions'])for(const _0x2c3627 of _0xcbdefe[_0x2b2e21(0x14c)]){_0x5dc52c(_0x2c3627[_0x2b2e21(0x1da)]);}return _0x217a6e;}export function validateSegmentRefs(_0x13ce85){const _0x5e5dcf=a154_0x257841,_0x23748a=[],_0x2a2e46=collectSegmentRefs(_0x13ce85),_0x133cd8=new Set(Object[_0x5e5dcf(0x1a5)](_0x13ce85[_0x5e5dcf(0x1cb)]||{}));for(const _0x38c3e6 of _0x2a2e46){const _0x57b5e7=parseSegmentRef(_0x38c3e6);_0x57b5e7[_0x5e5dcf(0x19b)]===_0x5e5dcf(0x1ad)&&!_0x133cd8[_0x5e5dcf(0x163)](_0x57b5e7[_0x5e5dcf(0x193)])&&_0x23748a['push']('Unknown\x20segment\x20\x22'+_0x57b5e7[_0x5e5dcf(0x193)]+_0x5e5dcf(0x1de)+_0x57b5e7[_0x5e5dcf(0x193)]+_0x5e5dcf(0x1fc));}return _0x23748a;}export function collectSegmentIdsFromJourneyApi(_0x5a76cd){const _0x3a7760=a154_0x257841,_0x3d5c9d=new Set();_0x5a76cd[_0x3a7760(0x18f)][_0x3a7760(0x205)]?.[_0x3a7760(0x1a2)]&&_0x3d5c9d[_0x3a7760(0x14e)](_0x5a76cd[_0x3a7760(0x18f)]['goal'][_0x3a7760(0x1a2)]);const _0x13ff61=_0x5a76cd[_0x3a7760(0x18f)]['journeyStages'];if(Array[_0x3a7760(0x1f7)](_0x13ff61))for(const _0x4b6aa6 of _0x13ff61){_0x4b6aa6[_0x3a7760(0x1f3)]?.['segmentId']&&_0x3d5c9d['add'](_0x4b6aa6[_0x3a7760(0x1f3)][_0x3a7760(0x1a2)]);const _0x5049c8=_0x4b6aa6[_0x3a7760(0x169)]??_0x4b6aa6[_0x3a7760(0x1d2)];if(Array[_0x3a7760(0x1f7)](_0x5049c8))for(const _0x4f7b9f of _0x5049c8){_0x4f7b9f[_0x3a7760(0x1a2)]&&_0x3d5c9d[_0x3a7760(0x14e)](_0x4f7b9f[_0x3a7760(0x1a2)]);}_0x4b6aa6[_0x3a7760(0x1ed)]?.['segmentId']&&_0x3d5c9d[_0x3a7760(0x14e)](_0x4b6aa6[_0x3a7760(0x1ed)][_0x3a7760(0x1a2)]);if(_0x4b6aa6[_0x3a7760(0x17c)]&&typeof _0x4b6aa6['steps']===_0x3a7760(0x182)){const _0x5e0534=Array[_0x3a7760(0x1f7)](_0x4b6aa6[_0x3a7760(0x17c)])?_0x4b6aa6['steps']:Object[_0x3a7760(0x154)](_0x4b6aa6[_0x3a7760(0x17c)]);for(const _0xc7680 of _0x5e0534){_0xc7680['waitCondition']?.[_0x3a7760(0x1a2)]&&_0x3d5c9d[_0x3a7760(0x14e)](_0xc7680[_0x3a7760(0x1fe)][_0x3a7760(0x1a2)]);const _0x1b3b4e=_0xc7680;_0x1b3b4e['conditionSegmentId']&&_0x3d5c9d[_0x3a7760(0x14e)](_0x1b3b4e[_0x3a7760(0x1d7)]);if(Array['isArray'](_0x1b3b4e[_0x3a7760(0x1d4)]))for(const _0x4db342 of _0x1b3b4e['conditions']){_0x4db342[_0x3a7760(0x1a2)]&&_0x3d5c9d[_0x3a7760(0x14e)](_0x4db342[_0x3a7760(0x1a2)]);}if(Array['isArray'](_0xc7680['branches']))for(const _0x14213d of _0xc7680['branches']){_0x14213d['segmentId']&&_0x3d5c9d[_0x3a7760(0x14e)](_0x14213d[_0x3a7760(0x1a2)]);}}}}return _0x3d5c9d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x437b63=a155_0x10a4;(function(_0x47cda5,_0x1a0ea9){const _0x378588=a155_0x10a4,_0x56110d=_0x47cda5();while(!![]){try{const _0x18590c=parseInt(_0x378588(0xef))/0x1*(parseInt(_0x378588(0xe2))/0x2)+parseInt(_0x378588(0xdf))/0x3+-parseInt(_0x378588(0xf5))/0x4+-parseInt(_0x378588(0xca))/0x5*(parseInt(_0x378588(0xe5))/0x6)+-parseInt(_0x378588(0xbf))/0x7*(parseInt(_0x378588(0xd0))/0x8)+-parseInt(_0x378588(0xe1))/0x9*(parseInt(_0x378588(0xd7))/0xa)+parseInt(_0x378588(0xf3))/0xb;if(_0x18590c===_0x1a0ea9)break;else _0x56110d['push'](_0x56110d['shift']());}catch(_0x5166ae){_0x56110d['push'](_0x56110d['shift']());}}}(a155_0x1a9f,0xd91b7));export const DEFAULT_TIME_RANGE=a155_0x437b63(0xeb);function a155_0x1a9f(){const _0x40586f=['\x0aLIMIT\x200\x0a','table','\x20LIMIT\x20','\x0aSELECT\x20','behaviors','SELECT\x20','1987595dGhTQy','\x20IS\x20NOT\x20NULL\x0a','\x20=\x20',')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20','\x20=\x20b.','join','8BiAJtf','SELECT\x20*\x20FROM\x20','source','columns','database','child_key','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','121710rUukBv','\x20=\x20a.','\x27)\x0aLIMIT\x20','\x27)\x0a','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','length','\x20FROM\x20','forEach','2467188IQsPgB','label','279vTCQcW','2dyDYnO','master','map','6qNFZhg','test','column','(all\x20columns)','all_columns','\x0aFROM\x20','-1d','\x0a\x20\x20ON\x20m.','parent_key','find','1557236pQbnDW','trim','push','toLowerCase','17032312WUxbFn','\x0aLIMIT\x20','5920216BlBPSA','\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20','name','replace','\x0aSELECT\x20m.','5487153dIoLpk','b.*','\x20a\x0a\x20\x20ON\x20m.','\x20m\x0aJOIN\x20','\x20b\x0a\x20\x20ON\x20m.'];a155_0x1a9f=function(){return _0x40586f;};return a155_0x1a9f();}export const DEFAULT_SAMPLE_LIMIT=0x28;function a155_0x10a4(_0x34e9d1,_0x33d267){_0x34e9d1=_0x34e9d1-0xbe;const _0x1a9f67=a155_0x1a9f();let _0x10a4c8=_0x1a9f67[_0x34e9d1];return _0x10a4c8;}export function generateSchemaValidationSQL(_0x5184f6,_0x2c1aef,_0x33086c){const _0x19bfdd=a155_0x437b63,_0x2d2741=_0x33086c&&_0x33086c[_0x19bfdd(0xdc)]>0x0?_0x33086c['join'](',\x20'):'*';return _0x19bfdd(0xc9)+_0x2d2741+_0x19bfdd(0xdd)+_0x5184f6+'.'+_0x2c1aef+'\x20LIMIT\x200';}export function generateMasterCountSQL(_0x407d8a){const _0x216b9b=a155_0x437b63,{database:_0x392e9a,table:_0x2c822d}=_0x407d8a[_0x216b9b(0xe3)];return _0x216b9b(0xdb)+_0x392e9a+'.'+_0x2c822d;}export function generateMasterSampleSQL(_0x5090ab,_0x5b3547=0x5){const _0x4f8f82=a155_0x437b63,{database:_0x19365c,table:_0xcbb79c}=_0x5090ab['master'];return'SELECT\x20*\x20FROM\x20'+_0x19365c+'.'+_0xcbb79c+_0x4f8f82(0xc6)+_0x5b3547;}export function generateAttributeCoverageSQL(_0x39900d,_0x5d12dd){const _0x4582bf=a155_0x437b63,_0x1f058d=_0x39900d[_0x4582bf(0xe3)];return(_0x4582bf(0xf6)+_0x1f058d[_0x4582bf(0xd4)]+'.'+_0x1f058d['table']+'\x20m\x0aLEFT\x20JOIN\x20'+_0x5d12dd[_0x4582bf(0xd2)][_0x4582bf(0xd4)]+'.'+_0x5d12dd[_0x4582bf(0xd2)][_0x4582bf(0xc5)]+_0x4582bf(0xc1)+_0x5d12dd['join'][_0x4582bf(0xed)]+_0x4582bf(0xd8)+_0x5d12dd[_0x4582bf(0xcf)][_0x4582bf(0xd5)]+'\x0aWHERE\x20a.'+_0x5d12dd['join']['child_key']+_0x4582bf(0xcb))['trim']();}export function generateBehaviorStatsSQL(_0xba635c,_0x6bd88f,_0x4fbcfc=DEFAULT_TIME_RANGE){const _0x4151e6=a155_0x437b63,_0x427e57=_0xba635c[_0x4151e6(0xe3)];return(_0x4151e6(0xd6)+_0x6bd88f[_0x4151e6(0xcf)]['parent_key']+_0x4151e6(0xcd)+_0x427e57[_0x4151e6(0xd4)]+'.'+_0x427e57[_0x4151e6(0xc5)]+_0x4151e6(0xc2)+_0x6bd88f[_0x4151e6(0xd2)]['database']+'.'+_0x6bd88f['source'][_0x4151e6(0xc5)]+'\x20b\x0a\x20\x20ON\x20m.'+_0x6bd88f[_0x4151e6(0xcf)]['parent_key']+_0x4151e6(0xce)+_0x6bd88f[_0x4151e6(0xcf)][_0x4151e6(0xd5)]+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0x4fbcfc+_0x4151e6(0xda))[_0x4151e6(0xf0)]();}export function generateAttributeSampleSQL(_0x12cb16,_0x136335,_0x26574d=0x5){const _0x5adef4=a155_0x437b63,_0x518f77=_0x12cb16[_0x5adef4(0xe3)],_0x421b5e=_0x136335[_0x5adef4(0xcf)][_0x5adef4(0xed)],_0x33022c=_0x136335[_0x5adef4(0xd3)][_0x5adef4(0xe4)](_0x28497f=>'a.'+_0x28497f[_0x5adef4(0xe7)])['join'](',\x20');return(_0x5adef4(0xbe)+_0x421b5e+',\x20'+_0x33022c+_0x5adef4(0xea)+_0x518f77['database']+'.'+_0x518f77[_0x5adef4(0xc5)]+_0x5adef4(0xc2)+_0x136335[_0x5adef4(0xd2)]['database']+'.'+_0x136335[_0x5adef4(0xd2)]['table']+_0x5adef4(0xc1)+_0x136335['join'][_0x5adef4(0xed)]+'\x20=\x20a.'+_0x136335[_0x5adef4(0xcf)][_0x5adef4(0xd5)]+_0x5adef4(0xf4)+_0x26574d+'\x0a')[_0x5adef4(0xf0)]();}export function generateBehaviorSampleSQL(_0x467abe,_0x27c893,_0x29fa0a=0x5,_0x218358=DEFAULT_TIME_RANGE){const _0x24c3ae=a155_0x437b63,_0x36c7ca=_0x467abe['master'],_0x1e2d3c=_0x27c893[_0x24c3ae(0xcf)][_0x24c3ae(0xed)];let _0x4fddaa;if(_0x27c893[_0x24c3ae(0xe9)])_0x4fddaa=_0x24c3ae(0xc0);else _0x27c893[_0x24c3ae(0xd3)]&&_0x27c893[_0x24c3ae(0xd3)][_0x24c3ae(0xdc)]>0x0?_0x4fddaa=_0x27c893['columns']['map'](_0x240098=>'b.'+_0x240098[_0x24c3ae(0xe7)])['join'](',\x20'):_0x4fddaa='b.*';return(_0x24c3ae(0xbe)+_0x1e2d3c+',\x20'+_0x4fddaa+_0x24c3ae(0xea)+_0x36c7ca['database']+'.'+_0x36c7ca[_0x24c3ae(0xc5)]+_0x24c3ae(0xc2)+_0x27c893[_0x24c3ae(0xd2)][_0x24c3ae(0xd4)]+'.'+_0x27c893[_0x24c3ae(0xd2)]['table']+_0x24c3ae(0xc3)+_0x27c893[_0x24c3ae(0xcf)][_0x24c3ae(0xed)]+_0x24c3ae(0xce)+_0x27c893[_0x24c3ae(0xcf)][_0x24c3ae(0xd5)]+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0x218358+_0x24c3ae(0xd9)+_0x29fa0a+'\x0a')[_0x24c3ae(0xf0)]();}function quoteIdentifier(_0x2e88e5){const _0x55abe8=a155_0x437b63;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/[_0x55abe8(0xe6)](_0x2e88e5))return'\x22'+_0x2e88e5[_0x55abe8(0xf8)](/"/g,'\x22\x22')+'\x22';return _0x2e88e5;}export function generateEnrichedSQL(_0x40e81b,_0x4e714a=0x5){const _0x35680a=a155_0x437b63,_0x350270=_0x40e81b[_0x35680a(0xe3)],_0x5de059=_0x40e81b['attributes']||[];if(_0x5de059[_0x35680a(0xdc)]===0x0)return _0x35680a(0xd1)+_0x350270[_0x35680a(0xd4)]+'.'+_0x350270[_0x35680a(0xc5)]+'\x20LIMIT\x20'+_0x4e714a;const _0x5545a2=['m.*'],_0x47c0b8=[];return _0x5de059[_0x35680a(0xde)]((_0x54a475,_0x306c1e)=>{const _0x232a29=_0x35680a,_0x3c9f64='a'+_0x306c1e;_0x54a475['columns'][_0x232a29(0xde)](_0x1759ea=>{const _0x135fa5=_0x232a29,_0x16c939=quoteIdentifier(_0x1759ea[_0x135fa5(0xe0)]||_0x1759ea['column']);_0x5545a2[_0x135fa5(0xf1)](_0x3c9f64+'.'+_0x1759ea[_0x135fa5(0xe7)]+'\x20AS\x20'+_0x16c939);}),_0x47c0b8[_0x232a29(0xf1)]('LEFT\x20JOIN\x20'+_0x54a475[_0x232a29(0xd2)][_0x232a29(0xd4)]+'.'+_0x54a475[_0x232a29(0xd2)][_0x232a29(0xc5)]+'\x20'+_0x3c9f64+_0x232a29(0xec)+_0x54a475[_0x232a29(0xcf)][_0x232a29(0xed)]+_0x232a29(0xcc)+_0x3c9f64+'.'+_0x54a475[_0x232a29(0xcf)][_0x232a29(0xd5)]);}),(_0x35680a(0xc7)+_0x5545a2[_0x35680a(0xcf)](',\x20')+'\x0aFROM\x20'+_0x350270[_0x35680a(0xd4)]+'.'+_0x350270[_0x35680a(0xc5)]+'\x20m\x0a'+_0x47c0b8[_0x35680a(0xcf)]('\x0a')+_0x35680a(0xf4)+_0x4e714a+'\x0a')[_0x35680a(0xf0)]();}export function generateAttributeSchemaSQL(_0x359f43,_0x3fd834){const _0x591025=a155_0x437b63,_0x328b7b=_0x359f43[_0x591025(0xe3)],_0x28a203=_0x3fd834[_0x591025(0xcf)]['parent_key'],_0x3a97ac=_0x3fd834[_0x591025(0xd3)][_0x591025(0xe4)](_0x12db1d=>'a.'+_0x12db1d['column'])['join'](',\x20');return(_0x591025(0xbe)+_0x28a203+',\x20'+_0x3a97ac+_0x591025(0xea)+_0x328b7b[_0x591025(0xd4)]+'.'+_0x328b7b[_0x591025(0xc5)]+_0x591025(0xc2)+_0x3fd834[_0x591025(0xd2)][_0x591025(0xd4)]+'.'+_0x3fd834[_0x591025(0xd2)]['table']+_0x591025(0xc1)+_0x3fd834[_0x591025(0xcf)][_0x591025(0xed)]+_0x591025(0xd8)+_0x3fd834[_0x591025(0xcf)][_0x591025(0xd5)]+_0x591025(0xc4))[_0x591025(0xf0)]();}export function generateBehaviorSchemaSQL(_0x77e428,_0x431d63){const _0x37bde5=a155_0x437b63,_0x436bd1=_0x77e428[_0x37bde5(0xe3)],_0x2dfbb8=_0x431d63[_0x37bde5(0xcf)][_0x37bde5(0xed)];let _0x185bc4;if(_0x431d63[_0x37bde5(0xe9)])_0x185bc4='b.*';else _0x431d63[_0x37bde5(0xd3)]&&_0x431d63['columns']['length']>0x0?_0x185bc4=_0x431d63['columns'][_0x37bde5(0xe4)](_0x55e9d2=>'b.'+_0x55e9d2[_0x37bde5(0xe7)])[_0x37bde5(0xcf)](',\x20'):_0x185bc4=_0x37bde5(0xc0);return(_0x37bde5(0xbe)+_0x2dfbb8+',\x20'+_0x185bc4+_0x37bde5(0xea)+_0x436bd1[_0x37bde5(0xd4)]+'.'+_0x436bd1[_0x37bde5(0xc5)]+'\x20m\x0aJOIN\x20'+_0x431d63[_0x37bde5(0xd2)][_0x37bde5(0xd4)]+'.'+_0x431d63['source']['table']+'\x20b\x0a\x20\x20ON\x20m.'+_0x431d63['join'][_0x37bde5(0xed)]+_0x37bde5(0xce)+_0x431d63[_0x37bde5(0xcf)][_0x37bde5(0xd5)]+_0x37bde5(0xc4))['trim']();}export function getAttributeColumns(_0x41d8a5){const _0x4ea53f=a155_0x437b63;return _0x41d8a5['columns'][_0x4ea53f(0xe4)](_0x304497=>({'label':_0x304497['label']||_0x304497['column'],'column':_0x304497['column']}));}export function getBehaviorColumns(_0xda1b15){const _0x1d0bca=a155_0x437b63;if(_0xda1b15['all_columns'])return[{'label':_0x1d0bca(0xe8),'column':'*'}];if(_0xda1b15['columns']&&_0xda1b15[_0x1d0bca(0xd3)][_0x1d0bca(0xdc)]>0x0)return _0xda1b15[_0x1d0bca(0xd3)][_0x1d0bca(0xe4)](_0x51dea1=>({'label':_0x51dea1[_0x1d0bca(0xe0)]||_0x51dea1[_0x1d0bca(0xe7)],'column':_0x51dea1[_0x1d0bca(0xe7)]}));return[{'label':_0x1d0bca(0xe8),'column':'*'}];}export function findAttributeByName(_0x7c82af,_0x3ea323){const _0x502be3=a155_0x437b63;return _0x7c82af['attributes']?.[_0x502be3(0xee)](_0x5dbaa4=>_0x5dbaa4['name'][_0x502be3(0xf2)]()===_0x3ea323[_0x502be3(0xf2)]());}export function findBehaviorByName(_0x136ba9,_0x2b0f0f){const _0x245473=a155_0x437b63;return _0x136ba9[_0x245473(0xc8)]?.[_0x245473(0xee)](_0x17bc4a=>_0x17bc4a[_0x245473(0xf7)][_0x245473(0xf2)]()===_0x2b0f0f[_0x245473(0xf2)]());}
|