@treasuredata/tdx 2026.3.25 → 2026.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.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.d.ts +5 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +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
|
-
(function(
|
|
1
|
+
(function(_0x5b1d9c,_0xea684e){const _0x32edf2=a133_0x33a8,_0x1a638c=_0x5b1d9c();while(!![]){try{const _0x507153=-parseInt(_0x32edf2(0x211))/0x1+parseInt(_0x32edf2(0x1f4))/0x2+parseInt(_0x32edf2(0x212))/0x3+-parseInt(_0x32edf2(0x218))/0x4+parseInt(_0x32edf2(0x1f2))/0x5+parseInt(_0x32edf2(0x21e))/0x6*(-parseInt(_0x32edf2(0x1ef))/0x7)+parseInt(_0x32edf2(0x214))/0x8*(parseInt(_0x32edf2(0x202))/0x9);if(_0x507153===_0xea684e)break;else _0x1a638c['push'](_0x1a638c['shift']());}catch(_0x2a406b){_0x1a638c['push'](_0x1a638c['shift']());}}}(a133_0x46e2,0xe9c4d));import a133_0x23d543 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a133_0x33a8(_0x248b69,_0x385ffb){_0x248b69=_0x248b69-0x1e8;const _0x46e2de=a133_0x46e2();let _0x33a84d=_0x46e2de[_0x248b69];return _0x33a84d;}export function buildSchemaResult(_0x418570){const _0x3ffa67=a133_0x33a8,_0x2a1215=_0x418570[_0x3ffa67(0x1fe)][_0x3ffa67(0x1fb)](_0x5281f3=>({'column_name':_0x5281f3[_0x3ffa67(0x220)],'column_type':_0x5281f3[_0x3ffa67(0x219)],'null':_0x3ffa67(0x1ec),'key':null,'default':null,'extra':null}));return{..._0x418570,'columns':[{'name':_0x3ffa67(0x204),'type':'varchar'},{'name':'column_type','type':'varchar'},{'name':_0x3ffa67(0x206),'type':_0x3ffa67(0x21a)},{'name':_0x3ffa67(0x20c),'type':_0x3ffa67(0x21a)},{'name':'default','type':'varchar'},{'name':_0x3ffa67(0x203),'type':_0x3ffa67(0x21a)}],'data':_0x2a1215};}export async function executeSchemaQuery(_0x38363f,_0x33d5ee,_0x1a79a3){const _0x1b3c07=a133_0x33a8,_0xcf3ccc=_0x38363f['trim']()[_0x1b3c07(0x21d)](/;+$/,''),_0x54c50f=_0x1b3c07(0x21c)+_0xcf3ccc+_0x1b3c07(0x1f3);_0x1a79a3[_0x1b3c07(0x201)]&&console[_0x1b3c07(0x21b)](_0x1b3c07(0x1eb)+_0x54c50f);const _0x3921cc=await withProgressSpinner(_0x1b3c07(0x216),async _0x5a7f46=>{const _0x3d657c=_0x1b3c07,_0x151b19=await _0x33d5ee[_0x3d657c(0x1f8)]['execute'](_0x54c50f,{'catalog':'td','schema':'information_schema','onJobId':_0x53a9ea=>{_0x5a7f46['setJobId'](_0x53a9ea);}});return _0x151b19;},{'verbose':_0x1a79a3['verbose']});return buildSchemaResult(_0x3921cc['data']);}function a133_0x46e2(){const _0x41ac96=['error','SELECT\x20*\x20FROM\x20(\x0a','replace','18iYKdkT','bold','name','behavior','push','localeCompare','Schema\x20query:\x0a','YES','matrixColumnName','sort','4170446bePhDt','dim','groupingName','9139940Osmcjq','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','355984HodUHc','Behaviors','set','slice','query','source','parentTableName','map','Unknown','\x20\x20\x20\x20','columns','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','behaviorName','verbose','549NLAqZk','extra','column_name','parentColumn','null','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','tableName','cyan','some','displayName','key','fields','attribute','filter','entries','1173683RShxsz','5538432gnArqJ','Attributes','50824vSDPVN','size','Fetching\x20schema...','get','1284492blegAu','type','varchar'];a133_0x46e2=function(){return _0x41ac96;};return a133_0x46e2();}function columnName(_0xe70c0e){const _0x4f2f28=a133_0x33a8;return _0xe70c0e[_0x4f2f28(0x1ed)]||_0xe70c0e[_0x4f2f28(0x205)]||_0xe70c0e['name'];}function formatFieldLine(_0x2dda3a,_0x14a829,_0xee0daa){const _0x5dc867=a133_0x33a8,_0x1c5002=_0x2dda3a!==_0x14a829?'\x20'+a133_0x23d543['dim']('('+_0x14a829+')'):'';return _0x5dc867(0x1fd)+_0x2dda3a+_0x1c5002+':\x20'+a133_0x23d543[_0x5dc867(0x209)](_0xee0daa);}function sortByColumnName(_0x1aa827){const _0x262ae2=a133_0x33a8;return[..._0x1aa827][_0x262ae2(0x1ee)]((_0x451376,_0x279dc5)=>columnName(_0x451376)['localeCompare'](columnName(_0x279dc5)));}export function displayFieldsHumanReadable(_0x3a4202,_0x49d418){const _0x211fe0=a133_0x33a8,_0x2ca40d=_0x3a4202[_0x211fe0(0x20f)](_0x23c4e9=>_0x23c4e9[_0x211fe0(0x1f9)]===_0x211fe0(0x20e)),_0x2bf805=_0x3a4202['filter'](_0x392fc3=>_0x392fc3[_0x211fe0(0x1f9)]===_0x211fe0(0x1e8)),_0x465d9f=new Map();for(const _0x5ed16c of _0x2ca40d){const _0x5cfbc4=_0x5ed16c[_0x211fe0(0x1f1)]||_0x5ed16c[_0x211fe0(0x1fa)]||_0x211fe0(0x1fc),_0xa7265c=_0x465d9f[_0x211fe0(0x217)](_0x5cfbc4);_0xa7265c?_0xa7265c[_0x211fe0(0x20d)][_0x211fe0(0x1e9)](_0x5ed16c):_0x465d9f['set'](_0x5cfbc4,{'displayName':_0x5cfbc4,'tableName':_0x5ed16c['parentTableName'],'fields':[_0x5ed16c]});}const _0x9ee899=new Map();for(const _0x4fc18e of _0x2bf805){const _0x15c2ab=_0x4fc18e[_0x211fe0(0x200)]||_0x211fe0(0x1fc),_0x18f75b=_0x9ee899[_0x211fe0(0x217)](_0x15c2ab)||[];_0x18f75b[_0x211fe0(0x1e9)](_0x4fc18e),_0x9ee899[_0x211fe0(0x1f6)](_0x15c2ab,_0x18f75b);}console['error']('\x0a'+a133_0x23d543['bold'](_0x49d418));if(_0x465d9f[_0x211fe0(0x215)]>0x0){console[_0x211fe0(0x21b)]('\x0a'+a133_0x23d543[_0x211fe0(0x1f0)](_0x211fe0(0x213)));const _0x467f63=[..._0x465d9f[_0x211fe0(0x210)]()]['sort']((_0x47d4f8,_0x557e74)=>_0x47d4f8[0x0][_0x211fe0(0x1ea)](_0x557e74[0x0]));for(const [,_0x3faa89]of _0x467f63){const _0x1563b5=_0x3faa89[_0x211fe0(0x208)]&&_0x3faa89[_0x211fe0(0x208)]!==_0x3faa89[_0x211fe0(0x20b)]?'\x20'+a133_0x23d543[_0x211fe0(0x1f0)]('('+_0x3faa89[_0x211fe0(0x208)]+')'):'';console[_0x211fe0(0x21b)]('\x20\x20'+a133_0x23d543[_0x211fe0(0x21f)](_0x3faa89[_0x211fe0(0x20b)])+_0x1563b5);for(const _0xa5db8f of sortByColumnName(_0x3faa89[_0x211fe0(0x20d)])){console[_0x211fe0(0x21b)](formatFieldLine(columnName(_0xa5db8f),_0xa5db8f[_0x211fe0(0x220)],_0xa5db8f[_0x211fe0(0x219)]));}}}if(_0x9ee899['size']>0x0){console['error']('\x0a'+a133_0x23d543[_0x211fe0(0x1f0)](_0x211fe0(0x1f5)));const _0x3ebd47=[..._0x9ee899[_0x211fe0(0x210)]()][_0x211fe0(0x1ee)]((_0x1e131e,_0xf4e02d)=>_0x1e131e[0x0]['localeCompare'](_0xf4e02d[0x0]));for(const [_0x2af17c,_0x34d44e]of _0x3ebd47){const _0x553cb4=_0x34d44e[0x0],_0x4e5512=_0x553cb4?.['matrixTableName'];if(_0x4e5512){const _0x5e77af=_0x4e5512!==_0x2af17c?'\x20'+a133_0x23d543[_0x211fe0(0x1f0)]('('+_0x2af17c+')'):'';console[_0x211fe0(0x21b)]('\x20\x20'+a133_0x23d543[_0x211fe0(0x21f)](_0x4e5512)+_0x5e77af);}else{const _0x19810a=_0x553cb4?.[_0x211fe0(0x1fa)]||'';console[_0x211fe0(0x21b)]('\x20\x20'+a133_0x23d543[_0x211fe0(0x21f)](_0x2af17c)+(_0x19810a?'\x20'+a133_0x23d543[_0x211fe0(0x1f0)]('('+_0x19810a+')'):''));}for(const _0x5c78d6 of sortByColumnName(_0x34d44e)){const _0x4b6501=_0x5c78d6['name']['startsWith'](_0x2af17c+'.')?_0x5c78d6[_0x211fe0(0x220)][_0x211fe0(0x1f7)](_0x2af17c['length']+0x1):_0x5c78d6[_0x211fe0(0x220)];console[_0x211fe0(0x21b)](formatFieldLine(columnName(_0x5c78d6),_0x4b6501,_0x5c78d6['type']));}}}const _0x39ccc8=_0x3a4202[_0x211fe0(0x20a)](_0x4752a5=>_0x4752a5[_0x211fe0(0x1ed)]||_0x4752a5['matrixTableName']);_0x39ccc8&&(console[_0x211fe0(0x21b)]('\x0a'+a133_0x23d543['dim'](_0x211fe0(0x1ff))),console['error'](a133_0x23d543[_0x211fe0(0x1f0)](_0x211fe0(0x207)))),console[_0x211fe0(0x21b)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42cb87,_0x5c5469){const _0x35aae2=a134_0x27a7,_0x32aaf5=_0x42cb87();while(!![]){try{const _0x2b9125=parseInt(_0x35aae2(0x15a))/0x1*(-parseInt(_0x35aae2(0x16f))/0x2)+-parseInt(_0x35aae2(0x16e))/0x3+parseInt(_0x35aae2(0x15c))/0x4*(-parseInt(_0x35aae2(0x168))/0x5)+parseInt(_0x35aae2(0x160))/0x6*(-parseInt(_0x35aae2(0x15b))/0x7)+-parseInt(_0x35aae2(0x165))/0x8+parseInt(_0x35aae2(0x161))/0x9*(parseInt(_0x35aae2(0x16b))/0xa)+-parseInt(_0x35aae2(0x169))/0xb*(-parseInt(_0x35aae2(0x16a))/0xc);if(_0x2b9125===_0x5c5469)break;else _0x32aaf5['push'](_0x32aaf5['shift']());}catch(_0x59d46d){_0x32aaf5['push'](_0x32aaf5['shift']());}}}(a134_0x49e7,0x20b6d));import{readdirSync,statSync}from'fs';import a134_0x3ee897 from'path';function a134_0x27a7(_0x8d3256,_0x19a0b1){_0x8d3256=_0x8d3256-0x159;const _0x49e744=a134_0x49e7();let _0x27a708=_0x49e744[_0x8d3256];return _0x27a708;}export function findYamlFiles(_0xebd973){const _0x5d507e=[];function _0x220f2f(_0x1223f6){const _0x31463f=a134_0x27a7,_0xc6158c=readdirSync(_0x1223f6,{'withFileTypes':!![]});for(const _0x9c58ff of _0xc6158c){const _0x25c888=a134_0x3ee897[_0x31463f(0x167)](_0x1223f6,_0x9c58ff[_0x31463f(0x163)]);if(_0x9c58ff['isDirectory']())_0x220f2f(_0x25c888);else(_0x9c58ff[_0x31463f(0x163)][_0x31463f(0x15e)](_0x31463f(0x162))||_0x9c58ff[_0x31463f(0x163)]['endsWith'](_0x31463f(0x15f)))&&_0x5d507e[_0x31463f(0x16d)](_0x25c888);}}return _0x220f2f(_0xebd973),_0x5d507e;}export function discoverYamlFiles(_0x10cd92){const _0x38922a=a134_0x27a7,_0x58a692=findYamlFiles(_0x10cd92);return _0x58a692[_0x38922a(0x159)](_0x1681de=>{const _0x41b29c=_0x38922a,_0x18ea7b=a134_0x3ee897[_0x41b29c(0x15d)](_0x10cd92,_0x1681de),_0x4cf92d=a134_0x3ee897[_0x41b29c(0x166)](_0x18ea7b);return{'absolutePath':_0x1681de,'relativePath':_0x18ea7b,'folderPath':_0x4cf92d==='.'?'':_0x4cf92d};});}function a134_0x49e7(){const _0x4f6f80=['name','extname','1906968DoNrtD','dirname','join','1058060WYHoGS','153527eviOGx','852ZZMzdA','390kxnacU','isFile','push','781383BNbwSR','4zqgVoY','map','117534UpIJye','1631BUeSAD','4OetfZo','relative','endsWith','.yaml','1830rwWvSs','36837SkFgap','.yml'];a134_0x49e7=function(){return _0x4f6f80;};return a134_0x49e7();}export function isYamlFile(_0x200328){const _0x4dd069=a134_0x27a7;try{const _0x4f88a7=statSync(_0x200328);if(!_0x4f88a7[_0x4dd069(0x16c)]())return![];const _0x5a6c61=a134_0x3ee897[_0x4dd069(0x164)](_0x200328)['toLowerCase']();return _0x5a6c61==='.yml'||_0x5a6c61===_0x4dd069(0x15f);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x7187d0,_0x2b84cc){const _0x3f43a2=a135_0x5714,_0x1261db=_0x7187d0();while(!![]){try{const _0x3e17e0=parseInt(_0x3f43a2(0x10e))/0x1+-parseInt(_0x3f43a2(0x11e))/0x2+parseInt(_0x3f43a2(0xf1))/0x3*(parseInt(_0x3f43a2(0x107))/0x4)+parseInt(_0x3f43a2(0x112))/0x5+-parseInt(_0x3f43a2(0x121))/0x6+parseInt(_0x3f43a2(0xeb))/0x7*(parseInt(_0x3f43a2(0xe3))/0x8)+-parseInt(_0x3f43a2(0x106))/0x9*(-parseInt(_0x3f43a2(0xec))/0xa);if(_0x3e17e0===_0x2b84cc)break;else _0x1261db['push'](_0x1261db['shift']());}catch(_0x1f33fd){_0x1261db['push'](_0x1261db['shift']());}}}(a135_0xb82c,0x61c55));function a135_0xb82c(){const _0x12c2f8=['string','type','milestone','.yaml','replace','14661PuGhEA','36HqxPio','steps','notification','segment','activation_template_id','exclude','behavior','317957UvkGZC','keys','toLowerCase','versions','1763180EGPEke','goal','version_number','isArray','entry_criteria','slice','object','some','nameMapping','journeyBundleName','item','version','486648NbkCSw','stringify','from','3218904ArNWXe','rule','schedule','entries','activation','join','startsWith','yaml','.yml','description','bundle_name','map','endsWith','set','with','journey','null','push','condition','get','has','204328cplClo','length','include','merged','decision_point','branches','conditions','sort','28yRPgUK','2190XbtRLS','stages','exit_criteria','trim','all_columns','16923ADESJs','connection','segments','name','attributes','launched','bundle_id','match','journeyStages','state','activations','index','connector_config','wait','journeys','columns'];a135_0xb82c=function(){return _0x12c2f8;};return a135_0xb82c();}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x3b6131){const _0x4a8cac=a135_0x5714;return _0x3b6131['toLowerCase']()['replace'](/\s+/g,'_')[_0x4a8cac(0x105)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x4a8cac(0x105)](/_+/g,'_')[_0x4a8cac(0x105)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x52d0ab){const _0x5af210=a135_0x5714,_0x21bab6=_0x52d0ab[_0x5af210(0xf8)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x21bab6){const _0xdc34d9=_0x21bab6[0x1]['toLowerCase'](),_0x3890aa=_0x21bab6[0x2],_0x53b11d=_0x3890aa['replace'](/-/g,'')['slice'](0x0,0x4)[_0x5af210(0x110)]();return _0xdc34d9+'_'+_0x53b11d;}const _0xdbd496=_0x52d0ab['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xdbd496){const _0x52381c=_0xdbd496[0x1],_0x2bbbe2=_0xdbd496[0x2]['toLowerCase'](),_0xf7346=_0x52381c[_0x5af210(0x105)](/-/g,'')['slice'](0x0,0x4)[_0x5af210(0x110)]();return _0x2bbbe2+'_'+_0xf7346;}return undefined;}function stableStringify(_0x48207c){const _0x5e2c8b=a135_0x5714;if(Array[_0x5e2c8b(0x115)](_0x48207c))return'['+_0x48207c['map'](_0x52e6dc=>stableStringify(_0x52e6dc))[_0x5e2c8b(0x126)](',')+']';if(_0x48207c&&typeof _0x48207c===_0x5e2c8b(0x118)){const _0x26028d=_0x48207c,_0x3ee475=Object[_0x5e2c8b(0x10f)](_0x26028d)[_0x5e2c8b(0xea)](),_0x152fc1=_0x3ee475[_0x5e2c8b(0x12c)](_0x2e28d9=>'\x22'+_0x2e28d9+'\x22:'+stableStringify(_0x26028d[_0x2e28d9]));return'{'+_0x152fc1[_0x5e2c8b(0x126)](',')+'}';}const _0xf47bce=JSON[_0x5e2c8b(0x11f)](_0x48207c);return _0xf47bce===undefined?_0x5e2c8b(0xde):_0xf47bce;}export function consolidateActivationsByContent(_0x47e6ca){const _0x2d862b=a135_0x5714,_0x26293d={},_0x3e768c=new Map(),_0x36d4e6=new Map();for(const _0x836c10 of _0x47e6ca){if(!_0x836c10)continue;for(const [_0x379903,_0x5e5f41]of Object['entries'](_0x836c10)){const _0x366a3a={'name':_0x5e5f41['name'],'connection':_0x5e5f41[_0x2d862b(0xf2)],..._0x5e5f41[_0x2d862b(0xf0)]!==undefined&&{'all_columns':_0x5e5f41[_0x2d862b(0xf0)]},..._0x5e5f41[_0x2d862b(0x100)]!==undefined&&{'columns':_0x5e5f41[_0x2d862b(0x100)]},..._0x5e5f41['behavior']!==undefined&&{'behavior':_0x5e5f41[_0x2d862b(0x10d)]},..._0x5e5f41[_0x2d862b(0x123)]!==undefined&&{'schedule':_0x5e5f41['schedule']},..._0x5e5f41['notification']!==undefined&&{'notification':_0x5e5f41[_0x2d862b(0x109)]},..._0x5e5f41[_0x2d862b(0xfd)]!==undefined&&{'connector_config':_0x5e5f41[_0x2d862b(0xfd)]},..._0x5e5f41[_0x2d862b(0x10b)]!==undefined&&{'activation_template_id':_0x5e5f41['activation_template_id']}},_0x23937b=stableStringify(_0x366a3a),_0x5b2d27=_0x36d4e6[_0x2d862b(0xe1)](_0x23937b);_0x5b2d27?_0x3e768c[_0x2d862b(0x12e)](_0x379903,_0x5b2d27):(_0x26293d[_0x379903]=_0x5e5f41,_0x3e768c['set'](_0x379903,_0x379903),_0x36d4e6['set'](_0x23937b,_0x379903));}}return{'merged':_0x26293d,'nameMapping':_0x3e768c};}export function updateActivationReferences(_0xa6ed31,_0x3761ba){const _0xea8053=a135_0x5714;if(!_0xa6ed31)return;for(const _0x44a8e5 of _0xa6ed31){if(!_0x44a8e5[_0xea8053(0x108)])continue;for(const _0x221411 of _0x44a8e5['steps']){if(_0x221411[_0xea8053(0x102)]===_0xea8053(0x125)&&_0x221411[_0xea8053(0xdc)]?.[_0xea8053(0x125)]){const _0x2338dc=_0x3761ba['get'](_0x221411[_0xea8053(0xdc)][_0xea8053(0x125)]);_0x2338dc&&_0x2338dc!==_0x221411[_0xea8053(0xdc)][_0xea8053(0x125)]&&(_0x221411[_0xea8053(0xdc)][_0xea8053(0x125)]=_0x2338dc);}}}}export function consolidateSegmentsByContent(_0x5a1f6e,_0x21eaed){const _0x48cb7f=a135_0x5714,_0x1c598f={},_0xf112e5=new Map(),_0x4bde9c=new Map();for(const _0x2ee0a0 of _0x5a1f6e){if(!_0x2ee0a0)continue;for(const [_0x35a3af,_0x2f028a]of Object[_0x48cb7f(0x124)](_0x2ee0a0)){if(!_0x2f028a[_0x48cb7f(0x122)]){_0x1c598f[_0x35a3af]=_0x2f028a,_0xf112e5[_0x48cb7f(0x12e)](_0x35a3af,_0x35a3af);continue;}const _0x215d3e=_0x2f028a[_0x48cb7f(0x12a)]&&_0x2f028a[_0x48cb7f(0x12a)][_0x48cb7f(0xef)]()?_0x2f028a[_0x48cb7f(0x12a)]:undefined,_0x2cdc16=JSON[_0x48cb7f(0x11f)]({'description':_0x215d3e,'rule':deepSortObject(_0x2f028a[_0x48cb7f(0x122)])}),_0x34f4dd=_0x4bde9c[_0x48cb7f(0xe1)](_0x2cdc16);if(_0x34f4dd){const _0x254ca4={..._0x2f028a['description']!==undefined&&{'description':_0x2f028a[_0x48cb7f(0x12a)]},'rule':_0x2f028a[_0x48cb7f(0x122)]?deepSortObject(_0x2f028a[_0x48cb7f(0x122)]):_0x2f028a[_0x48cb7f(0x122)]};if(_0x35a3af<_0x34f4dd){_0x1c598f[_0x35a3af]=_0x254ca4,delete _0x1c598f[_0x34f4dd];for(const [_0x5348a6,_0x5c05b0]of _0xf112e5['entries']()){_0x5c05b0===_0x34f4dd&&_0xf112e5[_0x48cb7f(0x12e)](_0x5348a6,_0x35a3af);}_0xf112e5['set'](_0x35a3af,_0x35a3af),_0x4bde9c[_0x48cb7f(0x12e)](_0x2cdc16,_0x35a3af);}else _0x1c598f[_0x34f4dd]=_0x254ca4,_0xf112e5[_0x48cb7f(0x12e)](_0x35a3af,_0x34f4dd);}else{let _0x2aa0e0=_0x35a3af;if(_0x21eaed){const _0x34d9b8=_0x21eaed[_0x48cb7f(0xe1)](_0x2cdc16);_0x34d9b8&&_0x34d9b8[_0x48cb7f(0xe4)]>0x0&&(_0x2aa0e0=_0x34d9b8[_0x48cb7f(0x117)]()[_0x48cb7f(0xea)]()[0x0]);}const _0x308904={..._0x2f028a[_0x48cb7f(0x12a)]!==undefined&&{'description':_0x2f028a[_0x48cb7f(0x12a)]},'rule':_0x2f028a['rule']?deepSortObject(_0x2f028a[_0x48cb7f(0x122)]):_0x2f028a[_0x48cb7f(0x122)]};_0x1c598f[_0x2aa0e0]=_0x308904,_0xf112e5[_0x48cb7f(0x12e)](_0x35a3af,_0x2aa0e0),_0x4bde9c['set'](_0x2cdc16,_0x2aa0e0);}}}return{'merged':_0x1c598f,'nameMapping':_0xf112e5};}export function updateSegmentReferences(_0x235e57,_0x39b3c2){const _0x9c91d0=a135_0x5714;if(!_0x235e57)return;for(const _0x22e472 of _0x235e57){if(_0x22e472[_0x9c91d0(0x116)]?.[_0x9c91d0(0x10a)]){const _0x1577ea=_0x39b3c2['get'](_0x22e472[_0x9c91d0(0x116)][_0x9c91d0(0x10a)]);_0x1577ea&&(_0x22e472[_0x9c91d0(0x116)][_0x9c91d0(0x10a)]=_0x1577ea);}if(_0x22e472['exit_criteria'])for(const _0xd17b34 of _0x22e472[_0x9c91d0(0xee)]){if(_0xd17b34['segment']){const _0x325731=_0x39b3c2[_0x9c91d0(0xe1)](_0xd17b34['segment']);_0x325731&&(_0xd17b34[_0x9c91d0(0x10a)]=_0x325731);}}if(_0x22e472[_0x9c91d0(0x103)]?.[_0x9c91d0(0x10a)]){const _0x7ebfaf=_0x39b3c2['get'](_0x22e472[_0x9c91d0(0x103)][_0x9c91d0(0x10a)]);_0x7ebfaf&&(_0x22e472[_0x9c91d0(0x103)]['segment']=_0x7ebfaf);}if(_0x22e472[_0x9c91d0(0x108)])for(const _0x3e6395 of _0x22e472[_0x9c91d0(0x108)]){if(_0x3e6395['type']===_0x9c91d0(0xe7)&&_0x3e6395[_0x9c91d0(0xdc)]?.[_0x9c91d0(0xe8)])for(const _0x138a15 of _0x3e6395[_0x9c91d0(0xdc)]['branches']){if(_0x138a15[_0x9c91d0(0x10a)]){const _0x29a51c=_0x39b3c2[_0x9c91d0(0xe1)](_0x138a15['segment']);_0x29a51c&&(_0x138a15[_0x9c91d0(0x10a)]=_0x29a51c);}}if(_0x3e6395[_0x9c91d0(0x102)]==='wait'&&_0x3e6395[_0x9c91d0(0xdc)]?.[_0x9c91d0(0xe0)]?.['segment']){const _0x287b40=_0x39b3c2[_0x9c91d0(0xe1)](_0x3e6395[_0x9c91d0(0xdc)][_0x9c91d0(0xe0)]['segment']);_0x287b40&&(_0x3e6395[_0x9c91d0(0xdc)][_0x9c91d0(0xe0)][_0x9c91d0(0x10a)]=_0x287b40);}}}}function a135_0x5714(_0xe5a5ed,_0x517a2d){_0xe5a5ed=_0xe5a5ed-0xdc;const _0xb82ce2=a135_0xb82c();let _0x5714e8=_0xb82ce2[_0xe5a5ed];return _0x5714e8;}export function updateSegmentRefsInSegments(_0x32eca1,_0x4b3baf){const _0x4d048d=a135_0x5714;for(const _0x480b12 of Object['values'](_0x32eca1)){_0x480b12['rule']&&updateSegmentRefsInRule(_0x480b12[_0x4d048d(0x122)],_0x4b3baf);}}function updateSegmentRefsInRule(_0xc21a6d,_0x54c99a){const _0x58e3d7=a135_0x5714;if(_0xc21a6d===null||typeof _0xc21a6d!=='object')return;if(Array[_0x58e3d7(0x115)](_0xc21a6d)){for(const _0x5a8492 of _0xc21a6d){updateSegmentRefsInRule(_0x5a8492,_0x54c99a);}return;}const _0x581d4e=_0xc21a6d;if((_0x581d4e[_0x58e3d7(0x102)]===_0x58e3d7(0xe5)||_0x581d4e[_0x58e3d7(0x102)]===_0x58e3d7(0x10c))&&typeof _0x581d4e[_0x58e3d7(0x10a)]===_0x58e3d7(0x101)){const _0x45f477=_0x54c99a[_0x58e3d7(0xe1)](_0x581d4e[_0x58e3d7(0x10a)]);_0x45f477&&(_0x581d4e[_0x58e3d7(0x10a)]=_0x45f477);}if(_0x581d4e[_0x58e3d7(0xe9)]&&Array[_0x58e3d7(0x115)](_0x581d4e[_0x58e3d7(0xe9)]))for(const _0x2abc91 of _0x581d4e[_0x58e3d7(0xe9)]){updateSegmentRefsInRule(_0x2abc91,_0x54c99a);}}export function buildJourneysArray(_0x640cc1,_0x5f2ffd){const _0x2891af=a135_0x5714;return _0x640cc1[_0x2891af(0x12c)](_0x2a7f69=>{const _0x40420d=_0x2891af,_0xc32cf=_0x5f2ffd?_0x2a7f69[_0x40420d(0x11c)]['id']===_0x5f2ffd:_0x640cc1[_0x40420d(0xe4)]===0x1,_0x17b5c0=_0x2a7f69[_0x40420d(0x128)][_0x40420d(0xff)]?.[0x0],_0x34b60a=_0x17b5c0?.[_0x40420d(0x113)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0x113)],_0x5e8479={'version':_0x17b5c0?.[_0x40420d(0x11d)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0x11d)]||_0x2a7f69[_0x40420d(0x11c)]['name'],'state':_0x2a7f69[_0x40420d(0x11c)][_0x40420d(0xfa)]===_0x40420d(0xf6)?'launched':'draft','stages':_0x17b5c0?.[_0x40420d(0xed)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0xed)]||[],'id':_0x17b5c0?.['id']||_0x2a7f69[_0x40420d(0x128)]['id'],'version_number':_0x17b5c0?.[_0x40420d(0x114)]||_0x2a7f69[_0x40420d(0x128)][_0x40420d(0x114)]};return _0x34b60a&&(_0x5e8479['goal']=_0x34b60a),_0xc32cf&&(_0x5e8479['latest']=!![]),_0x5e8479;});}export function buildMergedJourneyDef(_0x49fe86,_0x1c2805,_0x1cd7ea){const _0x46885a=a135_0x5714,_0x20d5e1=_0x49fe86[0x0]['yaml'],_0x5d0ca2=buildJourneysArray(_0x49fe86,_0x1cd7ea),{merged:_0x280fc5,nameMapping:_0x2b61af}=consolidateSegmentsByContent(_0x49fe86[_0x46885a(0x12c)](_0x16d958=>_0x16d958[_0x46885a(0x128)][_0x46885a(0xf3)]),_0x1c2805);updateSegmentRefsInSegments(_0x280fc5,_0x2b61af);const _0x2bfc51=Array[_0x46885a(0x120)](_0x2b61af[_0x46885a(0x124)]())['some'](([_0x562acc,_0x595711])=>_0x562acc!==_0x595711&&_0x562acc[_0x46885a(0x127)](_0x46885a(0x116)));let _0x5ad1e0=_0x280fc5,_0x52f960=new Map();if(_0x2bfc51){const _0x225d87=consolidateSegmentsByContent([_0x280fc5],_0x1c2805);_0x5ad1e0=_0x225d87[_0x46885a(0xe6)],_0x52f960=_0x225d87[_0x46885a(0x11a)];}const _0x477c59=new Map(_0x2b61af);for(const [_0x526825,_0x4fc413]of _0x52f960[_0x46885a(0x124)]()){_0x477c59[_0x46885a(0x12e)](_0x526825,_0x4fc413);}for(const [_0x36e89e,_0x15b562]of _0x477c59[_0x46885a(0x124)]()){let _0x5964ec=_0x15b562,_0x500835=0x0;while(_0x477c59[_0x46885a(0xe2)](_0x5964ec)&&_0x477c59['get'](_0x5964ec)!==_0x5964ec&&_0x500835<MAX_MAPPING_CHAIN_DEPTH){_0x5964ec=_0x477c59['get'](_0x5964ec),_0x500835++;}_0x5964ec!==_0x15b562&&_0x477c59['set'](_0x36e89e,_0x5964ec);}for(const _0x31b092 of _0x5d0ca2){updateSegmentReferences(_0x31b092['stages'],_0x477c59);}const {merged:_0x5ce14d,nameMapping:_0x22ef9e}=consolidateActivationsByContent(_0x49fe86[_0x46885a(0x12c)](_0xb5a5c2=>_0xb5a5c2[_0x46885a(0x128)][_0x46885a(0xfb)]));for(const _0x36e8ea of _0x5d0ca2){updateActivationReferences(_0x36e8ea['stages'],_0x22ef9e);}let _0x562251=_0x20d5e1[_0x46885a(0x113)];if(_0x562251?.[_0x46885a(0x10a)]){const _0x2bf616=_0x477c59['get'](_0x562251['segment']);_0x2bf616&&(_0x562251={..._0x562251,'segment':_0x2bf616});}for(const _0x2b1a2b of _0x5d0ca2){if(_0x2b1a2b[_0x46885a(0x113)]?.['segment']){const _0x43b034=_0x477c59[_0x46885a(0xe1)](_0x2b1a2b[_0x46885a(0x113)][_0x46885a(0x10a)]);_0x43b034&&(_0x2b1a2b[_0x46885a(0x113)]={..._0x2b1a2b[_0x46885a(0x113)],'segment':_0x43b034});}}return _0x5d0ca2[_0x46885a(0x119)](_0x18c1f0=>_0x18c1f0[_0x46885a(0x113)])&&(_0x562251=undefined),{'type':_0x46885a(0xdd),'name':_0x20d5e1[_0x46885a(0xf4)],'description':_0x20d5e1[_0x46885a(0x12a)],'goal':_0x562251,'reentry':_0x20d5e1['reentry'],'segments':Object[_0x46885a(0x10f)](_0x5ad1e0)[_0x46885a(0xe4)]>0x0?_0x5ad1e0:undefined,'activations':Object['keys'](_0x5ce14d)[_0x46885a(0xe4)]>0x0?_0x5ce14d:undefined,'journeys':_0x5d0ca2,'bundle_id':_0x20d5e1[_0x46885a(0xf7)],'bundle_name':_0x20d5e1[_0x46885a(0x12b)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x29c8c0,_0x27b28d,_0x3a8a69,_0x1a0616){const _0x4e1a4d=a135_0x5714,_0x689475=_0x29c8c0+':'+_0x27b28d,_0x258d4f=_0x3a8a69[_0x4e1a4d(0xe1)](_0x689475);if(_0x258d4f)return _0x258d4f;const _0xa1fbb0=await _0x1a0616(_0x29c8c0),_0x53c9bc=_0xa1fbb0[_0x4e1a4d(0xf5)][_0x4e1a4d(0x11b)]||_0xa1fbb0[_0x4e1a4d(0xf5)][_0x4e1a4d(0xf4)],_0x222139=_0xa1fbb0[_0x4e1a4d(0xf5)][_0x4e1a4d(0xf9)]['find'](_0x2520a0=>String(_0x2520a0['id'])===String(_0x27b28d)),_0x330825=_0x222139?.[_0x4e1a4d(0xf4)]||_0x27b28d,_0x11183e={'journeyName':_0x53c9bc,'stageName':_0x330825};return _0x3a8a69[_0x4e1a4d(0x12e)](_0x689475,_0x11183e),_0x11183e;}export function formatApiJourneyName(_0x126465,_0x649e6f){return _0x649e6f+'\x20('+_0x126465+')';}export function isLocalJourneyRef(_0x25611e){const _0x47a002=a135_0x5714;return _0x25611e[_0x47a002(0x12d)](_0x47a002(0x129))||_0x25611e['endsWith'](_0x47a002(0x104));}export function buildLocalRuleToNameMapping(_0x597c3e){const _0x48ed8e=a135_0x5714,_0x3eb53c=new Map();if(!_0x597c3e)return _0x3eb53c;for(const [_0x5e6c22,_0x46a9c9]of Object[_0x48ed8e(0x124)](_0x597c3e)){if(_0x46a9c9[_0x48ed8e(0x122)]){const _0x5a0991=serializeRule(_0x46a9c9[_0x48ed8e(0x122)]),_0x46ef90=_0x3eb53c[_0x48ed8e(0xe1)](_0x5a0991)||[];_0x46ef90[_0x48ed8e(0xdf)](_0x5e6c22),_0x3eb53c[_0x48ed8e(0x12e)](_0x5a0991,_0x46ef90);}}return _0x3eb53c;}export function buildLocalRuleToNameMappingFromJourney(_0x1d5704){const _0x466ba1=a135_0x5714,_0x241087=_0x1d5704[_0x466ba1(0xf3)];if(!_0x241087)return new Map();const _0x313866=collectSegmentUsageCounts(_0x1d5704),_0x514d49=new Map();let _0x14130f=0x0;for(const [_0xb7b0a3,_0x3e04f4]of Object[_0x466ba1(0x124)](_0x241087)){if(!_0x3e04f4[_0x466ba1(0x122)]){_0x14130f++;continue;}const _0x217566=serializeRule(_0x3e04f4[_0x466ba1(0x122)]),_0x172583=_0x514d49[_0x466ba1(0xe1)](_0x217566)||[];_0x172583[_0x466ba1(0xdf)]({'name':_0xb7b0a3,'index':_0x14130f}),_0x514d49[_0x466ba1(0x12e)](_0x217566,_0x172583),_0x14130f++;}const _0x5aa541=new Map();for(const [_0x24eb7d,_0x28799c]of _0x514d49){const _0x48c3af=_0x28799c[_0x466ba1(0x117)]()[_0x466ba1(0xea)]((_0x1961c1,_0x5bd638)=>{const _0x12e790=_0x466ba1,_0x390413=_0x313866[_0x12e790(0xe1)](_0x1961c1[_0x12e790(0xf4)])||0x0,_0x5d892d=_0x313866[_0x12e790(0xe1)](_0x5bd638['name'])||0x0;if(_0x390413!==_0x5d892d)return _0x5d892d-_0x390413;return _0x1961c1[_0x12e790(0xfc)]-_0x5bd638['index'];})[_0x466ba1(0x12c)](_0x1dc0e7=>_0x1dc0e7[_0x466ba1(0xf4)]);_0x5aa541[_0x466ba1(0x12e)](_0x24eb7d,_0x48c3af);}return _0x5aa541;}export function collectSegmentUsageCounts(_0x207e6f){const _0x4a2006=a135_0x5714,_0xf23499=new Map(),_0x103842=_0x5c8fb3=>{const _0x5027ca=a135_0x5714;if(!_0x5c8fb3)return;_0xf23499[_0x5027ca(0x12e)](_0x5c8fb3,(_0xf23499[_0x5027ca(0xe1)](_0x5c8fb3)||0x0)+0x1);},_0x14e32c=_0x28862c=>{const _0x3bed56=a135_0x5714;for(const _0x5b4528 of _0x28862c){_0x103842(_0x5b4528[_0x3bed56(0x116)]?.[_0x3bed56(0x10a)]);if(_0x5b4528['exit_criteria'])for(const _0x271d4d of _0x5b4528[_0x3bed56(0xee)]){_0x103842(_0x271d4d[_0x3bed56(0x10a)]);}_0x103842(_0x5b4528[_0x3bed56(0x103)]?.[_0x3bed56(0x10a)]);if(_0x5b4528[_0x3bed56(0x108)])for(const _0x4ea2d1 of _0x5b4528[_0x3bed56(0x108)]){if(_0x4ea2d1[_0x3bed56(0x102)]==='decision_point')for(const _0x1e7e3a of _0x4ea2d1[_0x3bed56(0xdc)]['branches']){_0x103842(_0x1e7e3a['segment']);}else _0x4ea2d1[_0x3bed56(0x102)]===_0x3bed56(0xfe)&&_0x103842(_0x4ea2d1['with'][_0x3bed56(0xe0)]?.[_0x3bed56(0x10a)]);}}};_0x103842(_0x207e6f[_0x4a2006(0x113)]?.[_0x4a2006(0x10a)]);if(_0x207e6f[_0x4a2006(0xff)])for(const _0xbb78ce of _0x207e6f[_0x4a2006(0xff)]){_0x103842(_0xbb78ce['goal']?.[_0x4a2006(0x10a)]),_0x14e32c(_0xbb78ce['stages']);}_0x207e6f[_0x4a2006(0xed)]&&_0x14e32c(_0x207e6f[_0x4a2006(0xed)]);if(_0x207e6f['versions'])for(const _0x5ddcdf of _0x207e6f[_0x4a2006(0x111)]){_0x14e32c(_0x5ddcdf[_0x4a2006(0xed)]);}return _0xf23499;}
|
|
1
|
+
(function(_0x11a243,_0xb64ba2){const _0x1890b3=a135_0x3dda,_0x3c80d0=_0x11a243();while(!![]){try{const _0x961299=parseInt(_0x1890b3(0x119))/0x1*(parseInt(_0x1890b3(0x115))/0x2)+parseInt(_0x1890b3(0xf4))/0x3+parseInt(_0x1890b3(0x105))/0x4+-parseInt(_0x1890b3(0x116))/0x5*(-parseInt(_0x1890b3(0x121))/0x6)+parseInt(_0x1890b3(0xfd))/0x7*(-parseInt(_0x1890b3(0xdc))/0x8)+-parseInt(_0x1890b3(0xe3))/0x9*(-parseInt(_0x1890b3(0xf6))/0xa)+-parseInt(_0x1890b3(0x120))/0xb;if(_0x961299===_0xb64ba2)break;else _0x3c80d0['push'](_0x3c80d0['shift']());}catch(_0x2ceafa){_0x3c80d0['push'](_0x3c80d0['shift']());}}}(a135_0x27c0,0x7470f));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x1ea2e6){const _0x3ce87a=a135_0x3dda;return _0x1ea2e6[_0x3ce87a(0xd7)]()[_0x3ce87a(0xd4)](/\s+/g,'_')[_0x3ce87a(0xd4)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x3ce87a(0xd4)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3ab21a){const _0x501b13=a135_0x3dda,_0x264fd6=_0x3ab21a[_0x501b13(0x111)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x264fd6){const _0x4a0048=_0x264fd6[0x1][_0x501b13(0xd7)](),_0x55fd52=_0x264fd6[0x2],_0x59dbac=_0x55fd52['replace'](/-/g,'')[_0x501b13(0xe0)](0x0,0x4)[_0x501b13(0xd7)]();return _0x4a0048+'_'+_0x59dbac;}const _0x240f6f=_0x3ab21a[_0x501b13(0x111)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x240f6f){const _0x193eee=_0x240f6f[0x1],_0x28ddbc=_0x240f6f[0x2]['toLowerCase'](),_0x42714f=_0x193eee[_0x501b13(0xd4)](/-/g,'')[_0x501b13(0xe0)](0x0,0x4)[_0x501b13(0xd7)]();return _0x28ddbc+'_'+_0x42714f;}return undefined;}function stableStringify(_0x2e54ef){const _0xdd9c6a=a135_0x3dda;if(Array[_0xdd9c6a(0xf1)](_0x2e54ef))return'['+_0x2e54ef[_0xdd9c6a(0x101)](_0xbd56db=>stableStringify(_0xbd56db))[_0xdd9c6a(0x110)](',')+']';if(_0x2e54ef&&typeof _0x2e54ef===_0xdd9c6a(0xed)){const _0x146bf6=_0x2e54ef,_0x2a3169=Object[_0xdd9c6a(0xd9)](_0x146bf6)[_0xdd9c6a(0x10c)](),_0x2d1cbd=_0x2a3169[_0xdd9c6a(0x101)](_0x542ccd=>'\x22'+_0x542ccd+'\x22:'+stableStringify(_0x146bf6[_0x542ccd]));return'{'+_0x2d1cbd[_0xdd9c6a(0x110)](',')+'}';}const _0x1daaaa=JSON[_0xdd9c6a(0x122)](_0x2e54ef);return _0x1daaaa===undefined?_0xdd9c6a(0xec):_0x1daaaa;}export function consolidateActivationsByContent(_0x2c4be9){const _0x299953=a135_0x3dda,_0x37b335={},_0x5f1f42=new Map(),_0x7ee478=new Map();for(const _0x2cdbd1 of _0x2c4be9){if(!_0x2cdbd1)continue;for(const [_0x742e4e,_0x3630c2]of Object[_0x299953(0xdd)](_0x2cdbd1)){const _0x3c1f52={'name':_0x3630c2[_0x299953(0xfc)],'connection':_0x3630c2[_0x299953(0xe9)],..._0x3630c2[_0x299953(0xff)]!==undefined&&{'all_columns':_0x3630c2['all_columns']},..._0x3630c2[_0x299953(0xf9)]!==undefined&&{'columns':_0x3630c2[_0x299953(0xf9)]},..._0x3630c2['behavior']!==undefined&&{'behavior':_0x3630c2[_0x299953(0xeb)]},..._0x3630c2[_0x299953(0x108)]!==undefined&&{'schedule':_0x3630c2['schedule']},..._0x3630c2['notification']!==undefined&&{'notification':_0x3630c2[_0x299953(0x11c)]},..._0x3630c2[_0x299953(0xd2)]!==undefined&&{'connector_config':_0x3630c2[_0x299953(0xd2)]},..._0x3630c2['activation_template_id']!==undefined&&{'activation_template_id':_0x3630c2[_0x299953(0xfe)]}},_0x1010ad=stableStringify(_0x3c1f52),_0x13ca13=_0x7ee478['get'](_0x1010ad);_0x13ca13?_0x5f1f42['set'](_0x742e4e,_0x13ca13):(_0x37b335[_0x742e4e]=_0x3630c2,_0x5f1f42[_0x299953(0x11e)](_0x742e4e,_0x742e4e),_0x7ee478[_0x299953(0x11e)](_0x1010ad,_0x742e4e));}}return{'merged':_0x37b335,'nameMapping':_0x5f1f42};}export function updateActivationReferences(_0x43b61b,_0x33ec2f){const _0x41e7de=a135_0x3dda;if(!_0x43b61b)return;for(const _0x9648c8 of _0x43b61b){if(!_0x9648c8[_0x41e7de(0x11a)])continue;for(const _0x4ab7f6 of _0x9648c8[_0x41e7de(0x11a)]){if(_0x4ab7f6[_0x41e7de(0xe1)]===_0x41e7de(0x11d)&&_0x4ab7f6['with']?.[_0x41e7de(0x11d)]){const _0x22374e=_0x33ec2f[_0x41e7de(0xf2)](_0x4ab7f6[_0x41e7de(0x104)][_0x41e7de(0x11d)]);_0x22374e&&_0x22374e!==_0x4ab7f6[_0x41e7de(0x104)]['activation']&&(_0x4ab7f6['with']['activation']=_0x22374e);}}}}export function consolidateSegmentsByContent(_0x5ab869,_0x25cb31){const _0x41d250=a135_0x3dda,_0x31e600={},_0x334966=new Map(),_0x377173=new Map();for(const _0x336985 of _0x5ab869){if(!_0x336985)continue;for(const [_0x49a621,_0x2aa469]of Object[_0x41d250(0xdd)](_0x336985)){if(!_0x2aa469[_0x41d250(0x11b)]){_0x31e600[_0x49a621]=_0x2aa469,_0x334966[_0x41d250(0x11e)](_0x49a621,_0x49a621);continue;}const _0xdc21a3=_0x2aa469['description']&&_0x2aa469[_0x41d250(0xe6)][_0x41d250(0x103)]()?_0x2aa469[_0x41d250(0xe6)]:undefined,_0x468646=JSON[_0x41d250(0x122)]({'description':_0xdc21a3,'rule':deepSortObject(_0x2aa469[_0x41d250(0x11b)])}),_0x2c7fe0=_0x377173[_0x41d250(0xf2)](_0x468646);if(_0x2c7fe0){const _0x4cbe5d={..._0x2aa469[_0x41d250(0xe6)]!==undefined&&{'description':_0x2aa469[_0x41d250(0xe6)]},'rule':_0x2aa469[_0x41d250(0x11b)]?deepSortObject(_0x2aa469[_0x41d250(0x11b)]):_0x2aa469[_0x41d250(0x11b)]};if(_0x49a621<_0x2c7fe0){_0x31e600[_0x49a621]=_0x4cbe5d,delete _0x31e600[_0x2c7fe0];for(const [_0x2f06d6,_0x21bec2]of _0x334966[_0x41d250(0xdd)]()){_0x21bec2===_0x2c7fe0&&_0x334966[_0x41d250(0x11e)](_0x2f06d6,_0x49a621);}_0x334966[_0x41d250(0x11e)](_0x49a621,_0x49a621),_0x377173[_0x41d250(0x11e)](_0x468646,_0x49a621);}else _0x31e600[_0x2c7fe0]=_0x4cbe5d,_0x334966[_0x41d250(0x11e)](_0x49a621,_0x2c7fe0);}else{let _0x46aeec=_0x49a621;if(_0x25cb31){const _0x37f6ca=_0x25cb31[_0x41d250(0xf2)](_0x468646);_0x37f6ca&&_0x37f6ca[_0x41d250(0x100)]>0x0&&(_0x46aeec=_0x37f6ca['slice']()[_0x41d250(0x10c)]()[0x0]);}const _0x58f7a4={..._0x2aa469['description']!==undefined&&{'description':_0x2aa469[_0x41d250(0xe6)]},'rule':_0x2aa469[_0x41d250(0x11b)]?deepSortObject(_0x2aa469[_0x41d250(0x11b)]):_0x2aa469[_0x41d250(0x11b)]};_0x31e600[_0x46aeec]=_0x58f7a4,_0x334966[_0x41d250(0x11e)](_0x49a621,_0x46aeec),_0x377173['set'](_0x468646,_0x46aeec);}}}return{'merged':_0x31e600,'nameMapping':_0x334966};}export function updateSegmentReferences(_0x3535b5,_0x1658ff){const _0x95a277=a135_0x3dda;if(!_0x3535b5)return;for(const _0xdbba1d of _0x3535b5){if(_0xdbba1d[_0x95a277(0xf8)]?.[_0x95a277(0xd5)]){const _0x4d2185=_0x1658ff['get'](_0xdbba1d[_0x95a277(0xf8)][_0x95a277(0xd5)]);_0x4d2185&&(_0xdbba1d[_0x95a277(0xf8)][_0x95a277(0xd5)]=_0x4d2185);}if(_0xdbba1d['exit_criteria'])for(const _0x5e34e4 of _0xdbba1d['exit_criteria']){if(_0x5e34e4['segment']){const _0x4f2f6d=_0x1658ff[_0x95a277(0xf2)](_0x5e34e4[_0x95a277(0xd5)]);_0x4f2f6d&&(_0x5e34e4['segment']=_0x4f2f6d);}}if(_0xdbba1d['milestone']?.['segment']){const _0x35a9ee=_0x1658ff[_0x95a277(0xf2)](_0xdbba1d['milestone'][_0x95a277(0xd5)]);_0x35a9ee&&(_0xdbba1d[_0x95a277(0xee)][_0x95a277(0xd5)]=_0x35a9ee);}if(_0xdbba1d[_0x95a277(0x11a)])for(const _0x344a72 of _0xdbba1d[_0x95a277(0x11a)]){if(_0x344a72['type']===_0x95a277(0xdf)&&_0x344a72[_0x95a277(0x104)]?.[_0x95a277(0x114)])for(const _0x370b4e of _0x344a72[_0x95a277(0x104)][_0x95a277(0x114)]){if(_0x370b4e[_0x95a277(0xd5)]){const _0x3b04f7=_0x1658ff[_0x95a277(0xf2)](_0x370b4e[_0x95a277(0xd5)]);_0x3b04f7&&(_0x370b4e[_0x95a277(0xd5)]=_0x3b04f7);}}if(_0x344a72[_0x95a277(0xe1)]===_0x95a277(0x10d)&&_0x344a72[_0x95a277(0x104)]?.[_0x95a277(0x106)]?.[_0x95a277(0xd5)]){const _0x451ff9=_0x1658ff[_0x95a277(0xf2)](_0x344a72[_0x95a277(0x104)][_0x95a277(0x106)][_0x95a277(0xd5)]);_0x451ff9&&(_0x344a72[_0x95a277(0x104)][_0x95a277(0x106)][_0x95a277(0xd5)]=_0x451ff9);}}}}export function updateSegmentRefsInSegments(_0x5adfa7,_0x1c5762){const _0x461607=a135_0x3dda;for(const _0x109b5d of Object['values'](_0x5adfa7)){_0x109b5d[_0x461607(0x11b)]&&updateSegmentRefsInRule(_0x109b5d[_0x461607(0x11b)],_0x1c5762);}}function a135_0x3dda(_0x26d5f8,_0x3c4673){_0x26d5f8=_0x26d5f8-0xd2;const _0x27c0f5=a135_0x27c0();let _0x3ddad2=_0x27c0f5[_0x26d5f8];return _0x3ddad2;}function updateSegmentRefsInRule(_0x3536b9,_0x226b32){const _0x31b803=a135_0x3dda;if(_0x3536b9===null||typeof _0x3536b9!==_0x31b803(0xed))return;if(Array[_0x31b803(0xf1)](_0x3536b9)){for(const _0x4bb44e of _0x3536b9){updateSegmentRefsInRule(_0x4bb44e,_0x226b32);}return;}const _0x30f162=_0x3536b9;if((_0x30f162[_0x31b803(0xe1)]===_0x31b803(0x10e)||_0x30f162[_0x31b803(0xe1)]==='exclude')&&typeof _0x30f162[_0x31b803(0xd5)]===_0x31b803(0xf5)){const _0x18f3dd=_0x226b32[_0x31b803(0xf2)](_0x30f162['segment']);_0x18f3dd&&(_0x30f162['segment']=_0x18f3dd);}if(_0x30f162[_0x31b803(0x125)]&&Array[_0x31b803(0xf1)](_0x30f162[_0x31b803(0x125)]))for(const _0x6dbbeb of _0x30f162[_0x31b803(0x125)]){updateSegmentRefsInRule(_0x6dbbeb,_0x226b32);}}export function buildJourneysArray(_0x360535,_0x5f8b66){return _0x360535['map'](_0x4e1b5c=>{const _0x33354d=a135_0x3dda,_0x3453e2=_0x5f8b66?_0x4e1b5c['item']['id']===_0x5f8b66:_0x360535[_0x33354d(0x100)]===0x1,_0x23bda2=_0x4e1b5c[_0x33354d(0xfb)]['journeys']?.[0x0],_0x3a2be7=_0x23bda2?.[_0x33354d(0x11f)]||_0x4e1b5c['yaml'][_0x33354d(0x11f)],_0x5ed7e4={'version':_0x23bda2?.['version']||_0x4e1b5c[_0x33354d(0xfb)][_0x33354d(0x123)]||_0x4e1b5c[_0x33354d(0x117)]['name'],'state':_0x4e1b5c[_0x33354d(0x117)][_0x33354d(0xe5)]===_0x33354d(0x113)?_0x33354d(0x113):_0x33354d(0x10f),'stages':_0x23bda2?.[_0x33354d(0x10a)]||_0x4e1b5c[_0x33354d(0xfb)][_0x33354d(0x10a)]||[],'id':_0x23bda2?.['id']||_0x4e1b5c[_0x33354d(0xfb)]['id'],'version_number':_0x23bda2?.[_0x33354d(0x102)]||_0x4e1b5c[_0x33354d(0xfb)]['version_number']};return _0x3a2be7&&(_0x5ed7e4[_0x33354d(0x11f)]=_0x3a2be7),_0x3453e2&&(_0x5ed7e4[_0x33354d(0xe4)]=!![]),_0x5ed7e4;});}export function buildMergedJourneyDef(_0xe4875e,_0x37b0b7,_0x42dc75){const _0x4d72d0=a135_0x3dda,_0x5015ae=_0xe4875e[0x0][_0x4d72d0(0xfb)],_0x10840f=buildJourneysArray(_0xe4875e,_0x42dc75),{merged:_0x1e8f7d,nameMapping:_0x320840}=consolidateSegmentsByContent(_0xe4875e['map'](_0x1529b3=>_0x1529b3[_0x4d72d0(0xfb)][_0x4d72d0(0xdb)]),_0x37b0b7);updateSegmentRefsInSegments(_0x1e8f7d,_0x320840);const _0x4c1e19=Array[_0x4d72d0(0xe7)](_0x320840['entries']())[_0x4d72d0(0xd6)](([_0x24951c,_0xeddae0])=>_0x24951c!==_0xeddae0&&_0x24951c['startsWith'](_0x4d72d0(0xf8)));let _0x45fdcc=_0x1e8f7d,_0x568520=new Map();if(_0x4c1e19){const _0x6769b5=consolidateSegmentsByContent([_0x1e8f7d],_0x37b0b7);_0x45fdcc=_0x6769b5[_0x4d72d0(0xd8)],_0x568520=_0x6769b5[_0x4d72d0(0xe2)];}const _0x3757a6=new Map(_0x320840);for(const [_0x13d8a1,_0x37db78]of _0x568520[_0x4d72d0(0xdd)]()){_0x3757a6[_0x4d72d0(0x11e)](_0x13d8a1,_0x37db78);}for(const [_0x3dcf14,_0x530cd6]of _0x3757a6['entries']()){let _0x35ff8b=_0x530cd6,_0x2f12ca=0x0;while(_0x3757a6[_0x4d72d0(0xda)](_0x35ff8b)&&_0x3757a6[_0x4d72d0(0xf2)](_0x35ff8b)!==_0x35ff8b&&_0x2f12ca<MAX_MAPPING_CHAIN_DEPTH){_0x35ff8b=_0x3757a6[_0x4d72d0(0xf2)](_0x35ff8b),_0x2f12ca++;}_0x35ff8b!==_0x530cd6&&_0x3757a6[_0x4d72d0(0x11e)](_0x3dcf14,_0x35ff8b);}for(const _0x4ee2f9 of _0x10840f){updateSegmentReferences(_0x4ee2f9[_0x4d72d0(0x10a)],_0x3757a6);}const {merged:_0xef4073,nameMapping:_0x1c8bc0}=consolidateActivationsByContent(_0xe4875e[_0x4d72d0(0x101)](_0xf656f3=>_0xf656f3['yaml'][_0x4d72d0(0xf0)]));for(const _0x43170c of _0x10840f){updateActivationReferences(_0x43170c[_0x4d72d0(0x10a)],_0x1c8bc0);}let _0x26b25d=_0x5015ae[_0x4d72d0(0x11f)];if(_0x26b25d?.[_0x4d72d0(0xd5)]){const _0x48c0e1=_0x3757a6[_0x4d72d0(0xf2)](_0x26b25d[_0x4d72d0(0xd5)]);_0x48c0e1&&(_0x26b25d={..._0x26b25d,'segment':_0x48c0e1});}for(const _0x3452b1 of _0x10840f){if(_0x3452b1['goal']?.[_0x4d72d0(0xd5)]){const _0x551b91=_0x3757a6[_0x4d72d0(0xf2)](_0x3452b1['goal'][_0x4d72d0(0xd5)]);_0x551b91&&(_0x3452b1[_0x4d72d0(0x11f)]={..._0x3452b1['goal'],'segment':_0x551b91});}}return _0x10840f[_0x4d72d0(0xd6)](_0x5df8ec=>_0x5df8ec[_0x4d72d0(0x11f)])&&(_0x26b25d=undefined),{'type':_0x4d72d0(0x107),'name':_0x5015ae[_0x4d72d0(0xfc)],'description':_0x5015ae['description'],'goal':_0x26b25d,'reentry':_0x5015ae[_0x4d72d0(0x112)],'segments':Object[_0x4d72d0(0xd9)](_0x45fdcc)[_0x4d72d0(0x100)]>0x0?_0x45fdcc:undefined,'activations':Object[_0x4d72d0(0xd9)](_0xef4073)['length']>0x0?_0xef4073:undefined,'journeys':_0x10840f,'bundle_id':_0x5015ae[_0x4d72d0(0xd3)],'bundle_name':_0x5015ae[_0x4d72d0(0xf3)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0xb8c113,_0x3cca2a,_0x4344f3,_0x47f61c){const _0x27f725=a135_0x3dda,_0x5d3a03=_0xb8c113+':'+_0x3cca2a,_0x4ea032=_0x4344f3['get'](_0x5d3a03);if(_0x4ea032)return _0x4ea032;const _0x5bc6d4=await _0x47f61c(_0xb8c113),_0x3b14a1=_0x5bc6d4[_0x27f725(0xf7)][_0x27f725(0x118)]||_0x5bc6d4['attributes'][_0x27f725(0xfc)],_0x11b0be=_0x5bc6d4[_0x27f725(0xf7)][_0x27f725(0xef)]['find'](_0x2e61eb=>String(_0x2e61eb['id'])===String(_0x3cca2a)),_0x1f6ce3=_0x11b0be?.[_0x27f725(0xfc)]||_0x3cca2a,_0x26c368={'journeyName':_0x3b14a1,'stageName':_0x1f6ce3};return _0x4344f3[_0x27f725(0x11e)](_0x5d3a03,_0x26c368),_0x26c368;}export function formatApiJourneyName(_0x1dc1b4,_0x302eba){return _0x302eba+'\x20('+_0x1dc1b4+')';}function a135_0x27c0(){const _0x106ac9=['101652BuzeNL','condition','journey','schedule','push','stages','endsWith','sort','wait','include','draft','join','match','reentry','launched','branches','6wtnLqb','2661645QCtcRm','item','journeyBundleName','115479QsziPZ','steps','rule','notification','activation','set','goal','7783050uWNUpe','6DnZTiS','stringify','version','index','conditions','journeys','connector_config','bundle_id','replace','segment','some','toLowerCase','merged','keys','has','segments','1584184zlhaey','entries','exit_criteria','decision_point','slice','type','nameMapping','15633YSzbBF','latest','state','description','from','versions','connection','.yaml','behavior','null','object','milestone','journeyStages','activations','isArray','get','bundle_name','794103GUNMXJ','string','4650Outsvu','attributes','entry_criteria','columns','.yml','yaml','name','28axfmMn','activation_template_id','all_columns','length','map','version_number','trim','with'];a135_0x27c0=function(){return _0x106ac9;};return a135_0x27c0();}export function isLocalJourneyRef(_0xd52fe8){const _0x37999e=a135_0x3dda;return _0xd52fe8[_0x37999e(0x10b)](_0x37999e(0xfa))||_0xd52fe8['endsWith'](_0x37999e(0xea));}export function buildLocalRuleToNameMapping(_0x2cceae){const _0x65e04c=a135_0x3dda,_0x42b896=new Map();if(!_0x2cceae)return _0x42b896;for(const [_0x2372d9,_0x2d0994]of Object[_0x65e04c(0xdd)](_0x2cceae)){if(_0x2d0994[_0x65e04c(0x11b)]){const _0x4dc7f4=serializeRule(_0x2d0994[_0x65e04c(0x11b)]),_0x3534bd=_0x42b896[_0x65e04c(0xf2)](_0x4dc7f4)||[];_0x3534bd[_0x65e04c(0x109)](_0x2372d9),_0x42b896['set'](_0x4dc7f4,_0x3534bd);}}return _0x42b896;}export function buildLocalRuleToNameMappingFromJourney(_0x5d137f){const _0x32eb54=a135_0x3dda,_0x548eae=_0x5d137f[_0x32eb54(0xdb)];if(!_0x548eae)return new Map();const _0x152664=collectSegmentUsageCounts(_0x5d137f),_0x46e338=new Map();let _0x40bc5d=0x0;for(const [_0x518fd4,_0x4bf4c3]of Object[_0x32eb54(0xdd)](_0x548eae)){if(!_0x4bf4c3['rule']){_0x40bc5d++;continue;}const _0x3f0888=serializeRule(_0x4bf4c3[_0x32eb54(0x11b)]),_0x4bc8c3=_0x46e338[_0x32eb54(0xf2)](_0x3f0888)||[];_0x4bc8c3['push']({'name':_0x518fd4,'index':_0x40bc5d}),_0x46e338[_0x32eb54(0x11e)](_0x3f0888,_0x4bc8c3),_0x40bc5d++;}const _0x33746f=new Map();for(const [_0x28e780,_0x424265]of _0x46e338){const _0x4728bb=_0x424265[_0x32eb54(0xe0)]()[_0x32eb54(0x10c)]((_0x1edc4e,_0x3a12ca)=>{const _0x881906=_0x32eb54,_0x8eab5=_0x152664[_0x881906(0xf2)](_0x1edc4e[_0x881906(0xfc)])||0x0,_0x53fd2b=_0x152664[_0x881906(0xf2)](_0x3a12ca[_0x881906(0xfc)])||0x0;if(_0x8eab5!==_0x53fd2b)return _0x53fd2b-_0x8eab5;return _0x1edc4e['index']-_0x3a12ca[_0x881906(0x124)];})[_0x32eb54(0x101)](_0x531ad3=>_0x531ad3['name']);_0x33746f[_0x32eb54(0x11e)](_0x28e780,_0x4728bb);}return _0x33746f;}export function collectSegmentUsageCounts(_0x21cdba){const _0x376d15=a135_0x3dda,_0x5d9b13=new Map(),_0x104327=_0x2d4fe9=>{const _0x3e0ebe=a135_0x3dda;if(!_0x2d4fe9)return;_0x5d9b13[_0x3e0ebe(0x11e)](_0x2d4fe9,(_0x5d9b13['get'](_0x2d4fe9)||0x0)+0x1);},_0x3cfa19=_0x361284=>{const _0x5dc8d5=a135_0x3dda;for(const _0x501f1b of _0x361284){_0x104327(_0x501f1b[_0x5dc8d5(0xf8)]?.[_0x5dc8d5(0xd5)]);if(_0x501f1b[_0x5dc8d5(0xde)])for(const _0x1d00a5 of _0x501f1b['exit_criteria']){_0x104327(_0x1d00a5[_0x5dc8d5(0xd5)]);}_0x104327(_0x501f1b['milestone']?.[_0x5dc8d5(0xd5)]);if(_0x501f1b[_0x5dc8d5(0x11a)])for(const _0x2523bd of _0x501f1b[_0x5dc8d5(0x11a)]){if(_0x2523bd[_0x5dc8d5(0xe1)]===_0x5dc8d5(0xdf))for(const _0x4d0d3e of _0x2523bd[_0x5dc8d5(0x104)][_0x5dc8d5(0x114)]){_0x104327(_0x4d0d3e['segment']);}else _0x2523bd[_0x5dc8d5(0xe1)]===_0x5dc8d5(0x10d)&&_0x104327(_0x2523bd[_0x5dc8d5(0x104)][_0x5dc8d5(0x106)]?.['segment']);}}};_0x104327(_0x21cdba['goal']?.[_0x376d15(0xd5)]);if(_0x21cdba[_0x376d15(0x126)])for(const _0x36d2b9 of _0x21cdba[_0x376d15(0x126)]){_0x104327(_0x36d2b9['goal']?.['segment']),_0x3cfa19(_0x36d2b9['stages']);}_0x21cdba[_0x376d15(0x10a)]&&_0x3cfa19(_0x21cdba[_0x376d15(0x10a)]);if(_0x21cdba['versions'])for(const _0x592dfb of _0x21cdba[_0x376d15(0xe8)]){_0x3cfa19(_0x592dfb[_0x376d15(0x10a)]);}return _0x5d9b13;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x25c75e,_0x51871b){const _0x2ebb49=a136_0x1625,_0x34c1b5=_0x25c75e();while(!![]){try{const _0x269a30=parseInt(_0x2ebb49(0x133))/0x1+parseInt(_0x2ebb49(0x17d))/0x2*(parseInt(_0x2ebb49(0xf6))/0x3)+-parseInt(_0x2ebb49(0xfd))/0x4+parseInt(_0x2ebb49(0x12f))/0x5+parseInt(_0x2ebb49(0xef))/0x6*(parseInt(_0x2ebb49(0x162))/0x7)+-parseInt(_0x2ebb49(0x171))/0x8+-parseInt(_0x2ebb49(0x1a4))/0x9*(-parseInt(_0x2ebb49(0x156))/0xa);if(_0x269a30===_0x51871b)break;else _0x34c1b5['push'](_0x34c1b5['shift']());}catch(_0x5ecc5d){_0x34c1b5['push'](_0x34c1b5['shift']());}}}(a136_0xfbdd,0xd0e9c));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x3e49ca,_0x500b2e,_0x69eb3e,_0x35029b,_0x191748,_0x2344f5){const _0x1caced=a136_0x1625;return{'level':_0x3e49ca,'path':_0x500b2e,'code':_0x69eb3e,'message':_0x35029b,'location':getLocationFromPath(_0x191748[_0x1caced(0x153)],_0x191748[_0x1caced(0x14f)],pathToArray(_0x2344f5??_0x500b2e))};}function validateVersionStructure(_0x19277d,_0x4eb764){const _0x5255df=a136_0x1625,_0x3c5da6=[];return _0x19277d[_0x5255df(0x184)]>MAX_STAGES&&_0x3c5da6[_0x5255df(0x137)](createIssue(_0x5255df(0x121),_0x5255df(0x17e),_0x5255df(0x15f),_0x5255df(0x18b)+_0x19277d[_0x5255df(0x184)]+_0x5255df(0x12b)+MAX_STAGES,_0x4eb764)),_0x3c5da6;}function validateStageStructure(_0x164633,_0x3c30d7,_0x4dac86,_0x2502c7){const _0x281361=a136_0x1625,_0x4bb8d6=[],_0x5501e9=_0x281361(0x15d)+_0x3c30d7+']';_0x3c30d7===0x0&&!_0x164633[_0x281361(0x180)]&&_0x4bb8d6['push'](createIssue(_0x281361(0x121),_0x5501e9+_0x281361(0x168),'MISSING_ENTRY_CRITERIA',_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x15a),_0x2502c7,_0x5501e9));const _0x32db11=_0x3c30d7===_0x4dac86-0x1;!_0x32db11&&!_0x164633[_0x281361(0x19d)]&&_0x4bb8d6[_0x281361(0x137)](createIssue(_0x281361(0x121),_0x5501e9+'.milestone',_0x281361(0x164),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x169),_0x2502c7,_0x5501e9));(!_0x164633[_0x281361(0x176)]||_0x164633[_0x281361(0x176)][_0x281361(0x184)]===0x0)&&_0x4bb8d6[_0x281361(0x137)](createIssue('warning',_0x5501e9+_0x281361(0x1a1),'MISSING_EXIT_CRITERIA',_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0xfc),_0x2502c7,_0x5501e9));const _0x2c9984=_0x164633['steps']?.[_0x281361(0x184)]??0x0;if(_0x2c9984===0x0)_0x4bb8d6['push'](createIssue(_0x281361(0x121),_0x5501e9+_0x281361(0x13e),_0x281361(0x13c),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x178),_0x2502c7,_0x5501e9+_0x281361(0x13e)));else{if(_0x2c9984===0x1)_0x4bb8d6[_0x281361(0x137)](createIssue(_0x281361(0x163),_0x5501e9+_0x281361(0x13e),_0x281361(0x13c),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x1a0),_0x2502c7,_0x5501e9+_0x281361(0x13e)));else _0x2c9984<=0x3&&_0x4bb8d6[_0x281361(0x137)](createIssue(_0x281361(0x163),_0x5501e9+_0x281361(0x13e),_0x281361(0x12e),_0x281361(0x161)+_0x164633[_0x281361(0x14b)]+_0x281361(0x181)+_0x2c9984+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x2502c7,_0x5501e9+'.steps'));}return _0x4bb8d6;}function validateStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977){const _0x8f8948=a136_0x1625,_0x4cafa5=[];if(_0x473bb6[_0x8f8948(0x105)]===_0x8f8948(0x16f))return _0x473bb6[_0x8f8948(0x187)]&&_0x4cafa5[_0x8f8948(0x137)](createIssue('error',_0x1721fa+_0x8f8948(0x17f),_0x8f8948(0x19e),_0x8f8948(0x198)+_0x473bb6[_0x8f8948(0x14b)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x1b205f)),'with'in _0x473bb6&&_0x473bb6[_0x8f8948(0x112)]!==undefined&&_0x4cafa5[_0x8f8948(0x137)](createIssue('error',_0x1721fa+_0x8f8948(0x193),_0x8f8948(0x19e),_0x8f8948(0x198)+_0x473bb6[_0x8f8948(0x14b)]+_0x8f8948(0x1a3),_0x1b205f)),_0x4cafa5;_0x473bb6['next']&&(_0x1b205f[_0x8f8948(0x158)]&&!_0x1b205f[_0x8f8948(0x158)][_0x8f8948(0x159)](_0x473bb6[_0x8f8948(0x187)])&&_0x4cafa5[_0x8f8948(0x137)](createIssue('error',_0x1721fa+_0x8f8948(0x17f),_0x8f8948(0x11c),_0x8f8948(0x102)+_0x473bb6[_0x8f8948(0x187)]+'\x27',_0x1b205f)));switch(_0x473bb6[_0x8f8948(0x105)]){case _0x8f8948(0x106):_0x4cafa5[_0x8f8948(0x137)](...validateWaitStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977));break;case _0x8f8948(0x145):_0x4cafa5['push'](...validateActivationStep(_0x473bb6,_0x1721fa,_0x1b205f));break;case'decision_point':_0x4cafa5[_0x8f8948(0x137)](...validateDecisionPointStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977));break;case'ab_test':_0x4cafa5['push'](...validateAbTestStep(_0x473bb6,_0x1721fa,_0x1b205f,_0x566977));break;case _0x8f8948(0x142):_0x4cafa5[_0x8f8948(0x137)](...validateJumpStep(_0x473bb6,_0x1721fa,_0x1b205f));break;}return _0x4cafa5;}function validateWaitStep(_0x341d90,_0x19a182,_0x1ae900,_0x1d05d4){const _0x2685ab=a136_0x1625,_0x470dac=[];if(!_0x341d90['with'])return _0x470dac['push'](createIssue(_0x2685ab(0x121),_0x19a182+_0x2685ab(0x193),_0x2685ab(0x146),_0x2685ab(0x13b),_0x1ae900,_0x19a182)),_0x470dac;if(_0x341d90[_0x2685ab(0x112)]['condition']){const _0x47f28c=_0x341d90[_0x2685ab(0x112)]['condition'];if(_0x47f28c[_0x2685ab(0x138)]){_0x1ae900[_0x2685ab(0x127)]?.['add'](_0x47f28c['segment']);!_0x47f28c[_0x2685ab(0x138)][_0x2685ab(0x182)](_0x2685ab(0x130))&&(_0x1ae900[_0x2685ab(0x18f)]&&!_0x1ae900[_0x2685ab(0x18f)]['has'](_0x47f28c['segment'])&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x121),_0x19a182+_0x2685ab(0x141),_0x2685ab(0x177),_0x2685ab(0x19b)+_0x47f28c[_0x2685ab(0x138)]+_0x2685ab(0x129),_0x1ae900)));_0x47f28c[_0x2685ab(0x187)]&&_0x1ae900[_0x2685ab(0x158)]&&!_0x1ae900[_0x2685ab(0x158)][_0x2685ab(0x159)](_0x47f28c['next'])&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x121),_0x19a182+'.with.condition.next','INVALID_NEXT_REFERENCE',_0x2685ab(0x14d)+_0x47f28c[_0x2685ab(0x187)]+'\x27',_0x1ae900));_0x47f28c['timeout']?.['next']&&_0x1ae900[_0x2685ab(0x158)]&&!_0x1ae900[_0x2685ab(0x158)][_0x2685ab(0x159)](_0x47f28c['timeout'][_0x2685ab(0x187)])&&_0x470dac[_0x2685ab(0x137)](createIssue('error',_0x19a182+'.with.condition.timeout.next',_0x2685ab(0x11c),_0x2685ab(0x185)+_0x47f28c[_0x2685ab(0x132)]['next']+'\x27',_0x1ae900));const _0x4e4b47=_0x47f28c['next']||_0x341d90['next'],_0x95cc70=_0x47f28c[_0x2685ab(0x132)]?.['next']||_0x341d90[_0x2685ab(0x187)];if(_0x4e4b47){const _0x317beb=_0x1d05d4['get'](_0x4e4b47);_0x317beb?.['type']==='merge'&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x163),_0x19a182+_0x2685ab(0x17c),_0x2685ab(0x16d),_0x2685ab(0x172)+_0x4e4b47+_0x2685ab(0x13a),_0x1ae900,_0x19a182+_0x2685ab(0x128)));}if(_0x95cc70){const _0x2d9ac8=_0x1d05d4['get'](_0x95cc70);_0x2d9ac8?.[_0x2685ab(0x105)]===_0x2685ab(0x19c)&&_0x470dac[_0x2685ab(0x137)](createIssue(_0x2685ab(0x163),_0x19a182+_0x2685ab(0xfe),_0x2685ab(0x16d),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x95cc70+_0x2685ab(0x13a),_0x1ae900,_0x19a182+_0x2685ab(0x110)));}}}return _0x470dac;}function validateActivationStep(_0x1d4874,_0x1132fc,_0x39727f){const _0x1c7c8c=a136_0x1625,_0x5c9a71=[];if(!_0x1d4874[_0x1c7c8c(0x112)]?.[_0x1c7c8c(0x145)])return _0x5c9a71[_0x1c7c8c(0x137)](createIssue(_0x1c7c8c(0x121),_0x1132fc+_0x1c7c8c(0x11e),'MISSING_ACTIVATION_REF',_0x1c7c8c(0x166),_0x39727f,_0x1132fc)),_0x5c9a71;const _0x107a5f=_0x1d4874[_0x1c7c8c(0x112)][_0x1c7c8c(0x145)];return _0x39727f[_0x1c7c8c(0xf2)]&&!_0x107a5f[_0x1c7c8c(0x182)](_0x1c7c8c(0x130))&&(!_0x39727f[_0x1c7c8c(0xf2)]['has'](_0x107a5f)&&_0x5c9a71['push'](createIssue(_0x1c7c8c(0x121),_0x1132fc+_0x1c7c8c(0x11e),_0x1c7c8c(0xf7),_0x1c7c8c(0x134)+_0x107a5f+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x39727f))),_0x5c9a71;}function validateDecisionPointStep(_0xe5eade,_0x19190c,_0x57b1d8,_0x87b135){const _0xcda343=a136_0x1625,_0x1a5d1d=[];if(!_0xe5eade[_0xcda343(0x112)]?.['branches']||_0xe5eade[_0xcda343(0x112)][_0xcda343(0x10e)][_0xcda343(0x184)]===0x0)return _0x1a5d1d['push'](createIssue(_0xcda343(0x121),_0x19190c+_0xcda343(0xf1),_0xcda343(0x10d),_0xcda343(0x136),_0x57b1d8,_0x19190c)),_0x1a5d1d;for(let _0x10f532=0x0;_0x10f532<_0xe5eade[_0xcda343(0x112)][_0xcda343(0x10e)]['length'];_0x10f532++){const _0x43226c=_0xe5eade[_0xcda343(0x112)][_0xcda343(0x10e)][_0x10f532],_0x349f46=_0x19190c+_0xcda343(0x140)+_0x10f532+']';_0x43226c[_0xcda343(0x138)]&&!_0x43226c[_0xcda343(0x117)]&&(_0x57b1d8['referencedSegments']?.['add'](_0x43226c[_0xcda343(0x138)]),!_0x43226c[_0xcda343(0x138)][_0xcda343(0x182)](_0xcda343(0x130))&&(_0x57b1d8['embeddedSegments']&&!_0x57b1d8[_0xcda343(0x18f)][_0xcda343(0x159)](_0x43226c[_0xcda343(0x138)])&&_0x1a5d1d[_0xcda343(0x137)](createIssue('error',_0x349f46+'.segment','MISSING_SEGMENT_REFERENCE',_0xcda343(0x16a)+_0x43226c[_0xcda343(0x138)]+'\x27',_0x57b1d8))));_0x43226c[_0xcda343(0x187)]&&_0x57b1d8[_0xcda343(0x158)]&&!_0x57b1d8['stepNames']['has'](_0x43226c[_0xcda343(0x187)])&&_0x1a5d1d[_0xcda343(0x137)](createIssue('error',_0x349f46+_0xcda343(0x17f),'INVALID_NEXT_REFERENCE',_0xcda343(0x19f)+_0x43226c[_0xcda343(0x187)]+'\x27',_0x57b1d8));if(_0x43226c[_0xcda343(0x187)]){const _0x4b1bd5=_0x87b135[_0xcda343(0x155)](_0x43226c['next']);_0x4b1bd5?.[_0xcda343(0x105)]===_0xcda343(0x19c)&&_0x1a5d1d['push'](createIssue(_0xcda343(0x163),_0x349f46+'.next',_0xcda343(0x16d),_0xcda343(0x144)+_0x43226c[_0xcda343(0x14b)]+_0xcda343(0xfa)+_0x43226c[_0xcda343(0x187)]+_0xcda343(0x126),_0x57b1d8));}}return _0x1a5d1d;}function validateAbTestStep(_0x7254b8,_0x632cbc,_0x185eb4,_0x5df10e){const _0x590107=a136_0x1625,_0x30d4a3=[];if(!_0x7254b8[_0x590107(0x112)]?.[_0x590107(0x18d)]||_0x7254b8[_0x590107(0x112)][_0x590107(0x18d)][_0x590107(0x184)]===0x0)return _0x30d4a3[_0x590107(0x137)](createIssue(_0x590107(0x121),_0x632cbc+_0x590107(0x186),'MISSING_CONDITIONS',_0x590107(0x16e),_0x185eb4,_0x632cbc)),_0x30d4a3;const _0x543c45=_0x7254b8['with'][_0x590107(0x18d)][_0x590107(0x16b)]((_0x25131d,_0x1aea13)=>_0x25131d+(_0x1aea13[_0x590107(0x12c)]||0x0),0x0);Math['abs'](_0x543c45-0x64)>0.01&&_0x30d4a3[_0x590107(0x137)](createIssue(_0x590107(0x121),_0x632cbc+_0x590107(0x186),'INVALID_AB_TEST_PERCENTAGES',_0x590107(0x175)+_0x543c45+'%)',_0x185eb4));for(let _0x3016eb=0x0;_0x3016eb<_0x7254b8[_0x590107(0x112)][_0x590107(0x18d)][_0x590107(0x184)];_0x3016eb++){const _0x14e199=_0x7254b8['with'][_0x590107(0x18d)][_0x3016eb],_0x5a636a=_0x632cbc+_0x590107(0x122)+_0x3016eb+']';_0x14e199['next']&&_0x185eb4['stepNames']&&!_0x185eb4[_0x590107(0x158)][_0x590107(0x159)](_0x14e199[_0x590107(0x187)])&&_0x30d4a3[_0x590107(0x137)](createIssue('error',_0x5a636a+_0x590107(0x17f),_0x590107(0x11c),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x14e199[_0x590107(0x187)]+'\x27',_0x185eb4));if(_0x14e199[_0x590107(0x187)]){const _0x90d5c0=_0x5df10e[_0x590107(0x155)](_0x14e199['next']);_0x90d5c0?.['type']==='merge'&&_0x30d4a3[_0x590107(0x137)](createIssue(_0x590107(0x163),_0x5a636a+_0x590107(0x17f),_0x590107(0x16d),_0x590107(0x17a)+_0x14e199['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x14e199[_0x590107(0x187)]+_0x590107(0x126),_0x185eb4));}}return _0x30d4a3;}function validateJumpStep(_0x3c382a,_0x2420c4,_0x37d88b){const _0x485ea6=a136_0x1625,_0x1e5e1f=[];if(!_0x3c382a[_0x485ea6(0x112)]?.[_0x485ea6(0x11b)])return _0x1e5e1f[_0x485ea6(0x137)](createIssue('error',_0x2420c4+_0x485ea6(0x196),_0x485ea6(0x115),'Jump\x20step\x20requires\x20a\x20target',_0x37d88b,_0x2420c4)),_0x1e5e1f;return(!_0x3c382a[_0x485ea6(0x112)][_0x485ea6(0x11b)][_0x485ea6(0x199)]||!_0x3c382a['with'][_0x485ea6(0x11b)][_0x485ea6(0x139)])&&_0x1e5e1f[_0x485ea6(0x137)](createIssue('error',_0x2420c4+_0x485ea6(0x196),_0x485ea6(0x115),_0x485ea6(0x191),_0x37d88b)),_0x1e5e1f;}function buildConvergenceMap(_0x1d0e4f){const _0x30ace5=a136_0x1625,_0x54e2fc=new Map();function _0x5d2778(_0x414faa,_0x358d81){const _0xae4883=a136_0x1625,_0x23f96b=_0x54e2fc[_0xae4883(0x155)](_0x414faa)||[];_0x23f96b[_0xae4883(0x137)](_0x358d81),_0x54e2fc[_0xae4883(0x135)](_0x414faa,_0x23f96b);}for(const _0x3e2980 of _0x1d0e4f){_0x3e2980[_0x30ace5(0x187)]&&_0x5d2778(_0x3e2980[_0x30ace5(0x187)],{'stepName':_0x3e2980['name'],'description':'step\x20\x27'+_0x3e2980['name']+'\x27'});if(_0x3e2980['type']==='decision_point'&&_0x3e2980[_0x30ace5(0x112)]?.[_0x30ace5(0x10e)])for(const _0x473238 of _0x3e2980[_0x30ace5(0x112)]['branches']){_0x473238[_0x30ace5(0x187)]&&_0x5d2778(_0x473238[_0x30ace5(0x187)],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0x179)+_0x473238['name']+_0x30ace5(0x111)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'});}if(_0x3e2980['type']===_0x30ace5(0x167)&&_0x3e2980['with']?.['variants'])for(const _0x46ff1c of _0x3e2980[_0x30ace5(0x112)]['variants']){_0x46ff1c['next']&&_0x5d2778(_0x46ff1c[_0x30ace5(0x187)],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0x157)+_0x46ff1c[_0x30ace5(0x14b)]+_0x30ace5(0x111)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'});}_0x3e2980[_0x30ace5(0x105)]===_0x30ace5(0x106)&&_0x3e2980['with']?.[_0x30ace5(0x147)]&&(_0x3e2980['with'][_0x30ace5(0x147)][_0x30ace5(0x187)]&&_0x5d2778(_0x3e2980[_0x30ace5(0x112)][_0x30ace5(0x147)]['next'],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0xf5)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'}),_0x3e2980[_0x30ace5(0x112)]['condition'][_0x30ace5(0x132)]?.[_0x30ace5(0x187)]&&_0x5d2778(_0x3e2980['with'][_0x30ace5(0x147)][_0x30ace5(0x132)]['next'],{'stepName':_0x3e2980[_0x30ace5(0x14b)],'description':_0x30ace5(0x109)+_0x3e2980[_0x30ace5(0x14b)]+'\x27'}));}return _0x54e2fc;}function validateFlowControl(_0x5e4458,_0x4bbef2,_0x362af1){const _0x44b9c5=a136_0x1625,_0x178257=[],_0x20e494=_0x44b9c5(0x15d)+_0x4bbef2+']',_0xdbc74=_0x5e4458[_0x44b9c5(0xf4)]||[];if(_0xdbc74['length']===0x0)return _0x178257;const _0x3d4f4c=new Map();for(const _0x1539a0 of _0xdbc74){_0x1539a0[_0x44b9c5(0x14b)]&&_0x3d4f4c[_0x44b9c5(0x135)](_0x1539a0['name'],_0x1539a0);}const _0xf09095=buildConvergenceMap(_0xdbc74),_0x100b9c=_0xdbc74[_0x44b9c5(0x149)](_0x21dda3=>_0x21dda3[_0x44b9c5(0x105)]===_0x44b9c5(0x16f));!_0x100b9c&&_0x178257[_0x44b9c5(0x137)](createIssue(_0x44b9c5(0x121),_0x20e494+_0x44b9c5(0x13e),'MISSING_END_STEP',_0x44b9c5(0x161)+_0x5e4458[_0x44b9c5(0x14b)]+_0x44b9c5(0x150),_0x362af1));for(const [_0x3c559c,_0x1a8d5e]of _0xf09095){const _0x256e05=_0x3d4f4c[_0x44b9c5(0x155)](_0x3c559c);if(!_0x256e05)continue;if(_0x1a8d5e[_0x44b9c5(0x184)]>0x1&&_0x256e05[_0x44b9c5(0x105)]!=='merge'){const _0x3c61f3=_0x1a8d5e[_0x44b9c5(0x188)](_0x7a0435=>_0x7a0435[_0x44b9c5(0x104)])[_0x44b9c5(0x189)](',\x20');_0x178257[_0x44b9c5(0x137)](createIssue(_0x44b9c5(0x121),_0x20e494+_0x44b9c5(0x13e),'CONVERGENCE_WITHOUT_MERGE',_0x44b9c5(0x194)+_0x3c559c+_0x44b9c5(0x100)+_0x3c61f3+_0x44b9c5(0x119),_0x362af1));}_0x1a8d5e[_0x44b9c5(0x184)]===0x1&&_0x256e05[_0x44b9c5(0x105)]===_0x44b9c5(0x19c)&&_0x178257[_0x44b9c5(0x137)](createIssue(_0x44b9c5(0x163),_0x20e494+'.steps',_0x44b9c5(0x13d),'Merge\x20step\x20\x27'+_0x3c559c+_0x44b9c5(0x15e)+_0x1a8d5e[0x0][_0x44b9c5(0x104)]+_0x44b9c5(0x118),_0x362af1));}for(const _0x110bb0 of _0xdbc74){if(_0x110bb0[_0x44b9c5(0x105)]===_0x44b9c5(0x19c)&&_0x110bb0[_0x44b9c5(0x187)]){const _0x107619=_0x3d4f4c[_0x44b9c5(0x155)](_0x110bb0[_0x44b9c5(0x187)]);_0x107619?.['type']===_0x44b9c5(0x19c)&&_0x178257[_0x44b9c5(0x137)](createIssue('error',_0x20e494+'.steps','MERGE_TO_MERGE_CHAIN','Merge\x20step\x20\x27'+_0x110bb0[_0x44b9c5(0x14b)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x110bb0[_0x44b9c5(0x187)]+_0x44b9c5(0x15c),_0x362af1));}}return _0x178257;}function validateCriteria(_0x247996,_0x4d2da0,_0x3db9f0){const _0x28bf72=a136_0x1625,_0x5acaf9=[];return _0x247996[_0x28bf72(0x138)]&&(_0x3db9f0[_0x28bf72(0x127)]?.[_0x28bf72(0xfb)](_0x247996[_0x28bf72(0x138)]),!_0x247996[_0x28bf72(0x138)][_0x28bf72(0x182)](_0x28bf72(0x130))&&(_0x3db9f0[_0x28bf72(0x18f)]&&!_0x3db9f0['embeddedSegments'][_0x28bf72(0x159)](_0x247996[_0x28bf72(0x138)])&&_0x5acaf9[_0x28bf72(0x137)](createIssue('error',_0x4d2da0+_0x28bf72(0x19a),_0x28bf72(0x177),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x247996[_0x28bf72(0x138)]+'\x27',_0x3db9f0)))),_0x5acaf9;}function validateEmbeddedSegment(_0x3d6d13,_0x4a5281,_0x4ea483){const _0x255950=a136_0x1625,_0x3ee037=[];return _0x3d6d13[_0x255950(0x165)]&&_0x3ee037['push'](...validateRuleDef(_0x3d6d13[_0x255950(0x165)],_0x4a5281+'.rule',_0x4ea483)),_0x3ee037;}function validateStage(_0x4888a7,_0x3d9d0d,_0xf26e58,_0x2fde37){const _0x34f3db=a136_0x1625,_0x2e301c=[],_0x2933ca=_0x34f3db(0x15d)+_0x3d9d0d+']',_0x158bde=new Map(),_0x52dbbd=new Map();if(_0x4888a7[_0x34f3db(0xf4)]){for(let _0x353fdb=0x0;_0x353fdb<_0x4888a7[_0x34f3db(0xf4)]['length'];_0x353fdb++){const _0x264822=_0x4888a7[_0x34f3db(0xf4)][_0x353fdb];_0x264822['name']&&_0x158bde[_0x34f3db(0x135)](_0x264822['name'],_0x264822);}for(let _0xa836a7=0x0;_0xa836a7<_0x4888a7[_0x34f3db(0xf4)][_0x34f3db(0x184)];_0xa836a7++){const _0x51cd86=_0x4888a7[_0x34f3db(0xf4)][_0xa836a7],_0xaabbab=_0x2933ca+_0x34f3db(0x18a)+_0xa836a7+']';if(_0x51cd86[_0x34f3db(0x14b)]){if(_0x52dbbd[_0x34f3db(0x159)](_0x51cd86['name'])){const _0x40dd8e=_0x52dbbd['get'](_0x51cd86[_0x34f3db(0x14b)]);_0x2e301c['push'](createIssue(_0x34f3db(0x121),_0xaabbab+'.name',_0x34f3db(0x18c),'Duplicate\x20step\x20name\x20\x27'+_0x51cd86[_0x34f3db(0x14b)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x40dd8e+'])',_0x2fde37));}else _0x52dbbd[_0x34f3db(0x135)](_0x51cd86[_0x34f3db(0x14b)],_0xa836a7);}_0x2e301c[_0x34f3db(0x137)](...validateStep(_0x51cd86,_0xaabbab,_0x2fde37,_0x158bde));}}_0x4888a7['entry_criteria']&&_0x2e301c[_0x34f3db(0x137)](...validateCriteria(_0x4888a7[_0x34f3db(0x180)],_0x2933ca+_0x34f3db(0x168),_0x2fde37));if(_0x4888a7[_0x34f3db(0x176)])for(let _0x47fe2a=0x0;_0x47fe2a<_0x4888a7[_0x34f3db(0x176)][_0x34f3db(0x184)];_0x47fe2a++){_0x2e301c['push'](...validateCriteria(_0x4888a7[_0x34f3db(0x176)][_0x47fe2a],_0x2933ca+_0x34f3db(0x197)+_0x47fe2a+']',_0x2fde37));}return _0x4888a7[_0x34f3db(0x19d)]&&_0x2e301c[_0x34f3db(0x137)](...validateCriteria(_0x4888a7[_0x34f3db(0x19d)],_0x2933ca+_0x34f3db(0xff),_0x2fde37)),_0x2e301c[_0x34f3db(0x137)](...validateStageStructure(_0x4888a7,_0x3d9d0d,_0xf26e58,_0x2fde37)),_0x2e301c[_0x34f3db(0x137)](...validateFlowControl(_0x4888a7,_0x3d9d0d,_0x2fde37)),_0x2e301c;}function validateStagesForVersion(_0x2648f7,_0x4a67f0,_0x1d5ce8,_0x17b79a,_0x5c069c,_0x41f2d5,_0x354961){const _0x304e36=a136_0x1625;if(_0x2648f7[_0x304e36(0x184)]===0x0){_0x5c069c[_0x304e36(0x137)]({'level':_0x304e36(0x121),'path':_0x17b79a+_0x304e36(0x17e),'code':_0x304e36(0xf0),'message':_0x304e36(0x173),'location':getLocationFromPath(_0x1d5ce8['document'],_0x1d5ce8[_0x304e36(0x14f)],[_0x304e36(0x17e)])});return;}const _0x1d815f=new Set();for(const _0x5455af of _0x2648f7){if(_0x5455af[_0x304e36(0xf4)])for(const _0x243413 of _0x5455af['steps']){_0x243413[_0x304e36(0x14b)]&&_0x1d815f['add'](_0x243413[_0x304e36(0x14b)]);}}const _0x3a5989={..._0x1d5ce8,'stepNames':_0x1d815f},_0x387712=validateVersionStructure(_0x2648f7,_0x3a5989);for(const _0x374938 of _0x387712){const _0x4c75f7=_0x17b79a?{..._0x374938,'path':''+_0x17b79a+_0x374938[_0x304e36(0x10c)]}:_0x374938;if(_0x4c75f7[_0x304e36(0x103)]===_0x304e36(0x121))_0x5c069c[_0x304e36(0x137)](_0x4c75f7);else _0x41f2d5['push'](_0x4c75f7);}for(let _0xb38ae8=0x0;_0xb38ae8<_0x2648f7[_0x304e36(0x184)];_0xb38ae8++){const _0x5717aa=validateStage(_0x2648f7[_0xb38ae8],_0xb38ae8,_0x2648f7['length'],_0x3a5989);for(const _0x73dc00 of _0x5717aa){const _0x1d684a=_0x17b79a?{..._0x73dc00,'path':''+_0x17b79a+_0x73dc00[_0x304e36(0x10c)]}:_0x73dc00;if(_0x1d684a[_0x304e36(0x103)]===_0x304e36(0x121))_0x5c069c[_0x304e36(0x137)](_0x1d684a);else _0x41f2d5['push'](_0x1d684a);}}if(_0x4a67f0['goal']){const _0x428d11=_0x354961?.[_0x304e36(0x160)]?_0x304e36(0x16c):_0x17b79a+_0x304e36(0x16c),_0x3836cc=validateCriteria(_0x4a67f0[_0x304e36(0x16c)],_0x428d11,_0x3a5989);for(const _0x499172 of _0x3836cc){if(_0x499172['level']==='error')_0x5c069c[_0x304e36(0x137)](_0x499172);else _0x41f2d5['push'](_0x499172);}}}function a136_0x1625(_0x28dc2a,_0x5658a4){_0x28dc2a=_0x28dc2a-0xef;const _0xfbdd71=a136_0xfbdd();let _0x162568=_0xfbdd71[_0x28dc2a];return _0x162568;}function extractVersionIndex(_0x253fce){const _0x4e18a0=_0x253fce['match'](/^journeys\[(\d+)\]\./);return _0x4e18a0?_0x4e18a0[0x1]:undefined;}function a136_0xfbdd(){const _0x32d81d=['Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','\x20(across\x20','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','exit_criteria','MISSING_SEGMENT_REFERENCE','\x27\x20has\x20no\x20steps','branch\x20\x27','A/B\x20test\x20variant\x20\x27','keys','.with.condition.next','3682aoulNA','stages','.next','entry_criteria','\x27\x20has\x20only\x20','startsWith','symbol','length','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.with.variants','next','map','join','.steps[','Journey\x20has\x20','DUPLICATE_STEP_NAME','variants','ACTIVATION_SCHEMA_ERROR','embeddedSegments','code','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','MISSING_NAME','.with','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','JOURNEY_SCHEMA_ERROR','.with.target','.exit_criteria[','End\x20step\x20\x27','journey','.segment','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','merge','milestone','END_STEP_HAS_NEXT_OR_WITH','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.exit_criteria','versions','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','91953gPsRAu','6474lsPOUI','MISSING_STAGES','.with.branches','activationKeys','journeys','steps','condition\x20of\x20\x27','723iOIzov','MISSING_ACTIVATION_DEFINITION','\x20versions)','segments','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','add','\x27\x20has\x20no\x20exit_criteria\x20defined','3370940wvOjoj','.with.condition.timeout.next','.milestone','\x27\x20(from:\x20','values','Step\x20references\x20non-existent\x20step\x20\x27','level','description','type','wait','indices','.stages','timeout\x20of\x20\x27','versions[','entries','path','MISSING_CONDITIONS','branches','every','.with.condition.timeout','\x27\x20of\x20\x27','with','message','segments.','INVALID_JUMP_TARGET','.type','excluded',').\x20Merge\x20is\x20unnecessary.',').\x20Use\x20a\x20merge\x20step.','UNUSED_EMBEDDED_SEGMENT','target','INVALID_NEXT_REFERENCE','safeParse','.with.activation','journey\x20entry','Journey\x20name\x20is\x20required','error','.with.variants[','state','excluded_','data','\x27\x20with\x20no\x20action\x20in\x20between','referencedSegments','.with.condition','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Journey\x20can\x20have\x20at\x20most\x20one\x20','\x20stages\x20but\x20maximum\x20is\x20','percentage','Journey\x20has\x20no\x20goal\x20defined','FEW_STEPS','1124280CnbUvH','ref:','includes','timeout','155749nXzCRA','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','set','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','push','segment','stage','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','INSUFFICIENT_STEPS','SINGLE_INPUT_MERGE','.steps','\x20with\x20latest:\x20true','.with.branches[','.with.condition.segment','jump','version','Decision\x20branch\x20\x27','activation','MISSING_WAIT_PARAMS','condition','trim','some','size','name','issues','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','activations','source','\x27\x20has\x20no\x20end\x20step','endsWith','latest','document','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','get','970MXpbJK','variant\x20\x27','stepNames','has','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','journeys[','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','stages[','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','TOO_MANY_STAGES','goalIsInherited','Stage\x20\x27','9457mHSXCw','warning','MISSING_MILESTONE','rule','Activation\x20step\x20requires\x20an\x20activation\x20reference','ab_test','.entry_criteria','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','reduce','goal','BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','end','filter','12596968djwrLP'];a136_0xfbdd=function(){return _0x32d81d;};return a136_0xfbdd();}function deduplicateAcrossVersions(_0xf71619){const _0x7f8f23=a136_0x1625,_0x281100=new Map();for(let _0x5b31fb=0x0;_0x5b31fb<_0xf71619[_0x7f8f23(0x184)];_0x5b31fb++){const _0x508d14=_0xf71619[_0x5b31fb][_0x7f8f23(0x190)]+':'+_0xf71619[_0x5b31fb][_0x7f8f23(0x113)],_0x51ade9=extractVersionIndex(_0xf71619[_0x5b31fb][_0x7f8f23(0x10c)]),_0x5b783c=_0x281100[_0x7f8f23(0x155)](_0x508d14);if(_0x5b783c){_0x5b783c[_0x7f8f23(0x107)][_0x7f8f23(0x137)](_0x5b31fb);if(_0x51ade9)_0x5b783c[_0x7f8f23(0x1a2)][_0x7f8f23(0xfb)](_0x51ade9);}else _0x281100[_0x7f8f23(0x135)](_0x508d14,{'indices':[_0x5b31fb],'versions':new Set(_0x51ade9?[_0x51ade9]:[])});}const _0x33db56=new Set();for(const {indices:_0x5ec9d8,versions:_0x54bc5c}of _0x281100[_0x7f8f23(0x101)]()){if(_0x54bc5c[_0x7f8f23(0x14a)]<=0x1)continue;const _0x2d6507=_0xf71619[_0x5ec9d8[0x0]];_0x2d6507['path']=_0x2d6507[_0x7f8f23(0x10c)]['replace'](/^journeys\[\d+\]\./,''),_0x2d6507['message']=_0x2d6507[_0x7f8f23(0x113)]+_0x7f8f23(0x174)+_0x54bc5c['size']+_0x7f8f23(0xf8);for(let _0x54d812=0x1;_0x54d812<_0x5ec9d8[_0x7f8f23(0x184)];_0x54d812++){_0x33db56['add'](_0x5ec9d8[_0x54d812]);}}const _0x5890b8=[..._0x33db56]['sort']((_0x51e088,_0x46c0ec)=>_0x46c0ec-_0x51e088);for(const _0x32d488 of _0x5890b8){_0xf71619['splice'](_0x32d488,0x1);}}export function validateJourneyDef(_0x5cf3ee,_0x3572e7={},_0x5b16db={}){const _0x52d6d6=a136_0x1625;if(_0x5b16db['skipSchema'])return runJourneySemanticChecks(_0x5cf3ee,_0x3572e7);const _0x5adf02=JourneyDefSchema[_0x52d6d6(0x11d)](_0x5cf3ee);if(_0x5adf02['success'])return runJourneySemanticChecks(_0x5adf02[_0x52d6d6(0x125)],_0x3572e7);return zodErrorsToJourneyValidationResult(_0x5adf02[_0x52d6d6(0x121)],_0x3572e7);}function zodErrorsToJourneyValidationResult(_0x378a87,_0x3ba53a){const _0x33a4e4=a136_0x1625,_0x462c29=flattenZodIssues(_0x378a87[_0x33a4e4(0x14c)]),_0xc9af1e=_0x462c29[_0x33a4e4(0x188)](_0x182ce2=>{const _0x21d872=_0x33a4e4,_0xb5dacd=formatZodPath(_0x182ce2[_0x21d872(0x10c)]),_0x25a8c9=mapJourneyZodIssueToCode(_0x182ce2,_0xb5dacd),_0x5b9968=getLocationFromPath(_0x3ba53a['document'],_0x3ba53a[_0x21d872(0x14f)],_0x182ce2['path'][_0x21d872(0x188)](_0x158307=>typeof _0x158307===_0x21d872(0x183)?String(_0x158307):_0x158307));return{'level':_0x21d872(0x121),'path':_0xb5dacd,'code':_0x25a8c9,'message':_0x182ce2['message'],..._0x5b9968&&{'location':_0x5b9968}};});return{'valid':![],'errors':_0xc9af1e,'warnings':[]};}function mapJourneyZodIssueToCode(_0x141ef8,_0x1bff38){const _0x35eb46=a136_0x1625;if(_0x1bff38===_0x35eb46(0x14b))return _0x35eb46(0x192);if(_0x1bff38[_0x35eb46(0x151)](_0x35eb46(0x116))&&_0x1bff38['includes'](_0x35eb46(0xf4)))return'JOURNEY_SCHEMA_ERROR';if(_0x1bff38===_0x35eb46(0x17e)||_0x1bff38[_0x35eb46(0x151)](_0x35eb46(0x108)))return _0x35eb46(0xf0);if(_0x1bff38===''&&_0x141ef8['message'][_0x35eb46(0x131)]('journeys,\x20stages,\x20or\x20versions'))return _0x35eb46(0xf0);if(_0x1bff38[_0x35eb46(0x131)]('activation'))return _0x35eb46(0x18e);return _0x35eb46(0x195);}function runJourneySemanticChecks(_0x217df4,_0x4097e3){const _0xbc7abf=a136_0x1625,_0x5d1970=[],_0x3acc39=[];(!_0x217df4[_0xbc7abf(0x14b)]||_0x217df4[_0xbc7abf(0x14b)][_0xbc7abf(0x148)]()==='')&&_0x5d1970[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x121),'path':'name','code':_0xbc7abf(0x192),'message':_0xbc7abf(0x120),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3['source'],[_0xbc7abf(0x14b)])});const _0x3d8c7d=new Set();if(_0x217df4[_0xbc7abf(0xf9)])for(const _0x107598 of Object[_0xbc7abf(0x17b)](_0x217df4[_0xbc7abf(0xf9)])){_0x3d8c7d[_0xbc7abf(0xfb)](_0x107598);}const _0x3fee57=new Set();if(_0x217df4['activations'])for(const _0x1c6276 of Object[_0xbc7abf(0x17b)](_0x217df4[_0xbc7abf(0x14e)])){_0x3fee57[_0xbc7abf(0xfb)](_0x1c6276);}const _0x2716c6=new Set(),_0x18db2d={..._0x4097e3,'embeddedSegments':_0x3d8c7d,'referencedSegments':_0x2716c6,'activationKeys':_0x3fee57[_0xbc7abf(0x14a)]>0x0?_0x3fee57:undefined};if(_0x217df4[_0xbc7abf(0xf9)])for(const [_0x2d927a,_0x803c58]of Object[_0xbc7abf(0x10b)](_0x217df4[_0xbc7abf(0xf9)])){const _0x24926e=validateEmbeddedSegment(_0x803c58,_0xbc7abf(0x114)+_0x2d927a,_0x18db2d);for(const _0x12f977 of _0x24926e){if(_0x12f977[_0xbc7abf(0x103)]==='error')_0x5d1970[_0xbc7abf(0x137)](_0x12f977);else _0x3acc39[_0xbc7abf(0x137)](_0x12f977);}}const _0x36f055=!!_0x217df4[_0xbc7abf(0x16c)],_0x533bec=_0x217df4[_0xbc7abf(0xf3)]?.[_0xbc7abf(0x10f)](_0x4d0451=>!!_0x4d0451[_0xbc7abf(0x16c)])??![];!_0x36f055&&!_0x533bec&&_0x3acc39[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x163),'path':'goal','code':'MISSING_GOAL','message':_0xbc7abf(0x12d),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3[_0xbc7abf(0x14f)],[_0xbc7abf(0x16c)])});const _0x3c4e2e=_0x217df4[_0xbc7abf(0xf3)]??_0x217df4[_0xbc7abf(0x1a2)];if(_0x3c4e2e&&_0x3c4e2e[_0xbc7abf(0x170)](_0x126d3c=>_0x126d3c[_0xbc7abf(0x152)]===!![])[_0xbc7abf(0x184)]>0x1){const _0xfe4038=_0x217df4['journeys']?_0xbc7abf(0xf3):_0xbc7abf(0x1a2);_0x5d1970[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x121),'path':_0xfe4038,'code':'DUPLICATE_LATEST','message':_0xbc7abf(0x12a)+(_0xfe4038===_0xbc7abf(0xf3)?_0xbc7abf(0x11f):_0xbc7abf(0x143))+_0xbc7abf(0x13f),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3[_0xbc7abf(0x14f)],[_0xfe4038])});}if(_0x217df4['journeys']&&_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)]>0x0)for(let _0x28fd7a=0x0;_0x28fd7a<_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)];_0x28fd7a++){const _0x60659b=_0x217df4[_0xbc7abf(0xf3)][_0x28fd7a];if(_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)]>0x1&&_0x60659b[_0xbc7abf(0x123)]==='launched')continue;const _0x151d44=_0x60659b[_0xbc7abf(0x17e)]||[],_0x448c7d=_0xbc7abf(0x15b)+_0x28fd7a+'].',_0x1aaefe=!!_0x60659b['goal'],_0x1f7832=_0x1aaefe?{..._0x217df4,'goal':_0x60659b['goal']}:_0x217df4;validateStagesForVersion(_0x151d44,_0x1f7832,_0x18db2d,_0x448c7d,_0x5d1970,_0x3acc39,{'goalIsInherited':!_0x1aaefe});}else{if(_0x217df4['versions']&&_0x217df4[_0xbc7abf(0x1a2)][_0xbc7abf(0x184)]>0x0)for(let _0xd5088f=0x0;_0xd5088f<_0x217df4[_0xbc7abf(0x1a2)][_0xbc7abf(0x184)];_0xd5088f++){const _0x4fc608=_0x217df4[_0xbc7abf(0x1a2)][_0xd5088f];if(_0x217df4[_0xbc7abf(0x1a2)]['length']>0x1&&_0x4fc608[_0xbc7abf(0x123)]==='launched')continue;const _0x5a364a=_0x4fc608['stages']||[],_0x1899df=_0xbc7abf(0x10a)+_0xd5088f+'].';validateStagesForVersion(_0x5a364a,_0x217df4,_0x18db2d,_0x1899df,_0x5d1970,_0x3acc39);}else{const _0x5c6060=_0x217df4[_0xbc7abf(0x17e)]||[];validateStagesForVersion(_0x5c6060,_0x217df4,_0x18db2d,'',_0x5d1970,_0x3acc39);}}_0x217df4[_0xbc7abf(0xf3)]&&_0x217df4[_0xbc7abf(0xf3)][_0xbc7abf(0x184)]>0x1&&(deduplicateAcrossVersions(_0x5d1970),deduplicateAcrossVersions(_0x3acc39));for(const _0x115397 of _0x3d8c7d){!_0x2716c6[_0xbc7abf(0x159)](_0x115397)&&!_0x115397[_0xbc7abf(0x182)](_0xbc7abf(0x124))&&_0x3acc39[_0xbc7abf(0x137)]({'level':_0xbc7abf(0x163),'path':_0xbc7abf(0x114)+_0x115397,'code':_0xbc7abf(0x11a),'message':'Embedded\x20segment\x20\x27'+_0x115397+_0xbc7abf(0x154),'location':getLocationFromPath(_0x4097e3[_0xbc7abf(0x153)],_0x4097e3[_0xbc7abf(0x14f)],[_0xbc7abf(0xf9),_0x115397])});}return{'valid':_0x5d1970[_0xbc7abf(0x184)]===0x0,'errors':_0x5d1970,'warnings':_0x3acc39};}
|
|
1
|
+
(function(_0xbdd9a7,_0x26a06f){const _0x38e89d=a136_0xb97e,_0x6f60e0=_0xbdd9a7();while(!![]){try{const _0x572970=-parseInt(_0x38e89d(0x1b2))/0x1+-parseInt(_0x38e89d(0x20f))/0x2+parseInt(_0x38e89d(0x16c))/0x3*(-parseInt(_0x38e89d(0x177))/0x4)+parseInt(_0x38e89d(0x16f))/0x5*(-parseInt(_0x38e89d(0x1ab))/0x6)+parseInt(_0x38e89d(0x16a))/0x7*(-parseInt(_0x38e89d(0x1c5))/0x8)+parseInt(_0x38e89d(0x15f))/0x9+parseInt(_0x38e89d(0x1f9))/0xa;if(_0x572970===_0x26a06f)break;else _0x6f60e0['push'](_0x6f60e0['shift']());}catch(_0x7c2111){_0x6f60e0['push'](_0x6f60e0['shift']());}}}(a136_0x2a93,0x781da));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1b6935,_0x5ba708,_0x1d794b,_0x4a6534,_0x1b226b,_0x8a8239){const _0x215cf5=a136_0xb97e;return{'level':_0x1b6935,'path':_0x5ba708,'code':_0x1d794b,'message':_0x4a6534,'location':getLocationFromPath(_0x1b226b[_0x215cf5(0x1b1)],_0x1b226b[_0x215cf5(0x17d)],pathToArray(_0x8a8239??_0x5ba708))};}function validateVersionStructure(_0x378419,_0x214ebe){const _0x3c510d=a136_0xb97e,_0x2dcb6e=[];return _0x378419[_0x3c510d(0x16b)]>MAX_STAGES&&_0x2dcb6e[_0x3c510d(0x1b5)](createIssue(_0x3c510d(0x17f),_0x3c510d(0x1b3),_0x3c510d(0x185),'Journey\x20has\x20'+_0x378419[_0x3c510d(0x16b)]+_0x3c510d(0x1c1)+MAX_STAGES,_0x214ebe)),_0x2dcb6e;}function validateStageStructure(_0x342d89,_0x1812d4,_0xdea62b,_0x193c11){const _0x537695=a136_0xb97e,_0x520650=[],_0x4d6598='stages['+_0x1812d4+']';_0x1812d4===0x0&&!_0x342d89[_0x537695(0x1f3)]&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x17f),_0x4d6598+_0x537695(0x1a0),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x342d89[_0x537695(0x161)]+_0x537695(0x1ad),_0x193c11,_0x4d6598));const _0x47885b=_0x1812d4===_0xdea62b-0x1;!_0x47885b&&!_0x342d89[_0x537695(0x1bb)]&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x17f),_0x4d6598+_0x537695(0x203),_0x537695(0x20b),_0x537695(0x1fb)+_0x342d89[_0x537695(0x161)]+_0x537695(0x1c0),_0x193c11,_0x4d6598));(!_0x342d89[_0x537695(0x197)]||_0x342d89[_0x537695(0x197)][_0x537695(0x16b)]===0x0)&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x1e7),_0x4d6598+'.exit_criteria',_0x537695(0x184),_0x537695(0x1fb)+_0x342d89['name']+_0x537695(0x175),_0x193c11,_0x4d6598));const _0x4e0afe=_0x342d89[_0x537695(0x1ea)]?.[_0x537695(0x16b)]??0x0;if(_0x4e0afe===0x0)_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x17f),_0x4d6598+'.steps','INSUFFICIENT_STEPS','Stage\x20\x27'+_0x342d89[_0x537695(0x161)]+_0x537695(0x19a),_0x193c11,_0x4d6598+'.steps'));else{if(_0x4e0afe===0x1)_0x520650['push'](createIssue(_0x537695(0x1e7),_0x4d6598+'.steps','INSUFFICIENT_STEPS','Stage\x20\x27'+_0x342d89[_0x537695(0x161)]+_0x537695(0x1f0),_0x193c11,_0x4d6598+_0x537695(0x206)));else _0x4e0afe<=0x3&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x1e7),_0x4d6598+_0x537695(0x206),_0x537695(0x1e4),_0x537695(0x1fb)+_0x342d89[_0x537695(0x161)]+_0x537695(0x1eb)+_0x4e0afe+_0x537695(0x1c9),_0x193c11,_0x4d6598+'.steps'));}return _0x520650;}function validateStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03){const _0x3d0913=a136_0xb97e,_0x1448ee=[];if(_0x4644f9[_0x3d0913(0x1e8)]===_0x3d0913(0x199))return _0x4644f9[_0x3d0913(0x1a6)]&&_0x1448ee[_0x3d0913(0x1b5)](createIssue(_0x3d0913(0x17f),_0x5896ac+'.next',_0x3d0913(0x1c3),_0x3d0913(0x191)+_0x4644f9['name']+_0x3d0913(0x1a1),_0x17db13)),_0x3d0913(0x1ca)in _0x4644f9&&_0x4644f9[_0x3d0913(0x1ca)]!==undefined&&_0x1448ee[_0x3d0913(0x1b5)](createIssue(_0x3d0913(0x17f),_0x5896ac+_0x3d0913(0x183),_0x3d0913(0x1c3),_0x3d0913(0x191)+_0x4644f9[_0x3d0913(0x161)]+_0x3d0913(0x19d),_0x17db13)),_0x1448ee;_0x4644f9[_0x3d0913(0x1a6)]&&(_0x17db13[_0x3d0913(0x194)]&&!_0x17db13[_0x3d0913(0x194)]['has'](_0x4644f9[_0x3d0913(0x1a6)])&&_0x1448ee[_0x3d0913(0x1b5)](createIssue(_0x3d0913(0x17f),_0x5896ac+_0x3d0913(0x17b),_0x3d0913(0x1bc),_0x3d0913(0x1cc)+_0x4644f9['next']+'\x27',_0x17db13)));switch(_0x4644f9['type']){case _0x3d0913(0x1a9):_0x1448ee[_0x3d0913(0x1b5)](...validateWaitStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03));break;case _0x3d0913(0x1ba):_0x1448ee[_0x3d0913(0x1b5)](...validateActivationStep(_0x4644f9,_0x5896ac,_0x17db13));break;case _0x3d0913(0x1a8):_0x1448ee['push'](...validateDecisionPointStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03));break;case _0x3d0913(0x1b8):_0x1448ee[_0x3d0913(0x1b5)](...validateAbTestStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03));break;case _0x3d0913(0x1dc):_0x1448ee[_0x3d0913(0x1b5)](...validateJumpStep(_0x4644f9,_0x5896ac,_0x17db13));break;}return _0x1448ee;}function validateWaitStep(_0x1cae80,_0x587ce1,_0x25b68b,_0x14e134){const _0x3b00ee=a136_0xb97e,_0x46cb10=[];if(!_0x1cae80['with'])return _0x46cb10[_0x3b00ee(0x1b5)](createIssue('error',_0x587ce1+_0x3b00ee(0x183),_0x3b00ee(0x1cb),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x25b68b,_0x587ce1)),_0x46cb10;if(_0x1cae80[_0x3b00ee(0x1ca)][_0x3b00ee(0x1d1)]){const _0x637294=_0x1cae80[_0x3b00ee(0x1ca)][_0x3b00ee(0x1d1)];if(_0x637294[_0x3b00ee(0x1d5)]){_0x25b68b['referencedSegments']?.[_0x3b00ee(0x181)](_0x637294['segment']);!_0x637294[_0x3b00ee(0x1d5)][_0x3b00ee(0x20c)](_0x3b00ee(0x186))&&(_0x25b68b[_0x3b00ee(0x1dd)]&&!_0x25b68b['embeddedSegments'][_0x3b00ee(0x1d0)](_0x637294['segment'])&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue('error',_0x587ce1+_0x3b00ee(0x164),_0x3b00ee(0x1be),_0x3b00ee(0x190)+_0x637294[_0x3b00ee(0x1d5)]+_0x3b00ee(0x1b0),_0x25b68b)));_0x637294[_0x3b00ee(0x1a6)]&&_0x25b68b[_0x3b00ee(0x194)]&&!_0x25b68b['stepNames'][_0x3b00ee(0x1d0)](_0x637294[_0x3b00ee(0x1a6)])&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue(_0x3b00ee(0x17f),_0x587ce1+_0x3b00ee(0x1b6),'INVALID_NEXT_REFERENCE',_0x3b00ee(0x1f2)+_0x637294[_0x3b00ee(0x1a6)]+'\x27',_0x25b68b));_0x637294[_0x3b00ee(0x193)]?.['next']&&_0x25b68b['stepNames']&&!_0x25b68b[_0x3b00ee(0x194)][_0x3b00ee(0x1d0)](_0x637294[_0x3b00ee(0x193)]['next'])&&_0x46cb10['push'](createIssue(_0x3b00ee(0x17f),_0x587ce1+'.with.condition.timeout.next',_0x3b00ee(0x1bc),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x637294[_0x3b00ee(0x193)][_0x3b00ee(0x1a6)]+'\x27',_0x25b68b));const _0x4a1cf0=_0x637294[_0x3b00ee(0x1a6)]||_0x1cae80[_0x3b00ee(0x1a6)],_0x156911=_0x637294[_0x3b00ee(0x193)]?.[_0x3b00ee(0x1a6)]||_0x1cae80['next'];if(_0x4a1cf0){const _0x4f3c57=_0x14e134[_0x3b00ee(0x1d2)](_0x4a1cf0);_0x4f3c57?.[_0x3b00ee(0x1e8)]===_0x3b00ee(0x1de)&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue('warning',_0x587ce1+_0x3b00ee(0x1b6),_0x3b00ee(0x16d),'Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4a1cf0+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x25b68b,_0x587ce1+_0x3b00ee(0x20e)));}if(_0x156911){const _0x31875c=_0x14e134[_0x3b00ee(0x1d2)](_0x156911);_0x31875c?.['type']==='merge'&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue(_0x3b00ee(0x1e7),_0x587ce1+'.with.condition.timeout.next',_0x3b00ee(0x16d),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x156911+_0x3b00ee(0x20d),_0x25b68b,_0x587ce1+'.with.condition.timeout'));}}}return _0x46cb10;}function validateActivationStep(_0x1b3738,_0x52aa39,_0x449808){const _0x35e07f=a136_0xb97e,_0x7ed071=[];if(!_0x1b3738[_0x35e07f(0x1ca)]?.[_0x35e07f(0x1ba)])return _0x7ed071[_0x35e07f(0x1b5)](createIssue('error',_0x52aa39+_0x35e07f(0x208),'MISSING_ACTIVATION_REF',_0x35e07f(0x1ee),_0x449808,_0x52aa39)),_0x7ed071;const _0x1e0a7e=_0x1b3738[_0x35e07f(0x1ca)]['activation'];return _0x449808[_0x35e07f(0x1c7)]&&!_0x1e0a7e[_0x35e07f(0x20c)](_0x35e07f(0x186))&&(!_0x449808[_0x35e07f(0x1c7)]['has'](_0x1e0a7e)&&_0x7ed071[_0x35e07f(0x1b5)](createIssue('error',_0x52aa39+_0x35e07f(0x208),'MISSING_ACTIVATION_DEFINITION','Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x1e0a7e+_0x35e07f(0x1b4),_0x449808))),_0x7ed071;}function validateDecisionPointStep(_0x251799,_0x506094,_0x3703ba,_0x4f3d01){const _0xeb95b=a136_0xb97e,_0x38d3e2=[];if(!_0x251799[_0xeb95b(0x1ca)]?.[_0xeb95b(0x1a5)]||_0x251799['with']['branches'][_0xeb95b(0x16b)]===0x0)return _0x38d3e2[_0xeb95b(0x1b5)](createIssue(_0xeb95b(0x17f),_0x506094+_0xeb95b(0x18c),'MISSING_CONDITIONS',_0xeb95b(0x16e),_0x3703ba,_0x506094)),_0x38d3e2;for(let _0x36f39c=0x0;_0x36f39c<_0x251799['with']['branches'][_0xeb95b(0x16b)];_0x36f39c++){const _0x37cc3c=_0x251799[_0xeb95b(0x1ca)][_0xeb95b(0x1a5)][_0x36f39c],_0x456314=_0x506094+'.with.branches['+_0x36f39c+']';_0x37cc3c[_0xeb95b(0x1d5)]&&!_0x37cc3c[_0xeb95b(0x1a4)]&&(_0x3703ba[_0xeb95b(0x1ce)]?.[_0xeb95b(0x181)](_0x37cc3c[_0xeb95b(0x1d5)]),!_0x37cc3c[_0xeb95b(0x1d5)][_0xeb95b(0x20c)](_0xeb95b(0x186))&&(_0x3703ba[_0xeb95b(0x1dd)]&&!_0x3703ba['embeddedSegments'][_0xeb95b(0x1d0)](_0x37cc3c[_0xeb95b(0x1d5)])&&_0x38d3e2['push'](createIssue(_0xeb95b(0x17f),_0x456314+'.segment',_0xeb95b(0x1be),_0xeb95b(0x196)+_0x37cc3c[_0xeb95b(0x1d5)]+'\x27',_0x3703ba))));_0x37cc3c[_0xeb95b(0x1a6)]&&_0x3703ba['stepNames']&&!_0x3703ba['stepNames'][_0xeb95b(0x1d0)](_0x37cc3c[_0xeb95b(0x1a6)])&&_0x38d3e2[_0xeb95b(0x1b5)](createIssue(_0xeb95b(0x17f),_0x456314+_0xeb95b(0x17b),_0xeb95b(0x1bc),_0xeb95b(0x18d)+_0x37cc3c[_0xeb95b(0x1a6)]+'\x27',_0x3703ba));if(_0x37cc3c['next']){const _0x3d1f66=_0x4f3d01[_0xeb95b(0x1d2)](_0x37cc3c['next']);_0x3d1f66?.[_0xeb95b(0x1e8)]==='merge'&&_0x38d3e2[_0xeb95b(0x1b5)](createIssue(_0xeb95b(0x1e7),_0x456314+_0xeb95b(0x17b),_0xeb95b(0x16d),'Decision\x20branch\x20\x27'+_0x37cc3c[_0xeb95b(0x161)]+_0xeb95b(0x207)+_0x37cc3c['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x3703ba));}}return _0x38d3e2;}function a136_0xb97e(_0x1b0aec,_0xe2369){_0x1b0aec=_0x1b0aec-0x15f;const _0x2a93d2=a136_0x2a93();let _0xb97e9f=_0x2a93d2[_0x1b0aec];return _0xb97e9f;}function validateAbTestStep(_0x4b541e,_0x34f340,_0x4a3d33,_0xd526dd){const _0x3c86cd=a136_0xb97e,_0x1541a9=[];if(!_0x4b541e[_0x3c86cd(0x1ca)]?.['variants']||_0x4b541e[_0x3c86cd(0x1ca)][_0x3c86cd(0x1f5)][_0x3c86cd(0x16b)]===0x0)return _0x1541a9[_0x3c86cd(0x1b5)](createIssue(_0x3c86cd(0x17f),_0x34f340+'.with.variants','MISSING_CONDITIONS',_0x3c86cd(0x172),_0x4a3d33,_0x34f340)),_0x1541a9;const _0x58792d=_0x4b541e[_0x3c86cd(0x1ca)][_0x3c86cd(0x1f5)][_0x3c86cd(0x20a)]((_0x26394d,_0x450f5c)=>_0x26394d+(_0x450f5c[_0x3c86cd(0x1aa)]||0x0),0x0);Math['abs'](_0x58792d-0x64)>0.01&&_0x1541a9[_0x3c86cd(0x1b5)](createIssue(_0x3c86cd(0x17f),_0x34f340+'.with.variants',_0x3c86cd(0x1d8),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x58792d+'%)',_0x4a3d33));for(let _0x2b4f62=0x0;_0x2b4f62<_0x4b541e[_0x3c86cd(0x1ca)][_0x3c86cd(0x1f5)][_0x3c86cd(0x16b)];_0x2b4f62++){const _0x1d8c64=_0x4b541e['with'][_0x3c86cd(0x1f5)][_0x2b4f62],_0x17de47=_0x34f340+_0x3c86cd(0x198)+_0x2b4f62+']';_0x1d8c64[_0x3c86cd(0x1a6)]&&_0x4a3d33['stepNames']&&!_0x4a3d33[_0x3c86cd(0x194)][_0x3c86cd(0x1d0)](_0x1d8c64[_0x3c86cd(0x1a6)])&&_0x1541a9['push'](createIssue(_0x3c86cd(0x17f),_0x17de47+_0x3c86cd(0x17b),_0x3c86cd(0x1bc),_0x3c86cd(0x18a)+_0x1d8c64['next']+'\x27',_0x4a3d33));if(_0x1d8c64[_0x3c86cd(0x1a6)]){const _0xefcc1c=_0xd526dd[_0x3c86cd(0x1d2)](_0x1d8c64['next']);_0xefcc1c?.[_0x3c86cd(0x1e8)]===_0x3c86cd(0x1de)&&_0x1541a9[_0x3c86cd(0x1b5)](createIssue(_0x3c86cd(0x1e7),_0x17de47+_0x3c86cd(0x17b),_0x3c86cd(0x16d),'A/B\x20test\x20variant\x20\x27'+_0x1d8c64[_0x3c86cd(0x161)]+_0x3c86cd(0x207)+_0x1d8c64[_0x3c86cd(0x1a6)]+_0x3c86cd(0x1ed),_0x4a3d33));}}return _0x1541a9;}function validateJumpStep(_0xde5384,_0x49ae44,_0x4a1762){const _0x13d54d=a136_0xb97e,_0x3a0b75=[];if(!_0xde5384['with']?.[_0x13d54d(0x18e)])return _0x3a0b75[_0x13d54d(0x1b5)](createIssue('error',_0x49ae44+'.with.target',_0x13d54d(0x210),_0x13d54d(0x189),_0x4a1762,_0x49ae44)),_0x3a0b75;return(!_0xde5384['with'][_0x13d54d(0x18e)][_0x13d54d(0x1ff)]||!_0xde5384['with'][_0x13d54d(0x18e)][_0x13d54d(0x1ae)])&&_0x3a0b75['push'](createIssue('error',_0x49ae44+_0x13d54d(0x162),_0x13d54d(0x210),_0x13d54d(0x1e0),_0x4a1762)),_0x3a0b75;}function buildConvergenceMap(_0x58bed0){const _0x57ef7e=a136_0xb97e,_0x1ea1cf=new Map();function _0x32a5ad(_0x133531,_0x2b77c3){const _0x127a97=a136_0xb97e,_0x1564cf=_0x1ea1cf['get'](_0x133531)||[];_0x1564cf[_0x127a97(0x1b5)](_0x2b77c3),_0x1ea1cf[_0x127a97(0x166)](_0x133531,_0x1564cf);}for(const _0x2ad3bb of _0x58bed0){_0x2ad3bb['next']&&_0x32a5ad(_0x2ad3bb[_0x57ef7e(0x1a6)],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x202)+_0x2ad3bb['name']+'\x27'});if(_0x2ad3bb[_0x57ef7e(0x1e8)]===_0x57ef7e(0x1a8)&&_0x2ad3bb[_0x57ef7e(0x1ca)]?.[_0x57ef7e(0x1a5)])for(const _0x26d868 of _0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1a5)]){_0x26d868['next']&&_0x32a5ad(_0x26d868['next'],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x201)+_0x26d868[_0x57ef7e(0x161)]+_0x57ef7e(0x1c6)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'});}if(_0x2ad3bb['type']===_0x57ef7e(0x1b8)&&_0x2ad3bb[_0x57ef7e(0x1ca)]?.[_0x57ef7e(0x1f5)])for(const _0x5552d2 of _0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1f5)]){_0x5552d2[_0x57ef7e(0x1a6)]&&_0x32a5ad(_0x5552d2['next'],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':'variant\x20\x27'+_0x5552d2['name']+_0x57ef7e(0x1c6)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'});}_0x2ad3bb[_0x57ef7e(0x1e8)]==='wait'&&_0x2ad3bb[_0x57ef7e(0x1ca)]?.[_0x57ef7e(0x1d1)]&&(_0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1d1)][_0x57ef7e(0x1a6)]&&_0x32a5ad(_0x2ad3bb[_0x57ef7e(0x1ca)]['condition'][_0x57ef7e(0x1a6)],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x1b7)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'}),_0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1d1)][_0x57ef7e(0x193)]?.['next']&&_0x32a5ad(_0x2ad3bb[_0x57ef7e(0x1ca)]['condition'][_0x57ef7e(0x193)][_0x57ef7e(0x1a6)],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x1f6)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'}));}return _0x1ea1cf;}function validateFlowControl(_0x42c604,_0x1c99f7,_0x76c4c8){const _0x5112f6=a136_0xb97e,_0x4bd592=[],_0x5ce7bf=_0x5112f6(0x1f8)+_0x1c99f7+']',_0x48a374=_0x42c604['steps']||[];if(_0x48a374['length']===0x0)return _0x4bd592;const _0x596cbe=new Map();for(const _0xea5c0a of _0x48a374){_0xea5c0a['name']&&_0x596cbe[_0x5112f6(0x166)](_0xea5c0a['name'],_0xea5c0a);}const _0x545812=buildConvergenceMap(_0x48a374),_0x6f0016=_0x48a374[_0x5112f6(0x1f4)](_0x2acda2=>_0x2acda2[_0x5112f6(0x1e8)]===_0x5112f6(0x199));!_0x6f0016&&_0x4bd592[_0x5112f6(0x1b5)](createIssue(_0x5112f6(0x17f),_0x5ce7bf+_0x5112f6(0x206),_0x5112f6(0x1fc),_0x5112f6(0x1fb)+_0x42c604[_0x5112f6(0x161)]+'\x27\x20has\x20no\x20end\x20step',_0x76c4c8));for(const [_0x2b7bd8,_0x303d72]of _0x545812){const _0x450935=_0x596cbe['get'](_0x2b7bd8);if(!_0x450935)continue;if(_0x303d72[_0x5112f6(0x16b)]>0x1&&_0x450935[_0x5112f6(0x1e8)]!==_0x5112f6(0x1de)){const _0x1d2567=_0x303d72[_0x5112f6(0x1df)](_0x232a6a=>_0x232a6a[_0x5112f6(0x1e3)])[_0x5112f6(0x1fa)](',\x20');_0x4bd592['push'](createIssue(_0x5112f6(0x17f),_0x5ce7bf+'.steps',_0x5112f6(0x1f1),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x2b7bd8+_0x5112f6(0x160)+_0x1d2567+_0x5112f6(0x1ef),_0x76c4c8));}_0x303d72['length']===0x1&&_0x450935[_0x5112f6(0x1e8)]===_0x5112f6(0x1de)&&_0x4bd592[_0x5112f6(0x1b5)](createIssue(_0x5112f6(0x1e7),_0x5ce7bf+_0x5112f6(0x206),_0x5112f6(0x178),_0x5112f6(0x180)+_0x2b7bd8+_0x5112f6(0x179)+_0x303d72[0x0][_0x5112f6(0x1e3)]+_0x5112f6(0x19f),_0x76c4c8));}for(const _0x50ce0f of _0x48a374){if(_0x50ce0f[_0x5112f6(0x1e8)]==='merge'&&_0x50ce0f[_0x5112f6(0x1a6)]){const _0x3a834d=_0x596cbe[_0x5112f6(0x1d2)](_0x50ce0f[_0x5112f6(0x1a6)]);_0x3a834d?.[_0x5112f6(0x1e8)]===_0x5112f6(0x1de)&&_0x4bd592[_0x5112f6(0x1b5)](createIssue(_0x5112f6(0x17f),_0x5ce7bf+_0x5112f6(0x206),_0x5112f6(0x1c8),_0x5112f6(0x180)+_0x50ce0f[_0x5112f6(0x161)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x50ce0f[_0x5112f6(0x1a6)]+_0x5112f6(0x167),_0x76c4c8));}}return _0x4bd592;}function validateCriteria(_0x57287b,_0x6b1ce3,_0x267bf4){const _0x2942f9=a136_0xb97e,_0x46fbfb=[];return _0x57287b[_0x2942f9(0x1d5)]&&(_0x267bf4['referencedSegments']?.[_0x2942f9(0x181)](_0x57287b[_0x2942f9(0x1d5)]),!_0x57287b[_0x2942f9(0x1d5)][_0x2942f9(0x20c)](_0x2942f9(0x186))&&(_0x267bf4[_0x2942f9(0x1dd)]&&!_0x267bf4[_0x2942f9(0x1dd)][_0x2942f9(0x1d0)](_0x57287b['segment'])&&_0x46fbfb[_0x2942f9(0x1b5)](createIssue('error',_0x6b1ce3+'.segment',_0x2942f9(0x1be),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x57287b[_0x2942f9(0x1d5)]+'\x27',_0x267bf4)))),_0x46fbfb;}function validateEmbeddedSegment(_0xc7556f,_0x3b541b,_0x24320e){const _0x394db3=a136_0xb97e,_0x3ba3ed=[];return _0xc7556f[_0x394db3(0x1ac)]&&_0x3ba3ed['push'](...validateRuleDef(_0xc7556f[_0x394db3(0x1ac)],_0x3b541b+'.rule',_0x24320e)),_0x3ba3ed;}function a136_0x2a93(){const _0xe2f28f=['every',').\x20Merge\x20is\x20unnecessary.','.entry_criteria','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','MISSING_NAME','MISSING_STAGES','excluded','branches','next','path','decision_point','wait','percentage','3850086wHVWhG','rule','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','stage','.steps[','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','document','187629SueZsV','stages','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','push','.with.condition.next','condition\x20of\x20\x27','ab_test','DUPLICATE_LATEST','activation','milestone','INVALID_NEXT_REFERENCE','trim','MISSING_SEGMENT_REFERENCE','DUPLICATE_STEP_NAME','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','\x20stages\x20but\x20maximum\x20is\x20','replace','END_STEP_HAS_NEXT_OR_WITH','Duplicate\x20step\x20name\x20\x27','56dPIXuJ','\x27\x20of\x20\x27','activationKeys','MERGE_TO_MERGE_CHAIN','\x20steps\x20(may\x20be\x20too\x20simple)','with','MISSING_WAIT_PARAMS','Step\x20references\x20non-existent\x20step\x20\x27','match','referencedSegments','goal','has','condition','get','\x20versions)','issues','segment','level','activations','INVALID_AB_TEST_PERCENTAGES','\x20(across\x20','Journey\x20has\x20no\x20goal\x20defined','latest','jump','embeddedSegments','merge','map','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','journeys[','excluded_','description','FEW_STEPS','.stages','code','warning','type','segments.','steps','\x27\x20has\x20only\x20','sort','\x27\x20with\x20no\x20action\x20in\x20between','Activation\x20step\x20requires\x20an\x20activation\x20reference',').\x20Use\x20a\x20merge\x20step.','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','CONVERGENCE_WITHOUT_MERGE','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','entry_criteria','some','variants','timeout\x20of\x20\x27','symbol','stages[','17788360RxmwVm','join','Stage\x20\x27','MISSING_END_STEP','journey\x20entry','keys','journey','size','branch\x20\x27','step\x20\x27','.milestone','\x20with\x20latest:\x20true','success','.steps','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.activation','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','reduce','MISSING_MILESTONE','startsWith','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','.with.condition','356182hAQbcE','INVALID_JUMP_TARGET','Journey\x20name\x20is\x20required','values','1570086udEvGe','\x27\x20(from:\x20','name','.with.target','includes','.with.condition.segment','versions','set','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','entries','segments','371945VGOUru','length','30RWGMrV','BRANCH_DIRECTLY_TO_MERGE','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','5AmsRGA','JOURNEY_SCHEMA_ERROR','version','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','UNUSED_EMBEDDED_SEGMENT','Embedded\x20segment\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','.name','32780sCqack','SINGLE_INPUT_MERGE','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','data','.next','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','source','journeys,\x20stages,\x20or\x20versions','error','Merge\x20step\x20\x27','add','message','.with','MISSING_EXIT_CRITERIA','TOO_MANY_STAGES','ref:','\x27\x20(first\x20defined\x20at\x20steps[','endsWith','Jump\x20step\x20requires\x20a\x20target','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_GOAL','.with.branches','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','target','safeParse','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','End\x20step\x20\x27','ACTIVATION_SCHEMA_ERROR','timeout','stepNames','journeys','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','exit_criteria','.with.variants[','end','\x27\x20has\x20no\x20steps','launched','state','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field'];a136_0x2a93=function(){return _0xe2f28f;};return a136_0x2a93();}function validateStage(_0x44e517,_0x568a70,_0xbddd19,_0x4e1f13){const _0xead9a7=a136_0xb97e,_0x5afced=[],_0x3bdc81=_0xead9a7(0x1f8)+_0x568a70+']',_0x54ab7a=new Map(),_0x33ec70=new Map();if(_0x44e517[_0xead9a7(0x1ea)]){for(let _0x1f95a2=0x0;_0x1f95a2<_0x44e517[_0xead9a7(0x1ea)][_0xead9a7(0x16b)];_0x1f95a2++){const _0xb12cc=_0x44e517[_0xead9a7(0x1ea)][_0x1f95a2];_0xb12cc['name']&&_0x54ab7a['set'](_0xb12cc[_0xead9a7(0x161)],_0xb12cc);}for(let _0x541758=0x0;_0x541758<_0x44e517[_0xead9a7(0x1ea)][_0xead9a7(0x16b)];_0x541758++){const _0x17b33d=_0x44e517[_0xead9a7(0x1ea)][_0x541758],_0x110ffc=_0x3bdc81+_0xead9a7(0x1af)+_0x541758+']';if(_0x17b33d['name']){if(_0x33ec70[_0xead9a7(0x1d0)](_0x17b33d[_0xead9a7(0x161)])){const _0x171ba4=_0x33ec70[_0xead9a7(0x1d2)](_0x17b33d[_0xead9a7(0x161)]);_0x5afced[_0xead9a7(0x1b5)](createIssue(_0xead9a7(0x17f),_0x110ffc+_0xead9a7(0x176),_0xead9a7(0x1bf),_0xead9a7(0x1c4)+_0x17b33d[_0xead9a7(0x161)]+_0xead9a7(0x187)+_0x171ba4+'])',_0x4e1f13));}else _0x33ec70[_0xead9a7(0x166)](_0x17b33d['name'],_0x541758);}_0x5afced['push'](...validateStep(_0x17b33d,_0x110ffc,_0x4e1f13,_0x54ab7a));}}_0x44e517['entry_criteria']&&_0x5afced[_0xead9a7(0x1b5)](...validateCriteria(_0x44e517[_0xead9a7(0x1f3)],_0x3bdc81+'.entry_criteria',_0x4e1f13));if(_0x44e517[_0xead9a7(0x197)])for(let _0x3ff2b1=0x0;_0x3ff2b1<_0x44e517[_0xead9a7(0x197)]['length'];_0x3ff2b1++){_0x5afced[_0xead9a7(0x1b5)](...validateCriteria(_0x44e517[_0xead9a7(0x197)][_0x3ff2b1],_0x3bdc81+'.exit_criteria['+_0x3ff2b1+']',_0x4e1f13));}return _0x44e517[_0xead9a7(0x1bb)]&&_0x5afced[_0xead9a7(0x1b5)](...validateCriteria(_0x44e517[_0xead9a7(0x1bb)],_0x3bdc81+_0xead9a7(0x203),_0x4e1f13)),_0x5afced[_0xead9a7(0x1b5)](...validateStageStructure(_0x44e517,_0x568a70,_0xbddd19,_0x4e1f13)),_0x5afced['push'](...validateFlowControl(_0x44e517,_0x568a70,_0x4e1f13)),_0x5afced;}function validateStagesForVersion(_0x3a95a4,_0x11ddfa,_0x3c7ffb,_0x31258c,_0x5c1887,_0x1c5152,_0x52e0b5){const _0x3c1e23=a136_0xb97e;if(_0x3a95a4['length']===0x0){_0x5c1887[_0x3c1e23(0x1b5)]({'level':'error','path':_0x31258c+_0x3c1e23(0x1b3),'code':_0x3c1e23(0x1a3),'message':_0x3c1e23(0x17c),'location':getLocationFromPath(_0x3c7ffb[_0x3c1e23(0x1b1)],_0x3c7ffb['source'],['stages'])});return;}const _0x3e23cf=new Set();for(const _0x3cc42a of _0x3a95a4){if(_0x3cc42a[_0x3c1e23(0x1ea)])for(const _0x574435 of _0x3cc42a[_0x3c1e23(0x1ea)]){_0x574435['name']&&_0x3e23cf['add'](_0x574435[_0x3c1e23(0x161)]);}}const _0x221431={..._0x3c7ffb,'stepNames':_0x3e23cf},_0x15fbfb=validateVersionStructure(_0x3a95a4,_0x221431);for(const _0x58aabc of _0x15fbfb){const _0x38d897=_0x31258c?{..._0x58aabc,'path':''+_0x31258c+_0x58aabc[_0x3c1e23(0x1a7)]}:_0x58aabc;if(_0x38d897[_0x3c1e23(0x1d6)]===_0x3c1e23(0x17f))_0x5c1887[_0x3c1e23(0x1b5)](_0x38d897);else _0x1c5152[_0x3c1e23(0x1b5)](_0x38d897);}for(let _0x52ee82=0x0;_0x52ee82<_0x3a95a4['length'];_0x52ee82++){const _0x91cce0=validateStage(_0x3a95a4[_0x52ee82],_0x52ee82,_0x3a95a4[_0x3c1e23(0x16b)],_0x221431);for(const _0x8782b2 of _0x91cce0){const _0x508bb2=_0x31258c?{..._0x8782b2,'path':''+_0x31258c+_0x8782b2[_0x3c1e23(0x1a7)]}:_0x8782b2;if(_0x508bb2['level']==='error')_0x5c1887['push'](_0x508bb2);else _0x1c5152['push'](_0x508bb2);}}if(_0x11ddfa[_0x3c1e23(0x1cf)]){const _0x53272b=_0x52e0b5?.['goalIsInherited']?_0x3c1e23(0x1cf):_0x31258c+_0x3c1e23(0x1cf),_0x2e673b=validateCriteria(_0x11ddfa[_0x3c1e23(0x1cf)],_0x53272b,_0x221431);for(const _0x732c06 of _0x2e673b){if(_0x732c06[_0x3c1e23(0x1d6)]===_0x3c1e23(0x17f))_0x5c1887['push'](_0x732c06);else _0x1c5152[_0x3c1e23(0x1b5)](_0x732c06);}}}function extractVersionIndex(_0x1f454d){const _0x39f960=a136_0xb97e,_0x112ccb=_0x1f454d[_0x39f960(0x1cd)](/^journeys\[(\d+)\]\./);return _0x112ccb?_0x112ccb[0x1]:undefined;}function deduplicateAcrossVersions(_0x2edfaf){const _0x2d002b=a136_0xb97e,_0x169965=new Map();for(let _0x361725=0x0;_0x361725<_0x2edfaf[_0x2d002b(0x16b)];_0x361725++){const _0x3c0ef6=_0x2edfaf[_0x361725][_0x2d002b(0x1e6)]+':'+_0x2edfaf[_0x361725][_0x2d002b(0x182)],_0x1604e8=extractVersionIndex(_0x2edfaf[_0x361725][_0x2d002b(0x1a7)]),_0xe2772f=_0x169965['get'](_0x3c0ef6);if(_0xe2772f){_0xe2772f['indices']['push'](_0x361725);if(_0x1604e8)_0xe2772f[_0x2d002b(0x165)][_0x2d002b(0x181)](_0x1604e8);}else _0x169965[_0x2d002b(0x166)](_0x3c0ef6,{'indices':[_0x361725],'versions':new Set(_0x1604e8?[_0x1604e8]:[])});}const _0x5b35d1=new Set();for(const {indices:_0x50a24b,versions:_0x264b24}of _0x169965[_0x2d002b(0x212)]()){if(_0x264b24[_0x2d002b(0x200)]<=0x1)continue;const _0x5b2c92=_0x2edfaf[_0x50a24b[0x0]];_0x5b2c92[_0x2d002b(0x1a7)]=_0x5b2c92['path'][_0x2d002b(0x1c2)](/^journeys\[\d+\]\./,''),_0x5b2c92['message']=_0x5b2c92[_0x2d002b(0x182)]+_0x2d002b(0x1d9)+_0x264b24[_0x2d002b(0x200)]+_0x2d002b(0x1d3);for(let _0x4d831e=0x1;_0x4d831e<_0x50a24b[_0x2d002b(0x16b)];_0x4d831e++){_0x5b35d1['add'](_0x50a24b[_0x4d831e]);}}const _0xd6e3b0=[..._0x5b35d1][_0x2d002b(0x1ec)]((_0x2a85cc,_0x2406eb)=>_0x2406eb-_0x2a85cc);for(const _0x2c73aa of _0xd6e3b0){_0x2edfaf['splice'](_0x2c73aa,0x1);}}export function validateJourneyDef(_0x1984db,_0x2ef280={},_0x1787a2={}){const _0x3a356c=a136_0xb97e;if(_0x1787a2['skipSchema'])return runJourneySemanticChecks(_0x1984db,_0x2ef280);const _0x3356b1=JourneyDefSchema[_0x3a356c(0x18f)](_0x1984db);if(_0x3356b1[_0x3a356c(0x205)])return runJourneySemanticChecks(_0x3356b1[_0x3a356c(0x17a)],_0x2ef280);return zodErrorsToJourneyValidationResult(_0x3356b1[_0x3a356c(0x17f)],_0x2ef280);}function zodErrorsToJourneyValidationResult(_0x13d2c2,_0x549991){const _0x3a5426=a136_0xb97e,_0x1f0cf2=flattenZodIssues(_0x13d2c2[_0x3a5426(0x1d4)]),_0x4132a1=_0x1f0cf2['map'](_0xa67c5c=>{const _0x357ea9=_0x3a5426,_0x1adce=formatZodPath(_0xa67c5c[_0x357ea9(0x1a7)]),_0x202993=mapJourneyZodIssueToCode(_0xa67c5c,_0x1adce),_0x4e471e=getLocationFromPath(_0x549991['document'],_0x549991[_0x357ea9(0x17d)],_0xa67c5c[_0x357ea9(0x1a7)][_0x357ea9(0x1df)](_0x331cac=>typeof _0x331cac===_0x357ea9(0x1f7)?String(_0x331cac):_0x331cac));return{'level':_0x357ea9(0x17f),'path':_0x1adce,'code':_0x202993,'message':_0xa67c5c[_0x357ea9(0x182)],..._0x4e471e&&{'location':_0x4e471e}};});return{'valid':![],'errors':_0x4132a1,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2d29a9,_0x29744e){const _0x302de7=a136_0xb97e;if(_0x29744e===_0x302de7(0x161))return _0x302de7(0x1a2);if(_0x29744e[_0x302de7(0x188)]('.type')&&_0x29744e[_0x302de7(0x163)](_0x302de7(0x1ea)))return _0x302de7(0x170);if(_0x29744e===_0x302de7(0x1b3)||_0x29744e[_0x302de7(0x188)](_0x302de7(0x1e5)))return'MISSING_STAGES';if(_0x29744e===''&&_0x2d29a9[_0x302de7(0x182)][_0x302de7(0x163)](_0x302de7(0x17e)))return _0x302de7(0x1a3);if(_0x29744e[_0x302de7(0x163)](_0x302de7(0x1ba)))return _0x302de7(0x192);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x57a27f,_0x30e97e){const _0x1d4f67=a136_0xb97e,_0x4f1c3c=[],_0x417608=[];(!_0x57a27f[_0x1d4f67(0x161)]||_0x57a27f[_0x1d4f67(0x161)][_0x1d4f67(0x1bd)]()==='')&&_0x4f1c3c[_0x1d4f67(0x1b5)]({'level':_0x1d4f67(0x17f),'path':_0x1d4f67(0x161),'code':'MISSING_NAME','message':_0x1d4f67(0x211),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x1d4f67(0x161)])});const _0x4c008e=new Set();if(_0x57a27f[_0x1d4f67(0x169)])for(const _0x1cd5b8 of Object['keys'](_0x57a27f['segments'])){_0x4c008e[_0x1d4f67(0x181)](_0x1cd5b8);}const _0x4e91a6=new Set();if(_0x57a27f[_0x1d4f67(0x1d7)])for(const _0x13167a of Object[_0x1d4f67(0x1fe)](_0x57a27f[_0x1d4f67(0x1d7)])){_0x4e91a6[_0x1d4f67(0x181)](_0x13167a);}const _0x4c0948=new Set(),_0x38a9d1={..._0x30e97e,'embeddedSegments':_0x4c008e,'referencedSegments':_0x4c0948,'activationKeys':_0x4e91a6[_0x1d4f67(0x200)]>0x0?_0x4e91a6:undefined};if(_0x57a27f['segments'])for(const [_0x57d906,_0x2718bb]of Object[_0x1d4f67(0x168)](_0x57a27f[_0x1d4f67(0x169)])){const _0x5ecf32=validateEmbeddedSegment(_0x2718bb,_0x1d4f67(0x1e9)+_0x57d906,_0x38a9d1);for(const _0x29a000 of _0x5ecf32){if(_0x29a000[_0x1d4f67(0x1d6)]===_0x1d4f67(0x17f))_0x4f1c3c[_0x1d4f67(0x1b5)](_0x29a000);else _0x417608[_0x1d4f67(0x1b5)](_0x29a000);}}const _0x3ce392=!!_0x57a27f[_0x1d4f67(0x1cf)],_0x2c29f1=_0x57a27f[_0x1d4f67(0x195)]?.[_0x1d4f67(0x19e)](_0x1dcc62=>!!_0x1dcc62[_0x1d4f67(0x1cf)])??![];!_0x3ce392&&!_0x2c29f1&&_0x417608[_0x1d4f67(0x1b5)]({'level':_0x1d4f67(0x1e7),'path':'goal','code':_0x1d4f67(0x18b),'message':_0x1d4f67(0x1da),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x1d4f67(0x1cf)])});const _0x88112d=_0x57a27f[_0x1d4f67(0x195)]??_0x57a27f[_0x1d4f67(0x165)];if(_0x88112d&&_0x88112d['filter'](_0x56fade=>_0x56fade[_0x1d4f67(0x1db)]===!![])[_0x1d4f67(0x16b)]>0x1){const _0x29d3f2=_0x57a27f[_0x1d4f67(0x195)]?_0x1d4f67(0x195):_0x1d4f67(0x165);_0x4f1c3c[_0x1d4f67(0x1b5)]({'level':_0x1d4f67(0x17f),'path':_0x29d3f2,'code':_0x1d4f67(0x1b9),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x29d3f2===_0x1d4f67(0x195)?_0x1d4f67(0x1fd):_0x1d4f67(0x171))+_0x1d4f67(0x204),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x29d3f2])});}if(_0x57a27f['journeys']&&_0x57a27f['journeys'][_0x1d4f67(0x16b)]>0x0)for(let _0x399b47=0x0;_0x399b47<_0x57a27f['journeys'][_0x1d4f67(0x16b)];_0x399b47++){const _0x458037=_0x57a27f[_0x1d4f67(0x195)][_0x399b47];if(_0x57a27f[_0x1d4f67(0x195)][_0x1d4f67(0x16b)]>0x1&&_0x458037[_0x1d4f67(0x19c)]===_0x1d4f67(0x19b))continue;const _0x5ad5f4=_0x458037['stages']||[],_0x1f11ef=_0x1d4f67(0x1e1)+_0x399b47+'].',_0x2b901f=!!_0x458037[_0x1d4f67(0x1cf)],_0x53003e=_0x2b901f?{..._0x57a27f,'goal':_0x458037[_0x1d4f67(0x1cf)]}:_0x57a27f;validateStagesForVersion(_0x5ad5f4,_0x53003e,_0x38a9d1,_0x1f11ef,_0x4f1c3c,_0x417608,{'goalIsInherited':!_0x2b901f});}else{if(_0x57a27f[_0x1d4f67(0x165)]&&_0x57a27f['versions'][_0x1d4f67(0x16b)]>0x0)for(let _0x3ffc7a=0x0;_0x3ffc7a<_0x57a27f[_0x1d4f67(0x165)][_0x1d4f67(0x16b)];_0x3ffc7a++){const _0x4bdabb=_0x57a27f[_0x1d4f67(0x165)][_0x3ffc7a];if(_0x57a27f[_0x1d4f67(0x165)][_0x1d4f67(0x16b)]>0x1&&_0x4bdabb[_0x1d4f67(0x19c)]===_0x1d4f67(0x19b))continue;const _0x12daf6=_0x4bdabb[_0x1d4f67(0x1b3)]||[],_0x11319a='versions['+_0x3ffc7a+'].';validateStagesForVersion(_0x12daf6,_0x57a27f,_0x38a9d1,_0x11319a,_0x4f1c3c,_0x417608);}else{const _0x24dae9=_0x57a27f[_0x1d4f67(0x1b3)]||[];validateStagesForVersion(_0x24dae9,_0x57a27f,_0x38a9d1,'',_0x4f1c3c,_0x417608);}}_0x57a27f[_0x1d4f67(0x195)]&&_0x57a27f[_0x1d4f67(0x195)][_0x1d4f67(0x16b)]>0x1&&(deduplicateAcrossVersions(_0x4f1c3c),deduplicateAcrossVersions(_0x417608));for(const _0x36fcda of _0x4c008e){!_0x4c0948[_0x1d4f67(0x1d0)](_0x36fcda)&&!_0x36fcda[_0x1d4f67(0x20c)](_0x1d4f67(0x1e2))&&_0x417608[_0x1d4f67(0x1b5)]({'level':'warning','path':_0x1d4f67(0x1e9)+_0x36fcda,'code':_0x1d4f67(0x173),'message':_0x1d4f67(0x174)+_0x36fcda+_0x1d4f67(0x209),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x1d4f67(0x169),_0x36fcda])});}return{'valid':_0x4f1c3c[_0x1d4f67(0x16b)]===0x0,'errors':_0x4f1c3c,'warnings':_0x417608};}
|