@treasuredata/tdx 2026.3.42 → 2026.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a131_0x43f811=a131_0x12a2;(function(_0x13abb5,_0x213fe1){const _0x597747=a131_0x12a2,_0x596260=_0x13abb5();while(!![]){try{const _0x5c8ca3=parseInt(_0x597747(0xbf))/0x1*(parseInt(_0x597747(0xb8))/0x2)+-parseInt(_0x597747(0x87))/0x3*(-parseInt(_0x597747(0xba))/0x4)+parseInt(_0x597747(0xbb))/0x5+parseInt(_0x597747(0xe0))/0x6+-parseInt(_0x597747(0xb6))/0x7+parseInt(_0x597747(0x76))/0x8*(parseInt(_0x597747(0x7b))/0x9)+parseInt(_0x597747(0xc7))/0xa*(-parseInt(_0x597747(0x72))/0xb);if(_0x5c8ca3===_0x213fe1)break;else _0x596260['push'](_0x596260['shift']());}catch(_0x37aa88){_0x596260['push'](_0x596260['shift']());}}}(a131_0x5c20,0x99665));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x96da2){const _0x504318=a131_0x12a2;return _0x96da2[_0x504318(0xa7)]??_0x96da2[_0x504318(0xe6)]?.[_0x504318(0xa7)]??undefined;}function a131_0x12a2(_0x2561e1,_0x1b6047){_0x2561e1=_0x2561e1-0x6c;const _0x5c20cc=a131_0x5c20();let _0x12a218=_0x5c20cc[_0x2561e1];return _0x12a218;}function getVersionNumber(_0xfe5dd7){const _0x307c11=a131_0x12a2;return _0xfe5dd7[_0x307c11(0xd5)]??_0xfe5dd7[_0x307c11(0xe6)]?.['versionNumber']??0x0;}function getState(_0x38171b){const _0x45f852=a131_0x12a2;return _0x38171b[_0x45f852(0xe7)]??_0x38171b['attributes']?.[_0x45f852(0xe7)];}export function deduplicateJourneysByBundle(_0x56bc08){const _0x4109c6=a131_0x12a2,_0x160809=new Map();let _0x5c8885=0x0;for(const _0x7d3475 of _0x56bc08){const _0x5172d4=getBundleId(_0x7d3475);if(!_0x5172d4){const _0x1033d2=_0x4109c6(0xa9)+(_0x7d3475['id']??'idx-'+_0x5c8885++);_0x160809[_0x4109c6(0xb3)](_0x1033d2,_0x7d3475);continue;}const _0x2abdd2=_0x160809[_0x4109c6(0xf4)](_0x5172d4);if(!_0x2abdd2)_0x160809[_0x4109c6(0xb3)](_0x5172d4,_0x7d3475);else{const _0x53d80c=getState(_0x2abdd2)===_0x4109c6(0x73),_0x59113f=getState(_0x7d3475)==='launched';if(_0x59113f&&!_0x53d80c)_0x160809[_0x4109c6(0xb3)](_0x5172d4,_0x7d3475);else{if(!_0x59113f&&_0x53d80c){}else{const _0x2f7e6d=getVersionNumber(_0x2abdd2),_0x1c50b7=getVersionNumber(_0x7d3475);_0x1c50b7>_0x2f7e6d&&_0x160809[_0x4109c6(0xb3)](_0x5172d4,_0x7d3475);}}}}return Array[_0x4109c6(0xa6)](_0x160809[_0x4109c6(0xb1)]());}const VALID_JOURNEY_STATES=new Set([a131_0x43f811(0xc5),a131_0x43f811(0x89),a131_0x43f811(0x73)]);export function parseJourneyState(_0x254872){const _0x489813=a131_0x43f811;if(typeof _0x254872===_0x489813(0xdd)&&VALID_JOURNEY_STATES[_0x489813(0xf5)](_0x254872))return _0x254872;return'draft';}function a131_0x5c20(){const _0x36d99e=['63cbRmMm','exitCriteria','completionRate','ABTest','getColumnMapping','entryCriteria','segmentId','branches','relationships','listEntitiesByFolder','resolveJourneyId','variants','3fBYYBV','length','simulation','steps','NOT_FOUND','getStatistics','createJourneyVersion','JOURNEY_NOT_FOUND','pause','lastVersionNumber','journey','parentFolder','journeyId','cdp_customer_id','intime_stage_','all','exitInflux','journeyStageId','flat','getJourney','_milestone','paused','jumpInflux','filter','conversion','goal','getParentSegmentFull','getTrafficData','DecisionPoint','milestoneInflux','Wait','from','journeyBundleId','\x20in\x20journey\x20','no-bundle-','entryInflux','exitCriterias','audienceId','INVALID_ARGUMENT','toLowerCase','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','data','values','listActivations','set','update','replace','726278prwpnX','isArray','590974cNjjIM','listJourneysWithDetailsFromParentSegment','896916lbXXJo','4397385VotcRF','getJourneyBundle','pauseJourney','exitOrJumpRate','1gmADyX','type','client','_variant_','time','variant','draft','exit_criteria','12770eSOLnU','outtime_stage_','reduce','name','latestJourneyId','createdAt','createActivation','folder-segment','journeyBundleName','updatedAt','description','find','listSegmentFolders','createJourneyActivation','versionNumber','branch','journey_','outtime_journey','listVersions','getBundle','sort','Journey\x20activation\x20step\x20not\x20found:\x20','string','milestone','size','6810264EMZndh','excluded','listJourneysWithDetails','add','timedOutPath','history','attributes','state','applyVersionDeduplication','segmentFolderId','_exit_','intime_goal','waitCondition','checkJourneyAppendable','push','getActivation','intime_journey','Journey\x20not\x20found:\x20','Excluded\x20profiles','activationStepsById','get','has','resumeJourney','cdp_audience_','fetchTrafficRaw','entries','resume','activation','map','journeys','AbTest','out','21461dglPGU','launched','stage','includeHistory','787736hsriBM','includeAllVersions','conditionSegmentId','getConversionSankeyChart','step'];a131_0x5c20=function(){return _0x36d99e;};return a131_0x5c20();}export function entityToJourneyListItem(_0x2acee6,_0x346572){const _0x2a1efa=a131_0x43f811,_0x3154ad=_0x2acee6[_0x2a1efa(0xe6)];return{'id':_0x2acee6['id'],'name':_0x3154ad[_0x2a1efa(0xca)]??'','journeyBundleName':_0x3154ad[_0x2a1efa(0xcf)]??_0x3154ad[_0x2a1efa(0xca)]??'','journeyBundleId':_0x3154ad[_0x2a1efa(0xa7)]??'','versionNumber':_0x3154ad['versionNumber'],'description':_0x3154ad[_0x2a1efa(0xd1)]??null,'state':parseJourneyState(_0x3154ad['state']),'paused':_0x3154ad[_0x2a1efa(0x9c)]??![],'audienceId':_0x346572,'folderId':_0x3154ad[_0x2a1efa(0xe9)]??_0x2acee6[_0x2a1efa(0x83)]?.[_0x2a1efa(0x92)]?.['data']?.['id']??null,'createdAt':_0x3154ad[_0x2a1efa(0xcc)]??'','updatedAt':_0x3154ad[_0x2a1efa(0xd0)]??''};}function convertToColumnId(_0x54842d){const _0x1bbaa4=a131_0x43f811;return _0x54842d[_0x1bbaa4(0xb5)](/-/g,'_');}function getStepEntries(_0x590d33){const _0x2c38f5=a131_0x43f811;if(!_0x590d33)return[];if(Array[_0x2c38f5(0xb7)](_0x590d33))return _0x590d33[_0x2c38f5(0x6e)](_0x466a4c=>[_0x466a4c['id'],_0x466a4c]);return Object[_0x2c38f5(0xf9)](_0x590d33);}export function flattenJourneyActivation(_0x2d38e5){const _0x1d8680=a131_0x43f811,{activationParams:_0x49f4b6,activationId:_0x4c38ab,runAfterJourneyRefresh:_0x47113d}=_0x2d38e5[_0x1d8680(0xe6)];return{'id':_0x2d38e5['id'],'activationId':_0x4c38ab,'runAfterJourneyRefresh':_0x47113d,..._0x49f4b6};}function col(_0x3266bf,_0x45495d={}){return{'column':_0x3266bf,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x45495d};}export function generateColumnMapping(_0x26e7f8){const _0x1dd35c=a131_0x43f811,_0x5ac566=[];_0x5ac566['push'](col(_0x1dd35c(0x94))),_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0xf0),{'direction':'in','category':_0x1dd35c(0x91)})),_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0xd8),{'direction':'out','category':_0x1dd35c(0x91)}));_0x26e7f8[_0x1dd35c(0xe6)][_0x1dd35c(0xa0)]&&_0x5ac566['push'](col(_0x1dd35c(0xeb),{'direction':'in','category':_0x1dd35c(0xa0),'detail':_0x26e7f8['attributes'][_0x1dd35c(0xa0)][_0x1dd35c(0xca)]||null}));const _0x1ca0e0=_0x26e7f8[_0x1dd35c(0xe6)]['journeyStages']||[];for(let _0x33c4f6=0x0;_0x33c4f6<_0x1ca0e0[_0x1dd35c(0x88)];_0x33c4f6++){const _0x4f8c75=_0x1ca0e0[_0x33c4f6],_0x4b325e=_0x4f8c75['name'],_0x121970={'stageIndex':_0x33c4f6,'stageName':_0x4b325e},_0x5a8608=_0x4f8c75[_0x1dd35c(0x80)]?.[_0x1dd35c(0xca)]||null;_0x5ac566['push'](col('intime_stage_'+_0x33c4f6,{..._0x121970,'direction':'in','category':_0x1dd35c(0x74),'detail':_0x5a8608})),_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0xc8)+_0x33c4f6,{..._0x121970,'direction':'out','category':_0x1dd35c(0x74),'detail':_0x5a8608}));_0x4f8c75['milestone']&&_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0x95)+_0x33c4f6+_0x1dd35c(0x9b),{..._0x121970,'direction':'in','category':_0x1dd35c(0xde),'detail':_0x4f8c75[_0x1dd35c(0xde)][_0x1dd35c(0xca)]||null}));const _0x3477db=_0x4f8c75[_0x1dd35c(0xab)]||_0x4f8c75[_0x1dd35c(0x7c)]||[];for(let _0x158578=0x0;_0x158578<_0x3477db['length'];_0x158578++){_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0x95)+_0x33c4f6+_0x1dd35c(0xea)+_0x158578,{..._0x121970,'direction':'in','category':_0x1dd35c(0xc6),'detail':_0x3477db[_0x158578]['name']||null}));}const _0x128c20=getStepEntries(_0x4f8c75[_0x1dd35c(0x8a)]);for(const [_0x4255b2,_0x3a5860]of _0x128c20){const _0x54cdcd=convertToColumnId(_0x4255b2),_0xbf09fe=_0x3a5860[_0x1dd35c(0xc0)]||null,_0x1a94c5=_0x3a5860[_0x1dd35c(0xca)]||null,_0x3ed444={..._0x121970,'stepType':_0xbf09fe,'stepName':_0x1a94c5,'stepId':_0x4255b2};_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0x95)+_0x33c4f6+'_'+_0x54cdcd,{..._0x3ed444,'direction':'in','category':_0x1dd35c(0x7a)})),_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0xc8)+_0x33c4f6+'_'+_0x54cdcd,{..._0x3ed444,'direction':_0x1dd35c(0x71),'category':_0x1dd35c(0x7a)}));if(_0x3a5860[_0x1dd35c(0xc0)]===_0x1dd35c(0xa3)&&_0x3a5860[_0x1dd35c(0x82)])for(const _0x4303a2 of _0x3a5860[_0x1dd35c(0x82)]){_0x4303a2['segmentId']&&_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0x95)+_0x33c4f6+'_'+_0x54cdcd+'_'+_0x4303a2[_0x1dd35c(0x81)],{..._0x3ed444,'direction':'in','category':'branch','detail':_0x4303a2['name']||(_0x4303a2[_0x1dd35c(0xe1)]?_0x1dd35c(0xf2):null)}));}if((_0x3a5860['type']===_0x1dd35c(0x70)||_0x3a5860[_0x1dd35c(0xc0)]===_0x1dd35c(0x7e))&&_0x3a5860[_0x1dd35c(0x86)])for(const _0x8c4534 of _0x3a5860['variants']){_0x8c4534['id']&&_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0x95)+_0x33c4f6+'_'+_0x54cdcd+_0x1dd35c(0xc2)+convertToColumnId(_0x8c4534['id']),{..._0x3ed444,'direction':'in','category':_0x1dd35c(0xc4),'detail':_0x8c4534['name']||null}));}if(_0x3a5860[_0x1dd35c(0xc0)]==='WaitStep'||_0x3a5860['type']===_0x1dd35c(0xa5)){const _0x5e089f=[];if(_0x3a5860[_0x1dd35c(0x78)])_0x5e089f['push'](_0x3a5860[_0x1dd35c(0x78)]);else{if(Array[_0x1dd35c(0xb7)](_0x3a5860['conditions']))for(const _0x3af274 of _0x3a5860['conditions']){_0x3af274['segmentId']&&!_0x3af274[_0x1dd35c(0xe4)]&&_0x5e089f['push'](_0x3af274['segmentId']);}else _0x3a5860[_0x1dd35c(0xec)]?.[_0x1dd35c(0x81)]&&_0x5e089f[_0x1dd35c(0xee)](_0x3a5860['waitCondition'][_0x1dd35c(0x81)]);}for(const _0x320d0 of _0x5e089f){_0x5ac566[_0x1dd35c(0xee)](col(_0x1dd35c(0x95)+_0x33c4f6+'_'+_0x54cdcd+'_'+_0x320d0,{..._0x3ed444,'direction':'in','category':_0x1dd35c(0xd6)}));}}}}return _0x5ac566['push'](col(_0x1dd35c(0xc3))),_0x5ac566;}export function aggregateJourneyHistory(_0x20a87c){const _0x208e8e=a131_0x43f811,_0x1b0433=_0x20a87c[_0x208e8e(0xc9)]((_0xcc587a,_0x2bdea4)=>_0xcc587a+(_0x2bdea4[_0x208e8e(0xaa)]??0x0),0x0),_0x361183=_0x20a87c[_0x208e8e(0xc9)]((_0x3f06ba,_0x86866)=>_0x3f06ba+(_0x86866['goalInflux']??0x0),0x0),_0x13c723=_0x20a87c['reduce']((_0x41e44b,_0x582419)=>_0x41e44b+((_0x582419[_0x208e8e(0x97)]??0x0)+(_0x582419['jumpInflux']??0x0)),0x0),_0x4b4649=_0x20a87c[_0x20a87c[_0x208e8e(0x88)]-0x1];return{'size':_0x4b4649?.[_0x208e8e(0xdf)]??0x0,'entered':_0x1b0433,'goal_achieved':_0x361183,'completion_rate':_0x361183&&_0x1b0433?_0x361183/_0x1b0433*0x64:0x0,'exit_or_jump':_0x13c723,'exit_or_jump_rate':_0x13c723&&_0x1b0433?_0x13c723/_0x1b0433*0x64:0x0};}export function aggregateStageHistory(_0x241a92){const _0x13cb55=a131_0x43f811,_0x490df8=_0x241a92['reduce']((_0x548edc,_0x5f4be9)=>_0x548edc+(_0x5f4be9[_0x13cb55(0xaa)]??0x0),0x0),_0xae0fe6=_0x241a92[_0x13cb55(0xc9)]((_0x56867c,_0x8fdebf)=>_0x56867c+(_0x8fdebf[_0x13cb55(0xa4)]??0x0),0x0),_0x2daa8b=_0x241a92[_0x13cb55(0xc9)]((_0x4a011f,_0x52aadb)=>_0x4a011f+((_0x52aadb[_0x13cb55(0x97)]??0x0)+(_0x52aadb[_0x13cb55(0x9d)]??0x0)),0x0),_0x338048=_0x241a92[_0x241a92[_0x13cb55(0x88)]-0x1];return{'size':_0x338048?.[_0x13cb55(0xdf)]??0x0,'entered':_0x490df8,'milestone':_0xae0fe6,'milestone_rate':_0xae0fe6&&_0x490df8?_0xae0fe6/_0x490df8*0x64:0x0,'exit_or_jump':_0x2daa8b,'exit_or_jump_rate':_0x2daa8b&&_0x490df8?_0x2daa8b/_0x490df8*0x64:0x0};}export function assembleJourneyStats(_0x165059,_0x4359d5){const _0x1ab869=a131_0x43f811,_0xe83a60=!!(_0x4359d5?.[_0x1ab869(0xa6)]||_0x4359d5?.['to'])&&!!_0x165059[_0x1ab869(0xe5)]?.[_0x1ab869(0x88)];if(_0xe83a60){const _0x3a3475=aggregateJourneyHistory(_0x165059['history']),_0x330fcb={'journey_id':_0x165059['journeyId'],..._0x4359d5?.['from']&&{'from':_0x4359d5[_0x1ab869(0xa6)]},..._0x4359d5?.['to']&&{'to':_0x4359d5['to']},..._0x3a3475};return _0x4359d5?.[_0x1ab869(0x75)]&&(_0x330fcb['history']=_0x165059[_0x1ab869(0xe5)]),_0x330fcb;}return{'journey_id':_0x165059[_0x1ab869(0x93)],'size':_0x165059['size'],'entered':_0x165059['enteredSize'],'goal_achieved':_0x165059['goalSize'],'completion_rate':_0x165059[_0x1ab869(0x7d)],'exit_or_jump':_0x165059['exitOrJumpSize'],'exit_or_jump_rate':_0x165059[_0x1ab869(0xbe)]};}export function formatVersionsFromBundle(_0x162101){const _0x4d515a=a131_0x43f811,_0x355fbb=_0x162101[_0x4d515a(0x6f)][_0x4d515a(0x6e)](_0x451014=>({'journeyId':_0x451014['id'],'versionNumber':_0x451014[_0x4d515a(0xe6)][_0x4d515a(0xd5)]??0x0,'name':_0x451014[_0x4d515a(0xe6)][_0x4d515a(0xca)],'state':_0x451014['attributes'][_0x4d515a(0xe7)],'paused':_0x451014[_0x4d515a(0xe6)]['paused'],'createdAt':_0x451014[_0x4d515a(0xe6)][_0x4d515a(0xcc)],'updatedAt':_0x451014[_0x4d515a(0xe6)][_0x4d515a(0xd0)]}));return _0x355fbb[_0x4d515a(0xdb)]((_0x20f95e,_0x106322)=>_0x20f95e['versionNumber']-_0x106322[_0x4d515a(0xd5)]),_0x355fbb;}export function synthesizePreBundleVersion(_0x554adf){const _0x11486e=a131_0x43f811;return{'journeyId':_0x554adf['id'],'versionNumber':0x1,'name':_0x554adf[_0x11486e(0xe6)][_0x11486e(0xca)],'state':_0x554adf[_0x11486e(0xe6)][_0x11486e(0xe7)],'paused':_0x554adf['attributes'][_0x11486e(0x9c)],'createdAt':_0x554adf[_0x11486e(0xe6)][_0x11486e(0xcc)],'updatedAt':_0x554adf['attributes']['updatedAt']};}export function buildStageNameMap(_0xc32607){const _0x3fd786=a131_0x43f811;return new Map(_0xc32607[_0x3fd786(0xe6)]['journeyStages']?.['map'](_0x484ef9=>[_0x484ef9['id'],_0x484ef9[_0x3fd786(0xca)]])??[]);}export class JourneySDK{[a131_0x43f811(0xc1)];constructor(_0x267dca){this['client']=new CDPApiClient(_0x267dca);}[a131_0x43f811(0xe8)](_0xc93fda,_0x27cf34){return _0x27cf34?_0xc93fda:deduplicateJourneysByBundle(_0xc93fda);}async[a131_0x43f811(0xe2)](_0x59b20c,_0x5a4b90){const _0x56b244=a131_0x43f811;try{const _0x405b05=await this['client']['listJourneysWithDetails'](_0x59b20c);return{'journeys':this[_0x56b244(0xe8)](_0x405b05[_0x56b244(0x6f)],_0x5a4b90),'activationStepsById':_0x405b05[_0x56b244(0xf3)]};}catch(_0x4ffb09){if(isHttp404Error(_0x4ffb09))return{'journeys':[],'activationStepsById':new Map()};throw _0x4ffb09;}}async['listJourneysFromParentSegment'](_0x5ddff7,_0x4c2724,_0x434ef5){const _0x6c9806=a131_0x43f811;let _0x4c1ac1=_0x4c2724;if(!_0x4c1ac1)try{const _0xabbcb4=await this[_0x6c9806(0xc1)][_0x6c9806(0xa1)](_0x5ddff7);_0x4c1ac1=_0xabbcb4['rootFolderId']??undefined;}catch(_0xc89f5b){if(isHttp404Error(_0xc89f5b))return[];throw _0xc89f5b;}if(!_0x4c1ac1)return[];let _0x5f58aa;if(_0x434ef5?.[_0x6c9806(0x77)]){const _0x3568ff=await this[_0x6c9806(0xc1)][_0x6c9806(0xd3)](_0x5ddff7),_0x240124=_0x3568ff['map'](_0xc66447=>this[_0x6c9806(0xc1)]['listJourneys'](_0xc66447['id'])),_0x568604=await Promise[_0x6c9806(0x96)](_0x240124),_0x3c518b=new Set();_0x5f58aa=_0x568604[_0x6c9806(0x99)]()[_0x6c9806(0x9e)](_0x33325b=>{const _0x3d6da0=_0x6c9806;if(_0x3c518b[_0x3d6da0(0xf5)](_0x33325b['id']))return![];return _0x3c518b[_0x3d6da0(0xe3)](_0x33325b['id']),!![];});}else{const _0x4ab890=await this[_0x6c9806(0xc1)][_0x6c9806(0x84)](_0x4c1ac1,0x20,![]),_0x4ec160=_0x4ab890[_0x6c9806(0xb0)],_0xea5536=_0x4ec160[_0x6c9806(0x9e)](_0x3617bd=>_0x3617bd[_0x6c9806(0xc0)]===_0x6c9806(0x91));_0x5f58aa=_0xea5536[_0x6c9806(0x6e)](_0x4be129=>entityToJourneyListItem(_0x4be129,_0x5ddff7));}return this[_0x6c9806(0xe8)](_0x5f58aa,_0x434ef5?.[_0x6c9806(0x77)]);}async['listJourneysWithFolders'](_0x1fae1d,_0x51d992,_0x59f144){const _0x210ee6=a131_0x43f811;if(!_0x51d992)return{'journeys':[],'folders':[]};const _0x37e282=await this[_0x210ee6(0xc1)][_0x210ee6(0x84)](_0x51d992,0x20,![]),_0x3415c0=_0x37e282['data'],_0x504bb3=_0x3415c0[_0x210ee6(0x9e)](_0x4bc1bf=>_0x4bc1bf[_0x210ee6(0xc0)]===_0x210ee6(0xce)&&_0x4bc1bf['id']!==_0x51d992),_0x5b3341=_0x504bb3[_0x210ee6(0x6e)](_0x24d28a=>({'id':_0x24d28a['id'],'name':_0x24d28a['attributes'][_0x210ee6(0xca)]})),_0xaf8451=_0x3415c0[_0x210ee6(0x9e)](_0x5bdc38=>_0x5bdc38['type']===_0x210ee6(0x91)),_0xc67341=_0xaf8451[_0x210ee6(0x6e)](_0x470f2c=>entityToJourneyListItem(_0x470f2c,_0x1fae1d));return{'journeys':this['applyVersionDeduplication'](_0xc67341,_0x59f144?.[_0x210ee6(0x77)]),'folders':_0x5b3341};}async[a131_0x43f811(0xb9)](_0x13b549,_0x1021e9){const _0x21703f=a131_0x43f811;let _0x5c27bf;try{_0x5c27bf=await this[_0x21703f(0xc1)][_0x21703f(0xd3)](_0x13b549);}catch(_0x5e7a06){if(isHttp404Error(_0x5e7a06))return{'journeys':[],'activationStepsById':new Map()};throw _0x5e7a06;}const _0x4ffc3f=_0x5c27bf[_0x21703f(0x6e)](async _0x503e7d=>{const _0x146f55=_0x21703f;return await this[_0x146f55(0xe2)](_0x503e7d['id'],_0x1021e9?.[_0x146f55(0x77)]);}),_0x52d8d8=await Promise[_0x21703f(0x96)](_0x4ffc3f),_0x5b55ef=new Map(),_0x4646db=[];for(const _0x1a06bf of _0x52d8d8){_0x4646db[_0x21703f(0xee)](..._0x1a06bf[_0x21703f(0x6f)]);for(const [_0x483fd0,_0xafdc90]of _0x1a06bf[_0x21703f(0xf3)]){_0x5b55ef[_0x21703f(0xb3)](_0x483fd0,_0xafdc90);}}const _0x535f72=new Set(),_0x192bc1=_0x4646db[_0x21703f(0x9e)](_0x41faac=>{const _0x368021=_0x21703f;if(_0x535f72[_0x368021(0xf5)](_0x41faac['id']))return![];return _0x535f72['add'](_0x41faac['id']),!![];});return{'journeys':this[_0x21703f(0xe8)](_0x192bc1,_0x1021e9?.[_0x21703f(0x77)]),'activationStepsById':_0x5b55ef};}async['getJourney'](_0x57c596){const _0xde1357=a131_0x43f811;try{return await this[_0xde1357(0xc1)][_0xde1357(0x9a)](_0x57c596);}catch(_0x276691){if(isHttp404Error(_0x276691))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xde1357(0xf1)+_0x57c596,_0x276691);throw _0x276691;}}async[a131_0x43f811(0x85)](_0x554b03,_0x401c2e){const _0x581379=a131_0x43f811,_0x4aaf6f=await this['listJourneysFromParentSegment'](_0x554b03),_0x44c525=_0x4aaf6f[_0x581379(0xd2)](_0x14c49d=>_0x14c49d[_0x581379(0xcf)][_0x581379(0xae)]()===_0x401c2e[_0x581379(0xae)]());if(!_0x44c525)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x581379(0xf1)+_0x401c2e,undefined,{'helpText':_0x581379(0xaf)});return _0x44c525['id'];}async[a131_0x43f811(0x8c)](_0x565e3f,_0x58a776){const _0x54eb3a=a131_0x43f811;try{return await this[_0x54eb3a(0xc1)]['getJourneyStatistics'](_0x565e3f,_0x58a776);}catch(_0x5a3e16){if(isHttp404Error(_0x5a3e16))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x54eb3a(0xf1)+_0x565e3f,_0x5a3e16);throw _0x5a3e16;}}async[a131_0x43f811(0xa2)](_0x15f201,_0x5bd0f1){const _0x5425ef=a131_0x43f811,_0x21a2f7={'from':_0x5bd0f1?.['from'],'to':_0x5bd0f1?.['to'],'limit':_0x5bd0f1?.['limit']},_0xd94aea=_0x5bd0f1?.['type']!==_0x5425ef(0x9f);try{const [_0x65d6ac,_0x1a402a]=await Promise[_0x5425ef(0x96)]([this[_0x5425ef(0xf8)](_0x15f201,_0x5bd0f1?.[_0x5425ef(0xc0)],_0x21a2f7),_0xd94aea?this['getJourney'](_0x15f201):undefined]);if(_0x65d6ac['activation']&&_0x1a402a){const _0x8d3367=buildStageNameMap(_0x1a402a);_0x65d6ac['activation']=_0x65d6ac['activation'][_0x5425ef(0x6e)](_0x217efc=>({..._0x217efc,'journeyStageName':_0x8d3367[_0x5425ef(0xf4)](_0x217efc[_0x5425ef(0x98)])??_0x217efc['journeyStageId']}));}return _0x65d6ac;}catch(_0x3c2bdd){if(isHttp404Error(_0x3c2bdd))throw new SDKError(ErrorCode[_0x5425ef(0x8e)],_0x5425ef(0xf1)+_0x15f201,_0x3c2bdd);throw _0x3c2bdd;}}async[a131_0x43f811(0xf8)](_0x548c6a,_0x2a2fa0,_0x596dbb){const _0x2e7747=a131_0x43f811;if(_0x2a2fa0==='conversion'){const _0x1b979d=await this[_0x2e7747(0xc1)]['getConversionSankeyChart'](_0x548c6a,_0x596dbb);return{'conversion':_0x1b979d};}if(_0x2a2fa0===_0x2e7747(0x6d)){const _0x546303=await this[_0x2e7747(0xc1)]['getActivationSankeyChart'](_0x548c6a,_0x596dbb);return{'activation':_0x546303};}const [_0x1339d4,_0x3edceb]=await Promise[_0x2e7747(0x96)]([this[_0x2e7747(0xc1)][_0x2e7747(0x79)](_0x548c6a,_0x596dbb),this['client']['getActivationSankeyChart'](_0x548c6a,_0x596dbb)]);return{'conversion':_0x1339d4,'activation':_0x3edceb};}async[a131_0x43f811(0x8f)](_0x579331){const _0x11c872=a131_0x43f811;try{return await this[_0x11c872(0xc1)][_0x11c872(0xbd)](_0x579331);}catch(_0x3a83fb){if(isHttp404Error(_0x3a83fb))throw new SDKError(ErrorCode[_0x11c872(0x8e)],_0x11c872(0xf1)+_0x579331,_0x3a83fb);throw _0x3a83fb;}}async[a131_0x43f811(0x6c)](_0x7a58e1){const _0x900b65=a131_0x43f811;try{return await this[_0x900b65(0xc1)][_0x900b65(0xf6)](_0x7a58e1);}catch(_0x3f8854){if(isHttp404Error(_0x3f8854))throw new SDKError(ErrorCode[_0x900b65(0x8e)],'Journey\x20not\x20found:\x20'+_0x7a58e1,_0x3f8854);throw _0x3f8854;}}async['create'](_0x1903fc){const _0x86d2d0=a131_0x43f811;return await this[_0x86d2d0(0xc1)]['createJourney'](_0x1903fc);}async[a131_0x43f811(0xb4)](_0x77521a,_0x39be74){try{return await this['client']['updateJourney'](_0x77521a,_0x39be74);}catch(_0x562590){if(isHttp404Error(_0x562590))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x77521a,_0x562590);throw _0x562590;}}async[a131_0x43f811(0xef)](_0x3e3d76,_0x3310cd){const _0x163a5b=a131_0x43f811;try{return await this[_0x163a5b(0xc1)]['getJourneyActivation'](_0x3e3d76,_0x3310cd);}catch(_0x496cc2){if(isHttp404Error(_0x496cc2))throw new SDKError(ErrorCode[_0x163a5b(0x8b)],_0x163a5b(0xdc)+_0x3310cd+_0x163a5b(0xa8)+_0x3e3d76,_0x496cc2);throw _0x496cc2;}}async['listActivations'](_0x501f4e){const _0x142870=a131_0x43f811;try{return await this[_0x142870(0xc1)]['listJourneyActivations'](_0x501f4e);}catch(_0x1cc458){if(isHttp404Error(_0x1cc458))return[];throw _0x1cc458;}}async['listActivationsFlat'](_0x3f6217){const _0x5ab8ab=a131_0x43f811,_0x1d33ab=await this[_0x5ab8ab(0xb2)](_0x3f6217);return _0x1d33ab[_0x5ab8ab(0x6e)](flattenJourneyActivation);}async[a131_0x43f811(0xcd)](_0x2cf457,_0x16c10b){const _0x204e23=a131_0x43f811;return await this[_0x204e23(0xc1)][_0x204e23(0xd4)](_0x2cf457,_0x16c10b);}async[a131_0x43f811(0x7f)](_0x44a751){const _0x95029d=a131_0x43f811,_0x16af8b=await this[_0x95029d(0x9a)](_0x44a751),_0x561349=generateColumnMapping(_0x16af8b);return{'journeyId':_0x16af8b['id'],'journeyName':_0x16af8b[_0x95029d(0xe6)][_0x95029d(0xca)],'database':_0x95029d(0xf7)+_0x16af8b['attributes'][_0x95029d(0xac)],'table':_0x95029d(0xd7)+_0x16af8b['id'],'columns':_0x561349};}async[a131_0x43f811(0xda)](_0x3aa21c){const _0x3812a5=a131_0x43f811;return this[_0x3812a5(0xc1)][_0x3812a5(0xbc)](_0x3aa21c);}async['getLatestJourneyId'](_0x3564c0){const _0x1e97ba=a131_0x43f811;if(!_0x3564c0)return undefined;try{const _0x355be2=await this['getBundle'](_0x3564c0);return _0x355be2[_0x1e97ba(0xcb)];}catch{return undefined;}}async[a131_0x43f811(0xd9)](_0x124d3e){const _0x1cfafa=a131_0x43f811,_0xbebf33=await this['getJourney'](_0x124d3e),_0x440cb0=_0xbebf33[_0x1cfafa(0xe6)][_0x1cfafa(0xa7)];if(!_0x440cb0)return{'bundleId':'','bundleName':_0xbebf33[_0x1cfafa(0xe6)]['name'],'bundleDescription':_0xbebf33[_0x1cfafa(0xe6)][_0x1cfafa(0xd1)]??null,'latestJourneyId':_0xbebf33['id'],'versions':[synthesizePreBundleVersion(_0xbebf33)]};const _0x5566c0=await this[_0x1cfafa(0xda)](_0x440cb0);return{'bundleId':_0x440cb0,'bundleName':_0x5566c0[_0x1cfafa(0xca)],'bundleDescription':_0x5566c0[_0x1cfafa(0xd1)]??null,'latestJourneyId':_0x5566c0[_0x1cfafa(0xcb)],'versions':formatVersionsFromBundle(_0x5566c0)};}async['createVersion'](_0x22ba34){const _0x1cf3b0=a131_0x43f811,_0x5f31a8=await this[_0x1cf3b0(0x9a)](_0x22ba34),_0x5c9fb0=_0x5f31a8[_0x1cf3b0(0xe6)][_0x1cf3b0(0xa7)];if(!_0x5c9fb0)throw new SDKError(ErrorCode[_0x1cf3b0(0xad)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this['client'][_0x1cf3b0(0xed)](_0x5c9fb0);const _0x5411da=await this[_0x1cf3b0(0xc1)][_0x1cf3b0(0xbc)](_0x5c9fb0),_0x30a9b6=_0x5411da[_0x1cf3b0(0xca)]+'\x20v'+(_0x5411da[_0x1cf3b0(0x90)]+0x1);return this[_0x1cf3b0(0xc1)][_0x1cf3b0(0x8d)](_0x5c9fb0,{'sourceId':_0x22ba34,'attributes':{'name':_0x30a9b6}});}}
|
|
1
|
+
const a131_0x32e8f2=a131_0x53e2;(function(_0x1b8d98,_0x77a628){const _0x2ae1cd=a131_0x53e2,_0x3527f2=_0x1b8d98();while(!![]){try{const _0x4bbd9a=parseInt(_0x2ae1cd(0x24f))/0x1*(parseInt(_0x2ae1cd(0x232))/0x2)+parseInt(_0x2ae1cd(0x1ea))/0x3*(-parseInt(_0x2ae1cd(0x22b))/0x4)+-parseInt(_0x2ae1cd(0x1ec))/0x5*(parseInt(_0x2ae1cd(0x238))/0x6)+parseInt(_0x2ae1cd(0x220))/0x7+-parseInt(_0x2ae1cd(0x1fe))/0x8*(parseInt(_0x2ae1cd(0x1d2))/0x9)+-parseInt(_0x2ae1cd(0x1f3))/0xa+-parseInt(_0x2ae1cd(0x21a))/0xb*(-parseInt(_0x2ae1cd(0x1fa))/0xc);if(_0x4bbd9a===_0x77a628)break;else _0x3527f2['push'](_0x3527f2['shift']());}catch(_0x4a2344){_0x3527f2['push'](_0x3527f2['shift']());}}}(a131_0x26e7,0x80596));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x50f39c){const _0x48e932=a131_0x53e2;return _0x50f39c[_0x48e932(0x23d)]??_0x50f39c[_0x48e932(0x1e4)]?.[_0x48e932(0x23d)]??undefined;}function getVersionNumber(_0x18d9fe){const _0x34f6a1=a131_0x53e2;return _0x18d9fe['versionNumber']??_0x18d9fe[_0x34f6a1(0x1e4)]?.['versionNumber']??0x0;}function getState(_0x306695){const _0x5d344d=a131_0x53e2;return _0x306695[_0x5d344d(0x1d4)]??_0x306695['attributes']?.['state'];}export function deduplicateJourneysByBundle(_0x124cbc){const _0x29b800=a131_0x53e2,_0x1f3d7b=new Map();let _0x39208e=0x0;for(const _0x5823d2 of _0x124cbc){const _0x30ff01=getBundleId(_0x5823d2);if(!_0x30ff01){const _0x21efc1='no-bundle-'+(_0x5823d2['id']??_0x29b800(0x253)+_0x39208e++);_0x1f3d7b['set'](_0x21efc1,_0x5823d2);continue;}const _0x55f336=_0x1f3d7b[_0x29b800(0x231)](_0x30ff01);if(!_0x55f336)_0x1f3d7b['set'](_0x30ff01,_0x5823d2);else{const _0xd781cb=getState(_0x55f336)===_0x29b800(0x255),_0x355e89=getState(_0x5823d2)===_0x29b800(0x255);if(_0x355e89&&!_0xd781cb)_0x1f3d7b[_0x29b800(0x22f)](_0x30ff01,_0x5823d2);else{if(!_0x355e89&&_0xd781cb){}else{const _0x521201=getVersionNumber(_0x55f336),_0x32d485=getVersionNumber(_0x5823d2);_0x32d485>_0x521201&&_0x1f3d7b[_0x29b800(0x22f)](_0x30ff01,_0x5823d2);}}}}return Array[_0x29b800(0x1d3)](_0x1f3d7b[_0x29b800(0x1c8)]());}const VALID_JOURNEY_STATES=new Set([a131_0x32e8f2(0x1c7),a131_0x32e8f2(0x20d),'launched']);export function parseJourneyState(_0x1d8605){const _0x29f581=a131_0x32e8f2;if(typeof _0x1d8605===_0x29f581(0x1e1)&&VALID_JOURNEY_STATES[_0x29f581(0x21c)](_0x1d8605))return _0x1d8605;return _0x29f581(0x1c7);}export function entityToJourneyListItem(_0x480fec,_0x5e8ead){const _0x3da042=a131_0x32e8f2,_0x4f2d8a=_0x480fec[_0x3da042(0x1e4)];return{'id':_0x480fec['id'],'name':_0x4f2d8a[_0x3da042(0x256)]??'','journeyBundleName':_0x4f2d8a[_0x3da042(0x1fc)]??_0x4f2d8a[_0x3da042(0x256)]??'','journeyBundleId':_0x4f2d8a['journeyBundleId']??'','versionNumber':_0x4f2d8a[_0x3da042(0x249)],'description':_0x4f2d8a[_0x3da042(0x207)]??null,'state':parseJourneyState(_0x4f2d8a[_0x3da042(0x1d4)]),'paused':_0x4f2d8a[_0x3da042(0x24a)]??![],'audienceId':_0x5e8ead,'folderId':_0x4f2d8a[_0x3da042(0x1cf)]??_0x480fec[_0x3da042(0x1f8)]?.[_0x3da042(0x1c4)]?.[_0x3da042(0x240)]?.['id']??null,'createdAt':_0x4f2d8a['createdAt']??'','updatedAt':_0x4f2d8a[_0x3da042(0x217)]??''};}function convertToColumnId(_0x299688){const _0x38a655=a131_0x32e8f2;return _0x299688[_0x38a655(0x1db)](/-/g,'_');}function getStepEntries(_0x321ad6){const _0x163a2b=a131_0x32e8f2;if(!_0x321ad6)return[];if(Array[_0x163a2b(0x236)](_0x321ad6))return _0x321ad6['map'](_0x3f820a=>[_0x3f820a['id'],_0x3f820a]);return Object['entries'](_0x321ad6);}export function flattenJourneyActivation(_0x4e6572){const _0x55203f=a131_0x32e8f2,{activationParams:_0x78b065,activationId:_0x5eba31,runAfterJourneyRefresh:_0x51f925}=_0x4e6572[_0x55203f(0x1e4)];return{'id':_0x4e6572['id'],'activationId':_0x5eba31,'runAfterJourneyRefresh':_0x51f925,..._0x78b065};}function col(_0xfd00cf,_0x388e2a={}){const _0x2becf9=a131_0x32e8f2;return{'column':_0xfd00cf,'direction':null,'stageIndex':null,'stageName':null,'category':_0x2becf9(0x1dc),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x388e2a};}export function generateColumnMapping(_0xeaa17b){const _0x133bb6=a131_0x32e8f2,_0x83a2a0=[];_0x83a2a0[_0x133bb6(0x243)](col('cdp_customer_id')),_0x83a2a0[_0x133bb6(0x243)](col('intime_journey',{'direction':'in','category':'journey'})),_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x201),{'direction':'out','category':'journey'}));_0xeaa17b[_0x133bb6(0x1e4)][_0x133bb6(0x206)]&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1d9),{'direction':'in','category':_0x133bb6(0x206),'detail':_0xeaa17b[_0x133bb6(0x1e4)]['goal']['name']||null}));const _0x4063d3=_0xeaa17b[_0x133bb6(0x1e4)][_0x133bb6(0x213)]||[];for(let _0x4655b1=0x0;_0x4655b1<_0x4063d3[_0x133bb6(0x1ee)];_0x4655b1++){const _0x1d6708=_0x4063d3[_0x4655b1],_0x1ef1ac=_0x1d6708[_0x133bb6(0x256)],_0x611dfc={'stageIndex':_0x4655b1,'stageName':_0x1ef1ac},_0x19804a=_0x1d6708['entryCriteria']?.[_0x133bb6(0x256)]||null;_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1,{..._0x611dfc,'direction':'in','category':_0x133bb6(0x1f2),'detail':_0x19804a})),_0x83a2a0[_0x133bb6(0x243)](col('outtime_stage_'+_0x4655b1,{..._0x611dfc,'direction':_0x133bb6(0x1e8),'category':_0x133bb6(0x1f2),'detail':_0x19804a}));_0x1d6708[_0x133bb6(0x23e)]&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1+_0x133bb6(0x216),{..._0x611dfc,'direction':'in','category':_0x133bb6(0x23e),'detail':_0x1d6708[_0x133bb6(0x23e)][_0x133bb6(0x256)]||null}));const _0x57d3cb=_0x1d6708[_0x133bb6(0x225)]||_0x1d6708[_0x133bb6(0x235)]||[];for(let _0x593036=0x0;_0x593036<_0x57d3cb[_0x133bb6(0x1ee)];_0x593036++){_0x83a2a0[_0x133bb6(0x243)](col('intime_stage_'+_0x4655b1+'_exit_'+_0x593036,{..._0x611dfc,'direction':'in','category':'exit_criteria','detail':_0x57d3cb[_0x593036]['name']||null}));}const _0x57481f=getStepEntries(_0x1d6708[_0x133bb6(0x20c)]);for(const [_0x516ddb,_0x14d2de]of _0x57481f){const _0x3f63ec=convertToColumnId(_0x516ddb),_0x296d3f=_0x14d2de[_0x133bb6(0x1ed)]||null,_0x7f8cd6=_0x14d2de[_0x133bb6(0x256)]||null,_0x26cb5b={..._0x611dfc,'stepType':_0x296d3f,'stepName':_0x7f8cd6,'stepId':_0x516ddb};_0x83a2a0['push'](col('intime_stage_'+_0x4655b1+'_'+_0x3f63ec,{..._0x26cb5b,'direction':'in','category':'step'})),_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cc)+_0x4655b1+'_'+_0x3f63ec,{..._0x26cb5b,'direction':_0x133bb6(0x1e8),'category':_0x133bb6(0x21b)}));if(_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x1df)&&_0x14d2de[_0x133bb6(0x1d0)])for(const _0x617565 of _0x14d2de[_0x133bb6(0x1d0)]){_0x617565['segmentId']&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1+'_'+_0x3f63ec+'_'+_0x617565[_0x133bb6(0x22c)],{..._0x26cb5b,'direction':'in','category':_0x133bb6(0x212),'detail':_0x617565[_0x133bb6(0x256)]||(_0x617565[_0x133bb6(0x24b)]?_0x133bb6(0x1d7):null)}));}if((_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x23b)||_0x14d2de[_0x133bb6(0x1ed)]==='ABTest')&&_0x14d2de[_0x133bb6(0x1c6)])for(const _0x130ceb of _0x14d2de['variants']){_0x130ceb['id']&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1+'_'+_0x3f63ec+_0x133bb6(0x1f4)+convertToColumnId(_0x130ceb['id']),{..._0x26cb5b,'direction':'in','category':_0x133bb6(0x239),'detail':_0x130ceb[_0x133bb6(0x256)]||null}));}if(_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x1d8)||_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x1f0)){const _0x1253b9=[];if(_0x14d2de[_0x133bb6(0x21d)])_0x1253b9['push'](_0x14d2de[_0x133bb6(0x21d)]);else{if(Array['isArray'](_0x14d2de[_0x133bb6(0x1fd)]))for(const _0x3a13aa of _0x14d2de[_0x133bb6(0x1fd)]){_0x3a13aa['segmentId']&&!_0x3a13aa[_0x133bb6(0x1fb)]&&_0x1253b9[_0x133bb6(0x243)](_0x3a13aa['segmentId']);}else _0x14d2de[_0x133bb6(0x1e3)]?.[_0x133bb6(0x22c)]&&_0x1253b9[_0x133bb6(0x243)](_0x14d2de['waitCondition'][_0x133bb6(0x22c)]);}for(const _0x1e3c95 of _0x1253b9){_0x83a2a0['push'](col(_0x133bb6(0x1cb)+_0x4655b1+'_'+_0x3f63ec+'_'+_0x1e3c95,{..._0x26cb5b,'direction':'in','category':_0x133bb6(0x212)}));}}}}return _0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x237))),_0x83a2a0;}export function aggregateJourneyHistory(_0x52c55a){const _0x193300=a131_0x32e8f2,_0x9e8a13=_0x52c55a[_0x193300(0x248)]((_0x5e091a,_0x2a5958)=>_0x5e091a+(_0x2a5958[_0x193300(0x234)]??0x0),0x0),_0x1c5490=_0x52c55a['reduce']((_0x4e38a6,_0x111752)=>_0x4e38a6+(_0x111752[_0x193300(0x211)]??0x0),0x0),_0x1ad0e8=_0x52c55a[_0x193300(0x248)]((_0x3e9cab,_0x32af73)=>_0x3e9cab+((_0x32af73['exitInflux']??0x0)+(_0x32af73[_0x193300(0x202)]??0x0)),0x0),_0x166354=_0x52c55a[_0x52c55a[_0x193300(0x1ee)]-0x1];return{'size':_0x166354?.[_0x193300(0x257)]??0x0,'entered':_0x9e8a13,'goal_achieved':_0x1c5490,'completion_rate':_0x1c5490&&_0x9e8a13?_0x1c5490/_0x9e8a13*0x64:0x0,'exit_or_jump':_0x1ad0e8,'exit_or_jump_rate':_0x1ad0e8&&_0x9e8a13?_0x1ad0e8/_0x9e8a13*0x64:0x0};}export function aggregateStageHistory(_0x367db3){const _0x4b5b9a=a131_0x32e8f2,_0xffab6b=_0x367db3[_0x4b5b9a(0x248)]((_0x284ec3,_0x3f5251)=>_0x284ec3+(_0x3f5251[_0x4b5b9a(0x234)]??0x0),0x0),_0x4dbf00=_0x367db3[_0x4b5b9a(0x248)]((_0x5c900d,_0x573b22)=>_0x5c900d+(_0x573b22[_0x4b5b9a(0x241)]??0x0),0x0),_0x481150=_0x367db3[_0x4b5b9a(0x248)]((_0x2a3529,_0xe51190)=>_0x2a3529+((_0xe51190['exitInflux']??0x0)+(_0xe51190[_0x4b5b9a(0x202)]??0x0)),0x0),_0x4347f5=_0x367db3[_0x367db3[_0x4b5b9a(0x1ee)]-0x1];return{'size':_0x4347f5?.['size']??0x0,'entered':_0xffab6b,'milestone':_0x4dbf00,'milestone_rate':_0x4dbf00&&_0xffab6b?_0x4dbf00/_0xffab6b*0x64:0x0,'exit_or_jump':_0x481150,'exit_or_jump_rate':_0x481150&&_0xffab6b?_0x481150/_0xffab6b*0x64:0x0};}export function assembleJourneyStats(_0x2d62b5,_0x1deeed){const _0x4a5ce9=a131_0x32e8f2,_0x47319a=!!(_0x1deeed?.[_0x4a5ce9(0x1d3)]||_0x1deeed?.['to'])&&!!_0x2d62b5[_0x4a5ce9(0x228)]?.[_0x4a5ce9(0x1ee)];if(_0x47319a){const _0x52e87a=aggregateJourneyHistory(_0x2d62b5[_0x4a5ce9(0x228)]),_0x61e69b={'journey_id':_0x2d62b5[_0x4a5ce9(0x214)],..._0x1deeed?.[_0x4a5ce9(0x1d3)]&&{'from':_0x1deeed[_0x4a5ce9(0x1d3)]},..._0x1deeed?.['to']&&{'to':_0x1deeed['to']},..._0x52e87a};return _0x1deeed?.['includeHistory']&&(_0x61e69b['history']=_0x2d62b5[_0x4a5ce9(0x228)]),_0x61e69b;}return{'journey_id':_0x2d62b5[_0x4a5ce9(0x214)],'size':_0x2d62b5[_0x4a5ce9(0x257)],'entered':_0x2d62b5[_0x4a5ce9(0x24e)],'goal_achieved':_0x2d62b5[_0x4a5ce9(0x22e)],'completion_rate':_0x2d62b5[_0x4a5ce9(0x23f)],'exit_or_jump':_0x2d62b5[_0x4a5ce9(0x1f1)],'exit_or_jump_rate':_0x2d62b5[_0x4a5ce9(0x208)]};}export function formatVersionsFromBundle(_0x9868ca){const _0x19764e=a131_0x32e8f2,_0x102398=_0x9868ca[_0x19764e(0x1e2)][_0x19764e(0x209)](_0x176063=>({'journeyId':_0x176063['id'],'versionNumber':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x249)]??0x0,'name':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x256)],'state':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x1d4)],'paused':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x24a)],'createdAt':_0x176063[_0x19764e(0x1e4)]['createdAt'],'updatedAt':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x217)]}));return _0x102398[_0x19764e(0x20e)]((_0x1c3fcd,_0x36bfbe)=>_0x1c3fcd['versionNumber']-_0x36bfbe[_0x19764e(0x249)]),_0x102398;}function a131_0x26e7(){const _0x386f4d=['resumeJourney','journey','segmentFolderId','branches','getActivation','108XKqnUy','from','state','pause','getConversionSankeyChart','Excluded\x20profiles','WaitStep','intime_goal','createVersion','replace','fixed','JOURNEY_NOT_FOUND','all','DecisionPoint','add','string','journeys','waitCondition','attributes','includeAllVersions','activation','listJourneys','out','getActivationSankeyChart','1365123QyetGd','listJourneysWithFolders','115kZsfQU','type','length','create','Wait','exitOrJumpSize','stage','2220630IidvXi','_variant_','getTrafficData','listVersions','filter','relationships','folder-segment','12oLvGMV','timedOutPath','journeyBundleName','conditions','77336NwBPOG','listSegmentFolders','getJourneyActivation','outtime_journey','jumpInflux','listJourneysFromParentSegment','applyVersionDeduplication','listActivations','goal','description','exitOrJumpRate','map','activationStepsById','INVALID_ARGUMENT','steps','simulation','sort','createJourney','getJourneyStatistics','goalInflux','branch','journeyStages','journeyId','pauseJourney','_milestone','updatedAt','getLatestJourneyId','listActivationsFlat','9214579UAliOG','step','has','conditionSegmentId','latestJourneyId','getJourneyBundle','497042euswHJ','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','conversion','rootFolderId','listJourneysWithDetails','exitCriterias','cdp_audience_','lastVersionNumber','history','limit','audienceId','4RHolCM','segmentId','listEntitiesByFolder','goalSize','set','\x20in\x20journey\x20','get','8wcMYEk','createJourneyVersion','entryInflux','exitCriteria','isArray','time','146994dOxxCr','variant','journeyStageId','AbTest','resume','journeyBundleId','milestone','completionRate','data','milestoneInflux','getColumnMapping','push','toLowerCase','getBundle','Journey\x20not\x20found:\x20','updateJourney','reduce','versionNumber','paused','excluded','flat','journey_','enteredSize','243402SYjQho','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','NOT_FOUND','client','idx-','fetchTrafficRaw','launched','name','size','parentFolder','createdAt','variants','draft','values','getJourney','checkJourneyAppendable','intime_stage_','outtime_stage_'];a131_0x26e7=function(){return _0x386f4d;};return a131_0x26e7();}function a131_0x53e2(_0x21902d,_0x3d02c9){_0x21902d=_0x21902d-0x1c4;const _0x26e76e=a131_0x26e7();let _0x53e2a9=_0x26e76e[_0x21902d];return _0x53e2a9;}export function synthesizePreBundleVersion(_0x373ff0){const _0x112ddb=a131_0x32e8f2;return{'journeyId':_0x373ff0['id'],'versionNumber':0x1,'name':_0x373ff0[_0x112ddb(0x1e4)]['name'],'state':_0x373ff0['attributes'][_0x112ddb(0x1d4)],'paused':_0x373ff0['attributes'][_0x112ddb(0x24a)],'createdAt':_0x373ff0[_0x112ddb(0x1e4)][_0x112ddb(0x1c5)],'updatedAt':_0x373ff0[_0x112ddb(0x1e4)][_0x112ddb(0x217)]};}export function buildStageNameMap(_0x479ab8){const _0x4be349=a131_0x32e8f2;return new Map(_0x479ab8['attributes'][_0x4be349(0x213)]?.[_0x4be349(0x209)](_0x4edcee=>[_0x4edcee['id'],_0x4edcee[_0x4be349(0x256)]])??[]);}export class JourneySDK{[a131_0x32e8f2(0x252)];constructor(_0x2a5268){const _0x5d1310=a131_0x32e8f2;this[_0x5d1310(0x252)]=new CDPApiClient(_0x2a5268);}['applyVersionDeduplication'](_0x51b4c3,_0x5ca9c3){return _0x5ca9c3?_0x51b4c3:deduplicateJourneysByBundle(_0x51b4c3);}async[a131_0x32e8f2(0x224)](_0x42c991,_0x5e286c){const _0x2ee6b3=a131_0x32e8f2;try{const _0x3b397f=await this['client'][_0x2ee6b3(0x224)](_0x42c991);return{'journeys':this[_0x2ee6b3(0x204)](_0x3b397f['journeys'],_0x5e286c),'activationStepsById':_0x3b397f[_0x2ee6b3(0x20a)]};}catch(_0x5ddac1){if(isHttp404Error(_0x5ddac1))return{'journeys':[],'activationStepsById':new Map()};throw _0x5ddac1;}}async[a131_0x32e8f2(0x203)](_0xe5c958,_0x2e5e33,_0x19df30){const _0x334529=a131_0x32e8f2;let _0x1892d7=_0x2e5e33;if(!_0x1892d7)try{const _0xe2470a=await this['client']['getParentSegmentFull'](_0xe5c958);_0x1892d7=_0xe2470a[_0x334529(0x223)]??undefined;}catch(_0x18c815){if(isHttp404Error(_0x18c815))return[];throw _0x18c815;}if(!_0x1892d7)return[];let _0x451069;if(_0x19df30?.[_0x334529(0x1e5)]){const _0x3c8ec2=await this[_0x334529(0x252)][_0x334529(0x1ff)](_0xe5c958),_0x3ec865=_0x3c8ec2[_0x334529(0x209)](_0x4a9df6=>this[_0x334529(0x252)][_0x334529(0x1e7)](_0x4a9df6['id'])),_0x43cbb3=await Promise[_0x334529(0x1de)](_0x3ec865),_0x2d6253=new Set();_0x451069=_0x43cbb3[_0x334529(0x24c)]()['filter'](_0x54b29f=>{const _0x2a526c=_0x334529;if(_0x2d6253['has'](_0x54b29f['id']))return![];return _0x2d6253[_0x2a526c(0x1e0)](_0x54b29f['id']),!![];});}else{const _0x2def16=await this[_0x334529(0x252)]['listEntitiesByFolder'](_0x1892d7,0x20,![]),_0x5b8993=_0x2def16[_0x334529(0x240)],_0xfd3af7=_0x5b8993[_0x334529(0x1f7)](_0xf52bb8=>_0xf52bb8[_0x334529(0x1ed)]===_0x334529(0x1ce));_0x451069=_0xfd3af7[_0x334529(0x209)](_0x2dc516=>entityToJourneyListItem(_0x2dc516,_0xe5c958));}return this[_0x334529(0x204)](_0x451069,_0x19df30?.[_0x334529(0x1e5)]);}async[a131_0x32e8f2(0x1eb)](_0xdd6874,_0x53ec12,_0x3273c2){const _0x9a8c75=a131_0x32e8f2;if(!_0x53ec12)return{'journeys':[],'folders':[]};const _0x4eaba6=await this[_0x9a8c75(0x252)][_0x9a8c75(0x22d)](_0x53ec12,0x20,![]),_0x3bddcf=_0x4eaba6[_0x9a8c75(0x240)],_0x421525=_0x3bddcf['filter'](_0x2545fd=>_0x2545fd['type']===_0x9a8c75(0x1f9)&&_0x2545fd['id']!==_0x53ec12),_0x2b777d=_0x421525[_0x9a8c75(0x209)](_0x576468=>({'id':_0x576468['id'],'name':_0x576468['attributes'][_0x9a8c75(0x256)]})),_0x57f694=_0x3bddcf[_0x9a8c75(0x1f7)](_0x18b0a7=>_0x18b0a7[_0x9a8c75(0x1ed)]===_0x9a8c75(0x1ce)),_0x54558b=_0x57f694[_0x9a8c75(0x209)](_0x38fb0f=>entityToJourneyListItem(_0x38fb0f,_0xdd6874));return{'journeys':this['applyVersionDeduplication'](_0x54558b,_0x3273c2?.[_0x9a8c75(0x1e5)]),'folders':_0x2b777d};}async['listJourneysWithDetailsFromParentSegment'](_0x2b2f56,_0x373f50){const _0x46dd9d=a131_0x32e8f2;let _0x17725c;try{_0x17725c=await this[_0x46dd9d(0x252)]['listSegmentFolders'](_0x2b2f56);}catch(_0x5c194d){if(isHttp404Error(_0x5c194d))return{'journeys':[],'activationStepsById':new Map()};throw _0x5c194d;}const _0x11cb19=_0x17725c['map'](async _0x47f904=>{const _0x1e3153=_0x46dd9d;return await this[_0x1e3153(0x224)](_0x47f904['id'],_0x373f50?.[_0x1e3153(0x1e5)]);}),_0xa893fb=await Promise[_0x46dd9d(0x1de)](_0x11cb19),_0x4bfc5b=new Map(),_0x1c081b=[];for(const _0xa6ba9c of _0xa893fb){_0x1c081b[_0x46dd9d(0x243)](..._0xa6ba9c[_0x46dd9d(0x1e2)]);for(const [_0x504f0f,_0x19c3c7]of _0xa6ba9c[_0x46dd9d(0x20a)]){_0x4bfc5b[_0x46dd9d(0x22f)](_0x504f0f,_0x19c3c7);}}const _0x5f43f1=new Set(),_0x375135=_0x1c081b['filter'](_0xb9791=>{const _0x4d711d=_0x46dd9d;if(_0x5f43f1[_0x4d711d(0x21c)](_0xb9791['id']))return![];return _0x5f43f1['add'](_0xb9791['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x375135,_0x373f50?.[_0x46dd9d(0x1e5)]),'activationStepsById':_0x4bfc5b};}async[a131_0x32e8f2(0x1c9)](_0x46cce0){const _0x19fbc4=a131_0x32e8f2;try{return await this[_0x19fbc4(0x252)][_0x19fbc4(0x1c9)](_0x46cce0);}catch(_0x404c2b){if(isHttp404Error(_0x404c2b))throw new SDKError(ErrorCode[_0x19fbc4(0x1dd)],_0x19fbc4(0x246)+_0x46cce0,_0x404c2b);throw _0x404c2b;}}async['resolveJourneyId'](_0x499a5b,_0x480286){const _0x471f97=a131_0x32e8f2,_0x1d6b28=await this['listJourneysFromParentSegment'](_0x499a5b),_0x336cb5=_0x1d6b28['find'](_0x4dd002=>_0x4dd002[_0x471f97(0x1fc)][_0x471f97(0x244)]()===_0x480286['toLowerCase']());if(!_0x336cb5)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x471f97(0x246)+_0x480286,undefined,{'helpText':_0x471f97(0x250)});return _0x336cb5['id'];}async['getStatistics'](_0x432403,_0x237e49){const _0x4ae775=a131_0x32e8f2;try{return await this['client'][_0x4ae775(0x210)](_0x432403,_0x237e49);}catch(_0x36328d){if(isHttp404Error(_0x36328d))throw new SDKError(ErrorCode[_0x4ae775(0x1dd)],'Journey\x20not\x20found:\x20'+_0x432403,_0x36328d);throw _0x36328d;}}async[a131_0x32e8f2(0x1f5)](_0xcefd4c,_0x13b35f){const _0x5598b4=a131_0x32e8f2,_0x592d4f={'from':_0x13b35f?.[_0x5598b4(0x1d3)],'to':_0x13b35f?.['to'],'limit':_0x13b35f?.[_0x5598b4(0x229)]},_0x1eff3e=_0x13b35f?.[_0x5598b4(0x1ed)]!==_0x5598b4(0x222);try{const [_0x42d665,_0x625e8d]=await Promise[_0x5598b4(0x1de)]([this[_0x5598b4(0x254)](_0xcefd4c,_0x13b35f?.[_0x5598b4(0x1ed)],_0x592d4f),_0x1eff3e?this[_0x5598b4(0x1c9)](_0xcefd4c):undefined]);if(_0x42d665['activation']&&_0x625e8d){const _0x997038=buildStageNameMap(_0x625e8d);_0x42d665['activation']=_0x42d665['activation']['map'](_0x42e8d7=>({..._0x42e8d7,'journeyStageName':_0x997038[_0x5598b4(0x231)](_0x42e8d7[_0x5598b4(0x23a)])??_0x42e8d7[_0x5598b4(0x23a)]}));}return _0x42d665;}catch(_0x2f5c34){if(isHttp404Error(_0x2f5c34))throw new SDKError(ErrorCode[_0x5598b4(0x1dd)],_0x5598b4(0x246)+_0xcefd4c,_0x2f5c34);throw _0x2f5c34;}}async['fetchTrafficRaw'](_0x4df39c,_0x33899c,_0x426c2d){const _0x1199eb=a131_0x32e8f2;if(_0x33899c==='conversion'){const _0x237aeb=await this[_0x1199eb(0x252)]['getConversionSankeyChart'](_0x4df39c,_0x426c2d);return{'conversion':_0x237aeb};}if(_0x33899c===_0x1199eb(0x1e6)){const _0x522671=await this[_0x1199eb(0x252)][_0x1199eb(0x1e9)](_0x4df39c,_0x426c2d);return{'activation':_0x522671};}const [_0x1fe2ba,_0x340895]=await Promise[_0x1199eb(0x1de)]([this[_0x1199eb(0x252)][_0x1199eb(0x1d6)](_0x4df39c,_0x426c2d),this[_0x1199eb(0x252)][_0x1199eb(0x1e9)](_0x4df39c,_0x426c2d)]);return{'conversion':_0x1fe2ba,'activation':_0x340895};}async[a131_0x32e8f2(0x1d5)](_0x5105ee){const _0x333370=a131_0x32e8f2;try{return await this[_0x333370(0x252)][_0x333370(0x215)](_0x5105ee);}catch(_0x4a50ea){if(isHttp404Error(_0x4a50ea))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x333370(0x246)+_0x5105ee,_0x4a50ea);throw _0x4a50ea;}}async[a131_0x32e8f2(0x23c)](_0x478b9e){const _0x27af78=a131_0x32e8f2;try{return await this[_0x27af78(0x252)][_0x27af78(0x1cd)](_0x478b9e);}catch(_0x208750){if(isHttp404Error(_0x208750))throw new SDKError(ErrorCode[_0x27af78(0x1dd)],_0x27af78(0x246)+_0x478b9e,_0x208750);throw _0x208750;}}async[a131_0x32e8f2(0x1ef)](_0xa93a3c){const _0x5dba73=a131_0x32e8f2;return await this[_0x5dba73(0x252)][_0x5dba73(0x20f)](_0xa93a3c);}async['update'](_0x2b9e17,_0xb86bf8){const _0xe1d5a5=a131_0x32e8f2;try{return await this[_0xe1d5a5(0x252)][_0xe1d5a5(0x247)](_0x2b9e17,_0xb86bf8);}catch(_0xeb5608){if(isHttp404Error(_0xeb5608))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xe1d5a5(0x246)+_0x2b9e17,_0xeb5608);throw _0xeb5608;}}async[a131_0x32e8f2(0x1d1)](_0x13a7cf,_0x23f9dd){const _0xdbfd5e=a131_0x32e8f2;try{return await this['client'][_0xdbfd5e(0x200)](_0x13a7cf,_0x23f9dd);}catch(_0x1a4da4){if(isHttp404Error(_0x1a4da4))throw new SDKError(ErrorCode[_0xdbfd5e(0x251)],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x23f9dd+_0xdbfd5e(0x230)+_0x13a7cf,_0x1a4da4);throw _0x1a4da4;}}async[a131_0x32e8f2(0x205)](_0x11f44f){const _0x50de23=a131_0x32e8f2;try{return await this[_0x50de23(0x252)]['listJourneyActivations'](_0x11f44f);}catch(_0x433e37){if(isHttp404Error(_0x433e37))return[];throw _0x433e37;}}async[a131_0x32e8f2(0x219)](_0xc581a8){const _0x63d56=a131_0x32e8f2,_0x25ed06=await this[_0x63d56(0x205)](_0xc581a8);return _0x25ed06[_0x63d56(0x209)](flattenJourneyActivation);}async['createActivation'](_0x68615,_0x42f608){return await this['client']['createJourneyActivation'](_0x68615,_0x42f608);}async[a131_0x32e8f2(0x242)](_0xb95ba4){const _0xe265a9=a131_0x32e8f2,_0x2ccf25=await this['getJourney'](_0xb95ba4),_0x359e86=generateColumnMapping(_0x2ccf25);return{'journeyId':_0x2ccf25['id'],'journeyName':_0x2ccf25[_0xe265a9(0x1e4)]['name'],'database':_0xe265a9(0x226)+_0x2ccf25['attributes'][_0xe265a9(0x22a)],'table':_0xe265a9(0x24d)+_0x2ccf25['id'],'columns':_0x359e86};}async[a131_0x32e8f2(0x245)](_0x12c28e){const _0x45fc45=a131_0x32e8f2;return this[_0x45fc45(0x252)][_0x45fc45(0x21f)](_0x12c28e);}async[a131_0x32e8f2(0x218)](_0xa2c03d){if(!_0xa2c03d)return undefined;try{const _0x37298e=await this['getBundle'](_0xa2c03d);return _0x37298e['latestJourneyId'];}catch{return undefined;}}async[a131_0x32e8f2(0x1f6)](_0x43643c){const _0x3b9289=a131_0x32e8f2,_0x47ed7e=await this[_0x3b9289(0x1c9)](_0x43643c),_0x43f023=_0x47ed7e[_0x3b9289(0x1e4)]['journeyBundleId'];if(!_0x43f023)return{'bundleId':'','bundleName':_0x47ed7e[_0x3b9289(0x1e4)][_0x3b9289(0x256)],'bundleDescription':_0x47ed7e[_0x3b9289(0x1e4)][_0x3b9289(0x207)]??null,'latestJourneyId':_0x47ed7e['id'],'versions':[synthesizePreBundleVersion(_0x47ed7e)]};const _0x477a2e=await this[_0x3b9289(0x245)](_0x43f023);return{'bundleId':_0x43f023,'bundleName':_0x477a2e['name'],'bundleDescription':_0x477a2e['description']??null,'latestJourneyId':_0x477a2e[_0x3b9289(0x21e)],'versions':formatVersionsFromBundle(_0x477a2e)};}async[a131_0x32e8f2(0x1da)](_0x4ac9ef){const _0x500e75=a131_0x32e8f2,_0x133dbc=await this[_0x500e75(0x1c9)](_0x4ac9ef),_0x235b71=_0x133dbc['attributes']['journeyBundleId'];if(!_0x235b71)throw new SDKError(ErrorCode[_0x500e75(0x20b)],_0x500e75(0x221));await this[_0x500e75(0x252)][_0x500e75(0x1ca)](_0x235b71);const _0x5e96f4=await this[_0x500e75(0x252)]['getJourneyBundle'](_0x235b71),_0x23db49=_0x5e96f4[_0x500e75(0x256)]+'\x20v'+(_0x5e96f4[_0x500e75(0x227)]+0x1);return this[_0x500e75(0x252)][_0x500e75(0x233)](_0x235b71,{'sourceId':_0x4ac9ef,'attributes':{'name':_0x23db49}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a132_0x4d0f(_0x20e31e,_0x20306e){_0x20e31e=_0x20e31e-0xde;const _0x3e69d1=a132_0x3e69();let _0x4d0f86=_0x3e69d1[_0x20e31e];return _0x4d0f86;}const a132_0x4a093e=a132_0x4d0f;(function(_0x3ceaa9,_0x22c8f1){const _0x5f49fb=a132_0x4d0f,_0x35dfee=_0x3ceaa9();while(!![]){try{const _0x580406=parseInt(_0x5f49fb(0xe1))/0x1+-parseInt(_0x5f49fb(0xe3))/0x2+-parseInt(_0x5f49fb(0xe8))/0x3+parseInt(_0x5f49fb(0xe0))/0x4*(parseInt(_0x5f49fb(0xe6))/0x5)+parseInt(_0x5f49fb(0xe7))/0x6*(-parseInt(_0x5f49fb(0xdf))/0x7)+parseInt(_0x5f49fb(0xe4))/0x8*(-parseInt(_0x5f49fb(0xe9))/0x9)+parseInt(_0x5f49fb(0xde))/0xa*(parseInt(_0x5f49fb(0xe5))/0xb);if(_0x580406===_0x22c8f1)break;else _0x35dfee['push'](_0x35dfee['shift']());}catch(_0x5757a8){_0x35dfee['push'](_0x35dfee['shift']());}}}(a132_0x3e69,0xa43ac));function a132_0x3e69(){const _0x368e3d=['5949UsDBoH','last_chat_id','llm/chat','read','24984650bsJaQM','917DIpVCy','6284fUOGhu','479178cDRjHf','write','4740XCMKPs','14016DgHEuO','11GqUxsE','1270DLDRXv','37008NdjPEy','2206629IiAmaD'];a132_0x3e69=function(){return _0x368e3d;};return a132_0x3e69();}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x4a093e(0xea),a132_0x4a093e(0xeb));export function saveLastChatId(_0x1819c1){const _0x1e7d70=a132_0x4a093e;chatIdCache[_0x1e7d70(0xe2)](_0x1819c1);}export function loadLastChatId(){const _0x75b6a8=a132_0x4a093e;return chatIdCache[_0x75b6a8(0xec)]();}export function clearLastChatId(){chatIdCache['clear']();}
|