@treasuredata/tdx 0.29.2 → 0.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.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/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.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/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/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/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/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/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/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/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/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
|
-
|
|
1
|
+
(function(_0x487520,_0x4f4b4f){const _0x8b9a5=a120_0x3fb8,_0x70b875=_0x487520();while(!![]){try{const _0x504082=parseInt(_0x8b9a5(0x123))/0x1*(-parseInt(_0x8b9a5(0x122))/0x2)+-parseInt(_0x8b9a5(0x119))/0x3*(parseInt(_0x8b9a5(0x11c))/0x4)+parseInt(_0x8b9a5(0x110))/0x5+-parseInt(_0x8b9a5(0x116))/0x6*(-parseInt(_0x8b9a5(0x11a))/0x7)+parseInt(_0x8b9a5(0x11e))/0x8*(-parseInt(_0x8b9a5(0x112))/0x9)+parseInt(_0x8b9a5(0x11f))/0xa+parseInt(_0x8b9a5(0x117))/0xb*(-parseInt(_0x8b9a5(0x118))/0xc);if(_0x504082===_0x4f4b4f)break;else _0x70b875['push'](_0x70b875['shift']());}catch(_0x5e5a51){_0x70b875['push'](_0x70b875['shift']());}}}(a120_0x3692,0x9aa35));import{readdirSync,statSync}from'fs';function a120_0x3fb8(_0x55064f,_0x28ac6d){_0x55064f=_0x55064f-0x110;const _0x3692e7=a120_0x3692();let _0x3fb8f6=_0x3692e7[_0x55064f];return _0x3fb8f6;}import a120_0x26de4b from'path';export function findYamlFiles(_0x3b1afa){const _0x40fdf4=[];function _0x5b4a04(_0x61dce1){const _0x30c5a1=a120_0x3fb8,_0x1ea294=readdirSync(_0x61dce1,{'withFileTypes':!![]});for(const _0x429a4a of _0x1ea294){const _0x458090=a120_0x26de4b[_0x30c5a1(0x115)](_0x61dce1,_0x429a4a['name']);if(_0x429a4a[_0x30c5a1(0x124)]())_0x5b4a04(_0x458090);else(_0x429a4a[_0x30c5a1(0x11b)]['endsWith'](_0x30c5a1(0x114))||_0x429a4a['name'][_0x30c5a1(0x121)](_0x30c5a1(0x111)))&&_0x40fdf4[_0x30c5a1(0x113)](_0x458090);}}return _0x5b4a04(_0x3b1afa),_0x40fdf4;}export function discoverYamlFiles(_0x46df1d){const _0xdc3d0d=findYamlFiles(_0x46df1d);return _0xdc3d0d['map'](_0x1de19f=>{const _0x498c83=a120_0x3fb8,_0x218f9a=a120_0x26de4b['relative'](_0x46df1d,_0x1de19f),_0x31b5a8=a120_0x26de4b[_0x498c83(0x11d)](_0x218f9a);return{'absolutePath':_0x1de19f,'relativePath':_0x218f9a,'folderPath':_0x31b5a8==='.'?'':_0x31b5a8};});}export function isYamlFile(_0x3a661a){const _0x782782=a120_0x3fb8;try{const _0x507289=statSync(_0x3a661a);if(!_0x507289['isFile']())return![];const _0x2f5aae=a120_0x26de4b[_0x782782(0x120)](_0x3a661a)['toLowerCase']();return _0x2f5aae===_0x782782(0x114)||_0x2f5aae==='.yaml';}catch{return![];}}function a120_0x3692(){const _0x43c337=['.yaml','9UIWNWm','push','.yml','join','156RNIEPo','572DGPcEI','173352jfhPso','6RckwJf','226877CWvRlb','name','2120532mxrQZv','dirname','2860600KotaRP','11940860izBWMl','extname','endsWith','2pKpBhI','233732kPcuhn','isDirectory','4996950IXzBRD'];a120_0x3692=function(){return _0x43c337;};return a120_0x3692();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a121_0x57c4(_0x27e997,_0x4df9b0){_0x27e997=_0x27e997-0x11c;const _0x5015d7=a121_0x5015();let _0x57c4fe=_0x5015d7[_0x27e997];return _0x57c4fe;}(function(_0x31195d,_0x5c883b){const _0x11bf05=a121_0x57c4,_0x3b463d=_0x31195d();while(!![]){try{const _0x1c58c2=-parseInt(_0x11bf05(0x11d))/0x1*(-parseInt(_0x11bf05(0x14e))/0x2)+parseInt(_0x11bf05(0x11c))/0x3*(-parseInt(_0x11bf05(0x122))/0x4)+parseInt(_0x11bf05(0x152))/0x5*(parseInt(_0x11bf05(0x160))/0x6)+-parseInt(_0x11bf05(0x157))/0x7+parseInt(_0x11bf05(0x12e))/0x8*(-parseInt(_0x11bf05(0x167))/0x9)+parseInt(_0x11bf05(0x16a))/0xa*(-parseInt(_0x11bf05(0x156))/0xb)+parseInt(_0x11bf05(0x161))/0xc*(parseInt(_0x11bf05(0x144))/0xd);if(_0x1c58c2===_0x5c883b)break;else _0x3b463d['push'](_0x3b463d['shift']());}catch(_0x835627){_0x3b463d['push'](_0x3b463d['shift']());}}}(a121_0x5015,0x8e442));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x556af8){const _0xd65f3b=a121_0x57c4;return _0x556af8[_0xd65f3b(0x125)]()['replace'](/\s+/g,'_')[_0xd65f3b(0x13d)](/[^a-z0-9_]/g,'')[_0xd65f3b(0x13d)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5f36e5){const _0x50c221=a121_0x57c4,_0x5c37a0=_0x5f36e5[_0x50c221(0x15e)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5c37a0){const _0x3bef22=_0x5c37a0[0x1][_0x50c221(0x125)](),_0x61a8d=_0x5c37a0[0x2],_0x744aad=_0x61a8d['replace'](/-/g,'')[_0x50c221(0x159)](0x0,0x4)[_0x50c221(0x125)]();return _0x3bef22+'_'+_0x744aad;}const _0x2d34a8=_0x5f36e5[_0x50c221(0x15e)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x2d34a8){const _0x146d19=_0x2d34a8[0x1],_0x44fbbf=_0x2d34a8[0x2][_0x50c221(0x125)](),_0xefaafe=_0x146d19[_0x50c221(0x13d)](/-/g,'')['slice'](0x0,0x4)[_0x50c221(0x125)]();return _0x44fbbf+'_'+_0xefaafe;}return undefined;}function stableStringify(_0x5cb834){const _0x4d74cc=a121_0x57c4;if(Array[_0x4d74cc(0x138)](_0x5cb834))return'['+_0x5cb834['map'](_0x29e183=>stableStringify(_0x29e183))[_0x4d74cc(0x154)](',')+']';if(_0x5cb834&&typeof _0x5cb834===_0x4d74cc(0x126)){const _0x51b720=_0x5cb834,_0x486fb0=Object[_0x4d74cc(0x148)](_0x51b720)['sort'](),_0x1c76b2=_0x486fb0['map'](_0x20dabe=>'\x22'+_0x20dabe+'\x22:'+stableStringify(_0x51b720[_0x20dabe]));return'{'+_0x1c76b2[_0x4d74cc(0x154)](',')+'}';}const _0x4addee=JSON[_0x4d74cc(0x14c)](_0x5cb834);return _0x4addee===undefined?_0x4d74cc(0x165):_0x4addee;}export function consolidateActivationsByContent(_0x16699a){const _0xd54eb9=a121_0x57c4,_0x5ab303={},_0xa9be2e=new Map(),_0x19f1b5=new Map();for(const _0x1ab439 of _0x16699a){if(!_0x1ab439)continue;for(const [_0x4ecf74,_0x49958d]of Object[_0xd54eb9(0x15b)](_0x1ab439)){const _0x88b53b={'connection':_0x49958d[_0xd54eb9(0x121)],..._0x49958d[_0xd54eb9(0x15f)]!==undefined&&{'all_columns':_0x49958d[_0xd54eb9(0x15f)]},..._0x49958d[_0xd54eb9(0x146)]!==undefined&&{'columns':_0x49958d[_0xd54eb9(0x146)]},..._0x49958d[_0xd54eb9(0x164)]!==undefined&&{'behavior':_0x49958d[_0xd54eb9(0x164)]},..._0x49958d[_0xd54eb9(0x134)]!==undefined&&{'schedule':_0x49958d['schedule']},..._0x49958d[_0xd54eb9(0x12a)]!==undefined&&{'notification':_0x49958d[_0xd54eb9(0x12a)]},..._0x49958d[_0xd54eb9(0x128)]!==undefined&&{'connector_config':_0x49958d[_0xd54eb9(0x128)]},..._0x49958d[_0xd54eb9(0x168)]!==undefined&&{'activation_template_id':_0x49958d[_0xd54eb9(0x168)]}},_0x420272=stableStringify(_0x88b53b),_0x2e490c=_0x19f1b5[_0xd54eb9(0x11e)](_0x420272);_0x2e490c?_0xa9be2e[_0xd54eb9(0x163)](_0x4ecf74,_0x2e490c):(_0x5ab303[_0x4ecf74]=_0x49958d,_0xa9be2e[_0xd54eb9(0x163)](_0x4ecf74,_0x4ecf74),_0x19f1b5['set'](_0x420272,_0x4ecf74));}}return{'merged':_0x5ab303,'nameMapping':_0xa9be2e};}export function updateActivationReferences(_0x43e1db,_0x5ec942){const _0x41c012=a121_0x57c4;if(!_0x43e1db)return;for(const _0xd05149 of _0x43e1db){if(!_0xd05149[_0x41c012(0x130)])continue;for(const _0x588b80 of _0xd05149[_0x41c012(0x130)]){if(_0x588b80['type']===_0x41c012(0x147)&&_0x588b80['with']?.['activation']){const _0x36e59c=_0x5ec942[_0x41c012(0x11e)](_0x588b80[_0x41c012(0x140)][_0x41c012(0x147)]);_0x36e59c&&_0x36e59c!==_0x588b80['with'][_0x41c012(0x147)]&&(_0x588b80[_0x41c012(0x140)][_0x41c012(0x147)]=_0x36e59c);}}}}export function consolidateSegmentsByContent(_0x337804,_0x55d080){const _0xa606ec=a121_0x57c4,_0x1f2c4e={},_0x14c74e=new Map(),_0x24d9ac=new Map();for(const _0x3f25a0 of _0x337804){if(!_0x3f25a0)continue;for(const [_0x38fbd0,_0x554f0f]of Object[_0xa606ec(0x15b)](_0x3f25a0)){if(!_0x554f0f[_0xa606ec(0x169)]){_0x1f2c4e[_0x38fbd0]=_0x554f0f,_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x38fbd0);continue;}const _0x3e7cd8=_0x554f0f[_0xa606ec(0x15c)]&&_0x554f0f['description'][_0xa606ec(0x171)]()?_0x554f0f['description']:undefined,_0x51f369=JSON[_0xa606ec(0x14c)]({'description':_0x3e7cd8,'rule':deepSortObject(_0x554f0f[_0xa606ec(0x169)])}),_0x48dc87=_0x24d9ac[_0xa606ec(0x11e)](_0x51f369);if(_0x48dc87){const _0x2c5d20={..._0x554f0f[_0xa606ec(0x15c)]!==undefined&&{'description':_0x554f0f[_0xa606ec(0x15c)]},'rule':_0x554f0f[_0xa606ec(0x169)]?deepSortObject(_0x554f0f[_0xa606ec(0x169)]):_0x554f0f[_0xa606ec(0x169)]};if(_0x38fbd0<_0x48dc87){_0x1f2c4e[_0x38fbd0]=_0x2c5d20,delete _0x1f2c4e[_0x48dc87];for(const [_0x4e43d2,_0x36cefd]of _0x14c74e['entries']()){_0x36cefd===_0x48dc87&&_0x14c74e['set'](_0x4e43d2,_0x38fbd0);}_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x38fbd0),_0x24d9ac[_0xa606ec(0x163)](_0x51f369,_0x38fbd0);}else _0x1f2c4e[_0x48dc87]=_0x2c5d20,_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x48dc87);}else{let _0x282ef9=_0x38fbd0;if(_0x55d080){const _0x557b71=_0x55d080['get'](_0x51f369);_0x557b71&&_0x557b71['length']>0x0&&(_0x282ef9=_0x557b71[_0xa606ec(0x159)]()['sort']()[0x0]);}const _0x3ef41c={..._0x554f0f[_0xa606ec(0x15c)]!==undefined&&{'description':_0x554f0f[_0xa606ec(0x15c)]},'rule':_0x554f0f['rule']?deepSortObject(_0x554f0f['rule']):_0x554f0f[_0xa606ec(0x169)]};_0x1f2c4e[_0x282ef9]=_0x3ef41c,_0x14c74e[_0xa606ec(0x163)](_0x38fbd0,_0x282ef9),_0x24d9ac['set'](_0x51f369,_0x282ef9);}}}return{'merged':_0x1f2c4e,'nameMapping':_0x14c74e};}export function updateSegmentReferences(_0x2c1076,_0x153b34){const _0x24e5b4=a121_0x57c4;if(!_0x2c1076)return;for(const _0x423da5 of _0x2c1076){if(_0x423da5[_0x24e5b4(0x155)]?.['segment']){const _0x400d04=_0x153b34['get'](_0x423da5[_0x24e5b4(0x155)][_0x24e5b4(0x12d)]);_0x400d04&&(_0x423da5['entry_criteria'][_0x24e5b4(0x12d)]=_0x400d04);}if(_0x423da5[_0x24e5b4(0x12c)])for(const _0x1d1540 of _0x423da5[_0x24e5b4(0x12c)]){if(_0x1d1540[_0x24e5b4(0x12d)]){const _0x23d37d=_0x153b34[_0x24e5b4(0x11e)](_0x1d1540[_0x24e5b4(0x12d)]);_0x23d37d&&(_0x1d1540[_0x24e5b4(0x12d)]=_0x23d37d);}}if(_0x423da5[_0x24e5b4(0x12f)]?.['segment']){const _0x395f2b=_0x153b34[_0x24e5b4(0x11e)](_0x423da5[_0x24e5b4(0x12f)][_0x24e5b4(0x12d)]);_0x395f2b&&(_0x423da5[_0x24e5b4(0x12f)][_0x24e5b4(0x12d)]=_0x395f2b);}if(_0x423da5['steps'])for(const _0x56ff06 of _0x423da5[_0x24e5b4(0x130)]){if(_0x56ff06[_0x24e5b4(0x16e)]===_0x24e5b4(0x123)&&_0x56ff06['with']?.[_0x24e5b4(0x141)])for(const _0x4ff1ed of _0x56ff06[_0x24e5b4(0x140)][_0x24e5b4(0x141)]){if(_0x4ff1ed[_0x24e5b4(0x12d)]){const _0x2fc38e=_0x153b34[_0x24e5b4(0x11e)](_0x4ff1ed['segment']);_0x2fc38e&&(_0x4ff1ed[_0x24e5b4(0x12d)]=_0x2fc38e);}}if(_0x56ff06[_0x24e5b4(0x16e)]==='wait'&&_0x56ff06[_0x24e5b4(0x140)]?.[_0x24e5b4(0x13b)]?.[_0x24e5b4(0x12d)]){const _0x307448=_0x153b34[_0x24e5b4(0x11e)](_0x56ff06[_0x24e5b4(0x140)]['condition'][_0x24e5b4(0x12d)]);_0x307448&&(_0x56ff06[_0x24e5b4(0x140)][_0x24e5b4(0x13b)]['segment']=_0x307448);}}}}export function updateSegmentRefsInSegments(_0x23c011,_0x54e48e){const _0x30aff6=a121_0x57c4;for(const _0x2f7d9e of Object['values'](_0x23c011)){_0x2f7d9e[_0x30aff6(0x169)]&&updateSegmentRefsInRule(_0x2f7d9e[_0x30aff6(0x169)],_0x54e48e);}}function a121_0x5015(){const _0x3e6ecf=['wait','index','with','branches','activations','conditions','22735193fUeCBA','versions','columns','activation','keys','item','segments','draft','stringify','exclude','17566AfjIyc','yaml','length','version','34915TVEdEu','bundle_id','join','entry_criteria','1133BBOuAI','7232113qMiFSH','startsWith','slice','merged','entries','description','journeyStages','match','all_columns','234PbCWzf','12DhyRDt','nameMapping','set','behavior','null','include','105471HMIoCO','activation_template_id','rule','23060UReAvr','attributes','.yml','stages','type','push','bundle_name','trim','480EjWOXQ','131YyKfDG','get','find','launched','connection','24756MgQtxR','decision_point','has','toLowerCase','object','name','connector_config','journeys','notification','from','exit_criteria','segment','224JpSTRg','milestone','steps','version_number','some','state','schedule','journeyBundleName','.yaml','endsWith','isArray','string','map','condition','goal','replace'];a121_0x5015=function(){return _0x3e6ecf;};return a121_0x5015();}function updateSegmentRefsInRule(_0x17f5d1,_0x7a1eaa){const _0x4b38d4=a121_0x57c4;if(_0x17f5d1===null||typeof _0x17f5d1!=='object')return;if(Array[_0x4b38d4(0x138)](_0x17f5d1)){for(const _0x2333d4 of _0x17f5d1){updateSegmentRefsInRule(_0x2333d4,_0x7a1eaa);}return;}const _0x497a5d=_0x17f5d1;if((_0x497a5d[_0x4b38d4(0x16e)]===_0x4b38d4(0x166)||_0x497a5d['type']===_0x4b38d4(0x14d))&&typeof _0x497a5d[_0x4b38d4(0x12d)]===_0x4b38d4(0x139)){const _0x2c3e81=_0x7a1eaa[_0x4b38d4(0x11e)](_0x497a5d[_0x4b38d4(0x12d)]);_0x2c3e81&&(_0x497a5d['segment']=_0x2c3e81);}if(_0x497a5d[_0x4b38d4(0x143)]&&Array[_0x4b38d4(0x138)](_0x497a5d[_0x4b38d4(0x143)]))for(const _0x24b628 of _0x497a5d[_0x4b38d4(0x143)]){updateSegmentRefsInRule(_0x24b628,_0x7a1eaa);}}export function buildJourneysArray(_0x11c2e0,_0x3630ab){const _0x19b5be=a121_0x57c4;return _0x11c2e0[_0x19b5be(0x13a)](_0x324c04=>{const _0x44e6e7=_0x19b5be,_0x3ddf9b=_0x3630ab?_0x324c04['item']['id']===_0x3630ab:_0x11c2e0[_0x44e6e7(0x150)]===0x1,_0x1c8087=_0x324c04[_0x44e6e7(0x14f)][_0x44e6e7(0x129)]?.[0x0],_0x41e21b=_0x1c8087?.[_0x44e6e7(0x13c)]||_0x324c04['yaml'][_0x44e6e7(0x13c)],_0x147eca={'version':_0x1c8087?.[_0x44e6e7(0x151)]||_0x324c04['yaml'][_0x44e6e7(0x151)]||_0x324c04[_0x44e6e7(0x149)][_0x44e6e7(0x127)],'state':_0x324c04[_0x44e6e7(0x149)][_0x44e6e7(0x133)]===_0x44e6e7(0x120)?_0x44e6e7(0x120):_0x44e6e7(0x14b),'stages':_0x1c8087?.[_0x44e6e7(0x16d)]||_0x324c04[_0x44e6e7(0x14f)][_0x44e6e7(0x16d)]||[],'id':_0x1c8087?.['id']||_0x324c04[_0x44e6e7(0x14f)]['id'],'version_number':_0x1c8087?.[_0x44e6e7(0x131)]||_0x324c04[_0x44e6e7(0x14f)]['version_number']};return _0x41e21b&&(_0x147eca[_0x44e6e7(0x13c)]=_0x41e21b),_0x3ddf9b&&(_0x147eca['latest']=!![]),_0x147eca;});}export function buildMergedJourneyDef(_0x569510,_0x1e1e13,_0x1ed4d1){const _0x206327=a121_0x57c4,_0x2b02ee=_0x569510[0x0][_0x206327(0x14f)],_0xbec129=buildJourneysArray(_0x569510,_0x1ed4d1),{merged:_0xcd39c6,nameMapping:_0x18585a}=consolidateSegmentsByContent(_0x569510[_0x206327(0x13a)](_0x21d1e7=>_0x21d1e7[_0x206327(0x14f)][_0x206327(0x14a)]),_0x1e1e13);updateSegmentRefsInSegments(_0xcd39c6,_0x18585a);const _0x10eec9=Array[_0x206327(0x12b)](_0x18585a[_0x206327(0x15b)]())[_0x206327(0x132)](([_0x375136,_0x2f6ccf])=>_0x375136!==_0x2f6ccf&&_0x375136[_0x206327(0x158)](_0x206327(0x155)));let _0x2e5a82=_0xcd39c6,_0x18b60c=new Map();if(_0x10eec9){const _0x5a85a3=consolidateSegmentsByContent([_0xcd39c6],_0x1e1e13);_0x2e5a82=_0x5a85a3[_0x206327(0x15a)],_0x18b60c=_0x5a85a3[_0x206327(0x162)];}const _0x34f44d=new Map(_0x18585a);for(const [_0x12876f,_0x851df8]of _0x18b60c[_0x206327(0x15b)]()){_0x34f44d['set'](_0x12876f,_0x851df8);}for(const [_0x146b33,_0x2fc76e]of _0x34f44d[_0x206327(0x15b)]()){let _0x459b83=_0x2fc76e,_0x307c84=0x0;while(_0x34f44d[_0x206327(0x124)](_0x459b83)&&_0x34f44d[_0x206327(0x11e)](_0x459b83)!==_0x459b83&&_0x307c84<MAX_MAPPING_CHAIN_DEPTH){_0x459b83=_0x34f44d[_0x206327(0x11e)](_0x459b83),_0x307c84++;}_0x459b83!==_0x2fc76e&&_0x34f44d[_0x206327(0x163)](_0x146b33,_0x459b83);}for(const _0x222273 of _0xbec129){updateSegmentReferences(_0x222273[_0x206327(0x16d)],_0x34f44d);}const {merged:_0x1950d5,nameMapping:_0x5a53a8}=consolidateActivationsByContent(_0x569510[_0x206327(0x13a)](_0x47c6ae=>_0x47c6ae[_0x206327(0x14f)][_0x206327(0x142)]));for(const _0x2e7630 of _0xbec129){updateActivationReferences(_0x2e7630[_0x206327(0x16d)],_0x5a53a8);}let _0x337191=_0x2b02ee[_0x206327(0x13c)];if(_0x337191?.[_0x206327(0x12d)]){const _0x42cc8b=_0x34f44d[_0x206327(0x11e)](_0x337191['segment']);_0x42cc8b&&(_0x337191={..._0x337191,'segment':_0x42cc8b});}for(const _0x5ba4b5 of _0xbec129){if(_0x5ba4b5[_0x206327(0x13c)]?.[_0x206327(0x12d)]){const _0xb31bda=_0x34f44d['get'](_0x5ba4b5[_0x206327(0x13c)][_0x206327(0x12d)]);_0xb31bda&&(_0x5ba4b5['goal']={..._0x5ba4b5['goal'],'segment':_0xb31bda});}}return _0xbec129[_0x206327(0x132)](_0x5c344b=>_0x5c344b[_0x206327(0x13c)])&&(_0x337191=undefined),{'type':'journey','name':_0x2b02ee[_0x206327(0x127)],'description':_0x2b02ee[_0x206327(0x15c)],'goal':_0x337191,'reentry':_0x2b02ee['reentry'],'segments':Object[_0x206327(0x148)](_0x2e5a82)['length']>0x0?_0x2e5a82:undefined,'activations':Object[_0x206327(0x148)](_0x1950d5)[_0x206327(0x150)]>0x0?_0x1950d5:undefined,'journeys':_0xbec129,'bundle_id':_0x2b02ee[_0x206327(0x153)],'bundle_name':_0x2b02ee[_0x206327(0x170)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x4a3a7d,_0x3d7104,_0x4fa2fa,_0x46d1b4){const _0x421ab6=a121_0x57c4,_0x42f66b=_0x4a3a7d+':'+_0x3d7104,_0x44b157=_0x4fa2fa[_0x421ab6(0x11e)](_0x42f66b);if(_0x44b157)return _0x44b157;const _0x2f2692=await _0x46d1b4(_0x4a3a7d),_0x173938=_0x2f2692[_0x421ab6(0x16b)][_0x421ab6(0x135)]||_0x2f2692['attributes'][_0x421ab6(0x127)],_0x341a35=_0x2f2692[_0x421ab6(0x16b)][_0x421ab6(0x15d)][_0x421ab6(0x11f)](_0x15c147=>String(_0x15c147['id'])===String(_0x3d7104)),_0x4a4d89=_0x341a35?.['name']||_0x3d7104,_0x8e79b9={'journeyName':_0x173938,'stageName':_0x4a4d89};return _0x4fa2fa['set'](_0x42f66b,_0x8e79b9),_0x8e79b9;}export function formatApiJourneyName(_0xbad2bf,_0x1fde12){return _0x1fde12+'\x20('+_0xbad2bf+')';}export function isLocalJourneyRef(_0x4d5082){const _0x466932=a121_0x57c4;return _0x4d5082[_0x466932(0x137)](_0x466932(0x16c))||_0x4d5082[_0x466932(0x137)](_0x466932(0x136));}export function buildLocalRuleToNameMapping(_0x248228){const _0x2b2647=a121_0x57c4,_0x2f9b06=new Map();if(!_0x248228)return _0x2f9b06;for(const [_0x5d4941,_0x52144e]of Object['entries'](_0x248228)){if(_0x52144e['rule']){const _0x392d30=serializeRule(_0x52144e['rule']),_0x406968=_0x2f9b06['get'](_0x392d30)||[];_0x406968[_0x2b2647(0x16f)](_0x5d4941),_0x2f9b06[_0x2b2647(0x163)](_0x392d30,_0x406968);}}return _0x2f9b06;}export function buildLocalRuleToNameMappingFromJourney(_0xe5005){const _0x3afa0b=a121_0x57c4,_0x33644e=_0xe5005[_0x3afa0b(0x14a)];if(!_0x33644e)return new Map();const _0x4d5c72=collectSegmentUsageCounts(_0xe5005),_0x15a0a6=new Map();let _0x10cf9a=0x0;for(const [_0x7ca2b7,_0x290f59]of Object[_0x3afa0b(0x15b)](_0x33644e)){if(!_0x290f59[_0x3afa0b(0x169)]){_0x10cf9a++;continue;}const _0xf8c0db=serializeRule(_0x290f59[_0x3afa0b(0x169)]),_0x4b3232=_0x15a0a6['get'](_0xf8c0db)||[];_0x4b3232['push']({'name':_0x7ca2b7,'index':_0x10cf9a}),_0x15a0a6[_0x3afa0b(0x163)](_0xf8c0db,_0x4b3232),_0x10cf9a++;}const _0x2e3a2d=new Map();for(const [_0x1022b0,_0x5a2282]of _0x15a0a6){const _0x14f5e6=_0x5a2282[_0x3afa0b(0x159)]()['sort']((_0x382e49,_0x51631a)=>{const _0x49f995=_0x3afa0b,_0x253e71=_0x4d5c72[_0x49f995(0x11e)](_0x382e49[_0x49f995(0x127)])||0x0,_0x35d03c=_0x4d5c72['get'](_0x51631a['name'])||0x0;if(_0x253e71!==_0x35d03c)return _0x35d03c-_0x253e71;return _0x382e49[_0x49f995(0x13f)]-_0x51631a[_0x49f995(0x13f)];})['map'](_0x519ef2=>_0x519ef2[_0x3afa0b(0x127)]);_0x2e3a2d['set'](_0x1022b0,_0x14f5e6);}return _0x2e3a2d;}export function collectSegmentUsageCounts(_0x12dd65){const _0x2d8c5e=a121_0x57c4,_0x36e8db=new Map(),_0x14d362=_0x1b8348=>{const _0x5ba12e=a121_0x57c4;if(!_0x1b8348)return;_0x36e8db[_0x5ba12e(0x163)](_0x1b8348,(_0x36e8db[_0x5ba12e(0x11e)](_0x1b8348)||0x0)+0x1);},_0x3c32f4=_0x36e141=>{const _0x5e7687=a121_0x57c4;for(const _0x113f93 of _0x36e141){_0x14d362(_0x113f93[_0x5e7687(0x155)]?.[_0x5e7687(0x12d)]);if(_0x113f93[_0x5e7687(0x12c)])for(const _0x392647 of _0x113f93[_0x5e7687(0x12c)]){_0x14d362(_0x392647['segment']);}_0x14d362(_0x113f93['milestone']?.[_0x5e7687(0x12d)]);if(_0x113f93[_0x5e7687(0x130)])for(const _0x26ddb7 of _0x113f93[_0x5e7687(0x130)]){if(_0x26ddb7['type']===_0x5e7687(0x123))for(const _0x5c7eb3 of _0x26ddb7['with'][_0x5e7687(0x141)]){_0x14d362(_0x5c7eb3['segment']);}else _0x26ddb7[_0x5e7687(0x16e)]===_0x5e7687(0x13e)&&_0x14d362(_0x26ddb7[_0x5e7687(0x140)][_0x5e7687(0x13b)]?.[_0x5e7687(0x12d)]);}}};_0x14d362(_0x12dd65[_0x2d8c5e(0x13c)]?.[_0x2d8c5e(0x12d)]);if(_0x12dd65[_0x2d8c5e(0x129)])for(const _0x637f4e of _0x12dd65[_0x2d8c5e(0x129)]){_0x14d362(_0x637f4e[_0x2d8c5e(0x13c)]?.[_0x2d8c5e(0x12d)]),_0x3c32f4(_0x637f4e[_0x2d8c5e(0x16d)]);}_0x12dd65[_0x2d8c5e(0x16d)]&&_0x3c32f4(_0x12dd65['stages']);if(_0x12dd65[_0x2d8c5e(0x145)])for(const _0x5cc55a of _0x12dd65[_0x2d8c5e(0x145)]){_0x3c32f4(_0x5cc55a[_0x2d8c5e(0x16d)]);}return _0x36e8db;}
|
|
1
|
+
(function(_0x2e097d,_0x50a628){const _0x287d69=a121_0x15d4,_0x22e143=_0x2e097d();while(!![]){try{const _0x18c406=-parseInt(_0x287d69(0xb5))/0x1+-parseInt(_0x287d69(0xa4))/0x2*(-parseInt(_0x287d69(0xbb))/0x3)+parseInt(_0x287d69(0xa1))/0x4*(-parseInt(_0x287d69(0xa9))/0x5)+-parseInt(_0x287d69(0xaa))/0x6*(parseInt(_0x287d69(0xa2))/0x7)+parseInt(_0x287d69(0xd7))/0x8+-parseInt(_0x287d69(0x9f))/0x9*(-parseInt(_0x287d69(0xc9))/0xa)+parseInt(_0x287d69(0xd4))/0xb;if(_0x18c406===_0x50a628)break;else _0x22e143['push'](_0x22e143['shift']());}catch(_0x2068f0){_0x22e143['push'](_0x22e143['shift']());}}}(a121_0x9913,0x50afc));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x40ea5b){const _0x2f2845=a121_0x15d4;return _0x40ea5b[_0x2f2845(0xcb)]()[_0x2f2845(0x9b)](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0x2f2845(0x9b)](/_+/g,'_')[_0x2f2845(0x9b)](/^_|_$/g,'');}function a121_0x15d4(_0x52bbe5,_0x1a6a76){_0x52bbe5=_0x52bbe5-0x97;const _0x9913ee=a121_0x9913();let _0x15d4fc=_0x9913ee[_0x52bbe5];return _0x15d4fc;}export function generateJourneyLocalName(_0x57f889){const _0x5e67f2=a121_0x15d4,_0x11db1a=_0x57f889[_0x5e67f2(0xa7)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x11db1a){const _0x577f18=_0x11db1a[0x1]['toLowerCase'](),_0x3a34ee=_0x11db1a[0x2],_0x388d31=_0x3a34ee[_0x5e67f2(0x9b)](/-/g,'')[_0x5e67f2(0xa3)](0x0,0x4)['toLowerCase']();return _0x577f18+'_'+_0x388d31;}const _0x30c09a=_0x57f889[_0x5e67f2(0xa7)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x30c09a){const _0x4b16e4=_0x30c09a[0x1],_0x3083d8=_0x30c09a[0x2][_0x5e67f2(0xcb)](),_0x273511=_0x4b16e4['replace'](/-/g,'')[_0x5e67f2(0xa3)](0x0,0x4)[_0x5e67f2(0xcb)]();return _0x3083d8+'_'+_0x273511;}return undefined;}function stableStringify(_0x2948a2){const _0x3a9385=a121_0x15d4;if(Array['isArray'](_0x2948a2))return'['+_0x2948a2[_0x3a9385(0xca)](_0x13df92=>stableStringify(_0x13df92))[_0x3a9385(0xc3)](',')+']';if(_0x2948a2&&typeof _0x2948a2===_0x3a9385(0xd8)){const _0x3367e4=_0x2948a2,_0xce599a=Object[_0x3a9385(0xd1)](_0x3367e4)[_0x3a9385(0xe6)](),_0x559090=_0xce599a[_0x3a9385(0xca)](_0x3f0382=>'\x22'+_0x3f0382+'\x22:'+stableStringify(_0x3367e4[_0x3f0382]));return'{'+_0x559090[_0x3a9385(0xc3)](',')+'}';}const _0x21a075=JSON[_0x3a9385(0xb4)](_0x2948a2);return _0x21a075===undefined?_0x3a9385(0x98):_0x21a075;}export function consolidateActivationsByContent(_0x27c6e2){const _0x29afc4=a121_0x15d4,_0x367f5a={},_0x4a6bf3=new Map(),_0x3bb2f8=new Map();for(const _0x4d09bc of _0x27c6e2){if(!_0x4d09bc)continue;for(const [_0xe09ff3,_0x3a1f7d]of Object[_0x29afc4(0xa6)](_0x4d09bc)){const _0xeba330={'connection':_0x3a1f7d['connection'],..._0x3a1f7d['all_columns']!==undefined&&{'all_columns':_0x3a1f7d['all_columns']},..._0x3a1f7d[_0x29afc4(0xbf)]!==undefined&&{'columns':_0x3a1f7d['columns']},..._0x3a1f7d[_0x29afc4(0xd6)]!==undefined&&{'behavior':_0x3a1f7d[_0x29afc4(0xd6)]},..._0x3a1f7d[_0x29afc4(0xdb)]!==undefined&&{'schedule':_0x3a1f7d[_0x29afc4(0xdb)]},..._0x3a1f7d[_0x29afc4(0xdd)]!==undefined&&{'notification':_0x3a1f7d[_0x29afc4(0xdd)]},..._0x3a1f7d[_0x29afc4(0xbe)]!==undefined&&{'connector_config':_0x3a1f7d['connector_config']},..._0x3a1f7d[_0x29afc4(0xb3)]!==undefined&&{'activation_template_id':_0x3a1f7d['activation_template_id']}},_0x4d37bf=stableStringify(_0xeba330),_0x2ba896=_0x3bb2f8[_0x29afc4(0xe0)](_0x4d37bf);_0x2ba896?_0x4a6bf3['set'](_0xe09ff3,_0x2ba896):(_0x367f5a[_0xe09ff3]=_0x3a1f7d,_0x4a6bf3[_0x29afc4(0x97)](_0xe09ff3,_0xe09ff3),_0x3bb2f8[_0x29afc4(0x97)](_0x4d37bf,_0xe09ff3));}}return{'merged':_0x367f5a,'nameMapping':_0x4a6bf3};}export function updateActivationReferences(_0x321f33,_0x148d4c){const _0x3ece70=a121_0x15d4;if(!_0x321f33)return;for(const _0x535abd of _0x321f33){if(!_0x535abd['steps'])continue;for(const _0x53ed1a of _0x535abd[_0x3ece70(0xda)]){if(_0x53ed1a['type']===_0x3ece70(0xac)&&_0x53ed1a['with']?.[_0x3ece70(0xac)]){const _0x136842=_0x148d4c['get'](_0x53ed1a['with'][_0x3ece70(0xac)]);_0x136842&&_0x136842!==_0x53ed1a['with'][_0x3ece70(0xac)]&&(_0x53ed1a[_0x3ece70(0xae)][_0x3ece70(0xac)]=_0x136842);}}}}export function consolidateSegmentsByContent(_0x47d6de,_0x46d69a){const _0x9c9bc3=a121_0x15d4,_0x4dcb46={},_0x2b8659=new Map(),_0x164266=new Map();for(const _0x14b9da of _0x47d6de){if(!_0x14b9da)continue;for(const [_0x337ef5,_0x7740ae]of Object[_0x9c9bc3(0xa6)](_0x14b9da)){if(!_0x7740ae['rule']){_0x4dcb46[_0x337ef5]=_0x7740ae,_0x2b8659[_0x9c9bc3(0x97)](_0x337ef5,_0x337ef5);continue;}const _0x33cabb=_0x7740ae['description']&&_0x7740ae['description'][_0x9c9bc3(0xaf)]()?_0x7740ae[_0x9c9bc3(0xce)]:undefined,_0x367ead=JSON[_0x9c9bc3(0xb4)]({'description':_0x33cabb,'rule':deepSortObject(_0x7740ae[_0x9c9bc3(0xa8)])}),_0x4320b8=_0x164266[_0x9c9bc3(0xe0)](_0x367ead);if(_0x4320b8){const _0x1d62e5={..._0x7740ae[_0x9c9bc3(0xce)]!==undefined&&{'description':_0x7740ae[_0x9c9bc3(0xce)]},'rule':_0x7740ae[_0x9c9bc3(0xa8)]?deepSortObject(_0x7740ae[_0x9c9bc3(0xa8)]):_0x7740ae[_0x9c9bc3(0xa8)]};if(_0x337ef5<_0x4320b8){_0x4dcb46[_0x337ef5]=_0x1d62e5,delete _0x4dcb46[_0x4320b8];for(const [_0x6540fd,_0x58b853]of _0x2b8659[_0x9c9bc3(0xa6)]()){_0x58b853===_0x4320b8&&_0x2b8659[_0x9c9bc3(0x97)](_0x6540fd,_0x337ef5);}_0x2b8659['set'](_0x337ef5,_0x337ef5),_0x164266[_0x9c9bc3(0x97)](_0x367ead,_0x337ef5);}else _0x4dcb46[_0x4320b8]=_0x1d62e5,_0x2b8659[_0x9c9bc3(0x97)](_0x337ef5,_0x4320b8);}else{let _0x17db41=_0x337ef5;if(_0x46d69a){const _0x21057c=_0x46d69a[_0x9c9bc3(0xe0)](_0x367ead);_0x21057c&&_0x21057c[_0x9c9bc3(0xd9)]>0x0&&(_0x17db41=_0x21057c[_0x9c9bc3(0xa3)]()['sort']()[0x0]);}const _0x5f06da={..._0x7740ae[_0x9c9bc3(0xce)]!==undefined&&{'description':_0x7740ae['description']},'rule':_0x7740ae[_0x9c9bc3(0xa8)]?deepSortObject(_0x7740ae[_0x9c9bc3(0xa8)]):_0x7740ae['rule']};_0x4dcb46[_0x17db41]=_0x5f06da,_0x2b8659[_0x9c9bc3(0x97)](_0x337ef5,_0x17db41),_0x164266[_0x9c9bc3(0x97)](_0x367ead,_0x17db41);}}}return{'merged':_0x4dcb46,'nameMapping':_0x2b8659};}export function updateSegmentReferences(_0xa3c60f,_0x253ff1){const _0x4bc6cb=a121_0x15d4;if(!_0xa3c60f)return;for(const _0x264c92 of _0xa3c60f){if(_0x264c92[_0x4bc6cb(0xb8)]?.[_0x4bc6cb(0xc0)]){const _0xcbc136=_0x253ff1['get'](_0x264c92[_0x4bc6cb(0xb8)][_0x4bc6cb(0xc0)]);_0xcbc136&&(_0x264c92[_0x4bc6cb(0xb8)][_0x4bc6cb(0xc0)]=_0xcbc136);}if(_0x264c92[_0x4bc6cb(0xb9)])for(const _0x12ae5f of _0x264c92[_0x4bc6cb(0xb9)]){if(_0x12ae5f['segment']){const _0x1c6c37=_0x253ff1[_0x4bc6cb(0xe0)](_0x12ae5f[_0x4bc6cb(0xc0)]);_0x1c6c37&&(_0x12ae5f[_0x4bc6cb(0xc0)]=_0x1c6c37);}}if(_0x264c92[_0x4bc6cb(0xcc)]?.[_0x4bc6cb(0xc0)]){const _0x2a4aee=_0x253ff1[_0x4bc6cb(0xe0)](_0x264c92[_0x4bc6cb(0xcc)][_0x4bc6cb(0xc0)]);_0x2a4aee&&(_0x264c92[_0x4bc6cb(0xcc)][_0x4bc6cb(0xc0)]=_0x2a4aee);}if(_0x264c92[_0x4bc6cb(0xda)])for(const _0x1aa040 of _0x264c92['steps']){if(_0x1aa040['type']==='decision_point'&&_0x1aa040['with']?.[_0x4bc6cb(0x9c)])for(const _0x267d40 of _0x1aa040[_0x4bc6cb(0xae)][_0x4bc6cb(0x9c)]){if(_0x267d40['segment']){const _0x598889=_0x253ff1[_0x4bc6cb(0xe0)](_0x267d40[_0x4bc6cb(0xc0)]);_0x598889&&(_0x267d40[_0x4bc6cb(0xc0)]=_0x598889);}}if(_0x1aa040[_0x4bc6cb(0x9a)]===_0x4bc6cb(0xad)&&_0x1aa040['with']?.[_0x4bc6cb(0xe2)]?.['segment']){const _0x3eb6d8=_0x253ff1[_0x4bc6cb(0xe0)](_0x1aa040[_0x4bc6cb(0xae)]['condition']['segment']);_0x3eb6d8&&(_0x1aa040[_0x4bc6cb(0xae)][_0x4bc6cb(0xe2)]['segment']=_0x3eb6d8);}}}}export function updateSegmentRefsInSegments(_0xe3f9d3,_0x2d4910){const _0x45e966=a121_0x15d4;for(const _0xba53c3 of Object[_0x45e966(0xc7)](_0xe3f9d3)){_0xba53c3['rule']&&updateSegmentRefsInRule(_0xba53c3['rule'],_0x2d4910);}}function updateSegmentRefsInRule(_0x1efc93,_0x4e31ce){const _0x7f7cb1=a121_0x15d4;if(_0x1efc93===null||typeof _0x1efc93!=='object')return;if(Array['isArray'](_0x1efc93)){for(const _0x4de47d of _0x1efc93){updateSegmentRefsInRule(_0x4de47d,_0x4e31ce);}return;}const _0x2ee29b=_0x1efc93;if((_0x2ee29b[_0x7f7cb1(0x9a)]==='include'||_0x2ee29b[_0x7f7cb1(0x9a)]===_0x7f7cb1(0xa0))&&typeof _0x2ee29b[_0x7f7cb1(0xc0)]===_0x7f7cb1(0xb1)){const _0x424b14=_0x4e31ce['get'](_0x2ee29b[_0x7f7cb1(0xc0)]);_0x424b14&&(_0x2ee29b['segment']=_0x424b14);}if(_0x2ee29b[_0x7f7cb1(0xc8)]&&Array[_0x7f7cb1(0xcd)](_0x2ee29b[_0x7f7cb1(0xc8)]))for(const _0x33784e of _0x2ee29b[_0x7f7cb1(0xc8)]){updateSegmentRefsInRule(_0x33784e,_0x4e31ce);}}export function buildJourneysArray(_0x21822a,_0x29a102){const _0x5b0238=a121_0x15d4;return _0x21822a[_0x5b0238(0xca)](_0x294862=>{const _0xc47132=_0x5b0238,_0x415bce=_0x29a102?_0x294862[_0xc47132(0xbc)]['id']===_0x29a102:_0x21822a['length']===0x1,_0x300303=_0x294862[_0xc47132(0xbd)]['journeys']?.[0x0],_0x202389=_0x300303?.['goal']||_0x294862[_0xc47132(0xbd)][_0xc47132(0xc5)],_0x1c916c={'version':_0x300303?.[_0xc47132(0x99)]||_0x294862[_0xc47132(0xbd)][_0xc47132(0x99)]||_0x294862[_0xc47132(0xbc)][_0xc47132(0xab)],'state':_0x294862[_0xc47132(0xbc)][_0xc47132(0xde)]===_0xc47132(0xb0)?_0xc47132(0xb0):_0xc47132(0xb6),'stages':_0x300303?.[_0xc47132(0xd2)]||_0x294862[_0xc47132(0xbd)]['stages']||[],'id':_0x300303?.['id']||_0x294862[_0xc47132(0xbd)]['id'],'version_number':_0x300303?.[_0xc47132(0xdc)]||_0x294862['yaml'][_0xc47132(0xdc)]};return _0x202389&&(_0x1c916c[_0xc47132(0xc5)]=_0x202389),_0x415bce&&(_0x1c916c[_0xc47132(0xb2)]=!![]),_0x1c916c;});}export function buildMergedJourneyDef(_0x5bc7b0,_0x11f703,_0xbc16b9){const _0x10a567=a121_0x15d4,_0x166b52=_0x5bc7b0[0x0]['yaml'],_0x3387db=buildJourneysArray(_0x5bc7b0,_0xbc16b9),{merged:_0x22b633,nameMapping:_0x1d8b14}=consolidateSegmentsByContent(_0x5bc7b0[_0x10a567(0xca)](_0x4f078b=>_0x4f078b[_0x10a567(0xbd)][_0x10a567(0x9e)]),_0x11f703);updateSegmentRefsInSegments(_0x22b633,_0x1d8b14);const _0x3115e2=Array[_0x10a567(0xc2)](_0x1d8b14[_0x10a567(0xa6)]())[_0x10a567(0xc4)](([_0xd0e264,_0x2f50f0])=>_0xd0e264!==_0x2f50f0&&_0xd0e264[_0x10a567(0xe5)]('entry_criteria'));let _0x5bce73=_0x22b633,_0x524bae=new Map();if(_0x3115e2){const _0x3f08b8=consolidateSegmentsByContent([_0x22b633],_0x11f703);_0x5bce73=_0x3f08b8[_0x10a567(0xe3)],_0x524bae=_0x3f08b8['nameMapping'];}const _0x50f130=new Map(_0x1d8b14);for(const [_0x239ca2,_0x548852]of _0x524bae[_0x10a567(0xa6)]()){_0x50f130[_0x10a567(0x97)](_0x239ca2,_0x548852);}for(const [_0x5b9698,_0x4e5fee]of _0x50f130['entries']()){let _0x8f7597=_0x4e5fee,_0x4b2eda=0x0;while(_0x50f130[_0x10a567(0xa5)](_0x8f7597)&&_0x50f130[_0x10a567(0xe0)](_0x8f7597)!==_0x8f7597&&_0x4b2eda<MAX_MAPPING_CHAIN_DEPTH){_0x8f7597=_0x50f130[_0x10a567(0xe0)](_0x8f7597),_0x4b2eda++;}_0x8f7597!==_0x4e5fee&&_0x50f130[_0x10a567(0x97)](_0x5b9698,_0x8f7597);}for(const _0x1f9ace of _0x3387db){updateSegmentReferences(_0x1f9ace[_0x10a567(0xd2)],_0x50f130);}const {merged:_0x1be8ae,nameMapping:_0x3ebc4a}=consolidateActivationsByContent(_0x5bc7b0[_0x10a567(0xca)](_0x55bf9a=>_0x55bf9a[_0x10a567(0xbd)][_0x10a567(0xb7)]));for(const _0x7cabd9 of _0x3387db){updateActivationReferences(_0x7cabd9[_0x10a567(0xd2)],_0x3ebc4a);}let _0xb832d2=_0x166b52[_0x10a567(0xc5)];if(_0xb832d2?.['segment']){const _0x12bd0f=_0x50f130['get'](_0xb832d2['segment']);_0x12bd0f&&(_0xb832d2={..._0xb832d2,'segment':_0x12bd0f});}for(const _0x391110 of _0x3387db){if(_0x391110['goal']?.[_0x10a567(0xc0)]){const _0x1d99a2=_0x50f130[_0x10a567(0xe0)](_0x391110[_0x10a567(0xc5)][_0x10a567(0xc0)]);_0x1d99a2&&(_0x391110[_0x10a567(0xc5)]={..._0x391110[_0x10a567(0xc5)],'segment':_0x1d99a2});}}return _0x3387db[_0x10a567(0xc4)](_0x8ce3f=>_0x8ce3f[_0x10a567(0xc5)])&&(_0xb832d2=undefined),{'type':_0x10a567(0x9d),'name':_0x166b52[_0x10a567(0xab)],'description':_0x166b52[_0x10a567(0xce)],'goal':_0xb832d2,'reentry':_0x166b52[_0x10a567(0xd0)],'segments':Object[_0x10a567(0xd1)](_0x5bce73)['length']>0x0?_0x5bce73:undefined,'activations':Object['keys'](_0x1be8ae)[_0x10a567(0xd9)]>0x0?_0x1be8ae:undefined,'journeys':_0x3387db,'bundle_id':_0x166b52[_0x10a567(0xc6)],'bundle_name':_0x166b52[_0x10a567(0xc1)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x1fe4c9,_0x213735,_0x5a350c,_0x3976c0){const _0x119625=a121_0x15d4,_0x386576=_0x1fe4c9+':'+_0x213735,_0x33f0a3=_0x5a350c['get'](_0x386576);if(_0x33f0a3)return _0x33f0a3;const _0x4a94fe=await _0x3976c0(_0x1fe4c9),_0x1be27c=_0x4a94fe['attributes']['journeyBundleName']||_0x4a94fe['attributes']['name'],_0x143dcd=_0x4a94fe[_0x119625(0xe1)]['journeyStages']['find'](_0x1e8b2f=>String(_0x1e8b2f['id'])===String(_0x213735)),_0x376a63=_0x143dcd?.['name']||_0x213735,_0xe74691={'journeyName':_0x1be27c,'stageName':_0x376a63};return _0x5a350c[_0x119625(0x97)](_0x386576,_0xe74691),_0xe74691;}export function formatApiJourneyName(_0x325727,_0x5d8da9){return _0x5d8da9+'\x20('+_0x325727+')';}function a121_0x9913(){const _0x457fac=['columns','segment','bundle_name','from','join','some','goal','bundle_id','values','conditions','319370tdCQxo','map','toLowerCase','milestone','isArray','description','push','reentry','keys','stages','journeys','7080733Ixlsnf','endsWith','behavior','943432tGbcGP','object','length','steps','schedule','version_number','notification','state','index','get','attributes','condition','merged','.yml','startsWith','sort','set','null','version','type','replace','branches','journey','segments','162KZZULN','exclude','8QLZSEi','1659TUFwms','slice','4sbpRrP','has','entries','match','rule','1263935lehqIn','3474yuKqjm','name','activation','wait','with','trim','launched','string','latest','activation_template_id','stringify','371461QLpjsX','draft','activations','entry_criteria','exit_criteria','versions','12378vBPYbj','item','yaml','connector_config'];a121_0x9913=function(){return _0x457fac;};return a121_0x9913();}export function isLocalJourneyRef(_0x1291bb){const _0x2c2f03=a121_0x15d4;return _0x1291bb[_0x2c2f03(0xd5)](_0x2c2f03(0xe4))||_0x1291bb[_0x2c2f03(0xd5)]('.yaml');}export function buildLocalRuleToNameMapping(_0xf750bd){const _0x21593e=a121_0x15d4,_0x1b88f4=new Map();if(!_0xf750bd)return _0x1b88f4;for(const [_0x515654,_0x1c37a8]of Object[_0x21593e(0xa6)](_0xf750bd)){if(_0x1c37a8[_0x21593e(0xa8)]){const _0x3de6c1=serializeRule(_0x1c37a8[_0x21593e(0xa8)]),_0x5dc336=_0x1b88f4['get'](_0x3de6c1)||[];_0x5dc336[_0x21593e(0xcf)](_0x515654),_0x1b88f4[_0x21593e(0x97)](_0x3de6c1,_0x5dc336);}}return _0x1b88f4;}export function buildLocalRuleToNameMappingFromJourney(_0x4cc5ea){const _0x743618=a121_0x15d4,_0x569f04=_0x4cc5ea[_0x743618(0x9e)];if(!_0x569f04)return new Map();const _0x118552=collectSegmentUsageCounts(_0x4cc5ea),_0x4ead44=new Map();let _0x4b1942=0x0;for(const [_0x54ea88,_0x5d2f1f]of Object[_0x743618(0xa6)](_0x569f04)){if(!_0x5d2f1f[_0x743618(0xa8)]){_0x4b1942++;continue;}const _0x47aa4f=serializeRule(_0x5d2f1f[_0x743618(0xa8)]),_0x318499=_0x4ead44[_0x743618(0xe0)](_0x47aa4f)||[];_0x318499[_0x743618(0xcf)]({'name':_0x54ea88,'index':_0x4b1942}),_0x4ead44[_0x743618(0x97)](_0x47aa4f,_0x318499),_0x4b1942++;}const _0x3ae7bb=new Map();for(const [_0x47d975,_0x2b7576]of _0x4ead44){const _0x17948e=_0x2b7576[_0x743618(0xa3)]()[_0x743618(0xe6)]((_0x5a812e,_0x1a66b4)=>{const _0x106a41=_0x743618,_0x342f5a=_0x118552[_0x106a41(0xe0)](_0x5a812e[_0x106a41(0xab)])||0x0,_0x33248a=_0x118552[_0x106a41(0xe0)](_0x1a66b4['name'])||0x0;if(_0x342f5a!==_0x33248a)return _0x33248a-_0x342f5a;return _0x5a812e[_0x106a41(0xdf)]-_0x1a66b4[_0x106a41(0xdf)];})[_0x743618(0xca)](_0x3f36b5=>_0x3f36b5[_0x743618(0xab)]);_0x3ae7bb[_0x743618(0x97)](_0x47d975,_0x17948e);}return _0x3ae7bb;}export function collectSegmentUsageCounts(_0x124b70){const _0x5392af=a121_0x15d4,_0x53e591=new Map(),_0x488bc1=_0x254712=>{const _0x54eeb2=a121_0x15d4;if(!_0x254712)return;_0x53e591[_0x54eeb2(0x97)](_0x254712,(_0x53e591[_0x54eeb2(0xe0)](_0x254712)||0x0)+0x1);},_0x462483=_0x28a8f5=>{const _0x14a43d=a121_0x15d4;for(const _0x4c3251 of _0x28a8f5){_0x488bc1(_0x4c3251['entry_criteria']?.['segment']);if(_0x4c3251[_0x14a43d(0xb9)])for(const _0x4b8950 of _0x4c3251[_0x14a43d(0xb9)]){_0x488bc1(_0x4b8950[_0x14a43d(0xc0)]);}_0x488bc1(_0x4c3251[_0x14a43d(0xcc)]?.['segment']);if(_0x4c3251[_0x14a43d(0xda)])for(const _0x1379d2 of _0x4c3251[_0x14a43d(0xda)]){if(_0x1379d2[_0x14a43d(0x9a)]==='decision_point')for(const _0x4827c7 of _0x1379d2[_0x14a43d(0xae)][_0x14a43d(0x9c)]){_0x488bc1(_0x4827c7[_0x14a43d(0xc0)]);}else _0x1379d2[_0x14a43d(0x9a)]===_0x14a43d(0xad)&&_0x488bc1(_0x1379d2[_0x14a43d(0xae)][_0x14a43d(0xe2)]?.[_0x14a43d(0xc0)]);}}};_0x488bc1(_0x124b70[_0x5392af(0xc5)]?.['segment']);if(_0x124b70['journeys'])for(const _0x541ca3 of _0x124b70[_0x5392af(0xd3)]){_0x488bc1(_0x541ca3[_0x5392af(0xc5)]?.[_0x5392af(0xc0)]),_0x462483(_0x541ca3[_0x5392af(0xd2)]);}_0x124b70[_0x5392af(0xd2)]&&_0x462483(_0x124b70['stages']);if(_0x124b70[_0x5392af(0xba)])for(const _0x5e1cf6 of _0x124b70[_0x5392af(0xba)]){_0x462483(_0x5e1cf6['stages']);}return _0x53e591;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xd7ada7,_0x361aed){const _0x30683c=a122_0x5645,_0x299c74=_0xd7ada7();while(!![]){try{const _0x23e23d=parseInt(_0x30683c(0x122))/0x1*(-parseInt(_0x30683c(0x12e))/0x2)+parseInt(_0x30683c(0x158))/0x3+-parseInt(_0x30683c(0x15d))/0x4*(parseInt(_0x30683c(0x13a))/0x5)+parseInt(_0x30683c(0x199))/0x6+parseInt(_0x30683c(0x157))/0x7*(-parseInt(_0x30683c(0x128))/0x8)+-parseInt(_0x30683c(0x16f))/0x9*(parseInt(_0x30683c(0x1a3))/0xa)+-parseInt(_0x30683c(0x16e))/0xb*(-parseInt(_0x30683c(0x136))/0xc);if(_0x23e23d===_0x361aed)break;else _0x299c74['push'](_0x299c74['shift']());}catch(_0x200311){_0x299c74['push'](_0x299c74['shift']());}}}(a122_0x4dc8,0x8981f));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x451843,_0x4d6a1d,_0x2dd702,_0x236022,_0xaed473,_0x296300){const _0x45ce91=a122_0x5645;return{'level':_0x451843,'path':_0x4d6a1d,'code':_0x2dd702,'message':_0x236022,'location':getLocationFromPath(_0xaed473[_0x45ce91(0x12c)],_0xaed473[_0x45ce91(0x1b5)],pathToArray(_0x296300??_0x4d6a1d))};}function a122_0x5645(_0x30aee,_0x1e125a){_0x30aee=_0x30aee-0x118;const _0x4dc85d=a122_0x4dc8();let _0x564569=_0x4dc85d[_0x30aee];return _0x564569;}function validateVersionStructure(_0x33c6a5,_0x3ca1d0){const _0x1fa586=a122_0x5645,_0x4427bc=[];return _0x33c6a5[_0x1fa586(0x142)]>MAX_STAGES&&_0x4427bc[_0x1fa586(0x12d)](createIssue(_0x1fa586(0x134),_0x1fa586(0x1a9),'TOO_MANY_STAGES',_0x1fa586(0x1cc)+_0x33c6a5[_0x1fa586(0x142)]+_0x1fa586(0x1c8)+MAX_STAGES,_0x3ca1d0)),_0x4427bc;}function validateStageStructure(_0x11b2f4,_0x548c54,_0x155cf6,_0x466a42){const _0x1c82fa=a122_0x5645,_0x3e8e8b=[],_0x1d234e='stages['+_0x548c54+']';_0x548c54===0x0&&!_0x11b2f4[_0x1c82fa(0x1d7)]&&_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x134),_0x1d234e+_0x1c82fa(0x1c2),_0x1c82fa(0x13d),_0x1c82fa(0x1a0)+_0x11b2f4[_0x1c82fa(0x13c)]+_0x1c82fa(0x1c4),_0x466a42,_0x1d234e));const _0x5a2ba5=_0x548c54===_0x155cf6-0x1;!_0x5a2ba5&&!_0x11b2f4[_0x1c82fa(0x15b)]&&_0x3e8e8b['push'](createIssue(_0x1c82fa(0x134),_0x1d234e+_0x1c82fa(0x141),_0x1c82fa(0x182),'Stage\x20\x27'+_0x11b2f4['name']+_0x1c82fa(0x180),_0x466a42,_0x1d234e));(!_0x11b2f4[_0x1c82fa(0x1be)]||_0x11b2f4[_0x1c82fa(0x1be)]['length']===0x0)&&_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x1b0),_0x1d234e+'.exit_criteria',_0x1c82fa(0x1a4),_0x1c82fa(0x1a0)+_0x11b2f4[_0x1c82fa(0x13c)]+_0x1c82fa(0x14e),_0x466a42,_0x1d234e));const _0x52e7af=_0x11b2f4[_0x1c82fa(0x1c0)]?.[_0x1c82fa(0x142)]??0x0;if(_0x52e7af===0x0)_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x134),_0x1d234e+_0x1c82fa(0x171),_0x1c82fa(0x1d4),_0x1c82fa(0x1a0)+_0x11b2f4[_0x1c82fa(0x13c)]+_0x1c82fa(0x1a6),_0x466a42,_0x1d234e+_0x1c82fa(0x171)));else{if(_0x52e7af===0x1)_0x3e8e8b[_0x1c82fa(0x12d)](createIssue(_0x1c82fa(0x1b0),_0x1d234e+_0x1c82fa(0x171),_0x1c82fa(0x1d4),_0x1c82fa(0x1a0)+_0x11b2f4['name']+_0x1c82fa(0x19c),_0x466a42,_0x1d234e+_0x1c82fa(0x171)));else _0x52e7af<=0x3&&_0x3e8e8b['push'](createIssue(_0x1c82fa(0x1b0),_0x1d234e+_0x1c82fa(0x171),_0x1c82fa(0x123),_0x1c82fa(0x1a0)+_0x11b2f4['name']+_0x1c82fa(0x166)+_0x52e7af+_0x1c82fa(0x167),_0x466a42,_0x1d234e+_0x1c82fa(0x171)));}return _0x3e8e8b;}function validateStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321){const _0x598a86=a122_0x5645,_0x119e5b=[];if(_0x1ac705[_0x598a86(0x154)]===_0x598a86(0x15e))return _0x1ac705['next']&&_0x119e5b[_0x598a86(0x12d)](createIssue(_0x598a86(0x134),_0x3ff9ac+_0x598a86(0x11e),_0x598a86(0x13b),_0x598a86(0x11a)+_0x1ac705[_0x598a86(0x13c)]+_0x598a86(0x11c),_0x3fcb6f)),'with'in _0x1ac705&&_0x1ac705[_0x598a86(0x163)]!==undefined&&_0x119e5b['push'](createIssue(_0x598a86(0x134),_0x3ff9ac+'.with',_0x598a86(0x13b),_0x598a86(0x11a)+_0x1ac705['name']+_0x598a86(0x1bf),_0x3fcb6f)),_0x119e5b;_0x1ac705[_0x598a86(0x193)]&&(_0x3fcb6f['stepNames']&&!_0x3fcb6f[_0x598a86(0x18a)][_0x598a86(0x1bb)](_0x1ac705[_0x598a86(0x193)])&&_0x119e5b['push'](createIssue(_0x598a86(0x134),_0x3ff9ac+_0x598a86(0x11e),_0x598a86(0x19f),_0x598a86(0x1b2)+_0x1ac705[_0x598a86(0x193)]+'\x27',_0x3fcb6f)));switch(_0x1ac705[_0x598a86(0x154)]){case'wait':_0x119e5b[_0x598a86(0x12d)](...validateWaitStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321));break;case'activation':_0x119e5b[_0x598a86(0x12d)](...validateActivationStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f));break;case _0x598a86(0x1c9):_0x119e5b[_0x598a86(0x12d)](...validateDecisionPointStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321));break;case'ab_test':_0x119e5b[_0x598a86(0x12d)](...validateAbTestStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f,_0xed4321));break;case _0x598a86(0x11b):_0x119e5b[_0x598a86(0x12d)](...validateJumpStep(_0x1ac705,_0x3ff9ac,_0x3fcb6f));break;}return _0x119e5b;}function validateWaitStep(_0x56bb06,_0x55f52e,_0x3b0137,_0x177f0e){const _0x2e4e7f=a122_0x5645,_0x5d8716=[];if(!_0x56bb06[_0x2e4e7f(0x163)])return _0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x134),_0x55f52e+_0x2e4e7f(0x164),_0x2e4e7f(0x16c),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x3b0137,_0x55f52e)),_0x5d8716;if(_0x56bb06['with'][_0x2e4e7f(0x120)]){const _0xc7de9e=_0x56bb06[_0x2e4e7f(0x163)][_0x2e4e7f(0x120)];if(_0xc7de9e[_0x2e4e7f(0x161)]){_0x3b0137[_0x2e4e7f(0x1d5)]?.[_0x2e4e7f(0x165)](_0xc7de9e[_0x2e4e7f(0x161)]);!_0xc7de9e[_0x2e4e7f(0x161)][_0x2e4e7f(0x1aa)](_0x2e4e7f(0x188))&&(_0x3b0137[_0x2e4e7f(0x187)]&&!_0x3b0137[_0x2e4e7f(0x187)]['has'](_0xc7de9e[_0x2e4e7f(0x161)])&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue('error',_0x55f52e+'.with.condition.segment',_0x2e4e7f(0x1ab),_0x2e4e7f(0x14d)+_0xc7de9e['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x3b0137)));_0xc7de9e[_0x2e4e7f(0x193)]&&_0x3b0137[_0x2e4e7f(0x18a)]&&!_0x3b0137[_0x2e4e7f(0x18a)]['has'](_0xc7de9e[_0x2e4e7f(0x193)])&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x134),_0x55f52e+_0x2e4e7f(0x19d),_0x2e4e7f(0x19f),_0x2e4e7f(0x194)+_0xc7de9e[_0x2e4e7f(0x193)]+'\x27',_0x3b0137));_0xc7de9e[_0x2e4e7f(0x1b7)]?.[_0x2e4e7f(0x193)]&&_0x3b0137[_0x2e4e7f(0x18a)]&&!_0x3b0137[_0x2e4e7f(0x18a)][_0x2e4e7f(0x1bb)](_0xc7de9e[_0x2e4e7f(0x1b7)][_0x2e4e7f(0x193)])&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x134),_0x55f52e+_0x2e4e7f(0x178),'INVALID_NEXT_REFERENCE',_0x2e4e7f(0x125)+_0xc7de9e[_0x2e4e7f(0x1b7)][_0x2e4e7f(0x193)]+'\x27',_0x3b0137));const _0x343600=_0xc7de9e['next']||_0x56bb06[_0x2e4e7f(0x193)],_0x5972e5=_0xc7de9e['timeout']?.[_0x2e4e7f(0x193)]||_0x56bb06[_0x2e4e7f(0x193)];if(_0x343600){const _0x3d6aae=_0x177f0e[_0x2e4e7f(0x14f)](_0x343600);_0x3d6aae?.[_0x2e4e7f(0x154)]===_0x2e4e7f(0x1cb)&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x1b0),_0x55f52e+'.with.condition.next','BRANCH_DIRECTLY_TO_MERGE',_0x2e4e7f(0x1cd)+_0x343600+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x3b0137,_0x55f52e+_0x2e4e7f(0x18b)));}if(_0x5972e5){const _0x420061=_0x177f0e[_0x2e4e7f(0x14f)](_0x5972e5);_0x420061?.[_0x2e4e7f(0x154)]===_0x2e4e7f(0x1cb)&&_0x5d8716[_0x2e4e7f(0x12d)](createIssue(_0x2e4e7f(0x1b0),_0x55f52e+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5972e5+_0x2e4e7f(0x17a),_0x3b0137,_0x55f52e+_0x2e4e7f(0x198)));}}}return _0x5d8716;}function validateActivationStep(_0x571d22,_0x262324,_0x340b7f){const _0xb25578=a122_0x5645,_0x236ded=[];if(!_0x571d22[_0xb25578(0x163)]?.[_0xb25578(0x1b8)])return _0x236ded[_0xb25578(0x12d)](createIssue(_0xb25578(0x134),_0x262324+_0xb25578(0x1af),_0xb25578(0x150),_0xb25578(0x181),_0x340b7f,_0x262324)),_0x236ded;const _0x21e9dd=_0x571d22[_0xb25578(0x163)][_0xb25578(0x1b8)];return _0x340b7f[_0xb25578(0x144)]&&!_0x21e9dd[_0xb25578(0x1aa)](_0xb25578(0x188))&&(!_0x340b7f[_0xb25578(0x144)][_0xb25578(0x1bb)](_0x21e9dd)&&_0x236ded['push'](createIssue('error',_0x262324+_0xb25578(0x1af),_0xb25578(0x168),_0xb25578(0x1b9)+_0x21e9dd+_0xb25578(0x17e),_0x340b7f))),_0x236ded;}function a122_0x4dc8(){const _0x1b47c9=['decision_point','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','merge','Journey\x20has\x20','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_CONDITIONS','journey\x20entry','Merge\x20step\x20\x27','Jump\x20step\x20requires\x20a\x20target','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','CONVERGENCE_WITHOUT_MERGE','INSUFFICIENT_STEPS','referencedSegments','abs','entry_criteria','splice','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','End\x20step\x20\x27','jump','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','.name','.next','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','condition','description','208583hFtSyt','FEW_STEPS','A/B\x20test\x20variant\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','level','excluded_','666776ysDaEM','.rule','DUPLICATE_STEP_NAME','MISSING_GOAL','document','push','6hATiAg','BRANCH_DIRECTLY_TO_MERGE','.with.variants[','journeys,\x20stages,\x20or\x20versions','timeout\x20of\x20\x27','.steps[','error','MERGE_TO_MERGE_CHAIN','552GbwMUA','indices','every','join','85ifICiO','END_STEP_HAS_NEXT_OR_WITH','name','MISSING_ENTRY_CRITERIA','.type','message','ACTIVATION_SCHEMA_ERROR','.milestone','length','variants','activationKeys','Decision\x20branch\x20\x27','values','Criteria\x20references\x20undefined\x20segment\x20\x27','launched','target','replace','\x27\x20with\x20no\x20action\x20in\x20between','some','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','get','MISSING_ACTIVATION_REF','\x27\x20(from:\x20','wait','Journey\x20has\x20no\x20goal\x20defined','type','keys','branch\x20\x27','77ntIOEH','998568DDUFTw','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','versions[','milestone','map','19868dMEQFV','end','versions','includes','segment','segments.','with','.with','add','\x27\x20has\x20only\x20','\x20steps\x20(may\x20be\x20too\x20simple)','MISSING_ACTIVATION_DEFINITION','INVALID_JUMP_TARGET','latest','MISSING_NAME','MISSING_WAIT_PARAMS','goal','351351osXrpl','3277125qNILDU',').\x20Use\x20a\x20merge\x20step.','.steps','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20has\x20no\x20end\x20step','sort','endsWith','\x27\x20of\x20\x27','path','.with.condition.timeout.next','condition\x20of\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','safeParse',').\x20Merge\x20is\x20unnecessary.','.segment','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.with.branches','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Activation\x20step\x20requires\x20an\x20activation\x20reference','MISSING_MILESTONE','set','MISSING_STAGES','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','activations','embeddedSegments','ref:','entries','stepNames','.with.condition','rule','goalIsInherited','data','Journey\x20can\x20have\x20at\x20most\x20one\x20','stages[','branches','size','next','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','INVALID_AB_TEST_PERCENTAGES','reduce','symbol','.with.condition.timeout','4513314cqLaov','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x20with\x20latest:\x20true','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.condition.next','journeys','INVALID_NEXT_REFERENCE','Stage\x20\x27','.exit_criteria[','match','10WBYZUl','MISSING_EXIT_CRITERIA','SINGLE_INPUT_MERGE','\x27\x20has\x20no\x20steps','trim','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','stages','startsWith','MISSING_SEGMENT_REFERENCE','step\x20\x27','percentage','.with.branches[','.with.activation','warning','success','Step\x20references\x20non-existent\x20step\x20\x27','UNUSED_EMBEDDED_SEGMENT','\x20(across\x20','source','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','timeout','activation','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','has','skipSchema','version','exit_criteria','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','steps','MISSING_END_STEP','.entry_criteria','segments','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','.with.variants','.with.target','Duplicate\x20step\x20name\x20\x27','\x20stages\x20but\x20maximum\x20is\x20'];a122_0x4dc8=function(){return _0x1b47c9;};return a122_0x4dc8();}function validateDecisionPointStep(_0x4bf842,_0x4f52e5,_0x28b87,_0x369970){const _0x594c74=a122_0x5645,_0x44ac7d=[];if(!_0x4bf842[_0x594c74(0x163)]?.[_0x594c74(0x191)]||_0x4bf842[_0x594c74(0x163)][_0x594c74(0x191)][_0x594c74(0x142)]===0x0)return _0x44ac7d['push'](createIssue(_0x594c74(0x134),_0x4f52e5+_0x594c74(0x17f),_0x594c74(0x1ce),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x28b87,_0x4f52e5)),_0x44ac7d;for(let _0x5dc944=0x0;_0x5dc944<_0x4bf842[_0x594c74(0x163)][_0x594c74(0x191)][_0x594c74(0x142)];_0x5dc944++){const _0x19c32e=_0x4bf842['with'][_0x594c74(0x191)][_0x5dc944],_0x24fe38=_0x4f52e5+_0x594c74(0x1ae)+_0x5dc944+']';_0x19c32e[_0x594c74(0x161)]&&!_0x19c32e['excluded']&&(_0x28b87[_0x594c74(0x1d5)]?.[_0x594c74(0x165)](_0x19c32e[_0x594c74(0x161)]),!_0x19c32e[_0x594c74(0x161)][_0x594c74(0x1aa)](_0x594c74(0x188))&&(_0x28b87[_0x594c74(0x187)]&&!_0x28b87[_0x594c74(0x187)][_0x594c74(0x1bb)](_0x19c32e[_0x594c74(0x161)])&&_0x44ac7d[_0x594c74(0x12d)](createIssue(_0x594c74(0x134),_0x24fe38+_0x594c74(0x17d),_0x594c74(0x1ab),_0x594c74(0x11f)+_0x19c32e['segment']+'\x27',_0x28b87))));_0x19c32e[_0x594c74(0x193)]&&_0x28b87[_0x594c74(0x18a)]&&!_0x28b87[_0x594c74(0x18a)][_0x594c74(0x1bb)](_0x19c32e[_0x594c74(0x193)])&&_0x44ac7d[_0x594c74(0x12d)](createIssue(_0x594c74(0x134),_0x24fe38+_0x594c74(0x11e),'INVALID_NEXT_REFERENCE',_0x594c74(0x159)+_0x19c32e[_0x594c74(0x193)]+'\x27',_0x28b87));if(_0x19c32e[_0x594c74(0x193)]){const _0x3abc96=_0x369970[_0x594c74(0x14f)](_0x19c32e[_0x594c74(0x193)]);_0x3abc96?.[_0x594c74(0x154)]===_0x594c74(0x1cb)&&_0x44ac7d[_0x594c74(0x12d)](createIssue(_0x594c74(0x1b0),_0x24fe38+_0x594c74(0x11e),_0x594c74(0x12f),_0x594c74(0x145)+_0x19c32e[_0x594c74(0x13c)]+_0x594c74(0x1ca)+_0x19c32e[_0x594c74(0x193)]+_0x594c74(0x14b),_0x28b87));}}return _0x44ac7d;}function validateAbTestStep(_0x94109f,_0xc0668c,_0x22cc77,_0x18ab69){const _0x252b81=a122_0x5645,_0x37192e=[];if(!_0x94109f[_0x252b81(0x163)]?.[_0x252b81(0x143)]||_0x94109f['with'][_0x252b81(0x143)]['length']===0x0)return _0x37192e[_0x252b81(0x12d)](createIssue(_0x252b81(0x134),_0xc0668c+_0x252b81(0x1c5),_0x252b81(0x1ce),_0x252b81(0x1b6),_0x22cc77,_0xc0668c)),_0x37192e;const _0x2226fa=_0x94109f[_0x252b81(0x163)][_0x252b81(0x143)][_0x252b81(0x196)]((_0xeecd6a,_0x10ce4b)=>_0xeecd6a+(_0x10ce4b[_0x252b81(0x1ad)]||0x0),0x0);Math[_0x252b81(0x1d6)](_0x2226fa-0x64)>0.01&&_0x37192e['push'](createIssue('error',_0xc0668c+_0x252b81(0x1c5),_0x252b81(0x195),_0x252b81(0x1d2)+_0x2226fa+'%)',_0x22cc77));for(let _0x49f69a=0x0;_0x49f69a<_0x94109f[_0x252b81(0x163)][_0x252b81(0x143)]['length'];_0x49f69a++){const _0x43102a=_0x94109f['with'][_0x252b81(0x143)][_0x49f69a],_0x2e7a41=_0xc0668c+_0x252b81(0x130)+_0x49f69a+']';_0x43102a[_0x252b81(0x193)]&&_0x22cc77[_0x252b81(0x18a)]&&!_0x22cc77[_0x252b81(0x18a)][_0x252b81(0x1bb)](_0x43102a[_0x252b81(0x193)])&&_0x37192e[_0x252b81(0x12d)](createIssue(_0x252b81(0x134),_0x2e7a41+'.next',_0x252b81(0x19f),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x43102a[_0x252b81(0x193)]+'\x27',_0x22cc77));if(_0x43102a[_0x252b81(0x193)]){const _0x492fc9=_0x18ab69[_0x252b81(0x14f)](_0x43102a[_0x252b81(0x193)]);_0x492fc9?.[_0x252b81(0x154)]===_0x252b81(0x1cb)&&_0x37192e[_0x252b81(0x12d)](createIssue(_0x252b81(0x1b0),_0x2e7a41+_0x252b81(0x11e),_0x252b81(0x12f),_0x252b81(0x124)+_0x43102a[_0x252b81(0x13c)]+_0x252b81(0x1ca)+_0x43102a['next']+_0x252b81(0x14b),_0x22cc77));}}return _0x37192e;}function validateJumpStep(_0x48060b,_0x30de8a,_0x4a67f2){const _0x2cce01=a122_0x5645,_0x8f3216=[];if(!_0x48060b[_0x2cce01(0x163)]?.[_0x2cce01(0x149)])return _0x8f3216[_0x2cce01(0x12d)](createIssue(_0x2cce01(0x134),_0x30de8a+_0x2cce01(0x1c6),_0x2cce01(0x169),_0x2cce01(0x1d1),_0x4a67f2,_0x30de8a)),_0x8f3216;return(!_0x48060b[_0x2cce01(0x163)][_0x2cce01(0x149)]['journey']||!_0x48060b[_0x2cce01(0x163)][_0x2cce01(0x149)]['stage'])&&_0x8f3216['push'](createIssue(_0x2cce01(0x134),_0x30de8a+'.with.target',_0x2cce01(0x169),_0x2cce01(0x1ba),_0x4a67f2)),_0x8f3216;}function buildConvergenceMap(_0x56fff9){const _0x2a7df3=a122_0x5645,_0x1a3bfb=new Map();function _0xfd0ff6(_0x85cf9b,_0x1fd559){const _0x179be5=a122_0x5645,_0x323849=_0x1a3bfb['get'](_0x85cf9b)||[];_0x323849[_0x179be5(0x12d)](_0x1fd559),_0x1a3bfb['set'](_0x85cf9b,_0x323849);}for(const _0x563c7f of _0x56fff9){_0x563c7f[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x563c7f[_0x2a7df3(0x193)],{'stepName':_0x563c7f[_0x2a7df3(0x13c)],'description':_0x2a7df3(0x1ac)+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'});if(_0x563c7f[_0x2a7df3(0x154)]===_0x2a7df3(0x1c9)&&_0x563c7f[_0x2a7df3(0x163)]?.[_0x2a7df3(0x191)])for(const _0x227498 of _0x563c7f[_0x2a7df3(0x163)]['branches']){_0x227498[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x227498[_0x2a7df3(0x193)],{'stepName':_0x563c7f['name'],'description':_0x2a7df3(0x156)+_0x227498[_0x2a7df3(0x13c)]+_0x2a7df3(0x176)+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'});}if(_0x563c7f['type']==='ab_test'&&_0x563c7f[_0x2a7df3(0x163)]?.[_0x2a7df3(0x143)])for(const _0x1ba8f1 of _0x563c7f[_0x2a7df3(0x163)]['variants']){_0x1ba8f1[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x1ba8f1[_0x2a7df3(0x193)],{'stepName':_0x563c7f['name'],'description':'variant\x20\x27'+_0x1ba8f1[_0x2a7df3(0x13c)]+'\x27\x20of\x20\x27'+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'});}_0x563c7f['type']===_0x2a7df3(0x152)&&_0x563c7f[_0x2a7df3(0x163)]?.[_0x2a7df3(0x120)]&&(_0x563c7f['with'][_0x2a7df3(0x120)][_0x2a7df3(0x193)]&&_0xfd0ff6(_0x563c7f[_0x2a7df3(0x163)][_0x2a7df3(0x120)][_0x2a7df3(0x193)],{'stepName':_0x563c7f[_0x2a7df3(0x13c)],'description':_0x2a7df3(0x179)+_0x563c7f[_0x2a7df3(0x13c)]+'\x27'}),_0x563c7f['with'][_0x2a7df3(0x120)][_0x2a7df3(0x1b7)]?.[_0x2a7df3(0x193)]&&_0xfd0ff6(_0x563c7f[_0x2a7df3(0x163)][_0x2a7df3(0x120)]['timeout'][_0x2a7df3(0x193)],{'stepName':_0x563c7f[_0x2a7df3(0x13c)],'description':_0x2a7df3(0x132)+_0x563c7f['name']+'\x27'}));}return _0x1a3bfb;}function validateFlowControl(_0xd25271,_0x2f7ded,_0x30d0c5){const _0x36b975=a122_0x5645,_0x2694ae=[],_0xff4127='stages['+_0x2f7ded+']',_0x41ee87=_0xd25271[_0x36b975(0x1c0)]||[];if(_0x41ee87[_0x36b975(0x142)]===0x0)return _0x2694ae;const _0x1208ed=new Map();for(const _0x298383 of _0x41ee87){_0x298383[_0x36b975(0x13c)]&&_0x1208ed[_0x36b975(0x183)](_0x298383[_0x36b975(0x13c)],_0x298383);}const _0x57afbc=buildConvergenceMap(_0x41ee87),_0xd72d38=_0x41ee87[_0x36b975(0x14c)](_0x100347=>_0x100347[_0x36b975(0x154)]===_0x36b975(0x15e));!_0xd72d38&&_0x2694ae[_0x36b975(0x12d)](createIssue(_0x36b975(0x134),_0xff4127+_0x36b975(0x171),_0x36b975(0x1c1),'Stage\x20\x27'+_0xd25271[_0x36b975(0x13c)]+_0x36b975(0x173),_0x30d0c5));for(const [_0x1ec379,_0x204e93]of _0x57afbc){const _0x49ee22=_0x1208ed[_0x36b975(0x14f)](_0x1ec379);if(!_0x49ee22)continue;if(_0x204e93[_0x36b975(0x142)]>0x1&&_0x49ee22['type']!=='merge'){const _0x4e5b4c=_0x204e93[_0x36b975(0x15c)](_0x2c04c2=>_0x2c04c2['description'])[_0x36b975(0x139)](',\x20');_0x2694ae[_0x36b975(0x12d)](createIssue(_0x36b975(0x134),_0xff4127+_0x36b975(0x171),_0x36b975(0x1d3),_0x36b975(0x1a8)+_0x1ec379+_0x36b975(0x151)+_0x4e5b4c+_0x36b975(0x170),_0x30d0c5));}_0x204e93['length']===0x1&&_0x49ee22[_0x36b975(0x154)]===_0x36b975(0x1cb)&&_0x2694ae[_0x36b975(0x12d)](createIssue(_0x36b975(0x1b0),_0xff4127+_0x36b975(0x171),_0x36b975(0x1a5),_0x36b975(0x1d0)+_0x1ec379+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x204e93[0x0][_0x36b975(0x121)]+_0x36b975(0x17c),_0x30d0c5));}for(const _0x11998b of _0x41ee87){if(_0x11998b[_0x36b975(0x154)]==='merge'&&_0x11998b[_0x36b975(0x193)]){const _0x417460=_0x1208ed[_0x36b975(0x14f)](_0x11998b[_0x36b975(0x193)]);_0x417460?.['type']===_0x36b975(0x1cb)&&_0x2694ae['push'](createIssue('error',_0xff4127+_0x36b975(0x171),_0x36b975(0x135),_0x36b975(0x1d0)+_0x11998b[_0x36b975(0x13c)]+_0x36b975(0x185)+_0x11998b['next']+_0x36b975(0x19a),_0x30d0c5));}}return _0x2694ae;}function validateCriteria(_0x2bb902,_0x51755a,_0x53443d){const _0x3fffa9=a122_0x5645,_0x50f6e5=[];return _0x2bb902[_0x3fffa9(0x161)]&&(_0x53443d['referencedSegments']?.['add'](_0x2bb902[_0x3fffa9(0x161)]),!_0x2bb902[_0x3fffa9(0x161)][_0x3fffa9(0x1aa)](_0x3fffa9(0x188))&&(_0x53443d[_0x3fffa9(0x187)]&&!_0x53443d[_0x3fffa9(0x187)]['has'](_0x2bb902['segment'])&&_0x50f6e5[_0x3fffa9(0x12d)](createIssue(_0x3fffa9(0x134),_0x51755a+_0x3fffa9(0x17d),_0x3fffa9(0x1ab),_0x3fffa9(0x147)+_0x2bb902[_0x3fffa9(0x161)]+'\x27',_0x53443d)))),_0x50f6e5;}function validateEmbeddedSegment(_0x5372be,_0x221397,_0x39e8ad){const _0x5c4c9e=a122_0x5645,_0x470a7a=[];return _0x5372be[_0x5c4c9e(0x18c)]&&_0x470a7a[_0x5c4c9e(0x12d)](...validateRuleDef(_0x5372be[_0x5c4c9e(0x18c)],_0x221397+_0x5c4c9e(0x129),_0x39e8ad)),_0x470a7a;}function validateStage(_0x15ae7e,_0x171a57,_0x133989,_0x153bbd){const _0x3e2a58=a122_0x5645,_0x2f71f9=[],_0x4e014d=_0x3e2a58(0x190)+_0x171a57+']',_0x54e3a6=new Map(),_0x16e195=new Map();if(_0x15ae7e['steps']){for(let _0x579be1=0x0;_0x579be1<_0x15ae7e[_0x3e2a58(0x1c0)][_0x3e2a58(0x142)];_0x579be1++){const _0x4b506e=_0x15ae7e[_0x3e2a58(0x1c0)][_0x579be1];_0x4b506e[_0x3e2a58(0x13c)]&&_0x54e3a6[_0x3e2a58(0x183)](_0x4b506e['name'],_0x4b506e);}for(let _0x47e917=0x0;_0x47e917<_0x15ae7e[_0x3e2a58(0x1c0)][_0x3e2a58(0x142)];_0x47e917++){const _0x10eeef=_0x15ae7e['steps'][_0x47e917],_0x8b4455=_0x4e014d+_0x3e2a58(0x133)+_0x47e917+']';if(_0x10eeef[_0x3e2a58(0x13c)]){if(_0x16e195['has'](_0x10eeef['name'])){const _0x8dd1e=_0x16e195[_0x3e2a58(0x14f)](_0x10eeef[_0x3e2a58(0x13c)]);_0x2f71f9[_0x3e2a58(0x12d)](createIssue(_0x3e2a58(0x134),_0x8b4455+_0x3e2a58(0x11d),_0x3e2a58(0x12a),_0x3e2a58(0x1c7)+_0x10eeef[_0x3e2a58(0x13c)]+_0x3e2a58(0x172)+_0x8dd1e+'])',_0x153bbd));}else _0x16e195[_0x3e2a58(0x183)](_0x10eeef[_0x3e2a58(0x13c)],_0x47e917);}_0x2f71f9[_0x3e2a58(0x12d)](...validateStep(_0x10eeef,_0x8b4455,_0x153bbd,_0x54e3a6));}}_0x15ae7e[_0x3e2a58(0x1d7)]&&_0x2f71f9[_0x3e2a58(0x12d)](...validateCriteria(_0x15ae7e[_0x3e2a58(0x1d7)],_0x4e014d+_0x3e2a58(0x1c2),_0x153bbd));if(_0x15ae7e[_0x3e2a58(0x1be)])for(let _0x1c14bc=0x0;_0x1c14bc<_0x15ae7e[_0x3e2a58(0x1be)][_0x3e2a58(0x142)];_0x1c14bc++){_0x2f71f9[_0x3e2a58(0x12d)](...validateCriteria(_0x15ae7e[_0x3e2a58(0x1be)][_0x1c14bc],_0x4e014d+_0x3e2a58(0x1a1)+_0x1c14bc+']',_0x153bbd));}return _0x15ae7e[_0x3e2a58(0x15b)]&&_0x2f71f9[_0x3e2a58(0x12d)](...validateCriteria(_0x15ae7e[_0x3e2a58(0x15b)],_0x4e014d+_0x3e2a58(0x141),_0x153bbd)),_0x2f71f9[_0x3e2a58(0x12d)](...validateStageStructure(_0x15ae7e,_0x171a57,_0x133989,_0x153bbd)),_0x2f71f9[_0x3e2a58(0x12d)](...validateFlowControl(_0x15ae7e,_0x171a57,_0x153bbd)),_0x2f71f9;}function validateStagesForVersion(_0x4a29ec,_0x352100,_0x44e7b9,_0x57f34b,_0x221b88,_0x352a83,_0x6b9fcf){const _0x7bbe55=a122_0x5645;if(_0x4a29ec[_0x7bbe55(0x142)]===0x0){_0x221b88['push']({'level':_0x7bbe55(0x134),'path':_0x57f34b+_0x7bbe55(0x1a9),'code':_0x7bbe55(0x184),'message':_0x7bbe55(0x119),'location':getLocationFromPath(_0x44e7b9[_0x7bbe55(0x12c)],_0x44e7b9[_0x7bbe55(0x1b5)],[_0x7bbe55(0x1a9)])});return;}const _0x38b370=new Set();for(const _0x11a0c3 of _0x4a29ec){if(_0x11a0c3[_0x7bbe55(0x1c0)])for(const _0x7ebe1 of _0x11a0c3[_0x7bbe55(0x1c0)]){_0x7ebe1[_0x7bbe55(0x13c)]&&_0x38b370[_0x7bbe55(0x165)](_0x7ebe1['name']);}}const _0x9b7af={..._0x44e7b9,'stepNames':_0x38b370},_0x5cb89b=validateVersionStructure(_0x4a29ec,_0x9b7af);for(const _0x36d3b3 of _0x5cb89b){const _0x29d486=_0x57f34b?{..._0x36d3b3,'path':''+_0x57f34b+_0x36d3b3[_0x7bbe55(0x177)]}:_0x36d3b3;if(_0x29d486[_0x7bbe55(0x126)]==='error')_0x221b88[_0x7bbe55(0x12d)](_0x29d486);else _0x352a83[_0x7bbe55(0x12d)](_0x29d486);}for(let _0x52fa25=0x0;_0x52fa25<_0x4a29ec[_0x7bbe55(0x142)];_0x52fa25++){const _0x56583d=validateStage(_0x4a29ec[_0x52fa25],_0x52fa25,_0x4a29ec[_0x7bbe55(0x142)],_0x9b7af);for(const _0x3d90d5 of _0x56583d){const _0x59089f=_0x57f34b?{..._0x3d90d5,'path':''+_0x57f34b+_0x3d90d5['path']}:_0x3d90d5;if(_0x59089f[_0x7bbe55(0x126)]===_0x7bbe55(0x134))_0x221b88[_0x7bbe55(0x12d)](_0x59089f);else _0x352a83[_0x7bbe55(0x12d)](_0x59089f);}}if(_0x352100[_0x7bbe55(0x16d)]){const _0x249a9c=_0x6b9fcf?.[_0x7bbe55(0x18d)]?_0x7bbe55(0x16d):_0x57f34b+_0x7bbe55(0x16d),_0x3d3b19=validateCriteria(_0x352100[_0x7bbe55(0x16d)],_0x249a9c,_0x9b7af);for(const _0x5aca2c of _0x3d3b19){if(_0x5aca2c['level']==='error')_0x221b88[_0x7bbe55(0x12d)](_0x5aca2c);else _0x352a83[_0x7bbe55(0x12d)](_0x5aca2c);}}}function extractVersionIndex(_0x4718e5){const _0x4c600a=a122_0x5645,_0x38871d=_0x4718e5[_0x4c600a(0x1a2)](/^journeys\[(\d+)\]\./);return _0x38871d?_0x38871d[0x1]:undefined;}function deduplicateAcrossVersions(_0x6b6baf){const _0x572c18=a122_0x5645,_0x15ee2e=new Map();for(let _0x12bbb0=0x0;_0x12bbb0<_0x6b6baf[_0x572c18(0x142)];_0x12bbb0++){const _0x35552d=_0x6b6baf[_0x12bbb0]['code']+':'+_0x6b6baf[_0x12bbb0][_0x572c18(0x13f)],_0x28f33e=extractVersionIndex(_0x6b6baf[_0x12bbb0][_0x572c18(0x177)]),_0x29beda=_0x15ee2e[_0x572c18(0x14f)](_0x35552d);if(_0x29beda){_0x29beda[_0x572c18(0x137)]['push'](_0x12bbb0);if(_0x28f33e)_0x29beda[_0x572c18(0x15f)][_0x572c18(0x165)](_0x28f33e);}else _0x15ee2e[_0x572c18(0x183)](_0x35552d,{'indices':[_0x12bbb0],'versions':new Set(_0x28f33e?[_0x28f33e]:[])});}const _0x330ffc=new Set();for(const {indices:_0x124cd3,versions:_0x128db4}of _0x15ee2e[_0x572c18(0x146)]()){if(_0x128db4[_0x572c18(0x192)]<=0x1)continue;const _0x43b20c=_0x6b6baf[_0x124cd3[0x0]];_0x43b20c['path']=_0x43b20c[_0x572c18(0x177)][_0x572c18(0x14a)](/^journeys\[\d+\]\./,''),_0x43b20c[_0x572c18(0x13f)]=_0x43b20c[_0x572c18(0x13f)]+_0x572c18(0x1b4)+_0x128db4[_0x572c18(0x192)]+'\x20versions)';for(let _0x4bd494=0x1;_0x4bd494<_0x124cd3['length'];_0x4bd494++){_0x330ffc[_0x572c18(0x165)](_0x124cd3[_0x4bd494]);}}const _0x2692db=[..._0x330ffc][_0x572c18(0x174)]((_0x164afc,_0x4a3a89)=>_0x4a3a89-_0x164afc);for(const _0x5e17df of _0x2692db){_0x6b6baf[_0x572c18(0x118)](_0x5e17df,0x1);}}export function validateJourneyDef(_0x1fea81,_0x1e21fc={},_0x1ab4bb={}){const _0x138874=a122_0x5645;if(_0x1ab4bb[_0x138874(0x1bc)])return runJourneySemanticChecks(_0x1fea81,_0x1e21fc);const _0x1f1f3c=JourneyDefSchema[_0x138874(0x17b)](_0x1fea81);if(_0x1f1f3c[_0x138874(0x1b1)])return runJourneySemanticChecks(_0x1f1f3c[_0x138874(0x18e)],_0x1e21fc);return zodErrorsToJourneyValidationResult(_0x1f1f3c[_0x138874(0x134)],_0x1e21fc);}function zodErrorsToJourneyValidationResult(_0x91957,_0x2fd636){const _0x58e346=a122_0x5645,_0x5da144=flattenZodIssues(_0x91957['issues']),_0x2fc21f=_0x5da144[_0x58e346(0x15c)](_0x882afe=>{const _0x10f933=_0x58e346,_0x447bf8=formatZodPath(_0x882afe['path']),_0x34753d=mapJourneyZodIssueToCode(_0x882afe,_0x447bf8),_0x526e51=getLocationFromPath(_0x2fd636[_0x10f933(0x12c)],_0x2fd636[_0x10f933(0x1b5)],_0x882afe[_0x10f933(0x177)]['map'](_0x52e778=>typeof _0x52e778===_0x10f933(0x197)?String(_0x52e778):_0x52e778));return{'level':_0x10f933(0x134),'path':_0x447bf8,'code':_0x34753d,'message':_0x882afe[_0x10f933(0x13f)],..._0x526e51&&{'location':_0x526e51}};});return{'valid':![],'errors':_0x2fc21f,'warnings':[]};}function mapJourneyZodIssueToCode(_0x521baf,_0x162fa2){const _0x21bf01=a122_0x5645;if(_0x162fa2===_0x21bf01(0x13c))return _0x21bf01(0x16b);if(_0x162fa2[_0x21bf01(0x175)](_0x21bf01(0x13e))&&_0x162fa2[_0x21bf01(0x160)](_0x21bf01(0x1c0)))return'JOURNEY_SCHEMA_ERROR';if(_0x162fa2==='stages'||_0x162fa2[_0x21bf01(0x175)]('.stages'))return _0x21bf01(0x184);if(_0x162fa2===''&&_0x521baf['message']['includes'](_0x21bf01(0x131)))return _0x21bf01(0x184);if(_0x162fa2[_0x21bf01(0x160)]('activation'))return _0x21bf01(0x140);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x2b9bdb,_0x252818){const _0x5f5c24=a122_0x5645,_0x518d83=[],_0x355b3b=[];(!_0x2b9bdb[_0x5f5c24(0x13c)]||_0x2b9bdb[_0x5f5c24(0x13c)][_0x5f5c24(0x1a7)]()==='')&&_0x518d83['push']({'level':_0x5f5c24(0x134),'path':_0x5f5c24(0x13c),'code':_0x5f5c24(0x16b),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818[_0x5f5c24(0x1b5)],[_0x5f5c24(0x13c)])});const _0x2d3a91=new Set();if(_0x2b9bdb[_0x5f5c24(0x1c3)])for(const _0x1d87fe of Object['keys'](_0x2b9bdb[_0x5f5c24(0x1c3)])){_0x2d3a91['add'](_0x1d87fe);}const _0x222423=new Set();if(_0x2b9bdb[_0x5f5c24(0x186)])for(const _0x530de3 of Object[_0x5f5c24(0x155)](_0x2b9bdb[_0x5f5c24(0x186)])){_0x222423['add'](_0x530de3);}const _0x13f6bb=new Set(),_0x3cf29f={..._0x252818,'embeddedSegments':_0x2d3a91,'referencedSegments':_0x13f6bb,'activationKeys':_0x222423[_0x5f5c24(0x192)]>0x0?_0x222423:undefined};if(_0x2b9bdb['segments'])for(const [_0x1a35fe,_0x533248]of Object[_0x5f5c24(0x189)](_0x2b9bdb['segments'])){const _0x37d0e5=validateEmbeddedSegment(_0x533248,_0x5f5c24(0x162)+_0x1a35fe,_0x3cf29f);for(const _0x360875 of _0x37d0e5){if(_0x360875['level']==='error')_0x518d83[_0x5f5c24(0x12d)](_0x360875);else _0x355b3b[_0x5f5c24(0x12d)](_0x360875);}}const _0x181254=!!_0x2b9bdb['goal'],_0x29b1d6=_0x2b9bdb['journeys']?.[_0x5f5c24(0x138)](_0xfcc879=>!!_0xfcc879['goal'])??![];!_0x181254&&!_0x29b1d6&&_0x355b3b['push']({'level':_0x5f5c24(0x1b0),'path':_0x5f5c24(0x16d),'code':_0x5f5c24(0x12b),'message':_0x5f5c24(0x153),'location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818['source'],[_0x5f5c24(0x16d)])});const _0xd88f72=_0x2b9bdb[_0x5f5c24(0x19e)]??_0x2b9bdb[_0x5f5c24(0x15f)];if(_0xd88f72&&_0xd88f72['filter'](_0xafc30c=>_0xafc30c[_0x5f5c24(0x16a)]===!![])[_0x5f5c24(0x142)]>0x1){const _0x5d1b27=_0x2b9bdb[_0x5f5c24(0x19e)]?'journeys':_0x5f5c24(0x15f);_0x518d83['push']({'level':_0x5f5c24(0x134),'path':_0x5d1b27,'code':'DUPLICATE_LATEST','message':_0x5f5c24(0x18f)+(_0x5d1b27===_0x5f5c24(0x19e)?_0x5f5c24(0x1cf):_0x5f5c24(0x1bd))+_0x5f5c24(0x19b),'location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818[_0x5f5c24(0x1b5)],[_0x5d1b27])});}if(_0x2b9bdb[_0x5f5c24(0x19e)]&&_0x2b9bdb['journeys']['length']>0x0)for(let _0x19ec41=0x0;_0x19ec41<_0x2b9bdb[_0x5f5c24(0x19e)][_0x5f5c24(0x142)];_0x19ec41++){const _0x1ce568=_0x2b9bdb['journeys'][_0x19ec41];if(_0x2b9bdb[_0x5f5c24(0x19e)][_0x5f5c24(0x142)]>0x1&&_0x1ce568['state']==='launched')continue;const _0x3c06e4=_0x1ce568[_0x5f5c24(0x1a9)]||[],_0x4f4bfc='journeys['+_0x19ec41+'].',_0x549ec4=!!_0x1ce568[_0x5f5c24(0x16d)],_0x51d1d6=_0x549ec4?{..._0x2b9bdb,'goal':_0x1ce568[_0x5f5c24(0x16d)]}:_0x2b9bdb;validateStagesForVersion(_0x3c06e4,_0x51d1d6,_0x3cf29f,_0x4f4bfc,_0x518d83,_0x355b3b,{'goalIsInherited':!_0x549ec4});}else{if(_0x2b9bdb[_0x5f5c24(0x15f)]&&_0x2b9bdb[_0x5f5c24(0x15f)][_0x5f5c24(0x142)]>0x0)for(let _0x239020=0x0;_0x239020<_0x2b9bdb[_0x5f5c24(0x15f)][_0x5f5c24(0x142)];_0x239020++){const _0x4f9d5a=_0x2b9bdb[_0x5f5c24(0x15f)][_0x239020];if(_0x2b9bdb[_0x5f5c24(0x15f)][_0x5f5c24(0x142)]>0x1&&_0x4f9d5a['state']===_0x5f5c24(0x148))continue;const _0x3ceb9e=_0x4f9d5a[_0x5f5c24(0x1a9)]||[],_0xf70c44=_0x5f5c24(0x15a)+_0x239020+'].';validateStagesForVersion(_0x3ceb9e,_0x2b9bdb,_0x3cf29f,_0xf70c44,_0x518d83,_0x355b3b);}else{const _0x26c319=_0x2b9bdb[_0x5f5c24(0x1a9)]||[];validateStagesForVersion(_0x26c319,_0x2b9bdb,_0x3cf29f,'',_0x518d83,_0x355b3b);}}_0x2b9bdb['journeys']&&_0x2b9bdb[_0x5f5c24(0x19e)][_0x5f5c24(0x142)]>0x1&&(deduplicateAcrossVersions(_0x518d83),deduplicateAcrossVersions(_0x355b3b));for(const _0x4cb47c of _0x2d3a91){!_0x13f6bb[_0x5f5c24(0x1bb)](_0x4cb47c)&&!_0x4cb47c[_0x5f5c24(0x1aa)](_0x5f5c24(0x127))&&_0x355b3b['push']({'level':_0x5f5c24(0x1b0),'path':'segments.'+_0x4cb47c,'code':_0x5f5c24(0x1b3),'message':'Embedded\x20segment\x20\x27'+_0x4cb47c+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x252818[_0x5f5c24(0x12c)],_0x252818[_0x5f5c24(0x1b5)],[_0x5f5c24(0x1c3),_0x4cb47c])});}return{'valid':_0x518d83['length']===0x0,'errors':_0x518d83,'warnings':_0x355b3b};}
|
|
1
|
+
(function(_0x2b591e,_0x1b584b){const _0xab6534=a122_0x4230,_0x5113f8=_0x2b591e();while(!![]){try{const _0x3d32a4=parseInt(_0xab6534(0x21a))/0x1+parseInt(_0xab6534(0x215))/0x2+parseInt(_0xab6534(0x253))/0x3*(-parseInt(_0xab6534(0x22a))/0x4)+parseInt(_0xab6534(0x25e))/0x5*(parseInt(_0xab6534(0x250))/0x6)+parseInt(_0xab6534(0x20a))/0x7+-parseInt(_0xab6534(0x24b))/0x8+-parseInt(_0xab6534(0x21e))/0x9;if(_0x3d32a4===_0x1b584b)break;else _0x5113f8['push'](_0x5113f8['shift']());}catch(_0x262572){_0x5113f8['push'](_0x5113f8['shift']());}}}(a122_0x1e84,0xbdb1f));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x2997c0,_0x59abb9,_0x3f2752,_0x366cff,_0x5b1be8,_0x243246){const _0x14cc87=a122_0x4230;return{'level':_0x2997c0,'path':_0x59abb9,'code':_0x3f2752,'message':_0x366cff,'location':getLocationFromPath(_0x5b1be8[_0x14cc87(0x28c)],_0x5b1be8['source'],pathToArray(_0x243246??_0x59abb9))};}function validateVersionStructure(_0x18ed45,_0x453593){const _0x37f0e6=a122_0x4230,_0x577921=[];return _0x18ed45[_0x37f0e6(0x268)]>MAX_STAGES&&_0x577921[_0x37f0e6(0x201)](createIssue(_0x37f0e6(0x287),'stages',_0x37f0e6(0x29c),_0x37f0e6(0x26f)+_0x18ed45[_0x37f0e6(0x268)]+_0x37f0e6(0x257)+MAX_STAGES,_0x453593)),_0x577921;}function validateStageStructure(_0x57220a,_0x2bf7ae,_0x218137,_0x4f021a){const _0x477010=a122_0x4230,_0x2f9c37=[],_0x5d3f72=_0x477010(0x277)+_0x2bf7ae+']';_0x2bf7ae===0x0&&!_0x57220a[_0x477010(0x25b)]&&_0x2f9c37[_0x477010(0x201)](createIssue(_0x477010(0x287),_0x5d3f72+_0x477010(0x1f5),_0x477010(0x212),_0x477010(0x25f)+_0x57220a[_0x477010(0x23f)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x4f021a,_0x5d3f72));const _0x39d28e=_0x2bf7ae===_0x218137-0x1;!_0x39d28e&&!_0x57220a[_0x477010(0x265)]&&_0x2f9c37[_0x477010(0x201)](createIssue(_0x477010(0x287),_0x5d3f72+'.milestone','MISSING_MILESTONE',_0x477010(0x25f)+_0x57220a[_0x477010(0x23f)]+_0x477010(0x206),_0x4f021a,_0x5d3f72));(!_0x57220a[_0x477010(0x26d)]||_0x57220a[_0x477010(0x26d)]['length']===0x0)&&_0x2f9c37[_0x477010(0x201)](createIssue(_0x477010(0x260),_0x5d3f72+_0x477010(0x205),_0x477010(0x203),_0x477010(0x25f)+_0x57220a['name']+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x4f021a,_0x5d3f72));const _0xf3a989=_0x57220a[_0x477010(0x298)]?.['length']??0x0;if(_0xf3a989===0x0)_0x2f9c37[_0x477010(0x201)](createIssue('error',_0x5d3f72+_0x477010(0x213),'INSUFFICIENT_STEPS',_0x477010(0x25f)+_0x57220a[_0x477010(0x23f)]+_0x477010(0x20f),_0x4f021a,_0x5d3f72+_0x477010(0x213)));else{if(_0xf3a989===0x1)_0x2f9c37[_0x477010(0x201)](createIssue(_0x477010(0x260),_0x5d3f72+_0x477010(0x213),_0x477010(0x273),_0x477010(0x25f)+_0x57220a[_0x477010(0x23f)]+_0x477010(0x274),_0x4f021a,_0x5d3f72+_0x477010(0x213)));else _0xf3a989<=0x3&&_0x2f9c37[_0x477010(0x201)](createIssue(_0x477010(0x260),_0x5d3f72+_0x477010(0x213),_0x477010(0x292),_0x477010(0x25f)+_0x57220a[_0x477010(0x23f)]+_0x477010(0x20d)+_0xf3a989+_0x477010(0x1ec),_0x4f021a,_0x5d3f72+_0x477010(0x213)));}return _0x2f9c37;}function validateStep(_0x2d5efc,_0x38c09e,_0x1eca41,_0x1df56c){const _0x3bfba4=a122_0x4230,_0x3e3df7=[];if(_0x2d5efc[_0x3bfba4(0x29a)]===_0x3bfba4(0x255))return _0x2d5efc[_0x3bfba4(0x1f6)]&&_0x3e3df7[_0x3bfba4(0x201)](createIssue('error',_0x38c09e+_0x3bfba4(0x296),_0x3bfba4(0x26e),_0x3bfba4(0x27d)+_0x2d5efc[_0x3bfba4(0x23f)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x1eca41)),_0x3bfba4(0x1f7)in _0x2d5efc&&_0x2d5efc[_0x3bfba4(0x1f7)]!==undefined&&_0x3e3df7[_0x3bfba4(0x201)](createIssue(_0x3bfba4(0x287),_0x38c09e+_0x3bfba4(0x28e),_0x3bfba4(0x26e),_0x3bfba4(0x27d)+_0x2d5efc[_0x3bfba4(0x23f)]+_0x3bfba4(0x20e),_0x1eca41)),_0x3e3df7;_0x2d5efc[_0x3bfba4(0x1f6)]&&(_0x1eca41[_0x3bfba4(0x27a)]&&!_0x1eca41['stepNames']['has'](_0x2d5efc['next'])&&_0x3e3df7[_0x3bfba4(0x201)](createIssue(_0x3bfba4(0x287),_0x38c09e+_0x3bfba4(0x296),_0x3bfba4(0x1ed),_0x3bfba4(0x23a)+_0x2d5efc[_0x3bfba4(0x1f6)]+'\x27',_0x1eca41)));switch(_0x2d5efc[_0x3bfba4(0x29a)]){case _0x3bfba4(0x2a0):_0x3e3df7['push'](...validateWaitStep(_0x2d5efc,_0x38c09e,_0x1eca41,_0x1df56c));break;case _0x3bfba4(0x1ef):_0x3e3df7['push'](...validateActivationStep(_0x2d5efc,_0x38c09e,_0x1eca41));break;case _0x3bfba4(0x259):_0x3e3df7[_0x3bfba4(0x201)](...validateDecisionPointStep(_0x2d5efc,_0x38c09e,_0x1eca41,_0x1df56c));break;case _0x3bfba4(0x235):_0x3e3df7[_0x3bfba4(0x201)](...validateAbTestStep(_0x2d5efc,_0x38c09e,_0x1eca41,_0x1df56c));break;case'jump':_0x3e3df7[_0x3bfba4(0x201)](...validateJumpStep(_0x2d5efc,_0x38c09e,_0x1eca41));break;}return _0x3e3df7;}function validateWaitStep(_0x3ba38e,_0x5355c9,_0x32ebf5,_0x3ef877){const _0x365ede=a122_0x4230,_0x494c01=[];if(!_0x3ba38e['with'])return _0x494c01[_0x365ede(0x201)](createIssue(_0x365ede(0x287),_0x5355c9+_0x365ede(0x28e),_0x365ede(0x217),_0x365ede(0x1ff),_0x32ebf5,_0x5355c9)),_0x494c01;if(_0x3ba38e[_0x365ede(0x1f7)]['condition']){const _0x79d374=_0x3ba38e[_0x365ede(0x1f7)][_0x365ede(0x26a)];if(_0x79d374[_0x365ede(0x207)]){_0x32ebf5[_0x365ede(0x20c)]?.[_0x365ede(0x23d)](_0x79d374[_0x365ede(0x207)]);!_0x79d374[_0x365ede(0x207)]['startsWith'](_0x365ede(0x1f4))&&(_0x32ebf5[_0x365ede(0x239)]&&!_0x32ebf5[_0x365ede(0x239)][_0x365ede(0x1f1)](_0x79d374[_0x365ede(0x207)])&&_0x494c01[_0x365ede(0x201)](createIssue('error',_0x5355c9+_0x365ede(0x288),_0x365ede(0x245),_0x365ede(0x29e)+_0x79d374[_0x365ede(0x207)]+_0x365ede(0x1fd),_0x32ebf5)));_0x79d374[_0x365ede(0x1f6)]&&_0x32ebf5[_0x365ede(0x27a)]&&!_0x32ebf5[_0x365ede(0x27a)][_0x365ede(0x1f1)](_0x79d374[_0x365ede(0x1f6)])&&_0x494c01[_0x365ede(0x201)](createIssue(_0x365ede(0x287),_0x5355c9+_0x365ede(0x222),'INVALID_NEXT_REFERENCE',_0x365ede(0x1f0)+_0x79d374[_0x365ede(0x1f6)]+'\x27',_0x32ebf5));_0x79d374[_0x365ede(0x211)]?.['next']&&_0x32ebf5[_0x365ede(0x27a)]&&!_0x32ebf5[_0x365ede(0x27a)][_0x365ede(0x1f1)](_0x79d374[_0x365ede(0x211)][_0x365ede(0x1f6)])&&_0x494c01[_0x365ede(0x201)](createIssue(_0x365ede(0x287),_0x5355c9+'.with.condition.timeout.next',_0x365ede(0x1ed),_0x365ede(0x224)+_0x79d374[_0x365ede(0x211)][_0x365ede(0x1f6)]+'\x27',_0x32ebf5));const _0x2ac94d=_0x79d374[_0x365ede(0x1f6)]||_0x3ba38e[_0x365ede(0x1f6)],_0x54d071=_0x79d374[_0x365ede(0x211)]?.[_0x365ede(0x1f6)]||_0x3ba38e[_0x365ede(0x1f6)];if(_0x2ac94d){const _0x2d11e4=_0x3ef877[_0x365ede(0x229)](_0x2ac94d);_0x2d11e4?.[_0x365ede(0x29a)]==='merge'&&_0x494c01[_0x365ede(0x201)](createIssue('warning',_0x5355c9+_0x365ede(0x222),'BRANCH_DIRECTLY_TO_MERGE',_0x365ede(0x232)+_0x2ac94d+_0x365ede(0x214),_0x32ebf5,_0x5355c9+_0x365ede(0x251)));}if(_0x54d071){const _0x2fe3b6=_0x3ef877[_0x365ede(0x229)](_0x54d071);_0x2fe3b6?.['type']===_0x365ede(0x254)&&_0x494c01[_0x365ede(0x201)](createIssue(_0x365ede(0x260),_0x5355c9+_0x365ede(0x278),_0x365ede(0x23b),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x54d071+_0x365ede(0x214),_0x32ebf5,_0x5355c9+_0x365ede(0x228)));}}}return _0x494c01;}function validateActivationStep(_0x5e4905,_0x4d5200,_0x368402){const _0x5dfa34=a122_0x4230,_0x2894df=[];if(!_0x5e4905[_0x5dfa34(0x1f7)]?.['activation'])return _0x2894df[_0x5dfa34(0x201)](createIssue(_0x5dfa34(0x287),_0x4d5200+_0x5dfa34(0x1f3),_0x5dfa34(0x299),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x368402,_0x4d5200)),_0x2894df;const _0x450a16=_0x5e4905[_0x5dfa34(0x1f7)]['activation'];return _0x368402[_0x5dfa34(0x258)]&&!_0x450a16[_0x5dfa34(0x280)](_0x5dfa34(0x1f4))&&(!_0x368402['activationKeys'][_0x5dfa34(0x1f1)](_0x450a16)&&_0x2894df['push'](createIssue(_0x5dfa34(0x287),_0x4d5200+_0x5dfa34(0x1f3),_0x5dfa34(0x1f8),_0x5dfa34(0x240)+_0x450a16+_0x5dfa34(0x290),_0x368402))),_0x2894df;}function validateDecisionPointStep(_0x180871,_0x1d70c4,_0x3303f8,_0xbc0615){const _0x3dfcd4=a122_0x4230,_0x1eea11=[];if(!_0x180871[_0x3dfcd4(0x1f7)]?.[_0x3dfcd4(0x2a4)]||_0x180871['with'][_0x3dfcd4(0x2a4)][_0x3dfcd4(0x268)]===0x0)return _0x1eea11[_0x3dfcd4(0x201)](createIssue(_0x3dfcd4(0x287),_0x1d70c4+_0x3dfcd4(0x226),_0x3dfcd4(0x233),_0x3dfcd4(0x29d),_0x3303f8,_0x1d70c4)),_0x1eea11;for(let _0x2bd958=0x0;_0x2bd958<_0x180871[_0x3dfcd4(0x1f7)]['branches']['length'];_0x2bd958++){const _0x5888f3=_0x180871['with'][_0x3dfcd4(0x2a4)][_0x2bd958],_0x490772=_0x1d70c4+_0x3dfcd4(0x242)+_0x2bd958+']';_0x5888f3['segment']&&!_0x5888f3['excluded']&&(_0x3303f8[_0x3dfcd4(0x20c)]?.[_0x3dfcd4(0x23d)](_0x5888f3[_0x3dfcd4(0x207)]),!_0x5888f3['segment'][_0x3dfcd4(0x280)]('ref:')&&(_0x3303f8['embeddedSegments']&&!_0x3303f8['embeddedSegments'][_0x3dfcd4(0x1f1)](_0x5888f3[_0x3dfcd4(0x207)])&&_0x1eea11[_0x3dfcd4(0x201)](createIssue('error',_0x490772+_0x3dfcd4(0x237),_0x3dfcd4(0x245),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x5888f3['segment']+'\x27',_0x3303f8))));_0x5888f3['next']&&_0x3303f8[_0x3dfcd4(0x27a)]&&!_0x3303f8[_0x3dfcd4(0x27a)]['has'](_0x5888f3[_0x3dfcd4(0x1f6)])&&_0x1eea11[_0x3dfcd4(0x201)](createIssue('error',_0x490772+_0x3dfcd4(0x296),'INVALID_NEXT_REFERENCE',_0x3dfcd4(0x25c)+_0x5888f3[_0x3dfcd4(0x1f6)]+'\x27',_0x3303f8));if(_0x5888f3[_0x3dfcd4(0x1f6)]){const _0x2acbc9=_0xbc0615[_0x3dfcd4(0x229)](_0x5888f3['next']);_0x2acbc9?.[_0x3dfcd4(0x29a)]===_0x3dfcd4(0x254)&&_0x1eea11[_0x3dfcd4(0x201)](createIssue(_0x3dfcd4(0x260),_0x490772+_0x3dfcd4(0x296),_0x3dfcd4(0x23b),_0x3dfcd4(0x1fb)+_0x5888f3[_0x3dfcd4(0x23f)]+_0x3dfcd4(0x202)+_0x5888f3[_0x3dfcd4(0x1f6)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x3303f8));}}return _0x1eea11;}function validateAbTestStep(_0x1b34c1,_0x515427,_0x1c1a50,_0xd08ab8){const _0x2fceee=a122_0x4230,_0x21f318=[];if(!_0x1b34c1[_0x2fceee(0x1f7)]?.['variants']||_0x1b34c1[_0x2fceee(0x1f7)][_0x2fceee(0x22d)][_0x2fceee(0x268)]===0x0)return _0x21f318[_0x2fceee(0x201)](createIssue('error',_0x515427+_0x2fceee(0x270),_0x2fceee(0x233),_0x2fceee(0x286),_0x1c1a50,_0x515427)),_0x21f318;const _0x22de8b=_0x1b34c1['with'][_0x2fceee(0x22d)][_0x2fceee(0x27b)]((_0x5cc49d,_0x126912)=>_0x5cc49d+(_0x126912[_0x2fceee(0x2a2)]||0x0),0x0);Math[_0x2fceee(0x22e)](_0x22de8b-0x64)>0.01&&_0x21f318['push'](createIssue(_0x2fceee(0x287),_0x515427+_0x2fceee(0x270),'INVALID_AB_TEST_PERCENTAGES','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x22de8b+'%)',_0x1c1a50));for(let _0x24c783=0x0;_0x24c783<_0x1b34c1['with'][_0x2fceee(0x22d)][_0x2fceee(0x268)];_0x24c783++){const _0x2612b1=_0x1b34c1[_0x2fceee(0x1f7)][_0x2fceee(0x22d)][_0x24c783],_0x50e478=_0x515427+'.with.variants['+_0x24c783+']';_0x2612b1[_0x2fceee(0x1f6)]&&_0x1c1a50[_0x2fceee(0x27a)]&&!_0x1c1a50['stepNames'][_0x2fceee(0x1f1)](_0x2612b1[_0x2fceee(0x1f6)])&&_0x21f318[_0x2fceee(0x201)](createIssue(_0x2fceee(0x287),_0x50e478+_0x2fceee(0x296),'INVALID_NEXT_REFERENCE',_0x2fceee(0x1fa)+_0x2612b1[_0x2fceee(0x1f6)]+'\x27',_0x1c1a50));if(_0x2612b1[_0x2fceee(0x1f6)]){const _0x977870=_0xd08ab8[_0x2fceee(0x229)](_0x2612b1[_0x2fceee(0x1f6)]);_0x977870?.[_0x2fceee(0x29a)]===_0x2fceee(0x254)&&_0x21f318[_0x2fceee(0x201)](createIssue('warning',_0x50e478+_0x2fceee(0x296),_0x2fceee(0x23b),_0x2fceee(0x272)+_0x2612b1[_0x2fceee(0x23f)]+_0x2fceee(0x202)+_0x2612b1[_0x2fceee(0x1f6)]+_0x2fceee(0x218),_0x1c1a50));}}return _0x21f318;}function validateJumpStep(_0x238927,_0x48bd29,_0x595c8b){const _0x3b878f=a122_0x4230,_0x5a8bda=[];if(!_0x238927['with']?.['target'])return _0x5a8bda['push'](createIssue('error',_0x48bd29+_0x3b878f(0x243),_0x3b878f(0x1f2),_0x3b878f(0x283),_0x595c8b,_0x48bd29)),_0x5a8bda;return(!_0x238927[_0x3b878f(0x1f7)]['target'][_0x3b878f(0x221)]||!_0x238927[_0x3b878f(0x1f7)][_0x3b878f(0x219)][_0x3b878f(0x29f)])&&_0x5a8bda[_0x3b878f(0x201)](createIssue(_0x3b878f(0x287),_0x48bd29+_0x3b878f(0x243),'INVALID_JUMP_TARGET',_0x3b878f(0x28b),_0x595c8b)),_0x5a8bda;}function a122_0x1e84(){const _0x5777d8=['journeys,\x20stages,\x20or\x20versions','milestone',').\x20Use\x20a\x20merge\x20step.','set','length','segments','condition','launched','JOURNEY_SCHEMA_ERROR','exit_criteria','END_STEP_HAS_NEXT_OR_WITH','Journey\x20has\x20','.with.variants','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','A/B\x20test\x20variant\x20\x27','INSUFFICIENT_STEPS','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','map','journeys','stages[','.with.condition.timeout.next','indices','stepNames','reduce','some','End\x20step\x20\x27','trim','variant\x20\x27','startsWith','step\x20\x27','message','Jump\x20step\x20requires\x20a\x20target','timeout\x20of\x20\x27','MISSING_END_STEP','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','error','.with.condition.segment','versions','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','document','join','.with','size','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','path','FEW_STEPS','MISSING_STAGES','Merge\x20step\x20\x27','skipSchema','.next','rule','steps','MISSING_ACTIVATION_REF','type','state','TOO_MANY_STAGES','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','stage','wait','values','percentage','stages','branches','\x20steps\x20(may\x20be\x20too\x20simple)','INVALID_NEXT_REFERENCE','\x20versions)','activation','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','has','INVALID_JUMP_TARGET','.with.activation','ref:','.entry_criteria','next','with','MISSING_ACTIVATION_DEFINITION','\x27\x20(first\x20defined\x20at\x20steps[','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Decision\x20branch\x20\x27','activations','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','MISSING_GOAL','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','symbol','push','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_EXIT_CRITERIA','filter','.exit_criteria','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','segment','SINGLE_INPUT_MERGE','issues','5562907kBTZIb','CONVERGENCE_WITHOUT_MERGE','referencedSegments','\x27\x20has\x20only\x20','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','\x27\x20has\x20no\x20steps','DUPLICATE_STEP_NAME','timeout','MISSING_ENTRY_CRITERIA','.steps','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','1566792XprKfZ','.steps[','MISSING_WAIT_PARAMS','\x27\x20with\x20no\x20action\x20in\x20between','target','296652QnbMhC','latest','Journey\x20has\x20no\x20goal\x20defined','.milestone','1619631aXrFim','keys','\x27\x20of\x20\x27','journey','.with.condition.next','Journey\x20can\x20have\x20at\x20most\x20one\x20','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','every','.with.branches','.rule','.with.condition.timeout','get','4ABQjyt','code',').\x20Merge\x20is\x20unnecessary.','variants','abs','DUPLICATE_LATEST','segments.','.name','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_CONDITIONS','MISSING_NAME','ab_test','journey\x20entry','.segment','\x27\x20has\x20no\x20end\x20step','embeddedSegments','Step\x20references\x20non-existent\x20step\x20\x27','BRANCH_DIRECTLY_TO_MERGE','entries','add','version','name','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','versions[','.with.branches[','.with.target','.exit_criteria[','MISSING_SEGMENT_REFERENCE','match','includes','Embedded\x20segment\x20\x27','.type','goal','4041640gXWFiv','sort','journeys[','level','Criteria\x20references\x20undefined\x20segment\x20\x27','6711702ijOPLj','.with.condition','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','4593633NuFSdw','merge','end','data','\x20stages\x20but\x20maximum\x20is\x20','activationKeys','decision_point','\x20with\x20latest:\x20true','entry_criteria','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','5sAydkT','Stage\x20\x27','warning','splice','source','excluded_'];a122_0x1e84=function(){return _0x5777d8;};return a122_0x1e84();}function buildConvergenceMap(_0x2273a9){const _0x4c12da=a122_0x4230,_0x313fbc=new Map();function _0x3f262f(_0x75327b,_0x2f456){const _0x1b2761=a122_0x4230,_0x5712dc=_0x313fbc[_0x1b2761(0x229)](_0x75327b)||[];_0x5712dc[_0x1b2761(0x201)](_0x2f456),_0x313fbc[_0x1b2761(0x267)](_0x75327b,_0x5712dc);}for(const _0x5cabd8 of _0x2273a9){_0x5cabd8[_0x4c12da(0x1f6)]&&_0x3f262f(_0x5cabd8[_0x4c12da(0x1f6)],{'stepName':_0x5cabd8[_0x4c12da(0x23f)],'description':_0x4c12da(0x281)+_0x5cabd8['name']+'\x27'});if(_0x5cabd8['type']==='decision_point'&&_0x5cabd8[_0x4c12da(0x1f7)]?.[_0x4c12da(0x2a4)])for(const _0x538589 of _0x5cabd8[_0x4c12da(0x1f7)][_0x4c12da(0x2a4)]){_0x538589[_0x4c12da(0x1f6)]&&_0x3f262f(_0x538589[_0x4c12da(0x1f6)],{'stepName':_0x5cabd8[_0x4c12da(0x23f)],'description':'branch\x20\x27'+_0x538589[_0x4c12da(0x23f)]+_0x4c12da(0x220)+_0x5cabd8[_0x4c12da(0x23f)]+'\x27'});}if(_0x5cabd8['type']==='ab_test'&&_0x5cabd8[_0x4c12da(0x1f7)]?.['variants'])for(const _0x1a4cbc of _0x5cabd8[_0x4c12da(0x1f7)][_0x4c12da(0x22d)]){_0x1a4cbc['next']&&_0x3f262f(_0x1a4cbc[_0x4c12da(0x1f6)],{'stepName':_0x5cabd8[_0x4c12da(0x23f)],'description':_0x4c12da(0x27f)+_0x1a4cbc[_0x4c12da(0x23f)]+_0x4c12da(0x220)+_0x5cabd8[_0x4c12da(0x23f)]+'\x27'});}_0x5cabd8['type']===_0x4c12da(0x2a0)&&_0x5cabd8[_0x4c12da(0x1f7)]?.[_0x4c12da(0x26a)]&&(_0x5cabd8[_0x4c12da(0x1f7)]['condition']['next']&&_0x3f262f(_0x5cabd8[_0x4c12da(0x1f7)]['condition'][_0x4c12da(0x1f6)],{'stepName':_0x5cabd8[_0x4c12da(0x23f)],'description':'condition\x20of\x20\x27'+_0x5cabd8[_0x4c12da(0x23f)]+'\x27'}),_0x5cabd8[_0x4c12da(0x1f7)][_0x4c12da(0x26a)]['timeout']?.['next']&&_0x3f262f(_0x5cabd8[_0x4c12da(0x1f7)][_0x4c12da(0x26a)][_0x4c12da(0x211)][_0x4c12da(0x1f6)],{'stepName':_0x5cabd8['name'],'description':_0x4c12da(0x284)+_0x5cabd8[_0x4c12da(0x23f)]+'\x27'}));}return _0x313fbc;}function validateFlowControl(_0x5bbce9,_0x3f1c5d,_0x22eec9){const _0x12dc04=a122_0x4230,_0x44d827=[],_0x47df2e=_0x12dc04(0x277)+_0x3f1c5d+']',_0x2d1433=_0x5bbce9[_0x12dc04(0x298)]||[];if(_0x2d1433['length']===0x0)return _0x44d827;const _0xa19167=new Map();for(const _0x2d5b03 of _0x2d1433){_0x2d5b03[_0x12dc04(0x23f)]&&_0xa19167[_0x12dc04(0x267)](_0x2d5b03[_0x12dc04(0x23f)],_0x2d5b03);}const _0x2a4aed=buildConvergenceMap(_0x2d1433),_0x1bb67d=_0x2d1433[_0x12dc04(0x27c)](_0x2e6ac0=>_0x2e6ac0[_0x12dc04(0x29a)]===_0x12dc04(0x255));!_0x1bb67d&&_0x44d827['push'](createIssue('error',_0x47df2e+'.steps',_0x12dc04(0x285),_0x12dc04(0x25f)+_0x5bbce9[_0x12dc04(0x23f)]+_0x12dc04(0x238),_0x22eec9));for(const [_0x193f5a,_0x274457]of _0x2a4aed){const _0x2cafd3=_0xa19167[_0x12dc04(0x229)](_0x193f5a);if(!_0x2cafd3)continue;if(_0x274457[_0x12dc04(0x268)]>0x1&&_0x2cafd3[_0x12dc04(0x29a)]!==_0x12dc04(0x254)){const _0x20865d=_0x274457[_0x12dc04(0x275)](_0x587c97=>_0x587c97['description'])[_0x12dc04(0x28d)](',\x20');_0x44d827['push'](createIssue(_0x12dc04(0x287),_0x47df2e+_0x12dc04(0x213),_0x12dc04(0x20b),_0x12dc04(0x25d)+_0x193f5a+'\x27\x20(from:\x20'+_0x20865d+_0x12dc04(0x266),_0x22eec9));}_0x274457['length']===0x1&&_0x2cafd3['type']===_0x12dc04(0x254)&&_0x44d827[_0x12dc04(0x201)](createIssue(_0x12dc04(0x260),_0x47df2e+'.steps',_0x12dc04(0x208),'Merge\x20step\x20\x27'+_0x193f5a+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x274457[0x0]['description']+_0x12dc04(0x22c),_0x22eec9));}for(const _0x2a4e9e of _0x2d1433){if(_0x2a4e9e['type']===_0x12dc04(0x254)&&_0x2a4e9e[_0x12dc04(0x1f6)]){const _0x42882c=_0xa19167[_0x12dc04(0x229)](_0x2a4e9e[_0x12dc04(0x1f6)]);_0x42882c?.[_0x12dc04(0x29a)]===_0x12dc04(0x254)&&_0x44d827[_0x12dc04(0x201)](createIssue(_0x12dc04(0x287),_0x47df2e+_0x12dc04(0x213),'MERGE_TO_MERGE_CHAIN',_0x12dc04(0x294)+_0x2a4e9e['name']+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x2a4e9e[_0x12dc04(0x1f6)]+_0x12dc04(0x252),_0x22eec9));}}return _0x44d827;}function a122_0x4230(_0x5755f7,_0x358a4c){_0x5755f7=_0x5755f7-0x1ec;const _0x1e8473=a122_0x1e84();let _0x423065=_0x1e8473[_0x5755f7];return _0x423065;}function validateCriteria(_0x1558d7,_0x5902ff,_0x145c36){const _0x4d7b55=a122_0x4230,_0x31ff00=[];return _0x1558d7[_0x4d7b55(0x207)]&&(_0x145c36[_0x4d7b55(0x20c)]?.[_0x4d7b55(0x23d)](_0x1558d7[_0x4d7b55(0x207)]),!_0x1558d7[_0x4d7b55(0x207)][_0x4d7b55(0x280)](_0x4d7b55(0x1f4))&&(_0x145c36[_0x4d7b55(0x239)]&&!_0x145c36[_0x4d7b55(0x239)]['has'](_0x1558d7[_0x4d7b55(0x207)])&&_0x31ff00[_0x4d7b55(0x201)](createIssue(_0x4d7b55(0x287),_0x5902ff+'.segment',_0x4d7b55(0x245),_0x4d7b55(0x24f)+_0x1558d7[_0x4d7b55(0x207)]+'\x27',_0x145c36)))),_0x31ff00;}function validateEmbeddedSegment(_0x2a7af5,_0x5000e0,_0x3f89b1){const _0x126307=a122_0x4230,_0x47b325=[];return _0x2a7af5[_0x126307(0x297)]&&_0x47b325[_0x126307(0x201)](...validateRuleDef(_0x2a7af5[_0x126307(0x297)],_0x5000e0+_0x126307(0x227),_0x3f89b1)),_0x47b325;}function validateStage(_0x24cb8e,_0x8a0a43,_0x10837a,_0x24e6dc){const _0xb0fcb4=a122_0x4230,_0x2e2031=[],_0x2287e2=_0xb0fcb4(0x277)+_0x8a0a43+']',_0x4a6927=new Map(),_0x217506=new Map();if(_0x24cb8e['steps']){for(let _0x2a23dc=0x0;_0x2a23dc<_0x24cb8e['steps']['length'];_0x2a23dc++){const _0x2d7350=_0x24cb8e[_0xb0fcb4(0x298)][_0x2a23dc];_0x2d7350[_0xb0fcb4(0x23f)]&&_0x4a6927[_0xb0fcb4(0x267)](_0x2d7350[_0xb0fcb4(0x23f)],_0x2d7350);}for(let _0x24b47c=0x0;_0x24b47c<_0x24cb8e[_0xb0fcb4(0x298)][_0xb0fcb4(0x268)];_0x24b47c++){const _0x35a0c6=_0x24cb8e[_0xb0fcb4(0x298)][_0x24b47c],_0x40bd25=_0x2287e2+_0xb0fcb4(0x216)+_0x24b47c+']';if(_0x35a0c6['name']){if(_0x217506[_0xb0fcb4(0x1f1)](_0x35a0c6['name'])){const _0x137299=_0x217506['get'](_0x35a0c6[_0xb0fcb4(0x23f)]);_0x2e2031['push'](createIssue(_0xb0fcb4(0x287),_0x40bd25+_0xb0fcb4(0x231),_0xb0fcb4(0x210),'Duplicate\x20step\x20name\x20\x27'+_0x35a0c6[_0xb0fcb4(0x23f)]+_0xb0fcb4(0x1f9)+_0x137299+'])',_0x24e6dc));}else _0x217506[_0xb0fcb4(0x267)](_0x35a0c6[_0xb0fcb4(0x23f)],_0x24b47c);}_0x2e2031[_0xb0fcb4(0x201)](...validateStep(_0x35a0c6,_0x40bd25,_0x24e6dc,_0x4a6927));}}_0x24cb8e[_0xb0fcb4(0x25b)]&&_0x2e2031[_0xb0fcb4(0x201)](...validateCriteria(_0x24cb8e['entry_criteria'],_0x2287e2+_0xb0fcb4(0x1f5),_0x24e6dc));if(_0x24cb8e[_0xb0fcb4(0x26d)])for(let _0x1f5fca=0x0;_0x1f5fca<_0x24cb8e[_0xb0fcb4(0x26d)][_0xb0fcb4(0x268)];_0x1f5fca++){_0x2e2031['push'](...validateCriteria(_0x24cb8e[_0xb0fcb4(0x26d)][_0x1f5fca],_0x2287e2+_0xb0fcb4(0x244)+_0x1f5fca+']',_0x24e6dc));}return _0x24cb8e['milestone']&&_0x2e2031[_0xb0fcb4(0x201)](...validateCriteria(_0x24cb8e[_0xb0fcb4(0x265)],_0x2287e2+_0xb0fcb4(0x21d),_0x24e6dc)),_0x2e2031[_0xb0fcb4(0x201)](...validateStageStructure(_0x24cb8e,_0x8a0a43,_0x10837a,_0x24e6dc)),_0x2e2031[_0xb0fcb4(0x201)](...validateFlowControl(_0x24cb8e,_0x8a0a43,_0x24e6dc)),_0x2e2031;}function validateStagesForVersion(_0x1b9cb2,_0xb488c6,_0x344fe6,_0x2c03d3,_0x6f51e1,_0x18c826,_0x2f8f84){const _0x32495c=a122_0x4230;if(_0x1b9cb2['length']===0x0){_0x6f51e1[_0x32495c(0x201)]({'level':_0x32495c(0x287),'path':_0x2c03d3+'stages','code':_0x32495c(0x293),'message':_0x32495c(0x271),'location':getLocationFromPath(_0x344fe6['document'],_0x344fe6['source'],[_0x32495c(0x2a3)])});return;}const _0x38c010=new Set();for(const _0x5cfe7c of _0x1b9cb2){if(_0x5cfe7c[_0x32495c(0x298)])for(const _0x42d39b of _0x5cfe7c[_0x32495c(0x298)]){_0x42d39b[_0x32495c(0x23f)]&&_0x38c010['add'](_0x42d39b[_0x32495c(0x23f)]);}}const _0x179d37={..._0x344fe6,'stepNames':_0x38c010},_0xea482a=validateVersionStructure(_0x1b9cb2,_0x179d37);for(const _0x156a54 of _0xea482a){const _0x35ec4d=_0x2c03d3?{..._0x156a54,'path':''+_0x2c03d3+_0x156a54[_0x32495c(0x291)]}:_0x156a54;if(_0x35ec4d['level']===_0x32495c(0x287))_0x6f51e1[_0x32495c(0x201)](_0x35ec4d);else _0x18c826[_0x32495c(0x201)](_0x35ec4d);}for(let _0x19cf04=0x0;_0x19cf04<_0x1b9cb2[_0x32495c(0x268)];_0x19cf04++){const _0x4e2810=validateStage(_0x1b9cb2[_0x19cf04],_0x19cf04,_0x1b9cb2[_0x32495c(0x268)],_0x179d37);for(const _0x5c2d3b of _0x4e2810){const _0x338dec=_0x2c03d3?{..._0x5c2d3b,'path':''+_0x2c03d3+_0x5c2d3b[_0x32495c(0x291)]}:_0x5c2d3b;if(_0x338dec[_0x32495c(0x24e)]===_0x32495c(0x287))_0x6f51e1[_0x32495c(0x201)](_0x338dec);else _0x18c826['push'](_0x338dec);}}if(_0xb488c6[_0x32495c(0x24a)]){const _0x161d28=_0x2f8f84?.['goalIsInherited']?_0x32495c(0x24a):_0x2c03d3+'goal',_0x20db45=validateCriteria(_0xb488c6[_0x32495c(0x24a)],_0x161d28,_0x179d37);for(const _0x3de1a0 of _0x20db45){if(_0x3de1a0[_0x32495c(0x24e)]===_0x32495c(0x287))_0x6f51e1[_0x32495c(0x201)](_0x3de1a0);else _0x18c826[_0x32495c(0x201)](_0x3de1a0);}}}function extractVersionIndex(_0x1dee98){const _0x3be4c6=a122_0x4230,_0x1847b2=_0x1dee98[_0x3be4c6(0x246)](/^journeys\[(\d+)\]\./);return _0x1847b2?_0x1847b2[0x1]:undefined;}function deduplicateAcrossVersions(_0xb86237){const _0x243c68=a122_0x4230,_0x298c5c=new Map();for(let _0x242f19=0x0;_0x242f19<_0xb86237[_0x243c68(0x268)];_0x242f19++){const _0x304cc2=_0xb86237[_0x242f19][_0x243c68(0x22b)]+':'+_0xb86237[_0x242f19]['message'],_0x3c0dae=extractVersionIndex(_0xb86237[_0x242f19]['path']),_0x18284d=_0x298c5c[_0x243c68(0x229)](_0x304cc2);if(_0x18284d){_0x18284d[_0x243c68(0x279)]['push'](_0x242f19);if(_0x3c0dae)_0x18284d[_0x243c68(0x289)]['add'](_0x3c0dae);}else _0x298c5c[_0x243c68(0x267)](_0x304cc2,{'indices':[_0x242f19],'versions':new Set(_0x3c0dae?[_0x3c0dae]:[])});}const _0x4a3e95=new Set();for(const {indices:_0x510fd4,versions:_0x1fe204}of _0x298c5c[_0x243c68(0x2a1)]()){if(_0x1fe204['size']<=0x1)continue;const _0x37476b=_0xb86237[_0x510fd4[0x0]];_0x37476b[_0x243c68(0x291)]=_0x37476b[_0x243c68(0x291)]['replace'](/^journeys\[\d+\]\./,''),_0x37476b['message']=_0x37476b[_0x243c68(0x282)]+'\x20(across\x20'+_0x1fe204[_0x243c68(0x28f)]+_0x243c68(0x1ee);for(let _0x50e282=0x1;_0x50e282<_0x510fd4[_0x243c68(0x268)];_0x50e282++){_0x4a3e95['add'](_0x510fd4[_0x50e282]);}}const _0x46712e=[..._0x4a3e95][_0x243c68(0x24c)]((_0x6b19c2,_0xe23558)=>_0xe23558-_0x6b19c2);for(const _0x1b4d53 of _0x46712e){_0xb86237[_0x243c68(0x261)](_0x1b4d53,0x1);}}export function validateJourneyDef(_0x3a8d9c,_0xab7c41={},_0x180648={}){const _0x19e03d=a122_0x4230;if(_0x180648[_0x19e03d(0x295)])return runJourneySemanticChecks(_0x3a8d9c,_0xab7c41);const _0xa62c86=JourneyDefSchema['safeParse'](_0x3a8d9c);if(_0xa62c86['success'])return runJourneySemanticChecks(_0xa62c86[_0x19e03d(0x256)],_0xab7c41);return zodErrorsToJourneyValidationResult(_0xa62c86[_0x19e03d(0x287)],_0xab7c41);}function zodErrorsToJourneyValidationResult(_0x110734,_0x13e730){const _0x2316bd=a122_0x4230,_0x4aba32=flattenZodIssues(_0x110734[_0x2316bd(0x209)]),_0x2fb776=_0x4aba32[_0x2316bd(0x275)](_0x425178=>{const _0xf375f4=_0x2316bd,_0x10ef86=formatZodPath(_0x425178[_0xf375f4(0x291)]),_0x79612=mapJourneyZodIssueToCode(_0x425178,_0x10ef86),_0x3e1dc0=getLocationFromPath(_0x13e730[_0xf375f4(0x28c)],_0x13e730[_0xf375f4(0x262)],_0x425178[_0xf375f4(0x291)][_0xf375f4(0x275)](_0x999e85=>typeof _0x999e85===_0xf375f4(0x200)?String(_0x999e85):_0x999e85));return{'level':_0xf375f4(0x287),'path':_0x10ef86,'code':_0x79612,'message':_0x425178['message'],..._0x3e1dc0&&{'location':_0x3e1dc0}};});return{'valid':![],'errors':_0x2fb776,'warnings':[]};}function mapJourneyZodIssueToCode(_0x18f012,_0x464922){const _0x2704af=a122_0x4230;if(_0x464922==='name')return _0x2704af(0x234);if(_0x464922['endsWith'](_0x2704af(0x249))&&_0x464922['includes'](_0x2704af(0x298)))return _0x2704af(0x26c);if(_0x464922===_0x2704af(0x2a3)||_0x464922['endsWith']('.stages'))return _0x2704af(0x293);if(_0x464922===''&&_0x18f012['message'][_0x2704af(0x247)](_0x2704af(0x264)))return'MISSING_STAGES';if(_0x464922[_0x2704af(0x247)](_0x2704af(0x1ef)))return'ACTIVATION_SCHEMA_ERROR';return _0x2704af(0x26c);}function runJourneySemanticChecks(_0x3d0f42,_0x4b5613){const _0x226b98=a122_0x4230,_0x2d9b7f=[],_0x28699d=[];(!_0x3d0f42[_0x226b98(0x23f)]||_0x3d0f42[_0x226b98(0x23f)][_0x226b98(0x27e)]()==='')&&_0x2d9b7f[_0x226b98(0x201)]({'level':'error','path':'name','code':_0x226b98(0x234),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x4b5613[_0x226b98(0x28c)],_0x4b5613[_0x226b98(0x262)],['name'])});const _0x3cdf87=new Set();if(_0x3d0f42[_0x226b98(0x269)])for(const _0x12115d of Object[_0x226b98(0x21f)](_0x3d0f42[_0x226b98(0x269)])){_0x3cdf87['add'](_0x12115d);}const _0x164967=new Set();if(_0x3d0f42[_0x226b98(0x1fc)])for(const _0x39c9e3 of Object['keys'](_0x3d0f42[_0x226b98(0x1fc)])){_0x164967[_0x226b98(0x23d)](_0x39c9e3);}const _0x46a31b=new Set(),_0x5d54fa={..._0x4b5613,'embeddedSegments':_0x3cdf87,'referencedSegments':_0x46a31b,'activationKeys':_0x164967[_0x226b98(0x28f)]>0x0?_0x164967:undefined};if(_0x3d0f42[_0x226b98(0x269)])for(const [_0x439278,_0x111462]of Object[_0x226b98(0x23c)](_0x3d0f42[_0x226b98(0x269)])){const _0x2f5215=validateEmbeddedSegment(_0x111462,_0x226b98(0x230)+_0x439278,_0x5d54fa);for(const _0x1b3721 of _0x2f5215){if(_0x1b3721[_0x226b98(0x24e)]===_0x226b98(0x287))_0x2d9b7f[_0x226b98(0x201)](_0x1b3721);else _0x28699d[_0x226b98(0x201)](_0x1b3721);}}const _0x4a4f8a=!!_0x3d0f42[_0x226b98(0x24a)],_0x26ce63=_0x3d0f42[_0x226b98(0x276)]?.[_0x226b98(0x225)](_0x3659c2=>!!_0x3659c2[_0x226b98(0x24a)])??![];!_0x4a4f8a&&!_0x26ce63&&_0x28699d[_0x226b98(0x201)]({'level':_0x226b98(0x260),'path':_0x226b98(0x24a),'code':_0x226b98(0x1fe),'message':_0x226b98(0x21c),'location':getLocationFromPath(_0x4b5613['document'],_0x4b5613[_0x226b98(0x262)],[_0x226b98(0x24a)])});const _0x17c04a=_0x3d0f42[_0x226b98(0x276)]??_0x3d0f42[_0x226b98(0x289)];if(_0x17c04a&&_0x17c04a[_0x226b98(0x204)](_0x1639b3=>_0x1639b3[_0x226b98(0x21b)]===!![])[_0x226b98(0x268)]>0x1){const _0x40f967=_0x3d0f42[_0x226b98(0x276)]?_0x226b98(0x276):_0x226b98(0x289);_0x2d9b7f['push']({'level':_0x226b98(0x287),'path':_0x40f967,'code':_0x226b98(0x22f),'message':_0x226b98(0x223)+(_0x40f967===_0x226b98(0x276)?_0x226b98(0x236):_0x226b98(0x23e))+_0x226b98(0x25a),'location':getLocationFromPath(_0x4b5613[_0x226b98(0x28c)],_0x4b5613['source'],[_0x40f967])});}if(_0x3d0f42['journeys']&&_0x3d0f42[_0x226b98(0x276)][_0x226b98(0x268)]>0x0)for(let _0x3c8991=0x0;_0x3c8991<_0x3d0f42[_0x226b98(0x276)][_0x226b98(0x268)];_0x3c8991++){const _0x4c698f=_0x3d0f42['journeys'][_0x3c8991];if(_0x3d0f42[_0x226b98(0x276)]['length']>0x1&&_0x4c698f[_0x226b98(0x29b)]==='launched')continue;const _0x526b0d=_0x4c698f[_0x226b98(0x2a3)]||[],_0x457d65=_0x226b98(0x24d)+_0x3c8991+'].',_0x5452ef=!!_0x4c698f['goal'],_0x265011=_0x5452ef?{..._0x3d0f42,'goal':_0x4c698f[_0x226b98(0x24a)]}:_0x3d0f42;validateStagesForVersion(_0x526b0d,_0x265011,_0x5d54fa,_0x457d65,_0x2d9b7f,_0x28699d,{'goalIsInherited':!_0x5452ef});}else{if(_0x3d0f42['versions']&&_0x3d0f42[_0x226b98(0x289)][_0x226b98(0x268)]>0x0)for(let _0x258d9c=0x0;_0x258d9c<_0x3d0f42['versions'][_0x226b98(0x268)];_0x258d9c++){const _0x29e775=_0x3d0f42[_0x226b98(0x289)][_0x258d9c];if(_0x3d0f42[_0x226b98(0x289)][_0x226b98(0x268)]>0x1&&_0x29e775[_0x226b98(0x29b)]===_0x226b98(0x26b))continue;const _0xe68f0d=_0x29e775[_0x226b98(0x2a3)]||[],_0x1b2caf=_0x226b98(0x241)+_0x258d9c+'].';validateStagesForVersion(_0xe68f0d,_0x3d0f42,_0x5d54fa,_0x1b2caf,_0x2d9b7f,_0x28699d);}else{const _0x54c0cc=_0x3d0f42[_0x226b98(0x2a3)]||[];validateStagesForVersion(_0x54c0cc,_0x3d0f42,_0x5d54fa,'',_0x2d9b7f,_0x28699d);}}_0x3d0f42[_0x226b98(0x276)]&&_0x3d0f42[_0x226b98(0x276)][_0x226b98(0x268)]>0x1&&(deduplicateAcrossVersions(_0x2d9b7f),deduplicateAcrossVersions(_0x28699d));for(const _0x2da7b9 of _0x3cdf87){!_0x46a31b[_0x226b98(0x1f1)](_0x2da7b9)&&!_0x2da7b9[_0x226b98(0x280)](_0x226b98(0x263))&&_0x28699d['push']({'level':'warning','path':_0x226b98(0x230)+_0x2da7b9,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x226b98(0x248)+_0x2da7b9+_0x226b98(0x28a),'location':getLocationFromPath(_0x4b5613[_0x226b98(0x28c)],_0x4b5613[_0x226b98(0x262)],[_0x226b98(0x269),_0x2da7b9])});}return{'valid':_0x2d9b7f[_0x226b98(0x268)]===0x0,'errors':_0x2d9b7f,'warnings':_0x28699d};}
|