@treasuredata/tdx 2026.3.31 → 2026.3.33
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.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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.d.ts +34 -0
- package/dist/commands/work-command.d.ts.map +1 -0
- package/dist/commands/work-command.js +1 -0
- package/dist/commands/work-command.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/project-config.js.map +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.d.ts +1 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.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.d.ts +2 -0
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +169 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -0
- package/dist/sdk/types/workspace.js +1 -0
- package/dist/sdk/types/workspace.js.map +1 -0
- 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.d.ts +28 -0
- package/dist/sdk/workspace/frontmatter.d.ts.map +1 -0
- package/dist/sdk/workspace/frontmatter.js +1 -0
- package/dist/sdk/workspace/frontmatter.js.map +1 -0
- package/dist/sdk/workspace/git.d.ts +70 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -0
- package/dist/sdk/workspace/git.js +1 -0
- package/dist/sdk/workspace/git.js.map +1 -0
- package/dist/sdk/workspace/index.d.ts +166 -0
- package/dist/sdk/workspace/index.d.ts.map +1 -0
- package/dist/sdk/workspace/index.js +1 -0
- package/dist/sdk/workspace/index.js.map +1 -0
- package/dist/sdk/workspace/templates.d.ts +17 -0
- package/dist/sdk/workspace/templates.d.ts.map +1 -0
- package/dist/sdk/workspace/templates.js +1 -0
- package/dist/sdk/workspace/templates.js.map +1 -0
- package/dist/sdk/workspace/weekly.d.ts +49 -0
- package/dist/sdk/workspace/weekly.d.ts.map +1 -0
- package/dist/sdk/workspace/weekly.js +1 -0
- package/dist/sdk/workspace/weekly.js.map +1 -0
- package/dist/sdk/workspace/wikilinks.d.ts +49 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -0
- package/dist/sdk/workspace/wikilinks.js +1 -0
- package/dist/sdk/workspace/wikilinks.js.map +1 -0
- 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 a130_0x13b93c=a130_0x164d;(function(_0x59c09a,_0x4b750b){const _0x2468f1=a130_0x164d,_0x50e226=_0x59c09a();while(!![]){try{const _0x287a1a=-parseInt(_0x2468f1(0x1ad))/0x1+-parseInt(_0x2468f1(0x238))/0x2*(-parseInt(_0x2468f1(0x1e4))/0x3)+-parseInt(_0x2468f1(0x229))/0x4+-parseInt(_0x2468f1(0x22d))/0x5*(parseInt(_0x2468f1(0x1bc))/0x6)+parseInt(_0x2468f1(0x1ef))/0x7*(parseInt(_0x2468f1(0x20f))/0x8)+parseInt(_0x2468f1(0x205))/0x9+parseInt(_0x2468f1(0x1d3))/0xa;if(_0x287a1a===_0x4b750b)break;else _0x50e226['push'](_0x50e226['shift']());}catch(_0x44b2e2){_0x50e226['push'](_0x50e226['shift']());}}}(a130_0x43da,0x1b4af));import{CDPApiClient}from'./client/cdp-api-client.js';function a130_0x43da(){const _0x49dda9=['jumpInflux','enteredSize','draft','journeyId','add','description','stage','getJourneyStatistics','getStatistics','length','getJourneyActivation','108198kGgprJ','entryInflux','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','time','_variant_','completionRate','journeyBundleId','audienceId','segmentFolderId','exitOrJumpSize','1263152aEsvvV','INVALID_ARGUMENT','createJourneyActivation','all','string','getTrafficData','NOT_FOUND','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','filter','entries','create','listVersions','exitCriterias','listSegmentFolders','exitInflux','updatedAt','type','size','data','applyVersionDeduplication','listJourneysWithDetails','waitCondition','get','journeyStages','limit','Journey\x20not\x20found:\x20','266516eIaolp','branch','listJourneysWithDetailsFromParentSegment','journeys','5ziEpGr','excluded','_milestone','goalSize','conditionSegmentId','step','listJourneysFromParentSegment','resume','WaitStep','exit_criteria','no-bundle-','64ZieMik','steps','journeyStageId','isArray','simulation','includeHistory','132383gFvkSo','milestone','paused','createJourneyVersion','has','history','from','getBundle','out','includeAllVersions','relationships','replace','client','lastVersionNumber','values','378174yKAoDP','push','map','exitOrJumpRate','set','Excluded\x20profiles','getColumnMapping','versionNumber','getJourneyBundle','state','conversion','activationStepsById','segmentId','updateJourney','ABTest','flat','resolveJourneyId','getJourney','JOURNEY_NOT_FOUND','reduce','cdp_customer_id','find','pause','745720FhQpKe','activation','branches','AbTest','folder-segment','listJourneys','name','latestJourneyId','DecisionPoint','getParentSegmentFull','getConversionSankeyChart','cdp_audience_','goal','outtime_stage_','variants','getLatestJourneyId','exitCriteria','12126NkVZiK','createActivation','intime_stage_','createdAt','launched','listEntitiesByFolder','journeyBundleName','attributes','Journey\x20activation\x20step\x20not\x20found:\x20','rootFolderId','toLowerCase','7HOBnQL','fetchTrafficRaw','intime_goal','parentFolder','conditions','createJourney','getActivationSankeyChart','journey','\x20in\x20journey\x20','listJourneyActivations','pauseJourney'];a130_0x43da=function(){return _0x49dda9;};return a130_0x43da();}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x46f761){const _0x414dec=a130_0x164d;return _0x46f761[_0x414dec(0x20b)]??_0x46f761['attributes']?.[_0x414dec(0x20b)]??undefined;}function getVersionNumber(_0x60d461){const _0x4d06f8=a130_0x164d;return _0x60d461['versionNumber']??_0x60d461[_0x4d06f8(0x1eb)]?.['versionNumber']??0x0;}function getState(_0x2831c9){const _0x1cef7c=a130_0x164d;return _0x2831c9[_0x1cef7c(0x1c5)]??_0x2831c9[_0x1cef7c(0x1eb)]?.[_0x1cef7c(0x1c5)];}export function deduplicateJourneysByBundle(_0x5b405b){const _0x1dc4d9=a130_0x164d,_0x5bc1ed=new Map();let _0x407268=0x0;for(const _0x22e73b of _0x5b405b){const _0x4b0c89=getBundleId(_0x22e73b);if(!_0x4b0c89){const _0x597474=_0x1dc4d9(0x237)+(_0x22e73b['id']??'idx-'+_0x407268++);_0x5bc1ed[_0x1dc4d9(0x1c0)](_0x597474,_0x22e73b);continue;}const _0x3336dc=_0x5bc1ed[_0x1dc4d9(0x225)](_0x4b0c89);if(!_0x3336dc)_0x5bc1ed[_0x1dc4d9(0x1c0)](_0x4b0c89,_0x22e73b);else{const _0x208d1f=getState(_0x3336dc)===_0x1dc4d9(0x1e8),_0x295632=getState(_0x22e73b)===_0x1dc4d9(0x1e8);if(_0x295632&&!_0x208d1f)_0x5bc1ed[_0x1dc4d9(0x1c0)](_0x4b0c89,_0x22e73b);else{if(!_0x295632&&_0x208d1f){}else{const _0x3591c2=getVersionNumber(_0x3336dc),_0x36356c=getVersionNumber(_0x22e73b);_0x36356c>_0x3591c2&&_0x5bc1ed[_0x1dc4d9(0x1c0)](_0x4b0c89,_0x22e73b);}}}}return Array[_0x1dc4d9(0x1b3)](_0x5bc1ed[_0x1dc4d9(0x1bb)]());}const VALID_JOURNEY_STATES=new Set([a130_0x13b93c(0x1fc),a130_0x13b93c(0x1ab),a130_0x13b93c(0x1e8)]);export function parseJourneyState(_0x2825b9){const _0x5e3bd4=a130_0x13b93c;if(typeof _0x2825b9===_0x5e3bd4(0x213)&&VALID_JOURNEY_STATES[_0x5e3bd4(0x1b1)](_0x2825b9))return _0x2825b9;return'draft';}export function entityToJourneyListItem(_0x40180d,_0x46a99a){const _0x14ac9e=a130_0x13b93c,_0xefcb37=_0x40180d[_0x14ac9e(0x1eb)];return{'id':_0x40180d['id'],'name':_0xefcb37[_0x14ac9e(0x1d9)]??'','journeyBundleName':_0xefcb37[_0x14ac9e(0x1ea)]??_0xefcb37[_0x14ac9e(0x1d9)]??'','journeyBundleId':_0xefcb37[_0x14ac9e(0x20b)]??'','versionNumber':_0xefcb37[_0x14ac9e(0x1c3)],'description':_0xefcb37['description']??null,'state':parseJourneyState(_0xefcb37[_0x14ac9e(0x1c5)]),'paused':_0xefcb37[_0x14ac9e(0x1af)]??![],'audienceId':_0x46a99a,'folderId':_0xefcb37[_0x14ac9e(0x20d)]??_0x40180d[_0x14ac9e(0x1b7)]?.[_0x14ac9e(0x1f2)]?.[_0x14ac9e(0x221)]?.['id']??null,'createdAt':_0xefcb37[_0x14ac9e(0x1e7)]??'','updatedAt':_0xefcb37['updatedAt']??''};}function convertToColumnId(_0x4ab6d6){const _0x301b70=a130_0x13b93c;return _0x4ab6d6[_0x301b70(0x1b8)](/-/g,'_');}function getStepEntries(_0x1b9dc4){const _0x1eed00=a130_0x13b93c;if(!_0x1b9dc4)return[];if(Array[_0x1eed00(0x1aa)](_0x1b9dc4))return _0x1b9dc4[_0x1eed00(0x1be)](_0xae20b4=>[_0xae20b4['id'],_0xae20b4]);return Object[_0x1eed00(0x218)](_0x1b9dc4);}function a130_0x164d(_0x13eec2,_0x72d21){_0x13eec2=_0x13eec2-0x1aa;const _0x43da78=a130_0x43da();let _0x164df8=_0x43da78[_0x13eec2];return _0x164df8;}export function flattenJourneyActivation(_0x97e7a){const _0x432fef=a130_0x13b93c,{activationParams:_0x4850fa,activationId:_0x43cc5a,runAfterJourneyRefresh:_0x29eb9c}=_0x97e7a[_0x432fef(0x1eb)];return{'id':_0x97e7a['id'],'activationId':_0x43cc5a,'runAfterJourneyRefresh':_0x29eb9c,..._0x4850fa};}function col(_0x3b8f0b,_0x27c664={}){return{'column':_0x3b8f0b,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x27c664};}export function generateColumnMapping(_0x585c22){const _0x2f17bb=a130_0x13b93c,_0x2142eb=[];_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1d0))),_0x2142eb[_0x2f17bb(0x1bd)](col('intime_journey',{'direction':'in','category':'journey'})),_0x2142eb[_0x2f17bb(0x1bd)](col('outtime_journey',{'direction':'out','category':_0x2f17bb(0x1f6)}));_0x585c22[_0x2f17bb(0x1eb)][_0x2f17bb(0x1df)]&&_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1f1),{'direction':'in','category':_0x2f17bb(0x1df),'detail':_0x585c22[_0x2f17bb(0x1eb)][_0x2f17bb(0x1df)]['name']||null}));const _0x39c881=_0x585c22[_0x2f17bb(0x1eb)][_0x2f17bb(0x226)]||[];for(let _0xf0890a=0x0;_0xf0890a<_0x39c881[_0x2f17bb(0x203)];_0xf0890a++){const _0xf64d17=_0x39c881[_0xf0890a],_0x549990=_0xf64d17[_0x2f17bb(0x1d9)],_0x19587e={'stageIndex':_0xf0890a,'stageName':_0x549990},_0x2162d8=_0xf64d17['entryCriteria']?.[_0x2f17bb(0x1d9)]||null;_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1e6)+_0xf0890a,{..._0x19587e,'direction':'in','category':'stage','detail':_0x2162d8})),_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1e0)+_0xf0890a,{..._0x19587e,'direction':_0x2f17bb(0x1b5),'category':_0x2f17bb(0x200),'detail':_0x2162d8}));_0xf64d17[_0x2f17bb(0x1ae)]&&_0x2142eb[_0x2f17bb(0x1bd)](col('intime_stage_'+_0xf0890a+_0x2f17bb(0x22f),{..._0x19587e,'direction':'in','category':_0x2f17bb(0x1ae),'detail':_0xf64d17[_0x2f17bb(0x1ae)][_0x2f17bb(0x1d9)]||null}));const _0x641a2=_0xf64d17[_0x2f17bb(0x21b)]||_0xf64d17[_0x2f17bb(0x1e3)]||[];for(let _0x52ad53=0x0;_0x52ad53<_0x641a2[_0x2f17bb(0x203)];_0x52ad53++){_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1e6)+_0xf0890a+'_exit_'+_0x52ad53,{..._0x19587e,'direction':'in','category':_0x2f17bb(0x236),'detail':_0x641a2[_0x52ad53][_0x2f17bb(0x1d9)]||null}));}const _0x4c64ae=getStepEntries(_0xf64d17[_0x2f17bb(0x239)]);for(const [_0x27d08f,_0x4e9d49]of _0x4c64ae){const _0x5c4d5a=convertToColumnId(_0x27d08f),_0x20d2a4=_0x4e9d49[_0x2f17bb(0x21f)]||null,_0x327595=_0x4e9d49[_0x2f17bb(0x1d9)]||null,_0xc47818={..._0x19587e,'stepType':_0x20d2a4,'stepName':_0x327595,'stepId':_0x27d08f};_0x2142eb['push'](col(_0x2f17bb(0x1e6)+_0xf0890a+'_'+_0x5c4d5a,{..._0xc47818,'direction':'in','category':_0x2f17bb(0x232)})),_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1e0)+_0xf0890a+'_'+_0x5c4d5a,{..._0xc47818,'direction':_0x2f17bb(0x1b5),'category':'step'}));if(_0x4e9d49['type']===_0x2f17bb(0x1db)&&_0x4e9d49[_0x2f17bb(0x1d5)])for(const _0x17d6ef of _0x4e9d49[_0x2f17bb(0x1d5)]){_0x17d6ef[_0x2f17bb(0x1c8)]&&_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1e6)+_0xf0890a+'_'+_0x5c4d5a+'_'+_0x17d6ef[_0x2f17bb(0x1c8)],{..._0xc47818,'direction':'in','category':_0x2f17bb(0x22a),'detail':_0x17d6ef[_0x2f17bb(0x1d9)]||(_0x17d6ef[_0x2f17bb(0x22e)]?_0x2f17bb(0x1c1):null)}));}if((_0x4e9d49['type']===_0x2f17bb(0x1d6)||_0x4e9d49['type']===_0x2f17bb(0x1ca))&&_0x4e9d49['variants'])for(const _0x4f481e of _0x4e9d49[_0x2f17bb(0x1e1)]){_0x4f481e['id']&&_0x2142eb[_0x2f17bb(0x1bd)](col('intime_stage_'+_0xf0890a+'_'+_0x5c4d5a+_0x2f17bb(0x209)+convertToColumnId(_0x4f481e['id']),{..._0xc47818,'direction':'in','category':'variant','detail':_0x4f481e[_0x2f17bb(0x1d9)]||null}));}if(_0x4e9d49[_0x2f17bb(0x21f)]===_0x2f17bb(0x235)||_0x4e9d49[_0x2f17bb(0x21f)]==='Wait'){const _0x46430a=[];if(_0x4e9d49[_0x2f17bb(0x231)])_0x46430a[_0x2f17bb(0x1bd)](_0x4e9d49[_0x2f17bb(0x231)]);else{if(Array[_0x2f17bb(0x1aa)](_0x4e9d49[_0x2f17bb(0x1f3)]))for(const _0x222847 of _0x4e9d49[_0x2f17bb(0x1f3)]){_0x222847['segmentId']&&!_0x222847['timedOutPath']&&_0x46430a[_0x2f17bb(0x1bd)](_0x222847[_0x2f17bb(0x1c8)]);}else _0x4e9d49[_0x2f17bb(0x224)]?.[_0x2f17bb(0x1c8)]&&_0x46430a[_0x2f17bb(0x1bd)](_0x4e9d49['waitCondition'][_0x2f17bb(0x1c8)]);}for(const _0x5da675 of _0x46430a){_0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x1e6)+_0xf0890a+'_'+_0x5c4d5a+'_'+_0x5da675,{..._0xc47818,'direction':'in','category':'branch'}));}}}}return _0x2142eb[_0x2f17bb(0x1bd)](col(_0x2f17bb(0x208))),_0x2142eb;}export function aggregateJourneyHistory(_0x5d8e33){const _0x46c876=a130_0x13b93c,_0x3b0223=_0x5d8e33[_0x46c876(0x1cf)]((_0x3bbde7,_0x56782a)=>_0x3bbde7+(_0x56782a[_0x46c876(0x206)]??0x0),0x0),_0x445a08=_0x5d8e33[_0x46c876(0x1cf)]((_0x5e8778,_0x33881)=>_0x5e8778+(_0x33881['goalInflux']??0x0),0x0),_0x26a433=_0x5d8e33[_0x46c876(0x1cf)]((_0x41b63a,_0xbe57a1)=>_0x41b63a+((_0xbe57a1[_0x46c876(0x21d)]??0x0)+(_0xbe57a1[_0x46c876(0x1fa)]??0x0)),0x0),_0x42981c=_0x5d8e33[_0x5d8e33['length']-0x1];return{'size':_0x42981c?.[_0x46c876(0x220)]??0x0,'entered':_0x3b0223,'goal_achieved':_0x445a08,'completion_rate':_0x445a08&&_0x3b0223?_0x445a08/_0x3b0223*0x64:0x0,'exit_or_jump':_0x26a433,'exit_or_jump_rate':_0x26a433&&_0x3b0223?_0x26a433/_0x3b0223*0x64:0x0};}export function aggregateStageHistory(_0x1cb2ce){const _0xefe302=a130_0x13b93c,_0x47962b=_0x1cb2ce['reduce']((_0x2aecee,_0x140b38)=>_0x2aecee+(_0x140b38[_0xefe302(0x206)]??0x0),0x0),_0xfdb57a=_0x1cb2ce[_0xefe302(0x1cf)]((_0x41facf,_0x5c269a)=>_0x41facf+(_0x5c269a['milestoneInflux']??0x0),0x0),_0x6c0397=_0x1cb2ce['reduce']((_0x936f20,_0x40ce03)=>_0x936f20+((_0x40ce03[_0xefe302(0x21d)]??0x0)+(_0x40ce03[_0xefe302(0x1fa)]??0x0)),0x0),_0x5c0737=_0x1cb2ce[_0x1cb2ce[_0xefe302(0x203)]-0x1];return{'size':_0x5c0737?.[_0xefe302(0x220)]??0x0,'entered':_0x47962b,'milestone':_0xfdb57a,'milestone_rate':_0xfdb57a&&_0x47962b?_0xfdb57a/_0x47962b*0x64:0x0,'exit_or_jump':_0x6c0397,'exit_or_jump_rate':_0x6c0397&&_0x47962b?_0x6c0397/_0x47962b*0x64:0x0};}export function assembleJourneyStats(_0x17dffe,_0x3e84ea){const _0x1e1a06=a130_0x13b93c,_0x3a5ff1=!!(_0x3e84ea?.[_0x1e1a06(0x1b3)]||_0x3e84ea?.['to'])&&!!_0x17dffe[_0x1e1a06(0x1b2)]?.[_0x1e1a06(0x203)];if(_0x3a5ff1){const _0x4931bd=aggregateJourneyHistory(_0x17dffe[_0x1e1a06(0x1b2)]),_0x68e628={'journey_id':_0x17dffe[_0x1e1a06(0x1fd)],..._0x3e84ea?.[_0x1e1a06(0x1b3)]&&{'from':_0x3e84ea['from']},..._0x3e84ea?.['to']&&{'to':_0x3e84ea['to']},..._0x4931bd};return _0x3e84ea?.[_0x1e1a06(0x1ac)]&&(_0x68e628[_0x1e1a06(0x1b2)]=_0x17dffe[_0x1e1a06(0x1b2)]),_0x68e628;}return{'journey_id':_0x17dffe[_0x1e1a06(0x1fd)],'size':_0x17dffe[_0x1e1a06(0x220)],'entered':_0x17dffe[_0x1e1a06(0x1fb)],'goal_achieved':_0x17dffe[_0x1e1a06(0x230)],'completion_rate':_0x17dffe[_0x1e1a06(0x20a)],'exit_or_jump':_0x17dffe[_0x1e1a06(0x20e)],'exit_or_jump_rate':_0x17dffe[_0x1e1a06(0x1bf)]};}export function formatVersionsFromBundle(_0x37149b){const _0x221218=a130_0x13b93c,_0x49f78d=_0x37149b['journeys']['map'](_0x6f1a2e=>({'journeyId':_0x6f1a2e['id'],'versionNumber':_0x6f1a2e[_0x221218(0x1eb)]['versionNumber']??0x0,'name':_0x6f1a2e['attributes']['name'],'state':_0x6f1a2e[_0x221218(0x1eb)]['state'],'paused':_0x6f1a2e[_0x221218(0x1eb)]['paused'],'createdAt':_0x6f1a2e[_0x221218(0x1eb)][_0x221218(0x1e7)],'updatedAt':_0x6f1a2e[_0x221218(0x1eb)][_0x221218(0x21e)]}));return _0x49f78d['sort']((_0x27c00d,_0x53c0d5)=>_0x27c00d['versionNumber']-_0x53c0d5[_0x221218(0x1c3)]),_0x49f78d;}export function synthesizePreBundleVersion(_0x4d69f5){const _0x22a78d=a130_0x13b93c;return{'journeyId':_0x4d69f5['id'],'versionNumber':0x1,'name':_0x4d69f5[_0x22a78d(0x1eb)][_0x22a78d(0x1d9)],'state':_0x4d69f5[_0x22a78d(0x1eb)][_0x22a78d(0x1c5)],'paused':_0x4d69f5[_0x22a78d(0x1eb)][_0x22a78d(0x1af)],'createdAt':_0x4d69f5['attributes'][_0x22a78d(0x1e7)],'updatedAt':_0x4d69f5[_0x22a78d(0x1eb)][_0x22a78d(0x21e)]};}export function buildStageNameMap(_0x4102c8){const _0x324c23=a130_0x13b93c;return new Map(_0x4102c8['attributes'][_0x324c23(0x226)]?.[_0x324c23(0x1be)](_0x3b0b5c=>[_0x3b0b5c['id'],_0x3b0b5c[_0x324c23(0x1d9)]])??[]);}export class JourneySDK{[a130_0x13b93c(0x1b9)];constructor(_0x7ab941){const _0x2363e8=a130_0x13b93c;this[_0x2363e8(0x1b9)]=new CDPApiClient(_0x7ab941);}[a130_0x13b93c(0x222)](_0x50bb72,_0xa4c44a){return _0xa4c44a?_0x50bb72:deduplicateJourneysByBundle(_0x50bb72);}async['listJourneysWithDetails'](_0x276a78,_0x2d7e1f){const _0x6926df=a130_0x13b93c;try{const _0x2408a5=await this[_0x6926df(0x1b9)][_0x6926df(0x223)](_0x276a78);return{'journeys':this[_0x6926df(0x222)](_0x2408a5[_0x6926df(0x22c)],_0x2d7e1f),'activationStepsById':_0x2408a5[_0x6926df(0x1c7)]};}catch(_0x545b0d){if(isHttp404Error(_0x545b0d))return{'journeys':[],'activationStepsById':new Map()};throw _0x545b0d;}}async[a130_0x13b93c(0x233)](_0x535fe5,_0x3aeea9,_0x5324bf){const _0x2aeabb=a130_0x13b93c;let _0x2bcecd=_0x3aeea9;if(!_0x2bcecd)try{const _0x283a42=await this[_0x2aeabb(0x1b9)][_0x2aeabb(0x1dc)](_0x535fe5);_0x2bcecd=_0x283a42[_0x2aeabb(0x1ed)]??undefined;}catch(_0x4092ac){if(isHttp404Error(_0x4092ac))return[];throw _0x4092ac;}if(!_0x2bcecd)return[];let _0x2b255b;if(_0x5324bf?.[_0x2aeabb(0x1b6)]){const _0x4ad832=await this['client'][_0x2aeabb(0x21c)](_0x535fe5),_0x45bb7b=_0x4ad832[_0x2aeabb(0x1be)](_0xfa8535=>this[_0x2aeabb(0x1b9)][_0x2aeabb(0x1d8)](_0xfa8535['id'])),_0x27cc93=await Promise[_0x2aeabb(0x212)](_0x45bb7b),_0x4501e4=new Set();_0x2b255b=_0x27cc93[_0x2aeabb(0x1cb)]()['filter'](_0x528f25=>{const _0x5be8a9=_0x2aeabb;if(_0x4501e4[_0x5be8a9(0x1b1)](_0x528f25['id']))return![];return _0x4501e4[_0x5be8a9(0x1fe)](_0x528f25['id']),!![];});}else{const _0x298fa5=await this['client'][_0x2aeabb(0x1e9)](_0x2bcecd,0x20,![]),_0x4d8564=_0x298fa5[_0x2aeabb(0x221)],_0x482fe8=_0x4d8564[_0x2aeabb(0x217)](_0x38cdbb=>_0x38cdbb['type']===_0x2aeabb(0x1f6));_0x2b255b=_0x482fe8[_0x2aeabb(0x1be)](_0x22d6a2=>entityToJourneyListItem(_0x22d6a2,_0x535fe5));}return this[_0x2aeabb(0x222)](_0x2b255b,_0x5324bf?.['includeAllVersions']);}async['listJourneysWithFolders'](_0x468c93,_0xbac98b,_0x215ccc){const _0x14c9e0=a130_0x13b93c;if(!_0xbac98b)return{'journeys':[],'folders':[]};const _0x3dc979=await this[_0x14c9e0(0x1b9)]['listEntitiesByFolder'](_0xbac98b,0x20,![]),_0x30c704=_0x3dc979[_0x14c9e0(0x221)],_0x13067a=_0x30c704[_0x14c9e0(0x217)](_0x1348bc=>_0x1348bc[_0x14c9e0(0x21f)]===_0x14c9e0(0x1d7)&&_0x1348bc['id']!==_0xbac98b),_0x260b9c=_0x13067a[_0x14c9e0(0x1be)](_0x180bef=>({'id':_0x180bef['id'],'name':_0x180bef[_0x14c9e0(0x1eb)]['name']})),_0x360f0e=_0x30c704[_0x14c9e0(0x217)](_0x51c6d3=>_0x51c6d3[_0x14c9e0(0x21f)]===_0x14c9e0(0x1f6)),_0x31299a=_0x360f0e[_0x14c9e0(0x1be)](_0x5d2a42=>entityToJourneyListItem(_0x5d2a42,_0x468c93));return{'journeys':this[_0x14c9e0(0x222)](_0x31299a,_0x215ccc?.[_0x14c9e0(0x1b6)]),'folders':_0x260b9c};}async[a130_0x13b93c(0x22b)](_0x5a8bde,_0x1b6863){const _0x5bacfc=a130_0x13b93c;let _0x497b75;try{_0x497b75=await this[_0x5bacfc(0x1b9)][_0x5bacfc(0x21c)](_0x5a8bde);}catch(_0x5cd12e){if(isHttp404Error(_0x5cd12e))return{'journeys':[],'activationStepsById':new Map()};throw _0x5cd12e;}const _0x5a07e2=_0x497b75[_0x5bacfc(0x1be)](async _0x3f1110=>{const _0x31e34e=_0x5bacfc;return await this[_0x31e34e(0x223)](_0x3f1110['id'],_0x1b6863?.[_0x31e34e(0x1b6)]);}),_0x3fbf6f=await Promise[_0x5bacfc(0x212)](_0x5a07e2),_0x2535cd=new Map(),_0x2119ff=[];for(const _0x47dacc of _0x3fbf6f){_0x2119ff[_0x5bacfc(0x1bd)](..._0x47dacc[_0x5bacfc(0x22c)]);for(const [_0x5f0499,_0x2d8e42]of _0x47dacc['activationStepsById']){_0x2535cd[_0x5bacfc(0x1c0)](_0x5f0499,_0x2d8e42);}}const _0x5048fb=new Set(),_0xff0535=_0x2119ff[_0x5bacfc(0x217)](_0x590e39=>{const _0xd31637=_0x5bacfc;if(_0x5048fb[_0xd31637(0x1b1)](_0x590e39['id']))return![];return _0x5048fb[_0xd31637(0x1fe)](_0x590e39['id']),!![];});return{'journeys':this[_0x5bacfc(0x222)](_0xff0535,_0x1b6863?.[_0x5bacfc(0x1b6)]),'activationStepsById':_0x2535cd};}async[a130_0x13b93c(0x1cd)](_0x7a3cbb){const _0x5d7665=a130_0x13b93c;try{return await this[_0x5d7665(0x1b9)][_0x5d7665(0x1cd)](_0x7a3cbb);}catch(_0x16580c){if(isHttp404Error(_0x16580c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x5d7665(0x228)+_0x7a3cbb,_0x16580c);throw _0x16580c;}}async[a130_0x13b93c(0x1cc)](_0xd6275c,_0x3da329){const _0x3bd9ab=a130_0x13b93c,_0x26d140=await this[_0x3bd9ab(0x233)](_0xd6275c),_0x3c7917=_0x26d140[_0x3bd9ab(0x1d1)](_0x3f4f89=>_0x3f4f89[_0x3bd9ab(0x1ea)]['toLowerCase']()===_0x3da329[_0x3bd9ab(0x1ee)]());if(!_0x3c7917)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x3bd9ab(0x228)+_0x3da329,undefined,{'helpText':_0x3bd9ab(0x216)});return _0x3c7917['id'];}async[a130_0x13b93c(0x202)](_0x3a0da5,_0x300bf0){const _0xe788bc=a130_0x13b93c;try{return await this[_0xe788bc(0x1b9)][_0xe788bc(0x201)](_0x3a0da5,_0x300bf0);}catch(_0x2a86c9){if(isHttp404Error(_0x2a86c9))throw new SDKError(ErrorCode[_0xe788bc(0x1ce)],_0xe788bc(0x228)+_0x3a0da5,_0x2a86c9);throw _0x2a86c9;}}async[a130_0x13b93c(0x214)](_0x6f87e1,_0x12ce7f){const _0x299ff0=a130_0x13b93c,_0x40b911={'from':_0x12ce7f?.[_0x299ff0(0x1b3)],'to':_0x12ce7f?.['to'],'limit':_0x12ce7f?.[_0x299ff0(0x227)]},_0x22b114=_0x12ce7f?.['type']!==_0x299ff0(0x1c6);try{const [_0x837e4f,_0x4477e2]=await Promise['all']([this[_0x299ff0(0x1f0)](_0x6f87e1,_0x12ce7f?.['type'],_0x40b911),_0x22b114?this[_0x299ff0(0x1cd)](_0x6f87e1):undefined]);if(_0x837e4f['activation']&&_0x4477e2){const _0x366c56=buildStageNameMap(_0x4477e2);_0x837e4f[_0x299ff0(0x1d4)]=_0x837e4f['activation'][_0x299ff0(0x1be)](_0x56c6b2=>({..._0x56c6b2,'journeyStageName':_0x366c56[_0x299ff0(0x225)](_0x56c6b2['journeyStageId'])??_0x56c6b2[_0x299ff0(0x23a)]}));}return _0x837e4f;}catch(_0x523e51){if(isHttp404Error(_0x523e51))throw new SDKError(ErrorCode[_0x299ff0(0x1ce)],_0x299ff0(0x228)+_0x6f87e1,_0x523e51);throw _0x523e51;}}async[a130_0x13b93c(0x1f0)](_0x53b7b4,_0x46ff9b,_0x3f55f1){const _0x5ea2a8=a130_0x13b93c;if(_0x46ff9b===_0x5ea2a8(0x1c6)){const _0xf56572=await this[_0x5ea2a8(0x1b9)][_0x5ea2a8(0x1dd)](_0x53b7b4,_0x3f55f1);return{'conversion':_0xf56572};}if(_0x46ff9b===_0x5ea2a8(0x1d4)){const _0x301de2=await this[_0x5ea2a8(0x1b9)]['getActivationSankeyChart'](_0x53b7b4,_0x3f55f1);return{'activation':_0x301de2};}const [_0x2fef56,_0xd0561a]=await Promise[_0x5ea2a8(0x212)]([this['client'][_0x5ea2a8(0x1dd)](_0x53b7b4,_0x3f55f1),this[_0x5ea2a8(0x1b9)][_0x5ea2a8(0x1f5)](_0x53b7b4,_0x3f55f1)]);return{'conversion':_0x2fef56,'activation':_0xd0561a};}async[a130_0x13b93c(0x1d2)](_0x883302){const _0x45cb4c=a130_0x13b93c;try{return await this[_0x45cb4c(0x1b9)][_0x45cb4c(0x1f9)](_0x883302);}catch(_0x3eca84){if(isHttp404Error(_0x3eca84))throw new SDKError(ErrorCode[_0x45cb4c(0x1ce)],_0x45cb4c(0x228)+_0x883302,_0x3eca84);throw _0x3eca84;}}async[a130_0x13b93c(0x234)](_0x227fa0){const _0x1432fd=a130_0x13b93c;try{return await this[_0x1432fd(0x1b9)]['resumeJourney'](_0x227fa0);}catch(_0x36907b){if(isHttp404Error(_0x36907b))throw new SDKError(ErrorCode[_0x1432fd(0x1ce)],_0x1432fd(0x228)+_0x227fa0,_0x36907b);throw _0x36907b;}}async[a130_0x13b93c(0x219)](_0x1a282f){const _0x57a5ca=a130_0x13b93c;return await this[_0x57a5ca(0x1b9)][_0x57a5ca(0x1f4)](_0x1a282f);}async['update'](_0x9f67,_0x49797a){const _0x2958d0=a130_0x13b93c;try{return await this[_0x2958d0(0x1b9)][_0x2958d0(0x1c9)](_0x9f67,_0x49797a);}catch(_0x3eeeac){if(isHttp404Error(_0x3eeeac))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x2958d0(0x228)+_0x9f67,_0x3eeeac);throw _0x3eeeac;}}async['getActivation'](_0x392b16,_0x27d280){const _0x3dc8a9=a130_0x13b93c;try{return await this['client'][_0x3dc8a9(0x204)](_0x392b16,_0x27d280);}catch(_0x4f28be){if(isHttp404Error(_0x4f28be))throw new SDKError(ErrorCode[_0x3dc8a9(0x215)],_0x3dc8a9(0x1ec)+_0x27d280+_0x3dc8a9(0x1f7)+_0x392b16,_0x4f28be);throw _0x4f28be;}}async['listActivations'](_0xad2799){const _0x867af3=a130_0x13b93c;try{return await this['client'][_0x867af3(0x1f8)](_0xad2799);}catch(_0xe44272){if(isHttp404Error(_0xe44272))return[];throw _0xe44272;}}async['listActivationsFlat'](_0xa515df){const _0x1f5bab=a130_0x13b93c,_0x4426d3=await this['listActivations'](_0xa515df);return _0x4426d3[_0x1f5bab(0x1be)](flattenJourneyActivation);}async[a130_0x13b93c(0x1e5)](_0x46613b,_0x2b0b31){const _0x494445=a130_0x13b93c;return await this[_0x494445(0x1b9)][_0x494445(0x211)](_0x46613b,_0x2b0b31);}async[a130_0x13b93c(0x1c2)](_0x4a3072){const _0x3b767e=a130_0x13b93c,_0x2f3af0=await this[_0x3b767e(0x1cd)](_0x4a3072),_0x167f9a=generateColumnMapping(_0x2f3af0);return{'journeyId':_0x2f3af0['id'],'journeyName':_0x2f3af0[_0x3b767e(0x1eb)][_0x3b767e(0x1d9)],'database':_0x3b767e(0x1de)+_0x2f3af0[_0x3b767e(0x1eb)][_0x3b767e(0x20c)],'table':'journey_'+_0x2f3af0['id'],'columns':_0x167f9a};}async[a130_0x13b93c(0x1b4)](_0x5dab83){const _0x10985f=a130_0x13b93c;return this[_0x10985f(0x1b9)][_0x10985f(0x1c4)](_0x5dab83);}async[a130_0x13b93c(0x1e2)](_0x47f2a7){if(!_0x47f2a7)return undefined;try{const _0x2a6cf1=await this['getBundle'](_0x47f2a7);return _0x2a6cf1['latestJourneyId'];}catch{return undefined;}}async[a130_0x13b93c(0x21a)](_0x50573e){const _0x50226a=a130_0x13b93c,_0x139bb6=await this[_0x50226a(0x1cd)](_0x50573e),_0x36f954=_0x139bb6['attributes'][_0x50226a(0x20b)];if(!_0x36f954)return{'bundleId':'','bundleName':_0x139bb6[_0x50226a(0x1eb)][_0x50226a(0x1d9)],'bundleDescription':_0x139bb6['attributes'][_0x50226a(0x1ff)]??null,'latestJourneyId':_0x139bb6['id'],'versions':[synthesizePreBundleVersion(_0x139bb6)]};const _0x3b4c4e=await this[_0x50226a(0x1b4)](_0x36f954);return{'bundleId':_0x36f954,'bundleName':_0x3b4c4e[_0x50226a(0x1d9)],'bundleDescription':_0x3b4c4e[_0x50226a(0x1ff)]??null,'latestJourneyId':_0x3b4c4e[_0x50226a(0x1da)],'versions':formatVersionsFromBundle(_0x3b4c4e)};}async['createVersion'](_0x1dbf03){const _0x70a43c=a130_0x13b93c,_0xf42803=await this[_0x70a43c(0x1cd)](_0x1dbf03),_0x293c1a=_0xf42803[_0x70a43c(0x1eb)][_0x70a43c(0x20b)];if(!_0x293c1a)throw new SDKError(ErrorCode[_0x70a43c(0x210)],_0x70a43c(0x207));await this[_0x70a43c(0x1b9)]['checkJourneyAppendable'](_0x293c1a);const _0x56245a=await this[_0x70a43c(0x1b9)][_0x70a43c(0x1c4)](_0x293c1a),_0x15e0a2=_0x56245a[_0x70a43c(0x1d9)]+'\x20v'+(_0x56245a[_0x70a43c(0x1ba)]+0x1);return this[_0x70a43c(0x1b9)][_0x70a43c(0x1b0)](_0x293c1a,{'sourceId':_0x1dbf03,'attributes':{'name':_0x15e0a2}});}}
|
|
1
|
+
const a131_0x3560f7=a131_0x3a3d;function a131_0x3a3d(_0x4b2782,_0x14ef5c){_0x4b2782=_0x4b2782-0xe3;const _0x3cdf09=a131_0x3cdf();let _0x3a3d3d=_0x3cdf09[_0x4b2782];return _0x3a3d3d;}function a131_0x3cdf(){const _0x546832=['milestoneInflux','values','ABTest','130ypkwzU','excluded','getParentSegmentFull','conversion','createJourneyActivation','getTrafficData','\x20in\x20journey\x20','journeys','entries','conditions','createVersion','activationStepsById','journeyId','getJourneyBundle','WaitStep','listEntitiesByFolder','getBundle','JOURNEY_NOT_FOUND','map','outtime_journey','history','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','step','simulation','entryCriteria','intime_journey','string','add','conditionSegmentId','stage','intime_stage_','14236baBhCK','push','milestone','versionNumber','listJourneys','idx-','updateJourney','_exit_','includeAllVersions','enteredSize','cdp_customer_id','reduce','listJourneyActivations','132027ChgkDu','cdp_audience_','3040239JigvDb','name','15274uDbKPW','draft','parentFolder','filter','create','flat','type','getConversionSankeyChart','resume','description','timedOutPath','listSegmentFolders','folder-segment','9806780djAITa','intime_goal','time','createActivation','Journey\x20not\x20found:\x20','branch','exitCriteria','getJourney','update','waitCondition','getJourneyStatistics','getActivationSankeyChart','replace','all','branches','listJourneysWithDetails','goalInflux','activation','rootFolderId','variant','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','pauseJourney','getLatestJourneyId','state','get','has','Journey\x20activation\x20step\x20not\x20found:\x20','getActivation','attributes','journeyStageId','entryInflux','fetchTrafficRaw','outtime_stage_','exitCriterias','1617516gdKfFY','includeHistory','928OjKhWL','audienceId','relationships','NOT_FOUND','journey_','listActivations','DecisionPoint','exitInflux','segmentFolderId','segmentId','Wait','listActivationsFlat','data','journeyStages','Excluded\x20profiles','from','journey','pause','9ectJYJ','getJourneyActivation','length','jumpInflux','out','resumeJourney','INVALID_ARGUMENT','510508QQLKOq','goalSize','updatedAt','sort','getColumnMapping','applyVersionDeduplication','size','steps','paused','journeyBundleId','set','isArray','listJourneysWithDetailsFromParentSegment','fixed','createdAt','client','launched','goal','exitOrJumpSize'];a131_0x3cdf=function(){return _0x546832;};return a131_0x3cdf();}(function(_0x585109,_0x27cf3e){const _0x2367ca=a131_0x3a3d,_0x3ea0c6=_0x585109();while(!![]){try{const _0x5ebfdc=-parseInt(_0x2367ca(0x11e))/0x1+parseInt(_0x2367ca(0x16c))/0x2+-parseInt(_0x2367ca(0x120))/0x3+parseInt(_0x2367ca(0x111))/0x4*(-parseInt(_0x2367ca(0xf2))/0x5)+parseInt(_0x2367ca(0x151))/0x6+-parseInt(_0x2367ca(0x122))/0x7*(-parseInt(_0x2367ca(0x153))/0x8)+parseInt(_0x2367ca(0x165))/0x9*(parseInt(_0x2367ca(0x12f))/0xa);if(_0x5ebfdc===_0x27cf3e)break;else _0x3ea0c6['push'](_0x3ea0c6['shift']());}catch(_0x1b18e7){_0x3ea0c6['push'](_0x3ea0c6['shift']());}}}(a131_0x3cdf,0x7f1d0));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x462d11){const _0x14c26f=a131_0x3a3d;return _0x462d11[_0x14c26f(0xe5)]??_0x462d11[_0x14c26f(0x14b)]?.[_0x14c26f(0xe5)]??undefined;}function getVersionNumber(_0x1dcb5b){const _0x4cbfbd=a131_0x3a3d;return _0x1dcb5b['versionNumber']??_0x1dcb5b[_0x4cbfbd(0x14b)]?.['versionNumber']??0x0;}function getState(_0x16a98c){const _0x1382a1=a131_0x3a3d;return _0x16a98c[_0x1382a1(0x146)]??_0x16a98c[_0x1382a1(0x14b)]?.[_0x1382a1(0x146)];}export function deduplicateJourneysByBundle(_0x224215){const _0x28dc5f=a131_0x3a3d,_0x2feffe=new Map();let _0x2a5506=0x0;for(const _0x5113e3 of _0x224215){const _0x47993a=getBundleId(_0x5113e3);if(!_0x47993a){const _0x123e68='no-bundle-'+(_0x5113e3['id']??_0x28dc5f(0x116)+_0x2a5506++);_0x2feffe[_0x28dc5f(0xe6)](_0x123e68,_0x5113e3);continue;}const _0xc02ee=_0x2feffe[_0x28dc5f(0x147)](_0x47993a);if(!_0xc02ee)_0x2feffe[_0x28dc5f(0xe6)](_0x47993a,_0x5113e3);else{const _0x6e154b=getState(_0xc02ee)===_0x28dc5f(0xec),_0x525f20=getState(_0x5113e3)===_0x28dc5f(0xec);if(_0x525f20&&!_0x6e154b)_0x2feffe[_0x28dc5f(0xe6)](_0x47993a,_0x5113e3);else{if(!_0x525f20&&_0x6e154b){}else{const _0xd3c35d=getVersionNumber(_0xc02ee),_0x1e674f=getVersionNumber(_0x5113e3);_0x1e674f>_0xd3c35d&&_0x2feffe[_0x28dc5f(0xe6)](_0x47993a,_0x5113e3);}}}}return Array[_0x28dc5f(0x162)](_0x2feffe[_0x28dc5f(0xf0)]());}const VALID_JOURNEY_STATES=new Set(['draft',a131_0x3560f7(0x109),a131_0x3560f7(0xec)]);export function parseJourneyState(_0x1cd009){const _0xf2bb73=a131_0x3560f7;if(typeof _0x1cd009===_0xf2bb73(0x10c)&&VALID_JOURNEY_STATES['has'](_0x1cd009))return _0x1cd009;return _0xf2bb73(0x123);}export function entityToJourneyListItem(_0x18acde,_0x3031c4){const _0x8675d4=a131_0x3560f7,_0x1061d1=_0x18acde[_0x8675d4(0x14b)];return{'id':_0x18acde['id'],'name':_0x1061d1['name']??'','journeyBundleName':_0x1061d1['journeyBundleName']??_0x1061d1[_0x8675d4(0x121)]??'','journeyBundleId':_0x1061d1[_0x8675d4(0xe5)]??'','versionNumber':_0x1061d1[_0x8675d4(0x114)],'description':_0x1061d1[_0x8675d4(0x12b)]??null,'state':parseJourneyState(_0x1061d1[_0x8675d4(0x146)]),'paused':_0x1061d1[_0x8675d4(0xe4)]??![],'audienceId':_0x3031c4,'folderId':_0x1061d1[_0x8675d4(0x15b)]??_0x18acde[_0x8675d4(0x155)]?.[_0x8675d4(0x124)]?.[_0x8675d4(0x15f)]?.['id']??null,'createdAt':_0x1061d1['createdAt']??'','updatedAt':_0x1061d1['updatedAt']??''};}function convertToColumnId(_0x527bd7){const _0xe93955=a131_0x3560f7;return _0x527bd7[_0xe93955(0x13b)](/-/g,'_');}function getStepEntries(_0x194b4a){const _0x4307cc=a131_0x3560f7;if(!_0x194b4a)return[];if(Array['isArray'](_0x194b4a))return _0x194b4a[_0x4307cc(0x104)](_0x2af22a=>[_0x2af22a['id'],_0x2af22a]);return Object[_0x4307cc(0xfa)](_0x194b4a);}export function flattenJourneyActivation(_0x5e2f5a){const _0x42d792=a131_0x3560f7,{activationParams:_0x18349d,activationId:_0x570eb9,runAfterJourneyRefresh:_0x29b264}=_0x5e2f5a[_0x42d792(0x14b)];return{'id':_0x5e2f5a['id'],'activationId':_0x570eb9,'runAfterJourneyRefresh':_0x29b264,..._0x18349d};}function col(_0x1eb0e0,_0x50db24={}){const _0x3dc7f3=a131_0x3560f7;return{'column':_0x1eb0e0,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3dc7f3(0xe9),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x50db24};}export function generateColumnMapping(_0x92e7fe){const _0x10f193=a131_0x3560f7,_0xd18a32=[];_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x11b))),_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x10b),{'direction':'in','category':_0x10f193(0x163)})),_0xd18a32['push'](col(_0x10f193(0x105),{'direction':'out','category':_0x10f193(0x163)}));_0x92e7fe[_0x10f193(0x14b)][_0x10f193(0xed)]&&_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x130),{'direction':'in','category':_0x10f193(0xed),'detail':_0x92e7fe[_0x10f193(0x14b)]['goal']['name']||null}));const _0x2ba63e=_0x92e7fe[_0x10f193(0x14b)][_0x10f193(0x160)]||[];for(let _0x184b32=0x0;_0x184b32<_0x2ba63e[_0x10f193(0x167)];_0x184b32++){const _0x2154aa=_0x2ba63e[_0x184b32],_0x78ba88=_0x2154aa[_0x10f193(0x121)],_0x5082b3={'stageIndex':_0x184b32,'stageName':_0x78ba88},_0x282ae7=_0x2154aa[_0x10f193(0x10a)]?.[_0x10f193(0x121)]||null;_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32,{..._0x5082b3,'direction':'in','category':'stage','detail':_0x282ae7})),_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x14f)+_0x184b32,{..._0x5082b3,'direction':_0x10f193(0x169),'category':_0x10f193(0x10f),'detail':_0x282ae7}));_0x2154aa[_0x10f193(0x113)]&&_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32+'_milestone',{..._0x5082b3,'direction':'in','category':_0x10f193(0x113),'detail':_0x2154aa[_0x10f193(0x113)]['name']||null}));const _0x1223b2=_0x2154aa[_0x10f193(0x150)]||_0x2154aa[_0x10f193(0x135)]||[];for(let _0x6053c=0x0;_0x6053c<_0x1223b2[_0x10f193(0x167)];_0x6053c++){_0xd18a32[_0x10f193(0x112)](col('intime_stage_'+_0x184b32+_0x10f193(0x118)+_0x6053c,{..._0x5082b3,'direction':'in','category':'exit_criteria','detail':_0x1223b2[_0x6053c]['name']||null}));}const _0x586193=getStepEntries(_0x2154aa[_0x10f193(0xe3)]);for(const [_0x36d7aa,_0x3eae6f]of _0x586193){const _0x4e0d90=convertToColumnId(_0x36d7aa),_0x33583f=_0x3eae6f['type']||null,_0xc88f3b=_0x3eae6f[_0x10f193(0x121)]||null,_0x524c4c={..._0x5082b3,'stepType':_0x33583f,'stepName':_0xc88f3b,'stepId':_0x36d7aa};_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32+'_'+_0x4e0d90,{..._0x524c4c,'direction':'in','category':_0x10f193(0x108)})),_0xd18a32['push'](col(_0x10f193(0x14f)+_0x184b32+'_'+_0x4e0d90,{..._0x524c4c,'direction':_0x10f193(0x169),'category':'step'}));if(_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0x159)&&_0x3eae6f[_0x10f193(0x13d)])for(const _0x32c1c8 of _0x3eae6f[_0x10f193(0x13d)]){_0x32c1c8[_0x10f193(0x15c)]&&_0xd18a32['push'](col('intime_stage_'+_0x184b32+'_'+_0x4e0d90+'_'+_0x32c1c8[_0x10f193(0x15c)],{..._0x524c4c,'direction':'in','category':_0x10f193(0x134),'detail':_0x32c1c8[_0x10f193(0x121)]||(_0x32c1c8[_0x10f193(0xf3)]?_0x10f193(0x161):null)}));}if((_0x3eae6f[_0x10f193(0x128)]==='AbTest'||_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0xf1))&&_0x3eae6f['variants'])for(const _0x4435d4 of _0x3eae6f['variants']){_0x4435d4['id']&&_0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x110)+_0x184b32+'_'+_0x4e0d90+'_variant_'+convertToColumnId(_0x4435d4['id']),{..._0x524c4c,'direction':'in','category':_0x10f193(0x142),'detail':_0x4435d4['name']||null}));}if(_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0x100)||_0x3eae6f[_0x10f193(0x128)]===_0x10f193(0x15d)){const _0x196828=[];if(_0x3eae6f['conditionSegmentId'])_0x196828['push'](_0x3eae6f[_0x10f193(0x10e)]);else{if(Array[_0x10f193(0xe7)](_0x3eae6f[_0x10f193(0xfb)]))for(const _0x5c2d35 of _0x3eae6f[_0x10f193(0xfb)]){_0x5c2d35['segmentId']&&!_0x5c2d35[_0x10f193(0x12c)]&&_0x196828[_0x10f193(0x112)](_0x5c2d35[_0x10f193(0x15c)]);}else _0x3eae6f[_0x10f193(0x138)]?.['segmentId']&&_0x196828[_0x10f193(0x112)](_0x3eae6f[_0x10f193(0x138)][_0x10f193(0x15c)]);}for(const _0x4e0de7 of _0x196828){_0xd18a32['push'](col(_0x10f193(0x110)+_0x184b32+'_'+_0x4e0d90+'_'+_0x4e0de7,{..._0x524c4c,'direction':'in','category':_0x10f193(0x134)}));}}}}return _0xd18a32[_0x10f193(0x112)](col(_0x10f193(0x131))),_0xd18a32;}export function aggregateJourneyHistory(_0x1f1cd5){const _0x736a70=a131_0x3560f7,_0x2d1666=_0x1f1cd5[_0x736a70(0x11c)]((_0x15d891,_0x24c353)=>_0x15d891+(_0x24c353[_0x736a70(0x14d)]??0x0),0x0),_0xc0f88=_0x1f1cd5['reduce']((_0x9d97ee,_0x4408a0)=>_0x9d97ee+(_0x4408a0[_0x736a70(0x13f)]??0x0),0x0),_0x2631eb=_0x1f1cd5[_0x736a70(0x11c)]((_0x4905f0,_0x1bfa3b)=>_0x4905f0+((_0x1bfa3b[_0x736a70(0x15a)]??0x0)+(_0x1bfa3b[_0x736a70(0x168)]??0x0)),0x0),_0x12719b=_0x1f1cd5[_0x1f1cd5[_0x736a70(0x167)]-0x1];return{'size':_0x12719b?.['size']??0x0,'entered':_0x2d1666,'goal_achieved':_0xc0f88,'completion_rate':_0xc0f88&&_0x2d1666?_0xc0f88/_0x2d1666*0x64:0x0,'exit_or_jump':_0x2631eb,'exit_or_jump_rate':_0x2631eb&&_0x2d1666?_0x2631eb/_0x2d1666*0x64:0x0};}export function aggregateStageHistory(_0x2a0610){const _0x515831=a131_0x3560f7,_0x1b8824=_0x2a0610[_0x515831(0x11c)]((_0x381b3a,_0x217292)=>_0x381b3a+(_0x217292[_0x515831(0x14d)]??0x0),0x0),_0x39e3c1=_0x2a0610[_0x515831(0x11c)]((_0xdbba1b,_0x3f17b4)=>_0xdbba1b+(_0x3f17b4[_0x515831(0xef)]??0x0),0x0),_0x38d9fd=_0x2a0610['reduce']((_0x139019,_0x2af857)=>_0x139019+((_0x2af857[_0x515831(0x15a)]??0x0)+(_0x2af857[_0x515831(0x168)]??0x0)),0x0),_0x2e2788=_0x2a0610[_0x2a0610[_0x515831(0x167)]-0x1];return{'size':_0x2e2788?.[_0x515831(0x172)]??0x0,'entered':_0x1b8824,'milestone':_0x39e3c1,'milestone_rate':_0x39e3c1&&_0x1b8824?_0x39e3c1/_0x1b8824*0x64:0x0,'exit_or_jump':_0x38d9fd,'exit_or_jump_rate':_0x38d9fd&&_0x1b8824?_0x38d9fd/_0x1b8824*0x64:0x0};}export function assembleJourneyStats(_0x41b633,_0x2e1f21){const _0x147766=a131_0x3560f7,_0x17f873=!!(_0x2e1f21?.['from']||_0x2e1f21?.['to'])&&!!_0x41b633[_0x147766(0x106)]?.[_0x147766(0x167)];if(_0x17f873){const _0x288873=aggregateJourneyHistory(_0x41b633[_0x147766(0x106)]),_0x52ffd3={'journey_id':_0x41b633[_0x147766(0xfe)],..._0x2e1f21?.[_0x147766(0x162)]&&{'from':_0x2e1f21[_0x147766(0x162)]},..._0x2e1f21?.['to']&&{'to':_0x2e1f21['to']},..._0x288873};return _0x2e1f21?.[_0x147766(0x152)]&&(_0x52ffd3[_0x147766(0x106)]=_0x41b633['history']),_0x52ffd3;}return{'journey_id':_0x41b633['journeyId'],'size':_0x41b633[_0x147766(0x172)],'entered':_0x41b633[_0x147766(0x11a)],'goal_achieved':_0x41b633[_0x147766(0x16d)],'completion_rate':_0x41b633['completionRate'],'exit_or_jump':_0x41b633[_0x147766(0xee)],'exit_or_jump_rate':_0x41b633['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x48026f){const _0x53a828=a131_0x3560f7,_0x4aac3c=_0x48026f[_0x53a828(0xf9)]['map'](_0x460bf1=>({'journeyId':_0x460bf1['id'],'versionNumber':_0x460bf1['attributes'][_0x53a828(0x114)]??0x0,'name':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0x121)],'state':_0x460bf1['attributes'][_0x53a828(0x146)],'paused':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0xe4)],'createdAt':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0xea)],'updatedAt':_0x460bf1[_0x53a828(0x14b)][_0x53a828(0x16e)]}));return _0x4aac3c[_0x53a828(0x16f)]((_0x4e4827,_0xa55391)=>_0x4e4827[_0x53a828(0x114)]-_0xa55391[_0x53a828(0x114)]),_0x4aac3c;}export function synthesizePreBundleVersion(_0x1cbd41){const _0x20b07c=a131_0x3560f7;return{'journeyId':_0x1cbd41['id'],'versionNumber':0x1,'name':_0x1cbd41[_0x20b07c(0x14b)][_0x20b07c(0x121)],'state':_0x1cbd41[_0x20b07c(0x14b)][_0x20b07c(0x146)],'paused':_0x1cbd41['attributes'][_0x20b07c(0xe4)],'createdAt':_0x1cbd41[_0x20b07c(0x14b)][_0x20b07c(0xea)],'updatedAt':_0x1cbd41[_0x20b07c(0x14b)]['updatedAt']};}export function buildStageNameMap(_0x4618fe){const _0x23a82b=a131_0x3560f7;return new Map(_0x4618fe[_0x23a82b(0x14b)][_0x23a82b(0x160)]?.[_0x23a82b(0x104)](_0x452376=>[_0x452376['id'],_0x452376[_0x23a82b(0x121)]])??[]);}export class JourneySDK{[a131_0x3560f7(0xeb)];constructor(_0x1d1697){this['client']=new CDPApiClient(_0x1d1697);}['applyVersionDeduplication'](_0x124031,_0x332115){return _0x332115?_0x124031:deduplicateJourneysByBundle(_0x124031);}async[a131_0x3560f7(0x13e)](_0xa77843,_0x5c8d44){const _0x48e4fa=a131_0x3560f7;try{const _0xa5aa6a=await this['client'][_0x48e4fa(0x13e)](_0xa77843);return{'journeys':this[_0x48e4fa(0x171)](_0xa5aa6a[_0x48e4fa(0xf9)],_0x5c8d44),'activationStepsById':_0xa5aa6a[_0x48e4fa(0xfd)]};}catch(_0x55399d){if(isHttp404Error(_0x55399d))return{'journeys':[],'activationStepsById':new Map()};throw _0x55399d;}}async['listJourneysFromParentSegment'](_0x9c3df8,_0x2a8898,_0x1da7bc){const _0x34a052=a131_0x3560f7;let _0x2769e7=_0x2a8898;if(!_0x2769e7)try{const _0x448c57=await this['client'][_0x34a052(0xf4)](_0x9c3df8);_0x2769e7=_0x448c57[_0x34a052(0x141)]??undefined;}catch(_0x15635a){if(isHttp404Error(_0x15635a))return[];throw _0x15635a;}if(!_0x2769e7)return[];let _0x41d0c7;if(_0x1da7bc?.[_0x34a052(0x119)]){const _0x22fa0e=await this[_0x34a052(0xeb)][_0x34a052(0x12d)](_0x9c3df8),_0x2e509c=_0x22fa0e[_0x34a052(0x104)](_0x558400=>this[_0x34a052(0xeb)][_0x34a052(0x115)](_0x558400['id'])),_0x1fe156=await Promise['all'](_0x2e509c),_0x586f22=new Set();_0x41d0c7=_0x1fe156[_0x34a052(0x127)]()[_0x34a052(0x125)](_0x46f552=>{const _0x2f4496=_0x34a052;if(_0x586f22[_0x2f4496(0x148)](_0x46f552['id']))return![];return _0x586f22[_0x2f4496(0x10d)](_0x46f552['id']),!![];});}else{const _0x569d70=await this[_0x34a052(0xeb)][_0x34a052(0x101)](_0x2769e7,0x20,![]),_0x156345=_0x569d70[_0x34a052(0x15f)],_0x4a9290=_0x156345['filter'](_0x466668=>_0x466668[_0x34a052(0x128)]===_0x34a052(0x163));_0x41d0c7=_0x4a9290[_0x34a052(0x104)](_0x503844=>entityToJourneyListItem(_0x503844,_0x9c3df8));}return this[_0x34a052(0x171)](_0x41d0c7,_0x1da7bc?.[_0x34a052(0x119)]);}async['listJourneysWithFolders'](_0x2a70e2,_0x3e9bc3,_0x3dc5c6){const _0x213938=a131_0x3560f7;if(!_0x3e9bc3)return{'journeys':[],'folders':[]};const _0x319510=await this[_0x213938(0xeb)][_0x213938(0x101)](_0x3e9bc3,0x20,![]),_0x23a2f5=_0x319510[_0x213938(0x15f)],_0x221929=_0x23a2f5['filter'](_0xcc71a5=>_0xcc71a5['type']===_0x213938(0x12e)&&_0xcc71a5['id']!==_0x3e9bc3),_0x34d159=_0x221929[_0x213938(0x104)](_0x976b57=>({'id':_0x976b57['id'],'name':_0x976b57[_0x213938(0x14b)]['name']})),_0x47594b=_0x23a2f5[_0x213938(0x125)](_0x43ae9e=>_0x43ae9e[_0x213938(0x128)]==='journey'),_0x3f0ae7=_0x47594b[_0x213938(0x104)](_0x51942b=>entityToJourneyListItem(_0x51942b,_0x2a70e2));return{'journeys':this[_0x213938(0x171)](_0x3f0ae7,_0x3dc5c6?.[_0x213938(0x119)]),'folders':_0x34d159};}async[a131_0x3560f7(0xe8)](_0xa69766,_0x49dc67){const _0x2a14ff=a131_0x3560f7;let _0x4685de;try{_0x4685de=await this[_0x2a14ff(0xeb)][_0x2a14ff(0x12d)](_0xa69766);}catch(_0x492697){if(isHttp404Error(_0x492697))return{'journeys':[],'activationStepsById':new Map()};throw _0x492697;}const _0x59e3a4=_0x4685de[_0x2a14ff(0x104)](async _0xe6313b=>{const _0x2d1a8b=_0x2a14ff;return await this[_0x2d1a8b(0x13e)](_0xe6313b['id'],_0x49dc67?.[_0x2d1a8b(0x119)]);}),_0x41d1ab=await Promise[_0x2a14ff(0x13c)](_0x59e3a4),_0x296bf=new Map(),_0x52a87d=[];for(const _0xea74c7 of _0x41d1ab){_0x52a87d['push'](..._0xea74c7['journeys']);for(const [_0x1d6c50,_0x35ab70]of _0xea74c7[_0x2a14ff(0xfd)]){_0x296bf[_0x2a14ff(0xe6)](_0x1d6c50,_0x35ab70);}}const _0x418388=new Set(),_0x15c761=_0x52a87d[_0x2a14ff(0x125)](_0x17692d=>{const _0x1e2668=_0x2a14ff;if(_0x418388[_0x1e2668(0x148)](_0x17692d['id']))return![];return _0x418388[_0x1e2668(0x10d)](_0x17692d['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x15c761,_0x49dc67?.[_0x2a14ff(0x119)]),'activationStepsById':_0x296bf};}async['getJourney'](_0x1c9c1f){const _0x180dc0=a131_0x3560f7;try{return await this[_0x180dc0(0xeb)][_0x180dc0(0x136)](_0x1c9c1f);}catch(_0x42ddbb){if(isHttp404Error(_0x42ddbb))throw new SDKError(ErrorCode[_0x180dc0(0x103)],'Journey\x20not\x20found:\x20'+_0x1c9c1f,_0x42ddbb);throw _0x42ddbb;}}async['resolveJourneyId'](_0x321b65,_0x1562f9){const _0x1e273e=a131_0x3560f7,_0xf94ab6=await this['listJourneysFromParentSegment'](_0x321b65),_0x3aec83=_0xf94ab6['find'](_0x2d76e9=>_0x2d76e9['journeyBundleName']['toLowerCase']()===_0x1562f9['toLowerCase']());if(!_0x3aec83)throw new SDKError(ErrorCode[_0x1e273e(0x103)],_0x1e273e(0x133)+_0x1562f9,undefined,{'helpText':_0x1e273e(0x107)});return _0x3aec83['id'];}async['getStatistics'](_0x67fde7,_0x8a017c){const _0x3c2e11=a131_0x3560f7;try{return await this[_0x3c2e11(0xeb)][_0x3c2e11(0x139)](_0x67fde7,_0x8a017c);}catch(_0x49dcd4){if(isHttp404Error(_0x49dcd4))throw new SDKError(ErrorCode[_0x3c2e11(0x103)],'Journey\x20not\x20found:\x20'+_0x67fde7,_0x49dcd4);throw _0x49dcd4;}}async[a131_0x3560f7(0xf7)](_0x50c133,_0x767292){const _0x205f67=a131_0x3560f7,_0x319c5a={'from':_0x767292?.['from'],'to':_0x767292?.['to'],'limit':_0x767292?.['limit']},_0x5e1271=_0x767292?.[_0x205f67(0x128)]!==_0x205f67(0xf5);try{const [_0x49e862,_0x592719]=await Promise[_0x205f67(0x13c)]([this[_0x205f67(0x14e)](_0x50c133,_0x767292?.[_0x205f67(0x128)],_0x319c5a),_0x5e1271?this[_0x205f67(0x136)](_0x50c133):undefined]);if(_0x49e862['activation']&&_0x592719){const _0x5aa69c=buildStageNameMap(_0x592719);_0x49e862[_0x205f67(0x140)]=_0x49e862['activation'][_0x205f67(0x104)](_0x1a6b75=>({..._0x1a6b75,'journeyStageName':_0x5aa69c[_0x205f67(0x147)](_0x1a6b75[_0x205f67(0x14c)])??_0x1a6b75[_0x205f67(0x14c)]}));}return _0x49e862;}catch(_0x16c811){if(isHttp404Error(_0x16c811))throw new SDKError(ErrorCode[_0x205f67(0x103)],_0x205f67(0x133)+_0x50c133,_0x16c811);throw _0x16c811;}}async[a131_0x3560f7(0x14e)](_0xdc9120,_0x19a839,_0x58bc42){const _0x303377=a131_0x3560f7;if(_0x19a839===_0x303377(0xf5)){const _0x5b00ea=await this[_0x303377(0xeb)][_0x303377(0x129)](_0xdc9120,_0x58bc42);return{'conversion':_0x5b00ea};}if(_0x19a839===_0x303377(0x140)){const _0x595520=await this[_0x303377(0xeb)][_0x303377(0x13a)](_0xdc9120,_0x58bc42);return{'activation':_0x595520};}const [_0x2a379b,_0x2a451f]=await Promise[_0x303377(0x13c)]([this[_0x303377(0xeb)][_0x303377(0x129)](_0xdc9120,_0x58bc42),this[_0x303377(0xeb)][_0x303377(0x13a)](_0xdc9120,_0x58bc42)]);return{'conversion':_0x2a379b,'activation':_0x2a451f};}async[a131_0x3560f7(0x164)](_0x1d4261){const _0x299dbc=a131_0x3560f7;try{return await this[_0x299dbc(0xeb)][_0x299dbc(0x144)](_0x1d4261);}catch(_0x26cb06){if(isHttp404Error(_0x26cb06))throw new SDKError(ErrorCode[_0x299dbc(0x103)],_0x299dbc(0x133)+_0x1d4261,_0x26cb06);throw _0x26cb06;}}async[a131_0x3560f7(0x12a)](_0x1e9629){const _0x400749=a131_0x3560f7;try{return await this[_0x400749(0xeb)][_0x400749(0x16a)](_0x1e9629);}catch(_0x5bb4b8){if(isHttp404Error(_0x5bb4b8))throw new SDKError(ErrorCode[_0x400749(0x103)],'Journey\x20not\x20found:\x20'+_0x1e9629,_0x5bb4b8);throw _0x5bb4b8;}}async[a131_0x3560f7(0x126)](_0x34479f){const _0x58b965=a131_0x3560f7;return await this[_0x58b965(0xeb)]['createJourney'](_0x34479f);}async[a131_0x3560f7(0x137)](_0x6047a2,_0x299a8c){const _0x26aca6=a131_0x3560f7;try{return await this[_0x26aca6(0xeb)][_0x26aca6(0x117)](_0x6047a2,_0x299a8c);}catch(_0x31cb4f){if(isHttp404Error(_0x31cb4f))throw new SDKError(ErrorCode[_0x26aca6(0x103)],'Journey\x20not\x20found:\x20'+_0x6047a2,_0x31cb4f);throw _0x31cb4f;}}async[a131_0x3560f7(0x14a)](_0x524b0c,_0x5646fe){const _0x24b149=a131_0x3560f7;try{return await this[_0x24b149(0xeb)][_0x24b149(0x166)](_0x524b0c,_0x5646fe);}catch(_0x1f70c8){if(isHttp404Error(_0x1f70c8))throw new SDKError(ErrorCode[_0x24b149(0x156)],_0x24b149(0x149)+_0x5646fe+_0x24b149(0xf8)+_0x524b0c,_0x1f70c8);throw _0x1f70c8;}}async['listActivations'](_0x4222c8){const _0x371412=a131_0x3560f7;try{return await this[_0x371412(0xeb)][_0x371412(0x11d)](_0x4222c8);}catch(_0x2ceaec){if(isHttp404Error(_0x2ceaec))return[];throw _0x2ceaec;}}async[a131_0x3560f7(0x15e)](_0x2ff022){const _0x12c53b=a131_0x3560f7,_0xc0769d=await this[_0x12c53b(0x158)](_0x2ff022);return _0xc0769d[_0x12c53b(0x104)](flattenJourneyActivation);}async[a131_0x3560f7(0x132)](_0x447a42,_0x51acfc){const _0x355413=a131_0x3560f7;return await this[_0x355413(0xeb)][_0x355413(0xf6)](_0x447a42,_0x51acfc);}async[a131_0x3560f7(0x170)](_0x5a33dc){const _0x547813=a131_0x3560f7,_0x3439f8=await this[_0x547813(0x136)](_0x5a33dc),_0x478119=generateColumnMapping(_0x3439f8);return{'journeyId':_0x3439f8['id'],'journeyName':_0x3439f8[_0x547813(0x14b)]['name'],'database':_0x547813(0x11f)+_0x3439f8[_0x547813(0x14b)][_0x547813(0x154)],'table':_0x547813(0x157)+_0x3439f8['id'],'columns':_0x478119};}async[a131_0x3560f7(0x102)](_0x146c37){const _0x3fa6da=a131_0x3560f7;return this[_0x3fa6da(0xeb)][_0x3fa6da(0xff)](_0x146c37);}async[a131_0x3560f7(0x145)](_0x386479){const _0x32bf9b=a131_0x3560f7;if(!_0x386479)return undefined;try{const _0x1b47ce=await this[_0x32bf9b(0x102)](_0x386479);return _0x1b47ce['latestJourneyId'];}catch{return undefined;}}async['listVersions'](_0x4c83e8){const _0x24750f=a131_0x3560f7,_0x47c11e=await this[_0x24750f(0x136)](_0x4c83e8),_0x5a2781=_0x47c11e['attributes'][_0x24750f(0xe5)];if(!_0x5a2781)return{'bundleId':'','bundleName':_0x47c11e[_0x24750f(0x14b)][_0x24750f(0x121)],'bundleDescription':_0x47c11e[_0x24750f(0x14b)][_0x24750f(0x12b)]??null,'latestJourneyId':_0x47c11e['id'],'versions':[synthesizePreBundleVersion(_0x47c11e)]};const _0x3ae144=await this[_0x24750f(0x102)](_0x5a2781);return{'bundleId':_0x5a2781,'bundleName':_0x3ae144[_0x24750f(0x121)],'bundleDescription':_0x3ae144['description']??null,'latestJourneyId':_0x3ae144['latestJourneyId'],'versions':formatVersionsFromBundle(_0x3ae144)};}async[a131_0x3560f7(0xfc)](_0x12ab01){const _0x240f8d=a131_0x3560f7,_0x1f257c=await this['getJourney'](_0x12ab01),_0x581db3=_0x1f257c['attributes'][_0x240f8d(0xe5)];if(!_0x581db3)throw new SDKError(ErrorCode[_0x240f8d(0x16b)],_0x240f8d(0x143));await this['client']['checkJourneyAppendable'](_0x581db3);const _0x5d9abd=await this[_0x240f8d(0xeb)][_0x240f8d(0xff)](_0x581db3),_0x3e125d=_0x5d9abd[_0x240f8d(0x121)]+'\x20v'+(_0x5d9abd['lastVersionNumber']+0x1);return this['client']['createJourneyVersion'](_0x581db3,{'sourceId':_0x12ab01,'attributes':{'name':_0x3e125d}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a132_0x1cd385=a132_0xaf40;(function(_0x302eae,_0x28223d){const _0x276f00=a132_0xaf40,_0x38426d=_0x302eae();while(!![]){try{const _0x5d34f5=parseInt(_0x276f00(0x1f3))/0x1*(-parseInt(_0x276f00(0x1eb))/0x2)+-parseInt(_0x276f00(0x1f4))/0x3*(parseInt(_0x276f00(0x1f5))/0x4)+parseInt(_0x276f00(0x1f1))/0x5*(-parseInt(_0x276f00(0x1ee))/0x6)+parseInt(_0x276f00(0x1ef))/0x7+-parseInt(_0x276f00(0x1fa))/0x8*(parseInt(_0x276f00(0x1ed))/0x9)+-parseInt(_0x276f00(0x1f8))/0xa*(-parseInt(_0x276f00(0x1f2))/0xb)+-parseInt(_0x276f00(0x1f6))/0xc*(-parseInt(_0x276f00(0x1f0))/0xd);if(_0x5d34f5===_0x28223d)break;else _0x38426d['push'](_0x38426d['shift']());}catch(_0x391f4a){_0x38426d['push'](_0x38426d['shift']());}}}(a132_0x1d21,0x1cd72));function a132_0xaf40(_0x1ae30a,_0x3b2550){_0x1ae30a=_0x1ae30a-0x1eb;const _0x1d2168=a132_0x1d21();let _0xaf40d=_0x1d2168[_0x1ae30a];return _0xaf40d;}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id',a132_0x1cd385(0x1ec));function a132_0x1d21(){const _0x4c0d38=['78617ckFVhE','1evpGdD','138XsMjvO','2532XtdOfL','156lUUJSW','write','50qjxnFs','read','429344jXlYLo','426414faQVkP','llm/chat','9aHHHRY','30HAeEZq','1137360OYahfw','262613RXmpVD','46705aQZvMO'];a132_0x1d21=function(){return _0x4c0d38;};return a132_0x1d21();}export function saveLastChatId(_0xb5bfac){const _0x4eb343=a132_0x1cd385;chatIdCache[_0x4eb343(0x1f7)](_0xb5bfac);}export function loadLastChatId(){const _0x3cdadc=a132_0x1cd385;return chatIdCache[_0x3cdadc(0x1f9)]();}export function clearLastChatId(){chatIdCache['clear']();}
|