@treasuredata/tdx 2026.3.43 → 2026.3.44
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.js +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.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +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-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/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.js +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/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +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.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- 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.js +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.js +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.js +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/personalization.js +1 -1
- package/dist/sdk/policy.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.d.ts +4 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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.js +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.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +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/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/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.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/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(_0x2c10f8,_0x29d285){const _0x4eac82=a145_0x2dfd,_0x1e3d88=_0x2c10f8();while(!![]){try{const _0x56721a=-parseInt(_0x4eac82(0x11d))/0x1+-parseInt(_0x4eac82(0x134))/0x2*(parseInt(_0x4eac82(0x105))/0x3)+parseInt(_0x4eac82(0xf6))/0x4*(parseInt(_0x4eac82(0xfd))/0x5)+parseInt(_0x4eac82(0x133))/0x6*(-parseInt(_0x4eac82(0x135))/0x7)+-parseInt(_0x4eac82(0x10d))/0x8*(-parseInt(_0x4eac82(0x110))/0x9)+-parseInt(_0x4eac82(0xf7))/0xa*(-parseInt(_0x4eac82(0x13a))/0xb)+parseInt(_0x4eac82(0xed))/0xc;if(_0x56721a===_0x29d285)break;else _0x1e3d88['push'](_0x1e3d88['shift']());}catch(_0x3a59f9){_0x1e3d88['push'](_0x1e3d88['shift']());}}}(a145_0x9736,0xbc1ce));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x591a20){const _0x2c1f6c=a145_0x2dfd;return _0x591a20[_0x2c1f6c(0x114)]()[_0x2c1f6c(0x11f)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x2c1f6c(0x11f)](/_+/g,'_')[_0x2c1f6c(0x11f)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x59195a){const _0xe066c=a145_0x2dfd,_0x4b0fbe=_0x59195a['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x4b0fbe){const _0x343497=_0x4b0fbe[0x1][_0xe066c(0x114)](),_0x26695b=_0x4b0fbe[0x2],_0x374e59=_0x26695b[_0xe066c(0x11f)](/-/g,'')[_0xe066c(0x11a)](0x0,0x4)[_0xe066c(0x114)]();return _0x343497+'_'+_0x374e59;}const _0x49e469=_0x59195a[_0xe066c(0x132)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x49e469){const _0x39c618=_0x49e469[0x1],_0xcd088=_0x49e469[0x2][_0xe066c(0x114)](),_0x4d49e9=_0x39c618[_0xe066c(0x11f)](/-/g,'')[_0xe066c(0x11a)](0x0,0x4)[_0xe066c(0x114)]();return _0xcd088+'_'+_0x4d49e9;}return undefined;}function stableStringify(_0x5d2f71){const _0xa34ba2=a145_0x2dfd;if(Array[_0xa34ba2(0xf2)](_0x5d2f71))return'['+_0x5d2f71[_0xa34ba2(0x136)](_0x3fc91e=>stableStringify(_0x3fc91e))[_0xa34ba2(0x127)](',')+']';if(_0x5d2f71&&typeof _0x5d2f71==='object'){const _0x376531=_0x5d2f71,_0x3523b8=Object[_0xa34ba2(0x11c)](_0x376531)[_0xa34ba2(0x106)](),_0x2d63f8=_0x3523b8['map'](_0x502c3e=>'\x22'+_0x502c3e+'\x22:'+stableStringify(_0x376531[_0x502c3e]));return'{'+_0x2d63f8['join'](',')+'}';}const _0x446789=JSON[_0xa34ba2(0x11e)](_0x5d2f71);return _0x446789===undefined?_0xa34ba2(0x121):_0x446789;}export function consolidateActivationsByContent(_0x2d2541){const _0x5b648a=a145_0x2dfd,_0x5c4543={},_0x4b1b75=new Map(),_0x18407e=new Map();for(const _0x20ff46 of _0x2d2541){if(!_0x20ff46)continue;for(const [_0x118b16,_0xe1daed]of Object['entries'](_0x20ff46)){const _0x2525a9={'name':_0xe1daed[_0x5b648a(0x12c)],'connection':_0xe1daed[_0x5b648a(0xfa)],..._0xe1daed[_0x5b648a(0xf4)]!==undefined&&{'all_columns':_0xe1daed[_0x5b648a(0xf4)]},..._0xe1daed['columns']!==undefined&&{'columns':_0xe1daed['columns']},..._0xe1daed['behavior']!==undefined&&{'behavior':_0xe1daed[_0x5b648a(0xe8)]},..._0xe1daed[_0x5b648a(0x12b)]!==undefined&&{'schedule':_0xe1daed[_0x5b648a(0x12b)]},..._0xe1daed[_0x5b648a(0x131)]!==undefined&&{'notification':_0xe1daed['notification']},..._0xe1daed['connector_config']!==undefined&&{'connector_config':_0xe1daed[_0x5b648a(0x10f)]},..._0xe1daed[_0x5b648a(0x10b)]!==undefined&&{'activation_template_id':_0xe1daed['activation_template_id']}},_0x74fa2e=stableStringify(_0x2525a9),_0x4804e9=_0x18407e[_0x5b648a(0x130)](_0x74fa2e);_0x4804e9?_0x4b1b75[_0x5b648a(0x137)](_0x118b16,_0x4804e9):(_0x5c4543[_0x118b16]=_0xe1daed,_0x4b1b75[_0x5b648a(0x137)](_0x118b16,_0x118b16),_0x18407e[_0x5b648a(0x137)](_0x74fa2e,_0x118b16));}}return{'merged':_0x5c4543,'nameMapping':_0x4b1b75};}export function updateActivationReferences(_0x4332a6,_0x3f9eb4){const _0x138e2d=a145_0x2dfd;if(!_0x4332a6)return;for(const _0x3e43ee of _0x4332a6){if(!_0x3e43ee['steps'])continue;for(const _0x22380b of _0x3e43ee[_0x138e2d(0x129)]){if(_0x22380b[_0x138e2d(0x124)]===_0x138e2d(0x116)&&_0x22380b[_0x138e2d(0x119)]?.['activation']){const _0x374dd3=_0x3f9eb4[_0x138e2d(0x130)](_0x22380b[_0x138e2d(0x119)][_0x138e2d(0x116)]);_0x374dd3&&_0x374dd3!==_0x22380b['with']['activation']&&(_0x22380b[_0x138e2d(0x119)]['activation']=_0x374dd3);}}}}export function consolidateSegmentsByContent(_0x4b85f7,_0x5dc3e8){const _0x7eec3a=a145_0x2dfd,_0xfc0ce9={},_0x1d58a9=new Map(),_0x3cdd1a=new Map();for(const _0x2cd19a of _0x4b85f7){if(!_0x2cd19a)continue;for(const [_0x56dbb4,_0x38ab69]of Object[_0x7eec3a(0xe7)](_0x2cd19a)){if(!_0x38ab69[_0x7eec3a(0x12a)]){_0xfc0ce9[_0x56dbb4]=_0x38ab69,_0x1d58a9['set'](_0x56dbb4,_0x56dbb4);continue;}const _0x5ee53a=_0x38ab69[_0x7eec3a(0xef)]&&_0x38ab69['description'][_0x7eec3a(0x120)]()?_0x38ab69[_0x7eec3a(0xef)]:undefined,_0x2bde9e=JSON[_0x7eec3a(0x11e)]({'description':_0x5ee53a,'rule':deepSortObject(_0x38ab69[_0x7eec3a(0x12a)])}),_0x93b3a=_0x3cdd1a[_0x7eec3a(0x130)](_0x2bde9e);if(_0x93b3a){const _0x43c734={..._0x38ab69[_0x7eec3a(0xef)]!==undefined&&{'description':_0x38ab69[_0x7eec3a(0xef)]},'rule':_0x38ab69['rule']?deepSortObject(_0x38ab69[_0x7eec3a(0x12a)]):_0x38ab69[_0x7eec3a(0x12a)]};if(_0x56dbb4<_0x93b3a){_0xfc0ce9[_0x56dbb4]=_0x43c734,delete _0xfc0ce9[_0x93b3a];for(const [_0x47fc90,_0x1d9522]of _0x1d58a9[_0x7eec3a(0xe7)]()){_0x1d9522===_0x93b3a&&_0x1d58a9[_0x7eec3a(0x137)](_0x47fc90,_0x56dbb4);}_0x1d58a9[_0x7eec3a(0x137)](_0x56dbb4,_0x56dbb4),_0x3cdd1a['set'](_0x2bde9e,_0x56dbb4);}else _0xfc0ce9[_0x93b3a]=_0x43c734,_0x1d58a9[_0x7eec3a(0x137)](_0x56dbb4,_0x93b3a);}else{let _0x834f41=_0x56dbb4;if(_0x5dc3e8){const _0x41a72f=_0x5dc3e8[_0x7eec3a(0x130)](_0x2bde9e);_0x41a72f&&_0x41a72f[_0x7eec3a(0xf9)]>0x0&&(_0x834f41=_0x41a72f[_0x7eec3a(0x11a)]()[_0x7eec3a(0x106)]()[0x0]);}const _0x2ea9a8={..._0x38ab69[_0x7eec3a(0xef)]!==undefined&&{'description':_0x38ab69[_0x7eec3a(0xef)]},'rule':_0x38ab69[_0x7eec3a(0x12a)]?deepSortObject(_0x38ab69[_0x7eec3a(0x12a)]):_0x38ab69[_0x7eec3a(0x12a)]};_0xfc0ce9[_0x834f41]=_0x2ea9a8,_0x1d58a9['set'](_0x56dbb4,_0x834f41),_0x3cdd1a[_0x7eec3a(0x137)](_0x2bde9e,_0x834f41);}}}return{'merged':_0xfc0ce9,'nameMapping':_0x1d58a9};}export function updateSegmentReferences(_0x1b1ed2,_0x320925){const _0x2f6c10=a145_0x2dfd;if(!_0x1b1ed2)return;for(const _0x534cb8 of _0x1b1ed2){if(_0x534cb8[_0x2f6c10(0xf0)]?.['segment']){const _0x6f1d71=_0x320925[_0x2f6c10(0x130)](_0x534cb8[_0x2f6c10(0xf0)]['segment']);_0x6f1d71&&(_0x534cb8[_0x2f6c10(0xf0)]['segment']=_0x6f1d71);}if(_0x534cb8[_0x2f6c10(0xfc)])for(const _0x663816 of _0x534cb8[_0x2f6c10(0xfc)]){if(_0x663816[_0x2f6c10(0x111)]){const _0x47de56=_0x320925['get'](_0x663816[_0x2f6c10(0x111)]);_0x47de56&&(_0x663816[_0x2f6c10(0x111)]=_0x47de56);}}if(_0x534cb8['milestone']?.['segment']){const _0x45bd73=_0x320925[_0x2f6c10(0x130)](_0x534cb8[_0x2f6c10(0xf1)]['segment']);_0x45bd73&&(_0x534cb8[_0x2f6c10(0xf1)][_0x2f6c10(0x111)]=_0x45bd73);}if(_0x534cb8[_0x2f6c10(0x129)])for(const _0x4b4d86 of _0x534cb8[_0x2f6c10(0x129)]){if(_0x4b4d86[_0x2f6c10(0x124)]===_0x2f6c10(0x12f)&&_0x4b4d86[_0x2f6c10(0x119)]?.['branches'])for(const _0x570ec9 of _0x4b4d86[_0x2f6c10(0x119)]['branches']){if(_0x570ec9[_0x2f6c10(0x111)]){const _0x25c3b8=_0x320925[_0x2f6c10(0x130)](_0x570ec9[_0x2f6c10(0x111)]);_0x25c3b8&&(_0x570ec9['segment']=_0x25c3b8);}}if(_0x4b4d86[_0x2f6c10(0x124)]==='wait'&&_0x4b4d86[_0x2f6c10(0x119)]?.[_0x2f6c10(0x109)]?.[_0x2f6c10(0x111)]){const _0x49d4ff=_0x320925['get'](_0x4b4d86['with'][_0x2f6c10(0x109)][_0x2f6c10(0x111)]);_0x49d4ff&&(_0x4b4d86[_0x2f6c10(0x119)]['condition'][_0x2f6c10(0x111)]=_0x49d4ff);}}}}export function updateSegmentRefsInSegments(_0x9fb3a7,_0x305aac){const _0x79c48a=a145_0x2dfd;for(const _0x2f166c of Object[_0x79c48a(0x11b)](_0x9fb3a7)){_0x2f166c[_0x79c48a(0x12a)]&&updateSegmentRefsInRule(_0x2f166c[_0x79c48a(0x12a)],_0x305aac);}}function updateSegmentRefsInRule(_0x2364f3,_0x254592){const _0x1bcf49=a145_0x2dfd;if(_0x2364f3===null||typeof _0x2364f3!=='object')return;if(Array[_0x1bcf49(0xf2)](_0x2364f3)){for(const _0x51c4f8 of _0x2364f3){updateSegmentRefsInRule(_0x51c4f8,_0x254592);}return;}const _0x113bcc=_0x2364f3;if((_0x113bcc[_0x1bcf49(0x124)]===_0x1bcf49(0xea)||_0x113bcc[_0x1bcf49(0x124)]===_0x1bcf49(0x112))&&typeof _0x113bcc[_0x1bcf49(0x111)]===_0x1bcf49(0xf5)){const _0x18a6e5=_0x254592[_0x1bcf49(0x130)](_0x113bcc[_0x1bcf49(0x111)]);_0x18a6e5&&(_0x113bcc[_0x1bcf49(0x111)]=_0x18a6e5);}if(_0x113bcc[_0x1bcf49(0x138)]&&Array['isArray'](_0x113bcc[_0x1bcf49(0x138)]))for(const _0x219f1e of _0x113bcc[_0x1bcf49(0x138)]){updateSegmentRefsInRule(_0x219f1e,_0x254592);}}export function buildJourneysArray(_0x1e0cfb,_0x37e326){const _0x474f66=a145_0x2dfd;return _0x1e0cfb[_0x474f66(0x136)](_0x182cec=>{const _0x1289ce=_0x474f66,_0x43fb6b=_0x37e326?_0x182cec[_0x1289ce(0x10c)]['id']===_0x37e326:_0x1e0cfb['length']===0x1,_0x331641=_0x182cec['yaml'][_0x1289ce(0x113)]?.[0x0],_0x3f4e72=_0x331641?.['goal']||_0x182cec[_0x1289ce(0x123)][_0x1289ce(0x108)],_0xb61951={'version':_0x331641?.[_0x1289ce(0xfb)]||_0x182cec['yaml'][_0x1289ce(0xfb)]||_0x182cec[_0x1289ce(0x10c)]['name'],'state':_0x182cec[_0x1289ce(0x10c)][_0x1289ce(0x101)]==='launched'?_0x1289ce(0xe9):_0x1289ce(0x118),'stages':_0x331641?.[_0x1289ce(0x122)]||_0x182cec[_0x1289ce(0x123)][_0x1289ce(0x122)]||[],'id':_0x331641?.['id']||_0x182cec[_0x1289ce(0x123)]['id'],'version_number':_0x331641?.[_0x1289ce(0x117)]||_0x182cec['yaml']['version_number']};return _0x3f4e72&&(_0xb61951[_0x1289ce(0x108)]=_0x3f4e72),_0x43fb6b&&(_0xb61951[_0x1289ce(0x125)]=!![]),_0xb61951;});}export function buildMergedJourneyDef(_0x13dba2,_0xa7f167,_0x4adeda){const _0x1853bb=a145_0x2dfd,_0x47e75c=_0x13dba2[0x0]['yaml'],_0x33af86=buildJourneysArray(_0x13dba2,_0x4adeda),{merged:_0x1e2de3,nameMapping:_0x4a3f66}=consolidateSegmentsByContent(_0x13dba2[_0x1853bb(0x136)](_0x44c1b7=>_0x44c1b7[_0x1853bb(0x123)][_0x1853bb(0x139)]),_0xa7f167);updateSegmentRefsInSegments(_0x1e2de3,_0x4a3f66);const _0x3e95c7=Array[_0x1853bb(0x103)](_0x4a3f66[_0x1853bb(0xe7)]())[_0x1853bb(0x115)](([_0x5060b0,_0x45e0f6])=>_0x5060b0!==_0x45e0f6&&_0x5060b0['startsWith'](_0x1853bb(0xf0)));let _0x10c791=_0x1e2de3,_0x2c56c1=new Map();if(_0x3e95c7){const _0x46dfcf=consolidateSegmentsByContent([_0x1e2de3],_0xa7f167);_0x10c791=_0x46dfcf[_0x1853bb(0xeb)],_0x2c56c1=_0x46dfcf[_0x1853bb(0xee)];}const _0x441bf2=new Map(_0x4a3f66);for(const [_0x1697f5,_0x247c75]of _0x2c56c1[_0x1853bb(0xe7)]()){_0x441bf2['set'](_0x1697f5,_0x247c75);}for(const [_0x41788d,_0x42a159]of _0x441bf2[_0x1853bb(0xe7)]()){let _0x5c5afc=_0x42a159,_0x198b97=0x0;while(_0x441bf2['has'](_0x5c5afc)&&_0x441bf2['get'](_0x5c5afc)!==_0x5c5afc&&_0x198b97<MAX_MAPPING_CHAIN_DEPTH){_0x5c5afc=_0x441bf2[_0x1853bb(0x130)](_0x5c5afc),_0x198b97++;}_0x5c5afc!==_0x42a159&&_0x441bf2[_0x1853bb(0x137)](_0x41788d,_0x5c5afc);}for(const _0x3f44c3 of _0x33af86){updateSegmentReferences(_0x3f44c3[_0x1853bb(0x122)],_0x441bf2);}const {merged:_0x300f06,nameMapping:_0x53c841}=consolidateActivationsByContent(_0x13dba2['map'](_0x4dbcf1=>_0x4dbcf1['yaml'][_0x1853bb(0x104)]));for(const _0x2807dd of _0x33af86){updateActivationReferences(_0x2807dd[_0x1853bb(0x122)],_0x53c841);}let _0x100c31=_0x47e75c[_0x1853bb(0x108)];if(_0x100c31?.[_0x1853bb(0x111)]){const _0x4d5246=_0x441bf2[_0x1853bb(0x130)](_0x100c31['segment']);_0x4d5246&&(_0x100c31={..._0x100c31,'segment':_0x4d5246});}for(const _0x4a0c66 of _0x33af86){if(_0x4a0c66['goal']?.[_0x1853bb(0x111)]){const _0x36a6a4=_0x441bf2[_0x1853bb(0x130)](_0x4a0c66[_0x1853bb(0x108)][_0x1853bb(0x111)]);_0x36a6a4&&(_0x4a0c66[_0x1853bb(0x108)]={..._0x4a0c66[_0x1853bb(0x108)],'segment':_0x36a6a4});}}return _0x33af86[_0x1853bb(0x115)](_0xe17c47=>_0xe17c47[_0x1853bb(0x108)])&&(_0x100c31=undefined),{'type':_0x1853bb(0xf3),'name':_0x47e75c['name'],'description':_0x47e75c[_0x1853bb(0xef)],'goal':_0x100c31,'reentry':_0x47e75c[_0x1853bb(0x107)],'segments':Object[_0x1853bb(0x11c)](_0x10c791)[_0x1853bb(0xf9)]>0x0?_0x10c791:undefined,'activations':Object[_0x1853bb(0x11c)](_0x300f06)[_0x1853bb(0xf9)]>0x0?_0x300f06:undefined,'journeys':_0x33af86,'bundle_id':_0x47e75c[_0x1853bb(0xf8)],'bundle_name':_0x47e75c[_0x1853bb(0xfe)]};}function a145_0x2dfd(_0x577e67,_0x2f9428){_0x577e67=_0x577e67-0xe7;const _0x973681=a145_0x9736();let _0x2dfd25=_0x973681[_0x577e67];return _0x2dfd25;}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x245710,_0x515a70,_0x1f43fc,_0x1b63b1){const _0x553053=a145_0x2dfd,_0x3cda39=_0x245710+':'+_0x515a70,_0x650fda=_0x1f43fc[_0x553053(0x130)](_0x3cda39);if(_0x650fda)return _0x650fda;const _0x2ed69e=await _0x1b63b1(_0x245710),_0x4e145b=_0x2ed69e['attributes'][_0x553053(0x10a)]||_0x2ed69e[_0x553053(0xec)]['name'],_0x4deb65=_0x2ed69e[_0x553053(0xec)][_0x553053(0x128)][_0x553053(0x100)](_0x107cdb=>String(_0x107cdb['id'])===String(_0x515a70)),_0x7e5431=_0x4deb65?.[_0x553053(0x12c)]||_0x515a70,_0x43f483={'journeyName':_0x4e145b,'stageName':_0x7e5431};return _0x1f43fc[_0x553053(0x137)](_0x3cda39,_0x43f483),_0x43f483;}function a145_0x9736(){const _0x229f9f=['set','conditions','segments','11gVOkyv','entries','behavior','launched','include','merged','attributes','26798160vYwsiy','nameMapping','description','entry_criteria','milestone','isArray','journey','all_columns','string','4xSbfqI','9714470hPRsys','bundle_id','length','connection','version','exit_criteria','1998365xJIzwA','bundle_name','versions','find','state','push','from','activations','6OhxwEw','sort','reentry','goal','condition','journeyBundleName','activation_template_id','item','9352fLYlon','index','connector_config','1575bpprfW','segment','exclude','journeys','toLowerCase','some','activation','version_number','draft','with','slice','values','keys','1483501deoIza','stringify','replace','trim','null','stages','yaml','type','latest','branches','join','journeyStages','steps','rule','schedule','name','endsWith','.yaml','decision_point','get','notification','match','2081172hwKeeK','514278tshwLe','21ydmVbO','map'];a145_0x9736=function(){return _0x229f9f;};return a145_0x9736();}export function formatApiJourneyName(_0x566a6b,_0x101646){return _0x101646+'\x20('+_0x566a6b+')';}export function isLocalJourneyRef(_0xa66c64){const _0x44976c=a145_0x2dfd;return _0xa66c64['endsWith']('.yml')||_0xa66c64[_0x44976c(0x12d)](_0x44976c(0x12e));}export function buildLocalRuleToNameMapping(_0x2ca41b){const _0x4b7363=a145_0x2dfd,_0x42eff0=new Map();if(!_0x2ca41b)return _0x42eff0;for(const [_0x3deb9e,_0x288930]of Object['entries'](_0x2ca41b)){if(_0x288930[_0x4b7363(0x12a)]){const _0x15b02e=serializeRule(_0x288930['rule']),_0x497904=_0x42eff0[_0x4b7363(0x130)](_0x15b02e)||[];_0x497904[_0x4b7363(0x102)](_0x3deb9e),_0x42eff0[_0x4b7363(0x137)](_0x15b02e,_0x497904);}}return _0x42eff0;}export function buildLocalRuleToNameMappingFromJourney(_0x54ebc4){const _0x102750=a145_0x2dfd,_0x2b1705=_0x54ebc4['segments'];if(!_0x2b1705)return new Map();const _0x594fff=collectSegmentUsageCounts(_0x54ebc4),_0x465f67=new Map();let _0x4fc9a1=0x0;for(const [_0x36d102,_0x264afb]of Object[_0x102750(0xe7)](_0x2b1705)){if(!_0x264afb[_0x102750(0x12a)]){_0x4fc9a1++;continue;}const _0x2e7899=serializeRule(_0x264afb[_0x102750(0x12a)]),_0x3df9ef=_0x465f67[_0x102750(0x130)](_0x2e7899)||[];_0x3df9ef[_0x102750(0x102)]({'name':_0x36d102,'index':_0x4fc9a1}),_0x465f67['set'](_0x2e7899,_0x3df9ef),_0x4fc9a1++;}const _0x5b3657=new Map();for(const [_0x3bf66d,_0x4c3571]of _0x465f67){const _0x5390a5=_0x4c3571[_0x102750(0x11a)]()['sort']((_0x51468f,_0xcb043e)=>{const _0x18fbf5=_0x102750,_0x24ee7b=_0x594fff[_0x18fbf5(0x130)](_0x51468f['name'])||0x0,_0xecce67=_0x594fff['get'](_0xcb043e['name'])||0x0;if(_0x24ee7b!==_0xecce67)return _0xecce67-_0x24ee7b;return _0x51468f[_0x18fbf5(0x10e)]-_0xcb043e[_0x18fbf5(0x10e)];})[_0x102750(0x136)](_0x5e4e24=>_0x5e4e24[_0x102750(0x12c)]);_0x5b3657[_0x102750(0x137)](_0x3bf66d,_0x5390a5);}return _0x5b3657;}export function collectSegmentUsageCounts(_0xd25817){const _0x1e4290=a145_0x2dfd,_0x68cdd6=new Map(),_0x1577ce=_0x1bd806=>{const _0x5968b9=a145_0x2dfd;if(!_0x1bd806)return;_0x68cdd6[_0x5968b9(0x137)](_0x1bd806,(_0x68cdd6[_0x5968b9(0x130)](_0x1bd806)||0x0)+0x1);},_0xfdbc29=_0x4309ec=>{const _0x2f365d=a145_0x2dfd;for(const _0x5c6bbd of _0x4309ec){_0x1577ce(_0x5c6bbd[_0x2f365d(0xf0)]?.['segment']);if(_0x5c6bbd[_0x2f365d(0xfc)])for(const _0x45204c of _0x5c6bbd[_0x2f365d(0xfc)]){_0x1577ce(_0x45204c[_0x2f365d(0x111)]);}_0x1577ce(_0x5c6bbd[_0x2f365d(0xf1)]?.['segment']);if(_0x5c6bbd[_0x2f365d(0x129)])for(const _0x4a4b77 of _0x5c6bbd['steps']){if(_0x4a4b77[_0x2f365d(0x124)]==='decision_point')for(const _0x1aeb00 of _0x4a4b77[_0x2f365d(0x119)][_0x2f365d(0x126)]){_0x1577ce(_0x1aeb00[_0x2f365d(0x111)]);}else _0x4a4b77[_0x2f365d(0x124)]==='wait'&&_0x1577ce(_0x4a4b77[_0x2f365d(0x119)][_0x2f365d(0x109)]?.[_0x2f365d(0x111)]);}}};_0x1577ce(_0xd25817['goal']?.[_0x1e4290(0x111)]);if(_0xd25817[_0x1e4290(0x113)])for(const _0x5361a4 of _0xd25817[_0x1e4290(0x113)]){_0x1577ce(_0x5361a4[_0x1e4290(0x108)]?.[_0x1e4290(0x111)]),_0xfdbc29(_0x5361a4[_0x1e4290(0x122)]);}_0xd25817[_0x1e4290(0x122)]&&_0xfdbc29(_0xd25817[_0x1e4290(0x122)]);if(_0xd25817[_0x1e4290(0xff)])for(const _0x3e34bf of _0xd25817[_0x1e4290(0xff)]){_0xfdbc29(_0x3e34bf[_0x1e4290(0x122)]);}return _0x68cdd6;}
|
|
1
|
+
(function(_0x339eb9,_0x166e07){const _0xc10e0a=a145_0x425d,_0x124aa2=_0x339eb9();while(!![]){try{const _0xc34730=parseInt(_0xc10e0a(0x135))/0x1*(parseInt(_0xc10e0a(0x11e))/0x2)+-parseInt(_0xc10e0a(0x129))/0x3+-parseInt(_0xc10e0a(0x152))/0x4+parseInt(_0xc10e0a(0x13a))/0x5+-parseInt(_0xc10e0a(0x148))/0x6*(parseInt(_0xc10e0a(0x14b))/0x7)+-parseInt(_0xc10e0a(0x127))/0x8+-parseInt(_0xc10e0a(0x14c))/0x9*(-parseInt(_0xc10e0a(0x114))/0xa);if(_0xc34730===_0x166e07)break;else _0x124aa2['push'](_0x124aa2['shift']());}catch(_0x5458b3){_0x124aa2['push'](_0x124aa2['shift']());}}}(a145_0x3382,0xd3315));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x226f25){const _0x11f8f6=a145_0x425d;return _0x226f25[_0x11f8f6(0x155)]()[_0x11f8f6(0x138)](/\s+/g,'_')[_0x11f8f6(0x138)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x11f8f6(0x138)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x1cfac8){const _0x253050=a145_0x425d,_0x4e2ede=_0x1cfac8[_0x253050(0x123)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x4e2ede){const _0xbe8a26=_0x4e2ede[0x1][_0x253050(0x155)](),_0x1e2004=_0x4e2ede[0x2],_0x49f477=_0x1e2004[_0x253050(0x138)](/-/g,'')['slice'](0x0,0x4)[_0x253050(0x155)]();return _0xbe8a26+'_'+_0x49f477;}const _0x599acf=_0x1cfac8[_0x253050(0x123)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x599acf){const _0x93af7f=_0x599acf[0x1],_0x1f0dd0=_0x599acf[0x2][_0x253050(0x155)](),_0x13915a=_0x93af7f[_0x253050(0x138)](/-/g,'')[_0x253050(0x131)](0x0,0x4)['toLowerCase']();return _0x1f0dd0+'_'+_0x13915a;}return undefined;}function stableStringify(_0x28fafb){const _0x3f3cae=a145_0x425d;if(Array[_0x3f3cae(0x12e)](_0x28fafb))return'['+_0x28fafb[_0x3f3cae(0x142)](_0x24026b=>stableStringify(_0x24026b))[_0x3f3cae(0x10f)](',')+']';if(_0x28fafb&&typeof _0x28fafb===_0x3f3cae(0x149)){const _0x1d9748=_0x28fafb,_0x257199=Object['keys'](_0x1d9748)[_0x3f3cae(0x159)](),_0x590515=_0x257199[_0x3f3cae(0x142)](_0xc8c2b5=>'\x22'+_0xc8c2b5+'\x22:'+stableStringify(_0x1d9748[_0xc8c2b5]));return'{'+_0x590515[_0x3f3cae(0x10f)](',')+'}';}const _0x10f282=JSON[_0x3f3cae(0x156)](_0x28fafb);return _0x10f282===undefined?_0x3f3cae(0x110):_0x10f282;}export function consolidateActivationsByContent(_0x1d8d20){const _0x8cb5a8=a145_0x425d,_0x5ef491={},_0x1939b2=new Map(),_0x271e41=new Map();for(const _0xc8b061 of _0x1d8d20){if(!_0xc8b061)continue;for(const [_0x4f7568,_0x3e91b2]of Object[_0x8cb5a8(0x119)](_0xc8b061)){const _0x4cf749={'name':_0x3e91b2[_0x8cb5a8(0x112)],'connection':_0x3e91b2[_0x8cb5a8(0x134)],..._0x3e91b2[_0x8cb5a8(0x125)]!==undefined&&{'all_columns':_0x3e91b2[_0x8cb5a8(0x125)]},..._0x3e91b2[_0x8cb5a8(0x151)]!==undefined&&{'columns':_0x3e91b2[_0x8cb5a8(0x151)]},..._0x3e91b2[_0x8cb5a8(0x13e)]!==undefined&&{'behavior':_0x3e91b2[_0x8cb5a8(0x13e)]},..._0x3e91b2['schedule']!==undefined&&{'schedule':_0x3e91b2['schedule']},..._0x3e91b2[_0x8cb5a8(0x128)]!==undefined&&{'notification':_0x3e91b2['notification']},..._0x3e91b2[_0x8cb5a8(0x147)]!==undefined&&{'connector_config':_0x3e91b2[_0x8cb5a8(0x147)]},..._0x3e91b2[_0x8cb5a8(0x120)]!==undefined&&{'activation_template_id':_0x3e91b2['activation_template_id']}},_0x4b7923=stableStringify(_0x4cf749),_0x4e49ca=_0x271e41[_0x8cb5a8(0x12d)](_0x4b7923);_0x4e49ca?_0x1939b2[_0x8cb5a8(0x13d)](_0x4f7568,_0x4e49ca):(_0x5ef491[_0x4f7568]=_0x3e91b2,_0x1939b2[_0x8cb5a8(0x13d)](_0x4f7568,_0x4f7568),_0x271e41[_0x8cb5a8(0x13d)](_0x4b7923,_0x4f7568));}}return{'merged':_0x5ef491,'nameMapping':_0x1939b2};}export function updateActivationReferences(_0x457af8,_0x505c4a){const _0x180f66=a145_0x425d;if(!_0x457af8)return;for(const _0x3abca6 of _0x457af8){if(!_0x3abca6[_0x180f66(0x12b)])continue;for(const _0x253755 of _0x3abca6[_0x180f66(0x12b)]){if(_0x253755[_0x180f66(0x140)]===_0x180f66(0x130)&&_0x253755[_0x180f66(0x143)]?.[_0x180f66(0x130)]){const _0x81cfb1=_0x505c4a[_0x180f66(0x12d)](_0x253755[_0x180f66(0x143)][_0x180f66(0x130)]);_0x81cfb1&&_0x81cfb1!==_0x253755[_0x180f66(0x143)]['activation']&&(_0x253755['with'][_0x180f66(0x130)]=_0x81cfb1);}}}}export function consolidateSegmentsByContent(_0x37e6b8,_0x56d3ef){const _0x3d591f=a145_0x425d,_0x1167d5={},_0x292e75=new Map(),_0x2d1444=new Map();for(const _0x3fda75 of _0x37e6b8){if(!_0x3fda75)continue;for(const [_0x4a23f2,_0x3e62d2]of Object[_0x3d591f(0x119)](_0x3fda75)){if(!_0x3e62d2[_0x3d591f(0x158)]){_0x1167d5[_0x4a23f2]=_0x3e62d2,_0x292e75['set'](_0x4a23f2,_0x4a23f2);continue;}const _0x20e970=_0x3e62d2[_0x3d591f(0x115)]&&_0x3e62d2[_0x3d591f(0x115)]['trim']()?_0x3e62d2['description']:undefined,_0x36ca60=JSON['stringify']({'description':_0x20e970,'rule':deepSortObject(_0x3e62d2[_0x3d591f(0x158)])}),_0xe77e96=_0x2d1444[_0x3d591f(0x12d)](_0x36ca60);if(_0xe77e96){const _0x55def9={..._0x3e62d2[_0x3d591f(0x115)]!==undefined&&{'description':_0x3e62d2['description']},'rule':_0x3e62d2[_0x3d591f(0x158)]?deepSortObject(_0x3e62d2[_0x3d591f(0x158)]):_0x3e62d2[_0x3d591f(0x158)]};if(_0x4a23f2<_0xe77e96){_0x1167d5[_0x4a23f2]=_0x55def9,delete _0x1167d5[_0xe77e96];for(const [_0x2867fa,_0x5cbfb1]of _0x292e75[_0x3d591f(0x119)]()){_0x5cbfb1===_0xe77e96&&_0x292e75[_0x3d591f(0x13d)](_0x2867fa,_0x4a23f2);}_0x292e75[_0x3d591f(0x13d)](_0x4a23f2,_0x4a23f2),_0x2d1444[_0x3d591f(0x13d)](_0x36ca60,_0x4a23f2);}else _0x1167d5[_0xe77e96]=_0x55def9,_0x292e75['set'](_0x4a23f2,_0xe77e96);}else{let _0x2a2e10=_0x4a23f2;if(_0x56d3ef){const _0x3027a8=_0x56d3ef['get'](_0x36ca60);_0x3027a8&&_0x3027a8[_0x3d591f(0x146)]>0x0&&(_0x2a2e10=_0x3027a8[_0x3d591f(0x131)]()[_0x3d591f(0x159)]()[0x0]);}const _0x30ee93={..._0x3e62d2[_0x3d591f(0x115)]!==undefined&&{'description':_0x3e62d2['description']},'rule':_0x3e62d2[_0x3d591f(0x158)]?deepSortObject(_0x3e62d2[_0x3d591f(0x158)]):_0x3e62d2['rule']};_0x1167d5[_0x2a2e10]=_0x30ee93,_0x292e75[_0x3d591f(0x13d)](_0x4a23f2,_0x2a2e10),_0x2d1444[_0x3d591f(0x13d)](_0x36ca60,_0x2a2e10);}}}return{'merged':_0x1167d5,'nameMapping':_0x292e75};}export function updateSegmentReferences(_0x2705ad,_0x4713a2){const _0x3b9223=a145_0x425d;if(!_0x2705ad)return;for(const _0x444675 of _0x2705ad){if(_0x444675[_0x3b9223(0x12a)]?.[_0x3b9223(0x12c)]){const _0x4ac0e4=_0x4713a2['get'](_0x444675['entry_criteria'][_0x3b9223(0x12c)]);_0x4ac0e4&&(_0x444675[_0x3b9223(0x12a)][_0x3b9223(0x12c)]=_0x4ac0e4);}if(_0x444675[_0x3b9223(0x121)])for(const _0x5a5155 of _0x444675[_0x3b9223(0x121)]){if(_0x5a5155[_0x3b9223(0x12c)]){const _0x3b7704=_0x4713a2[_0x3b9223(0x12d)](_0x5a5155['segment']);_0x3b7704&&(_0x5a5155[_0x3b9223(0x12c)]=_0x3b7704);}}if(_0x444675[_0x3b9223(0x11c)]?.[_0x3b9223(0x12c)]){const _0x5a7ce4=_0x4713a2['get'](_0x444675['milestone']['segment']);_0x5a7ce4&&(_0x444675['milestone'][_0x3b9223(0x12c)]=_0x5a7ce4);}if(_0x444675[_0x3b9223(0x12b)])for(const _0x2fbdc2 of _0x444675[_0x3b9223(0x12b)]){if(_0x2fbdc2[_0x3b9223(0x140)]==='decision_point'&&_0x2fbdc2[_0x3b9223(0x143)]?.[_0x3b9223(0x141)])for(const _0x50f6f5 of _0x2fbdc2[_0x3b9223(0x143)]['branches']){if(_0x50f6f5['segment']){const _0xd2478=_0x4713a2['get'](_0x50f6f5['segment']);_0xd2478&&(_0x50f6f5['segment']=_0xd2478);}}if(_0x2fbdc2[_0x3b9223(0x140)]===_0x3b9223(0x154)&&_0x2fbdc2[_0x3b9223(0x143)]?.[_0x3b9223(0x15a)]?.[_0x3b9223(0x12c)]){const _0x3bf73b=_0x4713a2[_0x3b9223(0x12d)](_0x2fbdc2[_0x3b9223(0x143)][_0x3b9223(0x15a)][_0x3b9223(0x12c)]);_0x3bf73b&&(_0x2fbdc2[_0x3b9223(0x143)][_0x3b9223(0x15a)][_0x3b9223(0x12c)]=_0x3bf73b);}}}}export function updateSegmentRefsInSegments(_0x9c148b,_0xbcee6a){const _0x6bd5c8=a145_0x425d;for(const _0x12e55e of Object[_0x6bd5c8(0x126)](_0x9c148b)){_0x12e55e[_0x6bd5c8(0x158)]&&updateSegmentRefsInRule(_0x12e55e[_0x6bd5c8(0x158)],_0xbcee6a);}}function updateSegmentRefsInRule(_0x41f078,_0x489717){const _0x1a2401=a145_0x425d;if(_0x41f078===null||typeof _0x41f078!==_0x1a2401(0x149))return;if(Array[_0x1a2401(0x12e)](_0x41f078)){for(const _0x30a676 of _0x41f078){updateSegmentRefsInRule(_0x30a676,_0x489717);}return;}const _0x13a655=_0x41f078;if((_0x13a655[_0x1a2401(0x140)]==='include'||_0x13a655['type']==='exclude')&&typeof _0x13a655[_0x1a2401(0x12c)]===_0x1a2401(0x144)){const _0x25c8e2=_0x489717[_0x1a2401(0x12d)](_0x13a655['segment']);_0x25c8e2&&(_0x13a655[_0x1a2401(0x12c)]=_0x25c8e2);}if(_0x13a655['conditions']&&Array['isArray'](_0x13a655[_0x1a2401(0x14f)]))for(const _0x45d96f of _0x13a655[_0x1a2401(0x14f)]){updateSegmentRefsInRule(_0x45d96f,_0x489717);}}export function buildJourneysArray(_0x7a5446,_0x591e39){const _0x2586d6=a145_0x425d;return _0x7a5446[_0x2586d6(0x142)](_0x28b1d6=>{const _0xf5e4b2=_0x2586d6,_0x818825=_0x591e39?_0x28b1d6[_0xf5e4b2(0x15b)]['id']===_0x591e39:_0x7a5446[_0xf5e4b2(0x146)]===0x1,_0x1f049f=_0x28b1d6[_0xf5e4b2(0x11a)]['journeys']?.[0x0],_0x2906d9=_0x1f049f?.[_0xf5e4b2(0x113)]||_0x28b1d6[_0xf5e4b2(0x11a)][_0xf5e4b2(0x113)],_0xd34c7b={'version':_0x1f049f?.[_0xf5e4b2(0x132)]||_0x28b1d6[_0xf5e4b2(0x11a)][_0xf5e4b2(0x132)]||_0x28b1d6[_0xf5e4b2(0x15b)][_0xf5e4b2(0x112)],'state':_0x28b1d6[_0xf5e4b2(0x15b)][_0xf5e4b2(0x116)]==='launched'?_0xf5e4b2(0x122):_0xf5e4b2(0x133),'stages':_0x1f049f?.[_0xf5e4b2(0x14d)]||_0x28b1d6['yaml']['stages']||[],'id':_0x1f049f?.['id']||_0x28b1d6['yaml']['id'],'version_number':_0x1f049f?.[_0xf5e4b2(0x13f)]||_0x28b1d6[_0xf5e4b2(0x11a)][_0xf5e4b2(0x13f)]};return _0x2906d9&&(_0xd34c7b[_0xf5e4b2(0x113)]=_0x2906d9),_0x818825&&(_0xd34c7b['latest']=!![]),_0xd34c7b;});}function a145_0x425d(_0x27b633,_0x171b4f){_0x27b633=_0x27b633-0x10f;const _0x33821f=a145_0x3382();let _0x425d14=_0x33821f[_0x27b633];return _0x425d14;}export function buildMergedJourneyDef(_0x59cef5,_0x43cf7f,_0x23a3b2){const _0x330c95=a145_0x425d,_0x3ec710=_0x59cef5[0x0][_0x330c95(0x11a)],_0x20d6dd=buildJourneysArray(_0x59cef5,_0x23a3b2),{merged:_0x4f6fd8,nameMapping:_0x18e39f}=consolidateSegmentsByContent(_0x59cef5['map'](_0x55352f=>_0x55352f[_0x330c95(0x11a)][_0x330c95(0x117)]),_0x43cf7f);updateSegmentRefsInSegments(_0x4f6fd8,_0x18e39f);const _0x3cf6af=Array['from'](_0x18e39f['entries']())[_0x330c95(0x11d)](([_0x2b6124,_0x4fe7a8])=>_0x2b6124!==_0x4fe7a8&&_0x2b6124[_0x330c95(0x14e)](_0x330c95(0x12a)));let _0x23ffaa=_0x4f6fd8,_0x541dec=new Map();if(_0x3cf6af){const _0x4e53b2=consolidateSegmentsByContent([_0x4f6fd8],_0x43cf7f);_0x23ffaa=_0x4e53b2[_0x330c95(0x136)],_0x541dec=_0x4e53b2[_0x330c95(0x13b)];}const _0xdc744f=new Map(_0x18e39f);for(const [_0x13bc71,_0x3d29af]of _0x541dec['entries']()){_0xdc744f[_0x330c95(0x13d)](_0x13bc71,_0x3d29af);}for(const [_0x22f438,_0x16c510]of _0xdc744f['entries']()){let _0x10649e=_0x16c510,_0x3e5228=0x0;while(_0xdc744f[_0x330c95(0x157)](_0x10649e)&&_0xdc744f[_0x330c95(0x12d)](_0x10649e)!==_0x10649e&&_0x3e5228<MAX_MAPPING_CHAIN_DEPTH){_0x10649e=_0xdc744f[_0x330c95(0x12d)](_0x10649e),_0x3e5228++;}_0x10649e!==_0x16c510&&_0xdc744f['set'](_0x22f438,_0x10649e);}for(const _0x30f1dc of _0x20d6dd){updateSegmentReferences(_0x30f1dc[_0x330c95(0x14d)],_0xdc744f);}const {merged:_0x2f1e44,nameMapping:_0x21327a}=consolidateActivationsByContent(_0x59cef5[_0x330c95(0x142)](_0x3641d5=>_0x3641d5['yaml'][_0x330c95(0x137)]));for(const _0x19a8fc of _0x20d6dd){updateActivationReferences(_0x19a8fc[_0x330c95(0x14d)],_0x21327a);}let _0x4e50ae=_0x3ec710[_0x330c95(0x113)];if(_0x4e50ae?.['segment']){const _0x1871fc=_0xdc744f['get'](_0x4e50ae['segment']);_0x1871fc&&(_0x4e50ae={..._0x4e50ae,'segment':_0x1871fc});}for(const _0x2492e2 of _0x20d6dd){if(_0x2492e2[_0x330c95(0x113)]?.[_0x330c95(0x12c)]){const _0x1595a8=_0xdc744f[_0x330c95(0x12d)](_0x2492e2['goal'][_0x330c95(0x12c)]);_0x1595a8&&(_0x2492e2[_0x330c95(0x113)]={..._0x2492e2['goal'],'segment':_0x1595a8});}}return _0x20d6dd[_0x330c95(0x11d)](_0x408abd=>_0x408abd[_0x330c95(0x113)])&&(_0x4e50ae=undefined),{'type':_0x330c95(0x124),'name':_0x3ec710[_0x330c95(0x112)],'description':_0x3ec710[_0x330c95(0x115)],'goal':_0x4e50ae,'reentry':_0x3ec710[_0x330c95(0x11f)],'segments':Object[_0x330c95(0x14a)](_0x23ffaa)[_0x330c95(0x146)]>0x0?_0x23ffaa:undefined,'activations':Object['keys'](_0x2f1e44)[_0x330c95(0x146)]>0x0?_0x2f1e44:undefined,'journeys':_0x20d6dd,'bundle_id':_0x3ec710[_0x330c95(0x150)],'bundle_name':_0x3ec710[_0x330c95(0x11b)]};}export function createJumpTargetCache(){return new Map();}function a145_0x3382(){const _0x2d43d2=['attributes','entries','yaml','bundle_name','milestone','some','12gnhTkv','reentry','activation_template_id','exit_criteria','launched','match','journey','all_columns','values','8721256zOdBfp','notification','3685110VavYsy','entry_criteria','steps','segment','get','isArray','versions','activation','slice','version','draft','connection','55961vBBzCq','merged','activations','replace','push','3291295LlelFo','nameMapping','find','set','behavior','version_number','type','branches','map','with','string','.yaml','length','connector_config','6opcEGW','object','keys','1447691eYqCof','2331nHoBdj','stages','startsWith','conditions','bundle_id','columns','5063600BxDutE','endsWith','wait','toLowerCase','stringify','has','rule','sort','condition','item','join','null','index','name','goal','141400TRfFlO','description','state','segments'];a145_0x3382=function(){return _0x2d43d2;};return a145_0x3382();}export async function resolveJumpTarget(_0x1046a9,_0x31fe32,_0x38838c,_0xb835bc){const _0x548c7e=a145_0x425d,_0x28dfd4=_0x1046a9+':'+_0x31fe32,_0x252edc=_0x38838c[_0x548c7e(0x12d)](_0x28dfd4);if(_0x252edc)return _0x252edc;const _0x200e20=await _0xb835bc(_0x1046a9),_0x1ca4f9=_0x200e20[_0x548c7e(0x118)]['journeyBundleName']||_0x200e20[_0x548c7e(0x118)][_0x548c7e(0x112)],_0x44c713=_0x200e20[_0x548c7e(0x118)]['journeyStages'][_0x548c7e(0x13c)](_0x4dbde9=>String(_0x4dbde9['id'])===String(_0x31fe32)),_0x131ce5=_0x44c713?.['name']||_0x31fe32,_0x488dd5={'journeyName':_0x1ca4f9,'stageName':_0x131ce5};return _0x38838c[_0x548c7e(0x13d)](_0x28dfd4,_0x488dd5),_0x488dd5;}export function formatApiJourneyName(_0x5ab861,_0x411dcd){return _0x411dcd+'\x20('+_0x5ab861+')';}export function isLocalJourneyRef(_0x1af9d6){const _0x50d04f=a145_0x425d;return _0x1af9d6[_0x50d04f(0x153)]('.yml')||_0x1af9d6[_0x50d04f(0x153)](_0x50d04f(0x145));}export function buildLocalRuleToNameMapping(_0x242de6){const _0x27b483=a145_0x425d,_0x56d426=new Map();if(!_0x242de6)return _0x56d426;for(const [_0x490907,_0x4e506a]of Object['entries'](_0x242de6)){if(_0x4e506a[_0x27b483(0x158)]){const _0x27e1a5=serializeRule(_0x4e506a[_0x27b483(0x158)]),_0x2ceac7=_0x56d426[_0x27b483(0x12d)](_0x27e1a5)||[];_0x2ceac7['push'](_0x490907),_0x56d426[_0x27b483(0x13d)](_0x27e1a5,_0x2ceac7);}}return _0x56d426;}export function buildLocalRuleToNameMappingFromJourney(_0x4d1a2a){const _0x6b73af=a145_0x425d,_0x2ca667=_0x4d1a2a[_0x6b73af(0x117)];if(!_0x2ca667)return new Map();const _0x1da988=collectSegmentUsageCounts(_0x4d1a2a),_0x30ee83=new Map();let _0x25e6d0=0x0;for(const [_0x28d85f,_0x3c9524]of Object[_0x6b73af(0x119)](_0x2ca667)){if(!_0x3c9524['rule']){_0x25e6d0++;continue;}const _0x336fe5=serializeRule(_0x3c9524[_0x6b73af(0x158)]),_0x437f7b=_0x30ee83[_0x6b73af(0x12d)](_0x336fe5)||[];_0x437f7b[_0x6b73af(0x139)]({'name':_0x28d85f,'index':_0x25e6d0}),_0x30ee83[_0x6b73af(0x13d)](_0x336fe5,_0x437f7b),_0x25e6d0++;}const _0xe9e7bd=new Map();for(const [_0x3a62e4,_0x49d3b5]of _0x30ee83){const _0x4aaadb=_0x49d3b5[_0x6b73af(0x131)]()['sort']((_0x420ca4,_0x2ab9ce)=>{const _0x2e8a32=_0x6b73af,_0x20090b=_0x1da988[_0x2e8a32(0x12d)](_0x420ca4[_0x2e8a32(0x112)])||0x0,_0x477594=_0x1da988[_0x2e8a32(0x12d)](_0x2ab9ce[_0x2e8a32(0x112)])||0x0;if(_0x20090b!==_0x477594)return _0x477594-_0x20090b;return _0x420ca4['index']-_0x2ab9ce[_0x2e8a32(0x111)];})[_0x6b73af(0x142)](_0x2d07a1=>_0x2d07a1[_0x6b73af(0x112)]);_0xe9e7bd[_0x6b73af(0x13d)](_0x3a62e4,_0x4aaadb);}return _0xe9e7bd;}export function collectSegmentUsageCounts(_0x185546){const _0x537780=a145_0x425d,_0x1771d5=new Map(),_0x2882d5=_0x3d713e=>{const _0x367271=a145_0x425d;if(!_0x3d713e)return;_0x1771d5[_0x367271(0x13d)](_0x3d713e,(_0x1771d5['get'](_0x3d713e)||0x0)+0x1);},_0x165306=_0x9d286=>{const _0x2a5456=a145_0x425d;for(const _0x940722 of _0x9d286){_0x2882d5(_0x940722[_0x2a5456(0x12a)]?.['segment']);if(_0x940722['exit_criteria'])for(const _0x159eff of _0x940722[_0x2a5456(0x121)]){_0x2882d5(_0x159eff[_0x2a5456(0x12c)]);}_0x2882d5(_0x940722['milestone']?.[_0x2a5456(0x12c)]);if(_0x940722[_0x2a5456(0x12b)])for(const _0xb25070 of _0x940722[_0x2a5456(0x12b)]){if(_0xb25070['type']==='decision_point')for(const _0x46f49a of _0xb25070[_0x2a5456(0x143)]['branches']){_0x2882d5(_0x46f49a[_0x2a5456(0x12c)]);}else _0xb25070[_0x2a5456(0x140)]===_0x2a5456(0x154)&&_0x2882d5(_0xb25070[_0x2a5456(0x143)][_0x2a5456(0x15a)]?.[_0x2a5456(0x12c)]);}}};_0x2882d5(_0x185546[_0x537780(0x113)]?.['segment']);if(_0x185546['journeys'])for(const _0x308ed5 of _0x185546['journeys']){_0x2882d5(_0x308ed5['goal']?.['segment']),_0x165306(_0x308ed5[_0x537780(0x14d)]);}_0x185546['stages']&&_0x165306(_0x185546[_0x537780(0x14d)]);if(_0x185546[_0x537780(0x12f)])for(const _0x28d207 of _0x185546[_0x537780(0x12f)]){_0x165306(_0x28d207[_0x537780(0x14d)]);}return _0x1771d5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x238534,_0x1bcf98){const _0x527508=a146_0x5476,_0xefeeb7=_0x238534();while(!![]){try{const _0x4e5dff=-parseInt(_0x527508(0x133))/0x1*(-parseInt(_0x527508(0x110))/0x2)+-parseInt(_0x527508(0x103))/0x3+parseInt(_0x527508(0x14b))/0x4*(-parseInt(_0x527508(0x140))/0x5)+-parseInt(_0x527508(0xc2))/0x6+parseInt(_0x527508(0x13c))/0x7*(-parseInt(_0x527508(0x102))/0x8)+-parseInt(_0x527508(0xff))/0x9*(-parseInt(_0x527508(0x121))/0xa)+-parseInt(_0x527508(0xc5))/0xb*(-parseInt(_0x527508(0x162))/0xc);if(_0x4e5dff===_0x1bcf98)break;else _0xefeeb7['push'](_0xefeeb7['shift']());}catch(_0x5aa5ff){_0xefeeb7['push'](_0xefeeb7['shift']());}}}(a146_0x410c,0xc02ca));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';function a146_0x5476(_0x5eebd9,_0x3bd1b3){_0x5eebd9=_0x5eebd9-0xbd;const _0x410c4c=a146_0x410c();let _0x5476f7=_0x410c4c[_0x5eebd9];return _0x5476f7;}const MAX_STAGES=0x8;function a146_0x410c(){const _0x1c8fde=['\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','some','.with.variants','success','\x20versions)','includes','condition','\x27\x20has\x20no\x20exit_criteria\x20defined','stages','\x27\x20has\x20no\x20end\x20step','JOURNEY_SCHEMA_ERROR','Journey\x20can\x20have\x20at\x20most\x20one\x20','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','variant\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','endsWith','.with.condition.next','description','ref:','Decision\x20branch\x20\x27','410634gFxpBs','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','add','2888xbRusZ','4416747yVhxkr','.with.condition.timeout.next','segments','UNUSED_EMBEDDED_SEGMENT','journeys[','.with.condition.timeout','safeParse','launched','rule','startsWith','.name','segments.','.with.branches','2uezTBR','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','stages[','excluded','activations','Journey\x20name\x20is\x20required','embeddedSegments','stepNames','.with.target','versions','segment','source','has','MISSING_CONDITIONS','activationKeys','path','symbol','310ISqprD',').\x20Merge\x20is\x20unnecessary.','TOO_MANY_STAGES','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Journey\x20has\x20no\x20goal\x20defined','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','latest','percentage','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','\x27\x20(from:\x20','merge','branch\x20\x27','End\x20step\x20\x27','ACTIVATION_SCHEMA_ERROR','MISSING_END_STEP','state','journeys','MISSING_SEGMENT_REFERENCE','117031DdriNn','set','BRANCH_DIRECTLY_TO_MERGE','issues','level','Merge\x20step\x20\x27','entry_criteria','map','referencedSegments','10444hMeHAj','.segment','document','.type','170hykIzV','.entry_criteria','\x20stages\x20but\x20maximum\x20is\x20','.next','.with.variants[','FEW_STEPS','join','SINGLE_INPUT_MERGE','\x20with\x20latest:\x20true','\x27\x20has\x20no\x20steps','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','110564SaOHRh','timeout\x20of\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','versions[','timeout','.with.branches[','version','type','.steps','journey','A/B\x20test\x20variant\x20\x27','indices',').\x20Use\x20a\x20merge\x20step.','INSUFFICIENT_STEPS','match','size','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_WAIT_PARAMS','MISSING_MILESTONE','wait','replace','with','exit_criteria','1547076RsUiaD','ab_test','INVALID_AB_TEST_PERCENTAGES','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','.with.activation','steps','abs','message','INVALID_JUMP_TARGET','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','variants','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','step\x20\x27','target','\x27\x20of\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Stage\x20\x27','CONVERGENCE_WITHOUT_MERGE','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','.milestone','branches','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','1459038qgkHjW','activation','.stages','209bsabyW','name','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','milestone','push','MISSING_ACTIVATION_REF','sort','MISSING_NAME','\x20(across\x20','get','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','decision_point','MISSING_STAGES','Embedded\x20segment\x20\x27','next','Step\x20references\x20non-existent\x20step\x20\x27','reduce','entries','jump','values','MISSING_ENTRY_CRITERIA','MISSING_GOAL','INVALID_NEXT_REFERENCE','goalIsInherited','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','trim','\x27\x20(first\x20defined\x20at\x20steps[','.exit_criteria','END_STEP_HAS_NEXT_OR_WITH','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','Criteria\x20references\x20undefined\x20segment\x20\x27','.with.condition.segment','length','goal','MISSING_ACTIVATION_DEFINITION','warning','error','DUPLICATE_LATEST'];a146_0x410c=function(){return _0x1c8fde;};return a146_0x410c();}function createIssue(_0x36c7e1,_0x430873,_0x233a87,_0x2a672a,_0x3d4e34,_0x3192e0){const _0xbb67ff=a146_0x5476;return{'level':_0x36c7e1,'path':_0x430873,'code':_0x233a87,'message':_0x2a672a,'location':getLocationFromPath(_0x3d4e34[_0xbb67ff(0x13e)],_0x3d4e34[_0xbb67ff(0x11b)],pathToArray(_0x3192e0??_0x430873))};}function validateVersionStructure(_0x46ec6e,_0x4e9763){const _0x11c528=a146_0x5476,_0x14baa0=[];return _0x46ec6e[_0x11c528(0xe5)]>MAX_STAGES&&_0x14baa0['push'](createIssue(_0x11c528(0xe9),_0x11c528(0xf3),_0x11c528(0x123),'Journey\x20has\x20'+_0x46ec6e[_0x11c528(0xe5)]+_0x11c528(0x142)+MAX_STAGES,_0x4e9763)),_0x14baa0;}function validateStageStructure(_0x125806,_0x322a6d,_0x249b3e,_0x3e8672){const _0x80c403=a146_0x5476,_0x5221f9=[],_0x597593=_0x80c403(0x112)+_0x322a6d+']';_0x322a6d===0x0&&!_0x125806[_0x80c403(0x139)]&&_0x5221f9['push'](createIssue(_0x80c403(0xe9),_0x597593+'.entry_criteria',_0x80c403(0xd9),'Stage\x20\x27'+_0x125806[_0x80c403(0xc6)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x3e8672,_0x597593));const _0x1516e8=_0x322a6d===_0x249b3e-0x1;!_0x1516e8&&!_0x125806['milestone']&&_0x5221f9['push'](createIssue(_0x80c403(0xe9),_0x597593+_0x80c403(0xbe),_0x80c403(0x15d),_0x80c403(0x172)+_0x125806[_0x80c403(0xc6)]+_0x80c403(0x165),_0x3e8672,_0x597593));(!_0x125806[_0x80c403(0x161)]||_0x125806['exit_criteria'][_0x80c403(0xe5)]===0x0)&&_0x5221f9['push'](createIssue(_0x80c403(0xe8),_0x597593+_0x80c403(0xe0),'MISSING_EXIT_CRITERIA','Stage\x20\x27'+_0x125806['name']+_0x80c403(0xf2),_0x3e8672,_0x597593));const _0x37ca11=_0x125806[_0x80c403(0x167)]?.['length']??0x0;if(_0x37ca11===0x0)_0x5221f9[_0x80c403(0xc9)](createIssue(_0x80c403(0xe9),_0x597593+_0x80c403(0x153),_0x80c403(0x158),_0x80c403(0x172)+_0x125806[_0x80c403(0xc6)]+_0x80c403(0x149),_0x3e8672,_0x597593+_0x80c403(0x153)));else{if(_0x37ca11===0x1)_0x5221f9['push'](createIssue(_0x80c403(0xe8),_0x597593+_0x80c403(0x153),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x125806[_0x80c403(0xc6)]+_0x80c403(0x129),_0x3e8672,_0x597593+_0x80c403(0x153)));else _0x37ca11<=0x3&&_0x5221f9['push'](createIssue('warning',_0x597593+'.steps',_0x80c403(0x145),'Stage\x20\x27'+_0x125806[_0x80c403(0xc6)]+'\x27\x20has\x20only\x20'+_0x37ca11+_0x80c403(0xbd),_0x3e8672,_0x597593+_0x80c403(0x153)));}return _0x5221f9;}function validateStep(_0x3b4ffb,_0x240883,_0x327123,_0x28ab64){const _0x515e75=a146_0x5476,_0x4aa175=[];if(_0x3b4ffb[_0x515e75(0x152)]==='end')return _0x3b4ffb['next']&&_0x4aa175[_0x515e75(0xc9)](createIssue(_0x515e75(0xe9),_0x240883+'.next',_0x515e75(0xe1),_0x515e75(0x12d)+_0x3b4ffb[_0x515e75(0xc6)]+_0x515e75(0xeb),_0x327123)),'with'in _0x3b4ffb&&_0x3b4ffb['with']!==undefined&&_0x4aa175[_0x515e75(0xc9)](createIssue(_0x515e75(0xe9),_0x240883+'.with',_0x515e75(0xe1),'End\x20step\x20\x27'+_0x3b4ffb[_0x515e75(0xc6)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x327123)),_0x4aa175;_0x3b4ffb[_0x515e75(0xd3)]&&(_0x327123[_0x515e75(0x117)]&&!_0x327123[_0x515e75(0x117)]['has'](_0x3b4ffb[_0x515e75(0xd3)])&&_0x4aa175[_0x515e75(0xc9)](createIssue('error',_0x240883+_0x515e75(0x143),_0x515e75(0xdb),_0x515e75(0xd4)+_0x3b4ffb[_0x515e75(0xd3)]+'\x27',_0x327123)));switch(_0x3b4ffb[_0x515e75(0x152)]){case _0x515e75(0x15e):_0x4aa175[_0x515e75(0xc9)](...validateWaitStep(_0x3b4ffb,_0x240883,_0x327123,_0x28ab64));break;case _0x515e75(0xc3):_0x4aa175[_0x515e75(0xc9)](...validateActivationStep(_0x3b4ffb,_0x240883,_0x327123));break;case _0x515e75(0xd0):_0x4aa175[_0x515e75(0xc9)](...validateDecisionPointStep(_0x3b4ffb,_0x240883,_0x327123,_0x28ab64));break;case'ab_test':_0x4aa175[_0x515e75(0xc9)](...validateAbTestStep(_0x3b4ffb,_0x240883,_0x327123,_0x28ab64));break;case _0x515e75(0xd7):_0x4aa175[_0x515e75(0xc9)](...validateJumpStep(_0x3b4ffb,_0x240883,_0x327123));break;}return _0x4aa175;}function validateWaitStep(_0x14eaff,_0x2bd4bd,_0x411fb4,_0x30d7c5){const _0x35cb44=a146_0x5476,_0x452b0b=[];if(!_0x14eaff[_0x35cb44(0x160)])return _0x452b0b[_0x35cb44(0xc9)](createIssue(_0x35cb44(0xe9),_0x2bd4bd+'.with',_0x35cb44(0x15c),_0x35cb44(0x126),_0x411fb4,_0x2bd4bd)),_0x452b0b;if(_0x14eaff[_0x35cb44(0x160)][_0x35cb44(0xf1)]){const _0x155d1b=_0x14eaff['with'][_0x35cb44(0xf1)];if(_0x155d1b[_0x35cb44(0x11a)]){_0x411fb4[_0x35cb44(0x13b)]?.['add'](_0x155d1b[_0x35cb44(0x11a)]);!_0x155d1b['segment'][_0x35cb44(0x10c)]('ref:')&&(_0x411fb4['embeddedSegments']&&!_0x411fb4[_0x35cb44(0x116)][_0x35cb44(0x11c)](_0x155d1b[_0x35cb44(0x11a)])&&_0x452b0b[_0x35cb44(0xc9)](createIssue(_0x35cb44(0xe9),_0x2bd4bd+_0x35cb44(0xe4),_0x35cb44(0x132),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x155d1b[_0x35cb44(0x11a)]+_0x35cb44(0x124),_0x411fb4)));_0x155d1b[_0x35cb44(0xd3)]&&_0x411fb4[_0x35cb44(0x117)]&&!_0x411fb4[_0x35cb44(0x117)][_0x35cb44(0x11c)](_0x155d1b[_0x35cb44(0xd3)])&&_0x452b0b['push'](createIssue(_0x35cb44(0xe9),_0x2bd4bd+_0x35cb44(0xfb),_0x35cb44(0xdb),_0x35cb44(0xc1)+_0x155d1b['next']+'\x27',_0x411fb4));_0x155d1b['timeout']?.[_0x35cb44(0xd3)]&&_0x411fb4[_0x35cb44(0x117)]&&!_0x411fb4[_0x35cb44(0x117)][_0x35cb44(0x11c)](_0x155d1b['timeout'][_0x35cb44(0xd3)])&&_0x452b0b[_0x35cb44(0xc9)](createIssue(_0x35cb44(0xe9),_0x2bd4bd+'.with.condition.timeout.next',_0x35cb44(0xdb),_0x35cb44(0x111)+_0x155d1b[_0x35cb44(0x14f)][_0x35cb44(0xd3)]+'\x27',_0x411fb4));const _0x4e775e=_0x155d1b[_0x35cb44(0xd3)]||_0x14eaff[_0x35cb44(0xd3)],_0x50c40f=_0x155d1b['timeout']?.['next']||_0x14eaff[_0x35cb44(0xd3)];if(_0x4e775e){const _0x4bc6ab=_0x30d7c5[_0x35cb44(0xce)](_0x4e775e);_0x4bc6ab?.[_0x35cb44(0x152)]===_0x35cb44(0x12b)&&_0x452b0b[_0x35cb44(0xc9)](createIssue('warning',_0x2bd4bd+_0x35cb44(0xfb),'BRANCH_DIRECTLY_TO_MERGE',_0x35cb44(0xf9)+_0x4e775e+_0x35cb44(0x171),_0x411fb4,_0x2bd4bd+'.with.condition'));}if(_0x50c40f){const _0x112118=_0x30d7c5['get'](_0x50c40f);_0x112118?.['type']==='merge'&&_0x452b0b[_0x35cb44(0xc9)](createIssue('warning',_0x2bd4bd+_0x35cb44(0x104),_0x35cb44(0x135),_0x35cb44(0xdd)+_0x50c40f+_0x35cb44(0x171),_0x411fb4,_0x2bd4bd+_0x35cb44(0x108)));}}}return _0x452b0b;}function validateActivationStep(_0x194796,_0x2bd969,_0x5f0d55){const _0x13e233=a146_0x5476,_0x49b214=[];if(!_0x194796[_0x13e233(0x160)]?.[_0x13e233(0xc3)])return _0x49b214[_0x13e233(0xc9)](createIssue(_0x13e233(0xe9),_0x2bd969+_0x13e233(0x166),_0x13e233(0xca),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x5f0d55,_0x2bd969)),_0x49b214;const _0x9f446c=_0x194796['with'][_0x13e233(0xc3)];return _0x5f0d55[_0x13e233(0x11e)]&&!_0x9f446c[_0x13e233(0x10c)](_0x13e233(0xfd))&&(!_0x5f0d55[_0x13e233(0x11e)][_0x13e233(0x11c)](_0x9f446c)&&_0x49b214[_0x13e233(0xc9)](createIssue('error',_0x2bd969+_0x13e233(0x166),_0x13e233(0xe7),_0x13e233(0xf7)+_0x9f446c+_0x13e233(0x16b),_0x5f0d55))),_0x49b214;}function validateDecisionPointStep(_0x56d9ae,_0x2d1ff0,_0x48c5f3,_0x5db51f){const _0x4733af=a146_0x5476,_0x422054=[];if(!_0x56d9ae[_0x4733af(0x160)]?.[_0x4733af(0xbf)]||_0x56d9ae[_0x4733af(0x160)][_0x4733af(0xbf)]['length']===0x0)return _0x422054[_0x4733af(0xc9)](createIssue(_0x4733af(0xe9),_0x2d1ff0+_0x4733af(0x10f),_0x4733af(0x11d),_0x4733af(0x100),_0x48c5f3,_0x2d1ff0)),_0x422054;for(let _0x41fad0=0x0;_0x41fad0<_0x56d9ae[_0x4733af(0x160)][_0x4733af(0xbf)][_0x4733af(0xe5)];_0x41fad0++){const _0x3d6273=_0x56d9ae['with'][_0x4733af(0xbf)][_0x41fad0],_0x1835a2=_0x2d1ff0+_0x4733af(0x150)+_0x41fad0+']';_0x3d6273['segment']&&!_0x3d6273[_0x4733af(0x113)]&&(_0x48c5f3[_0x4733af(0x13b)]?.['add'](_0x3d6273[_0x4733af(0x11a)]),!_0x3d6273['segment'][_0x4733af(0x10c)]('ref:')&&(_0x48c5f3[_0x4733af(0x116)]&&!_0x48c5f3[_0x4733af(0x116)][_0x4733af(0x11c)](_0x3d6273['segment'])&&_0x422054[_0x4733af(0xc9)](createIssue(_0x4733af(0xe9),_0x1835a2+_0x4733af(0x13d),_0x4733af(0x132),_0x4733af(0x174)+_0x3d6273[_0x4733af(0x11a)]+'\x27',_0x48c5f3))));_0x3d6273[_0x4733af(0xd3)]&&_0x48c5f3[_0x4733af(0x117)]&&!_0x48c5f3['stepNames'][_0x4733af(0x11c)](_0x3d6273[_0x4733af(0xd3)])&&_0x422054[_0x4733af(0xc9)](createIssue(_0x4733af(0xe9),_0x1835a2+'.next','INVALID_NEXT_REFERENCE',_0x4733af(0x16d)+_0x3d6273[_0x4733af(0xd3)]+'\x27',_0x48c5f3));if(_0x3d6273[_0x4733af(0xd3)]){const _0x4e8d00=_0x5db51f[_0x4733af(0xce)](_0x3d6273[_0x4733af(0xd3)]);_0x4e8d00?.['type']==='merge'&&_0x422054[_0x4733af(0xc9)](createIssue(_0x4733af(0xe8),_0x1835a2+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x4733af(0xfe)+_0x3d6273['name']+_0x4733af(0xc7)+_0x3d6273[_0x4733af(0xd3)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x48c5f3));}}return _0x422054;}function validateAbTestStep(_0x43cfa5,_0x313274,_0x33d215,_0xab9b58){const _0x202fb8=a146_0x5476,_0x5b68e9=[];if(!_0x43cfa5[_0x202fb8(0x160)]?.[_0x202fb8(0x16c)]||_0x43cfa5[_0x202fb8(0x160)][_0x202fb8(0x16c)]['length']===0x0)return _0x5b68e9[_0x202fb8(0xc9)](createIssue('error',_0x313274+_0x202fb8(0xed),_0x202fb8(0x11d),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x33d215,_0x313274)),_0x5b68e9;const _0x3787d1=_0x43cfa5[_0x202fb8(0x160)][_0x202fb8(0x16c)][_0x202fb8(0xd5)]((_0x450fad,_0x21ea89)=>_0x450fad+(_0x21ea89[_0x202fb8(0x128)]||0x0),0x0);Math[_0x202fb8(0x168)](_0x3787d1-0x64)>0.01&&_0x5b68e9[_0x202fb8(0xc9)](createIssue(_0x202fb8(0xe9),_0x313274+_0x202fb8(0xed),_0x202fb8(0x164),_0x202fb8(0xcf)+_0x3787d1+'%)',_0x33d215));for(let _0x2d474c=0x0;_0x2d474c<_0x43cfa5[_0x202fb8(0x160)][_0x202fb8(0x16c)][_0x202fb8(0xe5)];_0x2d474c++){const _0x15a5e1=_0x43cfa5[_0x202fb8(0x160)][_0x202fb8(0x16c)][_0x2d474c],_0x54d631=_0x313274+_0x202fb8(0x144)+_0x2d474c+']';_0x15a5e1['next']&&_0x33d215[_0x202fb8(0x117)]&&!_0x33d215[_0x202fb8(0x117)][_0x202fb8(0x11c)](_0x15a5e1[_0x202fb8(0xd3)])&&_0x5b68e9['push'](createIssue('error',_0x54d631+'.next','INVALID_NEXT_REFERENCE',_0x202fb8(0x15b)+_0x15a5e1[_0x202fb8(0xd3)]+'\x27',_0x33d215));if(_0x15a5e1[_0x202fb8(0xd3)]){const _0x89d994=_0xab9b58[_0x202fb8(0xce)](_0x15a5e1[_0x202fb8(0xd3)]);_0x89d994?.[_0x202fb8(0x152)]===_0x202fb8(0x12b)&&_0x5b68e9[_0x202fb8(0xc9)](createIssue(_0x202fb8(0xe8),_0x54d631+_0x202fb8(0x143),'BRANCH_DIRECTLY_TO_MERGE',_0x202fb8(0x155)+_0x15a5e1['name']+_0x202fb8(0xc7)+_0x15a5e1[_0x202fb8(0xd3)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x33d215));}}return _0x5b68e9;}function validateJumpStep(_0x456dcd,_0x54014e,_0xa1fab9){const _0x2d7beb=a146_0x5476,_0x1543e8=[];if(!_0x456dcd[_0x2d7beb(0x160)]?.[_0x2d7beb(0x16f)])return _0x1543e8[_0x2d7beb(0xc9)](createIssue(_0x2d7beb(0xe9),_0x54014e+'.with.target','INVALID_JUMP_TARGET','Jump\x20step\x20requires\x20a\x20target',_0xa1fab9,_0x54014e)),_0x1543e8;return(!_0x456dcd[_0x2d7beb(0x160)][_0x2d7beb(0x16f)][_0x2d7beb(0x154)]||!_0x456dcd[_0x2d7beb(0x160)][_0x2d7beb(0x16f)]['stage'])&&_0x1543e8[_0x2d7beb(0xc9)](createIssue('error',_0x54014e+_0x2d7beb(0x118),_0x2d7beb(0x16a),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0xa1fab9)),_0x1543e8;}function buildConvergenceMap(_0x349d4c){const _0x4c99c9=a146_0x5476,_0x393723=new Map();function _0x50ed8c(_0x3e1ff7,_0x22cd1e){const _0x2c0391=a146_0x5476,_0x1e1b0b=_0x393723['get'](_0x3e1ff7)||[];_0x1e1b0b[_0x2c0391(0xc9)](_0x22cd1e),_0x393723[_0x2c0391(0x134)](_0x3e1ff7,_0x1e1b0b);}for(const _0xee7dca of _0x349d4c){_0xee7dca['next']&&_0x50ed8c(_0xee7dca[_0x4c99c9(0xd3)],{'stepName':_0xee7dca['name'],'description':_0x4c99c9(0x16e)+_0xee7dca[_0x4c99c9(0xc6)]+'\x27'});if(_0xee7dca[_0x4c99c9(0x152)]==='decision_point'&&_0xee7dca[_0x4c99c9(0x160)]?.[_0x4c99c9(0xbf)])for(const _0x2a5a82 of _0xee7dca[_0x4c99c9(0x160)]['branches']){_0x2a5a82['next']&&_0x50ed8c(_0x2a5a82[_0x4c99c9(0xd3)],{'stepName':_0xee7dca[_0x4c99c9(0xc6)],'description':_0x4c99c9(0x12c)+_0x2a5a82[_0x4c99c9(0xc6)]+'\x27\x20of\x20\x27'+_0xee7dca[_0x4c99c9(0xc6)]+'\x27'});}if(_0xee7dca[_0x4c99c9(0x152)]===_0x4c99c9(0x163)&&_0xee7dca['with']?.['variants'])for(const _0x136cda of _0xee7dca[_0x4c99c9(0x160)][_0x4c99c9(0x16c)]){_0x136cda[_0x4c99c9(0xd3)]&&_0x50ed8c(_0x136cda[_0x4c99c9(0xd3)],{'stepName':_0xee7dca[_0x4c99c9(0xc6)],'description':_0x4c99c9(0xf8)+_0x136cda[_0x4c99c9(0xc6)]+_0x4c99c9(0x170)+_0xee7dca[_0x4c99c9(0xc6)]+'\x27'});}_0xee7dca[_0x4c99c9(0x152)]===_0x4c99c9(0x15e)&&_0xee7dca[_0x4c99c9(0x160)]?.[_0x4c99c9(0xf1)]&&(_0xee7dca[_0x4c99c9(0x160)]['condition'][_0x4c99c9(0xd3)]&&_0x50ed8c(_0xee7dca[_0x4c99c9(0x160)]['condition'][_0x4c99c9(0xd3)],{'stepName':_0xee7dca[_0x4c99c9(0xc6)],'description':'condition\x20of\x20\x27'+_0xee7dca[_0x4c99c9(0xc6)]+'\x27'}),_0xee7dca[_0x4c99c9(0x160)]['condition'][_0x4c99c9(0x14f)]?.[_0x4c99c9(0xd3)]&&_0x50ed8c(_0xee7dca['with'][_0x4c99c9(0xf1)][_0x4c99c9(0x14f)][_0x4c99c9(0xd3)],{'stepName':_0xee7dca['name'],'description':_0x4c99c9(0x14c)+_0xee7dca[_0x4c99c9(0xc6)]+'\x27'}));}return _0x393723;}function validateFlowControl(_0x1f1578,_0xa03322,_0x5882b9){const _0x3db8bc=a146_0x5476,_0x1c2369=[],_0x5bd9cf='stages['+_0xa03322+']',_0x35cbe4=_0x1f1578['steps']||[];if(_0x35cbe4['length']===0x0)return _0x1c2369;const _0x2d07b1=new Map();for(const _0x5aed3c of _0x35cbe4){_0x5aed3c['name']&&_0x2d07b1['set'](_0x5aed3c[_0x3db8bc(0xc6)],_0x5aed3c);}const _0x257a11=buildConvergenceMap(_0x35cbe4),_0x2352c3=_0x35cbe4[_0x3db8bc(0xec)](_0x2b9012=>_0x2b9012[_0x3db8bc(0x152)]==='end');!_0x2352c3&&_0x1c2369[_0x3db8bc(0xc9)](createIssue(_0x3db8bc(0xe9),_0x5bd9cf+'.steps',_0x3db8bc(0x12f),_0x3db8bc(0x172)+_0x1f1578[_0x3db8bc(0xc6)]+_0x3db8bc(0xf4),_0x5882b9));for(const [_0x474722,_0x4f030b]of _0x257a11){const _0x158f81=_0x2d07b1[_0x3db8bc(0xce)](_0x474722);if(!_0x158f81)continue;if(_0x4f030b[_0x3db8bc(0xe5)]>0x1&&_0x158f81[_0x3db8bc(0x152)]!=='merge'){const _0x1b6913=_0x4f030b['map'](_0x314dc9=>_0x314dc9[_0x3db8bc(0xfc)])[_0x3db8bc(0x146)](',\x20');_0x1c2369[_0x3db8bc(0xc9)](createIssue(_0x3db8bc(0xe9),_0x5bd9cf+_0x3db8bc(0x153),_0x3db8bc(0x173),_0x3db8bc(0x14d)+_0x474722+_0x3db8bc(0x12a)+_0x1b6913+_0x3db8bc(0x157),_0x5882b9));}_0x4f030b[_0x3db8bc(0xe5)]===0x1&&_0x158f81['type']===_0x3db8bc(0x12b)&&_0x1c2369[_0x3db8bc(0xc9)](createIssue('warning',_0x5bd9cf+'.steps',_0x3db8bc(0x147),'Merge\x20step\x20\x27'+_0x474722+_0x3db8bc(0xe2)+_0x4f030b[0x0][_0x3db8bc(0xfc)]+_0x3db8bc(0x122),_0x5882b9));}for(const _0x94f9ff of _0x35cbe4){if(_0x94f9ff[_0x3db8bc(0x152)]===_0x3db8bc(0x12b)&&_0x94f9ff[_0x3db8bc(0xd3)]){const _0x35a1f7=_0x2d07b1['get'](_0x94f9ff[_0x3db8bc(0xd3)]);_0x35a1f7?.[_0x3db8bc(0x152)]===_0x3db8bc(0x12b)&&_0x1c2369['push'](createIssue(_0x3db8bc(0xe9),_0x5bd9cf+_0x3db8bc(0x153),'MERGE_TO_MERGE_CHAIN',_0x3db8bc(0x138)+_0x94f9ff[_0x3db8bc(0xc6)]+_0x3db8bc(0x14a)+_0x94f9ff['next']+_0x3db8bc(0xc0),_0x5882b9));}}return _0x1c2369;}function validateCriteria(_0xed92d9,_0x51e69d,_0x24e573){const _0x41f8a2=a146_0x5476,_0x1f77b8=[];return _0xed92d9['segment']&&(_0x24e573[_0x41f8a2(0x13b)]?.[_0x41f8a2(0x101)](_0xed92d9[_0x41f8a2(0x11a)]),!_0xed92d9[_0x41f8a2(0x11a)][_0x41f8a2(0x10c)](_0x41f8a2(0xfd))&&(_0x24e573[_0x41f8a2(0x116)]&&!_0x24e573['embeddedSegments'][_0x41f8a2(0x11c)](_0xed92d9['segment'])&&_0x1f77b8['push'](createIssue(_0x41f8a2(0xe9),_0x51e69d+_0x41f8a2(0x13d),'MISSING_SEGMENT_REFERENCE',_0x41f8a2(0xe3)+_0xed92d9[_0x41f8a2(0x11a)]+'\x27',_0x24e573)))),_0x1f77b8;}function validateEmbeddedSegment(_0x281005,_0x46bdc3,_0x599f7b){const _0x3a86b4=a146_0x5476,_0x59ed0e=[];return _0x281005[_0x3a86b4(0x10b)]&&_0x59ed0e[_0x3a86b4(0xc9)](...validateRuleDef(_0x281005[_0x3a86b4(0x10b)],_0x46bdc3+'.rule',_0x599f7b)),_0x59ed0e;}function validateStage(_0x16af95,_0x5636d2,_0x8d8a4c,_0x2f05a4){const _0xd711b9=a146_0x5476,_0x238f52=[],_0x38aefb='stages['+_0x5636d2+']',_0x1bc26b=new Map(),_0xe99369=new Map();if(_0x16af95['steps']){for(let _0x28543c=0x0;_0x28543c<_0x16af95[_0xd711b9(0x167)][_0xd711b9(0xe5)];_0x28543c++){const _0xd12004=_0x16af95[_0xd711b9(0x167)][_0x28543c];_0xd12004[_0xd711b9(0xc6)]&&_0x1bc26b['set'](_0xd12004[_0xd711b9(0xc6)],_0xd12004);}for(let _0x3593ff=0x0;_0x3593ff<_0x16af95[_0xd711b9(0x167)][_0xd711b9(0xe5)];_0x3593ff++){const _0x188d05=_0x16af95[_0xd711b9(0x167)][_0x3593ff],_0x3c0224=_0x38aefb+'.steps['+_0x3593ff+']';if(_0x188d05['name']){if(_0xe99369['has'](_0x188d05[_0xd711b9(0xc6)])){const _0x2a997c=_0xe99369[_0xd711b9(0xce)](_0x188d05['name']);_0x238f52[_0xd711b9(0xc9)](createIssue(_0xd711b9(0xe9),_0x3c0224+_0xd711b9(0x10d),'DUPLICATE_STEP_NAME','Duplicate\x20step\x20name\x20\x27'+_0x188d05[_0xd711b9(0xc6)]+_0xd711b9(0xdf)+_0x2a997c+'])',_0x2f05a4));}else _0xe99369['set'](_0x188d05['name'],_0x3593ff);}_0x238f52['push'](...validateStep(_0x188d05,_0x3c0224,_0x2f05a4,_0x1bc26b));}}_0x16af95[_0xd711b9(0x139)]&&_0x238f52[_0xd711b9(0xc9)](...validateCriteria(_0x16af95[_0xd711b9(0x139)],_0x38aefb+_0xd711b9(0x141),_0x2f05a4));if(_0x16af95[_0xd711b9(0x161)])for(let _0x402433=0x0;_0x402433<_0x16af95['exit_criteria'][_0xd711b9(0xe5)];_0x402433++){_0x238f52[_0xd711b9(0xc9)](...validateCriteria(_0x16af95[_0xd711b9(0x161)][_0x402433],_0x38aefb+'.exit_criteria['+_0x402433+']',_0x2f05a4));}return _0x16af95[_0xd711b9(0xc8)]&&_0x238f52['push'](...validateCriteria(_0x16af95['milestone'],_0x38aefb+_0xd711b9(0xbe),_0x2f05a4)),_0x238f52['push'](...validateStageStructure(_0x16af95,_0x5636d2,_0x8d8a4c,_0x2f05a4)),_0x238f52['push'](...validateFlowControl(_0x16af95,_0x5636d2,_0x2f05a4)),_0x238f52;}function validateStagesForVersion(_0x73e1a7,_0x7b6f62,_0x8706d4,_0x3dc36e,_0x1fc9b3,_0x3d22e6,_0x2cd92a){const _0x53e202=a146_0x5476;if(_0x73e1a7[_0x53e202(0xe5)]===0x0){_0x1fc9b3[_0x53e202(0xc9)]({'level':_0x53e202(0xe9),'path':_0x3dc36e+_0x53e202(0xf3),'code':_0x53e202(0xd1),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x8706d4[_0x53e202(0x13e)],_0x8706d4['source'],['stages'])});return;}const _0x260215=new Set();for(const _0x47be71 of _0x73e1a7){if(_0x47be71[_0x53e202(0x167)])for(const _0x12eee2 of _0x47be71['steps']){_0x12eee2[_0x53e202(0xc6)]&&_0x260215[_0x53e202(0x101)](_0x12eee2[_0x53e202(0xc6)]);}}const _0x2665e3={..._0x8706d4,'stepNames':_0x260215},_0x5de13f=validateVersionStructure(_0x73e1a7,_0x2665e3);for(const _0x198937 of _0x5de13f){const _0x31fbe8=_0x3dc36e?{..._0x198937,'path':''+_0x3dc36e+_0x198937[_0x53e202(0x11f)]}:_0x198937;if(_0x31fbe8[_0x53e202(0x137)]===_0x53e202(0xe9))_0x1fc9b3[_0x53e202(0xc9)](_0x31fbe8);else _0x3d22e6[_0x53e202(0xc9)](_0x31fbe8);}for(let _0x49553f=0x0;_0x49553f<_0x73e1a7[_0x53e202(0xe5)];_0x49553f++){const _0x3128e6=validateStage(_0x73e1a7[_0x49553f],_0x49553f,_0x73e1a7['length'],_0x2665e3);for(const _0x33a1e3 of _0x3128e6){const _0x345b91=_0x3dc36e?{..._0x33a1e3,'path':''+_0x3dc36e+_0x33a1e3[_0x53e202(0x11f)]}:_0x33a1e3;if(_0x345b91[_0x53e202(0x137)]===_0x53e202(0xe9))_0x1fc9b3['push'](_0x345b91);else _0x3d22e6['push'](_0x345b91);}}if(_0x7b6f62[_0x53e202(0xe6)]){const _0x253e3a=_0x2cd92a?.[_0x53e202(0xdc)]?'goal':_0x3dc36e+_0x53e202(0xe6),_0x46dc9b=validateCriteria(_0x7b6f62[_0x53e202(0xe6)],_0x253e3a,_0x2665e3);for(const _0x34aac6 of _0x46dc9b){if(_0x34aac6[_0x53e202(0x137)]===_0x53e202(0xe9))_0x1fc9b3[_0x53e202(0xc9)](_0x34aac6);else _0x3d22e6[_0x53e202(0xc9)](_0x34aac6);}}}function extractVersionIndex(_0x4bd2fa){const _0x489c36=a146_0x5476,_0x20f7bf=_0x4bd2fa[_0x489c36(0x159)](/^journeys\[(\d+)\]\./);return _0x20f7bf?_0x20f7bf[0x1]:undefined;}function deduplicateAcrossVersions(_0x17f45f){const _0x11d6e7=a146_0x5476,_0x54e8fd=new Map();for(let _0x38dc30=0x0;_0x38dc30<_0x17f45f[_0x11d6e7(0xe5)];_0x38dc30++){const _0x5eb370=_0x17f45f[_0x38dc30]['code']+':'+_0x17f45f[_0x38dc30][_0x11d6e7(0x169)],_0xb4a3d3=extractVersionIndex(_0x17f45f[_0x38dc30][_0x11d6e7(0x11f)]),_0x1a0136=_0x54e8fd[_0x11d6e7(0xce)](_0x5eb370);if(_0x1a0136){_0x1a0136[_0x11d6e7(0x156)][_0x11d6e7(0xc9)](_0x38dc30);if(_0xb4a3d3)_0x1a0136['versions'][_0x11d6e7(0x101)](_0xb4a3d3);}else _0x54e8fd[_0x11d6e7(0x134)](_0x5eb370,{'indices':[_0x38dc30],'versions':new Set(_0xb4a3d3?[_0xb4a3d3]:[])});}const _0x4b99c2=new Set();for(const {indices:_0x3900b0,versions:_0x42dfad}of _0x54e8fd[_0x11d6e7(0xd8)]()){if(_0x42dfad[_0x11d6e7(0x15a)]<=0x1)continue;const _0x17848d=_0x17f45f[_0x3900b0[0x0]];_0x17848d[_0x11d6e7(0x11f)]=_0x17848d[_0x11d6e7(0x11f)][_0x11d6e7(0x15f)](/^journeys\[\d+\]\./,''),_0x17848d[_0x11d6e7(0x169)]=_0x17848d[_0x11d6e7(0x169)]+_0x11d6e7(0xcd)+_0x42dfad[_0x11d6e7(0x15a)]+_0x11d6e7(0xef);for(let _0x4b83da=0x1;_0x4b83da<_0x3900b0[_0x11d6e7(0xe5)];_0x4b83da++){_0x4b99c2[_0x11d6e7(0x101)](_0x3900b0[_0x4b83da]);}}const _0x4fc0f1=[..._0x4b99c2][_0x11d6e7(0xcb)]((_0x292041,_0xf1a313)=>_0xf1a313-_0x292041);for(const _0x3c0d6c of _0x4fc0f1){_0x17f45f['splice'](_0x3c0d6c,0x1);}}export function validateJourneyDef(_0x646f68,_0x691bd={},_0xefb1bb={}){const _0x1f1e54=a146_0x5476;if(_0xefb1bb['skipSchema'])return runJourneySemanticChecks(_0x646f68,_0x691bd);const _0x16db44=JourneyDefSchema[_0x1f1e54(0x109)](_0x646f68);if(_0x16db44[_0x1f1e54(0xee)])return runJourneySemanticChecks(_0x16db44['data'],_0x691bd);return zodErrorsToJourneyValidationResult(_0x16db44[_0x1f1e54(0xe9)],_0x691bd);}function zodErrorsToJourneyValidationResult(_0xd8762e,_0x58273b){const _0x51d525=a146_0x5476,_0x3fb2e4=flattenZodIssues(_0xd8762e[_0x51d525(0x136)]),_0x1d6ac8=_0x3fb2e4[_0x51d525(0x13a)](_0x3361c7=>{const _0x330247=_0x51d525,_0x51c9d5=formatZodPath(_0x3361c7[_0x330247(0x11f)]),_0x31826c=mapJourneyZodIssueToCode(_0x3361c7,_0x51c9d5),_0x1ee541=getLocationFromPath(_0x58273b[_0x330247(0x13e)],_0x58273b[_0x330247(0x11b)],_0x3361c7[_0x330247(0x11f)][_0x330247(0x13a)](_0x10978c=>typeof _0x10978c===_0x330247(0x120)?String(_0x10978c):_0x10978c));return{'level':_0x330247(0xe9),'path':_0x51c9d5,'code':_0x31826c,'message':_0x3361c7['message'],..._0x1ee541&&{'location':_0x1ee541}};});return{'valid':![],'errors':_0x1d6ac8,'warnings':[]};}function mapJourneyZodIssueToCode(_0x1e8f50,_0x34d2e8){const _0x29b879=a146_0x5476;if(_0x34d2e8===_0x29b879(0xc6))return _0x29b879(0xcc);if(_0x34d2e8[_0x29b879(0xfa)](_0x29b879(0x13f))&&_0x34d2e8[_0x29b879(0xf0)](_0x29b879(0x167)))return'JOURNEY_SCHEMA_ERROR';if(_0x34d2e8===_0x29b879(0xf3)||_0x34d2e8[_0x29b879(0xfa)](_0x29b879(0xc4)))return _0x29b879(0xd1);if(_0x34d2e8===''&&_0x1e8f50[_0x29b879(0x169)][_0x29b879(0xf0)]('journeys,\x20stages,\x20or\x20versions'))return _0x29b879(0xd1);if(_0x34d2e8['includes']('activation'))return _0x29b879(0x12e);return _0x29b879(0xf5);}function runJourneySemanticChecks(_0x3a2e19,_0x58c8c8){const _0x2e26af=a146_0x5476,_0x1a272f=[],_0x49eaae=[];(!_0x3a2e19[_0x2e26af(0xc6)]||_0x3a2e19['name'][_0x2e26af(0xde)]()==='')&&_0x1a272f[_0x2e26af(0xc9)]({'level':'error','path':_0x2e26af(0xc6),'code':_0x2e26af(0xcc),'message':_0x2e26af(0x115),'location':getLocationFromPath(_0x58c8c8[_0x2e26af(0x13e)],_0x58c8c8[_0x2e26af(0x11b)],['name'])});const _0xcbb9c9=new Set();if(_0x3a2e19[_0x2e26af(0x105)])for(const _0x223022 of Object['keys'](_0x3a2e19['segments'])){_0xcbb9c9['add'](_0x223022);}const _0x28455a=new Set();if(_0x3a2e19['activations'])for(const _0x355b48 of Object['keys'](_0x3a2e19[_0x2e26af(0x114)])){_0x28455a[_0x2e26af(0x101)](_0x355b48);}const _0x3e93e3=new Set(),_0x576fe3={..._0x58c8c8,'embeddedSegments':_0xcbb9c9,'referencedSegments':_0x3e93e3,'activationKeys':_0x28455a['size']>0x0?_0x28455a:undefined};if(_0x3a2e19[_0x2e26af(0x105)])for(const [_0x3d4136,_0x3b560b]of Object[_0x2e26af(0xd6)](_0x3a2e19[_0x2e26af(0x105)])){const _0x380296=validateEmbeddedSegment(_0x3b560b,'segments.'+_0x3d4136,_0x576fe3);for(const _0x300a8c of _0x380296){if(_0x300a8c['level']===_0x2e26af(0xe9))_0x1a272f[_0x2e26af(0xc9)](_0x300a8c);else _0x49eaae[_0x2e26af(0xc9)](_0x300a8c);}}const _0x5bb408=!!_0x3a2e19[_0x2e26af(0xe6)],_0x2af36a=_0x3a2e19['journeys']?.['every'](_0x16c86e=>!!_0x16c86e[_0x2e26af(0xe6)])??![];!_0x5bb408&&!_0x2af36a&&_0x49eaae[_0x2e26af(0xc9)]({'level':'warning','path':_0x2e26af(0xe6),'code':_0x2e26af(0xda),'message':_0x2e26af(0x125),'location':getLocationFromPath(_0x58c8c8[_0x2e26af(0x13e)],_0x58c8c8[_0x2e26af(0x11b)],[_0x2e26af(0xe6)])});const _0x1a6530=_0x3a2e19[_0x2e26af(0x131)]??_0x3a2e19[_0x2e26af(0x119)];if(_0x1a6530&&_0x1a6530['filter'](_0x48c359=>_0x48c359[_0x2e26af(0x127)]===!![])['length']>0x1){const _0xa8478a=_0x3a2e19['journeys']?_0x2e26af(0x131):_0x2e26af(0x119);_0x1a272f[_0x2e26af(0xc9)]({'level':_0x2e26af(0xe9),'path':_0xa8478a,'code':_0x2e26af(0xea),'message':_0x2e26af(0xf6)+(_0xa8478a===_0x2e26af(0x131)?'journey\x20entry':_0x2e26af(0x151))+_0x2e26af(0x148),'location':getLocationFromPath(_0x58c8c8['document'],_0x58c8c8[_0x2e26af(0x11b)],[_0xa8478a])});}if(_0x3a2e19[_0x2e26af(0x131)]&&_0x3a2e19[_0x2e26af(0x131)][_0x2e26af(0xe5)]>0x0)for(let _0x14b356=0x0;_0x14b356<_0x3a2e19[_0x2e26af(0x131)][_0x2e26af(0xe5)];_0x14b356++){const _0xc8f899=_0x3a2e19[_0x2e26af(0x131)][_0x14b356];if(_0x3a2e19[_0x2e26af(0x131)][_0x2e26af(0xe5)]>0x1&&_0xc8f899[_0x2e26af(0x130)]===_0x2e26af(0x10a))continue;const _0x3e3b83=_0xc8f899[_0x2e26af(0xf3)]||[],_0x12c2d8=_0x2e26af(0x107)+_0x14b356+'].',_0x4db783=!!_0xc8f899['goal'],_0x4bff1a=_0x4db783?{..._0x3a2e19,'goal':_0xc8f899['goal']}:_0x3a2e19;validateStagesForVersion(_0x3e3b83,_0x4bff1a,_0x576fe3,_0x12c2d8,_0x1a272f,_0x49eaae,{'goalIsInherited':!_0x4db783});}else{if(_0x3a2e19[_0x2e26af(0x119)]&&_0x3a2e19['versions'][_0x2e26af(0xe5)]>0x0)for(let _0x261eb7=0x0;_0x261eb7<_0x3a2e19[_0x2e26af(0x119)][_0x2e26af(0xe5)];_0x261eb7++){const _0x53aeb6=_0x3a2e19[_0x2e26af(0x119)][_0x261eb7];if(_0x3a2e19[_0x2e26af(0x119)][_0x2e26af(0xe5)]>0x1&&_0x53aeb6[_0x2e26af(0x130)]==='launched')continue;const _0x124fd4=_0x53aeb6[_0x2e26af(0xf3)]||[],_0x2c2d71=_0x2e26af(0x14e)+_0x261eb7+'].';validateStagesForVersion(_0x124fd4,_0x3a2e19,_0x576fe3,_0x2c2d71,_0x1a272f,_0x49eaae);}else{const _0x4c22fd=_0x3a2e19[_0x2e26af(0xf3)]||[];validateStagesForVersion(_0x4c22fd,_0x3a2e19,_0x576fe3,'',_0x1a272f,_0x49eaae);}}_0x3a2e19[_0x2e26af(0x131)]&&_0x3a2e19[_0x2e26af(0x131)][_0x2e26af(0xe5)]>0x1&&(deduplicateAcrossVersions(_0x1a272f),deduplicateAcrossVersions(_0x49eaae));for(const _0xd961d8 of _0xcbb9c9){!_0x3e93e3[_0x2e26af(0x11c)](_0xd961d8)&&!_0xd961d8[_0x2e26af(0x10c)]('excluded_')&&_0x49eaae[_0x2e26af(0xc9)]({'level':_0x2e26af(0xe8),'path':_0x2e26af(0x10e)+_0xd961d8,'code':_0x2e26af(0x106),'message':_0x2e26af(0xd2)+_0xd961d8+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x58c8c8[_0x2e26af(0x13e)],_0x58c8c8['source'],[_0x2e26af(0x105),_0xd961d8])});}return{'valid':_0x1a272f[_0x2e26af(0xe5)]===0x0,'errors':_0x1a272f,'warnings':_0x49eaae};}
|
|
1
|
+
(function(_0x4014fd,_0x5b54e5){const _0x57ad96=a146_0x365f,_0x1d4be8=_0x4014fd();while(!![]){try{const _0x1536e2=parseInt(_0x57ad96(0x21f))/0x1+parseInt(_0x57ad96(0x208))/0x2*(parseInt(_0x57ad96(0x1bc))/0x3)+parseInt(_0x57ad96(0x1d9))/0x4*(-parseInt(_0x57ad96(0x19d))/0x5)+-parseInt(_0x57ad96(0x1e2))/0x6*(parseInt(_0x57ad96(0x17f))/0x7)+-parseInt(_0x57ad96(0x198))/0x8+parseInt(_0x57ad96(0x205))/0x9+parseInt(_0x57ad96(0x1d3))/0xa;if(_0x1536e2===_0x5b54e5)break;else _0x1d4be8['push'](_0x1d4be8['shift']());}catch(_0x22466e){_0x1d4be8['push'](_0x1d4be8['shift']());}}}(a146_0x5b52,0xdc26a));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x8a9a81,_0x4c57b5,_0x465ab9,_0x1f29cd,_0x24df18,_0x57105d){const _0x387e85=a146_0x365f;return{'level':_0x8a9a81,'path':_0x4c57b5,'code':_0x465ab9,'message':_0x1f29cd,'location':getLocationFromPath(_0x24df18[_0x387e85(0x1ad)],_0x24df18[_0x387e85(0x1dd)],pathToArray(_0x57105d??_0x4c57b5))};}function validateVersionStructure(_0x34f424,_0x2a8e78){const _0x4138da=a146_0x365f,_0x3e88d9=[];return _0x34f424[_0x4138da(0x195)]>MAX_STAGES&&_0x3e88d9[_0x4138da(0x1ff)](createIssue(_0x4138da(0x1fb),'stages','TOO_MANY_STAGES',_0x4138da(0x20c)+_0x34f424[_0x4138da(0x195)]+_0x4138da(0x1fd)+MAX_STAGES,_0x2a8e78)),_0x3e88d9;}function validateStageStructure(_0x2171ec,_0x429a15,_0x16c194,_0x4d3c7e){const _0x537f53=a146_0x365f,_0x233d74=[],_0x3d5f42=_0x537f53(0x1ee)+_0x429a15+']';_0x429a15===0x0&&!_0x2171ec[_0x537f53(0x20a)]&&_0x233d74[_0x537f53(0x1ff)](createIssue(_0x537f53(0x1fb),_0x3d5f42+_0x537f53(0x17e),_0x537f53(0x1a8),_0x537f53(0x1c7)+_0x2171ec[_0x537f53(0x1eb)]+_0x537f53(0x218),_0x4d3c7e,_0x3d5f42));const _0x3297b4=_0x429a15===_0x16c194-0x1;!_0x3297b4&&!_0x2171ec[_0x537f53(0x1b8)]&&_0x233d74[_0x537f53(0x1ff)](createIssue(_0x537f53(0x1fb),_0x3d5f42+_0x537f53(0x175),'MISSING_MILESTONE',_0x537f53(0x1c7)+_0x2171ec[_0x537f53(0x1eb)]+_0x537f53(0x1ef),_0x4d3c7e,_0x3d5f42));(!_0x2171ec['exit_criteria']||_0x2171ec['exit_criteria'][_0x537f53(0x195)]===0x0)&&_0x233d74[_0x537f53(0x1ff)](createIssue(_0x537f53(0x1a3),_0x3d5f42+'.exit_criteria',_0x537f53(0x1a4),_0x537f53(0x1c7)+_0x2171ec[_0x537f53(0x1eb)]+_0x537f53(0x216),_0x4d3c7e,_0x3d5f42));const _0x1c8472=_0x2171ec[_0x537f53(0x214)]?.[_0x537f53(0x195)]??0x0;if(_0x1c8472===0x0)_0x233d74[_0x537f53(0x1ff)](createIssue(_0x537f53(0x1fb),_0x3d5f42+_0x537f53(0x209),_0x537f53(0x174),_0x537f53(0x1c7)+_0x2171ec[_0x537f53(0x1eb)]+_0x537f53(0x1d7),_0x4d3c7e,_0x3d5f42+_0x537f53(0x209)));else{if(_0x1c8472===0x1)_0x233d74[_0x537f53(0x1ff)](createIssue('warning',_0x3d5f42+'.steps',_0x537f53(0x174),_0x537f53(0x1c7)+_0x2171ec['name']+_0x537f53(0x17b),_0x4d3c7e,_0x3d5f42+_0x537f53(0x209)));else _0x1c8472<=0x3&&_0x233d74['push'](createIssue(_0x537f53(0x1a3),_0x3d5f42+_0x537f53(0x209),_0x537f53(0x223),_0x537f53(0x1c7)+_0x2171ec['name']+_0x537f53(0x1de)+_0x1c8472+_0x537f53(0x184),_0x4d3c7e,_0x3d5f42+'.steps'));}return _0x233d74;}function validateStep(_0x4d7f86,_0x473d5c,_0x4505ef,_0x3d856d){const _0x4a6a83=a146_0x365f,_0x28f3c7=[];if(_0x4d7f86[_0x4a6a83(0x1a2)]==='end')return _0x4d7f86['next']&&_0x28f3c7[_0x4a6a83(0x1ff)](createIssue(_0x4a6a83(0x1fb),_0x473d5c+_0x4a6a83(0x1f3),_0x4a6a83(0x203),_0x4a6a83(0x1f6)+_0x4d7f86[_0x4a6a83(0x1eb)]+_0x4a6a83(0x1c4),_0x4505ef)),'with'in _0x4d7f86&&_0x4d7f86[_0x4a6a83(0x17c)]!==undefined&&_0x28f3c7['push'](createIssue(_0x4a6a83(0x1fb),_0x473d5c+_0x4a6a83(0x20e),_0x4a6a83(0x203),_0x4a6a83(0x1f6)+_0x4d7f86[_0x4a6a83(0x1eb)]+_0x4a6a83(0x16a),_0x4505ef)),_0x28f3c7;_0x4d7f86[_0x4a6a83(0x1b5)]&&(_0x4505ef[_0x4a6a83(0x1bd)]&&!_0x4505ef[_0x4a6a83(0x1bd)]['has'](_0x4d7f86[_0x4a6a83(0x1b5)])&&_0x28f3c7[_0x4a6a83(0x1ff)](createIssue(_0x4a6a83(0x1fb),_0x473d5c+_0x4a6a83(0x1f3),_0x4a6a83(0x181),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x4d7f86[_0x4a6a83(0x1b5)]+'\x27',_0x4505ef)));switch(_0x4d7f86['type']){case _0x4a6a83(0x1c3):_0x28f3c7[_0x4a6a83(0x1ff)](...validateWaitStep(_0x4d7f86,_0x473d5c,_0x4505ef,_0x3d856d));break;case _0x4a6a83(0x1ce):_0x28f3c7[_0x4a6a83(0x1ff)](...validateActivationStep(_0x4d7f86,_0x473d5c,_0x4505ef));break;case _0x4a6a83(0x1dc):_0x28f3c7[_0x4a6a83(0x1ff)](...validateDecisionPointStep(_0x4d7f86,_0x473d5c,_0x4505ef,_0x3d856d));break;case _0x4a6a83(0x1b1):_0x28f3c7[_0x4a6a83(0x1ff)](...validateAbTestStep(_0x4d7f86,_0x473d5c,_0x4505ef,_0x3d856d));break;case _0x4a6a83(0x17d):_0x28f3c7[_0x4a6a83(0x1ff)](...validateJumpStep(_0x4d7f86,_0x473d5c,_0x4505ef));break;}return _0x28f3c7;}function validateWaitStep(_0x299d22,_0xeb7c0e,_0x4afe46,_0x15a6ed){const _0x25e141=a146_0x365f,_0x166ca3=[];if(!_0x299d22['with'])return _0x166ca3[_0x25e141(0x1ff)](createIssue(_0x25e141(0x1fb),_0xeb7c0e+_0x25e141(0x20e),_0x25e141(0x1c0),_0x25e141(0x204),_0x4afe46,_0xeb7c0e)),_0x166ca3;if(_0x299d22['with']['condition']){const _0x4ac931=_0x299d22[_0x25e141(0x17c)][_0x25e141(0x217)];if(_0x4ac931[_0x25e141(0x1df)]){_0x4afe46[_0x25e141(0x1d5)]?.[_0x25e141(0x177)](_0x4ac931['segment']);!_0x4ac931[_0x25e141(0x1df)]['startsWith']('ref:')&&(_0x4afe46[_0x25e141(0x179)]&&!_0x4afe46['embeddedSegments'][_0x25e141(0x1cc)](_0x4ac931[_0x25e141(0x1df)])&&_0x166ca3[_0x25e141(0x1ff)](createIssue(_0x25e141(0x1fb),_0xeb7c0e+'.with.condition.segment',_0x25e141(0x192),_0x25e141(0x1be)+_0x4ac931[_0x25e141(0x1df)]+_0x25e141(0x176),_0x4afe46)));_0x4ac931[_0x25e141(0x1b5)]&&_0x4afe46[_0x25e141(0x1bd)]&&!_0x4afe46[_0x25e141(0x1bd)]['has'](_0x4ac931[_0x25e141(0x1b5)])&&_0x166ca3[_0x25e141(0x1ff)](createIssue(_0x25e141(0x1fb),_0xeb7c0e+_0x25e141(0x20b),_0x25e141(0x181),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x4ac931['next']+'\x27',_0x4afe46));_0x4ac931[_0x25e141(0x212)]?.[_0x25e141(0x1b5)]&&_0x4afe46[_0x25e141(0x1bd)]&&!_0x4afe46['stepNames'][_0x25e141(0x1cc)](_0x4ac931[_0x25e141(0x212)]['next'])&&_0x166ca3[_0x25e141(0x1ff)](createIssue(_0x25e141(0x1fb),_0xeb7c0e+_0x25e141(0x16f),_0x25e141(0x181),_0x25e141(0x1f4)+_0x4ac931['timeout'][_0x25e141(0x1b5)]+'\x27',_0x4afe46));const _0x2f55be=_0x4ac931[_0x25e141(0x1b5)]||_0x299d22[_0x25e141(0x1b5)],_0xdfdad3=_0x4ac931[_0x25e141(0x212)]?.['next']||_0x299d22['next'];if(_0x2f55be){const _0x1d6060=_0x15a6ed['get'](_0x2f55be);_0x1d6060?.[_0x25e141(0x1a2)]===_0x25e141(0x1ea)&&_0x166ca3[_0x25e141(0x1ff)](createIssue(_0x25e141(0x1a3),_0xeb7c0e+_0x25e141(0x20b),_0x25e141(0x202),_0x25e141(0x1e0)+_0x2f55be+_0x25e141(0x1a6),_0x4afe46,_0xeb7c0e+_0x25e141(0x1aa)));}if(_0xdfdad3){const _0x43154f=_0x15a6ed[_0x25e141(0x1f0)](_0xdfdad3);_0x43154f?.[_0x25e141(0x1a2)]===_0x25e141(0x1ea)&&_0x166ca3[_0x25e141(0x1ff)](createIssue(_0x25e141(0x1a3),_0xeb7c0e+_0x25e141(0x16f),_0x25e141(0x202),_0x25e141(0x18d)+_0xdfdad3+_0x25e141(0x1a6),_0x4afe46,_0xeb7c0e+_0x25e141(0x1e5)));}}}return _0x166ca3;}function validateActivationStep(_0x5138a4,_0x3646c6,_0xb820b){const _0x20808e=a146_0x365f,_0x5422d3=[];if(!_0x5138a4[_0x20808e(0x17c)]?.['activation'])return _0x5422d3[_0x20808e(0x1ff)](createIssue(_0x20808e(0x1fb),_0x3646c6+'.with.activation',_0x20808e(0x1ae),_0x20808e(0x1e8),_0xb820b,_0x3646c6)),_0x5422d3;const _0x519b82=_0x5138a4[_0x20808e(0x17c)][_0x20808e(0x1ce)];return _0xb820b[_0x20808e(0x21c)]&&!_0x519b82['startsWith'](_0x20808e(0x199))&&(!_0xb820b['activationKeys'][_0x20808e(0x1cc)](_0x519b82)&&_0x5422d3['push'](createIssue(_0x20808e(0x1fb),_0x3646c6+_0x20808e(0x1ed),'MISSING_ACTIVATION_DEFINITION',_0x20808e(0x1b4)+_0x519b82+_0x20808e(0x194),_0xb820b))),_0x5422d3;}function validateDecisionPointStep(_0xdb90b,_0x582853,_0x42e630,_0x2ffd26){const _0x29454d=a146_0x365f,_0x4ef376=[];if(!_0xdb90b[_0x29454d(0x17c)]?.[_0x29454d(0x200)]||_0xdb90b['with']['branches']['length']===0x0)return _0x4ef376['push'](createIssue(_0x29454d(0x1fb),_0x582853+'.with.branches',_0x29454d(0x196),_0x29454d(0x172),_0x42e630,_0x582853)),_0x4ef376;for(let _0x21cf99=0x0;_0x21cf99<_0xdb90b[_0x29454d(0x17c)][_0x29454d(0x200)]['length'];_0x21cf99++){const _0x4fbea6=_0xdb90b['with'][_0x29454d(0x200)][_0x21cf99],_0x3210e9=_0x582853+_0x29454d(0x21b)+_0x21cf99+']';_0x4fbea6['segment']&&!_0x4fbea6[_0x29454d(0x225)]&&(_0x42e630[_0x29454d(0x1d5)]?.[_0x29454d(0x177)](_0x4fbea6[_0x29454d(0x1df)]),!_0x4fbea6[_0x29454d(0x1df)][_0x29454d(0x1a0)](_0x29454d(0x199))&&(_0x42e630[_0x29454d(0x179)]&&!_0x42e630[_0x29454d(0x179)][_0x29454d(0x1cc)](_0x4fbea6[_0x29454d(0x1df)])&&_0x4ef376[_0x29454d(0x1ff)](createIssue(_0x29454d(0x1fb),_0x3210e9+_0x29454d(0x1c1),'MISSING_SEGMENT_REFERENCE',_0x29454d(0x1a7)+_0x4fbea6[_0x29454d(0x1df)]+'\x27',_0x42e630))));_0x4fbea6[_0x29454d(0x1b5)]&&_0x42e630[_0x29454d(0x1bd)]&&!_0x42e630[_0x29454d(0x1bd)]['has'](_0x4fbea6[_0x29454d(0x1b5)])&&_0x4ef376[_0x29454d(0x1ff)](createIssue(_0x29454d(0x1fb),_0x3210e9+_0x29454d(0x1f3),_0x29454d(0x181),_0x29454d(0x1a1)+_0x4fbea6[_0x29454d(0x1b5)]+'\x27',_0x42e630));if(_0x4fbea6[_0x29454d(0x1b5)]){const _0x588729=_0x2ffd26['get'](_0x4fbea6[_0x29454d(0x1b5)]);_0x588729?.[_0x29454d(0x1a2)]===_0x29454d(0x1ea)&&_0x4ef376['push'](createIssue(_0x29454d(0x1a3),_0x3210e9+_0x29454d(0x1f3),'BRANCH_DIRECTLY_TO_MERGE',_0x29454d(0x1e9)+_0x4fbea6[_0x29454d(0x1eb)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4fbea6[_0x29454d(0x1b5)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x42e630));}}return _0x4ef376;}function a146_0x5b52(){const _0x284719=['name','Embedded\x20segment\x20\x27','.with.activation','stages[','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','get','variants','\x27\x20has\x20no\x20end\x20step','.next','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','success','End\x20step\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','every','level','.stages','error','goalIsInherited','\x20stages\x20but\x20maximum\x20is\x20','reduce','push','branches','map','BRANCH_DIRECTLY_TO_MERGE','END_STEP_HAS_NEXT_OR_WITH','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','3326139sXjzwj','\x20versions)','segments','10HWVaZP','.steps','entry_criteria','.with.condition.next','Journey\x20has\x20','Journey\x20name\x20is\x20required','.with','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','abs','segments.','timeout','.steps[','steps','.exit_criteria[','\x27\x20has\x20no\x20exit_criteria\x20defined','condition','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','.type','\x27\x20of\x20\x27','.with.branches[','activationKeys','match','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','135224mKKtYB','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','SINGLE_INPUT_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','FEW_STEPS','.rule','excluded','state','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','data','size','timeout\x20of\x20\x27','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','.with.condition.timeout.next','versions','condition\x20of\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','excluded_','INSUFFICIENT_STEPS','.milestone','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','add','JOURNEY_SCHEMA_ERROR','embeddedSegments','keys','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','with','jump','.entry_criteria','665CrgHps','sort','INVALID_NEXT_REFERENCE','UNUSED_EMBEDDED_SEGMENT','.with.target','\x20steps\x20(may\x20be\x20too\x20simple)','exit_criteria','journeys,\x20stages,\x20or\x20versions','MISSING_GOAL','version','MISSING_NAME','Journey\x20has\x20no\x20goal\x20defined','INVALID_JUMP_TARGET','variant\x20\x27','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','journeys','end','.name','.with.variants[','MISSING_SEGMENT_REFERENCE','A/B\x20test\x20variant\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','length','MISSING_CONDITIONS','path','12776424LRBAOF','ref:','Merge\x20step\x20\x27','MERGE_TO_MERGE_CHAIN','stage','7337675GRCOUk','symbol','\x20with\x20latest:\x20true','startsWith','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','type','warning','MISSING_EXIT_CRITERIA','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','MISSING_ENTRY_CRITERIA','includes','.with.condition','stages','rule','document','MISSING_ACTIVATION_REF','\x27\x20(first\x20defined\x20at\x20steps[','goal','ab_test','.with.variants',').\x20Merge\x20is\x20unnecessary.','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','next','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x20(across\x20','milestone','launched','DUPLICATE_LATEST','safeParse','914691lyWNRc','stepNames','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','INVALID_AB_TEST_PERCENTAGES','MISSING_WAIT_PARAMS','.segment','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','wait','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','target','activations','Stage\x20\x27','Journey\x20can\x20have\x20at\x20most\x20one\x20','endsWith','journey\x20entry','message','has','versions[','activation','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20(from:\x20','journey','MISSING_STAGES','36830510FdnwVB','join','referencedSegments','trim','\x27\x20has\x20no\x20steps','branch\x20\x27','4AVFdLe','latest','step\x20\x27','decision_point','source','\x27\x20has\x20only\x20','segment','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','110274wudeYR','CONVERGENCE_WITHOUT_MERGE','set','.with.condition.timeout','values','description','Activation\x20step\x20requires\x20an\x20activation\x20reference','Decision\x20branch\x20\x27','merge'];a146_0x5b52=function(){return _0x284719;};return a146_0x5b52();}function validateAbTestStep(_0xc0bef8,_0x27bb37,_0x43717a,_0x2d9aa9){const _0x1f17ee=a146_0x365f,_0x411cdd=[];if(!_0xc0bef8[_0x1f17ee(0x17c)]?.['variants']||_0xc0bef8[_0x1f17ee(0x17c)][_0x1f17ee(0x1f1)][_0x1f17ee(0x195)]===0x0)return _0x411cdd[_0x1f17ee(0x1ff)](createIssue(_0x1f17ee(0x1fb),_0x27bb37+'.with.variants','MISSING_CONDITIONS',_0x1f17ee(0x222),_0x43717a,_0x27bb37)),_0x411cdd;const _0x2c6257=_0xc0bef8['with'][_0x1f17ee(0x1f1)][_0x1f17ee(0x1fe)]((_0x3a92db,_0x423372)=>_0x3a92db+(_0x423372['percentage']||0x0),0x0);Math[_0x1f17ee(0x210)](_0x2c6257-0x64)>0.01&&_0x411cdd[_0x1f17ee(0x1ff)](createIssue(_0x1f17ee(0x1fb),_0x27bb37+_0x1f17ee(0x1b2),_0x1f17ee(0x1bf),_0x1f17ee(0x1c2)+_0x2c6257+'%)',_0x43717a));for(let _0x402732=0x0;_0x402732<_0xc0bef8[_0x1f17ee(0x17c)]['variants']['length'];_0x402732++){const _0x131dd9=_0xc0bef8[_0x1f17ee(0x17c)][_0x1f17ee(0x1f1)][_0x402732],_0x134222=_0x27bb37+_0x1f17ee(0x191)+_0x402732+']';_0x131dd9[_0x1f17ee(0x1b5)]&&_0x43717a[_0x1f17ee(0x1bd)]&&!_0x43717a[_0x1f17ee(0x1bd)][_0x1f17ee(0x1cc)](_0x131dd9['next'])&&_0x411cdd[_0x1f17ee(0x1ff)](createIssue(_0x1f17ee(0x1fb),_0x134222+_0x1f17ee(0x1f3),_0x1f17ee(0x181),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x131dd9[_0x1f17ee(0x1b5)]+'\x27',_0x43717a));if(_0x131dd9[_0x1f17ee(0x1b5)]){const _0x1f8040=_0x2d9aa9[_0x1f17ee(0x1f0)](_0x131dd9[_0x1f17ee(0x1b5)]);_0x1f8040?.[_0x1f17ee(0x1a2)]==='merge'&&_0x411cdd[_0x1f17ee(0x1ff)](createIssue(_0x1f17ee(0x1a3),_0x134222+_0x1f17ee(0x1f3),_0x1f17ee(0x202),_0x1f17ee(0x193)+_0x131dd9['name']+_0x1f17ee(0x1f7)+_0x131dd9[_0x1f17ee(0x1b5)]+_0x1f17ee(0x1a5),_0x43717a));}}return _0x411cdd;}function validateJumpStep(_0x17b3c7,_0x2607b4,_0x5ef678){const _0x405789=a146_0x365f,_0x47cd19=[];if(!_0x17b3c7['with']?.[_0x405789(0x1c5)])return _0x47cd19[_0x405789(0x1ff)](createIssue(_0x405789(0x1fb),_0x2607b4+_0x405789(0x183),_0x405789(0x18b),'Jump\x20step\x20requires\x20a\x20target',_0x5ef678,_0x2607b4)),_0x47cd19;return(!_0x17b3c7[_0x405789(0x17c)][_0x405789(0x1c5)][_0x405789(0x1d1)]||!_0x17b3c7['with'][_0x405789(0x1c5)][_0x405789(0x19c)])&&_0x47cd19[_0x405789(0x1ff)](createIssue('error',_0x2607b4+_0x405789(0x183),_0x405789(0x18b),_0x405789(0x16e),_0x5ef678)),_0x47cd19;}function buildConvergenceMap(_0xb17cee){const _0x5911a2=a146_0x365f,_0x351558=new Map();function _0x4e53ab(_0x287965,_0x416b6f){const _0x38ca11=a146_0x365f,_0x48c13a=_0x351558[_0x38ca11(0x1f0)](_0x287965)||[];_0x48c13a[_0x38ca11(0x1ff)](_0x416b6f),_0x351558[_0x38ca11(0x1e4)](_0x287965,_0x48c13a);}for(const _0x79bccb of _0xb17cee){_0x79bccb[_0x5911a2(0x1b5)]&&_0x4e53ab(_0x79bccb[_0x5911a2(0x1b5)],{'stepName':_0x79bccb['name'],'description':_0x5911a2(0x1db)+_0x79bccb[_0x5911a2(0x1eb)]+'\x27'});if(_0x79bccb['type']===_0x5911a2(0x1dc)&&_0x79bccb[_0x5911a2(0x17c)]?.[_0x5911a2(0x200)])for(const _0x17fdd3 of _0x79bccb['with'][_0x5911a2(0x200)]){_0x17fdd3[_0x5911a2(0x1b5)]&&_0x4e53ab(_0x17fdd3[_0x5911a2(0x1b5)],{'stepName':_0x79bccb[_0x5911a2(0x1eb)],'description':_0x5911a2(0x1d8)+_0x17fdd3[_0x5911a2(0x1eb)]+_0x5911a2(0x21a)+_0x79bccb['name']+'\x27'});}if(_0x79bccb[_0x5911a2(0x1a2)]==='ab_test'&&_0x79bccb[_0x5911a2(0x17c)]?.[_0x5911a2(0x1f1)])for(const _0x8d6131 of _0x79bccb[_0x5911a2(0x17c)][_0x5911a2(0x1f1)]){_0x8d6131['next']&&_0x4e53ab(_0x8d6131[_0x5911a2(0x1b5)],{'stepName':_0x79bccb['name'],'description':_0x5911a2(0x18c)+_0x8d6131[_0x5911a2(0x1eb)]+'\x27\x20of\x20\x27'+_0x79bccb[_0x5911a2(0x1eb)]+'\x27'});}_0x79bccb[_0x5911a2(0x1a2)]===_0x5911a2(0x1c3)&&_0x79bccb['with']?.[_0x5911a2(0x217)]&&(_0x79bccb[_0x5911a2(0x17c)][_0x5911a2(0x217)][_0x5911a2(0x1b5)]&&_0x4e53ab(_0x79bccb[_0x5911a2(0x17c)][_0x5911a2(0x217)][_0x5911a2(0x1b5)],{'stepName':_0x79bccb['name'],'description':_0x5911a2(0x171)+_0x79bccb[_0x5911a2(0x1eb)]+'\x27'}),_0x79bccb['with'][_0x5911a2(0x217)]['timeout']?.[_0x5911a2(0x1b5)]&&_0x4e53ab(_0x79bccb[_0x5911a2(0x17c)]['condition'][_0x5911a2(0x212)][_0x5911a2(0x1b5)],{'stepName':_0x79bccb['name'],'description':_0x5911a2(0x16d)+_0x79bccb[_0x5911a2(0x1eb)]+'\x27'}));}return _0x351558;}function validateFlowControl(_0xf7ac3d,_0x10032d,_0x3a0225){const _0x311038=a146_0x365f,_0x543424=[],_0x22ded2='stages['+_0x10032d+']',_0x35d407=_0xf7ac3d[_0x311038(0x214)]||[];if(_0x35d407[_0x311038(0x195)]===0x0)return _0x543424;const _0x5c6eb8=new Map();for(const _0x5a3c57 of _0x35d407){_0x5a3c57[_0x311038(0x1eb)]&&_0x5c6eb8[_0x311038(0x1e4)](_0x5a3c57['name'],_0x5a3c57);}const _0x2fe372=buildConvergenceMap(_0x35d407),_0x172390=_0x35d407['some'](_0x48ea16=>_0x48ea16[_0x311038(0x1a2)]===_0x311038(0x18f));!_0x172390&&_0x543424[_0x311038(0x1ff)](createIssue('error',_0x22ded2+_0x311038(0x209),'MISSING_END_STEP',_0x311038(0x1c7)+_0xf7ac3d['name']+_0x311038(0x1f2),_0x3a0225));for(const [_0x22e01c,_0x4e2da2]of _0x2fe372){const _0x49d160=_0x5c6eb8[_0x311038(0x1f0)](_0x22e01c);if(!_0x49d160)continue;if(_0x4e2da2['length']>0x1&&_0x49d160[_0x311038(0x1a2)]!==_0x311038(0x1ea)){const _0x301ed4=_0x4e2da2[_0x311038(0x201)](_0x3331f7=>_0x3331f7[_0x311038(0x1e7)])[_0x311038(0x1d4)](',\x20');_0x543424[_0x311038(0x1ff)](createIssue('error',_0x22ded2+_0x311038(0x209),_0x311038(0x1e3),_0x311038(0x1b6)+_0x22e01c+_0x311038(0x1d0)+_0x301ed4+').\x20Use\x20a\x20merge\x20step.',_0x3a0225));}_0x4e2da2['length']===0x1&&_0x49d160[_0x311038(0x1a2)]===_0x311038(0x1ea)&&_0x543424[_0x311038(0x1ff)](createIssue(_0x311038(0x1a3),_0x22ded2+_0x311038(0x209),_0x311038(0x221),'Merge\x20step\x20\x27'+_0x22e01c+_0x311038(0x21e)+_0x4e2da2[0x0]['description']+_0x311038(0x1b3),_0x3a0225));}for(const _0x208cf7 of _0x35d407){if(_0x208cf7[_0x311038(0x1a2)]===_0x311038(0x1ea)&&_0x208cf7[_0x311038(0x1b5)]){const _0x247145=_0x5c6eb8[_0x311038(0x1f0)](_0x208cf7[_0x311038(0x1b5)]);_0x247145?.['type']===_0x311038(0x1ea)&&_0x543424['push'](createIssue(_0x311038(0x1fb),_0x22ded2+_0x311038(0x209),_0x311038(0x19b),_0x311038(0x19a)+_0x208cf7[_0x311038(0x1eb)]+_0x311038(0x1e1)+_0x208cf7[_0x311038(0x1b5)]+_0x311038(0x220),_0x3a0225));}}return _0x543424;}function validateCriteria(_0x3b01cc,_0x348dd6,_0x461405){const _0x3407ca=a146_0x365f,_0x6fd6c3=[];return _0x3b01cc[_0x3407ca(0x1df)]&&(_0x461405[_0x3407ca(0x1d5)]?.[_0x3407ca(0x177)](_0x3b01cc[_0x3407ca(0x1df)]),!_0x3b01cc[_0x3407ca(0x1df)][_0x3407ca(0x1a0)](_0x3407ca(0x199))&&(_0x461405[_0x3407ca(0x179)]&&!_0x461405[_0x3407ca(0x179)]['has'](_0x3b01cc[_0x3407ca(0x1df)])&&_0x6fd6c3['push'](createIssue('error',_0x348dd6+_0x3407ca(0x1c1),'MISSING_SEGMENT_REFERENCE',_0x3407ca(0x1cf)+_0x3b01cc[_0x3407ca(0x1df)]+'\x27',_0x461405)))),_0x6fd6c3;}function validateEmbeddedSegment(_0x2038b9,_0x1a618a,_0x2fd30d){const _0x5d06f3=a146_0x365f,_0x19a6cd=[];return _0x2038b9[_0x5d06f3(0x1ac)]&&_0x19a6cd[_0x5d06f3(0x1ff)](...validateRuleDef(_0x2038b9[_0x5d06f3(0x1ac)],_0x1a618a+_0x5d06f3(0x224),_0x2fd30d)),_0x19a6cd;}function validateStage(_0x479e88,_0x300f46,_0x2bc28d,_0x11d3c4){const _0x5b5ac3=a146_0x365f,_0x426af5=[],_0x5e2dc4=_0x5b5ac3(0x1ee)+_0x300f46+']',_0x51428a=new Map(),_0xcdd710=new Map();if(_0x479e88['steps']){for(let _0x209472=0x0;_0x209472<_0x479e88[_0x5b5ac3(0x214)]['length'];_0x209472++){const _0x245350=_0x479e88[_0x5b5ac3(0x214)][_0x209472];_0x245350[_0x5b5ac3(0x1eb)]&&_0x51428a[_0x5b5ac3(0x1e4)](_0x245350['name'],_0x245350);}for(let _0x3f7b50=0x0;_0x3f7b50<_0x479e88[_0x5b5ac3(0x214)][_0x5b5ac3(0x195)];_0x3f7b50++){const _0x34ab69=_0x479e88['steps'][_0x3f7b50],_0x3ac466=_0x5e2dc4+_0x5b5ac3(0x213)+_0x3f7b50+']';if(_0x34ab69['name']){if(_0xcdd710[_0x5b5ac3(0x1cc)](_0x34ab69['name'])){const _0x2a3622=_0xcdd710[_0x5b5ac3(0x1f0)](_0x34ab69[_0x5b5ac3(0x1eb)]);_0x426af5['push'](createIssue('error',_0x3ac466+_0x5b5ac3(0x190),'DUPLICATE_STEP_NAME','Duplicate\x20step\x20name\x20\x27'+_0x34ab69[_0x5b5ac3(0x1eb)]+_0x5b5ac3(0x1af)+_0x2a3622+'])',_0x11d3c4));}else _0xcdd710[_0x5b5ac3(0x1e4)](_0x34ab69[_0x5b5ac3(0x1eb)],_0x3f7b50);}_0x426af5[_0x5b5ac3(0x1ff)](...validateStep(_0x34ab69,_0x3ac466,_0x11d3c4,_0x51428a));}}_0x479e88[_0x5b5ac3(0x20a)]&&_0x426af5[_0x5b5ac3(0x1ff)](...validateCriteria(_0x479e88[_0x5b5ac3(0x20a)],_0x5e2dc4+_0x5b5ac3(0x17e),_0x11d3c4));if(_0x479e88['exit_criteria'])for(let _0x31d55f=0x0;_0x31d55f<_0x479e88['exit_criteria'][_0x5b5ac3(0x195)];_0x31d55f++){_0x426af5['push'](...validateCriteria(_0x479e88[_0x5b5ac3(0x185)][_0x31d55f],_0x5e2dc4+_0x5b5ac3(0x215)+_0x31d55f+']',_0x11d3c4));}return _0x479e88[_0x5b5ac3(0x1b8)]&&_0x426af5[_0x5b5ac3(0x1ff)](...validateCriteria(_0x479e88[_0x5b5ac3(0x1b8)],_0x5e2dc4+_0x5b5ac3(0x175),_0x11d3c4)),_0x426af5[_0x5b5ac3(0x1ff)](...validateStageStructure(_0x479e88,_0x300f46,_0x2bc28d,_0x11d3c4)),_0x426af5['push'](...validateFlowControl(_0x479e88,_0x300f46,_0x11d3c4)),_0x426af5;}function validateStagesForVersion(_0xe181af,_0x1c0144,_0x3ef202,_0x500f65,_0x2440f7,_0x23d552,_0x1f3664){const _0x2c24cb=a146_0x365f;if(_0xe181af[_0x2c24cb(0x195)]===0x0){_0x2440f7[_0x2c24cb(0x1ff)]({'level':_0x2c24cb(0x1fb),'path':_0x500f65+_0x2c24cb(0x1ab),'code':_0x2c24cb(0x1d2),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x3ef202[_0x2c24cb(0x1ad)],_0x3ef202[_0x2c24cb(0x1dd)],[_0x2c24cb(0x1ab)])});return;}const _0x5e6a23=new Set();for(const _0xce1b94 of _0xe181af){if(_0xce1b94['steps'])for(const _0x4cda9d of _0xce1b94[_0x2c24cb(0x214)]){_0x4cda9d[_0x2c24cb(0x1eb)]&&_0x5e6a23[_0x2c24cb(0x177)](_0x4cda9d[_0x2c24cb(0x1eb)]);}}const _0x50cdd0={..._0x3ef202,'stepNames':_0x5e6a23},_0x58e15c=validateVersionStructure(_0xe181af,_0x50cdd0);for(const _0x53ac1f of _0x58e15c){const _0x1989df=_0x500f65?{..._0x53ac1f,'path':''+_0x500f65+_0x53ac1f[_0x2c24cb(0x197)]}:_0x53ac1f;if(_0x1989df[_0x2c24cb(0x1f9)]===_0x2c24cb(0x1fb))_0x2440f7[_0x2c24cb(0x1ff)](_0x1989df);else _0x23d552[_0x2c24cb(0x1ff)](_0x1989df);}for(let _0x18a865=0x0;_0x18a865<_0xe181af[_0x2c24cb(0x195)];_0x18a865++){const _0x4b6a06=validateStage(_0xe181af[_0x18a865],_0x18a865,_0xe181af['length'],_0x50cdd0);for(const _0x3180b5 of _0x4b6a06){const _0x38cf69=_0x500f65?{..._0x3180b5,'path':''+_0x500f65+_0x3180b5[_0x2c24cb(0x197)]}:_0x3180b5;if(_0x38cf69[_0x2c24cb(0x1f9)]===_0x2c24cb(0x1fb))_0x2440f7[_0x2c24cb(0x1ff)](_0x38cf69);else _0x23d552[_0x2c24cb(0x1ff)](_0x38cf69);}}if(_0x1c0144['goal']){const _0x395faf=_0x1f3664?.[_0x2c24cb(0x1fc)]?_0x2c24cb(0x1b0):_0x500f65+_0x2c24cb(0x1b0),_0x4d34dd=validateCriteria(_0x1c0144[_0x2c24cb(0x1b0)],_0x395faf,_0x50cdd0);for(const _0x3f11b0 of _0x4d34dd){if(_0x3f11b0[_0x2c24cb(0x1f9)]===_0x2c24cb(0x1fb))_0x2440f7[_0x2c24cb(0x1ff)](_0x3f11b0);else _0x23d552[_0x2c24cb(0x1ff)](_0x3f11b0);}}}function extractVersionIndex(_0x2ebd65){const _0x36f28b=a146_0x365f,_0x43fb72=_0x2ebd65[_0x36f28b(0x21d)](/^journeys\[(\d+)\]\./);return _0x43fb72?_0x43fb72[0x1]:undefined;}function deduplicateAcrossVersions(_0x4b5052){const _0xfe7ffa=a146_0x365f,_0x590b52=new Map();for(let _0x19c5af=0x0;_0x19c5af<_0x4b5052[_0xfe7ffa(0x195)];_0x19c5af++){const _0x19abb2=_0x4b5052[_0x19c5af]['code']+':'+_0x4b5052[_0x19c5af][_0xfe7ffa(0x1cb)],_0x51e2ea=extractVersionIndex(_0x4b5052[_0x19c5af][_0xfe7ffa(0x197)]),_0x3a8699=_0x590b52[_0xfe7ffa(0x1f0)](_0x19abb2);if(_0x3a8699){_0x3a8699['indices'][_0xfe7ffa(0x1ff)](_0x19c5af);if(_0x51e2ea)_0x3a8699['versions'][_0xfe7ffa(0x177)](_0x51e2ea);}else _0x590b52['set'](_0x19abb2,{'indices':[_0x19c5af],'versions':new Set(_0x51e2ea?[_0x51e2ea]:[])});}const _0x2b0c20=new Set();for(const {indices:_0x20fd05,versions:_0x2de311}of _0x590b52[_0xfe7ffa(0x1e6)]()){if(_0x2de311[_0xfe7ffa(0x16c)]<=0x1)continue;const _0x2ff809=_0x4b5052[_0x20fd05[0x0]];_0x2ff809[_0xfe7ffa(0x197)]=_0x2ff809['path']['replace'](/^journeys\[\d+\]\./,''),_0x2ff809[_0xfe7ffa(0x1cb)]=_0x2ff809[_0xfe7ffa(0x1cb)]+_0xfe7ffa(0x1b7)+_0x2de311[_0xfe7ffa(0x16c)]+_0xfe7ffa(0x206);for(let _0x104e4a=0x1;_0x104e4a<_0x20fd05[_0xfe7ffa(0x195)];_0x104e4a++){_0x2b0c20[_0xfe7ffa(0x177)](_0x20fd05[_0x104e4a]);}}const _0x1a018d=[..._0x2b0c20][_0xfe7ffa(0x180)]((_0x4d0cc3,_0x378495)=>_0x378495-_0x4d0cc3);for(const _0x3f1286 of _0x1a018d){_0x4b5052['splice'](_0x3f1286,0x1);}}export function validateJourneyDef(_0x11ab36,_0x4df0a7={},_0x17c083={}){const _0x3b2052=a146_0x365f;if(_0x17c083['skipSchema'])return runJourneySemanticChecks(_0x11ab36,_0x4df0a7);const _0x401447=JourneyDefSchema[_0x3b2052(0x1bb)](_0x11ab36);if(_0x401447[_0x3b2052(0x1f5)])return runJourneySemanticChecks(_0x401447[_0x3b2052(0x16b)],_0x4df0a7);return zodErrorsToJourneyValidationResult(_0x401447[_0x3b2052(0x1fb)],_0x4df0a7);}function a146_0x365f(_0x82ca1f,_0x17ee30){_0x82ca1f=_0x82ca1f-0x16a;const _0x5b52a0=a146_0x5b52();let _0x365f3d=_0x5b52a0[_0x82ca1f];return _0x365f3d;}function zodErrorsToJourneyValidationResult(_0x234f8c,_0xe2fc34){const _0x3377b9=a146_0x365f,_0x133a62=flattenZodIssues(_0x234f8c['issues']),_0x4f5f7d=_0x133a62[_0x3377b9(0x201)](_0x189373=>{const _0x11e022=_0x3377b9,_0x2ba19c=formatZodPath(_0x189373[_0x11e022(0x197)]),_0x254f4f=mapJourneyZodIssueToCode(_0x189373,_0x2ba19c),_0x2b711e=getLocationFromPath(_0xe2fc34[_0x11e022(0x1ad)],_0xe2fc34[_0x11e022(0x1dd)],_0x189373[_0x11e022(0x197)][_0x11e022(0x201)](_0x141632=>typeof _0x141632===_0x11e022(0x19e)?String(_0x141632):_0x141632));return{'level':_0x11e022(0x1fb),'path':_0x2ba19c,'code':_0x254f4f,'message':_0x189373[_0x11e022(0x1cb)],..._0x2b711e&&{'location':_0x2b711e}};});return{'valid':![],'errors':_0x4f5f7d,'warnings':[]};}function mapJourneyZodIssueToCode(_0x18f08c,_0x43a7ff){const _0x214198=a146_0x365f;if(_0x43a7ff==='name')return _0x214198(0x189);if(_0x43a7ff[_0x214198(0x1c9)](_0x214198(0x219))&&_0x43a7ff[_0x214198(0x1a9)](_0x214198(0x214)))return _0x214198(0x178);if(_0x43a7ff==='stages'||_0x43a7ff[_0x214198(0x1c9)](_0x214198(0x1fa)))return'MISSING_STAGES';if(_0x43a7ff===''&&_0x18f08c[_0x214198(0x1cb)][_0x214198(0x1a9)](_0x214198(0x186)))return _0x214198(0x1d2);if(_0x43a7ff['includes'](_0x214198(0x1ce)))return'ACTIVATION_SCHEMA_ERROR';return _0x214198(0x178);}function runJourneySemanticChecks(_0x33f81e,_0x18e904){const _0x51ff7a=a146_0x365f,_0x3a17c9=[],_0x453012=[];(!_0x33f81e[_0x51ff7a(0x1eb)]||_0x33f81e['name'][_0x51ff7a(0x1d6)]()==='')&&_0x3a17c9[_0x51ff7a(0x1ff)]({'level':_0x51ff7a(0x1fb),'path':'name','code':_0x51ff7a(0x189),'message':_0x51ff7a(0x20d),'location':getLocationFromPath(_0x18e904['document'],_0x18e904[_0x51ff7a(0x1dd)],[_0x51ff7a(0x1eb)])});const _0x5670ff=new Set();if(_0x33f81e[_0x51ff7a(0x207)])for(const _0x488f1b of Object['keys'](_0x33f81e['segments'])){_0x5670ff[_0x51ff7a(0x177)](_0x488f1b);}const _0x4f0ec0=new Set();if(_0x33f81e[_0x51ff7a(0x1c6)])for(const _0x6c05d4 of Object[_0x51ff7a(0x17a)](_0x33f81e[_0x51ff7a(0x1c6)])){_0x4f0ec0[_0x51ff7a(0x177)](_0x6c05d4);}const _0x26d8b8=new Set(),_0x2f7c29={..._0x18e904,'embeddedSegments':_0x5670ff,'referencedSegments':_0x26d8b8,'activationKeys':_0x4f0ec0[_0x51ff7a(0x16c)]>0x0?_0x4f0ec0:undefined};if(_0x33f81e[_0x51ff7a(0x207)])for(const [_0x211d85,_0x59a5e2]of Object['entries'](_0x33f81e['segments'])){const _0x146821=validateEmbeddedSegment(_0x59a5e2,'segments.'+_0x211d85,_0x2f7c29);for(const _0x4f525b of _0x146821){if(_0x4f525b[_0x51ff7a(0x1f9)]===_0x51ff7a(0x1fb))_0x3a17c9[_0x51ff7a(0x1ff)](_0x4f525b);else _0x453012[_0x51ff7a(0x1ff)](_0x4f525b);}}const _0x473246=!!_0x33f81e[_0x51ff7a(0x1b0)],_0x19a888=_0x33f81e[_0x51ff7a(0x18e)]?.[_0x51ff7a(0x1f8)](_0x196cf5=>!!_0x196cf5['goal'])??![];!_0x473246&&!_0x19a888&&_0x453012[_0x51ff7a(0x1ff)]({'level':'warning','path':_0x51ff7a(0x1b0),'code':_0x51ff7a(0x187),'message':_0x51ff7a(0x18a),'location':getLocationFromPath(_0x18e904['document'],_0x18e904[_0x51ff7a(0x1dd)],['goal'])});const _0x191778=_0x33f81e['journeys']??_0x33f81e[_0x51ff7a(0x170)];if(_0x191778&&_0x191778['filter'](_0x3b5ba0=>_0x3b5ba0[_0x51ff7a(0x1da)]===!![])['length']>0x1){const _0x147419=_0x33f81e[_0x51ff7a(0x18e)]?'journeys':_0x51ff7a(0x170);_0x3a17c9[_0x51ff7a(0x1ff)]({'level':_0x51ff7a(0x1fb),'path':_0x147419,'code':_0x51ff7a(0x1ba),'message':_0x51ff7a(0x1c8)+(_0x147419===_0x51ff7a(0x18e)?_0x51ff7a(0x1ca):_0x51ff7a(0x188))+_0x51ff7a(0x19f),'location':getLocationFromPath(_0x18e904[_0x51ff7a(0x1ad)],_0x18e904[_0x51ff7a(0x1dd)],[_0x147419])});}if(_0x33f81e[_0x51ff7a(0x18e)]&&_0x33f81e['journeys'][_0x51ff7a(0x195)]>0x0)for(let _0x2921d8=0x0;_0x2921d8<_0x33f81e[_0x51ff7a(0x18e)][_0x51ff7a(0x195)];_0x2921d8++){const _0xa8de74=_0x33f81e[_0x51ff7a(0x18e)][_0x2921d8];if(_0x33f81e['journeys']['length']>0x1&&_0xa8de74[_0x51ff7a(0x226)]===_0x51ff7a(0x1b9))continue;const _0x2ab7e5=_0xa8de74[_0x51ff7a(0x1ab)]||[],_0x5bd347='journeys['+_0x2921d8+'].',_0x41f20e=!!_0xa8de74[_0x51ff7a(0x1b0)],_0x4e285b=_0x41f20e?{..._0x33f81e,'goal':_0xa8de74[_0x51ff7a(0x1b0)]}:_0x33f81e;validateStagesForVersion(_0x2ab7e5,_0x4e285b,_0x2f7c29,_0x5bd347,_0x3a17c9,_0x453012,{'goalIsInherited':!_0x41f20e});}else{if(_0x33f81e[_0x51ff7a(0x170)]&&_0x33f81e[_0x51ff7a(0x170)][_0x51ff7a(0x195)]>0x0)for(let _0x561805=0x0;_0x561805<_0x33f81e['versions'][_0x51ff7a(0x195)];_0x561805++){const _0x1767f4=_0x33f81e[_0x51ff7a(0x170)][_0x561805];if(_0x33f81e[_0x51ff7a(0x170)][_0x51ff7a(0x195)]>0x1&&_0x1767f4[_0x51ff7a(0x226)]==='launched')continue;const _0x5ba481=_0x1767f4[_0x51ff7a(0x1ab)]||[],_0x4330d9=_0x51ff7a(0x1cd)+_0x561805+'].';validateStagesForVersion(_0x5ba481,_0x33f81e,_0x2f7c29,_0x4330d9,_0x3a17c9,_0x453012);}else{const _0x510ca8=_0x33f81e['stages']||[];validateStagesForVersion(_0x510ca8,_0x33f81e,_0x2f7c29,'',_0x3a17c9,_0x453012);}}_0x33f81e[_0x51ff7a(0x18e)]&&_0x33f81e[_0x51ff7a(0x18e)][_0x51ff7a(0x195)]>0x1&&(deduplicateAcrossVersions(_0x3a17c9),deduplicateAcrossVersions(_0x453012));for(const _0x1cc43a of _0x5670ff){!_0x26d8b8['has'](_0x1cc43a)&&!_0x1cc43a['startsWith'](_0x51ff7a(0x173))&&_0x453012['push']({'level':'warning','path':_0x51ff7a(0x211)+_0x1cc43a,'code':_0x51ff7a(0x182),'message':_0x51ff7a(0x1ec)+_0x1cc43a+_0x51ff7a(0x20f),'location':getLocationFromPath(_0x18e904['document'],_0x18e904[_0x51ff7a(0x1dd)],['segments',_0x1cc43a])});}return{'valid':_0x3a17c9[_0x51ff7a(0x195)]===0x0,'errors':_0x3a17c9,'warnings':_0x453012};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x14fec2,_0x270aae){const _0x22d8ed=a147_0x2e82,_0xbf114c=_0x14fec2();while(!![]){try{const _0x6f15e9=-parseInt(_0x22d8ed(0x149))/0x1+parseInt(_0x22d8ed(0x1f0))/0x2+-parseInt(_0x22d8ed(0x1d1))/0x3+parseInt(_0x22d8ed(0x14e))/0x4*(-parseInt(_0x22d8ed(0x1cd))/0x5)+-parseInt(_0x22d8ed(0x15f))/0x6*(parseInt(_0x22d8ed(0x1bd))/0x7)+-parseInt(_0x22d8ed(0x1ba))/0x8+parseInt(_0x22d8ed(0x1ed))/0x9*(parseInt(_0x22d8ed(0x1d2))/0xa);if(_0x6f15e9===_0x270aae)break;else _0xbf114c['push'](_0xbf114c['shift']());}catch(_0x5a0dd9){_0xbf114c['push'](_0xbf114c['shift']());}}}(a147_0x41a6,0xb4e81));import*as a147_0x7e19c1 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(_0x12b4ea){const _0x47dcfa=a147_0x2e82,_0x47eeb1=_0x12b4ea[_0x47dcfa(0x156)]();if(_0x47eeb1===_0x47dcfa(0x191)||_0x47eeb1===_0x47dcfa(0x14b))return'day';if(_0x47eeb1===_0x47dcfa(0x158)||_0x47eeb1==='week')return _0x47dcfa(0x1f2);return _0x12b4ea;}export function journeyResponseToDefSync(_0x116132){const _0x23b178=a147_0x2e82,_0x30df86=_0x116132[_0x23b178(0x170)],_0x569583=_0x30df86[_0x23b178(0x1a9)]||_0x30df86[_0x23b178(0x1e9)],_0x12ddf1={'stages':_0x30df86['journeyStages'][_0x23b178(0x16f)](convertApiStageToYaml),'id':_0x116132['id']};_0x30df86[_0x23b178(0x178)]&&(_0x12ddf1[_0x23b178(0x178)]=convertApiCriteriaToYaml(_0x30df86[_0x23b178(0x178)]));_0x30df86[_0x23b178(0x1e9)]&&_0x30df86[_0x23b178(0x1e9)]!==_0x569583&&(_0x12ddf1[_0x23b178(0x1ae)]=_0x30df86[_0x23b178(0x1e9)]);_0x30df86[_0x23b178(0x16b)]!==undefined&&(_0x12ddf1[_0x23b178(0x1c6)]=_0x30df86[_0x23b178(0x16b)]);_0x30df86[_0x23b178(0x1e4)]&&(_0x12ddf1['state']=_0x30df86[_0x23b178(0x1e4)]===_0x23b178(0x157)?_0x23b178(0x157):_0x23b178(0x174));const _0x3fe882={'type':_0x23b178(0x1c3),'name':_0x569583,'journeys':[_0x12ddf1]};_0x30df86[_0x23b178(0x1e6)]&&(_0x3fe882[_0x23b178(0x1e6)]=_0x30df86[_0x23b178(0x1e6)]);_0x30df86[_0x23b178(0x178)]&&(_0x3fe882['goal']=convertApiCriteriaToYaml(_0x30df86[_0x23b178(0x178)]));if(_0x30df86[_0x23b178(0x1b3)])_0x3fe882[_0x23b178(0x181)]=_0x30df86['reentryMode'];else _0x30df86[_0x23b178(0x15d)]!==undefined&&(_0x3fe882[_0x23b178(0x181)]=_0x30df86[_0x23b178(0x15d)]?_0x23b178(0x1a5):_0x23b178(0x171));return _0x30df86['journeyBundleId']&&(_0x3fe882[_0x23b178(0x1ac)]=_0x30df86['journeyBundleId']),_0x30df86['journeyBundleName']&&(_0x3fe882[_0x23b178(0x1b4)]=_0x30df86[_0x23b178(0x1a9)]),_0x116132[_0x23b178(0x1de)]?.[_0x23b178(0x176)]?.[_0x23b178(0x1f4)]?.['id']&&(_0x3fe882[_0x23b178(0x1a7)]=_0x116132['relationships'][_0x23b178(0x176)][_0x23b178(0x1f4)]['id']),_0x3fe882;}export async function journeyResponseToDef(_0x13ce77,_0x329438){const _0x4ed2a5=a147_0x2e82,_0xc639bf=journeyResponseToDefSync(_0x13ce77);if(!_0x329438)return _0xc639bf;const _0x36a717=new Set();collectSegmentIdsFromJourney(_0xc639bf,_0x36a717);const _0x5e8976=new Set();collectActivationIdsFromJourney(_0xc639bf,_0x5e8976);const _0x3db5f6={},_0x4a35db=new Map();for(const _0x2015f5 of Array[_0x4ed2a5(0x1b0)](_0x36a717)[_0x4ed2a5(0x1af)]()){if(_0x329438[_0x4ed2a5(0x18e)]){const _0x20e594=await _0x329438[_0x4ed2a5(0x18e)](_0x2015f5);if(_0x20e594[_0x4ed2a5(0x17f)]){_0x4a35db[_0x4ed2a5(0x16d)](_0x2015f5,_0x20e594[_0x4ed2a5(0x1e9)]);if(_0x20e594[_0x4ed2a5(0x1ad)]){const _0x212664={..._0x20e594[_0x4ed2a5(0x1ad)],'rule':deepSortObject(_0x20e594[_0x4ed2a5(0x1ad)][_0x4ed2a5(0x1e3)])};_0x3db5f6[_0x20e594[_0x4ed2a5(0x1e9)]]=_0x212664;}}else _0x4a35db['set'](_0x2015f5,makeSegmentRef(_0x20e594[_0x4ed2a5(0x1e9)]));}else{if(_0x329438[_0x4ed2a5(0x152)]){const _0x118f5a=await _0x329438[_0x4ed2a5(0x152)](_0x2015f5);_0x4a35db[_0x4ed2a5(0x16d)](_0x2015f5,_0x118f5a);}}}const _0x1b67a2={},_0x27d5b4=new Map();for(const _0x36df14 of Array[_0x4ed2a5(0x1b0)](_0x5e8976)['sort']()){if(_0x329438[_0x4ed2a5(0x15b)]){const _0x1567f4=await _0x329438[_0x4ed2a5(0x15b)](_0x36df14);_0x1567f4[_0x4ed2a5(0x17f)]?(_0x27d5b4['set'](_0x36df14,_0x1567f4['name']),_0x1567f4[_0x4ed2a5(0x1ad)]&&(_0x1b67a2[_0x1567f4[_0x4ed2a5(0x1e9)]]=_0x1567f4[_0x4ed2a5(0x1ad)])):_0x27d5b4[_0x4ed2a5(0x16d)](_0x36df14,makeSegmentRef(_0x1567f4['name']));}else{if(_0x329438[_0x4ed2a5(0x168)]){const _0x329985=await _0x329438[_0x4ed2a5(0x168)](_0x36df14);_0x27d5b4[_0x4ed2a5(0x16d)](_0x36df14,_0x329985);}}}_0x4a35db[_0x4ed2a5(0x19f)]>0x0&&replaceSegmentIdsInJourney(_0xc639bf,_0x4a35db);_0x27d5b4[_0x4ed2a5(0x19f)]>0x0&&replaceActivationIdsInJourney(_0xc639bf,_0x27d5b4);if(_0x329438[_0x4ed2a5(0x19d)]){const _0x13f7d3=[];collectJumpTargetsFromJourney(_0xc639bf,_0x13f7d3);if(_0x13f7d3[_0x4ed2a5(0x161)]>0x0){const _0x382734=new Map();for(const _0x284fda of _0x13f7d3){try{const _0x16b2f0=await _0x329438[_0x4ed2a5(0x19d)](_0x284fda[_0x4ed2a5(0x1ef)],_0x284fda['stageId']);_0x382734['set'](_0x284fda[_0x4ed2a5(0x1ef)]+':'+_0x284fda[_0x4ed2a5(0x192)],_0x16b2f0);}catch{}}_0x382734[_0x4ed2a5(0x19f)]>0x0&&replaceJumpTargetsInJourney(_0xc639bf,_0x382734);}}return Object['keys'](_0x3db5f6)['length']>0x0&&(_0xc639bf['segments']=_0x3db5f6),Object[_0x4ed2a5(0x169)](_0x1b67a2)[_0x4ed2a5(0x161)]>0x0&&(_0xc639bf[_0x4ed2a5(0x19a)]=_0x1b67a2),_0xc639bf;}function a147_0x41a6(){const _0x177f07=['ab_test','\x20\x20\x20\x20conditions:\x0a','resolveJumpTarget','Condition','size','Merge','get','with','excludedPath','activations:','reentry_always','unit','folder_id','reentry:','journeyBundleName','end','exitCriteria','bundle_id','definition','version','sort','from','journeys','decision_point','reentryMode','bundle_name','merge','waitCondition','waitUntilDate','push','WaitStep','5807016FmsXRr','isArray','schedule','133xUbDXU','replace','null','\x20\x20\x20\x20type:\x20And\x0a','segments:','exitCriterias','journey','Send\x20Notification','ref','version_number','notification','(missing)','folder','versions:','startsWith','wait_until','156435RlfJyO','segment','days_of_week','wait','3529587zkAGIk','10slOkqD','Duration','rootStep','segments','all','condition','add','trim','ABTest','journeyStageId','AbTest','shift','relationships','duration','stringify','stageName','journeyBundleId','rule','state','conditionSegmentId','description','waitStepUnit','columns','name','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','behavior','latest','47692629GorPmZ','entry_criteria','journeyId','1323912ftpPEq','moveAfter','week','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','data','journeyActivationStepId','test','segmentId','daysOfWeek','resolveJourneyId','has','exit_criteria','resolveSegmentId','\x20\x20rule:\x0a','entries','connector_config','steps','resolveEmbeddedSegmentId','customized_split','594543PYLSaU','stages','day','versions','percentage','164psbiGa','waitStepType','Expected\x20format:\x0a','End','resolveSegmentName','Jump','variants','Journey\x20description','toLowerCase','launched','weeks','waitStep','DecisionPoint','resolveActivation','activation_template_id','allowReentry','timedOutPath','454872kCURzt','journeyName','length','type','conditionTimeoutUnit','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','First\x20stage\x20of\x20the\x20journey','branches','target','resolveActivationName','keys','Stage\x20Complete','versionNumber','journeys:','set','goal-segment','map','attributes','no_reentry','stages:','object','draft','all_columns','parentFolder','uuid','goal','customizedSplit','root_step','\x27:\x20','includes','milestone','excluded','isJourneyLocal','resolveStageId','reentry','Wait\x201\x20Day','randomUUID','entryCriteria','next','find','DaysOfTheWeek','resolveActivationId','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','stage','filter','embedded','conditionTimeoutDuration','resolveSegment','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','jump','days','stageId','conditions','unique_id','timeout','Variant','JOURNEY_SYNTAX_ERROR','activation','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','activations'];a147_0x41a6=function(){return _0x177f07;};return a147_0x41a6();}function collectSegmentIdsFromJourney(_0x61ee6,_0xdc3e1){const _0x160516=a147_0x2e82;_0x61ee6[_0x160516(0x178)]?.[_0x160516(0x1ce)]&&_0xdc3e1[_0x160516(0x1d8)](_0x61ee6['goal'][_0x160516(0x1ce)]);const _0x263358=_0x40e8cc=>{const _0x29db13=_0x160516;for(const _0x8935ae of _0x40e8cc){_0x8935ae[_0x29db13(0x1ee)]?.[_0x29db13(0x1ce)]&&_0xdc3e1[_0x29db13(0x1d8)](_0x8935ae['entry_criteria'][_0x29db13(0x1ce)]);if(_0x8935ae[_0x29db13(0x1fb)])for(const _0x14156e of _0x8935ae[_0x29db13(0x1fb)]){_0x14156e[_0x29db13(0x1ce)]&&_0xdc3e1[_0x29db13(0x1d8)](_0x14156e[_0x29db13(0x1ce)]);}_0x8935ae[_0x29db13(0x17d)]?.[_0x29db13(0x1ce)]&&_0xdc3e1['add'](_0x8935ae[_0x29db13(0x17d)][_0x29db13(0x1ce)]);if(_0x8935ae[_0x29db13(0x200)])for(const _0x1d0793 of _0x8935ae['steps']){if(_0x1d0793[_0x29db13(0x162)]===_0x29db13(0x1b2)){const _0x4fbbab=_0x1d0793;for(const _0x3b35a6 of _0x4fbbab[_0x29db13(0x1a2)][_0x29db13(0x166)]){_0x3b35a6[_0x29db13(0x1ce)]&&_0xdc3e1['add'](_0x3b35a6[_0x29db13(0x1ce)]);}}else{if(_0x1d0793[_0x29db13(0x162)]==='wait'){const _0x291ff1=_0x1d0793;_0x291ff1[_0x29db13(0x1a2)][_0x29db13(0x1d7)]?.[_0x29db13(0x1ce)]&&_0xdc3e1[_0x29db13(0x1d8)](_0x291ff1[_0x29db13(0x1a2)][_0x29db13(0x1d7)][_0x29db13(0x1ce)]);}}}}};if(_0x61ee6[_0x160516(0x1b1)])for(const _0x46b2e5 of _0x61ee6[_0x160516(0x1b1)]){_0x46b2e5['goal']?.[_0x160516(0x1ce)]&&_0xdc3e1['add'](_0x46b2e5[_0x160516(0x178)][_0x160516(0x1ce)]),_0x263358(_0x46b2e5[_0x160516(0x14a)]);}_0x61ee6[_0x160516(0x14a)]&&_0x263358(_0x61ee6[_0x160516(0x14a)]);if(_0x61ee6[_0x160516(0x14c)])for(const _0x494d83 of _0x61ee6[_0x160516(0x14c)]){_0x263358(_0x494d83[_0x160516(0x14a)]);}}function replaceSegmentIdsInJourney(_0x442e17,_0x3cbc7f){const _0x2b427b=a147_0x2e82,_0xe3f97b=_0x2c0d18=>_0x3cbc7f[_0x2b427b(0x1a1)](_0x2c0d18)||_0x2c0d18;_0x442e17[_0x2b427b(0x178)]?.[_0x2b427b(0x1ce)]&&(_0x442e17[_0x2b427b(0x178)][_0x2b427b(0x1ce)]=_0xe3f97b(_0x442e17[_0x2b427b(0x178)][_0x2b427b(0x1ce)]));const _0x377ad5=_0x7debd0=>{const _0x373be8=_0x2b427b;for(const _0x7e0baf of _0x7debd0){_0x7e0baf[_0x373be8(0x1ee)]?.[_0x373be8(0x1ce)]&&(_0x7e0baf[_0x373be8(0x1ee)][_0x373be8(0x1ce)]=_0xe3f97b(_0x7e0baf[_0x373be8(0x1ee)][_0x373be8(0x1ce)]));if(_0x7e0baf[_0x373be8(0x1fb)])for(const _0x527b8c of _0x7e0baf[_0x373be8(0x1fb)]){_0x527b8c[_0x373be8(0x1ce)]&&(_0x527b8c['segment']=_0xe3f97b(_0x527b8c[_0x373be8(0x1ce)]));}_0x7e0baf[_0x373be8(0x17d)]?.[_0x373be8(0x1ce)]&&(_0x7e0baf[_0x373be8(0x17d)][_0x373be8(0x1ce)]=_0xe3f97b(_0x7e0baf['milestone'][_0x373be8(0x1ce)]));if(_0x7e0baf[_0x373be8(0x200)])for(const _0x54ba54 of _0x7e0baf[_0x373be8(0x200)]){if(_0x54ba54[_0x373be8(0x162)]==='decision_point'){const _0x18c10a=_0x54ba54;for(const _0x36ff73 of _0x18c10a[_0x373be8(0x1a2)]['branches']){_0x36ff73['segment']&&(_0x36ff73['segment']=_0xe3f97b(_0x36ff73[_0x373be8(0x1ce)]));}}else{if(_0x54ba54[_0x373be8(0x162)]===_0x373be8(0x1d0)){const _0x20081a=_0x54ba54;_0x20081a['with'][_0x373be8(0x1d7)]?.[_0x373be8(0x1ce)]&&(_0x20081a[_0x373be8(0x1a2)][_0x373be8(0x1d7)][_0x373be8(0x1ce)]=_0xe3f97b(_0x20081a[_0x373be8(0x1a2)]['condition']['segment']));}}}}};if(_0x442e17[_0x2b427b(0x1b1)])for(const _0x5224a7 of _0x442e17[_0x2b427b(0x1b1)]){_0x5224a7[_0x2b427b(0x178)]?.['segment']&&(_0x5224a7[_0x2b427b(0x178)][_0x2b427b(0x1ce)]=_0xe3f97b(_0x5224a7['goal']['segment'])),_0x377ad5(_0x5224a7[_0x2b427b(0x14a)]);}_0x442e17[_0x2b427b(0x14a)]&&_0x377ad5(_0x442e17[_0x2b427b(0x14a)]);if(_0x442e17[_0x2b427b(0x14c)])for(const _0x59df27 of _0x442e17[_0x2b427b(0x14c)]){_0x377ad5(_0x59df27[_0x2b427b(0x14a)]);}}function collectActivationIdsFromJourney(_0x7e763e,_0x219240){const _0x143654=a147_0x2e82,_0x55e888=_0xd415f6=>{const _0x1654ac=a147_0x2e82;for(const _0x219ad4 of _0xd415f6){if(_0x219ad4['steps'])for(const _0x4b02ad of _0x219ad4[_0x1654ac(0x200)]){if(_0x4b02ad[_0x1654ac(0x162)]===_0x1654ac(0x198)){const _0x40e6bd=_0x4b02ad;_0x40e6bd[_0x1654ac(0x1a2)][_0x1654ac(0x198)]&&/^\d+$/[_0x1654ac(0x1f6)](_0x40e6bd[_0x1654ac(0x1a2)]['activation'])&&_0x219240['add'](_0x40e6bd[_0x1654ac(0x1a2)]['activation']);}}}};if(_0x7e763e[_0x143654(0x1b1)])for(const _0x2ccf38 of _0x7e763e[_0x143654(0x1b1)]){_0x55e888(_0x2ccf38[_0x143654(0x14a)]);}_0x7e763e[_0x143654(0x14a)]&&_0x55e888(_0x7e763e['stages']);if(_0x7e763e[_0x143654(0x14c)])for(const _0x398c58 of _0x7e763e[_0x143654(0x14c)]){_0x55e888(_0x398c58[_0x143654(0x14a)]);}}function replaceActivationIdsInJourney(_0x1dec75,_0x18286f){const _0x3a2ea8=a147_0x2e82,_0x53aac5=_0x2dac4a=>_0x18286f[_0x3a2ea8(0x1a1)](_0x2dac4a)||_0x2dac4a,_0x2ae31e=_0x123485=>{const _0x1b56c4=_0x3a2ea8;for(const _0x214d97 of _0x123485){if(_0x214d97[_0x1b56c4(0x200)])for(const _0x45b355 of _0x214d97[_0x1b56c4(0x200)]){if(_0x45b355[_0x1b56c4(0x162)]===_0x1b56c4(0x198)){const _0xc91bae=_0x45b355;_0xc91bae[_0x1b56c4(0x1a2)][_0x1b56c4(0x198)]&&(_0xc91bae[_0x1b56c4(0x1a2)][_0x1b56c4(0x198)]=_0x53aac5(_0xc91bae[_0x1b56c4(0x1a2)][_0x1b56c4(0x198)]));}}}};if(_0x1dec75[_0x3a2ea8(0x1b1)])for(const _0x4104a4 of _0x1dec75[_0x3a2ea8(0x1b1)]){_0x2ae31e(_0x4104a4[_0x3a2ea8(0x14a)]);}_0x1dec75[_0x3a2ea8(0x14a)]&&_0x2ae31e(_0x1dec75['stages']);if(_0x1dec75[_0x3a2ea8(0x14c)])for(const _0x56a392 of _0x1dec75['versions']){_0x2ae31e(_0x56a392[_0x3a2ea8(0x14a)]);}}function collectJumpTargetsFromJourney(_0x3b58f5,_0x4325d7){const _0x486da5=a147_0x2e82,_0xef251f=new Set(),_0x36fe4c=_0x4db97d=>{const _0x56595e=a147_0x2e82;for(const _0x41d237 of _0x4db97d){if(_0x41d237[_0x56595e(0x200)])for(const _0x59c064 of _0x41d237[_0x56595e(0x200)]){if(_0x59c064[_0x56595e(0x162)]===_0x56595e(0x190)){const _0x403808=_0x59c064,_0x5d5498=_0x403808[_0x56595e(0x1a2)][_0x56595e(0x167)];if(_0x5d5498[_0x56595e(0x1c3)]&&_0x5d5498[_0x56595e(0x18a)]&&/^\d+$/[_0x56595e(0x1f6)](_0x5d5498[_0x56595e(0x1c3)])&&/^\d+$/[_0x56595e(0x1f6)](_0x5d5498['stage'])){const _0xd936b4=_0x5d5498['journey']+':'+_0x5d5498[_0x56595e(0x18a)];!_0xef251f[_0x56595e(0x1fa)](_0xd936b4)&&(_0xef251f[_0x56595e(0x1d8)](_0xd936b4),_0x4325d7[_0x56595e(0x1b8)]({'journeyId':_0x5d5498[_0x56595e(0x1c3)],'stageId':_0x5d5498['stage']}));}}}}};if(_0x3b58f5[_0x486da5(0x1b1)])for(const _0x129f46 of _0x3b58f5['journeys']){_0x36fe4c(_0x129f46['stages']);}_0x3b58f5[_0x486da5(0x14a)]&&_0x36fe4c(_0x3b58f5[_0x486da5(0x14a)]);if(_0x3b58f5[_0x486da5(0x14c)])for(const _0x58d6fc of _0x3b58f5[_0x486da5(0x14c)]){_0x36fe4c(_0x58d6fc[_0x486da5(0x14a)]);}}function replaceJumpTargetsInJourney(_0x34a3b4,_0x4ed44c){const _0x1cce03=a147_0x2e82,_0x9db957=_0x44e607=>{const _0x281dad=a147_0x2e82;for(const _0x2db755 of _0x44e607){if(_0x2db755[_0x281dad(0x200)])for(const _0x655c2c of _0x2db755['steps']){if(_0x655c2c[_0x281dad(0x162)]===_0x281dad(0x190)){const _0x458f30=_0x655c2c,_0x5df188=_0x458f30[_0x281dad(0x1a2)][_0x281dad(0x167)],_0xce9f35=_0x5df188['journey']+':'+_0x5df188[_0x281dad(0x18a)],_0x5c08a9=_0x4ed44c['get'](_0xce9f35);_0x5c08a9&&(_0x5df188[_0x281dad(0x1c3)]=_0x5c08a9[_0x281dad(0x160)],_0x5df188['stage']=_0x5c08a9[_0x281dad(0x1e1)]);}}}};if(_0x34a3b4[_0x1cce03(0x1b1)])for(const _0x3ad61f of _0x34a3b4[_0x1cce03(0x1b1)]){_0x9db957(_0x3ad61f[_0x1cce03(0x14a)]);}_0x34a3b4[_0x1cce03(0x14a)]&&_0x9db957(_0x34a3b4[_0x1cce03(0x14a)]);if(_0x34a3b4['versions'])for(const _0x5a4cf8 of _0x34a3b4[_0x1cce03(0x14c)]){_0x9db957(_0x5a4cf8[_0x1cce03(0x14a)]);}}function generateReadableStepName(_0x2dd21b,_0xb03fb6){const _0x2a009a=a147_0x2e82;if(_0x2dd21b[_0x2a009a(0x1e9)]&&_0x2dd21b[_0x2a009a(0x1e9)]!==_0x2dd21b['type']){const _0x5cfbcc=_0x2dd21b[_0x2a009a(0x1e9)][_0x2a009a(0x1d9)]();if(_0x5cfbcc&&/[a-z0-9\p{L}]/iu[_0x2a009a(0x1f6)](_0x5cfbcc))return _0x5cfbcc;}const _0x51445f=_0x2dd21b[_0x2a009a(0x162)]['toLowerCase']()[_0x2a009a(0x1be)](/step$/i,'');return _0x51445f+'_'+(_0xb03fb6+0x1);}function getStepNextRefs(_0x77490c){const _0x25269b=a147_0x2e82,_0x399767=[];if(_0x77490c[_0x25269b(0x185)])_0x399767['push'](_0x77490c['next']);if(_0x77490c[_0x25269b(0x166)])for(const _0x266491 of _0x77490c['branches']){if(_0x266491['next'])_0x399767[_0x25269b(0x1b8)](_0x266491['next']);}if(_0x77490c['variants'])for(const _0x577ab4 of _0x77490c['variants']){if(_0x577ab4[_0x25269b(0x185)])_0x399767[_0x25269b(0x1b8)](_0x577ab4[_0x25269b(0x185)]);}if(_0x77490c[_0x25269b(0x193)])for(const _0x5f2bc2 of _0x77490c[_0x25269b(0x193)]){if(_0x5f2bc2['next'])_0x399767['push'](_0x5f2bc2[_0x25269b(0x185)]);}return _0x399767;}function parseJumpTargetDisplayName(_0x2ecbcf){const _0x2d214a=a147_0x2e82,_0x13de0d=_0x2ecbcf['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x13de0d)return undefined;const _0x4f2ec7=_0x13de0d[0x1][_0x2d214a(0x1d9)](),_0x3fd422=_0x13de0d[0x2]['trim']();if(!_0x4f2ec7||!_0x3fd422)return undefined;return{'stageName':_0x4f2ec7,'journeyName':_0x3fd422};}function orderStepsFromRoot(_0x3edf9d,_0x5d6fba){const _0x19b7ef=a147_0x2e82,_0x1c8cae=Object[_0x19b7ef(0x1fe)](_0x3edf9d);if(_0x1c8cae['length']===0x0)return[];const _0x1411fc=new Set(_0x1c8cae[_0x19b7ef(0x16f)](([_0x38ebae])=>_0x38ebae)),_0x325fc2=new Set();for(const [,_0x52d162]of _0x1c8cae){for(const _0x1f5601 of getStepNextRefs(_0x52d162)){if(_0x1411fc['has'](_0x1f5601))_0x325fc2[_0x19b7ef(0x1d8)](_0x1f5601);}}let _0x3c490c=_0x5d6fba&&_0x1411fc[_0x19b7ef(0x1fa)](_0x5d6fba)?_0x5d6fba:undefined;if(!_0x3c490c){const _0x36ab31=_0x1c8cae[_0x19b7ef(0x18b)](([_0x17d83c])=>!_0x325fc2[_0x19b7ef(0x1fa)](_0x17d83c));_0x36ab31[_0x19b7ef(0x161)]>0x0?_0x3c490c=_0x36ab31[0x0][0x0]:_0x3c490c=_0x1c8cae[0x0][0x0];}const _0x1631b0=[],_0x2cfed6=new Set(),_0x2664d3=[_0x3c490c];while(_0x2664d3[_0x19b7ef(0x161)]>0x0){const _0x288573=_0x2664d3[_0x19b7ef(0x1dd)]();if(_0x2cfed6['has'](_0x288573))continue;_0x2cfed6[_0x19b7ef(0x1d8)](_0x288573);const _0x3d6fd2=_0x3edf9d[_0x288573];if(!_0x3d6fd2)continue;_0x1631b0[_0x19b7ef(0x1b8)]({'uuid':_0x288573,'step':_0x3d6fd2});for(const _0x35ed53 of getStepNextRefs(_0x3d6fd2)){_0x1411fc['has'](_0x35ed53)&&!_0x2cfed6['has'](_0x35ed53)&&_0x2664d3[_0x19b7ef(0x1b8)](_0x35ed53);}}for(const [_0x3840dd,_0x45980d]of _0x1c8cae){!_0x2cfed6[_0x19b7ef(0x1fa)](_0x3840dd)&&_0x1631b0[_0x19b7ef(0x1b8)]({'uuid':_0x3840dd,'step':_0x45980d});}return _0x1631b0;}function resolveStepReferences(_0x5d860e,_0x4bb887,_0x1db839,_0x2005ef){const _0x4ad42b=a147_0x2e82;if(_0x5d860e['type']!==_0x4ad42b(0x1aa)){_0x5d860e[_0x4ad42b(0x185)]&&_0x2005ef['has'](_0x5d860e['next'])&&(_0x5d860e[_0x4ad42b(0x185)]=_0x2005ef[_0x4ad42b(0x1a1)](_0x5d860e[_0x4ad42b(0x185)]));const _0x507d84=_0x4bb887+0x1;if(_0x507d84<_0x1db839['length']){const _0x35d961=_0x2005ef['get'](_0x1db839[_0x507d84][_0x4ad42b(0x177)]);_0x5d860e[_0x4ad42b(0x185)]===_0x35d961&&delete _0x5d860e[_0x4ad42b(0x185)];}}if(_0x5d860e[_0x4ad42b(0x162)]===_0x4ad42b(0x1b2))for(const _0x13ff82 of _0x5d860e['with'][_0x4ad42b(0x166)]){_0x13ff82[_0x4ad42b(0x185)]&&_0x2005ef[_0x4ad42b(0x1fa)](_0x13ff82[_0x4ad42b(0x185)])&&(_0x13ff82['next']=_0x2005ef['get'](_0x13ff82[_0x4ad42b(0x185)]));}if(_0x5d860e[_0x4ad42b(0x162)]===_0x4ad42b(0x19b))for(const _0xbd4482 of _0x5d860e[_0x4ad42b(0x1a2)][_0x4ad42b(0x154)]){_0xbd4482[_0x4ad42b(0x185)]&&_0x2005ef['has'](_0xbd4482[_0x4ad42b(0x185)])&&(_0xbd4482[_0x4ad42b(0x185)]=_0x2005ef[_0x4ad42b(0x1a1)](_0xbd4482[_0x4ad42b(0x185)]));}if(_0x5d860e['type']==='wait'&&_0x5d860e['with'][_0x4ad42b(0x1d7)]){const _0x2e762c=_0x5d860e[_0x4ad42b(0x1a2)][_0x4ad42b(0x1d7)];_0x2e762c[_0x4ad42b(0x185)]&&_0x2005ef[_0x4ad42b(0x1fa)](_0x2e762c[_0x4ad42b(0x185)])&&(_0x2e762c[_0x4ad42b(0x185)]=_0x2005ef[_0x4ad42b(0x1a1)](_0x2e762c[_0x4ad42b(0x185)])),_0x2e762c[_0x4ad42b(0x195)]?.['next']&&_0x2005ef[_0x4ad42b(0x1fa)](_0x2e762c[_0x4ad42b(0x195)][_0x4ad42b(0x185)])&&(_0x2e762c[_0x4ad42b(0x195)][_0x4ad42b(0x185)]=_0x2005ef[_0x4ad42b(0x1a1)](_0x2e762c[_0x4ad42b(0x195)][_0x4ad42b(0x185)]));}}function convertApiStageToYaml(_0x46f093){const _0x330770=a147_0x2e82,_0x22238a={'name':_0x46f093[_0x330770(0x1e9)]};_0x46f093['id']&&(_0x22238a['id']=_0x46f093['id']);_0x46f093[_0x330770(0x1e6)]&&(_0x22238a[_0x330770(0x1e6)]=_0x46f093[_0x330770(0x1e6)]);_0x46f093[_0x330770(0x184)]&&(_0x22238a[_0x330770(0x1ee)]=convertApiCriteriaToYaml(_0x46f093[_0x330770(0x184)]));_0x46f093[_0x330770(0x1c2)]&&_0x46f093[_0x330770(0x1c2)]['length']>0x0&&(_0x22238a['exit_criteria']=_0x46f093['exitCriterias'][_0x330770(0x16f)](convertApiCriteriaToYaml));_0x46f093[_0x330770(0x17d)]&&(_0x22238a[_0x330770(0x17d)]=convertApiCriteriaToYaml(_0x46f093[_0x330770(0x17d)]));if(_0x46f093['steps']&&Object[_0x330770(0x169)](_0x46f093['steps'])[_0x330770(0x161)]>0x0){const _0x1aaf43=orderStepsFromRoot(_0x46f093[_0x330770(0x200)],_0x46f093[_0x330770(0x1d4)]),_0x1186c7=new Map(),_0x4e5166=new Set();for(let _0x2d284c=0x0;_0x2d284c<_0x1aaf43[_0x330770(0x161)];_0x2d284c++){const {uuid:_0x212b2a,step:_0x3984de}=_0x1aaf43[_0x2d284c];let _0xb83698=generateReadableStepName(_0x3984de,_0x2d284c),_0x40a5d4=_0xb83698,_0x49c38e=0x2;while(_0x4e5166[_0x330770(0x1fa)](_0x40a5d4)){_0x40a5d4=_0xb83698+'_'+_0x49c38e,_0x49c38e++;}_0x4e5166['add'](_0x40a5d4),_0x1186c7[_0x330770(0x16d)](_0x212b2a,_0x40a5d4);}_0x22238a[_0x330770(0x200)]=_0x1aaf43[_0x330770(0x16f)](({uuid:_0x437d71,step:_0x216c4b},_0x42848f)=>{const _0x1b9627=_0x330770,_0x47b27b=convertApiStepToYaml(_0x216c4b,_0x1186c7[_0x1b9627(0x1a1)](_0x437d71));return resolveStepReferences(_0x47b27b,_0x42848f,_0x1aaf43,_0x1186c7),_0x47b27b;});}return _0x22238a;}function convertApiCriteriaToYaml(_0x26e24f){const _0xd46ccc=a147_0x2e82,_0x48a0ef={'name':_0x26e24f[_0xd46ccc(0x1e9)],'segment':_0x26e24f[_0xd46ccc(0x1f7)]};_0x26e24f[_0xd46ccc(0x1e6)]&&(_0x48a0ef[_0xd46ccc(0x1e6)]=_0x26e24f[_0xd46ccc(0x1e6)]);if(_0x26e24f['target']){let _0x2e7ecf=_0x26e24f['target'][_0xd46ccc(0x1ef)],_0x22837e=_0x26e24f[_0xd46ccc(0x167)][_0xd46ccc(0x1db)];if(_0x26e24f[_0xd46ccc(0x167)][_0xd46ccc(0x160)]){const _0x23fe39=parseJumpTargetDisplayName(_0x26e24f[_0xd46ccc(0x167)][_0xd46ccc(0x160)]);_0x23fe39&&(_0x22837e=_0x23fe39['stageName'],_0x2e7ecf=_0x23fe39['journeyName']);}_0x48a0ef[_0xd46ccc(0x167)]={'journey':_0x2e7ecf,'stage':_0x22837e},_0x26e24f[_0xd46ccc(0x167)][_0xd46ccc(0x1e2)]&&(_0x48a0ef[_0xd46ccc(0x167)][_0xd46ccc(0x1ac)]=_0x26e24f[_0xd46ccc(0x167)]['journeyBundleId']);}return _0x48a0ef;}function convertApiStepToYaml(_0x201a30,_0x52e41f){const _0x300be8=a147_0x2e82;switch(_0x201a30['type']){case _0x300be8(0x1b9):{const _0x37b924={};if(_0x201a30[_0x300be8(0x14f)]==='Duration'&&_0x201a30[_0x300be8(0x159)]!==undefined)_0x37b924[_0x300be8(0x1df)]=_0x201a30[_0x300be8(0x159)],_0x37b924[_0x300be8(0x1a6)]=_0x201a30[_0x300be8(0x1e7)];else{if(_0x201a30[_0x300be8(0x14f)]==='Date'&&_0x201a30['waitUntilDate'])_0x37b924['wait_until']=_0x201a30[_0x300be8(0x1b7)];else{if(_0x201a30[_0x300be8(0x14f)]==='DaysOfTheWeek'&&_0x201a30[_0x300be8(0x1f8)])_0x37b924[_0x300be8(0x1cf)]=_0x201a30[_0x300be8(0x1f8)];else{if(_0x201a30[_0x300be8(0x14f)]===_0x300be8(0x19e)){if(_0x201a30[_0x300be8(0x193)]&&_0x201a30[_0x300be8(0x193)][_0x300be8(0x161)]>0x0){const _0x51251e=_0x201a30[_0x300be8(0x193)][_0x300be8(0x186)](_0x453cf6=>!_0x453cf6[_0x300be8(0x15e)]),_0x21bd55=_0x201a30[_0x300be8(0x193)][_0x300be8(0x186)](_0x554928=>_0x554928[_0x300be8(0x15e)]);_0x51251e?.['segmentId']&&(_0x37b924[_0x300be8(0x1d7)]={'segment':_0x51251e[_0x300be8(0x1f7)],..._0x51251e[_0x300be8(0x185)]?{'next':_0x51251e[_0x300be8(0x185)]}:{}},_0x21bd55&&_0x21bd55[_0x300be8(0x1f1)]!==undefined&&_0x21bd55[_0x300be8(0x1a6)]&&(_0x37b924['condition'][_0x300be8(0x195)]={'duration':_0x21bd55[_0x300be8(0x1f1)],'unit':_0x21bd55[_0x300be8(0x1a6)],..._0x21bd55[_0x300be8(0x185)]?{'next':_0x21bd55[_0x300be8(0x185)]}:{}}));}else _0x201a30[_0x300be8(0x1e5)]&&(_0x37b924[_0x300be8(0x1d7)]={'segment':_0x201a30['conditionSegmentId']},_0x201a30[_0x300be8(0x18d)]!==undefined&&_0x201a30[_0x300be8(0x163)]&&(_0x37b924[_0x300be8(0x1d7)]['timeout']={'duration':_0x201a30[_0x300be8(0x18d)],'unit':_0x201a30[_0x300be8(0x163)]}));}}}}const _0x2a7243={'type':'wait','name':_0x52e41f,..._0x201a30[_0x300be8(0x185)]?{'next':_0x201a30[_0x300be8(0x185)]}:{},'with':_0x37b924};return _0x2a7243;}case'Activation':{const _0x32b075={'type':_0x300be8(0x198),'name':_0x52e41f,..._0x201a30['next']?{'next':_0x201a30[_0x300be8(0x185)]}:{},'with':{'activation':_0x201a30[_0x300be8(0x1f5)]||''}};return _0x32b075;}case _0x300be8(0x15a):{const _0x1e2c0c={'type':'decision_point','name':_0x52e41f,..._0x201a30[_0x300be8(0x185)]?{'next':_0x201a30[_0x300be8(0x185)]}:{},'with':{'branches':(_0x201a30[_0x300be8(0x166)]||[])[_0x300be8(0x16f)](_0x313161=>({'name':_0x313161[_0x300be8(0x1e9)],'segment':_0x313161['segmentId'],'excluded':_0x313161[_0x300be8(0x1a3)],..._0x313161[_0x300be8(0x185)]?{'next':_0x313161[_0x300be8(0x185)]}:{}}))}};return _0x1e2c0c;}case _0x300be8(0x1da):case _0x300be8(0x1dc):case _0x300be8(0x196):{const _0x26ca48=_0x201a30[_0x300be8(0x154)]||(_0x201a30[_0x300be8(0x166)]||[])[_0x300be8(0x16f)](_0x45a8f4=>({'name':_0x45a8f4[_0x300be8(0x1e9)],'percentage':0x0,'next':_0x45a8f4[_0x300be8(0x185)]})),_0x32de7a={'type':_0x300be8(0x19b),'name':_0x52e41f,..._0x201a30[_0x300be8(0x185)]?{'next':_0x201a30[_0x300be8(0x185)]}:{},'with':{'customized_split':_0x201a30[_0x300be8(0x179)],'unique_id':_0x201a30['uniqueId'],'variants':_0x26ca48['map'](_0x41fc8a=>({'name':_0x41fc8a[_0x300be8(0x1e9)],'percentage':_0x41fc8a[_0x300be8(0x14d)],..._0x41fc8a['next']?{'next':_0x41fc8a['next']}:{}}))}};return _0x32de7a;}case _0x300be8(0x1a0):{const _0x29e215={'type':'merge','name':_0x52e41f,..._0x201a30['next']?{'next':_0x201a30[_0x300be8(0x185)]}:{}};return _0x29e215;}case _0x300be8(0x153):{let _0x10464f='',_0x3df537='',_0x19aaa4;if(_0x201a30[_0x300be8(0x167)]){_0x10464f=_0x201a30[_0x300be8(0x167)]['journeyId'],_0x3df537=_0x201a30['target'][_0x300be8(0x1db)],_0x19aaa4=_0x201a30[_0x300be8(0x167)][_0x300be8(0x1e2)];if(_0x201a30[_0x300be8(0x167)][_0x300be8(0x160)]){const _0x1a1707=parseJumpTargetDisplayName(_0x201a30['target'][_0x300be8(0x160)]);_0x1a1707&&(_0x3df537=_0x1a1707[_0x300be8(0x1e1)],_0x10464f=_0x1a1707['journeyName']);}}const _0x394b73={'type':_0x300be8(0x190),'name':_0x52e41f,..._0x201a30[_0x300be8(0x185)]?{'next':_0x201a30[_0x300be8(0x185)]}:{},'with':{'target':{'journey':_0x10464f,'stage':_0x3df537,..._0x19aaa4?{'bundle_id':_0x19aaa4}:{}}}};return _0x394b73;}case _0x300be8(0x151):{const _0x134e9f={'type':_0x300be8(0x1aa),'name':_0x52e41f};return _0x134e9f;}default:{const _0x38399f={'type':_0x300be8(0x1aa),'name':_0x52e41f};return _0x38399f;}}}export async function journeyDefToRequest(_0x172e7a,_0x472de5,_0x44e234){const _0x518f4c=a147_0x2e82,_0x2007dd=_0x172e7a[_0x518f4c(0x14a)]||getActiveStages(_0x172e7a),_0x54db17=isJourneysArrayMode(_0x172e7a)||isMultiVersionMode(_0x172e7a)?getLatestJourneyEntry(_0x172e7a):undefined,_0x388328=_0x54db17?.[_0x518f4c(0x1ae)]??_0x172e7a['name'],_0x49729b=_0x172e7a[_0x518f4c(0x1d5)]||{},_0x467fe3=_0x172e7a[_0x518f4c(0x19a)]||{},_0x269474={'type':_0x518f4c(0x1c3),'attributes':{'name':_0x388328,'audienceId':_0x472de5,'journeyStages':await Promise[_0x518f4c(0x1d6)](_0x2007dd['map'](_0x91f9b=>convertYamlStageToApi(_0x91f9b,_0x44e234,_0x49729b,_0x467fe3)))}},_0x33d4e6=_0x54db17?.['id']??_0x172e7a['id'];_0x33d4e6&&(_0x269474['id']=_0x33d4e6);_0x172e7a['description']&&(_0x269474[_0x518f4c(0x170)][_0x518f4c(0x1e6)]=_0x172e7a['description']);const _0x441c31=getEffectiveGoal(_0x172e7a);_0x441c31&&(_0x269474[_0x518f4c(0x170)][_0x518f4c(0x178)]=await convertYamlCriteriaToApi(_0x441c31,_0x44e234,_0x49729b));const _0x5586a6=getEffectiveReentry(_0x172e7a);return _0x5586a6&&(_0x269474[_0x518f4c(0x170)]['reentryMode']=_0x5586a6,_0x269474[_0x518f4c(0x170)]['allowReentry']=_0x5586a6!==_0x518f4c(0x171)),_0x172e7a[_0x518f4c(0x1a7)]&&(_0x269474[_0x518f4c(0x1de)]={'parentFolder':{'data':{'id':_0x172e7a[_0x518f4c(0x1a7)],'type':_0x518f4c(0x1c9)}}}),_0x269474;}async function convertYamlStageToApi(_0x143098,_0x2671e0,_0x1bb0ab={},_0x3260a9={}){const _0x556148=a147_0x2e82,_0x1769b8={'name':_0x143098[_0x556148(0x1e9)]};_0x143098['id']&&(_0x1769b8['id']=_0x143098['id']);_0x143098['description']&&(_0x1769b8['description']=_0x143098['description']);_0x143098['entry_criteria']&&(_0x1769b8['entryCriteria']=await convertYamlCriteriaToApi(_0x143098[_0x556148(0x1ee)],_0x2671e0,_0x1bb0ab));_0x143098[_0x556148(0x1fb)]&&_0x143098[_0x556148(0x1fb)][_0x556148(0x161)]>0x0&&(_0x1769b8[_0x556148(0x1c2)]=await Promise[_0x556148(0x1d6)](_0x143098[_0x556148(0x1fb)][_0x556148(0x16f)](_0x4d4d16=>convertYamlCriteriaToApi(_0x4d4d16,_0x2671e0,_0x1bb0ab))));_0x143098['milestone']&&(_0x1769b8[_0x556148(0x17d)]=await convertYamlCriteriaToApi(_0x143098[_0x556148(0x17d)],_0x2671e0,_0x1bb0ab));if(_0x143098['steps']&&_0x143098[_0x556148(0x200)][_0x556148(0x161)]>0x0){const _0x2baae8={},_0x3e5105=_0x143098[_0x556148(0x200)][_0x556148(0x16f)]((_0x55f40a,_0x130ccb)=>{const _0xb42092=_0x556148,_0x1bdfcf=_0x55f40a['uuid']||generateUUID(),_0x1b519c=_0x55f40a[_0xb42092(0x1e9)]||_0x55f40a['type']+'_'+_0x130ccb;return _0x2baae8[_0x1b519c]=_0x1bdfcf,{..._0x55f40a,'name':_0x1b519c};});_0x1769b8['rootStep']=_0x2baae8[_0x3e5105[0x0]['name']],_0x1769b8[_0x556148(0x200)]={};for(let _0x4da6ef=0x0;_0x4da6ef<_0x3e5105[_0x556148(0x161)];_0x4da6ef++){const _0x337bd6=_0x3e5105[_0x4da6ef],_0x275907=_0x2baae8[_0x337bd6[_0x556148(0x1e9)]],_0x1461d0=!_0x337bd6['next']&&_0x4da6ef<_0x3e5105[_0x556148(0x161)]-0x1&&_0x337bd6[_0x556148(0x162)]!==_0x556148(0x1aa)?_0x3e5105[_0x4da6ef+0x1]['name']:_0x337bd6[_0x556148(0x185)],_0x397057=_0x1461d0!==_0x337bd6['next']?{..._0x337bd6,'next':_0x1461d0}:_0x337bd6;_0x1769b8[_0x556148(0x200)][_0x275907]=await convertYamlStepToApi(_0x397057,_0x2671e0,_0x1bb0ab,_0x2baae8,_0x3260a9);}}else _0x143098[_0x556148(0x17a)]&&(_0x1769b8['rootStep']=_0x143098[_0x556148(0x17a)]);return _0x1769b8;}async function convertYamlCriteriaToApi(_0x194dd6,_0x4454cb,_0x59c470={}){const _0x45eecb=a147_0x2e82;let _0x2e4951=_0x194dd6['segment'];if(_0x2e4951&&!/^\d+$/['test'](_0x2e4951)){const _0x5f2926=parseSegmentRef(_0x2e4951);if(_0x5f2926[_0x45eecb(0x162)]===_0x45eecb(0x1c5))_0x4454cb?.[_0x45eecb(0x1fc)]&&(_0x2e4951=await _0x4454cb['resolveSegmentId'](_0x5f2926['name']));else{if(_0x5f2926['type']===_0x45eecb(0x18c)&&_0x59c470[_0x5f2926[_0x45eecb(0x1e9)]])_0x4454cb?.[_0x45eecb(0x147)]&&(_0x2e4951=await _0x4454cb[_0x45eecb(0x147)](_0x5f2926[_0x45eecb(0x1e9)],_0x59c470[_0x5f2926[_0x45eecb(0x1e9)]]));else _0x4454cb?.['resolveSegmentId']&&(_0x2e4951=await _0x4454cb[_0x45eecb(0x1fc)](_0x5f2926[_0x45eecb(0x1e9)]));}}const _0x54f4b5={'name':_0x194dd6[_0x45eecb(0x1e9)],'segmentId':_0x2e4951};_0x194dd6[_0x45eecb(0x1e6)]&&(_0x54f4b5[_0x45eecb(0x1e6)]=_0x194dd6['description']);if(_0x194dd6[_0x45eecb(0x167)]){const _0x4fc2e7=_0x194dd6[_0x45eecb(0x167)][_0x45eecb(0x1c3)],_0x1f5bf6=_0x194dd6[_0x45eecb(0x167)][_0x45eecb(0x18a)];let _0x3b314a=_0x194dd6[_0x45eecb(0x167)]['journey'];_0x4454cb?.[_0x45eecb(0x1f9)]&&!/^\d+$/[_0x45eecb(0x1f6)](_0x3b314a)&&(_0x3b314a=await _0x4454cb[_0x45eecb(0x1f9)](_0x3b314a));let _0x2b2a21=_0x194dd6[_0x45eecb(0x167)][_0x45eecb(0x18a)];_0x4454cb?.[_0x45eecb(0x180)]&&!/^\d+$/[_0x45eecb(0x1f6)](_0x2b2a21)&&(_0x2b2a21=await _0x4454cb[_0x45eecb(0x180)](_0x3b314a,_0x2b2a21));const _0x3eeae8=!/^\d+$/[_0x45eecb(0x1f6)](_0x4fc2e7)&&!isLocalJourneyRef(_0x4fc2e7)?formatApiJourneyName(_0x4fc2e7,_0x1f5bf6):undefined;_0x54f4b5['target']={'journeyId':_0x3b314a,'journeyStageId':_0x2b2a21,'journeyName':_0x3eeae8,'confirmed':!![]},_0x194dd6['target']['bundle_id']&&(_0x54f4b5[_0x45eecb(0x167)]['journeyBundleId']=_0x194dd6['target'][_0x45eecb(0x1ac)]);}return _0x54f4b5;}async function convertYamlStepToApi(_0x3d78c9,_0xabc7b2,_0x1bd51f={},_0x28d4ee={},_0x4de24a={}){const _0x338161=a147_0x2e82,_0xd6fca5=async _0x3e5d20=>{const _0x1a863f=a147_0x2e82;if(/^\d+$/['test'](_0x3e5d20))return _0x3e5d20;const _0x2f459e=parseSegmentRef(_0x3e5d20);if(_0x2f459e['type']===_0x1a863f(0x1c5)){if(_0xabc7b2?.[_0x1a863f(0x1fc)])return await _0xabc7b2[_0x1a863f(0x1fc)](_0x2f459e['name']);}else{if(_0x2f459e[_0x1a863f(0x162)]===_0x1a863f(0x18c)&&_0x1bd51f[_0x2f459e[_0x1a863f(0x1e9)]]){if(_0xabc7b2?.[_0x1a863f(0x147)])return await _0xabc7b2[_0x1a863f(0x147)](_0x2f459e['name'],_0x1bd51f[_0x2f459e[_0x1a863f(0x1e9)]]);}else{if(_0xabc7b2?.[_0x1a863f(0x1fc)])return await _0xabc7b2[_0x1a863f(0x1fc)](_0x2f459e[_0x1a863f(0x1e9)]);}}return _0x3e5d20;},_0x1c683e=async _0xe33a11=>{const _0x3f83e8=a147_0x2e82;if(/^\d+$/[_0x3f83e8(0x1f6)](_0xe33a11))return _0xe33a11;const _0x39a148=parseSegmentRef(_0xe33a11);if(_0x39a148[_0x3f83e8(0x162)]===_0x3f83e8(0x1c5)){if(_0xabc7b2?.[_0x3f83e8(0x188)])return await _0xabc7b2[_0x3f83e8(0x188)](_0x39a148[_0x3f83e8(0x1e9)]);return _0x39a148[_0x3f83e8(0x1e9)];}else{if(_0x39a148['type']==='embedded'&&_0x4de24a[_0x39a148[_0x3f83e8(0x1e9)]]){if(_0xabc7b2?.['resolveEmbeddedActivationId'])return await _0xabc7b2['resolveEmbeddedActivationId'](_0x39a148['name'],_0x4de24a[_0x39a148['name']]);if(_0xabc7b2?.[_0x3f83e8(0x188)])return await _0xabc7b2[_0x3f83e8(0x188)](_0x39a148['name']);}else{if(_0xabc7b2?.[_0x3f83e8(0x188)])return await _0xabc7b2[_0x3f83e8(0x188)](_0x39a148[_0x3f83e8(0x1e9)]);}}return _0xe33a11;},_0x1d8522=_0x3e6900=>{const _0x627994=a147_0x2e82;if(!_0x3e6900)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x627994(0x1f6)](_0x3e6900))return _0x3e6900;return _0x28d4ee[_0x3e6900]||_0x3e6900;};switch(_0x3d78c9[_0x338161(0x162)]){case _0x338161(0x1d0):{const _0x232db6=_0x3d78c9,_0x473747=_0x232db6[_0x338161(0x1a2)],_0x3f29c3={'type':_0x338161(0x1b9),'name':_0x232db6['name'],'next':_0x1d8522(_0x232db6['next'])};if(_0x473747[_0x338161(0x1df)]!==undefined&&_0x473747['unit'])_0x3f29c3[_0x338161(0x14f)]=_0x338161(0x1d3),_0x3f29c3['waitStep']=_0x473747[_0x338161(0x1df)],_0x3f29c3[_0x338161(0x1e7)]=normalizeWaitUnit(_0x473747[_0x338161(0x1a6)]);else{if(_0x473747['wait_until'])_0x3f29c3[_0x338161(0x14f)]='Date',_0x3f29c3[_0x338161(0x1b7)]=_0x473747['wait_until'];else{if(_0x473747['days_of_week'])_0x3f29c3[_0x338161(0x14f)]=_0x338161(0x187),_0x3f29c3[_0x338161(0x1f8)]=_0x473747[_0x338161(0x1cf)];else{if(_0x473747[_0x338161(0x1d7)]){_0x3f29c3[_0x338161(0x14f)]=_0x338161(0x19e);const _0x104e54=await _0xd6fca5(_0x473747[_0x338161(0x1d7)][_0x338161(0x1ce)]),_0x5f1b82=_0x473747[_0x338161(0x1d7)][_0x338161(0x195)]?.[_0x338161(0x185)]!==undefined;if(_0x5f1b82){const _0x502536=[];_0x502536[_0x338161(0x1b8)]({'id':generateUUID(),'segmentId':_0x104e54,'timedOutPath':![],'name':'Met\x20condition(s)','next':_0x1d8522(_0x473747['condition'][_0x338161(0x185)]??_0x232db6[_0x338161(0x185)])});if(_0x473747[_0x338161(0x1d7)][_0x338161(0x195)]){const _0xc56f64=_0x473747[_0x338161(0x1d7)][_0x338161(0x195)][_0x338161(0x1df)],_0x55bac0=normalizeWaitUnit(_0x473747[_0x338161(0x1d7)][_0x338161(0x195)][_0x338161(0x1a6)]);_0x502536[_0x338161(0x1b8)]({'id':generateUUID(),'timedOutPath':!![],'name':'*Max\x20wait\x20'+_0xc56f64+'\x20'+_0x55bac0,'moveAfter':_0xc56f64,'unit':_0x55bac0,'next':_0x1d8522(_0x473747[_0x338161(0x1d7)][_0x338161(0x195)][_0x338161(0x185)])});}_0x3f29c3['conditions']=_0x502536,delete _0x3f29c3[_0x338161(0x185)];}else _0x3f29c3[_0x338161(0x1e5)]=_0x104e54,_0x473747[_0x338161(0x1d7)][_0x338161(0x195)]&&(_0x3f29c3[_0x338161(0x18d)]=_0x473747[_0x338161(0x1d7)][_0x338161(0x195)][_0x338161(0x1df)],_0x473747[_0x338161(0x1d7)][_0x338161(0x195)]['unit']&&(_0x3f29c3[_0x338161(0x163)]=normalizeWaitUnit(_0x473747[_0x338161(0x1d7)][_0x338161(0x195)][_0x338161(0x1a6)])));}}}}return _0x3f29c3;}case'activation':{const _0xcb6187=_0x3d78c9,_0x58515d=_0xcb6187[_0x338161(0x1a2)][_0x338161(0x198)],_0x2bcfbe=await _0x1c683e(_0x58515d);return{'type':'Activation','name':_0xcb6187['name'],'journeyActivationStepId':_0x2bcfbe,'next':_0x1d8522(_0xcb6187[_0x338161(0x185)])};}case'decision_point':{const _0x116192=_0x3d78c9,_0x1f9c13=_0x116192[_0x338161(0x1a2)][_0x338161(0x166)];return{'type':'DecisionPoint','name':_0x116192[_0x338161(0x1e9)],'branches':await Promise[_0x338161(0x1d6)](_0x1f9c13['map'](async _0x2ed2f0=>{const _0x64107a=_0x338161;let _0x197ce8='';if(!_0x2ed2f0[_0x64107a(0x17e)]){const _0x3796ef=_0x2ed2f0[_0x64107a(0x1ce)]||_0x2ed2f0['segment_id']||'';_0x197ce8=_0x3796ef?await _0xd6fca5(_0x3796ef):'';}return{'id':crypto[_0x64107a(0x183)](),'name':_0x2ed2f0[_0x64107a(0x1e9)],'description':null,'segmentId':_0x197ce8,'excludedPath':_0x2ed2f0['excluded']??![],'next':_0x1d8522(_0x2ed2f0[_0x64107a(0x185)])};})),'next':_0x1d8522(_0x116192[_0x338161(0x185)])};}case _0x338161(0x19b):{const _0x22979b=_0x3d78c9,_0x35a19b=_0x22979b['with'];return{'type':_0x338161(0x1da),'name':_0x22979b[_0x338161(0x1e9)],'customizedSplit':_0x35a19b[_0x338161(0x148)],'uniqueId':_0x35a19b[_0x338161(0x194)],'variants':_0x35a19b[_0x338161(0x154)][_0x338161(0x16f)](_0x3ccbaa=>({'id':_0x3ccbaa['id']||generateUUID(),'name':_0x3ccbaa[_0x338161(0x1e9)],'percentage':_0x3ccbaa[_0x338161(0x14d)],'next':_0x1d8522(_0x3ccbaa['next'])})),'next':_0x1d8522(_0x22979b['next'])};}case _0x338161(0x1b5):return{'type':'Merge','name':_0x3d78c9[_0x338161(0x1e9)],'next':_0x1d8522(_0x3d78c9[_0x338161(0x185)])};case _0x338161(0x190):{const _0x2fb53a=_0x3d78c9,_0x184bc1=_0x2fb53a[_0x338161(0x1a2)][_0x338161(0x167)],_0x619464=_0x184bc1[_0x338161(0x1c3)],_0x411e34=_0x184bc1[_0x338161(0x18a)];let _0x3205a1=_0x184bc1['journey'];_0xabc7b2?.[_0x338161(0x1f9)]&&!/^\d+$/['test'](_0x3205a1)&&(_0x3205a1=await _0xabc7b2['resolveJourneyId'](_0x3205a1));let _0x1542bf=_0x184bc1[_0x338161(0x18a)];_0xabc7b2?.[_0x338161(0x180)]&&!/^\d+$/[_0x338161(0x1f6)](_0x1542bf)&&(_0x1542bf=await _0xabc7b2[_0x338161(0x180)](_0x3205a1,_0x1542bf));const _0x24eeee=!/^\d+$/[_0x338161(0x1f6)](_0x619464)&&!isLocalJourneyRef(_0x619464)?formatApiJourneyName(_0x619464,_0x411e34):undefined;return{'type':'Jump','name':_0x2fb53a[_0x338161(0x1e9)],'target':{'journeyId':_0x3205a1,'journeyStageId':_0x1542bf,'journeyBundleId':_0x184bc1[_0x338161(0x1ac)],'journeyName':_0x24eeee,'confirmed':!![]},'next':_0x1d8522(_0x2fb53a[_0x338161(0x185)])};}case _0x338161(0x1aa):return{'type':_0x338161(0x151),'name':_0x3d78c9[_0x338161(0x1e9)]};default:{const _0x59b653=_0x3d78c9;return{'type':_0x338161(0x151),'name':_0x59b653[_0x338161(0x1e9)]};}}}export function toYamlString(_0x17cc53){const _0x1c7c81=a147_0x2e82,_0x2b3ad8=stripInternalFields(_0x17cc53),_0x227fcd=a147_0x7e19c1[_0x1c7c81(0x1e0)](_0x2b3ad8,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x1c7c81(0x1bf)}),_0x5ab0b0=[_0x1c7c81(0x1c1),_0x1c7c81(0x1a4),'goal:',_0x1c7c81(0x1a8),_0x1c7c81(0x16c),_0x1c7c81(0x172),_0x1c7c81(0x1ca)];let _0x4a7276=_0x227fcd;for(const _0xcc1e of _0x5ab0b0){_0x4a7276=_0x4a7276[_0x1c7c81(0x1be)](new RegExp('^('+_0xcc1e+')','m'),(_0x2f8a6b,_0x5113a5,_0x4fa05a)=>{if(_0x4fa05a===0x0||_0x4a7276[_0x4fa05a-0x1]==='\x0a'&&_0x4a7276[_0x4fa05a-0x2]==='\x0a')return _0x5113a5;return'\x0a'+_0x5113a5;});}return _0x4a7276;}function stripInternalFields(_0x16243f){const _0x2b6c69=a147_0x2e82,{id:_0x81439c,folder_id:_0xb7dd4d,bundle_id:_0x3d3569,bundle_name:_0x42c9e9,version:_0x268c68,allow_reentry:_0x5f4587,..._0xb8d246}=_0x16243f;return _0xb8d246['journeys']&&(_0xb8d246[_0x2b6c69(0x1b1)]=_0xb8d246['journeys'][_0x2b6c69(0x16f)](_0xf5dad4=>{const _0x5178c8=_0x2b6c69,{id:_0x1162ae,..._0x416c41}=_0xf5dad4;return{..._0x416c41,'stages':_0x416c41[_0x5178c8(0x14a)][_0x5178c8(0x16f)](stripStageInternalFields),..._0xf5dad4['latest']===!![]?{'latest':!![]}:{},..._0xb8d246[_0x5178c8(0x1b1)][_0x5178c8(0x161)]===0x1&&_0x416c41['version']==='v1'?{'version':undefined}:{}};})),_0xb8d246[_0x2b6c69(0x14a)]&&(_0xb8d246[_0x2b6c69(0x14a)]=_0xb8d246['stages']['map'](stripStageInternalFields)),_0xb8d246['versions']&&(_0xb8d246[_0x2b6c69(0x14c)]=_0xb8d246[_0x2b6c69(0x14c)]['map'](_0x1e41c0=>{const _0x5b2f41=_0x2b6c69,{id:_0x24b03c,..._0x368a97}=_0x1e41c0;return{..._0x368a97,'stages':_0x368a97[_0x5b2f41(0x14a)][_0x5b2f41(0x16f)](stripStageInternalFields),..._0x1e41c0[_0x5b2f41(0x1ec)]===!![]?{'latest':!![]}:{}};})),_0xb8d246;}function stripStageInternalFields(_0x5dcf95){const {id:_0x53d9e2,..._0x35d1f8}=_0x5dcf95;return _0x35d1f8;}export function parseYamlString(_0x4c0cfb){return safeParseYaml(_0x4c0cfb,JourneyDefSchema);}export function isJourneyDef(_0x51a32f){const _0x5e0497=a147_0x2e82;return typeof _0x51a32f===_0x5e0497(0x173)&&_0x51a32f!==null&&_0x5e0497(0x162)in _0x51a32f&&_0x51a32f[_0x5e0497(0x162)]==='journey';}export function generateTemplate(_0x4eab7c,_0x4544c4){const _0x39992b=a147_0x2e82,_0x549872={'type':_0x39992b(0x1c3),'name':_0x4eab7c,'description':_0x39992b(0x155),'reentry':'no_reentry','goal':{'name':'Goal\x20Achieved','segment':_0x39992b(0x16e)},'stages':[{'name':'Stage\x201','description':_0x39992b(0x165),'entry_criteria':{'name':'Entry\x20Criteria','segment':_0x4544c4},'steps':[{'type':_0x39992b(0x1d0),'name':_0x39992b(0x182),'with':{'duration':0x1,'unit':'day'}},{'type':_0x39992b(0x198),'name':_0x39992b(0x1c4),'with':{'activation':'your-activation-name'}},{'type':_0x39992b(0x1aa),'name':_0x39992b(0x16a)}]}]};return toYamlString(_0x549872);}function generateUUID(){const _0x3f16a3=a147_0x2e82;return crypto[_0x3f16a3(0x183)]();}export const SEGMENT_REF_PREFIX='ref:';export function parseSegmentRef(_0x617862){const _0x3262e6=a147_0x2e82;if(_0x617862[_0x3262e6(0x1cb)](SEGMENT_REF_PREFIX))return{'type':_0x3262e6(0x1c5),'name':_0x617862['slice'](SEGMENT_REF_PREFIX[_0x3262e6(0x161)])};if(/^\d+$/[_0x3262e6(0x1f6)](_0x617862))return{'type':'id','name':_0x617862};return{'type':_0x3262e6(0x18c),'name':_0x617862};}export function makeSegmentRef(_0x47688d){return''+SEGMENT_REF_PREFIX+_0x47688d;}export function isExternalSegmentRef(_0x3004a3){const _0x49d4e0=a147_0x2e82;return _0x3004a3[_0x49d4e0(0x1cb)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x5d4436){const _0x2a5c65=a147_0x2e82;return!!(_0x5d4436[_0x2a5c65(0x1b1)]&&_0x5d4436[_0x2a5c65(0x1b1)][_0x2a5c65(0x161)]>0x0);}export function isMultiVersionMode(_0x2ca7f0){const _0x5b945e=a147_0x2e82;return!!(_0x2ca7f0[_0x5b945e(0x14c)]&&_0x2ca7f0['versions'][_0x5b945e(0x161)]>0x0);}export function isSingleVersionMode(_0x135e0b){const _0x165d45=a147_0x2e82;return!!(_0x135e0b[_0x165d45(0x14a)]&&_0x135e0b[_0x165d45(0x14a)]['length']>0x0);}export function hasMultipleVersions(_0x4fbb63){const _0x2b1bf6=a147_0x2e82;if(isJourneysArrayMode(_0x4fbb63))return(_0x4fbb63[_0x2b1bf6(0x1b1)]?.[_0x2b1bf6(0x161)]||0x0)>0x1;if(isMultiVersionMode(_0x4fbb63))return(_0x4fbb63[_0x2b1bf6(0x14c)]?.[_0x2b1bf6(0x161)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x3680e4){const _0x1f1878=a147_0x2e82;if(isJourneysArrayMode(_0x3680e4))return _0x3680e4;if(isSingleVersionMode(_0x3680e4)){const {stages:_0x47fdf6,id:_0x7a87af,version:_0x3ca607,version_number:_0x5244c5,..._0x3875ca}=_0x3680e4;return{..._0x3875ca,'journeys':[{'version':_0x3ca607||'v1','stages':_0x47fdf6||[],'id':_0x7a87af,'version_number':_0x5244c5}]};}if(isMultiVersionMode(_0x3680e4)){const {versions:_0x3e91e2,..._0x167448}=_0x3680e4;return{..._0x167448,'journeys':(_0x3e91e2||[])[_0x1f1878(0x16f)](_0x1d6dd3=>({'version':_0x1d6dd3[_0x1f1878(0x1e9)],'state':_0x1d6dd3[_0x1f1878(0x1e4)],'latest':_0x1d6dd3[_0x1f1878(0x1ec)],'stages':_0x1d6dd3['stages'],'id':_0x1d6dd3['id'],'version_number':_0x1d6dd3[_0x1f1878(0x1c6)]}))};}return _0x3680e4;}export function normalizeJourneyDef(_0x4c4026,_0x34c77a){const _0x4dd659=a147_0x2e82,_0x53319a=normalizeToJourneysFormat(_0x4c4026),_0x5edfd0=_0x34c77a?.[_0x4dd659(0x1d5)]?Object[_0x4dd659(0x169)](_0x34c77a[_0x4dd659(0x1d5)]):undefined,_0x5bf3e3=_0x34c77a?.[_0x4dd659(0x19a)]?Object[_0x4dd659(0x169)](_0x34c77a['activations']):undefined;return{'type':_0x4dd659(0x1c3),'name':_0x53319a[_0x4dd659(0x1e9)],..._0x53319a[_0x4dd659(0x1e6)]!==undefined&&{'description':_0x53319a[_0x4dd659(0x1e6)]},..._0x53319a[_0x4dd659(0x178)]&&{'goal':normalizeJourneyCriteria(_0x53319a[_0x4dd659(0x178)])},..._0x53319a['reentry']!==undefined&&{'reentry':_0x53319a[_0x4dd659(0x181)]},..._0x53319a['segments']&&{'segments':normalizeEmbeddedSegments(_0x53319a[_0x4dd659(0x1d5)],_0x5edfd0)},..._0x53319a[_0x4dd659(0x19a)]&&{'activations':normalizeEmbeddedActivations(_0x53319a['activations'],_0x5bf3e3)},..._0x53319a[_0x4dd659(0x1b1)]&&{'journeys':_0x53319a['journeys'][_0x4dd659(0x16f)](_0x24c5f9=>normalizeJourneyEntry(_0x24c5f9,_0x53319a[_0x4dd659(0x1b1)]['length']===0x1))}};}function normalizeJourneyEntry(_0x5873d1,_0x5a23d3){const _0x135277=a147_0x2e82;return{...!_0x5a23d3&&_0x5873d1[_0x135277(0x1ae)]!==undefined&&{'version':_0x5873d1[_0x135277(0x1ae)]},..._0x5873d1[_0x135277(0x1e4)]!==undefined&&{'state':_0x5873d1[_0x135277(0x1e4)]},...!_0x5a23d3&&_0x5873d1[_0x135277(0x1ec)]!==undefined&&{'latest':_0x5873d1[_0x135277(0x1ec)]},..._0x5873d1['version_number']!==undefined&&{'version_number':_0x5873d1['version_number']},..._0x5873d1[_0x135277(0x178)]&&{'goal':normalizeJourneyCriteria(_0x5873d1['goal'])},..._0x5873d1[_0x135277(0x181)]!==undefined&&{'reentry':_0x5873d1[_0x135277(0x181)]},'stages':_0x5873d1[_0x135277(0x14a)][_0x135277(0x16f)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x4ac069){const _0x3f3d98=a147_0x2e82;return{'name':_0x4ac069['name'],..._0x4ac069[_0x3f3d98(0x1e6)]!==undefined&&{'description':_0x4ac069[_0x3f3d98(0x1e6)]},..._0x4ac069[_0x3f3d98(0x1ee)]&&{'entry_criteria':normalizeJourneyCriteria(_0x4ac069[_0x3f3d98(0x1ee)])},..._0x4ac069[_0x3f3d98(0x1fb)]&&{'exit_criteria':_0x4ac069['exit_criteria']['map'](normalizeJourneyCriteria)},..._0x4ac069[_0x3f3d98(0x17d)]&&{'milestone':normalizeJourneyCriteria(_0x4ac069[_0x3f3d98(0x17d)])},..._0x4ac069[_0x3f3d98(0x200)]&&{'steps':normalizeStepsWithImplicitNext(_0x4ac069['steps'])}};}function normalizeStepsWithImplicitNext(_0x20cdf3){return _0x20cdf3['map']((_0x2633e3,_0x3fe74a)=>{const _0x597090=a147_0x2e82,_0x2d8b32=_0x3fe74a<_0x20cdf3['length']-0x1?_0x20cdf3[_0x3fe74a+0x1][_0x597090(0x1e9)]:undefined;return normalizeJourneyStep(_0x2633e3,_0x2d8b32);});}function normalizeJourneyCriteria(_0x3c6e6d){const _0x455f89=a147_0x2e82;return{'name':_0x3c6e6d[_0x455f89(0x1e9)],..._0x3c6e6d[_0x455f89(0x1e6)]!==undefined&&{'description':_0x3c6e6d[_0x455f89(0x1e6)]},'segment':_0x3c6e6d['segment'],..._0x3c6e6d[_0x455f89(0x167)]&&{'target':normalizeJumpTarget(_0x3c6e6d['target'])}};}function normalizeJourneyStep(_0x104b00,_0x1f17b8){const _0x551ee9=a147_0x2e82,_0x339791=_0x104b00[_0x551ee9(0x185)]!==undefined&&_0x104b00[_0x551ee9(0x185)]!==_0x1f17b8,_0x7ec7a8={'type':_0x104b00['type'],'name':_0x104b00[_0x551ee9(0x1e9)],..._0x339791&&{'next':_0x104b00[_0x551ee9(0x185)]}};if(_0x551ee9(0x1a2)in _0x104b00&&_0x104b00[_0x551ee9(0x1a2)])return{..._0x7ec7a8,'with':normalizeStepParams(_0x104b00[_0x551ee9(0x162)],_0x104b00[_0x551ee9(0x1a2)])};return _0x7ec7a8;}function normalizeStepParams(_0x48c2cc,_0x1ecea1){const _0x2b3ba1=a147_0x2e82;switch(_0x48c2cc){case _0x2b3ba1(0x1d0):{const _0x422278=_0x1ecea1;let _0x44c1ef;return _0x422278[_0x2b3ba1(0x1d7)]&&(_0x44c1ef={'segment':_0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x1ce)],..._0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x185)]!==undefined&&{'next':_0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x185)]},..._0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x195)]&&{'timeout':{'duration':_0x422278[_0x2b3ba1(0x1d7)]['timeout'][_0x2b3ba1(0x1df)],'unit':_0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x195)]['unit'],..._0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x195)][_0x2b3ba1(0x185)]!==undefined&&{'next':_0x422278[_0x2b3ba1(0x1d7)][_0x2b3ba1(0x195)][_0x2b3ba1(0x185)]}}}}),{..._0x422278['duration']!==undefined&&{'duration':_0x422278['duration']},..._0x422278[_0x2b3ba1(0x1a6)]!==undefined&&{'unit':_0x422278[_0x2b3ba1(0x1a6)]},..._0x422278['wait_until']!==undefined&&{'wait_until':_0x422278[_0x2b3ba1(0x1cc)]},..._0x422278[_0x2b3ba1(0x1cf)]!==undefined&&{'days_of_week':_0x422278[_0x2b3ba1(0x1cf)]},..._0x44c1ef&&{'condition':_0x44c1ef}};}case _0x2b3ba1(0x198):{const _0x377783=_0x1ecea1;return{'activation':_0x377783['activation']};}case _0x2b3ba1(0x1b2):{const _0x49988a=_0x1ecea1;return{'branches':_0x49988a[_0x2b3ba1(0x166)][_0x2b3ba1(0x16f)](normalizeDecisionBranch)};}case _0x2b3ba1(0x19b):{const _0x51fbec=_0x1ecea1;return{..._0x51fbec[_0x2b3ba1(0x148)]!==undefined&&{'customized_split':_0x51fbec[_0x2b3ba1(0x148)]},..._0x51fbec[_0x2b3ba1(0x194)]!==undefined&&{'unique_id':_0x51fbec[_0x2b3ba1(0x194)]},'variants':_0x51fbec[_0x2b3ba1(0x154)]['map'](normalizeAbTestVariant)};}case'jump':{const _0x42bd7d=_0x1ecea1;return{'target':normalizeJumpTarget(_0x42bd7d[_0x2b3ba1(0x167)])};}default:return _0x1ecea1;}}function normalizeDecisionBranch(_0x154625){const _0x14f1e2=a147_0x2e82;return{'name':_0x154625[_0x14f1e2(0x1e9)],..._0x154625[_0x14f1e2(0x1ce)]!==undefined&&{'segment':_0x154625[_0x14f1e2(0x1ce)]},..._0x154625[_0x14f1e2(0x17e)]!==undefined&&{'excluded':_0x154625[_0x14f1e2(0x17e)]},..._0x154625[_0x14f1e2(0x185)]!==undefined&&{'next':_0x154625[_0x14f1e2(0x185)]}};}function normalizeAbTestVariant(_0x33e4d5){const _0x132b4b=a147_0x2e82;return{..._0x33e4d5['id']!==undefined&&{'id':_0x33e4d5['id']},'name':_0x33e4d5[_0x132b4b(0x1e9)],'percentage':_0x33e4d5['percentage'],..._0x33e4d5['next']!==undefined&&{'next':_0x33e4d5[_0x132b4b(0x185)]}};}function a147_0x2e82(_0x582b0b,_0x2bc143){_0x582b0b=_0x582b0b-0x147;const _0x41a625=a147_0x41a6();let _0x2e82e5=_0x41a625[_0x582b0b];return _0x2e82e5;}function normalizeJumpTarget(_0x140506){const _0x20fa63=a147_0x2e82;return{'journey':_0x140506['journey'],'stage':_0x140506['stage'],..._0x140506[_0x20fa63(0x1ac)]!==undefined&&{'bundle_id':_0x140506[_0x20fa63(0x1ac)]}};}function normalizeEmbeddedSegments(_0xf20b26,_0x309f88){const _0x466b37=a147_0x2e82,_0xa21cdb={},_0x2ad5aa=Object[_0x466b37(0x169)](_0xf20b26),_0x4db299=_0x309f88?[..._0x309f88['filter'](_0x1f8242=>_0x2ad5aa[_0x466b37(0x17c)](_0x1f8242)),..._0x2ad5aa['filter'](_0x2afe4c=>!_0x309f88[_0x466b37(0x17c)](_0x2afe4c))[_0x466b37(0x1af)]()]:_0x2ad5aa[_0x466b37(0x1af)]();for(const _0x1c24ae of _0x4db299){const _0x58d7ed=_0xf20b26[_0x1c24ae];if(_0x58d7ed[_0x466b37(0x1e3)]){const _0x23e5cb=_0x58d7ed[_0x466b37(0x1e3)];if(_0x23e5cb['type']!=='And'&&_0x23e5cb[_0x466b37(0x162)]!=='Or'){const _0x109b2e=_0x23e5cb[_0x466b37(0x162)]??_0x466b37(0x1c8);throw new SDKError(ErrorCode[_0x466b37(0x197)],_0x466b37(0x1f3)+_0x1c24ae+_0x466b37(0x17b)+(_0x466b37(0x189)+_0x109b2e+'\x27.\x0a')+_0x466b37(0x150)+_0x466b37(0x1fd)+_0x466b37(0x1c0)+'\x20\x20\x20\x20conditions:\x0a'+_0x466b37(0x1ea)+_0x466b37(0x18f)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x23e5cb[_0x466b37(0x193)]||!Array[_0x466b37(0x1bb)](_0x23e5cb['conditions']))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x466b37(0x1f3)+_0x1c24ae+_0x466b37(0x17b)+'rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a'+_0x466b37(0x150)+'\x20\x20rule:\x0a'+('\x20\x20\x20\x20type:\x20'+_0x23e5cb[_0x466b37(0x162)]+'\x0a')+_0x466b37(0x19c)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x466b37(0x164));}_0xa21cdb[_0x1c24ae]={..._0x58d7ed[_0x466b37(0x1e6)]&&_0x58d7ed['description'][_0x466b37(0x1d9)]()&&{'description':_0x58d7ed['description']},..._0x58d7ed[_0x466b37(0x1e3)]&&{'rule':deepSortObject(_0x58d7ed[_0x466b37(0x1e3)])}};}return _0xa21cdb;}function normalizeEmbeddedActivations(_0x34219c,_0x468720){const _0x368923=a147_0x2e82,_0x45a319={},_0x155cf9=Object[_0x368923(0x169)](_0x34219c),_0x26f9cf=_0x468720?[..._0x468720['filter'](_0x209ebd=>_0x155cf9[_0x368923(0x17c)](_0x209ebd)),..._0x155cf9['filter'](_0x1c34a9=>!_0x468720[_0x368923(0x17c)](_0x1c34a9))[_0x368923(0x1af)]()]:_0x155cf9[_0x368923(0x1af)]();for(const _0x2f0d57 of _0x26f9cf){const _0x1ed808=_0x34219c[_0x2f0d57];_0x45a319[_0x2f0d57]={'name':_0x1ed808[_0x368923(0x1e9)],'connection':_0x1ed808['connection'],..._0x1ed808[_0x368923(0x1e6)]!==undefined&&{'description':_0x1ed808[_0x368923(0x1e6)]},..._0x1ed808['all_columns']!==undefined&&{'all_columns':_0x1ed808[_0x368923(0x175)]},..._0x1ed808[_0x368923(0x1e8)]!==undefined&&{'columns':_0x1ed808['columns']},..._0x1ed808[_0x368923(0x1eb)]!==undefined&&{'behavior':_0x1ed808[_0x368923(0x1eb)]},..._0x1ed808[_0x368923(0x1bc)]!==undefined&&{'schedule':_0x1ed808['schedule']},..._0x1ed808[_0x368923(0x1c7)]!==undefined&&{'notification':_0x1ed808[_0x368923(0x1c7)]},..._0x1ed808[_0x368923(0x1ff)]!==undefined&&{'connector_config':_0x1ed808[_0x368923(0x1ff)]},..._0x1ed808['activation_template_id']!==undefined&&{'activation_template_id':_0x1ed808[_0x368923(0x15c)]}};}return _0x45a319;}export function getActiveStages(_0x30a10a){const _0x17ccb0=a147_0x2e82;if(isJourneysArrayMode(_0x30a10a)){const _0x3b0fa6=_0x30a10a['journeys']||[],_0x3a3023=_0x3b0fa6[_0x17ccb0(0x186)](_0x30707=>_0x30707['latest']===!![])||_0x3b0fa6[0x0];return _0x3a3023?.[_0x17ccb0(0x14a)]||[];}if(isSingleVersionMode(_0x30a10a))return _0x30a10a['stages']||[];if(isMultiVersionMode(_0x30a10a)){const _0x1481e8=_0x30a10a['versions']||[],_0x3b3f73=_0x1481e8[_0x17ccb0(0x186)](_0x30aaf7=>_0x30aaf7[_0x17ccb0(0x1ec)]===!![])||_0x1481e8[0x0];return _0x3b3f73?.[_0x17ccb0(0x14a)]||[];}return[];}export function getLatestJourneyEntry(_0x3e19bb){const _0x1af156=a147_0x2e82;if(isJourneysArrayMode(_0x3e19bb)){const _0x37fd17=_0x3e19bb[_0x1af156(0x1b1)]||[];return _0x37fd17[_0x1af156(0x186)](_0xfb442e=>_0xfb442e['latest']===!![])||_0x37fd17[0x0];}if(isMultiVersionMode(_0x3e19bb)){const _0x2b6f20=_0x3e19bb['versions']||[],_0x569cd2=_0x2b6f20['find'](_0x362719=>_0x362719[_0x1af156(0x1ec)]===!![])||_0x2b6f20[0x0];if(_0x569cd2)return{'version':_0x569cd2[_0x1af156(0x1e9)],'state':_0x569cd2['state'],'latest':_0x569cd2['latest'],'stages':_0x569cd2[_0x1af156(0x14a)],'id':_0x569cd2['id'],'version_number':_0x569cd2[_0x1af156(0x1c6)]};}if(isSingleVersionMode(_0x3e19bb))return{'version':_0x3e19bb[_0x1af156(0x1ae)]||'v1','state':'draft','stages':_0x3e19bb[_0x1af156(0x14a)]||[],'id':_0x3e19bb['id'],'version_number':_0x3e19bb[_0x1af156(0x1c6)],'goal':_0x3e19bb['goal'],'reentry':_0x3e19bb['reentry']};return undefined;}export function getLatestVersion(_0x9fcc31){const _0x128feb=a147_0x2e82;if(!isMultiVersionMode(_0x9fcc31))return undefined;const _0x49bb2e=_0x9fcc31[_0x128feb(0x14c)]||[];return _0x49bb2e[_0x128feb(0x186)](_0x7b4691=>_0x7b4691['latest']===!![])||_0x49bb2e[0x0];}export function getEffectiveGoal(_0x4e2dc6){const _0xba5691=a147_0x2e82,_0x4a1992=getLatestJourneyEntry(_0x4e2dc6);return _0x4a1992?.[_0xba5691(0x178)]||_0x4e2dc6[_0xba5691(0x178)];}export function getEffectiveReentry(_0xe859c3){const _0x30dd6d=a147_0x2e82,_0xc1a30=getLatestJourneyEntry(_0xe859c3);return _0xc1a30?.[_0x30dd6d(0x181)]||_0xe859c3[_0x30dd6d(0x181)];}export function collectSegmentRefs(_0xc46788){const _0x29a1a8=a147_0x2e82,_0x1cc3a4=new Set();_0xc46788['goal']?.[_0x29a1a8(0x1ce)]&&_0x1cc3a4['add'](_0xc46788[_0x29a1a8(0x178)][_0x29a1a8(0x1ce)]);const _0x36e545=_0x432e1a=>{const _0x1f89b3=_0x29a1a8;for(const _0x285172 of _0x432e1a){_0x285172[_0x1f89b3(0x1ee)]?.[_0x1f89b3(0x1ce)]&&_0x1cc3a4['add'](_0x285172['entry_criteria'][_0x1f89b3(0x1ce)]);if(_0x285172['exit_criteria'])for(const _0x828001 of _0x285172['exit_criteria']){_0x828001[_0x1f89b3(0x1ce)]&&_0x1cc3a4['add'](_0x828001[_0x1f89b3(0x1ce)]);}_0x285172[_0x1f89b3(0x17d)]?.[_0x1f89b3(0x1ce)]&&_0x1cc3a4[_0x1f89b3(0x1d8)](_0x285172[_0x1f89b3(0x17d)][_0x1f89b3(0x1ce)]);if(_0x285172['steps'])for(const _0x3c4b42 of _0x285172[_0x1f89b3(0x200)]){if(_0x3c4b42[_0x1f89b3(0x162)]===_0x1f89b3(0x1b2)){const _0x3d813d=_0x3c4b42;for(const _0x3bf018 of _0x3d813d[_0x1f89b3(0x1a2)]['branches']){_0x3bf018[_0x1f89b3(0x1ce)]&&_0x1cc3a4[_0x1f89b3(0x1d8)](_0x3bf018[_0x1f89b3(0x1ce)]);}}else{if(_0x3c4b42[_0x1f89b3(0x162)]===_0x1f89b3(0x1d0)){const _0x201e37=_0x3c4b42;_0x201e37[_0x1f89b3(0x1a2)][_0x1f89b3(0x1d7)]?.[_0x1f89b3(0x1ce)]&&_0x1cc3a4[_0x1f89b3(0x1d8)](_0x201e37[_0x1f89b3(0x1a2)]['condition'][_0x1f89b3(0x1ce)]);}}}}};_0xc46788['stages']&&_0x36e545(_0xc46788['stages']);if(_0xc46788[_0x29a1a8(0x14c)])for(const _0x147137 of _0xc46788[_0x29a1a8(0x14c)]){_0x36e545(_0x147137[_0x29a1a8(0x14a)]);}return _0x1cc3a4;}export function validateSegmentRefs(_0x45e559){const _0x1f889d=a147_0x2e82,_0x344000=[],_0x5dc90e=collectSegmentRefs(_0x45e559),_0x4a7fbd=new Set(Object[_0x1f889d(0x169)](_0x45e559[_0x1f889d(0x1d5)]||{}));for(const _0x216a18 of _0x5dc90e){const _0x1f4285=parseSegmentRef(_0x216a18);_0x1f4285[_0x1f889d(0x162)]===_0x1f889d(0x18c)&&!_0x4a7fbd[_0x1f889d(0x1fa)](_0x1f4285['name'])&&_0x344000[_0x1f889d(0x1b8)]('Unknown\x20segment\x20\x22'+_0x1f4285[_0x1f889d(0x1e9)]+'\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:'+_0x1f4285[_0x1f889d(0x1e9)]+_0x1f889d(0x199));}return _0x344000;}export function collectSegmentIdsFromJourneyApi(_0x355829){const _0xd578c4=a147_0x2e82,_0x447343=new Set();_0x355829['attributes'][_0xd578c4(0x178)]?.['segmentId']&&_0x447343[_0xd578c4(0x1d8)](_0x355829[_0xd578c4(0x170)]['goal'][_0xd578c4(0x1f7)]);const _0x32c7d5=_0x355829[_0xd578c4(0x170)]['journeyStages'];if(Array[_0xd578c4(0x1bb)](_0x32c7d5))for(const _0x13dbc0 of _0x32c7d5){_0x13dbc0[_0xd578c4(0x184)]?.[_0xd578c4(0x1f7)]&&_0x447343[_0xd578c4(0x1d8)](_0x13dbc0[_0xd578c4(0x184)][_0xd578c4(0x1f7)]);const _0x15984a=_0x13dbc0[_0xd578c4(0x1c2)]??_0x13dbc0[_0xd578c4(0x1ab)];if(Array['isArray'](_0x15984a))for(const _0x3ff0ca of _0x15984a){_0x3ff0ca['segmentId']&&_0x447343[_0xd578c4(0x1d8)](_0x3ff0ca[_0xd578c4(0x1f7)]);}_0x13dbc0[_0xd578c4(0x17d)]?.['segmentId']&&_0x447343[_0xd578c4(0x1d8)](_0x13dbc0['milestone'][_0xd578c4(0x1f7)]);if(_0x13dbc0[_0xd578c4(0x200)]&&typeof _0x13dbc0[_0xd578c4(0x200)]===_0xd578c4(0x173)){const _0x5b5d9b=Array[_0xd578c4(0x1bb)](_0x13dbc0['steps'])?_0x13dbc0[_0xd578c4(0x200)]:Object['values'](_0x13dbc0[_0xd578c4(0x200)]);for(const _0x3dd4ba of _0x5b5d9b){_0x3dd4ba[_0xd578c4(0x1b6)]?.['segmentId']&&_0x447343['add'](_0x3dd4ba[_0xd578c4(0x1b6)][_0xd578c4(0x1f7)]);const _0x21d4dd=_0x3dd4ba;_0x21d4dd[_0xd578c4(0x1e5)]&&_0x447343[_0xd578c4(0x1d8)](_0x21d4dd[_0xd578c4(0x1e5)]);if(Array['isArray'](_0x21d4dd[_0xd578c4(0x193)]))for(const _0x212915 of _0x21d4dd[_0xd578c4(0x193)]){_0x212915[_0xd578c4(0x1f7)]&&_0x447343['add'](_0x212915[_0xd578c4(0x1f7)]);}if(Array[_0xd578c4(0x1bb)](_0x3dd4ba[_0xd578c4(0x166)]))for(const _0x61face of _0x3dd4ba[_0xd578c4(0x166)]){_0x61face['segmentId']&&_0x447343[_0xd578c4(0x1d8)](_0x61face[_0xd578c4(0x1f7)]);}}}}return _0x447343;}
|
|
1
|
+
const a147_0x867043=a147_0x1cac;(function(_0xbbdd2a,_0x3c8a44){const _0x3903f8=a147_0x1cac,_0x218dd6=_0xbbdd2a();while(!![]){try{const _0x51ea1c=parseInt(_0x3903f8(0x1a6))/0x1*(parseInt(_0x3903f8(0x210))/0x2)+-parseInt(_0x3903f8(0x187))/0x3+-parseInt(_0x3903f8(0x18f))/0x4*(parseInt(_0x3903f8(0x18e))/0x5)+-parseInt(_0x3903f8(0x1b5))/0x6+parseInt(_0x3903f8(0x1dd))/0x7*(-parseInt(_0x3903f8(0x21e))/0x8)+-parseInt(_0x3903f8(0x181))/0x9+parseInt(_0x3903f8(0x1d2))/0xa*(parseInt(_0x3903f8(0x1b8))/0xb);if(_0x51ea1c===_0x3c8a44)break;else _0x218dd6['push'](_0x218dd6['shift']());}catch(_0x3bf6c5){_0x218dd6['push'](_0x218dd6['shift']());}}}(a147_0x2339,0x5ff54));import*as a147_0x312d16 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(_0x4cc81e){const _0x48a514=a147_0x1cac,_0x3e28af=_0x4cc81e[_0x48a514(0x229)]();if(_0x3e28af===_0x48a514(0x1d6)||_0x3e28af===_0x48a514(0x1e9))return _0x48a514(0x1e9);if(_0x3e28af===_0x48a514(0x19f)||_0x3e28af===_0x48a514(0x1d3))return _0x48a514(0x1d3);return _0x4cc81e;}export function journeyResponseToDefSync(_0x244a53){const _0x3499fa=a147_0x1cac,_0x231682=_0x244a53[_0x3499fa(0x1d4)],_0x1698bd=_0x231682[_0x3499fa(0x201)]||_0x231682['name'],_0x1adb2a={'stages':_0x231682[_0x3499fa(0x1e1)][_0x3499fa(0x1f2)](convertApiStageToYaml),'id':_0x244a53['id']};_0x231682[_0x3499fa(0x1ab)]&&(_0x1adb2a[_0x3499fa(0x1ab)]=convertApiCriteriaToYaml(_0x231682[_0x3499fa(0x1ab)]));_0x231682[_0x3499fa(0x1f0)]&&_0x231682[_0x3499fa(0x1f0)]!==_0x1698bd&&(_0x1adb2a[_0x3499fa(0x235)]=_0x231682['name']);_0x231682[_0x3499fa(0x1a1)]!==undefined&&(_0x1adb2a[_0x3499fa(0x20d)]=_0x231682[_0x3499fa(0x1a1)]);_0x231682[_0x3499fa(0x1b2)]&&(_0x1adb2a['state']=_0x231682['state']===_0x3499fa(0x1ec)?'launched':_0x3499fa(0x197));const _0x225b5d={'type':_0x3499fa(0x1be),'name':_0x1698bd,'journeys':[_0x1adb2a]};_0x231682[_0x3499fa(0x1d9)]&&(_0x225b5d[_0x3499fa(0x1d9)]=_0x231682[_0x3499fa(0x1d9)]);_0x231682[_0x3499fa(0x1ab)]&&(_0x225b5d[_0x3499fa(0x1ab)]=convertApiCriteriaToYaml(_0x231682[_0x3499fa(0x1ab)]));if(_0x231682[_0x3499fa(0x1cc)])_0x225b5d[_0x3499fa(0x1b7)]=_0x231682[_0x3499fa(0x1cc)];else _0x231682[_0x3499fa(0x18d)]!==undefined&&(_0x225b5d['reentry']=_0x231682['allowReentry']?_0x3499fa(0x1d5):_0x3499fa(0x21c));return _0x231682[_0x3499fa(0x1a4)]&&(_0x225b5d['bundle_id']=_0x231682[_0x3499fa(0x1a4)]),_0x231682['journeyBundleName']&&(_0x225b5d[_0x3499fa(0x194)]=_0x231682[_0x3499fa(0x201)]),_0x244a53['relationships']?.[_0x3499fa(0x1e7)]?.[_0x3499fa(0x1a2)]?.['id']&&(_0x225b5d['folder_id']=_0x244a53[_0x3499fa(0x233)]['parentFolder']['data']['id']),_0x225b5d;}function a147_0x1cac(_0x50e479,_0xd84612){_0x50e479=_0x50e479-0x175;const _0x2339da=a147_0x2339();let _0x1cacf8=_0x2339da[_0x50e479];return _0x1cacf8;}export async function journeyResponseToDef(_0x52756a,_0x5edb18){const _0x3353ab=a147_0x1cac,_0x402ddb=journeyResponseToDefSync(_0x52756a);if(!_0x5edb18)return _0x402ddb;const _0x2a92dc=new Set();collectSegmentIdsFromJourney(_0x402ddb,_0x2a92dc);const _0x2950da=new Set();collectActivationIdsFromJourney(_0x402ddb,_0x2950da);const _0x11aa55={},_0x1e26c0=new Map();for(const _0x58b525 of Array[_0x3353ab(0x20e)](_0x2a92dc)[_0x3353ab(0x1de)]()){if(_0x5edb18['resolveSegment']){const _0x463f28=await _0x5edb18['resolveSegment'](_0x58b525);if(_0x463f28['isJourneyLocal']){_0x1e26c0[_0x3353ab(0x1ea)](_0x58b525,_0x463f28['name']);if(_0x463f28[_0x3353ab(0x180)]){const _0x5a0461={..._0x463f28[_0x3353ab(0x180)],'rule':deepSortObject(_0x463f28[_0x3353ab(0x180)][_0x3353ab(0x1ac)])};_0x11aa55[_0x463f28['name']]=_0x5a0461;}}else _0x1e26c0[_0x3353ab(0x1ea)](_0x58b525,makeSegmentRef(_0x463f28[_0x3353ab(0x1f0)]));}else{if(_0x5edb18[_0x3353ab(0x183)]){const _0xeb9263=await _0x5edb18[_0x3353ab(0x183)](_0x58b525);_0x1e26c0['set'](_0x58b525,_0xeb9263);}}}const _0x50fee7={},_0x981953=new Map();for(const _0x5b64e7 of Array[_0x3353ab(0x20e)](_0x2950da)['sort']()){if(_0x5edb18[_0x3353ab(0x221)]){const _0x3ec9be=await _0x5edb18[_0x3353ab(0x221)](_0x5b64e7);_0x3ec9be[_0x3353ab(0x1ba)]?(_0x981953[_0x3353ab(0x1ea)](_0x5b64e7,_0x3ec9be['name']),_0x3ec9be[_0x3353ab(0x180)]&&(_0x50fee7[_0x3ec9be[_0x3353ab(0x1f0)]]=_0x3ec9be[_0x3353ab(0x180)])):_0x981953['set'](_0x5b64e7,makeSegmentRef(_0x3ec9be[_0x3353ab(0x1f0)]));}else{if(_0x5edb18[_0x3353ab(0x211)]){const _0x1177aa=await _0x5edb18[_0x3353ab(0x211)](_0x5b64e7);_0x981953[_0x3353ab(0x1ea)](_0x5b64e7,_0x1177aa);}}}_0x1e26c0['size']>0x0&&replaceSegmentIdsInJourney(_0x402ddb,_0x1e26c0);_0x981953[_0x3353ab(0x1c1)]>0x0&&replaceActivationIdsInJourney(_0x402ddb,_0x981953);if(_0x5edb18['resolveJumpTarget']){const _0x1374eb=[];collectJumpTargetsFromJourney(_0x402ddb,_0x1374eb);if(_0x1374eb[_0x3353ab(0x178)]>0x0){const _0xb2fd37=new Map();for(const _0x18a983 of _0x1374eb){try{const _0xca1c45=await _0x5edb18[_0x3353ab(0x1c2)](_0x18a983[_0x3353ab(0x203)],_0x18a983[_0x3353ab(0x21b)]);_0xb2fd37[_0x3353ab(0x1ea)](_0x18a983[_0x3353ab(0x203)]+':'+_0x18a983['stageId'],_0xca1c45);}catch{}}_0xb2fd37['size']>0x0&&replaceJumpTargetsInJourney(_0x402ddb,_0xb2fd37);}}return Object['keys'](_0x11aa55)['length']>0x0&&(_0x402ddb['segments']=_0x11aa55),Object['keys'](_0x50fee7)[_0x3353ab(0x178)]>0x0&&(_0x402ddb['activations']=_0x50fee7),_0x402ddb;}function collectSegmentIdsFromJourney(_0x27a17c,_0x576dd6){const _0x364d05=a147_0x1cac;_0x27a17c[_0x364d05(0x1ab)]?.[_0x364d05(0x1ff)]&&_0x576dd6[_0x364d05(0x20b)](_0x27a17c['goal'][_0x364d05(0x1ff)]);const _0x2b861d=_0x2e8a34=>{const _0x41dc97=_0x364d05;for(const _0x492cc2 of _0x2e8a34){_0x492cc2['entry_criteria']?.[_0x41dc97(0x1ff)]&&_0x576dd6['add'](_0x492cc2['entry_criteria'][_0x41dc97(0x1ff)]);if(_0x492cc2[_0x41dc97(0x1c7)])for(const _0x1ca250 of _0x492cc2['exit_criteria']){_0x1ca250[_0x41dc97(0x1ff)]&&_0x576dd6[_0x41dc97(0x20b)](_0x1ca250[_0x41dc97(0x1ff)]);}_0x492cc2[_0x41dc97(0x216)]?.['segment']&&_0x576dd6[_0x41dc97(0x20b)](_0x492cc2[_0x41dc97(0x216)][_0x41dc97(0x1ff)]);if(_0x492cc2[_0x41dc97(0x17f)])for(const _0x48bf5f of _0x492cc2['steps']){if(_0x48bf5f[_0x41dc97(0x182)]===_0x41dc97(0x1db)){const _0x5174f6=_0x48bf5f;for(const _0x24dd98 of _0x5174f6[_0x41dc97(0x1e0)][_0x41dc97(0x1da)]){_0x24dd98[_0x41dc97(0x1ff)]&&_0x576dd6[_0x41dc97(0x20b)](_0x24dd98['segment']);}}else{if(_0x48bf5f[_0x41dc97(0x182)]===_0x41dc97(0x1d7)){const _0xb6699f=_0x48bf5f;_0xb6699f['with'][_0x41dc97(0x22e)]?.['segment']&&_0x576dd6[_0x41dc97(0x20b)](_0xb6699f[_0x41dc97(0x1e0)][_0x41dc97(0x22e)]['segment']);}}}}};if(_0x27a17c['journeys'])for(const _0xabc73c of _0x27a17c['journeys']){_0xabc73c[_0x364d05(0x1ab)]?.[_0x364d05(0x1ff)]&&_0x576dd6[_0x364d05(0x20b)](_0xabc73c['goal'][_0x364d05(0x1ff)]),_0x2b861d(_0xabc73c['stages']);}_0x27a17c[_0x364d05(0x1fb)]&&_0x2b861d(_0x27a17c[_0x364d05(0x1fb)]);if(_0x27a17c[_0x364d05(0x1c0)])for(const _0x18ff38 of _0x27a17c[_0x364d05(0x1c0)]){_0x2b861d(_0x18ff38[_0x364d05(0x1fb)]);}}function replaceSegmentIdsInJourney(_0x346843,_0x25de35){const _0x5c195e=a147_0x1cac,_0xb62dda=_0x3a6f4d=>_0x25de35[_0x5c195e(0x208)](_0x3a6f4d)||_0x3a6f4d;_0x346843['goal']?.[_0x5c195e(0x1ff)]&&(_0x346843['goal'][_0x5c195e(0x1ff)]=_0xb62dda(_0x346843['goal'][_0x5c195e(0x1ff)]));const _0x34f0f6=_0x412897=>{const _0x3806cb=_0x5c195e;for(const _0x2efa0b of _0x412897){_0x2efa0b[_0x3806cb(0x1e2)]?.[_0x3806cb(0x1ff)]&&(_0x2efa0b[_0x3806cb(0x1e2)][_0x3806cb(0x1ff)]=_0xb62dda(_0x2efa0b[_0x3806cb(0x1e2)]['segment']));if(_0x2efa0b['exit_criteria'])for(const _0x31093b of _0x2efa0b[_0x3806cb(0x1c7)]){_0x31093b[_0x3806cb(0x1ff)]&&(_0x31093b[_0x3806cb(0x1ff)]=_0xb62dda(_0x31093b[_0x3806cb(0x1ff)]));}_0x2efa0b[_0x3806cb(0x216)]?.[_0x3806cb(0x1ff)]&&(_0x2efa0b['milestone'][_0x3806cb(0x1ff)]=_0xb62dda(_0x2efa0b[_0x3806cb(0x216)]['segment']));if(_0x2efa0b['steps'])for(const _0x109961 of _0x2efa0b[_0x3806cb(0x17f)]){if(_0x109961['type']==='decision_point'){const _0xb444fe=_0x109961;for(const _0x588411 of _0xb444fe[_0x3806cb(0x1e0)][_0x3806cb(0x1da)]){_0x588411[_0x3806cb(0x1ff)]&&(_0x588411['segment']=_0xb62dda(_0x588411[_0x3806cb(0x1ff)]));}}else{if(_0x109961[_0x3806cb(0x182)]===_0x3806cb(0x1d7)){const _0x4b0130=_0x109961;_0x4b0130[_0x3806cb(0x1e0)][_0x3806cb(0x22e)]?.[_0x3806cb(0x1ff)]&&(_0x4b0130['with'][_0x3806cb(0x22e)][_0x3806cb(0x1ff)]=_0xb62dda(_0x4b0130[_0x3806cb(0x1e0)]['condition'][_0x3806cb(0x1ff)]));}}}}};if(_0x346843['journeys'])for(const _0x4be978 of _0x346843['journeys']){_0x4be978['goal']?.[_0x5c195e(0x1ff)]&&(_0x4be978['goal'][_0x5c195e(0x1ff)]=_0xb62dda(_0x4be978[_0x5c195e(0x1ab)][_0x5c195e(0x1ff)])),_0x34f0f6(_0x4be978['stages']);}_0x346843['stages']&&_0x34f0f6(_0x346843['stages']);if(_0x346843[_0x5c195e(0x1c0)])for(const _0x52afc1 of _0x346843[_0x5c195e(0x1c0)]){_0x34f0f6(_0x52afc1[_0x5c195e(0x1fb)]);}}function collectActivationIdsFromJourney(_0x8faf83,_0x4f53b4){const _0xbc2cd2=a147_0x1cac,_0x3c931a=_0x4489b4=>{const _0x51baf8=a147_0x1cac;for(const _0xfcf977 of _0x4489b4){if(_0xfcf977[_0x51baf8(0x17f)])for(const _0x70f68d of _0xfcf977[_0x51baf8(0x17f)]){if(_0x70f68d['type']===_0x51baf8(0x1bb)){const _0xfffd31=_0x70f68d;_0xfffd31[_0x51baf8(0x1e0)][_0x51baf8(0x1bb)]&&/^\d+$/[_0x51baf8(0x188)](_0xfffd31[_0x51baf8(0x1e0)]['activation'])&&_0x4f53b4[_0x51baf8(0x20b)](_0xfffd31[_0x51baf8(0x1e0)][_0x51baf8(0x1bb)]);}}}};if(_0x8faf83[_0xbc2cd2(0x1e4)])for(const _0x496fbf of _0x8faf83[_0xbc2cd2(0x1e4)]){_0x3c931a(_0x496fbf[_0xbc2cd2(0x1fb)]);}_0x8faf83[_0xbc2cd2(0x1fb)]&&_0x3c931a(_0x8faf83[_0xbc2cd2(0x1fb)]);if(_0x8faf83[_0xbc2cd2(0x1c0)])for(const _0x21d773 of _0x8faf83[_0xbc2cd2(0x1c0)]){_0x3c931a(_0x21d773[_0xbc2cd2(0x1fb)]);}}function replaceActivationIdsInJourney(_0x548d38,_0x48c7f9){const _0x56f236=a147_0x1cac,_0x7e4b02=_0x48a598=>_0x48c7f9['get'](_0x48a598)||_0x48a598,_0x5ca119=_0x192337=>{const _0x265075=a147_0x1cac;for(const _0x1df99c of _0x192337){if(_0x1df99c['steps'])for(const _0x6d9c7 of _0x1df99c[_0x265075(0x17f)]){if(_0x6d9c7['type']===_0x265075(0x1bb)){const _0x9a014d=_0x6d9c7;_0x9a014d[_0x265075(0x1e0)][_0x265075(0x1bb)]&&(_0x9a014d[_0x265075(0x1e0)][_0x265075(0x1bb)]=_0x7e4b02(_0x9a014d['with'][_0x265075(0x1bb)]));}}}};if(_0x548d38[_0x56f236(0x1e4)])for(const _0x531b14 of _0x548d38[_0x56f236(0x1e4)]){_0x5ca119(_0x531b14['stages']);}_0x548d38[_0x56f236(0x1fb)]&&_0x5ca119(_0x548d38[_0x56f236(0x1fb)]);if(_0x548d38[_0x56f236(0x1c0)])for(const _0x201303 of _0x548d38['versions']){_0x5ca119(_0x201303[_0x56f236(0x1fb)]);}}function collectJumpTargetsFromJourney(_0x402fcd,_0x58057d){const _0x11dc52=a147_0x1cac,_0x3c1764=new Set(),_0x6844c5=_0x3f605a=>{const _0x138d80=a147_0x1cac;for(const _0x58b1da of _0x3f605a){if(_0x58b1da['steps'])for(const _0x51415f of _0x58b1da['steps']){if(_0x51415f['type']==='jump'){const _0x219441=_0x51415f,_0x13f037=_0x219441[_0x138d80(0x1e0)][_0x138d80(0x176)];if(_0x13f037['journey']&&_0x13f037[_0x138d80(0x232)]&&/^\d+$/[_0x138d80(0x188)](_0x13f037[_0x138d80(0x1be)])&&/^\d+$/[_0x138d80(0x188)](_0x13f037[_0x138d80(0x232)])){const _0x13604a=_0x13f037[_0x138d80(0x1be)]+':'+_0x13f037[_0x138d80(0x232)];!_0x3c1764[_0x138d80(0x1cd)](_0x13604a)&&(_0x3c1764[_0x138d80(0x20b)](_0x13604a),_0x58057d[_0x138d80(0x1f7)]({'journeyId':_0x13f037['journey'],'stageId':_0x13f037['stage']}));}}}}};if(_0x402fcd[_0x11dc52(0x1e4)])for(const _0x10f9f6 of _0x402fcd[_0x11dc52(0x1e4)]){_0x6844c5(_0x10f9f6[_0x11dc52(0x1fb)]);}_0x402fcd[_0x11dc52(0x1fb)]&&_0x6844c5(_0x402fcd['stages']);if(_0x402fcd['versions'])for(const _0x48e9fa of _0x402fcd[_0x11dc52(0x1c0)]){_0x6844c5(_0x48e9fa[_0x11dc52(0x1fb)]);}}function replaceJumpTargetsInJourney(_0x3f99a3,_0x2f0b8a){const _0x13e8e5=a147_0x1cac,_0x4e2be5=_0x203b93=>{const _0x1f6c56=a147_0x1cac;for(const _0x5a5471 of _0x203b93){if(_0x5a5471[_0x1f6c56(0x17f)])for(const _0x17a88b of _0x5a5471[_0x1f6c56(0x17f)]){if(_0x17a88b[_0x1f6c56(0x182)]===_0x1f6c56(0x1af)){const _0x3c2ac5=_0x17a88b,_0x17c313=_0x3c2ac5[_0x1f6c56(0x1e0)]['target'],_0x7ebeb7=_0x17c313[_0x1f6c56(0x1be)]+':'+_0x17c313['stage'],_0x3b49e6=_0x2f0b8a['get'](_0x7ebeb7);_0x3b49e6&&(_0x17c313[_0x1f6c56(0x1be)]=_0x3b49e6[_0x1f6c56(0x1fc)],_0x17c313[_0x1f6c56(0x232)]=_0x3b49e6[_0x1f6c56(0x19c)]);}}}};if(_0x3f99a3[_0x13e8e5(0x1e4)])for(const _0x426904 of _0x3f99a3['journeys']){_0x4e2be5(_0x426904[_0x13e8e5(0x1fb)]);}_0x3f99a3[_0x13e8e5(0x1fb)]&&_0x4e2be5(_0x3f99a3[_0x13e8e5(0x1fb)]);if(_0x3f99a3[_0x13e8e5(0x1c0)])for(const _0x55480b of _0x3f99a3[_0x13e8e5(0x1c0)]){_0x4e2be5(_0x55480b[_0x13e8e5(0x1fb)]);}}function generateReadableStepName(_0x50df06,_0x3d78c6){const _0x5b3359=a147_0x1cac;if(_0x50df06['name']&&_0x50df06[_0x5b3359(0x1f0)]!==_0x50df06['type']){const _0x593e0e=_0x50df06['name']['trim']();if(_0x593e0e&&/[a-z0-9\p{L}]/iu[_0x5b3359(0x188)](_0x593e0e))return _0x593e0e;}const _0x23fd2f=_0x50df06['type'][_0x5b3359(0x229)]()['replace'](/step$/i,'');return _0x23fd2f+'_'+(_0x3d78c6+0x1);}function getStepNextRefs(_0x301306){const _0x3e8296=a147_0x1cac,_0x1d75e8=[];if(_0x301306[_0x3e8296(0x207)])_0x1d75e8[_0x3e8296(0x1f7)](_0x301306['next']);if(_0x301306[_0x3e8296(0x1da)])for(const _0xb5350b of _0x301306[_0x3e8296(0x1da)]){if(_0xb5350b['next'])_0x1d75e8[_0x3e8296(0x1f7)](_0xb5350b[_0x3e8296(0x207)]);}if(_0x301306['variants'])for(const _0x17f3ac of _0x301306[_0x3e8296(0x17d)]){if(_0x17f3ac[_0x3e8296(0x207)])_0x1d75e8[_0x3e8296(0x1f7)](_0x17f3ac[_0x3e8296(0x207)]);}if(_0x301306[_0x3e8296(0x1c4)])for(const _0x3139fa of _0x301306[_0x3e8296(0x1c4)]){if(_0x3139fa[_0x3e8296(0x207)])_0x1d75e8[_0x3e8296(0x1f7)](_0x3139fa['next']);}return _0x1d75e8;}function parseJumpTargetDisplayName(_0x84ea83){const _0x2a13b5=a147_0x1cac,_0x1d83b0=_0x84ea83[_0x2a13b5(0x1c9)](/^(.+?)\s*\(([^/)]+)/);if(!_0x1d83b0)return undefined;const _0x31fb40=_0x1d83b0[0x1]['trim'](),_0x2c64e6=_0x1d83b0[0x2][_0x2a13b5(0x225)]();if(!_0x31fb40||!_0x2c64e6)return undefined;return{'stageName':_0x31fb40,'journeyName':_0x2c64e6};}function orderStepsFromRoot(_0x320e21,_0x9f43ad){const _0x29eb0d=a147_0x1cac,_0x130f39=Object['entries'](_0x320e21);if(_0x130f39[_0x29eb0d(0x178)]===0x0)return[];const _0x69ff60=new Set(_0x130f39[_0x29eb0d(0x1f2)](([_0x48fe59])=>_0x48fe59)),_0x83efb0=new Set();for(const [,_0x1b02f3]of _0x130f39){for(const _0x10c3aa of getStepNextRefs(_0x1b02f3)){if(_0x69ff60[_0x29eb0d(0x1cd)](_0x10c3aa))_0x83efb0[_0x29eb0d(0x20b)](_0x10c3aa);}}let _0x45111c=_0x9f43ad&&_0x69ff60[_0x29eb0d(0x1cd)](_0x9f43ad)?_0x9f43ad:undefined;if(!_0x45111c){const _0x498d53=_0x130f39[_0x29eb0d(0x212)](([_0x551870])=>!_0x83efb0['has'](_0x551870));_0x498d53[_0x29eb0d(0x178)]>0x0?_0x45111c=_0x498d53[0x0][0x0]:_0x45111c=_0x130f39[0x0][0x0];}const _0xf89a4b=[],_0x3dc438=new Set(),_0x2ed67d=[_0x45111c];while(_0x2ed67d[_0x29eb0d(0x178)]>0x0){const _0x15a84b=_0x2ed67d[_0x29eb0d(0x17e)]();if(_0x3dc438[_0x29eb0d(0x1cd)](_0x15a84b))continue;_0x3dc438['add'](_0x15a84b);const _0x3ade80=_0x320e21[_0x15a84b];if(!_0x3ade80)continue;_0xf89a4b[_0x29eb0d(0x1f7)]({'uuid':_0x15a84b,'step':_0x3ade80});for(const _0x27275a of getStepNextRefs(_0x3ade80)){_0x69ff60[_0x29eb0d(0x1cd)](_0x27275a)&&!_0x3dc438[_0x29eb0d(0x1cd)](_0x27275a)&&_0x2ed67d[_0x29eb0d(0x1f7)](_0x27275a);}}for(const [_0x3c2372,_0x19d7ef]of _0x130f39){!_0x3dc438[_0x29eb0d(0x1cd)](_0x3c2372)&&_0xf89a4b[_0x29eb0d(0x1f7)]({'uuid':_0x3c2372,'step':_0x19d7ef});}return _0xf89a4b;}function resolveStepReferences(_0x4f2dbc,_0x1c1c57,_0x45e416,_0x55fdb3){const _0x22195c=a147_0x1cac;if(_0x4f2dbc[_0x22195c(0x182)]!==_0x22195c(0x1ca)){_0x4f2dbc[_0x22195c(0x207)]&&_0x55fdb3['has'](_0x4f2dbc['next'])&&(_0x4f2dbc[_0x22195c(0x207)]=_0x55fdb3[_0x22195c(0x208)](_0x4f2dbc[_0x22195c(0x207)]));const _0x126815=_0x1c1c57+0x1;if(_0x126815<_0x45e416[_0x22195c(0x178)]){const _0x287e8f=_0x55fdb3['get'](_0x45e416[_0x126815][_0x22195c(0x185)]);_0x4f2dbc[_0x22195c(0x207)]===_0x287e8f&&delete _0x4f2dbc['next'];}}if(_0x4f2dbc['type']==='decision_point')for(const _0xdaa595 of _0x4f2dbc['with'][_0x22195c(0x1da)]){_0xdaa595[_0x22195c(0x207)]&&_0x55fdb3[_0x22195c(0x1cd)](_0xdaa595[_0x22195c(0x207)])&&(_0xdaa595[_0x22195c(0x207)]=_0x55fdb3[_0x22195c(0x208)](_0xdaa595[_0x22195c(0x207)]));}if(_0x4f2dbc[_0x22195c(0x182)]==='ab_test')for(const _0x4d1326 of _0x4f2dbc[_0x22195c(0x1e0)][_0x22195c(0x17d)]){_0x4d1326[_0x22195c(0x207)]&&_0x55fdb3[_0x22195c(0x1cd)](_0x4d1326[_0x22195c(0x207)])&&(_0x4d1326[_0x22195c(0x207)]=_0x55fdb3[_0x22195c(0x208)](_0x4d1326[_0x22195c(0x207)]));}if(_0x4f2dbc[_0x22195c(0x182)]===_0x22195c(0x1d7)&&_0x4f2dbc[_0x22195c(0x1e0)]['condition']){const _0x3e2b0d=_0x4f2dbc[_0x22195c(0x1e0)]['condition'];_0x3e2b0d[_0x22195c(0x207)]&&_0x55fdb3[_0x22195c(0x1cd)](_0x3e2b0d['next'])&&(_0x3e2b0d[_0x22195c(0x207)]=_0x55fdb3[_0x22195c(0x208)](_0x3e2b0d['next'])),_0x3e2b0d[_0x22195c(0x191)]?.[_0x22195c(0x207)]&&_0x55fdb3[_0x22195c(0x1cd)](_0x3e2b0d['timeout'][_0x22195c(0x207)])&&(_0x3e2b0d[_0x22195c(0x191)][_0x22195c(0x207)]=_0x55fdb3[_0x22195c(0x208)](_0x3e2b0d[_0x22195c(0x191)][_0x22195c(0x207)]));}}function convertApiStageToYaml(_0x5492a9){const _0x12359a=a147_0x1cac,_0x1f8125={'name':_0x5492a9[_0x12359a(0x1f0)]};_0x5492a9['id']&&(_0x1f8125['id']=_0x5492a9['id']);_0x5492a9['description']&&(_0x1f8125['description']=_0x5492a9[_0x12359a(0x1d9)]);_0x5492a9['entryCriteria']&&(_0x1f8125[_0x12359a(0x1e2)]=convertApiCriteriaToYaml(_0x5492a9[_0x12359a(0x19d)]));_0x5492a9[_0x12359a(0x22d)]&&_0x5492a9['exitCriterias']['length']>0x0&&(_0x1f8125['exit_criteria']=_0x5492a9[_0x12359a(0x22d)][_0x12359a(0x1f2)](convertApiCriteriaToYaml));_0x5492a9[_0x12359a(0x216)]&&(_0x1f8125['milestone']=convertApiCriteriaToYaml(_0x5492a9['milestone']));if(_0x5492a9[_0x12359a(0x17f)]&&Object['keys'](_0x5492a9[_0x12359a(0x17f)])['length']>0x0){const _0x2cc676=orderStepsFromRoot(_0x5492a9[_0x12359a(0x17f)],_0x5492a9['rootStep']),_0x472179=new Map(),_0x459072=new Set();for(let _0x57e4f1=0x0;_0x57e4f1<_0x2cc676[_0x12359a(0x178)];_0x57e4f1++){const {uuid:_0x4f7994,step:_0x3dceab}=_0x2cc676[_0x57e4f1];let _0x34ef2b=generateReadableStepName(_0x3dceab,_0x57e4f1),_0x1a557b=_0x34ef2b,_0x1d957f=0x2;while(_0x459072['has'](_0x1a557b)){_0x1a557b=_0x34ef2b+'_'+_0x1d957f,_0x1d957f++;}_0x459072['add'](_0x1a557b),_0x472179[_0x12359a(0x1ea)](_0x4f7994,_0x1a557b);}_0x1f8125['steps']=_0x2cc676['map'](({uuid:_0x3d8d88,step:_0x299789},_0x23f09a)=>{const _0x13fee5=convertApiStepToYaml(_0x299789,_0x472179['get'](_0x3d8d88));return resolveStepReferences(_0x13fee5,_0x23f09a,_0x2cc676,_0x472179),_0x13fee5;});}return _0x1f8125;}function convertApiCriteriaToYaml(_0xc51287){const _0xb0ff1f=a147_0x1cac,_0x44afcd={'name':_0xc51287[_0xb0ff1f(0x1f0)],'segment':_0xc51287[_0xb0ff1f(0x17b)]};_0xc51287[_0xb0ff1f(0x1d9)]&&(_0x44afcd[_0xb0ff1f(0x1d9)]=_0xc51287['description']);if(_0xc51287['target']){let _0x145203=_0xc51287[_0xb0ff1f(0x176)]['journeyId'],_0x1b827b=_0xc51287[_0xb0ff1f(0x176)][_0xb0ff1f(0x218)];if(_0xc51287[_0xb0ff1f(0x176)][_0xb0ff1f(0x1fc)]){const _0x2d7c2e=parseJumpTargetDisplayName(_0xc51287[_0xb0ff1f(0x176)][_0xb0ff1f(0x1fc)]);_0x2d7c2e&&(_0x1b827b=_0x2d7c2e[_0xb0ff1f(0x19c)],_0x145203=_0x2d7c2e[_0xb0ff1f(0x1fc)]);}_0x44afcd[_0xb0ff1f(0x176)]={'journey':_0x145203,'stage':_0x1b827b},_0xc51287[_0xb0ff1f(0x176)][_0xb0ff1f(0x1a4)]&&(_0x44afcd[_0xb0ff1f(0x176)][_0xb0ff1f(0x1a8)]=_0xc51287['target'][_0xb0ff1f(0x1a4)]);}return _0x44afcd;}function convertApiStepToYaml(_0x5127d6,_0x262052){const _0x3dd488=a147_0x1cac;switch(_0x5127d6[_0x3dd488(0x182)]){case _0x3dd488(0x19e):{const _0x299d1b={};if(_0x5127d6[_0x3dd488(0x1c5)]==='Duration'&&_0x5127d6[_0x3dd488(0x1dc)]!==undefined)_0x299d1b[_0x3dd488(0x209)]=_0x5127d6[_0x3dd488(0x1dc)],_0x299d1b[_0x3dd488(0x1f4)]=_0x5127d6[_0x3dd488(0x18c)];else{if(_0x5127d6[_0x3dd488(0x1c5)]===_0x3dd488(0x1a5)&&_0x5127d6['waitUntilDate'])_0x299d1b[_0x3dd488(0x1b4)]=_0x5127d6[_0x3dd488(0x230)];else{if(_0x5127d6[_0x3dd488(0x1c5)]===_0x3dd488(0x1a3)&&_0x5127d6[_0x3dd488(0x22c)])_0x299d1b[_0x3dd488(0x18a)]=_0x5127d6[_0x3dd488(0x22c)];else{if(_0x5127d6[_0x3dd488(0x1c5)]===_0x3dd488(0x22f)){if(_0x5127d6['conditions']&&_0x5127d6['conditions'][_0x3dd488(0x178)]>0x0){const _0x70b5f6=_0x5127d6['conditions'][_0x3dd488(0x1a9)](_0x3e88fe=>!_0x3e88fe[_0x3dd488(0x18b)]),_0x1c643a=_0x5127d6[_0x3dd488(0x1c4)][_0x3dd488(0x1a9)](_0x1121c6=>_0x1121c6[_0x3dd488(0x18b)]);_0x70b5f6?.[_0x3dd488(0x17b)]&&(_0x299d1b[_0x3dd488(0x22e)]={'segment':_0x70b5f6[_0x3dd488(0x17b)],..._0x70b5f6[_0x3dd488(0x207)]?{'next':_0x70b5f6[_0x3dd488(0x207)]}:{}},_0x1c643a&&_0x1c643a[_0x3dd488(0x20a)]!==undefined&&_0x1c643a[_0x3dd488(0x1f4)]&&(_0x299d1b['condition'][_0x3dd488(0x191)]={'duration':_0x1c643a[_0x3dd488(0x20a)],'unit':_0x1c643a[_0x3dd488(0x1f4)],..._0x1c643a['next']?{'next':_0x1c643a[_0x3dd488(0x207)]}:{}}));}else _0x5127d6[_0x3dd488(0x1df)]&&(_0x299d1b[_0x3dd488(0x22e)]={'segment':_0x5127d6[_0x3dd488(0x1df)]},_0x5127d6[_0x3dd488(0x1ef)]!==undefined&&_0x5127d6[_0x3dd488(0x1f1)]&&(_0x299d1b['condition'][_0x3dd488(0x191)]={'duration':_0x5127d6[_0x3dd488(0x1ef)],'unit':_0x5127d6['conditionTimeoutUnit']}));}}}}const _0x4dc482={'type':_0x3dd488(0x1d7),'name':_0x262052,..._0x5127d6[_0x3dd488(0x207)]?{'next':_0x5127d6[_0x3dd488(0x207)]}:{},'with':_0x299d1b};return _0x4dc482;}case'Activation':{const _0xc57106={'type':'activation','name':_0x262052,..._0x5127d6[_0x3dd488(0x207)]?{'next':_0x5127d6[_0x3dd488(0x207)]}:{},'with':{'activation':_0x5127d6[_0x3dd488(0x1ed)]||''}};return _0xc57106;}case _0x3dd488(0x22a):{const _0x5681ab={'type':'decision_point','name':_0x262052,..._0x5127d6['next']?{'next':_0x5127d6['next']}:{},'with':{'branches':(_0x5127d6[_0x3dd488(0x1da)]||[])[_0x3dd488(0x1f2)](_0x44907d=>({'name':_0x44907d[_0x3dd488(0x1f0)],'segment':_0x44907d[_0x3dd488(0x17b)],'excluded':_0x44907d[_0x3dd488(0x20f)],..._0x44907d[_0x3dd488(0x207)]?{'next':_0x44907d[_0x3dd488(0x207)]}:{}}))}};return _0x5681ab;}case _0x3dd488(0x1eb):case _0x3dd488(0x228):case _0x3dd488(0x1c3):{const _0x3e7152=_0x5127d6['variants']||(_0x5127d6[_0x3dd488(0x1da)]||[])[_0x3dd488(0x1f2)](_0x32744a=>({'name':_0x32744a[_0x3dd488(0x1f0)],'percentage':0x0,'next':_0x32744a[_0x3dd488(0x207)]})),_0x102e1e={'type':_0x3dd488(0x1ee),'name':_0x262052,..._0x5127d6[_0x3dd488(0x207)]?{'next':_0x5127d6[_0x3dd488(0x207)]}:{},'with':{'customized_split':_0x5127d6[_0x3dd488(0x215)],'unique_id':_0x5127d6[_0x3dd488(0x1ae)],'variants':_0x3e7152[_0x3dd488(0x1f2)](_0x468851=>({'name':_0x468851[_0x3dd488(0x1f0)],'percentage':_0x468851[_0x3dd488(0x1e8)],..._0x468851[_0x3dd488(0x207)]?{'next':_0x468851[_0x3dd488(0x207)]}:{}}))}};return _0x102e1e;}case _0x3dd488(0x1fd):{const _0x442015={'type':_0x3dd488(0x204),'name':_0x262052,..._0x5127d6[_0x3dd488(0x207)]?{'next':_0x5127d6[_0x3dd488(0x207)]}:{}};return _0x442015;}case _0x3dd488(0x1f9):{let _0x1ca4d8='',_0x39fe0e='',_0x208414;if(_0x5127d6[_0x3dd488(0x176)]){_0x1ca4d8=_0x5127d6['target'][_0x3dd488(0x203)],_0x39fe0e=_0x5127d6['target'][_0x3dd488(0x218)],_0x208414=_0x5127d6[_0x3dd488(0x176)]['journeyBundleId'];if(_0x5127d6[_0x3dd488(0x176)]['journeyName']){const _0x130f1c=parseJumpTargetDisplayName(_0x5127d6[_0x3dd488(0x176)][_0x3dd488(0x1fc)]);_0x130f1c&&(_0x39fe0e=_0x130f1c[_0x3dd488(0x19c)],_0x1ca4d8=_0x130f1c['journeyName']);}}const _0x24a7f9={'type':'jump','name':_0x262052,..._0x5127d6[_0x3dd488(0x207)]?{'next':_0x5127d6['next']}:{},'with':{'target':{'journey':_0x1ca4d8,'stage':_0x39fe0e,..._0x208414?{'bundle_id':_0x208414}:{}}}};return _0x24a7f9;}case _0x3dd488(0x1bc):{const _0x57493d={'type':'end','name':_0x262052};return _0x57493d;}default:{const _0x2805bb={'type':_0x3dd488(0x1ca),'name':_0x262052};return _0x2805bb;}}}export async function journeyDefToRequest(_0x339df3,_0x578bad,_0xb38a9f){const _0x4ebadf=a147_0x1cac,_0x514c53=_0x339df3[_0x4ebadf(0x1fb)]||getActiveStages(_0x339df3),_0x3b5d6e=isJourneysArrayMode(_0x339df3)||isMultiVersionMode(_0x339df3)?getLatestJourneyEntry(_0x339df3):undefined,_0x43489e=_0x3b5d6e?.[_0x4ebadf(0x235)]??_0x339df3[_0x4ebadf(0x1f0)],_0x5f23a0=_0x339df3['segments']||{},_0x2a8149=_0x339df3[_0x4ebadf(0x189)]||{},_0x5458ca={'type':_0x4ebadf(0x1be),'attributes':{'name':_0x43489e,'audienceId':_0x578bad,'journeyStages':await Promise[_0x4ebadf(0x175)](_0x514c53[_0x4ebadf(0x1f2)](_0x556f7d=>convertYamlStageToApi(_0x556f7d,_0xb38a9f,_0x5f23a0,_0x2a8149)))}},_0x518c41=_0x3b5d6e?.['id']??_0x339df3['id'];_0x518c41&&(_0x5458ca['id']=_0x518c41);_0x339df3[_0x4ebadf(0x1d9)]&&(_0x5458ca['attributes'][_0x4ebadf(0x1d9)]=_0x339df3['description']);const _0x202652=getEffectiveGoal(_0x339df3);_0x202652&&(_0x5458ca[_0x4ebadf(0x1d4)][_0x4ebadf(0x1ab)]=await convertYamlCriteriaToApi(_0x202652,_0xb38a9f,_0x5f23a0));const _0x5dbfce=getEffectiveReentry(_0x339df3);return _0x5dbfce&&(_0x5458ca[_0x4ebadf(0x1d4)][_0x4ebadf(0x1cc)]=_0x5dbfce,_0x5458ca[_0x4ebadf(0x1d4)][_0x4ebadf(0x18d)]=_0x5dbfce!==_0x4ebadf(0x21c)),_0x339df3[_0x4ebadf(0x200)]&&(_0x5458ca['relationships']={'parentFolder':{'data':{'id':_0x339df3[_0x4ebadf(0x200)],'type':_0x4ebadf(0x19b)}}}),_0x5458ca;}async function convertYamlStageToApi(_0x505af9,_0x12ce94,_0xd2ea65={},_0x4b2181={}){const _0x9d9fe=a147_0x1cac,_0x56478f={'name':_0x505af9[_0x9d9fe(0x1f0)]};_0x505af9['id']&&(_0x56478f['id']=_0x505af9['id']);_0x505af9['description']&&(_0x56478f['description']=_0x505af9[_0x9d9fe(0x1d9)]);_0x505af9[_0x9d9fe(0x1e2)]&&(_0x56478f[_0x9d9fe(0x19d)]=await convertYamlCriteriaToApi(_0x505af9[_0x9d9fe(0x1e2)],_0x12ce94,_0xd2ea65));_0x505af9[_0x9d9fe(0x1c7)]&&_0x505af9[_0x9d9fe(0x1c7)]['length']>0x0&&(_0x56478f[_0x9d9fe(0x22d)]=await Promise[_0x9d9fe(0x175)](_0x505af9['exit_criteria']['map'](_0x20eb7f=>convertYamlCriteriaToApi(_0x20eb7f,_0x12ce94,_0xd2ea65))));_0x505af9['milestone']&&(_0x56478f[_0x9d9fe(0x216)]=await convertYamlCriteriaToApi(_0x505af9[_0x9d9fe(0x216)],_0x12ce94,_0xd2ea65));if(_0x505af9[_0x9d9fe(0x17f)]&&_0x505af9[_0x9d9fe(0x17f)]['length']>0x0){const _0x4adad8={},_0x3fc8ea=_0x505af9[_0x9d9fe(0x17f)][_0x9d9fe(0x1f2)]((_0xf3ec82,_0x51f1e0)=>{const _0x2385a2=_0x9d9fe,_0x2ebc7d=_0xf3ec82[_0x2385a2(0x185)]||generateUUID(),_0x769ce1=_0xf3ec82[_0x2385a2(0x1f0)]||_0xf3ec82[_0x2385a2(0x182)]+'_'+_0x51f1e0;return _0x4adad8[_0x769ce1]=_0x2ebc7d,{..._0xf3ec82,'name':_0x769ce1};});_0x56478f[_0x9d9fe(0x21d)]=_0x4adad8[_0x3fc8ea[0x0][_0x9d9fe(0x1f0)]],_0x56478f[_0x9d9fe(0x17f)]={};for(let _0x4c5a7a=0x0;_0x4c5a7a<_0x3fc8ea[_0x9d9fe(0x178)];_0x4c5a7a++){const _0x5993e4=_0x3fc8ea[_0x4c5a7a],_0x3aa86c=_0x4adad8[_0x5993e4[_0x9d9fe(0x1f0)]],_0xf38dc0=!_0x5993e4[_0x9d9fe(0x207)]&&_0x4c5a7a<_0x3fc8ea['length']-0x1&&_0x5993e4[_0x9d9fe(0x182)]!==_0x9d9fe(0x1ca)?_0x3fc8ea[_0x4c5a7a+0x1][_0x9d9fe(0x1f0)]:_0x5993e4[_0x9d9fe(0x207)],_0x1ccac5=_0xf38dc0!==_0x5993e4['next']?{..._0x5993e4,'next':_0xf38dc0}:_0x5993e4;_0x56478f[_0x9d9fe(0x17f)][_0x3aa86c]=await convertYamlStepToApi(_0x1ccac5,_0x12ce94,_0xd2ea65,_0x4adad8,_0x4b2181);}}else _0x505af9[_0x9d9fe(0x1b3)]&&(_0x56478f[_0x9d9fe(0x21d)]=_0x505af9[_0x9d9fe(0x1b3)]);return _0x56478f;}async function convertYamlCriteriaToApi(_0x4e873d,_0xa29e03,_0x541869={}){const _0x589f26=a147_0x1cac;let _0x4143e5=_0x4e873d[_0x589f26(0x1ff)];if(_0x4143e5&&!/^\d+$/['test'](_0x4143e5)){const _0x307926=parseSegmentRef(_0x4143e5);if(_0x307926[_0x589f26(0x182)]===_0x589f26(0x17c))_0xa29e03?.['resolveSegmentId']&&(_0x4143e5=await _0xa29e03['resolveSegmentId'](_0x307926[_0x589f26(0x1f0)]));else{if(_0x307926['type']==='embedded'&&_0x541869[_0x307926[_0x589f26(0x1f0)]])_0xa29e03?.[_0x589f26(0x1ad)]&&(_0x4143e5=await _0xa29e03[_0x589f26(0x1ad)](_0x307926[_0x589f26(0x1f0)],_0x541869[_0x307926[_0x589f26(0x1f0)]]));else _0xa29e03?.[_0x589f26(0x196)]&&(_0x4143e5=await _0xa29e03[_0x589f26(0x196)](_0x307926[_0x589f26(0x1f0)]));}}const _0x5a5097={'name':_0x4e873d['name'],'segmentId':_0x4143e5};_0x4e873d[_0x589f26(0x1d9)]&&(_0x5a5097[_0x589f26(0x1d9)]=_0x4e873d[_0x589f26(0x1d9)]);if(_0x4e873d[_0x589f26(0x176)]){const _0x54b26c=_0x4e873d[_0x589f26(0x176)][_0x589f26(0x1be)],_0x5afaa8=_0x4e873d[_0x589f26(0x176)]['stage'];let _0x4479ef=_0x4e873d['target'][_0x589f26(0x1be)];_0xa29e03?.[_0x589f26(0x1f3)]&&!/^\d+$/[_0x589f26(0x188)](_0x4479ef)&&(_0x4479ef=await _0xa29e03[_0x589f26(0x1f3)](_0x4479ef));let _0x8ab278=_0x4e873d[_0x589f26(0x176)][_0x589f26(0x232)];_0xa29e03?.[_0x589f26(0x195)]&&!/^\d+$/['test'](_0x8ab278)&&(_0x8ab278=await _0xa29e03['resolveStageId'](_0x4479ef,_0x8ab278));const _0x5558df=!/^\d+$/['test'](_0x54b26c)&&!isLocalJourneyRef(_0x54b26c)?formatApiJourneyName(_0x54b26c,_0x5afaa8):undefined;_0x5a5097['target']={'journeyId':_0x4479ef,'journeyStageId':_0x8ab278,'journeyName':_0x5558df,'confirmed':!![]},_0x4e873d[_0x589f26(0x176)][_0x589f26(0x1a8)]&&(_0x5a5097[_0x589f26(0x176)][_0x589f26(0x1a4)]=_0x4e873d[_0x589f26(0x176)][_0x589f26(0x1a8)]);}return _0x5a5097;}async function convertYamlStepToApi(_0x42570a,_0x520844,_0x45b5bf={},_0x57fecd={},_0x126307={}){const _0x22c28f=a147_0x1cac,_0x564e7e=async _0x3e2628=>{const _0x481083=a147_0x1cac;if(/^\d+$/[_0x481083(0x188)](_0x3e2628))return _0x3e2628;const _0xaed928=parseSegmentRef(_0x3e2628);if(_0xaed928['type']===_0x481083(0x17c)){if(_0x520844?.[_0x481083(0x196)])return await _0x520844[_0x481083(0x196)](_0xaed928[_0x481083(0x1f0)]);}else{if(_0xaed928[_0x481083(0x182)]===_0x481083(0x214)&&_0x45b5bf[_0xaed928[_0x481083(0x1f0)]]){if(_0x520844?.[_0x481083(0x1ad)])return await _0x520844[_0x481083(0x1ad)](_0xaed928['name'],_0x45b5bf[_0xaed928[_0x481083(0x1f0)]]);}else{if(_0x520844?.['resolveSegmentId'])return await _0x520844['resolveSegmentId'](_0xaed928[_0x481083(0x1f0)]);}}return _0x3e2628;},_0x2e49c5=async _0x309f6c=>{const _0x3153b5=a147_0x1cac;if(/^\d+$/[_0x3153b5(0x188)](_0x309f6c))return _0x309f6c;const _0x23ccc9=parseSegmentRef(_0x309f6c);if(_0x23ccc9[_0x3153b5(0x182)]===_0x3153b5(0x17c)){if(_0x520844?.[_0x3153b5(0x184)])return await _0x520844[_0x3153b5(0x184)](_0x23ccc9[_0x3153b5(0x1f0)]);return _0x23ccc9[_0x3153b5(0x1f0)];}else{if(_0x23ccc9[_0x3153b5(0x182)]===_0x3153b5(0x214)&&_0x126307[_0x23ccc9['name']]){if(_0x520844?.[_0x3153b5(0x219)])return await _0x520844[_0x3153b5(0x219)](_0x23ccc9[_0x3153b5(0x1f0)],_0x126307[_0x23ccc9['name']]);if(_0x520844?.['resolveActivationId'])return await _0x520844['resolveActivationId'](_0x23ccc9[_0x3153b5(0x1f0)]);}else{if(_0x520844?.[_0x3153b5(0x184)])return await _0x520844[_0x3153b5(0x184)](_0x23ccc9[_0x3153b5(0x1f0)]);}}return _0x309f6c;},_0x4f065e=_0x2554a5=>{const _0x44547e=a147_0x1cac;if(!_0x2554a5)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x44547e(0x188)](_0x2554a5))return _0x2554a5;return _0x57fecd[_0x2554a5]||_0x2554a5;};switch(_0x42570a[_0x22c28f(0x182)]){case _0x22c28f(0x1d7):{const _0x1129b6=_0x42570a,_0xa79bb5=_0x1129b6['with'],_0x4abb3f={'type':_0x22c28f(0x19e),'name':_0x1129b6['name'],'next':_0x4f065e(_0x1129b6[_0x22c28f(0x207)])};if(_0xa79bb5[_0x22c28f(0x209)]!==undefined&&_0xa79bb5[_0x22c28f(0x1f4)])_0x4abb3f[_0x22c28f(0x1c5)]=_0x22c28f(0x1e3),_0x4abb3f[_0x22c28f(0x1dc)]=_0xa79bb5[_0x22c28f(0x209)],_0x4abb3f[_0x22c28f(0x18c)]=normalizeWaitUnit(_0xa79bb5[_0x22c28f(0x1f4)]);else{if(_0xa79bb5['wait_until'])_0x4abb3f[_0x22c28f(0x1c5)]='Date',_0x4abb3f[_0x22c28f(0x230)]=_0xa79bb5[_0x22c28f(0x1b4)];else{if(_0xa79bb5[_0x22c28f(0x18a)])_0x4abb3f[_0x22c28f(0x1c5)]=_0x22c28f(0x1a3),_0x4abb3f['daysOfWeek']=_0xa79bb5[_0x22c28f(0x18a)];else{if(_0xa79bb5[_0x22c28f(0x22e)]){_0x4abb3f[_0x22c28f(0x1c5)]=_0x22c28f(0x22f);const _0x550f39=await _0x564e7e(_0xa79bb5[_0x22c28f(0x22e)]['segment']),_0x37dc23=_0xa79bb5['condition']['timeout']?.[_0x22c28f(0x207)]!==undefined;if(_0x37dc23){const _0x208eab=[];_0x208eab[_0x22c28f(0x1f7)]({'id':generateUUID(),'segmentId':_0x550f39,'timedOutPath':![],'name':_0x22c28f(0x1aa),'next':_0x4f065e(_0xa79bb5[_0x22c28f(0x22e)][_0x22c28f(0x207)]??_0x1129b6[_0x22c28f(0x207)])});if(_0xa79bb5[_0x22c28f(0x22e)][_0x22c28f(0x191)]){const _0x5777dc=_0xa79bb5['condition'][_0x22c28f(0x191)][_0x22c28f(0x209)],_0x21aac5=normalizeWaitUnit(_0xa79bb5[_0x22c28f(0x22e)][_0x22c28f(0x191)][_0x22c28f(0x1f4)]);_0x208eab[_0x22c28f(0x1f7)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x22c28f(0x199)+_0x5777dc+'\x20'+_0x21aac5,'moveAfter':_0x5777dc,'unit':_0x21aac5,'next':_0x4f065e(_0xa79bb5['condition']['timeout'][_0x22c28f(0x207)])});}_0x4abb3f['conditions']=_0x208eab,delete _0x4abb3f[_0x22c28f(0x207)];}else _0x4abb3f[_0x22c28f(0x1df)]=_0x550f39,_0xa79bb5['condition'][_0x22c28f(0x191)]&&(_0x4abb3f[_0x22c28f(0x1ef)]=_0xa79bb5[_0x22c28f(0x22e)][_0x22c28f(0x191)]['duration'],_0xa79bb5[_0x22c28f(0x22e)][_0x22c28f(0x191)][_0x22c28f(0x1f4)]&&(_0x4abb3f[_0x22c28f(0x1f1)]=normalizeWaitUnit(_0xa79bb5[_0x22c28f(0x22e)]['timeout'][_0x22c28f(0x1f4)])));}}}}return _0x4abb3f;}case'activation':{const _0x137caf=_0x42570a,_0x5d54ba=_0x137caf[_0x22c28f(0x1e0)]['activation'],_0x35b3e0=await _0x2e49c5(_0x5d54ba);return{'type':'Activation','name':_0x137caf[_0x22c28f(0x1f0)],'journeyActivationStepId':_0x35b3e0,'next':_0x4f065e(_0x137caf[_0x22c28f(0x207)])};}case _0x22c28f(0x1db):{const _0x56cf55=_0x42570a,_0x56246a=_0x56cf55[_0x22c28f(0x1e0)][_0x22c28f(0x1da)];return{'type':'DecisionPoint','name':_0x56cf55['name'],'branches':await Promise[_0x22c28f(0x175)](_0x56246a[_0x22c28f(0x1f2)](async _0x1b0f56=>{const _0x278043=_0x22c28f;let _0x2c3f56='';if(!_0x1b0f56[_0x278043(0x1a7)]){const _0x3658fd=_0x1b0f56[_0x278043(0x1ff)]||_0x1b0f56['segment_id']||'';_0x2c3f56=_0x3658fd?await _0x564e7e(_0x3658fd):'';}return{'id':crypto['randomUUID'](),'name':_0x1b0f56[_0x278043(0x1f0)],'description':null,'segmentId':_0x2c3f56,'excludedPath':_0x1b0f56['excluded']??![],'next':_0x4f065e(_0x1b0f56[_0x278043(0x207)])};})),'next':_0x4f065e(_0x56cf55[_0x22c28f(0x207)])};}case'ab_test':{const _0x562ff4=_0x42570a,_0x3d18ed=_0x562ff4['with'];return{'type':'ABTest','name':_0x562ff4[_0x22c28f(0x1f0)],'customizedSplit':_0x3d18ed[_0x22c28f(0x19a)],'uniqueId':_0x3d18ed['unique_id'],'variants':_0x3d18ed[_0x22c28f(0x17d)][_0x22c28f(0x1f2)](_0x3260e3=>({'id':_0x3260e3['id']||generateUUID(),'name':_0x3260e3[_0x22c28f(0x1f0)],'percentage':_0x3260e3[_0x22c28f(0x1e8)],'next':_0x4f065e(_0x3260e3[_0x22c28f(0x207)])})),'next':_0x4f065e(_0x562ff4[_0x22c28f(0x207)])};}case _0x22c28f(0x204):return{'type':_0x22c28f(0x1fd),'name':_0x42570a['name'],'next':_0x4f065e(_0x42570a['next'])};case _0x22c28f(0x1af):{const _0x6d1c14=_0x42570a,_0x4d5ae5=_0x6d1c14['with'][_0x22c28f(0x176)],_0x59823b=_0x4d5ae5[_0x22c28f(0x1be)],_0x3e3a76=_0x4d5ae5['stage'];let _0x1170c4=_0x4d5ae5[_0x22c28f(0x1be)];_0x520844?.[_0x22c28f(0x1f3)]&&!/^\d+$/['test'](_0x1170c4)&&(_0x1170c4=await _0x520844[_0x22c28f(0x1f3)](_0x1170c4));let _0xd8d1fd=_0x4d5ae5['stage'];_0x520844?.['resolveStageId']&&!/^\d+$/['test'](_0xd8d1fd)&&(_0xd8d1fd=await _0x520844[_0x22c28f(0x195)](_0x1170c4,_0xd8d1fd));const _0x49f94e=!/^\d+$/[_0x22c28f(0x188)](_0x59823b)&&!isLocalJourneyRef(_0x59823b)?formatApiJourneyName(_0x59823b,_0x3e3a76):undefined;return{'type':_0x22c28f(0x1f9),'name':_0x6d1c14[_0x22c28f(0x1f0)],'target':{'journeyId':_0x1170c4,'journeyStageId':_0xd8d1fd,'journeyBundleId':_0x4d5ae5['bundle_id'],'journeyName':_0x49f94e,'confirmed':!![]},'next':_0x4f065e(_0x6d1c14[_0x22c28f(0x207)])};}case _0x22c28f(0x1ca):return{'type':_0x22c28f(0x1bc),'name':_0x42570a[_0x22c28f(0x1f0)]};default:{const _0x216c8d=_0x42570a;return{'type':'End','name':_0x216c8d[_0x22c28f(0x1f0)]};}}}export function toYamlString(_0x91ad4a){const _0xc275f3=a147_0x1cac,_0x3c365b=stripInternalFields(_0x91ad4a),_0xb5332c=a147_0x312d16['stringify'](_0x3c365b,{'indent':0x2,'lineWidth':0x0,'nullStr':_0xc275f3(0x186)}),_0xff69c3=['segments:',_0xc275f3(0x223),_0xc275f3(0x1bd),'reentry:','journeys:',_0xc275f3(0x1e5),_0xc275f3(0x21a)];let _0xdc238d=_0xb5332c;for(const _0x3dcebf of _0xff69c3){_0xdc238d=_0xdc238d[_0xc275f3(0x202)](new RegExp('^('+_0x3dcebf+')','m'),(_0x961d4f,_0x364a59,_0x24a4d5)=>{if(_0x24a4d5===0x0||_0xdc238d[_0x24a4d5-0x1]==='\x0a'&&_0xdc238d[_0x24a4d5-0x2]==='\x0a')return _0x364a59;return'\x0a'+_0x364a59;});}return _0xdc238d;}function stripInternalFields(_0x12aebb){const _0x394d32=a147_0x1cac,{id:_0x3d34d6,folder_id:_0x24796e,bundle_id:_0x3735b8,bundle_name:_0x122381,version:_0xf3d9b9,allow_reentry:_0x2ed375,..._0x4d99df}=_0x12aebb;return _0x4d99df['journeys']&&(_0x4d99df['journeys']=_0x4d99df[_0x394d32(0x1e4)][_0x394d32(0x1f2)](_0x1a3e3c=>{const _0x175e81=_0x394d32,{id:_0x2096db,..._0x18ac09}=_0x1a3e3c;return{..._0x18ac09,'stages':_0x18ac09['stages'][_0x175e81(0x1f2)](stripStageInternalFields),..._0x1a3e3c[_0x175e81(0x226)]===!![]?{'latest':!![]}:{},..._0x4d99df[_0x175e81(0x1e4)][_0x175e81(0x178)]===0x1&&_0x18ac09['version']==='v1'?{'version':undefined}:{}};})),_0x4d99df[_0x394d32(0x1fb)]&&(_0x4d99df[_0x394d32(0x1fb)]=_0x4d99df[_0x394d32(0x1fb)][_0x394d32(0x1f2)](stripStageInternalFields)),_0x4d99df[_0x394d32(0x1c0)]&&(_0x4d99df[_0x394d32(0x1c0)]=_0x4d99df[_0x394d32(0x1c0)][_0x394d32(0x1f2)](_0x292fff=>{const _0xc4100e=_0x394d32,{id:_0xdd5f87,..._0x2e136d}=_0x292fff;return{..._0x2e136d,'stages':_0x2e136d[_0xc4100e(0x1fb)][_0xc4100e(0x1f2)](stripStageInternalFields),..._0x292fff[_0xc4100e(0x226)]===!![]?{'latest':!![]}:{}};})),_0x4d99df;}function stripStageInternalFields(_0x3a5f1c){const {id:_0x55e5c5,..._0x569992}=_0x3a5f1c;return _0x569992;}export function parseYamlString(_0x3b1c07){return safeParseYaml(_0x3b1c07,JourneyDefSchema);}export function isJourneyDef(_0x428b9b){const _0x406f58=a147_0x1cac;return typeof _0x428b9b===_0x406f58(0x205)&&_0x428b9b!==null&&_0x406f58(0x182)in _0x428b9b&&_0x428b9b[_0x406f58(0x182)]==='journey';}export function generateTemplate(_0x5ad331,_0xede79c){const _0x374ecd=a147_0x1cac,_0x5d3f4b={'type':_0x374ecd(0x1be),'name':_0x5ad331,'description':_0x374ecd(0x206),'reentry':'no_reentry','goal':{'name':_0x374ecd(0x217),'segment':_0x374ecd(0x1f5)},'stages':[{'name':_0x374ecd(0x192),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0xede79c},'steps':[{'type':_0x374ecd(0x1d7),'name':_0x374ecd(0x1c6),'with':{'duration':0x1,'unit':_0x374ecd(0x1e9)}},{'type':'activation','name':_0x374ecd(0x213),'with':{'activation':_0x374ecd(0x1c8)}},{'type':_0x374ecd(0x1ca),'name':_0x374ecd(0x1d1)}]}]};return toYamlString(_0x5d3f4b);}function generateUUID(){return crypto['randomUUID']();}export const SEGMENT_REF_PREFIX=a147_0x867043(0x20c);export function parseSegmentRef(_0x141a30){const _0x52db13=a147_0x867043;if(_0x141a30['startsWith'](SEGMENT_REF_PREFIX))return{'type':'ref','name':_0x141a30[_0x52db13(0x1cf)](SEGMENT_REF_PREFIX[_0x52db13(0x178)])};if(/^\d+$/['test'](_0x141a30))return{'type':'id','name':_0x141a30};return{'type':_0x52db13(0x214),'name':_0x141a30};}export function makeSegmentRef(_0x187574){return''+SEGMENT_REF_PREFIX+_0x187574;}export function isExternalSegmentRef(_0x341bbf){const _0x317064=a147_0x867043;return _0x341bbf[_0x317064(0x17a)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x77e7d){const _0x57d370=a147_0x867043;return!!(_0x77e7d[_0x57d370(0x1e4)]&&_0x77e7d[_0x57d370(0x1e4)][_0x57d370(0x178)]>0x0);}export function isMultiVersionMode(_0x335b06){const _0x3bf2cb=a147_0x867043;return!!(_0x335b06['versions']&&_0x335b06['versions'][_0x3bf2cb(0x178)]>0x0);}export function isSingleVersionMode(_0x537849){const _0x385191=a147_0x867043;return!!(_0x537849[_0x385191(0x1fb)]&&_0x537849['stages'][_0x385191(0x178)]>0x0);}export function hasMultipleVersions(_0x4f82e9){const _0x38774b=a147_0x867043;if(isJourneysArrayMode(_0x4f82e9))return(_0x4f82e9[_0x38774b(0x1e4)]?.[_0x38774b(0x178)]||0x0)>0x1;if(isMultiVersionMode(_0x4f82e9))return(_0x4f82e9[_0x38774b(0x1c0)]?.[_0x38774b(0x178)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x3c232f){const _0x4fe039=a147_0x867043;if(isJourneysArrayMode(_0x3c232f))return _0x3c232f;if(isSingleVersionMode(_0x3c232f)){const {stages:_0x45d4e6,id:_0x34e27f,version:_0x46d28f,version_number:_0x59e227,..._0x17ac4f}=_0x3c232f;return{..._0x17ac4f,'journeys':[{'version':_0x46d28f||'v1','stages':_0x45d4e6||[],'id':_0x34e27f,'version_number':_0x59e227}]};}if(isMultiVersionMode(_0x3c232f)){const {versions:_0x5cc317,..._0x13e1c8}=_0x3c232f;return{..._0x13e1c8,'journeys':(_0x5cc317||[])[_0x4fe039(0x1f2)](_0x5f4ef7=>({'version':_0x5f4ef7[_0x4fe039(0x1f0)],'state':_0x5f4ef7['state'],'latest':_0x5f4ef7[_0x4fe039(0x226)],'stages':_0x5f4ef7[_0x4fe039(0x1fb)],'id':_0x5f4ef7['id'],'version_number':_0x5f4ef7[_0x4fe039(0x20d)]}))};}return _0x3c232f;}export function normalizeJourneyDef(_0x156dec,_0x3716a6){const _0x393eb7=a147_0x867043,_0x421677=normalizeToJourneysFormat(_0x156dec),_0x345995=_0x3716a6?.[_0x393eb7(0x1b1)]?Object[_0x393eb7(0x1d0)](_0x3716a6[_0x393eb7(0x1b1)]):undefined,_0x187605=_0x3716a6?.[_0x393eb7(0x189)]?Object[_0x393eb7(0x1d0)](_0x3716a6[_0x393eb7(0x189)]):undefined;return{'type':_0x393eb7(0x1be),'name':_0x421677[_0x393eb7(0x1f0)],..._0x421677[_0x393eb7(0x1d9)]!==undefined&&{'description':_0x421677[_0x393eb7(0x1d9)]},..._0x421677[_0x393eb7(0x1ab)]&&{'goal':normalizeJourneyCriteria(_0x421677['goal'])},..._0x421677[_0x393eb7(0x1b7)]!==undefined&&{'reentry':_0x421677[_0x393eb7(0x1b7)]},..._0x421677[_0x393eb7(0x1b1)]&&{'segments':normalizeEmbeddedSegments(_0x421677[_0x393eb7(0x1b1)],_0x345995)},..._0x421677['activations']&&{'activations':normalizeEmbeddedActivations(_0x421677[_0x393eb7(0x189)],_0x187605)},..._0x421677[_0x393eb7(0x1e4)]&&{'journeys':_0x421677[_0x393eb7(0x1e4)][_0x393eb7(0x1f2)](_0x834076=>normalizeJourneyEntry(_0x834076,_0x421677['journeys']['length']===0x1))}};}function normalizeJourneyEntry(_0x556be2,_0x307e75){const _0x40d291=a147_0x867043;return{...!_0x307e75&&_0x556be2['version']!==undefined&&{'version':_0x556be2[_0x40d291(0x235)]},..._0x556be2['state']!==undefined&&{'state':_0x556be2['state']},...!_0x307e75&&_0x556be2['latest']!==undefined&&{'latest':_0x556be2[_0x40d291(0x226)]},..._0x556be2[_0x40d291(0x20d)]!==undefined&&{'version_number':_0x556be2['version_number']},..._0x556be2[_0x40d291(0x1ab)]&&{'goal':normalizeJourneyCriteria(_0x556be2[_0x40d291(0x1ab)])},..._0x556be2[_0x40d291(0x1b7)]!==undefined&&{'reentry':_0x556be2[_0x40d291(0x1b7)]},'stages':_0x556be2[_0x40d291(0x1fb)][_0x40d291(0x1f2)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x29f9d0){const _0x504a50=a147_0x867043;return{'name':_0x29f9d0[_0x504a50(0x1f0)],..._0x29f9d0['description']!==undefined&&{'description':_0x29f9d0[_0x504a50(0x1d9)]},..._0x29f9d0[_0x504a50(0x1e2)]&&{'entry_criteria':normalizeJourneyCriteria(_0x29f9d0['entry_criteria'])},..._0x29f9d0['exit_criteria']&&{'exit_criteria':_0x29f9d0[_0x504a50(0x1c7)][_0x504a50(0x1f2)](normalizeJourneyCriteria)},..._0x29f9d0[_0x504a50(0x216)]&&{'milestone':normalizeJourneyCriteria(_0x29f9d0[_0x504a50(0x216)])},..._0x29f9d0[_0x504a50(0x17f)]&&{'steps':normalizeStepsWithImplicitNext(_0x29f9d0['steps'])}};}function normalizeStepsWithImplicitNext(_0x321e25){const _0x29671d=a147_0x867043;return _0x321e25[_0x29671d(0x1f2)]((_0x4e8fde,_0x2b221c)=>{const _0x5093f6=_0x29671d,_0x40afa2=_0x2b221c<_0x321e25[_0x5093f6(0x178)]-0x1?_0x321e25[_0x2b221c+0x1][_0x5093f6(0x1f0)]:undefined;return normalizeJourneyStep(_0x4e8fde,_0x40afa2);});}function normalizeJourneyCriteria(_0x65d07c){const _0x3720df=a147_0x867043;return{'name':_0x65d07c[_0x3720df(0x1f0)],..._0x65d07c[_0x3720df(0x1d9)]!==undefined&&{'description':_0x65d07c[_0x3720df(0x1d9)]},'segment':_0x65d07c[_0x3720df(0x1ff)],..._0x65d07c[_0x3720df(0x176)]&&{'target':normalizeJumpTarget(_0x65d07c[_0x3720df(0x176)])}};}function normalizeJourneyStep(_0x4dc804,_0x4f180c){const _0x26e4d1=a147_0x867043,_0x211a51=_0x4dc804[_0x26e4d1(0x207)]!==undefined&&_0x4dc804[_0x26e4d1(0x207)]!==_0x4f180c,_0x56a44b={'type':_0x4dc804[_0x26e4d1(0x182)],'name':_0x4dc804[_0x26e4d1(0x1f0)],..._0x211a51&&{'next':_0x4dc804[_0x26e4d1(0x207)]}};if(_0x26e4d1(0x1e0)in _0x4dc804&&_0x4dc804[_0x26e4d1(0x1e0)])return{..._0x56a44b,'with':normalizeStepParams(_0x4dc804[_0x26e4d1(0x182)],_0x4dc804[_0x26e4d1(0x1e0)])};return _0x56a44b;}function normalizeStepParams(_0x121c6d,_0x51ba32){const _0x2a60fc=a147_0x867043;switch(_0x121c6d){case _0x2a60fc(0x1d7):{const _0x415817=_0x51ba32;let _0x51af82;return _0x415817[_0x2a60fc(0x22e)]&&(_0x51af82={'segment':_0x415817[_0x2a60fc(0x22e)][_0x2a60fc(0x1ff)],..._0x415817['condition'][_0x2a60fc(0x207)]!==undefined&&{'next':_0x415817[_0x2a60fc(0x22e)]['next']},..._0x415817[_0x2a60fc(0x22e)]['timeout']&&{'timeout':{'duration':_0x415817[_0x2a60fc(0x22e)][_0x2a60fc(0x191)][_0x2a60fc(0x209)],'unit':_0x415817['condition'][_0x2a60fc(0x191)]['unit'],..._0x415817[_0x2a60fc(0x22e)][_0x2a60fc(0x191)][_0x2a60fc(0x207)]!==undefined&&{'next':_0x415817[_0x2a60fc(0x22e)][_0x2a60fc(0x191)][_0x2a60fc(0x207)]}}}}),{..._0x415817[_0x2a60fc(0x209)]!==undefined&&{'duration':_0x415817['duration']},..._0x415817['unit']!==undefined&&{'unit':_0x415817[_0x2a60fc(0x1f4)]},..._0x415817[_0x2a60fc(0x1b4)]!==undefined&&{'wait_until':_0x415817[_0x2a60fc(0x1b4)]},..._0x415817[_0x2a60fc(0x18a)]!==undefined&&{'days_of_week':_0x415817[_0x2a60fc(0x18a)]},..._0x51af82&&{'condition':_0x51af82}};}case _0x2a60fc(0x1bb):{const _0xad3331=_0x51ba32;return{'activation':_0xad3331[_0x2a60fc(0x1bb)]};}case _0x2a60fc(0x1db):{const _0x4c2fa9=_0x51ba32;return{'branches':_0x4c2fa9[_0x2a60fc(0x1da)][_0x2a60fc(0x1f2)](normalizeDecisionBranch)};}case _0x2a60fc(0x1ee):{const _0x393b6a=_0x51ba32;return{..._0x393b6a['customized_split']!==undefined&&{'customized_split':_0x393b6a[_0x2a60fc(0x19a)]},..._0x393b6a[_0x2a60fc(0x1d8)]!==undefined&&{'unique_id':_0x393b6a[_0x2a60fc(0x1d8)]},'variants':_0x393b6a[_0x2a60fc(0x17d)][_0x2a60fc(0x1f2)](normalizeAbTestVariant)};}case _0x2a60fc(0x1af):{const _0x305a9f=_0x51ba32;return{'target':normalizeJumpTarget(_0x305a9f[_0x2a60fc(0x176)])};}default:return _0x51ba32;}}function normalizeDecisionBranch(_0x55d168){const _0x30e833=a147_0x867043;return{'name':_0x55d168[_0x30e833(0x1f0)],..._0x55d168[_0x30e833(0x1ff)]!==undefined&&{'segment':_0x55d168['segment']},..._0x55d168[_0x30e833(0x1a7)]!==undefined&&{'excluded':_0x55d168[_0x30e833(0x1a7)]},..._0x55d168[_0x30e833(0x207)]!==undefined&&{'next':_0x55d168[_0x30e833(0x207)]}};}function normalizeAbTestVariant(_0x32a3e0){const _0x444484=a147_0x867043;return{..._0x32a3e0['id']!==undefined&&{'id':_0x32a3e0['id']},'name':_0x32a3e0['name'],'percentage':_0x32a3e0[_0x444484(0x1e8)],..._0x32a3e0[_0x444484(0x207)]!==undefined&&{'next':_0x32a3e0[_0x444484(0x207)]}};}function normalizeJumpTarget(_0x3054d1){const _0xca365e=a147_0x867043;return{'journey':_0x3054d1['journey'],'stage':_0x3054d1['stage'],..._0x3054d1[_0xca365e(0x1a8)]!==undefined&&{'bundle_id':_0x3054d1[_0xca365e(0x1a8)]}};}function normalizeEmbeddedSegments(_0x304dc0,_0x3b3951){const _0x130dcc=a147_0x867043,_0x27a591={},_0x3d85d1=Object['keys'](_0x304dc0),_0x132028=_0x3b3951?[..._0x3b3951[_0x130dcc(0x212)](_0x730a4=>_0x3d85d1['includes'](_0x730a4)),..._0x3d85d1[_0x130dcc(0x212)](_0x11e1cb=>!_0x3b3951[_0x130dcc(0x220)](_0x11e1cb))[_0x130dcc(0x1de)]()]:_0x3d85d1[_0x130dcc(0x1de)]();for(const _0x17ea17 of _0x132028){const _0x1a4a75=_0x304dc0[_0x17ea17];if(_0x1a4a75[_0x130dcc(0x1ac)]){const _0x49044d=_0x1a4a75['rule'];if(_0x49044d[_0x130dcc(0x182)]!=='And'&&_0x49044d['type']!=='Or'){const _0x369b88=_0x49044d[_0x130dcc(0x182)]??_0x130dcc(0x1ce);throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x130dcc(0x1e6)+_0x17ea17+_0x130dcc(0x1b0)+('rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27'+_0x369b88+_0x130dcc(0x177))+'Expected\x20format:\x0a'+_0x130dcc(0x1b9)+'\x20\x20\x20\x20type:\x20And\x0a'+_0x130dcc(0x1cb)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x130dcc(0x1b6)+_0x130dcc(0x21f));}if(!_0x49044d[_0x130dcc(0x1c4)]||!Array['isArray'](_0x49044d[_0x130dcc(0x1c4)]))throw new SDKError(ErrorCode[_0x130dcc(0x224)],_0x130dcc(0x1e6)+_0x17ea17+_0x130dcc(0x1b0)+'rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a'+_0x130dcc(0x222)+'\x20\x20rule:\x0a'+(_0x130dcc(0x1bf)+_0x49044d['type']+'\x0a')+_0x130dcc(0x1cb)+_0x130dcc(0x22b)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}_0x27a591[_0x17ea17]={..._0x1a4a75['description']&&_0x1a4a75['description'][_0x130dcc(0x225)]()&&{'description':_0x1a4a75[_0x130dcc(0x1d9)]},..._0x1a4a75[_0x130dcc(0x1ac)]&&{'rule':deepSortObject(_0x1a4a75[_0x130dcc(0x1ac)])}};}return _0x27a591;}function normalizeEmbeddedActivations(_0x167ac3,_0x139458){const _0x4357eb=a147_0x867043,_0x59571d={},_0x3296c2=Object[_0x4357eb(0x1d0)](_0x167ac3),_0x11303e=_0x139458?[..._0x139458[_0x4357eb(0x212)](_0x28b1d7=>_0x3296c2['includes'](_0x28b1d7)),..._0x3296c2[_0x4357eb(0x212)](_0x37934a=>!_0x139458[_0x4357eb(0x220)](_0x37934a))[_0x4357eb(0x1de)]()]:_0x3296c2[_0x4357eb(0x1de)]();for(const _0x895824 of _0x11303e){const _0x3c7981=_0x167ac3[_0x895824];_0x59571d[_0x895824]={'name':_0x3c7981['name'],'connection':_0x3c7981[_0x4357eb(0x1fa)],..._0x3c7981[_0x4357eb(0x1d9)]!==undefined&&{'description':_0x3c7981[_0x4357eb(0x1d9)]},..._0x3c7981[_0x4357eb(0x234)]!==undefined&&{'all_columns':_0x3c7981[_0x4357eb(0x234)]},..._0x3c7981[_0x4357eb(0x231)]!==undefined&&{'columns':_0x3c7981[_0x4357eb(0x231)]},..._0x3c7981[_0x4357eb(0x193)]!==undefined&&{'behavior':_0x3c7981[_0x4357eb(0x193)]},..._0x3c7981[_0x4357eb(0x1a0)]!==undefined&&{'schedule':_0x3c7981['schedule']},..._0x3c7981['notification']!==undefined&&{'notification':_0x3c7981['notification']},..._0x3c7981[_0x4357eb(0x198)]!==undefined&&{'connector_config':_0x3c7981['connector_config']},..._0x3c7981['activation_template_id']!==undefined&&{'activation_template_id':_0x3c7981[_0x4357eb(0x227)]}};}return _0x59571d;}export function getActiveStages(_0x37c65e){const _0x2f7620=a147_0x867043;if(isJourneysArrayMode(_0x37c65e)){const _0x455e8e=_0x37c65e[_0x2f7620(0x1e4)]||[],_0x43a1f3=_0x455e8e[_0x2f7620(0x1a9)](_0x180bb2=>_0x180bb2[_0x2f7620(0x226)]===!![])||_0x455e8e[0x0];return _0x43a1f3?.['stages']||[];}if(isSingleVersionMode(_0x37c65e))return _0x37c65e[_0x2f7620(0x1fb)]||[];if(isMultiVersionMode(_0x37c65e)){const _0x3f7c64=_0x37c65e[_0x2f7620(0x1c0)]||[],_0x3cc19a=_0x3f7c64[_0x2f7620(0x1a9)](_0x5de14f=>_0x5de14f['latest']===!![])||_0x3f7c64[0x0];return _0x3cc19a?.[_0x2f7620(0x1fb)]||[];}return[];}export function getLatestJourneyEntry(_0x831e93){const _0x147dc3=a147_0x867043;if(isJourneysArrayMode(_0x831e93)){const _0x242968=_0x831e93[_0x147dc3(0x1e4)]||[];return _0x242968[_0x147dc3(0x1a9)](_0x5a1254=>_0x5a1254['latest']===!![])||_0x242968[0x0];}if(isMultiVersionMode(_0x831e93)){const _0x4865b2=_0x831e93[_0x147dc3(0x1c0)]||[],_0x3cbde8=_0x4865b2[_0x147dc3(0x1a9)](_0xdbca76=>_0xdbca76[_0x147dc3(0x226)]===!![])||_0x4865b2[0x0];if(_0x3cbde8)return{'version':_0x3cbde8[_0x147dc3(0x1f0)],'state':_0x3cbde8['state'],'latest':_0x3cbde8[_0x147dc3(0x226)],'stages':_0x3cbde8['stages'],'id':_0x3cbde8['id'],'version_number':_0x3cbde8['version_number']};}if(isSingleVersionMode(_0x831e93))return{'version':_0x831e93[_0x147dc3(0x235)]||'v1','state':_0x147dc3(0x197),'stages':_0x831e93[_0x147dc3(0x1fb)]||[],'id':_0x831e93['id'],'version_number':_0x831e93['version_number'],'goal':_0x831e93[_0x147dc3(0x1ab)],'reentry':_0x831e93[_0x147dc3(0x1b7)]};return undefined;}function a147_0x2339(){const _0x48c5e0=['segment','folder_id','journeyBundleName','replace','journeyId','merge','object','Journey\x20description','next','get','duration','moveAfter','add','ref:','version_number','from','excludedPath','1425772BbUmhC','resolveActivationName','filter','Send\x20Notification','embedded','customizedSplit','milestone','Goal\x20Achieved','journeyStageId','resolveEmbeddedActivationId','versions:','stageId','no_reentry','rootStep','24584UGXrNX','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','includes','resolveActivation','Expected\x20format:\x0a','activations:','JOURNEY_SYNTAX_ERROR','trim','latest','activation_template_id','AbTest','toLowerCase','DecisionPoint','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','daysOfWeek','exitCriterias','condition','Condition','waitUntilDate','columns','stage','relationships','all_columns','version','all','target','\x27.\x0a','length','values','startsWith','segmentId','ref','variants','shift','steps','definition','4211334iAKUOj','type','resolveSegmentName','resolveActivationId','uuid','null','462732zKVEsJ','test','activations','days_of_week','timedOutPath','waitStepUnit','allowReentry','947065wcKFWw','12NrbOTv','isArray','timeout','Stage\x201','behavior','bundle_name','resolveStageId','resolveSegmentId','draft','connector_config','*Max\x20wait\x20','customized_split','folder','stageName','entryCriteria','WaitStep','weeks','schedule','versionNumber','data','DaysOfTheWeek','journeyBundleId','Date','1PvBQHL','excluded','bundle_id','find','Met\x20condition(s)','goal','rule','resolveEmbeddedSegmentId','uniqueId','jump','\x27:\x20','segments','state','root_step','wait_until','4472388wQOVba','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','reentry','9918799vZTzuO','\x20\x20rule:\x0a','isJourneyLocal','activation','End','goal:','journey','\x20\x20\x20\x20type:\x20','versions','size','resolveJumpTarget','Variant','conditions','waitStepType','Wait\x201\x20Day','exit_criteria','your-activation-name','match','end','\x20\x20\x20\x20conditions:\x0a','reentryMode','has','(missing)','slice','keys','Stage\x20Complete','20pniVaD','week','attributes','reentry_always','days','wait','unique_id','description','branches','decision_point','waitStep','427OELaHy','sort','conditionSegmentId','with','journeyStages','entry_criteria','Duration','journeys','stages:','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','parentFolder','percentage','day','set','ABTest','launched','journeyActivationStepId','ab_test','conditionTimeoutDuration','name','conditionTimeoutUnit','map','resolveJourneyId','unit','goal-segment','waitCondition','push','exitCriteria','Jump','connection','stages','journeyName','Merge','Unknown\x20segment\x20\x22'];a147_0x2339=function(){return _0x48c5e0;};return a147_0x2339();}export function getLatestVersion(_0x529ec3){const _0x25eb44=a147_0x867043;if(!isMultiVersionMode(_0x529ec3))return undefined;const _0x34a7ce=_0x529ec3[_0x25eb44(0x1c0)]||[];return _0x34a7ce[_0x25eb44(0x1a9)](_0x104956=>_0x104956['latest']===!![])||_0x34a7ce[0x0];}export function getEffectiveGoal(_0x4d6198){const _0x2575e5=a147_0x867043,_0x438d43=getLatestJourneyEntry(_0x4d6198);return _0x438d43?.[_0x2575e5(0x1ab)]||_0x4d6198[_0x2575e5(0x1ab)];}export function getEffectiveReentry(_0x1fc8be){const _0x3244e4=a147_0x867043,_0x35f28b=getLatestJourneyEntry(_0x1fc8be);return _0x35f28b?.[_0x3244e4(0x1b7)]||_0x1fc8be['reentry'];}export function collectSegmentRefs(_0x12b12a){const _0x45b70b=a147_0x867043,_0x554889=new Set();_0x12b12a['goal']?.[_0x45b70b(0x1ff)]&&_0x554889[_0x45b70b(0x20b)](_0x12b12a['goal'][_0x45b70b(0x1ff)]);const _0x1c75b4=_0x3a7e9a=>{const _0x57c9ec=_0x45b70b;for(const _0x25744d of _0x3a7e9a){_0x25744d[_0x57c9ec(0x1e2)]?.[_0x57c9ec(0x1ff)]&&_0x554889[_0x57c9ec(0x20b)](_0x25744d[_0x57c9ec(0x1e2)]['segment']);if(_0x25744d['exit_criteria'])for(const _0x567f8b of _0x25744d[_0x57c9ec(0x1c7)]){_0x567f8b['segment']&&_0x554889[_0x57c9ec(0x20b)](_0x567f8b['segment']);}_0x25744d[_0x57c9ec(0x216)]?.[_0x57c9ec(0x1ff)]&&_0x554889[_0x57c9ec(0x20b)](_0x25744d['milestone'][_0x57c9ec(0x1ff)]);if(_0x25744d['steps'])for(const _0x2b5ee6 of _0x25744d[_0x57c9ec(0x17f)]){if(_0x2b5ee6[_0x57c9ec(0x182)]===_0x57c9ec(0x1db)){const _0x202248=_0x2b5ee6;for(const _0x371689 of _0x202248[_0x57c9ec(0x1e0)][_0x57c9ec(0x1da)]){_0x371689[_0x57c9ec(0x1ff)]&&_0x554889[_0x57c9ec(0x20b)](_0x371689[_0x57c9ec(0x1ff)]);}}else{if(_0x2b5ee6[_0x57c9ec(0x182)]===_0x57c9ec(0x1d7)){const _0x394d02=_0x2b5ee6;_0x394d02[_0x57c9ec(0x1e0)]['condition']?.[_0x57c9ec(0x1ff)]&&_0x554889[_0x57c9ec(0x20b)](_0x394d02[_0x57c9ec(0x1e0)]['condition'][_0x57c9ec(0x1ff)]);}}}}};_0x12b12a[_0x45b70b(0x1fb)]&&_0x1c75b4(_0x12b12a[_0x45b70b(0x1fb)]);if(_0x12b12a[_0x45b70b(0x1c0)])for(const _0x4d9cd6 of _0x12b12a[_0x45b70b(0x1c0)]){_0x1c75b4(_0x4d9cd6[_0x45b70b(0x1fb)]);}return _0x554889;}export function validateSegmentRefs(_0x7ba92a){const _0x4ecab0=a147_0x867043,_0x5b0389=[],_0x36c511=collectSegmentRefs(_0x7ba92a),_0x2484ed=new Set(Object['keys'](_0x7ba92a[_0x4ecab0(0x1b1)]||{}));for(const _0x36f1e1 of _0x36c511){const _0x4864b6=parseSegmentRef(_0x36f1e1);_0x4864b6[_0x4ecab0(0x182)]===_0x4ecab0(0x214)&&!_0x2484ed['has'](_0x4864b6[_0x4ecab0(0x1f0)])&&_0x5b0389[_0x4ecab0(0x1f7)](_0x4ecab0(0x1fe)+_0x4864b6[_0x4ecab0(0x1f0)]+'\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:'+_0x4864b6[_0x4ecab0(0x1f0)]+'\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.');}return _0x5b0389;}export function collectSegmentIdsFromJourneyApi(_0x2b26be){const _0x45d4a5=a147_0x867043,_0x29d6f5=new Set();_0x2b26be[_0x45d4a5(0x1d4)]['goal']?.[_0x45d4a5(0x17b)]&&_0x29d6f5[_0x45d4a5(0x20b)](_0x2b26be['attributes'][_0x45d4a5(0x1ab)][_0x45d4a5(0x17b)]);const _0x47fdb6=_0x2b26be[_0x45d4a5(0x1d4)][_0x45d4a5(0x1e1)];if(Array[_0x45d4a5(0x190)](_0x47fdb6))for(const _0xb741e3 of _0x47fdb6){_0xb741e3[_0x45d4a5(0x19d)]?.[_0x45d4a5(0x17b)]&&_0x29d6f5[_0x45d4a5(0x20b)](_0xb741e3[_0x45d4a5(0x19d)][_0x45d4a5(0x17b)]);const _0x4574d2=_0xb741e3['exitCriterias']??_0xb741e3[_0x45d4a5(0x1f8)];if(Array[_0x45d4a5(0x190)](_0x4574d2))for(const _0x368caf of _0x4574d2){_0x368caf[_0x45d4a5(0x17b)]&&_0x29d6f5['add'](_0x368caf[_0x45d4a5(0x17b)]);}_0xb741e3['milestone']?.[_0x45d4a5(0x17b)]&&_0x29d6f5['add'](_0xb741e3[_0x45d4a5(0x216)][_0x45d4a5(0x17b)]);if(_0xb741e3[_0x45d4a5(0x17f)]&&typeof _0xb741e3[_0x45d4a5(0x17f)]===_0x45d4a5(0x205)){const _0x463314=Array[_0x45d4a5(0x190)](_0xb741e3[_0x45d4a5(0x17f)])?_0xb741e3[_0x45d4a5(0x17f)]:Object[_0x45d4a5(0x179)](_0xb741e3[_0x45d4a5(0x17f)]);for(const _0x55666c of _0x463314){_0x55666c[_0x45d4a5(0x1f6)]?.[_0x45d4a5(0x17b)]&&_0x29d6f5[_0x45d4a5(0x20b)](_0x55666c[_0x45d4a5(0x1f6)]['segmentId']);const _0x55e349=_0x55666c;_0x55e349[_0x45d4a5(0x1df)]&&_0x29d6f5[_0x45d4a5(0x20b)](_0x55e349[_0x45d4a5(0x1df)]);if(Array[_0x45d4a5(0x190)](_0x55e349[_0x45d4a5(0x1c4)]))for(const _0x3e071b of _0x55e349[_0x45d4a5(0x1c4)]){_0x3e071b[_0x45d4a5(0x17b)]&&_0x29d6f5[_0x45d4a5(0x20b)](_0x3e071b['segmentId']);}if(Array[_0x45d4a5(0x190)](_0x55666c[_0x45d4a5(0x1da)]))for(const _0x40870f of _0x55666c[_0x45d4a5(0x1da)]){_0x40870f[_0x45d4a5(0x17b)]&&_0x29d6f5[_0x45d4a5(0x20b)](_0x40870f[_0x45d4a5(0x17b)]);}}}}return _0x29d6f5;}
|