@treasuredata/tdx 2026.3.13 → 2026.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.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.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe74b9f,_0x22e58f){const _0xae6c9c=a131_0x53c3,_0x8d9bcf=_0xe74b9f();while(!![]){try{const _0x398a60=-parseInt(_0xae6c9c(0x1f2))/0x1*(-parseInt(_0xae6c9c(0x1fa))/0x2)+parseInt(_0xae6c9c(0x1e4))/0x3+-parseInt(_0xae6c9c(0x1ea))/0x4+-parseInt(_0xae6c9c(0x1ed))/0x5+-parseInt(_0xae6c9c(0x1d4))/0x6*(parseInt(_0xae6c9c(0x1f0))/0x7)+-parseInt(_0xae6c9c(0x206))/0x8+-parseInt(_0xae6c9c(0x1d2))/0x9*(-parseInt(_0xae6c9c(0x203))/0xa);if(_0x398a60===_0x22e58f)break;else _0x8d9bcf['push'](_0x8d9bcf['shift']());}catch(_0x1dd972){_0x8d9bcf['push'](_0x8d9bcf['shift']());}}}(a131_0x87ee,0x2377b));import a131_0x59ce80 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a131_0x87ee(){const _0x52f23e=['bold','some','385694vEfgUS','Unknown','get','Attributes','behavior','sort','SELECT\x20*\x20FROM\x20(\x0a','size','localeCompare','90VmIkok','default','behaviorName','1069544NCUnUk','entries','verbose','columns','Schema\x20query:\x0a','extra','push','284337MVpjmI','varchar','12LXsOWy','displayName','YES','source','slice','fields','replace','length','column_name','execute','null','dim','\x20\x20\x20\x20','filter','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','query','513009QVXlgT','tableName','trim','name','Behaviors','parentColumn','915588wJsOcv','information_schema','parentTableName','68000JczffA','startsWith','matrixTableName','443527dDyRrE','set','1VCvocV','map','type','error','matrixColumnName','key'];a131_0x87ee=function(){return _0x52f23e;};return a131_0x87ee();}export function buildSchemaResult(_0x796747){const _0x418bc7=a131_0x53c3,_0x583ef4=_0x796747[_0x418bc7(0x1ce)][_0x418bc7(0x1f3)](_0x57c711=>({'column_name':_0x57c711['name'],'column_type':_0x57c711['type'],'null':_0x418bc7(0x1d6),'key':null,'default':null,'extra':null}));return{..._0x796747,'columns':[{'name':_0x418bc7(0x1dc),'type':'varchar'},{'name':'column_type','type':_0x418bc7(0x1d3)},{'name':_0x418bc7(0x1de),'type':_0x418bc7(0x1d3)},{'name':_0x418bc7(0x1f7),'type':_0x418bc7(0x1d3)},{'name':_0x418bc7(0x204),'type':_0x418bc7(0x1d3)},{'name':_0x418bc7(0x1d0),'type':_0x418bc7(0x1d3)}],'data':_0x583ef4};}export async function executeSchemaQuery(_0x596a08,_0x9cd420,_0x9c135d){const _0x145f23=a131_0x53c3,_0x88c4d5=_0x596a08[_0x145f23(0x1e6)]()[_0x145f23(0x1da)](/;+$/,''),_0x31540c=_0x145f23(0x200)+_0x88c4d5+_0x145f23(0x1e2);_0x9c135d[_0x145f23(0x1cd)]&&console[_0x145f23(0x1f5)](_0x145f23(0x1cf)+_0x31540c);const _0x1382e6=await withProgressSpinner('Fetching\x20schema...',async _0x314b72=>{const _0x43600b=_0x145f23,_0x9d3a39=await _0x9cd420[_0x43600b(0x1e3)][_0x43600b(0x1dd)](_0x31540c,{'catalog':'td','schema':_0x43600b(0x1eb),'onJobId':_0x4b7a0f=>{_0x314b72['setJobId'](_0x4b7a0f);}});return _0x9d3a39;},{'verbose':_0x9c135d[_0x145f23(0x1cd)]});return buildSchemaResult(_0x1382e6['data']);}function a131_0x53c3(_0x23fc04,_0x4786b6){_0x23fc04=_0x23fc04-0x1cd;const _0x87eeb0=a131_0x87ee();let _0x53c32f=_0x87eeb0[_0x23fc04];return _0x53c32f;}function columnName(_0x13db67){const _0x5844db=a131_0x53c3;return _0x13db67[_0x5844db(0x1f6)]||_0x13db67[_0x5844db(0x1e9)]||_0x13db67[_0x5844db(0x1e7)];}function formatFieldLine(_0x10ec80,_0x15fc0c,_0xc25353){const _0x200560=a131_0x53c3,_0x2bdf72=_0x10ec80!==_0x15fc0c?'\x20'+a131_0x59ce80[_0x200560(0x1df)]('('+_0x15fc0c+')'):'';return _0x200560(0x1e0)+_0x10ec80+_0x2bdf72+':\x20'+a131_0x59ce80['cyan'](_0xc25353);}function sortByColumnName(_0x16adcc){const _0x420c22=a131_0x53c3;return[..._0x16adcc]['sort']((_0x4136d5,_0x572e06)=>columnName(_0x4136d5)[_0x420c22(0x202)](columnName(_0x572e06)));}export function displayFieldsHumanReadable(_0x33ff9c,_0x1f4e7b){const _0x552d9a=a131_0x53c3,_0x58b881=_0x33ff9c[_0x552d9a(0x1e1)](_0x34b04f=>_0x34b04f[_0x552d9a(0x1d7)]==='attribute'),_0x557de2=_0x33ff9c[_0x552d9a(0x1e1)](_0x33dc86=>_0x33dc86[_0x552d9a(0x1d7)]===_0x552d9a(0x1fe)),_0x17fb95=new Map();for(const _0x155c45 of _0x58b881){const _0x374391=_0x155c45['groupingName']||_0x155c45[_0x552d9a(0x1ec)]||'Unknown',_0x1f35a0=_0x17fb95[_0x552d9a(0x1fc)](_0x374391);_0x1f35a0?_0x1f35a0[_0x552d9a(0x1d9)][_0x552d9a(0x1d1)](_0x155c45):_0x17fb95[_0x552d9a(0x1f1)](_0x374391,{'displayName':_0x374391,'tableName':_0x155c45[_0x552d9a(0x1ec)],'fields':[_0x155c45]});}const _0x8c2cdc=new Map();for(const _0x2c88cf of _0x557de2){const _0x59979c=_0x2c88cf[_0x552d9a(0x205)]||_0x552d9a(0x1fb),_0x4a2672=_0x8c2cdc[_0x552d9a(0x1fc)](_0x59979c)||[];_0x4a2672[_0x552d9a(0x1d1)](_0x2c88cf),_0x8c2cdc['set'](_0x59979c,_0x4a2672);}console[_0x552d9a(0x1f5)]('\x0a'+a131_0x59ce80[_0x552d9a(0x1f8)](_0x1f4e7b));if(_0x17fb95[_0x552d9a(0x201)]>0x0){console[_0x552d9a(0x1f5)]('\x0a'+a131_0x59ce80[_0x552d9a(0x1df)](_0x552d9a(0x1fd)));const _0x23b81b=[..._0x17fb95['entries']()]['sort']((_0x330706,_0x123090)=>_0x330706[0x0][_0x552d9a(0x202)](_0x123090[0x0]));for(const [,_0x15939f]of _0x23b81b){const _0x44df6c=_0x15939f['tableName']&&_0x15939f[_0x552d9a(0x1e5)]!==_0x15939f[_0x552d9a(0x1d5)]?'\x20'+a131_0x59ce80[_0x552d9a(0x1df)]('('+_0x15939f[_0x552d9a(0x1e5)]+')'):'';console[_0x552d9a(0x1f5)]('\x20\x20'+a131_0x59ce80[_0x552d9a(0x1f8)](_0x15939f[_0x552d9a(0x1d5)])+_0x44df6c);for(const _0x5d326d of sortByColumnName(_0x15939f[_0x552d9a(0x1d9)])){console[_0x552d9a(0x1f5)](formatFieldLine(columnName(_0x5d326d),_0x5d326d[_0x552d9a(0x1e7)],_0x5d326d[_0x552d9a(0x1f4)]));}}}if(_0x8c2cdc[_0x552d9a(0x201)]>0x0){console[_0x552d9a(0x1f5)]('\x0a'+a131_0x59ce80['dim'](_0x552d9a(0x1e8)));const _0x1b308b=[..._0x8c2cdc[_0x552d9a(0x207)]()][_0x552d9a(0x1ff)]((_0x115af3,_0x592837)=>_0x115af3[0x0]['localeCompare'](_0x592837[0x0]));for(const [_0x3d7e30,_0xcf3992]of _0x1b308b){const _0x17a9bc=_0xcf3992[0x0],_0x555dba=_0x17a9bc?.[_0x552d9a(0x1ef)];if(_0x555dba){const _0x51ae7b=_0x555dba!==_0x3d7e30?'\x20'+a131_0x59ce80[_0x552d9a(0x1df)]('('+_0x3d7e30+')'):'';console['error']('\x20\x20'+a131_0x59ce80[_0x552d9a(0x1f8)](_0x555dba)+_0x51ae7b);}else{const _0x528ef8=_0x17a9bc?.[_0x552d9a(0x1ec)]||'';console['error']('\x20\x20'+a131_0x59ce80['bold'](_0x3d7e30)+(_0x528ef8?'\x20'+a131_0x59ce80['dim']('('+_0x528ef8+')'):''));}for(const _0x126453 of sortByColumnName(_0xcf3992)){const _0x29f1ad=_0x126453[_0x552d9a(0x1e7)][_0x552d9a(0x1ee)](_0x3d7e30+'.')?_0x126453[_0x552d9a(0x1e7)][_0x552d9a(0x1d8)](_0x3d7e30[_0x552d9a(0x1db)]+0x1):_0x126453[_0x552d9a(0x1e7)];console[_0x552d9a(0x1f5)](formatFieldLine(columnName(_0x126453),_0x29f1ad,_0x126453[_0x552d9a(0x1f4)]));}}}const _0x643987=_0x33ff9c[_0x552d9a(0x1f9)](_0x4cdcea=>_0x4cdcea[_0x552d9a(0x1f6)]||_0x4cdcea[_0x552d9a(0x1ef)]);_0x643987&&(console[_0x552d9a(0x1f5)]('\x0a'+a131_0x59ce80[_0x552d9a(0x1df)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console[_0x552d9a(0x1f5)](a131_0x59ce80[_0x552d9a(0x1df)]('\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.'))),console[_0x552d9a(0x1f5)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a132_0xd76d(_0x85116d,_0x2b0875){_0x85116d=_0x85116d-0x117;const _0x439366=a132_0x4393();let _0xd76dd4=_0x439366[_0x85116d];return _0xd76dd4;}(function(_0x589185,_0x5a6c75){const _0x3327c4=a132_0xd76d,_0x3b69f2=_0x589185();while(!![]){try{const _0x24c8ac=-parseInt(_0x3327c4(0x126))/0x1*(parseInt(_0x3327c4(0x123))/0x2)+parseInt(_0x3327c4(0x118))/0x3*(-parseInt(_0x3327c4(0x11d))/0x4)+parseInt(_0x3327c4(0x124))/0x5+-parseInt(_0x3327c4(0x11a))/0x6*(-parseInt(_0x3327c4(0x11b))/0x7)+parseInt(_0x3327c4(0x128))/0x8+-parseInt(_0x3327c4(0x125))/0x9*(-parseInt(_0x3327c4(0x11f))/0xa)+-parseInt(_0x3327c4(0x12a))/0xb;if(_0x24c8ac===_0x5a6c75)break;else _0x3b69f2['push'](_0x3b69f2['shift']());}catch(_0x3bebd5){_0x3b69f2['push'](_0x3b69f2['shift']());}}}(a132_0x4393,0x9b189));import{readdirSync,statSync}from'fs';import a132_0x49158f from'path';function a132_0x4393(){const _0x2609da=['join','isDirectory','9eELjDj','isFile','6cTfzcM','6781117WEiCDE','.yaml','740660LJSpXk','endsWith','10aDPJSq','toLowerCase','push','relative','1362188Lwwbfe','3952570BlnmBK','1264797ZczwnW','1pqbMtp','name','6953488jPuXuY','dirname','9868122YCcfHf','extname','.yml'];a132_0x4393=function(){return _0x2609da;};return a132_0x4393();}export function findYamlFiles(_0x339f2f){const _0x2e6c9c=[];function _0xa3591(_0xcfc33c){const _0x2e1a41=a132_0xd76d,_0x3f2629=readdirSync(_0xcfc33c,{'withFileTypes':!![]});for(const _0x211878 of _0x3f2629){const _0x280e1a=a132_0x49158f[_0x2e1a41(0x12d)](_0xcfc33c,_0x211878[_0x2e1a41(0x127)]);if(_0x211878[_0x2e1a41(0x117)]())_0xa3591(_0x280e1a);else(_0x211878[_0x2e1a41(0x127)]['endsWith']('.yml')||_0x211878[_0x2e1a41(0x127)][_0x2e1a41(0x11e)](_0x2e1a41(0x11c)))&&_0x2e6c9c[_0x2e1a41(0x121)](_0x280e1a);}}return _0xa3591(_0x339f2f),_0x2e6c9c;}export function discoverYamlFiles(_0x7915c7){const _0x160c4c=findYamlFiles(_0x7915c7);return _0x160c4c['map'](_0x561c56=>{const _0x2b593d=a132_0xd76d,_0x4d9ad0=a132_0x49158f[_0x2b593d(0x122)](_0x7915c7,_0x561c56),_0x5298b1=a132_0x49158f[_0x2b593d(0x129)](_0x4d9ad0);return{'absolutePath':_0x561c56,'relativePath':_0x4d9ad0,'folderPath':_0x5298b1==='.'?'':_0x5298b1};});}export function isYamlFile(_0x369bfa){const _0x49aa18=a132_0xd76d;try{const _0x1d927d=statSync(_0x369bfa);if(!_0x1d927d[_0x49aa18(0x119)]())return![];const _0x49c95f=a132_0x49158f[_0x49aa18(0x12b)](_0x369bfa)[_0x49aa18(0x120)]();return _0x49c95f===_0x49aa18(0x12c)||_0x49c95f===_0x49aa18(0x11c);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5706ea,_0x307c42){const _0xa466a8=a133_0x1f55,_0x23abbf=_0x5706ea();while(!![]){try{const _0x44fd22=parseInt(_0xa466a8(0x173))/0x1*(-parseInt(_0xa466a8(0x136))/0x2)+parseInt(_0xa466a8(0x15c))/0x3*(-parseInt(_0xa466a8(0x149))/0x4)+parseInt(_0xa466a8(0x169))/0x5+-parseInt(_0xa466a8(0x132))/0x6+-parseInt(_0xa466a8(0x146))/0x7*(parseInt(_0xa466a8(0x168))/0x8)+-parseInt(_0xa466a8(0x12d))/0x9+parseInt(_0xa466a8(0x13b))/0xa;if(_0x44fd22===_0x307c42)break;else _0x23abbf['push'](_0x23abbf['shift']());}catch(_0x27c020){_0x23abbf['push'](_0x23abbf['shift']());}}}(a133_0x5b32,0x909f8));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x4a4c4f){const _0x10f951=a133_0x1f55;return _0x4a4c4f[_0x10f951(0x131)]()['replace'](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x10f951(0x15e)](/^_|_$/g,'');}export function generateJourneyLocalName(_0xb14d84){const _0x18f62d=a133_0x1f55,_0x1195ea=_0xb14d84[_0x18f62d(0x15b)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1195ea){const _0x407ad5=_0x1195ea[0x1][_0x18f62d(0x131)](),_0xb57894=_0x1195ea[0x2],_0x272615=_0xb57894[_0x18f62d(0x15e)](/-/g,'')['slice'](0x0,0x4)[_0x18f62d(0x131)]();return _0x407ad5+'_'+_0x272615;}const _0x1d5f7a=_0xb14d84[_0x18f62d(0x15b)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x1d5f7a){const _0x20494a=_0x1d5f7a[0x1],_0x3b299f=_0x1d5f7a[0x2]['toLowerCase'](),_0x3204e3=_0x20494a[_0x18f62d(0x15e)](/-/g,'')['slice'](0x0,0x4)['toLowerCase']();return _0x3b299f+'_'+_0x3204e3;}return undefined;}function stableStringify(_0x1cd6cc){const _0x2b6c35=a133_0x1f55;if(Array[_0x2b6c35(0x143)](_0x1cd6cc))return'['+_0x1cd6cc[_0x2b6c35(0x157)](_0x82e996=>stableStringify(_0x82e996))[_0x2b6c35(0x174)](',')+']';if(_0x1cd6cc&&typeof _0x1cd6cc===_0x2b6c35(0x15f)){const _0x12f93c=_0x1cd6cc,_0x298ec4=Object[_0x2b6c35(0x13e)](_0x12f93c)['sort'](),_0x2ae4c7=_0x298ec4['map'](_0x147018=>'\x22'+_0x147018+'\x22:'+stableStringify(_0x12f93c[_0x147018]));return'{'+_0x2ae4c7[_0x2b6c35(0x174)](',')+'}';}const _0x4476ec=JSON[_0x2b6c35(0x179)](_0x1cd6cc);return _0x4476ec===undefined?_0x2b6c35(0x12f):_0x4476ec;}export function consolidateActivationsByContent(_0xdd7609){const _0x5878ee=a133_0x1f55,_0x59fc86={},_0x4c3224=new Map(),_0x1c29cc=new Map();for(const _0x12bad3 of _0xdd7609){if(!_0x12bad3)continue;for(const [_0x285a09,_0x1f47c5]of Object[_0x5878ee(0x154)](_0x12bad3)){const _0x15ad2c={'name':_0x1f47c5[_0x5878ee(0x133)],'connection':_0x1f47c5['connection'],..._0x1f47c5[_0x5878ee(0x144)]!==undefined&&{'all_columns':_0x1f47c5[_0x5878ee(0x144)]},..._0x1f47c5[_0x5878ee(0x156)]!==undefined&&{'columns':_0x1f47c5[_0x5878ee(0x156)]},..._0x1f47c5[_0x5878ee(0x152)]!==undefined&&{'behavior':_0x1f47c5['behavior']},..._0x1f47c5[_0x5878ee(0x14a)]!==undefined&&{'schedule':_0x1f47c5[_0x5878ee(0x14a)]},..._0x1f47c5[_0x5878ee(0x177)]!==undefined&&{'notification':_0x1f47c5[_0x5878ee(0x177)]},..._0x1f47c5[_0x5878ee(0x166)]!==undefined&&{'connector_config':_0x1f47c5[_0x5878ee(0x166)]},..._0x1f47c5['activation_template_id']!==undefined&&{'activation_template_id':_0x1f47c5[_0x5878ee(0x16a)]}},_0x8e34ca=stableStringify(_0x15ad2c),_0x5b11f0=_0x1c29cc['get'](_0x8e34ca);_0x5b11f0?_0x4c3224['set'](_0x285a09,_0x5b11f0):(_0x59fc86[_0x285a09]=_0x1f47c5,_0x4c3224[_0x5878ee(0x16f)](_0x285a09,_0x285a09),_0x1c29cc[_0x5878ee(0x16f)](_0x8e34ca,_0x285a09));}}return{'merged':_0x59fc86,'nameMapping':_0x4c3224};}export function updateActivationReferences(_0x4dccf9,_0x520f90){const _0x519578=a133_0x1f55;if(!_0x4dccf9)return;for(const _0x3b96a0 of _0x4dccf9){if(!_0x3b96a0[_0x519578(0x16e)])continue;for(const _0xc4aa39 of _0x3b96a0[_0x519578(0x16e)]){if(_0xc4aa39['type']===_0x519578(0x14b)&&_0xc4aa39['with']?.[_0x519578(0x14b)]){const _0x1c1678=_0x520f90[_0x519578(0x135)](_0xc4aa39[_0x519578(0x172)][_0x519578(0x14b)]);_0x1c1678&&_0x1c1678!==_0xc4aa39[_0x519578(0x172)]['activation']&&(_0xc4aa39[_0x519578(0x172)][_0x519578(0x14b)]=_0x1c1678);}}}}function a133_0x5b32(){const _0x139984=['decision_point','draft','steps','set','goal','wait','with','55gtPTHm','join','bundle_name','journeyBundleName','notification','length','stringify','stages','2922660zwHBnE','endsWith','null','.yml','toLowerCase','5111694uRpkyY','name','nameMapping','get','37628roGcit','has','exclude','yaml','latest','38326060rfqmAH','milestone','attributes','keys','include','push','versions','slice','isArray','all_columns','some','332213ASXuXk','journeys','startsWith','12ZAYimG','schedule','activation','type','version_number','launched','version','condition','.yaml','behavior','segments','entries','description','columns','map','branches','conditions','journey','match','1027431vsdSXE','sort','replace','object','trim','exit_criteria','journeyStages','entry_criteria','values','segment','connector_config','rule','152laeqcw','4501905VrvbOZ','activation_template_id','index'];a133_0x5b32=function(){return _0x139984;};return a133_0x5b32();}export function consolidateSegmentsByContent(_0x4866c4,_0x310d70){const _0x33eb1a=a133_0x1f55,_0x533bdf={},_0x4ef0d6=new Map(),_0x705e20=new Map();for(const _0x45a19b of _0x4866c4){if(!_0x45a19b)continue;for(const [_0x3f729e,_0x268686]of Object[_0x33eb1a(0x154)](_0x45a19b)){if(!_0x268686[_0x33eb1a(0x167)]){_0x533bdf[_0x3f729e]=_0x268686,_0x4ef0d6['set'](_0x3f729e,_0x3f729e);continue;}const _0x189381=_0x268686[_0x33eb1a(0x155)]&&_0x268686[_0x33eb1a(0x155)][_0x33eb1a(0x160)]()?_0x268686['description']:undefined,_0x134ea2=JSON[_0x33eb1a(0x179)]({'description':_0x189381,'rule':deepSortObject(_0x268686[_0x33eb1a(0x167)])}),_0x595240=_0x705e20[_0x33eb1a(0x135)](_0x134ea2);if(_0x595240){const _0x1c6f34={..._0x268686[_0x33eb1a(0x155)]!==undefined&&{'description':_0x268686[_0x33eb1a(0x155)]},'rule':_0x268686['rule']?deepSortObject(_0x268686[_0x33eb1a(0x167)]):_0x268686['rule']};if(_0x3f729e<_0x595240){_0x533bdf[_0x3f729e]=_0x1c6f34,delete _0x533bdf[_0x595240];for(const [_0x391d4f,_0x1cfe67]of _0x4ef0d6[_0x33eb1a(0x154)]()){_0x1cfe67===_0x595240&&_0x4ef0d6['set'](_0x391d4f,_0x3f729e);}_0x4ef0d6[_0x33eb1a(0x16f)](_0x3f729e,_0x3f729e),_0x705e20[_0x33eb1a(0x16f)](_0x134ea2,_0x3f729e);}else _0x533bdf[_0x595240]=_0x1c6f34,_0x4ef0d6[_0x33eb1a(0x16f)](_0x3f729e,_0x595240);}else{let _0x1fe889=_0x3f729e;if(_0x310d70){const _0x25227e=_0x310d70[_0x33eb1a(0x135)](_0x134ea2);_0x25227e&&_0x25227e[_0x33eb1a(0x178)]>0x0&&(_0x1fe889=_0x25227e[_0x33eb1a(0x142)]()['sort']()[0x0]);}const _0x6586f1={..._0x268686[_0x33eb1a(0x155)]!==undefined&&{'description':_0x268686[_0x33eb1a(0x155)]},'rule':_0x268686[_0x33eb1a(0x167)]?deepSortObject(_0x268686[_0x33eb1a(0x167)]):_0x268686[_0x33eb1a(0x167)]};_0x533bdf[_0x1fe889]=_0x6586f1,_0x4ef0d6['set'](_0x3f729e,_0x1fe889),_0x705e20[_0x33eb1a(0x16f)](_0x134ea2,_0x1fe889);}}}return{'merged':_0x533bdf,'nameMapping':_0x4ef0d6};}export function updateSegmentReferences(_0x175679,_0x4c3625){const _0x17ad19=a133_0x1f55;if(!_0x175679)return;for(const _0x5925d3 of _0x175679){if(_0x5925d3[_0x17ad19(0x163)]?.[_0x17ad19(0x165)]){const _0x47ff47=_0x4c3625[_0x17ad19(0x135)](_0x5925d3[_0x17ad19(0x163)][_0x17ad19(0x165)]);_0x47ff47&&(_0x5925d3[_0x17ad19(0x163)][_0x17ad19(0x165)]=_0x47ff47);}if(_0x5925d3[_0x17ad19(0x161)])for(const _0x103371 of _0x5925d3[_0x17ad19(0x161)]){if(_0x103371[_0x17ad19(0x165)]){const _0x5dfbb3=_0x4c3625['get'](_0x103371[_0x17ad19(0x165)]);_0x5dfbb3&&(_0x103371[_0x17ad19(0x165)]=_0x5dfbb3);}}if(_0x5925d3['milestone']?.[_0x17ad19(0x165)]){const _0x20957d=_0x4c3625[_0x17ad19(0x135)](_0x5925d3[_0x17ad19(0x13c)][_0x17ad19(0x165)]);_0x20957d&&(_0x5925d3[_0x17ad19(0x13c)][_0x17ad19(0x165)]=_0x20957d);}if(_0x5925d3[_0x17ad19(0x16e)])for(const _0x3243f4 of _0x5925d3[_0x17ad19(0x16e)]){if(_0x3243f4[_0x17ad19(0x14c)]===_0x17ad19(0x16c)&&_0x3243f4[_0x17ad19(0x172)]?.[_0x17ad19(0x158)])for(const _0x124191 of _0x3243f4[_0x17ad19(0x172)][_0x17ad19(0x158)]){if(_0x124191[_0x17ad19(0x165)]){const _0x25a334=_0x4c3625[_0x17ad19(0x135)](_0x124191[_0x17ad19(0x165)]);_0x25a334&&(_0x124191[_0x17ad19(0x165)]=_0x25a334);}}if(_0x3243f4[_0x17ad19(0x14c)]===_0x17ad19(0x171)&&_0x3243f4[_0x17ad19(0x172)]?.[_0x17ad19(0x150)]?.['segment']){const _0x510b1f=_0x4c3625[_0x17ad19(0x135)](_0x3243f4[_0x17ad19(0x172)][_0x17ad19(0x150)][_0x17ad19(0x165)]);_0x510b1f&&(_0x3243f4[_0x17ad19(0x172)]['condition'][_0x17ad19(0x165)]=_0x510b1f);}}}}export function updateSegmentRefsInSegments(_0x32b4cd,_0x156048){const _0x54ebba=a133_0x1f55;for(const _0x4dc246 of Object[_0x54ebba(0x164)](_0x32b4cd)){_0x4dc246[_0x54ebba(0x167)]&&updateSegmentRefsInRule(_0x4dc246[_0x54ebba(0x167)],_0x156048);}}function updateSegmentRefsInRule(_0x106d15,_0x2a7885){const _0x952bae=a133_0x1f55;if(_0x106d15===null||typeof _0x106d15!=='object')return;if(Array[_0x952bae(0x143)](_0x106d15)){for(const _0x14a50a of _0x106d15){updateSegmentRefsInRule(_0x14a50a,_0x2a7885);}return;}const _0x5e4fb1=_0x106d15;if((_0x5e4fb1[_0x952bae(0x14c)]===_0x952bae(0x13f)||_0x5e4fb1[_0x952bae(0x14c)]===_0x952bae(0x138))&&typeof _0x5e4fb1[_0x952bae(0x165)]==='string'){const _0x234442=_0x2a7885[_0x952bae(0x135)](_0x5e4fb1[_0x952bae(0x165)]);_0x234442&&(_0x5e4fb1[_0x952bae(0x165)]=_0x234442);}if(_0x5e4fb1['conditions']&&Array[_0x952bae(0x143)](_0x5e4fb1[_0x952bae(0x159)]))for(const _0x6f7b9e of _0x5e4fb1[_0x952bae(0x159)]){updateSegmentRefsInRule(_0x6f7b9e,_0x2a7885);}}export function buildJourneysArray(_0x29c1a8,_0x3a460b){const _0x598e20=a133_0x1f55;return _0x29c1a8[_0x598e20(0x157)](_0xeeddff=>{const _0xde4576=_0x598e20,_0x1b92fa=_0x3a460b?_0xeeddff['item']['id']===_0x3a460b:_0x29c1a8[_0xde4576(0x178)]===0x1,_0x23103b=_0xeeddff['yaml'][_0xde4576(0x147)]?.[0x0],_0x4e732b=_0x23103b?.['goal']||_0xeeddff[_0xde4576(0x139)][_0xde4576(0x170)],_0x2bf25d={'version':_0x23103b?.[_0xde4576(0x14f)]||_0xeeddff[_0xde4576(0x139)][_0xde4576(0x14f)]||_0xeeddff['item'][_0xde4576(0x133)],'state':_0xeeddff['item']['state']===_0xde4576(0x14e)?'launched':_0xde4576(0x16d),'stages':_0x23103b?.['stages']||_0xeeddff[_0xde4576(0x139)][_0xde4576(0x12c)]||[],'id':_0x23103b?.['id']||_0xeeddff[_0xde4576(0x139)]['id'],'version_number':_0x23103b?.[_0xde4576(0x14d)]||_0xeeddff['yaml'][_0xde4576(0x14d)]};return _0x4e732b&&(_0x2bf25d['goal']=_0x4e732b),_0x1b92fa&&(_0x2bf25d[_0xde4576(0x13a)]=!![]),_0x2bf25d;});}function a133_0x1f55(_0x486f0a,_0x1fa4f8){_0x486f0a=_0x486f0a-0x12c;const _0x5b32e5=a133_0x5b32();let _0x1f55a8=_0x5b32e5[_0x486f0a];return _0x1f55a8;}export function buildMergedJourneyDef(_0x413678,_0x171a65,_0x2f2b6e){const _0x50b9d3=a133_0x1f55,_0x2b5ebe=_0x413678[0x0][_0x50b9d3(0x139)],_0x59cf5b=buildJourneysArray(_0x413678,_0x2f2b6e),{merged:_0x46e6ba,nameMapping:_0x3019c0}=consolidateSegmentsByContent(_0x413678['map'](_0x416d76=>_0x416d76['yaml'][_0x50b9d3(0x153)]),_0x171a65);updateSegmentRefsInSegments(_0x46e6ba,_0x3019c0);const _0x59c931=Array['from'](_0x3019c0[_0x50b9d3(0x154)]())[_0x50b9d3(0x145)](([_0x167bdd,_0x103f3c])=>_0x167bdd!==_0x103f3c&&_0x167bdd[_0x50b9d3(0x148)](_0x50b9d3(0x163)));let _0x19514a=_0x46e6ba,_0x131bf2=new Map();if(_0x59c931){const _0x3360ad=consolidateSegmentsByContent([_0x46e6ba],_0x171a65);_0x19514a=_0x3360ad['merged'],_0x131bf2=_0x3360ad[_0x50b9d3(0x134)];}const _0x11d13e=new Map(_0x3019c0);for(const [_0x5e948d,_0xeb6b25]of _0x131bf2[_0x50b9d3(0x154)]()){_0x11d13e[_0x50b9d3(0x16f)](_0x5e948d,_0xeb6b25);}for(const [_0x17072e,_0x1e5798]of _0x11d13e['entries']()){let _0x464304=_0x1e5798,_0x4fd94c=0x0;while(_0x11d13e[_0x50b9d3(0x137)](_0x464304)&&_0x11d13e[_0x50b9d3(0x135)](_0x464304)!==_0x464304&&_0x4fd94c<MAX_MAPPING_CHAIN_DEPTH){_0x464304=_0x11d13e[_0x50b9d3(0x135)](_0x464304),_0x4fd94c++;}_0x464304!==_0x1e5798&&_0x11d13e[_0x50b9d3(0x16f)](_0x17072e,_0x464304);}for(const _0x14a220 of _0x59cf5b){updateSegmentReferences(_0x14a220[_0x50b9d3(0x12c)],_0x11d13e);}const {merged:_0x34bd4b,nameMapping:_0x55972f}=consolidateActivationsByContent(_0x413678[_0x50b9d3(0x157)](_0x4e83a6=>_0x4e83a6['yaml']['activations']));for(const _0x5b7b1d of _0x59cf5b){updateActivationReferences(_0x5b7b1d[_0x50b9d3(0x12c)],_0x55972f);}let _0x51ddeb=_0x2b5ebe[_0x50b9d3(0x170)];if(_0x51ddeb?.[_0x50b9d3(0x165)]){const _0x4ca066=_0x11d13e[_0x50b9d3(0x135)](_0x51ddeb[_0x50b9d3(0x165)]);_0x4ca066&&(_0x51ddeb={..._0x51ddeb,'segment':_0x4ca066});}for(const _0x39a688 of _0x59cf5b){if(_0x39a688[_0x50b9d3(0x170)]?.[_0x50b9d3(0x165)]){const _0x1c4d50=_0x11d13e[_0x50b9d3(0x135)](_0x39a688[_0x50b9d3(0x170)][_0x50b9d3(0x165)]);_0x1c4d50&&(_0x39a688[_0x50b9d3(0x170)]={..._0x39a688[_0x50b9d3(0x170)],'segment':_0x1c4d50});}}return _0x59cf5b[_0x50b9d3(0x145)](_0x19e8fe=>_0x19e8fe['goal'])&&(_0x51ddeb=undefined),{'type':_0x50b9d3(0x15a),'name':_0x2b5ebe[_0x50b9d3(0x133)],'description':_0x2b5ebe['description'],'goal':_0x51ddeb,'reentry':_0x2b5ebe['reentry'],'segments':Object[_0x50b9d3(0x13e)](_0x19514a)['length']>0x0?_0x19514a:undefined,'activations':Object[_0x50b9d3(0x13e)](_0x34bd4b)['length']>0x0?_0x34bd4b:undefined,'journeys':_0x59cf5b,'bundle_id':_0x2b5ebe['bundle_id'],'bundle_name':_0x2b5ebe[_0x50b9d3(0x175)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x3e51a7,_0x1b18ac,_0x557c92,_0x455dbb){const _0x577a5d=a133_0x1f55,_0x3953a8=_0x3e51a7+':'+_0x1b18ac,_0x2d7a44=_0x557c92[_0x577a5d(0x135)](_0x3953a8);if(_0x2d7a44)return _0x2d7a44;const _0x5919f3=await _0x455dbb(_0x3e51a7),_0x3454d8=_0x5919f3[_0x577a5d(0x13d)][_0x577a5d(0x176)]||_0x5919f3[_0x577a5d(0x13d)][_0x577a5d(0x133)],_0x4b1ceb=_0x5919f3[_0x577a5d(0x13d)][_0x577a5d(0x162)]['find'](_0x5b30b4=>String(_0x5b30b4['id'])===String(_0x1b18ac)),_0x4cd4ad=_0x4b1ceb?.['name']||_0x1b18ac,_0x55585c={'journeyName':_0x3454d8,'stageName':_0x4cd4ad};return _0x557c92[_0x577a5d(0x16f)](_0x3953a8,_0x55585c),_0x55585c;}export function formatApiJourneyName(_0x182955,_0x3c582a){return _0x3c582a+'\x20('+_0x182955+')';}export function isLocalJourneyRef(_0x1e22dd){const _0x294793=a133_0x1f55;return _0x1e22dd[_0x294793(0x12e)](_0x294793(0x130))||_0x1e22dd[_0x294793(0x12e)](_0x294793(0x151));}export function buildLocalRuleToNameMapping(_0x2dee20){const _0xebea4f=a133_0x1f55,_0x11e598=new Map();if(!_0x2dee20)return _0x11e598;for(const [_0x31cb9a,_0xfddddb]of Object['entries'](_0x2dee20)){if(_0xfddddb[_0xebea4f(0x167)]){const _0x11ab23=serializeRule(_0xfddddb[_0xebea4f(0x167)]),_0x12f2d0=_0x11e598['get'](_0x11ab23)||[];_0x12f2d0[_0xebea4f(0x140)](_0x31cb9a),_0x11e598['set'](_0x11ab23,_0x12f2d0);}}return _0x11e598;}export function buildLocalRuleToNameMappingFromJourney(_0x9ba2f4){const _0x26fa5a=a133_0x1f55,_0x240535=_0x9ba2f4[_0x26fa5a(0x153)];if(!_0x240535)return new Map();const _0x565664=collectSegmentUsageCounts(_0x9ba2f4),_0x25d89d=new Map();let _0x36a903=0x0;for(const [_0x1416e5,_0xbc588b]of Object[_0x26fa5a(0x154)](_0x240535)){if(!_0xbc588b[_0x26fa5a(0x167)]){_0x36a903++;continue;}const _0x4561fc=serializeRule(_0xbc588b[_0x26fa5a(0x167)]),_0x1465e9=_0x25d89d[_0x26fa5a(0x135)](_0x4561fc)||[];_0x1465e9['push']({'name':_0x1416e5,'index':_0x36a903}),_0x25d89d[_0x26fa5a(0x16f)](_0x4561fc,_0x1465e9),_0x36a903++;}const _0x247466=new Map();for(const [_0x3a55dc,_0x272436]of _0x25d89d){const _0xcc4794=_0x272436['slice']()[_0x26fa5a(0x15d)]((_0x496884,_0x281520)=>{const _0x57ad84=_0x26fa5a,_0x4b5b67=_0x565664[_0x57ad84(0x135)](_0x496884[_0x57ad84(0x133)])||0x0,_0x2fc881=_0x565664['get'](_0x281520[_0x57ad84(0x133)])||0x0;if(_0x4b5b67!==_0x2fc881)return _0x2fc881-_0x4b5b67;return _0x496884['index']-_0x281520[_0x57ad84(0x16b)];})[_0x26fa5a(0x157)](_0x4f137b=>_0x4f137b['name']);_0x247466[_0x26fa5a(0x16f)](_0x3a55dc,_0xcc4794);}return _0x247466;}export function collectSegmentUsageCounts(_0x28da80){const _0x5aba26=a133_0x1f55,_0x1fc1d9=new Map(),_0x2e9051=_0x33608c=>{const _0x462546=a133_0x1f55;if(!_0x33608c)return;_0x1fc1d9['set'](_0x33608c,(_0x1fc1d9[_0x462546(0x135)](_0x33608c)||0x0)+0x1);},_0x3fb3f5=_0x36c5c3=>{const _0x51bbd7=a133_0x1f55;for(const _0x33478d of _0x36c5c3){_0x2e9051(_0x33478d[_0x51bbd7(0x163)]?.[_0x51bbd7(0x165)]);if(_0x33478d['exit_criteria'])for(const _0x39b1ab of _0x33478d[_0x51bbd7(0x161)]){_0x2e9051(_0x39b1ab[_0x51bbd7(0x165)]);}_0x2e9051(_0x33478d[_0x51bbd7(0x13c)]?.[_0x51bbd7(0x165)]);if(_0x33478d['steps'])for(const _0x1d63e1 of _0x33478d[_0x51bbd7(0x16e)]){if(_0x1d63e1[_0x51bbd7(0x14c)]===_0x51bbd7(0x16c))for(const _0x499924 of _0x1d63e1[_0x51bbd7(0x172)][_0x51bbd7(0x158)]){_0x2e9051(_0x499924[_0x51bbd7(0x165)]);}else _0x1d63e1[_0x51bbd7(0x14c)]===_0x51bbd7(0x171)&&_0x2e9051(_0x1d63e1[_0x51bbd7(0x172)][_0x51bbd7(0x150)]?.['segment']);}}};_0x2e9051(_0x28da80[_0x5aba26(0x170)]?.[_0x5aba26(0x165)]);if(_0x28da80[_0x5aba26(0x147)])for(const _0x1c853b of _0x28da80[_0x5aba26(0x147)]){_0x2e9051(_0x1c853b['goal']?.[_0x5aba26(0x165)]),_0x3fb3f5(_0x1c853b[_0x5aba26(0x12c)]);}_0x28da80[_0x5aba26(0x12c)]&&_0x3fb3f5(_0x28da80['stages']);if(_0x28da80[_0x5aba26(0x141)])for(const _0x3fc12f of _0x28da80['versions']){_0x3fb3f5(_0x3fc12f[_0x5aba26(0x12c)]);}return _0x1fc1d9;}
|
|
1
|
+
(function(_0x1787cf,_0x12e450){const _0x55ccc=a133_0x4c8c,_0x5ad69a=_0x1787cf();while(!![]){try{const _0x21dd79=-parseInt(_0x55ccc(0x18e))/0x1+parseInt(_0x55ccc(0x186))/0x2+parseInt(_0x55ccc(0x167))/0x3+-parseInt(_0x55ccc(0x194))/0x4+-parseInt(_0x55ccc(0x180))/0x5+-parseInt(_0x55ccc(0x193))/0x6*(parseInt(_0x55ccc(0x155))/0x7)+-parseInt(_0x55ccc(0x175))/0x8*(-parseInt(_0x55ccc(0x191))/0x9);if(_0x21dd79===_0x12e450)break;else _0x5ad69a['push'](_0x5ad69a['shift']());}catch(_0x3d19b5){_0x5ad69a['push'](_0x5ad69a['shift']());}}}(a133_0x19ba,0xea632));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x16a126){const _0x292a33=a133_0x4c8c;return _0x16a126['toLowerCase']()['replace'](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x292a33(0x173)](/_+/g,'_')[_0x292a33(0x173)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5d2116){const _0x288b66=a133_0x4c8c,_0x55595e=_0x5d2116[_0x288b66(0x187)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x55595e){const _0x592e1e=_0x55595e[0x1]['toLowerCase'](),_0x3b2ed4=_0x55595e[0x2],_0x3c19f0=_0x3b2ed4[_0x288b66(0x173)](/-/g,'')['slice'](0x0,0x4)[_0x288b66(0x188)]();return _0x592e1e+'_'+_0x3c19f0;}const _0x55deb6=_0x5d2116[_0x288b66(0x187)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x55deb6){const _0x2c8f50=_0x55deb6[0x1],_0x410aee=_0x55deb6[0x2][_0x288b66(0x188)](),_0x6b4ea4=_0x2c8f50[_0x288b66(0x173)](/-/g,'')['slice'](0x0,0x4)[_0x288b66(0x188)]();return _0x410aee+'_'+_0x6b4ea4;}return undefined;}function stableStringify(_0x47a870){const _0x4135bf=a133_0x4c8c;if(Array[_0x4135bf(0x192)](_0x47a870))return'['+_0x47a870[_0x4135bf(0x16c)](_0x589328=>stableStringify(_0x589328))[_0x4135bf(0x19a)](',')+']';if(_0x47a870&&typeof _0x47a870==='object'){const _0x287919=_0x47a870,_0x383c51=Object[_0x4135bf(0x169)](_0x287919)['sort'](),_0x39da1b=_0x383c51[_0x4135bf(0x16c)](_0x305eca=>'\x22'+_0x305eca+'\x22:'+stableStringify(_0x287919[_0x305eca]));return'{'+_0x39da1b[_0x4135bf(0x19a)](',')+'}';}const _0x32db2a=JSON['stringify'](_0x47a870);return _0x32db2a===undefined?_0x4135bf(0x17e):_0x32db2a;}export function consolidateActivationsByContent(_0x1c4431){const _0x2f64a3=a133_0x4c8c,_0x6b0db1={},_0x1e489b=new Map(),_0x325c2d=new Map();for(const _0x5432a2 of _0x1c4431){if(!_0x5432a2)continue;for(const [_0x1d4464,_0x44849a]of Object[_0x2f64a3(0x166)](_0x5432a2)){const _0x2dd3ae={'name':_0x44849a[_0x2f64a3(0x17c)],'connection':_0x44849a[_0x2f64a3(0x176)],..._0x44849a['all_columns']!==undefined&&{'all_columns':_0x44849a[_0x2f64a3(0x163)]},..._0x44849a[_0x2f64a3(0x168)]!==undefined&&{'columns':_0x44849a[_0x2f64a3(0x168)]},..._0x44849a[_0x2f64a3(0x164)]!==undefined&&{'behavior':_0x44849a['behavior']},..._0x44849a[_0x2f64a3(0x161)]!==undefined&&{'schedule':_0x44849a['schedule']},..._0x44849a[_0x2f64a3(0x170)]!==undefined&&{'notification':_0x44849a[_0x2f64a3(0x170)]},..._0x44849a[_0x2f64a3(0x16f)]!==undefined&&{'connector_config':_0x44849a[_0x2f64a3(0x16f)]},..._0x44849a[_0x2f64a3(0x16a)]!==undefined&&{'activation_template_id':_0x44849a[_0x2f64a3(0x16a)]}},_0x3def79=stableStringify(_0x2dd3ae),_0x5373f5=_0x325c2d[_0x2f64a3(0x19d)](_0x3def79);_0x5373f5?_0x1e489b[_0x2f64a3(0x171)](_0x1d4464,_0x5373f5):(_0x6b0db1[_0x1d4464]=_0x44849a,_0x1e489b[_0x2f64a3(0x171)](_0x1d4464,_0x1d4464),_0x325c2d['set'](_0x3def79,_0x1d4464));}}return{'merged':_0x6b0db1,'nameMapping':_0x1e489b};}export function updateActivationReferences(_0x5068c4,_0x404e3f){const _0x500b6c=a133_0x4c8c;if(!_0x5068c4)return;for(const _0x2752da of _0x5068c4){if(!_0x2752da['steps'])continue;for(const _0xac2345 of _0x2752da['steps']){if(_0xac2345[_0x500b6c(0x152)]==='activation'&&_0xac2345[_0x500b6c(0x160)]?.[_0x500b6c(0x16b)]){const _0x5029ad=_0x404e3f[_0x500b6c(0x19d)](_0xac2345[_0x500b6c(0x160)][_0x500b6c(0x16b)]);_0x5029ad&&_0x5029ad!==_0xac2345[_0x500b6c(0x160)][_0x500b6c(0x16b)]&&(_0xac2345[_0x500b6c(0x160)][_0x500b6c(0x16b)]=_0x5029ad);}}}}function a133_0x4c8c(_0x2a804d,_0x169aa8){_0x2a804d=_0x2a804d-0x152;const _0x19ba10=a133_0x19ba();let _0x4c8ce9=_0x19ba10[_0x2a804d];return _0x4c8ce9;}export function consolidateSegmentsByContent(_0x521a79,_0x852ef6){const _0x7b87ac=a133_0x4c8c,_0x5ccc79={},_0x26383b=new Map(),_0x131a80=new Map();for(const _0x19dba2 of _0x521a79){if(!_0x19dba2)continue;for(const [_0x47d0d6,_0x1c4dff]of Object[_0x7b87ac(0x166)](_0x19dba2)){if(!_0x1c4dff[_0x7b87ac(0x18a)]){_0x5ccc79[_0x47d0d6]=_0x1c4dff,_0x26383b[_0x7b87ac(0x171)](_0x47d0d6,_0x47d0d6);continue;}const _0x461c95=_0x1c4dff[_0x7b87ac(0x178)]&&_0x1c4dff[_0x7b87ac(0x178)][_0x7b87ac(0x17a)]()?_0x1c4dff[_0x7b87ac(0x178)]:undefined,_0x402b15=JSON['stringify']({'description':_0x461c95,'rule':deepSortObject(_0x1c4dff[_0x7b87ac(0x18a)])}),_0x1bcc01=_0x131a80['get'](_0x402b15);if(_0x1bcc01){const _0x55ac6c={..._0x1c4dff[_0x7b87ac(0x178)]!==undefined&&{'description':_0x1c4dff['description']},'rule':_0x1c4dff['rule']?deepSortObject(_0x1c4dff['rule']):_0x1c4dff[_0x7b87ac(0x18a)]};if(_0x47d0d6<_0x1bcc01){_0x5ccc79[_0x47d0d6]=_0x55ac6c,delete _0x5ccc79[_0x1bcc01];for(const [_0x498f07,_0x17004f]of _0x26383b['entries']()){_0x17004f===_0x1bcc01&&_0x26383b['set'](_0x498f07,_0x47d0d6);}_0x26383b[_0x7b87ac(0x171)](_0x47d0d6,_0x47d0d6),_0x131a80[_0x7b87ac(0x171)](_0x402b15,_0x47d0d6);}else _0x5ccc79[_0x1bcc01]=_0x55ac6c,_0x26383b['set'](_0x47d0d6,_0x1bcc01);}else{let _0x44116a=_0x47d0d6;if(_0x852ef6){const _0x131138=_0x852ef6[_0x7b87ac(0x19d)](_0x402b15);_0x131138&&_0x131138[_0x7b87ac(0x189)]>0x0&&(_0x44116a=_0x131138[_0x7b87ac(0x185)]()['sort']()[0x0]);}const _0x1f8795={..._0x1c4dff[_0x7b87ac(0x178)]!==undefined&&{'description':_0x1c4dff[_0x7b87ac(0x178)]},'rule':_0x1c4dff[_0x7b87ac(0x18a)]?deepSortObject(_0x1c4dff[_0x7b87ac(0x18a)]):_0x1c4dff[_0x7b87ac(0x18a)]};_0x5ccc79[_0x44116a]=_0x1f8795,_0x26383b[_0x7b87ac(0x171)](_0x47d0d6,_0x44116a),_0x131a80[_0x7b87ac(0x171)](_0x402b15,_0x44116a);}}}return{'merged':_0x5ccc79,'nameMapping':_0x26383b};}export function updateSegmentReferences(_0xa1c3ce,_0x1a733a){const _0x3c4c84=a133_0x4c8c;if(!_0xa1c3ce)return;for(const _0xe4575 of _0xa1c3ce){if(_0xe4575[_0x3c4c84(0x158)]?.['segment']){const _0x4e6280=_0x1a733a[_0x3c4c84(0x19d)](_0xe4575[_0x3c4c84(0x158)]['segment']);_0x4e6280&&(_0xe4575[_0x3c4c84(0x158)][_0x3c4c84(0x196)]=_0x4e6280);}if(_0xe4575[_0x3c4c84(0x18d)])for(const _0x30c075 of _0xe4575['exit_criteria']){if(_0x30c075[_0x3c4c84(0x196)]){const _0x43aea4=_0x1a733a[_0x3c4c84(0x19d)](_0x30c075['segment']);_0x43aea4&&(_0x30c075[_0x3c4c84(0x196)]=_0x43aea4);}}if(_0xe4575['milestone']?.[_0x3c4c84(0x196)]){const _0x7eea83=_0x1a733a[_0x3c4c84(0x19d)](_0xe4575[_0x3c4c84(0x15b)][_0x3c4c84(0x196)]);_0x7eea83&&(_0xe4575['milestone'][_0x3c4c84(0x196)]=_0x7eea83);}if(_0xe4575['steps'])for(const _0x43efcc of _0xe4575[_0x3c4c84(0x15a)]){if(_0x43efcc[_0x3c4c84(0x152)]==='decision_point'&&_0x43efcc[_0x3c4c84(0x160)]?.[_0x3c4c84(0x199)])for(const _0x2fa9f9 of _0x43efcc[_0x3c4c84(0x160)]['branches']){if(_0x2fa9f9[_0x3c4c84(0x196)]){const _0x2dfcb5=_0x1a733a['get'](_0x2fa9f9['segment']);_0x2dfcb5&&(_0x2fa9f9[_0x3c4c84(0x196)]=_0x2dfcb5);}}if(_0x43efcc[_0x3c4c84(0x152)]===_0x3c4c84(0x15c)&&_0x43efcc[_0x3c4c84(0x160)]?.[_0x3c4c84(0x156)]?.[_0x3c4c84(0x196)]){const _0x5822f9=_0x1a733a[_0x3c4c84(0x19d)](_0x43efcc[_0x3c4c84(0x160)][_0x3c4c84(0x156)][_0x3c4c84(0x196)]);_0x5822f9&&(_0x43efcc['with']['condition'][_0x3c4c84(0x196)]=_0x5822f9);}}}}export function updateSegmentRefsInSegments(_0x42d0c9,_0x4b5380){const _0x10605a=a133_0x4c8c;for(const _0x3a0ecf of Object[_0x10605a(0x172)](_0x42d0c9)){_0x3a0ecf['rule']&&updateSegmentRefsInRule(_0x3a0ecf['rule'],_0x4b5380);}}function updateSegmentRefsInRule(_0x240b63,_0x209b9){const _0x54e837=a133_0x4c8c;if(_0x240b63===null||typeof _0x240b63!=='object')return;if(Array['isArray'](_0x240b63)){for(const _0x36be2c of _0x240b63){updateSegmentRefsInRule(_0x36be2c,_0x209b9);}return;}const _0x2e8620=_0x240b63;if((_0x2e8620[_0x54e837(0x152)]===_0x54e837(0x195)||_0x2e8620[_0x54e837(0x152)]===_0x54e837(0x157))&&typeof _0x2e8620[_0x54e837(0x196)]===_0x54e837(0x181)){const _0x2d1d5d=_0x209b9[_0x54e837(0x19d)](_0x2e8620[_0x54e837(0x196)]);_0x2d1d5d&&(_0x2e8620[_0x54e837(0x196)]=_0x2d1d5d);}if(_0x2e8620['conditions']&&Array[_0x54e837(0x192)](_0x2e8620['conditions']))for(const _0x247ae9 of _0x2e8620[_0x54e837(0x153)]){updateSegmentRefsInRule(_0x247ae9,_0x209b9);}}export function buildJourneysArray(_0x7cb3c0,_0x2bed7e){return _0x7cb3c0['map'](_0x48dce7=>{const _0x9cf64d=a133_0x4c8c,_0x3708f0=_0x2bed7e?_0x48dce7['item']['id']===_0x2bed7e:_0x7cb3c0[_0x9cf64d(0x189)]===0x1,_0x135145=_0x48dce7[_0x9cf64d(0x179)]['journeys']?.[0x0],_0x12e11b=_0x135145?.[_0x9cf64d(0x190)]||_0x48dce7['yaml']['goal'],_0xa40918={'version':_0x135145?.[_0x9cf64d(0x165)]||_0x48dce7[_0x9cf64d(0x179)]['version']||_0x48dce7[_0x9cf64d(0x17f)][_0x9cf64d(0x17c)],'state':_0x48dce7[_0x9cf64d(0x17f)][_0x9cf64d(0x16d)]===_0x9cf64d(0x15e)?_0x9cf64d(0x15e):_0x9cf64d(0x162),'stages':_0x135145?.[_0x9cf64d(0x184)]||_0x48dce7['yaml'][_0x9cf64d(0x184)]||[],'id':_0x135145?.['id']||_0x48dce7['yaml']['id'],'version_number':_0x135145?.['version_number']||_0x48dce7['yaml']['version_number']};return _0x12e11b&&(_0xa40918[_0x9cf64d(0x190)]=_0x12e11b),_0x3708f0&&(_0xa40918[_0x9cf64d(0x18f)]=!![]),_0xa40918;});}export function buildMergedJourneyDef(_0x91b7a,_0x5a5005,_0x3e8381){const _0x10efd9=a133_0x4c8c,_0x56f807=_0x91b7a[0x0][_0x10efd9(0x179)],_0x19f47e=buildJourneysArray(_0x91b7a,_0x3e8381),{merged:_0x50295c,nameMapping:_0x2330ca}=consolidateSegmentsByContent(_0x91b7a[_0x10efd9(0x16c)](_0x562ab0=>_0x562ab0[_0x10efd9(0x179)][_0x10efd9(0x19b)]),_0x5a5005);updateSegmentRefsInSegments(_0x50295c,_0x2330ca);const _0x323b68=Array['from'](_0x2330ca[_0x10efd9(0x166)]())['some'](([_0x2616cb,_0x197266])=>_0x2616cb!==_0x197266&&_0x2616cb[_0x10efd9(0x19c)]('entry_criteria'));let _0x278ae7=_0x50295c,_0x12e458=new Map();if(_0x323b68){const _0x26cb21=consolidateSegmentsByContent([_0x50295c],_0x5a5005);_0x278ae7=_0x26cb21['merged'],_0x12e458=_0x26cb21['nameMapping'];}const _0xa53c5=new Map(_0x2330ca);for(const [_0x5d0897,_0x173b75]of _0x12e458[_0x10efd9(0x166)]()){_0xa53c5[_0x10efd9(0x171)](_0x5d0897,_0x173b75);}for(const [_0xe0c28b,_0x3a62a0]of _0xa53c5[_0x10efd9(0x166)]()){let _0x3a7377=_0x3a62a0,_0x28dc5c=0x0;while(_0xa53c5[_0x10efd9(0x159)](_0x3a7377)&&_0xa53c5[_0x10efd9(0x19d)](_0x3a7377)!==_0x3a7377&&_0x28dc5c<MAX_MAPPING_CHAIN_DEPTH){_0x3a7377=_0xa53c5['get'](_0x3a7377),_0x28dc5c++;}_0x3a7377!==_0x3a62a0&&_0xa53c5[_0x10efd9(0x171)](_0xe0c28b,_0x3a7377);}for(const _0x1b2ffd of _0x19f47e){updateSegmentReferences(_0x1b2ffd[_0x10efd9(0x184)],_0xa53c5);}const {merged:_0x2e3706,nameMapping:_0x3582ec}=consolidateActivationsByContent(_0x91b7a[_0x10efd9(0x16c)](_0xe820c3=>_0xe820c3[_0x10efd9(0x179)][_0x10efd9(0x18c)]));for(const _0xec0b77 of _0x19f47e){updateActivationReferences(_0xec0b77[_0x10efd9(0x184)],_0x3582ec);}let _0x4efc43=_0x56f807[_0x10efd9(0x190)];if(_0x4efc43?.[_0x10efd9(0x196)]){const _0x32af61=_0xa53c5[_0x10efd9(0x19d)](_0x4efc43[_0x10efd9(0x196)]);_0x32af61&&(_0x4efc43={..._0x4efc43,'segment':_0x32af61});}for(const _0x57cd9a of _0x19f47e){if(_0x57cd9a[_0x10efd9(0x190)]?.[_0x10efd9(0x196)]){const _0x5c4d99=_0xa53c5[_0x10efd9(0x19d)](_0x57cd9a[_0x10efd9(0x190)][_0x10efd9(0x196)]);_0x5c4d99&&(_0x57cd9a['goal']={..._0x57cd9a[_0x10efd9(0x190)],'segment':_0x5c4d99});}}return _0x19f47e[_0x10efd9(0x18b)](_0x50e764=>_0x50e764[_0x10efd9(0x190)])&&(_0x4efc43=undefined),{'type':_0x10efd9(0x15f),'name':_0x56f807['name'],'description':_0x56f807[_0x10efd9(0x178)],'goal':_0x4efc43,'reentry':_0x56f807['reentry'],'segments':Object[_0x10efd9(0x169)](_0x278ae7)[_0x10efd9(0x189)]>0x0?_0x278ae7:undefined,'activations':Object[_0x10efd9(0x169)](_0x2e3706)[_0x10efd9(0x189)]>0x0?_0x2e3706:undefined,'journeys':_0x19f47e,'bundle_id':_0x56f807[_0x10efd9(0x197)],'bundle_name':_0x56f807['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x2b182f,_0x30f56f,_0x4fa5ce,_0x5605da){const _0x3f08e7=a133_0x4c8c,_0x287fc5=_0x2b182f+':'+_0x30f56f,_0x3b0ddf=_0x4fa5ce['get'](_0x287fc5);if(_0x3b0ddf)return _0x3b0ddf;const _0xedab89=await _0x5605da(_0x2b182f),_0x1f8c19=_0xedab89[_0x3f08e7(0x154)]['journeyBundleName']||_0xedab89[_0x3f08e7(0x154)][_0x3f08e7(0x17c)],_0x411639=_0xedab89[_0x3f08e7(0x154)]['journeyStages']['find'](_0x52c6a2=>String(_0x52c6a2['id'])===String(_0x30f56f)),_0x43e458=_0x411639?.['name']||_0x30f56f,_0x34603f={'journeyName':_0x1f8c19,'stageName':_0x43e458};return _0x4fa5ce[_0x3f08e7(0x171)](_0x287fc5,_0x34603f),_0x34603f;}export function formatApiJourneyName(_0x437732,_0x222ba8){return _0x222ba8+'\x20('+_0x437732+')';}export function isLocalJourneyRef(_0x1001ac){const _0x1b6fde=a133_0x4c8c;return _0x1001ac[_0x1b6fde(0x17d)](_0x1b6fde(0x17b))||_0x1001ac[_0x1b6fde(0x17d)](_0x1b6fde(0x174));}export function buildLocalRuleToNameMapping(_0x532d49){const _0x439032=a133_0x4c8c,_0x5240af=new Map();if(!_0x532d49)return _0x5240af;for(const [_0x18e33d,_0x504856]of Object[_0x439032(0x166)](_0x532d49)){if(_0x504856[_0x439032(0x18a)]){const _0x23b08b=serializeRule(_0x504856[_0x439032(0x18a)]),_0x1aa2e3=_0x5240af[_0x439032(0x19d)](_0x23b08b)||[];_0x1aa2e3[_0x439032(0x198)](_0x18e33d),_0x5240af['set'](_0x23b08b,_0x1aa2e3);}}return _0x5240af;}export function buildLocalRuleToNameMappingFromJourney(_0x1aaa45){const _0x23500a=a133_0x4c8c,_0x4265f4=_0x1aaa45[_0x23500a(0x19b)];if(!_0x4265f4)return new Map();const _0x1148b0=collectSegmentUsageCounts(_0x1aaa45),_0x2696da=new Map();let _0x3d186a=0x0;for(const [_0x3b89c0,_0x33e875]of Object[_0x23500a(0x166)](_0x4265f4)){if(!_0x33e875[_0x23500a(0x18a)]){_0x3d186a++;continue;}const _0x4464bd=serializeRule(_0x33e875['rule']),_0x35e524=_0x2696da[_0x23500a(0x19d)](_0x4464bd)||[];_0x35e524[_0x23500a(0x198)]({'name':_0x3b89c0,'index':_0x3d186a}),_0x2696da[_0x23500a(0x171)](_0x4464bd,_0x35e524),_0x3d186a++;}const _0x1b54e1=new Map();for(const [_0x3bd551,_0x1ef902]of _0x2696da){const _0x2be366=_0x1ef902[_0x23500a(0x185)]()[_0x23500a(0x183)]((_0x4500a5,_0x2dec76)=>{const _0x368aa3=_0x23500a,_0x28ee75=_0x1148b0[_0x368aa3(0x19d)](_0x4500a5['name'])||0x0,_0xa1b8d1=_0x1148b0[_0x368aa3(0x19d)](_0x2dec76['name'])||0x0;if(_0x28ee75!==_0xa1b8d1)return _0xa1b8d1-_0x28ee75;return _0x4500a5[_0x368aa3(0x177)]-_0x2dec76[_0x368aa3(0x177)];})[_0x23500a(0x16c)](_0x21d298=>_0x21d298[_0x23500a(0x17c)]);_0x1b54e1['set'](_0x3bd551,_0x2be366);}return _0x1b54e1;}export function collectSegmentUsageCounts(_0x1b401c){const _0x43b054=a133_0x4c8c,_0x3b9d5a=new Map(),_0x90cd73=_0x5d656f=>{const _0x5b6a34=a133_0x4c8c;if(!_0x5d656f)return;_0x3b9d5a[_0x5b6a34(0x171)](_0x5d656f,(_0x3b9d5a[_0x5b6a34(0x19d)](_0x5d656f)||0x0)+0x1);},_0x3c7971=_0x3f1129=>{const _0x48a7a8=a133_0x4c8c;for(const _0x1afa39 of _0x3f1129){_0x90cd73(_0x1afa39[_0x48a7a8(0x158)]?.[_0x48a7a8(0x196)]);if(_0x1afa39['exit_criteria'])for(const _0x5b43cd of _0x1afa39[_0x48a7a8(0x18d)]){_0x90cd73(_0x5b43cd['segment']);}_0x90cd73(_0x1afa39['milestone']?.['segment']);if(_0x1afa39[_0x48a7a8(0x15a)])for(const _0x330ce8 of _0x1afa39['steps']){if(_0x330ce8['type']===_0x48a7a8(0x16e))for(const _0x1d8222 of _0x330ce8['with'][_0x48a7a8(0x199)]){_0x90cd73(_0x1d8222[_0x48a7a8(0x196)]);}else _0x330ce8['type']==='wait'&&_0x90cd73(_0x330ce8[_0x48a7a8(0x160)][_0x48a7a8(0x156)]?.[_0x48a7a8(0x196)]);}}};_0x90cd73(_0x1b401c[_0x43b054(0x190)]?.[_0x43b054(0x196)]);if(_0x1b401c[_0x43b054(0x182)])for(const _0x195dfb of _0x1b401c[_0x43b054(0x182)]){_0x90cd73(_0x195dfb[_0x43b054(0x190)]?.[_0x43b054(0x196)]),_0x3c7971(_0x195dfb[_0x43b054(0x184)]);}_0x1b401c[_0x43b054(0x184)]&&_0x3c7971(_0x1b401c['stages']);if(_0x1b401c[_0x43b054(0x15d)])for(const _0x532a3f of _0x1b401c[_0x43b054(0x15d)]){_0x3c7971(_0x532a3f[_0x43b054(0x184)]);}return _0x3b9d5a;}function a133_0x19ba(){const _0x44b647=['with','schedule','draft','all_columns','behavior','version','entries','1590630tJXCJS','columns','keys','activation_template_id','activation','map','state','decision_point','connector_config','notification','set','values','replace','.yaml','8531192qHEWsx','connection','index','description','yaml','trim','.yml','name','endsWith','null','item','6003100uekINT','string','journeys','sort','stages','slice','1535094deDkZV','match','toLowerCase','length','rule','some','activations','exit_criteria','1780296sxyvwv','latest','goal','45Gbjxza','isArray','48AtLWLI','7071496XriBmc','include','segment','bundle_id','push','branches','join','segments','startsWith','get','type','conditions','attributes','805798hbeVGC','condition','exclude','entry_criteria','has','steps','milestone','wait','versions','launched','journey'];a133_0x19ba=function(){return _0x44b647;};return a133_0x19ba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x59015c,_0x1a10a5){const _0x27369f=a134_0xff75,_0x2470e9=_0x59015c();while(!![]){try{const _0x3ab7e5=parseInt(_0x27369f(0xb5))/0x1*(-parseInt(_0x27369f(0xb6))/0x2)+parseInt(_0x27369f(0xbb))/0x3*(-parseInt(_0x27369f(0x135))/0x4)+parseInt(_0x27369f(0x125))/0x5*(parseInt(_0x27369f(0x101))/0x6)+-parseInt(_0x27369f(0xc6))/0x7*(parseInt(_0x27369f(0x142))/0x8)+parseInt(_0x27369f(0x106))/0x9*(parseInt(_0x27369f(0x11b))/0xa)+parseInt(_0x27369f(0xa5))/0xb*(-parseInt(_0x27369f(0x13c))/0xc)+parseInt(_0x27369f(0xd7))/0xd;if(_0x3ab7e5===_0x1a10a5)break;else _0x2470e9['push'](_0x2470e9['shift']());}catch(_0x5b0dc1){_0x2470e9['push'](_0x2470e9['shift']());}}}(a134_0x151c,0xf2c8b));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x259a72,_0x4bd460,_0x4f073e,_0x541e20,_0x4ac055,_0x1c2659){const _0x5eb153=a134_0xff75;return{'level':_0x259a72,'path':_0x4bd460,'code':_0x4f073e,'message':_0x541e20,'location':getLocationFromPath(_0x4ac055[_0x5eb153(0x132)],_0x4ac055['source'],pathToArray(_0x1c2659??_0x4bd460))};}function validateVersionStructure(_0x3c4586,_0xe1c401){const _0x129854=a134_0xff75,_0x3e63bc=[];return _0x3c4586[_0x129854(0x13a)]>MAX_STAGES&&_0x3e63bc[_0x129854(0xd6)](createIssue('error',_0x129854(0xa3),_0x129854(0xd3),_0x129854(0xee)+_0x3c4586['length']+_0x129854(0x127)+MAX_STAGES,_0xe1c401)),_0x3e63bc;}function validateStageStructure(_0x5ab407,_0x3b25dd,_0x4190ee,_0x2237a1){const _0x37787d=a134_0xff75,_0x505538=[],_0x38759b=_0x37787d(0xad)+_0x3b25dd+']';_0x3b25dd===0x0&&!_0x5ab407['entry_criteria']&&_0x505538[_0x37787d(0xd6)](createIssue(_0x37787d(0xaf),_0x38759b+_0x37787d(0x9e),'MISSING_ENTRY_CRITERIA',_0x37787d(0x130)+_0x5ab407[_0x37787d(0xe0)]+_0x37787d(0xca),_0x2237a1,_0x38759b));const _0x26d600=_0x3b25dd===_0x4190ee-0x1;!_0x26d600&&!_0x5ab407[_0x37787d(0xa6)]&&_0x505538[_0x37787d(0xd6)](createIssue('error',_0x38759b+_0x37787d(0x120),_0x37787d(0xbf),_0x37787d(0x130)+_0x5ab407[_0x37787d(0xe0)]+_0x37787d(0x138),_0x2237a1,_0x38759b));(!_0x5ab407['exit_criteria']||_0x5ab407[_0x37787d(0x153)]['length']===0x0)&&_0x505538[_0x37787d(0xd6)](createIssue(_0x37787d(0xdc),_0x38759b+'.exit_criteria',_0x37787d(0x12f),_0x37787d(0x130)+_0x5ab407[_0x37787d(0xe0)]+_0x37787d(0xfd),_0x2237a1,_0x38759b));const _0x26ffaf=_0x5ab407[_0x37787d(0xb2)]?.[_0x37787d(0x13a)]??0x0;if(_0x26ffaf===0x0)_0x505538[_0x37787d(0xd6)](createIssue(_0x37787d(0xaf),_0x38759b+'.steps','INSUFFICIENT_STEPS',_0x37787d(0x130)+_0x5ab407[_0x37787d(0xe0)]+'\x27\x20has\x20no\x20steps',_0x2237a1,_0x38759b+_0x37787d(0x114)));else{if(_0x26ffaf===0x1)_0x505538[_0x37787d(0xd6)](createIssue(_0x37787d(0xdc),_0x38759b+_0x37787d(0x114),_0x37787d(0xf0),_0x37787d(0x130)+_0x5ab407['name']+_0x37787d(0x13d),_0x2237a1,_0x38759b+'.steps'));else _0x26ffaf<=0x3&&_0x505538[_0x37787d(0xd6)](createIssue(_0x37787d(0xdc),_0x38759b+'.steps',_0x37787d(0x137),_0x37787d(0x130)+_0x5ab407[_0x37787d(0xe0)]+_0x37787d(0x152)+_0x26ffaf+_0x37787d(0x104),_0x2237a1,_0x38759b+'.steps'));}return _0x505538;}function validateStep(_0x596115,_0x551bbe,_0x5123be,_0xbd8e39){const _0x97e54=a134_0xff75,_0x35d7fb=[];if(_0x596115['type']==='end')return _0x596115[_0x97e54(0x157)]&&_0x35d7fb[_0x97e54(0xd6)](createIssue(_0x97e54(0xaf),_0x551bbe+_0x97e54(0x14c),'END_STEP_HAS_NEXT_OR_WITH',_0x97e54(0xac)+_0x596115['name']+_0x97e54(0x148),_0x5123be)),_0x97e54(0xc0)in _0x596115&&_0x596115[_0x97e54(0xc0)]!==undefined&&_0x35d7fb['push'](createIssue('error',_0x551bbe+_0x97e54(0x144),_0x97e54(0x11c),_0x97e54(0xac)+_0x596115['name']+_0x97e54(0x156),_0x5123be)),_0x35d7fb;_0x596115[_0x97e54(0x157)]&&(_0x5123be['stepNames']&&!_0x5123be[_0x97e54(0x121)][_0x97e54(0x115)](_0x596115['next'])&&_0x35d7fb[_0x97e54(0xd6)](createIssue(_0x97e54(0xaf),_0x551bbe+_0x97e54(0x14c),'INVALID_NEXT_REFERENCE',_0x97e54(0x10c)+_0x596115[_0x97e54(0x157)]+'\x27',_0x5123be)));switch(_0x596115[_0x97e54(0xf5)]){case'wait':_0x35d7fb[_0x97e54(0xd6)](...validateWaitStep(_0x596115,_0x551bbe,_0x5123be,_0xbd8e39));break;case _0x97e54(0xcc):_0x35d7fb[_0x97e54(0xd6)](...validateActivationStep(_0x596115,_0x551bbe,_0x5123be));break;case _0x97e54(0xab):_0x35d7fb['push'](...validateDecisionPointStep(_0x596115,_0x551bbe,_0x5123be,_0xbd8e39));break;case _0x97e54(0x119):_0x35d7fb[_0x97e54(0xd6)](...validateAbTestStep(_0x596115,_0x551bbe,_0x5123be,_0xbd8e39));break;case _0x97e54(0x10d):_0x35d7fb['push'](...validateJumpStep(_0x596115,_0x551bbe,_0x5123be));break;}return _0x35d7fb;}function validateWaitStep(_0x262aef,_0x55c88b,_0x3c42d9,_0x34cc20){const _0x269eea=a134_0xff75,_0x762161=[];if(!_0x262aef[_0x269eea(0xc0)])return _0x762161['push'](createIssue(_0x269eea(0xaf),_0x55c88b+_0x269eea(0x144),_0x269eea(0x154),_0x269eea(0xc7),_0x3c42d9,_0x55c88b)),_0x762161;if(_0x262aef[_0x269eea(0xc0)][_0x269eea(0xef)]){const _0x15393c=_0x262aef[_0x269eea(0xc0)][_0x269eea(0xef)];if(_0x15393c[_0x269eea(0x11a)]){_0x3c42d9[_0x269eea(0xff)]?.['add'](_0x15393c[_0x269eea(0x11a)]);!_0x15393c[_0x269eea(0x11a)][_0x269eea(0xdd)](_0x269eea(0xcf))&&(_0x3c42d9[_0x269eea(0x111)]&&!_0x3c42d9[_0x269eea(0x111)][_0x269eea(0x115)](_0x15393c[_0x269eea(0x11a)])&&_0x762161[_0x269eea(0xd6)](createIssue(_0x269eea(0xaf),_0x55c88b+_0x269eea(0xe2),_0x269eea(0xa1),_0x269eea(0xfa)+_0x15393c['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x3c42d9)));_0x15393c[_0x269eea(0x157)]&&_0x3c42d9[_0x269eea(0x121)]&&!_0x3c42d9[_0x269eea(0x121)][_0x269eea(0x115)](_0x15393c['next'])&&_0x762161[_0x269eea(0xd6)](createIssue(_0x269eea(0xaf),_0x55c88b+_0x269eea(0x13e),_0x269eea(0x14a),_0x269eea(0xd8)+_0x15393c[_0x269eea(0x157)]+'\x27',_0x3c42d9));_0x15393c[_0x269eea(0x143)]?.['next']&&_0x3c42d9[_0x269eea(0x121)]&&!_0x3c42d9[_0x269eea(0x121)][_0x269eea(0x115)](_0x15393c[_0x269eea(0x143)][_0x269eea(0x157)])&&_0x762161[_0x269eea(0xd6)](createIssue('error',_0x55c88b+_0x269eea(0x122),_0x269eea(0x14a),_0x269eea(0xc5)+_0x15393c['timeout'][_0x269eea(0x157)]+'\x27',_0x3c42d9));const _0x51b8ce=_0x15393c[_0x269eea(0x157)]||_0x262aef[_0x269eea(0x157)],_0x19ae71=_0x15393c[_0x269eea(0x143)]?.[_0x269eea(0x157)]||_0x262aef[_0x269eea(0x157)];if(_0x51b8ce){const _0x3edeab=_0x34cc20[_0x269eea(0x107)](_0x51b8ce);_0x3edeab?.[_0x269eea(0xf5)]===_0x269eea(0xec)&&_0x762161[_0x269eea(0xd6)](createIssue('warning',_0x55c88b+_0x269eea(0x13e),_0x269eea(0x123),_0x269eea(0xe3)+_0x51b8ce+_0x269eea(0x140),_0x3c42d9,_0x55c88b+_0x269eea(0xce)));}if(_0x19ae71){const _0x1b330c=_0x34cc20[_0x269eea(0x107)](_0x19ae71);_0x1b330c?.[_0x269eea(0xf5)]===_0x269eea(0xec)&&_0x762161[_0x269eea(0xd6)](createIssue('warning',_0x55c88b+_0x269eea(0x122),_0x269eea(0x123),_0x269eea(0x13b)+_0x19ae71+_0x269eea(0x140),_0x3c42d9,_0x55c88b+_0x269eea(0xe9)));}}}return _0x762161;}function validateActivationStep(_0x28f837,_0x568abe,_0x22a589){const _0x368386=a134_0xff75,_0x367030=[];if(!_0x28f837[_0x368386(0xc0)]?.['activation'])return _0x367030[_0x368386(0xd6)](createIssue(_0x368386(0xaf),_0x568abe+_0x368386(0xae),'MISSING_ACTIVATION_REF',_0x368386(0x149),_0x22a589,_0x568abe)),_0x367030;const _0x253b2e=_0x28f837['with'][_0x368386(0xcc)];return _0x22a589[_0x368386(0x117)]&&!_0x253b2e['startsWith'](_0x368386(0xcf))&&(!_0x22a589[_0x368386(0x117)][_0x368386(0x115)](_0x253b2e)&&_0x367030[_0x368386(0xd6)](createIssue(_0x368386(0xaf),_0x568abe+_0x368386(0xae),_0x368386(0x10e),_0x368386(0x147)+_0x253b2e+_0x368386(0xf2),_0x22a589))),_0x367030;}function validateDecisionPointStep(_0x2155e1,_0x2b0a62,_0x2a2635,_0x304da4){const _0x200428=a134_0xff75,_0x1bedca=[];if(!_0x2155e1['with']?.['branches']||_0x2155e1[_0x200428(0xc0)]['branches'][_0x200428(0x13a)]===0x0)return _0x1bedca[_0x200428(0xd6)](createIssue(_0x200428(0xaf),_0x2b0a62+_0x200428(0x109),_0x200428(0xc9),_0x200428(0xa0),_0x2a2635,_0x2b0a62)),_0x1bedca;for(let _0x57f861=0x0;_0x57f861<_0x2155e1['with'][_0x200428(0x110)]['length'];_0x57f861++){const _0x2778a5=_0x2155e1[_0x200428(0xc0)][_0x200428(0x110)][_0x57f861],_0x42fb7c=_0x2b0a62+_0x200428(0x116)+_0x57f861+']';_0x2778a5[_0x200428(0x11a)]&&!_0x2778a5[_0x200428(0xbe)]&&(_0x2a2635[_0x200428(0xff)]?.[_0x200428(0xd1)](_0x2778a5['segment']),!_0x2778a5[_0x200428(0x11a)]['startsWith']('ref:')&&(_0x2a2635[_0x200428(0x111)]&&!_0x2a2635[_0x200428(0x111)]['has'](_0x2778a5[_0x200428(0x11a)])&&_0x1bedca[_0x200428(0xd6)](createIssue(_0x200428(0xaf),_0x42fb7c+'.segment','MISSING_SEGMENT_REFERENCE',_0x200428(0xbc)+_0x2778a5[_0x200428(0x11a)]+'\x27',_0x2a2635))));_0x2778a5['next']&&_0x2a2635[_0x200428(0x121)]&&!_0x2a2635['stepNames']['has'](_0x2778a5[_0x200428(0x157)])&&_0x1bedca[_0x200428(0xd6)](createIssue(_0x200428(0xaf),_0x42fb7c+_0x200428(0x14c),_0x200428(0x14a),_0x200428(0xaa)+_0x2778a5[_0x200428(0x157)]+'\x27',_0x2a2635));if(_0x2778a5[_0x200428(0x157)]){const _0x5e0e9=_0x304da4['get'](_0x2778a5[_0x200428(0x157)]);_0x5e0e9?.[_0x200428(0xf5)]==='merge'&&_0x1bedca[_0x200428(0xd6)](createIssue('warning',_0x42fb7c+_0x200428(0x14c),'BRANCH_DIRECTLY_TO_MERGE',_0x200428(0xb0)+_0x2778a5[_0x200428(0xe0)]+_0x200428(0xa8)+_0x2778a5[_0x200428(0x157)]+_0x200428(0x103),_0x2a2635));}}return _0x1bedca;}function validateAbTestStep(_0x5da411,_0x59b864,_0x4966d3,_0xa54926){const _0x57d301=a134_0xff75,_0x580ced=[];if(!_0x5da411['with']?.[_0x57d301(0xdb)]||_0x5da411[_0x57d301(0xc0)][_0x57d301(0xdb)][_0x57d301(0x13a)]===0x0)return _0x580ced[_0x57d301(0xd6)](createIssue(_0x57d301(0xaf),_0x59b864+'.with.variants',_0x57d301(0xc9),_0x57d301(0xba),_0x4966d3,_0x59b864)),_0x580ced;const _0x3174fa=_0x5da411[_0x57d301(0xc0)][_0x57d301(0xdb)]['reduce']((_0x1a56b9,_0x210cf4)=>_0x1a56b9+(_0x210cf4[_0x57d301(0xb9)]||0x0),0x0);Math[_0x57d301(0xd2)](_0x3174fa-0x64)>0.01&&_0x580ced['push'](createIssue('error',_0x59b864+_0x57d301(0xed),'INVALID_AB_TEST_PERCENTAGES','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x3174fa+'%)',_0x4966d3));for(let _0x5a7cd0=0x0;_0x5a7cd0<_0x5da411[_0x57d301(0xc0)][_0x57d301(0xdb)][_0x57d301(0x13a)];_0x5a7cd0++){const _0x187270=_0x5da411[_0x57d301(0xc0)][_0x57d301(0xdb)][_0x5a7cd0],_0x485588=_0x59b864+_0x57d301(0xc2)+_0x5a7cd0+']';_0x187270[_0x57d301(0x157)]&&_0x4966d3[_0x57d301(0x121)]&&!_0x4966d3[_0x57d301(0x121)]['has'](_0x187270[_0x57d301(0x157)])&&_0x580ced[_0x57d301(0xd6)](createIssue(_0x57d301(0xaf),_0x485588+_0x57d301(0x14c),_0x57d301(0x14a),_0x57d301(0xb7)+_0x187270['next']+'\x27',_0x4966d3));if(_0x187270[_0x57d301(0x157)]){const _0x101bad=_0xa54926[_0x57d301(0x107)](_0x187270[_0x57d301(0x157)]);_0x101bad?.[_0x57d301(0xf5)]==='merge'&&_0x580ced[_0x57d301(0xd6)](createIssue(_0x57d301(0xdc),_0x485588+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x57d301(0xda)+_0x187270[_0x57d301(0xe0)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x187270[_0x57d301(0x157)]+_0x57d301(0x103),_0x4966d3));}}return _0x580ced;}function validateJumpStep(_0x2a8c0c,_0x475bc3,_0x10be7a){const _0x59f93a=a134_0xff75,_0x29bf70=[];if(!_0x2a8c0c[_0x59f93a(0xc0)]?.[_0x59f93a(0xc8)])return _0x29bf70[_0x59f93a(0xd6)](createIssue(_0x59f93a(0xaf),_0x475bc3+_0x59f93a(0x14b),_0x59f93a(0x128),_0x59f93a(0xe1),_0x10be7a,_0x475bc3)),_0x29bf70;return(!_0x2a8c0c['with']['target'][_0x59f93a(0xc4)]||!_0x2a8c0c[_0x59f93a(0xc0)]['target']['stage'])&&_0x29bf70[_0x59f93a(0xd6)](createIssue(_0x59f93a(0xaf),_0x475bc3+_0x59f93a(0x14b),'INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x10be7a)),_0x29bf70;}function buildConvergenceMap(_0x6194c){const _0xb2e939=a134_0xff75,_0x4defcb=new Map();function _0x5121da(_0x4b01fb,_0x448c5c){const _0x46ac8b=a134_0xff75,_0x1b3fa2=_0x4defcb[_0x46ac8b(0x107)](_0x4b01fb)||[];_0x1b3fa2[_0x46ac8b(0xd6)](_0x448c5c),_0x4defcb[_0x46ac8b(0x14f)](_0x4b01fb,_0x1b3fa2);}for(const _0xbf9925 of _0x6194c){_0xbf9925['next']&&_0x5121da(_0xbf9925[_0xb2e939(0x157)],{'stepName':_0xbf9925['name'],'description':_0xb2e939(0xe5)+_0xbf9925[_0xb2e939(0xe0)]+'\x27'});if(_0xbf9925[_0xb2e939(0xf5)]===_0xb2e939(0xab)&&_0xbf9925[_0xb2e939(0xc0)]?.[_0xb2e939(0x110)])for(const _0x15a561 of _0xbf9925[_0xb2e939(0xc0)][_0xb2e939(0x110)]){_0x15a561[_0xb2e939(0x157)]&&_0x5121da(_0x15a561[_0xb2e939(0x157)],{'stepName':_0xbf9925[_0xb2e939(0xe0)],'description':_0xb2e939(0xcb)+_0x15a561[_0xb2e939(0xe0)]+_0xb2e939(0x12b)+_0xbf9925[_0xb2e939(0xe0)]+'\x27'});}if(_0xbf9925['type']==='ab_test'&&_0xbf9925[_0xb2e939(0xc0)]?.[_0xb2e939(0xdb)])for(const _0x45e224 of _0xbf9925[_0xb2e939(0xc0)]['variants']){_0x45e224[_0xb2e939(0x157)]&&_0x5121da(_0x45e224[_0xb2e939(0x157)],{'stepName':_0xbf9925[_0xb2e939(0xe0)],'description':_0xb2e939(0xa9)+_0x45e224[_0xb2e939(0xe0)]+_0xb2e939(0x12b)+_0xbf9925[_0xb2e939(0xe0)]+'\x27'});}_0xbf9925[_0xb2e939(0xf5)]===_0xb2e939(0xe7)&&_0xbf9925[_0xb2e939(0xc0)]?.[_0xb2e939(0xef)]&&(_0xbf9925[_0xb2e939(0xc0)][_0xb2e939(0xef)][_0xb2e939(0x157)]&&_0x5121da(_0xbf9925[_0xb2e939(0xc0)]['condition'][_0xb2e939(0x157)],{'stepName':_0xbf9925[_0xb2e939(0xe0)],'description':_0xb2e939(0x11d)+_0xbf9925[_0xb2e939(0xe0)]+'\x27'}),_0xbf9925[_0xb2e939(0xc0)][_0xb2e939(0xef)][_0xb2e939(0x143)]?.[_0xb2e939(0x157)]&&_0x5121da(_0xbf9925[_0xb2e939(0xc0)]['condition'][_0xb2e939(0x143)]['next'],{'stepName':_0xbf9925[_0xb2e939(0xe0)],'description':'timeout\x20of\x20\x27'+_0xbf9925[_0xb2e939(0xe0)]+'\x27'}));}return _0x4defcb;}function validateFlowControl(_0x687450,_0x2800b5,_0x406c83){const _0xfcf2ad=a134_0xff75,_0x233cbf=[],_0x51a768=_0xfcf2ad(0xad)+_0x2800b5+']',_0x1f00c6=_0x687450['steps']||[];if(_0x1f00c6['length']===0x0)return _0x233cbf;const _0x5226ff=new Map();for(const _0x98d077 of _0x1f00c6){_0x98d077['name']&&_0x5226ff[_0xfcf2ad(0x14f)](_0x98d077[_0xfcf2ad(0xe0)],_0x98d077);}const _0x38e94d=buildConvergenceMap(_0x1f00c6),_0x2d5fef=_0x1f00c6[_0xfcf2ad(0x155)](_0x312d0d=>_0x312d0d[_0xfcf2ad(0xf5)]===_0xfcf2ad(0xea));!_0x2d5fef&&_0x233cbf['push'](createIssue('error',_0x51a768+_0xfcf2ad(0x114),'MISSING_END_STEP',_0xfcf2ad(0x130)+_0x687450[_0xfcf2ad(0xe0)]+_0xfcf2ad(0x9f),_0x406c83));for(const [_0x132063,_0x214643]of _0x38e94d){const _0x4de997=_0x5226ff[_0xfcf2ad(0x107)](_0x132063);if(!_0x4de997)continue;if(_0x214643[_0xfcf2ad(0x13a)]>0x1&&_0x4de997['type']!==_0xfcf2ad(0xec)){const _0x538885=_0x214643[_0xfcf2ad(0x151)](_0x197307=>_0x197307[_0xfcf2ad(0x146)])[_0xfcf2ad(0x129)](',\x20');_0x233cbf['push'](createIssue(_0xfcf2ad(0xaf),_0x51a768+_0xfcf2ad(0x114),'CONVERGENCE_WITHOUT_MERGE',_0xfcf2ad(0xdf)+_0x132063+_0xfcf2ad(0xe8)+_0x538885+_0xfcf2ad(0xfc),_0x406c83));}_0x214643[_0xfcf2ad(0x13a)]===0x1&&_0x4de997[_0xfcf2ad(0xf5)]===_0xfcf2ad(0xec)&&_0x233cbf['push'](createIssue('warning',_0x51a768+_0xfcf2ad(0x114),_0xfcf2ad(0xbd),_0xfcf2ad(0x134)+_0x132063+_0xfcf2ad(0xb1)+_0x214643[0x0][_0xfcf2ad(0x146)]+_0xfcf2ad(0x12d),_0x406c83));}for(const _0x29e657 of _0x1f00c6){if(_0x29e657['type']===_0xfcf2ad(0xec)&&_0x29e657[_0xfcf2ad(0x157)]){const _0x45d4b9=_0x5226ff[_0xfcf2ad(0x107)](_0x29e657[_0xfcf2ad(0x157)]);_0x45d4b9?.[_0xfcf2ad(0xf5)]==='merge'&&_0x233cbf[_0xfcf2ad(0xd6)](createIssue(_0xfcf2ad(0xaf),_0x51a768+_0xfcf2ad(0x114),_0xfcf2ad(0x118),_0xfcf2ad(0x134)+_0x29e657[_0xfcf2ad(0xe0)]+_0xfcf2ad(0x12a)+_0x29e657['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x406c83));}}return _0x233cbf;}function a134_0x151c(){const _0x9e53a2=['size','22lLtUgD','milestone','values','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','variant\x20\x27','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','decision_point','End\x20step\x20\x27','stages[','.with.activation','error','Decision\x20branch\x20\x27','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','steps','\x27\x20(first\x20defined\x20at\x20steps[','Criteria\x20references\x20undefined\x20segment\x20\x27','9yGPyni','134806MVOdRU','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','DUPLICATE_LATEST','percentage','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','27OMlibW','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','SINGLE_INPUT_MERGE','excluded','MISSING_MILESTONE','with','MISSING_GOAL','.with.variants[','skipSchema','journey','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','2028642PBbVuq','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','target','MISSING_CONDITIONS','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','branch\x20\x27','activation','activations','.with.condition','ref:','entries','add','abs','TOO_MANY_STAGES','excluded_','code','push','19033001IftNLl','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','A/B\x20test\x20variant\x20\x27','variants','warning','startsWith','entry_criteria','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','name','Jump\x20step\x20requires\x20a\x20target','.with.condition.segment','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','message','step\x20\x27','keys','wait','\x27\x20(from:\x20','.with.condition.timeout','end','success','merge','.with.variants','Journey\x20has\x20','condition','INSUFFICIENT_STEPS','MISSING_NAME','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','launched','.stages','type','path','UNUSED_EMBEDDED_SEGMENT','source','splice','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','filter',').\x20Use\x20a\x20merge\x20step.','\x27\x20has\x20no\x20exit_criteria\x20defined','state','referencedSegments','endsWith','992322JcLqBm','.type','\x27\x20with\x20no\x20action\x20in\x20between','\x20steps\x20(may\x20be\x20too\x20simple)','versions[','19809JMZnYg','get','Journey\x20can\x20have\x20at\x20most\x20one\x20','.with.branches','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','versions','Step\x20references\x20non-existent\x20step\x20\x27','jump','MISSING_ACTIVATION_DEFINITION','Embedded\x20segment\x20\x27','branches','embeddedSegments','level','includes','.steps','has','.with.branches[','activationKeys','MERGE_TO_MERGE_CHAIN','ab_test','segment','7840UcIzns','END_STEP_HAS_NEXT_OR_WITH','condition\x20of\x20\x27','.segment','\x20versions)','.milestone','stepNames','.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE','replace','45NpUlHr','goal','\x20stages\x20but\x20maximum\x20is\x20','INVALID_JUMP_TARGET','join','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','\x27\x20of\x20\x27','match',').\x20Merge\x20is\x20unnecessary.','segments.','MISSING_EXIT_CRITERIA','Stage\x20\x27','segments','document','journeys,\x20stages,\x20or\x20versions','Merge\x20step\x20\x27','182216TIDkAe','Journey\x20has\x20no\x20goal\x20defined','FEW_STEPS','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','.name','length','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','5569512QCgcpk','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.condition.next','.exit_criteria[','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','latest','48sZifbZ','timeout','.with','journey\x20entry','description','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','Activation\x20step\x20requires\x20an\x20activation\x20reference','INVALID_NEXT_REFERENCE','.with.target','.next','JOURNEY_SCHEMA_ERROR','rule','set','sort','map','\x27\x20has\x20only\x20','exit_criteria','MISSING_WAIT_PARAMS','some','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','next','Duplicate\x20step\x20name\x20\x27','journeys','.entry_criteria','\x27\x20has\x20no\x20end\x20step','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','MISSING_SEGMENT_REFERENCE','trim','stages'];a134_0x151c=function(){return _0x9e53a2;};return a134_0x151c();}function validateCriteria(_0x119362,_0x492da0,_0x571dab){const _0x574b43=a134_0xff75,_0x3c80c3=[];return _0x119362[_0x574b43(0x11a)]&&(_0x571dab[_0x574b43(0xff)]?.[_0x574b43(0xd1)](_0x119362[_0x574b43(0x11a)]),!_0x119362['segment'][_0x574b43(0xdd)](_0x574b43(0xcf))&&(_0x571dab['embeddedSegments']&&!_0x571dab[_0x574b43(0x111)][_0x574b43(0x115)](_0x119362[_0x574b43(0x11a)])&&_0x3c80c3[_0x574b43(0xd6)](createIssue('error',_0x492da0+_0x574b43(0x11e),_0x574b43(0xa1),_0x574b43(0xb4)+_0x119362[_0x574b43(0x11a)]+'\x27',_0x571dab)))),_0x3c80c3;}function validateEmbeddedSegment(_0x580e92,_0x2077c8,_0x400a1a){const _0x510e1b=a134_0xff75,_0x498f51=[];return _0x580e92[_0x510e1b(0x14e)]&&_0x498f51[_0x510e1b(0xd6)](...validateRuleDef(_0x580e92[_0x510e1b(0x14e)],_0x2077c8+'.rule',_0x400a1a)),_0x498f51;}function validateStage(_0x1c9bee,_0x28699d,_0x11e65b,_0x2ce8f3){const _0x237b38=a134_0xff75,_0x167e75=[],_0x3aad36='stages['+_0x28699d+']',_0x37281d=new Map(),_0x5e0d76=new Map();if(_0x1c9bee[_0x237b38(0xb2)]){for(let _0x41d360=0x0;_0x41d360<_0x1c9bee['steps'][_0x237b38(0x13a)];_0x41d360++){const _0x415996=_0x1c9bee[_0x237b38(0xb2)][_0x41d360];_0x415996['name']&&_0x37281d[_0x237b38(0x14f)](_0x415996['name'],_0x415996);}for(let _0x2b81ad=0x0;_0x2b81ad<_0x1c9bee[_0x237b38(0xb2)][_0x237b38(0x13a)];_0x2b81ad++){const _0x153d85=_0x1c9bee['steps'][_0x2b81ad],_0x4f0f44=_0x3aad36+'.steps['+_0x2b81ad+']';if(_0x153d85[_0x237b38(0xe0)]){if(_0x5e0d76['has'](_0x153d85[_0x237b38(0xe0)])){const _0x563302=_0x5e0d76[_0x237b38(0x107)](_0x153d85[_0x237b38(0xe0)]);_0x167e75[_0x237b38(0xd6)](createIssue(_0x237b38(0xaf),_0x4f0f44+_0x237b38(0x139),'DUPLICATE_STEP_NAME',_0x237b38(0x158)+_0x153d85[_0x237b38(0xe0)]+_0x237b38(0xb3)+_0x563302+'])',_0x2ce8f3));}else _0x5e0d76[_0x237b38(0x14f)](_0x153d85[_0x237b38(0xe0)],_0x2b81ad);}_0x167e75[_0x237b38(0xd6)](...validateStep(_0x153d85,_0x4f0f44,_0x2ce8f3,_0x37281d));}}_0x1c9bee[_0x237b38(0xde)]&&_0x167e75[_0x237b38(0xd6)](...validateCriteria(_0x1c9bee[_0x237b38(0xde)],_0x3aad36+'.entry_criteria',_0x2ce8f3));if(_0x1c9bee[_0x237b38(0x153)])for(let _0x6d85f9=0x0;_0x6d85f9<_0x1c9bee['exit_criteria'][_0x237b38(0x13a)];_0x6d85f9++){_0x167e75['push'](...validateCriteria(_0x1c9bee['exit_criteria'][_0x6d85f9],_0x3aad36+_0x237b38(0x13f)+_0x6d85f9+']',_0x2ce8f3));}return _0x1c9bee[_0x237b38(0xa6)]&&_0x167e75[_0x237b38(0xd6)](...validateCriteria(_0x1c9bee[_0x237b38(0xa6)],_0x3aad36+_0x237b38(0x120),_0x2ce8f3)),_0x167e75[_0x237b38(0xd6)](...validateStageStructure(_0x1c9bee,_0x28699d,_0x11e65b,_0x2ce8f3)),_0x167e75['push'](...validateFlowControl(_0x1c9bee,_0x28699d,_0x2ce8f3)),_0x167e75;}function validateStagesForVersion(_0x238642,_0x3b74e8,_0x5df190,_0x34b4f8,_0x1fdb38,_0x6ac2a3,_0x2594c5){const _0x327db6=a134_0xff75;if(_0x238642['length']===0x0){_0x1fdb38[_0x327db6(0xd6)]({'level':_0x327db6(0xaf),'path':_0x34b4f8+'stages','code':'MISSING_STAGES','message':_0x327db6(0xd9),'location':getLocationFromPath(_0x5df190[_0x327db6(0x132)],_0x5df190[_0x327db6(0xf8)],[_0x327db6(0xa3)])});return;}const _0x528d3c=new Set();for(const _0x1792ee of _0x238642){if(_0x1792ee[_0x327db6(0xb2)])for(const _0x6ff0f1 of _0x1792ee[_0x327db6(0xb2)]){_0x6ff0f1[_0x327db6(0xe0)]&&_0x528d3c[_0x327db6(0xd1)](_0x6ff0f1[_0x327db6(0xe0)]);}}const _0x52b291={..._0x5df190,'stepNames':_0x528d3c},_0x597744=validateVersionStructure(_0x238642,_0x52b291);for(const _0x3f240f of _0x597744){const _0x59c70=_0x34b4f8?{..._0x3f240f,'path':''+_0x34b4f8+_0x3f240f['path']}:_0x3f240f;if(_0x59c70[_0x327db6(0x112)]===_0x327db6(0xaf))_0x1fdb38['push'](_0x59c70);else _0x6ac2a3[_0x327db6(0xd6)](_0x59c70);}for(let _0x572c98=0x0;_0x572c98<_0x238642['length'];_0x572c98++){const _0x508948=validateStage(_0x238642[_0x572c98],_0x572c98,_0x238642[_0x327db6(0x13a)],_0x52b291);for(const _0x140cdb of _0x508948){const _0x53fa73=_0x34b4f8?{..._0x140cdb,'path':''+_0x34b4f8+_0x140cdb[_0x327db6(0xf6)]}:_0x140cdb;if(_0x53fa73[_0x327db6(0x112)]===_0x327db6(0xaf))_0x1fdb38[_0x327db6(0xd6)](_0x53fa73);else _0x6ac2a3[_0x327db6(0xd6)](_0x53fa73);}}if(_0x3b74e8['goal']){const _0x2c342c=_0x2594c5?.['goalIsInherited']?_0x327db6(0x126):_0x34b4f8+_0x327db6(0x126),_0x1c20f6=validateCriteria(_0x3b74e8[_0x327db6(0x126)],_0x2c342c,_0x52b291);for(const _0xb6fa1b of _0x1c20f6){if(_0xb6fa1b[_0x327db6(0x112)]===_0x327db6(0xaf))_0x1fdb38[_0x327db6(0xd6)](_0xb6fa1b);else _0x6ac2a3[_0x327db6(0xd6)](_0xb6fa1b);}}}function extractVersionIndex(_0x5191ad){const _0x51f119=a134_0xff75,_0x357738=_0x5191ad[_0x51f119(0x12c)](/^journeys\[(\d+)\]\./);return _0x357738?_0x357738[0x1]:undefined;}function deduplicateAcrossVersions(_0x307fd4){const _0x14c281=a134_0xff75,_0x128b96=new Map();for(let _0x45f50b=0x0;_0x45f50b<_0x307fd4[_0x14c281(0x13a)];_0x45f50b++){const _0x4456c6=_0x307fd4[_0x45f50b][_0x14c281(0xd5)]+':'+_0x307fd4[_0x45f50b][_0x14c281(0xe4)],_0x55c9a9=extractVersionIndex(_0x307fd4[_0x45f50b][_0x14c281(0xf6)]),_0x29c8fa=_0x128b96['get'](_0x4456c6);if(_0x29c8fa){_0x29c8fa['indices'][_0x14c281(0xd6)](_0x45f50b);if(_0x55c9a9)_0x29c8fa[_0x14c281(0x10b)][_0x14c281(0xd1)](_0x55c9a9);}else _0x128b96[_0x14c281(0x14f)](_0x4456c6,{'indices':[_0x45f50b],'versions':new Set(_0x55c9a9?[_0x55c9a9]:[])});}const _0x4545fd=new Set();for(const {indices:_0x5b0108,versions:_0x39cc67}of _0x128b96[_0x14c281(0xa7)]()){if(_0x39cc67[_0x14c281(0xa4)]<=0x1)continue;const _0x14ee63=_0x307fd4[_0x5b0108[0x0]];_0x14ee63[_0x14c281(0xf6)]=_0x14ee63[_0x14c281(0xf6)][_0x14c281(0x124)](/^journeys\[\d+\]\./,''),_0x14ee63['message']=_0x14ee63[_0x14c281(0xe4)]+'\x20(across\x20'+_0x39cc67['size']+_0x14c281(0x11f);for(let _0x1fcc2b=0x1;_0x1fcc2b<_0x5b0108[_0x14c281(0x13a)];_0x1fcc2b++){_0x4545fd['add'](_0x5b0108[_0x1fcc2b]);}}const _0x5f4ec5=[..._0x4545fd][_0x14c281(0x150)]((_0x7ff032,_0x2aabf5)=>_0x2aabf5-_0x7ff032);for(const _0xe9085d of _0x5f4ec5){_0x307fd4[_0x14c281(0xf9)](_0xe9085d,0x1);}}export function validateJourneyDef(_0x354cc9,_0x44796b={},_0x5d3902={}){const _0x354909=a134_0xff75;if(_0x5d3902[_0x354909(0xc3)])return runJourneySemanticChecks(_0x354cc9,_0x44796b);const _0x46133d=JourneyDefSchema['safeParse'](_0x354cc9);if(_0x46133d[_0x354909(0xeb)])return runJourneySemanticChecks(_0x46133d['data'],_0x44796b);return zodErrorsToJourneyValidationResult(_0x46133d[_0x354909(0xaf)],_0x44796b);}function zodErrorsToJourneyValidationResult(_0x788249,_0x2a7de2){const _0x5d6d19=a134_0xff75,_0xed4772=flattenZodIssues(_0x788249['issues']),_0x2cac47=_0xed4772[_0x5d6d19(0x151)](_0x3db305=>{const _0x5b3ea1=_0x5d6d19,_0x46554d=formatZodPath(_0x3db305['path']),_0x120af3=mapJourneyZodIssueToCode(_0x3db305,_0x46554d),_0x2ebe07=getLocationFromPath(_0x2a7de2['document'],_0x2a7de2[_0x5b3ea1(0xf8)],_0x3db305[_0x5b3ea1(0xf6)][_0x5b3ea1(0x151)](_0x36d705=>typeof _0x36d705==='symbol'?String(_0x36d705):_0x36d705));return{'level':_0x5b3ea1(0xaf),'path':_0x46554d,'code':_0x120af3,'message':_0x3db305[_0x5b3ea1(0xe4)],..._0x2ebe07&&{'location':_0x2ebe07}};});return{'valid':![],'errors':_0x2cac47,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2f2f36,_0x2aa6ee){const _0x174136=a134_0xff75;if(_0x2aa6ee===_0x174136(0xe0))return _0x174136(0xf1);if(_0x2aa6ee[_0x174136(0x100)](_0x174136(0x102))&&_0x2aa6ee[_0x174136(0x113)](_0x174136(0xb2)))return _0x174136(0x14d);if(_0x2aa6ee===_0x174136(0xa3)||_0x2aa6ee['endsWith'](_0x174136(0xf4)))return'MISSING_STAGES';if(_0x2aa6ee===''&&_0x2f2f36[_0x174136(0xe4)][_0x174136(0x113)](_0x174136(0x133)))return'MISSING_STAGES';if(_0x2aa6ee['includes'](_0x174136(0xcc)))return'ACTIVATION_SCHEMA_ERROR';return'JOURNEY_SCHEMA_ERROR';}function a134_0xff75(_0x4f409e,_0x227283){_0x4f409e=_0x4f409e-0x9e;const _0x151cf5=a134_0x151c();let _0xff7563=_0x151cf5[_0x4f409e];return _0xff7563;}function runJourneySemanticChecks(_0x251b08,_0x29ac9e){const _0x57b8b7=a134_0xff75,_0x2f432f=[],_0x4a3bbe=[];(!_0x251b08[_0x57b8b7(0xe0)]||_0x251b08[_0x57b8b7(0xe0)][_0x57b8b7(0xa2)]()==='')&&_0x2f432f[_0x57b8b7(0xd6)]({'level':_0x57b8b7(0xaf),'path':'name','code':_0x57b8b7(0xf1),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x29ac9e['document'],_0x29ac9e['source'],[_0x57b8b7(0xe0)])});const _0x41fe9f=new Set();if(_0x251b08[_0x57b8b7(0x131)])for(const _0x16ec54 of Object[_0x57b8b7(0xe6)](_0x251b08[_0x57b8b7(0x131)])){_0x41fe9f[_0x57b8b7(0xd1)](_0x16ec54);}const _0x26dd3b=new Set();if(_0x251b08[_0x57b8b7(0xcd)])for(const _0x6df088 of Object[_0x57b8b7(0xe6)](_0x251b08[_0x57b8b7(0xcd)])){_0x26dd3b[_0x57b8b7(0xd1)](_0x6df088);}const _0x2c4e47=new Set(),_0x397fc3={..._0x29ac9e,'embeddedSegments':_0x41fe9f,'referencedSegments':_0x2c4e47,'activationKeys':_0x26dd3b[_0x57b8b7(0xa4)]>0x0?_0x26dd3b:undefined};if(_0x251b08[_0x57b8b7(0x131)])for(const [_0x2b524a,_0x1bc633]of Object[_0x57b8b7(0xd0)](_0x251b08['segments'])){const _0x2cfaf6=validateEmbeddedSegment(_0x1bc633,_0x57b8b7(0x12e)+_0x2b524a,_0x397fc3);for(const _0xae8bcb of _0x2cfaf6){if(_0xae8bcb[_0x57b8b7(0x112)]===_0x57b8b7(0xaf))_0x2f432f[_0x57b8b7(0xd6)](_0xae8bcb);else _0x4a3bbe[_0x57b8b7(0xd6)](_0xae8bcb);}}const _0x6ba46b=!!_0x251b08[_0x57b8b7(0x126)],_0x270e24=_0x251b08[_0x57b8b7(0x159)]?.['every'](_0x361314=>!!_0x361314[_0x57b8b7(0x126)])??![];!_0x6ba46b&&!_0x270e24&&_0x4a3bbe[_0x57b8b7(0xd6)]({'level':_0x57b8b7(0xdc),'path':_0x57b8b7(0x126),'code':_0x57b8b7(0xc1),'message':_0x57b8b7(0x136),'location':getLocationFromPath(_0x29ac9e['document'],_0x29ac9e[_0x57b8b7(0xf8)],[_0x57b8b7(0x126)])});const _0x528db2=_0x251b08['journeys']??_0x251b08[_0x57b8b7(0x10b)];if(_0x528db2&&_0x528db2[_0x57b8b7(0xfb)](_0x224314=>_0x224314[_0x57b8b7(0x141)]===!![])[_0x57b8b7(0x13a)]>0x1){const _0xdb94fb=_0x251b08[_0x57b8b7(0x159)]?_0x57b8b7(0x159):'versions';_0x2f432f['push']({'level':_0x57b8b7(0xaf),'path':_0xdb94fb,'code':_0x57b8b7(0xb8),'message':_0x57b8b7(0x108)+(_0xdb94fb==='journeys'?_0x57b8b7(0x145):'version')+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x29ac9e[_0x57b8b7(0x132)],_0x29ac9e[_0x57b8b7(0xf8)],[_0xdb94fb])});}if(_0x251b08['journeys']&&_0x251b08[_0x57b8b7(0x159)][_0x57b8b7(0x13a)]>0x0)for(let _0x1c2440=0x0;_0x1c2440<_0x251b08[_0x57b8b7(0x159)]['length'];_0x1c2440++){const _0x5025bc=_0x251b08['journeys'][_0x1c2440];if(_0x251b08['journeys'][_0x57b8b7(0x13a)]>0x1&&_0x5025bc[_0x57b8b7(0xfe)]===_0x57b8b7(0xf3))continue;const _0x592907=_0x5025bc[_0x57b8b7(0xa3)]||[],_0x4c247c='journeys['+_0x1c2440+'].',_0x5d38f7=!!_0x5025bc['goal'],_0x284c15=_0x5d38f7?{..._0x251b08,'goal':_0x5025bc[_0x57b8b7(0x126)]}:_0x251b08;validateStagesForVersion(_0x592907,_0x284c15,_0x397fc3,_0x4c247c,_0x2f432f,_0x4a3bbe,{'goalIsInherited':!_0x5d38f7});}else{if(_0x251b08[_0x57b8b7(0x10b)]&&_0x251b08[_0x57b8b7(0x10b)][_0x57b8b7(0x13a)]>0x0)for(let _0xbde6fa=0x0;_0xbde6fa<_0x251b08['versions'][_0x57b8b7(0x13a)];_0xbde6fa++){const _0x26ce9a=_0x251b08[_0x57b8b7(0x10b)][_0xbde6fa];if(_0x251b08[_0x57b8b7(0x10b)][_0x57b8b7(0x13a)]>0x1&&_0x26ce9a['state']===_0x57b8b7(0xf3))continue;const _0x26b03e=_0x26ce9a[_0x57b8b7(0xa3)]||[],_0x58e9bc=_0x57b8b7(0x105)+_0xbde6fa+'].';validateStagesForVersion(_0x26b03e,_0x251b08,_0x397fc3,_0x58e9bc,_0x2f432f,_0x4a3bbe);}else{const _0x14a631=_0x251b08[_0x57b8b7(0xa3)]||[];validateStagesForVersion(_0x14a631,_0x251b08,_0x397fc3,'',_0x2f432f,_0x4a3bbe);}}_0x251b08[_0x57b8b7(0x159)]&&_0x251b08[_0x57b8b7(0x159)][_0x57b8b7(0x13a)]>0x1&&(deduplicateAcrossVersions(_0x2f432f),deduplicateAcrossVersions(_0x4a3bbe));for(const _0x3c8c0a of _0x41fe9f){!_0x2c4e47[_0x57b8b7(0x115)](_0x3c8c0a)&&!_0x3c8c0a[_0x57b8b7(0xdd)](_0x57b8b7(0xd4))&&_0x4a3bbe[_0x57b8b7(0xd6)]({'level':_0x57b8b7(0xdc),'path':'segments.'+_0x3c8c0a,'code':_0x57b8b7(0xf7),'message':_0x57b8b7(0x10f)+_0x3c8c0a+_0x57b8b7(0x10a),'location':getLocationFromPath(_0x29ac9e[_0x57b8b7(0x132)],_0x29ac9e['source'],[_0x57b8b7(0x131),_0x3c8c0a])});}return{'valid':_0x2f432f[_0x57b8b7(0x13a)]===0x0,'errors':_0x2f432f,'warnings':_0x4a3bbe};}
|
|
1
|
+
(function(_0x270e4f,_0x557974){const _0x35a85a=a134_0x976d,_0x426c90=_0x270e4f();while(!![]){try{const _0x857559=parseInt(_0x35a85a(0x11e))/0x1*(parseInt(_0x35a85a(0xf9))/0x2)+parseInt(_0x35a85a(0x13a))/0x3*(parseInt(_0x35a85a(0xe8))/0x4)+parseInt(_0x35a85a(0x111))/0x5*(parseInt(_0x35a85a(0x17f))/0x6)+parseInt(_0x35a85a(0x169))/0x7+-parseInt(_0x35a85a(0x173))/0x8*(parseInt(_0x35a85a(0x109))/0x9)+-parseInt(_0x35a85a(0x15e))/0xa*(-parseInt(_0x35a85a(0xdc))/0xb)+-parseInt(_0x35a85a(0x155))/0xc;if(_0x857559===_0x557974)break;else _0x426c90['push'](_0x426c90['shift']());}catch(_0xe9eab4){_0x426c90['push'](_0x426c90['shift']());}}}(a134_0x2f02,0x6cd89));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x180b26,_0x28974c,_0x52fcd2,_0x46a6c5,_0x31598f,_0x4b1915){const _0x4e38cf=a134_0x976d;return{'level':_0x180b26,'path':_0x28974c,'code':_0x52fcd2,'message':_0x46a6c5,'location':getLocationFromPath(_0x31598f[_0x4e38cf(0xe3)],_0x31598f[_0x4e38cf(0x17e)],pathToArray(_0x4b1915??_0x28974c))};}function validateVersionStructure(_0x5a8c13,_0x27be50){const _0x23f452=a134_0x976d,_0x30fa6f=[];return _0x5a8c13[_0x23f452(0x170)]>MAX_STAGES&&_0x30fa6f[_0x23f452(0x100)](createIssue(_0x23f452(0x16a),_0x23f452(0xe0),_0x23f452(0x114),'Journey\x20has\x20'+_0x5a8c13[_0x23f452(0x170)]+_0x23f452(0x16c)+MAX_STAGES,_0x27be50)),_0x30fa6f;}function validateStageStructure(_0x4baa5a,_0x174aba,_0xabd2c6,_0x727353){const _0x224957=a134_0x976d,_0xee53fd=[],_0x52dc44=_0x224957(0xd5)+_0x174aba+']';_0x174aba===0x0&&!_0x4baa5a[_0x224957(0x183)]&&_0xee53fd[_0x224957(0x100)](createIssue(_0x224957(0x16a),_0x52dc44+_0x224957(0x14b),'MISSING_ENTRY_CRITERIA',_0x224957(0x14f)+_0x4baa5a['name']+_0x224957(0x15d),_0x727353,_0x52dc44));const _0x48cce4=_0x174aba===_0xabd2c6-0x1;!_0x48cce4&&!_0x4baa5a[_0x224957(0x177)]&&_0xee53fd[_0x224957(0x100)](createIssue(_0x224957(0x16a),_0x52dc44+'.milestone',_0x224957(0x127),_0x224957(0x14f)+_0x4baa5a[_0x224957(0x172)]+_0x224957(0x154),_0x727353,_0x52dc44));(!_0x4baa5a['exit_criteria']||_0x4baa5a[_0x224957(0x12a)][_0x224957(0x170)]===0x0)&&_0xee53fd[_0x224957(0x100)](createIssue('warning',_0x52dc44+'.exit_criteria',_0x224957(0x174),_0x224957(0x14f)+_0x4baa5a[_0x224957(0x172)]+_0x224957(0x157),_0x727353,_0x52dc44));const _0xeeaf6b=_0x4baa5a[_0x224957(0x117)]?.[_0x224957(0x170)]??0x0;if(_0xeeaf6b===0x0)_0xee53fd[_0x224957(0x100)](createIssue('error',_0x52dc44+_0x224957(0x15b),_0x224957(0x16e),_0x224957(0x14f)+_0x4baa5a[_0x224957(0x172)]+'\x27\x20has\x20no\x20steps',_0x727353,_0x52dc44+_0x224957(0x15b)));else{if(_0xeeaf6b===0x1)_0xee53fd[_0x224957(0x100)](createIssue(_0x224957(0x15f),_0x52dc44+_0x224957(0x15b),_0x224957(0x16e),_0x224957(0x14f)+_0x4baa5a['name']+_0x224957(0x164),_0x727353,_0x52dc44+_0x224957(0x15b)));else _0xeeaf6b<=0x3&&_0xee53fd['push'](createIssue(_0x224957(0x15f),_0x52dc44+_0x224957(0x15b),'FEW_STEPS','Stage\x20\x27'+_0x4baa5a[_0x224957(0x172)]+_0x224957(0xf0)+_0xeeaf6b+_0x224957(0xd7),_0x727353,_0x52dc44+'.steps'));}return _0xee53fd;}function a134_0x976d(_0x45db0f,_0x4dd213){_0x45db0f=_0x45db0f-0xc9;const _0x2f02dd=a134_0x2f02();let _0x976dc6=_0x2f02dd[_0x45db0f];return _0x976dc6;}function validateStep(_0xb94ed5,_0x3af7e1,_0x3d5390,_0x20f2fc){const _0x4b4c20=a134_0x976d,_0x4cdcab=[];if(_0xb94ed5['type']==='end')return _0xb94ed5['next']&&_0x4cdcab[_0x4b4c20(0x100)](createIssue(_0x4b4c20(0x16a),_0x3af7e1+_0x4b4c20(0xdd),'END_STEP_HAS_NEXT_OR_WITH',_0x4b4c20(0xfa)+_0xb94ed5[_0x4b4c20(0x172)]+_0x4b4c20(0x137),_0x3d5390)),'with'in _0xb94ed5&&_0xb94ed5[_0x4b4c20(0xec)]!==undefined&&_0x4cdcab['push'](createIssue(_0x4b4c20(0x16a),_0x3af7e1+_0x4b4c20(0x11f),_0x4b4c20(0xd1),_0x4b4c20(0xfa)+_0xb94ed5[_0x4b4c20(0x172)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x3d5390)),_0x4cdcab;_0xb94ed5['next']&&(_0x3d5390[_0x4b4c20(0x12d)]&&!_0x3d5390[_0x4b4c20(0x12d)][_0x4b4c20(0x128)](_0xb94ed5[_0x4b4c20(0xd9)])&&_0x4cdcab[_0x4b4c20(0x100)](createIssue(_0x4b4c20(0x16a),_0x3af7e1+'.next',_0x4b4c20(0xfb),_0x4b4c20(0x102)+_0xb94ed5[_0x4b4c20(0xd9)]+'\x27',_0x3d5390)));switch(_0xb94ed5[_0x4b4c20(0x106)]){case _0x4b4c20(0x12e):_0x4cdcab[_0x4b4c20(0x100)](...validateWaitStep(_0xb94ed5,_0x3af7e1,_0x3d5390,_0x20f2fc));break;case _0x4b4c20(0xd0):_0x4cdcab['push'](...validateActivationStep(_0xb94ed5,_0x3af7e1,_0x3d5390));break;case _0x4b4c20(0x13f):_0x4cdcab[_0x4b4c20(0x100)](...validateDecisionPointStep(_0xb94ed5,_0x3af7e1,_0x3d5390,_0x20f2fc));break;case _0x4b4c20(0x121):_0x4cdcab['push'](...validateAbTestStep(_0xb94ed5,_0x3af7e1,_0x3d5390,_0x20f2fc));break;case _0x4b4c20(0x175):_0x4cdcab[_0x4b4c20(0x100)](...validateJumpStep(_0xb94ed5,_0x3af7e1,_0x3d5390));break;}return _0x4cdcab;}function validateWaitStep(_0x2b5e59,_0x54f209,_0x310aa0,_0x431244){const _0x54904d=a134_0x976d,_0x4a39ce=[];if(!_0x2b5e59[_0x54904d(0xec)])return _0x4a39ce['push'](createIssue(_0x54904d(0x16a),_0x54f209+_0x54904d(0x11f),_0x54904d(0x13b),_0x54904d(0x134),_0x310aa0,_0x54f209)),_0x4a39ce;if(_0x2b5e59[_0x54904d(0xec)][_0x54904d(0xe7)]){const _0x54f461=_0x2b5e59[_0x54904d(0xec)][_0x54904d(0xe7)];if(_0x54f461[_0x54904d(0x107)]){_0x310aa0['referencedSegments']?.['add'](_0x54f461[_0x54904d(0x107)]);!_0x54f461[_0x54904d(0x107)][_0x54904d(0x10c)](_0x54904d(0x151))&&(_0x310aa0[_0x54904d(0x139)]&&!_0x310aa0[_0x54904d(0x139)][_0x54904d(0x128)](_0x54f461[_0x54904d(0x107)])&&_0x4a39ce[_0x54904d(0x100)](createIssue(_0x54904d(0x16a),_0x54f209+'.with.condition.segment',_0x54904d(0xf6),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x54f461[_0x54904d(0x107)]+_0x54904d(0x147),_0x310aa0)));_0x54f461[_0x54904d(0xd9)]&&_0x310aa0[_0x54904d(0x12d)]&&!_0x310aa0['stepNames'][_0x54904d(0x128)](_0x54f461['next'])&&_0x4a39ce[_0x54904d(0x100)](createIssue('error',_0x54f209+_0x54904d(0xf2),'INVALID_NEXT_REFERENCE',_0x54904d(0xc9)+_0x54f461[_0x54904d(0xd9)]+'\x27',_0x310aa0));_0x54f461[_0x54904d(0x108)]?.[_0x54904d(0xd9)]&&_0x310aa0[_0x54904d(0x12d)]&&!_0x310aa0[_0x54904d(0x12d)][_0x54904d(0x128)](_0x54f461[_0x54904d(0x108)][_0x54904d(0xd9)])&&_0x4a39ce[_0x54904d(0x100)](createIssue(_0x54904d(0x16a),_0x54f209+_0x54904d(0xda),_0x54904d(0xfb),_0x54904d(0xcb)+_0x54f461['timeout'][_0x54904d(0xd9)]+'\x27',_0x310aa0));const _0x49c994=_0x54f461[_0x54904d(0xd9)]||_0x2b5e59[_0x54904d(0xd9)],_0x17640e=_0x54f461[_0x54904d(0x108)]?.[_0x54904d(0xd9)]||_0x2b5e59[_0x54904d(0xd9)];if(_0x49c994){const _0xc7e0a1=_0x431244['get'](_0x49c994);_0xc7e0a1?.[_0x54904d(0x106)]===_0x54904d(0x17d)&&_0x4a39ce[_0x54904d(0x100)](createIssue(_0x54904d(0x15f),_0x54f209+_0x54904d(0xf2),_0x54904d(0xe2),_0x54904d(0xcc)+_0x49c994+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x310aa0,_0x54f209+_0x54904d(0x165)));}if(_0x17640e){const _0x488d90=_0x431244['get'](_0x17640e);_0x488d90?.[_0x54904d(0x106)]===_0x54904d(0x17d)&&_0x4a39ce[_0x54904d(0x100)](createIssue('warning',_0x54f209+_0x54904d(0xda),_0x54904d(0xe2),_0x54904d(0x180)+_0x17640e+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x310aa0,_0x54f209+_0x54904d(0xce)));}}}return _0x4a39ce;}function validateActivationStep(_0x405274,_0x15df3a,_0x754f2){const _0x3b0af2=a134_0x976d,_0x3fe960=[];if(!_0x405274['with']?.['activation'])return _0x3fe960[_0x3b0af2(0x100)](createIssue(_0x3b0af2(0x16a),_0x15df3a+_0x3b0af2(0x171),_0x3b0af2(0x160),_0x3b0af2(0x16f),_0x754f2,_0x15df3a)),_0x3fe960;const _0xe2667=_0x405274[_0x3b0af2(0xec)][_0x3b0af2(0xd0)];return _0x754f2[_0x3b0af2(0x16d)]&&!_0xe2667[_0x3b0af2(0x10c)](_0x3b0af2(0x151))&&(!_0x754f2[_0x3b0af2(0x16d)][_0x3b0af2(0x128)](_0xe2667)&&_0x3fe960[_0x3b0af2(0x100)](createIssue(_0x3b0af2(0x16a),_0x15df3a+'.with.activation',_0x3b0af2(0x166),_0x3b0af2(0x161)+_0xe2667+_0x3b0af2(0x181),_0x754f2))),_0x3fe960;}function validateDecisionPointStep(_0x18d644,_0xa06462,_0x1ddd25,_0x36bacd){const _0x3ff811=a134_0x976d,_0x31fe40=[];if(!_0x18d644[_0x3ff811(0xec)]?.[_0x3ff811(0xe1)]||_0x18d644['with'][_0x3ff811(0xe1)][_0x3ff811(0x170)]===0x0)return _0x31fe40[_0x3ff811(0x100)](createIssue(_0x3ff811(0x16a),_0xa06462+_0x3ff811(0x12b),_0x3ff811(0x142),_0x3ff811(0x168),_0x1ddd25,_0xa06462)),_0x31fe40;for(let _0x4955e1=0x0;_0x4955e1<_0x18d644[_0x3ff811(0xec)][_0x3ff811(0xe1)][_0x3ff811(0x170)];_0x4955e1++){const _0xbadf8a=_0x18d644[_0x3ff811(0xec)][_0x3ff811(0xe1)][_0x4955e1],_0x37453a=_0xa06462+_0x3ff811(0x163)+_0x4955e1+']';_0xbadf8a[_0x3ff811(0x107)]&&!_0xbadf8a[_0x3ff811(0x11b)]&&(_0x1ddd25[_0x3ff811(0x11d)]?.['add'](_0xbadf8a[_0x3ff811(0x107)]),!_0xbadf8a[_0x3ff811(0x107)][_0x3ff811(0x10c)]('ref:')&&(_0x1ddd25['embeddedSegments']&&!_0x1ddd25[_0x3ff811(0x139)][_0x3ff811(0x128)](_0xbadf8a[_0x3ff811(0x107)])&&_0x31fe40[_0x3ff811(0x100)](createIssue(_0x3ff811(0x16a),_0x37453a+_0x3ff811(0x136),_0x3ff811(0xf6),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0xbadf8a[_0x3ff811(0x107)]+'\x27',_0x1ddd25))));_0xbadf8a[_0x3ff811(0xd9)]&&_0x1ddd25[_0x3ff811(0x12d)]&&!_0x1ddd25[_0x3ff811(0x12d)]['has'](_0xbadf8a[_0x3ff811(0xd9)])&&_0x31fe40[_0x3ff811(0x100)](createIssue('error',_0x37453a+_0x3ff811(0xdd),'INVALID_NEXT_REFERENCE',_0x3ff811(0x17c)+_0xbadf8a[_0x3ff811(0xd9)]+'\x27',_0x1ddd25));if(_0xbadf8a['next']){const _0x13ebe0=_0x36bacd[_0x3ff811(0x14d)](_0xbadf8a[_0x3ff811(0xd9)]);_0x13ebe0?.['type']==='merge'&&_0x31fe40['push'](createIssue(_0x3ff811(0x15f),_0x37453a+_0x3ff811(0xdd),_0x3ff811(0xe2),_0x3ff811(0xf8)+_0xbadf8a['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0xbadf8a[_0x3ff811(0xd9)]+_0x3ff811(0x13e),_0x1ddd25));}}return _0x31fe40;}function validateAbTestStep(_0x68e8a1,_0x4bcb64,_0x229559,_0x276317){const _0xfe0697=a134_0x976d,_0x10c634=[];if(!_0x68e8a1['with']?.[_0xfe0697(0x12f)]||_0x68e8a1[_0xfe0697(0xec)][_0xfe0697(0x12f)][_0xfe0697(0x170)]===0x0)return _0x10c634[_0xfe0697(0x100)](createIssue('error',_0x4bcb64+_0xfe0697(0xf7),_0xfe0697(0x142),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x229559,_0x4bcb64)),_0x10c634;const _0x5bd4fd=_0x68e8a1[_0xfe0697(0xec)][_0xfe0697(0x12f)][_0xfe0697(0xcd)]((_0x310ec1,_0x5556ef)=>_0x310ec1+(_0x5556ef[_0xfe0697(0x12c)]||0x0),0x0);Math[_0xfe0697(0xf4)](_0x5bd4fd-0x64)>0.01&&_0x10c634[_0xfe0697(0x100)](createIssue('error',_0x4bcb64+'.with.variants',_0xfe0697(0xe6),_0xfe0697(0x113)+_0x5bd4fd+'%)',_0x229559));for(let _0x1b435b=0x0;_0x1b435b<_0x68e8a1['with']['variants'][_0xfe0697(0x170)];_0x1b435b++){const _0x4f8dd1=_0x68e8a1[_0xfe0697(0xec)][_0xfe0697(0x12f)][_0x1b435b],_0x4f172c=_0x4bcb64+_0xfe0697(0x144)+_0x1b435b+']';_0x4f8dd1[_0xfe0697(0xd9)]&&_0x229559[_0xfe0697(0x12d)]&&!_0x229559[_0xfe0697(0x12d)]['has'](_0x4f8dd1[_0xfe0697(0xd9)])&&_0x10c634[_0xfe0697(0x100)](createIssue(_0xfe0697(0x16a),_0x4f172c+_0xfe0697(0xdd),_0xfe0697(0xfb),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x4f8dd1[_0xfe0697(0xd9)]+'\x27',_0x229559));if(_0x4f8dd1[_0xfe0697(0xd9)]){const _0x385861=_0x276317[_0xfe0697(0x14d)](_0x4f8dd1['next']);_0x385861?.['type']===_0xfe0697(0x17d)&&_0x10c634['push'](createIssue(_0xfe0697(0x15f),_0x4f172c+_0xfe0697(0xdd),'BRANCH_DIRECTLY_TO_MERGE',_0xfe0697(0xfe)+_0x4f8dd1[_0xfe0697(0x172)]+_0xfe0697(0xfd)+_0x4f8dd1[_0xfe0697(0xd9)]+_0xfe0697(0x13e),_0x229559));}}return _0x10c634;}function validateJumpStep(_0x5cd183,_0xaa5c9d,_0xfe559e){const _0x4ced8f=a134_0x976d,_0x412b76=[];if(!_0x5cd183[_0x4ced8f(0xec)]?.[_0x4ced8f(0xde)])return _0x412b76[_0x4ced8f(0x100)](createIssue('error',_0xaa5c9d+_0x4ced8f(0xed),_0x4ced8f(0xff),_0x4ced8f(0x133),_0xfe559e,_0xaa5c9d)),_0x412b76;return(!_0x5cd183[_0x4ced8f(0xec)][_0x4ced8f(0xde)]['journey']||!_0x5cd183[_0x4ced8f(0xec)][_0x4ced8f(0xde)][_0x4ced8f(0xeb)])&&_0x412b76[_0x4ced8f(0x100)](createIssue(_0x4ced8f(0x16a),_0xaa5c9d+'.with.target',_0x4ced8f(0xff),_0x4ced8f(0x115),_0xfe559e)),_0x412b76;}function buildConvergenceMap(_0x510f54){const _0x27413f=a134_0x976d,_0xc0c49f=new Map();function _0x56e91b(_0x17e6f5,_0x4297ec){const _0x5bb9a2=a134_0x976d,_0x2be969=_0xc0c49f[_0x5bb9a2(0x14d)](_0x17e6f5)||[];_0x2be969[_0x5bb9a2(0x100)](_0x4297ec),_0xc0c49f[_0x5bb9a2(0xd6)](_0x17e6f5,_0x2be969);}for(const _0x59a5a4 of _0x510f54){_0x59a5a4[_0x27413f(0xd9)]&&_0x56e91b(_0x59a5a4[_0x27413f(0xd9)],{'stepName':_0x59a5a4[_0x27413f(0x172)],'description':_0x27413f(0x182)+_0x59a5a4[_0x27413f(0x172)]+'\x27'});if(_0x59a5a4[_0x27413f(0x106)]===_0x27413f(0x13f)&&_0x59a5a4[_0x27413f(0xec)]?.[_0x27413f(0xe1)])for(const _0x6bbb35 of _0x59a5a4['with'][_0x27413f(0xe1)]){_0x6bbb35['next']&&_0x56e91b(_0x6bbb35[_0x27413f(0xd9)],{'stepName':_0x59a5a4[_0x27413f(0x172)],'description':_0x27413f(0x141)+_0x6bbb35[_0x27413f(0x172)]+_0x27413f(0xd3)+_0x59a5a4[_0x27413f(0x172)]+'\x27'});}if(_0x59a5a4[_0x27413f(0x106)]==='ab_test'&&_0x59a5a4[_0x27413f(0xec)]?.['variants'])for(const _0x27c0cc of _0x59a5a4[_0x27413f(0xec)][_0x27413f(0x12f)]){_0x27c0cc[_0x27413f(0xd9)]&&_0x56e91b(_0x27c0cc[_0x27413f(0xd9)],{'stepName':_0x59a5a4[_0x27413f(0x172)],'description':_0x27413f(0x140)+_0x27c0cc['name']+'\x27\x20of\x20\x27'+_0x59a5a4['name']+'\x27'});}_0x59a5a4[_0x27413f(0x106)]===_0x27413f(0x12e)&&_0x59a5a4[_0x27413f(0xec)]?.[_0x27413f(0xe7)]&&(_0x59a5a4[_0x27413f(0xec)]['condition'][_0x27413f(0xd9)]&&_0x56e91b(_0x59a5a4['with'][_0x27413f(0xe7)][_0x27413f(0xd9)],{'stepName':_0x59a5a4['name'],'description':_0x27413f(0xca)+_0x59a5a4[_0x27413f(0x172)]+'\x27'}),_0x59a5a4[_0x27413f(0xec)][_0x27413f(0xe7)]['timeout']?.[_0x27413f(0xd9)]&&_0x56e91b(_0x59a5a4['with'][_0x27413f(0xe7)][_0x27413f(0x108)][_0x27413f(0xd9)],{'stepName':_0x59a5a4['name'],'description':_0x27413f(0x167)+_0x59a5a4['name']+'\x27'}));}return _0xc0c49f;}function validateFlowControl(_0x45d52b,_0x1514c2,_0x7b73da){const _0x4c6022=a134_0x976d,_0x4e7d7c=[],_0x292476=_0x4c6022(0xd5)+_0x1514c2+']',_0x4392a8=_0x45d52b['steps']||[];if(_0x4392a8[_0x4c6022(0x170)]===0x0)return _0x4e7d7c;const _0x1d706a=new Map();for(const _0x411454 of _0x4392a8){_0x411454['name']&&_0x1d706a['set'](_0x411454[_0x4c6022(0x172)],_0x411454);}const _0x29f239=buildConvergenceMap(_0x4392a8),_0x4f9938=_0x4392a8['some'](_0x35be84=>_0x35be84[_0x4c6022(0x106)]===_0x4c6022(0x11c));!_0x4f9938&&_0x4e7d7c['push'](createIssue(_0x4c6022(0x16a),_0x292476+_0x4c6022(0x15b),_0x4c6022(0x179),'Stage\x20\x27'+_0x45d52b[_0x4c6022(0x172)]+_0x4c6022(0xe4),_0x7b73da));for(const [_0x3efc35,_0x53036a]of _0x29f239){const _0x503b06=_0x1d706a[_0x4c6022(0x14d)](_0x3efc35);if(!_0x503b06)continue;if(_0x53036a[_0x4c6022(0x170)]>0x1&&_0x503b06[_0x4c6022(0x106)]!==_0x4c6022(0x17d)){const _0x2d363a=_0x53036a['map'](_0x10f6bf=>_0x10f6bf[_0x4c6022(0x119)])[_0x4c6022(0x152)](',\x20');_0x4e7d7c[_0x4c6022(0x100)](createIssue(_0x4c6022(0x16a),_0x292476+_0x4c6022(0x15b),_0x4c6022(0x162),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x3efc35+_0x4c6022(0x14e)+_0x2d363a+_0x4c6022(0x146),_0x7b73da));}_0x53036a[_0x4c6022(0x170)]===0x1&&_0x503b06['type']===_0x4c6022(0x17d)&&_0x4e7d7c[_0x4c6022(0x100)](createIssue(_0x4c6022(0x15f),_0x292476+'.steps',_0x4c6022(0x122),_0x4c6022(0x14c)+_0x3efc35+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x53036a[0x0][_0x4c6022(0x119)]+_0x4c6022(0x10a),_0x7b73da));}for(const _0x164d19 of _0x4392a8){if(_0x164d19[_0x4c6022(0x106)]===_0x4c6022(0x17d)&&_0x164d19[_0x4c6022(0xd9)]){const _0x2c0fe9=_0x1d706a['get'](_0x164d19['next']);_0x2c0fe9?.[_0x4c6022(0x106)]===_0x4c6022(0x17d)&&_0x4e7d7c[_0x4c6022(0x100)](createIssue(_0x4c6022(0x16a),_0x292476+_0x4c6022(0x15b),_0x4c6022(0xe9),_0x4c6022(0x14c)+_0x164d19['name']+_0x4c6022(0x184)+_0x164d19[_0x4c6022(0xd9)]+_0x4c6022(0x131),_0x7b73da));}}return _0x4e7d7c;}function validateCriteria(_0x4ca2fa,_0x18fc90,_0x42c4af){const _0x125487=a134_0x976d,_0x84b726=[];return _0x4ca2fa['segment']&&(_0x42c4af[_0x125487(0x11d)]?.[_0x125487(0xcf)](_0x4ca2fa[_0x125487(0x107)]),!_0x4ca2fa[_0x125487(0x107)]['startsWith']('ref:')&&(_0x42c4af['embeddedSegments']&&!_0x42c4af[_0x125487(0x139)][_0x125487(0x128)](_0x4ca2fa['segment'])&&_0x84b726[_0x125487(0x100)](createIssue(_0x125487(0x16a),_0x18fc90+_0x125487(0x136),'MISSING_SEGMENT_REFERENCE',_0x125487(0xd4)+_0x4ca2fa['segment']+'\x27',_0x42c4af)))),_0x84b726;}function validateEmbeddedSegment(_0x11d060,_0x48030c,_0x1f8100){const _0x4d9f74=a134_0x976d,_0x562aab=[];return _0x11d060[_0x4d9f74(0x132)]&&_0x562aab[_0x4d9f74(0x100)](...validateRuleDef(_0x11d060['rule'],_0x48030c+_0x4d9f74(0xea),_0x1f8100)),_0x562aab;}function a134_0x2f02(){const _0x528f66=['condition','830068HNlOQz','MERGE_TO_MERGE_CHAIN','.rule','stage','with','.with.target','data','path','\x27\x20has\x20only\x20','Journey\x20can\x20have\x20at\x20most\x20one\x20','.with.condition.next','code','abs','keys','MISSING_SEGMENT_REFERENCE','.with.variants','Decision\x20branch\x20\x27','2218urHQcT','End\x20step\x20\x27','INVALID_NEXT_REFERENCE','goal','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','A/B\x20test\x20variant\x20\x27','INVALID_JUMP_TARGET','push','version','Step\x20references\x20non-existent\x20step\x20\x27','excluded_','versions[','entries','type','segment','timeout','1683kmTbBj',').\x20Merge\x20is\x20unnecessary.','skipSchema','startsWith','values','issues','DUPLICATE_STEP_NAME','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','4304505oCTSid','DUPLICATE_LATEST','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','TOO_MANY_STAGES','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','replace','steps','message','description','state','excluded','end','referencedSegments','769IDRmDo','.with','launched','ab_test','SINGLE_INPUT_MERGE','level','.milestone','Duplicate\x20step\x20name\x20\x27','size','MISSING_MILESTONE','has','every','exit_criteria','.with.branches','percentage','stepNames','wait','variants','segments','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','rule','Jump\x20step\x20requires\x20a\x20target','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','.exit_criteria[','.segment','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','filter','embeddedSegments','9WUgGMu','MISSING_WAIT_PARAMS','\x20(across\x20','MISSING_STAGES','\x27\x20with\x20no\x20action\x20in\x20between','decision_point','variant\x20\x27','branch\x20\x27','MISSING_CONDITIONS','journeys','.with.variants[','.stages',').\x20Use\x20a\x20merge\x20step.','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','endsWith','latest','.type','.entry_criteria','Merge\x20step\x20\x27','get','\x27\x20(from:\x20','Stage\x20\x27','MISSING_NAME','ref:','join','indices','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','31890468WXdagx','sort','\x27\x20has\x20no\x20exit_criteria\x20defined','.steps[','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','safeParse','.steps','journeys,\x20stages,\x20or\x20versions','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','339830NKfTiY','warning','MISSING_ACTIVATION_REF','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','CONVERGENCE_WITHOUT_MERGE','.with.branches[','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.condition','MISSING_ACTIVATION_DEFINITION','timeout\x20of\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','5517134TvnNPs','error','JOURNEY_SCHEMA_ERROR','\x20stages\x20but\x20maximum\x20is\x20','activationKeys','INSUFFICIENT_STEPS','Activation\x20step\x20requires\x20an\x20activation\x20reference','length','.with.activation','name','25616iLgujp','MISSING_EXIT_CRITERIA','jump','trim','milestone','Journey\x20name\x20is\x20required','MISSING_END_STEP','includes','versions','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','merge','source','6JhaCpF','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','step\x20\x27','entry_criteria','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','map','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','condition\x20of\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','reduce','.with.condition.timeout','add','activation','END_STEP_HAS_NEXT_OR_WITH','success','\x27\x20of\x20\x27','Criteria\x20references\x20undefined\x20segment\x20\x27','stages[','set','\x20steps\x20(may\x20be\x20too\x20simple)','splice','next','.with.condition.timeout.next','UNUSED_EMBEDDED_SEGMENT','187GfjELC','.next','target','segments.','stages','branches','BRANCH_DIRECTLY_TO_MERGE','document','\x27\x20has\x20no\x20end\x20step','journey\x20entry','INVALID_AB_TEST_PERCENTAGES'];a134_0x2f02=function(){return _0x528f66;};return a134_0x2f02();}function validateStage(_0x483eea,_0x30777e,_0x58ff4a,_0x5144cc){const _0x3d2dfd=a134_0x976d,_0x591519=[],_0x28adc6=_0x3d2dfd(0xd5)+_0x30777e+']',_0x2ebe62=new Map(),_0x346247=new Map();if(_0x483eea[_0x3d2dfd(0x117)]){for(let _0xf8a15c=0x0;_0xf8a15c<_0x483eea[_0x3d2dfd(0x117)][_0x3d2dfd(0x170)];_0xf8a15c++){const _0x4339cc=_0x483eea['steps'][_0xf8a15c];_0x4339cc[_0x3d2dfd(0x172)]&&_0x2ebe62[_0x3d2dfd(0xd6)](_0x4339cc[_0x3d2dfd(0x172)],_0x4339cc);}for(let _0x43478d=0x0;_0x43478d<_0x483eea[_0x3d2dfd(0x117)][_0x3d2dfd(0x170)];_0x43478d++){const _0x14a8aa=_0x483eea[_0x3d2dfd(0x117)][_0x43478d],_0x470c8c=_0x28adc6+_0x3d2dfd(0x158)+_0x43478d+']';if(_0x14a8aa[_0x3d2dfd(0x172)]){if(_0x346247[_0x3d2dfd(0x128)](_0x14a8aa[_0x3d2dfd(0x172)])){const _0x8a3ac0=_0x346247['get'](_0x14a8aa[_0x3d2dfd(0x172)]);_0x591519[_0x3d2dfd(0x100)](createIssue(_0x3d2dfd(0x16a),_0x470c8c+'.name',_0x3d2dfd(0x10f),_0x3d2dfd(0x125)+_0x14a8aa[_0x3d2dfd(0x172)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x8a3ac0+'])',_0x5144cc));}else _0x346247[_0x3d2dfd(0xd6)](_0x14a8aa[_0x3d2dfd(0x172)],_0x43478d);}_0x591519[_0x3d2dfd(0x100)](...validateStep(_0x14a8aa,_0x470c8c,_0x5144cc,_0x2ebe62));}}_0x483eea['entry_criteria']&&_0x591519[_0x3d2dfd(0x100)](...validateCriteria(_0x483eea[_0x3d2dfd(0x183)],_0x28adc6+_0x3d2dfd(0x14b),_0x5144cc));if(_0x483eea[_0x3d2dfd(0x12a)])for(let _0x3ec5ab=0x0;_0x3ec5ab<_0x483eea[_0x3d2dfd(0x12a)]['length'];_0x3ec5ab++){_0x591519['push'](...validateCriteria(_0x483eea['exit_criteria'][_0x3ec5ab],_0x28adc6+_0x3d2dfd(0x135)+_0x3ec5ab+']',_0x5144cc));}return _0x483eea[_0x3d2dfd(0x177)]&&_0x591519['push'](...validateCriteria(_0x483eea[_0x3d2dfd(0x177)],_0x28adc6+_0x3d2dfd(0x124),_0x5144cc)),_0x591519['push'](...validateStageStructure(_0x483eea,_0x30777e,_0x58ff4a,_0x5144cc)),_0x591519[_0x3d2dfd(0x100)](...validateFlowControl(_0x483eea,_0x30777e,_0x5144cc)),_0x591519;}function validateStagesForVersion(_0x42359d,_0x38bb15,_0x5193c5,_0x213368,_0x12f8c6,_0x4cf6ea,_0x4d6a91){const _0x7c01a8=a134_0x976d;if(_0x42359d[_0x7c01a8(0x170)]===0x0){_0x12f8c6[_0x7c01a8(0x100)]({'level':_0x7c01a8(0x16a),'path':_0x213368+_0x7c01a8(0xe0),'code':_0x7c01a8(0x13d),'message':_0x7c01a8(0x159),'location':getLocationFromPath(_0x5193c5[_0x7c01a8(0xe3)],_0x5193c5[_0x7c01a8(0x17e)],[_0x7c01a8(0xe0)])});return;}const _0x301ad6=new Set();for(const _0xf9d755 of _0x42359d){if(_0xf9d755[_0x7c01a8(0x117)])for(const _0xbab684 of _0xf9d755[_0x7c01a8(0x117)]){_0xbab684['name']&&_0x301ad6[_0x7c01a8(0xcf)](_0xbab684['name']);}}const _0xf7b2f={..._0x5193c5,'stepNames':_0x301ad6},_0x398374=validateVersionStructure(_0x42359d,_0xf7b2f);for(const _0x2e08f7 of _0x398374){const _0x2448f4=_0x213368?{..._0x2e08f7,'path':''+_0x213368+_0x2e08f7['path']}:_0x2e08f7;if(_0x2448f4[_0x7c01a8(0x123)]===_0x7c01a8(0x16a))_0x12f8c6['push'](_0x2448f4);else _0x4cf6ea[_0x7c01a8(0x100)](_0x2448f4);}for(let _0x2fcabe=0x0;_0x2fcabe<_0x42359d[_0x7c01a8(0x170)];_0x2fcabe++){const _0x2cd76f=validateStage(_0x42359d[_0x2fcabe],_0x2fcabe,_0x42359d[_0x7c01a8(0x170)],_0xf7b2f);for(const _0x227b2d of _0x2cd76f){const _0x2c8e57=_0x213368?{..._0x227b2d,'path':''+_0x213368+_0x227b2d['path']}:_0x227b2d;if(_0x2c8e57['level']==='error')_0x12f8c6['push'](_0x2c8e57);else _0x4cf6ea[_0x7c01a8(0x100)](_0x2c8e57);}}if(_0x38bb15[_0x7c01a8(0xfc)]){const _0x26368c=_0x4d6a91?.['goalIsInherited']?_0x7c01a8(0xfc):_0x213368+_0x7c01a8(0xfc),_0x38687d=validateCriteria(_0x38bb15[_0x7c01a8(0xfc)],_0x26368c,_0xf7b2f);for(const _0x22e449 of _0x38687d){if(_0x22e449[_0x7c01a8(0x123)]===_0x7c01a8(0x16a))_0x12f8c6[_0x7c01a8(0x100)](_0x22e449);else _0x4cf6ea[_0x7c01a8(0x100)](_0x22e449);}}}function extractVersionIndex(_0x2cd192){const _0x4e8232=_0x2cd192['match'](/^journeys\[(\d+)\]\./);return _0x4e8232?_0x4e8232[0x1]:undefined;}function deduplicateAcrossVersions(_0xe5a3d6){const _0x121f5e=a134_0x976d,_0x3a2cf4=new Map();for(let _0x4d20df=0x0;_0x4d20df<_0xe5a3d6['length'];_0x4d20df++){const _0x5ba2b3=_0xe5a3d6[_0x4d20df][_0x121f5e(0xf3)]+':'+_0xe5a3d6[_0x4d20df][_0x121f5e(0x118)],_0x50d79f=extractVersionIndex(_0xe5a3d6[_0x4d20df][_0x121f5e(0xef)]),_0x483807=_0x3a2cf4[_0x121f5e(0x14d)](_0x5ba2b3);if(_0x483807){_0x483807[_0x121f5e(0x153)][_0x121f5e(0x100)](_0x4d20df);if(_0x50d79f)_0x483807[_0x121f5e(0x17b)][_0x121f5e(0xcf)](_0x50d79f);}else _0x3a2cf4[_0x121f5e(0xd6)](_0x5ba2b3,{'indices':[_0x4d20df],'versions':new Set(_0x50d79f?[_0x50d79f]:[])});}const _0x350e38=new Set();for(const {indices:_0x7ac2b8,versions:_0xbde8b1}of _0x3a2cf4[_0x121f5e(0x10d)]()){if(_0xbde8b1[_0x121f5e(0x126)]<=0x1)continue;const _0x26d787=_0xe5a3d6[_0x7ac2b8[0x0]];_0x26d787[_0x121f5e(0xef)]=_0x26d787['path'][_0x121f5e(0x116)](/^journeys\[\d+\]\./,''),_0x26d787[_0x121f5e(0x118)]=_0x26d787['message']+_0x121f5e(0x13c)+_0xbde8b1[_0x121f5e(0x126)]+'\x20versions)';for(let _0x66af96=0x1;_0x66af96<_0x7ac2b8[_0x121f5e(0x170)];_0x66af96++){_0x350e38[_0x121f5e(0xcf)](_0x7ac2b8[_0x66af96]);}}const _0x3dc11a=[..._0x350e38][_0x121f5e(0x156)]((_0x384472,_0x22216f)=>_0x22216f-_0x384472);for(const _0x4f5c58 of _0x3dc11a){_0xe5a3d6[_0x121f5e(0xd8)](_0x4f5c58,0x1);}}export function validateJourneyDef(_0xb43b32,_0x39a462={},_0xc175b2={}){const _0x22b386=a134_0x976d;if(_0xc175b2[_0x22b386(0x10b)])return runJourneySemanticChecks(_0xb43b32,_0x39a462);const _0xab518d=JourneyDefSchema[_0x22b386(0x15a)](_0xb43b32);if(_0xab518d[_0x22b386(0xd2)])return runJourneySemanticChecks(_0xab518d[_0x22b386(0xee)],_0x39a462);return zodErrorsToJourneyValidationResult(_0xab518d[_0x22b386(0x16a)],_0x39a462);}function zodErrorsToJourneyValidationResult(_0x279509,_0x291096){const _0x439d42=a134_0x976d,_0x5436b5=flattenZodIssues(_0x279509[_0x439d42(0x10e)]),_0x39781f=_0x5436b5[_0x439d42(0x185)](_0x4147aa=>{const _0xecaa78=_0x439d42,_0x2bd7bf=formatZodPath(_0x4147aa[_0xecaa78(0xef)]),_0x59c817=mapJourneyZodIssueToCode(_0x4147aa,_0x2bd7bf),_0x5d18f5=getLocationFromPath(_0x291096['document'],_0x291096[_0xecaa78(0x17e)],_0x4147aa[_0xecaa78(0xef)]['map'](_0x4d6b8b=>typeof _0x4d6b8b==='symbol'?String(_0x4d6b8b):_0x4d6b8b));return{'level':_0xecaa78(0x16a),'path':_0x2bd7bf,'code':_0x59c817,'message':_0x4147aa[_0xecaa78(0x118)],..._0x5d18f5&&{'location':_0x5d18f5}};});return{'valid':![],'errors':_0x39781f,'warnings':[]};}function mapJourneyZodIssueToCode(_0x150d4e,_0x420566){const _0x497d51=a134_0x976d;if(_0x420566===_0x497d51(0x172))return _0x497d51(0x150);if(_0x420566[_0x497d51(0x148)](_0x497d51(0x14a))&&_0x420566[_0x497d51(0x17a)]('steps'))return _0x497d51(0x16b);if(_0x420566===_0x497d51(0xe0)||_0x420566[_0x497d51(0x148)](_0x497d51(0x145)))return _0x497d51(0x13d);if(_0x420566===''&&_0x150d4e[_0x497d51(0x118)][_0x497d51(0x17a)](_0x497d51(0x15c)))return'MISSING_STAGES';if(_0x420566[_0x497d51(0x17a)](_0x497d51(0xd0)))return'ACTIVATION_SCHEMA_ERROR';return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x1f7924,_0x312d86){const _0x16a602=a134_0x976d,_0x2291b7=[],_0x2ba688=[];(!_0x1f7924['name']||_0x1f7924[_0x16a602(0x172)][_0x16a602(0x176)]()==='')&&_0x2291b7[_0x16a602(0x100)]({'level':_0x16a602(0x16a),'path':'name','code':_0x16a602(0x150),'message':_0x16a602(0x178),'location':getLocationFromPath(_0x312d86[_0x16a602(0xe3)],_0x312d86[_0x16a602(0x17e)],[_0x16a602(0x172)])});const _0x402258=new Set();if(_0x1f7924[_0x16a602(0x130)])for(const _0x5d939d of Object[_0x16a602(0xf5)](_0x1f7924['segments'])){_0x402258[_0x16a602(0xcf)](_0x5d939d);}const _0x5b22d7=new Set();if(_0x1f7924['activations'])for(const _0x4ab3fa of Object[_0x16a602(0xf5)](_0x1f7924['activations'])){_0x5b22d7[_0x16a602(0xcf)](_0x4ab3fa);}const _0x1edb9c=new Set(),_0x591b4f={..._0x312d86,'embeddedSegments':_0x402258,'referencedSegments':_0x1edb9c,'activationKeys':_0x5b22d7[_0x16a602(0x126)]>0x0?_0x5b22d7:undefined};if(_0x1f7924[_0x16a602(0x130)])for(const [_0x1e37a4,_0x2d664b]of Object[_0x16a602(0x105)](_0x1f7924['segments'])){const _0x5885ac=validateEmbeddedSegment(_0x2d664b,_0x16a602(0xdf)+_0x1e37a4,_0x591b4f);for(const _0x2efee1 of _0x5885ac){if(_0x2efee1[_0x16a602(0x123)]===_0x16a602(0x16a))_0x2291b7[_0x16a602(0x100)](_0x2efee1);else _0x2ba688[_0x16a602(0x100)](_0x2efee1);}}const _0x26406b=!!_0x1f7924[_0x16a602(0xfc)],_0x1ccddb=_0x1f7924['journeys']?.[_0x16a602(0x129)](_0x529c1c=>!!_0x529c1c[_0x16a602(0xfc)])??![];!_0x26406b&&!_0x1ccddb&&_0x2ba688['push']({'level':_0x16a602(0x15f),'path':'goal','code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x312d86[_0x16a602(0xe3)],_0x312d86['source'],[_0x16a602(0xfc)])});const _0x5ee7af=_0x1f7924[_0x16a602(0x143)]??_0x1f7924[_0x16a602(0x17b)];if(_0x5ee7af&&_0x5ee7af[_0x16a602(0x138)](_0x48c133=>_0x48c133[_0x16a602(0x149)]===!![])[_0x16a602(0x170)]>0x1){const _0x454d6e=_0x1f7924[_0x16a602(0x143)]?_0x16a602(0x143):_0x16a602(0x17b);_0x2291b7['push']({'level':_0x16a602(0x16a),'path':_0x454d6e,'code':_0x16a602(0x112),'message':_0x16a602(0xf1)+(_0x454d6e===_0x16a602(0x143)?_0x16a602(0xe5):_0x16a602(0x101))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x312d86['document'],_0x312d86['source'],[_0x454d6e])});}if(_0x1f7924[_0x16a602(0x143)]&&_0x1f7924['journeys'][_0x16a602(0x170)]>0x0)for(let _0x48ad49=0x0;_0x48ad49<_0x1f7924['journeys'][_0x16a602(0x170)];_0x48ad49++){const _0x3a2c44=_0x1f7924[_0x16a602(0x143)][_0x48ad49];if(_0x1f7924[_0x16a602(0x143)][_0x16a602(0x170)]>0x1&&_0x3a2c44[_0x16a602(0x11a)]===_0x16a602(0x120))continue;const _0xf451d6=_0x3a2c44[_0x16a602(0xe0)]||[],_0x71e697='journeys['+_0x48ad49+'].',_0x7ddb2e=!!_0x3a2c44[_0x16a602(0xfc)],_0x47200d=_0x7ddb2e?{..._0x1f7924,'goal':_0x3a2c44[_0x16a602(0xfc)]}:_0x1f7924;validateStagesForVersion(_0xf451d6,_0x47200d,_0x591b4f,_0x71e697,_0x2291b7,_0x2ba688,{'goalIsInherited':!_0x7ddb2e});}else{if(_0x1f7924[_0x16a602(0x17b)]&&_0x1f7924[_0x16a602(0x17b)][_0x16a602(0x170)]>0x0)for(let _0x473e29=0x0;_0x473e29<_0x1f7924[_0x16a602(0x17b)][_0x16a602(0x170)];_0x473e29++){const _0x4ac67f=_0x1f7924[_0x16a602(0x17b)][_0x473e29];if(_0x1f7924[_0x16a602(0x17b)]['length']>0x1&&_0x4ac67f['state']===_0x16a602(0x120))continue;const _0x2956a3=_0x4ac67f['stages']||[],_0xc236e0=_0x16a602(0x104)+_0x473e29+'].';validateStagesForVersion(_0x2956a3,_0x1f7924,_0x591b4f,_0xc236e0,_0x2291b7,_0x2ba688);}else{const _0x1afac8=_0x1f7924[_0x16a602(0xe0)]||[];validateStagesForVersion(_0x1afac8,_0x1f7924,_0x591b4f,'',_0x2291b7,_0x2ba688);}}_0x1f7924[_0x16a602(0x143)]&&_0x1f7924[_0x16a602(0x143)][_0x16a602(0x170)]>0x1&&(deduplicateAcrossVersions(_0x2291b7),deduplicateAcrossVersions(_0x2ba688));for(const _0x259ebb of _0x402258){!_0x1edb9c['has'](_0x259ebb)&&!_0x259ebb[_0x16a602(0x10c)](_0x16a602(0x103))&&_0x2ba688[_0x16a602(0x100)]({'level':_0x16a602(0x15f),'path':_0x16a602(0xdf)+_0x259ebb,'code':_0x16a602(0xdb),'message':'Embedded\x20segment\x20\x27'+_0x259ebb+_0x16a602(0x110),'location':getLocationFromPath(_0x312d86[_0x16a602(0xe3)],_0x312d86[_0x16a602(0x17e)],[_0x16a602(0x130),_0x259ebb])});}return{'valid':_0x2291b7['length']===0x0,'errors':_0x2291b7,'warnings':_0x2ba688};}
|