@treasuredata/tdx 2026.3.48 → 2026.3.50

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 (258) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.d.ts +22 -0
  12. package/dist/commands/auth-command.d.ts.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-segment-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-statusline-command.js +1 -1
  20. package/dist/commands/claude-usage-command.js +1 -1
  21. package/dist/commands/command.js +1 -1
  22. package/dist/commands/connection-command.js +1 -1
  23. package/dist/commands/databases.js +1 -1
  24. package/dist/commands/delivery-command.js +1 -1
  25. package/dist/commands/describe.js +1 -1
  26. package/dist/commands/engage-campaign-pull-command.js +1 -1
  27. package/dist/commands/engage-campaign-push-command.js +1 -1
  28. package/dist/commands/engage-campaign-validate-command.js +1 -1
  29. package/dist/commands/engage-command.js +1 -1
  30. package/dist/commands/engage-template-pull-command.js +1 -1
  31. package/dist/commands/engage-template-push-command.js +1 -1
  32. package/dist/commands/engage-template-validate-command.js +1 -1
  33. package/dist/commands/job-command.js +1 -1
  34. package/dist/commands/journey-command.js +1 -1
  35. package/dist/commands/journey-validate-command.js +1 -1
  36. package/dist/commands/llm-command.js +1 -1
  37. package/dist/commands/mcp-command.js +1 -1
  38. package/dist/commands/parent-segment-command.js +1 -1
  39. package/dist/commands/policy-command.js +1 -1
  40. package/dist/commands/profile-command.d.ts +5 -5
  41. package/dist/commands/profile-command.d.ts.map +1 -1
  42. package/dist/commands/profile-command.js +1 -1
  43. package/dist/commands/profile-command.js.map +1 -1
  44. package/dist/commands/profiles-command.js +1 -1
  45. package/dist/commands/query-command.js +1 -1
  46. package/dist/commands/schedule-command.js +1 -1
  47. package/dist/commands/segment-command.js +1 -1
  48. package/dist/commands/segment-create-command.js +1 -1
  49. package/dist/commands/segment-fields-command.js +1 -1
  50. package/dist/commands/segment-pull-command.js +1 -1
  51. package/dist/commands/segment-push-command.js +1 -1
  52. package/dist/commands/segment-update-command.js +1 -1
  53. package/dist/commands/segment-use-command.js +1 -1
  54. package/dist/commands/segment-validate-command.js +1 -1
  55. package/dist/commands/segments.js +1 -1
  56. package/dist/commands/show.js +1 -1
  57. package/dist/commands/status-command.js +1 -1
  58. package/dist/commands/tables.js +1 -1
  59. package/dist/commands/unset-command.js +1 -1
  60. package/dist/commands/upgrade-command.js +1 -1
  61. package/dist/commands/use-command.js +1 -1
  62. package/dist/commands/user-command.js +1 -1
  63. package/dist/commands/work-command.js +1 -1
  64. package/dist/commands/workflow-command.js +1 -1
  65. package/dist/core/auth.js +1 -1
  66. package/dist/core/command-output.js +1 -1
  67. package/dist/core/config.d.ts +6 -4
  68. package/dist/core/config.d.ts.map +1 -1
  69. package/dist/core/config.js +1 -1
  70. package/dist/core/config.js.map +1 -1
  71. package/dist/core/connection-cache.js +1 -1
  72. package/dist/core/constants.js +1 -1
  73. package/dist/core/credential-cache.js +1 -1
  74. package/dist/core/global-context.js +1 -1
  75. package/dist/core/keychain.js +1 -1
  76. package/dist/core/oauth-keychain.js +1 -1
  77. package/dist/core/oauth.d.ts +12 -8
  78. package/dist/core/oauth.d.ts.map +1 -1
  79. package/dist/core/oauth.js +1 -1
  80. package/dist/core/oauth.js.map +1 -1
  81. package/dist/core/profile.js +1 -1
  82. package/dist/core/project-config.js +1 -1
  83. package/dist/core/session.js +1 -1
  84. package/dist/core/user-cache.js +1 -1
  85. package/dist/core/version.js +1 -1
  86. package/dist/index.js +1 -1
  87. package/dist/mcp/server.js +1 -1
  88. package/dist/mcp/tools/index.js +1 -1
  89. package/dist/mcp/tools/tdx-run.js +1 -1
  90. package/dist/mcp/tools/tdx-search.js +1 -1
  91. package/dist/mcp/utils.d.ts.map +1 -1
  92. package/dist/mcp/utils.js +1 -1
  93. package/dist/mcp/utils.js.map +1 -1
  94. package/dist/proxy/claude-usage-tracker.js +1 -1
  95. package/dist/proxy/passthrough-server.js +1 -1
  96. package/dist/proxy/sse-usage-parser.js +1 -1
  97. package/dist/sdk/agent/agent-config.js +1 -1
  98. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  99. package/dist/sdk/agent/agent-yaml.js +1 -1
  100. package/dist/sdk/agent/test/evaluator.js +1 -1
  101. package/dist/sdk/agent/test/executor.js +1 -1
  102. package/dist/sdk/agent/test/index.js +1 -1
  103. package/dist/sdk/agent/test/output.js +1 -1
  104. package/dist/sdk/agent/test/parser.js +1 -1
  105. package/dist/sdk/agent/tool-target-registry.js +1 -1
  106. package/dist/sdk/api.js +1 -1
  107. package/dist/sdk/cas/cas-api-client.js +1 -1
  108. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  109. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  110. package/dist/sdk/cas/index.js +1 -1
  111. package/dist/sdk/cas/pull-workflow.js +1 -1
  112. package/dist/sdk/cas/push-workflow.js +1 -1
  113. package/dist/sdk/client/cdp-api-client.js +1 -1
  114. package/dist/sdk/client/delivery-api-client.js +1 -1
  115. package/dist/sdk/client/endpoints.js +1 -1
  116. package/dist/sdk/client/engage-api-client.js +1 -1
  117. package/dist/sdk/client/http-client.js +1 -1
  118. package/dist/sdk/client/llm-api-client.js +1 -1
  119. package/dist/sdk/client/oauth-refresh.js +1 -1
  120. package/dist/sdk/client/rate-limiter.js +1 -1
  121. package/dist/sdk/client/td-api-client.js +1 -1
  122. package/dist/sdk/client/trino-api-client.js +1 -1
  123. package/dist/sdk/client/workflow-client.js +1 -1
  124. package/dist/sdk/connection-validator.js +1 -1
  125. package/dist/sdk/connection.js +1 -1
  126. package/dist/sdk/delivery.js +1 -1
  127. package/dist/sdk/engage/campaign-pull.js +1 -1
  128. package/dist/sdk/engage/campaign-push.js +1 -1
  129. package/dist/sdk/engage/campaign-validator.js +1 -1
  130. package/dist/sdk/engage/campaign-yaml.js +1 -1
  131. package/dist/sdk/engage/template-pull.js +1 -1
  132. package/dist/sdk/engage/template-push.js +1 -1
  133. package/dist/sdk/engage/template-validator.js +1 -1
  134. package/dist/sdk/engage/template-yaml.js +1 -1
  135. package/dist/sdk/engage/types/campaign-def.js +1 -1
  136. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  137. package/dist/sdk/engage/types/template-schema.js +1 -1
  138. package/dist/sdk/engage.js +1 -1
  139. package/dist/sdk/errors.js +1 -1
  140. package/dist/sdk/index.js +1 -1
  141. package/dist/sdk/io/index.js +1 -1
  142. package/dist/sdk/io/node-filesystem.js +1 -1
  143. package/dist/sdk/job.js +1 -1
  144. package/dist/sdk/journey.js +1 -1
  145. package/dist/sdk/llm/chat-cache.js +1 -1
  146. package/dist/sdk/llm/index.js +1 -1
  147. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  148. package/dist/sdk/llm/model-factors.js +1 -1
  149. package/dist/sdk/personalization.js +1 -1
  150. package/dist/sdk/policy.js +1 -1
  151. package/dist/sdk/query/index.js +1 -1
  152. package/dist/sdk/query/sql-parser.js +1 -1
  153. package/dist/sdk/realtime.js +1 -1
  154. package/dist/sdk/schedule.js +1 -1
  155. package/dist/sdk/segment/child-segment-yaml.d.ts +8 -0
  156. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  157. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  158. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  159. package/dist/sdk/segment/fields-display.js +1 -1
  160. package/dist/sdk/segment/file-discovery.js +1 -1
  161. package/dist/sdk/segment/journey-utils.js +1 -1
  162. package/dist/sdk/segment/journey-validator.js +1 -1
  163. package/dist/sdk/segment/journey-yaml.js +1 -1
  164. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  165. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  166. package/dist/sdk/segment/pull-workflow.js +1 -1
  167. package/dist/sdk/segment/push-recovery.js +1 -1
  168. package/dist/sdk/segment/push-workflow.js +1 -1
  169. package/dist/sdk/segment/resolution-context.js +1 -1
  170. package/dist/sdk/segment/segment-path-parser.js +1 -1
  171. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  172. package/dist/sdk/segment/segment-validator.js +1 -1
  173. package/dist/sdk/segment/target-resolution.js +1 -1
  174. package/dist/sdk/segment/tdx-config.js +1 -1
  175. package/dist/sdk/segment/types/activation-schema.js +1 -1
  176. package/dist/sdk/segment/types/journey-def.js +1 -1
  177. package/dist/sdk/segment/types/journey-schema.js +1 -1
  178. package/dist/sdk/segment/types/segment-def.js +1 -1
  179. package/dist/sdk/segment/types/segment-schema.js +1 -1
  180. package/dist/sdk/segment/validate-files.js +1 -1
  181. package/dist/sdk/segment/yaml-validator.js +1 -1
  182. package/dist/sdk/segment.js +1 -1
  183. package/dist/sdk/types/index.d.ts +1 -1
  184. package/dist/sdk/types/index.d.ts.map +1 -1
  185. package/dist/sdk/types/index.js +1 -1
  186. package/dist/sdk/types/index.js.map +1 -1
  187. package/dist/sdk/types/progress.js +1 -1
  188. package/dist/sdk/types/workspace.d.ts +29 -0
  189. package/dist/sdk/types/workspace.d.ts.map +1 -1
  190. package/dist/sdk/types/workspace.js +1 -1
  191. package/dist/sdk/user.js +1 -1
  192. package/dist/sdk/util/format-detector.js +1 -1
  193. package/dist/sdk/util/formatters.js +1 -1
  194. package/dist/sdk/util/index.js +1 -1
  195. package/dist/sdk/util/paginate.js +1 -1
  196. package/dist/sdk/util/tree-formatter.js +1 -1
  197. package/dist/sdk/workflow/archive-validation.js +1 -1
  198. package/dist/sdk/workflow/clone-workflow.js +1 -1
  199. package/dist/sdk/workflow/index.js +1 -1
  200. package/dist/sdk/workflow/pull-workflow.js +1 -1
  201. package/dist/sdk/workflow/push-workflow.js +1 -1
  202. package/dist/sdk/workflow/tdx-config.js +1 -1
  203. package/dist/sdk/workflow/workflow-utils.js +1 -1
  204. package/dist/sdk/workspace/frontmatter.js +1 -1
  205. package/dist/sdk/workspace/git.d.ts +4 -1
  206. package/dist/sdk/workspace/git.d.ts.map +1 -1
  207. package/dist/sdk/workspace/git.js +1 -1
  208. package/dist/sdk/workspace/git.js.map +1 -1
  209. package/dist/sdk/workspace/index.d.ts +8 -15
  210. package/dist/sdk/workspace/index.d.ts.map +1 -1
  211. package/dist/sdk/workspace/index.js +1 -1
  212. package/dist/sdk/workspace/index.js.map +1 -1
  213. package/dist/sdk/workspace/templates.js +1 -1
  214. package/dist/sdk/workspace/weekly.d.ts +3 -13
  215. package/dist/sdk/workspace/weekly.d.ts.map +1 -1
  216. package/dist/sdk/workspace/weekly.js +1 -1
  217. package/dist/sdk/workspace/weekly.js.map +1 -1
  218. package/dist/sdk/workspace/wikilinks.d.ts +15 -0
  219. package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
  220. package/dist/sdk/workspace/wikilinks.js +1 -1
  221. package/dist/sdk/workspace/wikilinks.js.map +1 -1
  222. package/dist/test-utils/command-runner.js +1 -1
  223. package/dist/test-utils/factories.js +1 -1
  224. package/dist/test-utils/fixtures.js +1 -1
  225. package/dist/test-utils/http-mock.js +1 -1
  226. package/dist/test-utils/index.js +1 -1
  227. package/dist/utils/async.js +1 -1
  228. package/dist/utils/colors.js +1 -1
  229. package/dist/utils/diff.js +1 -1
  230. package/dist/utils/file-permissions.js +1 -1
  231. package/dist/utils/file-reader.js +1 -1
  232. package/dist/utils/github-releases.js +1 -1
  233. package/dist/utils/global-cache.js +1 -1
  234. package/dist/utils/json-loader.js +1 -1
  235. package/dist/utils/local-cache.js +1 -1
  236. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  237. package/dist/utils/logger/formatters/index.js +1 -1
  238. package/dist/utils/logger/handlers/console-handler.js +1 -1
  239. package/dist/utils/logger/handlers/file-handler.js +1 -1
  240. package/dist/utils/logger/handlers/index.js +1 -1
  241. package/dist/utils/logger/handlers/null-handler.js +1 -1
  242. package/dist/utils/logger/index.js +1 -1
  243. package/dist/utils/logger/logger.js +1 -1
  244. package/dist/utils/logger/types.js +1 -1
  245. package/dist/utils/option-validation.js +1 -1
  246. package/dist/utils/process.js +1 -1
  247. package/dist/utils/prompt.js +1 -1
  248. package/dist/utils/spinner.js +1 -1
  249. package/dist/utils/sse-parser.js +1 -1
  250. package/dist/utils/string-utils.js +1 -1
  251. package/dist/utils/table-ref-parser.js +1 -1
  252. package/dist/utils/tdx-logger.js +1 -1
  253. package/dist/utils/version-check.js +1 -1
  254. package/package.json +1 -1
  255. package/dist/commands/auth-login-command.d.ts +0 -29
  256. package/dist/commands/auth-login-command.d.ts.map +0 -1
  257. package/dist/commands/auth-login-command.js +0 -1
  258. package/dist/commands/auth-login-command.js.map +0 -1
@@ -1 +1 @@
1
- (function(_0x224fdb,_0x5c3419){const _0xe98964=a156_0xd34c,_0x136525=_0x224fdb();while(!![]){try{const _0xa6b7ed=-parseInt(_0xe98964(0xc6))/0x1*(parseInt(_0xe98964(0xd4))/0x2)+parseInt(_0xe98964(0xc3))/0x3+-parseInt(_0xe98964(0xeb))/0x4*(parseInt(_0xe98964(0xb3))/0x5)+parseInt(_0xe98964(0xbe))/0x6+parseInt(_0xe98964(0xda))/0x7*(parseInt(_0xe98964(0xb1))/0x8)+parseInt(_0xe98964(0xd3))/0x9+parseInt(_0xe98964(0xe1))/0xa*(parseInt(_0xe98964(0xb4))/0xb);if(_0xa6b7ed===_0x5c3419)break;else _0x136525['push'](_0x136525['shift']());}catch(_0x5b4a0d){_0x136525['push'](_0x136525['shift']());}}}(a156_0x3394,0xb42fb));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x50b5e5,_0x1fdf9d={},_0x4383e8={}){const _0xea0c8f=a156_0xd34c;if(_0x4383e8['skipSchema'])return runSemanticChecks(_0x50b5e5,_0x1fdf9d);const _0x4988d1=SegmentDefSchema[_0xea0c8f(0xec)](_0x50b5e5);if(_0x4988d1['success'])return runSemanticChecks(_0x4988d1[_0xea0c8f(0xe6)],_0x1fdf9d);return zodErrorsToValidationResult(_0x4988d1[_0xea0c8f(0xf3)],_0x1fdf9d);}function a156_0x3394(){const _0x4599c1=['EMPTY_CONDITIONS','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','custom','description','map','endsWith','.operator.value','5593932LOqkbQ','conditions','INVALID_ARRAY_MATCHING','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','Value','970884wOPlPz','.attribute','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','1jZdppU','MISSING_TIME_UNIT','push','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','Attribute\x20name\x20cannot\x20be\x20empty','attribute','arrayMatching','.source','aggregation','source','MISSING_OPERATOR_VALUE','.filter','type','2053233zZQMZU','270232rjWejH','validationCode','params','warning','.type','INVALID_OPERATOR_TYPE','91rBNmIa','And','SEGMENT_SCHEMA_ERROR','filter','MISSING_SEGMENT_REFERENCE','EMPTY_ATTRIBUTE','.operator.type','10EmNKLE','INVALID_RULE_TYPE','issues','name','invalid_value','data','Behavior','.conditions','BEHAVIOR_SOURCE_MISSING_FILTER','success','337396pSYPzE','safeParse','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','includes','path','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','message','error','NESTED_CONDITION_GROUP','symbol','document','Behavior\x20source\x20\x27','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','rule','level','.conditions[','\x27\x20with\x20attribute\x20\x27','length','107512YDkQrh','MISSING_NAME','70mBizXT','4347761wVCIxK','code'];a156_0x3394=function(){return _0x4599c1;};return a156_0x3394();}export function validateRuleDef(_0xdc66ac,_0x1ecf35,_0x422aff){const _0x1a06da=a156_0xd34c;if(!_0xdc66ac)return[];const _0x64bfcc=RuleDefSchema[_0x1a06da(0xec)](_0xdc66ac);if(_0x64bfcc[_0x1a06da(0xea)])return checkRule(_0x64bfcc[_0x1a06da(0xe6)],_0x1ecf35,_0x422aff);const _0x58d2e6=flattenZodIssues(_0x64bfcc['error']['issues']);return _0x58d2e6[_0x1a06da(0xbb)](_0x8762a7=>{const _0x4e7607=_0x1a06da,_0x5c27d8=formatZodPath(_0x8762a7[_0x4e7607(0xf0)]),_0x34caf9=_0x5c27d8?_0x1ecf35+'.'+_0x5c27d8:_0x1ecf35,_0x1fe89e=mapZodIssueToCode(_0x8762a7,_0x5c27d8),_0x143152=getLocationFromPath(_0x422aff[_0x4e7607(0xf6)],_0x422aff[_0x4e7607(0xcf)],pathToArray(_0x34caf9));return{'level':_0x4e7607(0xf3),'path':_0x34caf9,'code':_0x1fe89e,'message':_0x8762a7[_0x4e7607(0xf2)],..._0x143152&&{'location':_0x143152}};});}function zodErrorsToValidationResult(_0x237833,_0x137d5a){const _0x460b7f=a156_0xd34c,_0x116bc8=flattenZodIssues(_0x237833[_0x460b7f(0xe3)]),_0x15dea3=_0x116bc8[_0x460b7f(0xbb)](_0x2bfd9a=>{const _0x55c883=_0x460b7f,_0x531b9f=formatZodPath(_0x2bfd9a[_0x55c883(0xf0)]),_0x3e0529=mapZodIssueToCode(_0x2bfd9a,_0x531b9f),_0x1252a4=getLocationFromPath(_0x137d5a[_0x55c883(0xf6)],_0x137d5a[_0x55c883(0xcf)],_0x2bfd9a[_0x55c883(0xf0)]['map'](_0x299794=>typeof _0x299794===_0x55c883(0xf5)?String(_0x299794):_0x299794));return{'level':_0x55c883(0xf3),'path':_0x531b9f,'code':_0x3e0529,'message':_0x2bfd9a[_0x55c883(0xf2)],..._0x1252a4&&{'location':_0x1252a4}};});return{'valid':![],'errors':_0x15dea3,'warnings':[]};}function mapZodIssueToCode(_0x395d99,_0x41d022){const _0xdbd5aa=a156_0xd34c,_0x2ff60f=_0x395d99['code']===_0xdbd5aa(0xb9)?_0x395d99[_0xdbd5aa(0xd6)]:undefined;if(_0x41d022===_0xdbd5aa(0xe4))return _0xdbd5aa(0xb2);if(_0x41d022==='rule.type'||_0x41d022[_0xdbd5aa(0xbc)](_0xdbd5aa(0xd8))){if(_0x395d99[_0xdbd5aa(0xb5)]===_0xdbd5aa(0xe5)){if(_0x41d022==='rule.type'||_0x41d022['match'](/\.conditions\[\d+\]\.type$/))return _0xdbd5aa(0xe2);}}if(_0x41d022[_0xdbd5aa(0xbc)](_0xdbd5aa(0xe0)))return _0xdbd5aa(0xd9);if(_0x41d022[_0xdbd5aa(0xbc)](_0xdbd5aa(0xbd)))return _0xdbd5aa(0xd0);if(_0x2ff60f?.[_0xdbd5aa(0xd5)]==='MISSING_BETWEEN_BOUNDS')return'MISSING_BETWEEN_BOUNDS';if(_0x2ff60f?.[_0xdbd5aa(0xd5)]==='MISSING_TIME_UNIT')return _0xdbd5aa(0xc7);if(_0x41d022[_0xdbd5aa(0xbc)]('.conditions')||_0x41d022==='conditions')return'MISSING_CONDITIONS';if(_0x41d022[_0xdbd5aa(0xef)](_0xdbd5aa(0xcc)))return _0xdbd5aa(0xc0);if(_0x41d022['endsWith']('.segment'))return _0xdbd5aa(0xde);return _0xdbd5aa(0xdc);}function runSemanticChecks(_0x1e5e9b,_0x45b253){const _0xc75127=a156_0xd34c,_0x53128a=[];_0x1e5e9b[_0xc75127(0xf9)]&&_0x53128a['push'](...checkRule(_0x1e5e9b[_0xc75127(0xf9)],_0xc75127(0xf9),_0x45b253));const _0xbb3041=_0x53128a[_0xc75127(0xdd)](_0xb5371f=>_0xb5371f[_0xc75127(0xfa)]===_0xc75127(0xf3)),_0x58f0be=_0x53128a[_0xc75127(0xdd)](_0x57a529=>_0x57a529[_0xc75127(0xfa)]==='warning');return{'valid':_0xbb3041[_0xc75127(0xb0)]===0x0,'errors':_0xbb3041,'warnings':_0x58f0be};}function checkRule(_0x2d51c4,_0x138c19,_0x35757f){const _0x3ff8fd=a156_0xd34c,_0x1cb9db=[];if(_0x2d51c4['conditions']['length']===0x0)return _0x1cb9db['push']({'level':_0x3ff8fd(0xf3),'path':_0x138c19+_0x3ff8fd(0xe8),'code':_0x3ff8fd(0xb6),'message':_0x3ff8fd(0xee),'location':getLocationFromPath(_0x35757f[_0x3ff8fd(0xf6)],_0x35757f[_0x3ff8fd(0xcf)],pathToArray(_0x138c19+_0x3ff8fd(0xe8)))}),_0x1cb9db;return _0x1cb9db[_0x3ff8fd(0xc8)](...checkConditions(_0x2d51c4[_0x3ff8fd(0xbf)],_0x138c19,_0x35757f)),_0x1cb9db;}function checkConditions(_0x3ecba7,_0x1a971c,_0x43e852){const _0x26b3ac=a156_0xd34c,_0x2aa999=[];for(let _0x4b7bd3=0x0;_0x4b7bd3<_0x3ecba7['length'];_0x4b7bd3++){const _0x42a851=_0x3ecba7[_0x4b7bd3],_0x105a19=_0x1a971c+_0x26b3ac(0xae)+_0x4b7bd3+']';_0x2aa999['push'](...checkCondition(_0x42a851,_0x105a19,_0x43e852));}return _0x2aa999;}function a156_0xd34c(_0x17f14d,_0x3894b9){_0x17f14d=_0x17f14d-0xae;const _0x339420=a156_0x3394();let _0xd34c17=_0x339420[_0x17f14d];return _0xd34c17;}function checkCondition(_0x228987,_0x3e33c2,_0x3368dc){const _0x562f71=a156_0xd34c,_0x284fb3=[];if(_0x228987[_0x562f71(0xd2)]===_0x562f71(0xdb)||_0x228987['type']==='Or'){if(_0x228987[_0x562f71(0xbf)]['length']===0x0)_0x284fb3[_0x562f71(0xc8)]({'level':_0x562f71(0xf3),'path':_0x3e33c2+_0x562f71(0xe8),'code':_0x562f71(0xb6),'message':_0x228987[_0x562f71(0xd2)]+_0x562f71(0xf1),'location':getLocationFromPath(_0x3368dc['document'],_0x3368dc['source'],pathToArray(_0x3e33c2+_0x562f71(0xe8)))});else{const _0x4b3e2d=_0x228987[_0x562f71(0xba)]!==undefined;!_0x4b3e2d&&_0x284fb3[_0x562f71(0xc8)]({'level':_0x562f71(0xd7),'path':_0x3e33c2,'code':_0x562f71(0xf4),'message':_0x228987[_0x562f71(0xd2)]+_0x562f71(0xed)+_0x562f71(0xb7)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x3368dc[_0x562f71(0xf6)],_0x3368dc['source'],pathToArray(_0x3e33c2))}),_0x284fb3[_0x562f71(0xc8)](...checkConditions(_0x228987[_0x562f71(0xbf)],_0x3e33c2,_0x3368dc));}return _0x284fb3;}if(_0x228987[_0x562f71(0xd2)]===_0x562f71(0xc2)||_0x228987[_0x562f71(0xd2)]===_0x562f71(0xe7)){const _0x2a86e1=_0x228987,_0x6a9238=_0x2a86e1[_0x562f71(0xcf)],_0xa1e0fd=_0x2a86e1[_0x562f71(0xce)],_0x2d602c=_0x6a9238||_0xa1e0fd;(!_0x2a86e1[_0x562f71(0xcb)]||_0x2a86e1[_0x562f71(0xcb)]==='')&&(!_0x2d602c&&_0x284fb3['push']({'level':_0x562f71(0xf3),'path':_0x3e33c2+'.attribute','code':_0x562f71(0xdf),'message':_0x562f71(0xca),'location':getLocationFromPath(_0x3368dc[_0x562f71(0xf6)],_0x3368dc['source'],pathToArray(_0x3e33c2+_0x562f71(0xc4)))}));_0x2a86e1[_0x562f71(0xdd)]&&_0x284fb3[_0x562f71(0xc8)](...checkRule(_0x2a86e1[_0x562f71(0xdd)],_0x3e33c2+_0x562f71(0xd1),_0x3368dc));if(_0x2a86e1['source']){const _0x3389a1=_0x2a86e1[_0x562f71(0xcb)]&&_0x2a86e1[_0x562f71(0xcb)]!=='';_0x3389a1&&!_0x2a86e1[_0x562f71(0xdd)]&&_0x284fb3[_0x562f71(0xc8)]({'level':_0x562f71(0xf3),'path':_0x3e33c2+_0x562f71(0xcd),'code':_0x562f71(0xe9),'message':_0x562f71(0xf7)+_0x2a86e1[_0x562f71(0xcf)]+_0x562f71(0xaf)+_0x2a86e1[_0x562f71(0xcb)]+'\x27\x20'+_0x562f71(0xc1)+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+_0x562f71(0xc5),'location':getLocationFromPath(_0x3368dc['document'],_0x3368dc['source'],pathToArray(_0x3e33c2+_0x562f71(0xcd)))}),_0x3389a1&&_0x2a86e1[_0x562f71(0xdd)]&&_0x284fb3['push']({'level':_0x562f71(0xd7),'path':_0x3e33c2+_0x562f71(0xc4),'code':_0x562f71(0xb8),'message':'Attribute\x20\x27'+_0x2a86e1['attribute']+_0x562f71(0xf8)+_0x562f71(0xc9),'location':getLocationFromPath(_0x3368dc[_0x562f71(0xf6)],_0x3368dc[_0x562f71(0xcf)],pathToArray(_0x3e33c2+_0x562f71(0xc4)))});}}return _0x284fb3;}
1
+ function a155_0x1152(){const _0x4a550f=['Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','match','push','NESTED_CONDITION_GROUP','EMPTY_ATTRIBUTE','1874980nTdfof','arrayMatching','3620634JyMeTc','aggregation','error','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','40rhXqbG','rule.type','BEHAVIOR_SOURCE_MISSING_FILTER','validationCode','invalid_value','safeParse','EMPTY_CONDITIONS','.conditions','data','3937724AkWKIS','8770350WzedTd','description','path','.operator.type','MISSING_SEGMENT_REFERENCE','endsWith','name','1327401cezaNR','\x27\x20with\x20attribute\x20\x27','issues','.source','skipSchema','Attribute\x20name\x20cannot\x20be\x20empty','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','SEGMENT_SCHEMA_ERROR','attribute','MISSING_NAME','filter','document','type','.attribute','543890eGabBg','rule','6cNuUnr','INVALID_RULE_TYPE','.operator.value','map','And','.type','length','Value','code','.filter','success','MISSING_OPERATOR_VALUE','source','MISSING_CONDITIONS','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','warning','7OCxbZX','.conditions[','26474IIWozX','Attribute\x20\x27','MISSING_BETWEEN_BOUNDS','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','.segment','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','MISSING_TIME_UNIT','message','level','Behavior','22gDuXfd','conditions'];a155_0x1152=function(){return _0x4a550f;};return a155_0x1152();}(function(_0x2acdfb,_0x48d654){const _0x265c11=a155_0x174d,_0x3f2d=_0x2acdfb();while(!![]){try{const _0x5709a6=parseInt(_0x265c11(0x1af))/0x1+parseInt(_0x265c11(0x19b))/0x2*(-parseInt(_0x265c11(0x19d))/0x3)+parseInt(_0x265c11(0x1cf))/0x4+-parseInt(_0x265c11(0x1c0))/0x5+-parseInt(_0x265c11(0x1c2))/0x6*(parseInt(_0x265c11(0x1ad))/0x7)+parseInt(_0x265c11(0x1c6))/0x8*(-parseInt(_0x265c11(0x1d7))/0x9)+parseInt(_0x265c11(0x1d0))/0xa*(parseInt(_0x265c11(0x1b9))/0xb);if(_0x5709a6===_0x48d654)break;else _0x3f2d['push'](_0x3f2d['shift']());}catch(_0x486e67){_0x3f2d['push'](_0x3f2d['shift']());}}}(a155_0x1152,0x7b575));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a155_0x174d(_0x310697,_0x976116){_0x310697=_0x310697-0x19b;const _0x115218=a155_0x1152();let _0x174d3f=_0x115218[_0x310697];return _0x174d3f;}export function validateSegmentDef(_0x110824,_0x3c17b1={},_0x3e6688={}){const _0xcd8293=a155_0x174d;if(_0x3e6688[_0xcd8293(0x1db)])return runSemanticChecks(_0x110824,_0x3c17b1);const _0x3e9c2d=SegmentDefSchema[_0xcd8293(0x1cb)](_0x110824);if(_0x3e9c2d['success'])return runSemanticChecks(_0x3e9c2d['data'],_0x3c17b1);return zodErrorsToValidationResult(_0x3e9c2d[_0xcd8293(0x1c4)],_0x3c17b1);}export function validateRuleDef(_0x40384d,_0x3208c3,_0x2d9537){const _0x28847c=a155_0x174d;if(!_0x40384d)return[];const _0x2e2b0e=RuleDefSchema[_0x28847c(0x1cb)](_0x40384d);if(_0x2e2b0e[_0x28847c(0x1a7)])return checkRule(_0x2e2b0e[_0x28847c(0x1ce)],_0x3208c3,_0x2d9537);const _0x2411da=flattenZodIssues(_0x2e2b0e[_0x28847c(0x1c4)][_0x28847c(0x1d9)]);return _0x2411da['map'](_0x438c82=>{const _0x3aa41e=_0x28847c,_0x3a358a=formatZodPath(_0x438c82[_0x3aa41e(0x1d2)]),_0xb83a16=_0x3a358a?_0x3208c3+'.'+_0x3a358a:_0x3208c3,_0x2df756=mapZodIssueToCode(_0x438c82,_0x3a358a),_0x2ed739=getLocationFromPath(_0x2d9537[_0x3aa41e(0x1e2)],_0x2d9537['source'],pathToArray(_0xb83a16));return{'level':'error','path':_0xb83a16,'code':_0x2df756,'message':_0x438c82[_0x3aa41e(0x1b6)],..._0x2ed739&&{'location':_0x2ed739}};});}function zodErrorsToValidationResult(_0x1357f2,_0x360c3b){const _0x12d075=a155_0x174d,_0x5d479d=flattenZodIssues(_0x1357f2['issues']),_0x172c3d=_0x5d479d[_0x12d075(0x1a0)](_0x1b8e8a=>{const _0x2e5898=_0x12d075,_0x2b96cf=formatZodPath(_0x1b8e8a['path']),_0x584c77=mapZodIssueToCode(_0x1b8e8a,_0x2b96cf),_0x2e2f32=getLocationFromPath(_0x360c3b[_0x2e5898(0x1e2)],_0x360c3b[_0x2e5898(0x1a9)],_0x1b8e8a[_0x2e5898(0x1d2)][_0x2e5898(0x1a0)](_0x3f7e81=>typeof _0x3f7e81==='symbol'?String(_0x3f7e81):_0x3f7e81));return{'level':_0x2e5898(0x1c4),'path':_0x2b96cf,'code':_0x584c77,'message':_0x1b8e8a[_0x2e5898(0x1b6)],..._0x2e2f32&&{'location':_0x2e2f32}};});return{'valid':![],'errors':_0x172c3d,'warnings':[]};}function mapZodIssueToCode(_0x38fdc9,_0x2d694b){const _0x338611=a155_0x174d,_0x20b061=_0x38fdc9[_0x338611(0x1a5)]==='custom'?_0x38fdc9['params']:undefined;if(_0x2d694b===_0x338611(0x1d6))return _0x338611(0x1e0);if(_0x2d694b==='rule.type'||_0x2d694b['endsWith'](_0x338611(0x1a2))){if(_0x38fdc9[_0x338611(0x1a5)]===_0x338611(0x1ca)){if(_0x2d694b===_0x338611(0x1c7)||_0x2d694b[_0x338611(0x1bc)](/\.conditions\[\d+\]\.type$/))return _0x338611(0x19e);}}if(_0x2d694b[_0x338611(0x1d5)](_0x338611(0x1d3)))return'INVALID_OPERATOR_TYPE';if(_0x2d694b['endsWith'](_0x338611(0x19f)))return _0x338611(0x1a8);if(_0x20b061?.[_0x338611(0x1c9)]===_0x338611(0x1b1))return _0x338611(0x1b1);if(_0x20b061?.[_0x338611(0x1c9)]===_0x338611(0x1b5))return _0x338611(0x1b5);if(_0x2d694b['endsWith'](_0x338611(0x1cd))||_0x2d694b===_0x338611(0x1ba))return _0x338611(0x1aa);if(_0x2d694b['includes'](_0x338611(0x1c1)))return'INVALID_ARRAY_MATCHING';if(_0x2d694b[_0x338611(0x1d5)](_0x338611(0x1b3)))return _0x338611(0x1d4);return _0x338611(0x1de);}function runSemanticChecks(_0xef8f68,_0x14d08d){const _0x44c3da=a155_0x174d,_0x4819d5=[];_0xef8f68[_0x44c3da(0x19c)]&&_0x4819d5[_0x44c3da(0x1bd)](...checkRule(_0xef8f68[_0x44c3da(0x19c)],_0x44c3da(0x19c),_0x14d08d));const _0x3798e0=_0x4819d5[_0x44c3da(0x1e1)](_0x313f52=>_0x313f52[_0x44c3da(0x1b7)]===_0x44c3da(0x1c4)),_0x1fd468=_0x4819d5['filter'](_0x14650c=>_0x14650c[_0x44c3da(0x1b7)]==='warning');return{'valid':_0x3798e0[_0x44c3da(0x1a3)]===0x0,'errors':_0x3798e0,'warnings':_0x1fd468};}function checkRule(_0x30aa89,_0x18f16e,_0x2fd2e4){const _0x5cb816=a155_0x174d,_0x81362d=[];if(_0x30aa89[_0x5cb816(0x1ba)]['length']===0x0)return _0x81362d[_0x5cb816(0x1bd)]({'level':_0x5cb816(0x1c4),'path':_0x18f16e+_0x5cb816(0x1cd),'code':'EMPTY_CONDITIONS','message':_0x5cb816(0x1bb),'location':getLocationFromPath(_0x2fd2e4[_0x5cb816(0x1e2)],_0x2fd2e4[_0x5cb816(0x1a9)],pathToArray(_0x18f16e+'.conditions'))}),_0x81362d;return _0x81362d['push'](...checkConditions(_0x30aa89[_0x5cb816(0x1ba)],_0x18f16e,_0x2fd2e4)),_0x81362d;}function checkConditions(_0x18de8c,_0x51a40f,_0x2af22c){const _0x564a07=a155_0x174d,_0x4ff02d=[];for(let _0x4a68a3=0x0;_0x4a68a3<_0x18de8c['length'];_0x4a68a3++){const _0x33b85c=_0x18de8c[_0x4a68a3],_0x19dd0d=_0x51a40f+_0x564a07(0x1ae)+_0x4a68a3+']';_0x4ff02d[_0x564a07(0x1bd)](...checkCondition(_0x33b85c,_0x19dd0d,_0x2af22c));}return _0x4ff02d;}function checkCondition(_0x5691ba,_0x2f2b51,_0x4eaeae){const _0x4b2e91=a155_0x174d,_0x5477ea=[];if(_0x5691ba[_0x4b2e91(0x1e3)]===_0x4b2e91(0x1a1)||_0x5691ba[_0x4b2e91(0x1e3)]==='Or'){if(_0x5691ba[_0x4b2e91(0x1ba)][_0x4b2e91(0x1a3)]===0x0)_0x5477ea[_0x4b2e91(0x1bd)]({'level':_0x4b2e91(0x1c4),'path':_0x2f2b51+_0x4b2e91(0x1cd),'code':_0x4b2e91(0x1cc),'message':_0x5691ba[_0x4b2e91(0x1e3)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x4eaeae[_0x4b2e91(0x1e2)],_0x4eaeae['source'],pathToArray(_0x2f2b51+_0x4b2e91(0x1cd)))});else{const _0x2ef47b=_0x5691ba[_0x4b2e91(0x1d1)]!==undefined;!_0x2ef47b&&_0x5477ea['push']({'level':'warning','path':_0x2f2b51,'code':_0x4b2e91(0x1be),'message':_0x5691ba[_0x4b2e91(0x1e3)]+'\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20'+'condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20'+_0x4b2e91(0x1c5),'location':getLocationFromPath(_0x4eaeae[_0x4b2e91(0x1e2)],_0x4eaeae[_0x4b2e91(0x1a9)],pathToArray(_0x2f2b51))}),_0x5477ea[_0x4b2e91(0x1bd)](...checkConditions(_0x5691ba[_0x4b2e91(0x1ba)],_0x2f2b51,_0x4eaeae));}return _0x5477ea;}if(_0x5691ba['type']===_0x4b2e91(0x1a4)||_0x5691ba[_0x4b2e91(0x1e3)]===_0x4b2e91(0x1b8)){const _0x1948b0=_0x5691ba,_0x50bc5b=_0x1948b0[_0x4b2e91(0x1a9)],_0x270b31=_0x1948b0[_0x4b2e91(0x1c3)],_0x1f75ba=_0x50bc5b||_0x270b31;(!_0x1948b0[_0x4b2e91(0x1df)]||_0x1948b0[_0x4b2e91(0x1df)]==='')&&(!_0x1f75ba&&_0x5477ea[_0x4b2e91(0x1bd)]({'level':_0x4b2e91(0x1c4),'path':_0x2f2b51+_0x4b2e91(0x1e4),'code':_0x4b2e91(0x1bf),'message':_0x4b2e91(0x1dc),'location':getLocationFromPath(_0x4eaeae[_0x4b2e91(0x1e2)],_0x4eaeae['source'],pathToArray(_0x2f2b51+'.attribute'))}));_0x1948b0[_0x4b2e91(0x1e1)]&&_0x5477ea[_0x4b2e91(0x1bd)](...checkRule(_0x1948b0['filter'],_0x2f2b51+_0x4b2e91(0x1a6),_0x4eaeae));if(_0x1948b0[_0x4b2e91(0x1a9)]){const _0x3868aa=_0x1948b0[_0x4b2e91(0x1df)]&&_0x1948b0[_0x4b2e91(0x1df)]!=='';_0x3868aa&&!_0x1948b0[_0x4b2e91(0x1e1)]&&_0x5477ea[_0x4b2e91(0x1bd)]({'level':_0x4b2e91(0x1c4),'path':_0x2f2b51+_0x4b2e91(0x1da),'code':_0x4b2e91(0x1c8),'message':'Behavior\x20source\x20\x27'+_0x1948b0[_0x4b2e91(0x1a9)]+_0x4b2e91(0x1d8)+_0x1948b0['attribute']+'\x27\x20'+_0x4b2e91(0x1dd)+_0x4b2e91(0x1ab)+_0x4b2e91(0x1b4),'location':getLocationFromPath(_0x4eaeae['document'],_0x4eaeae[_0x4b2e91(0x1a9)],pathToArray(_0x2f2b51+'.source'))}),_0x3868aa&&_0x1948b0[_0x4b2e91(0x1e1)]&&_0x5477ea[_0x4b2e91(0x1bd)]({'level':_0x4b2e91(0x1ac),'path':_0x2f2b51+_0x4b2e91(0x1e4),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0x4b2e91(0x1b0)+_0x1948b0[_0x4b2e91(0x1df)]+_0x4b2e91(0x1b2)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x4eaeae[_0x4b2e91(0x1e2)],_0x4eaeae[_0x4b2e91(0x1a9)],pathToArray(_0x2f2b51+'.attribute'))});}}return _0x5477ea;}
@@ -1 +1 @@
1
- (function(_0x34b0ef,_0x32d114){const _0x29b809=a157_0x43d1,_0x127779=_0x34b0ef();while(!![]){try{const _0x78a11b=parseInt(_0x29b809(0x197))/0x1*(-parseInt(_0x29b809(0x187))/0x2)+-parseInt(_0x29b809(0x18a))/0x3*(parseInt(_0x29b809(0x1ad))/0x4)+parseInt(_0x29b809(0x193))/0x5+parseInt(_0x29b809(0x1a1))/0x6*(parseInt(_0x29b809(0x184))/0x7)+-parseInt(_0x29b809(0x1a4))/0x8+parseInt(_0x29b809(0x19e))/0x9*(-parseInt(_0x29b809(0x17e))/0xa)+parseInt(_0x29b809(0x1a9))/0xb;if(_0x78a11b===_0x32d114)break;else _0x127779['push'](_0x127779['shift']());}catch(_0x16e0ba){_0x127779['push'](_0x127779['shift']());}}}(a157_0x3f66,0xa6906));import a157_0x2d3e3f 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(_0x22c4a9){const _0x4473d2=a157_0x43d1;return _0x22c4a9[_0x4473d2(0x1b1)]!==_0x4473d2(0x1ae);}export function isScopedResolution(_0x58298a){const _0x173f09=a157_0x43d1;return _0x58298a[_0x173f09(0x1b1)]===_0x173f09(0x1ac)||_0x58298a['type']==='file'||_0x58298a[_0x173f09(0x1b1)]===_0x173f09(0x196);}function a157_0x3f66(){const _0x5f3949=['resourceType','context','635wSDcWc','readFile','match','Not\x20a\x20YAML\x20file:\x20','join','basename','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','5499rkZlDP','scopedFolderPath','file','6gmKGgB','resolve','no_config','9242776trCAHn','dirname','Parent\x20segment\x20not\x20specified','file_not_found','cwd','37121260yBitEF','segmentName','invalid_yaml','directory','4GwIhwX','error','stat','File\x20not\x20found:\x20','type','exists','isScoped','isFile','no_parent','includes','6470HSZiZx','parent_name','trim','message','File\x20not\x20found','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','415807qdUPaX','parentSegment','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','4108TjgnTf','string','No\x20tdx.json\x20found','2225091mUvrqf','tdx.json','startsWith','root','folderPath','parse','segment','parent_segment','configDir','4224180NLMeca','isDirectory'];a157_0x3f66=function(){return _0x5f3949;};return a157_0x3f66();}export function getScopedDetails(_0xe6fd75){const _0x5d2c91=a157_0x43d1;if(isScopedResolution(_0xe6fd75))return{'isScoped':_0xe6fd75[_0x5d2c91(0x17a)],'scopedFolderPath':_0xe6fd75['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x27f07d,_0x292e74){const _0x102c98=a157_0x43d1;let _0x366515=a157_0x2d3e3f['resolve'](_0x27f07d);const _0x44794b=a157_0x2d3e3f[_0x102c98(0x18f)](_0x366515)[_0x102c98(0x18d)];while(_0x366515!==_0x44794b){const _0x2c0622=a157_0x2d3e3f[_0x102c98(0x19b)](_0x366515,_0x102c98(0x18b));if(await _0x292e74[_0x102c98(0x1b2)](_0x2c0622))try{const _0x310b01=await _0x292e74['readFile'](_0x2c0622),_0x2b2970=JSON[_0x102c98(0x18f)](_0x310b01);if(_0x2b2970['parent_segment']&&typeof _0x2b2970[_0x102c98(0x191)]===_0x102c98(0x188))return{'configPath':_0x2c0622,'configDir':_0x366515,'parentSegment':_0x2b2970[_0x102c98(0x191)]};}catch{}_0x366515=a157_0x2d3e3f['dirname'](_0x366515);}return null;}function calculateScopedPath(_0x22c72a,_0x23db62){const _0x3aa227=a157_0x43d1,_0x40dea9=a157_0x2d3e3f['relative'](_0x23db62,_0x22c72a),_0x4a4b95=_0x40dea9!==''&&_0x40dea9!=='.'&&!_0x40dea9[_0x3aa227(0x18c)]('..');return{'isScoped':_0x4a4b95,'scopedFolderPath':_0x4a4b95?_0x40dea9['replace'](/\\/g,'/'):''};}function a157_0x43d1(_0x13e259,_0x3505d6){_0x13e259=_0x13e259-0x17a;const _0x3f660f=a157_0x3f66();let _0x43d15c=_0x3f660f[_0x13e259];return _0x43d15c;}export async function resolveTarget(_0x1627ef){const _0x3175ce=a157_0x43d1,{arg:_0x32fc5f,contextParent:_0x72921a,cwd:cwd=process[_0x3175ce(0x1a8)](),fs:fs=nodeFileSystem}=_0x1627ef;if(_0x32fc5f&&isYamlFilePath(_0x32fc5f))try{const _0x4617a3=await resolveYamlFilePath(_0x32fc5f,fs),_0x2d4dc2=a157_0x2d3e3f[_0x3175ce(0x1a2)](_0x32fc5f),_0x4943d9=a157_0x2d3e3f['dirname'](_0x2d4dc2),_0x4cf78f=await findTdxConfigAsync(_0x4943d9,fs);if(!_0x4cf78f){if(_0x72921a){const _0x319e7c=a157_0x2d3e3f['dirname'](_0x2d4dc2);return{'type':_0x3175ce(0x1a0),'parentName':_0x72921a,'targetDir':_0x319e7c,'configRoot':_0x319e7c,'filePath':_0x2d4dc2,'resourceName':_0x4617a3[_0x3175ce(0x1aa)],'folderPath':_0x4617a3[_0x3175ce(0x18e)],'resourceType':_0x4617a3[_0x3175ce(0x195)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x32fc5f,'arg':_0x32fc5f,'helpText':_0x3175ce(0x183)};}const _0x5e456b=calculateScopedPath(_0x4943d9,_0x4cf78f[_0x3175ce(0x192)]);return{'type':_0x3175ce(0x1a0),'parentName':_0x4cf78f[_0x3175ce(0x185)],'targetDir':_0x4cf78f['configDir'],'configRoot':_0x4cf78f[_0x3175ce(0x192)],'filePath':_0x2d4dc2,'resourceName':_0x4617a3[_0x3175ce(0x1aa)],'folderPath':_0x4617a3['folderPath'],'resourceType':_0x4617a3[_0x3175ce(0x195)],'isScoped':_0x5e456b[_0x3175ce(0x17a)],'scopedFolderPath':_0x5e456b[_0x3175ce(0x19f)]};}catch(_0x352b66){const _0x4e3d91=_0x352b66 instanceof Error?_0x352b66[_0x3175ce(0x181)]:String(_0x352b66);if(_0x4e3d91[_0x3175ce(0x17d)](_0x3175ce(0x182)))return{'type':'error','errorCode':_0x3175ce(0x1a7),'message':_0x3175ce(0x1b0)+_0x32fc5f,'arg':_0x32fc5f};if(_0x4e3d91[_0x3175ce(0x17d)](_0x3175ce(0x189))){if(_0x72921a){const _0x5ad30c=a157_0x2d3e3f[_0x3175ce(0x1a2)](_0x32fc5f);if(await fs[_0x3175ce(0x1b2)](_0x5ad30c)){const _0x39b555=a157_0x2d3e3f[_0x3175ce(0x1a5)](_0x5ad30c),_0x36bfc4=await fs[_0x3175ce(0x198)](_0x5ad30c),_0x338ccd=_0x36bfc4[_0x3175ce(0x199)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3a3c8a=_0x36bfc4[_0x3175ce(0x199)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x2ddfaa=_0x338ccd?_0x338ccd[0x1]['trim']():a157_0x2d3e3f[_0x3175ce(0x19c)](_0x32fc5f,a157_0x2d3e3f['extname'](_0x32fc5f)),_0x120f8b=_0x3a3c8a&&_0x3a3c8a[0x1][_0x3175ce(0x180)]()==='journey'?'journey':_0x3175ce(0x190);return{'type':_0x3175ce(0x1a0),'parentName':_0x72921a,'targetDir':_0x39b555,'configRoot':_0x39b555,'filePath':_0x5ad30c,'resourceName':_0x2ddfaa,'folderPath':'','resourceType':_0x120f8b,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x3175ce(0x1ae),'errorCode':_0x3175ce(0x1a3),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x32fc5f,'arg':_0x32fc5f,'helpText':_0x3175ce(0x183)};}return{'type':_0x3175ce(0x1ae),'errorCode':_0x3175ce(0x1ab),'message':_0x4e3d91,'arg':_0x32fc5f};}if(_0x32fc5f){const _0x5cc17f=a157_0x2d3e3f['resolve'](cwd,_0x32fc5f);let _0x7efc93=null;try{_0x7efc93=await fs[_0x3175ce(0x1af)](_0x5cc17f);}catch{}if(_0x7efc93?.[_0x3175ce(0x194)]()){const _0x3c6f23=await findTdxConfigAsync(_0x5cc17f,fs);if(_0x3c6f23){const _0x446968=calculateScopedPath(_0x5cc17f,_0x3c6f23[_0x3175ce(0x192)]);return{'type':'directory','parentName':_0x3c6f23['parentSegment'],'targetDir':_0x5cc17f,'configRoot':_0x3c6f23['configDir'],'isScoped':_0x446968[_0x3175ce(0x17a)],'scopedFolderPath':_0x446968['scopedFolderPath']};}if(_0x72921a)return{'type':'directory','parentName':_0x72921a,'targetDir':_0x5cc17f,'configRoot':_0x5cc17f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x3175ce(0x1ae),'errorCode':_0x3175ce(0x1a3),'message':_0x3175ce(0x186)+_0x32fc5f,'arg':_0x32fc5f,'helpText':_0x3175ce(0x183)};}if(_0x7efc93?.[_0x3175ce(0x17b)]())return{'type':'error','errorCode':_0x3175ce(0x1ab),'message':_0x3175ce(0x19a)+_0x32fc5f,'arg':_0x32fc5f,'helpText':_0x3175ce(0x19d)};const _0xd95aa=sanitizeFileName(_0x32fc5f),_0x212851=getSegmentRootDir(_0xd95aa,cwd);return{'type':_0x3175ce(0x17f),'parentName':_0x32fc5f,'targetDir':_0x212851,'configRoot':_0x212851};}const _0x475ddd=await findTdxConfigAsync(cwd,fs);if(_0x475ddd){const _0x38c045=calculateScopedPath(cwd,_0x475ddd[_0x3175ce(0x192)]);return{'type':_0x3175ce(0x196),'parentName':_0x475ddd['parentSegment'],'targetDir':cwd,'configRoot':_0x475ddd['configDir'],'isScoped':_0x38c045[_0x3175ce(0x17a)],'scopedFolderPath':_0x38c045[_0x3175ce(0x19f)]};}if(_0x72921a){const _0x30e00f=sanitizeFileName(_0x72921a),_0x207859=getSegmentRootDir(_0x30e00f,cwd);return{'type':_0x3175ce(0x196),'parentName':_0x72921a,'targetDir':_0x207859,'configRoot':_0x207859,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x3175ce(0x17c),'message':_0x3175ce(0x1a6),'helpText':'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'};}
1
+ (function(_0x3cf4a0,_0x4e0954){const _0x2c9d02=a156_0x13a6,_0x35054d=_0x3cf4a0();while(!![]){try{const _0x195047=parseInt(_0x2c9d02(0x117))/0x1+parseInt(_0x2c9d02(0x10c))/0x2+-parseInt(_0x2c9d02(0xff))/0x3+-parseInt(_0x2c9d02(0x10f))/0x4*(parseInt(_0x2c9d02(0x126))/0x5)+parseInt(_0x2c9d02(0x107))/0x6*(parseInt(_0x2c9d02(0xfc))/0x7)+parseInt(_0x2c9d02(0x115))/0x8*(parseInt(_0x2c9d02(0x12c))/0x9)+parseInt(_0x2c9d02(0x105))/0xa*(parseInt(_0x2c9d02(0xfa))/0xb);if(_0x195047===_0x4e0954)break;else _0x35054d['push'](_0x35054d['shift']());}catch(_0x4af913){_0x35054d['push'](_0x35054d['shift']());}}}(a156_0x53dd,0xf2c09));import a156_0x418a90 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(_0x3b6e0b){const _0x53f08b=a156_0x13a6;return _0x3b6e0b[_0x53f08b(0x11c)]!==_0x53f08b(0x10b);}function a156_0x53dd(){const _0x3a27a1=['parent_segment','5374632ExPvUn','basename','isScoped','file','root','Not\x20a\x20YAML\x20file:\x20','19694110jGFrDw','No\x20tdx.json\x20found\x20for\x20file:\x20','1394196hOfnxp','invalid_yaml','segment','startsWith','error','1368768bOzaSb','join','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','7328936wBUtBO','scopedFolderPath','message','parentSegment','configDir','segmentName','89328BxlmFt','folderPath','126146HVjevV','includes','isFile','No\x20tdx.json\x20found','match','type','directory','parse','context','trim','File\x20not\x20found:\x20','no_config','string','readFile','exists','5wXdtGk','resourceType','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','cwd','Parent\x20segment\x20not\x20specified','journey','1107ObajvQ','dirname','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','stat','relative','resolve','11HMoUeM','parent_name','14ztGpAW','isDirectory'];a156_0x53dd=function(){return _0x3a27a1;};return a156_0x53dd();}function a156_0x13a6(_0x5027d6,_0x3ea297){_0x5027d6=_0x5027d6-0xf9;const _0x53ddcc=a156_0x53dd();let _0x13a60c=_0x53ddcc[_0x5027d6];return _0x13a60c;}export function isScopedResolution(_0x43ac91){const _0x484bf7=a156_0x13a6;return _0x43ac91[_0x484bf7(0x11c)]===_0x484bf7(0x11d)||_0x43ac91[_0x484bf7(0x11c)]===_0x484bf7(0x102)||_0x43ac91['type']===_0x484bf7(0x11f);}export function getScopedDetails(_0x552572){const _0x5c314b=a156_0x13a6;if(isScopedResolution(_0x552572))return{'isScoped':_0x552572[_0x5c314b(0x101)],'scopedFolderPath':_0x552572[_0x5c314b(0x110)]};return undefined;}async function findTdxConfigAsync(_0x3a3da3,_0x397374){const _0x52f9df=a156_0x13a6;let _0x245f83=a156_0x418a90['resolve'](_0x3a3da3);const _0x278254=a156_0x418a90[_0x52f9df(0x11e)](_0x245f83)[_0x52f9df(0x103)];while(_0x245f83!==_0x278254){const _0x14bc98=a156_0x418a90[_0x52f9df(0x10d)](_0x245f83,'tdx.json');if(await _0x397374[_0x52f9df(0x125)](_0x14bc98))try{const _0x28c6db=await _0x397374[_0x52f9df(0x124)](_0x14bc98),_0x2825a3=JSON[_0x52f9df(0x11e)](_0x28c6db);if(_0x2825a3[_0x52f9df(0xfe)]&&typeof _0x2825a3[_0x52f9df(0xfe)]===_0x52f9df(0x123))return{'configPath':_0x14bc98,'configDir':_0x245f83,'parentSegment':_0x2825a3[_0x52f9df(0xfe)]};}catch{}_0x245f83=a156_0x418a90[_0x52f9df(0x12d)](_0x245f83);}return null;}function calculateScopedPath(_0x10b9b9,_0x260633){const _0x4e85ee=a156_0x13a6,_0x5efe7f=a156_0x418a90[_0x4e85ee(0x130)](_0x260633,_0x10b9b9),_0x49abe7=_0x5efe7f!==''&&_0x5efe7f!=='.'&&!_0x5efe7f[_0x4e85ee(0x10a)]('..');return{'isScoped':_0x49abe7,'scopedFolderPath':_0x49abe7?_0x5efe7f['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x2e8ae3){const _0x15ffc5=a156_0x13a6,{arg:_0xa064cb,contextParent:_0xeb7ed8,cwd:cwd=process[_0x15ffc5(0x129)](),fs:fs=nodeFileSystem}=_0x2e8ae3;if(_0xa064cb&&isYamlFilePath(_0xa064cb))try{const _0x4bcfee=await resolveYamlFilePath(_0xa064cb,fs),_0x1bd2fe=a156_0x418a90[_0x15ffc5(0xf9)](_0xa064cb),_0x2ba34f=a156_0x418a90['dirname'](_0x1bd2fe),_0x1e3e86=await findTdxConfigAsync(_0x2ba34f,fs);if(!_0x1e3e86){if(_0xeb7ed8){const _0x5968c8=a156_0x418a90['dirname'](_0x1bd2fe);return{'type':_0x15ffc5(0x102),'parentName':_0xeb7ed8,'targetDir':_0x5968c8,'configRoot':_0x5968c8,'filePath':_0x1bd2fe,'resourceName':_0x4bcfee[_0x15ffc5(0x114)],'folderPath':_0x4bcfee['folderPath'],'resourceType':_0x4bcfee[_0x15ffc5(0x127)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x15ffc5(0x10b),'errorCode':_0x15ffc5(0x122),'message':_0x15ffc5(0x106)+_0xa064cb,'arg':_0xa064cb,'helpText':_0x15ffc5(0x128)};}const _0x1c708d=calculateScopedPath(_0x2ba34f,_0x1e3e86['configDir']);return{'type':_0x15ffc5(0x102),'parentName':_0x1e3e86[_0x15ffc5(0x112)],'targetDir':_0x1e3e86[_0x15ffc5(0x113)],'configRoot':_0x1e3e86[_0x15ffc5(0x113)],'filePath':_0x1bd2fe,'resourceName':_0x4bcfee[_0x15ffc5(0x114)],'folderPath':_0x4bcfee[_0x15ffc5(0x116)],'resourceType':_0x4bcfee[_0x15ffc5(0x127)],'isScoped':_0x1c708d[_0x15ffc5(0x101)],'scopedFolderPath':_0x1c708d[_0x15ffc5(0x110)]};}catch(_0x153516){const _0xba253c=_0x153516 instanceof Error?_0x153516[_0x15ffc5(0x111)]:String(_0x153516);if(_0xba253c[_0x15ffc5(0x118)]('File\x20not\x20found'))return{'type':_0x15ffc5(0x10b),'errorCode':'file_not_found','message':_0x15ffc5(0x121)+_0xa064cb,'arg':_0xa064cb};if(_0xba253c[_0x15ffc5(0x118)](_0x15ffc5(0x11a))){if(_0xeb7ed8){const _0x2bd02e=a156_0x418a90[_0x15ffc5(0xf9)](_0xa064cb);if(await fs[_0x15ffc5(0x125)](_0x2bd02e)){const _0x37de2e=a156_0x418a90['dirname'](_0x2bd02e),_0x1676d8=await fs['readFile'](_0x2bd02e),_0x20976f=_0x1676d8['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x2df135=_0x1676d8[_0x15ffc5(0x11b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4da102=_0x20976f?_0x20976f[0x1][_0x15ffc5(0x120)]():a156_0x418a90[_0x15ffc5(0x100)](_0xa064cb,a156_0x418a90['extname'](_0xa064cb)),_0x5f1b19=_0x2df135&&_0x2df135[0x1][_0x15ffc5(0x120)]()===_0x15ffc5(0x12b)?_0x15ffc5(0x12b):_0x15ffc5(0x109);return{'type':_0x15ffc5(0x102),'parentName':_0xeb7ed8,'targetDir':_0x37de2e,'configRoot':_0x37de2e,'filePath':_0x2bd02e,'resourceName':_0x4da102,'folderPath':'','resourceType':_0x5f1b19,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x15ffc5(0x10b),'errorCode':_0x15ffc5(0x122),'message':_0x15ffc5(0x106)+_0xa064cb,'arg':_0xa064cb,'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':_0x15ffc5(0x10b),'errorCode':_0x15ffc5(0x108),'message':_0xba253c,'arg':_0xa064cb};}if(_0xa064cb){const _0x58db85=a156_0x418a90[_0x15ffc5(0xf9)](cwd,_0xa064cb);let _0x48b53b=null;try{_0x48b53b=await fs[_0x15ffc5(0x12f)](_0x58db85);}catch{}if(_0x48b53b?.[_0x15ffc5(0xfd)]()){const _0x3297c7=await findTdxConfigAsync(_0x58db85,fs);if(_0x3297c7){const _0x58edd2=calculateScopedPath(_0x58db85,_0x3297c7[_0x15ffc5(0x113)]);return{'type':'directory','parentName':_0x3297c7['parentSegment'],'targetDir':_0x58db85,'configRoot':_0x3297c7['configDir'],'isScoped':_0x58edd2[_0x15ffc5(0x101)],'scopedFolderPath':_0x58edd2[_0x15ffc5(0x110)]};}if(_0xeb7ed8)return{'type':_0x15ffc5(0x11d),'parentName':_0xeb7ed8,'targetDir':_0x58db85,'configRoot':_0x58db85,'isScoped':![],'scopedFolderPath':''};return{'type':_0x15ffc5(0x10b),'errorCode':_0x15ffc5(0x122),'message':_0x15ffc5(0x12e)+_0xa064cb,'arg':_0xa064cb,'helpText':_0x15ffc5(0x128)};}if(_0x48b53b?.[_0x15ffc5(0x119)]())return{'type':'error','errorCode':_0x15ffc5(0x108),'message':_0x15ffc5(0x104)+_0xa064cb,'arg':_0xa064cb,'helpText':_0x15ffc5(0x10e)};const _0x15fa41=sanitizeFileName(_0xa064cb),_0x220fdc=getSegmentRootDir(_0x15fa41,cwd);return{'type':_0x15ffc5(0xfb),'parentName':_0xa064cb,'targetDir':_0x220fdc,'configRoot':_0x220fdc};}const _0x392960=await findTdxConfigAsync(cwd,fs);if(_0x392960){const _0x5611e9=calculateScopedPath(cwd,_0x392960[_0x15ffc5(0x113)]);return{'type':'context','parentName':_0x392960[_0x15ffc5(0x112)],'targetDir':cwd,'configRoot':_0x392960[_0x15ffc5(0x113)],'isScoped':_0x5611e9[_0x15ffc5(0x101)],'scopedFolderPath':_0x5611e9['scopedFolderPath']};}if(_0xeb7ed8){const _0xf16d2=sanitizeFileName(_0xeb7ed8),_0x4f1e7b=getSegmentRootDir(_0xf16d2,cwd);return{'type':_0x15ffc5(0x11f),'parentName':_0xeb7ed8,'targetDir':_0x4f1e7b,'configRoot':_0x4f1e7b,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x15ffc5(0x10b),'errorCode':'no_parent','message':_0x15ffc5(0x12a),'helpText':'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'};}
@@ -1 +1 @@
1
- const a158_0x5b726b=a158_0xfc8e;(function(_0x1e14da,_0x8ccce8){const _0x291d6d=a158_0xfc8e,_0x2b2654=_0x1e14da();while(!![]){try{const _0x1d2eef=parseInt(_0x291d6d(0xf6))/0x1*(parseInt(_0x291d6d(0xfb))/0x2)+-parseInt(_0x291d6d(0xf1))/0x3+parseInt(_0x291d6d(0x107))/0x4*(parseInt(_0x291d6d(0xee))/0x5)+-parseInt(_0x291d6d(0xf0))/0x6*(parseInt(_0x291d6d(0x103))/0x7)+parseInt(_0x291d6d(0xef))/0x8*(parseInt(_0x291d6d(0xea))/0x9)+-parseInt(_0x291d6d(0xfa))/0xa*(parseInt(_0x291d6d(0xff))/0xb)+-parseInt(_0x291d6d(0xe9))/0xc*(-parseInt(_0x291d6d(0xed))/0xd);if(_0x1d2eef===_0x8ccce8)break;else _0x2b2654['push'](_0x2b2654['shift']());}catch(_0x5d7762){_0x2b2654['push'](_0x2b2654['shift']());}}}(a158_0x4fba,0x91f81));import{existsSync,readFileSync}from'fs';import a158_0x492bcd from'path';const TDX_CONFIG_FILE=a158_0x5b726b(0xfd),SEGMENTS_DIR=a158_0x5b726b(0xe8);function a158_0xfc8e(_0x59b090,_0x335e48){_0x59b090=_0x59b090-0xe8;const _0x4fbadc=a158_0x4fba();let _0xfc8eac=_0x4fbadc[_0x59b090];return _0xfc8eac;}export function findTdxConfigPath(_0xc4771c=process[a158_0x5b726b(0xf3)]()){const _0x25e3c1=a158_0x5b726b;let _0x24da46=a158_0x492bcd[_0x25e3c1(0x101)](_0xc4771c);const _0x10e06a=a158_0x492bcd[_0x25e3c1(0x104)](_0x24da46)[_0x25e3c1(0xeb)];while(_0x24da46!==_0x10e06a){const _0x358e63=a158_0x492bcd[_0x25e3c1(0x100)](_0x24da46,TDX_CONFIG_FILE);if(existsSync(_0x358e63))return _0x358e63;_0x24da46=a158_0x492bcd[_0x25e3c1(0xfe)](_0x24da46);}return null;}export function loadTdxConfig(_0x1ab1a9){const _0x3ead48=a158_0x5b726b,_0x1306fa=readFileSync(_0x1ab1a9,_0x3ead48(0xf4));let _0x270e0d;try{_0x270e0d=JSON[_0x3ead48(0x104)](_0x1306fa);}catch{throw new Error(_0x3ead48(0xf8)+_0x1ab1a9);}if(!_0x270e0d||typeof _0x270e0d!=='object')throw new Error(_0x3ead48(0xf9));const _0x47e414=_0x270e0d,_0x4a7cf5=_0x47e414[_0x3ead48(0xf2)]&&typeof _0x47e414[_0x3ead48(0xf2)]===_0x3ead48(0xec),_0x4a9a5c=_0x47e414[_0x3ead48(0x102)]&&typeof _0x47e414[_0x3ead48(0x102)]===_0x3ead48(0xec);if(!_0x4a7cf5&&!_0x4a9a5c)throw new Error(_0x3ead48(0xf7));const _0x22975a={};return _0x4a7cf5&&(_0x22975a[_0x3ead48(0xf2)]=_0x47e414[_0x3ead48(0xf2)]),_0x4a9a5c&&(_0x22975a[_0x3ead48(0x102)]=_0x47e414[_0x3ead48(0x102)]),_0x22975a;}export function findTdxConfig(_0x51c101=process[a158_0x5b726b(0xf3)]()){const _0x331998=a158_0x5b726b,_0x241173=findTdxConfigPath(_0x51c101);if(!_0x241173)throw new Error(_0x331998(0xf5));const _0x1ff310=loadTdxConfig(_0x241173),_0x40f770=a158_0x492bcd['dirname'](_0x241173);return{'config':_0x1ff310,'configPath':_0x241173,'configDir':_0x40f770};}export function tryFindTdxConfig(_0x24da11){try{return findTdxConfig(_0x24da11);}catch{return null;}}export function getSegmentRootDir(_0x2b4918,_0x2f44e6=process[a158_0x5b726b(0xf3)]()){return a158_0x492bcd['join'](_0x2f44e6,SEGMENTS_DIR,_0x2b4918);}export function getTdxConfigPath(_0x11a699,_0x34cb87=process[a158_0x5b726b(0xf3)]()){const _0x7ba896=a158_0x5b726b;return a158_0x492bcd[_0x7ba896(0x100)](getSegmentRootDir(_0x11a699,_0x34cb87),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x291f3d,_0x2d03d9){const _0x3eb8f0=a158_0x5b726b,_0x21c3bc=a158_0x492bcd[_0x3eb8f0(0x101)](_0x291f3d),_0x12ab4c=a158_0x492bcd['relative'](_0x2d03d9,_0x21c3bc);if(_0x12ab4c[_0x3eb8f0(0x106)]('..'))return'';return _0x12ab4c;}export function localPathToTdFolderPath(_0x40b0d3){const _0x463162=a158_0x5b726b,_0x3176a3=a158_0x492bcd[_0x463162(0xfe)](_0x40b0d3);if(_0x3176a3==='.'||_0x3176a3==='')return'';return _0x3176a3[_0x463162(0x105)](/\\/g,'/');}function a158_0x4fba(){const _0x3aabd3=['dirname','1067wVukEG','join','resolve','engage_workspace','14665pcaWQS','parse','replace','startsWith','8FggndS','segments','50556NVTPKn','4829355Fkdubs','root','string','1287YhjmyR','2276640iFlkhw','8BtLmAI','732EFuEGE','1853334yZuNPQ','parent_segment','cwd','utf-8','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','53459JksQkA','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','Invalid\x20JSON\x20in\x20','Invalid\x20tdx.json:\x20expected\x20object','68080rQnbFV','10aPzcFL','stringify','tdx.json'];a158_0x4fba=function(){return _0x3aabd3;};return a158_0x4fba();}export function tdFolderPathToLocalPath(_0x37f34c,_0x44d83c){if(!_0x37f34c)return _0x44d83c;return a158_0x492bcd['join'](_0x44d83c,_0x37f34c);}export function createTdxConfigContent(_0x24cd00){const _0x3e28a6={'parent_segment':_0x24cd00};return JSON['stringify'](_0x3e28a6,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x6d307c){const _0x284799=a158_0x5b726b,_0x45aed8={'engage_workspace':_0x6d307c};return JSON[_0x284799(0xfc)](_0x45aed8,null,0x2)+'\x0a';}
1
+ const a157_0x2df2df=a157_0xd43f;(function(_0x5f202b,_0x2c09d3){const _0x37f2ac=a157_0xd43f,_0x5b6474=_0x5f202b();while(!![]){try{const _0x596dae=-parseInt(_0x37f2ac(0xa5))/0x1*(-parseInt(_0x37f2ac(0xac))/0x2)+parseInt(_0x37f2ac(0xad))/0x3*(-parseInt(_0x37f2ac(0xba))/0x4)+parseInt(_0x37f2ac(0xa2))/0x5+parseInt(_0x37f2ac(0xb0))/0x6+-parseInt(_0x37f2ac(0xa3))/0x7*(-parseInt(_0x37f2ac(0xa9))/0x8)+parseInt(_0x37f2ac(0xb5))/0x9+parseInt(_0x37f2ac(0xb8))/0xa*(-parseInt(_0x37f2ac(0xab))/0xb);if(_0x596dae===_0x2c09d3)break;else _0x5b6474['push'](_0x5b6474['shift']());}catch(_0x55673c){_0x5b6474['push'](_0x5b6474['shift']());}}}(a157_0x3f97,0xb67d9));import{existsSync,readFileSync}from'fs';import a157_0x32edeb from'path';const TDX_CONFIG_FILE=a157_0x2df2df(0xbc),SEGMENTS_DIR=a157_0x2df2df(0xbd);export function findTdxConfigPath(_0x41032c=process[a157_0x2df2df(0xaa)]()){const _0x1ab66c=a157_0x2df2df;let _0x3a69cb=a157_0x32edeb['resolve'](_0x41032c);const _0x118084=a157_0x32edeb[_0x1ab66c(0xa4)](_0x3a69cb)['root'];while(_0x3a69cb!==_0x118084){const _0x515021=a157_0x32edeb[_0x1ab66c(0xa7)](_0x3a69cb,TDX_CONFIG_FILE);if(existsSync(_0x515021))return _0x515021;_0x3a69cb=a157_0x32edeb['dirname'](_0x3a69cb);}return null;}function a157_0xd43f(_0x592d6,_0xa93ca2){_0x592d6=_0x592d6-0xa2;const _0x3f97c0=a157_0x3f97();let _0xd43f63=_0x3f97c0[_0x592d6];return _0xd43f63;}export function loadTdxConfig(_0x416547){const _0x14666e=a157_0x2df2df,_0x5d75c6=readFileSync(_0x416547,_0x14666e(0xaf));let _0xfae9ea;try{_0xfae9ea=JSON[_0x14666e(0xa4)](_0x5d75c6);}catch{throw new Error(_0x14666e(0xb7)+_0x416547);}if(!_0xfae9ea||typeof _0xfae9ea!=='object')throw new Error(_0x14666e(0xa8));const _0x3a5c01=_0xfae9ea,_0x97aa45=_0x3a5c01['parent_segment']&&typeof _0x3a5c01[_0x14666e(0xb4)]==='string',_0x574506=_0x3a5c01[_0x14666e(0xb3)]&&typeof _0x3a5c01[_0x14666e(0xb3)]===_0x14666e(0xae);if(!_0x97aa45&&!_0x574506)throw new Error(_0x14666e(0xbb));const _0x20f05f={};return _0x97aa45&&(_0x20f05f[_0x14666e(0xb4)]=_0x3a5c01[_0x14666e(0xb4)]),_0x574506&&(_0x20f05f['engage_workspace']=_0x3a5c01['engage_workspace']),_0x20f05f;}export function findTdxConfig(_0x4b4798=process[a157_0x2df2df(0xaa)]()){const _0xade847=a157_0x2df2df,_0x42e4e2=findTdxConfigPath(_0x4b4798);if(!_0x42e4e2)throw new Error(_0xade847(0xb1));const _0x3187de=loadTdxConfig(_0x42e4e2),_0x507b4f=a157_0x32edeb[_0xade847(0xa6)](_0x42e4e2);return{'config':_0x3187de,'configPath':_0x42e4e2,'configDir':_0x507b4f};}export function tryFindTdxConfig(_0x2e031f){try{return findTdxConfig(_0x2e031f);}catch{return null;}}export function getSegmentRootDir(_0x262274,_0x467772=process[a157_0x2df2df(0xaa)]()){const _0x4b8c28=a157_0x2df2df;return a157_0x32edeb[_0x4b8c28(0xa7)](_0x467772,SEGMENTS_DIR,_0x262274);}function a157_0x3f97(){const _0x296f97=['dirname','join','Invalid\x20tdx.json:\x20expected\x20object','360312ehDOvP','cwd','11ifyAAI','50RetHsO','519609QoqmXs','string','utf-8','8392758mLMPTT','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','stringify','engage_workspace','parent_segment','2767032jrmgeL','startsWith','Invalid\x20JSON\x20in\x20','9044410jGkZkH','resolve','32bLxaAL','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','tdx.json','segments','2381950OzfhJK','70VYloJP','parse','16181BsttOl'];a157_0x3f97=function(){return _0x296f97;};return a157_0x3f97();}export function getTdxConfigPath(_0x52f9b2,_0x1027e9=process['cwd']()){return a157_0x32edeb['join'](getSegmentRootDir(_0x52f9b2,_0x1027e9),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x320166,_0xeb2ef9){const _0x551e68=a157_0x2df2df,_0x59a0ff=a157_0x32edeb[_0x551e68(0xb9)](_0x320166),_0xa72836=a157_0x32edeb['relative'](_0xeb2ef9,_0x59a0ff);if(_0xa72836[_0x551e68(0xb6)]('..'))return'';return _0xa72836;}export function localPathToTdFolderPath(_0x2efe46){const _0x3da7a0=a157_0x2df2df,_0x2b8957=a157_0x32edeb[_0x3da7a0(0xa6)](_0x2efe46);if(_0x2b8957==='.'||_0x2b8957==='')return'';return _0x2b8957['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x197d65,_0x17dc01){if(!_0x197d65)return _0x17dc01;return a157_0x32edeb['join'](_0x17dc01,_0x197d65);}export function createTdxConfigContent(_0x1d1ce3){const _0x2ddb1b=a157_0x2df2df,_0x4bea10={'parent_segment':_0x1d1ce3};return JSON[_0x2ddb1b(0xb2)](_0x4bea10,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3e33ae){const _0x1975f8=a157_0x2df2df,_0x5b3206={'engage_workspace':_0x3e33ae};return JSON[_0x1975f8(0xb2)](_0x5b3206,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0xc931c0=a159_0x97a4;function a159_0x97a4(_0x3467ae,_0x4aa2d5){_0x3467ae=_0x3467ae-0xf6;const _0x18bf0b=a159_0x18bf();let _0x97a439=_0x18bf0b[_0x3467ae];return _0x97a439;}(function(_0x4085d6,_0x48b0b4){const _0x32dfa3=a159_0x97a4,_0x5a0562=_0x4085d6();while(!![]){try{const _0x9933a2=-parseInt(_0x32dfa3(0xf8))/0x1+-parseInt(_0x32dfa3(0x110))/0x2+parseInt(_0x32dfa3(0x101))/0x3*(parseInt(_0x32dfa3(0x11e))/0x4)+parseInt(_0x32dfa3(0x10f))/0x5+parseInt(_0x32dfa3(0x10c))/0x6*(parseInt(_0x32dfa3(0x10d))/0x7)+parseInt(_0x32dfa3(0x115))/0x8*(-parseInt(_0x32dfa3(0x109))/0x9)+parseInt(_0x32dfa3(0x114))/0xa;if(_0x9933a2===_0x48b0b4)break;else _0x5a0562['push'](_0x5a0562['shift']());}catch(_0x32e918){_0x5a0562['push'](_0x5a0562['shift']());}}}(a159_0x18bf,0xcceb4));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0xc931c0(0x102)]([a159_0xc931c0(0xfb),'hourly','daily','weekly',a159_0xc931c0(0x111),a159_0xc931c0(0x10a),a159_0xc931c0(0x113)]);function a159_0x18bf(){const _0x599c17=['union','masked','optional','string','hour','6891507oHHpCo','cron','onSuccess','48cgahYi','1242388XqFmYw','Activation\x20name\x20is\x20required','583630CbWJrJ','2618582lvPVZF','monthly','number','minutes_interval','21190040HydKcy','16ZAVSYE','day','boolean','clear','array','desc','unknown','week','min','664YLoadj','minute','rows','cols','795059CkccLX','All','Connection\x20name\x20is\x20required','none','First','once','nullable','onFailure','object','14811WBOfsB','enum','Last'];a159_0x18bf=function(){return _0x599c17;};return a159_0x18bf();}export const RepeatUnitSchema=z[a159_0xc931c0(0x102)]([a159_0xc931c0(0x11f),a159_0xc931c0(0x108),a159_0xc931c0(0x116),a159_0xc931c0(0x11c),'month',a159_0xc931c0(0xfd),'none']);export const ScheduleDefSchema=z[a159_0xc931c0(0x100)]({'type':ScheduleTypeSchema[a159_0xc931c0(0x106)](),'repeat_unit':RepeatUnitSchema[a159_0xc931c0(0x106)](),'repeat_frequency':z[a159_0xc931c0(0x112)]()[a159_0xc931c0(0x106)](),'repeat_sub_frequency':z['array'](z[a159_0xc931c0(0x112)]())['optional'](),'start_at':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0xfe)]()['optional'](),'end_on':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0xfe)]()[a159_0xc931c0(0x106)](),'timezone':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0x106)]()});export const NotificationDefSchema=z['object']({'notify_on':z[a159_0xc931c0(0x119)](z[a159_0xc931c0(0x102)]([a159_0xc931c0(0x10b),a159_0xc931c0(0xff)]))[a159_0xc931c0(0x106)](),'email_recipients':z['array'](z[a159_0xc931c0(0x107)]())[a159_0xc931c0(0x106)]()});export const ActivationColumnDefSchema=z[a159_0xc931c0(0x104)]([z['string'](),z[a159_0xc931c0(0x100)]({'name':z[a159_0xc931c0(0x107)](),'type':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0x106)](),'visibility':z[a159_0xc931c0(0x102)]([a159_0xc931c0(0x118),a159_0xc931c0(0x105)])[a159_0xc931c0(0x106)]()})]);export const ActivationBehaviorDefSchema=z[a159_0xc931c0(0x100)]({'columns':z['array'](z[a159_0xc931c0(0x100)]({'name':z['string'](),'type':z[a159_0xc931c0(0x107)]()['optional'](),'visibility':z['enum']([a159_0xc931c0(0x118),a159_0xc931c0(0x105)])['optional']()}))[a159_0xc931c0(0x106)](),'behavior_table':z['string']()[a159_0xc931c0(0x106)](),'join_row':z['number']()[a159_0xc931c0(0xfe)]()[a159_0xc931c0(0x106)](),'join_strategy':z[a159_0xc931c0(0x102)]([a159_0xc931c0(0xf9),a159_0xc931c0(0xfc),a159_0xc931c0(0x103),'Top-N'])['optional'](),'formatting':z[a159_0xc931c0(0x102)]([a159_0xc931c0(0xf6),a159_0xc931c0(0xf7)])['optional'](),'order_by':z[a159_0xc931c0(0x119)](z[a159_0xc931c0(0x100)]({'key':z[a159_0xc931c0(0x107)](),'order':z[a159_0xc931c0(0x102)](['asc',a159_0xc931c0(0x11a)])}))[a159_0xc931c0(0x106)]()});export const ActivationDefSchema=z[a159_0xc931c0(0x100)]({'name':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0x11d)](0x1,a159_0xc931c0(0x10e)),'description':z[a159_0xc931c0(0x107)]()['optional'](),'connection':z['string']()[a159_0xc931c0(0x11d)](0x1,a159_0xc931c0(0xfa)),'all_columns':z[a159_0xc931c0(0x117)]()[a159_0xc931c0(0x106)](),'columns':z[a159_0xc931c0(0x119)](ActivationColumnDefSchema)[a159_0xc931c0(0x106)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0xc931c0(0x106)](),'connector_config':z['record'](z[a159_0xc931c0(0x107)](),z[a159_0xc931c0(0x11b)]())['optional'](),'activation_template_id':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0xfe)]()[a159_0xc931c0(0x106)](),'behavior':ActivationBehaviorDefSchema[a159_0xc931c0(0xfe)]()[a159_0xc931c0(0x106)](),'run_after_journey_refresh':z[a159_0xc931c0(0x117)]()['optional'](),'nested_workflow_project_name':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0x106)](),'nested_workflow_name':z[a159_0xc931c0(0x107)]()[a159_0xc931c0(0x106)](),'lock_enabled':z[a159_0xc931c0(0x117)]()['optional']()});
1
+ const a158_0x361e42=a158_0x237f;(function(_0x34c084,_0x2e8a23){const _0x3a34f0=a158_0x237f,_0xe6ebca=_0x34c084();while(!![]){try{const _0x3cde73=-parseInt(_0x3a34f0(0x1b7))/0x1*(parseInt(_0x3a34f0(0x1af))/0x2)+-parseInt(_0x3a34f0(0x1bd))/0x3+-parseInt(_0x3a34f0(0x1a4))/0x4+parseInt(_0x3a34f0(0x1c2))/0x5+-parseInt(_0x3a34f0(0x1be))/0x6*(-parseInt(_0x3a34f0(0x1bf))/0x7)+parseInt(_0x3a34f0(0x1ad))/0x8+-parseInt(_0x3a34f0(0x1ac))/0x9*(-parseInt(_0x3a34f0(0x19f))/0xa);if(_0x3cde73===_0x2e8a23)break;else _0xe6ebca['push'](_0xe6ebca['shift']());}catch(_0x4849fd){_0xe6ebca['push'](_0xe6ebca['shift']());}}}(a158_0x543d,0x6a8b5));import{z}from'zod';function a158_0x237f(_0x45c91f,_0x680e54){_0x45c91f=_0x45c91f-0x19e;const _0x543d4d=a158_0x543d();let _0x237f38=_0x543d4d[_0x45c91f];return _0x237f38;}export const ScheduleTypeSchema=z['enum']([a158_0x361e42(0x1c5),a158_0x361e42(0x1a1),a158_0x361e42(0x1b8),a158_0x361e42(0x1b4),a158_0x361e42(0x1bc),a158_0x361e42(0x1b6),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a158_0x361e42(0x1a3),a158_0x361e42(0x1a8),a158_0x361e42(0x1c1),a158_0x361e42(0x1bb),a158_0x361e42(0x1b0),'once','none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a158_0x361e42(0x1c4)](),'repeat_frequency':z['number']()['optional'](),'repeat_sub_frequency':z['array'](z['number']())[a158_0x361e42(0x1c4)](),'start_at':z['string']()[a158_0x361e42(0x1a9)]()[a158_0x361e42(0x1c4)](),'end_on':z[a158_0x361e42(0x19e)]()[a158_0x361e42(0x1a9)]()[a158_0x361e42(0x1c4)](),'timezone':z['string']()[a158_0x361e42(0x1c4)]()});export const NotificationDefSchema=z['object']({'notify_on':z[a158_0x361e42(0x1b1)](z['enum']([a158_0x361e42(0x1b5),'onFailure']))[a158_0x361e42(0x1c4)](),'email_recipients':z[a158_0x361e42(0x1b1)](z['string']())[a158_0x361e42(0x1c4)]()});export const ActivationColumnDefSchema=z[a158_0x361e42(0x1a0)]([z[a158_0x361e42(0x19e)](),z[a158_0x361e42(0x1c6)]({'name':z[a158_0x361e42(0x19e)](),'type':z['string']()[a158_0x361e42(0x1c4)](),'visibility':z[a158_0x361e42(0x1a7)]([a158_0x361e42(0x1b2),a158_0x361e42(0x1ba)])[a158_0x361e42(0x1c4)]()})]);export const ActivationBehaviorDefSchema=z[a158_0x361e42(0x1c6)]({'columns':z[a158_0x361e42(0x1b1)](z[a158_0x361e42(0x1c6)]({'name':z['string'](),'type':z['string']()[a158_0x361e42(0x1c4)](),'visibility':z[a158_0x361e42(0x1a7)]([a158_0x361e42(0x1b2),a158_0x361e42(0x1ba)])[a158_0x361e42(0x1c4)]()}))[a158_0x361e42(0x1c4)](),'behavior_table':z[a158_0x361e42(0x19e)]()[a158_0x361e42(0x1c4)](),'join_row':z[a158_0x361e42(0x1ca)]()[a158_0x361e42(0x1a9)]()['optional'](),'join_strategy':z[a158_0x361e42(0x1a7)](['All',a158_0x361e42(0x1a6),a158_0x361e42(0x1ab),a158_0x361e42(0x1b3)])[a158_0x361e42(0x1c4)](),'formatting':z[a158_0x361e42(0x1a7)]([a158_0x361e42(0x1c0),a158_0x361e42(0x1a2)])[a158_0x361e42(0x1c4)](),'order_by':z['array'](z['object']({'key':z['string'](),'order':z[a158_0x361e42(0x1a7)]([a158_0x361e42(0x1aa),a158_0x361e42(0x1ae)])}))[a158_0x361e42(0x1c4)]()});function a158_0x543d(){const _0x1e5b35=['Top-N','weekly','onSuccess','cron','3AxiHtB','daily','record','masked','week','monthly','2235762IvPtso','312762gGWrDO','77GbWFOz','rows','day','696925sfqqTe','boolean','optional','none','object','unknown','Connection\x20name\x20is\x20required','Activation\x20name\x20is\x20required','number','string','50idcBQp','union','hourly','cols','minute','1914720SnaVvd','min','First','enum','hour','nullable','asc','Last','2831580dwcHIm','1654240JyaoNw','desc','554882hKUzMQ','month','array','clear'];a158_0x543d=function(){return _0x1e5b35;};return a158_0x543d();}export const ActivationDefSchema=z[a158_0x361e42(0x1c6)]({'name':z[a158_0x361e42(0x19e)]()[a158_0x361e42(0x1a5)](0x1,a158_0x361e42(0x1c9)),'description':z[a158_0x361e42(0x19e)]()[a158_0x361e42(0x1c4)](),'connection':z['string']()[a158_0x361e42(0x1a5)](0x1,a158_0x361e42(0x1c8)),'all_columns':z['boolean']()[a158_0x361e42(0x1c4)](),'columns':z['array'](ActivationColumnDefSchema)[a158_0x361e42(0x1c4)](),'schedule':ScheduleDefSchema[a158_0x361e42(0x1c4)](),'notification':NotificationDefSchema[a158_0x361e42(0x1c4)](),'connector_config':z[a158_0x361e42(0x1b9)](z[a158_0x361e42(0x19e)](),z[a158_0x361e42(0x1c7)]())[a158_0x361e42(0x1c4)](),'activation_template_id':z[a158_0x361e42(0x19e)]()[a158_0x361e42(0x1a9)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a158_0x361e42(0x1a9)]()[a158_0x361e42(0x1c4)](),'run_after_journey_refresh':z[a158_0x361e42(0x1c3)]()[a158_0x361e42(0x1c4)](),'nested_workflow_project_name':z[a158_0x361e42(0x19e)]()['optional'](),'nested_workflow_name':z[a158_0x361e42(0x19e)]()['optional'](),'lock_enabled':z['boolean']()[a158_0x361e42(0x1c4)]()});
@@ -1 +1 @@
1
- function a160_0x569c(){var _0x39461a=['78008ZUBOKD','758973mOngwz','5967090FtcbeA','1024424wySQTL','628008eQDiav','1701bIiYKr','3443795SCNawV','4231448kWzoAf','7kFvCjc'];a160_0x569c=function(){return _0x39461a;};return a160_0x569c();}function a160_0x3a2c(_0x24eac7,_0x5b7e65){_0x24eac7=_0x24eac7-0xfe;var _0x569c48=a160_0x569c();var _0x3a2cb0=_0x569c48[_0x24eac7];return _0x3a2cb0;}(function(_0x12efed,_0x5ec679){var _0x2831dd=a160_0x3a2c,_0x25eb92=_0x12efed();while(!![]){try{var _0x428603=-parseInt(_0x2831dd(0x106))/0x1+parseInt(_0x2831dd(0x105))/0x2+-parseInt(_0x2831dd(0x103))/0x3+parseInt(_0x2831dd(0x100))/0x4+parseInt(_0x2831dd(0xff))/0x5+parseInt(_0x2831dd(0x104))/0x6*(parseInt(_0x2831dd(0x101))/0x7)+parseInt(_0x2831dd(0x102))/0x8*(-parseInt(_0x2831dd(0xfe))/0x9);if(_0x428603===_0x5ec679)break;else _0x25eb92['push'](_0x25eb92['shift']());}catch(_0x2235b0){_0x25eb92['push'](_0x25eb92['shift']());}}}(a160_0x569c,0x81402));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a159_0x10d5(_0x156667,_0x19ba7c){_0x156667=_0x156667-0xdb;var _0x1033f4=a159_0x1033();var _0x10d52f=_0x1033f4[_0x156667];return _0x10d52f;}(function(_0x4e840b,_0x32796c){var _0x43293a=a159_0x10d5,_0xdcbe5c=_0x4e840b();while(!![]){try{var _0x1a2830=parseInt(_0x43293a(0xdb))/0x1*(parseInt(_0x43293a(0xde))/0x2)+-parseInt(_0x43293a(0xe1))/0x3+parseInt(_0x43293a(0xdd))/0x4+parseInt(_0x43293a(0xe2))/0x5+parseInt(_0x43293a(0xdc))/0x6+-parseInt(_0x43293a(0xe3))/0x7+parseInt(_0x43293a(0xdf))/0x8*(-parseInt(_0x43293a(0xe0))/0x9);if(_0x1a2830===_0x32796c)break;else _0xdcbe5c['push'](_0xdcbe5c['shift']());}catch(_0x5ae50b){_0xdcbe5c['push'](_0xdcbe5c['shift']());}}}(a159_0x1033,0x6cf61));function a159_0x1033(){var _0x2e784f=['3067075KRDWPC','1461446UpBmsn','279wuSfiV','5247000JOZpBJ','2793396OYnEGg','3568Hxrybp','165752kTWVfH','783SjmSjc','679092XvKbHt'];a159_0x1033=function(){return _0x2e784f;};return a159_0x1033();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a161_0x1e168a=a161_0x2b03;(function(_0x59fda9,_0x1fcdae){const _0x271be8=a161_0x2b03,_0x3b1063=_0x59fda9();while(!![]){try{const _0x1505db=parseInt(_0x271be8(0x1af))/0x1+-parseInt(_0x271be8(0x1ac))/0x2*(parseInt(_0x271be8(0x1c6))/0x3)+parseInt(_0x271be8(0x1a6))/0x4*(parseInt(_0x271be8(0x197))/0x5)+parseInt(_0x271be8(0x198))/0x6*(parseInt(_0x271be8(0x1b9))/0x7)+parseInt(_0x271be8(0x19c))/0x8+parseInt(_0x271be8(0x1b2))/0x9*(-parseInt(_0x271be8(0x1c1))/0xa)+-parseInt(_0x271be8(0x1a9))/0xb*(parseInt(_0x271be8(0x1bb))/0xc);if(_0x1505db===_0x1fcdae)break;else _0x3b1063['push'](_0x3b1063['shift']());}catch(_0x292c17){_0x3b1063['push'](_0x3b1063['shift']());}}}(a161_0xc8f5,0xdf0d6));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a161_0x2b03(_0x570b3a,_0x3c0a51){_0x570b3a=_0x570b3a-0x197;const _0xc8f5b=a161_0xc8f5();let _0x2b03d2=_0xc8f5b[_0x570b3a];return _0x2b03d2;}export const JourneyStateTypeSchema=z[a161_0x1e168a(0x1a1)]([a161_0x1e168a(0x1ba),a161_0x1e168a(0x19b),'launched']);function a161_0xc8f5(){const _0x2a6eb0=['2732401UoGnBj','draft','834996ztElBP','boolean','isArray','reentry_always','discriminatedUnion','wait','4248540fblWRQ','filter','jump','record','ab_test','9uXcnVC','2238485bVHBpc','12EuRmLe','optional','stages','simulation','10627296KXRhOD','number','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','end','literal','enum','min','reentry_unless_goal_achieved','Journey\x20name\x20is\x20required','passthrough','4mFAQso','merge','day','220ILqNEh','journey','activation','289762jZuMBH','lazy','no_reentry','1457692lyOgJP','object','type','27GhgxXm','array','string','decision_point','week','versions','length'];a161_0xc8f5=function(){return _0x2a6eb0;};return a161_0xc8f5();}export const ReentryModeTypeSchema=z[a161_0x1e168a(0x1a1)]([a161_0x1e168a(0x1ae),a161_0x1e168a(0x1a3),a161_0x1e168a(0x1be)]);export const WaitUnitTypeSchema=z['enum']([a161_0x1e168a(0x1a8),a161_0x1e168a(0x1b6)]);export const StepTypeValueSchema=z[a161_0x1e168a(0x1a1)]([a161_0x1e168a(0x1c0),a161_0x1e168a(0x1ab),'decision_point',a161_0x1e168a(0x1c5),a161_0x1e168a(0x1a7),a161_0x1e168a(0x1c3),a161_0x1e168a(0x19f)]);export const EmbeddedSegmentDefSchema=z[a161_0x1e168a(0x1b0)]({'description':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x1e168a(0x1b0)]({'journey':z[a161_0x1e168a(0x1b4)](),'stage':z[a161_0x1e168a(0x1b4)](),'bundle_id':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)]()});export const CriteriaDefSchema=z['object']({'name':z[a161_0x1e168a(0x1b4)](),'description':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'segment':z[a161_0x1e168a(0x1b4)](),'target':JumpTargetDefSchema[a161_0x1e168a(0x199)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)]()}),WaitConditionDefSchema=z[a161_0x1e168a(0x1b0)]({'segment':z[a161_0x1e168a(0x1b4)](),'next':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x1e168a(0x199)]()}),WaitStepParamsDefSchema=z[a161_0x1e168a(0x1b0)]({'duration':z[a161_0x1e168a(0x19d)]()[a161_0x1e168a(0x199)](),'unit':WaitUnitTypeSchema[a161_0x1e168a(0x199)](),'wait_until':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a161_0x1e168a(0x1b3)](z['string']())[a161_0x1e168a(0x199)]()}),StepBaseFields={'name':z[a161_0x1e168a(0x1b4)](),'uuid':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'next':z[a161_0x1e168a(0x1b4)]()['optional']()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x1e168a(0x1a0)](a161_0x1e168a(0x1c0)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x1e168a(0x1b0)]({'activation':z[a161_0x1e168a(0x1b4)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x1e168a(0x1a0)](a161_0x1e168a(0x1ab)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x1e168a(0x1b0)]({'name':z['string'](),'segment':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'segment_id':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'excluded':z[a161_0x1e168a(0x1bc)]()[a161_0x1e168a(0x199)](),'next':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)]()}),DecisionPointStepParamsDefSchema=z[a161_0x1e168a(0x1b0)]({'branches':z[a161_0x1e168a(0x1b3)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x1e168a(0x1b0)]({...StepBaseFields,'type':z['literal'](a161_0x1e168a(0x1b5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x1e168a(0x1b0)]({'id':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'name':z[a161_0x1e168a(0x1b4)](),'percentage':z['number'](),'next':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a161_0x1e168a(0x1b3)](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x1e168a(0x199)](),'customized_split':z['boolean']()[a161_0x1e168a(0x199)]()}),AbTestStepDefSchema=z[a161_0x1e168a(0x1b0)]({...StepBaseFields,'type':z[a161_0x1e168a(0x1a0)](a161_0x1e168a(0x1c5)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x1e168a(0x1a0)]('merge')}),JumpStepParamsDefSchema=z[a161_0x1e168a(0x1b0)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x1e168a(0x1b0)]({...StepBaseFields,'type':z['literal'](a161_0x1e168a(0x1c3)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x1e168a(0x1b0)]({...StepBaseFields,'type':z[a161_0x1e168a(0x1a0)](a161_0x1e168a(0x19f))})[a161_0x1e168a(0x1a5)]();export const StepDefSchema=z[a161_0x1e168a(0x1bf)](a161_0x1e168a(0x1b1),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x1e168a(0x1b0)]({'name':z[a161_0x1e168a(0x1b4)](),'description':z[a161_0x1e168a(0x1b4)]()['optional'](),'id':z['string']()[a161_0x1e168a(0x199)](),'entry_criteria':CriteriaDefSchema[a161_0x1e168a(0x199)](),'exit_criteria':z[a161_0x1e168a(0x1b3)](CriteriaDefSchema)[a161_0x1e168a(0x199)](),'milestone':CriteriaDefSchema[a161_0x1e168a(0x199)](),'root_step':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'steps':z['array'](StepDefSchema)[a161_0x1e168a(0x199)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'version':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'state':JourneyStateTypeSchema[a161_0x1e168a(0x199)](),'latest':z[a161_0x1e168a(0x1bc)]()[a161_0x1e168a(0x199)](),'stages':z[a161_0x1e168a(0x1b3)](StageDefSchema),'id':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'version_number':z[a161_0x1e168a(0x19d)]()[a161_0x1e168a(0x199)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a161_0x1e168a(0x1ad)](()=>z['object']({'type':z[a161_0x1e168a(0x1a0)](a161_0x1e168a(0x1aa)),'name':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x1a2)](0x1,a161_0x1e168a(0x1a4)),'description':z['string']()[a161_0x1e168a(0x199)](),'bundle_id':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'bundle_name':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'folder_id':z['string']()[a161_0x1e168a(0x199)](),'reentry':ReentryModeTypeSchema[a161_0x1e168a(0x199)](),'allow_reentry':z[a161_0x1e168a(0x1bc)]()['optional'](),'goal':CriteriaDefSchema[a161_0x1e168a(0x199)](),'id':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'version':z[a161_0x1e168a(0x1b4)]()[a161_0x1e168a(0x199)](),'version_number':z[a161_0x1e168a(0x19d)]()['optional'](),'stages':z[a161_0x1e168a(0x1b3)](StageDefSchema)[a161_0x1e168a(0x199)](),'versions':z[a161_0x1e168a(0x1b3)](JourneyEntryDefSchema)[a161_0x1e168a(0x199)](),'journeys':z[a161_0x1e168a(0x1b3)](JourneyEntryDefSchema)['optional'](),'segments':z[a161_0x1e168a(0x1c4)](z[a161_0x1e168a(0x1b4)](),EmbeddedSegmentDefSchema)[a161_0x1e168a(0x199)](),'activations':z[a161_0x1e168a(0x1c4)](z[a161_0x1e168a(0x1b4)](),ActivationDefSchema)['optional']()})['refine'](_0x12b6e4=>{const _0x5cbdd4=a161_0x1e168a,_0x35e4e8=[_0x12b6e4['journeys'],_0x12b6e4[_0x5cbdd4(0x19a)],_0x12b6e4[_0x5cbdd4(0x1b7)]][_0x5cbdd4(0x1c2)](_0x21ddea=>Array[_0x5cbdd4(0x1bd)](_0x21ddea)&&_0x21ddea[_0x5cbdd4(0x1b8)]>0x0)[_0x5cbdd4(0x1b8)];return _0x35e4e8===0x1;},{'message':a161_0x1e168a(0x19e)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a160_0x5bcd88=a160_0x32fb;(function(_0x507395,_0x334ffa){const _0x5d408b=a160_0x32fb,_0x51e03a=_0x507395();while(!![]){try{const _0x1ee882=parseInt(_0x5d408b(0xe1))/0x1*(parseInt(_0x5d408b(0xe6))/0x2)+-parseInt(_0x5d408b(0xd6))/0x3*(-parseInt(_0x5d408b(0xda))/0x4)+parseInt(_0x5d408b(0xf0))/0x5*(-parseInt(_0x5d408b(0xed))/0x6)+-parseInt(_0x5d408b(0xe9))/0x7+parseInt(_0x5d408b(0xe3))/0x8*(-parseInt(_0x5d408b(0xf3))/0x9)+parseInt(_0x5d408b(0xe7))/0xa*(parseInt(_0x5d408b(0xf8))/0xb)+-parseInt(_0x5d408b(0xd9))/0xc*(parseInt(_0x5d408b(0xfc))/0xd);if(_0x1ee882===_0x334ffa)break;else _0x51e03a['push'](_0x51e03a['shift']());}catch(_0x3b7485){_0x51e03a['push'](_0x51e03a['shift']());}}}(a160_0x33d2,0xa3fcf));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a160_0x32fb(_0x1d0082,_0x13cc16){_0x1d0082=_0x1d0082-0xd5;const _0x33d202=a160_0x33d2();let _0x32fbe7=_0x33d202[_0x1d0082];return _0x32fbe7;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a160_0x5bcd88(0xf5)]([a160_0x5bcd88(0xf6),a160_0x5bcd88(0xe0),'launched']);export const ReentryModeTypeSchema=z[a160_0x5bcd88(0xf5)]([a160_0x5bcd88(0xe4),a160_0x5bcd88(0xfb),a160_0x5bcd88(0x100)]);export const WaitUnitTypeSchema=z[a160_0x5bcd88(0xf5)](['day',a160_0x5bcd88(0xdc)]);export const StepTypeValueSchema=z[a160_0x5bcd88(0xf5)]([a160_0x5bcd88(0xe2),a160_0x5bcd88(0xef),a160_0x5bcd88(0xff),'ab_test','merge',a160_0x5bcd88(0xd7),a160_0x5bcd88(0xd8)]);export const EmbeddedSegmentDefSchema=z[a160_0x5bcd88(0xfe)]({'description':z[a160_0x5bcd88(0xea)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a160_0x5bcd88(0xfe)]({'journey':z['string'](),'stage':z[a160_0x5bcd88(0xea)](),'bundle_id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)]()});export const CriteriaDefSchema=z[a160_0x5bcd88(0xfe)]({'name':z['string'](),'description':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'segment':z[a160_0x5bcd88(0xea)](),'target':JumpTargetDefSchema[a160_0x5bcd88(0xf7)]()});const WaitConditionTimeoutDefSchema=z[a160_0x5bcd88(0xfe)]({'duration':z[a160_0x5bcd88(0xec)](),'unit':WaitUnitTypeSchema,'next':z['string']()['optional']()}),WaitConditionDefSchema=z['object']({'segment':z[a160_0x5bcd88(0xea)](),'next':z['string']()[a160_0x5bcd88(0xf7)](),'timeout':WaitConditionTimeoutDefSchema[a160_0x5bcd88(0xf7)]()}),WaitStepParamsDefSchema=z[a160_0x5bcd88(0xfe)]({'duration':z['number']()[a160_0x5bcd88(0xf7)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'condition':WaitConditionDefSchema[a160_0x5bcd88(0xf7)](),'days_of_week':z[a160_0x5bcd88(0xe8)](z[a160_0x5bcd88(0xea)]())[a160_0x5bcd88(0xf7)]()}),StepBaseFields={'name':z[a160_0x5bcd88(0xea)](),'uuid':z[a160_0x5bcd88(0xea)]()['optional'](),'next':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)]()},WaitStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z[a160_0x5bcd88(0xdf)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a160_0x5bcd88(0xea)]()}),ActivationStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z[a160_0x5bcd88(0xdf)](a160_0x5bcd88(0xef)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a160_0x5bcd88(0xfe)]({'name':z[a160_0x5bcd88(0xea)](),'segment':z[a160_0x5bcd88(0xea)]()['optional'](),'segment_id':z[a160_0x5bcd88(0xea)]()['optional'](),'excluded':z[a160_0x5bcd88(0xfa)]()[a160_0x5bcd88(0xf7)](),'next':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)]()}),DecisionPointStepParamsDefSchema=z[a160_0x5bcd88(0xfe)]({'branches':z[a160_0x5bcd88(0xe8)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z[a160_0x5bcd88(0xdf)](a160_0x5bcd88(0xff)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a160_0x5bcd88(0xfe)]({'id':z['string']()['optional'](),'name':z['string'](),'percentage':z[a160_0x5bcd88(0xec)](),'next':z[a160_0x5bcd88(0xea)]()['optional']()}),AbTestStepParamsDefSchema=z[a160_0x5bcd88(0xfe)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'customized_split':z[a160_0x5bcd88(0xfa)]()['optional']()}),AbTestStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z[a160_0x5bcd88(0xdf)](a160_0x5bcd88(0xf1)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z[a160_0x5bcd88(0xdf)]('merge')}),JumpStepParamsDefSchema=z[a160_0x5bcd88(0xfe)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z['literal']('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a160_0x5bcd88(0xfe)]({...StepBaseFields,'type':z[a160_0x5bcd88(0xdf)](a160_0x5bcd88(0xd8))})[a160_0x5bcd88(0xee)]();export const StepDefSchema=z['discriminatedUnion'](a160_0x5bcd88(0xde),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a160_0x5bcd88(0xfe)]({'name':z['string'](),'description':z['string']()[a160_0x5bcd88(0xf7)](),'id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'entry_criteria':CriteriaDefSchema[a160_0x5bcd88(0xf7)](),'exit_criteria':z[a160_0x5bcd88(0xe8)](CriteriaDefSchema)[a160_0x5bcd88(0xf7)](),'milestone':CriteriaDefSchema[a160_0x5bcd88(0xf7)](),'root_step':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'steps':z[a160_0x5bcd88(0xe8)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z['object']({'name':z[a160_0x5bcd88(0xea)]()['optional'](),'version':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'state':JourneyStateTypeSchema[a160_0x5bcd88(0xf7)](),'latest':z[a160_0x5bcd88(0xfa)]()[a160_0x5bcd88(0xf7)](),'stages':z['array'](StageDefSchema),'id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'version_number':z[a160_0x5bcd88(0xec)]()[a160_0x5bcd88(0xf7)](),'goal':CriteriaDefSchema[a160_0x5bcd88(0xf7)](),'reentry':ReentryModeTypeSchema[a160_0x5bcd88(0xf7)]()});export const JourneyDefSchema=z[a160_0x5bcd88(0xe5)](()=>z[a160_0x5bcd88(0xfe)]({'type':z['literal'](a160_0x5bcd88(0xd5)),'name':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf4)](0x1,a160_0x5bcd88(0xf2)),'description':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'bundle_id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'bundle_name':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'folder_id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'reentry':ReentryModeTypeSchema[a160_0x5bcd88(0xf7)](),'allow_reentry':z[a160_0x5bcd88(0xfa)]()['optional'](),'goal':CriteriaDefSchema[a160_0x5bcd88(0xf7)](),'id':z[a160_0x5bcd88(0xea)]()[a160_0x5bcd88(0xf7)](),'version':z[a160_0x5bcd88(0xea)]()['optional'](),'version_number':z[a160_0x5bcd88(0xec)]()['optional'](),'stages':z['array'](StageDefSchema)['optional'](),'versions':z['array'](JourneyEntryDefSchema)[a160_0x5bcd88(0xf7)](),'journeys':z[a160_0x5bcd88(0xe8)](JourneyEntryDefSchema)[a160_0x5bcd88(0xf7)](),'segments':z[a160_0x5bcd88(0xeb)](z['string'](),EmbeddedSegmentDefSchema)[a160_0x5bcd88(0xf7)](),'activations':z['record'](z[a160_0x5bcd88(0xea)](),ActivationDefSchema)['optional']()})[a160_0x5bcd88(0xf9)](_0x52d21b=>{const _0x36d870=a160_0x5bcd88,_0x4c937a=[_0x52d21b['journeys'],_0x52d21b['stages'],_0x52d21b['versions']][_0x36d870(0xfd)](_0x5665f4=>Array['isArray'](_0x5665f4)&&_0x5665f4[_0x36d870(0xdb)]>0x0)[_0x36d870(0xdb)];return _0x4c937a===0x1;},{'message':a160_0x5bcd88(0xdd)}));function a160_0x33d2(){const _0x548c01=['draft','optional','149237diFtGH','refine','boolean','reentry_unless_goal_achieved','1000116zqZxQl','filter','object','decision_point','reentry_always','journey','330489neNukR','jump','end','60WPmfVm','36lyunJE','length','week','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','type','literal','simulation','1zCCIsq','wait','1736uvfhYF','no_reentry','lazy','773702aqBHtZ','330tWnzNz','array','1984990niteEU','string','record','number','1374QposaU','passthrough','activation','9775KXaYCo','ab_test','Journey\x20name\x20is\x20required','1593eTlaYz','min','enum'];a160_0x33d2=function(){return _0x548c01;};return a160_0x33d2();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x536b15,_0x9137d6){var _0x1ffc4e=a163_0x2c4b,_0x38c4ea=_0x536b15();while(!![]){try{var _0x14a602=parseInt(_0x1ffc4e(0xd6))/0x1+-parseInt(_0x1ffc4e(0xd7))/0x2*(parseInt(_0x1ffc4e(0xd8))/0x3)+parseInt(_0x1ffc4e(0xda))/0x4+-parseInt(_0x1ffc4e(0xd9))/0x5*(parseInt(_0x1ffc4e(0xd5))/0x6)+-parseInt(_0x1ffc4e(0xdb))/0x7+-parseInt(_0x1ffc4e(0xdc))/0x8+parseInt(_0x1ffc4e(0xdd))/0x9;if(_0x14a602===_0x9137d6)break;else _0x38c4ea['push'](_0x38c4ea['shift']());}catch(_0x563972){_0x38c4ea['push'](_0x38c4ea['shift']());}}}(a163_0x20df,0xe0584));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0x20df(){var _0x108b47=['5408200PyMiXi','4604704InuqPe','25534431OrfpNh','128256kkRkvW','1061592hflATB','2762818ABtjkT','3rYAPkf','80MVAnGJ','367112lLuanr'];a163_0x20df=function(){return _0x108b47;};return a163_0x20df();}function a163_0x2c4b(_0x549aff,_0x1b939d){_0x549aff=_0x549aff-0xd5;var _0x20dfd3=a163_0x20df();var _0x2c4bfe=_0x20dfd3[_0x549aff];return _0x2c4bfe;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x4e2534,_0x4b3780){var _0x5c49f8=a162_0x232d,_0x45dc2f=_0x4e2534();while(!![]){try{var _0x17b4b0=parseInt(_0x5c49f8(0x187))/0x1*(parseInt(_0x5c49f8(0x18b))/0x2)+-parseInt(_0x5c49f8(0x186))/0x3+-parseInt(_0x5c49f8(0x189))/0x4*(-parseInt(_0x5c49f8(0x18c))/0x5)+-parseInt(_0x5c49f8(0x18d))/0x6*(parseInt(_0x5c49f8(0x188))/0x7)+-parseInt(_0x5c49f8(0x183))/0x8+-parseInt(_0x5c49f8(0x182))/0x9*(-parseInt(_0x5c49f8(0x18a))/0xa)+-parseInt(_0x5c49f8(0x185))/0xb*(-parseInt(_0x5c49f8(0x184))/0xc);if(_0x17b4b0===_0x4b3780)break;else _0x45dc2f['push'](_0x45dc2f['shift']());}catch(_0x1c8b5e){_0x45dc2f['push'](_0x45dc2f['shift']());}}}(a162_0x5153,0x48c36));function a162_0x232d(_0x43b8ba,_0x53c7da){_0x43b8ba=_0x43b8ba-0x182;var _0x51535e=a162_0x5153();var _0x232dfd=_0x51535e[_0x43b8ba];return _0x232dfd;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a162_0x5153(){var _0x118aef=['10ArEuiV','939202SHASZP','10eMEVDV','6UTFGOr','1824237OMdpEX','3447232TCrGQa','830184aDarfT','99PwilNK','623424JdJinw','1fvTueC','3968776pauLqP','417572EtmAQv'];a162_0x5153=function(){return _0x118aef;};return a162_0x5153();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a164_0x30e5bb=a164_0x5280;(function(_0x13f256,_0x35a6fd){const _0x307355=a164_0x5280,_0x2e2855=_0x13f256();while(!![]){try{const _0xa9a3cc=-parseInt(_0x307355(0xab))/0x1*(-parseInt(_0x307355(0xb9))/0x2)+-parseInt(_0x307355(0xa2))/0x3*(parseInt(_0x307355(0xaf))/0x4)+parseInt(_0x307355(0x9c))/0x5*(parseInt(_0x307355(0xb6))/0x6)+-parseInt(_0x307355(0x90))/0x7*(-parseInt(_0x307355(0x8d))/0x8)+parseInt(_0x307355(0x78))/0x9+parseInt(_0x307355(0x7b))/0xa+-parseInt(_0x307355(0xac))/0xb*(parseInt(_0x307355(0x9e))/0xc);if(_0xa9a3cc===_0x35a6fd)break;else _0x2e2855['push'](_0x2e2855['shift']());}catch(_0x4f663c){_0x2e2855['push'](_0x2e2855['shift']());}}}(a164_0x1d08,0x93c93));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0xbc),a164_0x30e5bb(0x9f),a164_0x30e5bb(0x84),a164_0x30e5bb(0x99),a164_0x30e5bb(0xa3),'In',a164_0x30e5bb(0xa4),a164_0x30e5bb(0xb5),a164_0x30e5bb(0xbe),'TimeWithinPast',a164_0x30e5bb(0xa1),a164_0x30e5bb(0xbb),a164_0x30e5bb(0xb8),'EndWith',a164_0x30e5bb(0x77)]);function a164_0x5280(_0xad86f7,_0x2d8e73){_0xad86f7=_0xad86f7-0x6d;const _0x1d084c=a164_0x1d08();let _0x528047=_0x1d084c[_0xad86f7];return _0x528047;}export const TimeUnitSchema=z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x82),a164_0x30e5bb(0x9a),a164_0x30e5bb(0x94),a164_0x30e5bb(0x6d),a164_0x30e5bb(0x6f),a164_0x30e5bb(0xaa),a164_0x30e5bb(0xa7)]);export const AggregationTypeSchema=z[a164_0x30e5bb(0x9b)](['Count',a164_0x30e5bb(0xb3),a164_0x30e5bb(0x70),a164_0x30e5bb(0x7e),a164_0x30e5bb(0x8b),a164_0x30e5bb(0xa9),a164_0x30e5bb(0xb1),a164_0x30e5bb(0x72)]);const TemporalValueSchema=z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0xad)]({'timestamp':z['string']()}),z[a164_0x30e5bb(0xad)]({'last':z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0x8c)](),z['record'](z[a164_0x30e5bb(0x83)](),z[a164_0x30e5bb(0x8c)]())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a164_0x30e5bb(0x83)](),z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0xa0)](),TemporalValueSchema,z[a164_0x30e5bb(0x7a)](z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0x83)](),z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0xa0)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x30e5bb(0xbc),a164_0x30e5bb(0x9f),'GreaterEqual','Less','LessEqual','In',a164_0x30e5bb(0xbb),a164_0x30e5bb(0xb8),a164_0x30e5bb(0x71),a164_0x30e5bb(0xb5),a164_0x30e5bb(0xba),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x30e5bb(0xba),a164_0x30e5bb(0xa1)]);export const OperatorDefSchema=z[a164_0x30e5bb(0xad)]({'type':OperatorTypeSchema,'not':z[a164_0x30e5bb(0xa0)]()['optional'](),'value':OperatorValueSchema[a164_0x30e5bb(0x7c)](),'min':z[a164_0x30e5bb(0xa5)]([z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0x83)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a164_0x30e5bb(0x8c)](),z['string'](),TemporalValueSchema])[a164_0x30e5bb(0x7c)](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0x30e5bb(0xad)]({'day':z[a164_0x30e5bb(0x8c)]()[a164_0x30e5bb(0x7c)](),'week':z[a164_0x30e5bb(0x8c)]()['optional'](),'month':z[a164_0x30e5bb(0x8c)]()['optional'](),'year':z[a164_0x30e5bb(0x8c)]()['optional'](),'hour':z[a164_0x30e5bb(0x8c)]()[a164_0x30e5bb(0x7c)](),'minute':z['number']()[a164_0x30e5bb(0x7c)](),'second':z[a164_0x30e5bb(0x8c)]()['optional']()})[a164_0x30e5bb(0x7c)](),'from':z['object']({'last':z['union']([z[a164_0x30e5bb(0x8c)](),z[a164_0x30e5bb(0x83)]()]),'unit':TimeUnitSchema})[a164_0x30e5bb(0x7c)](),'reverse':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)]()})[a164_0x30e5bb(0x79)]((_0x2e99e1,_0x3eabad)=>{const _0x210c20=a164_0x30e5bb;OPERATORS_REQUIRING_VALUE[_0x210c20(0xbf)](_0x2e99e1['type'])&&(_0x2e99e1['value']===undefined||_0x2e99e1[_0x210c20(0x92)]===null)&&_0x3eabad[_0x210c20(0x80)]({'code':'custom','message':'Operator\x20\x27'+_0x2e99e1[_0x210c20(0x87)]+_0x210c20(0x85),'path':[_0x210c20(0x92)]}),_0x2e99e1['type']==='Between'&&_0x2e99e1[_0x210c20(0xa6)]===undefined&&_0x2e99e1['max']===undefined&&_0x3eabad[_0x210c20(0x80)]({'code':_0x210c20(0x81),'message':_0x210c20(0x86),'params':{'validationCode':_0x210c20(0x93)}}),OPERATORS_REQUIRING_UNIT['has'](_0x2e99e1['type'])&&_0x2e99e1[_0x210c20(0x92)]!==undefined&&!_0x2e99e1[_0x210c20(0x8f)]&&_0x3eabad[_0x210c20(0x80)]({'code':'custom','message':_0x210c20(0x89)+_0x2e99e1[_0x210c20(0x87)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x210c20(0x8f)],'params':{'validationCode':_0x210c20(0xb4)}}),_0x2e99e1['type']===_0x210c20(0x77)&&(!_0x2e99e1[_0x210c20(0xae)]&&_0x3eabad['addIssue']({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x2e99e1[_0x210c20(0x8e)]&&_0x3eabad[_0x210c20(0x80)]({'code':_0x210c20(0x81),'message':_0x210c20(0x7d),'path':[_0x210c20(0x8e)]}));});export const ArrayMatchingSchema=z['union']([z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x75)),z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x74)),z[a164_0x30e5bb(0xad)]({'atLeast':z[a164_0x30e5bb(0x8c)]()}),z[a164_0x30e5bb(0xad)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x30e5bb(0x98)](a164_0x30e5bb(0x87),[z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0xb3),a164_0x30e5bb(0x7e),a164_0x30e5bb(0x8b),a164_0x30e5bb(0x70)]),'column':z['string'](),'groupingColumns':z['array'](z['string']())[a164_0x30e5bb(0x7c)]()}),z[a164_0x30e5bb(0xad)]({'type':z['literal']('Count'),'groupingColumns':z[a164_0x30e5bb(0x7a)](z[a164_0x30e5bb(0x83)]())[a164_0x30e5bb(0x7c)]()}),z[a164_0x30e5bb(0xad)]({'type':z['literal'](a164_0x30e5bb(0xa9)),'columns':z[a164_0x30e5bb(0x7a)](z['string']())}),z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)](['First',a164_0x30e5bb(0x72)]),'column':z[a164_0x30e5bb(0x83)](),'orderColumn':z[a164_0x30e5bb(0x83)](),'groupingColumns':z['array'](z[a164_0x30e5bb(0x83)]())[a164_0x30e5bb(0x7c)]()})]);export const TimeWindowDefSchema=z[a164_0x30e5bb(0xad)]({'duration':z[a164_0x30e5bb(0x8c)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x30e5bb(0xba),a164_0x30e5bb(0xa1),'TimeRange']);function a164_0x1d08(){const _0x15d41f=['minute','enum','5NKVKTE','exclude','2097444SWzwti','Greater','boolean','TimeWithinNext','438ybKEzM','LessEqual','Between','union','min','year','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','CountDistinct','month','5567zmVrCK','77yDMIcW','object','duration','11068ovHcrG','funnel_stage','First','include','Sum','MISSING_TIME_UNIT','Regexp','1567932RydZCT','operator','StartWith','56BSKDSJ','TimeWithinPast','Contain','Equal','literal','IsNull','has','day','And','week','Average','EndWith','Last','segment','all','any','Behavior','TimeRange','9301590CRRwdr','superRefine','array','3707480pTnrhp','optional','TimeRange\x20operator\x20requires\x20\x27from\x27','Min','Segment\x20name\x20is\x20required','addIssue','custom','second','string','Less','\x27\x20requires\x20a\x20value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','type','batch','Operator\x20\x27','Column','Max','number','96792BeYnMA','from','unit','238ChFtCh','lazy','value','MISSING_BETWEEN_BOUNDS','hour','Value','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','column','discriminatedUnion','GreaterEqual'];a164_0x1d08=function(){return _0x15d41f;};return a164_0x1d08();}export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x8a)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x30e5bb(0x7c)]()})[a164_0x30e5bb(0x79)]((_0x5ab0a6,_0x18ced0)=>{const _0x543981=a164_0x30e5bb,_0x126682=_0x5ab0a6[_0x543981(0xb7)]['type'];_0x5ab0a6[_0x543981(0x97)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x543981(0xbf)](_0x126682)&&_0x18ced0['addIssue']({'code':_0x543981(0x81),'message':_0x543981(0x96)+_0x126682+'\x27)','path':[_0x543981(0xb7),_0x543981(0x87)]}):TIMESTAMP_OPERATORS[_0x543981(0xbf)](_0x126682)&&_0x18ced0[_0x543981(0x80)]({'code':_0x543981(0x81),'message':_0x543981(0x89)+_0x126682+_0x543981(0xa8),'path':['operator',_0x543981(0x87)]});});export const FilterRuleDefSchema=z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x6e)),'conditions':z[a164_0x30e5bb(0x7a)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x95)),'attribute':z[a164_0x30e5bb(0x83)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x30e5bb(0x7c)](),'exclude':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)](),'aggregation':AggregationDefSchema[a164_0x30e5bb(0x7c)](),'source':z[a164_0x30e5bb(0x83)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x30e5bb(0x8c)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x76)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x30e5bb(0x7c)](),'exclude':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)](),'aggregation':AggregationDefSchema[a164_0x30e5bb(0x7c)](),'source':z[a164_0x30e5bb(0x83)]()[a164_0x30e5bb(0x7c)](),'filter':FilterRuleDefSchema[a164_0x30e5bb(0x7c)](),'timeWindow':TimeWindowDefSchema[a164_0x30e5bb(0x7c)](),'limit':z[a164_0x30e5bb(0x8c)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x30e5bb(0xad)]({'type':z['literal'](a164_0x30e5bb(0x8a)),'column':z[a164_0x30e5bb(0x83)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x6e),'Or']),'conditions':z[a164_0x30e5bb(0x7a)](ConditionDefSchema),'description':z['string']()[a164_0x30e5bb(0x7c)]()}));export const SegmentRefConditionDefSchema=z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0xb2),a164_0x30e5bb(0x9d)]),'segment':z[a164_0x30e5bb(0x83)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xa5)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x30e5bb(0x91)](()=>z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x6e),'Or']),'conditions':z[a164_0x30e5bb(0x7a)](ConditionDefSchema),'description':z['string']()[a164_0x30e5bb(0x7c)]()}));export const SegmentDefSchema=z[a164_0x30e5bb(0xad)]({'type':z[a164_0x30e5bb(0xbd)](a164_0x30e5bb(0x73))[a164_0x30e5bb(0x7c)](),'name':z['string']()[a164_0x30e5bb(0xa6)](0x1,a164_0x30e5bb(0x7f)),'description':z[a164_0x30e5bb(0x83)]()[a164_0x30e5bb(0x7c)](),'folder':z[a164_0x30e5bb(0x83)]()[a164_0x30e5bb(0x7c)](),'rule':RuleDefSchema[a164_0x30e5bb(0x7c)](),'kind':z[a164_0x30e5bb(0x9b)]([a164_0x30e5bb(0x88),'realtime',a164_0x30e5bb(0xb0)])[a164_0x30e5bb(0x7c)](),'visible':z[a164_0x30e5bb(0xa0)]()[a164_0x30e5bb(0x7c)](),'activations':z[a164_0x30e5bb(0x7a)](z['any']())[a164_0x30e5bb(0x7c)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a163_0x255e35=a163_0x355a;(function(_0x3c3101,_0x2e1cb6){const _0x48ce59=a163_0x355a,_0x2d5c9c=_0x3c3101();while(!![]){try{const _0x16e60c=parseInt(_0x48ce59(0x1c1))/0x1+parseInt(_0x48ce59(0x1d0))/0x2*(parseInt(_0x48ce59(0x1f7))/0x3)+parseInt(_0x48ce59(0x1ec))/0x4*(-parseInt(_0x48ce59(0x1ef))/0x5)+parseInt(_0x48ce59(0x1cc))/0x6*(parseInt(_0x48ce59(0x1b1))/0x7)+-parseInt(_0x48ce59(0x1e8))/0x8+-parseInt(_0x48ce59(0x1d8))/0x9+parseInt(_0x48ce59(0x1b3))/0xa*(parseInt(_0x48ce59(0x1b2))/0xb);if(_0x16e60c===_0x2e1cb6)break;else _0x2d5c9c['push'](_0x2d5c9c['shift']());}catch(_0x40a04e){_0x2d5c9c['push'](_0x2d5c9c['shift']());}}}(a163_0x108f,0xa137b));import{z}from'zod';export const OperatorTypeSchema=z[a163_0x255e35(0x1d7)]([a163_0x255e35(0x1d6),'Greater',a163_0x255e35(0x1af),a163_0x255e35(0x1b9),a163_0x255e35(0x1c8),'In',a163_0x255e35(0x1e4),a163_0x255e35(0x1e2),'IsNull',a163_0x255e35(0x1c0),a163_0x255e35(0x1ca),a163_0x255e35(0x1ab),a163_0x255e35(0x1e7),a163_0x255e35(0x1ed),a163_0x255e35(0x1d1)]);function a163_0x355a(_0x182457,_0x4ed9b0){_0x182457=_0x182457-0x1aa;const _0x108f5b=a163_0x108f();let _0x355a61=_0x108f5b[_0x182457];return _0x355a61;}export const TimeUnitSchema=z[a163_0x255e35(0x1d7)](['second',a163_0x255e35(0x1dc),a163_0x255e35(0x1eb),'day',a163_0x255e35(0x1ce),'month',a163_0x255e35(0x1c4)]);export const AggregationTypeSchema=z['enum'](['Count',a163_0x255e35(0x1f4),a163_0x255e35(0x1c6),a163_0x255e35(0x1d5),a163_0x255e35(0x1b8),a163_0x255e35(0x1de),a163_0x255e35(0x1be),a163_0x255e35(0x1d3)]);const TemporalValueSchema=z[a163_0x255e35(0x1d9)]([z['object']({'timestamp':z[a163_0x255e35(0x1bb)]()}),z['object']({'last':z[a163_0x255e35(0x1d9)]([z[a163_0x255e35(0x1da)](),z[a163_0x255e35(0x1dd)](z[a163_0x255e35(0x1bb)](),z[a163_0x255e35(0x1da)]())]),'unit':z[a163_0x255e35(0x1bb)]()})]),OperatorValueSchema=z[a163_0x255e35(0x1d9)]([z['string'](),z[a163_0x255e35(0x1da)](),z['boolean'](),TemporalValueSchema,z[a163_0x255e35(0x1ac)](z[a163_0x255e35(0x1d9)]([z[a163_0x255e35(0x1bb)](),z[a163_0x255e35(0x1da)](),z[a163_0x255e35(0x1c3)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a163_0x255e35(0x1d6),'Greater',a163_0x255e35(0x1b9),'Less',a163_0x255e35(0x1c8),'In',a163_0x255e35(0x1ab),a163_0x255e35(0x1e7),a163_0x255e35(0x1ed),a163_0x255e35(0x1e2),a163_0x255e35(0x1c0),a163_0x255e35(0x1ca)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast','TimeWithinNext']);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a163_0x255e35(0x1c3)]()[a163_0x255e35(0x1b6)](),'value':OperatorValueSchema[a163_0x255e35(0x1b6)](),'min':z['union']([z['number'](),z[a163_0x255e35(0x1bb)](),TemporalValueSchema])['optional'](),'max':z[a163_0x255e35(0x1d9)]([z[a163_0x255e35(0x1da)](),z[a163_0x255e35(0x1bb)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a163_0x255e35(0x1b6)](),'duration':z[a163_0x255e35(0x1bf)]({'day':z[a163_0x255e35(0x1da)]()[a163_0x255e35(0x1b6)](),'week':z['number']()[a163_0x255e35(0x1b6)](),'month':z['number']()['optional'](),'year':z[a163_0x255e35(0x1da)]()[a163_0x255e35(0x1b6)](),'hour':z[a163_0x255e35(0x1da)]()['optional'](),'minute':z['number']()[a163_0x255e35(0x1b6)](),'second':z[a163_0x255e35(0x1da)]()[a163_0x255e35(0x1b6)]()})[a163_0x255e35(0x1b6)](),'from':z[a163_0x255e35(0x1bf)]({'last':z[a163_0x255e35(0x1d9)]([z['number'](),z[a163_0x255e35(0x1bb)]()]),'unit':TimeUnitSchema})[a163_0x255e35(0x1b6)](),'reverse':z[a163_0x255e35(0x1c3)]()[a163_0x255e35(0x1b6)]()})[a163_0x255e35(0x1ad)]((_0x4a9381,_0x238a46)=>{const _0x5c7807=a163_0x255e35;OPERATORS_REQUIRING_VALUE['has'](_0x4a9381[_0x5c7807(0x1e9)])&&(_0x4a9381[_0x5c7807(0x1cb)]===undefined||_0x4a9381[_0x5c7807(0x1cb)]===null)&&_0x238a46['addIssue']({'code':_0x5c7807(0x1c9),'message':_0x5c7807(0x1b0)+_0x4a9381[_0x5c7807(0x1e9)]+_0x5c7807(0x1aa),'path':[_0x5c7807(0x1cb)]}),_0x4a9381[_0x5c7807(0x1e9)]===_0x5c7807(0x1e4)&&_0x4a9381[_0x5c7807(0x1c7)]===undefined&&_0x4a9381[_0x5c7807(0x1e0)]===undefined&&_0x238a46[_0x5c7807(0x1db)]({'code':_0x5c7807(0x1c9),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x5c7807(0x1f0)}}),OPERATORS_REQUIRING_UNIT['has'](_0x4a9381[_0x5c7807(0x1e9)])&&_0x4a9381['value']!==undefined&&!_0x4a9381[_0x5c7807(0x1b7)]&&_0x238a46[_0x5c7807(0x1db)]({'code':'custom','message':_0x5c7807(0x1b0)+_0x4a9381['type']+_0x5c7807(0x1ae),'path':[_0x5c7807(0x1b7)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x4a9381[_0x5c7807(0x1e9)]===_0x5c7807(0x1d1)&&(!_0x4a9381[_0x5c7807(0x1df)]&&_0x238a46[_0x5c7807(0x1db)]({'code':_0x5c7807(0x1c9),'message':_0x5c7807(0x1bc),'path':[_0x5c7807(0x1df)]}),!_0x4a9381[_0x5c7807(0x1f3)]&&_0x238a46[_0x5c7807(0x1db)]({'code':'custom','message':_0x5c7807(0x1ea),'path':[_0x5c7807(0x1f3)]}));});export const ArrayMatchingSchema=z[a163_0x255e35(0x1d9)]([z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1d4)),z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1b5)),z['object']({'atLeast':z[a163_0x255e35(0x1da)]()}),z['object']({'atMost':z[a163_0x255e35(0x1da)]()}),z[a163_0x255e35(0x1bf)]({'exactly':z[a163_0x255e35(0x1da)]()})]);export const AggregationDefSchema=z[a163_0x255e35(0x1f5)](a163_0x255e35(0x1e9),[z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1d7)]([a163_0x255e35(0x1f4),a163_0x255e35(0x1d5),a163_0x255e35(0x1b8),'Average']),'column':z[a163_0x255e35(0x1bb)](),'groupingColumns':z[a163_0x255e35(0x1ac)](z['string']())[a163_0x255e35(0x1b6)]()}),z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1ba)),'groupingColumns':z['array'](z[a163_0x255e35(0x1bb)]())[a163_0x255e35(0x1b6)]()}),z['object']({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1de)),'columns':z[a163_0x255e35(0x1ac)](z[a163_0x255e35(0x1bb)]())}),z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1d7)]([a163_0x255e35(0x1be),a163_0x255e35(0x1d3)]),'column':z['string'](),'orderColumn':z[a163_0x255e35(0x1bb)](),'groupingColumns':z[a163_0x255e35(0x1ac)](z['string']())[a163_0x255e35(0x1b6)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a163_0x255e35(0x1da)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a163_0x255e35(0x1c0),a163_0x255e35(0x1ca),a163_0x255e35(0x1d1)]);export const FilterColumnConditionDefSchema=z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1bd)),'column':z[a163_0x255e35(0x1bb)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x428ab2,_0x56d133)=>{const _0x290480=a163_0x255e35,_0x2d8194=_0x428ab2[_0x290480(0x1c5)][_0x290480(0x1e9)];_0x428ab2[_0x290480(0x1ee)]===_0x290480(0x1f1)?!TIMESTAMP_OPERATORS[_0x290480(0x1d2)](_0x2d8194)&&_0x56d133[_0x290480(0x1db)]({'code':_0x290480(0x1c9),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x2d8194+'\x27)','path':['operator',_0x290480(0x1e9)]}):TIMESTAMP_OPERATORS['has'](_0x2d8194)&&_0x56d133[_0x290480(0x1db)]({'code':_0x290480(0x1c9),'message':'Operator\x20\x27'+_0x2d8194+_0x290480(0x1e3),'path':[_0x290480(0x1c5),_0x290480(0x1e9)]});});export const FilterRuleDefSchema=z[a163_0x255e35(0x1bf)]({'type':z['literal'](a163_0x255e35(0x1c2)),'conditions':z[a163_0x255e35(0x1ac)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a163_0x255e35(0x1e5)](()=>z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1e6)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x255e35(0x1b6)](),'exclude':z[a163_0x255e35(0x1c3)]()[a163_0x255e35(0x1b6)](),'aggregation':AggregationDefSchema[a163_0x255e35(0x1b6)](),'source':z[a163_0x255e35(0x1bb)]()[a163_0x255e35(0x1b6)](),'filter':FilterRuleDefSchema[a163_0x255e35(0x1b6)](),'limit':z[a163_0x255e35(0x1da)]()[a163_0x255e35(0x1b6)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1cd)),'attribute':z[a163_0x255e35(0x1bb)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x255e35(0x1b6)](),'exclude':z[a163_0x255e35(0x1c3)]()['optional'](),'aggregation':AggregationDefSchema[a163_0x255e35(0x1b6)](),'source':z[a163_0x255e35(0x1bb)]()[a163_0x255e35(0x1b6)](),'filter':FilterRuleDefSchema[a163_0x255e35(0x1b6)](),'timeWindow':TimeWindowDefSchema[a163_0x255e35(0x1b6)](),'limit':z[a163_0x255e35(0x1da)]()[a163_0x255e35(0x1b6)]()}));export const ColumnConditionDefSchema=z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1bd)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a163_0x255e35(0x1e5)](()=>z['object']({'type':z[a163_0x255e35(0x1d7)]([a163_0x255e35(0x1c2),'Or']),'conditions':z[a163_0x255e35(0x1ac)](ConditionDefSchema),'description':z['string']()[a163_0x255e35(0x1b6)]()}));export const SegmentRefConditionDefSchema=z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1d7)]([a163_0x255e35(0x1f6),'exclude']),'segment':z[a163_0x255e35(0x1bb)]()['min'](0x1,a163_0x255e35(0x1e1))});export const ConditionDefSchema=z[a163_0x255e35(0x1e5)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a163_0x255e35(0x1e5)](()=>z['object']({'type':z[a163_0x255e35(0x1d7)]([a163_0x255e35(0x1c2),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a163_0x255e35(0x1bb)]()[a163_0x255e35(0x1b6)]()}));function a163_0x108f(){const _0x3c79b5=['max','Segment\x20reference\x20must\x20not\x20be\x20empty','Regexp','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Between','lazy','Value','StartWith','4897968qQFzJr','type','TimeRange\x20operator\x20requires\x20\x27from\x27','hour','80mGGmRH','EndWith','column','304550PIKYdu','MISSING_BETWEEN_BOUNDS','timestamp','segment','from','Sum','discriminatedUnion','include','3CWRute','\x27\x20requires\x20a\x20value','Contain','array','superRefine','\x27\x20requires\x20a\x20time\x20unit','Less','Operator\x20\x27','196tjtwtH','3201011hfikTO','50LfleEx','funnel_stage','all','optional','unit','Max','GreaterEqual','Count','string','TimeRange\x20operator\x20requires\x20\x27duration\x27','Column','First','object','TimeWithinPast','510882RnImZo','And','boolean','year','operator','Average','min','LessEqual','custom','TimeWithinNext','value','147534gHUiES','Behavior','week','literal','1247074iifMuA','TimeRange','has','Last','any','Min','Equal','enum','7084107SnNVCV','union','number','addIssue','minute','record','CountDistinct','duration'];a163_0x108f=function(){return _0x3c79b5;};return a163_0x108f();}export const SegmentDefSchema=z[a163_0x255e35(0x1bf)]({'type':z[a163_0x255e35(0x1cf)](a163_0x255e35(0x1f2))[a163_0x255e35(0x1b6)](),'name':z['string']()[a163_0x255e35(0x1c7)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a163_0x255e35(0x1bb)]()['optional'](),'folder':z[a163_0x255e35(0x1bb)]()[a163_0x255e35(0x1b6)](),'rule':RuleDefSchema[a163_0x255e35(0x1b6)](),'kind':z[a163_0x255e35(0x1d7)](['batch','realtime',a163_0x255e35(0x1b4)])[a163_0x255e35(0x1b6)](),'visible':z['boolean']()[a163_0x255e35(0x1b6)](),'activations':z[a163_0x255e35(0x1ac)](z[a163_0x255e35(0x1d4)]())[a163_0x255e35(0x1b6)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x4c9666=a165_0x4fca;(function(_0x4390c4,_0x161241){const _0x183f84=a165_0x4fca,_0x1c17a2=_0x4390c4();while(!![]){try{const _0x3a8c7f=parseInt(_0x183f84(0x186))/0x1+parseInt(_0x183f84(0x180))/0x2+parseInt(_0x183f84(0x185))/0x3*(-parseInt(_0x183f84(0x177))/0x4)+-parseInt(_0x183f84(0x178))/0x5+-parseInt(_0x183f84(0x175))/0x6*(parseInt(_0x183f84(0x184))/0x7)+-parseInt(_0x183f84(0x17b))/0x8*(parseInt(_0x183f84(0x170))/0x9)+parseInt(_0x183f84(0x172))/0xa*(parseInt(_0x183f84(0x171))/0xb);if(_0x3a8c7f===_0x161241)break;else _0x1c17a2['push'](_0x1c17a2['shift']());}catch(_0x1590fa){_0x1c17a2['push'](_0x1c17a2['shift']());}}}(a165_0x37a4,0x9d53a));import{readFileSync}from'fs';import*as a165_0x972da6 from'path';import*as a165_0x11b828 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';function a165_0x4fca(_0x527f18,_0x4f1be2){_0x527f18=_0x527f18-0x169;const _0x37a4a5=a165_0x37a4();let _0x4fca9e=_0x37a4a5[_0x527f18];return _0x4fca9e;}import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x4c9666(0x17a),a165_0x4c9666(0x16a)]);export function isJourneyDef(_0xa8e60c){const _0x35201e=a165_0x4c9666;return typeof _0xa8e60c===_0x35201e(0x16b)&&_0xa8e60c!==null&&_0x35201e(0x16d)in _0xa8e60c&&_0xa8e60c[_0x35201e(0x16d)]===_0x35201e(0x176);}export function isCampaignDef(_0x105cf2){const _0x40168f=a165_0x4c9666;if(typeof _0x105cf2!=='object'||_0x105cf2===null)return![];const _0x68a6cd=_0x105cf2,_0xc685a8=VALID_CAMPAIGN_TYPES[_0x40168f(0x182)](_0x68a6cd[_0x40168f(0x183)]);if(_0x68a6cd[_0x40168f(0x16d)]===_0x40168f(0x174)&&_0xc685a8)return!![];if(_0xc685a8&&!_0x68a6cd['type'])return!![];return![];}export function isTemplateDef(_0x4ed322){const _0x429bdd=a165_0x4c9666;return typeof _0x4ed322===_0x429bdd(0x16b)&&_0x4ed322!==null&&_0x429bdd(0x16d)in _0x4ed322&&_0x4ed322[_0x429bdd(0x16d)]===_0x429bdd(0x169);}export function isValidationResult(_0x4e8f30){const _0x44b405=a165_0x4c9666;return!(_0x44b405(0x16c)in _0x4e8f30);}function a165_0x37a4(){const _0x1a4511=['basename','67023YHZrQh','561pWLAjY','46710RcuyPE','warnings','campaign','10698CDEWlg','journey','228412CyXgND','888490pfOdAD','map','email','416BtGPOY','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','result','toJSON','YAML\x20parse\x20error:\x20','1288972NZAyzC','YAML_PARSE_ERROR','has','campaign_type','2891wvzcsi','3ejfymx','1120127GmtkCC','error','length','template','push','object','skipped','type','segment'];a165_0x37a4=function(){return _0x1a4511;};return a165_0x37a4();}export function createParseErrorResult(_0x58a11a,_0x69e9fa,_0x3e9890,_0x77ab04,_0x9ac234='segment'){const _0x3f35a=a165_0x4c9666;return{'filePath':_0x58a11a,'relativePath':_0x69e9fa,'source':_0x3e9890,'result':{'valid':![],'errors':[{'level':_0x3f35a(0x187),'path':'','code':_0x3f35a(0x181),'message':_0x77ab04}],'warnings':[]},'fileType':_0x9ac234};}export function validateYamlFile(_0x59bbb2,_0x243961,_0x185623={}){const _0xe5d98b=a165_0x4c9666,_0x5c0ea0=a165_0x972da6['relative'](_0x243961,_0x59bbb2)||a165_0x972da6[_0xe5d98b(0x16f)](_0x59bbb2);try{const _0x2822b6=readFileSync(_0x59bbb2,'utf-8'),_0x373bba=a165_0x11b828['parseDocument'](_0x2822b6),_0x36e265=_0x373bba[_0xe5d98b(0x17e)]();if(!_0x36e265)return createParseErrorResult(_0x59bbb2,_0x5c0ea0,_0x2822b6,_0xe5d98b(0x17c));let _0x1534de;if(isJourneyDef(_0x36e265))_0x1534de=_0xe5d98b(0x176);else{if(isCampaignDef(_0x36e265))_0x1534de=_0xe5d98b(0x174);else isTemplateDef(_0x36e265)?_0x1534de='template':_0x1534de=_0xe5d98b(0x16e);}if(_0x185623['filterType']&&_0x1534de!==_0x185623['filterType'])return{'filePath':_0x59bbb2,'relativePath':_0x5c0ea0,'skipped':!![],'reason':'not\x20a\x20'+_0x185623['filterType']};const _0x17ece2={'source':_0x2822b6,'document':_0x373bba};let _0x187ebb;if(_0x1534de===_0xe5d98b(0x176))_0x187ebb=validateJourneyDef(_0x36e265,_0x17ece2);else{if(_0x1534de===_0xe5d98b(0x174))_0x187ebb=validateCampaignDef(_0x36e265,_0x17ece2);else _0x1534de==='template'?_0x187ebb=validateTemplateDef(_0x36e265,_0x17ece2):_0x187ebb=validateSegmentDef(_0x36e265,_0x17ece2);}return{'filePath':_0x59bbb2,'relativePath':_0x5c0ea0,'source':_0x2822b6,'result':_0x187ebb,'fileType':_0x1534de};}catch(_0x463156){const _0xcda25f=_0x463156 instanceof Error?_0x463156['message']:String(_0x463156);return createParseErrorResult(_0x59bbb2,_0x5c0ea0,'',_0xe5d98b(0x17f)+_0xcda25f);}}export function validateYamlFiles(_0x24a628,_0x388999,_0x17fba0={}){const _0x318868=a165_0x4c9666;return _0x24a628[_0x318868(0x179)](_0x477b0b=>validateYamlFile(_0x477b0b,_0x388999,_0x17fba0));}export function calculateSummary(_0x5f5a3b){const _0x1e8884=a165_0x4c9666;let _0x3819ef=0x0,_0x15ef99=0x0,_0x234b1a=0x0,_0x464e9a=0x0;for(const _0x41c244 of _0x5f5a3b){if(!isValidationResult(_0x41c244)){_0x464e9a++;continue;}_0x41c244[_0x1e8884(0x17d)]['valid']?_0x3819ef++:_0x15ef99++,_0x234b1a+=_0x41c244[_0x1e8884(0x17d)][_0x1e8884(0x173)][_0x1e8884(0x188)];}return{'validCount':_0x3819ef,'invalidCount':_0x15ef99,'warningCount':_0x234b1a,'skippedCount':_0x464e9a,'hasErrors':_0x15ef99>0x0};}
1
+ const a164_0x31d6f3=a164_0x2667;(function(_0xfaf0e2,_0x379d64){const _0x13398b=a164_0x2667,_0x587e58=_0xfaf0e2();while(!![]){try{const _0x504f1f=parseInt(_0x13398b(0xe2))/0x1+-parseInt(_0x13398b(0xfa))/0x2+parseInt(_0x13398b(0xfc))/0x3*(parseInt(_0x13398b(0xe4))/0x4)+parseInt(_0x13398b(0x102))/0x5*(parseInt(_0x13398b(0xee))/0x6)+parseInt(_0x13398b(0x100))/0x7*(-parseInt(_0x13398b(0xf0))/0x8)+-parseInt(_0x13398b(0xe3))/0x9*(parseInt(_0x13398b(0xf2))/0xa)+-parseInt(_0x13398b(0xf9))/0xb;if(_0x504f1f===_0x379d64)break;else _0x587e58['push'](_0x587e58['shift']());}catch(_0x15b868){_0x587e58['push'](_0x587e58['shift']());}}}(a164_0x8caa,0xa6e6c));import{readFileSync}from'fs';import*as a164_0x1ef9cf from'path';import*as a164_0xd68b5e 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';const VALID_CAMPAIGN_TYPES=new Set([a164_0x31d6f3(0xe0),a164_0x31d6f3(0xf4)]);function a164_0x2667(_0x3f14c5,_0x5730cb){_0x3f14c5=_0x3f14c5-0xdd;const _0x8caaf1=a164_0x8caa();let _0x26676f=_0x8caaf1[_0x3f14c5];return _0x26676f;}export function isJourneyDef(_0x1bd62d){const _0x531467=a164_0x31d6f3;return typeof _0x1bd62d===_0x531467(0xe5)&&_0x1bd62d!==null&&_0x531467(0xec)in _0x1bd62d&&_0x1bd62d[_0x531467(0xec)]===_0x531467(0xfe);}export function isCampaignDef(_0x4bc41a){const _0x55587d=a164_0x31d6f3;if(typeof _0x4bc41a!=='object'||_0x4bc41a===null)return![];const _0x5758cc=_0x4bc41a,_0x753668=VALID_CAMPAIGN_TYPES[_0x55587d(0xf1)](_0x5758cc[_0x55587d(0xf6)]);if(_0x5758cc['type']===_0x55587d(0xf5)&&_0x753668)return!![];if(_0x753668&&!_0x5758cc['type'])return!![];return![];}export function isTemplateDef(_0x566711){const _0x110739=a164_0x31d6f3;return typeof _0x566711===_0x110739(0xe5)&&_0x566711!==null&&_0x110739(0xec)in _0x566711&&_0x566711[_0x110739(0xec)]==='template';}export function isValidationResult(_0x1f87dd){const _0x37b9c1=a164_0x31d6f3;return!(_0x37b9c1(0xed)in _0x1f87dd);}function a164_0x8caa(){const _0x18f127=['result','type','skipped','1660566wVOamp','basename','6688232wFxCPF','has','819600IKrSea','template','push','campaign','campaign_type','utf-8','YAML_PARSE_ERROR','1681526IhbexB','470874gHZZvf','parseDocument','117TPxARe','segment','journey','filterType','7kXzfQX','toJSON','15xUHnWN','relative','not\x20a\x20','YAML\x20parse\x20error:\x20','email','length','13700yevxgl','9VeTqwQ','117532iVsxwN','object','map','valid','warnings','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','message'];a164_0x8caa=function(){return _0x18f127;};return a164_0x8caa();}export function createParseErrorResult(_0x34c944,_0x46d8fa,_0x441e9b,_0x6e5b0d,_0x4d762f=a164_0x31d6f3(0xfd)){const _0x4caeed=a164_0x31d6f3;return{'filePath':_0x34c944,'relativePath':_0x46d8fa,'source':_0x441e9b,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x4caeed(0xf8),'message':_0x6e5b0d}],'warnings':[]},'fileType':_0x4d762f};}export function validateYamlFile(_0x2a353c,_0x3dc5a4,_0x52c1c3={}){const _0xb7fb2e=a164_0x31d6f3,_0x477ff6=a164_0x1ef9cf[_0xb7fb2e(0xdd)](_0x3dc5a4,_0x2a353c)||a164_0x1ef9cf[_0xb7fb2e(0xef)](_0x2a353c);try{const _0x30a2de=readFileSync(_0x2a353c,_0xb7fb2e(0xf7)),_0x4abbe6=a164_0xd68b5e[_0xb7fb2e(0xfb)](_0x30a2de),_0xc963ef=_0x4abbe6[_0xb7fb2e(0x101)]();if(!_0xc963ef)return createParseErrorResult(_0x2a353c,_0x477ff6,_0x30a2de,_0xb7fb2e(0xe9));let _0x500bd0;if(isJourneyDef(_0xc963ef))_0x500bd0='journey';else{if(isCampaignDef(_0xc963ef))_0x500bd0=_0xb7fb2e(0xf5);else isTemplateDef(_0xc963ef)?_0x500bd0=_0xb7fb2e(0xf3):_0x500bd0=_0xb7fb2e(0xfd);}if(_0x52c1c3[_0xb7fb2e(0xff)]&&_0x500bd0!==_0x52c1c3[_0xb7fb2e(0xff)])return{'filePath':_0x2a353c,'relativePath':_0x477ff6,'skipped':!![],'reason':_0xb7fb2e(0xde)+_0x52c1c3[_0xb7fb2e(0xff)]};const _0x3d6fbd={'source':_0x30a2de,'document':_0x4abbe6};let _0x37bcaf;if(_0x500bd0==='journey')_0x37bcaf=validateJourneyDef(_0xc963ef,_0x3d6fbd);else{if(_0x500bd0===_0xb7fb2e(0xf5))_0x37bcaf=validateCampaignDef(_0xc963ef,_0x3d6fbd);else _0x500bd0===_0xb7fb2e(0xf3)?_0x37bcaf=validateTemplateDef(_0xc963ef,_0x3d6fbd):_0x37bcaf=validateSegmentDef(_0xc963ef,_0x3d6fbd);}return{'filePath':_0x2a353c,'relativePath':_0x477ff6,'source':_0x30a2de,'result':_0x37bcaf,'fileType':_0x500bd0};}catch(_0x2fa8e7){const _0x5665e3=_0x2fa8e7 instanceof Error?_0x2fa8e7[_0xb7fb2e(0xea)]:String(_0x2fa8e7);return createParseErrorResult(_0x2a353c,_0x477ff6,'',_0xb7fb2e(0xdf)+_0x5665e3);}}export function validateYamlFiles(_0x386158,_0x53239f,_0x47a164={}){const _0x125183=a164_0x31d6f3;return _0x386158[_0x125183(0xe6)](_0x13c094=>validateYamlFile(_0x13c094,_0x53239f,_0x47a164));}export function calculateSummary(_0x5584de){const _0x14ff3b=a164_0x31d6f3;let _0x1df6e8=0x0,_0x128371=0x0,_0x264fb7=0x0,_0x4dbcd1=0x0;for(const _0x5dc226 of _0x5584de){if(!isValidationResult(_0x5dc226)){_0x4dbcd1++;continue;}_0x5dc226[_0x14ff3b(0xeb)][_0x14ff3b(0xe7)]?_0x1df6e8++:_0x128371++,_0x264fb7+=_0x5dc226[_0x14ff3b(0xeb)][_0x14ff3b(0xe8)][_0x14ff3b(0xe1)];}return{'validCount':_0x1df6e8,'invalidCount':_0x128371,'warningCount':_0x264fb7,'skippedCount':_0x4dbcd1,'hasErrors':_0x128371>0x0};}
@@ -1 +1 @@
1
- function a166_0x247b(){const _0x41d151=['error','yellow','length','7kjjKha','column','2797936BVzfPc','issues','231524TbYlMi','match','cyan','YAML\x20validation\x20error\x20at\x20\x27','10120527eAsDoG','range','4044xgzmEL','errors','message','object','min','\x27:\x20','line','2445120OVzbvm','\x20|\x20','join','dim','1234956pZQatG','contents','path','Invalid\x20YAML:\x20expected\x20an\x20object','68079tSdJqE','level','7372704zPqOxt','YAML\x20validation\x20error:\x20','safeParse','red','6Fihcen','getIn','30EvRLnm','8uUePtE','pop','flatMap','push','code','invalid_union','location','success','max'];a166_0x247b=function(){return _0x41d151;};return a166_0x247b();}(function(_0x3f447e,_0xa5a1cb){const _0x432681=a166_0x50fb,_0x598ec2=_0x3f447e();while(!![]){try{const _0x193274=parseInt(_0x432681(0x171))/0x1*(-parseInt(_0x432681(0x181))/0x2)+parseInt(_0x432681(0x16e))/0x3*(parseInt(_0x432681(0x17f))/0x4)+-parseInt(_0x432681(0x170))/0x5*(parseInt(_0x432681(0x164))/0x6)+-parseInt(_0x432681(0x17d))/0x7*(-parseInt(_0x432681(0x16a))/0x8)+-parseInt(_0x432681(0x185))/0x9+-parseInt(_0x432681(0x160))/0xa+parseInt(_0x432681(0x168))/0xb*(parseInt(_0x432681(0x187))/0xc);if(_0x193274===_0xa5a1cb)break;else _0x598ec2['push'](_0x598ec2['shift']());}catch(_0x376e7c){_0x598ec2['push'](_0x598ec2['shift']());}}}(a166_0x247b,0xd5e96));import*as a166_0x17eb73 from'yaml';function a166_0x50fb(_0x342b56,_0x5f15b4){_0x342b56=_0x342b56-0x15a;const _0x247b38=a166_0x247b();let _0x50fb1a=_0x247b38[_0x342b56];return _0x50fb1a;}import a166_0x4d54b3 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x19583c,_0x1a697c,_0x5d1be9){const _0x346ef7=a166_0x50fb;if(!_0x19583c||!_0x1a697c)return undefined;try{let _0x330897=_0x19583c[_0x346ef7(0x16f)](_0x5d1be9,!![]),_0x399786=[..._0x5d1be9];while((!_0x330897||typeof _0x330897!==_0x346ef7(0x15c)||!(_0x346ef7(0x186)in _0x330897)||!_0x330897[_0x346ef7(0x186)])&&_0x399786[_0x346ef7(0x17c)]>0x0){_0x399786[_0x346ef7(0x172)](),_0x330897=_0x399786['length']>0x0?_0x19583c[_0x346ef7(0x16f)](_0x399786,!![]):_0x19583c[_0x346ef7(0x165)];}if(!_0x330897||typeof _0x330897!==_0x346ef7(0x15c)||!(_0x346ef7(0x186)in _0x330897)||!_0x330897[_0x346ef7(0x186)])return undefined;const [_0x3fdaf3]=_0x330897[_0x346ef7(0x186)];return offsetToLocation(_0x1a697c,_0x3fdaf3);}catch{return undefined;}}export function offsetToLocation(_0xb54efe,_0x3eb531){let _0x37ff49=0x1,_0x5c01ce=0x1;for(let _0x3b2268=0x0;_0x3b2268<_0x3eb531&&_0x3b2268<_0xb54efe['length'];_0x3b2268++){_0xb54efe[_0x3b2268]==='\x0a'?(_0x37ff49++,_0x5c01ce=0x1):_0x5c01ce++;}return{'line':_0x37ff49,'column':_0x5c01ce,'offset':_0x3eb531};}export function pathToArray(_0x2a66b7){const _0x1d0522=a166_0x50fb;if(!_0x2a66b7)return[];return _0x2a66b7['split']('.')[_0x1d0522(0x173)](_0x5c5a7b=>{const _0x4612f9=_0x1d0522,_0x24994e=_0x5c5a7b[_0x4612f9(0x182)](/^(\w+)\[(\d+)\]$/);if(_0x24994e)return[_0x24994e[0x1],parseInt(_0x24994e[0x2],0xa)];return[_0x5c5a7b];});}export function formatZodPath(_0x15ae75){let _0x230978='';for(const _0x134651 of _0x15ae75){if(typeof _0x134651==='number')_0x230978+='['+_0x134651+']';else{const _0x2ac322=String(_0x134651);_0x230978+=_0x230978?'.'+_0x2ac322:_0x2ac322;}}return _0x230978;}export function flattenZodIssues(_0x26499f){const _0x24a523=a166_0x50fb,_0x3222d8=[];for(const _0x3b7964 of _0x26499f){if(_0x3b7964[_0x24a523(0x175)]===_0x24a523(0x176)&&_0x24a523(0x15a)in _0x3b7964){const _0x455f99=_0x3b7964[_0x24a523(0x15a)];let _0xa53fd6=_0x455f99[0x0]||[];for(const _0x5e90d3 of _0x455f99){_0x5e90d3[_0x24a523(0x17c)]<_0xa53fd6['length']&&(_0xa53fd6=_0x5e90d3);}const _0x2a1193=_0xa53fd6['map'](_0x16156f=>({..._0x16156f,'path':[..._0x3b7964[_0x24a523(0x166)],..._0x16156f[_0x24a523(0x166)]]}));_0x3222d8[_0x24a523(0x174)](...flattenZodIssues(_0x2a1193));}else _0x3222d8['push'](_0x3b7964);}return _0x3222d8;}export function safeParseYaml(_0x493cff,_0x10a2ed){const _0x589af9=a166_0x50fb,_0x3276cb=a166_0x17eb73['parse'](_0x493cff);if(!_0x3276cb||typeof _0x3276cb!==_0x589af9(0x15c))throw new Error(_0x589af9(0x167));const _0x1bee84=_0x10a2ed[_0x589af9(0x16c)](_0x3276cb);if(!_0x1bee84[_0x589af9(0x178)]){const _0x4e1604=_0x1bee84[_0x589af9(0x17a)][_0x589af9(0x180)][0x0],_0x39cf53=formatZodPath(_0x4e1604['path']);throw new Error(_0x39cf53?_0x589af9(0x184)+_0x39cf53+_0x589af9(0x15e)+_0x4e1604[_0x589af9(0x15b)]:_0x589af9(0x16b)+_0x4e1604[_0x589af9(0x15b)]);}return _0x1bee84['data'];}export function formatIssueWithContext(_0x273d18,_0x38d0f8,_0x1515e9){const _0x5683a2=a166_0x50fb,_0x5c5136=[],_0x636549=_0x273d18[_0x5683a2(0x169)]===_0x5683a2(0x17a),_0x10f438=_0x636549?a166_0x4d54b3[_0x5683a2(0x16d)]:a166_0x4d54b3[_0x5683a2(0x17b)],_0x1004f9=_0x636549?a166_0x4d54b3[_0x5683a2(0x16d)]:a166_0x4d54b3[_0x5683a2(0x17b)],_0x7ea38f=_0x1515e9?a166_0x4d54b3[_0x5683a2(0x183)](_0x1515e9+':'):'';if(_0x273d18['location']){const _0x5f297b=a166_0x4d54b3[_0x5683a2(0x183)](_0x273d18['location'][_0x5683a2(0x15f)]+':'+_0x273d18['location'][_0x5683a2(0x17e)]);_0x5c5136[_0x5683a2(0x174)](''+_0x7ea38f+_0x5f297b+':\x20'+_0x10f438(_0x273d18[_0x5683a2(0x169)])+'\x20'+_0x1004f9('['+_0x273d18[_0x5683a2(0x175)]+']'));}else _0x5c5136[_0x5683a2(0x174)](''+_0x7ea38f+a166_0x4d54b3[_0x5683a2(0x163)](_0x273d18[_0x5683a2(0x166)])+':\x20'+_0x10f438(_0x273d18[_0x5683a2(0x169)])+'\x20'+_0x1004f9('['+_0x273d18[_0x5683a2(0x175)]+']'));_0x5c5136[_0x5683a2(0x174)](_0x273d18['message']);if(_0x273d18['location']&&_0x38d0f8){const _0x40347c=_0x38d0f8['split']('\x0a'),{line:_0x224426,column:_0x141b7e}=_0x273d18[_0x5683a2(0x177)],_0x343b80=Math[_0x5683a2(0x179)](0x1,_0x224426-0x1),_0x4a2334=Math[_0x5683a2(0x15d)](_0x40347c['length'],_0x224426+0x1);_0x5c5136[_0x5683a2(0x174)]('');for(let _0x105f0e=_0x343b80;_0x105f0e<=_0x4a2334;_0x105f0e++){const _0x10793a=_0x40347c[_0x105f0e-0x1]||'',_0x2ed353=a166_0x4d54b3[_0x5683a2(0x163)](_0x105f0e['toString']()['padStart'](0x4)),_0x560bfa=a166_0x4d54b3[_0x5683a2(0x163)](_0x5683a2(0x161));if(_0x105f0e===_0x224426){_0x5c5136[_0x5683a2(0x174)]('\x20\x20'+_0x2ed353+_0x560bfa+_0x10f438(_0x10793a));const _0x2da6b0='\x20'['repeat'](0x4+0x3+_0x141b7e-0x1);_0x5c5136[_0x5683a2(0x174)]('\x20\x20'+_0x2da6b0+_0x10f438('^'));}else _0x5c5136[_0x5683a2(0x174)]('\x20\x20'+_0x2ed353+_0x560bfa+a166_0x4d54b3[_0x5683a2(0x163)](_0x10793a));}}return _0x5c5136[_0x5683a2(0x162)]('\x0a');}export function formatValidationResult(_0x24fb21,_0x2e4706,_0x4ffc52){const _0x1ba079=a166_0x50fb,_0x2fc697=[];for(const _0x164c80 of _0x24fb21[_0x1ba079(0x15a)]){_0x2fc697[_0x1ba079(0x174)](formatIssueWithContext(_0x164c80,_0x2e4706,_0x4ffc52)),_0x2fc697[_0x1ba079(0x174)]('');}for(const _0xde996 of _0x24fb21['warnings']){_0x2fc697['push'](formatIssueWithContext(_0xde996,_0x2e4706,_0x4ffc52)),_0x2fc697[_0x1ba079(0x174)]('');}return _0x2fc697['join']('\x0a');}
1
+ (function(_0x4fd3d3,_0xf08cfc){const _0x4ab04c=a165_0x3570,_0x1b041e=_0x4fd3d3();while(!![]){try{const _0x3120cc=parseInt(_0x4ab04c(0x1be))/0x1*(parseInt(_0x4ab04c(0x1c3))/0x2)+parseInt(_0x4ab04c(0x1d4))/0x3+-parseInt(_0x4ab04c(0x1b6))/0x4*(parseInt(_0x4ab04c(0x1b7))/0x5)+parseInt(_0x4ab04c(0x1bf))/0x6*(parseInt(_0x4ab04c(0x1cb))/0x7)+parseInt(_0x4ab04c(0x1c9))/0x8+-parseInt(_0x4ab04c(0x1c0))/0x9+-parseInt(_0x4ab04c(0x1b5))/0xa;if(_0x3120cc===_0xf08cfc)break;else _0x1b041e['push'](_0x1b041e['shift']());}catch(_0x451203){_0x1b041e['push'](_0x1b041e['shift']());}}}(a165_0x1a24,0x9ad48));import*as a165_0x1f9979 from'yaml';function a165_0x3570(_0x4ed873,_0x154b6d){_0x4ed873=_0x4ed873-0x1b1;const _0x1a2428=a165_0x1a24();let _0x3570f7=_0x1a2428[_0x4ed873];return _0x3570f7;}import a165_0x3b4e09 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x39bac3,_0x4b7b3c,_0x277faa){const _0x2560cf=a165_0x3570;if(!_0x39bac3||!_0x4b7b3c)return undefined;try{let _0x5221b1=_0x39bac3[_0x2560cf(0x1cc)](_0x277faa,!![]),_0x2bc801=[..._0x277faa];while((!_0x5221b1||typeof _0x5221b1!=='object'||!(_0x2560cf(0x1d1)in _0x5221b1)||!_0x5221b1[_0x2560cf(0x1d1)])&&_0x2bc801[_0x2560cf(0x1c5)]>0x0){_0x2bc801[_0x2560cf(0x1b4)](),_0x5221b1=_0x2bc801[_0x2560cf(0x1c5)]>0x0?_0x39bac3[_0x2560cf(0x1cc)](_0x2bc801,!![]):_0x39bac3[_0x2560cf(0x1d3)];}if(!_0x5221b1||typeof _0x5221b1!=='object'||!(_0x2560cf(0x1d1)in _0x5221b1)||!_0x5221b1[_0x2560cf(0x1d1)])return undefined;const [_0x5e09c5]=_0x5221b1[_0x2560cf(0x1d1)];return offsetToLocation(_0x4b7b3c,_0x5e09c5);}catch{return undefined;}}export function offsetToLocation(_0x5ca961,_0x40b289){const _0x4dcf98=a165_0x3570;let _0x2e46a5=0x1,_0x3fb74d=0x1;for(let _0x56541d=0x0;_0x56541d<_0x40b289&&_0x56541d<_0x5ca961[_0x4dcf98(0x1c5)];_0x56541d++){_0x5ca961[_0x56541d]==='\x0a'?(_0x2e46a5++,_0x3fb74d=0x1):_0x3fb74d++;}return{'line':_0x2e46a5,'column':_0x3fb74d,'offset':_0x40b289};}export function pathToArray(_0x29d5a7){const _0x4d1501=a165_0x3570;if(!_0x29d5a7)return[];return _0x29d5a7['split']('.')[_0x4d1501(0x1cd)](_0x2ebbf9=>{const _0x3138af=_0x4d1501,_0x1c78a2=_0x2ebbf9[_0x3138af(0x1b8)](/^(\w+)\[(\d+)\]$/);if(_0x1c78a2)return[_0x1c78a2[0x1],parseInt(_0x1c78a2[0x2],0xa)];return[_0x2ebbf9];});}export function formatZodPath(_0x370307){const _0x2af4f8=a165_0x3570;let _0x569d00='';for(const _0xd4dbbf of _0x370307){if(typeof _0xd4dbbf===_0x2af4f8(0x1db))_0x569d00+='['+_0xd4dbbf+']';else{const _0x484665=String(_0xd4dbbf);_0x569d00+=_0x569d00?'.'+_0x484665:_0x484665;}}return _0x569d00;}export function flattenZodIssues(_0x1969c0){const _0x3acac8=a165_0x3570,_0x46b9b4=[];for(const _0x58f171 of _0x1969c0){if(_0x58f171['code']==='invalid_union'&&_0x3acac8(0x1d7)in _0x58f171){const _0x5820a9=_0x58f171[_0x3acac8(0x1d7)];let _0x5a6412=_0x5820a9[0x0]||[];for(const _0x4cde60 of _0x5820a9){_0x4cde60['length']<_0x5a6412['length']&&(_0x5a6412=_0x4cde60);}const _0x1fab20=_0x5a6412[_0x3acac8(0x1bb)](_0x1a05de=>({..._0x1a05de,'path':[..._0x58f171[_0x3acac8(0x1c8)],..._0x1a05de[_0x3acac8(0x1c8)]]}));_0x46b9b4[_0x3acac8(0x1d8)](...flattenZodIssues(_0x1fab20));}else _0x46b9b4['push'](_0x58f171);}return _0x46b9b4;}export function safeParseYaml(_0x41074a,_0x4dd9f1){const _0x2139f5=a165_0x3570,_0x470e45=a165_0x1f9979[_0x2139f5(0x1c7)](_0x41074a);if(!_0x470e45||typeof _0x470e45!==_0x2139f5(0x1c1))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x44a283=_0x4dd9f1[_0x2139f5(0x1dd)](_0x470e45);if(!_0x44a283[_0x2139f5(0x1c6)]){const _0x454ba9=_0x44a283[_0x2139f5(0x1ca)]['issues'][0x0],_0x4b8833=formatZodPath(_0x454ba9[_0x2139f5(0x1c8)]);throw new Error(_0x4b8833?_0x2139f5(0x1b2)+_0x4b8833+'\x27:\x20'+_0x454ba9[_0x2139f5(0x1b3)]:_0x2139f5(0x1de)+_0x454ba9[_0x2139f5(0x1b3)]);}return _0x44a283[_0x2139f5(0x1ba)];}export function formatIssueWithContext(_0x3cc891,_0x33ab23,_0x1590d3){const _0x853cef=a165_0x3570,_0x5c698a=[],_0x2e5c73=_0x3cc891['level']===_0x853cef(0x1ca),_0x61b9fc=_0x2e5c73?a165_0x3b4e09[_0x853cef(0x1d2)]:a165_0x3b4e09[_0x853cef(0x1cf)],_0x12e124=_0x2e5c73?a165_0x3b4e09[_0x853cef(0x1d2)]:a165_0x3b4e09[_0x853cef(0x1cf)],_0x490775=_0x1590d3?a165_0x3b4e09[_0x853cef(0x1c2)](_0x1590d3+':'):'';if(_0x3cc891[_0x853cef(0x1bc)]){const _0x56d933=a165_0x3b4e09[_0x853cef(0x1c2)](_0x3cc891['location'][_0x853cef(0x1d5)]+':'+_0x3cc891['location'][_0x853cef(0x1b9)]);_0x5c698a['push'](''+_0x490775+_0x56d933+':\x20'+_0x61b9fc(_0x3cc891[_0x853cef(0x1b1)])+'\x20'+_0x12e124('['+_0x3cc891[_0x853cef(0x1bd)]+']'));}else _0x5c698a[_0x853cef(0x1d8)](''+_0x490775+a165_0x3b4e09['dim'](_0x3cc891[_0x853cef(0x1c8)])+':\x20'+_0x61b9fc(_0x3cc891[_0x853cef(0x1b1)])+'\x20'+_0x12e124('['+_0x3cc891[_0x853cef(0x1bd)]+']'));_0x5c698a['push'](_0x3cc891[_0x853cef(0x1b3)]);if(_0x3cc891['location']&&_0x33ab23){const _0x45a1ea=_0x33ab23['split']('\x0a'),{line:_0x443eab,column:_0x18d702}=_0x3cc891[_0x853cef(0x1bc)],_0xf12728=Math[_0x853cef(0x1d9)](0x1,_0x443eab-0x1),_0x32a6d8=Math['min'](_0x45a1ea[_0x853cef(0x1c5)],_0x443eab+0x1);_0x5c698a[_0x853cef(0x1d8)]('');for(let _0xd38d58=_0xf12728;_0xd38d58<=_0x32a6d8;_0xd38d58++){const _0x3197e1=_0x45a1ea[_0xd38d58-0x1]||'',_0xb43456=a165_0x3b4e09['dim'](_0xd38d58[_0x853cef(0x1ce)]()[_0x853cef(0x1dc)](0x4)),_0x3ee523=a165_0x3b4e09['dim'](_0x853cef(0x1c4));if(_0xd38d58===_0x443eab){_0x5c698a['push']('\x20\x20'+_0xb43456+_0x3ee523+_0x61b9fc(_0x3197e1));const _0x25ddf7='\x20'[_0x853cef(0x1da)](0x4+0x3+_0x18d702-0x1);_0x5c698a[_0x853cef(0x1d8)]('\x20\x20'+_0x25ddf7+_0x61b9fc('^'));}else _0x5c698a[_0x853cef(0x1d8)]('\x20\x20'+_0xb43456+_0x3ee523+a165_0x3b4e09[_0x853cef(0x1d0)](_0x3197e1));}}return _0x5c698a[_0x853cef(0x1d6)]('\x0a');}function a165_0x1a24(){const _0x10fee4=['7mFkreT','getIn','flatMap','toString','yellow','dim','range','red','contents','3140076ttXCHP','line','join','errors','push','max','repeat','number','padStart','safeParse','YAML\x20validation\x20error:\x20','level','YAML\x20validation\x20error\x20at\x20\x27','message','pop','8813470OlddYe','16xvrrHN','516270lbVpkb','match','column','data','map','location','code','7sOKCNx','2893152ZbRqDY','7975260hYdull','object','cyan','173876Pzerls','\x20|\x20','length','success','parse','path','5417896GWPkMq','error'];a165_0x1a24=function(){return _0x10fee4;};return a165_0x1a24();}export function formatValidationResult(_0x547db6,_0x239288,_0x41e06f){const _0xcdcabe=a165_0x3570,_0x5d3885=[];for(const _0x1c1e8d of _0x547db6['errors']){_0x5d3885[_0xcdcabe(0x1d8)](formatIssueWithContext(_0x1c1e8d,_0x239288,_0x41e06f)),_0x5d3885[_0xcdcabe(0x1d8)]('');}for(const _0x77c354 of _0x547db6['warnings']){_0x5d3885['push'](formatIssueWithContext(_0x77c354,_0x239288,_0x41e06f)),_0x5d3885[_0xcdcabe(0x1d8)]('');}return _0x5d3885['join']('\x0a');}