@treasuredata/tdx 2026.4.18 → 2026.4.19

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 (252) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-command.d.ts +38 -0
  27. package/dist/commands/engage-command.d.ts.map +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/engage-command.js.map +1 -1
  30. package/dist/commands/engage-template-pull-command.js +1 -1
  31. package/dist/commands/engage-template-push-command.js +1 -1
  32. package/dist/commands/engage-template-validate-command.js +1 -1
  33. package/dist/commands/job-command.js +1 -1
  34. package/dist/commands/journey-command.js +1 -1
  35. package/dist/commands/journey-validate-command.js +1 -1
  36. package/dist/commands/llm-command.js +1 -1
  37. package/dist/commands/mcp-command.js +1 -1
  38. package/dist/commands/parent-segment-command.js +1 -1
  39. package/dist/commands/policy-command.js +1 -1
  40. package/dist/commands/profile-command.js +1 -1
  41. package/dist/commands/profiles-command.js +1 -1
  42. package/dist/commands/query-command.js +1 -1
  43. package/dist/commands/schedule-command.js +1 -1
  44. package/dist/commands/segment-command.js +1 -1
  45. package/dist/commands/segment-create-command.js +1 -1
  46. package/dist/commands/segment-fields-command.js +1 -1
  47. package/dist/commands/segment-pull-command.js +1 -1
  48. package/dist/commands/segment-push-command.js +1 -1
  49. package/dist/commands/segment-update-command.js +1 -1
  50. package/dist/commands/segment-use-command.js +1 -1
  51. package/dist/commands/segment-validate-command.js +1 -1
  52. package/dist/commands/segments.js +1 -1
  53. package/dist/commands/show.js +1 -1
  54. package/dist/commands/status-command.js +1 -1
  55. package/dist/commands/tables.js +1 -1
  56. package/dist/commands/unset-command.js +1 -1
  57. package/dist/commands/upgrade-command.js +1 -1
  58. package/dist/commands/use-command.js +1 -1
  59. package/dist/commands/user-command.js +1 -1
  60. package/dist/commands/work-command.js +1 -1
  61. package/dist/commands/workflow-command.js +1 -1
  62. package/dist/core/auth.js +1 -1
  63. package/dist/core/command-output.js +1 -1
  64. package/dist/core/config.js +1 -1
  65. package/dist/core/connection-cache.js +1 -1
  66. package/dist/core/constants.js +1 -1
  67. package/dist/core/credential-cache.js +1 -1
  68. package/dist/core/global-context.js +1 -1
  69. package/dist/core/keychain.js +1 -1
  70. package/dist/core/oauth-keychain.js +1 -1
  71. package/dist/core/oauth.js +1 -1
  72. package/dist/core/profile.js +1 -1
  73. package/dist/core/project-config.js +1 -1
  74. package/dist/core/session.js +1 -1
  75. package/dist/core/user-cache.js +1 -1
  76. package/dist/core/version.js +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/mcp/server.js +1 -1
  79. package/dist/mcp/tools/index.js +1 -1
  80. package/dist/mcp/tools/tdx-run.js +1 -1
  81. package/dist/mcp/tools/tdx-search.js +1 -1
  82. package/dist/mcp/tools/work-create-item.js +1 -1
  83. package/dist/mcp/utils.js +1 -1
  84. package/dist/proxy/claude-usage-tracker.js +1 -1
  85. package/dist/proxy/passthrough-server.js +1 -1
  86. package/dist/proxy/sse-usage-parser.js +1 -1
  87. package/dist/sdk/agent/agent-config.js +1 -1
  88. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  89. package/dist/sdk/agent/agent-yaml.js +1 -1
  90. package/dist/sdk/agent/test/evaluator.js +1 -1
  91. package/dist/sdk/agent/test/executor.js +1 -1
  92. package/dist/sdk/agent/test/index.js +1 -1
  93. package/dist/sdk/agent/test/output.js +1 -1
  94. package/dist/sdk/agent/test/parser.js +1 -1
  95. package/dist/sdk/agent/tool-target-registry.js +1 -1
  96. package/dist/sdk/api.js +1 -1
  97. package/dist/sdk/cas/cas-api-client.js +1 -1
  98. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  99. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  100. package/dist/sdk/cas/index.js +1 -1
  101. package/dist/sdk/cas/pull-workflow.js +1 -1
  102. package/dist/sdk/cas/push-workflow.js +1 -1
  103. package/dist/sdk/client/cdp-api-client.js +1 -1
  104. package/dist/sdk/client/delivery-api-client.js +1 -1
  105. package/dist/sdk/client/endpoints.js +1 -1
  106. package/dist/sdk/client/engage-api-client.d.ts +26 -1
  107. package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
  108. package/dist/sdk/client/engage-api-client.js +1 -1
  109. package/dist/sdk/client/engage-api-client.js.map +1 -1
  110. package/dist/sdk/client/http-client.d.ts +1 -1
  111. package/dist/sdk/client/http-client.d.ts.map +1 -1
  112. package/dist/sdk/client/http-client.js +1 -1
  113. package/dist/sdk/client/http-client.js.map +1 -1
  114. package/dist/sdk/client/llm-api-client.js +1 -1
  115. package/dist/sdk/client/oauth-refresh.js +1 -1
  116. package/dist/sdk/client/rate-limiter.js +1 -1
  117. package/dist/sdk/client/td-api-client.js +1 -1
  118. package/dist/sdk/client/trino-api-client.js +1 -1
  119. package/dist/sdk/client/workflow-client.js +1 -1
  120. package/dist/sdk/connection-validator.js +1 -1
  121. package/dist/sdk/connection.js +1 -1
  122. package/dist/sdk/delivery.js +1 -1
  123. package/dist/sdk/engage/campaign-pull.js +1 -1
  124. package/dist/sdk/engage/campaign-push.js +1 -1
  125. package/dist/sdk/engage/campaign-validator.js +1 -1
  126. package/dist/sdk/engage/campaign-validator.js.map +1 -1
  127. package/dist/sdk/engage/campaign-yaml.d.ts +1 -1
  128. package/dist/sdk/engage/campaign-yaml.d.ts.map +1 -1
  129. package/dist/sdk/engage/campaign-yaml.js +1 -1
  130. package/dist/sdk/engage/campaign-yaml.js.map +1 -1
  131. package/dist/sdk/engage/template-pull.js +1 -1
  132. package/dist/sdk/engage/template-push.js +1 -1
  133. package/dist/sdk/engage/template-validator.js +1 -1
  134. package/dist/sdk/engage/template-yaml.js +1 -1
  135. package/dist/sdk/engage/types/campaign-def.d.ts +2 -2
  136. package/dist/sdk/engage/types/campaign-def.d.ts.map +1 -1
  137. package/dist/sdk/engage/types/campaign-def.js +1 -1
  138. package/dist/sdk/engage/types/campaign-def.js.map +1 -1
  139. package/dist/sdk/engage/types/campaign-schema.d.ts +256 -8
  140. package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
  141. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  142. package/dist/sdk/engage/types/campaign-schema.js.map +1 -1
  143. package/dist/sdk/engage/types/template-schema.js +1 -1
  144. package/dist/sdk/engage.d.ts +28 -1
  145. package/dist/sdk/engage.d.ts.map +1 -1
  146. package/dist/sdk/engage.js +1 -1
  147. package/dist/sdk/engage.js.map +1 -1
  148. package/dist/sdk/errors.js +1 -1
  149. package/dist/sdk/index.d.ts +1 -1
  150. package/dist/sdk/index.d.ts.map +1 -1
  151. package/dist/sdk/index.js +1 -1
  152. package/dist/sdk/index.js.map +1 -1
  153. package/dist/sdk/io/index.js +1 -1
  154. package/dist/sdk/io/node-filesystem.js +1 -1
  155. package/dist/sdk/job.js +1 -1
  156. package/dist/sdk/journey.js +1 -1
  157. package/dist/sdk/llm/chat-cache.js +1 -1
  158. package/dist/sdk/llm/index.js +1 -1
  159. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  160. package/dist/sdk/llm/model-factors.js +1 -1
  161. package/dist/sdk/personalization.js +1 -1
  162. package/dist/sdk/policy.js +1 -1
  163. package/dist/sdk/query/index.js +1 -1
  164. package/dist/sdk/query/sql-parser.js +1 -1
  165. package/dist/sdk/realtime.js +1 -1
  166. package/dist/sdk/schedule.js +1 -1
  167. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  168. package/dist/sdk/segment/fields-display.js +1 -1
  169. package/dist/sdk/segment/file-discovery.js +1 -1
  170. package/dist/sdk/segment/journey-utils.js +1 -1
  171. package/dist/sdk/segment/journey-validator.js +1 -1
  172. package/dist/sdk/segment/journey-yaml.js +1 -1
  173. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  174. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  175. package/dist/sdk/segment/pull-workflow.js +1 -1
  176. package/dist/sdk/segment/push-recovery.js +1 -1
  177. package/dist/sdk/segment/push-workflow.js +1 -1
  178. package/dist/sdk/segment/resolution-context.js +1 -1
  179. package/dist/sdk/segment/segment-path-parser.js +1 -1
  180. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  181. package/dist/sdk/segment/segment-validator.js +1 -1
  182. package/dist/sdk/segment/target-resolution.js +1 -1
  183. package/dist/sdk/segment/tdx-config.js +1 -1
  184. package/dist/sdk/segment/types/activation-schema.js +1 -1
  185. package/dist/sdk/segment/types/journey-def.js +1 -1
  186. package/dist/sdk/segment/types/journey-schema.js +1 -1
  187. package/dist/sdk/segment/types/segment-def.js +1 -1
  188. package/dist/sdk/segment/types/segment-schema.js +1 -1
  189. package/dist/sdk/segment/validate-files.js +1 -1
  190. package/dist/sdk/segment/yaml-validator.js +1 -1
  191. package/dist/sdk/segment.js +1 -1
  192. package/dist/sdk/types/engage.d.ts +125 -1
  193. package/dist/sdk/types/engage.d.ts.map +1 -1
  194. package/dist/sdk/types/index.d.ts +1 -1
  195. package/dist/sdk/types/index.d.ts.map +1 -1
  196. package/dist/sdk/types/index.js +1 -1
  197. package/dist/sdk/types/index.js.map +1 -1
  198. package/dist/sdk/types/progress.js +1 -1
  199. package/dist/sdk/types/workspace.js +1 -1
  200. package/dist/sdk/user.js +1 -1
  201. package/dist/sdk/util/format-detector.js +1 -1
  202. package/dist/sdk/util/formatters.js +1 -1
  203. package/dist/sdk/util/index.js +1 -1
  204. package/dist/sdk/util/paginate.js +1 -1
  205. package/dist/sdk/util/tree-formatter.js +1 -1
  206. package/dist/sdk/workflow/archive-validation.js +1 -1
  207. package/dist/sdk/workflow/clone-workflow.js +1 -1
  208. package/dist/sdk/workflow/index.js +1 -1
  209. package/dist/sdk/workflow/pull-workflow.js +1 -1
  210. package/dist/sdk/workflow/push-workflow.js +1 -1
  211. package/dist/sdk/workflow/tdx-config.js +1 -1
  212. package/dist/sdk/workflow/workflow-utils.js +1 -1
  213. package/dist/sdk/workspace/access-tracker.js +1 -1
  214. package/dist/sdk/workspace/frontmatter.js +1 -1
  215. package/dist/sdk/workspace/git.js +1 -1
  216. package/dist/sdk/workspace/index.js +1 -1
  217. package/dist/sdk/workspace/templates.js +1 -1
  218. package/dist/sdk/workspace/weekly.js +1 -1
  219. package/dist/sdk/workspace/wikilinks.js +1 -1
  220. package/dist/test-utils/command-runner.js +1 -1
  221. package/dist/test-utils/factories.js +1 -1
  222. package/dist/test-utils/fixtures.js +1 -1
  223. package/dist/test-utils/http-mock.js +1 -1
  224. package/dist/test-utils/index.js +1 -1
  225. package/dist/utils/async.js +1 -1
  226. package/dist/utils/colors.js +1 -1
  227. package/dist/utils/diff.js +1 -1
  228. package/dist/utils/file-permissions.js +1 -1
  229. package/dist/utils/file-reader.js +1 -1
  230. package/dist/utils/github-releases.js +1 -1
  231. package/dist/utils/global-cache.js +1 -1
  232. package/dist/utils/json-loader.js +1 -1
  233. package/dist/utils/local-cache.js +1 -1
  234. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  235. package/dist/utils/logger/formatters/index.js +1 -1
  236. package/dist/utils/logger/handlers/console-handler.js +1 -1
  237. package/dist/utils/logger/handlers/file-handler.js +1 -1
  238. package/dist/utils/logger/handlers/index.js +1 -1
  239. package/dist/utils/logger/handlers/null-handler.js +1 -1
  240. package/dist/utils/logger/index.js +1 -1
  241. package/dist/utils/logger/logger.js +1 -1
  242. package/dist/utils/logger/types.js +1 -1
  243. package/dist/utils/option-validation.js +1 -1
  244. package/dist/utils/process.js +1 -1
  245. package/dist/utils/prompt.js +1 -1
  246. package/dist/utils/spinner.js +1 -1
  247. package/dist/utils/sse-parser.js +1 -1
  248. package/dist/utils/string-utils.js +1 -1
  249. package/dist/utils/table-ref-parser.js +1 -1
  250. package/dist/utils/tdx-logger.js +1 -1
  251. package/dist/utils/version-check.js +1 -1
  252. package/package.json +1 -1
@@ -1 +1 @@
1
- const a128_0x143fc2=a128_0x16e4;function a128_0x2ebd(){const _0x1cb6fd=['6465288iovHQJ','1720694GwMuvG','3484904cNvryU','4490286ppmPnH','5207166bVpdSa','12799661AVAaNV','434921vRHhdx','mkdir','utf-8','isDirectory','readFile','isFile','writeFileSync','stat','unlink','5KabuoZ','readdir','unlinkSync','mkdirSync','readdirSync','9nKlwRi','readFileSync','existsSync'];a128_0x2ebd=function(){return _0x1cb6fd;};return a128_0x2ebd();}(function(_0x4542b8,_0x248e67){const _0x59e2b0=a128_0x16e4,_0x285565=_0x4542b8();while(!![]){try{const _0x5a6186=-parseInt(_0x59e2b0(0xff))/0x1+-parseInt(_0x59e2b0(0xfa))/0x2+parseInt(_0x59e2b0(0xfd))/0x3+-parseInt(_0x59e2b0(0xf9))/0x4*(parseInt(_0x59e2b0(0xf1))/0x5)+parseInt(_0x59e2b0(0xfc))/0x6+parseInt(_0x59e2b0(0xfe))/0x7+-parseInt(_0x59e2b0(0xfb))/0x8*(parseInt(_0x59e2b0(0xf6))/0x9);if(_0x5a6186===_0x248e67)break;else _0x285565['push'](_0x285565['shift']());}catch(_0x5b5ab0){_0x285565['push'](_0x285565['shift']());}}}(a128_0x2ebd,0xebb2f));function a128_0x16e4(_0x200512,_0x46add1){_0x200512=_0x200512-0xed;const _0x2ebde8=a128_0x2ebd();let _0x16e43c=_0x2ebde8[_0x200512];return _0x16e43c;}import*as a128_0x4a9293 from'node:fs';import*as a128_0x428f2f from'node:fs/promises';export const nodeFileSystem={'readFile':_0xf7d89f=>a128_0x428f2f[a128_0x143fc2(0x103)](_0xf7d89f,a128_0x143fc2(0x101)),'writeFile':(_0x2e709d,_0x1e3ff7)=>a128_0x428f2f['writeFile'](_0x2e709d,_0x1e3ff7,a128_0x143fc2(0x101)),'exists':async _0x12669a=>{try{return await a128_0x428f2f['access'](_0x12669a),!![];}catch{return![];}},'mkdir':async(_0x529821,_0x4a6089)=>{const _0x1387c8=a128_0x143fc2;await a128_0x428f2f[_0x1387c8(0x100)](_0x529821,_0x4a6089);},'readdir':_0x10f2b7=>a128_0x428f2f[a128_0x143fc2(0xf2)](_0x10f2b7),'stat':async _0xc39f5c=>{const _0x150441=a128_0x143fc2,_0x241192=await a128_0x428f2f[_0x150441(0xef)](_0xc39f5c);return{'isDirectory':()=>_0x241192[_0x150441(0x102)](),'isFile':()=>_0x241192[_0x150441(0xed)]()};},'unlink':_0x1ac578=>a128_0x428f2f[a128_0x143fc2(0xf0)](_0x1ac578)};export const nodeFileSystemSync={'readFileSync':_0x5c9737=>a128_0x4a9293[a128_0x143fc2(0xf7)](_0x5c9737,'utf-8'),'writeFileSync':(_0xb92bd3,_0x4ee32f)=>a128_0x4a9293[a128_0x143fc2(0xee)](_0xb92bd3,_0x4ee32f,a128_0x143fc2(0x101)),'existsSync':_0x4cf1d6=>a128_0x4a9293[a128_0x143fc2(0xf8)](_0x4cf1d6),'mkdirSync':(_0x4d2702,_0x1946bd)=>{const _0x1ce99d=a128_0x143fc2;a128_0x4a9293[_0x1ce99d(0xf4)](_0x4d2702,_0x1946bd);},'readdirSync':_0x4a3fbc=>a128_0x4a9293[a128_0x143fc2(0xf5)](_0x4a3fbc),'statSync':_0x2d1a57=>{const _0x3694f4=a128_0x143fc2,_0x3179ca=a128_0x4a9293['statSync'](_0x2d1a57);return{'isDirectory':()=>_0x3179ca['isDirectory'](),'isFile':()=>_0x3179ca[_0x3694f4(0xed)]()};},'unlinkSync':_0x3dd59f=>a128_0x4a9293[a128_0x143fc2(0xf3)](_0x3dd59f)};
1
+ const a128_0x2f01f8=a128_0x2321;(function(_0x2a24ad,_0x434c02){const _0x18571f=a128_0x2321,_0x3fd1bb=_0x2a24ad();while(!![]){try{const _0x38da2c=-parseInt(_0x18571f(0xb3))/0x1+-parseInt(_0x18571f(0xb4))/0x2+parseInt(_0x18571f(0xac))/0x3*(-parseInt(_0x18571f(0xa6))/0x4)+parseInt(_0x18571f(0xae))/0x5+parseInt(_0x18571f(0xa7))/0x6*(parseInt(_0x18571f(0xb2))/0x7)+-parseInt(_0x18571f(0xb7))/0x8+parseInt(_0x18571f(0xbb))/0x9*(parseInt(_0x18571f(0xb8))/0xa);if(_0x38da2c===_0x434c02)break;else _0x3fd1bb['push'](_0x3fd1bb['shift']());}catch(_0x289562){_0x3fd1bb['push'](_0x3fd1bb['shift']());}}}(a128_0x2e11,0x7ddec));import*as a128_0x2cde65 from'node:fs';import*as a128_0x508fbf from'node:fs/promises';function a128_0x2e11(){const _0x6fbf2a=['mkdir','2067357EnyPPn','writeFileSync','722700xdeLcA','statSync','unlink','utf-8','77KEhURP','442814EEaZkr','259438rSKqbE','stat','writeFile','5847400OHDmmo','20XBdgLM','isFile','isDirectory','10145313Zvomml','unlinkSync','4daokmG','59502hOVLsA','existsSync','mkdirSync','readdir'];a128_0x2e11=function(){return _0x6fbf2a;};return a128_0x2e11();}export const nodeFileSystem={'readFile':_0x2f54b6=>a128_0x508fbf['readFile'](_0x2f54b6,a128_0x2f01f8(0xb1)),'writeFile':(_0x7a482f,_0x4665d8)=>a128_0x508fbf[a128_0x2f01f8(0xb6)](_0x7a482f,_0x4665d8,a128_0x2f01f8(0xb1)),'exists':async _0x56a224=>{try{return await a128_0x508fbf['access'](_0x56a224),!![];}catch{return![];}},'mkdir':async(_0x5a066b,_0xf7e9ef)=>{const _0x2ff36f=a128_0x2f01f8;await a128_0x508fbf[_0x2ff36f(0xab)](_0x5a066b,_0xf7e9ef);},'readdir':_0x5020f5=>a128_0x508fbf[a128_0x2f01f8(0xaa)](_0x5020f5),'stat':async _0x1fc8bf=>{const _0x597018=a128_0x2f01f8,_0x20a4fb=await a128_0x508fbf[_0x597018(0xb5)](_0x1fc8bf);return{'isDirectory':()=>_0x20a4fb[_0x597018(0xba)](),'isFile':()=>_0x20a4fb['isFile']()};},'unlink':_0x10d51c=>a128_0x508fbf[a128_0x2f01f8(0xb0)](_0x10d51c)};function a128_0x2321(_0x48d650,_0x779f94){_0x48d650=_0x48d650-0xa6;const _0x2e1132=a128_0x2e11();let _0x2321e2=_0x2e1132[_0x48d650];return _0x2321e2;}export const nodeFileSystemSync={'readFileSync':_0x539cd1=>a128_0x2cde65['readFileSync'](_0x539cd1,a128_0x2f01f8(0xb1)),'writeFileSync':(_0x4930dd,_0x1caa00)=>a128_0x2cde65[a128_0x2f01f8(0xad)](_0x4930dd,_0x1caa00,a128_0x2f01f8(0xb1)),'existsSync':_0x535e5f=>a128_0x2cde65[a128_0x2f01f8(0xa8)](_0x535e5f),'mkdirSync':(_0x4f2ded,_0x518ad2)=>{const _0x5e489c=a128_0x2f01f8;a128_0x2cde65[_0x5e489c(0xa9)](_0x4f2ded,_0x518ad2);},'readdirSync':_0x5a3481=>a128_0x2cde65['readdirSync'](_0x5a3481),'statSync':_0x421f6f=>{const _0x3f0a48=a128_0x2f01f8,_0x1eb6a3=a128_0x2cde65[_0x3f0a48(0xaf)](_0x421f6f);return{'isDirectory':()=>_0x1eb6a3['isDirectory'](),'isFile':()=>_0x1eb6a3[_0x3f0a48(0xb9)]()};},'unlinkSync':_0x3d7785=>a128_0x2cde65[a128_0x2f01f8(0xbc)](_0x3d7785)};
package/dist/sdk/job.js CHANGED
@@ -1 +1 @@
1
- function a130_0xa313(){const _0x498b1c=['replace','758940pSIiha','709284FvCyjl','287148stXOGo','end_at','result','created_at','trino','1000920HXZAke','cancelJob','listJobs','468072jsRwvX','getJobResult','getUserInfo','updated_at','showJob','list','745902dGNkwb','submitHiveJob','14HVAWMG','submit','hive','\x20UTC','start_at','test','6082872EInsif','client','show','submitPrestoJob'];a130_0xa313=function(){return _0x498b1c;};return a130_0xa313();}const a130_0x13728c=a130_0x437f;function a130_0x437f(_0x348d44,_0x44574f){_0x348d44=_0x348d44-0x153;const _0xa313a2=a130_0xa313();let _0x437fb1=_0xa313a2[_0x348d44];return _0x437fb1;}(function(_0x2e9aa6,_0xd0a835){const _0x2d7e07=a130_0x437f,_0x134973=_0x2e9aa6();while(!![]){try{const _0x19d25e=parseInt(_0x2d7e07(0x169))/0x1+-parseInt(_0x2d7e07(0x154))/0x2+-parseInt(_0x2d7e07(0x16e))/0x3+-parseInt(_0x2d7e07(0x168))/0x4+parseInt(_0x2d7e07(0x167))/0x5+parseInt(_0x2d7e07(0x15a))/0x6*(-parseInt(_0x2d7e07(0x15c))/0x7)+parseInt(_0x2d7e07(0x162))/0x8;if(_0x19d25e===_0xd0a835)break;else _0x134973['push'](_0x134973['shift']());}catch(_0x3b0763){_0x134973['push'](_0x134973['shift']());}}}(a130_0xa313,0x32360));import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x3fe580){const _0x259159=a130_0x437f;if(!_0x3fe580)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x259159(0x161)](_0x3fe580))return _0x3fe580;return _0x3fe580[_0x259159(0x166)](_0x259159(0x15f),'Z')[_0x259159(0x166)]('\x20','T');}export class JobSDK{['client'];constructor(_0x19ea26){const _0x2f8503=a130_0x437f;this[_0x2f8503(0x163)]=new TDApiClient(_0x19ea26);}async[a130_0x13728c(0x159)](_0x35899c){const _0x163c6f=a130_0x13728c,_0x2dad99=await this[_0x163c6f(0x163)][_0x163c6f(0x153)](_0x35899c);return _0x2dad99['map'](_0x3c0ea4=>({..._0x3c0ea4,'created_at':normalizeTimestamp(_0x3c0ea4[_0x163c6f(0x16c)]),'updated_at':normalizeTimestamp(_0x3c0ea4[_0x163c6f(0x157)]),'start_at':normalizeTimestamp(_0x3c0ea4[_0x163c6f(0x160)]),'end_at':normalizeTimestamp(_0x3c0ea4[_0x163c6f(0x16a)])}));}async[a130_0x13728c(0x164)](_0x203d1b){const _0x4d7eb9=a130_0x13728c,_0x1f0cfb=await this['client'][_0x4d7eb9(0x158)](_0x203d1b);return{..._0x1f0cfb,'created_at':normalizeTimestamp(_0x1f0cfb[_0x4d7eb9(0x16c)]),'updated_at':normalizeTimestamp(_0x1f0cfb[_0x4d7eb9(0x157)]),'start_at':normalizeTimestamp(_0x1f0cfb[_0x4d7eb9(0x160)]),'end_at':normalizeTimestamp(_0x1f0cfb[_0x4d7eb9(0x16a)])};}async['kill'](_0x27a443){const _0x16fc62=a130_0x13728c;await this[_0x16fc62(0x163)][_0x16fc62(0x16f)](_0x27a443);}async[a130_0x13728c(0x15d)](_0x399163,_0x47f28c,_0x4fb18d=a130_0x13728c(0x16d),_0x2dad9b){const _0x4b1150=a130_0x13728c;return _0x4fb18d===_0x4b1150(0x15e)?await this[_0x4b1150(0x163)][_0x4b1150(0x15b)](_0x399163,_0x47f28c,_0x2dad9b):await this[_0x4b1150(0x163)][_0x4b1150(0x165)](_0x399163,_0x47f28c,_0x2dad9b);}async[a130_0x13728c(0x16b)](_0x118dba){const _0x309534=a130_0x13728c;return await this[_0x309534(0x163)][_0x309534(0x155)](_0x118dba);}async['getUserInfo'](){const _0x3c33e4=a130_0x13728c;return await this['client'][_0x3c33e4(0x156)]();}}
1
+ function a130_0x232d(_0x58a09b,_0x28de4b){_0x58a09b=_0x58a09b-0xd2;const _0x2f2a53=a130_0x2f2a();let _0x232dec=_0x2f2a53[_0x58a09b];return _0x232dec;}function a130_0x2f2a(){const _0x43119c=['kill','submit','submitPrestoJob','469979MRwrNY','listJobs','2239240JSPozx','getUserInfo','42wKUyvG','78918DuoRJG','result','list','created_at','2ZnVXpr','updated_at','197530KdPCAK','36TSPoGu','client','23341318gQgbeG','trino','hive','581104cIyOHG','start_at','test','submitHiveJob','cancelJob','207510aujHrl','24OwyfoJ'];a130_0x2f2a=function(){return _0x43119c;};return a130_0x2f2a();}const a130_0x120906=a130_0x232d;(function(_0x294491,_0x3d8739){const _0x240ba0=a130_0x232d,_0x189eba=_0x294491();while(!![]){try{const _0x2a2410=-parseInt(_0x240ba0(0xd7))/0x1*(parseInt(_0x240ba0(0xe0))/0x2)+parseInt(_0x240ba0(0xd2))/0x3*(-parseInt(_0x240ba0(0xd3))/0x4)+-parseInt(_0x240ba0(0xd9))/0x5+-parseInt(_0x240ba0(0xdc))/0x6+-parseInt(_0x240ba0(0xdb))/0x7*(parseInt(_0x240ba0(0xe8))/0x8)+-parseInt(_0x240ba0(0xe3))/0x9*(-parseInt(_0x240ba0(0xe2))/0xa)+parseInt(_0x240ba0(0xe5))/0xb;if(_0x2a2410===_0x3d8739)break;else _0x189eba['push'](_0x189eba['shift']());}catch(_0x11cc4b){_0x189eba['push'](_0x189eba['shift']());}}}(a130_0x2f2a,0x66532));import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x5dbcfc){const _0x2aecc7=a130_0x232d;if(!_0x5dbcfc)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x2aecc7(0xea)](_0x5dbcfc))return _0x5dbcfc;return _0x5dbcfc['replace']('\x20UTC','Z')['replace']('\x20','T');}export class JobSDK{[a130_0x120906(0xe4)];constructor(_0x42bacf){const _0x22758f=a130_0x120906;this[_0x22758f(0xe4)]=new TDApiClient(_0x42bacf);}async[a130_0x120906(0xde)](_0x104173){const _0x2e202d=a130_0x120906,_0x4d7e95=await this[_0x2e202d(0xe4)][_0x2e202d(0xd8)](_0x104173);return _0x4d7e95['map'](_0x40cc10=>({..._0x40cc10,'created_at':normalizeTimestamp(_0x40cc10[_0x2e202d(0xdf)]),'updated_at':normalizeTimestamp(_0x40cc10[_0x2e202d(0xe1)]),'start_at':normalizeTimestamp(_0x40cc10[_0x2e202d(0xe9)]),'end_at':normalizeTimestamp(_0x40cc10['end_at'])}));}async['show'](_0x4383fb){const _0x37bc7e=a130_0x120906,_0x21f55d=await this[_0x37bc7e(0xe4)]['showJob'](_0x4383fb);return{..._0x21f55d,'created_at':normalizeTimestamp(_0x21f55d['created_at']),'updated_at':normalizeTimestamp(_0x21f55d[_0x37bc7e(0xe1)]),'start_at':normalizeTimestamp(_0x21f55d[_0x37bc7e(0xe9)]),'end_at':normalizeTimestamp(_0x21f55d['end_at'])};}async[a130_0x120906(0xd4)](_0x3dcbb2){const _0x29c770=a130_0x120906;await this[_0x29c770(0xe4)][_0x29c770(0xec)](_0x3dcbb2);}async[a130_0x120906(0xd5)](_0x3f4918,_0x5c230c,_0x46fb9d=a130_0x120906(0xe6),_0xcec39b){const _0x6fee53=a130_0x120906;return _0x46fb9d===_0x6fee53(0xe7)?await this['client'][_0x6fee53(0xeb)](_0x3f4918,_0x5c230c,_0xcec39b):await this[_0x6fee53(0xe4)][_0x6fee53(0xd6)](_0x3f4918,_0x5c230c,_0xcec39b);}async[a130_0x120906(0xdd)](_0x40555c){return await this['client']['getJobResult'](_0x40555c);}async[a130_0x120906(0xda)](){const _0x56cb6f=a130_0x120906;return await this[_0x56cb6f(0xe4)][_0x56cb6f(0xda)]();}}
@@ -1 +1 @@
1
- function a131_0x5a2a(){const _0x54cdfd=['createJourney','set','size','limit','_variant_','find','conditions','getParentSegmentFull','resolveRootFolderId','getBundle','stage','getTrafficData','outtime_journey','branch','outtime_stage_','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listVersions','segmentId','parentFolder','relationships','enteredSize','filter','waitCondition','conditionSegmentId','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','all','getConversionSankeyChart','listActivationsFlat','goalSize','NOT_FOUND','journeyBundleId','51080iasieu','length','4bdHHaT','description','rootFolderId','type','_milestone','jumpInflux','client','getJourneyBundle','getActivationSankeyChart','idx-','isArray','exit_criteria','Journey\x20not\x20found:\x20','state','634699ililBA','journey','toLowerCase','exitCriteria','reduce','entryInflux','variant','from','listJourneysWithDetails','_exit_','update','listEntitiesByFolder','exitOrJumpSize','Excluded\x20profiles','WaitStep','getJourney','intime_journey','createJourneyActivation','listJourneysWithFolders','Journey\x20activation\x20step\x20not\x20found:\x20','milestone','journeyStages','cdp_customer_id','getJourneyStatistics','fetchTrafficRaw','exitInflux','values','getActivation','1212030PtBfAB','exitCriterias','data','step','updatedAt','listActivations','Wait','out','entries','lastVersionNumber','createdAt','pauseJourney','timedOutPath','journeys','simulation','milestoneInflux','paused','resolveJourneyId','history','has','applyVersionDeduplication','launched','activation','excluded','listJourneysFromParentSegment','createActivation','string','latestJourneyId','resume','get','getStatistics','getColumnMapping','folder-segment','1767540WiaqbA','journey_','ABTest','543190rsBrZK','createJourneyVersion','642395zEScCr','journeyBundleName','time','JOURNEY_NOT_FOUND','goal','branches','journeyStageId','segmentFolderId','push','replace','exitOrJumpRate','getLatestJourneyId','intime_stage_','draft','pause','map','1071522OOvlpo','623XHSpbp','includeAllVersions','AbTest','name','attributes','versionNumber','listJourneysWithDetailsFromParentSegment'];a131_0x5a2a=function(){return _0x54cdfd;};return a131_0x5a2a();}const a131_0xe2cd60=a131_0x4a69;(function(_0x9430ae,_0xb49db2){const _0x1c519d=a131_0x4a69,_0x327647=_0x9430ae();while(!![]){try{const _0x29d60b=-parseInt(_0x1c519d(0x1a3))/0x1+parseInt(_0x1c519d(0x1e3))/0x2+-parseInt(_0x1c519d(0x1bf))/0x3+-parseInt(_0x1c519d(0x195))/0x4*(-parseInt(_0x1c519d(0x1e5))/0x5)+parseInt(_0x1c519d(0x1e0))/0x6+parseInt(_0x1c519d(0x1f6))/0x7*(parseInt(_0x1c519d(0x193))/0x8)+parseInt(_0x1c519d(0x1f5))/0x9;if(_0x29d60b===_0xb49db2)break;else _0x327647['push'](_0x327647['shift']());}catch(_0x1fad4c){_0x327647['push'](_0x327647['shift']());}}}(a131_0x5a2a,0x53cee));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x3ce1bd){const _0x8dcd9c=a131_0x4a69;return _0x3ce1bd[_0x8dcd9c(0x192)]??_0x3ce1bd['attributes']?.[_0x8dcd9c(0x192)]??undefined;}function getVersionNumber(_0x5e6606){const _0x21de09=a131_0x4a69;return _0x5e6606['versionNumber']??_0x5e6606['attributes']?.[_0x21de09(0x172)]??0x0;}function getState(_0x1717d2){const _0x26e543=a131_0x4a69;return _0x1717d2[_0x26e543(0x1a2)]??_0x1717d2[_0x26e543(0x171)]?.[_0x26e543(0x1a2)];}export function deduplicateJourneysByBundle(_0x6704bc){const _0x94a45=a131_0x4a69,_0x149d95=new Map();let _0x56a30e=0x0;for(const _0x4507b2 of _0x6704bc){const _0xdcd4da=getBundleId(_0x4507b2);if(!_0xdcd4da){const _0x19a332='no-bundle-'+(_0x4507b2['id']??_0x94a45(0x19e)+_0x56a30e++);_0x149d95[_0x94a45(0x175)](_0x19a332,_0x4507b2);continue;}const _0x53a9f2=_0x149d95[_0x94a45(0x1dc)](_0xdcd4da);if(!_0x53a9f2)_0x149d95[_0x94a45(0x175)](_0xdcd4da,_0x4507b2);else{const _0x48b6d7=getState(_0x53a9f2)==='launched',_0x423fae=getState(_0x4507b2)===_0x94a45(0x1d4);if(_0x423fae&&!_0x48b6d7)_0x149d95[_0x94a45(0x175)](_0xdcd4da,_0x4507b2);else{if(!_0x423fae&&_0x48b6d7){}else{const _0x775a89=getVersionNumber(_0x53a9f2),_0x28727c=getVersionNumber(_0x4507b2);_0x28727c>_0x775a89&&_0x149d95['set'](_0xdcd4da,_0x4507b2);}}}}return Array[_0x94a45(0x1aa)](_0x149d95[_0x94a45(0x1bd)]());}const VALID_JOURNEY_STATES=new Set([a131_0xe2cd60(0x1f2),a131_0xe2cd60(0x1cd),a131_0xe2cd60(0x1d4)]);export function parseJourneyState(_0x2abb6f){const _0x217ab6=a131_0xe2cd60;if(typeof _0x2abb6f===_0x217ab6(0x1d9)&&VALID_JOURNEY_STATES[_0x217ab6(0x1d2)](_0x2abb6f))return _0x2abb6f;return _0x217ab6(0x1f2);}export function entityToJourneyListItem(_0x4740e2,_0x34735b){const _0x38ae26=a131_0xe2cd60,_0x1230ad=_0x4740e2[_0x38ae26(0x171)];return{'id':_0x4740e2['id'],'name':_0x1230ad['name']??'','journeyBundleName':_0x1230ad[_0x38ae26(0x1e6)]??_0x1230ad[_0x38ae26(0x170)]??'','journeyBundleId':_0x1230ad[_0x38ae26(0x192)]??'','versionNumber':_0x1230ad[_0x38ae26(0x172)],'description':_0x1230ad[_0x38ae26(0x196)]??null,'state':parseJourneyState(_0x1230ad[_0x38ae26(0x1a2)]),'paused':_0x1230ad[_0x38ae26(0x1cf)]??![],'audienceId':_0x34735b,'folderId':_0x1230ad[_0x38ae26(0x1ec)]??_0x4740e2[_0x38ae26(0x187)]?.[_0x38ae26(0x186)]?.[_0x38ae26(0x1c1)]?.['id']??null,'createdAt':_0x1230ad[_0x38ae26(0x1c9)]??'','updatedAt':_0x1230ad[_0x38ae26(0x1c3)]??''};}function convertToColumnId(_0x25dc21){const _0x2d9784=a131_0xe2cd60;return _0x25dc21[_0x2d9784(0x1ee)](/-/g,'_');}function getStepEntries(_0x522d28){const _0x18c91c=a131_0xe2cd60;if(!_0x522d28)return[];if(Array[_0x18c91c(0x19f)](_0x522d28))return _0x522d28['map'](_0x4531f3=>[_0x4531f3['id'],_0x4531f3]);return Object[_0x18c91c(0x1c7)](_0x522d28);}export function flattenJourneyActivation(_0x137eee){const _0x25d225=a131_0xe2cd60,{activationParams:_0x3ff015,activationId:_0x357791,runAfterJourneyRefresh:_0x3ee682}=_0x137eee[_0x25d225(0x171)];return{'id':_0x137eee['id'],'activationId':_0x357791,'runAfterJourneyRefresh':_0x3ee682,..._0x3ff015};}function col(_0x20ad2c,_0x391487={}){return{'column':_0x20ad2c,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x391487};}function a131_0x4a69(_0x721c5f,_0x47a0f5){_0x721c5f=_0x721c5f-0x16e;const _0x5a2a30=a131_0x5a2a();let _0x4a69bf=_0x5a2a30[_0x721c5f];return _0x4a69bf;}export function generateColumnMapping(_0x33b21e){const _0xd4d556=a131_0xe2cd60,_0x48de26=[];_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1b9))),_0x48de26['push'](col(_0xd4d556(0x1b3),{'direction':'in','category':'journey'})),_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x180),{'direction':_0xd4d556(0x1c6),'category':_0xd4d556(0x1a4)}));_0x33b21e['attributes'][_0xd4d556(0x1e9)]&&_0x48de26[_0xd4d556(0x1ed)](col('intime_goal',{'direction':'in','category':_0xd4d556(0x1e9),'detail':_0x33b21e[_0xd4d556(0x171)]['goal'][_0xd4d556(0x170)]||null}));const _0x125821=_0x33b21e[_0xd4d556(0x171)][_0xd4d556(0x1b8)]||[];for(let _0x423658=0x0;_0x423658<_0x125821[_0xd4d556(0x194)];_0x423658++){const _0x2f5c9d=_0x125821[_0x423658],_0x4ff038=_0x2f5c9d[_0xd4d556(0x170)],_0x36f736={'stageIndex':_0x423658,'stageName':_0x4ff038},_0xf87f4c=_0x2f5c9d['entryCriteria']?.[_0xd4d556(0x170)]||null;_0x48de26['push'](col(_0xd4d556(0x1f1)+_0x423658,{..._0x36f736,'direction':'in','category':_0xd4d556(0x17e),'detail':_0xf87f4c})),_0x48de26[_0xd4d556(0x1ed)](col('outtime_stage_'+_0x423658,{..._0x36f736,'direction':_0xd4d556(0x1c6),'category':_0xd4d556(0x17e),'detail':_0xf87f4c}));_0x2f5c9d[_0xd4d556(0x1b7)]&&_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1f1)+_0x423658+_0xd4d556(0x199),{..._0x36f736,'direction':'in','category':_0xd4d556(0x1b7),'detail':_0x2f5c9d[_0xd4d556(0x1b7)][_0xd4d556(0x170)]||null}));const _0x43b173=_0x2f5c9d[_0xd4d556(0x1c0)]||_0x2f5c9d[_0xd4d556(0x1a6)]||[];for(let _0x5ae5df=0x0;_0x5ae5df<_0x43b173[_0xd4d556(0x194)];_0x5ae5df++){_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1f1)+_0x423658+_0xd4d556(0x1ac)+_0x5ae5df,{..._0x36f736,'direction':'in','category':_0xd4d556(0x1a0),'detail':_0x43b173[_0x5ae5df][_0xd4d556(0x170)]||null}));}const _0x207185=getStepEntries(_0x2f5c9d['steps']);for(const [_0x5be7e2,_0x4fd14b]of _0x207185){const _0x3e3cf0=convertToColumnId(_0x5be7e2),_0x33899b=_0x4fd14b[_0xd4d556(0x198)]||null,_0x3b1be9=_0x4fd14b[_0xd4d556(0x170)]||null,_0xc15211={..._0x36f736,'stepType':_0x33899b,'stepName':_0x3b1be9,'stepId':_0x5be7e2};_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1f1)+_0x423658+'_'+_0x3e3cf0,{..._0xc15211,'direction':'in','category':_0xd4d556(0x1c2)})),_0x48de26['push'](col(_0xd4d556(0x182)+_0x423658+'_'+_0x3e3cf0,{..._0xc15211,'direction':'out','category':'step'}));if(_0x4fd14b[_0xd4d556(0x198)]==='DecisionPoint'&&_0x4fd14b[_0xd4d556(0x1ea)])for(const _0x3ec4da of _0x4fd14b[_0xd4d556(0x1ea)]){_0x3ec4da[_0xd4d556(0x185)]&&_0x48de26[_0xd4d556(0x1ed)](col('intime_stage_'+_0x423658+'_'+_0x3e3cf0+'_'+_0x3ec4da[_0xd4d556(0x185)],{..._0xc15211,'direction':'in','category':_0xd4d556(0x181),'detail':_0x3ec4da['name']||(_0x3ec4da[_0xd4d556(0x1d6)]?_0xd4d556(0x1b0):null)}));}if((_0x4fd14b[_0xd4d556(0x198)]===_0xd4d556(0x16f)||_0x4fd14b[_0xd4d556(0x198)]===_0xd4d556(0x1e2))&&_0x4fd14b['variants'])for(const _0x10ec12 of _0x4fd14b['variants']){_0x10ec12['id']&&_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1f1)+_0x423658+'_'+_0x3e3cf0+_0xd4d556(0x178)+convertToColumnId(_0x10ec12['id']),{..._0xc15211,'direction':'in','category':_0xd4d556(0x1a9),'detail':_0x10ec12[_0xd4d556(0x170)]||null}));}if(_0x4fd14b[_0xd4d556(0x198)]===_0xd4d556(0x1b1)||_0x4fd14b[_0xd4d556(0x198)]===_0xd4d556(0x1c5)){const _0x3189d5=[];if(_0x4fd14b[_0xd4d556(0x18b)])_0x3189d5[_0xd4d556(0x1ed)](_0x4fd14b['conditionSegmentId']);else{if(Array[_0xd4d556(0x19f)](_0x4fd14b[_0xd4d556(0x17a)]))for(const _0x1ca61e of _0x4fd14b[_0xd4d556(0x17a)]){_0x1ca61e[_0xd4d556(0x185)]&&!_0x1ca61e[_0xd4d556(0x1cb)]&&_0x3189d5['push'](_0x1ca61e[_0xd4d556(0x185)]);}else _0x4fd14b['waitCondition']?.['segmentId']&&_0x3189d5['push'](_0x4fd14b[_0xd4d556(0x18a)][_0xd4d556(0x185)]);}for(const _0x265269 of _0x3189d5){_0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1f1)+_0x423658+'_'+_0x3e3cf0+'_'+_0x265269,{..._0xc15211,'direction':'in','category':_0xd4d556(0x181)}));}}}}return _0x48de26[_0xd4d556(0x1ed)](col(_0xd4d556(0x1e7))),_0x48de26;}export function aggregateJourneyHistory(_0x1e509c){const _0x50fdad=a131_0xe2cd60,_0x3479e0=_0x1e509c[_0x50fdad(0x1a7)]((_0x180df0,_0x4d5b80)=>_0x180df0+(_0x4d5b80[_0x50fdad(0x1a8)]??0x0),0x0),_0x588a6e=_0x1e509c['reduce']((_0x2538e3,_0x418701)=>_0x2538e3+(_0x418701['goalInflux']??0x0),0x0),_0x352e8e=_0x1e509c[_0x50fdad(0x1a7)]((_0x508f50,_0xf0e8b)=>_0x508f50+((_0xf0e8b[_0x50fdad(0x1bc)]??0x0)+(_0xf0e8b[_0x50fdad(0x19a)]??0x0)),0x0),_0x48171b=_0x1e509c[_0x1e509c[_0x50fdad(0x194)]-0x1];return{'size':_0x48171b?.[_0x50fdad(0x176)]??0x0,'entered':_0x3479e0,'goal_achieved':_0x588a6e,'completion_rate':_0x588a6e&&_0x3479e0?_0x588a6e/_0x3479e0*0x64:0x0,'exit_or_jump':_0x352e8e,'exit_or_jump_rate':_0x352e8e&&_0x3479e0?_0x352e8e/_0x3479e0*0x64:0x0};}export function aggregateStageHistory(_0xb8cb38){const _0x3fa653=a131_0xe2cd60,_0x57c24a=_0xb8cb38['reduce']((_0x4188e6,_0x95f24a)=>_0x4188e6+(_0x95f24a[_0x3fa653(0x1a8)]??0x0),0x0),_0x5c4d9e=_0xb8cb38[_0x3fa653(0x1a7)]((_0x1e0131,_0x1ebe79)=>_0x1e0131+(_0x1ebe79[_0x3fa653(0x1ce)]??0x0),0x0),_0x26aab0=_0xb8cb38[_0x3fa653(0x1a7)]((_0x32b801,_0xe0a01d)=>_0x32b801+((_0xe0a01d[_0x3fa653(0x1bc)]??0x0)+(_0xe0a01d[_0x3fa653(0x19a)]??0x0)),0x0),_0x157747=_0xb8cb38[_0xb8cb38['length']-0x1];return{'size':_0x157747?.[_0x3fa653(0x176)]??0x0,'entered':_0x57c24a,'milestone':_0x5c4d9e,'milestone_rate':_0x5c4d9e&&_0x57c24a?_0x5c4d9e/_0x57c24a*0x64:0x0,'exit_or_jump':_0x26aab0,'exit_or_jump_rate':_0x26aab0&&_0x57c24a?_0x26aab0/_0x57c24a*0x64:0x0};}export function assembleJourneyStats(_0x360fb4,_0x449fb8){const _0x34777d=a131_0xe2cd60,_0x1d2381=!!(_0x449fb8?.[_0x34777d(0x1aa)]||_0x449fb8?.['to'])&&!!_0x360fb4[_0x34777d(0x1d1)]?.[_0x34777d(0x194)];if(_0x1d2381){const _0x26a871=aggregateJourneyHistory(_0x360fb4[_0x34777d(0x1d1)]),_0x232d85={'journey_id':_0x360fb4['journeyId'],..._0x449fb8?.[_0x34777d(0x1aa)]&&{'from':_0x449fb8[_0x34777d(0x1aa)]},..._0x449fb8?.['to']&&{'to':_0x449fb8['to']},..._0x26a871};return _0x449fb8?.['includeHistory']&&(_0x232d85[_0x34777d(0x1d1)]=_0x360fb4[_0x34777d(0x1d1)]),_0x232d85;}return{'journey_id':_0x360fb4['journeyId'],'size':_0x360fb4[_0x34777d(0x176)],'entered':_0x360fb4[_0x34777d(0x188)],'goal_achieved':_0x360fb4[_0x34777d(0x190)],'completion_rate':_0x360fb4['completionRate'],'exit_or_jump':_0x360fb4[_0x34777d(0x1af)],'exit_or_jump_rate':_0x360fb4[_0x34777d(0x1ef)]};}export function formatVersionsFromBundle(_0x111403){const _0x534047=a131_0xe2cd60,_0xe27917=_0x111403[_0x534047(0x1cc)][_0x534047(0x1f4)](_0x27b3e8=>({'journeyId':_0x27b3e8['id'],'versionNumber':_0x27b3e8[_0x534047(0x171)]['versionNumber']??0x0,'name':_0x27b3e8[_0x534047(0x171)][_0x534047(0x170)],'state':_0x27b3e8[_0x534047(0x171)][_0x534047(0x1a2)],'paused':_0x27b3e8['attributes']['paused'],'createdAt':_0x27b3e8[_0x534047(0x171)][_0x534047(0x1c9)],'updatedAt':_0x27b3e8[_0x534047(0x171)]['updatedAt']}));return _0xe27917['sort']((_0x3e3107,_0x4a4364)=>_0x3e3107[_0x534047(0x172)]-_0x4a4364[_0x534047(0x172)]),_0xe27917;}export function synthesizePreBundleVersion(_0x5092ac){const _0x571a93=a131_0xe2cd60;return{'journeyId':_0x5092ac['id'],'versionNumber':0x1,'name':_0x5092ac[_0x571a93(0x171)][_0x571a93(0x170)],'state':_0x5092ac['attributes']['state'],'paused':_0x5092ac[_0x571a93(0x171)][_0x571a93(0x1cf)],'createdAt':_0x5092ac['attributes']['createdAt'],'updatedAt':_0x5092ac[_0x571a93(0x171)][_0x571a93(0x1c3)]};}export function buildStageNameMap(_0x1538e5){const _0x9b48ef=a131_0xe2cd60;return new Map(_0x1538e5[_0x9b48ef(0x171)]['journeyStages']?.[_0x9b48ef(0x1f4)](_0x35f95e=>[_0x35f95e['id'],_0x35f95e[_0x9b48ef(0x170)]])??[]);}export class JourneySDK{['client'];constructor(_0x27b59f){const _0x3cbb73=a131_0xe2cd60;this[_0x3cbb73(0x19b)]=new CDPApiClient(_0x27b59f);}[a131_0xe2cd60(0x1d3)](_0x590ad0,_0x50c05f){return _0x50c05f?_0x590ad0:deduplicateJourneysByBundle(_0x590ad0);}async[a131_0xe2cd60(0x17c)](_0x21d04a){const _0x3ff3d7=a131_0xe2cd60,_0x15da7e=await this[_0x3ff3d7(0x19b)][_0x3ff3d7(0x17b)](_0x21d04a);return _0x15da7e[_0x3ff3d7(0x197)]??undefined;}async[a131_0xe2cd60(0x1ab)](_0x4c5547,_0x520e3e){const _0x1f02fb=a131_0xe2cd60;try{const _0x259d48=await this[_0x1f02fb(0x19b)][_0x1f02fb(0x1ab)](_0x4c5547);return{'journeys':this['applyVersionDeduplication'](_0x259d48[_0x1f02fb(0x1cc)],_0x520e3e),'activationStepsById':_0x259d48['activationStepsById']};}catch(_0x21daf5){if(isHttp404Error(_0x21daf5))return{'journeys':[],'activationStepsById':new Map()};throw _0x21daf5;}}async[a131_0xe2cd60(0x1d7)](_0x2757c2,_0x4b269d,_0x17dfae){const _0x2948a2=a131_0xe2cd60;let _0x129754=_0x4b269d;if(!_0x129754)try{_0x129754=await this[_0x2948a2(0x17c)](_0x2757c2);}catch(_0x53e50e){if(isHttp404Error(_0x53e50e))return[];throw _0x53e50e;}if(!_0x129754)return[];let _0x3802d6;if(_0x17dfae?.[_0x2948a2(0x16e)])_0x3802d6=await this[_0x2948a2(0x19b)]['listJourneys'](_0x129754);else{const _0x312b56=await this[_0x2948a2(0x19b)][_0x2948a2(0x1ae)](_0x129754,0x20,![]),_0x240bed=_0x312b56['data'],_0x4c8cce=_0x240bed['filter'](_0xae67db=>_0xae67db[_0x2948a2(0x198)]===_0x2948a2(0x1a4));_0x3802d6=_0x4c8cce[_0x2948a2(0x1f4)](_0x38f877=>entityToJourneyListItem(_0x38f877,_0x2757c2));}return this[_0x2948a2(0x1d3)](_0x3802d6,_0x17dfae?.['includeAllVersions']);}async[a131_0xe2cd60(0x1b5)](_0x2f65eb,_0x2fdcdc,_0x5fc992){const _0xeb9b9=a131_0xe2cd60;if(!_0x2fdcdc)return{'journeys':[],'folders':[]};const _0x5e8ec5=await this['client'][_0xeb9b9(0x1ae)](_0x2fdcdc,0x20,![]),_0x402c90=_0x5e8ec5['data'],_0x42f205=_0x402c90[_0xeb9b9(0x189)](_0xf00940=>_0xf00940[_0xeb9b9(0x198)]===_0xeb9b9(0x1df)&&_0xf00940['id']!==_0x2fdcdc),_0x35f22e=_0x42f205[_0xeb9b9(0x1f4)](_0x2990ac=>({'id':_0x2990ac['id'],'name':_0x2990ac[_0xeb9b9(0x171)][_0xeb9b9(0x170)]})),_0x2201c6=_0x402c90['filter'](_0x359ffa=>_0x359ffa['type']===_0xeb9b9(0x1a4)),_0x184907=_0x2201c6[_0xeb9b9(0x1f4)](_0x456d56=>entityToJourneyListItem(_0x456d56,_0x2f65eb));return{'journeys':this[_0xeb9b9(0x1d3)](_0x184907,_0x5fc992?.['includeAllVersions']),'folders':_0x35f22e};}async[a131_0xe2cd60(0x173)](_0x48fb92,_0x49b28e){const _0x5a4a18=a131_0xe2cd60;let _0x5ec6f8;try{_0x5ec6f8=await this[_0x5a4a18(0x17c)](_0x48fb92);}catch(_0x37d104){if(isHttp404Error(_0x37d104))return{'journeys':[],'activationStepsById':new Map()};throw _0x37d104;}if(!_0x5ec6f8)return{'journeys':[],'activationStepsById':new Map()};const _0x5686af=await this[_0x5a4a18(0x1ab)](_0x5ec6f8,_0x49b28e?.[_0x5a4a18(0x16e)]);return{'journeys':this['applyVersionDeduplication'](_0x5686af[_0x5a4a18(0x1cc)],_0x49b28e?.['includeAllVersions']),'activationStepsById':_0x5686af['activationStepsById']};}async[a131_0xe2cd60(0x1b2)](_0x18762d){const _0x59c2f7=a131_0xe2cd60;try{return await this[_0x59c2f7(0x19b)][_0x59c2f7(0x1b2)](_0x18762d);}catch(_0x303b76){if(isHttp404Error(_0x303b76))throw new SDKError(ErrorCode[_0x59c2f7(0x1e8)],_0x59c2f7(0x1a1)+_0x18762d,_0x303b76);throw _0x303b76;}}async[a131_0xe2cd60(0x1d0)](_0x1ee296,_0x474051){const _0x334721=a131_0xe2cd60,_0x3a1c5a=await this[_0x334721(0x1d7)](_0x1ee296),_0x12e126=_0x3a1c5a[_0x334721(0x179)](_0xa15082=>_0xa15082[_0x334721(0x1e6)][_0x334721(0x1a5)]()===_0x474051[_0x334721(0x1a5)]());if(!_0x12e126)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x474051,undefined,{'helpText':_0x334721(0x183)});return _0x12e126['id'];}async[a131_0xe2cd60(0x1dd)](_0x5f2b4c,_0x55bf16){const _0x161de0=a131_0xe2cd60;try{return await this[_0x161de0(0x19b)][_0x161de0(0x1ba)](_0x5f2b4c,_0x55bf16);}catch(_0x55b06e){if(isHttp404Error(_0x55b06e))throw new SDKError(ErrorCode[_0x161de0(0x1e8)],'Journey\x20not\x20found:\x20'+_0x5f2b4c,_0x55b06e);throw _0x55b06e;}}async[a131_0xe2cd60(0x17f)](_0xc4c646,_0x2671b0){const _0x3a9fec=a131_0xe2cd60,_0x58221b={'from':_0x2671b0?.[_0x3a9fec(0x1aa)],'to':_0x2671b0?.['to'],'limit':_0x2671b0?.[_0x3a9fec(0x177)]},_0xae42a9=_0x2671b0?.[_0x3a9fec(0x198)]!=='conversion';try{const [_0x3fed57,_0x1e613b]=await Promise[_0x3a9fec(0x18d)]([this[_0x3a9fec(0x1bb)](_0xc4c646,_0x2671b0?.['type'],_0x58221b),_0xae42a9?this[_0x3a9fec(0x1b2)](_0xc4c646):undefined]);if(_0x3fed57[_0x3a9fec(0x1d5)]&&_0x1e613b){const _0x9a20f5=buildStageNameMap(_0x1e613b);_0x3fed57['activation']=_0x3fed57['activation']['map'](_0x35173f=>({..._0x35173f,'journeyStageName':_0x9a20f5['get'](_0x35173f['journeyStageId'])??_0x35173f[_0x3a9fec(0x1eb)]}));}return _0x3fed57;}catch(_0x4c20b5){if(isHttp404Error(_0x4c20b5))throw new SDKError(ErrorCode[_0x3a9fec(0x1e8)],_0x3a9fec(0x1a1)+_0xc4c646,_0x4c20b5);throw _0x4c20b5;}}async[a131_0xe2cd60(0x1bb)](_0x10fdaf,_0x204992,_0x2d7c70){const _0x299017=a131_0xe2cd60;if(_0x204992==='conversion'){const _0x691222=await this['client'][_0x299017(0x18e)](_0x10fdaf,_0x2d7c70);return{'conversion':_0x691222};}if(_0x204992===_0x299017(0x1d5)){const _0x1f7744=await this[_0x299017(0x19b)]['getActivationSankeyChart'](_0x10fdaf,_0x2d7c70);return{'activation':_0x1f7744};}const [_0xbf4abd,_0x92ac7a]=await Promise[_0x299017(0x18d)]([this['client'][_0x299017(0x18e)](_0x10fdaf,_0x2d7c70),this['client'][_0x299017(0x19d)](_0x10fdaf,_0x2d7c70)]);return{'conversion':_0xbf4abd,'activation':_0x92ac7a};}async[a131_0xe2cd60(0x1f3)](_0x5d618c){const _0x175e68=a131_0xe2cd60;try{return await this['client'][_0x175e68(0x1ca)](_0x5d618c);}catch(_0x5b9281){if(isHttp404Error(_0x5b9281))throw new SDKError(ErrorCode[_0x175e68(0x1e8)],_0x175e68(0x1a1)+_0x5d618c,_0x5b9281);throw _0x5b9281;}}async[a131_0xe2cd60(0x1db)](_0x26e651){const _0x2ff53c=a131_0xe2cd60;try{return await this[_0x2ff53c(0x19b)]['resumeJourney'](_0x26e651);}catch(_0x2dbeed){if(isHttp404Error(_0x2dbeed))throw new SDKError(ErrorCode[_0x2ff53c(0x1e8)],_0x2ff53c(0x1a1)+_0x26e651,_0x2dbeed);throw _0x2dbeed;}}async['create'](_0x790714){const _0x5b4ddc=a131_0xe2cd60;return await this[_0x5b4ddc(0x19b)][_0x5b4ddc(0x174)](_0x790714);}async[a131_0xe2cd60(0x1ad)](_0x120747,_0x221bee){const _0x14260a=a131_0xe2cd60;try{return await this[_0x14260a(0x19b)]['updateJourney'](_0x120747,_0x221bee);}catch(_0x50e2fd){if(isHttp404Error(_0x50e2fd))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x14260a(0x1a1)+_0x120747,_0x50e2fd);throw _0x50e2fd;}}async[a131_0xe2cd60(0x1be)](_0x161eb1,_0x591929){const _0x353003=a131_0xe2cd60;try{return await this['client']['getJourneyActivation'](_0x161eb1,_0x591929);}catch(_0x2d544b){if(isHttp404Error(_0x2d544b))throw new SDKError(ErrorCode[_0x353003(0x191)],_0x353003(0x1b6)+_0x591929+'\x20in\x20journey\x20'+_0x161eb1,_0x2d544b);throw _0x2d544b;}}async[a131_0xe2cd60(0x1c4)](_0x333d00){const _0x515181=a131_0xe2cd60;try{return await this[_0x515181(0x19b)]['listJourneyActivations'](_0x333d00);}catch(_0x1d4dad){if(isHttp404Error(_0x1d4dad))return[];throw _0x1d4dad;}}async[a131_0xe2cd60(0x18f)](_0x395ec7){const _0x6367d9=a131_0xe2cd60,_0x6227fd=await this[_0x6367d9(0x1c4)](_0x395ec7);return _0x6227fd[_0x6367d9(0x1f4)](flattenJourneyActivation);}async[a131_0xe2cd60(0x1d8)](_0x5b1ccf,_0x22e246){const _0x5ac532=a131_0xe2cd60;return await this[_0x5ac532(0x19b)][_0x5ac532(0x1b4)](_0x5b1ccf,_0x22e246);}async[a131_0xe2cd60(0x1de)](_0x595642){const _0x3f6fca=a131_0xe2cd60,_0x356e70=await this[_0x3f6fca(0x1b2)](_0x595642),_0x399580=generateColumnMapping(_0x356e70);return{'journeyId':_0x356e70['id'],'journeyName':_0x356e70['attributes']['name'],'database':'cdp_audience_'+_0x356e70[_0x3f6fca(0x171)]['audienceId'],'table':_0x3f6fca(0x1e1)+_0x356e70['id'],'columns':_0x399580};}async[a131_0xe2cd60(0x17d)](_0x3aeb28){const _0x867405=a131_0xe2cd60;return this[_0x867405(0x19b)][_0x867405(0x19c)](_0x3aeb28);}async[a131_0xe2cd60(0x1f0)](_0x55aea9){const _0x23ae68=a131_0xe2cd60;if(!_0x55aea9)return undefined;try{const _0x382f7e=await this['getBundle'](_0x55aea9);return _0x382f7e[_0x23ae68(0x1da)];}catch{return undefined;}}async[a131_0xe2cd60(0x184)](_0x33dde1){const _0x5e7ba6=a131_0xe2cd60,_0x1497bb=await this[_0x5e7ba6(0x1b2)](_0x33dde1),_0x4fc9f5=_0x1497bb[_0x5e7ba6(0x171)][_0x5e7ba6(0x192)];if(!_0x4fc9f5)return{'bundleId':'','bundleName':_0x1497bb[_0x5e7ba6(0x171)][_0x5e7ba6(0x170)],'bundleDescription':_0x1497bb[_0x5e7ba6(0x171)][_0x5e7ba6(0x196)]??null,'latestJourneyId':_0x1497bb['id'],'versions':[synthesizePreBundleVersion(_0x1497bb)]};const _0x3fc78e=await this[_0x5e7ba6(0x17d)](_0x4fc9f5);return{'bundleId':_0x4fc9f5,'bundleName':_0x3fc78e[_0x5e7ba6(0x170)],'bundleDescription':_0x3fc78e[_0x5e7ba6(0x196)]??null,'latestJourneyId':_0x3fc78e[_0x5e7ba6(0x1da)],'versions':formatVersionsFromBundle(_0x3fc78e)};}async['createVersion'](_0x482ca6){const _0x2b0c3b=a131_0xe2cd60,_0x180b64=await this[_0x2b0c3b(0x1b2)](_0x482ca6),_0x3a0dcf=_0x180b64[_0x2b0c3b(0x171)][_0x2b0c3b(0x192)];if(!_0x3a0dcf)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2b0c3b(0x18c));await this[_0x2b0c3b(0x19b)]['checkJourneyAppendable'](_0x3a0dcf);const _0x1a0ebe=await this[_0x2b0c3b(0x19b)][_0x2b0c3b(0x19c)](_0x3a0dcf),_0x4842b5=_0x1a0ebe[_0x2b0c3b(0x170)]+'\x20v'+(_0x1a0ebe[_0x2b0c3b(0x1c8)]+0x1);return this[_0x2b0c3b(0x19b)][_0x2b0c3b(0x1e4)](_0x3a0dcf,{'sourceId':_0x482ca6,'attributes':{'name':_0x4842b5}});}}
1
+ const a131_0x42698d=a131_0x1e90;(function(_0x15e4a2,_0x79d5f0){const _0x1340d4=a131_0x1e90,_0x475890=_0x15e4a2();while(!![]){try{const _0x5b28d5=-parseInt(_0x1340d4(0x1cd))/0x1+parseInt(_0x1340d4(0x1aa))/0x2+-parseInt(_0x1340d4(0x1f9))/0x3*(-parseInt(_0x1340d4(0x1c5))/0x4)+parseInt(_0x1340d4(0x1e0))/0x5+-parseInt(_0x1340d4(0x1db))/0x6+parseInt(_0x1340d4(0x1dc))/0x7*(parseInt(_0x1340d4(0x19d))/0x8)+-parseInt(_0x1340d4(0x1c2))/0x9*(parseInt(_0x1340d4(0x1eb))/0xa);if(_0x5b28d5===_0x79d5f0)break;else _0x475890['push'](_0x475890['shift']());}catch(_0x124422){_0x475890['push'](_0x475890['shift']());}}}(a131_0x56d1,0x70b8f));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function a131_0x1e90(_0x42f7b9,_0x1017a6){_0x42f7b9=_0x42f7b9-0x178;const _0x56d1e1=a131_0x56d1();let _0x1e9020=_0x56d1e1[_0x42f7b9];return _0x1e9020;}function getBundleId(_0x4e1a0c){const _0x5054d2=a131_0x1e90;return _0x4e1a0c[_0x5054d2(0x1cc)]??_0x4e1a0c[_0x5054d2(0x1f6)]?.['journeyBundleId']??undefined;}function getVersionNumber(_0x5256df){const _0x12c79a=a131_0x1e90;return _0x5256df[_0x12c79a(0x1ac)]??_0x5256df[_0x12c79a(0x1f6)]?.['versionNumber']??0x0;}function getState(_0x562409){const _0x1e6226=a131_0x1e90;return _0x562409['state']??_0x562409[_0x1e6226(0x1f6)]?.[_0x1e6226(0x1cf)];}export function deduplicateJourneysByBundle(_0x12e0ad){const _0x1f77f6=a131_0x1e90,_0x1cacae=new Map();let _0x1c236b=0x0;for(const _0x2eecda of _0x12e0ad){const _0x56aa5f=getBundleId(_0x2eecda);if(!_0x56aa5f){const _0xc7b2a8=_0x1f77f6(0x181)+(_0x2eecda['id']??_0x1f77f6(0x1d6)+_0x1c236b++);_0x1cacae[_0x1f77f6(0x1e1)](_0xc7b2a8,_0x2eecda);continue;}const _0x52ae27=_0x1cacae[_0x1f77f6(0x1b9)](_0x56aa5f);if(!_0x52ae27)_0x1cacae[_0x1f77f6(0x1e1)](_0x56aa5f,_0x2eecda);else{const _0x550dd5=getState(_0x52ae27)===_0x1f77f6(0x199),_0x1db579=getState(_0x2eecda)===_0x1f77f6(0x199);if(_0x1db579&&!_0x550dd5)_0x1cacae[_0x1f77f6(0x1e1)](_0x56aa5f,_0x2eecda);else{if(!_0x1db579&&_0x550dd5){}else{const _0x89a4d8=getVersionNumber(_0x52ae27),_0x250ee9=getVersionNumber(_0x2eecda);_0x250ee9>_0x89a4d8&&_0x1cacae['set'](_0x56aa5f,_0x2eecda);}}}}return Array[_0x1f77f6(0x1fa)](_0x1cacae[_0x1f77f6(0x1e7)]());}const VALID_JOURNEY_STATES=new Set([a131_0x42698d(0x179),'simulation',a131_0x42698d(0x199)]);export function parseJourneyState(_0x37d3a5){const _0x54849e=a131_0x42698d;if(typeof _0x37d3a5==='string'&&VALID_JOURNEY_STATES[_0x54849e(0x1b3)](_0x37d3a5))return _0x37d3a5;return'draft';}export function entityToJourneyListItem(_0x461b0d,_0x1bd932){const _0x445f6b=a131_0x42698d,_0x71f156=_0x461b0d[_0x445f6b(0x1f6)];return{'id':_0x461b0d['id'],'name':_0x71f156[_0x445f6b(0x1f3)]??'','journeyBundleName':_0x71f156[_0x445f6b(0x1e2)]??_0x71f156['name']??'','journeyBundleId':_0x71f156['journeyBundleId']??'','versionNumber':_0x71f156['versionNumber'],'description':_0x71f156['description']??null,'state':parseJourneyState(_0x71f156['state']),'paused':_0x71f156[_0x445f6b(0x1bf)]??![],'audienceId':_0x1bd932,'folderId':_0x71f156['segmentFolderId']??_0x461b0d[_0x445f6b(0x19c)]?.[_0x445f6b(0x19b)]?.[_0x445f6b(0x1af)]?.['id']??null,'createdAt':_0x71f156[_0x445f6b(0x1d5)]??'','updatedAt':_0x71f156[_0x445f6b(0x1c1)]??''};}function convertToColumnId(_0xbdc56e){const _0xaed43c=a131_0x42698d;return _0xbdc56e[_0xaed43c(0x17c)](/-/g,'_');}function getStepEntries(_0x461c1b){const _0x2840c8=a131_0x42698d;if(!_0x461c1b)return[];if(Array[_0x2840c8(0x1a2)](_0x461c1b))return _0x461c1b[_0x2840c8(0x1e4)](_0x5f230f=>[_0x5f230f['id'],_0x5f230f]);return Object[_0x2840c8(0x195)](_0x461c1b);}export function flattenJourneyActivation(_0x22c62c){const _0x77b1e4=a131_0x42698d,{activationParams:_0x333162,activationId:_0x37723d,runAfterJourneyRefresh:_0x19d8de}=_0x22c62c[_0x77b1e4(0x1f6)];return{'id':_0x22c62c['id'],'activationId':_0x37723d,'runAfterJourneyRefresh':_0x19d8de,..._0x333162};}function col(_0x462b83,_0x6dd466={}){const _0x3926e3=a131_0x42698d;return{'column':_0x462b83,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3926e3(0x184),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x6dd466};}export function generateColumnMapping(_0x138b28){const _0x433bf0=a131_0x42698d,_0x50794a=[];_0x50794a[_0x433bf0(0x1a1)](col('cdp_customer_id')),_0x50794a[_0x433bf0(0x1a1)](col('intime_journey',{'direction':'in','category':_0x433bf0(0x1ef)})),_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1de),{'direction':_0x433bf0(0x1a8),'category':'journey'}));_0x138b28[_0x433bf0(0x1f6)][_0x433bf0(0x18f)]&&_0x50794a[_0x433bf0(0x1a1)](col('intime_goal',{'direction':'in','category':_0x433bf0(0x18f),'detail':_0x138b28[_0x433bf0(0x1f6)][_0x433bf0(0x18f)][_0x433bf0(0x1f3)]||null}));const _0x3b6aa6=_0x138b28[_0x433bf0(0x1f6)][_0x433bf0(0x189)]||[];for(let _0x3455ca=0x0;_0x3455ca<_0x3b6aa6[_0x433bf0(0x1bc)];_0x3455ca++){const _0x5b7e95=_0x3b6aa6[_0x3455ca],_0x18b43d=_0x5b7e95[_0x433bf0(0x1f3)],_0x3f4c40={'stageIndex':_0x3455ca,'stageName':_0x18b43d},_0x3cbc2a=_0x5b7e95[_0x433bf0(0x1a7)]?.[_0x433bf0(0x1f3)]||null;_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1a9)+_0x3455ca,{..._0x3f4c40,'direction':'in','category':_0x433bf0(0x185),'detail':_0x3cbc2a})),_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1d3)+_0x3455ca,{..._0x3f4c40,'direction':_0x433bf0(0x1a8),'category':_0x433bf0(0x185),'detail':_0x3cbc2a}));_0x5b7e95[_0x433bf0(0x1a3)]&&_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1a9)+_0x3455ca+_0x433bf0(0x1f1),{..._0x3f4c40,'direction':'in','category':'milestone','detail':_0x5b7e95[_0x433bf0(0x1a3)]['name']||null}));const _0x40694e=_0x5b7e95[_0x433bf0(0x1c6)]||_0x5b7e95[_0x433bf0(0x1ae)]||[];for(let _0x4d5c49=0x0;_0x4d5c49<_0x40694e['length'];_0x4d5c49++){_0x50794a[_0x433bf0(0x1a1)](col('intime_stage_'+_0x3455ca+'_exit_'+_0x4d5c49,{..._0x3f4c40,'direction':'in','category':_0x433bf0(0x1bb),'detail':_0x40694e[_0x4d5c49][_0x433bf0(0x1f3)]||null}));}const _0x2fe3f2=getStepEntries(_0x5b7e95[_0x433bf0(0x1fb)]);for(const [_0x31dba3,_0x271c73]of _0x2fe3f2){const _0x2275c3=convertToColumnId(_0x31dba3),_0x5c06b5=_0x271c73[_0x433bf0(0x1b8)]||null,_0x1e1690=_0x271c73['name']||null,_0x3cde22={..._0x3f4c40,'stepType':_0x5c06b5,'stepName':_0x1e1690,'stepId':_0x31dba3};_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1a9)+_0x3455ca+'_'+_0x2275c3,{..._0x3cde22,'direction':'in','category':_0x433bf0(0x1b1)})),_0x50794a['push'](col(_0x433bf0(0x1d3)+_0x3455ca+'_'+_0x2275c3,{..._0x3cde22,'direction':'out','category':_0x433bf0(0x1b1)}));if(_0x271c73[_0x433bf0(0x1b8)]===_0x433bf0(0x1d2)&&_0x271c73[_0x433bf0(0x1d1)])for(const _0x407c3b of _0x271c73[_0x433bf0(0x1d1)]){_0x407c3b[_0x433bf0(0x1a4)]&&_0x50794a['push'](col(_0x433bf0(0x1a9)+_0x3455ca+'_'+_0x2275c3+'_'+_0x407c3b[_0x433bf0(0x1a4)],{..._0x3cde22,'direction':'in','category':_0x433bf0(0x193),'detail':_0x407c3b['name']||(_0x407c3b[_0x433bf0(0x1ca)]?_0x433bf0(0x18c):null)}));}if((_0x271c73[_0x433bf0(0x1b8)]==='AbTest'||_0x271c73[_0x433bf0(0x1b8)]===_0x433bf0(0x17d))&&_0x271c73['variants'])for(const _0x233a9d of _0x271c73[_0x433bf0(0x1e5)]){_0x233a9d['id']&&_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1a9)+_0x3455ca+'_'+_0x2275c3+'_variant_'+convertToColumnId(_0x233a9d['id']),{..._0x3cde22,'direction':'in','category':'variant','detail':_0x233a9d[_0x433bf0(0x1f3)]||null}));}if(_0x271c73['type']==='WaitStep'||_0x271c73[_0x433bf0(0x1b8)]===_0x433bf0(0x1c7)){const _0x419ab4=[];if(_0x271c73['conditionSegmentId'])_0x419ab4[_0x433bf0(0x1a1)](_0x271c73['conditionSegmentId']);else{if(Array[_0x433bf0(0x1a2)](_0x271c73[_0x433bf0(0x191)]))for(const _0xf61859 of _0x271c73[_0x433bf0(0x191)]){_0xf61859[_0x433bf0(0x1a4)]&&!_0xf61859[_0x433bf0(0x1a5)]&&_0x419ab4[_0x433bf0(0x1a1)](_0xf61859[_0x433bf0(0x1a4)]);}else _0x271c73[_0x433bf0(0x19e)]?.[_0x433bf0(0x1a4)]&&_0x419ab4['push'](_0x271c73[_0x433bf0(0x19e)][_0x433bf0(0x1a4)]);}for(const _0x1ff88d of _0x419ab4){_0x50794a[_0x433bf0(0x1a1)](col(_0x433bf0(0x1a9)+_0x3455ca+'_'+_0x2275c3+'_'+_0x1ff88d,{..._0x3cde22,'direction':'in','category':'branch'}));}}}}return _0x50794a['push'](col(_0x433bf0(0x1d4))),_0x50794a;}export function aggregateJourneyHistory(_0x4d5f0e){const _0x3c704c=a131_0x42698d,_0xf4d37d=_0x4d5f0e['reduce']((_0x209012,_0x2d26c9)=>_0x209012+(_0x2d26c9['entryInflux']??0x0),0x0),_0x4f24c5=_0x4d5f0e['reduce']((_0x12a411,_0x58d9bd)=>_0x12a411+(_0x58d9bd[_0x3c704c(0x197)]??0x0),0x0),_0x107970=_0x4d5f0e['reduce']((_0x1df450,_0x219466)=>_0x1df450+((_0x219466[_0x3c704c(0x1b4)]??0x0)+(_0x219466[_0x3c704c(0x1a0)]??0x0)),0x0),_0x2e0480=_0x4d5f0e[_0x4d5f0e[_0x3c704c(0x1bc)]-0x1];return{'size':_0x2e0480?.[_0x3c704c(0x1c0)]??0x0,'entered':_0xf4d37d,'goal_achieved':_0x4f24c5,'completion_rate':_0x4f24c5&&_0xf4d37d?_0x4f24c5/_0xf4d37d*0x64:0x0,'exit_or_jump':_0x107970,'exit_or_jump_rate':_0x107970&&_0xf4d37d?_0x107970/_0xf4d37d*0x64:0x0};}function a131_0x56d1(){const _0xf509b=['141186fTaMjc','91mxTirV','find','outtime_journey','INVALID_ARGUMENT','4068790RUylbV','set','journeyBundleName','listVersions','map','variants','conversion','values','sort','activationStepsById','Journey\x20not\x20found:\x20','309090QdTHpf','pauseJourney','listJourneysFromParentSegment','enteredSize','journey','all','_milestone','description','name','applyVersionDeduplication','journey_','attributes','history','journeyId','3acWPUo','from','steps','audienceId','exitOrJumpSize','listActivationsFlat','JOURNEY_NOT_FOUND','draft','resumeJourney','updateJourney','replace','ABTest','journeyStageId','activation','includeHistory','no-bundle-','getActivation','getActivationSankeyChart','fixed','stage','listJourneysWithDetails','getColumnMapping','journeys','journeyStages','listJourneysWithFolders','update','Excluded\x20profiles','reduce','create','goal','createVersion','conditions','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','branch','listJourneys','entries','lastVersionNumber','goalInflux','listActivations','launched','getConversionSankeyChart','parentFolder','relationships','230072cLrefX','waitCondition','client','jumpInflux','push','isArray','milestone','segmentId','timedOutPath','toLowerCase','entryCriteria','out','intime_stage_','944418phNlnW','getBundle','versionNumber','rootFolderId','exitCriteria','data','resolveJourneyId','step','cdp_audience_','has','exitInflux','filter','completionRate','getJourneyBundle','type','get','Journey\x20activation\x20step\x20not\x20found:\x20','exit_criteria','length','resolveRootFolderId','checkJourneyAppendable','paused','size','updatedAt','135FQgRds','pause','\x20in\x20journey\x20','72912EzKdCW','exitCriterias','Wait','getJourney','exitOrJumpRate','excluded','getLatestJourneyId','journeyBundleId','729185JFfdIs','entryInflux','state','listJourneyActivations','branches','DecisionPoint','outtime_stage_','time','createdAt','idx-','createJourney','fetchTrafficRaw','milestoneInflux','includeAllVersions'];a131_0x56d1=function(){return _0xf509b;};return a131_0x56d1();}export function aggregateStageHistory(_0x3fdda6){const _0x4c1131=a131_0x42698d,_0x372a7d=_0x3fdda6[_0x4c1131(0x18d)]((_0x50d7ad,_0x21fbda)=>_0x50d7ad+(_0x21fbda[_0x4c1131(0x1ce)]??0x0),0x0),_0x2514b0=_0x3fdda6[_0x4c1131(0x18d)]((_0x504875,_0x144b25)=>_0x504875+(_0x144b25[_0x4c1131(0x1d9)]??0x0),0x0),_0x53c583=_0x3fdda6[_0x4c1131(0x18d)]((_0x52f4f7,_0x207ad5)=>_0x52f4f7+((_0x207ad5[_0x4c1131(0x1b4)]??0x0)+(_0x207ad5[_0x4c1131(0x1a0)]??0x0)),0x0),_0x3f876d=_0x3fdda6[_0x3fdda6['length']-0x1];return{'size':_0x3f876d?.[_0x4c1131(0x1c0)]??0x0,'entered':_0x372a7d,'milestone':_0x2514b0,'milestone_rate':_0x2514b0&&_0x372a7d?_0x2514b0/_0x372a7d*0x64:0x0,'exit_or_jump':_0x53c583,'exit_or_jump_rate':_0x53c583&&_0x372a7d?_0x53c583/_0x372a7d*0x64:0x0};}export function assembleJourneyStats(_0x116b91,_0x527f77){const _0x5384da=a131_0x42698d,_0x118612=!!(_0x527f77?.[_0x5384da(0x1fa)]||_0x527f77?.['to'])&&!!_0x116b91[_0x5384da(0x1f7)]?.['length'];if(_0x118612){const _0x5eff50=aggregateJourneyHistory(_0x116b91['history']),_0x55a36f={'journey_id':_0x116b91[_0x5384da(0x1f8)],..._0x527f77?.[_0x5384da(0x1fa)]&&{'from':_0x527f77['from']},..._0x527f77?.['to']&&{'to':_0x527f77['to']},..._0x5eff50};return _0x527f77?.[_0x5384da(0x180)]&&(_0x55a36f[_0x5384da(0x1f7)]=_0x116b91['history']),_0x55a36f;}return{'journey_id':_0x116b91[_0x5384da(0x1f8)],'size':_0x116b91[_0x5384da(0x1c0)],'entered':_0x116b91[_0x5384da(0x1ee)],'goal_achieved':_0x116b91['goalSize'],'completion_rate':_0x116b91[_0x5384da(0x1b6)],'exit_or_jump':_0x116b91[_0x5384da(0x1fd)],'exit_or_jump_rate':_0x116b91[_0x5384da(0x1c9)]};}export function formatVersionsFromBundle(_0x3d4b3a){const _0x128e5a=a131_0x42698d,_0x3f4baf=_0x3d4b3a[_0x128e5a(0x188)]['map'](_0x5a7cbb=>({'journeyId':_0x5a7cbb['id'],'versionNumber':_0x5a7cbb[_0x128e5a(0x1f6)][_0x128e5a(0x1ac)]??0x0,'name':_0x5a7cbb['attributes'][_0x128e5a(0x1f3)],'state':_0x5a7cbb[_0x128e5a(0x1f6)][_0x128e5a(0x1cf)],'paused':_0x5a7cbb['attributes']['paused'],'createdAt':_0x5a7cbb[_0x128e5a(0x1f6)][_0x128e5a(0x1d5)],'updatedAt':_0x5a7cbb[_0x128e5a(0x1f6)]['updatedAt']}));return _0x3f4baf[_0x128e5a(0x1e8)]((_0x46eb81,_0x4b4869)=>_0x46eb81[_0x128e5a(0x1ac)]-_0x4b4869[_0x128e5a(0x1ac)]),_0x3f4baf;}export function synthesizePreBundleVersion(_0x307ae8){const _0x3fa62b=a131_0x42698d;return{'journeyId':_0x307ae8['id'],'versionNumber':0x1,'name':_0x307ae8[_0x3fa62b(0x1f6)][_0x3fa62b(0x1f3)],'state':_0x307ae8['attributes']['state'],'paused':_0x307ae8[_0x3fa62b(0x1f6)][_0x3fa62b(0x1bf)],'createdAt':_0x307ae8[_0x3fa62b(0x1f6)][_0x3fa62b(0x1d5)],'updatedAt':_0x307ae8[_0x3fa62b(0x1f6)]['updatedAt']};}export function buildStageNameMap(_0x117035){const _0x447c06=a131_0x42698d;return new Map(_0x117035[_0x447c06(0x1f6)][_0x447c06(0x189)]?.[_0x447c06(0x1e4)](_0x12f3e1=>[_0x12f3e1['id'],_0x12f3e1['name']])??[]);}export class JourneySDK{[a131_0x42698d(0x19f)];constructor(_0x597aed){const _0x52cf9a=a131_0x42698d;this[_0x52cf9a(0x19f)]=new CDPApiClient(_0x597aed);}[a131_0x42698d(0x1f4)](_0x2b84f9,_0x34fc81){return _0x34fc81?_0x2b84f9:deduplicateJourneysByBundle(_0x2b84f9);}async[a131_0x42698d(0x1bd)](_0x4e72d9){const _0x39af9d=a131_0x42698d,_0x48f79e=await this[_0x39af9d(0x19f)]['getParentSegmentFull'](_0x4e72d9);return _0x48f79e[_0x39af9d(0x1ad)]??undefined;}async['listJourneysWithDetails'](_0x3b719b,_0x34697c){const _0x41320a=a131_0x42698d;try{const _0xd40aba=await this[_0x41320a(0x19f)][_0x41320a(0x186)](_0x3b719b);return{'journeys':this[_0x41320a(0x1f4)](_0xd40aba[_0x41320a(0x188)],_0x34697c),'activationStepsById':_0xd40aba[_0x41320a(0x1e9)]};}catch(_0x3d360a){if(isHttp404Error(_0x3d360a))return{'journeys':[],'activationStepsById':new Map()};throw _0x3d360a;}}async[a131_0x42698d(0x1ed)](_0x396bc2,_0x23de45,_0x55e4d5){const _0x1d41de=a131_0x42698d;let _0x53c0a2=_0x23de45;if(!_0x53c0a2)try{_0x53c0a2=await this[_0x1d41de(0x1bd)](_0x396bc2);}catch(_0x367713){if(isHttp404Error(_0x367713))return[];throw _0x367713;}if(!_0x53c0a2)return[];let _0x115b68;if(_0x55e4d5?.[_0x1d41de(0x1da)])_0x115b68=await this[_0x1d41de(0x19f)][_0x1d41de(0x194)](_0x53c0a2);else{const _0x206788=await this[_0x1d41de(0x19f)]['listEntitiesByFolder'](_0x53c0a2,0x20,![]),_0x1ff97d=_0x206788[_0x1d41de(0x1af)],_0xb52eb7=_0x1ff97d['filter'](_0x1ba939=>_0x1ba939[_0x1d41de(0x1b8)]==='journey');_0x115b68=_0xb52eb7[_0x1d41de(0x1e4)](_0x1d29f7=>entityToJourneyListItem(_0x1d29f7,_0x396bc2));}return this[_0x1d41de(0x1f4)](_0x115b68,_0x55e4d5?.[_0x1d41de(0x1da)]);}async[a131_0x42698d(0x18a)](_0x219c3c,_0x5a3016,_0x31569e){const _0x18c391=a131_0x42698d;if(!_0x5a3016)return{'journeys':[],'folders':[]};const _0x10e33e=await this['client']['listEntitiesByFolder'](_0x5a3016,0x20,![]),_0x54b533=_0x10e33e['data'],_0x35becd=_0x54b533[_0x18c391(0x1b5)](_0x206349=>_0x206349[_0x18c391(0x1b8)]==='folder-segment'&&_0x206349['id']!==_0x5a3016),_0x5b1a1c=_0x35becd[_0x18c391(0x1e4)](_0x3a6027=>({'id':_0x3a6027['id'],'name':_0x3a6027[_0x18c391(0x1f6)][_0x18c391(0x1f3)]})),_0x57d00c=_0x54b533[_0x18c391(0x1b5)](_0x42415d=>_0x42415d[_0x18c391(0x1b8)]===_0x18c391(0x1ef)),_0x17f454=_0x57d00c[_0x18c391(0x1e4)](_0x452d04=>entityToJourneyListItem(_0x452d04,_0x219c3c));return{'journeys':this[_0x18c391(0x1f4)](_0x17f454,_0x31569e?.[_0x18c391(0x1da)]),'folders':_0x5b1a1c};}async['listJourneysWithDetailsFromParentSegment'](_0x1059b1,_0x22c119){const _0xf87ded=a131_0x42698d;let _0x50831f;try{_0x50831f=await this[_0xf87ded(0x1bd)](_0x1059b1);}catch(_0x5a149b){if(isHttp404Error(_0x5a149b))return{'journeys':[],'activationStepsById':new Map()};throw _0x5a149b;}if(!_0x50831f)return{'journeys':[],'activationStepsById':new Map()};const _0x27b255=await this[_0xf87ded(0x186)](_0x50831f,_0x22c119?.[_0xf87ded(0x1da)]);return{'journeys':this['applyVersionDeduplication'](_0x27b255[_0xf87ded(0x188)],_0x22c119?.[_0xf87ded(0x1da)]),'activationStepsById':_0x27b255[_0xf87ded(0x1e9)]};}async['getJourney'](_0xb75283){const _0x1a7b2c=a131_0x42698d;try{return await this[_0x1a7b2c(0x19f)][_0x1a7b2c(0x1c8)](_0xb75283);}catch(_0x22fc54){if(isHttp404Error(_0x22fc54))throw new SDKError(ErrorCode[_0x1a7b2c(0x178)],_0x1a7b2c(0x1ea)+_0xb75283,_0x22fc54);throw _0x22fc54;}}async[a131_0x42698d(0x1b0)](_0x330500,_0x163cb9){const _0x2df150=a131_0x42698d,_0x5cd4f8=await this[_0x2df150(0x1ed)](_0x330500),_0x1f6408=_0x5cd4f8[_0x2df150(0x1dd)](_0x43ca8f=>_0x43ca8f[_0x2df150(0x1e2)]['toLowerCase']()===_0x163cb9[_0x2df150(0x1a6)]());if(!_0x1f6408)throw new SDKError(ErrorCode[_0x2df150(0x178)],_0x2df150(0x1ea)+_0x163cb9,undefined,{'helpText':'Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'});return _0x1f6408['id'];}async['getStatistics'](_0x3cc6ab,_0x5bcfe0){const _0x4a5a36=a131_0x42698d;try{return await this['client']['getJourneyStatistics'](_0x3cc6ab,_0x5bcfe0);}catch(_0x594f08){if(isHttp404Error(_0x594f08))throw new SDKError(ErrorCode[_0x4a5a36(0x178)],'Journey\x20not\x20found:\x20'+_0x3cc6ab,_0x594f08);throw _0x594f08;}}async['getTrafficData'](_0x49229e,_0x47602e){const _0x9ce081=a131_0x42698d,_0x396079={'from':_0x47602e?.[_0x9ce081(0x1fa)],'to':_0x47602e?.['to'],'limit':_0x47602e?.['limit']},_0x5c430e=_0x47602e?.[_0x9ce081(0x1b8)]!==_0x9ce081(0x1e6);try{const [_0x6a9eda,_0x3a6008]=await Promise[_0x9ce081(0x1f0)]([this[_0x9ce081(0x1d8)](_0x49229e,_0x47602e?.[_0x9ce081(0x1b8)],_0x396079),_0x5c430e?this['getJourney'](_0x49229e):undefined]);if(_0x6a9eda['activation']&&_0x3a6008){const _0x327ad5=buildStageNameMap(_0x3a6008);_0x6a9eda[_0x9ce081(0x17f)]=_0x6a9eda[_0x9ce081(0x17f)][_0x9ce081(0x1e4)](_0x492c9d=>({..._0x492c9d,'journeyStageName':_0x327ad5[_0x9ce081(0x1b9)](_0x492c9d[_0x9ce081(0x17e)])??_0x492c9d[_0x9ce081(0x17e)]}));}return _0x6a9eda;}catch(_0x3fd03b){if(isHttp404Error(_0x3fd03b))throw new SDKError(ErrorCode[_0x9ce081(0x178)],'Journey\x20not\x20found:\x20'+_0x49229e,_0x3fd03b);throw _0x3fd03b;}}async[a131_0x42698d(0x1d8)](_0x23a74e,_0xd82411,_0x123a52){const _0x11f040=a131_0x42698d;if(_0xd82411===_0x11f040(0x1e6)){const _0x1ce666=await this['client'][_0x11f040(0x19a)](_0x23a74e,_0x123a52);return{'conversion':_0x1ce666};}if(_0xd82411===_0x11f040(0x17f)){const _0x54a0dd=await this[_0x11f040(0x19f)][_0x11f040(0x183)](_0x23a74e,_0x123a52);return{'activation':_0x54a0dd};}const [_0x494091,_0x1266f0]=await Promise[_0x11f040(0x1f0)]([this['client']['getConversionSankeyChart'](_0x23a74e,_0x123a52),this['client'][_0x11f040(0x183)](_0x23a74e,_0x123a52)]);return{'conversion':_0x494091,'activation':_0x1266f0};}async[a131_0x42698d(0x1c3)](_0x4ce012){const _0x55e414=a131_0x42698d;try{return await this[_0x55e414(0x19f)][_0x55e414(0x1ec)](_0x4ce012);}catch(_0xaeb8c3){if(isHttp404Error(_0xaeb8c3))throw new SDKError(ErrorCode[_0x55e414(0x178)],_0x55e414(0x1ea)+_0x4ce012,_0xaeb8c3);throw _0xaeb8c3;}}async['resume'](_0x5dd50f){const _0x1f7687=a131_0x42698d;try{return await this['client'][_0x1f7687(0x17a)](_0x5dd50f);}catch(_0x206a94){if(isHttp404Error(_0x206a94))throw new SDKError(ErrorCode[_0x1f7687(0x178)],_0x1f7687(0x1ea)+_0x5dd50f,_0x206a94);throw _0x206a94;}}async[a131_0x42698d(0x18e)](_0x540ff3){const _0x7baade=a131_0x42698d;return await this[_0x7baade(0x19f)][_0x7baade(0x1d7)](_0x540ff3);}async[a131_0x42698d(0x18b)](_0x3d97f9,_0x345f2a){const _0x270f29=a131_0x42698d;try{return await this[_0x270f29(0x19f)][_0x270f29(0x17b)](_0x3d97f9,_0x345f2a);}catch(_0x13a3b9){if(isHttp404Error(_0x13a3b9))throw new SDKError(ErrorCode[_0x270f29(0x178)],_0x270f29(0x1ea)+_0x3d97f9,_0x13a3b9);throw _0x13a3b9;}}async[a131_0x42698d(0x182)](_0x6f7477,_0x5864ad){const _0x134e58=a131_0x42698d;try{return await this[_0x134e58(0x19f)]['getJourneyActivation'](_0x6f7477,_0x5864ad);}catch(_0x4fcf6d){if(isHttp404Error(_0x4fcf6d))throw new SDKError(ErrorCode['NOT_FOUND'],_0x134e58(0x1ba)+_0x5864ad+_0x134e58(0x1c4)+_0x6f7477,_0x4fcf6d);throw _0x4fcf6d;}}async[a131_0x42698d(0x198)](_0x339689){const _0x4439f8=a131_0x42698d;try{return await this[_0x4439f8(0x19f)][_0x4439f8(0x1d0)](_0x339689);}catch(_0x2923d5){if(isHttp404Error(_0x2923d5))return[];throw _0x2923d5;}}async[a131_0x42698d(0x1fe)](_0xfbd3bb){const _0x53dbc=a131_0x42698d,_0xecd022=await this[_0x53dbc(0x198)](_0xfbd3bb);return _0xecd022[_0x53dbc(0x1e4)](flattenJourneyActivation);}async['createActivation'](_0x319585,_0x126149){const _0x1f919b=a131_0x42698d;return await this[_0x1f919b(0x19f)]['createJourneyActivation'](_0x319585,_0x126149);}async[a131_0x42698d(0x187)](_0x45d441){const _0x2f799b=a131_0x42698d,_0xff232c=await this['getJourney'](_0x45d441),_0x323f63=generateColumnMapping(_0xff232c);return{'journeyId':_0xff232c['id'],'journeyName':_0xff232c[_0x2f799b(0x1f6)][_0x2f799b(0x1f3)],'database':_0x2f799b(0x1b2)+_0xff232c['attributes'][_0x2f799b(0x1fc)],'table':_0x2f799b(0x1f5)+_0xff232c['id'],'columns':_0x323f63};}async[a131_0x42698d(0x1ab)](_0x20bb0a){const _0x5a838a=a131_0x42698d;return this['client'][_0x5a838a(0x1b7)](_0x20bb0a);}async[a131_0x42698d(0x1cb)](_0x4ce7b5){const _0x3d2fed=a131_0x42698d;if(!_0x4ce7b5)return undefined;try{const _0x20895a=await this[_0x3d2fed(0x1ab)](_0x4ce7b5);return _0x20895a['latestJourneyId'];}catch{return undefined;}}async[a131_0x42698d(0x1e3)](_0x389d21){const _0x5af85d=a131_0x42698d,_0x2fadc2=await this[_0x5af85d(0x1c8)](_0x389d21),_0x82f379=_0x2fadc2[_0x5af85d(0x1f6)][_0x5af85d(0x1cc)];if(!_0x82f379)return{'bundleId':'','bundleName':_0x2fadc2[_0x5af85d(0x1f6)][_0x5af85d(0x1f3)],'bundleDescription':_0x2fadc2[_0x5af85d(0x1f6)][_0x5af85d(0x1f2)]??null,'latestJourneyId':_0x2fadc2['id'],'versions':[synthesizePreBundleVersion(_0x2fadc2)]};const _0x87d0b9=await this['getBundle'](_0x82f379);return{'bundleId':_0x82f379,'bundleName':_0x87d0b9[_0x5af85d(0x1f3)],'bundleDescription':_0x87d0b9['description']??null,'latestJourneyId':_0x87d0b9['latestJourneyId'],'versions':formatVersionsFromBundle(_0x87d0b9)};}async[a131_0x42698d(0x190)](_0xe5eca4){const _0x5a178b=a131_0x42698d,_0x3e8003=await this['getJourney'](_0xe5eca4),_0x3df663=_0x3e8003[_0x5a178b(0x1f6)][_0x5a178b(0x1cc)];if(!_0x3df663)throw new SDKError(ErrorCode[_0x5a178b(0x1df)],_0x5a178b(0x192));await this['client'][_0x5a178b(0x1be)](_0x3df663);const _0x3ae7a5=await this[_0x5a178b(0x19f)][_0x5a178b(0x1b7)](_0x3df663),_0xfc6fa2=_0x3ae7a5['name']+'\x20v'+(_0x3ae7a5[_0x5a178b(0x196)]+0x1);return this[_0x5a178b(0x19f)]['createJourneyVersion'](_0x3df663,{'sourceId':_0xe5eca4,'attributes':{'name':_0xfc6fa2}});}}
@@ -1 +1 @@
1
- const a132_0x1f24dc=a132_0x307d;(function(_0x54fb55,_0x138255){const _0xd8fa1a=a132_0x307d,_0x3ecfcb=_0x54fb55();while(!![]){try{const _0x4d5750=parseInt(_0xd8fa1a(0x14e))/0x1*(parseInt(_0xd8fa1a(0x14c))/0x2)+-parseInt(_0xd8fa1a(0x146))/0x3+-parseInt(_0xd8fa1a(0x145))/0x4*(parseInt(_0xd8fa1a(0x14b))/0x5)+-parseInt(_0xd8fa1a(0x14a))/0x6*(parseInt(_0xd8fa1a(0x147))/0x7)+parseInt(_0xd8fa1a(0x149))/0x8+parseInt(_0xd8fa1a(0x148))/0x9+parseInt(_0xd8fa1a(0x144))/0xa;if(_0x4d5750===_0x138255)break;else _0x3ecfcb['push'](_0x3ecfcb['shift']());}catch(_0x444f5a){_0x3ecfcb['push'](_0x3ecfcb['shift']());}}}(a132_0x34f3,0xa4a22));import{createTextCache}from'../../utils/local-cache.js';function a132_0x307d(_0x22e6e5,_0x2eece1){_0x22e6e5=_0x22e6e5-0x142;const _0x34f30b=a132_0x34f3();let _0x307df1=_0x34f30b[_0x22e6e5];return _0x307df1;}const chatIdCache=createTextCache('last_chat_id',a132_0x1f24dc(0x143));function a132_0x34f3(){const _0x204043=['1155885yHfQdQ','2VxlwFE','clear','107999oFHDjw','write','llm/chat','10259980yZvGjw','20FQRZbe','2599278FGunKO','21oKVBwo','4373766OueiCu','9368872wxYJfv','188862LbXKyK'];a132_0x34f3=function(){return _0x204043;};return a132_0x34f3();}export function saveLastChatId(_0x4ec7ac){const _0x373d47=a132_0x1f24dc;chatIdCache[_0x373d47(0x142)](_0x4ec7ac);}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x3e53d1=a132_0x1f24dc;chatIdCache[_0x3e53d1(0x14d)]();}
1
+ function a132_0x4552(){const _0xd7fffe=['86446ktPQtL','25364cBERSp','128EHiGjv','write','2528456wiqvDB','1726446VgcPWG','read','554724tSAyii','835wdvxKR','last_chat_id','13211460CRLDuA','clear','143523vOrbZY','4XbYhuO'];a132_0x4552=function(){return _0xd7fffe;};return a132_0x4552();}const a132_0x2fff29=a132_0x52c3;function a132_0x52c3(_0x409332,_0x578739){_0x409332=_0x409332-0x187;const _0x455216=a132_0x4552();let _0x52c337=_0x455216[_0x409332];return _0x52c337;}(function(_0x4f9327,_0x243726){const _0x509e81=a132_0x52c3,_0x56e5b8=_0x4f9327();while(!![]){try{const _0x1daa20=-parseInt(_0x509e81(0x18b))/0x1*(-parseInt(_0x509e81(0x18c))/0x2)+-parseInt(_0x509e81(0x191))/0x3+parseInt(_0x509e81(0x18d))/0x4*(-parseInt(_0x509e81(0x194))/0x5)+parseInt(_0x509e81(0x193))/0x6+parseInt(_0x509e81(0x190))/0x7+parseInt(_0x509e81(0x18e))/0x8*(parseInt(_0x509e81(0x18a))/0x9)+parseInt(_0x509e81(0x188))/0xa;if(_0x1daa20===_0x243726)break;else _0x56e5b8['push'](_0x56e5b8['shift']());}catch(_0x2eaee1){_0x56e5b8['push'](_0x56e5b8['shift']());}}}(a132_0x4552,0x8ac67));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x2fff29(0x187),'llm/chat');export function saveLastChatId(_0x22770c){const _0x915920=a132_0x2fff29;chatIdCache[_0x915920(0x18f)](_0x22770c);}export function loadLastChatId(){const _0xcd1a0a=a132_0x2fff29;return chatIdCache[_0xcd1a0a(0x192)]();}export function clearLastChatId(){const _0x225533=a132_0x2fff29;chatIdCache[_0x225533(0x189)]();}