@treasuredata/tdx 2026.3.9 → 2026.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.d.ts +2 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.d.ts +12 -0
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52bfa0,_0x457b15){const _0x5ee392=a131_0x2aa4,_0x32872f=_0x52bfa0();while(!![]){try{const _0x5e7bc4=parseInt(_0x5ee392(0x18b))/0x1+-parseInt(_0x5ee392(0x1c2))/0x2*(-parseInt(_0x5ee392(0x198))/0x3)+-parseInt(_0x5ee392(0x1bb))/0x4+-parseInt(_0x5ee392(0x1b2))/0x5*(-parseInt(_0x5ee392(0x1a1))/0x6)+parseInt(_0x5ee392(0x19c))/0x7+parseInt(_0x5ee392(0x1bf))/0x8*(parseInt(_0x5ee392(0x1c0))/0x9)+-parseInt(_0x5ee392(0x1b6))/0xa;if(_0x5e7bc4===_0x457b15)break;else _0x32872f['push'](_0x32872f['shift']());}catch(_0x313f6d){_0x32872f['push'](_0x32872f['shift']());}}}(a131_0x44c4,0xee058));import a131_0x646f4e from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x4de83c){const _0x477a87=a131_0x2aa4,_0x458fab=_0x4de83c[_0x477a87(0x19e)][_0x477a87(0x197)](_0x138870=>({'column_name':_0x138870[_0x477a87(0x1ad)],'column_type':_0x138870[_0x477a87(0x1a8)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x4de83c,'columns':[{'name':_0x477a87(0x1b8),'type':_0x477a87(0x1b9)},{'name':_0x477a87(0x1be),'type':_0x477a87(0x1b9)},{'name':'null','type':_0x477a87(0x1b9)},{'name':_0x477a87(0x1a2),'type':_0x477a87(0x1b9)},{'name':'default','type':'varchar'},{'name':_0x477a87(0x193),'type':_0x477a87(0x1b9)}],'data':_0x458fab};}export async function executeSchemaQuery(_0x28d75f,_0x4e97a6,_0x15a307){const _0x6aac4b=a131_0x2aa4,_0x5d0c15=_0x28d75f[_0x6aac4b(0x192)]()['replace'](/;+$/,''),_0xc7d5b='SELECT\x20*\x20FROM\x20(\x0a'+_0x5d0c15+_0x6aac4b(0x194);_0x15a307[_0x6aac4b(0x1b5)]&&console[_0x6aac4b(0x1a4)](_0x6aac4b(0x191)+_0xc7d5b);const _0x52f0bf=await withProgressSpinner(_0x6aac4b(0x1b0),async _0x33095=>{const _0x35f33c=_0x6aac4b,_0x519123=await _0x4e97a6[_0x35f33c(0x1bc)][_0x35f33c(0x1a3)](_0xc7d5b,{'catalog':'td','schema':_0x35f33c(0x1aa),'onJobId':_0x321840=>{const _0x1fa3cb=_0x35f33c;_0x33095[_0x1fa3cb(0x18a)](_0x321840);}});return _0x519123;},{'verbose':_0x15a307['verbose']});return buildSchemaResult(_0x52f0bf['data']);}function columnName(_0xbba3c8){const _0x19ed3a=a131_0x2aa4;return _0xbba3c8[_0x19ed3a(0x18d)]||_0xbba3c8['parentColumn']||_0xbba3c8[_0x19ed3a(0x1ad)];}function a131_0x2aa4(_0x3e3823,_0x1d1299){_0x3e3823=_0x3e3823-0x18a;const _0x44c448=a131_0x44c4();let _0x2aa447=_0x44c448[_0x3e3823];return _0x2aa447;}function formatFieldLine(_0x5d368a,_0x26d2ab,_0x27ba06){const _0x220284=a131_0x2aa4,_0x5821ac=_0x5d368a!==_0x26d2ab?'\x20'+a131_0x646f4e[_0x220284(0x1bd)]('('+_0x26d2ab+')'):'';return _0x220284(0x196)+_0x5d368a+_0x5821ac+':\x20'+a131_0x646f4e[_0x220284(0x1a5)](_0x27ba06);}function sortByColumnName(_0x52db82){const _0x144810=a131_0x2aa4;return[..._0x52db82][_0x144810(0x1af)]((_0x57dd06,_0x16d6ff)=>columnName(_0x57dd06)[_0x144810(0x1a9)](columnName(_0x16d6ff)));}function a131_0x44c4(){const _0x2dc42c=['Unknown','matrixTableName','behavior','Schema\x20query:\x0a','trim','extra','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','parentTableName','\x20\x20\x20\x20','map','5820567OYkNAN','displayName','source','push','9432010YvfsdA','entries','columns','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','attribute','12ItZsQQ','key','execute','error','cyan','filter','size','type','localeCompare','information_schema','tableName','Behaviors','name','bold','sort','Fetching\x20schema...','get','2883080hBwocn','set','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','verbose','59466680fEaVEW','groupingName','column_name','varchar','startsWith','1313884jaWKUK','query','dim','column_type','208CYKvfB','379026YglCot','fields','2PeeTpZ','setJobId','1714260MrRGHJ','some','matrixColumnName'];a131_0x44c4=function(){return _0x2dc42c;};return a131_0x44c4();}export function displayFieldsHumanReadable(_0x1f07f9,_0x3bd9f9){const _0x4e4e11=a131_0x2aa4,_0x20fdbb=_0x1f07f9['filter'](_0x1c24dc=>_0x1c24dc[_0x4e4e11(0x19a)]===_0x4e4e11(0x1a0)),_0x50b71a=_0x1f07f9[_0x4e4e11(0x1a6)](_0x3dc2f8=>_0x3dc2f8[_0x4e4e11(0x19a)]===_0x4e4e11(0x190)),_0x5d2bbf=new Map();for(const _0x1a2075 of _0x20fdbb){const _0x377eb5=_0x1a2075[_0x4e4e11(0x1b7)]||_0x1a2075['parentTableName']||_0x4e4e11(0x18e),_0x45b865=_0x5d2bbf[_0x4e4e11(0x1b1)](_0x377eb5);_0x45b865?_0x45b865[_0x4e4e11(0x1c1)][_0x4e4e11(0x19b)](_0x1a2075):_0x5d2bbf[_0x4e4e11(0x1b3)](_0x377eb5,{'displayName':_0x377eb5,'tableName':_0x1a2075[_0x4e4e11(0x195)],'fields':[_0x1a2075]});}const _0x1027e2=new Map();for(const _0x2f181d of _0x50b71a){const _0x5c9b8a=_0x2f181d['behaviorName']||_0x4e4e11(0x18e),_0x410552=_0x1027e2[_0x4e4e11(0x1b1)](_0x5c9b8a)||[];_0x410552['push'](_0x2f181d),_0x1027e2[_0x4e4e11(0x1b3)](_0x5c9b8a,_0x410552);}console[_0x4e4e11(0x1a4)]('\x0a'+a131_0x646f4e[_0x4e4e11(0x1ae)](_0x3bd9f9));if(_0x5d2bbf[_0x4e4e11(0x1a7)]>0x0){console['error']('\x0a'+a131_0x646f4e['dim']('Attributes'));const _0x56491e=[..._0x5d2bbf[_0x4e4e11(0x19d)]()]['sort']((_0x39d865,_0x225e03)=>_0x39d865[0x0][_0x4e4e11(0x1a9)](_0x225e03[0x0]));for(const [,_0x3f7cd1]of _0x56491e){const _0x28f376=_0x3f7cd1[_0x4e4e11(0x1ab)]&&_0x3f7cd1['tableName']!==_0x3f7cd1[_0x4e4e11(0x199)]?'\x20'+a131_0x646f4e['dim']('('+_0x3f7cd1['tableName']+')'):'';console['error']('\x20\x20'+a131_0x646f4e[_0x4e4e11(0x1ae)](_0x3f7cd1[_0x4e4e11(0x199)])+_0x28f376);for(const _0x5a9aa3 of sortByColumnName(_0x3f7cd1[_0x4e4e11(0x1c1)])){console[_0x4e4e11(0x1a4)](formatFieldLine(columnName(_0x5a9aa3),_0x5a9aa3['name'],_0x5a9aa3[_0x4e4e11(0x1a8)]));}}}if(_0x1027e2[_0x4e4e11(0x1a7)]>0x0){console['error']('\x0a'+a131_0x646f4e[_0x4e4e11(0x1bd)](_0x4e4e11(0x1ac)));const _0x52245f=[..._0x1027e2[_0x4e4e11(0x19d)]()][_0x4e4e11(0x1af)]((_0x273b96,_0x166fcd)=>_0x273b96[0x0][_0x4e4e11(0x1a9)](_0x166fcd[0x0]));for(const [_0xca3591,_0x34d749]of _0x52245f){const _0x544659=_0x34d749[0x0],_0x4de6b2=_0x544659?.[_0x4e4e11(0x18f)];if(_0x4de6b2){const _0x2763ef=_0x4de6b2!==_0xca3591?'\x20'+a131_0x646f4e[_0x4e4e11(0x1bd)]('('+_0xca3591+')'):'';console['error']('\x20\x20'+a131_0x646f4e[_0x4e4e11(0x1ae)](_0x4de6b2)+_0x2763ef);}else{const _0x104a83=_0x544659?.[_0x4e4e11(0x195)]||'';console[_0x4e4e11(0x1a4)]('\x20\x20'+a131_0x646f4e[_0x4e4e11(0x1ae)](_0xca3591)+(_0x104a83?'\x20'+a131_0x646f4e[_0x4e4e11(0x1bd)]('('+_0x104a83+')'):''));}for(const _0x1af8ea of sortByColumnName(_0x34d749)){const _0xd27c6=_0x1af8ea[_0x4e4e11(0x1ad)][_0x4e4e11(0x1ba)](_0xca3591+'.')?_0x1af8ea[_0x4e4e11(0x1ad)]['slice'](_0xca3591['length']+0x1):_0x1af8ea[_0x4e4e11(0x1ad)];console[_0x4e4e11(0x1a4)](formatFieldLine(columnName(_0x1af8ea),_0xd27c6,_0x1af8ea[_0x4e4e11(0x1a8)]));}}}const _0x5f5109=_0x1f07f9[_0x4e4e11(0x18c)](_0x4d0187=>_0x4d0187[_0x4e4e11(0x18d)]||_0x4d0187[_0x4e4e11(0x18f)]);_0x5f5109&&(console[_0x4e4e11(0x1a4)]('\x0a'+a131_0x646f4e[_0x4e4e11(0x1bd)](_0x4e4e11(0x1b4))),console[_0x4e4e11(0x1a4)](a131_0x646f4e['dim'](_0x4e4e11(0x19f)))),console['error']('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41a25e,_0x5f2a2a){const _0x26a3fd=a132_0x30d8,_0x9ff7f=_0x41a25e();while(!![]){try{const _0x2dee69=-parseInt(_0x26a3fd(0x175))/0x1*(parseInt(_0x26a3fd(0x16d))/0x2)+-parseInt(_0x26a3fd(0x17b))/0x3*(parseInt(_0x26a3fd(0x169))/0x4)+parseInt(_0x26a3fd(0x168))/0x5+parseInt(_0x26a3fd(0x178))/0x6*(parseInt(_0x26a3fd(0x177))/0x7)+parseInt(_0x26a3fd(0x170))/0x8+-parseInt(_0x26a3fd(0x167))/0x9*(-parseInt(_0x26a3fd(0x179))/0xa)+-parseInt(_0x26a3fd(0x16b))/0xb;if(_0x2dee69===_0x5f2a2a)break;else _0x9ff7f['push'](_0x9ff7f['shift']());}catch(_0x3082e8){_0x9ff7f['push'](_0x9ff7f['shift']());}}}(a132_0x4e63,0x83951));function a132_0x4e63(){const _0x59b9d6=['6WWvKmh','join','dirname','489951VTltTA','532870nAtwbk','1695352tbJsyn','map','10926311XugVMe','relative','8570FNDJLi','endsWith','extname','7399328JjuoeA','isDirectory','toLowerCase','push','.yml','43yOmPdV','name','7fbYlHS','4623342KMcOxq','140fQrpag','.yaml'];a132_0x4e63=function(){return _0x59b9d6;};return a132_0x4e63();}import{readdirSync,statSync}from'fs';import a132_0x4805c8 from'path';function a132_0x30d8(_0x5a7ed5,_0x5461a4){_0x5a7ed5=_0x5a7ed5-0x166;const _0x4e6327=a132_0x4e63();let _0x30d8f2=_0x4e6327[_0x5a7ed5];return _0x30d8f2;}export function findYamlFiles(_0x1792ce){const _0x510868=[];function _0x581488(_0x57f8b3){const _0x53f0e0=a132_0x30d8,_0x5c7b0d=readdirSync(_0x57f8b3,{'withFileTypes':!![]});for(const _0xbaa19b of _0x5c7b0d){const _0x53e1eb=a132_0x4805c8[_0x53f0e0(0x17c)](_0x57f8b3,_0xbaa19b[_0x53f0e0(0x176)]);if(_0xbaa19b[_0x53f0e0(0x171)]())_0x581488(_0x53e1eb);else(_0xbaa19b['name']['endsWith'](_0x53f0e0(0x174))||_0xbaa19b[_0x53f0e0(0x176)][_0x53f0e0(0x16e)](_0x53f0e0(0x17a)))&&_0x510868[_0x53f0e0(0x173)](_0x53e1eb);}}return _0x581488(_0x1792ce),_0x510868;}export function discoverYamlFiles(_0x55394e){const _0x4a66bc=a132_0x30d8,_0x253fb4=findYamlFiles(_0x55394e);return _0x253fb4[_0x4a66bc(0x16a)](_0x2414d3=>{const _0x997999=_0x4a66bc,_0x306f45=a132_0x4805c8[_0x997999(0x16c)](_0x55394e,_0x2414d3),_0x47bdd8=a132_0x4805c8[_0x997999(0x166)](_0x306f45);return{'absolutePath':_0x2414d3,'relativePath':_0x306f45,'folderPath':_0x47bdd8==='.'?'':_0x47bdd8};});}export function isYamlFile(_0x28f148){const _0x3c244f=a132_0x30d8;try{const _0x675348=statSync(_0x28f148);if(!_0x675348['isFile']())return![];const _0x418847=a132_0x4805c8[_0x3c244f(0x16f)](_0x28f148)[_0x3c244f(0x172)]();return _0x418847==='.yml'||_0x418847==='.yaml';}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4aa3ad,_0x25c6c0){const _0x3c3051=a133_0x1ff1,_0x5b4885=_0x4aa3ad();while(!![]){try{const _0x5b03bf=parseInt(_0x3c3051(0x184))/0x1+-parseInt(_0x3c3051(0x170))/0x2*(parseInt(_0x3c3051(0x17d))/0x3)+-parseInt(_0x3c3051(0x176))/0x4+parseInt(_0x3c3051(0x1aa))/0x5*(-parseInt(_0x3c3051(0x197))/0x6)+parseInt(_0x3c3051(0x178))/0x7*(-parseInt(_0x3c3051(0x1b0))/0x8)+-parseInt(_0x3c3051(0x18c))/0x9*(-parseInt(_0x3c3051(0x16f))/0xa)+parseInt(_0x3c3051(0x1ab))/0xb;if(_0x5b03bf===_0x25c6c0)break;else _0x5b4885['push'](_0x5b4885['shift']());}catch(_0x5770aa){_0x5b4885['push'](_0x5b4885['shift']());}}}(a133_0x2000,0x2f96c));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0xdd28e2){const _0x45a702=a133_0x1ff1;return _0xdd28e2[_0x45a702(0x171)]()[_0x45a702(0x1a7)](/\s+/g,'_')[_0x45a702(0x1a7)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x45a702(0x1a7)](/_+/g,'_')[_0x45a702(0x1a7)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x4661d4){const _0x361de4=a133_0x1ff1,_0x477f6f=_0x4661d4[_0x361de4(0x194)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x477f6f){const _0x73ee3c=_0x477f6f[0x1]['toLowerCase'](),_0x5c70c4=_0x477f6f[0x2],_0x4b8791=_0x5c70c4[_0x361de4(0x1a7)](/-/g,'')[_0x361de4(0x195)](0x0,0x4)['toLowerCase']();return _0x73ee3c+'_'+_0x4b8791;}const _0x39b302=_0x4661d4['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x39b302){const _0x49b506=_0x39b302[0x1],_0x2125c0=_0x39b302[0x2][_0x361de4(0x171)](),_0x127f5d=_0x49b506[_0x361de4(0x1a7)](/-/g,'')[_0x361de4(0x195)](0x0,0x4)['toLowerCase']();return _0x2125c0+'_'+_0x127f5d;}return undefined;}function stableStringify(_0x2bc253){const _0x3e6909=a133_0x1ff1;if(Array[_0x3e6909(0x18f)](_0x2bc253))return'['+_0x2bc253['map'](_0xbca777=>stableStringify(_0xbca777))[_0x3e6909(0x18b)](',')+']';if(_0x2bc253&&typeof _0x2bc253==='object'){const _0x4a82a9=_0x2bc253,_0x4f45cb=Object[_0x3e6909(0x163)](_0x4a82a9)['sort'](),_0x3ef9fa=_0x4f45cb[_0x3e6909(0x186)](_0x3645bd=>'\x22'+_0x3645bd+'\x22:'+stableStringify(_0x4a82a9[_0x3645bd]));return'{'+_0x3ef9fa[_0x3e6909(0x18b)](',')+'}';}const _0x316bb4=JSON[_0x3e6909(0x174)](_0x2bc253);return _0x316bb4===undefined?_0x3e6909(0x164):_0x316bb4;}export function consolidateActivationsByContent(_0x2fec4c){const _0x1cf3f7=a133_0x1ff1,_0x2dacb7={},_0x27237f=new Map(),_0xdaa2ec=new Map();for(const _0x39c106 of _0x2fec4c){if(!_0x39c106)continue;for(const [_0x1ae18b,_0x208169]of Object[_0x1cf3f7(0x16c)](_0x39c106)){const _0x52a785={'name':_0x208169[_0x1cf3f7(0x172)],'connection':_0x208169[_0x1cf3f7(0x185)],..._0x208169[_0x1cf3f7(0x1a6)]!==undefined&&{'all_columns':_0x208169[_0x1cf3f7(0x1a6)]},..._0x208169[_0x1cf3f7(0x196)]!==undefined&&{'columns':_0x208169[_0x1cf3f7(0x196)]},..._0x208169[_0x1cf3f7(0x1a3)]!==undefined&&{'behavior':_0x208169[_0x1cf3f7(0x1a3)]},..._0x208169[_0x1cf3f7(0x19a)]!==undefined&&{'schedule':_0x208169[_0x1cf3f7(0x19a)]},..._0x208169[_0x1cf3f7(0x198)]!==undefined&&{'notification':_0x208169[_0x1cf3f7(0x198)]},..._0x208169[_0x1cf3f7(0x182)]!==undefined&&{'connector_config':_0x208169['connector_config']},..._0x208169[_0x1cf3f7(0x181)]!==undefined&&{'activation_template_id':_0x208169[_0x1cf3f7(0x181)]}},_0x318e39=stableStringify(_0x52a785),_0x263fa6=_0xdaa2ec[_0x1cf3f7(0x1a9)](_0x318e39);_0x263fa6?_0x27237f[_0x1cf3f7(0x1b1)](_0x1ae18b,_0x263fa6):(_0x2dacb7[_0x1ae18b]=_0x208169,_0x27237f[_0x1cf3f7(0x1b1)](_0x1ae18b,_0x1ae18b),_0xdaa2ec[_0x1cf3f7(0x1b1)](_0x318e39,_0x1ae18b));}}return{'merged':_0x2dacb7,'nameMapping':_0x27237f};}export function updateActivationReferences(_0xeb3175,_0x8d18f0){const _0x464268=a133_0x1ff1;if(!_0xeb3175)return;for(const _0x51fbe9 of _0xeb3175){if(!_0x51fbe9[_0x464268(0x1a4)])continue;for(const _0x5514ce of _0x51fbe9[_0x464268(0x1a4)]){if(_0x5514ce[_0x464268(0x175)]==='activation'&&_0x5514ce[_0x464268(0x193)]?.[_0x464268(0x1a2)]){const _0x2868aa=_0x8d18f0['get'](_0x5514ce[_0x464268(0x193)][_0x464268(0x1a2)]);_0x2868aa&&_0x2868aa!==_0x5514ce[_0x464268(0x193)][_0x464268(0x1a2)]&&(_0x5514ce[_0x464268(0x193)][_0x464268(0x1a2)]=_0x2868aa);}}}}export function consolidateSegmentsByContent(_0x2df170,_0xdb6672){const _0x4f93d8=a133_0x1ff1,_0x1d5586={},_0x10fda2=new Map(),_0x4b25f3=new Map();for(const _0x4d89ec of _0x2df170){if(!_0x4d89ec)continue;for(const [_0x3945f3,_0x2e117f]of Object['entries'](_0x4d89ec)){if(!_0x2e117f[_0x4f93d8(0x187)]){_0x1d5586[_0x3945f3]=_0x2e117f,_0x10fda2[_0x4f93d8(0x1b1)](_0x3945f3,_0x3945f3);continue;}const _0x52dcf4=_0x2e117f[_0x4f93d8(0x199)]&&_0x2e117f[_0x4f93d8(0x199)]['trim']()?_0x2e117f[_0x4f93d8(0x199)]:undefined,_0x4b74cb=JSON['stringify']({'description':_0x52dcf4,'rule':deepSortObject(_0x2e117f[_0x4f93d8(0x187)])}),_0x4e544b=_0x4b25f3[_0x4f93d8(0x1a9)](_0x4b74cb);if(_0x4e544b){const _0x5e9ea0={..._0x2e117f['description']!==undefined&&{'description':_0x2e117f[_0x4f93d8(0x199)]},'rule':_0x2e117f['rule']?deepSortObject(_0x2e117f[_0x4f93d8(0x187)]):_0x2e117f['rule']};if(_0x3945f3<_0x4e544b){_0x1d5586[_0x3945f3]=_0x5e9ea0,delete _0x1d5586[_0x4e544b];for(const [_0x94e322,_0x3ea67e]of _0x10fda2[_0x4f93d8(0x16c)]()){_0x3ea67e===_0x4e544b&&_0x10fda2[_0x4f93d8(0x1b1)](_0x94e322,_0x3945f3);}_0x10fda2['set'](_0x3945f3,_0x3945f3),_0x4b25f3[_0x4f93d8(0x1b1)](_0x4b74cb,_0x3945f3);}else _0x1d5586[_0x4e544b]=_0x5e9ea0,_0x10fda2['set'](_0x3945f3,_0x4e544b);}else{let _0x3b51bd=_0x3945f3;if(_0xdb6672){const _0x234a2a=_0xdb6672['get'](_0x4b74cb);_0x234a2a&&_0x234a2a[_0x4f93d8(0x179)]>0x0&&(_0x3b51bd=_0x234a2a[_0x4f93d8(0x195)]()[_0x4f93d8(0x1ad)]()[0x0]);}const _0x4bd7f8={..._0x2e117f[_0x4f93d8(0x199)]!==undefined&&{'description':_0x2e117f[_0x4f93d8(0x199)]},'rule':_0x2e117f['rule']?deepSortObject(_0x2e117f[_0x4f93d8(0x187)]):_0x2e117f[_0x4f93d8(0x187)]};_0x1d5586[_0x3b51bd]=_0x4bd7f8,_0x10fda2[_0x4f93d8(0x1b1)](_0x3945f3,_0x3b51bd),_0x4b25f3[_0x4f93d8(0x1b1)](_0x4b74cb,_0x3b51bd);}}}return{'merged':_0x1d5586,'nameMapping':_0x10fda2};}export function updateSegmentReferences(_0x513b31,_0x21ea8a){const _0x2de1d1=a133_0x1ff1;if(!_0x513b31)return;for(const _0x36f05f of _0x513b31){if(_0x36f05f[_0x2de1d1(0x16d)]?.[_0x2de1d1(0x1a0)]){const _0x456fae=_0x21ea8a['get'](_0x36f05f[_0x2de1d1(0x16d)]['segment']);_0x456fae&&(_0x36f05f[_0x2de1d1(0x16d)]['segment']=_0x456fae);}if(_0x36f05f['exit_criteria'])for(const _0x1bc05c of _0x36f05f[_0x2de1d1(0x1ac)]){if(_0x1bc05c['segment']){const _0x1fa201=_0x21ea8a['get'](_0x1bc05c[_0x2de1d1(0x1a0)]);_0x1fa201&&(_0x1bc05c['segment']=_0x1fa201);}}if(_0x36f05f['milestone']?.[_0x2de1d1(0x1a0)]){const _0x3d4a08=_0x21ea8a[_0x2de1d1(0x1a9)](_0x36f05f[_0x2de1d1(0x162)]['segment']);_0x3d4a08&&(_0x36f05f[_0x2de1d1(0x162)][_0x2de1d1(0x1a0)]=_0x3d4a08);}if(_0x36f05f[_0x2de1d1(0x1a4)])for(const _0x358291 of _0x36f05f['steps']){if(_0x358291['type']===_0x2de1d1(0x188)&&_0x358291['with']?.[_0x2de1d1(0x1b2)])for(const _0x11d210 of _0x358291['with'][_0x2de1d1(0x1b2)]){if(_0x11d210['segment']){const _0xcb55f4=_0x21ea8a[_0x2de1d1(0x1a9)](_0x11d210['segment']);_0xcb55f4&&(_0x11d210[_0x2de1d1(0x1a0)]=_0xcb55f4);}}if(_0x358291['type']==='wait'&&_0x358291['with']?.['condition']?.[_0x2de1d1(0x1a0)]){const _0x368955=_0x21ea8a[_0x2de1d1(0x1a9)](_0x358291[_0x2de1d1(0x193)]['condition'][_0x2de1d1(0x1a0)]);_0x368955&&(_0x358291[_0x2de1d1(0x193)][_0x2de1d1(0x19f)][_0x2de1d1(0x1a0)]=_0x368955);}}}}export function updateSegmentRefsInSegments(_0x2f7921,_0x8898bd){const _0x16257d=a133_0x1ff1;for(const _0x116577 of Object['values'](_0x2f7921)){_0x116577['rule']&&updateSegmentRefsInRule(_0x116577[_0x16257d(0x187)],_0x8898bd);}}function updateSegmentRefsInRule(_0x35e9a2,_0x11bca1){const _0x19fcc0=a133_0x1ff1;if(_0x35e9a2===null||typeof _0x35e9a2!==_0x19fcc0(0x183))return;if(Array[_0x19fcc0(0x18f)](_0x35e9a2)){for(const _0x3ce67e of _0x35e9a2){updateSegmentRefsInRule(_0x3ce67e,_0x11bca1);}return;}const _0x50960d=_0x35e9a2;if((_0x50960d[_0x19fcc0(0x175)]===_0x19fcc0(0x17c)||_0x50960d['type']==='exclude')&&typeof _0x50960d[_0x19fcc0(0x1a0)]==='string'){const _0x3e1626=_0x11bca1[_0x19fcc0(0x1a9)](_0x50960d[_0x19fcc0(0x1a0)]);_0x3e1626&&(_0x50960d['segment']=_0x3e1626);}if(_0x50960d[_0x19fcc0(0x18d)]&&Array['isArray'](_0x50960d[_0x19fcc0(0x18d)]))for(const _0x14cbf7 of _0x50960d[_0x19fcc0(0x18d)]){updateSegmentRefsInRule(_0x14cbf7,_0x11bca1);}}export function buildJourneysArray(_0x186a9b,_0x197201){const _0x8afb5d=a133_0x1ff1;return _0x186a9b[_0x8afb5d(0x186)](_0x327f91=>{const _0x5ee32b=_0x8afb5d,_0x3f771c=_0x197201?_0x327f91['item']['id']===_0x197201:_0x186a9b[_0x5ee32b(0x179)]===0x1,_0x245911=_0x327f91[_0x5ee32b(0x19c)][_0x5ee32b(0x17f)]?.[0x0],_0x7a4817=_0x245911?.[_0x5ee32b(0x18a)]||_0x327f91[_0x5ee32b(0x19c)][_0x5ee32b(0x18a)],_0x310b46={'version':_0x245911?.['version']||_0x327f91['yaml'][_0x5ee32b(0x19e)]||_0x327f91[_0x5ee32b(0x16e)][_0x5ee32b(0x172)],'state':_0x327f91[_0x5ee32b(0x16e)][_0x5ee32b(0x173)]===_0x5ee32b(0x189)?'launched':'draft','stages':_0x245911?.[_0x5ee32b(0x192)]||_0x327f91[_0x5ee32b(0x19c)]['stages']||[],'id':_0x245911?.['id']||_0x327f91['yaml']['id'],'version_number':_0x245911?.[_0x5ee32b(0x19b)]||_0x327f91[_0x5ee32b(0x19c)][_0x5ee32b(0x19b)]};return _0x7a4817&&(_0x310b46[_0x5ee32b(0x18a)]=_0x7a4817),_0x3f771c&&(_0x310b46[_0x5ee32b(0x1a5)]=!![]),_0x310b46;});}export function buildMergedJourneyDef(_0x46277f,_0x4d9330,_0x59fd32){const _0x324a49=a133_0x1ff1,_0x56380b=_0x46277f[0x0][_0x324a49(0x19c)],_0xc95d22=buildJourneysArray(_0x46277f,_0x59fd32),{merged:_0x3ad3d7,nameMapping:_0x59b826}=consolidateSegmentsByContent(_0x46277f[_0x324a49(0x186)](_0x6643fe=>_0x6643fe[_0x324a49(0x19c)][_0x324a49(0x17b)]),_0x4d9330);updateSegmentRefsInSegments(_0x3ad3d7,_0x59b826);const _0x111f46=Array[_0x324a49(0x16a)](_0x59b826[_0x324a49(0x16c)]())[_0x324a49(0x167)](([_0x2ba18c,_0x120026])=>_0x2ba18c!==_0x120026&&_0x2ba18c[_0x324a49(0x1b3)](_0x324a49(0x16d)));let _0x27fb07=_0x3ad3d7,_0x15c43a=new Map();if(_0x111f46){const _0x22e317=consolidateSegmentsByContent([_0x3ad3d7],_0x4d9330);_0x27fb07=_0x22e317[_0x324a49(0x166)],_0x15c43a=_0x22e317[_0x324a49(0x191)];}const _0xc47a12=new Map(_0x59b826);for(const [_0x16329e,_0x2d1df7]of _0x15c43a[_0x324a49(0x16c)]()){_0xc47a12[_0x324a49(0x1b1)](_0x16329e,_0x2d1df7);}for(const [_0x566f2f,_0x41f963]of _0xc47a12[_0x324a49(0x16c)]()){let _0x2ec506=_0x41f963,_0x327024=0x0;while(_0xc47a12[_0x324a49(0x16b)](_0x2ec506)&&_0xc47a12[_0x324a49(0x1a9)](_0x2ec506)!==_0x2ec506&&_0x327024<MAX_MAPPING_CHAIN_DEPTH){_0x2ec506=_0xc47a12[_0x324a49(0x1a9)](_0x2ec506),_0x327024++;}_0x2ec506!==_0x41f963&&_0xc47a12[_0x324a49(0x1b1)](_0x566f2f,_0x2ec506);}for(const _0x36c21d of _0xc95d22){updateSegmentReferences(_0x36c21d[_0x324a49(0x192)],_0xc47a12);}const {merged:_0xf4c8d4,nameMapping:_0x1ce2bb}=consolidateActivationsByContent(_0x46277f['map'](_0xe5b347=>_0xe5b347[_0x324a49(0x19c)][_0x324a49(0x169)]));for(const _0x233494 of _0xc95d22){updateActivationReferences(_0x233494[_0x324a49(0x192)],_0x1ce2bb);}let _0x5bcde5=_0x56380b[_0x324a49(0x18a)];if(_0x5bcde5?.[_0x324a49(0x1a0)]){const _0x1b22c5=_0xc47a12[_0x324a49(0x1a9)](_0x5bcde5['segment']);_0x1b22c5&&(_0x5bcde5={..._0x5bcde5,'segment':_0x1b22c5});}for(const _0x24eb12 of _0xc95d22){if(_0x24eb12[_0x324a49(0x18a)]?.[_0x324a49(0x1a0)]){const _0x356c0f=_0xc47a12['get'](_0x24eb12[_0x324a49(0x18a)][_0x324a49(0x1a0)]);_0x356c0f&&(_0x24eb12[_0x324a49(0x18a)]={..._0x24eb12[_0x324a49(0x18a)],'segment':_0x356c0f});}}return _0xc95d22['some'](_0x4a3529=>_0x4a3529[_0x324a49(0x18a)])&&(_0x5bcde5=undefined),{'type':_0x324a49(0x1a8),'name':_0x56380b['name'],'description':_0x56380b['description'],'goal':_0x5bcde5,'reentry':_0x56380b[_0x324a49(0x17a)],'segments':Object[_0x324a49(0x163)](_0x27fb07)[_0x324a49(0x179)]>0x0?_0x27fb07:undefined,'activations':Object[_0x324a49(0x163)](_0xf4c8d4)[_0x324a49(0x179)]>0x0?_0xf4c8d4:undefined,'journeys':_0xc95d22,'bundle_id':_0x56380b[_0x324a49(0x1af)],'bundle_name':_0x56380b[_0x324a49(0x177)]};}function a133_0x2000(){const _0x336e62=['condition','segment','versions','activation','behavior','steps','latest','all_columns','replace','journey','get','55LgxsiD','7866925rShrkB','exit_criteria','sort','attributes','bundle_id','120ZnKiEA','set','branches','startsWith','milestone','keys','null','push','merged','some','.yaml','activations','from','has','entries','entry_criteria','item','10YVeKcR','2KbjuxD','toLowerCase','name','state','stringify','type','1254232CpIygb','bundle_name','145208lgzKRk','length','reentry','segments','include','946029QkHpbH','index','journeys','.yml','activation_template_id','connector_config','object','298371IOlmvq','connection','map','rule','decision_point','launched','goal','join','1153341RTqRPQ','conditions','find','isArray','endsWith','nameMapping','stages','with','match','slice','columns','3660dbuSvk','notification','description','schedule','version_number','yaml','journeyBundleName','version'];a133_0x2000=function(){return _0x336e62;};return a133_0x2000();}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x1c4e45,_0x970924,_0x155243,_0x40259b){const _0x5291d5=a133_0x1ff1,_0x254f63=_0x1c4e45+':'+_0x970924,_0x35b4c4=_0x155243[_0x5291d5(0x1a9)](_0x254f63);if(_0x35b4c4)return _0x35b4c4;const _0x22ef3a=await _0x40259b(_0x1c4e45),_0xa3645f=_0x22ef3a[_0x5291d5(0x1ae)][_0x5291d5(0x19d)]||_0x22ef3a[_0x5291d5(0x1ae)]['name'],_0x1be090=_0x22ef3a['attributes']['journeyStages'][_0x5291d5(0x18e)](_0x3e71de=>String(_0x3e71de['id'])===String(_0x970924)),_0x21fe6f=_0x1be090?.['name']||_0x970924,_0x995405={'journeyName':_0xa3645f,'stageName':_0x21fe6f};return _0x155243['set'](_0x254f63,_0x995405),_0x995405;}export function formatApiJourneyName(_0x4db578,_0x5b5ca7){return _0x5b5ca7+'\x20('+_0x4db578+')';}export function isLocalJourneyRef(_0x3b2e19){const _0x55f8f8=a133_0x1ff1;return _0x3b2e19[_0x55f8f8(0x190)](_0x55f8f8(0x180))||_0x3b2e19['endsWith'](_0x55f8f8(0x168));}function a133_0x1ff1(_0x40e6c5,_0x5e2a34){_0x40e6c5=_0x40e6c5-0x162;const _0x200078=a133_0x2000();let _0x1ff127=_0x200078[_0x40e6c5];return _0x1ff127;}export function buildLocalRuleToNameMapping(_0x34953b){const _0x297c80=a133_0x1ff1,_0xb26f08=new Map();if(!_0x34953b)return _0xb26f08;for(const [_0x574c29,_0x46ad2e]of Object[_0x297c80(0x16c)](_0x34953b)){if(_0x46ad2e[_0x297c80(0x187)]){const _0x345d46=serializeRule(_0x46ad2e['rule']),_0x2e7102=_0xb26f08['get'](_0x345d46)||[];_0x2e7102[_0x297c80(0x165)](_0x574c29),_0xb26f08[_0x297c80(0x1b1)](_0x345d46,_0x2e7102);}}return _0xb26f08;}export function buildLocalRuleToNameMappingFromJourney(_0x18156a){const _0x4f9b12=a133_0x1ff1,_0x5c14b7=_0x18156a['segments'];if(!_0x5c14b7)return new Map();const _0x2ffe1f=collectSegmentUsageCounts(_0x18156a),_0x2d0f20=new Map();let _0x41e5fe=0x0;for(const [_0x4e35c0,_0x20b4ed]of Object['entries'](_0x5c14b7)){if(!_0x20b4ed[_0x4f9b12(0x187)]){_0x41e5fe++;continue;}const _0x15c739=serializeRule(_0x20b4ed[_0x4f9b12(0x187)]),_0x31e8c0=_0x2d0f20['get'](_0x15c739)||[];_0x31e8c0[_0x4f9b12(0x165)]({'name':_0x4e35c0,'index':_0x41e5fe}),_0x2d0f20['set'](_0x15c739,_0x31e8c0),_0x41e5fe++;}const _0x44e186=new Map();for(const [_0x36ae95,_0x26dc4f]of _0x2d0f20){const _0x723c80=_0x26dc4f[_0x4f9b12(0x195)]()[_0x4f9b12(0x1ad)]((_0x5a03f0,_0xa29c14)=>{const _0x2a6b89=_0x4f9b12,_0xfd6ed9=_0x2ffe1f[_0x2a6b89(0x1a9)](_0x5a03f0[_0x2a6b89(0x172)])||0x0,_0x1701cd=_0x2ffe1f[_0x2a6b89(0x1a9)](_0xa29c14[_0x2a6b89(0x172)])||0x0;if(_0xfd6ed9!==_0x1701cd)return _0x1701cd-_0xfd6ed9;return _0x5a03f0[_0x2a6b89(0x17e)]-_0xa29c14[_0x2a6b89(0x17e)];})[_0x4f9b12(0x186)](_0x3ad7cb=>_0x3ad7cb['name']);_0x44e186[_0x4f9b12(0x1b1)](_0x36ae95,_0x723c80);}return _0x44e186;}export function collectSegmentUsageCounts(_0x22cc3b){const _0x4b9755=a133_0x1ff1,_0x494219=new Map(),_0x57fe1b=_0x346425=>{const _0x2d6585=a133_0x1ff1;if(!_0x346425)return;_0x494219[_0x2d6585(0x1b1)](_0x346425,(_0x494219['get'](_0x346425)||0x0)+0x1);},_0xeeeaff=_0x55a8ed=>{const _0x36b940=a133_0x1ff1;for(const _0x360b39 of _0x55a8ed){_0x57fe1b(_0x360b39['entry_criteria']?.[_0x36b940(0x1a0)]);if(_0x360b39['exit_criteria'])for(const _0x1c1709 of _0x360b39[_0x36b940(0x1ac)]){_0x57fe1b(_0x1c1709[_0x36b940(0x1a0)]);}_0x57fe1b(_0x360b39[_0x36b940(0x162)]?.['segment']);if(_0x360b39[_0x36b940(0x1a4)])for(const _0x9845ac of _0x360b39[_0x36b940(0x1a4)]){if(_0x9845ac['type']==='decision_point')for(const _0x552a3a of _0x9845ac[_0x36b940(0x193)][_0x36b940(0x1b2)]){_0x57fe1b(_0x552a3a[_0x36b940(0x1a0)]);}else _0x9845ac[_0x36b940(0x175)]==='wait'&&_0x57fe1b(_0x9845ac[_0x36b940(0x193)][_0x36b940(0x19f)]?.[_0x36b940(0x1a0)]);}}};_0x57fe1b(_0x22cc3b[_0x4b9755(0x18a)]?.[_0x4b9755(0x1a0)]);if(_0x22cc3b[_0x4b9755(0x17f)])for(const _0x1fb854 of _0x22cc3b[_0x4b9755(0x17f)]){_0x57fe1b(_0x1fb854[_0x4b9755(0x18a)]?.[_0x4b9755(0x1a0)]),_0xeeeaff(_0x1fb854[_0x4b9755(0x192)]);}_0x22cc3b['stages']&&_0xeeeaff(_0x22cc3b[_0x4b9755(0x192)]);if(_0x22cc3b[_0x4b9755(0x1a1)])for(const _0x2fa14f of _0x22cc3b[_0x4b9755(0x1a1)]){_0xeeeaff(_0x2fa14f[_0x4b9755(0x192)]);}return _0x494219;}
|
|
1
|
+
(function(_0x1a27a6,_0x1197ca){const _0x3ae490=a133_0xdabb,_0x4a34ff=_0x1a27a6();while(!![]){try{const _0x47af90=-parseInt(_0x3ae490(0xb0))/0x1+parseInt(_0x3ae490(0xe4))/0x2*(-parseInt(_0x3ae490(0xb7))/0x3)+parseInt(_0x3ae490(0xf1))/0x4+-parseInt(_0x3ae490(0xbd))/0x5+parseInt(_0x3ae490(0xd3))/0x6+-parseInt(_0x3ae490(0xd1))/0x7*(-parseInt(_0x3ae490(0xbf))/0x8)+parseInt(_0x3ae490(0xe0))/0x9;if(_0x47af90===_0x1197ca)break;else _0x4a34ff['push'](_0x4a34ff['shift']());}catch(_0x260003){_0x4a34ff['push'](_0x4a34ff['shift']());}}}(a133_0x47b2,0x2b48d));function a133_0xdabb(_0x56e47e,_0x3d3f30){_0x56e47e=_0x56e47e-0xa8;const _0x47b265=a133_0x47b2();let _0xdabb98=_0x47b265[_0x56e47e];return _0xdabb98;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x186084){const _0x17cbf1=a133_0xdabb;return _0x186084[_0x17cbf1(0xae)]()['replace'](/\s+/g,'_')[_0x17cbf1(0xe1)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x1e135b){const _0x57252f=a133_0xdabb,_0x3ed8cd=_0x1e135b['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x3ed8cd){const _0x57b9a7=_0x3ed8cd[0x1][_0x57252f(0xae)](),_0x365870=_0x3ed8cd[0x2],_0x1cb8f5=_0x365870[_0x57252f(0xe1)](/-/g,'')[_0x57252f(0xba)](0x0,0x4)[_0x57252f(0xae)]();return _0x57b9a7+'_'+_0x1cb8f5;}const _0x3b2202=_0x1e135b['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x3b2202){const _0x2d5fb1=_0x3b2202[0x1],_0x4dfb73=_0x3b2202[0x2][_0x57252f(0xae)](),_0x38d825=_0x2d5fb1['replace'](/-/g,'')[_0x57252f(0xba)](0x0,0x4)[_0x57252f(0xae)]();return _0x4dfb73+'_'+_0x38d825;}return undefined;}function stableStringify(_0x502137){const _0xfd2eda=a133_0xdabb;if(Array[_0xfd2eda(0xbe)](_0x502137))return'['+_0x502137[_0xfd2eda(0xb9)](_0x10004d=>stableStringify(_0x10004d))[_0xfd2eda(0xe3)](',')+']';if(_0x502137&&typeof _0x502137===_0xfd2eda(0xda)){const _0x4c7a0c=_0x502137,_0x4a170b=Object['keys'](_0x4c7a0c)['sort'](),_0x11010f=_0x4a170b['map'](_0xf29cf8=>'\x22'+_0xf29cf8+'\x22:'+stableStringify(_0x4c7a0c[_0xf29cf8]));return'{'+_0x11010f[_0xfd2eda(0xe3)](',')+'}';}const _0x128384=JSON['stringify'](_0x502137);return _0x128384===undefined?_0xfd2eda(0xcc):_0x128384;}export function consolidateActivationsByContent(_0x3de7f0){const _0x2d188a=a133_0xdabb,_0x117c85={},_0x3898ae=new Map(),_0x21e08e=new Map();for(const _0x326775 of _0x3de7f0){if(!_0x326775)continue;for(const [_0x54cda0,_0x40a1fd]of Object[_0x2d188a(0xc7)](_0x326775)){const _0x2c780a={'name':_0x40a1fd[_0x2d188a(0xe8)],'connection':_0x40a1fd['connection'],..._0x40a1fd['all_columns']!==undefined&&{'all_columns':_0x40a1fd['all_columns']},..._0x40a1fd[_0x2d188a(0xc6)]!==undefined&&{'columns':_0x40a1fd[_0x2d188a(0xc6)]},..._0x40a1fd[_0x2d188a(0xc5)]!==undefined&&{'behavior':_0x40a1fd[_0x2d188a(0xc5)]},..._0x40a1fd[_0x2d188a(0xdf)]!==undefined&&{'schedule':_0x40a1fd['schedule']},..._0x40a1fd[_0x2d188a(0xb1)]!==undefined&&{'notification':_0x40a1fd[_0x2d188a(0xb1)]},..._0x40a1fd[_0x2d188a(0xee)]!==undefined&&{'connector_config':_0x40a1fd[_0x2d188a(0xee)]},..._0x40a1fd[_0x2d188a(0xdc)]!==undefined&&{'activation_template_id':_0x40a1fd[_0x2d188a(0xdc)]}},_0x3ad314=stableStringify(_0x2c780a),_0x1e08ad=_0x21e08e['get'](_0x3ad314);_0x1e08ad?_0x3898ae[_0x2d188a(0xe7)](_0x54cda0,_0x1e08ad):(_0x117c85[_0x54cda0]=_0x40a1fd,_0x3898ae[_0x2d188a(0xe7)](_0x54cda0,_0x54cda0),_0x21e08e[_0x2d188a(0xe7)](_0x3ad314,_0x54cda0));}}return{'merged':_0x117c85,'nameMapping':_0x3898ae};}export function updateActivationReferences(_0x39c22f,_0x5ee735){const _0x36ccd5=a133_0xdabb;if(!_0x39c22f)return;for(const _0x4af5ca of _0x39c22f){if(!_0x4af5ca['steps'])continue;for(const _0x19b0b3 of _0x4af5ca[_0x36ccd5(0xb5)]){if(_0x19b0b3[_0x36ccd5(0xc1)]===_0x36ccd5(0xe9)&&_0x19b0b3[_0x36ccd5(0xb2)]?.['activation']){const _0x34b55d=_0x5ee735['get'](_0x19b0b3[_0x36ccd5(0xb2)]['activation']);_0x34b55d&&_0x34b55d!==_0x19b0b3[_0x36ccd5(0xb2)]['activation']&&(_0x19b0b3['with'][_0x36ccd5(0xe9)]=_0x34b55d);}}}}function a133_0x47b2(){const _0x2cf9cc=['values','stringify','object','some','activation_template_id','rule','branches','schedule','1240092bzXZHN','replace','push','join','2itNWsk','item','attributes','set','name','activation','trim','condition','get','segments','connector_config','bundle_name','journeyStages','354712hpSEXk','string','nameMapping','keys','.yml','activations','journeys','toLowerCase','segment','2522wPqaIV','notification','with','stages','include','steps','.yaml','915477WENMvw','sort','map','slice','merged','description','1292685jyFAQa','isArray','3656hfaWtn','endsWith','type','version_number','entry_criteria','wait','behavior','columns','entries','journeyBundleName','bundle_id','launched','milestone','null','yaml','decision_point','conditions','goal','2870gxUTZs','exit_criteria','1978050kuuDwP','version','draft','versions','length'];a133_0x47b2=function(){return _0x2cf9cc;};return a133_0x47b2();}export function consolidateSegmentsByContent(_0x1836ff,_0x25a3db){const _0x2a0bd7=a133_0xdabb,_0x3a8bb4={},_0x5586aa=new Map(),_0x4a4c31=new Map();for(const _0x200274 of _0x1836ff){if(!_0x200274)continue;for(const [_0x104e59,_0x365c47]of Object[_0x2a0bd7(0xc7)](_0x200274)){if(!_0x365c47[_0x2a0bd7(0xdd)]){_0x3a8bb4[_0x104e59]=_0x365c47,_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0x104e59);continue;}const _0x4bf464=_0x365c47[_0x2a0bd7(0xbc)]&&_0x365c47[_0x2a0bd7(0xbc)][_0x2a0bd7(0xea)]()?_0x365c47['description']:undefined,_0x5e6855=JSON[_0x2a0bd7(0xd9)]({'description':_0x4bf464,'rule':deepSortObject(_0x365c47[_0x2a0bd7(0xdd)])}),_0x3fbcfa=_0x4a4c31[_0x2a0bd7(0xec)](_0x5e6855);if(_0x3fbcfa){const _0x11b847={..._0x365c47[_0x2a0bd7(0xbc)]!==undefined&&{'description':_0x365c47[_0x2a0bd7(0xbc)]},'rule':_0x365c47['rule']?deepSortObject(_0x365c47[_0x2a0bd7(0xdd)]):_0x365c47['rule']};if(_0x104e59<_0x3fbcfa){_0x3a8bb4[_0x104e59]=_0x11b847,delete _0x3a8bb4[_0x3fbcfa];for(const [_0x567b0f,_0x2ebb92]of _0x5586aa[_0x2a0bd7(0xc7)]()){_0x2ebb92===_0x3fbcfa&&_0x5586aa[_0x2a0bd7(0xe7)](_0x567b0f,_0x104e59);}_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0x104e59),_0x4a4c31[_0x2a0bd7(0xe7)](_0x5e6855,_0x104e59);}else _0x3a8bb4[_0x3fbcfa]=_0x11b847,_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0x3fbcfa);}else{let _0xfdafdd=_0x104e59;if(_0x25a3db){const _0x52815d=_0x25a3db[_0x2a0bd7(0xec)](_0x5e6855);_0x52815d&&_0x52815d[_0x2a0bd7(0xd7)]>0x0&&(_0xfdafdd=_0x52815d[_0x2a0bd7(0xba)]()[_0x2a0bd7(0xb8)]()[0x0]);}const _0x290fe1={..._0x365c47[_0x2a0bd7(0xbc)]!==undefined&&{'description':_0x365c47[_0x2a0bd7(0xbc)]},'rule':_0x365c47['rule']?deepSortObject(_0x365c47[_0x2a0bd7(0xdd)]):_0x365c47[_0x2a0bd7(0xdd)]};_0x3a8bb4[_0xfdafdd]=_0x290fe1,_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0xfdafdd),_0x4a4c31[_0x2a0bd7(0xe7)](_0x5e6855,_0xfdafdd);}}}return{'merged':_0x3a8bb4,'nameMapping':_0x5586aa};}export function updateSegmentReferences(_0x453a07,_0xc32543){const _0x22fe08=a133_0xdabb;if(!_0x453a07)return;for(const _0x501501 of _0x453a07){if(_0x501501[_0x22fe08(0xc3)]?.[_0x22fe08(0xaf)]){const _0x40d840=_0xc32543[_0x22fe08(0xec)](_0x501501[_0x22fe08(0xc3)]['segment']);_0x40d840&&(_0x501501[_0x22fe08(0xc3)][_0x22fe08(0xaf)]=_0x40d840);}if(_0x501501[_0x22fe08(0xd2)])for(const _0x32d3ff of _0x501501['exit_criteria']){if(_0x32d3ff[_0x22fe08(0xaf)]){const _0x70af60=_0xc32543['get'](_0x32d3ff[_0x22fe08(0xaf)]);_0x70af60&&(_0x32d3ff[_0x22fe08(0xaf)]=_0x70af60);}}if(_0x501501['milestone']?.[_0x22fe08(0xaf)]){const _0xe3bf52=_0xc32543[_0x22fe08(0xec)](_0x501501[_0x22fe08(0xcb)][_0x22fe08(0xaf)]);_0xe3bf52&&(_0x501501['milestone'][_0x22fe08(0xaf)]=_0xe3bf52);}if(_0x501501[_0x22fe08(0xb5)])for(const _0x50bfcf of _0x501501[_0x22fe08(0xb5)]){if(_0x50bfcf['type']===_0x22fe08(0xce)&&_0x50bfcf[_0x22fe08(0xb2)]?.[_0x22fe08(0xde)])for(const _0x29aed8 of _0x50bfcf['with'][_0x22fe08(0xde)]){if(_0x29aed8[_0x22fe08(0xaf)]){const _0x4a5ab4=_0xc32543['get'](_0x29aed8[_0x22fe08(0xaf)]);_0x4a5ab4&&(_0x29aed8[_0x22fe08(0xaf)]=_0x4a5ab4);}}if(_0x50bfcf['type']===_0x22fe08(0xc4)&&_0x50bfcf['with']?.[_0x22fe08(0xeb)]?.['segment']){const _0x1c9741=_0xc32543[_0x22fe08(0xec)](_0x50bfcf[_0x22fe08(0xb2)][_0x22fe08(0xeb)][_0x22fe08(0xaf)]);_0x1c9741&&(_0x50bfcf[_0x22fe08(0xb2)]['condition'][_0x22fe08(0xaf)]=_0x1c9741);}}}}export function updateSegmentRefsInSegments(_0x1b7303,_0x3fe9ce){const _0x2570d5=a133_0xdabb;for(const _0xb2d1bf of Object[_0x2570d5(0xd8)](_0x1b7303)){_0xb2d1bf[_0x2570d5(0xdd)]&&updateSegmentRefsInRule(_0xb2d1bf[_0x2570d5(0xdd)],_0x3fe9ce);}}function updateSegmentRefsInRule(_0x4e6522,_0x8bc35a){const _0x543328=a133_0xdabb;if(_0x4e6522===null||typeof _0x4e6522!=='object')return;if(Array['isArray'](_0x4e6522)){for(const _0x2e39e9 of _0x4e6522){updateSegmentRefsInRule(_0x2e39e9,_0x8bc35a);}return;}const _0x3114c6=_0x4e6522;if((_0x3114c6['type']===_0x543328(0xb4)||_0x3114c6['type']==='exclude')&&typeof _0x3114c6[_0x543328(0xaf)]===_0x543328(0xa8)){const _0x4c548d=_0x8bc35a['get'](_0x3114c6[_0x543328(0xaf)]);_0x4c548d&&(_0x3114c6[_0x543328(0xaf)]=_0x4c548d);}if(_0x3114c6['conditions']&&Array[_0x543328(0xbe)](_0x3114c6['conditions']))for(const _0x16d807 of _0x3114c6[_0x543328(0xcf)]){updateSegmentRefsInRule(_0x16d807,_0x8bc35a);}}export function buildJourneysArray(_0x54ed67,_0x131981){return _0x54ed67['map'](_0x4eb171=>{const _0x30f08a=a133_0xdabb,_0x4805ae=_0x131981?_0x4eb171[_0x30f08a(0xe5)]['id']===_0x131981:_0x54ed67[_0x30f08a(0xd7)]===0x1,_0x35217b=_0x4eb171['yaml']['journeys']?.[0x0],_0x1463ce=_0x35217b?.['goal']||_0x4eb171['yaml'][_0x30f08a(0xd0)],_0x1eb5ca={'version':_0x35217b?.['version']||_0x4eb171[_0x30f08a(0xcd)][_0x30f08a(0xd4)]||_0x4eb171['item'][_0x30f08a(0xe8)],'state':_0x4eb171[_0x30f08a(0xe5)]['state']===_0x30f08a(0xca)?_0x30f08a(0xca):_0x30f08a(0xd5),'stages':_0x35217b?.[_0x30f08a(0xb3)]||_0x4eb171[_0x30f08a(0xcd)][_0x30f08a(0xb3)]||[],'id':_0x35217b?.['id']||_0x4eb171[_0x30f08a(0xcd)]['id'],'version_number':_0x35217b?.[_0x30f08a(0xc2)]||_0x4eb171[_0x30f08a(0xcd)][_0x30f08a(0xc2)]};return _0x1463ce&&(_0x1eb5ca[_0x30f08a(0xd0)]=_0x1463ce),_0x4805ae&&(_0x1eb5ca['latest']=!![]),_0x1eb5ca;});}export function buildMergedJourneyDef(_0xdeb8c2,_0x17b539,_0x221ec4){const _0x2bb994=a133_0xdabb,_0x11e479=_0xdeb8c2[0x0]['yaml'],_0x927dc9=buildJourneysArray(_0xdeb8c2,_0x221ec4),{merged:_0x4dcd56,nameMapping:_0x367fae}=consolidateSegmentsByContent(_0xdeb8c2[_0x2bb994(0xb9)](_0x11d9c0=>_0x11d9c0['yaml'][_0x2bb994(0xed)]),_0x17b539);updateSegmentRefsInSegments(_0x4dcd56,_0x367fae);const _0x233cf8=Array['from'](_0x367fae[_0x2bb994(0xc7)]())[_0x2bb994(0xdb)](([_0x5233d3,_0x61155f])=>_0x5233d3!==_0x61155f&&_0x5233d3['startsWith'](_0x2bb994(0xc3)));let _0x2100b9=_0x4dcd56,_0x4d7881=new Map();if(_0x233cf8){const _0x18a726=consolidateSegmentsByContent([_0x4dcd56],_0x17b539);_0x2100b9=_0x18a726[_0x2bb994(0xbb)],_0x4d7881=_0x18a726[_0x2bb994(0xa9)];}const _0x5179b7=new Map(_0x367fae);for(const [_0x179381,_0x1aba51]of _0x4d7881[_0x2bb994(0xc7)]()){_0x5179b7[_0x2bb994(0xe7)](_0x179381,_0x1aba51);}for(const [_0x3f42f2,_0x5522c4]of _0x5179b7[_0x2bb994(0xc7)]()){let _0x24ae9c=_0x5522c4,_0x7b3726=0x0;while(_0x5179b7['has'](_0x24ae9c)&&_0x5179b7[_0x2bb994(0xec)](_0x24ae9c)!==_0x24ae9c&&_0x7b3726<MAX_MAPPING_CHAIN_DEPTH){_0x24ae9c=_0x5179b7[_0x2bb994(0xec)](_0x24ae9c),_0x7b3726++;}_0x24ae9c!==_0x5522c4&&_0x5179b7[_0x2bb994(0xe7)](_0x3f42f2,_0x24ae9c);}for(const _0x3adbc7 of _0x927dc9){updateSegmentReferences(_0x3adbc7[_0x2bb994(0xb3)],_0x5179b7);}const {merged:_0x5426ff,nameMapping:_0xd73058}=consolidateActivationsByContent(_0xdeb8c2['map'](_0xe1891f=>_0xe1891f[_0x2bb994(0xcd)][_0x2bb994(0xac)]));for(const _0x197828 of _0x927dc9){updateActivationReferences(_0x197828['stages'],_0xd73058);}let _0x5aafd6=_0x11e479[_0x2bb994(0xd0)];if(_0x5aafd6?.[_0x2bb994(0xaf)]){const _0x4d5697=_0x5179b7[_0x2bb994(0xec)](_0x5aafd6[_0x2bb994(0xaf)]);_0x4d5697&&(_0x5aafd6={..._0x5aafd6,'segment':_0x4d5697});}for(const _0x5b44dd of _0x927dc9){if(_0x5b44dd[_0x2bb994(0xd0)]?.[_0x2bb994(0xaf)]){const _0x5ecbeb=_0x5179b7[_0x2bb994(0xec)](_0x5b44dd[_0x2bb994(0xd0)]['segment']);_0x5ecbeb&&(_0x5b44dd['goal']={..._0x5b44dd[_0x2bb994(0xd0)],'segment':_0x5ecbeb});}}return _0x927dc9['some'](_0x4999c9=>_0x4999c9[_0x2bb994(0xd0)])&&(_0x5aafd6=undefined),{'type':'journey','name':_0x11e479[_0x2bb994(0xe8)],'description':_0x11e479[_0x2bb994(0xbc)],'goal':_0x5aafd6,'reentry':_0x11e479['reentry'],'segments':Object['keys'](_0x2100b9)[_0x2bb994(0xd7)]>0x0?_0x2100b9:undefined,'activations':Object[_0x2bb994(0xaa)](_0x5426ff)['length']>0x0?_0x5426ff:undefined,'journeys':_0x927dc9,'bundle_id':_0x11e479[_0x2bb994(0xc9)],'bundle_name':_0x11e479[_0x2bb994(0xef)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x5e38e5,_0x2ab54b,_0x48d14d,_0x16c564){const _0x3e914b=a133_0xdabb,_0x5ae3ba=_0x5e38e5+':'+_0x2ab54b,_0x58de53=_0x48d14d[_0x3e914b(0xec)](_0x5ae3ba);if(_0x58de53)return _0x58de53;const _0x3f8ee9=await _0x16c564(_0x5e38e5),_0x5a6620=_0x3f8ee9['attributes'][_0x3e914b(0xc8)]||_0x3f8ee9['attributes'][_0x3e914b(0xe8)],_0x43ee6c=_0x3f8ee9[_0x3e914b(0xe6)][_0x3e914b(0xf0)]['find'](_0x3df05b=>String(_0x3df05b['id'])===String(_0x2ab54b)),_0x5cdbe4=_0x43ee6c?.['name']||_0x2ab54b,_0x47b34c={'journeyName':_0x5a6620,'stageName':_0x5cdbe4};return _0x48d14d['set'](_0x5ae3ba,_0x47b34c),_0x47b34c;}export function formatApiJourneyName(_0x9e8c94,_0x46dc5f){return _0x46dc5f+'\x20('+_0x9e8c94+')';}export function isLocalJourneyRef(_0x5db4ad){const _0x28dac2=a133_0xdabb;return _0x5db4ad[_0x28dac2(0xc0)](_0x28dac2(0xab))||_0x5db4ad['endsWith'](_0x28dac2(0xb6));}export function buildLocalRuleToNameMapping(_0x30a786){const _0x30075d=a133_0xdabb,_0x4179e7=new Map();if(!_0x30a786)return _0x4179e7;for(const [_0x3cde30,_0x5e28c5]of Object['entries'](_0x30a786)){if(_0x5e28c5[_0x30075d(0xdd)]){const _0x123de1=serializeRule(_0x5e28c5[_0x30075d(0xdd)]),_0x3de92a=_0x4179e7['get'](_0x123de1)||[];_0x3de92a[_0x30075d(0xe2)](_0x3cde30),_0x4179e7[_0x30075d(0xe7)](_0x123de1,_0x3de92a);}}return _0x4179e7;}export function buildLocalRuleToNameMappingFromJourney(_0x5d459e){const _0x58180b=a133_0xdabb,_0x19a74e=_0x5d459e[_0x58180b(0xed)];if(!_0x19a74e)return new Map();const _0x1021f8=collectSegmentUsageCounts(_0x5d459e),_0x3b1d32=new Map();let _0x537f4b=0x0;for(const [_0x43c8d0,_0x55bb22]of Object[_0x58180b(0xc7)](_0x19a74e)){if(!_0x55bb22['rule']){_0x537f4b++;continue;}const _0x4739bd=serializeRule(_0x55bb22[_0x58180b(0xdd)]),_0x3b0096=_0x3b1d32['get'](_0x4739bd)||[];_0x3b0096['push']({'name':_0x43c8d0,'index':_0x537f4b}),_0x3b1d32[_0x58180b(0xe7)](_0x4739bd,_0x3b0096),_0x537f4b++;}const _0x396c0d=new Map();for(const [_0x251115,_0x56ae7c]of _0x3b1d32){const _0x1c98b8=_0x56ae7c['slice']()[_0x58180b(0xb8)]((_0x233617,_0x543eec)=>{const _0x531993=_0x58180b,_0x6fefbc=_0x1021f8['get'](_0x233617[_0x531993(0xe8)])||0x0,_0x3ab15c=_0x1021f8[_0x531993(0xec)](_0x543eec['name'])||0x0;if(_0x6fefbc!==_0x3ab15c)return _0x3ab15c-_0x6fefbc;return _0x233617['index']-_0x543eec['index'];})[_0x58180b(0xb9)](_0x360fc9=>_0x360fc9[_0x58180b(0xe8)]);_0x396c0d[_0x58180b(0xe7)](_0x251115,_0x1c98b8);}return _0x396c0d;}export function collectSegmentUsageCounts(_0x4c96df){const _0x472238=a133_0xdabb,_0x3f4e7b=new Map(),_0x50cbb0=_0x55327d=>{const _0x1756e0=a133_0xdabb;if(!_0x55327d)return;_0x3f4e7b[_0x1756e0(0xe7)](_0x55327d,(_0x3f4e7b[_0x1756e0(0xec)](_0x55327d)||0x0)+0x1);},_0x472081=_0x41cd67=>{const _0x4a23c8=a133_0xdabb;for(const _0x36d9cf of _0x41cd67){_0x50cbb0(_0x36d9cf[_0x4a23c8(0xc3)]?.['segment']);if(_0x36d9cf[_0x4a23c8(0xd2)])for(const _0x4b02b7 of _0x36d9cf[_0x4a23c8(0xd2)]){_0x50cbb0(_0x4b02b7[_0x4a23c8(0xaf)]);}_0x50cbb0(_0x36d9cf[_0x4a23c8(0xcb)]?.['segment']);if(_0x36d9cf[_0x4a23c8(0xb5)])for(const _0x2d89bd of _0x36d9cf[_0x4a23c8(0xb5)]){if(_0x2d89bd[_0x4a23c8(0xc1)]===_0x4a23c8(0xce))for(const _0x589d59 of _0x2d89bd[_0x4a23c8(0xb2)][_0x4a23c8(0xde)]){_0x50cbb0(_0x589d59[_0x4a23c8(0xaf)]);}else _0x2d89bd[_0x4a23c8(0xc1)]===_0x4a23c8(0xc4)&&_0x50cbb0(_0x2d89bd['with'][_0x4a23c8(0xeb)]?.[_0x4a23c8(0xaf)]);}}};_0x50cbb0(_0x4c96df[_0x472238(0xd0)]?.[_0x472238(0xaf)]);if(_0x4c96df[_0x472238(0xad)])for(const _0x2c52d2 of _0x4c96df['journeys']){_0x50cbb0(_0x2c52d2[_0x472238(0xd0)]?.[_0x472238(0xaf)]),_0x472081(_0x2c52d2[_0x472238(0xb3)]);}_0x4c96df['stages']&&_0x472081(_0x4c96df['stages']);if(_0x4c96df['versions'])for(const _0x8f28e8 of _0x4c96df[_0x472238(0xd6)]){_0x472081(_0x8f28e8[_0x472238(0xb3)]);}return _0x3f4e7b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x44957c,_0xfca695){const _0x511b1d=a134_0x3b9a,_0x557dfa=_0x44957c();while(!![]){try{const _0x4f6b75=-parseInt(_0x511b1d(0x17d))/0x1+-parseInt(_0x511b1d(0x168))/0x2+-parseInt(_0x511b1d(0x141))/0x3*(-parseInt(_0x511b1d(0x117))/0x4)+-parseInt(_0x511b1d(0x15e))/0x5*(parseInt(_0x511b1d(0x18f))/0x6)+-parseInt(_0x511b1d(0x1af))/0x7*(-parseInt(_0x511b1d(0x11d))/0x8)+-parseInt(_0x511b1d(0x14f))/0x9+-parseInt(_0x511b1d(0x16b))/0xa*(-parseInt(_0x511b1d(0x160))/0xb);if(_0x4f6b75===_0xfca695)break;else _0x557dfa['push'](_0x557dfa['shift']());}catch(_0x4d6f88){_0x557dfa['push'](_0x557dfa['shift']());}}}(a134_0x5005,0x9785b));import{JourneyDefSchema}from'./types/journey-schema.js';function a134_0x5005(){const _0x3c2684=['segments.','data','\x20stages\x20but\x20maximum\x20is\x20','.with.branches','MISSING_STAGES','entries','488252HFhBvy','referencedSegments','size','.with.activation','issues','Embedded\x20segment\x20\x27','sort','.milestone','state','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','source','warning','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.stages','Decision\x20branch\x20\x27','DUPLICATE_LATEST','66drXvzE','trim','error','target','with','reduce','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_ACTIVATION_REF','wait','CONVERGENCE_WITHOUT_MERGE','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','variant\x20\x27','level','MISSING_NAME','journeys[','\x27\x20has\x20only\x20','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.steps[','message','.exit_criteria','.type','.with.variants[','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','MISSING_END_STEP','embeddedSegments','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','FEW_STEPS','decision_point','ab_test','journeys','244356WjKvHS','versions','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','Jump\x20step\x20requires\x20a\x20target','.with.condition.timeout','path','.with.condition','END_STEP_HAS_NEXT_OR_WITH','Journey\x20has\x20no\x20goal\x20defined','versions[','goal','Duplicate\x20step\x20name\x20\x27','name','\x27\x20with\x20no\x20action\x20in\x20between','MISSING_SEGMENT_REFERENCE','\x27\x20has\x20no\x20end\x20step','condition','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','ref:','Journey\x20name\x20is\x20required','timeout\x20of\x20\x27','.rule','stepNames','timeout','steps','INVALID_JUMP_TARGET','DUPLICATE_STEP_NAME','end','Journey\x20can\x20have\x20at\x20most\x20one\x20','skipSchema','1600636hwqBVC','merge','every','.with.condition.segment','replace','End\x20step\x20\x27','88KZLlpC','next','activationKeys','activations','.with','JOURNEY_SCHEMA_ERROR','\x27\x20of\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','map','A/B\x20test\x20variant\x20\x27','branch\x20\x27','.next','.name','startsWith','description','rule','abs','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','type','branches','match','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','.entry_criteria','excluded','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','segment','\x27\x20(from:\x20','endsWith','\x27\x20has\x20no\x20steps','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','segments','.with.condition.next','BRANCH_DIRECTLY_TO_MERGE','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','includes','UNUSED_EMBEDDED_SEGMENT','9hjABWA','milestone','launched','.segment','add','MISSING_MILESTONE','SINGLE_INPUT_MERGE','Stage\x20\x27','variants','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','splice','jump','keys','MISSING_CONDITIONS','7944318CQuzTt','MISSING_EXIT_CRITERIA','.with.condition.timeout.next','MISSING_ENTRY_CRITERIA','get','stages[','code','journey\x20entry','activation','has','length','entry_criteria','INVALID_NEXT_REFERENCE','set','exit_criteria','260980sqEDYG','journeys,\x20stages,\x20or\x20versions','3938oGUQFK','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','Merge\x20step\x20\x27','goalIsInherited','INSUFFICIENT_STEPS','Activation\x20step\x20requires\x20an\x20activation\x20reference','stage','960868yAMFvI','MISSING_ACTIVATION_DEFINITION','document','40830RsRTat','MISSING_WAIT_PARAMS','.with.variants','.with.branches[',').\x20Use\x20a\x20merge\x20step.','stages','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','push','.exit_criteria[','symbol','.steps'];a134_0x5005=function(){return _0x3c2684;};return a134_0x5005();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x2b009b,_0x39882e,_0x4b2171,_0x573c9e,_0x367626,_0x4ffee5){return{'level':_0x2b009b,'path':_0x39882e,'code':_0x4b2171,'message':_0x573c9e,'location':getLocationFromPath(_0x367626['document'],_0x367626['source'],pathToArray(_0x4ffee5??_0x39882e))};}function validateVersionStructure(_0x24eb18,_0x4d516d){const _0x4ce30d=a134_0x3b9a,_0x5086af=[];return _0x24eb18[_0x4ce30d(0x159)]>MAX_STAGES&&_0x5086af[_0x4ce30d(0x173)](createIssue('error','stages','TOO_MANY_STAGES','Journey\x20has\x20'+_0x24eb18['length']+_0x4ce30d(0x179)+MAX_STAGES,_0x4d516d)),_0x5086af;}function validateStageStructure(_0x4eff77,_0x1f238a,_0x4cd370,_0x275a7d){const _0x48ebc7=a134_0x3b9a,_0x374eb1=[],_0x58c5b4='stages['+_0x1f238a+']';_0x1f238a===0x0&&!_0x4eff77[_0x48ebc7(0x15a)]&&_0x374eb1[_0x48ebc7(0x173)](createIssue(_0x48ebc7(0x191),_0x58c5b4+_0x48ebc7(0x133),_0x48ebc7(0x152),_0x48ebc7(0x148)+_0x4eff77['name']+_0x48ebc7(0x19a),_0x275a7d,_0x58c5b4));const _0x3a3d77=_0x1f238a===_0x4cd370-0x1;!_0x3a3d77&&!_0x4eff77[_0x48ebc7(0x142)]&&_0x374eb1[_0x48ebc7(0x173)](createIssue('error',_0x58c5b4+_0x48ebc7(0x184),_0x48ebc7(0x146),_0x48ebc7(0x148)+_0x4eff77['name']+_0x48ebc7(0x161),_0x275a7d,_0x58c5b4));(!_0x4eff77[_0x48ebc7(0x15d)]||_0x4eff77[_0x48ebc7(0x15d)][_0x48ebc7(0x159)]===0x0)&&_0x374eb1[_0x48ebc7(0x173)](createIssue(_0x48ebc7(0x188),_0x58c5b4+_0x48ebc7(0x1a4),_0x48ebc7(0x150),_0x48ebc7(0x148)+_0x4eff77['name']+_0x48ebc7(0x196),_0x275a7d,_0x58c5b4));const _0x1a6412=_0x4eff77[_0x48ebc7(0x111)]?.['length']??0x0;if(_0x1a6412===0x0)_0x374eb1[_0x48ebc7(0x173)](createIssue(_0x48ebc7(0x191),_0x58c5b4+_0x48ebc7(0x176),_0x48ebc7(0x165),_0x48ebc7(0x148)+_0x4eff77[_0x48ebc7(0x105)]+_0x48ebc7(0x139),_0x275a7d,_0x58c5b4+'.steps'));else{if(_0x1a6412===0x1)_0x374eb1[_0x48ebc7(0x173)](createIssue(_0x48ebc7(0x188),_0x58c5b4+_0x48ebc7(0x176),_0x48ebc7(0x165),_0x48ebc7(0x148)+_0x4eff77[_0x48ebc7(0x105)]+_0x48ebc7(0x18b),_0x275a7d,_0x58c5b4+_0x48ebc7(0x176)));else _0x1a6412<=0x3&&_0x374eb1['push'](createIssue(_0x48ebc7(0x188),_0x58c5b4+'.steps',_0x48ebc7(0x1ab),_0x48ebc7(0x148)+_0x4eff77[_0x48ebc7(0x105)]+_0x48ebc7(0x1a0)+_0x1a6412+_0x48ebc7(0x124),_0x275a7d,_0x58c5b4+_0x48ebc7(0x176)));}return _0x374eb1;}function validateStep(_0x55644d,_0x238c9b,_0x56de5c,_0x353d90){const _0x5b2c77=a134_0x3b9a,_0x646b95=[];if(_0x55644d[_0x5b2c77(0x12f)]===_0x5b2c77(0x114))return _0x55644d[_0x5b2c77(0x11e)]&&_0x646b95[_0x5b2c77(0x173)](createIssue(_0x5b2c77(0x191),_0x238c9b+_0x5b2c77(0x128),_0x5b2c77(0x1b6),_0x5b2c77(0x11c)+_0x55644d[_0x5b2c77(0x105)]+_0x5b2c77(0x1aa),_0x56de5c)),_0x5b2c77(0x193)in _0x55644d&&_0x55644d['with']!==undefined&&_0x646b95[_0x5b2c77(0x173)](createIssue(_0x5b2c77(0x191),_0x238c9b+_0x5b2c77(0x121),'END_STEP_HAS_NEXT_OR_WITH','End\x20step\x20\x27'+_0x55644d['name']+_0x5b2c77(0x186),_0x56de5c)),_0x646b95;_0x55644d['next']&&(_0x56de5c[_0x5b2c77(0x10f)]&&!_0x56de5c[_0x5b2c77(0x10f)][_0x5b2c77(0x158)](_0x55644d[_0x5b2c77(0x11e)])&&_0x646b95[_0x5b2c77(0x173)](createIssue(_0x5b2c77(0x191),_0x238c9b+'.next',_0x5b2c77(0x15b),_0x5b2c77(0x189)+_0x55644d[_0x5b2c77(0x11e)]+'\x27',_0x56de5c)));switch(_0x55644d[_0x5b2c77(0x12f)]){case'wait':_0x646b95[_0x5b2c77(0x173)](...validateWaitStep(_0x55644d,_0x238c9b,_0x56de5c,_0x353d90));break;case _0x5b2c77(0x157):_0x646b95[_0x5b2c77(0x173)](...validateActivationStep(_0x55644d,_0x238c9b,_0x56de5c));break;case _0x5b2c77(0x1ac):_0x646b95[_0x5b2c77(0x173)](...validateDecisionPointStep(_0x55644d,_0x238c9b,_0x56de5c,_0x353d90));break;case'ab_test':_0x646b95[_0x5b2c77(0x173)](...validateAbTestStep(_0x55644d,_0x238c9b,_0x56de5c,_0x353d90));break;case _0x5b2c77(0x14c):_0x646b95[_0x5b2c77(0x173)](...validateJumpStep(_0x55644d,_0x238c9b,_0x56de5c));break;}return _0x646b95;}function validateWaitStep(_0x1e3ce1,_0x16621b,_0x11a3fb,_0x430bbe){const _0x34af98=a134_0x3b9a,_0x2534f3=[];if(!_0x1e3ce1[_0x34af98(0x193)])return _0x2534f3[_0x34af98(0x173)](createIssue(_0x34af98(0x191),_0x16621b+_0x34af98(0x121),_0x34af98(0x16c),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x11a3fb,_0x16621b)),_0x2534f3;if(_0x1e3ce1[_0x34af98(0x193)]['condition']){const _0x2093cf=_0x1e3ce1[_0x34af98(0x193)][_0x34af98(0x109)];if(_0x2093cf[_0x34af98(0x136)]){_0x11a3fb[_0x34af98(0x17e)]?.['add'](_0x2093cf[_0x34af98(0x136)]);!_0x2093cf[_0x34af98(0x136)][_0x34af98(0x12a)]('ref:')&&(_0x11a3fb[_0x34af98(0x1a9)]&&!_0x11a3fb[_0x34af98(0x1a9)][_0x34af98(0x158)](_0x2093cf[_0x34af98(0x136)])&&_0x2534f3[_0x34af98(0x173)](createIssue(_0x34af98(0x191),_0x16621b+_0x34af98(0x11a),_0x34af98(0x107),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x2093cf[_0x34af98(0x136)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x11a3fb)));_0x2093cf[_0x34af98(0x11e)]&&_0x11a3fb[_0x34af98(0x10f)]&&!_0x11a3fb[_0x34af98(0x10f)][_0x34af98(0x158)](_0x2093cf[_0x34af98(0x11e)])&&_0x2534f3[_0x34af98(0x173)](createIssue(_0x34af98(0x191),_0x16621b+_0x34af98(0x13c),_0x34af98(0x15b),_0x34af98(0x172)+_0x2093cf['next']+'\x27',_0x11a3fb));_0x2093cf[_0x34af98(0x110)]?.[_0x34af98(0x11e)]&&_0x11a3fb[_0x34af98(0x10f)]&&!_0x11a3fb[_0x34af98(0x10f)][_0x34af98(0x158)](_0x2093cf[_0x34af98(0x110)][_0x34af98(0x11e)])&&_0x2534f3[_0x34af98(0x173)](createIssue(_0x34af98(0x191),_0x16621b+_0x34af98(0x151),_0x34af98(0x15b),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x2093cf[_0x34af98(0x110)][_0x34af98(0x11e)]+'\x27',_0x11a3fb));const _0x473455=_0x2093cf[_0x34af98(0x11e)]||_0x1e3ce1[_0x34af98(0x11e)],_0x2a1899=_0x2093cf[_0x34af98(0x110)]?.['next']||_0x1e3ce1[_0x34af98(0x11e)];if(_0x473455){const _0x42fe40=_0x430bbe[_0x34af98(0x153)](_0x473455);_0x42fe40?.[_0x34af98(0x12f)]===_0x34af98(0x118)&&_0x2534f3[_0x34af98(0x173)](createIssue(_0x34af98(0x188),_0x16621b+_0x34af98(0x13c),_0x34af98(0x13d),_0x34af98(0x1a1)+_0x473455+_0x34af98(0x18a),_0x11a3fb,_0x16621b+_0x34af98(0x1b5)));}if(_0x2a1899){const _0x8b601f=_0x430bbe[_0x34af98(0x153)](_0x2a1899);_0x8b601f?.['type']===_0x34af98(0x118)&&_0x2534f3['push'](createIssue(_0x34af98(0x188),_0x16621b+_0x34af98(0x151),_0x34af98(0x13d),_0x34af98(0x195)+_0x2a1899+_0x34af98(0x18a),_0x11a3fb,_0x16621b+_0x34af98(0x1b3)));}}}return _0x2534f3;}function validateActivationStep(_0x57309e,_0x32f09a,_0x3d071d){const _0x4da1ad=a134_0x3b9a,_0x43aa46=[];if(!_0x57309e[_0x4da1ad(0x193)]?.[_0x4da1ad(0x157)])return _0x43aa46[_0x4da1ad(0x173)](createIssue(_0x4da1ad(0x191),_0x32f09a+_0x4da1ad(0x180),_0x4da1ad(0x197),_0x4da1ad(0x166),_0x3d071d,_0x32f09a)),_0x43aa46;const _0x2f9bd2=_0x57309e[_0x4da1ad(0x193)][_0x4da1ad(0x157)];return _0x3d071d[_0x4da1ad(0x11f)]&&!_0x2f9bd2[_0x4da1ad(0x12a)](_0x4da1ad(0x10b))&&(!_0x3d071d['activationKeys']['has'](_0x2f9bd2)&&_0x43aa46[_0x4da1ad(0x173)](createIssue(_0x4da1ad(0x191),_0x32f09a+_0x4da1ad(0x180),_0x4da1ad(0x169),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x2f9bd2+_0x4da1ad(0x13e),_0x3d071d))),_0x43aa46;}function validateDecisionPointStep(_0x3f946a,_0x38cfda,_0x4e689b,_0x6fda6e){const _0x5a171e=a134_0x3b9a,_0x3f09be=[];if(!_0x3f946a[_0x5a171e(0x193)]?.[_0x5a171e(0x130)]||_0x3f946a['with']['branches']['length']===0x0)return _0x3f09be['push'](createIssue(_0x5a171e(0x191),_0x38cfda+_0x5a171e(0x17a),'MISSING_CONDITIONS',_0x5a171e(0x10a),_0x4e689b,_0x38cfda)),_0x3f09be;for(let _0x4e7fb6=0x0;_0x4e7fb6<_0x3f946a[_0x5a171e(0x193)][_0x5a171e(0x130)]['length'];_0x4e7fb6++){const _0x1583cd=_0x3f946a['with']['branches'][_0x4e7fb6],_0x1c3561=_0x38cfda+_0x5a171e(0x16e)+_0x4e7fb6+']';_0x1583cd['segment']&&!_0x1583cd[_0x5a171e(0x134)]&&(_0x4e689b[_0x5a171e(0x17e)]?.[_0x5a171e(0x145)](_0x1583cd['segment']),!_0x1583cd[_0x5a171e(0x136)][_0x5a171e(0x12a)]('ref:')&&(_0x4e689b[_0x5a171e(0x1a9)]&&!_0x4e689b[_0x5a171e(0x1a9)][_0x5a171e(0x158)](_0x1583cd[_0x5a171e(0x136)])&&_0x3f09be['push'](createIssue(_0x5a171e(0x191),_0x1c3561+_0x5a171e(0x144),_0x5a171e(0x107),_0x5a171e(0x135)+_0x1583cd['segment']+'\x27',_0x4e689b))));_0x1583cd[_0x5a171e(0x11e)]&&_0x4e689b[_0x5a171e(0x10f)]&&!_0x4e689b[_0x5a171e(0x10f)][_0x5a171e(0x158)](_0x1583cd['next'])&&_0x3f09be['push'](createIssue('error',_0x1c3561+'.next',_0x5a171e(0x15b),'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x1583cd['next']+'\x27',_0x4e689b));if(_0x1583cd[_0x5a171e(0x11e)]){const _0xa2b8d6=_0x6fda6e[_0x5a171e(0x153)](_0x1583cd[_0x5a171e(0x11e)]);_0xa2b8d6?.[_0x5a171e(0x12f)]==='merge'&&_0x3f09be[_0x5a171e(0x173)](createIssue(_0x5a171e(0x188),_0x1c3561+'.next',_0x5a171e(0x13d),_0x5a171e(0x18d)+_0x1583cd['name']+_0x5a171e(0x19b)+_0x1583cd['next']+_0x5a171e(0x106),_0x4e689b));}}return _0x3f09be;}function validateAbTestStep(_0x12d044,_0x9e9c69,_0x2a5a76,_0x4561f2){const _0x37b66a=a134_0x3b9a,_0x320d96=[];if(!_0x12d044[_0x37b66a(0x193)]?.[_0x37b66a(0x149)]||_0x12d044[_0x37b66a(0x193)]['variants'][_0x37b66a(0x159)]===0x0)return _0x320d96[_0x37b66a(0x173)](createIssue(_0x37b66a(0x191),_0x9e9c69+'.with.variants',_0x37b66a(0x14e),_0x37b66a(0x12e),_0x2a5a76,_0x9e9c69)),_0x320d96;const _0x418e70=_0x12d044[_0x37b66a(0x193)]['variants'][_0x37b66a(0x194)]((_0x3c6716,_0x1772b7)=>_0x3c6716+(_0x1772b7['percentage']||0x0),0x0);Math[_0x37b66a(0x12d)](_0x418e70-0x64)>0.01&&_0x320d96['push'](createIssue('error',_0x9e9c69+_0x37b66a(0x16d),'INVALID_AB_TEST_PERCENTAGES',_0x37b66a(0x1b1)+_0x418e70+'%)',_0x2a5a76));for(let _0x90a067=0x0;_0x90a067<_0x12d044[_0x37b66a(0x193)][_0x37b66a(0x149)][_0x37b66a(0x159)];_0x90a067++){const _0x274199=_0x12d044[_0x37b66a(0x193)][_0x37b66a(0x149)][_0x90a067],_0x4bd19e=_0x9e9c69+_0x37b66a(0x1a6)+_0x90a067+']';_0x274199[_0x37b66a(0x11e)]&&_0x2a5a76[_0x37b66a(0x10f)]&&!_0x2a5a76[_0x37b66a(0x10f)][_0x37b66a(0x158)](_0x274199[_0x37b66a(0x11e)])&&_0x320d96[_0x37b66a(0x173)](createIssue(_0x37b66a(0x191),_0x4bd19e+_0x37b66a(0x128),_0x37b66a(0x15b),_0x37b66a(0x13a)+_0x274199[_0x37b66a(0x11e)]+'\x27',_0x2a5a76));if(_0x274199[_0x37b66a(0x11e)]){const _0x223b28=_0x4561f2[_0x37b66a(0x153)](_0x274199[_0x37b66a(0x11e)]);_0x223b28?.[_0x37b66a(0x12f)]==='merge'&&_0x320d96['push'](createIssue('warning',_0x4bd19e+_0x37b66a(0x128),_0x37b66a(0x13d),_0x37b66a(0x126)+_0x274199[_0x37b66a(0x105)]+_0x37b66a(0x19b)+_0x274199[_0x37b66a(0x11e)]+_0x37b66a(0x106),_0x2a5a76));}}return _0x320d96;}function validateJumpStep(_0x34a758,_0x1fdbdc,_0x5dd174){const _0x1f1274=a134_0x3b9a,_0x89986a=[];if(!_0x34a758[_0x1f1274(0x193)]?.[_0x1f1274(0x192)])return _0x89986a[_0x1f1274(0x173)](createIssue(_0x1f1274(0x191),_0x1fdbdc+'.with.target','INVALID_JUMP_TARGET',_0x1f1274(0x1b2),_0x5dd174,_0x1fdbdc)),_0x89986a;return(!_0x34a758['with']['target']['journey']||!_0x34a758['with'][_0x1f1274(0x192)][_0x1f1274(0x167)])&&_0x89986a[_0x1f1274(0x173)](createIssue('error',_0x1fdbdc+'.with.target',_0x1f1274(0x112),_0x1f1274(0x132),_0x5dd174)),_0x89986a;}function buildConvergenceMap(_0x2b817a){const _0x5839d5=a134_0x3b9a,_0x314ae2=new Map();function _0x5a3a95(_0x4fc240,_0x341076){const _0x3d5242=a134_0x3b9a,_0x377f2c=_0x314ae2[_0x3d5242(0x153)](_0x4fc240)||[];_0x377f2c['push'](_0x341076),_0x314ae2[_0x3d5242(0x15c)](_0x4fc240,_0x377f2c);}for(const _0x32688c of _0x2b817a){_0x32688c[_0x5839d5(0x11e)]&&_0x5a3a95(_0x32688c['next'],{'stepName':_0x32688c[_0x5839d5(0x105)],'description':'step\x20\x27'+_0x32688c[_0x5839d5(0x105)]+'\x27'});if(_0x32688c[_0x5839d5(0x12f)]===_0x5839d5(0x1ac)&&_0x32688c['with']?.[_0x5839d5(0x130)])for(const _0x14cf7a of _0x32688c[_0x5839d5(0x193)]['branches']){_0x14cf7a[_0x5839d5(0x11e)]&&_0x5a3a95(_0x14cf7a[_0x5839d5(0x11e)],{'stepName':_0x32688c['name'],'description':_0x5839d5(0x127)+_0x14cf7a[_0x5839d5(0x105)]+_0x5839d5(0x123)+_0x32688c['name']+'\x27'});}if(_0x32688c[_0x5839d5(0x12f)]===_0x5839d5(0x1ad)&&_0x32688c[_0x5839d5(0x193)]?.[_0x5839d5(0x149)])for(const _0x12e3fd of _0x32688c[_0x5839d5(0x193)][_0x5839d5(0x149)]){_0x12e3fd[_0x5839d5(0x11e)]&&_0x5a3a95(_0x12e3fd[_0x5839d5(0x11e)],{'stepName':_0x32688c['name'],'description':_0x5839d5(0x19c)+_0x12e3fd[_0x5839d5(0x105)]+_0x5839d5(0x123)+_0x32688c[_0x5839d5(0x105)]+'\x27'});}_0x32688c[_0x5839d5(0x12f)]===_0x5839d5(0x198)&&_0x32688c['with']?.[_0x5839d5(0x109)]&&(_0x32688c[_0x5839d5(0x193)]['condition']['next']&&_0x5a3a95(_0x32688c[_0x5839d5(0x193)][_0x5839d5(0x109)]['next'],{'stepName':_0x32688c[_0x5839d5(0x105)],'description':'condition\x20of\x20\x27'+_0x32688c[_0x5839d5(0x105)]+'\x27'}),_0x32688c[_0x5839d5(0x193)][_0x5839d5(0x109)]['timeout']?.[_0x5839d5(0x11e)]&&_0x5a3a95(_0x32688c[_0x5839d5(0x193)]['condition']['timeout'][_0x5839d5(0x11e)],{'stepName':_0x32688c[_0x5839d5(0x105)],'description':_0x5839d5(0x10d)+_0x32688c[_0x5839d5(0x105)]+'\x27'}));}return _0x314ae2;}function validateFlowControl(_0x4a62e1,_0x10ab56,_0x4bf02f){const _0xa9b2c0=a134_0x3b9a,_0x30429a=[],_0x57814a=_0xa9b2c0(0x154)+_0x10ab56+']',_0x4b1f11=_0x4a62e1[_0xa9b2c0(0x111)]||[];if(_0x4b1f11[_0xa9b2c0(0x159)]===0x0)return _0x30429a;const _0x5f3e3a=new Map();for(const _0x15e8c1 of _0x4b1f11){_0x15e8c1[_0xa9b2c0(0x105)]&&_0x5f3e3a['set'](_0x15e8c1[_0xa9b2c0(0x105)],_0x15e8c1);}const _0x10ebfb=buildConvergenceMap(_0x4b1f11),_0x1e950d=_0x4b1f11['some'](_0x3f5348=>_0x3f5348[_0xa9b2c0(0x12f)]===_0xa9b2c0(0x114));!_0x1e950d&&_0x30429a[_0xa9b2c0(0x173)](createIssue(_0xa9b2c0(0x191),_0x57814a+_0xa9b2c0(0x176),_0xa9b2c0(0x1a8),_0xa9b2c0(0x148)+_0x4a62e1[_0xa9b2c0(0x105)]+_0xa9b2c0(0x108),_0x4bf02f));for(const [_0x2dc871,_0x2f4f36]of _0x10ebfb){const _0x3f27d6=_0x5f3e3a['get'](_0x2dc871);if(!_0x3f27d6)continue;if(_0x2f4f36[_0xa9b2c0(0x159)]>0x1&&_0x3f27d6[_0xa9b2c0(0x12f)]!==_0xa9b2c0(0x118)){const _0x227e6c=_0x2f4f36['map'](_0x3dc864=>_0x3dc864[_0xa9b2c0(0x12b)])['join'](',\x20');_0x30429a[_0xa9b2c0(0x173)](createIssue('error',_0x57814a+'.steps',_0xa9b2c0(0x199),_0xa9b2c0(0x162)+_0x2dc871+_0xa9b2c0(0x137)+_0x227e6c+_0xa9b2c0(0x16f),_0x4bf02f));}_0x2f4f36[_0xa9b2c0(0x159)]===0x1&&_0x3f27d6[_0xa9b2c0(0x12f)]===_0xa9b2c0(0x118)&&_0x30429a['push'](createIssue(_0xa9b2c0(0x188),_0x57814a+'.steps',_0xa9b2c0(0x147),_0xa9b2c0(0x163)+_0x2dc871+_0xa9b2c0(0x14a)+_0x2f4f36[0x0][_0xa9b2c0(0x12b)]+').\x20Merge\x20is\x20unnecessary.',_0x4bf02f));}for(const _0x4c014b of _0x4b1f11){if(_0x4c014b[_0xa9b2c0(0x12f)]==='merge'&&_0x4c014b['next']){const _0x2c539b=_0x5f3e3a[_0xa9b2c0(0x153)](_0x4c014b[_0xa9b2c0(0x11e)]);_0x2c539b?.[_0xa9b2c0(0x12f)]==='merge'&&_0x30429a[_0xa9b2c0(0x173)](createIssue(_0xa9b2c0(0x191),_0x57814a+_0xa9b2c0(0x176),'MERGE_TO_MERGE_CHAIN',_0xa9b2c0(0x163)+_0x4c014b['name']+_0xa9b2c0(0x171)+_0x4c014b[_0xa9b2c0(0x11e)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x4bf02f));}}return _0x30429a;}function validateCriteria(_0x43a188,_0x188540,_0xd2eb7a){const _0x5db6e5=a134_0x3b9a,_0x5d5984=[];return _0x43a188[_0x5db6e5(0x136)]&&(_0xd2eb7a[_0x5db6e5(0x17e)]?.[_0x5db6e5(0x145)](_0x43a188['segment']),!_0x43a188[_0x5db6e5(0x136)][_0x5db6e5(0x12a)](_0x5db6e5(0x10b))&&(_0xd2eb7a[_0x5db6e5(0x1a9)]&&!_0xd2eb7a[_0x5db6e5(0x1a9)][_0x5db6e5(0x158)](_0x43a188[_0x5db6e5(0x136)])&&_0x5d5984[_0x5db6e5(0x173)](createIssue('error',_0x188540+'.segment',_0x5db6e5(0x107),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x43a188[_0x5db6e5(0x136)]+'\x27',_0xd2eb7a)))),_0x5d5984;}function validateEmbeddedSegment(_0x12b35d,_0x12dbcb,_0x38b32a){const _0x2f4451=a134_0x3b9a,_0x3734aa=[];return _0x12b35d[_0x2f4451(0x12c)]&&_0x3734aa[_0x2f4451(0x173)](...validateRuleDef(_0x12b35d[_0x2f4451(0x12c)],_0x12dbcb+_0x2f4451(0x10e),_0x38b32a)),_0x3734aa;}function a134_0x3b9a(_0x469fde,_0x2bf68b){_0x469fde=_0x469fde-0x104;const _0x5005ac=a134_0x5005();let _0x3b9ad8=_0x5005ac[_0x469fde];return _0x3b9ad8;}function validateStage(_0x2f1df0,_0x1a34d0,_0x5a93fa,_0x594398){const _0x2bfe9a=a134_0x3b9a,_0x1d6ee5=[],_0x5be8f6=_0x2bfe9a(0x154)+_0x1a34d0+']',_0xa86a31=new Map(),_0x4e936e=new Map();if(_0x2f1df0['steps']){for(let _0x121b65=0x0;_0x121b65<_0x2f1df0[_0x2bfe9a(0x111)][_0x2bfe9a(0x159)];_0x121b65++){const _0x511460=_0x2f1df0[_0x2bfe9a(0x111)][_0x121b65];_0x511460[_0x2bfe9a(0x105)]&&_0xa86a31['set'](_0x511460[_0x2bfe9a(0x105)],_0x511460);}for(let _0x314b99=0x0;_0x314b99<_0x2f1df0[_0x2bfe9a(0x111)]['length'];_0x314b99++){const _0x1766db=_0x2f1df0[_0x2bfe9a(0x111)][_0x314b99],_0x46f071=_0x5be8f6+_0x2bfe9a(0x1a2)+_0x314b99+']';if(_0x1766db['name']){if(_0x4e936e[_0x2bfe9a(0x158)](_0x1766db[_0x2bfe9a(0x105)])){const _0x1d60b5=_0x4e936e[_0x2bfe9a(0x153)](_0x1766db[_0x2bfe9a(0x105)]);_0x1d6ee5[_0x2bfe9a(0x173)](createIssue(_0x2bfe9a(0x191),_0x46f071+_0x2bfe9a(0x129),_0x2bfe9a(0x113),_0x2bfe9a(0x104)+_0x1766db[_0x2bfe9a(0x105)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x1d60b5+'])',_0x594398));}else _0x4e936e['set'](_0x1766db[_0x2bfe9a(0x105)],_0x314b99);}_0x1d6ee5[_0x2bfe9a(0x173)](...validateStep(_0x1766db,_0x46f071,_0x594398,_0xa86a31));}}_0x2f1df0['entry_criteria']&&_0x1d6ee5[_0x2bfe9a(0x173)](...validateCriteria(_0x2f1df0[_0x2bfe9a(0x15a)],_0x5be8f6+_0x2bfe9a(0x133),_0x594398));if(_0x2f1df0['exit_criteria'])for(let _0x4f890e=0x0;_0x4f890e<_0x2f1df0['exit_criteria'][_0x2bfe9a(0x159)];_0x4f890e++){_0x1d6ee5[_0x2bfe9a(0x173)](...validateCriteria(_0x2f1df0[_0x2bfe9a(0x15d)][_0x4f890e],_0x5be8f6+_0x2bfe9a(0x174)+_0x4f890e+']',_0x594398));}return _0x2f1df0[_0x2bfe9a(0x142)]&&_0x1d6ee5[_0x2bfe9a(0x173)](...validateCriteria(_0x2f1df0[_0x2bfe9a(0x142)],_0x5be8f6+_0x2bfe9a(0x184),_0x594398)),_0x1d6ee5['push'](...validateStageStructure(_0x2f1df0,_0x1a34d0,_0x5a93fa,_0x594398)),_0x1d6ee5['push'](...validateFlowControl(_0x2f1df0,_0x1a34d0,_0x594398)),_0x1d6ee5;}function validateStagesForVersion(_0x2d2a5e,_0x4aec2d,_0x4f44ff,_0x55621c,_0x5b18da,_0x4575d4,_0x2d8c68){const _0x39704e=a134_0x3b9a;if(_0x2d2a5e[_0x39704e(0x159)]===0x0){_0x5b18da[_0x39704e(0x173)]({'level':_0x39704e(0x191),'path':_0x55621c+_0x39704e(0x170),'code':_0x39704e(0x17b),'message':_0x39704e(0x1a7),'location':getLocationFromPath(_0x4f44ff[_0x39704e(0x16a)],_0x4f44ff[_0x39704e(0x187)],[_0x39704e(0x170)])});return;}const _0x377c9c=new Set();for(const _0x568f38 of _0x2d2a5e){if(_0x568f38[_0x39704e(0x111)])for(const _0x37addc of _0x568f38[_0x39704e(0x111)]){_0x37addc[_0x39704e(0x105)]&&_0x377c9c[_0x39704e(0x145)](_0x37addc[_0x39704e(0x105)]);}}const _0x414d82={..._0x4f44ff,'stepNames':_0x377c9c},_0x1347fe=validateVersionStructure(_0x2d2a5e,_0x414d82);for(const _0x186ccc of _0x1347fe){const _0x14cca3=_0x55621c?{..._0x186ccc,'path':''+_0x55621c+_0x186ccc[_0x39704e(0x1b4)]}:_0x186ccc;if(_0x14cca3[_0x39704e(0x19d)]==='error')_0x5b18da[_0x39704e(0x173)](_0x14cca3);else _0x4575d4['push'](_0x14cca3);}for(let _0x32b9ee=0x0;_0x32b9ee<_0x2d2a5e[_0x39704e(0x159)];_0x32b9ee++){const _0x4b07bc=validateStage(_0x2d2a5e[_0x32b9ee],_0x32b9ee,_0x2d2a5e['length'],_0x414d82);for(const _0x3a6145 of _0x4b07bc){const _0x4580cd=_0x55621c?{..._0x3a6145,'path':''+_0x55621c+_0x3a6145[_0x39704e(0x1b4)]}:_0x3a6145;if(_0x4580cd['level']===_0x39704e(0x191))_0x5b18da[_0x39704e(0x173)](_0x4580cd);else _0x4575d4[_0x39704e(0x173)](_0x4580cd);}}if(_0x4aec2d[_0x39704e(0x1b9)]){const _0x121a6f=_0x2d8c68?.[_0x39704e(0x164)]?_0x39704e(0x1b9):_0x55621c+'goal',_0x2d6578=validateCriteria(_0x4aec2d['goal'],_0x121a6f,_0x414d82);for(const _0x565c60 of _0x2d6578){if(_0x565c60[_0x39704e(0x19d)]===_0x39704e(0x191))_0x5b18da[_0x39704e(0x173)](_0x565c60);else _0x4575d4[_0x39704e(0x173)](_0x565c60);}}}function extractVersionIndex(_0x515763){const _0x48726f=a134_0x3b9a,_0x469d5b=_0x515763[_0x48726f(0x131)](/^journeys\[(\d+)\]\./);return _0x469d5b?_0x469d5b[0x1]:undefined;}function deduplicateAcrossVersions(_0x123d15){const _0x43759b=a134_0x3b9a,_0x2b412d=new Map();for(let _0x542c82=0x0;_0x542c82<_0x123d15['length'];_0x542c82++){const _0x227536=_0x123d15[_0x542c82][_0x43759b(0x155)]+':'+_0x123d15[_0x542c82][_0x43759b(0x1a3)],_0x511bf8=extractVersionIndex(_0x123d15[_0x542c82]['path']),_0x404958=_0x2b412d['get'](_0x227536);if(_0x404958){_0x404958['indices'][_0x43759b(0x173)](_0x542c82);if(_0x511bf8)_0x404958['versions']['add'](_0x511bf8);}else _0x2b412d['set'](_0x227536,{'indices':[_0x542c82],'versions':new Set(_0x511bf8?[_0x511bf8]:[])});}const _0x29290c=new Set();for(const {indices:_0x5d6fb5,versions:_0x645b74}of _0x2b412d['values']()){if(_0x645b74[_0x43759b(0x17f)]<=0x1)continue;const _0x16da2f=_0x123d15[_0x5d6fb5[0x0]];_0x16da2f[_0x43759b(0x1b4)]=_0x16da2f[_0x43759b(0x1b4)][_0x43759b(0x11b)](/^journeys\[\d+\]\./,''),_0x16da2f['message']=_0x16da2f['message']+'\x20(across\x20'+_0x645b74[_0x43759b(0x17f)]+'\x20versions)';for(let _0x10986e=0x1;_0x10986e<_0x5d6fb5[_0x43759b(0x159)];_0x10986e++){_0x29290c['add'](_0x5d6fb5[_0x10986e]);}}const _0xa7a392=[..._0x29290c][_0x43759b(0x183)]((_0x49da4c,_0x287db1)=>_0x287db1-_0x49da4c);for(const _0x19bad0 of _0xa7a392){_0x123d15[_0x43759b(0x14b)](_0x19bad0,0x1);}}export function validateJourneyDef(_0x16d5ac,_0x91890a={},_0x1db28c={}){const _0x1e2159=a134_0x3b9a;if(_0x1db28c[_0x1e2159(0x116)])return runJourneySemanticChecks(_0x16d5ac,_0x91890a);const _0x5b87a0=JourneyDefSchema['safeParse'](_0x16d5ac);if(_0x5b87a0['success'])return runJourneySemanticChecks(_0x5b87a0[_0x1e2159(0x178)],_0x91890a);return zodErrorsToJourneyValidationResult(_0x5b87a0[_0x1e2159(0x191)],_0x91890a);}function zodErrorsToJourneyValidationResult(_0x45a5ad,_0x514d15){const _0x584344=a134_0x3b9a,_0x470bbe=flattenZodIssues(_0x45a5ad[_0x584344(0x181)]),_0x3b6c97=_0x470bbe[_0x584344(0x125)](_0xac8289=>{const _0xbc4c17=_0x584344,_0x1f6998=formatZodPath(_0xac8289[_0xbc4c17(0x1b4)]),_0x24a43c=mapJourneyZodIssueToCode(_0xac8289,_0x1f6998),_0x52cbb1=getLocationFromPath(_0x514d15[_0xbc4c17(0x16a)],_0x514d15['source'],_0xac8289[_0xbc4c17(0x1b4)][_0xbc4c17(0x125)](_0x3e9941=>typeof _0x3e9941===_0xbc4c17(0x175)?String(_0x3e9941):_0x3e9941));return{'level':'error','path':_0x1f6998,'code':_0x24a43c,'message':_0xac8289['message'],..._0x52cbb1&&{'location':_0x52cbb1}};});return{'valid':![],'errors':_0x3b6c97,'warnings':[]};}function mapJourneyZodIssueToCode(_0x35e23d,_0xd8036b){const _0x41edd4=a134_0x3b9a;if(_0xd8036b===_0x41edd4(0x105))return _0x41edd4(0x19e);if(_0xd8036b[_0x41edd4(0x138)](_0x41edd4(0x1a5))&&_0xd8036b[_0x41edd4(0x13f)](_0x41edd4(0x111)))return'JOURNEY_SCHEMA_ERROR';if(_0xd8036b===_0x41edd4(0x170)||_0xd8036b[_0x41edd4(0x138)](_0x41edd4(0x18c)))return _0x41edd4(0x17b);if(_0xd8036b===''&&_0x35e23d[_0x41edd4(0x1a3)][_0x41edd4(0x13f)](_0x41edd4(0x15f)))return'MISSING_STAGES';if(_0xd8036b[_0x41edd4(0x13f)](_0x41edd4(0x157)))return'ACTIVATION_SCHEMA_ERROR';return _0x41edd4(0x122);}function runJourneySemanticChecks(_0x3d8540,_0x56d28a){const _0x12656b=a134_0x3b9a,_0xeb663d=[],_0x2f0569=[];(!_0x3d8540['name']||_0x3d8540[_0x12656b(0x105)][_0x12656b(0x190)]()==='')&&_0xeb663d[_0x12656b(0x173)]({'level':_0x12656b(0x191),'path':_0x12656b(0x105),'code':_0x12656b(0x19e),'message':_0x12656b(0x10c),'location':getLocationFromPath(_0x56d28a[_0x12656b(0x16a)],_0x56d28a[_0x12656b(0x187)],[_0x12656b(0x105)])});const _0x1f2bed=new Set();if(_0x3d8540[_0x12656b(0x13b)])for(const _0x3bb626 of Object[_0x12656b(0x14d)](_0x3d8540[_0x12656b(0x13b)])){_0x1f2bed['add'](_0x3bb626);}const _0x4e1328=new Set();if(_0x3d8540['activations'])for(const _0x5602a1 of Object[_0x12656b(0x14d)](_0x3d8540[_0x12656b(0x120)])){_0x4e1328[_0x12656b(0x145)](_0x5602a1);}const _0x1d1136=new Set(),_0xa5e1b4={..._0x56d28a,'embeddedSegments':_0x1f2bed,'referencedSegments':_0x1d1136,'activationKeys':_0x4e1328['size']>0x0?_0x4e1328:undefined};if(_0x3d8540['segments'])for(const [_0x4b6a2e,_0x2b71ec]of Object[_0x12656b(0x17c)](_0x3d8540[_0x12656b(0x13b)])){const _0x103c88=validateEmbeddedSegment(_0x2b71ec,_0x12656b(0x177)+_0x4b6a2e,_0xa5e1b4);for(const _0x29511a of _0x103c88){if(_0x29511a[_0x12656b(0x19d)]===_0x12656b(0x191))_0xeb663d[_0x12656b(0x173)](_0x29511a);else _0x2f0569[_0x12656b(0x173)](_0x29511a);}}const _0x43e0ce=!!_0x3d8540[_0x12656b(0x1b9)],_0x38d9e7=_0x3d8540[_0x12656b(0x1ae)]?.[_0x12656b(0x119)](_0x6ee4b9=>!!_0x6ee4b9['goal'])??![];!_0x43e0ce&&!_0x38d9e7&&_0x2f0569[_0x12656b(0x173)]({'level':_0x12656b(0x188),'path':_0x12656b(0x1b9),'code':'MISSING_GOAL','message':_0x12656b(0x1b7),'location':getLocationFromPath(_0x56d28a[_0x12656b(0x16a)],_0x56d28a[_0x12656b(0x187)],['goal'])});const _0xaf9994=_0x3d8540['journeys']??_0x3d8540['versions'];if(_0xaf9994&&_0xaf9994['filter'](_0x50ef97=>_0x50ef97['latest']===!![])[_0x12656b(0x159)]>0x1){const _0x1015ef=_0x3d8540['journeys']?_0x12656b(0x1ae):_0x12656b(0x1b0);_0xeb663d[_0x12656b(0x173)]({'level':_0x12656b(0x191),'path':_0x1015ef,'code':_0x12656b(0x18e),'message':_0x12656b(0x115)+(_0x1015ef==='journeys'?_0x12656b(0x156):'version')+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x56d28a[_0x12656b(0x16a)],_0x56d28a['source'],[_0x1015ef])});}if(_0x3d8540[_0x12656b(0x1ae)]&&_0x3d8540[_0x12656b(0x1ae)]['length']>0x0)for(let _0x416b89=0x0;_0x416b89<_0x3d8540[_0x12656b(0x1ae)][_0x12656b(0x159)];_0x416b89++){const _0x36582a=_0x3d8540[_0x12656b(0x1ae)][_0x416b89];if(_0x3d8540['journeys'][_0x12656b(0x159)]>0x1&&_0x36582a[_0x12656b(0x185)]===_0x12656b(0x143))continue;const _0xfe5b41=_0x36582a[_0x12656b(0x170)]||[],_0x1fcd61=_0x12656b(0x19f)+_0x416b89+'].',_0x32ac68=!!_0x36582a['goal'],_0x59085c=_0x32ac68?{..._0x3d8540,'goal':_0x36582a['goal']}:_0x3d8540;validateStagesForVersion(_0xfe5b41,_0x59085c,_0xa5e1b4,_0x1fcd61,_0xeb663d,_0x2f0569,{'goalIsInherited':!_0x32ac68});}else{if(_0x3d8540[_0x12656b(0x1b0)]&&_0x3d8540[_0x12656b(0x1b0)][_0x12656b(0x159)]>0x0)for(let _0xf46ecc=0x0;_0xf46ecc<_0x3d8540[_0x12656b(0x1b0)]['length'];_0xf46ecc++){const _0xdc7dfa=_0x3d8540['versions'][_0xf46ecc];if(_0x3d8540['versions'][_0x12656b(0x159)]>0x1&&_0xdc7dfa[_0x12656b(0x185)]===_0x12656b(0x143))continue;const _0x57e743=_0xdc7dfa['stages']||[],_0x3041cb=_0x12656b(0x1b8)+_0xf46ecc+'].';validateStagesForVersion(_0x57e743,_0x3d8540,_0xa5e1b4,_0x3041cb,_0xeb663d,_0x2f0569);}else{const _0x52a622=_0x3d8540['stages']||[];validateStagesForVersion(_0x52a622,_0x3d8540,_0xa5e1b4,'',_0xeb663d,_0x2f0569);}}_0x3d8540['journeys']&&_0x3d8540[_0x12656b(0x1ae)][_0x12656b(0x159)]>0x1&&(deduplicateAcrossVersions(_0xeb663d),deduplicateAcrossVersions(_0x2f0569));for(const _0x4a5480 of _0x1f2bed){!_0x1d1136[_0x12656b(0x158)](_0x4a5480)&&!_0x4a5480[_0x12656b(0x12a)]('excluded_')&&_0x2f0569['push']({'level':'warning','path':_0x12656b(0x177)+_0x4a5480,'code':_0x12656b(0x140),'message':_0x12656b(0x182)+_0x4a5480+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x56d28a[_0x12656b(0x16a)],_0x56d28a[_0x12656b(0x187)],[_0x12656b(0x13b),_0x4a5480])});}return{'valid':_0xeb663d[_0x12656b(0x159)]===0x0,'errors':_0xeb663d,'warnings':_0x2f0569};}
|
|
1
|
+
(function(_0x11c0b3,_0x1fe3be){const _0x231d34=a134_0x25f4,_0x2e9f54=_0x11c0b3();while(!![]){try{const _0x33e5dd=parseInt(_0x231d34(0x1ee))/0x1+-parseInt(_0x231d34(0x1c9))/0x2+-parseInt(_0x231d34(0x162))/0x3+-parseInt(_0x231d34(0x178))/0x4*(-parseInt(_0x231d34(0x1c1))/0x5)+-parseInt(_0x231d34(0x15e))/0x6*(parseInt(_0x231d34(0x15a))/0x7)+-parseInt(_0x231d34(0x1ad))/0x8*(-parseInt(_0x231d34(0x16d))/0x9)+parseInt(_0x231d34(0x194))/0xa;if(_0x33e5dd===_0x1fe3be)break;else _0x2e9f54['push'](_0x2e9f54['shift']());}catch(_0x4e7e03){_0x2e9f54['push'](_0x2e9f54['shift']());}}}(a134_0x2b46,0xb6a23));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5a2041,_0x20d0ec,_0x5e19e2,_0x2b17ea,_0x177167,_0x138e33){const _0x5c3f11=a134_0x25f4;return{'level':_0x5a2041,'path':_0x20d0ec,'code':_0x5e19e2,'message':_0x2b17ea,'location':getLocationFromPath(_0x177167[_0x5c3f11(0x1de)],_0x177167[_0x5c3f11(0x1da)],pathToArray(_0x138e33??_0x20d0ec))};}function validateVersionStructure(_0x26a269,_0x58083f){const _0x21dea8=a134_0x25f4,_0x1136a2=[];return _0x26a269[_0x21dea8(0x1f8)]>MAX_STAGES&&_0x1136a2[_0x21dea8(0x1b9)](createIssue('error',_0x21dea8(0x1b2),_0x21dea8(0x16f),_0x21dea8(0x1a0)+_0x26a269[_0x21dea8(0x1f8)]+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x58083f)),_0x1136a2;}function validateStageStructure(_0x4c0bd2,_0x25f40e,_0x42f3ab,_0x3322a6){const _0x38305a=a134_0x25f4,_0x2f176a=[],_0x2726f0=_0x38305a(0x1c2)+_0x25f40e+']';_0x25f40e===0x0&&!_0x4c0bd2[_0x38305a(0x1b7)]&&_0x2f176a[_0x38305a(0x1b9)](createIssue('error',_0x2726f0+_0x38305a(0x1ff),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x4c0bd2[_0x38305a(0x177)]+_0x38305a(0x1cc),_0x3322a6,_0x2726f0));const _0x564036=_0x25f40e===_0x42f3ab-0x1;!_0x564036&&!_0x4c0bd2[_0x38305a(0x211)]&&_0x2f176a[_0x38305a(0x1b9)](createIssue('error',_0x2726f0+'.milestone',_0x38305a(0x1a6),_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x3322a6,_0x2726f0));(!_0x4c0bd2[_0x38305a(0x164)]||_0x4c0bd2[_0x38305a(0x164)][_0x38305a(0x1f8)]===0x0)&&_0x2f176a[_0x38305a(0x1b9)](createIssue(_0x38305a(0x16a),_0x2726f0+_0x38305a(0x1db),'MISSING_EXIT_CRITERIA',_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+_0x38305a(0x1c0),_0x3322a6,_0x2726f0));const _0x4a015c=_0x4c0bd2[_0x38305a(0x1ab)]?.['length']??0x0;if(_0x4a015c===0x0)_0x2f176a['push'](createIssue(_0x38305a(0x1e5),_0x2726f0+'.steps',_0x38305a(0x20f),_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+'\x27\x20has\x20no\x20steps',_0x3322a6,_0x2726f0+'.steps'));else{if(_0x4a015c===0x1)_0x2f176a['push'](createIssue('warning',_0x2726f0+_0x38305a(0x190),_0x38305a(0x20f),'Stage\x20\x27'+_0x4c0bd2['name']+_0x38305a(0x1c8),_0x3322a6,_0x2726f0+_0x38305a(0x190)));else _0x4a015c<=0x3&&_0x2f176a[_0x38305a(0x1b9)](createIssue('warning',_0x2726f0+_0x38305a(0x190),_0x38305a(0x1b6),_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+_0x38305a(0x1c6)+_0x4a015c+_0x38305a(0x175),_0x3322a6,_0x2726f0+_0x38305a(0x190)));}return _0x2f176a;}function validateStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5){const _0x16f2de=a134_0x25f4,_0x1196b9=[];if(_0x1b3129['type']===_0x16f2de(0x206))return _0x1b3129['next']&&_0x1196b9[_0x16f2de(0x1b9)](createIssue(_0x16f2de(0x1e5),_0x347aaa+'.next',_0x16f2de(0x1bc),'End\x20step\x20\x27'+_0x1b3129[_0x16f2de(0x177)]+_0x16f2de(0x193),_0x5b2f6a)),_0x16f2de(0x19d)in _0x1b3129&&_0x1b3129[_0x16f2de(0x19d)]!==undefined&&_0x1196b9['push'](createIssue(_0x16f2de(0x1e5),_0x347aaa+_0x16f2de(0x1a1),_0x16f2de(0x1bc),_0x16f2de(0x181)+_0x1b3129[_0x16f2de(0x177)]+_0x16f2de(0x1a8),_0x5b2f6a)),_0x1196b9;_0x1b3129[_0x16f2de(0x1fd)]&&(_0x5b2f6a['stepNames']&&!_0x5b2f6a[_0x16f2de(0x208)][_0x16f2de(0x18f)](_0x1b3129['next'])&&_0x1196b9[_0x16f2de(0x1b9)](createIssue('error',_0x347aaa+_0x16f2de(0x184),_0x16f2de(0x1a4),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x1b3129[_0x16f2de(0x1fd)]+'\x27',_0x5b2f6a)));switch(_0x1b3129[_0x16f2de(0x165)]){case _0x16f2de(0x17e):_0x1196b9['push'](...validateWaitStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5));break;case'activation':_0x1196b9['push'](...validateActivationStep(_0x1b3129,_0x347aaa,_0x5b2f6a));break;case'decision_point':_0x1196b9['push'](...validateDecisionPointStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5));break;case _0x16f2de(0x1c7):_0x1196b9['push'](...validateAbTestStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5));break;case _0x16f2de(0x159):_0x1196b9[_0x16f2de(0x1b9)](...validateJumpStep(_0x1b3129,_0x347aaa,_0x5b2f6a));break;}return _0x1196b9;}function validateWaitStep(_0x1917fa,_0x2e475c,_0x463e1d,_0x3d9238){const _0x3710f8=a134_0x25f4,_0x1d9363=[];if(!_0x1917fa['with'])return _0x1d9363['push'](createIssue('error',_0x2e475c+_0x3710f8(0x1a1),_0x3710f8(0x15c),_0x3710f8(0x1b4),_0x463e1d,_0x2e475c)),_0x1d9363;if(_0x1917fa['with']['condition']){const _0x187277=_0x1917fa['with'][_0x3710f8(0x182)];if(_0x187277['segment']){_0x463e1d[_0x3710f8(0x188)]?.[_0x3710f8(0x198)](_0x187277[_0x3710f8(0x1f9)]);!_0x187277[_0x3710f8(0x1f9)][_0x3710f8(0x201)](_0x3710f8(0x187))&&(_0x463e1d[_0x3710f8(0x153)]&&!_0x463e1d[_0x3710f8(0x153)][_0x3710f8(0x18f)](_0x187277[_0x3710f8(0x1f9)])&&_0x1d9363[_0x3710f8(0x1b9)](createIssue(_0x3710f8(0x1e5),_0x2e475c+_0x3710f8(0x19a),'MISSING_SEGMENT_REFERENCE',_0x3710f8(0x1e9)+_0x187277['segment']+_0x3710f8(0x1e0),_0x463e1d)));_0x187277[_0x3710f8(0x1fd)]&&_0x463e1d[_0x3710f8(0x208)]&&!_0x463e1d[_0x3710f8(0x208)][_0x3710f8(0x18f)](_0x187277['next'])&&_0x1d9363[_0x3710f8(0x1b9)](createIssue('error',_0x2e475c+_0x3710f8(0x1dc),_0x3710f8(0x1a4),_0x3710f8(0x166)+_0x187277[_0x3710f8(0x1fd)]+'\x27',_0x463e1d));_0x187277['timeout']?.['next']&&_0x463e1d[_0x3710f8(0x208)]&&!_0x463e1d[_0x3710f8(0x208)]['has'](_0x187277[_0x3710f8(0x1cd)][_0x3710f8(0x1fd)])&&_0x1d9363[_0x3710f8(0x1b9)](createIssue(_0x3710f8(0x1e5),_0x2e475c+_0x3710f8(0x1af),_0x3710f8(0x1a4),_0x3710f8(0x1aa)+_0x187277[_0x3710f8(0x1cd)][_0x3710f8(0x1fd)]+'\x27',_0x463e1d));const _0x57fdab=_0x187277[_0x3710f8(0x1fd)]||_0x1917fa[_0x3710f8(0x1fd)],_0x47f861=_0x187277[_0x3710f8(0x1cd)]?.[_0x3710f8(0x1fd)]||_0x1917fa[_0x3710f8(0x1fd)];if(_0x57fdab){const _0x3bd063=_0x3d9238['get'](_0x57fdab);_0x3bd063?.[_0x3710f8(0x165)]===_0x3710f8(0x1ba)&&_0x1d9363[_0x3710f8(0x1b9)](createIssue('warning',_0x2e475c+_0x3710f8(0x1dc),'BRANCH_DIRECTLY_TO_MERGE',_0x3710f8(0x157)+_0x57fdab+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x463e1d,_0x2e475c+'.with.condition'));}if(_0x47f861){const _0x55da1a=_0x3d9238[_0x3710f8(0x167)](_0x47f861);_0x55da1a?.[_0x3710f8(0x165)]===_0x3710f8(0x1ba)&&_0x1d9363[_0x3710f8(0x1b9)](createIssue(_0x3710f8(0x16a),_0x2e475c+'.with.condition.timeout.next',_0x3710f8(0x1ea),_0x3710f8(0x1ec)+_0x47f861+_0x3710f8(0x1c4),_0x463e1d,_0x2e475c+_0x3710f8(0x203)));}}}return _0x1d9363;}function validateActivationStep(_0x2d9436,_0x5320e1,_0x3af0cc){const _0x1d7f8a=a134_0x25f4,_0xfe98ed=[];if(!_0x2d9436[_0x1d7f8a(0x19d)]?.['activation'])return _0xfe98ed[_0x1d7f8a(0x1b9)](createIssue(_0x1d7f8a(0x1e5),_0x5320e1+'.with.activation',_0x1d7f8a(0x1a3),_0x1d7f8a(0x18c),_0x3af0cc,_0x5320e1)),_0xfe98ed;const _0x473f8d=_0x2d9436['with'][_0x1d7f8a(0x1e2)];return _0x3af0cc[_0x1d7f8a(0x197)]&&!_0x473f8d[_0x1d7f8a(0x201)](_0x1d7f8a(0x187))&&(!_0x3af0cc['activationKeys'][_0x1d7f8a(0x18f)](_0x473f8d)&&_0xfe98ed[_0x1d7f8a(0x1b9)](createIssue(_0x1d7f8a(0x1e5),_0x5320e1+_0x1d7f8a(0x20b),_0x1d7f8a(0x1bd),_0x1d7f8a(0x1d2)+_0x473f8d+_0x1d7f8a(0x1e7),_0x3af0cc))),_0xfe98ed;}function validateDecisionPointStep(_0x9279a0,_0x22d400,_0x46cd50,_0x1d3adb){const _0x306038=a134_0x25f4,_0x418c1c=[];if(!_0x9279a0[_0x306038(0x19d)]?.[_0x306038(0x156)]||_0x9279a0[_0x306038(0x19d)][_0x306038(0x156)][_0x306038(0x1f8)]===0x0)return _0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x1e5),_0x22d400+'.with.branches',_0x306038(0x1f0),_0x306038(0x204),_0x46cd50,_0x22d400)),_0x418c1c;for(let _0x3eeb68=0x0;_0x3eeb68<_0x9279a0[_0x306038(0x19d)][_0x306038(0x156)][_0x306038(0x1f8)];_0x3eeb68++){const _0x2990fc=_0x9279a0[_0x306038(0x19d)][_0x306038(0x156)][_0x3eeb68],_0xbcb96a=_0x22d400+_0x306038(0x19f)+_0x3eeb68+']';_0x2990fc[_0x306038(0x1f9)]&&!_0x2990fc[_0x306038(0x1f7)]&&(_0x46cd50[_0x306038(0x188)]?.[_0x306038(0x198)](_0x2990fc[_0x306038(0x1f9)]),!_0x2990fc[_0x306038(0x1f9)][_0x306038(0x201)]('ref:')&&(_0x46cd50[_0x306038(0x153)]&&!_0x46cd50[_0x306038(0x153)][_0x306038(0x18f)](_0x2990fc[_0x306038(0x1f9)])&&_0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x1e5),_0xbcb96a+_0x306038(0x18b),_0x306038(0x1d5),_0x306038(0x16b)+_0x2990fc[_0x306038(0x1f9)]+'\x27',_0x46cd50))));_0x2990fc[_0x306038(0x1fd)]&&_0x46cd50['stepNames']&&!_0x46cd50['stepNames'][_0x306038(0x18f)](_0x2990fc[_0x306038(0x1fd)])&&_0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x1e5),_0xbcb96a+'.next','INVALID_NEXT_REFERENCE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x2990fc['next']+'\x27',_0x46cd50));if(_0x2990fc[_0x306038(0x1fd)]){const _0x5a1124=_0x1d3adb[_0x306038(0x167)](_0x2990fc[_0x306038(0x1fd)]);_0x5a1124?.[_0x306038(0x165)]===_0x306038(0x1ba)&&_0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x16a),_0xbcb96a+_0x306038(0x184),'BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20\x27'+_0x2990fc[_0x306038(0x177)]+_0x306038(0x1d0)+_0x2990fc['next']+_0x306038(0x20a),_0x46cd50));}}return _0x418c1c;}function validateAbTestStep(_0x14e4c3,_0x4f90fe,_0x50c968,_0x114b9c){const _0x3d380a=a134_0x25f4,_0x27fe87=[];if(!_0x14e4c3[_0x3d380a(0x19d)]?.[_0x3d380a(0x1e4)]||_0x14e4c3[_0x3d380a(0x19d)][_0x3d380a(0x1e4)][_0x3d380a(0x1f8)]===0x0)return _0x27fe87[_0x3d380a(0x1b9)](createIssue(_0x3d380a(0x1e5),_0x4f90fe+'.with.variants',_0x3d380a(0x1f0),_0x3d380a(0x200),_0x50c968,_0x4f90fe)),_0x27fe87;const _0x222eac=_0x14e4c3[_0x3d380a(0x19d)][_0x3d380a(0x1e4)]['reduce']((_0x34ce5a,_0x1a879d)=>_0x34ce5a+(_0x1a879d[_0x3d380a(0x1c3)]||0x0),0x0);Math[_0x3d380a(0x1a7)](_0x222eac-0x64)>0.01&&_0x27fe87['push'](createIssue(_0x3d380a(0x1e5),_0x4f90fe+_0x3d380a(0x1fc),_0x3d380a(0x1f3),_0x3d380a(0x168)+_0x222eac+'%)',_0x50c968));for(let _0x167177=0x0;_0x167177<_0x14e4c3[_0x3d380a(0x19d)]['variants'][_0x3d380a(0x1f8)];_0x167177++){const _0x213a9d=_0x14e4c3['with'][_0x3d380a(0x1e4)][_0x167177],_0xb12c75=_0x4f90fe+_0x3d380a(0x19e)+_0x167177+']';_0x213a9d['next']&&_0x50c968[_0x3d380a(0x208)]&&!_0x50c968[_0x3d380a(0x208)]['has'](_0x213a9d[_0x3d380a(0x1fd)])&&_0x27fe87[_0x3d380a(0x1b9)](createIssue(_0x3d380a(0x1e5),_0xb12c75+_0x3d380a(0x184),_0x3d380a(0x1a4),_0x3d380a(0x196)+_0x213a9d[_0x3d380a(0x1fd)]+'\x27',_0x50c968));if(_0x213a9d['next']){const _0x284430=_0x114b9c[_0x3d380a(0x167)](_0x213a9d['next']);_0x284430?.[_0x3d380a(0x165)]===_0x3d380a(0x1ba)&&_0x27fe87[_0x3d380a(0x1b9)](createIssue(_0x3d380a(0x16a),_0xb12c75+_0x3d380a(0x184),_0x3d380a(0x1ea),_0x3d380a(0x174)+_0x213a9d[_0x3d380a(0x177)]+_0x3d380a(0x1d0)+_0x213a9d[_0x3d380a(0x1fd)]+_0x3d380a(0x20a),_0x50c968));}}return _0x27fe87;}function validateJumpStep(_0x230980,_0x283b15,_0x2a6013){const _0x1d722d=a134_0x25f4,_0x4740f7=[];if(!_0x230980[_0x1d722d(0x19d)]?.['target'])return _0x4740f7[_0x1d722d(0x1b9)](createIssue(_0x1d722d(0x1e5),_0x283b15+_0x1d722d(0x170),_0x1d722d(0x15f),'Jump\x20step\x20requires\x20a\x20target',_0x2a6013,_0x283b15)),_0x4740f7;return(!_0x230980[_0x1d722d(0x19d)][_0x1d722d(0x202)][_0x1d722d(0x1d4)]||!_0x230980['with'][_0x1d722d(0x202)][_0x1d722d(0x163)])&&_0x4740f7[_0x1d722d(0x1b9)](createIssue(_0x1d722d(0x1e5),_0x283b15+_0x1d722d(0x170),_0x1d722d(0x15f),_0x1d722d(0x1b5),_0x2a6013)),_0x4740f7;}function buildConvergenceMap(_0x32d2eb){const _0x30ba29=a134_0x25f4,_0x32c565=new Map();function _0x3bd1f0(_0x264f61,_0x1c41d9){const _0x1d8fb1=a134_0x25f4,_0x32fabc=_0x32c565[_0x1d8fb1(0x167)](_0x264f61)||[];_0x32fabc[_0x1d8fb1(0x1b9)](_0x1c41d9),_0x32c565[_0x1d8fb1(0x1a9)](_0x264f61,_0x32fabc);}for(const _0x23d896 of _0x32d2eb){_0x23d896[_0x30ba29(0x1fd)]&&_0x3bd1f0(_0x23d896['next'],{'stepName':_0x23d896[_0x30ba29(0x177)],'description':_0x30ba29(0x1bf)+_0x23d896[_0x30ba29(0x177)]+'\x27'});if(_0x23d896['type']===_0x30ba29(0x17a)&&_0x23d896[_0x30ba29(0x19d)]?.[_0x30ba29(0x156)])for(const _0x34d3cb of _0x23d896['with'][_0x30ba29(0x156)]){_0x34d3cb[_0x30ba29(0x1fd)]&&_0x3bd1f0(_0x34d3cb[_0x30ba29(0x1fd)],{'stepName':_0x23d896['name'],'description':_0x30ba29(0x1f5)+_0x34d3cb[_0x30ba29(0x177)]+_0x30ba29(0x19c)+_0x23d896[_0x30ba29(0x177)]+'\x27'});}if(_0x23d896[_0x30ba29(0x165)]===_0x30ba29(0x1c7)&&_0x23d896[_0x30ba29(0x19d)]?.[_0x30ba29(0x1e4)])for(const _0x27eab3 of _0x23d896[_0x30ba29(0x19d)][_0x30ba29(0x1e4)]){_0x27eab3['next']&&_0x3bd1f0(_0x27eab3['next'],{'stepName':_0x23d896['name'],'description':_0x30ba29(0x1a2)+_0x27eab3[_0x30ba29(0x177)]+_0x30ba29(0x19c)+_0x23d896['name']+'\x27'});}_0x23d896[_0x30ba29(0x165)]==='wait'&&_0x23d896[_0x30ba29(0x19d)]?.[_0x30ba29(0x182)]&&(_0x23d896['with'][_0x30ba29(0x182)]['next']&&_0x3bd1f0(_0x23d896[_0x30ba29(0x19d)]['condition']['next'],{'stepName':_0x23d896[_0x30ba29(0x177)],'description':_0x30ba29(0x1fe)+_0x23d896[_0x30ba29(0x177)]+'\x27'}),_0x23d896['with'][_0x30ba29(0x182)][_0x30ba29(0x1cd)]?.[_0x30ba29(0x1fd)]&&_0x3bd1f0(_0x23d896['with']['condition']['timeout'][_0x30ba29(0x1fd)],{'stepName':_0x23d896['name'],'description':'timeout\x20of\x20\x27'+_0x23d896[_0x30ba29(0x177)]+'\x27'}));}return _0x32c565;}function validateFlowControl(_0x197533,_0x1926a3,_0x13728c){const _0x4ad5f6=a134_0x25f4,_0x9fafb=[],_0x271079=_0x4ad5f6(0x1c2)+_0x1926a3+']',_0x492a4d=_0x197533[_0x4ad5f6(0x1ab)]||[];if(_0x492a4d[_0x4ad5f6(0x1f8)]===0x0)return _0x9fafb;const _0x48f8f6=new Map();for(const _0x553d70 of _0x492a4d){_0x553d70[_0x4ad5f6(0x177)]&&_0x48f8f6[_0x4ad5f6(0x1a9)](_0x553d70[_0x4ad5f6(0x177)],_0x553d70);}const _0x23cd2b=buildConvergenceMap(_0x492a4d),_0x137f2f=_0x492a4d[_0x4ad5f6(0x173)](_0x4f6a18=>_0x4f6a18['type']===_0x4ad5f6(0x206));!_0x137f2f&&_0x9fafb[_0x4ad5f6(0x1b9)](createIssue(_0x4ad5f6(0x1e5),_0x271079+_0x4ad5f6(0x190),_0x4ad5f6(0x179),_0x4ad5f6(0x16c)+_0x197533[_0x4ad5f6(0x177)]+_0x4ad5f6(0x17b),_0x13728c));for(const [_0x5a909d,_0x64dd88]of _0x23cd2b){const _0x335b8a=_0x48f8f6['get'](_0x5a909d);if(!_0x335b8a)continue;if(_0x64dd88['length']>0x1&&_0x335b8a[_0x4ad5f6(0x165)]!==_0x4ad5f6(0x1ba)){const _0x74178b=_0x64dd88[_0x4ad5f6(0x1a5)](_0x321719=>_0x321719['description'])['join'](',\x20');_0x9fafb[_0x4ad5f6(0x1b9)](createIssue(_0x4ad5f6(0x1e5),_0x271079+_0x4ad5f6(0x190),_0x4ad5f6(0x20c),_0x4ad5f6(0x192)+_0x5a909d+_0x4ad5f6(0x18d)+_0x74178b+_0x4ad5f6(0x1f1),_0x13728c));}_0x64dd88[_0x4ad5f6(0x1f8)]===0x1&&_0x335b8a[_0x4ad5f6(0x165)]===_0x4ad5f6(0x1ba)&&_0x9fafb[_0x4ad5f6(0x1b9)](createIssue('warning',_0x271079+'.steps','SINGLE_INPUT_MERGE',_0x4ad5f6(0x1ca)+_0x5a909d+_0x4ad5f6(0x1e1)+_0x64dd88[0x0][_0x4ad5f6(0x172)]+_0x4ad5f6(0x158),_0x13728c));}for(const _0x240804 of _0x492a4d){if(_0x240804[_0x4ad5f6(0x165)]==='merge'&&_0x240804[_0x4ad5f6(0x1fd)]){const _0x1fe135=_0x48f8f6[_0x4ad5f6(0x167)](_0x240804[_0x4ad5f6(0x1fd)]);_0x1fe135?.[_0x4ad5f6(0x165)]==='merge'&&_0x9fafb[_0x4ad5f6(0x1b9)](createIssue(_0x4ad5f6(0x1e5),_0x271079+'.steps',_0x4ad5f6(0x1d7),_0x4ad5f6(0x1ca)+_0x240804[_0x4ad5f6(0x177)]+_0x4ad5f6(0x1d3)+_0x240804[_0x4ad5f6(0x1fd)]+_0x4ad5f6(0x1f4),_0x13728c));}}return _0x9fafb;}function validateCriteria(_0x3ffed0,_0xd363a8,_0x99dee4){const _0x5b909e=a134_0x25f4,_0x5baed1=[];return _0x3ffed0[_0x5b909e(0x1f9)]&&(_0x99dee4[_0x5b909e(0x188)]?.[_0x5b909e(0x198)](_0x3ffed0['segment']),!_0x3ffed0[_0x5b909e(0x1f9)][_0x5b909e(0x201)](_0x5b909e(0x187))&&(_0x99dee4[_0x5b909e(0x153)]&&!_0x99dee4[_0x5b909e(0x153)][_0x5b909e(0x18f)](_0x3ffed0[_0x5b909e(0x1f9)])&&_0x5baed1[_0x5b909e(0x1b9)](createIssue(_0x5b909e(0x1e5),_0xd363a8+_0x5b909e(0x18b),'MISSING_SEGMENT_REFERENCE',_0x5b909e(0x176)+_0x3ffed0[_0x5b909e(0x1f9)]+'\x27',_0x99dee4)))),_0x5baed1;}function validateEmbeddedSegment(_0x1c2cad,_0x3ef688,_0x33b942){const _0xd07865=a134_0x25f4,_0x48d103=[];return _0x1c2cad[_0xd07865(0x17f)]&&_0x48d103[_0xd07865(0x1b9)](...validateRuleDef(_0x1c2cad[_0xd07865(0x17f)],_0x3ef688+_0xd07865(0x16e),_0x33b942)),_0x48d103;}function validateStage(_0x526d5b,_0x151709,_0x210d4a,_0x1befe4){const _0x3d5b59=a134_0x25f4,_0x1cd1da=[],_0x3c6fa2='stages['+_0x151709+']',_0x2a07f5=new Map(),_0x286645=new Map();if(_0x526d5b[_0x3d5b59(0x1ab)]){for(let _0x422e3b=0x0;_0x422e3b<_0x526d5b[_0x3d5b59(0x1ab)][_0x3d5b59(0x1f8)];_0x422e3b++){const _0x6c0364=_0x526d5b[_0x3d5b59(0x1ab)][_0x422e3b];_0x6c0364[_0x3d5b59(0x177)]&&_0x2a07f5[_0x3d5b59(0x1a9)](_0x6c0364[_0x3d5b59(0x177)],_0x6c0364);}for(let _0x5165e7=0x0;_0x5165e7<_0x526d5b[_0x3d5b59(0x1ab)]['length'];_0x5165e7++){const _0x53a8ed=_0x526d5b[_0x3d5b59(0x1ab)][_0x5165e7],_0x5a89c4=_0x3c6fa2+_0x3d5b59(0x171)+_0x5165e7+']';if(_0x53a8ed[_0x3d5b59(0x177)]){if(_0x286645[_0x3d5b59(0x18f)](_0x53a8ed['name'])){const _0x198001=_0x286645[_0x3d5b59(0x167)](_0x53a8ed['name']);_0x1cd1da[_0x3d5b59(0x1b9)](createIssue('error',_0x5a89c4+_0x3d5b59(0x1b1),_0x3d5b59(0x1fa),'Duplicate\x20step\x20name\x20\x27'+_0x53a8ed['name']+_0x3d5b59(0x1b8)+_0x198001+'])',_0x1befe4));}else _0x286645[_0x3d5b59(0x1a9)](_0x53a8ed[_0x3d5b59(0x177)],_0x5165e7);}_0x1cd1da[_0x3d5b59(0x1b9)](...validateStep(_0x53a8ed,_0x5a89c4,_0x1befe4,_0x2a07f5));}}_0x526d5b[_0x3d5b59(0x1b7)]&&_0x1cd1da['push'](...validateCriteria(_0x526d5b[_0x3d5b59(0x1b7)],_0x3c6fa2+_0x3d5b59(0x1ff),_0x1befe4));if(_0x526d5b[_0x3d5b59(0x164)])for(let _0x27fdfe=0x0;_0x27fdfe<_0x526d5b[_0x3d5b59(0x164)][_0x3d5b59(0x1f8)];_0x27fdfe++){_0x1cd1da[_0x3d5b59(0x1b9)](...validateCriteria(_0x526d5b[_0x3d5b59(0x164)][_0x27fdfe],_0x3c6fa2+'.exit_criteria['+_0x27fdfe+']',_0x1befe4));}return _0x526d5b['milestone']&&_0x1cd1da[_0x3d5b59(0x1b9)](...validateCriteria(_0x526d5b['milestone'],_0x3c6fa2+'.milestone',_0x1befe4)),_0x1cd1da[_0x3d5b59(0x1b9)](...validateStageStructure(_0x526d5b,_0x151709,_0x210d4a,_0x1befe4)),_0x1cd1da['push'](...validateFlowControl(_0x526d5b,_0x151709,_0x1befe4)),_0x1cd1da;}function validateStagesForVersion(_0x40dbd3,_0x23912e,_0x288056,_0x4ca941,_0x419068,_0x3aac72,_0x35b6d6){const _0x116282=a134_0x25f4;if(_0x40dbd3[_0x116282(0x1f8)]===0x0){_0x419068[_0x116282(0x1b9)]({'level':_0x116282(0x1e5),'path':_0x4ca941+_0x116282(0x1b2),'code':'MISSING_STAGES','message':_0x116282(0x154),'location':getLocationFromPath(_0x288056[_0x116282(0x1de)],_0x288056[_0x116282(0x1da)],[_0x116282(0x1b2)])});return;}const _0x43f078=new Set();for(const _0x186c9f of _0x40dbd3){if(_0x186c9f['steps'])for(const _0x10dcd4 of _0x186c9f['steps']){_0x10dcd4['name']&&_0x43f078[_0x116282(0x198)](_0x10dcd4[_0x116282(0x177)]);}}const _0x9c566={..._0x288056,'stepNames':_0x43f078},_0x1bcdb2=validateVersionStructure(_0x40dbd3,_0x9c566);for(const _0x3be6e2 of _0x1bcdb2){const _0x26a141=_0x4ca941?{..._0x3be6e2,'path':''+_0x4ca941+_0x3be6e2[_0x116282(0x1df)]}:_0x3be6e2;if(_0x26a141[_0x116282(0x1ef)]===_0x116282(0x1e5))_0x419068[_0x116282(0x1b9)](_0x26a141);else _0x3aac72['push'](_0x26a141);}for(let _0xc20502=0x0;_0xc20502<_0x40dbd3[_0x116282(0x1f8)];_0xc20502++){const _0x2681d8=validateStage(_0x40dbd3[_0xc20502],_0xc20502,_0x40dbd3['length'],_0x9c566);for(const _0x157783 of _0x2681d8){const _0x774375=_0x4ca941?{..._0x157783,'path':''+_0x4ca941+_0x157783['path']}:_0x157783;if(_0x774375[_0x116282(0x1ef)]===_0x116282(0x1e5))_0x419068['push'](_0x774375);else _0x3aac72['push'](_0x774375);}}if(_0x23912e[_0x116282(0x1fb)]){const _0x4ef96d=_0x35b6d6?.[_0x116282(0x1f2)]?_0x116282(0x1fb):_0x4ca941+_0x116282(0x1fb),_0x7cbe48=validateCriteria(_0x23912e['goal'],_0x4ef96d,_0x9c566);for(const _0x4c29c3 of _0x7cbe48){if(_0x4c29c3[_0x116282(0x1ef)]===_0x116282(0x1e5))_0x419068[_0x116282(0x1b9)](_0x4c29c3);else _0x3aac72[_0x116282(0x1b9)](_0x4c29c3);}}}function extractVersionIndex(_0x2dc5b0){const _0x569879=a134_0x25f4,_0x27ca7b=_0x2dc5b0[_0x569879(0x17d)](/^journeys\[(\d+)\]\./);return _0x27ca7b?_0x27ca7b[0x1]:undefined;}function deduplicateAcrossVersions(_0x594700){const _0x5312dd=a134_0x25f4,_0x591c72=new Map();for(let _0x4ffb81=0x0;_0x4ffb81<_0x594700['length'];_0x4ffb81++){const _0x4ceaaf=_0x594700[_0x4ffb81][_0x5312dd(0x1cb)]+':'+_0x594700[_0x4ffb81][_0x5312dd(0x191)],_0x1b82e9=extractVersionIndex(_0x594700[_0x4ffb81]['path']),_0x32299b=_0x591c72['get'](_0x4ceaaf);if(_0x32299b){_0x32299b[_0x5312dd(0x19b)][_0x5312dd(0x1b9)](_0x4ffb81);if(_0x1b82e9)_0x32299b['versions'][_0x5312dd(0x198)](_0x1b82e9);}else _0x591c72[_0x5312dd(0x1a9)](_0x4ceaaf,{'indices':[_0x4ffb81],'versions':new Set(_0x1b82e9?[_0x1b82e9]:[])});}const _0x560426=new Set();for(const {indices:_0x3a290c,versions:_0xc56836}of _0x591c72[_0x5312dd(0x1d9)]()){if(_0xc56836[_0x5312dd(0x160)]<=0x1)continue;const _0x41b6b4=_0x594700[_0x3a290c[0x0]];_0x41b6b4['path']=_0x41b6b4[_0x5312dd(0x1df)][_0x5312dd(0x18a)](/^journeys\[\d+\]\./,''),_0x41b6b4[_0x5312dd(0x191)]=_0x41b6b4['message']+_0x5312dd(0x186)+_0xc56836[_0x5312dd(0x160)]+_0x5312dd(0x169);for(let _0x3951bb=0x1;_0x3951bb<_0x3a290c[_0x5312dd(0x1f8)];_0x3951bb++){_0x560426[_0x5312dd(0x198)](_0x3a290c[_0x3951bb]);}}const _0x1ac262=[..._0x560426][_0x5312dd(0x180)]((_0x5cee2a,_0xe210ae)=>_0xe210ae-_0x5cee2a);for(const _0x489281 of _0x1ac262){_0x594700[_0x5312dd(0x1ac)](_0x489281,0x1);}}export function validateJourneyDef(_0x2c568c,_0x42f8ee={},_0x59ce4b={}){const _0x329694=a134_0x25f4;if(_0x59ce4b[_0x329694(0x20d)])return runJourneySemanticChecks(_0x2c568c,_0x42f8ee);const _0x2c3ef5=JourneyDefSchema['safeParse'](_0x2c568c);if(_0x2c3ef5[_0x329694(0x1f6)])return runJourneySemanticChecks(_0x2c3ef5[_0x329694(0x1dd)],_0x42f8ee);return zodErrorsToJourneyValidationResult(_0x2c3ef5[_0x329694(0x1e5)],_0x42f8ee);}function zodErrorsToJourneyValidationResult(_0x35b5fd,_0xb0c12e){const _0x862413=a134_0x25f4,_0x1505c8=flattenZodIssues(_0x35b5fd[_0x862413(0x1c5)]),_0x55dc6c=_0x1505c8[_0x862413(0x1a5)](_0x441e0d=>{const _0x2818ab=_0x862413,_0x4719e4=formatZodPath(_0x441e0d[_0x2818ab(0x1df)]),_0xb29417=mapJourneyZodIssueToCode(_0x441e0d,_0x4719e4),_0x57516c=getLocationFromPath(_0xb0c12e['document'],_0xb0c12e[_0x2818ab(0x1da)],_0x441e0d[_0x2818ab(0x1df)]['map'](_0x2ee726=>typeof _0x2ee726===_0x2818ab(0x18e)?String(_0x2ee726):_0x2ee726));return{'level':_0x2818ab(0x1e5),'path':_0x4719e4,'code':_0xb29417,'message':_0x441e0d['message'],..._0x57516c&&{'location':_0x57516c}};});return{'valid':![],'errors':_0x55dc6c,'warnings':[]};}function mapJourneyZodIssueToCode(_0x121616,_0x534fb7){const _0x87d3e3=a134_0x25f4;if(_0x534fb7==='name')return _0x87d3e3(0x183);if(_0x534fb7[_0x87d3e3(0x1b3)](_0x87d3e3(0x1bb))&&_0x534fb7['includes'](_0x87d3e3(0x1ab)))return'JOURNEY_SCHEMA_ERROR';if(_0x534fb7===_0x87d3e3(0x1b2)||_0x534fb7[_0x87d3e3(0x1b3)](_0x87d3e3(0x199)))return'MISSING_STAGES';if(_0x534fb7===''&&_0x121616[_0x87d3e3(0x191)][_0x87d3e3(0x1eb)](_0x87d3e3(0x1d6)))return _0x87d3e3(0x195);if(_0x534fb7[_0x87d3e3(0x1eb)](_0x87d3e3(0x1e2)))return'ACTIVATION_SCHEMA_ERROR';return'JOURNEY_SCHEMA_ERROR';}function a134_0x25f4(_0x404221,_0x536c78){_0x404221=_0x404221-0x153;const _0x2b46f=a134_0x2b46();let _0x25f42e=_0x2b46f[_0x404221];return _0x25f42e;}function a134_0x2b46(){const _0x4bc0d8=['issues','\x27\x20has\x20only\x20','ab_test','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','1159290DzMBhz','Merge\x20step\x20\x27','code','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','timeout','keys','journeys','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','versions','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','journey','MISSING_SEGMENT_REFERENCE','journeys,\x20stages,\x20or\x20versions','MERGE_TO_MERGE_CHAIN','every','values','source','.exit_criteria','.with.condition.next','data','document','path','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','activation','DUPLICATE_LATEST','variants','error','filter','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','segments','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','BRANCH_DIRECTLY_TO_MERGE','includes','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Journey\x20can\x20have\x20at\x20most\x20one\x20','625161eBqJBH','level','MISSING_CONDITIONS',').\x20Use\x20a\x20merge\x20step.','goalIsInherited','INVALID_AB_TEST_PERCENTAGES','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','branch\x20\x27','success','excluded','length','segment','DUPLICATE_STEP_NAME','goal','.with.variants','next','condition\x20of\x20\x27','.entry_criteria','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','startsWith','target','.with.condition.timeout','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','state','end','Embedded\x20segment\x20\x27','stepNames','Journey\x20name\x20is\x20required','\x27\x20with\x20no\x20action\x20in\x20between','.with.activation','CONVERGENCE_WITHOUT_MERGE','skipSchema','journeys[','INSUFFICIENT_STEPS','trim','milestone','segments.','embeddedSegments','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','latest','branches','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27',').\x20Merge\x20is\x20unnecessary.','jump','10885JEFefC','version','MISSING_WAIT_PARAMS','journey\x20entry','3588yPeFGr','INVALID_JUMP_TARGET','size','launched','2379183oLtBLa','stage','exit_criteria','type','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','get','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x20versions)','warning','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Stage\x20\x27','116784nnaGNS','.rule','TOO_MANY_STAGES','.with.target','.steps[','description','some','A/B\x20test\x20variant\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','Criteria\x20references\x20undefined\x20segment\x20\x27','name','150704FGWjli','MISSING_END_STEP','decision_point','\x27\x20has\x20no\x20end\x20step','entries','match','wait','rule','sort','End\x20step\x20\x27','condition','MISSING_NAME','.next','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','\x20(across\x20','ref:','referencedSegments','excluded_','replace','.segment','Activation\x20step\x20requires\x20an\x20activation\x20reference','\x27\x20(from:\x20','symbol','has','.steps','message','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','11768460gQHsED','MISSING_STAGES','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','activationKeys','add','.stages','.with.condition.segment','indices','\x27\x20of\x20\x27','with','.with.variants[','.with.branches[','Journey\x20has\x20','.with','variant\x20\x27','MISSING_ACTIVATION_REF','INVALID_NEXT_REFERENCE','map','MISSING_MILESTONE','abs','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','set','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','steps','splice','584iDhykc','MISSING_GOAL','.with.condition.timeout.next','activations','.name','stages','endsWith','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','FEW_STEPS','entry_criteria','\x27\x20(first\x20defined\x20at\x20steps[','push','merge','.type','END_STEP_HAS_NEXT_OR_WITH','MISSING_ACTIVATION_DEFINITION','Journey\x20has\x20no\x20goal\x20defined','step\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','40wNnmhv','stages[','percentage','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.'];a134_0x2b46=function(){return _0x4bc0d8;};return a134_0x2b46();}function runJourneySemanticChecks(_0xe0a5de,_0x5823ab){const _0x211c1c=a134_0x25f4,_0x5c8285=[],_0x3c369d=[];(!_0xe0a5de[_0x211c1c(0x177)]||_0xe0a5de[_0x211c1c(0x177)][_0x211c1c(0x210)]()==='')&&_0x5c8285[_0x211c1c(0x1b9)]({'level':'error','path':_0x211c1c(0x177),'code':_0x211c1c(0x183),'message':_0x211c1c(0x209),'location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],[_0x211c1c(0x177)])});const _0x4db39c=new Set();if(_0xe0a5de[_0x211c1c(0x1e8)])for(const _0x1cb7a0 of Object[_0x211c1c(0x1ce)](_0xe0a5de['segments'])){_0x4db39c[_0x211c1c(0x198)](_0x1cb7a0);}const _0x2cbb91=new Set();if(_0xe0a5de['activations'])for(const _0x327983 of Object[_0x211c1c(0x1ce)](_0xe0a5de[_0x211c1c(0x1b0)])){_0x2cbb91[_0x211c1c(0x198)](_0x327983);}const _0x3aebae=new Set(),_0x52c9e0={..._0x5823ab,'embeddedSegments':_0x4db39c,'referencedSegments':_0x3aebae,'activationKeys':_0x2cbb91[_0x211c1c(0x160)]>0x0?_0x2cbb91:undefined};if(_0xe0a5de[_0x211c1c(0x1e8)])for(const [_0x5d9170,_0x3b77d6]of Object[_0x211c1c(0x17c)](_0xe0a5de['segments'])){const _0x34dfb2=validateEmbeddedSegment(_0x3b77d6,_0x211c1c(0x212)+_0x5d9170,_0x52c9e0);for(const _0x1ee6c5 of _0x34dfb2){if(_0x1ee6c5[_0x211c1c(0x1ef)]===_0x211c1c(0x1e5))_0x5c8285[_0x211c1c(0x1b9)](_0x1ee6c5);else _0x3c369d['push'](_0x1ee6c5);}}const _0x295e09=!!_0xe0a5de['goal'],_0x5f5b32=_0xe0a5de[_0x211c1c(0x1cf)]?.[_0x211c1c(0x1d8)](_0x3fc876=>!!_0x3fc876[_0x211c1c(0x1fb)])??![];!_0x295e09&&!_0x5f5b32&&_0x3c369d[_0x211c1c(0x1b9)]({'level':_0x211c1c(0x16a),'path':_0x211c1c(0x1fb),'code':_0x211c1c(0x1ae),'message':_0x211c1c(0x1be),'location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],['goal'])});const _0x4fa3fe=_0xe0a5de[_0x211c1c(0x1cf)]??_0xe0a5de[_0x211c1c(0x1d1)];if(_0x4fa3fe&&_0x4fa3fe[_0x211c1c(0x1e6)](_0x16157c=>_0x16157c[_0x211c1c(0x155)]===!![])[_0x211c1c(0x1f8)]>0x1){const _0x505370=_0xe0a5de[_0x211c1c(0x1cf)]?_0x211c1c(0x1cf):'versions';_0x5c8285['push']({'level':_0x211c1c(0x1e5),'path':_0x505370,'code':_0x211c1c(0x1e3),'message':_0x211c1c(0x1ed)+(_0x505370===_0x211c1c(0x1cf)?_0x211c1c(0x15d):_0x211c1c(0x15b))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],[_0x505370])});}if(_0xe0a5de['journeys']&&_0xe0a5de['journeys'][_0x211c1c(0x1f8)]>0x0)for(let _0x68c4b0=0x0;_0x68c4b0<_0xe0a5de[_0x211c1c(0x1cf)]['length'];_0x68c4b0++){const _0x457465=_0xe0a5de[_0x211c1c(0x1cf)][_0x68c4b0];if(_0xe0a5de['journeys']['length']>0x1&&_0x457465[_0x211c1c(0x205)]===_0x211c1c(0x161))continue;const _0x3f1e96=_0x457465[_0x211c1c(0x1b2)]||[],_0x2b02a7=_0x211c1c(0x20e)+_0x68c4b0+'].',_0x366856=!!_0x457465['goal'],_0x41409e=_0x366856?{..._0xe0a5de,'goal':_0x457465['goal']}:_0xe0a5de;validateStagesForVersion(_0x3f1e96,_0x41409e,_0x52c9e0,_0x2b02a7,_0x5c8285,_0x3c369d,{'goalIsInherited':!_0x366856});}else{if(_0xe0a5de['versions']&&_0xe0a5de[_0x211c1c(0x1d1)][_0x211c1c(0x1f8)]>0x0)for(let _0x271396=0x0;_0x271396<_0xe0a5de[_0x211c1c(0x1d1)][_0x211c1c(0x1f8)];_0x271396++){const _0xac21b0=_0xe0a5de[_0x211c1c(0x1d1)][_0x271396];if(_0xe0a5de[_0x211c1c(0x1d1)][_0x211c1c(0x1f8)]>0x1&&_0xac21b0['state']===_0x211c1c(0x161))continue;const _0x117680=_0xac21b0[_0x211c1c(0x1b2)]||[],_0x18ed63='versions['+_0x271396+'].';validateStagesForVersion(_0x117680,_0xe0a5de,_0x52c9e0,_0x18ed63,_0x5c8285,_0x3c369d);}else{const _0x2dab5e=_0xe0a5de[_0x211c1c(0x1b2)]||[];validateStagesForVersion(_0x2dab5e,_0xe0a5de,_0x52c9e0,'',_0x5c8285,_0x3c369d);}}_0xe0a5de['journeys']&&_0xe0a5de['journeys'][_0x211c1c(0x1f8)]>0x1&&(deduplicateAcrossVersions(_0x5c8285),deduplicateAcrossVersions(_0x3c369d));for(const _0x3f077d of _0x4db39c){!_0x3aebae[_0x211c1c(0x18f)](_0x3f077d)&&!_0x3f077d[_0x211c1c(0x201)](_0x211c1c(0x189))&&_0x3c369d[_0x211c1c(0x1b9)]({'level':_0x211c1c(0x16a),'path':_0x211c1c(0x212)+_0x3f077d,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x211c1c(0x207)+_0x3f077d+_0x211c1c(0x185),'location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],[_0x211c1c(0x1e8),_0x3f077d])});}return{'valid':_0x5c8285[_0x211c1c(0x1f8)]===0x0,'errors':_0x5c8285,'warnings':_0x3c369d};}
|