@treasuredata/tdx 2026.10.1 → 2026.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) 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-journey-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/codex-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-campaign-pull-command.js +1 -1
  26. package/dist/commands/engage-campaign-push-command.js +1 -1
  27. package/dist/commands/engage-campaign-readiness-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-in-browser-message-command.js +1 -1
  31. package/dist/commands/engage-landing-page-command.js +1 -1
  32. package/dist/commands/engage-template-pull-command.js +1 -1
  33. package/dist/commands/engage-template-push-command.js +1 -1
  34. package/dist/commands/engage-template-validate-command.js +1 -1
  35. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  36. package/dist/commands/job-command.js +1 -1
  37. package/dist/commands/journey-command.js +1 -1
  38. package/dist/commands/journey-validate-command.js +1 -1
  39. package/dist/commands/llm-command.js +1 -1
  40. package/dist/commands/mcp-command.js +1 -1
  41. package/dist/commands/opencode-command.js +1 -1
  42. package/dist/commands/p13n-command.js +1 -1
  43. package/dist/commands/parent-segment-command.js +1 -1
  44. package/dist/commands/policy-command.js +1 -1
  45. package/dist/commands/profile-command.js +1 -1
  46. package/dist/commands/profiles-command.js +1 -1
  47. package/dist/commands/query-command.js +1 -1
  48. package/dist/commands/schedule-command.js +1 -1
  49. package/dist/commands/segment-command.js +1 -1
  50. package/dist/commands/segment-create-command.js +1 -1
  51. package/dist/commands/segment-fields-command.js +1 -1
  52. package/dist/commands/segment-move-command.js +1 -1
  53. package/dist/commands/segment-pull-command.js +1 -1
  54. package/dist/commands/segment-push-command.js +1 -1
  55. package/dist/commands/segment-update-command.js +1 -1
  56. package/dist/commands/segment-use-command.js +1 -1
  57. package/dist/commands/segment-validate-command.js +1 -1
  58. package/dist/commands/segments.js +1 -1
  59. package/dist/commands/show.js +1 -1
  60. package/dist/commands/status-command.js +1 -1
  61. package/dist/commands/table-deleted.js +1 -1
  62. package/dist/commands/tables.js +1 -1
  63. package/dist/commands/unset-command.js +1 -1
  64. package/dist/commands/upgrade-command.d.ts +8 -0
  65. package/dist/commands/upgrade-command.d.ts.map +1 -1
  66. package/dist/commands/upgrade-command.js +1 -1
  67. package/dist/commands/upgrade-command.js.map +1 -1
  68. package/dist/commands/usage-command.js +1 -1
  69. package/dist/commands/use-command.js +1 -1
  70. package/dist/commands/user-command.js +1 -1
  71. package/dist/commands/work-command.js +1 -1
  72. package/dist/commands/workflow-command.js +1 -1
  73. package/dist/core/auth.js +1 -1
  74. package/dist/core/command-output.js +1 -1
  75. package/dist/core/config.js +1 -1
  76. package/dist/core/connection-cache.js +1 -1
  77. package/dist/core/constants.js +1 -1
  78. package/dist/core/credential-cache.js +1 -1
  79. package/dist/core/global-context.js +1 -1
  80. package/dist/core/keychain.js +1 -1
  81. package/dist/core/oauth-keychain.js +1 -1
  82. package/dist/core/oauth.js +1 -1
  83. package/dist/core/profile.js +1 -1
  84. package/dist/core/project-config.js +1 -1
  85. package/dist/core/session.js +1 -1
  86. package/dist/core/site-mismatch.js +1 -1
  87. package/dist/core/user-cache.js +1 -1
  88. package/dist/core/version.js +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/mcp/server.js +1 -1
  91. package/dist/mcp/tools/index.js +1 -1
  92. package/dist/mcp/tools/tdx-run.js +1 -1
  93. package/dist/mcp/tools/tdx-search.js +1 -1
  94. package/dist/mcp/tools/work-create-item.js +1 -1
  95. package/dist/mcp/utils.js +1 -1
  96. package/dist/proxy/claude-usage-tracker.js +1 -1
  97. package/dist/proxy/passthrough-server.js +1 -1
  98. package/dist/proxy/sse-usage-parser.js +1 -1
  99. package/dist/sdk/agent/agent-config.js +1 -1
  100. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  101. package/dist/sdk/agent/agent-yaml.js +1 -1
  102. package/dist/sdk/agent/test/evaluator.js +1 -1
  103. package/dist/sdk/agent/test/executor.js +1 -1
  104. package/dist/sdk/agent/test/index.js +1 -1
  105. package/dist/sdk/agent/test/output.js +1 -1
  106. package/dist/sdk/agent/test/parser.js +1 -1
  107. package/dist/sdk/agent/tool-target-registry.js +1 -1
  108. package/dist/sdk/api.js +1 -1
  109. package/dist/sdk/auth-token.js +1 -1
  110. package/dist/sdk/cas/audience-context.js +1 -1
  111. package/dist/sdk/cas/cas-api-client.js +1 -1
  112. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  113. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  114. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  115. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  116. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  117. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  118. package/dist/sdk/cas/index.js +1 -1
  119. package/dist/sdk/cas/pull-workflow.js +1 -1
  120. package/dist/sdk/cas/push-workflow.js +1 -1
  121. package/dist/sdk/cas/validate-files.js +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-readiness-workflow.js +1 -1
  144. package/dist/sdk/engage/campaign-readiness.js +1 -1
  145. package/dist/sdk/engage/campaign-validator.js +1 -1
  146. package/dist/sdk/engage/campaign-yaml.js +1 -1
  147. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  148. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  149. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  150. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  151. package/dist/sdk/engage/landing-page-init.js +1 -1
  152. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  153. package/dist/sdk/engage/landing-page-pull.js +1 -1
  154. package/dist/sdk/engage/landing-page-push.js +1 -1
  155. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  156. package/dist/sdk/engage/landing-page-validator.js +1 -1
  157. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  158. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  159. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  160. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  161. package/dist/sdk/engage/template-pull.js +1 -1
  162. package/dist/sdk/engage/template-push.js +1 -1
  163. package/dist/sdk/engage/template-validator.js +1 -1
  164. package/dist/sdk/engage/template-yaml.js +1 -1
  165. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  166. package/dist/sdk/engage/types/campaign-def.js +1 -1
  167. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  168. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  169. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  170. package/dist/sdk/engage/types/template-schema.js +1 -1
  171. package/dist/sdk/engage/workspace-assignments.js +1 -1
  172. package/dist/sdk/engage.js +1 -1
  173. package/dist/sdk/errors.js +1 -1
  174. package/dist/sdk/index.js +1 -1
  175. package/dist/sdk/io/index.js +1 -1
  176. package/dist/sdk/io/node-filesystem.js +1 -1
  177. package/dist/sdk/job.js +1 -1
  178. package/dist/sdk/journey.js +1 -1
  179. package/dist/sdk/llm/chat-cache.js +1 -1
  180. package/dist/sdk/llm/codex-usage.js +1 -1
  181. package/dist/sdk/llm/index.js +1 -1
  182. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  183. package/dist/sdk/llm/model-factors.js +1 -1
  184. package/dist/sdk/llm/user-settings.js +1 -1
  185. package/dist/sdk/llm/work-models.js +1 -1
  186. package/dist/sdk/p13n-studio-errors.js +1 -1
  187. package/dist/sdk/p13n-studio.js +1 -1
  188. package/dist/sdk/personalization.js +1 -1
  189. package/dist/sdk/policy.js +1 -1
  190. package/dist/sdk/query/deleted-table-validation.js +1 -1
  191. package/dist/sdk/query/index.js +1 -1
  192. package/dist/sdk/query/sql-parser.js +1 -1
  193. package/dist/sdk/realtime.js +1 -1
  194. package/dist/sdk/schedule.js +1 -1
  195. package/dist/sdk/segment/audience-context.js +1 -1
  196. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  197. package/dist/sdk/segment/fields-display.js +1 -1
  198. package/dist/sdk/segment/file-discovery.js +1 -1
  199. package/dist/sdk/segment/journey-utils.js +1 -1
  200. package/dist/sdk/segment/journey-validator.js +1 -1
  201. package/dist/sdk/segment/journey-yaml.js +1 -1
  202. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  203. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  204. package/dist/sdk/segment/pull-workflow.js +1 -1
  205. package/dist/sdk/segment/push-recovery.js +1 -1
  206. package/dist/sdk/segment/push-workflow.js +1 -1
  207. package/dist/sdk/segment/resolution-context.js +1 -1
  208. package/dist/sdk/segment/segment-path-parser.js +1 -1
  209. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  210. package/dist/sdk/segment/segment-validator.js +1 -1
  211. package/dist/sdk/segment/target-resolution.js +1 -1
  212. package/dist/sdk/segment/tdx-config.js +1 -1
  213. package/dist/sdk/segment/types/activation-schema.js +1 -1
  214. package/dist/sdk/segment/types/journey-def.js +1 -1
  215. package/dist/sdk/segment/types/journey-schema.js +1 -1
  216. package/dist/sdk/segment/types/segment-def.js +1 -1
  217. package/dist/sdk/segment/types/segment-schema.js +1 -1
  218. package/dist/sdk/segment/validate-files.js +1 -1
  219. package/dist/sdk/segment/yaml-validator.js +1 -1
  220. package/dist/sdk/segment.js +1 -1
  221. package/dist/sdk/types/index.js +1 -1
  222. package/dist/sdk/types/progress.js +1 -1
  223. package/dist/sdk/types/workspace.js +1 -1
  224. package/dist/sdk/user.js +1 -1
  225. package/dist/sdk/util/format-detector.js +1 -1
  226. package/dist/sdk/util/formatters.js +1 -1
  227. package/dist/sdk/util/index.js +1 -1
  228. package/dist/sdk/util/paginate.js +1 -1
  229. package/dist/sdk/util/tree-formatter.js +1 -1
  230. package/dist/sdk/util/tree-search.js +1 -1
  231. package/dist/sdk/workflow/archive-validation.js +1 -1
  232. package/dist/sdk/workflow/clone-workflow.js +1 -1
  233. package/dist/sdk/workflow/index.js +1 -1
  234. package/dist/sdk/workflow/pull-workflow.js +1 -1
  235. package/dist/sdk/workflow/push-workflow.js +1 -1
  236. package/dist/sdk/workflow/task-graph.js +1 -1
  237. package/dist/sdk/workflow/tdx-config.js +1 -1
  238. package/dist/sdk/workflow/workflow-utils.js +1 -1
  239. package/dist/sdk/workspace/access-tracker.js +1 -1
  240. package/dist/sdk/workspace/frontmatter.js +1 -1
  241. package/dist/sdk/workspace/git.js +1 -1
  242. package/dist/sdk/workspace/index.js +1 -1
  243. package/dist/sdk/workspace/templates.js +1 -1
  244. package/dist/sdk/workspace/weekly.js +1 -1
  245. package/dist/sdk/workspace/wikilinks.js +1 -1
  246. package/dist/test-utils/command-runner.js +1 -1
  247. package/dist/test-utils/factories.js +1 -1
  248. package/dist/test-utils/fixtures.js +1 -1
  249. package/dist/test-utils/http-mock.js +1 -1
  250. package/dist/test-utils/index.js +1 -1
  251. package/dist/utils/async.js +1 -1
  252. package/dist/utils/claude-code-state.js +1 -1
  253. package/dist/utils/colors.js +1 -1
  254. package/dist/utils/diff.js +1 -1
  255. package/dist/utils/file-permissions.js +1 -1
  256. package/dist/utils/file-reader.js +1 -1
  257. package/dist/utils/github-releases.js +1 -1
  258. package/dist/utils/global-cache.js +1 -1
  259. package/dist/utils/json-loader.js +1 -1
  260. package/dist/utils/local-cache.js +1 -1
  261. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  262. package/dist/utils/logger/formatters/index.js +1 -1
  263. package/dist/utils/logger/handlers/console-handler.js +1 -1
  264. package/dist/utils/logger/handlers/file-handler.js +1 -1
  265. package/dist/utils/logger/handlers/index.js +1 -1
  266. package/dist/utils/logger/handlers/null-handler.js +1 -1
  267. package/dist/utils/logger/index.js +1 -1
  268. package/dist/utils/logger/logger.js +1 -1
  269. package/dist/utils/logger/types.js +1 -1
  270. package/dist/utils/option-validation.js +1 -1
  271. package/dist/utils/process.js +1 -1
  272. package/dist/utils/prompt.js +1 -1
  273. package/dist/utils/proxy-fetch.js +1 -1
  274. package/dist/utils/spinner.js +1 -1
  275. package/dist/utils/sse-parser.js +1 -1
  276. package/dist/utils/string-utils.js +1 -1
  277. package/dist/utils/table-ref-parser.js +1 -1
  278. package/dist/utils/td-user.js +1 -1
  279. package/dist/utils/tdx-logger.js +1 -1
  280. package/dist/utils/version-check.js +1 -1
  281. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x40456b,_0x455bb6){const _0x3242e6=a210_0xefed,_0x31f3ef=_0x40456b();while(!![]){try{const _0x318c6b=parseInt(_0x3242e6(0x157))/0x1*(-parseInt(_0x3242e6(0x147))/0x2)+parseInt(_0x3242e6(0x13f))/0x3*(parseInt(_0x3242e6(0x15b))/0x4)+-parseInt(_0x3242e6(0x13b))/0x5*(parseInt(_0x3242e6(0x136))/0x6)+-parseInt(_0x3242e6(0x12c))/0x7+-parseInt(_0x3242e6(0x151))/0x8*(parseInt(_0x3242e6(0x162))/0x9)+-parseInt(_0x3242e6(0x148))/0xa+parseInt(_0x3242e6(0x154))/0xb;if(_0x318c6b===_0x455bb6)break;else _0x31f3ef['push'](_0x31f3ef['shift']());}catch(_0x31b352){_0x31f3ef['push'](_0x31f3ef['shift']());}}}(a210_0x5a00,0x5c59a));import a210_0x1c9b49 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x3d0065){const _0x4c6a6a=a210_0xefed;return _0x3d0065['type']!==_0x4c6a6a(0x133);}function a210_0xefed(_0x4a6dc9,_0x504be6){_0x4a6dc9=_0x4a6dc9-0x12c;const _0x5a0083=a210_0x5a00();let _0xefed5e=_0x5a0083[_0x4a6dc9];return _0xefed5e;}export function isScopedResolution(_0x38d8b2){const _0xf8127c=a210_0xefed;return _0x38d8b2[_0xf8127c(0x13d)]===_0xf8127c(0x14c)||_0x38d8b2[_0xf8127c(0x13d)]===_0xf8127c(0x134)||_0x38d8b2[_0xf8127c(0x13d)]===_0xf8127c(0x13e);}export function getScopedDetails(_0x2d5ab3){const _0x2abf14=a210_0xefed;if(isScopedResolution(_0x2d5ab3))return{'isScoped':_0x2d5ab3[_0x2abf14(0x140)],'scopedFolderPath':_0x2d5ab3[_0x2abf14(0x15c)]};return undefined;}async function findTdxConfigAsync(_0x3ec947,_0x381d19){const _0x4de026=a210_0xefed;let _0x47af26=a210_0x1c9b49[_0x4de026(0x139)](_0x3ec947);const _0x2ad88b=a210_0x1c9b49[_0x4de026(0x12d)](_0x47af26)[_0x4de026(0x14b)];while(_0x47af26!==_0x2ad88b){const _0x1681a9=a210_0x1c9b49[_0x4de026(0x161)](_0x47af26,_0x4de026(0x153));if(await _0x381d19[_0x4de026(0x158)](_0x1681a9))try{const _0x3635bc=await _0x381d19['readFile'](_0x1681a9),_0x49eab5=JSON['parse'](_0x3635bc);if(_0x49eab5[_0x4de026(0x152)]&&typeof _0x49eab5[_0x4de026(0x152)]===_0x4de026(0x138))return{'configPath':_0x1681a9,'configDir':_0x47af26,'parentSegment':_0x49eab5[_0x4de026(0x152)]};}catch{}_0x47af26=a210_0x1c9b49[_0x4de026(0x150)](_0x47af26);}return null;}function calculateScopedPath(_0x581f56,_0x5c2d5){const _0x4b9b3b=a210_0xefed,_0xdff513=a210_0x1c9b49[_0x4b9b3b(0x155)](_0x5c2d5,_0x581f56),_0x1bd723=_0xdff513!==''&&_0xdff513!=='.'&&!_0xdff513[_0x4b9b3b(0x142)]('..');return{'isScoped':_0x1bd723,'scopedFolderPath':_0x1bd723?_0xdff513['replace'](/\\/g,'/'):''};}function a210_0x5a00(){const _0x5e1137=['1mbepgV','exists','No\x20tdx.json\x20found\x20for\x20file:\x20','cwd','292nGGtgf','scopedFolderPath','folderPath','includes','Not\x20a\x20YAML\x20file:\x20','isFile','join','9jfSwkK','parent_name','segmentName','4897452CARBQj','parse','file_not_found','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','readFile','journey','error','file','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','6QidSZW','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','string','resolve','trim','3567490kxBDQL','File\x20not\x20found','type','context','2964WAyphD','isScoped','configDir','startsWith','segment','no_config','match','resourceType','101162jVrfcS','6948670YbTWJc','invalid_yaml','stat','root','directory','message','No\x20tdx.json\x20found','no_parent','dirname','1041688nsHPaK','parent_segment','tdx.json','28544285BNJpte','relative','parentSegment'];a210_0x5a00=function(){return _0x5e1137;};return a210_0x5a00();}export async function resolveTarget(_0x2600b1){const _0x2322be=a210_0xefed,{arg:_0x23d796,contextParent:_0x45e8bd,cwd:cwd=process[_0x2322be(0x15a)](),fs:fs=nodeFileSystem}=_0x2600b1;if(_0x23d796&&isYamlFilePath(_0x23d796))try{const _0x3878e1=await resolveYamlFilePath(_0x23d796,fs),_0x47a745=a210_0x1c9b49[_0x2322be(0x139)](_0x23d796),_0x5989a1=a210_0x1c9b49[_0x2322be(0x150)](_0x47a745),_0x9022d7=await findTdxConfigAsync(_0x5989a1,fs);if(!_0x9022d7){if(_0x45e8bd){const _0x5b957a=a210_0x1c9b49[_0x2322be(0x150)](_0x47a745);return{'type':_0x2322be(0x134),'parentName':_0x45e8bd,'targetDir':_0x5b957a,'configRoot':_0x5b957a,'filePath':_0x47a745,'resourceName':_0x3878e1[_0x2322be(0x164)],'folderPath':_0x3878e1['folderPath'],'resourceType':_0x3878e1[_0x2322be(0x146)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x144),'message':_0x2322be(0x159)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x135)};}const _0x4c5880=calculateScopedPath(_0x5989a1,_0x9022d7[_0x2322be(0x141)]);return{'type':'file','parentName':_0x9022d7['parentSegment'],'targetDir':_0x9022d7[_0x2322be(0x141)],'configRoot':_0x9022d7[_0x2322be(0x141)],'filePath':_0x47a745,'resourceName':_0x3878e1[_0x2322be(0x164)],'folderPath':_0x3878e1[_0x2322be(0x15d)],'resourceType':_0x3878e1[_0x2322be(0x146)],'isScoped':_0x4c5880['isScoped'],'scopedFolderPath':_0x4c5880[_0x2322be(0x15c)]};}catch(_0x10466f){const _0x4b6045=_0x10466f instanceof Error?_0x10466f[_0x2322be(0x14d)]:String(_0x10466f);if(_0x4b6045[_0x2322be(0x15e)](_0x2322be(0x13c)))return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x12e),'message':'File\x20not\x20found:\x20'+_0x23d796,'arg':_0x23d796};if(_0x4b6045[_0x2322be(0x15e)](_0x2322be(0x14e))){if(_0x45e8bd){const _0x4994e0=a210_0x1c9b49[_0x2322be(0x139)](_0x23d796);if(await fs[_0x2322be(0x158)](_0x4994e0)){const _0x1ffff7=a210_0x1c9b49[_0x2322be(0x150)](_0x4994e0),_0xb1e67a=await fs[_0x2322be(0x131)](_0x4994e0),_0x49ac05=_0xb1e67a[_0x2322be(0x145)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3d230c=_0xb1e67a[_0x2322be(0x145)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3073a6=_0x49ac05?_0x49ac05[0x1]['trim']():a210_0x1c9b49['basename'](_0x23d796,a210_0x1c9b49['extname'](_0x23d796)),_0x23f1e5=_0x3d230c&&_0x3d230c[0x1][_0x2322be(0x13a)]()==='journey'?_0x2322be(0x132):_0x2322be(0x143);return{'type':'file','parentName':_0x45e8bd,'targetDir':_0x1ffff7,'configRoot':_0x1ffff7,'filePath':_0x4994e0,'resourceName':_0x3073a6,'folderPath':'','resourceType':_0x23f1e5,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x144),'message':_0x2322be(0x159)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x135)};}return{'type':_0x2322be(0x133),'errorCode':'invalid_yaml','message':_0x4b6045,'arg':_0x23d796};}if(_0x23d796){const _0x4c9d07=a210_0x1c9b49['resolve'](cwd,_0x23d796);let _0x3ff186=null;try{_0x3ff186=await fs[_0x2322be(0x14a)](_0x4c9d07);}catch{}if(_0x3ff186?.['isDirectory']()){const _0x4f375d=await findTdxConfigAsync(_0x4c9d07,fs);if(_0x4f375d){const _0x356b59=calculateScopedPath(_0x4c9d07,_0x4f375d[_0x2322be(0x141)]);return{'type':_0x2322be(0x14c),'parentName':_0x4f375d['parentSegment'],'targetDir':_0x4c9d07,'configRoot':_0x4f375d[_0x2322be(0x141)],'isScoped':_0x356b59['isScoped'],'scopedFolderPath':_0x356b59[_0x2322be(0x15c)]};}if(_0x45e8bd)return{'type':_0x2322be(0x14c),'parentName':_0x45e8bd,'targetDir':_0x4c9d07,'configRoot':_0x4c9d07,'isScoped':![],'scopedFolderPath':''};return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x144),'message':_0x2322be(0x130)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x135)};}if(_0x3ff186?.[_0x2322be(0x160)]())return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x149),'message':_0x2322be(0x15f)+_0x23d796,'arg':_0x23d796,'helpText':_0x2322be(0x137)};const _0x4e2ce3=sanitizeFileName(_0x23d796),_0x9599f=getSegmentRootDir(_0x4e2ce3,cwd);return{'type':_0x2322be(0x163),'parentName':_0x23d796,'targetDir':_0x9599f,'configRoot':_0x9599f};}const _0x2bd451=await findTdxConfigAsync(cwd,fs);if(_0x2bd451){const _0x2e34e8=calculateScopedPath(cwd,_0x2bd451[_0x2322be(0x141)]);return{'type':_0x2322be(0x13e),'parentName':_0x2bd451[_0x2322be(0x156)],'targetDir':cwd,'configRoot':_0x2bd451['configDir'],'isScoped':_0x2e34e8['isScoped'],'scopedFolderPath':_0x2e34e8[_0x2322be(0x15c)]};}if(_0x45e8bd){const _0x22a8ed=sanitizeFileName(_0x45e8bd),_0x4d4adb=getSegmentRootDir(_0x22a8ed,cwd);return{'type':_0x2322be(0x13e),'parentName':_0x45e8bd,'targetDir':_0x4d4adb,'configRoot':_0x4d4adb,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2322be(0x133),'errorCode':_0x2322be(0x14f),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x2322be(0x12f)};}
1
+ function a210_0x413b(_0xcc05b8,_0x14bb76){_0xcc05b8=_0xcc05b8-0x16e;const _0x48bcf3=a210_0x48bc();let _0x413be8=_0x48bcf3[_0xcc05b8];return _0x413be8;}(function(_0x5e5268,_0x51bc9a){const _0x1ee939=a210_0x413b,_0x33aa05=_0x5e5268();while(!![]){try{const _0x3b33f4=parseInt(_0x1ee939(0x1a5))/0x1+parseInt(_0x1ee939(0x179))/0x2+parseInt(_0x1ee939(0x191))/0x3+parseInt(_0x1ee939(0x19b))/0x4+parseInt(_0x1ee939(0x188))/0x5+parseInt(_0x1ee939(0x1a4))/0x6*(-parseInt(_0x1ee939(0x17c))/0x7)+parseInt(_0x1ee939(0x18c))/0x8*(-parseInt(_0x1ee939(0x19a))/0x9);if(_0x3b33f4===_0x51bc9a)break;else _0x33aa05['push'](_0x33aa05['shift']());}catch(_0x100a81){_0x33aa05['push'](_0x33aa05['shift']());}}}(a210_0x48bc,0xbd0dc));import a210_0x4f2acb from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a210_0x48bc(){const _0x26140e=['dirname','error','isFile','3269502KWfaFh','346689ZibtSD','file','segmentName','exists','file_not_found','parse','isScoped','join','trim','match','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cwd','2926910umDbSg','context','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','7eaEncq','no_config','readFile','relative','message','isDirectory','type','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','journey','root','Parent\x20segment\x20not\x20specified','No\x20tdx.json\x20found\x20for\x20file:\x20','6891515KOSTKa','stat','configDir','basename','234816AZsPvT','scopedFolderPath','segment','includes','no_parent','3492798rxCUvP','parent_name','parent_segment','No\x20tdx.json\x20found','folderPath','invalid_yaml','resourceType','resolve','string','981eVykVl','663744NIJPfU','tdx.json','parentSegment','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','startsWith','directory'];a210_0x48bc=function(){return _0x26140e;};return a210_0x48bc();}export function isSuccessfulResolution(_0x2b18da){const _0x51e3c8=a210_0x413b;return _0x2b18da[_0x51e3c8(0x182)]!==_0x51e3c8(0x1a2);}export function isScopedResolution(_0x299ca1){const _0x9a30e0=a210_0x413b;return _0x299ca1[_0x9a30e0(0x182)]===_0x9a30e0(0x1a0)||_0x299ca1[_0x9a30e0(0x182)]===_0x9a30e0(0x16e)||_0x299ca1[_0x9a30e0(0x182)]===_0x9a30e0(0x17a);}export function getScopedDetails(_0x27658a){const _0x3ab006=a210_0x413b;if(isScopedResolution(_0x27658a))return{'isScoped':_0x27658a[_0x3ab006(0x173)],'scopedFolderPath':_0x27658a[_0x3ab006(0x18d)]};return undefined;}async function findTdxConfigAsync(_0x1d474e,_0xaa8a60){const _0x515913=a210_0x413b;let _0x265654=a210_0x4f2acb[_0x515913(0x198)](_0x1d474e);const _0x24e3b6=a210_0x4f2acb[_0x515913(0x172)](_0x265654)[_0x515913(0x185)];while(_0x265654!==_0x24e3b6){const _0x43a8dd=a210_0x4f2acb[_0x515913(0x174)](_0x265654,_0x515913(0x19c));if(await _0xaa8a60[_0x515913(0x170)](_0x43a8dd))try{const _0x5b6b80=await _0xaa8a60[_0x515913(0x17e)](_0x43a8dd),_0x2c3d39=JSON[_0x515913(0x172)](_0x5b6b80);if(_0x2c3d39[_0x515913(0x193)]&&typeof _0x2c3d39[_0x515913(0x193)]===_0x515913(0x199))return{'configPath':_0x43a8dd,'configDir':_0x265654,'parentSegment':_0x2c3d39[_0x515913(0x193)]};}catch{}_0x265654=a210_0x4f2acb[_0x515913(0x1a1)](_0x265654);}return null;}function calculateScopedPath(_0x3ad7cf,_0x5bf4d9){const _0x1ed398=a210_0x413b,_0x31353e=a210_0x4f2acb[_0x1ed398(0x17f)](_0x5bf4d9,_0x3ad7cf),_0x54b011=_0x31353e!==''&&_0x31353e!=='.'&&!_0x31353e[_0x1ed398(0x19f)]('..');return{'isScoped':_0x54b011,'scopedFolderPath':_0x54b011?_0x31353e['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x62f6c0){const _0x5d76a5=a210_0x413b,{arg:_0x51d05f,contextParent:_0x557a9c,cwd:cwd=process[_0x5d76a5(0x178)](),fs:fs=nodeFileSystem}=_0x62f6c0;if(_0x51d05f&&isYamlFilePath(_0x51d05f))try{const _0x25da92=await resolveYamlFilePath(_0x51d05f,fs),_0x1b5df4=a210_0x4f2acb[_0x5d76a5(0x198)](_0x51d05f),_0x35f43e=a210_0x4f2acb[_0x5d76a5(0x1a1)](_0x1b5df4),_0x508d1e=await findTdxConfigAsync(_0x35f43e,fs);if(!_0x508d1e){if(_0x557a9c){const _0x1ec284=a210_0x4f2acb[_0x5d76a5(0x1a1)](_0x1b5df4);return{'type':_0x5d76a5(0x16e),'parentName':_0x557a9c,'targetDir':_0x1ec284,'configRoot':_0x1ec284,'filePath':_0x1b5df4,'resourceName':_0x25da92[_0x5d76a5(0x16f)],'folderPath':_0x25da92['folderPath'],'resourceType':_0x25da92['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x17d),'message':_0x5d76a5(0x187)+_0x51d05f,'arg':_0x51d05f,'helpText':_0x5d76a5(0x183)};}const _0x11ee39=calculateScopedPath(_0x35f43e,_0x508d1e[_0x5d76a5(0x18a)]);return{'type':_0x5d76a5(0x16e),'parentName':_0x508d1e[_0x5d76a5(0x19d)],'targetDir':_0x508d1e['configDir'],'configRoot':_0x508d1e['configDir'],'filePath':_0x1b5df4,'resourceName':_0x25da92[_0x5d76a5(0x16f)],'folderPath':_0x25da92[_0x5d76a5(0x195)],'resourceType':_0x25da92[_0x5d76a5(0x197)],'isScoped':_0x11ee39[_0x5d76a5(0x173)],'scopedFolderPath':_0x11ee39[_0x5d76a5(0x18d)]};}catch(_0x4d5937){const _0x576d3f=_0x4d5937 instanceof Error?_0x4d5937[_0x5d76a5(0x180)]:String(_0x4d5937);if(_0x576d3f[_0x5d76a5(0x18f)]('File\x20not\x20found'))return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x171),'message':'File\x20not\x20found:\x20'+_0x51d05f,'arg':_0x51d05f};if(_0x576d3f['includes'](_0x5d76a5(0x194))){if(_0x557a9c){const _0x3b3d91=a210_0x4f2acb[_0x5d76a5(0x198)](_0x51d05f);if(await fs[_0x5d76a5(0x170)](_0x3b3d91)){const _0x4ebd58=a210_0x4f2acb[_0x5d76a5(0x1a1)](_0x3b3d91),_0x2a51b2=await fs['readFile'](_0x3b3d91),_0x3ffc2b=_0x2a51b2[_0x5d76a5(0x176)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x2d7c53=_0x2a51b2[_0x5d76a5(0x176)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x56d0ff=_0x3ffc2b?_0x3ffc2b[0x1]['trim']():a210_0x4f2acb[_0x5d76a5(0x18b)](_0x51d05f,a210_0x4f2acb['extname'](_0x51d05f)),_0xdced1a=_0x2d7c53&&_0x2d7c53[0x1][_0x5d76a5(0x175)]()===_0x5d76a5(0x184)?'journey':_0x5d76a5(0x18e);return{'type':'file','parentName':_0x557a9c,'targetDir':_0x4ebd58,'configRoot':_0x4ebd58,'filePath':_0x3b3d91,'resourceName':_0x56d0ff,'folderPath':'','resourceType':_0xdced1a,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x17d),'message':_0x5d76a5(0x187)+_0x51d05f,'arg':_0x51d05f,'helpText':_0x5d76a5(0x183)};}return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x196),'message':_0x576d3f,'arg':_0x51d05f};}if(_0x51d05f){const _0x184b4e=a210_0x4f2acb[_0x5d76a5(0x198)](cwd,_0x51d05f);let _0x50845e=null;try{_0x50845e=await fs[_0x5d76a5(0x189)](_0x184b4e);}catch{}if(_0x50845e?.[_0x5d76a5(0x181)]()){const _0x335a5a=await findTdxConfigAsync(_0x184b4e,fs);if(_0x335a5a){const _0x5d9231=calculateScopedPath(_0x184b4e,_0x335a5a['configDir']);return{'type':_0x5d76a5(0x1a0),'parentName':_0x335a5a[_0x5d76a5(0x19d)],'targetDir':_0x184b4e,'configRoot':_0x335a5a['configDir'],'isScoped':_0x5d9231['isScoped'],'scopedFolderPath':_0x5d9231[_0x5d76a5(0x18d)]};}if(_0x557a9c)return{'type':_0x5d76a5(0x1a0),'parentName':_0x557a9c,'targetDir':_0x184b4e,'configRoot':_0x184b4e,'isScoped':![],'scopedFolderPath':''};return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x17d),'message':_0x5d76a5(0x177)+_0x51d05f,'arg':_0x51d05f,'helpText':_0x5d76a5(0x183)};}if(_0x50845e?.[_0x5d76a5(0x1a3)]())return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x196),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x51d05f,'arg':_0x51d05f,'helpText':_0x5d76a5(0x17b)};const _0x6f1916=sanitizeFileName(_0x51d05f),_0x436629=getSegmentRootDir(_0x6f1916,cwd);return{'type':_0x5d76a5(0x192),'parentName':_0x51d05f,'targetDir':_0x436629,'configRoot':_0x436629};}const _0x347d1e=await findTdxConfigAsync(cwd,fs);if(_0x347d1e){const _0xab0b05=calculateScopedPath(cwd,_0x347d1e[_0x5d76a5(0x18a)]);return{'type':_0x5d76a5(0x17a),'parentName':_0x347d1e[_0x5d76a5(0x19d)],'targetDir':cwd,'configRoot':_0x347d1e[_0x5d76a5(0x18a)],'isScoped':_0xab0b05[_0x5d76a5(0x173)],'scopedFolderPath':_0xab0b05[_0x5d76a5(0x18d)]};}if(_0x557a9c){const _0x1286a5=sanitizeFileName(_0x557a9c),_0x5ee2be=getSegmentRootDir(_0x1286a5,cwd);return{'type':_0x5d76a5(0x17a),'parentName':_0x557a9c,'targetDir':_0x5ee2be,'configRoot':_0x5ee2be,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5d76a5(0x1a2),'errorCode':_0x5d76a5(0x190),'message':_0x5d76a5(0x186),'helpText':_0x5d76a5(0x19e)};}
@@ -1 +1 @@
1
- const a211_0x4048fa=a211_0x4ee1;(function(_0x5366fc,_0x4e901d){const _0x3c3830=a211_0x4ee1,_0x5a237d=_0x5366fc();while(!![]){try{const _0x56139b=parseInt(_0x3c3830(0x95))/0x1*(-parseInt(_0x3c3830(0xa6))/0x2)+-parseInt(_0x3c3830(0x9e))/0x3+-parseInt(_0x3c3830(0x96))/0x4*(-parseInt(_0x3c3830(0x9c))/0x5)+-parseInt(_0x3c3830(0x93))/0x6*(parseInt(_0x3c3830(0xa0))/0x7)+parseInt(_0x3c3830(0x99))/0x8+-parseInt(_0x3c3830(0xa7))/0x9+parseInt(_0x3c3830(0xa1))/0xa;if(_0x56139b===_0x4e901d)break;else _0x5a237d['push'](_0x5a237d['shift']());}catch(_0x5bd2db){_0x5a237d['push'](_0x5a237d['shift']());}}}(a211_0x2dee,0x7ce84));import{existsSync,readFileSync}from'fs';import a211_0x2bf0cd from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a211_0x4048fa(0xa8);export function findTdxConfigPath(_0x359e9e=process[a211_0x4048fa(0xa3)]()){const _0x38659d=a211_0x4048fa;let _0x61535f=a211_0x2bf0cd[_0x38659d(0xa9)](_0x359e9e);const _0x930f5a=a211_0x2bf0cd['parse'](_0x61535f)[_0x38659d(0x97)];while(_0x61535f!==_0x930f5a){const _0x14bacc=a211_0x2bf0cd[_0x38659d(0x9a)](_0x61535f,TDX_CONFIG_FILE);if(existsSync(_0x14bacc))return _0x14bacc;_0x61535f=a211_0x2bf0cd['dirname'](_0x61535f);}return null;}export function loadTdxConfig(_0x4cda4e){const _0x28a7f5=a211_0x4048fa,_0x2b60ce=readFileSync(_0x4cda4e,_0x28a7f5(0x9d));let _0x491259;try{_0x491259=JSON[_0x28a7f5(0x9f)](_0x2b60ce);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x4cda4e);}if(!_0x491259||typeof _0x491259!==_0x28a7f5(0x91))throw new Error(_0x28a7f5(0xa2));const _0x48ea08=_0x491259,_0x16e94f=_0x48ea08[_0x28a7f5(0x98)]&&typeof _0x48ea08[_0x28a7f5(0x98)]===_0x28a7f5(0x9b),_0x55432a=_0x48ea08[_0x28a7f5(0xa4)]&&typeof _0x48ea08[_0x28a7f5(0xa4)]==='string';if(!_0x16e94f&&!_0x55432a)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x4cdd46={};return _0x16e94f&&(_0x4cdd46[_0x28a7f5(0x98)]=_0x48ea08['parent_segment']),_0x55432a&&(_0x4cdd46[_0x28a7f5(0xa4)]=_0x48ea08[_0x28a7f5(0xa4)]),_0x4cdd46;}export function findTdxConfig(_0x2445b8=process[a211_0x4048fa(0xa3)]()){const _0xce29f0=a211_0x4048fa,_0x15ddaa=findTdxConfigPath(_0x2445b8);if(!_0x15ddaa)throw new Error(_0xce29f0(0x92));const _0x1f9ed9=loadTdxConfig(_0x15ddaa),_0x506b96=a211_0x2bf0cd[_0xce29f0(0xa5)](_0x15ddaa);return{'config':_0x1f9ed9,'configPath':_0x15ddaa,'configDir':_0x506b96};}function a211_0x2dee(){const _0x54a738=['utf-8','968973pQuTbB','parse','77CVZvrp','26907440cwBqpX','Invalid\x20tdx.json:\x20expected\x20object','cwd','engage_workspace','dirname','1450CznLri','5987493BSpYyF','segments','resolve','stringify','object','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','448044LPdkiS','relative','871CfbivI','2276DslHqU','root','parent_segment','1217728BgtrHi','join','string','965JqHLpa'];a211_0x2dee=function(){return _0x54a738;};return a211_0x2dee();}export function tryFindTdxConfig(_0x546e41){try{return findTdxConfig(_0x546e41);}catch{return null;}}export function getSegmentRootDir(_0x4a9866,_0x446cae=process[a211_0x4048fa(0xa3)]()){const _0x473bdf=a211_0x4048fa;return a211_0x2bf0cd[_0x473bdf(0x9a)](_0x446cae,SEGMENTS_DIR,_0x4a9866);}export function getTdxConfigPath(_0xdb0862,_0x11e9ba=process[a211_0x4048fa(0xa3)]()){const _0x131a68=a211_0x4048fa;return a211_0x2bf0cd[_0x131a68(0x9a)](getSegmentRootDir(_0xdb0862,_0x11e9ba),TDX_CONFIG_FILE);}function a211_0x4ee1(_0x2d6fc0,_0x4dc3ba){_0x2d6fc0=_0x2d6fc0-0x91;const _0x2dee9d=a211_0x2dee();let _0x4ee1e9=_0x2dee9d[_0x2d6fc0];return _0x4ee1e9;}export function getRelativePathFromConfig(_0x15d514,_0x1b2c41){const _0x5a6f24=a211_0x4048fa,_0x430464=a211_0x2bf0cd[_0x5a6f24(0xa9)](_0x15d514),_0x3200de=a211_0x2bf0cd[_0x5a6f24(0x94)](_0x1b2c41,_0x430464);if(_0x3200de['startsWith']('..'))return'';return _0x3200de;}export function localPathToTdFolderPath(_0x432cac){const _0x37f9ec=a211_0x4048fa,_0x2359d7=a211_0x2bf0cd[_0x37f9ec(0xa5)](_0x432cac);if(_0x2359d7==='.'||_0x2359d7==='')return'';return _0x2359d7['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x392e18,_0xbac485){if(!_0x392e18)return _0xbac485;return a211_0x2bf0cd['join'](_0xbac485,_0x392e18);}export function createTdxConfigContent(_0x560165){const _0x5d4cf6=a211_0x4048fa,_0x587d48={'parent_segment':_0x560165};return JSON[_0x5d4cf6(0xaa)](_0x587d48,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2f9de9){const _0x1f0854=a211_0x4048fa,_0x505aa9={'engage_workspace':_0x2f9de9};return JSON[_0x1f0854(0xaa)](_0x505aa9,null,0x2)+'\x0a';}
1
+ const a211_0x3ec3a4=a211_0x5ebd;(function(_0xaddae1,_0x5f0578){const _0x502ea4=a211_0x5ebd,_0x4fe990=_0xaddae1();while(!![]){try{const _0x108419=-parseInt(_0x502ea4(0xf2))/0x1*(parseInt(_0x502ea4(0xf9))/0x2)+-parseInt(_0x502ea4(0xe6))/0x3*(-parseInt(_0x502ea4(0xea))/0x4)+-parseInt(_0x502ea4(0xf6))/0x5+parseInt(_0x502ea4(0xeb))/0x6*(parseInt(_0x502ea4(0xef))/0x7)+-parseInt(_0x502ea4(0xf5))/0x8+-parseInt(_0x502ea4(0xed))/0x9+parseInt(_0x502ea4(0xe4))/0xa*(parseInt(_0x502ea4(0xf1))/0xb);if(_0x108419===_0x5f0578)break;else _0x4fe990['push'](_0x4fe990['shift']());}catch(_0x1d4e28){_0x4fe990['push'](_0x4fe990['shift']());}}}(a211_0x5a71,0x3a9ad));import{existsSync,readFileSync}from'fs';import a211_0x35b46c from'path';const TDX_CONFIG_FILE=a211_0x3ec3a4(0xe3),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x383602=process[a211_0x3ec3a4(0xf7)]()){const _0x1565fe=a211_0x3ec3a4;let _0xff2f50=a211_0x35b46c['resolve'](_0x383602);const _0x189557=a211_0x35b46c[_0x1565fe(0xec)](_0xff2f50)[_0x1565fe(0xe5)];while(_0xff2f50!==_0x189557){const _0x22287d=a211_0x35b46c['join'](_0xff2f50,TDX_CONFIG_FILE);if(existsSync(_0x22287d))return _0x22287d;_0xff2f50=a211_0x35b46c['dirname'](_0xff2f50);}return null;}export function loadTdxConfig(_0xdca9d3){const _0x14be3f=a211_0x3ec3a4,_0x548b8d=readFileSync(_0xdca9d3,_0x14be3f(0xe2));let _0x44324a;try{_0x44324a=JSON['parse'](_0x548b8d);}catch{throw new Error(_0x14be3f(0xe7)+_0xdca9d3);}if(!_0x44324a||typeof _0x44324a!==_0x14be3f(0xf8))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x1d4679=_0x44324a,_0x5e6387=_0x1d4679[_0x14be3f(0xe9)]&&typeof _0x1d4679[_0x14be3f(0xe9)]===_0x14be3f(0xf0),_0x4e0a0f=_0x1d4679[_0x14be3f(0xdf)]&&typeof _0x1d4679[_0x14be3f(0xdf)]===_0x14be3f(0xf0);if(!_0x5e6387&&!_0x4e0a0f)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x26d7c2={};return _0x5e6387&&(_0x26d7c2['parent_segment']=_0x1d4679[_0x14be3f(0xe9)]),_0x4e0a0f&&(_0x26d7c2[_0x14be3f(0xdf)]=_0x1d4679['engage_workspace']),_0x26d7c2;}export function findTdxConfig(_0x3c37e8=process[a211_0x3ec3a4(0xf7)]()){const _0x4e931a=a211_0x3ec3a4,_0x465405=findTdxConfigPath(_0x3c37e8);if(!_0x465405)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x1c5b7d=loadTdxConfig(_0x465405),_0xfe7fc1=a211_0x35b46c[_0x4e931a(0xf3)](_0x465405);return{'config':_0x1c5b7d,'configPath':_0x465405,'configDir':_0xfe7fc1};}export function tryFindTdxConfig(_0x336652){try{return findTdxConfig(_0x336652);}catch{return null;}}function a211_0x5a71(){const _0x209068=['3490744womplZ','59200txXayF','cwd','object','598ZDnJxJ','engage_workspace','resolve','relative','utf-8','tdx.json','170yBNFPT','root','190341IvSLVW','Invalid\x20JSON\x20in\x20','join','parent_segment','20JPsxUr','13524inGJwY','parse','3300201mfBFzL','startsWith','98Feetlh','string','575696lRPNuz','614ZUaQgM','dirname','stringify'];a211_0x5a71=function(){return _0x209068;};return a211_0x5a71();}export function getSegmentRootDir(_0x461ba8,_0x2cd58e=process[a211_0x3ec3a4(0xf7)]()){return a211_0x35b46c['join'](_0x2cd58e,SEGMENTS_DIR,_0x461ba8);}export function getTdxConfigPath(_0x8a9c0d,_0x2d59be=process['cwd']()){const _0x59655a=a211_0x3ec3a4;return a211_0x35b46c[_0x59655a(0xe8)](getSegmentRootDir(_0x8a9c0d,_0x2d59be),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x4f22ff,_0x49262a){const _0x22edd8=a211_0x3ec3a4,_0x17e610=a211_0x35b46c[_0x22edd8(0xe0)](_0x4f22ff),_0x5e9b05=a211_0x35b46c[_0x22edd8(0xe1)](_0x49262a,_0x17e610);if(_0x5e9b05[_0x22edd8(0xee)]('..'))return'';return _0x5e9b05;}function a211_0x5ebd(_0xb302cf,_0x1e059f){_0xb302cf=_0xb302cf-0xdf;const _0x5a719e=a211_0x5a71();let _0x5ebd3d=_0x5a719e[_0xb302cf];return _0x5ebd3d;}export function localPathToTdFolderPath(_0xdc5dec){const _0x219504=a211_0x3ec3a4,_0x194b76=a211_0x35b46c[_0x219504(0xf3)](_0xdc5dec);if(_0x194b76==='.'||_0x194b76==='')return'';return _0x194b76['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x458057,_0x518e1a){if(!_0x458057)return _0x518e1a;return a211_0x35b46c['join'](_0x518e1a,_0x458057);}export function createTdxConfigContent(_0x40098e){const _0x50a094=a211_0x3ec3a4,_0x535ce8={'parent_segment':_0x40098e};return JSON[_0x50a094(0xf4)](_0x535ce8,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x11af11){const _0x58847a={'engage_workspace':_0x11af11};return JSON['stringify'](_0x58847a,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- function a212_0x196a(_0x33c881,_0x4d4cd5){_0x33c881=_0x33c881-0x131;const _0x44f264=a212_0x44f2();let _0x196a28=_0x44f264[_0x33c881];return _0x196a28;}const a212_0x21a1b5=a212_0x196a;(function(_0x38b01c,_0x52a061){const _0x133336=a212_0x196a,_0x1572c9=_0x38b01c();while(!![]){try{const _0x1d6d1f=parseInt(_0x133336(0x15b))/0x1*(-parseInt(_0x133336(0x156))/0x2)+-parseInt(_0x133336(0x149))/0x3*(parseInt(_0x133336(0x157))/0x4)+-parseInt(_0x133336(0x13f))/0x5+-parseInt(_0x133336(0x14a))/0x6*(parseInt(_0x133336(0x15d))/0x7)+parseInt(_0x133336(0x131))/0x8+-parseInt(_0x133336(0x13b))/0x9+parseInt(_0x133336(0x134))/0xa*(parseInt(_0x133336(0x158))/0xb);if(_0x1d6d1f===_0x52a061)break;else _0x1572c9['push'](_0x1572c9['shift']());}catch(_0x5bd602){_0x1572c9['push'](_0x1572c9['shift']());}}}(a212_0x44f2,0x535c6));import{z}from'zod';export const ScheduleTypeSchema=z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x146),a212_0x21a1b5(0x155),a212_0x21a1b5(0x151),a212_0x21a1b5(0x15e),a212_0x21a1b5(0x144),a212_0x21a1b5(0x138),a212_0x21a1b5(0x137)]);function a212_0x44f2(){const _0x3996d6=['max','superRefine','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','optional','daily','First','rows','object','hourly','11492nfhSIK','506172Nnuyfk','298969wGygKO','clear','week','108kzcNQv','number','7ysxTZg','weekly','addIssue','onFailure','day','string','4681600FQdoAC','month','array','520vnzGco','onSuccess','enum','minutes_interval','cron','boolean','once','3835170UCTjrE','unknown','min','nullable','1785590rwLdPt','record','ascending','union','masked','monthly','behaviors','none','behavior','Last','3vFOpQC','760218PHFkZE','hour','Activation\x20name\x20is\x20required'];a212_0x44f2=function(){return _0x3996d6;};return a212_0x44f2();}export const RepeatUnitSchema=z[a212_0x21a1b5(0x136)](['minute',a212_0x21a1b5(0x14b),a212_0x21a1b5(0x161),a212_0x21a1b5(0x15a),a212_0x21a1b5(0x132),a212_0x21a1b5(0x13a),'none']);export const ScheduleDefSchema=z[a212_0x21a1b5(0x154)]({'type':ScheduleTypeSchema[a212_0x21a1b5(0x150)](),'repeat_unit':RepeatUnitSchema[a212_0x21a1b5(0x150)](),'repeat_frequency':z[a212_0x21a1b5(0x15c)]()['optional'](),'repeat_sub_frequency':z[a212_0x21a1b5(0x133)](z[a212_0x21a1b5(0x15c)]())[a212_0x21a1b5(0x150)](),'start_at':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x13e)]()[a212_0x21a1b5(0x150)](),'end_on':z['string']()[a212_0x21a1b5(0x13e)]()['optional'](),'timezone':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)]()});export const NotificationDefSchema=z[a212_0x21a1b5(0x154)]({'notify_on':z[a212_0x21a1b5(0x133)](z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x135),a212_0x21a1b5(0x160)]))[a212_0x21a1b5(0x150)](),'email_recipients':z[a212_0x21a1b5(0x133)](z['string']())['optional']()});export const ActivationColumnDefSchema=z[a212_0x21a1b5(0x142)]([z[a212_0x21a1b5(0x162)](),z[a212_0x21a1b5(0x154)]({'name':z[a212_0x21a1b5(0x162)](),'type':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)](),'visibility':z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x159),a212_0x21a1b5(0x143)])[a212_0x21a1b5(0x150)]()})]);export const ActivationBehaviorDefSchema=z[a212_0x21a1b5(0x154)]({'columns':z[a212_0x21a1b5(0x133)](ActivationColumnDefSchema)[a212_0x21a1b5(0x150)](),'behavior_table':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)](),'join_row':z[a212_0x21a1b5(0x15c)]()['nullable']()[a212_0x21a1b5(0x150)](),'join_strategy':z[a212_0x21a1b5(0x136)](['All',a212_0x21a1b5(0x152),a212_0x21a1b5(0x148),'Top-N'])[a212_0x21a1b5(0x150)](),'formatting':z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x153),'cols'])[a212_0x21a1b5(0x150)](),'order_by':z[a212_0x21a1b5(0x133)](z['object']({'key':z['string'](),'order':z[a212_0x21a1b5(0x136)]([a212_0x21a1b5(0x141),'descending'])}))[a212_0x21a1b5(0x150)]()});export const ActivationBehaviorsDefSchema=z[a212_0x21a1b5(0x133)](ActivationBehaviorDefSchema)[a212_0x21a1b5(0x14d)](0x4);export const ActivationDefSchema=z[a212_0x21a1b5(0x154)]({'name':z['string']()['min'](0x1,a212_0x21a1b5(0x14c)),'description':z[a212_0x21a1b5(0x162)]()['optional'](),'connection':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x13d)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a212_0x21a1b5(0x150)](),'columns':z[a212_0x21a1b5(0x133)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a212_0x21a1b5(0x150)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a212_0x21a1b5(0x140)](z['string'](),z[a212_0x21a1b5(0x13c)]())[a212_0x21a1b5(0x150)](),'activation_template_id':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x13e)]()[a212_0x21a1b5(0x150)](),'behavior':ActivationBehaviorDefSchema[a212_0x21a1b5(0x13e)]()[a212_0x21a1b5(0x150)](),'behaviors':ActivationBehaviorsDefSchema[a212_0x21a1b5(0x150)](),'run_after_journey_refresh':z[a212_0x21a1b5(0x139)]()[a212_0x21a1b5(0x150)](),'nested_workflow_project_name':z[a212_0x21a1b5(0x162)]()['optional'](),'nested_workflow_name':z[a212_0x21a1b5(0x162)]()[a212_0x21a1b5(0x150)](),'lock_enabled':z['boolean']()['optional']()})[a212_0x21a1b5(0x14e)]((_0x8043fb,_0x78cbb0)=>{const _0x8c657c=a212_0x21a1b5;_0x8043fb[_0x8c657c(0x147)]!=null&&_0x8043fb[_0x8c657c(0x145)]!=null&&_0x78cbb0[_0x8c657c(0x15f)]({'code':'custom','message':_0x8c657c(0x14f),'path':[_0x8c657c(0x147)]});});
1
+ const a212_0x498e24=a212_0x8927;(function(_0x26398f,_0x48a19b){const _0x435664=a212_0x8927,_0x341658=_0x26398f();while(!![]){try{const _0x2b000f=-parseInt(_0x435664(0x1e5))/0x1+parseInt(_0x435664(0x209))/0x2*(parseInt(_0x435664(0x1fa))/0x3)+-parseInt(_0x435664(0x1f7))/0x4*(-parseInt(_0x435664(0x1de))/0x5)+-parseInt(_0x435664(0x1f6))/0x6+-parseInt(_0x435664(0x1fb))/0x7*(-parseInt(_0x435664(0x1f0))/0x8)+-parseInt(_0x435664(0x202))/0x9+parseInt(_0x435664(0x1e4))/0xa;if(_0x2b000f===_0x48a19b)break;else _0x341658['push'](_0x341658['shift']());}catch(_0x4818c1){_0x341658['push'](_0x341658['shift']());}}}(a212_0x4eec,0xac5e4));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a212_0x498e24(0x1f3),'hourly',a212_0x498e24(0x1dd),a212_0x498e24(0x1f5),'monthly',a212_0x498e24(0x1ed),a212_0x498e24(0x205)]);export const RepeatUnitSchema=z[a212_0x498e24(0x1e6)]([a212_0x498e24(0x1e1),'hour',a212_0x498e24(0x207),a212_0x498e24(0x1f4),'month',a212_0x498e24(0x201),a212_0x498e24(0x1f3)]);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a212_0x498e24(0x1fe)](),'repeat_frequency':z[a212_0x498e24(0x1ee)]()['optional'](),'repeat_sub_frequency':z[a212_0x498e24(0x1ff)](z[a212_0x498e24(0x1ee)]())['optional'](),'start_at':z['string']()[a212_0x498e24(0x1fd)]()[a212_0x498e24(0x1fe)](),'end_on':z[a212_0x498e24(0x1e2)]()[a212_0x498e24(0x1fd)]()[a212_0x498e24(0x1fe)](),'timezone':z['string']()[a212_0x498e24(0x1fe)]()});function a212_0x4eec(){const _0x19a7e1=['37826kWWzFz','onFailure','daily','11435QdvEzu','masked','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','minute','string','behavior','26655120MZrjXT','696533dVzvrx','enum','record','Top-N','Last','boolean','rows','onSuccess','cron','number','superRefine','837208IzXASv','object','min','none','week','weekly','3148434vBWQGu','180HWwjwF','Activation\x20name\x20is\x20required','unknown','18NHmvSC','7uWamwd','ascending','nullable','optional','array','cols','once','9533376zePqoT','All','max','minutes_interval','custom','day','clear'];a212_0x4eec=function(){return _0x19a7e1;};return a212_0x4eec();}export const NotificationDefSchema=z[a212_0x498e24(0x1f1)]({'notify_on':z[a212_0x498e24(0x1ff)](z[a212_0x498e24(0x1e6)]([a212_0x498e24(0x1ec),a212_0x498e24(0x20a)]))[a212_0x498e24(0x1fe)](),'email_recipients':z['array'](z[a212_0x498e24(0x1e2)]())[a212_0x498e24(0x1fe)]()});function a212_0x8927(_0x5cc3c8,_0x24b4f9){_0x5cc3c8=_0x5cc3c8-0x1dd;const _0x4eecd6=a212_0x4eec();let _0x892797=_0x4eecd6[_0x5cc3c8];return _0x892797;}export const ActivationColumnDefSchema=z['union']([z[a212_0x498e24(0x1e2)](),z[a212_0x498e24(0x1f1)]({'name':z[a212_0x498e24(0x1e2)](),'type':z[a212_0x498e24(0x1e2)]()['optional'](),'visibility':z[a212_0x498e24(0x1e6)]([a212_0x498e24(0x208),a212_0x498e24(0x1df)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a212_0x498e24(0x1f1)]({'columns':z['array'](ActivationColumnDefSchema)['optional'](),'behavior_table':z[a212_0x498e24(0x1e2)]()[a212_0x498e24(0x1fe)](),'join_row':z[a212_0x498e24(0x1ee)]()[a212_0x498e24(0x1fd)]()[a212_0x498e24(0x1fe)](),'join_strategy':z[a212_0x498e24(0x1e6)]([a212_0x498e24(0x203),'First',a212_0x498e24(0x1e9),a212_0x498e24(0x1e8)])[a212_0x498e24(0x1fe)](),'formatting':z[a212_0x498e24(0x1e6)]([a212_0x498e24(0x1eb),a212_0x498e24(0x200)])[a212_0x498e24(0x1fe)](),'order_by':z[a212_0x498e24(0x1ff)](z[a212_0x498e24(0x1f1)]({'key':z[a212_0x498e24(0x1e2)](),'order':z['enum']([a212_0x498e24(0x1fc),'descending'])}))[a212_0x498e24(0x1fe)]()});export const ActivationBehaviorsDefSchema=z['array'](ActivationBehaviorDefSchema)[a212_0x498e24(0x204)](0x4);export const ActivationDefSchema=z[a212_0x498e24(0x1f1)]({'name':z[a212_0x498e24(0x1e2)]()[a212_0x498e24(0x1f2)](0x1,a212_0x498e24(0x1f8)),'description':z[a212_0x498e24(0x1e2)]()[a212_0x498e24(0x1fe)](),'connection':z[a212_0x498e24(0x1e2)]()[a212_0x498e24(0x1f2)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a212_0x498e24(0x1ea)]()[a212_0x498e24(0x1fe)](),'columns':z[a212_0x498e24(0x1ff)](ActivationColumnDefSchema)[a212_0x498e24(0x1fe)](),'schedule':ScheduleDefSchema[a212_0x498e24(0x1fe)](),'notification':NotificationDefSchema[a212_0x498e24(0x1fe)](),'connector_config':z[a212_0x498e24(0x1e7)](z['string'](),z[a212_0x498e24(0x1f9)]())['optional'](),'activation_template_id':z['string']()[a212_0x498e24(0x1fd)]()[a212_0x498e24(0x1fe)](),'behavior':ActivationBehaviorDefSchema[a212_0x498e24(0x1fd)]()[a212_0x498e24(0x1fe)](),'behaviors':ActivationBehaviorsDefSchema['optional'](),'run_after_journey_refresh':z['boolean']()[a212_0x498e24(0x1fe)](),'nested_workflow_project_name':z[a212_0x498e24(0x1e2)]()[a212_0x498e24(0x1fe)](),'nested_workflow_name':z[a212_0x498e24(0x1e2)]()['optional'](),'lock_enabled':z[a212_0x498e24(0x1ea)]()['optional']()})[a212_0x498e24(0x1ef)]((_0x454804,_0x593c7d)=>{const _0x4af99d=a212_0x498e24;_0x454804['behavior']!=null&&_0x454804['behaviors']!=null&&_0x593c7d['addIssue']({'code':_0x4af99d(0x206),'message':_0x4af99d(0x1e0),'path':[_0x4af99d(0x1e3)]});});
@@ -1 +1 @@
1
- (function(_0x282969,_0x58acd7){var _0x386635=a213_0x5a1b,_0x4fd4b2=_0x282969();while(!![]){try{var _0x652db5=-parseInt(_0x386635(0x10b))/0x1*(-parseInt(_0x386635(0x111))/0x2)+parseInt(_0x386635(0x10a))/0x3+parseInt(_0x386635(0x10c))/0x4+-parseInt(_0x386635(0x10e))/0x5*(parseInt(_0x386635(0x108))/0x6)+-parseInt(_0x386635(0x10d))/0x7*(parseInt(_0x386635(0x109))/0x8)+parseInt(_0x386635(0x10f))/0x9+-parseInt(_0x386635(0x107))/0xa*(-parseInt(_0x386635(0x110))/0xb);if(_0x652db5===_0x58acd7)break;else _0x4fd4b2['push'](_0x4fd4b2['shift']());}catch(_0x1276bc){_0x4fd4b2['push'](_0x4fd4b2['shift']());}}}(a213_0xd0a0,0x9582e));function a213_0x5a1b(_0x5ac76d,_0x5c147b){_0x5ac76d=_0x5ac76d-0x107;var _0xd0a059=a213_0xd0a0();var _0x5a1b47=_0xd0a059[_0x5ac76d];return _0x5a1b47;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a213_0xd0a0(){var _0x3dba8e=['2966FFJbzC','1231292dbAnVN','6335jrMnwj','71375HEhXyV','5676183RcLgFX','133177hmLrfC','424fSXtan','540UjCPFm','480ufpQIa','8968YBSDsl','1643469dHiYoS'];a213_0xd0a0=function(){return _0x3dba8e;};return a213_0xd0a0();}
1
+ function a213_0xf081(_0x40a98e,_0x48bac9){_0x40a98e=_0x40a98e-0x130;var _0x4a49e6=a213_0x4a49();var _0xf081f1=_0x4a49e6[_0x40a98e];return _0xf081f1;}(function(_0x175136,_0x101e4c){var _0x99363a=a213_0xf081,_0x52d10d=_0x175136();while(!![]){try{var _0x56c294=parseInt(_0x99363a(0x137))/0x1*(-parseInt(_0x99363a(0x136))/0x2)+parseInt(_0x99363a(0x134))/0x3+parseInt(_0x99363a(0x138))/0x4*(-parseInt(_0x99363a(0x139))/0x5)+-parseInt(_0x99363a(0x135))/0x6*(-parseInt(_0x99363a(0x13a))/0x7)+-parseInt(_0x99363a(0x132))/0x8*(parseInt(_0x99363a(0x130))/0x9)+parseInt(_0x99363a(0x13b))/0xa*(parseInt(_0x99363a(0x133))/0xb)+parseInt(_0x99363a(0x131))/0xc;if(_0x56c294===_0x101e4c)break;else _0x52d10d['push'](_0x52d10d['shift']());}catch(_0x1c5a23){_0x52d10d['push'](_0x52d10d['shift']());}}}(a213_0x4a49,0x3f403));function a213_0x4a49(){var _0xbb868c=['35245mlLzvJ','5720sDUeYR','4543839WfCrFz','7978740LViayp','8KNcgri','6589EDJmFD','766299xfOFhI','258zFPHqY','1004002PSZHoN','1NdFezP','61004nOgLQN','70GhWWLN'];a213_0x4a49=function(){return _0xbb868c;};return a213_0x4a49();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a214_0x3d4313=a214_0x374c;(function(_0x109a04,_0x5a93ad){const _0x2ecb54=a214_0x374c,_0x11ff28=_0x109a04();while(!![]){try{const _0x2ba4c4=parseInt(_0x2ecb54(0x111))/0x1*(parseInt(_0x2ecb54(0xf1))/0x2)+parseInt(_0x2ecb54(0x116))/0x3*(parseInt(_0x2ecb54(0x103))/0x4)+-parseInt(_0x2ecb54(0x109))/0x5+parseInt(_0x2ecb54(0x106))/0x6+parseInt(_0x2ecb54(0x107))/0x7*(parseInt(_0x2ecb54(0x113))/0x8)+-parseInt(_0x2ecb54(0x102))/0x9+parseInt(_0x2ecb54(0x10c))/0xa*(-parseInt(_0x2ecb54(0x114))/0xb);if(_0x2ba4c4===_0x5a93ad)break;else _0x11ff28['push'](_0x11ff28['shift']());}catch(_0x36c38e){_0x11ff28['push'](_0x11ff28['shift']());}}}(a214_0x48bf,0x9effb));function a214_0x48bf(){const _0x1b81a3=['4790514DpXstu','7RPphTt','reentry_always','1592710DdSNUR','object','filter','310GaZdGK','literal','array','no_reentry','min','23UHfmdT','decision_point','7473560bFDAgk','555258defkcA','length','3565308naudWy','end','launched','boolean','61084zpjuaL','ab_test','number','Journey\x20name\x20is\x20required','reentry_unless_goal_achieved','journeys','merge','enum','week','optional','refine','journey','lazy','day','wait','jump','record','9800073iTuTjg','4YJTDzO','activation','string'];a214_0x48bf=function(){return _0x1b81a3;};return a214_0x48bf();}import{z}from'zod';function a214_0x374c(_0x27b4f6,_0x31193f){_0x27b4f6=_0x27b4f6-0xf0;const _0x48bffa=a214_0x48bf();let _0x374cad=_0x48bffa[_0x27b4f6];return _0x374cad;}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a214_0x3d4313(0xf8)](['draft','simulation',a214_0x3d4313(0x118)]);export const ReentryModeTypeSchema=z[a214_0x3d4313(0xf8)]([a214_0x3d4313(0x10f),a214_0x3d4313(0xf5),a214_0x3d4313(0x108)]);export const WaitUnitTypeSchema=z['enum']([a214_0x3d4313(0xfe),a214_0x3d4313(0xf9)]);export const StepTypeValueSchema=z[a214_0x3d4313(0xf8)]([a214_0x3d4313(0xff),a214_0x3d4313(0x104),a214_0x3d4313(0x112),a214_0x3d4313(0xf2),a214_0x3d4313(0xf7),a214_0x3d4313(0x100),a214_0x3d4313(0x117)]);export const EmbeddedSegmentDefSchema=z[a214_0x3d4313(0x10a)]({'description':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a214_0x3d4313(0x10a)]({'journey':z[a214_0x3d4313(0x105)](),'stage':z[a214_0x3d4313(0x105)](),'bundle_id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()});export const CriteriaDefSchema=z[a214_0x3d4313(0x10a)]({'name':z[a214_0x3d4313(0x105)](),'description':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'segment':z[a214_0x3d4313(0x105)](),'target':JumpTargetDefSchema[a214_0x3d4313(0xfa)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a214_0x3d4313(0xf3)](),'unit':WaitUnitTypeSchema,'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()}),WaitConditionDefSchema=z[a214_0x3d4313(0x10a)]({'segment':z[a214_0x3d4313(0x105)](),'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a214_0x3d4313(0x10a)]({'duration':z[a214_0x3d4313(0xf3)]()[a214_0x3d4313(0xfa)](),'unit':WaitUnitTypeSchema[a214_0x3d4313(0xfa)](),'wait_until':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'condition':WaitConditionDefSchema[a214_0x3d4313(0xfa)](),'days_of_week':z[a214_0x3d4313(0x10e)](z[a214_0x3d4313(0x105)]())[a214_0x3d4313(0xfa)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'next':z['string']()[a214_0x3d4313(0xfa)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a214_0x3d4313(0xff)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a214_0x3d4313(0x105)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a214_0x3d4313(0x10a)]({'name':z[a214_0x3d4313(0x105)](),'segment':z['string']()['optional'](),'segment_id':z['string']()['optional'](),'excluded':z[a214_0x3d4313(0xf0)]()[a214_0x3d4313(0xfa)](),'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()}),DecisionPointStepParamsDefSchema=z[a214_0x3d4313(0x10a)]({'branches':z[a214_0x3d4313(0x10e)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a214_0x3d4313(0x10a)]({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)](a214_0x3d4313(0x112)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a214_0x3d4313(0x10a)]({'id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'name':z['string'](),'percentage':z[a214_0x3d4313(0xf3)](),'next':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a214_0x3d4313(0x10e)](AbTestVariantDefSchema),'unique_id':z['string']()[a214_0x3d4313(0xfa)](),'customized_split':z[a214_0x3d4313(0xf0)]()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)](a214_0x3d4313(0xf2)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)]('merge')}),JumpStepParamsDefSchema=z[a214_0x3d4313(0x10a)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a214_0x3d4313(0x10a)]({...StepBaseFields,'type':z['literal'](a214_0x3d4313(0x100)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x3d4313(0x10d)](a214_0x3d4313(0x117))})['passthrough']();export const StepDefSchema=z['discriminatedUnion']('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a214_0x3d4313(0x105)](),'description':z[a214_0x3d4313(0x105)]()['optional'](),'id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'entry_criteria':CriteriaDefSchema[a214_0x3d4313(0xfa)](),'exit_criteria':z[a214_0x3d4313(0x10e)](CriteriaDefSchema)[a214_0x3d4313(0xfa)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'steps':z[a214_0x3d4313(0x10e)](StepDefSchema)[a214_0x3d4313(0xfa)]()});export const JourneyEntryDefSchema=z['object']({'name':z['string']()['optional'](),'version':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'state':JourneyStateTypeSchema[a214_0x3d4313(0xfa)](),'latest':z[a214_0x3d4313(0xf0)]()[a214_0x3d4313(0xfa)](),'stages':z['array'](StageDefSchema),'id':z[a214_0x3d4313(0x105)]()['optional'](),'version_number':z[a214_0x3d4313(0xf3)]()[a214_0x3d4313(0xfa)](),'goal':CriteriaDefSchema[a214_0x3d4313(0xfa)](),'reentry':ReentryModeTypeSchema[a214_0x3d4313(0xfa)]()});export const JourneyDefSchema=z[a214_0x3d4313(0xfd)](()=>z[a214_0x3d4313(0x10a)]({'type':z['literal'](a214_0x3d4313(0xfc)),'name':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0x110)](0x1,a214_0x3d4313(0xf4)),'description':z['string']()[a214_0x3d4313(0xfa)](),'bundle_id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'bundle_name':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'folder_id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'reentry':ReentryModeTypeSchema[a214_0x3d4313(0xfa)](),'allow_reentry':z['boolean']()[a214_0x3d4313(0xfa)](),'goal':CriteriaDefSchema[a214_0x3d4313(0xfa)](),'id':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'version':z[a214_0x3d4313(0x105)]()[a214_0x3d4313(0xfa)](),'version_number':z['number']()[a214_0x3d4313(0xfa)](),'stages':z[a214_0x3d4313(0x10e)](StageDefSchema)['optional'](),'versions':z[a214_0x3d4313(0x10e)](JourneyEntryDefSchema)[a214_0x3d4313(0xfa)](),'journeys':z[a214_0x3d4313(0x10e)](JourneyEntryDefSchema)[a214_0x3d4313(0xfa)](),'segments':z['record'](z[a214_0x3d4313(0x105)](),EmbeddedSegmentDefSchema)[a214_0x3d4313(0xfa)](),'activations':z[a214_0x3d4313(0x101)](z[a214_0x3d4313(0x105)](),ActivationDefSchema)[a214_0x3d4313(0xfa)]()})[a214_0x3d4313(0xfb)](_0x1e7bfd=>{const _0x33c1bb=a214_0x3d4313,_0x3d9af6=[_0x1e7bfd[_0x33c1bb(0xf6)],_0x1e7bfd['stages'],_0x1e7bfd['versions']][_0x33c1bb(0x10b)](_0x158357=>Array['isArray'](_0x158357)&&_0x158357['length']>0x0)[_0x33c1bb(0x115)];return _0x3d9af6===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ function a214_0x35ed(_0x26e9b5,_0x4e219c){_0x26e9b5=_0x26e9b5-0x92;const _0x1b6a7e=a214_0x1b6a();let _0x35edc3=_0x1b6a7e[_0x26e9b5];return _0x35edc3;}const a214_0x5e0a3a=a214_0x35ed;(function(_0x2b9c2b,_0x329005){const _0x491a54=a214_0x35ed,_0x55f117=_0x2b9c2b();while(!![]){try{const _0x3b7b3c=parseInt(_0x491a54(0x96))/0x1*(parseInt(_0x491a54(0x9f))/0x2)+-parseInt(_0x491a54(0x99))/0x3+-parseInt(_0x491a54(0xaf))/0x4*(-parseInt(_0x491a54(0x94))/0x5)+-parseInt(_0x491a54(0xa2))/0x6+parseInt(_0x491a54(0x93))/0x7*(-parseInt(_0x491a54(0xa7))/0x8)+-parseInt(_0x491a54(0x97))/0x9*(parseInt(_0x491a54(0xb6))/0xa)+-parseInt(_0x491a54(0xa3))/0xb*(-parseInt(_0x491a54(0xb3))/0xc);if(_0x3b7b3c===_0x329005)break;else _0x55f117['push'](_0x55f117['shift']());}catch(_0xf5575){_0x55f117['push'](_0x55f117['shift']());}}}(a214_0x1b6a,0x250eb));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a214_0x5e0a3a(0xb8)]([a214_0x5e0a3a(0x9b),a214_0x5e0a3a(0xac),'launched']);export const ReentryModeTypeSchema=z[a214_0x5e0a3a(0xb8)]([a214_0x5e0a3a(0xb4),'reentry_unless_goal_achieved',a214_0x5e0a3a(0x98)]);export const WaitUnitTypeSchema=z[a214_0x5e0a3a(0xb8)](['day','week']);function a214_0x1b6a(){const _0x47e932=['optional','discriminatedUnion','2749752sQSfFw','no_reentry','record','2860QmlEvj','array','enum','type','min','length','2660EeCrpR','97705UcHSFQ','jump','6700kJxkTf','2655iuiMlS','reentry_always','220947uoYyuK','string','draft','refine','number','end','38hPFjSK','ab_test','literal','514020wTtujH','22aJRAfK','isArray','versions','passthrough','5648ZbPoTr','Journey\x20name\x20is\x20required','merge','object','decision_point','simulation','journey','activation','16dzJcvy','boolean'];a214_0x1b6a=function(){return _0x47e932;};return a214_0x1b6a();}export const StepTypeValueSchema=z['enum'](['wait',a214_0x5e0a3a(0xae),a214_0x5e0a3a(0xab),'ab_test',a214_0x5e0a3a(0xa9),a214_0x5e0a3a(0x95),a214_0x5e0a3a(0x9e)]);export const EmbeddedSegmentDefSchema=z[a214_0x5e0a3a(0xaa)]({'description':z['string']()[a214_0x5e0a3a(0xb1)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a214_0x5e0a3a(0xaa)]({'journey':z[a214_0x5e0a3a(0x9a)](),'stage':z[a214_0x5e0a3a(0x9a)](),'bundle_id':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)]()});export const CriteriaDefSchema=z[a214_0x5e0a3a(0xaa)]({'name':z['string'](),'description':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'segment':z[a214_0x5e0a3a(0x9a)](),'target':JumpTargetDefSchema[a214_0x5e0a3a(0xb1)]()});const WaitConditionTimeoutDefSchema=z[a214_0x5e0a3a(0xaa)]({'duration':z[a214_0x5e0a3a(0x9d)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a214_0x5e0a3a(0xb1)]()}),WaitConditionDefSchema=z[a214_0x5e0a3a(0xaa)]({'segment':z['string'](),'next':z[a214_0x5e0a3a(0x9a)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a214_0x5e0a3a(0xb1)]()}),WaitStepParamsDefSchema=z[a214_0x5e0a3a(0xaa)]({'duration':z[a214_0x5e0a3a(0x9d)]()[a214_0x5e0a3a(0xb1)](),'unit':WaitUnitTypeSchema[a214_0x5e0a3a(0xb1)](),'wait_until':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'condition':WaitConditionDefSchema[a214_0x5e0a3a(0xb1)](),'days_of_week':z[a214_0x5e0a3a(0xb7)](z[a214_0x5e0a3a(0x9a)]())[a214_0x5e0a3a(0xb1)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'next':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)]()},WaitStepDefSchema=z[a214_0x5e0a3a(0xaa)]({...StepBaseFields,'type':z[a214_0x5e0a3a(0xa1)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a214_0x5e0a3a(0xaa)]({'activation':z[a214_0x5e0a3a(0x9a)]()}),ActivationStepDefSchema=z[a214_0x5e0a3a(0xaa)]({...StepBaseFields,'type':z[a214_0x5e0a3a(0xa1)](a214_0x5e0a3a(0xae)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a214_0x5e0a3a(0xaa)]({'name':z[a214_0x5e0a3a(0x9a)](),'segment':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'segment_id':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'excluded':z[a214_0x5e0a3a(0xb0)]()['optional'](),'next':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)]()}),DecisionPointStepParamsDefSchema=z[a214_0x5e0a3a(0xaa)]({'branches':z[a214_0x5e0a3a(0xb7)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x5e0a3a(0xa1)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a214_0x5e0a3a(0xaa)]({'id':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'name':z[a214_0x5e0a3a(0x9a)](),'percentage':z[a214_0x5e0a3a(0x9d)](),'next':z[a214_0x5e0a3a(0x9a)]()['optional']()}),AbTestStepParamsDefSchema=z[a214_0x5e0a3a(0xaa)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a214_0x5e0a3a(0xb1)](),'customized_split':z[a214_0x5e0a3a(0xb0)]()['optional']()}),AbTestStepDefSchema=z[a214_0x5e0a3a(0xaa)]({...StepBaseFields,'type':z[a214_0x5e0a3a(0xa1)](a214_0x5e0a3a(0xa0)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a214_0x5e0a3a(0xaa)]({...StepBaseFields,'type':z['literal']('merge')}),JumpStepParamsDefSchema=z[a214_0x5e0a3a(0xaa)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a214_0x5e0a3a(0x95)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a214_0x5e0a3a(0xa1)](a214_0x5e0a3a(0x9e))})[a214_0x5e0a3a(0xa6)]();export const StepDefSchema=z[a214_0x5e0a3a(0xb2)](a214_0x5e0a3a(0xb9),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a214_0x5e0a3a(0x9a)](),'description':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'id':z['string']()[a214_0x5e0a3a(0xb1)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a214_0x5e0a3a(0xb7)](CriteriaDefSchema)[a214_0x5e0a3a(0xb1)](),'milestone':CriteriaDefSchema[a214_0x5e0a3a(0xb1)](),'root_step':z[a214_0x5e0a3a(0x9a)]()['optional'](),'steps':z[a214_0x5e0a3a(0xb7)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a214_0x5e0a3a(0xaa)]({'name':z[a214_0x5e0a3a(0x9a)]()['optional'](),'version':z['string']()[a214_0x5e0a3a(0xb1)](),'state':JourneyStateTypeSchema[a214_0x5e0a3a(0xb1)](),'latest':z[a214_0x5e0a3a(0xb0)]()[a214_0x5e0a3a(0xb1)](),'stages':z[a214_0x5e0a3a(0xb7)](StageDefSchema),'id':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'version_number':z[a214_0x5e0a3a(0x9d)]()['optional'](),'goal':CriteriaDefSchema[a214_0x5e0a3a(0xb1)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z['lazy'](()=>z[a214_0x5e0a3a(0xaa)]({'type':z[a214_0x5e0a3a(0xa1)](a214_0x5e0a3a(0xad)),'name':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xba)](0x1,a214_0x5e0a3a(0xa8)),'description':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'bundle_id':z['string']()['optional'](),'bundle_name':z['string']()['optional'](),'folder_id':z['string']()['optional'](),'reentry':ReentryModeTypeSchema[a214_0x5e0a3a(0xb1)](),'allow_reentry':z[a214_0x5e0a3a(0xb0)]()[a214_0x5e0a3a(0xb1)](),'goal':CriteriaDefSchema[a214_0x5e0a3a(0xb1)](),'id':z['string']()[a214_0x5e0a3a(0xb1)](),'version':z[a214_0x5e0a3a(0x9a)]()[a214_0x5e0a3a(0xb1)](),'version_number':z[a214_0x5e0a3a(0x9d)]()[a214_0x5e0a3a(0xb1)](),'stages':z[a214_0x5e0a3a(0xb7)](StageDefSchema)[a214_0x5e0a3a(0xb1)](),'versions':z[a214_0x5e0a3a(0xb7)](JourneyEntryDefSchema)['optional'](),'journeys':z['array'](JourneyEntryDefSchema)[a214_0x5e0a3a(0xb1)](),'segments':z[a214_0x5e0a3a(0xb5)](z['string'](),EmbeddedSegmentDefSchema)[a214_0x5e0a3a(0xb1)](),'activations':z[a214_0x5e0a3a(0xb5)](z['string'](),ActivationDefSchema)[a214_0x5e0a3a(0xb1)]()})[a214_0x5e0a3a(0x9c)](_0x34c05b=>{const _0x294938=a214_0x5e0a3a,_0x1bf692=[_0x34c05b['journeys'],_0x34c05b['stages'],_0x34c05b[_0x294938(0xa5)]]['filter'](_0x4a80ff=>Array[_0x294938(0xa4)](_0x4a80ff)&&_0x4a80ff[_0x294938(0x92)]>0x0)[_0x294938(0x92)];return _0x1bf692===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x1672b0,_0x2ae6b4){var _0x399f56=a216_0x1483,_0xef0f29=_0x1672b0();while(!![]){try{var _0x59e733=parseInt(_0x399f56(0x1c0))/0x1+parseInt(_0x399f56(0x1c6))/0x2+parseInt(_0x399f56(0x1c1))/0x3*(parseInt(_0x399f56(0x1c7))/0x4)+parseInt(_0x399f56(0x1c4))/0x5+parseInt(_0x399f56(0x1c2))/0x6+-parseInt(_0x399f56(0x1c5))/0x7*(-parseInt(_0x399f56(0x1be))/0x8)+parseInt(_0x399f56(0x1c3))/0x9*(-parseInt(_0x399f56(0x1bf))/0xa);if(_0x59e733===_0x2ae6b4)break;else _0xef0f29['push'](_0xef0f29['shift']());}catch(_0x35ed31){_0xef0f29['push'](_0xef0f29['shift']());}}}(a216_0x5882,0x6defa));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a216_0x1483(_0x493a96,_0x1fa47e){_0x493a96=_0x493a96-0x1be;var _0x5882ad=a216_0x5882();var _0x14838e=_0x5882ad[_0x493a96];return _0x14838e;}function a216_0x5882(){var _0x102bfe=['18SxhnXv','694134QhgNhv','9081333LVUkio','2397425JWZmcn','307993SZyRng','5572gxezsH','291436wnvDOE','8tCNrzW','10rrHqxV','380222aZPoOT'];a216_0x5882=function(){return _0x102bfe;};return a216_0x5882();}
1
+ (function(_0x4711fa,_0x6ac1f){var _0x50e1e7=a216_0x2549,_0x145e36=_0x4711fa();while(!![]){try{var _0x5029b6=parseInt(_0x50e1e7(0x197))/0x1+parseInt(_0x50e1e7(0x194))/0x2*(-parseInt(_0x50e1e7(0x192))/0x3)+parseInt(_0x50e1e7(0x196))/0x4*(parseInt(_0x50e1e7(0x19a))/0x5)+-parseInt(_0x50e1e7(0x198))/0x6+-parseInt(_0x50e1e7(0x199))/0x7*(-parseInt(_0x50e1e7(0x193))/0x8)+parseInt(_0x50e1e7(0x19b))/0x9+-parseInt(_0x50e1e7(0x195))/0xa;if(_0x5029b6===_0x6ac1f)break;else _0x145e36['push'](_0x145e36['shift']());}catch(_0x5ba09d){_0x145e36['push'](_0x145e36['shift']());}}}(a216_0x1c75,0x217cf));function a216_0x1c75(){var _0x4e633f=['2821iNfOtR','67805jTLuCy','1939923GRzbyv','99eGeIHN','2792mdIPRe','16034SiKFRl','4081430sQNYMH','72OMVMXU','237325sUngHy','166476qROZlt'];a216_0x1c75=function(){return _0x4e633f;};return a216_0x1c75();}function a216_0x2549(_0x5dc22c,_0x30f6f7){_0x5dc22c=_0x5dc22c-0x192;var _0x1c75eb=a216_0x1c75();var _0x254999=_0x1c75eb[_0x5dc22c];return _0x254999;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a217_0x928108=a217_0x5404;(function(_0x56f975,_0x473e45){const _0x5e19f9=a217_0x5404,_0x39a7e9=_0x56f975();while(!![]){try{const _0x49cb7a=-parseInt(_0x5e19f9(0x146))/0x1*(parseInt(_0x5e19f9(0x153))/0x2)+parseInt(_0x5e19f9(0x165))/0x3+-parseInt(_0x5e19f9(0x156))/0x4+parseInt(_0x5e19f9(0x12d))/0x5*(parseInt(_0x5e19f9(0x173))/0x6)+parseInt(_0x5e19f9(0x14c))/0x7+-parseInt(_0x5e19f9(0x12a))/0x8*(parseInt(_0x5e19f9(0x162))/0x9)+-parseInt(_0x5e19f9(0x16a))/0xa;if(_0x49cb7a===_0x473e45)break;else _0x39a7e9['push'](_0x39a7e9['shift']());}catch(_0x50d7be){_0x39a7e9['push'](_0x39a7e9['shift']());}}}(a217_0x7b72,0x58433));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z['enum']([a217_0x928108(0x169),a217_0x928108(0x130),a217_0x928108(0x13e),a217_0x928108(0x141),a217_0x928108(0x135),'In',a217_0x928108(0x166),'Regexp','IsNull',a217_0x928108(0x124),'TimeWithinNext',a217_0x928108(0x15d),a217_0x928108(0x143),a217_0x928108(0x131),a217_0x928108(0x154)]);export const TimeUnitSchema=z[a217_0x928108(0x144)]([a217_0x928108(0x136),a217_0x928108(0x139),a217_0x928108(0x158),'day',a217_0x928108(0x16b),a217_0x928108(0x170),a217_0x928108(0x168)]);export const AggregationTypeSchema=z[a217_0x928108(0x144)]([a217_0x928108(0x14e),'Sum','Average',a217_0x928108(0x16c),'Max','CountDistinct','First','Last']);const TemporalValueSchema=z['union']([z[a217_0x928108(0x133)]({'timestamp':z[a217_0x928108(0x13f)]()}),z[a217_0x928108(0x133)]({'last':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z[a217_0x928108(0x149)](z[a217_0x928108(0x13f)](),z[a217_0x928108(0x14b)]())]),'unit':z[a217_0x928108(0x13f)]()})]),OperatorValueSchema=z[a217_0x928108(0x127)]([z[a217_0x928108(0x13f)](),z[a217_0x928108(0x14b)](),z[a217_0x928108(0x128)](),TemporalValueSchema,z['array'](z[a217_0x928108(0x127)]([z[a217_0x928108(0x13f)](),z['number'](),z[a217_0x928108(0x128)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a217_0x928108(0x130),a217_0x928108(0x141),a217_0x928108(0x13e),a217_0x928108(0x135),'In',a217_0x928108(0x15d),a217_0x928108(0x143),a217_0x928108(0x131),a217_0x928108(0x138),'TimeWithinPast',a217_0x928108(0x142)]),OPERATORS_REQUIRING_UNIT=new Set([a217_0x928108(0x124),a217_0x928108(0x142)]);export const OperatorDefSchema=z[a217_0x928108(0x133)]({'type':OperatorTypeSchema,'not':z['boolean']()['optional'](),'value':OperatorValueSchema[a217_0x928108(0x14d)](),'min':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z['string'](),TemporalValueSchema])['optional'](),'max':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z[a217_0x928108(0x13f)](),TemporalValueSchema])[a217_0x928108(0x14d)](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'week':z[a217_0x928108(0x14b)]()['optional'](),'month':z['number']()[a217_0x928108(0x14d)](),'year':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'hour':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'minute':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)](),'second':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)]()})[a217_0x928108(0x14d)](),'from':z[a217_0x928108(0x133)]({'last':z[a217_0x928108(0x127)]([z[a217_0x928108(0x14b)](),z[a217_0x928108(0x13f)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)]()})[a217_0x928108(0x137)]((_0x45205f,_0x2c4824)=>{const _0x1dd15b=a217_0x928108;OPERATORS_REQUIRING_VALUE[_0x1dd15b(0x12b)](_0x45205f[_0x1dd15b(0x15e)])&&(_0x45205f[_0x1dd15b(0x122)]===undefined||_0x45205f['value']===null)&&_0x2c4824['addIssue']({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x15a)+_0x45205f['type']+_0x1dd15b(0x12e),'path':['value']}),_0x45205f[_0x1dd15b(0x15e)]==='Between'&&_0x45205f[_0x1dd15b(0x14a)]===undefined&&_0x45205f['max']===undefined&&_0x2c4824[_0x1dd15b(0x151)]({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x12c),'params':{'validationCode':_0x1dd15b(0x140)}}),OPERATORS_REQUIRING_UNIT[_0x1dd15b(0x12b)](_0x45205f['type'])&&_0x45205f[_0x1dd15b(0x122)]!==undefined&&!_0x45205f[_0x1dd15b(0x13a)]&&_0x2c4824[_0x1dd15b(0x151)]({'code':'custom','message':_0x1dd15b(0x15a)+_0x45205f[_0x1dd15b(0x15e)]+_0x1dd15b(0x13c),'path':[_0x1dd15b(0x13a)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x45205f[_0x1dd15b(0x15e)]==='TimeRange'&&(!_0x45205f[_0x1dd15b(0x13b)]&&_0x2c4824[_0x1dd15b(0x151)]({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x150),'path':['duration']}),!_0x45205f[_0x1dd15b(0x160)]&&_0x2c4824[_0x1dd15b(0x151)]({'code':_0x1dd15b(0x134),'message':_0x1dd15b(0x12f),'path':[_0x1dd15b(0x160)]}));});export const ArrayMatchingSchema=z[a217_0x928108(0x127)]([z['literal'](a217_0x928108(0x16d)),z[a217_0x928108(0x126)](a217_0x928108(0x155)),z[a217_0x928108(0x133)]({'atLeast':z[a217_0x928108(0x14b)]()}),z[a217_0x928108(0x133)]({'atMost':z[a217_0x928108(0x14b)]()}),z['object']({'exactly':z[a217_0x928108(0x14b)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a217_0x928108(0x15e),[z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)]([a217_0x928108(0x172),a217_0x928108(0x16c),'Max',a217_0x928108(0x16e)]),'column':z[a217_0x928108(0x13f)](),'groupingColumns':z[a217_0x928108(0x123)](z[a217_0x928108(0x13f)]())[a217_0x928108(0x14d)]()}),z[a217_0x928108(0x133)]({'type':z['literal'](a217_0x928108(0x14e)),'groupingColumns':z[a217_0x928108(0x123)](z[a217_0x928108(0x13f)]())[a217_0x928108(0x14d)]()}),z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x145)),'columns':z['array'](z[a217_0x928108(0x13f)]())}),z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)]([a217_0x928108(0x157),'Last']),'column':z[a217_0x928108(0x13f)](),'orderColumn':z['string'](),'groupingColumns':z[a217_0x928108(0x123)](z[a217_0x928108(0x13f)]())['optional']()})]);export const TimeWindowDefSchema=z[a217_0x928108(0x133)]({'duration':z[a217_0x928108(0x14b)](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set(['TimeWithinPast',a217_0x928108(0x142),'TimeRange']),TIMESTAMP_COMPARISON_OPERATORS=new Set([a217_0x928108(0x169),a217_0x928108(0x130),a217_0x928108(0x141),a217_0x928108(0x13e),a217_0x928108(0x135),'Between']),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function a217_0x5404(_0x3f63c6,_0x3c356d){_0x3f63c6=_0x3f63c6-0x122;const _0x7b727f=a217_0x7b72();let _0x540453=_0x7b727f[_0x3f63c6];return _0x540453;}function isTemporalValueShape(_0x1a222c){const _0x36050b=a217_0x928108;return typeof _0x1a222c==='object'&&_0x1a222c!==null&&!Array['isArray'](_0x1a222c)&&(_0x36050b(0x132)in _0x1a222c||_0x36050b(0x148)in _0x1a222c);}export const FilterColumnConditionDefSchema=z['object']({'type':z[a217_0x928108(0x126)](a217_0x928108(0x152)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x928108(0x14d)]()})['superRefine']((_0x2a9d48,_0x11cef2)=>{const _0x308d60=a217_0x928108,_0x9aee33=_0x2a9d48['operator'][_0x308d60(0x15e)];if(_0x2a9d48[_0x308d60(0x167)]===_0x308d60(0x132)){if(!TIMESTAMP_OPERATORS[_0x308d60(0x12b)](_0x9aee33)){_0x11cef2[_0x308d60(0x151)]({'code':'custom','message':'Timestamp\x20column\x20only\x20supports\x20'+[...TIMESTAMP_OPERATORS]['join'](',\x20')+'\x20operators\x20(got\x20\x27'+_0x9aee33+'\x27)','path':[_0x308d60(0x15c),_0x308d60(0x15e)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS['has'](_0x9aee33)){const _0xee314d=_0x9aee33===_0x308d60(0x166)?[_0x2a9d48[_0x308d60(0x15c)][_0x308d60(0x14a)],_0x2a9d48['operator'][_0x308d60(0x129)]]['every'](_0x519b05=>_0x519b05===undefined||isTemporalValueShape(_0x519b05)):_0x2a9d48[_0x308d60(0x15c)][_0x308d60(0x122)]===undefined||isTemporalValueShape(_0x2a9d48['operator'][_0x308d60(0x122)]);!_0xee314d&&_0x11cef2['addIssue']({'code':_0x308d60(0x134),'message':_0x308d60(0x15f)+_0x9aee33+_0x308d60(0x16f),'path':[_0x308d60(0x15c)]});}}});export const FilterRuleDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x163)),'conditions':z[a217_0x928108(0x123)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a217_0x928108(0x147)](()=>z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x161)),'attribute':z[a217_0x928108(0x13f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x928108(0x14d)](),'exclude':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)](),'aggregation':AggregationDefSchema[a217_0x928108(0x14d)](),'source':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'filter':FilterRuleDefSchema[a217_0x928108(0x14d)](),'limit':z['number']()[a217_0x928108(0x14d)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x14f)),'attribute':z[a217_0x928108(0x13f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)](),'aggregation':AggregationDefSchema[a217_0x928108(0x14d)](),'source':z['string']()[a217_0x928108(0x14d)](),'filter':FilterRuleDefSchema[a217_0x928108(0x14d)](),'timeWindow':TimeWindowDefSchema[a217_0x928108(0x14d)](),'limit':z[a217_0x928108(0x14b)]()[a217_0x928108(0x14d)]()}));export const ColumnConditionDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a217_0x928108(0x147)](()=>z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)]([a217_0x928108(0x163),'Or',a217_0x928108(0x159)]),'conditions':z['array'](ConditionDefSchema),'description':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'expr':z['string']()[a217_0x928108(0x14d)]()}));export const SegmentRefConditionDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x144)](['include',a217_0x928108(0x13d)]),'segment':z['string']()[a217_0x928108(0x14a)](0x1,a217_0x928108(0x125))});export const ConditionDefSchema=z['lazy'](()=>z[a217_0x928108(0x127)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));function a217_0x7b72(){const _0x591aee=['array','TimeWithinPast','Segment\x20reference\x20must\x20not\x20be\x20empty','literal','union','boolean','max','24MzboUT','has','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','5NvHwzg','\x27\x20requires\x20a\x20value','TimeRange\x20operator\x20requires\x20\x27from\x27','Greater','EndWith','timestamp','object','custom','LessEqual','second','superRefine','Regexp','minute','unit','duration','\x27\x20requires\x20a\x20time\x20unit','exclude','Less','string','MISSING_BETWEEN_BOUNDS','GreaterEqual','TimeWithinNext','StartWith','enum','CountDistinct','2yZaDch','lazy','last','record','min','number','4980577vzmWgG','optional','Count','Behavior','TimeRange\x20operator\x20requires\x20\x27duration\x27','addIssue','Column','125338sgPjNq','TimeRange','all','38984wpqehk','First','hour','Composite','Operator\x20\x27','realtime','operator','Contain','type','Timestamp\x20column\x27s\x20\x27','from','Value','1515627oXrygQ','And','segment','1826322ICdYLK','Between','column','year','Equal','5123970TZuFIX','week','Min','any','Average','\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','month','batch','Sum','1163568pcHzQL','value'];a217_0x7b72=function(){return _0x591aee;};return a217_0x7b72();}export const RuleDefSchema=z[a217_0x928108(0x147)](()=>z[a217_0x928108(0x133)]({'type':z['enum'](['And','Or',a217_0x928108(0x159)]),'conditions':z[a217_0x928108(0x123)](ConditionDefSchema),'description':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'expr':z[a217_0x928108(0x13f)]()['optional']()}));export const SegmentDefSchema=z[a217_0x928108(0x133)]({'type':z[a217_0x928108(0x126)](a217_0x928108(0x164))[a217_0x928108(0x14d)](),'name':z[a217_0x928108(0x13f)]()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'folder':z[a217_0x928108(0x13f)]()[a217_0x928108(0x14d)](),'rule':RuleDefSchema[a217_0x928108(0x14d)](),'kind':z[a217_0x928108(0x144)]([a217_0x928108(0x171),a217_0x928108(0x15b),'funnel_stage'])[a217_0x928108(0x14d)](),'visible':z[a217_0x928108(0x128)]()[a217_0x928108(0x14d)](),'activations':z[a217_0x928108(0x123)](ActivationDefSchema)['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a217_0x54a02c=a217_0x559f;(function(_0x17d897,_0x17d223){const _0x598155=a217_0x559f,_0xc03425=_0x17d897();while(!![]){try{const _0x32fb1d=parseInt(_0x598155(0x213))/0x1+-parseInt(_0x598155(0x1e2))/0x2*(parseInt(_0x598155(0x216))/0x3)+-parseInt(_0x598155(0x210))/0x4*(parseInt(_0x598155(0x1da))/0x5)+-parseInt(_0x598155(0x20b))/0x6+-parseInt(_0x598155(0x1d6))/0x7*(-parseInt(_0x598155(0x1cf))/0x8)+-parseInt(_0x598155(0x1de))/0x9*(parseInt(_0x598155(0x1ee))/0xa)+parseInt(_0x598155(0x212))/0xb;if(_0x32fb1d===_0x17d223)break;else _0xc03425['push'](_0xc03425['shift']());}catch(_0xc883e8){_0xc03425['push'](_0xc03425['shift']());}}}(a217_0x1b35,0x8936f));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a217_0x54a02c(0x1f3)]([a217_0x54a02c(0x1c7),a217_0x54a02c(0x1ef),a217_0x54a02c(0x207),'GreaterEqual',a217_0x54a02c(0x1e8),'In',a217_0x54a02c(0x1f4),a217_0x54a02c(0x1f9),a217_0x54a02c(0x206),a217_0x54a02c(0x1d9),a217_0x54a02c(0x1eb),a217_0x54a02c(0x1ce),a217_0x54a02c(0x211),a217_0x54a02c(0x1fb),'TimeRange']);function a217_0x1b35(){const _0x449de8=['week','Composite','First','Equal','boolean','value','Behavior','Timestamp\x20column\x20only\x20supports\x20','literal','TimeRange','Contain','3508184kqOocn','Last','from','superRefine','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Segment\x20reference\x20must\x20not\x20be\x20empty','Min','7AmclSN','And','number','TimeWithinPast','10fhmJdu','batch','custom','last','9gBAKdw','Sum','every','realtime','2oPqxRw','month','record','Operator\x20\x27','isArray','max','LessEqual','all','Count','TimeWithinNext','day','Value','4104530Rlgacq','Greater','year','exclude','join','enum','Between','discriminatedUnion','has','funnel_stage','minute','Regexp','object','EndWith','timestamp','Column','include','lazy','operator','duration','Average','union','type','addIssue','IsNull','Less','hour','Max','MISSING_TIME_UNIT','4351896mWFXuf','min','array','CountDistinct','string','2155748UhPWif','StartWith','20436108pOumFV','531134DDKoGz','unit','optional','155433IQfoxc','\x27\x20requires\x20a\x20time\x20unit'];a217_0x1b35=function(){return _0x449de8;};return a217_0x1b35();}export const TimeUnitSchema=z[a217_0x54a02c(0x1f3)](['second',a217_0x54a02c(0x1f8),a217_0x54a02c(0x208),a217_0x54a02c(0x1ec),a217_0x54a02c(0x1c4),a217_0x54a02c(0x1e3),a217_0x54a02c(0x1f0)]);export const AggregationTypeSchema=z[a217_0x54a02c(0x1f3)]([a217_0x54a02c(0x1ea),a217_0x54a02c(0x1df),a217_0x54a02c(0x202),a217_0x54a02c(0x1d5),a217_0x54a02c(0x209),a217_0x54a02c(0x20e),a217_0x54a02c(0x1c6),a217_0x54a02c(0x1d0)]);const TemporalValueSchema=z[a217_0x54a02c(0x203)]([z[a217_0x54a02c(0x1fa)]({'timestamp':z[a217_0x54a02c(0x20f)]()}),z[a217_0x54a02c(0x1fa)]({'last':z[a217_0x54a02c(0x203)]([z[a217_0x54a02c(0x1d8)](),z[a217_0x54a02c(0x1e4)](z[a217_0x54a02c(0x20f)](),z['number']())]),'unit':z[a217_0x54a02c(0x20f)]()})]),OperatorValueSchema=z[a217_0x54a02c(0x203)]([z[a217_0x54a02c(0x20f)](),z['number'](),z['boolean'](),TemporalValueSchema,z['array'](z[a217_0x54a02c(0x203)]([z['string'](),z[a217_0x54a02c(0x1d8)](),z[a217_0x54a02c(0x1c8)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a217_0x54a02c(0x1ef),'GreaterEqual',a217_0x54a02c(0x207),'LessEqual','In','Contain','StartWith',a217_0x54a02c(0x1fb),a217_0x54a02c(0x1f9),a217_0x54a02c(0x1d9),a217_0x54a02c(0x1eb)]),OPERATORS_REQUIRING_UNIT=new Set([a217_0x54a02c(0x1d9),'TimeWithinNext']);function a217_0x559f(_0x3ac498,_0x424c34){_0x3ac498=_0x3ac498-0x1c4;const _0x1b351c=a217_0x1b35();let _0x559fc2=_0x1b351c[_0x3ac498];return _0x559fc2;}export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a217_0x54a02c(0x1c8)]()[a217_0x54a02c(0x215)](),'value':OperatorValueSchema[a217_0x54a02c(0x215)](),'min':z[a217_0x54a02c(0x203)]([z[a217_0x54a02c(0x1d8)](),z[a217_0x54a02c(0x20f)](),TemporalValueSchema])[a217_0x54a02c(0x215)](),'max':z['union']([z[a217_0x54a02c(0x1d8)](),z[a217_0x54a02c(0x20f)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z[a217_0x54a02c(0x1fa)]({'day':z[a217_0x54a02c(0x1d8)]()[a217_0x54a02c(0x215)](),'week':z[a217_0x54a02c(0x1d8)]()[a217_0x54a02c(0x215)](),'month':z[a217_0x54a02c(0x1d8)]()[a217_0x54a02c(0x215)](),'year':z['number']()[a217_0x54a02c(0x215)](),'hour':z[a217_0x54a02c(0x1d8)]()[a217_0x54a02c(0x215)](),'minute':z[a217_0x54a02c(0x1d8)]()[a217_0x54a02c(0x215)](),'second':z[a217_0x54a02c(0x1d8)]()['optional']()})[a217_0x54a02c(0x215)](),'from':z[a217_0x54a02c(0x1fa)]({'last':z[a217_0x54a02c(0x203)]([z['number'](),z[a217_0x54a02c(0x20f)]()]),'unit':TimeUnitSchema})[a217_0x54a02c(0x215)](),'reverse':z[a217_0x54a02c(0x1c8)]()[a217_0x54a02c(0x215)]()})[a217_0x54a02c(0x1d2)]((_0x2d90af,_0x4a6981)=>{const _0x337cce=a217_0x54a02c;OPERATORS_REQUIRING_VALUE[_0x337cce(0x1f6)](_0x2d90af[_0x337cce(0x204)])&&(_0x2d90af[_0x337cce(0x1c9)]===undefined||_0x2d90af[_0x337cce(0x1c9)]===null)&&_0x4a6981[_0x337cce(0x205)]({'code':_0x337cce(0x1dc),'message':_0x337cce(0x1e5)+_0x2d90af[_0x337cce(0x204)]+'\x27\x20requires\x20a\x20value','path':[_0x337cce(0x1c9)]}),_0x2d90af['type']===_0x337cce(0x1f4)&&_0x2d90af[_0x337cce(0x20c)]===undefined&&_0x2d90af[_0x337cce(0x1e7)]===undefined&&_0x4a6981[_0x337cce(0x205)]({'code':_0x337cce(0x1dc),'message':_0x337cce(0x1d3),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT['has'](_0x2d90af[_0x337cce(0x204)])&&_0x2d90af[_0x337cce(0x1c9)]!==undefined&&!_0x2d90af[_0x337cce(0x214)]&&_0x4a6981['addIssue']({'code':_0x337cce(0x1dc),'message':'Operator\x20\x27'+_0x2d90af[_0x337cce(0x204)]+_0x337cce(0x217),'path':[_0x337cce(0x214)],'params':{'validationCode':_0x337cce(0x20a)}}),_0x2d90af[_0x337cce(0x204)]===_0x337cce(0x1cd)&&(!_0x2d90af['duration']&&_0x4a6981[_0x337cce(0x205)]({'code':_0x337cce(0x1dc),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x337cce(0x201)]}),!_0x2d90af[_0x337cce(0x1d1)]&&_0x4a6981[_0x337cce(0x205)]({'code':_0x337cce(0x1dc),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x337cce(0x1d1)]}));});export const ArrayMatchingSchema=z[a217_0x54a02c(0x203)]([z[a217_0x54a02c(0x1cc)]('any'),z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x1e9)),z['object']({'atLeast':z['number']()}),z['object']({'atMost':z[a217_0x54a02c(0x1d8)]()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a217_0x54a02c(0x1f5)](a217_0x54a02c(0x204),[z[a217_0x54a02c(0x1fa)]({'type':z['enum']([a217_0x54a02c(0x1df),a217_0x54a02c(0x1d5),a217_0x54a02c(0x209),a217_0x54a02c(0x202)]),'column':z[a217_0x54a02c(0x20f)](),'groupingColumns':z[a217_0x54a02c(0x20d)](z['string']())[a217_0x54a02c(0x215)]()}),z[a217_0x54a02c(0x1fa)]({'type':z['literal'](a217_0x54a02c(0x1ea)),'groupingColumns':z[a217_0x54a02c(0x20d)](z[a217_0x54a02c(0x20f)]())['optional']()}),z['object']({'type':z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x20e)),'columns':z[a217_0x54a02c(0x20d)](z[a217_0x54a02c(0x20f)]())}),z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1f3)]([a217_0x54a02c(0x1c6),a217_0x54a02c(0x1d0)]),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a217_0x54a02c(0x20d)](z['string']())[a217_0x54a02c(0x215)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a217_0x54a02c(0x1d8)](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set([a217_0x54a02c(0x1d9),a217_0x54a02c(0x1eb),a217_0x54a02c(0x1cd)]),TIMESTAMP_COMPARISON_OPERATORS=new Set([a217_0x54a02c(0x1c7),a217_0x54a02c(0x1ef),'GreaterEqual','Less',a217_0x54a02c(0x1e8),a217_0x54a02c(0x1f4)]),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0x46ccc9){const _0x4661c0=a217_0x54a02c;return typeof _0x46ccc9===_0x4661c0(0x1fa)&&_0x46ccc9!==null&&!Array[_0x4661c0(0x1e6)](_0x46ccc9)&&(_0x4661c0(0x1fc)in _0x46ccc9||_0x4661c0(0x1dd)in _0x46ccc9);}export const FilterColumnConditionDefSchema=z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x1fd)),'column':z[a217_0x54a02c(0x20f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x34f1fa,_0x4efbb9)=>{const _0x3fb835=a217_0x54a02c,_0x37402f=_0x34f1fa[_0x3fb835(0x200)][_0x3fb835(0x204)];if(_0x34f1fa['column']===_0x3fb835(0x1fc)){if(!TIMESTAMP_OPERATORS[_0x3fb835(0x1f6)](_0x37402f)){_0x4efbb9[_0x3fb835(0x205)]({'code':_0x3fb835(0x1dc),'message':_0x3fb835(0x1cb)+[...TIMESTAMP_OPERATORS][_0x3fb835(0x1f2)](',\x20')+'\x20operators\x20(got\x20\x27'+_0x37402f+'\x27)','path':[_0x3fb835(0x200),_0x3fb835(0x204)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS['has'](_0x37402f)){const _0x42de3a=_0x37402f===_0x3fb835(0x1f4)?[_0x34f1fa[_0x3fb835(0x200)][_0x3fb835(0x20c)],_0x34f1fa[_0x3fb835(0x200)][_0x3fb835(0x1e7)]][_0x3fb835(0x1e0)](_0x467341=>_0x467341===undefined||isTemporalValueShape(_0x467341)):_0x34f1fa['operator'][_0x3fb835(0x1c9)]===undefined||isTemporalValueShape(_0x34f1fa[_0x3fb835(0x200)][_0x3fb835(0x1c9)]);!_0x42de3a&&_0x4efbb9['addIssue']({'code':_0x3fb835(0x1dc),'message':'Timestamp\x20column\x27s\x20\x27'+_0x37402f+'\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','path':[_0x3fb835(0x200)]});}}});export const FilterRuleDefSchema=z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x1d7)),'conditions':z[a217_0x54a02c(0x20d)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x1ed)),'attribute':z[a217_0x54a02c(0x20f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x54a02c(0x215)](),'exclude':z['boolean']()[a217_0x54a02c(0x215)](),'aggregation':AggregationDefSchema[a217_0x54a02c(0x215)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a217_0x54a02c(0x215)](),'limit':z[a217_0x54a02c(0x1d8)]()['optional']()}));export const BehaviorConditionDefSchema=z[a217_0x54a02c(0x1ff)](()=>z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x1ca)),'attribute':z[a217_0x54a02c(0x20f)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a217_0x54a02c(0x215)](),'exclude':z[a217_0x54a02c(0x1c8)]()[a217_0x54a02c(0x215)](),'aggregation':AggregationDefSchema[a217_0x54a02c(0x215)](),'source':z[a217_0x54a02c(0x20f)]()[a217_0x54a02c(0x215)](),'filter':FilterRuleDefSchema[a217_0x54a02c(0x215)](),'timeWindow':TimeWindowDefSchema[a217_0x54a02c(0x215)](),'limit':z[a217_0x54a02c(0x1d8)]()[a217_0x54a02c(0x215)]()}));export const ColumnConditionDefSchema=z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1cc)](a217_0x54a02c(0x1fd)),'column':z[a217_0x54a02c(0x20f)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a217_0x54a02c(0x1ff)](()=>z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1f3)](['And','Or',a217_0x54a02c(0x1c5)]),'conditions':z[a217_0x54a02c(0x20d)](ConditionDefSchema),'description':z[a217_0x54a02c(0x20f)]()[a217_0x54a02c(0x215)](),'expr':z[a217_0x54a02c(0x20f)]()[a217_0x54a02c(0x215)]()}));export const SegmentRefConditionDefSchema=z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1f3)]([a217_0x54a02c(0x1fe),a217_0x54a02c(0x1f1)]),'segment':z['string']()['min'](0x1,a217_0x54a02c(0x1d4))});export const ConditionDefSchema=z[a217_0x54a02c(0x1ff)](()=>z[a217_0x54a02c(0x203)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a217_0x54a02c(0x1ff)](()=>z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1f3)]([a217_0x54a02c(0x1d7),'Or',a217_0x54a02c(0x1c5)]),'conditions':z[a217_0x54a02c(0x20d)](ConditionDefSchema),'description':z[a217_0x54a02c(0x20f)]()['optional'](),'expr':z[a217_0x54a02c(0x20f)]()[a217_0x54a02c(0x215)]()}));export const SegmentDefSchema=z[a217_0x54a02c(0x1fa)]({'type':z[a217_0x54a02c(0x1cc)]('segment')[a217_0x54a02c(0x215)](),'name':z[a217_0x54a02c(0x20f)]()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a217_0x54a02c(0x20f)]()[a217_0x54a02c(0x215)](),'folder':z['string']()[a217_0x54a02c(0x215)](),'rule':RuleDefSchema[a217_0x54a02c(0x215)](),'kind':z[a217_0x54a02c(0x1f3)]([a217_0x54a02c(0x1db),a217_0x54a02c(0x1e1),a217_0x54a02c(0x1f7)])[a217_0x54a02c(0x215)](),'visible':z['boolean']()[a217_0x54a02c(0x215)](),'activations':z[a217_0x54a02c(0x20d)](ActivationDefSchema)['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a218_0x3644(_0x1d41a4,_0x1c6153){_0x1d41a4=_0x1d41a4-0x1e0;const _0x9f2de4=a218_0x9f2d();let _0x364426=_0x9f2de4[_0x1d41a4];return _0x364426;}const a218_0x5c8fbf=a218_0x3644;(function(_0x5c7995,_0x3e10e3){const _0x19ee89=a218_0x3644,_0x1d71eb=_0x5c7995();while(!![]){try{const _0x5e094c=parseInt(_0x19ee89(0x1e1))/0x1*(-parseInt(_0x19ee89(0x1f0))/0x2)+-parseInt(_0x19ee89(0x1f6))/0x3*(parseInt(_0x19ee89(0x1f4))/0x4)+parseInt(_0x19ee89(0x1e5))/0x5*(parseInt(_0x19ee89(0x1ef))/0x6)+parseInt(_0x19ee89(0x201))/0x7*(parseInt(_0x19ee89(0x202))/0x8)+-parseInt(_0x19ee89(0x1ff))/0x9+parseInt(_0x19ee89(0x1eb))/0xa+parseInt(_0x19ee89(0x1f7))/0xb*(parseInt(_0x19ee89(0x1ea))/0xc);if(_0x5e094c===_0x3e10e3)break;else _0x1d71eb['push'](_0x1d71eb['shift']());}catch(_0x14bf72){_0x1d71eb['push'](_0x1d71eb['shift']());}}}(a218_0x9f2d,0xa1754));import{readFileSync}from'fs';import*as a218_0x480c6c from'path';import*as a218_0x1b73e7 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';function a218_0x9f2d(){const _0x1cb8d3=['in_browser_message','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','valid','relative','always_on_campaign','3vpMuLb','template','map','utf-8','3577670BvEWqN','toJSON','result','filterType','parseDocument','3833364FHDbDe','6781290eCFhbk','campaign_type','campaign','journey','6DPTuUa','560706FvmSRm','error','has','YAML_PARSE_ERROR','39096RvGDVX','segment','318jSFGjv','33ELrSVw','skipped','not\x20a\x20','type','YAML\x20parse\x20error:\x20','line','message','warnings','815922gwgrmV','length','646541MNFwrm','24NusFFZ','object'];a218_0x9f2d=function(){return _0x1cb8d3;};return a218_0x9f2d();}import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{validateInBrowserMessageDef}from'../engage/in-browser-message-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set(['email','push',a218_0x5c8fbf(0x1fc)]);export{isJourneyDef};export function isCampaignDef(_0x5178b2){const _0x8f8400=a218_0x5c8fbf;if(typeof _0x5178b2!==_0x8f8400(0x203)||_0x5178b2===null)return![];const _0x3cc0cd=_0x5178b2,_0x1b693b=VALID_CAMPAIGN_TYPES[_0x8f8400(0x1f2)](_0x3cc0cd[_0x8f8400(0x1ec)]);if(_0x3cc0cd[_0x8f8400(0x1fa)]===_0x8f8400(0x1ed)&&_0x1b693b)return!![];if(_0x1b693b&&!_0x3cc0cd[_0x8f8400(0x1fa)])return!![];return![];}export function isTemplateDef(_0x442fdf){const _0x132c50=a218_0x5c8fbf;return typeof _0x442fdf===_0x132c50(0x203)&&_0x442fdf!==null&&_0x132c50(0x1fa)in _0x442fdf&&_0x442fdf['type']===_0x132c50(0x1e2);}export function isAlwaysOnCampaignDef(_0x3c0767){const _0x452519=a218_0x5c8fbf;return typeof _0x3c0767==='object'&&_0x3c0767!==null&&'type'in _0x3c0767&&_0x3c0767['type']===_0x452519(0x1e0);}export function isInBrowserMessageDef(_0x45b202){const _0x29a00c=a218_0x5c8fbf;return typeof _0x45b202===_0x29a00c(0x203)&&_0x45b202!==null&&_0x29a00c(0x1fa)in _0x45b202&&_0x45b202[_0x29a00c(0x1fa)]===_0x29a00c(0x204);}export function isValidationResult(_0x2a5778){const _0x107b16=a218_0x5c8fbf;return!(_0x107b16(0x1f8)in _0x2a5778);}export function createParseErrorResult(_0x43bd68,_0x5d0e9b,_0x31c55b,_0x1830d1,_0x22667b=a218_0x5c8fbf(0x1f5)){const _0x19a7a0=a218_0x5c8fbf;return{'filePath':_0x43bd68,'relativePath':_0x5d0e9b,'source':_0x31c55b,'result':{'valid':![],'errors':[{'level':_0x19a7a0(0x1f1),'path':'','code':_0x19a7a0(0x1f3),'message':_0x1830d1}],'warnings':[]},'fileType':_0x22667b};}export function validateYamlFile(_0x2cd35d,_0x376152,_0x33a8ea={}){const _0x54d6e9=a218_0x5c8fbf,_0x1a6a25=a218_0x480c6c[_0x54d6e9(0x207)](_0x376152,_0x2cd35d)||a218_0x480c6c['basename'](_0x2cd35d);try{const _0x34b0da=readFileSync(_0x2cd35d,_0x54d6e9(0x1e4)),_0x2df3c2=a218_0x1b73e7[_0x54d6e9(0x1e9)](_0x34b0da),_0x490a45=_0x2df3c2[_0x54d6e9(0x1e6)]();if(!_0x490a45)return createParseErrorResult(_0x2cd35d,_0x1a6a25,_0x34b0da,_0x54d6e9(0x205));let _0x58fa5b;if(isJourneyDef(_0x490a45,_0x2cd35d))_0x58fa5b=_0x54d6e9(0x1ee);else{if(isCampaignDef(_0x490a45))_0x58fa5b=_0x54d6e9(0x1ed);else{if(isAlwaysOnCampaignDef(_0x490a45))_0x58fa5b='always_on_campaign';else{if(isTemplateDef(_0x490a45))_0x58fa5b=_0x54d6e9(0x1e2);else isInBrowserMessageDef(_0x490a45)?_0x58fa5b=_0x54d6e9(0x204):_0x58fa5b=_0x54d6e9(0x1f5);}}}if(_0x33a8ea[_0x54d6e9(0x1e8)]&&_0x58fa5b!==_0x33a8ea[_0x54d6e9(0x1e8)])return{'filePath':_0x2cd35d,'relativePath':_0x1a6a25,'skipped':!![],'reason':_0x54d6e9(0x1f9)+_0x33a8ea[_0x54d6e9(0x1e8)]};const _0x2c8289={'source':_0x34b0da,'document':_0x2df3c2};let _0x2cc0d4;if(_0x58fa5b===_0x54d6e9(0x1ee))_0x2cc0d4=validateJourneyDef(_0x490a45,_0x2c8289);else{if(_0x58fa5b===_0x54d6e9(0x1ed))_0x2cc0d4=validateCampaignDef(_0x490a45,_0x2c8289);else{if(_0x58fa5b==='always_on_campaign')_0x2cc0d4=validateAlwaysOnCampaignDef(_0x490a45,_0x2c8289);else{if(_0x58fa5b===_0x54d6e9(0x1e2))_0x2cc0d4=validateTemplateDef(_0x490a45,_0x2c8289);else _0x58fa5b===_0x54d6e9(0x204)?_0x2cc0d4=validateInBrowserMessageDef(_0x490a45,_0x2c8289):_0x2cc0d4=validateSegmentDef(_0x490a45,_0x2c8289);}}}return{'filePath':_0x2cd35d,'relativePath':_0x1a6a25,'source':_0x34b0da,'result':_0x2cc0d4,'fileType':_0x58fa5b};}catch(_0x33381a){const _0x371194=_0x33381a instanceof Error?_0x33381a[_0x54d6e9(0x1fd)]:String(_0x33381a);return createParseErrorResult(_0x2cd35d,_0x1a6a25,'',_0x54d6e9(0x1fb)+_0x371194);}}export function validateYamlFiles(_0x1d53a4,_0x255296,_0x2c11ea={}){const _0x1eb28b=a218_0x5c8fbf;return _0x1d53a4[_0x1eb28b(0x1e3)](_0x4fa428=>validateYamlFile(_0x4fa428,_0x255296,_0x2c11ea));}export function calculateSummary(_0x12364e){const _0x211a9c=a218_0x5c8fbf;let _0x317557=0x0,_0x1a0071=0x0,_0x2f2a3b=0x0,_0x2325fd=0x0;for(const _0x19c0b9 of _0x12364e){if(!isValidationResult(_0x19c0b9)){_0x2325fd++;continue;}_0x19c0b9[_0x211a9c(0x1e7)][_0x211a9c(0x206)]?_0x317557++:_0x1a0071++,_0x2f2a3b+=_0x19c0b9[_0x211a9c(0x1e7)][_0x211a9c(0x1fe)][_0x211a9c(0x200)];}return{'validCount':_0x317557,'invalidCount':_0x1a0071,'warningCount':_0x2f2a3b,'skippedCount':_0x2325fd,'hasErrors':_0x1a0071>0x0};}
1
+ const a218_0x18bb23=a218_0x5f3f;(function(_0xe74ced,_0x5f2fd2){const _0x2a2134=a218_0x5f3f,_0x561651=_0xe74ced();while(!![]){try{const _0x3188bf=-parseInt(_0x2a2134(0x1d6))/0x1+-parseInt(_0x2a2134(0x1d9))/0x2*(parseInt(_0x2a2134(0x1e8))/0x3)+parseInt(_0x2a2134(0x1c8))/0x4*(parseInt(_0x2a2134(0x1e5))/0x5)+-parseInt(_0x2a2134(0x1d0))/0x6*(-parseInt(_0x2a2134(0x1e4))/0x7)+parseInt(_0x2a2134(0x1e6))/0x8+-parseInt(_0x2a2134(0x1d8))/0x9*(-parseInt(_0x2a2134(0x1e0))/0xa)+-parseInt(_0x2a2134(0x1e9))/0xb;if(_0x3188bf===_0x5f2fd2)break;else _0x561651['push'](_0x561651['shift']());}catch(_0x4061d6){_0x561651['push'](_0x561651['shift']());}}}(a218_0x5dc6,0x884a5));import{readFileSync}from'fs';import*as a218_0x11ea37 from'path';function a218_0x5f3f(_0x12332e,_0x1a6da0){_0x12332e=_0x12332e-0x1c7;const _0x5dc65a=a218_0x5dc6();let _0x5f3f9a=_0x5dc65a[_0x12332e];return _0x5f3f9a;}import*as a218_0x55f38e from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{validateInBrowserMessageDef}from'../engage/in-browser-message-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a218_0x18bb23(0x1db),a218_0x18bb23(0x1d7)]);export{isJourneyDef};export function isCampaignDef(_0x59c93c){const _0x1f6386=a218_0x18bb23;if(typeof _0x59c93c!=='object'||_0x59c93c===null)return![];const _0x47d55a=_0x59c93c,_0x2fbb27=VALID_CAMPAIGN_TYPES[_0x1f6386(0x1df)](_0x47d55a[_0x1f6386(0x1c9)]);if(_0x47d55a[_0x1f6386(0x1cc)]==='campaign'&&_0x2fbb27)return!![];if(_0x2fbb27&&!_0x47d55a[_0x1f6386(0x1cc)])return!![];return![];}export function isTemplateDef(_0x11cffe){const _0x2b4cfd=a218_0x18bb23;return typeof _0x11cffe===_0x2b4cfd(0x1ca)&&_0x11cffe!==null&&_0x2b4cfd(0x1cc)in _0x11cffe&&_0x11cffe['type']===_0x2b4cfd(0x1e2);}function a218_0x5dc6(){const _0x13540a=['journey','campaign','length','result','693802IAJNRK','line','837ucHtfb','809062mjcZCS','skipped','push','toJSON','YAML_PARSE_ERROR','utf-8','has','118010NnyVPL','valid','template','in_browser_message','7ZHFsKw','2085ucpOzG','6096888QnXhqU','error','6IdOcIM','10365872acgGOL','filterType','6188aASpuT','campaign_type','object','basename','type','YAML\x20parse\x20error:\x20','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','always_on_campaign','2992548SeFmRh','message'];a218_0x5dc6=function(){return _0x13540a;};return a218_0x5dc6();}export function isAlwaysOnCampaignDef(_0x50400d){const _0x42a843=a218_0x18bb23;return typeof _0x50400d===_0x42a843(0x1ca)&&_0x50400d!==null&&_0x42a843(0x1cc)in _0x50400d&&_0x50400d[_0x42a843(0x1cc)]===_0x42a843(0x1cf);}export function isInBrowserMessageDef(_0x1bf5fb){const _0x43bc05=a218_0x18bb23;return typeof _0x1bf5fb===_0x43bc05(0x1ca)&&_0x1bf5fb!==null&&'type'in _0x1bf5fb&&_0x1bf5fb[_0x43bc05(0x1cc)]===_0x43bc05(0x1e3);}export function isValidationResult(_0x38fb28){const _0x5b7a99=a218_0x18bb23;return!(_0x5b7a99(0x1da)in _0x38fb28);}export function createParseErrorResult(_0x2bea89,_0x3a03a9,_0x5a16a4,_0x119f33,_0x24015d='segment'){const _0x6dfd82=a218_0x18bb23;return{'filePath':_0x2bea89,'relativePath':_0x3a03a9,'source':_0x5a16a4,'result':{'valid':![],'errors':[{'level':_0x6dfd82(0x1e7),'path':'','code':_0x6dfd82(0x1dd),'message':_0x119f33}],'warnings':[]},'fileType':_0x24015d};}export function validateYamlFile(_0x4d57da,_0x305dff,_0x800db8={}){const _0x3638f7=a218_0x18bb23,_0x2bf79f=a218_0x11ea37['relative'](_0x305dff,_0x4d57da)||a218_0x11ea37[_0x3638f7(0x1cb)](_0x4d57da);try{const _0x531a91=readFileSync(_0x4d57da,_0x3638f7(0x1de)),_0xc4302c=a218_0x55f38e['parseDocument'](_0x531a91),_0x413479=_0xc4302c[_0x3638f7(0x1dc)]();if(!_0x413479)return createParseErrorResult(_0x4d57da,_0x2bf79f,_0x531a91,_0x3638f7(0x1ce));let _0x3fe22e;if(isJourneyDef(_0x413479,_0x4d57da))_0x3fe22e=_0x3638f7(0x1d2);else{if(isCampaignDef(_0x413479))_0x3fe22e=_0x3638f7(0x1d3);else{if(isAlwaysOnCampaignDef(_0x413479))_0x3fe22e=_0x3638f7(0x1cf);else{if(isTemplateDef(_0x413479))_0x3fe22e=_0x3638f7(0x1e2);else isInBrowserMessageDef(_0x413479)?_0x3fe22e=_0x3638f7(0x1e3):_0x3fe22e='segment';}}}if(_0x800db8[_0x3638f7(0x1c7)]&&_0x3fe22e!==_0x800db8['filterType'])return{'filePath':_0x4d57da,'relativePath':_0x2bf79f,'skipped':!![],'reason':'not\x20a\x20'+_0x800db8['filterType']};const _0xeb56ca={'source':_0x531a91,'document':_0xc4302c};let _0x4d311e;if(_0x3fe22e==='journey')_0x4d311e=validateJourneyDef(_0x413479,_0xeb56ca);else{if(_0x3fe22e==='campaign')_0x4d311e=validateCampaignDef(_0x413479,_0xeb56ca);else{if(_0x3fe22e===_0x3638f7(0x1cf))_0x4d311e=validateAlwaysOnCampaignDef(_0x413479,_0xeb56ca);else{if(_0x3fe22e==='template')_0x4d311e=validateTemplateDef(_0x413479,_0xeb56ca);else _0x3fe22e===_0x3638f7(0x1e3)?_0x4d311e=validateInBrowserMessageDef(_0x413479,_0xeb56ca):_0x4d311e=validateSegmentDef(_0x413479,_0xeb56ca);}}}return{'filePath':_0x4d57da,'relativePath':_0x2bf79f,'source':_0x531a91,'result':_0x4d311e,'fileType':_0x3fe22e};}catch(_0x5bfa59){const _0x34b443=_0x5bfa59 instanceof Error?_0x5bfa59[_0x3638f7(0x1d1)]:String(_0x5bfa59);return createParseErrorResult(_0x4d57da,_0x2bf79f,'',_0x3638f7(0x1cd)+_0x34b443);}}export function validateYamlFiles(_0x1994fa,_0x3602d7,_0x1a96c9={}){return _0x1994fa['map'](_0x1d1fbe=>validateYamlFile(_0x1d1fbe,_0x3602d7,_0x1a96c9));}export function calculateSummary(_0xcf62c9){const _0x5ea834=a218_0x18bb23;let _0x134747=0x0,_0xe74771=0x0,_0x4ef7c1=0x0,_0x7ae008=0x0;for(const _0x3ea147 of _0xcf62c9){if(!isValidationResult(_0x3ea147)){_0x7ae008++;continue;}_0x3ea147[_0x5ea834(0x1d5)][_0x5ea834(0x1e1)]?_0x134747++:_0xe74771++,_0x4ef7c1+=_0x3ea147[_0x5ea834(0x1d5)]['warnings'][_0x5ea834(0x1d4)];}return{'validCount':_0x134747,'invalidCount':_0xe74771,'warningCount':_0x4ef7c1,'skippedCount':_0x7ae008,'hasErrors':_0xe74771>0x0};}
@@ -1 +1 @@
1
- (function(_0x591593,_0x58ad2a){const _0x6bc0e7=a219_0x3f59,_0x38d121=_0x591593();while(!![]){try{const _0xb83475=parseInt(_0x6bc0e7(0xa8))/0x1*(parseInt(_0x6bc0e7(0x98))/0x2)+-parseInt(_0x6bc0e7(0x9c))/0x3+parseInt(_0x6bc0e7(0x9a))/0x4+parseInt(_0x6bc0e7(0xad))/0x5+-parseInt(_0x6bc0e7(0x9f))/0x6+-parseInt(_0x6bc0e7(0xbe))/0x7+parseInt(_0x6bc0e7(0xb4))/0x8*(-parseInt(_0x6bc0e7(0xaf))/0x9);if(_0xb83475===_0x58ad2a)break;else _0x38d121['push'](_0x38d121['shift']());}catch(_0x5921ff){_0x38d121['push'](_0x38d121['shift']());}}}(a219_0x4429,0x901f9));import*as a219_0x221c6a from'yaml';import a219_0x415ee1 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x22f994,_0x5bc45b,_0x420161){const _0x4b83db=a219_0x3f59;if(!_0x22f994||!_0x5bc45b)return undefined;try{let _0x3e4028=_0x22f994[_0x4b83db(0x99)](_0x420161,!![]),_0x926812=[..._0x420161];while((!_0x3e4028||typeof _0x3e4028!==_0x4b83db(0xae)||!(_0x4b83db(0xb8)in _0x3e4028)||!_0x3e4028[_0x4b83db(0xb8)])&&_0x926812[_0x4b83db(0xa5)]>0x0){_0x926812[_0x4b83db(0x96)](),_0x3e4028=_0x926812[_0x4b83db(0xa5)]>0x0?_0x22f994[_0x4b83db(0x99)](_0x926812,!![]):_0x22f994[_0x4b83db(0xb1)];}if(!_0x3e4028||typeof _0x3e4028!==_0x4b83db(0xae)||!(_0x4b83db(0xb8)in _0x3e4028)||!_0x3e4028[_0x4b83db(0xb8)])return undefined;const [_0xa643ff]=_0x3e4028[_0x4b83db(0xb8)];return offsetToLocation(_0x5bc45b,_0xa643ff);}catch{return undefined;}}function a219_0x4429(){const _0x59d417=['8GftXeE','dim','error','path','range','code','toString','errors','map','level','3638873lxylOk','Invalid\x20YAML:\x20expected\x20an\x20object','cyan','repeat','yellow','pop','YAML\x20validation\x20error\x20at\x20\x27','2wqgEuJ','getIn','526420JQbQBS','parse','1495833VdLGKU','min','data','2041728qWdEhH','join','match','column','location','red','length','message','\x20|\x20','1099619iOtYHn','padStart','line','push','safeParse','4397600QuDvwe','object','1455093QIovTT','split','contents','invalid_union','flatMap'];a219_0x4429=function(){return _0x59d417;};return a219_0x4429();}export function offsetToLocation(_0x2876ef,_0x1d6f54){let _0x4a709f=0x1,_0x3d4850=0x1;for(let _0x265e19=0x0;_0x265e19<_0x1d6f54&&_0x265e19<_0x2876ef['length'];_0x265e19++){_0x2876ef[_0x265e19]==='\x0a'?(_0x4a709f++,_0x3d4850=0x1):_0x3d4850++;}return{'line':_0x4a709f,'column':_0x3d4850,'offset':_0x1d6f54};}function a219_0x3f59(_0x489bb7,_0x5ec2f5){_0x489bb7=_0x489bb7-0x92;const _0x44293b=a219_0x4429();let _0x3f5982=_0x44293b[_0x489bb7];return _0x3f5982;}export function pathToArray(_0x25e475){const _0x53e3ce=a219_0x3f59;if(!_0x25e475)return[];return _0x25e475['split']('.')[_0x53e3ce(0xb3)](_0x57a96f=>{const _0x42f0ad=_0x53e3ce,_0xf1e7e8=_0x57a96f[_0x42f0ad(0xa1)](/^(\w+)\[(\d+)\]$/);if(_0xf1e7e8)return[_0xf1e7e8[0x1],parseInt(_0xf1e7e8[0x2],0xa)];return[_0x57a96f];});}export function formatZodPath(_0x11e644){let _0x161de3='';for(const _0x2765b7 of _0x11e644){if(typeof _0x2765b7==='number')_0x161de3+='['+_0x2765b7+']';else{const _0x445b20=String(_0x2765b7);_0x161de3+=_0x161de3?'.'+_0x445b20:_0x445b20;}}return _0x161de3;}export function flattenZodIssues(_0x5dabe1){const _0x129bf7=a219_0x3f59,_0x4c0eb4=[];for(const _0x28d656 of _0x5dabe1){if(_0x28d656[_0x129bf7(0xb9)]===_0x129bf7(0xb2)&&_0x129bf7(0xbb)in _0x28d656){const _0x5df2c7=_0x28d656['errors'];let _0x350621=_0x5df2c7[0x0]||[];for(const _0x4c1d5f of _0x5df2c7){_0x4c1d5f[_0x129bf7(0xa5)]<_0x350621[_0x129bf7(0xa5)]&&(_0x350621=_0x4c1d5f);}const _0x4c3a21=_0x350621[_0x129bf7(0xbc)](_0x325082=>({..._0x325082,'path':[..._0x28d656[_0x129bf7(0xb7)],..._0x325082[_0x129bf7(0xb7)]]}));_0x4c0eb4['push'](...flattenZodIssues(_0x4c3a21));}else _0x4c0eb4[_0x129bf7(0xab)](_0x28d656);}return _0x4c0eb4;}export function safeParseYaml(_0x575975,_0x2a6fb6){const _0x1dffd6=a219_0x3f59,_0x1e1c32=a219_0x221c6a[_0x1dffd6(0x9b)](_0x575975);if(!_0x1e1c32||typeof _0x1e1c32!=='object')throw new Error(_0x1dffd6(0x92));const _0x143cf8=_0x2a6fb6[_0x1dffd6(0xac)](_0x1e1c32);if(!_0x143cf8['success']){const _0x3969db=_0x143cf8['error']['issues'][0x0],_0x34221f=formatZodPath(_0x3969db[_0x1dffd6(0xb7)]);throw new Error(_0x34221f?_0x1dffd6(0x97)+_0x34221f+'\x27:\x20'+_0x3969db[_0x1dffd6(0xa6)]:'YAML\x20validation\x20error:\x20'+_0x3969db[_0x1dffd6(0xa6)]);}return _0x143cf8[_0x1dffd6(0x9e)];}export function formatIssueWithContext(_0xf5f52d,_0x4ca3bc,_0x4e293f){const _0xf3e28a=a219_0x3f59,_0x146506=[],_0x1a0bcb=_0xf5f52d[_0xf3e28a(0xbd)]===_0xf3e28a(0xb6),_0x4b3bf8=_0x1a0bcb?a219_0x415ee1[_0xf3e28a(0xa4)]:a219_0x415ee1['yellow'],_0x2dcdad=_0x1a0bcb?a219_0x415ee1[_0xf3e28a(0xa4)]:a219_0x415ee1[_0xf3e28a(0x95)],_0x7cc535=_0x4e293f?a219_0x415ee1[_0xf3e28a(0x93)](_0x4e293f+':'):'';if(_0xf5f52d[_0xf3e28a(0xa3)]){const _0x35fc7c=a219_0x415ee1[_0xf3e28a(0x93)](_0xf5f52d[_0xf3e28a(0xa3)][_0xf3e28a(0xaa)]+':'+_0xf5f52d[_0xf3e28a(0xa3)][_0xf3e28a(0xa2)]);_0x146506[_0xf3e28a(0xab)](''+_0x7cc535+_0x35fc7c+':\x20'+_0x4b3bf8(_0xf5f52d[_0xf3e28a(0xbd)])+'\x20'+_0x2dcdad('['+_0xf5f52d[_0xf3e28a(0xb9)]+']'));}else _0x146506['push'](''+_0x7cc535+a219_0x415ee1['dim'](_0xf5f52d[_0xf3e28a(0xb7)])+':\x20'+_0x4b3bf8(_0xf5f52d[_0xf3e28a(0xbd)])+'\x20'+_0x2dcdad('['+_0xf5f52d[_0xf3e28a(0xb9)]+']'));_0x146506['push'](_0xf5f52d[_0xf3e28a(0xa6)]);if(_0xf5f52d[_0xf3e28a(0xa3)]&&_0x4ca3bc){const _0x5b106c=_0x4ca3bc[_0xf3e28a(0xb0)]('\x0a'),{line:_0x9de5f2,column:_0x3245fb}=_0xf5f52d[_0xf3e28a(0xa3)],_0x54ff5a=Math['max'](0x1,_0x9de5f2-0x1),_0x26e4ba=Math[_0xf3e28a(0x9d)](_0x5b106c[_0xf3e28a(0xa5)],_0x9de5f2+0x1);_0x146506[_0xf3e28a(0xab)]('');for(let _0x4122dc=_0x54ff5a;_0x4122dc<=_0x26e4ba;_0x4122dc++){const _0x33b1d8=_0x5b106c[_0x4122dc-0x1]||'',_0x4d1b27=a219_0x415ee1[_0xf3e28a(0xb5)](_0x4122dc[_0xf3e28a(0xba)]()[_0xf3e28a(0xa9)](0x4)),_0x52b791=a219_0x415ee1['dim'](_0xf3e28a(0xa7));if(_0x4122dc===_0x9de5f2){_0x146506[_0xf3e28a(0xab)]('\x20\x20'+_0x4d1b27+_0x52b791+_0x4b3bf8(_0x33b1d8));const _0x3b14a8='\x20'[_0xf3e28a(0x94)](0x4+0x3+_0x3245fb-0x1);_0x146506[_0xf3e28a(0xab)]('\x20\x20'+_0x3b14a8+_0x4b3bf8('^'));}else _0x146506[_0xf3e28a(0xab)]('\x20\x20'+_0x4d1b27+_0x52b791+a219_0x415ee1[_0xf3e28a(0xb5)](_0x33b1d8));}}return _0x146506[_0xf3e28a(0xa0)]('\x0a');}export function formatValidationResult(_0x274223,_0x20c28d,_0x559ec0){const _0x3d1c7c=a219_0x3f59,_0x1f513b=[];for(const _0x509ae3 of _0x274223['errors']){_0x1f513b[_0x3d1c7c(0xab)](formatIssueWithContext(_0x509ae3,_0x20c28d,_0x559ec0)),_0x1f513b[_0x3d1c7c(0xab)]('');}for(const _0x5761be of _0x274223['warnings']){_0x1f513b[_0x3d1c7c(0xab)](formatIssueWithContext(_0x5761be,_0x20c28d,_0x559ec0)),_0x1f513b['push']('');}return _0x1f513b[_0x3d1c7c(0xa0)]('\x0a');}
1
+ function a219_0x5ef5(_0x3bdfc0,_0x31dab2){_0x3bdfc0=_0x3bdfc0-0x1ef;const _0x466c40=a219_0x466c();let _0x5ef5d8=_0x466c40[_0x3bdfc0];return _0x5ef5d8;}(function(_0x5518e5,_0x1d4481){const _0x1a7625=a219_0x5ef5,_0x4c2c0e=_0x5518e5();while(!![]){try{const _0x2be66f=parseInt(_0x1a7625(0x208))/0x1*(parseInt(_0x1a7625(0x21f))/0x2)+parseInt(_0x1a7625(0x200))/0x3*(parseInt(_0x1a7625(0x203))/0x4)+-parseInt(_0x1a7625(0x1fd))/0x5+parseInt(_0x1a7625(0x1f3))/0x6*(-parseInt(_0x1a7625(0x1f5))/0x7)+-parseInt(_0x1a7625(0x219))/0x8*(parseInt(_0x1a7625(0x210))/0x9)+-parseInt(_0x1a7625(0x21d))/0xa*(parseInt(_0x1a7625(0x214))/0xb)+-parseInt(_0x1a7625(0x1f9))/0xc*(-parseInt(_0x1a7625(0x21a))/0xd);if(_0x2be66f===_0x1d4481)break;else _0x4c2c0e['push'](_0x4c2c0e['shift']());}catch(_0x5613d1){_0x4c2c0e['push'](_0x4c2c0e['shift']());}}}(a219_0x466c,0xe4245));import*as a219_0x4956ba from'yaml';function a219_0x466c(){const _0x55afa2=['cyan','match','636RWytOJ','safeParse','padStart','getIn','5442445IaxHaT','push','toString','2030757xpAzFC','\x20|\x20','max','4phoUWN','YAML\x20validation\x20error\x20at\x20\x27','yellow','\x27:\x20','parse','1158tLfFpt','line','code','message','data','contents','split','path','9PaYZzX','Invalid\x20YAML:\x20expected\x20an\x20object','repeat','dim','313203IAKdJT','issues','join','length','object','12717896ncArFd','799461OGuuYc','pop','range','270JGZvoE','errors','1418XaUJKP','level','red','success','error','126bbIHUH','column','125272JoJGXw','YAML\x20validation\x20error:\x20'];a219_0x466c=function(){return _0x55afa2;};return a219_0x466c();}import a219_0x135524 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3a94a4,_0x4f131e,_0x2cc510){const _0x257a91=a219_0x5ef5;if(!_0x3a94a4||!_0x4f131e)return undefined;try{let _0x144acc=_0x3a94a4['getIn'](_0x2cc510,!![]),_0x2a0ec6=[..._0x2cc510];while((!_0x144acc||typeof _0x144acc!==_0x257a91(0x218)||!('range'in _0x144acc)||!_0x144acc[_0x257a91(0x21c)])&&_0x2a0ec6['length']>0x0){_0x2a0ec6[_0x257a91(0x21b)](),_0x144acc=_0x2a0ec6['length']>0x0?_0x3a94a4[_0x257a91(0x1fc)](_0x2a0ec6,!![]):_0x3a94a4[_0x257a91(0x20d)];}if(!_0x144acc||typeof _0x144acc!==_0x257a91(0x218)||!(_0x257a91(0x21c)in _0x144acc)||!_0x144acc[_0x257a91(0x21c)])return undefined;const [_0xc4a3c]=_0x144acc['range'];return offsetToLocation(_0x4f131e,_0xc4a3c);}catch{return undefined;}}export function offsetToLocation(_0x5b6974,_0xff875d){let _0x5640b1=0x1,_0x352f50=0x1;for(let _0x5ed60f=0x0;_0x5ed60f<_0xff875d&&_0x5ed60f<_0x5b6974['length'];_0x5ed60f++){_0x5b6974[_0x5ed60f]==='\x0a'?(_0x5640b1++,_0x352f50=0x1):_0x352f50++;}return{'line':_0x5640b1,'column':_0x352f50,'offset':_0xff875d};}export function pathToArray(_0x22669e){const _0x40817a=a219_0x5ef5;if(!_0x22669e)return[];return _0x22669e[_0x40817a(0x20e)]('.')['flatMap'](_0x3c1112=>{const _0x19479e=_0x40817a,_0x3e5887=_0x3c1112[_0x19479e(0x1f8)](/^(\w+)\[(\d+)\]$/);if(_0x3e5887)return[_0x3e5887[0x1],parseInt(_0x3e5887[0x2],0xa)];return[_0x3c1112];});}export function formatZodPath(_0x520133){let _0xb18520='';for(const _0x3d68ba of _0x520133){if(typeof _0x3d68ba==='number')_0xb18520+='['+_0x3d68ba+']';else{const _0x560265=String(_0x3d68ba);_0xb18520+=_0xb18520?'.'+_0x560265:_0x560265;}}return _0xb18520;}export function flattenZodIssues(_0x6f45f3){const _0x2c4e6b=a219_0x5ef5,_0x8b8f77=[];for(const _0x544457 of _0x6f45f3){if(_0x544457['code']==='invalid_union'&&_0x2c4e6b(0x21e)in _0x544457){const _0x7445f9=_0x544457[_0x2c4e6b(0x21e)];let _0x2eb3c2=_0x7445f9[0x0]||[];for(const _0x2551a1 of _0x7445f9){_0x2551a1[_0x2c4e6b(0x217)]<_0x2eb3c2[_0x2c4e6b(0x217)]&&(_0x2eb3c2=_0x2551a1);}const _0xfc7142=_0x2eb3c2['map'](_0x42e46e=>({..._0x42e46e,'path':[..._0x544457[_0x2c4e6b(0x20f)],..._0x42e46e[_0x2c4e6b(0x20f)]]}));_0x8b8f77[_0x2c4e6b(0x1fe)](...flattenZodIssues(_0xfc7142));}else _0x8b8f77[_0x2c4e6b(0x1fe)](_0x544457);}return _0x8b8f77;}export function safeParseYaml(_0x5b1efb,_0x150378){const _0x5f4506=a219_0x5ef5,_0x34ea2f=a219_0x4956ba[_0x5f4506(0x207)](_0x5b1efb);if(!_0x34ea2f||typeof _0x34ea2f!==_0x5f4506(0x218))throw new Error(_0x5f4506(0x211));const _0x1b97a5=_0x150378[_0x5f4506(0x1fa)](_0x34ea2f);if(!_0x1b97a5[_0x5f4506(0x1f1)]){const _0x29a4bf=_0x1b97a5[_0x5f4506(0x1f2)][_0x5f4506(0x215)][0x0],_0x56a16c=formatZodPath(_0x29a4bf[_0x5f4506(0x20f)]);throw new Error(_0x56a16c?_0x5f4506(0x204)+_0x56a16c+_0x5f4506(0x206)+_0x29a4bf[_0x5f4506(0x20b)]:_0x5f4506(0x1f6)+_0x29a4bf[_0x5f4506(0x20b)]);}return _0x1b97a5[_0x5f4506(0x20c)];}export function formatIssueWithContext(_0x368d4b,_0x53cc43,_0x147bed){const _0x107958=a219_0x5ef5,_0x30f4e6=[],_0x51a0c7=_0x368d4b[_0x107958(0x1ef)]===_0x107958(0x1f2),_0x2f0265=_0x51a0c7?a219_0x135524[_0x107958(0x1f0)]:a219_0x135524['yellow'],_0x14dffc=_0x51a0c7?a219_0x135524[_0x107958(0x1f0)]:a219_0x135524[_0x107958(0x205)],_0x4ca6f5=_0x147bed?a219_0x135524[_0x107958(0x1f7)](_0x147bed+':'):'';if(_0x368d4b['location']){const _0x1fce2c=a219_0x135524[_0x107958(0x1f7)](_0x368d4b['location'][_0x107958(0x209)]+':'+_0x368d4b['location'][_0x107958(0x1f4)]);_0x30f4e6[_0x107958(0x1fe)](''+_0x4ca6f5+_0x1fce2c+':\x20'+_0x2f0265(_0x368d4b[_0x107958(0x1ef)])+'\x20'+_0x14dffc('['+_0x368d4b['code']+']'));}else _0x30f4e6['push'](''+_0x4ca6f5+a219_0x135524[_0x107958(0x213)](_0x368d4b['path'])+':\x20'+_0x2f0265(_0x368d4b[_0x107958(0x1ef)])+'\x20'+_0x14dffc('['+_0x368d4b[_0x107958(0x20a)]+']'));_0x30f4e6[_0x107958(0x1fe)](_0x368d4b['message']);if(_0x368d4b['location']&&_0x53cc43){const _0x58a175=_0x53cc43[_0x107958(0x20e)]('\x0a'),{line:_0x8b5b81,column:_0x5285c8}=_0x368d4b['location'],_0x30bf37=Math[_0x107958(0x202)](0x1,_0x8b5b81-0x1),_0x521d24=Math['min'](_0x58a175[_0x107958(0x217)],_0x8b5b81+0x1);_0x30f4e6[_0x107958(0x1fe)]('');for(let _0x30e44b=_0x30bf37;_0x30e44b<=_0x521d24;_0x30e44b++){const _0x153da3=_0x58a175[_0x30e44b-0x1]||'',_0xa64a9a=a219_0x135524[_0x107958(0x213)](_0x30e44b[_0x107958(0x1ff)]()[_0x107958(0x1fb)](0x4)),_0x45274b=a219_0x135524['dim'](_0x107958(0x201));if(_0x30e44b===_0x8b5b81){_0x30f4e6[_0x107958(0x1fe)]('\x20\x20'+_0xa64a9a+_0x45274b+_0x2f0265(_0x153da3));const _0x58aad4='\x20'[_0x107958(0x212)](0x4+0x3+_0x5285c8-0x1);_0x30f4e6['push']('\x20\x20'+_0x58aad4+_0x2f0265('^'));}else _0x30f4e6[_0x107958(0x1fe)]('\x20\x20'+_0xa64a9a+_0x45274b+a219_0x135524[_0x107958(0x213)](_0x153da3));}}return _0x30f4e6[_0x107958(0x216)]('\x0a');}export function formatValidationResult(_0x2cb755,_0x101c02,_0x13cf8f){const _0x3054eb=a219_0x5ef5,_0x4aa832=[];for(const _0xc74910 of _0x2cb755['errors']){_0x4aa832[_0x3054eb(0x1fe)](formatIssueWithContext(_0xc74910,_0x101c02,_0x13cf8f)),_0x4aa832[_0x3054eb(0x1fe)]('');}for(const _0x4bdeab of _0x2cb755['warnings']){_0x4aa832['push'](formatIssueWithContext(_0x4bdeab,_0x101c02,_0x13cf8f)),_0x4aa832[_0x3054eb(0x1fe)]('');}return _0x4aa832['join']('\x0a');}