@treasuredata/tdx 2026.3.20 → 2026.3.22

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 (223) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/agent-command.js +1 -1
  11. package/dist/commands/agent-test-command.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-login-command.js +1 -1
  15. package/dist/commands/chat-command.js +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-statusline-command.js +1 -1
  18. package/dist/commands/claude-usage-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/connection-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/delivery-command.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-campaign-pull-command.js +1 -1
  25. package/dist/commands/engage-campaign-push-command.js +1 -1
  26. package/dist/commands/engage-campaign-validate-command.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/engage-template-pull-command.js +1 -1
  29. package/dist/commands/engage-template-push-command.js +1 -1
  30. package/dist/commands/engage-template-validate-command.js +1 -1
  31. package/dist/commands/job-command.js +1 -1
  32. package/dist/commands/journey-command.js +1 -1
  33. package/dist/commands/journey-validate-command.js +1 -1
  34. package/dist/commands/llm-command.js +1 -1
  35. package/dist/commands/mcp-command.js +1 -1
  36. package/dist/commands/parent-segment-command.js +1 -1
  37. package/dist/commands/policy-command.d.ts +33 -0
  38. package/dist/commands/policy-command.d.ts.map +1 -0
  39. package/dist/commands/policy-command.js +1 -0
  40. package/dist/commands/policy-command.js.map +1 -0
  41. package/dist/commands/profile-command.js +1 -1
  42. package/dist/commands/profiles-command.js +1 -1
  43. package/dist/commands/query-command.js +1 -1
  44. package/dist/commands/schedule-command.js +1 -1
  45. package/dist/commands/segment-command.js +1 -1
  46. package/dist/commands/segment-create-command.js +1 -1
  47. package/dist/commands/segment-fields-command.js +1 -1
  48. package/dist/commands/segment-pull-command.js +1 -1
  49. package/dist/commands/segment-push-command.js +1 -1
  50. package/dist/commands/segment-update-command.js +1 -1
  51. package/dist/commands/segment-use-command.js +1 -1
  52. package/dist/commands/segment-validate-command.js +1 -1
  53. package/dist/commands/segments.js +1 -1
  54. package/dist/commands/show.js +1 -1
  55. package/dist/commands/status-command.js +1 -1
  56. package/dist/commands/tables.js +1 -1
  57. package/dist/commands/unset-command.js +1 -1
  58. package/dist/commands/upgrade-command.js +1 -1
  59. package/dist/commands/use-command.js +1 -1
  60. package/dist/commands/user-command.js +1 -1
  61. package/dist/commands/workflow-command.js +1 -1
  62. package/dist/core/auth.js +1 -1
  63. package/dist/core/command-output.js +1 -1
  64. package/dist/core/config.js +1 -1
  65. package/dist/core/connection-cache.js +1 -1
  66. package/dist/core/constants.js +1 -1
  67. package/dist/core/credential-cache.js +1 -1
  68. package/dist/core/global-context.js +1 -1
  69. package/dist/core/keychain.js +1 -1
  70. package/dist/core/oauth-keychain.js +1 -1
  71. package/dist/core/oauth.js +1 -1
  72. package/dist/core/profile.js +1 -1
  73. package/dist/core/project-config.js +1 -1
  74. package/dist/core/session.js +1 -1
  75. package/dist/core/user-cache.js +1 -1
  76. package/dist/core/version.js +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/mcp/server.js +1 -1
  79. package/dist/mcp/tools/index.js +1 -1
  80. package/dist/mcp/tools/tdx-run.js +1 -1
  81. package/dist/mcp/tools/tdx-search.js +1 -1
  82. package/dist/mcp/utils.js +1 -1
  83. package/dist/proxy/claude-usage-tracker.js +1 -1
  84. package/dist/proxy/passthrough-server.js +1 -1
  85. package/dist/proxy/sse-usage-parser.js +1 -1
  86. package/dist/sdk/agent/agent-config.js +1 -1
  87. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  88. package/dist/sdk/agent/agent-yaml.js +1 -1
  89. package/dist/sdk/agent/test/evaluator.js +1 -1
  90. package/dist/sdk/agent/test/executor.js +1 -1
  91. package/dist/sdk/agent/test/index.js +1 -1
  92. package/dist/sdk/agent/test/output.js +1 -1
  93. package/dist/sdk/agent/test/parser.js +1 -1
  94. package/dist/sdk/agent/tool-target-registry.js +1 -1
  95. package/dist/sdk/api.js +1 -1
  96. package/dist/sdk/client/cdp-api-client.js +1 -1
  97. package/dist/sdk/client/delivery-api-client.js +1 -1
  98. package/dist/sdk/client/endpoints.js +1 -1
  99. package/dist/sdk/client/engage-api-client.js +1 -1
  100. package/dist/sdk/client/http-client.js +1 -1
  101. package/dist/sdk/client/llm-api-client.js +1 -1
  102. package/dist/sdk/client/oauth-refresh.js +1 -1
  103. package/dist/sdk/client/rate-limiter.js +1 -1
  104. package/dist/sdk/client/td-api-client.js +1 -1
  105. package/dist/sdk/client/trino-api-client.js +1 -1
  106. package/dist/sdk/client/workflow-client.js +1 -1
  107. package/dist/sdk/connection-validator.js +1 -1
  108. package/dist/sdk/connection.js +1 -1
  109. package/dist/sdk/delivery.js +1 -1
  110. package/dist/sdk/engage/campaign-pull.js +1 -1
  111. package/dist/sdk/engage/campaign-push.js +1 -1
  112. package/dist/sdk/engage/campaign-validator.js +1 -1
  113. package/dist/sdk/engage/campaign-yaml.js +1 -1
  114. package/dist/sdk/engage/template-pull.js +1 -1
  115. package/dist/sdk/engage/template-push.js +1 -1
  116. package/dist/sdk/engage/template-validator.js +1 -1
  117. package/dist/sdk/engage/template-yaml.js +1 -1
  118. package/dist/sdk/engage/types/campaign-def.js +1 -1
  119. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  120. package/dist/sdk/engage/types/template-schema.js +1 -1
  121. package/dist/sdk/engage.js +1 -1
  122. package/dist/sdk/errors.js +1 -1
  123. package/dist/sdk/index.d.ts +7 -0
  124. package/dist/sdk/index.d.ts.map +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/index.js.map +1 -1
  127. package/dist/sdk/io/index.js +1 -1
  128. package/dist/sdk/io/node-filesystem.js +1 -1
  129. package/dist/sdk/job.js +1 -1
  130. package/dist/sdk/journey.js +1 -1
  131. package/dist/sdk/llm/chat-cache.js +1 -1
  132. package/dist/sdk/llm/index.js +1 -1
  133. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  134. package/dist/sdk/llm/model-factors.js +1 -1
  135. package/dist/sdk/personalization.js +1 -1
  136. package/dist/sdk/policy.d.ts +41 -0
  137. package/dist/sdk/policy.d.ts.map +1 -0
  138. package/dist/sdk/policy.js +1 -0
  139. package/dist/sdk/policy.js.map +1 -0
  140. package/dist/sdk/query/index.js +1 -1
  141. package/dist/sdk/query/sql-parser.js +1 -1
  142. package/dist/sdk/realtime.js +1 -1
  143. package/dist/sdk/schedule.js +1 -1
  144. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  145. package/dist/sdk/segment/fields-display.js +1 -1
  146. package/dist/sdk/segment/file-discovery.js +1 -1
  147. package/dist/sdk/segment/journey-utils.js +1 -1
  148. package/dist/sdk/segment/journey-validator.js +1 -1
  149. package/dist/sdk/segment/journey-yaml.js +1 -1
  150. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  151. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  152. package/dist/sdk/segment/pull-workflow.js +1 -1
  153. package/dist/sdk/segment/push-recovery.js +1 -1
  154. package/dist/sdk/segment/push-workflow.js +1 -1
  155. package/dist/sdk/segment/resolution-context.js +1 -1
  156. package/dist/sdk/segment/segment-path-parser.js +1 -1
  157. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  158. package/dist/sdk/segment/segment-validator.js +1 -1
  159. package/dist/sdk/segment/target-resolution.js +1 -1
  160. package/dist/sdk/segment/tdx-config.js +1 -1
  161. package/dist/sdk/segment/types/activation-schema.js +1 -1
  162. package/dist/sdk/segment/types/journey-def.js +1 -1
  163. package/dist/sdk/segment/types/journey-schema.js +1 -1
  164. package/dist/sdk/segment/types/segment-def.js +1 -1
  165. package/dist/sdk/segment/types/segment-schema.js +1 -1
  166. package/dist/sdk/segment/validate-files.js +1 -1
  167. package/dist/sdk/segment/yaml-validator.js +1 -1
  168. package/dist/sdk/segment.js +1 -1
  169. package/dist/sdk/types/index.d.ts +1 -0
  170. package/dist/sdk/types/index.d.ts.map +1 -1
  171. package/dist/sdk/types/index.js +1 -1
  172. package/dist/sdk/types/index.js.map +1 -1
  173. package/dist/sdk/types/policy.d.ts +58 -0
  174. package/dist/sdk/types/policy.d.ts.map +1 -0
  175. package/dist/sdk/types/policy.js +1 -0
  176. package/dist/sdk/types/policy.js.map +1 -0
  177. package/dist/sdk/types/progress.js +1 -1
  178. package/dist/sdk/user.js +1 -1
  179. package/dist/sdk/util/format-detector.js +1 -1
  180. package/dist/sdk/util/formatters.js +1 -1
  181. package/dist/sdk/util/index.js +1 -1
  182. package/dist/sdk/util/paginate.js +1 -1
  183. package/dist/sdk/util/tree-formatter.js +1 -1
  184. package/dist/sdk/workflow/archive-validation.js +1 -1
  185. package/dist/sdk/workflow/clone-workflow.js +1 -1
  186. package/dist/sdk/workflow/index.js +1 -1
  187. package/dist/sdk/workflow/pull-workflow.js +1 -1
  188. package/dist/sdk/workflow/push-workflow.js +1 -1
  189. package/dist/sdk/workflow/tdx-config.js +1 -1
  190. package/dist/sdk/workflow/workflow-utils.js +1 -1
  191. package/dist/test-utils/command-runner.js +1 -1
  192. package/dist/test-utils/factories.js +1 -1
  193. package/dist/test-utils/fixtures.js +1 -1
  194. package/dist/test-utils/http-mock.js +1 -1
  195. package/dist/test-utils/index.js +1 -1
  196. package/dist/utils/async.js +1 -1
  197. package/dist/utils/colors.js +1 -1
  198. package/dist/utils/diff.js +1 -1
  199. package/dist/utils/file-permissions.js +1 -1
  200. package/dist/utils/file-reader.js +1 -1
  201. package/dist/utils/github-releases.js +1 -1
  202. package/dist/utils/global-cache.js +1 -1
  203. package/dist/utils/json-loader.js +1 -1
  204. package/dist/utils/local-cache.js +1 -1
  205. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  206. package/dist/utils/logger/formatters/index.js +1 -1
  207. package/dist/utils/logger/handlers/console-handler.js +1 -1
  208. package/dist/utils/logger/handlers/file-handler.js +1 -1
  209. package/dist/utils/logger/handlers/index.js +1 -1
  210. package/dist/utils/logger/handlers/null-handler.js +1 -1
  211. package/dist/utils/logger/index.js +1 -1
  212. package/dist/utils/logger/logger.js +1 -1
  213. package/dist/utils/logger/types.js +1 -1
  214. package/dist/utils/option-validation.js +1 -1
  215. package/dist/utils/process.js +1 -1
  216. package/dist/utils/prompt.js +1 -1
  217. package/dist/utils/spinner.js +1 -1
  218. package/dist/utils/sse-parser.js +1 -1
  219. package/dist/utils/string-utils.js +1 -1
  220. package/dist/utils/table-ref-parser.js +1 -1
  221. package/dist/utils/tdx-logger.js +1 -1
  222. package/dist/utils/version-check.js +1 -1
  223. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x367eaa,_0x378572){const _0x56a7d4=a144_0x4e24,_0x3ac5c3=_0x367eaa();while(!![]){try{const _0x458d71=-parseInt(_0x56a7d4(0x6f))/0x1+parseInt(_0x56a7d4(0xae))/0x2*(parseInt(_0x56a7d4(0x76))/0x3)+-parseInt(_0x56a7d4(0x9e))/0x4+-parseInt(_0x56a7d4(0x94))/0x5*(-parseInt(_0x56a7d4(0x9a))/0x6)+parseInt(_0x56a7d4(0x7f))/0x7*(parseInt(_0x56a7d4(0x80))/0x8)+-parseInt(_0x56a7d4(0xa7))/0x9*(-parseInt(_0x56a7d4(0xb2))/0xa)+parseInt(_0x56a7d4(0x98))/0xb;if(_0x458d71===_0x378572)break;else _0x3ac5c3['push'](_0x3ac5c3['shift']());}catch(_0x120ab6){_0x3ac5c3['push'](_0x3ac5c3['shift']());}}}(a144_0x145a,0x6d025));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x20cc4f,_0x537554={},_0x1309e8={}){const _0x4f1607=a144_0x4e24;if(_0x1309e8[_0x4f1607(0x88)])return runSemanticChecks(_0x20cc4f,_0x537554);const _0x3af565=SegmentDefSchema['safeParse'](_0x20cc4f);if(_0x3af565[_0x4f1607(0x90)])return runSemanticChecks(_0x3af565[_0x4f1607(0x87)],_0x537554);return zodErrorsToValidationResult(_0x3af565[_0x4f1607(0xa5)],_0x537554);}export function validateRuleDef(_0x2146b2,_0x2603b1,_0x26bb68){const _0xc282e3=a144_0x4e24;if(!_0x2146b2)return[];const _0x3479ef=RuleDefSchema[_0xc282e3(0xb3)](_0x2146b2);if(_0x3479ef[_0xc282e3(0x90)])return checkRule(_0x3479ef['data'],_0x2603b1,_0x26bb68);const _0x422373=flattenZodIssues(_0x3479ef[_0xc282e3(0xa5)]['issues']);return _0x422373[_0xc282e3(0xa3)](_0x2b2108=>{const _0x12a092=_0xc282e3,_0x44f270=formatZodPath(_0x2b2108[_0x12a092(0x71)]),_0x4ba329=_0x44f270?_0x2603b1+'.'+_0x44f270:_0x2603b1,_0x5f24d8=mapZodIssueToCode(_0x2b2108,_0x44f270),_0x5b8cf0=getLocationFromPath(_0x26bb68[_0x12a092(0x7b)],_0x26bb68['source'],pathToArray(_0x4ba329));return{'level':_0x12a092(0xa5),'path':_0x4ba329,'code':_0x5f24d8,'message':_0x2b2108[_0x12a092(0x78)],..._0x5b8cf0&&{'location':_0x5b8cf0}};});}function a144_0x145a(){const _0x567d1e=['MISSING_TIME_UNIT','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','And','664234FqkBqH','NESTED_CONDITION_GROUP','path','conditions','INVALID_ARRAY_MATCHING','Value','Behavior','301596KQamJp','push','message','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','length','document','Attribute\x20\x27','SEGMENT_SCHEMA_ERROR','source','606739rNmakf','8rGguUy','issues','.attribute','.type','filter','Attribute\x20name\x20cannot\x20be\x20empty','invalid_value','data','skipSchema','BEHAVIOR_SOURCE_MISSING_FILTER','params','endsWith','warning','.segment','includes','.conditions','success','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','.operator.value','INVALID_OPERATOR_TYPE','110455MfYvnA','rule.type','attribute','type','5890643qsySkp','level','186pncpgn','custom','symbol','INVALID_RULE_TYPE','1608736VTLyYu','match','rule','name','validationCode','map','aggregation','error','.conditions[','10899RetIAa','code','MISSING_CONDITIONS','MISSING_BETWEEN_BOUNDS','.operator.type','EMPTY_ATTRIBUTE','EMPTY_CONDITIONS','4oRDHZf','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','40bIkrxZ','safeParse','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'];a144_0x145a=function(){return _0x567d1e;};return a144_0x145a();}function zodErrorsToValidationResult(_0x2ff5e2,_0x362255){const _0x48381c=a144_0x4e24,_0x2acf32=flattenZodIssues(_0x2ff5e2[_0x48381c(0x81)]),_0x186a74=_0x2acf32[_0x48381c(0xa3)](_0x5864c4=>{const _0x4f5a5f=_0x48381c,_0x250dab=formatZodPath(_0x5864c4[_0x4f5a5f(0x71)]),_0xcda168=mapZodIssueToCode(_0x5864c4,_0x250dab),_0x4312b6=getLocationFromPath(_0x362255[_0x4f5a5f(0x7b)],_0x362255['source'],_0x5864c4[_0x4f5a5f(0x71)]['map'](_0x4cf872=>typeof _0x4cf872===_0x4f5a5f(0x9c)?String(_0x4cf872):_0x4cf872));return{'level':_0x4f5a5f(0xa5),'path':_0x250dab,'code':_0xcda168,'message':_0x5864c4[_0x4f5a5f(0x78)],..._0x4312b6&&{'location':_0x4312b6}};});return{'valid':![],'errors':_0x186a74,'warnings':[]};}function mapZodIssueToCode(_0x3ccff8,_0x554b73){const _0x44d8a6=a144_0x4e24,_0x495d9c=_0x3ccff8[_0x44d8a6(0xa8)]===_0x44d8a6(0x9b)?_0x3ccff8[_0x44d8a6(0x8a)]:undefined;if(_0x554b73===_0x44d8a6(0xa1))return'MISSING_NAME';if(_0x554b73==='rule.type'||_0x554b73[_0x44d8a6(0x8b)](_0x44d8a6(0x83))){if(_0x3ccff8[_0x44d8a6(0xa8)]===_0x44d8a6(0x86)){if(_0x554b73===_0x44d8a6(0x95)||_0x554b73[_0x44d8a6(0x9f)](/\.conditions\[\d+\]\.type$/))return _0x44d8a6(0x9d);}}if(_0x554b73[_0x44d8a6(0x8b)](_0x44d8a6(0xab)))return _0x44d8a6(0x93);if(_0x554b73[_0x44d8a6(0x8b)](_0x44d8a6(0x92)))return'MISSING_OPERATOR_VALUE';if(_0x495d9c?.['validationCode']===_0x44d8a6(0xaa))return _0x44d8a6(0xaa);if(_0x495d9c?.[_0x44d8a6(0xa2)]===_0x44d8a6(0xb5))return'MISSING_TIME_UNIT';if(_0x554b73['endsWith'](_0x44d8a6(0x8f))||_0x554b73===_0x44d8a6(0x72))return _0x44d8a6(0xa9);if(_0x554b73[_0x44d8a6(0x8e)]('arrayMatching'))return _0x44d8a6(0x73);if(_0x554b73['endsWith'](_0x44d8a6(0x8d)))return'MISSING_SEGMENT_REFERENCE';return _0x44d8a6(0x7d);}function a144_0x4e24(_0x4f948e,_0x31ed8b){_0x4f948e=_0x4f948e-0x6e;const _0x145a96=a144_0x145a();let _0x4e248c=_0x145a96[_0x4f948e];return _0x4e248c;}function runSemanticChecks(_0x50b9a7,_0x53a4ad){const _0x55f7ce=a144_0x4e24,_0x12f275=[];_0x50b9a7['rule']&&_0x12f275[_0x55f7ce(0x77)](...checkRule(_0x50b9a7[_0x55f7ce(0xa0)],_0x55f7ce(0xa0),_0x53a4ad));const _0x498902=_0x12f275['filter'](_0x117ac4=>_0x117ac4[_0x55f7ce(0x99)]===_0x55f7ce(0xa5)),_0x10f264=_0x12f275[_0x55f7ce(0x84)](_0x198e22=>_0x198e22[_0x55f7ce(0x99)]===_0x55f7ce(0x8c));return{'valid':_0x498902[_0x55f7ce(0x7a)]===0x0,'errors':_0x498902,'warnings':_0x10f264};}function checkRule(_0x5d9f7e,_0x32cf07,_0x41a9c2){const _0x2ef797=a144_0x4e24,_0x7c7de1=[];if(_0x5d9f7e['conditions'][_0x2ef797(0x7a)]===0x0)return _0x7c7de1['push']({'level':'error','path':_0x32cf07+_0x2ef797(0x8f),'code':_0x2ef797(0xad),'message':_0x2ef797(0xb1),'location':getLocationFromPath(_0x41a9c2[_0x2ef797(0x7b)],_0x41a9c2[_0x2ef797(0x7e)],pathToArray(_0x32cf07+_0x2ef797(0x8f)))}),_0x7c7de1;return _0x7c7de1[_0x2ef797(0x77)](...checkConditions(_0x5d9f7e[_0x2ef797(0x72)],_0x32cf07,_0x41a9c2)),_0x7c7de1;}function checkConditions(_0x58ad26,_0x5848cc,_0x3f0760){const _0x1b3fcf=a144_0x4e24,_0x21c53c=[];for(let _0x11cec0=0x0;_0x11cec0<_0x58ad26[_0x1b3fcf(0x7a)];_0x11cec0++){const _0x26973c=_0x58ad26[_0x11cec0],_0x373ce2=_0x5848cc+_0x1b3fcf(0xa6)+_0x11cec0+']';_0x21c53c[_0x1b3fcf(0x77)](...checkCondition(_0x26973c,_0x373ce2,_0x3f0760));}return _0x21c53c;}function checkCondition(_0x2db553,_0x50a27b,_0x3e185d){const _0x30b4b9=a144_0x4e24,_0x51a3ed=[];if(_0x2db553[_0x30b4b9(0x97)]===_0x30b4b9(0x6e)||_0x2db553['type']==='Or')return _0x2db553[_0x30b4b9(0x72)][_0x30b4b9(0x7a)]===0x0?_0x51a3ed['push']({'level':'error','path':_0x50a27b+_0x30b4b9(0x8f),'code':_0x30b4b9(0xad),'message':_0x2db553[_0x30b4b9(0x97)]+_0x30b4b9(0x91),'location':getLocationFromPath(_0x3e185d[_0x30b4b9(0x7b)],_0x3e185d[_0x30b4b9(0x7e)],pathToArray(_0x50a27b+'.conditions'))}):(_0x51a3ed['push']({'level':_0x30b4b9(0x8c),'path':_0x50a27b,'code':_0x30b4b9(0x70),'message':_0x2db553['type']+_0x30b4b9(0x79)+_0x30b4b9(0xb0)+_0x30b4b9(0xaf),'location':getLocationFromPath(_0x3e185d[_0x30b4b9(0x7b)],_0x3e185d[_0x30b4b9(0x7e)],pathToArray(_0x50a27b))}),_0x51a3ed[_0x30b4b9(0x77)](...checkConditions(_0x2db553['conditions'],_0x50a27b,_0x3e185d))),_0x51a3ed;if(_0x2db553[_0x30b4b9(0x97)]===_0x30b4b9(0x74)||_0x2db553[_0x30b4b9(0x97)]===_0x30b4b9(0x75)){const _0x53b677=_0x2db553,_0x12fb28=_0x53b677[_0x30b4b9(0x7e)],_0x43a706=_0x53b677[_0x30b4b9(0xa4)],_0x54f057=_0x12fb28||_0x43a706;(!_0x53b677[_0x30b4b9(0x96)]||_0x53b677[_0x30b4b9(0x96)]==='')&&(!_0x54f057&&_0x51a3ed[_0x30b4b9(0x77)]({'level':'error','path':_0x50a27b+_0x30b4b9(0x82),'code':_0x30b4b9(0xac),'message':_0x30b4b9(0x85),'location':getLocationFromPath(_0x3e185d[_0x30b4b9(0x7b)],_0x3e185d['source'],pathToArray(_0x50a27b+'.attribute'))}));_0x53b677[_0x30b4b9(0x84)]&&_0x51a3ed[_0x30b4b9(0x77)](...checkRule(_0x53b677[_0x30b4b9(0x84)],_0x50a27b+'.filter',_0x3e185d));if(_0x53b677[_0x30b4b9(0x7e)]){const _0x23f703=_0x53b677[_0x30b4b9(0x96)]&&_0x53b677[_0x30b4b9(0x96)]!=='';_0x23f703&&!_0x53b677[_0x30b4b9(0x84)]&&_0x51a3ed[_0x30b4b9(0x77)]({'level':_0x30b4b9(0xa5),'path':_0x50a27b+'.source','code':_0x30b4b9(0x89),'message':'Behavior\x20source\x20\x27'+_0x53b677[_0x30b4b9(0x7e)]+'\x27\x20with\x20attribute\x20\x27'+_0x53b677[_0x30b4b9(0x96)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x3e185d[_0x30b4b9(0x7b)],_0x3e185d[_0x30b4b9(0x7e)],pathToArray(_0x50a27b+'.source'))}),_0x23f703&&_0x53b677['filter']&&_0x51a3ed[_0x30b4b9(0x77)]({'level':_0x30b4b9(0x8c),'path':_0x50a27b+_0x30b4b9(0x82),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0x30b4b9(0x7c)+_0x53b677['attribute']+_0x30b4b9(0xb4)+_0x30b4b9(0xb6),'location':getLocationFromPath(_0x3e185d[_0x30b4b9(0x7b)],_0x3e185d['source'],pathToArray(_0x50a27b+'.attribute'))});}}return _0x51a3ed;}
1
+ (function(_0x43f962,_0x58aff7){const _0x5b9ee7=a146_0x1b66,_0x3c33a3=_0x43f962();while(!![]){try{const _0x17c4a2=parseInt(_0x5b9ee7(0x153))/0x1*(-parseInt(_0x5b9ee7(0x13a))/0x2)+parseInt(_0x5b9ee7(0x16f))/0x3*(-parseInt(_0x5b9ee7(0x158))/0x4)+-parseInt(_0x5b9ee7(0x14e))/0x5+parseInt(_0x5b9ee7(0x13c))/0x6*(parseInt(_0x5b9ee7(0x168))/0x7)+-parseInt(_0x5b9ee7(0x145))/0x8+parseInt(_0x5b9ee7(0x161))/0x9+parseInt(_0x5b9ee7(0x136))/0xa*(parseInt(_0x5b9ee7(0x177))/0xb);if(_0x17c4a2===_0x58aff7)break;else _0x3c33a3['push'](_0x3c33a3['shift']());}catch(_0x39d5af){_0x3c33a3['push'](_0x3c33a3['shift']());}}}(a146_0x3b29,0x8e989));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x29e3c8,_0x3795c9={},_0x4435a3={}){const _0x2322e3=a146_0x1b66;if(_0x4435a3[_0x2322e3(0x15c)])return runSemanticChecks(_0x29e3c8,_0x3795c9);const _0x415d8d=SegmentDefSchema[_0x2322e3(0x133)](_0x29e3c8);if(_0x415d8d['success'])return runSemanticChecks(_0x415d8d[_0x2322e3(0x159)],_0x3795c9);return zodErrorsToValidationResult(_0x415d8d[_0x2322e3(0x142)],_0x3795c9);}export function validateRuleDef(_0x24305d,_0x32ab09,_0xec80f8){const _0x58cd97=a146_0x1b66;if(!_0x24305d)return[];const _0x4b151d=RuleDefSchema['safeParse'](_0x24305d);if(_0x4b151d[_0x58cd97(0x143)])return checkRule(_0x4b151d[_0x58cd97(0x159)],_0x32ab09,_0xec80f8);const _0x4efba8=flattenZodIssues(_0x4b151d[_0x58cd97(0x142)]['issues']);return _0x4efba8[_0x58cd97(0x170)](_0x1ee0da=>{const _0x4457c8=_0x58cd97,_0x3ac483=formatZodPath(_0x1ee0da[_0x4457c8(0x146)]),_0x2da087=_0x3ac483?_0x32ab09+'.'+_0x3ac483:_0x32ab09,_0x4a6ad5=mapZodIssueToCode(_0x1ee0da,_0x3ac483),_0x1eeace=getLocationFromPath(_0xec80f8[_0x4457c8(0x140)],_0xec80f8[_0x4457c8(0x13d)],pathToArray(_0x2da087));return{'level':_0x4457c8(0x142),'path':_0x2da087,'code':_0x4a6ad5,'message':_0x1ee0da[_0x4457c8(0x172)],..._0x1eeace&&{'location':_0x1eeace}};});}function zodErrorsToValidationResult(_0x55ddc3,_0x116da0){const _0x5caa4b=a146_0x1b66,_0x3beb54=flattenZodIssues(_0x55ddc3[_0x5caa4b(0x149)]),_0x27ee01=_0x3beb54[_0x5caa4b(0x170)](_0x9ac012=>{const _0xca95ec=_0x5caa4b,_0x8790c9=formatZodPath(_0x9ac012['path']),_0x4e0c10=mapZodIssueToCode(_0x9ac012,_0x8790c9),_0x78cfa=getLocationFromPath(_0x116da0[_0xca95ec(0x140)],_0x116da0[_0xca95ec(0x13d)],_0x9ac012[_0xca95ec(0x146)][_0xca95ec(0x170)](_0x931553=>typeof _0x931553===_0xca95ec(0x141)?String(_0x931553):_0x931553));return{'level':'error','path':_0x8790c9,'code':_0x4e0c10,'message':_0x9ac012[_0xca95ec(0x172)],..._0x78cfa&&{'location':_0x78cfa}};});return{'valid':![],'errors':_0x27ee01,'warnings':[]};}function mapZodIssueToCode(_0x201070,_0x2170fc){const _0x346300=a146_0x1b66,_0x1e200b=_0x201070[_0x346300(0x175)]===_0x346300(0x139)?_0x201070['params']:undefined;if(_0x2170fc==='name')return _0x346300(0x132);if(_0x2170fc===_0x346300(0x131)||_0x2170fc[_0x346300(0x152)](_0x346300(0x14b))){if(_0x201070['code']===_0x346300(0x13e)){if(_0x2170fc==='rule.type'||_0x2170fc[_0x346300(0x173)](/\.conditions\[\d+\]\.type$/))return _0x346300(0x166);}}if(_0x2170fc[_0x346300(0x152)](_0x346300(0x167)))return _0x346300(0x13b);if(_0x2170fc['endsWith']('.operator.value'))return _0x346300(0x174);if(_0x1e200b?.['validationCode']===_0x346300(0x171))return'MISSING_BETWEEN_BOUNDS';if(_0x1e200b?.[_0x346300(0x157)]===_0x346300(0x16e))return'MISSING_TIME_UNIT';if(_0x2170fc[_0x346300(0x152)](_0x346300(0x165))||_0x2170fc===_0x346300(0x14d))return'MISSING_CONDITIONS';if(_0x2170fc['includes'](_0x346300(0x147)))return _0x346300(0x14f);if(_0x2170fc[_0x346300(0x152)](_0x346300(0x138)))return _0x346300(0x13f);return _0x346300(0x178);}function runSemanticChecks(_0x2d9cbb,_0x3a1ffb){const _0x5a8dcd=a146_0x1b66,_0xe1bf95=[];_0x2d9cbb[_0x5a8dcd(0x16d)]&&_0xe1bf95['push'](...checkRule(_0x2d9cbb[_0x5a8dcd(0x16d)],'rule',_0x3a1ffb));const _0x3a277f=_0xe1bf95[_0x5a8dcd(0x163)](_0x1a4c26=>_0x1a4c26['level']===_0x5a8dcd(0x142)),_0x7009b7=_0xe1bf95['filter'](_0x586957=>_0x586957[_0x5a8dcd(0x16a)]===_0x5a8dcd(0x176));return{'valid':_0x3a277f[_0x5a8dcd(0x15a)]===0x0,'errors':_0x3a277f,'warnings':_0x7009b7};}function checkRule(_0x5a4be1,_0x2fc670,_0x189110){const _0x46710a=a146_0x1b66,_0x371f85=[];if(_0x5a4be1[_0x46710a(0x14d)][_0x46710a(0x15a)]===0x0)return _0x371f85[_0x46710a(0x151)]({'level':_0x46710a(0x142),'path':_0x2fc670+_0x46710a(0x165),'code':'EMPTY_CONDITIONS','message':_0x46710a(0x164),'location':getLocationFromPath(_0x189110['document'],_0x189110[_0x46710a(0x13d)],pathToArray(_0x2fc670+_0x46710a(0x165)))}),_0x371f85;return _0x371f85[_0x46710a(0x151)](...checkConditions(_0x5a4be1[_0x46710a(0x14d)],_0x2fc670,_0x189110)),_0x371f85;}function checkConditions(_0x59f809,_0x38d73c,_0x16adc7){const _0x253852=a146_0x1b66,_0x5269ce=[];for(let _0x169543=0x0;_0x169543<_0x59f809[_0x253852(0x15a)];_0x169543++){const _0x5aa677=_0x59f809[_0x169543],_0x5e8896=_0x38d73c+'.conditions['+_0x169543+']';_0x5269ce['push'](...checkCondition(_0x5aa677,_0x5e8896,_0x16adc7));}return _0x5269ce;}function a146_0x3b29(){const _0x488c65=['BEHAVIOR_SOURCE_MISSING_FILTER','NESTED_CONDITION_GROUP','aggregation','.source','6022638YODLjB','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','filter','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','.conditions','INVALID_RULE_TYPE','.operator.type','7HqLncB','Attribute\x20name\x20cannot\x20be\x20empty','level','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','rule','MISSING_TIME_UNIT','387102ZDlBGw','map','MISSING_BETWEEN_BOUNDS','message','match','MISSING_OPERATOR_VALUE','code','warning','31185UfOimq','SEGMENT_SCHEMA_ERROR','rule.type','MISSING_NAME','safeParse','Behavior\x20source\x20\x27','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','9810cudugb','EMPTY_ATTRIBUTE','.segment','custom','227802hPeBvD','INVALID_OPERATOR_TYPE','821766meJpHa','source','invalid_value','MISSING_SEGMENT_REFERENCE','document','symbol','error','success','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','1141568JahBmc','path','arrayMatching','Attribute\x20\x27','issues','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','.type','EMPTY_CONDITIONS','conditions','5154650XSEMjk','INVALID_ARRAY_MATCHING','type','push','endsWith','7jKWWBx','.filter','attribute','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','validationCode','32HOdRYH','data','length','.attribute','skipSchema'];a146_0x3b29=function(){return _0x488c65;};return a146_0x3b29();}function a146_0x1b66(_0x5d3191,_0x472030){_0x5d3191=_0x5d3191-0x131;const _0x3b299f=a146_0x3b29();let _0x1b6683=_0x3b299f[_0x5d3191];return _0x1b6683;}function checkCondition(_0x1ea311,_0x54db56,_0x5268f5){const _0x2f9f04=a146_0x1b66,_0x4e412f=[];if(_0x1ea311['type']==='And'||_0x1ea311['type']==='Or')return _0x1ea311['conditions']['length']===0x0?_0x4e412f[_0x2f9f04(0x151)]({'level':'error','path':_0x54db56+_0x2f9f04(0x165),'code':_0x2f9f04(0x14c),'message':_0x1ea311['type']+_0x2f9f04(0x135),'location':getLocationFromPath(_0x5268f5[_0x2f9f04(0x140)],_0x5268f5['source'],pathToArray(_0x54db56+_0x2f9f04(0x165)))}):(_0x4e412f[_0x2f9f04(0x151)]({'level':_0x2f9f04(0x176),'path':_0x54db56,'code':_0x2f9f04(0x15e),'message':_0x1ea311['type']+_0x2f9f04(0x144)+_0x2f9f04(0x16c)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x5268f5['document'],_0x5268f5[_0x2f9f04(0x13d)],pathToArray(_0x54db56))}),_0x4e412f[_0x2f9f04(0x151)](...checkConditions(_0x1ea311[_0x2f9f04(0x14d)],_0x54db56,_0x5268f5))),_0x4e412f;if(_0x1ea311[_0x2f9f04(0x150)]==='Value'||_0x1ea311[_0x2f9f04(0x150)]==='Behavior'){const _0x2967c=_0x1ea311,_0x38a0ad=_0x2967c[_0x2f9f04(0x13d)],_0x1409d7=_0x2967c[_0x2f9f04(0x15f)],_0x15ccef=_0x38a0ad||_0x1409d7;(!_0x2967c[_0x2f9f04(0x155)]||_0x2967c[_0x2f9f04(0x155)]==='')&&(!_0x15ccef&&_0x4e412f['push']({'level':'error','path':_0x54db56+'.attribute','code':_0x2f9f04(0x137),'message':_0x2f9f04(0x169),'location':getLocationFromPath(_0x5268f5[_0x2f9f04(0x140)],_0x5268f5['source'],pathToArray(_0x54db56+'.attribute'))}));_0x2967c[_0x2f9f04(0x163)]&&_0x4e412f[_0x2f9f04(0x151)](...checkRule(_0x2967c['filter'],_0x54db56+_0x2f9f04(0x154),_0x5268f5));if(_0x2967c[_0x2f9f04(0x13d)]){const _0x37c58e=_0x2967c[_0x2f9f04(0x155)]&&_0x2967c[_0x2f9f04(0x155)]!=='';_0x37c58e&&!_0x2967c[_0x2f9f04(0x163)]&&_0x4e412f[_0x2f9f04(0x151)]({'level':'error','path':_0x54db56+_0x2f9f04(0x160),'code':_0x2f9f04(0x15d),'message':_0x2f9f04(0x134)+_0x2967c[_0x2f9f04(0x13d)]+'\x27\x20with\x20attribute\x20\x27'+_0x2967c[_0x2f9f04(0x155)]+'\x27\x20'+_0x2f9f04(0x16b)+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+_0x2f9f04(0x14a),'location':getLocationFromPath(_0x5268f5[_0x2f9f04(0x140)],_0x5268f5[_0x2f9f04(0x13d)],pathToArray(_0x54db56+_0x2f9f04(0x160)))}),_0x37c58e&&_0x2967c[_0x2f9f04(0x163)]&&_0x4e412f[_0x2f9f04(0x151)]({'level':_0x2f9f04(0x176),'path':_0x54db56+_0x2f9f04(0x15b),'code':_0x2f9f04(0x162),'message':_0x2f9f04(0x148)+_0x2967c['attribute']+'\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'+_0x2f9f04(0x156),'location':getLocationFromPath(_0x5268f5[_0x2f9f04(0x140)],_0x5268f5['source'],pathToArray(_0x54db56+'.attribute'))});}}return _0x4e412f;}
@@ -1 +1 @@
1
- function a145_0x2df4(_0x415b61,_0x2b41a1){_0x415b61=_0x415b61-0x1b5;const _0x27a74a=a145_0x27a7();let _0x2df434=_0x27a74a[_0x415b61];return _0x2df434;}(function(_0x5e904c,_0xa0dd71){const _0x4d26a7=a145_0x2df4,_0x5b0f15=_0x5e904c();while(!![]){try{const _0x29f0e2=-parseInt(_0x4d26a7(0x1d0))/0x1*(-parseInt(_0x4d26a7(0x1e8))/0x2)+-parseInt(_0x4d26a7(0x1ee))/0x3*(parseInt(_0x4d26a7(0x1df))/0x4)+parseInt(_0x4d26a7(0x1cb))/0x5*(-parseInt(_0x4d26a7(0x1c7))/0x6)+parseInt(_0x4d26a7(0x1b9))/0x7+parseInt(_0x4d26a7(0x1eb))/0x8*(-parseInt(_0x4d26a7(0x1c9))/0x9)+-parseInt(_0x4d26a7(0x1ba))/0xa+-parseInt(_0x4d26a7(0x1ce))/0xb*(-parseInt(_0x4d26a7(0x1ec))/0xc);if(_0x29f0e2===_0xa0dd71)break;else _0x5b0f15['push'](_0x5b0f15['shift']());}catch(_0x14b05a){_0x5b0f15['push'](_0x5b0f15['shift']());}}}(a145_0x27a7,0x1e3ef));function a145_0x27a7(){const _0x4246cd=['dirname','type','root','parentSegment','relative','journey','invalid_yaml','match','File\x20not\x20found','Not\x20a\x20YAML\x20file:\x20','stat','tdx.json','2524OoZPoQ','cwd','replace','directory','segment','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','context','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','folderPath','15058EbrsrT','scopedFolderPath','File\x20not\x20found:\x20','296qWymon','12JLegah','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','633QXwmeS','configDir','trim','includes','resolve','join','1507849dvolKn','2055440fHgKfj','basename','message','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','isScoped','isFile','file','parse','Parent\x20segment\x20not\x20specified','readFile','segmentName','error','parent_name','633534nNcCsn','resourceType','29439xTnWSC','parent_segment','5jMJQol','file_not_found','No\x20tdx.json\x20found\x20for\x20file:\x20','4631858fXtmKn','no_config','7eFIzax','startsWith','string'];a145_0x27a7=function(){return _0x4246cd;};return a145_0x27a7();}import a145_0x582480 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(_0x325880){const _0x2ac7fd=a145_0x2df4;return _0x325880[_0x2ac7fd(0x1d4)]!==_0x2ac7fd(0x1c5);}export function isScopedResolution(_0x767381){const _0x5ae7ef=a145_0x2df4;return _0x767381[_0x5ae7ef(0x1d4)]==='directory'||_0x767381['type']==='file'||_0x767381[_0x5ae7ef(0x1d4)]===_0x5ae7ef(0x1e5);}export function getScopedDetails(_0x276b26){const _0xb61d4b=a145_0x2df4;if(isScopedResolution(_0x276b26))return{'isScoped':_0x276b26[_0xb61d4b(0x1be)],'scopedFolderPath':_0x276b26[_0xb61d4b(0x1e9)]};return undefined;}async function findTdxConfigAsync(_0x2d5115,_0x4d699e){const _0x2827d6=a145_0x2df4;let _0xffb6c3=a145_0x582480['resolve'](_0x2d5115);const _0x1e6787=a145_0x582480[_0x2827d6(0x1c1)](_0xffb6c3)[_0x2827d6(0x1d5)];while(_0xffb6c3!==_0x1e6787){const _0x3f59b5=a145_0x582480[_0x2827d6(0x1b8)](_0xffb6c3,_0x2827d6(0x1de));if(await _0x4d699e['exists'](_0x3f59b5))try{const _0x45e4c1=await _0x4d699e[_0x2827d6(0x1c3)](_0x3f59b5),_0x1443b7=JSON[_0x2827d6(0x1c1)](_0x45e4c1);if(_0x1443b7[_0x2827d6(0x1ca)]&&typeof _0x1443b7[_0x2827d6(0x1ca)]===_0x2827d6(0x1d2))return{'configPath':_0x3f59b5,'configDir':_0xffb6c3,'parentSegment':_0x1443b7[_0x2827d6(0x1ca)]};}catch{}_0xffb6c3=a145_0x582480[_0x2827d6(0x1d3)](_0xffb6c3);}return null;}function calculateScopedPath(_0x5f15ee,_0x30891d){const _0x41e270=a145_0x2df4,_0x357ba6=a145_0x582480[_0x41e270(0x1d7)](_0x30891d,_0x5f15ee),_0x5810f9=_0x357ba6!==''&&_0x357ba6!=='.'&&!_0x357ba6[_0x41e270(0x1d1)]('..');return{'isScoped':_0x5810f9,'scopedFolderPath':_0x5810f9?_0x357ba6[_0x41e270(0x1e1)](/\\/g,'/'):''};}export async function resolveTarget(_0x5e1ba2){const _0x4b45bc=a145_0x2df4,{arg:_0x5e80cd,contextParent:_0x1ab226,cwd:cwd=process[_0x4b45bc(0x1e0)](),fs:fs=nodeFileSystem}=_0x5e1ba2;if(_0x5e80cd&&isYamlFilePath(_0x5e80cd))try{const _0x1fb344=await resolveYamlFilePath(_0x5e80cd,fs),_0x12101c=a145_0x582480[_0x4b45bc(0x1b7)](_0x5e80cd),_0x18b680=a145_0x582480['dirname'](_0x12101c),_0x1982b6=await findTdxConfigAsync(_0x18b680,fs);if(!_0x1982b6){if(_0x1ab226){const _0x45bc3c=a145_0x582480[_0x4b45bc(0x1d3)](_0x12101c);return{'type':_0x4b45bc(0x1c0),'parentName':_0x1ab226,'targetDir':_0x45bc3c,'configRoot':_0x45bc3c,'filePath':_0x12101c,'resourceName':_0x1fb344[_0x4b45bc(0x1c4)],'folderPath':_0x1fb344[_0x4b45bc(0x1e7)],'resourceType':_0x1fb344[_0x4b45bc(0x1c8)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4b45bc(0x1c5),'errorCode':_0x4b45bc(0x1cf),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x5e80cd,'arg':_0x5e80cd,'helpText':_0x4b45bc(0x1ed)};}const _0x59018c=calculateScopedPath(_0x18b680,_0x1982b6[_0x4b45bc(0x1ef)]);return{'type':'file','parentName':_0x1982b6[_0x4b45bc(0x1d6)],'targetDir':_0x1982b6[_0x4b45bc(0x1ef)],'configRoot':_0x1982b6[_0x4b45bc(0x1ef)],'filePath':_0x12101c,'resourceName':_0x1fb344[_0x4b45bc(0x1c4)],'folderPath':_0x1fb344[_0x4b45bc(0x1e7)],'resourceType':_0x1fb344[_0x4b45bc(0x1c8)],'isScoped':_0x59018c[_0x4b45bc(0x1be)],'scopedFolderPath':_0x59018c[_0x4b45bc(0x1e9)]};}catch(_0x295694){const _0x97a89e=_0x295694 instanceof Error?_0x295694[_0x4b45bc(0x1bc)]:String(_0x295694);if(_0x97a89e[_0x4b45bc(0x1b6)](_0x4b45bc(0x1db)))return{'type':_0x4b45bc(0x1c5),'errorCode':_0x4b45bc(0x1cc),'message':_0x4b45bc(0x1ea)+_0x5e80cd,'arg':_0x5e80cd};if(_0x97a89e[_0x4b45bc(0x1b6)]('No\x20tdx.json\x20found')){if(_0x1ab226){const _0x165b4e=a145_0x582480[_0x4b45bc(0x1b7)](_0x5e80cd);if(await fs['exists'](_0x165b4e)){const _0xf53004=a145_0x582480[_0x4b45bc(0x1d3)](_0x165b4e),_0x3a82fe=await fs['readFile'](_0x165b4e),_0x18bcf4=_0x3a82fe[_0x4b45bc(0x1da)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x10edf3=_0x3a82fe[_0x4b45bc(0x1da)](/^type:\s*["']?([^"'\n]+)["']?/m),_0xeb3a40=_0x18bcf4?_0x18bcf4[0x1][_0x4b45bc(0x1b5)]():a145_0x582480[_0x4b45bc(0x1bb)](_0x5e80cd,a145_0x582480['extname'](_0x5e80cd)),_0x55e614=_0x10edf3&&_0x10edf3[0x1][_0x4b45bc(0x1b5)]()===_0x4b45bc(0x1d8)?_0x4b45bc(0x1d8):_0x4b45bc(0x1e3);return{'type':_0x4b45bc(0x1c0),'parentName':_0x1ab226,'targetDir':_0xf53004,'configRoot':_0xf53004,'filePath':_0x165b4e,'resourceName':_0xeb3a40,'folderPath':'','resourceType':_0x55e614,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x4b45bc(0x1c5),'errorCode':_0x4b45bc(0x1cf),'message':_0x4b45bc(0x1cd)+_0x5e80cd,'arg':_0x5e80cd,'helpText':'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'};}return{'type':_0x4b45bc(0x1c5),'errorCode':_0x4b45bc(0x1d9),'message':_0x97a89e,'arg':_0x5e80cd};}if(_0x5e80cd){const _0x5af050=a145_0x582480[_0x4b45bc(0x1b7)](cwd,_0x5e80cd);let _0x29fd36=null;try{_0x29fd36=await fs[_0x4b45bc(0x1dd)](_0x5af050);}catch{}if(_0x29fd36?.['isDirectory']()){const _0x3b0ef0=await findTdxConfigAsync(_0x5af050,fs);if(_0x3b0ef0){const _0x2e691c=calculateScopedPath(_0x5af050,_0x3b0ef0['configDir']);return{'type':_0x4b45bc(0x1e2),'parentName':_0x3b0ef0[_0x4b45bc(0x1d6)],'targetDir':_0x5af050,'configRoot':_0x3b0ef0[_0x4b45bc(0x1ef)],'isScoped':_0x2e691c[_0x4b45bc(0x1be)],'scopedFolderPath':_0x2e691c[_0x4b45bc(0x1e9)]};}if(_0x1ab226)return{'type':_0x4b45bc(0x1e2),'parentName':_0x1ab226,'targetDir':_0x5af050,'configRoot':_0x5af050,'isScoped':![],'scopedFolderPath':''};return{'type':_0x4b45bc(0x1c5),'errorCode':_0x4b45bc(0x1cf),'message':_0x4b45bc(0x1bd)+_0x5e80cd,'arg':_0x5e80cd,'helpText':_0x4b45bc(0x1ed)};}if(_0x29fd36?.[_0x4b45bc(0x1bf)]())return{'type':_0x4b45bc(0x1c5),'errorCode':_0x4b45bc(0x1d9),'message':_0x4b45bc(0x1dc)+_0x5e80cd,'arg':_0x5e80cd,'helpText':_0x4b45bc(0x1e6)};const _0x34f87=sanitizeFileName(_0x5e80cd),_0x9499e6=getSegmentRootDir(_0x34f87,cwd);return{'type':_0x4b45bc(0x1c6),'parentName':_0x5e80cd,'targetDir':_0x9499e6,'configRoot':_0x9499e6};}const _0x259a06=await findTdxConfigAsync(cwd,fs);if(_0x259a06){const _0x48c697=calculateScopedPath(cwd,_0x259a06[_0x4b45bc(0x1ef)]);return{'type':_0x4b45bc(0x1e5),'parentName':_0x259a06[_0x4b45bc(0x1d6)],'targetDir':cwd,'configRoot':_0x259a06[_0x4b45bc(0x1ef)],'isScoped':_0x48c697['isScoped'],'scopedFolderPath':_0x48c697[_0x4b45bc(0x1e9)]};}if(_0x1ab226){const _0x4264fb=sanitizeFileName(_0x1ab226),_0x439386=getSegmentRootDir(_0x4264fb,cwd);return{'type':_0x4b45bc(0x1e5),'parentName':_0x1ab226,'targetDir':_0x439386,'configRoot':_0x439386,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':_0x4b45bc(0x1c2),'helpText':_0x4b45bc(0x1e4)};}
1
+ (function(_0x353fd5,_0x517165){const _0x37c5c6=a147_0x46cc,_0x4b02a9=_0x353fd5();while(!![]){try{const _0x34fb68=-parseInt(_0x37c5c6(0xd6))/0x1*(parseInt(_0x37c5c6(0xe4))/0x2)+parseInt(_0x37c5c6(0xe0))/0x3*(-parseInt(_0x37c5c6(0xe2))/0x4)+-parseInt(_0x37c5c6(0xed))/0x5*(parseInt(_0x37c5c6(0xea))/0x6)+parseInt(_0x37c5c6(0xe8))/0x7*(-parseInt(_0x37c5c6(0xff))/0x8)+-parseInt(_0x37c5c6(0xf0))/0x9+-parseInt(_0x37c5c6(0xf4))/0xa+-parseInt(_0x37c5c6(0xd3))/0xb*(-parseInt(_0x37c5c6(0xd0))/0xc);if(_0x34fb68===_0x517165)break;else _0x4b02a9['push'](_0x4b02a9['shift']());}catch(_0x50019f){_0x4b02a9['push'](_0x4b02a9['shift']());}}}(a147_0x527d,0x554cc));import a147_0x739ed5 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 a147_0x46cc(_0x22937c,_0x144f27){_0x22937c=_0x22937c-0xca;const _0x527d26=a147_0x527d();let _0x46cc9c=_0x527d26[_0x22937c];return _0x46cc9c;}function a147_0x527d(){const _0x47e481=['460368czMZhk','segmentName','no_config','946iXROww','invalid_yaml','trim','34bQnmco','resourceType','parent_segment','resolve','error','scopedFolderPath','tdx.json','startsWith','match','type','9uIlYXG','message','617668CVWSMG','file_not_found','25012LpBQIE','context','includes','relative','504301qJCrVk','configDir','6BOaWqv','parse','Not\x20a\x20YAML\x20file:\x20','3470275nbBucL','directory','journey','3215061mDqNQF','segment','basename','string','5058760IuvWCh','root','exists','readFile','dirname','join','File\x20not\x20found','isDirectory','replace','parent_name','parentSegment','56SGkScs','cwd','isScoped','extname','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','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','folderPath','file','isFile'];a147_0x527d=function(){return _0x47e481;};return a147_0x527d();}export function isSuccessfulResolution(_0xb2cda3){const _0x463e0c=a147_0x46cc;return _0xb2cda3[_0x463e0c(0xdf)]!==_0x463e0c(0xda);}export function isScopedResolution(_0x51eabb){const _0x4f2655=a147_0x46cc;return _0x51eabb[_0x4f2655(0xdf)]===_0x4f2655(0xee)||_0x51eabb[_0x4f2655(0xdf)]==='file'||_0x51eabb['type']===_0x4f2655(0xe5);}export function getScopedDetails(_0x1af02a){const _0x21c517=a147_0x46cc;if(isScopedResolution(_0x1af02a))return{'isScoped':_0x1af02a[_0x21c517(0x101)],'scopedFolderPath':_0x1af02a[_0x21c517(0xdb)]};return undefined;}async function findTdxConfigAsync(_0x512e11,_0x5ba727){const _0x4c22f6=a147_0x46cc;let _0x44d799=a147_0x739ed5[_0x4c22f6(0xd9)](_0x512e11);const _0x518436=a147_0x739ed5['parse'](_0x44d799)[_0x4c22f6(0xf5)];while(_0x44d799!==_0x518436){const _0x3e1825=a147_0x739ed5[_0x4c22f6(0xf9)](_0x44d799,_0x4c22f6(0xdc));if(await _0x5ba727[_0x4c22f6(0xf6)](_0x3e1825))try{const _0x2e847=await _0x5ba727['readFile'](_0x3e1825),_0x30f2bd=JSON[_0x4c22f6(0xeb)](_0x2e847);if(_0x30f2bd['parent_segment']&&typeof _0x30f2bd['parent_segment']===_0x4c22f6(0xf3))return{'configPath':_0x3e1825,'configDir':_0x44d799,'parentSegment':_0x30f2bd[_0x4c22f6(0xd8)]};}catch{}_0x44d799=a147_0x739ed5['dirname'](_0x44d799);}return null;}function calculateScopedPath(_0x3c97ea,_0x5ca6db){const _0x2cd062=a147_0x46cc,_0x39dc53=a147_0x739ed5[_0x2cd062(0xe7)](_0x5ca6db,_0x3c97ea),_0x470704=_0x39dc53!==''&&_0x39dc53!=='.'&&!_0x39dc53[_0x2cd062(0xdd)]('..');return{'isScoped':_0x470704,'scopedFolderPath':_0x470704?_0x39dc53[_0x2cd062(0xfc)](/\\/g,'/'):''};}export async function resolveTarget(_0x45a95e){const _0x1fa545=a147_0x46cc,{arg:_0x5b3fb4,contextParent:_0x450cf1,cwd:cwd=process[_0x1fa545(0x100)](),fs:fs=nodeFileSystem}=_0x45a95e;if(_0x5b3fb4&&isYamlFilePath(_0x5b3fb4))try{const _0x2d88cc=await resolveYamlFilePath(_0x5b3fb4,fs),_0x104f18=a147_0x739ed5['resolve'](_0x5b3fb4),_0x3d5bea=a147_0x739ed5['dirname'](_0x104f18),_0x488cd0=await findTdxConfigAsync(_0x3d5bea,fs);if(!_0x488cd0){if(_0x450cf1){const _0x5c056b=a147_0x739ed5[_0x1fa545(0xf8)](_0x104f18);return{'type':_0x1fa545(0xce),'parentName':_0x450cf1,'targetDir':_0x5c056b,'configRoot':_0x5c056b,'filePath':_0x104f18,'resourceName':_0x2d88cc[_0x1fa545(0xd1)],'folderPath':_0x2d88cc[_0x1fa545(0xcd)],'resourceType':_0x2d88cc[_0x1fa545(0xd7)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1fa545(0xda),'errorCode':_0x1fa545(0xd2),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x5b3fb4,'arg':_0x5b3fb4,'helpText':_0x1fa545(0xcc)};}const _0x387d6d=calculateScopedPath(_0x3d5bea,_0x488cd0[_0x1fa545(0xe9)]);return{'type':_0x1fa545(0xce),'parentName':_0x488cd0['parentSegment'],'targetDir':_0x488cd0[_0x1fa545(0xe9)],'configRoot':_0x488cd0['configDir'],'filePath':_0x104f18,'resourceName':_0x2d88cc[_0x1fa545(0xd1)],'folderPath':_0x2d88cc[_0x1fa545(0xcd)],'resourceType':_0x2d88cc[_0x1fa545(0xd7)],'isScoped':_0x387d6d[_0x1fa545(0x101)],'scopedFolderPath':_0x387d6d[_0x1fa545(0xdb)]};}catch(_0x4a88da){const _0xc9c819=_0x4a88da instanceof Error?_0x4a88da[_0x1fa545(0xe1)]:String(_0x4a88da);if(_0xc9c819[_0x1fa545(0xe6)](_0x1fa545(0xfa)))return{'type':'error','errorCode':_0x1fa545(0xe3),'message':'File\x20not\x20found:\x20'+_0x5b3fb4,'arg':_0x5b3fb4};if(_0xc9c819['includes']('No\x20tdx.json\x20found')){if(_0x450cf1){const _0x55bc9e=a147_0x739ed5[_0x1fa545(0xd9)](_0x5b3fb4);if(await fs[_0x1fa545(0xf6)](_0x55bc9e)){const _0xa85769=a147_0x739ed5[_0x1fa545(0xf8)](_0x55bc9e),_0x400839=await fs[_0x1fa545(0xf7)](_0x55bc9e),_0x1cc874=_0x400839[_0x1fa545(0xde)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x310f7a=_0x400839[_0x1fa545(0xde)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x35d6b7=_0x1cc874?_0x1cc874[0x1][_0x1fa545(0xd5)]():a147_0x739ed5[_0x1fa545(0xf2)](_0x5b3fb4,a147_0x739ed5[_0x1fa545(0xca)](_0x5b3fb4)),_0x3334d2=_0x310f7a&&_0x310f7a[0x1][_0x1fa545(0xd5)]()===_0x1fa545(0xef)?_0x1fa545(0xef):_0x1fa545(0xf1);return{'type':_0x1fa545(0xce),'parentName':_0x450cf1,'targetDir':_0xa85769,'configRoot':_0xa85769,'filePath':_0x55bc9e,'resourceName':_0x35d6b7,'folderPath':'','resourceType':_0x3334d2,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1fa545(0xda),'errorCode':_0x1fa545(0xd2),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x5b3fb4,'arg':_0x5b3fb4,'helpText':_0x1fa545(0xcc)};}return{'type':_0x1fa545(0xda),'errorCode':_0x1fa545(0xd4),'message':_0xc9c819,'arg':_0x5b3fb4};}if(_0x5b3fb4){const _0x4a3337=a147_0x739ed5['resolve'](cwd,_0x5b3fb4);let _0x53d255=null;try{_0x53d255=await fs['stat'](_0x4a3337);}catch{}if(_0x53d255?.[_0x1fa545(0xfb)]()){const _0x53839c=await findTdxConfigAsync(_0x4a3337,fs);if(_0x53839c){const _0x2d7940=calculateScopedPath(_0x4a3337,_0x53839c['configDir']);return{'type':'directory','parentName':_0x53839c[_0x1fa545(0xfe)],'targetDir':_0x4a3337,'configRoot':_0x53839c[_0x1fa545(0xe9)],'isScoped':_0x2d7940['isScoped'],'scopedFolderPath':_0x2d7940[_0x1fa545(0xdb)]};}if(_0x450cf1)return{'type':_0x1fa545(0xee),'parentName':_0x450cf1,'targetDir':_0x4a3337,'configRoot':_0x4a3337,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x1fa545(0xd2),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x5b3fb4,'arg':_0x5b3fb4,'helpText':_0x1fa545(0xcc)};}if(_0x53d255?.[_0x1fa545(0xcf)]())return{'type':_0x1fa545(0xda),'errorCode':_0x1fa545(0xd4),'message':_0x1fa545(0xec)+_0x5b3fb4,'arg':_0x5b3fb4,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x5b5711=sanitizeFileName(_0x5b3fb4),_0x19bc96=getSegmentRootDir(_0x5b5711,cwd);return{'type':_0x1fa545(0xfd),'parentName':_0x5b3fb4,'targetDir':_0x19bc96,'configRoot':_0x19bc96};}const _0x3e8734=await findTdxConfigAsync(cwd,fs);if(_0x3e8734){const _0x5ea787=calculateScopedPath(cwd,_0x3e8734[_0x1fa545(0xe9)]);return{'type':_0x1fa545(0xe5),'parentName':_0x3e8734[_0x1fa545(0xfe)],'targetDir':cwd,'configRoot':_0x3e8734[_0x1fa545(0xe9)],'isScoped':_0x5ea787[_0x1fa545(0x101)],'scopedFolderPath':_0x5ea787[_0x1fa545(0xdb)]};}if(_0x450cf1){const _0x43b6b4=sanitizeFileName(_0x450cf1),_0x89f692=getSegmentRootDir(_0x43b6b4,cwd);return{'type':_0x1fa545(0xe5),'parentName':_0x450cf1,'targetDir':_0x89f692,'configRoot':_0x89f692,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1fa545(0xda),'errorCode':'no_parent','message':'Parent\x20segment\x20not\x20specified','helpText':_0x1fa545(0xcb)};}
@@ -1 +1 @@
1
- const a146_0x5ef400=a146_0x15c9;(function(_0x4e745e,_0x48dfe9){const _0x459572=a146_0x15c9,_0x2ef276=_0x4e745e();while(!![]){try{const _0x35ebf3=parseInt(_0x459572(0x1cb))/0x1+parseInt(_0x459572(0x1d4))/0x2+-parseInt(_0x459572(0x1d2))/0x3+-parseInt(_0x459572(0x1ce))/0x4+parseInt(_0x459572(0x1d5))/0x5+-parseInt(_0x459572(0x1d3))/0x6*(-parseInt(_0x459572(0x1d1))/0x7)+parseInt(_0x459572(0x1d0))/0x8;if(_0x35ebf3===_0x48dfe9)break;else _0x2ef276['push'](_0x2ef276['shift']());}catch(_0x3cf55f){_0x2ef276['push'](_0x2ef276['shift']());}}}(a146_0x45d4,0x23f17));import{existsSync,readFileSync}from'fs';function a146_0x45d4(){const _0x223403=['join','cwd','object','segments','65977SUPKVy','string','parent_segment','1060144hTQwSZ','dirname','2376952oGBoQG','77LAbaHl','871524vPzeEz','13482lfjspF','183452bIJmyL','1116140DQpVCE','relative','Invalid\x20tdx.json:\x20expected\x20object','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','engage_workspace','startsWith','resolve','Invalid\x20JSON\x20in\x20','stringify','parse','utf-8'];a146_0x45d4=function(){return _0x223403;};return a146_0x45d4();}import a146_0x26dda9 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a146_0x5ef400(0x1ca);export function findTdxConfigPath(_0x348059=process[a146_0x5ef400(0x1c8)]()){const _0x3b4f42=a146_0x5ef400;let _0x1b96cd=a146_0x26dda9['resolve'](_0x348059);const _0x7d012b=a146_0x26dda9[_0x3b4f42(0x1c5)](_0x1b96cd)['root'];while(_0x1b96cd!==_0x7d012b){const _0xc59e40=a146_0x26dda9['join'](_0x1b96cd,TDX_CONFIG_FILE);if(existsSync(_0xc59e40))return _0xc59e40;_0x1b96cd=a146_0x26dda9['dirname'](_0x1b96cd);}return null;}export function loadTdxConfig(_0x5345d5){const _0x81f958=a146_0x5ef400,_0x3bc4c6=readFileSync(_0x5345d5,_0x81f958(0x1c6));let _0x134e50;try{_0x134e50=JSON['parse'](_0x3bc4c6);}catch{throw new Error(_0x81f958(0x1c3)+_0x5345d5);}if(!_0x134e50||typeof _0x134e50!==_0x81f958(0x1c9))throw new Error(_0x81f958(0x1d7));const _0x10becd=_0x134e50,_0x5438ad=_0x10becd[_0x81f958(0x1cd)]&&typeof _0x10becd['parent_segment']===_0x81f958(0x1cc),_0x6592c9=_0x10becd['engage_workspace']&&typeof _0x10becd[_0x81f958(0x1c0)]===_0x81f958(0x1cc);if(!_0x5438ad&&!_0x6592c9)throw new Error(_0x81f958(0x1d8));const _0x153f94={};return _0x5438ad&&(_0x153f94[_0x81f958(0x1cd)]=_0x10becd[_0x81f958(0x1cd)]),_0x6592c9&&(_0x153f94[_0x81f958(0x1c0)]=_0x10becd[_0x81f958(0x1c0)]),_0x153f94;}export function findTdxConfig(_0xa13871=process[a146_0x5ef400(0x1c8)]()){const _0x205016=a146_0x5ef400,_0x3e7b8a=findTdxConfigPath(_0xa13871);if(!_0x3e7b8a)throw new Error(_0x205016(0x1bf));const _0x50ebb4=loadTdxConfig(_0x3e7b8a),_0x923180=a146_0x26dda9[_0x205016(0x1cf)](_0x3e7b8a);return{'config':_0x50ebb4,'configPath':_0x3e7b8a,'configDir':_0x923180};}function a146_0x15c9(_0x57f5e3,_0x31d5d8){_0x57f5e3=_0x57f5e3-0x1bf;const _0x45d4f2=a146_0x45d4();let _0x15c9cc=_0x45d4f2[_0x57f5e3];return _0x15c9cc;}export function tryFindTdxConfig(_0x3e177d){try{return findTdxConfig(_0x3e177d);}catch{return null;}}export function getSegmentRootDir(_0x3d7648,_0x453cdc=process[a146_0x5ef400(0x1c8)]()){return a146_0x26dda9['join'](_0x453cdc,SEGMENTS_DIR,_0x3d7648);}export function getTdxConfigPath(_0x30dc87,_0x516b5d=process['cwd']()){const _0x2d874a=a146_0x5ef400;return a146_0x26dda9[_0x2d874a(0x1c7)](getSegmentRootDir(_0x30dc87,_0x516b5d),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x155393,_0x4f9a36){const _0x5912ca=a146_0x5ef400,_0x45cb3a=a146_0x26dda9[_0x5912ca(0x1c2)](_0x155393),_0x56fee8=a146_0x26dda9[_0x5912ca(0x1d6)](_0x4f9a36,_0x45cb3a);if(_0x56fee8[_0x5912ca(0x1c1)]('..'))return'';return _0x56fee8;}export function localPathToTdFolderPath(_0xbd3a5c){const _0x3bef6e=a146_0x5ef400,_0x102a5b=a146_0x26dda9[_0x3bef6e(0x1cf)](_0xbd3a5c);if(_0x102a5b==='.'||_0x102a5b==='')return'';return _0x102a5b['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x10ac7a,_0x3f89f8){if(!_0x10ac7a)return _0x3f89f8;return a146_0x26dda9['join'](_0x3f89f8,_0x10ac7a);}export function createTdxConfigContent(_0x4d6f6d){const _0x85ec50=a146_0x5ef400,_0x423680={'parent_segment':_0x4d6f6d};return JSON[_0x85ec50(0x1c4)](_0x423680,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x260ed7){const _0x2def93=a146_0x5ef400,_0x22b3d7={'engage_workspace':_0x260ed7};return JSON[_0x2def93(0x1c4)](_0x22b3d7,null,0x2)+'\x0a';}
1
+ const a148_0x31f708=a148_0x1547;(function(_0x7cf7d,_0x2a1d83){const _0x299f83=a148_0x1547,_0x405fc4=_0x7cf7d();while(!![]){try{const _0x482f7c=parseInt(_0x299f83(0x1b7))/0x1+parseInt(_0x299f83(0x1aa))/0x2*(-parseInt(_0x299f83(0x1af))/0x3)+-parseInt(_0x299f83(0x1a2))/0x4+-parseInt(_0x299f83(0x1b8))/0x5+-parseInt(_0x299f83(0x1b2))/0x6+-parseInt(_0x299f83(0x1bb))/0x7+parseInt(_0x299f83(0x1b3))/0x8*(parseInt(_0x299f83(0x1a3))/0x9);if(_0x482f7c===_0x2a1d83)break;else _0x405fc4['push'](_0x405fc4['shift']());}catch(_0x46893e){_0x405fc4['push'](_0x405fc4['shift']());}}}(a148_0x1c28,0x2e7aa));import{existsSync,readFileSync}from'fs';import a148_0xd5a92c from'path';const TDX_CONFIG_FILE=a148_0x31f708(0x1a9),SEGMENTS_DIR=a148_0x31f708(0x1bc);export function findTdxConfigPath(_0x2d637a=process[a148_0x31f708(0x1a8)]()){const _0x6a5cba=a148_0x31f708;let _0xdfa820=a148_0xd5a92c[_0x6a5cba(0x1b1)](_0x2d637a);const _0x3d9239=a148_0xd5a92c[_0x6a5cba(0x1b6)](_0xdfa820)['root'];while(_0xdfa820!==_0x3d9239){const _0x5c9b9c=a148_0xd5a92c['join'](_0xdfa820,TDX_CONFIG_FILE);if(existsSync(_0x5c9b9c))return _0x5c9b9c;_0xdfa820=a148_0xd5a92c['dirname'](_0xdfa820);}return null;}export function loadTdxConfig(_0x55353){const _0x1c4096=a148_0x31f708,_0x2b01e4=readFileSync(_0x55353,_0x1c4096(0x1a7));let _0xa6c411;try{_0xa6c411=JSON[_0x1c4096(0x1b6)](_0x2b01e4);}catch{throw new Error(_0x1c4096(0x1ae)+_0x55353);}if(!_0xa6c411||typeof _0xa6c411!==_0x1c4096(0x1a5))throw new Error(_0x1c4096(0x1b0));const _0x5cfcd8=_0xa6c411,_0x37fcb1=_0x5cfcd8['parent_segment']&&typeof _0x5cfcd8[_0x1c4096(0x1ab)]===_0x1c4096(0x1b9),_0x24accb=_0x5cfcd8['engage_workspace']&&typeof _0x5cfcd8[_0x1c4096(0x1ba)]==='string';if(!_0x37fcb1&&!_0x24accb)throw new Error(_0x1c4096(0x1ac));const _0x1373af={};return _0x37fcb1&&(_0x1373af[_0x1c4096(0x1ab)]=_0x5cfcd8[_0x1c4096(0x1ab)]),_0x24accb&&(_0x1373af[_0x1c4096(0x1ba)]=_0x5cfcd8[_0x1c4096(0x1ba)]),_0x1373af;}function a148_0x1c28(){const _0xeb20fb=['Invalid\x20JSON\x20in\x20','3gMgcXG','Invalid\x20tdx.json:\x20expected\x20object','resolve','1013442pvvDpC','64lnlCRE','dirname','startsWith','parse','81666AEZRrd','794980gVeJlk','string','engage_workspace','386610JwQzja','segments','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','811248SqHQMA','1194066DZncls','join','object','replace','utf-8','cwd','tdx.json','733470aelriq','parent_segment','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','stringify'];a148_0x1c28=function(){return _0xeb20fb;};return a148_0x1c28();}export function findTdxConfig(_0x248602=process[a148_0x31f708(0x1a8)]()){const _0x3ce75e=a148_0x31f708,_0x11bc34=findTdxConfigPath(_0x248602);if(!_0x11bc34)throw new Error(_0x3ce75e(0x1bd));const _0x29a071=loadTdxConfig(_0x11bc34),_0x172f2d=a148_0xd5a92c[_0x3ce75e(0x1b4)](_0x11bc34);return{'config':_0x29a071,'configPath':_0x11bc34,'configDir':_0x172f2d};}export function tryFindTdxConfig(_0x331679){try{return findTdxConfig(_0x331679);}catch{return null;}}export function getSegmentRootDir(_0x4d5b89,_0xe9a90d=process[a148_0x31f708(0x1a8)]()){return a148_0xd5a92c['join'](_0xe9a90d,SEGMENTS_DIR,_0x4d5b89);}export function getTdxConfigPath(_0x31e068,_0x999418=process[a148_0x31f708(0x1a8)]()){return a148_0xd5a92c['join'](getSegmentRootDir(_0x31e068,_0x999418),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x1cc805,_0x5e0e7c){const _0x184cae=a148_0x31f708,_0x35c1ab=a148_0xd5a92c[_0x184cae(0x1b1)](_0x1cc805),_0x5542be=a148_0xd5a92c['relative'](_0x5e0e7c,_0x35c1ab);if(_0x5542be[_0x184cae(0x1b5)]('..'))return'';return _0x5542be;}export function localPathToTdFolderPath(_0xc5fae3){const _0x1e7d84=a148_0x31f708,_0x89c63d=a148_0xd5a92c[_0x1e7d84(0x1b4)](_0xc5fae3);if(_0x89c63d==='.'||_0x89c63d==='')return'';return _0x89c63d[_0x1e7d84(0x1a6)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x11f322,_0x1c936a){const _0x15d520=a148_0x31f708;if(!_0x11f322)return _0x1c936a;return a148_0xd5a92c[_0x15d520(0x1a4)](_0x1c936a,_0x11f322);}function a148_0x1547(_0x1c19da,_0x5b9afe){_0x1c19da=_0x1c19da-0x1a2;const _0x1c2808=a148_0x1c28();let _0x1547d3=_0x1c2808[_0x1c19da];return _0x1547d3;}export function createTdxConfigContent(_0x2bb029){const _0x2aecac={'parent_segment':_0x2bb029};return JSON['stringify'](_0x2aecac,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3370d2){const _0x31b7ab=a148_0x31f708,_0x221754={'engage_workspace':_0x3370d2};return JSON[_0x31b7ab(0x1ad)](_0x221754,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a147_0x3781ca=a147_0x1b86;(function(_0x3c119d,_0x426b07){const _0x33cee5=a147_0x1b86,_0x169db3=_0x3c119d();while(!![]){try{const _0x1e9b4b=parseInt(_0x33cee5(0x203))/0x1*(parseInt(_0x33cee5(0x1f7))/0x2)+parseInt(_0x33cee5(0x205))/0x3*(-parseInt(_0x33cee5(0x1f4))/0x4)+-parseInt(_0x33cee5(0x217))/0x5*(parseInt(_0x33cee5(0x1f6))/0x6)+parseInt(_0x33cee5(0x21c))/0x7*(parseInt(_0x33cee5(0x20b))/0x8)+parseInt(_0x33cee5(0x215))/0x9*(parseInt(_0x33cee5(0x20c))/0xa)+parseInt(_0x33cee5(0x213))/0xb+-parseInt(_0x33cee5(0x1ff))/0xc;if(_0x1e9b4b===_0x426b07)break;else _0x169db3['push'](_0x169db3['shift']());}catch(_0x1a9131){_0x169db3['push'](_0x169db3['shift']());}}}(a147_0xea42,0x82843));import{z}from'zod';function a147_0x1b86(_0x7f8477,_0x3e148a){_0x7f8477=_0x7f8477-0x1f4;const _0xea42a2=a147_0xea42();let _0x1b8658=_0xea42a2[_0x7f8477];return _0x1b8658;}export const ScheduleTypeSchema=z[a147_0x3781ca(0x1f5)]([a147_0x3781ca(0x204),'hourly',a147_0x3781ca(0x20d),'weekly','monthly',a147_0x3781ca(0x209),a147_0x3781ca(0x1fa)]);export const RepeatUnitSchema=z[a147_0x3781ca(0x1f5)](['minute',a147_0x3781ca(0x1f8),'day',a147_0x3781ca(0x1fe),a147_0x3781ca(0x208),a147_0x3781ca(0x218),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a147_0x3781ca(0x20a)](),'repeat_unit':RepeatUnitSchema[a147_0x3781ca(0x20a)](),'repeat_frequency':z[a147_0x3781ca(0x211)]()[a147_0x3781ca(0x20a)](),'repeat_sub_frequency':z['array'](z[a147_0x3781ca(0x211)]())['optional'](),'start_at':z[a147_0x3781ca(0x1fb)]()['nullable']()['optional'](),'end_on':z[a147_0x3781ca(0x1fb)]()[a147_0x3781ca(0x21a)]()[a147_0x3781ca(0x20a)](),'timezone':z[a147_0x3781ca(0x1fb)]()[a147_0x3781ca(0x20a)]()});export const NotificationDefSchema=z['object']({'notify_on':z[a147_0x3781ca(0x21b)](z['enum']([a147_0x3781ca(0x206),a147_0x3781ca(0x210)]))[a147_0x3781ca(0x20a)](),'email_recipients':z['array'](z[a147_0x3781ca(0x1fb)]())[a147_0x3781ca(0x20a)]()});function a147_0xea42(){const _0x2c730e=['min','All','week','10129128duHTrv','clear','boolean','masked','7377ivAxkT','none','6mKotmJ','onSuccess','First','month','cron','optional','8307272bdtRIa','110BVZQWO','daily','union','unknown','onFailure','number','record','7052760WbrNlM','object','343341osHkSx','rows','150YbMvwj','once','Connection\x20name\x20is\x20required','nullable','array','7bfWkJk','1392492COvaRC','enum','65346btXqMr','82YsSgET','hour','cols','minutes_interval','string'];a147_0xea42=function(){return _0x2c730e;};return a147_0xea42();}export const ActivationColumnDefSchema=z[a147_0x3781ca(0x20e)]([z['string'](),z['object']({'name':z[a147_0x3781ca(0x1fb)](),'type':z[a147_0x3781ca(0x1fb)]()[a147_0x3781ca(0x20a)](),'visibility':z[a147_0x3781ca(0x1f5)](['clear',a147_0x3781ca(0x202)])[a147_0x3781ca(0x20a)]()})]);export const ActivationBehaviorDefSchema=z[a147_0x3781ca(0x214)]({'columns':z[a147_0x3781ca(0x21b)](z[a147_0x3781ca(0x214)]({'name':z[a147_0x3781ca(0x1fb)](),'type':z[a147_0x3781ca(0x1fb)]()[a147_0x3781ca(0x20a)](),'visibility':z[a147_0x3781ca(0x1f5)]([a147_0x3781ca(0x200),a147_0x3781ca(0x202)])[a147_0x3781ca(0x20a)]()}))['optional'](),'behavior_table':z[a147_0x3781ca(0x1fb)]()['optional'](),'join_row':z[a147_0x3781ca(0x211)]()[a147_0x3781ca(0x21a)]()[a147_0x3781ca(0x20a)](),'join_strategy':z[a147_0x3781ca(0x1f5)]([a147_0x3781ca(0x1fd),a147_0x3781ca(0x207),'Last','Top-N'])[a147_0x3781ca(0x20a)](),'formatting':z[a147_0x3781ca(0x1f5)]([a147_0x3781ca(0x216),a147_0x3781ca(0x1f9)])['optional'](),'order_by':z[a147_0x3781ca(0x21b)](z[a147_0x3781ca(0x214)]({'key':z['string'](),'order':z[a147_0x3781ca(0x1f5)](['asc','desc'])}))['optional']()});export const ActivationDefSchema=z[a147_0x3781ca(0x214)]({'name':z[a147_0x3781ca(0x1fb)]()['min'](0x1,'Activation\x20name\x20is\x20required'),'description':z[a147_0x3781ca(0x1fb)]()[a147_0x3781ca(0x20a)](),'connection':z['string']()[a147_0x3781ca(0x1fc)](0x1,a147_0x3781ca(0x219)),'all_columns':z[a147_0x3781ca(0x201)]()['optional'](),'columns':z[a147_0x3781ca(0x21b)](ActivationColumnDefSchema)[a147_0x3781ca(0x20a)](),'schedule':ScheduleDefSchema[a147_0x3781ca(0x20a)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a147_0x3781ca(0x212)](z[a147_0x3781ca(0x1fb)](),z[a147_0x3781ca(0x20f)]())[a147_0x3781ca(0x20a)](),'activation_template_id':z[a147_0x3781ca(0x1fb)]()[a147_0x3781ca(0x21a)]()[a147_0x3781ca(0x20a)](),'behavior':ActivationBehaviorDefSchema[a147_0x3781ca(0x21a)]()[a147_0x3781ca(0x20a)](),'run_after_journey_refresh':z[a147_0x3781ca(0x201)]()[a147_0x3781ca(0x20a)]()});
1
+ const a149_0x91d678=a149_0x5027;(function(_0x15732f,_0x5c8276){const _0x40eb1a=a149_0x5027,_0x4e790f=_0x15732f();while(!![]){try{const _0x565882=-parseInt(_0x40eb1a(0x8c))/0x1*(-parseInt(_0x40eb1a(0x92))/0x2)+parseInt(_0x40eb1a(0x8b))/0x3+-parseInt(_0x40eb1a(0x98))/0x4*(parseInt(_0x40eb1a(0xab))/0x5)+-parseInt(_0x40eb1a(0xa1))/0x6+-parseInt(_0x40eb1a(0xae))/0x7+-parseInt(_0x40eb1a(0x9b))/0x8*(parseInt(_0x40eb1a(0x9e))/0x9)+-parseInt(_0x40eb1a(0x9a))/0xa*(-parseInt(_0x40eb1a(0xa6))/0xb);if(_0x565882===_0x5c8276)break;else _0x4e790f['push'](_0x4e790f['shift']());}catch(_0x27c564){_0x4e790f['push'](_0x4e790f['shift']());}}}(a149_0x2b14,0x90789));import{z}from'zod';export const ScheduleTypeSchema=z[a149_0x91d678(0x88)]([a149_0x91d678(0x93),a149_0x91d678(0x99),a149_0x91d678(0xa2),a149_0x91d678(0x9f),a149_0x91d678(0x8e),a149_0x91d678(0x94),a149_0x91d678(0x90)]);export const RepeatUnitSchema=z['enum']([a149_0x91d678(0x86),a149_0x91d678(0x9c),a149_0x91d678(0xa4),a149_0x91d678(0x97),a149_0x91d678(0xa9),a149_0x91d678(0x95),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a149_0x91d678(0x87)](),'repeat_unit':RepeatUnitSchema[a149_0x91d678(0x87)](),'repeat_frequency':z[a149_0x91d678(0xa5)]()[a149_0x91d678(0x87)](),'repeat_sub_frequency':z['array'](z[a149_0x91d678(0xa5)]())['optional'](),'start_at':z['string']()[a149_0x91d678(0xad)]()['optional'](),'end_on':z[a149_0x91d678(0x8d)]()[a149_0x91d678(0xad)]()[a149_0x91d678(0x87)](),'timezone':z[a149_0x91d678(0x8d)]()[a149_0x91d678(0x87)]()});export const NotificationDefSchema=z['object']({'notify_on':z[a149_0x91d678(0xa7)](z[a149_0x91d678(0x88)]([a149_0x91d678(0xa0),'onFailure']))[a149_0x91d678(0x87)](),'email_recipients':z['array'](z['string']())['optional']()});export const ActivationColumnDefSchema=z[a149_0x91d678(0xb1)]([z[a149_0x91d678(0x8d)](),z[a149_0x91d678(0x91)]({'name':z[a149_0x91d678(0x8d)](),'type':z[a149_0x91d678(0x8d)]()[a149_0x91d678(0x87)](),'visibility':z[a149_0x91d678(0x88)]([a149_0x91d678(0xaa),a149_0x91d678(0xaf)])[a149_0x91d678(0x87)]()})]);function a149_0x2b14(){const _0xc0f9c8=['daily','Activation\x20name\x20is\x20required','day','number','22mtUnDk','array','First','month','clear','223010UzPuqA','cols','nullable','7231007aWEWCK','masked','boolean','union','minute','optional','enum','record','All','1042065qbjZAx','46853ejXgll','string','monthly','Connection\x20name\x20is\x20required','minutes_interval','object','2UhXPWU','none','cron','once','min','week','20HtGXpo','hourly','11373560tojOBQ','130552xwSgWJ','hour','Last','9nxqsWL','weekly','onSuccess','4829022OYTOrJ'];a149_0x2b14=function(){return _0xc0f9c8;};return a149_0x2b14();}export const ActivationBehaviorDefSchema=z[a149_0x91d678(0x91)]({'columns':z['array'](z[a149_0x91d678(0x91)]({'name':z['string'](),'type':z['string']()['optional'](),'visibility':z[a149_0x91d678(0x88)]([a149_0x91d678(0xaa),a149_0x91d678(0xaf)])['optional']()}))['optional'](),'behavior_table':z['string']()[a149_0x91d678(0x87)](),'join_row':z['number']()[a149_0x91d678(0xad)]()['optional'](),'join_strategy':z[a149_0x91d678(0x88)]([a149_0x91d678(0x8a),a149_0x91d678(0xa8),a149_0x91d678(0x9d),'Top-N'])['optional'](),'formatting':z[a149_0x91d678(0x88)](['rows',a149_0x91d678(0xac)])[a149_0x91d678(0x87)](),'order_by':z['array'](z[a149_0x91d678(0x91)]({'key':z[a149_0x91d678(0x8d)](),'order':z['enum'](['asc','desc'])}))[a149_0x91d678(0x87)]()});function a149_0x5027(_0x369160,_0x3eeb08){_0x369160=_0x369160-0x86;const _0x2b140a=a149_0x2b14();let _0x502783=_0x2b140a[_0x369160];return _0x502783;}export const ActivationDefSchema=z[a149_0x91d678(0x91)]({'name':z['string']()[a149_0x91d678(0x96)](0x1,a149_0x91d678(0xa3)),'description':z['string']()[a149_0x91d678(0x87)](),'connection':z[a149_0x91d678(0x8d)]()[a149_0x91d678(0x96)](0x1,a149_0x91d678(0x8f)),'all_columns':z[a149_0x91d678(0xb0)]()[a149_0x91d678(0x87)](),'columns':z[a149_0x91d678(0xa7)](ActivationColumnDefSchema)[a149_0x91d678(0x87)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a149_0x91d678(0x87)](),'connector_config':z[a149_0x91d678(0x89)](z['string'](),z['unknown']())[a149_0x91d678(0x87)](),'activation_template_id':z[a149_0x91d678(0x8d)]()[a149_0x91d678(0xad)]()[a149_0x91d678(0x87)](),'behavior':ActivationBehaviorDefSchema[a149_0x91d678(0xad)]()[a149_0x91d678(0x87)](),'run_after_journey_refresh':z[a149_0x91d678(0xb0)]()[a149_0x91d678(0x87)]()});
@@ -1 +1 @@
1
- function a148_0x2dce(_0xcba2eb,_0x3a34b9){_0xcba2eb=_0xcba2eb-0xc3;var _0x40f941=a148_0x40f9();var _0x2dcea8=_0x40f941[_0xcba2eb];return _0x2dcea8;}function a148_0x40f9(){var _0x505704=['4611123xJkAdy','470519FwlgOs','48yXjMxW','50TyJIOH','23750PuXdja','14004804nPpydW','321820WSfcPp','198fBpSIt','911220rbJgPg','643716RRoGFl','3JqmhZt','25bxSdJo'];a148_0x40f9=function(){return _0x505704;};return a148_0x40f9();}(function(_0x25eb8c,_0x268e08){var _0x5a67df=a148_0x2dce,_0x252b57=_0x25eb8c();while(!![]){try{var _0x387546=-parseInt(_0x5a67df(0xc7))/0x1*(parseInt(_0x5a67df(0xc8))/0x2)+-parseInt(_0x5a67df(0xce))/0x3*(-parseInt(_0x5a67df(0xcc))/0x4)+-parseInt(_0x5a67df(0xc3))/0x5*(-parseInt(_0x5a67df(0xcd))/0x6)+parseInt(_0x5a67df(0xc5))/0x7*(parseInt(_0x5a67df(0xc6))/0x8)+parseInt(_0x5a67df(0xcb))/0x9*(-parseInt(_0x5a67df(0xca))/0xa)+-parseInt(_0x5a67df(0xc4))/0xb+parseInt(_0x5a67df(0xc9))/0xc;if(_0x387546===_0x268e08)break;else _0x252b57['push'](_0x252b57['shift']());}catch(_0x94f8e0){_0x252b57['push'](_0x252b57['shift']());}}}(a148_0x40f9,0x95d19));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a150_0x4866(){var _0x419f2e=['200229NWoaiQ','6ujSioh','1311416TfJPsU','48opynRw','889jgkmKi','2EMaXnz','1945834PxEDRX','888365wBZdrX','12856MLoXOD','18666KtLpyE','1030uAJTKe','631458RAnSqi'];a150_0x4866=function(){return _0x419f2e;};return a150_0x4866();}(function(_0xcd6c88,_0x36f0f4){var _0xff552d=a150_0x5462,_0x30b88e=_0xcd6c88();while(!![]){try{var _0x291ac9=parseInt(_0xff552d(0x1f1))/0x1+parseInt(_0xff552d(0x1f6))/0x2*(-parseInt(_0xff552d(0x1f0))/0x3)+-parseInt(_0xff552d(0x1f3))/0x4+-parseInt(_0xff552d(0x1f8))/0x5*(parseInt(_0xff552d(0x1f2))/0x6)+-parseInt(_0xff552d(0x1f5))/0x7*(-parseInt(_0xff552d(0x1f9))/0x8)+-parseInt(_0xff552d(0x1ee))/0x9*(parseInt(_0xff552d(0x1ef))/0xa)+parseInt(_0xff552d(0x1f7))/0xb*(parseInt(_0xff552d(0x1f4))/0xc);if(_0x291ac9===_0x36f0f4)break;else _0x30b88e['push'](_0x30b88e['shift']());}catch(_0x2412c5){_0x30b88e['push'](_0x30b88e['shift']());}}}(a150_0x4866,0x2c7f3));function a150_0x5462(_0x4533ba,_0x41247a){_0x4533ba=_0x4533ba-0x1ee;var _0x4866aa=a150_0x4866();var _0x54625d=_0x4866aa[_0x4533ba];return _0x54625d;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a149_0x2061c9=a149_0x2d93;(function(_0x6ea1c5,_0x3b5db9){const _0x9ecd8c=a149_0x2d93,_0x3a6b03=_0x6ea1c5();while(!![]){try{const _0x5b155e=-parseInt(_0x9ecd8c(0x184))/0x1*(-parseInt(_0x9ecd8c(0x171))/0x2)+parseInt(_0x9ecd8c(0x169))/0x3+parseInt(_0x9ecd8c(0x17f))/0x4+-parseInt(_0x9ecd8c(0x176))/0x5+-parseInt(_0x9ecd8c(0x182))/0x6+parseInt(_0x9ecd8c(0x16a))/0x7+-parseInt(_0x9ecd8c(0x187))/0x8;if(_0x5b155e===_0x3b5db9)break;else _0x3a6b03['push'](_0x3a6b03['shift']());}catch(_0x535542){_0x3a6b03['push'](_0x3a6b03['shift']());}}}(a149_0x19c9,0x25b88));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x2061c9(0x175)]([a149_0x2061c9(0x181),a149_0x2061c9(0x185),a149_0x2061c9(0x177)]);export const ReentryModeTypeSchema=z[a149_0x2061c9(0x175)](['no_reentry',a149_0x2061c9(0x17a),a149_0x2061c9(0x172)]);export const WaitUnitTypeSchema=z[a149_0x2061c9(0x175)]([a149_0x2061c9(0x18c),a149_0x2061c9(0x183)]);export const StepTypeValueSchema=z[a149_0x2061c9(0x175)]([a149_0x2061c9(0x188),a149_0x2061c9(0x17c),a149_0x2061c9(0x16d),a149_0x2061c9(0x186),a149_0x2061c9(0x180),a149_0x2061c9(0x16f),a149_0x2061c9(0x18f)]);export const EmbeddedSegmentDefSchema=z[a149_0x2061c9(0x167)]({'description':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'rule':RuleDefSchema});function a149_0x19c9(){const _0x5bc466=['25712pLhOwO','merge','draft','59424wCfHHQ','week','1lqXRLx','simulation','ab_test','2434944wSmCIY','wait','number','boolean','string','day','type','versions','end','isArray','literal','object','optional','237516joijGK','1618610sIOgBK','discriminatedUnion','passthrough','decision_point','filter','jump','min','561854UyPkqe','reentry_always','lazy','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','enum','644905ltsRaP','launched','Journey\x20name\x20is\x20required','journey','reentry_unless_goal_achieved','length','activation','array','journeys'];a149_0x19c9=function(){return _0x5bc466;};return a149_0x19c9();}const JumpTargetDefSchema=z['object']({'journey':z[a149_0x2061c9(0x18b)](),'stage':z[a149_0x2061c9(0x18b)](),'bundle_id':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)]()});export const CriteriaDefSchema=z[a149_0x2061c9(0x167)]({'name':z[a149_0x2061c9(0x18b)](),'description':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'segment':z[a149_0x2061c9(0x18b)](),'target':JumpTargetDefSchema[a149_0x2061c9(0x168)]()});const WaitConditionTimeoutDefSchema=z[a149_0x2061c9(0x167)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a149_0x2061c9(0x18b)]()['optional']()}),WaitConditionDefSchema=z[a149_0x2061c9(0x167)]({'segment':z[a149_0x2061c9(0x18b)](),'next':z['string']()[a149_0x2061c9(0x168)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z['object']({'duration':z[a149_0x2061c9(0x189)]()[a149_0x2061c9(0x168)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0x2061c9(0x18b)]()['optional'](),'condition':WaitConditionDefSchema[a149_0x2061c9(0x168)](),'days_of_week':z['array'](z[a149_0x2061c9(0x18b)]())['optional']()}),StepBaseFields={'name':z[a149_0x2061c9(0x18b)](),'uuid':z['string']()[a149_0x2061c9(0x168)](),'next':z[a149_0x2061c9(0x18b)]()['optional']()},WaitStepDefSchema=z[a149_0x2061c9(0x167)]({...StepBaseFields,'type':z[a149_0x2061c9(0x191)](a149_0x2061c9(0x188)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x2061c9(0x167)]({'activation':z[a149_0x2061c9(0x18b)]()}),ActivationStepDefSchema=z[a149_0x2061c9(0x167)]({...StepBaseFields,'type':z[a149_0x2061c9(0x191)](a149_0x2061c9(0x17c)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a149_0x2061c9(0x167)]({'name':z['string'](),'segment':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'segment_id':z[a149_0x2061c9(0x18b)]()['optional'](),'excluded':z['boolean']()[a149_0x2061c9(0x168)](),'next':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x2061c9(0x167)]({...StepBaseFields,'type':z['literal'](a149_0x2061c9(0x16d)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x2061c9(0x167)]({'id':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'name':z['string'](),'percentage':z[a149_0x2061c9(0x189)](),'next':z['string']()[a149_0x2061c9(0x168)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a149_0x2061c9(0x17d)](AbTestVariantDefSchema),'unique_id':z['string']()[a149_0x2061c9(0x168)](),'customized_split':z[a149_0x2061c9(0x18a)]()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x2061c9(0x191)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x2061c9(0x167)]({...StepBaseFields,'type':z[a149_0x2061c9(0x191)](a149_0x2061c9(0x180))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0x2061c9(0x167)]({...StepBaseFields,'type':z[a149_0x2061c9(0x191)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('end')})[a149_0x2061c9(0x16c)]();export const StepDefSchema=z[a149_0x2061c9(0x16b)](a149_0x2061c9(0x18d),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a149_0x2061c9(0x167)]({'name':z[a149_0x2061c9(0x18b)](),'description':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'id':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'entry_criteria':CriteriaDefSchema[a149_0x2061c9(0x168)](),'exit_criteria':z['array'](CriteriaDefSchema)[a149_0x2061c9(0x168)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'steps':z[a149_0x2061c9(0x17d)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a149_0x2061c9(0x167)]({'name':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'version':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'state':JourneyStateTypeSchema[a149_0x2061c9(0x168)](),'latest':z['boolean']()['optional'](),'stages':z[a149_0x2061c9(0x17d)](StageDefSchema),'id':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'version_number':z[a149_0x2061c9(0x189)]()['optional'](),'goal':CriteriaDefSchema[a149_0x2061c9(0x168)](),'reentry':ReentryModeTypeSchema[a149_0x2061c9(0x168)]()});export const JourneyDefSchema=z[a149_0x2061c9(0x173)](()=>z[a149_0x2061c9(0x167)]({'type':z[a149_0x2061c9(0x191)](a149_0x2061c9(0x179)),'name':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x170)](0x1,a149_0x2061c9(0x178)),'description':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'bundle_id':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'bundle_name':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'folder_id':z['string']()[a149_0x2061c9(0x168)](),'reentry':ReentryModeTypeSchema[a149_0x2061c9(0x168)](),'allow_reentry':z[a149_0x2061c9(0x18a)]()['optional'](),'goal':CriteriaDefSchema[a149_0x2061c9(0x168)](),'id':z['string']()[a149_0x2061c9(0x168)](),'version':z[a149_0x2061c9(0x18b)]()[a149_0x2061c9(0x168)](),'version_number':z[a149_0x2061c9(0x189)]()[a149_0x2061c9(0x168)](),'stages':z['array'](StageDefSchema)[a149_0x2061c9(0x168)](),'versions':z[a149_0x2061c9(0x17d)](JourneyEntryDefSchema)[a149_0x2061c9(0x168)](),'journeys':z[a149_0x2061c9(0x17d)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z[a149_0x2061c9(0x18b)](),EmbeddedSegmentDefSchema)[a149_0x2061c9(0x168)](),'activations':z['record'](z['string'](),ActivationDefSchema)[a149_0x2061c9(0x168)]()})['refine'](_0xcac7c3=>{const _0x30baa4=a149_0x2061c9,_0x3bc7dc=[_0xcac7c3[_0x30baa4(0x17e)],_0xcac7c3['stages'],_0xcac7c3[_0x30baa4(0x18e)]][_0x30baa4(0x16e)](_0x31f7c0=>Array[_0x30baa4(0x190)](_0x31f7c0)&&_0x31f7c0['length']>0x0)[_0x30baa4(0x17b)];return _0x3bc7dc===0x1;},{'message':a149_0x2061c9(0x174)}));function a149_0x2d93(_0x3827e6,_0x376e27){_0x3827e6=_0x3827e6-0x167;const _0x19c9b8=a149_0x19c9();let _0x2d938d=_0x19c9b8[_0x3827e6];return _0x2d938d;}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a151_0x4f85a6=a151_0x4f70;(function(_0x5d01fd,_0x2c70c3){const _0x38305e=a151_0x4f70,_0x5652b7=_0x5d01fd();while(!![]){try{const _0x31a0bd=-parseInt(_0x38305e(0x91))/0x1+parseInt(_0x38305e(0x81))/0x2*(-parseInt(_0x38305e(0x85))/0x3)+parseInt(_0x38305e(0x8f))/0x4*(-parseInt(_0x38305e(0x83))/0x5)+parseInt(_0x38305e(0x7f))/0x6+-parseInt(_0x38305e(0x97))/0x7+-parseInt(_0x38305e(0x86))/0x8+-parseInt(_0x38305e(0x9d))/0x9*(-parseInt(_0x38305e(0x9c))/0xa);if(_0x31a0bd===_0x2c70c3)break;else _0x5652b7['push'](_0x5652b7['shift']());}catch(_0x476629){_0x5652b7['push'](_0x5652b7['shift']());}}}(a151_0x3eae,0xa5f20));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a151_0x4f85a6(0xa1)]([a151_0x4f85a6(0x8e),a151_0x4f85a6(0x7c),'launched']);export const ReentryModeTypeSchema=z[a151_0x4f85a6(0xa1)]([a151_0x4f85a6(0x9e),a151_0x4f85a6(0x8d),a151_0x4f85a6(0x89)]);export const WaitUnitTypeSchema=z['enum'](['day',a151_0x4f85a6(0xa2)]);export const StepTypeValueSchema=z[a151_0x4f85a6(0xa1)]([a151_0x4f85a6(0x90),a151_0x4f85a6(0x87),a151_0x4f85a6(0x7e),a151_0x4f85a6(0x8b),a151_0x4f85a6(0x7a),a151_0x4f85a6(0x9a),'end']);export const EmbeddedSegmentDefSchema=z[a151_0x4f85a6(0x82)]({'description':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a151_0x4f85a6(0x82)]({'journey':z[a151_0x4f85a6(0x92)](),'stage':z[a151_0x4f85a6(0x92)](),'bundle_id':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)]()});export const CriteriaDefSchema=z[a151_0x4f85a6(0x82)]({'name':z['string'](),'description':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'segment':z[a151_0x4f85a6(0x92)](),'target':JumpTargetDefSchema[a151_0x4f85a6(0x7b)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a151_0x4f85a6(0x92)]()['optional']()}),WaitConditionDefSchema=z[a151_0x4f85a6(0x82)]({'segment':z['string'](),'next':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'timeout':WaitConditionTimeoutDefSchema[a151_0x4f85a6(0x7b)]()}),WaitStepParamsDefSchema=z[a151_0x4f85a6(0x82)]({'duration':z[a151_0x4f85a6(0x9f)]()['optional'](),'unit':WaitUnitTypeSchema[a151_0x4f85a6(0x7b)](),'wait_until':z['string']()[a151_0x4f85a6(0x7b)](),'condition':WaitConditionDefSchema[a151_0x4f85a6(0x7b)](),'days_of_week':z[a151_0x4f85a6(0xa0)](z[a151_0x4f85a6(0x92)]())[a151_0x4f85a6(0x7b)]()}),StepBaseFields={'name':z[a151_0x4f85a6(0x92)](),'uuid':z[a151_0x4f85a6(0x92)]()['optional'](),'next':z['string']()[a151_0x4f85a6(0x7b)]()},WaitStepDefSchema=z[a151_0x4f85a6(0x82)]({...StepBaseFields,'type':z[a151_0x4f85a6(0x80)](a151_0x4f85a6(0x90)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a151_0x4f85a6(0x92)]()}),ActivationStepDefSchema=z[a151_0x4f85a6(0x82)]({...StepBaseFields,'type':z[a151_0x4f85a6(0x80)](a151_0x4f85a6(0x87)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a151_0x4f85a6(0x82)]({'name':z['string'](),'segment':z['string']()[a151_0x4f85a6(0x7b)](),'segment_id':z['string']()['optional'](),'excluded':z[a151_0x4f85a6(0xa3)]()[a151_0x4f85a6(0x7b)](),'next':z['string']()[a151_0x4f85a6(0x7b)]()}),DecisionPointStepParamsDefSchema=z[a151_0x4f85a6(0x82)]({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a151_0x4f85a6(0x82)]({...StepBaseFields,'type':z[a151_0x4f85a6(0x80)](a151_0x4f85a6(0x7e)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a151_0x4f85a6(0x82)]({'id':z[a151_0x4f85a6(0x92)]()['optional'](),'name':z[a151_0x4f85a6(0x92)](),'percentage':z[a151_0x4f85a6(0x9f)](),'next':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)]()}),AbTestStepParamsDefSchema=z[a151_0x4f85a6(0x82)]({'variants':z[a151_0x4f85a6(0xa0)](AbTestVariantDefSchema),'unique_id':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'customized_split':z[a151_0x4f85a6(0xa3)]()['optional']()}),AbTestStepDefSchema=z[a151_0x4f85a6(0x82)]({...StepBaseFields,'type':z[a151_0x4f85a6(0x80)](a151_0x4f85a6(0x8b)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('merge')}),JumpStepParamsDefSchema=z[a151_0x4f85a6(0x82)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a151_0x4f85a6(0x80)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('end')})[a151_0x4f85a6(0x94)]();export const StepDefSchema=z[a151_0x4f85a6(0x8c)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a151_0x4f85a6(0x82)]({'name':z[a151_0x4f85a6(0x92)](),'description':z['string']()[a151_0x4f85a6(0x7b)](),'id':z['string']()[a151_0x4f85a6(0x7b)](),'entry_criteria':CriteriaDefSchema[a151_0x4f85a6(0x7b)](),'exit_criteria':z[a151_0x4f85a6(0xa0)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a151_0x4f85a6(0x7b)](),'root_step':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'steps':z[a151_0x4f85a6(0xa0)](StepDefSchema)[a151_0x4f85a6(0x7b)]()});export const JourneyEntryDefSchema=z[a151_0x4f85a6(0x82)]({'name':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'version':z['string']()[a151_0x4f85a6(0x7b)](),'state':JourneyStateTypeSchema[a151_0x4f85a6(0x7b)](),'latest':z['boolean']()[a151_0x4f85a6(0x7b)](),'stages':z[a151_0x4f85a6(0xa0)](StageDefSchema),'id':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'version_number':z[a151_0x4f85a6(0x9f)]()[a151_0x4f85a6(0x7b)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a151_0x4f85a6(0x7b)]()});function a151_0x4f70(_0x337357,_0x11bf15){_0x337357=_0x337357-0x7a;const _0x3eae74=a151_0x3eae();let _0x4f7081=_0x3eae74[_0x337357];return _0x4f7081;}export const JourneyDefSchema=z[a151_0x4f85a6(0x8a)](()=>z[a151_0x4f85a6(0x82)]({'type':z[a151_0x4f85a6(0x80)](a151_0x4f85a6(0x88)),'name':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x9b)](0x1,a151_0x4f85a6(0x99)),'description':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'bundle_id':z['string']()[a151_0x4f85a6(0x7b)](),'bundle_name':z['string']()['optional'](),'folder_id':z[a151_0x4f85a6(0x92)]()['optional'](),'reentry':ReentryModeTypeSchema[a151_0x4f85a6(0x7b)](),'allow_reentry':z['boolean']()['optional'](),'goal':CriteriaDefSchema['optional'](),'id':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'version':z[a151_0x4f85a6(0x92)]()[a151_0x4f85a6(0x7b)](),'version_number':z[a151_0x4f85a6(0x9f)]()[a151_0x4f85a6(0x7b)](),'stages':z[a151_0x4f85a6(0xa0)](StageDefSchema)[a151_0x4f85a6(0x7b)](),'versions':z[a151_0x4f85a6(0xa0)](JourneyEntryDefSchema)[a151_0x4f85a6(0x7b)](),'journeys':z[a151_0x4f85a6(0xa0)](JourneyEntryDefSchema)['optional'](),'segments':z[a151_0x4f85a6(0x98)](z[a151_0x4f85a6(0x92)](),EmbeddedSegmentDefSchema)[a151_0x4f85a6(0x7b)](),'activations':z[a151_0x4f85a6(0x98)](z[a151_0x4f85a6(0x92)](),ActivationDefSchema)[a151_0x4f85a6(0x7b)]()})['refine'](_0x45e548=>{const _0x54e6c0=a151_0x4f85a6,_0x16d4f9=[_0x45e548[_0x54e6c0(0x95)],_0x45e548[_0x54e6c0(0x7d)],_0x45e548[_0x54e6c0(0x93)]]['filter'](_0x113491=>Array['isArray'](_0x113491)&&_0x113491[_0x54e6c0(0x84)]>0x0)[_0x54e6c0(0x84)];return _0x16d4f9===0x1;},{'message':a151_0x4f85a6(0x96)}));function a151_0x3eae(){const _0x30b839=['number','array','enum','week','boolean','merge','optional','simulation','stages','decision_point','7542480iCwmQb','literal','19270ACoxaT','object','5804185oziTpr','length','105bMAIKD','5781496XOkRPj','activation','journey','reentry_always','lazy','ab_test','discriminatedUnion','reentry_unless_goal_achieved','draft','4WDtwJM','wait','1133740gFVLjY','string','versions','passthrough','journeys','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','2179072PRoWMv','record','Journey\x20name\x20is\x20required','jump','min','28570lyBRyS','9729NCVRuH','no_reentry'];a151_0x3eae=function(){return _0x30b839;};return a151_0x3eae();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x5530bc,_0xb56215){var _0x30a4c7=a151_0xa56b,_0x399919=_0x5530bc();while(!![]){try{var _0x31c234=-parseInt(_0x30a4c7(0x1a5))/0x1+parseInt(_0x30a4c7(0x1a9))/0x2+parseInt(_0x30a4c7(0x1a4))/0x3+parseInt(_0x30a4c7(0x1a7))/0x4*(parseInt(_0x30a4c7(0x1aa))/0x5)+-parseInt(_0x30a4c7(0x1a6))/0x6+-parseInt(_0x30a4c7(0x1a8))/0x7+parseInt(_0x30a4c7(0x1a3))/0x8;if(_0x31c234===_0xb56215)break;else _0x399919['push'](_0x399919['shift']());}catch(_0x3cd956){_0x399919['push'](_0x399919['shift']());}}}(a151_0x56b2,0x871a0));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 a151_0xa56b(_0xa2d436,_0x193a4b){_0xa2d436=_0xa2d436-0x1a3;var _0x56b26b=a151_0x56b2();var _0xa56bcf=_0x56b26b[_0xa2d436];return _0xa56bcf;}function a151_0x56b2(){var _0x525f07=['20yIPxPV','6907000ITovZq','463131rFpfWx','896643KTnzst','6115872MZMYkO','720652YjXRuK','1188838mHqVKQ','1801522rDzWCH'];a151_0x56b2=function(){return _0x525f07;};return a151_0x56b2();}
1
+ (function(_0x10e6c8,_0x26f699){var _0x6a134a=a153_0x133f,_0x3d18a7=_0x10e6c8();while(!![]){try{var _0x3e4131=-parseInt(_0x6a134a(0x1b0))/0x1+-parseInt(_0x6a134a(0x1b9))/0x2*(-parseInt(_0x6a134a(0x1b3))/0x3)+-parseInt(_0x6a134a(0x1b2))/0x4+-parseInt(_0x6a134a(0x1b6))/0x5*(-parseInt(_0x6a134a(0x1b7))/0x6)+parseInt(_0x6a134a(0x1b1))/0x7+-parseInt(_0x6a134a(0x1b8))/0x8+parseInt(_0x6a134a(0x1b4))/0x9*(parseInt(_0x6a134a(0x1b5))/0xa);if(_0x3e4131===_0x26f699)break;else _0x3d18a7['push'](_0x3d18a7['shift']());}catch(_0x4ffb32){_0x3d18a7['push'](_0x3d18a7['shift']());}}}(a153_0x2e30,0x47e08));function a153_0x133f(_0x4e1e78,_0x468260){_0x4e1e78=_0x4e1e78-0x1b0;var _0x2e3058=a153_0x2e30();var _0x133f3e=_0x2e3058[_0x4e1e78];return _0x133f3e;}function a153_0x2e30(){var _0x5a1167=['2408721IAaDPH','1100540dJEsAm','1896dfEfjh','2547hoIBNd','14750sPAZbZ','121680rLaNKm','36SpbHRY','851440farrgD','704vjYijU','454035QBsiZz'];a153_0x2e30=function(){return _0x5a1167;};return a153_0x2e30();}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 a152_0x1aeba3=a152_0x4575;(function(_0x18a822,_0x4224e9){const _0x4798d5=a152_0x4575,_0x140ed8=_0x18a822();while(!![]){try{const _0x3fafa7=-parseInt(_0x4798d5(0x80))/0x1+parseInt(_0x4798d5(0xa4))/0x2+parseInt(_0x4798d5(0xc9))/0x3+-parseInt(_0x4798d5(0xab))/0x4*(parseInt(_0x4798d5(0x9f))/0x5)+-parseInt(_0x4798d5(0xae))/0x6*(parseInt(_0x4798d5(0xc8))/0x7)+-parseInt(_0x4798d5(0xad))/0x8+parseInt(_0x4798d5(0x87))/0x9;if(_0x3fafa7===_0x4224e9)break;else _0x140ed8['push'](_0x140ed8['shift']());}catch(_0x6bcf54){_0x140ed8['push'](_0x140ed8['shift']());}}}(a152_0x5561,0x4e936));import{z}from'zod';export const OperatorTypeSchema=z[a152_0x1aeba3(0x99)](['Equal','Greater',a152_0x1aeba3(0xba),a152_0x1aeba3(0xa7),a152_0x1aeba3(0x93),'In',a152_0x1aeba3(0x86),a152_0x1aeba3(0x81),a152_0x1aeba3(0xb6),a152_0x1aeba3(0x82),'TimeWithinNext','Contain',a152_0x1aeba3(0xaf),'EndWith',a152_0x1aeba3(0xbb)]);export const TimeUnitSchema=z[a152_0x1aeba3(0x99)](['second',a152_0x1aeba3(0xb2),a152_0x1aeba3(0xa5),a152_0x1aeba3(0xc1),a152_0x1aeba3(0xa1),a152_0x1aeba3(0xca),a152_0x1aeba3(0x89)]);export const AggregationTypeSchema=z[a152_0x1aeba3(0x99)]([a152_0x1aeba3(0xb4),'Sum',a152_0x1aeba3(0xa9),a152_0x1aeba3(0x91),'Max',a152_0x1aeba3(0xb3),a152_0x1aeba3(0x8c),a152_0x1aeba3(0xa8)]);const TemporalValueSchema=z[a152_0x1aeba3(0x9c)]([z['object']({'timestamp':z[a152_0x1aeba3(0x85)]()}),z[a152_0x1aeba3(0xb0)]({'last':z[a152_0x1aeba3(0x9c)]([z['number'](),z['record'](z['string'](),z[a152_0x1aeba3(0xbc)]())]),'unit':z[a152_0x1aeba3(0x85)]()})]),OperatorValueSchema=z['union']([z[a152_0x1aeba3(0x85)](),z['number'](),z[a152_0x1aeba3(0x97)](),TemporalValueSchema,z['array'](z[a152_0x1aeba3(0x9c)]([z[a152_0x1aeba3(0x85)](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x1aeba3(0xc0),a152_0x1aeba3(0x9a),a152_0x1aeba3(0xa7),a152_0x1aeba3(0xba),a152_0x1aeba3(0x93),'In',a152_0x1aeba3(0xcb),a152_0x1aeba3(0xaf),a152_0x1aeba3(0xa2),a152_0x1aeba3(0x81),a152_0x1aeba3(0x82),a152_0x1aeba3(0xa6)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0x1aeba3(0xa6)]);export const OperatorDefSchema=z[a152_0x1aeba3(0xb0)]({'type':OperatorTypeSchema,'not':z[a152_0x1aeba3(0x97)]()[a152_0x1aeba3(0xc5)](),'value':OperatorValueSchema[a152_0x1aeba3(0xc5)](),'min':z[a152_0x1aeba3(0x9c)]([z[a152_0x1aeba3(0xbc)](),z['string'](),TemporalValueSchema])[a152_0x1aeba3(0xc5)](),'max':z[a152_0x1aeba3(0x9c)]([z['number'](),z[a152_0x1aeba3(0x85)](),TemporalValueSchema])[a152_0x1aeba3(0xc5)](),'unit':TimeUnitSchema[a152_0x1aeba3(0xc5)](),'duration':z[a152_0x1aeba3(0xb0)]({'day':z['number']()[a152_0x1aeba3(0xc5)](),'week':z['number']()[a152_0x1aeba3(0xc5)](),'month':z[a152_0x1aeba3(0xbc)]()[a152_0x1aeba3(0xc5)](),'year':z[a152_0x1aeba3(0xbc)]()['optional'](),'hour':z[a152_0x1aeba3(0xbc)]()[a152_0x1aeba3(0xc5)](),'minute':z[a152_0x1aeba3(0xbc)]()[a152_0x1aeba3(0xc5)](),'second':z[a152_0x1aeba3(0xbc)]()[a152_0x1aeba3(0xc5)]()})[a152_0x1aeba3(0xc5)](),'from':z[a152_0x1aeba3(0xb0)]({'last':z[a152_0x1aeba3(0x9c)]([z[a152_0x1aeba3(0xbc)](),z['string']()]),'unit':TimeUnitSchema})[a152_0x1aeba3(0xc5)](),'reverse':z[a152_0x1aeba3(0x97)]()[a152_0x1aeba3(0xc5)]()})[a152_0x1aeba3(0x8f)]((_0x43bcca,_0x4a62d9)=>{const _0xb05a7=a152_0x1aeba3;OPERATORS_REQUIRING_VALUE[_0xb05a7(0x84)](_0x43bcca[_0xb05a7(0xa3)])&&(_0x43bcca['value']===undefined||_0x43bcca['value']===null)&&_0x4a62d9[_0xb05a7(0x90)]({'code':_0xb05a7(0x92),'message':_0xb05a7(0xaa)+_0x43bcca[_0xb05a7(0xa3)]+_0xb05a7(0x94),'path':[_0xb05a7(0x8a)]}),_0x43bcca[_0xb05a7(0xa3)]===_0xb05a7(0x86)&&_0x43bcca['min']===undefined&&_0x43bcca[_0xb05a7(0xb5)]===undefined&&_0x4a62d9['addIssue']({'code':_0xb05a7(0x92),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0xb05a7(0xb1)}}),OPERATORS_REQUIRING_UNIT['has'](_0x43bcca[_0xb05a7(0xa3)])&&_0x43bcca[_0xb05a7(0x8a)]!==undefined&&!_0x43bcca[_0xb05a7(0x96)]&&_0x4a62d9[_0xb05a7(0x90)]({'code':_0xb05a7(0x92),'message':_0xb05a7(0xaa)+_0x43bcca[_0xb05a7(0xa3)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0xb05a7(0x96)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x43bcca[_0xb05a7(0xa3)]==='TimeRange'&&(!_0x43bcca[_0xb05a7(0xc2)]&&_0x4a62d9['addIssue']({'code':_0xb05a7(0x92),'message':_0xb05a7(0x83),'path':[_0xb05a7(0xc2)]}),!_0x43bcca[_0xb05a7(0xc3)]&&_0x4a62d9[_0xb05a7(0x90)]({'code':_0xb05a7(0x92),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0xb05a7(0xc3)]}));});export const ArrayMatchingSchema=z[a152_0x1aeba3(0x9c)]([z[a152_0x1aeba3(0xb7)]('any'),z['literal'](a152_0x1aeba3(0x95)),z['object']({'atLeast':z[a152_0x1aeba3(0xbc)]()}),z['object']({'atMost':z[a152_0x1aeba3(0xbc)]()}),z[a152_0x1aeba3(0xb0)]({'exactly':z[a152_0x1aeba3(0xbc)]()})]);export const AggregationDefSchema=z[a152_0x1aeba3(0xb8)](a152_0x1aeba3(0xa3),[z['object']({'type':z['enum']([a152_0x1aeba3(0xc6),a152_0x1aeba3(0x91),a152_0x1aeba3(0xbf),a152_0x1aeba3(0xa9)]),'column':z[a152_0x1aeba3(0x85)](),'groupingColumns':z[a152_0x1aeba3(0x9d)](z[a152_0x1aeba3(0x85)]())[a152_0x1aeba3(0xc5)]()}),z[a152_0x1aeba3(0xb0)]({'type':z['literal'](a152_0x1aeba3(0xb4)),'groupingColumns':z[a152_0x1aeba3(0x9d)](z['string']())[a152_0x1aeba3(0xc5)]()}),z['object']({'type':z[a152_0x1aeba3(0xb7)](a152_0x1aeba3(0xb3)),'columns':z[a152_0x1aeba3(0x9d)](z['string']())}),z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0x99)]([a152_0x1aeba3(0x8c),a152_0x1aeba3(0xa8)]),'column':z['string'](),'orderColumn':z[a152_0x1aeba3(0x85)](),'groupingColumns':z['array'](z[a152_0x1aeba3(0x85)]())['optional']()})]);export const TimeWindowDefSchema=z[a152_0x1aeba3(0xb0)]({'duration':z[a152_0x1aeba3(0xbc)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x1aeba3(0x82),a152_0x1aeba3(0xa6),a152_0x1aeba3(0xbb)]);export const FilterColumnConditionDefSchema=z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0xb7)]('Column'),'column':z[a152_0x1aeba3(0x85)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x1aeba3(0xc5)]()})[a152_0x1aeba3(0x8f)]((_0x5e25c8,_0x545df3)=>{const _0x453494=a152_0x1aeba3,_0x390e9a=_0x5e25c8[_0x453494(0xcd)][_0x453494(0xa3)];_0x5e25c8[_0x453494(0xa0)]===_0x453494(0xc4)?!TIMESTAMP_OPERATORS[_0x453494(0x84)](_0x390e9a)&&_0x545df3[_0x453494(0x90)]({'code':_0x453494(0x92),'message':_0x453494(0x8e)+_0x390e9a+'\x27)','path':[_0x453494(0xcd),_0x453494(0xa3)]}):TIMESTAMP_OPERATORS[_0x453494(0x84)](_0x390e9a)&&_0x545df3[_0x453494(0x90)]({'code':_0x453494(0x92),'message':_0x453494(0xaa)+_0x390e9a+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':['operator',_0x453494(0xa3)]});});export const FilterRuleDefSchema=z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0xb7)](a152_0x1aeba3(0xc7)),'conditions':z[a152_0x1aeba3(0x9d)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x1aeba3(0x8b)](()=>z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0xb7)]('Value'),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a152_0x1aeba3(0x97)]()[a152_0x1aeba3(0xc5)](),'aggregation':AggregationDefSchema[a152_0x1aeba3(0xc5)](),'source':z['string']()[a152_0x1aeba3(0xc5)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a152_0x1aeba3(0xbc)]()['optional']()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0xb7)](a152_0x1aeba3(0xbd)),'attribute':z[a152_0x1aeba3(0x85)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a152_0x1aeba3(0x97)]()[a152_0x1aeba3(0xc5)](),'aggregation':AggregationDefSchema[a152_0x1aeba3(0xc5)](),'source':z['string']()[a152_0x1aeba3(0xc5)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a152_0x1aeba3(0xc5)](),'limit':z['number']()[a152_0x1aeba3(0xc5)]()}));function a152_0x5561(){const _0x2ffc45=['4437384GSUxRO','1062bHDzYe','StartWith','object','MISSING_BETWEEN_BOUNDS','minute','CountDistinct','Count','max','IsNull','literal','discriminatedUnion','include','Less','TimeRange','number','Behavior','Segment\x20name\x20is\x20required','Max','Equal','day','duration','from','timestamp','optional','Sum','And','5033vOAbzT','795288zVYUkY','month','Contain','min','operator','349119pfsbbO','Regexp','TimeWithinPast','TimeRange\x20operator\x20requires\x20\x27duration\x27','has','string','Between','10036026AwPaHk','exclude','year','value','lazy','First','batch','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','superRefine','addIssue','Min','custom','LessEqual','\x27\x20requires\x20a\x20value','all','unit','boolean','funnel_stage','enum','Greater','realtime','union','array','any','2148005tFVgFo','column','week','EndWith','type','804584mQHSGU','hour','TimeWithinNext','GreaterEqual','Last','Average','Operator\x20\x27','4SuQYxb','segment'];a152_0x5561=function(){return _0x2ffc45;};return a152_0x5561();}export const ColumnConditionDefSchema=z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0xb7)]('Column'),'column':z[a152_0x1aeba3(0x85)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a152_0x1aeba3(0x8b)](()=>z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0x99)]([a152_0x1aeba3(0xc7),'Or']),'conditions':z[a152_0x1aeba3(0x9d)](ConditionDefSchema),'description':z['string']()[a152_0x1aeba3(0xc5)]()}));export const SegmentRefConditionDefSchema=z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0x99)]([a152_0x1aeba3(0xb9),a152_0x1aeba3(0x88)]),'segment':z['string']()[a152_0x1aeba3(0xcc)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a152_0x1aeba3(0x8b)](()=>z[a152_0x1aeba3(0x9c)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));function a152_0x4575(_0x599bd6,_0x3dea4c){_0x599bd6=_0x599bd6-0x80;const _0x55618a=a152_0x5561();let _0x4575a8=_0x55618a[_0x599bd6];return _0x4575a8;}export const RuleDefSchema=z[a152_0x1aeba3(0x8b)](()=>z['object']({'type':z[a152_0x1aeba3(0x99)](['And','Or']),'conditions':z[a152_0x1aeba3(0x9d)](ConditionDefSchema),'description':z[a152_0x1aeba3(0x85)]()[a152_0x1aeba3(0xc5)]()}));export const SegmentDefSchema=z[a152_0x1aeba3(0xb0)]({'type':z[a152_0x1aeba3(0xb7)](a152_0x1aeba3(0xac))[a152_0x1aeba3(0xc5)](),'name':z[a152_0x1aeba3(0x85)]()['min'](0x1,a152_0x1aeba3(0xbe)),'description':z['string']()[a152_0x1aeba3(0xc5)](),'folder':z[a152_0x1aeba3(0x85)]()['optional'](),'rule':RuleDefSchema[a152_0x1aeba3(0xc5)](),'kind':z['enum']([a152_0x1aeba3(0x8d),a152_0x1aeba3(0x9b),a152_0x1aeba3(0x98)])[a152_0x1aeba3(0xc5)](),'visible':z[a152_0x1aeba3(0x97)]()[a152_0x1aeba3(0xc5)](),'activations':z[a152_0x1aeba3(0x9d)](z[a152_0x1aeba3(0x9e)]())[a152_0x1aeba3(0xc5)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a154_0x1fcb52=a154_0x4d6a;(function(_0x4c0aa0,_0x5dd780){const _0x1f8a24=a154_0x4d6a,_0x3b4f60=_0x4c0aa0();while(!![]){try{const _0x4a5cc0=parseInt(_0x1f8a24(0x227))/0x1+parseInt(_0x1f8a24(0x203))/0x2*(-parseInt(_0x1f8a24(0x22a))/0x3)+parseInt(_0x1f8a24(0x21d))/0x4*(parseInt(_0x1f8a24(0x212))/0x5)+-parseInt(_0x1f8a24(0x1ff))/0x6+-parseInt(_0x1f8a24(0x1e3))/0x7+parseInt(_0x1f8a24(0x224))/0x8*(-parseInt(_0x1f8a24(0x22f))/0x9)+parseInt(_0x1f8a24(0x200))/0xa;if(_0x4a5cc0===_0x5dd780)break;else _0x3b4f60['push'](_0x3b4f60['shift']());}catch(_0xb3c224){_0x3b4f60['push'](_0x3b4f60['shift']());}}}(a154_0x5a79,0x1de7c));import{z}from'zod';export const OperatorTypeSchema=z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x1eb),a154_0x1fcb52(0x206),'Less','GreaterEqual',a154_0x1fcb52(0x225),'In',a154_0x1fcb52(0x20e),a154_0x1fcb52(0x229),'IsNull',a154_0x1fcb52(0x205),a154_0x1fcb52(0x22b),a154_0x1fcb52(0x1de),a154_0x1fcb52(0x1ea),a154_0x1fcb52(0x1f2),a154_0x1fcb52(0x1f4)]);export const TimeUnitSchema=z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x214),a154_0x1fcb52(0x226),a154_0x1fcb52(0x216),a154_0x1fcb52(0x220),a154_0x1fcb52(0x21a),a154_0x1fcb52(0x1f5),a154_0x1fcb52(0x221)]);export const AggregationTypeSchema=z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x231),'Sum',a154_0x1fcb52(0x204),a154_0x1fcb52(0x1f8),'Max',a154_0x1fcb52(0x20c),a154_0x1fcb52(0x22d),'Last']);const TemporalValueSchema=z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x22c)]({'timestamp':z[a154_0x1fcb52(0x21c)]()}),z['object']({'last':z[a154_0x1fcb52(0x223)]([z['number'](),z[a154_0x1fcb52(0x1e2)](z[a154_0x1fcb52(0x21c)](),z[a154_0x1fcb52(0x1fa)]())]),'unit':z[a154_0x1fcb52(0x21c)]()})]),OperatorValueSchema=z['union']([z[a154_0x1fcb52(0x21c)](),z[a154_0x1fcb52(0x1fa)](),z['boolean'](),TemporalValueSchema,z['array'](z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x21c)](),z[a154_0x1fcb52(0x1fa)](),z[a154_0x1fcb52(0x22e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a154_0x1fcb52(0x206),a154_0x1fcb52(0x1f0),a154_0x1fcb52(0x1fc),a154_0x1fcb52(0x225),'In',a154_0x1fcb52(0x1de),'StartWith','EndWith','Regexp',a154_0x1fcb52(0x205),a154_0x1fcb52(0x22b)]),OPERATORS_REQUIRING_UNIT=new Set([a154_0x1fcb52(0x205),a154_0x1fcb52(0x22b)]);export const OperatorDefSchema=z[a154_0x1fcb52(0x22c)]({'type':OperatorTypeSchema,'not':z['boolean']()[a154_0x1fcb52(0x1e7)](),'value':OperatorValueSchema['optional'](),'min':z['union']([z['number'](),z[a154_0x1fcb52(0x21c)](),TemporalValueSchema])[a154_0x1fcb52(0x1e7)](),'max':z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x1fa)](),z[a154_0x1fcb52(0x21c)](),TemporalValueSchema])[a154_0x1fcb52(0x1e7)](),'unit':TimeUnitSchema[a154_0x1fcb52(0x1e7)](),'duration':z[a154_0x1fcb52(0x22c)]({'day':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'week':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'month':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'year':z['number']()['optional'](),'hour':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'minute':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)](),'second':z['number']()[a154_0x1fcb52(0x1e7)]()})['optional'](),'from':z[a154_0x1fcb52(0x22c)]({'last':z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x1fa)](),z[a154_0x1fcb52(0x21c)]()]),'unit':TimeUnitSchema})[a154_0x1fcb52(0x1e7)](),'reverse':z['boolean']()[a154_0x1fcb52(0x1e7)]()})[a154_0x1fcb52(0x222)]((_0x22b763,_0x510ab3)=>{const _0x421ce1=a154_0x1fcb52;OPERATORS_REQUIRING_VALUE[_0x421ce1(0x21e)](_0x22b763[_0x421ce1(0x21b)])&&(_0x22b763[_0x421ce1(0x20a)]===undefined||_0x22b763[_0x421ce1(0x20a)]===null)&&_0x510ab3['addIssue']({'code':'custom','message':'Operator\x20\x27'+_0x22b763[_0x421ce1(0x21b)]+_0x421ce1(0x1ee),'path':[_0x421ce1(0x20a)]}),_0x22b763[_0x421ce1(0x21b)]===_0x421ce1(0x20e)&&_0x22b763[_0x421ce1(0x1f1)]===undefined&&_0x22b763['max']===undefined&&_0x510ab3[_0x421ce1(0x202)]({'code':_0x421ce1(0x20b),'message':_0x421ce1(0x1df),'params':{'validationCode':_0x421ce1(0x1f9)}}),OPERATORS_REQUIRING_UNIT[_0x421ce1(0x21e)](_0x22b763[_0x421ce1(0x21b)])&&_0x22b763['value']!==undefined&&!_0x22b763[_0x421ce1(0x1fd)]&&_0x510ab3[_0x421ce1(0x202)]({'code':_0x421ce1(0x20b),'message':_0x421ce1(0x1e8)+_0x22b763[_0x421ce1(0x21b)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x421ce1(0x1fd)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x22b763[_0x421ce1(0x21b)]===_0x421ce1(0x1f4)&&(!_0x22b763[_0x421ce1(0x215)]&&_0x510ab3[_0x421ce1(0x202)]({'code':_0x421ce1(0x20b),'message':_0x421ce1(0x219),'path':[_0x421ce1(0x215)]}),!_0x22b763[_0x421ce1(0x20d)]&&_0x510ab3['addIssue']({'code':'custom','message':_0x421ce1(0x208),'path':[_0x421ce1(0x20d)]}));});export const ArrayMatchingSchema=z[a154_0x1fcb52(0x223)]([z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x21f)),z['literal'](a154_0x1fcb52(0x230)),z[a154_0x1fcb52(0x22c)]({'atLeast':z[a154_0x1fcb52(0x1fa)]()}),z['object']({'atMost':z['number']()}),z[a154_0x1fcb52(0x22c)]({'exactly':z[a154_0x1fcb52(0x1fa)]()})]);export const AggregationDefSchema=z[a154_0x1fcb52(0x1e6)](a154_0x1fcb52(0x21b),[z['object']({'type':z['enum']([a154_0x1fcb52(0x217),a154_0x1fcb52(0x1f8),a154_0x1fcb52(0x1f3),'Average']),'column':z['string'](),'groupingColumns':z[a154_0x1fcb52(0x1ed)](z[a154_0x1fcb52(0x21c)]())[a154_0x1fcb52(0x1e7)]()}),z['object']({'type':z[a154_0x1fcb52(0x1fe)]('Count'),'groupingColumns':z[a154_0x1fcb52(0x1ed)](z[a154_0x1fcb52(0x21c)]())[a154_0x1fcb52(0x1e7)]()}),z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x20c)),'columns':z['array'](z[a154_0x1fcb52(0x21c)]())}),z['object']({'type':z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x22d),a154_0x1fcb52(0x1e5)]),'column':z[a154_0x1fcb52(0x21c)](),'orderColumn':z['string'](),'groupingColumns':z[a154_0x1fcb52(0x1ed)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a154_0x1fcb52(0x1fa)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a154_0x1fcb52(0x22b),a154_0x1fcb52(0x1f4)]);function a154_0x4d6a(_0x172312,_0x32e121){_0x172312=_0x172312-0x1de;const _0x5a79c2=a154_0x5a79();let _0x4d6ab3=_0x5a79c2[_0x172312];return _0x4d6ab3;}export const FilterColumnConditionDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x213)),'column':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x1fcb52(0x1e7)]()})[a154_0x1fcb52(0x222)]((_0x3423c4,_0xfaa4b7)=>{const _0x27d220=a154_0x1fcb52,_0x4dad62=_0x3423c4['operator'][_0x27d220(0x21b)];_0x3423c4[_0x27d220(0x1e1)]===_0x27d220(0x1ec)?!TIMESTAMP_OPERATORS[_0x27d220(0x21e)](_0x4dad62)&&_0xfaa4b7['addIssue']({'code':_0x27d220(0x20b),'message':_0x27d220(0x1e0)+_0x4dad62+'\x27)','path':[_0x27d220(0x211),'type']}):TIMESTAMP_OPERATORS['has'](_0x4dad62)&&_0xfaa4b7['addIssue']({'code':_0x27d220(0x20b),'message':_0x27d220(0x1e8)+_0x4dad62+_0x27d220(0x201),'path':[_0x27d220(0x211),_0x27d220(0x21b)]});});export const FilterRuleDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x1f7)),'conditions':z[a154_0x1fcb52(0x1ed)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fe)]('Value'),'attribute':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a154_0x1fcb52(0x22e)]()[a154_0x1fcb52(0x1e7)](),'aggregation':AggregationDefSchema[a154_0x1fcb52(0x1e7)](),'source':z['string']()[a154_0x1fcb52(0x1e7)](),'filter':FilterRuleDefSchema[a154_0x1fcb52(0x1e7)](),'limit':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)]()}));function a154_0x5a79(){const _0x594f71=['batch','operator','35555BhRmPi','Column','second','duration','hour','Sum','realtime','TimeRange\x20operator\x20requires\x20\x27duration\x27','week','type','string','52XHYvtd','has','any','day','year','superRefine','union','80NTCGDT','LessEqual','minute','25716HmijDJ','funnel_stage','Regexp','320709pBDmkr','TimeWithinNext','object','First','boolean','38385hvixLc','all','Count','Contain','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','column','record','433167wXmuDB','exclude','Last','discriminatedUnion','optional','Operator\x20\x27','include','StartWith','Equal','timestamp','array','\x27\x20requires\x20a\x20value','Segment\x20reference\x20must\x20not\x20be\x20empty','GreaterEqual','min','EndWith','Max','TimeRange','month','segment','And','Min','MISSING_BETWEEN_BOUNDS','number','enum','Less','unit','literal','951822XlQACl','3744040yOIxam','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','addIssue','2GyglHu','Average','TimeWithinPast','Greater','lazy','TimeRange\x20operator\x20requires\x20\x27from\x27','Behavior','value','custom','CountDistinct','from','Between','Segment\x20name\x20is\x20required'];a154_0x5a79=function(){return _0x594f71;};return a154_0x5a79();}export const BehaviorConditionDefSchema=z[a154_0x1fcb52(0x207)](()=>z['object']({'type':z['literal'](a154_0x1fcb52(0x209)),'attribute':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x1fcb52(0x1e7)](),'exclude':z[a154_0x1fcb52(0x22e)]()['optional'](),'aggregation':AggregationDefSchema[a154_0x1fcb52(0x1e7)](),'source':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a154_0x1fcb52(0x1e7)](),'limit':z[a154_0x1fcb52(0x1fa)]()[a154_0x1fcb52(0x1e7)]()}));export const ColumnConditionDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z['literal']('Column'),'column':z[a154_0x1fcb52(0x21c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x1f7),'Or']),'conditions':z[a154_0x1fcb52(0x1ed)](ConditionDefSchema),'description':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)]()}));export const SegmentRefConditionDefSchema=z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fb)]([a154_0x1fcb52(0x1e9),a154_0x1fcb52(0x1e4)]),'segment':z[a154_0x1fcb52(0x21c)]()['min'](0x1,a154_0x1fcb52(0x1ef))});export const ConditionDefSchema=z[a154_0x1fcb52(0x207)](()=>z[a154_0x1fcb52(0x223)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a154_0x1fcb52(0x22c)]({'type':z[a154_0x1fcb52(0x1fb)](['And','Or']),'conditions':z[a154_0x1fcb52(0x1ed)](ConditionDefSchema),'description':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)]()}));export const SegmentDefSchema=z['object']({'type':z[a154_0x1fcb52(0x1fe)](a154_0x1fcb52(0x1f6))['optional'](),'name':z[a154_0x1fcb52(0x21c)]()['min'](0x1,a154_0x1fcb52(0x20f)),'description':z[a154_0x1fcb52(0x21c)]()[a154_0x1fcb52(0x1e7)](),'folder':z[a154_0x1fcb52(0x21c)]()['optional'](),'rule':RuleDefSchema[a154_0x1fcb52(0x1e7)](),'kind':z['enum']([a154_0x1fcb52(0x210),a154_0x1fcb52(0x218),a154_0x1fcb52(0x228)])[a154_0x1fcb52(0x1e7)](),'visible':z[a154_0x1fcb52(0x22e)]()[a154_0x1fcb52(0x1e7)](),'activations':z[a154_0x1fcb52(0x1ed)](z['any']())[a154_0x1fcb52(0x1e7)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a153_0x49de5f=a153_0x5590;(function(_0x371d95,_0x2f1fc7){const _0x2e0009=a153_0x5590,_0xec96c7=_0x371d95();while(!![]){try{const _0x24ab34=parseInt(_0x2e0009(0x1f9))/0x1*(parseInt(_0x2e0009(0x20d))/0x2)+parseInt(_0x2e0009(0x207))/0x3*(parseInt(_0x2e0009(0x1f5))/0x4)+parseInt(_0x2e0009(0x203))/0x5+parseInt(_0x2e0009(0x1fe))/0x6+parseInt(_0x2e0009(0x1fd))/0x7+-parseInt(_0x2e0009(0x208))/0x8*(parseInt(_0x2e0009(0x204))/0x9)+-parseInt(_0x2e0009(0x1fb))/0xa;if(_0x24ab34===_0x2f1fc7)break;else _0xec96c7['push'](_0xec96c7['shift']());}catch(_0x1dac33){_0xec96c7['push'](_0xec96c7['shift']());}}}(a153_0x217b,0xb10b6));import{readFileSync}from'fs';import*as a153_0x27ad13 from'path';import*as a153_0x535bc5 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';function a153_0x5590(_0x4fc07b,_0x248455){_0x4fc07b=_0x4fc07b-0x1f2;const _0x217b9c=a153_0x217b();let _0x55903d=_0x217b9c[_0x4fc07b];return _0x55903d;}const VALID_CAMPAIGN_TYPES=new Set(['email','push']);export function isJourneyDef(_0x4caced){const _0x3fa16c=a153_0x5590;return typeof _0x4caced===_0x3fa16c(0x206)&&_0x4caced!==null&&_0x3fa16c(0x202)in _0x4caced&&_0x4caced[_0x3fa16c(0x202)]===_0x3fa16c(0x200);}export function isCampaignDef(_0x1003dc){const _0x39da31=a153_0x5590;if(typeof _0x1003dc!==_0x39da31(0x206)||_0x1003dc===null)return![];const _0x4e948f=_0x1003dc,_0x859e01=VALID_CAMPAIGN_TYPES['has'](_0x4e948f[_0x39da31(0x1f8)]);if(_0x4e948f[_0x39da31(0x202)]===_0x39da31(0x201)&&_0x859e01)return!![];if(_0x859e01&&!_0x4e948f[_0x39da31(0x202)])return!![];return![];}export function isTemplateDef(_0x2172ff){const _0x47095d=a153_0x5590;return typeof _0x2172ff===_0x47095d(0x206)&&_0x2172ff!==null&&_0x47095d(0x202)in _0x2172ff&&_0x2172ff[_0x47095d(0x202)]===_0x47095d(0x209);}export function isValidationResult(_0x28e987){const _0x10f7a7=a153_0x5590;return!(_0x10f7a7(0x1f4)in _0x28e987);}export function createParseErrorResult(_0x435129,_0x20aa8e,_0x58218e,_0x4f6d60,_0x31e815=a153_0x49de5f(0x1f6)){const _0x317b16=a153_0x49de5f;return{'filePath':_0x435129,'relativePath':_0x20aa8e,'source':_0x58218e,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x317b16(0x1f3),'message':_0x4f6d60}],'warnings':[]},'fileType':_0x31e815};}function a153_0x217b(){const _0x26fafd=['segment','basename','campaign_type','38NwRzdB','result','20995130PSiUwe','toJSON','1967686SwutWz','725874MtOlvm','warnings','journey','campaign','type','5596080hsXmSz','5868dNhdvX','length','object','6618cdELSE','14296mRdBuo','template','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','YAML\x20parse\x20error:\x20','filterType','65948jBNCpu','relative','YAML_PARSE_ERROR','skipped','2204rmXaEY'];a153_0x217b=function(){return _0x26fafd;};return a153_0x217b();}export function validateYamlFile(_0x439b74,_0x34e4b9,_0x3aa1b3={}){const _0xd2ae5f=a153_0x49de5f,_0x4fa814=a153_0x27ad13[_0xd2ae5f(0x1f2)](_0x34e4b9,_0x439b74)||a153_0x27ad13[_0xd2ae5f(0x1f7)](_0x439b74);try{const _0x511d93=readFileSync(_0x439b74,'utf-8'),_0x37f806=a153_0x535bc5['parseDocument'](_0x511d93),_0x277e99=_0x37f806[_0xd2ae5f(0x1fc)]();if(!_0x277e99)return createParseErrorResult(_0x439b74,_0x4fa814,_0x511d93,_0xd2ae5f(0x20a));let _0x100fcc;if(isJourneyDef(_0x277e99))_0x100fcc='journey';else{if(isCampaignDef(_0x277e99))_0x100fcc=_0xd2ae5f(0x201);else isTemplateDef(_0x277e99)?_0x100fcc=_0xd2ae5f(0x209):_0x100fcc=_0xd2ae5f(0x1f6);}if(_0x3aa1b3[_0xd2ae5f(0x20c)]&&_0x100fcc!==_0x3aa1b3['filterType'])return{'filePath':_0x439b74,'relativePath':_0x4fa814,'skipped':!![],'reason':'not\x20a\x20'+_0x3aa1b3[_0xd2ae5f(0x20c)]};const _0x51a02f={'source':_0x511d93,'document':_0x37f806};let _0x55c0f4;if(_0x100fcc==='journey')_0x55c0f4=validateJourneyDef(_0x277e99,_0x51a02f);else{if(_0x100fcc===_0xd2ae5f(0x201))_0x55c0f4=validateCampaignDef(_0x277e99,_0x51a02f);else _0x100fcc===_0xd2ae5f(0x209)?_0x55c0f4=validateTemplateDef(_0x277e99,_0x51a02f):_0x55c0f4=validateSegmentDef(_0x277e99,_0x51a02f);}return{'filePath':_0x439b74,'relativePath':_0x4fa814,'source':_0x511d93,'result':_0x55c0f4,'fileType':_0x100fcc};}catch(_0x27a078){const _0x496457=_0x27a078 instanceof Error?_0x27a078['message']:String(_0x27a078);return createParseErrorResult(_0x439b74,_0x4fa814,'',_0xd2ae5f(0x20b)+_0x496457);}}export function validateYamlFiles(_0x1e9726,_0x6ec2be,_0x210aa2={}){return _0x1e9726['map'](_0x528e81=>validateYamlFile(_0x528e81,_0x6ec2be,_0x210aa2));}export function calculateSummary(_0x5962bc){const _0xb03fc4=a153_0x49de5f;let _0x113de5=0x0,_0x2b5813=0x0,_0x57e891=0x0,_0x4a16d8=0x0;for(const _0x3a2eb6 of _0x5962bc){if(!isValidationResult(_0x3a2eb6)){_0x4a16d8++;continue;}_0x3a2eb6[_0xb03fc4(0x1fa)]['valid']?_0x113de5++:_0x2b5813++,_0x57e891+=_0x3a2eb6[_0xb03fc4(0x1fa)][_0xb03fc4(0x1ff)][_0xb03fc4(0x205)];}return{'validCount':_0x113de5,'invalidCount':_0x2b5813,'warningCount':_0x57e891,'skippedCount':_0x4a16d8,'hasErrors':_0x2b5813>0x0};}
1
+ const a155_0x571fd8=a155_0x3969;(function(_0x83f8c6,_0x3e3ff5){const _0x319c2a=a155_0x3969,_0x26f789=_0x83f8c6();while(!![]){try{const _0x1e2122=-parseInt(_0x319c2a(0x6d))/0x1*(parseInt(_0x319c2a(0x6b))/0x2)+parseInt(_0x319c2a(0x7d))/0x3+-parseInt(_0x319c2a(0x89))/0x4*(-parseInt(_0x319c2a(0x83))/0x5)+-parseInt(_0x319c2a(0x80))/0x6+-parseInt(_0x319c2a(0x82))/0x7+parseInt(_0x319c2a(0x73))/0x8+-parseInt(_0x319c2a(0x79))/0x9*(parseInt(_0x319c2a(0x7f))/0xa);if(_0x1e2122===_0x3e3ff5)break;else _0x26f789['push'](_0x26f789['shift']());}catch(_0x4904cd){_0x26f789['push'](_0x26f789['shift']());}}}(a155_0x5857,0xb98d0));import{readFileSync}from'fs';import*as a155_0x295a8c from'path';import*as a155_0x50048a 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';function a155_0x3969(_0x297f81,_0x1c649e){_0x297f81=_0x297f81-0x6b;const _0x585742=a155_0x5857();let _0x396965=_0x585742[_0x297f81];return _0x396965;}const VALID_CAMPAIGN_TYPES=new Set([a155_0x571fd8(0x8a),'push']);export function isJourneyDef(_0x427a4b){const _0x94f61a=a155_0x571fd8;return typeof _0x427a4b==='object'&&_0x427a4b!==null&&_0x94f61a(0x85)in _0x427a4b&&_0x427a4b['type']===_0x94f61a(0x81);}export function isCampaignDef(_0x140409){const _0x46275e=a155_0x571fd8;if(typeof _0x140409!==_0x46275e(0x87)||_0x140409===null)return![];const _0x597403=_0x140409,_0x7a8a7=VALID_CAMPAIGN_TYPES[_0x46275e(0x77)](_0x597403[_0x46275e(0x6e)]);if(_0x597403['type']===_0x46275e(0x7b)&&_0x7a8a7)return!![];if(_0x7a8a7&&!_0x597403[_0x46275e(0x85)])return!![];return![];}export function isTemplateDef(_0xce81b5){const _0x3d474b=a155_0x571fd8;return typeof _0xce81b5===_0x3d474b(0x87)&&_0xce81b5!==null&&_0x3d474b(0x85)in _0xce81b5&&_0xce81b5[_0x3d474b(0x85)]===_0x3d474b(0x74);}function a155_0x5857(){const _0x2c482c=['campaign_type','map','basename','message','toJSON','11662992XCxGYo','template','result','length','has','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','7336431qZrvdq','utf-8','campaign','segment','3282510HxblJI','not\x20a\x20','10pkuaFV','4706832IvGZQy','journey','1300614wWdAdD','215ChJRUH','warnings','type','relative','object','YAML_PARSE_ERROR','72844PehXxK','email','35894LhPraB','error','44SnZtMA'];a155_0x5857=function(){return _0x2c482c;};return a155_0x5857();}export function isValidationResult(_0x4b5cca){return!('skipped'in _0x4b5cca);}export function createParseErrorResult(_0x121d82,_0x41eaaf,_0x1247f1,_0x3669d8,_0x10d9c9=a155_0x571fd8(0x7c)){const _0x185918=a155_0x571fd8;return{'filePath':_0x121d82,'relativePath':_0x41eaaf,'source':_0x1247f1,'result':{'valid':![],'errors':[{'level':_0x185918(0x6c),'path':'','code':_0x185918(0x88),'message':_0x3669d8}],'warnings':[]},'fileType':_0x10d9c9};}export function validateYamlFile(_0x415cbb,_0x4792bf,_0x489f73={}){const _0xf1f985=a155_0x571fd8,_0x3b54a0=a155_0x295a8c[_0xf1f985(0x86)](_0x4792bf,_0x415cbb)||a155_0x295a8c[_0xf1f985(0x70)](_0x415cbb);try{const _0x1d7eee=readFileSync(_0x415cbb,_0xf1f985(0x7a)),_0x298007=a155_0x50048a['parseDocument'](_0x1d7eee),_0x27cfef=_0x298007[_0xf1f985(0x72)]();if(!_0x27cfef)return createParseErrorResult(_0x415cbb,_0x3b54a0,_0x1d7eee,_0xf1f985(0x78));let _0x401828;if(isJourneyDef(_0x27cfef))_0x401828=_0xf1f985(0x81);else{if(isCampaignDef(_0x27cfef))_0x401828=_0xf1f985(0x7b);else isTemplateDef(_0x27cfef)?_0x401828=_0xf1f985(0x74):_0x401828=_0xf1f985(0x7c);}if(_0x489f73['filterType']&&_0x401828!==_0x489f73['filterType'])return{'filePath':_0x415cbb,'relativePath':_0x3b54a0,'skipped':!![],'reason':_0xf1f985(0x7e)+_0x489f73['filterType']};const _0x46265a={'source':_0x1d7eee,'document':_0x298007};let _0x4a4df3;if(_0x401828==='journey')_0x4a4df3=validateJourneyDef(_0x27cfef,_0x46265a);else{if(_0x401828===_0xf1f985(0x7b))_0x4a4df3=validateCampaignDef(_0x27cfef,_0x46265a);else _0x401828===_0xf1f985(0x74)?_0x4a4df3=validateTemplateDef(_0x27cfef,_0x46265a):_0x4a4df3=validateSegmentDef(_0x27cfef,_0x46265a);}return{'filePath':_0x415cbb,'relativePath':_0x3b54a0,'source':_0x1d7eee,'result':_0x4a4df3,'fileType':_0x401828};}catch(_0x2bed2c){const _0x4347ea=_0x2bed2c instanceof Error?_0x2bed2c[_0xf1f985(0x71)]:String(_0x2bed2c);return createParseErrorResult(_0x415cbb,_0x3b54a0,'','YAML\x20parse\x20error:\x20'+_0x4347ea);}}export function validateYamlFiles(_0x14d4f2,_0x3cad7a,_0x7c379d={}){const _0x335950=a155_0x571fd8;return _0x14d4f2[_0x335950(0x6f)](_0x2239cf=>validateYamlFile(_0x2239cf,_0x3cad7a,_0x7c379d));}export function calculateSummary(_0x18cf35){const _0x39696c=a155_0x571fd8;let _0x5a2e37=0x0,_0x22874d=0x0,_0x6ac0ae=0x0,_0x46a537=0x0;for(const _0x2b7534 of _0x18cf35){if(!isValidationResult(_0x2b7534)){_0x46a537++;continue;}_0x2b7534['result']['valid']?_0x5a2e37++:_0x22874d++,_0x6ac0ae+=_0x2b7534[_0x39696c(0x75)][_0x39696c(0x84)][_0x39696c(0x76)];}return{'validCount':_0x5a2e37,'invalidCount':_0x22874d,'warningCount':_0x6ac0ae,'skippedCount':_0x46a537,'hasErrors':_0x22874d>0x0};}
@@ -1 +1 @@
1
- (function(_0x2cfd8d,_0x5dd551){const _0x5369ff=a154_0x3a6b,_0x5993c7=_0x2cfd8d();while(!![]){try{const _0xbcedf2=-parseInt(_0x5369ff(0xbf))/0x1*(-parseInt(_0x5369ff(0xcb))/0x2)+parseInt(_0x5369ff(0xbb))/0x3*(parseInt(_0x5369ff(0xb5))/0x4)+parseInt(_0x5369ff(0xb7))/0x5+-parseInt(_0x5369ff(0xce))/0x6+-parseInt(_0x5369ff(0xc7))/0x7+parseInt(_0x5369ff(0xbc))/0x8+parseInt(_0x5369ff(0xb2))/0x9*(parseInt(_0x5369ff(0xb3))/0xa);if(_0xbcedf2===_0x5dd551)break;else _0x5993c7['push'](_0x5993c7['shift']());}catch(_0x398381){_0x5993c7['push'](_0x5993c7['shift']());}}}(a154_0x53c3,0x1d020));function a154_0x3a6b(_0x1b9795,_0xae847f){_0x1b9795=_0x1b9795-0xa2;const _0x53c3a7=a154_0x53c3();let _0x3a6b39=_0x53c3a7[_0x1b9795];return _0x3a6b39;}import*as a154_0x58308d from'yaml';import a154_0x52448e from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3a5b6c,_0x3b3629,_0x16bb3f){const _0x20bceb=a154_0x3a6b;if(!_0x3a5b6c||!_0x3b3629)return undefined;try{let _0x74ba9d=_0x3a5b6c['getIn'](_0x16bb3f,!![]),_0x312907=[..._0x16bb3f];while((!_0x74ba9d||typeof _0x74ba9d!==_0x20bceb(0xbe)||!('range'in _0x74ba9d)||!_0x74ba9d[_0x20bceb(0xc2)])&&_0x312907['length']>0x0){_0x312907[_0x20bceb(0xa5)](),_0x74ba9d=_0x312907[_0x20bceb(0xad)]>0x0?_0x3a5b6c[_0x20bceb(0xae)](_0x312907,!![]):_0x3a5b6c['contents'];}if(!_0x74ba9d||typeof _0x74ba9d!==_0x20bceb(0xbe)||!(_0x20bceb(0xc2)in _0x74ba9d)||!_0x74ba9d[_0x20bceb(0xc2)])return undefined;const [_0x21cf8e]=_0x74ba9d['range'];return offsetToLocation(_0x3b3629,_0x21cf8e);}catch{return undefined;}}export function offsetToLocation(_0x4c5061,_0x108f43){const _0x335444=a154_0x3a6b;let _0x23562e=0x1,_0x3fec0e=0x1;for(let _0xa590a7=0x0;_0xa590a7<_0x108f43&&_0xa590a7<_0x4c5061[_0x335444(0xad)];_0xa590a7++){_0x4c5061[_0xa590a7]==='\x0a'?(_0x23562e++,_0x3fec0e=0x1):_0x3fec0e++;}return{'line':_0x23562e,'column':_0x3fec0e,'offset':_0x108f43};}export function pathToArray(_0xda6f88){const _0xceadae=a154_0x3a6b;if(!_0xda6f88)return[];return _0xda6f88[_0xceadae(0xc3)]('.')['flatMap'](_0x265a7b=>{const _0x1f89ba=_0xceadae,_0xdadd01=_0x265a7b[_0x1f89ba(0xa3)](/^(\w+)\[(\d+)\]$/);if(_0xdadd01)return[_0xdadd01[0x1],parseInt(_0xdadd01[0x2],0xa)];return[_0x265a7b];});}export function formatZodPath(_0xc22795){const _0x2b8fbe=a154_0x3a6b;let _0x55ac3b='';for(const _0x43b5dc of _0xc22795){if(typeof _0x43b5dc===_0x2b8fbe(0xca))_0x55ac3b+='['+_0x43b5dc+']';else{const _0x40cd8b=String(_0x43b5dc);_0x55ac3b+=_0x55ac3b?'.'+_0x40cd8b:_0x40cd8b;}}return _0x55ac3b;}export function flattenZodIssues(_0x14c71e){const _0x696f59=a154_0x3a6b,_0x339140=[];for(const _0x31483a of _0x14c71e){if(_0x31483a[_0x696f59(0xa2)]===_0x696f59(0xaa)&&_0x696f59(0xcc)in _0x31483a){const _0x43af8d=_0x31483a[_0x696f59(0xcc)];let _0xe28028=_0x43af8d[0x0]||[];for(const _0xffd376 of _0x43af8d){_0xffd376[_0x696f59(0xad)]<_0xe28028[_0x696f59(0xad)]&&(_0xe28028=_0xffd376);}const _0x5d083c=_0xe28028[_0x696f59(0xc8)](_0x79a9bd=>({..._0x79a9bd,'path':[..._0x31483a[_0x696f59(0xc6)],..._0x79a9bd[_0x696f59(0xc6)]]}));_0x339140[_0x696f59(0xcf)](...flattenZodIssues(_0x5d083c));}else _0x339140[_0x696f59(0xcf)](_0x31483a);}return _0x339140;}export function safeParseYaml(_0x33089f,_0x16833f){const _0x267840=a154_0x3a6b,_0x1b94ce=a154_0x58308d[_0x267840(0xa7)](_0x33089f);if(!_0x1b94ce||typeof _0x1b94ce!==_0x267840(0xbe))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x26c6ee=_0x16833f[_0x267840(0xac)](_0x1b94ce);if(!_0x26c6ee[_0x267840(0xcd)]){const _0x14d40b=_0x26c6ee[_0x267840(0xaf)][_0x267840(0xb9)][0x0],_0x1e7236=formatZodPath(_0x14d40b[_0x267840(0xc6)]);throw new Error(_0x1e7236?_0x267840(0xa6)+_0x1e7236+_0x267840(0xc9)+_0x14d40b[_0x267840(0xa4)]:_0x267840(0xc5)+_0x14d40b['message']);}return _0x26c6ee[_0x267840(0xb8)];}export function formatIssueWithContext(_0x545d31,_0x54a3a0,_0x174f7e){const _0x4505a1=a154_0x3a6b,_0x6c9b3e=[],_0x524fe2=_0x545d31[_0x4505a1(0xb6)]===_0x4505a1(0xaf),_0x4c0caa=_0x524fe2?a154_0x52448e['red']:a154_0x52448e[_0x4505a1(0xb4)],_0x22548c=_0x524fe2?a154_0x52448e['red']:a154_0x52448e[_0x4505a1(0xb4)],_0x2ed568=_0x174f7e?a154_0x52448e['cyan'](_0x174f7e+':'):'';if(_0x545d31[_0x4505a1(0xc4)]){const _0x45890a=a154_0x52448e[_0x4505a1(0xa8)](_0x545d31[_0x4505a1(0xc4)]['line']+':'+_0x545d31['location'][_0x4505a1(0xa9)]);_0x6c9b3e[_0x4505a1(0xcf)](''+_0x2ed568+_0x45890a+':\x20'+_0x4c0caa(_0x545d31[_0x4505a1(0xb6)])+'\x20'+_0x22548c('['+_0x545d31[_0x4505a1(0xa2)]+']'));}else _0x6c9b3e[_0x4505a1(0xcf)](''+_0x2ed568+a154_0x52448e[_0x4505a1(0xc1)](_0x545d31[_0x4505a1(0xc6)])+':\x20'+_0x4c0caa(_0x545d31[_0x4505a1(0xb6)])+'\x20'+_0x22548c('['+_0x545d31['code']+']'));_0x6c9b3e['push'](_0x545d31[_0x4505a1(0xa4)]);if(_0x545d31['location']&&_0x54a3a0){const _0x14e7e3=_0x54a3a0[_0x4505a1(0xc3)]('\x0a'),{line:_0x180f4c,column:_0x2dbbf8}=_0x545d31[_0x4505a1(0xc4)],_0x3095ce=Math[_0x4505a1(0xb0)](0x1,_0x180f4c-0x1),_0x2843c8=Math[_0x4505a1(0xbd)](_0x14e7e3[_0x4505a1(0xad)],_0x180f4c+0x1);_0x6c9b3e[_0x4505a1(0xcf)]('');for(let _0x5eedc7=_0x3095ce;_0x5eedc7<=_0x2843c8;_0x5eedc7++){const _0x2a7be7=_0x14e7e3[_0x5eedc7-0x1]||'',_0x585670=a154_0x52448e[_0x4505a1(0xc1)](_0x5eedc7[_0x4505a1(0xba)]()['padStart'](0x4)),_0x23f0bf=a154_0x52448e['dim'](_0x4505a1(0xb1));if(_0x5eedc7===_0x180f4c){_0x6c9b3e[_0x4505a1(0xcf)]('\x20\x20'+_0x585670+_0x23f0bf+_0x4c0caa(_0x2a7be7));const _0x36de24='\x20'['repeat'](0x4+0x3+_0x2dbbf8-0x1);_0x6c9b3e[_0x4505a1(0xcf)]('\x20\x20'+_0x36de24+_0x4c0caa('^'));}else _0x6c9b3e[_0x4505a1(0xcf)]('\x20\x20'+_0x585670+_0x23f0bf+a154_0x52448e[_0x4505a1(0xc1)](_0x2a7be7));}}return _0x6c9b3e[_0x4505a1(0xab)]('\x0a');}function a154_0x53c3(){const _0x1f9211=['length','getIn','error','max','\x20|\x20','18ZJHpFx','68810qXPiXj','yellow','4NXpded','level','172455mdcMiT','data','issues','toString','252807UPcIwf','1590464KxrcWH','min','object','42015uSfqoh','warnings','dim','range','split','location','YAML\x20validation\x20error:\x20','path','1323455Hsnzly','map','\x27:\x20','number','6lVuLoK','errors','success','896964xbBQpV','push','code','match','message','pop','YAML\x20validation\x20error\x20at\x20\x27','parse','cyan','column','invalid_union','join','safeParse'];a154_0x53c3=function(){return _0x1f9211;};return a154_0x53c3();}export function formatValidationResult(_0x13122f,_0x5e2f65,_0x5eaba7){const _0x2de73b=a154_0x3a6b,_0x2d9574=[];for(const _0x2412c4 of _0x13122f[_0x2de73b(0xcc)]){_0x2d9574[_0x2de73b(0xcf)](formatIssueWithContext(_0x2412c4,_0x5e2f65,_0x5eaba7)),_0x2d9574[_0x2de73b(0xcf)]('');}for(const _0x22a3cd of _0x13122f[_0x2de73b(0xc0)]){_0x2d9574[_0x2de73b(0xcf)](formatIssueWithContext(_0x22a3cd,_0x5e2f65,_0x5eaba7)),_0x2d9574['push']('');}return _0x2d9574[_0x2de73b(0xab)]('\x0a');}
1
+ (function(_0x301a6a,_0x4f09c8){const _0x1c2189=a156_0x4491,_0x629931=_0x301a6a();while(!![]){try{const _0x21c73d=parseInt(_0x1c2189(0x1f4))/0x1+-parseInt(_0x1c2189(0x1da))/0x2+-parseInt(_0x1c2189(0x1ef))/0x3*(parseInt(_0x1c2189(0x1e5))/0x4)+parseInt(_0x1c2189(0x1db))/0x5*(parseInt(_0x1c2189(0x1fe))/0x6)+-parseInt(_0x1c2189(0x1ff))/0x7+-parseInt(_0x1c2189(0x1ec))/0x8*(-parseInt(_0x1c2189(0x1fa))/0x9)+parseInt(_0x1c2189(0x1d4))/0xa*(parseInt(_0x1c2189(0x1f0))/0xb);if(_0x21c73d===_0x4f09c8)break;else _0x629931['push'](_0x629931['shift']());}catch(_0x37d5ef){_0x629931['push'](_0x629931['shift']());}}}(a156_0x4334,0x47706));import*as a156_0x1a6d7e from'yaml';import a156_0x3ac6e6 from'chalk';function a156_0x4334(){const _0x44a7a7=['max','message','map','level','yellow','repeat','join','path','invalid_union','4CqFvUq','length','padStart','data','range','pop','split','30104gBmhxu','\x20|\x20','success','1074249xojXDr','4078008jNqNhh','column','YAML\x20validation\x20error\x20at\x20\x27','errors','324632VoVykN','red','push','dim','Invalid\x20YAML:\x20expected\x20an\x20object','getIn','9KMcOwZ','code','object','location','1066722yVKYhb','1122331qAsodf','cyan','contents','flatMap','10wWlcJy','issues','\x27:\x20','YAML\x20validation\x20error:\x20','error','parse','131760CfpGFi','5qyTicg'];a156_0x4334=function(){return _0x44a7a7;};return a156_0x4334();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x11cc1c,_0x199b94,_0x9017d){const _0x295720=a156_0x4491;if(!_0x11cc1c||!_0x199b94)return undefined;try{let _0x3e9920=_0x11cc1c[_0x295720(0x1f9)](_0x9017d,!![]),_0x55ea7b=[..._0x9017d];while((!_0x3e9920||typeof _0x3e9920!==_0x295720(0x1fc)||!(_0x295720(0x1e9)in _0x3e9920)||!_0x3e9920[_0x295720(0x1e9)])&&_0x55ea7b['length']>0x0){_0x55ea7b[_0x295720(0x1ea)](),_0x3e9920=_0x55ea7b[_0x295720(0x1e6)]>0x0?_0x11cc1c[_0x295720(0x1f9)](_0x55ea7b,!![]):_0x11cc1c[_0x295720(0x201)];}if(!_0x3e9920||typeof _0x3e9920!==_0x295720(0x1fc)||!('range'in _0x3e9920)||!_0x3e9920[_0x295720(0x1e9)])return undefined;const [_0xca532f]=_0x3e9920[_0x295720(0x1e9)];return offsetToLocation(_0x199b94,_0xca532f);}catch{return undefined;}}export function offsetToLocation(_0x55f825,_0x3aa7cb){const _0x25a2b7=a156_0x4491;let _0x5d96f1=0x1,_0x1d4074=0x1;for(let _0x10c748=0x0;_0x10c748<_0x3aa7cb&&_0x10c748<_0x55f825[_0x25a2b7(0x1e6)];_0x10c748++){_0x55f825[_0x10c748]==='\x0a'?(_0x5d96f1++,_0x1d4074=0x1):_0x1d4074++;}return{'line':_0x5d96f1,'column':_0x1d4074,'offset':_0x3aa7cb};}export function pathToArray(_0x213276){const _0x24393e=a156_0x4491;if(!_0x213276)return[];return _0x213276[_0x24393e(0x1eb)]('.')[_0x24393e(0x1d3)](_0x185f01=>{const _0x255e77=_0x185f01['match'](/^(\w+)\[(\d+)\]$/);if(_0x255e77)return[_0x255e77[0x1],parseInt(_0x255e77[0x2],0xa)];return[_0x185f01];});}export function formatZodPath(_0x35034e){let _0x3f4b88='';for(const _0x411407 of _0x35034e){if(typeof _0x411407==='number')_0x3f4b88+='['+_0x411407+']';else{const _0x6a02af=String(_0x411407);_0x3f4b88+=_0x3f4b88?'.'+_0x6a02af:_0x6a02af;}}return _0x3f4b88;}export function flattenZodIssues(_0x49c2b9){const _0x2bf15b=a156_0x4491,_0x45ff80=[];for(const _0x466dc6 of _0x49c2b9){if(_0x466dc6[_0x2bf15b(0x1fb)]===_0x2bf15b(0x1e4)&&_0x2bf15b(0x1f3)in _0x466dc6){const _0x70f38b=_0x466dc6['errors'];let _0x4fb695=_0x70f38b[0x0]||[];for(const _0x257634 of _0x70f38b){_0x257634[_0x2bf15b(0x1e6)]<_0x4fb695[_0x2bf15b(0x1e6)]&&(_0x4fb695=_0x257634);}const _0x321169=_0x4fb695[_0x2bf15b(0x1de)](_0x3c196f=>({..._0x3c196f,'path':[..._0x466dc6['path'],..._0x3c196f[_0x2bf15b(0x1e3)]]}));_0x45ff80[_0x2bf15b(0x1f6)](...flattenZodIssues(_0x321169));}else _0x45ff80['push'](_0x466dc6);}return _0x45ff80;}export function safeParseYaml(_0x841240,_0x710ffe){const _0x47fafa=a156_0x4491,_0x458bd9=a156_0x1a6d7e[_0x47fafa(0x1d9)](_0x841240);if(!_0x458bd9||typeof _0x458bd9!==_0x47fafa(0x1fc))throw new Error(_0x47fafa(0x1f8));const _0xed130c=_0x710ffe['safeParse'](_0x458bd9);if(!_0xed130c[_0x47fafa(0x1ee)]){const _0x55990d=_0xed130c[_0x47fafa(0x1d8)][_0x47fafa(0x1d5)][0x0],_0x53bbcc=formatZodPath(_0x55990d[_0x47fafa(0x1e3)]);throw new Error(_0x53bbcc?_0x47fafa(0x1f2)+_0x53bbcc+_0x47fafa(0x1d6)+_0x55990d[_0x47fafa(0x1dd)]:_0x47fafa(0x1d7)+_0x55990d['message']);}return _0xed130c[_0x47fafa(0x1e8)];}function a156_0x4491(_0x557380,_0x3007a0){_0x557380=_0x557380-0x1d3;const _0x4334f9=a156_0x4334();let _0x449128=_0x4334f9[_0x557380];return _0x449128;}export function formatIssueWithContext(_0x4ffb23,_0x5a51b5,_0x493920){const _0x104c33=a156_0x4491,_0x535df7=[],_0x4bf030=_0x4ffb23[_0x104c33(0x1df)]===_0x104c33(0x1d8),_0x6b97f1=_0x4bf030?a156_0x3ac6e6['red']:a156_0x3ac6e6[_0x104c33(0x1e0)],_0x3e397e=_0x4bf030?a156_0x3ac6e6[_0x104c33(0x1f5)]:a156_0x3ac6e6[_0x104c33(0x1e0)],_0x4bb69f=_0x493920?a156_0x3ac6e6[_0x104c33(0x200)](_0x493920+':'):'';if(_0x4ffb23[_0x104c33(0x1fd)]){const _0x29fd67=a156_0x3ac6e6[_0x104c33(0x200)](_0x4ffb23[_0x104c33(0x1fd)]['line']+':'+_0x4ffb23[_0x104c33(0x1fd)][_0x104c33(0x1f1)]);_0x535df7[_0x104c33(0x1f6)](''+_0x4bb69f+_0x29fd67+':\x20'+_0x6b97f1(_0x4ffb23[_0x104c33(0x1df)])+'\x20'+_0x3e397e('['+_0x4ffb23[_0x104c33(0x1fb)]+']'));}else _0x535df7['push'](''+_0x4bb69f+a156_0x3ac6e6[_0x104c33(0x1f7)](_0x4ffb23[_0x104c33(0x1e3)])+':\x20'+_0x6b97f1(_0x4ffb23[_0x104c33(0x1df)])+'\x20'+_0x3e397e('['+_0x4ffb23[_0x104c33(0x1fb)]+']'));_0x535df7['push'](_0x4ffb23['message']);if(_0x4ffb23[_0x104c33(0x1fd)]&&_0x5a51b5){const _0x30e6df=_0x5a51b5[_0x104c33(0x1eb)]('\x0a'),{line:_0x5a55b7,column:_0x5c578f}=_0x4ffb23[_0x104c33(0x1fd)],_0x580a49=Math[_0x104c33(0x1dc)](0x1,_0x5a55b7-0x1),_0x53d968=Math['min'](_0x30e6df[_0x104c33(0x1e6)],_0x5a55b7+0x1);_0x535df7[_0x104c33(0x1f6)]('');for(let _0x32d87d=_0x580a49;_0x32d87d<=_0x53d968;_0x32d87d++){const _0x12a2a6=_0x30e6df[_0x32d87d-0x1]||'',_0x218ef9=a156_0x3ac6e6[_0x104c33(0x1f7)](_0x32d87d['toString']()[_0x104c33(0x1e7)](0x4)),_0xe696b7=a156_0x3ac6e6[_0x104c33(0x1f7)](_0x104c33(0x1ed));if(_0x32d87d===_0x5a55b7){_0x535df7[_0x104c33(0x1f6)]('\x20\x20'+_0x218ef9+_0xe696b7+_0x6b97f1(_0x12a2a6));const _0x553afd='\x20'[_0x104c33(0x1e1)](0x4+0x3+_0x5c578f-0x1);_0x535df7[_0x104c33(0x1f6)]('\x20\x20'+_0x553afd+_0x6b97f1('^'));}else _0x535df7['push']('\x20\x20'+_0x218ef9+_0xe696b7+a156_0x3ac6e6['dim'](_0x12a2a6));}}return _0x535df7[_0x104c33(0x1e2)]('\x0a');}export function formatValidationResult(_0x2d2025,_0x122aaf,_0x38d1f8){const _0x5d2637=a156_0x4491,_0x1a534d=[];for(const _0x1376d0 of _0x2d2025['errors']){_0x1a534d[_0x5d2637(0x1f6)](formatIssueWithContext(_0x1376d0,_0x122aaf,_0x38d1f8)),_0x1a534d['push']('');}for(const _0x3e7345 of _0x2d2025['warnings']){_0x1a534d[_0x5d2637(0x1f6)](formatIssueWithContext(_0x3e7345,_0x122aaf,_0x38d1f8)),_0x1a534d[_0x5d2637(0x1f6)]('');}return _0x1a534d[_0x5d2637(0x1e2)]('\x0a');}