@treasuredata/tdx 0.28.0 → 0.28.2
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/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/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-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.d.ts +6 -0
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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 a107_0x2036b4=a107_0x1ab9;(function(_0x5a6264,_0x25d10d){const _0x3efb3d=a107_0x1ab9,_0x475b8d=_0x5a6264();while(!![]){try{const _0x47b3be=-parseInt(_0x3efb3d(0x131))/0x1+-parseInt(_0x3efb3d(0x13f))/0x2+parseInt(_0x3efb3d(0x111))/0x3*(-parseInt(_0x3efb3d(0x15c))/0x4)+-parseInt(_0x3efb3d(0x146))/0x5*(-parseInt(_0x3efb3d(0x176))/0x6)+parseInt(_0x3efb3d(0x16f))/0x7*(parseInt(_0x3efb3d(0x166))/0x8)+parseInt(_0x3efb3d(0x121))/0x9+parseInt(_0x3efb3d(0x163))/0xa*(-parseInt(_0x3efb3d(0x116))/0xb);if(_0x47b3be===_0x25d10d)break;else _0x475b8d['push'](_0x475b8d['shift']());}catch(_0x1093e8){_0x475b8d['push'](_0x475b8d['shift']());}}}(a107_0x3012,0x34a92));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x565515){const _0x4bb884=a107_0x1ab9;return _0x565515[_0x4bb884(0xfb)]??_0x565515[_0x4bb884(0x137)]?.[_0x4bb884(0xfb)]??undefined;}function getVersionNumber(_0x5de502){const _0x3c5832=a107_0x1ab9;return _0x5de502['versionNumber']??_0x5de502[_0x3c5832(0x137)]?.[_0x3c5832(0x125)]??0x0;}export function deduplicateJourneysByBundle(_0x443ed2){const _0x1160ad=a107_0x1ab9,_0x4bfcec=new Map();let _0x1bb652=0x0;for(const _0x56f073 of _0x443ed2){const _0x70e46a=getBundleId(_0x56f073);if(!_0x70e46a){const _0x5c5893='no-bundle-'+(_0x56f073['id']??_0x1160ad(0xf6)+_0x1bb652++);_0x4bfcec[_0x1160ad(0x148)](_0x5c5893,_0x56f073);continue;}const _0x3f4996=_0x4bfcec[_0x1160ad(0x120)](_0x70e46a);if(!_0x3f4996)_0x4bfcec[_0x1160ad(0x148)](_0x70e46a,_0x56f073);else{const _0x17862b=getVersionNumber(_0x3f4996),_0x2a47cc=getVersionNumber(_0x56f073);_0x2a47cc>_0x17862b&&_0x4bfcec[_0x1160ad(0x148)](_0x70e46a,_0x56f073);}}return Array[_0x1160ad(0x115)](_0x4bfcec['values']());}const VALID_JOURNEY_STATES=new Set([a107_0x2036b4(0x147),'simulation',a107_0x2036b4(0x173)]);export function parseJourneyState(_0x140ae8){const _0xc4fd2e=a107_0x2036b4;if(typeof _0x140ae8===_0xc4fd2e(0x114)&&VALID_JOURNEY_STATES[_0xc4fd2e(0x101)](_0x140ae8))return _0x140ae8;return _0xc4fd2e(0x147);}export function entityToJourneyListItem(_0x37e9c5,_0x5a68bb){const _0x2a77ac=a107_0x2036b4,_0x150537=_0x37e9c5[_0x2a77ac(0x137)];return{'id':_0x37e9c5['id'],'name':_0x150537[_0x2a77ac(0x13e)]??'','journeyBundleName':_0x150537[_0x2a77ac(0x14c)]??_0x150537[_0x2a77ac(0x13e)]??'','journeyBundleId':_0x150537[_0x2a77ac(0xfb)]??'','versionNumber':_0x150537[_0x2a77ac(0x125)],'description':_0x150537[_0x2a77ac(0x123)]??null,'state':parseJourneyState(_0x150537[_0x2a77ac(0x159)]),'paused':_0x150537[_0x2a77ac(0xea)]??![],'audienceId':_0x5a68bb,'folderId':_0x150537[_0x2a77ac(0x11d)]??_0x37e9c5[_0x2a77ac(0x14a)]?.[_0x2a77ac(0xfd)]?.['data']?.['id']??null,'createdAt':_0x150537[_0x2a77ac(0x178)]??'','updatedAt':_0x150537[_0x2a77ac(0x143)]??''};}function convertToColumnId(_0x24144d){const _0x3ee933=a107_0x2036b4;return _0x24144d[_0x3ee933(0x122)](/-/g,'_');}function getStepEntries(_0x19f19f){const _0x22d9aa=a107_0x2036b4;if(!_0x19f19f)return[];if(Array['isArray'](_0x19f19f))return _0x19f19f[_0x22d9aa(0x17c)](_0x16d5c2=>[_0x16d5c2['id'],_0x16d5c2]);return Object[_0x22d9aa(0x12d)](_0x19f19f);}export function flattenJourneyActivation(_0x40d97b){const _0x4d0071=a107_0x2036b4,{activationParams:_0x4f7c5a,activationId:_0x5a2bee,runAfterJourneyRefresh:_0x3fb1e7}=_0x40d97b[_0x4d0071(0x137)];return{'id':_0x40d97b['id'],'activationId':_0x5a2bee,'runAfterJourneyRefresh':_0x3fb1e7,..._0x4f7c5a};}function col(_0x3fb319,_0x21425e={}){const _0x5da727=a107_0x2036b4;return{'column':_0x3fb319,'direction':null,'stageIndex':null,'stageName':null,'category':_0x5da727(0x14e),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x21425e};}export function generateColumnMapping(_0x31d762){const _0x4be784=a107_0x2036b4,_0x5204ab=[];_0x5204ab[_0x4be784(0x164)](col(_0x4be784(0x132))),_0x5204ab[_0x4be784(0x164)](col('intime_journey',{'direction':'in','category':'journey'})),_0x5204ab[_0x4be784(0x164)](col(_0x4be784(0x154),{'direction':_0x4be784(0xf4),'category':'journey'}));_0x31d762['attributes'][_0x4be784(0x16d)]&&_0x5204ab[_0x4be784(0x164)](col(_0x4be784(0x130),{'direction':'in','category':_0x4be784(0x16d),'detail':_0x31d762['attributes'][_0x4be784(0x16d)]['name']||null}));const _0x4b4483=_0x31d762[_0x4be784(0x137)][_0x4be784(0x136)]||[];for(let _0x36325c=0x0;_0x36325c<_0x4b4483[_0x4be784(0x16c)];_0x36325c++){const _0x33f76c=_0x4b4483[_0x36325c],_0x15db17=_0x33f76c[_0x4be784(0x13e)],_0xb6e303={'stageIndex':_0x36325c,'stageName':_0x15db17},_0x23df77=_0x33f76c[_0x4be784(0xeb)]?.[_0x4be784(0x13e)]||null;_0x5204ab[_0x4be784(0x164)](col(_0x4be784(0x157)+_0x36325c,{..._0xb6e303,'direction':'in','category':_0x4be784(0x142),'detail':_0x23df77})),_0x5204ab[_0x4be784(0x164)](col(_0x4be784(0x13c)+_0x36325c,{..._0xb6e303,'direction':_0x4be784(0xf4),'category':'stage','detail':_0x23df77}));_0x33f76c[_0x4be784(0x16b)]&&_0x5204ab[_0x4be784(0x164)](col('intime_stage_'+_0x36325c+'_milestone',{..._0xb6e303,'direction':'in','category':_0x4be784(0x16b),'detail':_0x33f76c[_0x4be784(0x16b)][_0x4be784(0x13e)]||null}));const _0xda1c65=_0x33f76c[_0x4be784(0x126)]||_0x33f76c['exitCriteria']||[];for(let _0x5cde15=0x0;_0x5cde15<_0xda1c65[_0x4be784(0x16c)];_0x5cde15++){_0x5204ab['push'](col(_0x4be784(0x157)+_0x36325c+_0x4be784(0x104)+_0x5cde15,{..._0xb6e303,'direction':'in','category':'exit_criteria','detail':_0xda1c65[_0x5cde15][_0x4be784(0x13e)]||null}));}const _0x25c69b=getStepEntries(_0x33f76c[_0x4be784(0x162)]);for(const [_0x4ed161,_0x219cef]of _0x25c69b){const _0x10f5f5=convertToColumnId(_0x4ed161),_0x106d92=_0x219cef[_0x4be784(0x11a)]||null,_0x3f8d54=_0x219cef['name']||null,_0x1634c1={..._0xb6e303,'stepType':_0x106d92,'stepName':_0x3f8d54,'stepId':_0x4ed161};_0x5204ab[_0x4be784(0x164)](col('intime_stage_'+_0x36325c+'_'+_0x10f5f5,{..._0x1634c1,'direction':'in','category':_0x4be784(0x17d)})),_0x5204ab['push'](col(_0x4be784(0x13c)+_0x36325c+'_'+_0x10f5f5,{..._0x1634c1,'direction':'out','category':_0x4be784(0x17d)}));if(_0x219cef[_0x4be784(0x11a)]===_0x4be784(0x171)&&_0x219cef['branches'])for(const _0x56e7ac of _0x219cef[_0x4be784(0x127)]){_0x56e7ac[_0x4be784(0x12e)]&&_0x5204ab[_0x4be784(0x164)](col('intime_stage_'+_0x36325c+'_'+_0x10f5f5+'_'+_0x56e7ac['segmentId'],{..._0x1634c1,'direction':'in','category':_0x4be784(0x113),'detail':_0x56e7ac[_0x4be784(0x13e)]||(_0x56e7ac[_0x4be784(0x172)]?_0x4be784(0x140):null)}));}if((_0x219cef[_0x4be784(0x11a)]===_0x4be784(0x150)||_0x219cef[_0x4be784(0x11a)]==='ABTest')&&_0x219cef[_0x4be784(0x128)])for(const _0x2d37cd of _0x219cef['variants']){_0x2d37cd['id']&&_0x5204ab[_0x4be784(0x164)](col(_0x4be784(0x157)+_0x36325c+'_'+_0x10f5f5+_0x4be784(0x141)+convertToColumnId(_0x2d37cd['id']),{..._0x1634c1,'direction':'in','category':_0x4be784(0xff),'detail':_0x2d37cd['name']||null}));}if(_0x219cef[_0x4be784(0x11a)]===_0x4be784(0x144)||_0x219cef['type']===_0x4be784(0x13b)){const _0x2f4953=[];if(_0x219cef[_0x4be784(0x156)])_0x2f4953[_0x4be784(0x164)](_0x219cef['conditionSegmentId']);else{if(Array['isArray'](_0x219cef[_0x4be784(0x135)]))for(const _0x2eafdd of _0x219cef[_0x4be784(0x135)]){_0x2eafdd[_0x4be784(0x12e)]&&!_0x2eafdd[_0x4be784(0x177)]&&_0x2f4953['push'](_0x2eafdd[_0x4be784(0x12e)]);}else _0x219cef[_0x4be784(0x14f)]?.[_0x4be784(0x12e)]&&_0x2f4953[_0x4be784(0x164)](_0x219cef[_0x4be784(0x14f)][_0x4be784(0x12e)]);}for(const _0x44d06c of _0x2f4953){_0x5204ab[_0x4be784(0x164)](col('intime_stage_'+_0x36325c+'_'+_0x10f5f5+'_'+_0x44d06c,{..._0x1634c1,'direction':'in','category':_0x4be784(0x113)}));}}}}return _0x5204ab['push'](col(_0x4be784(0x12c))),_0x5204ab;}export function aggregateJourneyHistory(_0x30529f){const _0x29e0c0=a107_0x2036b4,_0x49729a=_0x30529f[_0x29e0c0(0x124)]((_0xf6ae21,_0x571bf0)=>_0xf6ae21+(_0x571bf0[_0x29e0c0(0x160)]??0x0),0x0),_0x4a3c73=_0x30529f[_0x29e0c0(0x124)]((_0x1824aa,_0x103a24)=>_0x1824aa+(_0x103a24[_0x29e0c0(0x175)]??0x0),0x0),_0x1eab2e=_0x30529f[_0x29e0c0(0x124)]((_0x474488,_0x382d91)=>_0x474488+((_0x382d91[_0x29e0c0(0xfc)]??0x0)+(_0x382d91[_0x29e0c0(0x179)]??0x0)),0x0),_0x2944d8=_0x30529f[_0x30529f['length']-0x1];return{'size':_0x2944d8?.[_0x29e0c0(0x174)]??0x0,'entered':_0x49729a,'goal_achieved':_0x4a3c73,'completion_rate':_0x4a3c73&&_0x49729a?_0x4a3c73/_0x49729a*0x64:0x0,'exit_or_jump':_0x1eab2e,'exit_or_jump_rate':_0x1eab2e&&_0x49729a?_0x1eab2e/_0x49729a*0x64:0x0};}export function aggregateStageHistory(_0x12bb5e){const _0x46dc2a=a107_0x2036b4,_0x339c6c=_0x12bb5e[_0x46dc2a(0x124)]((_0x18594f,_0x4abe1b)=>_0x18594f+(_0x4abe1b[_0x46dc2a(0x160)]??0x0),0x0),_0x5a3a33=_0x12bb5e['reduce']((_0x3a15f1,_0x3f3113)=>_0x3a15f1+(_0x3f3113[_0x46dc2a(0xfa)]??0x0),0x0),_0x4a758e=_0x12bb5e[_0x46dc2a(0x124)]((_0x19f1df,_0xdc3855)=>_0x19f1df+((_0xdc3855[_0x46dc2a(0xfc)]??0x0)+(_0xdc3855[_0x46dc2a(0x179)]??0x0)),0x0),_0x3f842d=_0x12bb5e[_0x12bb5e[_0x46dc2a(0x16c)]-0x1];return{'size':_0x3f842d?.['size']??0x0,'entered':_0x339c6c,'milestone':_0x5a3a33,'milestone_rate':_0x5a3a33&&_0x339c6c?_0x5a3a33/_0x339c6c*0x64:0x0,'exit_or_jump':_0x4a758e,'exit_or_jump_rate':_0x4a758e&&_0x339c6c?_0x4a758e/_0x339c6c*0x64:0x0};}function a107_0x3012(){const _0x2bb3db=['listVersions','find','create','filter','includeHistory','getStatistics','getParentSegmentFull','5322POwQyK','listSegmentFolders','branch','string','from','22DdKpOQ','\x20in\x20journey\x20','checkJourneyAppendable','listJourneys','type','latestJourneyId','listJourneysFromParentSegment','segmentFolderId','pause','client','get','3504366jENqez','replace','description','reduce','versionNumber','exitCriterias','branches','variants','flat','activation','getTrafficData','time','entries','segmentId','listActivationsFlat','intime_goal','312247mBeQAQ','cdp_customer_id','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','activationStepsById','conditions','journeyStages','attributes','sort','history','journey','Wait','outtime_stage_','listJourneysWithDetails','name','524634OoHdQZ','Excluded\x20profiles','_variant_','stage','updatedAt','WaitStep','journeys','25QBPPFs','draft','set','cdp_audience_','relationships','NOT_FOUND','journeyBundleName','listJourneysWithDetailsFromParentSegment','fixed','waitCondition','AbTest','folder-segment','journeyStageId','getActivation','outtime_journey','exitOrJumpSize','conditionSegmentId','intime_stage_','createVersion','state','goalSize','getActivationSankeyChart','140LsIDYP','all','getJourneyActivation','toLowerCase','entryInflux','JOURNEY_NOT_FOUND','steps','805270HourPE','push','listActivations','1635728ReXqmu','INVALID_ARGUMENT','createJourneyVersion','getJourneyStatistics','resolveJourneyId','milestone','length','goal','getBundle','14ykFfwX','getConversionSankeyChart','DecisionPoint','excluded','launched','size','goalInflux','258120ICcECQ','timedOutPath','createdAt','jumpInflux','Journey\x20activation\x20step\x20not\x20found:\x20','add','map','step','paused','entryCriteria','getJourney','pauseJourney','journeyId','update','rootFolderId','fetchTrafficRaw','data','createJourney','out','Journey\x20not\x20found:\x20','idx-','journey_','conversion','enteredSize','milestoneInflux','journeyBundleId','exitInflux','parentFolder','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','variant','includeAllVersions','has','getJourneyBundle','getColumnMapping','_exit_','createJourneyActivation','listEntitiesByFolder','createActivation','applyVersionDeduplication','resumeJourney'];a107_0x3012=function(){return _0x2bb3db;};return a107_0x3012();}export function assembleJourneyStats(_0x416db9,_0xeb6375){const _0x10ccd2=a107_0x2036b4,_0x168ce7=!!(_0xeb6375?.[_0x10ccd2(0x115)]||_0xeb6375?.['to'])&&!!_0x416db9['history']?.[_0x10ccd2(0x16c)];if(_0x168ce7){const _0xb3ada5=aggregateJourneyHistory(_0x416db9[_0x10ccd2(0x139)]),_0x25533d={'journey_id':_0x416db9[_0x10ccd2(0xee)],..._0xeb6375?.['from']&&{'from':_0xeb6375[_0x10ccd2(0x115)]},..._0xeb6375?.['to']&&{'to':_0xeb6375['to']},..._0xb3ada5};return _0xeb6375?.[_0x10ccd2(0x10e)]&&(_0x25533d['history']=_0x416db9[_0x10ccd2(0x139)]),_0x25533d;}return{'journey_id':_0x416db9[_0x10ccd2(0xee)],'size':_0x416db9[_0x10ccd2(0x174)],'entered':_0x416db9[_0x10ccd2(0xf9)],'goal_achieved':_0x416db9[_0x10ccd2(0x15a)],'completion_rate':_0x416db9['completionRate'],'exit_or_jump':_0x416db9[_0x10ccd2(0x155)],'exit_or_jump_rate':_0x416db9['exitOrJumpRate']};}function a107_0x1ab9(_0x76e6d5,_0x2133d8){_0x76e6d5=_0x76e6d5-0xea;const _0x3012cb=a107_0x3012();let _0x1ab9fb=_0x3012cb[_0x76e6d5];return _0x1ab9fb;}export function formatVersionsFromBundle(_0x485816){const _0x332464=a107_0x2036b4,_0x232fd5=_0x485816[_0x332464(0x145)][_0x332464(0x17c)](_0x1f069b=>({'journeyId':_0x1f069b['id'],'versionNumber':_0x1f069b[_0x332464(0x137)][_0x332464(0x125)]??0x0,'name':_0x1f069b[_0x332464(0x137)][_0x332464(0x13e)],'state':_0x1f069b[_0x332464(0x137)]['state'],'paused':_0x1f069b[_0x332464(0x137)][_0x332464(0xea)],'createdAt':_0x1f069b[_0x332464(0x137)][_0x332464(0x178)],'updatedAt':_0x1f069b[_0x332464(0x137)][_0x332464(0x143)]}));return _0x232fd5[_0x332464(0x138)]((_0x6b3bd9,_0x1c0eb2)=>_0x6b3bd9[_0x332464(0x125)]-_0x1c0eb2[_0x332464(0x125)]),_0x232fd5;}export function synthesizePreBundleVersion(_0x555a9c){const _0x4a65b2=a107_0x2036b4;return{'journeyId':_0x555a9c['id'],'versionNumber':0x1,'name':_0x555a9c[_0x4a65b2(0x137)][_0x4a65b2(0x13e)],'state':_0x555a9c[_0x4a65b2(0x137)][_0x4a65b2(0x159)],'paused':_0x555a9c['attributes'][_0x4a65b2(0xea)],'createdAt':_0x555a9c[_0x4a65b2(0x137)][_0x4a65b2(0x178)],'updatedAt':_0x555a9c[_0x4a65b2(0x137)][_0x4a65b2(0x143)]};}export function buildStageNameMap(_0x21b78b){const _0x38c41f=a107_0x2036b4;return new Map(_0x21b78b[_0x38c41f(0x137)][_0x38c41f(0x136)]?.[_0x38c41f(0x17c)](_0x175387=>[_0x175387['id'],_0x175387[_0x38c41f(0x13e)]])??[]);}export class JourneySDK{[a107_0x2036b4(0x11f)];constructor(_0x3ffd01){const _0xf91125=a107_0x2036b4;this[_0xf91125(0x11f)]=new CDPApiClient(_0x3ffd01);}[a107_0x2036b4(0x108)](_0xe5d2c4,_0x98940d){return _0x98940d?_0xe5d2c4:deduplicateJourneysByBundle(_0xe5d2c4);}async['listJourneysWithDetails'](_0x19ff83,_0x53f5a3){const _0x4e04ae=a107_0x2036b4;try{const _0x4aa1ed=await this[_0x4e04ae(0x11f)]['listJourneysWithDetails'](_0x19ff83);return{'journeys':this[_0x4e04ae(0x108)](_0x4aa1ed['journeys'],_0x53f5a3),'activationStepsById':_0x4aa1ed[_0x4e04ae(0x134)]};}catch(_0x19a9f9){if(isHttp404Error(_0x19a9f9))return{'journeys':[],'activationStepsById':new Map()};throw _0x19a9f9;}}async[a107_0x2036b4(0x11c)](_0x1808d8,_0x10eba5,_0x34f260){const _0x4aa5e3=a107_0x2036b4;let _0x3e5e50=_0x10eba5;if(!_0x3e5e50)try{const _0x1673f3=await this['client'][_0x4aa5e3(0x110)](_0x1808d8);_0x3e5e50=_0x1673f3[_0x4aa5e3(0xf0)]??undefined;}catch(_0x7af8ef){if(isHttp404Error(_0x7af8ef))return[];throw _0x7af8ef;}if(!_0x3e5e50)return[];let _0x4de8b4;if(_0x34f260?.[_0x4aa5e3(0x100)]){const _0x1c3170=await this[_0x4aa5e3(0x11f)][_0x4aa5e3(0x112)](_0x1808d8),_0x37d8db=_0x1c3170[_0x4aa5e3(0x17c)](_0x128d38=>this['client'][_0x4aa5e3(0x119)](_0x128d38['id'])),_0x1b9ccd=await Promise[_0x4aa5e3(0x15d)](_0x37d8db),_0x4152ca=new Set();_0x4de8b4=_0x1b9ccd[_0x4aa5e3(0x129)]()[_0x4aa5e3(0x10d)](_0x3a1c37=>{const _0x182d83=_0x4aa5e3;if(_0x4152ca['has'](_0x3a1c37['id']))return![];return _0x4152ca[_0x182d83(0x17b)](_0x3a1c37['id']),!![];});}else{const _0x588620=await this[_0x4aa5e3(0x11f)][_0x4aa5e3(0x106)](_0x3e5e50,0x20,![]),_0x500d93=_0x588620[_0x4aa5e3(0xf2)],_0x25971e=_0x500d93[_0x4aa5e3(0x10d)](_0x413cfd=>_0x413cfd[_0x4aa5e3(0x11a)]==='journey');_0x4de8b4=_0x25971e[_0x4aa5e3(0x17c)](_0x3439fc=>entityToJourneyListItem(_0x3439fc,_0x1808d8));}return this[_0x4aa5e3(0x108)](_0x4de8b4,_0x34f260?.[_0x4aa5e3(0x100)]);}async['listJourneysWithFolders'](_0x4bc5ab,_0x415b4a,_0x1f4c32){const _0x54ae0b=a107_0x2036b4;if(!_0x415b4a)return{'journeys':[],'folders':[]};const _0x4fc4d3=await this[_0x54ae0b(0x11f)][_0x54ae0b(0x106)](_0x415b4a,0x20,![]),_0x3f0202=_0x4fc4d3[_0x54ae0b(0xf2)],_0x10a289=_0x3f0202[_0x54ae0b(0x10d)](_0x19abe3=>_0x19abe3[_0x54ae0b(0x11a)]===_0x54ae0b(0x151)&&_0x19abe3['id']!==_0x415b4a),_0x2e62db=_0x10a289[_0x54ae0b(0x17c)](_0x47375f=>({'id':_0x47375f['id'],'name':_0x47375f[_0x54ae0b(0x137)]['name']})),_0x2781da=_0x3f0202[_0x54ae0b(0x10d)](_0x2a9da9=>_0x2a9da9['type']===_0x54ae0b(0x13a)),_0x1129d9=_0x2781da[_0x54ae0b(0x17c)](_0x179175=>entityToJourneyListItem(_0x179175,_0x4bc5ab));return{'journeys':this[_0x54ae0b(0x108)](_0x1129d9,_0x1f4c32?.[_0x54ae0b(0x100)]),'folders':_0x2e62db};}async[a107_0x2036b4(0x14d)](_0x161f27,_0x3c4fef){const _0x7c582b=a107_0x2036b4;let _0x3aa8fa;try{_0x3aa8fa=await this[_0x7c582b(0x11f)][_0x7c582b(0x112)](_0x161f27);}catch(_0x19c8d8){if(isHttp404Error(_0x19c8d8))return{'journeys':[],'activationStepsById':new Map()};throw _0x19c8d8;}const _0x9f97d9=_0x3aa8fa[_0x7c582b(0x17c)](async _0x3137d9=>{const _0x15efb7=_0x7c582b;return await this[_0x15efb7(0x13d)](_0x3137d9['id'],_0x3c4fef?.[_0x15efb7(0x100)]);}),_0x30befc=await Promise['all'](_0x9f97d9),_0x75fb44=new Map(),_0x57a4cf=[];for(const _0x4ca8e8 of _0x30befc){_0x57a4cf[_0x7c582b(0x164)](..._0x4ca8e8[_0x7c582b(0x145)]);for(const [_0x252f5f,_0x235825]of _0x4ca8e8[_0x7c582b(0x134)]){_0x75fb44[_0x7c582b(0x148)](_0x252f5f,_0x235825);}}const _0x5fa99=new Set(),_0x28379a=_0x57a4cf['filter'](_0x12a02c=>{const _0x5b2f25=_0x7c582b;if(_0x5fa99['has'](_0x12a02c['id']))return![];return _0x5fa99[_0x5b2f25(0x17b)](_0x12a02c['id']),!![];});return{'journeys':this[_0x7c582b(0x108)](_0x28379a,_0x3c4fef?.[_0x7c582b(0x100)]),'activationStepsById':_0x75fb44};}async[a107_0x2036b4(0xec)](_0x49b246){const _0x2b4a5e=a107_0x2036b4;try{return await this[_0x2b4a5e(0x11f)][_0x2b4a5e(0xec)](_0x49b246);}catch(_0x2163a4){if(isHttp404Error(_0x2163a4))throw new SDKError(ErrorCode[_0x2b4a5e(0x161)],_0x2b4a5e(0xf5)+_0x49b246,_0x2163a4);throw _0x2163a4;}}async[a107_0x2036b4(0x16a)](_0x2bfd50,_0x49baf9){const _0x26ca6d=a107_0x2036b4,_0x5c890b=await this['listJourneysFromParentSegment'](_0x2bfd50),_0x38ecc2=_0x5c890b[_0x26ca6d(0x10b)](_0x28f204=>_0x28f204[_0x26ca6d(0x14c)][_0x26ca6d(0x15f)]()===_0x49baf9[_0x26ca6d(0x15f)]());if(!_0x38ecc2)throw new SDKError(ErrorCode[_0x26ca6d(0x161)],_0x26ca6d(0xf5)+_0x49baf9,undefined,{'helpText':_0x26ca6d(0xfe)});return _0x38ecc2['id'];}async[a107_0x2036b4(0x10f)](_0x32919d,_0x56adc6){const _0x5a9eeb=a107_0x2036b4;try{return await this['client'][_0x5a9eeb(0x169)](_0x32919d,_0x56adc6);}catch(_0x407fd5){if(isHttp404Error(_0x407fd5))throw new SDKError(ErrorCode[_0x5a9eeb(0x161)],_0x5a9eeb(0xf5)+_0x32919d,_0x407fd5);throw _0x407fd5;}}async[a107_0x2036b4(0x12b)](_0x4bdd2f,_0xd59df){const _0x12f9b9=a107_0x2036b4,_0x2acbb6={'from':_0xd59df?.[_0x12f9b9(0x115)],'to':_0xd59df?.['to'],'limit':_0xd59df?.['limit']},_0x4d16d6=_0xd59df?.['type']!==_0x12f9b9(0xf8);try{const [_0x19c56e,_0x9e51ef]=await Promise[_0x12f9b9(0x15d)]([this[_0x12f9b9(0xf1)](_0x4bdd2f,_0xd59df?.[_0x12f9b9(0x11a)],_0x2acbb6),_0x4d16d6?this[_0x12f9b9(0xec)](_0x4bdd2f):undefined]);if(_0x19c56e[_0x12f9b9(0x12a)]&&_0x9e51ef){const _0x47031e=buildStageNameMap(_0x9e51ef);_0x19c56e[_0x12f9b9(0x12a)]=_0x19c56e[_0x12f9b9(0x12a)][_0x12f9b9(0x17c)](_0x190fea=>({..._0x190fea,'journeyStageName':_0x47031e[_0x12f9b9(0x120)](_0x190fea[_0x12f9b9(0x152)])??_0x190fea[_0x12f9b9(0x152)]}));}return _0x19c56e;}catch(_0x2cce8b){if(isHttp404Error(_0x2cce8b))throw new SDKError(ErrorCode[_0x12f9b9(0x161)],'Journey\x20not\x20found:\x20'+_0x4bdd2f,_0x2cce8b);throw _0x2cce8b;}}async[a107_0x2036b4(0xf1)](_0x1e8d17,_0x322ae6,_0x218eac){const _0x1fc4b7=a107_0x2036b4;if(_0x322ae6===_0x1fc4b7(0xf8)){const _0x16e4d8=await this[_0x1fc4b7(0x11f)]['getConversionSankeyChart'](_0x1e8d17,_0x218eac);return{'conversion':_0x16e4d8};}if(_0x322ae6==='activation'){const _0x72fb88=await this['client'][_0x1fc4b7(0x15b)](_0x1e8d17,_0x218eac);return{'activation':_0x72fb88};}const [_0x441493,_0x3f6e84]=await Promise[_0x1fc4b7(0x15d)]([this[_0x1fc4b7(0x11f)][_0x1fc4b7(0x170)](_0x1e8d17,_0x218eac),this[_0x1fc4b7(0x11f)][_0x1fc4b7(0x15b)](_0x1e8d17,_0x218eac)]);return{'conversion':_0x441493,'activation':_0x3f6e84};}async[a107_0x2036b4(0x11e)](_0x4a424c){const _0x55f645=a107_0x2036b4;try{return await this[_0x55f645(0x11f)][_0x55f645(0xed)](_0x4a424c);}catch(_0x3e2a22){if(isHttp404Error(_0x3e2a22))throw new SDKError(ErrorCode[_0x55f645(0x161)],_0x55f645(0xf5)+_0x4a424c,_0x3e2a22);throw _0x3e2a22;}}async['resume'](_0x333e95){const _0x2ba551=a107_0x2036b4;try{return await this[_0x2ba551(0x11f)][_0x2ba551(0x109)](_0x333e95);}catch(_0x379b9b){if(isHttp404Error(_0x379b9b))throw new SDKError(ErrorCode[_0x2ba551(0x161)],_0x2ba551(0xf5)+_0x333e95,_0x379b9b);throw _0x379b9b;}}async[a107_0x2036b4(0x10c)](_0x52331e){const _0x4c72d2=a107_0x2036b4;return await this[_0x4c72d2(0x11f)][_0x4c72d2(0xf3)](_0x52331e);}async[a107_0x2036b4(0xef)](_0x20dfd9,_0x13aca6){const _0x8c0e33=a107_0x2036b4;try{return await this[_0x8c0e33(0x11f)]['updateJourney'](_0x20dfd9,_0x13aca6);}catch(_0x1fab22){if(isHttp404Error(_0x1fab22))throw new SDKError(ErrorCode[_0x8c0e33(0x161)],_0x8c0e33(0xf5)+_0x20dfd9,_0x1fab22);throw _0x1fab22;}}async[a107_0x2036b4(0x153)](_0xd8dc7c,_0x2a04a7){const _0x2d33c2=a107_0x2036b4;try{return await this[_0x2d33c2(0x11f)][_0x2d33c2(0x15e)](_0xd8dc7c,_0x2a04a7);}catch(_0x56543c){if(isHttp404Error(_0x56543c))throw new SDKError(ErrorCode[_0x2d33c2(0x14b)],_0x2d33c2(0x17a)+_0x2a04a7+_0x2d33c2(0x117)+_0xd8dc7c,_0x56543c);throw _0x56543c;}}async[a107_0x2036b4(0x165)](_0x4d7f9b){const _0x2ab59b=a107_0x2036b4;try{return await this[_0x2ab59b(0x11f)]['listJourneyActivations'](_0x4d7f9b);}catch(_0x333a45){if(isHttp404Error(_0x333a45))return[];throw _0x333a45;}}async[a107_0x2036b4(0x12f)](_0x36c084){const _0x4e8ba7=a107_0x2036b4,_0x76850=await this[_0x4e8ba7(0x165)](_0x36c084);return _0x76850[_0x4e8ba7(0x17c)](flattenJourneyActivation);}async[a107_0x2036b4(0x107)](_0x1e8db6,_0x44cf5e){const _0x5da617=a107_0x2036b4;return await this[_0x5da617(0x11f)][_0x5da617(0x105)](_0x1e8db6,_0x44cf5e);}async[a107_0x2036b4(0x103)](_0x1cf12d){const _0x19eb7c=a107_0x2036b4,_0x4e8990=await this[_0x19eb7c(0xec)](_0x1cf12d),_0x2c4d1c=generateColumnMapping(_0x4e8990);return{'journeyId':_0x4e8990['id'],'journeyName':_0x4e8990[_0x19eb7c(0x137)]['name'],'database':_0x19eb7c(0x149)+_0x4e8990[_0x19eb7c(0x137)]['audienceId'],'table':_0x19eb7c(0xf7)+_0x4e8990['id'],'columns':_0x2c4d1c};}async[a107_0x2036b4(0x16e)](_0x229ddb){const _0x313e38=a107_0x2036b4;return this[_0x313e38(0x11f)][_0x313e38(0x102)](_0x229ddb);}async[a107_0x2036b4(0x10a)](_0x4e4980){const _0x5669d6=a107_0x2036b4,_0x3393e2=await this[_0x5669d6(0xec)](_0x4e4980),_0x289658=_0x3393e2[_0x5669d6(0x137)][_0x5669d6(0xfb)];if(!_0x289658)return{'bundleId':'','bundleName':_0x3393e2[_0x5669d6(0x137)][_0x5669d6(0x13e)],'bundleDescription':_0x3393e2[_0x5669d6(0x137)][_0x5669d6(0x123)]??null,'latestJourneyId':_0x3393e2['id'],'versions':[synthesizePreBundleVersion(_0x3393e2)]};const _0x5b532d=await this[_0x5669d6(0x16e)](_0x289658);return{'bundleId':_0x289658,'bundleName':_0x5b532d[_0x5669d6(0x13e)],'bundleDescription':_0x5b532d[_0x5669d6(0x123)]??null,'latestJourneyId':_0x5b532d[_0x5669d6(0x11b)],'versions':formatVersionsFromBundle(_0x5b532d)};}async[a107_0x2036b4(0x158)](_0x2976d7){const _0x9c4cf0=a107_0x2036b4,_0x5a0eab=await this[_0x9c4cf0(0xec)](_0x2976d7),_0x4baa79=_0x5a0eab[_0x9c4cf0(0x137)]['journeyBundleId'];if(!_0x4baa79)throw new SDKError(ErrorCode[_0x9c4cf0(0x167)],_0x9c4cf0(0x133));await this[_0x9c4cf0(0x11f)][_0x9c4cf0(0x118)](_0x4baa79);const _0x591f6e=await this['client'][_0x9c4cf0(0x102)](_0x4baa79),_0x58d66e=_0x591f6e[_0x9c4cf0(0x13e)]+'\x20v'+(_0x591f6e['lastVersionNumber']+0x1);return this[_0x9c4cf0(0x11f)][_0x9c4cf0(0x168)](_0x4baa79,{'sourceId':_0x2976d7,'attributes':{'name':_0x58d66e}});}}
|
|
1
|
+
const a107_0xd24541=a107_0x4574;(function(_0x4e056f,_0x1a7bf1){const _0x2afe86=a107_0x4574,_0x51b8a3=_0x4e056f();while(!![]){try{const _0x5435ae=-parseInt(_0x2afe86(0x1fc))/0x1+-parseInt(_0x2afe86(0x269))/0x2+parseInt(_0x2afe86(0x223))/0x3*(-parseInt(_0x2afe86(0x208))/0x4)+parseInt(_0x2afe86(0x217))/0x5*(-parseInt(_0x2afe86(0x21b))/0x6)+-parseInt(_0x2afe86(0x214))/0x7+parseInt(_0x2afe86(0x264))/0x8*(parseInt(_0x2afe86(0x22e))/0x9)+parseInt(_0x2afe86(0x24a))/0xa*(parseInt(_0x2afe86(0x268))/0xb);if(_0x5435ae===_0x1a7bf1)break;else _0x51b8a3['push'](_0x51b8a3['shift']());}catch(_0x4f53db){_0x51b8a3['push'](_0x51b8a3['shift']());}}}(a107_0x4e43,0x75396));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x48cd2d){const _0x321d8d=a107_0x4574;return _0x48cd2d[_0x321d8d(0x20d)]??_0x48cd2d[_0x321d8d(0x227)]?.['journeyBundleId']??undefined;}function a107_0x4e43(){const _0xb8e51a=['listVersions','21393iPbsLZ','audienceId','getParentSegmentFull','_milestone','cdp_audience_','add','rootFolderId','journey','state','milestoneInflux','length','listEntitiesByFolder','exitOrJumpSize','entries','exitCriteria','updatedAt','lastVersionNumber','conversion','variants','checkJourneyAppendable','find','exitOrJumpRate','milestone','listJourneysWithFolders','steps','waitCondition','from','getTrafficData','20789890mICIrA','createActivation','createJourney','Journey\x20activation\x20step\x20not\x20found:\x20','_variant_','excluded','folder-segment','ABTest','exitCriterias','AbTest','activationStepsById','size','listActivations','all','segmentId','intime_stage_','Wait','applyVersionDeduplication','update','flat','isArray','branch','\x20in\x20journey\x20','journeyStages','getBundle','journeyBundleName','3096RueIZG','create','listJourneyActivations','goal','11eQMRFu','533110EkzBmK','includeAllVersions','get','activation','pause','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listJourneys','enteredSize','versionNumber','no-bundle-','intime_goal','listJourneysWithDetailsFromParentSegment','journeys','description','exit_criteria','Excluded\x20profiles','step','data','NOT_FOUND','simulation','outtime_stage_','resumeJourney','push','updateJourney','map','goalSize','cdp_customer_id','intime_journey','values','INVALID_ARGUMENT','_exit_','createJourneyActivation','reduce','198551ciYWUT','paused','listSegmentFolders','idx-','conditions','getConversionSankeyChart','name','out','has','relationships','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','journeyId','28rtEClT','resolveJourneyId','listJourneysFromParentSegment','stage','includeHistory','journeyBundleId','filter','completionRate','exitInflux','fetchTrafficRaw','getJourney','getActivationSankeyChart','5312699JEioqG','segmentFolderId','getJourneyBundle','5iWQhpo','JOURNEY_NOT_FOUND','client','Journey\x20not\x20found:\x20','2928054fbVMhr','DecisionPoint','toLowerCase','set','createVersion','latestJourneyId','journeyStageId','string','345714DtGaWm','conditionSegmentId','jumpInflux','draft','attributes','launched','type','timedOutPath','createdAt','history'];a107_0x4e43=function(){return _0xb8e51a;};return a107_0x4e43();}function a107_0x4574(_0x3fe09e,_0x3657cb){_0x3fe09e=_0x3fe09e-0x1dd;const _0x4e43de=a107_0x4e43();let _0x457485=_0x4e43de[_0x3fe09e];return _0x457485;}function getVersionNumber(_0x37cd80){const _0x188afc=a107_0x4574;return _0x37cd80[_0x188afc(0x1e3)]??_0x37cd80[_0x188afc(0x227)]?.['versionNumber']??0x0;}export function deduplicateJourneysByBundle(_0x1f433d){const _0x3f5472=a107_0x4574,_0x3831fb=new Map();let _0x30ecda=0x0;for(const _0x3dbc8b of _0x1f433d){const _0x21908a=getBundleId(_0x3dbc8b);if(!_0x21908a){const _0x542780=_0x3f5472(0x1e4)+(_0x3dbc8b['id']??_0x3f5472(0x1ff)+_0x30ecda++);_0x3831fb[_0x3f5472(0x21e)](_0x542780,_0x3dbc8b);continue;}const _0x25ebd9=_0x3831fb[_0x3f5472(0x1dd)](_0x21908a);if(!_0x25ebd9)_0x3831fb[_0x3f5472(0x21e)](_0x21908a,_0x3dbc8b);else{const _0x3c77ae=getVersionNumber(_0x25ebd9),_0x23af78=getVersionNumber(_0x3dbc8b);_0x23af78>_0x3c77ae&&_0x3831fb['set'](_0x21908a,_0x3dbc8b);}}return Array['from'](_0x3831fb[_0x3f5472(0x1f7)]());}const VALID_JOURNEY_STATES=new Set(['draft',a107_0xd24541(0x1ee),a107_0xd24541(0x228)]);export function parseJourneyState(_0x5e2b2a){const _0x16a74b=a107_0xd24541;if(typeof _0x5e2b2a===_0x16a74b(0x222)&&VALID_JOURNEY_STATES[_0x16a74b(0x204)](_0x5e2b2a))return _0x5e2b2a;return _0x16a74b(0x226);}export function entityToJourneyListItem(_0xea39ad,_0x307083){const _0x30230f=a107_0xd24541,_0x2dbfeb=_0xea39ad['attributes'];return{'id':_0xea39ad['id'],'name':_0x2dbfeb[_0x30230f(0x202)]??'','journeyBundleName':_0x2dbfeb[_0x30230f(0x263)]??_0x2dbfeb[_0x30230f(0x202)]??'','journeyBundleId':_0x2dbfeb['journeyBundleId']??'','versionNumber':_0x2dbfeb[_0x30230f(0x1e3)],'description':_0x2dbfeb[_0x30230f(0x1e8)]??null,'state':parseJourneyState(_0x2dbfeb[_0x30230f(0x236)]),'paused':_0x2dbfeb['paused']??![],'audienceId':_0x307083,'folderId':_0x2dbfeb[_0x30230f(0x215)]??_0xea39ad[_0x30230f(0x205)]?.['parentFolder']?.[_0x30230f(0x1ec)]?.['id']??null,'createdAt':_0x2dbfeb[_0x30230f(0x22b)]??'','updatedAt':_0x2dbfeb[_0x30230f(0x23d)]??''};}function convertToColumnId(_0x3ee7f5){return _0x3ee7f5['replace'](/-/g,'_');}function getStepEntries(_0x35e6f0){const _0xe50484=a107_0xd24541;if(!_0x35e6f0)return[];if(Array[_0xe50484(0x25e)](_0x35e6f0))return _0x35e6f0['map'](_0x17409a=>[_0x17409a['id'],_0x17409a]);return Object[_0xe50484(0x23b)](_0x35e6f0);}export function flattenJourneyActivation(_0x148d19){const _0x33a9b1=a107_0xd24541,{activationParams:_0xe9d077,activationId:_0x19755a,runAfterJourneyRefresh:_0x13d338}=_0x148d19[_0x33a9b1(0x227)];return{'id':_0x148d19['id'],'activationId':_0x19755a,'runAfterJourneyRefresh':_0x13d338,..._0xe9d077};}function col(_0x93cecc,_0x39a1f2={}){return{'column':_0x93cecc,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x39a1f2};}export function generateColumnMapping(_0x4e8436){const _0x49395b=a107_0xd24541,_0x58078b=[];_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x1f5))),_0x58078b['push'](col(_0x49395b(0x1f6),{'direction':'in','category':_0x49395b(0x235)})),_0x58078b[_0x49395b(0x1f1)](col('outtime_journey',{'direction':_0x49395b(0x203),'category':'journey'}));_0x4e8436[_0x49395b(0x227)]['goal']&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x1e5),{'direction':'in','category':_0x49395b(0x267),'detail':_0x4e8436[_0x49395b(0x227)][_0x49395b(0x267)]['name']||null}));const _0x46a354=_0x4e8436['attributes'][_0x49395b(0x261)]||[];for(let _0x54fd3e=0x0;_0x54fd3e<_0x46a354[_0x49395b(0x238)];_0x54fd3e++){const _0x2e8ead=_0x46a354[_0x54fd3e],_0x1055e4=_0x2e8ead[_0x49395b(0x202)],_0x4ea33e={'stageIndex':_0x54fd3e,'stageName':_0x1055e4},_0x286020=_0x2e8ead['entryCriteria']?.[_0x49395b(0x202)]||null;_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e,{..._0x4ea33e,'direction':'in','category':_0x49395b(0x20b),'detail':_0x286020})),_0x58078b['push'](col(_0x49395b(0x1ef)+_0x54fd3e,{..._0x4ea33e,'direction':'out','category':_0x49395b(0x20b),'detail':_0x286020}));_0x2e8ead[_0x49395b(0x244)]&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+_0x49395b(0x231),{..._0x4ea33e,'direction':'in','category':_0x49395b(0x244),'detail':_0x2e8ead['milestone']['name']||null}));const _0x547dc6=_0x2e8ead[_0x49395b(0x252)]||_0x2e8ead[_0x49395b(0x23c)]||[];for(let _0x3f6f0e=0x0;_0x3f6f0e<_0x547dc6[_0x49395b(0x238)];_0x3f6f0e++){_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+_0x49395b(0x1f9)+_0x3f6f0e,{..._0x4ea33e,'direction':'in','category':_0x49395b(0x1e9),'detail':_0x547dc6[_0x3f6f0e]['name']||null}));}const _0x3e8ec7=getStepEntries(_0x2e8ead[_0x49395b(0x246)]);for(const [_0x314854,_0x25d1bc]of _0x3e8ec7){const _0x1cd0e5=convertToColumnId(_0x314854),_0x4d16d9=_0x25d1bc['type']||null,_0xe53b6d=_0x25d1bc['name']||null,_0x42c442={..._0x4ea33e,'stepType':_0x4d16d9,'stepName':_0xe53b6d,'stepId':_0x314854};_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5,{..._0x42c442,'direction':'in','category':_0x49395b(0x1eb)})),_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x1ef)+_0x54fd3e+'_'+_0x1cd0e5,{..._0x42c442,'direction':_0x49395b(0x203),'category':'step'}));if(_0x25d1bc[_0x49395b(0x229)]===_0x49395b(0x21c)&&_0x25d1bc['branches'])for(const _0x5d1332 of _0x25d1bc['branches']){_0x5d1332['segmentId']&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5+'_'+_0x5d1332['segmentId'],{..._0x42c442,'direction':'in','category':_0x49395b(0x25f),'detail':_0x5d1332[_0x49395b(0x202)]||(_0x5d1332[_0x49395b(0x24f)]?_0x49395b(0x1ea):null)}));}if((_0x25d1bc['type']===_0x49395b(0x253)||_0x25d1bc[_0x49395b(0x229)]===_0x49395b(0x251))&&_0x25d1bc['variants'])for(const _0x35c5b0 of _0x25d1bc[_0x49395b(0x240)]){_0x35c5b0['id']&&_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5+_0x49395b(0x24e)+convertToColumnId(_0x35c5b0['id']),{..._0x42c442,'direction':'in','category':'variant','detail':_0x35c5b0['name']||null}));}if(_0x25d1bc['type']==='WaitStep'||_0x25d1bc[_0x49395b(0x229)]===_0x49395b(0x25a)){const _0x1b8f58=[];if(_0x25d1bc['conditionSegmentId'])_0x1b8f58[_0x49395b(0x1f1)](_0x25d1bc[_0x49395b(0x224)]);else{if(Array[_0x49395b(0x25e)](_0x25d1bc[_0x49395b(0x200)]))for(const _0x563461 of _0x25d1bc[_0x49395b(0x200)]){_0x563461['segmentId']&&!_0x563461[_0x49395b(0x22a)]&&_0x1b8f58[_0x49395b(0x1f1)](_0x563461[_0x49395b(0x258)]);}else _0x25d1bc[_0x49395b(0x247)]?.[_0x49395b(0x258)]&&_0x1b8f58['push'](_0x25d1bc['waitCondition'][_0x49395b(0x258)]);}for(const _0x240af9 of _0x1b8f58){_0x58078b[_0x49395b(0x1f1)](col(_0x49395b(0x259)+_0x54fd3e+'_'+_0x1cd0e5+'_'+_0x240af9,{..._0x42c442,'direction':'in','category':_0x49395b(0x25f)}));}}}}return _0x58078b['push'](col('time')),_0x58078b;}export function aggregateJourneyHistory(_0x493a56){const _0x227305=a107_0xd24541,_0x46b0fe=_0x493a56[_0x227305(0x1fb)]((_0x373395,_0x55dfd7)=>_0x373395+(_0x55dfd7['entryInflux']??0x0),0x0),_0x4cdf35=_0x493a56['reduce']((_0x2f885e,_0x13354f)=>_0x2f885e+(_0x13354f['goalInflux']??0x0),0x0),_0xe75c31=_0x493a56[_0x227305(0x1fb)]((_0x1fb86b,_0x2f80f1)=>_0x1fb86b+((_0x2f80f1[_0x227305(0x210)]??0x0)+(_0x2f80f1[_0x227305(0x225)]??0x0)),0x0),_0x5c87f8=_0x493a56[_0x493a56[_0x227305(0x238)]-0x1];return{'size':_0x5c87f8?.[_0x227305(0x255)]??0x0,'entered':_0x46b0fe,'goal_achieved':_0x4cdf35,'completion_rate':_0x4cdf35&&_0x46b0fe?_0x4cdf35/_0x46b0fe*0x64:0x0,'exit_or_jump':_0xe75c31,'exit_or_jump_rate':_0xe75c31&&_0x46b0fe?_0xe75c31/_0x46b0fe*0x64:0x0};}export function aggregateStageHistory(_0xf8a797){const _0x1894d2=a107_0xd24541,_0x54e0b1=_0xf8a797[_0x1894d2(0x1fb)]((_0x375fc9,_0x236bf8)=>_0x375fc9+(_0x236bf8['entryInflux']??0x0),0x0),_0x473733=_0xf8a797[_0x1894d2(0x1fb)]((_0x103939,_0x6764a)=>_0x103939+(_0x6764a[_0x1894d2(0x237)]??0x0),0x0),_0x5e8ff0=_0xf8a797[_0x1894d2(0x1fb)]((_0x308901,_0x521458)=>_0x308901+((_0x521458['exitInflux']??0x0)+(_0x521458[_0x1894d2(0x225)]??0x0)),0x0),_0x1ecf2d=_0xf8a797[_0xf8a797[_0x1894d2(0x238)]-0x1];return{'size':_0x1ecf2d?.['size']??0x0,'entered':_0x54e0b1,'milestone':_0x473733,'milestone_rate':_0x473733&&_0x54e0b1?_0x473733/_0x54e0b1*0x64:0x0,'exit_or_jump':_0x5e8ff0,'exit_or_jump_rate':_0x5e8ff0&&_0x54e0b1?_0x5e8ff0/_0x54e0b1*0x64:0x0};}export function assembleJourneyStats(_0x2902d4,_0x5c8276){const _0x4f4530=a107_0xd24541,_0xa46925=!!(_0x5c8276?.['from']||_0x5c8276?.['to'])&&!!_0x2902d4[_0x4f4530(0x22c)]?.[_0x4f4530(0x238)];if(_0xa46925){const _0x3ace82=aggregateJourneyHistory(_0x2902d4[_0x4f4530(0x22c)]),_0x2c92ae={'journey_id':_0x2902d4[_0x4f4530(0x207)],..._0x5c8276?.['from']&&{'from':_0x5c8276[_0x4f4530(0x248)]},..._0x5c8276?.['to']&&{'to':_0x5c8276['to']},..._0x3ace82};return _0x5c8276?.[_0x4f4530(0x20c)]&&(_0x2c92ae[_0x4f4530(0x22c)]=_0x2902d4[_0x4f4530(0x22c)]),_0x2c92ae;}return{'journey_id':_0x2902d4[_0x4f4530(0x207)],'size':_0x2902d4[_0x4f4530(0x255)],'entered':_0x2902d4[_0x4f4530(0x1e2)],'goal_achieved':_0x2902d4[_0x4f4530(0x1f4)],'completion_rate':_0x2902d4[_0x4f4530(0x20f)],'exit_or_jump':_0x2902d4[_0x4f4530(0x23a)],'exit_or_jump_rate':_0x2902d4[_0x4f4530(0x243)]};}export function formatVersionsFromBundle(_0x4cdeef){const _0x154d50=a107_0xd24541,_0x28c5bf=_0x4cdeef[_0x154d50(0x1e7)][_0x154d50(0x1f3)](_0x279196=>({'journeyId':_0x279196['id'],'versionNumber':_0x279196[_0x154d50(0x227)][_0x154d50(0x1e3)]??0x0,'name':_0x279196[_0x154d50(0x227)][_0x154d50(0x202)],'state':_0x279196[_0x154d50(0x227)][_0x154d50(0x236)],'paused':_0x279196[_0x154d50(0x227)][_0x154d50(0x1fd)],'createdAt':_0x279196['attributes'][_0x154d50(0x22b)],'updatedAt':_0x279196[_0x154d50(0x227)][_0x154d50(0x23d)]}));return _0x28c5bf['sort']((_0x1b8e42,_0x5981d)=>_0x1b8e42[_0x154d50(0x1e3)]-_0x5981d[_0x154d50(0x1e3)]),_0x28c5bf;}export function synthesizePreBundleVersion(_0x4275f2){const _0x43a69c=a107_0xd24541;return{'journeyId':_0x4275f2['id'],'versionNumber':0x1,'name':_0x4275f2[_0x43a69c(0x227)]['name'],'state':_0x4275f2[_0x43a69c(0x227)][_0x43a69c(0x236)],'paused':_0x4275f2['attributes'][_0x43a69c(0x1fd)],'createdAt':_0x4275f2['attributes']['createdAt'],'updatedAt':_0x4275f2['attributes'][_0x43a69c(0x23d)]};}export function buildStageNameMap(_0x34f4f4){const _0x3333b1=a107_0xd24541;return new Map(_0x34f4f4['attributes'][_0x3333b1(0x261)]?.[_0x3333b1(0x1f3)](_0xf37f9=>[_0xf37f9['id'],_0xf37f9[_0x3333b1(0x202)]])??[]);}export class JourneySDK{[a107_0xd24541(0x219)];constructor(_0x2c78dc){const _0xcb8b2a=a107_0xd24541;this[_0xcb8b2a(0x219)]=new CDPApiClient(_0x2c78dc);}[a107_0xd24541(0x25b)](_0x36e435,_0x554b48){return _0x554b48?_0x36e435:deduplicateJourneysByBundle(_0x36e435);}async['listJourneysWithDetails'](_0x4ff771,_0x2e0472){const _0x2ae491=a107_0xd24541;try{const _0x6174a=await this['client']['listJourneysWithDetails'](_0x4ff771);return{'journeys':this[_0x2ae491(0x25b)](_0x6174a['journeys'],_0x2e0472),'activationStepsById':_0x6174a[_0x2ae491(0x254)]};}catch(_0x2736fe){if(isHttp404Error(_0x2736fe))return{'journeys':[],'activationStepsById':new Map()};throw _0x2736fe;}}async[a107_0xd24541(0x20a)](_0x59ac00,_0x179004,_0x4af516){const _0x3ebe0d=a107_0xd24541;let _0x36876b=_0x179004;if(!_0x36876b)try{const _0x3ec746=await this[_0x3ebe0d(0x219)][_0x3ebe0d(0x230)](_0x59ac00);_0x36876b=_0x3ec746[_0x3ebe0d(0x234)]??undefined;}catch(_0x5a1fe0){if(isHttp404Error(_0x5a1fe0))return[];throw _0x5a1fe0;}if(!_0x36876b)return[];let _0x231bef;if(_0x4af516?.[_0x3ebe0d(0x26a)]){const _0x3c9970=await this[_0x3ebe0d(0x219)][_0x3ebe0d(0x1fe)](_0x59ac00),_0x3be9d1=_0x3c9970['map'](_0x419179=>this['client'][_0x3ebe0d(0x1e1)](_0x419179['id'])),_0x4bb01e=await Promise[_0x3ebe0d(0x257)](_0x3be9d1),_0x485692=new Set();_0x231bef=_0x4bb01e[_0x3ebe0d(0x25d)]()['filter'](_0x1b2d07=>{const _0x1cf205=_0x3ebe0d;if(_0x485692[_0x1cf205(0x204)](_0x1b2d07['id']))return![];return _0x485692[_0x1cf205(0x233)](_0x1b2d07['id']),!![];});}else{const _0x2cd84f=await this['client'][_0x3ebe0d(0x239)](_0x36876b,0x20,![]),_0x1d6c22=_0x2cd84f[_0x3ebe0d(0x1ec)],_0x55cf18=_0x1d6c22[_0x3ebe0d(0x20e)](_0x1b7b98=>_0x1b7b98['type']===_0x3ebe0d(0x235));_0x231bef=_0x55cf18[_0x3ebe0d(0x1f3)](_0x31c305=>entityToJourneyListItem(_0x31c305,_0x59ac00));}return this['applyVersionDeduplication'](_0x231bef,_0x4af516?.[_0x3ebe0d(0x26a)]);}async[a107_0xd24541(0x245)](_0x147c8f,_0x12e6d2,_0x4d167d){const _0x1aef85=a107_0xd24541;if(!_0x12e6d2)return{'journeys':[],'folders':[]};const _0x227cd8=await this[_0x1aef85(0x219)][_0x1aef85(0x239)](_0x12e6d2,0x20,![]),_0x3ca165=_0x227cd8[_0x1aef85(0x1ec)],_0x5a490e=_0x3ca165['filter'](_0x395633=>_0x395633[_0x1aef85(0x229)]===_0x1aef85(0x250)&&_0x395633['id']!==_0x12e6d2),_0xce9463=_0x5a490e[_0x1aef85(0x1f3)](_0x29c8c0=>({'id':_0x29c8c0['id'],'name':_0x29c8c0[_0x1aef85(0x227)]['name']})),_0x3c3b20=_0x3ca165[_0x1aef85(0x20e)](_0x48801c=>_0x48801c[_0x1aef85(0x229)]===_0x1aef85(0x235)),_0x2f6bda=_0x3c3b20[_0x1aef85(0x1f3)](_0x42e52c=>entityToJourneyListItem(_0x42e52c,_0x147c8f));return{'journeys':this[_0x1aef85(0x25b)](_0x2f6bda,_0x4d167d?.[_0x1aef85(0x26a)]),'folders':_0xce9463};}async[a107_0xd24541(0x1e6)](_0x487c39,_0x43d8fe){const _0x20fcf5=a107_0xd24541;let _0x76312d;try{_0x76312d=await this[_0x20fcf5(0x219)][_0x20fcf5(0x1fe)](_0x487c39);}catch(_0x23fe5f){if(isHttp404Error(_0x23fe5f))return{'journeys':[],'activationStepsById':new Map()};throw _0x23fe5f;}const _0x58caa0=_0x76312d[_0x20fcf5(0x1f3)](async _0x4321a5=>{const _0x16ce56=_0x20fcf5;return await this['listJourneysWithDetails'](_0x4321a5['id'],_0x43d8fe?.[_0x16ce56(0x26a)]);}),_0x33f192=await Promise['all'](_0x58caa0),_0x5a62fd=new Map(),_0x372bcd=[];for(const _0x253d2e of _0x33f192){_0x372bcd[_0x20fcf5(0x1f1)](..._0x253d2e[_0x20fcf5(0x1e7)]);for(const [_0x3dc922,_0x19257d]of _0x253d2e[_0x20fcf5(0x254)]){_0x5a62fd[_0x20fcf5(0x21e)](_0x3dc922,_0x19257d);}}const _0x3e4782=new Set(),_0x6a2236=_0x372bcd[_0x20fcf5(0x20e)](_0x17ff4c=>{if(_0x3e4782['has'](_0x17ff4c['id']))return![];return _0x3e4782['add'](_0x17ff4c['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x6a2236,_0x43d8fe?.[_0x20fcf5(0x26a)]),'activationStepsById':_0x5a62fd};}async['getJourney'](_0x5ab0d4){const _0xf20d47=a107_0xd24541;try{return await this['client'][_0xf20d47(0x212)](_0x5ab0d4);}catch(_0x389bfa){if(isHttp404Error(_0x389bfa))throw new SDKError(ErrorCode[_0xf20d47(0x218)],_0xf20d47(0x21a)+_0x5ab0d4,_0x389bfa);throw _0x389bfa;}}async[a107_0xd24541(0x209)](_0x19492f,_0x26eea5){const _0x25affc=a107_0xd24541,_0x7dca78=await this[_0x25affc(0x20a)](_0x19492f),_0x21c63f=_0x7dca78[_0x25affc(0x242)](_0x9cadce=>_0x9cadce[_0x25affc(0x263)][_0x25affc(0x21d)]()===_0x26eea5[_0x25affc(0x21d)]());if(!_0x21c63f)throw new SDKError(ErrorCode[_0x25affc(0x218)],_0x25affc(0x21a)+_0x26eea5,undefined,{'helpText':_0x25affc(0x1e0)});return _0x21c63f['id'];}async['getStatistics'](_0x2c4c2a,_0x4155f7){const _0x2b0d47=a107_0xd24541;try{return await this['client']['getJourneyStatistics'](_0x2c4c2a,_0x4155f7);}catch(_0x4d3743){if(isHttp404Error(_0x4d3743))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x2b0d47(0x21a)+_0x2c4c2a,_0x4d3743);throw _0x4d3743;}}async[a107_0xd24541(0x249)](_0x4823f1,_0x4f313f){const _0x15e3a0=a107_0xd24541,_0x588fa7={'from':_0x4f313f?.[_0x15e3a0(0x248)],'to':_0x4f313f?.['to'],'limit':_0x4f313f?.['limit']},_0x44d627=_0x4f313f?.[_0x15e3a0(0x229)]!==_0x15e3a0(0x23f);try{const [_0x6a9194,_0x10de27]=await Promise[_0x15e3a0(0x257)]([this['fetchTrafficRaw'](_0x4823f1,_0x4f313f?.[_0x15e3a0(0x229)],_0x588fa7),_0x44d627?this[_0x15e3a0(0x212)](_0x4823f1):undefined]);if(_0x6a9194[_0x15e3a0(0x1de)]&&_0x10de27){const _0x15ae52=buildStageNameMap(_0x10de27);_0x6a9194[_0x15e3a0(0x1de)]=_0x6a9194[_0x15e3a0(0x1de)][_0x15e3a0(0x1f3)](_0x3a9230=>({..._0x3a9230,'journeyStageName':_0x15ae52[_0x15e3a0(0x1dd)](_0x3a9230[_0x15e3a0(0x221)])??_0x3a9230['journeyStageId']}));}return _0x6a9194;}catch(_0x407272){if(isHttp404Error(_0x407272))throw new SDKError(ErrorCode[_0x15e3a0(0x218)],_0x15e3a0(0x21a)+_0x4823f1,_0x407272);throw _0x407272;}}async[a107_0xd24541(0x211)](_0x7539d7,_0x4a291c,_0x49d31e){const _0x2af936=a107_0xd24541;if(_0x4a291c===_0x2af936(0x23f)){const _0x5cf8f6=await this[_0x2af936(0x219)][_0x2af936(0x201)](_0x7539d7,_0x49d31e);return{'conversion':_0x5cf8f6};}if(_0x4a291c==='activation'){const _0x4cf5ba=await this[_0x2af936(0x219)][_0x2af936(0x213)](_0x7539d7,_0x49d31e);return{'activation':_0x4cf5ba};}const [_0x5c1f18,_0x2feb30]=await Promise[_0x2af936(0x257)]([this[_0x2af936(0x219)][_0x2af936(0x201)](_0x7539d7,_0x49d31e),this[_0x2af936(0x219)][_0x2af936(0x213)](_0x7539d7,_0x49d31e)]);return{'conversion':_0x5c1f18,'activation':_0x2feb30};}async[a107_0xd24541(0x1df)](_0x565f48){const _0x1f4750=a107_0xd24541;try{return await this[_0x1f4750(0x219)]['pauseJourney'](_0x565f48);}catch(_0x4ddace){if(isHttp404Error(_0x4ddace))throw new SDKError(ErrorCode[_0x1f4750(0x218)],_0x1f4750(0x21a)+_0x565f48,_0x4ddace);throw _0x4ddace;}}async['resume'](_0x242664){const _0xdc17e2=a107_0xd24541;try{return await this[_0xdc17e2(0x219)][_0xdc17e2(0x1f0)](_0x242664);}catch(_0x3cb174){if(isHttp404Error(_0x3cb174))throw new SDKError(ErrorCode[_0xdc17e2(0x218)],'Journey\x20not\x20found:\x20'+_0x242664,_0x3cb174);throw _0x3cb174;}}async[a107_0xd24541(0x265)](_0x390a82){const _0x52bad0=a107_0xd24541;return await this['client'][_0x52bad0(0x24c)](_0x390a82);}async[a107_0xd24541(0x25c)](_0x503759,_0x357d36){const _0x5da965=a107_0xd24541;try{return await this['client'][_0x5da965(0x1f2)](_0x503759,_0x357d36);}catch(_0x415dfd){if(isHttp404Error(_0x415dfd))throw new SDKError(ErrorCode[_0x5da965(0x218)],'Journey\x20not\x20found:\x20'+_0x503759,_0x415dfd);throw _0x415dfd;}}async['getActivation'](_0x5f067e,_0x34c7fa){const _0x452637=a107_0xd24541;try{return await this[_0x452637(0x219)]['getJourneyActivation'](_0x5f067e,_0x34c7fa);}catch(_0x45a354){if(isHttp404Error(_0x45a354))throw new SDKError(ErrorCode[_0x452637(0x1ed)],_0x452637(0x24d)+_0x34c7fa+_0x452637(0x260)+_0x5f067e,_0x45a354);throw _0x45a354;}}async[a107_0xd24541(0x256)](_0xdfe956){const _0x17616f=a107_0xd24541;try{return await this[_0x17616f(0x219)][_0x17616f(0x266)](_0xdfe956);}catch(_0x55a29f){if(isHttp404Error(_0x55a29f))return[];throw _0x55a29f;}}async['listActivationsFlat'](_0x427c7e){const _0x587f4f=await this['listActivations'](_0x427c7e);return _0x587f4f['map'](flattenJourneyActivation);}async[a107_0xd24541(0x24b)](_0x5e6fa0,_0x4af7c2){const _0x26accb=a107_0xd24541;return await this[_0x26accb(0x219)][_0x26accb(0x1fa)](_0x5e6fa0,_0x4af7c2);}async['getColumnMapping'](_0x4e1c0e){const _0x250b34=a107_0xd24541,_0x2e482b=await this['getJourney'](_0x4e1c0e),_0x949b3d=generateColumnMapping(_0x2e482b);return{'journeyId':_0x2e482b['id'],'journeyName':_0x2e482b[_0x250b34(0x227)]['name'],'database':_0x250b34(0x232)+_0x2e482b[_0x250b34(0x227)][_0x250b34(0x22f)],'table':'journey_'+_0x2e482b['id'],'columns':_0x949b3d};}async[a107_0xd24541(0x262)](_0x54934a){const _0x374e8d=a107_0xd24541;return this[_0x374e8d(0x219)][_0x374e8d(0x216)](_0x54934a);}async[a107_0xd24541(0x22d)](_0x2b1ecb){const _0x395651=a107_0xd24541,_0x5200a3=await this[_0x395651(0x212)](_0x2b1ecb),_0x367d7d=_0x5200a3[_0x395651(0x227)]['journeyBundleId'];if(!_0x367d7d)return{'bundleId':'','bundleName':_0x5200a3[_0x395651(0x227)][_0x395651(0x202)],'bundleDescription':_0x5200a3['attributes'][_0x395651(0x1e8)]??null,'latestJourneyId':_0x5200a3['id'],'versions':[synthesizePreBundleVersion(_0x5200a3)]};const _0xf28b2=await this[_0x395651(0x262)](_0x367d7d);return{'bundleId':_0x367d7d,'bundleName':_0xf28b2[_0x395651(0x202)],'bundleDescription':_0xf28b2['description']??null,'latestJourneyId':_0xf28b2[_0x395651(0x220)],'versions':formatVersionsFromBundle(_0xf28b2)};}async[a107_0xd24541(0x21f)](_0x63dfed){const _0x35649d=a107_0xd24541,_0x28eb0f=await this[_0x35649d(0x212)](_0x63dfed),_0x3097e7=_0x28eb0f[_0x35649d(0x227)][_0x35649d(0x20d)];if(!_0x3097e7)throw new SDKError(ErrorCode[_0x35649d(0x1f8)],_0x35649d(0x206));await this[_0x35649d(0x219)][_0x35649d(0x241)](_0x3097e7);const _0x45753c=await this[_0x35649d(0x219)][_0x35649d(0x216)](_0x3097e7),_0x3911c6=_0x45753c[_0x35649d(0x202)]+'\x20v'+(_0x45753c[_0x35649d(0x23e)]+0x1);return this[_0x35649d(0x219)]['createJourneyVersion'](_0x3097e7,{'sourceId':_0x63dfed,'attributes':{'name':_0x3911c6}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a108_0x55cfc2=a108_0x37ea;(function(_0x58df1f,_0x46fd53){const _0x5cbda3=a108_0x37ea,_0x5e3cf4=_0x58df1f();while(!![]){try{const _0x3c57ea=parseInt(_0x5cbda3(0xcf))/0x1+parseInt(_0x5cbda3(0xd2))/0x2+-parseInt(_0x5cbda3(0xd1))/0x3+parseInt(_0x5cbda3(0xd5))/0x4+-parseInt(_0x5cbda3(0xd6))/0x5*(parseInt(_0x5cbda3(0xd0))/0x6)+parseInt(_0x5cbda3(0xd8))/0x7+-parseInt(_0x5cbda3(0xd9))/0x8*(-parseInt(_0x5cbda3(0xd3))/0x9);if(_0x3c57ea===_0x46fd53)break;else _0x5e3cf4['push'](_0x5e3cf4['shift']());}catch(_0x5521af){_0x5e3cf4['push'](_0x5e3cf4['shift']());}}}(a108_0x3bbd,0x5144b));function a108_0x3bbd(){const _0x441b85=['last_chat_id','101265SrIlEs','12YNHVft','1109568NDchXY','65488xEckkM','18MJPqyq','clear','395480OGcAPh','569215bCECLe','read','4531296eGWKNs','200840ANFyMM','llm/chat','write'];a108_0x3bbd=function(){return _0x441b85;};return a108_0x3bbd();}function a108_0x37ea(_0x4643b2,_0x3fbb67){_0x4643b2=_0x4643b2-0xcf;const _0x3bbdc6=a108_0x3bbd();let _0x37eafa=_0x3bbdc6[_0x4643b2];return _0x37eafa;}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a108_0x55cfc2(0xdc),a108_0x55cfc2(0xda));export function saveLastChatId(_0x1dc5c0){const _0x34c11a=a108_0x55cfc2;chatIdCache[_0x34c11a(0xdb)](_0x1dc5c0);}export function loadLastChatId(){const _0x4e4921=a108_0x55cfc2;return chatIdCache[_0x4e4921(0xd7)]();}export function clearLastChatId(){const _0x7b590c=a108_0x55cfc2;chatIdCache[_0x7b590c(0xd4)]();}
|