@treasuredata/tdx 2026.4.21 → 2026.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/passthrough-server.d.ts +10 -0
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.d.ts +33 -9
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x304f95,_0x580979){const _0x309cef=a146_0x35cf,_0x770ea3=_0x304f95();while(!![]){try{const _0x5b52cd=parseInt(_0x309cef(0x291))/0x1*(parseInt(_0x309cef(0x204))/0x2)+parseInt(_0x309cef(0x27e))/0x3+parseInt(_0x309cef(0x283))/0x4+-parseInt(_0x309cef(0x234))/0x5+-parseInt(_0x309cef(0x237))/0x6*(-parseInt(_0x309cef(0x266))/0x7)+-parseInt(_0x309cef(0x1f2))/0x8*(-parseInt(_0x309cef(0x235))/0x9)+parseInt(_0x309cef(0x23c))/0xa*(-parseInt(_0x309cef(0x20d))/0xb);if(_0x5b52cd===_0x580979)break;else _0x770ea3['push'](_0x770ea3['shift']());}catch(_0x581166){_0x770ea3['push'](_0x770ea3['shift']());}}}(a146_0x3dab,0x6bc92));import{JourneyDefSchema}from'./types/journey-schema.js';function a146_0x3dab(){const _0x42638c=['.with.condition.segment','Jump\x20step\x20requires\x20a\x20target','map','issues','70acVMLm','MISSING_SEGMENT_REFERENCE','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','abs','endsWith','DUPLICATE_LATEST','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','referencedSegments','.with.activation','\x27\x20has\x20only\x20','startsWith','path','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','variants','END_STEP_HAS_NEXT_OR_WITH','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','state','stepNames','.entry_criteria','.segment','rule','percentage','jump','485748DSCaAH','timeout','versions[','MISSING_CONDITIONS','launched','1723228foHxmK','INSUFFICIENT_STEPS','level','join','some','Journey\x20name\x20is\x20required','includes','latest','stages','condition\x20of\x20\x27','segments','JOURNEY_SCHEMA_ERROR','timeout\x20of\x20\x27','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','7397KTNHed','with','.with.condition.next','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','warning','message','journeys','.steps','splice','length','decision_point','description','.steps[','versions','MISSING_EXIT_CRITERIA','MERGE_TO_MERGE_CHAIN','INVALID_NEXT_REFERENCE','stage','size','8qWbfEb','end','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','INVALID_AB_TEST_PERCENTAGES','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','excluded','ref:','goal','FEW_STEPS','\x27\x20has\x20no\x20end\x20step','SINGLE_INPUT_MERGE','.with.target','.with.condition',').\x20Merge\x20is\x20unnecessary.','indices','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.with.branches','.with.condition.timeout','136fwZEfj','symbol','Embedded\x20segment\x20\x27','condition','activationKeys','Duplicate\x20step\x20name\x20\x27','.milestone','source','data','3792899BdNEAG','INVALID_JUMP_TARGET','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','MISSING_NAME','\x27\x20(first\x20defined\x20at\x20steps[','type','\x27\x20with\x20no\x20action\x20in\x20between','activation','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','\x27\x20(from:\x20','get','target','keys','next','.with.branches[','has','set','\x20versions)','MISSING_MILESTONE','name','skipSchema','safeParse','branches','\x20stages\x20but\x20maximum\x20is\x20','End\x20step\x20\x27','\x27\x20of\x20\x27','push','BRANCH_DIRECTLY_TO_MERGE','MISSING_ENTRY_CRITERIA','add','wait','ACTIVATION_SCHEMA_ERROR','ab_test','match','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27',').\x20Use\x20a\x20merge\x20step.','merge','.exit_criteria[','DUPLICATE_STEP_NAME','4358015uMgLYR','6887880aLwVjI','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','498774JvdoGy','error','.next','journeys,\x20stages,\x20or\x20versions','MISSING_ACTIVATION_REF','40oHihzn','exit_criteria','.type','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','activations','Merge\x20step\x20\x27','.rule','.exit_criteria','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.stages','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Journey\x20has\x20no\x20goal\x20defined','reduce','filter','Journey\x20has\x20','trim','.name','.with','Stage\x20\x27','Journey\x20can\x20have\x20at\x20most\x20one\x20','\x20with\x20latest:\x20true','segment','milestone','MISSING_STAGES','steps','UNUSED_EMBEDDED_SEGMENT','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.with.variants','embeddedSegments','.with.variants[','stages[','step\x20\x27','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','\x20(across\x20','success','document','entry_criteria'];a146_0x3dab=function(){return _0x42638c;};return a146_0x3dab();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0xaf0460,_0x53770c,_0x445775,_0x2063e7,_0x42c0c7,_0xd9049){const _0x25f5c2=a146_0x35cf;return{'level':_0xaf0460,'path':_0x53770c,'code':_0x445775,'message':_0x2063e7,'location':getLocationFromPath(_0x42c0c7[_0x25f5c2(0x260)],_0x42c0c7[_0x25f5c2(0x20b)],pathToArray(_0xd9049??_0x53770c))};}function validateVersionStructure(_0x392091,_0x1990e9){const _0x506db0=a146_0x35cf,_0x4a4b5f=[];return _0x392091[_0x506db0(0x1e8)]>MAX_STAGES&&_0x4a4b5f[_0x506db0(0x227)](createIssue(_0x506db0(0x238),_0x506db0(0x28b),'TOO_MANY_STAGES',_0x506db0(0x24a)+_0x392091[_0x506db0(0x1e8)]+_0x506db0(0x224)+MAX_STAGES,_0x1990e9)),_0x4a4b5f;}function validateStageStructure(_0x826ee5,_0x5185ce,_0x160df2,_0x430655){const _0x9e15bb=a146_0x35cf,_0x3e2aa0=[],_0x3d3753='stages['+_0x5185ce+']';_0x5185ce===0x0&&!_0x826ee5[_0x9e15bb(0x261)]&&_0x3e2aa0[_0x9e15bb(0x227)](createIssue(_0x9e15bb(0x238),_0x3d3753+_0x9e15bb(0x279),_0x9e15bb(0x229),_0x9e15bb(0x24e)+_0x826ee5[_0x9e15bb(0x220)]+_0x9e15bb(0x276),_0x430655,_0x3d3753));const _0x1aa064=_0x5185ce===_0x160df2-0x1;!_0x1aa064&&!_0x826ee5[_0x9e15bb(0x252)]&&_0x3e2aa0[_0x9e15bb(0x227)](createIssue(_0x9e15bb(0x238),_0x3d3753+_0x9e15bb(0x20a),_0x9e15bb(0x21f),'Stage\x20\x27'+_0x826ee5[_0x9e15bb(0x220)]+_0x9e15bb(0x26c),_0x430655,_0x3d3753));(!_0x826ee5[_0x9e15bb(0x23d)]||_0x826ee5[_0x9e15bb(0x23d)][_0x9e15bb(0x1e8)]===0x0)&&_0x3e2aa0[_0x9e15bb(0x227)](createIssue(_0x9e15bb(0x295),_0x3d3753+_0x9e15bb(0x243),_0x9e15bb(0x1ed),_0x9e15bb(0x24e)+_0x826ee5[_0x9e15bb(0x220)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x430655,_0x3d3753));const _0x3f7444=_0x826ee5['steps']?.[_0x9e15bb(0x1e8)]??0x0;if(_0x3f7444===0x0)_0x3e2aa0[_0x9e15bb(0x227)](createIssue(_0x9e15bb(0x238),_0x3d3753+_0x9e15bb(0x1e6),_0x9e15bb(0x284),'Stage\x20\x27'+_0x826ee5[_0x9e15bb(0x220)]+'\x27\x20has\x20no\x20steps',_0x430655,_0x3d3753+_0x9e15bb(0x1e6)));else{if(_0x3f7444===0x1)_0x3e2aa0['push'](createIssue(_0x9e15bb(0x295),_0x3d3753+_0x9e15bb(0x1e6),_0x9e15bb(0x284),_0x9e15bb(0x24e)+_0x826ee5['name']+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x430655,_0x3d3753+_0x9e15bb(0x1e6)));else _0x3f7444<=0x3&&_0x3e2aa0['push'](createIssue('warning',_0x3d3753+'.steps',_0x9e15bb(0x1fa),_0x9e15bb(0x24e)+_0x826ee5[_0x9e15bb(0x220)]+_0x9e15bb(0x26f)+_0x3f7444+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x430655,_0x3d3753+'.steps'));}return _0x3e2aa0;}function validateStep(_0x4dce66,_0x5611aa,_0x20d758,_0x17e159){const _0x379cd8=a146_0x35cf,_0x55a53c=[];if(_0x4dce66[_0x379cd8(0x212)]===_0x379cd8(0x1f3))return _0x4dce66[_0x379cd8(0x21a)]&&_0x55a53c[_0x379cd8(0x227)](createIssue(_0x379cd8(0x238),_0x5611aa+'.next',_0x379cd8(0x274),_0x379cd8(0x225)+_0x4dce66[_0x379cd8(0x220)]+_0x379cd8(0x1f6),_0x20d758)),_0x379cd8(0x292)in _0x4dce66&&_0x4dce66[_0x379cd8(0x292)]!==undefined&&_0x55a53c['push'](createIssue(_0x379cd8(0x238),_0x5611aa+'.with',_0x379cd8(0x274),_0x379cd8(0x225)+_0x4dce66[_0x379cd8(0x220)]+_0x379cd8(0x23f),_0x20d758)),_0x55a53c;_0x4dce66[_0x379cd8(0x21a)]&&(_0x20d758[_0x379cd8(0x278)]&&!_0x20d758[_0x379cd8(0x278)][_0x379cd8(0x21c)](_0x4dce66[_0x379cd8(0x21a)])&&_0x55a53c[_0x379cd8(0x227)](createIssue(_0x379cd8(0x238),_0x5611aa+_0x379cd8(0x239),_0x379cd8(0x1ef),_0x379cd8(0x275)+_0x4dce66[_0x379cd8(0x21a)]+'\x27',_0x20d758)));switch(_0x4dce66[_0x379cd8(0x212)]){case _0x379cd8(0x22b):_0x55a53c[_0x379cd8(0x227)](...validateWaitStep(_0x4dce66,_0x5611aa,_0x20d758,_0x17e159));break;case'activation':_0x55a53c[_0x379cd8(0x227)](...validateActivationStep(_0x4dce66,_0x5611aa,_0x20d758));break;case _0x379cd8(0x1e9):_0x55a53c[_0x379cd8(0x227)](...validateDecisionPointStep(_0x4dce66,_0x5611aa,_0x20d758,_0x17e159));break;case _0x379cd8(0x22d):_0x55a53c[_0x379cd8(0x227)](...validateAbTestStep(_0x4dce66,_0x5611aa,_0x20d758,_0x17e159));break;case _0x379cd8(0x27d):_0x55a53c[_0x379cd8(0x227)](...validateJumpStep(_0x4dce66,_0x5611aa,_0x20d758));break;}return _0x55a53c;}function validateWaitStep(_0x2f3556,_0x27a347,_0x350b89,_0x45c882){const _0x2e3187=a146_0x35cf,_0x1e2666=[];if(!_0x2f3556['with'])return _0x1e2666['push'](createIssue(_0x2e3187(0x238),_0x27a347+_0x2e3187(0x24d),'MISSING_WAIT_PARAMS',_0x2e3187(0x25d),_0x350b89,_0x27a347)),_0x1e2666;if(_0x2f3556['with'][_0x2e3187(0x207)]){const _0x323012=_0x2f3556[_0x2e3187(0x292)][_0x2e3187(0x207)];if(_0x323012[_0x2e3187(0x251)]){_0x350b89[_0x2e3187(0x26d)]?.[_0x2e3187(0x22a)](_0x323012[_0x2e3187(0x251)]);!_0x323012['segment'][_0x2e3187(0x270)](_0x2e3187(0x1f8))&&(_0x350b89[_0x2e3187(0x259)]&&!_0x350b89[_0x2e3187(0x259)][_0x2e3187(0x21c)](_0x323012[_0x2e3187(0x251)])&&_0x1e2666[_0x2e3187(0x227)](createIssue(_0x2e3187(0x238),_0x27a347+_0x2e3187(0x262),_0x2e3187(0x267),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x323012[_0x2e3187(0x251)]+_0x2e3187(0x20f),_0x350b89)));_0x323012[_0x2e3187(0x21a)]&&_0x350b89[_0x2e3187(0x278)]&&!_0x350b89[_0x2e3187(0x278)][_0x2e3187(0x21c)](_0x323012[_0x2e3187(0x21a)])&&_0x1e2666[_0x2e3187(0x227)](createIssue(_0x2e3187(0x238),_0x27a347+'.with.condition.next',_0x2e3187(0x1ef),_0x2e3187(0x272)+_0x323012[_0x2e3187(0x21a)]+'\x27',_0x350b89));_0x323012['timeout']?.[_0x2e3187(0x21a)]&&_0x350b89[_0x2e3187(0x278)]&&!_0x350b89[_0x2e3187(0x278)][_0x2e3187(0x21c)](_0x323012[_0x2e3187(0x27f)][_0x2e3187(0x21a)])&&_0x1e2666[_0x2e3187(0x227)](createIssue(_0x2e3187(0x238),_0x27a347+'.with.condition.timeout.next',_0x2e3187(0x1ef),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x323012['timeout']['next']+'\x27',_0x350b89));const _0x4160ea=_0x323012['next']||_0x2f3556['next'],_0x526f62=_0x323012[_0x2e3187(0x27f)]?.['next']||_0x2f3556[_0x2e3187(0x21a)];if(_0x4160ea){const _0xa7947d=_0x45c882[_0x2e3187(0x217)](_0x4160ea);_0xa7947d?.['type']==='merge'&&_0x1e2666['push'](createIssue(_0x2e3187(0x295),_0x27a347+_0x2e3187(0x293),_0x2e3187(0x228),_0x2e3187(0x22f)+_0x4160ea+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x350b89,_0x27a347+_0x2e3187(0x1fe)));}if(_0x526f62){const _0x1e8b70=_0x45c882['get'](_0x526f62);_0x1e8b70?.[_0x2e3187(0x212)]===_0x2e3187(0x231)&&_0x1e2666['push'](createIssue(_0x2e3187(0x295),_0x27a347+'.with.condition.timeout.next',_0x2e3187(0x228),_0x2e3187(0x294)+_0x526f62+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x350b89,_0x27a347+_0x2e3187(0x203)));}}}return _0x1e2666;}function validateActivationStep(_0x273b05,_0x4f394d,_0x10030c){const _0x367762=a146_0x35cf,_0x1c7aea=[];if(!_0x273b05[_0x367762(0x292)]?.[_0x367762(0x214)])return _0x1c7aea['push'](createIssue(_0x367762(0x238),_0x4f394d+_0x367762(0x26e),_0x367762(0x23b),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x10030c,_0x4f394d)),_0x1c7aea;const _0x518924=_0x273b05[_0x367762(0x292)][_0x367762(0x214)];return _0x10030c['activationKeys']&&!_0x518924[_0x367762(0x270)](_0x367762(0x1f8))&&(!_0x10030c[_0x367762(0x208)][_0x367762(0x21c)](_0x518924)&&_0x1c7aea['push'](createIssue(_0x367762(0x238),_0x4f394d+_0x367762(0x26e),'MISSING_ACTIVATION_DEFINITION','Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x518924+_0x367762(0x201),_0x10030c))),_0x1c7aea;}function validateDecisionPointStep(_0x4f9a44,_0x1efdb4,_0x215715,_0x355ac3){const _0x2b0294=a146_0x35cf,_0x73fe92=[];if(!_0x4f9a44[_0x2b0294(0x292)]?.['branches']||_0x4f9a44[_0x2b0294(0x292)][_0x2b0294(0x223)]['length']===0x0)return _0x73fe92[_0x2b0294(0x227)](createIssue(_0x2b0294(0x238),_0x1efdb4+_0x2b0294(0x202),_0x2b0294(0x281),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x215715,_0x1efdb4)),_0x73fe92;for(let _0x2c58a5=0x0;_0x2c58a5<_0x4f9a44['with'][_0x2b0294(0x223)]['length'];_0x2c58a5++){const _0x51a77d=_0x4f9a44[_0x2b0294(0x292)][_0x2b0294(0x223)][_0x2c58a5],_0x570477=_0x1efdb4+_0x2b0294(0x21b)+_0x2c58a5+']';_0x51a77d['segment']&&!_0x51a77d[_0x2b0294(0x1f7)]&&(_0x215715[_0x2b0294(0x26d)]?.[_0x2b0294(0x22a)](_0x51a77d[_0x2b0294(0x251)]),!_0x51a77d['segment'][_0x2b0294(0x270)]('ref:')&&(_0x215715[_0x2b0294(0x259)]&&!_0x215715['embeddedSegments'][_0x2b0294(0x21c)](_0x51a77d[_0x2b0294(0x251)])&&_0x73fe92[_0x2b0294(0x227)](createIssue(_0x2b0294(0x238),_0x570477+'.segment',_0x2b0294(0x267),_0x2b0294(0x290)+_0x51a77d[_0x2b0294(0x251)]+'\x27',_0x215715))));_0x51a77d[_0x2b0294(0x21a)]&&_0x215715[_0x2b0294(0x278)]&&!_0x215715[_0x2b0294(0x278)][_0x2b0294(0x21c)](_0x51a77d[_0x2b0294(0x21a)])&&_0x73fe92['push'](createIssue(_0x2b0294(0x238),_0x570477+_0x2b0294(0x239),'INVALID_NEXT_REFERENCE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x51a77d[_0x2b0294(0x21a)]+'\x27',_0x215715));if(_0x51a77d[_0x2b0294(0x21a)]){const _0x2c7a7f=_0x355ac3[_0x2b0294(0x217)](_0x51a77d[_0x2b0294(0x21a)]);_0x2c7a7f?.['type']==='merge'&&_0x73fe92[_0x2b0294(0x227)](createIssue(_0x2b0294(0x295),_0x570477+_0x2b0294(0x239),_0x2b0294(0x228),'Decision\x20branch\x20\x27'+_0x51a77d[_0x2b0294(0x220)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x51a77d[_0x2b0294(0x21a)]+_0x2b0294(0x213),_0x215715));}}return _0x73fe92;}function validateAbTestStep(_0x2720f4,_0xc12d7a,_0x1a7095,_0x3ce237){const _0x132cc5=a146_0x35cf,_0x20a623=[];if(!_0x2720f4[_0x132cc5(0x292)]?.[_0x132cc5(0x273)]||_0x2720f4[_0x132cc5(0x292)]['variants'][_0x132cc5(0x1e8)]===0x0)return _0x20a623[_0x132cc5(0x227)](createIssue(_0x132cc5(0x238),_0xc12d7a+_0x132cc5(0x258),'MISSING_CONDITIONS','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x1a7095,_0xc12d7a)),_0x20a623;const _0x480cfd=_0x2720f4[_0x132cc5(0x292)]['variants'][_0x132cc5(0x248)]((_0x53bfc4,_0x315755)=>_0x53bfc4+(_0x315755[_0x132cc5(0x27c)]||0x0),0x0);Math[_0x132cc5(0x269)](_0x480cfd-0x64)>0.01&&_0x20a623[_0x132cc5(0x227)](createIssue(_0x132cc5(0x238),_0xc12d7a+_0x132cc5(0x258),_0x132cc5(0x1f5),_0x132cc5(0x244)+_0x480cfd+'%)',_0x1a7095));for(let _0x1ab526=0x0;_0x1ab526<_0x2720f4[_0x132cc5(0x292)][_0x132cc5(0x273)][_0x132cc5(0x1e8)];_0x1ab526++){const _0x1ec76e=_0x2720f4['with'][_0x132cc5(0x273)][_0x1ab526],_0x298d4f=_0xc12d7a+_0x132cc5(0x25a)+_0x1ab526+']';_0x1ec76e[_0x132cc5(0x21a)]&&_0x1a7095[_0x132cc5(0x278)]&&!_0x1a7095[_0x132cc5(0x278)][_0x132cc5(0x21c)](_0x1ec76e[_0x132cc5(0x21a)])&&_0x20a623[_0x132cc5(0x227)](createIssue(_0x132cc5(0x238),_0x298d4f+_0x132cc5(0x239),'INVALID_NEXT_REFERENCE','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x1ec76e[_0x132cc5(0x21a)]+'\x27',_0x1a7095));if(_0x1ec76e['next']){const _0x3ac8cc=_0x3ce237[_0x132cc5(0x217)](_0x1ec76e['next']);_0x3ac8cc?.[_0x132cc5(0x212)]===_0x132cc5(0x231)&&_0x20a623['push'](createIssue(_0x132cc5(0x295),_0x298d4f+'.next',_0x132cc5(0x228),'A/B\x20test\x20variant\x20\x27'+_0x1ec76e[_0x132cc5(0x220)]+_0x132cc5(0x246)+_0x1ec76e['next']+_0x132cc5(0x213),_0x1a7095));}}return _0x20a623;}function a146_0x35cf(_0x5c12d5,_0x20deaf){_0x5c12d5=_0x5c12d5-0x1e5;const _0x3dabc3=a146_0x3dab();let _0x35cf12=_0x3dabc3[_0x5c12d5];return _0x35cf12;}function validateJumpStep(_0x2236b5,_0x4da913,_0x35a96f){const _0xa8cbfb=a146_0x35cf,_0x194e5e=[];if(!_0x2236b5[_0xa8cbfb(0x292)]?.[_0xa8cbfb(0x218)])return _0x194e5e[_0xa8cbfb(0x227)](createIssue(_0xa8cbfb(0x238),_0x4da913+'.with.target',_0xa8cbfb(0x20e),_0xa8cbfb(0x263),_0x35a96f,_0x4da913)),_0x194e5e;return(!_0x2236b5[_0xa8cbfb(0x292)]['target']['journey']||!_0x2236b5[_0xa8cbfb(0x292)][_0xa8cbfb(0x218)][_0xa8cbfb(0x1f0)])&&_0x194e5e['push'](createIssue('error',_0x4da913+_0xa8cbfb(0x1fd),_0xa8cbfb(0x20e),_0xa8cbfb(0x1f4),_0x35a96f)),_0x194e5e;}function buildConvergenceMap(_0x4d7484){const _0x16b19b=a146_0x35cf,_0x110303=new Map();function _0x159520(_0xfb9ba4,_0x4d780c){const _0x2c84b3=a146_0x35cf,_0x500a21=_0x110303['get'](_0xfb9ba4)||[];_0x500a21[_0x2c84b3(0x227)](_0x4d780c),_0x110303[_0x2c84b3(0x21d)](_0xfb9ba4,_0x500a21);}for(const _0x3475c0 of _0x4d7484){_0x3475c0['next']&&_0x159520(_0x3475c0[_0x16b19b(0x21a)],{'stepName':_0x3475c0[_0x16b19b(0x220)],'description':_0x16b19b(0x25c)+_0x3475c0[_0x16b19b(0x220)]+'\x27'});if(_0x3475c0[_0x16b19b(0x212)]===_0x16b19b(0x1e9)&&_0x3475c0[_0x16b19b(0x292)]?.[_0x16b19b(0x223)])for(const _0x11446c of _0x3475c0[_0x16b19b(0x292)][_0x16b19b(0x223)]){_0x11446c['next']&&_0x159520(_0x11446c['next'],{'stepName':_0x3475c0[_0x16b19b(0x220)],'description':'branch\x20\x27'+_0x11446c[_0x16b19b(0x220)]+_0x16b19b(0x226)+_0x3475c0['name']+'\x27'});}if(_0x3475c0[_0x16b19b(0x212)]===_0x16b19b(0x22d)&&_0x3475c0[_0x16b19b(0x292)]?.['variants'])for(const _0x52691a of _0x3475c0[_0x16b19b(0x292)]['variants']){_0x52691a['next']&&_0x159520(_0x52691a['next'],{'stepName':_0x3475c0['name'],'description':'variant\x20\x27'+_0x52691a['name']+_0x16b19b(0x226)+_0x3475c0['name']+'\x27'});}_0x3475c0['type']===_0x16b19b(0x22b)&&_0x3475c0[_0x16b19b(0x292)]?.[_0x16b19b(0x207)]&&(_0x3475c0[_0x16b19b(0x292)][_0x16b19b(0x207)]['next']&&_0x159520(_0x3475c0['with'][_0x16b19b(0x207)][_0x16b19b(0x21a)],{'stepName':_0x3475c0[_0x16b19b(0x220)],'description':_0x16b19b(0x28c)+_0x3475c0[_0x16b19b(0x220)]+'\x27'}),_0x3475c0[_0x16b19b(0x292)][_0x16b19b(0x207)][_0x16b19b(0x27f)]?.['next']&&_0x159520(_0x3475c0[_0x16b19b(0x292)][_0x16b19b(0x207)][_0x16b19b(0x27f)][_0x16b19b(0x21a)],{'stepName':_0x3475c0[_0x16b19b(0x220)],'description':_0x16b19b(0x28f)+_0x3475c0['name']+'\x27'}));}return _0x110303;}function validateFlowControl(_0x2868f0,_0x1b6d7f,_0x3942c1){const _0x20a29c=a146_0x35cf,_0x15434d=[],_0x4806ab=_0x20a29c(0x25b)+_0x1b6d7f+']',_0x5a3d72=_0x2868f0['steps']||[];if(_0x5a3d72['length']===0x0)return _0x15434d;const _0x12629b=new Map();for(const _0x170d57 of _0x5a3d72){_0x170d57[_0x20a29c(0x220)]&&_0x12629b['set'](_0x170d57['name'],_0x170d57);}const _0x5eb78d=buildConvergenceMap(_0x5a3d72),_0xb68608=_0x5a3d72[_0x20a29c(0x287)](_0x284eb5=>_0x284eb5[_0x20a29c(0x212)]===_0x20a29c(0x1f3));!_0xb68608&&_0x15434d['push'](createIssue('error',_0x4806ab+'.steps','MISSING_END_STEP',_0x20a29c(0x24e)+_0x2868f0['name']+_0x20a29c(0x1fb),_0x3942c1));for(const [_0xc0b610,_0x13fbf8]of _0x5eb78d){const _0xf08262=_0x12629b[_0x20a29c(0x217)](_0xc0b610);if(!_0xf08262)continue;if(_0x13fbf8['length']>0x1&&_0xf08262[_0x20a29c(0x212)]!==_0x20a29c(0x231)){const _0x2a12d0=_0x13fbf8[_0x20a29c(0x264)](_0x4160f3=>_0x4160f3[_0x20a29c(0x1ea)])[_0x20a29c(0x286)](',\x20');_0x15434d[_0x20a29c(0x227)](createIssue(_0x20a29c(0x238),_0x4806ab+_0x20a29c(0x1e6),'CONVERGENCE_WITHOUT_MERGE','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0xc0b610+_0x20a29c(0x216)+_0x2a12d0+_0x20a29c(0x230),_0x3942c1));}_0x13fbf8[_0x20a29c(0x1e8)]===0x1&&_0xf08262[_0x20a29c(0x212)]==='merge'&&_0x15434d[_0x20a29c(0x227)](createIssue(_0x20a29c(0x295),_0x4806ab+'.steps',_0x20a29c(0x1fc),'Merge\x20step\x20\x27'+_0xc0b610+_0x20a29c(0x215)+_0x13fbf8[0x0][_0x20a29c(0x1ea)]+_0x20a29c(0x1ff),_0x3942c1));}for(const _0x421455 of _0x5a3d72){if(_0x421455[_0x20a29c(0x212)]==='merge'&&_0x421455[_0x20a29c(0x21a)]){const _0x3d44ba=_0x12629b[_0x20a29c(0x217)](_0x421455[_0x20a29c(0x21a)]);_0x3d44ba?.[_0x20a29c(0x212)]===_0x20a29c(0x231)&&_0x15434d[_0x20a29c(0x227)](createIssue(_0x20a29c(0x238),_0x4806ab+'.steps',_0x20a29c(0x1ee),_0x20a29c(0x241)+_0x421455[_0x20a29c(0x220)]+_0x20a29c(0x268)+_0x421455[_0x20a29c(0x21a)]+_0x20a29c(0x236),_0x3942c1));}}return _0x15434d;}function validateCriteria(_0x2cafa9,_0x486a8a,_0x21a799){const _0x457a49=a146_0x35cf,_0x37a878=[];return _0x2cafa9[_0x457a49(0x251)]&&(_0x21a799['referencedSegments']?.[_0x457a49(0x22a)](_0x2cafa9[_0x457a49(0x251)]),!_0x2cafa9[_0x457a49(0x251)]['startsWith'](_0x457a49(0x1f8))&&(_0x21a799['embeddedSegments']&&!_0x21a799[_0x457a49(0x259)][_0x457a49(0x21c)](_0x2cafa9['segment'])&&_0x37a878['push'](createIssue(_0x457a49(0x238),_0x486a8a+_0x457a49(0x27a),_0x457a49(0x267),_0x457a49(0x256)+_0x2cafa9['segment']+'\x27',_0x21a799)))),_0x37a878;}function validateEmbeddedSegment(_0x247a26,_0x30af11,_0x222d5c){const _0x108b86=a146_0x35cf,_0x245dbd=[];return _0x247a26[_0x108b86(0x27b)]&&_0x245dbd['push'](...validateRuleDef(_0x247a26['rule'],_0x30af11+_0x108b86(0x242),_0x222d5c)),_0x245dbd;}function validateStage(_0x38b36b,_0x5e8d9b,_0x2a3325,_0x1ee874){const _0x2a2a72=a146_0x35cf,_0x6b82dd=[],_0x1076c5=_0x2a2a72(0x25b)+_0x5e8d9b+']',_0x36bb10=new Map(),_0x295aa3=new Map();if(_0x38b36b[_0x2a2a72(0x254)]){for(let _0x3655ea=0x0;_0x3655ea<_0x38b36b[_0x2a2a72(0x254)][_0x2a2a72(0x1e8)];_0x3655ea++){const _0x54c60c=_0x38b36b[_0x2a2a72(0x254)][_0x3655ea];_0x54c60c[_0x2a2a72(0x220)]&&_0x36bb10['set'](_0x54c60c[_0x2a2a72(0x220)],_0x54c60c);}for(let _0x45faff=0x0;_0x45faff<_0x38b36b[_0x2a2a72(0x254)][_0x2a2a72(0x1e8)];_0x45faff++){const _0x2e999a=_0x38b36b['steps'][_0x45faff],_0x441b93=_0x1076c5+_0x2a2a72(0x1eb)+_0x45faff+']';if(_0x2e999a[_0x2a2a72(0x220)]){if(_0x295aa3[_0x2a2a72(0x21c)](_0x2e999a[_0x2a2a72(0x220)])){const _0x5c2746=_0x295aa3[_0x2a2a72(0x217)](_0x2e999a['name']);_0x6b82dd[_0x2a2a72(0x227)](createIssue(_0x2a2a72(0x238),_0x441b93+_0x2a2a72(0x24c),_0x2a2a72(0x233),_0x2a2a72(0x209)+_0x2e999a[_0x2a2a72(0x220)]+_0x2a2a72(0x211)+_0x5c2746+'])',_0x1ee874));}else _0x295aa3[_0x2a2a72(0x21d)](_0x2e999a[_0x2a2a72(0x220)],_0x45faff);}_0x6b82dd[_0x2a2a72(0x227)](...validateStep(_0x2e999a,_0x441b93,_0x1ee874,_0x36bb10));}}_0x38b36b[_0x2a2a72(0x261)]&&_0x6b82dd['push'](...validateCriteria(_0x38b36b[_0x2a2a72(0x261)],_0x1076c5+_0x2a2a72(0x279),_0x1ee874));if(_0x38b36b[_0x2a2a72(0x23d)])for(let _0x10a371=0x0;_0x10a371<_0x38b36b[_0x2a2a72(0x23d)][_0x2a2a72(0x1e8)];_0x10a371++){_0x6b82dd['push'](...validateCriteria(_0x38b36b['exit_criteria'][_0x10a371],_0x1076c5+_0x2a2a72(0x232)+_0x10a371+']',_0x1ee874));}return _0x38b36b[_0x2a2a72(0x252)]&&_0x6b82dd[_0x2a2a72(0x227)](...validateCriteria(_0x38b36b[_0x2a2a72(0x252)],_0x1076c5+_0x2a2a72(0x20a),_0x1ee874)),_0x6b82dd[_0x2a2a72(0x227)](...validateStageStructure(_0x38b36b,_0x5e8d9b,_0x2a3325,_0x1ee874)),_0x6b82dd['push'](...validateFlowControl(_0x38b36b,_0x5e8d9b,_0x1ee874)),_0x6b82dd;}function validateStagesForVersion(_0x50605f,_0x249728,_0x18b941,_0x5553bd,_0x10bbd2,_0x3813bf,_0x53ee6b){const _0x14fe57=a146_0x35cf;if(_0x50605f[_0x14fe57(0x1e8)]===0x0){_0x10bbd2['push']({'level':_0x14fe57(0x238),'path':_0x5553bd+_0x14fe57(0x28b),'code':'MISSING_STAGES','message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x18b941[_0x14fe57(0x260)],_0x18b941[_0x14fe57(0x20b)],[_0x14fe57(0x28b)])});return;}const _0xee4d0e=new Set();for(const _0x41b3d0 of _0x50605f){if(_0x41b3d0['steps'])for(const _0x20036b of _0x41b3d0[_0x14fe57(0x254)]){_0x20036b[_0x14fe57(0x220)]&&_0xee4d0e[_0x14fe57(0x22a)](_0x20036b['name']);}}const _0xd6e375={..._0x18b941,'stepNames':_0xee4d0e},_0x36fda7=validateVersionStructure(_0x50605f,_0xd6e375);for(const _0x5d8b82 of _0x36fda7){const _0x22b129=_0x5553bd?{..._0x5d8b82,'path':''+_0x5553bd+_0x5d8b82[_0x14fe57(0x271)]}:_0x5d8b82;if(_0x22b129[_0x14fe57(0x285)]===_0x14fe57(0x238))_0x10bbd2[_0x14fe57(0x227)](_0x22b129);else _0x3813bf[_0x14fe57(0x227)](_0x22b129);}for(let _0x35d986=0x0;_0x35d986<_0x50605f[_0x14fe57(0x1e8)];_0x35d986++){const _0x789689=validateStage(_0x50605f[_0x35d986],_0x35d986,_0x50605f[_0x14fe57(0x1e8)],_0xd6e375);for(const _0x53a84d of _0x789689){const _0x547a78=_0x5553bd?{..._0x53a84d,'path':''+_0x5553bd+_0x53a84d[_0x14fe57(0x271)]}:_0x53a84d;if(_0x547a78[_0x14fe57(0x285)]==='error')_0x10bbd2[_0x14fe57(0x227)](_0x547a78);else _0x3813bf[_0x14fe57(0x227)](_0x547a78);}}if(_0x249728[_0x14fe57(0x1f9)]){const _0x4c8edd=_0x53ee6b?.['goalIsInherited']?_0x14fe57(0x1f9):_0x5553bd+'goal',_0xe60801=validateCriteria(_0x249728[_0x14fe57(0x1f9)],_0x4c8edd,_0xd6e375);for(const _0x1624bf of _0xe60801){if(_0x1624bf[_0x14fe57(0x285)]===_0x14fe57(0x238))_0x10bbd2[_0x14fe57(0x227)](_0x1624bf);else _0x3813bf[_0x14fe57(0x227)](_0x1624bf);}}}function extractVersionIndex(_0xde7c4){const _0x25616d=a146_0x35cf,_0x1ff6f5=_0xde7c4[_0x25616d(0x22e)](/^journeys\[(\d+)\]\./);return _0x1ff6f5?_0x1ff6f5[0x1]:undefined;}function deduplicateAcrossVersions(_0x4fc3b6){const _0x269822=a146_0x35cf,_0x2ae91a=new Map();for(let _0x5e3d3a=0x0;_0x5e3d3a<_0x4fc3b6[_0x269822(0x1e8)];_0x5e3d3a++){const _0x258fda=_0x4fc3b6[_0x5e3d3a]['code']+':'+_0x4fc3b6[_0x5e3d3a][_0x269822(0x296)],_0x2163a3=extractVersionIndex(_0x4fc3b6[_0x5e3d3a][_0x269822(0x271)]),_0x5070ff=_0x2ae91a[_0x269822(0x217)](_0x258fda);if(_0x5070ff){_0x5070ff[_0x269822(0x200)]['push'](_0x5e3d3a);if(_0x2163a3)_0x5070ff['versions']['add'](_0x2163a3);}else _0x2ae91a['set'](_0x258fda,{'indices':[_0x5e3d3a],'versions':new Set(_0x2163a3?[_0x2163a3]:[])});}const _0x55e86a=new Set();for(const {indices:_0x17d615,versions:_0x524caf}of _0x2ae91a['values']()){if(_0x524caf[_0x269822(0x1f1)]<=0x1)continue;const _0xdcbbd0=_0x4fc3b6[_0x17d615[0x0]];_0xdcbbd0[_0x269822(0x271)]=_0xdcbbd0[_0x269822(0x271)]['replace'](/^journeys\[\d+\]\./,''),_0xdcbbd0['message']=_0xdcbbd0['message']+_0x269822(0x25e)+_0x524caf[_0x269822(0x1f1)]+_0x269822(0x21e);for(let _0x42c166=0x1;_0x42c166<_0x17d615['length'];_0x42c166++){_0x55e86a[_0x269822(0x22a)](_0x17d615[_0x42c166]);}}const _0x255e41=[..._0x55e86a]['sort']((_0x398adc,_0x8f895c)=>_0x8f895c-_0x398adc);for(const _0x2c34c8 of _0x255e41){_0x4fc3b6[_0x269822(0x1e7)](_0x2c34c8,0x1);}}export function validateJourneyDef(_0x342132,_0x2435eb={},_0x525f4e={}){const _0x1433bd=a146_0x35cf;if(_0x525f4e[_0x1433bd(0x221)])return runJourneySemanticChecks(_0x342132,_0x2435eb);const _0x23f1a1=JourneyDefSchema[_0x1433bd(0x222)](_0x342132);if(_0x23f1a1[_0x1433bd(0x25f)])return runJourneySemanticChecks(_0x23f1a1[_0x1433bd(0x20c)],_0x2435eb);return zodErrorsToJourneyValidationResult(_0x23f1a1[_0x1433bd(0x238)],_0x2435eb);}function zodErrorsToJourneyValidationResult(_0x228e1b,_0x21290d){const _0x3e1da6=a146_0x35cf,_0x4bd79c=flattenZodIssues(_0x228e1b[_0x3e1da6(0x265)]),_0x2690cd=_0x4bd79c[_0x3e1da6(0x264)](_0xa65449=>{const _0x105775=_0x3e1da6,_0x109a9c=formatZodPath(_0xa65449[_0x105775(0x271)]),_0x454c51=mapJourneyZodIssueToCode(_0xa65449,_0x109a9c),_0x2a3f15=getLocationFromPath(_0x21290d[_0x105775(0x260)],_0x21290d[_0x105775(0x20b)],_0xa65449[_0x105775(0x271)][_0x105775(0x264)](_0x5eca54=>typeof _0x5eca54===_0x105775(0x205)?String(_0x5eca54):_0x5eca54));return{'level':_0x105775(0x238),'path':_0x109a9c,'code':_0x454c51,'message':_0xa65449[_0x105775(0x296)],..._0x2a3f15&&{'location':_0x2a3f15}};});return{'valid':![],'errors':_0x2690cd,'warnings':[]};}function mapJourneyZodIssueToCode(_0x3378b2,_0xc91b18){const _0x5be1c3=a146_0x35cf;if(_0xc91b18==='name')return _0x5be1c3(0x210);if(_0xc91b18['endsWith'](_0x5be1c3(0x23e))&&_0xc91b18[_0x5be1c3(0x289)](_0x5be1c3(0x254)))return _0x5be1c3(0x28e);if(_0xc91b18===_0x5be1c3(0x28b)||_0xc91b18[_0x5be1c3(0x26a)](_0x5be1c3(0x245)))return _0x5be1c3(0x253);if(_0xc91b18===''&&_0x3378b2[_0x5be1c3(0x296)][_0x5be1c3(0x289)](_0x5be1c3(0x23a)))return _0x5be1c3(0x253);if(_0xc91b18[_0x5be1c3(0x289)](_0x5be1c3(0x214)))return _0x5be1c3(0x22c);return _0x5be1c3(0x28e);}function runJourneySemanticChecks(_0x3c91da,_0xd1bf2d){const _0x473dc4=a146_0x35cf,_0x3411b3=[],_0x4b5585=[];(!_0x3c91da['name']||_0x3c91da[_0x473dc4(0x220)][_0x473dc4(0x24b)]()==='')&&_0x3411b3['push']({'level':'error','path':_0x473dc4(0x220),'code':_0x473dc4(0x210),'message':_0x473dc4(0x288),'location':getLocationFromPath(_0xd1bf2d['document'],_0xd1bf2d[_0x473dc4(0x20b)],[_0x473dc4(0x220)])});const _0xabb59c=new Set();if(_0x3c91da['segments'])for(const _0x29a9a3 of Object[_0x473dc4(0x219)](_0x3c91da[_0x473dc4(0x28d)])){_0xabb59c[_0x473dc4(0x22a)](_0x29a9a3);}const _0x5998eb=new Set();if(_0x3c91da[_0x473dc4(0x240)])for(const _0x5598a8 of Object['keys'](_0x3c91da['activations'])){_0x5998eb['add'](_0x5598a8);}const _0x2e88a8=new Set(),_0x4af2f4={..._0xd1bf2d,'embeddedSegments':_0xabb59c,'referencedSegments':_0x2e88a8,'activationKeys':_0x5998eb[_0x473dc4(0x1f1)]>0x0?_0x5998eb:undefined};if(_0x3c91da[_0x473dc4(0x28d)])for(const [_0x30c404,_0xd47376]of Object['entries'](_0x3c91da['segments'])){const _0x1a7540=validateEmbeddedSegment(_0xd47376,'segments.'+_0x30c404,_0x4af2f4);for(const _0xc66331 of _0x1a7540){if(_0xc66331['level']==='error')_0x3411b3[_0x473dc4(0x227)](_0xc66331);else _0x4b5585['push'](_0xc66331);}}const _0x84fb73=!!_0x3c91da[_0x473dc4(0x1f9)],_0x173d43=_0x3c91da[_0x473dc4(0x1e5)]?.['every'](_0x5070b6=>!!_0x5070b6[_0x473dc4(0x1f9)])??![];!_0x84fb73&&!_0x173d43&&_0x4b5585[_0x473dc4(0x227)]({'level':'warning','path':'goal','code':'MISSING_GOAL','message':_0x473dc4(0x247),'location':getLocationFromPath(_0xd1bf2d[_0x473dc4(0x260)],_0xd1bf2d['source'],[_0x473dc4(0x1f9)])});const _0x3f2d71=_0x3c91da[_0x473dc4(0x1e5)]??_0x3c91da[_0x473dc4(0x1ec)];if(_0x3f2d71&&_0x3f2d71[_0x473dc4(0x249)](_0x2acaec=>_0x2acaec[_0x473dc4(0x28a)]===!![])[_0x473dc4(0x1e8)]>0x1){const _0xded1d5=_0x3c91da[_0x473dc4(0x1e5)]?_0x473dc4(0x1e5):_0x473dc4(0x1ec);_0x3411b3['push']({'level':_0x473dc4(0x238),'path':_0xded1d5,'code':_0x473dc4(0x26b),'message':_0x473dc4(0x24f)+(_0xded1d5==='journeys'?'journey\x20entry':'version')+_0x473dc4(0x250),'location':getLocationFromPath(_0xd1bf2d[_0x473dc4(0x260)],_0xd1bf2d[_0x473dc4(0x20b)],[_0xded1d5])});}if(_0x3c91da['journeys']&&_0x3c91da['journeys']['length']>0x0)for(let _0x5ddecd=0x0;_0x5ddecd<_0x3c91da[_0x473dc4(0x1e5)][_0x473dc4(0x1e8)];_0x5ddecd++){const _0x431314=_0x3c91da[_0x473dc4(0x1e5)][_0x5ddecd];if(_0x3c91da['journeys'][_0x473dc4(0x1e8)]>0x1&&_0x431314[_0x473dc4(0x277)]===_0x473dc4(0x282))continue;const _0x53af1d=_0x431314['stages']||[],_0x55e97c='journeys['+_0x5ddecd+'].',_0x318c4d=!!_0x431314['goal'],_0x27394e=_0x318c4d?{..._0x3c91da,'goal':_0x431314['goal']}:_0x3c91da;validateStagesForVersion(_0x53af1d,_0x27394e,_0x4af2f4,_0x55e97c,_0x3411b3,_0x4b5585,{'goalIsInherited':!_0x318c4d});}else{if(_0x3c91da['versions']&&_0x3c91da[_0x473dc4(0x1ec)][_0x473dc4(0x1e8)]>0x0)for(let _0x28f20e=0x0;_0x28f20e<_0x3c91da[_0x473dc4(0x1ec)]['length'];_0x28f20e++){const _0x2db78d=_0x3c91da[_0x473dc4(0x1ec)][_0x28f20e];if(_0x3c91da[_0x473dc4(0x1ec)]['length']>0x1&&_0x2db78d[_0x473dc4(0x277)]==='launched')continue;const _0x2b450d=_0x2db78d['stages']||[],_0x4a1bca=_0x473dc4(0x280)+_0x28f20e+'].';validateStagesForVersion(_0x2b450d,_0x3c91da,_0x4af2f4,_0x4a1bca,_0x3411b3,_0x4b5585);}else{const _0x290f9e=_0x3c91da[_0x473dc4(0x28b)]||[];validateStagesForVersion(_0x290f9e,_0x3c91da,_0x4af2f4,'',_0x3411b3,_0x4b5585);}}_0x3c91da['journeys']&&_0x3c91da[_0x473dc4(0x1e5)][_0x473dc4(0x1e8)]>0x1&&(deduplicateAcrossVersions(_0x3411b3),deduplicateAcrossVersions(_0x4b5585));for(const _0xd20c85 of _0xabb59c){!_0x2e88a8[_0x473dc4(0x21c)](_0xd20c85)&&!_0xd20c85[_0x473dc4(0x270)]('excluded_')&&_0x4b5585[_0x473dc4(0x227)]({'level':_0x473dc4(0x295),'path':'segments.'+_0xd20c85,'code':_0x473dc4(0x255),'message':_0x473dc4(0x206)+_0xd20c85+_0x473dc4(0x257),'location':getLocationFromPath(_0xd1bf2d[_0x473dc4(0x260)],_0xd1bf2d['source'],[_0x473dc4(0x28d),_0xd20c85])});}return{'valid':_0x3411b3[_0x473dc4(0x1e8)]===0x0,'errors':_0x3411b3,'warnings':_0x4b5585};}
|
|
1
|
+
(function(_0x2e7613,_0xebf8aa){const _0x2ef7dc=a146_0x5900,_0x145659=_0x2e7613();while(!![]){try{const _0x4a435f=parseInt(_0x2ef7dc(0x15f))/0x1*(parseInt(_0x2ef7dc(0x17c))/0x2)+parseInt(_0x2ef7dc(0x15a))/0x3+parseInt(_0x2ef7dc(0x1ae))/0x4*(parseInt(_0x2ef7dc(0x104))/0x5)+-parseInt(_0x2ef7dc(0x132))/0x6*(parseInt(_0x2ef7dc(0x188))/0x7)+parseInt(_0x2ef7dc(0x10e))/0x8+-parseInt(_0x2ef7dc(0x110))/0x9+-parseInt(_0x2ef7dc(0x17e))/0xa;if(_0x4a435f===_0xebf8aa)break;else _0x145659['push'](_0x145659['shift']());}catch(_0x3823aa){_0x145659['push'](_0x145659['shift']());}}}(a146_0x56e2,0x923f7));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x49dbf5,_0x1ed018,_0x40bef4,_0xecbcf2,_0x3667f8,_0x556f9f){const _0x1f1c7c=a146_0x5900;return{'level':_0x49dbf5,'path':_0x1ed018,'code':_0x40bef4,'message':_0xecbcf2,'location':getLocationFromPath(_0x3667f8[_0x1f1c7c(0x163)],_0x3667f8[_0x1f1c7c(0x175)],pathToArray(_0x556f9f??_0x1ed018))};}function validateVersionStructure(_0x372fef,_0x47699b){const _0x4bbe09=a146_0x5900,_0x4c5219=[];return _0x372fef[_0x4bbe09(0x166)]>MAX_STAGES&&_0x4c5219['push'](createIssue('error','stages',_0x4bbe09(0x100),_0x4bbe09(0x186)+_0x372fef[_0x4bbe09(0x166)]+_0x4bbe09(0x157)+MAX_STAGES,_0x47699b)),_0x4c5219;}function validateStageStructure(_0x2f4a0b,_0x2f4633,_0x26888b,_0x3fc2f3){const _0x58a12c=a146_0x5900,_0x2db63b=[],_0x26e991=_0x58a12c(0x19c)+_0x2f4633+']';_0x2f4633===0x0&&!_0x2f4a0b[_0x58a12c(0x129)]&&_0x2db63b[_0x58a12c(0x18c)](createIssue(_0x58a12c(0x155),_0x26e991+'.entry_criteria',_0x58a12c(0x145),_0x58a12c(0x17d)+_0x2f4a0b['name']+_0x58a12c(0x10b),_0x3fc2f3,_0x26e991));const _0x453588=_0x2f4633===_0x26888b-0x1;!_0x453588&&!_0x2f4a0b['milestone']&&_0x2db63b[_0x58a12c(0x18c)](createIssue(_0x58a12c(0x155),_0x26e991+_0x58a12c(0x1a5),'MISSING_MILESTONE',_0x58a12c(0x17d)+_0x2f4a0b['name']+_0x58a12c(0x1af),_0x3fc2f3,_0x26e991));(!_0x2f4a0b['exit_criteria']||_0x2f4a0b['exit_criteria']['length']===0x0)&&_0x2db63b[_0x58a12c(0x18c)](createIssue('warning',_0x26e991+_0x58a12c(0x181),_0x58a12c(0x119),_0x58a12c(0x17d)+_0x2f4a0b[_0x58a12c(0x11b)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x3fc2f3,_0x26e991));const _0x162e7a=_0x2f4a0b['steps']?.['length']??0x0;if(_0x162e7a===0x0)_0x2db63b[_0x58a12c(0x18c)](createIssue('error',_0x26e991+_0x58a12c(0x12c),'INSUFFICIENT_STEPS',_0x58a12c(0x17d)+_0x2f4a0b['name']+_0x58a12c(0x127),_0x3fc2f3,_0x26e991+'.steps'));else{if(_0x162e7a===0x1)_0x2db63b[_0x58a12c(0x18c)](createIssue('warning',_0x26e991+_0x58a12c(0x12c),'INSUFFICIENT_STEPS',_0x58a12c(0x17d)+_0x2f4a0b[_0x58a12c(0x11b)]+_0x58a12c(0x1b3),_0x3fc2f3,_0x26e991+'.steps'));else _0x162e7a<=0x3&&_0x2db63b[_0x58a12c(0x18c)](createIssue(_0x58a12c(0x177),_0x26e991+_0x58a12c(0x12c),_0x58a12c(0xf9),'Stage\x20\x27'+_0x2f4a0b[_0x58a12c(0x11b)]+_0x58a12c(0x102)+_0x162e7a+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x3fc2f3,_0x26e991+_0x58a12c(0x12c)));}return _0x2db63b;}function validateStep(_0x1591d6,_0x75c119,_0x82df24,_0x112d60){const _0x501ce8=a146_0x5900,_0x1f9589=[];if(_0x1591d6[_0x501ce8(0x193)]===_0x501ce8(0x180))return _0x1591d6[_0x501ce8(0x19f)]&&_0x1f9589[_0x501ce8(0x18c)](createIssue(_0x501ce8(0x155),_0x75c119+'.next',_0x501ce8(0x14d),'End\x20step\x20\x27'+_0x1591d6[_0x501ce8(0x11b)]+_0x501ce8(0x107),_0x82df24)),_0x501ce8(0x116)in _0x1591d6&&_0x1591d6[_0x501ce8(0x116)]!==undefined&&_0x1f9589[_0x501ce8(0x18c)](createIssue(_0x501ce8(0x155),_0x75c119+_0x501ce8(0x124),'END_STEP_HAS_NEXT_OR_WITH',_0x501ce8(0x139)+_0x1591d6[_0x501ce8(0x11b)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x82df24)),_0x1f9589;_0x1591d6[_0x501ce8(0x19f)]&&(_0x82df24[_0x501ce8(0x19d)]&&!_0x82df24[_0x501ce8(0x19d)]['has'](_0x1591d6[_0x501ce8(0x19f)])&&_0x1f9589[_0x501ce8(0x18c)](createIssue('error',_0x75c119+_0x501ce8(0x1a9),_0x501ce8(0x187),_0x501ce8(0x14a)+_0x1591d6[_0x501ce8(0x19f)]+'\x27',_0x82df24)));switch(_0x1591d6['type']){case'wait':_0x1f9589[_0x501ce8(0x18c)](...validateWaitStep(_0x1591d6,_0x75c119,_0x82df24,_0x112d60));break;case'activation':_0x1f9589['push'](...validateActivationStep(_0x1591d6,_0x75c119,_0x82df24));break;case'decision_point':_0x1f9589[_0x501ce8(0x18c)](...validateDecisionPointStep(_0x1591d6,_0x75c119,_0x82df24,_0x112d60));break;case _0x501ce8(0x158):_0x1f9589[_0x501ce8(0x18c)](...validateAbTestStep(_0x1591d6,_0x75c119,_0x82df24,_0x112d60));break;case _0x501ce8(0x16f):_0x1f9589[_0x501ce8(0x18c)](...validateJumpStep(_0x1591d6,_0x75c119,_0x82df24));break;}return _0x1f9589;}function validateWaitStep(_0x4ca968,_0x15cca0,_0x1919f4,_0x453dad){const _0x121c3a=a146_0x5900,_0x467253=[];if(!_0x4ca968[_0x121c3a(0x116)])return _0x467253[_0x121c3a(0x18c)](createIssue(_0x121c3a(0x155),_0x15cca0+_0x121c3a(0x124),_0x121c3a(0x179),_0x121c3a(0x14b),_0x1919f4,_0x15cca0)),_0x467253;if(_0x4ca968[_0x121c3a(0x116)][_0x121c3a(0x161)]){const _0x4575f4=_0x4ca968[_0x121c3a(0x116)][_0x121c3a(0x161)];if(_0x4575f4[_0x121c3a(0x1b0)]){_0x1919f4[_0x121c3a(0xfe)]?.[_0x121c3a(0x1a2)](_0x4575f4[_0x121c3a(0x1b0)]);!_0x4575f4['segment']['startsWith'](_0x121c3a(0x173))&&(_0x1919f4[_0x121c3a(0x18f)]&&!_0x1919f4[_0x121c3a(0x18f)][_0x121c3a(0x115)](_0x4575f4['segment'])&&_0x467253[_0x121c3a(0x18c)](createIssue(_0x121c3a(0x155),_0x15cca0+_0x121c3a(0x190),_0x121c3a(0x128),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x4575f4[_0x121c3a(0x1b0)]+_0x121c3a(0x1b2),_0x1919f4)));_0x4575f4['next']&&_0x1919f4[_0x121c3a(0x19d)]&&!_0x1919f4[_0x121c3a(0x19d)][_0x121c3a(0x115)](_0x4575f4[_0x121c3a(0x19f)])&&_0x467253[_0x121c3a(0x18c)](createIssue(_0x121c3a(0x155),_0x15cca0+_0x121c3a(0x178),_0x121c3a(0x187),_0x121c3a(0x150)+_0x4575f4['next']+'\x27',_0x1919f4));_0x4575f4[_0x121c3a(0x1ac)]?.[_0x121c3a(0x19f)]&&_0x1919f4['stepNames']&&!_0x1919f4[_0x121c3a(0x19d)]['has'](_0x4575f4[_0x121c3a(0x1ac)][_0x121c3a(0x19f)])&&_0x467253[_0x121c3a(0x18c)](createIssue(_0x121c3a(0x155),_0x15cca0+_0x121c3a(0x198),_0x121c3a(0x187),_0x121c3a(0x1a0)+_0x4575f4[_0x121c3a(0x1ac)]['next']+'\x27',_0x1919f4));const _0x482fdd=_0x4575f4[_0x121c3a(0x19f)]||_0x4ca968[_0x121c3a(0x19f)],_0x557457=_0x4575f4[_0x121c3a(0x1ac)]?.[_0x121c3a(0x19f)]||_0x4ca968[_0x121c3a(0x19f)];if(_0x482fdd){const _0x5d8cea=_0x453dad['get'](_0x482fdd);_0x5d8cea?.[_0x121c3a(0x193)]===_0x121c3a(0x192)&&_0x467253[_0x121c3a(0x18c)](createIssue(_0x121c3a(0x177),_0x15cca0+_0x121c3a(0x178),_0x121c3a(0x120),_0x121c3a(0x133)+_0x482fdd+_0x121c3a(0x13b),_0x1919f4,_0x15cca0+'.with.condition'));}if(_0x557457){const _0x208cce=_0x453dad[_0x121c3a(0x11f)](_0x557457);_0x208cce?.[_0x121c3a(0x193)]===_0x121c3a(0x192)&&_0x467253[_0x121c3a(0x18c)](createIssue(_0x121c3a(0x177),_0x15cca0+_0x121c3a(0x198),_0x121c3a(0x120),_0x121c3a(0x121)+_0x557457+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x1919f4,_0x15cca0+'.with.condition.timeout'));}}}return _0x467253;}function validateActivationStep(_0x46dbc3,_0x130287,_0x5d6bd1){const _0x2771f4=a146_0x5900,_0x34b3da=[];if(!_0x46dbc3[_0x2771f4(0x116)]?.[_0x2771f4(0x17b)])return _0x34b3da['push'](createIssue(_0x2771f4(0x155),_0x130287+'.with.activation',_0x2771f4(0x11c),_0x2771f4(0xfb),_0x5d6bd1,_0x130287)),_0x34b3da;const _0x27f0e0=_0x46dbc3[_0x2771f4(0x116)][_0x2771f4(0x17b)];return _0x5d6bd1[_0x2771f4(0x12f)]&&!_0x27f0e0[_0x2771f4(0x13a)](_0x2771f4(0x173))&&(!_0x5d6bd1[_0x2771f4(0x12f)]['has'](_0x27f0e0)&&_0x34b3da[_0x2771f4(0x18c)](createIssue(_0x2771f4(0x155),_0x130287+_0x2771f4(0x136),'MISSING_ACTIVATION_DEFINITION',_0x2771f4(0x11a)+_0x27f0e0+_0x2771f4(0xfd),_0x5d6bd1))),_0x34b3da;}function validateDecisionPointStep(_0x235bbf,_0x57887a,_0x600488,_0x5e60a7){const _0xacc452=a146_0x5900,_0x1ec4ea=[];if(!_0x235bbf[_0xacc452(0x116)]?.['branches']||_0x235bbf[_0xacc452(0x116)][_0xacc452(0x17a)][_0xacc452(0x166)]===0x0)return _0x1ec4ea[_0xacc452(0x18c)](createIssue(_0xacc452(0x155),_0x57887a+_0xacc452(0x189),'MISSING_CONDITIONS','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x600488,_0x57887a)),_0x1ec4ea;for(let _0x393b48=0x0;_0x393b48<_0x235bbf[_0xacc452(0x116)]['branches'][_0xacc452(0x166)];_0x393b48++){const _0x25f083=_0x235bbf[_0xacc452(0x116)][_0xacc452(0x17a)][_0x393b48],_0x2f5b5c=_0x57887a+_0xacc452(0x10d)+_0x393b48+']';_0x25f083[_0xacc452(0x1b0)]&&!_0x25f083[_0xacc452(0x14c)]&&(_0x600488[_0xacc452(0xfe)]?.[_0xacc452(0x1a2)](_0x25f083[_0xacc452(0x1b0)]),!_0x25f083[_0xacc452(0x1b0)]['startsWith'](_0xacc452(0x173))&&(_0x600488['embeddedSegments']&&!_0x600488[_0xacc452(0x18f)][_0xacc452(0x115)](_0x25f083[_0xacc452(0x1b0)])&&_0x1ec4ea[_0xacc452(0x18c)](createIssue(_0xacc452(0x155),_0x2f5b5c+'.segment','MISSING_SEGMENT_REFERENCE',_0xacc452(0x10c)+_0x25f083[_0xacc452(0x1b0)]+'\x27',_0x600488))));_0x25f083[_0xacc452(0x19f)]&&_0x600488[_0xacc452(0x19d)]&&!_0x600488[_0xacc452(0x19d)][_0xacc452(0x115)](_0x25f083[_0xacc452(0x19f)])&&_0x1ec4ea[_0xacc452(0x18c)](createIssue(_0xacc452(0x155),_0x2f5b5c+_0xacc452(0x1a9),_0xacc452(0x187),_0xacc452(0x196)+_0x25f083['next']+'\x27',_0x600488));if(_0x25f083[_0xacc452(0x19f)]){const _0x5426b2=_0x5e60a7[_0xacc452(0x11f)](_0x25f083['next']);_0x5426b2?.[_0xacc452(0x193)]===_0xacc452(0x192)&&_0x1ec4ea['push'](createIssue(_0xacc452(0x177),_0x2f5b5c+_0xacc452(0x1a9),'BRANCH_DIRECTLY_TO_MERGE',_0xacc452(0x153)+_0x25f083[_0xacc452(0x11b)]+_0xacc452(0x169)+_0x25f083['next']+_0xacc452(0x191),_0x600488));}}return _0x1ec4ea;}function validateAbTestStep(_0x21406c,_0x12f86e,_0x1a24b9,_0x12731f){const _0x5cdc47=a146_0x5900,_0x19191=[];if(!_0x21406c[_0x5cdc47(0x116)]?.[_0x5cdc47(0x130)]||_0x21406c['with'][_0x5cdc47(0x130)][_0x5cdc47(0x166)]===0x0)return _0x19191[_0x5cdc47(0x18c)](createIssue('error',_0x12f86e+_0x5cdc47(0x15d),_0x5cdc47(0x168),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x1a24b9,_0x12f86e)),_0x19191;const _0x473433=_0x21406c[_0x5cdc47(0x116)][_0x5cdc47(0x130)][_0x5cdc47(0x174)]((_0x1ca178,_0x4b6678)=>_0x1ca178+(_0x4b6678[_0x5cdc47(0x141)]||0x0),0x0);Math['abs'](_0x473433-0x64)>0.01&&_0x19191[_0x5cdc47(0x18c)](createIssue(_0x5cdc47(0x155),_0x12f86e+_0x5cdc47(0x15d),_0x5cdc47(0x1b1),_0x5cdc47(0x194)+_0x473433+'%)',_0x1a24b9));for(let _0x2e134f=0x0;_0x2e134f<_0x21406c['with'][_0x5cdc47(0x130)][_0x5cdc47(0x166)];_0x2e134f++){const _0x4eb0b4=_0x21406c[_0x5cdc47(0x116)][_0x5cdc47(0x130)][_0x2e134f],_0x40bdbf=_0x12f86e+'.with.variants['+_0x2e134f+']';_0x4eb0b4[_0x5cdc47(0x19f)]&&_0x1a24b9['stepNames']&&!_0x1a24b9[_0x5cdc47(0x19d)][_0x5cdc47(0x115)](_0x4eb0b4[_0x5cdc47(0x19f)])&&_0x19191['push'](createIssue(_0x5cdc47(0x155),_0x40bdbf+_0x5cdc47(0x1a9),'INVALID_NEXT_REFERENCE',_0x5cdc47(0x14f)+_0x4eb0b4['next']+'\x27',_0x1a24b9));if(_0x4eb0b4[_0x5cdc47(0x19f)]){const _0x18e9ed=_0x12731f[_0x5cdc47(0x11f)](_0x4eb0b4[_0x5cdc47(0x19f)]);_0x18e9ed?.[_0x5cdc47(0x193)]===_0x5cdc47(0x192)&&_0x19191[_0x5cdc47(0x18c)](createIssue(_0x5cdc47(0x177),_0x40bdbf+_0x5cdc47(0x1a9),_0x5cdc47(0x120),_0x5cdc47(0x118)+_0x4eb0b4[_0x5cdc47(0x11b)]+_0x5cdc47(0x169)+_0x4eb0b4[_0x5cdc47(0x19f)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x1a24b9));}}return _0x19191;}function validateJumpStep(_0x46fc77,_0x357070,_0x592cfb){const _0x4a2f2d=a146_0x5900,_0x16354f=[];if(!_0x46fc77['with']?.['target'])return _0x16354f[_0x4a2f2d(0x18c)](createIssue(_0x4a2f2d(0x155),_0x357070+_0x4a2f2d(0x137),_0x4a2f2d(0x18b),_0x4a2f2d(0x184),_0x592cfb,_0x357070)),_0x16354f;return(!_0x46fc77[_0x4a2f2d(0x116)][_0x4a2f2d(0x1a3)][_0x4a2f2d(0x1a8)]||!_0x46fc77[_0x4a2f2d(0x116)][_0x4a2f2d(0x1a3)]['stage'])&&_0x16354f['push'](createIssue('error',_0x357070+'.with.target',_0x4a2f2d(0x18b),_0x4a2f2d(0xfa),_0x592cfb)),_0x16354f;}function buildConvergenceMap(_0x403016){const _0x44a95c=a146_0x5900,_0x582c72=new Map();function _0x123e95(_0x3203aa,_0x2acc1e){const _0x20565c=a146_0x5900,_0x1cdfea=_0x582c72[_0x20565c(0x11f)](_0x3203aa)||[];_0x1cdfea[_0x20565c(0x18c)](_0x2acc1e),_0x582c72['set'](_0x3203aa,_0x1cdfea);}for(const _0x1a3c4b of _0x403016){_0x1a3c4b[_0x44a95c(0x19f)]&&_0x123e95(_0x1a3c4b[_0x44a95c(0x19f)],{'stepName':_0x1a3c4b[_0x44a95c(0x11b)],'description':_0x44a95c(0x13f)+_0x1a3c4b['name']+'\x27'});if(_0x1a3c4b[_0x44a95c(0x193)]===_0x44a95c(0x109)&&_0x1a3c4b[_0x44a95c(0x116)]?.[_0x44a95c(0x17a)])for(const _0x5aaeeb of _0x1a3c4b['with'][_0x44a95c(0x17a)]){_0x5aaeeb[_0x44a95c(0x19f)]&&_0x123e95(_0x5aaeeb[_0x44a95c(0x19f)],{'stepName':_0x1a3c4b[_0x44a95c(0x11b)],'description':'branch\x20\x27'+_0x5aaeeb[_0x44a95c(0x11b)]+_0x44a95c(0x151)+_0x1a3c4b[_0x44a95c(0x11b)]+'\x27'});}if(_0x1a3c4b[_0x44a95c(0x193)]===_0x44a95c(0x158)&&_0x1a3c4b['with']?.['variants'])for(const _0x3129de of _0x1a3c4b[_0x44a95c(0x116)][_0x44a95c(0x130)]){_0x3129de[_0x44a95c(0x19f)]&&_0x123e95(_0x3129de[_0x44a95c(0x19f)],{'stepName':_0x1a3c4b[_0x44a95c(0x11b)],'description':'variant\x20\x27'+_0x3129de[_0x44a95c(0x11b)]+_0x44a95c(0x151)+_0x1a3c4b[_0x44a95c(0x11b)]+'\x27'});}_0x1a3c4b['type']===_0x44a95c(0x108)&&_0x1a3c4b[_0x44a95c(0x116)]?.['condition']&&(_0x1a3c4b[_0x44a95c(0x116)][_0x44a95c(0x161)]['next']&&_0x123e95(_0x1a3c4b[_0x44a95c(0x116)]['condition']['next'],{'stepName':_0x1a3c4b[_0x44a95c(0x11b)],'description':_0x44a95c(0x16d)+_0x1a3c4b[_0x44a95c(0x11b)]+'\x27'}),_0x1a3c4b['with'][_0x44a95c(0x161)][_0x44a95c(0x1ac)]?.[_0x44a95c(0x19f)]&&_0x123e95(_0x1a3c4b[_0x44a95c(0x116)][_0x44a95c(0x161)][_0x44a95c(0x1ac)]['next'],{'stepName':_0x1a3c4b[_0x44a95c(0x11b)],'description':_0x44a95c(0x165)+_0x1a3c4b[_0x44a95c(0x11b)]+'\x27'}));}return _0x582c72;}function validateFlowControl(_0xb00446,_0x37f7b0,_0x3c8016){const _0x516e8d=a146_0x5900,_0x48f6e4=[],_0x59806e='stages['+_0x37f7b0+']',_0x580eab=_0xb00446[_0x516e8d(0x144)]||[];if(_0x580eab[_0x516e8d(0x166)]===0x0)return _0x48f6e4;const _0xaec813=new Map();for(const _0x51e72e of _0x580eab){_0x51e72e[_0x516e8d(0x11b)]&&_0xaec813[_0x516e8d(0x15e)](_0x51e72e['name'],_0x51e72e);}const _0x419bcc=buildConvergenceMap(_0x580eab),_0x520993=_0x580eab[_0x516e8d(0x1aa)](_0xd55ec=>_0xd55ec[_0x516e8d(0x193)]===_0x516e8d(0x180));!_0x520993&&_0x48f6e4[_0x516e8d(0x18c)](createIssue(_0x516e8d(0x155),_0x59806e+_0x516e8d(0x12c),_0x516e8d(0x146),_0x516e8d(0x17d)+_0xb00446[_0x516e8d(0x11b)]+_0x516e8d(0x16a),_0x3c8016));for(const [_0x3bf208,_0x31b08f]of _0x419bcc){const _0x488aa0=_0xaec813[_0x516e8d(0x11f)](_0x3bf208);if(!_0x488aa0)continue;if(_0x31b08f[_0x516e8d(0x166)]>0x1&&_0x488aa0[_0x516e8d(0x193)]!==_0x516e8d(0x192)){const _0xccfb21=_0x31b08f['map'](_0x5381da=>_0x5381da['description'])[_0x516e8d(0x172)](',\x20');_0x48f6e4['push'](createIssue('error',_0x59806e+_0x516e8d(0x12c),_0x516e8d(0x159),_0x516e8d(0x10a)+_0x3bf208+_0x516e8d(0x185)+_0xccfb21+_0x516e8d(0x131),_0x3c8016));}_0x31b08f[_0x516e8d(0x166)]===0x1&&_0x488aa0[_0x516e8d(0x193)]==='merge'&&_0x48f6e4[_0x516e8d(0x18c)](createIssue(_0x516e8d(0x177),_0x59806e+_0x516e8d(0x12c),_0x516e8d(0x18a),_0x516e8d(0x176)+_0x3bf208+_0x516e8d(0xfc)+_0x31b08f[0x0]['description']+').\x20Merge\x20is\x20unnecessary.',_0x3c8016));}for(const _0x43f94e of _0x580eab){if(_0x43f94e[_0x516e8d(0x193)]===_0x516e8d(0x192)&&_0x43f94e[_0x516e8d(0x19f)]){const _0x3d9f8c=_0xaec813[_0x516e8d(0x11f)](_0x43f94e[_0x516e8d(0x19f)]);_0x3d9f8c?.['type']===_0x516e8d(0x192)&&_0x48f6e4[_0x516e8d(0x18c)](createIssue('error',_0x59806e+_0x516e8d(0x12c),_0x516e8d(0x197),_0x516e8d(0x176)+_0x43f94e[_0x516e8d(0x11b)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x43f94e[_0x516e8d(0x19f)]+_0x516e8d(0x148),_0x3c8016));}}return _0x48f6e4;}function validateCriteria(_0x551af3,_0x2c2c82,_0x2f492c){const _0x555ba0=a146_0x5900,_0x42ca01=[];return _0x551af3[_0x555ba0(0x1b0)]&&(_0x2f492c[_0x555ba0(0xfe)]?.[_0x555ba0(0x1a2)](_0x551af3[_0x555ba0(0x1b0)]),!_0x551af3[_0x555ba0(0x1b0)][_0x555ba0(0x13a)](_0x555ba0(0x173))&&(_0x2f492c[_0x555ba0(0x18f)]&&!_0x2f492c[_0x555ba0(0x18f)]['has'](_0x551af3['segment'])&&_0x42ca01[_0x555ba0(0x18c)](createIssue(_0x555ba0(0x155),_0x2c2c82+_0x555ba0(0x142),_0x555ba0(0x128),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x551af3[_0x555ba0(0x1b0)]+'\x27',_0x2f492c)))),_0x42ca01;}function validateEmbeddedSegment(_0x4180d9,_0x58d573,_0x2ab01f){const _0x3be8b5=a146_0x5900,_0x2fa493=[];return _0x4180d9[_0x3be8b5(0x11d)]&&_0x2fa493[_0x3be8b5(0x18c)](...validateRuleDef(_0x4180d9[_0x3be8b5(0x11d)],_0x58d573+_0x3be8b5(0x105),_0x2ab01f)),_0x2fa493;}function validateStage(_0x154d16,_0xcebccc,_0x755ae2,_0x43407e){const _0x111839=a146_0x5900,_0x10ccbe=[],_0x25ce8e=_0x111839(0x19c)+_0xcebccc+']',_0x3f73b7=new Map(),_0x1e4c06=new Map();if(_0x154d16[_0x111839(0x144)]){for(let _0x145260=0x0;_0x145260<_0x154d16[_0x111839(0x144)][_0x111839(0x166)];_0x145260++){const _0x2df79c=_0x154d16[_0x111839(0x144)][_0x145260];_0x2df79c[_0x111839(0x11b)]&&_0x3f73b7['set'](_0x2df79c[_0x111839(0x11b)],_0x2df79c);}for(let _0x4fafba=0x0;_0x4fafba<_0x154d16[_0x111839(0x144)]['length'];_0x4fafba++){const _0x2dc1b9=_0x154d16[_0x111839(0x144)][_0x4fafba],_0x249ab9=_0x25ce8e+_0x111839(0x112)+_0x4fafba+']';if(_0x2dc1b9[_0x111839(0x11b)]){if(_0x1e4c06[_0x111839(0x115)](_0x2dc1b9['name'])){const _0x18bf54=_0x1e4c06[_0x111839(0x11f)](_0x2dc1b9[_0x111839(0x11b)]);_0x10ccbe[_0x111839(0x18c)](createIssue('error',_0x249ab9+_0x111839(0x19e),_0x111839(0x13d),_0x111839(0x12e)+_0x2dc1b9['name']+_0x111839(0x134)+_0x18bf54+'])',_0x43407e));}else _0x1e4c06[_0x111839(0x15e)](_0x2dc1b9[_0x111839(0x11b)],_0x4fafba);}_0x10ccbe[_0x111839(0x18c)](...validateStep(_0x2dc1b9,_0x249ab9,_0x43407e,_0x3f73b7));}}_0x154d16['entry_criteria']&&_0x10ccbe[_0x111839(0x18c)](...validateCriteria(_0x154d16[_0x111839(0x129)],_0x25ce8e+'.entry_criteria',_0x43407e));if(_0x154d16[_0x111839(0x125)])for(let _0x2cb77d=0x0;_0x2cb77d<_0x154d16[_0x111839(0x125)][_0x111839(0x166)];_0x2cb77d++){_0x10ccbe['push'](...validateCriteria(_0x154d16[_0x111839(0x125)][_0x2cb77d],_0x25ce8e+'.exit_criteria['+_0x2cb77d+']',_0x43407e));}return _0x154d16[_0x111839(0x17f)]&&_0x10ccbe['push'](...validateCriteria(_0x154d16['milestone'],_0x25ce8e+_0x111839(0x1a5),_0x43407e)),_0x10ccbe['push'](...validateStageStructure(_0x154d16,_0xcebccc,_0x755ae2,_0x43407e)),_0x10ccbe[_0x111839(0x18c)](...validateFlowControl(_0x154d16,_0xcebccc,_0x43407e)),_0x10ccbe;}function validateStagesForVersion(_0x5d9b32,_0x9390c5,_0x4ebc97,_0x3be264,_0x282d1c,_0x4a3054,_0xf53aa5){const _0x1d4b06=a146_0x5900;if(_0x5d9b32[_0x1d4b06(0x166)]===0x0){_0x282d1c[_0x1d4b06(0x18c)]({'level':_0x1d4b06(0x155),'path':_0x3be264+_0x1d4b06(0x170),'code':_0x1d4b06(0x149),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x4ebc97[_0x1d4b06(0x163)],_0x4ebc97['source'],[_0x1d4b06(0x170)])});return;}const _0x2a3992=new Set();for(const _0x23ee8c of _0x5d9b32){if(_0x23ee8c[_0x1d4b06(0x144)])for(const _0x38d0e5 of _0x23ee8c[_0x1d4b06(0x144)]){_0x38d0e5['name']&&_0x2a3992[_0x1d4b06(0x1a2)](_0x38d0e5[_0x1d4b06(0x11b)]);}}const _0x226189={..._0x4ebc97,'stepNames':_0x2a3992},_0x834c37=validateVersionStructure(_0x5d9b32,_0x226189);for(const _0x3cf258 of _0x834c37){const _0x28ac68=_0x3be264?{..._0x3cf258,'path':''+_0x3be264+_0x3cf258['path']}:_0x3cf258;if(_0x28ac68[_0x1d4b06(0x14e)]==='error')_0x282d1c[_0x1d4b06(0x18c)](_0x28ac68);else _0x4a3054['push'](_0x28ac68);}for(let _0x23343c=0x0;_0x23343c<_0x5d9b32['length'];_0x23343c++){const _0x324c48=validateStage(_0x5d9b32[_0x23343c],_0x23343c,_0x5d9b32['length'],_0x226189);for(const _0x27d1ea of _0x324c48){const _0x5b7ab0=_0x3be264?{..._0x27d1ea,'path':''+_0x3be264+_0x27d1ea['path']}:_0x27d1ea;if(_0x5b7ab0[_0x1d4b06(0x14e)]===_0x1d4b06(0x155))_0x282d1c['push'](_0x5b7ab0);else _0x4a3054[_0x1d4b06(0x18c)](_0x5b7ab0);}}if(_0x9390c5['goal']){const _0x19ec9a=_0xf53aa5?.[_0x1d4b06(0x154)]?_0x1d4b06(0x12d):_0x3be264+_0x1d4b06(0x12d),_0x53096f=validateCriteria(_0x9390c5[_0x1d4b06(0x12d)],_0x19ec9a,_0x226189);for(const _0x32ce6c of _0x53096f){if(_0x32ce6c[_0x1d4b06(0x14e)]===_0x1d4b06(0x155))_0x282d1c[_0x1d4b06(0x18c)](_0x32ce6c);else _0x4a3054[_0x1d4b06(0x18c)](_0x32ce6c);}}}function a146_0x56e2(){const _0x6be5e0=['activation','601958PFlWWs','Stage\x20\x27','11779280ZFFUNw','milestone','end','.exit_criteria','excluded_','includes','Jump\x20step\x20requires\x20a\x20target','\x27\x20(from:\x20','Journey\x20has\x20','INVALID_NEXT_REFERENCE','706055kogQRz','.with.branches','SINGLE_INPUT_MERGE','INVALID_JUMP_TARGET','push','versions','sort','embeddedSegments','.with.condition.segment','\x27\x20with\x20no\x20action\x20in\x20between','merge','type','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','journey\x20entry','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MERGE_TO_MERGE_CHAIN','.with.condition.timeout.next','path','\x20with\x20latest:\x20true','success','stages[','stepNames','.name','next','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','replace','add','target','code','.milestone','data','keys','journey','.next','some','symbol','timeout','ACTIVATION_SCHEMA_ERROR','16232eynWsv','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','segment','INVALID_AB_TEST_PERCENTAGES','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','FEW_STEPS','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','Activation\x20step\x20requires\x20an\x20activation\x20reference','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','referencedSegments','latest','TOO_MANY_STAGES','issues','\x27\x20has\x20only\x20','MISSING_GOAL','995nzFUWc','.rule','versions[','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','wait','decision_point','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','.with.branches[','8704872UilHzX','journeys[','4043286zBfxuk','\x20versions)','.steps[','journeys,\x20stages,\x20or\x20versions','filter','has','with','.stages','A/B\x20test\x20variant\x20\x27','MISSING_EXIT_CRITERIA','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','name','MISSING_ACTIVATION_REF','rule','values','get','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','endsWith','DUPLICATE_LATEST','.with','exit_criteria','MISSING_NAME','\x27\x20has\x20no\x20steps','MISSING_SEGMENT_REFERENCE','entry_criteria','version','launched','.steps','goal','Duplicate\x20step\x20name\x20\x27','activationKeys','variants',').\x20Use\x20a\x20merge\x20step.','42xYtzQS','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20(first\x20defined\x20at\x20steps[','map','.with.activation','.with.target','segments.','End\x20step\x20\x27','startsWith','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Journey\x20has\x20no\x20goal\x20defined','DUPLICATE_STEP_NAME','Journey\x20can\x20have\x20at\x20most\x20one\x20','step\x20\x27','splice','percentage','.segment','safeParse','steps','MISSING_ENTRY_CRITERIA','MISSING_END_STEP','message','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','MISSING_STAGES','Step\x20references\x20non-existent\x20step\x20\x27','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','excluded','END_STEP_HAS_NEXT_OR_WITH','level','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','\x27\x20of\x20\x27','journeys','Decision\x20branch\x20\x27','goalIsInherited','error','Journey\x20name\x20is\x20required','\x20stages\x20but\x20maximum\x20is\x20','ab_test','CONVERGENCE_WITHOUT_MERGE','401040Ybdozo','segments','state','.with.variants','set','3TAjqlD','size','condition','match','document','.type','timeout\x20of\x20\x27','length','trim','MISSING_CONDITIONS','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20no\x20end\x20step','indices','Embedded\x20segment\x20\x27','condition\x20of\x20\x27','\x20(across\x20','jump','stages','JOURNEY_SCHEMA_ERROR','join','ref:','reduce','source','Merge\x20step\x20\x27','warning','.with.condition.next','MISSING_WAIT_PARAMS','branches'];a146_0x56e2=function(){return _0x6be5e0;};return a146_0x56e2();}function extractVersionIndex(_0x314adb){const _0xfa69ba=a146_0x5900,_0x34b7a9=_0x314adb[_0xfa69ba(0x162)](/^journeys\[(\d+)\]\./);return _0x34b7a9?_0x34b7a9[0x1]:undefined;}function deduplicateAcrossVersions(_0x1a8f4d){const _0x249e42=a146_0x5900,_0x1bbae=new Map();for(let _0x2e1a31=0x0;_0x2e1a31<_0x1a8f4d[_0x249e42(0x166)];_0x2e1a31++){const _0x31c462=_0x1a8f4d[_0x2e1a31][_0x249e42(0x1a4)]+':'+_0x1a8f4d[_0x2e1a31][_0x249e42(0x147)],_0x47659d=extractVersionIndex(_0x1a8f4d[_0x2e1a31][_0x249e42(0x199)]),_0x1dc73b=_0x1bbae[_0x249e42(0x11f)](_0x31c462);if(_0x1dc73b){_0x1dc73b[_0x249e42(0x16b)][_0x249e42(0x18c)](_0x2e1a31);if(_0x47659d)_0x1dc73b[_0x249e42(0x18d)][_0x249e42(0x1a2)](_0x47659d);}else _0x1bbae['set'](_0x31c462,{'indices':[_0x2e1a31],'versions':new Set(_0x47659d?[_0x47659d]:[])});}const _0x2e71ed=new Set();for(const {indices:_0x2a44c0,versions:_0x15d021}of _0x1bbae[_0x249e42(0x11e)]()){if(_0x15d021['size']<=0x1)continue;const _0x51a516=_0x1a8f4d[_0x2a44c0[0x0]];_0x51a516[_0x249e42(0x199)]=_0x51a516[_0x249e42(0x199)][_0x249e42(0x1a1)](/^journeys\[\d+\]\./,''),_0x51a516['message']=_0x51a516[_0x249e42(0x147)]+_0x249e42(0x16e)+_0x15d021['size']+_0x249e42(0x111);for(let _0xa7f18e=0x1;_0xa7f18e<_0x2a44c0[_0x249e42(0x166)];_0xa7f18e++){_0x2e71ed[_0x249e42(0x1a2)](_0x2a44c0[_0xa7f18e]);}}const _0x5860f8=[..._0x2e71ed][_0x249e42(0x18e)]((_0x1b480b,_0x1eac6a)=>_0x1eac6a-_0x1b480b);for(const _0x58f3e0 of _0x5860f8){_0x1a8f4d[_0x249e42(0x140)](_0x58f3e0,0x1);}}export function validateJourneyDef(_0x477024,_0x24220f={},_0x1c4f0b={}){const _0x894a69=a146_0x5900;if(_0x1c4f0b['skipSchema'])return runJourneySemanticChecks(_0x477024,_0x24220f);const _0x55d0ca=JourneyDefSchema[_0x894a69(0x143)](_0x477024);if(_0x55d0ca[_0x894a69(0x19b)])return runJourneySemanticChecks(_0x55d0ca[_0x894a69(0x1a6)],_0x24220f);return zodErrorsToJourneyValidationResult(_0x55d0ca[_0x894a69(0x155)],_0x24220f);}function a146_0x5900(_0x34e239,_0x56ba97){_0x34e239=_0x34e239-0xf9;const _0x56e28e=a146_0x56e2();let _0x590080=_0x56e28e[_0x34e239];return _0x590080;}function zodErrorsToJourneyValidationResult(_0x3004ef,_0x3b9983){const _0x1ab2c0=a146_0x5900,_0xd33d37=flattenZodIssues(_0x3004ef[_0x1ab2c0(0x101)]),_0x4bd384=_0xd33d37[_0x1ab2c0(0x135)](_0x4b2afc=>{const _0x2eb0ab=_0x1ab2c0,_0xded23d=formatZodPath(_0x4b2afc[_0x2eb0ab(0x199)]),_0x4e332b=mapJourneyZodIssueToCode(_0x4b2afc,_0xded23d),_0x4712b1=getLocationFromPath(_0x3b9983[_0x2eb0ab(0x163)],_0x3b9983[_0x2eb0ab(0x175)],_0x4b2afc[_0x2eb0ab(0x199)][_0x2eb0ab(0x135)](_0x4e454e=>typeof _0x4e454e===_0x2eb0ab(0x1ab)?String(_0x4e454e):_0x4e454e));return{'level':_0x2eb0ab(0x155),'path':_0xded23d,'code':_0x4e332b,'message':_0x4b2afc[_0x2eb0ab(0x147)],..._0x4712b1&&{'location':_0x4712b1}};});return{'valid':![],'errors':_0x4bd384,'warnings':[]};}function mapJourneyZodIssueToCode(_0x35c45d,_0x2cb326){const _0x5e49ae=a146_0x5900;if(_0x2cb326===_0x5e49ae(0x11b))return _0x5e49ae(0x126);if(_0x2cb326[_0x5e49ae(0x122)](_0x5e49ae(0x164))&&_0x2cb326[_0x5e49ae(0x183)](_0x5e49ae(0x144)))return _0x5e49ae(0x171);if(_0x2cb326===_0x5e49ae(0x170)||_0x2cb326[_0x5e49ae(0x122)](_0x5e49ae(0x117)))return'MISSING_STAGES';if(_0x2cb326===''&&_0x35c45d[_0x5e49ae(0x147)][_0x5e49ae(0x183)](_0x5e49ae(0x113)))return _0x5e49ae(0x149);if(_0x2cb326[_0x5e49ae(0x183)]('activation'))return _0x5e49ae(0x1ad);return _0x5e49ae(0x171);}function runJourneySemanticChecks(_0x283c22,_0x2d2f3d){const _0x3beeb4=a146_0x5900,_0x389d25=[],_0x428a54=[];(!_0x283c22['name']||_0x283c22[_0x3beeb4(0x11b)][_0x3beeb4(0x167)]()==='')&&_0x389d25[_0x3beeb4(0x18c)]({'level':_0x3beeb4(0x155),'path':'name','code':_0x3beeb4(0x126),'message':_0x3beeb4(0x156),'location':getLocationFromPath(_0x2d2f3d[_0x3beeb4(0x163)],_0x2d2f3d[_0x3beeb4(0x175)],[_0x3beeb4(0x11b)])});const _0x15b24d=new Set();if(_0x283c22[_0x3beeb4(0x15b)])for(const _0x1bde98 of Object[_0x3beeb4(0x1a7)](_0x283c22['segments'])){_0x15b24d[_0x3beeb4(0x1a2)](_0x1bde98);}const _0x37dd6c=new Set();if(_0x283c22['activations'])for(const _0x424594 of Object[_0x3beeb4(0x1a7)](_0x283c22['activations'])){_0x37dd6c[_0x3beeb4(0x1a2)](_0x424594);}const _0x4f75c5=new Set(),_0x2ea463={..._0x2d2f3d,'embeddedSegments':_0x15b24d,'referencedSegments':_0x4f75c5,'activationKeys':_0x37dd6c[_0x3beeb4(0x160)]>0x0?_0x37dd6c:undefined};if(_0x283c22[_0x3beeb4(0x15b)])for(const [_0xa0a0e7,_0x56beac]of Object['entries'](_0x283c22['segments'])){const _0x1daa73=validateEmbeddedSegment(_0x56beac,_0x3beeb4(0x138)+_0xa0a0e7,_0x2ea463);for(const _0x282a82 of _0x1daa73){if(_0x282a82[_0x3beeb4(0x14e)]==='error')_0x389d25['push'](_0x282a82);else _0x428a54[_0x3beeb4(0x18c)](_0x282a82);}}const _0x23028=!!_0x283c22['goal'],_0x51d319=_0x283c22[_0x3beeb4(0x152)]?.['every'](_0x936084=>!!_0x936084[_0x3beeb4(0x12d)])??![];!_0x23028&&!_0x51d319&&_0x428a54[_0x3beeb4(0x18c)]({'level':_0x3beeb4(0x177),'path':_0x3beeb4(0x12d),'code':_0x3beeb4(0x103),'message':_0x3beeb4(0x13c),'location':getLocationFromPath(_0x2d2f3d[_0x3beeb4(0x163)],_0x2d2f3d['source'],[_0x3beeb4(0x12d)])});const _0x466e58=_0x283c22[_0x3beeb4(0x152)]??_0x283c22['versions'];if(_0x466e58&&_0x466e58[_0x3beeb4(0x114)](_0x3b64d0=>_0x3b64d0[_0x3beeb4(0xff)]===!![])[_0x3beeb4(0x166)]>0x1){const _0x5c35fc=_0x283c22[_0x3beeb4(0x152)]?_0x3beeb4(0x152):_0x3beeb4(0x18d);_0x389d25[_0x3beeb4(0x18c)]({'level':_0x3beeb4(0x155),'path':_0x5c35fc,'code':_0x3beeb4(0x123),'message':_0x3beeb4(0x13e)+(_0x5c35fc===_0x3beeb4(0x152)?_0x3beeb4(0x195):_0x3beeb4(0x12a))+_0x3beeb4(0x19a),'location':getLocationFromPath(_0x2d2f3d[_0x3beeb4(0x163)],_0x2d2f3d[_0x3beeb4(0x175)],[_0x5c35fc])});}if(_0x283c22['journeys']&&_0x283c22[_0x3beeb4(0x152)][_0x3beeb4(0x166)]>0x0)for(let _0x4468a1=0x0;_0x4468a1<_0x283c22[_0x3beeb4(0x152)][_0x3beeb4(0x166)];_0x4468a1++){const _0x6e9b0b=_0x283c22[_0x3beeb4(0x152)][_0x4468a1];if(_0x283c22[_0x3beeb4(0x152)]['length']>0x1&&_0x6e9b0b[_0x3beeb4(0x15c)]===_0x3beeb4(0x12b))continue;const _0x4b33a7=_0x6e9b0b[_0x3beeb4(0x170)]||[],_0x47c83c=_0x3beeb4(0x10f)+_0x4468a1+'].',_0x4dc964=!!_0x6e9b0b[_0x3beeb4(0x12d)],_0x299023=_0x4dc964?{..._0x283c22,'goal':_0x6e9b0b[_0x3beeb4(0x12d)]}:_0x283c22;validateStagesForVersion(_0x4b33a7,_0x299023,_0x2ea463,_0x47c83c,_0x389d25,_0x428a54,{'goalIsInherited':!_0x4dc964});}else{if(_0x283c22[_0x3beeb4(0x18d)]&&_0x283c22[_0x3beeb4(0x18d)]['length']>0x0)for(let _0x435fc0=0x0;_0x435fc0<_0x283c22[_0x3beeb4(0x18d)][_0x3beeb4(0x166)];_0x435fc0++){const _0x5987f0=_0x283c22[_0x3beeb4(0x18d)][_0x435fc0];if(_0x283c22[_0x3beeb4(0x18d)][_0x3beeb4(0x166)]>0x1&&_0x5987f0[_0x3beeb4(0x15c)]===_0x3beeb4(0x12b))continue;const _0x2a583e=_0x5987f0[_0x3beeb4(0x170)]||[],_0x38f8b1=_0x3beeb4(0x106)+_0x435fc0+'].';validateStagesForVersion(_0x2a583e,_0x283c22,_0x2ea463,_0x38f8b1,_0x389d25,_0x428a54);}else{const _0x50dfc5=_0x283c22[_0x3beeb4(0x170)]||[];validateStagesForVersion(_0x50dfc5,_0x283c22,_0x2ea463,'',_0x389d25,_0x428a54);}}_0x283c22[_0x3beeb4(0x152)]&&_0x283c22[_0x3beeb4(0x152)][_0x3beeb4(0x166)]>0x1&&(deduplicateAcrossVersions(_0x389d25),deduplicateAcrossVersions(_0x428a54));for(const _0x5b8d74 of _0x15b24d){!_0x4f75c5[_0x3beeb4(0x115)](_0x5b8d74)&&!_0x5b8d74['startsWith'](_0x3beeb4(0x182))&&_0x428a54['push']({'level':_0x3beeb4(0x177),'path':_0x3beeb4(0x138)+_0x5b8d74,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x3beeb4(0x16c)+_0x5b8d74+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x2d2f3d['document'],_0x2d2f3d[_0x3beeb4(0x175)],[_0x3beeb4(0x15b),_0x5b8d74])});}return{'valid':_0x389d25['length']===0x0,'errors':_0x389d25,'warnings':_0x428a54};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a147_0x72352b=a147_0x4b77;(function(_0x107e7c,_0x128e9){const _0x59063e=a147_0x4b77,_0x1ec80a=_0x107e7c();while(!![]){try{const _0x188800=-parseInt(_0x59063e(0x1b6))/0x1+-parseInt(_0x59063e(0x207))/0x2*(-parseInt(_0x59063e(0x1b5))/0x3)+parseInt(_0x59063e(0x1f3))/0x4+parseInt(_0x59063e(0x18e))/0x5*(-parseInt(_0x59063e(0x17f))/0x6)+parseInt(_0x59063e(0x174))/0x7*(parseInt(_0x59063e(0x1ee))/0x8)+parseInt(_0x59063e(0x162))/0x9+-parseInt(_0x59063e(0x1f7))/0xa;if(_0x188800===_0x128e9)break;else _0x1ec80a['push'](_0x1ec80a['shift']());}catch(_0x33e3d0){_0x1ec80a['push'](_0x1ec80a['shift']());}}}(a147_0x5651,0x617cd));import*as a147_0x5aff14 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(_0x2cbb7c){const _0x570ed4=a147_0x4b77,_0x11458b=_0x2cbb7c[_0x570ed4(0x205)]();if(_0x11458b===_0x570ed4(0x1e6)||_0x11458b===_0x570ed4(0x15a))return _0x570ed4(0x15a);if(_0x11458b===_0x570ed4(0x1d9)||_0x11458b===_0x570ed4(0x186))return _0x570ed4(0x186);return _0x2cbb7c;}export function journeyResponseToDefSync(_0x4ac118){const _0x519c36=a147_0x4b77,_0x4c6869=_0x4ac118['attributes'],_0xbf9331=_0x4c6869['journeyBundleName']||_0x4c6869[_0x519c36(0x19b)],_0x5ead9b={'stages':_0x4c6869['journeyStages']['map'](convertApiStageToYaml),'id':_0x4ac118['id']};_0x4c6869[_0x519c36(0x202)]&&(_0x5ead9b['goal']=convertApiCriteriaToYaml(_0x4c6869['goal']));_0x4c6869[_0x519c36(0x19b)]&&_0x4c6869[_0x519c36(0x19b)]!==_0xbf9331&&(_0x5ead9b['version']=_0x4c6869['name']);_0x4c6869[_0x519c36(0x1d0)]!==undefined&&(_0x5ead9b['version_number']=_0x4c6869['versionNumber']);_0x4c6869[_0x519c36(0x1ec)]&&(_0x5ead9b[_0x519c36(0x1ec)]=_0x4c6869[_0x519c36(0x1ec)]===_0x519c36(0x181)?_0x519c36(0x181):_0x519c36(0x185));const _0xd9a7d5={'type':_0x519c36(0x1da),'name':_0xbf9331,'journeys':[_0x5ead9b]};_0x4c6869['description']&&(_0xd9a7d5[_0x519c36(0x1a8)]=_0x4c6869[_0x519c36(0x1a8)]);_0x4c6869[_0x519c36(0x202)]&&(_0xd9a7d5[_0x519c36(0x202)]=convertApiCriteriaToYaml(_0x4c6869[_0x519c36(0x202)]));if(_0x4c6869[_0x519c36(0x19a)])_0xd9a7d5[_0x519c36(0x193)]=_0x4c6869[_0x519c36(0x19a)];else _0x4c6869[_0x519c36(0x199)]!==undefined&&(_0xd9a7d5[_0x519c36(0x193)]=_0x4c6869[_0x519c36(0x199)]?_0x519c36(0x1ea):_0x519c36(0x151));return _0x4c6869[_0x519c36(0x1ed)]&&(_0xd9a7d5[_0x519c36(0x148)]=_0x4c6869[_0x519c36(0x1ed)]),_0x4c6869[_0x519c36(0x198)]&&(_0xd9a7d5[_0x519c36(0x208)]=_0x4c6869[_0x519c36(0x198)]),_0x4ac118[_0x519c36(0x1f4)]?.[_0x519c36(0x189)]?.[_0x519c36(0x1a9)]?.['id']&&(_0xd9a7d5['folder_id']=_0x4ac118[_0x519c36(0x1f4)][_0x519c36(0x189)][_0x519c36(0x1a9)]['id']),_0xd9a7d5;}export async function journeyResponseToDef(_0x2bc84d,_0x2a1675){const _0x4b24f0=a147_0x4b77,_0x28a7c8=journeyResponseToDefSync(_0x2bc84d);if(!_0x2a1675)return _0x28a7c8;const _0x18626a=new Set();collectSegmentIdsFromJourney(_0x28a7c8,_0x18626a);const _0x542450=new Set();collectActivationIdsFromJourney(_0x28a7c8,_0x542450);const _0x1448eb={},_0x22fc16=new Map();for(const _0x18c576 of Array[_0x4b24f0(0x176)](_0x18626a)[_0x4b24f0(0x1ab)]()){if(_0x2a1675[_0x4b24f0(0x18c)]){const _0x373dcd=await _0x2a1675[_0x4b24f0(0x18c)](_0x18c576);if(_0x373dcd[_0x4b24f0(0x14e)]){_0x22fc16[_0x4b24f0(0x158)](_0x18c576,_0x373dcd[_0x4b24f0(0x19b)]);if(_0x373dcd[_0x4b24f0(0x1b4)]){const _0x711b9a={..._0x373dcd['definition'],'rule':deepSortObject(_0x373dcd[_0x4b24f0(0x1b4)][_0x4b24f0(0x209)])};_0x1448eb[_0x373dcd[_0x4b24f0(0x19b)]]=_0x711b9a;}}else _0x22fc16[_0x4b24f0(0x158)](_0x18c576,makeSegmentRef(_0x373dcd[_0x4b24f0(0x19b)]));}else{if(_0x2a1675[_0x4b24f0(0x14c)]){const _0x38834d=await _0x2a1675[_0x4b24f0(0x14c)](_0x18c576);_0x22fc16[_0x4b24f0(0x158)](_0x18c576,_0x38834d);}}}const _0x4f82d1={},_0x37c589=new Map();for(const _0x19f68e of Array[_0x4b24f0(0x176)](_0x542450)[_0x4b24f0(0x1ab)]()){if(_0x2a1675[_0x4b24f0(0x1b7)]){const _0x4dd148=await _0x2a1675[_0x4b24f0(0x1b7)](_0x19f68e);_0x4dd148[_0x4b24f0(0x14e)]?(_0x37c589[_0x4b24f0(0x158)](_0x19f68e,_0x4dd148['name']),_0x4dd148['definition']&&(_0x4f82d1[_0x4dd148['name']]=_0x4dd148[_0x4b24f0(0x1b4)])):_0x37c589[_0x4b24f0(0x158)](_0x19f68e,makeSegmentRef(_0x4dd148[_0x4b24f0(0x19b)]));}else{if(_0x2a1675[_0x4b24f0(0x15b)]){const _0x48832c=await _0x2a1675[_0x4b24f0(0x15b)](_0x19f68e);_0x37c589[_0x4b24f0(0x158)](_0x19f68e,_0x48832c);}}}_0x22fc16[_0x4b24f0(0x1c5)]>0x0&&replaceSegmentIdsInJourney(_0x28a7c8,_0x22fc16);_0x37c589[_0x4b24f0(0x1c5)]>0x0&&replaceActivationIdsInJourney(_0x28a7c8,_0x37c589);if(_0x2a1675[_0x4b24f0(0x1e5)]){const _0x34b037=[];collectJumpTargetsFromJourney(_0x28a7c8,_0x34b037);if(_0x34b037[_0x4b24f0(0x16c)]>0x0){const _0x391acc=new Map();for(const _0x3541c3 of _0x34b037){try{const _0x5af402=await _0x2a1675[_0x4b24f0(0x1e5)](_0x3541c3['journeyId'],_0x3541c3[_0x4b24f0(0x1ac)]);_0x391acc[_0x4b24f0(0x158)](_0x3541c3[_0x4b24f0(0x152)]+':'+_0x3541c3['stageId'],_0x5af402);}catch{}}_0x391acc[_0x4b24f0(0x1c5)]>0x0&&replaceJumpTargetsInJourney(_0x28a7c8,_0x391acc);}}return Object[_0x4b24f0(0x1ff)](_0x1448eb)['length']>0x0&&(_0x28a7c8[_0x4b24f0(0x1e4)]=_0x1448eb),Object['keys'](_0x4f82d1)[_0x4b24f0(0x16c)]>0x0&&(_0x28a7c8[_0x4b24f0(0x16a)]=_0x4f82d1),_0x28a7c8;}function collectSegmentIdsFromJourney(_0x4071f1,_0x179c2e){const _0x563b77=a147_0x4b77;_0x4071f1['goal']?.[_0x563b77(0x1bb)]&&_0x179c2e[_0x563b77(0x161)](_0x4071f1[_0x563b77(0x202)]['segment']);const _0x57cd69=_0x2487b4=>{const _0x1b19af=_0x563b77;for(const _0x1bacbc of _0x2487b4){_0x1bacbc['entry_criteria']?.[_0x1b19af(0x1bb)]&&_0x179c2e[_0x1b19af(0x161)](_0x1bacbc['entry_criteria'][_0x1b19af(0x1bb)]);if(_0x1bacbc[_0x1b19af(0x1e3)])for(const _0x2a612f of _0x1bacbc[_0x1b19af(0x1e3)]){_0x2a612f[_0x1b19af(0x1bb)]&&_0x179c2e['add'](_0x2a612f[_0x1b19af(0x1bb)]);}_0x1bacbc[_0x1b19af(0x1a2)]?.[_0x1b19af(0x1bb)]&&_0x179c2e[_0x1b19af(0x161)](_0x1bacbc[_0x1b19af(0x1a2)][_0x1b19af(0x1bb)]);if(_0x1bacbc[_0x1b19af(0x1ca)])for(const _0x57caa1 of _0x1bacbc[_0x1b19af(0x1ca)]){if(_0x57caa1['type']===_0x1b19af(0x173)){const _0xa34f20=_0x57caa1;for(const _0x500a75 of _0xa34f20[_0x1b19af(0x197)][_0x1b19af(0x1be)]){_0x500a75['segment']&&_0x179c2e['add'](_0x500a75[_0x1b19af(0x1bb)]);}}else{if(_0x57caa1['type']==='wait'){const _0x5c0438=_0x57caa1;_0x5c0438['with']['condition']?.[_0x1b19af(0x1bb)]&&_0x179c2e[_0x1b19af(0x161)](_0x5c0438['with'][_0x1b19af(0x17a)]['segment']);}}}}};if(_0x4071f1[_0x563b77(0x1d6)])for(const _0x1d3e39 of _0x4071f1['journeys']){_0x1d3e39[_0x563b77(0x202)]?.[_0x563b77(0x1bb)]&&_0x179c2e['add'](_0x1d3e39[_0x563b77(0x202)][_0x563b77(0x1bb)]),_0x57cd69(_0x1d3e39[_0x563b77(0x1d2)]);}_0x4071f1['stages']&&_0x57cd69(_0x4071f1['stages']);if(_0x4071f1['versions'])for(const _0x513119 of _0x4071f1[_0x563b77(0x19d)]){_0x57cd69(_0x513119[_0x563b77(0x1d2)]);}}function replaceSegmentIdsInJourney(_0x1db164,_0x32782b){const _0x89796c=a147_0x4b77,_0x43ee39=_0x48574f=>_0x32782b[_0x89796c(0x18a)](_0x48574f)||_0x48574f;_0x1db164[_0x89796c(0x202)]?.[_0x89796c(0x1bb)]&&(_0x1db164[_0x89796c(0x202)][_0x89796c(0x1bb)]=_0x43ee39(_0x1db164[_0x89796c(0x202)]['segment']));const _0x13ece5=_0x47db3e=>{const _0xdf7b7b=_0x89796c;for(const _0x187ae2 of _0x47db3e){_0x187ae2[_0xdf7b7b(0x19e)]?.['segment']&&(_0x187ae2[_0xdf7b7b(0x19e)][_0xdf7b7b(0x1bb)]=_0x43ee39(_0x187ae2[_0xdf7b7b(0x19e)][_0xdf7b7b(0x1bb)]));if(_0x187ae2[_0xdf7b7b(0x1e3)])for(const _0x101924 of _0x187ae2[_0xdf7b7b(0x1e3)]){_0x101924['segment']&&(_0x101924['segment']=_0x43ee39(_0x101924[_0xdf7b7b(0x1bb)]));}_0x187ae2[_0xdf7b7b(0x1a2)]?.[_0xdf7b7b(0x1bb)]&&(_0x187ae2['milestone'][_0xdf7b7b(0x1bb)]=_0x43ee39(_0x187ae2[_0xdf7b7b(0x1a2)][_0xdf7b7b(0x1bb)]));if(_0x187ae2[_0xdf7b7b(0x1ca)])for(const _0x1faec6 of _0x187ae2[_0xdf7b7b(0x1ca)]){if(_0x1faec6[_0xdf7b7b(0x178)]===_0xdf7b7b(0x173)){const _0x42a09b=_0x1faec6;for(const _0xd266cd of _0x42a09b[_0xdf7b7b(0x197)][_0xdf7b7b(0x1be)]){_0xd266cd['segment']&&(_0xd266cd[_0xdf7b7b(0x1bb)]=_0x43ee39(_0xd266cd[_0xdf7b7b(0x1bb)]));}}else{if(_0x1faec6['type']===_0xdf7b7b(0x1c0)){const _0x149dea=_0x1faec6;_0x149dea['with'][_0xdf7b7b(0x17a)]?.[_0xdf7b7b(0x1bb)]&&(_0x149dea[_0xdf7b7b(0x197)][_0xdf7b7b(0x17a)][_0xdf7b7b(0x1bb)]=_0x43ee39(_0x149dea[_0xdf7b7b(0x197)][_0xdf7b7b(0x17a)][_0xdf7b7b(0x1bb)]));}}}}};if(_0x1db164['journeys'])for(const _0x849397 of _0x1db164[_0x89796c(0x1d6)]){_0x849397[_0x89796c(0x202)]?.['segment']&&(_0x849397['goal'][_0x89796c(0x1bb)]=_0x43ee39(_0x849397['goal']['segment'])),_0x13ece5(_0x849397[_0x89796c(0x1d2)]);}_0x1db164[_0x89796c(0x1d2)]&&_0x13ece5(_0x1db164['stages']);if(_0x1db164[_0x89796c(0x19d)])for(const _0x2b47ec of _0x1db164[_0x89796c(0x19d)]){_0x13ece5(_0x2b47ec[_0x89796c(0x1d2)]);}}function collectActivationIdsFromJourney(_0x3c098e,_0x419593){const _0x427d39=a147_0x4b77,_0x5e14db=_0x339077=>{const _0xdcf5a4=a147_0x4b77;for(const _0x522685 of _0x339077){if(_0x522685['steps'])for(const _0x105b4d of _0x522685[_0xdcf5a4(0x1ca)]){if(_0x105b4d[_0xdcf5a4(0x178)]===_0xdcf5a4(0x1b0)){const _0x115fa6=_0x105b4d;_0x115fa6[_0xdcf5a4(0x197)][_0xdcf5a4(0x1b0)]&&/^\d+$/[_0xdcf5a4(0x1dd)](_0x115fa6[_0xdcf5a4(0x197)][_0xdcf5a4(0x1b0)])&&_0x419593['add'](_0x115fa6['with'][_0xdcf5a4(0x1b0)]);}}}};if(_0x3c098e[_0x427d39(0x1d6)])for(const _0x5ef48f of _0x3c098e[_0x427d39(0x1d6)]){_0x5e14db(_0x5ef48f[_0x427d39(0x1d2)]);}_0x3c098e['stages']&&_0x5e14db(_0x3c098e[_0x427d39(0x1d2)]);if(_0x3c098e[_0x427d39(0x19d)])for(const _0x6fd002 of _0x3c098e[_0x427d39(0x19d)]){_0x5e14db(_0x6fd002[_0x427d39(0x1d2)]);}}function replaceActivationIdsInJourney(_0x517f29,_0x670925){const _0x39085a=a147_0x4b77,_0x5b8d57=_0x4b3681=>_0x670925[_0x39085a(0x18a)](_0x4b3681)||_0x4b3681,_0x344f1a=_0x27f13f=>{const _0x2d47e6=_0x39085a;for(const _0x348cb2 of _0x27f13f){if(_0x348cb2['steps'])for(const _0x505149 of _0x348cb2[_0x2d47e6(0x1ca)]){if(_0x505149[_0x2d47e6(0x178)]===_0x2d47e6(0x1b0)){const _0x1b8b5e=_0x505149;_0x1b8b5e[_0x2d47e6(0x197)]['activation']&&(_0x1b8b5e[_0x2d47e6(0x197)][_0x2d47e6(0x1b0)]=_0x5b8d57(_0x1b8b5e[_0x2d47e6(0x197)][_0x2d47e6(0x1b0)]));}}}};if(_0x517f29['journeys'])for(const _0x1aa2a0 of _0x517f29[_0x39085a(0x1d6)]){_0x344f1a(_0x1aa2a0[_0x39085a(0x1d2)]);}_0x517f29[_0x39085a(0x1d2)]&&_0x344f1a(_0x517f29[_0x39085a(0x1d2)]);if(_0x517f29[_0x39085a(0x19d)])for(const _0x2c63bf of _0x517f29[_0x39085a(0x19d)]){_0x344f1a(_0x2c63bf[_0x39085a(0x1d2)]);}}function collectJumpTargetsFromJourney(_0x385f64,_0x5cf9d0){const _0x1afe3f=a147_0x4b77,_0x3def70=new Set(),_0x166f03=_0x22a8a2=>{const _0x31fd4f=a147_0x4b77;for(const _0x501e68 of _0x22a8a2){if(_0x501e68[_0x31fd4f(0x1ca)])for(const _0x5f44b9 of _0x501e68[_0x31fd4f(0x1ca)]){if(_0x5f44b9['type']==='jump'){const _0x53bcd4=_0x5f44b9,_0x4d9f56=_0x53bcd4['with'][_0x31fd4f(0x195)];if(_0x4d9f56[_0x31fd4f(0x1da)]&&_0x4d9f56[_0x31fd4f(0x1ce)]&&/^\d+$/[_0x31fd4f(0x1dd)](_0x4d9f56[_0x31fd4f(0x1da)])&&/^\d+$/['test'](_0x4d9f56['stage'])){const _0x248766=_0x4d9f56[_0x31fd4f(0x1da)]+':'+_0x4d9f56[_0x31fd4f(0x1ce)];!_0x3def70[_0x31fd4f(0x1ad)](_0x248766)&&(_0x3def70[_0x31fd4f(0x161)](_0x248766),_0x5cf9d0[_0x31fd4f(0x1cd)]({'journeyId':_0x4d9f56[_0x31fd4f(0x1da)],'stageId':_0x4d9f56[_0x31fd4f(0x1ce)]}));}}}}};if(_0x385f64[_0x1afe3f(0x1d6)])for(const _0xb53788 of _0x385f64[_0x1afe3f(0x1d6)]){_0x166f03(_0xb53788[_0x1afe3f(0x1d2)]);}_0x385f64[_0x1afe3f(0x1d2)]&&_0x166f03(_0x385f64[_0x1afe3f(0x1d2)]);if(_0x385f64['versions'])for(const _0x4f08c9 of _0x385f64[_0x1afe3f(0x19d)]){_0x166f03(_0x4f08c9['stages']);}}function a147_0x5651(){const _0x40794a=['steps','slice','stageName','push','stage','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','versionNumber','resolveJourneyId','stages','version','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','journeyActivationStepId','journeys','resolveEmbeddedActivationId','waitStepUnit','weeks','journey','embedded','notification','test','journeyName','entries','variants','First\x20stage\x20of\x20the\x20journey','reentry:','exit_criteria','segments','resolveJumpTarget','days','null','ABTest','goal:','reentry_always','ref','state','journeyBundleId','3864040KAzOnR','resolveEmbeddedSegmentId','shift','DecisionPoint','And','588220kHNXNI','relationships','percentage','resolveActivationId','13441150UKPGTr','version_number','Variant','isArray','startsWith','waitStepType','DaysOfTheWeek','activation_template_id','keys','replace','schedule','goal','object','exitCriterias','toLowerCase','wait_until','158LaKcbL','bundle_name','rule','excludedPath','timedOutPath','versions:','bundle_id','all','\x20\x20\x20\x20type:\x20And\x0a','Send\x20Notification','resolveSegmentName','connector_config','isJourneyLocal','waitStep','waitUntilDate','no_reentry','journeyId','*Max\x20wait\x20','all_columns','waitCondition','duration','timeout','set','trim','day','resolveActivationName','merge','find','segment_id','folder_id','stages:','add','5986791iwTPeS','journeyStageId','conditionSegmentId','\x27:\x20','root_step','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','unique_id','filter','activations','excluded','length','conditionTimeoutDuration','resolveSegmentId','ref:','customized_split','End','JOURNEY_SYNTAX_ERROR','decision_point','7bIlTBc','Merge','from','conditions','type','\x27.\x0a','condition','goal-segment','daysOfWeek','activations:','latest','6bkOFNk','rootStep','launched','includes','attributes','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','draft','week','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','segmentId','parentFolder','get','map','resolveSegment','ab_test','1035565vBibJE','Date','days_of_week','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','Expected\x20format:\x0a','reentry','your-activation-name','target','conditionTimeoutUnit','with','journeyBundleName','allowReentry','reentryMode','name','moveAfter','versions','entry_criteria','values','journeyStages','journeys:','milestone','resolveStageId','Jump','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','next','entryCriteria','description','data','Journey\x20description','sort','stageId','has','end','Unknown\x20segment\x20\x22','activation','jump','\x20\x20rule:\x0a','stringify','definition','25335odLVfi','11877lJGOjE','resolveActivation','Activation','unit','connection','segment','randomUUID','behavior','branches','Condition','wait','customizedSplit','WaitStep','Duration','exitCriteria','size','(missing)','columns','\x20\x20\x20\x20type:\x20','Wait\x201\x20Day'];a147_0x5651=function(){return _0x40794a;};return a147_0x5651();}function replaceJumpTargetsInJourney(_0x48011c,_0x36be1a){const _0x541c5f=a147_0x4b77,_0x4603a5=_0x573370=>{const _0x45a427=a147_0x4b77;for(const _0x4bedbc of _0x573370){if(_0x4bedbc[_0x45a427(0x1ca)])for(const _0x2351d8 of _0x4bedbc['steps']){if(_0x2351d8[_0x45a427(0x178)]===_0x45a427(0x1b1)){const _0x2d04b7=_0x2351d8,_0x226e53=_0x2d04b7[_0x45a427(0x197)][_0x45a427(0x195)],_0x1b71cd=_0x226e53[_0x45a427(0x1da)]+':'+_0x226e53[_0x45a427(0x1ce)],_0x5866c5=_0x36be1a[_0x45a427(0x18a)](_0x1b71cd);_0x5866c5&&(_0x226e53[_0x45a427(0x1da)]=_0x5866c5['journeyName'],_0x226e53[_0x45a427(0x1ce)]=_0x5866c5[_0x45a427(0x1cc)]);}}}};if(_0x48011c[_0x541c5f(0x1d6)])for(const _0x548646 of _0x48011c[_0x541c5f(0x1d6)]){_0x4603a5(_0x548646[_0x541c5f(0x1d2)]);}_0x48011c['stages']&&_0x4603a5(_0x48011c[_0x541c5f(0x1d2)]);if(_0x48011c['versions'])for(const _0x27f8ad of _0x48011c[_0x541c5f(0x19d)]){_0x4603a5(_0x27f8ad[_0x541c5f(0x1d2)]);}}function generateReadableStepName(_0x1b2ce1,_0x108eaa){const _0x213d66=a147_0x4b77;if(_0x1b2ce1[_0x213d66(0x19b)]&&_0x1b2ce1[_0x213d66(0x19b)]!==_0x1b2ce1[_0x213d66(0x178)]){const _0x2b34e8=_0x1b2ce1['name']['trim']();if(_0x2b34e8&&/[a-z0-9\p{L}]/iu[_0x213d66(0x1dd)](_0x2b34e8))return _0x2b34e8;}const _0x1f4c10=_0x1b2ce1['type']['toLowerCase']()[_0x213d66(0x200)](/step$/i,'');return _0x1f4c10+'_'+(_0x108eaa+0x1);}function getStepNextRefs(_0x1935fd){const _0x1d6ea2=a147_0x4b77,_0x546c88=[];if(_0x1935fd[_0x1d6ea2(0x1a6)])_0x546c88[_0x1d6ea2(0x1cd)](_0x1935fd[_0x1d6ea2(0x1a6)]);if(_0x1935fd[_0x1d6ea2(0x1be)])for(const _0x2208b7 of _0x1935fd['branches']){if(_0x2208b7[_0x1d6ea2(0x1a6)])_0x546c88['push'](_0x2208b7[_0x1d6ea2(0x1a6)]);}if(_0x1935fd[_0x1d6ea2(0x1e0)])for(const _0x15651e of _0x1935fd[_0x1d6ea2(0x1e0)]){if(_0x15651e[_0x1d6ea2(0x1a6)])_0x546c88[_0x1d6ea2(0x1cd)](_0x15651e[_0x1d6ea2(0x1a6)]);}if(_0x1935fd[_0x1d6ea2(0x177)])for(const _0x56226e of _0x1935fd[_0x1d6ea2(0x177)]){if(_0x56226e[_0x1d6ea2(0x1a6)])_0x546c88[_0x1d6ea2(0x1cd)](_0x56226e[_0x1d6ea2(0x1a6)]);}return _0x546c88;}function parseJumpTargetDisplayName(_0x225e9b){const _0x5b9e63=a147_0x4b77,_0xd98125=_0x225e9b['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0xd98125)return undefined;const _0x515b69=_0xd98125[0x1]['trim'](),_0x2118d3=_0xd98125[0x2][_0x5b9e63(0x159)]();if(!_0x515b69||!_0x2118d3)return undefined;return{'stageName':_0x515b69,'journeyName':_0x2118d3};}function orderStepsFromRoot(_0x37f20b,_0x41acbc){const _0x240268=a147_0x4b77,_0x2c999c=Object[_0x240268(0x1df)](_0x37f20b);if(_0x2c999c['length']===0x0)return[];const _0x24e8d6=new Set(_0x2c999c[_0x240268(0x18b)](([_0x31651b])=>_0x31651b)),_0x5a5da2=new Set();for(const [,_0x553706]of _0x2c999c){for(const _0x5894da of getStepNextRefs(_0x553706)){if(_0x24e8d6[_0x240268(0x1ad)](_0x5894da))_0x5a5da2['add'](_0x5894da);}}let _0x1471fa=_0x41acbc&&_0x24e8d6[_0x240268(0x1ad)](_0x41acbc)?_0x41acbc:undefined;if(!_0x1471fa){const _0x38bdeb=_0x2c999c[_0x240268(0x169)](([_0x175589])=>!_0x5a5da2['has'](_0x175589));_0x38bdeb[_0x240268(0x16c)]>0x0?_0x1471fa=_0x38bdeb[0x0][0x0]:_0x1471fa=_0x2c999c[0x0][0x0];}const _0x1288ec=[],_0x55eef1=new Set(),_0x4a64f5=[_0x1471fa];while(_0x4a64f5[_0x240268(0x16c)]>0x0){const _0x70081=_0x4a64f5[_0x240268(0x1f0)]();if(_0x55eef1[_0x240268(0x1ad)](_0x70081))continue;_0x55eef1[_0x240268(0x161)](_0x70081);const _0x564f08=_0x37f20b[_0x70081];if(!_0x564f08)continue;_0x1288ec[_0x240268(0x1cd)]({'uuid':_0x70081,'step':_0x564f08});for(const _0x180930 of getStepNextRefs(_0x564f08)){_0x24e8d6[_0x240268(0x1ad)](_0x180930)&&!_0x55eef1[_0x240268(0x1ad)](_0x180930)&&_0x4a64f5[_0x240268(0x1cd)](_0x180930);}}for(const [_0xf1216c,_0x4bc18d]of _0x2c999c){!_0x55eef1['has'](_0xf1216c)&&_0x1288ec[_0x240268(0x1cd)]({'uuid':_0xf1216c,'step':_0x4bc18d});}return _0x1288ec;}function resolveStepReferences(_0xbe0918,_0x2a0835,_0x42704f,_0x597a36){const _0x32f1eb=a147_0x4b77;if(_0xbe0918[_0x32f1eb(0x178)]!==_0x32f1eb(0x1ae)){_0xbe0918['next']&&_0x597a36[_0x32f1eb(0x1ad)](_0xbe0918[_0x32f1eb(0x1a6)])&&(_0xbe0918[_0x32f1eb(0x1a6)]=_0x597a36['get'](_0xbe0918[_0x32f1eb(0x1a6)]));const _0x3b0bf0=_0x2a0835+0x1;if(_0x3b0bf0<_0x42704f[_0x32f1eb(0x16c)]){const _0x38fe2a=_0x597a36[_0x32f1eb(0x18a)](_0x42704f[_0x3b0bf0]['uuid']);_0xbe0918[_0x32f1eb(0x1a6)]===_0x38fe2a&&delete _0xbe0918['next'];}}if(_0xbe0918[_0x32f1eb(0x178)]===_0x32f1eb(0x173))for(const _0x4f9181 of _0xbe0918[_0x32f1eb(0x197)]['branches']){_0x4f9181[_0x32f1eb(0x1a6)]&&_0x597a36[_0x32f1eb(0x1ad)](_0x4f9181[_0x32f1eb(0x1a6)])&&(_0x4f9181[_0x32f1eb(0x1a6)]=_0x597a36[_0x32f1eb(0x18a)](_0x4f9181[_0x32f1eb(0x1a6)]));}if(_0xbe0918[_0x32f1eb(0x178)]===_0x32f1eb(0x18d))for(const _0x4b0b6b of _0xbe0918[_0x32f1eb(0x197)][_0x32f1eb(0x1e0)]){_0x4b0b6b['next']&&_0x597a36[_0x32f1eb(0x1ad)](_0x4b0b6b[_0x32f1eb(0x1a6)])&&(_0x4b0b6b['next']=_0x597a36['get'](_0x4b0b6b[_0x32f1eb(0x1a6)]));}if(_0xbe0918[_0x32f1eb(0x178)]==='wait'&&_0xbe0918[_0x32f1eb(0x197)][_0x32f1eb(0x17a)]){const _0x3c34d5=_0xbe0918['with'][_0x32f1eb(0x17a)];_0x3c34d5['next']&&_0x597a36['has'](_0x3c34d5['next'])&&(_0x3c34d5['next']=_0x597a36['get'](_0x3c34d5[_0x32f1eb(0x1a6)])),_0x3c34d5[_0x32f1eb(0x157)]?.['next']&&_0x597a36[_0x32f1eb(0x1ad)](_0x3c34d5[_0x32f1eb(0x157)][_0x32f1eb(0x1a6)])&&(_0x3c34d5[_0x32f1eb(0x157)][_0x32f1eb(0x1a6)]=_0x597a36[_0x32f1eb(0x18a)](_0x3c34d5[_0x32f1eb(0x157)][_0x32f1eb(0x1a6)]));}}function convertApiStageToYaml(_0x3d2c27){const _0x2a36b3=a147_0x4b77,_0xe91d5={'name':_0x3d2c27[_0x2a36b3(0x19b)]};_0x3d2c27['id']&&(_0xe91d5['id']=_0x3d2c27['id']);_0x3d2c27[_0x2a36b3(0x1a8)]&&(_0xe91d5[_0x2a36b3(0x1a8)]=_0x3d2c27['description']);_0x3d2c27['entryCriteria']&&(_0xe91d5['entry_criteria']=convertApiCriteriaToYaml(_0x3d2c27[_0x2a36b3(0x1a7)]));_0x3d2c27[_0x2a36b3(0x204)]&&_0x3d2c27[_0x2a36b3(0x204)][_0x2a36b3(0x16c)]>0x0&&(_0xe91d5[_0x2a36b3(0x1e3)]=_0x3d2c27['exitCriterias']['map'](convertApiCriteriaToYaml));_0x3d2c27[_0x2a36b3(0x1a2)]&&(_0xe91d5['milestone']=convertApiCriteriaToYaml(_0x3d2c27[_0x2a36b3(0x1a2)]));if(_0x3d2c27[_0x2a36b3(0x1ca)]&&Object[_0x2a36b3(0x1ff)](_0x3d2c27[_0x2a36b3(0x1ca)])['length']>0x0){const _0x37fbdf=orderStepsFromRoot(_0x3d2c27[_0x2a36b3(0x1ca)],_0x3d2c27['rootStep']),_0x411fc8=new Map(),_0x2a4672=new Set();for(let _0x130829=0x0;_0x130829<_0x37fbdf[_0x2a36b3(0x16c)];_0x130829++){const {uuid:_0x74b5c,step:_0x45a331}=_0x37fbdf[_0x130829];let _0x3bb4a5=generateReadableStepName(_0x45a331,_0x130829),_0x1bd3a2=_0x3bb4a5,_0x5d0c53=0x2;while(_0x2a4672[_0x2a36b3(0x1ad)](_0x1bd3a2)){_0x1bd3a2=_0x3bb4a5+'_'+_0x5d0c53,_0x5d0c53++;}_0x2a4672[_0x2a36b3(0x161)](_0x1bd3a2),_0x411fc8[_0x2a36b3(0x158)](_0x74b5c,_0x1bd3a2);}_0xe91d5[_0x2a36b3(0x1ca)]=_0x37fbdf['map'](({uuid:_0x44df87,step:_0x568b1c},_0x483747)=>{const _0x43774f=_0x2a36b3,_0xba75b7=convertApiStepToYaml(_0x568b1c,_0x411fc8[_0x43774f(0x18a)](_0x44df87));return resolveStepReferences(_0xba75b7,_0x483747,_0x37fbdf,_0x411fc8),_0xba75b7;});}return _0xe91d5;}function convertApiCriteriaToYaml(_0x2dafb5){const _0x38454a=a147_0x4b77,_0x8ca789={'name':_0x2dafb5[_0x38454a(0x19b)],'segment':_0x2dafb5[_0x38454a(0x188)]};_0x2dafb5['description']&&(_0x8ca789[_0x38454a(0x1a8)]=_0x2dafb5[_0x38454a(0x1a8)]);if(_0x2dafb5[_0x38454a(0x195)]){let _0x397add=_0x2dafb5[_0x38454a(0x195)][_0x38454a(0x152)],_0x5e8fa8=_0x2dafb5[_0x38454a(0x195)][_0x38454a(0x163)];if(_0x2dafb5['target'][_0x38454a(0x1de)]){const _0x4ac88a=parseJumpTargetDisplayName(_0x2dafb5[_0x38454a(0x195)][_0x38454a(0x1de)]);_0x4ac88a&&(_0x5e8fa8=_0x4ac88a[_0x38454a(0x1cc)],_0x397add=_0x4ac88a[_0x38454a(0x1de)]);}_0x8ca789[_0x38454a(0x195)]={'journey':_0x397add,'stage':_0x5e8fa8},_0x2dafb5[_0x38454a(0x195)]['journeyBundleId']&&(_0x8ca789['target'][_0x38454a(0x148)]=_0x2dafb5[_0x38454a(0x195)]['journeyBundleId']);}return _0x8ca789;}function convertApiStepToYaml(_0xe4d3af,_0x1649bd){const _0x43575e=a147_0x4b77;switch(_0xe4d3af[_0x43575e(0x178)]){case _0x43575e(0x1c2):{const _0x3536e3={};if(_0xe4d3af['waitStepType']===_0x43575e(0x1c3)&&_0xe4d3af[_0x43575e(0x14f)]!==undefined)_0x3536e3[_0x43575e(0x156)]=_0xe4d3af[_0x43575e(0x14f)],_0x3536e3[_0x43575e(0x1b9)]=_0xe4d3af[_0x43575e(0x1d8)];else{if(_0xe4d3af['waitStepType']===_0x43575e(0x18f)&&_0xe4d3af[_0x43575e(0x150)])_0x3536e3[_0x43575e(0x206)]=_0xe4d3af['waitUntilDate'];else{if(_0xe4d3af['waitStepType']===_0x43575e(0x1fd)&&_0xe4d3af[_0x43575e(0x17c)])_0x3536e3[_0x43575e(0x190)]=_0xe4d3af[_0x43575e(0x17c)];else{if(_0xe4d3af['waitStepType']===_0x43575e(0x1bf)){if(_0xe4d3af[_0x43575e(0x177)]&&_0xe4d3af[_0x43575e(0x177)][_0x43575e(0x16c)]>0x0){const _0x14e278=_0xe4d3af[_0x43575e(0x177)][_0x43575e(0x15d)](_0x5a371d=>!_0x5a371d[_0x43575e(0x146)]),_0x5acfc5=_0xe4d3af[_0x43575e(0x177)]['find'](_0x4a097a=>_0x4a097a[_0x43575e(0x146)]);_0x14e278?.[_0x43575e(0x188)]&&(_0x3536e3[_0x43575e(0x17a)]={'segment':_0x14e278[_0x43575e(0x188)],..._0x14e278[_0x43575e(0x1a6)]?{'next':_0x14e278[_0x43575e(0x1a6)]}:{}},_0x5acfc5&&_0x5acfc5[_0x43575e(0x19c)]!==undefined&&_0x5acfc5[_0x43575e(0x1b9)]&&(_0x3536e3['condition']['timeout']={'duration':_0x5acfc5[_0x43575e(0x19c)],'unit':_0x5acfc5[_0x43575e(0x1b9)],..._0x5acfc5['next']?{'next':_0x5acfc5[_0x43575e(0x1a6)]}:{}}));}else _0xe4d3af['conditionSegmentId']&&(_0x3536e3['condition']={'segment':_0xe4d3af['conditionSegmentId']},_0xe4d3af[_0x43575e(0x16d)]!==undefined&&_0xe4d3af[_0x43575e(0x196)]&&(_0x3536e3[_0x43575e(0x17a)]['timeout']={'duration':_0xe4d3af[_0x43575e(0x16d)],'unit':_0xe4d3af[_0x43575e(0x196)]}));}}}}const _0x12aa8c={'type':_0x43575e(0x1c0),'name':_0x1649bd,..._0xe4d3af[_0x43575e(0x1a6)]?{'next':_0xe4d3af[_0x43575e(0x1a6)]}:{},'with':_0x3536e3};return _0x12aa8c;}case'Activation':{const _0x1385b9={'type':_0x43575e(0x1b0),'name':_0x1649bd,..._0xe4d3af[_0x43575e(0x1a6)]?{'next':_0xe4d3af['next']}:{},'with':{'activation':_0xe4d3af[_0x43575e(0x1d5)]||''}};return _0x1385b9;}case _0x43575e(0x1f1):{const _0x3ed13a={'type':_0x43575e(0x173),'name':_0x1649bd,..._0xe4d3af[_0x43575e(0x1a6)]?{'next':_0xe4d3af[_0x43575e(0x1a6)]}:{},'with':{'branches':(_0xe4d3af[_0x43575e(0x1be)]||[])[_0x43575e(0x18b)](_0x913ddd=>({'name':_0x913ddd[_0x43575e(0x19b)],'segment':_0x913ddd['segmentId'],'excluded':_0x913ddd[_0x43575e(0x20a)],..._0x913ddd[_0x43575e(0x1a6)]?{'next':_0x913ddd[_0x43575e(0x1a6)]}:{}}))}};return _0x3ed13a;}case _0x43575e(0x1e8):case'AbTest':case _0x43575e(0x1f9):{const _0x2bd00a=_0xe4d3af[_0x43575e(0x1e0)]||(_0xe4d3af[_0x43575e(0x1be)]||[])['map'](_0x294bb2=>({'name':_0x294bb2[_0x43575e(0x19b)],'percentage':0x0,'next':_0x294bb2[_0x43575e(0x1a6)]})),_0x4aa308={'type':_0x43575e(0x18d),'name':_0x1649bd,..._0xe4d3af['next']?{'next':_0xe4d3af[_0x43575e(0x1a6)]}:{},'with':{'customized_split':_0xe4d3af[_0x43575e(0x1c1)],'unique_id':_0xe4d3af['uniqueId'],'variants':_0x2bd00a[_0x43575e(0x18b)](_0x5428b4=>({'name':_0x5428b4['name'],'percentage':_0x5428b4['percentage'],..._0x5428b4[_0x43575e(0x1a6)]?{'next':_0x5428b4['next']}:{}}))}};return _0x4aa308;}case _0x43575e(0x175):{const _0x32e89b={'type':_0x43575e(0x15c),'name':_0x1649bd,..._0xe4d3af[_0x43575e(0x1a6)]?{'next':_0xe4d3af['next']}:{}};return _0x32e89b;}case'Jump':{let _0x3c0801='',_0x364f4a='',_0x49e367;if(_0xe4d3af[_0x43575e(0x195)]){_0x3c0801=_0xe4d3af[_0x43575e(0x195)][_0x43575e(0x152)],_0x364f4a=_0xe4d3af[_0x43575e(0x195)][_0x43575e(0x163)],_0x49e367=_0xe4d3af[_0x43575e(0x195)][_0x43575e(0x1ed)];if(_0xe4d3af[_0x43575e(0x195)]['journeyName']){const _0x545917=parseJumpTargetDisplayName(_0xe4d3af[_0x43575e(0x195)][_0x43575e(0x1de)]);_0x545917&&(_0x364f4a=_0x545917[_0x43575e(0x1cc)],_0x3c0801=_0x545917[_0x43575e(0x1de)]);}}const _0x5e8034={'type':_0x43575e(0x1b1),'name':_0x1649bd,..._0xe4d3af[_0x43575e(0x1a6)]?{'next':_0xe4d3af['next']}:{},'with':{'target':{'journey':_0x3c0801,'stage':_0x364f4a,..._0x49e367?{'bundle_id':_0x49e367}:{}}}};return _0x5e8034;}case _0x43575e(0x171):{const _0x21c7b8={'type':_0x43575e(0x1ae),'name':_0x1649bd};return _0x21c7b8;}default:{const _0x9bf6a4={'type':_0x43575e(0x1ae),'name':_0x1649bd};return _0x9bf6a4;}}}export async function journeyDefToRequest(_0x546d49,_0x6794aa,_0x54f620){const _0x35c222=a147_0x4b77,_0x3ff655=_0x546d49[_0x35c222(0x1d2)]||getActiveStages(_0x546d49),_0x16c8c3=isJourneysArrayMode(_0x546d49)||isMultiVersionMode(_0x546d49)?getLatestJourneyEntry(_0x546d49):undefined,_0x1b7c29=_0x16c8c3?.[_0x35c222(0x1d3)]??_0x546d49['name'],_0x4785fc=_0x546d49[_0x35c222(0x1e4)]||{},_0xcbcf26=_0x546d49[_0x35c222(0x16a)]||{},_0x4c71e6={'type':_0x35c222(0x1da),'attributes':{'name':_0x1b7c29,'audienceId':_0x6794aa,'journeyStages':await Promise[_0x35c222(0x149)](_0x3ff655['map'](_0x3a1fa2=>convertYamlStageToApi(_0x3a1fa2,_0x54f620,_0x4785fc,_0xcbcf26)))}},_0x21ab76=_0x16c8c3?.['id']??_0x546d49['id'];_0x21ab76&&(_0x4c71e6['id']=_0x21ab76);_0x546d49[_0x35c222(0x1a8)]&&(_0x4c71e6[_0x35c222(0x183)][_0x35c222(0x1a8)]=_0x546d49[_0x35c222(0x1a8)]);const _0x322236=getEffectiveGoal(_0x546d49);_0x322236&&(_0x4c71e6[_0x35c222(0x183)][_0x35c222(0x202)]=await convertYamlCriteriaToApi(_0x322236,_0x54f620,_0x4785fc));const _0x4d15e8=getEffectiveReentry(_0x546d49);return _0x4d15e8&&(_0x4c71e6[_0x35c222(0x183)]['reentryMode']=_0x4d15e8,_0x4c71e6['attributes']['allowReentry']=_0x4d15e8!==_0x35c222(0x151)),_0x546d49['folder_id']&&(_0x4c71e6[_0x35c222(0x1f4)]={'parentFolder':{'data':{'id':_0x546d49[_0x35c222(0x15f)],'type':'folder'}}}),_0x4c71e6;}async function convertYamlStageToApi(_0x64a7,_0x1ba1a6,_0x15939c={},_0x44bbd1={}){const _0x78c49a=a147_0x4b77,_0x64f5fb={'name':_0x64a7['name']};_0x64a7['id']&&(_0x64f5fb['id']=_0x64a7['id']);_0x64a7[_0x78c49a(0x1a8)]&&(_0x64f5fb[_0x78c49a(0x1a8)]=_0x64a7[_0x78c49a(0x1a8)]);_0x64a7[_0x78c49a(0x19e)]&&(_0x64f5fb[_0x78c49a(0x1a7)]=await convertYamlCriteriaToApi(_0x64a7[_0x78c49a(0x19e)],_0x1ba1a6,_0x15939c));_0x64a7[_0x78c49a(0x1e3)]&&_0x64a7[_0x78c49a(0x1e3)]['length']>0x0&&(_0x64f5fb[_0x78c49a(0x204)]=await Promise[_0x78c49a(0x149)](_0x64a7['exit_criteria'][_0x78c49a(0x18b)](_0x28963e=>convertYamlCriteriaToApi(_0x28963e,_0x1ba1a6,_0x15939c))));_0x64a7[_0x78c49a(0x1a2)]&&(_0x64f5fb[_0x78c49a(0x1a2)]=await convertYamlCriteriaToApi(_0x64a7[_0x78c49a(0x1a2)],_0x1ba1a6,_0x15939c));if(_0x64a7['steps']&&_0x64a7[_0x78c49a(0x1ca)][_0x78c49a(0x16c)]>0x0){const _0x9e7fc4={},_0x5e292c=_0x64a7['steps'][_0x78c49a(0x18b)]((_0x2960ef,_0x499122)=>{const _0x5f44ee=_0x2960ef['uuid']||generateUUID(),_0x33dd97=_0x2960ef['name']||_0x2960ef['type']+'_'+_0x499122;return _0x9e7fc4[_0x33dd97]=_0x5f44ee,{..._0x2960ef,'name':_0x33dd97};});_0x64f5fb[_0x78c49a(0x180)]=_0x9e7fc4[_0x5e292c[0x0][_0x78c49a(0x19b)]],_0x64f5fb[_0x78c49a(0x1ca)]={};for(let _0xfcf401=0x0;_0xfcf401<_0x5e292c[_0x78c49a(0x16c)];_0xfcf401++){const _0x3dd239=_0x5e292c[_0xfcf401],_0x554ec2=_0x9e7fc4[_0x3dd239[_0x78c49a(0x19b)]],_0x1a565c=!_0x3dd239[_0x78c49a(0x1a6)]&&_0xfcf401<_0x5e292c[_0x78c49a(0x16c)]-0x1&&_0x3dd239[_0x78c49a(0x178)]!==_0x78c49a(0x1ae)?_0x5e292c[_0xfcf401+0x1][_0x78c49a(0x19b)]:_0x3dd239[_0x78c49a(0x1a6)],_0x3d99b1=_0x1a565c!==_0x3dd239['next']?{..._0x3dd239,'next':_0x1a565c}:_0x3dd239;_0x64f5fb[_0x78c49a(0x1ca)][_0x554ec2]=await convertYamlStepToApi(_0x3d99b1,_0x1ba1a6,_0x15939c,_0x9e7fc4,_0x44bbd1);}}else _0x64a7['root_step']&&(_0x64f5fb[_0x78c49a(0x180)]=_0x64a7[_0x78c49a(0x166)]);return _0x64f5fb;}async function convertYamlCriteriaToApi(_0x24c089,_0xa429c1,_0x35f8c7={}){const _0x300c31=a147_0x4b77;let _0x719a3f=_0x24c089['segment'];if(_0x719a3f&&!/^\d+$/[_0x300c31(0x1dd)](_0x719a3f)){const _0x286e60=parseSegmentRef(_0x719a3f);if(_0x286e60[_0x300c31(0x178)]===_0x300c31(0x1eb))_0xa429c1?.['resolveSegmentId']&&(_0x719a3f=await _0xa429c1[_0x300c31(0x16e)](_0x286e60[_0x300c31(0x19b)]));else{if(_0x286e60[_0x300c31(0x178)]===_0x300c31(0x1db)&&_0x35f8c7[_0x286e60['name']])_0xa429c1?.[_0x300c31(0x1ef)]&&(_0x719a3f=await _0xa429c1[_0x300c31(0x1ef)](_0x286e60[_0x300c31(0x19b)],_0x35f8c7[_0x286e60[_0x300c31(0x19b)]]));else _0xa429c1?.[_0x300c31(0x16e)]&&(_0x719a3f=await _0xa429c1['resolveSegmentId'](_0x286e60[_0x300c31(0x19b)]));}}const _0x10e4ca={'name':_0x24c089[_0x300c31(0x19b)],'segmentId':_0x719a3f};_0x24c089['description']&&(_0x10e4ca[_0x300c31(0x1a8)]=_0x24c089[_0x300c31(0x1a8)]);if(_0x24c089[_0x300c31(0x195)]){const _0x181be2=_0x24c089['target'][_0x300c31(0x1da)],_0x280ec7=_0x24c089['target']['stage'];let _0x509b5e=_0x24c089[_0x300c31(0x195)]['journey'];_0xa429c1?.[_0x300c31(0x1d1)]&&!/^\d+$/['test'](_0x509b5e)&&(_0x509b5e=await _0xa429c1[_0x300c31(0x1d1)](_0x509b5e));let _0x42448a=_0x24c089[_0x300c31(0x195)]['stage'];_0xa429c1?.[_0x300c31(0x1a3)]&&!/^\d+$/[_0x300c31(0x1dd)](_0x42448a)&&(_0x42448a=await _0xa429c1[_0x300c31(0x1a3)](_0x509b5e,_0x42448a));const _0x2a7dd6=!/^\d+$/[_0x300c31(0x1dd)](_0x181be2)&&!isLocalJourneyRef(_0x181be2)?formatApiJourneyName(_0x181be2,_0x280ec7):undefined;_0x10e4ca[_0x300c31(0x195)]={'journeyId':_0x509b5e,'journeyStageId':_0x42448a,'journeyName':_0x2a7dd6,'confirmed':!![]},_0x24c089[_0x300c31(0x195)][_0x300c31(0x148)]&&(_0x10e4ca[_0x300c31(0x195)]['journeyBundleId']=_0x24c089[_0x300c31(0x195)]['bundle_id']);}return _0x10e4ca;}async function convertYamlStepToApi(_0x2bec27,_0x472b85,_0xc4f5a4={},_0x3e9b41={},_0x27adab={}){const _0x3a673b=a147_0x4b77,_0x4c8fe1=async _0x5aa5c6=>{const _0x1b2c80=a147_0x4b77;if(/^\d+$/[_0x1b2c80(0x1dd)](_0x5aa5c6))return _0x5aa5c6;const _0x380e42=parseSegmentRef(_0x5aa5c6);if(_0x380e42[_0x1b2c80(0x178)]===_0x1b2c80(0x1eb)){if(_0x472b85?.['resolveSegmentId'])return await _0x472b85[_0x1b2c80(0x16e)](_0x380e42[_0x1b2c80(0x19b)]);}else{if(_0x380e42[_0x1b2c80(0x178)]===_0x1b2c80(0x1db)&&_0xc4f5a4[_0x380e42[_0x1b2c80(0x19b)]]){if(_0x472b85?.[_0x1b2c80(0x1ef)])return await _0x472b85[_0x1b2c80(0x1ef)](_0x380e42[_0x1b2c80(0x19b)],_0xc4f5a4[_0x380e42[_0x1b2c80(0x19b)]]);}else{if(_0x472b85?.[_0x1b2c80(0x16e)])return await _0x472b85['resolveSegmentId'](_0x380e42[_0x1b2c80(0x19b)]);}}return _0x5aa5c6;},_0x2317a8=async _0x5e8efe=>{const _0x1513c7=a147_0x4b77;if(/^\d+$/['test'](_0x5e8efe))return _0x5e8efe;const _0x31f401=parseSegmentRef(_0x5e8efe);if(_0x31f401[_0x1513c7(0x178)]===_0x1513c7(0x1eb)){if(_0x472b85?.[_0x1513c7(0x1f6)])return await _0x472b85['resolveActivationId'](_0x31f401['name']);return _0x31f401[_0x1513c7(0x19b)];}else{if(_0x31f401['type']==='embedded'&&_0x27adab[_0x31f401[_0x1513c7(0x19b)]]){if(_0x472b85?.[_0x1513c7(0x1d7)])return await _0x472b85[_0x1513c7(0x1d7)](_0x31f401[_0x1513c7(0x19b)],_0x27adab[_0x31f401['name']]);if(_0x472b85?.[_0x1513c7(0x1f6)])return await _0x472b85[_0x1513c7(0x1f6)](_0x31f401[_0x1513c7(0x19b)]);}else{if(_0x472b85?.[_0x1513c7(0x1f6)])return await _0x472b85[_0x1513c7(0x1f6)](_0x31f401['name']);}}return _0x5e8efe;},_0x2b289b=_0x2a0f27=>{const _0x4b41bc=a147_0x4b77;if(!_0x2a0f27)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x4b41bc(0x1dd)](_0x2a0f27))return _0x2a0f27;return _0x3e9b41[_0x2a0f27]||_0x2a0f27;};switch(_0x2bec27['type']){case _0x3a673b(0x1c0):{const _0x2e3c7f=_0x2bec27,_0x2e54ee=_0x2e3c7f[_0x3a673b(0x197)],_0xeb5b43={'type':_0x3a673b(0x1c2),'name':_0x2e3c7f[_0x3a673b(0x19b)],'next':_0x2b289b(_0x2e3c7f[_0x3a673b(0x1a6)])};if(_0x2e54ee['duration']!==undefined&&_0x2e54ee[_0x3a673b(0x1b9)])_0xeb5b43[_0x3a673b(0x1fc)]=_0x3a673b(0x1c3),_0xeb5b43[_0x3a673b(0x14f)]=_0x2e54ee[_0x3a673b(0x156)],_0xeb5b43[_0x3a673b(0x1d8)]=normalizeWaitUnit(_0x2e54ee[_0x3a673b(0x1b9)]);else{if(_0x2e54ee[_0x3a673b(0x206)])_0xeb5b43[_0x3a673b(0x1fc)]=_0x3a673b(0x18f),_0xeb5b43[_0x3a673b(0x150)]=_0x2e54ee[_0x3a673b(0x206)];else{if(_0x2e54ee[_0x3a673b(0x190)])_0xeb5b43[_0x3a673b(0x1fc)]=_0x3a673b(0x1fd),_0xeb5b43[_0x3a673b(0x17c)]=_0x2e54ee['days_of_week'];else{if(_0x2e54ee[_0x3a673b(0x17a)]){_0xeb5b43[_0x3a673b(0x1fc)]=_0x3a673b(0x1bf);const _0x474261=await _0x4c8fe1(_0x2e54ee[_0x3a673b(0x17a)]['segment']),_0x2a3a5a=_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)]?.[_0x3a673b(0x1a6)]!==undefined;if(_0x2a3a5a){const _0x2ec47b=[];_0x2ec47b['push']({'id':generateUUID(),'segmentId':_0x474261,'timedOutPath':![],'name':'Met\x20condition(s)','next':_0x2b289b(_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x1a6)]??_0x2e3c7f[_0x3a673b(0x1a6)])});if(_0x2e54ee['condition'][_0x3a673b(0x157)]){const _0x342d0a=_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)][_0x3a673b(0x156)],_0x16718a=normalizeWaitUnit(_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)][_0x3a673b(0x1b9)]);_0x2ec47b[_0x3a673b(0x1cd)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x3a673b(0x153)+_0x342d0a+'\x20'+_0x16718a,'moveAfter':_0x342d0a,'unit':_0x16718a,'next':_0x2b289b(_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)][_0x3a673b(0x1a6)])});}_0xeb5b43[_0x3a673b(0x177)]=_0x2ec47b,delete _0xeb5b43[_0x3a673b(0x1a6)];}else _0xeb5b43['conditionSegmentId']=_0x474261,_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)]&&(_0xeb5b43[_0x3a673b(0x16d)]=_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)][_0x3a673b(0x156)],_0x2e54ee[_0x3a673b(0x17a)][_0x3a673b(0x157)][_0x3a673b(0x1b9)]&&(_0xeb5b43[_0x3a673b(0x196)]=normalizeWaitUnit(_0x2e54ee[_0x3a673b(0x17a)]['timeout']['unit'])));}}}}return _0xeb5b43;}case _0x3a673b(0x1b0):{const _0x2f3969=_0x2bec27,_0x30c750=_0x2f3969['with'][_0x3a673b(0x1b0)],_0x29dacf=await _0x2317a8(_0x30c750);return{'type':_0x3a673b(0x1b8),'name':_0x2f3969['name'],'journeyActivationStepId':_0x29dacf,'next':_0x2b289b(_0x2f3969[_0x3a673b(0x1a6)])};}case _0x3a673b(0x173):{const _0x5a33d4=_0x2bec27,_0x578a2c=_0x5a33d4[_0x3a673b(0x197)][_0x3a673b(0x1be)];return{'type':_0x3a673b(0x1f1),'name':_0x5a33d4[_0x3a673b(0x19b)],'branches':await Promise['all'](_0x578a2c[_0x3a673b(0x18b)](async _0x30e49a=>{const _0x2f6621=_0x3a673b;let _0x528d0e='';if(!_0x30e49a[_0x2f6621(0x16b)]){const _0x3ad03e=_0x30e49a[_0x2f6621(0x1bb)]||_0x30e49a[_0x2f6621(0x15e)]||'';_0x528d0e=_0x3ad03e?await _0x4c8fe1(_0x3ad03e):'';}return{'id':crypto[_0x2f6621(0x1bc)](),'name':_0x30e49a[_0x2f6621(0x19b)],'description':null,'segmentId':_0x528d0e,'excludedPath':_0x30e49a[_0x2f6621(0x16b)]??![],'next':_0x2b289b(_0x30e49a[_0x2f6621(0x1a6)])};})),'next':_0x2b289b(_0x5a33d4[_0x3a673b(0x1a6)])};}case _0x3a673b(0x18d):{const _0x576080=_0x2bec27,_0x595dd4=_0x576080['with'];return{'type':'ABTest','name':_0x576080[_0x3a673b(0x19b)],'customizedSplit':_0x595dd4[_0x3a673b(0x170)],'uniqueId':_0x595dd4[_0x3a673b(0x168)],'variants':_0x595dd4[_0x3a673b(0x1e0)][_0x3a673b(0x18b)](_0x4beaf7=>({'id':_0x4beaf7['id']||generateUUID(),'name':_0x4beaf7[_0x3a673b(0x19b)],'percentage':_0x4beaf7[_0x3a673b(0x1f5)],'next':_0x2b289b(_0x4beaf7[_0x3a673b(0x1a6)])})),'next':_0x2b289b(_0x576080[_0x3a673b(0x1a6)])};}case'merge':return{'type':_0x3a673b(0x175),'name':_0x2bec27[_0x3a673b(0x19b)],'next':_0x2b289b(_0x2bec27[_0x3a673b(0x1a6)])};case'jump':{const _0xee23f=_0x2bec27,_0x32bb5f=_0xee23f[_0x3a673b(0x197)][_0x3a673b(0x195)],_0x33c42b=_0x32bb5f['journey'],_0x284255=_0x32bb5f[_0x3a673b(0x1ce)];let _0x57fef1=_0x32bb5f[_0x3a673b(0x1da)];_0x472b85?.[_0x3a673b(0x1d1)]&&!/^\d+$/['test'](_0x57fef1)&&(_0x57fef1=await _0x472b85[_0x3a673b(0x1d1)](_0x57fef1));let _0x2aac07=_0x32bb5f[_0x3a673b(0x1ce)];_0x472b85?.[_0x3a673b(0x1a3)]&&!/^\d+$/['test'](_0x2aac07)&&(_0x2aac07=await _0x472b85[_0x3a673b(0x1a3)](_0x57fef1,_0x2aac07));const _0x4bae5a=!/^\d+$/[_0x3a673b(0x1dd)](_0x33c42b)&&!isLocalJourneyRef(_0x33c42b)?formatApiJourneyName(_0x33c42b,_0x284255):undefined;return{'type':_0x3a673b(0x1a4),'name':_0xee23f['name'],'target':{'journeyId':_0x57fef1,'journeyStageId':_0x2aac07,'journeyBundleId':_0x32bb5f[_0x3a673b(0x148)],'journeyName':_0x4bae5a,'confirmed':!![]},'next':_0x2b289b(_0xee23f['next'])};}case _0x3a673b(0x1ae):return{'type':_0x3a673b(0x171),'name':_0x2bec27[_0x3a673b(0x19b)]};default:{const _0x3c0024=_0x2bec27;return{'type':_0x3a673b(0x171),'name':_0x3c0024[_0x3a673b(0x19b)]};}}}export function toYamlString(_0x59bf9b){const _0x106e61=a147_0x4b77,_0x206e23=stripInternalFields(_0x59bf9b),_0x53e05a=a147_0x5aff14[_0x106e61(0x1b3)](_0x206e23,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x106e61(0x1e7)}),_0x4fe337=['segments:',_0x106e61(0x17d),_0x106e61(0x1e9),_0x106e61(0x1e2),_0x106e61(0x1a1),_0x106e61(0x160),_0x106e61(0x147)];let _0x1e6deb=_0x53e05a;for(const _0x2c859d of _0x4fe337){_0x1e6deb=_0x1e6deb['replace'](new RegExp('^('+_0x2c859d+')','m'),(_0x20d29e,_0x16006d,_0x541c65)=>{if(_0x541c65===0x0||_0x1e6deb[_0x541c65-0x1]==='\x0a'&&_0x1e6deb[_0x541c65-0x2]==='\x0a')return _0x16006d;return'\x0a'+_0x16006d;});}return _0x1e6deb;}function a147_0x4b77(_0x1d78e9,_0x30d224){_0x1d78e9=_0x1d78e9-0x146;const _0x565192=a147_0x5651();let _0x4b77db=_0x565192[_0x1d78e9];return _0x4b77db;}function stripInternalFields(_0xe5c757){const _0x28f1a9=a147_0x4b77,{id:_0x51c45e,folder_id:_0x3f5466,bundle_id:_0x28acb8,bundle_name:_0x14318b,version:_0x185952,allow_reentry:_0x5b839f,..._0x39550d}=_0xe5c757;return _0x39550d[_0x28f1a9(0x1d6)]&&(_0x39550d[_0x28f1a9(0x1d6)]=_0x39550d[_0x28f1a9(0x1d6)][_0x28f1a9(0x18b)](_0x32cbc2=>{const _0x149456=_0x28f1a9,{id:_0x4bf769,..._0x42c42d}=_0x32cbc2;return{..._0x42c42d,'stages':_0x42c42d[_0x149456(0x1d2)][_0x149456(0x18b)](stripStageInternalFields),..._0x32cbc2[_0x149456(0x17e)]===!![]?{'latest':!![]}:{},..._0x39550d[_0x149456(0x1d6)][_0x149456(0x16c)]===0x1&&_0x42c42d[_0x149456(0x1d3)]==='v1'?{'version':undefined}:{}};})),_0x39550d[_0x28f1a9(0x1d2)]&&(_0x39550d[_0x28f1a9(0x1d2)]=_0x39550d[_0x28f1a9(0x1d2)][_0x28f1a9(0x18b)](stripStageInternalFields)),_0x39550d[_0x28f1a9(0x19d)]&&(_0x39550d[_0x28f1a9(0x19d)]=_0x39550d[_0x28f1a9(0x19d)]['map'](_0x200b5c=>{const _0x15f00d=_0x28f1a9,{id:_0x31e614,..._0x4b0013}=_0x200b5c;return{..._0x4b0013,'stages':_0x4b0013[_0x15f00d(0x1d2)]['map'](stripStageInternalFields),..._0x200b5c['latest']===!![]?{'latest':!![]}:{}};})),_0x39550d;}function stripStageInternalFields(_0x1e89b7){const {id:_0x37649a,..._0x88c871}=_0x1e89b7;return _0x88c871;}export function parseYamlString(_0x2c0ed7){return safeParseYaml(_0x2c0ed7,JourneyDefSchema);}export function isJourneyDef(_0x25e8ce){const _0x479164=a147_0x4b77;return typeof _0x25e8ce===_0x479164(0x203)&&_0x25e8ce!==null&&_0x479164(0x178)in _0x25e8ce&&_0x25e8ce[_0x479164(0x178)]==='journey';}export function generateTemplate(_0x5651e9,_0x3fd869){const _0xed7245=a147_0x4b77,_0x52fc39={'type':_0xed7245(0x1da),'name':_0x5651e9,'description':_0xed7245(0x1aa),'reentry':'no_reentry','goal':{'name':'Goal\x20Achieved','segment':_0xed7245(0x17b)},'stages':[{'name':'Stage\x201','description':_0xed7245(0x1e1),'entry_criteria':{'name':'Entry\x20Criteria','segment':_0x3fd869},'steps':[{'type':_0xed7245(0x1c0),'name':_0xed7245(0x1c9),'with':{'duration':0x1,'unit':'day'}},{'type':'activation','name':_0xed7245(0x14b),'with':{'activation':_0xed7245(0x194)}},{'type':'end','name':'Stage\x20Complete'}]}]};return toYamlString(_0x52fc39);}function generateUUID(){return crypto['randomUUID']();}export const SEGMENT_REF_PREFIX=a147_0x72352b(0x16f);export function parseSegmentRef(_0x4d397e){const _0x4c8704=a147_0x72352b;if(_0x4d397e[_0x4c8704(0x1fb)](SEGMENT_REF_PREFIX))return{'type':_0x4c8704(0x1eb),'name':_0x4d397e[_0x4c8704(0x1cb)](SEGMENT_REF_PREFIX[_0x4c8704(0x16c)])};if(/^\d+$/[_0x4c8704(0x1dd)](_0x4d397e))return{'type':'id','name':_0x4d397e};return{'type':_0x4c8704(0x1db),'name':_0x4d397e};}export function makeSegmentRef(_0x264c09){return''+SEGMENT_REF_PREFIX+_0x264c09;}export function isExternalSegmentRef(_0x193ab3){return _0x193ab3['startsWith'](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x2f9af6){const _0x3c331d=a147_0x72352b;return!!(_0x2f9af6[_0x3c331d(0x1d6)]&&_0x2f9af6[_0x3c331d(0x1d6)][_0x3c331d(0x16c)]>0x0);}export function isMultiVersionMode(_0x54675c){const _0x1500c6=a147_0x72352b;return!!(_0x54675c['versions']&&_0x54675c[_0x1500c6(0x19d)][_0x1500c6(0x16c)]>0x0);}export function isSingleVersionMode(_0xa820de){const _0x3175b3=a147_0x72352b;return!!(_0xa820de[_0x3175b3(0x1d2)]&&_0xa820de[_0x3175b3(0x1d2)][_0x3175b3(0x16c)]>0x0);}export function hasMultipleVersions(_0x316ce8){const _0xb4d315=a147_0x72352b;if(isJourneysArrayMode(_0x316ce8))return(_0x316ce8[_0xb4d315(0x1d6)]?.['length']||0x0)>0x1;if(isMultiVersionMode(_0x316ce8))return(_0x316ce8[_0xb4d315(0x19d)]?.[_0xb4d315(0x16c)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x4f1c73){const _0x319f74=a147_0x72352b;if(isJourneysArrayMode(_0x4f1c73))return _0x4f1c73;if(isSingleVersionMode(_0x4f1c73)){const {stages:_0x2c0abf,id:_0x1c422b,version:_0x4c8978,version_number:_0x5b002a,..._0x3abd04}=_0x4f1c73;return{..._0x3abd04,'journeys':[{'version':_0x4c8978||'v1','stages':_0x2c0abf||[],'id':_0x1c422b,'version_number':_0x5b002a}]};}if(isMultiVersionMode(_0x4f1c73)){const {versions:_0x5a0f89,..._0x187ad6}=_0x4f1c73;return{..._0x187ad6,'journeys':(_0x5a0f89||[])[_0x319f74(0x18b)](_0x793e5c=>({'version':_0x793e5c[_0x319f74(0x19b)],'state':_0x793e5c[_0x319f74(0x1ec)],'latest':_0x793e5c[_0x319f74(0x17e)],'stages':_0x793e5c[_0x319f74(0x1d2)],'id':_0x793e5c['id'],'version_number':_0x793e5c['version_number']}))};}return _0x4f1c73;}export function normalizeJourneyDef(_0x43c9ee,_0x7016b9){const _0x246fdd=a147_0x72352b,_0x4fb635=normalizeToJourneysFormat(_0x43c9ee),_0x57016f=_0x7016b9?.[_0x246fdd(0x1e4)]?Object[_0x246fdd(0x1ff)](_0x7016b9[_0x246fdd(0x1e4)]):undefined,_0x363f5b=_0x7016b9?.[_0x246fdd(0x16a)]?Object['keys'](_0x7016b9[_0x246fdd(0x16a)]):undefined;return{'type':_0x246fdd(0x1da),'name':_0x4fb635[_0x246fdd(0x19b)],..._0x4fb635[_0x246fdd(0x1a8)]!==undefined&&{'description':_0x4fb635['description']},..._0x4fb635[_0x246fdd(0x202)]&&{'goal':normalizeJourneyCriteria(_0x4fb635['goal'])},..._0x4fb635[_0x246fdd(0x193)]!==undefined&&{'reentry':_0x4fb635[_0x246fdd(0x193)]},..._0x4fb635[_0x246fdd(0x1e4)]&&{'segments':normalizeEmbeddedSegments(_0x4fb635[_0x246fdd(0x1e4)],_0x57016f)},..._0x4fb635[_0x246fdd(0x16a)]&&{'activations':normalizeEmbeddedActivations(_0x4fb635[_0x246fdd(0x16a)],_0x363f5b)},..._0x4fb635[_0x246fdd(0x1d6)]&&{'journeys':_0x4fb635[_0x246fdd(0x1d6)][_0x246fdd(0x18b)](_0x320ba2=>normalizeJourneyEntry(_0x320ba2,_0x4fb635[_0x246fdd(0x1d6)]['length']===0x1))}};}function normalizeJourneyEntry(_0x57cac3,_0x4c72be){const _0x1e089d=a147_0x72352b;return{...!_0x4c72be&&_0x57cac3[_0x1e089d(0x1d3)]!==undefined&&{'version':_0x57cac3['version']},..._0x57cac3[_0x1e089d(0x1ec)]!==undefined&&{'state':_0x57cac3[_0x1e089d(0x1ec)]},...!_0x4c72be&&_0x57cac3['latest']!==undefined&&{'latest':_0x57cac3['latest']},..._0x57cac3['version_number']!==undefined&&{'version_number':_0x57cac3[_0x1e089d(0x1f8)]},..._0x57cac3['goal']&&{'goal':normalizeJourneyCriteria(_0x57cac3[_0x1e089d(0x202)])},..._0x57cac3['reentry']!==undefined&&{'reentry':_0x57cac3[_0x1e089d(0x193)]},'stages':_0x57cac3[_0x1e089d(0x1d2)][_0x1e089d(0x18b)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x5dd0d1){const _0x18d177=a147_0x72352b;return{'name':_0x5dd0d1['name'],..._0x5dd0d1[_0x18d177(0x1a8)]!==undefined&&{'description':_0x5dd0d1['description']},..._0x5dd0d1[_0x18d177(0x19e)]&&{'entry_criteria':normalizeJourneyCriteria(_0x5dd0d1[_0x18d177(0x19e)])},..._0x5dd0d1[_0x18d177(0x1e3)]&&{'exit_criteria':_0x5dd0d1[_0x18d177(0x1e3)][_0x18d177(0x18b)](normalizeJourneyCriteria)},..._0x5dd0d1['milestone']&&{'milestone':normalizeJourneyCriteria(_0x5dd0d1[_0x18d177(0x1a2)])},..._0x5dd0d1[_0x18d177(0x1ca)]&&{'steps':normalizeStepsWithImplicitNext(_0x5dd0d1[_0x18d177(0x1ca)])}};}function normalizeStepsWithImplicitNext(_0x3a3842){const _0x436760=a147_0x72352b;return _0x3a3842[_0x436760(0x18b)]((_0x511336,_0xfa9e3c)=>{const _0x217cf9=_0x436760,_0x39159d=_0xfa9e3c<_0x3a3842[_0x217cf9(0x16c)]-0x1?_0x3a3842[_0xfa9e3c+0x1][_0x217cf9(0x19b)]:undefined;return normalizeJourneyStep(_0x511336,_0x39159d);});}function normalizeJourneyCriteria(_0x4fe2d7){const _0x1ec979=a147_0x72352b;return{'name':_0x4fe2d7['name'],..._0x4fe2d7[_0x1ec979(0x1a8)]!==undefined&&{'description':_0x4fe2d7[_0x1ec979(0x1a8)]},'segment':_0x4fe2d7['segment'],..._0x4fe2d7['target']&&{'target':normalizeJumpTarget(_0x4fe2d7[_0x1ec979(0x195)])}};}function normalizeJourneyStep(_0x265b1d,_0x2df744){const _0x471f38=a147_0x72352b,_0x357b46=_0x265b1d[_0x471f38(0x1a6)]!==undefined&&_0x265b1d[_0x471f38(0x1a6)]!==_0x2df744,_0x40f8d5={'type':_0x265b1d[_0x471f38(0x178)],'name':_0x265b1d['name'],..._0x357b46&&{'next':_0x265b1d[_0x471f38(0x1a6)]}};if(_0x471f38(0x197)in _0x265b1d&&_0x265b1d[_0x471f38(0x197)])return{..._0x40f8d5,'with':normalizeStepParams(_0x265b1d[_0x471f38(0x178)],_0x265b1d['with'])};return _0x40f8d5;}function normalizeStepParams(_0x167d06,_0x8e8358){const _0x1a44f9=a147_0x72352b;switch(_0x167d06){case'wait':{const _0x41fed4=_0x8e8358;let _0x2da4d8;return _0x41fed4['condition']&&(_0x2da4d8={'segment':_0x41fed4[_0x1a44f9(0x17a)][_0x1a44f9(0x1bb)],..._0x41fed4[_0x1a44f9(0x17a)][_0x1a44f9(0x1a6)]!==undefined&&{'next':_0x41fed4[_0x1a44f9(0x17a)][_0x1a44f9(0x1a6)]},..._0x41fed4['condition'][_0x1a44f9(0x157)]&&{'timeout':{'duration':_0x41fed4[_0x1a44f9(0x17a)]['timeout']['duration'],'unit':_0x41fed4[_0x1a44f9(0x17a)][_0x1a44f9(0x157)][_0x1a44f9(0x1b9)],..._0x41fed4[_0x1a44f9(0x17a)][_0x1a44f9(0x157)][_0x1a44f9(0x1a6)]!==undefined&&{'next':_0x41fed4[_0x1a44f9(0x17a)][_0x1a44f9(0x157)][_0x1a44f9(0x1a6)]}}}}),{..._0x41fed4['duration']!==undefined&&{'duration':_0x41fed4['duration']},..._0x41fed4['unit']!==undefined&&{'unit':_0x41fed4[_0x1a44f9(0x1b9)]},..._0x41fed4['wait_until']!==undefined&&{'wait_until':_0x41fed4[_0x1a44f9(0x206)]},..._0x41fed4[_0x1a44f9(0x190)]!==undefined&&{'days_of_week':_0x41fed4[_0x1a44f9(0x190)]},..._0x2da4d8&&{'condition':_0x2da4d8}};}case'activation':{const _0x4dae4c=_0x8e8358;return{'activation':_0x4dae4c[_0x1a44f9(0x1b0)]};}case _0x1a44f9(0x173):{const _0x431e85=_0x8e8358;return{'branches':_0x431e85['branches'][_0x1a44f9(0x18b)](normalizeDecisionBranch)};}case'ab_test':{const _0x5cdfad=_0x8e8358;return{..._0x5cdfad[_0x1a44f9(0x170)]!==undefined&&{'customized_split':_0x5cdfad[_0x1a44f9(0x170)]},..._0x5cdfad['unique_id']!==undefined&&{'unique_id':_0x5cdfad[_0x1a44f9(0x168)]},'variants':_0x5cdfad['variants']['map'](normalizeAbTestVariant)};}case'jump':{const _0x2258b1=_0x8e8358;return{'target':normalizeJumpTarget(_0x2258b1[_0x1a44f9(0x195)])};}default:return _0x8e8358;}}function normalizeDecisionBranch(_0x3cb6a2){const _0x438402=a147_0x72352b;return{'name':_0x3cb6a2[_0x438402(0x19b)],..._0x3cb6a2[_0x438402(0x1bb)]!==undefined&&{'segment':_0x3cb6a2[_0x438402(0x1bb)]},..._0x3cb6a2[_0x438402(0x16b)]!==undefined&&{'excluded':_0x3cb6a2[_0x438402(0x16b)]},..._0x3cb6a2[_0x438402(0x1a6)]!==undefined&&{'next':_0x3cb6a2['next']}};}function normalizeAbTestVariant(_0x22cb22){const _0x3ab51e=a147_0x72352b;return{..._0x22cb22['id']!==undefined&&{'id':_0x22cb22['id']},'name':_0x22cb22[_0x3ab51e(0x19b)],'percentage':_0x22cb22[_0x3ab51e(0x1f5)],..._0x22cb22['next']!==undefined&&{'next':_0x22cb22['next']}};}function normalizeJumpTarget(_0x20e972){const _0x3310e7=a147_0x72352b;return{'journey':_0x20e972[_0x3310e7(0x1da)],'stage':_0x20e972[_0x3310e7(0x1ce)],..._0x20e972[_0x3310e7(0x148)]!==undefined&&{'bundle_id':_0x20e972['bundle_id']}};}function normalizeEmbeddedSegments(_0xaab9c0,_0x8942c9){const _0x4af4f0=a147_0x72352b,_0x4deea3={},_0x1938ef=Object[_0x4af4f0(0x1ff)](_0xaab9c0),_0x2150e1=_0x8942c9?[..._0x8942c9[_0x4af4f0(0x169)](_0x116240=>_0x1938ef[_0x4af4f0(0x182)](_0x116240)),..._0x1938ef[_0x4af4f0(0x169)](_0x36e2a7=>!_0x8942c9[_0x4af4f0(0x182)](_0x36e2a7))[_0x4af4f0(0x1ab)]()]:_0x1938ef[_0x4af4f0(0x1ab)]();for(const _0x41d3e3 of _0x2150e1){const _0x443c4b=_0xaab9c0[_0x41d3e3];if(_0x443c4b[_0x4af4f0(0x209)]){const _0x3138de=_0x443c4b[_0x4af4f0(0x209)];if(_0x3138de[_0x4af4f0(0x178)]!==_0x4af4f0(0x1f2)&&_0x3138de['type']!=='Or'){const _0x457b92=_0x3138de[_0x4af4f0(0x178)]??_0x4af4f0(0x1c6);throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x4af4f0(0x187)+_0x41d3e3+_0x4af4f0(0x165)+(_0x4af4f0(0x1cf)+_0x457b92+_0x4af4f0(0x179))+_0x4af4f0(0x192)+_0x4af4f0(0x1b2)+_0x4af4f0(0x14a)+'\x20\x20\x20\x20conditions:\x0a'+_0x4af4f0(0x167)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x4af4f0(0x184));}if(!_0x3138de[_0x4af4f0(0x177)]||!Array[_0x4af4f0(0x1fa)](_0x3138de['conditions']))throw new SDKError(ErrorCode[_0x4af4f0(0x172)],_0x4af4f0(0x187)+_0x41d3e3+_0x4af4f0(0x165)+_0x4af4f0(0x1a5)+_0x4af4f0(0x192)+_0x4af4f0(0x1b2)+(_0x4af4f0(0x1c8)+_0x3138de[_0x4af4f0(0x178)]+'\x0a')+'\x20\x20\x20\x20conditions:\x0a'+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x4af4f0(0x1d4)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}_0x4deea3[_0x41d3e3]={..._0x443c4b[_0x4af4f0(0x1a8)]&&_0x443c4b[_0x4af4f0(0x1a8)][_0x4af4f0(0x159)]()&&{'description':_0x443c4b['description']},..._0x443c4b['rule']&&{'rule':deepSortObject(_0x443c4b[_0x4af4f0(0x209)])}};}return _0x4deea3;}function normalizeEmbeddedActivations(_0x1a364c,_0x47ce73){const _0x3aee1e=a147_0x72352b,_0xe243be={},_0x58f8ca=Object['keys'](_0x1a364c),_0x3339c8=_0x47ce73?[..._0x47ce73[_0x3aee1e(0x169)](_0x4e705d=>_0x58f8ca[_0x3aee1e(0x182)](_0x4e705d)),..._0x58f8ca[_0x3aee1e(0x169)](_0x7c63c4=>!_0x47ce73['includes'](_0x7c63c4))[_0x3aee1e(0x1ab)]()]:_0x58f8ca[_0x3aee1e(0x1ab)]();for(const _0x8cce30 of _0x3339c8){const _0x36add8=_0x1a364c[_0x8cce30];_0xe243be[_0x8cce30]={'name':_0x36add8[_0x3aee1e(0x19b)],'connection':_0x36add8[_0x3aee1e(0x1ba)],..._0x36add8[_0x3aee1e(0x1a8)]!==undefined&&{'description':_0x36add8[_0x3aee1e(0x1a8)]},..._0x36add8[_0x3aee1e(0x154)]!==undefined&&{'all_columns':_0x36add8[_0x3aee1e(0x154)]},..._0x36add8[_0x3aee1e(0x1c7)]!==undefined&&{'columns':_0x36add8[_0x3aee1e(0x1c7)]},..._0x36add8[_0x3aee1e(0x1bd)]!==undefined&&{'behavior':_0x36add8[_0x3aee1e(0x1bd)]},..._0x36add8[_0x3aee1e(0x201)]!==undefined&&{'schedule':_0x36add8[_0x3aee1e(0x201)]},..._0x36add8[_0x3aee1e(0x1dc)]!==undefined&&{'notification':_0x36add8[_0x3aee1e(0x1dc)]},..._0x36add8[_0x3aee1e(0x14d)]!==undefined&&{'connector_config':_0x36add8[_0x3aee1e(0x14d)]},..._0x36add8[_0x3aee1e(0x1fe)]!==undefined&&{'activation_template_id':_0x36add8['activation_template_id']}};}return _0xe243be;}export function getActiveStages(_0x33dd1b){const _0x4b055a=a147_0x72352b;if(isJourneysArrayMode(_0x33dd1b)){const _0x2eec3e=_0x33dd1b[_0x4b055a(0x1d6)]||[],_0x44f2fe=_0x2eec3e['find'](_0x316c4f=>_0x316c4f[_0x4b055a(0x17e)]===!![])||_0x2eec3e[0x0];return _0x44f2fe?.[_0x4b055a(0x1d2)]||[];}if(isSingleVersionMode(_0x33dd1b))return _0x33dd1b[_0x4b055a(0x1d2)]||[];if(isMultiVersionMode(_0x33dd1b)){const _0x21fd15=_0x33dd1b[_0x4b055a(0x19d)]||[],_0x3f4a53=_0x21fd15[_0x4b055a(0x15d)](_0x530dd5=>_0x530dd5[_0x4b055a(0x17e)]===!![])||_0x21fd15[0x0];return _0x3f4a53?.['stages']||[];}return[];}export function getLatestJourneyEntry(_0x495040){const _0xdba6e8=a147_0x72352b;if(isJourneysArrayMode(_0x495040)){const _0x1be101=_0x495040[_0xdba6e8(0x1d6)]||[];return _0x1be101[_0xdba6e8(0x15d)](_0x11d6b7=>_0x11d6b7[_0xdba6e8(0x17e)]===!![])||_0x1be101[0x0];}if(isMultiVersionMode(_0x495040)){const _0x10f867=_0x495040['versions']||[],_0x40a130=_0x10f867[_0xdba6e8(0x15d)](_0x38a56c=>_0x38a56c[_0xdba6e8(0x17e)]===!![])||_0x10f867[0x0];if(_0x40a130)return{'version':_0x40a130[_0xdba6e8(0x19b)],'state':_0x40a130[_0xdba6e8(0x1ec)],'latest':_0x40a130[_0xdba6e8(0x17e)],'stages':_0x40a130['stages'],'id':_0x40a130['id'],'version_number':_0x40a130[_0xdba6e8(0x1f8)]};}if(isSingleVersionMode(_0x495040))return{'version':_0x495040[_0xdba6e8(0x1d3)]||'v1','state':_0xdba6e8(0x185),'stages':_0x495040[_0xdba6e8(0x1d2)]||[],'id':_0x495040['id'],'version_number':_0x495040[_0xdba6e8(0x1f8)],'goal':_0x495040['goal'],'reentry':_0x495040[_0xdba6e8(0x193)]};return undefined;}export function getLatestVersion(_0x1abf8a){const _0xf8edff=a147_0x72352b;if(!isMultiVersionMode(_0x1abf8a))return undefined;const _0x2d22e1=_0x1abf8a[_0xf8edff(0x19d)]||[];return _0x2d22e1[_0xf8edff(0x15d)](_0x327733=>_0x327733[_0xf8edff(0x17e)]===!![])||_0x2d22e1[0x0];}export function getEffectiveGoal(_0x12d768){const _0x459e61=a147_0x72352b,_0x2be74c=getLatestJourneyEntry(_0x12d768);return _0x2be74c?.[_0x459e61(0x202)]||_0x12d768[_0x459e61(0x202)];}export function getEffectiveReentry(_0x322fb9){const _0x1edd72=a147_0x72352b,_0x594093=getLatestJourneyEntry(_0x322fb9);return _0x594093?.[_0x1edd72(0x193)]||_0x322fb9['reentry'];}export function collectSegmentRefs(_0x37f996){const _0x5c6bdd=a147_0x72352b,_0x6af90a=new Set();_0x37f996[_0x5c6bdd(0x202)]?.[_0x5c6bdd(0x1bb)]&&_0x6af90a[_0x5c6bdd(0x161)](_0x37f996[_0x5c6bdd(0x202)][_0x5c6bdd(0x1bb)]);const _0x4a5ddd=_0x30a46d=>{const _0x45a06d=_0x5c6bdd;for(const _0x31d7c4 of _0x30a46d){_0x31d7c4['entry_criteria']?.[_0x45a06d(0x1bb)]&&_0x6af90a[_0x45a06d(0x161)](_0x31d7c4[_0x45a06d(0x19e)][_0x45a06d(0x1bb)]);if(_0x31d7c4[_0x45a06d(0x1e3)])for(const _0x2ba564 of _0x31d7c4['exit_criteria']){_0x2ba564['segment']&&_0x6af90a[_0x45a06d(0x161)](_0x2ba564[_0x45a06d(0x1bb)]);}_0x31d7c4[_0x45a06d(0x1a2)]?.[_0x45a06d(0x1bb)]&&_0x6af90a['add'](_0x31d7c4[_0x45a06d(0x1a2)]['segment']);if(_0x31d7c4[_0x45a06d(0x1ca)])for(const _0x1c8338 of _0x31d7c4[_0x45a06d(0x1ca)]){if(_0x1c8338[_0x45a06d(0x178)]==='decision_point'){const _0x29fa9c=_0x1c8338;for(const _0x4db29b of _0x29fa9c[_0x45a06d(0x197)][_0x45a06d(0x1be)]){_0x4db29b[_0x45a06d(0x1bb)]&&_0x6af90a[_0x45a06d(0x161)](_0x4db29b[_0x45a06d(0x1bb)]);}}else{if(_0x1c8338[_0x45a06d(0x178)]===_0x45a06d(0x1c0)){const _0x4309c9=_0x1c8338;_0x4309c9[_0x45a06d(0x197)]['condition']?.['segment']&&_0x6af90a[_0x45a06d(0x161)](_0x4309c9[_0x45a06d(0x197)][_0x45a06d(0x17a)][_0x45a06d(0x1bb)]);}}}}};_0x37f996[_0x5c6bdd(0x1d2)]&&_0x4a5ddd(_0x37f996[_0x5c6bdd(0x1d2)]);if(_0x37f996[_0x5c6bdd(0x19d)])for(const _0xd99076 of _0x37f996['versions']){_0x4a5ddd(_0xd99076[_0x5c6bdd(0x1d2)]);}return _0x6af90a;}export function validateSegmentRefs(_0x236904){const _0x4473b2=a147_0x72352b,_0x4f0bcf=[],_0x29145a=collectSegmentRefs(_0x236904),_0x40c3d3=new Set(Object[_0x4473b2(0x1ff)](_0x236904[_0x4473b2(0x1e4)]||{}));for(const _0x5b8669 of _0x29145a){const _0x3c4642=parseSegmentRef(_0x5b8669);_0x3c4642['type']==='embedded'&&!_0x40c3d3[_0x4473b2(0x1ad)](_0x3c4642[_0x4473b2(0x19b)])&&_0x4f0bcf['push'](_0x4473b2(0x1af)+_0x3c4642['name']+'\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:'+_0x3c4642[_0x4473b2(0x19b)]+_0x4473b2(0x191));}return _0x4f0bcf;}export function collectSegmentIdsFromJourneyApi(_0x38383b){const _0x269796=a147_0x72352b,_0x2bd9ff=new Set();_0x38383b[_0x269796(0x183)]['goal']?.[_0x269796(0x188)]&&_0x2bd9ff[_0x269796(0x161)](_0x38383b['attributes'][_0x269796(0x202)]['segmentId']);const _0x20ce21=_0x38383b['attributes'][_0x269796(0x1a0)];if(Array[_0x269796(0x1fa)](_0x20ce21))for(const _0x85dd8d of _0x20ce21){_0x85dd8d['entryCriteria']?.['segmentId']&&_0x2bd9ff[_0x269796(0x161)](_0x85dd8d[_0x269796(0x1a7)][_0x269796(0x188)]);const _0x4d8e2f=_0x85dd8d['exitCriterias']??_0x85dd8d[_0x269796(0x1c4)];if(Array['isArray'](_0x4d8e2f))for(const _0x41cdd2 of _0x4d8e2f){_0x41cdd2['segmentId']&&_0x2bd9ff[_0x269796(0x161)](_0x41cdd2[_0x269796(0x188)]);}_0x85dd8d[_0x269796(0x1a2)]?.[_0x269796(0x188)]&&_0x2bd9ff[_0x269796(0x161)](_0x85dd8d['milestone']['segmentId']);if(_0x85dd8d[_0x269796(0x1ca)]&&typeof _0x85dd8d[_0x269796(0x1ca)]===_0x269796(0x203)){const _0x2d8fd9=Array[_0x269796(0x1fa)](_0x85dd8d['steps'])?_0x85dd8d[_0x269796(0x1ca)]:Object[_0x269796(0x19f)](_0x85dd8d['steps']);for(const _0x35e46e of _0x2d8fd9){_0x35e46e[_0x269796(0x155)]?.[_0x269796(0x188)]&&_0x2bd9ff['add'](_0x35e46e[_0x269796(0x155)]['segmentId']);const _0x5dc753=_0x35e46e;_0x5dc753[_0x269796(0x164)]&&_0x2bd9ff[_0x269796(0x161)](_0x5dc753[_0x269796(0x164)]);if(Array['isArray'](_0x5dc753['conditions']))for(const _0x4761bf of _0x5dc753[_0x269796(0x177)]){_0x4761bf[_0x269796(0x188)]&&_0x2bd9ff[_0x269796(0x161)](_0x4761bf[_0x269796(0x188)]);}if(Array[_0x269796(0x1fa)](_0x35e46e['branches']))for(const _0x350e5f of _0x35e46e[_0x269796(0x1be)]){_0x350e5f['segmentId']&&_0x2bd9ff[_0x269796(0x161)](_0x350e5f[_0x269796(0x188)]);}}}}return _0x2bd9ff;}
|
|
1
|
+
function a147_0x5076(_0x134c22,_0x1847f8){_0x134c22=_0x134c22-0x1e2;const _0x47e67a=a147_0x47e6();let _0x507672=_0x47e67a[_0x134c22];return _0x507672;}const a147_0x3557e0=a147_0x5076;(function(_0x593efc,_0x160f40){const _0xece2e=a147_0x5076,_0x30cf9b=_0x593efc();while(!![]){try{const _0xa55c56=parseInt(_0xece2e(0x251))/0x1+parseInt(_0xece2e(0x25a))/0x2*(-parseInt(_0xece2e(0x280))/0x3)+parseInt(_0xece2e(0x285))/0x4*(-parseInt(_0xece2e(0x241))/0x5)+parseInt(_0xece2e(0x218))/0x6+-parseInt(_0xece2e(0x22d))/0x7+-parseInt(_0xece2e(0x281))/0x8+parseInt(_0xece2e(0x26e))/0x9;if(_0xa55c56===_0x160f40)break;else _0x30cf9b['push'](_0x30cf9b['shift']());}catch(_0x320168){_0x30cf9b['push'](_0x30cf9b['shift']());}}}(a147_0x47e6,0x4e16d));import*as a147_0x2b5319 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';function a147_0x47e6(){const _0x1d749e=['WaitStep','\x20\x20rule:\x0a','Entry\x20Criteria','trim','versions:','goal','branches','\x27.\x0a','resolveEmbeddedSegmentId','resolveActivationId','activations','wait_until','attributes','test','parentFolder','bundle_name','add','Wait\x201\x20Day','schedule','resolveJourneyId','your-activation-name','waitStep','definition','conditions','steps','reentry_always','null','bundle_id','Met\x20condition(s)','jump','with','Jump','DecisionPoint','launched','resolveSegmentName','set','keys','customizedSplit','journeyStages','condition','Send\x20Notification','(missing)','Activation','stages:','columns','journeyName','push','exitCriteria','all','ref:','decision_point','ab_test','resolveStageId','moveAfter','end','resolveActivation','stageId','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','next','JOURNEY_SYNTAX_ERROR','filter','conditionSegmentId','journeys:','2866470eZOmKM','days','waitCondition','Date','excluded','randomUUID','customized_split','relationships','sort','waitUntilDate','shift','isArray','journeyId','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','resolveSegmentId','activation','End','variants','And','resolveSegment','journeys','2060772RiDnek','versionNumber','exit_criteria','version','Condition','journey','conditionTimeoutDuration','Goal\x20Achieved','exitCriterias','duration','folder_id','toLowerCase','Variant','Stage\x20Complete','resolveEmbeddedActivationId','unit','object','length','goal:','no_reentry','55Oekpgx','ABTest','name','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','data','*Max\x20wait\x20','reentry:','root_step','all_columns','journeyBundleName','Journey\x20description','percentage','version_number','First\x20stage\x20of\x20the\x20journey','embedded','journeyBundleId','73587CdumRu','timedOutPath','behavior','slice','map','\x20\x20\x20\x20conditions:\x0a','has','stages','activations:','2464tpJlGA','allowReentry','find','milestone','wait','merge','unique_id','Expected\x20format:\x0a','get','Merge','DaysOfTheWeek','isJourneyLocal','target','resolveActivationName','Stage\x201','state','type','replace','rootStep','values','10804266XParSN','waitStepType','rule','includes','segment_id','stringify','description','journeyActivationStepId','startsWith','daysOfWeek','\x27:\x20','\x20\x20\x20\x20type:\x20And\x0a','connection','reentry','ref','segment','day','waitStepUnit','705HkCrPZ','4048288pLOrFk','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','timeout','latest','124364GHgzgS','activation_template_id','segmentId','notification','days_of_week','size','week','entry_criteria','draft','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','Duration','segments','connector_config','stageName','versions','entryCriteria','stage','uuid','conditionTimeoutUnit','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','journeyStageId','from'];a147_0x47e6=function(){return _0x1d749e;};return a147_0x47e6();}import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x30a889){const _0x111b0e=a147_0x5076,_0x48cd66=_0x30a889[_0x111b0e(0x238)]();if(_0x48cd66===_0x111b0e(0x219)||_0x48cd66===_0x111b0e(0x27e))return _0x111b0e(0x27e);if(_0x48cd66==='weeks'||_0x48cd66===_0x111b0e(0x28b))return _0x111b0e(0x28b);return _0x30a889;}export function journeyResponseToDefSync(_0x54c7b4){const _0x243db8=a147_0x5076,_0x5a16bc=_0x54c7b4[_0x243db8(0x1e5)],_0x915b2a=_0x5a16bc[_0x243db8(0x24a)]||_0x5a16bc[_0x243db8(0x243)],_0x52907c={'stages':_0x5a16bc[_0x243db8(0x1ff)]['map'](convertApiStageToYaml),'id':_0x54c7b4['id']};_0x5a16bc[_0x243db8(0x2a0)]&&(_0x52907c[_0x243db8(0x2a0)]=convertApiCriteriaToYaml(_0x5a16bc[_0x243db8(0x2a0)]));_0x5a16bc['name']&&_0x5a16bc['name']!==_0x915b2a&&(_0x52907c[_0x243db8(0x230)]=_0x5a16bc[_0x243db8(0x243)]);_0x5a16bc[_0x243db8(0x22e)]!==undefined&&(_0x52907c[_0x243db8(0x24d)]=_0x5a16bc[_0x243db8(0x22e)]);_0x5a16bc[_0x243db8(0x269)]&&(_0x52907c[_0x243db8(0x269)]=_0x5a16bc['state']===_0x243db8(0x1fa)?'launched':'draft');const _0x2f1b12={'type':'journey','name':_0x915b2a,'journeys':[_0x52907c]};_0x5a16bc[_0x243db8(0x274)]&&(_0x2f1b12['description']=_0x5a16bc[_0x243db8(0x274)]);_0x5a16bc[_0x243db8(0x2a0)]&&(_0x2f1b12[_0x243db8(0x2a0)]=convertApiCriteriaToYaml(_0x5a16bc[_0x243db8(0x2a0)]));if(_0x5a16bc['reentryMode'])_0x2f1b12[_0x243db8(0x27b)]=_0x5a16bc['reentryMode'];else _0x5a16bc[_0x243db8(0x25b)]!==undefined&&(_0x2f1b12[_0x243db8(0x27b)]=_0x5a16bc[_0x243db8(0x25b)]?_0x243db8(0x1f2):_0x243db8(0x240));return _0x5a16bc['journeyBundleId']&&(_0x2f1b12[_0x243db8(0x1f4)]=_0x5a16bc[_0x243db8(0x250)]),_0x5a16bc[_0x243db8(0x24a)]&&(_0x2f1b12[_0x243db8(0x1e8)]=_0x5a16bc[_0x243db8(0x24a)]),_0x54c7b4['relationships']?.[_0x243db8(0x1e7)]?.[_0x243db8(0x245)]?.['id']&&(_0x2f1b12[_0x243db8(0x237)]=_0x54c7b4['relationships'][_0x243db8(0x1e7)][_0x243db8(0x245)]['id']),_0x2f1b12;}export async function journeyResponseToDef(_0x52a9a7,_0xfd9d20){const _0x2c3860=a147_0x5076,_0xe6c4a7=journeyResponseToDefSync(_0x52a9a7);if(!_0xfd9d20)return _0xe6c4a7;const _0x53251b=new Set();collectSegmentIdsFromJourney(_0xe6c4a7,_0x53251b);const _0x33b473=new Set();collectActivationIdsFromJourney(_0xe6c4a7,_0x33b473);const _0x13e9ba={},_0x6816af=new Map();for(const _0x369cbf of Array[_0x2c3860(0x29a)](_0x53251b)[_0x2c3860(0x220)]()){if(_0xfd9d20['resolveSegment']){const _0x22486c=await _0xfd9d20[_0x2c3860(0x22b)](_0x369cbf);if(_0x22486c[_0x2c3860(0x265)]){_0x6816af[_0x2c3860(0x1fc)](_0x369cbf,_0x22486c[_0x2c3860(0x243)]);if(_0x22486c[_0x2c3860(0x1ef)]){const _0x364606={..._0x22486c[_0x2c3860(0x1ef)],'rule':deepSortObject(_0x22486c['definition'][_0x2c3860(0x270)])};_0x13e9ba[_0x22486c[_0x2c3860(0x243)]]=_0x364606;}}else _0x6816af[_0x2c3860(0x1fc)](_0x369cbf,makeSegmentRef(_0x22486c[_0x2c3860(0x243)]));}else{if(_0xfd9d20[_0x2c3860(0x1fb)]){const _0x2649ea=await _0xfd9d20['resolveSegmentName'](_0x369cbf);_0x6816af[_0x2c3860(0x1fc)](_0x369cbf,_0x2649ea);}}}const _0x4fc464={},_0x2ed64e=new Map();for(const _0x2f1521 of Array[_0x2c3860(0x29a)](_0x33b473)[_0x2c3860(0x220)]()){if(_0xfd9d20[_0x2c3860(0x210)]){const _0xbac435=await _0xfd9d20[_0x2c3860(0x210)](_0x2f1521);_0xbac435[_0x2c3860(0x265)]?(_0x2ed64e[_0x2c3860(0x1fc)](_0x2f1521,_0xbac435['name']),_0xbac435[_0x2c3860(0x1ef)]&&(_0x4fc464[_0xbac435[_0x2c3860(0x243)]]=_0xbac435['definition'])):_0x2ed64e[_0x2c3860(0x1fc)](_0x2f1521,makeSegmentRef(_0xbac435[_0x2c3860(0x243)]));}else{if(_0xfd9d20[_0x2c3860(0x267)]){const _0x5d148b=await _0xfd9d20['resolveActivationName'](_0x2f1521);_0x2ed64e['set'](_0x2f1521,_0x5d148b);}}}_0x6816af[_0x2c3860(0x28a)]>0x0&&replaceSegmentIdsInJourney(_0xe6c4a7,_0x6816af);_0x2ed64e['size']>0x0&&replaceActivationIdsInJourney(_0xe6c4a7,_0x2ed64e);if(_0xfd9d20['resolveJumpTarget']){const _0x431aed=[];collectJumpTargetsFromJourney(_0xe6c4a7,_0x431aed);if(_0x431aed[_0x2c3860(0x23e)]>0x0){const _0x3c4a69=new Map();for(const _0x2b318d of _0x431aed){try{const _0x275a52=await _0xfd9d20['resolveJumpTarget'](_0x2b318d[_0x2c3860(0x224)],_0x2b318d[_0x2c3860(0x211)]);_0x3c4a69[_0x2c3860(0x1fc)](_0x2b318d[_0x2c3860(0x224)]+':'+_0x2b318d['stageId'],_0x275a52);}catch{}}_0x3c4a69[_0x2c3860(0x28a)]>0x0&&replaceJumpTargetsInJourney(_0xe6c4a7,_0x3c4a69);}}return Object[_0x2c3860(0x1fd)](_0x13e9ba)[_0x2c3860(0x23e)]>0x0&&(_0xe6c4a7['segments']=_0x13e9ba),Object[_0x2c3860(0x1fd)](_0x4fc464)[_0x2c3860(0x23e)]>0x0&&(_0xe6c4a7[_0x2c3860(0x1e3)]=_0x4fc464),_0xe6c4a7;}function collectSegmentIdsFromJourney(_0x4f1414,_0x10cd47){const _0x332ff1=a147_0x5076;_0x4f1414[_0x332ff1(0x2a0)]?.[_0x332ff1(0x27d)]&&_0x10cd47[_0x332ff1(0x1e9)](_0x4f1414[_0x332ff1(0x2a0)]['segment']);const _0xb83a16=_0x327348=>{const _0x514229=_0x332ff1;for(const _0x1bcc54 of _0x327348){_0x1bcc54[_0x514229(0x28c)]?.[_0x514229(0x27d)]&&_0x10cd47[_0x514229(0x1e9)](_0x1bcc54['entry_criteria']['segment']);if(_0x1bcc54[_0x514229(0x22f)])for(const _0x473f84 of _0x1bcc54['exit_criteria']){_0x473f84['segment']&&_0x10cd47[_0x514229(0x1e9)](_0x473f84[_0x514229(0x27d)]);}_0x1bcc54[_0x514229(0x25d)]?.['segment']&&_0x10cd47['add'](_0x1bcc54[_0x514229(0x25d)][_0x514229(0x27d)]);if(_0x1bcc54[_0x514229(0x1f1)])for(const _0x5d6f40 of _0x1bcc54[_0x514229(0x1f1)]){if(_0x5d6f40['type']===_0x514229(0x20b)){const _0x5d0e63=_0x5d6f40;for(const _0x34d5e2 of _0x5d0e63[_0x514229(0x1f7)][_0x514229(0x2a1)]){_0x34d5e2[_0x514229(0x27d)]&&_0x10cd47[_0x514229(0x1e9)](_0x34d5e2['segment']);}}else{if(_0x5d6f40[_0x514229(0x26a)]===_0x514229(0x25e)){const _0x12b2e7=_0x5d6f40;_0x12b2e7[_0x514229(0x1f7)][_0x514229(0x200)]?.['segment']&&_0x10cd47[_0x514229(0x1e9)](_0x12b2e7[_0x514229(0x1f7)]['condition']['segment']);}}}}};if(_0x4f1414['journeys'])for(const _0x1d47cd of _0x4f1414[_0x332ff1(0x22c)]){_0x1d47cd['goal']?.[_0x332ff1(0x27d)]&&_0x10cd47[_0x332ff1(0x1e9)](_0x1d47cd[_0x332ff1(0x2a0)][_0x332ff1(0x27d)]),_0xb83a16(_0x1d47cd[_0x332ff1(0x258)]);}_0x4f1414[_0x332ff1(0x258)]&&_0xb83a16(_0x4f1414[_0x332ff1(0x258)]);if(_0x4f1414['versions'])for(const _0x508869 of _0x4f1414[_0x332ff1(0x293)]){_0xb83a16(_0x508869[_0x332ff1(0x258)]);}}function replaceSegmentIdsInJourney(_0x578a21,_0x544822){const _0x1b925e=a147_0x5076,_0x52b02a=_0x213c38=>_0x544822['get'](_0x213c38)||_0x213c38;_0x578a21['goal']?.[_0x1b925e(0x27d)]&&(_0x578a21['goal'][_0x1b925e(0x27d)]=_0x52b02a(_0x578a21['goal']['segment']));const _0xf19665=_0x226e73=>{const _0xe35774=_0x1b925e;for(const _0x1e991c of _0x226e73){_0x1e991c[_0xe35774(0x28c)]?.[_0xe35774(0x27d)]&&(_0x1e991c[_0xe35774(0x28c)][_0xe35774(0x27d)]=_0x52b02a(_0x1e991c[_0xe35774(0x28c)][_0xe35774(0x27d)]));if(_0x1e991c[_0xe35774(0x22f)])for(const _0x385c92 of _0x1e991c[_0xe35774(0x22f)]){_0x385c92[_0xe35774(0x27d)]&&(_0x385c92['segment']=_0x52b02a(_0x385c92[_0xe35774(0x27d)]));}_0x1e991c['milestone']?.['segment']&&(_0x1e991c[_0xe35774(0x25d)][_0xe35774(0x27d)]=_0x52b02a(_0x1e991c['milestone'][_0xe35774(0x27d)]));if(_0x1e991c[_0xe35774(0x1f1)])for(const _0x2662b4 of _0x1e991c['steps']){if(_0x2662b4[_0xe35774(0x26a)]===_0xe35774(0x20b)){const _0x43b6a5=_0x2662b4;for(const _0x5bef41 of _0x43b6a5[_0xe35774(0x1f7)][_0xe35774(0x2a1)]){_0x5bef41[_0xe35774(0x27d)]&&(_0x5bef41['segment']=_0x52b02a(_0x5bef41[_0xe35774(0x27d)]));}}else{if(_0x2662b4['type']===_0xe35774(0x25e)){const _0x25476b=_0x2662b4;_0x25476b['with'][_0xe35774(0x200)]?.[_0xe35774(0x27d)]&&(_0x25476b[_0xe35774(0x1f7)]['condition'][_0xe35774(0x27d)]=_0x52b02a(_0x25476b[_0xe35774(0x1f7)][_0xe35774(0x200)][_0xe35774(0x27d)]));}}}}};if(_0x578a21['journeys'])for(const _0x25b2d0 of _0x578a21[_0x1b925e(0x22c)]){_0x25b2d0['goal']?.['segment']&&(_0x25b2d0['goal'][_0x1b925e(0x27d)]=_0x52b02a(_0x25b2d0[_0x1b925e(0x2a0)][_0x1b925e(0x27d)])),_0xf19665(_0x25b2d0[_0x1b925e(0x258)]);}_0x578a21[_0x1b925e(0x258)]&&_0xf19665(_0x578a21['stages']);if(_0x578a21[_0x1b925e(0x293)])for(const _0xae62c2 of _0x578a21[_0x1b925e(0x293)]){_0xf19665(_0xae62c2[_0x1b925e(0x258)]);}}function collectActivationIdsFromJourney(_0x242949,_0x4b0abd){const _0x4c590e=a147_0x5076,_0x5a6afb=_0x13daf8=>{const _0x770a27=a147_0x5076;for(const _0x1429fc of _0x13daf8){if(_0x1429fc['steps'])for(const _0x186a6d of _0x1429fc['steps']){if(_0x186a6d[_0x770a27(0x26a)]===_0x770a27(0x227)){const _0x1b1dbb=_0x186a6d;_0x1b1dbb[_0x770a27(0x1f7)][_0x770a27(0x227)]&&/^\d+$/['test'](_0x1b1dbb[_0x770a27(0x1f7)][_0x770a27(0x227)])&&_0x4b0abd[_0x770a27(0x1e9)](_0x1b1dbb[_0x770a27(0x1f7)]['activation']);}}}};if(_0x242949['journeys'])for(const _0x4f2188 of _0x242949[_0x4c590e(0x22c)]){_0x5a6afb(_0x4f2188[_0x4c590e(0x258)]);}_0x242949[_0x4c590e(0x258)]&&_0x5a6afb(_0x242949['stages']);if(_0x242949[_0x4c590e(0x293)])for(const _0x3e69c7 of _0x242949[_0x4c590e(0x293)]){_0x5a6afb(_0x3e69c7[_0x4c590e(0x258)]);}}function replaceActivationIdsInJourney(_0x2cc8b8,_0x1195f7){const _0x43aed8=a147_0x5076,_0x5b1ade=_0x34985c=>_0x1195f7['get'](_0x34985c)||_0x34985c,_0x3e6b7b=_0x22d0ba=>{const _0x4fa826=a147_0x5076;for(const _0x5cfa51 of _0x22d0ba){if(_0x5cfa51[_0x4fa826(0x1f1)])for(const _0x2bb75b of _0x5cfa51[_0x4fa826(0x1f1)]){if(_0x2bb75b[_0x4fa826(0x26a)]===_0x4fa826(0x227)){const _0x554954=_0x2bb75b;_0x554954[_0x4fa826(0x1f7)][_0x4fa826(0x227)]&&(_0x554954[_0x4fa826(0x1f7)][_0x4fa826(0x227)]=_0x5b1ade(_0x554954[_0x4fa826(0x1f7)][_0x4fa826(0x227)]));}}}};if(_0x2cc8b8['journeys'])for(const _0x43377d of _0x2cc8b8[_0x43aed8(0x22c)]){_0x3e6b7b(_0x43377d['stages']);}_0x2cc8b8[_0x43aed8(0x258)]&&_0x3e6b7b(_0x2cc8b8[_0x43aed8(0x258)]);if(_0x2cc8b8['versions'])for(const _0xf49045 of _0x2cc8b8[_0x43aed8(0x293)]){_0x3e6b7b(_0xf49045[_0x43aed8(0x258)]);}}function collectJumpTargetsFromJourney(_0x9a5bf2,_0x20d139){const _0x22d148=a147_0x5076,_0x3106a1=new Set(),_0x4c6f58=_0x28efce=>{const _0x1d82e8=a147_0x5076;for(const _0x11c4fc of _0x28efce){if(_0x11c4fc[_0x1d82e8(0x1f1)])for(const _0x52dfe0 of _0x11c4fc[_0x1d82e8(0x1f1)]){if(_0x52dfe0['type']===_0x1d82e8(0x1f6)){const _0x149180=_0x52dfe0,_0x5ee3a1=_0x149180[_0x1d82e8(0x1f7)][_0x1d82e8(0x266)];if(_0x5ee3a1[_0x1d82e8(0x232)]&&_0x5ee3a1[_0x1d82e8(0x295)]&&/^\d+$/[_0x1d82e8(0x1e6)](_0x5ee3a1[_0x1d82e8(0x232)])&&/^\d+$/[_0x1d82e8(0x1e6)](_0x5ee3a1['stage'])){const _0x4ec20b=_0x5ee3a1['journey']+':'+_0x5ee3a1[_0x1d82e8(0x295)];!_0x3106a1[_0x1d82e8(0x257)](_0x4ec20b)&&(_0x3106a1[_0x1d82e8(0x1e9)](_0x4ec20b),_0x20d139[_0x1d82e8(0x207)]({'journeyId':_0x5ee3a1[_0x1d82e8(0x232)],'stageId':_0x5ee3a1[_0x1d82e8(0x295)]}));}}}}};if(_0x9a5bf2[_0x22d148(0x22c)])for(const _0xcc615d of _0x9a5bf2['journeys']){_0x4c6f58(_0xcc615d['stages']);}_0x9a5bf2['stages']&&_0x4c6f58(_0x9a5bf2[_0x22d148(0x258)]);if(_0x9a5bf2['versions'])for(const _0x34e021 of _0x9a5bf2[_0x22d148(0x293)]){_0x4c6f58(_0x34e021[_0x22d148(0x258)]);}}function replaceJumpTargetsInJourney(_0x4450e8,_0x306242){const _0x195b4d=a147_0x5076,_0x5022bc=_0x71620f=>{const _0x4f1e8b=a147_0x5076;for(const _0x588b3e of _0x71620f){if(_0x588b3e[_0x4f1e8b(0x1f1)])for(const _0x34a66f of _0x588b3e['steps']){if(_0x34a66f[_0x4f1e8b(0x26a)]==='jump'){const _0x259f68=_0x34a66f,_0x56cb8f=_0x259f68['with'][_0x4f1e8b(0x266)],_0x5266fc=_0x56cb8f[_0x4f1e8b(0x232)]+':'+_0x56cb8f[_0x4f1e8b(0x295)],_0x18f8a1=_0x306242[_0x4f1e8b(0x262)](_0x5266fc);_0x18f8a1&&(_0x56cb8f[_0x4f1e8b(0x232)]=_0x18f8a1['journeyName'],_0x56cb8f[_0x4f1e8b(0x295)]=_0x18f8a1[_0x4f1e8b(0x292)]);}}}};if(_0x4450e8['journeys'])for(const _0x2c20f6 of _0x4450e8['journeys']){_0x5022bc(_0x2c20f6[_0x195b4d(0x258)]);}_0x4450e8[_0x195b4d(0x258)]&&_0x5022bc(_0x4450e8[_0x195b4d(0x258)]);if(_0x4450e8['versions'])for(const _0x3278d9 of _0x4450e8[_0x195b4d(0x293)]){_0x5022bc(_0x3278d9[_0x195b4d(0x258)]);}}function generateReadableStepName(_0x1dd1cb,_0x165a88){const _0x3a2f50=a147_0x5076;if(_0x1dd1cb[_0x3a2f50(0x243)]&&_0x1dd1cb[_0x3a2f50(0x243)]!==_0x1dd1cb[_0x3a2f50(0x26a)]){const _0x5e55d0=_0x1dd1cb['name'][_0x3a2f50(0x29e)]();if(_0x5e55d0&&/[a-z0-9\p{L}]/iu[_0x3a2f50(0x1e6)](_0x5e55d0))return _0x5e55d0;}const _0x2a877b=_0x1dd1cb[_0x3a2f50(0x26a)][_0x3a2f50(0x238)]()['replace'](/step$/i,'');return _0x2a877b+'_'+(_0x165a88+0x1);}function getStepNextRefs(_0x12c220){const _0x48cdba=a147_0x5076,_0x47ad53=[];if(_0x12c220[_0x48cdba(0x213)])_0x47ad53[_0x48cdba(0x207)](_0x12c220[_0x48cdba(0x213)]);if(_0x12c220[_0x48cdba(0x2a1)])for(const _0x15eb3f of _0x12c220[_0x48cdba(0x2a1)]){if(_0x15eb3f[_0x48cdba(0x213)])_0x47ad53[_0x48cdba(0x207)](_0x15eb3f['next']);}if(_0x12c220[_0x48cdba(0x229)])for(const _0x1580f5 of _0x12c220[_0x48cdba(0x229)]){if(_0x1580f5[_0x48cdba(0x213)])_0x47ad53[_0x48cdba(0x207)](_0x1580f5[_0x48cdba(0x213)]);}if(_0x12c220[_0x48cdba(0x1f0)])for(const _0x1251b7 of _0x12c220[_0x48cdba(0x1f0)]){if(_0x1251b7[_0x48cdba(0x213)])_0x47ad53[_0x48cdba(0x207)](_0x1251b7[_0x48cdba(0x213)]);}return _0x47ad53;}function parseJumpTargetDisplayName(_0x2fb854){const _0x2e3f5c=a147_0x5076,_0x7931e0=_0x2fb854['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x7931e0)return undefined;const _0x29e237=_0x7931e0[0x1][_0x2e3f5c(0x29e)](),_0x403a38=_0x7931e0[0x2][_0x2e3f5c(0x29e)]();if(!_0x29e237||!_0x403a38)return undefined;return{'stageName':_0x29e237,'journeyName':_0x403a38};}function orderStepsFromRoot(_0x3a5b11,_0x375bbb){const _0x3a5554=a147_0x5076,_0x431f42=Object['entries'](_0x3a5b11);if(_0x431f42['length']===0x0)return[];const _0x40b102=new Set(_0x431f42[_0x3a5554(0x255)](([_0x19b366])=>_0x19b366)),_0x540450=new Set();for(const [,_0x5a0a21]of _0x431f42){for(const _0x4f8e16 of getStepNextRefs(_0x5a0a21)){if(_0x40b102['has'](_0x4f8e16))_0x540450[_0x3a5554(0x1e9)](_0x4f8e16);}}let _0x3adf0f=_0x375bbb&&_0x40b102['has'](_0x375bbb)?_0x375bbb:undefined;if(!_0x3adf0f){const _0x327459=_0x431f42[_0x3a5554(0x215)](([_0x47ba15])=>!_0x540450[_0x3a5554(0x257)](_0x47ba15));_0x327459[_0x3a5554(0x23e)]>0x0?_0x3adf0f=_0x327459[0x0][0x0]:_0x3adf0f=_0x431f42[0x0][0x0];}const _0x2feddb=[],_0x10d7a0=new Set(),_0x8c2acd=[_0x3adf0f];while(_0x8c2acd['length']>0x0){const _0x1ec09b=_0x8c2acd[_0x3a5554(0x222)]();if(_0x10d7a0[_0x3a5554(0x257)](_0x1ec09b))continue;_0x10d7a0['add'](_0x1ec09b);const _0x2c12a0=_0x3a5b11[_0x1ec09b];if(!_0x2c12a0)continue;_0x2feddb[_0x3a5554(0x207)]({'uuid':_0x1ec09b,'step':_0x2c12a0});for(const _0x263090 of getStepNextRefs(_0x2c12a0)){_0x40b102[_0x3a5554(0x257)](_0x263090)&&!_0x10d7a0[_0x3a5554(0x257)](_0x263090)&&_0x8c2acd['push'](_0x263090);}}for(const [_0x53b6e0,_0x519f71]of _0x431f42){!_0x10d7a0[_0x3a5554(0x257)](_0x53b6e0)&&_0x2feddb[_0x3a5554(0x207)]({'uuid':_0x53b6e0,'step':_0x519f71});}return _0x2feddb;}function resolveStepReferences(_0x8cacca,_0x19c815,_0x2ba1bd,_0x15457b){const _0x11cdc9=a147_0x5076;if(_0x8cacca['type']!=='end'){_0x8cacca[_0x11cdc9(0x213)]&&_0x15457b[_0x11cdc9(0x257)](_0x8cacca[_0x11cdc9(0x213)])&&(_0x8cacca[_0x11cdc9(0x213)]=_0x15457b['get'](_0x8cacca['next']));const _0x26a932=_0x19c815+0x1;if(_0x26a932<_0x2ba1bd[_0x11cdc9(0x23e)]){const _0x36b5aa=_0x15457b[_0x11cdc9(0x262)](_0x2ba1bd[_0x26a932]['uuid']);_0x8cacca['next']===_0x36b5aa&&delete _0x8cacca[_0x11cdc9(0x213)];}}if(_0x8cacca['type']===_0x11cdc9(0x20b))for(const _0x449875 of _0x8cacca[_0x11cdc9(0x1f7)][_0x11cdc9(0x2a1)]){_0x449875[_0x11cdc9(0x213)]&&_0x15457b[_0x11cdc9(0x257)](_0x449875[_0x11cdc9(0x213)])&&(_0x449875[_0x11cdc9(0x213)]=_0x15457b['get'](_0x449875[_0x11cdc9(0x213)]));}if(_0x8cacca[_0x11cdc9(0x26a)]==='ab_test')for(const _0x711a88 of _0x8cacca[_0x11cdc9(0x1f7)][_0x11cdc9(0x229)]){_0x711a88[_0x11cdc9(0x213)]&&_0x15457b[_0x11cdc9(0x257)](_0x711a88[_0x11cdc9(0x213)])&&(_0x711a88['next']=_0x15457b[_0x11cdc9(0x262)](_0x711a88[_0x11cdc9(0x213)]));}if(_0x8cacca[_0x11cdc9(0x26a)]===_0x11cdc9(0x25e)&&_0x8cacca[_0x11cdc9(0x1f7)][_0x11cdc9(0x200)]){const _0x5c81d7=_0x8cacca[_0x11cdc9(0x1f7)][_0x11cdc9(0x200)];_0x5c81d7[_0x11cdc9(0x213)]&&_0x15457b[_0x11cdc9(0x257)](_0x5c81d7[_0x11cdc9(0x213)])&&(_0x5c81d7[_0x11cdc9(0x213)]=_0x15457b[_0x11cdc9(0x262)](_0x5c81d7[_0x11cdc9(0x213)])),_0x5c81d7[_0x11cdc9(0x283)]?.['next']&&_0x15457b[_0x11cdc9(0x257)](_0x5c81d7[_0x11cdc9(0x283)][_0x11cdc9(0x213)])&&(_0x5c81d7[_0x11cdc9(0x283)]['next']=_0x15457b[_0x11cdc9(0x262)](_0x5c81d7['timeout'][_0x11cdc9(0x213)]));}}function convertApiStageToYaml(_0x40a0c0){const _0x1aa127=a147_0x5076,_0x312cc6={'name':_0x40a0c0[_0x1aa127(0x243)]};_0x40a0c0['id']&&(_0x312cc6['id']=_0x40a0c0['id']);_0x40a0c0[_0x1aa127(0x274)]&&(_0x312cc6[_0x1aa127(0x274)]=_0x40a0c0[_0x1aa127(0x274)]);_0x40a0c0['entryCriteria']&&(_0x312cc6['entry_criteria']=convertApiCriteriaToYaml(_0x40a0c0[_0x1aa127(0x294)]));_0x40a0c0[_0x1aa127(0x235)]&&_0x40a0c0[_0x1aa127(0x235)][_0x1aa127(0x23e)]>0x0&&(_0x312cc6[_0x1aa127(0x22f)]=_0x40a0c0['exitCriterias'][_0x1aa127(0x255)](convertApiCriteriaToYaml));_0x40a0c0[_0x1aa127(0x25d)]&&(_0x312cc6[_0x1aa127(0x25d)]=convertApiCriteriaToYaml(_0x40a0c0[_0x1aa127(0x25d)]));if(_0x40a0c0[_0x1aa127(0x1f1)]&&Object[_0x1aa127(0x1fd)](_0x40a0c0['steps'])['length']>0x0){const _0x1e7994=orderStepsFromRoot(_0x40a0c0[_0x1aa127(0x1f1)],_0x40a0c0[_0x1aa127(0x26c)]),_0x505eb3=new Map(),_0x4b6be9=new Set();for(let _0x174683=0x0;_0x174683<_0x1e7994[_0x1aa127(0x23e)];_0x174683++){const {uuid:_0x18316f,step:_0x3d7fb2}=_0x1e7994[_0x174683];let _0x8f33c7=generateReadableStepName(_0x3d7fb2,_0x174683),_0x35aee9=_0x8f33c7,_0x5542e7=0x2;while(_0x4b6be9['has'](_0x35aee9)){_0x35aee9=_0x8f33c7+'_'+_0x5542e7,_0x5542e7++;}_0x4b6be9[_0x1aa127(0x1e9)](_0x35aee9),_0x505eb3[_0x1aa127(0x1fc)](_0x18316f,_0x35aee9);}_0x312cc6['steps']=_0x1e7994[_0x1aa127(0x255)](({uuid:_0x3037b3,step:_0x4e384f},_0x3b457c)=>{const _0x243165=_0x1aa127,_0x5e08fa=convertApiStepToYaml(_0x4e384f,_0x505eb3[_0x243165(0x262)](_0x3037b3));return resolveStepReferences(_0x5e08fa,_0x3b457c,_0x1e7994,_0x505eb3),_0x5e08fa;});}return _0x312cc6;}function convertApiCriteriaToYaml(_0x119a76){const _0x1fbd50=a147_0x5076,_0xb94c95={'name':_0x119a76['name'],'segment':_0x119a76[_0x1fbd50(0x287)]};_0x119a76[_0x1fbd50(0x274)]&&(_0xb94c95['description']=_0x119a76[_0x1fbd50(0x274)]);if(_0x119a76[_0x1fbd50(0x266)]){let _0x2327b3=_0x119a76[_0x1fbd50(0x266)][_0x1fbd50(0x224)],_0x4d8cf0=_0x119a76[_0x1fbd50(0x266)][_0x1fbd50(0x299)];if(_0x119a76['target'][_0x1fbd50(0x206)]){const _0x3b3f7a=parseJumpTargetDisplayName(_0x119a76[_0x1fbd50(0x266)][_0x1fbd50(0x206)]);_0x3b3f7a&&(_0x4d8cf0=_0x3b3f7a['stageName'],_0x2327b3=_0x3b3f7a[_0x1fbd50(0x206)]);}_0xb94c95[_0x1fbd50(0x266)]={'journey':_0x2327b3,'stage':_0x4d8cf0},_0x119a76[_0x1fbd50(0x266)]['journeyBundleId']&&(_0xb94c95[_0x1fbd50(0x266)][_0x1fbd50(0x1f4)]=_0x119a76[_0x1fbd50(0x266)][_0x1fbd50(0x250)]);}return _0xb94c95;}function convertApiStepToYaml(_0x28d052,_0x169b23){const _0x581d14=a147_0x5076;switch(_0x28d052[_0x581d14(0x26a)]){case _0x581d14(0x29b):{const _0x1e7eea={};if(_0x28d052[_0x581d14(0x26f)]===_0x581d14(0x28f)&&_0x28d052[_0x581d14(0x1ee)]!==undefined)_0x1e7eea[_0x581d14(0x236)]=_0x28d052[_0x581d14(0x1ee)],_0x1e7eea[_0x581d14(0x23c)]=_0x28d052[_0x581d14(0x27f)];else{if(_0x28d052[_0x581d14(0x26f)]==='Date'&&_0x28d052[_0x581d14(0x221)])_0x1e7eea[_0x581d14(0x1e4)]=_0x28d052[_0x581d14(0x221)];else{if(_0x28d052[_0x581d14(0x26f)]===_0x581d14(0x264)&&_0x28d052[_0x581d14(0x277)])_0x1e7eea[_0x581d14(0x289)]=_0x28d052[_0x581d14(0x277)];else{if(_0x28d052[_0x581d14(0x26f)]===_0x581d14(0x231)){if(_0x28d052[_0x581d14(0x1f0)]&&_0x28d052[_0x581d14(0x1f0)][_0x581d14(0x23e)]>0x0){const _0x76a5ed=_0x28d052[_0x581d14(0x1f0)][_0x581d14(0x25c)](_0x40b989=>!_0x40b989[_0x581d14(0x252)]),_0x3b1624=_0x28d052[_0x581d14(0x1f0)][_0x581d14(0x25c)](_0x5e2886=>_0x5e2886[_0x581d14(0x252)]);_0x76a5ed?.[_0x581d14(0x287)]&&(_0x1e7eea[_0x581d14(0x200)]={'segment':_0x76a5ed[_0x581d14(0x287)],..._0x76a5ed[_0x581d14(0x213)]?{'next':_0x76a5ed[_0x581d14(0x213)]}:{}},_0x3b1624&&_0x3b1624[_0x581d14(0x20e)]!==undefined&&_0x3b1624[_0x581d14(0x23c)]&&(_0x1e7eea[_0x581d14(0x200)][_0x581d14(0x283)]={'duration':_0x3b1624[_0x581d14(0x20e)],'unit':_0x3b1624[_0x581d14(0x23c)],..._0x3b1624['next']?{'next':_0x3b1624['next']}:{}}));}else _0x28d052[_0x581d14(0x216)]&&(_0x1e7eea[_0x581d14(0x200)]={'segment':_0x28d052[_0x581d14(0x216)]},_0x28d052[_0x581d14(0x233)]!==undefined&&_0x28d052[_0x581d14(0x297)]&&(_0x1e7eea[_0x581d14(0x200)][_0x581d14(0x283)]={'duration':_0x28d052[_0x581d14(0x233)],'unit':_0x28d052['conditionTimeoutUnit']}));}}}}const _0x337b24={'type':_0x581d14(0x25e),'name':_0x169b23,..._0x28d052[_0x581d14(0x213)]?{'next':_0x28d052['next']}:{},'with':_0x1e7eea};return _0x337b24;}case _0x581d14(0x203):{const _0x1f58c9={'type':'activation','name':_0x169b23,..._0x28d052[_0x581d14(0x213)]?{'next':_0x28d052['next']}:{},'with':{'activation':_0x28d052[_0x581d14(0x275)]||''}};return _0x1f58c9;}case _0x581d14(0x1f9):{const _0x122463={'type':'decision_point','name':_0x169b23,..._0x28d052[_0x581d14(0x213)]?{'next':_0x28d052[_0x581d14(0x213)]}:{},'with':{'branches':(_0x28d052['branches']||[])[_0x581d14(0x255)](_0x3c3c70=>({'name':_0x3c3c70[_0x581d14(0x243)],'segment':_0x3c3c70['segmentId'],'excluded':_0x3c3c70['excludedPath'],..._0x3c3c70[_0x581d14(0x213)]?{'next':_0x3c3c70[_0x581d14(0x213)]}:{}}))}};return _0x122463;}case _0x581d14(0x242):case'AbTest':case _0x581d14(0x239):{const _0x4172b3=_0x28d052[_0x581d14(0x229)]||(_0x28d052[_0x581d14(0x2a1)]||[])[_0x581d14(0x255)](_0x576064=>({'name':_0x576064['name'],'percentage':0x0,'next':_0x576064[_0x581d14(0x213)]})),_0x4a6556={'type':_0x581d14(0x20c),'name':_0x169b23,..._0x28d052[_0x581d14(0x213)]?{'next':_0x28d052[_0x581d14(0x213)]}:{},'with':{'customized_split':_0x28d052[_0x581d14(0x1fe)],'unique_id':_0x28d052['uniqueId'],'variants':_0x4172b3['map'](_0x294203=>({'name':_0x294203[_0x581d14(0x243)],'percentage':_0x294203[_0x581d14(0x24c)],..._0x294203[_0x581d14(0x213)]?{'next':_0x294203['next']}:{}}))}};return _0x4a6556;}case _0x581d14(0x263):{const _0x4a70a7={'type':_0x581d14(0x25f),'name':_0x169b23,..._0x28d052[_0x581d14(0x213)]?{'next':_0x28d052[_0x581d14(0x213)]}:{}};return _0x4a70a7;}case _0x581d14(0x1f8):{let _0x3ef459='',_0xbf5e43='',_0x1868e2;if(_0x28d052[_0x581d14(0x266)]){_0x3ef459=_0x28d052[_0x581d14(0x266)]['journeyId'],_0xbf5e43=_0x28d052[_0x581d14(0x266)]['journeyStageId'],_0x1868e2=_0x28d052[_0x581d14(0x266)][_0x581d14(0x250)];if(_0x28d052[_0x581d14(0x266)][_0x581d14(0x206)]){const _0x642d60=parseJumpTargetDisplayName(_0x28d052[_0x581d14(0x266)]['journeyName']);_0x642d60&&(_0xbf5e43=_0x642d60[_0x581d14(0x292)],_0x3ef459=_0x642d60[_0x581d14(0x206)]);}}const _0x2abcb={'type':_0x581d14(0x1f6),'name':_0x169b23,..._0x28d052[_0x581d14(0x213)]?{'next':_0x28d052[_0x581d14(0x213)]}:{},'with':{'target':{'journey':_0x3ef459,'stage':_0xbf5e43,..._0x1868e2?{'bundle_id':_0x1868e2}:{}}}};return _0x2abcb;}case _0x581d14(0x228):{const _0x301af6={'type':'end','name':_0x169b23};return _0x301af6;}default:{const _0x2ea309={'type':_0x581d14(0x20f),'name':_0x169b23};return _0x2ea309;}}}export async function journeyDefToRequest(_0x5da11a,_0x23bfef,_0x344d80){const _0x1a475e=a147_0x5076,_0x4677fb=_0x5da11a[_0x1a475e(0x258)]||getActiveStages(_0x5da11a),_0x796449=isJourneysArrayMode(_0x5da11a)||isMultiVersionMode(_0x5da11a)?getLatestJourneyEntry(_0x5da11a):undefined,_0x17a4ca=_0x796449?.['version']??_0x5da11a[_0x1a475e(0x243)],_0x13f96b=_0x5da11a[_0x1a475e(0x290)]||{},_0x5c1dfc=_0x5da11a[_0x1a475e(0x1e3)]||{},_0x21ab08={'type':'journey','attributes':{'name':_0x17a4ca,'audienceId':_0x23bfef,'journeyStages':await Promise[_0x1a475e(0x209)](_0x4677fb['map'](_0x19083c=>convertYamlStageToApi(_0x19083c,_0x344d80,_0x13f96b,_0x5c1dfc)))}},_0x2d7b7b=_0x796449?.['id']??_0x5da11a['id'];_0x2d7b7b&&(_0x21ab08['id']=_0x2d7b7b);_0x5da11a[_0x1a475e(0x274)]&&(_0x21ab08[_0x1a475e(0x1e5)]['description']=_0x5da11a['description']);const _0x265671=getEffectiveGoal(_0x5da11a);_0x265671&&(_0x21ab08[_0x1a475e(0x1e5)][_0x1a475e(0x2a0)]=await convertYamlCriteriaToApi(_0x265671,_0x344d80,_0x13f96b));const _0x2df3ef=getEffectiveReentry(_0x5da11a);return _0x2df3ef&&(_0x21ab08[_0x1a475e(0x1e5)]['reentryMode']=_0x2df3ef,_0x21ab08[_0x1a475e(0x1e5)][_0x1a475e(0x25b)]=_0x2df3ef!==_0x1a475e(0x240)),_0x5da11a[_0x1a475e(0x237)]&&(_0x21ab08[_0x1a475e(0x21f)]={'parentFolder':{'data':{'id':_0x5da11a[_0x1a475e(0x237)],'type':'folder'}}}),_0x21ab08;}async function convertYamlStageToApi(_0x1dca9b,_0x559ed8,_0x40442b={},_0x4aecc2={}){const _0x22dc43=a147_0x5076,_0x7451ce={'name':_0x1dca9b['name']};_0x1dca9b['id']&&(_0x7451ce['id']=_0x1dca9b['id']);_0x1dca9b['description']&&(_0x7451ce[_0x22dc43(0x274)]=_0x1dca9b[_0x22dc43(0x274)]);_0x1dca9b[_0x22dc43(0x28c)]&&(_0x7451ce[_0x22dc43(0x294)]=await convertYamlCriteriaToApi(_0x1dca9b[_0x22dc43(0x28c)],_0x559ed8,_0x40442b));_0x1dca9b[_0x22dc43(0x22f)]&&_0x1dca9b[_0x22dc43(0x22f)][_0x22dc43(0x23e)]>0x0&&(_0x7451ce[_0x22dc43(0x235)]=await Promise[_0x22dc43(0x209)](_0x1dca9b[_0x22dc43(0x22f)]['map'](_0x1487fd=>convertYamlCriteriaToApi(_0x1487fd,_0x559ed8,_0x40442b))));_0x1dca9b[_0x22dc43(0x25d)]&&(_0x7451ce[_0x22dc43(0x25d)]=await convertYamlCriteriaToApi(_0x1dca9b[_0x22dc43(0x25d)],_0x559ed8,_0x40442b));if(_0x1dca9b[_0x22dc43(0x1f1)]&&_0x1dca9b[_0x22dc43(0x1f1)][_0x22dc43(0x23e)]>0x0){const _0x131428={},_0x2a8fbc=_0x1dca9b[_0x22dc43(0x1f1)][_0x22dc43(0x255)]((_0x1b6f34,_0x3c5420)=>{const _0x3570c4=_0x22dc43,_0x52e329=_0x1b6f34[_0x3570c4(0x296)]||generateUUID(),_0x22cf98=_0x1b6f34[_0x3570c4(0x243)]||_0x1b6f34['type']+'_'+_0x3c5420;return _0x131428[_0x22cf98]=_0x52e329,{..._0x1b6f34,'name':_0x22cf98};});_0x7451ce[_0x22dc43(0x26c)]=_0x131428[_0x2a8fbc[0x0][_0x22dc43(0x243)]],_0x7451ce[_0x22dc43(0x1f1)]={};for(let _0x159389=0x0;_0x159389<_0x2a8fbc[_0x22dc43(0x23e)];_0x159389++){const _0x878c6=_0x2a8fbc[_0x159389],_0x4db08d=_0x131428[_0x878c6[_0x22dc43(0x243)]],_0x5ebd25=!_0x878c6[_0x22dc43(0x213)]&&_0x159389<_0x2a8fbc[_0x22dc43(0x23e)]-0x1&&_0x878c6[_0x22dc43(0x26a)]!==_0x22dc43(0x20f)?_0x2a8fbc[_0x159389+0x1][_0x22dc43(0x243)]:_0x878c6[_0x22dc43(0x213)],_0x5162ac=_0x5ebd25!==_0x878c6['next']?{..._0x878c6,'next':_0x5ebd25}:_0x878c6;_0x7451ce[_0x22dc43(0x1f1)][_0x4db08d]=await convertYamlStepToApi(_0x5162ac,_0x559ed8,_0x40442b,_0x131428,_0x4aecc2);}}else _0x1dca9b[_0x22dc43(0x248)]&&(_0x7451ce[_0x22dc43(0x26c)]=_0x1dca9b['root_step']);return _0x7451ce;}async function convertYamlCriteriaToApi(_0x400935,_0x47433f,_0x390f87={}){const _0x28640c=a147_0x5076;let _0x546e91=_0x400935[_0x28640c(0x27d)];if(_0x546e91&&!/^\d+$/[_0x28640c(0x1e6)](_0x546e91)){const _0x5a98ee=parseSegmentRef(_0x546e91);if(_0x5a98ee[_0x28640c(0x26a)]==='ref')_0x47433f?.[_0x28640c(0x226)]&&(_0x546e91=await _0x47433f['resolveSegmentId'](_0x5a98ee[_0x28640c(0x243)]));else{if(_0x5a98ee[_0x28640c(0x26a)]===_0x28640c(0x24f)&&_0x390f87[_0x5a98ee['name']])_0x47433f?.[_0x28640c(0x2a3)]&&(_0x546e91=await _0x47433f[_0x28640c(0x2a3)](_0x5a98ee[_0x28640c(0x243)],_0x390f87[_0x5a98ee[_0x28640c(0x243)]]));else _0x47433f?.[_0x28640c(0x226)]&&(_0x546e91=await _0x47433f[_0x28640c(0x226)](_0x5a98ee[_0x28640c(0x243)]));}}const _0x57c9d0={'name':_0x400935[_0x28640c(0x243)],'segmentId':_0x546e91};_0x400935['description']&&(_0x57c9d0[_0x28640c(0x274)]=_0x400935[_0x28640c(0x274)]);if(_0x400935[_0x28640c(0x266)]){const _0x52ddd5=_0x400935[_0x28640c(0x266)][_0x28640c(0x232)],_0x367f9f=_0x400935[_0x28640c(0x266)][_0x28640c(0x295)];let _0x3a84d1=_0x400935[_0x28640c(0x266)]['journey'];_0x47433f?.['resolveJourneyId']&&!/^\d+$/[_0x28640c(0x1e6)](_0x3a84d1)&&(_0x3a84d1=await _0x47433f[_0x28640c(0x1ec)](_0x3a84d1));let _0x17dd5f=_0x400935[_0x28640c(0x266)][_0x28640c(0x295)];_0x47433f?.[_0x28640c(0x20d)]&&!/^\d+$/[_0x28640c(0x1e6)](_0x17dd5f)&&(_0x17dd5f=await _0x47433f[_0x28640c(0x20d)](_0x3a84d1,_0x17dd5f));const _0x3c17f4=!/^\d+$/[_0x28640c(0x1e6)](_0x52ddd5)&&!isLocalJourneyRef(_0x52ddd5)?formatApiJourneyName(_0x52ddd5,_0x367f9f):undefined;_0x57c9d0[_0x28640c(0x266)]={'journeyId':_0x3a84d1,'journeyStageId':_0x17dd5f,'journeyName':_0x3c17f4,'confirmed':!![]},_0x400935[_0x28640c(0x266)][_0x28640c(0x1f4)]&&(_0x57c9d0[_0x28640c(0x266)]['journeyBundleId']=_0x400935[_0x28640c(0x266)]['bundle_id']);}return _0x57c9d0;}async function convertYamlStepToApi(_0x32c253,_0x505806,_0x20fe9c={},_0x5e0be0={},_0x471597={}){const _0x3659a0=a147_0x5076,_0x465bcb=async _0x1a88ef=>{const _0x107314=a147_0x5076;if(/^\d+$/['test'](_0x1a88ef))return _0x1a88ef;const _0x4fbe17=parseSegmentRef(_0x1a88ef);if(_0x4fbe17['type']===_0x107314(0x27c)){if(_0x505806?.[_0x107314(0x226)])return await _0x505806[_0x107314(0x226)](_0x4fbe17[_0x107314(0x243)]);}else{if(_0x4fbe17[_0x107314(0x26a)]==='embedded'&&_0x20fe9c[_0x4fbe17[_0x107314(0x243)]]){if(_0x505806?.[_0x107314(0x2a3)])return await _0x505806[_0x107314(0x2a3)](_0x4fbe17[_0x107314(0x243)],_0x20fe9c[_0x4fbe17['name']]);}else{if(_0x505806?.[_0x107314(0x226)])return await _0x505806[_0x107314(0x226)](_0x4fbe17[_0x107314(0x243)]);}}return _0x1a88ef;},_0x19070e=async _0x4fc672=>{const _0x2fed53=a147_0x5076;if(/^\d+$/[_0x2fed53(0x1e6)](_0x4fc672))return _0x4fc672;const _0x2f76c6=parseSegmentRef(_0x4fc672);if(_0x2f76c6[_0x2fed53(0x26a)]===_0x2fed53(0x27c)){if(_0x505806?.[_0x2fed53(0x1e2)])return await _0x505806[_0x2fed53(0x1e2)](_0x2f76c6[_0x2fed53(0x243)]);return _0x2f76c6['name'];}else{if(_0x2f76c6['type']==='embedded'&&_0x471597[_0x2f76c6[_0x2fed53(0x243)]]){if(_0x505806?.[_0x2fed53(0x23b)])return await _0x505806[_0x2fed53(0x23b)](_0x2f76c6['name'],_0x471597[_0x2f76c6[_0x2fed53(0x243)]]);if(_0x505806?.['resolveActivationId'])return await _0x505806['resolveActivationId'](_0x2f76c6['name']);}else{if(_0x505806?.[_0x2fed53(0x1e2)])return await _0x505806['resolveActivationId'](_0x2f76c6[_0x2fed53(0x243)]);}}return _0x4fc672;},_0x28f523=_0x5e9a7a=>{const _0x570f45=a147_0x5076;if(!_0x5e9a7a)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x570f45(0x1e6)](_0x5e9a7a))return _0x5e9a7a;return _0x5e0be0[_0x5e9a7a]||_0x5e9a7a;};switch(_0x32c253[_0x3659a0(0x26a)]){case'wait':{const _0x4ede7b=_0x32c253,_0x118a49=_0x4ede7b[_0x3659a0(0x1f7)],_0x1b0610={'type':_0x3659a0(0x29b),'name':_0x4ede7b['name'],'next':_0x28f523(_0x4ede7b[_0x3659a0(0x213)])};if(_0x118a49[_0x3659a0(0x236)]!==undefined&&_0x118a49[_0x3659a0(0x23c)])_0x1b0610[_0x3659a0(0x26f)]=_0x3659a0(0x28f),_0x1b0610[_0x3659a0(0x1ee)]=_0x118a49['duration'],_0x1b0610[_0x3659a0(0x27f)]=normalizeWaitUnit(_0x118a49[_0x3659a0(0x23c)]);else{if(_0x118a49[_0x3659a0(0x1e4)])_0x1b0610[_0x3659a0(0x26f)]=_0x3659a0(0x21b),_0x1b0610[_0x3659a0(0x221)]=_0x118a49[_0x3659a0(0x1e4)];else{if(_0x118a49['days_of_week'])_0x1b0610['waitStepType']=_0x3659a0(0x264),_0x1b0610[_0x3659a0(0x277)]=_0x118a49[_0x3659a0(0x289)];else{if(_0x118a49['condition']){_0x1b0610['waitStepType']=_0x3659a0(0x231);const _0x3306d3=await _0x465bcb(_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x27d)]),_0x40aa33=_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x283)]?.['next']!==undefined;if(_0x40aa33){const _0x58aaa4=[];_0x58aaa4[_0x3659a0(0x207)]({'id':generateUUID(),'segmentId':_0x3306d3,'timedOutPath':![],'name':_0x3659a0(0x1f5),'next':_0x28f523(_0x118a49['condition'][_0x3659a0(0x213)]??_0x4ede7b[_0x3659a0(0x213)])});if(_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x283)]){const _0x131a88=_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x283)][_0x3659a0(0x236)],_0x360318=normalizeWaitUnit(_0x118a49['condition'][_0x3659a0(0x283)]['unit']);_0x58aaa4[_0x3659a0(0x207)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x3659a0(0x246)+_0x131a88+'\x20'+_0x360318,'moveAfter':_0x131a88,'unit':_0x360318,'next':_0x28f523(_0x118a49['condition'][_0x3659a0(0x283)][_0x3659a0(0x213)])});}_0x1b0610[_0x3659a0(0x1f0)]=_0x58aaa4,delete _0x1b0610['next'];}else _0x1b0610[_0x3659a0(0x216)]=_0x3306d3,_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x283)]&&(_0x1b0610[_0x3659a0(0x233)]=_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x283)]['duration'],_0x118a49[_0x3659a0(0x200)][_0x3659a0(0x283)][_0x3659a0(0x23c)]&&(_0x1b0610[_0x3659a0(0x297)]=normalizeWaitUnit(_0x118a49['condition'][_0x3659a0(0x283)][_0x3659a0(0x23c)])));}}}}return _0x1b0610;}case _0x3659a0(0x227):{const _0x28502b=_0x32c253,_0x303b90=_0x28502b['with'][_0x3659a0(0x227)],_0x534f03=await _0x19070e(_0x303b90);return{'type':_0x3659a0(0x203),'name':_0x28502b[_0x3659a0(0x243)],'journeyActivationStepId':_0x534f03,'next':_0x28f523(_0x28502b[_0x3659a0(0x213)])};}case _0x3659a0(0x20b):{const _0x518386=_0x32c253,_0x743b20=_0x518386[_0x3659a0(0x1f7)][_0x3659a0(0x2a1)];return{'type':_0x3659a0(0x1f9),'name':_0x518386[_0x3659a0(0x243)],'branches':await Promise['all'](_0x743b20[_0x3659a0(0x255)](async _0x1f6088=>{const _0x3a47b5=_0x3659a0;let _0x11b080='';if(!_0x1f6088['excluded']){const _0x1b1585=_0x1f6088['segment']||_0x1f6088[_0x3a47b5(0x272)]||'';_0x11b080=_0x1b1585?await _0x465bcb(_0x1b1585):'';}return{'id':crypto[_0x3a47b5(0x21d)](),'name':_0x1f6088[_0x3a47b5(0x243)],'description':null,'segmentId':_0x11b080,'excludedPath':_0x1f6088[_0x3a47b5(0x21c)]??![],'next':_0x28f523(_0x1f6088[_0x3a47b5(0x213)])};})),'next':_0x28f523(_0x518386[_0x3659a0(0x213)])};}case _0x3659a0(0x20c):{const _0x3b1217=_0x32c253,_0x141fb3=_0x3b1217['with'];return{'type':_0x3659a0(0x242),'name':_0x3b1217['name'],'customizedSplit':_0x141fb3[_0x3659a0(0x21e)],'uniqueId':_0x141fb3[_0x3659a0(0x260)],'variants':_0x141fb3['variants']['map'](_0x23468b=>({'id':_0x23468b['id']||generateUUID(),'name':_0x23468b[_0x3659a0(0x243)],'percentage':_0x23468b[_0x3659a0(0x24c)],'next':_0x28f523(_0x23468b[_0x3659a0(0x213)])})),'next':_0x28f523(_0x3b1217['next'])};}case _0x3659a0(0x25f):return{'type':_0x3659a0(0x263),'name':_0x32c253[_0x3659a0(0x243)],'next':_0x28f523(_0x32c253['next'])};case'jump':{const _0xc34f83=_0x32c253,_0x14dbe2=_0xc34f83[_0x3659a0(0x1f7)]['target'],_0x45ef8b=_0x14dbe2[_0x3659a0(0x232)],_0x3a6750=_0x14dbe2['stage'];let _0x4e7232=_0x14dbe2[_0x3659a0(0x232)];_0x505806?.['resolveJourneyId']&&!/^\d+$/[_0x3659a0(0x1e6)](_0x4e7232)&&(_0x4e7232=await _0x505806['resolveJourneyId'](_0x4e7232));let _0x505c37=_0x14dbe2['stage'];_0x505806?.[_0x3659a0(0x20d)]&&!/^\d+$/['test'](_0x505c37)&&(_0x505c37=await _0x505806[_0x3659a0(0x20d)](_0x4e7232,_0x505c37));const _0x3fc5a7=!/^\d+$/['test'](_0x45ef8b)&&!isLocalJourneyRef(_0x45ef8b)?formatApiJourneyName(_0x45ef8b,_0x3a6750):undefined;return{'type':'Jump','name':_0xc34f83['name'],'target':{'journeyId':_0x4e7232,'journeyStageId':_0x505c37,'journeyBundleId':_0x14dbe2[_0x3659a0(0x1f4)],'journeyName':_0x3fc5a7,'confirmed':!![]},'next':_0x28f523(_0xc34f83[_0x3659a0(0x213)])};}case _0x3659a0(0x20f):return{'type':_0x3659a0(0x228),'name':_0x32c253[_0x3659a0(0x243)]};default:{const _0x5319cc=_0x32c253;return{'type':_0x3659a0(0x228),'name':_0x5319cc[_0x3659a0(0x243)]};}}}export function toYamlString(_0x4ff53e){const _0x4c91c6=a147_0x5076,_0x456394=stripInternalFields(_0x4ff53e),_0x292e09=a147_0x2b5319[_0x4c91c6(0x273)](_0x456394,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x4c91c6(0x1f3)}),_0x390ff7=['segments:',_0x4c91c6(0x259),_0x4c91c6(0x23f),_0x4c91c6(0x247),_0x4c91c6(0x217),_0x4c91c6(0x204),_0x4c91c6(0x29f)];let _0x31bcf8=_0x292e09;for(const _0x2083f4 of _0x390ff7){_0x31bcf8=_0x31bcf8[_0x4c91c6(0x26b)](new RegExp('^('+_0x2083f4+')','m'),(_0x2e398c,_0x50d67f,_0x442512)=>{if(_0x442512===0x0||_0x31bcf8[_0x442512-0x1]==='\x0a'&&_0x31bcf8[_0x442512-0x2]==='\x0a')return _0x50d67f;return'\x0a'+_0x50d67f;});}return _0x31bcf8;}function stripInternalFields(_0x3e1b85){const _0x4b5c34=a147_0x5076,{id:_0x516eb4,folder_id:_0x35fe5d,bundle_id:_0x387d70,bundle_name:_0x2096ba,version:_0x3aa41e,allow_reentry:_0x39c806,..._0x31ed46}=_0x3e1b85;return _0x31ed46['journeys']&&(_0x31ed46['journeys']=_0x31ed46[_0x4b5c34(0x22c)]['map'](_0x1ede86=>{const _0x598187=_0x4b5c34,{id:_0x367e68,..._0x1804a7}=_0x1ede86;return{..._0x1804a7,'stages':_0x1804a7[_0x598187(0x258)][_0x598187(0x255)](stripStageInternalFields),..._0x1ede86[_0x598187(0x284)]===!![]?{'latest':!![]}:{},..._0x31ed46[_0x598187(0x22c)]['length']===0x1&&_0x1804a7[_0x598187(0x230)]==='v1'?{'version':undefined}:{}};})),_0x31ed46[_0x4b5c34(0x258)]&&(_0x31ed46[_0x4b5c34(0x258)]=_0x31ed46['stages'][_0x4b5c34(0x255)](stripStageInternalFields)),_0x31ed46[_0x4b5c34(0x293)]&&(_0x31ed46['versions']=_0x31ed46[_0x4b5c34(0x293)][_0x4b5c34(0x255)](_0x408e4b=>{const _0x495606=_0x4b5c34,{id:_0x316b4c,..._0x5a65cf}=_0x408e4b;return{..._0x5a65cf,'stages':_0x5a65cf[_0x495606(0x258)]['map'](stripStageInternalFields),..._0x408e4b['latest']===!![]?{'latest':!![]}:{}};})),_0x31ed46;}function stripStageInternalFields(_0x2542fb){const {id:_0x491e8f,..._0x529e68}=_0x2542fb;return _0x529e68;}export function parseYamlString(_0x1ff07d){return safeParseYaml(_0x1ff07d,JourneyDefSchema);}export function isJourneyDef(_0x12c634){const _0x5de0f4=a147_0x5076;return typeof _0x12c634===_0x5de0f4(0x23d)&&_0x12c634!==null&&_0x5de0f4(0x26a)in _0x12c634&&_0x12c634[_0x5de0f4(0x26a)]===_0x5de0f4(0x232);}export function generateTemplate(_0x27073f,_0x28c3de){const _0x3966e7=a147_0x5076,_0xf5e635={'type':_0x3966e7(0x232),'name':_0x27073f,'description':_0x3966e7(0x24b),'reentry':'no_reentry','goal':{'name':_0x3966e7(0x234),'segment':'goal-segment'},'stages':[{'name':_0x3966e7(0x268),'description':_0x3966e7(0x24e),'entry_criteria':{'name':_0x3966e7(0x29d),'segment':_0x28c3de},'steps':[{'type':'wait','name':_0x3966e7(0x1ea),'with':{'duration':0x1,'unit':_0x3966e7(0x27e)}},{'type':_0x3966e7(0x227),'name':_0x3966e7(0x201),'with':{'activation':_0x3966e7(0x1ed)}},{'type':_0x3966e7(0x20f),'name':_0x3966e7(0x23a)}]}]};return toYamlString(_0xf5e635);}function generateUUID(){const _0x18892c=a147_0x5076;return crypto[_0x18892c(0x21d)]();}export const SEGMENT_REF_PREFIX=a147_0x3557e0(0x20a);export function parseSegmentRef(_0x5aad22){const _0x480afb=a147_0x3557e0;if(_0x5aad22[_0x480afb(0x276)](SEGMENT_REF_PREFIX))return{'type':_0x480afb(0x27c),'name':_0x5aad22[_0x480afb(0x254)](SEGMENT_REF_PREFIX['length'])};if(/^\d+$/[_0x480afb(0x1e6)](_0x5aad22))return{'type':'id','name':_0x5aad22};return{'type':_0x480afb(0x24f),'name':_0x5aad22};}export function makeSegmentRef(_0x554b49){return''+SEGMENT_REF_PREFIX+_0x554b49;}export function isExternalSegmentRef(_0x2ec7e2){const _0x512ab5=a147_0x3557e0;return _0x2ec7e2[_0x512ab5(0x276)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x4dccd3){const _0x15b3b5=a147_0x3557e0;return!!(_0x4dccd3[_0x15b3b5(0x22c)]&&_0x4dccd3[_0x15b3b5(0x22c)][_0x15b3b5(0x23e)]>0x0);}export function isMultiVersionMode(_0x1f30cf){const _0x1ef950=a147_0x3557e0;return!!(_0x1f30cf['versions']&&_0x1f30cf[_0x1ef950(0x293)][_0x1ef950(0x23e)]>0x0);}export function isSingleVersionMode(_0x352924){const _0x4f6ff2=a147_0x3557e0;return!!(_0x352924[_0x4f6ff2(0x258)]&&_0x352924['stages'][_0x4f6ff2(0x23e)]>0x0);}export function hasMultipleVersions(_0x4ff98e){const _0x3dfe63=a147_0x3557e0;if(isJourneysArrayMode(_0x4ff98e))return(_0x4ff98e['journeys']?.[_0x3dfe63(0x23e)]||0x0)>0x1;if(isMultiVersionMode(_0x4ff98e))return(_0x4ff98e['versions']?.[_0x3dfe63(0x23e)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0xd90b2c){const _0x18c2af=a147_0x3557e0;if(isJourneysArrayMode(_0xd90b2c))return _0xd90b2c;if(isSingleVersionMode(_0xd90b2c)){const {stages:_0x2124ad,id:_0x40f7a4,version:_0x1e45be,version_number:_0x29e708,..._0x4ec46b}=_0xd90b2c;return{..._0x4ec46b,'journeys':[{'version':_0x1e45be||'v1','stages':_0x2124ad||[],'id':_0x40f7a4,'version_number':_0x29e708}]};}if(isMultiVersionMode(_0xd90b2c)){const {versions:_0x5cfe95,..._0x5093c8}=_0xd90b2c;return{..._0x5093c8,'journeys':(_0x5cfe95||[])[_0x18c2af(0x255)](_0x1efc75=>({'version':_0x1efc75[_0x18c2af(0x243)],'state':_0x1efc75['state'],'latest':_0x1efc75[_0x18c2af(0x284)],'stages':_0x1efc75[_0x18c2af(0x258)],'id':_0x1efc75['id'],'version_number':_0x1efc75[_0x18c2af(0x24d)]}))};}return _0xd90b2c;}export function normalizeJourneyDef(_0xe78acd,_0x55ec8f){const _0xbf9274=a147_0x3557e0,_0x104a34=normalizeToJourneysFormat(_0xe78acd),_0x3cc67e=_0x55ec8f?.[_0xbf9274(0x290)]?Object[_0xbf9274(0x1fd)](_0x55ec8f[_0xbf9274(0x290)]):undefined,_0x2514dd=_0x55ec8f?.[_0xbf9274(0x1e3)]?Object[_0xbf9274(0x1fd)](_0x55ec8f['activations']):undefined;return{'type':_0xbf9274(0x232),'name':_0x104a34[_0xbf9274(0x243)],..._0x104a34['description']!==undefined&&{'description':_0x104a34[_0xbf9274(0x274)]},..._0x104a34[_0xbf9274(0x2a0)]&&{'goal':normalizeJourneyCriteria(_0x104a34[_0xbf9274(0x2a0)])},..._0x104a34[_0xbf9274(0x27b)]!==undefined&&{'reentry':_0x104a34[_0xbf9274(0x27b)]},..._0x104a34[_0xbf9274(0x290)]&&{'segments':normalizeEmbeddedSegments(_0x104a34[_0xbf9274(0x290)],_0x3cc67e)},..._0x104a34['activations']&&{'activations':normalizeEmbeddedActivations(_0x104a34['activations'],_0x2514dd)},..._0x104a34[_0xbf9274(0x22c)]&&{'journeys':_0x104a34['journeys'][_0xbf9274(0x255)](_0x5a3a0a=>normalizeJourneyEntry(_0x5a3a0a,_0x104a34[_0xbf9274(0x22c)][_0xbf9274(0x23e)]===0x1))}};}function normalizeJourneyEntry(_0x279c83,_0x2af6e7){const _0x499798=a147_0x3557e0;return{...!_0x2af6e7&&_0x279c83['version']!==undefined&&{'version':_0x279c83['version']},..._0x279c83[_0x499798(0x269)]!==undefined&&{'state':_0x279c83[_0x499798(0x269)]},...!_0x2af6e7&&_0x279c83[_0x499798(0x284)]!==undefined&&{'latest':_0x279c83[_0x499798(0x284)]},..._0x279c83[_0x499798(0x24d)]!==undefined&&{'version_number':_0x279c83['version_number']},..._0x279c83['goal']&&{'goal':normalizeJourneyCriteria(_0x279c83[_0x499798(0x2a0)])},..._0x279c83[_0x499798(0x27b)]!==undefined&&{'reentry':_0x279c83[_0x499798(0x27b)]},'stages':_0x279c83[_0x499798(0x258)][_0x499798(0x255)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x2c3a2f){const _0x4c77d3=a147_0x3557e0;return{'name':_0x2c3a2f[_0x4c77d3(0x243)],..._0x2c3a2f['description']!==undefined&&{'description':_0x2c3a2f['description']},..._0x2c3a2f['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0x2c3a2f[_0x4c77d3(0x28c)])},..._0x2c3a2f[_0x4c77d3(0x22f)]&&{'exit_criteria':_0x2c3a2f[_0x4c77d3(0x22f)][_0x4c77d3(0x255)](normalizeJourneyCriteria)},..._0x2c3a2f['milestone']&&{'milestone':normalizeJourneyCriteria(_0x2c3a2f[_0x4c77d3(0x25d)])},..._0x2c3a2f[_0x4c77d3(0x1f1)]&&{'steps':normalizeStepsWithImplicitNext(_0x2c3a2f['steps'])}};}function normalizeStepsWithImplicitNext(_0x285b26){const _0x1f9dd3=a147_0x3557e0;return _0x285b26[_0x1f9dd3(0x255)]((_0x5df47f,_0x215ab7)=>{const _0x2382c9=_0x1f9dd3,_0x4e5a1c=_0x215ab7<_0x285b26[_0x2382c9(0x23e)]-0x1?_0x285b26[_0x215ab7+0x1]['name']:undefined;return normalizeJourneyStep(_0x5df47f,_0x4e5a1c);});}function normalizeJourneyCriteria(_0x23cdb6){const _0x35c22a=a147_0x3557e0;return{'name':_0x23cdb6[_0x35c22a(0x243)],..._0x23cdb6[_0x35c22a(0x274)]!==undefined&&{'description':_0x23cdb6[_0x35c22a(0x274)]},'segment':_0x23cdb6[_0x35c22a(0x27d)],..._0x23cdb6[_0x35c22a(0x266)]&&{'target':normalizeJumpTarget(_0x23cdb6[_0x35c22a(0x266)])}};}function normalizeJourneyStep(_0x5e3c83,_0x4ab0be){const _0x383b25=a147_0x3557e0,_0x921451=_0x5e3c83[_0x383b25(0x213)]!==undefined&&_0x5e3c83[_0x383b25(0x213)]!==_0x4ab0be,_0x185850={'type':_0x5e3c83[_0x383b25(0x26a)],'name':_0x5e3c83[_0x383b25(0x243)],..._0x921451&&{'next':_0x5e3c83[_0x383b25(0x213)]}};if(_0x383b25(0x1f7)in _0x5e3c83&&_0x5e3c83[_0x383b25(0x1f7)])return{..._0x185850,'with':normalizeStepParams(_0x5e3c83[_0x383b25(0x26a)],_0x5e3c83['with'])};return _0x185850;}function normalizeStepParams(_0x341ac8,_0x2a1614){const _0x184e8c=a147_0x3557e0;switch(_0x341ac8){case'wait':{const _0xdcc993=_0x2a1614;let _0x29786b;return _0xdcc993['condition']&&(_0x29786b={'segment':_0xdcc993[_0x184e8c(0x200)][_0x184e8c(0x27d)],..._0xdcc993[_0x184e8c(0x200)]['next']!==undefined&&{'next':_0xdcc993[_0x184e8c(0x200)]['next']},..._0xdcc993[_0x184e8c(0x200)][_0x184e8c(0x283)]&&{'timeout':{'duration':_0xdcc993['condition'][_0x184e8c(0x283)][_0x184e8c(0x236)],'unit':_0xdcc993[_0x184e8c(0x200)][_0x184e8c(0x283)][_0x184e8c(0x23c)],..._0xdcc993[_0x184e8c(0x200)][_0x184e8c(0x283)][_0x184e8c(0x213)]!==undefined&&{'next':_0xdcc993[_0x184e8c(0x200)]['timeout'][_0x184e8c(0x213)]}}}}),{..._0xdcc993[_0x184e8c(0x236)]!==undefined&&{'duration':_0xdcc993[_0x184e8c(0x236)]},..._0xdcc993[_0x184e8c(0x23c)]!==undefined&&{'unit':_0xdcc993[_0x184e8c(0x23c)]},..._0xdcc993[_0x184e8c(0x1e4)]!==undefined&&{'wait_until':_0xdcc993[_0x184e8c(0x1e4)]},..._0xdcc993[_0x184e8c(0x289)]!==undefined&&{'days_of_week':_0xdcc993['days_of_week']},..._0x29786b&&{'condition':_0x29786b}};}case _0x184e8c(0x227):{const _0x3cf789=_0x2a1614;return{'activation':_0x3cf789[_0x184e8c(0x227)]};}case'decision_point':{const _0x4565ef=_0x2a1614;return{'branches':_0x4565ef[_0x184e8c(0x2a1)][_0x184e8c(0x255)](normalizeDecisionBranch)};}case _0x184e8c(0x20c):{const _0x2389af=_0x2a1614;return{..._0x2389af[_0x184e8c(0x21e)]!==undefined&&{'customized_split':_0x2389af[_0x184e8c(0x21e)]},..._0x2389af[_0x184e8c(0x260)]!==undefined&&{'unique_id':_0x2389af[_0x184e8c(0x260)]},'variants':_0x2389af[_0x184e8c(0x229)][_0x184e8c(0x255)](normalizeAbTestVariant)};}case'jump':{const _0x211ba6=_0x2a1614;return{'target':normalizeJumpTarget(_0x211ba6[_0x184e8c(0x266)])};}default:return _0x2a1614;}}function normalizeDecisionBranch(_0x558f3b){const _0x5b3f13=a147_0x3557e0;return{'name':_0x558f3b[_0x5b3f13(0x243)],..._0x558f3b[_0x5b3f13(0x27d)]!==undefined&&{'segment':_0x558f3b['segment']},..._0x558f3b['excluded']!==undefined&&{'excluded':_0x558f3b[_0x5b3f13(0x21c)]},..._0x558f3b[_0x5b3f13(0x213)]!==undefined&&{'next':_0x558f3b[_0x5b3f13(0x213)]}};}function normalizeAbTestVariant(_0x598693){const _0x4be743=a147_0x3557e0;return{..._0x598693['id']!==undefined&&{'id':_0x598693['id']},'name':_0x598693[_0x4be743(0x243)],'percentage':_0x598693['percentage'],..._0x598693[_0x4be743(0x213)]!==undefined&&{'next':_0x598693['next']}};}function normalizeJumpTarget(_0x4c6d2e){const _0x45a1f4=a147_0x3557e0;return{'journey':_0x4c6d2e[_0x45a1f4(0x232)],'stage':_0x4c6d2e[_0x45a1f4(0x295)],..._0x4c6d2e[_0x45a1f4(0x1f4)]!==undefined&&{'bundle_id':_0x4c6d2e[_0x45a1f4(0x1f4)]}};}function normalizeEmbeddedSegments(_0x226ffe,_0x14e514){const _0x40cb4a=a147_0x3557e0,_0x3b1658={},_0x6cb1bf=Object[_0x40cb4a(0x1fd)](_0x226ffe),_0x5b41c4=_0x14e514?[..._0x14e514[_0x40cb4a(0x215)](_0x49a3d7=>_0x6cb1bf[_0x40cb4a(0x271)](_0x49a3d7)),..._0x6cb1bf[_0x40cb4a(0x215)](_0x12041c=>!_0x14e514[_0x40cb4a(0x271)](_0x12041c))['sort']()]:_0x6cb1bf[_0x40cb4a(0x220)]();for(const _0x341569 of _0x5b41c4){const _0x292c83=_0x226ffe[_0x341569];if(_0x292c83['rule']){const _0x1ff3d6=_0x292c83[_0x40cb4a(0x270)];if(_0x1ff3d6[_0x40cb4a(0x26a)]!==_0x40cb4a(0x22a)&&_0x1ff3d6[_0x40cb4a(0x26a)]!=='Or'){const _0x483bb2=_0x1ff3d6[_0x40cb4a(0x26a)]??_0x40cb4a(0x202);throw new SDKError(ErrorCode[_0x40cb4a(0x214)],_0x40cb4a(0x28e)+_0x341569+_0x40cb4a(0x278)+(_0x40cb4a(0x244)+_0x483bb2+_0x40cb4a(0x2a2))+_0x40cb4a(0x261)+_0x40cb4a(0x29c)+_0x40cb4a(0x279)+'\x20\x20\x20\x20conditions:\x0a'+_0x40cb4a(0x225)+_0x40cb4a(0x282)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x1ff3d6['conditions']||!Array[_0x40cb4a(0x223)](_0x1ff3d6[_0x40cb4a(0x1f0)]))throw new SDKError(ErrorCode[_0x40cb4a(0x214)],'Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27'+_0x341569+_0x40cb4a(0x278)+'rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a'+_0x40cb4a(0x261)+_0x40cb4a(0x29c)+('\x20\x20\x20\x20type:\x20'+_0x1ff3d6[_0x40cb4a(0x26a)]+'\x0a')+_0x40cb4a(0x256)+_0x40cb4a(0x225)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}_0x3b1658[_0x341569]={..._0x292c83[_0x40cb4a(0x274)]&&_0x292c83['description']['trim']()&&{'description':_0x292c83['description']},..._0x292c83[_0x40cb4a(0x270)]&&{'rule':deepSortObject(_0x292c83[_0x40cb4a(0x270)])}};}return _0x3b1658;}function normalizeEmbeddedActivations(_0x1f685c,_0x4418cf){const _0xc5d091=a147_0x3557e0,_0x48a4c9={},_0x583ac3=Object[_0xc5d091(0x1fd)](_0x1f685c),_0x56cb42=_0x4418cf?[..._0x4418cf[_0xc5d091(0x215)](_0x3c413c=>_0x583ac3[_0xc5d091(0x271)](_0x3c413c)),..._0x583ac3[_0xc5d091(0x215)](_0x16d708=>!_0x4418cf[_0xc5d091(0x271)](_0x16d708))[_0xc5d091(0x220)]()]:_0x583ac3[_0xc5d091(0x220)]();for(const _0x14bb10 of _0x56cb42){const _0x4b5b26=_0x1f685c[_0x14bb10];_0x48a4c9[_0x14bb10]={'name':_0x4b5b26[_0xc5d091(0x243)],'connection':_0x4b5b26[_0xc5d091(0x27a)],..._0x4b5b26[_0xc5d091(0x274)]!==undefined&&{'description':_0x4b5b26[_0xc5d091(0x274)]},..._0x4b5b26[_0xc5d091(0x249)]!==undefined&&{'all_columns':_0x4b5b26[_0xc5d091(0x249)]},..._0x4b5b26[_0xc5d091(0x205)]!==undefined&&{'columns':_0x4b5b26[_0xc5d091(0x205)]},..._0x4b5b26[_0xc5d091(0x253)]!==undefined&&{'behavior':_0x4b5b26[_0xc5d091(0x253)]},..._0x4b5b26[_0xc5d091(0x1eb)]!==undefined&&{'schedule':_0x4b5b26['schedule']},..._0x4b5b26[_0xc5d091(0x288)]!==undefined&&{'notification':_0x4b5b26[_0xc5d091(0x288)]},..._0x4b5b26[_0xc5d091(0x291)]!==undefined&&{'connector_config':_0x4b5b26[_0xc5d091(0x291)]},..._0x4b5b26[_0xc5d091(0x286)]!==undefined&&{'activation_template_id':_0x4b5b26[_0xc5d091(0x286)]}};}return _0x48a4c9;}export function getActiveStages(_0x520e06){const _0x59a88c=a147_0x3557e0;if(isJourneysArrayMode(_0x520e06)){const _0x4606d3=_0x520e06[_0x59a88c(0x22c)]||[],_0x688e28=_0x4606d3[_0x59a88c(0x25c)](_0x26ecaa=>_0x26ecaa[_0x59a88c(0x284)]===!![])||_0x4606d3[0x0];return _0x688e28?.[_0x59a88c(0x258)]||[];}if(isSingleVersionMode(_0x520e06))return _0x520e06[_0x59a88c(0x258)]||[];if(isMultiVersionMode(_0x520e06)){const _0x53833e=_0x520e06[_0x59a88c(0x293)]||[],_0x1e5bf9=_0x53833e[_0x59a88c(0x25c)](_0x3d0d51=>_0x3d0d51[_0x59a88c(0x284)]===!![])||_0x53833e[0x0];return _0x1e5bf9?.[_0x59a88c(0x258)]||[];}return[];}export function getLatestJourneyEntry(_0x3555c2){const _0x28a33d=a147_0x3557e0;if(isJourneysArrayMode(_0x3555c2)){const _0x4190ae=_0x3555c2['journeys']||[];return _0x4190ae[_0x28a33d(0x25c)](_0x5dd129=>_0x5dd129['latest']===!![])||_0x4190ae[0x0];}if(isMultiVersionMode(_0x3555c2)){const _0x1dd7a9=_0x3555c2[_0x28a33d(0x293)]||[],_0x18f799=_0x1dd7a9[_0x28a33d(0x25c)](_0x34c827=>_0x34c827[_0x28a33d(0x284)]===!![])||_0x1dd7a9[0x0];if(_0x18f799)return{'version':_0x18f799['name'],'state':_0x18f799[_0x28a33d(0x269)],'latest':_0x18f799['latest'],'stages':_0x18f799['stages'],'id':_0x18f799['id'],'version_number':_0x18f799[_0x28a33d(0x24d)]};}if(isSingleVersionMode(_0x3555c2))return{'version':_0x3555c2[_0x28a33d(0x230)]||'v1','state':_0x28a33d(0x28d),'stages':_0x3555c2[_0x28a33d(0x258)]||[],'id':_0x3555c2['id'],'version_number':_0x3555c2[_0x28a33d(0x24d)],'goal':_0x3555c2[_0x28a33d(0x2a0)],'reentry':_0x3555c2[_0x28a33d(0x27b)]};return undefined;}export function getLatestVersion(_0x5d9e06){const _0x489322=a147_0x3557e0;if(!isMultiVersionMode(_0x5d9e06))return undefined;const _0xd63c43=_0x5d9e06['versions']||[];return _0xd63c43[_0x489322(0x25c)](_0x2578d1=>_0x2578d1[_0x489322(0x284)]===!![])||_0xd63c43[0x0];}export function getEffectiveGoal(_0x19fcc3){const _0x594289=a147_0x3557e0,_0x115beb=getLatestJourneyEntry(_0x19fcc3);return _0x115beb?.[_0x594289(0x2a0)]||_0x19fcc3[_0x594289(0x2a0)];}export function getEffectiveReentry(_0x33e317){const _0x42eb70=a147_0x3557e0,_0x412960=getLatestJourneyEntry(_0x33e317);return _0x412960?.[_0x42eb70(0x27b)]||_0x33e317[_0x42eb70(0x27b)];}export function collectSegmentRefs(_0x58975a){const _0x153d5a=a147_0x3557e0,_0x15dff4=new Set();_0x58975a['goal']?.[_0x153d5a(0x27d)]&&_0x15dff4[_0x153d5a(0x1e9)](_0x58975a['goal'][_0x153d5a(0x27d)]);const _0x917e60=_0x5de2c7=>{const _0x3bb2d3=_0x153d5a;for(const _0x56b170 of _0x5de2c7){_0x56b170['entry_criteria']?.[_0x3bb2d3(0x27d)]&&_0x15dff4[_0x3bb2d3(0x1e9)](_0x56b170[_0x3bb2d3(0x28c)][_0x3bb2d3(0x27d)]);if(_0x56b170[_0x3bb2d3(0x22f)])for(const _0x1733e1 of _0x56b170[_0x3bb2d3(0x22f)]){_0x1733e1['segment']&&_0x15dff4['add'](_0x1733e1[_0x3bb2d3(0x27d)]);}_0x56b170[_0x3bb2d3(0x25d)]?.['segment']&&_0x15dff4[_0x3bb2d3(0x1e9)](_0x56b170[_0x3bb2d3(0x25d)][_0x3bb2d3(0x27d)]);if(_0x56b170[_0x3bb2d3(0x1f1)])for(const _0x54592f of _0x56b170[_0x3bb2d3(0x1f1)]){if(_0x54592f[_0x3bb2d3(0x26a)]==='decision_point'){const _0x2441eb=_0x54592f;for(const _0x2a86c6 of _0x2441eb['with']['branches']){_0x2a86c6[_0x3bb2d3(0x27d)]&&_0x15dff4[_0x3bb2d3(0x1e9)](_0x2a86c6['segment']);}}else{if(_0x54592f['type']===_0x3bb2d3(0x25e)){const _0x131cf9=_0x54592f;_0x131cf9[_0x3bb2d3(0x1f7)]['condition']?.[_0x3bb2d3(0x27d)]&&_0x15dff4[_0x3bb2d3(0x1e9)](_0x131cf9[_0x3bb2d3(0x1f7)][_0x3bb2d3(0x200)][_0x3bb2d3(0x27d)]);}}}}};_0x58975a[_0x153d5a(0x258)]&&_0x917e60(_0x58975a[_0x153d5a(0x258)]);if(_0x58975a[_0x153d5a(0x293)])for(const _0x536e92 of _0x58975a['versions']){_0x917e60(_0x536e92[_0x153d5a(0x258)]);}return _0x15dff4;}export function validateSegmentRefs(_0x197c18){const _0x3c8b78=a147_0x3557e0,_0x3678c5=[],_0x20fac2=collectSegmentRefs(_0x197c18),_0x56dbd1=new Set(Object[_0x3c8b78(0x1fd)](_0x197c18[_0x3c8b78(0x290)]||{}));for(const _0x5d9515 of _0x20fac2){const _0x27dfe7=parseSegmentRef(_0x5d9515);_0x27dfe7[_0x3c8b78(0x26a)]===_0x3c8b78(0x24f)&&!_0x56dbd1['has'](_0x27dfe7['name'])&&_0x3678c5[_0x3c8b78(0x207)]('Unknown\x20segment\x20\x22'+_0x27dfe7[_0x3c8b78(0x243)]+_0x3c8b78(0x298)+_0x27dfe7[_0x3c8b78(0x243)]+_0x3c8b78(0x212));}return _0x3678c5;}export function collectSegmentIdsFromJourneyApi(_0xac68e8){const _0x1bcbad=a147_0x3557e0,_0x1152d0=new Set();_0xac68e8[_0x1bcbad(0x1e5)][_0x1bcbad(0x2a0)]?.[_0x1bcbad(0x287)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0xac68e8[_0x1bcbad(0x1e5)]['goal'][_0x1bcbad(0x287)]);const _0x2df5fd=_0xac68e8[_0x1bcbad(0x1e5)][_0x1bcbad(0x1ff)];if(Array[_0x1bcbad(0x223)](_0x2df5fd))for(const _0x4ae284 of _0x2df5fd){_0x4ae284[_0x1bcbad(0x294)]?.[_0x1bcbad(0x287)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0x4ae284[_0x1bcbad(0x294)][_0x1bcbad(0x287)]);const _0xff247b=_0x4ae284[_0x1bcbad(0x235)]??_0x4ae284[_0x1bcbad(0x208)];if(Array[_0x1bcbad(0x223)](_0xff247b))for(const _0x5eaae7 of _0xff247b){_0x5eaae7[_0x1bcbad(0x287)]&&_0x1152d0['add'](_0x5eaae7[_0x1bcbad(0x287)]);}_0x4ae284[_0x1bcbad(0x25d)]?.[_0x1bcbad(0x287)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0x4ae284[_0x1bcbad(0x25d)][_0x1bcbad(0x287)]);if(_0x4ae284[_0x1bcbad(0x1f1)]&&typeof _0x4ae284['steps']===_0x1bcbad(0x23d)){const _0x4e1331=Array[_0x1bcbad(0x223)](_0x4ae284['steps'])?_0x4ae284['steps']:Object[_0x1bcbad(0x26d)](_0x4ae284[_0x1bcbad(0x1f1)]);for(const _0x4a4876 of _0x4e1331){_0x4a4876[_0x1bcbad(0x21a)]?.[_0x1bcbad(0x287)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0x4a4876[_0x1bcbad(0x21a)][_0x1bcbad(0x287)]);const _0x558c00=_0x4a4876;_0x558c00[_0x1bcbad(0x216)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0x558c00[_0x1bcbad(0x216)]);if(Array['isArray'](_0x558c00[_0x1bcbad(0x1f0)]))for(const _0xac46b4 of _0x558c00[_0x1bcbad(0x1f0)]){_0xac46b4[_0x1bcbad(0x287)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0xac46b4[_0x1bcbad(0x287)]);}if(Array[_0x1bcbad(0x223)](_0x4a4876[_0x1bcbad(0x2a1)]))for(const _0x5b0e84 of _0x4a4876['branches']){_0x5b0e84[_0x1bcbad(0x287)]&&_0x1152d0[_0x1bcbad(0x1e9)](_0x5b0e84[_0x1bcbad(0x287)]);}}}}return _0x1152d0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x4fa652=a148_0x425a;(function(_0x502c8d,_0x79f827){const _0x22fbe0=a148_0x425a,_0x288653=_0x502c8d();while(!![]){try{const _0xf9e2fa=parseInt(_0x22fbe0(0x165))/0x1+-parseInt(_0x22fbe0(0x15a))/0x2*(parseInt(_0x22fbe0(0x144))/0x3)+parseInt(_0x22fbe0(0x13d))/0x4+-parseInt(_0x22fbe0(0x145))/0x5+parseInt(_0x22fbe0(0x151))/0x6*(-parseInt(_0x22fbe0(0x13e))/0x7)+parseInt(_0x22fbe0(0x149))/0x8+-parseInt(_0x22fbe0(0x153))/0x9*(parseInt(_0x22fbe0(0x15d))/0xa);if(_0xf9e2fa===_0x79f827)break;else _0x288653['push'](_0x288653['shift']());}catch(_0x3f002d){_0x288653['push'](_0x288653['shift']());}}}(a148_0x3f5e,0x1c29a));export const DEFAULT_TIME_RANGE=a148_0x4fa652(0x15c);export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x4cff03,_0x5b7e46,_0x163f5e){const _0x246892=a148_0x4fa652,_0x5d7422=_0x163f5e&&_0x163f5e[_0x246892(0x14d)]>0x0?_0x163f5e['join'](',\x20'):'*';return _0x246892(0x159)+_0x5d7422+'\x20FROM\x20'+_0x4cff03+'.'+_0x5b7e46+_0x246892(0x148);}export function generateMasterCountSQL(_0xcafed6){const _0x581c85=a148_0x4fa652,{database:_0x50e4ba,table:_0x2185d0}=_0xcafed6[_0x581c85(0x133)];return _0x581c85(0x150)+_0x50e4ba+'.'+_0x2185d0;}export function generateMasterSampleSQL(_0x317fac,_0x180644=0x5){const _0x475acd=a148_0x4fa652,{database:_0x324154,table:_0x4e5c1b}=_0x317fac[_0x475acd(0x133)];return'SELECT\x20*\x20FROM\x20'+_0x324154+'.'+_0x4e5c1b+'\x20LIMIT\x20'+_0x180644;}function a148_0x425a(_0x44774f,_0x5943b1){_0x44774f=_0x44774f-0x12f;const _0x3f5ebc=a148_0x3f5e();let _0x425ac8=_0x3f5ebc[_0x44774f];return _0x425ac8;}export function generateAttributeCoverageSQL(_0x4abcd9,_0x384487){const _0x49262c=a148_0x4fa652,_0x2087a1=_0x4abcd9[_0x49262c(0x133)];return(_0x49262c(0x15b)+_0x2087a1[_0x49262c(0x136)]+'.'+_0x2087a1[_0x49262c(0x13c)]+'\x20m\x0aLEFT\x20JOIN\x20'+_0x384487[_0x49262c(0x147)][_0x49262c(0x136)]+'.'+_0x384487[_0x49262c(0x147)][_0x49262c(0x13c)]+_0x49262c(0x14e)+_0x384487[_0x49262c(0x138)][_0x49262c(0x154)]+_0x49262c(0x163)+_0x384487[_0x49262c(0x138)]['child_key']+'\x0aWHERE\x20a.'+_0x384487[_0x49262c(0x138)][_0x49262c(0x14c)]+_0x49262c(0x143))['trim']();}function a148_0x3f5e(){const _0x512dc6=['find','\x0aSELECT\x20m.','\x20IS\x20NOT\x20NULL\x0a','6fxeJdI','230935DPRngV','LEFT\x20JOIN\x20','source','\x20LIMIT\x200','925392sEbkoq','\x0aLIMIT\x200\x0a','\x20m\x0aJOIN\x20','child_key','length','\x20a\x0a\x20\x20ON\x20m.','trim','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','6ilLIbF','attributes','513iYTOdt','parent_key','\x0aFROM\x20','\x0aLIMIT\x20','\x20b\x0a\x20\x20ON\x20m.','\x0aSELECT\x20','SELECT\x20','187448azTOnI','\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20','-1d','2290WFlkgF','\x20m\x0a','columns','forEach','\x27)\x0aLIMIT\x20','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','\x20=\x20a.','toLowerCase','35876WWoLKG','test','label','b.*','name','master','column','map','database','all_columns','join','\x0a\x20\x20ON\x20m.','behaviors','m.*','table','845684RfSprp','6503elIDEF','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','push'];a148_0x3f5e=function(){return _0x512dc6;};return a148_0x3f5e();}export function generateBehaviorStatsSQL(_0x2f3c5e,_0x16354e,_0xc571bc=DEFAULT_TIME_RANGE){const _0x1986c6=a148_0x4fa652,_0x400769=_0x2f3c5e[_0x1986c6(0x133)];return(_0x1986c6(0x13f)+_0x16354e[_0x1986c6(0x138)][_0x1986c6(0x154)]+')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20'+_0x400769['database']+'.'+_0x400769[_0x1986c6(0x13c)]+_0x1986c6(0x14b)+_0x16354e[_0x1986c6(0x147)][_0x1986c6(0x136)]+'.'+_0x16354e['source'][_0x1986c6(0x13c)]+_0x1986c6(0x157)+_0x16354e[_0x1986c6(0x138)]['parent_key']+'\x20=\x20b.'+_0x16354e['join'][_0x1986c6(0x14c)]+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0xc571bc+'\x27)\x0a')['trim']();}export function generateAttributeSampleSQL(_0x2bee1e,_0x35e70e,_0x3c687c=0x5){const _0x35dea3=a148_0x4fa652,_0x4920d9=_0x2bee1e[_0x35dea3(0x133)],_0x54e469=_0x35e70e[_0x35dea3(0x138)][_0x35dea3(0x154)],_0x5d6e3e=_0x35e70e['columns'][_0x35dea3(0x135)](_0x210e1c=>'a.'+_0x210e1c[_0x35dea3(0x134)])[_0x35dea3(0x138)](',\x20');return(_0x35dea3(0x142)+_0x54e469+',\x20'+_0x5d6e3e+_0x35dea3(0x155)+_0x4920d9[_0x35dea3(0x136)]+'.'+_0x4920d9[_0x35dea3(0x13c)]+_0x35dea3(0x14b)+_0x35e70e[_0x35dea3(0x147)][_0x35dea3(0x136)]+'.'+_0x35e70e[_0x35dea3(0x147)][_0x35dea3(0x13c)]+_0x35dea3(0x14e)+_0x35e70e[_0x35dea3(0x138)][_0x35dea3(0x154)]+_0x35dea3(0x163)+_0x35e70e[_0x35dea3(0x138)][_0x35dea3(0x14c)]+_0x35dea3(0x156)+_0x3c687c+'\x0a')[_0x35dea3(0x14f)]();}export function generateBehaviorSampleSQL(_0x4d72bc,_0x4ba0d2,_0x5dfb8b=0x5,_0x5baccd=DEFAULT_TIME_RANGE){const _0x299d3c=a148_0x4fa652,_0x560852=_0x4d72bc[_0x299d3c(0x133)],_0x447a6a=_0x4ba0d2[_0x299d3c(0x138)][_0x299d3c(0x154)];let _0x1a73f8;if(_0x4ba0d2[_0x299d3c(0x137)])_0x1a73f8=_0x299d3c(0x131);else _0x4ba0d2['columns']&&_0x4ba0d2[_0x299d3c(0x15f)][_0x299d3c(0x14d)]>0x0?_0x1a73f8=_0x4ba0d2[_0x299d3c(0x15f)][_0x299d3c(0x135)](_0x291f5d=>'b.'+_0x291f5d['column'])[_0x299d3c(0x138)](',\x20'):_0x1a73f8=_0x299d3c(0x131);return(_0x299d3c(0x142)+_0x447a6a+',\x20'+_0x1a73f8+_0x299d3c(0x155)+_0x560852[_0x299d3c(0x136)]+'.'+_0x560852[_0x299d3c(0x13c)]+_0x299d3c(0x14b)+_0x4ba0d2[_0x299d3c(0x147)][_0x299d3c(0x136)]+'.'+_0x4ba0d2[_0x299d3c(0x147)][_0x299d3c(0x13c)]+_0x299d3c(0x157)+_0x4ba0d2[_0x299d3c(0x138)][_0x299d3c(0x154)]+'\x20=\x20b.'+_0x4ba0d2[_0x299d3c(0x138)][_0x299d3c(0x14c)]+_0x299d3c(0x162)+_0x5baccd+_0x299d3c(0x161)+_0x5dfb8b+'\x0a')[_0x299d3c(0x14f)]();}function quoteIdentifier(_0x27dd47){const _0x492b55=a148_0x4fa652;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/[_0x492b55(0x12f)](_0x27dd47))return'\x22'+_0x27dd47['replace'](/"/g,'\x22\x22')+'\x22';return _0x27dd47;}export function generateEnrichedSQL(_0x3d4339,_0x53189f=0x5){const _0x2aac50=a148_0x4fa652,_0x2f9348=_0x3d4339[_0x2aac50(0x133)],_0x36695e=_0x3d4339[_0x2aac50(0x152)]||[];if(_0x36695e[_0x2aac50(0x14d)]===0x0)return'SELECT\x20*\x20FROM\x20'+_0x2f9348[_0x2aac50(0x136)]+'.'+_0x2f9348[_0x2aac50(0x13c)]+'\x20LIMIT\x20'+_0x53189f;const _0x446a10=[_0x2aac50(0x13b)],_0x1a2ba2=[];return _0x36695e[_0x2aac50(0x160)]((_0x45c501,_0x1301a2)=>{const _0x45d5f6=_0x2aac50,_0x1fa160='a'+_0x1301a2;_0x45c501[_0x45d5f6(0x15f)][_0x45d5f6(0x160)](_0x2a4077=>{const _0x3d006e=_0x45d5f6,_0x585a6b=quoteIdentifier(_0x2a4077['label']||_0x2a4077[_0x3d006e(0x134)]);_0x446a10[_0x3d006e(0x140)](_0x1fa160+'.'+_0x2a4077[_0x3d006e(0x134)]+'\x20AS\x20'+_0x585a6b);}),_0x1a2ba2[_0x45d5f6(0x140)](_0x45d5f6(0x146)+_0x45c501[_0x45d5f6(0x147)][_0x45d5f6(0x136)]+'.'+_0x45c501[_0x45d5f6(0x147)]['table']+'\x20'+_0x1fa160+_0x45d5f6(0x139)+_0x45c501[_0x45d5f6(0x138)][_0x45d5f6(0x154)]+'\x20=\x20'+_0x1fa160+'.'+_0x45c501['join'][_0x45d5f6(0x14c)]);}),(_0x2aac50(0x158)+_0x446a10[_0x2aac50(0x138)](',\x20')+_0x2aac50(0x155)+_0x2f9348['database']+'.'+_0x2f9348[_0x2aac50(0x13c)]+_0x2aac50(0x15e)+_0x1a2ba2[_0x2aac50(0x138)]('\x0a')+_0x2aac50(0x156)+_0x53189f+'\x0a')[_0x2aac50(0x14f)]();}export function generateAttributeSchemaSQL(_0x21df22,_0x2890a5){const _0x208a31=a148_0x4fa652,_0xfb99ca=_0x21df22['master'],_0x278f44=_0x2890a5['join'][_0x208a31(0x154)],_0x542e96=_0x2890a5[_0x208a31(0x15f)]['map'](_0x4edf04=>'a.'+_0x4edf04[_0x208a31(0x134)])[_0x208a31(0x138)](',\x20');return('\x0aSELECT\x20m.'+_0x278f44+',\x20'+_0x542e96+'\x0aFROM\x20'+_0xfb99ca[_0x208a31(0x136)]+'.'+_0xfb99ca[_0x208a31(0x13c)]+_0x208a31(0x14b)+_0x2890a5[_0x208a31(0x147)][_0x208a31(0x136)]+'.'+_0x2890a5[_0x208a31(0x147)][_0x208a31(0x13c)]+'\x20a\x0a\x20\x20ON\x20m.'+_0x2890a5[_0x208a31(0x138)]['parent_key']+_0x208a31(0x163)+_0x2890a5[_0x208a31(0x138)][_0x208a31(0x14c)]+_0x208a31(0x14a))[_0x208a31(0x14f)]();}export function generateBehaviorSchemaSQL(_0x252438,_0x20fc42){const _0xc8ee4f=a148_0x4fa652,_0x52724b=_0x252438[_0xc8ee4f(0x133)],_0x557755=_0x20fc42[_0xc8ee4f(0x138)][_0xc8ee4f(0x154)];let _0x267149;if(_0x20fc42[_0xc8ee4f(0x137)])_0x267149=_0xc8ee4f(0x131);else _0x20fc42[_0xc8ee4f(0x15f)]&&_0x20fc42[_0xc8ee4f(0x15f)][_0xc8ee4f(0x14d)]>0x0?_0x267149=_0x20fc42[_0xc8ee4f(0x15f)][_0xc8ee4f(0x135)](_0x23180e=>'b.'+_0x23180e['column'])['join'](',\x20'):_0x267149=_0xc8ee4f(0x131);return(_0xc8ee4f(0x142)+_0x557755+',\x20'+_0x267149+_0xc8ee4f(0x155)+_0x52724b[_0xc8ee4f(0x136)]+'.'+_0x52724b[_0xc8ee4f(0x13c)]+'\x20m\x0aJOIN\x20'+_0x20fc42[_0xc8ee4f(0x147)][_0xc8ee4f(0x136)]+'.'+_0x20fc42[_0xc8ee4f(0x147)][_0xc8ee4f(0x13c)]+_0xc8ee4f(0x157)+_0x20fc42[_0xc8ee4f(0x138)][_0xc8ee4f(0x154)]+'\x20=\x20b.'+_0x20fc42['join']['child_key']+'\x0aLIMIT\x200\x0a')[_0xc8ee4f(0x14f)]();}export function getAttributeColumns(_0x1ca29c){const _0x1c98e4=a148_0x4fa652;return _0x1ca29c[_0x1c98e4(0x15f)][_0x1c98e4(0x135)](_0x5e623e=>({'label':_0x5e623e['label']||_0x5e623e['column'],'column':_0x5e623e[_0x1c98e4(0x134)]}));}export function getBehaviorColumns(_0x56ec88){const _0x15f2b7=a148_0x4fa652;if(_0x56ec88[_0x15f2b7(0x137)])return[{'label':'(all\x20columns)','column':'*'}];if(_0x56ec88['columns']&&_0x56ec88[_0x15f2b7(0x15f)][_0x15f2b7(0x14d)]>0x0)return _0x56ec88[_0x15f2b7(0x15f)][_0x15f2b7(0x135)](_0x14da24=>({'label':_0x14da24[_0x15f2b7(0x130)]||_0x14da24[_0x15f2b7(0x134)],'column':_0x14da24[_0x15f2b7(0x134)]}));return[{'label':'(all\x20columns)','column':'*'}];}export function findAttributeByName(_0xfe0866,_0x424187){const _0x535a90=a148_0x4fa652;return _0xfe0866[_0x535a90(0x152)]?.[_0x535a90(0x141)](_0x1e6630=>_0x1e6630['name'][_0x535a90(0x164)]()===_0x424187['toLowerCase']());}export function findBehaviorByName(_0x337ee4,_0x52c820){const _0x10e1fb=a148_0x4fa652;return _0x337ee4[_0x10e1fb(0x13a)]?.[_0x10e1fb(0x141)](_0x4cfeae=>_0x4cfeae[_0x10e1fb(0x132)][_0x10e1fb(0x164)]()===_0x52c820[_0x10e1fb(0x164)]());}
|