@treasuredata/tdx 0.29.4 → 2026.3.0
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.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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.d.ts.map +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/databases.js.map +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.d.ts +97 -1
- package/dist/commands/engage-command.d.ts.map +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-command.js.map +1 -1
- package/dist/commands/engage-template-pull-command.d.ts +15 -0
- package/dist/commands/engage-template-pull-command.d.ts.map +1 -0
- package/dist/commands/engage-template-pull-command.js +1 -0
- package/dist/commands/engage-template-pull-command.js.map +1 -0
- package/dist/commands/engage-template-push-command.d.ts +16 -0
- package/dist/commands/engage-template-push-command.d.ts.map +1 -0
- package/dist/commands/engage-template-push-command.js +1 -0
- package/dist/commands/engage-template-push-command.js.map +1 -0
- package/dist/commands/engage-template-validate-command.d.ts +19 -0
- package/dist/commands/engage-template-validate-command.d.ts.map +1 -0
- package/dist/commands/engage-template-validate-command.js +1 -0
- package/dist/commands/engage-template-validate-command.js.map +1 -0
- package/dist/commands/job-command.d.ts.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/job-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/query-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/tables.js.map +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.d.ts +8 -5
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/auth.js.map +1 -1
- package/dist/core/command-output.d.ts +6 -0
- package/dist/core/command-output.d.ts.map +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/command-output.js.map +1 -1
- package/dist/core/config.d.ts +38 -6
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +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.d.ts +1 -0
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.d.ts +3 -3
- 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/api.js.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.d.ts +25 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.d.ts +47 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +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/llm-api-client.js.map +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/td-api-client.js.map +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +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.d.ts +73 -0
- package/dist/sdk/engage/template-pull.d.ts.map +1 -0
- package/dist/sdk/engage/template-pull.js +1 -0
- package/dist/sdk/engage/template-pull.js.map +1 -0
- package/dist/sdk/engage/template-push.d.ts +99 -0
- package/dist/sdk/engage/template-push.d.ts.map +1 -0
- package/dist/sdk/engage/template-push.js +1 -0
- package/dist/sdk/engage/template-push.js.map +1 -0
- package/dist/sdk/engage/template-validator.d.ts +18 -0
- package/dist/sdk/engage/template-validator.d.ts.map +1 -0
- package/dist/sdk/engage/template-validator.js +1 -0
- package/dist/sdk/engage/template-validator.js.map +1 -0
- package/dist/sdk/engage/template-yaml.d.ts +69 -0
- package/dist/sdk/engage/template-yaml.d.ts.map +1 -0
- package/dist/sdk/engage/template-yaml.js +1 -0
- package/dist/sdk/engage/template-yaml.js.map +1 -0
- 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.d.ts +33 -0
- package/dist/sdk/engage/types/template-schema.d.ts.map +1 -0
- package/dist/sdk/engage/types/template-schema.js +1 -0
- package/dist/sdk/engage/types/template-schema.js.map +1 -0
- package/dist/sdk/engage.d.ts +96 -4
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +10 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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.d.ts +2 -0
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +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/personalization.js.map +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/realtime.js.map +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/parent-segment-yaml.js.map +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.d.ts +6 -1
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/engage.d.ts +121 -0
- package/dist/sdk/types/engage.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +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.d.ts +1 -0
- package/dist/sdk/util/index.d.ts.map +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/index.js.map +1 -1
- package/dist/sdk/util/paginate.d.ts +18 -0
- package/dist/sdk/util/paginate.d.ts.map +1 -0
- package/dist/sdk/util/paginate.js +1 -0
- package/dist/sdk/util/paginate.js.map +1 -0
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c5fda,_0x5c2073){const _0xec0b2=a127_0x2d32,_0x9801c4=_0x4c5fda();while(!![]){try{const _0x149933=parseInt(_0xec0b2(0xd9))/0x1+-parseInt(_0xec0b2(0xbb))/0x2+parseInt(_0xec0b2(0xd8))/0x3*(parseInt(_0xec0b2(0xc9))/0x4)+-parseInt(_0xec0b2(0xcf))/0x5*(-parseInt(_0xec0b2(0xb0))/0x6)+parseInt(_0xec0b2(0xbe))/0x7+parseInt(_0xec0b2(0xc4))/0x8+parseInt(_0xec0b2(0xc6))/0x9*(-parseInt(_0xec0b2(0xba))/0xa);if(_0x149933===_0x5c2073)break;else _0x9801c4['push'](_0x9801c4['shift']());}catch(_0x1153eb){_0x9801c4['push'](_0x9801c4['shift']());}}}(a127_0x390a,0xdd073));import a127_0x3d0dca from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a127_0x2d32(_0x519919,_0x1a03d6){_0x519919=_0x519919-0xb0;const _0x390a6f=a127_0x390a();let _0x2d32b5=_0x390a6f[_0x519919];return _0x2d32b5;}export function buildSchemaResult(_0x4e053a){const _0x4147ab=a127_0x2d32,_0x5e4fbd=_0x4e053a[_0x4147ab(0xd5)][_0x4147ab(0xb9)](_0x3cc71a=>({'column_name':_0x3cc71a[_0x4147ab(0xb5)],'column_type':_0x3cc71a[_0x4147ab(0xda)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x4e053a,'columns':[{'name':_0x4147ab(0xe1),'type':_0x4147ab(0xdc)},{'name':_0x4147ab(0xd2),'type':_0x4147ab(0xdc)},{'name':_0x4147ab(0xdb),'type':_0x4147ab(0xdc)},{'name':'key','type':_0x4147ab(0xdc)},{'name':_0x4147ab(0xd3),'type':_0x4147ab(0xdc)},{'name':'extra','type':_0x4147ab(0xdc)}],'data':_0x5e4fbd};}export async function executeSchemaQuery(_0x4832d0,_0x402829,_0x35eb64){const _0x22dd35=a127_0x2d32,_0x32f503=_0x4832d0[_0x22dd35(0xb2)]()['replace'](/;+$/,''),_0x107308=_0x22dd35(0xde)+_0x32f503+_0x22dd35(0xb4);_0x35eb64['verbose']&&console[_0x22dd35(0xb8)](_0x22dd35(0xc5)+_0x107308);const _0x5cf972=await withProgressSpinner(_0x22dd35(0xca),async _0x4aed6f=>{const _0x450eb6=_0x22dd35,_0x1a25a5=await _0x402829['query']['execute'](_0x107308,{'catalog':'td','schema':_0x450eb6(0xdf),'onJobId':_0x3f4ab2=>{const _0x4a9d19=_0x450eb6;_0x4aed6f[_0x4a9d19(0xe2)](_0x3f4ab2);}});return _0x1a25a5;},{'verbose':_0x35eb64[_0x22dd35(0xe0)]});return buildSchemaResult(_0x5cf972[_0x22dd35(0xb3)]);}function columnName(_0x48f7dd){const _0x4fd825=a127_0x2d32;return _0x48f7dd[_0x4fd825(0xc0)]||_0x48f7dd['parentColumn']||_0x48f7dd[_0x4fd825(0xb5)];}function formatFieldLine(_0x46e1df,_0x58712c,_0x58ff25){const _0x777b69=a127_0x2d32,_0x59cdaf=_0x46e1df!==_0x58712c?'\x20'+a127_0x3d0dca['dim']('('+_0x58712c+')'):'';return _0x777b69(0xcd)+_0x46e1df+_0x59cdaf+':\x20'+a127_0x3d0dca[_0x777b69(0xd7)](_0x58ff25);}function a127_0x390a(){const _0xc2db1a=['get','groupingName','startsWith','24OtWDPW','entries','trim','data','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','name','tableName','Attributes','error','map','430MzSiDf','2121986fPqbuW','dim','push','7299747BSOvSl','filter','matrixColumnName','Behaviors','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','bold','2890880hkzOtk','Schema\x20query:\x0a','634761ZtLelG','localeCompare','displayName','4NBKCGu','Fetching\x20schema...','Unknown','source','\x20\x20\x20\x20','attribute','1958870hGeyld','fields','behaviorName','column_type','default','set','columns','parentTableName','cyan','2002452qplFXk','1360310KZvGkV','type','null','varchar','matrixTableName','SELECT\x20*\x20FROM\x20(\x0a','information_schema','verbose','column_name','setJobId'];a127_0x390a=function(){return _0xc2db1a;};return a127_0x390a();}function sortByColumnName(_0x33aa84){const _0x4b8ba4=a127_0x2d32;return[..._0x33aa84]['sort']((_0x252e95,_0x39757d)=>columnName(_0x252e95)[_0x4b8ba4(0xc7)](columnName(_0x39757d)));}export function displayFieldsHumanReadable(_0xbd90b1,_0x448476){const _0x2d0087=a127_0x2d32,_0x35863d=_0xbd90b1[_0x2d0087(0xbf)](_0x162a96=>_0x162a96[_0x2d0087(0xcc)]===_0x2d0087(0xce)),_0x3f6306=_0xbd90b1[_0x2d0087(0xbf)](_0x12d934=>_0x12d934[_0x2d0087(0xcc)]==='behavior'),_0x28d238=new Map();for(const _0x5d1ade of _0x35863d){const _0x53f922=_0x5d1ade[_0x2d0087(0xe4)]||_0x5d1ade['parentTableName']||_0x2d0087(0xcb),_0x2d554f=_0x28d238[_0x2d0087(0xe3)](_0x53f922);_0x2d554f?_0x2d554f[_0x2d0087(0xd0)][_0x2d0087(0xbd)](_0x5d1ade):_0x28d238[_0x2d0087(0xd4)](_0x53f922,{'displayName':_0x53f922,'tableName':_0x5d1ade[_0x2d0087(0xd6)],'fields':[_0x5d1ade]});}const _0x2a6a79=new Map();for(const _0x4d85ef of _0x3f6306){const _0x517abe=_0x4d85ef[_0x2d0087(0xd1)]||_0x2d0087(0xcb),_0x2a24a3=_0x2a6a79[_0x2d0087(0xe3)](_0x517abe)||[];_0x2a24a3[_0x2d0087(0xbd)](_0x4d85ef),_0x2a6a79[_0x2d0087(0xd4)](_0x517abe,_0x2a24a3);}console[_0x2d0087(0xb8)]('\x0a'+a127_0x3d0dca[_0x2d0087(0xc3)](_0x448476));if(_0x28d238['size']>0x0){console['error']('\x0a'+a127_0x3d0dca['dim'](_0x2d0087(0xb7)));const _0x8410fa=[..._0x28d238[_0x2d0087(0xb1)]()]['sort']((_0x59ff72,_0x404556)=>_0x59ff72[0x0][_0x2d0087(0xc7)](_0x404556[0x0]));for(const [,_0x3a1009]of _0x8410fa){const _0x103872=_0x3a1009[_0x2d0087(0xb6)]&&_0x3a1009['tableName']!==_0x3a1009[_0x2d0087(0xc8)]?'\x20'+a127_0x3d0dca[_0x2d0087(0xbc)]('('+_0x3a1009[_0x2d0087(0xb6)]+')'):'';console[_0x2d0087(0xb8)]('\x20\x20'+a127_0x3d0dca[_0x2d0087(0xc3)](_0x3a1009[_0x2d0087(0xc8)])+_0x103872);for(const _0x412e31 of sortByColumnName(_0x3a1009[_0x2d0087(0xd0)])){console[_0x2d0087(0xb8)](formatFieldLine(columnName(_0x412e31),_0x412e31[_0x2d0087(0xb5)],_0x412e31['type']));}}}if(_0x2a6a79['size']>0x0){console[_0x2d0087(0xb8)]('\x0a'+a127_0x3d0dca['dim'](_0x2d0087(0xc1)));const _0x4ea62a=[..._0x2a6a79['entries']()]['sort']((_0x1e41c9,_0x48cc43)=>_0x1e41c9[0x0][_0x2d0087(0xc7)](_0x48cc43[0x0]));for(const [_0xb5578f,_0x48c247]of _0x4ea62a){const _0xcc283e=_0x48c247[0x0],_0x41b7af=_0xcc283e?.['matrixTableName'];if(_0x41b7af){const _0xef18e3=_0x41b7af!==_0xb5578f?'\x20'+a127_0x3d0dca[_0x2d0087(0xbc)]('('+_0xb5578f+')'):'';console[_0x2d0087(0xb8)]('\x20\x20'+a127_0x3d0dca[_0x2d0087(0xc3)](_0x41b7af)+_0xef18e3);}else{const _0x329147=_0xcc283e?.[_0x2d0087(0xd6)]||'';console[_0x2d0087(0xb8)]('\x20\x20'+a127_0x3d0dca['bold'](_0xb5578f)+(_0x329147?'\x20'+a127_0x3d0dca[_0x2d0087(0xbc)]('('+_0x329147+')'):''));}for(const _0x136b8b of sortByColumnName(_0x48c247)){const _0x555474=_0x136b8b[_0x2d0087(0xb5)][_0x2d0087(0xe5)](_0xb5578f+'.')?_0x136b8b['name']['slice'](_0xb5578f['length']+0x1):_0x136b8b[_0x2d0087(0xb5)];console['error'](formatFieldLine(columnName(_0x136b8b),_0x555474,_0x136b8b['type']));}}}const _0x543ff7=_0xbd90b1['some'](_0x1dbe0c=>_0x1dbe0c[_0x2d0087(0xc0)]||_0x1dbe0c[_0x2d0087(0xdd)]);_0x543ff7&&(console['error']('\x0a'+a127_0x3d0dca[_0x2d0087(0xbc)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console[_0x2d0087(0xb8)](a127_0x3d0dca['dim'](_0x2d0087(0xc2)))),console['error']('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x547950,_0x28f886){const _0x174330=a128_0xb948,_0x35e576=_0x547950();while(!![]){try{const _0x347800=parseInt(_0x174330(0x8b))/0x1+-parseInt(_0x174330(0x80))/0x2*(parseInt(_0x174330(0x82))/0x3)+-parseInt(_0x174330(0x85))/0x4+parseInt(_0x174330(0x89))/0x5*(parseInt(_0x174330(0x7c))/0x6)+parseInt(_0x174330(0x86))/0x7*(parseInt(_0x174330(0x91))/0x8)+parseInt(_0x174330(0x8f))/0x9*(-parseInt(_0x174330(0x83))/0xa)+parseInt(_0x174330(0x8a))/0xb;if(_0x347800===_0x28f886)break;else _0x35e576['push'](_0x35e576['shift']());}catch(_0x4117bf){_0x35e576['push'](_0x35e576['shift']());}}}(a128_0x30ad,0x9b860));import{readdirSync,statSync}from'fs';import a128_0x49e958 from'path';function a128_0x30ad(){const _0x357e8e=['.yaml','428056VJQays','2058xjDOun','isFile','relative','push','21288JmkHfG','.yml','345pqvSaO','777900KTVGwn','name','3552140TqoUjw','161IPETuw','endsWith','join','1505nFHnhz','16985166whVBeS','882379EIAwHf','map','isDirectory','toLowerCase','117NWjOIv'];a128_0x30ad=function(){return _0x357e8e;};return a128_0x30ad();}export function findYamlFiles(_0x92a020){const _0x310fa7=[];function _0x1e7910(_0x511881){const _0x1d4ac0=a128_0xb948,_0x3f4ebc=readdirSync(_0x511881,{'withFileTypes':!![]});for(const _0x360323 of _0x3f4ebc){const _0x39dc61=a128_0x49e958[_0x1d4ac0(0x88)](_0x511881,_0x360323[_0x1d4ac0(0x84)]);if(_0x360323[_0x1d4ac0(0x8d)]())_0x1e7910(_0x39dc61);else(_0x360323['name'][_0x1d4ac0(0x87)](_0x1d4ac0(0x81))||_0x360323[_0x1d4ac0(0x84)]['endsWith'](_0x1d4ac0(0x90)))&&_0x310fa7[_0x1d4ac0(0x7f)](_0x39dc61);}}return _0x1e7910(_0x92a020),_0x310fa7;}export function discoverYamlFiles(_0x180f49){const _0x5bc626=a128_0xb948,_0x1f5852=findYamlFiles(_0x180f49);return _0x1f5852[_0x5bc626(0x8c)](_0xd89c39=>{const _0x2f1ee0=_0x5bc626,_0x9f57f2=a128_0x49e958[_0x2f1ee0(0x7e)](_0x180f49,_0xd89c39),_0x52b330=a128_0x49e958['dirname'](_0x9f57f2);return{'absolutePath':_0xd89c39,'relativePath':_0x9f57f2,'folderPath':_0x52b330==='.'?'':_0x52b330};});}function a128_0xb948(_0x4eb23c,_0x28457){_0x4eb23c=_0x4eb23c-0x7c;const _0x30ad78=a128_0x30ad();let _0xb948be=_0x30ad78[_0x4eb23c];return _0xb948be;}export function isYamlFile(_0x24eba1){const _0x5e9bc9=a128_0xb948;try{const _0x4431ba=statSync(_0x24eba1);if(!_0x4431ba[_0x5e9bc9(0x7d)]())return![];const _0x52fb7a=a128_0x49e958['extname'](_0x24eba1)[_0x5e9bc9(0x8e)]();return _0x52fb7a===_0x5e9bc9(0x81)||_0x52fb7a==='.yaml';}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a121_0x27f2(){const _0x1c086e=['replace','keys','columns','3972920mSWaHM','segment','1881356BdYukN','yaml','.yaml','1915050zRiuuL','exit_criteria','item','include','has','wait','reentry','decision_point','toLowerCase','journeyBundleName','values','push','journeyStages','notification','merged','startsWith','behavior','stages','isArray','find','connector_config','name','version','attributes','string','bundle_id','get','entry_criteria','trim','activations','482867QQOvJm','67RvNXFe','length','exclude','schedule','slice','type','version_number','some','entries','journeys','steps','journey','activation','1430091hMcfad','versions','with','match','description','milestone','state','stringify','endsWith','branches','conditions','null','segments','102AzgNCJ','rule','object','join','from','sort','nameMapping','20jmrnnI','12802bFSWXO','map','set','6883208YvgCKf','activation_template_id','index','goal','all_columns','connection','condition'];a121_0x27f2=function(){return _0x1c086e;};return a121_0x27f2();}(function(_0xcafc6a,_0x5e417e){const _0x3171eb=a121_0x14f8,_0x560c56=_0xcafc6a();while(!![]){try{const _0x30392f=parseInt(_0x3171eb(0xaa))/0x1*(parseInt(_0x3171eb(0xcc))/0x2)+parseInt(_0x3171eb(0x8b))/0x3+parseInt(_0x3171eb(0x88))/0x4+-parseInt(_0x3171eb(0x86))/0x5+-parseInt(_0x3171eb(0xc4))/0x6*(parseInt(_0x3171eb(0xa9))/0x7)+parseInt(_0x3171eb(0x7c))/0x8+-parseInt(_0x3171eb(0xb7))/0x9*(-parseInt(_0x3171eb(0xcb))/0xa);if(_0x30392f===_0x5e417e)break;else _0x560c56['push'](_0x560c56['shift']());}catch(_0x90675d){_0x560c56['push'](_0x560c56['shift']());}}}(a121_0x27f2,0xb6bce));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x21547e){const _0x5ef89c=a121_0x14f8;return _0x21547e[_0x5ef89c(0x93)]()[_0x5ef89c(0x83)](/\s+/g,'_')[_0x5ef89c(0x83)](/[^a-z0-9_]/g,'')[_0x5ef89c(0x83)](/_+/g,'_')[_0x5ef89c(0x83)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x38dcb0){const _0x21431a=a121_0x14f8,_0x570aaa=_0x38dcb0[_0x21431a(0xba)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x570aaa){const _0x19c524=_0x570aaa[0x1][_0x21431a(0x93)](),_0x3a95c0=_0x570aaa[0x2],_0x5ebfd4=_0x3a95c0[_0x21431a(0x83)](/-/g,'')[_0x21431a(0xae)](0x0,0x4)[_0x21431a(0x93)]();return _0x19c524+'_'+_0x5ebfd4;}const _0x5212fc=_0x38dcb0[_0x21431a(0xba)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5212fc){const _0x53f01a=_0x5212fc[0x1],_0x679489=_0x5212fc[0x2][_0x21431a(0x93)](),_0x3889e6=_0x53f01a[_0x21431a(0x83)](/-/g,'')[_0x21431a(0xae)](0x0,0x4)[_0x21431a(0x93)]();return _0x679489+'_'+_0x3889e6;}return undefined;}function stableStringify(_0x3c889c){const _0x315ab6=a121_0x14f8;if(Array[_0x315ab6(0x9d)](_0x3c889c))return'['+_0x3c889c[_0x315ab6(0xcd)](_0x116525=>stableStringify(_0x116525))[_0x315ab6(0xc7)](',')+']';if(_0x3c889c&&typeof _0x3c889c===_0x315ab6(0xc6)){const _0x371f80=_0x3c889c,_0x5845ed=Object['keys'](_0x371f80)['sort'](),_0x185f9d=_0x5845ed['map'](_0x1276ee=>'\x22'+_0x1276ee+'\x22:'+stableStringify(_0x371f80[_0x1276ee]));return'{'+_0x185f9d['join'](',')+'}';}const _0x55c7fa=JSON[_0x315ab6(0xbe)](_0x3c889c);return _0x55c7fa===undefined?_0x315ab6(0xc2):_0x55c7fa;}export function consolidateActivationsByContent(_0x341ece){const _0x14bceb=a121_0x14f8,_0x1727e1={},_0x2f5488=new Map(),_0x5e3478=new Map();for(const _0x420f34 of _0x341ece){if(!_0x420f34)continue;for(const [_0x164fbd,_0x31954b]of Object[_0x14bceb(0xb2)](_0x420f34)){const _0xf0e68f={'connection':_0x31954b[_0x14bceb(0x81)],..._0x31954b[_0x14bceb(0x80)]!==undefined&&{'all_columns':_0x31954b['all_columns']},..._0x31954b[_0x14bceb(0x85)]!==undefined&&{'columns':_0x31954b[_0x14bceb(0x85)]},..._0x31954b[_0x14bceb(0x9b)]!==undefined&&{'behavior':_0x31954b[_0x14bceb(0x9b)]},..._0x31954b[_0x14bceb(0xad)]!==undefined&&{'schedule':_0x31954b[_0x14bceb(0xad)]},..._0x31954b[_0x14bceb(0x98)]!==undefined&&{'notification':_0x31954b['notification']},..._0x31954b[_0x14bceb(0x9f)]!==undefined&&{'connector_config':_0x31954b['connector_config']},..._0x31954b[_0x14bceb(0x7d)]!==undefined&&{'activation_template_id':_0x31954b['activation_template_id']}},_0x13bc1c=stableStringify(_0xf0e68f),_0x10a771=_0x5e3478[_0x14bceb(0xa5)](_0x13bc1c);_0x10a771?_0x2f5488[_0x14bceb(0x7b)](_0x164fbd,_0x10a771):(_0x1727e1[_0x164fbd]=_0x31954b,_0x2f5488[_0x14bceb(0x7b)](_0x164fbd,_0x164fbd),_0x5e3478[_0x14bceb(0x7b)](_0x13bc1c,_0x164fbd));}}return{'merged':_0x1727e1,'nameMapping':_0x2f5488};}export function updateActivationReferences(_0x963062,_0x2fefbd){const _0x2ecf54=a121_0x14f8;if(!_0x963062)return;for(const _0x59b1f4 of _0x963062){if(!_0x59b1f4[_0x2ecf54(0xb4)])continue;for(const _0x57d443 of _0x59b1f4[_0x2ecf54(0xb4)]){if(_0x57d443[_0x2ecf54(0xaf)]==='activation'&&_0x57d443['with']?.[_0x2ecf54(0xb6)]){const _0x8867a1=_0x2fefbd['get'](_0x57d443[_0x2ecf54(0xb9)][_0x2ecf54(0xb6)]);_0x8867a1&&_0x8867a1!==_0x57d443[_0x2ecf54(0xb9)][_0x2ecf54(0xb6)]&&(_0x57d443[_0x2ecf54(0xb9)][_0x2ecf54(0xb6)]=_0x8867a1);}}}}export function consolidateSegmentsByContent(_0x105ac3,_0x13321e){const _0x1cb06d=a121_0x14f8,_0x4ed0b5={},_0x471ca7=new Map(),_0x1a57af=new Map();for(const _0x4bae35 of _0x105ac3){if(!_0x4bae35)continue;for(const [_0x592121,_0x18a26b]of Object[_0x1cb06d(0xb2)](_0x4bae35)){if(!_0x18a26b[_0x1cb06d(0xc5)]){_0x4ed0b5[_0x592121]=_0x18a26b,_0x471ca7[_0x1cb06d(0x7b)](_0x592121,_0x592121);continue;}const _0x94783f=_0x18a26b[_0x1cb06d(0xbb)]&&_0x18a26b['description'][_0x1cb06d(0xa7)]()?_0x18a26b['description']:undefined,_0x4cfb73=JSON[_0x1cb06d(0xbe)]({'description':_0x94783f,'rule':deepSortObject(_0x18a26b[_0x1cb06d(0xc5)])}),_0x54676a=_0x1a57af[_0x1cb06d(0xa5)](_0x4cfb73);if(_0x54676a){const _0xbb6768={..._0x18a26b[_0x1cb06d(0xbb)]!==undefined&&{'description':_0x18a26b[_0x1cb06d(0xbb)]},'rule':_0x18a26b[_0x1cb06d(0xc5)]?deepSortObject(_0x18a26b[_0x1cb06d(0xc5)]):_0x18a26b[_0x1cb06d(0xc5)]};if(_0x592121<_0x54676a){_0x4ed0b5[_0x592121]=_0xbb6768,delete _0x4ed0b5[_0x54676a];for(const [_0x4abd80,_0x2a4113]of _0x471ca7[_0x1cb06d(0xb2)]()){_0x2a4113===_0x54676a&&_0x471ca7[_0x1cb06d(0x7b)](_0x4abd80,_0x592121);}_0x471ca7[_0x1cb06d(0x7b)](_0x592121,_0x592121),_0x1a57af['set'](_0x4cfb73,_0x592121);}else _0x4ed0b5[_0x54676a]=_0xbb6768,_0x471ca7['set'](_0x592121,_0x54676a);}else{let _0x308de8=_0x592121;if(_0x13321e){const _0x4817b1=_0x13321e[_0x1cb06d(0xa5)](_0x4cfb73);_0x4817b1&&_0x4817b1[_0x1cb06d(0xab)]>0x0&&(_0x308de8=_0x4817b1[_0x1cb06d(0xae)]()[_0x1cb06d(0xc9)]()[0x0]);}const _0x4adbf4={..._0x18a26b[_0x1cb06d(0xbb)]!==undefined&&{'description':_0x18a26b[_0x1cb06d(0xbb)]},'rule':_0x18a26b['rule']?deepSortObject(_0x18a26b[_0x1cb06d(0xc5)]):_0x18a26b[_0x1cb06d(0xc5)]};_0x4ed0b5[_0x308de8]=_0x4adbf4,_0x471ca7['set'](_0x592121,_0x308de8),_0x1a57af[_0x1cb06d(0x7b)](_0x4cfb73,_0x308de8);}}}return{'merged':_0x4ed0b5,'nameMapping':_0x471ca7};}export function updateSegmentReferences(_0x3da555,_0x1437d1){const _0x3f301a=a121_0x14f8;if(!_0x3da555)return;for(const _0xfcec4b of _0x3da555){if(_0xfcec4b[_0x3f301a(0xa6)]?.[_0x3f301a(0x87)]){const _0x5bc74a=_0x1437d1[_0x3f301a(0xa5)](_0xfcec4b['entry_criteria'][_0x3f301a(0x87)]);_0x5bc74a&&(_0xfcec4b[_0x3f301a(0xa6)][_0x3f301a(0x87)]=_0x5bc74a);}if(_0xfcec4b[_0x3f301a(0x8c)])for(const _0x19069e of _0xfcec4b[_0x3f301a(0x8c)]){if(_0x19069e[_0x3f301a(0x87)]){const _0xc4fdcd=_0x1437d1[_0x3f301a(0xa5)](_0x19069e[_0x3f301a(0x87)]);_0xc4fdcd&&(_0x19069e['segment']=_0xc4fdcd);}}if(_0xfcec4b[_0x3f301a(0xbc)]?.[_0x3f301a(0x87)]){const _0x32c67a=_0x1437d1[_0x3f301a(0xa5)](_0xfcec4b[_0x3f301a(0xbc)][_0x3f301a(0x87)]);_0x32c67a&&(_0xfcec4b[_0x3f301a(0xbc)]['segment']=_0x32c67a);}if(_0xfcec4b[_0x3f301a(0xb4)])for(const _0x85c362 of _0xfcec4b[_0x3f301a(0xb4)]){if(_0x85c362[_0x3f301a(0xaf)]===_0x3f301a(0x92)&&_0x85c362[_0x3f301a(0xb9)]?.['branches'])for(const _0x5de9f2 of _0x85c362[_0x3f301a(0xb9)]['branches']){if(_0x5de9f2['segment']){const _0x154031=_0x1437d1[_0x3f301a(0xa5)](_0x5de9f2[_0x3f301a(0x87)]);_0x154031&&(_0x5de9f2['segment']=_0x154031);}}if(_0x85c362[_0x3f301a(0xaf)]===_0x3f301a(0x90)&&_0x85c362[_0x3f301a(0xb9)]?.[_0x3f301a(0x82)]?.['segment']){const _0x4aae31=_0x1437d1[_0x3f301a(0xa5)](_0x85c362['with'][_0x3f301a(0x82)][_0x3f301a(0x87)]);_0x4aae31&&(_0x85c362[_0x3f301a(0xb9)][_0x3f301a(0x82)]['segment']=_0x4aae31);}}}}export function updateSegmentRefsInSegments(_0x3dc7a4,_0x7eca91){const _0x237f5d=a121_0x14f8;for(const _0x3d5da8 of Object[_0x237f5d(0x95)](_0x3dc7a4)){_0x3d5da8['rule']&&updateSegmentRefsInRule(_0x3d5da8['rule'],_0x7eca91);}}function updateSegmentRefsInRule(_0x6176b,_0x43c954){const _0x5556c5=a121_0x14f8;if(_0x6176b===null||typeof _0x6176b!==_0x5556c5(0xc6))return;if(Array[_0x5556c5(0x9d)](_0x6176b)){for(const _0x1ba019 of _0x6176b){updateSegmentRefsInRule(_0x1ba019,_0x43c954);}return;}const _0x531a8d=_0x6176b;if((_0x531a8d[_0x5556c5(0xaf)]===_0x5556c5(0x8e)||_0x531a8d[_0x5556c5(0xaf)]===_0x5556c5(0xac))&&typeof _0x531a8d['segment']===_0x5556c5(0xa3)){const _0xc65859=_0x43c954['get'](_0x531a8d[_0x5556c5(0x87)]);_0xc65859&&(_0x531a8d['segment']=_0xc65859);}if(_0x531a8d[_0x5556c5(0xc1)]&&Array[_0x5556c5(0x9d)](_0x531a8d[_0x5556c5(0xc1)]))for(const _0x3775ed of _0x531a8d[_0x5556c5(0xc1)]){updateSegmentRefsInRule(_0x3775ed,_0x43c954);}}export function buildJourneysArray(_0xae6db4,_0x509055){const _0xf64c80=a121_0x14f8;return _0xae6db4[_0xf64c80(0xcd)](_0x19e484=>{const _0x189aeb=_0xf64c80,_0x9300b8=_0x509055?_0x19e484[_0x189aeb(0x8d)]['id']===_0x509055:_0xae6db4['length']===0x1,_0x391e30=_0x19e484[_0x189aeb(0x89)][_0x189aeb(0xb3)]?.[0x0],_0x155c6d=_0x391e30?.[_0x189aeb(0x7f)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0x7f)],_0x13415c={'version':_0x391e30?.[_0x189aeb(0xa1)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0xa1)]||_0x19e484[_0x189aeb(0x8d)][_0x189aeb(0xa0)],'state':_0x19e484[_0x189aeb(0x8d)][_0x189aeb(0xbd)]==='launched'?'launched':'draft','stages':_0x391e30?.[_0x189aeb(0x9c)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0x9c)]||[],'id':_0x391e30?.['id']||_0x19e484[_0x189aeb(0x89)]['id'],'version_number':_0x391e30?.[_0x189aeb(0xb0)]||_0x19e484[_0x189aeb(0x89)][_0x189aeb(0xb0)]};return _0x155c6d&&(_0x13415c['goal']=_0x155c6d),_0x9300b8&&(_0x13415c['latest']=!![]),_0x13415c;});}export function buildMergedJourneyDef(_0x926c46,_0x424498,_0x5aa899){const _0x4bd793=a121_0x14f8,_0x4ae81f=_0x926c46[0x0][_0x4bd793(0x89)],_0x40a3e9=buildJourneysArray(_0x926c46,_0x5aa899),{merged:_0xc24728,nameMapping:_0x4c73db}=consolidateSegmentsByContent(_0x926c46['map'](_0x2a474f=>_0x2a474f['yaml'][_0x4bd793(0xc3)]),_0x424498);updateSegmentRefsInSegments(_0xc24728,_0x4c73db);const _0xb86ae0=Array[_0x4bd793(0xc8)](_0x4c73db['entries']())[_0x4bd793(0xb1)](([_0x51a18a,_0x52d8cb])=>_0x51a18a!==_0x52d8cb&&_0x51a18a[_0x4bd793(0x9a)](_0x4bd793(0xa6)));let _0x49d9aa=_0xc24728,_0x1f9995=new Map();if(_0xb86ae0){const _0x1b0d3e=consolidateSegmentsByContent([_0xc24728],_0x424498);_0x49d9aa=_0x1b0d3e[_0x4bd793(0x99)],_0x1f9995=_0x1b0d3e[_0x4bd793(0xca)];}const _0x3a4a3a=new Map(_0x4c73db);for(const [_0x4f106b,_0x14115f]of _0x1f9995[_0x4bd793(0xb2)]()){_0x3a4a3a['set'](_0x4f106b,_0x14115f);}for(const [_0x19cd0c,_0x69ef]of _0x3a4a3a[_0x4bd793(0xb2)]()){let _0x29e8f9=_0x69ef,_0x537054=0x0;while(_0x3a4a3a[_0x4bd793(0x8f)](_0x29e8f9)&&_0x3a4a3a[_0x4bd793(0xa5)](_0x29e8f9)!==_0x29e8f9&&_0x537054<MAX_MAPPING_CHAIN_DEPTH){_0x29e8f9=_0x3a4a3a[_0x4bd793(0xa5)](_0x29e8f9),_0x537054++;}_0x29e8f9!==_0x69ef&&_0x3a4a3a[_0x4bd793(0x7b)](_0x19cd0c,_0x29e8f9);}for(const _0x52b13c of _0x40a3e9){updateSegmentReferences(_0x52b13c['stages'],_0x3a4a3a);}const {merged:_0x573287,nameMapping:_0xe62784}=consolidateActivationsByContent(_0x926c46[_0x4bd793(0xcd)](_0x5d02f3=>_0x5d02f3[_0x4bd793(0x89)][_0x4bd793(0xa8)]));for(const _0x1c0e7c of _0x40a3e9){updateActivationReferences(_0x1c0e7c[_0x4bd793(0x9c)],_0xe62784);}let _0x2c1298=_0x4ae81f[_0x4bd793(0x7f)];if(_0x2c1298?.[_0x4bd793(0x87)]){const _0x3e43b2=_0x3a4a3a['get'](_0x2c1298[_0x4bd793(0x87)]);_0x3e43b2&&(_0x2c1298={..._0x2c1298,'segment':_0x3e43b2});}for(const _0x3ba391 of _0x40a3e9){if(_0x3ba391[_0x4bd793(0x7f)]?.[_0x4bd793(0x87)]){const _0x520209=_0x3a4a3a[_0x4bd793(0xa5)](_0x3ba391[_0x4bd793(0x7f)][_0x4bd793(0x87)]);_0x520209&&(_0x3ba391['goal']={..._0x3ba391['goal'],'segment':_0x520209});}}return _0x40a3e9[_0x4bd793(0xb1)](_0x478523=>_0x478523[_0x4bd793(0x7f)])&&(_0x2c1298=undefined),{'type':_0x4bd793(0xb5),'name':_0x4ae81f[_0x4bd793(0xa0)],'description':_0x4ae81f[_0x4bd793(0xbb)],'goal':_0x2c1298,'reentry':_0x4ae81f[_0x4bd793(0x91)],'segments':Object[_0x4bd793(0x84)](_0x49d9aa)[_0x4bd793(0xab)]>0x0?_0x49d9aa:undefined,'activations':Object[_0x4bd793(0x84)](_0x573287)[_0x4bd793(0xab)]>0x0?_0x573287:undefined,'journeys':_0x40a3e9,'bundle_id':_0x4ae81f[_0x4bd793(0xa4)],'bundle_name':_0x4ae81f['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x9d1207,_0x266d36,_0x4ffb81,_0x3742c7){const _0x1dfc75=a121_0x14f8,_0x4f9f0f=_0x9d1207+':'+_0x266d36,_0x42e332=_0x4ffb81['get'](_0x4f9f0f);if(_0x42e332)return _0x42e332;const _0x4e7c76=await _0x3742c7(_0x9d1207),_0x12a9fb=_0x4e7c76[_0x1dfc75(0xa2)][_0x1dfc75(0x94)]||_0x4e7c76[_0x1dfc75(0xa2)][_0x1dfc75(0xa0)],_0x2135dc=_0x4e7c76[_0x1dfc75(0xa2)][_0x1dfc75(0x97)][_0x1dfc75(0x9e)](_0x41d7c9=>String(_0x41d7c9['id'])===String(_0x266d36)),_0x2b9884=_0x2135dc?.[_0x1dfc75(0xa0)]||_0x266d36,_0x72bfe2={'journeyName':_0x12a9fb,'stageName':_0x2b9884};return _0x4ffb81[_0x1dfc75(0x7b)](_0x4f9f0f,_0x72bfe2),_0x72bfe2;}export function formatApiJourneyName(_0x309396,_0x2355ab){return _0x2355ab+'\x20('+_0x309396+')';}export function isLocalJourneyRef(_0x49861c){const _0x15c105=a121_0x14f8;return _0x49861c[_0x15c105(0xbf)]('.yml')||_0x49861c[_0x15c105(0xbf)](_0x15c105(0x8a));}function a121_0x14f8(_0x5bb1f1,_0xdaa29){_0x5bb1f1=_0x5bb1f1-0x7b;const _0x27f2fc=a121_0x27f2();let _0x14f8e6=_0x27f2fc[_0x5bb1f1];return _0x14f8e6;}export function buildLocalRuleToNameMapping(_0x47c058){const _0x2c0da2=a121_0x14f8,_0x199a73=new Map();if(!_0x47c058)return _0x199a73;for(const [_0x796e11,_0x22f929]of Object[_0x2c0da2(0xb2)](_0x47c058)){if(_0x22f929[_0x2c0da2(0xc5)]){const _0x13d287=serializeRule(_0x22f929[_0x2c0da2(0xc5)]),_0x5d417d=_0x199a73['get'](_0x13d287)||[];_0x5d417d[_0x2c0da2(0x96)](_0x796e11),_0x199a73[_0x2c0da2(0x7b)](_0x13d287,_0x5d417d);}}return _0x199a73;}export function buildLocalRuleToNameMappingFromJourney(_0x1ce710){const _0x22fb3c=a121_0x14f8,_0x269d58=_0x1ce710[_0x22fb3c(0xc3)];if(!_0x269d58)return new Map();const _0xa0b95c=collectSegmentUsageCounts(_0x1ce710),_0x2be23c=new Map();let _0x2ac90f=0x0;for(const [_0x152570,_0x208e1d]of Object[_0x22fb3c(0xb2)](_0x269d58)){if(!_0x208e1d[_0x22fb3c(0xc5)]){_0x2ac90f++;continue;}const _0x41dd1c=serializeRule(_0x208e1d['rule']),_0x4c4461=_0x2be23c[_0x22fb3c(0xa5)](_0x41dd1c)||[];_0x4c4461[_0x22fb3c(0x96)]({'name':_0x152570,'index':_0x2ac90f}),_0x2be23c[_0x22fb3c(0x7b)](_0x41dd1c,_0x4c4461),_0x2ac90f++;}const _0x3b3278=new Map();for(const [_0x3270bc,_0x28bdbd]of _0x2be23c){const _0x1ade24=_0x28bdbd[_0x22fb3c(0xae)]()[_0x22fb3c(0xc9)]((_0x7fd4ea,_0x483bde)=>{const _0xdc0e57=_0x22fb3c,_0x4b9369=_0xa0b95c[_0xdc0e57(0xa5)](_0x7fd4ea[_0xdc0e57(0xa0)])||0x0,_0x59b0c9=_0xa0b95c[_0xdc0e57(0xa5)](_0x483bde[_0xdc0e57(0xa0)])||0x0;if(_0x4b9369!==_0x59b0c9)return _0x59b0c9-_0x4b9369;return _0x7fd4ea[_0xdc0e57(0x7e)]-_0x483bde['index'];})[_0x22fb3c(0xcd)](_0x52e228=>_0x52e228[_0x22fb3c(0xa0)]);_0x3b3278[_0x22fb3c(0x7b)](_0x3270bc,_0x1ade24);}return _0x3b3278;}export function collectSegmentUsageCounts(_0x1bde06){const _0x2a05c7=a121_0x14f8,_0x428a39=new Map(),_0x4a2bf0=_0x5036c3=>{const _0x45a6be=a121_0x14f8;if(!_0x5036c3)return;_0x428a39[_0x45a6be(0x7b)](_0x5036c3,(_0x428a39[_0x45a6be(0xa5)](_0x5036c3)||0x0)+0x1);},_0x593d7d=_0x35504b=>{const _0x293f17=a121_0x14f8;for(const _0x138a6d of _0x35504b){_0x4a2bf0(_0x138a6d[_0x293f17(0xa6)]?.[_0x293f17(0x87)]);if(_0x138a6d[_0x293f17(0x8c)])for(const _0x3fdf47 of _0x138a6d[_0x293f17(0x8c)]){_0x4a2bf0(_0x3fdf47[_0x293f17(0x87)]);}_0x4a2bf0(_0x138a6d[_0x293f17(0xbc)]?.[_0x293f17(0x87)]);if(_0x138a6d['steps'])for(const _0x4c6a6c of _0x138a6d[_0x293f17(0xb4)]){if(_0x4c6a6c[_0x293f17(0xaf)]===_0x293f17(0x92))for(const _0x260b61 of _0x4c6a6c[_0x293f17(0xb9)][_0x293f17(0xc0)]){_0x4a2bf0(_0x260b61[_0x293f17(0x87)]);}else _0x4c6a6c[_0x293f17(0xaf)]===_0x293f17(0x90)&&_0x4a2bf0(_0x4c6a6c[_0x293f17(0xb9)][_0x293f17(0x82)]?.[_0x293f17(0x87)]);}}};_0x4a2bf0(_0x1bde06[_0x2a05c7(0x7f)]?.[_0x2a05c7(0x87)]);if(_0x1bde06[_0x2a05c7(0xb3)])for(const _0x1eca36 of _0x1bde06[_0x2a05c7(0xb3)]){_0x4a2bf0(_0x1eca36[_0x2a05c7(0x7f)]?.['segment']),_0x593d7d(_0x1eca36[_0x2a05c7(0x9c)]);}_0x1bde06[_0x2a05c7(0x9c)]&&_0x593d7d(_0x1bde06[_0x2a05c7(0x9c)]);if(_0x1bde06[_0x2a05c7(0xb8)])for(const _0x5d3711 of _0x1bde06['versions']){_0x593d7d(_0x5d3711['stages']);}return _0x428a39;}
|
|
1
|
+
(function(_0x324b3d,_0x7bcaf0){const _0x5c5301=a129_0x4d38,_0x2f27ea=_0x324b3d();while(!![]){try{const _0x377c32=-parseInt(_0x5c5301(0xb4))/0x1*(-parseInt(_0x5c5301(0xc3))/0x2)+-parseInt(_0x5c5301(0xac))/0x3+-parseInt(_0x5c5301(0xaa))/0x4*(-parseInt(_0x5c5301(0x99))/0x5)+parseInt(_0x5c5301(0x97))/0x6+-parseInt(_0x5c5301(0x84))/0x7*(-parseInt(_0x5c5301(0x89))/0x8)+parseInt(_0x5c5301(0x90))/0x9+-parseInt(_0x5c5301(0xbf))/0xa;if(_0x377c32===_0x7bcaf0)break;else _0x2f27ea['push'](_0x2f27ea['shift']());}catch(_0x20dcec){_0x2f27ea['push'](_0x2f27ea['shift']());}}}(a129_0x21db,0x6aefd));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x2ab68f){const _0x519ce6=a129_0x4d38;return _0x2ab68f[_0x519ce6(0x80)]()[_0x519ce6(0x7d)](/\s+/g,'_')[_0x519ce6(0x7d)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')[_0x519ce6(0x7d)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x597735){const _0x293f12=a129_0x4d38,_0x41f748=_0x597735['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x41f748){const _0x173f2d=_0x41f748[0x1][_0x293f12(0x80)](),_0x1dd1a4=_0x41f748[0x2],_0xbab37e=_0x1dd1a4[_0x293f12(0x7d)](/-/g,'')[_0x293f12(0x91)](0x0,0x4)[_0x293f12(0x80)]();return _0x173f2d+'_'+_0xbab37e;}const _0x47c901=_0x597735['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x47c901){const _0xb1c8d9=_0x47c901[0x1],_0x228ba8=_0x47c901[0x2][_0x293f12(0x80)](),_0x5c1870=_0xb1c8d9[_0x293f12(0x7d)](/-/g,'')['slice'](0x0,0x4)[_0x293f12(0x80)]();return _0x228ba8+'_'+_0x5c1870;}return undefined;}function a129_0x4d38(_0x1decbc,_0x4a83a3){_0x1decbc=_0x1decbc-0x79;const _0x21dbd1=a129_0x21db();let _0x4d3820=_0x21dbd1[_0x1decbc];return _0x4d3820;}function stableStringify(_0x451692){const _0x4b1da2=a129_0x4d38;if(Array['isArray'](_0x451692))return'['+_0x451692[_0x4b1da2(0xa9)](_0x299888=>stableStringify(_0x299888))[_0x4b1da2(0x7e)](',')+']';if(_0x451692&&typeof _0x451692===_0x4b1da2(0x98)){const _0x5bdb4b=_0x451692,_0x290ba8=Object['keys'](_0x5bdb4b)[_0x4b1da2(0x96)](),_0x3db996=_0x290ba8['map'](_0x36365b=>'\x22'+_0x36365b+'\x22:'+stableStringify(_0x5bdb4b[_0x36365b]));return'{'+_0x3db996[_0x4b1da2(0x7e)](',')+'}';}const _0x78671d=JSON[_0x4b1da2(0x7f)](_0x451692);return _0x78671d===undefined?'null':_0x78671d;}export function consolidateActivationsByContent(_0x482d37){const _0x329c07=a129_0x4d38,_0xe42fe5={},_0xd50269=new Map(),_0x3746b1=new Map();for(const _0x1cf607 of _0x482d37){if(!_0x1cf607)continue;for(const [_0x455f63,_0x1d5022]of Object[_0x329c07(0xbb)](_0x1cf607)){const _0x270171={'connection':_0x1d5022[_0x329c07(0x85)],..._0x1d5022[_0x329c07(0x88)]!==undefined&&{'all_columns':_0x1d5022[_0x329c07(0x88)]},..._0x1d5022[_0x329c07(0xc7)]!==undefined&&{'columns':_0x1d5022[_0x329c07(0xc7)]},..._0x1d5022[_0x329c07(0xa1)]!==undefined&&{'behavior':_0x1d5022[_0x329c07(0xa1)]},..._0x1d5022[_0x329c07(0xab)]!==undefined&&{'schedule':_0x1d5022[_0x329c07(0xab)]},..._0x1d5022[_0x329c07(0x8c)]!==undefined&&{'notification':_0x1d5022['notification']},..._0x1d5022[_0x329c07(0x8a)]!==undefined&&{'connector_config':_0x1d5022[_0x329c07(0x8a)]},..._0x1d5022[_0x329c07(0xbc)]!==undefined&&{'activation_template_id':_0x1d5022[_0x329c07(0xbc)]}},_0x4f6666=stableStringify(_0x270171),_0x5b40b6=_0x3746b1[_0x329c07(0xbe)](_0x4f6666);_0x5b40b6?_0xd50269[_0x329c07(0x83)](_0x455f63,_0x5b40b6):(_0xe42fe5[_0x455f63]=_0x1d5022,_0xd50269['set'](_0x455f63,_0x455f63),_0x3746b1[_0x329c07(0x83)](_0x4f6666,_0x455f63));}}return{'merged':_0xe42fe5,'nameMapping':_0xd50269};}export function updateActivationReferences(_0x1c549b,_0x50bd17){const _0xe971aa=a129_0x4d38;if(!_0x1c549b)return;for(const _0x5f2f8d of _0x1c549b){if(!_0x5f2f8d[_0xe971aa(0x82)])continue;for(const _0x24dac9 of _0x5f2f8d[_0xe971aa(0x82)]){if(_0x24dac9[_0xe971aa(0x9f)]===_0xe971aa(0x86)&&_0x24dac9[_0xe971aa(0x94)]?.[_0xe971aa(0x86)]){const _0x5ec835=_0x50bd17['get'](_0x24dac9['with'][_0xe971aa(0x86)]);_0x5ec835&&_0x5ec835!==_0x24dac9['with']['activation']&&(_0x24dac9[_0xe971aa(0x94)][_0xe971aa(0x86)]=_0x5ec835);}}}}export function consolidateSegmentsByContent(_0x3c2f19,_0x4cd3f3){const _0x1ef99b=a129_0x4d38,_0x25dda4={},_0xaa1b81=new Map(),_0x4df7c5=new Map();for(const _0xc5606b of _0x3c2f19){if(!_0xc5606b)continue;for(const [_0x3f5c42,_0x38feb1]of Object['entries'](_0xc5606b)){if(!_0x38feb1[_0x1ef99b(0x9d)]){_0x25dda4[_0x3f5c42]=_0x38feb1,_0xaa1b81['set'](_0x3f5c42,_0x3f5c42);continue;}const _0x16c9f6=_0x38feb1[_0x1ef99b(0x9b)]&&_0x38feb1['description'][_0x1ef99b(0x95)]()?_0x38feb1[_0x1ef99b(0x9b)]:undefined,_0x2ee88f=JSON[_0x1ef99b(0x7f)]({'description':_0x16c9f6,'rule':deepSortObject(_0x38feb1[_0x1ef99b(0x9d)])}),_0x4e2e0e=_0x4df7c5['get'](_0x2ee88f);if(_0x4e2e0e){const _0x5e8cdd={..._0x38feb1['description']!==undefined&&{'description':_0x38feb1[_0x1ef99b(0x9b)]},'rule':_0x38feb1[_0x1ef99b(0x9d)]?deepSortObject(_0x38feb1[_0x1ef99b(0x9d)]):_0x38feb1[_0x1ef99b(0x9d)]};if(_0x3f5c42<_0x4e2e0e){_0x25dda4[_0x3f5c42]=_0x5e8cdd,delete _0x25dda4[_0x4e2e0e];for(const [_0x48c940,_0xa33c82]of _0xaa1b81[_0x1ef99b(0xbb)]()){_0xa33c82===_0x4e2e0e&&_0xaa1b81['set'](_0x48c940,_0x3f5c42);}_0xaa1b81['set'](_0x3f5c42,_0x3f5c42),_0x4df7c5[_0x1ef99b(0x83)](_0x2ee88f,_0x3f5c42);}else _0x25dda4[_0x4e2e0e]=_0x5e8cdd,_0xaa1b81[_0x1ef99b(0x83)](_0x3f5c42,_0x4e2e0e);}else{let _0x3da2c3=_0x3f5c42;if(_0x4cd3f3){const _0x17490e=_0x4cd3f3['get'](_0x2ee88f);_0x17490e&&_0x17490e['length']>0x0&&(_0x3da2c3=_0x17490e[_0x1ef99b(0x91)]()[_0x1ef99b(0x96)]()[0x0]);}const _0x359882={..._0x38feb1['description']!==undefined&&{'description':_0x38feb1[_0x1ef99b(0x9b)]},'rule':_0x38feb1['rule']?deepSortObject(_0x38feb1[_0x1ef99b(0x9d)]):_0x38feb1[_0x1ef99b(0x9d)]};_0x25dda4[_0x3da2c3]=_0x359882,_0xaa1b81[_0x1ef99b(0x83)](_0x3f5c42,_0x3da2c3),_0x4df7c5['set'](_0x2ee88f,_0x3da2c3);}}}return{'merged':_0x25dda4,'nameMapping':_0xaa1b81};}export function updateSegmentReferences(_0xf51b33,_0x171cc5){const _0xe313bd=a129_0x4d38;if(!_0xf51b33)return;for(const _0x58d726 of _0xf51b33){if(_0x58d726[_0xe313bd(0x8d)]?.[_0xe313bd(0x9e)]){const _0x33a8bb=_0x171cc5['get'](_0x58d726['entry_criteria']['segment']);_0x33a8bb&&(_0x58d726['entry_criteria'][_0xe313bd(0x9e)]=_0x33a8bb);}if(_0x58d726[_0xe313bd(0xa8)])for(const _0x18d78a of _0x58d726['exit_criteria']){if(_0x18d78a['segment']){const _0x4ec93f=_0x171cc5[_0xe313bd(0xbe)](_0x18d78a['segment']);_0x4ec93f&&(_0x18d78a[_0xe313bd(0x9e)]=_0x4ec93f);}}if(_0x58d726[_0xe313bd(0xba)]?.['segment']){const _0x4ef1a9=_0x171cc5[_0xe313bd(0xbe)](_0x58d726['milestone']['segment']);_0x4ef1a9&&(_0x58d726['milestone'][_0xe313bd(0x9e)]=_0x4ef1a9);}if(_0x58d726[_0xe313bd(0x82)])for(const _0x2165ac of _0x58d726['steps']){if(_0x2165ac['type']===_0xe313bd(0x81)&&_0x2165ac[_0xe313bd(0x94)]?.['branches'])for(const _0x5cbaf9 of _0x2165ac[_0xe313bd(0x94)][_0xe313bd(0xc0)]){if(_0x5cbaf9[_0xe313bd(0x9e)]){const _0x5c0be7=_0x171cc5[_0xe313bd(0xbe)](_0x5cbaf9['segment']);_0x5c0be7&&(_0x5cbaf9[_0xe313bd(0x9e)]=_0x5c0be7);}}if(_0x2165ac['type']===_0xe313bd(0x79)&&_0x2165ac['with']?.[_0xe313bd(0x9a)]?.['segment']){const _0x23db1e=_0x171cc5[_0xe313bd(0xbe)](_0x2165ac[_0xe313bd(0x94)][_0xe313bd(0x9a)][_0xe313bd(0x9e)]);_0x23db1e&&(_0x2165ac[_0xe313bd(0x94)][_0xe313bd(0x9a)][_0xe313bd(0x9e)]=_0x23db1e);}}}}export function updateSegmentRefsInSegments(_0x35d1cb,_0x146a74){const _0x4ddc66=a129_0x4d38;for(const _0x167971 of Object[_0x4ddc66(0xb8)](_0x35d1cb)){_0x167971[_0x4ddc66(0x9d)]&&updateSegmentRefsInRule(_0x167971[_0x4ddc66(0x9d)],_0x146a74);}}function updateSegmentRefsInRule(_0x4f6a3f,_0x27c394){const _0x22de7d=a129_0x4d38;if(_0x4f6a3f===null||typeof _0x4f6a3f!=='object')return;if(Array[_0x22de7d(0x7c)](_0x4f6a3f)){for(const _0x2f132e of _0x4f6a3f){updateSegmentRefsInRule(_0x2f132e,_0x27c394);}return;}const _0x34d89a=_0x4f6a3f;if((_0x34d89a[_0x22de7d(0x9f)]==='include'||_0x34d89a[_0x22de7d(0x9f)]==='exclude')&&typeof _0x34d89a[_0x22de7d(0x9e)]===_0x22de7d(0xb3)){const _0x1152f0=_0x27c394['get'](_0x34d89a[_0x22de7d(0x9e)]);_0x1152f0&&(_0x34d89a[_0x22de7d(0x9e)]=_0x1152f0);}if(_0x34d89a[_0x22de7d(0xa7)]&&Array[_0x22de7d(0x7c)](_0x34d89a[_0x22de7d(0xa7)]))for(const _0x126887 of _0x34d89a['conditions']){updateSegmentRefsInRule(_0x126887,_0x27c394);}}export function buildJourneysArray(_0x30c40e,_0x3b6ae5){const _0x14064a=a129_0x4d38;return _0x30c40e[_0x14064a(0xa9)](_0xde2e97=>{const _0x1510ec=_0x14064a,_0x165196=_0x3b6ae5?_0xde2e97[_0x1510ec(0xc6)]['id']===_0x3b6ae5:_0x30c40e[_0x1510ec(0x92)]===0x1,_0x46f28e=_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0xa0)]?.[0x0],_0x785aca=_0x46f28e?.['goal']||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0x8b)],_0x132dff={'version':_0x46f28e?.[_0x1510ec(0x87)]||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0x87)]||_0xde2e97['item'][_0x1510ec(0xb5)],'state':_0xde2e97[_0x1510ec(0xc6)][_0x1510ec(0xc5)]===_0x1510ec(0x7b)?_0x1510ec(0x7b):_0x1510ec(0xb7),'stages':_0x46f28e?.['stages']||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0xb0)]||[],'id':_0x46f28e?.['id']||_0xde2e97[_0x1510ec(0xa2)]['id'],'version_number':_0x46f28e?.[_0x1510ec(0xbd)]||_0xde2e97[_0x1510ec(0xa2)][_0x1510ec(0xbd)]};return _0x785aca&&(_0x132dff[_0x1510ec(0x8b)]=_0x785aca),_0x165196&&(_0x132dff['latest']=!![]),_0x132dff;});}export function buildMergedJourneyDef(_0x3af249,_0x17606c,_0x700d07){const _0x383e2c=a129_0x4d38,_0x25b8d9=_0x3af249[0x0][_0x383e2c(0xa2)],_0x2f51b5=buildJourneysArray(_0x3af249,_0x700d07),{merged:_0x5776e0,nameMapping:_0x443154}=consolidateSegmentsByContent(_0x3af249[_0x383e2c(0xa9)](_0x3db9ec=>_0x3db9ec[_0x383e2c(0xa2)]['segments']),_0x17606c);updateSegmentRefsInSegments(_0x5776e0,_0x443154);const _0x35086e=Array[_0x383e2c(0x7a)](_0x443154[_0x383e2c(0xbb)]())[_0x383e2c(0x8e)](([_0x24de5a,_0x4c2f21])=>_0x24de5a!==_0x4c2f21&&_0x24de5a[_0x383e2c(0xaf)](_0x383e2c(0x8d)));let _0x27845e=_0x5776e0,_0x4b3eaf=new Map();if(_0x35086e){const _0x41701b=consolidateSegmentsByContent([_0x5776e0],_0x17606c);_0x27845e=_0x41701b[_0x383e2c(0xb6)],_0x4b3eaf=_0x41701b[_0x383e2c(0xb1)];}const _0x3791ae=new Map(_0x443154);for(const [_0x2ea3b6,_0x3ac82a]of _0x4b3eaf[_0x383e2c(0xbb)]()){_0x3791ae[_0x383e2c(0x83)](_0x2ea3b6,_0x3ac82a);}for(const [_0xa2884d,_0x5c51ea]of _0x3791ae[_0x383e2c(0xbb)]()){let _0x3cb645=_0x5c51ea,_0x2ae1c6=0x0;while(_0x3791ae[_0x383e2c(0xc4)](_0x3cb645)&&_0x3791ae['get'](_0x3cb645)!==_0x3cb645&&_0x2ae1c6<MAX_MAPPING_CHAIN_DEPTH){_0x3cb645=_0x3791ae[_0x383e2c(0xbe)](_0x3cb645),_0x2ae1c6++;}_0x3cb645!==_0x5c51ea&&_0x3791ae['set'](_0xa2884d,_0x3cb645);}for(const _0x8dc3a8 of _0x2f51b5){updateSegmentReferences(_0x8dc3a8[_0x383e2c(0xb0)],_0x3791ae);}const {merged:_0x5a0a23,nameMapping:_0x24cb45}=consolidateActivationsByContent(_0x3af249[_0x383e2c(0xa9)](_0xfeee61=>_0xfeee61[_0x383e2c(0xa2)][_0x383e2c(0xb9)]));for(const _0xfdae58 of _0x2f51b5){updateActivationReferences(_0xfdae58['stages'],_0x24cb45);}let _0x4de288=_0x25b8d9[_0x383e2c(0x8b)];if(_0x4de288?.[_0x383e2c(0x9e)]){const _0x38630f=_0x3791ae['get'](_0x4de288['segment']);_0x38630f&&(_0x4de288={..._0x4de288,'segment':_0x38630f});}for(const _0x1e7ee6 of _0x2f51b5){if(_0x1e7ee6[_0x383e2c(0x8b)]?.['segment']){const _0x29faed=_0x3791ae[_0x383e2c(0xbe)](_0x1e7ee6[_0x383e2c(0x8b)][_0x383e2c(0x9e)]);_0x29faed&&(_0x1e7ee6[_0x383e2c(0x8b)]={..._0x1e7ee6[_0x383e2c(0x8b)],'segment':_0x29faed});}}return _0x2f51b5[_0x383e2c(0x8e)](_0x28ce54=>_0x28ce54['goal'])&&(_0x4de288=undefined),{'type':_0x383e2c(0xc2),'name':_0x25b8d9[_0x383e2c(0xb5)],'description':_0x25b8d9[_0x383e2c(0x9b)],'goal':_0x4de288,'reentry':_0x25b8d9['reentry'],'segments':Object[_0x383e2c(0x9c)](_0x27845e)[_0x383e2c(0x92)]>0x0?_0x27845e:undefined,'activations':Object[_0x383e2c(0x9c)](_0x5a0a23)['length']>0x0?_0x5a0a23:undefined,'journeys':_0x2f51b5,'bundle_id':_0x25b8d9[_0x383e2c(0x8f)],'bundle_name':_0x25b8d9[_0x383e2c(0x93)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x98f7aa,_0x364983,_0x587eba,_0x5cce40){const _0x245f1f=a129_0x4d38,_0x50bb4b=_0x98f7aa+':'+_0x364983,_0xf04eaf=_0x587eba[_0x245f1f(0xbe)](_0x50bb4b);if(_0xf04eaf)return _0xf04eaf;const _0xb7bbba=await _0x5cce40(_0x98f7aa),_0x20e011=_0xb7bbba[_0x245f1f(0xc1)]['journeyBundleName']||_0xb7bbba[_0x245f1f(0xc1)][_0x245f1f(0xb5)],_0x5f2203=_0xb7bbba[_0x245f1f(0xc1)][_0x245f1f(0xa6)]['find'](_0x4eecfd=>String(_0x4eecfd['id'])===String(_0x364983)),_0x1a6706=_0x5f2203?.[_0x245f1f(0xb5)]||_0x364983,_0x9b06dd={'journeyName':_0x20e011,'stageName':_0x1a6706};return _0x587eba[_0x245f1f(0x83)](_0x50bb4b,_0x9b06dd),_0x9b06dd;}export function formatApiJourneyName(_0x59e221,_0x189a46){return _0x189a46+'\x20('+_0x59e221+')';}export function isLocalJourneyRef(_0x406f51){const _0x575d68=a129_0x4d38;return _0x406f51[_0x575d68(0xa3)](_0x575d68(0xa4))||_0x406f51[_0x575d68(0xa3)](_0x575d68(0xa5));}export function buildLocalRuleToNameMapping(_0x98e066){const _0x27f1ff=a129_0x4d38,_0x13c49a=new Map();if(!_0x98e066)return _0x13c49a;for(const [_0x193686,_0x2704b5]of Object[_0x27f1ff(0xbb)](_0x98e066)){if(_0x2704b5['rule']){const _0x433d5d=serializeRule(_0x2704b5[_0x27f1ff(0x9d)]),_0x3ad95b=_0x13c49a['get'](_0x433d5d)||[];_0x3ad95b[_0x27f1ff(0xad)](_0x193686),_0x13c49a[_0x27f1ff(0x83)](_0x433d5d,_0x3ad95b);}}return _0x13c49a;}export function buildLocalRuleToNameMappingFromJourney(_0x4a56d2){const _0x1aa856=a129_0x4d38,_0x4d1704=_0x4a56d2[_0x1aa856(0xb2)];if(!_0x4d1704)return new Map();const _0x1ddeac=collectSegmentUsageCounts(_0x4a56d2),_0x514dbe=new Map();let _0xadd54f=0x0;for(const [_0x177288,_0x4d17af]of Object[_0x1aa856(0xbb)](_0x4d1704)){if(!_0x4d17af['rule']){_0xadd54f++;continue;}const _0x1019e0=serializeRule(_0x4d17af[_0x1aa856(0x9d)]),_0x4e07ad=_0x514dbe[_0x1aa856(0xbe)](_0x1019e0)||[];_0x4e07ad[_0x1aa856(0xad)]({'name':_0x177288,'index':_0xadd54f}),_0x514dbe['set'](_0x1019e0,_0x4e07ad),_0xadd54f++;}const _0x361e9c=new Map();for(const [_0x5bc06c,_0x4967f6]of _0x514dbe){const _0x2e1d4d=_0x4967f6['slice']()[_0x1aa856(0x96)]((_0x257ea2,_0x5931f3)=>{const _0xd1c705=_0x1aa856,_0x3740a1=_0x1ddeac[_0xd1c705(0xbe)](_0x257ea2['name'])||0x0,_0x4a36de=_0x1ddeac['get'](_0x5931f3[_0xd1c705(0xb5)])||0x0;if(_0x3740a1!==_0x4a36de)return _0x4a36de-_0x3740a1;return _0x257ea2[_0xd1c705(0xae)]-_0x5931f3['index'];})[_0x1aa856(0xa9)](_0x324451=>_0x324451[_0x1aa856(0xb5)]);_0x361e9c[_0x1aa856(0x83)](_0x5bc06c,_0x2e1d4d);}return _0x361e9c;}export function collectSegmentUsageCounts(_0x2e294f){const _0x214891=a129_0x4d38,_0x532ab9=new Map(),_0x5d8655=_0x559912=>{const _0x1162f3=a129_0x4d38;if(!_0x559912)return;_0x532ab9[_0x1162f3(0x83)](_0x559912,(_0x532ab9[_0x1162f3(0xbe)](_0x559912)||0x0)+0x1);},_0x14e0d7=_0x56bba7=>{const _0x2004ea=a129_0x4d38;for(const _0x1ec6cc of _0x56bba7){_0x5d8655(_0x1ec6cc['entry_criteria']?.[_0x2004ea(0x9e)]);if(_0x1ec6cc['exit_criteria'])for(const _0x4c5a92 of _0x1ec6cc[_0x2004ea(0xa8)]){_0x5d8655(_0x4c5a92['segment']);}_0x5d8655(_0x1ec6cc['milestone']?.[_0x2004ea(0x9e)]);if(_0x1ec6cc['steps'])for(const _0x4f2016 of _0x1ec6cc['steps']){if(_0x4f2016[_0x2004ea(0x9f)]===_0x2004ea(0x81))for(const _0xa6e04d of _0x4f2016['with']['branches']){_0x5d8655(_0xa6e04d['segment']);}else _0x4f2016['type']===_0x2004ea(0x79)&&_0x5d8655(_0x4f2016[_0x2004ea(0x94)][_0x2004ea(0x9a)]?.['segment']);}}};_0x5d8655(_0x2e294f[_0x214891(0x8b)]?.[_0x214891(0x9e)]);if(_0x2e294f['journeys'])for(const _0x5f4f47 of _0x2e294f[_0x214891(0xa0)]){_0x5d8655(_0x5f4f47[_0x214891(0x8b)]?.[_0x214891(0x9e)]),_0x14e0d7(_0x5f4f47['stages']);}_0x2e294f[_0x214891(0xb0)]&&_0x14e0d7(_0x2e294f[_0x214891(0xb0)]);if(_0x2e294f['versions'])for(const _0x3af53c of _0x2e294f['versions']){_0x14e0d7(_0x3af53c[_0x214891(0xb0)]);}return _0x532ab9;}function a129_0x21db(){const _0x527e9e=['slice','length','bundle_name','with','trim','sort','1463940UaoZFD','object','1932220sbknJR','condition','description','keys','rule','segment','type','journeys','behavior','yaml','endsWith','.yml','.yaml','journeyStages','conditions','exit_criteria','map','8nfkddK','schedule','234567fNqDxA','push','index','startsWith','stages','nameMapping','segments','string','8RNdYil','name','merged','draft','values','activations','milestone','entries','activation_template_id','version_number','get','11664560rcnTgC','branches','attributes','journey','125596qEVUwX','has','state','item','columns','wait','from','launched','isArray','replace','join','stringify','toLowerCase','decision_point','steps','set','56lQGjVz','connection','activation','version','all_columns','142952duCVmM','connector_config','goal','notification','entry_criteria','some','bundle_id','183996PZxLbL'];a129_0x21db=function(){return _0x527e9e;};return a129_0x21db();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3cd3cb,_0x9f3d87){const _0x473cea=a122_0x48a1,_0x274d35=_0x3cd3cb();while(!![]){try{const _0x1fa2b8=-parseInt(_0x473cea(0x106))/0x1+-parseInt(_0x473cea(0x11e))/0x2+-parseInt(_0x473cea(0xf1))/0x3*(parseInt(_0x473cea(0x9e))/0x4)+parseInt(_0x473cea(0x13e))/0x5*(parseInt(_0x473cea(0x11f))/0x6)+-parseInt(_0x473cea(0xd9))/0x7+parseInt(_0x473cea(0x148))/0x8+parseInt(_0x473cea(0x146))/0x9*(parseInt(_0x473cea(0xfd))/0xa);if(_0x1fa2b8===_0x9f3d87)break;else _0x274d35['push'](_0x274d35['shift']());}catch(_0x3bd98b){_0x274d35['push'](_0x274d35['shift']());}}}(a122_0x588e,0xec14b));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x4195a9,_0x1dd882,_0x5c4c9e,_0x1957b9,_0x2266f6,_0x3e8af9){const _0x45bf6e=a122_0x48a1;return{'level':_0x4195a9,'path':_0x1dd882,'code':_0x5c4c9e,'message':_0x1957b9,'location':getLocationFromPath(_0x2266f6[_0x45bf6e(0xee)],_0x2266f6[_0x45bf6e(0xb0)],pathToArray(_0x3e8af9??_0x1dd882))};}function validateVersionStructure(_0x2ddd88,_0x17c2a3){const _0x3c765f=a122_0x48a1,_0x32d48b=[];return _0x2ddd88['length']>MAX_STAGES&&_0x32d48b[_0x3c765f(0xb5)](createIssue(_0x3c765f(0x103),'stages',_0x3c765f(0xdf),_0x3c765f(0x143)+_0x2ddd88[_0x3c765f(0xcf)]+_0x3c765f(0x126)+MAX_STAGES,_0x17c2a3)),_0x32d48b;}function validateStageStructure(_0x4b52cf,_0x1c7bc9,_0x5f001a,_0xbccd70){const _0x5703f5=a122_0x48a1,_0x1dcf8f=[],_0x464d09=_0x5703f5(0x108)+_0x1c7bc9+']';_0x1c7bc9===0x0&&!_0x4b52cf['entry_criteria']&&_0x1dcf8f[_0x5703f5(0xb5)](createIssue(_0x5703f5(0x103),_0x464d09+_0x5703f5(0xfc),_0x5703f5(0xbd),_0x5703f5(0xc4)+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0xa5),_0xbccd70,_0x464d09));const _0x5c86a7=_0x1c7bc9===_0x5f001a-0x1;!_0x5c86a7&&!_0x4b52cf[_0x5703f5(0xbb)]&&_0x1dcf8f[_0x5703f5(0xb5)](createIssue(_0x5703f5(0x103),_0x464d09+_0x5703f5(0xd8),_0x5703f5(0x139),_0x5703f5(0xc4)+_0x4b52cf['name']+_0x5703f5(0xaf),_0xbccd70,_0x464d09));(!_0x4b52cf[_0x5703f5(0xf4)]||_0x4b52cf[_0x5703f5(0xf4)][_0x5703f5(0xcf)]===0x0)&&_0x1dcf8f['push'](createIssue('warning',_0x464d09+_0x5703f5(0xd1),_0x5703f5(0xa6),_0x5703f5(0xc4)+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0x125),_0xbccd70,_0x464d09));const _0xf03448=_0x4b52cf[_0x5703f5(0x124)]?.[_0x5703f5(0xcf)]??0x0;if(_0xf03448===0x0)_0x1dcf8f[_0x5703f5(0xb5)](createIssue('error',_0x464d09+'.steps',_0x5703f5(0x147),'Stage\x20\x27'+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0x135),_0xbccd70,_0x464d09+_0x5703f5(0x118)));else{if(_0xf03448===0x1)_0x1dcf8f[_0x5703f5(0xb5)](createIssue(_0x5703f5(0x142),_0x464d09+'.steps',_0x5703f5(0x147),'Stage\x20\x27'+_0x4b52cf[_0x5703f5(0x116)]+_0x5703f5(0x11b),_0xbccd70,_0x464d09+_0x5703f5(0x118)));else _0xf03448<=0x3&&_0x1dcf8f['push'](createIssue('warning',_0x464d09+_0x5703f5(0x118),_0x5703f5(0x145),_0x5703f5(0xc4)+_0x4b52cf['name']+_0x5703f5(0x13d)+_0xf03448+_0x5703f5(0xcd),_0xbccd70,_0x464d09+_0x5703f5(0x118)));}return _0x1dcf8f;}function validateStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d){const _0x47b368=a122_0x48a1,_0x1d5628=[];if(_0x480cd1['type']===_0x47b368(0xc6))return _0x480cd1[_0x47b368(0x14b)]&&_0x1d5628['push'](createIssue(_0x47b368(0x103),_0x72ab33+_0x47b368(0xf2),_0x47b368(0xec),_0x47b368(0xbf)+_0x480cd1[_0x47b368(0x116)]+_0x47b368(0xbe),_0x4d6bc2)),'with'in _0x480cd1&&_0x480cd1['with']!==undefined&&_0x1d5628[_0x47b368(0xb5)](createIssue(_0x47b368(0x103),_0x72ab33+_0x47b368(0x112),'END_STEP_HAS_NEXT_OR_WITH',_0x47b368(0xbf)+_0x480cd1['name']+_0x47b368(0xdd),_0x4d6bc2)),_0x1d5628;_0x480cd1['next']&&(_0x4d6bc2[_0x47b368(0x99)]&&!_0x4d6bc2[_0x47b368(0x99)][_0x47b368(0xca)](_0x480cd1[_0x47b368(0x14b)])&&_0x1d5628[_0x47b368(0xb5)](createIssue('error',_0x72ab33+_0x47b368(0xf2),'INVALID_NEXT_REFERENCE','Step\x20references\x20non-existent\x20step\x20\x27'+_0x480cd1['next']+'\x27',_0x4d6bc2)));switch(_0x480cd1[_0x47b368(0xab)]){case _0x47b368(0x9a):_0x1d5628['push'](...validateWaitStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d));break;case _0x47b368(0x129):_0x1d5628[_0x47b368(0xb5)](...validateActivationStep(_0x480cd1,_0x72ab33,_0x4d6bc2));break;case'decision_point':_0x1d5628[_0x47b368(0xb5)](...validateDecisionPointStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d));break;case _0x47b368(0xda):_0x1d5628['push'](...validateAbTestStep(_0x480cd1,_0x72ab33,_0x4d6bc2,_0x41296d));break;case _0x47b368(0xc1):_0x1d5628[_0x47b368(0xb5)](...validateJumpStep(_0x480cd1,_0x72ab33,_0x4d6bc2));break;}return _0x1d5628;}function validateWaitStep(_0xa46c6e,_0x47a8ab,_0x4f58ef,_0x2934d7){const _0x30f3ae=a122_0x48a1,_0x22e5b8=[];if(!_0xa46c6e['with'])return _0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+_0x30f3ae(0x112),_0x30f3ae(0xa3),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x4f58ef,_0x47a8ab)),_0x22e5b8;if(_0xa46c6e[_0x30f3ae(0x131)]['condition']){const _0x275893=_0xa46c6e[_0x30f3ae(0x131)][_0x30f3ae(0x9d)];if(_0x275893['segment']){_0x4f58ef[_0x30f3ae(0xb9)]?.[_0x30f3ae(0xe0)](_0x275893[_0x30f3ae(0x14d)]);!_0x275893[_0x30f3ae(0x14d)]['startsWith'](_0x30f3ae(0x110))&&(_0x4f58ef[_0x30f3ae(0xb8)]&&!_0x4f58ef[_0x30f3ae(0xb8)][_0x30f3ae(0xca)](_0x275893[_0x30f3ae(0x14d)])&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+'.with.condition.segment',_0x30f3ae(0x130),_0x30f3ae(0xfe)+_0x275893[_0x30f3ae(0x14d)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x4f58ef)));_0x275893[_0x30f3ae(0x14b)]&&_0x4f58ef['stepNames']&&!_0x4f58ef[_0x30f3ae(0x99)]['has'](_0x275893['next'])&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+_0x30f3ae(0xc9),'INVALID_NEXT_REFERENCE',_0x30f3ae(0x10c)+_0x275893[_0x30f3ae(0x14b)]+'\x27',_0x4f58ef));_0x275893[_0x30f3ae(0xbc)]?.['next']&&_0x4f58ef[_0x30f3ae(0x99)]&&!_0x4f58ef[_0x30f3ae(0x99)][_0x30f3ae(0xca)](_0x275893[_0x30f3ae(0xbc)][_0x30f3ae(0x14b)])&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x103),_0x47a8ab+_0x30f3ae(0x138),_0x30f3ae(0x10f),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x275893[_0x30f3ae(0xbc)]['next']+'\x27',_0x4f58ef));const _0x4658a6=_0x275893[_0x30f3ae(0x14b)]||_0xa46c6e[_0x30f3ae(0x14b)],_0x3c291c=_0x275893[_0x30f3ae(0xbc)]?.[_0x30f3ae(0x14b)]||_0xa46c6e[_0x30f3ae(0x14b)];if(_0x4658a6){const _0x24b566=_0x2934d7[_0x30f3ae(0x127)](_0x4658a6);_0x24b566?.['type']===_0x30f3ae(0xdb)&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x142),_0x47a8ab+_0x30f3ae(0xc9),_0x30f3ae(0x12f),_0x30f3ae(0x9f)+_0x4658a6+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x4f58ef,_0x47a8ab+_0x30f3ae(0x11a)));}if(_0x3c291c){const _0x3fe5a5=_0x2934d7['get'](_0x3c291c);_0x3fe5a5?.['type']==='merge'&&_0x22e5b8[_0x30f3ae(0xb5)](createIssue(_0x30f3ae(0x142),_0x47a8ab+_0x30f3ae(0x138),'BRANCH_DIRECTLY_TO_MERGE',_0x30f3ae(0xce)+_0x3c291c+_0x30f3ae(0x133),_0x4f58ef,_0x47a8ab+_0x30f3ae(0xd0)));}}}return _0x22e5b8;}function validateActivationStep(_0x3ba7f6,_0x21b7ee,_0x60315a){const _0x39b4f8=a122_0x48a1,_0x3d8852=[];if(!_0x3ba7f6[_0x39b4f8(0x131)]?.[_0x39b4f8(0x129)])return _0x3d8852['push'](createIssue(_0x39b4f8(0x103),_0x21b7ee+_0x39b4f8(0x137),_0x39b4f8(0xef),_0x39b4f8(0x144),_0x60315a,_0x21b7ee)),_0x3d8852;const _0x27f77d=_0x3ba7f6[_0x39b4f8(0x131)][_0x39b4f8(0x129)];return _0x60315a[_0x39b4f8(0xd3)]&&!_0x27f77d[_0x39b4f8(0x12a)](_0x39b4f8(0x110))&&(!_0x60315a[_0x39b4f8(0xd3)][_0x39b4f8(0xca)](_0x27f77d)&&_0x3d8852[_0x39b4f8(0xb5)](createIssue(_0x39b4f8(0x103),_0x21b7ee+_0x39b4f8(0x137),_0x39b4f8(0x10d),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x27f77d+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x60315a))),_0x3d8852;}function validateDecisionPointStep(_0x4f0ae2,_0x4135bf,_0x376799,_0x27de2c){const _0x4ca11e=a122_0x48a1,_0x1ee8f4=[];if(!_0x4f0ae2['with']?.[_0x4ca11e(0xd2)]||_0x4f0ae2[_0x4ca11e(0x131)]['branches'][_0x4ca11e(0xcf)]===0x0)return _0x1ee8f4[_0x4ca11e(0xb5)](createIssue('error',_0x4135bf+_0x4ca11e(0x100),_0x4ca11e(0xad),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x376799,_0x4135bf)),_0x1ee8f4;for(let _0x323ade=0x0;_0x323ade<_0x4f0ae2[_0x4ca11e(0x131)]['branches'][_0x4ca11e(0xcf)];_0x323ade++){const _0x4cdde8=_0x4f0ae2[_0x4ca11e(0x131)]['branches'][_0x323ade],_0x4e7370=_0x4135bf+_0x4ca11e(0xe7)+_0x323ade+']';_0x4cdde8['segment']&&!_0x4cdde8[_0x4ca11e(0xc2)]&&(_0x376799[_0x4ca11e(0xb9)]?.['add'](_0x4cdde8[_0x4ca11e(0x14d)]),!_0x4cdde8['segment']['startsWith'](_0x4ca11e(0x110))&&(_0x376799[_0x4ca11e(0xb8)]&&!_0x376799['embeddedSegments']['has'](_0x4cdde8[_0x4ca11e(0x14d)])&&_0x1ee8f4[_0x4ca11e(0xb5)](createIssue(_0x4ca11e(0x103),_0x4e7370+_0x4ca11e(0xe9),_0x4ca11e(0x130),_0x4ca11e(0xb2)+_0x4cdde8[_0x4ca11e(0x14d)]+'\x27',_0x376799))));_0x4cdde8[_0x4ca11e(0x14b)]&&_0x376799['stepNames']&&!_0x376799['stepNames'][_0x4ca11e(0xca)](_0x4cdde8[_0x4ca11e(0x14b)])&&_0x1ee8f4[_0x4ca11e(0xb5)](createIssue(_0x4ca11e(0x103),_0x4e7370+_0x4ca11e(0xf2),_0x4ca11e(0x10f),'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x4cdde8['next']+'\x27',_0x376799));if(_0x4cdde8[_0x4ca11e(0x14b)]){const _0x52151b=_0x27de2c['get'](_0x4cdde8[_0x4ca11e(0x14b)]);_0x52151b?.['type']===_0x4ca11e(0xdb)&&_0x1ee8f4[_0x4ca11e(0xb5)](createIssue(_0x4ca11e(0x142),_0x4e7370+_0x4ca11e(0xf2),'BRANCH_DIRECTLY_TO_MERGE',_0x4ca11e(0xa2)+_0x4cdde8[_0x4ca11e(0x116)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4cdde8['next']+_0x4ca11e(0xa4),_0x376799));}}return _0x1ee8f4;}function validateAbTestStep(_0x2478c4,_0x181de6,_0x408319,_0x274689){const _0x2e01e4=a122_0x48a1,_0x5b2b1d=[];if(!_0x2478c4[_0x2e01e4(0x131)]?.['variants']||_0x2478c4[_0x2e01e4(0x131)][_0x2e01e4(0xc3)][_0x2e01e4(0xcf)]===0x0)return _0x5b2b1d[_0x2e01e4(0xb5)](createIssue(_0x2e01e4(0x103),_0x181de6+_0x2e01e4(0xf6),'MISSING_CONDITIONS',_0x2e01e4(0xb7),_0x408319,_0x181de6)),_0x5b2b1d;const _0x59a0ec=_0x2478c4['with'][_0x2e01e4(0xc3)][_0x2e01e4(0x12b)]((_0x28aa8f,_0x2951e3)=>_0x28aa8f+(_0x2951e3['percentage']||0x0),0x0);Math['abs'](_0x59a0ec-0x64)>0.01&&_0x5b2b1d[_0x2e01e4(0xb5)](createIssue(_0x2e01e4(0x103),_0x181de6+_0x2e01e4(0xf6),_0x2e01e4(0xe5),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x59a0ec+'%)',_0x408319));for(let _0x435368=0x0;_0x435368<_0x2478c4[_0x2e01e4(0x131)][_0x2e01e4(0xc3)][_0x2e01e4(0xcf)];_0x435368++){const _0x229b72=_0x2478c4[_0x2e01e4(0x131)][_0x2e01e4(0xc3)][_0x435368],_0x5cec8d=_0x181de6+_0x2e01e4(0x114)+_0x435368+']';_0x229b72[_0x2e01e4(0x14b)]&&_0x408319[_0x2e01e4(0x99)]&&!_0x408319[_0x2e01e4(0x99)][_0x2e01e4(0xca)](_0x229b72['next'])&&_0x5b2b1d[_0x2e01e4(0xb5)](createIssue('error',_0x5cec8d+_0x2e01e4(0xf2),_0x2e01e4(0x10f),_0x2e01e4(0xac)+_0x229b72[_0x2e01e4(0x14b)]+'\x27',_0x408319));if(_0x229b72[_0x2e01e4(0x14b)]){const _0x578f03=_0x274689[_0x2e01e4(0x127)](_0x229b72['next']);_0x578f03?.['type']===_0x2e01e4(0xdb)&&_0x5b2b1d['push'](createIssue(_0x2e01e4(0x142),_0x5cec8d+_0x2e01e4(0xf2),_0x2e01e4(0x12f),_0x2e01e4(0x13a)+_0x229b72[_0x2e01e4(0x116)]+_0x2e01e4(0x107)+_0x229b72['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x408319));}}return _0x5b2b1d;}function validateJumpStep(_0x56a801,_0x547699,_0x40b1ca){const _0x4f960c=a122_0x48a1,_0x2b7e51=[];if(!_0x56a801[_0x4f960c(0x131)]?.[_0x4f960c(0xe2)])return _0x2b7e51[_0x4f960c(0xb5)](createIssue(_0x4f960c(0x103),_0x547699+_0x4f960c(0x109),_0x4f960c(0xed),'Jump\x20step\x20requires\x20a\x20target',_0x40b1ca,_0x547699)),_0x2b7e51;return(!_0x56a801[_0x4f960c(0x131)][_0x4f960c(0xe2)]['journey']||!_0x56a801[_0x4f960c(0x131)]['target'][_0x4f960c(0x140)])&&_0x2b7e51[_0x4f960c(0xb5)](createIssue(_0x4f960c(0x103),_0x547699+_0x4f960c(0x109),_0x4f960c(0xed),_0x4f960c(0x13f),_0x40b1ca)),_0x2b7e51;}function a122_0x48a1(_0x3ec556,_0x73767a){_0x3ec556=_0x3ec556-0x97;const _0x588e7b=a122_0x588e();let _0x48a1ee=_0x588e7b[_0x3ec556];return _0x48a1ee;}function buildConvergenceMap(_0x26c39f){const _0x25135b=a122_0x48a1,_0x44df3e=new Map();function _0x4f2043(_0x594012,_0x2c06ed){const _0xa4775b=a122_0x48a1,_0x5bcd51=_0x44df3e[_0xa4775b(0x127)](_0x594012)||[];_0x5bcd51['push'](_0x2c06ed),_0x44df3e[_0xa4775b(0x149)](_0x594012,_0x5bcd51);}for(const _0x12e585 of _0x26c39f){_0x12e585['next']&&_0x4f2043(_0x12e585[_0x25135b(0x14b)],{'stepName':_0x12e585['name'],'description':'step\x20\x27'+_0x12e585[_0x25135b(0x116)]+'\x27'});if(_0x12e585[_0x25135b(0xab)]==='decision_point'&&_0x12e585[_0x25135b(0x131)]?.[_0x25135b(0xd2)])for(const _0x469acb of _0x12e585['with'][_0x25135b(0xd2)]){_0x469acb[_0x25135b(0x14b)]&&_0x4f2043(_0x469acb['next'],{'stepName':_0x12e585['name'],'description':'branch\x20\x27'+_0x469acb[_0x25135b(0x116)]+_0x25135b(0x117)+_0x12e585[_0x25135b(0x116)]+'\x27'});}if(_0x12e585['type']===_0x25135b(0xda)&&_0x12e585[_0x25135b(0x131)]?.[_0x25135b(0xc3)])for(const _0x1aac0f of _0x12e585[_0x25135b(0x131)]['variants']){_0x1aac0f['next']&&_0x4f2043(_0x1aac0f[_0x25135b(0x14b)],{'stepName':_0x12e585[_0x25135b(0x116)],'description':_0x25135b(0x102)+_0x1aac0f[_0x25135b(0x116)]+_0x25135b(0x117)+_0x12e585['name']+'\x27'});}_0x12e585[_0x25135b(0xab)]===_0x25135b(0x9a)&&_0x12e585['with']?.[_0x25135b(0x9d)]&&(_0x12e585[_0x25135b(0x131)][_0x25135b(0x9d)]['next']&&_0x4f2043(_0x12e585[_0x25135b(0x131)]['condition'][_0x25135b(0x14b)],{'stepName':_0x12e585[_0x25135b(0x116)],'description':_0x25135b(0xc0)+_0x12e585[_0x25135b(0x116)]+'\x27'}),_0x12e585['with']['condition'][_0x25135b(0xbc)]?.[_0x25135b(0x14b)]&&_0x4f2043(_0x12e585[_0x25135b(0x131)][_0x25135b(0x9d)][_0x25135b(0xbc)][_0x25135b(0x14b)],{'stepName':_0x12e585['name'],'description':_0x25135b(0x141)+_0x12e585[_0x25135b(0x116)]+'\x27'}));}return _0x44df3e;}function validateFlowControl(_0x16b4c4,_0x50b0ca,_0x598c77){const _0x5cbcdd=a122_0x48a1,_0x2d060a=[],_0xc57f39=_0x5cbcdd(0x108)+_0x50b0ca+']',_0x20ffea=_0x16b4c4[_0x5cbcdd(0x124)]||[];if(_0x20ffea[_0x5cbcdd(0xcf)]===0x0)return _0x2d060a;const _0x16f24f=new Map();for(const _0x86f0e0 of _0x20ffea){_0x86f0e0[_0x5cbcdd(0x116)]&&_0x16f24f[_0x5cbcdd(0x149)](_0x86f0e0[_0x5cbcdd(0x116)],_0x86f0e0);}const _0x42cefc=buildConvergenceMap(_0x20ffea),_0x1a4791=_0x20ffea[_0x5cbcdd(0x120)](_0x272194=>_0x272194[_0x5cbcdd(0xab)]===_0x5cbcdd(0xc6));!_0x1a4791&&_0x2d060a[_0x5cbcdd(0xb5)](createIssue(_0x5cbcdd(0x103),_0xc57f39+_0x5cbcdd(0x118),_0x5cbcdd(0xb4),_0x5cbcdd(0xc4)+_0x16b4c4[_0x5cbcdd(0x116)]+'\x27\x20has\x20no\x20end\x20step',_0x598c77));for(const [_0x371802,_0x361284]of _0x42cefc){const _0x5386aa=_0x16f24f[_0x5cbcdd(0x127)](_0x371802);if(!_0x5386aa)continue;if(_0x361284['length']>0x1&&_0x5386aa[_0x5cbcdd(0xab)]!==_0x5cbcdd(0xdb)){const _0x133867=_0x361284[_0x5cbcdd(0xc7)](_0x53785d=>_0x53785d[_0x5cbcdd(0x132)])[_0x5cbcdd(0x134)](',\x20');_0x2d060a[_0x5cbcdd(0xb5)](createIssue('error',_0xc57f39+_0x5cbcdd(0x118),_0x5cbcdd(0xeb),_0x5cbcdd(0x14a)+_0x371802+_0x5cbcdd(0xb1)+_0x133867+').\x20Use\x20a\x20merge\x20step.',_0x598c77));}_0x361284[_0x5cbcdd(0xcf)]===0x1&&_0x5386aa[_0x5cbcdd(0xab)]===_0x5cbcdd(0xdb)&&_0x2d060a[_0x5cbcdd(0xb5)](createIssue(_0x5cbcdd(0x142),_0xc57f39+_0x5cbcdd(0x118),_0x5cbcdd(0x122),_0x5cbcdd(0xa7)+_0x371802+_0x5cbcdd(0xe1)+_0x361284[0x0][_0x5cbcdd(0x132)]+_0x5cbcdd(0xf0),_0x598c77));}for(const _0xf5f647 of _0x20ffea){if(_0xf5f647['type']==='merge'&&_0xf5f647['next']){const _0x303949=_0x16f24f[_0x5cbcdd(0x127)](_0xf5f647[_0x5cbcdd(0x14b)]);_0x303949?.[_0x5cbcdd(0xab)]==='merge'&&_0x2d060a['push'](createIssue(_0x5cbcdd(0x103),_0xc57f39+_0x5cbcdd(0x118),'MERGE_TO_MERGE_CHAIN',_0x5cbcdd(0xa7)+_0xf5f647[_0x5cbcdd(0x116)]+_0x5cbcdd(0x128)+_0xf5f647['next']+_0x5cbcdd(0xba),_0x598c77));}}return _0x2d060a;}function validateCriteria(_0xa7e614,_0x4f8b14,_0x58acb3){const _0x1ec799=a122_0x48a1,_0x3568b3=[];return _0xa7e614[_0x1ec799(0x14d)]&&(_0x58acb3['referencedSegments']?.['add'](_0xa7e614['segment']),!_0xa7e614[_0x1ec799(0x14d)]['startsWith']('ref:')&&(_0x58acb3[_0x1ec799(0xb8)]&&!_0x58acb3[_0x1ec799(0xb8)][_0x1ec799(0xca)](_0xa7e614['segment'])&&_0x3568b3[_0x1ec799(0xb5)](createIssue(_0x1ec799(0x103),_0x4f8b14+_0x1ec799(0xe9),_0x1ec799(0x130),_0x1ec799(0x101)+_0xa7e614[_0x1ec799(0x14d)]+'\x27',_0x58acb3)))),_0x3568b3;}function validateEmbeddedSegment(_0x19ac1c,_0x22d54c,_0x8ccdd3){const _0x16883b=a122_0x48a1,_0xc3dd8a=[];return _0x19ac1c[_0x16883b(0xe8)]&&_0xc3dd8a[_0x16883b(0xb5)](...validateRuleDef(_0x19ac1c[_0x16883b(0xe8)],_0x22d54c+_0x16883b(0x9b),_0x8ccdd3)),_0xc3dd8a;}function validateStage(_0x4355b0,_0x413224,_0x509c02,_0x41d789){const _0x21c688=a122_0x48a1,_0x189813=[],_0x5a9009=_0x21c688(0x108)+_0x413224+']',_0x58266f=new Map(),_0x3d6adb=new Map();if(_0x4355b0[_0x21c688(0x124)]){for(let _0x3a5b91=0x0;_0x3a5b91<_0x4355b0[_0x21c688(0x124)][_0x21c688(0xcf)];_0x3a5b91++){const _0x45d3b9=_0x4355b0['steps'][_0x3a5b91];_0x45d3b9[_0x21c688(0x116)]&&_0x58266f[_0x21c688(0x149)](_0x45d3b9[_0x21c688(0x116)],_0x45d3b9);}for(let _0x29c944=0x0;_0x29c944<_0x4355b0[_0x21c688(0x124)][_0x21c688(0xcf)];_0x29c944++){const _0x1bbbef=_0x4355b0[_0x21c688(0x124)][_0x29c944],_0x1f6869=_0x5a9009+_0x21c688(0xd5)+_0x29c944+']';if(_0x1bbbef[_0x21c688(0x116)]){if(_0x3d6adb['has'](_0x1bbbef['name'])){const _0x2a3f12=_0x3d6adb[_0x21c688(0x127)](_0x1bbbef[_0x21c688(0x116)]);_0x189813[_0x21c688(0xb5)](createIssue(_0x21c688(0x103),_0x1f6869+_0x21c688(0xe3),'DUPLICATE_STEP_NAME','Duplicate\x20step\x20name\x20\x27'+_0x1bbbef[_0x21c688(0x116)]+_0x21c688(0x11c)+_0x2a3f12+'])',_0x41d789));}else _0x3d6adb['set'](_0x1bbbef[_0x21c688(0x116)],_0x29c944);}_0x189813['push'](...validateStep(_0x1bbbef,_0x1f6869,_0x41d789,_0x58266f));}}_0x4355b0[_0x21c688(0x111)]&&_0x189813['push'](...validateCriteria(_0x4355b0['entry_criteria'],_0x5a9009+_0x21c688(0xfc),_0x41d789));if(_0x4355b0[_0x21c688(0xf4)])for(let _0x4ade01=0x0;_0x4ade01<_0x4355b0[_0x21c688(0xf4)][_0x21c688(0xcf)];_0x4ade01++){_0x189813['push'](...validateCriteria(_0x4355b0[_0x21c688(0xf4)][_0x4ade01],_0x5a9009+'.exit_criteria['+_0x4ade01+']',_0x41d789));}return _0x4355b0[_0x21c688(0xbb)]&&_0x189813['push'](...validateCriteria(_0x4355b0[_0x21c688(0xbb)],_0x5a9009+_0x21c688(0xd8),_0x41d789)),_0x189813[_0x21c688(0xb5)](...validateStageStructure(_0x4355b0,_0x413224,_0x509c02,_0x41d789)),_0x189813[_0x21c688(0xb5)](...validateFlowControl(_0x4355b0,_0x413224,_0x41d789)),_0x189813;}function a122_0x588e(){const _0x3f1c62=['\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','join','\x27\x20has\x20no\x20steps','skipSchema','.with.activation','.with.condition.timeout.next','MISSING_MILESTONE','A/B\x20test\x20variant\x20\x27','latest','journeys,\x20stages,\x20or\x20versions','\x27\x20has\x20only\x20','4514855LaSTyF','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','stage','timeout\x20of\x20\x27','warning','Journey\x20has\x20','Activation\x20step\x20requires\x20an\x20activation\x20reference','FEW_STEPS','9rOVGpQ','INSUFFICIENT_STEPS','2077232yPqjrp','set','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','next','goal','segment','versions[','every','stepNames','wait','.rule','stages','condition','58484QSiWRq','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','level','.type','Decision\x20branch\x20\x27','MISSING_WAIT_PARAMS','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','MISSING_EXIT_CRITERIA','Merge\x20step\x20\x27','\x20versions)','version','Embedded\x20segment\x20\x27','type','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_CONDITIONS','.stages','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','source','\x27\x20(from:\x20','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Journey\x20has\x20no\x20goal\x20defined','MISSING_END_STEP','push','\x20with\x20latest:\x20true','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','embeddedSegments','referencedSegments','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','milestone','timeout','MISSING_ENTRY_CRITERIA','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','End\x20step\x20\x27','condition\x20of\x20\x27','jump','excluded','variants','Stage\x20\x27','path','end','map','success','.with.condition.next','has','UNUSED_EMBEDDED_SEGMENT','entries','\x20steps\x20(may\x20be\x20too\x20simple)','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','length','.with.condition.timeout','.exit_criteria','branches','activationKeys','launched','.steps[','segments.','endsWith','.milestone','7497980keifjS','ab_test','merge','keys','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','MISSING_STAGES','TOO_MANY_STAGES','add','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','target','.name','issues','INVALID_AB_TEST_PERCENTAGES','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.with.branches[','rule','.segment','goalIsInherited','CONVERGENCE_WITHOUT_MERGE','END_STEP_HAS_NEXT_OR_WITH','INVALID_JUMP_TARGET','document','MISSING_ACTIVATION_REF',').\x20Merge\x20is\x20unnecessary.','171RxeceV','.next','filter','exit_criteria','ACTIVATION_SCHEMA_ERROR','.with.variants','splice','journeys[','message','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Journey\x20name\x20is\x20required','.entry_criteria','36807930EjHDEv','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','state','.with.branches','Criteria\x20references\x20undefined\x20segment\x20\x27','variant\x20\x27','error','excluded_','indices','1430496vNDnWI','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','stages[','.with.target','replace','JOURNEY_SCHEMA_ERROR','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MISSING_ACTIVATION_DEFINITION','journey\x20entry','INVALID_NEXT_REFERENCE','ref:','entry_criteria','.with','symbol','.with.variants[','journeys','name','\x27\x20of\x20\x27','.steps','size','.with.condition','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','\x27\x20(first\x20defined\x20at\x20steps[','versions','1082796gnXOxt','6IdRxnu','some','segments','SINGLE_INPUT_MERGE','activations','steps','\x27\x20has\x20no\x20exit_criteria\x20defined','\x20stages\x20but\x20maximum\x20is\x20','get','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','activation','startsWith','reduce','MISSING_NAME','includes','trim','BRANCH_DIRECTLY_TO_MERGE','MISSING_SEGMENT_REFERENCE','with','description'];a122_0x588e=function(){return _0x3f1c62;};return a122_0x588e();}function validateStagesForVersion(_0x27417f,_0x29e479,_0x3ab698,_0x3f56be,_0x4ceb66,_0xeec5a0,_0x4ccaae){const _0x3219db=a122_0x48a1;if(_0x27417f['length']===0x0){_0x4ceb66[_0x3219db(0xb5)]({'level':'error','path':_0x3f56be+_0x3219db(0x9c),'code':_0x3219db(0xde),'message':_0x3219db(0xfa),'location':getLocationFromPath(_0x3ab698[_0x3219db(0xee)],_0x3ab698['source'],['stages'])});return;}const _0x552a5b=new Set();for(const _0x5ce108 of _0x27417f){if(_0x5ce108['steps'])for(const _0x6317f7 of _0x5ce108['steps']){_0x6317f7[_0x3219db(0x116)]&&_0x552a5b['add'](_0x6317f7[_0x3219db(0x116)]);}}const _0x8bd810={..._0x3ab698,'stepNames':_0x552a5b},_0x2ece13=validateVersionStructure(_0x27417f,_0x8bd810);for(const _0x35a74e of _0x2ece13){const _0x29a869=_0x3f56be?{..._0x35a74e,'path':''+_0x3f56be+_0x35a74e['path']}:_0x35a74e;if(_0x29a869[_0x3219db(0xa0)]==='error')_0x4ceb66[_0x3219db(0xb5)](_0x29a869);else _0xeec5a0[_0x3219db(0xb5)](_0x29a869);}for(let _0x1d48f0=0x0;_0x1d48f0<_0x27417f['length'];_0x1d48f0++){const _0x35971e=validateStage(_0x27417f[_0x1d48f0],_0x1d48f0,_0x27417f[_0x3219db(0xcf)],_0x8bd810);for(const _0x87b479 of _0x35971e){const _0x2156fd=_0x3f56be?{..._0x87b479,'path':''+_0x3f56be+_0x87b479['path']}:_0x87b479;if(_0x2156fd[_0x3219db(0xa0)]===_0x3219db(0x103))_0x4ceb66[_0x3219db(0xb5)](_0x2156fd);else _0xeec5a0[_0x3219db(0xb5)](_0x2156fd);}}if(_0x29e479[_0x3219db(0x14c)]){const _0x352432=_0x4ccaae?.[_0x3219db(0xea)]?'goal':_0x3f56be+_0x3219db(0x14c),_0x356c48=validateCriteria(_0x29e479[_0x3219db(0x14c)],_0x352432,_0x8bd810);for(const _0x1db0b6 of _0x356c48){if(_0x1db0b6[_0x3219db(0xa0)]===_0x3219db(0x103))_0x4ceb66[_0x3219db(0xb5)](_0x1db0b6);else _0xeec5a0[_0x3219db(0xb5)](_0x1db0b6);}}}function extractVersionIndex(_0x429a9b){const _0x534688=_0x429a9b['match'](/^journeys\[(\d+)\]\./);return _0x534688?_0x534688[0x1]:undefined;}function deduplicateAcrossVersions(_0x910a30){const _0xa65df7=a122_0x48a1,_0x597c7e=new Map();for(let _0x20acd6=0x0;_0x20acd6<_0x910a30[_0xa65df7(0xcf)];_0x20acd6++){const _0x558453=_0x910a30[_0x20acd6]['code']+':'+_0x910a30[_0x20acd6][_0xa65df7(0xf9)],_0x5d1286=extractVersionIndex(_0x910a30[_0x20acd6][_0xa65df7(0xc5)]),_0x4ce525=_0x597c7e[_0xa65df7(0x127)](_0x558453);if(_0x4ce525){_0x4ce525[_0xa65df7(0x105)]['push'](_0x20acd6);if(_0x5d1286)_0x4ce525[_0xa65df7(0x11d)][_0xa65df7(0xe0)](_0x5d1286);}else _0x597c7e['set'](_0x558453,{'indices':[_0x20acd6],'versions':new Set(_0x5d1286?[_0x5d1286]:[])});}const _0x309754=new Set();for(const {indices:_0xd88edc,versions:_0x5d0036}of _0x597c7e['values']()){if(_0x5d0036[_0xa65df7(0x119)]<=0x1)continue;const _0x2144e2=_0x910a30[_0xd88edc[0x0]];_0x2144e2[_0xa65df7(0xc5)]=_0x2144e2['path'][_0xa65df7(0x10a)](/^journeys\[\d+\]\./,''),_0x2144e2[_0xa65df7(0xf9)]=_0x2144e2[_0xa65df7(0xf9)]+'\x20(across\x20'+_0x5d0036[_0xa65df7(0x119)]+_0xa65df7(0xa8);for(let _0x2b97d9=0x1;_0x2b97d9<_0xd88edc[_0xa65df7(0xcf)];_0x2b97d9++){_0x309754[_0xa65df7(0xe0)](_0xd88edc[_0x2b97d9]);}}const _0x4b931e=[..._0x309754]['sort']((_0x1b3ec1,_0x1d6955)=>_0x1d6955-_0x1b3ec1);for(const _0x7d03d7 of _0x4b931e){_0x910a30[_0xa65df7(0xf7)](_0x7d03d7,0x1);}}export function validateJourneyDef(_0x43d0ce,_0x3f30be={},_0x1d5953={}){const _0x5e9227=a122_0x48a1;if(_0x1d5953[_0x5e9227(0x136)])return runJourneySemanticChecks(_0x43d0ce,_0x3f30be);const _0x345aad=JourneyDefSchema['safeParse'](_0x43d0ce);if(_0x345aad[_0x5e9227(0xc8)])return runJourneySemanticChecks(_0x345aad['data'],_0x3f30be);return zodErrorsToJourneyValidationResult(_0x345aad['error'],_0x3f30be);}function zodErrorsToJourneyValidationResult(_0x1dab48,_0x2bf836){const _0x5dc56f=a122_0x48a1,_0x376742=flattenZodIssues(_0x1dab48[_0x5dc56f(0xe4)]),_0x1f4bb1=_0x376742[_0x5dc56f(0xc7)](_0x4afda5=>{const _0x20af9=_0x5dc56f,_0x55e64e=formatZodPath(_0x4afda5[_0x20af9(0xc5)]),_0x22efef=mapJourneyZodIssueToCode(_0x4afda5,_0x55e64e),_0x33de8c=getLocationFromPath(_0x2bf836[_0x20af9(0xee)],_0x2bf836[_0x20af9(0xb0)],_0x4afda5['path']['map'](_0xdd1033=>typeof _0xdd1033===_0x20af9(0x113)?String(_0xdd1033):_0xdd1033));return{'level':_0x20af9(0x103),'path':_0x55e64e,'code':_0x22efef,'message':_0x4afda5[_0x20af9(0xf9)],..._0x33de8c&&{'location':_0x33de8c}};});return{'valid':![],'errors':_0x1f4bb1,'warnings':[]};}function mapJourneyZodIssueToCode(_0x24eafe,_0xf212ba){const _0xb5d09f=a122_0x48a1;if(_0xf212ba==='name')return _0xb5d09f(0x12c);if(_0xf212ba[_0xb5d09f(0xd7)](_0xb5d09f(0xa1))&&_0xf212ba['includes']('steps'))return _0xb5d09f(0x10b);if(_0xf212ba==='stages'||_0xf212ba[_0xb5d09f(0xd7)](_0xb5d09f(0xae)))return'MISSING_STAGES';if(_0xf212ba===''&&_0x24eafe['message'][_0xb5d09f(0x12d)](_0xb5d09f(0x13c)))return _0xb5d09f(0xde);if(_0xf212ba[_0xb5d09f(0x12d)]('activation'))return _0xb5d09f(0xf5);return _0xb5d09f(0x10b);}function runJourneySemanticChecks(_0xa84cef,_0x4d0226){const _0xc61f97=a122_0x48a1,_0x5728ef=[],_0x15ecc8=[];(!_0xa84cef['name']||_0xa84cef['name'][_0xc61f97(0x12e)]()==='')&&_0x5728ef[_0xc61f97(0xb5)]({'level':_0xc61f97(0x103),'path':_0xc61f97(0x116),'code':_0xc61f97(0x12c),'message':_0xc61f97(0xfb),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],['name'])});const _0xe2abf3=new Set();if(_0xa84cef['segments'])for(const _0x4a75e6 of Object[_0xc61f97(0xdc)](_0xa84cef['segments'])){_0xe2abf3[_0xc61f97(0xe0)](_0x4a75e6);}const _0x1ab8b7=new Set();if(_0xa84cef[_0xc61f97(0x123)])for(const _0x5e9c85 of Object['keys'](_0xa84cef[_0xc61f97(0x123)])){_0x1ab8b7[_0xc61f97(0xe0)](_0x5e9c85);}const _0x5d31eb=new Set(),_0x574b67={..._0x4d0226,'embeddedSegments':_0xe2abf3,'referencedSegments':_0x5d31eb,'activationKeys':_0x1ab8b7[_0xc61f97(0x119)]>0x0?_0x1ab8b7:undefined};if(_0xa84cef[_0xc61f97(0x121)])for(const [_0x10c667,_0x30871c]of Object[_0xc61f97(0xcc)](_0xa84cef[_0xc61f97(0x121)])){const _0x210a6d=validateEmbeddedSegment(_0x30871c,_0xc61f97(0xd6)+_0x10c667,_0x574b67);for(const _0x18e7e2 of _0x210a6d){if(_0x18e7e2[_0xc61f97(0xa0)]===_0xc61f97(0x103))_0x5728ef[_0xc61f97(0xb5)](_0x18e7e2);else _0x15ecc8['push'](_0x18e7e2);}}const _0xc0da3a=!!_0xa84cef[_0xc61f97(0x14c)],_0x4ea2f6=_0xa84cef[_0xc61f97(0x115)]?.[_0xc61f97(0x98)](_0x95e93b=>!!_0x95e93b[_0xc61f97(0x14c)])??![];!_0xc0da3a&&!_0x4ea2f6&&_0x15ecc8[_0xc61f97(0xb5)]({'level':_0xc61f97(0x142),'path':_0xc61f97(0x14c),'code':'MISSING_GOAL','message':_0xc61f97(0xb3),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],[_0xc61f97(0x14c)])});const _0x347952=_0xa84cef[_0xc61f97(0x115)]??_0xa84cef[_0xc61f97(0x11d)];if(_0x347952&&_0x347952[_0xc61f97(0xf3)](_0x18dbae=>_0x18dbae[_0xc61f97(0x13b)]===!![])[_0xc61f97(0xcf)]>0x1){const _0x44cff5=_0xa84cef[_0xc61f97(0x115)]?_0xc61f97(0x115):_0xc61f97(0x11d);_0x5728ef['push']({'level':_0xc61f97(0x103),'path':_0x44cff5,'code':'DUPLICATE_LATEST','message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x44cff5===_0xc61f97(0x115)?_0xc61f97(0x10e):_0xc61f97(0xa9))+_0xc61f97(0xb6),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],[_0x44cff5])});}if(_0xa84cef[_0xc61f97(0x115)]&&_0xa84cef[_0xc61f97(0x115)][_0xc61f97(0xcf)]>0x0)for(let _0x2ef25b=0x0;_0x2ef25b<_0xa84cef['journeys'][_0xc61f97(0xcf)];_0x2ef25b++){const _0x1a4a56=_0xa84cef[_0xc61f97(0x115)][_0x2ef25b];if(_0xa84cef[_0xc61f97(0x115)][_0xc61f97(0xcf)]>0x1&&_0x1a4a56['state']===_0xc61f97(0xd4))continue;const _0x42328e=_0x1a4a56['stages']||[],_0x2b8426=_0xc61f97(0xf8)+_0x2ef25b+'].',_0xb36b1f=!!_0x1a4a56[_0xc61f97(0x14c)],_0x420177=_0xb36b1f?{..._0xa84cef,'goal':_0x1a4a56['goal']}:_0xa84cef;validateStagesForVersion(_0x42328e,_0x420177,_0x574b67,_0x2b8426,_0x5728ef,_0x15ecc8,{'goalIsInherited':!_0xb36b1f});}else{if(_0xa84cef[_0xc61f97(0x11d)]&&_0xa84cef['versions'][_0xc61f97(0xcf)]>0x0)for(let _0x7a7e11=0x0;_0x7a7e11<_0xa84cef['versions'][_0xc61f97(0xcf)];_0x7a7e11++){const _0x1302ff=_0xa84cef[_0xc61f97(0x11d)][_0x7a7e11];if(_0xa84cef[_0xc61f97(0x11d)][_0xc61f97(0xcf)]>0x1&&_0x1302ff[_0xc61f97(0xff)]===_0xc61f97(0xd4))continue;const _0x4a420e=_0x1302ff['stages']||[],_0x57d4da=_0xc61f97(0x97)+_0x7a7e11+'].';validateStagesForVersion(_0x4a420e,_0xa84cef,_0x574b67,_0x57d4da,_0x5728ef,_0x15ecc8);}else{const _0x343e17=_0xa84cef[_0xc61f97(0x9c)]||[];validateStagesForVersion(_0x343e17,_0xa84cef,_0x574b67,'',_0x5728ef,_0x15ecc8);}}_0xa84cef[_0xc61f97(0x115)]&&_0xa84cef[_0xc61f97(0x115)][_0xc61f97(0xcf)]>0x1&&(deduplicateAcrossVersions(_0x5728ef),deduplicateAcrossVersions(_0x15ecc8));for(const _0x467805 of _0xe2abf3){!_0x5d31eb[_0xc61f97(0xca)](_0x467805)&&!_0x467805['startsWith'](_0xc61f97(0x104))&&_0x15ecc8['push']({'level':'warning','path':_0xc61f97(0xd6)+_0x467805,'code':_0xc61f97(0xcb),'message':_0xc61f97(0xaa)+_0x467805+_0xc61f97(0xe6),'location':getLocationFromPath(_0x4d0226[_0xc61f97(0xee)],_0x4d0226[_0xc61f97(0xb0)],[_0xc61f97(0x121),_0x467805])});}return{'valid':_0x5728ef['length']===0x0,'errors':_0x5728ef,'warnings':_0x15ecc8};}
|
|
1
|
+
(function(_0x4f5bd5,_0x3a6554){const _0x4f45cb=a130_0x1f76,_0x19903a=_0x4f5bd5();while(!![]){try{const _0x3301ab=-parseInt(_0x4f45cb(0x157))/0x1+-parseInt(_0x4f45cb(0x182))/0x2+parseInt(_0x4f45cb(0x154))/0x3+parseInt(_0x4f45cb(0x1b1))/0x4*(parseInt(_0x4f45cb(0x1b8))/0x5)+-parseInt(_0x4f45cb(0x165))/0x6+parseInt(_0x4f45cb(0x1e6))/0x7*(parseInt(_0x4f45cb(0x205))/0x8)+-parseInt(_0x4f45cb(0x1a7))/0x9*(-parseInt(_0x4f45cb(0x1f1))/0xa);if(_0x3301ab===_0x3a6554)break;else _0x19903a['push'](_0x19903a['shift']());}catch(_0x17253e){_0x19903a['push'](_0x19903a['shift']());}}}(a130_0x1e7d,0xea6dc));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0xfc0ed3,_0xf6d5e1,_0x40a09a,_0x27dc23,_0xdb9d4a,_0x1d85c9){const _0x30ee37=a130_0x1f76;return{'level':_0xfc0ed3,'path':_0xf6d5e1,'code':_0x40a09a,'message':_0x27dc23,'location':getLocationFromPath(_0xdb9d4a[_0x30ee37(0x1dd)],_0xdb9d4a[_0x30ee37(0x15e)],pathToArray(_0x1d85c9??_0xf6d5e1))};}function validateVersionStructure(_0x3cebae,_0x55e815){const _0xf47585=a130_0x1f76,_0x173ba2=[];return _0x3cebae[_0xf47585(0x18a)]>MAX_STAGES&&_0x173ba2['push'](createIssue('error',_0xf47585(0x1b4),_0xf47585(0x1e3),_0xf47585(0x19f)+_0x3cebae[_0xf47585(0x18a)]+_0xf47585(0x1ee)+MAX_STAGES,_0x55e815)),_0x173ba2;}function validateStageStructure(_0x37f1a1,_0x59242a,_0x25c143,_0x37dc34){const _0x26548c=a130_0x1f76,_0xc7faa1=[],_0xb7d7d8=_0x26548c(0x1c0)+_0x59242a+']';_0x59242a===0x0&&!_0x37f1a1[_0x26548c(0x171)]&&_0xc7faa1[_0x26548c(0x1c4)](createIssue('error',_0xb7d7d8+_0x26548c(0x18c),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x170),_0x37dc34,_0xb7d7d8));const _0x180e90=_0x59242a===_0x25c143-0x1;!_0x180e90&&!_0x37f1a1[_0x26548c(0x186)]&&_0xc7faa1['push'](createIssue(_0x26548c(0x1fa),_0xb7d7d8+_0x26548c(0x156),_0x26548c(0x1e9),'Stage\x20\x27'+_0x37f1a1['name']+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x37dc34,_0xb7d7d8));(!_0x37f1a1[_0x26548c(0x178)]||_0x37f1a1['exit_criteria'][_0x26548c(0x18a)]===0x0)&&_0xc7faa1[_0x26548c(0x1c4)](createIssue(_0x26548c(0x17f),_0xb7d7d8+_0x26548c(0x167),_0x26548c(0x175),_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x1af),_0x37dc34,_0xb7d7d8));const _0x3d27a4=_0x37f1a1[_0x26548c(0x1f7)]?.[_0x26548c(0x18a)]??0x0;if(_0x3d27a4===0x0)_0xc7faa1[_0x26548c(0x1c4)](createIssue('error',_0xb7d7d8+_0x26548c(0x1b2),_0x26548c(0x166),_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x188),_0x37dc34,_0xb7d7d8+'.steps'));else{if(_0x3d27a4===0x1)_0xc7faa1[_0x26548c(0x1c4)](createIssue(_0x26548c(0x17f),_0xb7d7d8+_0x26548c(0x1b2),_0x26548c(0x166),_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x189),_0x37dc34,_0xb7d7d8+_0x26548c(0x1b2)));else _0x3d27a4<=0x3&&_0xc7faa1[_0x26548c(0x1c4)](createIssue('warning',_0xb7d7d8+_0x26548c(0x1b2),'FEW_STEPS',_0x26548c(0x16c)+_0x37f1a1[_0x26548c(0x190)]+_0x26548c(0x160)+_0x3d27a4+_0x26548c(0x15a),_0x37dc34,_0xb7d7d8+_0x26548c(0x1b2)));}return _0xc7faa1;}function validateStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210){const _0x1d7068=a130_0x1f76,_0x507db3=[];if(_0x4bc0ff['type']===_0x1d7068(0x1f6))return _0x4bc0ff[_0x1d7068(0x172)]&&_0x507db3[_0x1d7068(0x1c4)](createIssue('error',_0x4a26aa+_0x1d7068(0x1c8),_0x1d7068(0x185),'End\x20step\x20\x27'+_0x4bc0ff[_0x1d7068(0x190)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x3f5aef)),_0x1d7068(0x1ef)in _0x4bc0ff&&_0x4bc0ff[_0x1d7068(0x1ef)]!==undefined&&_0x507db3[_0x1d7068(0x1c4)](createIssue(_0x1d7068(0x1fa),_0x4a26aa+'.with','END_STEP_HAS_NEXT_OR_WITH',_0x1d7068(0x1c6)+_0x4bc0ff[_0x1d7068(0x190)]+_0x1d7068(0x152),_0x3f5aef)),_0x507db3;_0x4bc0ff[_0x1d7068(0x172)]&&(_0x3f5aef[_0x1d7068(0x197)]&&!_0x3f5aef[_0x1d7068(0x197)][_0x1d7068(0x1e2)](_0x4bc0ff[_0x1d7068(0x172)])&&_0x507db3['push'](createIssue('error',_0x4a26aa+_0x1d7068(0x1c8),_0x1d7068(0x1a3),_0x1d7068(0x169)+_0x4bc0ff[_0x1d7068(0x172)]+'\x27',_0x3f5aef)));switch(_0x4bc0ff[_0x1d7068(0x17a)]){case _0x1d7068(0x1a6):_0x507db3['push'](...validateWaitStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210));break;case _0x1d7068(0x19b):_0x507db3[_0x1d7068(0x1c4)](...validateActivationStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef));break;case'decision_point':_0x507db3[_0x1d7068(0x1c4)](...validateDecisionPointStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210));break;case _0x1d7068(0x1ff):_0x507db3[_0x1d7068(0x1c4)](...validateAbTestStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef,_0x4f5210));break;case'jump':_0x507db3[_0x1d7068(0x1c4)](...validateJumpStep(_0x4bc0ff,_0x4a26aa,_0x3f5aef));break;}return _0x507db3;}function validateWaitStep(_0x1d50b6,_0x3fc45e,_0x434585,_0x3c8c54){const _0x311002=a130_0x1f76,_0x360742=[];if(!_0x1d50b6[_0x311002(0x1ef)])return _0x360742[_0x311002(0x1c4)](createIssue(_0x311002(0x1fa),_0x3fc45e+'.with',_0x311002(0x1cf),_0x311002(0x192),_0x434585,_0x3fc45e)),_0x360742;if(_0x1d50b6[_0x311002(0x1ef)][_0x311002(0x1ba)]){const _0x26b705=_0x1d50b6[_0x311002(0x1ef)]['condition'];if(_0x26b705[_0x311002(0x1a8)]){_0x434585[_0x311002(0x195)]?.[_0x311002(0x191)](_0x26b705['segment']);!_0x26b705[_0x311002(0x1a8)][_0x311002(0x1bd)]('ref:')&&(_0x434585[_0x311002(0x181)]&&!_0x434585[_0x311002(0x181)][_0x311002(0x1e2)](_0x26b705['segment'])&&_0x360742['push'](createIssue(_0x311002(0x1fa),_0x3fc45e+'.with.condition.segment','MISSING_SEGMENT_REFERENCE',_0x311002(0x1ec)+_0x26b705[_0x311002(0x1a8)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x434585)));_0x26b705[_0x311002(0x172)]&&_0x434585[_0x311002(0x197)]&&!_0x434585[_0x311002(0x197)]['has'](_0x26b705[_0x311002(0x172)])&&_0x360742['push'](createIssue(_0x311002(0x1fa),_0x3fc45e+_0x311002(0x173),'INVALID_NEXT_REFERENCE','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x26b705[_0x311002(0x172)]+'\x27',_0x434585));_0x26b705[_0x311002(0x1dc)]?.[_0x311002(0x172)]&&_0x434585['stepNames']&&!_0x434585['stepNames'][_0x311002(0x1e2)](_0x26b705[_0x311002(0x1dc)][_0x311002(0x172)])&&_0x360742[_0x311002(0x1c4)](createIssue(_0x311002(0x1fa),_0x3fc45e+_0x311002(0x19d),_0x311002(0x1a3),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x26b705[_0x311002(0x1dc)][_0x311002(0x172)]+'\x27',_0x434585));const _0x39fae4=_0x26b705['next']||_0x1d50b6[_0x311002(0x172)],_0x180a5c=_0x26b705[_0x311002(0x1dc)]?.[_0x311002(0x172)]||_0x1d50b6['next'];if(_0x39fae4){const _0x59a868=_0x3c8c54[_0x311002(0x18e)](_0x39fae4);_0x59a868?.[_0x311002(0x17a)]===_0x311002(0x14f)&&_0x360742['push'](createIssue(_0x311002(0x17f),_0x3fc45e+_0x311002(0x173),_0x311002(0x16e),_0x311002(0x163)+_0x39fae4+_0x311002(0x183),_0x434585,_0x3fc45e+_0x311002(0x1d7)));}if(_0x180a5c){const _0x213b66=_0x3c8c54[_0x311002(0x18e)](_0x180a5c);_0x213b66?.[_0x311002(0x17a)]==='merge'&&_0x360742['push'](createIssue('warning',_0x3fc45e+_0x311002(0x19d),_0x311002(0x16e),_0x311002(0x159)+_0x180a5c+_0x311002(0x183),_0x434585,_0x3fc45e+_0x311002(0x16a)));}}}return _0x360742;}function validateActivationStep(_0x3f9907,_0x7a6658,_0x9b0c1c){const _0x49937f=a130_0x1f76,_0x545ba1=[];if(!_0x3f9907['with']?.[_0x49937f(0x19b)])return _0x545ba1[_0x49937f(0x1c4)](createIssue(_0x49937f(0x1fa),_0x7a6658+'.with.activation',_0x49937f(0x1cb),_0x49937f(0x1aa),_0x9b0c1c,_0x7a6658)),_0x545ba1;const _0x5ad141=_0x3f9907[_0x49937f(0x1ef)][_0x49937f(0x19b)];return _0x9b0c1c[_0x49937f(0x1e4)]&&!_0x5ad141[_0x49937f(0x1bd)](_0x49937f(0x200))&&(!_0x9b0c1c[_0x49937f(0x1e4)]['has'](_0x5ad141)&&_0x545ba1['push'](createIssue(_0x49937f(0x1fa),_0x7a6658+_0x49937f(0x1b9),_0x49937f(0x153),_0x49937f(0x199)+_0x5ad141+_0x49937f(0x1d0),_0x9b0c1c))),_0x545ba1;}function validateDecisionPointStep(_0x3a9529,_0x538676,_0x268d5c,_0x2ab617){const _0x31e457=a130_0x1f76,_0x465387=[];if(!_0x3a9529[_0x31e457(0x1ef)]?.[_0x31e457(0x18b)]||_0x3a9529[_0x31e457(0x1ef)][_0x31e457(0x18b)][_0x31e457(0x18a)]===0x0)return _0x465387[_0x31e457(0x1c4)](createIssue(_0x31e457(0x1fa),_0x538676+'.with.branches',_0x31e457(0x1c2),_0x31e457(0x155),_0x268d5c,_0x538676)),_0x465387;for(let _0x58fc8a=0x0;_0x58fc8a<_0x3a9529[_0x31e457(0x1ef)][_0x31e457(0x18b)][_0x31e457(0x18a)];_0x58fc8a++){const _0xb50cbb=_0x3a9529[_0x31e457(0x1ef)]['branches'][_0x58fc8a],_0x2922e6=_0x538676+'.with.branches['+_0x58fc8a+']';_0xb50cbb[_0x31e457(0x1a8)]&&!_0xb50cbb[_0x31e457(0x15c)]&&(_0x268d5c[_0x31e457(0x195)]?.[_0x31e457(0x191)](_0xb50cbb[_0x31e457(0x1a8)]),!_0xb50cbb[_0x31e457(0x1a8)][_0x31e457(0x1bd)]('ref:')&&(_0x268d5c[_0x31e457(0x181)]&&!_0x268d5c[_0x31e457(0x181)][_0x31e457(0x1e2)](_0xb50cbb['segment'])&&_0x465387['push'](createIssue(_0x31e457(0x1fa),_0x2922e6+_0x31e457(0x1ab),_0x31e457(0x18d),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0xb50cbb[_0x31e457(0x1a8)]+'\x27',_0x268d5c))));_0xb50cbb['next']&&_0x268d5c['stepNames']&&!_0x268d5c[_0x31e457(0x197)][_0x31e457(0x1e2)](_0xb50cbb['next'])&&_0x465387['push'](createIssue(_0x31e457(0x1fa),_0x2922e6+_0x31e457(0x1c8),'INVALID_NEXT_REFERENCE',_0x31e457(0x1bc)+_0xb50cbb[_0x31e457(0x172)]+'\x27',_0x268d5c));if(_0xb50cbb[_0x31e457(0x172)]){const _0x2d1a1e=_0x2ab617[_0x31e457(0x18e)](_0xb50cbb[_0x31e457(0x172)]);_0x2d1a1e?.[_0x31e457(0x17a)]===_0x31e457(0x14f)&&_0x465387[_0x31e457(0x1c4)](createIssue(_0x31e457(0x17f),_0x2922e6+_0x31e457(0x1c8),_0x31e457(0x16e),_0x31e457(0x1b7)+_0xb50cbb[_0x31e457(0x190)]+_0x31e457(0x1a1)+_0xb50cbb['next']+_0x31e457(0x1a2),_0x268d5c));}}return _0x465387;}function validateAbTestStep(_0x1c9647,_0x3a2b0d,_0x751b9c,_0x58bcda){const _0x352d32=a130_0x1f76,_0x5247b9=[];if(!_0x1c9647[_0x352d32(0x1ef)]?.['variants']||_0x1c9647[_0x352d32(0x1ef)]['variants'][_0x352d32(0x18a)]===0x0)return _0x5247b9['push'](createIssue(_0x352d32(0x1fa),_0x3a2b0d+_0x352d32(0x1f0),'MISSING_CONDITIONS',_0x352d32(0x168),_0x751b9c,_0x3a2b0d)),_0x5247b9;const _0x175b7f=_0x1c9647[_0x352d32(0x1ef)][_0x352d32(0x1d4)][_0x352d32(0x1d8)]((_0x3c6938,_0x98dcb8)=>_0x3c6938+(_0x98dcb8[_0x352d32(0x187)]||0x0),0x0);Math[_0x352d32(0x14e)](_0x175b7f-0x64)>0.01&&_0x5247b9[_0x352d32(0x1c4)](createIssue(_0x352d32(0x1fa),_0x3a2b0d+_0x352d32(0x1f0),_0x352d32(0x196),_0x352d32(0x1a4)+_0x175b7f+'%)',_0x751b9c));for(let _0x25d695=0x0;_0x25d695<_0x1c9647[_0x352d32(0x1ef)][_0x352d32(0x1d4)][_0x352d32(0x18a)];_0x25d695++){const _0x3a12d6=_0x1c9647[_0x352d32(0x1ef)][_0x352d32(0x1d4)][_0x25d695],_0x11a164=_0x3a2b0d+_0x352d32(0x1fc)+_0x25d695+']';_0x3a12d6[_0x352d32(0x172)]&&_0x751b9c['stepNames']&&!_0x751b9c[_0x352d32(0x197)][_0x352d32(0x1e2)](_0x3a12d6[_0x352d32(0x172)])&&_0x5247b9[_0x352d32(0x1c4)](createIssue(_0x352d32(0x1fa),_0x11a164+'.next','INVALID_NEXT_REFERENCE',_0x352d32(0x1b6)+_0x3a12d6[_0x352d32(0x172)]+'\x27',_0x751b9c));if(_0x3a12d6[_0x352d32(0x172)]){const _0x41a93d=_0x58bcda['get'](_0x3a12d6[_0x352d32(0x172)]);_0x41a93d?.[_0x352d32(0x17a)]===_0x352d32(0x14f)&&_0x5247b9[_0x352d32(0x1c4)](createIssue('warning',_0x11a164+_0x352d32(0x1c8),_0x352d32(0x16e),'A/B\x20test\x20variant\x20\x27'+_0x3a12d6['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x3a12d6[_0x352d32(0x172)]+_0x352d32(0x1a2),_0x751b9c));}}return _0x5247b9;}function validateJumpStep(_0x204efd,_0xb4a55e,_0x2684c4){const _0x4a2fd3=a130_0x1f76,_0x187f31=[];if(!_0x204efd['with']?.[_0x4a2fd3(0x1f8)])return _0x187f31[_0x4a2fd3(0x1c4)](createIssue(_0x4a2fd3(0x1fa),_0xb4a55e+_0x4a2fd3(0x16f),_0x4a2fd3(0x1c1),_0x4a2fd3(0x1d9),_0x2684c4,_0xb4a55e)),_0x187f31;return(!_0x204efd[_0x4a2fd3(0x1ef)]['target'][_0x4a2fd3(0x1eb)]||!_0x204efd[_0x4a2fd3(0x1ef)][_0x4a2fd3(0x1f8)]['stage'])&&_0x187f31[_0x4a2fd3(0x1c4)](createIssue(_0x4a2fd3(0x1fa),_0xb4a55e+_0x4a2fd3(0x16f),_0x4a2fd3(0x1c1),_0x4a2fd3(0x1ed),_0x2684c4)),_0x187f31;}function buildConvergenceMap(_0x7307b9){const _0x585c12=a130_0x1f76,_0x29f1fe=new Map();function _0x1e963b(_0x4ea07a,_0x4e5195){const _0x7d07c2=a130_0x1f76,_0x54aba4=_0x29f1fe[_0x7d07c2(0x18e)](_0x4ea07a)||[];_0x54aba4[_0x7d07c2(0x1c4)](_0x4e5195),_0x29f1fe[_0x7d07c2(0x177)](_0x4ea07a,_0x54aba4);}for(const _0x1f8248 of _0x7307b9){_0x1f8248[_0x585c12(0x172)]&&_0x1e963b(_0x1f8248[_0x585c12(0x172)],{'stepName':_0x1f8248[_0x585c12(0x190)],'description':'step\x20\x27'+_0x1f8248[_0x585c12(0x190)]+'\x27'});if(_0x1f8248[_0x585c12(0x17a)]===_0x585c12(0x204)&&_0x1f8248['with']?.[_0x585c12(0x18b)])for(const _0x1cb205 of _0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x18b)]){_0x1cb205[_0x585c12(0x172)]&&_0x1e963b(_0x1cb205[_0x585c12(0x172)],{'stepName':_0x1f8248['name'],'description':'branch\x20\x27'+_0x1cb205[_0x585c12(0x190)]+_0x585c12(0x1da)+_0x1f8248[_0x585c12(0x190)]+'\x27'});}if(_0x1f8248[_0x585c12(0x17a)]==='ab_test'&&_0x1f8248[_0x585c12(0x1ef)]?.[_0x585c12(0x1d4)])for(const _0x26392c of _0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1d4)]){_0x26392c[_0x585c12(0x172)]&&_0x1e963b(_0x26392c['next'],{'stepName':_0x1f8248[_0x585c12(0x190)],'description':_0x585c12(0x1f2)+_0x26392c[_0x585c12(0x190)]+_0x585c12(0x1da)+_0x1f8248[_0x585c12(0x190)]+'\x27'});}_0x1f8248[_0x585c12(0x17a)]==='wait'&&_0x1f8248['with']?.['condition']&&(_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x172)]&&_0x1e963b(_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x172)],{'stepName':_0x1f8248['name'],'description':_0x585c12(0x164)+_0x1f8248[_0x585c12(0x190)]+'\x27'}),_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x1dc)]?.[_0x585c12(0x172)]&&_0x1e963b(_0x1f8248[_0x585c12(0x1ef)][_0x585c12(0x1ba)][_0x585c12(0x1dc)]['next'],{'stepName':_0x1f8248[_0x585c12(0x190)],'description':_0x585c12(0x16b)+_0x1f8248[_0x585c12(0x190)]+'\x27'}));}return _0x29f1fe;}function validateFlowControl(_0x63b72b,_0x1b5ce5,_0x2fd4cd){const _0x46b349=a130_0x1f76,_0x4a0de9=[],_0x25b2eb='stages['+_0x1b5ce5+']',_0x262b9a=_0x63b72b[_0x46b349(0x1f7)]||[];if(_0x262b9a[_0x46b349(0x18a)]===0x0)return _0x4a0de9;const _0x23dd3b=new Map();for(const _0x4ad538 of _0x262b9a){_0x4ad538[_0x46b349(0x190)]&&_0x23dd3b[_0x46b349(0x177)](_0x4ad538['name'],_0x4ad538);}const _0x3e868b=buildConvergenceMap(_0x262b9a),_0x44ac3d=_0x262b9a[_0x46b349(0x1ac)](_0x2b3641=>_0x2b3641['type']===_0x46b349(0x1f6));!_0x44ac3d&&_0x4a0de9['push'](createIssue('error',_0x25b2eb+_0x46b349(0x1b2),_0x46b349(0x16d),_0x46b349(0x16c)+_0x63b72b[_0x46b349(0x190)]+_0x46b349(0x1fe),_0x2fd4cd));for(const [_0x26113a,_0x332765]of _0x3e868b){const _0x445f5d=_0x23dd3b[_0x46b349(0x18e)](_0x26113a);if(!_0x445f5d)continue;if(_0x332765['length']>0x1&&_0x445f5d[_0x46b349(0x17a)]!==_0x46b349(0x14f)){const _0x1849ba=_0x332765[_0x46b349(0x1df)](_0x1622f9=>_0x1622f9[_0x46b349(0x1e5)])[_0x46b349(0x161)](',\x20');_0x4a0de9[_0x46b349(0x1c4)](createIssue(_0x46b349(0x1fa),_0x25b2eb+_0x46b349(0x1b2),_0x46b349(0x1fd),_0x46b349(0x193)+_0x26113a+_0x46b349(0x1ea)+_0x1849ba+_0x46b349(0x180),_0x2fd4cd));}_0x332765[_0x46b349(0x18a)]===0x1&&_0x445f5d[_0x46b349(0x17a)]===_0x46b349(0x14f)&&_0x4a0de9[_0x46b349(0x1c4)](createIssue('warning',_0x25b2eb+_0x46b349(0x1b2),_0x46b349(0x1c7),_0x46b349(0x1a0)+_0x26113a+_0x46b349(0x1c3)+_0x332765[0x0][_0x46b349(0x1e5)]+_0x46b349(0x1a5),_0x2fd4cd));}for(const _0x3c17c5 of _0x262b9a){if(_0x3c17c5['type']===_0x46b349(0x14f)&&_0x3c17c5[_0x46b349(0x172)]){const _0x2ddba3=_0x23dd3b[_0x46b349(0x18e)](_0x3c17c5['next']);_0x2ddba3?.[_0x46b349(0x17a)]===_0x46b349(0x14f)&&_0x4a0de9[_0x46b349(0x1c4)](createIssue('error',_0x25b2eb+'.steps',_0x46b349(0x1c9),_0x46b349(0x1a0)+_0x3c17c5['name']+_0x46b349(0x202)+_0x3c17c5[_0x46b349(0x172)]+_0x46b349(0x194),_0x2fd4cd));}}return _0x4a0de9;}function validateCriteria(_0x49385e,_0x26c67f,_0x4e4c3d){const _0x1830d6=a130_0x1f76,_0xf3a0c4=[];return _0x49385e['segment']&&(_0x4e4c3d[_0x1830d6(0x195)]?.['add'](_0x49385e[_0x1830d6(0x1a8)]),!_0x49385e[_0x1830d6(0x1a8)][_0x1830d6(0x1bd)](_0x1830d6(0x200))&&(_0x4e4c3d[_0x1830d6(0x181)]&&!_0x4e4c3d[_0x1830d6(0x181)][_0x1830d6(0x1e2)](_0x49385e[_0x1830d6(0x1a8)])&&_0xf3a0c4[_0x1830d6(0x1c4)](createIssue(_0x1830d6(0x1fa),_0x26c67f+'.segment',_0x1830d6(0x18d),_0x1830d6(0x19e)+_0x49385e[_0x1830d6(0x1a8)]+'\x27',_0x4e4c3d)))),_0xf3a0c4;}function a130_0x1e7d(){const _0x268369=['MISSING_ACTIVATION_REF','ACTIVATION_SCHEMA_ERROR','success','code','MISSING_WAIT_PARAMS','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','MISSING_STAGES','DUPLICATE_STEP_NAME','entries','variants','message','issues','.with.condition','reduce','Jump\x20step\x20requires\x20a\x20target','\x27\x20of\x20\x27','DUPLICATE_LATEST','timeout','document','UNUSED_EMBEDDED_SEGMENT','map','state','.type','has','TOO_MANY_STAGES','activationKeys','description','7sEnPJf','journeys[','.exit_criteria[','MISSING_MILESTONE','\x27\x20(from:\x20','journey','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x20stages\x20but\x20maximum\x20is\x20','with','.with.variants','5278920EFvjOx','variant\x20\x27','.rule','size','journey\x20entry','end','steps','target','every','error','segments','.with.variants[','CONVERGENCE_WITHOUT_MERGE','\x27\x20has\x20no\x20end\x20step','ab_test','ref:','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','safeParse','decision_point','305912kDLYpj','versions','skipSchema','abs','merge','endsWith','excluded_','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','MISSING_ACTIVATION_DEFINITION','722493xGlPEh','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.milestone','325744OBvwQT','filter','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','journeys,\x20stages,\x20or\x20versions','excluded','Journey\x20can\x20have\x20at\x20most\x20one\x20','source','keys','\x27\x20has\x20only\x20','join','launched','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','condition\x20of\x20\x27','3811572QeFPSG','INSUFFICIENT_STEPS','.exit_criteria','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','Step\x20references\x20non-existent\x20step\x20\x27','.with.condition.timeout','timeout\x20of\x20\x27','Stage\x20\x27','MISSING_END_STEP','BRANCH_DIRECTLY_TO_MERGE','.with.target','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','entry_criteria','next','.with.condition.next','replace','MISSING_EXIT_CRITERIA','\x20with\x20latest:\x20true','set','exit_criteria','.name','type','path','Duplicate\x20step\x20name\x20\x27','goal','sort','warning',').\x20Use\x20a\x20merge\x20step.','embeddedSegments','1150464tjazan','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','END_STEP_HAS_NEXT_OR_WITH','milestone','percentage','\x27\x20has\x20no\x20steps','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','length','branches','.entry_criteria','MISSING_SEGMENT_REFERENCE','get','.stages','name','add','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','referencedSegments','INVALID_AB_TEST_PERCENTAGES','stepNames','splice','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','segments.','activation','\x20(across\x20','.with.condition.timeout.next','Criteria\x20references\x20undefined\x20segment\x20\x27','Journey\x20has\x20','Merge\x20step\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20with\x20no\x20action\x20in\x20between','INVALID_NEXT_REFERENCE','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20',').\x20Merge\x20is\x20unnecessary.','wait','9hElMiL','segment','includes','Activation\x20step\x20requires\x20an\x20activation\x20reference','.segment','some','activations','symbol','\x27\x20has\x20no\x20exit_criteria\x20defined','journeys','4WUryVr','.steps','versions[','stages','level','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Decision\x20branch\x20\x27','8447480WsgSNb','.with.activation','condition','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','startsWith','\x20versions)','JOURNEY_SCHEMA_ERROR','stages[','INVALID_JUMP_TARGET','MISSING_CONDITIONS','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','push','MISSING_NAME','End\x20step\x20\x27','SINGLE_INPUT_MERGE','.next','MERGE_TO_MERGE_CHAIN','rule'];a130_0x1e7d=function(){return _0x268369;};return a130_0x1e7d();}function validateEmbeddedSegment(_0x518005,_0x37de55,_0x49b12f){const _0x5eced0=a130_0x1f76,_0x4bf592=[];return _0x518005[_0x5eced0(0x1ca)]&&_0x4bf592['push'](...validateRuleDef(_0x518005[_0x5eced0(0x1ca)],_0x37de55+_0x5eced0(0x1f3),_0x49b12f)),_0x4bf592;}function validateStage(_0x5e3f57,_0x1896a9,_0x17a140,_0x2bcae7){const _0x287f17=a130_0x1f76,_0x3d391a=[],_0xcf1b36='stages['+_0x1896a9+']',_0x3154b0=new Map(),_0xa9fa67=new Map();if(_0x5e3f57[_0x287f17(0x1f7)]){for(let _0x4dca3d=0x0;_0x4dca3d<_0x5e3f57[_0x287f17(0x1f7)]['length'];_0x4dca3d++){const _0x1c67d2=_0x5e3f57[_0x287f17(0x1f7)][_0x4dca3d];_0x1c67d2[_0x287f17(0x190)]&&_0x3154b0[_0x287f17(0x177)](_0x1c67d2['name'],_0x1c67d2);}for(let _0x550825=0x0;_0x550825<_0x5e3f57[_0x287f17(0x1f7)]['length'];_0x550825++){const _0x39fe22=_0x5e3f57[_0x287f17(0x1f7)][_0x550825],_0x17b658=_0xcf1b36+'.steps['+_0x550825+']';if(_0x39fe22[_0x287f17(0x190)]){if(_0xa9fa67[_0x287f17(0x1e2)](_0x39fe22[_0x287f17(0x190)])){const _0x2a3221=_0xa9fa67[_0x287f17(0x18e)](_0x39fe22[_0x287f17(0x190)]);_0x3d391a[_0x287f17(0x1c4)](createIssue(_0x287f17(0x1fa),_0x17b658+_0x287f17(0x179),_0x287f17(0x1d2),_0x287f17(0x17c)+_0x39fe22[_0x287f17(0x190)]+_0x287f17(0x201)+_0x2a3221+'])',_0x2bcae7));}else _0xa9fa67['set'](_0x39fe22[_0x287f17(0x190)],_0x550825);}_0x3d391a['push'](...validateStep(_0x39fe22,_0x17b658,_0x2bcae7,_0x3154b0));}}_0x5e3f57[_0x287f17(0x171)]&&_0x3d391a[_0x287f17(0x1c4)](...validateCriteria(_0x5e3f57[_0x287f17(0x171)],_0xcf1b36+'.entry_criteria',_0x2bcae7));if(_0x5e3f57[_0x287f17(0x178)])for(let _0x42aeeb=0x0;_0x42aeeb<_0x5e3f57[_0x287f17(0x178)][_0x287f17(0x18a)];_0x42aeeb++){_0x3d391a['push'](...validateCriteria(_0x5e3f57[_0x287f17(0x178)][_0x42aeeb],_0xcf1b36+_0x287f17(0x1e8)+_0x42aeeb+']',_0x2bcae7));}return _0x5e3f57[_0x287f17(0x186)]&&_0x3d391a[_0x287f17(0x1c4)](...validateCriteria(_0x5e3f57['milestone'],_0xcf1b36+_0x287f17(0x156),_0x2bcae7)),_0x3d391a[_0x287f17(0x1c4)](...validateStageStructure(_0x5e3f57,_0x1896a9,_0x17a140,_0x2bcae7)),_0x3d391a[_0x287f17(0x1c4)](...validateFlowControl(_0x5e3f57,_0x1896a9,_0x2bcae7)),_0x3d391a;}function validateStagesForVersion(_0x98f234,_0x2a2b5e,_0x54af12,_0x15bf29,_0x29077b,_0x56a8be,_0x424df6){const _0x4b7d9c=a130_0x1f76;if(_0x98f234[_0x4b7d9c(0x18a)]===0x0){_0x29077b[_0x4b7d9c(0x1c4)]({'level':_0x4b7d9c(0x1fa),'path':_0x15bf29+'stages','code':_0x4b7d9c(0x1d1),'message':_0x4b7d9c(0x1bb),'location':getLocationFromPath(_0x54af12[_0x4b7d9c(0x1dd)],_0x54af12[_0x4b7d9c(0x15e)],[_0x4b7d9c(0x1b4)])});return;}const _0x342f2c=new Set();for(const _0x1cef87 of _0x98f234){if(_0x1cef87[_0x4b7d9c(0x1f7)])for(const _0x2ba890 of _0x1cef87[_0x4b7d9c(0x1f7)]){_0x2ba890[_0x4b7d9c(0x190)]&&_0x342f2c['add'](_0x2ba890[_0x4b7d9c(0x190)]);}}const _0x50bca3={..._0x54af12,'stepNames':_0x342f2c},_0x113cd3=validateVersionStructure(_0x98f234,_0x50bca3);for(const _0x4be201 of _0x113cd3){const _0x50d9a3=_0x15bf29?{..._0x4be201,'path':''+_0x15bf29+_0x4be201[_0x4b7d9c(0x17b)]}:_0x4be201;if(_0x50d9a3['level']==='error')_0x29077b['push'](_0x50d9a3);else _0x56a8be[_0x4b7d9c(0x1c4)](_0x50d9a3);}for(let _0x2aa24c=0x0;_0x2aa24c<_0x98f234[_0x4b7d9c(0x18a)];_0x2aa24c++){const _0x325cc1=validateStage(_0x98f234[_0x2aa24c],_0x2aa24c,_0x98f234[_0x4b7d9c(0x18a)],_0x50bca3);for(const _0x37b12e of _0x325cc1){const _0x55bf1c=_0x15bf29?{..._0x37b12e,'path':''+_0x15bf29+_0x37b12e[_0x4b7d9c(0x17b)]}:_0x37b12e;if(_0x55bf1c['level']===_0x4b7d9c(0x1fa))_0x29077b[_0x4b7d9c(0x1c4)](_0x55bf1c);else _0x56a8be[_0x4b7d9c(0x1c4)](_0x55bf1c);}}if(_0x2a2b5e[_0x4b7d9c(0x17d)]){const _0x404c77=_0x424df6?.['goalIsInherited']?_0x4b7d9c(0x17d):_0x15bf29+_0x4b7d9c(0x17d),_0xe8db2c=validateCriteria(_0x2a2b5e[_0x4b7d9c(0x17d)],_0x404c77,_0x50bca3);for(const _0x4ff5f0 of _0xe8db2c){if(_0x4ff5f0[_0x4b7d9c(0x1b5)]===_0x4b7d9c(0x1fa))_0x29077b[_0x4b7d9c(0x1c4)](_0x4ff5f0);else _0x56a8be[_0x4b7d9c(0x1c4)](_0x4ff5f0);}}}function a130_0x1f76(_0x28314d,_0x5f1762){_0x28314d=_0x28314d-0x14d;const _0x1e7dd0=a130_0x1e7d();let _0x1f76c5=_0x1e7dd0[_0x28314d];return _0x1f76c5;}function extractVersionIndex(_0x4e1ec7){const _0x420ad9=_0x4e1ec7['match'](/^journeys\[(\d+)\]\./);return _0x420ad9?_0x420ad9[0x1]:undefined;}function deduplicateAcrossVersions(_0x5ea50a){const _0x4a331b=a130_0x1f76,_0x1ee446=new Map();for(let _0x195c9f=0x0;_0x195c9f<_0x5ea50a[_0x4a331b(0x18a)];_0x195c9f++){const _0x337545=_0x5ea50a[_0x195c9f][_0x4a331b(0x1ce)]+':'+_0x5ea50a[_0x195c9f][_0x4a331b(0x1d5)],_0x394330=extractVersionIndex(_0x5ea50a[_0x195c9f][_0x4a331b(0x17b)]),_0x518895=_0x1ee446[_0x4a331b(0x18e)](_0x337545);if(_0x518895){_0x518895['indices'][_0x4a331b(0x1c4)](_0x195c9f);if(_0x394330)_0x518895[_0x4a331b(0x206)][_0x4a331b(0x191)](_0x394330);}else _0x1ee446[_0x4a331b(0x177)](_0x337545,{'indices':[_0x195c9f],'versions':new Set(_0x394330?[_0x394330]:[])});}const _0x33992d=new Set();for(const {indices:_0x12589b,versions:_0x33d769}of _0x1ee446['values']()){if(_0x33d769[_0x4a331b(0x1f4)]<=0x1)continue;const _0x5246cc=_0x5ea50a[_0x12589b[0x0]];_0x5246cc['path']=_0x5246cc[_0x4a331b(0x17b)][_0x4a331b(0x174)](/^journeys\[\d+\]\./,''),_0x5246cc[_0x4a331b(0x1d5)]=_0x5246cc[_0x4a331b(0x1d5)]+_0x4a331b(0x19c)+_0x33d769[_0x4a331b(0x1f4)]+_0x4a331b(0x1be);for(let _0x353102=0x1;_0x353102<_0x12589b[_0x4a331b(0x18a)];_0x353102++){_0x33992d[_0x4a331b(0x191)](_0x12589b[_0x353102]);}}const _0x39fd79=[..._0x33992d][_0x4a331b(0x17e)]((_0x1405e5,_0x45fedb)=>_0x45fedb-_0x1405e5);for(const _0x58635f of _0x39fd79){_0x5ea50a[_0x4a331b(0x198)](_0x58635f,0x1);}}export function validateJourneyDef(_0x583d8,_0x170944={},_0x203d36={}){const _0x41a1e0=a130_0x1f76;if(_0x203d36[_0x41a1e0(0x14d)])return runJourneySemanticChecks(_0x583d8,_0x170944);const _0x17b2a3=JourneyDefSchema[_0x41a1e0(0x203)](_0x583d8);if(_0x17b2a3[_0x41a1e0(0x1cd)])return runJourneySemanticChecks(_0x17b2a3['data'],_0x170944);return zodErrorsToJourneyValidationResult(_0x17b2a3[_0x41a1e0(0x1fa)],_0x170944);}function zodErrorsToJourneyValidationResult(_0x3324d5,_0x317340){const _0x57b1c0=a130_0x1f76,_0x3c9079=flattenZodIssues(_0x3324d5[_0x57b1c0(0x1d6)]),_0x420cbc=_0x3c9079['map'](_0x119f8d=>{const _0x2b92d1=_0x57b1c0,_0x15b924=formatZodPath(_0x119f8d[_0x2b92d1(0x17b)]),_0x487ee8=mapJourneyZodIssueToCode(_0x119f8d,_0x15b924),_0x75cb4f=getLocationFromPath(_0x317340[_0x2b92d1(0x1dd)],_0x317340[_0x2b92d1(0x15e)],_0x119f8d[_0x2b92d1(0x17b)]['map'](_0x2f1c0f=>typeof _0x2f1c0f===_0x2b92d1(0x1ae)?String(_0x2f1c0f):_0x2f1c0f));return{'level':_0x2b92d1(0x1fa),'path':_0x15b924,'code':_0x487ee8,'message':_0x119f8d[_0x2b92d1(0x1d5)],..._0x75cb4f&&{'location':_0x75cb4f}};});return{'valid':![],'errors':_0x420cbc,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2b76d6,_0xdefc6c){const _0x243a38=a130_0x1f76;if(_0xdefc6c===_0x243a38(0x190))return _0x243a38(0x1c5);if(_0xdefc6c[_0x243a38(0x150)](_0x243a38(0x1e1))&&_0xdefc6c[_0x243a38(0x1a9)]('steps'))return _0x243a38(0x1bf);if(_0xdefc6c==='stages'||_0xdefc6c[_0x243a38(0x150)](_0x243a38(0x18f)))return'MISSING_STAGES';if(_0xdefc6c===''&&_0x2b76d6[_0x243a38(0x1d5)]['includes'](_0x243a38(0x15b)))return'MISSING_STAGES';if(_0xdefc6c[_0x243a38(0x1a9)](_0x243a38(0x19b)))return _0x243a38(0x1cc);return _0x243a38(0x1bf);}function runJourneySemanticChecks(_0x3cbfa5,_0x333a2c){const _0x4241ef=a130_0x1f76,_0x59c6dc=[],_0x1a60c0=[];(!_0x3cbfa5[_0x4241ef(0x190)]||_0x3cbfa5[_0x4241ef(0x190)]['trim']()==='')&&_0x59c6dc[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x1fa),'path':_0x4241ef(0x190),'code':_0x4241ef(0x1c5),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x333a2c[_0x4241ef(0x1dd)],_0x333a2c[_0x4241ef(0x15e)],[_0x4241ef(0x190)])});const _0x2083ff=new Set();if(_0x3cbfa5['segments'])for(const _0x5c4cc0 of Object[_0x4241ef(0x15f)](_0x3cbfa5['segments'])){_0x2083ff[_0x4241ef(0x191)](_0x5c4cc0);}const _0x306a35=new Set();if(_0x3cbfa5[_0x4241ef(0x1ad)])for(const _0x29dae0 of Object['keys'](_0x3cbfa5['activations'])){_0x306a35[_0x4241ef(0x191)](_0x29dae0);}const _0x4874d2=new Set(),_0x52febb={..._0x333a2c,'embeddedSegments':_0x2083ff,'referencedSegments':_0x4874d2,'activationKeys':_0x306a35[_0x4241ef(0x1f4)]>0x0?_0x306a35:undefined};if(_0x3cbfa5['segments'])for(const [_0x206c02,_0x5dbe71]of Object[_0x4241ef(0x1d3)](_0x3cbfa5[_0x4241ef(0x1fb)])){const _0x35a116=validateEmbeddedSegment(_0x5dbe71,_0x4241ef(0x19a)+_0x206c02,_0x52febb);for(const _0x3c205d of _0x35a116){if(_0x3c205d[_0x4241ef(0x1b5)]===_0x4241ef(0x1fa))_0x59c6dc[_0x4241ef(0x1c4)](_0x3c205d);else _0x1a60c0[_0x4241ef(0x1c4)](_0x3c205d);}}const _0x3f1000=!!_0x3cbfa5['goal'],_0x1ac9e0=_0x3cbfa5[_0x4241ef(0x1b0)]?.[_0x4241ef(0x1f9)](_0xdc2df2=>!!_0xdc2df2[_0x4241ef(0x17d)])??![];!_0x3f1000&&!_0x1ac9e0&&_0x1a60c0[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x17f),'path':_0x4241ef(0x17d),'code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x333a2c['document'],_0x333a2c['source'],[_0x4241ef(0x17d)])});const _0x20e52f=_0x3cbfa5[_0x4241ef(0x1b0)]??_0x3cbfa5['versions'];if(_0x20e52f&&_0x20e52f[_0x4241ef(0x158)](_0x26d744=>_0x26d744['latest']===!![])['length']>0x1){const _0x413a01=_0x3cbfa5[_0x4241ef(0x1b0)]?_0x4241ef(0x1b0):'versions';_0x59c6dc[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x1fa),'path':_0x413a01,'code':_0x4241ef(0x1db),'message':_0x4241ef(0x15d)+(_0x413a01===_0x4241ef(0x1b0)?_0x4241ef(0x1f5):'version')+_0x4241ef(0x176),'location':getLocationFromPath(_0x333a2c[_0x4241ef(0x1dd)],_0x333a2c[_0x4241ef(0x15e)],[_0x413a01])});}if(_0x3cbfa5[_0x4241ef(0x1b0)]&&_0x3cbfa5[_0x4241ef(0x1b0)]['length']>0x0)for(let _0x5b486f=0x0;_0x5b486f<_0x3cbfa5[_0x4241ef(0x1b0)][_0x4241ef(0x18a)];_0x5b486f++){const _0x270b3e=_0x3cbfa5[_0x4241ef(0x1b0)][_0x5b486f];if(_0x3cbfa5[_0x4241ef(0x1b0)][_0x4241ef(0x18a)]>0x1&&_0x270b3e[_0x4241ef(0x1e0)]===_0x4241ef(0x162))continue;const _0x27a0a9=_0x270b3e[_0x4241ef(0x1b4)]||[],_0x273301=_0x4241ef(0x1e7)+_0x5b486f+'].',_0x57332e=!!_0x270b3e['goal'],_0x3d22a2=_0x57332e?{..._0x3cbfa5,'goal':_0x270b3e[_0x4241ef(0x17d)]}:_0x3cbfa5;validateStagesForVersion(_0x27a0a9,_0x3d22a2,_0x52febb,_0x273301,_0x59c6dc,_0x1a60c0,{'goalIsInherited':!_0x57332e});}else{if(_0x3cbfa5[_0x4241ef(0x206)]&&_0x3cbfa5[_0x4241ef(0x206)][_0x4241ef(0x18a)]>0x0)for(let _0x75a481=0x0;_0x75a481<_0x3cbfa5[_0x4241ef(0x206)][_0x4241ef(0x18a)];_0x75a481++){const _0x2c708a=_0x3cbfa5['versions'][_0x75a481];if(_0x3cbfa5['versions']['length']>0x1&&_0x2c708a[_0x4241ef(0x1e0)]===_0x4241ef(0x162))continue;const _0x264d5f=_0x2c708a['stages']||[],_0x4ab165=_0x4241ef(0x1b3)+_0x75a481+'].';validateStagesForVersion(_0x264d5f,_0x3cbfa5,_0x52febb,_0x4ab165,_0x59c6dc,_0x1a60c0);}else{const _0x167207=_0x3cbfa5['stages']||[];validateStagesForVersion(_0x167207,_0x3cbfa5,_0x52febb,'',_0x59c6dc,_0x1a60c0);}}_0x3cbfa5[_0x4241ef(0x1b0)]&&_0x3cbfa5[_0x4241ef(0x1b0)][_0x4241ef(0x18a)]>0x1&&(deduplicateAcrossVersions(_0x59c6dc),deduplicateAcrossVersions(_0x1a60c0));for(const _0x3ba670 of _0x2083ff){!_0x4874d2[_0x4241ef(0x1e2)](_0x3ba670)&&!_0x3ba670['startsWith'](_0x4241ef(0x151))&&_0x1a60c0[_0x4241ef(0x1c4)]({'level':_0x4241ef(0x17f),'path':_0x4241ef(0x19a)+_0x3ba670,'code':_0x4241ef(0x1de),'message':'Embedded\x20segment\x20\x27'+_0x3ba670+_0x4241ef(0x184),'location':getLocationFromPath(_0x333a2c['document'],_0x333a2c['source'],[_0x4241ef(0x1fb),_0x3ba670])});}return{'valid':_0x59c6dc['length']===0x0,'errors':_0x59c6dc,'warnings':_0x1a60c0};}
|