@treasuredata/tdx 2026.3.3 → 2026.3.5
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/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.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/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/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/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x292b30,_0x2dc154){const _0x37ea78=a127_0x2ef7,_0x1fb9a3=_0x292b30();while(!![]){try{const _0x2b566e=parseInt(_0x37ea78(0x1e9))/0x1*(-parseInt(_0x37ea78(0x208))/0x2)+-parseInt(_0x37ea78(0x1d3))/0x3*(parseInt(_0x37ea78(0x1fa))/0x4)+-parseInt(_0x37ea78(0x1f3))/0x5*(-parseInt(_0x37ea78(0x1ec))/0x6)+parseInt(_0x37ea78(0x1df))/0x7*(-parseInt(_0x37ea78(0x1d4))/0x8)+parseInt(_0x37ea78(0x1d7))/0x9+parseInt(_0x37ea78(0x1d2))/0xa*(parseInt(_0x37ea78(0x1db))/0xb)+parseInt(_0x37ea78(0x20a))/0xc;if(_0x2b566e===_0x2dc154)break;else _0x1fb9a3['push'](_0x1fb9a3['shift']());}catch(_0x4c40e9){_0x1fb9a3['push'](_0x1fb9a3['shift']());}}}(a127_0x3db3,0x68fb0));import a127_0x457008 from'chalk';function a127_0x2ef7(_0x35583a,_0x15dccf){_0x35583a=_0x35583a-0x1d2;const _0x3db335=a127_0x3db3();let _0x2ef730=_0x3db335[_0x35583a];return _0x2ef730;}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x3c9648){const _0x421df4=a127_0x2ef7,_0x24c73a=_0x3c9648[_0x421df4(0x1fc)][_0x421df4(0x204)](_0x526328=>({'column_name':_0x526328[_0x421df4(0x20b)],'column_type':_0x526328['type'],'null':_0x421df4(0x1f4),'key':null,'default':null,'extra':null}));return{..._0x3c9648,'columns':[{'name':_0x421df4(0x1ee),'type':_0x421df4(0x1e8)},{'name':_0x421df4(0x210),'type':'varchar'},{'name':'null','type':_0x421df4(0x1e8)},{'name':_0x421df4(0x1dc),'type':'varchar'},{'name':'default','type':_0x421df4(0x1e8)},{'name':_0x421df4(0x1fe),'type':'varchar'}],'data':_0x24c73a};}export async function executeSchemaQuery(_0x2dd6c6,_0x43afc0,_0x5251e3){const _0x694ee9=a127_0x2ef7,_0x1a0239=_0x2dd6c6[_0x694ee9(0x1e4)]()['replace'](/;+$/,''),_0x78d577=_0x694ee9(0x1e6)+_0x1a0239+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x5251e3[_0x694ee9(0x209)]&&console['error']('Schema\x20query:\x0a'+_0x78d577);const _0x5c1b00=await withProgressSpinner(_0x694ee9(0x1f8),async _0x2d9cbc=>{const _0x5113c9=_0x694ee9,_0x531b91=await _0x43afc0['query'][_0x5113c9(0x1f9)](_0x78d577,{'catalog':'td','schema':_0x5113c9(0x1e5),'onJobId':_0x36a06b=>{const _0x72dbd8=_0x5113c9;_0x2d9cbc[_0x72dbd8(0x20d)](_0x36a06b);}});return _0x531b91;},{'verbose':_0x5251e3[_0x694ee9(0x209)]});return buildSchemaResult(_0x5c1b00[_0x694ee9(0x203)]);}function columnName(_0x47060e){const _0x1b8de8=a127_0x2ef7;return _0x47060e[_0x1b8de8(0x1eb)]||_0x47060e[_0x1b8de8(0x1e2)]||_0x47060e[_0x1b8de8(0x20b)];}function a127_0x3db3(){const _0x48c144=['column_type','2230uYgNcZ','6dFzwBu','28104lRkRBj','cyan','dim','1143702uXReqP','displayName','localeCompare','some','21725yxPalU','key','Unknown','behavior','1141TijQak','get','entries','parentColumn','error','trim','information_schema','SELECT\x20*\x20FROM\x20(\x0a','source','varchar','2825ibvpgL','size','matrixColumnName','94338VajZxm','set','column_name','bold','attribute','Behaviors','sort','5ZuFISP','YES','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','push','\x20\x20\x20\x20','Fetching\x20schema...','execute','99340EsthJu','fields','columns','Attributes','extra','slice','filter','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','matrixTableName','data','map','length','parentTableName','startsWith','528GCdHIH','verbose','14578356AJTZPP','name','type','setJobId','groupingName','tableName'];a127_0x3db3=function(){return _0x48c144;};return a127_0x3db3();}function formatFieldLine(_0x17e7dc,_0x3adceb,_0x3c3a3e){const _0x2356df=a127_0x2ef7,_0x245546=_0x17e7dc!==_0x3adceb?'\x20'+a127_0x457008[_0x2356df(0x1d6)]('('+_0x3adceb+')'):'';return _0x2356df(0x1f7)+_0x17e7dc+_0x245546+':\x20'+a127_0x457008[_0x2356df(0x1d5)](_0x3c3a3e);}function sortByColumnName(_0x3c29ae){const _0x13b672=a127_0x2ef7;return[..._0x3c29ae][_0x13b672(0x1f2)]((_0x8a4052,_0x5ca8fa)=>columnName(_0x8a4052)[_0x13b672(0x1d9)](columnName(_0x5ca8fa)));}export function displayFieldsHumanReadable(_0x406fe6,_0x5d7b34){const _0x5376b2=a127_0x2ef7,_0x4537cd=_0x406fe6[_0x5376b2(0x200)](_0x3b5245=>_0x3b5245['source']===_0x5376b2(0x1f0)),_0x4546f4=_0x406fe6[_0x5376b2(0x200)](_0x3a37fb=>_0x3a37fb[_0x5376b2(0x1e7)]===_0x5376b2(0x1de)),_0x29600a=new Map();for(const _0x15428d of _0x4537cd){const _0x304ddf=_0x15428d[_0x5376b2(0x20e)]||_0x15428d[_0x5376b2(0x206)]||_0x5376b2(0x1dd),_0x4c6f29=_0x29600a[_0x5376b2(0x1e0)](_0x304ddf);_0x4c6f29?_0x4c6f29['fields'][_0x5376b2(0x1f6)](_0x15428d):_0x29600a[_0x5376b2(0x1ed)](_0x304ddf,{'displayName':_0x304ddf,'tableName':_0x15428d[_0x5376b2(0x206)],'fields':[_0x15428d]});}const _0x1a5456=new Map();for(const _0x49d199 of _0x4546f4){const _0x2f8ebc=_0x49d199['behaviorName']||_0x5376b2(0x1dd),_0x2f1d6c=_0x1a5456[_0x5376b2(0x1e0)](_0x2f8ebc)||[];_0x2f1d6c[_0x5376b2(0x1f6)](_0x49d199),_0x1a5456[_0x5376b2(0x1ed)](_0x2f8ebc,_0x2f1d6c);}console[_0x5376b2(0x1e3)]('\x0a'+a127_0x457008[_0x5376b2(0x1ef)](_0x5d7b34));if(_0x29600a[_0x5376b2(0x1ea)]>0x0){console[_0x5376b2(0x1e3)]('\x0a'+a127_0x457008[_0x5376b2(0x1d6)](_0x5376b2(0x1fd)));const _0x48e70a=[..._0x29600a[_0x5376b2(0x1e1)]()][_0x5376b2(0x1f2)]((_0x3dbb80,_0x563fc7)=>_0x3dbb80[0x0][_0x5376b2(0x1d9)](_0x563fc7[0x0]));for(const [,_0x1e825f]of _0x48e70a){const _0x34d8e5=_0x1e825f[_0x5376b2(0x20f)]&&_0x1e825f['tableName']!==_0x1e825f[_0x5376b2(0x1d8)]?'\x20'+a127_0x457008[_0x5376b2(0x1d6)]('('+_0x1e825f[_0x5376b2(0x20f)]+')'):'';console['error']('\x20\x20'+a127_0x457008[_0x5376b2(0x1ef)](_0x1e825f[_0x5376b2(0x1d8)])+_0x34d8e5);for(const _0x3973ec of sortByColumnName(_0x1e825f[_0x5376b2(0x1fb)])){console[_0x5376b2(0x1e3)](formatFieldLine(columnName(_0x3973ec),_0x3973ec['name'],_0x3973ec[_0x5376b2(0x20c)]));}}}if(_0x1a5456[_0x5376b2(0x1ea)]>0x0){console['error']('\x0a'+a127_0x457008[_0x5376b2(0x1d6)](_0x5376b2(0x1f1)));const _0x507851=[..._0x1a5456[_0x5376b2(0x1e1)]()][_0x5376b2(0x1f2)]((_0x134d83,_0x28a558)=>_0x134d83[0x0][_0x5376b2(0x1d9)](_0x28a558[0x0]));for(const [_0x38c448,_0x8b0ae0]of _0x507851){const _0x51f946=_0x8b0ae0[0x0],_0x5abb74=_0x51f946?.[_0x5376b2(0x202)];if(_0x5abb74){const _0x49c6f6=_0x5abb74!==_0x38c448?'\x20'+a127_0x457008[_0x5376b2(0x1d6)]('('+_0x38c448+')'):'';console[_0x5376b2(0x1e3)]('\x20\x20'+a127_0x457008[_0x5376b2(0x1ef)](_0x5abb74)+_0x49c6f6);}else{const _0x1d1079=_0x51f946?.[_0x5376b2(0x206)]||'';console[_0x5376b2(0x1e3)]('\x20\x20'+a127_0x457008[_0x5376b2(0x1ef)](_0x38c448)+(_0x1d1079?'\x20'+a127_0x457008[_0x5376b2(0x1d6)]('('+_0x1d1079+')'):''));}for(const _0x135e7a of sortByColumnName(_0x8b0ae0)){const _0x2c2e79=_0x135e7a[_0x5376b2(0x20b)][_0x5376b2(0x207)](_0x38c448+'.')?_0x135e7a[_0x5376b2(0x20b)][_0x5376b2(0x1ff)](_0x38c448[_0x5376b2(0x205)]+0x1):_0x135e7a['name'];console['error'](formatFieldLine(columnName(_0x135e7a),_0x2c2e79,_0x135e7a['type']));}}}const _0x97f4b3=_0x406fe6[_0x5376b2(0x1da)](_0x177401=>_0x177401[_0x5376b2(0x1eb)]||_0x177401[_0x5376b2(0x202)]);_0x97f4b3&&(console[_0x5376b2(0x1e3)]('\x0a'+a127_0x457008['dim'](_0x5376b2(0x1f5))),console[_0x5376b2(0x1e3)](a127_0x457008['dim'](_0x5376b2(0x201)))),console[_0x5376b2(0x1e3)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24ce4c,_0x2584d6){const _0x54ebeb=a128_0x2a0b,_0x38d671=_0x24ce4c();while(!![]){try{const _0xf3ca8d=-parseInt(_0x54ebeb(0x203))/0x1*(parseInt(_0x54ebeb(0x1f1))/0x2)+-parseInt(_0x54ebeb(0x204))/0x3*(parseInt(_0x54ebeb(0x1f9))/0x4)+-parseInt(_0x54ebeb(0x202))/0x5+-parseInt(_0x54ebeb(0x1f2))/0x6+parseInt(_0x54ebeb(0x1f8))/0x7+-parseInt(_0x54ebeb(0x1fc))/0x8*(parseInt(_0x54ebeb(0x205))/0x9)+parseInt(_0x54ebeb(0x1f5))/0xa*(parseInt(_0x54ebeb(0x1fd))/0xb);if(_0xf3ca8d===_0x2584d6)break;else _0x38d671['push'](_0x38d671['shift']());}catch(_0xa0714c){_0x38d671['push'](_0x38d671['shift']());}}}(a128_0x41f7,0xb15d2));import{readdirSync,statSync}from'fs';function a128_0x2a0b(_0xccf153,_0x333ac4){_0xccf153=_0xccf153-0x1f1;const _0x41f727=a128_0x41f7();let _0x2a0bee=_0x41f727[_0xccf153];return _0x2a0bee;}import a128_0x252aaa from'path';export function findYamlFiles(_0x246731){const _0x49f030=[];function _0x15296b(_0x5f0e){const _0x50e0bd=a128_0x2a0b,_0x2a71dd=readdirSync(_0x5f0e,{'withFileTypes':!![]});for(const _0xd72dcd of _0x2a71dd){const _0x3f3678=a128_0x252aaa[_0x50e0bd(0x200)](_0x5f0e,_0xd72dcd[_0x50e0bd(0x206)]);if(_0xd72dcd['isDirectory']())_0x15296b(_0x3f3678);else(_0xd72dcd[_0x50e0bd(0x206)][_0x50e0bd(0x1f4)](_0x50e0bd(0x1f7))||_0xd72dcd[_0x50e0bd(0x206)][_0x50e0bd(0x1f4)](_0x50e0bd(0x1fe)))&&_0x49f030['push'](_0x3f3678);}}return _0x15296b(_0x246731),_0x49f030;}function a128_0x41f7(){const _0x103232=['name','4534vQKgNa','3973806iQInhp','dirname','endsWith','530xsmHCN','toLowerCase','.yml','4813018ceKfgq','360gwVDXV','map','isFile','1082696EMfRbi','866162vGRfxy','.yaml','extname','join','relative','5923790RSwJvp','305TtJmfk','44175iQiLBf','18nmnrmQ'];a128_0x41f7=function(){return _0x103232;};return a128_0x41f7();}export function discoverYamlFiles(_0x1d726c){const _0x2cd67e=a128_0x2a0b,_0x902167=findYamlFiles(_0x1d726c);return _0x902167[_0x2cd67e(0x1fa)](_0x3443f9=>{const _0x3c3806=_0x2cd67e,_0x465e05=a128_0x252aaa[_0x3c3806(0x201)](_0x1d726c,_0x3443f9),_0x349240=a128_0x252aaa[_0x3c3806(0x1f3)](_0x465e05);return{'absolutePath':_0x3443f9,'relativePath':_0x465e05,'folderPath':_0x349240==='.'?'':_0x349240};});}export function isYamlFile(_0x367e82){const _0x3075b2=a128_0x2a0b;try{const _0x3725db=statSync(_0x367e82);if(!_0x3725db[_0x3075b2(0x1fb)]())return![];const _0x5bb49a=a128_0x252aaa[_0x3075b2(0x1ff)](_0x367e82)[_0x3075b2(0x1f6)]();return _0x5bb49a===_0x3075b2(0x1f7)||_0x5bb49a===_0x3075b2(0x1fe);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5041ed,_0x4e87a0){const _0x288e69=a129_0x1da9,_0x3dfd82=_0x5041ed();while(!![]){try{const _0x3baec2=parseInt(_0x288e69(0x10b))/0x1+-parseInt(_0x288e69(0xe6))/0x2+parseInt(_0x288e69(0xfa))/0x3*(-parseInt(_0x288e69(0xe4))/0x4)+parseInt(_0x288e69(0x103))/0x5+-parseInt(_0x288e69(0xd4))/0x6*(parseInt(_0x288e69(0x10a))/0x7)+parseInt(_0x288e69(0xdc))/0x8+-parseInt(_0x288e69(0x105))/0x9;if(_0x3baec2===_0x4e87a0)break;else _0x3dfd82['push'](_0x3dfd82['shift']());}catch(_0x2e547b){_0x3dfd82['push'](_0x3dfd82['shift']());}}}(a129_0x8272,0x9db7c));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0xd3b3c){const _0x11a94d=a129_0x1da9;return _0xd3b3c['toLowerCase']()[_0x11a94d(0x113)](/\s+/g,'_')[_0x11a94d(0x113)](/[^a-z0-9_]/g,'')[_0x11a94d(0x113)](/_+/g,'_')[_0x11a94d(0x113)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x8fc808){const _0x2f2686=a129_0x1da9,_0x80ba21=_0x8fc808[_0x2f2686(0xf8)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x80ba21){const _0x4c2a83=_0x80ba21[0x1][_0x2f2686(0xeb)](),_0x28da4a=_0x80ba21[0x2],_0x785316=_0x28da4a[_0x2f2686(0x113)](/-/g,'')[_0x2f2686(0xd7)](0x0,0x4)[_0x2f2686(0xeb)]();return _0x4c2a83+'_'+_0x785316;}const _0x3c9dba=_0x8fc808[_0x2f2686(0xf8)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x3c9dba){const _0x2d9a4b=_0x3c9dba[0x1],_0x657a68=_0x3c9dba[0x2][_0x2f2686(0xeb)](),_0xc48857=_0x2d9a4b[_0x2f2686(0x113)](/-/g,'')[_0x2f2686(0xd7)](0x0,0x4)[_0x2f2686(0xeb)]();return _0x657a68+'_'+_0xc48857;}return undefined;}function stableStringify(_0x316c42){const _0x11fb5b=a129_0x1da9;if(Array[_0x11fb5b(0xff)](_0x316c42))return'['+_0x316c42[_0x11fb5b(0x104)](_0x55e10c=>stableStringify(_0x55e10c))[_0x11fb5b(0xd6)](',')+']';if(_0x316c42&&typeof _0x316c42===_0x11fb5b(0xea)){const _0x4effbd=_0x316c42,_0x379609=Object[_0x11fb5b(0xed)](_0x4effbd)['sort'](),_0x1668c1=_0x379609['map'](_0x47e987=>'\x22'+_0x47e987+'\x22:'+stableStringify(_0x4effbd[_0x47e987]));return'{'+_0x1668c1['join'](',')+'}';}const _0x314ac0=JSON[_0x11fb5b(0xde)](_0x316c42);return _0x314ac0===undefined?'null':_0x314ac0;}function a129_0x1da9(_0xe76fba,_0x48490a){_0xe76fba=_0xe76fba-0xc8;const _0x827250=a129_0x8272();let _0x1da906=_0x827250[_0xe76fba];return _0x1da906;}export function consolidateActivationsByContent(_0x310aa3){const _0x576f16=a129_0x1da9,_0x4abfd6={},_0x5aab6f=new Map(),_0x9070b4=new Map();for(const _0x637278 of _0x310aa3){if(!_0x637278)continue;for(const [_0x2a9278,_0x568967]of Object[_0x576f16(0xf7)](_0x637278)){const _0xb39c98={'connection':_0x568967[_0x576f16(0xef)],..._0x568967[_0x576f16(0xdd)]!==undefined&&{'all_columns':_0x568967[_0x576f16(0xdd)]},..._0x568967[_0x576f16(0x102)]!==undefined&&{'columns':_0x568967[_0x576f16(0x102)]},..._0x568967[_0x576f16(0xf2)]!==undefined&&{'behavior':_0x568967['behavior']},..._0x568967[_0x576f16(0xf3)]!==undefined&&{'schedule':_0x568967[_0x576f16(0xf3)]},..._0x568967[_0x576f16(0xd0)]!==undefined&&{'notification':_0x568967[_0x576f16(0xd0)]},..._0x568967[_0x576f16(0xec)]!==undefined&&{'connector_config':_0x568967[_0x576f16(0xec)]},..._0x568967['activation_template_id']!==undefined&&{'activation_template_id':_0x568967['activation_template_id']}},_0x2fa0eb=stableStringify(_0xb39c98),_0x233c3b=_0x9070b4[_0x576f16(0xf6)](_0x2fa0eb);_0x233c3b?_0x5aab6f[_0x576f16(0x100)](_0x2a9278,_0x233c3b):(_0x4abfd6[_0x2a9278]=_0x568967,_0x5aab6f[_0x576f16(0x100)](_0x2a9278,_0x2a9278),_0x9070b4['set'](_0x2fa0eb,_0x2a9278));}}return{'merged':_0x4abfd6,'nameMapping':_0x5aab6f};}export function updateActivationReferences(_0x242976,_0xd9fa50){const _0x3eff93=a129_0x1da9;if(!_0x242976)return;for(const _0x15b8a6 of _0x242976){if(!_0x15b8a6[_0x3eff93(0x109)])continue;for(const _0x505b5c of _0x15b8a6[_0x3eff93(0x109)]){if(_0x505b5c[_0x3eff93(0x112)]==='activation'&&_0x505b5c['with']?.[_0x3eff93(0xe3)]){const _0x5685d4=_0xd9fa50['get'](_0x505b5c['with'][_0x3eff93(0xe3)]);_0x5685d4&&_0x5685d4!==_0x505b5c[_0x3eff93(0xdf)][_0x3eff93(0xe3)]&&(_0x505b5c[_0x3eff93(0xdf)][_0x3eff93(0xe3)]=_0x5685d4);}}}}export function consolidateSegmentsByContent(_0x12e96e,_0x1961f7){const _0x14856c=a129_0x1da9,_0x3d8960={},_0x5727fa=new Map(),_0x4f931e=new Map();for(const _0x349a8e of _0x12e96e){if(!_0x349a8e)continue;for(const [_0x1e1db7,_0x989978]of Object[_0x14856c(0xf7)](_0x349a8e)){if(!_0x989978[_0x14856c(0xf1)]){_0x3d8960[_0x1e1db7]=_0x989978,_0x5727fa['set'](_0x1e1db7,_0x1e1db7);continue;}const _0x37baf3=_0x989978[_0x14856c(0x10e)]&&_0x989978['description']['trim']()?_0x989978[_0x14856c(0x10e)]:undefined,_0x25b716=JSON[_0x14856c(0xde)]({'description':_0x37baf3,'rule':deepSortObject(_0x989978[_0x14856c(0xf1)])}),_0x1bfb8b=_0x4f931e[_0x14856c(0xf6)](_0x25b716);if(_0x1bfb8b){const _0x337f74={..._0x989978[_0x14856c(0x10e)]!==undefined&&{'description':_0x989978[_0x14856c(0x10e)]},'rule':_0x989978[_0x14856c(0xf1)]?deepSortObject(_0x989978[_0x14856c(0xf1)]):_0x989978[_0x14856c(0xf1)]};if(_0x1e1db7<_0x1bfb8b){_0x3d8960[_0x1e1db7]=_0x337f74,delete _0x3d8960[_0x1bfb8b];for(const [_0x51baac,_0x430aa6]of _0x5727fa[_0x14856c(0xf7)]()){_0x430aa6===_0x1bfb8b&&_0x5727fa[_0x14856c(0x100)](_0x51baac,_0x1e1db7);}_0x5727fa[_0x14856c(0x100)](_0x1e1db7,_0x1e1db7),_0x4f931e[_0x14856c(0x100)](_0x25b716,_0x1e1db7);}else _0x3d8960[_0x1bfb8b]=_0x337f74,_0x5727fa[_0x14856c(0x100)](_0x1e1db7,_0x1bfb8b);}else{let _0x59b5ba=_0x1e1db7;if(_0x1961f7){const _0xa33ce5=_0x1961f7[_0x14856c(0xf6)](_0x25b716);_0xa33ce5&&_0xa33ce5[_0x14856c(0xe7)]>0x0&&(_0x59b5ba=_0xa33ce5['slice']()[_0x14856c(0x10c)]()[0x0]);}const _0x299134={..._0x989978[_0x14856c(0x10e)]!==undefined&&{'description':_0x989978['description']},'rule':_0x989978[_0x14856c(0xf1)]?deepSortObject(_0x989978[_0x14856c(0xf1)]):_0x989978[_0x14856c(0xf1)]};_0x3d8960[_0x59b5ba]=_0x299134,_0x5727fa[_0x14856c(0x100)](_0x1e1db7,_0x59b5ba),_0x4f931e[_0x14856c(0x100)](_0x25b716,_0x59b5ba);}}}return{'merged':_0x3d8960,'nameMapping':_0x5727fa};}export function updateSegmentReferences(_0x39d02e,_0x2a1e9c){const _0x542470=a129_0x1da9;if(!_0x39d02e)return;for(const _0x1bbfe0 of _0x39d02e){if(_0x1bbfe0[_0x542470(0xe0)]?.[_0x542470(0xd2)]){const _0x58bd91=_0x2a1e9c['get'](_0x1bbfe0[_0x542470(0xe0)][_0x542470(0xd2)]);_0x58bd91&&(_0x1bbfe0['entry_criteria'][_0x542470(0xd2)]=_0x58bd91);}if(_0x1bbfe0[_0x542470(0xcd)])for(const _0x3ebb1b of _0x1bbfe0['exit_criteria']){if(_0x3ebb1b[_0x542470(0xd2)]){const _0x132635=_0x2a1e9c[_0x542470(0xf6)](_0x3ebb1b[_0x542470(0xd2)]);_0x132635&&(_0x3ebb1b[_0x542470(0xd2)]=_0x132635);}}if(_0x1bbfe0[_0x542470(0x10d)]?.[_0x542470(0xd2)]){const _0x4c19b1=_0x2a1e9c[_0x542470(0xf6)](_0x1bbfe0[_0x542470(0x10d)]['segment']);_0x4c19b1&&(_0x1bbfe0[_0x542470(0x10d)]['segment']=_0x4c19b1);}if(_0x1bbfe0[_0x542470(0x109)])for(const _0x125256 of _0x1bbfe0[_0x542470(0x109)]){if(_0x125256['type']===_0x542470(0xd5)&&_0x125256[_0x542470(0xdf)]?.[_0x542470(0xf9)])for(const _0x1c27fc of _0x125256[_0x542470(0xdf)][_0x542470(0xf9)]){if(_0x1c27fc[_0x542470(0xd2)]){const _0x3bd3d9=_0x2a1e9c['get'](_0x1c27fc[_0x542470(0xd2)]);_0x3bd3d9&&(_0x1c27fc[_0x542470(0xd2)]=_0x3bd3d9);}}if(_0x125256[_0x542470(0x112)]==='wait'&&_0x125256[_0x542470(0xdf)]?.[_0x542470(0x107)]?.[_0x542470(0xd2)]){const _0x197f44=_0x2a1e9c['get'](_0x125256[_0x542470(0xdf)][_0x542470(0x107)][_0x542470(0xd2)]);_0x197f44&&(_0x125256[_0x542470(0xdf)]['condition']['segment']=_0x197f44);}}}}export function updateSegmentRefsInSegments(_0x259a7c,_0x5dd897){const _0x7bf91c=a129_0x1da9;for(const _0x3904ed of Object[_0x7bf91c(0xce)](_0x259a7c)){_0x3904ed[_0x7bf91c(0xf1)]&&updateSegmentRefsInRule(_0x3904ed['rule'],_0x5dd897);}}function updateSegmentRefsInRule(_0x2f0d2c,_0x16b949){const _0x4d87df=a129_0x1da9;if(_0x2f0d2c===null||typeof _0x2f0d2c!==_0x4d87df(0xea))return;if(Array['isArray'](_0x2f0d2c)){for(const _0x334f18 of _0x2f0d2c){updateSegmentRefsInRule(_0x334f18,_0x16b949);}return;}const _0xfcbb86=_0x2f0d2c;if((_0xfcbb86[_0x4d87df(0x112)]==='include'||_0xfcbb86[_0x4d87df(0x112)]==='exclude')&&typeof _0xfcbb86[_0x4d87df(0xd2)]==='string'){const _0x3a00ce=_0x16b949[_0x4d87df(0xf6)](_0xfcbb86[_0x4d87df(0xd2)]);_0x3a00ce&&(_0xfcbb86[_0x4d87df(0xd2)]=_0x3a00ce);}if(_0xfcbb86['conditions']&&Array[_0x4d87df(0xff)](_0xfcbb86[_0x4d87df(0xee)]))for(const _0x352558 of _0xfcbb86[_0x4d87df(0xee)]){updateSegmentRefsInRule(_0x352558,_0x16b949);}}export function buildJourneysArray(_0x38278a,_0x404193){const _0x1f81f9=a129_0x1da9;return _0x38278a[_0x1f81f9(0x104)](_0x5c1f86=>{const _0x48a7b7=_0x1f81f9,_0x3a3cc4=_0x404193?_0x5c1f86['item']['id']===_0x404193:_0x38278a[_0x48a7b7(0xe7)]===0x1,_0x2a64ea=_0x5c1f86[_0x48a7b7(0x111)][_0x48a7b7(0xfc)]?.[0x0],_0x1321e0=_0x2a64ea?.[_0x48a7b7(0xe1)]||_0x5c1f86['yaml'][_0x48a7b7(0xe1)],_0x56ecbc={'version':_0x2a64ea?.[_0x48a7b7(0xfe)]||_0x5c1f86[_0x48a7b7(0x111)][_0x48a7b7(0xfe)]||_0x5c1f86[_0x48a7b7(0xf4)]['name'],'state':_0x5c1f86[_0x48a7b7(0xf4)][_0x48a7b7(0x10f)]==='launched'?_0x48a7b7(0xd3):_0x48a7b7(0xcc),'stages':_0x2a64ea?.[_0x48a7b7(0xfb)]||_0x5c1f86[_0x48a7b7(0x111)]['stages']||[],'id':_0x2a64ea?.['id']||_0x5c1f86[_0x48a7b7(0x111)]['id'],'version_number':_0x2a64ea?.[_0x48a7b7(0xe2)]||_0x5c1f86[_0x48a7b7(0x111)]['version_number']};return _0x1321e0&&(_0x56ecbc['goal']=_0x1321e0),_0x3a3cc4&&(_0x56ecbc[_0x48a7b7(0xdb)]=!![]),_0x56ecbc;});}export function buildMergedJourneyDef(_0xca0fa5,_0xfbfeda,_0x4f4d04){const _0x16d014=a129_0x1da9,_0x49f1c1=_0xca0fa5[0x0]['yaml'],_0x407aa7=buildJourneysArray(_0xca0fa5,_0x4f4d04),{merged:_0x3a073f,nameMapping:_0x335690}=consolidateSegmentsByContent(_0xca0fa5[_0x16d014(0x104)](_0x1ad418=>_0x1ad418[_0x16d014(0x111)][_0x16d014(0xcb)]),_0xfbfeda);updateSegmentRefsInSegments(_0x3a073f,_0x335690);const _0x39458b=Array[_0x16d014(0x110)](_0x335690[_0x16d014(0xf7)]())[_0x16d014(0xf0)](([_0x261caa,_0x298816])=>_0x261caa!==_0x298816&&_0x261caa[_0x16d014(0xfd)](_0x16d014(0xe0)));let _0x144ba5=_0x3a073f,_0x3b68b7=new Map();if(_0x39458b){const _0x50609e=consolidateSegmentsByContent([_0x3a073f],_0xfbfeda);_0x144ba5=_0x50609e[_0x16d014(0xd9)],_0x3b68b7=_0x50609e[_0x16d014(0xe9)];}const _0x1cdad0=new Map(_0x335690);for(const [_0x18c269,_0x1bb889]of _0x3b68b7[_0x16d014(0xf7)]()){_0x1cdad0[_0x16d014(0x100)](_0x18c269,_0x1bb889);}for(const [_0x24ec62,_0x120e24]of _0x1cdad0[_0x16d014(0xf7)]()){let _0x2c5161=_0x120e24,_0x4496e5=0x0;while(_0x1cdad0[_0x16d014(0xc8)](_0x2c5161)&&_0x1cdad0[_0x16d014(0xf6)](_0x2c5161)!==_0x2c5161&&_0x4496e5<MAX_MAPPING_CHAIN_DEPTH){_0x2c5161=_0x1cdad0[_0x16d014(0xf6)](_0x2c5161),_0x4496e5++;}_0x2c5161!==_0x120e24&&_0x1cdad0[_0x16d014(0x100)](_0x24ec62,_0x2c5161);}for(const _0x5e212d of _0x407aa7){updateSegmentReferences(_0x5e212d['stages'],_0x1cdad0);}const {merged:_0x221714,nameMapping:_0x21d877}=consolidateActivationsByContent(_0xca0fa5[_0x16d014(0x104)](_0xbb9530=>_0xbb9530['yaml']['activations']));for(const _0x45fc92 of _0x407aa7){updateActivationReferences(_0x45fc92[_0x16d014(0xfb)],_0x21d877);}let _0x133c1e=_0x49f1c1['goal'];if(_0x133c1e?.[_0x16d014(0xd2)]){const _0x57196e=_0x1cdad0[_0x16d014(0xf6)](_0x133c1e[_0x16d014(0xd2)]);_0x57196e&&(_0x133c1e={..._0x133c1e,'segment':_0x57196e});}for(const _0x5f19a0 of _0x407aa7){if(_0x5f19a0[_0x16d014(0xe1)]?.['segment']){const _0x112f5e=_0x1cdad0[_0x16d014(0xf6)](_0x5f19a0[_0x16d014(0xe1)][_0x16d014(0xd2)]);_0x112f5e&&(_0x5f19a0['goal']={..._0x5f19a0['goal'],'segment':_0x112f5e});}}return _0x407aa7[_0x16d014(0xf0)](_0x5b1b2d=>_0x5b1b2d[_0x16d014(0xe1)])&&(_0x133c1e=undefined),{'type':'journey','name':_0x49f1c1[_0x16d014(0xcf)],'description':_0x49f1c1[_0x16d014(0x10e)],'goal':_0x133c1e,'reentry':_0x49f1c1[_0x16d014(0xd8)],'segments':Object[_0x16d014(0xed)](_0x144ba5)[_0x16d014(0xe7)]>0x0?_0x144ba5:undefined,'activations':Object['keys'](_0x221714)[_0x16d014(0xe7)]>0x0?_0x221714:undefined,'journeys':_0x407aa7,'bundle_id':_0x49f1c1[_0x16d014(0xe8)],'bundle_name':_0x49f1c1[_0x16d014(0x114)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x350ade,_0x20a723,_0x4bf69,_0x3937c5){const _0x312f7b=a129_0x1da9,_0x30d6e3=_0x350ade+':'+_0x20a723,_0x280465=_0x4bf69['get'](_0x30d6e3);if(_0x280465)return _0x280465;const _0x4fc8e0=await _0x3937c5(_0x350ade),_0xc6b310=_0x4fc8e0['attributes']['journeyBundleName']||_0x4fc8e0[_0x312f7b(0x106)]['name'],_0x4bebf3=_0x4fc8e0[_0x312f7b(0x106)]['journeyStages'][_0x312f7b(0xc9)](_0x58ce2d=>String(_0x58ce2d['id'])===String(_0x20a723)),_0x3d1d70=_0x4bebf3?.['name']||_0x20a723,_0x356640={'journeyName':_0xc6b310,'stageName':_0x3d1d70};return _0x4bf69[_0x312f7b(0x100)](_0x30d6e3,_0x356640),_0x356640;}export function formatApiJourneyName(_0x83696e,_0x4df0af){return _0x4df0af+'\x20('+_0x83696e+')';}export function isLocalJourneyRef(_0x3479fb){const _0x3f7d56=a129_0x1da9;return _0x3479fb['endsWith'](_0x3f7d56(0x101))||_0x3479fb[_0x3f7d56(0x108)](_0x3f7d56(0xf5));}export function buildLocalRuleToNameMapping(_0x189266){const _0x487684=a129_0x1da9,_0x3f7f7f=new Map();if(!_0x189266)return _0x3f7f7f;for(const [_0x25eee4,_0x997351]of Object[_0x487684(0xf7)](_0x189266)){if(_0x997351[_0x487684(0xf1)]){const _0x1bad4e=serializeRule(_0x997351[_0x487684(0xf1)]),_0x436600=_0x3f7f7f['get'](_0x1bad4e)||[];_0x436600[_0x487684(0xca)](_0x25eee4),_0x3f7f7f[_0x487684(0x100)](_0x1bad4e,_0x436600);}}return _0x3f7f7f;}function a129_0x8272(){const _0x596803=['sort','milestone','description','state','from','yaml','type','replace','bundle_name','has','find','push','segments','draft','exit_criteria','values','name','notification','index','segment','launched','6086922pOPbUe','decision_point','join','slice','reentry','merged','wait','latest','2383576ZzhtLm','all_columns','stringify','with','entry_criteria','goal','version_number','activation','8464HHthCn','versions','340196wRpDBq','length','bundle_id','nameMapping','object','toLowerCase','connector_config','keys','conditions','connection','some','rule','behavior','schedule','item','.yaml','get','entries','match','branches','366stkDmB','stages','journeys','startsWith','version','isArray','set','.yml','columns','3787230IRkdYK','map','1536561PQaYNQ','attributes','condition','endsWith','steps','7EZfVVc','1204085MQSjEh'];a129_0x8272=function(){return _0x596803;};return a129_0x8272();}export function buildLocalRuleToNameMappingFromJourney(_0x3ccef5){const _0xfd06ab=a129_0x1da9,_0x2d6ee1=_0x3ccef5['segments'];if(!_0x2d6ee1)return new Map();const _0x2969c3=collectSegmentUsageCounts(_0x3ccef5),_0x3d4027=new Map();let _0x35fcad=0x0;for(const [_0x205089,_0x46f4de]of Object['entries'](_0x2d6ee1)){if(!_0x46f4de['rule']){_0x35fcad++;continue;}const _0x50eb42=serializeRule(_0x46f4de[_0xfd06ab(0xf1)]),_0xaf379=_0x3d4027[_0xfd06ab(0xf6)](_0x50eb42)||[];_0xaf379[_0xfd06ab(0xca)]({'name':_0x205089,'index':_0x35fcad}),_0x3d4027[_0xfd06ab(0x100)](_0x50eb42,_0xaf379),_0x35fcad++;}const _0xf258=new Map();for(const [_0x48309c,_0x1b2ebb]of _0x3d4027){const _0x504f5d=_0x1b2ebb[_0xfd06ab(0xd7)]()['sort']((_0x2a30e2,_0x11a6ae)=>{const _0x5150d7=_0xfd06ab,_0x4f2632=_0x2969c3[_0x5150d7(0xf6)](_0x2a30e2[_0x5150d7(0xcf)])||0x0,_0x5b8450=_0x2969c3[_0x5150d7(0xf6)](_0x11a6ae[_0x5150d7(0xcf)])||0x0;if(_0x4f2632!==_0x5b8450)return _0x5b8450-_0x4f2632;return _0x2a30e2[_0x5150d7(0xd1)]-_0x11a6ae['index'];})[_0xfd06ab(0x104)](_0x12f340=>_0x12f340['name']);_0xf258[_0xfd06ab(0x100)](_0x48309c,_0x504f5d);}return _0xf258;}export function collectSegmentUsageCounts(_0x3ff5ef){const _0x9a8e=a129_0x1da9,_0x72e8c8=new Map(),_0x12ad21=_0x34f6b0=>{const _0x4c2424=a129_0x1da9;if(!_0x34f6b0)return;_0x72e8c8[_0x4c2424(0x100)](_0x34f6b0,(_0x72e8c8[_0x4c2424(0xf6)](_0x34f6b0)||0x0)+0x1);},_0x41ac4d=_0x74a48=>{const _0x5a6c6e=a129_0x1da9;for(const _0xe8f36 of _0x74a48){_0x12ad21(_0xe8f36['entry_criteria']?.[_0x5a6c6e(0xd2)]);if(_0xe8f36['exit_criteria'])for(const _0x4174ce of _0xe8f36['exit_criteria']){_0x12ad21(_0x4174ce['segment']);}_0x12ad21(_0xe8f36[_0x5a6c6e(0x10d)]?.['segment']);if(_0xe8f36[_0x5a6c6e(0x109)])for(const _0x4a8670 of _0xe8f36[_0x5a6c6e(0x109)]){if(_0x4a8670[_0x5a6c6e(0x112)]==='decision_point')for(const _0xf53477 of _0x4a8670[_0x5a6c6e(0xdf)]['branches']){_0x12ad21(_0xf53477['segment']);}else _0x4a8670['type']===_0x5a6c6e(0xda)&&_0x12ad21(_0x4a8670[_0x5a6c6e(0xdf)][_0x5a6c6e(0x107)]?.[_0x5a6c6e(0xd2)]);}}};_0x12ad21(_0x3ff5ef[_0x9a8e(0xe1)]?.[_0x9a8e(0xd2)]);if(_0x3ff5ef['journeys'])for(const _0x50dae2 of _0x3ff5ef[_0x9a8e(0xfc)]){_0x12ad21(_0x50dae2['goal']?.[_0x9a8e(0xd2)]),_0x41ac4d(_0x50dae2[_0x9a8e(0xfb)]);}_0x3ff5ef[_0x9a8e(0xfb)]&&_0x41ac4d(_0x3ff5ef[_0x9a8e(0xfb)]);if(_0x3ff5ef[_0x9a8e(0xe5)])for(const _0x3ab7ac of _0x3ff5ef['versions']){_0x41ac4d(_0x3ab7ac[_0x9a8e(0xfb)]);}return _0x72e8c8;}
|
|
1
|
+
(function(_0x4a8207,_0x46b56f){const _0x593ae2=a129_0x2f8f,_0x1a076b=_0x4a8207();while(!![]){try{const _0x32346a=parseInt(_0x593ae2(0x188))/0x1+-parseInt(_0x593ae2(0x1cd))/0x2*(parseInt(_0x593ae2(0x193))/0x3)+parseInt(_0x593ae2(0x18b))/0x4+parseInt(_0x593ae2(0x1b9))/0x5+parseInt(_0x593ae2(0x1a4))/0x6+-parseInt(_0x593ae2(0x189))/0x7*(parseInt(_0x593ae2(0x1b2))/0x8)+parseInt(_0x593ae2(0x199))/0x9*(parseInt(_0x593ae2(0x1be))/0xa);if(_0x32346a===_0x46b56f)break;else _0x1a076b['push'](_0x1a076b['shift']());}catch(_0x3cf066){_0x1a076b['push'](_0x1a076b['shift']());}}}(a129_0x81c9,0xabadb));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a129_0x81c9(){const _0x22ad11=['connector_config','bundle_id','toLowerCase','exit_criteria','description','all_columns','934593pRKDrW','decision_point','sort','latest','launched','join','21015sGnxEw','conditions','version','notification','stages','wait','versions','attributes','journeyBundleName','replace','item','699738hzFxXy','nameMapping','set','index','entry_criteria','endsWith','activation','some','.yaml','behavior','schedule','condition','merged','keys','8wDYfWk','.yml','branches','length','rule','find','string','81530qybvCX','type','trim','segments','include','1110wjmren','object','map','values','yaml','reentry','from','entries','activation_template_id','name','slice','journeys','goal','null','get','6NhBNKG','milestone','segment','stringify','steps','isArray','columns','match','1240248qlyTAw','2640197yTDbYt','with','1530388Ybxymq','version_number'];a129_0x81c9=function(){return _0x22ad11;};return a129_0x81c9();}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x41b37a){const _0x117879=a129_0x2f8f;return _0x41b37a[_0x117879(0x18f)]()[_0x117879(0x1a2)](/\s+/g,'_')[_0x117879(0x1a2)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')[_0x117879(0x1a2)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x1a7dec){const _0x1fa895=a129_0x2f8f,_0x42f6b3=_0x1a7dec[_0x1fa895(0x187)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x42f6b3){const _0x218a86=_0x42f6b3[0x1]['toLowerCase'](),_0x31b9c8=_0x42f6b3[0x2],_0x152dc4=_0x31b9c8['replace'](/-/g,'')['slice'](0x0,0x4)[_0x1fa895(0x18f)]();return _0x218a86+'_'+_0x152dc4;}const _0x135e93=_0x1a7dec[_0x1fa895(0x187)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x135e93){const _0x25dd04=_0x135e93[0x1],_0x487767=_0x135e93[0x2][_0x1fa895(0x18f)](),_0x2e726b=_0x25dd04[_0x1fa895(0x1a2)](/-/g,'')[_0x1fa895(0x1c8)](0x0,0x4)[_0x1fa895(0x18f)]();return _0x487767+'_'+_0x2e726b;}return undefined;}function stableStringify(_0x47b60d){const _0x511ece=a129_0x2f8f;if(Array['isArray'](_0x47b60d))return'['+_0x47b60d[_0x511ece(0x1c0)](_0xc978f3=>stableStringify(_0xc978f3))['join'](',')+']';if(_0x47b60d&&typeof _0x47b60d===_0x511ece(0x1bf)){const _0x3f15f2=_0x47b60d,_0x428ba4=Object[_0x511ece(0x1b1)](_0x3f15f2)[_0x511ece(0x195)](),_0x2252ec=_0x428ba4[_0x511ece(0x1c0)](_0x4fd2dc=>'\x22'+_0x4fd2dc+'\x22:'+stableStringify(_0x3f15f2[_0x4fd2dc]));return'{'+_0x2252ec[_0x511ece(0x198)](',')+'}';}const _0x2a1ed7=JSON[_0x511ece(0x183)](_0x47b60d);return _0x2a1ed7===undefined?_0x511ece(0x1cb):_0x2a1ed7;}export function consolidateActivationsByContent(_0x28ed7a){const _0x4cf564=a129_0x2f8f,_0x3e73da={},_0x18329f=new Map(),_0x1622b1=new Map();for(const _0x769951 of _0x28ed7a){if(!_0x769951)continue;for(const [_0x4216cb,_0x3a8f24]of Object['entries'](_0x769951)){const _0x176400={'connection':_0x3a8f24['connection'],..._0x3a8f24[_0x4cf564(0x192)]!==undefined&&{'all_columns':_0x3a8f24[_0x4cf564(0x192)]},..._0x3a8f24[_0x4cf564(0x186)]!==undefined&&{'columns':_0x3a8f24[_0x4cf564(0x186)]},..._0x3a8f24['behavior']!==undefined&&{'behavior':_0x3a8f24[_0x4cf564(0x1ad)]},..._0x3a8f24[_0x4cf564(0x1ae)]!==undefined&&{'schedule':_0x3a8f24[_0x4cf564(0x1ae)]},..._0x3a8f24[_0x4cf564(0x19c)]!==undefined&&{'notification':_0x3a8f24[_0x4cf564(0x19c)]},..._0x3a8f24['connector_config']!==undefined&&{'connector_config':_0x3a8f24[_0x4cf564(0x18d)]},..._0x3a8f24[_0x4cf564(0x1c6)]!==undefined&&{'activation_template_id':_0x3a8f24[_0x4cf564(0x1c6)]}},_0x25b4be=stableStringify(_0x176400),_0x5ad4fa=_0x1622b1[_0x4cf564(0x1cc)](_0x25b4be);_0x5ad4fa?_0x18329f[_0x4cf564(0x1a6)](_0x4216cb,_0x5ad4fa):(_0x3e73da[_0x4216cb]=_0x3a8f24,_0x18329f[_0x4cf564(0x1a6)](_0x4216cb,_0x4216cb),_0x1622b1[_0x4cf564(0x1a6)](_0x25b4be,_0x4216cb));}}return{'merged':_0x3e73da,'nameMapping':_0x18329f};}export function updateActivationReferences(_0x301868,_0x46f829){const _0x42486b=a129_0x2f8f;if(!_0x301868)return;for(const _0x1e096a of _0x301868){if(!_0x1e096a[_0x42486b(0x184)])continue;for(const _0x3f8cf3 of _0x1e096a[_0x42486b(0x184)]){if(_0x3f8cf3[_0x42486b(0x1ba)]==='activation'&&_0x3f8cf3[_0x42486b(0x18a)]?.[_0x42486b(0x1aa)]){const _0x60af00=_0x46f829[_0x42486b(0x1cc)](_0x3f8cf3[_0x42486b(0x18a)]['activation']);_0x60af00&&_0x60af00!==_0x3f8cf3['with'][_0x42486b(0x1aa)]&&(_0x3f8cf3[_0x42486b(0x18a)][_0x42486b(0x1aa)]=_0x60af00);}}}}export function consolidateSegmentsByContent(_0x284a66,_0x52c1a5){const _0x4859ca=a129_0x2f8f,_0x117e5c={},_0x30d181=new Map(),_0x16de83=new Map();for(const _0x51d0a1 of _0x284a66){if(!_0x51d0a1)continue;for(const [_0x42c3eb,_0x4f71bc]of Object['entries'](_0x51d0a1)){if(!_0x4f71bc[_0x4859ca(0x1b6)]){_0x117e5c[_0x42c3eb]=_0x4f71bc,_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x42c3eb);continue;}const _0x5cffd9=_0x4f71bc['description']&&_0x4f71bc[_0x4859ca(0x191)][_0x4859ca(0x1bb)]()?_0x4f71bc[_0x4859ca(0x191)]:undefined,_0xbd14e2=JSON[_0x4859ca(0x183)]({'description':_0x5cffd9,'rule':deepSortObject(_0x4f71bc[_0x4859ca(0x1b6)])}),_0x1d9606=_0x16de83[_0x4859ca(0x1cc)](_0xbd14e2);if(_0x1d9606){const _0x1c053d={..._0x4f71bc['description']!==undefined&&{'description':_0x4f71bc[_0x4859ca(0x191)]},'rule':_0x4f71bc[_0x4859ca(0x1b6)]?deepSortObject(_0x4f71bc[_0x4859ca(0x1b6)]):_0x4f71bc[_0x4859ca(0x1b6)]};if(_0x42c3eb<_0x1d9606){_0x117e5c[_0x42c3eb]=_0x1c053d,delete _0x117e5c[_0x1d9606];for(const [_0x2f19cd,_0x16c6af]of _0x30d181[_0x4859ca(0x1c5)]()){_0x16c6af===_0x1d9606&&_0x30d181[_0x4859ca(0x1a6)](_0x2f19cd,_0x42c3eb);}_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x42c3eb),_0x16de83['set'](_0xbd14e2,_0x42c3eb);}else _0x117e5c[_0x1d9606]=_0x1c053d,_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x1d9606);}else{let _0x81bfe5=_0x42c3eb;if(_0x52c1a5){const _0x3e8653=_0x52c1a5[_0x4859ca(0x1cc)](_0xbd14e2);_0x3e8653&&_0x3e8653[_0x4859ca(0x1b5)]>0x0&&(_0x81bfe5=_0x3e8653['slice']()['sort']()[0x0]);}const _0x390a8e={..._0x4f71bc[_0x4859ca(0x191)]!==undefined&&{'description':_0x4f71bc['description']},'rule':_0x4f71bc[_0x4859ca(0x1b6)]?deepSortObject(_0x4f71bc['rule']):_0x4f71bc['rule']};_0x117e5c[_0x81bfe5]=_0x390a8e,_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x81bfe5),_0x16de83[_0x4859ca(0x1a6)](_0xbd14e2,_0x81bfe5);}}}return{'merged':_0x117e5c,'nameMapping':_0x30d181};}export function updateSegmentReferences(_0x3bad86,_0x49fd55){const _0x4b5cf3=a129_0x2f8f;if(!_0x3bad86)return;for(const _0x456979 of _0x3bad86){if(_0x456979[_0x4b5cf3(0x1a8)]?.[_0x4b5cf3(0x1cf)]){const _0x5a1c8a=_0x49fd55[_0x4b5cf3(0x1cc)](_0x456979[_0x4b5cf3(0x1a8)]['segment']);_0x5a1c8a&&(_0x456979['entry_criteria'][_0x4b5cf3(0x1cf)]=_0x5a1c8a);}if(_0x456979[_0x4b5cf3(0x190)])for(const _0x304284 of _0x456979[_0x4b5cf3(0x190)]){if(_0x304284[_0x4b5cf3(0x1cf)]){const _0x3d712c=_0x49fd55['get'](_0x304284[_0x4b5cf3(0x1cf)]);_0x3d712c&&(_0x304284[_0x4b5cf3(0x1cf)]=_0x3d712c);}}if(_0x456979[_0x4b5cf3(0x1ce)]?.['segment']){const _0x28e120=_0x49fd55['get'](_0x456979[_0x4b5cf3(0x1ce)][_0x4b5cf3(0x1cf)]);_0x28e120&&(_0x456979[_0x4b5cf3(0x1ce)]['segment']=_0x28e120);}if(_0x456979[_0x4b5cf3(0x184)])for(const _0x45f14f of _0x456979['steps']){if(_0x45f14f[_0x4b5cf3(0x1ba)]===_0x4b5cf3(0x194)&&_0x45f14f[_0x4b5cf3(0x18a)]?.['branches'])for(const _0x11243a of _0x45f14f['with'][_0x4b5cf3(0x1b4)]){if(_0x11243a['segment']){const _0x1d305a=_0x49fd55['get'](_0x11243a[_0x4b5cf3(0x1cf)]);_0x1d305a&&(_0x11243a[_0x4b5cf3(0x1cf)]=_0x1d305a);}}if(_0x45f14f[_0x4b5cf3(0x1ba)]===_0x4b5cf3(0x19e)&&_0x45f14f[_0x4b5cf3(0x18a)]?.['condition']?.['segment']){const _0x2f4e13=_0x49fd55['get'](_0x45f14f[_0x4b5cf3(0x18a)][_0x4b5cf3(0x1af)][_0x4b5cf3(0x1cf)]);_0x2f4e13&&(_0x45f14f[_0x4b5cf3(0x18a)]['condition'][_0x4b5cf3(0x1cf)]=_0x2f4e13);}}}}export function updateSegmentRefsInSegments(_0x501758,_0x322752){const _0x4459b6=a129_0x2f8f;for(const _0x165309 of Object[_0x4459b6(0x1c1)](_0x501758)){_0x165309['rule']&&updateSegmentRefsInRule(_0x165309[_0x4459b6(0x1b6)],_0x322752);}}function updateSegmentRefsInRule(_0x2f2a84,_0x2d7550){const _0x52547c=a129_0x2f8f;if(_0x2f2a84===null||typeof _0x2f2a84!=='object')return;if(Array[_0x52547c(0x185)](_0x2f2a84)){for(const _0x275157 of _0x2f2a84){updateSegmentRefsInRule(_0x275157,_0x2d7550);}return;}const _0x4f7f2e=_0x2f2a84;if((_0x4f7f2e['type']===_0x52547c(0x1bd)||_0x4f7f2e[_0x52547c(0x1ba)]==='exclude')&&typeof _0x4f7f2e['segment']===_0x52547c(0x1b8)){const _0x25c08d=_0x2d7550[_0x52547c(0x1cc)](_0x4f7f2e[_0x52547c(0x1cf)]);_0x25c08d&&(_0x4f7f2e['segment']=_0x25c08d);}if(_0x4f7f2e[_0x52547c(0x19a)]&&Array[_0x52547c(0x185)](_0x4f7f2e[_0x52547c(0x19a)]))for(const _0x336e06 of _0x4f7f2e[_0x52547c(0x19a)]){updateSegmentRefsInRule(_0x336e06,_0x2d7550);}}export function buildJourneysArray(_0x33209f,_0x4607d0){const _0x13d78f=a129_0x2f8f;return _0x33209f[_0x13d78f(0x1c0)](_0x12fcb8=>{const _0xc521f8=_0x13d78f,_0x183973=_0x4607d0?_0x12fcb8['item']['id']===_0x4607d0:_0x33209f[_0xc521f8(0x1b5)]===0x1,_0x3b6b4d=_0x12fcb8[_0xc521f8(0x1c2)][_0xc521f8(0x1c9)]?.[0x0],_0x1c7af9=_0x3b6b4d?.[_0xc521f8(0x1ca)]||_0x12fcb8[_0xc521f8(0x1c2)][_0xc521f8(0x1ca)],_0x25cdfd={'version':_0x3b6b4d?.[_0xc521f8(0x19b)]||_0x12fcb8[_0xc521f8(0x1c2)][_0xc521f8(0x19b)]||_0x12fcb8['item'][_0xc521f8(0x1c7)],'state':_0x12fcb8[_0xc521f8(0x1a3)]['state']===_0xc521f8(0x197)?_0xc521f8(0x197):'draft','stages':_0x3b6b4d?.[_0xc521f8(0x19d)]||_0x12fcb8['yaml'][_0xc521f8(0x19d)]||[],'id':_0x3b6b4d?.['id']||_0x12fcb8[_0xc521f8(0x1c2)]['id'],'version_number':_0x3b6b4d?.[_0xc521f8(0x18c)]||_0x12fcb8[_0xc521f8(0x1c2)]['version_number']};return _0x1c7af9&&(_0x25cdfd[_0xc521f8(0x1ca)]=_0x1c7af9),_0x183973&&(_0x25cdfd[_0xc521f8(0x196)]=!![]),_0x25cdfd;});}export function buildMergedJourneyDef(_0x54dd1e,_0x1cb083,_0x103286){const _0x159387=a129_0x2f8f,_0x393b81=_0x54dd1e[0x0][_0x159387(0x1c2)],_0x4f8a01=buildJourneysArray(_0x54dd1e,_0x103286),{merged:_0x33db92,nameMapping:_0x2edaf7}=consolidateSegmentsByContent(_0x54dd1e['map'](_0x20c520=>_0x20c520[_0x159387(0x1c2)]['segments']),_0x1cb083);updateSegmentRefsInSegments(_0x33db92,_0x2edaf7);const _0x3448ff=Array[_0x159387(0x1c4)](_0x2edaf7[_0x159387(0x1c5)]())['some'](([_0x482045,_0x140d83])=>_0x482045!==_0x140d83&&_0x482045['startsWith']('entry_criteria'));let _0x5f19ac=_0x33db92,_0x2369cc=new Map();if(_0x3448ff){const _0x3f20a0=consolidateSegmentsByContent([_0x33db92],_0x1cb083);_0x5f19ac=_0x3f20a0[_0x159387(0x1b0)],_0x2369cc=_0x3f20a0[_0x159387(0x1a5)];}const _0x564cdf=new Map(_0x2edaf7);for(const [_0x28b16e,_0x5684f0]of _0x2369cc[_0x159387(0x1c5)]()){_0x564cdf[_0x159387(0x1a6)](_0x28b16e,_0x5684f0);}for(const [_0x3bdef1,_0x272557]of _0x564cdf['entries']()){let _0x5a4b0b=_0x272557,_0x423e5d=0x0;while(_0x564cdf['has'](_0x5a4b0b)&&_0x564cdf[_0x159387(0x1cc)](_0x5a4b0b)!==_0x5a4b0b&&_0x423e5d<MAX_MAPPING_CHAIN_DEPTH){_0x5a4b0b=_0x564cdf[_0x159387(0x1cc)](_0x5a4b0b),_0x423e5d++;}_0x5a4b0b!==_0x272557&&_0x564cdf[_0x159387(0x1a6)](_0x3bdef1,_0x5a4b0b);}for(const _0x112aa8 of _0x4f8a01){updateSegmentReferences(_0x112aa8[_0x159387(0x19d)],_0x564cdf);}const {merged:_0x305d2e,nameMapping:_0x1ff8a0}=consolidateActivationsByContent(_0x54dd1e[_0x159387(0x1c0)](_0xdd818b=>_0xdd818b['yaml']['activations']));for(const _0x12dbf2 of _0x4f8a01){updateActivationReferences(_0x12dbf2[_0x159387(0x19d)],_0x1ff8a0);}let _0x20c5d8=_0x393b81[_0x159387(0x1ca)];if(_0x20c5d8?.['segment']){const _0x544304=_0x564cdf[_0x159387(0x1cc)](_0x20c5d8[_0x159387(0x1cf)]);_0x544304&&(_0x20c5d8={..._0x20c5d8,'segment':_0x544304});}for(const _0x2c8ad6 of _0x4f8a01){if(_0x2c8ad6[_0x159387(0x1ca)]?.[_0x159387(0x1cf)]){const _0x4bd427=_0x564cdf[_0x159387(0x1cc)](_0x2c8ad6[_0x159387(0x1ca)][_0x159387(0x1cf)]);_0x4bd427&&(_0x2c8ad6[_0x159387(0x1ca)]={..._0x2c8ad6[_0x159387(0x1ca)],'segment':_0x4bd427});}}return _0x4f8a01[_0x159387(0x1ab)](_0x272a1a=>_0x272a1a[_0x159387(0x1ca)])&&(_0x20c5d8=undefined),{'type':'journey','name':_0x393b81['name'],'description':_0x393b81[_0x159387(0x191)],'goal':_0x20c5d8,'reentry':_0x393b81[_0x159387(0x1c3)],'segments':Object[_0x159387(0x1b1)](_0x5f19ac)['length']>0x0?_0x5f19ac:undefined,'activations':Object[_0x159387(0x1b1)](_0x305d2e)[_0x159387(0x1b5)]>0x0?_0x305d2e:undefined,'journeys':_0x4f8a01,'bundle_id':_0x393b81[_0x159387(0x18e)],'bundle_name':_0x393b81['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x4e6981,_0x438e5f,_0x3a1c84,_0x4a12d2){const _0x4f9b44=a129_0x2f8f,_0x397e95=_0x4e6981+':'+_0x438e5f,_0x3117a0=_0x3a1c84[_0x4f9b44(0x1cc)](_0x397e95);if(_0x3117a0)return _0x3117a0;const _0x5147d5=await _0x4a12d2(_0x4e6981),_0x569222=_0x5147d5[_0x4f9b44(0x1a0)][_0x4f9b44(0x1a1)]||_0x5147d5[_0x4f9b44(0x1a0)][_0x4f9b44(0x1c7)],_0x175a33=_0x5147d5[_0x4f9b44(0x1a0)]['journeyStages'][_0x4f9b44(0x1b7)](_0x442735=>String(_0x442735['id'])===String(_0x438e5f)),_0x17b281=_0x175a33?.[_0x4f9b44(0x1c7)]||_0x438e5f,_0x47da09={'journeyName':_0x569222,'stageName':_0x17b281};return _0x3a1c84[_0x4f9b44(0x1a6)](_0x397e95,_0x47da09),_0x47da09;}function a129_0x2f8f(_0x2f2e3a,_0x20d108){_0x2f2e3a=_0x2f2e3a-0x183;const _0x81c9f7=a129_0x81c9();let _0x2f8ffb=_0x81c9f7[_0x2f2e3a];return _0x2f8ffb;}export function formatApiJourneyName(_0x20c28a,_0x451b71){return _0x451b71+'\x20('+_0x20c28a+')';}export function isLocalJourneyRef(_0x25b67c){const _0x2d2953=a129_0x2f8f;return _0x25b67c[_0x2d2953(0x1a9)](_0x2d2953(0x1b3))||_0x25b67c['endsWith'](_0x2d2953(0x1ac));}export function buildLocalRuleToNameMapping(_0x360655){const _0x5d7a5c=a129_0x2f8f,_0x3956fc=new Map();if(!_0x360655)return _0x3956fc;for(const [_0x3194d1,_0x32b101]of Object[_0x5d7a5c(0x1c5)](_0x360655)){if(_0x32b101[_0x5d7a5c(0x1b6)]){const _0x1c1255=serializeRule(_0x32b101[_0x5d7a5c(0x1b6)]),_0x1eaf71=_0x3956fc[_0x5d7a5c(0x1cc)](_0x1c1255)||[];_0x1eaf71['push'](_0x3194d1),_0x3956fc['set'](_0x1c1255,_0x1eaf71);}}return _0x3956fc;}export function buildLocalRuleToNameMappingFromJourney(_0x14b868){const _0x13f379=a129_0x2f8f,_0x1ac9e4=_0x14b868[_0x13f379(0x1bc)];if(!_0x1ac9e4)return new Map();const _0x4263d3=collectSegmentUsageCounts(_0x14b868),_0x263251=new Map();let _0x2de609=0x0;for(const [_0x5c77a8,_0x53c235]of Object[_0x13f379(0x1c5)](_0x1ac9e4)){if(!_0x53c235[_0x13f379(0x1b6)]){_0x2de609++;continue;}const _0x4a1763=serializeRule(_0x53c235[_0x13f379(0x1b6)]),_0x449a1e=_0x263251[_0x13f379(0x1cc)](_0x4a1763)||[];_0x449a1e['push']({'name':_0x5c77a8,'index':_0x2de609}),_0x263251['set'](_0x4a1763,_0x449a1e),_0x2de609++;}const _0x416068=new Map();for(const [_0x300901,_0x4cf38e]of _0x263251){const _0x1139be=_0x4cf38e['slice']()[_0x13f379(0x195)]((_0x12f4e5,_0x24018e)=>{const _0x2a3d61=_0x13f379,_0x52b495=_0x4263d3['get'](_0x12f4e5[_0x2a3d61(0x1c7)])||0x0,_0x4d5fb7=_0x4263d3[_0x2a3d61(0x1cc)](_0x24018e['name'])||0x0;if(_0x52b495!==_0x4d5fb7)return _0x4d5fb7-_0x52b495;return _0x12f4e5[_0x2a3d61(0x1a7)]-_0x24018e[_0x2a3d61(0x1a7)];})[_0x13f379(0x1c0)](_0x4a70c4=>_0x4a70c4['name']);_0x416068[_0x13f379(0x1a6)](_0x300901,_0x1139be);}return _0x416068;}export function collectSegmentUsageCounts(_0x275858){const _0xb1e710=a129_0x2f8f,_0x550075=new Map(),_0x17f641=_0x1d5538=>{const _0x2c372c=a129_0x2f8f;if(!_0x1d5538)return;_0x550075[_0x2c372c(0x1a6)](_0x1d5538,(_0x550075[_0x2c372c(0x1cc)](_0x1d5538)||0x0)+0x1);},_0x5d5b96=_0x37b498=>{const _0x47fd52=a129_0x2f8f;for(const _0x33985b of _0x37b498){_0x17f641(_0x33985b['entry_criteria']?.[_0x47fd52(0x1cf)]);if(_0x33985b[_0x47fd52(0x190)])for(const _0x5c93e9 of _0x33985b[_0x47fd52(0x190)]){_0x17f641(_0x5c93e9[_0x47fd52(0x1cf)]);}_0x17f641(_0x33985b[_0x47fd52(0x1ce)]?.[_0x47fd52(0x1cf)]);if(_0x33985b[_0x47fd52(0x184)])for(const _0x24bb66 of _0x33985b[_0x47fd52(0x184)]){if(_0x24bb66[_0x47fd52(0x1ba)]===_0x47fd52(0x194))for(const _0x5a9399 of _0x24bb66[_0x47fd52(0x18a)][_0x47fd52(0x1b4)]){_0x17f641(_0x5a9399[_0x47fd52(0x1cf)]);}else _0x24bb66[_0x47fd52(0x1ba)]===_0x47fd52(0x19e)&&_0x17f641(_0x24bb66[_0x47fd52(0x18a)][_0x47fd52(0x1af)]?.[_0x47fd52(0x1cf)]);}}};_0x17f641(_0x275858[_0xb1e710(0x1ca)]?.[_0xb1e710(0x1cf)]);if(_0x275858[_0xb1e710(0x1c9)])for(const _0x309f1e of _0x275858[_0xb1e710(0x1c9)]){_0x17f641(_0x309f1e['goal']?.[_0xb1e710(0x1cf)]),_0x5d5b96(_0x309f1e[_0xb1e710(0x19d)]);}_0x275858[_0xb1e710(0x19d)]&&_0x5d5b96(_0x275858[_0xb1e710(0x19d)]);if(_0x275858[_0xb1e710(0x19f)])for(const _0x3292d5 of _0x275858[_0xb1e710(0x19f)]){_0x5d5b96(_0x3292d5[_0xb1e710(0x19d)]);}return _0x550075;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x45b551,_0x76ce31){const _0x4a577a=a130_0x56c6,_0x3ae880=_0x45b551();while(!![]){try{const _0xf3ce9a=parseInt(_0x4a577a(0x224))/0x1*(-parseInt(_0x4a577a(0x22b))/0x2)+-parseInt(_0x4a577a(0x233))/0x3*(-parseInt(_0x4a577a(0x261))/0x4)+parseInt(_0x4a577a(0x256))/0x5*(parseInt(_0x4a577a(0x205))/0x6)+-parseInt(_0x4a577a(0x215))/0x7*(parseInt(_0x4a577a(0x1d1))/0x8)+-parseInt(_0x4a577a(0x1f6))/0x9+parseInt(_0x4a577a(0x1be))/0xa*(parseInt(_0x4a577a(0x265))/0xb)+-parseInt(_0x4a577a(0x1f8))/0xc;if(_0xf3ce9a===_0x76ce31)break;else _0x3ae880['push'](_0x3ae880['shift']());}catch(_0xba3898){_0x3ae880['push'](_0x3ae880['shift']());}}}(a130_0x4b67,0x73b33));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';function a130_0x4b67(){const _0x5e076f=['\x27\x20(from:\x20','JOURNEY_SCHEMA_ERROR','Journey\x20can\x20have\x20at\x20most\x20one\x20','MISSING_GOAL','merge','.steps','6671JlrpbN','startsWith','.with.condition.timeout','error','\x20steps\x20(may\x20be\x20too\x20simple)','journeys','MISSING_ENTRY_CRITERIA','type','activations','some','Decision\x20branch\x20\x27','INVALID_NEXT_REFERENCE','MISSING_EXIT_CRITERIA','values','stages[','14081Zhgndv','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','milestone','.with.variants','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','.exit_criteria[','Journey\x20name\x20is\x20required','14jdunuC','Embedded\x20segment\x20\x27','abs','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','.with','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','5151rLDpZH','every','goal','.with.condition.segment','INSUFFICIENT_STEPS','MISSING_MILESTONE','safeParse','excluded','MISSING_SEGMENT_REFERENCE','length','MISSING_ACTIVATION_REF','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','segment','.next','SINGLE_INPUT_MERGE','source','wait','.with.branches[','version','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.condition.next','.steps[','segments','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','symbol','ACTIVATION_SCHEMA_ERROR','ref:','decision_point','journeys,\x20stages,\x20or\x20versions','embeddedSegments','jump','code','data','includes','7615wBTrvD','steps','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','MISSING_STAGES','reduce','segments.','.entry_criteria','INVALID_JUMP_TARGET','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','entries','activationKeys','1512qBuNdK','.with.target','\x20with\x20latest:\x20true','.with.condition.timeout.next','3212ZGzBoK','Step\x20references\x20non-existent\x20step\x20\x27','replace','warning',').\x20Merge\x20is\x20unnecessary.','\x27\x20has\x20only\x20','INVALID_AB_TEST_PERCENTAGES','get','UNUSED_EMBEDDED_SEGMENT','journey\x20entry','Stage\x20\x27','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.exit_criteria','ab_test','\x27\x20(first\x20defined\x20at\x20steps[','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','.milestone','.rule','stepNames','23750zLBdjz','goalIsInherited','match','MERGE_TO_MERGE_CHAIN','\x27\x20with\x20no\x20action\x20in\x20between','stages','A/B\x20test\x20variant\x20\x27',').\x20Use\x20a\x20merge\x20step.','target','Criteria\x20references\x20undefined\x20segment\x20\x27','END_STEP_HAS_NEXT_OR_WITH','skipSchema','level','has','rule','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','excluded_','.with.branches','success','616BNxZmx','variants','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x20versions)','description','sort','MISSING_NAME','exit_criteria','Journey\x20has\x20','DUPLICATE_STEP_NAME','name','\x20stages\x20but\x20maximum\x20is\x20','state','Activation\x20step\x20requires\x20an\x20activation\x20reference','.type','Duplicate\x20step\x20name\x20\x27','versions','timeout\x20of\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','launched','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','size','versions[','keys','.segment','add','.with.activation','map','CONVERGENCE_WITHOUT_MERGE','referencedSegments','step\x20\x27','endsWith','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','with','percentage','path','\x27\x20has\x20no\x20end\x20step','7016670ayjBgG','Merge\x20step\x20\x27','2604864RnTjiV','MISSING_CONDITIONS','\x27\x20of\x20\x27','branches','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','condition\x20of\x20\x27','latest','message','trim','push','\x27\x20has\x20no\x20exit_criteria\x20defined','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','activation','1182hEbGcB','condition','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','timeout','document','set','entry_criteria','FEW_STEPS','next','DUPLICATE_LATEST'];a130_0x4b67=function(){return _0x5e076f;};return a130_0x4b67();}const MAX_STAGES=0x8;function createIssue(_0x1b3e05,_0x411a25,_0x10a46f,_0x1476eb,_0x297bc3,_0x27d7c6){const _0x4bf769=a130_0x56c6;return{'level':_0x1b3e05,'path':_0x411a25,'code':_0x10a46f,'message':_0x1476eb,'location':getLocationFromPath(_0x297bc3[_0x4bf769(0x209)],_0x297bc3[_0x4bf769(0x242)],pathToArray(_0x27d7c6??_0x411a25))};}function validateVersionStructure(_0x275c81,_0x26deab){const _0x1d9118=a130_0x56c6,_0x195cf3=[];return _0x275c81[_0x1d9118(0x23c)]>MAX_STAGES&&_0x195cf3[_0x1d9118(0x201)](createIssue(_0x1d9118(0x218),_0x1d9118(0x1c3),'TOO_MANY_STAGES',_0x1d9118(0x1d9)+_0x275c81[_0x1d9118(0x23c)]+_0x1d9118(0x1dc)+MAX_STAGES,_0x26deab)),_0x195cf3;}function validateStageStructure(_0x5c1a62,_0x5dfec6,_0x26e5d9,_0x307651){const _0x2b0527=a130_0x56c6,_0xd6cd8f=[],_0x38ef20=_0x2b0527(0x223)+_0x5dfec6+']';_0x5dfec6===0x0&&!_0x5c1a62[_0x2b0527(0x20b)]&&_0xd6cd8f['push'](createIssue(_0x2b0527(0x218),_0x38ef20+_0x2b0527(0x25c),_0x2b0527(0x21b),_0x2b0527(0x1b5)+_0x5c1a62[_0x2b0527(0x1db)]+_0x2b0527(0x230),_0x307651,_0x38ef20));const _0x1791b2=_0x5dfec6===_0x26e5d9-0x1;!_0x1791b2&&!_0x5c1a62[_0x2b0527(0x226)]&&_0xd6cd8f[_0x2b0527(0x201)](createIssue(_0x2b0527(0x218),_0x38ef20+_0x2b0527(0x1bb),_0x2b0527(0x238),_0x2b0527(0x1b5)+_0x5c1a62[_0x2b0527(0x1db)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x307651,_0x38ef20));(!_0x5c1a62['exit_criteria']||_0x5c1a62[_0x2b0527(0x1d8)][_0x2b0527(0x23c)]===0x0)&&_0xd6cd8f['push'](createIssue('warning',_0x38ef20+_0x2b0527(0x1b7),_0x2b0527(0x221),'Stage\x20\x27'+_0x5c1a62[_0x2b0527(0x1db)]+_0x2b0527(0x202),_0x307651,_0x38ef20));const _0x3435e9=_0x5c1a62[_0x2b0527(0x257)]?.[_0x2b0527(0x23c)]??0x0;if(_0x3435e9===0x0)_0xd6cd8f[_0x2b0527(0x201)](createIssue('error',_0x38ef20+'.steps',_0x2b0527(0x237),_0x2b0527(0x1b5)+_0x5c1a62[_0x2b0527(0x1db)]+'\x27\x20has\x20no\x20steps',_0x307651,_0x38ef20+'.steps'));else{if(_0x3435e9===0x1)_0xd6cd8f[_0x2b0527(0x201)](createIssue('warning',_0x38ef20+'.steps','INSUFFICIENT_STEPS','Stage\x20\x27'+_0x5c1a62[_0x2b0527(0x1db)]+_0x2b0527(0x246),_0x307651,_0x38ef20+_0x2b0527(0x214)));else _0x3435e9<=0x3&&_0xd6cd8f[_0x2b0527(0x201)](createIssue(_0x2b0527(0x268),_0x38ef20+_0x2b0527(0x214),_0x2b0527(0x20c),_0x2b0527(0x1b5)+_0x5c1a62['name']+_0x2b0527(0x1b0)+_0x3435e9+_0x2b0527(0x219),_0x307651,_0x38ef20+_0x2b0527(0x214)));}return _0xd6cd8f;}function validateStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69){const _0x505a15=a130_0x56c6,_0x300a77=[];if(_0x32faf1[_0x505a15(0x21c)]==='end')return _0x32faf1[_0x505a15(0x20d)]&&_0x300a77[_0x505a15(0x201)](createIssue('error',_0x51d4c0+_0x505a15(0x240),_0x505a15(0x1c8),'End\x20step\x20\x27'+_0x32faf1[_0x505a15(0x1db)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x44ce4a)),_0x505a15(0x1f2)in _0x32faf1&&_0x32faf1[_0x505a15(0x1f2)]!==undefined&&_0x300a77['push'](createIssue(_0x505a15(0x218),_0x51d4c0+_0x505a15(0x22f),_0x505a15(0x1c8),'End\x20step\x20\x27'+_0x32faf1[_0x505a15(0x1db)]+_0x505a15(0x1f1),_0x44ce4a)),_0x300a77;_0x32faf1[_0x505a15(0x20d)]&&(_0x44ce4a[_0x505a15(0x1bd)]&&!_0x44ce4a[_0x505a15(0x1bd)][_0x505a15(0x1cb)](_0x32faf1['next'])&&_0x300a77[_0x505a15(0x201)](createIssue('error',_0x51d4c0+_0x505a15(0x240),'INVALID_NEXT_REFERENCE',_0x505a15(0x266)+_0x32faf1[_0x505a15(0x20d)]+'\x27',_0x44ce4a)));switch(_0x32faf1[_0x505a15(0x21c)]){case _0x505a15(0x243):_0x300a77['push'](...validateWaitStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69));break;case _0x505a15(0x204):_0x300a77['push'](...validateActivationStep(_0x32faf1,_0x51d4c0,_0x44ce4a));break;case _0x505a15(0x24f):_0x300a77['push'](...validateDecisionPointStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69));break;case'ab_test':_0x300a77[_0x505a15(0x201)](...validateAbTestStep(_0x32faf1,_0x51d4c0,_0x44ce4a,_0x149e69));break;case _0x505a15(0x252):_0x300a77[_0x505a15(0x201)](...validateJumpStep(_0x32faf1,_0x51d4c0,_0x44ce4a));break;}return _0x300a77;}function validateWaitStep(_0xf709a3,_0x58e382,_0x557242,_0x534bdd){const _0x5ce678=a130_0x56c6,_0x51cb67=[];if(!_0xf709a3[_0x5ce678(0x1f2)])return _0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x218),_0x58e382+'.with','MISSING_WAIT_PARAMS',_0x5ce678(0x1cd),_0x557242,_0x58e382)),_0x51cb67;if(_0xf709a3['with']['condition']){const _0x55fef7=_0xf709a3[_0x5ce678(0x1f2)][_0x5ce678(0x206)];if(_0x55fef7['segment']){_0x557242[_0x5ce678(0x1ee)]?.[_0x5ce678(0x1ea)](_0x55fef7[_0x5ce678(0x23f)]);!_0x55fef7['segment']['startsWith']('ref:')&&(_0x557242[_0x5ce678(0x251)]&&!_0x557242[_0x5ce678(0x251)][_0x5ce678(0x1cb)](_0x55fef7[_0x5ce678(0x23f)])&&_0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x218),_0x58e382+_0x5ce678(0x236),_0x5ce678(0x23b),_0x5ce678(0x1d3)+_0x55fef7[_0x5ce678(0x23f)]+_0x5ce678(0x258),_0x557242)));_0x55fef7['next']&&_0x557242[_0x5ce678(0x1bd)]&&!_0x557242[_0x5ce678(0x1bd)]['has'](_0x55fef7['next'])&&_0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x218),_0x58e382+_0x5ce678(0x248),_0x5ce678(0x220),_0x5ce678(0x232)+_0x55fef7[_0x5ce678(0x20d)]+'\x27',_0x557242));_0x55fef7[_0x5ce678(0x208)]?.['next']&&_0x557242[_0x5ce678(0x1bd)]&&!_0x557242[_0x5ce678(0x1bd)]['has'](_0x55fef7['timeout']['next'])&&_0x51cb67[_0x5ce678(0x201)](createIssue('error',_0x58e382+_0x5ce678(0x264),_0x5ce678(0x220),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x55fef7['timeout']['next']+'\x27',_0x557242));const _0x2a3273=_0x55fef7[_0x5ce678(0x20d)]||_0xf709a3[_0x5ce678(0x20d)],_0x41cca5=_0x55fef7[_0x5ce678(0x208)]?.[_0x5ce678(0x20d)]||_0xf709a3['next'];if(_0x2a3273){const _0x5d2cbc=_0x534bdd[_0x5ce678(0x1b2)](_0x2a3273);_0x5d2cbc?.[_0x5ce678(0x21c)]===_0x5ce678(0x213)&&_0x51cb67[_0x5ce678(0x201)](createIssue(_0x5ce678(0x268),_0x58e382+_0x5ce678(0x248),'BRANCH_DIRECTLY_TO_MERGE',_0x5ce678(0x247)+_0x2a3273+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x557242,_0x58e382+'.with.condition'));}if(_0x41cca5){const _0x306f56=_0x534bdd[_0x5ce678(0x1b2)](_0x41cca5);_0x306f56?.[_0x5ce678(0x21c)]===_0x5ce678(0x213)&&_0x51cb67['push'](createIssue(_0x5ce678(0x268),_0x58e382+'.with.condition.timeout.next',_0x5ce678(0x231),_0x5ce678(0x1b6)+_0x41cca5+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x557242,_0x58e382+_0x5ce678(0x217)));}}}return _0x51cb67;}function validateActivationStep(_0x491187,_0xbd4f4a,_0x4926dd){const _0x4678ba=a130_0x56c6,_0xf2180b=[];if(!_0x491187[_0x4678ba(0x1f2)]?.[_0x4678ba(0x204)])return _0xf2180b[_0x4678ba(0x201)](createIssue(_0x4678ba(0x218),_0xbd4f4a+_0x4678ba(0x1eb),_0x4678ba(0x23d),_0x4678ba(0x1de),_0x4926dd,_0xbd4f4a)),_0xf2180b;const _0x5b9162=_0x491187['with'][_0x4678ba(0x204)];return _0x4926dd[_0x4678ba(0x260)]&&!_0x5b9162[_0x4678ba(0x216)]('ref:')&&(!_0x4926dd['activationKeys'][_0x4678ba(0x1cb)](_0x5b9162)&&_0xf2180b[_0x4678ba(0x201)](createIssue(_0x4678ba(0x218),_0xbd4f4a+_0x4678ba(0x1eb),'MISSING_ACTIVATION_DEFINITION',_0x4678ba(0x203)+_0x5b9162+_0x4678ba(0x25e),_0x4926dd))),_0xf2180b;}function validateDecisionPointStep(_0x591cb1,_0x3b7a04,_0x3ff811,_0x2ed8db){const _0x4414e7=a130_0x56c6,_0x531f4e=[];if(!_0x591cb1[_0x4414e7(0x1f2)]?.[_0x4414e7(0x1fb)]||_0x591cb1[_0x4414e7(0x1f2)][_0x4414e7(0x1fb)][_0x4414e7(0x23c)]===0x0)return _0x531f4e[_0x4414e7(0x201)](createIssue(_0x4414e7(0x218),_0x3b7a04+_0x4414e7(0x1cf),'MISSING_CONDITIONS',_0x4414e7(0x207),_0x3ff811,_0x3b7a04)),_0x531f4e;for(let _0x4c6cf6=0x0;_0x4c6cf6<_0x591cb1['with'][_0x4414e7(0x1fb)]['length'];_0x4c6cf6++){const _0x1b3011=_0x591cb1[_0x4414e7(0x1f2)][_0x4414e7(0x1fb)][_0x4c6cf6],_0xa7bff5=_0x3b7a04+_0x4414e7(0x244)+_0x4c6cf6+']';_0x1b3011[_0x4414e7(0x23f)]&&!_0x1b3011[_0x4414e7(0x23a)]&&(_0x3ff811[_0x4414e7(0x1ee)]?.[_0x4414e7(0x1ea)](_0x1b3011['segment']),!_0x1b3011['segment']['startsWith'](_0x4414e7(0x24e))&&(_0x3ff811[_0x4414e7(0x251)]&&!_0x3ff811['embeddedSegments'][_0x4414e7(0x1cb)](_0x1b3011[_0x4414e7(0x23f)])&&_0x531f4e['push'](createIssue('error',_0xa7bff5+'.segment','MISSING_SEGMENT_REFERENCE',_0x4414e7(0x1ba)+_0x1b3011[_0x4414e7(0x23f)]+'\x27',_0x3ff811))));_0x1b3011['next']&&_0x3ff811[_0x4414e7(0x1bd)]&&!_0x3ff811[_0x4414e7(0x1bd)][_0x4414e7(0x1cb)](_0x1b3011[_0x4414e7(0x20d)])&&_0x531f4e[_0x4414e7(0x201)](createIssue('error',_0xa7bff5+_0x4414e7(0x240),_0x4414e7(0x220),_0x4414e7(0x22e)+_0x1b3011[_0x4414e7(0x20d)]+'\x27',_0x3ff811));if(_0x1b3011[_0x4414e7(0x20d)]){const _0x381d23=_0x2ed8db[_0x4414e7(0x1b2)](_0x1b3011['next']);_0x381d23?.['type']===_0x4414e7(0x213)&&_0x531f4e['push'](createIssue(_0x4414e7(0x268),_0xa7bff5+'.next',_0x4414e7(0x231),_0x4414e7(0x21f)+_0x1b3011[_0x4414e7(0x1db)]+_0x4414e7(0x1e3)+_0x1b3011['next']+_0x4414e7(0x1c2),_0x3ff811));}}return _0x531f4e;}function validateAbTestStep(_0x3affd4,_0xcd5d3d,_0x5ac78e,_0x1302a1){const _0x90b0e2=a130_0x56c6,_0x27000c=[];if(!_0x3affd4[_0x90b0e2(0x1f2)]?.[_0x90b0e2(0x1d2)]||_0x3affd4[_0x90b0e2(0x1f2)][_0x90b0e2(0x1d2)][_0x90b0e2(0x23c)]===0x0)return _0x27000c[_0x90b0e2(0x201)](createIssue(_0x90b0e2(0x218),_0xcd5d3d+_0x90b0e2(0x227),_0x90b0e2(0x1f9),_0x90b0e2(0x225),_0x5ac78e,_0xcd5d3d)),_0x27000c;const _0xcf8087=_0x3affd4[_0x90b0e2(0x1f2)][_0x90b0e2(0x1d2)][_0x90b0e2(0x25a)]((_0x1b9246,_0x1c8f2a)=>_0x1b9246+(_0x1c8f2a[_0x90b0e2(0x1f3)]||0x0),0x0);Math[_0x90b0e2(0x22d)](_0xcf8087-0x64)>0.01&&_0x27000c[_0x90b0e2(0x201)](createIssue('error',_0xcd5d3d+_0x90b0e2(0x227),_0x90b0e2(0x1b1),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0xcf8087+'%)',_0x5ac78e));for(let _0x136095=0x0;_0x136095<_0x3affd4[_0x90b0e2(0x1f2)]['variants'][_0x90b0e2(0x23c)];_0x136095++){const _0x5689f0=_0x3affd4[_0x90b0e2(0x1f2)][_0x90b0e2(0x1d2)][_0x136095],_0x1f8323=_0xcd5d3d+'.with.variants['+_0x136095+']';_0x5689f0['next']&&_0x5ac78e[_0x90b0e2(0x1bd)]&&!_0x5ac78e[_0x90b0e2(0x1bd)][_0x90b0e2(0x1cb)](_0x5689f0[_0x90b0e2(0x20d)])&&_0x27000c[_0x90b0e2(0x201)](createIssue(_0x90b0e2(0x218),_0x1f8323+_0x90b0e2(0x240),_0x90b0e2(0x220),_0x90b0e2(0x1fc)+_0x5689f0[_0x90b0e2(0x20d)]+'\x27',_0x5ac78e));if(_0x5689f0[_0x90b0e2(0x20d)]){const _0xc6f564=_0x1302a1[_0x90b0e2(0x1b2)](_0x5689f0[_0x90b0e2(0x20d)]);_0xc6f564?.['type']==='merge'&&_0x27000c[_0x90b0e2(0x201)](createIssue('warning',_0x1f8323+_0x90b0e2(0x240),_0x90b0e2(0x231),_0x90b0e2(0x1c4)+_0x5689f0[_0x90b0e2(0x1db)]+_0x90b0e2(0x1e3)+_0x5689f0[_0x90b0e2(0x20d)]+_0x90b0e2(0x1c2),_0x5ac78e));}}return _0x27000c;}function validateJumpStep(_0x2d5b88,_0xb50163,_0x608c55){const _0x24825b=a130_0x56c6,_0x1c8cb8=[];if(!_0x2d5b88[_0x24825b(0x1f2)]?.[_0x24825b(0x1c6)])return _0x1c8cb8[_0x24825b(0x201)](createIssue(_0x24825b(0x218),_0xb50163+_0x24825b(0x262),_0x24825b(0x25d),'Jump\x20step\x20requires\x20a\x20target',_0x608c55,_0xb50163)),_0x1c8cb8;return(!_0x2d5b88[_0x24825b(0x1f2)][_0x24825b(0x1c6)]['journey']||!_0x2d5b88[_0x24825b(0x1f2)][_0x24825b(0x1c6)]['stage'])&&_0x1c8cb8[_0x24825b(0x201)](createIssue('error',_0xb50163+_0x24825b(0x262),_0x24825b(0x25d),_0x24825b(0x1e5),_0x608c55)),_0x1c8cb8;}function buildConvergenceMap(_0x5eda47){const _0x22a4a0=a130_0x56c6,_0x2a6165=new Map();function _0x57ca0c(_0x5265bb,_0x1dadcd){const _0x452f39=a130_0x56c6,_0x79a1c8=_0x2a6165[_0x452f39(0x1b2)](_0x5265bb)||[];_0x79a1c8[_0x452f39(0x201)](_0x1dadcd),_0x2a6165[_0x452f39(0x20a)](_0x5265bb,_0x79a1c8);}for(const _0x75698a of _0x5eda47){_0x75698a['next']&&_0x57ca0c(_0x75698a[_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':_0x22a4a0(0x1ef)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'});if(_0x75698a[_0x22a4a0(0x21c)]===_0x22a4a0(0x24f)&&_0x75698a[_0x22a4a0(0x1f2)]?.[_0x22a4a0(0x1fb)])for(const _0x5dbad1 of _0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x1fb)]){_0x5dbad1['next']&&_0x57ca0c(_0x5dbad1[_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':'branch\x20\x27'+_0x5dbad1[_0x22a4a0(0x1db)]+_0x22a4a0(0x1fa)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'});}if(_0x75698a['type']===_0x22a4a0(0x1b8)&&_0x75698a[_0x22a4a0(0x1f2)]?.['variants'])for(const _0x15a779 of _0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x1d2)]){_0x15a779[_0x22a4a0(0x20d)]&&_0x57ca0c(_0x15a779[_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':'variant\x20\x27'+_0x15a779[_0x22a4a0(0x1db)]+_0x22a4a0(0x1fa)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'});}_0x75698a['type']===_0x22a4a0(0x243)&&_0x75698a['with']?.[_0x22a4a0(0x206)]&&(_0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x206)][_0x22a4a0(0x20d)]&&_0x57ca0c(_0x75698a['with']['condition'][_0x22a4a0(0x20d)],{'stepName':_0x75698a['name'],'description':_0x22a4a0(0x1fd)+_0x75698a['name']+'\x27'}),_0x75698a['with'][_0x22a4a0(0x206)]['timeout']?.[_0x22a4a0(0x20d)]&&_0x57ca0c(_0x75698a[_0x22a4a0(0x1f2)][_0x22a4a0(0x206)][_0x22a4a0(0x208)][_0x22a4a0(0x20d)],{'stepName':_0x75698a[_0x22a4a0(0x1db)],'description':_0x22a4a0(0x1e2)+_0x75698a[_0x22a4a0(0x1db)]+'\x27'}));}return _0x2a6165;}function validateFlowControl(_0x7b65e3,_0x25da8b,_0x318b75){const _0x2de7e5=a130_0x56c6,_0x26e86a=[],_0x7e97b7=_0x2de7e5(0x223)+_0x25da8b+']',_0x5a1db6=_0x7b65e3[_0x2de7e5(0x257)]||[];if(_0x5a1db6[_0x2de7e5(0x23c)]===0x0)return _0x26e86a;const _0x4a4fff=new Map();for(const _0x2464eb of _0x5a1db6){_0x2464eb[_0x2de7e5(0x1db)]&&_0x4a4fff['set'](_0x2464eb[_0x2de7e5(0x1db)],_0x2464eb);}const _0x32de3c=buildConvergenceMap(_0x5a1db6),_0x19da62=_0x5a1db6[_0x2de7e5(0x21e)](_0x51b163=>_0x51b163[_0x2de7e5(0x21c)]==='end');!_0x19da62&&_0x26e86a[_0x2de7e5(0x201)](createIssue(_0x2de7e5(0x218),_0x7e97b7+'.steps','MISSING_END_STEP','Stage\x20\x27'+_0x7b65e3[_0x2de7e5(0x1db)]+_0x2de7e5(0x1f5),_0x318b75));for(const [_0x40e96f,_0x49b160]of _0x32de3c){const _0x3d6bb1=_0x4a4fff[_0x2de7e5(0x1b2)](_0x40e96f);if(!_0x3d6bb1)continue;if(_0x49b160[_0x2de7e5(0x23c)]>0x1&&_0x3d6bb1[_0x2de7e5(0x21c)]!==_0x2de7e5(0x213)){const _0x11dce4=_0x49b160[_0x2de7e5(0x1ec)](_0x5887c5=>_0x5887c5[_0x2de7e5(0x1d5)])['join'](',\x20');_0x26e86a['push'](createIssue(_0x2de7e5(0x218),_0x7e97b7+_0x2de7e5(0x214),_0x2de7e5(0x1ed),_0x2de7e5(0x23e)+_0x40e96f+_0x2de7e5(0x20f)+_0x11dce4+_0x2de7e5(0x1c5),_0x318b75));}_0x49b160[_0x2de7e5(0x23c)]===0x1&&_0x3d6bb1[_0x2de7e5(0x21c)]===_0x2de7e5(0x213)&&_0x26e86a['push'](createIssue(_0x2de7e5(0x268),_0x7e97b7+_0x2de7e5(0x214),_0x2de7e5(0x241),_0x2de7e5(0x1f7)+_0x40e96f+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x49b160[0x0][_0x2de7e5(0x1d5)]+_0x2de7e5(0x269),_0x318b75));}for(const _0x4a7ca4 of _0x5a1db6){if(_0x4a7ca4['type']===_0x2de7e5(0x213)&&_0x4a7ca4[_0x2de7e5(0x20d)]){const _0x1abe97=_0x4a4fff[_0x2de7e5(0x1b2)](_0x4a7ca4[_0x2de7e5(0x20d)]);_0x1abe97?.[_0x2de7e5(0x21c)]===_0x2de7e5(0x213)&&_0x26e86a[_0x2de7e5(0x201)](createIssue(_0x2de7e5(0x218),_0x7e97b7+_0x2de7e5(0x214),_0x2de7e5(0x1c1),_0x2de7e5(0x1f7)+_0x4a7ca4['name']+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x4a7ca4['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x318b75));}}return _0x26e86a;}function validateCriteria(_0x1a32da,_0x27b89e,_0x1ebb45){const _0x4c4cd7=a130_0x56c6,_0x1c4ed7=[];return _0x1a32da[_0x4c4cd7(0x23f)]&&(_0x1ebb45[_0x4c4cd7(0x1ee)]?.[_0x4c4cd7(0x1ea)](_0x1a32da['segment']),!_0x1a32da[_0x4c4cd7(0x23f)][_0x4c4cd7(0x216)](_0x4c4cd7(0x24e))&&(_0x1ebb45[_0x4c4cd7(0x251)]&&!_0x1ebb45[_0x4c4cd7(0x251)][_0x4c4cd7(0x1cb)](_0x1a32da[_0x4c4cd7(0x23f)])&&_0x1c4ed7['push'](createIssue(_0x4c4cd7(0x218),_0x27b89e+_0x4c4cd7(0x1e9),'MISSING_SEGMENT_REFERENCE',_0x4c4cd7(0x1c7)+_0x1a32da['segment']+'\x27',_0x1ebb45)))),_0x1c4ed7;}function validateEmbeddedSegment(_0x40d1da,_0x11c7e6,_0x42ea26){const _0x13850e=a130_0x56c6,_0x39f53f=[];return _0x40d1da[_0x13850e(0x1cc)]&&_0x39f53f[_0x13850e(0x201)](...validateRuleDef(_0x40d1da[_0x13850e(0x1cc)],_0x11c7e6+_0x13850e(0x1bc),_0x42ea26)),_0x39f53f;}function validateStage(_0x92fe98,_0x5992a3,_0x447f3c,_0x163b89){const _0x54eb8d=a130_0x56c6,_0x320663=[],_0x202da8=_0x54eb8d(0x223)+_0x5992a3+']',_0x40ee53=new Map(),_0x414221=new Map();if(_0x92fe98[_0x54eb8d(0x257)]){for(let _0x3fc2b9=0x0;_0x3fc2b9<_0x92fe98[_0x54eb8d(0x257)]['length'];_0x3fc2b9++){const _0x550bf2=_0x92fe98[_0x54eb8d(0x257)][_0x3fc2b9];_0x550bf2[_0x54eb8d(0x1db)]&&_0x40ee53[_0x54eb8d(0x20a)](_0x550bf2[_0x54eb8d(0x1db)],_0x550bf2);}for(let _0x38cbb4=0x0;_0x38cbb4<_0x92fe98[_0x54eb8d(0x257)][_0x54eb8d(0x23c)];_0x38cbb4++){const _0x3f7cfa=_0x92fe98[_0x54eb8d(0x257)][_0x38cbb4],_0x304872=_0x202da8+_0x54eb8d(0x249)+_0x38cbb4+']';if(_0x3f7cfa['name']){if(_0x414221[_0x54eb8d(0x1cb)](_0x3f7cfa[_0x54eb8d(0x1db)])){const _0x26d2ac=_0x414221[_0x54eb8d(0x1b2)](_0x3f7cfa[_0x54eb8d(0x1db)]);_0x320663[_0x54eb8d(0x201)](createIssue(_0x54eb8d(0x218),_0x304872+'.name',_0x54eb8d(0x1da),_0x54eb8d(0x1e0)+_0x3f7cfa[_0x54eb8d(0x1db)]+_0x54eb8d(0x1b9)+_0x26d2ac+'])',_0x163b89));}else _0x414221[_0x54eb8d(0x20a)](_0x3f7cfa[_0x54eb8d(0x1db)],_0x38cbb4);}_0x320663[_0x54eb8d(0x201)](...validateStep(_0x3f7cfa,_0x304872,_0x163b89,_0x40ee53));}}_0x92fe98['entry_criteria']&&_0x320663[_0x54eb8d(0x201)](...validateCriteria(_0x92fe98['entry_criteria'],_0x202da8+'.entry_criteria',_0x163b89));if(_0x92fe98[_0x54eb8d(0x1d8)])for(let _0x4f6ffb=0x0;_0x4f6ffb<_0x92fe98[_0x54eb8d(0x1d8)][_0x54eb8d(0x23c)];_0x4f6ffb++){_0x320663['push'](...validateCriteria(_0x92fe98[_0x54eb8d(0x1d8)][_0x4f6ffb],_0x202da8+_0x54eb8d(0x229)+_0x4f6ffb+']',_0x163b89));}return _0x92fe98[_0x54eb8d(0x226)]&&_0x320663[_0x54eb8d(0x201)](...validateCriteria(_0x92fe98['milestone'],_0x202da8+_0x54eb8d(0x1bb),_0x163b89)),_0x320663[_0x54eb8d(0x201)](...validateStageStructure(_0x92fe98,_0x5992a3,_0x447f3c,_0x163b89)),_0x320663[_0x54eb8d(0x201)](...validateFlowControl(_0x92fe98,_0x5992a3,_0x163b89)),_0x320663;}function validateStagesForVersion(_0x583f75,_0x2eec0e,_0x1fab0b,_0x5b8f75,_0x33aa18,_0x3c7047,_0x1c1e04){const _0x13e0c2=a130_0x56c6;if(_0x583f75[_0x13e0c2(0x23c)]===0x0){_0x33aa18[_0x13e0c2(0x201)]({'level':_0x13e0c2(0x218),'path':_0x5b8f75+'stages','code':_0x13e0c2(0x259),'message':_0x13e0c2(0x228),'location':getLocationFromPath(_0x1fab0b['document'],_0x1fab0b[_0x13e0c2(0x242)],[_0x13e0c2(0x1c3)])});return;}const _0x5c26df=new Set();for(const _0xd6ba29 of _0x583f75){if(_0xd6ba29[_0x13e0c2(0x257)])for(const _0x24bef0 of _0xd6ba29[_0x13e0c2(0x257)]){_0x24bef0[_0x13e0c2(0x1db)]&&_0x5c26df[_0x13e0c2(0x1ea)](_0x24bef0[_0x13e0c2(0x1db)]);}}const _0x3ae15f={..._0x1fab0b,'stepNames':_0x5c26df},_0xd74d32=validateVersionStructure(_0x583f75,_0x3ae15f);for(const _0x325618 of _0xd74d32){const _0x449dc5=_0x5b8f75?{..._0x325618,'path':''+_0x5b8f75+_0x325618[_0x13e0c2(0x1f4)]}:_0x325618;if(_0x449dc5[_0x13e0c2(0x1ca)]===_0x13e0c2(0x218))_0x33aa18[_0x13e0c2(0x201)](_0x449dc5);else _0x3c7047[_0x13e0c2(0x201)](_0x449dc5);}for(let _0x97d7b8=0x0;_0x97d7b8<_0x583f75[_0x13e0c2(0x23c)];_0x97d7b8++){const _0xaf43fa=validateStage(_0x583f75[_0x97d7b8],_0x97d7b8,_0x583f75[_0x13e0c2(0x23c)],_0x3ae15f);for(const _0x1e7eb7 of _0xaf43fa){const _0x33d163=_0x5b8f75?{..._0x1e7eb7,'path':''+_0x5b8f75+_0x1e7eb7[_0x13e0c2(0x1f4)]}:_0x1e7eb7;if(_0x33d163[_0x13e0c2(0x1ca)]===_0x13e0c2(0x218))_0x33aa18[_0x13e0c2(0x201)](_0x33d163);else _0x3c7047[_0x13e0c2(0x201)](_0x33d163);}}if(_0x2eec0e['goal']){const _0x2bff43=_0x1c1e04?.[_0x13e0c2(0x1bf)]?'goal':_0x5b8f75+_0x13e0c2(0x235),_0x22b8ac=validateCriteria(_0x2eec0e[_0x13e0c2(0x235)],_0x2bff43,_0x3ae15f);for(const _0x575dbf of _0x22b8ac){if(_0x575dbf[_0x13e0c2(0x1ca)]===_0x13e0c2(0x218))_0x33aa18[_0x13e0c2(0x201)](_0x575dbf);else _0x3c7047[_0x13e0c2(0x201)](_0x575dbf);}}}function a130_0x56c6(_0x50f8be,_0x2395d5){_0x50f8be=_0x50f8be-0x1b0;const _0x4b6765=a130_0x4b67();let _0x56c6f6=_0x4b6765[_0x50f8be];return _0x56c6f6;}function extractVersionIndex(_0x461598){const _0x3430c0=a130_0x56c6,_0x5b3064=_0x461598[_0x3430c0(0x1c0)](/^journeys\[(\d+)\]\./);return _0x5b3064?_0x5b3064[0x1]:undefined;}function deduplicateAcrossVersions(_0x2b0d17){const _0x54ef10=a130_0x56c6,_0x19a44c=new Map();for(let _0x584fd1=0x0;_0x584fd1<_0x2b0d17[_0x54ef10(0x23c)];_0x584fd1++){const _0x3d517c=_0x2b0d17[_0x584fd1][_0x54ef10(0x253)]+':'+_0x2b0d17[_0x584fd1]['message'],_0x4deab9=extractVersionIndex(_0x2b0d17[_0x584fd1][_0x54ef10(0x1f4)]),_0xebcb73=_0x19a44c['get'](_0x3d517c);if(_0xebcb73){_0xebcb73['indices'][_0x54ef10(0x201)](_0x584fd1);if(_0x4deab9)_0xebcb73[_0x54ef10(0x1e1)]['add'](_0x4deab9);}else _0x19a44c[_0x54ef10(0x20a)](_0x3d517c,{'indices':[_0x584fd1],'versions':new Set(_0x4deab9?[_0x4deab9]:[])});}const _0x218b7c=new Set();for(const {indices:_0x58b19c,versions:_0x6d1fb2}of _0x19a44c[_0x54ef10(0x222)]()){if(_0x6d1fb2[_0x54ef10(0x1e6)]<=0x1)continue;const _0x36823b=_0x2b0d17[_0x58b19c[0x0]];_0x36823b[_0x54ef10(0x1f4)]=_0x36823b[_0x54ef10(0x1f4)][_0x54ef10(0x267)](/^journeys\[\d+\]\./,''),_0x36823b[_0x54ef10(0x1ff)]=_0x36823b[_0x54ef10(0x1ff)]+'\x20(across\x20'+_0x6d1fb2[_0x54ef10(0x1e6)]+_0x54ef10(0x1d4);for(let _0x529c4e=0x1;_0x529c4e<_0x58b19c[_0x54ef10(0x23c)];_0x529c4e++){_0x218b7c[_0x54ef10(0x1ea)](_0x58b19c[_0x529c4e]);}}const _0x511be2=[..._0x218b7c][_0x54ef10(0x1d6)]((_0x5d0383,_0x1cff23)=>_0x1cff23-_0x5d0383);for(const _0x14711d of _0x511be2){_0x2b0d17['splice'](_0x14711d,0x1);}}export function validateJourneyDef(_0x38932b,_0x2f9765={},_0xe14266={}){const _0x12abd0=a130_0x56c6;if(_0xe14266[_0x12abd0(0x1c9)])return runJourneySemanticChecks(_0x38932b,_0x2f9765);const _0x360808=JourneyDefSchema[_0x12abd0(0x239)](_0x38932b);if(_0x360808[_0x12abd0(0x1d0)])return runJourneySemanticChecks(_0x360808[_0x12abd0(0x254)],_0x2f9765);return zodErrorsToJourneyValidationResult(_0x360808[_0x12abd0(0x218)],_0x2f9765);}function zodErrorsToJourneyValidationResult(_0x50cbbe,_0x195973){const _0x1166f6=a130_0x56c6,_0x9d9d60=flattenZodIssues(_0x50cbbe['issues']),_0x1a461e=_0x9d9d60[_0x1166f6(0x1ec)](_0x7a6d08=>{const _0x606086=_0x1166f6,_0x33799a=formatZodPath(_0x7a6d08['path']),_0x224445=mapJourneyZodIssueToCode(_0x7a6d08,_0x33799a),_0x31b6ce=getLocationFromPath(_0x195973[_0x606086(0x209)],_0x195973[_0x606086(0x242)],_0x7a6d08[_0x606086(0x1f4)]['map'](_0x551ae0=>typeof _0x551ae0===_0x606086(0x24c)?String(_0x551ae0):_0x551ae0));return{'level':_0x606086(0x218),'path':_0x33799a,'code':_0x224445,'message':_0x7a6d08[_0x606086(0x1ff)],..._0x31b6ce&&{'location':_0x31b6ce}};});return{'valid':![],'errors':_0x1a461e,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2e9cfb,_0x3f3234){const _0x367455=a130_0x56c6;if(_0x3f3234===_0x367455(0x1db))return _0x367455(0x1d7);if(_0x3f3234[_0x367455(0x1f0)](_0x367455(0x1df))&&_0x3f3234['includes'](_0x367455(0x257)))return _0x367455(0x210);if(_0x3f3234==='stages'||_0x3f3234['endsWith']('.stages'))return'MISSING_STAGES';if(_0x3f3234===''&&_0x2e9cfb[_0x367455(0x1ff)][_0x367455(0x255)](_0x367455(0x250)))return _0x367455(0x259);if(_0x3f3234[_0x367455(0x255)]('activation'))return _0x367455(0x24d);return _0x367455(0x210);}function runJourneySemanticChecks(_0x28b628,_0x37f364){const _0xcd5dd0=a130_0x56c6,_0x110149=[],_0x4d0ac2=[];(!_0x28b628[_0xcd5dd0(0x1db)]||_0x28b628[_0xcd5dd0(0x1db)][_0xcd5dd0(0x200)]()==='')&&_0x110149[_0xcd5dd0(0x201)]({'level':_0xcd5dd0(0x218),'path':_0xcd5dd0(0x1db),'code':_0xcd5dd0(0x1d7),'message':_0xcd5dd0(0x22a),'location':getLocationFromPath(_0x37f364['document'],_0x37f364[_0xcd5dd0(0x242)],[_0xcd5dd0(0x1db)])});const _0x5cc383=new Set();if(_0x28b628[_0xcd5dd0(0x24a)])for(const _0x2e81ae of Object[_0xcd5dd0(0x1e8)](_0x28b628[_0xcd5dd0(0x24a)])){_0x5cc383[_0xcd5dd0(0x1ea)](_0x2e81ae);}const _0x50e0a6=new Set();if(_0x28b628[_0xcd5dd0(0x21d)])for(const _0x40058d of Object[_0xcd5dd0(0x1e8)](_0x28b628[_0xcd5dd0(0x21d)])){_0x50e0a6[_0xcd5dd0(0x1ea)](_0x40058d);}const _0x222f53=new Set(),_0x4d72f4={..._0x37f364,'embeddedSegments':_0x5cc383,'referencedSegments':_0x222f53,'activationKeys':_0x50e0a6[_0xcd5dd0(0x1e6)]>0x0?_0x50e0a6:undefined};if(_0x28b628[_0xcd5dd0(0x24a)])for(const [_0x4043fb,_0x276bb4]of Object[_0xcd5dd0(0x25f)](_0x28b628[_0xcd5dd0(0x24a)])){const _0x1b1ae2=validateEmbeddedSegment(_0x276bb4,_0xcd5dd0(0x25b)+_0x4043fb,_0x4d72f4);for(const _0xd668d3 of _0x1b1ae2){if(_0xd668d3[_0xcd5dd0(0x1ca)]===_0xcd5dd0(0x218))_0x110149[_0xcd5dd0(0x201)](_0xd668d3);else _0x4d0ac2[_0xcd5dd0(0x201)](_0xd668d3);}}const _0x54c9d3=!!_0x28b628['goal'],_0x3969c4=_0x28b628[_0xcd5dd0(0x21a)]?.[_0xcd5dd0(0x234)](_0x390672=>!!_0x390672['goal'])??![];!_0x54c9d3&&!_0x3969c4&&_0x4d0ac2[_0xcd5dd0(0x201)]({'level':'warning','path':_0xcd5dd0(0x235),'code':_0xcd5dd0(0x212),'message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x37f364[_0xcd5dd0(0x209)],_0x37f364[_0xcd5dd0(0x242)],[_0xcd5dd0(0x235)])});const _0x515dbd=_0x28b628[_0xcd5dd0(0x21a)]??_0x28b628[_0xcd5dd0(0x1e1)];if(_0x515dbd&&_0x515dbd['filter'](_0x1cd0c9=>_0x1cd0c9[_0xcd5dd0(0x1fe)]===!![])[_0xcd5dd0(0x23c)]>0x1){const _0x549c0e=_0x28b628[_0xcd5dd0(0x21a)]?'journeys':_0xcd5dd0(0x1e1);_0x110149['push']({'level':_0xcd5dd0(0x218),'path':_0x549c0e,'code':_0xcd5dd0(0x20e),'message':_0xcd5dd0(0x211)+(_0x549c0e==='journeys'?_0xcd5dd0(0x1b4):_0xcd5dd0(0x245))+_0xcd5dd0(0x263),'location':getLocationFromPath(_0x37f364[_0xcd5dd0(0x209)],_0x37f364[_0xcd5dd0(0x242)],[_0x549c0e])});}if(_0x28b628[_0xcd5dd0(0x21a)]&&_0x28b628[_0xcd5dd0(0x21a)][_0xcd5dd0(0x23c)]>0x0)for(let _0x4eb884=0x0;_0x4eb884<_0x28b628[_0xcd5dd0(0x21a)][_0xcd5dd0(0x23c)];_0x4eb884++){const _0x1e5150=_0x28b628[_0xcd5dd0(0x21a)][_0x4eb884];if(_0x28b628[_0xcd5dd0(0x21a)][_0xcd5dd0(0x23c)]>0x1&&_0x1e5150[_0xcd5dd0(0x1dd)]===_0xcd5dd0(0x1e4))continue;const _0xffa4ce=_0x1e5150['stages']||[],_0x83609c='journeys['+_0x4eb884+'].',_0x3e2785=!!_0x1e5150[_0xcd5dd0(0x235)],_0x40723c=_0x3e2785?{..._0x28b628,'goal':_0x1e5150[_0xcd5dd0(0x235)]}:_0x28b628;validateStagesForVersion(_0xffa4ce,_0x40723c,_0x4d72f4,_0x83609c,_0x110149,_0x4d0ac2,{'goalIsInherited':!_0x3e2785});}else{if(_0x28b628[_0xcd5dd0(0x1e1)]&&_0x28b628['versions'][_0xcd5dd0(0x23c)]>0x0)for(let _0x7cfd5a=0x0;_0x7cfd5a<_0x28b628[_0xcd5dd0(0x1e1)][_0xcd5dd0(0x23c)];_0x7cfd5a++){const _0x39b402=_0x28b628[_0xcd5dd0(0x1e1)][_0x7cfd5a];if(_0x28b628[_0xcd5dd0(0x1e1)][_0xcd5dd0(0x23c)]>0x1&&_0x39b402[_0xcd5dd0(0x1dd)]==='launched')continue;const _0x4bb9d0=_0x39b402[_0xcd5dd0(0x1c3)]||[],_0xb08b0d=_0xcd5dd0(0x1e7)+_0x7cfd5a+'].';validateStagesForVersion(_0x4bb9d0,_0x28b628,_0x4d72f4,_0xb08b0d,_0x110149,_0x4d0ac2);}else{const _0x26ccf1=_0x28b628['stages']||[];validateStagesForVersion(_0x26ccf1,_0x28b628,_0x4d72f4,'',_0x110149,_0x4d0ac2);}}_0x28b628[_0xcd5dd0(0x21a)]&&_0x28b628[_0xcd5dd0(0x21a)]['length']>0x1&&(deduplicateAcrossVersions(_0x110149),deduplicateAcrossVersions(_0x4d0ac2));for(const _0x570cab of _0x5cc383){!_0x222f53['has'](_0x570cab)&&!_0x570cab[_0xcd5dd0(0x216)](_0xcd5dd0(0x1ce))&&_0x4d0ac2[_0xcd5dd0(0x201)]({'level':_0xcd5dd0(0x268),'path':_0xcd5dd0(0x25b)+_0x570cab,'code':_0xcd5dd0(0x1b3),'message':_0xcd5dd0(0x22c)+_0x570cab+_0xcd5dd0(0x24b),'location':getLocationFromPath(_0x37f364[_0xcd5dd0(0x209)],_0x37f364[_0xcd5dd0(0x242)],[_0xcd5dd0(0x24a),_0x570cab])});}return{'valid':_0x110149[_0xcd5dd0(0x23c)]===0x0,'errors':_0x110149,'warnings':_0x4d0ac2};}
|
|
1
|
+
(function(_0x2b9f8c,_0x5077b8){const _0x3f7f11=a130_0x3d22,_0x1aa8e0=_0x2b9f8c();while(!![]){try{const _0x36b317=parseInt(_0x3f7f11(0x1f9))/0x1+-parseInt(_0x3f7f11(0x1cc))/0x2*(-parseInt(_0x3f7f11(0x1ba))/0x3)+-parseInt(_0x3f7f11(0x1f8))/0x4+-parseInt(_0x3f7f11(0x1b7))/0x5+parseInt(_0x3f7f11(0x17f))/0x6+-parseInt(_0x3f7f11(0x1ef))/0x7*(parseInt(_0x3f7f11(0x18e))/0x8)+parseInt(_0x3f7f11(0x194))/0x9;if(_0x36b317===_0x5077b8)break;else _0x1aa8e0['push'](_0x1aa8e0['shift']());}catch(_0x2abf63){_0x1aa8e0['push'](_0x1aa8e0['shift']());}}}(a130_0x317b,0x75810));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x317eb5,_0x207382,_0x3af0de,_0x3aa49b,_0x5be70f,_0x3eea41){const _0x9773ff=a130_0x3d22;return{'level':_0x317eb5,'path':_0x207382,'code':_0x3af0de,'message':_0x3aa49b,'location':getLocationFromPath(_0x5be70f[_0x9773ff(0x1c5)],_0x5be70f[_0x9773ff(0x1d6)],pathToArray(_0x3eea41??_0x207382))};}function validateVersionStructure(_0xb32ab1,_0x2956d7){const _0x4fe3ad=a130_0x3d22,_0x1d9a6f=[];return _0xb32ab1[_0x4fe3ad(0x180)]>MAX_STAGES&&_0x1d9a6f[_0x4fe3ad(0x160)](createIssue(_0x4fe3ad(0x1a6),_0x4fe3ad(0x1c7),'TOO_MANY_STAGES',_0x4fe3ad(0x1e6)+_0xb32ab1['length']+_0x4fe3ad(0x15a)+MAX_STAGES,_0x2956d7)),_0x1d9a6f;}function validateStageStructure(_0x39ddd5,_0x4e7a7e,_0x5c36d2,_0x1d444b){const _0x4386de=a130_0x3d22,_0x5054e9=[],_0x4d00aa=_0x4386de(0x1ed)+_0x4e7a7e+']';_0x4e7a7e===0x0&&!_0x39ddd5['entry_criteria']&&_0x5054e9['push'](createIssue(_0x4386de(0x1a6),_0x4d00aa+'.entry_criteria','MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x39ddd5[_0x4386de(0x1d4)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x1d444b,_0x4d00aa));const _0x52880e=_0x4e7a7e===_0x5c36d2-0x1;!_0x52880e&&!_0x39ddd5[_0x4386de(0x16e)]&&_0x5054e9['push'](createIssue(_0x4386de(0x1a6),_0x4d00aa+'.milestone',_0x4386de(0x16b),'Stage\x20\x27'+_0x39ddd5['name']+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x1d444b,_0x4d00aa));(!_0x39ddd5[_0x4386de(0x1a1)]||_0x39ddd5['exit_criteria']['length']===0x0)&&_0x5054e9['push'](createIssue(_0x4386de(0x196),_0x4d00aa+'.exit_criteria',_0x4386de(0x1bc),_0x4386de(0x1e2)+_0x39ddd5[_0x4386de(0x1d4)]+_0x4386de(0x16f),_0x1d444b,_0x4d00aa));const _0x1a7f9b=_0x39ddd5[_0x4386de(0x14a)]?.[_0x4386de(0x180)]??0x0;if(_0x1a7f9b===0x0)_0x5054e9['push'](createIssue(_0x4386de(0x1a6),_0x4d00aa+_0x4386de(0x1ae),_0x4386de(0x187),_0x4386de(0x1e2)+_0x39ddd5[_0x4386de(0x1d4)]+_0x4386de(0x1c6),_0x1d444b,_0x4d00aa+_0x4386de(0x1ae)));else{if(_0x1a7f9b===0x1)_0x5054e9[_0x4386de(0x160)](createIssue('warning',_0x4d00aa+_0x4386de(0x1ae),'INSUFFICIENT_STEPS',_0x4386de(0x1e2)+_0x39ddd5['name']+_0x4386de(0x1e5),_0x1d444b,_0x4d00aa+_0x4386de(0x1ae)));else _0x1a7f9b<=0x3&&_0x5054e9[_0x4386de(0x160)](createIssue(_0x4386de(0x196),_0x4d00aa+'.steps',_0x4386de(0x193),_0x4386de(0x1e2)+_0x39ddd5['name']+_0x4386de(0x14b)+_0x1a7f9b+_0x4386de(0x178),_0x1d444b,_0x4d00aa+_0x4386de(0x1ae)));}return _0x5054e9;}function a130_0x317b(){const _0x321ca8=['.with.target','goalIsInherited','match','journeys[','activationKeys','next','code','step\x20\x27','1793864bQOmhi','645108tfbxUW','launched','End\x20step\x20\x27','safeParse','.with.condition.segment','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','sort','Jump\x20step\x20requires\x20a\x20target','goal','indices','segments.','steps','\x27\x20has\x20only\x20','branch\x20\x27','data','issues','\x20versions)','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','endsWith','has','segment','DUPLICATE_LATEST','.with.activation','ACTIVATION_SCHEMA_ERROR','success','size','\x20stages\x20but\x20maximum\x20is\x20','activation','timeout\x20of\x20\x27','message','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.with.condition','push','variants','join','.with.condition.timeout','A/B\x20test\x20variant\x20\x27','includes','MISSING_NAME','MISSING_GOAL','values','journeys,\x20stages,\x20or\x20versions','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MISSING_MILESTONE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.exit_criteria[','milestone','\x27\x20has\x20no\x20exit_criteria\x20defined',').\x20Use\x20a\x20merge\x20step.','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','ref:','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Activation\x20step\x20requires\x20an\x20activation\x20reference',').\x20Merge\x20is\x20unnecessary.','segments','MISSING_SEGMENT_REFERENCE','\x20steps\x20(may\x20be\x20too\x20simple)','splice','SINGLE_INPUT_MERGE','journeys','\x27\x20(first\x20defined\x20at\x20steps[','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','.rule','1067766CzExmA','length','jump','.with.branches','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20has\x20no\x20end\x20step','rule','stepNames','INSUFFICIENT_STEPS','.with.condition.timeout.next','state','map','merge','get','latest','8DTRoWC','versions[','.stages','trim','.with','FEW_STEPS','6433290invtNc','add','warning','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20(across\x20','Journey\x20name\x20is\x20required','END_STEP_HAS_NEXT_OR_WITH','journey\x20entry','set','condition','type','.next','embeddedSegments','exit_criteria','percentage','MISSING_WAIT_PARAMS','branches','INVALID_NEXT_REFERENCE','error','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','path','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','skipSchema','BRANCH_DIRECTLY_TO_MERGE','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','.steps','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','version','MISSING_CONDITIONS','MISSING_ACTIVATION_REF','.with.condition.next','INVALID_AB_TEST_PERCENTAGES','versions','MISSING_STAGES','3302720wNsdws','condition\x20of\x20\x27','entries','3PqGbca','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_EXIT_CRITERIA','startsWith','DUPLICATE_STEP_NAME','MISSING_ACTIVATION_DEFINITION','MISSING_END_STEP','Embedded\x20segment\x20\x27','Journey\x20has\x20no\x20goal\x20defined','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','\x27\x20(from:\x20','document','\x27\x20has\x20no\x20steps','stages','description','every','excluded','.entry_criteria','1398236OgPcax','end','level','with','decision_point','target','.with.variants','variant\x20\x27','name','referencedSegments','source','reduce','Merge\x20step\x20\x27','JOURNEY_SCHEMA_ERROR','timeout','\x27\x20of\x20\x27','ab_test','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','INVALID_JUMP_TARGET','excluded_','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Stage\x20\x27','wait','entry_criteria','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Journey\x20has\x20','activations','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','symbol','some','keys','Decision\x20branch\x20\x27','stages[','.segment','4526837niaSdC'];a130_0x317b=function(){return _0x321ca8;};return a130_0x317b();}function validateStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef){const _0x967244=a130_0x3d22,_0x3b50eb=[];if(_0x33efba[_0x967244(0x19e)]==='end')return _0x33efba['next']&&_0x3b50eb[_0x967244(0x160)](createIssue(_0x967244(0x1a6),_0x3b4a3f+_0x967244(0x19f),_0x967244(0x19a),_0x967244(0x1fb)+_0x33efba[_0x967244(0x1d4)]+_0x967244(0x1a7),_0x54f7ba)),_0x967244(0x1cf)in _0x33efba&&_0x33efba[_0x967244(0x1cf)]!==undefined&&_0x3b50eb['push'](createIssue(_0x967244(0x1a6),_0x3b4a3f+'.with',_0x967244(0x19a),_0x967244(0x1fb)+_0x33efba[_0x967244(0x1d4)]+_0x967244(0x201),_0x54f7ba)),_0x3b50eb;_0x33efba[_0x967244(0x1f5)]&&(_0x54f7ba[_0x967244(0x186)]&&!_0x54f7ba[_0x967244(0x186)][_0x967244(0x153)](_0x33efba[_0x967244(0x1f5)])&&_0x3b50eb[_0x967244(0x160)](createIssue(_0x967244(0x1a6),_0x3b4a3f+_0x967244(0x19f),_0x967244(0x1a5),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x33efba[_0x967244(0x1f5)]+'\x27',_0x54f7ba)));switch(_0x33efba['type']){case _0x967244(0x1e3):_0x3b50eb['push'](...validateWaitStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef));break;case _0x967244(0x15b):_0x3b50eb[_0x967244(0x160)](...validateActivationStep(_0x33efba,_0x3b4a3f,_0x54f7ba));break;case'decision_point':_0x3b50eb['push'](...validateDecisionPointStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef));break;case'ab_test':_0x3b50eb['push'](...validateAbTestStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef));break;case _0x967244(0x181):_0x3b50eb[_0x967244(0x160)](...validateJumpStep(_0x33efba,_0x3b4a3f,_0x54f7ba));break;}return _0x3b50eb;}function validateWaitStep(_0x1fdd99,_0x3c727e,_0x668c70,_0x3c0098){const _0x221bd0=a130_0x3d22,_0x4a2a34=[];if(!_0x1fdd99[_0x221bd0(0x1cf)])return _0x4a2a34[_0x221bd0(0x160)](createIssue('error',_0x3c727e+_0x221bd0(0x192),_0x221bd0(0x1a3),_0x221bd0(0x17d),_0x668c70,_0x3c727e)),_0x4a2a34;if(_0x1fdd99[_0x221bd0(0x1cf)][_0x221bd0(0x19d)]){const _0x222ecb=_0x1fdd99[_0x221bd0(0x1cf)][_0x221bd0(0x19d)];if(_0x222ecb[_0x221bd0(0x154)]){_0x668c70['referencedSegments']?.[_0x221bd0(0x195)](_0x222ecb[_0x221bd0(0x154)]);!_0x222ecb[_0x221bd0(0x154)][_0x221bd0(0x1bd)](_0x221bd0(0x172))&&(_0x668c70[_0x221bd0(0x1a0)]&&!_0x668c70[_0x221bd0(0x1a0)]['has'](_0x222ecb[_0x221bd0(0x154)])&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x1a6),_0x3c727e+_0x221bd0(0x1fd),'MISSING_SEGMENT_REFERENCE',_0x221bd0(0x150)+_0x222ecb[_0x221bd0(0x154)]+_0x221bd0(0x173),_0x668c70)));_0x222ecb['next']&&_0x668c70['stepNames']&&!_0x668c70[_0x221bd0(0x186)]['has'](_0x222ecb[_0x221bd0(0x1f5)])&&_0x4a2a34[_0x221bd0(0x160)](createIssue('error',_0x3c727e+_0x221bd0(0x1b3),_0x221bd0(0x1a5),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x222ecb[_0x221bd0(0x1f5)]+'\x27',_0x668c70));_0x222ecb[_0x221bd0(0x1da)]?.[_0x221bd0(0x1f5)]&&_0x668c70[_0x221bd0(0x186)]&&!_0x668c70[_0x221bd0(0x186)][_0x221bd0(0x153)](_0x222ecb[_0x221bd0(0x1da)][_0x221bd0(0x1f5)])&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x1a6),_0x3c727e+'.with.condition.timeout.next','INVALID_NEXT_REFERENCE',_0x221bd0(0x171)+_0x222ecb['timeout'][_0x221bd0(0x1f5)]+'\x27',_0x668c70));const _0x1052a4=_0x222ecb[_0x221bd0(0x1f5)]||_0x1fdd99[_0x221bd0(0x1f5)],_0x2c463b=_0x222ecb['timeout']?.[_0x221bd0(0x1f5)]||_0x1fdd99[_0x221bd0(0x1f5)];if(_0x1052a4){const _0x592d49=_0x3c0098['get'](_0x1052a4);_0x592d49?.['type']===_0x221bd0(0x18b)&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x196),_0x3c727e+_0x221bd0(0x1b3),_0x221bd0(0x1ab),_0x221bd0(0x197)+_0x1052a4+_0x221bd0(0x1a9),_0x668c70,_0x3c727e+_0x221bd0(0x15f)));}if(_0x2c463b){const _0x3033ca=_0x3c0098[_0x221bd0(0x18c)](_0x2c463b);_0x3033ca?.['type']===_0x221bd0(0x18b)&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x196),_0x3c727e+_0x221bd0(0x188),_0x221bd0(0x1ab),_0x221bd0(0x16c)+_0x2c463b+_0x221bd0(0x1a9),_0x668c70,_0x3c727e+_0x221bd0(0x163)));}}}return _0x4a2a34;}function validateActivationStep(_0x101b0e,_0x3e806f,_0x375112){const _0x3bfe61=a130_0x3d22,_0x311a0=[];if(!_0x101b0e[_0x3bfe61(0x1cf)]?.[_0x3bfe61(0x15b)])return _0x311a0[_0x3bfe61(0x160)](createIssue(_0x3bfe61(0x1a6),_0x3e806f+_0x3bfe61(0x156),_0x3bfe61(0x1b2),_0x3bfe61(0x174),_0x375112,_0x3e806f)),_0x311a0;const _0x4c8a4e=_0x101b0e[_0x3bfe61(0x1cf)]['activation'];return _0x375112[_0x3bfe61(0x1f4)]&&!_0x4c8a4e[_0x3bfe61(0x1bd)](_0x3bfe61(0x172))&&(!_0x375112[_0x3bfe61(0x1f4)][_0x3bfe61(0x153)](_0x4c8a4e)&&_0x311a0[_0x3bfe61(0x160)](createIssue(_0x3bfe61(0x1a6),_0x3e806f+_0x3bfe61(0x156),_0x3bfe61(0x1bf),_0x3bfe61(0x1af)+_0x4c8a4e+_0x3bfe61(0x1e8),_0x375112))),_0x311a0;}function validateDecisionPointStep(_0xe294f,_0x4513a8,_0x4f8036,_0x30e887){const _0x45f128=a130_0x3d22,_0x48408e=[];if(!_0xe294f[_0x45f128(0x1cf)]?.[_0x45f128(0x1a4)]||_0xe294f[_0x45f128(0x1cf)][_0x45f128(0x1a4)][_0x45f128(0x180)]===0x0)return _0x48408e['push'](createIssue('error',_0x4513a8+_0x45f128(0x182),_0x45f128(0x1b1),_0x45f128(0x15e),_0x4f8036,_0x4513a8)),_0x48408e;for(let _0x56cb28=0x0;_0x56cb28<_0xe294f[_0x45f128(0x1cf)]['branches'][_0x45f128(0x180)];_0x56cb28++){const _0x544d31=_0xe294f['with'][_0x45f128(0x1a4)][_0x56cb28],_0x8df646=_0x4513a8+'.with.branches['+_0x56cb28+']';_0x544d31[_0x45f128(0x154)]&&!_0x544d31[_0x45f128(0x1ca)]&&(_0x4f8036['referencedSegments']?.[_0x45f128(0x195)](_0x544d31[_0x45f128(0x154)]),!_0x544d31[_0x45f128(0x154)]['startsWith']('ref:')&&(_0x4f8036[_0x45f128(0x1a0)]&&!_0x4f8036[_0x45f128(0x1a0)][_0x45f128(0x153)](_0x544d31[_0x45f128(0x154)])&&_0x48408e[_0x45f128(0x160)](createIssue(_0x45f128(0x1a6),_0x8df646+_0x45f128(0x1ee),_0x45f128(0x177),_0x45f128(0x1c3)+_0x544d31['segment']+'\x27',_0x4f8036))));_0x544d31[_0x45f128(0x1f5)]&&_0x4f8036[_0x45f128(0x186)]&&!_0x4f8036[_0x45f128(0x186)][_0x45f128(0x153)](_0x544d31[_0x45f128(0x1f5)])&&_0x48408e[_0x45f128(0x160)](createIssue(_0x45f128(0x1a6),_0x8df646+_0x45f128(0x19f),'INVALID_NEXT_REFERENCE',_0x45f128(0x16a)+_0x544d31[_0x45f128(0x1f5)]+'\x27',_0x4f8036));if(_0x544d31[_0x45f128(0x1f5)]){const _0x16dd2b=_0x30e887[_0x45f128(0x18c)](_0x544d31[_0x45f128(0x1f5)]);_0x16dd2b?.[_0x45f128(0x19e)]==='merge'&&_0x48408e[_0x45f128(0x160)](createIssue(_0x45f128(0x196),_0x8df646+_0x45f128(0x19f),_0x45f128(0x1ab),_0x45f128(0x1ec)+_0x544d31[_0x45f128(0x1d4)]+_0x45f128(0x1e1)+_0x544d31[_0x45f128(0x1f5)]+_0x45f128(0x200),_0x4f8036));}}return _0x48408e;}function validateAbTestStep(_0x3e0e44,_0x4fb272,_0x267b4e,_0x7d746b){const _0x2f9bbc=a130_0x3d22,_0xba0772=[];if(!_0x3e0e44[_0x2f9bbc(0x1cf)]?.['variants']||_0x3e0e44['with'][_0x2f9bbc(0x161)][_0x2f9bbc(0x180)]===0x0)return _0xba0772['push'](createIssue(_0x2f9bbc(0x1a6),_0x4fb272+_0x2f9bbc(0x1d2),_0x2f9bbc(0x1b1),_0x2f9bbc(0x1ad),_0x267b4e,_0x4fb272)),_0xba0772;const _0x4796e1=_0x3e0e44['with'][_0x2f9bbc(0x161)][_0x2f9bbc(0x1d7)]((_0xab72fb,_0x1e7374)=>_0xab72fb+(_0x1e7374[_0x2f9bbc(0x1a2)]||0x0),0x0);Math['abs'](_0x4796e1-0x64)>0.01&&_0xba0772[_0x2f9bbc(0x160)](createIssue(_0x2f9bbc(0x1a6),_0x4fb272+_0x2f9bbc(0x1d2),_0x2f9bbc(0x1b4),_0x2f9bbc(0x151)+_0x4796e1+'%)',_0x267b4e));for(let _0x196504=0x0;_0x196504<_0x3e0e44[_0x2f9bbc(0x1cf)][_0x2f9bbc(0x161)][_0x2f9bbc(0x180)];_0x196504++){const _0x2425bf=_0x3e0e44['with'][_0x2f9bbc(0x161)][_0x196504],_0x4e9475=_0x4fb272+'.with.variants['+_0x196504+']';_0x2425bf[_0x2f9bbc(0x1f5)]&&_0x267b4e[_0x2f9bbc(0x186)]&&!_0x267b4e[_0x2f9bbc(0x186)][_0x2f9bbc(0x153)](_0x2425bf[_0x2f9bbc(0x1f5)])&&_0xba0772[_0x2f9bbc(0x160)](createIssue('error',_0x4e9475+_0x2f9bbc(0x19f),_0x2f9bbc(0x1a5),_0x2f9bbc(0x1bb)+_0x2425bf[_0x2f9bbc(0x1f5)]+'\x27',_0x267b4e));if(_0x2425bf[_0x2f9bbc(0x1f5)]){const _0x2916fc=_0x7d746b[_0x2f9bbc(0x18c)](_0x2425bf[_0x2f9bbc(0x1f5)]);_0x2916fc?.[_0x2f9bbc(0x19e)]==='merge'&&_0xba0772[_0x2f9bbc(0x160)](createIssue(_0x2f9bbc(0x196),_0x4e9475+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x2f9bbc(0x164)+_0x2425bf['name']+_0x2f9bbc(0x1e1)+_0x2425bf[_0x2f9bbc(0x1f5)]+_0x2f9bbc(0x200),_0x267b4e));}}return _0xba0772;}function validateJumpStep(_0x5662c3,_0x28ce4f,_0xff115a){const _0x9c8ce3=a130_0x3d22,_0x5404c6=[];if(!_0x5662c3[_0x9c8ce3(0x1cf)]?.[_0x9c8ce3(0x1d1)])return _0x5404c6['push'](createIssue('error',_0x28ce4f+_0x9c8ce3(0x1f0),'INVALID_JUMP_TARGET',_0x9c8ce3(0x203),_0xff115a,_0x28ce4f)),_0x5404c6;return(!_0x5662c3['with'][_0x9c8ce3(0x1d1)]['journey']||!_0x5662c3['with']['target']['stage'])&&_0x5404c6[_0x9c8ce3(0x160)](createIssue(_0x9c8ce3(0x1a6),_0x28ce4f+_0x9c8ce3(0x1f0),_0x9c8ce3(0x1de),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0xff115a)),_0x5404c6;}function buildConvergenceMap(_0x305030){const _0x4bd2a1=a130_0x3d22,_0x46a698=new Map();function _0x1fdd14(_0x1876bc,_0x305b4d){const _0x2e052e=a130_0x3d22,_0x4fe063=_0x46a698['get'](_0x1876bc)||[];_0x4fe063[_0x2e052e(0x160)](_0x305b4d),_0x46a698[_0x2e052e(0x19c)](_0x1876bc,_0x4fe063);}for(const _0x244d3a of _0x305030){_0x244d3a[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x244d3a[_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x1f7)+_0x244d3a['name']+'\x27'});if(_0x244d3a[_0x4bd2a1(0x19e)]===_0x4bd2a1(0x1d0)&&_0x244d3a[_0x4bd2a1(0x1cf)]?.[_0x4bd2a1(0x1a4)])for(const _0x44558d of _0x244d3a['with'][_0x4bd2a1(0x1a4)]){_0x44558d[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x44558d[_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x14c)+_0x44558d[_0x4bd2a1(0x1d4)]+_0x4bd2a1(0x1db)+_0x244d3a[_0x4bd2a1(0x1d4)]+'\x27'});}if(_0x244d3a['type']===_0x4bd2a1(0x1dc)&&_0x244d3a[_0x4bd2a1(0x1cf)]?.[_0x4bd2a1(0x161)])for(const _0x2d3bca of _0x244d3a[_0x4bd2a1(0x1cf)][_0x4bd2a1(0x161)]){_0x2d3bca[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x2d3bca['next'],{'stepName':_0x244d3a['name'],'description':_0x4bd2a1(0x1d3)+_0x2d3bca[_0x4bd2a1(0x1d4)]+'\x27\x20of\x20\x27'+_0x244d3a['name']+'\x27'});}_0x244d3a[_0x4bd2a1(0x19e)]===_0x4bd2a1(0x1e3)&&_0x244d3a['with']?.[_0x4bd2a1(0x19d)]&&(_0x244d3a[_0x4bd2a1(0x1cf)]['condition'][_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x244d3a[_0x4bd2a1(0x1cf)][_0x4bd2a1(0x19d)][_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x1b8)+_0x244d3a[_0x4bd2a1(0x1d4)]+'\x27'}),_0x244d3a[_0x4bd2a1(0x1cf)]['condition'][_0x4bd2a1(0x1da)]?.[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x244d3a[_0x4bd2a1(0x1cf)][_0x4bd2a1(0x19d)]['timeout'][_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x15c)+_0x244d3a['name']+'\x27'}));}return _0x46a698;}function validateFlowControl(_0x2c3d5d,_0x1410b7,_0x214b58){const _0x2e07cd=a130_0x3d22,_0x90d948=[],_0x3b9bae='stages['+_0x1410b7+']',_0x2009a1=_0x2c3d5d['steps']||[];if(_0x2009a1[_0x2e07cd(0x180)]===0x0)return _0x90d948;const _0x2e85c8=new Map();for(const _0x5b5b97 of _0x2009a1){_0x5b5b97[_0x2e07cd(0x1d4)]&&_0x2e85c8[_0x2e07cd(0x19c)](_0x5b5b97['name'],_0x5b5b97);}const _0x2226c5=buildConvergenceMap(_0x2009a1),_0x17dab8=_0x2009a1[_0x2e07cd(0x1ea)](_0x4cb20a=>_0x4cb20a[_0x2e07cd(0x19e)]===_0x2e07cd(0x1cd));!_0x17dab8&&_0x90d948[_0x2e07cd(0x160)](createIssue('error',_0x3b9bae+_0x2e07cd(0x1ae),_0x2e07cd(0x1c0),'Stage\x20\x27'+_0x2c3d5d[_0x2e07cd(0x1d4)]+_0x2e07cd(0x184),_0x214b58));for(const [_0x4fdac5,_0x208a02]of _0x2226c5){const _0x55039f=_0x2e85c8[_0x2e07cd(0x18c)](_0x4fdac5);if(!_0x55039f)continue;if(_0x208a02[_0x2e07cd(0x180)]>0x1&&_0x55039f[_0x2e07cd(0x19e)]!==_0x2e07cd(0x18b)){const _0x315efc=_0x208a02[_0x2e07cd(0x18a)](_0x442225=>_0x442225['description'])[_0x2e07cd(0x162)](',\x20');_0x90d948[_0x2e07cd(0x160)](createIssue('error',_0x3b9bae+_0x2e07cd(0x1ae),'CONVERGENCE_WITHOUT_MERGE',_0x2e07cd(0x1e0)+_0x4fdac5+_0x2e07cd(0x1c4)+_0x315efc+_0x2e07cd(0x170),_0x214b58));}_0x208a02[_0x2e07cd(0x180)]===0x1&&_0x55039f['type']===_0x2e07cd(0x18b)&&_0x90d948[_0x2e07cd(0x160)](createIssue('warning',_0x3b9bae+_0x2e07cd(0x1ae),_0x2e07cd(0x17a),_0x2e07cd(0x1d8)+_0x4fdac5+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x208a02[0x0][_0x2e07cd(0x1c8)]+_0x2e07cd(0x175),_0x214b58));}for(const _0x2a86fb of _0x2009a1){if(_0x2a86fb['type']===_0x2e07cd(0x18b)&&_0x2a86fb[_0x2e07cd(0x1f5)]){const _0x2d9fcf=_0x2e85c8[_0x2e07cd(0x18c)](_0x2a86fb[_0x2e07cd(0x1f5)]);_0x2d9fcf?.[_0x2e07cd(0x19e)]==='merge'&&_0x90d948[_0x2e07cd(0x160)](createIssue(_0x2e07cd(0x1a6),_0x3b9bae+_0x2e07cd(0x1ae),'MERGE_TO_MERGE_CHAIN',_0x2e07cd(0x1d8)+_0x2a86fb['name']+_0x2e07cd(0x1fe)+_0x2a86fb[_0x2e07cd(0x1f5)]+_0x2e07cd(0x1ff),_0x214b58));}}return _0x90d948;}function validateCriteria(_0x54a06f,_0x49f02d,_0x3e772b){const _0xcd4352=a130_0x3d22,_0x3be7ed=[];return _0x54a06f[_0xcd4352(0x154)]&&(_0x3e772b[_0xcd4352(0x1d5)]?.[_0xcd4352(0x195)](_0x54a06f[_0xcd4352(0x154)]),!_0x54a06f[_0xcd4352(0x154)][_0xcd4352(0x1bd)](_0xcd4352(0x172))&&(_0x3e772b[_0xcd4352(0x1a0)]&&!_0x3e772b[_0xcd4352(0x1a0)][_0xcd4352(0x153)](_0x54a06f[_0xcd4352(0x154)])&&_0x3be7ed[_0xcd4352(0x160)](createIssue(_0xcd4352(0x1a6),_0x49f02d+_0xcd4352(0x1ee),_0xcd4352(0x177),_0xcd4352(0x183)+_0x54a06f['segment']+'\x27',_0x3e772b)))),_0x3be7ed;}function validateEmbeddedSegment(_0x162e46,_0x470476,_0x2884f6){const _0x9983ea=a130_0x3d22,_0x3a5a3c=[];return _0x162e46[_0x9983ea(0x185)]&&_0x3a5a3c[_0x9983ea(0x160)](...validateRuleDef(_0x162e46[_0x9983ea(0x185)],_0x470476+_0x9983ea(0x17e),_0x2884f6)),_0x3a5a3c;}function validateStage(_0xff176d,_0x1ecc36,_0x1e6a82,_0x29d09b){const _0xa12df9=a130_0x3d22,_0x22a2a8=[],_0x11da50=_0xa12df9(0x1ed)+_0x1ecc36+']',_0x4d8948=new Map(),_0x357dfa=new Map();if(_0xff176d[_0xa12df9(0x14a)]){for(let _0x10df0e=0x0;_0x10df0e<_0xff176d[_0xa12df9(0x14a)][_0xa12df9(0x180)];_0x10df0e++){const _0x54c907=_0xff176d[_0xa12df9(0x14a)][_0x10df0e];_0x54c907[_0xa12df9(0x1d4)]&&_0x4d8948[_0xa12df9(0x19c)](_0x54c907[_0xa12df9(0x1d4)],_0x54c907);}for(let _0x3d8b54=0x0;_0x3d8b54<_0xff176d[_0xa12df9(0x14a)][_0xa12df9(0x180)];_0x3d8b54++){const _0xf9941e=_0xff176d['steps'][_0x3d8b54],_0x2294f4=_0x11da50+'.steps['+_0x3d8b54+']';if(_0xf9941e[_0xa12df9(0x1d4)]){if(_0x357dfa[_0xa12df9(0x153)](_0xf9941e['name'])){const _0x406e6c=_0x357dfa['get'](_0xf9941e[_0xa12df9(0x1d4)]);_0x22a2a8[_0xa12df9(0x160)](createIssue(_0xa12df9(0x1a6),_0x2294f4+'.name',_0xa12df9(0x1be),'Duplicate\x20step\x20name\x20\x27'+_0xf9941e['name']+_0xa12df9(0x17c)+_0x406e6c+'])',_0x29d09b));}else _0x357dfa[_0xa12df9(0x19c)](_0xf9941e[_0xa12df9(0x1d4)],_0x3d8b54);}_0x22a2a8[_0xa12df9(0x160)](...validateStep(_0xf9941e,_0x2294f4,_0x29d09b,_0x4d8948));}}_0xff176d[_0xa12df9(0x1e4)]&&_0x22a2a8['push'](...validateCriteria(_0xff176d[_0xa12df9(0x1e4)],_0x11da50+_0xa12df9(0x1cb),_0x29d09b));if(_0xff176d[_0xa12df9(0x1a1)])for(let _0x42ef43=0x0;_0x42ef43<_0xff176d[_0xa12df9(0x1a1)][_0xa12df9(0x180)];_0x42ef43++){_0x22a2a8['push'](...validateCriteria(_0xff176d['exit_criteria'][_0x42ef43],_0x11da50+_0xa12df9(0x16d)+_0x42ef43+']',_0x29d09b));}return _0xff176d[_0xa12df9(0x16e)]&&_0x22a2a8[_0xa12df9(0x160)](...validateCriteria(_0xff176d['milestone'],_0x11da50+'.milestone',_0x29d09b)),_0x22a2a8[_0xa12df9(0x160)](...validateStageStructure(_0xff176d,_0x1ecc36,_0x1e6a82,_0x29d09b)),_0x22a2a8[_0xa12df9(0x160)](...validateFlowControl(_0xff176d,_0x1ecc36,_0x29d09b)),_0x22a2a8;}function validateStagesForVersion(_0x2a34fa,_0x5d6bc0,_0x5e478f,_0x17ebfe,_0x225980,_0x343eec,_0x294171){const _0x5f4459=a130_0x3d22;if(_0x2a34fa['length']===0x0){_0x225980[_0x5f4459(0x160)]({'level':_0x5f4459(0x1a6),'path':_0x17ebfe+_0x5f4459(0x1c7),'code':'MISSING_STAGES','message':_0x5f4459(0x1ac),'location':getLocationFromPath(_0x5e478f[_0x5f4459(0x1c5)],_0x5e478f[_0x5f4459(0x1d6)],['stages'])});return;}const _0x4c2234=new Set();for(const _0x54cae2 of _0x2a34fa){if(_0x54cae2[_0x5f4459(0x14a)])for(const _0x437256 of _0x54cae2[_0x5f4459(0x14a)]){_0x437256[_0x5f4459(0x1d4)]&&_0x4c2234[_0x5f4459(0x195)](_0x437256[_0x5f4459(0x1d4)]);}}const _0x5cc24d={..._0x5e478f,'stepNames':_0x4c2234},_0x48f9ce=validateVersionStructure(_0x2a34fa,_0x5cc24d);for(const _0x3e36c7 of _0x48f9ce){const _0x4ac2ac=_0x17ebfe?{..._0x3e36c7,'path':''+_0x17ebfe+_0x3e36c7[_0x5f4459(0x1a8)]}:_0x3e36c7;if(_0x4ac2ac['level']===_0x5f4459(0x1a6))_0x225980[_0x5f4459(0x160)](_0x4ac2ac);else _0x343eec['push'](_0x4ac2ac);}for(let _0x2c0d3f=0x0;_0x2c0d3f<_0x2a34fa[_0x5f4459(0x180)];_0x2c0d3f++){const _0x3ef6a9=validateStage(_0x2a34fa[_0x2c0d3f],_0x2c0d3f,_0x2a34fa[_0x5f4459(0x180)],_0x5cc24d);for(const _0x3bf955 of _0x3ef6a9){const _0x340fbb=_0x17ebfe?{..._0x3bf955,'path':''+_0x17ebfe+_0x3bf955[_0x5f4459(0x1a8)]}:_0x3bf955;if(_0x340fbb[_0x5f4459(0x1ce)]===_0x5f4459(0x1a6))_0x225980[_0x5f4459(0x160)](_0x340fbb);else _0x343eec['push'](_0x340fbb);}}if(_0x5d6bc0['goal']){const _0x3f7b50=_0x294171?.[_0x5f4459(0x1f1)]?_0x5f4459(0x204):_0x17ebfe+_0x5f4459(0x204),_0x39193a=validateCriteria(_0x5d6bc0['goal'],_0x3f7b50,_0x5cc24d);for(const _0x3d7ec0 of _0x39193a){if(_0x3d7ec0[_0x5f4459(0x1ce)]==='error')_0x225980[_0x5f4459(0x160)](_0x3d7ec0);else _0x343eec['push'](_0x3d7ec0);}}}function extractVersionIndex(_0x5bf352){const _0x4584fb=a130_0x3d22,_0x4cc000=_0x5bf352[_0x4584fb(0x1f2)](/^journeys\[(\d+)\]\./);return _0x4cc000?_0x4cc000[0x1]:undefined;}function deduplicateAcrossVersions(_0x2770a1){const _0x1c710a=a130_0x3d22,_0x71d51f=new Map();for(let _0x51c938=0x0;_0x51c938<_0x2770a1['length'];_0x51c938++){const _0x173978=_0x2770a1[_0x51c938][_0x1c710a(0x1f6)]+':'+_0x2770a1[_0x51c938]['message'],_0x447fa6=extractVersionIndex(_0x2770a1[_0x51c938][_0x1c710a(0x1a8)]),_0x2736b6=_0x71d51f['get'](_0x173978);if(_0x2736b6){_0x2736b6[_0x1c710a(0x205)][_0x1c710a(0x160)](_0x51c938);if(_0x447fa6)_0x2736b6[_0x1c710a(0x1b5)][_0x1c710a(0x195)](_0x447fa6);}else _0x71d51f['set'](_0x173978,{'indices':[_0x51c938],'versions':new Set(_0x447fa6?[_0x447fa6]:[])});}const _0x49b60b=new Set();for(const {indices:_0x537fce,versions:_0x282ea8}of _0x71d51f[_0x1c710a(0x168)]()){if(_0x282ea8[_0x1c710a(0x159)]<=0x1)continue;const _0x2a1bc4=_0x2770a1[_0x537fce[0x0]];_0x2a1bc4[_0x1c710a(0x1a8)]=_0x2a1bc4[_0x1c710a(0x1a8)]['replace'](/^journeys\[\d+\]\./,''),_0x2a1bc4[_0x1c710a(0x15d)]=_0x2a1bc4['message']+_0x1c710a(0x198)+_0x282ea8[_0x1c710a(0x159)]+_0x1c710a(0x14f);for(let _0x48a213=0x1;_0x48a213<_0x537fce[_0x1c710a(0x180)];_0x48a213++){_0x49b60b[_0x1c710a(0x195)](_0x537fce[_0x48a213]);}}const _0x24a735=[..._0x49b60b][_0x1c710a(0x202)]((_0x1b5bcf,_0x5ee7a7)=>_0x5ee7a7-_0x1b5bcf);for(const _0x11fc55 of _0x24a735){_0x2770a1[_0x1c710a(0x179)](_0x11fc55,0x1);}}export function validateJourneyDef(_0x4882c4,_0x2e971d={},_0x1fc27f={}){const _0x23f903=a130_0x3d22;if(_0x1fc27f[_0x23f903(0x1aa)])return runJourneySemanticChecks(_0x4882c4,_0x2e971d);const _0x2dd912=JourneyDefSchema[_0x23f903(0x1fc)](_0x4882c4);if(_0x2dd912[_0x23f903(0x158)])return runJourneySemanticChecks(_0x2dd912[_0x23f903(0x14d)],_0x2e971d);return zodErrorsToJourneyValidationResult(_0x2dd912[_0x23f903(0x1a6)],_0x2e971d);}function a130_0x3d22(_0x575ec9,_0x2f9ee0){_0x575ec9=_0x575ec9-0x149;const _0x317b45=a130_0x317b();let _0x3d2247=_0x317b45[_0x575ec9];return _0x3d2247;}function zodErrorsToJourneyValidationResult(_0x5920b4,_0x5ac6fb){const _0xcf8057=a130_0x3d22,_0x366201=flattenZodIssues(_0x5920b4[_0xcf8057(0x14e)]),_0x227941=_0x366201[_0xcf8057(0x18a)](_0x428115=>{const _0x5bb9dc=_0xcf8057,_0x179abf=formatZodPath(_0x428115[_0x5bb9dc(0x1a8)]),_0x21bf70=mapJourneyZodIssueToCode(_0x428115,_0x179abf),_0x612838=getLocationFromPath(_0x5ac6fb[_0x5bb9dc(0x1c5)],_0x5ac6fb[_0x5bb9dc(0x1d6)],_0x428115[_0x5bb9dc(0x1a8)][_0x5bb9dc(0x18a)](_0x1c7447=>typeof _0x1c7447===_0x5bb9dc(0x1e9)?String(_0x1c7447):_0x1c7447));return{'level':_0x5bb9dc(0x1a6),'path':_0x179abf,'code':_0x21bf70,'message':_0x428115[_0x5bb9dc(0x15d)],..._0x612838&&{'location':_0x612838}};});return{'valid':![],'errors':_0x227941,'warnings':[]};}function mapJourneyZodIssueToCode(_0x51a03c,_0x56380c){const _0x4a58b8=a130_0x3d22;if(_0x56380c===_0x4a58b8(0x1d4))return _0x4a58b8(0x166);if(_0x56380c[_0x4a58b8(0x152)]('.type')&&_0x56380c[_0x4a58b8(0x165)](_0x4a58b8(0x14a)))return _0x4a58b8(0x1d9);if(_0x56380c===_0x4a58b8(0x1c7)||_0x56380c['endsWith'](_0x4a58b8(0x190)))return _0x4a58b8(0x1b6);if(_0x56380c===''&&_0x51a03c['message'][_0x4a58b8(0x165)](_0x4a58b8(0x169)))return'MISSING_STAGES';if(_0x56380c['includes'](_0x4a58b8(0x15b)))return _0x4a58b8(0x157);return _0x4a58b8(0x1d9);}function runJourneySemanticChecks(_0x1c0b0a,_0x4a3da2){const _0x32cded=a130_0x3d22,_0x50eb9a=[],_0x20f612=[];(!_0x1c0b0a[_0x32cded(0x1d4)]||_0x1c0b0a[_0x32cded(0x1d4)][_0x32cded(0x191)]()==='')&&_0x50eb9a['push']({'level':'error','path':'name','code':_0x32cded(0x166),'message':_0x32cded(0x199),'location':getLocationFromPath(_0x4a3da2['document'],_0x4a3da2[_0x32cded(0x1d6)],[_0x32cded(0x1d4)])});const _0x58655c=new Set();if(_0x1c0b0a[_0x32cded(0x176)])for(const _0x22d8a1 of Object[_0x32cded(0x1eb)](_0x1c0b0a[_0x32cded(0x176)])){_0x58655c['add'](_0x22d8a1);}const _0x1e497d=new Set();if(_0x1c0b0a[_0x32cded(0x1e7)])for(const _0x46f503 of Object[_0x32cded(0x1eb)](_0x1c0b0a[_0x32cded(0x1e7)])){_0x1e497d[_0x32cded(0x195)](_0x46f503);}const _0x4001c2=new Set(),_0x6a5610={..._0x4a3da2,'embeddedSegments':_0x58655c,'referencedSegments':_0x4001c2,'activationKeys':_0x1e497d['size']>0x0?_0x1e497d:undefined};if(_0x1c0b0a['segments'])for(const [_0x57b481,_0x1001af]of Object[_0x32cded(0x1b9)](_0x1c0b0a[_0x32cded(0x176)])){const _0x5317c0=validateEmbeddedSegment(_0x1001af,'segments.'+_0x57b481,_0x6a5610);for(const _0x3eb68d of _0x5317c0){if(_0x3eb68d[_0x32cded(0x1ce)]==='error')_0x50eb9a['push'](_0x3eb68d);else _0x20f612['push'](_0x3eb68d);}}const _0x1af898=!!_0x1c0b0a[_0x32cded(0x204)],_0x444539=_0x1c0b0a['journeys']?.[_0x32cded(0x1c9)](_0x556a4b=>!!_0x556a4b['goal'])??![];!_0x1af898&&!_0x444539&&_0x20f612['push']({'level':_0x32cded(0x196),'path':'goal','code':_0x32cded(0x167),'message':_0x32cded(0x1c2),'location':getLocationFromPath(_0x4a3da2[_0x32cded(0x1c5)],_0x4a3da2[_0x32cded(0x1d6)],['goal'])});const _0x2b0b59=_0x1c0b0a[_0x32cded(0x17b)]??_0x1c0b0a['versions'];if(_0x2b0b59&&_0x2b0b59['filter'](_0x2f1e7f=>_0x2f1e7f[_0x32cded(0x18d)]===!![])['length']>0x1){const _0xa542c8=_0x1c0b0a[_0x32cded(0x17b)]?'journeys':'versions';_0x50eb9a[_0x32cded(0x160)]({'level':'error','path':_0xa542c8,'code':_0x32cded(0x155),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0xa542c8===_0x32cded(0x17b)?_0x32cded(0x19b):_0x32cded(0x1b0))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x4a3da2[_0x32cded(0x1c5)],_0x4a3da2[_0x32cded(0x1d6)],[_0xa542c8])});}if(_0x1c0b0a[_0x32cded(0x17b)]&&_0x1c0b0a[_0x32cded(0x17b)]['length']>0x0)for(let _0x1d4a63=0x0;_0x1d4a63<_0x1c0b0a[_0x32cded(0x17b)]['length'];_0x1d4a63++){const _0x2acf45=_0x1c0b0a[_0x32cded(0x17b)][_0x1d4a63];if(_0x1c0b0a[_0x32cded(0x17b)]['length']>0x1&&_0x2acf45[_0x32cded(0x189)]===_0x32cded(0x1fa))continue;const _0x4dcd79=_0x2acf45[_0x32cded(0x1c7)]||[],_0x3ab60c=_0x32cded(0x1f3)+_0x1d4a63+'].',_0xc80ded=!!_0x2acf45['goal'],_0x5cfcea=_0xc80ded?{..._0x1c0b0a,'goal':_0x2acf45[_0x32cded(0x204)]}:_0x1c0b0a;validateStagesForVersion(_0x4dcd79,_0x5cfcea,_0x6a5610,_0x3ab60c,_0x50eb9a,_0x20f612,{'goalIsInherited':!_0xc80ded});}else{if(_0x1c0b0a['versions']&&_0x1c0b0a[_0x32cded(0x1b5)]['length']>0x0)for(let _0x4ec399=0x0;_0x4ec399<_0x1c0b0a[_0x32cded(0x1b5)][_0x32cded(0x180)];_0x4ec399++){const _0x49d8f8=_0x1c0b0a[_0x32cded(0x1b5)][_0x4ec399];if(_0x1c0b0a[_0x32cded(0x1b5)][_0x32cded(0x180)]>0x1&&_0x49d8f8[_0x32cded(0x189)]===_0x32cded(0x1fa))continue;const _0x2d54c6=_0x49d8f8[_0x32cded(0x1c7)]||[],_0x573f97=_0x32cded(0x18f)+_0x4ec399+'].';validateStagesForVersion(_0x2d54c6,_0x1c0b0a,_0x6a5610,_0x573f97,_0x50eb9a,_0x20f612);}else{const _0x38ce74=_0x1c0b0a['stages']||[];validateStagesForVersion(_0x38ce74,_0x1c0b0a,_0x6a5610,'',_0x50eb9a,_0x20f612);}}_0x1c0b0a[_0x32cded(0x17b)]&&_0x1c0b0a[_0x32cded(0x17b)]['length']>0x1&&(deduplicateAcrossVersions(_0x50eb9a),deduplicateAcrossVersions(_0x20f612));for(const _0xa9ca59 of _0x58655c){!_0x4001c2[_0x32cded(0x153)](_0xa9ca59)&&!_0xa9ca59[_0x32cded(0x1bd)](_0x32cded(0x1df))&&_0x20f612[_0x32cded(0x160)]({'level':_0x32cded(0x196),'path':_0x32cded(0x149)+_0xa9ca59,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x32cded(0x1c1)+_0xa9ca59+_0x32cded(0x1dd),'location':getLocationFromPath(_0x4a3da2[_0x32cded(0x1c5)],_0x4a3da2['source'],[_0x32cded(0x176),_0xa9ca59])});}return{'valid':_0x50eb9a[_0x32cded(0x180)]===0x0,'errors':_0x50eb9a,'warnings':_0x20f612};}
|