@treasuredata/tdx 2026.3.34 → 2026.3.35

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.
Files changed (219) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- function a131_0x5e0c(){const _0x375f83=['WaitStep','journeys','goal','versionNumber','has','activationStepsById','journeyBundleId','listJourneyActivations','push','milestone','listJourneysFromParentSegment','draft','launched','find','enteredSize','exit_criteria','2650QiBopk','rootFolderId','listActivationsFlat','createJourney','JOURNEY_NOT_FOUND','listJourneysWithFolders','getLatestJourneyId','60veqKVg','intime_goal','time','entryCriteria','pauseJourney','reduce','branch','description','exitOrJumpSize','variant','1236356IPrNOw','audienceId','waitCondition','outtime_journey','flat','Journey\x20activation\x20step\x20not\x20found:\x20','segmentId','createJourneyVersion','6948cwFiyI','listSegmentFolders','AbTest','getJourneyActivation','stage','from','type','listEntitiesByFolder','exitCriterias','sort','all','history','journeyBundleName','lastVersionNumber','map','paused','journey','listJourneysWithDetailsFromParentSegment','352704gSAKMe','getConversionSankeyChart','getJourneyBundle','size','Journey\x20not\x20found:\x20','24UmVPCI','excluded','Wait','isArray','step','conditions','ABTest','steps','createJourneyActivation','1572328sjcvJc','createdAt','variants','branches','conditionSegmentId','filter','_milestone','goalInflux','segmentFolderId','checkJourneyAppendable','getActivation','outtime_stage_','_exit_','includeAllVersions','getJourneyStatistics','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listActivations','getParentSegmentFull','entryInflux','journeyStages','journeyId','getBundle','listJourneysWithDetails','relationships','data','fixed','set','getStatistics','getColumnMapping','state','INVALID_ARGUMENT','1561971FEDfLA','intime_stage_','conversion','timedOutPath','folder-segment','attributes','getActivationSankeyChart','add','goalSize','name','toLowerCase','applyVersionDeduplication','intime_journey','client','activation','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','no-bundle-','entries','cdp_customer_id','limit','idx-','5540fzpCSq','length','getJourney','975163oABqta','pause','string','updatedAt','exitInflux','fetchTrafficRaw','get','parentFolder','NOT_FOUND','jumpInflux','values','journeyStageId'];a131_0x5e0c=function(){return _0x375f83;};return a131_0x5e0c();}const a131_0x236fe8=a131_0x4c21;(function(_0x33608e,_0x34ce56){const _0x57e648=a131_0x4c21,_0x8047b7=_0x33608e();while(!![]){try{const _0x3cc18b=-parseInt(_0x57e648(0xb7))/0x1+-parseInt(_0x57e648(0xc8))/0x2+parseInt(_0x57e648(0x10f))/0x3+parseInt(_0x57e648(0xf0))/0x4+parseInt(_0x57e648(0xbe))/0x5*(-parseInt(_0x57e648(0xe2))/0x6)+parseInt(_0x57e648(0x9b))/0x7*(parseInt(_0x57e648(0xe7))/0x8)+-parseInt(_0x57e648(0xd0))/0x9*(-parseInt(_0x57e648(0x98))/0xa);if(_0x3cc18b===_0x34ce56)break;else _0x8047b7['push'](_0x8047b7['shift']());}catch(_0x29a678){_0x8047b7['push'](_0x8047b7['shift']());}}}(a131_0x5e0c,0x69bde));function a131_0x4c21(_0x5aab97,_0x196f5b){_0x5aab97=_0x5aab97-0x8e;const _0x5e0c02=a131_0x5e0c();let _0x4c218e=_0x5e0c02[_0x5aab97];return _0x4c218e;}import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x322576){const _0x5b4e25=a131_0x4c21;return _0x322576['journeyBundleId']??_0x322576[_0x5b4e25(0x114)]?.[_0x5b4e25(0xad)]??undefined;}function getVersionNumber(_0x5f0cd2){const _0x3f277c=a131_0x4c21;return _0x5f0cd2[_0x3f277c(0xaa)]??_0x5f0cd2[_0x3f277c(0x114)]?.['versionNumber']??0x0;}function getState(_0x3a1d74){const _0x3aaf5a=a131_0x4c21;return _0x3a1d74[_0x3aaf5a(0x10d)]??_0x3a1d74[_0x3aaf5a(0x114)]?.['state'];}export function deduplicateJourneysByBundle(_0x223992){const _0x22afd5=a131_0x4c21,_0xc5258d=new Map();let _0x26c717=0x0;for(const _0x342c5d of _0x223992){const _0x5b76e0=getBundleId(_0x342c5d);if(!_0x5b76e0){const _0x12032c=_0x22afd5(0x93)+(_0x342c5d['id']??_0x22afd5(0x97)+_0x26c717++);_0xc5258d[_0x22afd5(0x10a)](_0x12032c,_0x342c5d);continue;}const _0x21962d=_0xc5258d[_0x22afd5(0xa1)](_0x5b76e0);if(!_0x21962d)_0xc5258d[_0x22afd5(0x10a)](_0x5b76e0,_0x342c5d);else{const _0x2e9191=getState(_0x21962d)===_0x22afd5(0xb3),_0x3ba4fc=getState(_0x342c5d)===_0x22afd5(0xb3);if(_0x3ba4fc&&!_0x2e9191)_0xc5258d[_0x22afd5(0x10a)](_0x5b76e0,_0x342c5d);else{if(!_0x3ba4fc&&_0x2e9191){}else{const _0x1ee6ed=getVersionNumber(_0x21962d),_0x515dcd=getVersionNumber(_0x342c5d);_0x515dcd>_0x1ee6ed&&_0xc5258d['set'](_0x5b76e0,_0x342c5d);}}}}return Array[_0x22afd5(0xd5)](_0xc5258d[_0x22afd5(0xa5)]());}const VALID_JOURNEY_STATES=new Set([a131_0x236fe8(0xb2),'simulation',a131_0x236fe8(0xb3)]);export function parseJourneyState(_0x8ecb93){const _0x333c36=a131_0x236fe8;if(typeof _0x8ecb93===_0x333c36(0x9d)&&VALID_JOURNEY_STATES[_0x333c36(0xab)](_0x8ecb93))return _0x8ecb93;return _0x333c36(0xb2);}export function entityToJourneyListItem(_0x89e376,_0x4f9476){const _0x3797fa=a131_0x236fe8,_0x4888aa=_0x89e376[_0x3797fa(0x114)];return{'id':_0x89e376['id'],'name':_0x4888aa[_0x3797fa(0x118)]??'','journeyBundleName':_0x4888aa[_0x3797fa(0xdc)]??_0x4888aa[_0x3797fa(0x118)]??'','journeyBundleId':_0x4888aa['journeyBundleId']??'','versionNumber':_0x4888aa[_0x3797fa(0xaa)],'description':_0x4888aa[_0x3797fa(0xc5)]??null,'state':parseJourneyState(_0x4888aa[_0x3797fa(0x10d)]),'paused':_0x4888aa[_0x3797fa(0xdf)]??![],'audienceId':_0x4f9476,'folderId':_0x4888aa[_0x3797fa(0xf8)]??_0x89e376[_0x3797fa(0x107)]?.[_0x3797fa(0xa2)]?.[_0x3797fa(0x108)]?.['id']??null,'createdAt':_0x4888aa['createdAt']??'','updatedAt':_0x4888aa['updatedAt']??''};}function convertToColumnId(_0x45efc0){return _0x45efc0['replace'](/-/g,'_');}function getStepEntries(_0xdd4055){const _0x592100=a131_0x236fe8;if(!_0xdd4055)return[];if(Array[_0x592100(0xea)](_0xdd4055))return _0xdd4055[_0x592100(0xde)](_0x288458=>[_0x288458['id'],_0x288458]);return Object[_0x592100(0x94)](_0xdd4055);}export function flattenJourneyActivation(_0x545688){const _0x52e97d=a131_0x236fe8,{activationParams:_0x1dfb90,activationId:_0x182999,runAfterJourneyRefresh:_0x2cd618}=_0x545688[_0x52e97d(0x114)];return{'id':_0x545688['id'],'activationId':_0x182999,'runAfterJourneyRefresh':_0x2cd618,..._0x1dfb90};}function col(_0x2a7d38,_0x50a8de={}){const _0x12b60f=a131_0x236fe8;return{'column':_0x2a7d38,'direction':null,'stageIndex':null,'stageName':null,'category':_0x12b60f(0x109),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x50a8de};}export function generateColumnMapping(_0x4c741c){const _0x405454=a131_0x236fe8,_0x287bec=[];_0x287bec['push'](col(_0x405454(0x95))),_0x287bec['push'](col(_0x405454(0x8f),{'direction':'in','category':_0x405454(0xe0)})),_0x287bec['push'](col(_0x405454(0xcb),{'direction':'out','category':_0x405454(0xe0)}));_0x4c741c[_0x405454(0x114)][_0x405454(0xa9)]&&_0x287bec[_0x405454(0xaf)](col(_0x405454(0xbf),{'direction':'in','category':_0x405454(0xa9),'detail':_0x4c741c[_0x405454(0x114)]['goal'][_0x405454(0x118)]||null}));const _0x4a188b=_0x4c741c['attributes'][_0x405454(0x103)]||[];for(let _0x4e0236=0x0;_0x4e0236<_0x4a188b[_0x405454(0x99)];_0x4e0236++){const _0x18084c=_0x4a188b[_0x4e0236],_0x4a578c=_0x18084c[_0x405454(0x118)],_0x1115bb={'stageIndex':_0x4e0236,'stageName':_0x4a578c},_0x4c1d3e=_0x18084c[_0x405454(0xc1)]?.[_0x405454(0x118)]||null;_0x287bec['push'](col(_0x405454(0x110)+_0x4e0236,{..._0x1115bb,'direction':'in','category':_0x405454(0xd4),'detail':_0x4c1d3e})),_0x287bec['push'](col(_0x405454(0xfb)+_0x4e0236,{..._0x1115bb,'direction':'out','category':_0x405454(0xd4),'detail':_0x4c1d3e}));_0x18084c[_0x405454(0xb0)]&&_0x287bec[_0x405454(0xaf)](col(_0x405454(0x110)+_0x4e0236+_0x405454(0xf6),{..._0x1115bb,'direction':'in','category':_0x405454(0xb0),'detail':_0x18084c['milestone'][_0x405454(0x118)]||null}));const _0x26424d=_0x18084c[_0x405454(0xd8)]||_0x18084c['exitCriteria']||[];for(let _0x3c1e24=0x0;_0x3c1e24<_0x26424d[_0x405454(0x99)];_0x3c1e24++){_0x287bec[_0x405454(0xaf)](col('intime_stage_'+_0x4e0236+_0x405454(0xfc)+_0x3c1e24,{..._0x1115bb,'direction':'in','category':_0x405454(0xb6),'detail':_0x26424d[_0x3c1e24][_0x405454(0x118)]||null}));}const _0x5d3730=getStepEntries(_0x18084c[_0x405454(0xee)]);for(const [_0x3b194a,_0x4d1219]of _0x5d3730){const _0xb362ba=convertToColumnId(_0x3b194a),_0x211f7a=_0x4d1219['type']||null,_0x16a4fc=_0x4d1219['name']||null,_0x22b332={..._0x1115bb,'stepType':_0x211f7a,'stepName':_0x16a4fc,'stepId':_0x3b194a};_0x287bec[_0x405454(0xaf)](col(_0x405454(0x110)+_0x4e0236+'_'+_0xb362ba,{..._0x22b332,'direction':'in','category':_0x405454(0xeb)})),_0x287bec[_0x405454(0xaf)](col(_0x405454(0xfb)+_0x4e0236+'_'+_0xb362ba,{..._0x22b332,'direction':'out','category':_0x405454(0xeb)}));if(_0x4d1219['type']==='DecisionPoint'&&_0x4d1219[_0x405454(0xf3)])for(const _0x26bd3f of _0x4d1219[_0x405454(0xf3)]){_0x26bd3f[_0x405454(0xce)]&&_0x287bec[_0x405454(0xaf)](col(_0x405454(0x110)+_0x4e0236+'_'+_0xb362ba+'_'+_0x26bd3f[_0x405454(0xce)],{..._0x22b332,'direction':'in','category':_0x405454(0xc4),'detail':_0x26bd3f['name']||(_0x26bd3f[_0x405454(0xe8)]?'Excluded\x20profiles':null)}));}if((_0x4d1219[_0x405454(0xd6)]===_0x405454(0xd2)||_0x4d1219[_0x405454(0xd6)]===_0x405454(0xed))&&_0x4d1219['variants'])for(const _0x551d01 of _0x4d1219[_0x405454(0xf2)]){_0x551d01['id']&&_0x287bec[_0x405454(0xaf)](col('intime_stage_'+_0x4e0236+'_'+_0xb362ba+'_variant_'+convertToColumnId(_0x551d01['id']),{..._0x22b332,'direction':'in','category':_0x405454(0xc7),'detail':_0x551d01[_0x405454(0x118)]||null}));}if(_0x4d1219[_0x405454(0xd6)]===_0x405454(0xa7)||_0x4d1219[_0x405454(0xd6)]===_0x405454(0xe9)){const _0x570f31=[];if(_0x4d1219[_0x405454(0xf4)])_0x570f31[_0x405454(0xaf)](_0x4d1219[_0x405454(0xf4)]);else{if(Array[_0x405454(0xea)](_0x4d1219[_0x405454(0xec)]))for(const _0x3c47f0 of _0x4d1219['conditions']){_0x3c47f0[_0x405454(0xce)]&&!_0x3c47f0[_0x405454(0x112)]&&_0x570f31['push'](_0x3c47f0[_0x405454(0xce)]);}else _0x4d1219[_0x405454(0xca)]?.[_0x405454(0xce)]&&_0x570f31[_0x405454(0xaf)](_0x4d1219[_0x405454(0xca)][_0x405454(0xce)]);}for(const _0x394adb of _0x570f31){_0x287bec[_0x405454(0xaf)](col(_0x405454(0x110)+_0x4e0236+'_'+_0xb362ba+'_'+_0x394adb,{..._0x22b332,'direction':'in','category':_0x405454(0xc4)}));}}}}return _0x287bec[_0x405454(0xaf)](col(_0x405454(0xc0))),_0x287bec;}export function aggregateJourneyHistory(_0x25b117){const _0x3c57cb=a131_0x236fe8,_0x355aa4=_0x25b117[_0x3c57cb(0xc3)]((_0x1e6373,_0x5efa22)=>_0x1e6373+(_0x5efa22[_0x3c57cb(0x102)]??0x0),0x0),_0x1a7bd5=_0x25b117[_0x3c57cb(0xc3)]((_0x205c17,_0xf0fd7)=>_0x205c17+(_0xf0fd7[_0x3c57cb(0xf7)]??0x0),0x0),_0x4cad45=_0x25b117[_0x3c57cb(0xc3)]((_0x41d9ab,_0x4082e2)=>_0x41d9ab+((_0x4082e2['exitInflux']??0x0)+(_0x4082e2[_0x3c57cb(0xa4)]??0x0)),0x0),_0x5d0ac5=_0x25b117[_0x25b117['length']-0x1];return{'size':_0x5d0ac5?.[_0x3c57cb(0xe5)]??0x0,'entered':_0x355aa4,'goal_achieved':_0x1a7bd5,'completion_rate':_0x1a7bd5&&_0x355aa4?_0x1a7bd5/_0x355aa4*0x64:0x0,'exit_or_jump':_0x4cad45,'exit_or_jump_rate':_0x4cad45&&_0x355aa4?_0x4cad45/_0x355aa4*0x64:0x0};}export function aggregateStageHistory(_0x335163){const _0x3cb291=a131_0x236fe8,_0x35898e=_0x335163[_0x3cb291(0xc3)]((_0x5b4f9c,_0x5ead04)=>_0x5b4f9c+(_0x5ead04[_0x3cb291(0x102)]??0x0),0x0),_0x53f658=_0x335163[_0x3cb291(0xc3)]((_0x3e9500,_0x19e9e5)=>_0x3e9500+(_0x19e9e5['milestoneInflux']??0x0),0x0),_0x5a6787=_0x335163[_0x3cb291(0xc3)]((_0x2d6c85,_0x58f29f)=>_0x2d6c85+((_0x58f29f[_0x3cb291(0x9f)]??0x0)+(_0x58f29f[_0x3cb291(0xa4)]??0x0)),0x0),_0x4bdbe6=_0x335163[_0x335163[_0x3cb291(0x99)]-0x1];return{'size':_0x4bdbe6?.[_0x3cb291(0xe5)]??0x0,'entered':_0x35898e,'milestone':_0x53f658,'milestone_rate':_0x53f658&&_0x35898e?_0x53f658/_0x35898e*0x64:0x0,'exit_or_jump':_0x5a6787,'exit_or_jump_rate':_0x5a6787&&_0x35898e?_0x5a6787/_0x35898e*0x64:0x0};}export function assembleJourneyStats(_0x16a540,_0x2987c4){const _0x4ab2ef=a131_0x236fe8,_0x53723e=!!(_0x2987c4?.[_0x4ab2ef(0xd5)]||_0x2987c4?.['to'])&&!!_0x16a540['history']?.['length'];if(_0x53723e){const _0x217c4b=aggregateJourneyHistory(_0x16a540[_0x4ab2ef(0xdb)]),_0x24d131={'journey_id':_0x16a540['journeyId'],..._0x2987c4?.[_0x4ab2ef(0xd5)]&&{'from':_0x2987c4[_0x4ab2ef(0xd5)]},..._0x2987c4?.['to']&&{'to':_0x2987c4['to']},..._0x217c4b};return _0x2987c4?.['includeHistory']&&(_0x24d131[_0x4ab2ef(0xdb)]=_0x16a540['history']),_0x24d131;}return{'journey_id':_0x16a540[_0x4ab2ef(0x104)],'size':_0x16a540[_0x4ab2ef(0xe5)],'entered':_0x16a540[_0x4ab2ef(0xb5)],'goal_achieved':_0x16a540[_0x4ab2ef(0x117)],'completion_rate':_0x16a540['completionRate'],'exit_or_jump':_0x16a540[_0x4ab2ef(0xc6)],'exit_or_jump_rate':_0x16a540['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x3326ae){const _0x1c27e7=a131_0x236fe8,_0x4d1f52=_0x3326ae[_0x1c27e7(0xa8)][_0x1c27e7(0xde)](_0x394a82=>({'journeyId':_0x394a82['id'],'versionNumber':_0x394a82[_0x1c27e7(0x114)]['versionNumber']??0x0,'name':_0x394a82[_0x1c27e7(0x114)][_0x1c27e7(0x118)],'state':_0x394a82['attributes']['state'],'paused':_0x394a82[_0x1c27e7(0x114)][_0x1c27e7(0xdf)],'createdAt':_0x394a82[_0x1c27e7(0x114)][_0x1c27e7(0xf1)],'updatedAt':_0x394a82[_0x1c27e7(0x114)][_0x1c27e7(0x9e)]}));return _0x4d1f52[_0x1c27e7(0xd9)]((_0x59ac66,_0x3303fd)=>_0x59ac66['versionNumber']-_0x3303fd['versionNumber']),_0x4d1f52;}export function synthesizePreBundleVersion(_0x2b7406){const _0x5738a7=a131_0x236fe8;return{'journeyId':_0x2b7406['id'],'versionNumber':0x1,'name':_0x2b7406[_0x5738a7(0x114)][_0x5738a7(0x118)],'state':_0x2b7406['attributes']['state'],'paused':_0x2b7406['attributes'][_0x5738a7(0xdf)],'createdAt':_0x2b7406['attributes'][_0x5738a7(0xf1)],'updatedAt':_0x2b7406[_0x5738a7(0x114)][_0x5738a7(0x9e)]};}export function buildStageNameMap(_0xb32d6e){const _0x51659d=a131_0x236fe8;return new Map(_0xb32d6e['attributes']['journeyStages']?.[_0x51659d(0xde)](_0x91cb7d=>[_0x91cb7d['id'],_0x91cb7d[_0x51659d(0x118)]])??[]);}export class JourneySDK{[a131_0x236fe8(0x90)];constructor(_0x1200cf){this['client']=new CDPApiClient(_0x1200cf);}[a131_0x236fe8(0x8e)](_0xffc98a,_0x3289e4){return _0x3289e4?_0xffc98a:deduplicateJourneysByBundle(_0xffc98a);}async[a131_0x236fe8(0x106)](_0x3d3070,_0x55304d){const _0x408a0e=a131_0x236fe8;try{const _0x11cd9b=await this[_0x408a0e(0x90)]['listJourneysWithDetails'](_0x3d3070);return{'journeys':this[_0x408a0e(0x8e)](_0x11cd9b[_0x408a0e(0xa8)],_0x55304d),'activationStepsById':_0x11cd9b['activationStepsById']};}catch(_0x38ef9f){if(isHttp404Error(_0x38ef9f))return{'journeys':[],'activationStepsById':new Map()};throw _0x38ef9f;}}async[a131_0x236fe8(0xb1)](_0x20aa47,_0x429774,_0x48cea4){const _0x2a0066=a131_0x236fe8;let _0x293aab=_0x429774;if(!_0x293aab)try{const _0x505603=await this['client'][_0x2a0066(0x101)](_0x20aa47);_0x293aab=_0x505603[_0x2a0066(0xb8)]??undefined;}catch(_0x3f469c){if(isHttp404Error(_0x3f469c))return[];throw _0x3f469c;}if(!_0x293aab)return[];let _0x2bd4c1;if(_0x48cea4?.['includeAllVersions']){const _0x279050=await this[_0x2a0066(0x90)][_0x2a0066(0xd1)](_0x20aa47),_0x35e98b=_0x279050['map'](_0x22680d=>this[_0x2a0066(0x90)]['listJourneys'](_0x22680d['id'])),_0x52c0bc=await Promise[_0x2a0066(0xda)](_0x35e98b),_0x2b0a4c=new Set();_0x2bd4c1=_0x52c0bc[_0x2a0066(0xcc)]()[_0x2a0066(0xf5)](_0x25a6cf=>{const _0x2b0044=_0x2a0066;if(_0x2b0a4c[_0x2b0044(0xab)](_0x25a6cf['id']))return![];return _0x2b0a4c[_0x2b0044(0x116)](_0x25a6cf['id']),!![];});}else{const _0x50bf0d=await this[_0x2a0066(0x90)][_0x2a0066(0xd7)](_0x293aab,0x20,![]),_0x323021=_0x50bf0d[_0x2a0066(0x108)],_0x31594c=_0x323021[_0x2a0066(0xf5)](_0x404336=>_0x404336['type']==='journey');_0x2bd4c1=_0x31594c[_0x2a0066(0xde)](_0x2cf23c=>entityToJourneyListItem(_0x2cf23c,_0x20aa47));}return this[_0x2a0066(0x8e)](_0x2bd4c1,_0x48cea4?.[_0x2a0066(0xfd)]);}async[a131_0x236fe8(0xbc)](_0x43a3b9,_0x1d7718,_0x1a726b){const _0x46def4=a131_0x236fe8;if(!_0x1d7718)return{'journeys':[],'folders':[]};const _0x3de16f=await this['client'][_0x46def4(0xd7)](_0x1d7718,0x20,![]),_0x14ab57=_0x3de16f[_0x46def4(0x108)],_0xa37636=_0x14ab57[_0x46def4(0xf5)](_0x48f252=>_0x48f252[_0x46def4(0xd6)]===_0x46def4(0x113)&&_0x48f252['id']!==_0x1d7718),_0xbcfe33=_0xa37636[_0x46def4(0xde)](_0x38af7a=>({'id':_0x38af7a['id'],'name':_0x38af7a[_0x46def4(0x114)]['name']})),_0x18cca2=_0x14ab57[_0x46def4(0xf5)](_0x5024f3=>_0x5024f3['type']==='journey'),_0x896604=_0x18cca2['map'](_0x47e6e9=>entityToJourneyListItem(_0x47e6e9,_0x43a3b9));return{'journeys':this[_0x46def4(0x8e)](_0x896604,_0x1a726b?.[_0x46def4(0xfd)]),'folders':_0xbcfe33};}async[a131_0x236fe8(0xe1)](_0x3610e8,_0x1de7b9){const _0xa6b301=a131_0x236fe8;let _0x3d9acc;try{_0x3d9acc=await this[_0xa6b301(0x90)][_0xa6b301(0xd1)](_0x3610e8);}catch(_0x3eae17){if(isHttp404Error(_0x3eae17))return{'journeys':[],'activationStepsById':new Map()};throw _0x3eae17;}const _0x231aec=_0x3d9acc['map'](async _0x5dff5e=>{return await this['listJourneysWithDetails'](_0x5dff5e['id'],_0x1de7b9?.['includeAllVersions']);}),_0xe9b668=await Promise[_0xa6b301(0xda)](_0x231aec),_0x3325dd=new Map(),_0x2e01e1=[];for(const _0x3eb6d7 of _0xe9b668){_0x2e01e1[_0xa6b301(0xaf)](..._0x3eb6d7[_0xa6b301(0xa8)]);for(const [_0x2c0272,_0x2f1545]of _0x3eb6d7[_0xa6b301(0xac)]){_0x3325dd['set'](_0x2c0272,_0x2f1545);}}const _0x4d0d50=new Set(),_0x15921c=_0x2e01e1['filter'](_0x1b441d=>{const _0x194919=_0xa6b301;if(_0x4d0d50[_0x194919(0xab)](_0x1b441d['id']))return![];return _0x4d0d50[_0x194919(0x116)](_0x1b441d['id']),!![];});return{'journeys':this[_0xa6b301(0x8e)](_0x15921c,_0x1de7b9?.['includeAllVersions']),'activationStepsById':_0x3325dd};}async[a131_0x236fe8(0x9a)](_0x29de92){const _0x4a237d=a131_0x236fe8;try{return await this['client'][_0x4a237d(0x9a)](_0x29de92);}catch(_0x23b0c9){if(isHttp404Error(_0x23b0c9))throw new SDKError(ErrorCode[_0x4a237d(0xbb)],_0x4a237d(0xe6)+_0x29de92,_0x23b0c9);throw _0x23b0c9;}}async['resolveJourneyId'](_0x2bf488,_0x3df915){const _0x377ab4=a131_0x236fe8,_0x57dea9=await this[_0x377ab4(0xb1)](_0x2bf488),_0x4fa370=_0x57dea9[_0x377ab4(0xb4)](_0x26a62e=>_0x26a62e[_0x377ab4(0xdc)][_0x377ab4(0x119)]()===_0x3df915[_0x377ab4(0x119)]());if(!_0x4fa370)throw new SDKError(ErrorCode[_0x377ab4(0xbb)],_0x377ab4(0xe6)+_0x3df915,undefined,{'helpText':_0x377ab4(0xff)});return _0x4fa370['id'];}async[a131_0x236fe8(0x10b)](_0x5196fc,_0xd667b4){const _0xa5fdab=a131_0x236fe8;try{return await this['client'][_0xa5fdab(0xfe)](_0x5196fc,_0xd667b4);}catch(_0x4fe40d){if(isHttp404Error(_0x4fe40d))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xa5fdab(0xe6)+_0x5196fc,_0x4fe40d);throw _0x4fe40d;}}async['getTrafficData'](_0x103924,_0x56b473){const _0x3af6ff=a131_0x236fe8,_0x486c6f={'from':_0x56b473?.[_0x3af6ff(0xd5)],'to':_0x56b473?.['to'],'limit':_0x56b473?.[_0x3af6ff(0x96)]},_0x47affb=_0x56b473?.[_0x3af6ff(0xd6)]!==_0x3af6ff(0x111);try{const [_0x5603b3,_0xebf978]=await Promise[_0x3af6ff(0xda)]([this[_0x3af6ff(0xa0)](_0x103924,_0x56b473?.['type'],_0x486c6f),_0x47affb?this['getJourney'](_0x103924):undefined]);if(_0x5603b3[_0x3af6ff(0x91)]&&_0xebf978){const _0x510dcb=buildStageNameMap(_0xebf978);_0x5603b3[_0x3af6ff(0x91)]=_0x5603b3['activation'][_0x3af6ff(0xde)](_0x2a37cc=>({..._0x2a37cc,'journeyStageName':_0x510dcb[_0x3af6ff(0xa1)](_0x2a37cc[_0x3af6ff(0xa6)])??_0x2a37cc[_0x3af6ff(0xa6)]}));}return _0x5603b3;}catch(_0x2bed58){if(isHttp404Error(_0x2bed58))throw new SDKError(ErrorCode[_0x3af6ff(0xbb)],_0x3af6ff(0xe6)+_0x103924,_0x2bed58);throw _0x2bed58;}}async[a131_0x236fe8(0xa0)](_0x442007,_0x39cf38,_0xb9fc4e){const _0xc1defe=a131_0x236fe8;if(_0x39cf38===_0xc1defe(0x111)){const _0x12ed0d=await this[_0xc1defe(0x90)][_0xc1defe(0xe3)](_0x442007,_0xb9fc4e);return{'conversion':_0x12ed0d};}if(_0x39cf38===_0xc1defe(0x91)){const _0x1a5402=await this['client'][_0xc1defe(0x115)](_0x442007,_0xb9fc4e);return{'activation':_0x1a5402};}const [_0x546814,_0x250a81]=await Promise[_0xc1defe(0xda)]([this['client'][_0xc1defe(0xe3)](_0x442007,_0xb9fc4e),this['client'][_0xc1defe(0x115)](_0x442007,_0xb9fc4e)]);return{'conversion':_0x546814,'activation':_0x250a81};}async[a131_0x236fe8(0x9c)](_0x17366d){const _0x1859fe=a131_0x236fe8;try{return await this['client'][_0x1859fe(0xc2)](_0x17366d);}catch(_0x200762){if(isHttp404Error(_0x200762))throw new SDKError(ErrorCode[_0x1859fe(0xbb)],_0x1859fe(0xe6)+_0x17366d,_0x200762);throw _0x200762;}}async['resume'](_0x1b29c5){const _0x193af0=a131_0x236fe8;try{return await this[_0x193af0(0x90)]['resumeJourney'](_0x1b29c5);}catch(_0x536ff4){if(isHttp404Error(_0x536ff4))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x193af0(0xe6)+_0x1b29c5,_0x536ff4);throw _0x536ff4;}}async['create'](_0x299ca6){const _0x263aae=a131_0x236fe8;return await this[_0x263aae(0x90)][_0x263aae(0xba)](_0x299ca6);}async['update'](_0x5f08e7,_0x51795d){const _0x383256=a131_0x236fe8;try{return await this[_0x383256(0x90)]['updateJourney'](_0x5f08e7,_0x51795d);}catch(_0x3a22a2){if(isHttp404Error(_0x3a22a2))throw new SDKError(ErrorCode[_0x383256(0xbb)],_0x383256(0xe6)+_0x5f08e7,_0x3a22a2);throw _0x3a22a2;}}async[a131_0x236fe8(0xfa)](_0x120077,_0x28a2bb){const _0x243f56=a131_0x236fe8;try{return await this[_0x243f56(0x90)][_0x243f56(0xd3)](_0x120077,_0x28a2bb);}catch(_0x23b7a0){if(isHttp404Error(_0x23b7a0))throw new SDKError(ErrorCode[_0x243f56(0xa3)],_0x243f56(0xcd)+_0x28a2bb+'\x20in\x20journey\x20'+_0x120077,_0x23b7a0);throw _0x23b7a0;}}async[a131_0x236fe8(0x100)](_0x1ca8fd){const _0x11731b=a131_0x236fe8;try{return await this[_0x11731b(0x90)][_0x11731b(0xae)](_0x1ca8fd);}catch(_0x3025c1){if(isHttp404Error(_0x3025c1))return[];throw _0x3025c1;}}async[a131_0x236fe8(0xb9)](_0x172000){const _0x25e75d=a131_0x236fe8,_0xce610b=await this[_0x25e75d(0x100)](_0x172000);return _0xce610b['map'](flattenJourneyActivation);}async['createActivation'](_0x3e912b,_0x265622){const _0x37fb4b=a131_0x236fe8;return await this[_0x37fb4b(0x90)][_0x37fb4b(0xef)](_0x3e912b,_0x265622);}async[a131_0x236fe8(0x10c)](_0x5f03a2){const _0x4e853b=a131_0x236fe8,_0x534364=await this[_0x4e853b(0x9a)](_0x5f03a2),_0x280e78=generateColumnMapping(_0x534364);return{'journeyId':_0x534364['id'],'journeyName':_0x534364[_0x4e853b(0x114)][_0x4e853b(0x118)],'database':'cdp_audience_'+_0x534364[_0x4e853b(0x114)][_0x4e853b(0xc9)],'table':'journey_'+_0x534364['id'],'columns':_0x280e78};}async['getBundle'](_0x113919){const _0x2dc91f=a131_0x236fe8;return this['client'][_0x2dc91f(0xe4)](_0x113919);}async[a131_0x236fe8(0xbd)](_0x5b2420){if(!_0x5b2420)return undefined;try{const _0x319974=await this['getBundle'](_0x5b2420);return _0x319974['latestJourneyId'];}catch{return undefined;}}async['listVersions'](_0x4d31eb){const _0x565540=a131_0x236fe8,_0x1205dd=await this[_0x565540(0x9a)](_0x4d31eb),_0x2c232f=_0x1205dd[_0x565540(0x114)][_0x565540(0xad)];if(!_0x2c232f)return{'bundleId':'','bundleName':_0x1205dd[_0x565540(0x114)][_0x565540(0x118)],'bundleDescription':_0x1205dd['attributes'][_0x565540(0xc5)]??null,'latestJourneyId':_0x1205dd['id'],'versions':[synthesizePreBundleVersion(_0x1205dd)]};const _0x38140f=await this[_0x565540(0x105)](_0x2c232f);return{'bundleId':_0x2c232f,'bundleName':_0x38140f[_0x565540(0x118)],'bundleDescription':_0x38140f['description']??null,'latestJourneyId':_0x38140f['latestJourneyId'],'versions':formatVersionsFromBundle(_0x38140f)};}async['createVersion'](_0x9adbbd){const _0x31bd8b=a131_0x236fe8,_0x597888=await this['getJourney'](_0x9adbbd),_0x42ba23=_0x597888[_0x31bd8b(0x114)][_0x31bd8b(0xad)];if(!_0x42ba23)throw new SDKError(ErrorCode[_0x31bd8b(0x10e)],_0x31bd8b(0x92));await this[_0x31bd8b(0x90)][_0x31bd8b(0xf9)](_0x42ba23);const _0x399ee4=await this[_0x31bd8b(0x90)][_0x31bd8b(0xe4)](_0x42ba23),_0x4a6e66=_0x399ee4[_0x31bd8b(0x118)]+'\x20v'+(_0x399ee4[_0x31bd8b(0xdd)]+0x1);return this[_0x31bd8b(0x90)][_0x31bd8b(0xcf)](_0x42ba23,{'sourceId':_0x9adbbd,'attributes':{'name':_0x4a6e66}});}}
1
+ const a131_0x42d19c=a131_0x28e5;(function(_0x47cf8f,_0x48cc88){const _0x2a713a=a131_0x28e5,_0x888a00=_0x47cf8f();while(!![]){try{const _0xb391f3=parseInt(_0x2a713a(0x174))/0x1+parseInt(_0x2a713a(0x169))/0x2*(parseInt(_0x2a713a(0x1bf))/0x3)+parseInt(_0x2a713a(0x1c3))/0x4+-parseInt(_0x2a713a(0x1c6))/0x5+-parseInt(_0x2a713a(0x1d6))/0x6+-parseInt(_0x2a713a(0x1d1))/0x7+-parseInt(_0x2a713a(0x1ac))/0x8*(-parseInt(_0x2a713a(0x1c9))/0x9);if(_0xb391f3===_0x48cc88)break;else _0x888a00['push'](_0x888a00['shift']());}catch(_0xba56a6){_0x888a00['push'](_0x888a00['shift']());}}}(a131_0xc1f9,0x64c80));import{CDPApiClient}from'./client/cdp-api-client.js';function a131_0x28e5(_0x113465,_0x48f2fa){_0x113465=_0x113465-0x152;const _0xc1f90c=a131_0xc1f9();let _0x28e539=_0xc1f90c[_0x113465];return _0x28e539;}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x2908ac){const _0x237a64=a131_0x28e5;return _0x2908ac[_0x237a64(0x18a)]??_0x2908ac[_0x237a64(0x195)]?.[_0x237a64(0x18a)]??undefined;}function getVersionNumber(_0x226834){const _0x5e9138=a131_0x28e5;return _0x226834['versionNumber']??_0x226834[_0x5e9138(0x195)]?.['versionNumber']??0x0;}function getState(_0x20a8bf){const _0x1d80dc=a131_0x28e5;return _0x20a8bf[_0x1d80dc(0x166)]??_0x20a8bf[_0x1d80dc(0x195)]?.[_0x1d80dc(0x166)];}export function deduplicateJourneysByBundle(_0x57562a){const _0x3e4d1b=a131_0x28e5,_0x2ff0e1=new Map();let _0x4c6cee=0x0;for(const _0x315ec2 of _0x57562a){const _0x12db2b=getBundleId(_0x315ec2);if(!_0x12db2b){const _0x4d2442='no-bundle-'+(_0x315ec2['id']??_0x3e4d1b(0x1a6)+_0x4c6cee++);_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x4d2442,_0x315ec2);continue;}const _0xc5eb6a=_0x2ff0e1['get'](_0x12db2b);if(!_0xc5eb6a)_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x12db2b,_0x315ec2);else{const _0x157583=getState(_0xc5eb6a)==='launched',_0x4c9d02=getState(_0x315ec2)===_0x3e4d1b(0x17d);if(_0x4c9d02&&!_0x157583)_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x12db2b,_0x315ec2);else{if(!_0x4c9d02&&_0x157583){}else{const _0x18ab2e=getVersionNumber(_0xc5eb6a),_0x37cc58=getVersionNumber(_0x315ec2);_0x37cc58>_0x18ab2e&&_0x2ff0e1['set'](_0x12db2b,_0x315ec2);}}}}return Array[_0x3e4d1b(0x1d0)](_0x2ff0e1[_0x3e4d1b(0x183)]());}const VALID_JOURNEY_STATES=new Set([a131_0x42d19c(0x19d),a131_0x42d19c(0x16e),a131_0x42d19c(0x17d)]);function a131_0xc1f9(){const _0x198515=['variants','getBundle','listEntitiesByFolder','goalInflux','string','createActivation','exitOrJumpSize','DecisionPoint','idx-','createJourneyVersion','intime_goal','listJourneyActivations','journeyId','goalSize','57464SieBjc','resumeJourney','listJourneysWithDetailsFromParentSegment','fixed','out','Wait','history','pauseJourney','updatedAt','set','_exit_','sort','push','getJourneyBundle','audienceId','outtime_journey','flat','listJourneys','relationships','276XjgMmk','activation','completionRate','Journey\x20not\x20found:\x20','210560aYvbNn','pause','waitCondition','442595ypCDSP','getJourneyActivation','resolveJourneyId','576tNIxQH','milestone','Journey\x20activation\x20step\x20not\x20found:\x20','activationStepsById','cdp_audience_','time','fetchTrafficRaw','from','1001504TTKJIn','createJourney','\x20in\x20journey\x20','name','applyVersionDeduplication','3093516HQHGtv','checkJourneyAppendable','JOURNEY_NOT_FOUND','step','create','conditions','getConversionSankeyChart','journey','listJourneysFromParentSegment','INVALID_ARGUMENT','journeyBundleName','resume','reduce','cdp_customer_id','listJourneysWithDetails','replace','latestJourneyId','createJourneyActivation','has','AbTest','getJourney','steps','lastVersionNumber','entryCriteria','intime_journey','toLowerCase','versionNumber','conditionSegmentId','segmentId','includeHistory','getParentSegmentFull','length','listSegmentFolders','rootFolderId','limit','exitCriteria','isArray','state','listVersions','filter','90suGuWX','update','get','entries','excluded','simulation','outtime_stage_','includeAllVersions','enteredSize','folder-segment','getActivation','643485fGgYOc','getStatistics','paused','conversion','add','getActivationSankeyChart','type','milestoneInflux','exitCriterias','launched','getTrafficData','description','updateJourney','all','journeyStageId','values','journeyStages','parentFolder','intime_stage_','getJourneyStatistics','exit_criteria','createdAt','journeyBundleId','size','exitInflux','segmentFolderId','goal','NOT_FOUND','map','timedOutPath','Excluded\x20profiles','client','WaitStep','attributes','listActivations','entryInflux','branch','variant','data','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listJourneysWithFolders','draft'];a131_0xc1f9=function(){return _0x198515;};return a131_0xc1f9();}export function parseJourneyState(_0x21cb36){const _0x26d59e=a131_0x42d19c;if(typeof _0x21cb36===_0x26d59e(0x1a2)&&VALID_JOURNEY_STATES[_0x26d59e(0x153)](_0x21cb36))return _0x21cb36;return _0x26d59e(0x19d);}export function entityToJourneyListItem(_0x4facc1,_0xa6c57){const _0xd1742=a131_0x42d19c,_0x54ec34=_0x4facc1['attributes'];return{'id':_0x4facc1['id'],'name':_0x54ec34['name']??'','journeyBundleName':_0x54ec34[_0xd1742(0x1e0)]??_0x54ec34['name']??'','journeyBundleId':_0x54ec34['journeyBundleId']??'','versionNumber':_0x54ec34[_0xd1742(0x15b)],'description':_0x54ec34[_0xd1742(0x17f)]??null,'state':parseJourneyState(_0x54ec34[_0xd1742(0x166)]),'paused':_0x54ec34[_0xd1742(0x176)]??![],'audienceId':_0xa6c57,'folderId':_0x54ec34[_0xd1742(0x18d)]??_0x4facc1[_0xd1742(0x1be)]?.[_0xd1742(0x185)]?.[_0xd1742(0x19a)]?.['id']??null,'createdAt':_0x54ec34['createdAt']??'','updatedAt':_0x54ec34['updatedAt']??''};}function convertToColumnId(_0x3070b9){const _0x55c6f1=a131_0x42d19c;return _0x3070b9[_0x55c6f1(0x1e5)](/-/g,'_');}function getStepEntries(_0x45200f){const _0x554ed1=a131_0x42d19c;if(!_0x45200f)return[];if(Array[_0x554ed1(0x165)](_0x45200f))return _0x45200f['map'](_0x356dbe=>[_0x356dbe['id'],_0x356dbe]);return Object[_0x554ed1(0x16c)](_0x45200f);}export function flattenJourneyActivation(_0x3c2635){const {activationParams:_0x4f6803,activationId:_0x33c5b3,runAfterJourneyRefresh:_0x3e8785}=_0x3c2635['attributes'];return{'id':_0x3c2635['id'],'activationId':_0x33c5b3,'runAfterJourneyRefresh':_0x3e8785,..._0x4f6803};}function col(_0x18ce61,_0x5450c7={}){const _0x21484c=a131_0x42d19c;return{'column':_0x18ce61,'direction':null,'stageIndex':null,'stageName':null,'category':_0x21484c(0x1af),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x5450c7};}export function generateColumnMapping(_0x14b9c0){const _0x220d64=a131_0x42d19c,_0x38f4a8=[];_0x38f4a8['push'](col(_0x220d64(0x1e3))),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x159),{'direction':'in','category':_0x220d64(0x1dd)})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x1bb),{'direction':'out','category':_0x220d64(0x1dd)}));_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x18e)]&&_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x1a8),{'direction':'in','category':'goal','detail':_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x18e)]['name']||null}));const _0x267830=_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x184)]||[];for(let _0x24caa7=0x0;_0x24caa7<_0x267830[_0x220d64(0x160)];_0x24caa7++){const _0x39a48b=_0x267830[_0x24caa7],_0x1cad82=_0x39a48b[_0x220d64(0x1d4)],_0x3c372d={'stageIndex':_0x24caa7,'stageName':_0x1cad82},_0x3d3de3=_0x39a48b[_0x220d64(0x158)]?.[_0x220d64(0x1d4)]||null;_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7,{..._0x3c372d,'direction':'in','category':'stage','detail':_0x3d3de3})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x16f)+_0x24caa7,{..._0x3c372d,'direction':'out','category':'stage','detail':_0x3d3de3}));_0x39a48b[_0x220d64(0x1ca)]&&_0x38f4a8['push'](col('intime_stage_'+_0x24caa7+'_milestone',{..._0x3c372d,'direction':'in','category':_0x220d64(0x1ca),'detail':_0x39a48b['milestone'][_0x220d64(0x1d4)]||null}));const _0x5de34d=_0x39a48b[_0x220d64(0x17c)]||_0x39a48b[_0x220d64(0x164)]||[];for(let _0x5b543c=0x0;_0x5b543c<_0x5de34d[_0x220d64(0x160)];_0x5b543c++){_0x38f4a8[_0x220d64(0x1b8)](col('intime_stage_'+_0x24caa7+_0x220d64(0x1b6)+_0x5b543c,{..._0x3c372d,'direction':'in','category':_0x220d64(0x188),'detail':_0x5de34d[_0x5b543c][_0x220d64(0x1d4)]||null}));}const _0x537eed=getStepEntries(_0x39a48b[_0x220d64(0x156)]);for(const [_0xf1bf64,_0x3ba90b]of _0x537eed){const _0x1d6fde=convertToColumnId(_0xf1bf64),_0x3d93a3=_0x3ba90b['type']||null,_0x4df92f=_0x3ba90b['name']||null,_0x544f7c={..._0x3c372d,'stepType':_0x3d93a3,'stepName':_0x4df92f,'stepId':_0xf1bf64};_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde,{..._0x544f7c,'direction':'in','category':_0x220d64(0x1d9)})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x16f)+_0x24caa7+'_'+_0x1d6fde,{..._0x544f7c,'direction':_0x220d64(0x1b0),'category':_0x220d64(0x1d9)}));if(_0x3ba90b['type']===_0x220d64(0x1a5)&&_0x3ba90b['branches'])for(const _0x20896d of _0x3ba90b['branches']){_0x20896d[_0x220d64(0x15d)]&&_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_'+_0x20896d['segmentId'],{..._0x544f7c,'direction':'in','category':_0x220d64(0x198),'detail':_0x20896d[_0x220d64(0x1d4)]||(_0x20896d[_0x220d64(0x16d)]?_0x220d64(0x192):null)}));}if((_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x154)||_0x3ba90b['type']==='ABTest')&&_0x3ba90b[_0x220d64(0x19e)])for(const _0x3a74dc of _0x3ba90b[_0x220d64(0x19e)]){_0x3a74dc['id']&&_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_variant_'+convertToColumnId(_0x3a74dc['id']),{..._0x544f7c,'direction':'in','category':_0x220d64(0x199),'detail':_0x3a74dc[_0x220d64(0x1d4)]||null}));}if(_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x194)||_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x1b1)){const _0xb377fa=[];if(_0x3ba90b[_0x220d64(0x15c)])_0xb377fa[_0x220d64(0x1b8)](_0x3ba90b[_0x220d64(0x15c)]);else{if(Array[_0x220d64(0x165)](_0x3ba90b[_0x220d64(0x1db)]))for(const _0x17c0ea of _0x3ba90b['conditions']){_0x17c0ea[_0x220d64(0x15d)]&&!_0x17c0ea[_0x220d64(0x191)]&&_0xb377fa[_0x220d64(0x1b8)](_0x17c0ea[_0x220d64(0x15d)]);}else _0x3ba90b[_0x220d64(0x1c5)]?.[_0x220d64(0x15d)]&&_0xb377fa[_0x220d64(0x1b8)](_0x3ba90b['waitCondition']['segmentId']);}for(const _0x3654a0 of _0xb377fa){_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_'+_0x3654a0,{..._0x544f7c,'direction':'in','category':'branch'}));}}}}return _0x38f4a8['push'](col(_0x220d64(0x1ce))),_0x38f4a8;}export function aggregateJourneyHistory(_0x478a8f){const _0x5d2a3e=a131_0x42d19c,_0xa73703=_0x478a8f[_0x5d2a3e(0x1e2)]((_0x2ae3b7,_0x8704cc)=>_0x2ae3b7+(_0x8704cc[_0x5d2a3e(0x197)]??0x0),0x0),_0x2d2151=_0x478a8f['reduce']((_0x42a663,_0x2c371c)=>_0x42a663+(_0x2c371c[_0x5d2a3e(0x1a1)]??0x0),0x0),_0x43cbb1=_0x478a8f[_0x5d2a3e(0x1e2)]((_0x6ecf11,_0x6117ab)=>_0x6ecf11+((_0x6117ab[_0x5d2a3e(0x18c)]??0x0)+(_0x6117ab['jumpInflux']??0x0)),0x0),_0x25446f=_0x478a8f[_0x478a8f['length']-0x1];return{'size':_0x25446f?.['size']??0x0,'entered':_0xa73703,'goal_achieved':_0x2d2151,'completion_rate':_0x2d2151&&_0xa73703?_0x2d2151/_0xa73703*0x64:0x0,'exit_or_jump':_0x43cbb1,'exit_or_jump_rate':_0x43cbb1&&_0xa73703?_0x43cbb1/_0xa73703*0x64:0x0};}export function aggregateStageHistory(_0x3a3694){const _0x1b7ac0=a131_0x42d19c,_0x23c099=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x2eea00,_0x13150c)=>_0x2eea00+(_0x13150c[_0x1b7ac0(0x197)]??0x0),0x0),_0x158ce8=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x4cef17,_0x47f3e3)=>_0x4cef17+(_0x47f3e3[_0x1b7ac0(0x17b)]??0x0),0x0),_0x49abe0=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x14d02c,_0x2ee6fa)=>_0x14d02c+((_0x2ee6fa['exitInflux']??0x0)+(_0x2ee6fa['jumpInflux']??0x0)),0x0),_0x75d4fc=_0x3a3694[_0x3a3694[_0x1b7ac0(0x160)]-0x1];return{'size':_0x75d4fc?.['size']??0x0,'entered':_0x23c099,'milestone':_0x158ce8,'milestone_rate':_0x158ce8&&_0x23c099?_0x158ce8/_0x23c099*0x64:0x0,'exit_or_jump':_0x49abe0,'exit_or_jump_rate':_0x49abe0&&_0x23c099?_0x49abe0/_0x23c099*0x64:0x0};}export function assembleJourneyStats(_0x53d056,_0x3094f5){const _0x313a1c=a131_0x42d19c,_0x31e7d9=!!(_0x3094f5?.[_0x313a1c(0x1d0)]||_0x3094f5?.['to'])&&!!_0x53d056[_0x313a1c(0x1b2)]?.[_0x313a1c(0x160)];if(_0x31e7d9){const _0x7ffb8f=aggregateJourneyHistory(_0x53d056['history']),_0x54669d={'journey_id':_0x53d056[_0x313a1c(0x1aa)],..._0x3094f5?.['from']&&{'from':_0x3094f5[_0x313a1c(0x1d0)]},..._0x3094f5?.['to']&&{'to':_0x3094f5['to']},..._0x7ffb8f};return _0x3094f5?.[_0x313a1c(0x15e)]&&(_0x54669d['history']=_0x53d056[_0x313a1c(0x1b2)]),_0x54669d;}return{'journey_id':_0x53d056[_0x313a1c(0x1aa)],'size':_0x53d056[_0x313a1c(0x18b)],'entered':_0x53d056[_0x313a1c(0x171)],'goal_achieved':_0x53d056[_0x313a1c(0x1ab)],'completion_rate':_0x53d056[_0x313a1c(0x1c1)],'exit_or_jump':_0x53d056[_0x313a1c(0x1a4)],'exit_or_jump_rate':_0x53d056['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x4c9d9c){const _0x403c25=a131_0x42d19c,_0x2ff74a=_0x4c9d9c['journeys']['map'](_0x3633cd=>({'journeyId':_0x3633cd['id'],'versionNumber':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x15b)]??0x0,'name':_0x3633cd[_0x403c25(0x195)]['name'],'state':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x166)],'paused':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x176)],'createdAt':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x189)],'updatedAt':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x1b4)]}));return _0x2ff74a[_0x403c25(0x1b7)]((_0xa8a6ca,_0x389356)=>_0xa8a6ca['versionNumber']-_0x389356['versionNumber']),_0x2ff74a;}export function synthesizePreBundleVersion(_0x18cfa1){const _0x2a4417=a131_0x42d19c;return{'journeyId':_0x18cfa1['id'],'versionNumber':0x1,'name':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x1d4)],'state':_0x18cfa1['attributes']['state'],'paused':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x176)],'createdAt':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x189)],'updatedAt':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x1b4)]};}export function buildStageNameMap(_0x4eb127){const _0x12e473=a131_0x42d19c;return new Map(_0x4eb127[_0x12e473(0x195)][_0x12e473(0x184)]?.[_0x12e473(0x190)](_0x11e158=>[_0x11e158['id'],_0x11e158[_0x12e473(0x1d4)]])??[]);}export class JourneySDK{[a131_0x42d19c(0x193)];constructor(_0x35cbc8){const _0x39298c=a131_0x42d19c;this[_0x39298c(0x193)]=new CDPApiClient(_0x35cbc8);}[a131_0x42d19c(0x1d5)](_0x26ec5e,_0x349cf3){return _0x349cf3?_0x26ec5e:deduplicateJourneysByBundle(_0x26ec5e);}async['listJourneysWithDetails'](_0x15cc3f,_0x46002c){const _0x3d8b72=a131_0x42d19c;try{const _0x5f1040=await this[_0x3d8b72(0x193)][_0x3d8b72(0x1e4)](_0x15cc3f);return{'journeys':this[_0x3d8b72(0x1d5)](_0x5f1040['journeys'],_0x46002c),'activationStepsById':_0x5f1040[_0x3d8b72(0x1cc)]};}catch(_0x490f64){if(isHttp404Error(_0x490f64))return{'journeys':[],'activationStepsById':new Map()};throw _0x490f64;}}async[a131_0x42d19c(0x1de)](_0x4288ae,_0x4e07ba,_0x5c2df8){const _0x3a73da=a131_0x42d19c;let _0x39e9da=_0x4e07ba;if(!_0x39e9da)try{const _0x82c596=await this[_0x3a73da(0x193)][_0x3a73da(0x15f)](_0x4288ae);_0x39e9da=_0x82c596[_0x3a73da(0x162)]??undefined;}catch(_0x14d71f){if(isHttp404Error(_0x14d71f))return[];throw _0x14d71f;}if(!_0x39e9da)return[];let _0x526eca;if(_0x5c2df8?.[_0x3a73da(0x170)]){const _0x528073=await this[_0x3a73da(0x193)][_0x3a73da(0x161)](_0x4288ae),_0x1f3f0b=_0x528073['map'](_0x2e8f0f=>this['client'][_0x3a73da(0x1bd)](_0x2e8f0f['id'])),_0x38c3d8=await Promise[_0x3a73da(0x181)](_0x1f3f0b),_0x3a2843=new Set();_0x526eca=_0x38c3d8[_0x3a73da(0x1bc)]()[_0x3a73da(0x168)](_0x74850b=>{const _0x55af71=_0x3a73da;if(_0x3a2843[_0x55af71(0x153)](_0x74850b['id']))return![];return _0x3a2843[_0x55af71(0x178)](_0x74850b['id']),!![];});}else{const _0x270e9b=await this[_0x3a73da(0x193)]['listEntitiesByFolder'](_0x39e9da,0x20,![]),_0x39e33c=_0x270e9b[_0x3a73da(0x19a)],_0x48c222=_0x39e33c[_0x3a73da(0x168)](_0x2c0625=>_0x2c0625['type']===_0x3a73da(0x1dd));_0x526eca=_0x48c222[_0x3a73da(0x190)](_0x47a5a1=>entityToJourneyListItem(_0x47a5a1,_0x4288ae));}return this['applyVersionDeduplication'](_0x526eca,_0x5c2df8?.['includeAllVersions']);}async[a131_0x42d19c(0x19c)](_0x43b979,_0x4f90c0,_0x5976c2){const _0x5104b5=a131_0x42d19c;if(!_0x4f90c0)return{'journeys':[],'folders':[]};const _0x46d2eb=await this[_0x5104b5(0x193)][_0x5104b5(0x1a0)](_0x4f90c0,0x20,![]),_0x20fd06=_0x46d2eb['data'],_0x59af69=_0x20fd06[_0x5104b5(0x168)](_0x3e31bd=>_0x3e31bd[_0x5104b5(0x17a)]===_0x5104b5(0x172)&&_0x3e31bd['id']!==_0x4f90c0),_0x3c1fa0=_0x59af69[_0x5104b5(0x190)](_0x5348e5=>({'id':_0x5348e5['id'],'name':_0x5348e5['attributes']['name']})),_0x4fd3e4=_0x20fd06[_0x5104b5(0x168)](_0x42b24c=>_0x42b24c[_0x5104b5(0x17a)]===_0x5104b5(0x1dd)),_0x91e3b=_0x4fd3e4[_0x5104b5(0x190)](_0x86d901=>entityToJourneyListItem(_0x86d901,_0x43b979));return{'journeys':this[_0x5104b5(0x1d5)](_0x91e3b,_0x5976c2?.[_0x5104b5(0x170)]),'folders':_0x3c1fa0};}async[a131_0x42d19c(0x1ae)](_0x22c88b,_0x37c009){const _0x22779c=a131_0x42d19c;let _0xc2394b;try{_0xc2394b=await this[_0x22779c(0x193)]['listSegmentFolders'](_0x22c88b);}catch(_0x1d8555){if(isHttp404Error(_0x1d8555))return{'journeys':[],'activationStepsById':new Map()};throw _0x1d8555;}const _0x304962=_0xc2394b[_0x22779c(0x190)](async _0xb0a200=>{const _0x591ef9=_0x22779c;return await this[_0x591ef9(0x1e4)](_0xb0a200['id'],_0x37c009?.[_0x591ef9(0x170)]);}),_0x44e068=await Promise['all'](_0x304962),_0x4be3a8=new Map(),_0x5937cc=[];for(const _0x5b2c7a of _0x44e068){_0x5937cc[_0x22779c(0x1b8)](..._0x5b2c7a['journeys']);for(const [_0x474995,_0x198eed]of _0x5b2c7a[_0x22779c(0x1cc)]){_0x4be3a8[_0x22779c(0x1b5)](_0x474995,_0x198eed);}}const _0x11e4b5=new Set(),_0x19bcc0=_0x5937cc[_0x22779c(0x168)](_0x2b5ec5=>{const _0x4fdf10=_0x22779c;if(_0x11e4b5[_0x4fdf10(0x153)](_0x2b5ec5['id']))return![];return _0x11e4b5[_0x4fdf10(0x178)](_0x2b5ec5['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x19bcc0,_0x37c009?.['includeAllVersions']),'activationStepsById':_0x4be3a8};}async[a131_0x42d19c(0x155)](_0x1266c1){const _0x3b8d10=a131_0x42d19c;try{return await this[_0x3b8d10(0x193)][_0x3b8d10(0x155)](_0x1266c1);}catch(_0x2782b7){if(isHttp404Error(_0x2782b7))throw new SDKError(ErrorCode[_0x3b8d10(0x1d8)],_0x3b8d10(0x1c2)+_0x1266c1,_0x2782b7);throw _0x2782b7;}}async[a131_0x42d19c(0x1c8)](_0x4ffc19,_0x303f96){const _0x1f4aa3=a131_0x42d19c,_0x418e9a=await this[_0x1f4aa3(0x1de)](_0x4ffc19),_0x57c942=_0x418e9a['find'](_0x1b89a2=>_0x1b89a2['journeyBundleName'][_0x1f4aa3(0x15a)]()===_0x303f96['toLowerCase']());if(!_0x57c942)throw new SDKError(ErrorCode[_0x1f4aa3(0x1d8)],_0x1f4aa3(0x1c2)+_0x303f96,undefined,{'helpText':_0x1f4aa3(0x19b)});return _0x57c942['id'];}async[a131_0x42d19c(0x175)](_0x4344cf,_0x2b162c){const _0x2bc145=a131_0x42d19c;try{return await this['client'][_0x2bc145(0x187)](_0x4344cf,_0x2b162c);}catch(_0xa99e8c){if(isHttp404Error(_0xa99e8c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x2bc145(0x1c2)+_0x4344cf,_0xa99e8c);throw _0xa99e8c;}}async[a131_0x42d19c(0x17e)](_0x582438,_0x5b0f58){const _0x40ae49=a131_0x42d19c,_0x49edc4={'from':_0x5b0f58?.[_0x40ae49(0x1d0)],'to':_0x5b0f58?.['to'],'limit':_0x5b0f58?.[_0x40ae49(0x163)]},_0x234dee=_0x5b0f58?.[_0x40ae49(0x17a)]!==_0x40ae49(0x177);try{const [_0x4bc475,_0x574bae]=await Promise[_0x40ae49(0x181)]([this[_0x40ae49(0x1cf)](_0x582438,_0x5b0f58?.['type'],_0x49edc4),_0x234dee?this[_0x40ae49(0x155)](_0x582438):undefined]);if(_0x4bc475[_0x40ae49(0x1c0)]&&_0x574bae){const _0xb67fc1=buildStageNameMap(_0x574bae);_0x4bc475['activation']=_0x4bc475[_0x40ae49(0x1c0)]['map'](_0x49879d=>({..._0x49879d,'journeyStageName':_0xb67fc1[_0x40ae49(0x16b)](_0x49879d[_0x40ae49(0x182)])??_0x49879d[_0x40ae49(0x182)]}));}return _0x4bc475;}catch(_0x599a19){if(isHttp404Error(_0x599a19))throw new SDKError(ErrorCode[_0x40ae49(0x1d8)],'Journey\x20not\x20found:\x20'+_0x582438,_0x599a19);throw _0x599a19;}}async[a131_0x42d19c(0x1cf)](_0xfd4d64,_0x2e6b0d,_0xa462d7){const _0x3d1a8c=a131_0x42d19c;if(_0x2e6b0d===_0x3d1a8c(0x177)){const _0x25b4cb=await this['client'][_0x3d1a8c(0x1dc)](_0xfd4d64,_0xa462d7);return{'conversion':_0x25b4cb};}if(_0x2e6b0d==='activation'){const _0x407959=await this['client']['getActivationSankeyChart'](_0xfd4d64,_0xa462d7);return{'activation':_0x407959};}const [_0x518b03,_0x255846]=await Promise['all']([this[_0x3d1a8c(0x193)][_0x3d1a8c(0x1dc)](_0xfd4d64,_0xa462d7),this['client'][_0x3d1a8c(0x179)](_0xfd4d64,_0xa462d7)]);return{'conversion':_0x518b03,'activation':_0x255846};}async[a131_0x42d19c(0x1c4)](_0x56dadb){const _0x425c5f=a131_0x42d19c;try{return await this[_0x425c5f(0x193)][_0x425c5f(0x1b3)](_0x56dadb);}catch(_0x1bea49){if(isHttp404Error(_0x1bea49))throw new SDKError(ErrorCode[_0x425c5f(0x1d8)],'Journey\x20not\x20found:\x20'+_0x56dadb,_0x1bea49);throw _0x1bea49;}}async[a131_0x42d19c(0x1e1)](_0x61efb7){const _0x271b00=a131_0x42d19c;try{return await this[_0x271b00(0x193)][_0x271b00(0x1ad)](_0x61efb7);}catch(_0x2bc19f){if(isHttp404Error(_0x2bc19f))throw new SDKError(ErrorCode[_0x271b00(0x1d8)],_0x271b00(0x1c2)+_0x61efb7,_0x2bc19f);throw _0x2bc19f;}}async[a131_0x42d19c(0x1da)](_0x440cdd){const _0x37b40c=a131_0x42d19c;return await this[_0x37b40c(0x193)][_0x37b40c(0x1d2)](_0x440cdd);}async[a131_0x42d19c(0x16a)](_0x3ee353,_0x2e7fbb){const _0x2386d9=a131_0x42d19c;try{return await this[_0x2386d9(0x193)][_0x2386d9(0x180)](_0x3ee353,_0x2e7fbb);}catch(_0x351624){if(isHttp404Error(_0x351624))throw new SDKError(ErrorCode[_0x2386d9(0x1d8)],'Journey\x20not\x20found:\x20'+_0x3ee353,_0x351624);throw _0x351624;}}async[a131_0x42d19c(0x173)](_0x451a4c,_0xa00778){const _0x5dbc9=a131_0x42d19c;try{return await this[_0x5dbc9(0x193)][_0x5dbc9(0x1c7)](_0x451a4c,_0xa00778);}catch(_0x414bff){if(isHttp404Error(_0x414bff))throw new SDKError(ErrorCode[_0x5dbc9(0x18f)],_0x5dbc9(0x1cb)+_0xa00778+_0x5dbc9(0x1d3)+_0x451a4c,_0x414bff);throw _0x414bff;}}async[a131_0x42d19c(0x196)](_0x1f3fbd){const _0x3f3409=a131_0x42d19c;try{return await this[_0x3f3409(0x193)][_0x3f3409(0x1a9)](_0x1f3fbd);}catch(_0x3c3d25){if(isHttp404Error(_0x3c3d25))return[];throw _0x3c3d25;}}async['listActivationsFlat'](_0x190c34){const _0x224b4a=a131_0x42d19c,_0x1bfe0f=await this[_0x224b4a(0x196)](_0x190c34);return _0x1bfe0f[_0x224b4a(0x190)](flattenJourneyActivation);}async[a131_0x42d19c(0x1a3)](_0x5de8e1,_0x12429e){const _0x44e157=a131_0x42d19c;return await this[_0x44e157(0x193)][_0x44e157(0x152)](_0x5de8e1,_0x12429e);}async['getColumnMapping'](_0x1292b9){const _0x3449e9=a131_0x42d19c,_0x3d64b4=await this['getJourney'](_0x1292b9),_0x27dcf6=generateColumnMapping(_0x3d64b4);return{'journeyId':_0x3d64b4['id'],'journeyName':_0x3d64b4[_0x3449e9(0x195)]['name'],'database':_0x3449e9(0x1cd)+_0x3d64b4[_0x3449e9(0x195)][_0x3449e9(0x1ba)],'table':'journey_'+_0x3d64b4['id'],'columns':_0x27dcf6};}async['getBundle'](_0x4f80c7){const _0x18aabb=a131_0x42d19c;return this[_0x18aabb(0x193)]['getJourneyBundle'](_0x4f80c7);}async['getLatestJourneyId'](_0x440873){const _0x453577=a131_0x42d19c;if(!_0x440873)return undefined;try{const _0x566ddd=await this[_0x453577(0x19f)](_0x440873);return _0x566ddd[_0x453577(0x1e6)];}catch{return undefined;}}async[a131_0x42d19c(0x167)](_0x400c18){const _0x21b5c4=a131_0x42d19c,_0x397deb=await this[_0x21b5c4(0x155)](_0x400c18),_0x274685=_0x397deb[_0x21b5c4(0x195)]['journeyBundleId'];if(!_0x274685)return{'bundleId':'','bundleName':_0x397deb['attributes'][_0x21b5c4(0x1d4)],'bundleDescription':_0x397deb[_0x21b5c4(0x195)][_0x21b5c4(0x17f)]??null,'latestJourneyId':_0x397deb['id'],'versions':[synthesizePreBundleVersion(_0x397deb)]};const _0x5ef6df=await this['getBundle'](_0x274685);return{'bundleId':_0x274685,'bundleName':_0x5ef6df[_0x21b5c4(0x1d4)],'bundleDescription':_0x5ef6df['description']??null,'latestJourneyId':_0x5ef6df[_0x21b5c4(0x1e6)],'versions':formatVersionsFromBundle(_0x5ef6df)};}async['createVersion'](_0x1fe5b1){const _0x3202f5=a131_0x42d19c,_0x382599=await this[_0x3202f5(0x155)](_0x1fe5b1),_0x2754d1=_0x382599['attributes'][_0x3202f5(0x18a)];if(!_0x2754d1)throw new SDKError(ErrorCode[_0x3202f5(0x1df)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x3202f5(0x193)][_0x3202f5(0x1d7)](_0x2754d1);const _0x203240=await this['client'][_0x3202f5(0x1b9)](_0x2754d1),_0x33f397=_0x203240['name']+'\x20v'+(_0x203240[_0x3202f5(0x157)]+0x1);return this[_0x3202f5(0x193)][_0x3202f5(0x1a7)](_0x2754d1,{'sourceId':_0x1fe5b1,'attributes':{'name':_0x33f397}});}}
@@ -1 +1 @@
1
- const a132_0x1b0700=a132_0x3d6f;function a132_0x3d6f(_0x205ffc,_0x5342ed){_0x205ffc=_0x205ffc-0x1ea;const _0x1ca9a1=a132_0x1ca9();let _0x3d6f60=_0x1ca9a1[_0x205ffc];return _0x3d6f60;}(function(_0x35adf8,_0x1591f6){const _0x1afffb=a132_0x3d6f,_0x83340=_0x35adf8();while(!![]){try{const _0x4db566=-parseInt(_0x1afffb(0x1eb))/0x1+parseInt(_0x1afffb(0x1ed))/0x2+parseInt(_0x1afffb(0x1f1))/0x3+-parseInt(_0x1afffb(0x1f5))/0x4*(parseInt(_0x1afffb(0x1ec))/0x5)+-parseInt(_0x1afffb(0x1f4))/0x6*(parseInt(_0x1afffb(0x1f0))/0x7)+parseInt(_0x1afffb(0x1f3))/0x8+parseInt(_0x1afffb(0x1ea))/0x9*(parseInt(_0x1afffb(0x1ee))/0xa);if(_0x4db566===_0x1591f6)break;else _0x83340['push'](_0x83340['shift']());}catch(_0x38696e){_0x83340['push'](_0x83340['shift']());}}}(a132_0x1ca9,0x854d7));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id',a132_0x1b0700(0x1ef));export function saveLastChatId(_0x55c6c8){chatIdCache['write'](_0x55c6c8);}export function loadLastChatId(){return chatIdCache['read']();}function a132_0x1ca9(){const _0x21ddc2=['98NTheoS','19812aKnVXv','clear','3093840gHWGXB','182244HZZBRa','69136xlWdNZ','4302aPCcEj','86608KyAaLW','295TjkEwq','441274NCoJlS','30620ScEYyA','llm/chat'];a132_0x1ca9=function(){return _0x21ddc2;};return a132_0x1ca9();}export function clearLastChatId(){const _0xc8b2fe=a132_0x1b0700;chatIdCache[_0xc8b2fe(0x1f2)]();}
1
+ function a132_0x4129(_0x56d388,_0x20d74c){_0x56d388=_0x56d388-0x1cd;const _0x393798=a132_0x3937();let _0x412980=_0x393798[_0x56d388];return _0x412980;}const a132_0x4787c6=a132_0x4129;(function(_0x6c5e3b,_0x4a72c3){const _0x2e10a9=a132_0x4129,_0x24887c=_0x6c5e3b();while(!![]){try{const _0x2bb5db=-parseInt(_0x2e10a9(0x1d8))/0x1+-parseInt(_0x2e10a9(0x1d7))/0x2+-parseInt(_0x2e10a9(0x1d0))/0x3*(-parseInt(_0x2e10a9(0x1d1))/0x4)+-parseInt(_0x2e10a9(0x1cf))/0x5+-parseInt(_0x2e10a9(0x1d5))/0x6+-parseInt(_0x2e10a9(0x1d9))/0x7+parseInt(_0x2e10a9(0x1cd))/0x8*(parseInt(_0x2e10a9(0x1ce))/0x9);if(_0x2bb5db===_0x4a72c3)break;else _0x24887c['push'](_0x24887c['shift']());}catch(_0x1c8413){_0x24887c['push'](_0x24887c['shift']());}}}(a132_0x3937,0x3cfed));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x4787c6(0x1d3),a132_0x4787c6(0x1d6));export function saveLastChatId(_0x135590){const _0x1d6c82=a132_0x4787c6;chatIdCache[_0x1d6c82(0x1d2)](_0x135590);}export function loadLastChatId(){return chatIdCache['read']();}function a132_0x3937(){const _0x2f7e66=['822922ejxPHk','217641ozWJlz','3328535mNzGUu','48CHlBwY','3060846bcRrxQ','2014485kBArNM','407457WQYuCu','4xalsoi','write','last_chat_id','clear','2514252lPCXcz','llm/chat'];a132_0x3937=function(){return _0x2f7e66;};return a132_0x3937();}export function clearLastChatId(){const _0x93929b=a132_0x4787c6;chatIdCache[_0x93929b(0x1d4)]();}