@treasuredata/tdx 2026.6.2 → 2026.6.4

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 (235) 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-command.js.map +1 -1
  17. package/dist/commands/claude-statusline-command.js +1 -1
  18. package/dist/commands/claude-usage-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/connection-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/delivery-command.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-campaign-pull-command.js +1 -1
  25. package/dist/commands/engage-campaign-push-command.js +1 -1
  26. package/dist/commands/engage-campaign-validate-command.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/engage-template-pull-command.js +1 -1
  29. package/dist/commands/engage-template-push-command.js +1 -1
  30. package/dist/commands/engage-template-validate-command.js +1 -1
  31. package/dist/commands/job-command.js +1 -1
  32. package/dist/commands/journey-command.js +1 -1
  33. package/dist/commands/journey-validate-command.js +1 -1
  34. package/dist/commands/llm-command.js +1 -1
  35. package/dist/commands/mcp-command.js +1 -1
  36. package/dist/commands/parent-segment-command.js +1 -1
  37. package/dist/commands/policy-command.js +1 -1
  38. package/dist/commands/profile-command.js +1 -1
  39. package/dist/commands/profiles-command.js +1 -1
  40. package/dist/commands/query-command.js +1 -1
  41. package/dist/commands/schedule-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-pull-command.js +1 -1
  46. package/dist/commands/segment-push-command.js +1 -1
  47. package/dist/commands/segment-update-command.js +1 -1
  48. package/dist/commands/segment-use-command.js +1 -1
  49. package/dist/commands/segment-validate-command.js +1 -1
  50. package/dist/commands/segments.js +1 -1
  51. package/dist/commands/show.js +1 -1
  52. package/dist/commands/status-command.js +1 -1
  53. package/dist/commands/table-deleted.js +1 -1
  54. package/dist/commands/tables.js +1 -1
  55. package/dist/commands/unset-command.js +1 -1
  56. package/dist/commands/upgrade-command.js +1 -1
  57. package/dist/commands/use-command.js +1 -1
  58. package/dist/commands/user-command.js +1 -1
  59. package/dist/commands/work-command.js +1 -1
  60. package/dist/commands/workflow-command.js +1 -1
  61. package/dist/core/auth.js +1 -1
  62. package/dist/core/command-output.js +1 -1
  63. package/dist/core/config.d.ts +14 -0
  64. package/dist/core/config.d.ts.map +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/config.js.map +1 -1
  67. package/dist/core/connection-cache.js +1 -1
  68. package/dist/core/constants.js +1 -1
  69. package/dist/core/credential-cache.js +1 -1
  70. package/dist/core/global-context.js +1 -1
  71. package/dist/core/keychain.js +1 -1
  72. package/dist/core/oauth-keychain.js +1 -1
  73. package/dist/core/oauth.js +1 -1
  74. package/dist/core/profile.js +1 -1
  75. package/dist/core/project-config.d.ts +1 -0
  76. package/dist/core/project-config.d.ts.map +1 -1
  77. package/dist/core/project-config.js +1 -1
  78. package/dist/core/project-config.js.map +1 -1
  79. package/dist/core/session.js +1 -1
  80. package/dist/core/user-cache.js +1 -1
  81. package/dist/core/version.js +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/mcp/server.js +1 -1
  84. package/dist/mcp/tools/index.js +1 -1
  85. package/dist/mcp/tools/tdx-run.js +1 -1
  86. package/dist/mcp/tools/tdx-search.d.ts.map +1 -1
  87. package/dist/mcp/tools/tdx-search.js +1 -1
  88. package/dist/mcp/tools/tdx-search.js.map +1 -1
  89. package/dist/mcp/tools/work-create-item.js +1 -1
  90. package/dist/mcp/utils.js +1 -1
  91. package/dist/proxy/claude-usage-tracker.js +1 -1
  92. package/dist/proxy/passthrough-server.js +1 -1
  93. package/dist/proxy/sse-usage-parser.js +1 -1
  94. package/dist/sdk/agent/agent-config.js +1 -1
  95. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  96. package/dist/sdk/agent/agent-yaml.js +1 -1
  97. package/dist/sdk/agent/test/evaluator.js +1 -1
  98. package/dist/sdk/agent/test/executor.js +1 -1
  99. package/dist/sdk/agent/test/index.js +1 -1
  100. package/dist/sdk/agent/test/output.js +1 -1
  101. package/dist/sdk/agent/test/parser.js +1 -1
  102. package/dist/sdk/agent/tool-target-registry.js +1 -1
  103. package/dist/sdk/api.js +1 -1
  104. package/dist/sdk/cas/cas-api-client.js +1 -1
  105. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  106. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  107. package/dist/sdk/cas/index.js +1 -1
  108. package/dist/sdk/cas/pull-workflow.js +1 -1
  109. package/dist/sdk/cas/push-workflow.js +1 -1
  110. package/dist/sdk/client/cdp-api-client.js +1 -1
  111. package/dist/sdk/client/delivery-api-client.js +1 -1
  112. package/dist/sdk/client/endpoints.js +1 -1
  113. package/dist/sdk/client/engage-api-client.js +1 -1
  114. package/dist/sdk/client/http-client.js +1 -1
  115. package/dist/sdk/client/llm-api-client.js +1 -1
  116. package/dist/sdk/client/oauth-refresh.js +1 -1
  117. package/dist/sdk/client/rate-limiter.js +1 -1
  118. package/dist/sdk/client/td-api-client.js +1 -1
  119. package/dist/sdk/client/trino-api-client.js +1 -1
  120. package/dist/sdk/client/workflow-client.js +1 -1
  121. package/dist/sdk/connection-validator.js +1 -1
  122. package/dist/sdk/connection.js +1 -1
  123. package/dist/sdk/delivery.js +1 -1
  124. package/dist/sdk/engage/campaign-pull.js +1 -1
  125. package/dist/sdk/engage/campaign-push.js +1 -1
  126. package/dist/sdk/engage/campaign-validator.js +1 -1
  127. package/dist/sdk/engage/campaign-yaml.js +1 -1
  128. package/dist/sdk/engage/template-pull.js +1 -1
  129. package/dist/sdk/engage/template-push.js +1 -1
  130. package/dist/sdk/engage/template-validator.js +1 -1
  131. package/dist/sdk/engage/template-yaml.js +1 -1
  132. package/dist/sdk/engage/types/campaign-def.js +1 -1
  133. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  134. package/dist/sdk/engage/types/template-schema.js +1 -1
  135. package/dist/sdk/engage.js +1 -1
  136. package/dist/sdk/errors.js +1 -1
  137. package/dist/sdk/index.js +1 -1
  138. package/dist/sdk/io/index.js +1 -1
  139. package/dist/sdk/io/node-filesystem.js +1 -1
  140. package/dist/sdk/job.js +1 -1
  141. package/dist/sdk/journey.js +1 -1
  142. package/dist/sdk/llm/chat-cache.js +1 -1
  143. package/dist/sdk/llm/index.js +1 -1
  144. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  145. package/dist/sdk/llm/model-factors.js +1 -1
  146. package/dist/sdk/llm/user-settings.js +1 -1
  147. package/dist/sdk/personalization.js +1 -1
  148. package/dist/sdk/policy.js +1 -1
  149. package/dist/sdk/query/deleted-table-validation.js +1 -1
  150. package/dist/sdk/query/index.js +1 -1
  151. package/dist/sdk/query/sql-parser.js +1 -1
  152. package/dist/sdk/realtime.js +1 -1
  153. package/dist/sdk/schedule.js +1 -1
  154. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  155. package/dist/sdk/segment/fields-display.js +1 -1
  156. package/dist/sdk/segment/file-discovery.js +1 -1
  157. package/dist/sdk/segment/journey-utils.js +1 -1
  158. package/dist/sdk/segment/journey-validator.js +1 -1
  159. package/dist/sdk/segment/journey-yaml.js +1 -1
  160. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  161. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  162. package/dist/sdk/segment/pull-workflow.js +1 -1
  163. package/dist/sdk/segment/push-recovery.js +1 -1
  164. package/dist/sdk/segment/push-workflow.js +1 -1
  165. package/dist/sdk/segment/resolution-context.js +1 -1
  166. package/dist/sdk/segment/segment-path-parser.js +1 -1
  167. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  168. package/dist/sdk/segment/segment-validator.js +1 -1
  169. package/dist/sdk/segment/target-resolution.js +1 -1
  170. package/dist/sdk/segment/tdx-config.js +1 -1
  171. package/dist/sdk/segment/types/activation-schema.js +1 -1
  172. package/dist/sdk/segment/types/journey-def.js +1 -1
  173. package/dist/sdk/segment/types/journey-schema.js +1 -1
  174. package/dist/sdk/segment/types/segment-def.js +1 -1
  175. package/dist/sdk/segment/types/segment-schema.js +1 -1
  176. package/dist/sdk/segment/validate-files.js +1 -1
  177. package/dist/sdk/segment/yaml-validator.js +1 -1
  178. package/dist/sdk/segment.js +1 -1
  179. package/dist/sdk/types/index.js +1 -1
  180. package/dist/sdk/types/progress.js +1 -1
  181. package/dist/sdk/types/workspace.js +1 -1
  182. package/dist/sdk/user.js +1 -1
  183. package/dist/sdk/util/format-detector.js +1 -1
  184. package/dist/sdk/util/formatters.js +1 -1
  185. package/dist/sdk/util/index.js +1 -1
  186. package/dist/sdk/util/paginate.js +1 -1
  187. package/dist/sdk/util/tree-formatter.js +1 -1
  188. package/dist/sdk/workflow/archive-validation.js +1 -1
  189. package/dist/sdk/workflow/clone-workflow.js +1 -1
  190. package/dist/sdk/workflow/index.js +1 -1
  191. package/dist/sdk/workflow/pull-workflow.js +1 -1
  192. package/dist/sdk/workflow/push-workflow.js +1 -1
  193. package/dist/sdk/workflow/task-graph.js +1 -1
  194. package/dist/sdk/workflow/tdx-config.js +1 -1
  195. package/dist/sdk/workflow/workflow-utils.js +1 -1
  196. package/dist/sdk/workspace/access-tracker.js +1 -1
  197. package/dist/sdk/workspace/frontmatter.js +1 -1
  198. package/dist/sdk/workspace/git.js +1 -1
  199. package/dist/sdk/workspace/index.js +1 -1
  200. package/dist/sdk/workspace/templates.js +1 -1
  201. package/dist/sdk/workspace/weekly.js +1 -1
  202. package/dist/sdk/workspace/wikilinks.js +1 -1
  203. package/dist/test-utils/command-runner.js +1 -1
  204. package/dist/test-utils/factories.js +1 -1
  205. package/dist/test-utils/fixtures.js +1 -1
  206. package/dist/test-utils/http-mock.js +1 -1
  207. package/dist/test-utils/index.js +1 -1
  208. package/dist/utils/async.js +1 -1
  209. package/dist/utils/colors.js +1 -1
  210. package/dist/utils/diff.js +1 -1
  211. package/dist/utils/file-permissions.js +1 -1
  212. package/dist/utils/file-reader.js +1 -1
  213. package/dist/utils/github-releases.js +1 -1
  214. package/dist/utils/global-cache.js +1 -1
  215. package/dist/utils/json-loader.js +1 -1
  216. package/dist/utils/local-cache.js +1 -1
  217. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  218. package/dist/utils/logger/formatters/index.js +1 -1
  219. package/dist/utils/logger/handlers/console-handler.js +1 -1
  220. package/dist/utils/logger/handlers/file-handler.js +1 -1
  221. package/dist/utils/logger/handlers/index.js +1 -1
  222. package/dist/utils/logger/handlers/null-handler.js +1 -1
  223. package/dist/utils/logger/index.js +1 -1
  224. package/dist/utils/logger/logger.js +1 -1
  225. package/dist/utils/logger/types.js +1 -1
  226. package/dist/utils/option-validation.js +1 -1
  227. package/dist/utils/process.js +1 -1
  228. package/dist/utils/prompt.js +1 -1
  229. package/dist/utils/spinner.js +1 -1
  230. package/dist/utils/sse-parser.js +1 -1
  231. package/dist/utils/string-utils.js +1 -1
  232. package/dist/utils/table-ref-parser.js +1 -1
  233. package/dist/utils/tdx-logger.js +1 -1
  234. package/dist/utils/version-check.js +1 -1
  235. package/package.json +1 -1
package/dist/sdk/job.js CHANGED
@@ -1 +1 @@
1
- const a131_0x16db7f=a131_0x460e;(function(_0x221527,_0x1b8a87){const _0x4b3735=a131_0x460e,_0x4d0dfb=_0x221527();while(!![]){try{const _0x2ef299=parseInt(_0x4b3735(0xf4))/0x1*(-parseInt(_0x4b3735(0xe5))/0x2)+parseInt(_0x4b3735(0xf1))/0x3*(-parseInt(_0x4b3735(0xf2))/0x4)+parseInt(_0x4b3735(0xfc))/0x5+-parseInt(_0x4b3735(0xe4))/0x6*(parseInt(_0x4b3735(0xf5))/0x7)+-parseInt(_0x4b3735(0xf9))/0x8*(-parseInt(_0x4b3735(0xe8))/0x9)+parseInt(_0x4b3735(0xf0))/0xa*(-parseInt(_0x4b3735(0xea))/0xb)+-parseInt(_0x4b3735(0xfe))/0xc*(-parseInt(_0x4b3735(0xed))/0xd);if(_0x2ef299===_0x1b8a87)break;else _0x4d0dfb['push'](_0x4d0dfb['shift']());}catch(_0x4fed5c){_0x4d0dfb['push'](_0x4d0dfb['shift']());}}}(a131_0x4241,0x749ec));import{TDApiClient}from'./client/td-api-client.js';function a131_0x460e(_0x3bdbfb,_0x3f6752){_0x3bdbfb=_0x3bdbfb-0xe1;const _0x42419e=a131_0x4241();let _0x460ed1=_0x42419e[_0x3bdbfb];return _0x460ed1;}function normalizeTimestamp(_0x11384b){const _0x36c70c=a131_0x460e;if(!_0x11384b)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x11384b))return _0x11384b;return _0x11384b[_0x36c70c(0xef)](_0x36c70c(0xeb),'Z')['replace']('\x20','T');}function a131_0x4241(){const _0x52090b=['25332HCGanI','2BdpXpc','start_at','kill','10710bjQxzx','trino','99dScuqC','\x20UTC','getJobResult','3318224qrNfVO','end_at','replace','607990WQBJhz','171099fQNYEz','4gZSTGN','submitPrestoJob','404981hUbtcQ','672wIdVCQ','getUserInfo','cancelJob','list','1112MGZkjq','client','map','2252715AVmkST','created_at','60rqIoBy','result','showJob','updated_at'];a131_0x4241=function(){return _0x52090b;};return a131_0x4241();}export class JobSDK{[a131_0x16db7f(0xfa)];constructor(_0x4dcbff){const _0x1c4bb3=a131_0x16db7f;this[_0x1c4bb3(0xfa)]=new TDApiClient(_0x4dcbff);}async[a131_0x16db7f(0xf8)](_0xa22ca9){const _0x1a27da=a131_0x16db7f,_0x5781cc=await this[_0x1a27da(0xfa)]['listJobs'](_0xa22ca9);return _0x5781cc[_0x1a27da(0xfb)](_0x329384=>({..._0x329384,'created_at':normalizeTimestamp(_0x329384[_0x1a27da(0xfd)]),'updated_at':normalizeTimestamp(_0x329384['updated_at']),'start_at':normalizeTimestamp(_0x329384[_0x1a27da(0xe6)]),'end_at':normalizeTimestamp(_0x329384[_0x1a27da(0xee)])}));}async['show'](_0xa52da6){const _0x441aeb=a131_0x16db7f,_0x3899e0=await this[_0x441aeb(0xfa)][_0x441aeb(0xe2)](_0xa52da6);return{..._0x3899e0,'created_at':normalizeTimestamp(_0x3899e0[_0x441aeb(0xfd)]),'updated_at':normalizeTimestamp(_0x3899e0[_0x441aeb(0xe3)]),'start_at':normalizeTimestamp(_0x3899e0[_0x441aeb(0xe6)]),'end_at':normalizeTimestamp(_0x3899e0[_0x441aeb(0xee)])};}async[a131_0x16db7f(0xe7)](_0x36b537){const _0xea643=a131_0x16db7f;await this[_0xea643(0xfa)][_0xea643(0xf7)](_0x36b537);}async['submit'](_0x230768,_0xcdb731,_0x3d4c2a=a131_0x16db7f(0xe9),_0x1ace30){const _0x20cb6e=a131_0x16db7f;return _0x3d4c2a==='hive'?await this[_0x20cb6e(0xfa)]['submitHiveJob'](_0x230768,_0xcdb731,_0x1ace30):await this['client'][_0x20cb6e(0xf3)](_0x230768,_0xcdb731,_0x1ace30);}async[a131_0x16db7f(0xe1)](_0x273dd0){const _0xa2109a=a131_0x16db7f;return await this[_0xa2109a(0xfa)][_0xa2109a(0xec)](_0x273dd0);}async[a131_0x16db7f(0xf6)](){const _0x32a98c=a131_0x16db7f;return await this[_0x32a98c(0xfa)][_0x32a98c(0xf6)]();}}
1
+ const a131_0x2a83ee=a131_0x3e42;(function(_0x24f46a,_0x4eeeed){const _0x59c2ac=a131_0x3e42,_0x1f7213=_0x24f46a();while(!![]){try{const _0x158496=-parseInt(_0x59c2ac(0x153))/0x1+-parseInt(_0x59c2ac(0x148))/0x2*(-parseInt(_0x59c2ac(0x144))/0x3)+-parseInt(_0x59c2ac(0x147))/0x4+parseInt(_0x59c2ac(0x14e))/0x5*(-parseInt(_0x59c2ac(0x15c))/0x6)+parseInt(_0x59c2ac(0x156))/0x7+parseInt(_0x59c2ac(0x146))/0x8*(-parseInt(_0x59c2ac(0x14a))/0x9)+-parseInt(_0x59c2ac(0x155))/0xa*(-parseInt(_0x59c2ac(0x159))/0xb);if(_0x158496===_0x4eeeed)break;else _0x1f7213['push'](_0x1f7213['shift']());}catch(_0x4a7666){_0x1f7213['push'](_0x1f7213['shift']());}}}(a131_0x42fc,0x652e8));import{TDApiClient}from'./client/td-api-client.js';function normalizeTimestamp(_0x5eb861){const _0x386180=a131_0x3e42;if(!_0x5eb861)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x5eb861))return _0x5eb861;return _0x5eb861['replace'](_0x386180(0x14f),'Z')[_0x386180(0x149)]('\x20','T');}function a131_0x42fc(){const _0x1800e8=['kill','hive','1453991JwFOca','end_at','created_at','4017786jwabIi','submitHiveJob','cancelJob','showJob','result','33QADliZ','list','78088JwvBTO','342292JVVzHZ','3034bONiQy','replace','81dagBOB','client','updated_at','map','5TxgsFc','\x20UTC','submitPrestoJob','getUserInfo','listJobs','796502gzrvRq','getJobResult','130qmSJvQ','2232685gNvcIr'];a131_0x42fc=function(){return _0x1800e8;};return a131_0x42fc();}function a131_0x3e42(_0x57decc,_0x100493){_0x57decc=_0x57decc-0x142;const _0x42fc83=a131_0x42fc();let _0x3e42ef=_0x42fc83[_0x57decc];return _0x3e42ef;}export class JobSDK{[a131_0x2a83ee(0x14b)];constructor(_0x1c3d23){const _0x14c55a=a131_0x2a83ee;this[_0x14c55a(0x14b)]=new TDApiClient(_0x1c3d23);}async[a131_0x2a83ee(0x145)](_0x12c9bd){const _0x2d8b27=a131_0x2a83ee,_0x4d9965=await this[_0x2d8b27(0x14b)][_0x2d8b27(0x152)](_0x12c9bd);return _0x4d9965[_0x2d8b27(0x14d)](_0x4e5f52=>({..._0x4e5f52,'created_at':normalizeTimestamp(_0x4e5f52[_0x2d8b27(0x15b)]),'updated_at':normalizeTimestamp(_0x4e5f52[_0x2d8b27(0x14c)]),'start_at':normalizeTimestamp(_0x4e5f52['start_at']),'end_at':normalizeTimestamp(_0x4e5f52[_0x2d8b27(0x15a)])}));}async['show'](_0x43d51d){const _0xf30d96=a131_0x2a83ee,_0x4c56f8=await this[_0xf30d96(0x14b)][_0xf30d96(0x142)](_0x43d51d);return{..._0x4c56f8,'created_at':normalizeTimestamp(_0x4c56f8[_0xf30d96(0x15b)]),'updated_at':normalizeTimestamp(_0x4c56f8[_0xf30d96(0x14c)]),'start_at':normalizeTimestamp(_0x4c56f8['start_at']),'end_at':normalizeTimestamp(_0x4c56f8[_0xf30d96(0x15a)])};}async[a131_0x2a83ee(0x157)](_0x405026){const _0x1d7dc7=a131_0x2a83ee;await this[_0x1d7dc7(0x14b)][_0x1d7dc7(0x15e)](_0x405026);}async['submit'](_0xbdf55,_0x3c8f17,_0x82faf8='trino',_0x2fe2dc){const _0x18deb3=a131_0x2a83ee;return _0x82faf8===_0x18deb3(0x158)?await this['client'][_0x18deb3(0x15d)](_0xbdf55,_0x3c8f17,_0x2fe2dc):await this['client'][_0x18deb3(0x150)](_0xbdf55,_0x3c8f17,_0x2fe2dc);}async[a131_0x2a83ee(0x143)](_0x330d46){const _0x408357=a131_0x2a83ee;return await this[_0x408357(0x14b)][_0x408357(0x154)](_0x330d46);}async['getUserInfo'](){const _0xfdb644=a131_0x2a83ee;return await this[_0xfdb644(0x14b)][_0xfdb644(0x151)]();}}
@@ -1 +1 @@
1
- const a132_0x529db3=a132_0x53e0;(function(_0x42b6e9,_0x1a2c19){const _0x5c9faf=a132_0x53e0,_0x159a12=_0x42b6e9();while(!![]){try{const _0xdd4031=parseInt(_0x5c9faf(0x113))/0x1+parseInt(_0x5c9faf(0x143))/0x2*(parseInt(_0x5c9faf(0x165))/0x3)+parseInt(_0x5c9faf(0x15c))/0x4+parseInt(_0x5c9faf(0x15a))/0x5*(-parseInt(_0x5c9faf(0xf8))/0x6)+-parseInt(_0x5c9faf(0x10a))/0x7*(-parseInt(_0x5c9faf(0x109))/0x8)+parseInt(_0x5c9faf(0x12e))/0x9*(-parseInt(_0x5c9faf(0x127))/0xa)+-parseInt(_0x5c9faf(0x176))/0xb;if(_0xdd4031===_0x1a2c19)break;else _0x159a12['push'](_0x159a12['shift']());}catch(_0x20380e){_0x159a12['push'](_0x159a12['shift']());}}}(a132_0x3d95,0xd5890));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x5504ea){const _0x5bb829=a132_0x53e0;return _0x5504ea['journeyBundleId']??_0x5504ea[_0x5bb829(0x173)]?.[_0x5bb829(0xfe)]??undefined;}function getVersionNumber(_0x340ba7){const _0xc53953=a132_0x53e0;return _0x340ba7['versionNumber']??_0x340ba7[_0xc53953(0x173)]?.[_0xc53953(0x12c)]??0x0;}function getState(_0x408c36){const _0x205487=a132_0x53e0;return _0x408c36['state']??_0x408c36[_0x205487(0x173)]?.[_0x205487(0x162)];}export function deduplicateJourneysByBundle(_0x5f3c4d){const _0x22552d=a132_0x53e0,_0x487c87=new Map();let _0x2f8562=0x0;for(const _0xfd42c5 of _0x5f3c4d){const _0x33b7d4=getBundleId(_0xfd42c5);if(!_0x33b7d4){const _0x11b5ba='no-bundle-'+(_0xfd42c5['id']??_0x22552d(0x179)+_0x2f8562++);_0x487c87[_0x22552d(0x129)](_0x11b5ba,_0xfd42c5);continue;}const _0x2d7f68=_0x487c87[_0x22552d(0x107)](_0x33b7d4);if(!_0x2d7f68)_0x487c87['set'](_0x33b7d4,_0xfd42c5);else{const _0x327861=getState(_0x2d7f68)===_0x22552d(0x139),_0x3c5f70=getState(_0xfd42c5)===_0x22552d(0x139);if(_0x3c5f70&&!_0x327861)_0x487c87[_0x22552d(0x129)](_0x33b7d4,_0xfd42c5);else{if(!_0x3c5f70&&_0x327861){}else{const _0x45964d=getVersionNumber(_0x2d7f68),_0x4d12a8=getVersionNumber(_0xfd42c5);_0x4d12a8>_0x45964d&&_0x487c87[_0x22552d(0x129)](_0x33b7d4,_0xfd42c5);}}}}return Array[_0x22552d(0x14c)](_0x487c87[_0x22552d(0x159)]());}const VALID_JOURNEY_STATES=new Set([a132_0x529db3(0x100),a132_0x529db3(0x156),a132_0x529db3(0x139)]);export function parseJourneyState(_0xd5fdbf){const _0x411a7a=a132_0x529db3;if(typeof _0xd5fdbf===_0x411a7a(0x16c)&&VALID_JOURNEY_STATES[_0x411a7a(0x160)](_0xd5fdbf))return _0xd5fdbf;return _0x411a7a(0x100);}export function entityToJourneyListItem(_0xa4cf76,_0x4bfae3){const _0x507f5e=a132_0x529db3,_0x87abb7=_0xa4cf76[_0x507f5e(0x173)];return{'id':_0xa4cf76['id'],'name':_0x87abb7['name']??'','journeyBundleName':_0x87abb7[_0x507f5e(0x11e)]??_0x87abb7[_0x507f5e(0x16e)]??'','journeyBundleId':_0x87abb7[_0x507f5e(0xfe)]??'','versionNumber':_0x87abb7['versionNumber'],'description':_0x87abb7[_0x507f5e(0x17d)]??null,'state':parseJourneyState(_0x87abb7[_0x507f5e(0x162)]),'paused':_0x87abb7['paused']??![],'audienceId':_0x4bfae3,'folderId':_0x87abb7['segmentFolderId']??_0xa4cf76[_0x507f5e(0x119)]?.[_0x507f5e(0x174)]?.[_0x507f5e(0x12b)]?.['id']??null,'createdAt':_0x87abb7[_0x507f5e(0x175)]??'','updatedAt':_0x87abb7['updatedAt']??''};}function a132_0x3d95(){const _0x28fe38=['branch','idx-','out','journeyStages','resumeJourney','description','variants','entryCriteria','exitOrJumpSize','exitInflux','excluded','stage','all','6580908oyAplr','resolveRootFolderId','branches','audienceId','getParentSegmentFull','type','journeyBundleId','exitCriterias','draft','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','exit_criteria','Journey\x20not\x20found:\x20','pauseJourney','variant','map','get','activationStepsById','64pHgBgr','648053kdrDJZ','journeyId','getBundle','listJourneysWithDetails','NOT_FOUND','entryInflux','outtime_stage_','intime_journey','filter','843781EPZBxB','ABTest','paused','activation','JOURNEY_NOT_FOUND','reduce','relationships','getConversionSankeyChart','segmentId','listJourneysWithFolders','journeyStageId','journeyBundleName','push','AbTest','timedOutPath','getActivation','listJourneysFromParentSegment','createJourneyVersion','fetchTrafficRaw','getTrafficData','290ptaeiL','milestoneInflux','set','getColumnMapping','data','versionNumber','createJourney','122193hnEpAE','conversion','updatedAt','step','updateJourney','conditionSegmentId','conditions','run','listJourneyActivations','history','milestone','launched','getJourneyStatistics','resume','getJourneyBundle','listJourneysWithDetailsFromParentSegment','Wait','sort','_variant_','rootFolderId','getStatistics','49598fMzaqx','listActivationsFlat','lastVersionNumber','enteredSize','createVersion','runJourney','getJourney','fixed','isArray','from','journeys','latestJourneyId','applyVersionDeduplication','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listEntitiesByFolder','client','intime_stage_','steps','journey','simulation','toLowerCase','listVersions','values','5CMvGvE','listJourneys','6079072Qaqvgo','size','waitCondition','replace','has','getLatestJourneyId','state','intime_goal','exitOrJumpRate','159KOhTqK','goal','DecisionPoint','getActivationSankeyChart','completionRate','\x20in\x20journey\x20','length','string','includeAllVersions','name','_exit_','outtime_journey','pause','getJourneyActivation','attributes','parentFolder','createdAt','22586707janMnp','Journey\x20activation\x20step\x20not\x20found:\x20'];a132_0x3d95=function(){return _0x28fe38;};return a132_0x3d95();}function convertToColumnId(_0x474254){const _0x5b5bef=a132_0x529db3;return _0x474254[_0x5b5bef(0x15f)](/-/g,'_');}function getStepEntries(_0x5e0158){const _0x5ecf7c=a132_0x529db3;if(!_0x5e0158)return[];if(Array['isArray'](_0x5e0158))return _0x5e0158[_0x5ecf7c(0x106)](_0x388f06=>[_0x388f06['id'],_0x388f06]);return Object['entries'](_0x5e0158);}export function flattenJourneyActivation(_0x5e488b){const {activationParams:_0x1694cc,activationId:_0x95b210,runAfterJourneyRefresh:_0x1d572a}=_0x5e488b['attributes'];return{'id':_0x5e488b['id'],'activationId':_0x95b210,'runAfterJourneyRefresh':_0x1d572a,..._0x1694cc};}function col(_0x32864b,_0x3269a5={}){const _0x32ccd1=a132_0x529db3;return{'column':_0x32864b,'direction':null,'stageIndex':null,'stageName':null,'category':_0x32ccd1(0x14a),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x3269a5};}export function generateColumnMapping(_0x50d972){const _0x4f87df=a132_0x529db3,_0x512fe3=[];_0x512fe3[_0x4f87df(0x11f)](col('cdp_customer_id')),_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x111),{'direction':'in','category':_0x4f87df(0x155)})),_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x170),{'direction':_0x4f87df(0x17a),'category':'journey'}));_0x50d972[_0x4f87df(0x173)][_0x4f87df(0x166)]&&_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x163),{'direction':'in','category':_0x4f87df(0x166),'detail':_0x50d972[_0x4f87df(0x173)][_0x4f87df(0x166)][_0x4f87df(0x16e)]||null}));const _0xdfc4c1=_0x50d972[_0x4f87df(0x173)][_0x4f87df(0x17b)]||[];for(let _0x4088ed=0x0;_0x4088ed<_0xdfc4c1[_0x4f87df(0x16b)];_0x4088ed++){const _0x327e2b=_0xdfc4c1[_0x4088ed],_0x254c82=_0x327e2b[_0x4f87df(0x16e)],_0x3715c2={'stageIndex':_0x4088ed,'stageName':_0x254c82},_0x4e8741=_0x327e2b[_0x4f87df(0x17f)]?.[_0x4f87df(0x16e)]||null;_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x153)+_0x4088ed,{..._0x3715c2,'direction':'in','category':_0x4f87df(0x183),'detail':_0x4e8741})),_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x110)+_0x4088ed,{..._0x3715c2,'direction':'out','category':_0x4f87df(0x183),'detail':_0x4e8741}));_0x327e2b[_0x4f87df(0x138)]&&_0x512fe3[_0x4f87df(0x11f)](col('intime_stage_'+_0x4088ed+'_milestone',{..._0x3715c2,'direction':'in','category':_0x4f87df(0x138),'detail':_0x327e2b[_0x4f87df(0x138)]['name']||null}));const _0x247421=_0x327e2b[_0x4f87df(0xff)]||_0x327e2b['exitCriteria']||[];for(let _0x1dfa1f=0x0;_0x1dfa1f<_0x247421['length'];_0x1dfa1f++){_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x153)+_0x4088ed+_0x4f87df(0x16f)+_0x1dfa1f,{..._0x3715c2,'direction':'in','category':_0x4f87df(0x102),'detail':_0x247421[_0x1dfa1f][_0x4f87df(0x16e)]||null}));}const _0xd8ab75=getStepEntries(_0x327e2b[_0x4f87df(0x154)]);for(const [_0x2c2cdd,_0x286cff]of _0xd8ab75){const _0x1d95d7=convertToColumnId(_0x2c2cdd),_0x106dc5=_0x286cff[_0x4f87df(0xfd)]||null,_0x574c3b=_0x286cff[_0x4f87df(0x16e)]||null,_0x41afc2={..._0x3715c2,'stepType':_0x106dc5,'stepName':_0x574c3b,'stepId':_0x2c2cdd};_0x512fe3['push'](col('intime_stage_'+_0x4088ed+'_'+_0x1d95d7,{..._0x41afc2,'direction':'in','category':_0x4f87df(0x131)})),_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x110)+_0x4088ed+'_'+_0x1d95d7,{..._0x41afc2,'direction':_0x4f87df(0x17a),'category':'step'}));if(_0x286cff['type']===_0x4f87df(0x167)&&_0x286cff[_0x4f87df(0xfa)])for(const _0x3f600a of _0x286cff['branches']){_0x3f600a[_0x4f87df(0x11b)]&&_0x512fe3[_0x4f87df(0x11f)](col('intime_stage_'+_0x4088ed+'_'+_0x1d95d7+'_'+_0x3f600a[_0x4f87df(0x11b)],{..._0x41afc2,'direction':'in','category':_0x4f87df(0x178),'detail':_0x3f600a[_0x4f87df(0x16e)]||(_0x3f600a[_0x4f87df(0x182)]?'Excluded\x20profiles':null)}));}if((_0x286cff['type']===_0x4f87df(0x120)||_0x286cff[_0x4f87df(0xfd)]===_0x4f87df(0x114))&&_0x286cff[_0x4f87df(0x17e)])for(const _0x4bb7a0 of _0x286cff[_0x4f87df(0x17e)]){_0x4bb7a0['id']&&_0x512fe3[_0x4f87df(0x11f)](col(_0x4f87df(0x153)+_0x4088ed+'_'+_0x1d95d7+_0x4f87df(0x140)+convertToColumnId(_0x4bb7a0['id']),{..._0x41afc2,'direction':'in','category':_0x4f87df(0x105),'detail':_0x4bb7a0['name']||null}));}if(_0x286cff[_0x4f87df(0xfd)]==='WaitStep'||_0x286cff[_0x4f87df(0xfd)]===_0x4f87df(0x13e)){const _0x35e16e=[];if(_0x286cff['conditionSegmentId'])_0x35e16e[_0x4f87df(0x11f)](_0x286cff[_0x4f87df(0x133)]);else{if(Array[_0x4f87df(0x14b)](_0x286cff[_0x4f87df(0x134)]))for(const _0x567ef8 of _0x286cff[_0x4f87df(0x134)]){_0x567ef8[_0x4f87df(0x11b)]&&!_0x567ef8[_0x4f87df(0x121)]&&_0x35e16e[_0x4f87df(0x11f)](_0x567ef8[_0x4f87df(0x11b)]);}else _0x286cff[_0x4f87df(0x15e)]?.[_0x4f87df(0x11b)]&&_0x35e16e[_0x4f87df(0x11f)](_0x286cff[_0x4f87df(0x15e)][_0x4f87df(0x11b)]);}for(const _0x34c539 of _0x35e16e){_0x512fe3[_0x4f87df(0x11f)](col('intime_stage_'+_0x4088ed+'_'+_0x1d95d7+'_'+_0x34c539,{..._0x41afc2,'direction':'in','category':_0x4f87df(0x178)}));}}}}return _0x512fe3[_0x4f87df(0x11f)](col('time')),_0x512fe3;}export function aggregateJourneyHistory(_0x24b277){const _0x1ab97e=a132_0x529db3,_0x24326d=_0x24b277['reduce']((_0x1836a6,_0x36ff6e)=>_0x1836a6+(_0x36ff6e[_0x1ab97e(0x10f)]??0x0),0x0),_0x39f2fd=_0x24b277[_0x1ab97e(0x118)]((_0x24c95b,_0x2672d9)=>_0x24c95b+(_0x2672d9['goalInflux']??0x0),0x0),_0x2efa01=_0x24b277[_0x1ab97e(0x118)]((_0x524ccd,_0x25a28a)=>_0x524ccd+((_0x25a28a[_0x1ab97e(0x181)]??0x0)+(_0x25a28a['jumpInflux']??0x0)),0x0),_0x234eb5=_0x24b277[_0x24b277[_0x1ab97e(0x16b)]-0x1];return{'size':_0x234eb5?.['size']??0x0,'entered':_0x24326d,'goal_achieved':_0x39f2fd,'completion_rate':_0x39f2fd&&_0x24326d?_0x39f2fd/_0x24326d*0x64:0x0,'exit_or_jump':_0x2efa01,'exit_or_jump_rate':_0x2efa01&&_0x24326d?_0x2efa01/_0x24326d*0x64:0x0};}function a132_0x53e0(_0x45e7df,_0x30d719){_0x45e7df=_0x45e7df-0xf8;const _0x3d9583=a132_0x3d95();let _0x53e018=_0x3d9583[_0x45e7df];return _0x53e018;}export function aggregateStageHistory(_0x1fad53){const _0x338922=a132_0x529db3,_0x2f088d=_0x1fad53['reduce']((_0x54e04b,_0x31fbba)=>_0x54e04b+(_0x31fbba[_0x338922(0x10f)]??0x0),0x0),_0x2c5434=_0x1fad53[_0x338922(0x118)]((_0x70cb50,_0xc31ed9)=>_0x70cb50+(_0xc31ed9[_0x338922(0x128)]??0x0),0x0),_0x26125b=_0x1fad53['reduce']((_0x11da07,_0x249109)=>_0x11da07+((_0x249109[_0x338922(0x181)]??0x0)+(_0x249109['jumpInflux']??0x0)),0x0),_0x752622=_0x1fad53[_0x1fad53[_0x338922(0x16b)]-0x1];return{'size':_0x752622?.[_0x338922(0x15d)]??0x0,'entered':_0x2f088d,'milestone':_0x2c5434,'milestone_rate':_0x2c5434&&_0x2f088d?_0x2c5434/_0x2f088d*0x64:0x0,'exit_or_jump':_0x26125b,'exit_or_jump_rate':_0x26125b&&_0x2f088d?_0x26125b/_0x2f088d*0x64:0x0};}export function assembleJourneyStats(_0x37c2de,_0x565f46){const _0x1d84b0=a132_0x529db3,_0x5a8580=!!(_0x565f46?.[_0x1d84b0(0x14c)]||_0x565f46?.['to'])&&!!_0x37c2de[_0x1d84b0(0x137)]?.[_0x1d84b0(0x16b)];if(_0x5a8580){const _0x52cc43=aggregateJourneyHistory(_0x37c2de['history']),_0x197416={'journey_id':_0x37c2de[_0x1d84b0(0x10b)],..._0x565f46?.[_0x1d84b0(0x14c)]&&{'from':_0x565f46[_0x1d84b0(0x14c)]},..._0x565f46?.['to']&&{'to':_0x565f46['to']},..._0x52cc43};return _0x565f46?.['includeHistory']&&(_0x197416[_0x1d84b0(0x137)]=_0x37c2de[_0x1d84b0(0x137)]),_0x197416;}return{'journey_id':_0x37c2de[_0x1d84b0(0x10b)],'size':_0x37c2de[_0x1d84b0(0x15d)],'entered':_0x37c2de[_0x1d84b0(0x146)],'goal_achieved':_0x37c2de['goalSize'],'completion_rate':_0x37c2de[_0x1d84b0(0x169)],'exit_or_jump':_0x37c2de[_0x1d84b0(0x180)],'exit_or_jump_rate':_0x37c2de[_0x1d84b0(0x164)]};}export function formatVersionsFromBundle(_0x1a3af7){const _0xc2bac9=a132_0x529db3,_0x8cfc8c=_0x1a3af7['journeys']['map'](_0x23992c=>({'journeyId':_0x23992c['id'],'versionNumber':_0x23992c[_0xc2bac9(0x173)][_0xc2bac9(0x12c)]??0x0,'name':_0x23992c[_0xc2bac9(0x173)][_0xc2bac9(0x16e)],'state':_0x23992c['attributes'][_0xc2bac9(0x162)],'paused':_0x23992c['attributes'][_0xc2bac9(0x115)],'createdAt':_0x23992c[_0xc2bac9(0x173)]['createdAt'],'updatedAt':_0x23992c[_0xc2bac9(0x173)][_0xc2bac9(0x130)]}));return _0x8cfc8c[_0xc2bac9(0x13f)]((_0x59a17d,_0x2cf41d)=>_0x59a17d['versionNumber']-_0x2cf41d[_0xc2bac9(0x12c)]),_0x8cfc8c;}export function synthesizePreBundleVersion(_0x4ec443){const _0xb1139c=a132_0x529db3;return{'journeyId':_0x4ec443['id'],'versionNumber':0x1,'name':_0x4ec443['attributes']['name'],'state':_0x4ec443[_0xb1139c(0x173)][_0xb1139c(0x162)],'paused':_0x4ec443[_0xb1139c(0x173)][_0xb1139c(0x115)],'createdAt':_0x4ec443[_0xb1139c(0x173)]['createdAt'],'updatedAt':_0x4ec443[_0xb1139c(0x173)]['updatedAt']};}export function buildStageNameMap(_0x2d1b7c){const _0x5e1563=a132_0x529db3;return new Map(_0x2d1b7c[_0x5e1563(0x173)][_0x5e1563(0x17b)]?.[_0x5e1563(0x106)](_0x49c08a=>[_0x49c08a['id'],_0x49c08a[_0x5e1563(0x16e)]])??[]);}export class JourneySDK{[a132_0x529db3(0x152)];constructor(_0x57fe22){this['client']=new CDPApiClient(_0x57fe22);}[a132_0x529db3(0x14f)](_0x561259,_0x141118){return _0x141118?_0x561259:deduplicateJourneysByBundle(_0x561259);}async[a132_0x529db3(0xf9)](_0x4101e8){const _0x16405c=a132_0x529db3,_0x2f2c07=await this[_0x16405c(0x152)][_0x16405c(0xfc)](_0x4101e8);return _0x2f2c07[_0x16405c(0x141)]??undefined;}async[a132_0x529db3(0x10d)](_0x1c9526,_0x118158){const _0x5f438c=a132_0x529db3;try{const _0x89a551=await this[_0x5f438c(0x152)][_0x5f438c(0x10d)](_0x1c9526);return{'journeys':this[_0x5f438c(0x14f)](_0x89a551[_0x5f438c(0x14d)],_0x118158),'activationStepsById':_0x89a551[_0x5f438c(0x108)]};}catch(_0x159e46){if(isHttp404Error(_0x159e46))return{'journeys':[],'activationStepsById':new Map()};throw _0x159e46;}}async['listJourneysFromParentSegment'](_0x1b5a1e,_0x3d363d,_0x4a6040){const _0x32b063=a132_0x529db3;let _0x11a96a=_0x3d363d;if(!_0x11a96a)try{_0x11a96a=await this[_0x32b063(0xf9)](_0x1b5a1e);}catch(_0x58b297){if(isHttp404Error(_0x58b297))return[];throw _0x58b297;}if(!_0x11a96a)return[];let _0x1172ba;if(_0x4a6040?.[_0x32b063(0x16d)])_0x1172ba=await this[_0x32b063(0x152)][_0x32b063(0x15b)](_0x11a96a);else{const _0x22cf43=await this[_0x32b063(0x152)][_0x32b063(0x151)](_0x11a96a,0x20,![]),_0x3a3961=_0x22cf43[_0x32b063(0x12b)],_0x3add1e=_0x3a3961[_0x32b063(0x112)](_0x51b225=>_0x51b225['type']==='journey');_0x1172ba=_0x3add1e[_0x32b063(0x106)](_0x520200=>entityToJourneyListItem(_0x520200,_0x1b5a1e));}return this[_0x32b063(0x14f)](_0x1172ba,_0x4a6040?.['includeAllVersions']);}async[a132_0x529db3(0x11c)](_0x395152,_0x451be0,_0x57828c){const _0x43c600=a132_0x529db3;if(!_0x451be0)return{'journeys':[],'folders':[]};const _0x40b578=await this[_0x43c600(0x152)][_0x43c600(0x151)](_0x451be0,0x20,![]),_0x33b121=_0x40b578['data'],_0xc211a8=_0x33b121['filter'](_0x7dec32=>_0x7dec32['type']==='folder-segment'&&_0x7dec32['id']!==_0x451be0),_0x546e33=_0xc211a8[_0x43c600(0x106)](_0x464ab6=>({'id':_0x464ab6['id'],'name':_0x464ab6[_0x43c600(0x173)][_0x43c600(0x16e)]})),_0x15f3c1=_0x33b121[_0x43c600(0x112)](_0x2f6873=>_0x2f6873[_0x43c600(0xfd)]===_0x43c600(0x155)),_0x2ce145=_0x15f3c1[_0x43c600(0x106)](_0x31ce66=>entityToJourneyListItem(_0x31ce66,_0x395152));return{'journeys':this['applyVersionDeduplication'](_0x2ce145,_0x57828c?.['includeAllVersions']),'folders':_0x546e33};}async[a132_0x529db3(0x13d)](_0x1ea568,_0x35c0ea){const _0x5b82e2=a132_0x529db3;let _0x3d16d0;try{_0x3d16d0=await this[_0x5b82e2(0xf9)](_0x1ea568);}catch(_0x4910df){if(isHttp404Error(_0x4910df))return{'journeys':[],'activationStepsById':new Map()};throw _0x4910df;}if(!_0x3d16d0)return{'journeys':[],'activationStepsById':new Map()};const _0x3a3d3d=await this[_0x5b82e2(0x10d)](_0x3d16d0,_0x35c0ea?.['includeAllVersions']);return{'journeys':this[_0x5b82e2(0x14f)](_0x3a3d3d['journeys'],_0x35c0ea?.[_0x5b82e2(0x16d)]),'activationStepsById':_0x3a3d3d[_0x5b82e2(0x108)]};}async[a132_0x529db3(0x149)](_0x19f387){const _0x163cb6=a132_0x529db3;try{return await this[_0x163cb6(0x152)][_0x163cb6(0x149)](_0x19f387);}catch(_0x2e55f2){if(isHttp404Error(_0x2e55f2))throw new SDKError(ErrorCode[_0x163cb6(0x117)],_0x163cb6(0x103)+_0x19f387,_0x2e55f2);throw _0x2e55f2;}}async['resolveJourneyId'](_0x3ef8b5,_0x51c5cd){const _0x140da8=a132_0x529db3,_0x5db786=await this[_0x140da8(0x123)](_0x3ef8b5),_0x300d80=_0x5db786['find'](_0x2bcffa=>_0x2bcffa[_0x140da8(0x11e)][_0x140da8(0x157)]()===_0x51c5cd['toLowerCase']());if(!_0x300d80)throw new SDKError(ErrorCode[_0x140da8(0x117)],'Journey\x20not\x20found:\x20'+_0x51c5cd,undefined,{'helpText':_0x140da8(0x150)});return _0x300d80['id'];}async[a132_0x529db3(0x142)](_0x41a05b,_0x4abb3e){const _0x5a40aa=a132_0x529db3;try{return await this[_0x5a40aa(0x152)][_0x5a40aa(0x13a)](_0x41a05b,_0x4abb3e);}catch(_0x1127b7){if(isHttp404Error(_0x1127b7))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x5a40aa(0x103)+_0x41a05b,_0x1127b7);throw _0x1127b7;}}async[a132_0x529db3(0x126)](_0x71bc88,_0x5435bf){const _0x2ed780=a132_0x529db3,_0x2c6521={'from':_0x5435bf?.[_0x2ed780(0x14c)],'to':_0x5435bf?.['to'],'limit':_0x5435bf?.['limit']},_0x40a73d=_0x5435bf?.['type']!==_0x2ed780(0x12f);try{const [_0x2c402f,_0x2ee4ec]=await Promise[_0x2ed780(0x184)]([this['fetchTrafficRaw'](_0x71bc88,_0x5435bf?.['type'],_0x2c6521),_0x40a73d?this[_0x2ed780(0x149)](_0x71bc88):undefined]);if(_0x2c402f[_0x2ed780(0x116)]&&_0x2ee4ec){const _0x4e8b43=buildStageNameMap(_0x2ee4ec);_0x2c402f[_0x2ed780(0x116)]=_0x2c402f[_0x2ed780(0x116)]['map'](_0x5c3c52=>({..._0x5c3c52,'journeyStageName':_0x4e8b43[_0x2ed780(0x107)](_0x5c3c52[_0x2ed780(0x11d)])??_0x5c3c52[_0x2ed780(0x11d)]}));}return _0x2c402f;}catch(_0x34777c){if(isHttp404Error(_0x34777c))throw new SDKError(ErrorCode[_0x2ed780(0x117)],'Journey\x20not\x20found:\x20'+_0x71bc88,_0x34777c);throw _0x34777c;}}async[a132_0x529db3(0x125)](_0x11e20e,_0x2b05fc,_0x4427d3){const _0x133f04=a132_0x529db3;if(_0x2b05fc===_0x133f04(0x12f)){const _0x34ae76=await this[_0x133f04(0x152)]['getConversionSankeyChart'](_0x11e20e,_0x4427d3);return{'conversion':_0x34ae76};}if(_0x2b05fc===_0x133f04(0x116)){const _0x3d9eaf=await this[_0x133f04(0x152)][_0x133f04(0x168)](_0x11e20e,_0x4427d3);return{'activation':_0x3d9eaf};}const [_0x332f2a,_0x3776f1]=await Promise[_0x133f04(0x184)]([this[_0x133f04(0x152)][_0x133f04(0x11a)](_0x11e20e,_0x4427d3),this[_0x133f04(0x152)][_0x133f04(0x168)](_0x11e20e,_0x4427d3)]);return{'conversion':_0x332f2a,'activation':_0x3776f1};}async[a132_0x529db3(0x171)](_0x3fa222){const _0x539cee=a132_0x529db3;try{return await this[_0x539cee(0x152)][_0x539cee(0x104)](_0x3fa222);}catch(_0xfd5f1b){if(isHttp404Error(_0xfd5f1b))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x539cee(0x103)+_0x3fa222,_0xfd5f1b);throw _0xfd5f1b;}}async[a132_0x529db3(0x13b)](_0xbb2f58){const _0x41e322=a132_0x529db3;try{return await this[_0x41e322(0x152)][_0x41e322(0x17c)](_0xbb2f58);}catch(_0x45872e){if(isHttp404Error(_0x45872e))throw new SDKError(ErrorCode[_0x41e322(0x117)],'Journey\x20not\x20found:\x20'+_0xbb2f58,_0x45872e);throw _0x45872e;}}async[a132_0x529db3(0x135)](_0x237598){const _0x2be6bb=a132_0x529db3;try{return await this['client'][_0x2be6bb(0x148)](_0x237598);}catch(_0x2a5335){if(isHttp404Error(_0x2a5335))throw new SDKError(ErrorCode[_0x2be6bb(0x117)],_0x2be6bb(0x103)+_0x237598,_0x2a5335);throw _0x2a5335;}}async['create'](_0x5b8791){const _0x123711=a132_0x529db3;return await this[_0x123711(0x152)][_0x123711(0x12d)](_0x5b8791);}async['update'](_0x5678ba,_0x742573){const _0x488c28=a132_0x529db3;try{return await this[_0x488c28(0x152)][_0x488c28(0x132)](_0x5678ba,_0x742573);}catch(_0x456475){if(isHttp404Error(_0x456475))throw new SDKError(ErrorCode[_0x488c28(0x117)],'Journey\x20not\x20found:\x20'+_0x5678ba,_0x456475);throw _0x456475;}}async[a132_0x529db3(0x122)](_0x243718,_0x5b2a73){const _0x481d21=a132_0x529db3;try{return await this[_0x481d21(0x152)][_0x481d21(0x172)](_0x243718,_0x5b2a73);}catch(_0x4b383b){if(isHttp404Error(_0x4b383b))throw new SDKError(ErrorCode[_0x481d21(0x10e)],_0x481d21(0x177)+_0x5b2a73+_0x481d21(0x16a)+_0x243718,_0x4b383b);throw _0x4b383b;}}async['listActivations'](_0x458646){const _0x14fb32=a132_0x529db3;try{return await this[_0x14fb32(0x152)][_0x14fb32(0x136)](_0x458646);}catch(_0x171163){if(isHttp404Error(_0x171163))return[];throw _0x171163;}}async[a132_0x529db3(0x144)](_0x14a0e9){const _0x35a83a=await this['listActivations'](_0x14a0e9);return _0x35a83a['map'](flattenJourneyActivation);}async['createActivation'](_0x6bb3ac,_0x5c469a){return await this['client']['createJourneyActivation'](_0x6bb3ac,_0x5c469a);}async[a132_0x529db3(0x12a)](_0x42f9b5){const _0x51bf1c=a132_0x529db3,_0x19b8f4=await this[_0x51bf1c(0x149)](_0x42f9b5),_0x2d7f53=generateColumnMapping(_0x19b8f4);return{'journeyId':_0x19b8f4['id'],'journeyName':_0x19b8f4[_0x51bf1c(0x173)][_0x51bf1c(0x16e)],'database':'cdp_audience_'+_0x19b8f4[_0x51bf1c(0x173)][_0x51bf1c(0xfb)],'table':'journey_'+_0x19b8f4['id'],'columns':_0x2d7f53};}async[a132_0x529db3(0x10c)](_0x207c93){const _0xb29dea=a132_0x529db3;return this['client'][_0xb29dea(0x13c)](_0x207c93);}async[a132_0x529db3(0x161)](_0x1228a3){const _0x467fa6=a132_0x529db3;if(!_0x1228a3)return undefined;try{const _0x439946=await this[_0x467fa6(0x10c)](_0x1228a3);return _0x439946[_0x467fa6(0x14e)];}catch{return undefined;}}async[a132_0x529db3(0x158)](_0x4b87f0){const _0x4e2d39=a132_0x529db3,_0x4cc8c0=await this[_0x4e2d39(0x149)](_0x4b87f0),_0x2878d1=_0x4cc8c0[_0x4e2d39(0x173)]['journeyBundleId'];if(!_0x2878d1)return{'bundleId':'','bundleName':_0x4cc8c0[_0x4e2d39(0x173)]['name'],'bundleDescription':_0x4cc8c0['attributes'][_0x4e2d39(0x17d)]??null,'latestJourneyId':_0x4cc8c0['id'],'versions':[synthesizePreBundleVersion(_0x4cc8c0)]};const _0x36d447=await this['getBundle'](_0x2878d1);return{'bundleId':_0x2878d1,'bundleName':_0x36d447[_0x4e2d39(0x16e)],'bundleDescription':_0x36d447[_0x4e2d39(0x17d)]??null,'latestJourneyId':_0x36d447[_0x4e2d39(0x14e)],'versions':formatVersionsFromBundle(_0x36d447)};}async[a132_0x529db3(0x147)](_0x1516dc){const _0x365c75=a132_0x529db3,_0x5b5932=await this[_0x365c75(0x149)](_0x1516dc),_0x3179bf=_0x5b5932[_0x365c75(0x173)][_0x365c75(0xfe)];if(!_0x3179bf)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x365c75(0x101));await this['client']['checkJourneyAppendable'](_0x3179bf);const _0x2456d7=await this[_0x365c75(0x152)][_0x365c75(0x13c)](_0x3179bf),_0x37b8b7=_0x2456d7[_0x365c75(0x16e)]+'\x20v'+(_0x2456d7[_0x365c75(0x145)]+0x1);return this['client'][_0x365c75(0x124)](_0x3179bf,{'sourceId':_0x1516dc,'attributes':{'name':_0x37b8b7}});}}
1
+ const a132_0x1f1d12=a132_0x7e6c;(function(_0x543f98,_0x454d8f){const _0x23b047=a132_0x7e6c,_0x36ea76=_0x543f98();while(!![]){try{const _0x1f7b20=-parseInt(_0x23b047(0xc1))/0x1+-parseInt(_0x23b047(0xf8))/0x2*(parseInt(_0x23b047(0xe2))/0x3)+-parseInt(_0x23b047(0x11c))/0x4+parseInt(_0x23b047(0x103))/0x5+parseInt(_0x23b047(0xf5))/0x6+parseInt(_0x23b047(0x11e))/0x7+-parseInt(_0x23b047(0xb3))/0x8;if(_0x1f7b20===_0x454d8f)break;else _0x36ea76['push'](_0x36ea76['shift']());}catch(_0x280e40){_0x36ea76['push'](_0x36ea76['shift']());}}}(a132_0x591f,0x6bde5));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x1b4f13){const _0x124b61=a132_0x7e6c;return _0x1b4f13[_0x124b61(0x126)]??_0x1b4f13['attributes']?.[_0x124b61(0x126)]??undefined;}function getVersionNumber(_0x1e0d2b){const _0x5812f4=a132_0x7e6c;return _0x1e0d2b[_0x5812f4(0xcf)]??_0x1e0d2b[_0x5812f4(0xb0)]?.[_0x5812f4(0xcf)]??0x0;}function getState(_0x554679){const _0xd3060c=a132_0x7e6c;return _0x554679[_0xd3060c(0xc7)]??_0x554679['attributes']?.[_0xd3060c(0xc7)];}export function deduplicateJourneysByBundle(_0x3aaacb){const _0x37a47e=a132_0x7e6c,_0x2db565=new Map();let _0x17cf78=0x0;for(const _0x5dbed5 of _0x3aaacb){const _0x19a1bb=getBundleId(_0x5dbed5);if(!_0x19a1bb){const _0x467d74='no-bundle-'+(_0x5dbed5['id']??_0x37a47e(0xab)+_0x17cf78++);_0x2db565[_0x37a47e(0x11a)](_0x467d74,_0x5dbed5);continue;}const _0x5f41c8=_0x2db565[_0x37a47e(0xaf)](_0x19a1bb);if(!_0x5f41c8)_0x2db565['set'](_0x19a1bb,_0x5dbed5);else{const _0x10ac0b=getState(_0x5f41c8)==='launched',_0x1c87ae=getState(_0x5dbed5)===_0x37a47e(0xb7);if(_0x1c87ae&&!_0x10ac0b)_0x2db565[_0x37a47e(0x11a)](_0x19a1bb,_0x5dbed5);else{if(!_0x1c87ae&&_0x10ac0b){}else{const _0x374a90=getVersionNumber(_0x5f41c8),_0x1f943a=getVersionNumber(_0x5dbed5);_0x1f943a>_0x374a90&&_0x2db565[_0x37a47e(0x11a)](_0x19a1bb,_0x5dbed5);}}}}return Array[_0x37a47e(0x120)](_0x2db565['values']());}const VALID_JOURNEY_STATES=new Set(['draft','simulation',a132_0x1f1d12(0xb7)]);export function parseJourneyState(_0x37e973){const _0x2cd056=a132_0x1f1d12;if(typeof _0x37e973===_0x2cd056(0xed)&&VALID_JOURNEY_STATES[_0x2cd056(0xa9)](_0x37e973))return _0x37e973;return _0x2cd056(0xbb);}export function entityToJourneyListItem(_0x638a29,_0x46aae8){const _0x3700ed=a132_0x1f1d12,_0x194bfd=_0x638a29[_0x3700ed(0xb0)];return{'id':_0x638a29['id'],'name':_0x194bfd[_0x3700ed(0xd2)]??'','journeyBundleName':_0x194bfd[_0x3700ed(0xdb)]??_0x194bfd[_0x3700ed(0xd2)]??'','journeyBundleId':_0x194bfd['journeyBundleId']??'','versionNumber':_0x194bfd['versionNumber'],'description':_0x194bfd['description']??null,'state':parseJourneyState(_0x194bfd['state']),'paused':_0x194bfd['paused']??![],'audienceId':_0x46aae8,'folderId':_0x194bfd[_0x3700ed(0x11f)]??_0x638a29[_0x3700ed(0xd8)]?.[_0x3700ed(0xc8)]?.[_0x3700ed(0x10b)]?.['id']??null,'createdAt':_0x194bfd[_0x3700ed(0x106)]??'','updatedAt':_0x194bfd[_0x3700ed(0x125)]??''};}function convertToColumnId(_0x405cf5){const _0x28256b=a132_0x1f1d12;return _0x405cf5[_0x28256b(0xf1)](/-/g,'_');}function getStepEntries(_0x3db5f0){const _0x5a44ab=a132_0x1f1d12;if(!_0x3db5f0)return[];if(Array[_0x5a44ab(0x117)](_0x3db5f0))return _0x3db5f0[_0x5a44ab(0xdd)](_0x57a604=>[_0x57a604['id'],_0x57a604]);return Object[_0x5a44ab(0x129)](_0x3db5f0);}export function flattenJourneyActivation(_0xc518e1){const _0x2ac684=a132_0x1f1d12,{activationParams:_0x25297a,activationId:_0xc735bf,runAfterJourneyRefresh:_0x5cf8a7}=_0xc518e1[_0x2ac684(0xb0)];return{'id':_0xc518e1['id'],'activationId':_0xc735bf,'runAfterJourneyRefresh':_0x5cf8a7,..._0x25297a};}function col(_0x1797a1,_0x2a32f3={}){const _0xe56e21=a132_0x1f1d12;return{'column':_0x1797a1,'direction':null,'stageIndex':null,'stageName':null,'category':_0xe56e21(0xc6),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x2a32f3};}export function generateColumnMapping(_0xe96aeb){const _0x5bfbf7=a132_0x1f1d12,_0x31a9dc=[];_0x31a9dc['push'](col(_0x5bfbf7(0xc4))),_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xca),{'direction':'in','category':_0x5bfbf7(0xb5)})),_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xac),{'direction':_0x5bfbf7(0x119),'category':_0x5bfbf7(0xb5)}));_0xe96aeb[_0x5bfbf7(0xb0)][_0x5bfbf7(0x114)]&&_0x31a9dc[_0x5bfbf7(0xae)](col('intime_goal',{'direction':'in','category':_0x5bfbf7(0x114),'detail':_0xe96aeb['attributes']['goal'][_0x5bfbf7(0xd2)]||null}));const _0x2ade57=_0xe96aeb[_0x5bfbf7(0xb0)][_0x5bfbf7(0x118)]||[];for(let _0x41af5f=0x0;_0x41af5f<_0x2ade57['length'];_0x41af5f++){const _0x2c99ee=_0x2ade57[_0x41af5f],_0x3df43e=_0x2c99ee[_0x5bfbf7(0xd2)],_0x39c08b={'stageIndex':_0x41af5f,'stageName':_0x3df43e},_0x3d1635=_0x2c99ee['entryCriteria']?.['name']||null;_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f,{..._0x39c08b,'direction':'in','category':_0x5bfbf7(0xfb),'detail':_0x3d1635})),_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0x104)+_0x41af5f,{..._0x39c08b,'direction':_0x5bfbf7(0x119),'category':_0x5bfbf7(0xfb),'detail':_0x3d1635}));_0x2c99ee[_0x5bfbf7(0x11d)]&&_0x31a9dc['push'](col(_0x5bfbf7(0xe1)+_0x41af5f+'_milestone',{..._0x39c08b,'direction':'in','category':_0x5bfbf7(0x11d),'detail':_0x2c99ee[_0x5bfbf7(0x11d)][_0x5bfbf7(0xd2)]||null}));const _0x54269f=_0x2c99ee[_0x5bfbf7(0x10c)]||_0x2c99ee[_0x5bfbf7(0xaa)]||[];for(let _0x301c4f=0x0;_0x301c4f<_0x54269f[_0x5bfbf7(0xf4)];_0x301c4f++){_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+_0x5bfbf7(0x12c)+_0x301c4f,{..._0x39c08b,'direction':'in','category':'exit_criteria','detail':_0x54269f[_0x301c4f][_0x5bfbf7(0xd2)]||null}));}const _0x50e6c2=getStepEntries(_0x2c99ee[_0x5bfbf7(0x108)]);for(const [_0x3bd70a,_0xf778e6]of _0x50e6c2){const _0x23f491=convertToColumnId(_0x3bd70a),_0x2d3f79=_0xf778e6['type']||null,_0x59293c=_0xf778e6[_0x5bfbf7(0xd2)]||null,_0x553957={..._0x39c08b,'stepType':_0x2d3f79,'stepName':_0x59293c,'stepId':_0x3bd70a};_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+'_'+_0x23f491,{..._0x553957,'direction':'in','category':_0x5bfbf7(0xc5)})),_0x31a9dc['push'](col(_0x5bfbf7(0x104)+_0x41af5f+'_'+_0x23f491,{..._0x553957,'direction':_0x5bfbf7(0x119),'category':_0x5bfbf7(0xc5)}));if(_0xf778e6['type']==='DecisionPoint'&&_0xf778e6[_0x5bfbf7(0xc9)])for(const _0x5410fc of _0xf778e6[_0x5bfbf7(0xc9)]){_0x5410fc['segmentId']&&_0x31a9dc[_0x5bfbf7(0xae)](col('intime_stage_'+_0x41af5f+'_'+_0x23f491+'_'+_0x5410fc['segmentId'],{..._0x553957,'direction':'in','category':_0x5bfbf7(0x112),'detail':_0x5410fc['name']||(_0x5410fc['excluded']?'Excluded\x20profiles':null)}));}if((_0xf778e6['type']==='AbTest'||_0xf778e6[_0x5bfbf7(0x109)]===_0x5bfbf7(0xdc))&&_0xf778e6['variants'])for(const _0x34c8da of _0xf778e6[_0x5bfbf7(0xf2)]){_0x34c8da['id']&&_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+'_'+_0x23f491+'_variant_'+convertToColumnId(_0x34c8da['id']),{..._0x553957,'direction':'in','category':_0x5bfbf7(0xb9),'detail':_0x34c8da[_0x5bfbf7(0xd2)]||null}));}if(_0xf778e6['type']===_0x5bfbf7(0xe0)||_0xf778e6[_0x5bfbf7(0x109)]==='Wait'){const _0x5b7e8c=[];if(_0xf778e6[_0x5bfbf7(0xe9)])_0x5b7e8c[_0x5bfbf7(0xae)](_0xf778e6[_0x5bfbf7(0xe9)]);else{if(Array[_0x5bfbf7(0x117)](_0xf778e6['conditions']))for(const _0xfce195 of _0xf778e6[_0x5bfbf7(0x105)]){_0xfce195['segmentId']&&!_0xfce195[_0x5bfbf7(0xbf)]&&_0x5b7e8c[_0x5bfbf7(0xae)](_0xfce195[_0x5bfbf7(0x101)]);}else _0xf778e6[_0x5bfbf7(0xfe)]?.[_0x5bfbf7(0x101)]&&_0x5b7e8c[_0x5bfbf7(0xae)](_0xf778e6[_0x5bfbf7(0xfe)][_0x5bfbf7(0x101)]);}for(const _0x158666 of _0x5b7e8c){_0x31a9dc[_0x5bfbf7(0xae)](col(_0x5bfbf7(0xe1)+_0x41af5f+'_'+_0x23f491+'_'+_0x158666,{..._0x553957,'direction':'in','category':_0x5bfbf7(0x112)}));}}}}return _0x31a9dc[_0x5bfbf7(0xae)](col('time')),_0x31a9dc;}export function aggregateJourneyHistory(_0x4fbc70){const _0x3fe870=a132_0x1f1d12,_0xa734e6=_0x4fbc70[_0x3fe870(0xe8)]((_0x59a943,_0x438d84)=>_0x59a943+(_0x438d84['entryInflux']??0x0),0x0),_0x33928f=_0x4fbc70[_0x3fe870(0xe8)]((_0x35b2a9,_0x52bd0d)=>_0x35b2a9+(_0x52bd0d[_0x3fe870(0xc3)]??0x0),0x0),_0x29f0ab=_0x4fbc70[_0x3fe870(0xe8)]((_0x2d4bde,_0x36804e)=>_0x2d4bde+((_0x36804e['exitInflux']??0x0)+(_0x36804e[_0x3fe870(0x10f)]??0x0)),0x0),_0x2c5d7f=_0x4fbc70[_0x4fbc70['length']-0x1];return{'size':_0x2c5d7f?.[_0x3fe870(0xee)]??0x0,'entered':_0xa734e6,'goal_achieved':_0x33928f,'completion_rate':_0x33928f&&_0xa734e6?_0x33928f/_0xa734e6*0x64:0x0,'exit_or_jump':_0x29f0ab,'exit_or_jump_rate':_0x29f0ab&&_0xa734e6?_0x29f0ab/_0xa734e6*0x64:0x0};}export function aggregateStageHistory(_0x467b71){const _0x454b3c=a132_0x1f1d12,_0x26a7f7=_0x467b71[_0x454b3c(0xe8)]((_0x41e0d1,_0x5c5579)=>_0x41e0d1+(_0x5c5579['entryInflux']??0x0),0x0),_0x34ddb1=_0x467b71[_0x454b3c(0xe8)]((_0x44fbeb,_0x1fe17f)=>_0x44fbeb+(_0x1fe17f[_0x454b3c(0x121)]??0x0),0x0),_0x374bda=_0x467b71[_0x454b3c(0xe8)]((_0xbfbf2c,_0x52b7e9)=>_0xbfbf2c+((_0x52b7e9[_0x454b3c(0x10e)]??0x0)+(_0x52b7e9[_0x454b3c(0x10f)]??0x0)),0x0),_0x101dd0=_0x467b71[_0x467b71[_0x454b3c(0xf4)]-0x1];return{'size':_0x101dd0?.['size']??0x0,'entered':_0x26a7f7,'milestone':_0x34ddb1,'milestone_rate':_0x34ddb1&&_0x26a7f7?_0x34ddb1/_0x26a7f7*0x64:0x0,'exit_or_jump':_0x374bda,'exit_or_jump_rate':_0x374bda&&_0x26a7f7?_0x374bda/_0x26a7f7*0x64:0x0};}export function assembleJourneyStats(_0x5b75e4,_0x566f17){const _0x124f48=a132_0x1f1d12,_0x35c638=!!(_0x566f17?.[_0x124f48(0x120)]||_0x566f17?.['to'])&&!!_0x5b75e4[_0x124f48(0xb1)]?.['length'];if(_0x35c638){const _0x49cb0d=aggregateJourneyHistory(_0x5b75e4[_0x124f48(0xb1)]),_0x333258={'journey_id':_0x5b75e4['journeyId'],..._0x566f17?.[_0x124f48(0x120)]&&{'from':_0x566f17[_0x124f48(0x120)]},..._0x566f17?.['to']&&{'to':_0x566f17['to']},..._0x49cb0d};return _0x566f17?.[_0x124f48(0x12b)]&&(_0x333258[_0x124f48(0xb1)]=_0x5b75e4[_0x124f48(0xb1)]),_0x333258;}return{'journey_id':_0x5b75e4[_0x124f48(0x130)],'size':_0x5b75e4[_0x124f48(0xee)],'entered':_0x5b75e4[_0x124f48(0xd7)],'goal_achieved':_0x5b75e4['goalSize'],'completion_rate':_0x5b75e4[_0x124f48(0x110)],'exit_or_jump':_0x5b75e4[_0x124f48(0xe5)],'exit_or_jump_rate':_0x5b75e4[_0x124f48(0xb6)]};}export function formatVersionsFromBundle(_0x1e1835){const _0x97a372=a132_0x1f1d12,_0x3c43f0=_0x1e1835[_0x97a372(0x113)]['map'](_0x56f9ba=>({'journeyId':_0x56f9ba['id'],'versionNumber':_0x56f9ba['attributes']['versionNumber']??0x0,'name':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0xd2)],'state':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0xc7)],'paused':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0xef)],'createdAt':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0x106)],'updatedAt':_0x56f9ba[_0x97a372(0xb0)][_0x97a372(0x125)]}));return _0x3c43f0['sort']((_0x113e2b,_0x36040b)=>_0x113e2b[_0x97a372(0xcf)]-_0x36040b[_0x97a372(0xcf)]),_0x3c43f0;}function a132_0x7e6c(_0x16c18b,_0x4ac58f){_0x16c18b=_0x16c18b-0xa7;const _0x591f47=a132_0x591f();let _0x7e6cf2=_0x591f47[_0x16c18b];return _0x7e6cf2;}export function synthesizePreBundleVersion(_0x40f9a4){const _0x1eb648=a132_0x1f1d12;return{'journeyId':_0x40f9a4['id'],'versionNumber':0x1,'name':_0x40f9a4[_0x1eb648(0xb0)][_0x1eb648(0xd2)],'state':_0x40f9a4['attributes']['state'],'paused':_0x40f9a4[_0x1eb648(0xb0)]['paused'],'createdAt':_0x40f9a4[_0x1eb648(0xb0)][_0x1eb648(0x106)],'updatedAt':_0x40f9a4[_0x1eb648(0xb0)][_0x1eb648(0x125)]};}function a132_0x591f(){const _0x5a4e6c=['listEntitiesByFolder','isArray','journeyStages','out','set','cdp_audience_','2029496gSmJXR','milestone','6124034wFCfUF','segmentFolderId','from','milestoneInflux','toLowerCase','NOT_FOUND','JOURNEY_NOT_FOUND','updatedAt','journeyBundleId','activationStepsById','Journey\x20not\x20found:\x20','entries','runJourney','includeHistory','_exit_','createJourney','getTrafficData','listActivations','journeyId','getJourneyStatistics','createVersion','has','exitCriteria','idx-','outtime_journey','journeyStageId','push','get','attributes','history','getParentSegmentFull','2411408CAvEvo','getBundle','journey','exitOrJumpRate','launched','audienceId','variant','listJourneyActivations','draft','description','getJourneyActivation','listJourneysWithFolders','timedOutPath','limit','318844wJywNs','listJourneysWithDetailsFromParentSegment','goalInflux','cdp_customer_id','step','fixed','state','parentFolder','branches','intime_journey','run','applyVersionDeduplication','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','folder-segment','versionNumber','all','listJourneysWithDetails','name','fetchTrafficRaw','getJourney','pause','includeAllVersions','enteredSize','relationships','getColumnMapping','activation','journeyBundleName','ABTest','map','resumeJourney','resume','WaitStep','intime_stage_','18168gDWluB','\x20in\x20journey\x20','listJourneysFromParentSegment','exitOrJumpSize','create','Journey\x20activation\x20step\x20not\x20found:\x20','reduce','conditionSegmentId','latestJourneyId','resolveJourneyId','createActivation','string','size','paused','getActivationSankeyChart','replace','variants','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','length','3321228rWfoBZ','checkJourneyAppendable','resolveRootFolderId','94myEeaI','listVersions','INVALID_ARGUMENT','stage','listActivationsFlat','getJourneyBundle','waitCondition','getConversionSankeyChart','client','segmentId','journey_','2128525mNjVYv','outtime_stage_','conditions','createdAt','lastVersionNumber','steps','type','filter','data','exitCriterias','createJourneyActivation','exitInflux','jumpInflux','completionRate','getStatistics','branch','journeys','goal','update'];a132_0x591f=function(){return _0x5a4e6c;};return a132_0x591f();}export function buildStageNameMap(_0x2924e0){const _0x5196eb=a132_0x1f1d12;return new Map(_0x2924e0['attributes'][_0x5196eb(0x118)]?.[_0x5196eb(0xdd)](_0x518052=>[_0x518052['id'],_0x518052[_0x5196eb(0xd2)]])??[]);}export class JourneySDK{[a132_0x1f1d12(0x100)];constructor(_0x1d7413){this['client']=new CDPApiClient(_0x1d7413);}[a132_0x1f1d12(0xcc)](_0x4d7edd,_0x5d7f0f){return _0x5d7f0f?_0x4d7edd:deduplicateJourneysByBundle(_0x4d7edd);}async[a132_0x1f1d12(0xf7)](_0x53bdeb){const _0x43e950=a132_0x1f1d12,_0x589e22=await this[_0x43e950(0x100)][_0x43e950(0xb2)](_0x53bdeb);return _0x589e22['rootFolderId']??undefined;}async[a132_0x1f1d12(0xd1)](_0x362449,_0xa56688){const _0x306e58=a132_0x1f1d12;try{const _0x1d286f=await this[_0x306e58(0x100)]['listJourneysWithDetails'](_0x362449);return{'journeys':this[_0x306e58(0xcc)](_0x1d286f[_0x306e58(0x113)],_0xa56688),'activationStepsById':_0x1d286f[_0x306e58(0x127)]};}catch(_0x565c10){if(isHttp404Error(_0x565c10))return{'journeys':[],'activationStepsById':new Map()};throw _0x565c10;}}async[a132_0x1f1d12(0xe4)](_0xffd2e9,_0x324024,_0xdeeb64){const _0x325943=a132_0x1f1d12;let _0x1bb2c4=_0x324024;if(!_0x1bb2c4)try{_0x1bb2c4=await this[_0x325943(0xf7)](_0xffd2e9);}catch(_0x5443b7){if(isHttp404Error(_0x5443b7))return[];throw _0x5443b7;}if(!_0x1bb2c4)return[];let _0x59fd29;if(_0xdeeb64?.[_0x325943(0xd6)])_0x59fd29=await this['client']['listJourneys'](_0x1bb2c4);else{const _0x1b3170=await this[_0x325943(0x100)]['listEntitiesByFolder'](_0x1bb2c4,0x20,![]),_0x1577d7=_0x1b3170[_0x325943(0x10b)],_0x30ad78=_0x1577d7['filter'](_0x1230d2=>_0x1230d2['type']===_0x325943(0xb5));_0x59fd29=_0x30ad78[_0x325943(0xdd)](_0x3908d7=>entityToJourneyListItem(_0x3908d7,_0xffd2e9));}return this[_0x325943(0xcc)](_0x59fd29,_0xdeeb64?.[_0x325943(0xd6)]);}async[a132_0x1f1d12(0xbe)](_0x489712,_0x29ca3b,_0x27d9c2){const _0xcec559=a132_0x1f1d12;if(!_0x29ca3b)return{'journeys':[],'folders':[]};const _0x18e0af=await this[_0xcec559(0x100)][_0xcec559(0x116)](_0x29ca3b,0x20,![]),_0x64159d=_0x18e0af[_0xcec559(0x10b)],_0x5284c8=_0x64159d[_0xcec559(0x10a)](_0x4c04de=>_0x4c04de['type']===_0xcec559(0xce)&&_0x4c04de['id']!==_0x29ca3b),_0xadfe13=_0x5284c8[_0xcec559(0xdd)](_0x324625=>({'id':_0x324625['id'],'name':_0x324625[_0xcec559(0xb0)][_0xcec559(0xd2)]})),_0x4ef20e=_0x64159d[_0xcec559(0x10a)](_0x145180=>_0x145180[_0xcec559(0x109)]===_0xcec559(0xb5)),_0x4730ed=_0x4ef20e[_0xcec559(0xdd)](_0x10a700=>entityToJourneyListItem(_0x10a700,_0x489712));return{'journeys':this[_0xcec559(0xcc)](_0x4730ed,_0x27d9c2?.['includeAllVersions']),'folders':_0xadfe13};}async[a132_0x1f1d12(0xc2)](_0x1f515f,_0x575846){const _0xe4301=a132_0x1f1d12;let _0x139e38;try{_0x139e38=await this[_0xe4301(0xf7)](_0x1f515f);}catch(_0x385c45){if(isHttp404Error(_0x385c45))return{'journeys':[],'activationStepsById':new Map()};throw _0x385c45;}if(!_0x139e38)return{'journeys':[],'activationStepsById':new Map()};const _0xe83674=await this[_0xe4301(0xd1)](_0x139e38,_0x575846?.[_0xe4301(0xd6)]);return{'journeys':this['applyVersionDeduplication'](_0xe83674['journeys'],_0x575846?.['includeAllVersions']),'activationStepsById':_0xe83674[_0xe4301(0x127)]};}async['getJourney'](_0x23d33a){const _0x3b0f19=a132_0x1f1d12;try{return await this['client'][_0x3b0f19(0xd4)](_0x23d33a);}catch(_0x1bdd7c){if(isHttp404Error(_0x1bdd7c))throw new SDKError(ErrorCode[_0x3b0f19(0x124)],_0x3b0f19(0x128)+_0x23d33a,_0x1bdd7c);throw _0x1bdd7c;}}async[a132_0x1f1d12(0xeb)](_0x38f915,_0x9cce35){const _0x28fd8d=a132_0x1f1d12,_0x498d35=await this[_0x28fd8d(0xe4)](_0x38f915),_0x1fddc8=_0x498d35['find'](_0x372bb6=>_0x372bb6['journeyBundleName'][_0x28fd8d(0x122)]()===_0x9cce35[_0x28fd8d(0x122)]());if(!_0x1fddc8)throw new SDKError(ErrorCode[_0x28fd8d(0x124)],_0x28fd8d(0x128)+_0x9cce35,undefined,{'helpText':_0x28fd8d(0xf3)});return _0x1fddc8['id'];}async[a132_0x1f1d12(0x111)](_0x7f1b84,_0x2180f5){const _0x37a151=a132_0x1f1d12;try{return await this[_0x37a151(0x100)][_0x37a151(0xa7)](_0x7f1b84,_0x2180f5);}catch(_0x4eb207){if(isHttp404Error(_0x4eb207))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x37a151(0x128)+_0x7f1b84,_0x4eb207);throw _0x4eb207;}}async[a132_0x1f1d12(0x12e)](_0x21ae2c,_0x2c357f){const _0x4409e1=a132_0x1f1d12,_0x109856={'from':_0x2c357f?.['from'],'to':_0x2c357f?.['to'],'limit':_0x2c357f?.[_0x4409e1(0xc0)]},_0x445c01=_0x2c357f?.['type']!=='conversion';try{const [_0x5df7bc,_0x2abf7d]=await Promise[_0x4409e1(0xd0)]([this[_0x4409e1(0xd3)](_0x21ae2c,_0x2c357f?.[_0x4409e1(0x109)],_0x109856),_0x445c01?this[_0x4409e1(0xd4)](_0x21ae2c):undefined]);if(_0x5df7bc['activation']&&_0x2abf7d){const _0x53ee60=buildStageNameMap(_0x2abf7d);_0x5df7bc['activation']=_0x5df7bc[_0x4409e1(0xda)][_0x4409e1(0xdd)](_0x5440b9=>({..._0x5440b9,'journeyStageName':_0x53ee60[_0x4409e1(0xaf)](_0x5440b9['journeyStageId'])??_0x5440b9[_0x4409e1(0xad)]}));}return _0x5df7bc;}catch(_0x258105){if(isHttp404Error(_0x258105))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x4409e1(0x128)+_0x21ae2c,_0x258105);throw _0x258105;}}async[a132_0x1f1d12(0xd3)](_0x15f9cd,_0x1762b4,_0xd366a0){const _0x1046ce=a132_0x1f1d12;if(_0x1762b4==='conversion'){const _0x1b865a=await this[_0x1046ce(0x100)][_0x1046ce(0xff)](_0x15f9cd,_0xd366a0);return{'conversion':_0x1b865a};}if(_0x1762b4===_0x1046ce(0xda)){const _0x5e93ad=await this[_0x1046ce(0x100)]['getActivationSankeyChart'](_0x15f9cd,_0xd366a0);return{'activation':_0x5e93ad};}const [_0x196f1f,_0x40b194]=await Promise['all']([this['client'][_0x1046ce(0xff)](_0x15f9cd,_0xd366a0),this['client'][_0x1046ce(0xf0)](_0x15f9cd,_0xd366a0)]);return{'conversion':_0x196f1f,'activation':_0x40b194};}async[a132_0x1f1d12(0xd5)](_0x478adb){const _0x23bb66=a132_0x1f1d12;try{return await this['client']['pauseJourney'](_0x478adb);}catch(_0x57137e){if(isHttp404Error(_0x57137e))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x23bb66(0x128)+_0x478adb,_0x57137e);throw _0x57137e;}}async[a132_0x1f1d12(0xdf)](_0x43862f){const _0x417ad0=a132_0x1f1d12;try{return await this[_0x417ad0(0x100)][_0x417ad0(0xde)](_0x43862f);}catch(_0x47fd6c){if(isHttp404Error(_0x47fd6c))throw new SDKError(ErrorCode[_0x417ad0(0x124)],_0x417ad0(0x128)+_0x43862f,_0x47fd6c);throw _0x47fd6c;}}async[a132_0x1f1d12(0xcb)](_0x2fc52f){const _0x33e634=a132_0x1f1d12;try{return await this[_0x33e634(0x100)][_0x33e634(0x12a)](_0x2fc52f);}catch(_0xf2902){if(isHttp404Error(_0xf2902))throw new SDKError(ErrorCode[_0x33e634(0x124)],_0x33e634(0x128)+_0x2fc52f,_0xf2902);throw _0xf2902;}}async[a132_0x1f1d12(0xe6)](_0x5097dd){const _0x59c387=a132_0x1f1d12;return await this['client'][_0x59c387(0x12d)](_0x5097dd);}async[a132_0x1f1d12(0x115)](_0x4955ba,_0x5a1f27){const _0x359a41=a132_0x1f1d12;try{return await this['client']['updateJourney'](_0x4955ba,_0x5a1f27);}catch(_0x74fe73){if(isHttp404Error(_0x74fe73))throw new SDKError(ErrorCode[_0x359a41(0x124)],'Journey\x20not\x20found:\x20'+_0x4955ba,_0x74fe73);throw _0x74fe73;}}async['getActivation'](_0x23e263,_0x44aa0c){const _0xc6d497=a132_0x1f1d12;try{return await this[_0xc6d497(0x100)][_0xc6d497(0xbd)](_0x23e263,_0x44aa0c);}catch(_0x41f400){if(isHttp404Error(_0x41f400))throw new SDKError(ErrorCode[_0xc6d497(0x123)],_0xc6d497(0xe7)+_0x44aa0c+_0xc6d497(0xe3)+_0x23e263,_0x41f400);throw _0x41f400;}}async[a132_0x1f1d12(0x12f)](_0x485acc){const _0x15cfaa=a132_0x1f1d12;try{return await this[_0x15cfaa(0x100)][_0x15cfaa(0xba)](_0x485acc);}catch(_0x1c86e0){if(isHttp404Error(_0x1c86e0))return[];throw _0x1c86e0;}}async[a132_0x1f1d12(0xfc)](_0x5d24a3){const _0x345d3a=a132_0x1f1d12,_0x3d14c1=await this['listActivations'](_0x5d24a3);return _0x3d14c1[_0x345d3a(0xdd)](flattenJourneyActivation);}async[a132_0x1f1d12(0xec)](_0x4bbcc5,_0x4df852){const _0x12ec25=a132_0x1f1d12;return await this[_0x12ec25(0x100)][_0x12ec25(0x10d)](_0x4bbcc5,_0x4df852);}async[a132_0x1f1d12(0xd9)](_0x3de6d8){const _0xa0a1a7=a132_0x1f1d12,_0x424506=await this[_0xa0a1a7(0xd4)](_0x3de6d8),_0x5936ad=generateColumnMapping(_0x424506);return{'journeyId':_0x424506['id'],'journeyName':_0x424506[_0xa0a1a7(0xb0)][_0xa0a1a7(0xd2)],'database':_0xa0a1a7(0x11b)+_0x424506[_0xa0a1a7(0xb0)][_0xa0a1a7(0xb8)],'table':_0xa0a1a7(0x102)+_0x424506['id'],'columns':_0x5936ad};}async[a132_0x1f1d12(0xb4)](_0x519b76){const _0x364317=a132_0x1f1d12;return this[_0x364317(0x100)]['getJourneyBundle'](_0x519b76);}async['getLatestJourneyId'](_0x5d83ce){const _0x42893c=a132_0x1f1d12;if(!_0x5d83ce)return undefined;try{const _0x1bd4d1=await this[_0x42893c(0xb4)](_0x5d83ce);return _0x1bd4d1[_0x42893c(0xea)];}catch{return undefined;}}async[a132_0x1f1d12(0xf9)](_0x35e57c){const _0x459070=a132_0x1f1d12,_0x91b5c6=await this[_0x459070(0xd4)](_0x35e57c),_0x1d44fb=_0x91b5c6[_0x459070(0xb0)][_0x459070(0x126)];if(!_0x1d44fb)return{'bundleId':'','bundleName':_0x91b5c6[_0x459070(0xb0)][_0x459070(0xd2)],'bundleDescription':_0x91b5c6[_0x459070(0xb0)][_0x459070(0xbc)]??null,'latestJourneyId':_0x91b5c6['id'],'versions':[synthesizePreBundleVersion(_0x91b5c6)]};const _0x14dba9=await this['getBundle'](_0x1d44fb);return{'bundleId':_0x1d44fb,'bundleName':_0x14dba9[_0x459070(0xd2)],'bundleDescription':_0x14dba9[_0x459070(0xbc)]??null,'latestJourneyId':_0x14dba9[_0x459070(0xea)],'versions':formatVersionsFromBundle(_0x14dba9)};}async[a132_0x1f1d12(0xa8)](_0x15e12c){const _0x52891f=a132_0x1f1d12,_0x5daf10=await this[_0x52891f(0xd4)](_0x15e12c),_0x19192a=_0x5daf10['attributes'][_0x52891f(0x126)];if(!_0x19192a)throw new SDKError(ErrorCode[_0x52891f(0xfa)],_0x52891f(0xcd));await this[_0x52891f(0x100)][_0x52891f(0xf6)](_0x19192a);const _0x2d9a93=await this[_0x52891f(0x100)][_0x52891f(0xfd)](_0x19192a),_0x3b8ccf=_0x2d9a93[_0x52891f(0xd2)]+'\x20v'+(_0x2d9a93[_0x52891f(0x107)]+0x1);return this[_0x52891f(0x100)]['createJourneyVersion'](_0x19192a,{'sourceId':_0x15e12c,'attributes':{'name':_0x3b8ccf}});}}
@@ -1 +1 @@
1
- const a133_0x5998ba=a133_0x2264;function a133_0x2264(_0x6fdc30,_0xf23542){_0x6fdc30=_0x6fdc30-0xf8;const _0x2e89b6=a133_0x2e89();let _0x2264b5=_0x2e89b6[_0x6fdc30];return _0x2264b5;}(function(_0x3e4139,_0xa4425a){const _0x11b882=a133_0x2264,_0xb63e17=_0x3e4139();while(!![]){try{const _0x3a1061=parseInt(_0x11b882(0xfb))/0x1+parseInt(_0x11b882(0xfe))/0x2+-parseInt(_0x11b882(0xf8))/0x3*(parseInt(_0x11b882(0x101))/0x4)+parseInt(_0x11b882(0xfc))/0x5*(-parseInt(_0x11b882(0x100))/0x6)+-parseInt(_0x11b882(0x102))/0x7+-parseInt(_0x11b882(0xfd))/0x8*(parseInt(_0x11b882(0xf9))/0x9)+parseInt(_0x11b882(0x103))/0xa*(parseInt(_0x11b882(0x106))/0xb);if(_0x3a1061===_0xa4425a)break;else _0xb63e17['push'](_0xb63e17['shift']());}catch(_0x22db20){_0xb63e17['push'](_0xb63e17['shift']());}}}(a133_0x2e89,0x86dc9));import{createTextCache}from'../../utils/local-cache.js';function a133_0x2e89(){const _0x3d6fd5=['751885uVjlXM','7511576qNEyuv','748896HSephR','read','42RPFkBI','4bLOOSz','3472476JppayM','20mYypII','llm/chat','last_chat_id','18479593UxKbJJ','clear','2504097YhGArt','9tHRVVI','write','140372SlZNBS'];a133_0x2e89=function(){return _0x3d6fd5;};return a133_0x2e89();}const chatIdCache=createTextCache(a133_0x5998ba(0x105),a133_0x5998ba(0x104));export function saveLastChatId(_0x119eaa){const _0x12837b=a133_0x5998ba;chatIdCache[_0x12837b(0xfa)](_0x119eaa);}export function loadLastChatId(){const _0x28da87=a133_0x5998ba;return chatIdCache[_0x28da87(0xff)]();}export function clearLastChatId(){const _0x4daf5c=a133_0x5998ba;chatIdCache[_0x4daf5c(0x107)]();}
1
+ const a133_0x6e4249=a133_0x2c89;(function(_0x48e6d9,_0x4ab56b){const _0x2710f5=a133_0x2c89,_0x596c4f=_0x48e6d9();while(!![]){try{const _0xe89e35=-parseInt(_0x2710f5(0x130))/0x1+-parseInt(_0x2710f5(0x12f))/0x2*(parseInt(_0x2710f5(0x12d))/0x3)+-parseInt(_0x2710f5(0x128))/0x4+-parseInt(_0x2710f5(0x12c))/0x5*(-parseInt(_0x2710f5(0x126))/0x6)+parseInt(_0x2710f5(0x129))/0x7+parseInt(_0x2710f5(0x12b))/0x8*(-parseInt(_0x2710f5(0x127))/0x9)+parseInt(_0x2710f5(0x12a))/0xa;if(_0xe89e35===_0x4ab56b)break;else _0x596c4f['push'](_0x596c4f['shift']());}catch(_0x500abd){_0x596c4f['push'](_0x596c4f['shift']());}}}(a133_0x4eba,0x7a28c));import{createTextCache}from'../../utils/local-cache.js';function a133_0x4eba(){const _0x15a41b=['575187pNAoCI','write','6rWEfIV','904720eMzezB','last_chat_id','llm/chat','clear','6VZsXxH','9htczdd','1833816nsRtNQ','1630370HYnRmz','22440630vOimMC','7322984CKsDYp','4385625xDPVGM'];a133_0x4eba=function(){return _0x15a41b;};return a133_0x4eba();}const chatIdCache=createTextCache(a133_0x6e4249(0x131),a133_0x6e4249(0x132));export function saveLastChatId(_0x238053){const _0x2d5e0f=a133_0x6e4249;chatIdCache[_0x2d5e0f(0x12e)](_0x238053);}function a133_0x2c89(_0xbf67b1,_0x4147fe){_0xbf67b1=_0xbf67b1-0x125;const _0x4eba35=a133_0x4eba();let _0x2c896c=_0x4eba35[_0xbf67b1];return _0x2c896c;}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x56e035=a133_0x6e4249;chatIdCache[_0x56e035(0x125)]();}