@treasuredata/tdx 2026.3.8 → 2026.3.10
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/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-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/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/workflow-command.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +2 -2
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +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/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/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.d.ts +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.d.ts +2 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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/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.d.ts +12 -0
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +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/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
|
-
const a135_0x403905=a135_0x167c;(function(_0x19dd46,_0x53158d){const _0x34f899=a135_0x167c,_0x3443af=_0x19dd46();while(!![]){try{const _0x58ea2e=-parseInt(_0x34f899(0x1cf))/0x1+-parseInt(_0x34f899(0x236))/0x2+parseInt(_0x34f899(0x1d9))/0x3+-parseInt(_0x34f899(0x202))/0x4*(-parseInt(_0x34f899(0x1b3))/0x5)+-parseInt(_0x34f899(0x23e))/0x6*(parseInt(_0x34f899(0x220))/0x7)+parseInt(_0x34f899(0x19d))/0x8*(-parseInt(_0x34f899(0x1fa))/0x9)+parseInt(_0x34f899(0x1df))/0xa*(parseInt(_0x34f899(0x1b8))/0xb);if(_0x58ea2e===_0x53158d)break;else _0x3443af['push'](_0x3443af['shift']());}catch(_0x1372d5){_0x3443af['push'](_0x3443af['shift']());}}}(a135_0x38ba,0x4c4aa));import*as a135_0x44af5d 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(_0x8ea5f){const _0x3eb467=a135_0x167c,_0x10cef0=_0x8ea5f['toLowerCase']();if(_0x10cef0===_0x3eb467(0x209)||_0x10cef0===_0x3eb467(0x240))return'day';if(_0x10cef0===_0x3eb467(0x184)||_0x10cef0===_0x3eb467(0x1a9))return _0x3eb467(0x1a9);return _0x8ea5f;}export function journeyResponseToDefSync(_0xac3add){const _0x17f469=a135_0x167c,_0xb0b41=_0xac3add[_0x17f469(0x237)],_0x30020f=_0xb0b41[_0x17f469(0x188)]||_0xb0b41['name'],_0xd3cde7={'stages':_0xb0b41[_0x17f469(0x23d)][_0x17f469(0x1eb)](convertApiStageToYaml),'id':_0xac3add['id']};_0xb0b41[_0x17f469(0x23c)]&&(_0xd3cde7[_0x17f469(0x23c)]=convertApiCriteriaToYaml(_0xb0b41[_0x17f469(0x23c)]));_0xb0b41['name']&&_0xb0b41[_0x17f469(0x1fc)]!==_0x30020f&&(_0xd3cde7['version']=_0xb0b41[_0x17f469(0x1fc)]);_0xb0b41[_0x17f469(0x221)]!==undefined&&(_0xd3cde7['version_number']=_0xb0b41[_0x17f469(0x221)]);_0xb0b41[_0x17f469(0x198)]&&(_0xd3cde7[_0x17f469(0x198)]=_0xb0b41['state']===_0x17f469(0x21a)?_0x17f469(0x21a):'draft');const _0x264695={'type':_0x17f469(0x21f),'name':_0x30020f,'journeys':[_0xd3cde7]};_0xb0b41[_0x17f469(0x1ae)]&&(_0x264695['description']=_0xb0b41[_0x17f469(0x1ae)]);_0xb0b41['goal']&&(_0x264695[_0x17f469(0x23c)]=convertApiCriteriaToYaml(_0xb0b41[_0x17f469(0x23c)]));if(_0xb0b41[_0x17f469(0x231)])_0x264695[_0x17f469(0x1a6)]=_0xb0b41['reentryMode'];else _0xb0b41[_0x17f469(0x1d0)]!==undefined&&(_0x264695[_0x17f469(0x1a6)]=_0xb0b41[_0x17f469(0x1d0)]?_0x17f469(0x1af):_0x17f469(0x208));return _0xb0b41[_0x17f469(0x199)]&&(_0x264695[_0x17f469(0x210)]=_0xb0b41[_0x17f469(0x199)]),_0xb0b41[_0x17f469(0x188)]&&(_0x264695[_0x17f469(0x219)]=_0xb0b41[_0x17f469(0x188)]),_0xac3add['relationships']?.['parentFolder']?.[_0x17f469(0x1ab)]?.['id']&&(_0x264695[_0x17f469(0x1a8)]=_0xac3add[_0x17f469(0x22c)][_0x17f469(0x200)][_0x17f469(0x1ab)]['id']),_0x264695;}export async function journeyResponseToDef(_0x5b7c6d,_0xeb3fc7){const _0x5668dd=a135_0x167c,_0x34a6d4=journeyResponseToDefSync(_0x5b7c6d);if(!_0xeb3fc7)return _0x34a6d4;const _0x398091=new Set();collectSegmentIdsFromJourney(_0x34a6d4,_0x398091);const _0x500f8a=new Set();collectActivationIdsFromJourney(_0x34a6d4,_0x500f8a);const _0x3be92d={},_0xc7b812=new Map();for(const _0x356fed of Array[_0x5668dd(0x186)](_0x398091)[_0x5668dd(0x223)]()){if(_0xeb3fc7['resolveSegment']){const _0x5417e6=await _0xeb3fc7[_0x5668dd(0x238)](_0x356fed);if(_0x5417e6[_0x5668dd(0x1c8)]){_0xc7b812[_0x5668dd(0x1b1)](_0x356fed,_0x5417e6[_0x5668dd(0x1fc)]);if(_0x5417e6[_0x5668dd(0x1ac)]){const _0x45b2e0={..._0x5417e6[_0x5668dd(0x1ac)],'rule':deepSortObject(_0x5417e6[_0x5668dd(0x1ac)]['rule'])};_0x3be92d[_0x5417e6[_0x5668dd(0x1fc)]]=_0x45b2e0;}}else _0xc7b812[_0x5668dd(0x1b1)](_0x356fed,makeSegmentRef(_0x5417e6[_0x5668dd(0x1fc)]));}else{if(_0xeb3fc7['resolveSegmentName']){const _0x3b1580=await _0xeb3fc7[_0x5668dd(0x1ef)](_0x356fed);_0xc7b812['set'](_0x356fed,_0x3b1580);}}}const _0x31daa8={},_0x55120f=new Map();for(const _0x36594b of Array[_0x5668dd(0x186)](_0x500f8a)['sort']()){if(_0xeb3fc7['resolveActivation']){const _0x16a653=await _0xeb3fc7[_0x5668dd(0x197)](_0x36594b);_0x16a653[_0x5668dd(0x1c8)]?(_0x55120f[_0x5668dd(0x1b1)](_0x36594b,_0x16a653[_0x5668dd(0x1fc)]),_0x16a653[_0x5668dd(0x1ac)]&&(_0x31daa8[_0x16a653[_0x5668dd(0x1fc)]]=_0x16a653[_0x5668dd(0x1ac)])):_0x55120f[_0x5668dd(0x1b1)](_0x36594b,makeSegmentRef(_0x16a653[_0x5668dd(0x1fc)]));}else{if(_0xeb3fc7[_0x5668dd(0x19b)]){const _0x4ab802=await _0xeb3fc7[_0x5668dd(0x19b)](_0x36594b);_0x55120f['set'](_0x36594b,_0x4ab802);}}}_0xc7b812[_0x5668dd(0x196)]>0x0&&replaceSegmentIdsInJourney(_0x34a6d4,_0xc7b812);_0x55120f[_0x5668dd(0x196)]>0x0&&replaceActivationIdsInJourney(_0x34a6d4,_0x55120f);if(_0xeb3fc7[_0x5668dd(0x1b0)]){const _0xce4ce=[];collectJumpTargetsFromJourney(_0x34a6d4,_0xce4ce);if(_0xce4ce[_0x5668dd(0x20a)]>0x0){const _0x58b80e=new Map();for(const _0x95992a of _0xce4ce){try{const _0x18314d=await _0xeb3fc7[_0x5668dd(0x1b0)](_0x95992a[_0x5668dd(0x1dc)],_0x95992a[_0x5668dd(0x23a)]);_0x58b80e[_0x5668dd(0x1b1)](_0x95992a['journeyId']+':'+_0x95992a[_0x5668dd(0x23a)],_0x18314d);}catch{}}_0x58b80e['size']>0x0&&replaceJumpTargetsInJourney(_0x34a6d4,_0x58b80e);}}return Object['keys'](_0x3be92d)['length']>0x0&&(_0x34a6d4[_0x5668dd(0x205)]=_0x3be92d),Object['keys'](_0x31daa8)[_0x5668dd(0x20a)]>0x0&&(_0x34a6d4[_0x5668dd(0x1ee)]=_0x31daa8),_0x34a6d4;}function collectSegmentIdsFromJourney(_0x52671f,_0x144d04){const _0x9bddd6=a135_0x167c;_0x52671f[_0x9bddd6(0x23c)]?.[_0x9bddd6(0x20b)]&&_0x144d04['add'](_0x52671f[_0x9bddd6(0x23c)][_0x9bddd6(0x20b)]);const _0x440b0a=_0x54d586=>{const _0x42095b=_0x9bddd6;for(const _0x5e5539 of _0x54d586){_0x5e5539[_0x42095b(0x1d2)]?.[_0x42095b(0x20b)]&&_0x144d04[_0x42095b(0x20d)](_0x5e5539[_0x42095b(0x1d2)][_0x42095b(0x20b)]);if(_0x5e5539[_0x42095b(0x1be)])for(const _0x19178f of _0x5e5539[_0x42095b(0x1be)]){_0x19178f[_0x42095b(0x20b)]&&_0x144d04['add'](_0x19178f[_0x42095b(0x20b)]);}_0x5e5539[_0x42095b(0x19a)]?.[_0x42095b(0x20b)]&&_0x144d04[_0x42095b(0x20d)](_0x5e5539['milestone']['segment']);if(_0x5e5539[_0x42095b(0x1c0)])for(const _0x18f8af of _0x5e5539['steps']){if(_0x18f8af[_0x42095b(0x1f2)]===_0x42095b(0x19e)){const _0x5e64ee=_0x18f8af;for(const _0x3a6f84 of _0x5e64ee[_0x42095b(0x1bf)]['branches']){_0x3a6f84[_0x42095b(0x20b)]&&_0x144d04[_0x42095b(0x20d)](_0x3a6f84[_0x42095b(0x20b)]);}}else{if(_0x18f8af[_0x42095b(0x1f2)]===_0x42095b(0x222)){const _0x16b0e0=_0x18f8af;_0x16b0e0[_0x42095b(0x1bf)][_0x42095b(0x204)]?.['segment']&&_0x144d04['add'](_0x16b0e0['with'][_0x42095b(0x204)][_0x42095b(0x20b)]);}}}}};if(_0x52671f[_0x9bddd6(0x18b)])for(const _0x1a5149 of _0x52671f[_0x9bddd6(0x18b)]){_0x1a5149[_0x9bddd6(0x23c)]?.[_0x9bddd6(0x20b)]&&_0x144d04['add'](_0x1a5149[_0x9bddd6(0x23c)][_0x9bddd6(0x20b)]),_0x440b0a(_0x1a5149['stages']);}_0x52671f[_0x9bddd6(0x1c7)]&&_0x440b0a(_0x52671f[_0x9bddd6(0x1c7)]);if(_0x52671f['versions'])for(const _0x46e4db of _0x52671f['versions']){_0x440b0a(_0x46e4db[_0x9bddd6(0x1c7)]);}}function replaceSegmentIdsInJourney(_0x339aa0,_0x55adcd){const _0x58fb9e=a135_0x167c,_0x26ff74=_0x5f2586=>_0x55adcd[_0x58fb9e(0x1fe)](_0x5f2586)||_0x5f2586;_0x339aa0[_0x58fb9e(0x23c)]?.[_0x58fb9e(0x20b)]&&(_0x339aa0['goal'][_0x58fb9e(0x20b)]=_0x26ff74(_0x339aa0[_0x58fb9e(0x23c)][_0x58fb9e(0x20b)]));const _0x4bf1a0=_0x5aaa36=>{const _0x3c76d7=_0x58fb9e;for(const _0x57a822 of _0x5aaa36){_0x57a822[_0x3c76d7(0x1d2)]?.['segment']&&(_0x57a822[_0x3c76d7(0x1d2)][_0x3c76d7(0x20b)]=_0x26ff74(_0x57a822[_0x3c76d7(0x1d2)]['segment']));if(_0x57a822['exit_criteria'])for(const _0x5eeead of _0x57a822[_0x3c76d7(0x1be)]){_0x5eeead[_0x3c76d7(0x20b)]&&(_0x5eeead['segment']=_0x26ff74(_0x5eeead['segment']));}_0x57a822[_0x3c76d7(0x19a)]?.[_0x3c76d7(0x20b)]&&(_0x57a822[_0x3c76d7(0x19a)][_0x3c76d7(0x20b)]=_0x26ff74(_0x57a822[_0x3c76d7(0x19a)][_0x3c76d7(0x20b)]));if(_0x57a822[_0x3c76d7(0x1c0)])for(const _0x39a467 of _0x57a822[_0x3c76d7(0x1c0)]){if(_0x39a467[_0x3c76d7(0x1f2)]===_0x3c76d7(0x19e)){const _0x22852a=_0x39a467;for(const _0x57a39b of _0x22852a['with'][_0x3c76d7(0x1cb)]){_0x57a39b['segment']&&(_0x57a39b[_0x3c76d7(0x20b)]=_0x26ff74(_0x57a39b[_0x3c76d7(0x20b)]));}}else{if(_0x39a467['type']===_0x3c76d7(0x222)){const _0xa8075=_0x39a467;_0xa8075[_0x3c76d7(0x1bf)][_0x3c76d7(0x204)]?.[_0x3c76d7(0x20b)]&&(_0xa8075[_0x3c76d7(0x1bf)]['condition'][_0x3c76d7(0x20b)]=_0x26ff74(_0xa8075[_0x3c76d7(0x1bf)][_0x3c76d7(0x204)]['segment']));}}}}};if(_0x339aa0['journeys'])for(const _0x4bdead of _0x339aa0[_0x58fb9e(0x18b)]){_0x4bdead[_0x58fb9e(0x23c)]?.['segment']&&(_0x4bdead[_0x58fb9e(0x23c)][_0x58fb9e(0x20b)]=_0x26ff74(_0x4bdead[_0x58fb9e(0x23c)][_0x58fb9e(0x20b)])),_0x4bf1a0(_0x4bdead[_0x58fb9e(0x1c7)]);}_0x339aa0['stages']&&_0x4bf1a0(_0x339aa0[_0x58fb9e(0x1c7)]);if(_0x339aa0[_0x58fb9e(0x1c3)])for(const _0xe598c8 of _0x339aa0[_0x58fb9e(0x1c3)]){_0x4bf1a0(_0xe598c8[_0x58fb9e(0x1c7)]);}}function collectActivationIdsFromJourney(_0x56ee0d,_0x5b53c4){const _0x1c1b4d=a135_0x167c,_0x7ce125=_0x1a86f3=>{const _0x3dc7b9=a135_0x167c;for(const _0x278be5 of _0x1a86f3){if(_0x278be5[_0x3dc7b9(0x1c0)])for(const _0x4f5336 of _0x278be5[_0x3dc7b9(0x1c0)]){if(_0x4f5336[_0x3dc7b9(0x1f2)]===_0x3dc7b9(0x22f)){const _0x217d39=_0x4f5336;_0x217d39['with'][_0x3dc7b9(0x22f)]&&/^\d+$/['test'](_0x217d39[_0x3dc7b9(0x1bf)]['activation'])&&_0x5b53c4[_0x3dc7b9(0x20d)](_0x217d39[_0x3dc7b9(0x1bf)][_0x3dc7b9(0x22f)]);}}}};if(_0x56ee0d['journeys'])for(const _0x3fd2db of _0x56ee0d[_0x1c1b4d(0x18b)]){_0x7ce125(_0x3fd2db[_0x1c1b4d(0x1c7)]);}_0x56ee0d[_0x1c1b4d(0x1c7)]&&_0x7ce125(_0x56ee0d[_0x1c1b4d(0x1c7)]);if(_0x56ee0d[_0x1c1b4d(0x1c3)])for(const _0x515a7c of _0x56ee0d[_0x1c1b4d(0x1c3)]){_0x7ce125(_0x515a7c[_0x1c1b4d(0x1c7)]);}}function a135_0x38ba(){const _0x201e18=['conditionSegmentId','journeyStageId','branches','randomUUID','excluded','customized_split','183605aHnrvF','allowReentry','Date','entry_criteria','journeys:','values','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','trim','latest','1657812unBaiu','target','filter','journeyId','\x20\x20rule:\x0a','versions:','2920890npMsqu','exitCriterias','entryCriteria','slice','exitCriteria','ref:','isArray','Unknown\x20segment\x20\x22','wait_until','rule','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','folder','map','entries','columns','activations','resolveSegmentName','timeout','Condition','type','timedOutPath','Duration','uuid','ABTest','resolveSegmentId','behavior','waitStep','1602RcfDCn','First\x20stage\x20of\x20the\x20journey','name','waitUntilDate','get','percentage','parentFolder','variants','412QolCkK','conditionTimeoutUnit','condition','segments','stageName','Variant','no_reentry','days','length','segment','unit','add','stage','daysOfWeek','bundle_id','schedule','root_step','Wait\x201\x20Day','includes','*Max\x20wait\x20','unique_id','customizedSplit','conditionTimeoutDuration','bundle_name','launched','Jump','\x20\x20\x20\x20conditions:\x0a','resolveActivationId','match','journey','7LSwSzI','versionNumber','wait','sort','resolveStageId','segmentId','notification','activations:','resolveEmbeddedActivationId','all_columns','keys','find','relationships','(missing)','Goal\x20Achieved','activation','journeyName','reentryMode','Stage\x20Complete','WaitStep','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','ab_test','795160RJWRiv','attributes','resolveSegment','resolveJourneyId','stageId','And','goal','journeyStages','1723674CyJAac','Journey\x20description','day','null','resolveEmbeddedSegmentId','test','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','embedded','DecisionPoint','merge','toLowerCase','weeks','version_number','from','goal:','journeyBundleName','end','Expected\x20format:\x0a','journeys','waitStepType','segment_id','Stage\x201','\x20\x20\x20\x20type:\x20','Send\x20Notification','rootStep','uniqueId','jump','all','activation_template_id','size','resolveActivation','state','journeyBundleId','milestone','resolveActivationName','moveAfter','17800cdOPci','decision_point','DaysOfTheWeek','ref','journeyActivationStepId','connector_config','conditions','next','version','reentry','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','folder_id','week','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','data','definition','Merge','description','reentry_always','resolveJumpTarget','set','startsWith','21370HBttBj','segments:','\x27:\x20','duration','push','22mMsghH','your-activation-name','goal-segment','has','Activation','waitStepUnit','exit_criteria','with','steps','days_of_week','End','versions','JOURNEY_SYNTAX_ERROR','shift','excludedPath','stages','isJourneyLocal'];a135_0x38ba=function(){return _0x201e18;};return a135_0x38ba();}function replaceActivationIdsInJourney(_0x5a24a6,_0x16b11d){const _0xedc37e=a135_0x167c,_0x9d4b82=_0x10783e=>_0x16b11d['get'](_0x10783e)||_0x10783e,_0x34cd81=_0x1992c3=>{const _0xfd2bfc=a135_0x167c;for(const _0x1323fd of _0x1992c3){if(_0x1323fd[_0xfd2bfc(0x1c0)])for(const _0x476498 of _0x1323fd[_0xfd2bfc(0x1c0)]){if(_0x476498[_0xfd2bfc(0x1f2)]===_0xfd2bfc(0x22f)){const _0x34a1f9=_0x476498;_0x34a1f9[_0xfd2bfc(0x1bf)][_0xfd2bfc(0x22f)]&&(_0x34a1f9[_0xfd2bfc(0x1bf)][_0xfd2bfc(0x22f)]=_0x9d4b82(_0x34a1f9[_0xfd2bfc(0x1bf)][_0xfd2bfc(0x22f)]));}}}};if(_0x5a24a6['journeys'])for(const _0x409f51 of _0x5a24a6['journeys']){_0x34cd81(_0x409f51[_0xedc37e(0x1c7)]);}_0x5a24a6['stages']&&_0x34cd81(_0x5a24a6['stages']);if(_0x5a24a6['versions'])for(const _0x54d754 of _0x5a24a6[_0xedc37e(0x1c3)]){_0x34cd81(_0x54d754[_0xedc37e(0x1c7)]);}}function collectJumpTargetsFromJourney(_0x118e62,_0x2813aa){const _0x570f91=a135_0x167c,_0x5206ea=new Set(),_0x5daf5d=_0x45e6f6=>{const _0x485ece=a135_0x167c;for(const _0x4897bb of _0x45e6f6){if(_0x4897bb[_0x485ece(0x1c0)])for(const _0x431876 of _0x4897bb[_0x485ece(0x1c0)]){if(_0x431876['type']===_0x485ece(0x193)){const _0x7d648f=_0x431876,_0xb7f98b=_0x7d648f[_0x485ece(0x1bf)]['target'];if(_0xb7f98b[_0x485ece(0x21f)]&&_0xb7f98b[_0x485ece(0x20e)]&&/^\d+$/[_0x485ece(0x243)](_0xb7f98b[_0x485ece(0x21f)])&&/^\d+$/[_0x485ece(0x243)](_0xb7f98b[_0x485ece(0x20e)])){const _0x519a7f=_0xb7f98b[_0x485ece(0x21f)]+':'+_0xb7f98b[_0x485ece(0x20e)];!_0x5206ea['has'](_0x519a7f)&&(_0x5206ea[_0x485ece(0x20d)](_0x519a7f),_0x2813aa['push']({'journeyId':_0xb7f98b['journey'],'stageId':_0xb7f98b[_0x485ece(0x20e)]}));}}}}};if(_0x118e62[_0x570f91(0x18b)])for(const _0x57a06d of _0x118e62[_0x570f91(0x18b)]){_0x5daf5d(_0x57a06d[_0x570f91(0x1c7)]);}_0x118e62['stages']&&_0x5daf5d(_0x118e62['stages']);if(_0x118e62[_0x570f91(0x1c3)])for(const _0x1d82e8 of _0x118e62[_0x570f91(0x1c3)]){_0x5daf5d(_0x1d82e8[_0x570f91(0x1c7)]);}}function a135_0x167c(_0x180314,_0x5a0dab){_0x180314=_0x180314-0x181;const _0x38ba6f=a135_0x38ba();let _0x167c4c=_0x38ba6f[_0x180314];return _0x167c4c;}function replaceJumpTargetsInJourney(_0x514a7f,_0x439524){const _0x34755a=a135_0x167c,_0x4ca9ed=_0x3f31be=>{const _0x5dff7c=a135_0x167c;for(const _0x3a49ac of _0x3f31be){if(_0x3a49ac[_0x5dff7c(0x1c0)])for(const _0x5475c6 of _0x3a49ac[_0x5dff7c(0x1c0)]){if(_0x5475c6[_0x5dff7c(0x1f2)]===_0x5dff7c(0x193)){const _0x3f7a59=_0x5475c6,_0x3e17d3=_0x3f7a59[_0x5dff7c(0x1bf)][_0x5dff7c(0x1da)],_0x4d77f9=_0x3e17d3[_0x5dff7c(0x21f)]+':'+_0x3e17d3[_0x5dff7c(0x20e)],_0x156bf1=_0x439524['get'](_0x4d77f9);_0x156bf1&&(_0x3e17d3[_0x5dff7c(0x21f)]=_0x156bf1[_0x5dff7c(0x230)],_0x3e17d3[_0x5dff7c(0x20e)]=_0x156bf1[_0x5dff7c(0x206)]);}}}};if(_0x514a7f[_0x34755a(0x18b)])for(const _0x2c5135 of _0x514a7f[_0x34755a(0x18b)]){_0x4ca9ed(_0x2c5135[_0x34755a(0x1c7)]);}_0x514a7f[_0x34755a(0x1c7)]&&_0x4ca9ed(_0x514a7f[_0x34755a(0x1c7)]);if(_0x514a7f[_0x34755a(0x1c3)])for(const _0xa7a546 of _0x514a7f[_0x34755a(0x1c3)]){_0x4ca9ed(_0xa7a546['stages']);}}function generateReadableStepName(_0x4cba07,_0x1b4722){const _0x34a76a=a135_0x167c;if(_0x4cba07[_0x34a76a(0x1fc)]&&_0x4cba07['name']!==_0x4cba07['type']){const _0x486239=_0x4cba07[_0x34a76a(0x1fc)][_0x34a76a(0x1d7)]();if(_0x486239&&/[a-z0-9]/i[_0x34a76a(0x243)](_0x486239))return _0x486239;}const _0x32597e=_0x4cba07[_0x34a76a(0x1f2)][_0x34a76a(0x183)]()['replace'](/step$/i,'');return _0x32597e+'_'+(_0x1b4722+0x1);}function getStepNextRefs(_0x2f98c5){const _0x1aa572=a135_0x167c,_0x347172=[];if(_0x2f98c5[_0x1aa572(0x1a4)])_0x347172[_0x1aa572(0x1b7)](_0x2f98c5['next']);if(_0x2f98c5['branches'])for(const _0xd1a3d2 of _0x2f98c5[_0x1aa572(0x1cb)]){if(_0xd1a3d2[_0x1aa572(0x1a4)])_0x347172[_0x1aa572(0x1b7)](_0xd1a3d2['next']);}if(_0x2f98c5[_0x1aa572(0x201)])for(const _0x18ddf3 of _0x2f98c5[_0x1aa572(0x201)]){if(_0x18ddf3[_0x1aa572(0x1a4)])_0x347172[_0x1aa572(0x1b7)](_0x18ddf3[_0x1aa572(0x1a4)]);}if(_0x2f98c5['conditions'])for(const _0x4fed91 of _0x2f98c5[_0x1aa572(0x1a3)]){if(_0x4fed91[_0x1aa572(0x1a4)])_0x347172[_0x1aa572(0x1b7)](_0x4fed91[_0x1aa572(0x1a4)]);}return _0x347172;}function parseJumpTargetDisplayName(_0x22951f){const _0x23d476=a135_0x167c,_0x271167=_0x22951f[_0x23d476(0x21e)](/^(.+?)\s*\(([^/)]+)/);if(!_0x271167)return undefined;const _0x554a86=_0x271167[0x1]['trim'](),_0x239fd0=_0x271167[0x2][_0x23d476(0x1d7)]();if(!_0x554a86||!_0x239fd0)return undefined;return{'stageName':_0x554a86,'journeyName':_0x239fd0};}function orderStepsFromRoot(_0x47556b,_0x2a1d8c){const _0x520139=a135_0x167c,_0x43cc07=Object[_0x520139(0x1ec)](_0x47556b);if(_0x43cc07[_0x520139(0x20a)]===0x0)return[];const _0x1bf8cc=new Set(_0x43cc07[_0x520139(0x1eb)](([_0xa26321])=>_0xa26321)),_0x4b4752=new Set();for(const [,_0x38d14d]of _0x43cc07){for(const _0x40259c of getStepNextRefs(_0x38d14d)){if(_0x1bf8cc[_0x520139(0x1bb)](_0x40259c))_0x4b4752['add'](_0x40259c);}}let _0x5e0695=_0x2a1d8c&&_0x1bf8cc[_0x520139(0x1bb)](_0x2a1d8c)?_0x2a1d8c:undefined;if(!_0x5e0695){const _0x266405=_0x43cc07[_0x520139(0x1db)](([_0x35a175])=>!_0x4b4752[_0x520139(0x1bb)](_0x35a175));_0x266405['length']>0x0?_0x5e0695=_0x266405[0x0][0x0]:_0x5e0695=_0x43cc07[0x0][0x0];}const _0x2a5509=[],_0x2bc2bd=new Set(),_0x15492a=[_0x5e0695];while(_0x15492a[_0x520139(0x20a)]>0x0){const _0x4ccb15=_0x15492a[_0x520139(0x1c5)]();if(_0x2bc2bd[_0x520139(0x1bb)](_0x4ccb15))continue;_0x2bc2bd[_0x520139(0x20d)](_0x4ccb15);const _0x5d4fca=_0x47556b[_0x4ccb15];if(!_0x5d4fca)continue;_0x2a5509[_0x520139(0x1b7)]({'uuid':_0x4ccb15,'step':_0x5d4fca});for(const _0x233b41 of getStepNextRefs(_0x5d4fca)){_0x1bf8cc[_0x520139(0x1bb)](_0x233b41)&&!_0x2bc2bd[_0x520139(0x1bb)](_0x233b41)&&_0x15492a['push'](_0x233b41);}}for(const [_0x574db8,_0x2e9fe5]of _0x43cc07){!_0x2bc2bd[_0x520139(0x1bb)](_0x574db8)&&_0x2a5509[_0x520139(0x1b7)]({'uuid':_0x574db8,'step':_0x2e9fe5});}return _0x2a5509;}function resolveStepReferences(_0x5b61a8,_0x517e89,_0x120a06,_0x3f75ea){const _0x54e456=a135_0x167c;if(_0x5b61a8['type']!=='end'){_0x5b61a8['next']&&_0x3f75ea[_0x54e456(0x1bb)](_0x5b61a8[_0x54e456(0x1a4)])&&(_0x5b61a8[_0x54e456(0x1a4)]=_0x3f75ea[_0x54e456(0x1fe)](_0x5b61a8[_0x54e456(0x1a4)]));const _0x25471=_0x517e89+0x1;if(_0x25471<_0x120a06[_0x54e456(0x20a)]){const _0x36723d=_0x3f75ea[_0x54e456(0x1fe)](_0x120a06[_0x25471][_0x54e456(0x1f5)]);_0x5b61a8[_0x54e456(0x1a4)]===_0x36723d&&delete _0x5b61a8[_0x54e456(0x1a4)];}}if(_0x5b61a8[_0x54e456(0x1f2)]==='decision_point')for(const _0x4f5c17 of _0x5b61a8[_0x54e456(0x1bf)][_0x54e456(0x1cb)]){_0x4f5c17[_0x54e456(0x1a4)]&&_0x3f75ea[_0x54e456(0x1bb)](_0x4f5c17['next'])&&(_0x4f5c17['next']=_0x3f75ea[_0x54e456(0x1fe)](_0x4f5c17[_0x54e456(0x1a4)]));}if(_0x5b61a8[_0x54e456(0x1f2)]===_0x54e456(0x235))for(const _0xc524f1 of _0x5b61a8['with'][_0x54e456(0x201)]){_0xc524f1[_0x54e456(0x1a4)]&&_0x3f75ea[_0x54e456(0x1bb)](_0xc524f1[_0x54e456(0x1a4)])&&(_0xc524f1[_0x54e456(0x1a4)]=_0x3f75ea['get'](_0xc524f1[_0x54e456(0x1a4)]));}if(_0x5b61a8[_0x54e456(0x1f2)]==='wait'&&_0x5b61a8[_0x54e456(0x1bf)][_0x54e456(0x204)]){const _0x33edd5=_0x5b61a8[_0x54e456(0x1bf)][_0x54e456(0x204)];_0x33edd5[_0x54e456(0x1a4)]&&_0x3f75ea[_0x54e456(0x1bb)](_0x33edd5[_0x54e456(0x1a4)])&&(_0x33edd5[_0x54e456(0x1a4)]=_0x3f75ea[_0x54e456(0x1fe)](_0x33edd5[_0x54e456(0x1a4)])),_0x33edd5[_0x54e456(0x1f0)]?.[_0x54e456(0x1a4)]&&_0x3f75ea[_0x54e456(0x1bb)](_0x33edd5[_0x54e456(0x1f0)][_0x54e456(0x1a4)])&&(_0x33edd5[_0x54e456(0x1f0)][_0x54e456(0x1a4)]=_0x3f75ea['get'](_0x33edd5[_0x54e456(0x1f0)]['next']));}}function convertApiStageToYaml(_0x2649e8){const _0x190f0=a135_0x167c,_0xfa731c={'name':_0x2649e8[_0x190f0(0x1fc)]};_0x2649e8['id']&&(_0xfa731c['id']=_0x2649e8['id']);_0x2649e8[_0x190f0(0x1ae)]&&(_0xfa731c[_0x190f0(0x1ae)]=_0x2649e8['description']);_0x2649e8[_0x190f0(0x1e1)]&&(_0xfa731c[_0x190f0(0x1d2)]=convertApiCriteriaToYaml(_0x2649e8[_0x190f0(0x1e1)]));_0x2649e8[_0x190f0(0x1e0)]&&_0x2649e8[_0x190f0(0x1e0)][_0x190f0(0x20a)]>0x0&&(_0xfa731c[_0x190f0(0x1be)]=_0x2649e8['exitCriterias'][_0x190f0(0x1eb)](convertApiCriteriaToYaml));_0x2649e8[_0x190f0(0x19a)]&&(_0xfa731c['milestone']=convertApiCriteriaToYaml(_0x2649e8[_0x190f0(0x19a)]));if(_0x2649e8[_0x190f0(0x1c0)]&&Object['keys'](_0x2649e8['steps'])[_0x190f0(0x20a)]>0x0){const _0x2cfd32=orderStepsFromRoot(_0x2649e8[_0x190f0(0x1c0)],_0x2649e8[_0x190f0(0x191)]),_0x49667b=new Map(),_0x20968b=new Set();for(let _0x43bf06=0x0;_0x43bf06<_0x2cfd32[_0x190f0(0x20a)];_0x43bf06++){const {uuid:_0x50be61,step:_0x2faf45}=_0x2cfd32[_0x43bf06];let _0x2a094b=generateReadableStepName(_0x2faf45,_0x43bf06),_0x370635=_0x2a094b,_0x197b10=0x2;while(_0x20968b[_0x190f0(0x1bb)](_0x370635)){_0x370635=_0x2a094b+'_'+_0x197b10,_0x197b10++;}_0x20968b['add'](_0x370635),_0x49667b[_0x190f0(0x1b1)](_0x50be61,_0x370635);}_0xfa731c[_0x190f0(0x1c0)]=_0x2cfd32[_0x190f0(0x1eb)](({uuid:_0x5d320a,step:_0x5b3a5c},_0x2e1029)=>{const _0x377a85=_0x190f0,_0x261683=convertApiStepToYaml(_0x5b3a5c,_0x49667b[_0x377a85(0x1fe)](_0x5d320a));return resolveStepReferences(_0x261683,_0x2e1029,_0x2cfd32,_0x49667b),_0x261683;});}return _0xfa731c;}function convertApiCriteriaToYaml(_0x50608c){const _0x4da026=a135_0x167c,_0x4c36ba={'name':_0x50608c['name'],'segment':_0x50608c[_0x4da026(0x225)]};_0x50608c[_0x4da026(0x1ae)]&&(_0x4c36ba[_0x4da026(0x1ae)]=_0x50608c['description']);if(_0x50608c[_0x4da026(0x1da)]){let _0x25247c=_0x50608c[_0x4da026(0x1da)][_0x4da026(0x1dc)],_0x12c797=_0x50608c[_0x4da026(0x1da)]['journeyStageId'];if(_0x50608c[_0x4da026(0x1da)][_0x4da026(0x230)]){const _0x410f3e=parseJumpTargetDisplayName(_0x50608c[_0x4da026(0x1da)][_0x4da026(0x230)]);_0x410f3e&&(_0x12c797=_0x410f3e[_0x4da026(0x206)],_0x25247c=_0x410f3e[_0x4da026(0x230)]);}_0x4c36ba[_0x4da026(0x1da)]={'journey':_0x25247c,'stage':_0x12c797},_0x50608c[_0x4da026(0x1da)][_0x4da026(0x199)]&&(_0x4c36ba['target'][_0x4da026(0x210)]=_0x50608c['target'][_0x4da026(0x199)]);}return _0x4c36ba;}function convertApiStepToYaml(_0x2bd7a3,_0x535e8f){const _0x352bc6=a135_0x167c;switch(_0x2bd7a3['type']){case _0x352bc6(0x233):{const _0x2ca6d8={};if(_0x2bd7a3[_0x352bc6(0x18c)]===_0x352bc6(0x1f4)&&_0x2bd7a3[_0x352bc6(0x1f9)]!==undefined)_0x2ca6d8[_0x352bc6(0x1b6)]=_0x2bd7a3[_0x352bc6(0x1f9)],_0x2ca6d8[_0x352bc6(0x20c)]=_0x2bd7a3[_0x352bc6(0x1bd)];else{if(_0x2bd7a3[_0x352bc6(0x18c)]===_0x352bc6(0x1d1)&&_0x2bd7a3['waitUntilDate'])_0x2ca6d8[_0x352bc6(0x1e7)]=_0x2bd7a3['waitUntilDate'];else{if(_0x2bd7a3[_0x352bc6(0x18c)]==='DaysOfTheWeek'&&_0x2bd7a3[_0x352bc6(0x20f)])_0x2ca6d8[_0x352bc6(0x1c1)]=_0x2bd7a3[_0x352bc6(0x20f)];else{if(_0x2bd7a3['waitStepType']===_0x352bc6(0x1f1)){if(_0x2bd7a3[_0x352bc6(0x1a3)]&&_0x2bd7a3[_0x352bc6(0x1a3)][_0x352bc6(0x20a)]>0x0){const _0x3a7535=_0x2bd7a3[_0x352bc6(0x1a3)][_0x352bc6(0x22b)](_0x298501=>!_0x298501[_0x352bc6(0x1f3)]),_0x1e9689=_0x2bd7a3[_0x352bc6(0x1a3)][_0x352bc6(0x22b)](_0x591b60=>_0x591b60['timedOutPath']);_0x3a7535?.[_0x352bc6(0x225)]&&(_0x2ca6d8['condition']={'segment':_0x3a7535[_0x352bc6(0x225)],..._0x3a7535['next']?{'next':_0x3a7535['next']}:{}},_0x1e9689&&_0x1e9689['moveAfter']!==undefined&&_0x1e9689['unit']&&(_0x2ca6d8[_0x352bc6(0x204)][_0x352bc6(0x1f0)]={'duration':_0x1e9689[_0x352bc6(0x19c)],'unit':_0x1e9689[_0x352bc6(0x20c)],..._0x1e9689[_0x352bc6(0x1a4)]?{'next':_0x1e9689[_0x352bc6(0x1a4)]}:{}}));}else _0x2bd7a3[_0x352bc6(0x1c9)]&&(_0x2ca6d8['condition']={'segment':_0x2bd7a3['conditionSegmentId']},_0x2bd7a3[_0x352bc6(0x218)]!==undefined&&_0x2bd7a3[_0x352bc6(0x203)]&&(_0x2ca6d8[_0x352bc6(0x204)][_0x352bc6(0x1f0)]={'duration':_0x2bd7a3[_0x352bc6(0x218)],'unit':_0x2bd7a3['conditionTimeoutUnit']}));}}}}const _0x3e09fb={'type':_0x352bc6(0x222),'name':_0x535e8f,..._0x2bd7a3[_0x352bc6(0x1a4)]?{'next':_0x2bd7a3[_0x352bc6(0x1a4)]}:{},'with':_0x2ca6d8};return _0x3e09fb;}case _0x352bc6(0x1bc):{const _0x52cd93={'type':_0x352bc6(0x22f),'name':_0x535e8f,..._0x2bd7a3[_0x352bc6(0x1a4)]?{'next':_0x2bd7a3['next']}:{},'with':{'activation':_0x2bd7a3[_0x352bc6(0x1a1)]||''}};return _0x52cd93;}case'DecisionPoint':{const _0x31ed85={'type':_0x352bc6(0x19e),'name':_0x535e8f,..._0x2bd7a3['next']?{'next':_0x2bd7a3[_0x352bc6(0x1a4)]}:{},'with':{'branches':(_0x2bd7a3[_0x352bc6(0x1cb)]||[])[_0x352bc6(0x1eb)](_0x2eb83b=>({'name':_0x2eb83b[_0x352bc6(0x1fc)],'segment':_0x2eb83b['segmentId'],'excluded':_0x2eb83b[_0x352bc6(0x1c6)],..._0x2eb83b['next']?{'next':_0x2eb83b[_0x352bc6(0x1a4)]}:{}}))}};return _0x31ed85;}case'ABTest':case'AbTest':case _0x352bc6(0x207):{const _0x3b3e2d=_0x2bd7a3[_0x352bc6(0x201)]||(_0x2bd7a3[_0x352bc6(0x1cb)]||[])['map'](_0x29f452=>({'name':_0x29f452[_0x352bc6(0x1fc)],'percentage':0x0,'next':_0x29f452[_0x352bc6(0x1a4)]})),_0x365c41={'type':_0x352bc6(0x235),'name':_0x535e8f,..._0x2bd7a3[_0x352bc6(0x1a4)]?{'next':_0x2bd7a3[_0x352bc6(0x1a4)]}:{},'with':{'customized_split':_0x2bd7a3[_0x352bc6(0x217)],'unique_id':_0x2bd7a3[_0x352bc6(0x192)],'variants':_0x3b3e2d[_0x352bc6(0x1eb)](_0x25fa4d=>({'name':_0x25fa4d[_0x352bc6(0x1fc)],'percentage':_0x25fa4d[_0x352bc6(0x1ff)],..._0x25fa4d[_0x352bc6(0x1a4)]?{'next':_0x25fa4d['next']}:{}}))}};return _0x365c41;}case _0x352bc6(0x1ad):{const _0x2b3bbb={'type':'merge','name':_0x535e8f,..._0x2bd7a3['next']?{'next':_0x2bd7a3[_0x352bc6(0x1a4)]}:{}};return _0x2b3bbb;}case _0x352bc6(0x21b):{let _0x12cedc='',_0x3128d7='',_0x16f8a2;if(_0x2bd7a3[_0x352bc6(0x1da)]){_0x12cedc=_0x2bd7a3[_0x352bc6(0x1da)][_0x352bc6(0x1dc)],_0x3128d7=_0x2bd7a3[_0x352bc6(0x1da)][_0x352bc6(0x1ca)],_0x16f8a2=_0x2bd7a3[_0x352bc6(0x1da)]['journeyBundleId'];if(_0x2bd7a3[_0x352bc6(0x1da)][_0x352bc6(0x230)]){const _0x219977=parseJumpTargetDisplayName(_0x2bd7a3[_0x352bc6(0x1da)][_0x352bc6(0x230)]);_0x219977&&(_0x3128d7=_0x219977[_0x352bc6(0x206)],_0x12cedc=_0x219977[_0x352bc6(0x230)]);}}const _0x3b5dc7={'type':_0x352bc6(0x193),'name':_0x535e8f,..._0x2bd7a3['next']?{'next':_0x2bd7a3[_0x352bc6(0x1a4)]}:{},'with':{'target':{'journey':_0x12cedc,'stage':_0x3128d7,..._0x16f8a2?{'bundle_id':_0x16f8a2}:{}}}};return _0x3b5dc7;}case _0x352bc6(0x1c2):{const _0x1f769e={'type':_0x352bc6(0x189),'name':_0x535e8f};return _0x1f769e;}default:{const _0x22b5a9={'type':_0x352bc6(0x189),'name':_0x535e8f};return _0x22b5a9;}}}export async function journeyDefToRequest(_0x4edb67,_0x3acfda,_0xa5f4a2){const _0x3e8fb9=a135_0x167c,_0x40c51b=_0x4edb67[_0x3e8fb9(0x1c7)]||getActiveStages(_0x4edb67),_0x41fb14=isJourneysArrayMode(_0x4edb67)||isMultiVersionMode(_0x4edb67)?getLatestJourneyEntry(_0x4edb67):undefined,_0xfb5b50=_0x41fb14?.[_0x3e8fb9(0x1a5)]??_0x4edb67['name'],_0xd79b0a=_0x4edb67[_0x3e8fb9(0x205)]||{},_0xa21ca1=_0x4edb67[_0x3e8fb9(0x1ee)]||{},_0x542c2f={'type':'journey','attributes':{'name':_0xfb5b50,'audienceId':_0x3acfda,'journeyStages':await Promise[_0x3e8fb9(0x194)](_0x40c51b[_0x3e8fb9(0x1eb)](_0x456c52=>convertYamlStageToApi(_0x456c52,_0xa5f4a2,_0xd79b0a,_0xa21ca1)))}},_0x10f05a=_0x41fb14?.['id']??_0x4edb67['id'];_0x10f05a&&(_0x542c2f['id']=_0x10f05a);_0x4edb67[_0x3e8fb9(0x1ae)]&&(_0x542c2f['attributes'][_0x3e8fb9(0x1ae)]=_0x4edb67[_0x3e8fb9(0x1ae)]);const _0xee712b=getEffectiveGoal(_0x4edb67);_0xee712b&&(_0x542c2f[_0x3e8fb9(0x237)][_0x3e8fb9(0x23c)]=await convertYamlCriteriaToApi(_0xee712b,_0xa5f4a2,_0xd79b0a));const _0x49dbbd=getEffectiveReentry(_0x4edb67);return _0x49dbbd&&(_0x542c2f['attributes'][_0x3e8fb9(0x231)]=_0x49dbbd,_0x542c2f['attributes'][_0x3e8fb9(0x1d0)]=_0x49dbbd!=='no_reentry'),_0x4edb67[_0x3e8fb9(0x1a8)]&&(_0x542c2f['relationships']={'parentFolder':{'data':{'id':_0x4edb67[_0x3e8fb9(0x1a8)],'type':_0x3e8fb9(0x1ea)}}}),_0x542c2f;}async function convertYamlStageToApi(_0x578e38,_0x4fdd80,_0x21a053={},_0x4ec933={}){const _0x23c6f8=a135_0x167c,_0x2254eb={'name':_0x578e38['name']};_0x578e38['id']&&(_0x2254eb['id']=_0x578e38['id']);_0x578e38[_0x23c6f8(0x1ae)]&&(_0x2254eb['description']=_0x578e38[_0x23c6f8(0x1ae)]);_0x578e38[_0x23c6f8(0x1d2)]&&(_0x2254eb[_0x23c6f8(0x1e1)]=await convertYamlCriteriaToApi(_0x578e38[_0x23c6f8(0x1d2)],_0x4fdd80,_0x21a053));_0x578e38[_0x23c6f8(0x1be)]&&_0x578e38['exit_criteria']['length']>0x0&&(_0x2254eb[_0x23c6f8(0x1e0)]=await Promise[_0x23c6f8(0x194)](_0x578e38[_0x23c6f8(0x1be)][_0x23c6f8(0x1eb)](_0x14061b=>convertYamlCriteriaToApi(_0x14061b,_0x4fdd80,_0x21a053))));_0x578e38[_0x23c6f8(0x19a)]&&(_0x2254eb[_0x23c6f8(0x19a)]=await convertYamlCriteriaToApi(_0x578e38[_0x23c6f8(0x19a)],_0x4fdd80,_0x21a053));if(_0x578e38[_0x23c6f8(0x1c0)]&&_0x578e38[_0x23c6f8(0x1c0)][_0x23c6f8(0x20a)]>0x0){const _0x3994e9={},_0x3c857a=_0x578e38['steps']['map']((_0x41bfc4,_0xf08037)=>{const _0x4ca1ed=_0x23c6f8,_0x4bfdc0=_0x41bfc4[_0x4ca1ed(0x1f5)]||generateUUID(),_0x3671b7=_0x41bfc4['name']||_0x41bfc4[_0x4ca1ed(0x1f2)]+'_'+_0xf08037;return _0x3994e9[_0x3671b7]=_0x4bfdc0,{..._0x41bfc4,'name':_0x3671b7};});_0x2254eb[_0x23c6f8(0x191)]=_0x3994e9[_0x3c857a[0x0][_0x23c6f8(0x1fc)]],_0x2254eb[_0x23c6f8(0x1c0)]={};for(let _0x53fdef=0x0;_0x53fdef<_0x3c857a[_0x23c6f8(0x20a)];_0x53fdef++){const _0x1f4aba=_0x3c857a[_0x53fdef],_0xb1ed00=_0x3994e9[_0x1f4aba[_0x23c6f8(0x1fc)]],_0x3ea0bf=!_0x1f4aba[_0x23c6f8(0x1a4)]&&_0x53fdef<_0x3c857a[_0x23c6f8(0x20a)]-0x1&&_0x1f4aba[_0x23c6f8(0x1f2)]!=='end'?_0x3c857a[_0x53fdef+0x1][_0x23c6f8(0x1fc)]:_0x1f4aba['next'],_0x359436=_0x3ea0bf!==_0x1f4aba[_0x23c6f8(0x1a4)]?{..._0x1f4aba,'next':_0x3ea0bf}:_0x1f4aba;_0x2254eb['steps'][_0xb1ed00]=await convertYamlStepToApi(_0x359436,_0x4fdd80,_0x21a053,_0x3994e9,_0x4ec933);}}else _0x578e38[_0x23c6f8(0x212)]&&(_0x2254eb['rootStep']=_0x578e38[_0x23c6f8(0x212)]);return _0x2254eb;}async function convertYamlCriteriaToApi(_0xd95f08,_0x397701,_0x24f57d={}){const _0x3a3044=a135_0x167c;let _0x5924bd=_0xd95f08[_0x3a3044(0x20b)];if(_0x5924bd&&!/^\d+$/[_0x3a3044(0x243)](_0x5924bd)){const _0x5cd9a5=parseSegmentRef(_0x5924bd);if(_0x5cd9a5[_0x3a3044(0x1f2)]===_0x3a3044(0x1a0))_0x397701?.[_0x3a3044(0x1f7)]&&(_0x5924bd=await _0x397701['resolveSegmentId'](_0x5cd9a5['name']));else{if(_0x5cd9a5['type']===_0x3a3044(0x245)&&_0x24f57d[_0x5cd9a5[_0x3a3044(0x1fc)]])_0x397701?.[_0x3a3044(0x242)]&&(_0x5924bd=await _0x397701[_0x3a3044(0x242)](_0x5cd9a5[_0x3a3044(0x1fc)],_0x24f57d[_0x5cd9a5['name']]));else _0x397701?.[_0x3a3044(0x1f7)]&&(_0x5924bd=await _0x397701[_0x3a3044(0x1f7)](_0x5cd9a5['name']));}}const _0x4bf814={'name':_0xd95f08[_0x3a3044(0x1fc)],'segmentId':_0x5924bd};_0xd95f08[_0x3a3044(0x1ae)]&&(_0x4bf814[_0x3a3044(0x1ae)]=_0xd95f08[_0x3a3044(0x1ae)]);if(_0xd95f08[_0x3a3044(0x1da)]){const _0x31ec5b=_0xd95f08[_0x3a3044(0x1da)]['journey'],_0x4eaaed=_0xd95f08[_0x3a3044(0x1da)][_0x3a3044(0x20e)];let _0x98d69e=_0xd95f08[_0x3a3044(0x1da)][_0x3a3044(0x21f)];_0x397701?.['resolveJourneyId']&&!/^\d+$/[_0x3a3044(0x243)](_0x98d69e)&&(_0x98d69e=await _0x397701['resolveJourneyId'](_0x98d69e));let _0x1d809f=_0xd95f08[_0x3a3044(0x1da)]['stage'];_0x397701?.['resolveStageId']&&!/^\d+$/['test'](_0x1d809f)&&(_0x1d809f=await _0x397701[_0x3a3044(0x224)](_0x98d69e,_0x1d809f));const _0x208de3=!/^\d+$/['test'](_0x31ec5b)&&!isLocalJourneyRef(_0x31ec5b)?formatApiJourneyName(_0x31ec5b,_0x4eaaed):undefined;_0x4bf814[_0x3a3044(0x1da)]={'journeyId':_0x98d69e,'journeyStageId':_0x1d809f,'journeyName':_0x208de3,'confirmed':!![]},_0xd95f08[_0x3a3044(0x1da)]['bundle_id']&&(_0x4bf814[_0x3a3044(0x1da)][_0x3a3044(0x199)]=_0xd95f08['target'][_0x3a3044(0x210)]);}return _0x4bf814;}async function convertYamlStepToApi(_0x173816,_0x4d4dc2,_0x308d6c={},_0x58190d={},_0x70fa5d={}){const _0x264155=a135_0x167c,_0x57d018=async _0x32fd89=>{const _0x4e047a=a135_0x167c;if(/^\d+$/[_0x4e047a(0x243)](_0x32fd89))return _0x32fd89;const _0x44b49a=parseSegmentRef(_0x32fd89);if(_0x44b49a[_0x4e047a(0x1f2)]==='ref'){if(_0x4d4dc2?.[_0x4e047a(0x1f7)])return await _0x4d4dc2[_0x4e047a(0x1f7)](_0x44b49a[_0x4e047a(0x1fc)]);}else{if(_0x44b49a[_0x4e047a(0x1f2)]==='embedded'&&_0x308d6c[_0x44b49a['name']]){if(_0x4d4dc2?.[_0x4e047a(0x242)])return await _0x4d4dc2['resolveEmbeddedSegmentId'](_0x44b49a['name'],_0x308d6c[_0x44b49a['name']]);}else{if(_0x4d4dc2?.[_0x4e047a(0x1f7)])return await _0x4d4dc2[_0x4e047a(0x1f7)](_0x44b49a[_0x4e047a(0x1fc)]);}}return _0x32fd89;},_0x4806e3=async _0x47f686=>{const _0x2b79f0=a135_0x167c;if(/^\d+$/[_0x2b79f0(0x243)](_0x47f686))return _0x47f686;const _0x6ecc5a=parseSegmentRef(_0x47f686);if(_0x6ecc5a['type']===_0x2b79f0(0x1a0)){if(_0x4d4dc2?.[_0x2b79f0(0x21d)])return await _0x4d4dc2[_0x2b79f0(0x21d)](_0x6ecc5a[_0x2b79f0(0x1fc)]);return _0x6ecc5a['name'];}else{if(_0x6ecc5a[_0x2b79f0(0x1f2)]===_0x2b79f0(0x245)&&_0x70fa5d[_0x6ecc5a['name']]){if(_0x4d4dc2?.[_0x2b79f0(0x228)])return await _0x4d4dc2[_0x2b79f0(0x228)](_0x6ecc5a['name'],_0x70fa5d[_0x6ecc5a['name']]);if(_0x4d4dc2?.['resolveActivationId'])return await _0x4d4dc2[_0x2b79f0(0x21d)](_0x6ecc5a['name']);}else{if(_0x4d4dc2?.[_0x2b79f0(0x21d)])return await _0x4d4dc2[_0x2b79f0(0x21d)](_0x6ecc5a['name']);}}return _0x47f686;},_0x4d8c78=_0x48518e=>{const _0x513c21=a135_0x167c;if(!_0x48518e)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x513c21(0x243)](_0x48518e))return _0x48518e;return _0x58190d[_0x48518e]||_0x48518e;};switch(_0x173816[_0x264155(0x1f2)]){case _0x264155(0x222):{const _0x1b31ff=_0x173816,_0x23322d=_0x1b31ff['with'],_0x27e6c9={'type':_0x264155(0x233),'name':_0x1b31ff[_0x264155(0x1fc)],'next':_0x4d8c78(_0x1b31ff[_0x264155(0x1a4)])};if(_0x23322d[_0x264155(0x1b6)]!==undefined&&_0x23322d[_0x264155(0x20c)])_0x27e6c9[_0x264155(0x18c)]='Duration',_0x27e6c9[_0x264155(0x1f9)]=_0x23322d[_0x264155(0x1b6)],_0x27e6c9[_0x264155(0x1bd)]=normalizeWaitUnit(_0x23322d['unit']);else{if(_0x23322d['wait_until'])_0x27e6c9[_0x264155(0x18c)]=_0x264155(0x1d1),_0x27e6c9[_0x264155(0x1fd)]=_0x23322d[_0x264155(0x1e7)];else{if(_0x23322d[_0x264155(0x1c1)])_0x27e6c9[_0x264155(0x18c)]=_0x264155(0x19f),_0x27e6c9[_0x264155(0x20f)]=_0x23322d[_0x264155(0x1c1)];else{if(_0x23322d[_0x264155(0x204)]){_0x27e6c9[_0x264155(0x18c)]=_0x264155(0x1f1);const _0x2c6f7d=await _0x57d018(_0x23322d[_0x264155(0x204)][_0x264155(0x20b)]),_0x947208=_0x23322d[_0x264155(0x204)]['timeout']?.[_0x264155(0x1a4)]!==undefined;if(_0x947208){const _0x1f5b15=[];_0x1f5b15[_0x264155(0x1b7)]({'id':generateUUID(),'segmentId':_0x2c6f7d,'timedOutPath':![],'name':'Met\x20condition(s)','next':_0x4d8c78(_0x23322d[_0x264155(0x204)][_0x264155(0x1a4)]??_0x1b31ff[_0x264155(0x1a4)])});if(_0x23322d[_0x264155(0x204)][_0x264155(0x1f0)]){const _0x3e068c=_0x23322d[_0x264155(0x204)]['timeout'][_0x264155(0x1b6)],_0x5205c0=normalizeWaitUnit(_0x23322d['condition']['timeout'][_0x264155(0x20c)]);_0x1f5b15[_0x264155(0x1b7)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x264155(0x215)+_0x3e068c+'\x20'+_0x5205c0,'moveAfter':_0x3e068c,'unit':_0x5205c0,'next':_0x4d8c78(_0x23322d['condition'][_0x264155(0x1f0)]['next'])});}_0x27e6c9[_0x264155(0x1a3)]=_0x1f5b15,delete _0x27e6c9['next'];}else _0x27e6c9[_0x264155(0x1c9)]=_0x2c6f7d,_0x23322d[_0x264155(0x204)]['timeout']&&(_0x27e6c9[_0x264155(0x218)]=_0x23322d[_0x264155(0x204)]['timeout'][_0x264155(0x1b6)],_0x23322d['condition']['timeout'][_0x264155(0x20c)]&&(_0x27e6c9['conditionTimeoutUnit']=normalizeWaitUnit(_0x23322d[_0x264155(0x204)][_0x264155(0x1f0)][_0x264155(0x20c)])));}}}}return _0x27e6c9;}case _0x264155(0x22f):{const _0x43f1e5=_0x173816,_0x539bcd=_0x43f1e5['with'][_0x264155(0x22f)],_0xefea68=await _0x4806e3(_0x539bcd);return{'type':'Activation','name':_0x43f1e5[_0x264155(0x1fc)],'journeyActivationStepId':_0xefea68,'next':_0x4d8c78(_0x43f1e5[_0x264155(0x1a4)])};}case'decision_point':{const _0x575057=_0x173816,_0x41c68d=_0x575057[_0x264155(0x1bf)]['branches'];return{'type':_0x264155(0x181),'name':_0x575057[_0x264155(0x1fc)],'branches':await Promise[_0x264155(0x194)](_0x41c68d[_0x264155(0x1eb)](async _0x40e784=>{const _0x3b4e5d=_0x264155;let _0x1f7b8f='';if(!_0x40e784['excluded']){const _0x561e76=_0x40e784[_0x3b4e5d(0x20b)]||_0x40e784[_0x3b4e5d(0x18d)]||'';_0x1f7b8f=_0x561e76?await _0x57d018(_0x561e76):'';}return{'id':crypto['randomUUID'](),'name':_0x40e784[_0x3b4e5d(0x1fc)],'description':null,'segmentId':_0x1f7b8f,'excludedPath':_0x40e784[_0x3b4e5d(0x1cd)]??![],'next':_0x4d8c78(_0x40e784['next'])};})),'next':_0x4d8c78(_0x575057[_0x264155(0x1a4)])};}case _0x264155(0x235):{const _0x170837=_0x173816,_0x2f1007=_0x170837[_0x264155(0x1bf)];return{'type':_0x264155(0x1f6),'name':_0x170837['name'],'customizedSplit':_0x2f1007[_0x264155(0x1ce)],'uniqueId':_0x2f1007[_0x264155(0x216)],'variants':_0x2f1007[_0x264155(0x201)][_0x264155(0x1eb)](_0x351b2b=>({'id':_0x351b2b['id']||generateUUID(),'name':_0x351b2b[_0x264155(0x1fc)],'percentage':_0x351b2b[_0x264155(0x1ff)],'next':_0x4d8c78(_0x351b2b['next'])})),'next':_0x4d8c78(_0x170837[_0x264155(0x1a4)])};}case _0x264155(0x182):return{'type':_0x264155(0x1ad),'name':_0x173816[_0x264155(0x1fc)],'next':_0x4d8c78(_0x173816[_0x264155(0x1a4)])};case _0x264155(0x193):{const _0x5c0831=_0x173816,_0x7bc6ab=_0x5c0831[_0x264155(0x1bf)][_0x264155(0x1da)],_0x444b34=_0x7bc6ab[_0x264155(0x21f)],_0x1ff17c=_0x7bc6ab['stage'];let _0x26e354=_0x7bc6ab['journey'];_0x4d4dc2?.['resolveJourneyId']&&!/^\d+$/['test'](_0x26e354)&&(_0x26e354=await _0x4d4dc2[_0x264155(0x239)](_0x26e354));let _0x136ee9=_0x7bc6ab['stage'];_0x4d4dc2?.[_0x264155(0x224)]&&!/^\d+$/[_0x264155(0x243)](_0x136ee9)&&(_0x136ee9=await _0x4d4dc2[_0x264155(0x224)](_0x26e354,_0x136ee9));const _0x4e97fb=!/^\d+$/[_0x264155(0x243)](_0x444b34)&&!isLocalJourneyRef(_0x444b34)?formatApiJourneyName(_0x444b34,_0x1ff17c):undefined;return{'type':'Jump','name':_0x5c0831[_0x264155(0x1fc)],'target':{'journeyId':_0x26e354,'journeyStageId':_0x136ee9,'journeyBundleId':_0x7bc6ab['bundle_id'],'journeyName':_0x4e97fb,'confirmed':!![]},'next':_0x4d8c78(_0x5c0831[_0x264155(0x1a4)])};}case'end':return{'type':'End','name':_0x173816[_0x264155(0x1fc)]};default:{const _0xc8ae5a=_0x173816;return{'type':'End','name':_0xc8ae5a[_0x264155(0x1fc)]};}}}export function toYamlString(_0x1d6add){const _0x314226=a135_0x167c,_0x1fac3e=stripInternalFields(_0x1d6add),_0x481fcb=a135_0x44af5d['stringify'](_0x1fac3e,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x314226(0x241)}),_0x3ab346=[_0x314226(0x1b4),_0x314226(0x227),_0x314226(0x187),'reentry:',_0x314226(0x1d3),'stages:',_0x314226(0x1de)];let _0x11cb1f=_0x481fcb;for(const _0x53e373 of _0x3ab346){_0x11cb1f=_0x11cb1f['replace'](new RegExp('^('+_0x53e373+')','m'),(_0x5bc499,_0xfc8a21,_0x353e8e)=>{if(_0x353e8e===0x0||_0x11cb1f[_0x353e8e-0x1]==='\x0a'&&_0x11cb1f[_0x353e8e-0x2]==='\x0a')return _0xfc8a21;return'\x0a'+_0xfc8a21;});}return _0x11cb1f;}function stripInternalFields(_0x4148b1){const _0x3dc402=a135_0x167c,{id:_0x212b11,folder_id:_0xca0660,bundle_id:_0x24fc23,bundle_name:_0x8d507f,version:_0x13ff7b,allow_reentry:_0x51b848,..._0x29fd0e}=_0x4148b1;return _0x29fd0e[_0x3dc402(0x18b)]&&(_0x29fd0e[_0x3dc402(0x18b)]=_0x29fd0e[_0x3dc402(0x18b)][_0x3dc402(0x1eb)](_0x22eaf1=>{const _0x5249fa=_0x3dc402,{id:_0x8bd728,..._0x49af72}=_0x22eaf1;return{..._0x49af72,'stages':_0x49af72[_0x5249fa(0x1c7)][_0x5249fa(0x1eb)](stripStageInternalFields),..._0x22eaf1[_0x5249fa(0x1d8)]===!![]?{'latest':!![]}:{},..._0x29fd0e[_0x5249fa(0x18b)][_0x5249fa(0x20a)]===0x1&&_0x49af72[_0x5249fa(0x1a5)]==='v1'?{'version':undefined}:{}};})),_0x29fd0e[_0x3dc402(0x1c7)]&&(_0x29fd0e[_0x3dc402(0x1c7)]=_0x29fd0e[_0x3dc402(0x1c7)][_0x3dc402(0x1eb)](stripStageInternalFields)),_0x29fd0e[_0x3dc402(0x1c3)]&&(_0x29fd0e[_0x3dc402(0x1c3)]=_0x29fd0e['versions'][_0x3dc402(0x1eb)](_0x3fea75=>{const _0x1578fb=_0x3dc402,{id:_0x5775a0,..._0x196bc7}=_0x3fea75;return{..._0x196bc7,'stages':_0x196bc7[_0x1578fb(0x1c7)]['map'](stripStageInternalFields),..._0x3fea75[_0x1578fb(0x1d8)]===!![]?{'latest':!![]}:{}};})),_0x29fd0e;}function stripStageInternalFields(_0x9ff3c6){const {id:_0x51dca9,..._0x5421af}=_0x9ff3c6;return _0x5421af;}export function parseYamlString(_0x4f9182){return safeParseYaml(_0x4f9182,JourneyDefSchema);}export function isJourneyDef(_0x819773){const _0x1c713a=a135_0x167c;return typeof _0x819773==='object'&&_0x819773!==null&&_0x1c713a(0x1f2)in _0x819773&&_0x819773[_0x1c713a(0x1f2)]===_0x1c713a(0x21f);}export function generateTemplate(_0x101434,_0x49e717){const _0x4cc764=a135_0x167c,_0x575dc1={'type':_0x4cc764(0x21f),'name':_0x101434,'description':_0x4cc764(0x23f),'reentry':_0x4cc764(0x208),'goal':{'name':_0x4cc764(0x22e),'segment':_0x4cc764(0x1ba)},'stages':[{'name':_0x4cc764(0x18e),'description':_0x4cc764(0x1fb),'entry_criteria':{'name':'Entry\x20Criteria','segment':_0x49e717},'steps':[{'type':_0x4cc764(0x222),'name':_0x4cc764(0x213),'with':{'duration':0x1,'unit':_0x4cc764(0x240)}},{'type':'activation','name':_0x4cc764(0x190),'with':{'activation':_0x4cc764(0x1b9)}},{'type':_0x4cc764(0x189),'name':_0x4cc764(0x232)}]}]};return toYamlString(_0x575dc1);}function generateUUID(){const _0x25d04f=a135_0x167c;return crypto[_0x25d04f(0x1cc)]();}export const SEGMENT_REF_PREFIX=a135_0x403905(0x1e4);export function parseSegmentRef(_0x2a4186){const _0x27ab40=a135_0x403905;if(_0x2a4186[_0x27ab40(0x1b2)](SEGMENT_REF_PREFIX))return{'type':_0x27ab40(0x1a0),'name':_0x2a4186[_0x27ab40(0x1e2)](SEGMENT_REF_PREFIX[_0x27ab40(0x20a)])};if(/^\d+$/[_0x27ab40(0x243)](_0x2a4186))return{'type':'id','name':_0x2a4186};return{'type':'embedded','name':_0x2a4186};}export function makeSegmentRef(_0x479ecc){return''+SEGMENT_REF_PREFIX+_0x479ecc;}export function isExternalSegmentRef(_0x35b3fa){return _0x35b3fa['startsWith'](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x1478e3){const _0x453b62=a135_0x403905;return!!(_0x1478e3[_0x453b62(0x18b)]&&_0x1478e3[_0x453b62(0x18b)]['length']>0x0);}export function isMultiVersionMode(_0x5d771c){const _0x2b6011=a135_0x403905;return!!(_0x5d771c[_0x2b6011(0x1c3)]&&_0x5d771c[_0x2b6011(0x1c3)]['length']>0x0);}export function isSingleVersionMode(_0x249d61){const _0x3a1072=a135_0x403905;return!!(_0x249d61[_0x3a1072(0x1c7)]&&_0x249d61[_0x3a1072(0x1c7)]['length']>0x0);}export function hasMultipleVersions(_0x16e8a7){const _0x34dd28=a135_0x403905;if(isJourneysArrayMode(_0x16e8a7))return(_0x16e8a7['journeys']?.[_0x34dd28(0x20a)]||0x0)>0x1;if(isMultiVersionMode(_0x16e8a7))return(_0x16e8a7[_0x34dd28(0x1c3)]?.[_0x34dd28(0x20a)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x1abab7){const _0x285c72=a135_0x403905;if(isJourneysArrayMode(_0x1abab7))return _0x1abab7;if(isSingleVersionMode(_0x1abab7)){const {stages:_0x534790,id:_0x4cf471,version:_0xac900d,version_number:_0x32c082,..._0x7928b0}=_0x1abab7;return{..._0x7928b0,'journeys':[{'version':_0xac900d||'v1','stages':_0x534790||[],'id':_0x4cf471,'version_number':_0x32c082}]};}if(isMultiVersionMode(_0x1abab7)){const {versions:_0x324c02,..._0xe26fc6}=_0x1abab7;return{..._0xe26fc6,'journeys':(_0x324c02||[])['map'](_0x4258f5=>({'version':_0x4258f5['name'],'state':_0x4258f5['state'],'latest':_0x4258f5[_0x285c72(0x1d8)],'stages':_0x4258f5[_0x285c72(0x1c7)],'id':_0x4258f5['id'],'version_number':_0x4258f5[_0x285c72(0x185)]}))};}return _0x1abab7;}export function normalizeJourneyDef(_0x34eccc,_0x2d4e7e){const _0x4c5b2f=a135_0x403905,_0x1120c5=normalizeToJourneysFormat(_0x34eccc),_0x322043=_0x2d4e7e?.[_0x4c5b2f(0x205)]?Object[_0x4c5b2f(0x22a)](_0x2d4e7e['segments']):undefined,_0x269c6e=_0x2d4e7e?.[_0x4c5b2f(0x1ee)]?Object[_0x4c5b2f(0x22a)](_0x2d4e7e['activations']):undefined;return{'type':_0x4c5b2f(0x21f),'name':_0x1120c5[_0x4c5b2f(0x1fc)],..._0x1120c5[_0x4c5b2f(0x1ae)]!==undefined&&{'description':_0x1120c5[_0x4c5b2f(0x1ae)]},..._0x1120c5[_0x4c5b2f(0x23c)]&&{'goal':normalizeJourneyCriteria(_0x1120c5[_0x4c5b2f(0x23c)])},..._0x1120c5[_0x4c5b2f(0x1a6)]!==undefined&&{'reentry':_0x1120c5['reentry']},..._0x1120c5[_0x4c5b2f(0x205)]&&{'segments':normalizeEmbeddedSegments(_0x1120c5[_0x4c5b2f(0x205)],_0x322043)},..._0x1120c5[_0x4c5b2f(0x1ee)]&&{'activations':normalizeEmbeddedActivations(_0x1120c5[_0x4c5b2f(0x1ee)],_0x269c6e)},..._0x1120c5['journeys']&&{'journeys':_0x1120c5[_0x4c5b2f(0x18b)][_0x4c5b2f(0x1eb)](_0x516b51=>normalizeJourneyEntry(_0x516b51,_0x1120c5[_0x4c5b2f(0x18b)][_0x4c5b2f(0x20a)]===0x1))}};}function normalizeJourneyEntry(_0x3d2c54,_0x281618){const _0x3b5f45=a135_0x403905;return{...!_0x281618&&_0x3d2c54[_0x3b5f45(0x1a5)]!==undefined&&{'version':_0x3d2c54[_0x3b5f45(0x1a5)]},..._0x3d2c54[_0x3b5f45(0x198)]!==undefined&&{'state':_0x3d2c54[_0x3b5f45(0x198)]},...!_0x281618&&_0x3d2c54['latest']!==undefined&&{'latest':_0x3d2c54[_0x3b5f45(0x1d8)]},..._0x3d2c54[_0x3b5f45(0x185)]!==undefined&&{'version_number':_0x3d2c54['version_number']},..._0x3d2c54['goal']&&{'goal':normalizeJourneyCriteria(_0x3d2c54[_0x3b5f45(0x23c)])},..._0x3d2c54['reentry']!==undefined&&{'reentry':_0x3d2c54[_0x3b5f45(0x1a6)]},'stages':_0x3d2c54[_0x3b5f45(0x1c7)][_0x3b5f45(0x1eb)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x50004e){const _0x29adcd=a135_0x403905;return{'name':_0x50004e[_0x29adcd(0x1fc)],..._0x50004e[_0x29adcd(0x1ae)]!==undefined&&{'description':_0x50004e['description']},..._0x50004e['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0x50004e['entry_criteria'])},..._0x50004e[_0x29adcd(0x1be)]&&{'exit_criteria':_0x50004e[_0x29adcd(0x1be)][_0x29adcd(0x1eb)](normalizeJourneyCriteria)},..._0x50004e['milestone']&&{'milestone':normalizeJourneyCriteria(_0x50004e['milestone'])},..._0x50004e[_0x29adcd(0x1c0)]&&{'steps':normalizeStepsWithImplicitNext(_0x50004e['steps'])}};}function normalizeStepsWithImplicitNext(_0x10c28b){const _0x29b210=a135_0x403905;return _0x10c28b[_0x29b210(0x1eb)]((_0x3931e6,_0x13d329)=>{const _0x54f60f=_0x29b210,_0x45629c=_0x13d329<_0x10c28b[_0x54f60f(0x20a)]-0x1?_0x10c28b[_0x13d329+0x1][_0x54f60f(0x1fc)]:undefined;return normalizeJourneyStep(_0x3931e6,_0x45629c);});}function normalizeJourneyCriteria(_0x490162){const _0x5a632e=a135_0x403905;return{'name':_0x490162['name'],..._0x490162[_0x5a632e(0x1ae)]!==undefined&&{'description':_0x490162['description']},'segment':_0x490162[_0x5a632e(0x20b)],..._0x490162['target']&&{'target':normalizeJumpTarget(_0x490162[_0x5a632e(0x1da)])}};}function normalizeJourneyStep(_0x44c552,_0x273b3d){const _0xc19be3=a135_0x403905,_0x59318a=_0x44c552[_0xc19be3(0x1a4)]!==undefined&&_0x44c552['next']!==_0x273b3d,_0x106ab2={'type':_0x44c552['type'],'name':_0x44c552['name'],..._0x59318a&&{'next':_0x44c552[_0xc19be3(0x1a4)]}};if(_0xc19be3(0x1bf)in _0x44c552&&_0x44c552[_0xc19be3(0x1bf)])return{..._0x106ab2,'with':normalizeStepParams(_0x44c552[_0xc19be3(0x1f2)],_0x44c552[_0xc19be3(0x1bf)])};return _0x106ab2;}function normalizeStepParams(_0x465f98,_0x52e7eb){const _0x24b2d6=a135_0x403905;switch(_0x465f98){case'wait':{const _0x4df091=_0x52e7eb;let _0x148b09;return _0x4df091[_0x24b2d6(0x204)]&&(_0x148b09={'segment':_0x4df091[_0x24b2d6(0x204)][_0x24b2d6(0x20b)],..._0x4df091[_0x24b2d6(0x204)][_0x24b2d6(0x1a4)]!==undefined&&{'next':_0x4df091[_0x24b2d6(0x204)][_0x24b2d6(0x1a4)]},..._0x4df091['condition'][_0x24b2d6(0x1f0)]&&{'timeout':{'duration':_0x4df091[_0x24b2d6(0x204)][_0x24b2d6(0x1f0)][_0x24b2d6(0x1b6)],'unit':_0x4df091[_0x24b2d6(0x204)][_0x24b2d6(0x1f0)]['unit'],..._0x4df091['condition']['timeout'][_0x24b2d6(0x1a4)]!==undefined&&{'next':_0x4df091[_0x24b2d6(0x204)][_0x24b2d6(0x1f0)][_0x24b2d6(0x1a4)]}}}}),{..._0x4df091[_0x24b2d6(0x1b6)]!==undefined&&{'duration':_0x4df091[_0x24b2d6(0x1b6)]},..._0x4df091[_0x24b2d6(0x20c)]!==undefined&&{'unit':_0x4df091[_0x24b2d6(0x20c)]},..._0x4df091[_0x24b2d6(0x1e7)]!==undefined&&{'wait_until':_0x4df091[_0x24b2d6(0x1e7)]},..._0x4df091[_0x24b2d6(0x1c1)]!==undefined&&{'days_of_week':_0x4df091['days_of_week']},..._0x148b09&&{'condition':_0x148b09}};}case'activation':{const _0x1ab6f8=_0x52e7eb;return{'activation':_0x1ab6f8[_0x24b2d6(0x22f)]};}case _0x24b2d6(0x19e):{const _0x2fc95f=_0x52e7eb;return{'branches':_0x2fc95f['branches'][_0x24b2d6(0x1eb)](normalizeDecisionBranch)};}case _0x24b2d6(0x235):{const _0x5d6319=_0x52e7eb;return{..._0x5d6319['customized_split']!==undefined&&{'customized_split':_0x5d6319['customized_split']},..._0x5d6319[_0x24b2d6(0x216)]!==undefined&&{'unique_id':_0x5d6319[_0x24b2d6(0x216)]},'variants':_0x5d6319[_0x24b2d6(0x201)][_0x24b2d6(0x1eb)](normalizeAbTestVariant)};}case _0x24b2d6(0x193):{const _0x26c406=_0x52e7eb;return{'target':normalizeJumpTarget(_0x26c406[_0x24b2d6(0x1da)])};}default:return _0x52e7eb;}}function normalizeDecisionBranch(_0x233028){const _0x31b7a2=a135_0x403905;return{'name':_0x233028[_0x31b7a2(0x1fc)],..._0x233028[_0x31b7a2(0x20b)]!==undefined&&{'segment':_0x233028[_0x31b7a2(0x20b)]},..._0x233028['excluded']!==undefined&&{'excluded':_0x233028[_0x31b7a2(0x1cd)]},..._0x233028[_0x31b7a2(0x1a4)]!==undefined&&{'next':_0x233028[_0x31b7a2(0x1a4)]}};}function normalizeAbTestVariant(_0x4a8409){const _0x19ab2e=a135_0x403905;return{..._0x4a8409['id']!==undefined&&{'id':_0x4a8409['id']},'name':_0x4a8409[_0x19ab2e(0x1fc)],'percentage':_0x4a8409[_0x19ab2e(0x1ff)],..._0x4a8409[_0x19ab2e(0x1a4)]!==undefined&&{'next':_0x4a8409['next']}};}function normalizeJumpTarget(_0x3f9fe2){const _0x21471f=a135_0x403905;return{'journey':_0x3f9fe2[_0x21471f(0x21f)],'stage':_0x3f9fe2['stage'],..._0x3f9fe2[_0x21471f(0x210)]!==undefined&&{'bundle_id':_0x3f9fe2['bundle_id']}};}function normalizeEmbeddedSegments(_0x38bbb2,_0x9d21a8){const _0x3a7351=a135_0x403905,_0x171241={},_0x3843a3=Object[_0x3a7351(0x22a)](_0x38bbb2),_0x3809b7=_0x9d21a8?[..._0x9d21a8['filter'](_0x51b2a3=>_0x3843a3[_0x3a7351(0x214)](_0x51b2a3)),..._0x3843a3[_0x3a7351(0x1db)](_0x36d8bd=>!_0x9d21a8['includes'](_0x36d8bd))[_0x3a7351(0x223)]()]:_0x3843a3[_0x3a7351(0x223)]();for(const _0xae2ee9 of _0x3809b7){const _0x215454=_0x38bbb2[_0xae2ee9];if(_0x215454[_0x3a7351(0x1e8)]){const _0x54b41e=_0x215454[_0x3a7351(0x1e8)];if(_0x54b41e[_0x3a7351(0x1f2)]!==_0x3a7351(0x23b)&&_0x54b41e['type']!=='Or'){const _0x4f6d29=_0x54b41e['type']??_0x3a7351(0x22d);throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x3a7351(0x244)+_0xae2ee9+_0x3a7351(0x1b5)+(_0x3a7351(0x1d6)+_0x4f6d29+'\x27.\x0a')+_0x3a7351(0x18a)+_0x3a7351(0x1dd)+'\x20\x20\x20\x20type:\x20And\x0a'+_0x3a7351(0x21c)+_0x3a7351(0x1aa)+_0x3a7351(0x234)+_0x3a7351(0x1e9));}if(!_0x54b41e[_0x3a7351(0x1a3)]||!Array[_0x3a7351(0x1e5)](_0x54b41e[_0x3a7351(0x1a3)]))throw new SDKError(ErrorCode[_0x3a7351(0x1c4)],_0x3a7351(0x244)+_0xae2ee9+_0x3a7351(0x1b5)+'rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a'+'Expected\x20format:\x0a'+'\x20\x20rule:\x0a'+(_0x3a7351(0x18f)+_0x54b41e[_0x3a7351(0x1f2)]+'\x0a')+_0x3a7351(0x21c)+_0x3a7351(0x1aa)+_0x3a7351(0x234)+_0x3a7351(0x1e9));}_0x171241[_0xae2ee9]={..._0x215454['description']&&_0x215454[_0x3a7351(0x1ae)]['trim']()&&{'description':_0x215454['description']},..._0x215454[_0x3a7351(0x1e8)]&&{'rule':deepSortObject(_0x215454['rule'])}};}return _0x171241;}function normalizeEmbeddedActivations(_0x33d26a,_0x3be791){const _0x1eb117=a135_0x403905,_0x133ca3={},_0xcbb182=Object[_0x1eb117(0x22a)](_0x33d26a),_0x5882d1=_0x3be791?[..._0x3be791[_0x1eb117(0x1db)](_0x4ceea4=>_0xcbb182[_0x1eb117(0x214)](_0x4ceea4)),..._0xcbb182['filter'](_0x2b52e9=>!_0x3be791[_0x1eb117(0x214)](_0x2b52e9))['sort']()]:_0xcbb182['sort']();for(const _0x188d67 of _0x5882d1){const _0x1f5b2b=_0x33d26a[_0x188d67];_0x133ca3[_0x188d67]={'name':_0x1f5b2b[_0x1eb117(0x1fc)],'connection':_0x1f5b2b['connection'],..._0x1f5b2b[_0x1eb117(0x1ae)]!==undefined&&{'description':_0x1f5b2b[_0x1eb117(0x1ae)]},..._0x1f5b2b[_0x1eb117(0x229)]!==undefined&&{'all_columns':_0x1f5b2b[_0x1eb117(0x229)]},..._0x1f5b2b[_0x1eb117(0x1ed)]!==undefined&&{'columns':_0x1f5b2b['columns']},..._0x1f5b2b[_0x1eb117(0x1f8)]!==undefined&&{'behavior':_0x1f5b2b[_0x1eb117(0x1f8)]},..._0x1f5b2b[_0x1eb117(0x211)]!==undefined&&{'schedule':_0x1f5b2b['schedule']},..._0x1f5b2b['notification']!==undefined&&{'notification':_0x1f5b2b[_0x1eb117(0x226)]},..._0x1f5b2b[_0x1eb117(0x1a2)]!==undefined&&{'connector_config':_0x1f5b2b[_0x1eb117(0x1a2)]},..._0x1f5b2b[_0x1eb117(0x195)]!==undefined&&{'activation_template_id':_0x1f5b2b['activation_template_id']}};}return _0x133ca3;}export function getActiveStages(_0x445229){const _0xaa30ac=a135_0x403905;if(isJourneysArrayMode(_0x445229)){const _0xbe8ea3=_0x445229['journeys']||[],_0x2edef6=_0xbe8ea3[_0xaa30ac(0x22b)](_0x45bc47=>_0x45bc47[_0xaa30ac(0x1d8)]===!![])||_0xbe8ea3[0x0];return _0x2edef6?.[_0xaa30ac(0x1c7)]||[];}if(isSingleVersionMode(_0x445229))return _0x445229[_0xaa30ac(0x1c7)]||[];if(isMultiVersionMode(_0x445229)){const _0x2cf9f7=_0x445229[_0xaa30ac(0x1c3)]||[],_0x269874=_0x2cf9f7[_0xaa30ac(0x22b)](_0x4755dc=>_0x4755dc['latest']===!![])||_0x2cf9f7[0x0];return _0x269874?.[_0xaa30ac(0x1c7)]||[];}return[];}export function getLatestJourneyEntry(_0x56691c){const _0x2a2e0c=a135_0x403905;if(isJourneysArrayMode(_0x56691c)){const _0x4c001e=_0x56691c[_0x2a2e0c(0x18b)]||[];return _0x4c001e[_0x2a2e0c(0x22b)](_0x3d36be=>_0x3d36be[_0x2a2e0c(0x1d8)]===!![])||_0x4c001e[0x0];}if(isMultiVersionMode(_0x56691c)){const _0x31c4a3=_0x56691c[_0x2a2e0c(0x1c3)]||[],_0x3a0348=_0x31c4a3[_0x2a2e0c(0x22b)](_0x3ee4e0=>_0x3ee4e0['latest']===!![])||_0x31c4a3[0x0];if(_0x3a0348)return{'version':_0x3a0348['name'],'state':_0x3a0348[_0x2a2e0c(0x198)],'latest':_0x3a0348[_0x2a2e0c(0x1d8)],'stages':_0x3a0348[_0x2a2e0c(0x1c7)],'id':_0x3a0348['id'],'version_number':_0x3a0348[_0x2a2e0c(0x185)]};}if(isSingleVersionMode(_0x56691c))return{'version':_0x56691c[_0x2a2e0c(0x1a5)]||'v1','state':'draft','stages':_0x56691c[_0x2a2e0c(0x1c7)]||[],'id':_0x56691c['id'],'version_number':_0x56691c['version_number'],'goal':_0x56691c[_0x2a2e0c(0x23c)],'reentry':_0x56691c[_0x2a2e0c(0x1a6)]};return undefined;}export function getLatestVersion(_0x4f1d4a){const _0xc0d631=a135_0x403905;if(!isMultiVersionMode(_0x4f1d4a))return undefined;const _0x3e48d8=_0x4f1d4a[_0xc0d631(0x1c3)]||[];return _0x3e48d8['find'](_0x5ca01c=>_0x5ca01c['latest']===!![])||_0x3e48d8[0x0];}export function getEffectiveGoal(_0x4d961e){const _0x444106=a135_0x403905,_0x1aee0b=getLatestJourneyEntry(_0x4d961e);return _0x1aee0b?.[_0x444106(0x23c)]||_0x4d961e['goal'];}export function getEffectiveReentry(_0x500dd6){const _0x5d1b77=getLatestJourneyEntry(_0x500dd6);return _0x5d1b77?.['reentry']||_0x500dd6['reentry'];}export function collectSegmentRefs(_0x2b84e){const _0x25b4a8=a135_0x403905,_0x53b825=new Set();_0x2b84e['goal']?.[_0x25b4a8(0x20b)]&&_0x53b825['add'](_0x2b84e[_0x25b4a8(0x23c)]['segment']);const _0x199536=_0x28e347=>{const _0x528911=_0x25b4a8;for(const _0x111aea of _0x28e347){_0x111aea[_0x528911(0x1d2)]?.['segment']&&_0x53b825[_0x528911(0x20d)](_0x111aea['entry_criteria']['segment']);if(_0x111aea[_0x528911(0x1be)])for(const _0x5f5de8 of _0x111aea[_0x528911(0x1be)]){_0x5f5de8[_0x528911(0x20b)]&&_0x53b825[_0x528911(0x20d)](_0x5f5de8[_0x528911(0x20b)]);}_0x111aea[_0x528911(0x19a)]?.['segment']&&_0x53b825['add'](_0x111aea[_0x528911(0x19a)][_0x528911(0x20b)]);if(_0x111aea[_0x528911(0x1c0)])for(const _0x260952 of _0x111aea[_0x528911(0x1c0)]){if(_0x260952[_0x528911(0x1f2)]===_0x528911(0x19e)){const _0x394cf8=_0x260952;for(const _0x42521d of _0x394cf8[_0x528911(0x1bf)][_0x528911(0x1cb)]){_0x42521d[_0x528911(0x20b)]&&_0x53b825[_0x528911(0x20d)](_0x42521d[_0x528911(0x20b)]);}}else{if(_0x260952[_0x528911(0x1f2)]===_0x528911(0x222)){const _0x55822a=_0x260952;_0x55822a[_0x528911(0x1bf)][_0x528911(0x204)]?.['segment']&&_0x53b825['add'](_0x55822a['with'][_0x528911(0x204)]['segment']);}}}}};_0x2b84e['stages']&&_0x199536(_0x2b84e[_0x25b4a8(0x1c7)]);if(_0x2b84e[_0x25b4a8(0x1c3)])for(const _0x355429 of _0x2b84e[_0x25b4a8(0x1c3)]){_0x199536(_0x355429['stages']);}return _0x53b825;}export function validateSegmentRefs(_0x1db3de){const _0x47750a=a135_0x403905,_0x50f521=[],_0x318ae9=collectSegmentRefs(_0x1db3de),_0x170794=new Set(Object[_0x47750a(0x22a)](_0x1db3de['segments']||{}));for(const _0x3bf405 of _0x318ae9){const _0x113a0f=parseSegmentRef(_0x3bf405);_0x113a0f[_0x47750a(0x1f2)]==='embedded'&&!_0x170794[_0x47750a(0x1bb)](_0x113a0f[_0x47750a(0x1fc)])&&_0x50f521[_0x47750a(0x1b7)](_0x47750a(0x1e6)+_0x113a0f['name']+_0x47750a(0x1a7)+_0x113a0f['name']+_0x47750a(0x1d5));}return _0x50f521;}export function collectSegmentIdsFromJourneyApi(_0x22456f){const _0xc785c0=a135_0x403905,_0x3edd5b=new Set();_0x22456f[_0xc785c0(0x237)][_0xc785c0(0x23c)]?.[_0xc785c0(0x225)]&&_0x3edd5b[_0xc785c0(0x20d)](_0x22456f['attributes'][_0xc785c0(0x23c)][_0xc785c0(0x225)]);const _0x3b2fec=_0x22456f[_0xc785c0(0x237)][_0xc785c0(0x23d)];if(Array[_0xc785c0(0x1e5)](_0x3b2fec))for(const _0x595ec3 of _0x3b2fec){_0x595ec3['entryCriteria']?.[_0xc785c0(0x225)]&&_0x3edd5b[_0xc785c0(0x20d)](_0x595ec3[_0xc785c0(0x1e1)][_0xc785c0(0x225)]);const _0x1a2c06=_0x595ec3[_0xc785c0(0x1e0)]??_0x595ec3[_0xc785c0(0x1e3)];if(Array[_0xc785c0(0x1e5)](_0x1a2c06))for(const _0x5b1d8e of _0x1a2c06){_0x5b1d8e[_0xc785c0(0x225)]&&_0x3edd5b[_0xc785c0(0x20d)](_0x5b1d8e[_0xc785c0(0x225)]);}_0x595ec3['milestone']?.['segmentId']&&_0x3edd5b[_0xc785c0(0x20d)](_0x595ec3[_0xc785c0(0x19a)]['segmentId']);if(_0x595ec3[_0xc785c0(0x1c0)]&&typeof _0x595ec3['steps']==='object'){const _0x22a265=Array['isArray'](_0x595ec3[_0xc785c0(0x1c0)])?_0x595ec3[_0xc785c0(0x1c0)]:Object[_0xc785c0(0x1d4)](_0x595ec3[_0xc785c0(0x1c0)]);for(const _0x224695 of _0x22a265){_0x224695['waitCondition']?.[_0xc785c0(0x225)]&&_0x3edd5b['add'](_0x224695['waitCondition']['segmentId']);const _0x5446ae=_0x224695;_0x5446ae['conditionSegmentId']&&_0x3edd5b['add'](_0x5446ae[_0xc785c0(0x1c9)]);if(Array[_0xc785c0(0x1e5)](_0x5446ae[_0xc785c0(0x1a3)]))for(const _0xb9767c of _0x5446ae[_0xc785c0(0x1a3)]){_0xb9767c[_0xc785c0(0x225)]&&_0x3edd5b[_0xc785c0(0x20d)](_0xb9767c[_0xc785c0(0x225)]);}if(Array['isArray'](_0x224695[_0xc785c0(0x1cb)]))for(const _0x32f68f of _0x224695['branches']){_0x32f68f['segmentId']&&_0x3edd5b[_0xc785c0(0x20d)](_0x32f68f[_0xc785c0(0x225)]);}}}}return _0x3edd5b;}
|
|
1
|
+
const a135_0x4c4cba=a135_0x22b5;(function(_0x2ee9f9,_0x22b08e){const _0x632704=a135_0x22b5,_0xaaf151=_0x2ee9f9();while(!![]){try{const _0x503c89=-parseInt(_0x632704(0x10e))/0x1+parseInt(_0x632704(0xe1))/0x2+parseInt(_0x632704(0x109))/0x3+parseInt(_0x632704(0x13f))/0x4*(parseInt(_0x632704(0x170))/0x5)+-parseInt(_0x632704(0x106))/0x6*(parseInt(_0x632704(0x13d))/0x7)+-parseInt(_0x632704(0x193))/0x8*(-parseInt(_0x632704(0x198))/0x9)+-parseInt(_0x632704(0x146))/0xa;if(_0x503c89===_0x22b08e)break;else _0xaaf151['push'](_0xaaf151['shift']());}catch(_0x2257d9){_0xaaf151['push'](_0xaaf151['shift']());}}}(a135_0x17c9,0x23ec7));import*as a135_0x17b69b 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(_0x4116a){const _0x516738=a135_0x22b5,_0x5199fa=_0x4116a[_0x516738(0x133)]();if(_0x5199fa===_0x516738(0xfe)||_0x5199fa===_0x516738(0x144))return _0x516738(0x144);if(_0x5199fa===_0x516738(0xe0)||_0x5199fa===_0x516738(0x11c))return _0x516738(0x11c);return _0x4116a;}export function journeyResponseToDefSync(_0x1f42cf){const _0x12dd01=a135_0x22b5,_0xd44f78=_0x1f42cf[_0x12dd01(0x157)],_0x36be0d=_0xd44f78[_0x12dd01(0x153)]||_0xd44f78[_0x12dd01(0xe6)],_0x493ad7={'stages':_0xd44f78[_0x12dd01(0xf9)][_0x12dd01(0x159)](convertApiStageToYaml),'id':_0x1f42cf['id']};_0xd44f78['goal']&&(_0x493ad7[_0x12dd01(0x179)]=convertApiCriteriaToYaml(_0xd44f78[_0x12dd01(0x179)]));_0xd44f78[_0x12dd01(0xe6)]&&_0xd44f78[_0x12dd01(0xe6)]!==_0x36be0d&&(_0x493ad7[_0x12dd01(0x13c)]=_0xd44f78['name']);_0xd44f78['versionNumber']!==undefined&&(_0x493ad7[_0x12dd01(0xf0)]=_0xd44f78['versionNumber']);_0xd44f78[_0x12dd01(0x140)]&&(_0x493ad7[_0x12dd01(0x140)]=_0xd44f78[_0x12dd01(0x140)]===_0x12dd01(0x18d)?_0x12dd01(0x18d):'draft');const _0x5044eb={'type':_0x12dd01(0x14b),'name':_0x36be0d,'journeys':[_0x493ad7]};_0xd44f78[_0x12dd01(0x136)]&&(_0x5044eb[_0x12dd01(0x136)]=_0xd44f78[_0x12dd01(0x136)]);_0xd44f78[_0x12dd01(0x179)]&&(_0x5044eb[_0x12dd01(0x179)]=convertApiCriteriaToYaml(_0xd44f78[_0x12dd01(0x179)]));if(_0xd44f78[_0x12dd01(0x17a)])_0x5044eb[_0x12dd01(0x194)]=_0xd44f78[_0x12dd01(0x17a)];else _0xd44f78['allowReentry']!==undefined&&(_0x5044eb['reentry']=_0xd44f78[_0x12dd01(0x14e)]?_0x12dd01(0x195):_0x12dd01(0x188));return _0xd44f78[_0x12dd01(0x141)]&&(_0x5044eb[_0x12dd01(0xfb)]=_0xd44f78[_0x12dd01(0x141)]),_0xd44f78['journeyBundleName']&&(_0x5044eb[_0x12dd01(0x135)]=_0xd44f78[_0x12dd01(0x153)]),_0x1f42cf[_0x12dd01(0x177)]?.['parentFolder']?.[_0x12dd01(0x10c)]?.['id']&&(_0x5044eb[_0x12dd01(0x105)]=_0x1f42cf['relationships']['parentFolder']['data']['id']),_0x5044eb;}export async function journeyResponseToDef(_0x26c7ae,_0x3dae5e){const _0x118eb5=a135_0x22b5,_0x3e0f29=journeyResponseToDefSync(_0x26c7ae);if(!_0x3dae5e)return _0x3e0f29;const _0x180cf0=new Set();collectSegmentIdsFromJourney(_0x3e0f29,_0x180cf0);const _0x3da64d=new Set();collectActivationIdsFromJourney(_0x3e0f29,_0x3da64d);const _0x208b08={},_0x540426=new Map();for(const _0x5af940 of Array[_0x118eb5(0x19b)](_0x180cf0)['sort']()){if(_0x3dae5e['resolveSegment']){const _0x27e818=await _0x3dae5e[_0x118eb5(0x10f)](_0x5af940);if(_0x27e818[_0x118eb5(0x17c)]){_0x540426[_0x118eb5(0x19a)](_0x5af940,_0x27e818[_0x118eb5(0xe6)]);if(_0x27e818[_0x118eb5(0x11d)]){const _0x5f457a={..._0x27e818['definition'],'rule':deepSortObject(_0x27e818['definition'][_0x118eb5(0xe3)])};_0x208b08[_0x27e818[_0x118eb5(0xe6)]]=_0x5f457a;}}else _0x540426['set'](_0x5af940,makeSegmentRef(_0x27e818['name']));}else{if(_0x3dae5e['resolveSegmentName']){const _0x18571c=await _0x3dae5e['resolveSegmentName'](_0x5af940);_0x540426[_0x118eb5(0x19a)](_0x5af940,_0x18571c);}}}const _0x38a7ae={},_0xb76e98=new Map();for(const _0x71884d of Array[_0x118eb5(0x19b)](_0x3da64d)[_0x118eb5(0x12b)]()){if(_0x3dae5e[_0x118eb5(0x181)]){const _0x1788de=await _0x3dae5e[_0x118eb5(0x181)](_0x71884d);_0x1788de[_0x118eb5(0x17c)]?(_0xb76e98[_0x118eb5(0x19a)](_0x71884d,_0x1788de[_0x118eb5(0xe6)]),_0x1788de[_0x118eb5(0x11d)]&&(_0x38a7ae[_0x1788de[_0x118eb5(0xe6)]]=_0x1788de[_0x118eb5(0x11d)])):_0xb76e98['set'](_0x71884d,makeSegmentRef(_0x1788de[_0x118eb5(0xe6)]));}else{if(_0x3dae5e[_0x118eb5(0x101)]){const _0x1f5ad0=await _0x3dae5e[_0x118eb5(0x101)](_0x71884d);_0xb76e98[_0x118eb5(0x19a)](_0x71884d,_0x1f5ad0);}}}_0x540426[_0x118eb5(0xfd)]>0x0&&replaceSegmentIdsInJourney(_0x3e0f29,_0x540426);_0xb76e98['size']>0x0&&replaceActivationIdsInJourney(_0x3e0f29,_0xb76e98);if(_0x3dae5e[_0x118eb5(0x166)]){const _0x2394d2=[];collectJumpTargetsFromJourney(_0x3e0f29,_0x2394d2);if(_0x2394d2['length']>0x0){const _0x143305=new Map();for(const _0x12eb14 of _0x2394d2){try{const _0x2e3ee1=await _0x3dae5e[_0x118eb5(0x166)](_0x12eb14['journeyId'],_0x12eb14[_0x118eb5(0x172)]);_0x143305[_0x118eb5(0x19a)](_0x12eb14[_0x118eb5(0x16e)]+':'+_0x12eb14['stageId'],_0x2e3ee1);}catch{}}_0x143305[_0x118eb5(0xfd)]>0x0&&replaceJumpTargetsInJourney(_0x3e0f29,_0x143305);}}return Object['keys'](_0x208b08)['length']>0x0&&(_0x3e0f29[_0x118eb5(0x156)]=_0x208b08),Object[_0x118eb5(0x183)](_0x38a7ae)['length']>0x0&&(_0x3e0f29[_0x118eb5(0x10d)]=_0x38a7ae),_0x3e0f29;}function collectSegmentIdsFromJourney(_0x3946b0,_0x5a8426){const _0x2edfce=a135_0x22b5;_0x3946b0['goal']?.[_0x2edfce(0x11a)]&&_0x5a8426[_0x2edfce(0xf7)](_0x3946b0['goal'][_0x2edfce(0x11a)]);const _0x4b6bfe=_0x53ccc5=>{const _0xa9e19e=_0x2edfce;for(const _0x30248c of _0x53ccc5){_0x30248c[_0xa9e19e(0x126)]?.['segment']&&_0x5a8426['add'](_0x30248c[_0xa9e19e(0x126)]['segment']);if(_0x30248c[_0xa9e19e(0x160)])for(const _0x183474 of _0x30248c['exit_criteria']){_0x183474[_0xa9e19e(0x11a)]&&_0x5a8426['add'](_0x183474['segment']);}_0x30248c[_0xa9e19e(0x17f)]?.['segment']&&_0x5a8426[_0xa9e19e(0xf7)](_0x30248c[_0xa9e19e(0x17f)][_0xa9e19e(0x11a)]);if(_0x30248c[_0xa9e19e(0x151)])for(const _0x41f2fd of _0x30248c[_0xa9e19e(0x151)]){if(_0x41f2fd['type']===_0xa9e19e(0x13b)){const _0x5171ca=_0x41f2fd;for(const _0xab1093 of _0x5171ca['with'][_0xa9e19e(0xf6)]){_0xab1093[_0xa9e19e(0x11a)]&&_0x5a8426['add'](_0xab1093[_0xa9e19e(0x11a)]);}}else{if(_0x41f2fd[_0xa9e19e(0x117)]===_0xa9e19e(0xe8)){const _0x463020=_0x41f2fd;_0x463020[_0xa9e19e(0x107)][_0xa9e19e(0x14d)]?.[_0xa9e19e(0x11a)]&&_0x5a8426['add'](_0x463020[_0xa9e19e(0x107)][_0xa9e19e(0x14d)][_0xa9e19e(0x11a)]);}}}}};if(_0x3946b0[_0x2edfce(0x168)])for(const _0x2163e6 of _0x3946b0[_0x2edfce(0x168)]){_0x2163e6[_0x2edfce(0x179)]?.[_0x2edfce(0x11a)]&&_0x5a8426[_0x2edfce(0xf7)](_0x2163e6[_0x2edfce(0x179)][_0x2edfce(0x11a)]),_0x4b6bfe(_0x2163e6['stages']);}_0x3946b0[_0x2edfce(0x13a)]&&_0x4b6bfe(_0x3946b0['stages']);if(_0x3946b0['versions'])for(const _0x29c15b of _0x3946b0[_0x2edfce(0x16a)]){_0x4b6bfe(_0x29c15b[_0x2edfce(0x13a)]);}}function replaceSegmentIdsInJourney(_0x291440,_0x2aedce){const _0x5a95df=a135_0x22b5,_0x2bfe04=_0xd88055=>_0x2aedce[_0x5a95df(0x148)](_0xd88055)||_0xd88055;_0x291440[_0x5a95df(0x179)]?.[_0x5a95df(0x11a)]&&(_0x291440[_0x5a95df(0x179)][_0x5a95df(0x11a)]=_0x2bfe04(_0x291440[_0x5a95df(0x179)][_0x5a95df(0x11a)]));const _0x542af0=_0x5099ca=>{const _0x5c7a5d=_0x5a95df;for(const _0x1fe713 of _0x5099ca){_0x1fe713[_0x5c7a5d(0x126)]?.[_0x5c7a5d(0x11a)]&&(_0x1fe713[_0x5c7a5d(0x126)][_0x5c7a5d(0x11a)]=_0x2bfe04(_0x1fe713[_0x5c7a5d(0x126)][_0x5c7a5d(0x11a)]));if(_0x1fe713[_0x5c7a5d(0x160)])for(const _0x2016bc of _0x1fe713['exit_criteria']){_0x2016bc[_0x5c7a5d(0x11a)]&&(_0x2016bc[_0x5c7a5d(0x11a)]=_0x2bfe04(_0x2016bc[_0x5c7a5d(0x11a)]));}_0x1fe713[_0x5c7a5d(0x17f)]?.[_0x5c7a5d(0x11a)]&&(_0x1fe713['milestone'][_0x5c7a5d(0x11a)]=_0x2bfe04(_0x1fe713[_0x5c7a5d(0x17f)]['segment']));if(_0x1fe713['steps'])for(const _0x3275ad of _0x1fe713[_0x5c7a5d(0x151)]){if(_0x3275ad[_0x5c7a5d(0x117)]===_0x5c7a5d(0x13b)){const _0xb7d99b=_0x3275ad;for(const _0x3a314c of _0xb7d99b['with'][_0x5c7a5d(0xf6)]){_0x3a314c[_0x5c7a5d(0x11a)]&&(_0x3a314c['segment']=_0x2bfe04(_0x3a314c[_0x5c7a5d(0x11a)]));}}else{if(_0x3275ad[_0x5c7a5d(0x117)]===_0x5c7a5d(0xe8)){const _0x4530b3=_0x3275ad;_0x4530b3['with']['condition']?.[_0x5c7a5d(0x11a)]&&(_0x4530b3[_0x5c7a5d(0x107)][_0x5c7a5d(0x14d)][_0x5c7a5d(0x11a)]=_0x2bfe04(_0x4530b3[_0x5c7a5d(0x107)][_0x5c7a5d(0x14d)][_0x5c7a5d(0x11a)]));}}}}};if(_0x291440[_0x5a95df(0x168)])for(const _0x46ab0a of _0x291440['journeys']){_0x46ab0a[_0x5a95df(0x179)]?.[_0x5a95df(0x11a)]&&(_0x46ab0a[_0x5a95df(0x179)]['segment']=_0x2bfe04(_0x46ab0a[_0x5a95df(0x179)][_0x5a95df(0x11a)])),_0x542af0(_0x46ab0a[_0x5a95df(0x13a)]);}_0x291440[_0x5a95df(0x13a)]&&_0x542af0(_0x291440['stages']);if(_0x291440[_0x5a95df(0x16a)])for(const _0x5e89cd of _0x291440['versions']){_0x542af0(_0x5e89cd['stages']);}}function collectActivationIdsFromJourney(_0x58c863,_0x4c5761){const _0x38d67b=a135_0x22b5,_0x36bc73=_0x245331=>{const _0x158761=a135_0x22b5;for(const _0x465689 of _0x245331){if(_0x465689[_0x158761(0x151)])for(const _0x19140d of _0x465689[_0x158761(0x151)]){if(_0x19140d[_0x158761(0x117)]===_0x158761(0x12c)){const _0x216eb2=_0x19140d;_0x216eb2[_0x158761(0x107)][_0x158761(0x12c)]&&/^\d+$/[_0x158761(0x134)](_0x216eb2[_0x158761(0x107)][_0x158761(0x12c)])&&_0x4c5761[_0x158761(0xf7)](_0x216eb2[_0x158761(0x107)][_0x158761(0x12c)]);}}}};if(_0x58c863[_0x38d67b(0x168)])for(const _0x234e2e of _0x58c863[_0x38d67b(0x168)]){_0x36bc73(_0x234e2e[_0x38d67b(0x13a)]);}_0x58c863[_0x38d67b(0x13a)]&&_0x36bc73(_0x58c863[_0x38d67b(0x13a)]);if(_0x58c863['versions'])for(const _0x2efffa of _0x58c863['versions']){_0x36bc73(_0x2efffa[_0x38d67b(0x13a)]);}}function replaceActivationIdsInJourney(_0x312e2b,_0x3b71c7){const _0x32d4f8=a135_0x22b5,_0x3c5ef5=_0x41aff4=>_0x3b71c7['get'](_0x41aff4)||_0x41aff4,_0xd8d266=_0x1949e3=>{const _0x39eaf5=a135_0x22b5;for(const _0x1bddee of _0x1949e3){if(_0x1bddee[_0x39eaf5(0x151)])for(const _0x1ab7f4 of _0x1bddee['steps']){if(_0x1ab7f4[_0x39eaf5(0x117)]===_0x39eaf5(0x12c)){const _0x12e59f=_0x1ab7f4;_0x12e59f[_0x39eaf5(0x107)][_0x39eaf5(0x12c)]&&(_0x12e59f['with'][_0x39eaf5(0x12c)]=_0x3c5ef5(_0x12e59f['with'][_0x39eaf5(0x12c)]));}}}};if(_0x312e2b[_0x32d4f8(0x168)])for(const _0x1393bd of _0x312e2b[_0x32d4f8(0x168)]){_0xd8d266(_0x1393bd[_0x32d4f8(0x13a)]);}_0x312e2b[_0x32d4f8(0x13a)]&&_0xd8d266(_0x312e2b[_0x32d4f8(0x13a)]);if(_0x312e2b['versions'])for(const _0x5b5ad3 of _0x312e2b[_0x32d4f8(0x16a)]){_0xd8d266(_0x5b5ad3[_0x32d4f8(0x13a)]);}}function collectJumpTargetsFromJourney(_0x7a332f,_0x47e27f){const _0x31ef07=a135_0x22b5,_0x467e68=new Set(),_0x571044=_0x3edc4d=>{const _0x559083=a135_0x22b5;for(const _0x11ce34 of _0x3edc4d){if(_0x11ce34[_0x559083(0x151)])for(const _0x4fffaa of _0x11ce34['steps']){if(_0x4fffaa['type']===_0x559083(0x173)){const _0x4cacf5=_0x4fffaa,_0x323680=_0x4cacf5[_0x559083(0x107)][_0x559083(0x11b)];if(_0x323680[_0x559083(0x14b)]&&_0x323680[_0x559083(0xff)]&&/^\d+$/[_0x559083(0x134)](_0x323680[_0x559083(0x14b)])&&/^\d+$/['test'](_0x323680['stage'])){const _0x33054e=_0x323680[_0x559083(0x14b)]+':'+_0x323680['stage'];!_0x467e68[_0x559083(0x113)](_0x33054e)&&(_0x467e68[_0x559083(0xf7)](_0x33054e),_0x47e27f[_0x559083(0x155)]({'journeyId':_0x323680[_0x559083(0x14b)],'stageId':_0x323680[_0x559083(0xff)]}));}}}}};if(_0x7a332f['journeys'])for(const _0x1a42f8 of _0x7a332f[_0x31ef07(0x168)]){_0x571044(_0x1a42f8[_0x31ef07(0x13a)]);}_0x7a332f[_0x31ef07(0x13a)]&&_0x571044(_0x7a332f[_0x31ef07(0x13a)]);if(_0x7a332f['versions'])for(const _0x3f3ef6 of _0x7a332f[_0x31ef07(0x16a)]){_0x571044(_0x3f3ef6[_0x31ef07(0x13a)]);}}function replaceJumpTargetsInJourney(_0x67b74a,_0x2b6704){const _0x4ffa90=a135_0x22b5,_0x250c8a=_0x5c3f2a=>{const _0x1d00ff=a135_0x22b5;for(const _0x2798dd of _0x5c3f2a){if(_0x2798dd[_0x1d00ff(0x151)])for(const _0x186b5b of _0x2798dd[_0x1d00ff(0x151)]){if(_0x186b5b[_0x1d00ff(0x117)]===_0x1d00ff(0x173)){const _0xf06a14=_0x186b5b,_0x59bfe6=_0xf06a14[_0x1d00ff(0x107)]['target'],_0x168549=_0x59bfe6['journey']+':'+_0x59bfe6[_0x1d00ff(0xff)],_0x18e7bd=_0x2b6704[_0x1d00ff(0x148)](_0x168549);_0x18e7bd&&(_0x59bfe6[_0x1d00ff(0x14b)]=_0x18e7bd[_0x1d00ff(0xfa)],_0x59bfe6[_0x1d00ff(0xff)]=_0x18e7bd[_0x1d00ff(0x145)]);}}}};if(_0x67b74a[_0x4ffa90(0x168)])for(const _0x4af80f of _0x67b74a['journeys']){_0x250c8a(_0x4af80f[_0x4ffa90(0x13a)]);}_0x67b74a[_0x4ffa90(0x13a)]&&_0x250c8a(_0x67b74a[_0x4ffa90(0x13a)]);if(_0x67b74a[_0x4ffa90(0x16a)])for(const _0x73d5b1 of _0x67b74a[_0x4ffa90(0x16a)]){_0x250c8a(_0x73d5b1[_0x4ffa90(0x13a)]);}}function generateReadableStepName(_0x5481e6,_0x24970b){const _0x14adf5=a135_0x22b5;if(_0x5481e6[_0x14adf5(0xe6)]&&_0x5481e6[_0x14adf5(0xe6)]!==_0x5481e6[_0x14adf5(0x117)]){const _0x4c6876=_0x5481e6['name'][_0x14adf5(0x165)]();if(_0x4c6876&&/[a-z0-9\p{L}]/iu['test'](_0x4c6876))return _0x4c6876;}const _0x71bcf=_0x5481e6[_0x14adf5(0x117)][_0x14adf5(0x133)]()[_0x14adf5(0x18a)](/step$/i,'');return _0x71bcf+'_'+(_0x24970b+0x1);}function getStepNextRefs(_0x51f1bd){const _0x19ddba=a135_0x22b5,_0x52d518=[];if(_0x51f1bd[_0x19ddba(0xec)])_0x52d518[_0x19ddba(0x155)](_0x51f1bd['next']);if(_0x51f1bd[_0x19ddba(0xf6)])for(const _0x44eb1d of _0x51f1bd[_0x19ddba(0xf6)]){if(_0x44eb1d[_0x19ddba(0xec)])_0x52d518[_0x19ddba(0x155)](_0x44eb1d[_0x19ddba(0xec)]);}if(_0x51f1bd[_0x19ddba(0x162)])for(const _0x273677 of _0x51f1bd[_0x19ddba(0x162)]){if(_0x273677['next'])_0x52d518['push'](_0x273677[_0x19ddba(0xec)]);}if(_0x51f1bd[_0x19ddba(0x191)])for(const _0x72377c of _0x51f1bd['conditions']){if(_0x72377c[_0x19ddba(0xec)])_0x52d518[_0x19ddba(0x155)](_0x72377c[_0x19ddba(0xec)]);}return _0x52d518;}function parseJumpTargetDisplayName(_0x101a47){const _0x5be158=a135_0x22b5,_0x5643b6=_0x101a47[_0x5be158(0x189)](/^(.+?)\s*\(([^/)]+)/);if(!_0x5643b6)return undefined;const _0x314c6c=_0x5643b6[0x1][_0x5be158(0x165)](),_0x5aa515=_0x5643b6[0x2][_0x5be158(0x165)]();if(!_0x314c6c||!_0x5aa515)return undefined;return{'stageName':_0x314c6c,'journeyName':_0x5aa515};}function orderStepsFromRoot(_0x1747c6,_0x10d9dd){const _0x4feb00=a135_0x22b5,_0x67824c=Object['entries'](_0x1747c6);if(_0x67824c[_0x4feb00(0x14f)]===0x0)return[];const _0x3f8083=new Set(_0x67824c[_0x4feb00(0x159)](([_0xa3cf16])=>_0xa3cf16)),_0x4e0f1c=new Set();for(const [,_0x3eec96]of _0x67824c){for(const _0x37b405 of getStepNextRefs(_0x3eec96)){if(_0x3f8083[_0x4feb00(0x113)](_0x37b405))_0x4e0f1c[_0x4feb00(0xf7)](_0x37b405);}}let _0x3a2e5e=_0x10d9dd&&_0x3f8083[_0x4feb00(0x113)](_0x10d9dd)?_0x10d9dd:undefined;if(!_0x3a2e5e){const _0x1bae28=_0x67824c['filter'](([_0x4aa30f])=>!_0x4e0f1c[_0x4feb00(0x113)](_0x4aa30f));_0x1bae28['length']>0x0?_0x3a2e5e=_0x1bae28[0x0][0x0]:_0x3a2e5e=_0x67824c[0x0][0x0];}const _0x1541e3=[],_0x44838d=new Set(),_0x33784e=[_0x3a2e5e];while(_0x33784e[_0x4feb00(0x14f)]>0x0){const _0x2deaf7=_0x33784e[_0x4feb00(0x10a)]();if(_0x44838d[_0x4feb00(0x113)](_0x2deaf7))continue;_0x44838d[_0x4feb00(0xf7)](_0x2deaf7);const _0x3b6b6e=_0x1747c6[_0x2deaf7];if(!_0x3b6b6e)continue;_0x1541e3[_0x4feb00(0x155)]({'uuid':_0x2deaf7,'step':_0x3b6b6e});for(const _0x3a3764 of getStepNextRefs(_0x3b6b6e)){_0x3f8083['has'](_0x3a3764)&&!_0x44838d[_0x4feb00(0x113)](_0x3a3764)&&_0x33784e['push'](_0x3a3764);}}for(const [_0x48947e,_0x4ac837]of _0x67824c){!_0x44838d['has'](_0x48947e)&&_0x1541e3[_0x4feb00(0x155)]({'uuid':_0x48947e,'step':_0x4ac837});}return _0x1541e3;}function resolveStepReferences(_0x5a17d2,_0x3844cf,_0x4dff30,_0x58133b){const _0x4d5a18=a135_0x22b5;if(_0x5a17d2['type']!=='end'){_0x5a17d2[_0x4d5a18(0xec)]&&_0x58133b[_0x4d5a18(0x113)](_0x5a17d2[_0x4d5a18(0xec)])&&(_0x5a17d2[_0x4d5a18(0xec)]=_0x58133b[_0x4d5a18(0x148)](_0x5a17d2[_0x4d5a18(0xec)]));const _0x35bc0c=_0x3844cf+0x1;if(_0x35bc0c<_0x4dff30[_0x4d5a18(0x14f)]){const _0x484b71=_0x58133b[_0x4d5a18(0x148)](_0x4dff30[_0x35bc0c]['uuid']);_0x5a17d2[_0x4d5a18(0xec)]===_0x484b71&&delete _0x5a17d2[_0x4d5a18(0xec)];}}if(_0x5a17d2[_0x4d5a18(0x117)]===_0x4d5a18(0x13b))for(const _0x58257f of _0x5a17d2['with']['branches']){_0x58257f[_0x4d5a18(0xec)]&&_0x58133b[_0x4d5a18(0x113)](_0x58257f[_0x4d5a18(0xec)])&&(_0x58257f['next']=_0x58133b[_0x4d5a18(0x148)](_0x58257f[_0x4d5a18(0xec)]));}if(_0x5a17d2[_0x4d5a18(0x117)]===_0x4d5a18(0x178))for(const _0x2bbd36 of _0x5a17d2[_0x4d5a18(0x107)][_0x4d5a18(0x162)]){_0x2bbd36[_0x4d5a18(0xec)]&&_0x58133b[_0x4d5a18(0x113)](_0x2bbd36[_0x4d5a18(0xec)])&&(_0x2bbd36['next']=_0x58133b[_0x4d5a18(0x148)](_0x2bbd36[_0x4d5a18(0xec)]));}if(_0x5a17d2['type']===_0x4d5a18(0xe8)&&_0x5a17d2[_0x4d5a18(0x107)][_0x4d5a18(0x14d)]){const _0x415e2a=_0x5a17d2[_0x4d5a18(0x107)][_0x4d5a18(0x14d)];_0x415e2a[_0x4d5a18(0xec)]&&_0x58133b[_0x4d5a18(0x113)](_0x415e2a[_0x4d5a18(0xec)])&&(_0x415e2a['next']=_0x58133b['get'](_0x415e2a[_0x4d5a18(0xec)])),_0x415e2a[_0x4d5a18(0xef)]?.[_0x4d5a18(0xec)]&&_0x58133b[_0x4d5a18(0x113)](_0x415e2a[_0x4d5a18(0xef)][_0x4d5a18(0xec)])&&(_0x415e2a[_0x4d5a18(0xef)]['next']=_0x58133b[_0x4d5a18(0x148)](_0x415e2a[_0x4d5a18(0xef)]['next']));}}function convertApiStageToYaml(_0x4760f0){const _0x483474=a135_0x22b5,_0x2ebf8d={'name':_0x4760f0[_0x483474(0xe6)]};_0x4760f0['id']&&(_0x2ebf8d['id']=_0x4760f0['id']);_0x4760f0[_0x483474(0x136)]&&(_0x2ebf8d['description']=_0x4760f0[_0x483474(0x136)]);_0x4760f0[_0x483474(0x137)]&&(_0x2ebf8d['entry_criteria']=convertApiCriteriaToYaml(_0x4760f0[_0x483474(0x137)]));_0x4760f0[_0x483474(0x12a)]&&_0x4760f0[_0x483474(0x12a)]['length']>0x0&&(_0x2ebf8d['exit_criteria']=_0x4760f0['exitCriterias'][_0x483474(0x159)](convertApiCriteriaToYaml));_0x4760f0[_0x483474(0x17f)]&&(_0x2ebf8d[_0x483474(0x17f)]=convertApiCriteriaToYaml(_0x4760f0[_0x483474(0x17f)]));if(_0x4760f0[_0x483474(0x151)]&&Object[_0x483474(0x183)](_0x4760f0[_0x483474(0x151)])[_0x483474(0x14f)]>0x0){const _0x54c7a9=orderStepsFromRoot(_0x4760f0[_0x483474(0x151)],_0x4760f0[_0x483474(0x167)]),_0x4b2f7a=new Map(),_0x362306=new Set();for(let _0x4badb7=0x0;_0x4badb7<_0x54c7a9[_0x483474(0x14f)];_0x4badb7++){const {uuid:_0x320a2e,step:_0x232837}=_0x54c7a9[_0x4badb7];let _0x452e57=generateReadableStepName(_0x232837,_0x4badb7),_0x3404c0=_0x452e57,_0x17a095=0x2;while(_0x362306[_0x483474(0x113)](_0x3404c0)){_0x3404c0=_0x452e57+'_'+_0x17a095,_0x17a095++;}_0x362306[_0x483474(0xf7)](_0x3404c0),_0x4b2f7a[_0x483474(0x19a)](_0x320a2e,_0x3404c0);}_0x2ebf8d[_0x483474(0x151)]=_0x54c7a9[_0x483474(0x159)](({uuid:_0x53d087,step:_0x3f7651},_0x3ec3a5)=>{const _0x1f1e05=_0x483474,_0x285ced=convertApiStepToYaml(_0x3f7651,_0x4b2f7a[_0x1f1e05(0x148)](_0x53d087));return resolveStepReferences(_0x285ced,_0x3ec3a5,_0x54c7a9,_0x4b2f7a),_0x285ced;});}return _0x2ebf8d;}function convertApiCriteriaToYaml(_0x5edf1a){const _0x3523f9=a135_0x22b5,_0x3a2931={'name':_0x5edf1a['name'],'segment':_0x5edf1a[_0x3523f9(0x131)]};_0x5edf1a[_0x3523f9(0x136)]&&(_0x3a2931[_0x3523f9(0x136)]=_0x5edf1a[_0x3523f9(0x136)]);if(_0x5edf1a[_0x3523f9(0x11b)]){let _0x421bb1=_0x5edf1a[_0x3523f9(0x11b)]['journeyId'],_0x2f6a6d=_0x5edf1a[_0x3523f9(0x11b)][_0x3523f9(0x18e)];if(_0x5edf1a[_0x3523f9(0x11b)]['journeyName']){const _0x392385=parseJumpTargetDisplayName(_0x5edf1a[_0x3523f9(0x11b)][_0x3523f9(0xfa)]);_0x392385&&(_0x2f6a6d=_0x392385[_0x3523f9(0x145)],_0x421bb1=_0x392385[_0x3523f9(0xfa)]);}_0x3a2931[_0x3523f9(0x11b)]={'journey':_0x421bb1,'stage':_0x2f6a6d},_0x5edf1a[_0x3523f9(0x11b)][_0x3523f9(0x141)]&&(_0x3a2931[_0x3523f9(0x11b)][_0x3523f9(0xfb)]=_0x5edf1a[_0x3523f9(0x11b)]['journeyBundleId']);}return _0x3a2931;}function convertApiStepToYaml(_0x1fa265,_0x41f980){const _0x530c66=a135_0x22b5;switch(_0x1fa265[_0x530c66(0x117)]){case _0x530c66(0x110):{const _0x24c0be={};if(_0x1fa265[_0x530c66(0x121)]===_0x530c66(0x154)&&_0x1fa265[_0x530c66(0x13e)]!==undefined)_0x24c0be[_0x530c66(0x104)]=_0x1fa265['waitStep'],_0x24c0be[_0x530c66(0x15a)]=_0x1fa265['waitStepUnit'];else{if(_0x1fa265[_0x530c66(0x121)]===_0x530c66(0x182)&&_0x1fa265[_0x530c66(0x187)])_0x24c0be['wait_until']=_0x1fa265['waitUntilDate'];else{if(_0x1fa265[_0x530c66(0x121)]===_0x530c66(0xee)&&_0x1fa265[_0x530c66(0x118)])_0x24c0be[_0x530c66(0xea)]=_0x1fa265[_0x530c66(0x118)];else{if(_0x1fa265[_0x530c66(0x121)]==='Condition'){if(_0x1fa265[_0x530c66(0x191)]&&_0x1fa265[_0x530c66(0x191)][_0x530c66(0x14f)]>0x0){const _0x265448=_0x1fa265[_0x530c66(0x191)]['find'](_0x12c02e=>!_0x12c02e[_0x530c66(0xe7)]),_0x2e9d36=_0x1fa265['conditions']['find'](_0x28c148=>_0x28c148[_0x530c66(0xe7)]);_0x265448?.[_0x530c66(0x131)]&&(_0x24c0be[_0x530c66(0x14d)]={'segment':_0x265448[_0x530c66(0x131)],..._0x265448[_0x530c66(0xec)]?{'next':_0x265448[_0x530c66(0xec)]}:{}},_0x2e9d36&&_0x2e9d36[_0x530c66(0x102)]!==undefined&&_0x2e9d36['unit']&&(_0x24c0be['condition']['timeout']={'duration':_0x2e9d36[_0x530c66(0x102)],'unit':_0x2e9d36[_0x530c66(0x15a)],..._0x2e9d36[_0x530c66(0xec)]?{'next':_0x2e9d36[_0x530c66(0xec)]}:{}}));}else _0x1fa265[_0x530c66(0x108)]&&(_0x24c0be[_0x530c66(0x14d)]={'segment':_0x1fa265[_0x530c66(0x108)]},_0x1fa265[_0x530c66(0x147)]!==undefined&&_0x1fa265[_0x530c66(0x130)]&&(_0x24c0be[_0x530c66(0x14d)][_0x530c66(0xef)]={'duration':_0x1fa265[_0x530c66(0x147)],'unit':_0x1fa265['conditionTimeoutUnit']}));}}}}const _0x5c1d57={'type':_0x530c66(0xe8),'name':_0x41f980,..._0x1fa265['next']?{'next':_0x1fa265['next']}:{},'with':_0x24c0be};return _0x5c1d57;}case'Activation':{const _0x237b3d={'type':_0x530c66(0x12c),'name':_0x41f980,..._0x1fa265[_0x530c66(0xec)]?{'next':_0x1fa265[_0x530c66(0xec)]}:{},'with':{'activation':_0x1fa265[_0x530c66(0x11f)]||''}};return _0x237b3d;}case'DecisionPoint':{const _0x2f5c1b={'type':_0x530c66(0x13b),'name':_0x41f980,..._0x1fa265[_0x530c66(0xec)]?{'next':_0x1fa265['next']}:{},'with':{'branches':(_0x1fa265[_0x530c66(0xf6)]||[])[_0x530c66(0x159)](_0x378c8f=>({'name':_0x378c8f['name'],'segment':_0x378c8f[_0x530c66(0x131)],'excluded':_0x378c8f['excludedPath'],..._0x378c8f[_0x530c66(0xec)]?{'next':_0x378c8f[_0x530c66(0xec)]}:{}}))}};return _0x2f5c1b;}case _0x530c66(0x176):case _0x530c66(0x196):case _0x530c66(0x116):{const _0x557bc1=_0x1fa265[_0x530c66(0x162)]||(_0x1fa265[_0x530c66(0xf6)]||[])[_0x530c66(0x159)](_0x274919=>({'name':_0x274919[_0x530c66(0xe6)],'percentage':0x0,'next':_0x274919[_0x530c66(0xec)]})),_0x4ae791={'type':_0x530c66(0x178),'name':_0x41f980,..._0x1fa265[_0x530c66(0xec)]?{'next':_0x1fa265[_0x530c66(0xec)]}:{},'with':{'customized_split':_0x1fa265[_0x530c66(0x16b)],'unique_id':_0x1fa265[_0x530c66(0x10b)],'variants':_0x557bc1[_0x530c66(0x159)](_0xc48d09=>({'name':_0xc48d09['name'],'percentage':_0xc48d09[_0x530c66(0xf5)],..._0xc48d09[_0x530c66(0xec)]?{'next':_0xc48d09[_0x530c66(0xec)]}:{}}))}};return _0x4ae791;}case'Merge':{const _0x56fcfe={'type':_0x530c66(0xf1),'name':_0x41f980,..._0x1fa265[_0x530c66(0xec)]?{'next':_0x1fa265[_0x530c66(0xec)]}:{}};return _0x56fcfe;}case'Jump':{let _0x4e472e='',_0x1baf37='',_0x4f2400;if(_0x1fa265['target']){_0x4e472e=_0x1fa265['target']['journeyId'],_0x1baf37=_0x1fa265[_0x530c66(0x11b)][_0x530c66(0x18e)],_0x4f2400=_0x1fa265[_0x530c66(0x11b)][_0x530c66(0x141)];if(_0x1fa265[_0x530c66(0x11b)][_0x530c66(0xfa)]){const _0x3c402c=parseJumpTargetDisplayName(_0x1fa265[_0x530c66(0x11b)][_0x530c66(0xfa)]);_0x3c402c&&(_0x1baf37=_0x3c402c[_0x530c66(0x145)],_0x4e472e=_0x3c402c[_0x530c66(0xfa)]);}}const _0x175acc={'type':_0x530c66(0x173),'name':_0x41f980,..._0x1fa265[_0x530c66(0xec)]?{'next':_0x1fa265[_0x530c66(0xec)]}:{},'with':{'target':{'journey':_0x4e472e,'stage':_0x1baf37,..._0x4f2400?{'bundle_id':_0x4f2400}:{}}}};return _0x175acc;}case'End':{const _0x540cd6={'type':_0x530c66(0x14c),'name':_0x41f980};return _0x540cd6;}default:{const _0x4fde89={'type':'end','name':_0x41f980};return _0x4fde89;}}}export async function journeyDefToRequest(_0x52bd92,_0x19260b,_0x55d4d0){const _0xb0b927=a135_0x22b5,_0x619489=_0x52bd92[_0xb0b927(0x13a)]||getActiveStages(_0x52bd92),_0x5553fc=isJourneysArrayMode(_0x52bd92)||isMultiVersionMode(_0x52bd92)?getLatestJourneyEntry(_0x52bd92):undefined,_0x23b34e=_0x5553fc?.[_0xb0b927(0x13c)]??_0x52bd92['name'],_0x5e681c=_0x52bd92[_0xb0b927(0x156)]||{},_0x28ae0c=_0x52bd92[_0xb0b927(0x10d)]||{},_0x4ce8f2={'type':_0xb0b927(0x14b),'attributes':{'name':_0x23b34e,'audienceId':_0x19260b,'journeyStages':await Promise[_0xb0b927(0x161)](_0x619489[_0xb0b927(0x159)](_0x26e4b6=>convertYamlStageToApi(_0x26e4b6,_0x55d4d0,_0x5e681c,_0x28ae0c)))}},_0x20faec=_0x5553fc?.['id']??_0x52bd92['id'];_0x20faec&&(_0x4ce8f2['id']=_0x20faec);_0x52bd92[_0xb0b927(0x136)]&&(_0x4ce8f2[_0xb0b927(0x157)][_0xb0b927(0x136)]=_0x52bd92[_0xb0b927(0x136)]);const _0x2e3a4d=getEffectiveGoal(_0x52bd92);_0x2e3a4d&&(_0x4ce8f2['attributes'][_0xb0b927(0x179)]=await convertYamlCriteriaToApi(_0x2e3a4d,_0x55d4d0,_0x5e681c));const _0x535c7d=getEffectiveReentry(_0x52bd92);return _0x535c7d&&(_0x4ce8f2[_0xb0b927(0x157)][_0xb0b927(0x17a)]=_0x535c7d,_0x4ce8f2[_0xb0b927(0x157)][_0xb0b927(0x14e)]=_0x535c7d!==_0xb0b927(0x188)),_0x52bd92[_0xb0b927(0x105)]&&(_0x4ce8f2[_0xb0b927(0x177)]={'parentFolder':{'data':{'id':_0x52bd92[_0xb0b927(0x105)],'type':_0xb0b927(0x139)}}}),_0x4ce8f2;}async function convertYamlStageToApi(_0x2f1f91,_0x3e8f6c,_0x3939f1={},_0x169098={}){const _0xf470d0=a135_0x22b5,_0x364573={'name':_0x2f1f91[_0xf470d0(0xe6)]};_0x2f1f91['id']&&(_0x364573['id']=_0x2f1f91['id']);_0x2f1f91[_0xf470d0(0x136)]&&(_0x364573[_0xf470d0(0x136)]=_0x2f1f91[_0xf470d0(0x136)]);_0x2f1f91['entry_criteria']&&(_0x364573[_0xf470d0(0x137)]=await convertYamlCriteriaToApi(_0x2f1f91[_0xf470d0(0x126)],_0x3e8f6c,_0x3939f1));_0x2f1f91[_0xf470d0(0x160)]&&_0x2f1f91['exit_criteria'][_0xf470d0(0x14f)]>0x0&&(_0x364573[_0xf470d0(0x12a)]=await Promise[_0xf470d0(0x161)](_0x2f1f91[_0xf470d0(0x160)][_0xf470d0(0x159)](_0x39b805=>convertYamlCriteriaToApi(_0x39b805,_0x3e8f6c,_0x3939f1))));_0x2f1f91[_0xf470d0(0x17f)]&&(_0x364573['milestone']=await convertYamlCriteriaToApi(_0x2f1f91[_0xf470d0(0x17f)],_0x3e8f6c,_0x3939f1));if(_0x2f1f91[_0xf470d0(0x151)]&&_0x2f1f91['steps']['length']>0x0){const _0x37b61f={},_0x1a38bc=_0x2f1f91['steps'][_0xf470d0(0x159)]((_0x4f040d,_0x261e34)=>{const _0x120627=_0xf470d0,_0x4c18cf=_0x4f040d['uuid']||generateUUID(),_0x2c373a=_0x4f040d[_0x120627(0xe6)]||_0x4f040d[_0x120627(0x117)]+'_'+_0x261e34;return _0x37b61f[_0x2c373a]=_0x4c18cf,{..._0x4f040d,'name':_0x2c373a};});_0x364573['rootStep']=_0x37b61f[_0x1a38bc[0x0][_0xf470d0(0xe6)]],_0x364573[_0xf470d0(0x151)]={};for(let _0x48821e=0x0;_0x48821e<_0x1a38bc['length'];_0x48821e++){const _0x32065e=_0x1a38bc[_0x48821e],_0x2d85ff=_0x37b61f[_0x32065e[_0xf470d0(0xe6)]],_0x1ffeea=!_0x32065e[_0xf470d0(0xec)]&&_0x48821e<_0x1a38bc[_0xf470d0(0x14f)]-0x1&&_0x32065e['type']!=='end'?_0x1a38bc[_0x48821e+0x1][_0xf470d0(0xe6)]:_0x32065e[_0xf470d0(0xec)],_0x165bf1=_0x1ffeea!==_0x32065e[_0xf470d0(0xec)]?{..._0x32065e,'next':_0x1ffeea}:_0x32065e;_0x364573[_0xf470d0(0x151)][_0x2d85ff]=await convertYamlStepToApi(_0x165bf1,_0x3e8f6c,_0x3939f1,_0x37b61f,_0x169098);}}else _0x2f1f91[_0xf470d0(0xe9)]&&(_0x364573['rootStep']=_0x2f1f91['root_step']);return _0x364573;}async function convertYamlCriteriaToApi(_0x1b2dfe,_0x22a96a,_0xf17d0={}){const _0x3c47b1=a135_0x22b5;let _0x1522c7=_0x1b2dfe[_0x3c47b1(0x11a)];if(_0x1522c7&&!/^\d+$/[_0x3c47b1(0x134)](_0x1522c7)){const _0x5f3d62=parseSegmentRef(_0x1522c7);if(_0x5f3d62[_0x3c47b1(0x117)]===_0x3c47b1(0x114))_0x22a96a?.['resolveSegmentId']&&(_0x1522c7=await _0x22a96a[_0x3c47b1(0x128)](_0x5f3d62[_0x3c47b1(0xe6)]));else{if(_0x5f3d62[_0x3c47b1(0x117)]===_0x3c47b1(0x152)&&_0xf17d0[_0x5f3d62['name']])_0x22a96a?.[_0x3c47b1(0x143)]&&(_0x1522c7=await _0x22a96a[_0x3c47b1(0x143)](_0x5f3d62[_0x3c47b1(0xe6)],_0xf17d0[_0x5f3d62['name']]));else _0x22a96a?.[_0x3c47b1(0x128)]&&(_0x1522c7=await _0x22a96a[_0x3c47b1(0x128)](_0x5f3d62[_0x3c47b1(0xe6)]));}}const _0x3720ed={'name':_0x1b2dfe[_0x3c47b1(0xe6)],'segmentId':_0x1522c7};_0x1b2dfe[_0x3c47b1(0x136)]&&(_0x3720ed[_0x3c47b1(0x136)]=_0x1b2dfe[_0x3c47b1(0x136)]);if(_0x1b2dfe[_0x3c47b1(0x11b)]){const _0x259f4f=_0x1b2dfe[_0x3c47b1(0x11b)][_0x3c47b1(0x14b)],_0x3bda86=_0x1b2dfe[_0x3c47b1(0x11b)]['stage'];let _0x4881d3=_0x1b2dfe[_0x3c47b1(0x11b)][_0x3c47b1(0x14b)];_0x22a96a?.[_0x3c47b1(0x111)]&&!/^\d+$/[_0x3c47b1(0x134)](_0x4881d3)&&(_0x4881d3=await _0x22a96a['resolveJourneyId'](_0x4881d3));let _0x219a0a=_0x1b2dfe[_0x3c47b1(0x11b)]['stage'];_0x22a96a?.[_0x3c47b1(0x150)]&&!/^\d+$/[_0x3c47b1(0x134)](_0x219a0a)&&(_0x219a0a=await _0x22a96a['resolveStageId'](_0x4881d3,_0x219a0a));const _0x5ee7e8=!/^\d+$/[_0x3c47b1(0x134)](_0x259f4f)&&!isLocalJourneyRef(_0x259f4f)?formatApiJourneyName(_0x259f4f,_0x3bda86):undefined;_0x3720ed['target']={'journeyId':_0x4881d3,'journeyStageId':_0x219a0a,'journeyName':_0x5ee7e8,'confirmed':!![]},_0x1b2dfe[_0x3c47b1(0x11b)][_0x3c47b1(0xfb)]&&(_0x3720ed[_0x3c47b1(0x11b)][_0x3c47b1(0x141)]=_0x1b2dfe[_0x3c47b1(0x11b)]['bundle_id']);}return _0x3720ed;}async function convertYamlStepToApi(_0x18a66c,_0x1c8d33,_0x49cd09={},_0x238be6={},_0x3add36={}){const _0x158107=a135_0x22b5,_0x287bc4=async _0x47e23c=>{const _0x247b4d=a135_0x22b5;if(/^\d+$/['test'](_0x47e23c))return _0x47e23c;const _0x29aa77=parseSegmentRef(_0x47e23c);if(_0x29aa77[_0x247b4d(0x117)]==='ref'){if(_0x1c8d33?.[_0x247b4d(0x128)])return await _0x1c8d33[_0x247b4d(0x128)](_0x29aa77['name']);}else{if(_0x29aa77[_0x247b4d(0x117)]===_0x247b4d(0x152)&&_0x49cd09[_0x29aa77['name']]){if(_0x1c8d33?.[_0x247b4d(0x143)])return await _0x1c8d33[_0x247b4d(0x143)](_0x29aa77[_0x247b4d(0xe6)],_0x49cd09[_0x29aa77[_0x247b4d(0xe6)]]);}else{if(_0x1c8d33?.[_0x247b4d(0x128)])return await _0x1c8d33[_0x247b4d(0x128)](_0x29aa77['name']);}}return _0x47e23c;},_0x1f348f=async _0x5ee3bc=>{const _0x291dec=a135_0x22b5;if(/^\d+$/[_0x291dec(0x134)](_0x5ee3bc))return _0x5ee3bc;const _0x3bb8ab=parseSegmentRef(_0x5ee3bc);if(_0x3bb8ab['type']===_0x291dec(0x114)){if(_0x1c8d33?.[_0x291dec(0x17e)])return await _0x1c8d33[_0x291dec(0x17e)](_0x3bb8ab['name']);return _0x3bb8ab['name'];}else{if(_0x3bb8ab[_0x291dec(0x117)]==='embedded'&&_0x3add36[_0x3bb8ab['name']]){if(_0x1c8d33?.['resolveEmbeddedActivationId'])return await _0x1c8d33['resolveEmbeddedActivationId'](_0x3bb8ab[_0x291dec(0xe6)],_0x3add36[_0x3bb8ab[_0x291dec(0xe6)]]);if(_0x1c8d33?.[_0x291dec(0x17e)])return await _0x1c8d33[_0x291dec(0x17e)](_0x3bb8ab[_0x291dec(0xe6)]);}else{if(_0x1c8d33?.[_0x291dec(0x17e)])return await _0x1c8d33['resolveActivationId'](_0x3bb8ab['name']);}}return _0x5ee3bc;},_0x4585b4=_0x448409=>{if(!_0x448409)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x448409))return _0x448409;return _0x238be6[_0x448409]||_0x448409;};switch(_0x18a66c[_0x158107(0x117)]){case _0x158107(0xe8):{const _0x584310=_0x18a66c,_0x49b3b8=_0x584310[_0x158107(0x107)],_0x5e1053={'type':_0x158107(0x110),'name':_0x584310['name'],'next':_0x4585b4(_0x584310[_0x158107(0xec)])};if(_0x49b3b8[_0x158107(0x104)]!==undefined&&_0x49b3b8[_0x158107(0x15a)])_0x5e1053['waitStepType']=_0x158107(0x154),_0x5e1053[_0x158107(0x13e)]=_0x49b3b8[_0x158107(0x104)],_0x5e1053['waitStepUnit']=normalizeWaitUnit(_0x49b3b8['unit']);else{if(_0x49b3b8[_0x158107(0x127)])_0x5e1053['waitStepType']='Date',_0x5e1053[_0x158107(0x187)]=_0x49b3b8['wait_until'];else{if(_0x49b3b8[_0x158107(0xea)])_0x5e1053[_0x158107(0x121)]='DaysOfTheWeek',_0x5e1053[_0x158107(0x118)]=_0x49b3b8[_0x158107(0xea)];else{if(_0x49b3b8[_0x158107(0x14d)]){_0x5e1053[_0x158107(0x121)]=_0x158107(0x15e);const _0x7bff22=await _0x287bc4(_0x49b3b8[_0x158107(0x14d)][_0x158107(0x11a)]),_0x4b3267=_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)]?.[_0x158107(0xec)]!==undefined;if(_0x4b3267){const _0x282010=[];_0x282010['push']({'id':generateUUID(),'segmentId':_0x7bff22,'timedOutPath':![],'name':_0x158107(0x138),'next':_0x4585b4(_0x49b3b8[_0x158107(0x14d)]['next']??_0x584310['next'])});if(_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)]){const _0x59ed15=_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)][_0x158107(0x104)],_0x2a237c=normalizeWaitUnit(_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)]['unit']);_0x282010[_0x158107(0x155)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x158107(0x192)+_0x59ed15+'\x20'+_0x2a237c,'moveAfter':_0x59ed15,'unit':_0x2a237c,'next':_0x4585b4(_0x49b3b8['condition'][_0x158107(0xef)][_0x158107(0xec)])});}_0x5e1053[_0x158107(0x191)]=_0x282010,delete _0x5e1053[_0x158107(0xec)];}else _0x5e1053[_0x158107(0x108)]=_0x7bff22,_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)]&&(_0x5e1053[_0x158107(0x147)]=_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)][_0x158107(0x104)],_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)][_0x158107(0x15a)]&&(_0x5e1053[_0x158107(0x130)]=normalizeWaitUnit(_0x49b3b8[_0x158107(0x14d)][_0x158107(0xef)][_0x158107(0x15a)])));}}}}return _0x5e1053;}case'activation':{const _0x427d2d=_0x18a66c,_0x2de30d=_0x427d2d[_0x158107(0x107)]['activation'],_0xfca6b=await _0x1f348f(_0x2de30d);return{'type':_0x158107(0x15b),'name':_0x427d2d['name'],'journeyActivationStepId':_0xfca6b,'next':_0x4585b4(_0x427d2d[_0x158107(0xec)])};}case'decision_point':{const _0x54ed6b=_0x18a66c,_0x1cc922=_0x54ed6b[_0x158107(0x107)]['branches'];return{'type':_0x158107(0x199),'name':_0x54ed6b[_0x158107(0xe6)],'branches':await Promise['all'](_0x1cc922[_0x158107(0x159)](async _0x351ae0=>{const _0x5dbe99=_0x158107;let _0xded824='';if(!_0x351ae0[_0x5dbe99(0x1a0)]){const _0x2962c6=_0x351ae0[_0x5dbe99(0x11a)]||_0x351ae0[_0x5dbe99(0x169)]||'';_0xded824=_0x2962c6?await _0x287bc4(_0x2962c6):'';}return{'id':crypto[_0x5dbe99(0x19c)](),'name':_0x351ae0[_0x5dbe99(0xe6)],'description':null,'segmentId':_0xded824,'excludedPath':_0x351ae0['excluded']??![],'next':_0x4585b4(_0x351ae0[_0x5dbe99(0xec)])};})),'next':_0x4585b4(_0x54ed6b[_0x158107(0xec)])};}case _0x158107(0x178):{const _0x53f0a2=_0x18a66c,_0x40c21d=_0x53f0a2['with'];return{'type':_0x158107(0x176),'name':_0x53f0a2[_0x158107(0xe6)],'customizedSplit':_0x40c21d[_0x158107(0xf4)],'uniqueId':_0x40c21d[_0x158107(0xfc)],'variants':_0x40c21d['variants'][_0x158107(0x159)](_0x131502=>({'id':_0x131502['id']||generateUUID(),'name':_0x131502[_0x158107(0xe6)],'percentage':_0x131502['percentage'],'next':_0x4585b4(_0x131502['next'])})),'next':_0x4585b4(_0x53f0a2['next'])};}case _0x158107(0xf1):return{'type':_0x158107(0x18f),'name':_0x18a66c[_0x158107(0xe6)],'next':_0x4585b4(_0x18a66c[_0x158107(0xec)])};case _0x158107(0x173):{const _0x4c000d=_0x18a66c,_0x34c5d0=_0x4c000d['with']['target'],_0x357bc4=_0x34c5d0[_0x158107(0x14b)],_0x21b166=_0x34c5d0['stage'];let _0x48b78b=_0x34c5d0[_0x158107(0x14b)];_0x1c8d33?.[_0x158107(0x111)]&&!/^\d+$/[_0x158107(0x134)](_0x48b78b)&&(_0x48b78b=await _0x1c8d33[_0x158107(0x111)](_0x48b78b));let _0x5a0dd5=_0x34c5d0['stage'];_0x1c8d33?.[_0x158107(0x150)]&&!/^\d+$/[_0x158107(0x134)](_0x5a0dd5)&&(_0x5a0dd5=await _0x1c8d33['resolveStageId'](_0x48b78b,_0x5a0dd5));const _0x342075=!/^\d+$/[_0x158107(0x134)](_0x357bc4)&&!isLocalJourneyRef(_0x357bc4)?formatApiJourneyName(_0x357bc4,_0x21b166):undefined;return{'type':_0x158107(0x115),'name':_0x4c000d[_0x158107(0xe6)],'target':{'journeyId':_0x48b78b,'journeyStageId':_0x5a0dd5,'journeyBundleId':_0x34c5d0[_0x158107(0xfb)],'journeyName':_0x342075,'confirmed':!![]},'next':_0x4585b4(_0x4c000d[_0x158107(0xec)])};}case _0x158107(0x14c):return{'type':_0x158107(0x158),'name':_0x18a66c[_0x158107(0xe6)]};default:{const _0xbfcfd6=_0x18a66c;return{'type':'End','name':_0xbfcfd6[_0x158107(0xe6)]};}}}export function toYamlString(_0x239395){const _0xcf0b6e=a135_0x22b5,_0x3c36fb=stripInternalFields(_0x239395),_0x3551fc=a135_0x17b69b[_0xcf0b6e(0x129)](_0x3c36fb,{'indent':0x2,'lineWidth':0x0,'nullStr':_0xcf0b6e(0x122)}),_0xc957f0=[_0xcf0b6e(0x142),_0xcf0b6e(0x186),_0xcf0b6e(0xeb),_0xcf0b6e(0x132),'journeys:',_0xcf0b6e(0x12f),_0xcf0b6e(0x18b)];let _0xf3798f=_0x3551fc;for(const _0x5744a5 of _0xc957f0){_0xf3798f=_0xf3798f['replace'](new RegExp('^('+_0x5744a5+')','m'),(_0x113d6d,_0x58a851,_0x481400)=>{if(_0x481400===0x0||_0xf3798f[_0x481400-0x1]==='\x0a'&&_0xf3798f[_0x481400-0x2]==='\x0a')return _0x58a851;return'\x0a'+_0x58a851;});}return _0xf3798f;}function stripInternalFields(_0x2a4e8c){const _0x2bf1f1=a135_0x22b5,{id:_0xda323b,folder_id:_0x5c78e9,bundle_id:_0x15ae78,bundle_name:_0x5a033b,version:_0x4b759e,allow_reentry:_0x5d1d8c,..._0x1e8ce5}=_0x2a4e8c;return _0x1e8ce5[_0x2bf1f1(0x168)]&&(_0x1e8ce5[_0x2bf1f1(0x168)]=_0x1e8ce5[_0x2bf1f1(0x168)][_0x2bf1f1(0x159)](_0xd31792=>{const _0x2ea4ce=_0x2bf1f1,{id:_0x18b395,..._0xcb509f}=_0xd31792;return{..._0xcb509f,'stages':_0xcb509f[_0x2ea4ce(0x13a)][_0x2ea4ce(0x159)](stripStageInternalFields),..._0xd31792[_0x2ea4ce(0x15f)]===!![]?{'latest':!![]}:{},..._0x1e8ce5['journeys'][_0x2ea4ce(0x14f)]===0x1&&_0xcb509f[_0x2ea4ce(0x13c)]==='v1'?{'version':undefined}:{}};})),_0x1e8ce5[_0x2bf1f1(0x13a)]&&(_0x1e8ce5[_0x2bf1f1(0x13a)]=_0x1e8ce5[_0x2bf1f1(0x13a)][_0x2bf1f1(0x159)](stripStageInternalFields)),_0x1e8ce5[_0x2bf1f1(0x16a)]&&(_0x1e8ce5[_0x2bf1f1(0x16a)]=_0x1e8ce5['versions']['map'](_0x13889c=>{const _0x4f6c9a=_0x2bf1f1,{id:_0x12b011,..._0x50cf94}=_0x13889c;return{..._0x50cf94,'stages':_0x50cf94[_0x4f6c9a(0x13a)]['map'](stripStageInternalFields),..._0x13889c[_0x4f6c9a(0x15f)]===!![]?{'latest':!![]}:{}};})),_0x1e8ce5;}function stripStageInternalFields(_0x2570b0){const {id:_0x575624,..._0x58a318}=_0x2570b0;return _0x58a318;}export function parseYamlString(_0x1c1939){return safeParseYaml(_0x1c1939,JourneyDefSchema);}function a135_0x22b5(_0x7f0933,_0x2852a4){_0x7f0933=_0x7f0933-0xe0;const _0x17c93f=a135_0x17c9();let _0x22b5dc=_0x17c93f[_0x7f0933];return _0x22b5dc;}export function isJourneyDef(_0x4d2e96){const _0x372b1f=a135_0x22b5;return typeof _0x4d2e96===_0x372b1f(0x100)&&_0x4d2e96!==null&&'type'in _0x4d2e96&&_0x4d2e96[_0x372b1f(0x117)]==='journey';}export function generateTemplate(_0x3f3a19,_0xb396ea){const _0x187490=a135_0x22b5,_0x5ef532={'type':_0x187490(0x14b),'name':_0x3f3a19,'description':_0x187490(0x185),'reentry':_0x187490(0x188),'goal':{'name':_0x187490(0x112),'segment':'goal-segment'},'stages':[{'name':_0x187490(0x164),'description':_0x187490(0x119),'entry_criteria':{'name':'Entry\x20Criteria','segment':_0xb396ea},'steps':[{'type':_0x187490(0xe8),'name':_0x187490(0x180),'with':{'duration':0x1,'unit':_0x187490(0x144)}},{'type':_0x187490(0x12c),'name':_0x187490(0x149),'with':{'activation':_0x187490(0x197)}},{'type':_0x187490(0x14c),'name':'Stage\x20Complete'}]}]};return toYamlString(_0x5ef532);}function a135_0x17c9(){const _0x52aca7=['resolveActivationId','milestone','Wait\x201\x20Day','resolveActivation','Date','keys','connection','Journey\x20description','activations:','waitUntilDate','no_reentry','match','replace','versions:','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','launched','journeyStageId','Merge','And','conditions','*Max\x20wait\x20','38336HItQDl','reentry','reentry_always','AbTest','your-activation-name','99KsgOSM','DecisionPoint','set','from','randomUUID','\x20\x20\x20\x20type:\x20And\x0a','activation_template_id','connector_config','excluded','weeks','520240TNyUhr','draft','rule','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','includes','name','timedOutPath','wait','root_step','days_of_week','goal:','next','notification','DaysOfTheWeek','timeout','version_number','merge','schedule','Expected\x20format:\x0a','customized_split','percentage','branches','add','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','journeyStages','journeyName','bundle_id','unique_id','size','days','stage','object','resolveActivationName','moveAfter','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','duration','folder_id','78oCUxVd','with','conditionSegmentId','397314jBwzLV','shift','uniqueId','data','activations','174722uEACSQ','resolveSegment','WaitStep','resolveJourneyId','Goal\x20Achieved','has','ref','Jump','Variant','type','daysOfWeek','First\x20stage\x20of\x20the\x20journey','segment','target','week','definition','\x27:\x20','journeyActivationStepId','\x20\x20rule:\x0a','waitStepType','null','all_columns','JOURNEY_SYNTAX_ERROR','Unknown\x20segment\x20\x22','entry_criteria','wait_until','resolveSegmentId','stringify','exitCriterias','sort','activation','\x20\x20\x20\x20type:\x20','startsWith','stages:','conditionTimeoutUnit','segmentId','reentry:','toLowerCase','test','bundle_name','description','entryCriteria','Met\x20condition(s)','folder','stages','decision_point','version','112623moRPcX','waitStep','26764eLwsBh','state','journeyBundleId','segments:','resolveEmbeddedSegmentId','day','stageName','1082870tGzuEg','conditionTimeoutDuration','get','Send\x20Notification','columns','journey','end','condition','allowReentry','length','resolveStageId','steps','embedded','journeyBundleName','Duration','push','segments','attributes','End','map','unit','Activation','(missing)','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','Condition','latest','exit_criteria','all','variants','ref:','Stage\x201','trim','resolveJumpTarget','rootStep','journeys','segment_id','versions','customizedSplit','waitCondition','find','journeyId','isArray','145lDicrb','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','stageId','jump','slice','filter','ABTest','relationships','ab_test','goal','reentryMode','behavior','isJourneyLocal','\x20\x20\x20\x20conditions:\x0a'];a135_0x17c9=function(){return _0x52aca7;};return a135_0x17c9();}function generateUUID(){const _0x47e90f=a135_0x22b5;return crypto[_0x47e90f(0x19c)]();}export const SEGMENT_REF_PREFIX=a135_0x4c4cba(0x163);export function parseSegmentRef(_0x452af4){const _0x3b65e8=a135_0x4c4cba;if(_0x452af4[_0x3b65e8(0x12e)](SEGMENT_REF_PREFIX))return{'type':_0x3b65e8(0x114),'name':_0x452af4[_0x3b65e8(0x174)](SEGMENT_REF_PREFIX[_0x3b65e8(0x14f)])};if(/^\d+$/[_0x3b65e8(0x134)](_0x452af4))return{'type':'id','name':_0x452af4};return{'type':_0x3b65e8(0x152),'name':_0x452af4};}export function makeSegmentRef(_0x4f5e4e){return''+SEGMENT_REF_PREFIX+_0x4f5e4e;}export function isExternalSegmentRef(_0x74e95d){const _0x4614aa=a135_0x4c4cba;return _0x74e95d[_0x4614aa(0x12e)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x3128a9){const _0x103de9=a135_0x4c4cba;return!!(_0x3128a9[_0x103de9(0x168)]&&_0x3128a9[_0x103de9(0x168)][_0x103de9(0x14f)]>0x0);}export function isMultiVersionMode(_0x22f4ef){const _0xb74780=a135_0x4c4cba;return!!(_0x22f4ef[_0xb74780(0x16a)]&&_0x22f4ef['versions']['length']>0x0);}export function isSingleVersionMode(_0x4cd1dc){const _0xf812cd=a135_0x4c4cba;return!!(_0x4cd1dc[_0xf812cd(0x13a)]&&_0x4cd1dc[_0xf812cd(0x13a)][_0xf812cd(0x14f)]>0x0);}export function hasMultipleVersions(_0x10fae0){const _0x15fec1=a135_0x4c4cba;if(isJourneysArrayMode(_0x10fae0))return(_0x10fae0[_0x15fec1(0x168)]?.[_0x15fec1(0x14f)]||0x0)>0x1;if(isMultiVersionMode(_0x10fae0))return(_0x10fae0[_0x15fec1(0x16a)]?.['length']||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x4d987b){const _0x2af83e=a135_0x4c4cba;if(isJourneysArrayMode(_0x4d987b))return _0x4d987b;if(isSingleVersionMode(_0x4d987b)){const {stages:_0x505510,id:_0x4c7f90,version:_0x1d375e,version_number:_0x3869ac,..._0x4c1473}=_0x4d987b;return{..._0x4c1473,'journeys':[{'version':_0x1d375e||'v1','stages':_0x505510||[],'id':_0x4c7f90,'version_number':_0x3869ac}]};}if(isMultiVersionMode(_0x4d987b)){const {versions:_0x5169bc,..._0x2548ef}=_0x4d987b;return{..._0x2548ef,'journeys':(_0x5169bc||[])['map'](_0x28f638=>({'version':_0x28f638[_0x2af83e(0xe6)],'state':_0x28f638[_0x2af83e(0x140)],'latest':_0x28f638[_0x2af83e(0x15f)],'stages':_0x28f638['stages'],'id':_0x28f638['id'],'version_number':_0x28f638[_0x2af83e(0xf0)]}))};}return _0x4d987b;}export function normalizeJourneyDef(_0x3aa4c1,_0x15c2b0){const _0xfdd8ce=a135_0x4c4cba,_0x245c8d=normalizeToJourneysFormat(_0x3aa4c1),_0x49de11=_0x15c2b0?.[_0xfdd8ce(0x156)]?Object[_0xfdd8ce(0x183)](_0x15c2b0['segments']):undefined,_0x18ae9a=_0x15c2b0?.[_0xfdd8ce(0x10d)]?Object['keys'](_0x15c2b0['activations']):undefined;return{'type':_0xfdd8ce(0x14b),'name':_0x245c8d[_0xfdd8ce(0xe6)],..._0x245c8d[_0xfdd8ce(0x136)]!==undefined&&{'description':_0x245c8d[_0xfdd8ce(0x136)]},..._0x245c8d[_0xfdd8ce(0x179)]&&{'goal':normalizeJourneyCriteria(_0x245c8d[_0xfdd8ce(0x179)])},..._0x245c8d[_0xfdd8ce(0x194)]!==undefined&&{'reentry':_0x245c8d[_0xfdd8ce(0x194)]},..._0x245c8d['segments']&&{'segments':normalizeEmbeddedSegments(_0x245c8d[_0xfdd8ce(0x156)],_0x49de11)},..._0x245c8d[_0xfdd8ce(0x10d)]&&{'activations':normalizeEmbeddedActivations(_0x245c8d['activations'],_0x18ae9a)},..._0x245c8d[_0xfdd8ce(0x168)]&&{'journeys':_0x245c8d[_0xfdd8ce(0x168)][_0xfdd8ce(0x159)](_0x43da5d=>normalizeJourneyEntry(_0x43da5d,_0x245c8d[_0xfdd8ce(0x168)]['length']===0x1))}};}function normalizeJourneyEntry(_0x45f788,_0x3dfe81){const _0x33850d=a135_0x4c4cba;return{...!_0x3dfe81&&_0x45f788['version']!==undefined&&{'version':_0x45f788[_0x33850d(0x13c)]},..._0x45f788[_0x33850d(0x140)]!==undefined&&{'state':_0x45f788['state']},...!_0x3dfe81&&_0x45f788['latest']!==undefined&&{'latest':_0x45f788[_0x33850d(0x15f)]},..._0x45f788[_0x33850d(0xf0)]!==undefined&&{'version_number':_0x45f788[_0x33850d(0xf0)]},..._0x45f788[_0x33850d(0x179)]&&{'goal':normalizeJourneyCriteria(_0x45f788[_0x33850d(0x179)])},..._0x45f788['reentry']!==undefined&&{'reentry':_0x45f788[_0x33850d(0x194)]},'stages':_0x45f788[_0x33850d(0x13a)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x1d1a6c){const _0x171378=a135_0x4c4cba;return{'name':_0x1d1a6c['name'],..._0x1d1a6c[_0x171378(0x136)]!==undefined&&{'description':_0x1d1a6c[_0x171378(0x136)]},..._0x1d1a6c[_0x171378(0x126)]&&{'entry_criteria':normalizeJourneyCriteria(_0x1d1a6c[_0x171378(0x126)])},..._0x1d1a6c['exit_criteria']&&{'exit_criteria':_0x1d1a6c[_0x171378(0x160)][_0x171378(0x159)](normalizeJourneyCriteria)},..._0x1d1a6c[_0x171378(0x17f)]&&{'milestone':normalizeJourneyCriteria(_0x1d1a6c[_0x171378(0x17f)])},..._0x1d1a6c[_0x171378(0x151)]&&{'steps':normalizeStepsWithImplicitNext(_0x1d1a6c[_0x171378(0x151)])}};}function normalizeStepsWithImplicitNext(_0x4a9aea){const _0x47f6f1=a135_0x4c4cba;return _0x4a9aea[_0x47f6f1(0x159)]((_0x36e897,_0x137d07)=>{const _0x5c45a8=_0x137d07<_0x4a9aea['length']-0x1?_0x4a9aea[_0x137d07+0x1]['name']:undefined;return normalizeJourneyStep(_0x36e897,_0x5c45a8);});}function normalizeJourneyCriteria(_0x4c1483){const _0xe0b604=a135_0x4c4cba;return{'name':_0x4c1483[_0xe0b604(0xe6)],..._0x4c1483[_0xe0b604(0x136)]!==undefined&&{'description':_0x4c1483[_0xe0b604(0x136)]},'segment':_0x4c1483[_0xe0b604(0x11a)],..._0x4c1483[_0xe0b604(0x11b)]&&{'target':normalizeJumpTarget(_0x4c1483[_0xe0b604(0x11b)])}};}function normalizeJourneyStep(_0x5179fe,_0x4bd6a9){const _0x593b9d=a135_0x4c4cba,_0x4d9f55=_0x5179fe[_0x593b9d(0xec)]!==undefined&&_0x5179fe['next']!==_0x4bd6a9,_0x5c1bec={'type':_0x5179fe[_0x593b9d(0x117)],'name':_0x5179fe['name'],..._0x4d9f55&&{'next':_0x5179fe['next']}};if(_0x593b9d(0x107)in _0x5179fe&&_0x5179fe['with'])return{..._0x5c1bec,'with':normalizeStepParams(_0x5179fe[_0x593b9d(0x117)],_0x5179fe[_0x593b9d(0x107)])};return _0x5c1bec;}function normalizeStepParams(_0xd4bc89,_0x12a513){const _0x3d2e93=a135_0x4c4cba;switch(_0xd4bc89){case'wait':{const _0x73ce0=_0x12a513;let _0x2acfa5;return _0x73ce0['condition']&&(_0x2acfa5={'segment':_0x73ce0[_0x3d2e93(0x14d)]['segment'],..._0x73ce0[_0x3d2e93(0x14d)]['next']!==undefined&&{'next':_0x73ce0['condition']['next']},..._0x73ce0[_0x3d2e93(0x14d)][_0x3d2e93(0xef)]&&{'timeout':{'duration':_0x73ce0[_0x3d2e93(0x14d)][_0x3d2e93(0xef)][_0x3d2e93(0x104)],'unit':_0x73ce0[_0x3d2e93(0x14d)][_0x3d2e93(0xef)][_0x3d2e93(0x15a)],..._0x73ce0['condition'][_0x3d2e93(0xef)][_0x3d2e93(0xec)]!==undefined&&{'next':_0x73ce0['condition'][_0x3d2e93(0xef)][_0x3d2e93(0xec)]}}}}),{..._0x73ce0[_0x3d2e93(0x104)]!==undefined&&{'duration':_0x73ce0[_0x3d2e93(0x104)]},..._0x73ce0[_0x3d2e93(0x15a)]!==undefined&&{'unit':_0x73ce0[_0x3d2e93(0x15a)]},..._0x73ce0['wait_until']!==undefined&&{'wait_until':_0x73ce0[_0x3d2e93(0x127)]},..._0x73ce0[_0x3d2e93(0xea)]!==undefined&&{'days_of_week':_0x73ce0[_0x3d2e93(0xea)]},..._0x2acfa5&&{'condition':_0x2acfa5}};}case'activation':{const _0x20d709=_0x12a513;return{'activation':_0x20d709[_0x3d2e93(0x12c)]};}case _0x3d2e93(0x13b):{const _0x85a6b1=_0x12a513;return{'branches':_0x85a6b1[_0x3d2e93(0xf6)][_0x3d2e93(0x159)](normalizeDecisionBranch)};}case'ab_test':{const _0x48809d=_0x12a513;return{..._0x48809d[_0x3d2e93(0xf4)]!==undefined&&{'customized_split':_0x48809d['customized_split']},..._0x48809d['unique_id']!==undefined&&{'unique_id':_0x48809d[_0x3d2e93(0xfc)]},'variants':_0x48809d['variants'][_0x3d2e93(0x159)](normalizeAbTestVariant)};}case'jump':{const _0x5d8a76=_0x12a513;return{'target':normalizeJumpTarget(_0x5d8a76[_0x3d2e93(0x11b)])};}default:return _0x12a513;}}function normalizeDecisionBranch(_0x37355c){const _0x252c8d=a135_0x4c4cba;return{'name':_0x37355c[_0x252c8d(0xe6)],..._0x37355c['segment']!==undefined&&{'segment':_0x37355c[_0x252c8d(0x11a)]},..._0x37355c[_0x252c8d(0x1a0)]!==undefined&&{'excluded':_0x37355c['excluded']},..._0x37355c[_0x252c8d(0xec)]!==undefined&&{'next':_0x37355c[_0x252c8d(0xec)]}};}function normalizeAbTestVariant(_0x50b94b){const _0x2d7203=a135_0x4c4cba;return{..._0x50b94b['id']!==undefined&&{'id':_0x50b94b['id']},'name':_0x50b94b['name'],'percentage':_0x50b94b[_0x2d7203(0xf5)],..._0x50b94b['next']!==undefined&&{'next':_0x50b94b[_0x2d7203(0xec)]}};}function normalizeJumpTarget(_0x272ead){const _0x4f4811=a135_0x4c4cba;return{'journey':_0x272ead['journey'],'stage':_0x272ead[_0x4f4811(0xff)],..._0x272ead[_0x4f4811(0xfb)]!==undefined&&{'bundle_id':_0x272ead['bundle_id']}};}function normalizeEmbeddedSegments(_0x5893ae,_0x270e17){const _0x2c9401=a135_0x4c4cba,_0x56d60c={},_0x6255f6=Object[_0x2c9401(0x183)](_0x5893ae),_0x3d51f8=_0x270e17?[..._0x270e17[_0x2c9401(0x175)](_0xd0db9=>_0x6255f6[_0x2c9401(0xe5)](_0xd0db9)),..._0x6255f6[_0x2c9401(0x175)](_0x4d5697=>!_0x270e17['includes'](_0x4d5697))[_0x2c9401(0x12b)]()]:_0x6255f6[_0x2c9401(0x12b)]();for(const _0x3a878b of _0x3d51f8){const _0x3a597a=_0x5893ae[_0x3a878b];if(_0x3a597a[_0x2c9401(0xe3)]){const _0x4e2889=_0x3a597a[_0x2c9401(0xe3)];if(_0x4e2889[_0x2c9401(0x117)]!==_0x2c9401(0x190)&&_0x4e2889[_0x2c9401(0x117)]!=='Or'){const _0x61c1f6=_0x4e2889[_0x2c9401(0x117)]??_0x2c9401(0x15c);throw new SDKError(ErrorCode[_0x2c9401(0x124)],_0x2c9401(0x171)+_0x3a878b+_0x2c9401(0x11e)+(_0x2c9401(0x103)+_0x61c1f6+'\x27.\x0a')+_0x2c9401(0xf3)+_0x2c9401(0x120)+_0x2c9401(0x19d)+'\x20\x20\x20\x20conditions:\x0a'+_0x2c9401(0x18c)+_0x2c9401(0xf8)+_0x2c9401(0xe4));}if(!_0x4e2889[_0x2c9401(0x191)]||!Array[_0x2c9401(0x16f)](_0x4e2889[_0x2c9401(0x191)]))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],'Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27'+_0x3a878b+'\x27:\x20'+_0x2c9401(0x15d)+_0x2c9401(0xf3)+_0x2c9401(0x120)+(_0x2c9401(0x12d)+_0x4e2889[_0x2c9401(0x117)]+'\x0a')+_0x2c9401(0x17d)+_0x2c9401(0x18c)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x2c9401(0xe4));}_0x56d60c[_0x3a878b]={..._0x3a597a['description']&&_0x3a597a[_0x2c9401(0x136)][_0x2c9401(0x165)]()&&{'description':_0x3a597a['description']},..._0x3a597a[_0x2c9401(0xe3)]&&{'rule':deepSortObject(_0x3a597a[_0x2c9401(0xe3)])}};}return _0x56d60c;}function normalizeEmbeddedActivations(_0x55dcef,_0x9b5b93){const _0x459211=a135_0x4c4cba,_0x5edcb5={},_0x516a99=Object[_0x459211(0x183)](_0x55dcef),_0x5b231a=_0x9b5b93?[..._0x9b5b93[_0x459211(0x175)](_0x348829=>_0x516a99[_0x459211(0xe5)](_0x348829)),..._0x516a99[_0x459211(0x175)](_0x2452f6=>!_0x9b5b93['includes'](_0x2452f6))[_0x459211(0x12b)]()]:_0x516a99[_0x459211(0x12b)]();for(const _0x2d3ede of _0x5b231a){const _0x50ecce=_0x55dcef[_0x2d3ede];_0x5edcb5[_0x2d3ede]={'name':_0x50ecce['name'],'connection':_0x50ecce[_0x459211(0x184)],..._0x50ecce[_0x459211(0x136)]!==undefined&&{'description':_0x50ecce['description']},..._0x50ecce[_0x459211(0x123)]!==undefined&&{'all_columns':_0x50ecce[_0x459211(0x123)]},..._0x50ecce['columns']!==undefined&&{'columns':_0x50ecce[_0x459211(0x14a)]},..._0x50ecce['behavior']!==undefined&&{'behavior':_0x50ecce[_0x459211(0x17b)]},..._0x50ecce[_0x459211(0xf2)]!==undefined&&{'schedule':_0x50ecce[_0x459211(0xf2)]},..._0x50ecce[_0x459211(0xed)]!==undefined&&{'notification':_0x50ecce[_0x459211(0xed)]},..._0x50ecce[_0x459211(0x19f)]!==undefined&&{'connector_config':_0x50ecce[_0x459211(0x19f)]},..._0x50ecce[_0x459211(0x19e)]!==undefined&&{'activation_template_id':_0x50ecce[_0x459211(0x19e)]}};}return _0x5edcb5;}export function getActiveStages(_0x200755){const _0x19af54=a135_0x4c4cba;if(isJourneysArrayMode(_0x200755)){const _0x3b2a5f=_0x200755[_0x19af54(0x168)]||[],_0x4c6d5a=_0x3b2a5f[_0x19af54(0x16d)](_0xf45555=>_0xf45555['latest']===!![])||_0x3b2a5f[0x0];return _0x4c6d5a?.[_0x19af54(0x13a)]||[];}if(isSingleVersionMode(_0x200755))return _0x200755['stages']||[];if(isMultiVersionMode(_0x200755)){const _0x2fc1c9=_0x200755[_0x19af54(0x16a)]||[],_0x585164=_0x2fc1c9[_0x19af54(0x16d)](_0xe7e179=>_0xe7e179[_0x19af54(0x15f)]===!![])||_0x2fc1c9[0x0];return _0x585164?.[_0x19af54(0x13a)]||[];}return[];}export function getLatestJourneyEntry(_0x1829a9){const _0x2c6fb5=a135_0x4c4cba;if(isJourneysArrayMode(_0x1829a9)){const _0x29c01c=_0x1829a9['journeys']||[];return _0x29c01c[_0x2c6fb5(0x16d)](_0xb91e03=>_0xb91e03[_0x2c6fb5(0x15f)]===!![])||_0x29c01c[0x0];}if(isMultiVersionMode(_0x1829a9)){const _0x29826e=_0x1829a9[_0x2c6fb5(0x16a)]||[],_0x1fedd7=_0x29826e[_0x2c6fb5(0x16d)](_0x461bc7=>_0x461bc7[_0x2c6fb5(0x15f)]===!![])||_0x29826e[0x0];if(_0x1fedd7)return{'version':_0x1fedd7['name'],'state':_0x1fedd7[_0x2c6fb5(0x140)],'latest':_0x1fedd7[_0x2c6fb5(0x15f)],'stages':_0x1fedd7[_0x2c6fb5(0x13a)],'id':_0x1fedd7['id'],'version_number':_0x1fedd7[_0x2c6fb5(0xf0)]};}if(isSingleVersionMode(_0x1829a9))return{'version':_0x1829a9['version']||'v1','state':_0x2c6fb5(0xe2),'stages':_0x1829a9[_0x2c6fb5(0x13a)]||[],'id':_0x1829a9['id'],'version_number':_0x1829a9['version_number'],'goal':_0x1829a9[_0x2c6fb5(0x179)],'reentry':_0x1829a9['reentry']};return undefined;}export function getLatestVersion(_0x137e84){const _0x56ab36=a135_0x4c4cba;if(!isMultiVersionMode(_0x137e84))return undefined;const _0x2726e0=_0x137e84['versions']||[];return _0x2726e0[_0x56ab36(0x16d)](_0x1b56e1=>_0x1b56e1[_0x56ab36(0x15f)]===!![])||_0x2726e0[0x0];}export function getEffectiveGoal(_0x58d87b){const _0x428881=a135_0x4c4cba,_0x5221fe=getLatestJourneyEntry(_0x58d87b);return _0x5221fe?.[_0x428881(0x179)]||_0x58d87b[_0x428881(0x179)];}export function getEffectiveReentry(_0x6b0d0c){const _0x147075=a135_0x4c4cba,_0x3ca168=getLatestJourneyEntry(_0x6b0d0c);return _0x3ca168?.[_0x147075(0x194)]||_0x6b0d0c[_0x147075(0x194)];}export function collectSegmentRefs(_0x51dbd9){const _0x215f0e=a135_0x4c4cba,_0x35a633=new Set();_0x51dbd9[_0x215f0e(0x179)]?.['segment']&&_0x35a633[_0x215f0e(0xf7)](_0x51dbd9[_0x215f0e(0x179)]['segment']);const _0x1d5e46=_0x391447=>{const _0xc2fa03=_0x215f0e;for(const _0x1f2e8a of _0x391447){_0x1f2e8a[_0xc2fa03(0x126)]?.[_0xc2fa03(0x11a)]&&_0x35a633[_0xc2fa03(0xf7)](_0x1f2e8a['entry_criteria'][_0xc2fa03(0x11a)]);if(_0x1f2e8a[_0xc2fa03(0x160)])for(const _0x449f02 of _0x1f2e8a[_0xc2fa03(0x160)]){_0x449f02[_0xc2fa03(0x11a)]&&_0x35a633[_0xc2fa03(0xf7)](_0x449f02[_0xc2fa03(0x11a)]);}_0x1f2e8a['milestone']?.['segment']&&_0x35a633[_0xc2fa03(0xf7)](_0x1f2e8a[_0xc2fa03(0x17f)][_0xc2fa03(0x11a)]);if(_0x1f2e8a['steps'])for(const _0x49afbc of _0x1f2e8a[_0xc2fa03(0x151)]){if(_0x49afbc[_0xc2fa03(0x117)]===_0xc2fa03(0x13b)){const _0x5ad10b=_0x49afbc;for(const _0x5e4d8b of _0x5ad10b[_0xc2fa03(0x107)]['branches']){_0x5e4d8b['segment']&&_0x35a633[_0xc2fa03(0xf7)](_0x5e4d8b[_0xc2fa03(0x11a)]);}}else{if(_0x49afbc[_0xc2fa03(0x117)]===_0xc2fa03(0xe8)){const _0xcff4e9=_0x49afbc;_0xcff4e9['with'][_0xc2fa03(0x14d)]?.[_0xc2fa03(0x11a)]&&_0x35a633[_0xc2fa03(0xf7)](_0xcff4e9[_0xc2fa03(0x107)][_0xc2fa03(0x14d)][_0xc2fa03(0x11a)]);}}}}};_0x51dbd9[_0x215f0e(0x13a)]&&_0x1d5e46(_0x51dbd9[_0x215f0e(0x13a)]);if(_0x51dbd9[_0x215f0e(0x16a)])for(const _0x57e7ae of _0x51dbd9[_0x215f0e(0x16a)]){_0x1d5e46(_0x57e7ae[_0x215f0e(0x13a)]);}return _0x35a633;}export function validateSegmentRefs(_0x39c3f8){const _0x1322f1=a135_0x4c4cba,_0x4dcf42=[],_0x463a25=collectSegmentRefs(_0x39c3f8),_0x36154d=new Set(Object[_0x1322f1(0x183)](_0x39c3f8[_0x1322f1(0x156)]||{}));for(const _0x1e69a0 of _0x463a25){const _0x1bab34=parseSegmentRef(_0x1e69a0);_0x1bab34['type']===_0x1322f1(0x152)&&!_0x36154d[_0x1322f1(0x113)](_0x1bab34[_0x1322f1(0xe6)])&&_0x4dcf42[_0x1322f1(0x155)](_0x1322f1(0x125)+_0x1bab34['name']+'\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:'+_0x1bab34[_0x1322f1(0xe6)]+'\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.');}return _0x4dcf42;}export function collectSegmentIdsFromJourneyApi(_0x248f67){const _0x50229c=a135_0x4c4cba,_0x1cea61=new Set();_0x248f67[_0x50229c(0x157)][_0x50229c(0x179)]?.['segmentId']&&_0x1cea61[_0x50229c(0xf7)](_0x248f67[_0x50229c(0x157)]['goal']['segmentId']);const _0x10dfad=_0x248f67[_0x50229c(0x157)]['journeyStages'];if(Array['isArray'](_0x10dfad))for(const _0xb729b2 of _0x10dfad){_0xb729b2['entryCriteria']?.[_0x50229c(0x131)]&&_0x1cea61[_0x50229c(0xf7)](_0xb729b2[_0x50229c(0x137)][_0x50229c(0x131)]);const _0x9b3d35=_0xb729b2[_0x50229c(0x12a)]??_0xb729b2['exitCriteria'];if(Array[_0x50229c(0x16f)](_0x9b3d35))for(const _0x20847a of _0x9b3d35){_0x20847a['segmentId']&&_0x1cea61[_0x50229c(0xf7)](_0x20847a[_0x50229c(0x131)]);}_0xb729b2['milestone']?.['segmentId']&&_0x1cea61[_0x50229c(0xf7)](_0xb729b2[_0x50229c(0x17f)]['segmentId']);if(_0xb729b2[_0x50229c(0x151)]&&typeof _0xb729b2['steps']===_0x50229c(0x100)){const _0x409835=Array[_0x50229c(0x16f)](_0xb729b2[_0x50229c(0x151)])?_0xb729b2[_0x50229c(0x151)]:Object['values'](_0xb729b2[_0x50229c(0x151)]);for(const _0x487e98 of _0x409835){_0x487e98[_0x50229c(0x16c)]?.[_0x50229c(0x131)]&&_0x1cea61['add'](_0x487e98[_0x50229c(0x16c)][_0x50229c(0x131)]);const _0x2dd14c=_0x487e98;_0x2dd14c[_0x50229c(0x108)]&&_0x1cea61['add'](_0x2dd14c[_0x50229c(0x108)]);if(Array['isArray'](_0x2dd14c[_0x50229c(0x191)]))for(const _0x230d42 of _0x2dd14c['conditions']){_0x230d42[_0x50229c(0x131)]&&_0x1cea61[_0x50229c(0xf7)](_0x230d42['segmentId']);}if(Array['isArray'](_0x487e98[_0x50229c(0xf6)]))for(const _0xb7f325 of _0x487e98[_0x50229c(0xf6)]){_0xb7f325[_0x50229c(0x131)]&&_0x1cea61['add'](_0xb7f325[_0x50229c(0x131)]);}}}}return _0x1cea61;}
|