@treasuredata/tdx 2026.4.12 → 2026.4.13

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 (220) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2506d7,_0xcbb1a0){const _0x35446e=a156_0x5970,_0x86b5b6=_0x2506d7();while(!![]){try{const _0x11fa72=-parseInt(_0x35446e(0xec))/0x1*(-parseInt(_0x35446e(0xd7))/0x2)+-parseInt(_0x35446e(0x10b))/0x3+parseInt(_0x35446e(0xf3))/0x4+parseInt(_0x35446e(0x10a))/0x5*(parseInt(_0x35446e(0x115))/0x6)+-parseInt(_0x35446e(0x11a))/0x7*(parseInt(_0x35446e(0xf9))/0x8)+parseInt(_0x35446e(0xeb))/0x9+-parseInt(_0x35446e(0xf7))/0xa;if(_0x11fa72===_0xcbb1a0)break;else _0x86b5b6['push'](_0x86b5b6['shift']());}catch(_0x356157){_0x86b5b6['push'](_0x86b5b6['shift']());}}}(a156_0x2160,0x18d05));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a156_0x2160(){const _0x4e0555=['Attribute\x20\x27','\x27\x20with\x20attribute\x20\x27','warning','rule','MISSING_OPERATOR_VALUE','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','MISSING_TIME_UNIT','.operator.value','.source','NESTED_CONDITION_GROUP','INVALID_RULE_TYPE','safeParse','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','symbol','INVALID_OPERATOR_TYPE','1154349tvEioU','981wGUtAf','MISSING_BETWEEN_BOUNDS','custom','arrayMatching','Behavior','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','.conditions[','115988COhjJz','source','success','.conditions','2521330UaxFHW','MISSING_CONDITIONS','8luUHfo','filter','.segment','skipSchema','data','map','.type','code','BEHAVIOR_SOURCE_MISSING_FILTER','conditions','INVALID_ARRAY_MATCHING','push','Behavior\x20source\x20\x27','includes','type','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','path','5BmiKPt','163611POtMqk','.attribute','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','rule.type','Attribute\x20name\x20cannot\x20be\x20empty','EMPTY_ATTRIBUTE','document','message','level','endsWith','632118rsnaci','description','aggregation','invalid_value','.filter','387863OdhAdQ','And','name','attribute','error','validationCode','410hRFKIZ','length','Value'];a156_0x2160=function(){return _0x4e0555;};return a156_0x2160();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0xe94ce5,_0x594d67={},_0x1af7cb={}){const _0x53af68=a156_0x5970;if(_0x1af7cb[_0x53af68(0xfc)])return runSemanticChecks(_0xe94ce5,_0x594d67);const _0x2777bb=SegmentDefSchema[_0x53af68(0xe7)](_0xe94ce5);if(_0x2777bb[_0x53af68(0xf5)])return runSemanticChecks(_0x2777bb['data'],_0x594d67);return zodErrorsToValidationResult(_0x2777bb[_0x53af68(0xd5)],_0x594d67);}export function validateRuleDef(_0xea4bea,_0x4031b9,_0x3219e9){const _0x1135a1=a156_0x5970;if(!_0xea4bea)return[];const _0x495573=RuleDefSchema['safeParse'](_0xea4bea);if(_0x495573['success'])return checkRule(_0x495573[_0x1135a1(0xfd)],_0x4031b9,_0x3219e9);const _0x283d72=flattenZodIssues(_0x495573['error']['issues']);return _0x283d72[_0x1135a1(0xfe)](_0x5d811e=>{const _0x4db2b2=_0x1135a1,_0x19cfe8=formatZodPath(_0x5d811e[_0x4db2b2(0x109)]),_0x1057e6=_0x19cfe8?_0x4031b9+'.'+_0x19cfe8:_0x4031b9,_0x1afb82=mapZodIssueToCode(_0x5d811e,_0x19cfe8),_0x534f43=getLocationFromPath(_0x3219e9['document'],_0x3219e9['source'],pathToArray(_0x1057e6));return{'level':_0x4db2b2(0xd5),'path':_0x1057e6,'code':_0x1afb82,'message':_0x5d811e[_0x4db2b2(0x112)],..._0x534f43&&{'location':_0x534f43}};});}function zodErrorsToValidationResult(_0x5bf32a,_0x3bb401){const _0x1b0abe=a156_0x5970,_0x3220b9=flattenZodIssues(_0x5bf32a['issues']),_0x12af75=_0x3220b9[_0x1b0abe(0xfe)](_0x395a7f=>{const _0x3e8f28=_0x1b0abe,_0x3255a2=formatZodPath(_0x395a7f['path']),_0xc15d7b=mapZodIssueToCode(_0x395a7f,_0x3255a2),_0x2f2022=getLocationFromPath(_0x3bb401[_0x3e8f28(0x111)],_0x3bb401[_0x3e8f28(0xf4)],_0x395a7f[_0x3e8f28(0x109)][_0x3e8f28(0xfe)](_0x21759c=>typeof _0x21759c===_0x3e8f28(0xe9)?String(_0x21759c):_0x21759c));return{'level':_0x3e8f28(0xd5),'path':_0x3255a2,'code':_0xc15d7b,'message':_0x395a7f[_0x3e8f28(0x112)],..._0x2f2022&&{'location':_0x2f2022}};});return{'valid':![],'errors':_0x12af75,'warnings':[]};}function a156_0x5970(_0x8ad27f,_0x305fb1){_0x8ad27f=_0x8ad27f-0xd2;const _0x216010=a156_0x2160();let _0x5970e4=_0x216010[_0x8ad27f];return _0x5970e4;}function mapZodIssueToCode(_0x40e9fa,_0x3c33f0){const _0x54bc40=a156_0x5970,_0x42f575=_0x40e9fa[_0x54bc40(0x100)]===_0x54bc40(0xee)?_0x40e9fa['params']:undefined;if(_0x3c33f0===_0x54bc40(0xd3))return'MISSING_NAME';if(_0x3c33f0==='rule.type'||_0x3c33f0[_0x54bc40(0x114)](_0x54bc40(0xff))){if(_0x40e9fa[_0x54bc40(0x100)]===_0x54bc40(0x118)){if(_0x3c33f0===_0x54bc40(0x10e)||_0x3c33f0['match'](/\.conditions\[\d+\]\.type$/))return _0x54bc40(0xe6);}}if(_0x3c33f0[_0x54bc40(0x114)]('.operator.type'))return _0x54bc40(0xea);if(_0x3c33f0[_0x54bc40(0x114)](_0x54bc40(0xe3)))return _0x54bc40(0xde);if(_0x42f575?.[_0x54bc40(0xd6)]===_0x54bc40(0xed))return'MISSING_BETWEEN_BOUNDS';if(_0x42f575?.[_0x54bc40(0xd6)]===_0x54bc40(0xe2))return _0x54bc40(0xe2);if(_0x3c33f0['endsWith']('.conditions')||_0x3c33f0===_0x54bc40(0x102))return _0x54bc40(0xf8);if(_0x3c33f0[_0x54bc40(0x106)](_0x54bc40(0xef)))return _0x54bc40(0x103);if(_0x3c33f0[_0x54bc40(0x114)](_0x54bc40(0xfb)))return'MISSING_SEGMENT_REFERENCE';return'SEGMENT_SCHEMA_ERROR';}function runSemanticChecks(_0x4fe684,_0x1a4f03){const _0x226d07=a156_0x5970,_0x3c0cf1=[];_0x4fe684[_0x226d07(0xdd)]&&_0x3c0cf1[_0x226d07(0x104)](...checkRule(_0x4fe684[_0x226d07(0xdd)],_0x226d07(0xdd),_0x1a4f03));const _0x8161d2=_0x3c0cf1[_0x226d07(0xfa)](_0x1e0850=>_0x1e0850[_0x226d07(0x113)]===_0x226d07(0xd5)),_0x5f2dd4=_0x3c0cf1[_0x226d07(0xfa)](_0x4cb267=>_0x4cb267[_0x226d07(0x113)]===_0x226d07(0xdc));return{'valid':_0x8161d2[_0x226d07(0xd8)]===0x0,'errors':_0x8161d2,'warnings':_0x5f2dd4};}function checkRule(_0x1df7e2,_0x7d2a8d,_0x4805e0){const _0x12b8dd=a156_0x5970,_0x53708f=[];if(_0x1df7e2[_0x12b8dd(0x102)][_0x12b8dd(0xd8)]===0x0)return _0x53708f[_0x12b8dd(0x104)]({'level':'error','path':_0x7d2a8d+_0x12b8dd(0xf6),'code':'EMPTY_CONDITIONS','message':_0x12b8dd(0x10d),'location':getLocationFromPath(_0x4805e0[_0x12b8dd(0x111)],_0x4805e0[_0x12b8dd(0xf4)],pathToArray(_0x7d2a8d+_0x12b8dd(0xf6)))}),_0x53708f;return _0x53708f[_0x12b8dd(0x104)](...checkConditions(_0x1df7e2[_0x12b8dd(0x102)],_0x7d2a8d,_0x4805e0)),_0x53708f;}function checkConditions(_0x38256d,_0x2cb2ca,_0x1bb849){const _0x54720c=a156_0x5970,_0x2d94d1=[];for(let _0x384d7c=0x0;_0x384d7c<_0x38256d[_0x54720c(0xd8)];_0x384d7c++){const _0x25404d=_0x38256d[_0x384d7c],_0x2204e1=_0x2cb2ca+_0x54720c(0xf2)+_0x384d7c+']';_0x2d94d1[_0x54720c(0x104)](...checkCondition(_0x25404d,_0x2204e1,_0x1bb849));}return _0x2d94d1;}function checkCondition(_0xbc1975,_0x2e17d8,_0x1988b6){const _0x5200a5=a156_0x5970,_0x1b4167=[];if(_0xbc1975[_0x5200a5(0x107)]===_0x5200a5(0xd2)||_0xbc1975['type']==='Or'){if(_0xbc1975[_0x5200a5(0x102)]['length']===0x0)_0x1b4167['push']({'level':'error','path':_0x2e17d8+_0x5200a5(0xf6),'code':'EMPTY_CONDITIONS','message':_0xbc1975[_0x5200a5(0x107)]+_0x5200a5(0x108),'location':getLocationFromPath(_0x1988b6[_0x5200a5(0x111)],_0x1988b6['source'],pathToArray(_0x2e17d8+'.conditions'))});else{const _0x2e8b0f=_0xbc1975[_0x5200a5(0x116)]!==undefined;!_0x2e8b0f&&_0x1b4167[_0x5200a5(0x104)]({'level':_0x5200a5(0xdc),'path':_0x2e17d8,'code':_0x5200a5(0xe5),'message':_0xbc1975[_0x5200a5(0x107)]+'\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20'+_0x5200a5(0xe0)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x1988b6['document'],_0x1988b6[_0x5200a5(0xf4)],pathToArray(_0x2e17d8))}),_0x1b4167[_0x5200a5(0x104)](...checkConditions(_0xbc1975[_0x5200a5(0x102)],_0x2e17d8,_0x1988b6));}return _0x1b4167;}if(_0xbc1975[_0x5200a5(0x107)]===_0x5200a5(0xd9)||_0xbc1975['type']===_0x5200a5(0xf0)){const _0x306869=_0xbc1975,_0x345301=_0x306869[_0x5200a5(0xf4)],_0x534dbc=_0x306869[_0x5200a5(0x117)],_0x2a8d30=_0x345301||_0x534dbc;(!_0x306869[_0x5200a5(0xd4)]||_0x306869[_0x5200a5(0xd4)]==='')&&(!_0x2a8d30&&_0x1b4167['push']({'level':_0x5200a5(0xd5),'path':_0x2e17d8+_0x5200a5(0x10c),'code':_0x5200a5(0x110),'message':_0x5200a5(0x10f),'location':getLocationFromPath(_0x1988b6[_0x5200a5(0x111)],_0x1988b6[_0x5200a5(0xf4)],pathToArray(_0x2e17d8+'.attribute'))}));_0x306869[_0x5200a5(0xfa)]&&_0x1b4167[_0x5200a5(0x104)](...checkRule(_0x306869['filter'],_0x2e17d8+_0x5200a5(0x119),_0x1988b6));if(_0x306869[_0x5200a5(0xf4)]){const _0xe6f96f=_0x306869['attribute']&&_0x306869[_0x5200a5(0xd4)]!=='';_0xe6f96f&&!_0x306869['filter']&&_0x1b4167[_0x5200a5(0x104)]({'level':_0x5200a5(0xd5),'path':_0x2e17d8+_0x5200a5(0xe4),'code':_0x5200a5(0x101),'message':_0x5200a5(0x105)+_0x306869['source']+_0x5200a5(0xdb)+_0x306869[_0x5200a5(0xd4)]+'\x27\x20'+_0x5200a5(0xe1)+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x1988b6[_0x5200a5(0x111)],_0x1988b6['source'],pathToArray(_0x2e17d8+'.source'))}),_0xe6f96f&&_0x306869['filter']&&_0x1b4167[_0x5200a5(0x104)]({'level':_0x5200a5(0xdc),'path':_0x2e17d8+_0x5200a5(0x10c),'code':_0x5200a5(0xdf),'message':_0x5200a5(0xda)+_0x306869[_0x5200a5(0xd4)]+_0x5200a5(0xe8)+_0x5200a5(0xf1),'location':getLocationFromPath(_0x1988b6[_0x5200a5(0x111)],_0x1988b6['source'],pathToArray(_0x2e17d8+_0x5200a5(0x10c)))});}}return _0x1b4167;}
1
+ (function(_0x1e78d4,_0x506e4f){const _0x4b1754=a156_0x5af1,_0x3e6926=_0x1e78d4();while(!![]){try{const _0xf9cb07=parseInt(_0x4b1754(0xf5))/0x1*(parseInt(_0x4b1754(0xe2))/0x2)+parseInt(_0x4b1754(0x107))/0x3*(parseInt(_0x4b1754(0xf7))/0x4)+parseInt(_0x4b1754(0xeb))/0x5*(parseInt(_0x4b1754(0xc6))/0x6)+-parseInt(_0x4b1754(0xf2))/0x7*(parseInt(_0x4b1754(0xd6))/0x8)+-parseInt(_0x4b1754(0xc0))/0x9+-parseInt(_0x4b1754(0x106))/0xa+-parseInt(_0x4b1754(0xcb))/0xb*(-parseInt(_0x4b1754(0xe7))/0xc);if(_0xf9cb07===_0x506e4f)break;else _0x3e6926['push'](_0x3e6926['shift']());}catch(_0x1fe984){_0x3e6926['push'](_0x3e6926['shift']());}}}(a156_0xca02,0x96da2));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x489c18,_0x257e6c={},_0x2bf42f={}){const _0x15020b=a156_0x5af1;if(_0x2bf42f[_0x15020b(0x109)])return runSemanticChecks(_0x489c18,_0x257e6c);const _0x2322c3=SegmentDefSchema['safeParse'](_0x489c18);if(_0x2322c3[_0x15020b(0x102)])return runSemanticChecks(_0x2322c3['data'],_0x257e6c);return zodErrorsToValidationResult(_0x2322c3[_0x15020b(0xd2)],_0x257e6c);}export function validateRuleDef(_0x89ae7a,_0x14fea0,_0x1c7871){const _0x320d73=a156_0x5af1;if(!_0x89ae7a)return[];const _0x4e64d4=RuleDefSchema[_0x320d73(0xc9)](_0x89ae7a);if(_0x4e64d4[_0x320d73(0x102)])return checkRule(_0x4e64d4[_0x320d73(0xda)],_0x14fea0,_0x1c7871);const _0xe2dcec=flattenZodIssues(_0x4e64d4[_0x320d73(0xd2)][_0x320d73(0xe1)]);return _0xe2dcec['map'](_0x1a82d3=>{const _0x53eceb=_0x320d73,_0x394aa1=formatZodPath(_0x1a82d3['path']),_0x487743=_0x394aa1?_0x14fea0+'.'+_0x394aa1:_0x14fea0,_0x584a1a=mapZodIssueToCode(_0x1a82d3,_0x394aa1),_0x58bff2=getLocationFromPath(_0x1c7871['document'],_0x1c7871['source'],pathToArray(_0x487743));return{'level':'error','path':_0x487743,'code':_0x584a1a,'message':_0x1a82d3[_0x53eceb(0xd8)],..._0x58bff2&&{'location':_0x58bff2}};});}function a156_0xca02(){const _0x3c344f=['\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','custom','map','level','1844208GPPsBl','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','path','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','231965lTOBTW','name','MISSING_SEGMENT_REFERENCE','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','.filter','Behavior','4226089YCERME','.operator.value','INVALID_RULE_TYPE','2nRFZfd','match','642152rIPMHa','MISSING_OPERATOR_VALUE','And','MISSING_CONDITIONS','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','.attribute','MISSING_BETWEEN_BOUNDS','Attribute\x20\x27','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','\x27\x20with\x20attribute\x20\x27','success','.source','code','endsWith','9285710mLUJvV','6JDpWEz','length','skipSchema','1786869LEQpGt','.operator.type','invalid_value','MISSING_NAME','description','attribute','66ZFwebn','Value','EMPTY_CONDITIONS','safeParse','conditions','22sKyyQk','.conditions[','Behavior\x20source\x20\x27','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','MISSING_TIME_UNIT','filter','aggregation','error','validationCode','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','arrayMatching','8oRRlkb','BEHAVIOR_SOURCE_MISSING_FILTER','message','document','data','.conditions','type','rule','push','source','INVALID_OPERATOR_TYPE','issues','1209962BYVCRw'];a156_0xca02=function(){return _0x3c344f;};return a156_0xca02();}function zodErrorsToValidationResult(_0x454e33,_0x2fff73){const _0x240dd2=a156_0x5af1,_0x591bf1=flattenZodIssues(_0x454e33[_0x240dd2(0xe1)]),_0x4b52e3=_0x591bf1[_0x240dd2(0xe5)](_0x4d7155=>{const _0xdd28ac=_0x240dd2,_0x52c846=formatZodPath(_0x4d7155[_0xdd28ac(0xe9)]),_0x54ca56=mapZodIssueToCode(_0x4d7155,_0x52c846),_0x2354d7=getLocationFromPath(_0x2fff73[_0xdd28ac(0xd9)],_0x2fff73[_0xdd28ac(0xdf)],_0x4d7155[_0xdd28ac(0xe9)][_0xdd28ac(0xe5)](_0x1c0ad8=>typeof _0x1c0ad8==='symbol'?String(_0x1c0ad8):_0x1c0ad8));return{'level':'error','path':_0x52c846,'code':_0x54ca56,'message':_0x4d7155[_0xdd28ac(0xd8)],..._0x2354d7&&{'location':_0x2354d7}};});return{'valid':![],'errors':_0x4b52e3,'warnings':[]};}function mapZodIssueToCode(_0x1bbdfb,_0x387391){const _0xed6d60=a156_0x5af1,_0x2a42c7=_0x1bbdfb[_0xed6d60(0x104)]===_0xed6d60(0xe4)?_0x1bbdfb['params']:undefined;if(_0x387391===_0xed6d60(0xec))return _0xed6d60(0xc3);if(_0x387391==='rule.type'||_0x387391[_0xed6d60(0x105)]('.type')){if(_0x1bbdfb[_0xed6d60(0x104)]===_0xed6d60(0xc2)){if(_0x387391==='rule.type'||_0x387391[_0xed6d60(0xf6)](/\.conditions\[\d+\]\.type$/))return _0xed6d60(0xf4);}}if(_0x387391['endsWith'](_0xed6d60(0xc1)))return _0xed6d60(0xe0);if(_0x387391[_0xed6d60(0x105)](_0xed6d60(0xf3)))return _0xed6d60(0xf8);if(_0x2a42c7?.['validationCode']==='MISSING_BETWEEN_BOUNDS')return _0xed6d60(0xfe);if(_0x2a42c7?.[_0xed6d60(0xd3)]===_0xed6d60(0xcf))return _0xed6d60(0xcf);if(_0x387391[_0xed6d60(0x105)](_0xed6d60(0xdb))||_0x387391===_0xed6d60(0xca))return _0xed6d60(0xfa);if(_0x387391['includes'](_0xed6d60(0xd5)))return'INVALID_ARRAY_MATCHING';if(_0x387391[_0xed6d60(0x105)]('.segment'))return _0xed6d60(0xed);return'SEGMENT_SCHEMA_ERROR';}function runSemanticChecks(_0x383f53,_0x218a61){const _0x145d91=a156_0x5af1,_0xa2180=[];_0x383f53[_0x145d91(0xdd)]&&_0xa2180[_0x145d91(0xde)](...checkRule(_0x383f53[_0x145d91(0xdd)],_0x145d91(0xdd),_0x218a61));const _0x4d95df=_0xa2180['filter'](_0x55b466=>_0x55b466[_0x145d91(0xe6)]===_0x145d91(0xd2)),_0x19c7c8=_0xa2180[_0x145d91(0xd0)](_0x35c8df=>_0x35c8df['level']==='warning');return{'valid':_0x4d95df[_0x145d91(0x108)]===0x0,'errors':_0x4d95df,'warnings':_0x19c7c8};}function checkRule(_0x37973b,_0x5cfd7a,_0x241737){const _0x483440=a156_0x5af1,_0x199868=[];if(_0x37973b[_0x483440(0xca)]['length']===0x0)return _0x199868[_0x483440(0xde)]({'level':_0x483440(0xd2),'path':_0x5cfd7a+'.conditions','code':_0x483440(0xc8),'message':_0x483440(0xce),'location':getLocationFromPath(_0x241737[_0x483440(0xd9)],_0x241737['source'],pathToArray(_0x5cfd7a+'.conditions'))}),_0x199868;return _0x199868[_0x483440(0xde)](...checkConditions(_0x37973b[_0x483440(0xca)],_0x5cfd7a,_0x241737)),_0x199868;}function checkConditions(_0x5c94c9,_0x14d467,_0x3c4d1d){const _0x46bf3a=a156_0x5af1,_0x1c82cd=[];for(let _0x301a5c=0x0;_0x301a5c<_0x5c94c9[_0x46bf3a(0x108)];_0x301a5c++){const _0xf85bac=_0x5c94c9[_0x301a5c],_0x144686=_0x14d467+_0x46bf3a(0xcc)+_0x301a5c+']';_0x1c82cd[_0x46bf3a(0xde)](...checkCondition(_0xf85bac,_0x144686,_0x3c4d1d));}return _0x1c82cd;}function a156_0x5af1(_0x1ed7d9,_0x5db82d){_0x1ed7d9=_0x1ed7d9-0xc0;const _0xca02a8=a156_0xca02();let _0x5af15d=_0xca02a8[_0x1ed7d9];return _0x5af15d;}function checkCondition(_0x308683,_0x2976bb,_0x48f8ec){const _0x58064e=a156_0x5af1,_0x54fa71=[];if(_0x308683['type']===_0x58064e(0xf9)||_0x308683[_0x58064e(0xdc)]==='Or'){if(_0x308683['conditions'][_0x58064e(0x108)]===0x0)_0x54fa71[_0x58064e(0xde)]({'level':_0x58064e(0xd2),'path':_0x2976bb+_0x58064e(0xdb),'code':_0x58064e(0xc8),'message':_0x308683[_0x58064e(0xdc)]+_0x58064e(0xfc),'location':getLocationFromPath(_0x48f8ec[_0x58064e(0xd9)],_0x48f8ec[_0x58064e(0xdf)],pathToArray(_0x2976bb+_0x58064e(0xdb)))});else{const _0x13d16c=_0x308683[_0x58064e(0xc4)]!==undefined;!_0x13d16c&&_0x54fa71['push']({'level':'warning','path':_0x2976bb,'code':'NESTED_CONDITION_GROUP','message':_0x308683[_0x58064e(0xdc)]+_0x58064e(0xfb)+_0x58064e(0xef)+_0x58064e(0x100),'location':getLocationFromPath(_0x48f8ec[_0x58064e(0xd9)],_0x48f8ec['source'],pathToArray(_0x2976bb))}),_0x54fa71[_0x58064e(0xde)](...checkConditions(_0x308683['conditions'],_0x2976bb,_0x48f8ec));}return _0x54fa71;}if(_0x308683[_0x58064e(0xdc)]===_0x58064e(0xc7)||_0x308683[_0x58064e(0xdc)]===_0x58064e(0xf1)){const _0x5e2beb=_0x308683,_0x16e687=_0x5e2beb[_0x58064e(0xdf)],_0x5e0612=_0x5e2beb[_0x58064e(0xd1)],_0x1c2147=_0x16e687||_0x5e0612;(!_0x5e2beb[_0x58064e(0xc5)]||_0x5e2beb[_0x58064e(0xc5)]==='')&&(!_0x1c2147&&_0x54fa71[_0x58064e(0xde)]({'level':'error','path':_0x2976bb+_0x58064e(0xfd),'code':'EMPTY_ATTRIBUTE','message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x48f8ec[_0x58064e(0xd9)],_0x48f8ec[_0x58064e(0xdf)],pathToArray(_0x2976bb+_0x58064e(0xfd)))}));_0x5e2beb[_0x58064e(0xd0)]&&_0x54fa71[_0x58064e(0xde)](...checkRule(_0x5e2beb[_0x58064e(0xd0)],_0x2976bb+_0x58064e(0xf0),_0x48f8ec));if(_0x5e2beb[_0x58064e(0xdf)]){const _0x57d419=_0x5e2beb[_0x58064e(0xc5)]&&_0x5e2beb['attribute']!=='';_0x57d419&&!_0x5e2beb[_0x58064e(0xd0)]&&_0x54fa71[_0x58064e(0xde)]({'level':_0x58064e(0xd2),'path':_0x2976bb+'.source','code':_0x58064e(0xd7),'message':_0x58064e(0xcd)+_0x5e2beb[_0x58064e(0xdf)]+_0x58064e(0x101)+_0x5e2beb[_0x58064e(0xc5)]+'\x27\x20'+_0x58064e(0xee)+_0x58064e(0xe8)+_0x58064e(0xea),'location':getLocationFromPath(_0x48f8ec[_0x58064e(0xd9)],_0x48f8ec[_0x58064e(0xdf)],pathToArray(_0x2976bb+_0x58064e(0x103)))}),_0x57d419&&_0x5e2beb['filter']&&_0x54fa71[_0x58064e(0xde)]({'level':'warning','path':_0x2976bb+'.attribute','code':_0x58064e(0xd4),'message':_0x58064e(0xff)+_0x5e2beb[_0x58064e(0xc5)]+_0x58064e(0xe3)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x48f8ec['document'],_0x48f8ec[_0x58064e(0xdf)],pathToArray(_0x2976bb+_0x58064e(0xfd)))});}}return _0x54fa71;}
@@ -1 +1 @@
1
- (function(_0x18907e,_0x38825b){const _0x5074bf=a157_0x45f7,_0x5c5925=_0x18907e();while(!![]){try{const _0x6143d3=parseInt(_0x5074bf(0x132))/0x1+parseInt(_0x5074bf(0x131))/0x2*(-parseInt(_0x5074bf(0x14c))/0x3)+parseInt(_0x5074bf(0x144))/0x4*(-parseInt(_0x5074bf(0x136))/0x5)+-parseInt(_0x5074bf(0x127))/0x6+-parseInt(_0x5074bf(0x142))/0x7+parseInt(_0x5074bf(0x148))/0x8*(parseInt(_0x5074bf(0x13c))/0x9)+parseInt(_0x5074bf(0x145))/0xa;if(_0x6143d3===_0x38825b)break;else _0x5c5925['push'](_0x5c5925['shift']());}catch(_0x2b9867){_0x5c5925['push'](_0x5c5925['shift']());}}}(a157_0x3a84,0xeba77));import a157_0x4076d3 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a157_0x45f7(_0x1dc77a,_0x24d97e){_0x1dc77a=_0x1dc77a-0x11f;const _0x3a84fe=a157_0x3a84();let _0x45f7b4=_0x3a84fe[_0x1dc77a];return _0x45f7b4;}export function isSuccessfulResolution(_0x41295b){const _0x26edfb=a157_0x45f7;return _0x41295b[_0x26edfb(0x13f)]!==_0x26edfb(0x150);}export function isScopedResolution(_0x15d045){const _0x28a851=a157_0x45f7;return _0x15d045[_0x28a851(0x13f)]==='directory'||_0x15d045['type']==='file'||_0x15d045[_0x28a851(0x13f)]==='context';}export function getScopedDetails(_0x1b59b4){const _0x15bfa6=a157_0x45f7;if(isScopedResolution(_0x1b59b4))return{'isScoped':_0x1b59b4[_0x15bfa6(0x139)],'scopedFolderPath':_0x1b59b4['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x19d43a,_0x109341){const _0x26b70d=a157_0x45f7;let _0x1a7124=a157_0x4076d3[_0x26b70d(0x13b)](_0x19d43a);const _0x3e8f2c=a157_0x4076d3['parse'](_0x1a7124)['root'];while(_0x1a7124!==_0x3e8f2c){const _0x2dfbfd=a157_0x4076d3[_0x26b70d(0x147)](_0x1a7124,'tdx.json');if(await _0x109341['exists'](_0x2dfbfd))try{const _0x35c009=await _0x109341[_0x26b70d(0x12f)](_0x2dfbfd),_0x2f2b67=JSON['parse'](_0x35c009);if(_0x2f2b67[_0x26b70d(0x125)]&&typeof _0x2f2b67[_0x26b70d(0x125)]===_0x26b70d(0x14a))return{'configPath':_0x2dfbfd,'configDir':_0x1a7124,'parentSegment':_0x2f2b67[_0x26b70d(0x125)]};}catch{}_0x1a7124=a157_0x4076d3['dirname'](_0x1a7124);}return null;}function a157_0x3a84(){const _0x1a3fea=['isDirectory','3950VvweYK','No\x20tdx.json\x20found','No\x20tdx.json\x20found\x20for\x20file:\x20','isScoped','stat','resolve','102771sTCuNq','replace','no_config','type','Parent\x20segment\x20not\x20specified','resourceType','11613126OglJqb','invalid_yaml','5208uSCgYK','48024670eXuevR','extname','join','472VhxBIr','message','string','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','4994661qieAID','startsWith','journey','parent_name','error','scopedFolderPath','file','File\x20not\x20found','dirname','Not\x20a\x20YAML\x20file:\x20','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','isFile','directory','parent_segment','includes','3479670ypUXxJ','folderPath','parentSegment','segment','match','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','configDir','trim','readFile','file_not_found','2FfCiHl','421481NxwLEA','basename','context'];a157_0x3a84=function(){return _0x1a3fea;};return a157_0x3a84();}function calculateScopedPath(_0x4dcc45,_0x32bc4b){const _0x247ed5=a157_0x45f7,_0x11b840=a157_0x4076d3['relative'](_0x32bc4b,_0x4dcc45),_0x48c1cf=_0x11b840!==''&&_0x11b840!=='.'&&!_0x11b840[_0x247ed5(0x14d)]('..');return{'isScoped':_0x48c1cf,'scopedFolderPath':_0x48c1cf?_0x11b840[_0x247ed5(0x13d)](/\\/g,'/'):''};}export async function resolveTarget(_0x4983d6){const _0x25129e=a157_0x45f7,{arg:_0x4dccbf,contextParent:_0x30a6b8,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x4983d6;if(_0x4dccbf&&isYamlFilePath(_0x4dccbf))try{const _0x160ef9=await resolveYamlFilePath(_0x4dccbf,fs),_0x28dcf2=a157_0x4076d3['resolve'](_0x4dccbf),_0x3bf68e=a157_0x4076d3[_0x25129e(0x120)](_0x28dcf2),_0xc01263=await findTdxConfigAsync(_0x3bf68e,fs);if(!_0xc01263){if(_0x30a6b8){const _0x536622=a157_0x4076d3[_0x25129e(0x120)](_0x28dcf2);return{'type':'file','parentName':_0x30a6b8,'targetDir':_0x536622,'configRoot':_0x536622,'filePath':_0x28dcf2,'resourceName':_0x160ef9['segmentName'],'folderPath':_0x160ef9[_0x25129e(0x128)],'resourceType':_0x160ef9[_0x25129e(0x141)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x25129e(0x150),'errorCode':'no_config','message':_0x25129e(0x138)+_0x4dccbf,'arg':_0x4dccbf,'helpText':_0x25129e(0x122)};}const _0x376018=calculateScopedPath(_0x3bf68e,_0xc01263['configDir']);return{'type':_0x25129e(0x152),'parentName':_0xc01263['parentSegment'],'targetDir':_0xc01263[_0x25129e(0x12d)],'configRoot':_0xc01263[_0x25129e(0x12d)],'filePath':_0x28dcf2,'resourceName':_0x160ef9['segmentName'],'folderPath':_0x160ef9['folderPath'],'resourceType':_0x160ef9[_0x25129e(0x141)],'isScoped':_0x376018[_0x25129e(0x139)],'scopedFolderPath':_0x376018['scopedFolderPath']};}catch(_0x10bf05){const _0x8f130a=_0x10bf05 instanceof Error?_0x10bf05[_0x25129e(0x149)]:String(_0x10bf05);if(_0x8f130a[_0x25129e(0x126)](_0x25129e(0x11f)))return{'type':_0x25129e(0x150),'errorCode':_0x25129e(0x130),'message':'File\x20not\x20found:\x20'+_0x4dccbf,'arg':_0x4dccbf};if(_0x8f130a[_0x25129e(0x126)](_0x25129e(0x137))){if(_0x30a6b8){const _0x3fe818=a157_0x4076d3[_0x25129e(0x13b)](_0x4dccbf);if(await fs['exists'](_0x3fe818)){const _0x266d83=a157_0x4076d3[_0x25129e(0x120)](_0x3fe818),_0x369df5=await fs[_0x25129e(0x12f)](_0x3fe818),_0x257590=_0x369df5[_0x25129e(0x12b)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x4e99cc=_0x369df5[_0x25129e(0x12b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x57551d=_0x257590?_0x257590[0x1][_0x25129e(0x12e)]():a157_0x4076d3[_0x25129e(0x133)](_0x4dccbf,a157_0x4076d3[_0x25129e(0x146)](_0x4dccbf)),_0x67ce91=_0x4e99cc&&_0x4e99cc[0x1]['trim']()===_0x25129e(0x14e)?'journey':_0x25129e(0x12a);return{'type':'file','parentName':_0x30a6b8,'targetDir':_0x266d83,'configRoot':_0x266d83,'filePath':_0x3fe818,'resourceName':_0x57551d,'folderPath':'','resourceType':_0x67ce91,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x25129e(0x150),'errorCode':_0x25129e(0x13e),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x4dccbf,'arg':_0x4dccbf,'helpText':_0x25129e(0x122)};}return{'type':_0x25129e(0x150),'errorCode':_0x25129e(0x143),'message':_0x8f130a,'arg':_0x4dccbf};}if(_0x4dccbf){const _0x461e9d=a157_0x4076d3[_0x25129e(0x13b)](cwd,_0x4dccbf);let _0x20c36c=null;try{_0x20c36c=await fs[_0x25129e(0x13a)](_0x461e9d);}catch{}if(_0x20c36c?.[_0x25129e(0x135)]()){const _0x2e3518=await findTdxConfigAsync(_0x461e9d,fs);if(_0x2e3518){const _0x165f98=calculateScopedPath(_0x461e9d,_0x2e3518[_0x25129e(0x12d)]);return{'type':_0x25129e(0x124),'parentName':_0x2e3518[_0x25129e(0x129)],'targetDir':_0x461e9d,'configRoot':_0x2e3518['configDir'],'isScoped':_0x165f98[_0x25129e(0x139)],'scopedFolderPath':_0x165f98[_0x25129e(0x151)]};}if(_0x30a6b8)return{'type':_0x25129e(0x124),'parentName':_0x30a6b8,'targetDir':_0x461e9d,'configRoot':_0x461e9d,'isScoped':![],'scopedFolderPath':''};return{'type':_0x25129e(0x150),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x4dccbf,'arg':_0x4dccbf,'helpText':_0x25129e(0x122)};}if(_0x20c36c?.[_0x25129e(0x123)]())return{'type':'error','errorCode':_0x25129e(0x143),'message':_0x25129e(0x121)+_0x4dccbf,'arg':_0x4dccbf,'helpText':_0x25129e(0x12c)};const _0x5373ba=sanitizeFileName(_0x4dccbf),_0x486a3f=getSegmentRootDir(_0x5373ba,cwd);return{'type':_0x25129e(0x14f),'parentName':_0x4dccbf,'targetDir':_0x486a3f,'configRoot':_0x486a3f};}const _0x1ae547=await findTdxConfigAsync(cwd,fs);if(_0x1ae547){const _0x3ffd17=calculateScopedPath(cwd,_0x1ae547['configDir']);return{'type':'context','parentName':_0x1ae547['parentSegment'],'targetDir':cwd,'configRoot':_0x1ae547[_0x25129e(0x12d)],'isScoped':_0x3ffd17[_0x25129e(0x139)],'scopedFolderPath':_0x3ffd17[_0x25129e(0x151)]};}if(_0x30a6b8){const _0xbcf524=sanitizeFileName(_0x30a6b8),_0x340b60=getSegmentRootDir(_0xbcf524,cwd);return{'type':_0x25129e(0x134),'parentName':_0x30a6b8,'targetDir':_0x340b60,'configRoot':_0x340b60,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':_0x25129e(0x140),'helpText':_0x25129e(0x14b)};}
1
+ (function(_0x4490b8,_0x3a0736){const _0x156610=a157_0x1b51,_0x3a8cd0=_0x4490b8();while(!![]){try{const _0x150fb5=parseInt(_0x156610(0xb6))/0x1+-parseInt(_0x156610(0xb7))/0x2+-parseInt(_0x156610(0xc5))/0x3*(-parseInt(_0x156610(0xd3))/0x4)+parseInt(_0x156610(0xc7))/0x5+-parseInt(_0x156610(0xcd))/0x6+parseInt(_0x156610(0xdd))/0x7*(parseInt(_0x156610(0xe0))/0x8)+parseInt(_0x156610(0xd0))/0x9*(parseInt(_0x156610(0xe2))/0xa);if(_0x150fb5===_0x3a0736)break;else _0x3a8cd0['push'](_0x3a8cd0['shift']());}catch(_0x2f9dc4){_0x3a8cd0['push'](_0x3a8cd0['shift']());}}}(a157_0x466c,0x6bcf6));import a157_0x3cbf17 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(_0x13359a){const _0x47886a=a157_0x1b51;return _0x13359a[_0x47886a(0xce)]!==_0x47886a(0xbd);}export function isScopedResolution(_0x4b0520){const _0x519362=a157_0x1b51;return _0x4b0520[_0x519362(0xce)]==='directory'||_0x4b0520[_0x519362(0xce)]===_0x519362(0xc4)||_0x4b0520['type']===_0x519362(0xb1);}export function getScopedDetails(_0x4d7437){const _0x15c35f=a157_0x1b51;if(isScopedResolution(_0x4d7437))return{'isScoped':_0x4d7437[_0x15c35f(0xcf)],'scopedFolderPath':_0x4d7437[_0x15c35f(0xd1)]};return undefined;}function a157_0x1b51(_0xf4eb1a,_0x1526bc){_0xf4eb1a=_0xf4eb1a-0xb0;const _0x466c9b=a157_0x466c();let _0x1b5165=_0x466c9b[_0xf4eb1a];return _0x1b5165;}async function findTdxConfigAsync(_0x4809e9,_0x3a1511){const _0x1c6918=a157_0x1b51;let _0x483432=a157_0x3cbf17[_0x1c6918(0xdf)](_0x4809e9);const _0x56f6cd=a157_0x3cbf17[_0x1c6918(0xb2)](_0x483432)[_0x1c6918(0xd5)];while(_0x483432!==_0x56f6cd){const _0x56fff0=a157_0x3cbf17[_0x1c6918(0xca)](_0x483432,_0x1c6918(0xc0));if(await _0x3a1511[_0x1c6918(0xd7)](_0x56fff0))try{const _0x8994f2=await _0x3a1511[_0x1c6918(0xe1)](_0x56fff0),_0x8d1494=JSON[_0x1c6918(0xb2)](_0x8994f2);if(_0x8d1494[_0x1c6918(0xd9)]&&typeof _0x8d1494[_0x1c6918(0xd9)]===_0x1c6918(0xb9))return{'configPath':_0x56fff0,'configDir':_0x483432,'parentSegment':_0x8d1494['parent_segment']};}catch{}_0x483432=a157_0x3cbf17[_0x1c6918(0xbe)](_0x483432);}return null;}function calculateScopedPath(_0x35be9d,_0xdba196){const _0x912c53=a157_0x1b51,_0x5761c3=a157_0x3cbf17[_0x912c53(0xbf)](_0xdba196,_0x35be9d),_0x4085d0=_0x5761c3!==''&&_0x5761c3!=='.'&&!_0x5761c3['startsWith']('..');return{'isScoped':_0x4085d0,'scopedFolderPath':_0x4085d0?_0x5761c3[_0x912c53(0xc3)](/\\/g,'/'):''};}export async function resolveTarget(_0x26259f){const _0x3dbdd6=a157_0x1b51,{arg:_0x533688,contextParent:_0x637f47,cwd:cwd=process[_0x3dbdd6(0xc1)](),fs:fs=nodeFileSystem}=_0x26259f;if(_0x533688&&isYamlFilePath(_0x533688))try{const _0x5ee06d=await resolveYamlFilePath(_0x533688,fs),_0x370455=a157_0x3cbf17[_0x3dbdd6(0xdf)](_0x533688),_0x45a3ce=a157_0x3cbf17[_0x3dbdd6(0xbe)](_0x370455),_0xdf676c=await findTdxConfigAsync(_0x45a3ce,fs);if(!_0xdf676c){if(_0x637f47){const _0x30c318=a157_0x3cbf17[_0x3dbdd6(0xbe)](_0x370455);return{'type':'file','parentName':_0x637f47,'targetDir':_0x30c318,'configRoot':_0x30c318,'filePath':_0x370455,'resourceName':_0x5ee06d['segmentName'],'folderPath':_0x5ee06d['folderPath'],'resourceType':_0x5ee06d[_0x3dbdd6(0xbb)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3dbdd6(0xbd),'errorCode':_0x3dbdd6(0xcc),'message':_0x3dbdd6(0xd8)+_0x533688,'arg':_0x533688,'helpText':_0x3dbdd6(0xd4)};}const _0xcde179=calculateScopedPath(_0x45a3ce,_0xdf676c['configDir']);return{'type':'file','parentName':_0xdf676c[_0x3dbdd6(0xcb)],'targetDir':_0xdf676c[_0x3dbdd6(0xc2)],'configRoot':_0xdf676c[_0x3dbdd6(0xc2)],'filePath':_0x370455,'resourceName':_0x5ee06d['segmentName'],'folderPath':_0x5ee06d[_0x3dbdd6(0xda)],'resourceType':_0x5ee06d['resourceType'],'isScoped':_0xcde179[_0x3dbdd6(0xcf)],'scopedFolderPath':_0xcde179['scopedFolderPath']};}catch(_0x474dd8){const _0x28a604=_0x474dd8 instanceof Error?_0x474dd8[_0x3dbdd6(0xdb)]:String(_0x474dd8);if(_0x28a604[_0x3dbdd6(0xbc)](_0x3dbdd6(0xde)))return{'type':'error','errorCode':_0x3dbdd6(0xc8),'message':_0x3dbdd6(0xba)+_0x533688,'arg':_0x533688};if(_0x28a604[_0x3dbdd6(0xbc)]('No\x20tdx.json\x20found')){if(_0x637f47){const _0x191aab=a157_0x3cbf17[_0x3dbdd6(0xdf)](_0x533688);if(await fs[_0x3dbdd6(0xd7)](_0x191aab)){const _0x14e021=a157_0x3cbf17['dirname'](_0x191aab),_0x203266=await fs['readFile'](_0x191aab),_0x9d07f4=_0x203266[_0x3dbdd6(0xb4)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x81b00f=_0x203266[_0x3dbdd6(0xb4)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5eae51=_0x9d07f4?_0x9d07f4[0x1][_0x3dbdd6(0xd2)]():a157_0x3cbf17[_0x3dbdd6(0xd6)](_0x533688,a157_0x3cbf17['extname'](_0x533688)),_0x1a4def=_0x81b00f&&_0x81b00f[0x1]['trim']()===_0x3dbdd6(0xc6)?_0x3dbdd6(0xc6):_0x3dbdd6(0xb3);return{'type':_0x3dbdd6(0xc4),'parentName':_0x637f47,'targetDir':_0x14e021,'configRoot':_0x14e021,'filePath':_0x191aab,'resourceName':_0x5eae51,'folderPath':'','resourceType':_0x1a4def,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x3dbdd6(0xbd),'errorCode':_0x3dbdd6(0xcc),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x533688,'arg':_0x533688,'helpText':_0x3dbdd6(0xd4)};}return{'type':_0x3dbdd6(0xbd),'errorCode':'invalid_yaml','message':_0x28a604,'arg':_0x533688};}if(_0x533688){const _0x14a117=a157_0x3cbf17[_0x3dbdd6(0xdf)](cwd,_0x533688);let _0x3e3f86=null;try{_0x3e3f86=await fs['stat'](_0x14a117);}catch{}if(_0x3e3f86?.['isDirectory']()){const _0x5497b7=await findTdxConfigAsync(_0x14a117,fs);if(_0x5497b7){const _0x421d74=calculateScopedPath(_0x14a117,_0x5497b7['configDir']);return{'type':_0x3dbdd6(0xb8),'parentName':_0x5497b7[_0x3dbdd6(0xcb)],'targetDir':_0x14a117,'configRoot':_0x5497b7['configDir'],'isScoped':_0x421d74[_0x3dbdd6(0xcf)],'scopedFolderPath':_0x421d74[_0x3dbdd6(0xd1)]};}if(_0x637f47)return{'type':_0x3dbdd6(0xb8),'parentName':_0x637f47,'targetDir':_0x14a117,'configRoot':_0x14a117,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x3dbdd6(0xcc),'message':_0x3dbdd6(0xc9)+_0x533688,'arg':_0x533688,'helpText':_0x3dbdd6(0xd4)};}if(_0x3e3f86?.[_0x3dbdd6(0xb5)]())return{'type':_0x3dbdd6(0xbd),'errorCode':_0x3dbdd6(0xdc),'message':_0x3dbdd6(0xb0)+_0x533688,'arg':_0x533688,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x25c15c=sanitizeFileName(_0x533688),_0x14cef9=getSegmentRootDir(_0x25c15c,cwd);return{'type':_0x3dbdd6(0xe4),'parentName':_0x533688,'targetDir':_0x14cef9,'configRoot':_0x14cef9};}const _0x52baf1=await findTdxConfigAsync(cwd,fs);if(_0x52baf1){const _0x1cf37d=calculateScopedPath(cwd,_0x52baf1['configDir']);return{'type':_0x3dbdd6(0xb1),'parentName':_0x52baf1['parentSegment'],'targetDir':cwd,'configRoot':_0x52baf1[_0x3dbdd6(0xc2)],'isScoped':_0x1cf37d['isScoped'],'scopedFolderPath':_0x1cf37d[_0x3dbdd6(0xd1)]};}if(_0x637f47){const _0x4734fb=sanitizeFileName(_0x637f47),_0x22f869=getSegmentRootDir(_0x4734fb,cwd);return{'type':_0x3dbdd6(0xb1),'parentName':_0x637f47,'targetDir':_0x22f869,'configRoot':_0x22f869,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x3dbdd6(0xe3),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x3dbdd6(0xe5)};}function a157_0x466c(){const _0x31145a=['4854wfxoNe','852108PqdrEg','directory','string','File\x20not\x20found:\x20','resourceType','includes','error','dirname','relative','tdx.json','cwd','configDir','replace','file','1132119yiATFN','journey','877050AOboEC','file_not_found','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','join','parentSegment','no_config','4521498LZUKFy','type','isScoped','43803GddQhO','scopedFolderPath','trim','8SNgAXE','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','root','basename','exists','No\x20tdx.json\x20found\x20for\x20file:\x20','parent_segment','folderPath','message','invalid_yaml','163289oAtZny','File\x20not\x20found','resolve','232DESxMf','readFile','20HLrDRv','no_parent','parent_name','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','Not\x20a\x20YAML\x20file:\x20','context','parse','segment','match','isFile'];a157_0x466c=function(){return _0x31145a;};return a157_0x466c();}
@@ -1 +1 @@
1
- const a158_0x27220d=a158_0x4400;(function(_0x440d55,_0x1d1d57){const _0x203234=a158_0x4400,_0x20ce60=_0x440d55();while(!![]){try{const _0x414aee=parseInt(_0x203234(0x17e))/0x1*(-parseInt(_0x203234(0x168))/0x2)+-parseInt(_0x203234(0x179))/0x3+parseInt(_0x203234(0x16f))/0x4+-parseInt(_0x203234(0x164))/0x5*(parseInt(_0x203234(0x17d))/0x6)+parseInt(_0x203234(0x173))/0x7+-parseInt(_0x203234(0x165))/0x8+parseInt(_0x203234(0x175))/0x9*(parseInt(_0x203234(0x16a))/0xa);if(_0x414aee===_0x1d1d57)break;else _0x20ce60['push'](_0x20ce60['shift']());}catch(_0x386798){_0x20ce60['push'](_0x20ce60['shift']());}}}(a158_0x6cef,0x3fb7d));import{existsSync,readFileSync}from'fs';import a158_0x4743c7 from'path';function a158_0x4400(_0x370d49,_0x9849c6){_0x370d49=_0x370d49-0x164;const _0x6cef0=a158_0x6cef();let _0x44002e=_0x6cef0[_0x370d49];return _0x44002e;}const TDX_CONFIG_FILE=a158_0x27220d(0x167),SEGMENTS_DIR=a158_0x27220d(0x174);export function findTdxConfigPath(_0x5c8e78=process[a158_0x27220d(0x169)]()){const _0x72ac3c=a158_0x27220d;let _0x39011e=a158_0x4743c7[_0x72ac3c(0x17c)](_0x5c8e78);const _0x577995=a158_0x4743c7['parse'](_0x39011e)[_0x72ac3c(0x170)];while(_0x39011e!==_0x577995){const _0x3b10fe=a158_0x4743c7[_0x72ac3c(0x16d)](_0x39011e,TDX_CONFIG_FILE);if(existsSync(_0x3b10fe))return _0x3b10fe;_0x39011e=a158_0x4743c7[_0x72ac3c(0x17a)](_0x39011e);}return null;}function a158_0x6cef(){const _0x44cba1=['startsWith','tdx.json','22zajVjV','cwd','190sgsMwx','engage_workspace','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','join','relative','1005772fPAoUH','root','utf-8','Invalid\x20tdx.json:\x20expected\x20object','212282PfgPJj','segments','581301ezPbHp','string','stringify','parent_segment','853908LKhdum','dirname','object','resolve','225384eOypOj','37643YDZOvz','parse','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','replace','40VyddUb','1990000zScAYm'];a158_0x6cef=function(){return _0x44cba1;};return a158_0x6cef();}export function loadTdxConfig(_0x48fa0d){const _0x51813d=a158_0x27220d,_0x4bb928=readFileSync(_0x48fa0d,_0x51813d(0x171));let _0x5819a2;try{_0x5819a2=JSON[_0x51813d(0x17f)](_0x4bb928);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x48fa0d);}if(!_0x5819a2||typeof _0x5819a2!==_0x51813d(0x17b))throw new Error(_0x51813d(0x172));const _0x359bb2=_0x5819a2,_0x1f3666=_0x359bb2[_0x51813d(0x178)]&&typeof _0x359bb2[_0x51813d(0x178)]===_0x51813d(0x176),_0x5f4958=_0x359bb2[_0x51813d(0x16b)]&&typeof _0x359bb2[_0x51813d(0x16b)]===_0x51813d(0x176);if(!_0x1f3666&&!_0x5f4958)throw new Error(_0x51813d(0x16c));const _0xf95fdc={};return _0x1f3666&&(_0xf95fdc['parent_segment']=_0x359bb2[_0x51813d(0x178)]),_0x5f4958&&(_0xf95fdc[_0x51813d(0x16b)]=_0x359bb2[_0x51813d(0x16b)]),_0xf95fdc;}export function findTdxConfig(_0x59ae67=process[a158_0x27220d(0x169)]()){const _0x2dbfcd=a158_0x27220d,_0x3783b7=findTdxConfigPath(_0x59ae67);if(!_0x3783b7)throw new Error(_0x2dbfcd(0x180));const _0x4732b7=loadTdxConfig(_0x3783b7),_0x32143d=a158_0x4743c7['dirname'](_0x3783b7);return{'config':_0x4732b7,'configPath':_0x3783b7,'configDir':_0x32143d};}export function tryFindTdxConfig(_0x16d439){try{return findTdxConfig(_0x16d439);}catch{return null;}}export function getSegmentRootDir(_0x36cea7,_0x4295d0=process[a158_0x27220d(0x169)]()){const _0x3b0f91=a158_0x27220d;return a158_0x4743c7[_0x3b0f91(0x16d)](_0x4295d0,SEGMENTS_DIR,_0x36cea7);}export function getTdxConfigPath(_0x3ab0f2,_0x807a01=process[a158_0x27220d(0x169)]()){return a158_0x4743c7['join'](getSegmentRootDir(_0x3ab0f2,_0x807a01),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3d41fc,_0x543010){const _0xf223d4=a158_0x27220d,_0x110e61=a158_0x4743c7[_0xf223d4(0x17c)](_0x3d41fc),_0x24654d=a158_0x4743c7[_0xf223d4(0x16e)](_0x543010,_0x110e61);if(_0x24654d[_0xf223d4(0x166)]('..'))return'';return _0x24654d;}export function localPathToTdFolderPath(_0x6b0829){const _0x4a7c90=a158_0x27220d,_0x203af4=a158_0x4743c7['dirname'](_0x6b0829);if(_0x203af4==='.'||_0x203af4==='')return'';return _0x203af4[_0x4a7c90(0x181)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x22aef2,_0x586a08){const _0x473f36=a158_0x27220d;if(!_0x22aef2)return _0x586a08;return a158_0x4743c7[_0x473f36(0x16d)](_0x586a08,_0x22aef2);}export function createTdxConfigContent(_0xd5c25e){const _0x48eda9=a158_0x27220d,_0x2003ed={'parent_segment':_0xd5c25e};return JSON[_0x48eda9(0x177)](_0x2003ed,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x34ac7f){const _0x5f2a20=a158_0x27220d,_0x3b8a5d={'engage_workspace':_0x34ac7f};return JSON[_0x5f2a20(0x177)](_0x3b8a5d,null,0x2)+'\x0a';}
1
+ const a158_0x16b319=a158_0x23b6;(function(_0x1dfb7e,_0x30ee8d){const _0x8858b7=a158_0x23b6,_0x26ca85=_0x1dfb7e();while(!![]){try{const _0x180a6e=parseInt(_0x8858b7(0xfa))/0x1+parseInt(_0x8858b7(0xf7))/0x2*(parseInt(_0x8858b7(0xe1))/0x3)+-parseInt(_0x8858b7(0xdd))/0x4*(-parseInt(_0x8858b7(0xe0))/0x5)+parseInt(_0x8858b7(0xe5))/0x6+-parseInt(_0x8858b7(0xf3))/0x7+parseInt(_0x8858b7(0xe7))/0x8*(-parseInt(_0x8858b7(0xee))/0x9)+-parseInt(_0x8858b7(0xeb))/0xa;if(_0x180a6e===_0x30ee8d)break;else _0x26ca85['push'](_0x26ca85['shift']());}catch(_0x1b7b0f){_0x26ca85['push'](_0x26ca85['shift']());}}}(a158_0x44ca,0x689be));import{existsSync,readFileSync}from'fs';function a158_0x23b6(_0x2fd0f7,_0x5b95f0){_0x2fd0f7=_0x2fd0f7-0xdd;const _0x44ca4e=a158_0x44ca();let _0x23b6c5=_0x44ca4e[_0x2fd0f7];return _0x23b6c5;}function a158_0x44ca(){const _0xf0089=['root','cwd','relative','85282SiFGaz','segments','string','429700uzMeIw','22352GsFvOX','startsWith','dirname','170ptHWcF','42hYBxuF','stringify','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parent_segment','3909084QzJswQ','parse','120ljxQwJ','join','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','object','5951140kEZxPm','resolve','replace','482373ApFhRi','Invalid\x20JSON\x20in\x20','utf-8','engage_workspace','Invalid\x20tdx.json:\x20expected\x20object','284431SqzQnx'];a158_0x44ca=function(){return _0xf0089;};return a158_0x44ca();}import a158_0x149124 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a158_0x16b319(0xf8);export function findTdxConfigPath(_0x4aadc9=process[a158_0x16b319(0xf5)]()){const _0x116167=a158_0x16b319;let _0x31a861=a158_0x149124[_0x116167(0xec)](_0x4aadc9);const _0x43a452=a158_0x149124['parse'](_0x31a861)[_0x116167(0xf4)];while(_0x31a861!==_0x43a452){const _0x1d266f=a158_0x149124[_0x116167(0xe8)](_0x31a861,TDX_CONFIG_FILE);if(existsSync(_0x1d266f))return _0x1d266f;_0x31a861=a158_0x149124[_0x116167(0xdf)](_0x31a861);}return null;}export function loadTdxConfig(_0x1331e4){const _0x222e87=a158_0x16b319,_0x1fd25d=readFileSync(_0x1331e4,_0x222e87(0xf0));let _0x35db5f;try{_0x35db5f=JSON[_0x222e87(0xe6)](_0x1fd25d);}catch{throw new Error(_0x222e87(0xef)+_0x1331e4);}if(!_0x35db5f||typeof _0x35db5f!==_0x222e87(0xea))throw new Error(_0x222e87(0xf2));const _0x4047a0=_0x35db5f,_0x4e2de2=_0x4047a0[_0x222e87(0xe4)]&&typeof _0x4047a0[_0x222e87(0xe4)]==='string',_0x5ed94b=_0x4047a0[_0x222e87(0xf1)]&&typeof _0x4047a0[_0x222e87(0xf1)]===_0x222e87(0xf9);if(!_0x4e2de2&&!_0x5ed94b)throw new Error(_0x222e87(0xe9));const _0x3cdea8={};return _0x4e2de2&&(_0x3cdea8[_0x222e87(0xe4)]=_0x4047a0['parent_segment']),_0x5ed94b&&(_0x3cdea8[_0x222e87(0xf1)]=_0x4047a0['engage_workspace']),_0x3cdea8;}export function findTdxConfig(_0x26fd8c=process['cwd']()){const _0x4bdf77=a158_0x16b319,_0x270d41=findTdxConfigPath(_0x26fd8c);if(!_0x270d41)throw new Error(_0x4bdf77(0xe3));const _0x225545=loadTdxConfig(_0x270d41),_0x3c6957=a158_0x149124[_0x4bdf77(0xdf)](_0x270d41);return{'config':_0x225545,'configPath':_0x270d41,'configDir':_0x3c6957};}export function tryFindTdxConfig(_0x493bc0){try{return findTdxConfig(_0x493bc0);}catch{return null;}}export function getSegmentRootDir(_0x2eec38,_0x49997c=process['cwd']()){return a158_0x149124['join'](_0x49997c,SEGMENTS_DIR,_0x2eec38);}export function getTdxConfigPath(_0x591c60,_0xebda27=process[a158_0x16b319(0xf5)]()){const _0x1209db=a158_0x16b319;return a158_0x149124[_0x1209db(0xe8)](getSegmentRootDir(_0x591c60,_0xebda27),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x1d75cc,_0x4a9160){const _0x4815eb=a158_0x16b319,_0x340888=a158_0x149124['resolve'](_0x1d75cc),_0x3fb0e3=a158_0x149124[_0x4815eb(0xf6)](_0x4a9160,_0x340888);if(_0x3fb0e3[_0x4815eb(0xde)]('..'))return'';return _0x3fb0e3;}export function localPathToTdFolderPath(_0xa97a47){const _0x472029=a158_0x16b319,_0x5d2569=a158_0x149124['dirname'](_0xa97a47);if(_0x5d2569==='.'||_0x5d2569==='')return'';return _0x5d2569[_0x472029(0xed)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x575e73,_0x21fa00){const _0xf0780c=a158_0x16b319;if(!_0x575e73)return _0x21fa00;return a158_0x149124[_0xf0780c(0xe8)](_0x21fa00,_0x575e73);}export function createTdxConfigContent(_0x41c144){const _0x11f30b=a158_0x16b319,_0x2a2772={'parent_segment':_0x41c144};return JSON[_0x11f30b(0xe2)](_0x2a2772,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x1b5a48){const _0xe3632b=a158_0x16b319,_0x2c9ba6={'engage_workspace':_0x1b5a48};return JSON[_0xe3632b(0xe2)](_0x2c9ba6,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- function a159_0x4fa5(_0x4a96e7,_0x2b9067){_0x4a96e7=_0x4a96e7-0x105;const _0x486d0d=a159_0x486d();let _0x4fa54c=_0x486d0d[_0x4a96e7];return _0x4fa54c;}const a159_0x19d241=a159_0x4fa5;(function(_0x431fa7,_0x2bafc4){const _0x1948b3=a159_0x4fa5,_0x10af3d=_0x431fa7();while(!![]){try{const _0x21be6d=parseInt(_0x1948b3(0x106))/0x1+parseInt(_0x1948b3(0x130))/0x2*(parseInt(_0x1948b3(0x10d))/0x3)+-parseInt(_0x1948b3(0x10a))/0x4+-parseInt(_0x1948b3(0x119))/0x5*(-parseInt(_0x1948b3(0x10c))/0x6)+-parseInt(_0x1948b3(0x11b))/0x7*(parseInt(_0x1948b3(0x127))/0x8)+-parseInt(_0x1948b3(0x118))/0x9*(parseInt(_0x1948b3(0x121))/0xa)+parseInt(_0x1948b3(0x116))/0xb;if(_0x21be6d===_0x2bafc4)break;else _0x10af3d['push'](_0x10af3d['shift']());}catch(_0x1da039){_0x10af3d['push'](_0x10af3d['shift']());}}}(a159_0x486d,0x960ed));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x19d241(0x10f)]([a159_0x19d241(0x114),a159_0x19d241(0x12d),'daily','weekly',a159_0x19d241(0x126),a159_0x19d241(0x120),'minutes_interval']);export const RepeatUnitSchema=z[a159_0x19d241(0x10f)]([a159_0x19d241(0x11a),a159_0x19d241(0x115),a159_0x19d241(0x12f),a159_0x19d241(0x124),'month',a159_0x19d241(0x11f),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x19d241(0x110)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x19d241(0x109)]()[a159_0x19d241(0x110)](),'repeat_sub_frequency':z['array'](z['number']())['optional'](),'start_at':z['string']()['nullable']()[a159_0x19d241(0x110)](),'end_on':z[a159_0x19d241(0x113)]()[a159_0x19d241(0x12a)]()[a159_0x19d241(0x110)](),'timezone':z['string']()[a159_0x19d241(0x110)]()});function a159_0x486d(){const _0x3efea6=['42890ClFTWl','cols','348602bQIxgk','union','onSuccess','number','4614560DfdwdH','onFailure','369294hrHgYT','171OdXnAf','First','enum','optional','record','clear','string','none','hour','8903741VaOxBH','Top-N','297qBVtyJ','65xXANZy','minute','4659893swmPgD','array','min','masked','once','cron','226230PMeVZm','Activation\x20name\x20is\x20required','boolean','week','object','monthly','8EyvlNS','Connection\x20name\x20is\x20required','asc','nullable','All','unknown','hourly','rows','day'];a159_0x486d=function(){return _0x3efea6;};return a159_0x486d();}export const NotificationDefSchema=z[a159_0x19d241(0x125)]({'notify_on':z['array'](z[a159_0x19d241(0x10f)]([a159_0x19d241(0x108),a159_0x19d241(0x10b)]))['optional'](),'email_recipients':z[a159_0x19d241(0x11c)](z[a159_0x19d241(0x113)]())['optional']()});export const ActivationColumnDefSchema=z[a159_0x19d241(0x107)]([z[a159_0x19d241(0x113)](),z[a159_0x19d241(0x125)]({'name':z[a159_0x19d241(0x113)](),'type':z[a159_0x19d241(0x113)]()[a159_0x19d241(0x110)](),'visibility':z[a159_0x19d241(0x10f)]([a159_0x19d241(0x112),a159_0x19d241(0x11e)])['optional']()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a159_0x19d241(0x11c)](z[a159_0x19d241(0x125)]({'name':z['string'](),'type':z['string']()[a159_0x19d241(0x110)](),'visibility':z['enum']([a159_0x19d241(0x112),'masked'])['optional']()}))['optional'](),'behavior_table':z[a159_0x19d241(0x113)]()['optional'](),'join_row':z['number']()[a159_0x19d241(0x12a)]()['optional'](),'join_strategy':z[a159_0x19d241(0x10f)]([a159_0x19d241(0x12b),a159_0x19d241(0x10e),'Last',a159_0x19d241(0x117)])[a159_0x19d241(0x110)](),'formatting':z[a159_0x19d241(0x10f)]([a159_0x19d241(0x12e),a159_0x19d241(0x105)])[a159_0x19d241(0x110)](),'order_by':z[a159_0x19d241(0x11c)](z[a159_0x19d241(0x125)]({'key':z['string'](),'order':z[a159_0x19d241(0x10f)]([a159_0x19d241(0x129),'desc'])}))[a159_0x19d241(0x110)]()});export const ActivationDefSchema=z[a159_0x19d241(0x125)]({'name':z[a159_0x19d241(0x113)]()[a159_0x19d241(0x11d)](0x1,a159_0x19d241(0x122)),'description':z[a159_0x19d241(0x113)]()['optional'](),'connection':z[a159_0x19d241(0x113)]()[a159_0x19d241(0x11d)](0x1,a159_0x19d241(0x128)),'all_columns':z['boolean']()[a159_0x19d241(0x110)](),'columns':z[a159_0x19d241(0x11c)](ActivationColumnDefSchema)[a159_0x19d241(0x110)](),'schedule':ScheduleDefSchema[a159_0x19d241(0x110)](),'notification':NotificationDefSchema[a159_0x19d241(0x110)](),'connector_config':z[a159_0x19d241(0x111)](z['string'](),z[a159_0x19d241(0x12c)]())['optional'](),'activation_template_id':z['string']()[a159_0x19d241(0x12a)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x19d241(0x12a)]()['optional'](),'run_after_journey_refresh':z[a159_0x19d241(0x123)]()['optional'](),'nested_workflow_project_name':z['string']()[a159_0x19d241(0x110)](),'nested_workflow_name':z[a159_0x19d241(0x113)]()[a159_0x19d241(0x110)](),'lock_enabled':z[a159_0x19d241(0x123)]()[a159_0x19d241(0x110)]()});
1
+ function a159_0x41c4(){const _0x254f7f=['353928JXTVYZ','enum','object','union','clear','All','8BfkIBq','week','min','string','weekly','none','minutes_interval','cols','asc','daily','rows','387385trebPX','Activation\x20name\x20is\x20required','70AxiMLM','unknown','nullable','number','month','714759LnSTfw','2832939evgiQY','minute','Connection\x20name\x20is\x20required','monthly','optional','boolean','array','once','479797TuUTVz','record','First','2652640YQdNHb','cron','Top-N','2Cnmcww','desc','masked','4450512kBHpmE','hourly'];a159_0x41c4=function(){return _0x254f7f;};return a159_0x41c4();}const a159_0x1a9885=a159_0x55e7;(function(_0x59c9ee,_0x5ee762){const _0x1ac7f5=a159_0x55e7,_0x5e8218=_0x59c9ee();while(!![]){try{const _0x347607=parseInt(_0x1ac7f5(0xae))/0x1*(parseInt(_0x1ac7f5(0xb4))/0x2)+parseInt(_0x1ac7f5(0xa5))/0x3+parseInt(_0x1ac7f5(0xbf))/0x4*(parseInt(_0x1ac7f5(0xca))/0x5)+parseInt(_0x1ac7f5(0xb9))/0x6*(-parseInt(_0x1ac7f5(0xcc))/0x7)+-parseInt(_0x1ac7f5(0xb7))/0x8+parseInt(_0x1ac7f5(0xa6))/0x9+parseInt(_0x1ac7f5(0xb1))/0xa;if(_0x347607===_0x5ee762)break;else _0x5e8218['push'](_0x5e8218['shift']());}catch(_0x47645f){_0x5e8218['push'](_0x5e8218['shift']());}}}(a159_0x41c4,0x4ae9d));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x1a9885(0xba)]([a159_0x1a9885(0xc4),a159_0x1a9885(0xb8),a159_0x1a9885(0xc8),a159_0x1a9885(0xc3),a159_0x1a9885(0xa9),a159_0x1a9885(0xb2),a159_0x1a9885(0xc5)]);export const RepeatUnitSchema=z[a159_0x1a9885(0xba)]([a159_0x1a9885(0xa7),'hour','day',a159_0x1a9885(0xc0),a159_0x1a9885(0xa4),a159_0x1a9885(0xad),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x1a9885(0xaa)](),'repeat_unit':RepeatUnitSchema[a159_0x1a9885(0xaa)](),'repeat_frequency':z[a159_0x1a9885(0xcf)]()['optional'](),'repeat_sub_frequency':z['array'](z[a159_0x1a9885(0xcf)]())[a159_0x1a9885(0xaa)](),'start_at':z[a159_0x1a9885(0xc2)]()[a159_0x1a9885(0xce)]()['optional'](),'end_on':z[a159_0x1a9885(0xc2)]()[a159_0x1a9885(0xce)]()['optional'](),'timezone':z[a159_0x1a9885(0xc2)]()['optional']()});function a159_0x55e7(_0x44b7a3,_0x51afbd){_0x44b7a3=_0x44b7a3-0xa4;const _0x41c4af=a159_0x41c4();let _0x55e796=_0x41c4af[_0x44b7a3];return _0x55e796;}export const NotificationDefSchema=z[a159_0x1a9885(0xbb)]({'notify_on':z[a159_0x1a9885(0xac)](z['enum'](['onSuccess','onFailure']))[a159_0x1a9885(0xaa)](),'email_recipients':z[a159_0x1a9885(0xac)](z['string']())[a159_0x1a9885(0xaa)]()});export const ActivationColumnDefSchema=z[a159_0x1a9885(0xbc)]([z[a159_0x1a9885(0xc2)](),z[a159_0x1a9885(0xbb)]({'name':z['string'](),'type':z[a159_0x1a9885(0xc2)]()[a159_0x1a9885(0xaa)](),'visibility':z[a159_0x1a9885(0xba)](['clear',a159_0x1a9885(0xb6)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a159_0x1a9885(0xbb)]({'columns':z['array'](z['object']({'name':z[a159_0x1a9885(0xc2)](),'type':z[a159_0x1a9885(0xc2)]()['optional'](),'visibility':z[a159_0x1a9885(0xba)]([a159_0x1a9885(0xbd),a159_0x1a9885(0xb6)])['optional']()}))[a159_0x1a9885(0xaa)](),'behavior_table':z[a159_0x1a9885(0xc2)]()[a159_0x1a9885(0xaa)](),'join_row':z[a159_0x1a9885(0xcf)]()[a159_0x1a9885(0xce)]()[a159_0x1a9885(0xaa)](),'join_strategy':z[a159_0x1a9885(0xba)]([a159_0x1a9885(0xbe),a159_0x1a9885(0xb0),'Last',a159_0x1a9885(0xb3)])[a159_0x1a9885(0xaa)](),'formatting':z[a159_0x1a9885(0xba)]([a159_0x1a9885(0xc9),a159_0x1a9885(0xc6)])[a159_0x1a9885(0xaa)](),'order_by':z[a159_0x1a9885(0xac)](z[a159_0x1a9885(0xbb)]({'key':z[a159_0x1a9885(0xc2)](),'order':z[a159_0x1a9885(0xba)]([a159_0x1a9885(0xc7),a159_0x1a9885(0xb5)])}))[a159_0x1a9885(0xaa)]()});export const ActivationDefSchema=z['object']({'name':z[a159_0x1a9885(0xc2)]()['min'](0x1,a159_0x1a9885(0xcb)),'description':z[a159_0x1a9885(0xc2)]()[a159_0x1a9885(0xaa)](),'connection':z['string']()[a159_0x1a9885(0xc1)](0x1,a159_0x1a9885(0xa8)),'all_columns':z[a159_0x1a9885(0xab)]()[a159_0x1a9885(0xaa)](),'columns':z[a159_0x1a9885(0xac)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a159_0x1a9885(0xaa)](),'notification':NotificationDefSchema[a159_0x1a9885(0xaa)](),'connector_config':z[a159_0x1a9885(0xaf)](z[a159_0x1a9885(0xc2)](),z[a159_0x1a9885(0xcd)]())[a159_0x1a9885(0xaa)](),'activation_template_id':z['string']()['nullable']()[a159_0x1a9885(0xaa)](),'behavior':ActivationBehaviorDefSchema[a159_0x1a9885(0xce)]()[a159_0x1a9885(0xaa)](),'run_after_journey_refresh':z[a159_0x1a9885(0xab)]()[a159_0x1a9885(0xaa)](),'nested_workflow_project_name':z[a159_0x1a9885(0xc2)]()[a159_0x1a9885(0xaa)](),'nested_workflow_name':z['string']()[a159_0x1a9885(0xaa)](),'lock_enabled':z[a159_0x1a9885(0xab)]()[a159_0x1a9885(0xaa)]()});
@@ -1 +1 @@
1
- function a160_0x57ef(_0x306b7b,_0x482363){_0x306b7b=_0x306b7b-0x1a9;var _0x3523c4=a160_0x3523();var _0x57ef62=_0x3523c4[_0x306b7b];return _0x57ef62;}(function(_0x4b38dd,_0xf53e48){var _0x51e958=a160_0x57ef,_0x232aac=_0x4b38dd();while(!![]){try{var _0x412657=parseInt(_0x51e958(0x1ae))/0x1*(-parseInt(_0x51e958(0x1aa))/0x2)+parseInt(_0x51e958(0x1a9))/0x3*(-parseInt(_0x51e958(0x1ab))/0x4)+parseInt(_0x51e958(0x1b0))/0x5+parseInt(_0x51e958(0x1b4))/0x6+-parseInt(_0x51e958(0x1b2))/0x7*(-parseInt(_0x51e958(0x1b1))/0x8)+-parseInt(_0x51e958(0x1ad))/0x9*(-parseInt(_0x51e958(0x1ac))/0xa)+parseInt(_0x51e958(0x1b3))/0xb*(parseInt(_0x51e958(0x1af))/0xc);if(_0x412657===_0xf53e48)break;else _0x232aac['push'](_0x232aac['shift']());}catch(_0xf9440f){_0x232aac['push'](_0x232aac['shift']());}}}(a160_0x3523,0x63be2));function a160_0x3523(){var _0x2f3ddb=['7329sJSLxT','83202fuStYl','188uxeRdx','1822580SfsUAj','9ReEiOz','13tAcJlV','2585880DNyPWY','1195455MFJOxG','7144JLjisQ','2009jFoAoX','11ONcmhM','1026300RMTQUb'];a160_0x3523=function(){return _0x2f3ddb;};return a160_0x3523();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a160_0x1c65(_0x1bcf0a,_0x4a6dca){_0x1bcf0a=_0x1bcf0a-0xa5;var _0x5d8f2f=a160_0x5d8f();var _0x1c6597=_0x5d8f2f[_0x1bcf0a];return _0x1c6597;}function a160_0x5d8f(){var _0x45dd8e=['2188089hyNkzA','222032gfRend','50ZuhDQr','4265436WzffLZ','20614470MvRlon','4084724nquoqi','52593QJVxhg','8CpRgug','5765zYEqRp','5412uDphAp'];a160_0x5d8f=function(){return _0x45dd8e;};return a160_0x5d8f();}(function(_0x5b5487,_0x403221){var _0x320704=a160_0x1c65,_0x240fc7=_0x5b5487();while(!![]){try{var _0x158d7e=parseInt(_0x320704(0xae))/0x1+-parseInt(_0x320704(0xa5))/0x2*(parseInt(_0x320704(0xa9))/0x3)+-parseInt(_0x320704(0xa8))/0x4+parseInt(_0x320704(0xab))/0x5*(-parseInt(_0x320704(0xac))/0x6)+parseInt(_0x320704(0xa6))/0x7+parseInt(_0x320704(0xaa))/0x8*(parseInt(_0x320704(0xad))/0x9)+parseInt(_0x320704(0xa7))/0xa;if(_0x158d7e===_0x403221)break;else _0x240fc7['push'](_0x240fc7['shift']());}catch(_0x272398){_0x240fc7['push'](_0x240fc7['shift']());}}}(a160_0x5d8f,0x9b646));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- function a161_0x50e1(_0x4298bc,_0x2bd49c){_0x4298bc=_0x4298bc-0x72;const _0x5cbd73=a161_0x5cbd();let _0x50e199=_0x5cbd73[_0x4298bc];return _0x50e199;}const a161_0xc4667b=a161_0x50e1;(function(_0x25307f,_0x3f6c8e){const _0x2dacbc=a161_0x50e1,_0x244eba=_0x25307f();while(!![]){try{const _0x3d0540=-parseInt(_0x2dacbc(0x8f))/0x1*(parseInt(_0x2dacbc(0x81))/0x2)+-parseInt(_0x2dacbc(0x7f))/0x3+-parseInt(_0x2dacbc(0x78))/0x4+-parseInt(_0x2dacbc(0x93))/0x5+parseInt(_0x2dacbc(0x85))/0x6*(-parseInt(_0x2dacbc(0x80))/0x7)+parseInt(_0x2dacbc(0x8a))/0x8+parseInt(_0x2dacbc(0x88))/0x9*(parseInt(_0x2dacbc(0x97))/0xa);if(_0x3d0540===_0x3f6c8e)break;else _0x244eba['push'](_0x244eba['shift']());}catch(_0x1d44e1){_0x244eba['push'](_0x244eba['shift']());}}}(a161_0x5cbd,0x4eee1));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x5cbd(){const _0x163a3e=['array','object','week','isArray','string','number','1470615oBZAxh','5257mreVar','20712iAcxfa','stages','lazy','journey','306PpeVsr','ab_test','wait','507924PXebqs','type','2078736ZHpVjP','day','min','literal','record','53uPeejG','jump','length','boolean','1550895DmsuhA','optional','reentry_always','simulation','310hINVjH','merge','versions','activation','draft','decision_point','enum','launched','discriminatedUnion','1194032gnqcMU'];a161_0x5cbd=function(){return _0x163a3e;};return a161_0x5cbd();}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0xc4667b(0x75)]([a161_0xc4667b(0x73),a161_0xc4667b(0x96),a161_0xc4667b(0x76)]);export const ReentryModeTypeSchema=z[a161_0xc4667b(0x75)](['no_reentry','reentry_unless_goal_achieved',a161_0xc4667b(0x95)]);export const WaitUnitTypeSchema=z['enum']([a161_0xc4667b(0x8b),a161_0xc4667b(0x7b)]);export const StepTypeValueSchema=z[a161_0xc4667b(0x75)]([a161_0xc4667b(0x87),a161_0xc4667b(0x72),a161_0xc4667b(0x74),a161_0xc4667b(0x86),a161_0xc4667b(0x98),a161_0xc4667b(0x90),'end']);export const EmbeddedSegmentDefSchema=z[a161_0xc4667b(0x7a)]({'description':z[a161_0xc4667b(0x7d)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0xc4667b(0x7a)]({'journey':z['string'](),'stage':z[a161_0xc4667b(0x7d)](),'bundle_id':z[a161_0xc4667b(0x7d)]()['optional']()});export const CriteriaDefSchema=z[a161_0xc4667b(0x7a)]({'name':z[a161_0xc4667b(0x7d)](),'description':z[a161_0xc4667b(0x7d)]()['optional'](),'segment':z[a161_0xc4667b(0x7d)](),'target':JumpTargetDefSchema[a161_0xc4667b(0x94)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0xc4667b(0x7e)](),'unit':WaitUnitTypeSchema,'next':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)]()}),WaitConditionDefSchema=z[a161_0xc4667b(0x7a)]({'segment':z[a161_0xc4667b(0x7d)](),'next':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'timeout':WaitConditionTimeoutDefSchema[a161_0xc4667b(0x94)]()}),WaitStepParamsDefSchema=z[a161_0xc4667b(0x7a)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema[a161_0xc4667b(0x94)](),'wait_until':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'condition':WaitConditionDefSchema[a161_0xc4667b(0x94)](),'days_of_week':z[a161_0xc4667b(0x79)](z[a161_0xc4667b(0x7d)]())[a161_0xc4667b(0x94)]()}),StepBaseFields={'name':z[a161_0xc4667b(0x7d)](),'uuid':z[a161_0xc4667b(0x7d)]()['optional'](),'next':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)]()},WaitStepDefSchema=z[a161_0xc4667b(0x7a)]({...StepBaseFields,'type':z['literal'](a161_0xc4667b(0x87)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0xc4667b(0x7a)]({'activation':z[a161_0xc4667b(0x7d)]()}),ActivationStepDefSchema=z[a161_0xc4667b(0x7a)]({...StepBaseFields,'type':z[a161_0xc4667b(0x8d)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0xc4667b(0x7a)]({'name':z['string'](),'segment':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'segment_id':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'excluded':z[a161_0xc4667b(0x92)]()[a161_0xc4667b(0x94)](),'next':z['string']()[a161_0xc4667b(0x94)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0xc4667b(0x79)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0xc4667b(0x7a)]({...StepBaseFields,'type':z[a161_0xc4667b(0x8d)](a161_0xc4667b(0x74)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0xc4667b(0x7a)]({'id':z['string']()['optional'](),'name':z['string'](),'percentage':z[a161_0xc4667b(0x7e)](),'next':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a161_0xc4667b(0x79)](AbTestVariantDefSchema),'unique_id':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'customized_split':z[a161_0xc4667b(0x92)]()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0xc4667b(0x8d)](a161_0xc4667b(0x86)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0xc4667b(0x7a)]({...StepBaseFields,'type':z[a161_0xc4667b(0x8d)](a161_0xc4667b(0x98))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0xc4667b(0x7a)]({...StepBaseFields,'type':z[a161_0xc4667b(0x8d)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0xc4667b(0x7a)]({...StepBaseFields,'type':z['literal']('end')})['passthrough']();export const StepDefSchema=z[a161_0xc4667b(0x77)](a161_0xc4667b(0x89),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0xc4667b(0x7a)]({'name':z[a161_0xc4667b(0x7d)](),'description':z[a161_0xc4667b(0x7d)]()['optional'](),'id':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'entry_criteria':CriteriaDefSchema[a161_0xc4667b(0x94)](),'exit_criteria':z[a161_0xc4667b(0x79)](CriteriaDefSchema)[a161_0xc4667b(0x94)](),'milestone':CriteriaDefSchema[a161_0xc4667b(0x94)](),'root_step':z['string']()[a161_0xc4667b(0x94)](),'steps':z['array'](StepDefSchema)[a161_0xc4667b(0x94)]()});export const JourneyEntryDefSchema=z[a161_0xc4667b(0x7a)]({'name':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'version':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'state':JourneyStateTypeSchema[a161_0xc4667b(0x94)](),'latest':z[a161_0xc4667b(0x92)]()[a161_0xc4667b(0x94)](),'stages':z['array'](StageDefSchema),'id':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'version_number':z[a161_0xc4667b(0x7e)]()['optional'](),'goal':CriteriaDefSchema[a161_0xc4667b(0x94)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a161_0xc4667b(0x83)](()=>z[a161_0xc4667b(0x7a)]({'type':z[a161_0xc4667b(0x8d)](a161_0xc4667b(0x84)),'name':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x8c)](0x1,'Journey\x20name\x20is\x20required'),'description':z['string']()[a161_0xc4667b(0x94)](),'bundle_id':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'bundle_name':z[a161_0xc4667b(0x7d)]()[a161_0xc4667b(0x94)](),'folder_id':z['string']()[a161_0xc4667b(0x94)](),'reentry':ReentryModeTypeSchema[a161_0xc4667b(0x94)](),'allow_reentry':z['boolean']()[a161_0xc4667b(0x94)](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()[a161_0xc4667b(0x94)](),'version':z['string']()[a161_0xc4667b(0x94)](),'version_number':z[a161_0xc4667b(0x7e)]()[a161_0xc4667b(0x94)](),'stages':z[a161_0xc4667b(0x79)](StageDefSchema)[a161_0xc4667b(0x94)](),'versions':z[a161_0xc4667b(0x79)](JourneyEntryDefSchema)[a161_0xc4667b(0x94)](),'journeys':z[a161_0xc4667b(0x79)](JourneyEntryDefSchema)[a161_0xc4667b(0x94)](),'segments':z[a161_0xc4667b(0x8e)](z[a161_0xc4667b(0x7d)](),EmbeddedSegmentDefSchema)[a161_0xc4667b(0x94)](),'activations':z['record'](z[a161_0xc4667b(0x7d)](),ActivationDefSchema)['optional']()})['refine'](_0x22e42d=>{const _0x23f75d=a161_0xc4667b,_0x221639=[_0x22e42d['journeys'],_0x22e42d[_0x23f75d(0x82)],_0x22e42d[_0x23f75d(0x99)]]['filter'](_0x289b4b=>Array[_0x23f75d(0x7c)](_0x289b4b)&&_0x289b4b[_0x23f75d(0x91)]>0x0)['length'];return _0x221639===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x249fc6=a161_0x143e;function a161_0x399e(){const _0x429e3d=['type','launched','string','16YXxdAE','length','journeys','428932zRSMBv','wait','end','week','4197672dNqniO','no_reentry','draft','discriminatedUnion','min','enum','literal','jump','number','journey','record','decision_point','ab_test','object','3635001QBCKos','5WLNXXx','optional','reentry_unless_goal_achieved','lazy','refine','233954wBWlEl','184722pRXTRU','isArray','boolean','886676JhpxeL','reentry_always','array','28REPZTC','simulation','35499178dSIZKT','merge','20aJLuzn','versions'];a161_0x399e=function(){return _0x429e3d;};return a161_0x399e();}(function(_0x38b7ea,_0x2d4be4){const _0x5c16e2=a161_0x143e,_0x1d9528=_0x38b7ea();while(!![]){try{const _0x52b055=-parseInt(_0x5c16e2(0x85))/0x1+parseInt(_0x5c16e2(0x8c))/0x2*(-parseInt(_0x5c16e2(0x86))/0x3)+-parseInt(_0x5c16e2(0x89))/0x4*(parseInt(_0x5c16e2(0xab))/0x5)+-parseInt(_0x5c16e2(0x9c))/0x6+-parseInt(_0x5c16e2(0x98))/0x7*(-parseInt(_0x5c16e2(0x95))/0x8)+-parseInt(_0x5c16e2(0xaa))/0x9*(parseInt(_0x5c16e2(0x90))/0xa)+parseInt(_0x5c16e2(0x8e))/0xb;if(_0x52b055===_0x2d4be4)break;else _0x1d9528['push'](_0x1d9528['shift']());}catch(_0x259fbc){_0x1d9528['push'](_0x1d9528['shift']());}}}(a161_0x399e,0x8019d));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x249fc6(0xa1)]([a161_0x249fc6(0x9e),a161_0x249fc6(0x8d),a161_0x249fc6(0x93)]);export const ReentryModeTypeSchema=z['enum']([a161_0x249fc6(0x9d),a161_0x249fc6(0x82),a161_0x249fc6(0x8a)]);export const WaitUnitTypeSchema=z[a161_0x249fc6(0xa1)](['day',a161_0x249fc6(0x9b)]);export const StepTypeValueSchema=z['enum']([a161_0x249fc6(0x99),'activation',a161_0x249fc6(0xa7),a161_0x249fc6(0xa8),a161_0x249fc6(0x8f),a161_0x249fc6(0xa3),'end']);export const EmbeddedSegmentDefSchema=z[a161_0x249fc6(0xa9)]({'description':z['string']()[a161_0x249fc6(0x81)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x249fc6(0xa9)]({'journey':z['string'](),'stage':z[a161_0x249fc6(0x94)](),'bundle_id':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)]()});export const CriteriaDefSchema=z[a161_0x249fc6(0xa9)]({'name':z[a161_0x249fc6(0x94)](),'description':z[a161_0x249fc6(0x94)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z[a161_0x249fc6(0xa9)]({'duration':z[a161_0x249fc6(0xa4)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)]()}),WaitConditionDefSchema=z[a161_0x249fc6(0xa9)]({'segment':z[a161_0x249fc6(0x94)](),'next':z['string']()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a161_0x249fc6(0x81)]()}),WaitStepParamsDefSchema=z[a161_0x249fc6(0xa9)]({'duration':z[a161_0x249fc6(0xa4)]()[a161_0x249fc6(0x81)](),'unit':WaitUnitTypeSchema[a161_0x249fc6(0x81)](),'wait_until':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'condition':WaitConditionDefSchema[a161_0x249fc6(0x81)](),'days_of_week':z[a161_0x249fc6(0x8b)](z[a161_0x249fc6(0x94)]())['optional']()}),StepBaseFields={'name':z[a161_0x249fc6(0x94)](),'uuid':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'next':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)]()},WaitStepDefSchema=z[a161_0x249fc6(0xa9)]({...StepBaseFields,'type':z[a161_0x249fc6(0xa2)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x249fc6(0xa9)]({'activation':z[a161_0x249fc6(0x94)]()}),ActivationStepDefSchema=z[a161_0x249fc6(0xa9)]({...StepBaseFields,'type':z[a161_0x249fc6(0xa2)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x249fc6(0xa9)]({'name':z['string'](),'segment':z[a161_0x249fc6(0x94)]()['optional'](),'segment_id':z['string']()[a161_0x249fc6(0x81)](),'excluded':z['boolean']()[a161_0x249fc6(0x81)](),'next':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)]()}),DecisionPointStepParamsDefSchema=z[a161_0x249fc6(0xa9)]({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x249fc6(0xa9)]({...StepBaseFields,'type':z[a161_0x249fc6(0xa2)](a161_0x249fc6(0xa7)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x249fc6(0xa9)]({'id':z[a161_0x249fc6(0x94)]()['optional'](),'name':z['string'](),'percentage':z[a161_0x249fc6(0xa4)](),'next':z['string']()[a161_0x249fc6(0x81)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x249fc6(0x81)](),'customized_split':z[a161_0x249fc6(0x88)]()[a161_0x249fc6(0x81)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x249fc6(0xa2)](a161_0x249fc6(0xa8)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x249fc6(0xa9)]({...StepBaseFields,'type':z['literal'](a161_0x249fc6(0x8f))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x249fc6(0xa9)]({...StepBaseFields,'type':z['literal'](a161_0x249fc6(0xa3)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x249fc6(0xa9)]({...StepBaseFields,'type':z[a161_0x249fc6(0xa2)](a161_0x249fc6(0x9a))})['passthrough']();function a161_0x143e(_0xc34b0d,_0x4ab24b){_0xc34b0d=_0xc34b0d-0x81;const _0x399e3c=a161_0x399e();let _0x143eab=_0x399e3c[_0xc34b0d];return _0x143eab;}export const StepDefSchema=z[a161_0x249fc6(0x9f)](a161_0x249fc6(0x92),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x249fc6(0xa9)]({'name':z[a161_0x249fc6(0x94)](),'description':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'id':z[a161_0x249fc6(0x94)]()['optional'](),'entry_criteria':CriteriaDefSchema[a161_0x249fc6(0x81)](),'exit_criteria':z[a161_0x249fc6(0x8b)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x249fc6(0x81)](),'root_step':z['string']()[a161_0x249fc6(0x81)](),'steps':z[a161_0x249fc6(0x8b)](StepDefSchema)[a161_0x249fc6(0x81)]()});export const JourneyEntryDefSchema=z[a161_0x249fc6(0xa9)]({'name':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'version':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'state':JourneyStateTypeSchema[a161_0x249fc6(0x81)](),'latest':z[a161_0x249fc6(0x88)]()[a161_0x249fc6(0x81)](),'stages':z['array'](StageDefSchema),'id':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'version_number':z['number']()['optional'](),'goal':CriteriaDefSchema[a161_0x249fc6(0x81)](),'reentry':ReentryModeTypeSchema[a161_0x249fc6(0x81)]()});export const JourneyDefSchema=z[a161_0x249fc6(0x83)](()=>z[a161_0x249fc6(0xa9)]({'type':z['literal'](a161_0x249fc6(0xa5)),'name':z['string']()[a161_0x249fc6(0xa0)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x249fc6(0x94)]()['optional'](),'bundle_id':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'bundle_name':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'folder_id':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'reentry':ReentryModeTypeSchema[a161_0x249fc6(0x81)](),'allow_reentry':z[a161_0x249fc6(0x88)]()['optional'](),'goal':CriteriaDefSchema['optional'](),'id':z[a161_0x249fc6(0x94)]()[a161_0x249fc6(0x81)](),'version':z['string']()[a161_0x249fc6(0x81)](),'version_number':z[a161_0x249fc6(0xa4)]()[a161_0x249fc6(0x81)](),'stages':z[a161_0x249fc6(0x8b)](StageDefSchema)['optional'](),'versions':z['array'](JourneyEntryDefSchema)['optional'](),'journeys':z[a161_0x249fc6(0x8b)](JourneyEntryDefSchema)['optional'](),'segments':z[a161_0x249fc6(0xa6)](z[a161_0x249fc6(0x94)](),EmbeddedSegmentDefSchema)[a161_0x249fc6(0x81)](),'activations':z[a161_0x249fc6(0xa6)](z[a161_0x249fc6(0x94)](),ActivationDefSchema)['optional']()})[a161_0x249fc6(0x84)](_0x7ac724=>{const _0x4696e6=a161_0x249fc6,_0xa44900=[_0x7ac724[_0x4696e6(0x97)],_0x7ac724['stages'],_0x7ac724[_0x4696e6(0x91)]]['filter'](_0x54dee6=>Array[_0x4696e6(0x87)](_0x54dee6)&&_0x54dee6[_0x4696e6(0x96)]>0x0)[_0x4696e6(0x96)];return _0xa44900===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x26e1ae,_0x17a03e){var _0x371314=a163_0x4c47,_0x1d61fa=_0x26e1ae();while(!![]){try{var _0x2c8781=parseInt(_0x371314(0x15e))/0x1*(parseInt(_0x371314(0x15d))/0x2)+-parseInt(_0x371314(0x15c))/0x3+-parseInt(_0x371314(0x15b))/0x4*(parseInt(_0x371314(0x161))/0x5)+parseInt(_0x371314(0x157))/0x6*(parseInt(_0x371314(0x15f))/0x7)+parseInt(_0x371314(0x159))/0x8*(parseInt(_0x371314(0x158))/0x9)+-parseInt(_0x371314(0x15a))/0xa+-parseInt(_0x371314(0x156))/0xb*(parseInt(_0x371314(0x160))/0xc);if(_0x2c8781===_0x17a03e)break;else _0x1d61fa['push'](_0x1d61fa['shift']());}catch(_0x10d791){_0x1d61fa['push'](_0x1d61fa['shift']());}}}(a163_0x4094,0x583d5));function a163_0x4094(){var _0x255335=['472266MBUwLL','96qPffNx','2691390BRDgun','664jQKDhU','72528PllfCn','18516HZXqEA','67QhEXob','1764077aIBtiR','12fuggKS','2315wCycul','8474213eSroji','6fvXyZp'];a163_0x4094=function(){return _0x255335;};return a163_0x4094();}function a163_0x4c47(_0x4a1a71,_0x296be0){_0x4a1a71=_0x4a1a71-0x156;var _0x4094a0=a163_0x4094();var _0x4c4794=_0x4094a0[_0x4a1a71];return _0x4c4794;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x3989a0,_0x1e0ecc){var _0x38770e=a163_0x1b9f,_0x1be240=_0x3989a0();while(!![]){try{var _0x31dea1=-parseInt(_0x38770e(0xe0))/0x1+-parseInt(_0x38770e(0xe2))/0x2+parseInt(_0x38770e(0xdb))/0x3*(parseInt(_0x38770e(0xe1))/0x4)+-parseInt(_0x38770e(0xdc))/0x5*(-parseInt(_0x38770e(0xdf))/0x6)+-parseInt(_0x38770e(0xe4))/0x7*(-parseInt(_0x38770e(0xda))/0x8)+parseInt(_0x38770e(0xe3))/0x9+parseInt(_0x38770e(0xdd))/0xa*(-parseInt(_0x38770e(0xde))/0xb);if(_0x31dea1===_0x1e0ecc)break;else _0x1be240['push'](_0x1be240['shift']());}catch(_0x82ddcb){_0x1be240['push'](_0x1be240['shift']());}}}(a163_0x1107,0x9ddd7));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0x1b9f(_0x3c01f5,_0x54bf03){_0x3c01f5=_0x3c01f5-0xda;var _0x11077e=a163_0x1107();var _0x1b9f3b=_0x11077e[_0x3c01f5];return _0x1b9f3b;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a163_0x1107(){var _0x1ec16b=['1241964YIvNMJ','5587498kQAcIZ','8zTugCI','6iZaNnu','5wsHlaL','94260MKjXqt','1727xnxOqJ','5181360HvAuSv','181961ksZick','1840172wwguox','822796gSPeoS'];a163_0x1107=function(){return _0x1ec16b;};return a163_0x1107();}
@@ -1 +1 @@
1
- const a164_0x5cabbe=a164_0x1d82;(function(_0x1f7665,_0x4b7171){const _0x571f1e=a164_0x1d82,_0x254cc9=_0x1f7665();while(!![]){try{const _0x2b6af5=parseInt(_0x571f1e(0x213))/0x1*(parseInt(_0x571f1e(0x21f))/0x2)+-parseInt(_0x571f1e(0x216))/0x3+parseInt(_0x571f1e(0x20e))/0x4+-parseInt(_0x571f1e(0x1f8))/0x5*(-parseInt(_0x571f1e(0x1fb))/0x6)+-parseInt(_0x571f1e(0x235))/0x7+parseInt(_0x571f1e(0x226))/0x8*(parseInt(_0x571f1e(0x223))/0x9)+-parseInt(_0x571f1e(0x210))/0xa;if(_0x2b6af5===_0x4b7171)break;else _0x254cc9['push'](_0x254cc9['shift']());}catch(_0x50cea7){_0x254cc9['push'](_0x254cc9['shift']());}}}(a164_0x44db,0x2c7c3));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x5cabbe(0x1f9)]([a164_0x5cabbe(0x1f3),a164_0x5cabbe(0x232),a164_0x5cabbe(0x22f),a164_0x5cabbe(0x236),a164_0x5cabbe(0x21e),'In',a164_0x5cabbe(0x228),a164_0x5cabbe(0x204),'IsNull',a164_0x5cabbe(0x1f5),'TimeWithinNext','Contain','StartWith',a164_0x5cabbe(0x239),a164_0x5cabbe(0x230)]);export const TimeUnitSchema=z['enum']([a164_0x5cabbe(0x23b),'minute',a164_0x5cabbe(0x22a),a164_0x5cabbe(0x211),a164_0x5cabbe(0x1f2),a164_0x5cabbe(0x23d),a164_0x5cabbe(0x217)]);export const AggregationTypeSchema=z['enum'](['Count','Sum',a164_0x5cabbe(0x233),a164_0x5cabbe(0x22c),a164_0x5cabbe(0x21c),'CountDistinct','First',a164_0x5cabbe(0x205)]);function a164_0x1d82(_0x2fccc1,_0x3b0c21){_0x2fccc1=_0x2fccc1-0x1f0;const _0x44db60=a164_0x44db();let _0x1d82e8=_0x44db60[_0x2fccc1];return _0x1d82e8;}const TemporalValueSchema=z[a164_0x5cabbe(0x206)]([z[a164_0x5cabbe(0x20d)]({'timestamp':z[a164_0x5cabbe(0x208)]()}),z[a164_0x5cabbe(0x20d)]({'last':z['union']([z[a164_0x5cabbe(0x238)](),z[a164_0x5cabbe(0x20c)](z['string'](),z[a164_0x5cabbe(0x238)]())]),'unit':z[a164_0x5cabbe(0x208)]()})]),OperatorValueSchema=z[a164_0x5cabbe(0x206)]([z['string'](),z[a164_0x5cabbe(0x238)](),z['boolean'](),TemporalValueSchema,z[a164_0x5cabbe(0x234)](z['union']([z[a164_0x5cabbe(0x208)](),z[a164_0x5cabbe(0x238)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x5cabbe(0x232),a164_0x5cabbe(0x236),a164_0x5cabbe(0x22f),a164_0x5cabbe(0x21e),'In',a164_0x5cabbe(0x20b),'StartWith',a164_0x5cabbe(0x239),a164_0x5cabbe(0x204),a164_0x5cabbe(0x1f5),a164_0x5cabbe(0x212)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x5cabbe(0x1f5),a164_0x5cabbe(0x212)]);export const OperatorDefSchema=z[a164_0x5cabbe(0x20d)]({'type':OperatorTypeSchema,'not':z[a164_0x5cabbe(0x237)]()[a164_0x5cabbe(0x23a)](),'value':OperatorValueSchema['optional'](),'min':z[a164_0x5cabbe(0x206)]([z[a164_0x5cabbe(0x238)](),z[a164_0x5cabbe(0x208)](),TemporalValueSchema])[a164_0x5cabbe(0x23a)](),'max':z['union']([z[a164_0x5cabbe(0x238)](),z['string'](),TemporalValueSchema])[a164_0x5cabbe(0x23a)](),'unit':TimeUnitSchema[a164_0x5cabbe(0x23a)](),'duration':z['object']({'day':z[a164_0x5cabbe(0x238)]()['optional'](),'week':z['number']()[a164_0x5cabbe(0x23a)](),'month':z[a164_0x5cabbe(0x238)]()['optional'](),'year':z[a164_0x5cabbe(0x238)]()[a164_0x5cabbe(0x23a)](),'hour':z['number']()[a164_0x5cabbe(0x23a)](),'minute':z[a164_0x5cabbe(0x238)]()[a164_0x5cabbe(0x23a)](),'second':z[a164_0x5cabbe(0x238)]()[a164_0x5cabbe(0x23a)]()})[a164_0x5cabbe(0x23a)](),'from':z[a164_0x5cabbe(0x20d)]({'last':z[a164_0x5cabbe(0x206)]([z[a164_0x5cabbe(0x238)](),z['string']()]),'unit':TimeUnitSchema})[a164_0x5cabbe(0x23a)](),'reverse':z[a164_0x5cabbe(0x237)]()[a164_0x5cabbe(0x23a)]()})['superRefine']((_0xc4ac69,_0x4964f9)=>{const _0x136b6e=a164_0x5cabbe;OPERATORS_REQUIRING_VALUE[_0x136b6e(0x202)](_0xc4ac69[_0x136b6e(0x1fc)])&&(_0xc4ac69[_0x136b6e(0x1fd)]===undefined||_0xc4ac69[_0x136b6e(0x1fd)]===null)&&_0x4964f9[_0x136b6e(0x23c)]({'code':_0x136b6e(0x21d),'message':_0x136b6e(0x218)+_0xc4ac69['type']+_0x136b6e(0x1fa),'path':[_0x136b6e(0x1fd)]}),_0xc4ac69[_0x136b6e(0x1fc)]===_0x136b6e(0x228)&&_0xc4ac69[_0x136b6e(0x222)]===undefined&&_0xc4ac69[_0x136b6e(0x207)]===undefined&&_0x4964f9[_0x136b6e(0x23c)]({'code':_0x136b6e(0x21d),'message':_0x136b6e(0x1ff),'params':{'validationCode':_0x136b6e(0x1f0)}}),OPERATORS_REQUIRING_UNIT[_0x136b6e(0x202)](_0xc4ac69[_0x136b6e(0x1fc)])&&_0xc4ac69[_0x136b6e(0x1fd)]!==undefined&&!_0xc4ac69[_0x136b6e(0x220)]&&_0x4964f9[_0x136b6e(0x23c)]({'code':_0x136b6e(0x21d),'message':_0x136b6e(0x218)+_0xc4ac69[_0x136b6e(0x1fc)]+_0x136b6e(0x1f4),'path':[_0x136b6e(0x220)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0xc4ac69[_0x136b6e(0x1fc)]===_0x136b6e(0x230)&&(!_0xc4ac69['duration']&&_0x4964f9[_0x136b6e(0x23c)]({'code':_0x136b6e(0x21d),'message':_0x136b6e(0x200),'path':['duration']}),!_0xc4ac69['from']&&_0x4964f9[_0x136b6e(0x23c)]({'code':_0x136b6e(0x21d),'message':_0x136b6e(0x231),'path':['from']}));});export const ArrayMatchingSchema=z['union']([z[a164_0x5cabbe(0x20a)](a164_0x5cabbe(0x221)),z['literal'](a164_0x5cabbe(0x225)),z['object']({'atLeast':z[a164_0x5cabbe(0x238)]()}),z[a164_0x5cabbe(0x20d)]({'atMost':z[a164_0x5cabbe(0x238)]()}),z[a164_0x5cabbe(0x20d)]({'exactly':z[a164_0x5cabbe(0x238)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x5cabbe(0x1fc),[z['object']({'type':z['enum']([a164_0x5cabbe(0x22b),a164_0x5cabbe(0x22c),a164_0x5cabbe(0x21c),a164_0x5cabbe(0x233)]),'column':z[a164_0x5cabbe(0x208)](),'groupingColumns':z['array'](z['string']())[a164_0x5cabbe(0x23a)]()}),z[a164_0x5cabbe(0x20d)]({'type':z[a164_0x5cabbe(0x20a)](a164_0x5cabbe(0x22d)),'groupingColumns':z['array'](z['string']())[a164_0x5cabbe(0x23a)]()}),z[a164_0x5cabbe(0x20d)]({'type':z['literal'](a164_0x5cabbe(0x201)),'columns':z[a164_0x5cabbe(0x234)](z[a164_0x5cabbe(0x208)]())}),z['object']({'type':z[a164_0x5cabbe(0x1f9)]([a164_0x5cabbe(0x1f1),a164_0x5cabbe(0x205)]),'column':z[a164_0x5cabbe(0x208)](),'orderColumn':z[a164_0x5cabbe(0x208)](),'groupingColumns':z[a164_0x5cabbe(0x234)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z[a164_0x5cabbe(0x20d)]({'duration':z[a164_0x5cabbe(0x238)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x5cabbe(0x1f5),a164_0x5cabbe(0x212),'TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x5cabbe(0x20d)]({'type':z['literal'](a164_0x5cabbe(0x1f6)),'column':z[a164_0x5cabbe(0x208)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cabbe(0x23a)]()})[a164_0x5cabbe(0x20f)]((_0x3cb730,_0x1089d2)=>{const _0xc8b093=a164_0x5cabbe,_0x3ffea8=_0x3cb730[_0xc8b093(0x214)][_0xc8b093(0x1fc)];_0x3cb730[_0xc8b093(0x224)]==='timestamp'?!TIMESTAMP_OPERATORS[_0xc8b093(0x202)](_0x3ffea8)&&_0x1089d2[_0xc8b093(0x23c)]({'code':_0xc8b093(0x21d),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x3ffea8+'\x27)','path':[_0xc8b093(0x214),_0xc8b093(0x1fc)]}):TIMESTAMP_OPERATORS[_0xc8b093(0x202)](_0x3ffea8)&&_0x1089d2['addIssue']({'code':_0xc8b093(0x21d),'message':_0xc8b093(0x218)+_0x3ffea8+_0xc8b093(0x203),'path':[_0xc8b093(0x214),_0xc8b093(0x1fc)]});});export const FilterRuleDefSchema=z[a164_0x5cabbe(0x20d)]({'type':z['literal'](a164_0x5cabbe(0x209)),'conditions':z[a164_0x5cabbe(0x234)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a164_0x5cabbe(0x20d)]({'type':z['literal'](a164_0x5cabbe(0x219)),'attribute':z[a164_0x5cabbe(0x208)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x5cabbe(0x237)]()[a164_0x5cabbe(0x23a)](),'aggregation':AggregationDefSchema[a164_0x5cabbe(0x23a)](),'source':z[a164_0x5cabbe(0x208)]()[a164_0x5cabbe(0x23a)](),'filter':FilterRuleDefSchema[a164_0x5cabbe(0x23a)](),'limit':z['number']()[a164_0x5cabbe(0x23a)]()}));export const BehaviorConditionDefSchema=z[a164_0x5cabbe(0x215)](()=>z[a164_0x5cabbe(0x20d)]({'type':z[a164_0x5cabbe(0x20a)](a164_0x5cabbe(0x1fe)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cabbe(0x23a)](),'exclude':z[a164_0x5cabbe(0x237)]()[a164_0x5cabbe(0x23a)](),'aggregation':AggregationDefSchema[a164_0x5cabbe(0x23a)](),'source':z[a164_0x5cabbe(0x208)]()[a164_0x5cabbe(0x23a)](),'filter':FilterRuleDefSchema[a164_0x5cabbe(0x23a)](),'timeWindow':TimeWindowDefSchema[a164_0x5cabbe(0x23a)](),'limit':z[a164_0x5cabbe(0x238)]()[a164_0x5cabbe(0x23a)]()}));export const ColumnConditionDefSchema=z[a164_0x5cabbe(0x20d)]({'type':z[a164_0x5cabbe(0x20a)]('Column'),'column':z[a164_0x5cabbe(0x208)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x5cabbe(0x215)](()=>z['object']({'type':z[a164_0x5cabbe(0x1f9)](['And','Or']),'conditions':z[a164_0x5cabbe(0x234)](ConditionDefSchema),'description':z[a164_0x5cabbe(0x208)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a164_0x5cabbe(0x20d)]({'type':z['enum']([a164_0x5cabbe(0x1f7),a164_0x5cabbe(0x22e)]),'segment':z['string']()[a164_0x5cabbe(0x222)](0x1,a164_0x5cabbe(0x21b))});export const ConditionDefSchema=z[a164_0x5cabbe(0x215)](()=>z[a164_0x5cabbe(0x206)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));function a164_0x44db(){const _0xca5c58=['1150245rvZyFI','column','all','8ONYylv','realtime','Between','funnel_stage','hour','Sum','Min','Count','exclude','Less','TimeRange','TimeRange\x20operator\x20requires\x20\x27from\x27','Greater','Average','array','8239EzYYvu','GreaterEqual','boolean','number','EndWith','optional','second','addIssue','month','MISSING_BETWEEN_BOUNDS','First','week','Equal','\x27\x20requires\x20a\x20time\x20unit','TimeWithinPast','Column','include','5CwiCLr','enum','\x27\x20requires\x20a\x20value','1024962QKbGZO','type','value','Behavior','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','TimeRange\x20operator\x20requires\x20\x27duration\x27','CountDistinct','has','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Regexp','Last','union','max','string','And','literal','Contain','record','object','344996heyTIj','superRefine','1912700rGsxxW','day','TimeWithinNext','30866YvgyEJ','operator','lazy','401061LugGaJ','year','Operator\x20\x27','Value','segment','Segment\x20reference\x20must\x20not\x20be\x20empty','Max','custom','LessEqual','8mmLPgX','unit','any','min'];a164_0x44db=function(){return _0xca5c58;};return a164_0x44db();}export const RuleDefSchema=z['lazy'](()=>z['object']({'type':z[a164_0x5cabbe(0x1f9)]([a164_0x5cabbe(0x209),'Or']),'conditions':z[a164_0x5cabbe(0x234)](ConditionDefSchema),'description':z[a164_0x5cabbe(0x208)]()['optional']()}));export const SegmentDefSchema=z[a164_0x5cabbe(0x20d)]({'type':z[a164_0x5cabbe(0x20a)](a164_0x5cabbe(0x21a))[a164_0x5cabbe(0x23a)](),'name':z[a164_0x5cabbe(0x208)]()[a164_0x5cabbe(0x222)](0x1,'Segment\x20name\x20is\x20required'),'description':z['string']()[a164_0x5cabbe(0x23a)](),'folder':z[a164_0x5cabbe(0x208)]()[a164_0x5cabbe(0x23a)](),'rule':RuleDefSchema[a164_0x5cabbe(0x23a)](),'kind':z[a164_0x5cabbe(0x1f9)](['batch',a164_0x5cabbe(0x227),a164_0x5cabbe(0x229)])['optional'](),'visible':z[a164_0x5cabbe(0x237)]()[a164_0x5cabbe(0x23a)](),'activations':z[a164_0x5cabbe(0x234)](z[a164_0x5cabbe(0x221)]())[a164_0x5cabbe(0x23a)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ function a164_0x4ee4(_0xf40a89,_0x4516a6){_0xf40a89=_0xf40a89-0x143;const _0x492c5e=a164_0x492c();let _0x4ee44e=_0x492c5e[_0xf40a89];return _0x4ee44e;}const a164_0x51f226=a164_0x4ee4;(function(_0x399052,_0x28dd84){const _0x889808=a164_0x4ee4,_0x575677=_0x399052();while(!![]){try{const _0x2a8f7e=parseInt(_0x889808(0x161))/0x1*(parseInt(_0x889808(0x196))/0x2)+-parseInt(_0x889808(0x148))/0x3*(parseInt(_0x889808(0x17c))/0x4)+parseInt(_0x889808(0x183))/0x5*(parseInt(_0x889808(0x185))/0x6)+parseInt(_0x889808(0x14e))/0x7*(parseInt(_0x889808(0x159))/0x8)+-parseInt(_0x889808(0x170))/0x9*(-parseInt(_0x889808(0x164))/0xa)+parseInt(_0x889808(0x18c))/0xb*(-parseInt(_0x889808(0x195))/0xc)+parseInt(_0x889808(0x152))/0xd*(-parseInt(_0x889808(0x168))/0xe);if(_0x2a8f7e===_0x28dd84)break;else _0x575677['push'](_0x575677['shift']());}catch(_0x13c340){_0x575677['push'](_0x575677['shift']());}}}(a164_0x492c,0xb6309));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a164_0x51f226(0x172),a164_0x51f226(0x157),a164_0x51f226(0x171),a164_0x51f226(0x146),a164_0x51f226(0x14f),'In',a164_0x51f226(0x16a),a164_0x51f226(0x15a),a164_0x51f226(0x17a),a164_0x51f226(0x165),'TimeWithinNext','Contain',a164_0x51f226(0x176),a164_0x51f226(0x178),a164_0x51f226(0x18b)]);export const TimeUnitSchema=z[a164_0x51f226(0x197)]([a164_0x51f226(0x193),a164_0x51f226(0x179),a164_0x51f226(0x186),a164_0x51f226(0x154),a164_0x51f226(0x174),a164_0x51f226(0x192),a164_0x51f226(0x173)]);export const AggregationTypeSchema=z['enum']([a164_0x51f226(0x156),a164_0x51f226(0x16b),a164_0x51f226(0x145),'Min','Max',a164_0x51f226(0x18d),a164_0x51f226(0x166),a164_0x51f226(0x181)]);const TemporalValueSchema=z['union']([z['object']({'timestamp':z[a164_0x51f226(0x143)]()}),z[a164_0x51f226(0x190)]({'last':z[a164_0x51f226(0x188)]([z[a164_0x51f226(0x149)](),z['record'](z[a164_0x51f226(0x143)](),z[a164_0x51f226(0x149)]())]),'unit':z[a164_0x51f226(0x143)]()})]),OperatorValueSchema=z['union']([z[a164_0x51f226(0x143)](),z[a164_0x51f226(0x149)](),z[a164_0x51f226(0x191)](),TemporalValueSchema,z[a164_0x51f226(0x18f)](z['union']([z['string'](),z[a164_0x51f226(0x149)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal','Greater','GreaterEqual',a164_0x51f226(0x171),a164_0x51f226(0x14f),'In','Contain',a164_0x51f226(0x176),'EndWith',a164_0x51f226(0x15a),a164_0x51f226(0x165),a164_0x51f226(0x194)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x51f226(0x165),a164_0x51f226(0x194)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x51f226(0x16c)](),'value':OperatorValueSchema[a164_0x51f226(0x16c)](),'min':z['union']([z[a164_0x51f226(0x149)](),z[a164_0x51f226(0x143)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a164_0x51f226(0x149)](),z[a164_0x51f226(0x143)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a164_0x51f226(0x149)]()[a164_0x51f226(0x16c)](),'week':z['number']()[a164_0x51f226(0x16c)](),'month':z['number']()[a164_0x51f226(0x16c)](),'year':z[a164_0x51f226(0x149)]()['optional'](),'hour':z[a164_0x51f226(0x149)]()[a164_0x51f226(0x16c)](),'minute':z[a164_0x51f226(0x149)]()[a164_0x51f226(0x16c)](),'second':z[a164_0x51f226(0x149)]()[a164_0x51f226(0x16c)]()})[a164_0x51f226(0x16c)](),'from':z['object']({'last':z['union']([z[a164_0x51f226(0x149)](),z[a164_0x51f226(0x143)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x51f226(0x191)]()[a164_0x51f226(0x16c)]()})[a164_0x51f226(0x15d)]((_0x1db412,_0x337075)=>{const _0x17df5d=a164_0x51f226;OPERATORS_REQUIRING_VALUE[_0x17df5d(0x14c)](_0x1db412[_0x17df5d(0x167)])&&(_0x1db412[_0x17df5d(0x182)]===undefined||_0x1db412[_0x17df5d(0x182)]===null)&&_0x337075[_0x17df5d(0x163)]({'code':_0x17df5d(0x15c),'message':_0x17df5d(0x144)+_0x1db412[_0x17df5d(0x167)]+_0x17df5d(0x175),'path':[_0x17df5d(0x182)]}),_0x1db412[_0x17df5d(0x167)]==='Between'&&_0x1db412[_0x17df5d(0x147)]===undefined&&_0x1db412[_0x17df5d(0x187)]===undefined&&_0x337075[_0x17df5d(0x163)]({'code':_0x17df5d(0x15c),'message':_0x17df5d(0x17b),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT['has'](_0x1db412[_0x17df5d(0x167)])&&_0x1db412[_0x17df5d(0x182)]!==undefined&&!_0x1db412[_0x17df5d(0x16d)]&&_0x337075[_0x17df5d(0x163)]({'code':'custom','message':_0x17df5d(0x144)+_0x1db412[_0x17df5d(0x167)]+_0x17df5d(0x153),'path':[_0x17df5d(0x16d)],'params':{'validationCode':_0x17df5d(0x14a)}}),_0x1db412[_0x17df5d(0x167)]===_0x17df5d(0x18b)&&(!_0x1db412[_0x17df5d(0x17d)]&&_0x337075[_0x17df5d(0x163)]({'code':_0x17df5d(0x15c),'message':_0x17df5d(0x160),'path':[_0x17df5d(0x17d)]}),!_0x1db412[_0x17df5d(0x189)]&&_0x337075[_0x17df5d(0x163)]({'code':'custom','message':_0x17df5d(0x15e),'path':['from']}));});export const ArrayMatchingSchema=z['union']([z[a164_0x51f226(0x14b)](a164_0x51f226(0x15f)),z['literal'](a164_0x51f226(0x17f)),z[a164_0x51f226(0x190)]({'atLeast':z['number']()}),z[a164_0x51f226(0x190)]({'atMost':z[a164_0x51f226(0x149)]()}),z[a164_0x51f226(0x190)]({'exactly':z['number']()})]);function a164_0x492c(){const _0x3e7eaa=['Last','value','1595675gqfaBA','operator','18dhVvbJ','hour','max','union','from','lazy','TimeRange','22HwvcFa','CountDistinct','Column','array','object','boolean','month','second','TimeWithinNext','1333740IFMStn','8jZPvsd','enum','string','Operator\x20\x27','Average','GreaterEqual','min','3SKXWPi','number','MISSING_TIME_UNIT','literal','has','Segment\x20name\x20is\x20required','63tLriqO','LessEqual','realtime','Max','23644309SxmvQA','\x27\x20requires\x20a\x20time\x20unit','day','batch','Count','Greater','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','823496UXBxNj','Regexp','segment','custom','superRefine','TimeRange\x20operator\x20requires\x20\x27from\x27','any','TimeRange\x20operator\x20requires\x20\x27duration\x27','295637IIaZHH','And','addIssue','585760IVZrQr','TimeWithinPast','First','type','14CnkFdS','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Between','Sum','optional','unit','Value','exclude','9RhzNaA','Less','Equal','year','week','\x27\x20requires\x20a\x20value','StartWith','discriminatedUnion','EndWith','minute','IsNull','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','1350520yfrSqn','duration','Behavior','all','column'];a164_0x492c=function(){return _0x3e7eaa;};return a164_0x492c();}export const AggregationDefSchema=z[a164_0x51f226(0x177)](a164_0x51f226(0x167),[z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x197)]([a164_0x51f226(0x16b),'Min',a164_0x51f226(0x151),'Average']),'column':z['string'](),'groupingColumns':z[a164_0x51f226(0x18f)](z[a164_0x51f226(0x143)]())[a164_0x51f226(0x16c)]()}),z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x14b)]('Count'),'groupingColumns':z[a164_0x51f226(0x18f)](z[a164_0x51f226(0x143)]())[a164_0x51f226(0x16c)]()}),z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x14b)](a164_0x51f226(0x18d)),'columns':z[a164_0x51f226(0x18f)](z[a164_0x51f226(0x143)]())}),z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x197)]([a164_0x51f226(0x166),a164_0x51f226(0x181)]),'column':z[a164_0x51f226(0x143)](),'orderColumn':z[a164_0x51f226(0x143)](),'groupingColumns':z[a164_0x51f226(0x18f)](z[a164_0x51f226(0x143)]())['optional']()})]);export const TimeWindowDefSchema=z[a164_0x51f226(0x190)]({'duration':z[a164_0x51f226(0x149)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast','TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x51f226(0x190)]({'type':z['literal']('Column'),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})['superRefine']((_0x10cd10,_0x5ab103)=>{const _0x379063=a164_0x51f226,_0x204e8c=_0x10cd10['operator']['type'];_0x10cd10[_0x379063(0x180)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x379063(0x14c)](_0x204e8c)&&_0x5ab103[_0x379063(0x163)]({'code':_0x379063(0x15c),'message':_0x379063(0x169)+_0x204e8c+'\x27)','path':[_0x379063(0x184),_0x379063(0x167)]}):TIMESTAMP_OPERATORS[_0x379063(0x14c)](_0x204e8c)&&_0x5ab103['addIssue']({'code':_0x379063(0x15c),'message':_0x379063(0x144)+_0x204e8c+_0x379063(0x158),'path':[_0x379063(0x184),_0x379063(0x167)]});});export const FilterRuleDefSchema=z[a164_0x51f226(0x190)]({'type':z['literal'](a164_0x51f226(0x162)),'conditions':z[a164_0x51f226(0x18f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x51f226(0x18a)](()=>z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x14b)](a164_0x51f226(0x16e)),'attribute':z[a164_0x51f226(0x143)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a164_0x51f226(0x16c)](),'aggregation':AggregationDefSchema[a164_0x51f226(0x16c)](),'source':z[a164_0x51f226(0x143)]()[a164_0x51f226(0x16c)](),'filter':FilterRuleDefSchema[a164_0x51f226(0x16c)](),'limit':z[a164_0x51f226(0x149)]()[a164_0x51f226(0x16c)]()}));export const BehaviorConditionDefSchema=z[a164_0x51f226(0x18a)](()=>z['object']({'type':z[a164_0x51f226(0x14b)](a164_0x51f226(0x17e)),'attribute':z[a164_0x51f226(0x143)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x51f226(0x16c)](),'exclude':z[a164_0x51f226(0x191)]()[a164_0x51f226(0x16c)](),'aggregation':AggregationDefSchema[a164_0x51f226(0x16c)](),'source':z[a164_0x51f226(0x143)]()[a164_0x51f226(0x16c)](),'filter':FilterRuleDefSchema[a164_0x51f226(0x16c)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a164_0x51f226(0x149)]()[a164_0x51f226(0x16c)]()}));export const ColumnConditionDefSchema=z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x14b)](a164_0x51f226(0x18e)),'column':z[a164_0x51f226(0x143)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x51f226(0x18a)](()=>z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x197)](['And','Or']),'conditions':z[a164_0x51f226(0x18f)](ConditionDefSchema),'description':z[a164_0x51f226(0x143)]()[a164_0x51f226(0x16c)]()}));export const SegmentRefConditionDefSchema=z[a164_0x51f226(0x190)]({'type':z[a164_0x51f226(0x197)](['include',a164_0x51f226(0x16f)]),'segment':z[a164_0x51f226(0x143)]()[a164_0x51f226(0x147)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x51f226(0x18a)](()=>z[a164_0x51f226(0x188)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x51f226(0x18a)](()=>z[a164_0x51f226(0x190)]({'type':z['enum'](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x51f226(0x16c)]()}));export const SegmentDefSchema=z[a164_0x51f226(0x190)]({'type':z['literal'](a164_0x51f226(0x15b))[a164_0x51f226(0x16c)](),'name':z[a164_0x51f226(0x143)]()[a164_0x51f226(0x147)](0x1,a164_0x51f226(0x14d)),'description':z[a164_0x51f226(0x143)]()[a164_0x51f226(0x16c)](),'folder':z[a164_0x51f226(0x143)]()['optional'](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x51f226(0x197)]([a164_0x51f226(0x155),a164_0x51f226(0x150),'funnel_stage'])[a164_0x51f226(0x16c)](),'visible':z[a164_0x51f226(0x191)]()[a164_0x51f226(0x16c)](),'activations':z[a164_0x51f226(0x18f)](z[a164_0x51f226(0x15f)]())[a164_0x51f226(0x16c)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x1c7bf1=a165_0x28b9;(function(_0xa5060e,_0x5f512d){const _0xc1a7a=a165_0x28b9,_0x180531=_0xa5060e();while(!![]){try{const _0x317c1e=-parseInt(_0xc1a7a(0xd2))/0x1*(-parseInt(_0xc1a7a(0xd8))/0x2)+parseInt(_0xc1a7a(0xcd))/0x3*(-parseInt(_0xc1a7a(0xd0))/0x4)+parseInt(_0xc1a7a(0xd6))/0x5*(-parseInt(_0xc1a7a(0xd4))/0x6)+-parseInt(_0xc1a7a(0xe3))/0x7+parseInt(_0xc1a7a(0xeb))/0x8*(parseInt(_0xc1a7a(0xef))/0x9)+-parseInt(_0xc1a7a(0xe0))/0xa*(-parseInt(_0xc1a7a(0xcc))/0xb)+-parseInt(_0xc1a7a(0xe1))/0xc*(-parseInt(_0xc1a7a(0xe5))/0xd);if(_0x317c1e===_0x5f512d)break;else _0x180531['push'](_0x180531['shift']());}catch(_0x2370a9){_0x180531['push'](_0x180531['shift']());}}}(a165_0x4358,0xd9f8b));import{readFileSync}from'fs';import*as a165_0x113459 from'path';import*as a165_0x88b421 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';function a165_0x28b9(_0x374a56,_0xe08872){_0x374a56=_0x374a56-0xcb;const _0x43582f=a165_0x4358();let _0x28b9e1=_0x43582f[_0x374a56];return _0x28b9e1;}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([a165_0x1c7bf1(0xd7),a165_0x1c7bf1(0xd9)]);function a165_0x4358(){const _0x136fec=['parseDocument','2024720dMlHwK','1625748RyKAPf','campaign_type','9944186pCySnQ','YAML_PARSE_ERROR','208hqbwJQ','relative','length','result','campaign','valid','16iKNsew','type','map','skipped','2880414ZBbeCp','segment','22ICjnEa','300TJrPWJ','basename','has','20408cBjcdb','not\x20a\x20','407923ubMIoN','filterType','45114BmBLPz','template','530tyTBrz','email','2qvINvJ','push','message','warnings','journey','object','toJSON'];a165_0x4358=function(){return _0x136fec;};return a165_0x4358();}export function isJourneyDef(_0xe31b80){const _0x182ad8=a165_0x1c7bf1;return typeof _0xe31b80===_0x182ad8(0xdd)&&_0xe31b80!==null&&_0x182ad8(0xec)in _0xe31b80&&_0xe31b80[_0x182ad8(0xec)]===_0x182ad8(0xdc);}export function isCampaignDef(_0x4791df){const _0x3367c6=a165_0x1c7bf1;if(typeof _0x4791df!==_0x3367c6(0xdd)||_0x4791df===null)return![];const _0x406b5d=_0x4791df,_0x5c10eb=VALID_CAMPAIGN_TYPES[_0x3367c6(0xcf)](_0x406b5d[_0x3367c6(0xe2)]);if(_0x406b5d['type']===_0x3367c6(0xe9)&&_0x5c10eb)return!![];if(_0x5c10eb&&!_0x406b5d[_0x3367c6(0xec)])return!![];return![];}export function isTemplateDef(_0x29e58d){const _0x4f1f4f=a165_0x1c7bf1;return typeof _0x29e58d===_0x4f1f4f(0xdd)&&_0x29e58d!==null&&_0x4f1f4f(0xec)in _0x29e58d&&_0x29e58d[_0x4f1f4f(0xec)]===_0x4f1f4f(0xd5);}export function isValidationResult(_0x54c541){const _0x331772=a165_0x1c7bf1;return!(_0x331772(0xee)in _0x54c541);}export function createParseErrorResult(_0x226c82,_0x5c0278,_0x13dd42,_0x4cfaf4,_0x79a94f=a165_0x1c7bf1(0xcb)){const _0x4cabb9=a165_0x1c7bf1;return{'filePath':_0x226c82,'relativePath':_0x5c0278,'source':_0x13dd42,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x4cabb9(0xe4),'message':_0x4cfaf4}],'warnings':[]},'fileType':_0x79a94f};}export function validateYamlFile(_0x115ded,_0x4051cd,_0x224c74={}){const _0x3bf06b=a165_0x1c7bf1,_0x330c97=a165_0x113459[_0x3bf06b(0xe6)](_0x4051cd,_0x115ded)||a165_0x113459[_0x3bf06b(0xce)](_0x115ded);try{const _0x416e67=readFileSync(_0x115ded,'utf-8'),_0x5c989a=a165_0x88b421[_0x3bf06b(0xdf)](_0x416e67),_0x5f0394=_0x5c989a[_0x3bf06b(0xde)]();if(!_0x5f0394)return createParseErrorResult(_0x115ded,_0x330c97,_0x416e67,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x54b70b;if(isJourneyDef(_0x5f0394))_0x54b70b=_0x3bf06b(0xdc);else{if(isCampaignDef(_0x5f0394))_0x54b70b=_0x3bf06b(0xe9);else isTemplateDef(_0x5f0394)?_0x54b70b=_0x3bf06b(0xd5):_0x54b70b=_0x3bf06b(0xcb);}if(_0x224c74['filterType']&&_0x54b70b!==_0x224c74[_0x3bf06b(0xd3)])return{'filePath':_0x115ded,'relativePath':_0x330c97,'skipped':!![],'reason':_0x3bf06b(0xd1)+_0x224c74[_0x3bf06b(0xd3)]};const _0x36da7c={'source':_0x416e67,'document':_0x5c989a};let _0x20797c;if(_0x54b70b===_0x3bf06b(0xdc))_0x20797c=validateJourneyDef(_0x5f0394,_0x36da7c);else{if(_0x54b70b===_0x3bf06b(0xe9))_0x20797c=validateCampaignDef(_0x5f0394,_0x36da7c);else _0x54b70b===_0x3bf06b(0xd5)?_0x20797c=validateTemplateDef(_0x5f0394,_0x36da7c):_0x20797c=validateSegmentDef(_0x5f0394,_0x36da7c);}return{'filePath':_0x115ded,'relativePath':_0x330c97,'source':_0x416e67,'result':_0x20797c,'fileType':_0x54b70b};}catch(_0x82b02b){const _0x568bca=_0x82b02b instanceof Error?_0x82b02b[_0x3bf06b(0xda)]:String(_0x82b02b);return createParseErrorResult(_0x115ded,_0x330c97,'','YAML\x20parse\x20error:\x20'+_0x568bca);}}export function validateYamlFiles(_0x454ab5,_0x436305,_0x3d5c56={}){const _0x2b0fd4=a165_0x1c7bf1;return _0x454ab5[_0x2b0fd4(0xed)](_0x142865=>validateYamlFile(_0x142865,_0x436305,_0x3d5c56));}export function calculateSummary(_0x5ad8d7){const _0x9620c1=a165_0x1c7bf1;let _0x4d0aa8=0x0,_0x46649a=0x0,_0x2ac99d=0x0,_0x5e8a57=0x0;for(const _0x22a1e6 of _0x5ad8d7){if(!isValidationResult(_0x22a1e6)){_0x5e8a57++;continue;}_0x22a1e6[_0x9620c1(0xe8)][_0x9620c1(0xea)]?_0x4d0aa8++:_0x46649a++,_0x2ac99d+=_0x22a1e6[_0x9620c1(0xe8)][_0x9620c1(0xdb)][_0x9620c1(0xe7)];}return{'validCount':_0x4d0aa8,'invalidCount':_0x46649a,'warningCount':_0x2ac99d,'skippedCount':_0x5e8a57,'hasErrors':_0x46649a>0x0};}
1
+ const a165_0x3c163=a165_0x2562;(function(_0xdf782a,_0x402485){const _0x55804c=a165_0x2562,_0x21e21e=_0xdf782a();while(!![]){try{const _0x26f671=-parseInt(_0x55804c(0x189))/0x1*(-parseInt(_0x55804c(0x180))/0x2)+parseInt(_0x55804c(0x18f))/0x3*(parseInt(_0x55804c(0x18a))/0x4)+parseInt(_0x55804c(0x17c))/0x5+-parseInt(_0x55804c(0x193))/0x6+parseInt(_0x55804c(0x17d))/0x7*(parseInt(_0x55804c(0x185))/0x8)+-parseInt(_0x55804c(0x18e))/0x9*(parseInt(_0x55804c(0x177))/0xa)+-parseInt(_0x55804c(0x17f))/0xb*(parseInt(_0x55804c(0x182))/0xc);if(_0x26f671===_0x402485)break;else _0x21e21e['push'](_0x21e21e['shift']());}catch(_0x5e87d5){_0x21e21e['push'](_0x21e21e['shift']());}}}(a165_0x6647,0xc302c));import{readFileSync}from'fs';function a165_0x2562(_0x31dd65,_0x2f206b){_0x31dd65=_0x31dd65-0x172;const _0x6647bc=a165_0x6647();let _0x2562a2=_0x6647bc[_0x31dd65];return _0x2562a2;}import*as a165_0x52dcee from'path';import*as a165_0x27a3f7 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([a165_0x3c163(0x172),a165_0x3c163(0x17e)]);function a165_0x6647(){const _0x5456a9=['3084cWoMqB','has','type','10184GevDAs','error','valid','toJSON','373748xbFMBT','972FSMdwF','basename','journey','campaign','526986Zzwvhr','1041tvrPHx','campaign_type','map','parseDocument','3438984NcZHjd','utf-8','segment','warnings','email','template','message','object','length','210gaHWpT','filterType','relative','skipped','result','6531475mbVlaK','2884BfViTZ','push','34606ZrntJB','8JYLCdL','not\x20a\x20'];a165_0x6647=function(){return _0x5456a9;};return a165_0x6647();}export function isJourneyDef(_0x1f7cc3){const _0x345df4=a165_0x3c163;return typeof _0x1f7cc3===_0x345df4(0x175)&&_0x1f7cc3!==null&&_0x345df4(0x184)in _0x1f7cc3&&_0x1f7cc3[_0x345df4(0x184)]===_0x345df4(0x18c);}export function isCampaignDef(_0x5b7be5){const _0x5558a2=a165_0x3c163;if(typeof _0x5b7be5!==_0x5558a2(0x175)||_0x5b7be5===null)return![];const _0x4c67d6=_0x5b7be5,_0x25fac0=VALID_CAMPAIGN_TYPES[_0x5558a2(0x183)](_0x4c67d6[_0x5558a2(0x190)]);if(_0x4c67d6[_0x5558a2(0x184)]===_0x5558a2(0x18d)&&_0x25fac0)return!![];if(_0x25fac0&&!_0x4c67d6['type'])return!![];return![];}export function isTemplateDef(_0x17c7c9){const _0x5d4d45=a165_0x3c163;return typeof _0x17c7c9===_0x5d4d45(0x175)&&_0x17c7c9!==null&&'type'in _0x17c7c9&&_0x17c7c9[_0x5d4d45(0x184)]==='template';}export function isValidationResult(_0x3a1210){const _0xeb28b=a165_0x3c163;return!(_0xeb28b(0x17a)in _0x3a1210);}export function createParseErrorResult(_0x5dd572,_0x44d6b7,_0x5a7637,_0x16bd19,_0x21d54c=a165_0x3c163(0x195)){const _0x43e26b=a165_0x3c163;return{'filePath':_0x5dd572,'relativePath':_0x44d6b7,'source':_0x5a7637,'result':{'valid':![],'errors':[{'level':_0x43e26b(0x186),'path':'','code':'YAML_PARSE_ERROR','message':_0x16bd19}],'warnings':[]},'fileType':_0x21d54c};}export function validateYamlFile(_0x329ab3,_0x29dbdf,_0x12342a={}){const _0x974ec8=a165_0x3c163,_0x52fad1=a165_0x52dcee[_0x974ec8(0x179)](_0x29dbdf,_0x329ab3)||a165_0x52dcee[_0x974ec8(0x18b)](_0x329ab3);try{const _0x479143=readFileSync(_0x329ab3,_0x974ec8(0x194)),_0x56ec23=a165_0x27a3f7[_0x974ec8(0x192)](_0x479143),_0x24088f=_0x56ec23[_0x974ec8(0x188)]();if(!_0x24088f)return createParseErrorResult(_0x329ab3,_0x52fad1,_0x479143,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x95b7d2;if(isJourneyDef(_0x24088f))_0x95b7d2=_0x974ec8(0x18c);else{if(isCampaignDef(_0x24088f))_0x95b7d2='campaign';else isTemplateDef(_0x24088f)?_0x95b7d2=_0x974ec8(0x173):_0x95b7d2=_0x974ec8(0x195);}if(_0x12342a[_0x974ec8(0x178)]&&_0x95b7d2!==_0x12342a['filterType'])return{'filePath':_0x329ab3,'relativePath':_0x52fad1,'skipped':!![],'reason':_0x974ec8(0x181)+_0x12342a[_0x974ec8(0x178)]};const _0x4560c9={'source':_0x479143,'document':_0x56ec23};let _0x199490;if(_0x95b7d2===_0x974ec8(0x18c))_0x199490=validateJourneyDef(_0x24088f,_0x4560c9);else{if(_0x95b7d2==='campaign')_0x199490=validateCampaignDef(_0x24088f,_0x4560c9);else _0x95b7d2===_0x974ec8(0x173)?_0x199490=validateTemplateDef(_0x24088f,_0x4560c9):_0x199490=validateSegmentDef(_0x24088f,_0x4560c9);}return{'filePath':_0x329ab3,'relativePath':_0x52fad1,'source':_0x479143,'result':_0x199490,'fileType':_0x95b7d2};}catch(_0x11bc21){const _0x104203=_0x11bc21 instanceof Error?_0x11bc21[_0x974ec8(0x174)]:String(_0x11bc21);return createParseErrorResult(_0x329ab3,_0x52fad1,'','YAML\x20parse\x20error:\x20'+_0x104203);}}export function validateYamlFiles(_0x1f300f,_0xa70d59,_0x4da89a={}){const _0xb5ab7c=a165_0x3c163;return _0x1f300f[_0xb5ab7c(0x191)](_0x308ce9=>validateYamlFile(_0x308ce9,_0xa70d59,_0x4da89a));}export function calculateSummary(_0x481fa2){const _0x52bf40=a165_0x3c163;let _0x4f9bdc=0x0,_0x59bf40=0x0,_0x20e19d=0x0,_0x3902f4=0x0;for(const _0x21fc4c of _0x481fa2){if(!isValidationResult(_0x21fc4c)){_0x3902f4++;continue;}_0x21fc4c[_0x52bf40(0x17b)][_0x52bf40(0x187)]?_0x4f9bdc++:_0x59bf40++,_0x20e19d+=_0x21fc4c[_0x52bf40(0x17b)][_0x52bf40(0x196)][_0x52bf40(0x176)];}return{'validCount':_0x4f9bdc,'invalidCount':_0x59bf40,'warningCount':_0x20e19d,'skippedCount':_0x3902f4,'hasErrors':_0x59bf40>0x0};}
@@ -1 +1 @@
1
- (function(_0x56feb9,_0x47fc31){const _0x23acec=a166_0x12e7,_0x180b16=_0x56feb9();while(!![]){try{const _0x303f45=-parseInt(_0x23acec(0x1d6))/0x1+-parseInt(_0x23acec(0x1b7))/0x2*(-parseInt(_0x23acec(0x1d8))/0x3)+parseInt(_0x23acec(0x1c4))/0x4*(-parseInt(_0x23acec(0x1c2))/0x5)+-parseInt(_0x23acec(0x1d0))/0x6*(-parseInt(_0x23acec(0x1c3))/0x7)+-parseInt(_0x23acec(0x1d4))/0x8*(-parseInt(_0x23acec(0x1cc))/0x9)+parseInt(_0x23acec(0x1c6))/0xa*(-parseInt(_0x23acec(0x1be))/0xb)+parseInt(_0x23acec(0x1de))/0xc;if(_0x303f45===_0x47fc31)break;else _0x180b16['push'](_0x180b16['shift']());}catch(_0x300671){_0x180b16['push'](_0x180b16['shift']());}}}(a166_0x3fbe,0x99423));import*as a166_0x44de34 from'yaml';import a166_0x507d48 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x5615ff,_0x1b0152,_0x136b37){const _0x3be7ee=a166_0x12e7;if(!_0x5615ff||!_0x1b0152)return undefined;try{let _0x4ca8bc=_0x5615ff['getIn'](_0x136b37,!![]),_0x2a7f3c=[..._0x136b37];while((!_0x4ca8bc||typeof _0x4ca8bc!==_0x3be7ee(0x1d7)||!('range'in _0x4ca8bc)||!_0x4ca8bc[_0x3be7ee(0x1dd)])&&_0x2a7f3c[_0x3be7ee(0x1c1)]>0x0){_0x2a7f3c['pop'](),_0x4ca8bc=_0x2a7f3c[_0x3be7ee(0x1c1)]>0x0?_0x5615ff[_0x3be7ee(0x1c5)](_0x2a7f3c,!![]):_0x5615ff[_0x3be7ee(0x1b9)];}if(!_0x4ca8bc||typeof _0x4ca8bc!==_0x3be7ee(0x1d7)||!(_0x3be7ee(0x1dd)in _0x4ca8bc)||!_0x4ca8bc[_0x3be7ee(0x1dd)])return undefined;const [_0x1b1ba4]=_0x4ca8bc[_0x3be7ee(0x1dd)];return offsetToLocation(_0x1b0152,_0x1b1ba4);}catch{return undefined;}}export function offsetToLocation(_0x37577f,_0x34a405){const _0x175f7e=a166_0x12e7;let _0x33c5cc=0x1,_0x25acc8=0x1;for(let _0xd5a291=0x0;_0xd5a291<_0x34a405&&_0xd5a291<_0x37577f[_0x175f7e(0x1c1)];_0xd5a291++){_0x37577f[_0xd5a291]==='\x0a'?(_0x33c5cc++,_0x25acc8=0x1):_0x25acc8++;}return{'line':_0x33c5cc,'column':_0x25acc8,'offset':_0x34a405};}function a166_0x12e7(_0x482de1,_0x18e4d4){_0x482de1=_0x482de1-0x1b4;const _0x3fbe20=a166_0x3fbe();let _0x12e712=_0x3fbe20[_0x482de1];return _0x12e712;}export function pathToArray(_0x567ba9){const _0x421925=a166_0x12e7;if(!_0x567ba9)return[];return _0x567ba9[_0x421925(0x1b8)]('.')[_0x421925(0x1cd)](_0x3987b3=>{const _0x83996f=_0x3987b3['match'](/^(\w+)\[(\d+)\]$/);if(_0x83996f)return[_0x83996f[0x1],parseInt(_0x83996f[0x2],0xa)];return[_0x3987b3];});}function a166_0x3fbe(){const _0x1bc28d=['number','2IPSYxu','split','contents','warnings','error','data','padStart','11645623llHjUN','push','level','length','534075Qgzeat','7YamlwE','8STzQuU','getIn','10ywTCDN','message','success','Invalid\x20YAML:\x20expected\x20an\x20object','cyan','YAML\x20validation\x20error\x20at\x20\x27','801000IWIXLB','flatMap','parse','issues','2641602ZpXApz','yellow','column','YAML\x20validation\x20error:\x20','72mXTMGy','location','1197593fYEkEE','object','3750753LQdjni','path','max','red','dim','range','7273740RJnMrl','errors','toString','code'];a166_0x3fbe=function(){return _0x1bc28d;};return a166_0x3fbe();}export function formatZodPath(_0x1a8ab7){const _0x35fb68=a166_0x12e7;let _0x3b6aa0='';for(const _0x4a3bee of _0x1a8ab7){if(typeof _0x4a3bee===_0x35fb68(0x1b6))_0x3b6aa0+='['+_0x4a3bee+']';else{const _0x5619bf=String(_0x4a3bee);_0x3b6aa0+=_0x3b6aa0?'.'+_0x5619bf:_0x5619bf;}}return _0x3b6aa0;}export function flattenZodIssues(_0x307c41){const _0x4cf134=a166_0x12e7,_0x373bcc=[];for(const _0x31d191 of _0x307c41){if(_0x31d191[_0x4cf134(0x1b5)]==='invalid_union'&&_0x4cf134(0x1df)in _0x31d191){const _0x1e5aa4=_0x31d191[_0x4cf134(0x1df)];let _0x25cbf1=_0x1e5aa4[0x0]||[];for(const _0x1b5a62 of _0x1e5aa4){_0x1b5a62[_0x4cf134(0x1c1)]<_0x25cbf1[_0x4cf134(0x1c1)]&&(_0x25cbf1=_0x1b5a62);}const _0x1da192=_0x25cbf1['map'](_0x34f99a=>({..._0x34f99a,'path':[..._0x31d191[_0x4cf134(0x1d9)],..._0x34f99a[_0x4cf134(0x1d9)]]}));_0x373bcc[_0x4cf134(0x1bf)](...flattenZodIssues(_0x1da192));}else _0x373bcc[_0x4cf134(0x1bf)](_0x31d191);}return _0x373bcc;}export function safeParseYaml(_0x2ff4ac,_0x350917){const _0x2c91fa=a166_0x12e7,_0x5c5f9f=a166_0x44de34[_0x2c91fa(0x1ce)](_0x2ff4ac);if(!_0x5c5f9f||typeof _0x5c5f9f!==_0x2c91fa(0x1d7))throw new Error(_0x2c91fa(0x1c9));const _0x53eb9c=_0x350917['safeParse'](_0x5c5f9f);if(!_0x53eb9c[_0x2c91fa(0x1c8)]){const _0x3a59f2=_0x53eb9c[_0x2c91fa(0x1bb)][_0x2c91fa(0x1cf)][0x0],_0x24ca7e=formatZodPath(_0x3a59f2[_0x2c91fa(0x1d9)]);throw new Error(_0x24ca7e?_0x2c91fa(0x1cb)+_0x24ca7e+'\x27:\x20'+_0x3a59f2[_0x2c91fa(0x1c7)]:_0x2c91fa(0x1d3)+_0x3a59f2[_0x2c91fa(0x1c7)]);}return _0x53eb9c[_0x2c91fa(0x1bc)];}export function formatIssueWithContext(_0x33d81c,_0x151bec,_0x178cf6){const _0x11cb7a=a166_0x12e7,_0x19e164=[],_0xbe523a=_0x33d81c[_0x11cb7a(0x1c0)]==='error',_0x165e24=_0xbe523a?a166_0x507d48[_0x11cb7a(0x1db)]:a166_0x507d48[_0x11cb7a(0x1d1)],_0x55c20b=_0xbe523a?a166_0x507d48[_0x11cb7a(0x1db)]:a166_0x507d48[_0x11cb7a(0x1d1)],_0x111306=_0x178cf6?a166_0x507d48[_0x11cb7a(0x1ca)](_0x178cf6+':'):'';if(_0x33d81c['location']){const _0x3b7019=a166_0x507d48[_0x11cb7a(0x1ca)](_0x33d81c[_0x11cb7a(0x1d5)]['line']+':'+_0x33d81c[_0x11cb7a(0x1d5)][_0x11cb7a(0x1d2)]);_0x19e164[_0x11cb7a(0x1bf)](''+_0x111306+_0x3b7019+':\x20'+_0x165e24(_0x33d81c[_0x11cb7a(0x1c0)])+'\x20'+_0x55c20b('['+_0x33d81c[_0x11cb7a(0x1b5)]+']'));}else _0x19e164[_0x11cb7a(0x1bf)](''+_0x111306+a166_0x507d48[_0x11cb7a(0x1dc)](_0x33d81c[_0x11cb7a(0x1d9)])+':\x20'+_0x165e24(_0x33d81c[_0x11cb7a(0x1c0)])+'\x20'+_0x55c20b('['+_0x33d81c[_0x11cb7a(0x1b5)]+']'));_0x19e164[_0x11cb7a(0x1bf)](_0x33d81c['message']);if(_0x33d81c[_0x11cb7a(0x1d5)]&&_0x151bec){const _0x1994f2=_0x151bec[_0x11cb7a(0x1b8)]('\x0a'),{line:_0x363f94,column:_0x3c0c9f}=_0x33d81c[_0x11cb7a(0x1d5)],_0x3c9a91=Math[_0x11cb7a(0x1da)](0x1,_0x363f94-0x1),_0x45f031=Math['min'](_0x1994f2[_0x11cb7a(0x1c1)],_0x363f94+0x1);_0x19e164[_0x11cb7a(0x1bf)]('');for(let _0x5caa78=_0x3c9a91;_0x5caa78<=_0x45f031;_0x5caa78++){const _0x32919f=_0x1994f2[_0x5caa78-0x1]||'',_0x5b2b45=a166_0x507d48[_0x11cb7a(0x1dc)](_0x5caa78[_0x11cb7a(0x1b4)]()[_0x11cb7a(0x1bd)](0x4)),_0x5057c9=a166_0x507d48['dim']('\x20|\x20');if(_0x5caa78===_0x363f94){_0x19e164[_0x11cb7a(0x1bf)]('\x20\x20'+_0x5b2b45+_0x5057c9+_0x165e24(_0x32919f));const _0x5c5e0a='\x20'['repeat'](0x4+0x3+_0x3c0c9f-0x1);_0x19e164[_0x11cb7a(0x1bf)]('\x20\x20'+_0x5c5e0a+_0x165e24('^'));}else _0x19e164[_0x11cb7a(0x1bf)]('\x20\x20'+_0x5b2b45+_0x5057c9+a166_0x507d48[_0x11cb7a(0x1dc)](_0x32919f));}}return _0x19e164['join']('\x0a');}export function formatValidationResult(_0x1a8fab,_0x524e6f,_0x3416e4){const _0x20ef56=a166_0x12e7,_0x4a428e=[];for(const _0xf59289 of _0x1a8fab['errors']){_0x4a428e[_0x20ef56(0x1bf)](formatIssueWithContext(_0xf59289,_0x524e6f,_0x3416e4)),_0x4a428e[_0x20ef56(0x1bf)]('');}for(const _0x2aa926 of _0x1a8fab[_0x20ef56(0x1ba)]){_0x4a428e[_0x20ef56(0x1bf)](formatIssueWithContext(_0x2aa926,_0x524e6f,_0x3416e4)),_0x4a428e[_0x20ef56(0x1bf)]('');}return _0x4a428e['join']('\x0a');}
1
+ (function(_0x1eeaae,_0xaee9c9){const _0x4ff9d5=a166_0x2ecb,_0x4f73f3=_0x1eeaae();while(!![]){try{const _0x430d6c=parseInt(_0x4ff9d5(0x9d))/0x1*(parseInt(_0x4ff9d5(0xa8))/0x2)+-parseInt(_0x4ff9d5(0xbc))/0x3+parseInt(_0x4ff9d5(0xb2))/0x4+parseInt(_0x4ff9d5(0xa3))/0x5+-parseInt(_0x4ff9d5(0xc0))/0x6*(-parseInt(_0x4ff9d5(0xb1))/0x7)+-parseInt(_0x4ff9d5(0xab))/0x8+-parseInt(_0x4ff9d5(0xa1))/0x9;if(_0x430d6c===_0xaee9c9)break;else _0x4f73f3['push'](_0x4f73f3['shift']());}catch(_0xc2346b){_0x4f73f3['push'](_0x4f73f3['shift']());}}}(a166_0x3ab3,0x8a264));import*as a166_0x5db85d from'yaml';import a166_0x119c72 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x1a89c4,_0x568f02,_0x1aec1f){const _0x8256d5=a166_0x2ecb;if(!_0x1a89c4||!_0x568f02)return undefined;try{let _0x1f2f4d=_0x1a89c4[_0x8256d5(0xb5)](_0x1aec1f,!![]),_0x1d0c7e=[..._0x1aec1f];while((!_0x1f2f4d||typeof _0x1f2f4d!==_0x8256d5(0xa7)||!(_0x8256d5(0xbd)in _0x1f2f4d)||!_0x1f2f4d['range'])&&_0x1d0c7e[_0x8256d5(0xa2)]>0x0){_0x1d0c7e['pop'](),_0x1f2f4d=_0x1d0c7e[_0x8256d5(0xa2)]>0x0?_0x1a89c4['getIn'](_0x1d0c7e,!![]):_0x1a89c4[_0x8256d5(0xc4)];}if(!_0x1f2f4d||typeof _0x1f2f4d!==_0x8256d5(0xa7)||!('range'in _0x1f2f4d)||!_0x1f2f4d[_0x8256d5(0xbd)])return undefined;const [_0x1e5207]=_0x1f2f4d[_0x8256d5(0xbd)];return offsetToLocation(_0x568f02,_0x1e5207);}catch{return undefined;}}export function offsetToLocation(_0x5a857a,_0x29d7a3){let _0x142496=0x1,_0x5c3241=0x1;for(let _0x335a4e=0x0;_0x335a4e<_0x29d7a3&&_0x335a4e<_0x5a857a['length'];_0x335a4e++){_0x5a857a[_0x335a4e]==='\x0a'?(_0x142496++,_0x5c3241=0x1):_0x5c3241++;}return{'line':_0x142496,'column':_0x5c3241,'offset':_0x29d7a3};}export function pathToArray(_0x510bbd){const _0x27542a=a166_0x2ecb;if(!_0x510bbd)return[];return _0x510bbd[_0x27542a(0xbf)]('.')['flatMap'](_0x2f6aae=>{const _0x11a5fd=_0x27542a,_0xd70d0=_0x2f6aae[_0x11a5fd(0xa9)](/^(\w+)\[(\d+)\]$/);if(_0xd70d0)return[_0xd70d0[0x1],parseInt(_0xd70d0[0x2],0xa)];return[_0x2f6aae];});}function a166_0x2ecb(_0x4cb79f,_0x167ece){_0x4cb79f=_0x4cb79f-0x9b;const _0x3ab3c7=a166_0x3ab3();let _0x2ecb4e=_0x3ab3c7[_0x4cb79f];return _0x2ecb4e;}function a166_0x3ab3(){const _0x568147=['path','5592736urcMLG','level','\x20|\x20','join','toString','\x27:\x20','14602sbDWCg','1953064ImitqZ','YAML\x20validation\x20error\x20at\x20\x27','Invalid\x20YAML:\x20expected\x20an\x20object','getIn','red','dim','number','code','location','cyan','2451135yXTvac','range','repeat','split','504mbKgsO','column','error','line','contents','issues','padStart','YAML\x20validation\x20error:\x20','success','454592hYEzdn','push','max','message','5242689BQGiqu','length','5459220Zncrap','warnings','errors','data','object','4hqlfey','match'];a166_0x3ab3=function(){return _0x568147;};return a166_0x3ab3();}export function formatZodPath(_0x5f4456){const _0x30077c=a166_0x2ecb;let _0x84717e='';for(const _0x5873b0 of _0x5f4456){if(typeof _0x5873b0===_0x30077c(0xb8))_0x84717e+='['+_0x5873b0+']';else{const _0x3b1388=String(_0x5873b0);_0x84717e+=_0x84717e?'.'+_0x3b1388:_0x3b1388;}}return _0x84717e;}export function flattenZodIssues(_0x41d14f){const _0x32282a=a166_0x2ecb,_0x32cabe=[];for(const _0x129f55 of _0x41d14f){if(_0x129f55['code']==='invalid_union'&&'errors'in _0x129f55){const _0x28363b=_0x129f55[_0x32282a(0xa5)];let _0x215751=_0x28363b[0x0]||[];for(const _0x1c84c2 of _0x28363b){_0x1c84c2[_0x32282a(0xa2)]<_0x215751[_0x32282a(0xa2)]&&(_0x215751=_0x1c84c2);}const _0x476007=_0x215751['map'](_0x534999=>({..._0x534999,'path':[..._0x129f55[_0x32282a(0xaa)],..._0x534999['path']]}));_0x32cabe['push'](...flattenZodIssues(_0x476007));}else _0x32cabe[_0x32282a(0x9e)](_0x129f55);}return _0x32cabe;}export function safeParseYaml(_0x40251b,_0x2f75b9){const _0x2e80c5=a166_0x2ecb,_0x4ab21e=a166_0x5db85d['parse'](_0x40251b);if(!_0x4ab21e||typeof _0x4ab21e!==_0x2e80c5(0xa7))throw new Error(_0x2e80c5(0xb4));const _0x3de56c=_0x2f75b9['safeParse'](_0x4ab21e);if(!_0x3de56c[_0x2e80c5(0x9c)]){const _0x5dca62=_0x3de56c[_0x2e80c5(0xc2)][_0x2e80c5(0xc5)][0x0],_0x4300ed=formatZodPath(_0x5dca62[_0x2e80c5(0xaa)]);throw new Error(_0x4300ed?_0x2e80c5(0xb3)+_0x4300ed+_0x2e80c5(0xb0)+_0x5dca62[_0x2e80c5(0xa0)]:_0x2e80c5(0x9b)+_0x5dca62['message']);}return _0x3de56c[_0x2e80c5(0xa6)];}export function formatIssueWithContext(_0x5639c5,_0xf74899,_0xbc5e4){const _0x5b4c0e=a166_0x2ecb,_0x153b68=[],_0x1503fe=_0x5639c5[_0x5b4c0e(0xac)]===_0x5b4c0e(0xc2),_0x17845d=_0x1503fe?a166_0x119c72['red']:a166_0x119c72['yellow'],_0x2571d1=_0x1503fe?a166_0x119c72[_0x5b4c0e(0xb6)]:a166_0x119c72['yellow'],_0x5bab43=_0xbc5e4?a166_0x119c72[_0x5b4c0e(0xbb)](_0xbc5e4+':'):'';if(_0x5639c5[_0x5b4c0e(0xba)]){const _0x438b16=a166_0x119c72[_0x5b4c0e(0xbb)](_0x5639c5[_0x5b4c0e(0xba)][_0x5b4c0e(0xc3)]+':'+_0x5639c5[_0x5b4c0e(0xba)][_0x5b4c0e(0xc1)]);_0x153b68[_0x5b4c0e(0x9e)](''+_0x5bab43+_0x438b16+':\x20'+_0x17845d(_0x5639c5[_0x5b4c0e(0xac)])+'\x20'+_0x2571d1('['+_0x5639c5[_0x5b4c0e(0xb9)]+']'));}else _0x153b68[_0x5b4c0e(0x9e)](''+_0x5bab43+a166_0x119c72[_0x5b4c0e(0xb7)](_0x5639c5['path'])+':\x20'+_0x17845d(_0x5639c5[_0x5b4c0e(0xac)])+'\x20'+_0x2571d1('['+_0x5639c5[_0x5b4c0e(0xb9)]+']'));_0x153b68[_0x5b4c0e(0x9e)](_0x5639c5[_0x5b4c0e(0xa0)]);if(_0x5639c5[_0x5b4c0e(0xba)]&&_0xf74899){const _0x23ab3c=_0xf74899[_0x5b4c0e(0xbf)]('\x0a'),{line:_0x3680fb,column:_0x530782}=_0x5639c5[_0x5b4c0e(0xba)],_0x3eef02=Math[_0x5b4c0e(0x9f)](0x1,_0x3680fb-0x1),_0x3a083f=Math['min'](_0x23ab3c['length'],_0x3680fb+0x1);_0x153b68['push']('');for(let _0x16fafb=_0x3eef02;_0x16fafb<=_0x3a083f;_0x16fafb++){const _0x278764=_0x23ab3c[_0x16fafb-0x1]||'',_0x58dbd0=a166_0x119c72[_0x5b4c0e(0xb7)](_0x16fafb[_0x5b4c0e(0xaf)]()[_0x5b4c0e(0xc6)](0x4)),_0xa15ad0=a166_0x119c72[_0x5b4c0e(0xb7)](_0x5b4c0e(0xad));if(_0x16fafb===_0x3680fb){_0x153b68['push']('\x20\x20'+_0x58dbd0+_0xa15ad0+_0x17845d(_0x278764));const _0x38b2a1='\x20'[_0x5b4c0e(0xbe)](0x4+0x3+_0x530782-0x1);_0x153b68[_0x5b4c0e(0x9e)]('\x20\x20'+_0x38b2a1+_0x17845d('^'));}else _0x153b68[_0x5b4c0e(0x9e)]('\x20\x20'+_0x58dbd0+_0xa15ad0+a166_0x119c72['dim'](_0x278764));}}return _0x153b68['join']('\x0a');}export function formatValidationResult(_0x4bc2d2,_0x4bf180,_0x477e82){const _0x29f5ae=a166_0x2ecb,_0x3edcff=[];for(const _0x5f11fb of _0x4bc2d2[_0x29f5ae(0xa5)]){_0x3edcff[_0x29f5ae(0x9e)](formatIssueWithContext(_0x5f11fb,_0x4bf180,_0x477e82)),_0x3edcff[_0x29f5ae(0x9e)]('');}for(const _0xc3bc16 of _0x4bc2d2[_0x29f5ae(0xa4)]){_0x3edcff[_0x29f5ae(0x9e)](formatIssueWithContext(_0xc3bc16,_0x4bf180,_0x477e82)),_0x3edcff[_0x29f5ae(0x9e)]('');}return _0x3edcff[_0x29f5ae(0xae)]('\x0a');}