@treasuredata/tdx 2026.8.4 → 2026.8.5

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 (264) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.d.ts.map +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js.map +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-always-on-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-campaign-pull-command.js +1 -1
  27. package/dist/commands/engage-campaign-push-command.js +1 -1
  28. package/dist/commands/engage-campaign-validate-command.js +1 -1
  29. package/dist/commands/engage-command.js +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/p13n-command.js +1 -1
  39. package/dist/commands/parent-segment-command.js +1 -1
  40. package/dist/commands/policy-command.js +1 -1
  41. package/dist/commands/profile-command.js +1 -1
  42. package/dist/commands/profiles-command.js +1 -1
  43. package/dist/commands/query-command.js +1 -1
  44. package/dist/commands/schedule-command.js +1 -1
  45. package/dist/commands/segment-command.js +1 -1
  46. package/dist/commands/segment-create-command.js +1 -1
  47. package/dist/commands/segment-fields-command.js +1 -1
  48. package/dist/commands/segment-move-command.js +1 -1
  49. package/dist/commands/segment-pull-command.js +1 -1
  50. package/dist/commands/segment-push-command.js +1 -1
  51. package/dist/commands/segment-update-command.js +1 -1
  52. package/dist/commands/segment-use-command.js +1 -1
  53. package/dist/commands/segment-validate-command.js +1 -1
  54. package/dist/commands/segments.js +1 -1
  55. package/dist/commands/show.js +1 -1
  56. package/dist/commands/status-command.js +1 -1
  57. package/dist/commands/table-deleted.js +1 -1
  58. package/dist/commands/tables.js +1 -1
  59. package/dist/commands/unset-command.js +1 -1
  60. package/dist/commands/upgrade-command.js +1 -1
  61. package/dist/commands/use-command.js +1 -1
  62. package/dist/commands/user-command.js +1 -1
  63. package/dist/commands/work-command.js +1 -1
  64. package/dist/commands/workflow-command.js +1 -1
  65. package/dist/core/auth.js +1 -1
  66. package/dist/core/command-output.js +1 -1
  67. package/dist/core/config.js +1 -1
  68. package/dist/core/connection-cache.js +1 -1
  69. package/dist/core/constants.js +1 -1
  70. package/dist/core/credential-cache.js +1 -1
  71. package/dist/core/global-context.js +1 -1
  72. package/dist/core/keychain.js +1 -1
  73. package/dist/core/oauth-keychain.js +1 -1
  74. package/dist/core/oauth.js +1 -1
  75. package/dist/core/profile.js +1 -1
  76. package/dist/core/project-config.js +1 -1
  77. package/dist/core/session.js +1 -1
  78. package/dist/core/site-mismatch.js +1 -1
  79. package/dist/core/user-cache.js +1 -1
  80. package/dist/core/version.js +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/mcp/server.js +1 -1
  83. package/dist/mcp/tools/index.js +1 -1
  84. package/dist/mcp/tools/tdx-run.js +1 -1
  85. package/dist/mcp/tools/tdx-search.js +1 -1
  86. package/dist/mcp/tools/work-create-item.js +1 -1
  87. package/dist/mcp/utils.js +1 -1
  88. package/dist/proxy/claude-usage-tracker.js +1 -1
  89. package/dist/proxy/passthrough-server.js +1 -1
  90. package/dist/proxy/sse-usage-parser.js +1 -1
  91. package/dist/sdk/agent/agent-config.js +1 -1
  92. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  93. package/dist/sdk/agent/agent-yaml.js +1 -1
  94. package/dist/sdk/agent/test/evaluator.js +1 -1
  95. package/dist/sdk/agent/test/executor.js +1 -1
  96. package/dist/sdk/agent/test/index.js +1 -1
  97. package/dist/sdk/agent/test/output.js +1 -1
  98. package/dist/sdk/agent/test/parser.js +1 -1
  99. package/dist/sdk/agent/tool-target-registry.js +1 -1
  100. package/dist/sdk/api.js +1 -1
  101. package/dist/sdk/auth-token.js +1 -1
  102. package/dist/sdk/cas/cas-api-client.js +1 -1
  103. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  104. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  105. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  106. package/dist/sdk/cas/cas-segment-schema.d.ts +63 -0
  107. package/dist/sdk/cas/cas-segment-schema.d.ts.map +1 -0
  108. package/dist/sdk/cas/cas-segment-schema.js +1 -0
  109. package/dist/sdk/cas/cas-segment-schema.js.map +1 -0
  110. package/dist/sdk/cas/cas-segment-validator.d.ts +76 -0
  111. package/dist/sdk/cas/cas-segment-validator.d.ts.map +1 -0
  112. package/dist/sdk/cas/cas-segment-validator.js +1 -0
  113. package/dist/sdk/cas/cas-segment-validator.js.map +1 -0
  114. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  115. package/dist/sdk/cas/index.js +1 -1
  116. package/dist/sdk/cas/pull-workflow.js +1 -1
  117. package/dist/sdk/cas/push-workflow.js +1 -1
  118. package/dist/sdk/cas/validate-files.d.ts +23 -6
  119. package/dist/sdk/cas/validate-files.d.ts.map +1 -1
  120. package/dist/sdk/cas/validate-files.js +1 -1
  121. package/dist/sdk/cas/validate-files.js.map +1 -1
  122. package/dist/sdk/client/cdp-api-client.js +1 -1
  123. package/dist/sdk/client/delivery-api-client.js +1 -1
  124. package/dist/sdk/client/endpoints.js +1 -1
  125. package/dist/sdk/client/engage-api-client.js +1 -1
  126. package/dist/sdk/client/http-client.js +1 -1
  127. package/dist/sdk/client/llm-api-client.js +1 -1
  128. package/dist/sdk/client/oauth-refresh.js +1 -1
  129. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  130. package/dist/sdk/client/rate-limiter.js +1 -1
  131. package/dist/sdk/client/td-api-client.js +1 -1
  132. package/dist/sdk/client/trino-api-client.js +1 -1
  133. package/dist/sdk/client/workflow-client.js +1 -1
  134. package/dist/sdk/connection-validator.js +1 -1
  135. package/dist/sdk/connection.js +1 -1
  136. package/dist/sdk/delivery.js +1 -1
  137. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  138. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  139. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  140. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  141. package/dist/sdk/engage/campaign-pull.js +1 -1
  142. package/dist/sdk/engage/campaign-push.js +1 -1
  143. package/dist/sdk/engage/campaign-validator.js +1 -1
  144. package/dist/sdk/engage/campaign-yaml.js +1 -1
  145. package/dist/sdk/engage/template-pull.js +1 -1
  146. package/dist/sdk/engage/template-push.js +1 -1
  147. package/dist/sdk/engage/template-validator.js +1 -1
  148. package/dist/sdk/engage/template-yaml.js +1 -1
  149. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  150. package/dist/sdk/engage/types/campaign-def.js +1 -1
  151. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  152. package/dist/sdk/engage/types/template-schema.js +1 -1
  153. package/dist/sdk/engage.js +1 -1
  154. package/dist/sdk/errors.js +1 -1
  155. package/dist/sdk/index.js +1 -1
  156. package/dist/sdk/io/index.js +1 -1
  157. package/dist/sdk/io/node-filesystem.js +1 -1
  158. package/dist/sdk/job.js +1 -1
  159. package/dist/sdk/journey.js +1 -1
  160. package/dist/sdk/llm/chat-cache.js +1 -1
  161. package/dist/sdk/llm/index.js +1 -1
  162. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  163. package/dist/sdk/llm/model-factors.js +1 -1
  164. package/dist/sdk/llm/user-settings.js +1 -1
  165. package/dist/sdk/p13n-studio.js +1 -1
  166. package/dist/sdk/personalization.js +1 -1
  167. package/dist/sdk/policy.js +1 -1
  168. package/dist/sdk/query/deleted-table-validation.js +1 -1
  169. package/dist/sdk/query/index.js +1 -1
  170. package/dist/sdk/query/sql-parser.js +1 -1
  171. package/dist/sdk/realtime.js +1 -1
  172. package/dist/sdk/schedule.js +1 -1
  173. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  174. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  175. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  176. package/dist/sdk/segment/fields-display.js +1 -1
  177. package/dist/sdk/segment/file-discovery.js +1 -1
  178. package/dist/sdk/segment/journey-utils.js +1 -1
  179. package/dist/sdk/segment/journey-validator.js +1 -1
  180. package/dist/sdk/segment/journey-yaml.js +1 -1
  181. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  182. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  183. package/dist/sdk/segment/pull-workflow.js +1 -1
  184. package/dist/sdk/segment/push-recovery.js +1 -1
  185. package/dist/sdk/segment/push-workflow.js +1 -1
  186. package/dist/sdk/segment/resolution-context.js +1 -1
  187. package/dist/sdk/segment/segment-path-parser.js +1 -1
  188. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  189. package/dist/sdk/segment/segment-validator.js +1 -1
  190. package/dist/sdk/segment/target-resolution.js +1 -1
  191. package/dist/sdk/segment/tdx-config.js +1 -1
  192. package/dist/sdk/segment/types/activation-schema.js +1 -1
  193. package/dist/sdk/segment/types/journey-def.js +1 -1
  194. package/dist/sdk/segment/types/journey-schema.js +1 -1
  195. package/dist/sdk/segment/types/segment-def.js +1 -1
  196. package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
  197. package/dist/sdk/segment/types/segment-schema.js +1 -1
  198. package/dist/sdk/segment/types/segment-schema.js.map +1 -1
  199. package/dist/sdk/segment/validate-files.js +1 -1
  200. package/dist/sdk/segment/yaml-validator.d.ts +1 -1
  201. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  202. package/dist/sdk/segment/yaml-validator.js +1 -1
  203. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  204. package/dist/sdk/segment.js +1 -1
  205. package/dist/sdk/types/index.js +1 -1
  206. package/dist/sdk/types/progress.js +1 -1
  207. package/dist/sdk/types/workspace.js +1 -1
  208. package/dist/sdk/user.js +1 -1
  209. package/dist/sdk/util/format-detector.js +1 -1
  210. package/dist/sdk/util/formatters.js +1 -1
  211. package/dist/sdk/util/index.js +1 -1
  212. package/dist/sdk/util/paginate.js +1 -1
  213. package/dist/sdk/util/tree-formatter.js +1 -1
  214. package/dist/sdk/util/tree-search.js +1 -1
  215. package/dist/sdk/workflow/archive-validation.js +1 -1
  216. package/dist/sdk/workflow/clone-workflow.js +1 -1
  217. package/dist/sdk/workflow/index.js +1 -1
  218. package/dist/sdk/workflow/pull-workflow.js +1 -1
  219. package/dist/sdk/workflow/push-workflow.js +1 -1
  220. package/dist/sdk/workflow/task-graph.js +1 -1
  221. package/dist/sdk/workflow/tdx-config.js +1 -1
  222. package/dist/sdk/workflow/workflow-utils.js +1 -1
  223. package/dist/sdk/workspace/access-tracker.js +1 -1
  224. package/dist/sdk/workspace/frontmatter.js +1 -1
  225. package/dist/sdk/workspace/git.js +1 -1
  226. package/dist/sdk/workspace/index.js +1 -1
  227. package/dist/sdk/workspace/templates.js +1 -1
  228. package/dist/sdk/workspace/weekly.js +1 -1
  229. package/dist/sdk/workspace/wikilinks.js +1 -1
  230. package/dist/test-utils/command-runner.js +1 -1
  231. package/dist/test-utils/factories.js +1 -1
  232. package/dist/test-utils/fixtures.js +1 -1
  233. package/dist/test-utils/http-mock.js +1 -1
  234. package/dist/test-utils/index.js +1 -1
  235. package/dist/utils/async.js +1 -1
  236. package/dist/utils/claude-code-state.js +1 -1
  237. package/dist/utils/colors.js +1 -1
  238. package/dist/utils/diff.js +1 -1
  239. package/dist/utils/file-permissions.js +1 -1
  240. package/dist/utils/file-reader.js +1 -1
  241. package/dist/utils/github-releases.js +1 -1
  242. package/dist/utils/global-cache.js +1 -1
  243. package/dist/utils/json-loader.js +1 -1
  244. package/dist/utils/local-cache.js +1 -1
  245. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  246. package/dist/utils/logger/formatters/index.js +1 -1
  247. package/dist/utils/logger/handlers/console-handler.js +1 -1
  248. package/dist/utils/logger/handlers/file-handler.js +1 -1
  249. package/dist/utils/logger/handlers/index.js +1 -1
  250. package/dist/utils/logger/handlers/null-handler.js +1 -1
  251. package/dist/utils/logger/index.js +1 -1
  252. package/dist/utils/logger/logger.js +1 -1
  253. package/dist/utils/logger/types.js +1 -1
  254. package/dist/utils/option-validation.js +1 -1
  255. package/dist/utils/process.js +1 -1
  256. package/dist/utils/prompt.js +1 -1
  257. package/dist/utils/proxy-fetch.js +1 -1
  258. package/dist/utils/spinner.js +1 -1
  259. package/dist/utils/sse-parser.js +1 -1
  260. package/dist/utils/string-utils.js +1 -1
  261. package/dist/utils/table-ref-parser.js +1 -1
  262. package/dist/utils/tdx-logger.js +1 -1
  263. package/dist/utils/version-check.js +1 -1
  264. package/package.json +1 -1
@@ -1 +1 @@
1
- function a164_0x1688(){const _0x3d21ec=['.yaml','isFile','4450663JEAjwd','1039378KiPrXk','toLowerCase','endsWith','push','604moXlNL','join','dirname','.yml','1218390euiEPE','165SQqscy','extname','map','602850JXJciK','6rsmbuP','isDirectory','relative','16miCMpY','2820987eAijTd','719185FbOKbC','name','453zrAWzj'];a164_0x1688=function(){return _0x3d21ec;};return a164_0x1688();}(function(_0x5f4c32,_0x190a1a){const _0x2b4e67=a164_0x4118,_0x43df4b=_0x5f4c32();while(!![]){try{const _0x42c6ae=-parseInt(_0x2b4e67(0x176))/0x1+-parseInt(_0x2b4e67(0x17c))/0x2+parseInt(_0x2b4e67(0x178))/0x3*(-parseInt(_0x2b4e67(0x180))/0x4)+parseInt(_0x2b4e67(0x170))/0x5+-parseInt(_0x2b4e67(0x171))/0x6*(-parseInt(_0x2b4e67(0x17b))/0x7)+-parseInt(_0x2b4e67(0x174))/0x8*(parseInt(_0x2b4e67(0x175))/0x9)+parseInt(_0x2b4e67(0x16c))/0xa*(parseInt(_0x2b4e67(0x16d))/0xb);if(_0x42c6ae===_0x190a1a)break;else _0x43df4b['push'](_0x43df4b['shift']());}catch(_0x50c0ee){_0x43df4b['push'](_0x43df4b['shift']());}}}(a164_0x1688,0xa9c6b));import{readdirSync,statSync}from'fs';function a164_0x4118(_0x2cce87,_0x5df1b1){_0x2cce87=_0x2cce87-0x169;const _0x16883f=a164_0x1688();let _0x411815=_0x16883f[_0x2cce87];return _0x411815;}import a164_0x13a5bb from'path';export function findYamlFiles(_0xabb5df){const _0x26ec05=[];function _0x3a118f(_0x1b46f0){const _0x51fbc4=a164_0x4118,_0x364c19=readdirSync(_0x1b46f0,{'withFileTypes':!![]});for(const _0x5045cd of _0x364c19){const _0x1f278a=a164_0x13a5bb[_0x51fbc4(0x169)](_0x1b46f0,_0x5045cd[_0x51fbc4(0x177)]);if(_0x5045cd[_0x51fbc4(0x172)]())_0x3a118f(_0x1f278a);else(_0x5045cd['name']['endsWith'](_0x51fbc4(0x16b))||_0x5045cd['name'][_0x51fbc4(0x17e)](_0x51fbc4(0x179)))&&_0x26ec05[_0x51fbc4(0x17f)](_0x1f278a);}}return _0x3a118f(_0xabb5df),_0x26ec05;}export function discoverYamlFiles(_0x4016d8){const _0x218c3c=a164_0x4118,_0xa95640=findYamlFiles(_0x4016d8);return _0xa95640[_0x218c3c(0x16f)](_0x3faaf3=>{const _0x41568d=_0x218c3c,_0x34cba6=a164_0x13a5bb[_0x41568d(0x173)](_0x4016d8,_0x3faaf3),_0x3653a2=a164_0x13a5bb[_0x41568d(0x16a)](_0x34cba6);return{'absolutePath':_0x3faaf3,'relativePath':_0x34cba6,'folderPath':_0x3653a2==='.'?'':_0x3653a2['replace'](/\\/g,'/')};});}export function isYamlFile(_0x16013){const _0x27ef0c=a164_0x4118;try{const _0x414740=statSync(_0x16013);if(!_0x414740[_0x27ef0c(0x17a)]())return![];const _0x310bed=a164_0x13a5bb[_0x27ef0c(0x16e)](_0x16013)[_0x27ef0c(0x17d)]();return _0x310bed===_0x27ef0c(0x16b)||_0x310bed==='.yaml';}catch{return![];}}
1
+ (function(_0x3b8acf,_0x262571){const _0x2e0ee5=a166_0x123d,_0x1d2d2a=_0x3b8acf();while(!![]){try{const _0x1f0639=parseInt(_0x2e0ee5(0x1b6))/0x1+parseInt(_0x2e0ee5(0x1b3))/0x2*(parseInt(_0x2e0ee5(0x1af))/0x3)+parseInt(_0x2e0ee5(0x1a5))/0x4+parseInt(_0x2e0ee5(0x1b4))/0x5*(parseInt(_0x2e0ee5(0x1b2))/0x6)+-parseInt(_0x2e0ee5(0x1ae))/0x7*(-parseInt(_0x2e0ee5(0x1a9))/0x8)+-parseInt(_0x2e0ee5(0x1b8))/0x9+parseInt(_0x2e0ee5(0x1a4))/0xa*(-parseInt(_0x2e0ee5(0x1ad))/0xb);if(_0x1f0639===_0x262571)break;else _0x1d2d2a['push'](_0x1d2d2a['shift']());}catch(_0x4bb1e2){_0x1d2d2a['push'](_0x1d2d2a['shift']());}}}(a166_0x10de,0x44133));import{readdirSync,statSync}from'fs';function a166_0x123d(_0x3e03df,_0x2c88e3){_0x3e03df=_0x3e03df-0x1a3;const _0x10de1c=a166_0x10de();let _0x123db7=_0x10de1c[_0x3e03df];return _0x123db7;}import a166_0x4b0193 from'path';function a166_0x10de(){const _0x4a20ff=['relative','162648UnhOhe','map','10RzPAZf','551048gfktgS','dirname','.yaml','endsWith','55248vmzSlB','.yml','push','join','12659196xCYlCA','7QLlylM','102MjmizG','replace','isDirectory','36mPOZua','18888LxtuMR','401225sljTGt','name','500509CcCbod'];a166_0x10de=function(){return _0x4a20ff;};return a166_0x10de();}export function findYamlFiles(_0x39e373){const _0x5c1960=[];function _0x63934a(_0x2b9cd4){const _0x37c33d=a166_0x123d,_0x3d4500=readdirSync(_0x2b9cd4,{'withFileTypes':!![]});for(const _0x288ce5 of _0x3d4500){const _0x23ab8f=a166_0x4b0193[_0x37c33d(0x1ac)](_0x2b9cd4,_0x288ce5[_0x37c33d(0x1b5)]);if(_0x288ce5[_0x37c33d(0x1b1)]())_0x63934a(_0x23ab8f);else(_0x288ce5[_0x37c33d(0x1b5)][_0x37c33d(0x1a8)](_0x37c33d(0x1aa))||_0x288ce5[_0x37c33d(0x1b5)]['endsWith'](_0x37c33d(0x1a7)))&&_0x5c1960[_0x37c33d(0x1ab)](_0x23ab8f);}}return _0x63934a(_0x39e373),_0x5c1960;}export function discoverYamlFiles(_0x39780b){const _0x45a92f=a166_0x123d,_0x523a79=findYamlFiles(_0x39780b);return _0x523a79[_0x45a92f(0x1a3)](_0x5d8f30=>{const _0x354a75=_0x45a92f,_0xfdda36=a166_0x4b0193[_0x354a75(0x1b7)](_0x39780b,_0x5d8f30),_0x28b2ca=a166_0x4b0193[_0x354a75(0x1a6)](_0xfdda36);return{'absolutePath':_0x5d8f30,'relativePath':_0xfdda36,'folderPath':_0x28b2ca==='.'?'':_0x28b2ca[_0x354a75(0x1b0)](/\\/g,'/')};});}export function isYamlFile(_0x1c3698){const _0x98c7c2=a166_0x123d;try{const _0x5c195a=statSync(_0x1c3698);if(!_0x5c195a['isFile']())return![];const _0x5a5794=a166_0x4b0193['extname'](_0x1c3698)['toLowerCase']();return _0x5a5794===_0x98c7c2(0x1aa)||_0x5a5794===_0x98c7c2(0x1a7);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x577c54,_0x5369f4){const _0xefaecd=a165_0xaa34,_0x12e8d9=_0x577c54();while(!![]){try{const _0xb4555b=-parseInt(_0xefaecd(0x1aa))/0x1*(parseInt(_0xefaecd(0x189))/0x2)+-parseInt(_0xefaecd(0x1ad))/0x3*(-parseInt(_0xefaecd(0x16f))/0x4)+parseInt(_0xefaecd(0x167))/0x5+parseInt(_0xefaecd(0x19a))/0x6*(-parseInt(_0xefaecd(0x19e))/0x7)+parseInt(_0xefaecd(0x1ac))/0x8*(parseInt(_0xefaecd(0x1a7))/0x9)+parseInt(_0xefaecd(0x16e))/0xa*(parseInt(_0xefaecd(0x19f))/0xb)+parseInt(_0xefaecd(0x176))/0xc;if(_0xb4555b===_0x5369f4)break;else _0x12e8d9['push'](_0x12e8d9['shift']());}catch(_0x4c058e){_0x12e8d9['push'](_0x12e8d9['shift']());}}}(a165_0x4e3d,0x9a13e));function a165_0xaa34(_0x3d67c8,_0x4a4ebc){_0x3d67c8=_0x3d67c8-0x162;const _0x4e3db2=a165_0x4e3d();let _0xaa3455=_0x4e3db2[_0x3d67c8];return _0xaa3455;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x8f5445){const _0x4c7476=a165_0xaa34;return _0x8f5445[_0x4c7476(0x196)]()[_0x4c7476(0x18b)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x4c7476(0x18b)](/_+/g,'_')[_0x4c7476(0x18b)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3a3bf2){const _0x1f0bcb=a165_0xaa34,_0x5b8cac=_0x3a3bf2['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5b8cac){const _0x5b249a=_0x5b8cac[0x1][_0x1f0bcb(0x196)](),_0x29ef33=_0x5b8cac[0x2],_0x474d03=_0x29ef33[_0x1f0bcb(0x18b)](/-/g,'')[_0x1f0bcb(0x175)](0x0,0x4)[_0x1f0bcb(0x196)]();return _0x5b249a+'_'+_0x474d03;}const _0x358358=_0x3a3bf2[_0x1f0bcb(0x183)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x358358){const _0x55703c=_0x358358[0x1],_0x26f87f=_0x358358[0x2][_0x1f0bcb(0x196)](),_0x129067=_0x55703c[_0x1f0bcb(0x18b)](/-/g,'')[_0x1f0bcb(0x175)](0x0,0x4)[_0x1f0bcb(0x196)]();return _0x26f87f+'_'+_0x129067;}return undefined;}function stableStringify(_0xbea595){const _0x35e6cc=a165_0xaa34;if(Array['isArray'](_0xbea595))return'['+_0xbea595['map'](_0x2d2200=>stableStringify(_0x2d2200))[_0x35e6cc(0x1ae)](',')+']';if(_0xbea595&&typeof _0xbea595===_0x35e6cc(0x194)){const _0x4eec07=_0xbea595,_0x8d7b50=Object['keys'](_0x4eec07)[_0x35e6cc(0x16a)](),_0x4739ac=_0x8d7b50['map'](_0x24e0f3=>'\x22'+_0x24e0f3+'\x22:'+stableStringify(_0x4eec07[_0x24e0f3]));return'{'+_0x4739ac[_0x35e6cc(0x1ae)](',')+'}';}const _0x1b38a8=JSON[_0x35e6cc(0x188)](_0xbea595);return _0x1b38a8===undefined?_0x35e6cc(0x164):_0x1b38a8;}export function consolidateActivationsByContent(_0x8438e4){const _0x95aab5=a165_0xaa34,_0x5316a6={},_0x34e99a=new Map(),_0x34027a=new Map();for(const _0x4dd387 of _0x8438e4){if(!_0x4dd387)continue;for(const [_0x1f1146,_0x2eeb63]of Object['entries'](_0x4dd387)){const _0x53e90c={'name':_0x2eeb63['name'],'connection':_0x2eeb63[_0x95aab5(0x18f)],..._0x2eeb63[_0x95aab5(0x162)]!==undefined&&{'all_columns':_0x2eeb63['all_columns']},..._0x2eeb63[_0x95aab5(0x169)]!==undefined&&{'columns':_0x2eeb63[_0x95aab5(0x169)]},..._0x2eeb63['behavior']!==undefined&&{'behavior':_0x2eeb63[_0x95aab5(0x1a9)]},..._0x2eeb63[_0x95aab5(0x178)]!==undefined&&{'schedule':_0x2eeb63[_0x95aab5(0x178)]},..._0x2eeb63[_0x95aab5(0x1a6)]!==undefined&&{'notification':_0x2eeb63[_0x95aab5(0x1a6)]},..._0x2eeb63['connector_config']!==undefined&&{'connector_config':_0x2eeb63['connector_config']},..._0x2eeb63[_0x95aab5(0x1b6)]!==undefined&&{'activation_template_id':_0x2eeb63['activation_template_id']}},_0x40af4a=stableStringify(_0x53e90c),_0x3a724e=_0x34027a['get'](_0x40af4a);_0x3a724e?_0x34e99a[_0x95aab5(0x17f)](_0x1f1146,_0x3a724e):(_0x5316a6[_0x1f1146]=_0x2eeb63,_0x34e99a['set'](_0x1f1146,_0x1f1146),_0x34027a[_0x95aab5(0x17f)](_0x40af4a,_0x1f1146));}}return{'merged':_0x5316a6,'nameMapping':_0x34e99a};}export function updateActivationReferences(_0x517e83,_0x504122){const _0x48aa76=a165_0xaa34;if(!_0x517e83)return;for(const _0x15fb17 of _0x517e83){if(!_0x15fb17['steps'])continue;for(const _0x33083b of _0x15fb17[_0x48aa76(0x1b4)]){if(_0x33083b[_0x48aa76(0x199)]==='activation'&&_0x33083b['with']?.[_0x48aa76(0x1a8)]){const _0x27c67a=_0x504122[_0x48aa76(0x19c)](_0x33083b['with']['activation']);_0x27c67a&&_0x27c67a!==_0x33083b[_0x48aa76(0x198)][_0x48aa76(0x1a8)]&&(_0x33083b[_0x48aa76(0x198)]['activation']=_0x27c67a);}}}}export function consolidateSegmentsByContent(_0x1683d0,_0x34ffb6){const _0x426349=a165_0xaa34,_0x4420ea={},_0x3b2709=new Map(),_0x49e375=new Map();for(const _0x3252da of _0x1683d0){if(!_0x3252da)continue;for(const [_0x538aff,_0x43355]of Object[_0x426349(0x187)](_0x3252da)){if(!_0x43355[_0x426349(0x171)]){_0x4420ea[_0x538aff]=_0x43355,_0x3b2709[_0x426349(0x17f)](_0x538aff,_0x538aff);continue;}const _0x5f25f7=_0x43355[_0x426349(0x165)]&&_0x43355['description'][_0x426349(0x1a3)]()?_0x43355[_0x426349(0x165)]:undefined,_0x237826=JSON[_0x426349(0x188)]({'description':_0x5f25f7,'rule':deepSortObject(_0x43355[_0x426349(0x171)])}),_0x98e0a5=_0x49e375[_0x426349(0x19c)](_0x237826);if(_0x98e0a5){const _0x53acbd={..._0x43355[_0x426349(0x165)]!==undefined&&{'description':_0x43355[_0x426349(0x165)]},'rule':_0x43355[_0x426349(0x171)]?deepSortObject(_0x43355[_0x426349(0x171)]):_0x43355[_0x426349(0x171)]};if(_0x538aff<_0x98e0a5){_0x4420ea[_0x538aff]=_0x53acbd,delete _0x4420ea[_0x98e0a5];for(const [_0x578ec7,_0x153159]of _0x3b2709[_0x426349(0x187)]()){_0x153159===_0x98e0a5&&_0x3b2709['set'](_0x578ec7,_0x538aff);}_0x3b2709[_0x426349(0x17f)](_0x538aff,_0x538aff),_0x49e375[_0x426349(0x17f)](_0x237826,_0x538aff);}else _0x4420ea[_0x98e0a5]=_0x53acbd,_0x3b2709[_0x426349(0x17f)](_0x538aff,_0x98e0a5);}else{let _0x4c0992=_0x538aff;if(_0x34ffb6){const _0x41054d=_0x34ffb6[_0x426349(0x19c)](_0x237826);_0x41054d&&_0x41054d[_0x426349(0x18c)]>0x0&&(_0x4c0992=_0x41054d[_0x426349(0x175)]()[_0x426349(0x16a)]()[0x0]);}const _0x575f99={..._0x43355[_0x426349(0x165)]!==undefined&&{'description':_0x43355[_0x426349(0x165)]},'rule':_0x43355[_0x426349(0x171)]?deepSortObject(_0x43355[_0x426349(0x171)]):_0x43355[_0x426349(0x171)]};_0x4420ea[_0x4c0992]=_0x575f99,_0x3b2709['set'](_0x538aff,_0x4c0992),_0x49e375['set'](_0x237826,_0x4c0992);}}}return{'merged':_0x4420ea,'nameMapping':_0x3b2709};}export function updateSegmentReferences(_0x33a338,_0x4f81bd){const _0x27d11a=a165_0xaa34;if(!_0x33a338)return;for(const _0x208c17 of _0x33a338){if(_0x208c17[_0x27d11a(0x163)]?.[_0x27d11a(0x1b5)]){const _0x3c3c2c=_0x4f81bd['get'](_0x208c17[_0x27d11a(0x163)][_0x27d11a(0x1b5)]);_0x3c3c2c&&(_0x208c17[_0x27d11a(0x163)][_0x27d11a(0x1b5)]=_0x3c3c2c);}if(_0x208c17['exit_criteria'])for(const _0x4860d2 of _0x208c17[_0x27d11a(0x1a1)]){if(_0x4860d2[_0x27d11a(0x1b5)]){const _0x46aeaf=_0x4f81bd[_0x27d11a(0x19c)](_0x4860d2[_0x27d11a(0x1b5)]);_0x46aeaf&&(_0x4860d2[_0x27d11a(0x1b5)]=_0x46aeaf);}}if(_0x208c17[_0x27d11a(0x16d)]?.[_0x27d11a(0x1b5)]){const _0x3d0dff=_0x4f81bd[_0x27d11a(0x19c)](_0x208c17[_0x27d11a(0x16d)][_0x27d11a(0x1b5)]);_0x3d0dff&&(_0x208c17['milestone'][_0x27d11a(0x1b5)]=_0x3d0dff);}if(_0x208c17['steps'])for(const _0x56faed of _0x208c17[_0x27d11a(0x1b4)]){if(_0x56faed[_0x27d11a(0x199)]===_0x27d11a(0x185)&&_0x56faed['with']?.[_0x27d11a(0x17a)])for(const _0x3a201d of _0x56faed['with'][_0x27d11a(0x17a)]){if(_0x3a201d['segment']){const _0x260b30=_0x4f81bd['get'](_0x3a201d[_0x27d11a(0x1b5)]);_0x260b30&&(_0x3a201d[_0x27d11a(0x1b5)]=_0x260b30);}}if(_0x56faed[_0x27d11a(0x199)]===_0x27d11a(0x16c)&&_0x56faed[_0x27d11a(0x198)]?.[_0x27d11a(0x192)]?.[_0x27d11a(0x1b5)]){const _0x5a2b38=_0x4f81bd[_0x27d11a(0x19c)](_0x56faed['with'][_0x27d11a(0x192)][_0x27d11a(0x1b5)]);_0x5a2b38&&(_0x56faed[_0x27d11a(0x198)][_0x27d11a(0x192)][_0x27d11a(0x1b5)]=_0x5a2b38);}}}}function a165_0x4e3d(){const _0x3d4603=['entry_criteria','null','description','include','1423170qqcShK','endsWith','columns','sort','yaml','wait','milestone','10lKeoZu','312212JRPwSn','keys','rule','state','activations','merged','slice','3359952pfbnDw','.yaml','schedule','bundle_name','branches','journey','stages','attributes','map','set','push','has','string','match','journeys','decision_point','values','entries','stringify','6DUNhsO','nameMapping','replace','length','item','version','connection','segments','reentry','condition','version_number','object','.yml','toLowerCase','some','with','type','124638qakqyE','journeyBundleName','get','name','287oLJMBT','12448711RloYNJ','journeyStages','exit_criteria','bundle_id','trim','isArray','draft','notification','1918269leYruc','activation','behavior','343361aCZunF','startsWith','16IxZjCx','15oHeRdM','join','launched','latest','conditions','index','goal','steps','segment','activation_template_id','all_columns'];a165_0x4e3d=function(){return _0x3d4603;};return a165_0x4e3d();}export function updateSegmentRefsInSegments(_0x3047c9,_0x42b166){const _0x55ed90=a165_0xaa34;for(const _0x802c17 of Object[_0x55ed90(0x186)](_0x3047c9)){_0x802c17[_0x55ed90(0x171)]&&updateSegmentRefsInRule(_0x802c17[_0x55ed90(0x171)],_0x42b166);}}function updateSegmentRefsInRule(_0x26dd74,_0x19f341){const _0x5a207f=a165_0xaa34;if(_0x26dd74===null||typeof _0x26dd74!=='object')return;if(Array[_0x5a207f(0x1a4)](_0x26dd74)){for(const _0x32193e of _0x26dd74){updateSegmentRefsInRule(_0x32193e,_0x19f341);}return;}const _0x14b180=_0x26dd74;if((_0x14b180[_0x5a207f(0x199)]===_0x5a207f(0x166)||_0x14b180[_0x5a207f(0x199)]==='exclude')&&typeof _0x14b180['segment']===_0x5a207f(0x182)){const _0x302751=_0x19f341[_0x5a207f(0x19c)](_0x14b180[_0x5a207f(0x1b5)]);_0x302751&&(_0x14b180['segment']=_0x302751);}if(_0x14b180['conditions']&&Array[_0x5a207f(0x1a4)](_0x14b180['conditions']))for(const _0x4d6d5c of _0x14b180[_0x5a207f(0x1b1)]){updateSegmentRefsInRule(_0x4d6d5c,_0x19f341);}}export function buildJourneysArray(_0x480935,_0x47fa76){const _0x4a4b9e=a165_0xaa34;return _0x480935[_0x4a4b9e(0x17e)](_0x1afb58=>{const _0x26f102=_0x4a4b9e,_0x52858f=_0x47fa76?_0x1afb58[_0x26f102(0x18d)]['id']===_0x47fa76:_0x480935[_0x26f102(0x18c)]===0x1,_0x1b0b04=_0x1afb58['yaml']['journeys']?.[0x0],_0x3708d4=_0x1b0b04?.[_0x26f102(0x1b3)]||_0x1afb58[_0x26f102(0x16b)][_0x26f102(0x1b3)],_0x2f7298={'version':_0x1b0b04?.[_0x26f102(0x18e)]||_0x1afb58['yaml'][_0x26f102(0x18e)]||_0x1afb58[_0x26f102(0x18d)][_0x26f102(0x19d)],'state':_0x1afb58[_0x26f102(0x18d)][_0x26f102(0x172)]===_0x26f102(0x1af)?_0x26f102(0x1af):_0x26f102(0x1a5),'stages':_0x1b0b04?.[_0x26f102(0x17c)]||_0x1afb58[_0x26f102(0x16b)][_0x26f102(0x17c)]||[],'id':_0x1b0b04?.['id']||_0x1afb58['yaml']['id'],'version_number':_0x1b0b04?.['version_number']||_0x1afb58[_0x26f102(0x16b)][_0x26f102(0x193)]};return _0x3708d4&&(_0x2f7298[_0x26f102(0x1b3)]=_0x3708d4),_0x52858f&&(_0x2f7298[_0x26f102(0x1b0)]=!![]),_0x2f7298;});}export function buildMergedJourneyDef(_0x28b883,_0x168d26,_0x1f4e8c){const _0x632a9b=a165_0xaa34,_0x5bf3c7=_0x28b883[0x0][_0x632a9b(0x16b)],_0x594218=buildJourneysArray(_0x28b883,_0x1f4e8c),{merged:_0x3c4acb,nameMapping:_0x2674a2}=consolidateSegmentsByContent(_0x28b883['map'](_0x4c1337=>_0x4c1337[_0x632a9b(0x16b)]['segments']),_0x168d26);updateSegmentRefsInSegments(_0x3c4acb,_0x2674a2);const _0xbf22a9=Array['from'](_0x2674a2['entries']())[_0x632a9b(0x197)](([_0x2bffa0,_0x44c438])=>_0x2bffa0!==_0x44c438&&_0x2bffa0[_0x632a9b(0x1ab)]('entry_criteria'));let _0x14c2ea=_0x3c4acb,_0x308e8f=new Map();if(_0xbf22a9){const _0xee5c90=consolidateSegmentsByContent([_0x3c4acb],_0x168d26);_0x14c2ea=_0xee5c90[_0x632a9b(0x174)],_0x308e8f=_0xee5c90[_0x632a9b(0x18a)];}const _0x161a5d=new Map(_0x2674a2);for(const [_0xedd3c8,_0x50c564]of _0x308e8f[_0x632a9b(0x187)]()){_0x161a5d[_0x632a9b(0x17f)](_0xedd3c8,_0x50c564);}for(const [_0x1938a6,_0x5523f1]of _0x161a5d[_0x632a9b(0x187)]()){let _0x1698aa=_0x5523f1,_0x443d58=0x0;while(_0x161a5d[_0x632a9b(0x181)](_0x1698aa)&&_0x161a5d['get'](_0x1698aa)!==_0x1698aa&&_0x443d58<MAX_MAPPING_CHAIN_DEPTH){_0x1698aa=_0x161a5d[_0x632a9b(0x19c)](_0x1698aa),_0x443d58++;}_0x1698aa!==_0x5523f1&&_0x161a5d[_0x632a9b(0x17f)](_0x1938a6,_0x1698aa);}for(const _0x5cf1e2 of _0x594218){updateSegmentReferences(_0x5cf1e2[_0x632a9b(0x17c)],_0x161a5d);}const {merged:_0x5eb8aa,nameMapping:_0x4bc461}=consolidateActivationsByContent(_0x28b883[_0x632a9b(0x17e)](_0x4dc1db=>_0x4dc1db[_0x632a9b(0x16b)][_0x632a9b(0x173)]));for(const _0x3808df of _0x594218){updateActivationReferences(_0x3808df[_0x632a9b(0x17c)],_0x4bc461);}let _0x4dd006=_0x5bf3c7[_0x632a9b(0x1b3)];if(_0x4dd006?.['segment']){const _0x4a2496=_0x161a5d[_0x632a9b(0x19c)](_0x4dd006[_0x632a9b(0x1b5)]);_0x4a2496&&(_0x4dd006={..._0x4dd006,'segment':_0x4a2496});}for(const _0x24e0b9 of _0x594218){if(_0x24e0b9[_0x632a9b(0x1b3)]?.[_0x632a9b(0x1b5)]){const _0x479a15=_0x161a5d[_0x632a9b(0x19c)](_0x24e0b9[_0x632a9b(0x1b3)][_0x632a9b(0x1b5)]);_0x479a15&&(_0x24e0b9[_0x632a9b(0x1b3)]={..._0x24e0b9['goal'],'segment':_0x479a15});}}return _0x594218[_0x632a9b(0x197)](_0x65491=>_0x65491['goal'])&&(_0x4dd006=undefined),{'type':_0x632a9b(0x17b),'name':_0x5bf3c7[_0x632a9b(0x19d)],'description':_0x5bf3c7['description'],'goal':_0x4dd006,'reentry':_0x5bf3c7[_0x632a9b(0x191)],'segments':Object[_0x632a9b(0x170)](_0x14c2ea)[_0x632a9b(0x18c)]>0x0?_0x14c2ea:undefined,'activations':Object['keys'](_0x5eb8aa)[_0x632a9b(0x18c)]>0x0?_0x5eb8aa:undefined,'journeys':_0x594218,'bundle_id':_0x5bf3c7[_0x632a9b(0x1a2)],'bundle_name':_0x5bf3c7[_0x632a9b(0x179)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x175855,_0x1983b0,_0x33a8e8,_0x2fe161){const _0x51159c=a165_0xaa34,_0x31cdbd=_0x175855+':'+_0x1983b0,_0x3b3c64=_0x33a8e8['get'](_0x31cdbd);if(_0x3b3c64)return _0x3b3c64;const _0x4c6d2b=await _0x2fe161(_0x175855),_0x17ea1c=_0x4c6d2b[_0x51159c(0x17d)][_0x51159c(0x19b)]||_0x4c6d2b[_0x51159c(0x17d)][_0x51159c(0x19d)],_0x111fce=_0x4c6d2b[_0x51159c(0x17d)][_0x51159c(0x1a0)]['find'](_0x170ded=>String(_0x170ded['id'])===String(_0x1983b0)),_0x6e2996=_0x111fce?.[_0x51159c(0x19d)]||_0x1983b0,_0xb1718={'journeyName':_0x17ea1c,'stageName':_0x6e2996};return _0x33a8e8[_0x51159c(0x17f)](_0x31cdbd,_0xb1718),_0xb1718;}export function formatApiJourneyName(_0x1332e8,_0x2aaea8){return _0x2aaea8+'\x20('+_0x1332e8+')';}export function isLocalJourneyRef(_0x2d153c){const _0x2d4b6e=a165_0xaa34;return _0x2d153c[_0x2d4b6e(0x168)](_0x2d4b6e(0x195))||_0x2d153c[_0x2d4b6e(0x168)](_0x2d4b6e(0x177));}export function buildLocalRuleToNameMapping(_0x4313dd){const _0x33a1c3=a165_0xaa34,_0x59633a=new Map();if(!_0x4313dd)return _0x59633a;for(const [_0x3c958d,_0xc40ce0]of Object[_0x33a1c3(0x187)](_0x4313dd)){if(_0xc40ce0[_0x33a1c3(0x171)]){const _0x1f0565=serializeRule(_0xc40ce0['rule']),_0x3bf2f3=_0x59633a[_0x33a1c3(0x19c)](_0x1f0565)||[];_0x3bf2f3[_0x33a1c3(0x180)](_0x3c958d),_0x59633a[_0x33a1c3(0x17f)](_0x1f0565,_0x3bf2f3);}}return _0x59633a;}export function buildLocalRuleToNameMappingFromJourney(_0x2ac823){const _0x26dc7d=a165_0xaa34,_0x470ab3=_0x2ac823[_0x26dc7d(0x190)];if(!_0x470ab3)return new Map();const _0x5c9c64=collectSegmentUsageCounts(_0x2ac823),_0xfe5641=new Map();let _0x1ec6fa=0x0;for(const [_0x163c8b,_0x2b4ecd]of Object[_0x26dc7d(0x187)](_0x470ab3)){if(!_0x2b4ecd[_0x26dc7d(0x171)]){_0x1ec6fa++;continue;}const _0x398da5=serializeRule(_0x2b4ecd[_0x26dc7d(0x171)]),_0xcca4a9=_0xfe5641[_0x26dc7d(0x19c)](_0x398da5)||[];_0xcca4a9['push']({'name':_0x163c8b,'index':_0x1ec6fa}),_0xfe5641['set'](_0x398da5,_0xcca4a9),_0x1ec6fa++;}const _0x41f206=new Map();for(const [_0x116db1,_0x1bd54d]of _0xfe5641){const _0x40cee5=_0x1bd54d[_0x26dc7d(0x175)]()[_0x26dc7d(0x16a)]((_0x499174,_0x54022d)=>{const _0x58e7a5=_0x26dc7d,_0x211884=_0x5c9c64[_0x58e7a5(0x19c)](_0x499174[_0x58e7a5(0x19d)])||0x0,_0x249f7b=_0x5c9c64['get'](_0x54022d[_0x58e7a5(0x19d)])||0x0;if(_0x211884!==_0x249f7b)return _0x249f7b-_0x211884;return _0x499174[_0x58e7a5(0x1b2)]-_0x54022d[_0x58e7a5(0x1b2)];})[_0x26dc7d(0x17e)](_0x4c3c34=>_0x4c3c34[_0x26dc7d(0x19d)]);_0x41f206[_0x26dc7d(0x17f)](_0x116db1,_0x40cee5);}return _0x41f206;}export function collectSegmentUsageCounts(_0x44cd8d){const _0x46fa2e=a165_0xaa34,_0x2a7379=new Map(),_0x3c1cf4=_0x2965b8=>{if(!_0x2965b8)return;_0x2a7379['set'](_0x2965b8,(_0x2a7379['get'](_0x2965b8)||0x0)+0x1);},_0x4e4e38=_0xa82e44=>{const _0x409e6a=a165_0xaa34;for(const _0x300cee of _0xa82e44){_0x3c1cf4(_0x300cee['entry_criteria']?.[_0x409e6a(0x1b5)]);if(_0x300cee[_0x409e6a(0x1a1)])for(const _0x2a3436 of _0x300cee[_0x409e6a(0x1a1)]){_0x3c1cf4(_0x2a3436[_0x409e6a(0x1b5)]);}_0x3c1cf4(_0x300cee[_0x409e6a(0x16d)]?.['segment']);if(_0x300cee[_0x409e6a(0x1b4)])for(const _0x584fc3 of _0x300cee['steps']){if(_0x584fc3[_0x409e6a(0x199)]===_0x409e6a(0x185))for(const _0x3f9346 of _0x584fc3[_0x409e6a(0x198)]['branches']){_0x3c1cf4(_0x3f9346[_0x409e6a(0x1b5)]);}else _0x584fc3['type']==='wait'&&_0x3c1cf4(_0x584fc3[_0x409e6a(0x198)][_0x409e6a(0x192)]?.[_0x409e6a(0x1b5)]);}}};_0x3c1cf4(_0x44cd8d[_0x46fa2e(0x1b3)]?.[_0x46fa2e(0x1b5)]);if(_0x44cd8d[_0x46fa2e(0x184)])for(const _0x2ae84a of _0x44cd8d[_0x46fa2e(0x184)]){_0x3c1cf4(_0x2ae84a[_0x46fa2e(0x1b3)]?.[_0x46fa2e(0x1b5)]),_0x4e4e38(_0x2ae84a[_0x46fa2e(0x17c)]);}_0x44cd8d[_0x46fa2e(0x17c)]&&_0x4e4e38(_0x44cd8d[_0x46fa2e(0x17c)]);if(_0x44cd8d['versions'])for(const _0x597a6d of _0x44cd8d['versions']){_0x4e4e38(_0x597a6d['stages']);}return _0x2a7379;}
1
+ (function(_0x4bffe7,_0x186244){const _0x2fa275=a167_0x5891,_0x2d2fe9=_0x4bffe7();while(!![]){try{const _0x1841fc=-parseInt(_0x2fa275(0x138))/0x1+parseInt(_0x2fa275(0x142))/0x2+parseInt(_0x2fa275(0x175))/0x3+-parseInt(_0x2fa275(0x151))/0x4+parseInt(_0x2fa275(0x144))/0x5+-parseInt(_0x2fa275(0x17c))/0x6+-parseInt(_0x2fa275(0x178))/0x7;if(_0x1841fc===_0x186244)break;else _0x2d2fe9['push'](_0x2d2fe9['shift']());}catch(_0x3aba29){_0x2d2fe9['push'](_0x2d2fe9['shift']());}}}(a167_0x4654,0xcf879));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;function a167_0x5891(_0x153e5b,_0x2c043e){_0x153e5b=_0x153e5b-0x133;const _0x465450=a167_0x4654();let _0x58910f=_0x465450[_0x153e5b];return _0x58910f;}const MAX_MAPPING_CHAIN_DEPTH=0xa;function a167_0x4654(){const _0x4e4785=['segment','1938279HXAesI','from','item','include','8172402YJQMrT','name','launched','null','entry_criteria','bundle_id','has','type','connection','keys','notification','with','activation_template_id','359376bkknoH','attributes','set','schedule','length','versions','some','milestone','.yaml','values','1621018lYvQuK','find','5692000WmisZP','.yml','nameMapping','version','conditions','string','reentry','connector_config','journeyBundleName','journeys','endsWith','description','entries','2662868aeWlpF','condition','yaml','segments','state','exclude','merged','decision_point','journey','slice','steps','startsWith','object','stringify','branches','toLowerCase','activation','sort','draft','get','match','replace','latest','isArray','exit_criteria','all_columns','behavior','map','stages','columns','trim','push','join','rule','goal','wait','4695567Hpihfw','index'];a167_0x4654=function(){return _0x4e4785;};return a167_0x4654();}export function sanitizeYamlKey(_0x1b3e0c){const _0x541ab7=a167_0x5891;return _0x1b3e0c[_0x541ab7(0x160)]()[_0x541ab7(0x166)](/\s+/g,'_')[_0x541ab7(0x166)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x541ab7(0x166)](/_+/g,'_')[_0x541ab7(0x166)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5081bf){const _0x3d5017=a167_0x5891,_0xcaad1a=_0x5081bf[_0x3d5017(0x165)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0xcaad1a){const _0x5bd724=_0xcaad1a[0x1][_0x3d5017(0x160)](),_0x4da32f=_0xcaad1a[0x2],_0x5336b1=_0x4da32f[_0x3d5017(0x166)](/-/g,'')['slice'](0x0,0x4)['toLowerCase']();return _0x5bd724+'_'+_0x5336b1;}const _0x347fea=_0x5081bf[_0x3d5017(0x165)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x347fea){const _0x188cae=_0x347fea[0x1],_0x4a4a4f=_0x347fea[0x2][_0x3d5017(0x160)](),_0x5d8caa=_0x188cae[_0x3d5017(0x166)](/-/g,'')[_0x3d5017(0x15a)](0x0,0x4)[_0x3d5017(0x160)]();return _0x4a4a4f+'_'+_0x5d8caa;}return undefined;}function stableStringify(_0x5c6be9){const _0x5adcc5=a167_0x5891;if(Array[_0x5adcc5(0x168)](_0x5c6be9))return'['+_0x5c6be9[_0x5adcc5(0x16c)](_0x442379=>stableStringify(_0x442379))[_0x5adcc5(0x171)](',')+']';if(_0x5c6be9&&typeof _0x5c6be9===_0x5adcc5(0x15d)){const _0x3bb4f3=_0x5c6be9,_0x8cf63f=Object['keys'](_0x3bb4f3)[_0x5adcc5(0x162)](),_0x23c110=_0x8cf63f['map'](_0x7da7b9=>'\x22'+_0x7da7b9+'\x22:'+stableStringify(_0x3bb4f3[_0x7da7b9]));return'{'+_0x23c110[_0x5adcc5(0x171)](',')+'}';}const _0xa56131=JSON[_0x5adcc5(0x15e)](_0x5c6be9);return _0xa56131===undefined?_0x5adcc5(0x17f):_0xa56131;}export function consolidateActivationsByContent(_0x5244e2){const _0x55486b=a167_0x5891,_0x3524fe={},_0x98b1d7=new Map(),_0x31463c=new Map();for(const _0x3e5304 of _0x5244e2){if(!_0x3e5304)continue;for(const [_0x5db58d,_0x3049a3]of Object['entries'](_0x3e5304)){const _0x1d3927={'name':_0x3049a3[_0x55486b(0x17d)],'connection':_0x3049a3[_0x55486b(0x133)],..._0x3049a3['all_columns']!==undefined&&{'all_columns':_0x3049a3[_0x55486b(0x16a)]},..._0x3049a3[_0x55486b(0x16e)]!==undefined&&{'columns':_0x3049a3[_0x55486b(0x16e)]},..._0x3049a3['behavior']!==undefined&&{'behavior':_0x3049a3[_0x55486b(0x16b)]},..._0x3049a3[_0x55486b(0x13b)]!==undefined&&{'schedule':_0x3049a3[_0x55486b(0x13b)]},..._0x3049a3[_0x55486b(0x135)]!==undefined&&{'notification':_0x3049a3[_0x55486b(0x135)]},..._0x3049a3[_0x55486b(0x14b)]!==undefined&&{'connector_config':_0x3049a3[_0x55486b(0x14b)]},..._0x3049a3['activation_template_id']!==undefined&&{'activation_template_id':_0x3049a3[_0x55486b(0x137)]}},_0x2af4ab=stableStringify(_0x1d3927),_0x30c99a=_0x31463c[_0x55486b(0x164)](_0x2af4ab);_0x30c99a?_0x98b1d7[_0x55486b(0x13a)](_0x5db58d,_0x30c99a):(_0x3524fe[_0x5db58d]=_0x3049a3,_0x98b1d7[_0x55486b(0x13a)](_0x5db58d,_0x5db58d),_0x31463c[_0x55486b(0x13a)](_0x2af4ab,_0x5db58d));}}return{'merged':_0x3524fe,'nameMapping':_0x98b1d7};}export function updateActivationReferences(_0x41547c,_0x141b31){const _0x23f7d7=a167_0x5891;if(!_0x41547c)return;for(const _0x45240f of _0x41547c){if(!_0x45240f[_0x23f7d7(0x15b)])continue;for(const _0x174c06 of _0x45240f[_0x23f7d7(0x15b)]){if(_0x174c06['type']===_0x23f7d7(0x161)&&_0x174c06[_0x23f7d7(0x136)]?.[_0x23f7d7(0x161)]){const _0x36e806=_0x141b31[_0x23f7d7(0x164)](_0x174c06['with'][_0x23f7d7(0x161)]);_0x36e806&&_0x36e806!==_0x174c06['with'][_0x23f7d7(0x161)]&&(_0x174c06[_0x23f7d7(0x136)][_0x23f7d7(0x161)]=_0x36e806);}}}}export function consolidateSegmentsByContent(_0x36fb11,_0x47f492){const _0x4059f2=a167_0x5891,_0x40f4b1={},_0x161523=new Map(),_0xbdcbb7=new Map();for(const _0x394c95 of _0x36fb11){if(!_0x394c95)continue;for(const [_0x5dda1c,_0x28acfe]of Object[_0x4059f2(0x150)](_0x394c95)){if(!_0x28acfe['rule']){_0x40f4b1[_0x5dda1c]=_0x28acfe,_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x5dda1c);continue;}const _0x7b0648=_0x28acfe['description']&&_0x28acfe[_0x4059f2(0x14f)][_0x4059f2(0x16f)]()?_0x28acfe['description']:undefined,_0x30d918=JSON['stringify']({'description':_0x7b0648,'rule':deepSortObject(_0x28acfe[_0x4059f2(0x172)])}),_0x2569a1=_0xbdcbb7[_0x4059f2(0x164)](_0x30d918);if(_0x2569a1){const _0xee6aa3={..._0x28acfe[_0x4059f2(0x14f)]!==undefined&&{'description':_0x28acfe['description']},'rule':_0x28acfe[_0x4059f2(0x172)]?deepSortObject(_0x28acfe[_0x4059f2(0x172)]):_0x28acfe[_0x4059f2(0x172)]};if(_0x5dda1c<_0x2569a1){_0x40f4b1[_0x5dda1c]=_0xee6aa3,delete _0x40f4b1[_0x2569a1];for(const [_0x372602,_0x186946]of _0x161523[_0x4059f2(0x150)]()){_0x186946===_0x2569a1&&_0x161523['set'](_0x372602,_0x5dda1c);}_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x5dda1c),_0xbdcbb7[_0x4059f2(0x13a)](_0x30d918,_0x5dda1c);}else _0x40f4b1[_0x2569a1]=_0xee6aa3,_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x2569a1);}else{let _0x41524d=_0x5dda1c;if(_0x47f492){const _0x1a4ae4=_0x47f492[_0x4059f2(0x164)](_0x30d918);_0x1a4ae4&&_0x1a4ae4['length']>0x0&&(_0x41524d=_0x1a4ae4[_0x4059f2(0x15a)]()['sort']()[0x0]);}const _0x1c4985={..._0x28acfe['description']!==undefined&&{'description':_0x28acfe[_0x4059f2(0x14f)]},'rule':_0x28acfe[_0x4059f2(0x172)]?deepSortObject(_0x28acfe[_0x4059f2(0x172)]):_0x28acfe[_0x4059f2(0x172)]};_0x40f4b1[_0x41524d]=_0x1c4985,_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x41524d),_0xbdcbb7[_0x4059f2(0x13a)](_0x30d918,_0x41524d);}}}return{'merged':_0x40f4b1,'nameMapping':_0x161523};}export function updateSegmentReferences(_0x4ef7bf,_0x52955a){const _0x1fa051=a167_0x5891;if(!_0x4ef7bf)return;for(const _0x5a0935 of _0x4ef7bf){if(_0x5a0935['entry_criteria']?.[_0x1fa051(0x177)]){const _0x2acfef=_0x52955a[_0x1fa051(0x164)](_0x5a0935[_0x1fa051(0x180)]['segment']);_0x2acfef&&(_0x5a0935['entry_criteria'][_0x1fa051(0x177)]=_0x2acfef);}if(_0x5a0935[_0x1fa051(0x169)])for(const _0x3aecc7 of _0x5a0935[_0x1fa051(0x169)]){if(_0x3aecc7['segment']){const _0x26e607=_0x52955a[_0x1fa051(0x164)](_0x3aecc7[_0x1fa051(0x177)]);_0x26e607&&(_0x3aecc7[_0x1fa051(0x177)]=_0x26e607);}}if(_0x5a0935[_0x1fa051(0x13f)]?.[_0x1fa051(0x177)]){const _0x2a18f3=_0x52955a[_0x1fa051(0x164)](_0x5a0935['milestone'][_0x1fa051(0x177)]);_0x2a18f3&&(_0x5a0935[_0x1fa051(0x13f)][_0x1fa051(0x177)]=_0x2a18f3);}if(_0x5a0935[_0x1fa051(0x15b)])for(const _0x2002e1 of _0x5a0935[_0x1fa051(0x15b)]){if(_0x2002e1[_0x1fa051(0x183)]===_0x1fa051(0x158)&&_0x2002e1[_0x1fa051(0x136)]?.[_0x1fa051(0x15f)])for(const _0x5a8544 of _0x2002e1[_0x1fa051(0x136)][_0x1fa051(0x15f)]){if(_0x5a8544[_0x1fa051(0x177)]){const _0x1680ba=_0x52955a[_0x1fa051(0x164)](_0x5a8544[_0x1fa051(0x177)]);_0x1680ba&&(_0x5a8544[_0x1fa051(0x177)]=_0x1680ba);}}if(_0x2002e1[_0x1fa051(0x183)]==='wait'&&_0x2002e1[_0x1fa051(0x136)]?.['condition']?.[_0x1fa051(0x177)]){const _0x4bb5f6=_0x52955a['get'](_0x2002e1[_0x1fa051(0x136)][_0x1fa051(0x152)][_0x1fa051(0x177)]);_0x4bb5f6&&(_0x2002e1[_0x1fa051(0x136)][_0x1fa051(0x152)]['segment']=_0x4bb5f6);}}}}export function updateSegmentRefsInSegments(_0x2fb788,_0x4b4d45){const _0x1d4707=a167_0x5891;for(const _0x5e32d8 of Object[_0x1d4707(0x141)](_0x2fb788)){_0x5e32d8['rule']&&updateSegmentRefsInRule(_0x5e32d8[_0x1d4707(0x172)],_0x4b4d45);}}function updateSegmentRefsInRule(_0x36c0bf,_0x5755ca){const _0x275883=a167_0x5891;if(_0x36c0bf===null||typeof _0x36c0bf!==_0x275883(0x15d))return;if(Array[_0x275883(0x168)](_0x36c0bf)){for(const _0x3fa426 of _0x36c0bf){updateSegmentRefsInRule(_0x3fa426,_0x5755ca);}return;}const _0x5bc917=_0x36c0bf;if((_0x5bc917[_0x275883(0x183)]===_0x275883(0x17b)||_0x5bc917[_0x275883(0x183)]===_0x275883(0x156))&&typeof _0x5bc917[_0x275883(0x177)]===_0x275883(0x149)){const _0xa4aaab=_0x5755ca[_0x275883(0x164)](_0x5bc917[_0x275883(0x177)]);_0xa4aaab&&(_0x5bc917[_0x275883(0x177)]=_0xa4aaab);}if(_0x5bc917[_0x275883(0x148)]&&Array['isArray'](_0x5bc917[_0x275883(0x148)]))for(const _0x475802 of _0x5bc917[_0x275883(0x148)]){updateSegmentRefsInRule(_0x475802,_0x5755ca);}}export function buildJourneysArray(_0x20c44e,_0x1aaedc){const _0x948729=a167_0x5891;return _0x20c44e[_0x948729(0x16c)](_0x470b74=>{const _0x4b1f88=_0x948729,_0x49bb50=_0x1aaedc?_0x470b74[_0x4b1f88(0x17a)]['id']===_0x1aaedc:_0x20c44e[_0x4b1f88(0x13c)]===0x1,_0x383fae=_0x470b74[_0x4b1f88(0x153)][_0x4b1f88(0x14d)]?.[0x0],_0x31f30e=_0x383fae?.[_0x4b1f88(0x173)]||_0x470b74[_0x4b1f88(0x153)][_0x4b1f88(0x173)],_0x2fdc5a={'version':_0x383fae?.[_0x4b1f88(0x147)]||_0x470b74[_0x4b1f88(0x153)]['version']||_0x470b74[_0x4b1f88(0x17a)][_0x4b1f88(0x17d)],'state':_0x470b74[_0x4b1f88(0x17a)][_0x4b1f88(0x155)]===_0x4b1f88(0x17e)?'launched':_0x4b1f88(0x163),'stages':_0x383fae?.['stages']||_0x470b74[_0x4b1f88(0x153)][_0x4b1f88(0x16d)]||[],'id':_0x383fae?.['id']||_0x470b74[_0x4b1f88(0x153)]['id'],'version_number':_0x383fae?.['version_number']||_0x470b74['yaml']['version_number']};return _0x31f30e&&(_0x2fdc5a[_0x4b1f88(0x173)]=_0x31f30e),_0x49bb50&&(_0x2fdc5a[_0x4b1f88(0x167)]=!![]),_0x2fdc5a;});}export function buildMergedJourneyDef(_0x1a53c7,_0x4d0c9f,_0x1dd010){const _0x27ad7b=a167_0x5891,_0x5bb4ae=_0x1a53c7[0x0][_0x27ad7b(0x153)],_0x4eedb0=buildJourneysArray(_0x1a53c7,_0x1dd010),{merged:_0x43f199,nameMapping:_0x506398}=consolidateSegmentsByContent(_0x1a53c7[_0x27ad7b(0x16c)](_0x36268=>_0x36268[_0x27ad7b(0x153)][_0x27ad7b(0x154)]),_0x4d0c9f);updateSegmentRefsInSegments(_0x43f199,_0x506398);const _0x11c571=Array[_0x27ad7b(0x179)](_0x506398['entries']())[_0x27ad7b(0x13e)](([_0x38f977,_0x102355])=>_0x38f977!==_0x102355&&_0x38f977[_0x27ad7b(0x15c)](_0x27ad7b(0x180)));let _0x39a48c=_0x43f199,_0x262a9f=new Map();if(_0x11c571){const _0x3aaf9d=consolidateSegmentsByContent([_0x43f199],_0x4d0c9f);_0x39a48c=_0x3aaf9d[_0x27ad7b(0x157)],_0x262a9f=_0x3aaf9d[_0x27ad7b(0x146)];}const _0x29621b=new Map(_0x506398);for(const [_0x4aa18d,_0x4b541d]of _0x262a9f[_0x27ad7b(0x150)]()){_0x29621b[_0x27ad7b(0x13a)](_0x4aa18d,_0x4b541d);}for(const [_0x3628c7,_0x581338]of _0x29621b['entries']()){let _0x3e399c=_0x581338,_0x38aeaf=0x0;while(_0x29621b[_0x27ad7b(0x182)](_0x3e399c)&&_0x29621b[_0x27ad7b(0x164)](_0x3e399c)!==_0x3e399c&&_0x38aeaf<MAX_MAPPING_CHAIN_DEPTH){_0x3e399c=_0x29621b[_0x27ad7b(0x164)](_0x3e399c),_0x38aeaf++;}_0x3e399c!==_0x581338&&_0x29621b[_0x27ad7b(0x13a)](_0x3628c7,_0x3e399c);}for(const _0x174a53 of _0x4eedb0){updateSegmentReferences(_0x174a53['stages'],_0x29621b);}const {merged:_0x3a6bec,nameMapping:_0x4a30a4}=consolidateActivationsByContent(_0x1a53c7[_0x27ad7b(0x16c)](_0x2ea13a=>_0x2ea13a[_0x27ad7b(0x153)]['activations']));for(const _0x34fa62 of _0x4eedb0){updateActivationReferences(_0x34fa62[_0x27ad7b(0x16d)],_0x4a30a4);}let _0x2456fd=_0x5bb4ae['goal'];if(_0x2456fd?.[_0x27ad7b(0x177)]){const _0x297845=_0x29621b['get'](_0x2456fd[_0x27ad7b(0x177)]);_0x297845&&(_0x2456fd={..._0x2456fd,'segment':_0x297845});}for(const _0x370a24 of _0x4eedb0){if(_0x370a24['goal']?.['segment']){const _0x151fe5=_0x29621b['get'](_0x370a24[_0x27ad7b(0x173)][_0x27ad7b(0x177)]);_0x151fe5&&(_0x370a24[_0x27ad7b(0x173)]={..._0x370a24[_0x27ad7b(0x173)],'segment':_0x151fe5});}}return _0x4eedb0[_0x27ad7b(0x13e)](_0xf03053=>_0xf03053['goal'])&&(_0x2456fd=undefined),{'type':_0x27ad7b(0x159),'name':_0x5bb4ae[_0x27ad7b(0x17d)],'description':_0x5bb4ae[_0x27ad7b(0x14f)],'goal':_0x2456fd,'reentry':_0x5bb4ae[_0x27ad7b(0x14a)],'segments':Object[_0x27ad7b(0x134)](_0x39a48c)[_0x27ad7b(0x13c)]>0x0?_0x39a48c:undefined,'activations':Object['keys'](_0x3a6bec)[_0x27ad7b(0x13c)]>0x0?_0x3a6bec:undefined,'journeys':_0x4eedb0,'bundle_id':_0x5bb4ae[_0x27ad7b(0x181)],'bundle_name':_0x5bb4ae['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0xf6fbb9,_0x143d10,_0x5ea0ef,_0x561795){const _0x35dc28=a167_0x5891,_0x4f04f3=_0xf6fbb9+':'+_0x143d10,_0x407cc6=_0x5ea0ef['get'](_0x4f04f3);if(_0x407cc6)return _0x407cc6;const _0x16a0bd=await _0x561795(_0xf6fbb9),_0x8d7ff0=_0x16a0bd['attributes'][_0x35dc28(0x14c)]||_0x16a0bd['attributes'][_0x35dc28(0x17d)],_0x2d76e8=_0x16a0bd[_0x35dc28(0x139)]['journeyStages'][_0x35dc28(0x143)](_0x9555b5=>String(_0x9555b5['id'])===String(_0x143d10)),_0x103706=_0x2d76e8?.[_0x35dc28(0x17d)]||_0x143d10,_0x5a9730={'journeyName':_0x8d7ff0,'stageName':_0x103706};return _0x5ea0ef[_0x35dc28(0x13a)](_0x4f04f3,_0x5a9730),_0x5a9730;}export function formatApiJourneyName(_0x171458,_0x3fed23){return _0x3fed23+'\x20('+_0x171458+')';}export function isLocalJourneyRef(_0x175b66){const _0x4a3b8e=a167_0x5891;return _0x175b66[_0x4a3b8e(0x14e)](_0x4a3b8e(0x145))||_0x175b66[_0x4a3b8e(0x14e)](_0x4a3b8e(0x140));}export function buildLocalRuleToNameMapping(_0x45990f){const _0x289166=a167_0x5891,_0x2e4631=new Map();if(!_0x45990f)return _0x2e4631;for(const [_0x2e81e2,_0x162e5b]of Object[_0x289166(0x150)](_0x45990f)){if(_0x162e5b[_0x289166(0x172)]){const _0x19f951=serializeRule(_0x162e5b[_0x289166(0x172)]),_0x10d681=_0x2e4631['get'](_0x19f951)||[];_0x10d681[_0x289166(0x170)](_0x2e81e2),_0x2e4631[_0x289166(0x13a)](_0x19f951,_0x10d681);}}return _0x2e4631;}export function buildLocalRuleToNameMappingFromJourney(_0x290c5d){const _0x5b588c=a167_0x5891,_0x1b31e4=_0x290c5d[_0x5b588c(0x154)];if(!_0x1b31e4)return new Map();const _0x4e1166=collectSegmentUsageCounts(_0x290c5d),_0x43e859=new Map();let _0x4f6de9=0x0;for(const [_0x518681,_0x12ddf8]of Object['entries'](_0x1b31e4)){if(!_0x12ddf8[_0x5b588c(0x172)]){_0x4f6de9++;continue;}const _0xeef40d=serializeRule(_0x12ddf8[_0x5b588c(0x172)]),_0x820cba=_0x43e859[_0x5b588c(0x164)](_0xeef40d)||[];_0x820cba[_0x5b588c(0x170)]({'name':_0x518681,'index':_0x4f6de9}),_0x43e859[_0x5b588c(0x13a)](_0xeef40d,_0x820cba),_0x4f6de9++;}const _0x5eee74=new Map();for(const [_0x4d8126,_0x7f787d]of _0x43e859){const _0x551dba=_0x7f787d[_0x5b588c(0x15a)]()[_0x5b588c(0x162)]((_0x437aa7,_0x4e1f10)=>{const _0x19da90=_0x5b588c,_0x29bc87=_0x4e1166['get'](_0x437aa7[_0x19da90(0x17d)])||0x0,_0x5c1b54=_0x4e1166[_0x19da90(0x164)](_0x4e1f10[_0x19da90(0x17d)])||0x0;if(_0x29bc87!==_0x5c1b54)return _0x5c1b54-_0x29bc87;return _0x437aa7[_0x19da90(0x176)]-_0x4e1f10[_0x19da90(0x176)];})[_0x5b588c(0x16c)](_0x144d8b=>_0x144d8b[_0x5b588c(0x17d)]);_0x5eee74[_0x5b588c(0x13a)](_0x4d8126,_0x551dba);}return _0x5eee74;}export function collectSegmentUsageCounts(_0x223c1d){const _0x22ef01=a167_0x5891,_0x30954d=new Map(),_0x2d8387=_0x32924f=>{const _0x1bfca0=a167_0x5891;if(!_0x32924f)return;_0x30954d[_0x1bfca0(0x13a)](_0x32924f,(_0x30954d[_0x1bfca0(0x164)](_0x32924f)||0x0)+0x1);},_0x1b7eac=_0x587406=>{const _0x2a3d9b=a167_0x5891;for(const _0x218b14 of _0x587406){_0x2d8387(_0x218b14[_0x2a3d9b(0x180)]?.['segment']);if(_0x218b14[_0x2a3d9b(0x169)])for(const _0x4dac82 of _0x218b14['exit_criteria']){_0x2d8387(_0x4dac82[_0x2a3d9b(0x177)]);}_0x2d8387(_0x218b14[_0x2a3d9b(0x13f)]?.[_0x2a3d9b(0x177)]);if(_0x218b14[_0x2a3d9b(0x15b)])for(const _0x59a5d7 of _0x218b14[_0x2a3d9b(0x15b)]){if(_0x59a5d7[_0x2a3d9b(0x183)]===_0x2a3d9b(0x158))for(const _0x56ea65 of _0x59a5d7[_0x2a3d9b(0x136)][_0x2a3d9b(0x15f)]){_0x2d8387(_0x56ea65['segment']);}else _0x59a5d7[_0x2a3d9b(0x183)]===_0x2a3d9b(0x174)&&_0x2d8387(_0x59a5d7[_0x2a3d9b(0x136)]['condition']?.[_0x2a3d9b(0x177)]);}}};_0x2d8387(_0x223c1d['goal']?.[_0x22ef01(0x177)]);if(_0x223c1d[_0x22ef01(0x14d)])for(const _0x3c859b of _0x223c1d[_0x22ef01(0x14d)]){_0x2d8387(_0x3c859b[_0x22ef01(0x173)]?.[_0x22ef01(0x177)]),_0x1b7eac(_0x3c859b[_0x22ef01(0x16d)]);}_0x223c1d[_0x22ef01(0x16d)]&&_0x1b7eac(_0x223c1d[_0x22ef01(0x16d)]);if(_0x223c1d['versions'])for(const _0x48b646 of _0x223c1d[_0x22ef01(0x13d)]){_0x1b7eac(_0x48b646[_0x22ef01(0x16d)]);}return _0x30954d;}
@@ -1 +1 @@
1
- (function(_0x563e77,_0x10305f){const _0x29b841=a166_0x2e35,_0x44e3f5=_0x563e77();while(!![]){try{const _0x7138a1=parseInt(_0x29b841(0x102))/0x1*(-parseInt(_0x29b841(0x177))/0x2)+parseInt(_0x29b841(0xc9))/0x3*(parseInt(_0x29b841(0xcb))/0x4)+-parseInt(_0x29b841(0x140))/0x5*(parseInt(_0x29b841(0x123))/0x6)+-parseInt(_0x29b841(0xf7))/0x7*(parseInt(_0x29b841(0xd0))/0x8)+parseInt(_0x29b841(0x13a))/0x9+-parseInt(_0x29b841(0x114))/0xa+parseInt(_0x29b841(0x156))/0xb;if(_0x7138a1===_0x10305f)break;else _0x44e3f5['push'](_0x44e3f5['shift']());}catch(_0x3c98a9){_0x44e3f5['push'](_0x44e3f5['shift']());}}}(a166_0x28f5,0x9f694));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x315e97,_0x50e2ba,_0x37bd38,_0xb27aaa,_0x5ba14a,_0x57eb2b){return{'level':_0x315e97,'path':_0x50e2ba,'code':_0x37bd38,'message':_0xb27aaa,'location':getLocationFromPath(_0x5ba14a['document'],_0x5ba14a['source'],pathToArray(_0x57eb2b??_0x50e2ba))};}function validateVersionStructure(_0x297d92,_0x3ea8f4){const _0x534ed6=a166_0x2e35,_0x586b65=[];return _0x297d92[_0x534ed6(0xc6)]>MAX_STAGES&&_0x586b65['push'](createIssue(_0x534ed6(0x10f),_0x534ed6(0x175),_0x534ed6(0x169),_0x534ed6(0xe2)+_0x297d92['length']+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x3ea8f4)),_0x586b65;}function validateStageStructure(_0x4a77a9,_0x2917d9,_0x42be3b,_0x30b496){const _0x3d28ef=a166_0x2e35,_0x447ba8=[],_0x5a83cc='stages['+_0x2917d9+']';_0x2917d9===0x0&&!_0x4a77a9[_0x3d28ef(0xcc)]&&_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x10f),_0x5a83cc+_0x3d28ef(0xcd),_0x3d28ef(0xdc),_0x3d28ef(0xd3)+_0x4a77a9['name']+_0x3d28ef(0x143),_0x30b496,_0x5a83cc));const _0x2614b1=_0x2917d9===_0x42be3b-0x1;!_0x2614b1&&!_0x4a77a9[_0x3d28ef(0xc2)]&&_0x447ba8['push'](createIssue(_0x3d28ef(0x10f),_0x5a83cc+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x4a77a9[_0x3d28ef(0x162)]+_0x3d28ef(0xe5),_0x30b496,_0x5a83cc));(!_0x4a77a9[_0x3d28ef(0x134)]||_0x4a77a9[_0x3d28ef(0x134)][_0x3d28ef(0xc6)]===0x0)&&_0x447ba8[_0x3d28ef(0xed)](createIssue('warning',_0x5a83cc+_0x3d28ef(0x165),_0x3d28ef(0x119),_0x3d28ef(0xd3)+_0x4a77a9[_0x3d28ef(0x162)]+_0x3d28ef(0xf0),_0x30b496,_0x5a83cc));const _0x40597b=_0x4a77a9[_0x3d28ef(0x126)]?.[_0x3d28ef(0xc6)]??0x0;if(_0x40597b===0x0)_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x10f),_0x5a83cc+'.steps',_0x3d28ef(0x11f),_0x3d28ef(0xd3)+_0x4a77a9['name']+_0x3d28ef(0x15b),_0x30b496,_0x5a83cc+_0x3d28ef(0x122)));else{if(_0x40597b===0x1)_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x15c),_0x5a83cc+_0x3d28ef(0x122),'INSUFFICIENT_STEPS',_0x3d28ef(0xd3)+_0x4a77a9[_0x3d28ef(0x162)]+_0x3d28ef(0x179),_0x30b496,_0x5a83cc+_0x3d28ef(0x122)));else _0x40597b<=0x3&&_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x15c),_0x5a83cc+_0x3d28ef(0x122),_0x3d28ef(0xc4),_0x3d28ef(0xd3)+_0x4a77a9[_0x3d28ef(0x162)]+'\x27\x20has\x20only\x20'+_0x40597b+_0x3d28ef(0x104),_0x30b496,_0x5a83cc+_0x3d28ef(0x122)));}return _0x447ba8;}function validateStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce){const _0x54cb05=a166_0x2e35,_0xf3c098=[];if(_0x3f5de0[_0x54cb05(0x14e)]===_0x54cb05(0x155))return _0x3f5de0[_0x54cb05(0x12f)]&&_0xf3c098[_0x54cb05(0xed)](createIssue(_0x54cb05(0x10f),_0x6b2eda+_0x54cb05(0x12e),_0x54cb05(0x14a),_0x54cb05(0x14f)+_0x3f5de0['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x53bab7)),_0x54cb05(0x106)in _0x3f5de0&&_0x3f5de0[_0x54cb05(0x106)]!==undefined&&_0xf3c098[_0x54cb05(0xed)](createIssue(_0x54cb05(0x10f),_0x6b2eda+'.with',_0x54cb05(0x14a),_0x54cb05(0x14f)+_0x3f5de0['name']+_0x54cb05(0xdb),_0x53bab7)),_0xf3c098;_0x3f5de0[_0x54cb05(0x12f)]&&(_0x53bab7['stepNames']&&!_0x53bab7['stepNames'][_0x54cb05(0x176)](_0x3f5de0[_0x54cb05(0x12f)])&&_0xf3c098['push'](createIssue(_0x54cb05(0x10f),_0x6b2eda+_0x54cb05(0x12e),_0x54cb05(0xec),_0x54cb05(0xfb)+_0x3f5de0['next']+'\x27',_0x53bab7)));switch(_0x3f5de0[_0x54cb05(0x14e)]){case _0x54cb05(0x172):_0xf3c098[_0x54cb05(0xed)](...validateWaitStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce));break;case _0x54cb05(0x16f):_0xf3c098['push'](...validateActivationStep(_0x3f5de0,_0x6b2eda,_0x53bab7));break;case _0x54cb05(0xef):_0xf3c098[_0x54cb05(0xed)](...validateDecisionPointStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce));break;case _0x54cb05(0x16c):_0xf3c098[_0x54cb05(0xed)](...validateAbTestStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce));break;case _0x54cb05(0x105):_0xf3c098[_0x54cb05(0xed)](...validateJumpStep(_0x3f5de0,_0x6b2eda,_0x53bab7));break;}return _0xf3c098;}function validateWaitStep(_0x3393ff,_0x1bc5ab,_0x5d61b6,_0xf9c86e){const _0x24766f=a166_0x2e35,_0x4ef672=[];if(!_0x3393ff[_0x24766f(0x106)])return _0x4ef672[_0x24766f(0xed)](createIssue('error',_0x1bc5ab+'.with','MISSING_WAIT_PARAMS',_0x24766f(0x130),_0x5d61b6,_0x1bc5ab)),_0x4ef672;if(_0x3393ff['with'][_0x24766f(0x124)]){const _0x5a9cc0=_0x3393ff['with'][_0x24766f(0x124)];if(_0x5a9cc0[_0x24766f(0x14c)]){_0x5d61b6[_0x24766f(0xcf)]?.[_0x24766f(0x147)](_0x5a9cc0[_0x24766f(0x14c)]);!_0x5a9cc0[_0x24766f(0x14c)][_0x24766f(0x11b)]('ref:')&&(_0x5d61b6['embeddedSegments']&&!_0x5d61b6[_0x24766f(0x103)][_0x24766f(0x176)](_0x5a9cc0[_0x24766f(0x14c)])&&_0x4ef672['push'](createIssue(_0x24766f(0x10f),_0x1bc5ab+_0x24766f(0x158),_0x24766f(0xf9),_0x24766f(0x135)+_0x5a9cc0[_0x24766f(0x14c)]+_0x24766f(0x132),_0x5d61b6)));_0x5a9cc0[_0x24766f(0x12f)]&&_0x5d61b6[_0x24766f(0xd4)]&&!_0x5d61b6['stepNames'][_0x24766f(0x176)](_0x5a9cc0['next'])&&_0x4ef672[_0x24766f(0xed)](createIssue(_0x24766f(0x10f),_0x1bc5ab+_0x24766f(0x154),_0x24766f(0xec),_0x24766f(0x173)+_0x5a9cc0[_0x24766f(0x12f)]+'\x27',_0x5d61b6));_0x5a9cc0[_0x24766f(0x109)]?.[_0x24766f(0x12f)]&&_0x5d61b6['stepNames']&&!_0x5d61b6[_0x24766f(0xd4)][_0x24766f(0x176)](_0x5a9cc0[_0x24766f(0x109)][_0x24766f(0x12f)])&&_0x4ef672['push'](createIssue('error',_0x1bc5ab+'.with.condition.timeout.next',_0x24766f(0xec),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x5a9cc0[_0x24766f(0x109)][_0x24766f(0x12f)]+'\x27',_0x5d61b6));const _0x5d85ac=_0x5a9cc0[_0x24766f(0x12f)]||_0x3393ff[_0x24766f(0x12f)],_0x3ffd9d=_0x5a9cc0[_0x24766f(0x109)]?.['next']||_0x3393ff[_0x24766f(0x12f)];if(_0x5d85ac){const _0x208260=_0xf9c86e[_0x24766f(0x11e)](_0x5d85ac);_0x208260?.[_0x24766f(0x14e)]===_0x24766f(0xd2)&&_0x4ef672[_0x24766f(0xed)](createIssue(_0x24766f(0x15c),_0x1bc5ab+'.with.condition.next',_0x24766f(0xeb),_0x24766f(0x170)+_0x5d85ac+_0x24766f(0x11a),_0x5d61b6,_0x1bc5ab+_0x24766f(0x116)));}if(_0x3ffd9d){const _0x2d7980=_0xf9c86e[_0x24766f(0x11e)](_0x3ffd9d);_0x2d7980?.[_0x24766f(0x14e)]===_0x24766f(0xd2)&&_0x4ef672['push'](createIssue('warning',_0x1bc5ab+_0x24766f(0xe0),_0x24766f(0xeb),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x3ffd9d+_0x24766f(0x11a),_0x5d61b6,_0x1bc5ab+_0x24766f(0xdd)));}}}return _0x4ef672;}function validateActivationStep(_0x89dfcc,_0x54fb76,_0x136c57){const _0x27180f=a166_0x2e35,_0x6aae40=[];if(!_0x89dfcc['with']?.[_0x27180f(0x16f)])return _0x6aae40[_0x27180f(0xed)](createIssue(_0x27180f(0x10f),_0x54fb76+_0x27180f(0x160),_0x27180f(0x11d),_0x27180f(0xd6),_0x136c57,_0x54fb76)),_0x6aae40;const _0x5d1583=_0x89dfcc[_0x27180f(0x106)]['activation'];return _0x136c57['activationKeys']&&!_0x5d1583['startsWith'](_0x27180f(0xf8))&&(!_0x136c57[_0x27180f(0xd8)][_0x27180f(0x176)](_0x5d1583)&&_0x6aae40[_0x27180f(0xed)](createIssue('error',_0x54fb76+'.with.activation','MISSING_ACTIVATION_DEFINITION',_0x27180f(0x107)+_0x5d1583+_0x27180f(0xe6),_0x136c57))),_0x6aae40;}function validateDecisionPointStep(_0x4cf68b,_0x449501,_0x3bedcc,_0xa93821){const _0x375e22=a166_0x2e35,_0x28d639=[];if(!_0x4cf68b[_0x375e22(0x106)]?.[_0x375e22(0x153)]||_0x4cf68b[_0x375e22(0x106)][_0x375e22(0x153)][_0x375e22(0xc6)]===0x0)return _0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x10f),_0x449501+'.with.branches',_0x375e22(0xee),_0x375e22(0xe8),_0x3bedcc,_0x449501)),_0x28d639;for(let _0x17b7de=0x0;_0x17b7de<_0x4cf68b['with'][_0x375e22(0x153)][_0x375e22(0xc6)];_0x17b7de++){const _0x20eefa=_0x4cf68b[_0x375e22(0x106)]['branches'][_0x17b7de],_0x41ab0e=_0x449501+'.with.branches['+_0x17b7de+']';_0x20eefa['segment']&&!_0x20eefa[_0x375e22(0xc5)]&&(_0x3bedcc[_0x375e22(0xcf)]?.[_0x375e22(0x147)](_0x20eefa[_0x375e22(0x14c)]),!_0x20eefa[_0x375e22(0x14c)]['startsWith']('ref:')&&(_0x3bedcc['embeddedSegments']&&!_0x3bedcc['embeddedSegments']['has'](_0x20eefa['segment'])&&_0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x10f),_0x41ab0e+_0x375e22(0xe1),_0x375e22(0xf9),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x20eefa[_0x375e22(0x14c)]+'\x27',_0x3bedcc))));_0x20eefa[_0x375e22(0x12f)]&&_0x3bedcc[_0x375e22(0xd4)]&&!_0x3bedcc[_0x375e22(0xd4)][_0x375e22(0x176)](_0x20eefa[_0x375e22(0x12f)])&&_0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x10f),_0x41ab0e+_0x375e22(0x12e),_0x375e22(0xec),_0x375e22(0x15d)+_0x20eefa[_0x375e22(0x12f)]+'\x27',_0x3bedcc));if(_0x20eefa['next']){const _0x21d2bc=_0xa93821[_0x375e22(0x11e)](_0x20eefa['next']);_0x21d2bc?.[_0x375e22(0x14e)]===_0x375e22(0xd2)&&_0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x15c),_0x41ab0e+_0x375e22(0x12e),_0x375e22(0xeb),'Decision\x20branch\x20\x27'+_0x20eefa[_0x375e22(0x162)]+_0x375e22(0x15a)+_0x20eefa[_0x375e22(0x12f)]+_0x375e22(0x167),_0x3bedcc));}}return _0x28d639;}function validateAbTestStep(_0x1418a2,_0x5a34a3,_0x563ddf,_0x29bfb8){const _0x3e15e0=a166_0x2e35,_0x3631b6=[];if(!_0x1418a2[_0x3e15e0(0x106)]?.[_0x3e15e0(0x110)]||_0x1418a2[_0x3e15e0(0x106)][_0x3e15e0(0x110)]['length']===0x0)return _0x3631b6[_0x3e15e0(0xed)](createIssue(_0x3e15e0(0x10f),_0x5a34a3+_0x3e15e0(0x108),_0x3e15e0(0xee),_0x3e15e0(0xf2),_0x563ddf,_0x5a34a3)),_0x3631b6;const _0x3db37d=_0x1418a2['with'][_0x3e15e0(0x110)]['reduce']((_0x7fa27e,_0x40f5b7)=>_0x7fa27e+(_0x40f5b7[_0x3e15e0(0x16b)]||0x0),0x0);Math[_0x3e15e0(0x10c)](_0x3db37d-0x64)>0.01&&_0x3631b6[_0x3e15e0(0xed)](createIssue(_0x3e15e0(0x10f),_0x5a34a3+_0x3e15e0(0x108),_0x3e15e0(0x136),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x3db37d+'%)',_0x563ddf));for(let _0x219f71=0x0;_0x219f71<_0x1418a2[_0x3e15e0(0x106)][_0x3e15e0(0x110)][_0x3e15e0(0xc6)];_0x219f71++){const _0x6f8d67=_0x1418a2[_0x3e15e0(0x106)][_0x3e15e0(0x110)][_0x219f71],_0x395b3f=_0x5a34a3+_0x3e15e0(0xfc)+_0x219f71+']';_0x6f8d67[_0x3e15e0(0x12f)]&&_0x563ddf[_0x3e15e0(0xd4)]&&!_0x563ddf[_0x3e15e0(0xd4)][_0x3e15e0(0x176)](_0x6f8d67[_0x3e15e0(0x12f)])&&_0x3631b6[_0x3e15e0(0xed)](createIssue(_0x3e15e0(0x10f),_0x395b3f+_0x3e15e0(0x12e),_0x3e15e0(0xec),_0x3e15e0(0xbf)+_0x6f8d67[_0x3e15e0(0x12f)]+'\x27',_0x563ddf));if(_0x6f8d67[_0x3e15e0(0x12f)]){const _0x4965a1=_0x29bfb8['get'](_0x6f8d67['next']);_0x4965a1?.[_0x3e15e0(0x14e)]===_0x3e15e0(0xd2)&&_0x3631b6['push'](createIssue('warning',_0x395b3f+_0x3e15e0(0x12e),_0x3e15e0(0xeb),_0x3e15e0(0x12c)+_0x6f8d67[_0x3e15e0(0x162)]+_0x3e15e0(0x15a)+_0x6f8d67[_0x3e15e0(0x12f)]+_0x3e15e0(0x167),_0x563ddf));}}return _0x3631b6;}function validateJumpStep(_0x342f48,_0x154da8,_0x1d48c2){const _0x1e6013=a166_0x2e35,_0x6e9baf=[];if(!_0x342f48[_0x1e6013(0x106)]?.[_0x1e6013(0x157)])return _0x6e9baf['push'](createIssue(_0x1e6013(0x10f),_0x154da8+_0x1e6013(0xff),_0x1e6013(0x148),_0x1e6013(0x137),_0x1d48c2,_0x154da8)),_0x6e9baf;return(!_0x342f48['with'][_0x1e6013(0x157)][_0x1e6013(0x112)]||!_0x342f48[_0x1e6013(0x106)][_0x1e6013(0x157)][_0x1e6013(0x10e)])&&_0x6e9baf[_0x1e6013(0xed)](createIssue(_0x1e6013(0x10f),_0x154da8+_0x1e6013(0xff),'INVALID_JUMP_TARGET',_0x1e6013(0xdf),_0x1d48c2)),_0x6e9baf;}function buildConvergenceMap(_0x224386){const _0x136e4e=a166_0x2e35,_0x13773d=new Map();function _0x340344(_0x498693,_0x28f9a9){const _0x5d62fe=a166_0x2e35,_0x130df9=_0x13773d['get'](_0x498693)||[];_0x130df9[_0x5d62fe(0xed)](_0x28f9a9),_0x13773d['set'](_0x498693,_0x130df9);}for(const _0x5c7be5 of _0x224386){_0x5c7be5['next']&&_0x340344(_0x5c7be5[_0x136e4e(0x12f)],{'stepName':_0x5c7be5[_0x136e4e(0x162)],'description':_0x136e4e(0xf6)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'});if(_0x5c7be5[_0x136e4e(0x14e)]===_0x136e4e(0xef)&&_0x5c7be5['with']?.[_0x136e4e(0x153)])for(const _0x136574 of _0x5c7be5[_0x136e4e(0x106)][_0x136e4e(0x153)]){_0x136574[_0x136e4e(0x12f)]&&_0x340344(_0x136574[_0x136e4e(0x12f)],{'stepName':_0x5c7be5['name'],'description':_0x136e4e(0x150)+_0x136574[_0x136e4e(0x162)]+_0x136e4e(0x142)+_0x5c7be5['name']+'\x27'});}if(_0x5c7be5[_0x136e4e(0x14e)]===_0x136e4e(0x16c)&&_0x5c7be5[_0x136e4e(0x106)]?.[_0x136e4e(0x110)])for(const _0x550f91 of _0x5c7be5[_0x136e4e(0x106)]['variants']){_0x550f91[_0x136e4e(0x12f)]&&_0x340344(_0x550f91['next'],{'stepName':_0x5c7be5['name'],'description':'variant\x20\x27'+_0x550f91[_0x136e4e(0x162)]+_0x136e4e(0x142)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'});}_0x5c7be5[_0x136e4e(0x14e)]===_0x136e4e(0x172)&&_0x5c7be5[_0x136e4e(0x106)]?.[_0x136e4e(0x124)]&&(_0x5c7be5[_0x136e4e(0x106)]['condition'][_0x136e4e(0x12f)]&&_0x340344(_0x5c7be5['with'][_0x136e4e(0x124)][_0x136e4e(0x12f)],{'stepName':_0x5c7be5[_0x136e4e(0x162)],'description':_0x136e4e(0x120)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'}),_0x5c7be5['with'][_0x136e4e(0x124)]['timeout']?.[_0x136e4e(0x12f)]&&_0x340344(_0x5c7be5['with'][_0x136e4e(0x124)][_0x136e4e(0x109)][_0x136e4e(0x12f)],{'stepName':_0x5c7be5[_0x136e4e(0x162)],'description':_0x136e4e(0x10a)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'}));}return _0x13773d;}function validateFlowControl(_0x79b86f,_0x17897a,_0x564b11){const _0x2d0c1b=a166_0x2e35,_0x266a27=[],_0x47cb34=_0x2d0c1b(0x16d)+_0x17897a+']',_0x1711ab=_0x79b86f[_0x2d0c1b(0x126)]||[];if(_0x1711ab[_0x2d0c1b(0xc6)]===0x0)return _0x266a27;const _0x3c904f=new Map();for(const _0x432d20 of _0x1711ab){_0x432d20['name']&&_0x3c904f['set'](_0x432d20['name'],_0x432d20);}const _0x14e7a9=buildConvergenceMap(_0x1711ab),_0x42c48c=_0x1711ab[_0x2d0c1b(0xc3)](_0x7be47c=>_0x7be47c['type']===_0x2d0c1b(0x155));!_0x42c48c&&_0x266a27[_0x2d0c1b(0xed)](createIssue(_0x2d0c1b(0x10f),_0x47cb34+_0x2d0c1b(0x122),_0x2d0c1b(0xf1),'Stage\x20\x27'+_0x79b86f[_0x2d0c1b(0x162)]+_0x2d0c1b(0x101),_0x564b11));for(const [_0x453431,_0x3246c7]of _0x14e7a9){const _0x5b084e=_0x3c904f[_0x2d0c1b(0x11e)](_0x453431);if(!_0x5b084e)continue;if(_0x3246c7[_0x2d0c1b(0xc6)]>0x1&&_0x5b084e[_0x2d0c1b(0x14e)]!==_0x2d0c1b(0xd2)){const _0x4f4f1d=_0x3246c7['map'](_0x3af009=>_0x3af009[_0x2d0c1b(0x149)])[_0x2d0c1b(0x15e)](',\x20');_0x266a27['push'](createIssue('error',_0x47cb34+'.steps',_0x2d0c1b(0xe9),_0x2d0c1b(0xe3)+_0x453431+_0x2d0c1b(0x10d)+_0x4f4f1d+_0x2d0c1b(0x146),_0x564b11));}_0x3246c7[_0x2d0c1b(0xc6)]===0x1&&_0x5b084e[_0x2d0c1b(0x14e)]===_0x2d0c1b(0xd2)&&_0x266a27[_0x2d0c1b(0xed)](createIssue(_0x2d0c1b(0x15c),_0x47cb34+_0x2d0c1b(0x122),_0x2d0c1b(0x164),'Merge\x20step\x20\x27'+_0x453431+_0x2d0c1b(0x15f)+_0x3246c7[0x0][_0x2d0c1b(0x149)]+_0x2d0c1b(0x11c),_0x564b11));}for(const _0x3800a3 of _0x1711ab){if(_0x3800a3[_0x2d0c1b(0x14e)]==='merge'&&_0x3800a3[_0x2d0c1b(0x12f)]){const _0x151371=_0x3c904f[_0x2d0c1b(0x11e)](_0x3800a3[_0x2d0c1b(0x12f)]);_0x151371?.['type']===_0x2d0c1b(0xd2)&&_0x266a27[_0x2d0c1b(0xed)](createIssue(_0x2d0c1b(0x10f),_0x47cb34+_0x2d0c1b(0x122),_0x2d0c1b(0x174),_0x2d0c1b(0xd5)+_0x3800a3[_0x2d0c1b(0x162)]+_0x2d0c1b(0xbd)+_0x3800a3[_0x2d0c1b(0x12f)]+_0x2d0c1b(0x161),_0x564b11));}}return _0x266a27;}function validateCriteria(_0x239f66,_0x5b1e3b,_0x3e135b){const _0x4cfcdf=a166_0x2e35,_0x95abee=[];return _0x239f66[_0x4cfcdf(0x14c)]&&(_0x3e135b[_0x4cfcdf(0xcf)]?.[_0x4cfcdf(0x147)](_0x239f66['segment']),!_0x239f66[_0x4cfcdf(0x14c)][_0x4cfcdf(0x11b)](_0x4cfcdf(0xf8))&&(_0x3e135b[_0x4cfcdf(0x103)]&&!_0x3e135b[_0x4cfcdf(0x103)][_0x4cfcdf(0x176)](_0x239f66[_0x4cfcdf(0x14c)])&&_0x95abee[_0x4cfcdf(0xed)](createIssue(_0x4cfcdf(0x10f),_0x5b1e3b+_0x4cfcdf(0xe1),_0x4cfcdf(0xf9),_0x4cfcdf(0x159)+_0x239f66[_0x4cfcdf(0x14c)]+'\x27',_0x3e135b)))),_0x95abee;}function validateEmbeddedSegment(_0x275d6b,_0x49dfe2,_0x53beaa){const _0x498245=a166_0x2e35,_0x43ac51=[];return _0x275d6b[_0x498245(0x113)]&&_0x43ac51[_0x498245(0xed)](...validateRuleDef(_0x275d6b[_0x498245(0x113)],_0x49dfe2+_0x498245(0x16a),_0x53beaa)),_0x43ac51;}function validateStage(_0x2f8016,_0xbfe1cc,_0x34fc6f,_0x4335b0){const _0x2834cc=a166_0x2e35,_0x42aebc=[],_0xeb78d=_0x2834cc(0x16d)+_0xbfe1cc+']',_0x2c287b=new Map(),_0x383545=new Map();if(_0x2f8016[_0x2834cc(0x126)]){for(let _0x48ee14=0x0;_0x48ee14<_0x2f8016[_0x2834cc(0x126)][_0x2834cc(0xc6)];_0x48ee14++){const _0x5367a0=_0x2f8016[_0x2834cc(0x126)][_0x48ee14];_0x5367a0[_0x2834cc(0x162)]&&_0x2c287b[_0x2834cc(0x13f)](_0x5367a0[_0x2834cc(0x162)],_0x5367a0);}for(let _0x5c5dcd=0x0;_0x5c5dcd<_0x2f8016['steps'][_0x2834cc(0xc6)];_0x5c5dcd++){const _0x5ded0c=_0x2f8016[_0x2834cc(0x126)][_0x5c5dcd],_0x236c91=_0xeb78d+'.steps['+_0x5c5dcd+']';if(_0x5ded0c[_0x2834cc(0x162)]){if(_0x383545[_0x2834cc(0x176)](_0x5ded0c[_0x2834cc(0x162)])){const _0x3f8f84=_0x383545[_0x2834cc(0x11e)](_0x5ded0c[_0x2834cc(0x162)]);_0x42aebc['push'](createIssue(_0x2834cc(0x10f),_0x236c91+'.name',_0x2834cc(0xf4),'Duplicate\x20step\x20name\x20\x27'+_0x5ded0c[_0x2834cc(0x162)]+_0x2834cc(0x152)+_0x3f8f84+'])',_0x4335b0));}else _0x383545['set'](_0x5ded0c[_0x2834cc(0x162)],_0x5c5dcd);}_0x42aebc['push'](...validateStep(_0x5ded0c,_0x236c91,_0x4335b0,_0x2c287b));}}_0x2f8016[_0x2834cc(0xcc)]&&_0x42aebc[_0x2834cc(0xed)](...validateCriteria(_0x2f8016['entry_criteria'],_0xeb78d+'.entry_criteria',_0x4335b0));if(_0x2f8016['exit_criteria'])for(let _0x29e1de=0x0;_0x29e1de<_0x2f8016[_0x2834cc(0x134)][_0x2834cc(0xc6)];_0x29e1de++){_0x42aebc[_0x2834cc(0xed)](...validateCriteria(_0x2f8016[_0x2834cc(0x134)][_0x29e1de],_0xeb78d+'.exit_criteria['+_0x29e1de+']',_0x4335b0));}return _0x2f8016['milestone']&&_0x42aebc[_0x2834cc(0xed)](...validateCriteria(_0x2f8016[_0x2834cc(0xc2)],_0xeb78d+'.milestone',_0x4335b0)),_0x42aebc[_0x2834cc(0xed)](...validateStageStructure(_0x2f8016,_0xbfe1cc,_0x34fc6f,_0x4335b0)),_0x42aebc[_0x2834cc(0xed)](...validateFlowControl(_0x2f8016,_0xbfe1cc,_0x4335b0)),_0x42aebc;}function validateStagesForVersion(_0x382941,_0x572fe3,_0x84e832,_0xde554,_0x40c30c,_0x420bd4,_0x43b7c6){const _0x1592f4=a166_0x2e35;if(_0x382941[_0x1592f4(0xc6)]===0x0){_0x40c30c['push']({'level':_0x1592f4(0x10f),'path':_0xde554+_0x1592f4(0x175),'code':'MISSING_STAGES','message':_0x1592f4(0x117),'location':getLocationFromPath(_0x84e832[_0x1592f4(0x12b)],_0x84e832['source'],['stages'])});return;}const _0x5d195c=new Set();for(const _0x41c266 of _0x382941){if(_0x41c266[_0x1592f4(0x126)])for(const _0x33bd02 of _0x41c266[_0x1592f4(0x126)]){_0x33bd02[_0x1592f4(0x162)]&&_0x5d195c[_0x1592f4(0x147)](_0x33bd02[_0x1592f4(0x162)]);}}const _0x2fb563={..._0x84e832,'stepNames':_0x5d195c},_0x2fb5e1=validateVersionStructure(_0x382941,_0x2fb563);for(const _0x4d199d of _0x2fb5e1){const _0xc77ec4=_0xde554?{..._0x4d199d,'path':''+_0xde554+_0x4d199d[_0x1592f4(0xce)]}:_0x4d199d;if(_0xc77ec4[_0x1592f4(0x138)]===_0x1592f4(0x10f))_0x40c30c[_0x1592f4(0xed)](_0xc77ec4);else _0x420bd4['push'](_0xc77ec4);}for(let _0x4a0a8f=0x0;_0x4a0a8f<_0x382941[_0x1592f4(0xc6)];_0x4a0a8f++){const _0x2659a6=validateStage(_0x382941[_0x4a0a8f],_0x4a0a8f,_0x382941['length'],_0x2fb563);for(const _0x32d753 of _0x2659a6){const _0x361382=_0xde554?{..._0x32d753,'path':''+_0xde554+_0x32d753['path']}:_0x32d753;if(_0x361382[_0x1592f4(0x138)]===_0x1592f4(0x10f))_0x40c30c[_0x1592f4(0xed)](_0x361382);else _0x420bd4['push'](_0x361382);}}if(_0x572fe3[_0x1592f4(0xc1)]){const _0x6cc5bd=_0x43b7c6?.[_0x1592f4(0x16e)]?'goal':_0xde554+'goal',_0x3dcd39=validateCriteria(_0x572fe3['goal'],_0x6cc5bd,_0x2fb563);for(const _0x3e471e of _0x3dcd39){if(_0x3e471e[_0x1592f4(0x138)]==='error')_0x40c30c[_0x1592f4(0xed)](_0x3e471e);else _0x420bd4[_0x1592f4(0xed)](_0x3e471e);}}}function a166_0x2e35(_0x147658,_0x55acab){_0x147658=_0x147658-0xbd;const _0x28f5e8=a166_0x28f5();let _0x2e35ea=_0x28f5e8[_0x147658];return _0x2e35ea;}function extractVersionIndex(_0x246faa){const _0x45a330=a166_0x2e35,_0x11fd28=_0x246faa[_0x45a330(0xca)](/^journeys\[(\d+)\]\./);return _0x11fd28?_0x11fd28[0x1]:undefined;}function deduplicateAcrossVersions(_0x2db332){const _0x2ed01b=a166_0x2e35,_0x1e7c75=new Map();for(let _0x228fdc=0x0;_0x228fdc<_0x2db332['length'];_0x228fdc++){const _0x49b898=_0x2db332[_0x228fdc][_0x2ed01b(0xd1)]+':'+_0x2db332[_0x228fdc][_0x2ed01b(0xfe)],_0x228534=extractVersionIndex(_0x2db332[_0x228fdc][_0x2ed01b(0xce)]),_0x58907e=_0x1e7c75[_0x2ed01b(0x11e)](_0x49b898);if(_0x58907e){_0x58907e['indices'][_0x2ed01b(0xed)](_0x228fdc);if(_0x228534)_0x58907e[_0x2ed01b(0x12a)][_0x2ed01b(0x147)](_0x228534);}else _0x1e7c75[_0x2ed01b(0x13f)](_0x49b898,{'indices':[_0x228fdc],'versions':new Set(_0x228534?[_0x228534]:[])});}const _0x9edc6b=new Set();for(const {indices:_0x331492,versions:_0x12ea75}of _0x1e7c75[_0x2ed01b(0x171)]()){if(_0x12ea75[_0x2ed01b(0xe7)]<=0x1)continue;const _0x2eae29=_0x2db332[_0x331492[0x0]];_0x2eae29[_0x2ed01b(0xce)]=_0x2eae29[_0x2ed01b(0xce)][_0x2ed01b(0x125)](/^journeys\[\d+\]\./,''),_0x2eae29[_0x2ed01b(0xfe)]=_0x2eae29['message']+_0x2ed01b(0xde)+_0x12ea75[_0x2ed01b(0xe7)]+_0x2ed01b(0xc7);for(let _0x4fbf0d=0x1;_0x4fbf0d<_0x331492['length'];_0x4fbf0d++){_0x9edc6b[_0x2ed01b(0x147)](_0x331492[_0x4fbf0d]);}}const _0x26d658=[..._0x9edc6b][_0x2ed01b(0x13d)]((_0x26d92d,_0x5ccf94)=>_0x5ccf94-_0x26d92d);for(const _0x329b55 of _0x26d658){_0x2db332[_0x2ed01b(0x168)](_0x329b55,0x1);}}export function validateJourneyDef(_0x55c4ec,_0x1e3720={},_0x43671a={}){const _0x40006f=a166_0x2e35;if(_0x43671a[_0x40006f(0xfa)])return runJourneySemanticChecks(_0x55c4ec,_0x1e3720);const _0xecbdac=JourneyDefSchema[_0x40006f(0x129)](_0x55c4ec);if(_0xecbdac['success'])return runJourneySemanticChecks(_0xecbdac[_0x40006f(0x121)],_0x1e3720);return zodErrorsToJourneyValidationResult(_0xecbdac[_0x40006f(0x10f)],_0x1e3720);}function zodErrorsToJourneyValidationResult(_0x8e7e4,_0x4952ac){const _0x2e8b1c=a166_0x2e35,_0x59b12d=flattenZodIssues(_0x8e7e4['issues']),_0x2ff1d2=_0x59b12d[_0x2e8b1c(0x133)](_0xa269b7=>{const _0x416299=_0x2e8b1c,_0x48e881=formatZodPath(_0xa269b7['path']),_0x46ad15=mapJourneyZodIssueToCode(_0xa269b7,_0x48e881),_0x430152=getLocationFromPath(_0x4952ac['document'],_0x4952ac[_0x416299(0x145)],_0xa269b7[_0x416299(0xce)][_0x416299(0x133)](_0x5be8d6=>typeof _0x5be8d6===_0x416299(0xbe)?String(_0x5be8d6):_0x5be8d6));return{'level':_0x416299(0x10f),'path':_0x48e881,'code':_0x46ad15,'message':_0xa269b7[_0x416299(0xfe)],..._0x430152&&{'location':_0x430152}};});return{'valid':![],'errors':_0x2ff1d2,'warnings':[]};}function mapJourneyZodIssueToCode(_0x368fa8,_0x14a677){const _0x148ef7=a166_0x2e35;if(_0x14a677==='name')return _0x148ef7(0x131);if(_0x14a677[_0x148ef7(0x13c)](_0x148ef7(0xf5))&&_0x14a677[_0x148ef7(0x13e)](_0x148ef7(0x126)))return'JOURNEY_SCHEMA_ERROR';if(_0x14a677==='stages'||_0x14a677[_0x148ef7(0x13c)](_0x148ef7(0x128)))return _0x148ef7(0x100);if(_0x14a677===''&&_0x368fa8[_0x148ef7(0xfe)][_0x148ef7(0x13e)](_0x148ef7(0xc0)))return _0x148ef7(0x100);if(_0x14a677[_0x148ef7(0x13e)]('activation'))return _0x148ef7(0xea);return _0x148ef7(0x144);}function a166_0x28f5(){const _0x5cf8b0=['stage','error','variants','excluded_','journey','rule','10372180OWtOjG','Journey\x20has\x20no\x20goal\x20defined','.with.condition','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','launched','MISSING_EXIT_CRITERIA','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','startsWith',').\x20Merge\x20is\x20unnecessary.','MISSING_ACTIVATION_REF','get','INSUFFICIENT_STEPS','condition\x20of\x20\x27','data','.steps','6641670uADBLE','condition','replace','steps','state','.stages','safeParse','versions','document','A/B\x20test\x20variant\x20\x27','segments.','.next','next','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','MISSING_NAME','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','map','exit_criteria','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','INVALID_AB_TEST_PERCENTAGES','Jump\x20step\x20requires\x20a\x20target','level','latest','6057846diAylu','journeys[','endsWith','sort','includes','set','5luiYme','entries','\x27\x20of\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','JOURNEY_SCHEMA_ERROR','source',').\x20Use\x20a\x20merge\x20step.','add','INVALID_JUMP_TARGET','description','END_STEP_HAS_NEXT_OR_WITH','keys','segment','journey\x20entry','type','End\x20step\x20\x27','branch\x20\x27','segments','\x27\x20(first\x20defined\x20at\x20steps[','branches','.with.condition.next','end','19099080rKbJwv','target','.with.condition.segment','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20no\x20steps','warning','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','join','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','.with.activation','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','name','Journey\x20can\x20have\x20at\x20most\x20one\x20','SINGLE_INPUT_MERGE','.exit_criteria','\x20with\x20latest:\x20true','\x27\x20with\x20no\x20action\x20in\x20between','splice','TOO_MANY_STAGES','.rule','percentage','ab_test','stages[','goalIsInherited','activation','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','values','wait','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MERGE_TO_MERGE_CHAIN','stages','has','4JQBvUX','Journey\x20name\x20is\x20required','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','symbol','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','journeys,\x20stages,\x20or\x20versions','goal','milestone','some','FEW_STEPS','excluded','length','\x20versions)','journeys','458826QvWAhD','match','12teYSfc','entry_criteria','.entry_criteria','path','referencedSegments','480472AgPsHV','code','merge','Stage\x20\x27','stepNames','Merge\x20step\x20\x27','Activation\x20step\x20requires\x20an\x20activation\x20reference','Embedded\x20segment\x20\x27','activationKeys','every','activations','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','MISSING_ENTRY_CRITERIA','.with.condition.timeout','\x20(across\x20','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','.with.condition.timeout.next','.segment','Journey\x20has\x20','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','versions[','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','size','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','CONVERGENCE_WITHOUT_MERGE','ACTIVATION_SCHEMA_ERROR','BRANCH_DIRECTLY_TO_MERGE','INVALID_NEXT_REFERENCE','push','MISSING_CONDITIONS','decision_point','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_END_STEP','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','DUPLICATE_STEP_NAME','.type','step\x20\x27','7WYdnEx','ref:','MISSING_SEGMENT_REFERENCE','skipSchema','Step\x20references\x20non-existent\x20step\x20\x27','.with.variants[','version','message','.with.target','MISSING_STAGES','\x27\x20has\x20no\x20end\x20step','5515zYkryJ','embeddedSegments','\x20steps\x20(may\x20be\x20too\x20simple)','jump','with','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','.with.variants','timeout','timeout\x20of\x20\x27','MISSING_GOAL','abs','\x27\x20(from:\x20'];a166_0x28f5=function(){return _0x5cf8b0;};return a166_0x28f5();}function runJourneySemanticChecks(_0x4fe596,_0x2664d7){const _0x5aed26=a166_0x2e35,_0x1b11dd=[],_0x5c44be=[];(!_0x4fe596['name']||_0x4fe596[_0x5aed26(0x162)]['trim']()==='')&&_0x1b11dd[_0x5aed26(0xed)]({'level':_0x5aed26(0x10f),'path':_0x5aed26(0x162),'code':_0x5aed26(0x131),'message':_0x5aed26(0x178),'location':getLocationFromPath(_0x2664d7[_0x5aed26(0x12b)],_0x2664d7[_0x5aed26(0x145)],[_0x5aed26(0x162)])});const _0x12e595=new Set();if(_0x4fe596[_0x5aed26(0x151)])for(const _0x1e60fa of Object[_0x5aed26(0x14b)](_0x4fe596[_0x5aed26(0x151)])){_0x12e595[_0x5aed26(0x147)](_0x1e60fa);}const _0x22c24d=new Set();if(_0x4fe596[_0x5aed26(0xda)])for(const _0x28b03c of Object[_0x5aed26(0x14b)](_0x4fe596[_0x5aed26(0xda)])){_0x22c24d['add'](_0x28b03c);}const _0x1e5ef8=new Set(),_0x43d892={..._0x2664d7,'embeddedSegments':_0x12e595,'referencedSegments':_0x1e5ef8,'activationKeys':_0x22c24d[_0x5aed26(0xe7)]>0x0?_0x22c24d:undefined};if(_0x4fe596['segments'])for(const [_0x4a9be0,_0x5ebefa]of Object[_0x5aed26(0x141)](_0x4fe596[_0x5aed26(0x151)])){const _0x2cbe6f=validateEmbeddedSegment(_0x5ebefa,_0x5aed26(0x12d)+_0x4a9be0,_0x43d892);for(const _0x4e45b3 of _0x2cbe6f){if(_0x4e45b3['level']===_0x5aed26(0x10f))_0x1b11dd[_0x5aed26(0xed)](_0x4e45b3);else _0x5c44be[_0x5aed26(0xed)](_0x4e45b3);}}const _0x4f5a58=!!_0x4fe596[_0x5aed26(0xc1)],_0x2b1ee7=_0x4fe596[_0x5aed26(0xc8)]?.[_0x5aed26(0xd9)](_0x1602eb=>!!_0x1602eb[_0x5aed26(0xc1)])??![];!_0x4f5a58&&!_0x2b1ee7&&_0x5c44be[_0x5aed26(0xed)]({'level':_0x5aed26(0x15c),'path':_0x5aed26(0xc1),'code':_0x5aed26(0x10b),'message':_0x5aed26(0x115),'location':getLocationFromPath(_0x2664d7['document'],_0x2664d7[_0x5aed26(0x145)],[_0x5aed26(0xc1)])});const _0x1eb3d1=_0x4fe596[_0x5aed26(0xc8)]??_0x4fe596[_0x5aed26(0x12a)];if(_0x1eb3d1&&_0x1eb3d1['filter'](_0x17f7d6=>_0x17f7d6[_0x5aed26(0x139)]===!![])[_0x5aed26(0xc6)]>0x1){const _0x521e24=_0x4fe596[_0x5aed26(0xc8)]?_0x5aed26(0xc8):_0x5aed26(0x12a);_0x1b11dd[_0x5aed26(0xed)]({'level':_0x5aed26(0x10f),'path':_0x521e24,'code':'DUPLICATE_LATEST','message':_0x5aed26(0x163)+(_0x521e24==='journeys'?_0x5aed26(0x14d):_0x5aed26(0xfd))+_0x5aed26(0x166),'location':getLocationFromPath(_0x2664d7[_0x5aed26(0x12b)],_0x2664d7[_0x5aed26(0x145)],[_0x521e24])});}if(_0x4fe596[_0x5aed26(0xc8)]&&_0x4fe596['journeys'][_0x5aed26(0xc6)]>0x0)for(let _0x2d43a2=0x0;_0x2d43a2<_0x4fe596['journeys']['length'];_0x2d43a2++){const _0x26c7cc=_0x4fe596[_0x5aed26(0xc8)][_0x2d43a2];if(_0x4fe596['journeys']['length']>0x1&&_0x26c7cc[_0x5aed26(0x127)]===_0x5aed26(0x118))continue;const _0x2479a7=_0x26c7cc['stages']||[],_0x3b9191=_0x5aed26(0x13b)+_0x2d43a2+'].',_0xc8e2a5=!!_0x26c7cc['goal'],_0x5e53dc=_0xc8e2a5?{..._0x4fe596,'goal':_0x26c7cc[_0x5aed26(0xc1)]}:_0x4fe596;validateStagesForVersion(_0x2479a7,_0x5e53dc,_0x43d892,_0x3b9191,_0x1b11dd,_0x5c44be,{'goalIsInherited':!_0xc8e2a5});}else{if(_0x4fe596[_0x5aed26(0x12a)]&&_0x4fe596['versions'][_0x5aed26(0xc6)]>0x0)for(let _0x2069a7=0x0;_0x2069a7<_0x4fe596[_0x5aed26(0x12a)][_0x5aed26(0xc6)];_0x2069a7++){const _0x539a1c=_0x4fe596[_0x5aed26(0x12a)][_0x2069a7];if(_0x4fe596[_0x5aed26(0x12a)]['length']>0x1&&_0x539a1c['state']===_0x5aed26(0x118))continue;const _0x20d2d5=_0x539a1c['stages']||[],_0x320fd2=_0x5aed26(0xe4)+_0x2069a7+'].';validateStagesForVersion(_0x20d2d5,_0x4fe596,_0x43d892,_0x320fd2,_0x1b11dd,_0x5c44be);}else{const _0x12eb66=_0x4fe596['stages']||[];validateStagesForVersion(_0x12eb66,_0x4fe596,_0x43d892,'',_0x1b11dd,_0x5c44be);}}_0x4fe596[_0x5aed26(0xc8)]&&_0x4fe596[_0x5aed26(0xc8)]['length']>0x1&&(deduplicateAcrossVersions(_0x1b11dd),deduplicateAcrossVersions(_0x5c44be));for(const _0x494d36 of _0x12e595){!_0x1e5ef8[_0x5aed26(0x176)](_0x494d36)&&!_0x494d36[_0x5aed26(0x11b)](_0x5aed26(0x111))&&_0x5c44be[_0x5aed26(0xed)]({'level':_0x5aed26(0x15c),'path':'segments.'+_0x494d36,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x5aed26(0xd7)+_0x494d36+_0x5aed26(0xf3),'location':getLocationFromPath(_0x2664d7[_0x5aed26(0x12b)],_0x2664d7[_0x5aed26(0x145)],['segments',_0x494d36])});}return{'valid':_0x1b11dd[_0x5aed26(0xc6)]===0x0,'errors':_0x1b11dd,'warnings':_0x5c44be};}
1
+ (function(_0xcc4629,_0x4b19b8){const _0x334e71=a168_0x1e96,_0x440bad=_0xcc4629();while(!![]){try{const _0x3f957f=parseInt(_0x334e71(0xc4))/0x1+-parseInt(_0x334e71(0x113))/0x2*(parseInt(_0x334e71(0xad))/0x3)+parseInt(_0x334e71(0xa1))/0x4+parseInt(_0x334e71(0x118))/0x5+parseInt(_0x334e71(0x11c))/0x6*(-parseInt(_0x334e71(0x125))/0x7)+-parseInt(_0x334e71(0x79))/0x8*(-parseInt(_0x334e71(0x72))/0x9)+parseInt(_0x334e71(0xd2))/0xa*(-parseInt(_0x334e71(0x95))/0xb);if(_0x3f957f===_0x4b19b8)break;else _0x440bad['push'](_0x440bad['shift']());}catch(_0x161d79){_0x440bad['push'](_0x440bad['shift']());}}}(a168_0x311a,0x74740));import{JourneyDefSchema}from'./types/journey-schema.js';function a168_0x311a(){const _0x37dbb5=['\x27\x20has\x20no\x20steps','timeout\x20of\x20\x27','MISSING_GOAL','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','2529315VhRTJk','\x27\x20with\x20no\x20action\x20in\x20between','journeys[','\x20with\x20latest:\x20true','entries','.with.activation','level','8WEtRfO','size','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MISSING_MILESTONE','activationKeys','Decision\x20branch\x20\x27','type','MISSING_CONDITIONS','sort','abs','journeys,\x20stages,\x20or\x20versions','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','reduce','source','entry_criteria','SINGLE_INPUT_MERGE','stages','MISSING_WAIT_PARAMS','FEW_STEPS','indices','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x20stages\x20but\x20maximum\x20is\x20','JOURNEY_SCHEMA_ERROR','.with','Journey\x20has\x20','.with.variants','skipSchema','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','363sBJqab','Merge\x20step\x20\x27','stages[','condition\x20of\x20\x27','Journey\x20has\x20no\x20goal\x20defined','Activation\x20step\x20requires\x20an\x20activation\x20reference','map','get','.with.condition.timeout.next','milestone','values','decision_point','1877612VKsWGU','CONVERGENCE_WITHOUT_MERGE','step\x20\x27','Jump\x20step\x20requires\x20a\x20target','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','DUPLICATE_STEP_NAME','warning','description','activation','ref:','segments','15gbWlvy','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','issues','MISSING_END_STEP','INSUFFICIENT_STEPS','.with.condition','condition','\x20versions)','Stage\x20\x27','path','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','ab_test','variant\x20\x27','segment','referencedSegments','segments.','.steps','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','with','goal','.name','.milestone','918320UGtIqI','\x27\x20has\x20only\x20','\x27\x20has\x20no\x20end\x20step','Criteria\x20references\x20undefined\x20segment\x20\x27','MISSING_SEGMENT_REFERENCE','.next','versions','version','match','timeout','TOO_MANY_STAGES','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','data','246090BERair','.with.branches[','.segment','MISSING_ACTIVATION_REF','replace','message','variants','steps','next','.with.variants[','percentage','\x27\x20has\x20no\x20exit_criteria\x20defined','INVALID_NEXT_REFERENCE','excluded','End\x20step\x20\x27','.exit_criteria[','branch\x20\x27','.with.target','document','wait','target','.with.branches','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20(from:\x20','keys','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x27\x20of\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','error','exit_criteria','.steps[','push','MISSING_ENTRY_CRITERIA','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','INVALID_JUMP_TARGET','merge','length','goalIsInherited','stage','.with.condition.next','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','add','branches','stepNames','endsWith','rule','.with.condition.timeout','set','journey\x20entry','MISSING_ACTIVATION_DEFINITION','end','.rule','startsWith','trim','includes','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','embeddedSegments','name','INVALID_AB_TEST_PERCENTAGES','BRANCH_DIRECTLY_TO_MERGE','END_STEP_HAS_NEXT_OR_WITH','latest','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','MERGE_TO_MERGE_CHAIN','.entry_criteria','217936OPEKme','filter','MISSING_STAGES','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','some','2836920ZAquie','journeys',').\x20Merge\x20is\x20unnecessary.','UNUSED_EMBEDDED_SEGMENT','22554tteIXX','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','activations','MISSING_NAME','safeParse','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','has','.exit_criteria','success','749soMhWf','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone'];a168_0x311a=function(){return _0x37dbb5;};return a168_0x311a();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x25ae4e,_0x1b4d7d,_0x589923,_0x6c808,_0x1c04e3,_0x1b8d8b){return{'level':_0x25ae4e,'path':_0x1b4d7d,'code':_0x589923,'message':_0x6c808,'location':getLocationFromPath(_0x1c04e3['document'],_0x1c04e3['source'],pathToArray(_0x1b8d8b??_0x1b4d7d))};}function validateVersionStructure(_0x5897d6,_0x4cccb9){const _0x2ab72d=a168_0x1e96,_0x48cd71=[];return _0x5897d6['length']>MAX_STAGES&&_0x48cd71[_0x2ab72d(0xf1)](createIssue(_0x2ab72d(0xee),_0x2ab72d(0x89),_0x2ab72d(0xce),_0x2ab72d(0x91)+_0x5897d6[_0x2ab72d(0xf6)]+_0x2ab72d(0x8e)+MAX_STAGES,_0x4cccb9)),_0x48cd71;}function validateStageStructure(_0x4b6aa7,_0xf177c2,_0x22694d,_0x2544e9){const _0x1078eb=a168_0x1e96,_0xb42ed9=[],_0x1baeba=_0x1078eb(0x97)+_0xf177c2+']';_0xf177c2===0x0&&!_0x4b6aa7[_0x1078eb(0x87)]&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xee),_0x1baeba+_0x1078eb(0x112),_0x1078eb(0xf2),_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0x94),_0x2544e9,_0x1baeba));const _0x109b8d=_0xf177c2===_0x22694d-0x1;!_0x109b8d&&!_0x4b6aa7[_0x1078eb(0x9e)]&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xee),_0x1baeba+_0x1078eb(0xc3),_0x1078eb(0x7c),_0x1078eb(0xb6)+_0x4b6aa7['name']+_0x1078eb(0x126),_0x2544e9,_0x1baeba));(!_0x4b6aa7[_0x1078eb(0xef)]||_0x4b6aa7[_0x1078eb(0xef)][_0x1078eb(0xf6)]===0x0)&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xa8),_0x1baeba+_0x1078eb(0x123),'MISSING_EXIT_CRITERIA','Stage\x20\x27'+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0xdd),_0x2544e9,_0x1baeba));const _0x1bdaad=_0x4b6aa7['steps']?.[_0x1078eb(0xf6)]??0x0;if(_0x1bdaad===0x0)_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xee),_0x1baeba+'.steps',_0x1078eb(0xb2),_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0x127),_0x2544e9,_0x1baeba+'.steps'));else{if(_0x1bdaad===0x1)_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xa8),_0x1baeba+'.steps','INSUFFICIENT_STEPS',_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0x121),_0x2544e9,_0x1baeba+_0x1078eb(0xbe)));else _0x1bdaad<=0x3&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xa8),_0x1baeba+_0x1078eb(0xbe),_0x1078eb(0x8b),_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0xc5)+_0x1bdaad+_0x1078eb(0xaf),_0x2544e9,_0x1baeba+_0x1078eb(0xbe)));}return _0xb42ed9;}function validateStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147){const _0x318557=a168_0x1e96,_0x12eaf6=[];if(_0x22da5a[_0x318557(0x7f)]===_0x318557(0x104))return _0x22da5a[_0x318557(0xda)]&&_0x12eaf6[_0x318557(0xf1)](createIssue(_0x318557(0xee),_0x17b372+'.next',_0x318557(0x10e),_0x318557(0xe0)+_0x22da5a['name']+_0x318557(0xa5),_0x30c4e1)),_0x318557(0xc0)in _0x22da5a&&_0x22da5a[_0x318557(0xc0)]!==undefined&&_0x12eaf6[_0x318557(0xf1)](createIssue(_0x318557(0xee),_0x17b372+'.with',_0x318557(0x10e),_0x318557(0xe0)+_0x22da5a[_0x318557(0x10b)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x30c4e1)),_0x12eaf6;_0x22da5a[_0x318557(0xda)]&&(_0x30c4e1[_0x318557(0xfd)]&&!_0x30c4e1['stepNames'][_0x318557(0x122)](_0x22da5a[_0x318557(0xda)])&&_0x12eaf6[_0x318557(0xf1)](createIssue('error',_0x17b372+_0x318557(0xc9),'INVALID_NEXT_REFERENCE',_0x318557(0xe8)+_0x22da5a[_0x318557(0xda)]+'\x27',_0x30c4e1)));switch(_0x22da5a[_0x318557(0x7f)]){case _0x318557(0xe5):_0x12eaf6[_0x318557(0xf1)](...validateWaitStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147));break;case _0x318557(0xaa):_0x12eaf6['push'](...validateActivationStep(_0x22da5a,_0x17b372,_0x30c4e1));break;case _0x318557(0xa0):_0x12eaf6[_0x318557(0xf1)](...validateDecisionPointStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147));break;case _0x318557(0xb9):_0x12eaf6['push'](...validateAbTestStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147));break;case'jump':_0x12eaf6['push'](...validateJumpStep(_0x22da5a,_0x17b372,_0x30c4e1));break;}return _0x12eaf6;}function validateWaitStep(_0x50079c,_0x1601b4,_0x2c72f3,_0x38b1b5){const _0x2b5735=a168_0x1e96,_0x139696=[];if(!_0x50079c[_0x2b5735(0xc0)])return _0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xee),_0x1601b4+_0x2b5735(0x90),_0x2b5735(0x8a),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x2c72f3,_0x1601b4)),_0x139696;if(_0x50079c[_0x2b5735(0xc0)]['condition']){const _0x2e95f3=_0x50079c[_0x2b5735(0xc0)]['condition'];if(_0x2e95f3[_0x2b5735(0xbb)]){_0x2c72f3[_0x2b5735(0xbc)]?.[_0x2b5735(0xfb)](_0x2e95f3[_0x2b5735(0xbb)]);!_0x2e95f3[_0x2b5735(0xbb)][_0x2b5735(0x106)](_0x2b5735(0xab))&&(_0x2c72f3[_0x2b5735(0x10a)]&&!_0x2c72f3[_0x2b5735(0x10a)][_0x2b5735(0x122)](_0x2e95f3[_0x2b5735(0xbb)])&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xee),_0x1601b4+'.with.condition.segment','MISSING_SEGMENT_REFERENCE',_0x2b5735(0xeb)+_0x2e95f3[_0x2b5735(0xbb)]+_0x2b5735(0xcf),_0x2c72f3)));_0x2e95f3['next']&&_0x2c72f3[_0x2b5735(0xfd)]&&!_0x2c72f3[_0x2b5735(0xfd)][_0x2b5735(0x122)](_0x2e95f3[_0x2b5735(0xda)])&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xee),_0x1601b4+_0x2b5735(0xf9),_0x2b5735(0xde),_0x2b5735(0x7b)+_0x2e95f3['next']+'\x27',_0x2c72f3));_0x2e95f3[_0x2b5735(0xcd)]?.[_0x2b5735(0xda)]&&_0x2c72f3[_0x2b5735(0xfd)]&&!_0x2c72f3[_0x2b5735(0xfd)][_0x2b5735(0x122)](_0x2e95f3[_0x2b5735(0xcd)]['next'])&&_0x139696[_0x2b5735(0xf1)](createIssue('error',_0x1601b4+'.with.condition.timeout.next',_0x2b5735(0xde),_0x2b5735(0x71)+_0x2e95f3[_0x2b5735(0xcd)][_0x2b5735(0xda)]+'\x27',_0x2c72f3));const _0x38cea8=_0x2e95f3[_0x2b5735(0xda)]||_0x50079c[_0x2b5735(0xda)],_0x385381=_0x2e95f3[_0x2b5735(0xcd)]?.[_0x2b5735(0xda)]||_0x50079c['next'];if(_0x38cea8){const _0x57fefa=_0x38b1b5['get'](_0x38cea8);_0x57fefa?.[_0x2b5735(0x7f)]==='merge'&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xa8),_0x1601b4+_0x2b5735(0xf9),_0x2b5735(0x10d),_0x2b5735(0xae)+_0x38cea8+_0x2b5735(0xa6),_0x2c72f3,_0x1601b4+_0x2b5735(0xb3)));}if(_0x385381){const _0x2827f6=_0x38b1b5[_0x2b5735(0x9c)](_0x385381);_0x2827f6?.[_0x2b5735(0x7f)]===_0x2b5735(0xf5)&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xa8),_0x1601b4+_0x2b5735(0x9d),_0x2b5735(0x10d),_0x2b5735(0xb8)+_0x385381+_0x2b5735(0xa6),_0x2c72f3,_0x1601b4+_0x2b5735(0x100)));}}}return _0x139696;}function validateActivationStep(_0x513755,_0x4e2024,_0x1b098d){const _0x40763b=a168_0x1e96,_0x3d948f=[];if(!_0x513755[_0x40763b(0xc0)]?.['activation'])return _0x3d948f[_0x40763b(0xf1)](createIssue('error',_0x4e2024+_0x40763b(0x77),_0x40763b(0xd5),_0x40763b(0x9a),_0x1b098d,_0x4e2024)),_0x3d948f;const _0x2c2728=_0x513755[_0x40763b(0xc0)][_0x40763b(0xaa)];return _0x1b098d[_0x40763b(0x7d)]&&!_0x2c2728[_0x40763b(0x106)](_0x40763b(0xab))&&(!_0x1b098d[_0x40763b(0x7d)][_0x40763b(0x122)](_0x2c2728)&&_0x3d948f[_0x40763b(0xf1)](createIssue(_0x40763b(0xee),_0x4e2024+'.with.activation',_0x40763b(0x103),_0x40763b(0x70)+_0x2c2728+_0x40763b(0x84),_0x1b098d))),_0x3d948f;}function validateDecisionPointStep(_0x38d1e5,_0xe4afdb,_0x4e11c9,_0x3a29ac){const _0x3bc37a=a168_0x1e96,_0xe6eb36=[];if(!_0x38d1e5[_0x3bc37a(0xc0)]?.[_0x3bc37a(0xfc)]||_0x38d1e5['with'][_0x3bc37a(0xfc)][_0x3bc37a(0xf6)]===0x0)return _0xe6eb36[_0x3bc37a(0xf1)](createIssue('error',_0xe4afdb+_0x3bc37a(0xe7),_0x3bc37a(0x80),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x4e11c9,_0xe4afdb)),_0xe6eb36;for(let _0x5dda83=0x0;_0x5dda83<_0x38d1e5['with'][_0x3bc37a(0xfc)][_0x3bc37a(0xf6)];_0x5dda83++){const _0x300395=_0x38d1e5[_0x3bc37a(0xc0)]['branches'][_0x5dda83],_0x4fe162=_0xe4afdb+_0x3bc37a(0xd3)+_0x5dda83+']';_0x300395[_0x3bc37a(0xbb)]&&!_0x300395[_0x3bc37a(0xdf)]&&(_0x4e11c9[_0x3bc37a(0xbc)]?.['add'](_0x300395['segment']),!_0x300395[_0x3bc37a(0xbb)]['startsWith']('ref:')&&(_0x4e11c9[_0x3bc37a(0x10a)]&&!_0x4e11c9[_0x3bc37a(0x10a)]['has'](_0x300395[_0x3bc37a(0xbb)])&&_0xe6eb36[_0x3bc37a(0xf1)](createIssue('error',_0x4fe162+_0x3bc37a(0xd4),_0x3bc37a(0xc8),_0x3bc37a(0xd0)+_0x300395['segment']+'\x27',_0x4e11c9))));_0x300395[_0x3bc37a(0xda)]&&_0x4e11c9['stepNames']&&!_0x4e11c9[_0x3bc37a(0xfd)][_0x3bc37a(0x122)](_0x300395[_0x3bc37a(0xda)])&&_0xe6eb36[_0x3bc37a(0xf1)](createIssue(_0x3bc37a(0xee),_0x4fe162+_0x3bc37a(0xc9),_0x3bc37a(0xde),_0x3bc37a(0xbf)+_0x300395['next']+'\x27',_0x4e11c9));if(_0x300395['next']){const _0x49bde4=_0x3a29ac[_0x3bc37a(0x9c)](_0x300395[_0x3bc37a(0xda)]);_0x49bde4?.[_0x3bc37a(0x7f)]==='merge'&&_0xe6eb36['push'](createIssue(_0x3bc37a(0xa8),_0x4fe162+_0x3bc37a(0xc9),_0x3bc37a(0x10d),_0x3bc37a(0x7e)+_0x300395[_0x3bc37a(0x10b)]+_0x3bc37a(0x109)+_0x300395[_0x3bc37a(0xda)]+_0x3bc37a(0x73),_0x4e11c9));}}return _0xe6eb36;}function validateAbTestStep(_0x177091,_0x59f816,_0x4290ce,_0x50fb99){const _0x55c3f8=a168_0x1e96,_0x18451c=[];if(!_0x177091[_0x55c3f8(0xc0)]?.[_0x55c3f8(0xd8)]||_0x177091[_0x55c3f8(0xc0)][_0x55c3f8(0xd8)][_0x55c3f8(0xf6)]===0x0)return _0x18451c['push'](createIssue(_0x55c3f8(0xee),_0x59f816+_0x55c3f8(0x92),_0x55c3f8(0x80),_0x55c3f8(0xfa),_0x4290ce,_0x59f816)),_0x18451c;const _0x21089d=_0x177091[_0x55c3f8(0xc0)][_0x55c3f8(0xd8)][_0x55c3f8(0x85)]((_0x2bca34,_0x1aba95)=>_0x2bca34+(_0x1aba95[_0x55c3f8(0xdc)]||0x0),0x0);Math[_0x55c3f8(0x82)](_0x21089d-0x64)>0.01&&_0x18451c['push'](createIssue(_0x55c3f8(0xee),_0x59f816+'.with.variants',_0x55c3f8(0x10c),_0x55c3f8(0x8d)+_0x21089d+'%)',_0x4290ce));for(let _0x2e6b51=0x0;_0x2e6b51<_0x177091['with'][_0x55c3f8(0xd8)][_0x55c3f8(0xf6)];_0x2e6b51++){const _0x32e1c1=_0x177091[_0x55c3f8(0xc0)][_0x55c3f8(0xd8)][_0x2e6b51],_0x2ced53=_0x59f816+_0x55c3f8(0xdb)+_0x2e6b51+']';_0x32e1c1[_0x55c3f8(0xda)]&&_0x4290ce[_0x55c3f8(0xfd)]&&!_0x4290ce['stepNames']['has'](_0x32e1c1['next'])&&_0x18451c['push'](createIssue(_0x55c3f8(0xee),_0x2ced53+'.next',_0x55c3f8(0xde),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x32e1c1[_0x55c3f8(0xda)]+'\x27',_0x4290ce));if(_0x32e1c1[_0x55c3f8(0xda)]){const _0x10d18d=_0x50fb99['get'](_0x32e1c1[_0x55c3f8(0xda)]);_0x10d18d?.['type']===_0x55c3f8(0xf5)&&_0x18451c[_0x55c3f8(0xf1)](createIssue(_0x55c3f8(0xa8),_0x2ced53+_0x55c3f8(0xc9),'BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20variant\x20\x27'+_0x32e1c1[_0x55c3f8(0x10b)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x32e1c1[_0x55c3f8(0xda)]+_0x55c3f8(0x73),_0x4290ce));}}return _0x18451c;}function validateJumpStep(_0x48ca5a,_0x5af95d,_0x2b594f){const _0x598e95=a168_0x1e96,_0x2142cc=[];if(!_0x48ca5a['with']?.[_0x598e95(0xe6)])return _0x2142cc['push'](createIssue('error',_0x5af95d+_0x598e95(0xe3),_0x598e95(0xf4),_0x598e95(0xa4),_0x2b594f,_0x5af95d)),_0x2142cc;return(!_0x48ca5a[_0x598e95(0xc0)][_0x598e95(0xe6)]['journey']||!_0x48ca5a[_0x598e95(0xc0)][_0x598e95(0xe6)][_0x598e95(0xf8)])&&_0x2142cc[_0x598e95(0xf1)](createIssue(_0x598e95(0xee),_0x5af95d+_0x598e95(0xe3),_0x598e95(0xf4),_0x598e95(0x11d),_0x2b594f)),_0x2142cc;}function buildConvergenceMap(_0xa683cc){const _0x1257fb=a168_0x1e96,_0x24c039=new Map();function _0xb68dce(_0x1dc41,_0x50633b){const _0x572dac=a168_0x1e96,_0x395026=_0x24c039[_0x572dac(0x9c)](_0x1dc41)||[];_0x395026[_0x572dac(0xf1)](_0x50633b),_0x24c039['set'](_0x1dc41,_0x395026);}for(const _0x155f48 of _0xa683cc){_0x155f48[_0x1257fb(0xda)]&&_0xb68dce(_0x155f48['next'],{'stepName':_0x155f48['name'],'description':_0x1257fb(0xa3)+_0x155f48[_0x1257fb(0x10b)]+'\x27'});if(_0x155f48['type']===_0x1257fb(0xa0)&&_0x155f48[_0x1257fb(0xc0)]?.[_0x1257fb(0xfc)])for(const _0x31637e of _0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xfc)]){_0x31637e[_0x1257fb(0xda)]&&_0xb68dce(_0x31637e[_0x1257fb(0xda)],{'stepName':_0x155f48['name'],'description':_0x1257fb(0xe2)+_0x31637e['name']+_0x1257fb(0xec)+_0x155f48['name']+'\x27'});}if(_0x155f48[_0x1257fb(0x7f)]===_0x1257fb(0xb9)&&_0x155f48[_0x1257fb(0xc0)]?.[_0x1257fb(0xd8)])for(const _0x2b174e of _0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xd8)]){_0x2b174e['next']&&_0xb68dce(_0x2b174e[_0x1257fb(0xda)],{'stepName':_0x155f48[_0x1257fb(0x10b)],'description':_0x1257fb(0xba)+_0x2b174e[_0x1257fb(0x10b)]+'\x27\x20of\x20\x27'+_0x155f48[_0x1257fb(0x10b)]+'\x27'});}_0x155f48[_0x1257fb(0x7f)]===_0x1257fb(0xe5)&&_0x155f48['with']?.[_0x1257fb(0xb4)]&&(_0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xb4)][_0x1257fb(0xda)]&&_0xb68dce(_0x155f48['with']['condition'][_0x1257fb(0xda)],{'stepName':_0x155f48['name'],'description':_0x1257fb(0x98)+_0x155f48['name']+'\x27'}),_0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xb4)][_0x1257fb(0xcd)]?.['next']&&_0xb68dce(_0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xb4)]['timeout'][_0x1257fb(0xda)],{'stepName':_0x155f48[_0x1257fb(0x10b)],'description':_0x1257fb(0x128)+_0x155f48['name']+'\x27'}));}return _0x24c039;}function validateFlowControl(_0x5acd89,_0xa98f30,_0x1a5113){const _0xe492fa=a168_0x1e96,_0xdc6f04=[],_0xb20b88=_0xe492fa(0x97)+_0xa98f30+']',_0x386f1e=_0x5acd89[_0xe492fa(0xd9)]||[];if(_0x386f1e['length']===0x0)return _0xdc6f04;const _0xf2032f=new Map();for(const _0x281765 of _0x386f1e){_0x281765[_0xe492fa(0x10b)]&&_0xf2032f[_0xe492fa(0x101)](_0x281765[_0xe492fa(0x10b)],_0x281765);}const _0x3c819e=buildConvergenceMap(_0x386f1e),_0x37c547=_0x386f1e[_0xe492fa(0x117)](_0x22168e=>_0x22168e['type']===_0xe492fa(0x104));!_0x37c547&&_0xdc6f04[_0xe492fa(0xf1)](createIssue(_0xe492fa(0xee),_0xb20b88+_0xe492fa(0xbe),_0xe492fa(0xb1),'Stage\x20\x27'+_0x5acd89[_0xe492fa(0x10b)]+_0xe492fa(0xc6),_0x1a5113));for(const [_0x5836ed,_0x521d67]of _0x3c819e){const _0x30d98c=_0xf2032f['get'](_0x5836ed);if(!_0x30d98c)continue;if(_0x521d67[_0xe492fa(0xf6)]>0x1&&_0x30d98c[_0xe492fa(0x7f)]!=='merge'){const _0x3a7d6d=_0x521d67[_0xe492fa(0x9b)](_0x4c8e7e=>_0x4c8e7e[_0xe492fa(0xa9)])['join'](',\x20');_0xdc6f04[_0xe492fa(0xf1)](createIssue('error',_0xb20b88+'.steps',_0xe492fa(0xa2),_0xe492fa(0xed)+_0x5836ed+_0xe492fa(0xe9)+_0x3a7d6d+').\x20Use\x20a\x20merge\x20step.',_0x1a5113));}_0x521d67['length']===0x1&&_0x30d98c[_0xe492fa(0x7f)]===_0xe492fa(0xf5)&&_0xdc6f04[_0xe492fa(0xf1)](createIssue('warning',_0xb20b88+'.steps',_0xe492fa(0x88),_0xe492fa(0x96)+_0x5836ed+_0xe492fa(0xf3)+_0x521d67[0x0][_0xe492fa(0xa9)]+_0xe492fa(0x11a),_0x1a5113));}for(const _0x1e6e41 of _0x386f1e){if(_0x1e6e41['type']===_0xe492fa(0xf5)&&_0x1e6e41['next']){const _0x5ab13a=_0xf2032f[_0xe492fa(0x9c)](_0x1e6e41[_0xe492fa(0xda)]);_0x5ab13a?.['type']===_0xe492fa(0xf5)&&_0xdc6f04[_0xe492fa(0xf1)](createIssue(_0xe492fa(0xee),_0xb20b88+_0xe492fa(0xbe),_0xe492fa(0x111),_0xe492fa(0x96)+_0x1e6e41[_0xe492fa(0x10b)]+_0xe492fa(0x116)+_0x1e6e41['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x1a5113));}}return _0xdc6f04;}function validateCriteria(_0x3001fa,_0x1dc030,_0x4996f9){const _0x1024bd=a168_0x1e96,_0x3fbee1=[];return _0x3001fa[_0x1024bd(0xbb)]&&(_0x4996f9[_0x1024bd(0xbc)]?.['add'](_0x3001fa[_0x1024bd(0xbb)]),!_0x3001fa[_0x1024bd(0xbb)][_0x1024bd(0x106)](_0x1024bd(0xab))&&(_0x4996f9[_0x1024bd(0x10a)]&&!_0x4996f9[_0x1024bd(0x10a)]['has'](_0x3001fa[_0x1024bd(0xbb)])&&_0x3fbee1[_0x1024bd(0xf1)](createIssue(_0x1024bd(0xee),_0x1dc030+_0x1024bd(0xd4),_0x1024bd(0xc8),_0x1024bd(0xc7)+_0x3001fa['segment']+'\x27',_0x4996f9)))),_0x3fbee1;}function validateEmbeddedSegment(_0x1c56d2,_0x5efe98,_0x38a21e){const _0x121d01=a168_0x1e96,_0x22cc48=[];return _0x1c56d2[_0x121d01(0xff)]&&_0x22cc48[_0x121d01(0xf1)](...validateRuleDef(_0x1c56d2['rule'],_0x5efe98+_0x121d01(0x105),_0x38a21e)),_0x22cc48;}function validateStage(_0x5d4910,_0x2ee442,_0x5e30c1,_0x2c13a9){const _0xfcc395=a168_0x1e96,_0x104923=[],_0x165b7c='stages['+_0x2ee442+']',_0x1983a5=new Map(),_0xa21f45=new Map();if(_0x5d4910[_0xfcc395(0xd9)]){for(let _0x463a90=0x0;_0x463a90<_0x5d4910[_0xfcc395(0xd9)][_0xfcc395(0xf6)];_0x463a90++){const _0x24ca67=_0x5d4910['steps'][_0x463a90];_0x24ca67[_0xfcc395(0x10b)]&&_0x1983a5[_0xfcc395(0x101)](_0x24ca67['name'],_0x24ca67);}for(let _0xdd007b=0x0;_0xdd007b<_0x5d4910[_0xfcc395(0xd9)][_0xfcc395(0xf6)];_0xdd007b++){const _0x4fc69d=_0x5d4910[_0xfcc395(0xd9)][_0xdd007b],_0x3ef74e=_0x165b7c+_0xfcc395(0xf0)+_0xdd007b+']';if(_0x4fc69d[_0xfcc395(0x10b)]){if(_0xa21f45[_0xfcc395(0x122)](_0x4fc69d[_0xfcc395(0x10b)])){const _0x46ab80=_0xa21f45[_0xfcc395(0x9c)](_0x4fc69d[_0xfcc395(0x10b)]);_0x104923['push'](createIssue(_0xfcc395(0xee),_0x3ef74e+_0xfcc395(0xc2),_0xfcc395(0xa7),'Duplicate\x20step\x20name\x20\x27'+_0x4fc69d[_0xfcc395(0x10b)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x46ab80+'])',_0x2c13a9));}else _0xa21f45[_0xfcc395(0x101)](_0x4fc69d[_0xfcc395(0x10b)],_0xdd007b);}_0x104923[_0xfcc395(0xf1)](...validateStep(_0x4fc69d,_0x3ef74e,_0x2c13a9,_0x1983a5));}}_0x5d4910['entry_criteria']&&_0x104923[_0xfcc395(0xf1)](...validateCriteria(_0x5d4910['entry_criteria'],_0x165b7c+_0xfcc395(0x112),_0x2c13a9));if(_0x5d4910[_0xfcc395(0xef)])for(let _0x39e7a7=0x0;_0x39e7a7<_0x5d4910[_0xfcc395(0xef)][_0xfcc395(0xf6)];_0x39e7a7++){_0x104923['push'](...validateCriteria(_0x5d4910[_0xfcc395(0xef)][_0x39e7a7],_0x165b7c+_0xfcc395(0xe1)+_0x39e7a7+']',_0x2c13a9));}return _0x5d4910[_0xfcc395(0x9e)]&&_0x104923['push'](...validateCriteria(_0x5d4910[_0xfcc395(0x9e)],_0x165b7c+_0xfcc395(0xc3),_0x2c13a9)),_0x104923[_0xfcc395(0xf1)](...validateStageStructure(_0x5d4910,_0x2ee442,_0x5e30c1,_0x2c13a9)),_0x104923[_0xfcc395(0xf1)](...validateFlowControl(_0x5d4910,_0x2ee442,_0x2c13a9)),_0x104923;}function a168_0x1e96(_0x8cb888,_0x3dfb6a){_0x8cb888=_0x8cb888-0x6f;const _0x311a07=a168_0x311a();let _0x1e96cb=_0x311a07[_0x8cb888];return _0x1e96cb;}function validateStagesForVersion(_0x1a1dfd,_0x1b8393,_0x26bbe0,_0x530574,_0x359d87,_0x17ec4b,_0xac3e53){const _0x175d69=a168_0x1e96;if(_0x1a1dfd[_0x175d69(0xf6)]===0x0){_0x359d87[_0x175d69(0xf1)]({'level':_0x175d69(0xee),'path':_0x530574+'stages','code':_0x175d69(0x115),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x26bbe0[_0x175d69(0xe4)],_0x26bbe0[_0x175d69(0x86)],['stages'])});return;}const _0xfb56be=new Set();for(const _0x4b1425 of _0x1a1dfd){if(_0x4b1425[_0x175d69(0xd9)])for(const _0x3fede9 of _0x4b1425[_0x175d69(0xd9)]){_0x3fede9[_0x175d69(0x10b)]&&_0xfb56be[_0x175d69(0xfb)](_0x3fede9['name']);}}const _0x332609={..._0x26bbe0,'stepNames':_0xfb56be},_0x2df0b6=validateVersionStructure(_0x1a1dfd,_0x332609);for(const _0x594e77 of _0x2df0b6){const _0x25e4c2=_0x530574?{..._0x594e77,'path':''+_0x530574+_0x594e77['path']}:_0x594e77;if(_0x25e4c2[_0x175d69(0x78)]===_0x175d69(0xee))_0x359d87[_0x175d69(0xf1)](_0x25e4c2);else _0x17ec4b[_0x175d69(0xf1)](_0x25e4c2);}for(let _0x3188d2=0x0;_0x3188d2<_0x1a1dfd['length'];_0x3188d2++){const _0x5e684e=validateStage(_0x1a1dfd[_0x3188d2],_0x3188d2,_0x1a1dfd[_0x175d69(0xf6)],_0x332609);for(const _0xcc067d of _0x5e684e){const _0x3cb6e0=_0x530574?{..._0xcc067d,'path':''+_0x530574+_0xcc067d['path']}:_0xcc067d;if(_0x3cb6e0[_0x175d69(0x78)]===_0x175d69(0xee))_0x359d87[_0x175d69(0xf1)](_0x3cb6e0);else _0x17ec4b[_0x175d69(0xf1)](_0x3cb6e0);}}if(_0x1b8393[_0x175d69(0xc1)]){const _0x594c15=_0xac3e53?.[_0x175d69(0xf7)]?_0x175d69(0xc1):_0x530574+_0x175d69(0xc1),_0x401d5d=validateCriteria(_0x1b8393[_0x175d69(0xc1)],_0x594c15,_0x332609);for(const _0x3715ed of _0x401d5d){if(_0x3715ed[_0x175d69(0x78)]===_0x175d69(0xee))_0x359d87[_0x175d69(0xf1)](_0x3715ed);else _0x17ec4b['push'](_0x3715ed);}}}function extractVersionIndex(_0x4ed9c4){const _0x52aedb=a168_0x1e96,_0x42ef4a=_0x4ed9c4[_0x52aedb(0xcc)](/^journeys\[(\d+)\]\./);return _0x42ef4a?_0x42ef4a[0x1]:undefined;}function deduplicateAcrossVersions(_0x11887a){const _0x595bf6=a168_0x1e96,_0x384be8=new Map();for(let _0x1a0368=0x0;_0x1a0368<_0x11887a['length'];_0x1a0368++){const _0x228986=_0x11887a[_0x1a0368]['code']+':'+_0x11887a[_0x1a0368]['message'],_0x302457=extractVersionIndex(_0x11887a[_0x1a0368]['path']),_0x10f659=_0x384be8[_0x595bf6(0x9c)](_0x228986);if(_0x10f659){_0x10f659[_0x595bf6(0x8c)][_0x595bf6(0xf1)](_0x1a0368);if(_0x302457)_0x10f659['versions'][_0x595bf6(0xfb)](_0x302457);}else _0x384be8['set'](_0x228986,{'indices':[_0x1a0368],'versions':new Set(_0x302457?[_0x302457]:[])});}const _0x430e7f=new Set();for(const {indices:_0x1ecdb1,versions:_0x63e8}of _0x384be8[_0x595bf6(0x9f)]()){if(_0x63e8[_0x595bf6(0x7a)]<=0x1)continue;const _0x47fd31=_0x11887a[_0x1ecdb1[0x0]];_0x47fd31[_0x595bf6(0xb7)]=_0x47fd31[_0x595bf6(0xb7)][_0x595bf6(0xd6)](/^journeys\[\d+\]\./,''),_0x47fd31[_0x595bf6(0xd7)]=_0x47fd31[_0x595bf6(0xd7)]+'\x20(across\x20'+_0x63e8['size']+_0x595bf6(0xb5);for(let _0x581c06=0x1;_0x581c06<_0x1ecdb1[_0x595bf6(0xf6)];_0x581c06++){_0x430e7f[_0x595bf6(0xfb)](_0x1ecdb1[_0x581c06]);}}const _0x131280=[..._0x430e7f][_0x595bf6(0x81)]((_0x6438ea,_0xdb9205)=>_0xdb9205-_0x6438ea);for(const _0x34ddfd of _0x131280){_0x11887a['splice'](_0x34ddfd,0x1);}}export function validateJourneyDef(_0x25d3d0,_0xf5bde9={},_0x1f29ce={}){const _0x36e922=a168_0x1e96;if(_0x1f29ce[_0x36e922(0x93)])return runJourneySemanticChecks(_0x25d3d0,_0xf5bde9);const _0x4d9f31=JourneyDefSchema[_0x36e922(0x120)](_0x25d3d0);if(_0x4d9f31[_0x36e922(0x124)])return runJourneySemanticChecks(_0x4d9f31[_0x36e922(0xd1)],_0xf5bde9);return zodErrorsToJourneyValidationResult(_0x4d9f31[_0x36e922(0xee)],_0xf5bde9);}function zodErrorsToJourneyValidationResult(_0x3c48e4,_0x30ef3e){const _0x4993d2=a168_0x1e96,_0x391131=flattenZodIssues(_0x3c48e4[_0x4993d2(0xb0)]),_0x1b80b6=_0x391131['map'](_0x4900e6=>{const _0x226a04=_0x4993d2,_0x56145b=formatZodPath(_0x4900e6[_0x226a04(0xb7)]),_0x44f1e4=mapJourneyZodIssueToCode(_0x4900e6,_0x56145b),_0x4aff0b=getLocationFromPath(_0x30ef3e[_0x226a04(0xe4)],_0x30ef3e[_0x226a04(0x86)],_0x4900e6[_0x226a04(0xb7)][_0x226a04(0x9b)](_0x7e92e=>typeof _0x7e92e==='symbol'?String(_0x7e92e):_0x7e92e));return{'level':'error','path':_0x56145b,'code':_0x44f1e4,'message':_0x4900e6[_0x226a04(0xd7)],..._0x4aff0b&&{'location':_0x4aff0b}};});return{'valid':![],'errors':_0x1b80b6,'warnings':[]};}function mapJourneyZodIssueToCode(_0x932fc5,_0x1ee1b7){const _0x56aa49=a168_0x1e96;if(_0x1ee1b7==='name')return'MISSING_NAME';if(_0x1ee1b7[_0x56aa49(0xfe)]('.type')&&_0x1ee1b7[_0x56aa49(0x108)](_0x56aa49(0xd9)))return'JOURNEY_SCHEMA_ERROR';if(_0x1ee1b7==='stages'||_0x1ee1b7[_0x56aa49(0xfe)]('.stages'))return _0x56aa49(0x115);if(_0x1ee1b7===''&&_0x932fc5[_0x56aa49(0xd7)][_0x56aa49(0x108)](_0x56aa49(0x83)))return'MISSING_STAGES';if(_0x1ee1b7[_0x56aa49(0x108)](_0x56aa49(0xaa)))return'ACTIVATION_SCHEMA_ERROR';return _0x56aa49(0x8f);}function runJourneySemanticChecks(_0x30ca7d,_0x1c19d3){const _0x50a656=a168_0x1e96,_0x1e8942=[],_0x57832e=[];(!_0x30ca7d['name']||_0x30ca7d[_0x50a656(0x10b)][_0x50a656(0x107)]()==='')&&_0x1e8942[_0x50a656(0xf1)]({'level':'error','path':_0x50a656(0x10b),'code':_0x50a656(0x11f),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3[_0x50a656(0x86)],[_0x50a656(0x10b)])});const _0x20c88f=new Set();if(_0x30ca7d[_0x50a656(0xac)])for(const _0x3325dc of Object[_0x50a656(0xea)](_0x30ca7d[_0x50a656(0xac)])){_0x20c88f[_0x50a656(0xfb)](_0x3325dc);}const _0xd18c09=new Set();if(_0x30ca7d[_0x50a656(0x11e)])for(const _0x5264fa of Object[_0x50a656(0xea)](_0x30ca7d['activations'])){_0xd18c09['add'](_0x5264fa);}const _0xbf43c=new Set(),_0x318a4f={..._0x1c19d3,'embeddedSegments':_0x20c88f,'referencedSegments':_0xbf43c,'activationKeys':_0xd18c09[_0x50a656(0x7a)]>0x0?_0xd18c09:undefined};if(_0x30ca7d[_0x50a656(0xac)])for(const [_0xf59af4,_0x495835]of Object[_0x50a656(0x76)](_0x30ca7d[_0x50a656(0xac)])){const _0x1cbc09=validateEmbeddedSegment(_0x495835,_0x50a656(0xbd)+_0xf59af4,_0x318a4f);for(const _0x3b3e61 of _0x1cbc09){if(_0x3b3e61[_0x50a656(0x78)]==='error')_0x1e8942['push'](_0x3b3e61);else _0x57832e[_0x50a656(0xf1)](_0x3b3e61);}}const _0x336f00=!!_0x30ca7d[_0x50a656(0xc1)],_0x2ae696=_0x30ca7d[_0x50a656(0x119)]?.['every'](_0x4e035b=>!!_0x4e035b[_0x50a656(0xc1)])??![];!_0x336f00&&!_0x2ae696&&_0x57832e[_0x50a656(0xf1)]({'level':_0x50a656(0xa8),'path':_0x50a656(0xc1),'code':_0x50a656(0x6f),'message':_0x50a656(0x99),'location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3[_0x50a656(0x86)],[_0x50a656(0xc1)])});const _0x444375=_0x30ca7d[_0x50a656(0x119)]??_0x30ca7d[_0x50a656(0xca)];if(_0x444375&&_0x444375[_0x50a656(0x114)](_0x44677f=>_0x44677f[_0x50a656(0x10f)]===!![])[_0x50a656(0xf6)]>0x1){const _0x5f21c6=_0x30ca7d[_0x50a656(0x119)]?_0x50a656(0x119):_0x50a656(0xca);_0x1e8942[_0x50a656(0xf1)]({'level':_0x50a656(0xee),'path':_0x5f21c6,'code':'DUPLICATE_LATEST','message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x5f21c6==='journeys'?_0x50a656(0x102):_0x50a656(0xcb))+_0x50a656(0x75),'location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3['source'],[_0x5f21c6])});}if(_0x30ca7d['journeys']&&_0x30ca7d[_0x50a656(0x119)][_0x50a656(0xf6)]>0x0)for(let _0xb4c75c=0x0;_0xb4c75c<_0x30ca7d[_0x50a656(0x119)][_0x50a656(0xf6)];_0xb4c75c++){const _0x44f5c5=_0x30ca7d[_0x50a656(0x119)][_0xb4c75c];if(_0x30ca7d['journeys'][_0x50a656(0xf6)]>0x1&&_0x44f5c5['state']==='launched')continue;const _0x31ca81=_0x44f5c5[_0x50a656(0x89)]||[],_0xac3471=_0x50a656(0x74)+_0xb4c75c+'].',_0x1a351d=!!_0x44f5c5['goal'],_0x4912f1=_0x1a351d?{..._0x30ca7d,'goal':_0x44f5c5[_0x50a656(0xc1)]}:_0x30ca7d;validateStagesForVersion(_0x31ca81,_0x4912f1,_0x318a4f,_0xac3471,_0x1e8942,_0x57832e,{'goalIsInherited':!_0x1a351d});}else{if(_0x30ca7d[_0x50a656(0xca)]&&_0x30ca7d[_0x50a656(0xca)][_0x50a656(0xf6)]>0x0)for(let _0x3ad423=0x0;_0x3ad423<_0x30ca7d['versions'][_0x50a656(0xf6)];_0x3ad423++){const _0x1d7b9c=_0x30ca7d[_0x50a656(0xca)][_0x3ad423];if(_0x30ca7d['versions'][_0x50a656(0xf6)]>0x1&&_0x1d7b9c['state']==='launched')continue;const _0xc47956=_0x1d7b9c['stages']||[],_0x1ee228='versions['+_0x3ad423+'].';validateStagesForVersion(_0xc47956,_0x30ca7d,_0x318a4f,_0x1ee228,_0x1e8942,_0x57832e);}else{const _0x332e0d=_0x30ca7d[_0x50a656(0x89)]||[];validateStagesForVersion(_0x332e0d,_0x30ca7d,_0x318a4f,'',_0x1e8942,_0x57832e);}}_0x30ca7d['journeys']&&_0x30ca7d[_0x50a656(0x119)][_0x50a656(0xf6)]>0x1&&(deduplicateAcrossVersions(_0x1e8942),deduplicateAcrossVersions(_0x57832e));for(const _0x217c67 of _0x20c88f){!_0xbf43c['has'](_0x217c67)&&!_0x217c67[_0x50a656(0x106)]('excluded_')&&_0x57832e[_0x50a656(0xf1)]({'level':'warning','path':_0x50a656(0xbd)+_0x217c67,'code':_0x50a656(0x11b),'message':'Embedded\x20segment\x20\x27'+_0x217c67+_0x50a656(0x110),'location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3['source'],[_0x50a656(0xac),_0x217c67])});}return{'valid':_0x1e8942[_0x50a656(0xf6)]===0x0,'errors':_0x1e8942,'warnings':_0x57832e};}