@treasuredata/tdx 2026.3.46 → 2026.3.47
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/builtin-schedules/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +5 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +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 +2 -2
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a131_0xe7bfb5=a131_0x3522;(function(_0x48b812,_0x9d825c){const _0x5e23ab=a131_0x3522,_0x37d838=_0x48b812();while(!![]){try{const _0xac1c45=parseInt(_0x5e23ab(0x21a))/0x1+parseInt(_0x5e23ab(0x208))/0x2*(-parseInt(_0x5e23ab(0x217))/0x3)+parseInt(_0x5e23ab(0x1f8))/0x4+-parseInt(_0x5e23ab(0x1b1))/0x5+parseInt(_0x5e23ab(0x1bb))/0x6*(parseInt(_0x5e23ab(0x19c))/0x7)+parseInt(_0x5e23ab(0x1b9))/0x8*(-parseInt(_0x5e23ab(0x1b3))/0x9)+parseInt(_0x5e23ab(0x1d5))/0xa;if(_0xac1c45===_0x9d825c)break;else _0x37d838['push'](_0x37d838['shift']());}catch(_0x310f8d){_0x37d838['push'](_0x37d838['shift']());}}}(a131_0x5367,0x72b06));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x379168){const _0x3ddbdc=a131_0x3522;return _0x379168['journeyBundleId']??_0x379168[_0x3ddbdc(0x1d2)]?.[_0x3ddbdc(0x1ae)]??undefined;}function getVersionNumber(_0x1ae273){const _0x44fdd7=a131_0x3522;return _0x1ae273[_0x44fdd7(0x1c5)]??_0x1ae273[_0x44fdd7(0x1d2)]?.['versionNumber']??0x0;}function a131_0x5367(){const _0x5a39dd=['update','getJourneyStatistics','goalSize','from','idx-','map','conditions','launched','state','time','exitCriteria','journeyBundleName','relationships','DecisionPoint','createJourneyActivation','variant','_milestone','Journey\x20activation\x20step\x20not\x20found:\x20','getConversionSankeyChart','includeAllVersions','client','journey','push','231464SWqrWF','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','updateJourney','type','JOURNEY_NOT_FOUND','outtime_stage_','fixed','getJourney','journeyId','INVALID_ARGUMENT','segmentFolderId','entryInflux','activationStepsById','size','no-bundle-','getJourneyActivation','894HnlMlr','listJourneysWithDetails','reduce','length','name','listActivationsFlat','Journey\x20not\x20found:\x20','listJourneysFromParentSegment','cdp_customer_id','getLatestJourneyId','getTrafficData','journeys','entries','get','getActivation','645Bpylhx','goalInflux','pause','412092uLWrop','resumeJourney','waitCondition','folder-segment','goal','resolveJourneyId','latestJourneyId','listJourneyActivations','create','createActivation','conditionSegmentId','rootFolderId','createJourneyVersion','listSegmentFolders','isArray','Wait','922698ToRyDd','createdAt','all','exitOrJumpSize','jumpInflux','out','cdp_audience_','activation','description','resume','intime_stage_','listJourneysWithFolders','steps','milestoneInflux','paused','getStatistics','simulation','filter','journeyBundleId','milestone','segmentId','3082065rfWNUg','step','522gCSyOJ','has','WaitStep','updatedAt','enteredSize','pauseJourney','105416DrjqRv','audienceId','42RSQMek','createJourney','variants','flat','getBundle','journeyStageId','exitCriterias','limit','applyVersionDeduplication','exitOrJumpRate','versionNumber','getColumnMapping','conversion','find','exitInflux','stage','data','lastVersionNumber','checkJourneyAppendable','set','sort','_variant_','branches','attributes','createVersion','draft','5538940BbciSg','parentFolder','string','fetchTrafficRaw','exit_criteria','toLowerCase','_exit_','getJourneyBundle','add','history','listActivations','AbTest'];a131_0x5367=function(){return _0x5a39dd;};return a131_0x5367();}function getState(_0x2941fc){const _0x307468=a131_0x3522;return _0x2941fc[_0x307468(0x1e9)]??_0x2941fc[_0x307468(0x1d2)]?.[_0x307468(0x1e9)];}export function deduplicateJourneysByBundle(_0x3bc73c){const _0x81dc20=a131_0x3522,_0x39fecb=new Map();let _0x552dc3=0x0;for(const _0x1e36dd of _0x3bc73c){const _0x1de49d=getBundleId(_0x1e36dd);if(!_0x1de49d){const _0x361171=_0x81dc20(0x206)+(_0x1e36dd['id']??_0x81dc20(0x1e5)+_0x552dc3++);_0x39fecb[_0x81dc20(0x1ce)](_0x361171,_0x1e36dd);continue;}const _0x42ed79=_0x39fecb[_0x81dc20(0x215)](_0x1de49d);if(!_0x42ed79)_0x39fecb[_0x81dc20(0x1ce)](_0x1de49d,_0x1e36dd);else{const _0x57fa64=getState(_0x42ed79)===_0x81dc20(0x1e8),_0x41a71b=getState(_0x1e36dd)===_0x81dc20(0x1e8);if(_0x41a71b&&!_0x57fa64)_0x39fecb['set'](_0x1de49d,_0x1e36dd);else{if(!_0x41a71b&&_0x57fa64){}else{const _0x19f1d4=getVersionNumber(_0x42ed79),_0x21868e=getVersionNumber(_0x1e36dd);_0x21868e>_0x19f1d4&&_0x39fecb[_0x81dc20(0x1ce)](_0x1de49d,_0x1e36dd);}}}}return Array[_0x81dc20(0x1e4)](_0x39fecb['values']());}const VALID_JOURNEY_STATES=new Set(['draft',a131_0xe7bfb5(0x1ac),a131_0xe7bfb5(0x1e8)]);export function parseJourneyState(_0xef30f4){const _0x5ba665=a131_0xe7bfb5;if(typeof _0xef30f4===_0x5ba665(0x1d7)&&VALID_JOURNEY_STATES[_0x5ba665(0x1b4)](_0xef30f4))return _0xef30f4;return _0x5ba665(0x1d4);}export function entityToJourneyListItem(_0x9e3818,_0x3e82da){const _0x27f4df=a131_0xe7bfb5,_0x323a90=_0x9e3818['attributes'];return{'id':_0x9e3818['id'],'name':_0x323a90[_0x27f4df(0x20c)]??'','journeyBundleName':_0x323a90[_0x27f4df(0x1ec)]??_0x323a90[_0x27f4df(0x20c)]??'','journeyBundleId':_0x323a90[_0x27f4df(0x1ae)]??'','versionNumber':_0x323a90[_0x27f4df(0x1c5)],'description':_0x323a90[_0x27f4df(0x1a4)]??null,'state':parseJourneyState(_0x323a90[_0x27f4df(0x1e9)]),'paused':_0x323a90['paused']??![],'audienceId':_0x3e82da,'folderId':_0x323a90[_0x27f4df(0x202)]??_0x9e3818[_0x27f4df(0x1ed)]?.[_0x27f4df(0x1d6)]?.[_0x27f4df(0x1cb)]?.['id']??null,'createdAt':_0x323a90[_0x27f4df(0x19d)]??'','updatedAt':_0x323a90[_0x27f4df(0x1b6)]??''};}function convertToColumnId(_0x577116){return _0x577116['replace'](/-/g,'_');}function getStepEntries(_0x194562){const _0x4866e5=a131_0xe7bfb5;if(!_0x194562)return[];if(Array[_0x4866e5(0x19a)](_0x194562))return _0x194562['map'](_0x398e7d=>[_0x398e7d['id'],_0x398e7d]);return Object[_0x4866e5(0x214)](_0x194562);}export function flattenJourneyActivation(_0x365c3b){const _0x417c7a=a131_0xe7bfb5,{activationParams:_0x4fa393,activationId:_0x3da4fb,runAfterJourneyRefresh:_0x5cfd57}=_0x365c3b[_0x417c7a(0x1d2)];return{'id':_0x365c3b['id'],'activationId':_0x3da4fb,'runAfterJourneyRefresh':_0x5cfd57,..._0x4fa393};}function a131_0x3522(_0x26c140,_0x993c98){_0x26c140=_0x26c140-0x193;const _0x536784=a131_0x5367();let _0x352238=_0x536784[_0x26c140];return _0x352238;}function col(_0x2fcba0,_0x38f576={}){const _0x3b7949=a131_0xe7bfb5;return{'column':_0x2fcba0,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3b7949(0x1fe),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x38f576};}export function generateColumnMapping(_0x4196c9){const _0x33b5b0=a131_0xe7bfb5,_0x2778dc=[];_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x210))),_0x2778dc[_0x33b5b0(0x1f7)](col('intime_journey',{'direction':'in','category':_0x33b5b0(0x1f6)})),_0x2778dc[_0x33b5b0(0x1f7)](col('outtime_journey',{'direction':'out','category':_0x33b5b0(0x1f6)}));_0x4196c9['attributes'][_0x33b5b0(0x21e)]&&_0x2778dc[_0x33b5b0(0x1f7)](col('intime_goal',{'direction':'in','category':_0x33b5b0(0x21e),'detail':_0x4196c9[_0x33b5b0(0x1d2)]['goal'][_0x33b5b0(0x20c)]||null}));const _0x34235e=_0x4196c9['attributes']['journeyStages']||[];for(let _0x380b14=0x0;_0x380b14<_0x34235e['length'];_0x380b14++){const _0x5c62f2=_0x34235e[_0x380b14],_0x1ae8c4=_0x5c62f2['name'],_0x4c43bb={'stageIndex':_0x380b14,'stageName':_0x1ae8c4},_0x358c13=_0x5c62f2['entryCriteria']?.[_0x33b5b0(0x20c)]||null;_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1a6)+_0x380b14,{..._0x4c43bb,'direction':'in','category':_0x33b5b0(0x1ca),'detail':_0x358c13})),_0x2778dc['push'](col(_0x33b5b0(0x1fd)+_0x380b14,{..._0x4c43bb,'direction':_0x33b5b0(0x1a1),'category':_0x33b5b0(0x1ca),'detail':_0x358c13}));_0x5c62f2[_0x33b5b0(0x1af)]&&_0x2778dc['push'](col(_0x33b5b0(0x1a6)+_0x380b14+_0x33b5b0(0x1f1),{..._0x4c43bb,'direction':'in','category':_0x33b5b0(0x1af),'detail':_0x5c62f2[_0x33b5b0(0x1af)][_0x33b5b0(0x20c)]||null}));const _0x181183=_0x5c62f2[_0x33b5b0(0x1c1)]||_0x5c62f2[_0x33b5b0(0x1eb)]||[];for(let _0x136d93=0x0;_0x136d93<_0x181183[_0x33b5b0(0x20b)];_0x136d93++){_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1a6)+_0x380b14+_0x33b5b0(0x1db)+_0x136d93,{..._0x4c43bb,'direction':'in','category':_0x33b5b0(0x1d9),'detail':_0x181183[_0x136d93][_0x33b5b0(0x20c)]||null}));}const _0x1e5d60=getStepEntries(_0x5c62f2[_0x33b5b0(0x1a8)]);for(const [_0x100740,_0x9b4694]of _0x1e5d60){const _0x5d2426=convertToColumnId(_0x100740),_0x38b3c8=_0x9b4694[_0x33b5b0(0x1fb)]||null,_0x1a16b6=_0x9b4694[_0x33b5b0(0x20c)]||null,_0x1b838c={..._0x4c43bb,'stepType':_0x38b3c8,'stepName':_0x1a16b6,'stepId':_0x100740};_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1a6)+_0x380b14+'_'+_0x5d2426,{..._0x1b838c,'direction':'in','category':_0x33b5b0(0x1b2)})),_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1fd)+_0x380b14+'_'+_0x5d2426,{..._0x1b838c,'direction':_0x33b5b0(0x1a1),'category':_0x33b5b0(0x1b2)}));if(_0x9b4694[_0x33b5b0(0x1fb)]===_0x33b5b0(0x1ee)&&_0x9b4694[_0x33b5b0(0x1d1)])for(const _0x44fcab of _0x9b4694[_0x33b5b0(0x1d1)]){_0x44fcab['segmentId']&&_0x2778dc['push'](col(_0x33b5b0(0x1a6)+_0x380b14+'_'+_0x5d2426+'_'+_0x44fcab[_0x33b5b0(0x1b0)],{..._0x1b838c,'direction':'in','category':'branch','detail':_0x44fcab[_0x33b5b0(0x20c)]||(_0x44fcab['excluded']?'Excluded\x20profiles':null)}));}if((_0x9b4694[_0x33b5b0(0x1fb)]===_0x33b5b0(0x1e0)||_0x9b4694[_0x33b5b0(0x1fb)]==='ABTest')&&_0x9b4694['variants'])for(const _0x12722a of _0x9b4694[_0x33b5b0(0x1bd)]){_0x12722a['id']&&_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1a6)+_0x380b14+'_'+_0x5d2426+_0x33b5b0(0x1d0)+convertToColumnId(_0x12722a['id']),{..._0x1b838c,'direction':'in','category':_0x33b5b0(0x1f0),'detail':_0x12722a['name']||null}));}if(_0x9b4694[_0x33b5b0(0x1fb)]===_0x33b5b0(0x1b5)||_0x9b4694[_0x33b5b0(0x1fb)]===_0x33b5b0(0x19b)){const _0x1e64c6=[];if(_0x9b4694[_0x33b5b0(0x196)])_0x1e64c6['push'](_0x9b4694[_0x33b5b0(0x196)]);else{if(Array[_0x33b5b0(0x19a)](_0x9b4694['conditions']))for(const _0x215c1f of _0x9b4694[_0x33b5b0(0x1e7)]){_0x215c1f[_0x33b5b0(0x1b0)]&&!_0x215c1f['timedOutPath']&&_0x1e64c6[_0x33b5b0(0x1f7)](_0x215c1f[_0x33b5b0(0x1b0)]);}else _0x9b4694[_0x33b5b0(0x21c)]?.[_0x33b5b0(0x1b0)]&&_0x1e64c6[_0x33b5b0(0x1f7)](_0x9b4694[_0x33b5b0(0x21c)][_0x33b5b0(0x1b0)]);}for(const _0x5bbdac of _0x1e64c6){_0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1a6)+_0x380b14+'_'+_0x5d2426+'_'+_0x5bbdac,{..._0x1b838c,'direction':'in','category':'branch'}));}}}}return _0x2778dc[_0x33b5b0(0x1f7)](col(_0x33b5b0(0x1ea))),_0x2778dc;}export function aggregateJourneyHistory(_0x2069ef){const _0x394bf8=a131_0xe7bfb5,_0x1335be=_0x2069ef['reduce']((_0x545b51,_0x29dfc0)=>_0x545b51+(_0x29dfc0[_0x394bf8(0x203)]??0x0),0x0),_0x25e761=_0x2069ef['reduce']((_0x460340,_0x394981)=>_0x460340+(_0x394981[_0x394bf8(0x218)]??0x0),0x0),_0x4cc230=_0x2069ef[_0x394bf8(0x20a)]((_0x5e00dc,_0x2f40e0)=>_0x5e00dc+((_0x2f40e0[_0x394bf8(0x1c9)]??0x0)+(_0x2f40e0[_0x394bf8(0x1a0)]??0x0)),0x0),_0x1828fc=_0x2069ef[_0x2069ef[_0x394bf8(0x20b)]-0x1];return{'size':_0x1828fc?.[_0x394bf8(0x205)]??0x0,'entered':_0x1335be,'goal_achieved':_0x25e761,'completion_rate':_0x25e761&&_0x1335be?_0x25e761/_0x1335be*0x64:0x0,'exit_or_jump':_0x4cc230,'exit_or_jump_rate':_0x4cc230&&_0x1335be?_0x4cc230/_0x1335be*0x64:0x0};}export function aggregateStageHistory(_0x5b8d08){const _0x58c421=a131_0xe7bfb5,_0x345ea4=_0x5b8d08[_0x58c421(0x20a)]((_0x12549e,_0xef5b63)=>_0x12549e+(_0xef5b63[_0x58c421(0x203)]??0x0),0x0),_0xf5b40=_0x5b8d08[_0x58c421(0x20a)]((_0x5a968a,_0x2a80eb)=>_0x5a968a+(_0x2a80eb[_0x58c421(0x1a9)]??0x0),0x0),_0x564732=_0x5b8d08[_0x58c421(0x20a)]((_0x2bac2b,_0x54ed10)=>_0x2bac2b+((_0x54ed10[_0x58c421(0x1c9)]??0x0)+(_0x54ed10[_0x58c421(0x1a0)]??0x0)),0x0),_0x34afde=_0x5b8d08[_0x5b8d08[_0x58c421(0x20b)]-0x1];return{'size':_0x34afde?.[_0x58c421(0x205)]??0x0,'entered':_0x345ea4,'milestone':_0xf5b40,'milestone_rate':_0xf5b40&&_0x345ea4?_0xf5b40/_0x345ea4*0x64:0x0,'exit_or_jump':_0x564732,'exit_or_jump_rate':_0x564732&&_0x345ea4?_0x564732/_0x345ea4*0x64:0x0};}export function assembleJourneyStats(_0x2cdd31,_0x1b081d){const _0x57aa99=a131_0xe7bfb5,_0x10068f=!!(_0x1b081d?.[_0x57aa99(0x1e4)]||_0x1b081d?.['to'])&&!!_0x2cdd31['history']?.['length'];if(_0x10068f){const _0x3b0269=aggregateJourneyHistory(_0x2cdd31[_0x57aa99(0x1de)]),_0x1ed452={'journey_id':_0x2cdd31[_0x57aa99(0x200)],..._0x1b081d?.[_0x57aa99(0x1e4)]&&{'from':_0x1b081d[_0x57aa99(0x1e4)]},..._0x1b081d?.['to']&&{'to':_0x1b081d['to']},..._0x3b0269};return _0x1b081d?.['includeHistory']&&(_0x1ed452['history']=_0x2cdd31['history']),_0x1ed452;}return{'journey_id':_0x2cdd31['journeyId'],'size':_0x2cdd31[_0x57aa99(0x205)],'entered':_0x2cdd31[_0x57aa99(0x1b7)],'goal_achieved':_0x2cdd31[_0x57aa99(0x1e3)],'completion_rate':_0x2cdd31['completionRate'],'exit_or_jump':_0x2cdd31[_0x57aa99(0x19f)],'exit_or_jump_rate':_0x2cdd31[_0x57aa99(0x1c4)]};}export function formatVersionsFromBundle(_0x3a6a7c){const _0x9b6e02=a131_0xe7bfb5,_0x532637=_0x3a6a7c[_0x9b6e02(0x213)][_0x9b6e02(0x1e6)](_0x452e37=>({'journeyId':_0x452e37['id'],'versionNumber':_0x452e37[_0x9b6e02(0x1d2)]['versionNumber']??0x0,'name':_0x452e37['attributes'][_0x9b6e02(0x20c)],'state':_0x452e37[_0x9b6e02(0x1d2)][_0x9b6e02(0x1e9)],'paused':_0x452e37['attributes']['paused'],'createdAt':_0x452e37['attributes'][_0x9b6e02(0x19d)],'updatedAt':_0x452e37[_0x9b6e02(0x1d2)][_0x9b6e02(0x1b6)]}));return _0x532637[_0x9b6e02(0x1cf)]((_0x39e459,_0x487209)=>_0x39e459['versionNumber']-_0x487209['versionNumber']),_0x532637;}export function synthesizePreBundleVersion(_0x5b3226){const _0x12644e=a131_0xe7bfb5;return{'journeyId':_0x5b3226['id'],'versionNumber':0x1,'name':_0x5b3226[_0x12644e(0x1d2)][_0x12644e(0x20c)],'state':_0x5b3226[_0x12644e(0x1d2)][_0x12644e(0x1e9)],'paused':_0x5b3226[_0x12644e(0x1d2)][_0x12644e(0x1aa)],'createdAt':_0x5b3226[_0x12644e(0x1d2)][_0x12644e(0x19d)],'updatedAt':_0x5b3226[_0x12644e(0x1d2)][_0x12644e(0x1b6)]};}export function buildStageNameMap(_0x137049){const _0x37b2b3=a131_0xe7bfb5;return new Map(_0x137049[_0x37b2b3(0x1d2)]['journeyStages']?.[_0x37b2b3(0x1e6)](_0x5cb720=>[_0x5cb720['id'],_0x5cb720[_0x37b2b3(0x20c)]])??[]);}export class JourneySDK{[a131_0xe7bfb5(0x1f5)];constructor(_0x3e2bb2){const _0x4a8556=a131_0xe7bfb5;this[_0x4a8556(0x1f5)]=new CDPApiClient(_0x3e2bb2);}[a131_0xe7bfb5(0x1c3)](_0x8d18e8,_0x48d9b0){return _0x48d9b0?_0x8d18e8:deduplicateJourneysByBundle(_0x8d18e8);}async[a131_0xe7bfb5(0x209)](_0x502525,_0x262d35){const _0x769000=a131_0xe7bfb5;try{const _0x42852e=await this[_0x769000(0x1f5)][_0x769000(0x209)](_0x502525);return{'journeys':this[_0x769000(0x1c3)](_0x42852e['journeys'],_0x262d35),'activationStepsById':_0x42852e[_0x769000(0x204)]};}catch(_0x4265b7){if(isHttp404Error(_0x4265b7))return{'journeys':[],'activationStepsById':new Map()};throw _0x4265b7;}}async[a131_0xe7bfb5(0x20f)](_0x25dc94,_0x1b40be,_0x5cb0ef){const _0xa977cd=a131_0xe7bfb5;let _0x255347=_0x1b40be;if(!_0x255347)try{const _0x5df31b=await this[_0xa977cd(0x1f5)]['getParentSegmentFull'](_0x25dc94);_0x255347=_0x5df31b[_0xa977cd(0x197)]??undefined;}catch(_0x1f5ff2){if(isHttp404Error(_0x1f5ff2))return[];throw _0x1f5ff2;}if(!_0x255347)return[];let _0x486cad;if(_0x5cb0ef?.[_0xa977cd(0x1f4)]){const _0xbc2366=await this['client'][_0xa977cd(0x199)](_0x25dc94),_0x35589f=_0xbc2366[_0xa977cd(0x1e6)](_0x5d5a19=>this[_0xa977cd(0x1f5)]['listJourneys'](_0x5d5a19['id'])),_0x9c9a46=await Promise[_0xa977cd(0x19e)](_0x35589f),_0x506e8f=new Set();_0x486cad=_0x9c9a46[_0xa977cd(0x1be)]()[_0xa977cd(0x1ad)](_0xd8cc98=>{const _0x4a8272=_0xa977cd;if(_0x506e8f[_0x4a8272(0x1b4)](_0xd8cc98['id']))return![];return _0x506e8f[_0x4a8272(0x1dd)](_0xd8cc98['id']),!![];});}else{const _0x194080=await this['client']['listEntitiesByFolder'](_0x255347,0x20,![]),_0x435b5c=_0x194080['data'],_0x4dd3c9=_0x435b5c['filter'](_0x5bbf25=>_0x5bbf25['type']===_0xa977cd(0x1f6));_0x486cad=_0x4dd3c9[_0xa977cd(0x1e6)](_0x146fdc=>entityToJourneyListItem(_0x146fdc,_0x25dc94));}return this['applyVersionDeduplication'](_0x486cad,_0x5cb0ef?.[_0xa977cd(0x1f4)]);}async[a131_0xe7bfb5(0x1a7)](_0x1ad320,_0xabafd,_0x2536be){const _0x26c420=a131_0xe7bfb5;if(!_0xabafd)return{'journeys':[],'folders':[]};const _0x2ef321=await this[_0x26c420(0x1f5)]['listEntitiesByFolder'](_0xabafd,0x20,![]),_0x394dbb=_0x2ef321[_0x26c420(0x1cb)],_0x26a9cf=_0x394dbb['filter'](_0xec00b4=>_0xec00b4[_0x26c420(0x1fb)]===_0x26c420(0x21d)&&_0xec00b4['id']!==_0xabafd),_0x1916fc=_0x26a9cf[_0x26c420(0x1e6)](_0x1c247e=>({'id':_0x1c247e['id'],'name':_0x1c247e[_0x26c420(0x1d2)][_0x26c420(0x20c)]})),_0xd29a06=_0x394dbb[_0x26c420(0x1ad)](_0x3f9c32=>_0x3f9c32[_0x26c420(0x1fb)]===_0x26c420(0x1f6)),_0x14f0ce=_0xd29a06['map'](_0x31abe7=>entityToJourneyListItem(_0x31abe7,_0x1ad320));return{'journeys':this[_0x26c420(0x1c3)](_0x14f0ce,_0x2536be?.['includeAllVersions']),'folders':_0x1916fc};}async['listJourneysWithDetailsFromParentSegment'](_0x18a785,_0x100bfd){const _0x13fc5c=a131_0xe7bfb5;let _0x3d032b;try{_0x3d032b=await this[_0x13fc5c(0x1f5)][_0x13fc5c(0x199)](_0x18a785);}catch(_0x354815){if(isHttp404Error(_0x354815))return{'journeys':[],'activationStepsById':new Map()};throw _0x354815;}const _0x1e03be=_0x3d032b[_0x13fc5c(0x1e6)](async _0xfdf0a9=>{const _0x375737=_0x13fc5c;return await this['listJourneysWithDetails'](_0xfdf0a9['id'],_0x100bfd?.[_0x375737(0x1f4)]);}),_0x4c2ab4=await Promise['all'](_0x1e03be),_0x539bb4=new Map(),_0x280ae1=[];for(const _0x4ce40f of _0x4c2ab4){_0x280ae1['push'](..._0x4ce40f[_0x13fc5c(0x213)]);for(const [_0x36d193,_0x452d8b]of _0x4ce40f['activationStepsById']){_0x539bb4['set'](_0x36d193,_0x452d8b);}}const _0x5ad381=new Set(),_0x6c8799=_0x280ae1[_0x13fc5c(0x1ad)](_0x276c3c=>{const _0x1a8874=_0x13fc5c;if(_0x5ad381[_0x1a8874(0x1b4)](_0x276c3c['id']))return![];return _0x5ad381[_0x1a8874(0x1dd)](_0x276c3c['id']),!![];});return{'journeys':this[_0x13fc5c(0x1c3)](_0x6c8799,_0x100bfd?.[_0x13fc5c(0x1f4)]),'activationStepsById':_0x539bb4};}async[a131_0xe7bfb5(0x1ff)](_0x38d932){const _0x44ca8f=a131_0xe7bfb5;try{return await this[_0x44ca8f(0x1f5)][_0x44ca8f(0x1ff)](_0x38d932);}catch(_0x501e5e){if(isHttp404Error(_0x501e5e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x44ca8f(0x20e)+_0x38d932,_0x501e5e);throw _0x501e5e;}}async[a131_0xe7bfb5(0x21f)](_0x52f795,_0x388fa0){const _0x31b655=a131_0xe7bfb5,_0x2aa064=await this[_0x31b655(0x20f)](_0x52f795),_0x5f5604=_0x2aa064[_0x31b655(0x1c8)](_0x3ff615=>_0x3ff615[_0x31b655(0x1ec)][_0x31b655(0x1da)]()===_0x388fa0[_0x31b655(0x1da)]());if(!_0x5f5604)throw new SDKError(ErrorCode[_0x31b655(0x1fc)],_0x31b655(0x20e)+_0x388fa0,undefined,{'helpText':_0x31b655(0x1f9)});return _0x5f5604['id'];}async[a131_0xe7bfb5(0x1ab)](_0x5339ad,_0x44f0f2){const _0x32129f=a131_0xe7bfb5;try{return await this[_0x32129f(0x1f5)][_0x32129f(0x1e2)](_0x5339ad,_0x44f0f2);}catch(_0x4589df){if(isHttp404Error(_0x4589df))throw new SDKError(ErrorCode[_0x32129f(0x1fc)],_0x32129f(0x20e)+_0x5339ad,_0x4589df);throw _0x4589df;}}async[a131_0xe7bfb5(0x212)](_0x166d8a,_0x3aca14){const _0x3deb82=a131_0xe7bfb5,_0x2eb70e={'from':_0x3aca14?.[_0x3deb82(0x1e4)],'to':_0x3aca14?.['to'],'limit':_0x3aca14?.[_0x3deb82(0x1c2)]},_0x5327ab=_0x3aca14?.[_0x3deb82(0x1fb)]!==_0x3deb82(0x1c7);try{const [_0x269f6d,_0x3ca3df]=await Promise['all']([this['fetchTrafficRaw'](_0x166d8a,_0x3aca14?.['type'],_0x2eb70e),_0x5327ab?this[_0x3deb82(0x1ff)](_0x166d8a):undefined]);if(_0x269f6d['activation']&&_0x3ca3df){const _0xfc6abd=buildStageNameMap(_0x3ca3df);_0x269f6d[_0x3deb82(0x1a3)]=_0x269f6d[_0x3deb82(0x1a3)]['map'](_0x1a8d1c=>({..._0x1a8d1c,'journeyStageName':_0xfc6abd[_0x3deb82(0x215)](_0x1a8d1c[_0x3deb82(0x1c0)])??_0x1a8d1c[_0x3deb82(0x1c0)]}));}return _0x269f6d;}catch(_0x25416f){if(isHttp404Error(_0x25416f))throw new SDKError(ErrorCode[_0x3deb82(0x1fc)],_0x3deb82(0x20e)+_0x166d8a,_0x25416f);throw _0x25416f;}}async[a131_0xe7bfb5(0x1d8)](_0x5a3617,_0x36cf81,_0x1015a0){const _0x8a0f13=a131_0xe7bfb5;if(_0x36cf81===_0x8a0f13(0x1c7)){const _0x569764=await this[_0x8a0f13(0x1f5)][_0x8a0f13(0x1f3)](_0x5a3617,_0x1015a0);return{'conversion':_0x569764};}if(_0x36cf81===_0x8a0f13(0x1a3)){const _0x77728f=await this['client']['getActivationSankeyChart'](_0x5a3617,_0x1015a0);return{'activation':_0x77728f};}const [_0x2ca4ad,_0x2e6324]=await Promise[_0x8a0f13(0x19e)]([this['client'][_0x8a0f13(0x1f3)](_0x5a3617,_0x1015a0),this[_0x8a0f13(0x1f5)]['getActivationSankeyChart'](_0x5a3617,_0x1015a0)]);return{'conversion':_0x2ca4ad,'activation':_0x2e6324};}async[a131_0xe7bfb5(0x219)](_0x24ca30){const _0x2d03b3=a131_0xe7bfb5;try{return await this['client'][_0x2d03b3(0x1b8)](_0x24ca30);}catch(_0x41e69e){if(isHttp404Error(_0x41e69e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x24ca30,_0x41e69e);throw _0x41e69e;}}async[a131_0xe7bfb5(0x1a5)](_0x2871c9){const _0x58e167=a131_0xe7bfb5;try{return await this[_0x58e167(0x1f5)][_0x58e167(0x21b)](_0x2871c9);}catch(_0x19b36a){if(isHttp404Error(_0x19b36a))throw new SDKError(ErrorCode[_0x58e167(0x1fc)],_0x58e167(0x20e)+_0x2871c9,_0x19b36a);throw _0x19b36a;}}async[a131_0xe7bfb5(0x194)](_0x2b4ef1){const _0x78bf16=a131_0xe7bfb5;return await this[_0x78bf16(0x1f5)][_0x78bf16(0x1bc)](_0x2b4ef1);}async[a131_0xe7bfb5(0x1e1)](_0x2daee5,_0x2f0603){const _0x1e4e73=a131_0xe7bfb5;try{return await this['client'][_0x1e4e73(0x1fa)](_0x2daee5,_0x2f0603);}catch(_0x38230e){if(isHttp404Error(_0x38230e))throw new SDKError(ErrorCode[_0x1e4e73(0x1fc)],_0x1e4e73(0x20e)+_0x2daee5,_0x38230e);throw _0x38230e;}}async[a131_0xe7bfb5(0x216)](_0x46a4cc,_0x39ec6c){const _0x24495e=a131_0xe7bfb5;try{return await this[_0x24495e(0x1f5)][_0x24495e(0x207)](_0x46a4cc,_0x39ec6c);}catch(_0x295b3a){if(isHttp404Error(_0x295b3a))throw new SDKError(ErrorCode['NOT_FOUND'],_0x24495e(0x1f2)+_0x39ec6c+'\x20in\x20journey\x20'+_0x46a4cc,_0x295b3a);throw _0x295b3a;}}async[a131_0xe7bfb5(0x1df)](_0x12d2b5){const _0x5d91fe=a131_0xe7bfb5;try{return await this[_0x5d91fe(0x1f5)][_0x5d91fe(0x193)](_0x12d2b5);}catch(_0x200ac7){if(isHttp404Error(_0x200ac7))return[];throw _0x200ac7;}}async[a131_0xe7bfb5(0x20d)](_0x139aea){const _0x532d2e=a131_0xe7bfb5,_0x22e84c=await this['listActivations'](_0x139aea);return _0x22e84c[_0x532d2e(0x1e6)](flattenJourneyActivation);}async[a131_0xe7bfb5(0x195)](_0x1f0cd4,_0xd076ea){const _0x42e792=a131_0xe7bfb5;return await this[_0x42e792(0x1f5)][_0x42e792(0x1ef)](_0x1f0cd4,_0xd076ea);}async[a131_0xe7bfb5(0x1c6)](_0x55ecb0){const _0x37c14d=a131_0xe7bfb5,_0x4b66c0=await this[_0x37c14d(0x1ff)](_0x55ecb0),_0x434476=generateColumnMapping(_0x4b66c0);return{'journeyId':_0x4b66c0['id'],'journeyName':_0x4b66c0[_0x37c14d(0x1d2)][_0x37c14d(0x20c)],'database':_0x37c14d(0x1a2)+_0x4b66c0[_0x37c14d(0x1d2)][_0x37c14d(0x1ba)],'table':'journey_'+_0x4b66c0['id'],'columns':_0x434476};}async[a131_0xe7bfb5(0x1bf)](_0x476050){const _0x39dede=a131_0xe7bfb5;return this['client'][_0x39dede(0x1dc)](_0x476050);}async[a131_0xe7bfb5(0x211)](_0x1dc16b){const _0x42a25c=a131_0xe7bfb5;if(!_0x1dc16b)return undefined;try{const _0xd1afd0=await this[_0x42a25c(0x1bf)](_0x1dc16b);return _0xd1afd0[_0x42a25c(0x220)];}catch{return undefined;}}async['listVersions'](_0x4f0a19){const _0x35380d=a131_0xe7bfb5,_0x5b6d62=await this['getJourney'](_0x4f0a19),_0x54b98c=_0x5b6d62['attributes'][_0x35380d(0x1ae)];if(!_0x54b98c)return{'bundleId':'','bundleName':_0x5b6d62[_0x35380d(0x1d2)][_0x35380d(0x20c)],'bundleDescription':_0x5b6d62[_0x35380d(0x1d2)][_0x35380d(0x1a4)]??null,'latestJourneyId':_0x5b6d62['id'],'versions':[synthesizePreBundleVersion(_0x5b6d62)]};const _0x34e348=await this[_0x35380d(0x1bf)](_0x54b98c);return{'bundleId':_0x54b98c,'bundleName':_0x34e348[_0x35380d(0x20c)],'bundleDescription':_0x34e348['description']??null,'latestJourneyId':_0x34e348['latestJourneyId'],'versions':formatVersionsFromBundle(_0x34e348)};}async[a131_0xe7bfb5(0x1d3)](_0x884e09){const _0x87d381=a131_0xe7bfb5,_0x558250=await this[_0x87d381(0x1ff)](_0x884e09),_0x17ad28=_0x558250['attributes'][_0x87d381(0x1ae)];if(!_0x17ad28)throw new SDKError(ErrorCode[_0x87d381(0x201)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x87d381(0x1f5)][_0x87d381(0x1cd)](_0x17ad28);const _0x3fadf4=await this['client'][_0x87d381(0x1dc)](_0x17ad28),_0x39af00=_0x3fadf4[_0x87d381(0x20c)]+'\x20v'+(_0x3fadf4[_0x87d381(0x1cc)]+0x1);return this[_0x87d381(0x1f5)][_0x87d381(0x198)](_0x17ad28,{'sourceId':_0x884e09,'attributes':{'name':_0x39af00}});}}
|
|
1
|
+
const a131_0x5c8e47=a131_0x58dd;(function(_0x45e48f,_0x210894){const _0x37d6ff=a131_0x58dd,_0x33a790=_0x45e48f();while(!![]){try{const _0x55a312=-parseInt(_0x37d6ff(0x15a))/0x1*(-parseInt(_0x37d6ff(0x1a9))/0x2)+-parseInt(_0x37d6ff(0x170))/0x3+-parseInt(_0x37d6ff(0x11e))/0x4*(-parseInt(_0x37d6ff(0x122))/0x5)+-parseInt(_0x37d6ff(0x17e))/0x6*(-parseInt(_0x37d6ff(0x192))/0x7)+parseInt(_0x37d6ff(0x126))/0x8+-parseInt(_0x37d6ff(0x17a))/0x9+parseInt(_0x37d6ff(0x129))/0xa*(-parseInt(_0x37d6ff(0x12c))/0xb);if(_0x55a312===_0x210894)break;else _0x33a790['push'](_0x33a790['shift']());}catch(_0x4c7ee2){_0x33a790['push'](_0x33a790['shift']());}}}(a131_0x33a2,0x986c4));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0xe4e675){const _0x80dcbd=a131_0x58dd;return _0xe4e675[_0x80dcbd(0x195)]??_0xe4e675[_0x80dcbd(0x14b)]?.[_0x80dcbd(0x195)]??undefined;}function getVersionNumber(_0x4b6b2d){const _0x1cb334=a131_0x58dd;return _0x4b6b2d[_0x1cb334(0x169)]??_0x4b6b2d[_0x1cb334(0x14b)]?.['versionNumber']??0x0;}function a131_0x33a2(){const _0x5dcb46=['update','createJourneyVersion','5685136KtAAod','INVALID_ARGUMENT','createdAt','6523150BEmSMY','has','_exit_','22gdoZCT','parentFolder','folder-segment','state','branches','Journey\x20not\x20found:\x20','latestJourneyId','createJourney','resumeJourney','_variant_','Journey\x20activation\x20step\x20not\x20found:\x20','listJourneys','get','waitCondition','journey_','client','exitOrJumpSize','simulation','getActivationSankeyChart','push','set','listEntitiesByFolder','Excluded\x20profiles','map','journey','getJourneyBundle','filter','getJourneyStatistics','intime_stage_','toLowerCase','_milestone','attributes','description','milestone','getParentSegmentFull','goalSize','getBundle','entries','values','exitCriterias','journeys','Wait','DecisionPoint','resolveJourneyId','reduce','fixed','182079ZBYPYL','listJourneysWithDetailsFromParentSegment','data','JOURNEY_NOT_FOUND','conditions','listVersions','includeAllVersions','completionRate','name','checkJourneyAppendable','string','activationStepsById','time','lastVersionNumber','AbTest','versionNumber','exit_criteria','conditionSegmentId','milestoneInflux','getLatestJourneyId','getActivation','listActivations','604692UPirbU','relationships','intime_journey','goalInflux','step','from','branch','journeyId','paused','fetchTrafficRaw','7743510ptBGpZ','draft','getConversionSankeyChart','size','36JiapqR','resume','entryInflux','exitCriteria','rootFolderId','updatedAt','replace','jumpInflux','segmentFolderId','excluded','activation','variants','history','journeyStageId','launched','cdp_customer_id','listJourneysWithFolders','length','getJourney','goal','929957rvPJFJ','all','limit','journeyBundleId','ABTest','WaitStep','steps','out','exitInflux','entryCriteria','idx-','pauseJourney','journeyBundleName','listSegmentFolders','applyVersionDeduplication','createJourneyActivation','type','sort','variant','enteredSize','createVersion','segmentId','create','4vLpWSo','listJourneysWithDetails','outtime_journey','includeHistory','conversion','pause','524vvXGOI','getColumnMapping','\x20in\x20journey\x20','cdp_audience_','42710DrkIqq','exitOrJumpRate'];a131_0x33a2=function(){return _0x5dcb46;};return a131_0x33a2();}function getState(_0x7b7048){const _0xb204b5=a131_0x58dd;return _0x7b7048[_0xb204b5(0x12f)]??_0x7b7048[_0xb204b5(0x14b)]?.['state'];}export function deduplicateJourneysByBundle(_0x58c3d3){const _0x455440=a131_0x58dd,_0x2c05c5=new Map();let _0x40a1fd=0x0;for(const _0x3880be of _0x58c3d3){const _0x1c14c8=getBundleId(_0x3880be);if(!_0x1c14c8){const _0x334fb9='no-bundle-'+(_0x3880be['id']??_0x455440(0x19c)+_0x40a1fd++);_0x2c05c5[_0x455440(0x140)](_0x334fb9,_0x3880be);continue;}const _0xee1b9=_0x2c05c5['get'](_0x1c14c8);if(!_0xee1b9)_0x2c05c5[_0x455440(0x140)](_0x1c14c8,_0x3880be);else{const _0x5ed9e3=getState(_0xee1b9)===_0x455440(0x18c),_0x5b06b4=getState(_0x3880be)===_0x455440(0x18c);if(_0x5b06b4&&!_0x5ed9e3)_0x2c05c5[_0x455440(0x140)](_0x1c14c8,_0x3880be);else{if(!_0x5b06b4&&_0x5ed9e3){}else{const _0x3a92bb=getVersionNumber(_0xee1b9),_0x243174=getVersionNumber(_0x3880be);_0x243174>_0x3a92bb&&_0x2c05c5[_0x455440(0x140)](_0x1c14c8,_0x3880be);}}}}return Array['from'](_0x2c05c5[_0x455440(0x152)]());}const VALID_JOURNEY_STATES=new Set([a131_0x5c8e47(0x17b),a131_0x5c8e47(0x13d),a131_0x5c8e47(0x18c)]);export function parseJourneyState(_0x4969ff){const _0x160435=a131_0x5c8e47;if(typeof _0x4969ff===_0x160435(0x164)&&VALID_JOURNEY_STATES[_0x160435(0x12a)](_0x4969ff))return _0x4969ff;return _0x160435(0x17b);}export function entityToJourneyListItem(_0x53c16e,_0x3e3c76){const _0x1db272=a131_0x5c8e47,_0x25b350=_0x53c16e[_0x1db272(0x14b)];return{'id':_0x53c16e['id'],'name':_0x25b350[_0x1db272(0x162)]??'','journeyBundleName':_0x25b350['journeyBundleName']??_0x25b350['name']??'','journeyBundleId':_0x25b350[_0x1db272(0x195)]??'','versionNumber':_0x25b350[_0x1db272(0x169)],'description':_0x25b350['description']??null,'state':parseJourneyState(_0x25b350['state']),'paused':_0x25b350[_0x1db272(0x178)]??![],'audienceId':_0x3e3c76,'folderId':_0x25b350[_0x1db272(0x186)]??_0x53c16e[_0x1db272(0x171)]?.[_0x1db272(0x12d)]?.[_0x1db272(0x15c)]?.['id']??null,'createdAt':_0x25b350['createdAt']??'','updatedAt':_0x25b350['updatedAt']??''};}function a131_0x58dd(_0x17f146,_0x533b6a){_0x17f146=_0x17f146-0x11c;const _0x33a24e=a131_0x33a2();let _0x58dd34=_0x33a24e[_0x17f146];return _0x58dd34;}function convertToColumnId(_0x30885d){const _0x1278f6=a131_0x5c8e47;return _0x30885d[_0x1278f6(0x184)](/-/g,'_');}function getStepEntries(_0x35313){const _0x56eb2c=a131_0x5c8e47;if(!_0x35313)return[];if(Array['isArray'](_0x35313))return _0x35313[_0x56eb2c(0x143)](_0x322f74=>[_0x322f74['id'],_0x322f74]);return Object[_0x56eb2c(0x151)](_0x35313);}export function flattenJourneyActivation(_0x2b0fb3){const _0x4233f4=a131_0x5c8e47,{activationParams:_0x299f9d,activationId:_0x1765a4,runAfterJourneyRefresh:_0x32d2a2}=_0x2b0fb3[_0x4233f4(0x14b)];return{'id':_0x2b0fb3['id'],'activationId':_0x1765a4,'runAfterJourneyRefresh':_0x32d2a2,..._0x299f9d};}function col(_0x3e5a4a,_0x2d6e47={}){const _0x3a2997=a131_0x5c8e47;return{'column':_0x3e5a4a,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3a2997(0x159),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x2d6e47};}export function generateColumnMapping(_0x58e454){const _0x1f7430=a131_0x5c8e47,_0x1c303e=[];_0x1c303e[_0x1f7430(0x13f)](col(_0x1f7430(0x18d))),_0x1c303e['push'](col(_0x1f7430(0x172),{'direction':'in','category':'journey'})),_0x1c303e[_0x1f7430(0x13f)](col(_0x1f7430(0x1ab),{'direction':_0x1f7430(0x199),'category':_0x1f7430(0x144)}));_0x58e454[_0x1f7430(0x14b)]['goal']&&_0x1c303e[_0x1f7430(0x13f)](col('intime_goal',{'direction':'in','category':'goal','detail':_0x58e454[_0x1f7430(0x14b)][_0x1f7430(0x191)][_0x1f7430(0x162)]||null}));const _0x4312f0=_0x58e454[_0x1f7430(0x14b)]['journeyStages']||[];for(let _0x33b954=0x0;_0x33b954<_0x4312f0[_0x1f7430(0x18f)];_0x33b954++){const _0x4793ce=_0x4312f0[_0x33b954],_0x22528d=_0x4793ce[_0x1f7430(0x162)],_0x279217={'stageIndex':_0x33b954,'stageName':_0x22528d},_0x4a9cf9=_0x4793ce[_0x1f7430(0x19b)]?.['name']||null;_0x1c303e[_0x1f7430(0x13f)](col(_0x1f7430(0x148)+_0x33b954,{..._0x279217,'direction':'in','category':'stage','detail':_0x4a9cf9})),_0x1c303e[_0x1f7430(0x13f)](col('outtime_stage_'+_0x33b954,{..._0x279217,'direction':'out','category':'stage','detail':_0x4a9cf9}));_0x4793ce[_0x1f7430(0x14d)]&&_0x1c303e[_0x1f7430(0x13f)](col(_0x1f7430(0x148)+_0x33b954+_0x1f7430(0x14a),{..._0x279217,'direction':'in','category':'milestone','detail':_0x4793ce[_0x1f7430(0x14d)][_0x1f7430(0x162)]||null}));const _0x38220a=_0x4793ce[_0x1f7430(0x153)]||_0x4793ce[_0x1f7430(0x181)]||[];for(let _0x5ea142=0x0;_0x5ea142<_0x38220a['length'];_0x5ea142++){_0x1c303e[_0x1f7430(0x13f)](col('intime_stage_'+_0x33b954+_0x1f7430(0x12b)+_0x5ea142,{..._0x279217,'direction':'in','category':_0x1f7430(0x16a),'detail':_0x38220a[_0x5ea142][_0x1f7430(0x162)]||null}));}const _0x364371=getStepEntries(_0x4793ce[_0x1f7430(0x198)]);for(const [_0x9724fa,_0x143531]of _0x364371){const _0xe20a1=convertToColumnId(_0x9724fa),_0x4cd834=_0x143531[_0x1f7430(0x1a2)]||null,_0x17275b=_0x143531['name']||null,_0xb08c4b={..._0x279217,'stepType':_0x4cd834,'stepName':_0x17275b,'stepId':_0x9724fa};_0x1c303e[_0x1f7430(0x13f)](col(_0x1f7430(0x148)+_0x33b954+'_'+_0xe20a1,{..._0xb08c4b,'direction':'in','category':_0x1f7430(0x174)})),_0x1c303e['push'](col('outtime_stage_'+_0x33b954+'_'+_0xe20a1,{..._0xb08c4b,'direction':_0x1f7430(0x199),'category':'step'}));if(_0x143531[_0x1f7430(0x1a2)]===_0x1f7430(0x156)&&_0x143531[_0x1f7430(0x130)])for(const _0x25ee24 of _0x143531[_0x1f7430(0x130)]){_0x25ee24[_0x1f7430(0x1a7)]&&_0x1c303e[_0x1f7430(0x13f)](col(_0x1f7430(0x148)+_0x33b954+'_'+_0xe20a1+'_'+_0x25ee24[_0x1f7430(0x1a7)],{..._0xb08c4b,'direction':'in','category':_0x1f7430(0x176),'detail':_0x25ee24['name']||(_0x25ee24[_0x1f7430(0x187)]?_0x1f7430(0x142):null)}));}if((_0x143531[_0x1f7430(0x1a2)]===_0x1f7430(0x168)||_0x143531[_0x1f7430(0x1a2)]===_0x1f7430(0x196))&&_0x143531[_0x1f7430(0x189)])for(const _0x942203 of _0x143531[_0x1f7430(0x189)]){_0x942203['id']&&_0x1c303e[_0x1f7430(0x13f)](col('intime_stage_'+_0x33b954+'_'+_0xe20a1+_0x1f7430(0x135)+convertToColumnId(_0x942203['id']),{..._0xb08c4b,'direction':'in','category':_0x1f7430(0x1a4),'detail':_0x942203[_0x1f7430(0x162)]||null}));}if(_0x143531[_0x1f7430(0x1a2)]===_0x1f7430(0x197)||_0x143531[_0x1f7430(0x1a2)]===_0x1f7430(0x155)){const _0x4289a7=[];if(_0x143531[_0x1f7430(0x16b)])_0x4289a7['push'](_0x143531[_0x1f7430(0x16b)]);else{if(Array['isArray'](_0x143531[_0x1f7430(0x15e)]))for(const _0x4f1a8d of _0x143531[_0x1f7430(0x15e)]){_0x4f1a8d['segmentId']&&!_0x4f1a8d['timedOutPath']&&_0x4289a7['push'](_0x4f1a8d[_0x1f7430(0x1a7)]);}else _0x143531[_0x1f7430(0x139)]?.[_0x1f7430(0x1a7)]&&_0x4289a7[_0x1f7430(0x13f)](_0x143531[_0x1f7430(0x139)][_0x1f7430(0x1a7)]);}for(const _0x21c180 of _0x4289a7){_0x1c303e['push'](col('intime_stage_'+_0x33b954+'_'+_0xe20a1+'_'+_0x21c180,{..._0xb08c4b,'direction':'in','category':_0x1f7430(0x176)}));}}}}return _0x1c303e['push'](col(_0x1f7430(0x166))),_0x1c303e;}export function aggregateJourneyHistory(_0x36af0d){const _0x1e6e90=a131_0x5c8e47,_0x187c46=_0x36af0d[_0x1e6e90(0x158)]((_0x4870b1,_0x40aa2e)=>_0x4870b1+(_0x40aa2e['entryInflux']??0x0),0x0),_0xb2303b=_0x36af0d[_0x1e6e90(0x158)]((_0x74da1d,_0x2bc2fa)=>_0x74da1d+(_0x2bc2fa[_0x1e6e90(0x173)]??0x0),0x0),_0x518f16=_0x36af0d['reduce']((_0x1a659a,_0x4fd127)=>_0x1a659a+((_0x4fd127['exitInflux']??0x0)+(_0x4fd127[_0x1e6e90(0x185)]??0x0)),0x0),_0x4ce2b2=_0x36af0d[_0x36af0d[_0x1e6e90(0x18f)]-0x1];return{'size':_0x4ce2b2?.[_0x1e6e90(0x17d)]??0x0,'entered':_0x187c46,'goal_achieved':_0xb2303b,'completion_rate':_0xb2303b&&_0x187c46?_0xb2303b/_0x187c46*0x64:0x0,'exit_or_jump':_0x518f16,'exit_or_jump_rate':_0x518f16&&_0x187c46?_0x518f16/_0x187c46*0x64:0x0};}export function aggregateStageHistory(_0x49c973){const _0x221dd3=a131_0x5c8e47,_0x13a5a5=_0x49c973[_0x221dd3(0x158)]((_0x4ba350,_0x2b9480)=>_0x4ba350+(_0x2b9480[_0x221dd3(0x180)]??0x0),0x0),_0x1c41a1=_0x49c973['reduce']((_0x52ad09,_0x111c32)=>_0x52ad09+(_0x111c32[_0x221dd3(0x16c)]??0x0),0x0),_0x4abcea=_0x49c973[_0x221dd3(0x158)]((_0x4497cd,_0x24430a)=>_0x4497cd+((_0x24430a[_0x221dd3(0x19a)]??0x0)+(_0x24430a[_0x221dd3(0x185)]??0x0)),0x0),_0x2f8b6d=_0x49c973[_0x49c973[_0x221dd3(0x18f)]-0x1];return{'size':_0x2f8b6d?.['size']??0x0,'entered':_0x13a5a5,'milestone':_0x1c41a1,'milestone_rate':_0x1c41a1&&_0x13a5a5?_0x1c41a1/_0x13a5a5*0x64:0x0,'exit_or_jump':_0x4abcea,'exit_or_jump_rate':_0x4abcea&&_0x13a5a5?_0x4abcea/_0x13a5a5*0x64:0x0};}export function assembleJourneyStats(_0x467d1a,_0x27f4c5){const _0x3fa94a=a131_0x5c8e47,_0x11d5c0=!!(_0x27f4c5?.['from']||_0x27f4c5?.['to'])&&!!_0x467d1a[_0x3fa94a(0x18a)]?.[_0x3fa94a(0x18f)];if(_0x11d5c0){const _0x29110b=aggregateJourneyHistory(_0x467d1a['history']),_0x597a26={'journey_id':_0x467d1a[_0x3fa94a(0x177)],..._0x27f4c5?.[_0x3fa94a(0x175)]&&{'from':_0x27f4c5[_0x3fa94a(0x175)]},..._0x27f4c5?.['to']&&{'to':_0x27f4c5['to']},..._0x29110b};return _0x27f4c5?.[_0x3fa94a(0x1ac)]&&(_0x597a26['history']=_0x467d1a[_0x3fa94a(0x18a)]),_0x597a26;}return{'journey_id':_0x467d1a[_0x3fa94a(0x177)],'size':_0x467d1a[_0x3fa94a(0x17d)],'entered':_0x467d1a[_0x3fa94a(0x1a5)],'goal_achieved':_0x467d1a[_0x3fa94a(0x14f)],'completion_rate':_0x467d1a[_0x3fa94a(0x161)],'exit_or_jump':_0x467d1a[_0x3fa94a(0x13c)],'exit_or_jump_rate':_0x467d1a[_0x3fa94a(0x123)]};}export function formatVersionsFromBundle(_0x4495b0){const _0x37dc8e=a131_0x5c8e47,_0x2b3f8a=_0x4495b0['journeys'][_0x37dc8e(0x143)](_0x589be2=>({'journeyId':_0x589be2['id'],'versionNumber':_0x589be2[_0x37dc8e(0x14b)][_0x37dc8e(0x169)]??0x0,'name':_0x589be2['attributes'][_0x37dc8e(0x162)],'state':_0x589be2[_0x37dc8e(0x14b)][_0x37dc8e(0x12f)],'paused':_0x589be2[_0x37dc8e(0x14b)][_0x37dc8e(0x178)],'createdAt':_0x589be2[_0x37dc8e(0x14b)][_0x37dc8e(0x128)],'updatedAt':_0x589be2[_0x37dc8e(0x14b)][_0x37dc8e(0x183)]}));return _0x2b3f8a[_0x37dc8e(0x1a3)]((_0x2eb20f,_0x2484d3)=>_0x2eb20f[_0x37dc8e(0x169)]-_0x2484d3[_0x37dc8e(0x169)]),_0x2b3f8a;}export function synthesizePreBundleVersion(_0x3a44e1){const _0x282e25=a131_0x5c8e47;return{'journeyId':_0x3a44e1['id'],'versionNumber':0x1,'name':_0x3a44e1[_0x282e25(0x14b)][_0x282e25(0x162)],'state':_0x3a44e1[_0x282e25(0x14b)]['state'],'paused':_0x3a44e1[_0x282e25(0x14b)][_0x282e25(0x178)],'createdAt':_0x3a44e1[_0x282e25(0x14b)][_0x282e25(0x128)],'updatedAt':_0x3a44e1[_0x282e25(0x14b)][_0x282e25(0x183)]};}export function buildStageNameMap(_0x5f53){const _0x1e5125=a131_0x5c8e47;return new Map(_0x5f53[_0x1e5125(0x14b)]['journeyStages']?.[_0x1e5125(0x143)](_0x571134=>[_0x571134['id'],_0x571134['name']])??[]);}export class JourneySDK{[a131_0x5c8e47(0x13b)];constructor(_0x3385ca){const _0x122b38=a131_0x5c8e47;this[_0x122b38(0x13b)]=new CDPApiClient(_0x3385ca);}[a131_0x5c8e47(0x1a0)](_0x204b08,_0xa5b6ae){return _0xa5b6ae?_0x204b08:deduplicateJourneysByBundle(_0x204b08);}async[a131_0x5c8e47(0x1aa)](_0x503517,_0x53d446){const _0x1fde8e=a131_0x5c8e47;try{const _0x1a5724=await this[_0x1fde8e(0x13b)]['listJourneysWithDetails'](_0x503517);return{'journeys':this[_0x1fde8e(0x1a0)](_0x1a5724[_0x1fde8e(0x154)],_0x53d446),'activationStepsById':_0x1a5724[_0x1fde8e(0x165)]};}catch(_0x219622){if(isHttp404Error(_0x219622))return{'journeys':[],'activationStepsById':new Map()};throw _0x219622;}}async['listJourneysFromParentSegment'](_0x288d77,_0x207f40,_0xa6486d){const _0x54fc33=a131_0x5c8e47;let _0x4227f3=_0x207f40;if(!_0x4227f3)try{const _0x53b1da=await this[_0x54fc33(0x13b)][_0x54fc33(0x14e)](_0x288d77);_0x4227f3=_0x53b1da[_0x54fc33(0x182)]??undefined;}catch(_0x238d61){if(isHttp404Error(_0x238d61))return[];throw _0x238d61;}if(!_0x4227f3)return[];let _0xa24ca;if(_0xa6486d?.[_0x54fc33(0x160)]){const _0x329c10=await this[_0x54fc33(0x13b)]['listSegmentFolders'](_0x288d77),_0x2fdaa9=_0x329c10[_0x54fc33(0x143)](_0x425b29=>this[_0x54fc33(0x13b)][_0x54fc33(0x137)](_0x425b29['id'])),_0x3d4059=await Promise[_0x54fc33(0x193)](_0x2fdaa9),_0x3648bd=new Set();_0xa24ca=_0x3d4059['flat']()[_0x54fc33(0x146)](_0x15f5ca=>{const _0x1fe953=_0x54fc33;if(_0x3648bd[_0x1fe953(0x12a)](_0x15f5ca['id']))return![];return _0x3648bd['add'](_0x15f5ca['id']),!![];});}else{const _0x531f18=await this['client'][_0x54fc33(0x141)](_0x4227f3,0x20,![]),_0x3701dc=_0x531f18[_0x54fc33(0x15c)],_0x8312fb=_0x3701dc[_0x54fc33(0x146)](_0xfd3024=>_0xfd3024['type']===_0x54fc33(0x144));_0xa24ca=_0x8312fb[_0x54fc33(0x143)](_0x3f5f2d=>entityToJourneyListItem(_0x3f5f2d,_0x288d77));}return this[_0x54fc33(0x1a0)](_0xa24ca,_0xa6486d?.[_0x54fc33(0x160)]);}async[a131_0x5c8e47(0x18e)](_0x94e5e6,_0x4b4d1d,_0x34bd1e){const _0x28f3be=a131_0x5c8e47;if(!_0x4b4d1d)return{'journeys':[],'folders':[]};const _0x3086c9=await this[_0x28f3be(0x13b)][_0x28f3be(0x141)](_0x4b4d1d,0x20,![]),_0x454dda=_0x3086c9[_0x28f3be(0x15c)],_0x1ac8f4=_0x454dda[_0x28f3be(0x146)](_0x446d13=>_0x446d13[_0x28f3be(0x1a2)]===_0x28f3be(0x12e)&&_0x446d13['id']!==_0x4b4d1d),_0x4cf226=_0x1ac8f4[_0x28f3be(0x143)](_0x3f4c2e=>({'id':_0x3f4c2e['id'],'name':_0x3f4c2e[_0x28f3be(0x14b)][_0x28f3be(0x162)]})),_0xd6cf7b=_0x454dda[_0x28f3be(0x146)](_0x1b41f1=>_0x1b41f1[_0x28f3be(0x1a2)]===_0x28f3be(0x144)),_0x1a17fc=_0xd6cf7b['map'](_0x32a234=>entityToJourneyListItem(_0x32a234,_0x94e5e6));return{'journeys':this['applyVersionDeduplication'](_0x1a17fc,_0x34bd1e?.[_0x28f3be(0x160)]),'folders':_0x4cf226};}async[a131_0x5c8e47(0x15b)](_0x4da137,_0x533c94){const _0x3c98fa=a131_0x5c8e47;let _0x431e11;try{_0x431e11=await this[_0x3c98fa(0x13b)][_0x3c98fa(0x19f)](_0x4da137);}catch(_0x1885ca){if(isHttp404Error(_0x1885ca))return{'journeys':[],'activationStepsById':new Map()};throw _0x1885ca;}const _0x1a87ea=_0x431e11[_0x3c98fa(0x143)](async _0x3ec8a2=>{const _0x11b013=_0x3c98fa;return await this[_0x11b013(0x1aa)](_0x3ec8a2['id'],_0x533c94?.[_0x11b013(0x160)]);}),_0x597258=await Promise['all'](_0x1a87ea),_0x23c304=new Map(),_0x4dc38b=[];for(const _0x43d982 of _0x597258){_0x4dc38b[_0x3c98fa(0x13f)](..._0x43d982[_0x3c98fa(0x154)]);for(const [_0x2112e8,_0x405b29]of _0x43d982[_0x3c98fa(0x165)]){_0x23c304[_0x3c98fa(0x140)](_0x2112e8,_0x405b29);}}const _0x1841f7=new Set(),_0x3fec11=_0x4dc38b['filter'](_0x3442d7=>{if(_0x1841f7['has'](_0x3442d7['id']))return![];return _0x1841f7['add'](_0x3442d7['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x3fec11,_0x533c94?.[_0x3c98fa(0x160)]),'activationStepsById':_0x23c304};}async[a131_0x5c8e47(0x190)](_0x13f57e){const _0x50c2a2=a131_0x5c8e47;try{return await this[_0x50c2a2(0x13b)][_0x50c2a2(0x190)](_0x13f57e);}catch(_0x4c6ff7){if(isHttp404Error(_0x4c6ff7))throw new SDKError(ErrorCode[_0x50c2a2(0x15d)],_0x50c2a2(0x131)+_0x13f57e,_0x4c6ff7);throw _0x4c6ff7;}}async[a131_0x5c8e47(0x157)](_0x4d5a3a,_0x53e697){const _0x42b48a=a131_0x5c8e47,_0x4f0144=await this['listJourneysFromParentSegment'](_0x4d5a3a),_0x291e50=_0x4f0144['find'](_0x2abf9b=>_0x2abf9b[_0x42b48a(0x19e)][_0x42b48a(0x149)]()===_0x53e697[_0x42b48a(0x149)]());if(!_0x291e50)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x42b48a(0x131)+_0x53e697,undefined,{'helpText':'Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'});return _0x291e50['id'];}async['getStatistics'](_0x111506,_0x358a11){const _0x2a4117=a131_0x5c8e47;try{return await this[_0x2a4117(0x13b)][_0x2a4117(0x147)](_0x111506,_0x358a11);}catch(_0x30e70b){if(isHttp404Error(_0x30e70b))throw new SDKError(ErrorCode[_0x2a4117(0x15d)],_0x2a4117(0x131)+_0x111506,_0x30e70b);throw _0x30e70b;}}async['getTrafficData'](_0xb63836,_0x2be9f6){const _0xac1d6e=a131_0x5c8e47,_0x326875={'from':_0x2be9f6?.[_0xac1d6e(0x175)],'to':_0x2be9f6?.['to'],'limit':_0x2be9f6?.[_0xac1d6e(0x194)]},_0x17f5a5=_0x2be9f6?.['type']!==_0xac1d6e(0x11c);try{const [_0xc07770,_0x494384]=await Promise[_0xac1d6e(0x193)]([this[_0xac1d6e(0x179)](_0xb63836,_0x2be9f6?.[_0xac1d6e(0x1a2)],_0x326875),_0x17f5a5?this[_0xac1d6e(0x190)](_0xb63836):undefined]);if(_0xc07770[_0xac1d6e(0x188)]&&_0x494384){const _0x2f9458=buildStageNameMap(_0x494384);_0xc07770['activation']=_0xc07770['activation'][_0xac1d6e(0x143)](_0x538638=>({..._0x538638,'journeyStageName':_0x2f9458[_0xac1d6e(0x138)](_0x538638[_0xac1d6e(0x18b)])??_0x538638['journeyStageId']}));}return _0xc07770;}catch(_0x27189a){if(isHttp404Error(_0x27189a))throw new SDKError(ErrorCode[_0xac1d6e(0x15d)],_0xac1d6e(0x131)+_0xb63836,_0x27189a);throw _0x27189a;}}async[a131_0x5c8e47(0x179)](_0xcaffde,_0x55f818,_0x2ca2e2){const _0x35e0ba=a131_0x5c8e47;if(_0x55f818==='conversion'){const _0x275266=await this[_0x35e0ba(0x13b)][_0x35e0ba(0x17c)](_0xcaffde,_0x2ca2e2);return{'conversion':_0x275266};}if(_0x55f818===_0x35e0ba(0x188)){const _0x3c05be=await this['client']['getActivationSankeyChart'](_0xcaffde,_0x2ca2e2);return{'activation':_0x3c05be};}const [_0x4348f8,_0x48d245]=await Promise[_0x35e0ba(0x193)]([this['client'][_0x35e0ba(0x17c)](_0xcaffde,_0x2ca2e2),this[_0x35e0ba(0x13b)][_0x35e0ba(0x13e)](_0xcaffde,_0x2ca2e2)]);return{'conversion':_0x4348f8,'activation':_0x48d245};}async[a131_0x5c8e47(0x11d)](_0x3cdbc3){const _0x10df69=a131_0x5c8e47;try{return await this[_0x10df69(0x13b)][_0x10df69(0x19d)](_0x3cdbc3);}catch(_0x73ea88){if(isHttp404Error(_0x73ea88))throw new SDKError(ErrorCode[_0x10df69(0x15d)],_0x10df69(0x131)+_0x3cdbc3,_0x73ea88);throw _0x73ea88;}}async[a131_0x5c8e47(0x17f)](_0x20a16f){const _0x12a61a=a131_0x5c8e47;try{return await this[_0x12a61a(0x13b)][_0x12a61a(0x134)](_0x20a16f);}catch(_0x483af0){if(isHttp404Error(_0x483af0))throw new SDKError(ErrorCode[_0x12a61a(0x15d)],_0x12a61a(0x131)+_0x20a16f,_0x483af0);throw _0x483af0;}}async[a131_0x5c8e47(0x1a8)](_0x193be5){const _0x523ca4=a131_0x5c8e47;return await this[_0x523ca4(0x13b)][_0x523ca4(0x133)](_0x193be5);}async[a131_0x5c8e47(0x124)](_0x416e28,_0x433562){const _0x44b171=a131_0x5c8e47;try{return await this[_0x44b171(0x13b)]['updateJourney'](_0x416e28,_0x433562);}catch(_0x325cf7){if(isHttp404Error(_0x325cf7))throw new SDKError(ErrorCode[_0x44b171(0x15d)],_0x44b171(0x131)+_0x416e28,_0x325cf7);throw _0x325cf7;}}async[a131_0x5c8e47(0x16e)](_0x233596,_0x3273e3){const _0x24fd47=a131_0x5c8e47;try{return await this[_0x24fd47(0x13b)]['getJourneyActivation'](_0x233596,_0x3273e3);}catch(_0x56fe73){if(isHttp404Error(_0x56fe73))throw new SDKError(ErrorCode['NOT_FOUND'],_0x24fd47(0x136)+_0x3273e3+_0x24fd47(0x120)+_0x233596,_0x56fe73);throw _0x56fe73;}}async[a131_0x5c8e47(0x16f)](_0x385fbe){try{return await this['client']['listJourneyActivations'](_0x385fbe);}catch(_0x130551){if(isHttp404Error(_0x130551))return[];throw _0x130551;}}async['listActivationsFlat'](_0xf3580b){const _0x17d262=a131_0x5c8e47,_0x58b6e7=await this[_0x17d262(0x16f)](_0xf3580b);return _0x58b6e7[_0x17d262(0x143)](flattenJourneyActivation);}async['createActivation'](_0x4dedc2,_0x34c74c){const _0x553d26=a131_0x5c8e47;return await this[_0x553d26(0x13b)][_0x553d26(0x1a1)](_0x4dedc2,_0x34c74c);}async[a131_0x5c8e47(0x11f)](_0x267d2d){const _0x5196c5=a131_0x5c8e47,_0x5e8562=await this[_0x5196c5(0x190)](_0x267d2d),_0x1307d8=generateColumnMapping(_0x5e8562);return{'journeyId':_0x5e8562['id'],'journeyName':_0x5e8562[_0x5196c5(0x14b)][_0x5196c5(0x162)],'database':_0x5196c5(0x121)+_0x5e8562[_0x5196c5(0x14b)]['audienceId'],'table':_0x5196c5(0x13a)+_0x5e8562['id'],'columns':_0x1307d8};}async['getBundle'](_0x442e8b){const _0x3f76f8=a131_0x5c8e47;return this[_0x3f76f8(0x13b)][_0x3f76f8(0x145)](_0x442e8b);}async[a131_0x5c8e47(0x16d)](_0x5ab277){const _0x1d0f13=a131_0x5c8e47;if(!_0x5ab277)return undefined;try{const _0x446ca1=await this[_0x1d0f13(0x150)](_0x5ab277);return _0x446ca1[_0x1d0f13(0x132)];}catch{return undefined;}}async[a131_0x5c8e47(0x15f)](_0x42b914){const _0x4127cc=a131_0x5c8e47,_0xa48554=await this[_0x4127cc(0x190)](_0x42b914),_0x2bc47c=_0xa48554[_0x4127cc(0x14b)][_0x4127cc(0x195)];if(!_0x2bc47c)return{'bundleId':'','bundleName':_0xa48554['attributes'][_0x4127cc(0x162)],'bundleDescription':_0xa48554[_0x4127cc(0x14b)][_0x4127cc(0x14c)]??null,'latestJourneyId':_0xa48554['id'],'versions':[synthesizePreBundleVersion(_0xa48554)]};const _0xdedf99=await this['getBundle'](_0x2bc47c);return{'bundleId':_0x2bc47c,'bundleName':_0xdedf99[_0x4127cc(0x162)],'bundleDescription':_0xdedf99[_0x4127cc(0x14c)]??null,'latestJourneyId':_0xdedf99['latestJourneyId'],'versions':formatVersionsFromBundle(_0xdedf99)};}async[a131_0x5c8e47(0x1a6)](_0x2fa4cd){const _0x248d42=a131_0x5c8e47,_0x28146b=await this['getJourney'](_0x2fa4cd),_0x44941b=_0x28146b[_0x248d42(0x14b)][_0x248d42(0x195)];if(!_0x44941b)throw new SDKError(ErrorCode[_0x248d42(0x127)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this['client'][_0x248d42(0x163)](_0x44941b);const _0x11a67f=await this[_0x248d42(0x13b)][_0x248d42(0x145)](_0x44941b),_0x1cc393=_0x11a67f['name']+'\x20v'+(_0x11a67f[_0x248d42(0x167)]+0x1);return this[_0x248d42(0x13b)][_0x248d42(0x125)](_0x44941b,{'sourceId':_0x2fa4cd,'attributes':{'name':_0x1cc393}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x31609e=a132_0x55bc;(function(_0x31c23c,_0x173283){const _0x588ae2=a132_0x55bc,_0x58230b=_0x31c23c();while(!![]){try{const _0x46bf7a=-parseInt(_0x588ae2(0xcb))/0x1+parseInt(_0x588ae2(0xc5))/0x2+parseInt(_0x588ae2(0xd1))/0x3*(-parseInt(_0x588ae2(0xc7))/0x4)+-parseInt(_0x588ae2(0xc9))/0x5*(parseInt(_0x588ae2(0xc6))/0x6)+-parseInt(_0x588ae2(0xc3))/0x7*(parseInt(_0x588ae2(0xcf))/0x8)+parseInt(_0x588ae2(0xc8))/0x9*(-parseInt(_0x588ae2(0xcc))/0xa)+-parseInt(_0x588ae2(0xca))/0xb*(-parseInt(_0x588ae2(0xce))/0xc);if(_0x46bf7a===_0x173283)break;else _0x58230b['push'](_0x58230b['shift']());}catch(_0x136b94){_0x58230b['push'](_0x58230b['shift']());}}}(a132_0x1a3e,0x3d907));import{createTextCache}from'../../utils/local-cache.js';function a132_0x55bc(_0x4723d0,_0x382b48){_0x4723d0=_0x4723d0-0xc3;const _0x1a3eea=a132_0x1a3e();let _0x55bc4f=_0x1a3eea[_0x4723d0];return _0x55bc4f;}const chatIdCache=createTextCache(a132_0x31609e(0xc4),a132_0x31609e(0xd0));export function saveLastChatId(_0x59f959){chatIdCache['write'](_0x59f959);}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x1a6935=a132_0x31609e;chatIdCache[_0x1a6935(0xcd)]();}function a132_0x1a3e(){const _0x1b2b8e=['317697uhiPSf','828860cUCoSW','clear','18127392zXsqky','474976OykvYX','llm/chat','9xFiYmO','28UwQWWm','last_chat_id','486372JhgcsW','2034qcIIuE','586868AYPknl','45aVSwOR','1355tfPkxB','11onQMfD'];a132_0x1a3e=function(){return _0x1b2b8e;};return a132_0x1a3e();}
|