@treasuredata/tdx 2026.3.13 → 2026.3.14

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 (201) 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/auth-login-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/connection-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/delivery-command.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-campaign-pull-command.js +1 -1
  21. package/dist/commands/engage-campaign-push-command.js +1 -1
  22. package/dist/commands/engage-campaign-validate-command.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/engage-template-pull-command.js +1 -1
  25. package/dist/commands/engage-template-push-command.js +1 -1
  26. package/dist/commands/engage-template-validate-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/journey-validate-command.js +1 -1
  30. package/dist/commands/llm-command.js +1 -1
  31. package/dist/commands/mcp-command.js +1 -1
  32. package/dist/commands/parent-segment-command.js +1 -1
  33. package/dist/commands/profile-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/schedule-command.js +1 -1
  37. package/dist/commands/segment-command.js +1 -1
  38. package/dist/commands/segment-create-command.js +1 -1
  39. package/dist/commands/segment-fields-command.js +1 -1
  40. package/dist/commands/segment-pull-command.js +1 -1
  41. package/dist/commands/segment-push-command.js +1 -1
  42. package/dist/commands/segment-update-command.js +1 -1
  43. package/dist/commands/segment-use-command.js +1 -1
  44. package/dist/commands/segment-validate-command.js +1 -1
  45. package/dist/commands/segments.js +1 -1
  46. package/dist/commands/show.js +1 -1
  47. package/dist/commands/status-command.js +1 -1
  48. package/dist/commands/tables.js +1 -1
  49. package/dist/commands/unset-command.js +1 -1
  50. package/dist/commands/upgrade-command.js +1 -1
  51. package/dist/commands/use-command.js +1 -1
  52. package/dist/commands/user-command.js +1 -1
  53. package/dist/commands/workflow-command.js +1 -1
  54. package/dist/core/auth.js +1 -1
  55. package/dist/core/command-output.js +1 -1
  56. package/dist/core/config.js +1 -1
  57. package/dist/core/connection-cache.js +1 -1
  58. package/dist/core/constants.js +1 -1
  59. package/dist/core/credential-cache.js +1 -1
  60. package/dist/core/global-context.js +1 -1
  61. package/dist/core/keychain.js +1 -1
  62. package/dist/core/oauth-keychain.js +1 -1
  63. package/dist/core/oauth.js +1 -1
  64. package/dist/core/profile.js +1 -1
  65. package/dist/core/project-config.js +1 -1
  66. package/dist/core/session.js +1 -1
  67. package/dist/core/user-cache.js +1 -1
  68. package/dist/core/version.js +1 -1
  69. package/dist/index.js +1 -1
  70. package/dist/mcp/server.js +1 -1
  71. package/dist/mcp/tools/index.js +1 -1
  72. package/dist/mcp/tools/tdx-run.js +1 -1
  73. package/dist/mcp/tools/tdx-search.js +1 -1
  74. package/dist/mcp/utils.js +1 -1
  75. package/dist/proxy/claude-usage-tracker.js +1 -1
  76. package/dist/proxy/passthrough-server.js +1 -1
  77. package/dist/proxy/sse-usage-parser.js +1 -1
  78. package/dist/sdk/agent/agent-config.js +1 -1
  79. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  80. package/dist/sdk/agent/agent-yaml.js +1 -1
  81. package/dist/sdk/agent/test/evaluator.js +1 -1
  82. package/dist/sdk/agent/test/executor.js +1 -1
  83. package/dist/sdk/agent/test/index.js +1 -1
  84. package/dist/sdk/agent/test/output.js +1 -1
  85. package/dist/sdk/agent/test/parser.js +1 -1
  86. package/dist/sdk/agent/tool-target-registry.js +1 -1
  87. package/dist/sdk/api.js +1 -1
  88. package/dist/sdk/client/cdp-api-client.js +1 -1
  89. package/dist/sdk/client/delivery-api-client.js +1 -1
  90. package/dist/sdk/client/endpoints.js +1 -1
  91. package/dist/sdk/client/engage-api-client.js +1 -1
  92. package/dist/sdk/client/http-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js +1 -1
  94. package/dist/sdk/client/oauth-refresh.js +1 -1
  95. package/dist/sdk/client/rate-limiter.js +1 -1
  96. package/dist/sdk/client/td-api-client.js +1 -1
  97. package/dist/sdk/client/trino-api-client.js +1 -1
  98. package/dist/sdk/client/workflow-client.js +1 -1
  99. package/dist/sdk/connection-validator.js +1 -1
  100. package/dist/sdk/connection.js +1 -1
  101. package/dist/sdk/delivery.js +1 -1
  102. package/dist/sdk/engage/campaign-pull.js +1 -1
  103. package/dist/sdk/engage/campaign-push.js +1 -1
  104. package/dist/sdk/engage/campaign-validator.js +1 -1
  105. package/dist/sdk/engage/campaign-yaml.js +1 -1
  106. package/dist/sdk/engage/template-pull.js +1 -1
  107. package/dist/sdk/engage/template-push.js +1 -1
  108. package/dist/sdk/engage/template-validator.js +1 -1
  109. package/dist/sdk/engage/template-yaml.js +1 -1
  110. package/dist/sdk/engage/types/campaign-def.js +1 -1
  111. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  112. package/dist/sdk/engage/types/template-schema.js +1 -1
  113. package/dist/sdk/engage.js +1 -1
  114. package/dist/sdk/errors.js +1 -1
  115. package/dist/sdk/index.js +1 -1
  116. package/dist/sdk/io/index.js +1 -1
  117. package/dist/sdk/io/node-filesystem.js +1 -1
  118. package/dist/sdk/job.js +1 -1
  119. package/dist/sdk/journey.js +1 -1
  120. package/dist/sdk/llm/chat-cache.js +1 -1
  121. package/dist/sdk/llm/index.js +1 -1
  122. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  123. package/dist/sdk/llm/model-factors.js +1 -1
  124. package/dist/sdk/personalization.js +1 -1
  125. package/dist/sdk/query/index.js +1 -1
  126. package/dist/sdk/query/sql-parser.js +1 -1
  127. package/dist/sdk/realtime.js +1 -1
  128. package/dist/sdk/schedule.js +1 -1
  129. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  130. package/dist/sdk/segment/fields-display.js +1 -1
  131. package/dist/sdk/segment/file-discovery.js +1 -1
  132. package/dist/sdk/segment/journey-utils.js +1 -1
  133. package/dist/sdk/segment/journey-validator.js +1 -1
  134. package/dist/sdk/segment/journey-yaml.js +1 -1
  135. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  136. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  137. package/dist/sdk/segment/pull-workflow.js +1 -1
  138. package/dist/sdk/segment/push-recovery.js +1 -1
  139. package/dist/sdk/segment/push-workflow.js +1 -1
  140. package/dist/sdk/segment/resolution-context.js +1 -1
  141. package/dist/sdk/segment/segment-path-parser.js +1 -1
  142. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  143. package/dist/sdk/segment/segment-validator.js +1 -1
  144. package/dist/sdk/segment/target-resolution.js +1 -1
  145. package/dist/sdk/segment/tdx-config.js +1 -1
  146. package/dist/sdk/segment/types/activation-schema.js +1 -1
  147. package/dist/sdk/segment/types/journey-def.js +1 -1
  148. package/dist/sdk/segment/types/journey-schema.js +1 -1
  149. package/dist/sdk/segment/types/segment-def.js +1 -1
  150. package/dist/sdk/segment/types/segment-schema.js +1 -1
  151. package/dist/sdk/segment/validate-files.js +1 -1
  152. package/dist/sdk/segment/yaml-validator.js +1 -1
  153. package/dist/sdk/segment.js +1 -1
  154. package/dist/sdk/types/index.js +1 -1
  155. package/dist/sdk/types/progress.js +1 -1
  156. package/dist/sdk/user.js +1 -1
  157. package/dist/sdk/util/format-detector.js +1 -1
  158. package/dist/sdk/util/formatters.js +1 -1
  159. package/dist/sdk/util/index.js +1 -1
  160. package/dist/sdk/util/paginate.js +1 -1
  161. package/dist/sdk/util/tree-formatter.js +1 -1
  162. package/dist/sdk/workflow/archive-validation.js +1 -1
  163. package/dist/sdk/workflow/clone-workflow.js +1 -1
  164. package/dist/sdk/workflow/index.js +1 -1
  165. package/dist/sdk/workflow/pull-workflow.js +1 -1
  166. package/dist/sdk/workflow/push-workflow.js +1 -1
  167. package/dist/sdk/workflow/tdx-config.js +1 -1
  168. package/dist/sdk/workflow/workflow-utils.js +1 -1
  169. package/dist/test-utils/command-runner.js +1 -1
  170. package/dist/test-utils/factories.js +1 -1
  171. package/dist/test-utils/fixtures.js +1 -1
  172. package/dist/test-utils/http-mock.js +1 -1
  173. package/dist/test-utils/index.js +1 -1
  174. package/dist/utils/async.js +1 -1
  175. package/dist/utils/colors.js +1 -1
  176. package/dist/utils/diff.js +1 -1
  177. package/dist/utils/file-permissions.js +1 -1
  178. package/dist/utils/file-reader.js +1 -1
  179. package/dist/utils/github-releases.js +1 -1
  180. package/dist/utils/global-cache.js +1 -1
  181. package/dist/utils/json-loader.js +1 -1
  182. package/dist/utils/local-cache.js +1 -1
  183. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  184. package/dist/utils/logger/formatters/index.js +1 -1
  185. package/dist/utils/logger/handlers/console-handler.js +1 -1
  186. package/dist/utils/logger/handlers/file-handler.js +1 -1
  187. package/dist/utils/logger/handlers/index.js +1 -1
  188. package/dist/utils/logger/handlers/null-handler.js +1 -1
  189. package/dist/utils/logger/index.js +1 -1
  190. package/dist/utils/logger/logger.js +1 -1
  191. package/dist/utils/logger/types.js +1 -1
  192. package/dist/utils/option-validation.js +1 -1
  193. package/dist/utils/process.js +1 -1
  194. package/dist/utils/prompt.js +1 -1
  195. package/dist/utils/spinner.js +1 -1
  196. package/dist/utils/sse-parser.js +1 -1
  197. package/dist/utils/string-utils.js +1 -1
  198. package/dist/utils/table-ref-parser.js +1 -1
  199. package/dist/utils/tdx-logger.js +1 -1
  200. package/dist/utils/version-check.js +1 -1
  201. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x391e97,_0x101631){const _0x30fa28=a144_0x1226,_0x3d6733=_0x391e97();while(!![]){try{const _0x476deb=-parseInt(_0x30fa28(0x1a2))/0x1*(-parseInt(_0x30fa28(0x191))/0x2)+-parseInt(_0x30fa28(0x1ac))/0x3+parseInt(_0x30fa28(0x19d))/0x4+parseInt(_0x30fa28(0x192))/0x5+-parseInt(_0x30fa28(0x1a8))/0x6*(parseInt(_0x30fa28(0x176))/0x7)+-parseInt(_0x30fa28(0x19c))/0x8*(-parseInt(_0x30fa28(0x178))/0x9)+parseInt(_0x30fa28(0x1b6))/0xa*(-parseInt(_0x30fa28(0x195))/0xb);if(_0x476deb===_0x101631)break;else _0x3d6733['push'](_0x3d6733['shift']());}catch(_0x1805d6){_0x3d6733['push'](_0x3d6733['shift']());}}}(a144_0x3ed3,0x67db0));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a144_0x3ed3(){const _0x10def1=['.segment','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','rule.type','1188306aCkZFy','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','data','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','.filter','MISSING_SEGMENT_REFERENCE','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','match','Attribute\x20name\x20cannot\x20be\x20empty','20awqKmj','length','EMPTY_ATTRIBUTE','SEGMENT_SCHEMA_ERROR','MISSING_NAME','path','NESTED_CONDITION_GROUP','MISSING_OPERATOR_VALUE','error','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','747656oyYpvW','filter','728154FPzTQU','endsWith','MISSING_TIME_UNIT','params','push','validationCode','safeParse','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','success','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','attribute','INVALID_OPERATOR_TYPE','message','conditions','source','type','MISSING_BETWEEN_BOUNDS','includes','code','.conditions[','document','custom','.operator.value','.source','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','317462xTQfuU','2484990uWDEKY','INVALID_ARRAY_MATCHING','name','2729133mTDNEe','.attribute','map','aggregation','Value','skipSchema','.operator.type','64mrmjdg','509820EAQbmP','Behavior\x20source\x20\x27','warning','INVALID_RULE_TYPE','level','5jFpAKW','\x27\x20with\x20attribute\x20\x27','.conditions','EMPTY_CONDITIONS','BEHAVIOR_SOURCE_MISSING_FILTER','rule','42jzcAnW'];a144_0x3ed3=function(){return _0x10def1;};return a144_0x3ed3();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x2f5e14,_0x20b469={},_0x558251={}){const _0x195319=a144_0x1226;if(_0x558251[_0x195319(0x19a)])return runSemanticChecks(_0x2f5e14,_0x20b469);const _0x16c354=SegmentDefSchema[_0x195319(0x17e)](_0x2f5e14);if(_0x16c354['success'])return runSemanticChecks(_0x16c354[_0x195319(0x1af)],_0x20b469);return zodErrorsToValidationResult(_0x16c354[_0x195319(0x174)],_0x20b469);}function a144_0x1226(_0x1d0322,_0x1d8f2){_0x1d0322=_0x1d0322-0x171;const _0x3ed3e8=a144_0x3ed3();let _0x122661=_0x3ed3e8[_0x1d0322];return _0x122661;}export function validateRuleDef(_0x5f4dc9,_0x551407,_0x564575){const _0x46f74b=a144_0x1226;if(!_0x5f4dc9)return[];const _0x55081c=RuleDefSchema[_0x46f74b(0x17e)](_0x5f4dc9);if(_0x55081c[_0x46f74b(0x180)])return checkRule(_0x55081c['data'],_0x551407,_0x564575);const _0x479333=flattenZodIssues(_0x55081c[_0x46f74b(0x174)]['issues']);return _0x479333[_0x46f74b(0x197)](_0x1318f1=>{const _0x4fd32b=_0x46f74b,_0x201013=formatZodPath(_0x1318f1[_0x4fd32b(0x171)]),_0x49731d=_0x201013?_0x551407+'.'+_0x201013:_0x551407,_0x1d90cf=mapZodIssueToCode(_0x1318f1,_0x201013),_0x4c59ea=getLocationFromPath(_0x564575[_0x4fd32b(0x18c)],_0x564575[_0x4fd32b(0x186)],pathToArray(_0x49731d));return{'level':_0x4fd32b(0x174),'path':_0x49731d,'code':_0x1d90cf,'message':_0x1318f1[_0x4fd32b(0x184)],..._0x4c59ea&&{'location':_0x4c59ea}};});}function zodErrorsToValidationResult(_0x4da245,_0x57698a){const _0xfc9a91=a144_0x1226,_0x13a53b=flattenZodIssues(_0x4da245['issues']),_0x4b4855=_0x13a53b[_0xfc9a91(0x197)](_0x4f53ed=>{const _0x15d094=_0xfc9a91,_0x1bc439=formatZodPath(_0x4f53ed[_0x15d094(0x171)]),_0x24ddd5=mapZodIssueToCode(_0x4f53ed,_0x1bc439),_0x69b97=getLocationFromPath(_0x57698a['document'],_0x57698a['source'],_0x4f53ed[_0x15d094(0x171)][_0x15d094(0x197)](_0x45c43d=>typeof _0x45c43d==='symbol'?String(_0x45c43d):_0x45c43d));return{'level':'error','path':_0x1bc439,'code':_0x24ddd5,'message':_0x4f53ed[_0x15d094(0x184)],..._0x69b97&&{'location':_0x69b97}};});return{'valid':![],'errors':_0x4b4855,'warnings':[]};}function mapZodIssueToCode(_0x5c4988,_0x37b6fb){const _0x1d012a=a144_0x1226,_0x31c5a4=_0x5c4988[_0x1d012a(0x18a)]===_0x1d012a(0x18d)?_0x5c4988[_0x1d012a(0x17b)]:undefined;if(_0x37b6fb===_0x1d012a(0x194))return _0x1d012a(0x1ba);if(_0x37b6fb==='rule.type'||_0x37b6fb['endsWith']('.type')){if(_0x5c4988[_0x1d012a(0x18a)]==='invalid_value'){if(_0x37b6fb===_0x1d012a(0x1ab)||_0x37b6fb[_0x1d012a(0x1b4)](/\.conditions\[\d+\]\.type$/))return _0x1d012a(0x1a0);}}if(_0x37b6fb['endsWith'](_0x1d012a(0x19b)))return _0x1d012a(0x183);if(_0x37b6fb[_0x1d012a(0x179)](_0x1d012a(0x18e)))return _0x1d012a(0x173);if(_0x31c5a4?.[_0x1d012a(0x17d)]===_0x1d012a(0x188))return _0x1d012a(0x188);if(_0x31c5a4?.['validationCode']===_0x1d012a(0x17a))return _0x1d012a(0x17a);if(_0x37b6fb[_0x1d012a(0x179)](_0x1d012a(0x1a4))||_0x37b6fb==='conditions')return'MISSING_CONDITIONS';if(_0x37b6fb[_0x1d012a(0x189)]('arrayMatching'))return _0x1d012a(0x193);if(_0x37b6fb['endsWith'](_0x1d012a(0x1a9)))return _0x1d012a(0x1b2);return _0x1d012a(0x1b9);}function runSemanticChecks(_0x542a66,_0x1165e5){const _0x19ac2c=a144_0x1226,_0x3f204f=[];_0x542a66[_0x19ac2c(0x1a7)]&&_0x3f204f['push'](...checkRule(_0x542a66[_0x19ac2c(0x1a7)],'rule',_0x1165e5));const _0x26d515=_0x3f204f[_0x19ac2c(0x177)](_0x40c8de=>_0x40c8de[_0x19ac2c(0x1a1)]===_0x19ac2c(0x174)),_0x15f531=_0x3f204f['filter'](_0x33c47f=>_0x33c47f[_0x19ac2c(0x1a1)]===_0x19ac2c(0x19f));return{'valid':_0x26d515[_0x19ac2c(0x1b7)]===0x0,'errors':_0x26d515,'warnings':_0x15f531};}function checkRule(_0x444fd3,_0xe6d6c7,_0x5a13dd){const _0x34c3c3=a144_0x1226,_0xef073=[];if(_0x444fd3['conditions']['length']===0x0)return _0xef073[_0x34c3c3(0x17c)]({'level':'error','path':_0xe6d6c7+'.conditions','code':_0x34c3c3(0x1a5),'message':_0x34c3c3(0x1b0),'location':getLocationFromPath(_0x5a13dd[_0x34c3c3(0x18c)],_0x5a13dd[_0x34c3c3(0x186)],pathToArray(_0xe6d6c7+_0x34c3c3(0x1a4)))}),_0xef073;return _0xef073['push'](...checkConditions(_0x444fd3[_0x34c3c3(0x185)],_0xe6d6c7,_0x5a13dd)),_0xef073;}function checkConditions(_0x2cb156,_0x5a766d,_0x323615){const _0x245e84=a144_0x1226,_0x2692ca=[];for(let _0x150d92=0x0;_0x150d92<_0x2cb156[_0x245e84(0x1b7)];_0x150d92++){const _0x38df63=_0x2cb156[_0x150d92],_0x43bcce=_0x5a766d+_0x245e84(0x18b)+_0x150d92+']';_0x2692ca[_0x245e84(0x17c)](...checkCondition(_0x38df63,_0x43bcce,_0x323615));}return _0x2692ca;}function checkCondition(_0x5eac0e,_0x392272,_0x196137){const _0x6222a0=a144_0x1226,_0x1b0c41=[];if(_0x5eac0e[_0x6222a0(0x187)]==='And'||_0x5eac0e[_0x6222a0(0x187)]==='Or')return _0x5eac0e['conditions'][_0x6222a0(0x1b7)]===0x0?_0x1b0c41[_0x6222a0(0x17c)]({'level':'error','path':_0x392272+_0x6222a0(0x1a4),'code':'EMPTY_CONDITIONS','message':_0x5eac0e[_0x6222a0(0x187)]+_0x6222a0(0x17f),'location':getLocationFromPath(_0x196137['document'],_0x196137[_0x6222a0(0x186)],pathToArray(_0x392272+_0x6222a0(0x1a4)))}):_0x1b0c41[_0x6222a0(0x17c)]({'level':_0x6222a0(0x174),'path':_0x392272,'code':_0x6222a0(0x172),'message':_0x5eac0e['type']+_0x6222a0(0x1b3)+_0x6222a0(0x1ad)+_0x6222a0(0x181),'location':getLocationFromPath(_0x196137[_0x6222a0(0x18c)],_0x196137['source'],pathToArray(_0x392272))}),_0x1b0c41;if(_0x5eac0e['type']===_0x6222a0(0x199)||_0x5eac0e[_0x6222a0(0x187)]==='Behavior'){const _0x3420ab=_0x5eac0e,_0x371964=_0x3420ab[_0x6222a0(0x186)],_0x178b57=_0x3420ab[_0x6222a0(0x198)],_0x334443=_0x371964||_0x178b57;(!_0x3420ab[_0x6222a0(0x182)]||_0x3420ab['attribute']==='')&&(!_0x334443&&_0x1b0c41[_0x6222a0(0x17c)]({'level':_0x6222a0(0x174),'path':_0x392272+_0x6222a0(0x196),'code':_0x6222a0(0x1b8),'message':_0x6222a0(0x1b5),'location':getLocationFromPath(_0x196137['document'],_0x196137[_0x6222a0(0x186)],pathToArray(_0x392272+'.attribute'))}));_0x3420ab[_0x6222a0(0x177)]&&_0x1b0c41[_0x6222a0(0x17c)](...checkRule(_0x3420ab['filter'],_0x392272+_0x6222a0(0x1b1),_0x196137));if(_0x3420ab['source']){const _0x310bc9=_0x3420ab[_0x6222a0(0x182)]&&_0x3420ab['attribute']!=='';_0x310bc9&&!_0x3420ab[_0x6222a0(0x177)]&&_0x1b0c41[_0x6222a0(0x17c)]({'level':_0x6222a0(0x174),'path':_0x392272+_0x6222a0(0x18f),'code':_0x6222a0(0x1a6),'message':_0x6222a0(0x19e)+_0x3420ab[_0x6222a0(0x186)]+_0x6222a0(0x1a3)+_0x3420ab[_0x6222a0(0x182)]+'\x27\x20'+_0x6222a0(0x175)+_0x6222a0(0x1aa)+_0x6222a0(0x1ae),'location':getLocationFromPath(_0x196137[_0x6222a0(0x18c)],_0x196137[_0x6222a0(0x186)],pathToArray(_0x392272+_0x6222a0(0x18f)))}),_0x310bc9&&_0x3420ab[_0x6222a0(0x177)]&&_0x1b0c41[_0x6222a0(0x17c)]({'level':'warning','path':_0x392272+_0x6222a0(0x196),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':'Attribute\x20\x27'+_0x3420ab[_0x6222a0(0x182)]+_0x6222a0(0x190)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x196137['document'],_0x196137['source'],pathToArray(_0x392272+_0x6222a0(0x196)))});}}return _0x1b0c41;}
1
+ (function(_0x3ec8a3,_0x4601f6){const _0x466eb1=a144_0x3ee2,_0x1314b6=_0x3ec8a3();while(!![]){try{const _0x1f2270=parseInt(_0x466eb1(0xbf))/0x1+parseInt(_0x466eb1(0xd0))/0x2+parseInt(_0x466eb1(0xc6))/0x3+-parseInt(_0x466eb1(0xae))/0x4*(parseInt(_0x466eb1(0xb3))/0x5)+-parseInt(_0x466eb1(0xde))/0x6*(-parseInt(_0x466eb1(0xe1))/0x7)+-parseInt(_0x466eb1(0xcc))/0x8*(parseInt(_0x466eb1(0xec))/0x9)+-parseInt(_0x466eb1(0xef))/0xa*(-parseInt(_0x466eb1(0xd2))/0xb);if(_0x1f2270===_0x4601f6)break;else _0x1314b6['push'](_0x1314b6['shift']());}catch(_0x9d3345){_0x1314b6['push'](_0x1314b6['shift']());}}}(a144_0x1703,0x369e3));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a144_0x3ee2(_0x199c9a,_0x37d803){_0x199c9a=_0x199c9a-0xa9;const _0x17033f=a144_0x1703();let _0x3ee2f5=_0x17033f[_0x199c9a];return _0x3ee2f5;}export function validateSegmentDef(_0x4d3f62,_0x5bf268={},_0x4d865b={}){const _0x562aae=a144_0x3ee2;if(_0x4d865b[_0x562aae(0xd3)])return runSemanticChecks(_0x4d3f62,_0x5bf268);const _0x32c1fe=SegmentDefSchema[_0x562aae(0xdf)](_0x4d3f62);if(_0x32c1fe[_0x562aae(0xcf)])return runSemanticChecks(_0x32c1fe[_0x562aae(0xc1)],_0x5bf268);return zodErrorsToValidationResult(_0x32c1fe[_0x562aae(0xf2)],_0x5bf268);}export function validateRuleDef(_0x16cd4d,_0xcec3e,_0x4ea1dc){const _0x41419b=a144_0x3ee2;if(!_0x16cd4d)return[];const _0x579b26=RuleDefSchema['safeParse'](_0x16cd4d);if(_0x579b26[_0x41419b(0xcf)])return checkRule(_0x579b26['data'],_0xcec3e,_0x4ea1dc);const _0x219a57=flattenZodIssues(_0x579b26[_0x41419b(0xf2)][_0x41419b(0xe5)]);return _0x219a57[_0x41419b(0xbe)](_0xf6fb87=>{const _0x10a3a4=_0x41419b,_0x2d5791=formatZodPath(_0xf6fb87[_0x10a3a4(0xaa)]),_0x4033d9=_0x2d5791?_0xcec3e+'.'+_0x2d5791:_0xcec3e,_0x324ab5=mapZodIssueToCode(_0xf6fb87,_0x2d5791),_0x22ccea=getLocationFromPath(_0x4ea1dc[_0x10a3a4(0xd8)],_0x4ea1dc['source'],pathToArray(_0x4033d9));return{'level':'error','path':_0x4033d9,'code':_0x324ab5,'message':_0xf6fb87[_0x10a3a4(0xdb)],..._0x22ccea&&{'location':_0x22ccea}};});}function zodErrorsToValidationResult(_0x1acf63,_0x50e272){const _0x18eca7=a144_0x3ee2,_0x5aef1a=flattenZodIssues(_0x1acf63[_0x18eca7(0xe5)]),_0x356ba6=_0x5aef1a[_0x18eca7(0xbe)](_0x138a90=>{const _0x4687be=_0x18eca7,_0x3866d6=formatZodPath(_0x138a90[_0x4687be(0xaa)]),_0x3965e3=mapZodIssueToCode(_0x138a90,_0x3866d6),_0x53541d=getLocationFromPath(_0x50e272[_0x4687be(0xd8)],_0x50e272['source'],_0x138a90[_0x4687be(0xaa)][_0x4687be(0xbe)](_0x1194b9=>typeof _0x1194b9===_0x4687be(0xb6)?String(_0x1194b9):_0x1194b9));return{'level':_0x4687be(0xf2),'path':_0x3866d6,'code':_0x3965e3,'message':_0x138a90['message'],..._0x53541d&&{'location':_0x53541d}};});return{'valid':![],'errors':_0x356ba6,'warnings':[]};}function mapZodIssueToCode(_0x535811,_0x1d7e90){const _0x228407=a144_0x3ee2,_0x4804b9=_0x535811[_0x228407(0xe3)]==='custom'?_0x535811[_0x228407(0xf1)]:undefined;if(_0x1d7e90===_0x228407(0xc0))return _0x228407(0xbd);if(_0x1d7e90===_0x228407(0xd5)||_0x1d7e90[_0x228407(0xc7)](_0x228407(0xb4))){if(_0x535811[_0x228407(0xe3)]==='invalid_value'){if(_0x1d7e90===_0x228407(0xd5)||_0x1d7e90[_0x228407(0xca)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x1d7e90[_0x228407(0xc7)]('.operator.type'))return _0x228407(0xe4);if(_0x1d7e90['endsWith'](_0x228407(0xe7)))return _0x228407(0xb8);if(_0x4804b9?.[_0x228407(0xcd)]===_0x228407(0xd4))return'MISSING_BETWEEN_BOUNDS';if(_0x4804b9?.[_0x228407(0xcd)]===_0x228407(0xed))return _0x228407(0xed);if(_0x1d7e90['endsWith'](_0x228407(0xcb))||_0x1d7e90===_0x228407(0xc3))return _0x228407(0xac);if(_0x1d7e90['includes']('arrayMatching'))return _0x228407(0xc2);if(_0x1d7e90['endsWith'](_0x228407(0xd9)))return'MISSING_SEGMENT_REFERENCE';return _0x228407(0xd6);}function runSemanticChecks(_0x148584,_0x7a66e6){const _0x36389c=a144_0x3ee2,_0x4fbbc4=[];_0x148584[_0x36389c(0xbc)]&&_0x4fbbc4[_0x36389c(0xad)](...checkRule(_0x148584['rule'],_0x36389c(0xbc),_0x7a66e6));const _0x89c467=_0x4fbbc4[_0x36389c(0xc9)](_0x4f254c=>_0x4f254c[_0x36389c(0xf0)]===_0x36389c(0xf2)),_0x46e509=_0x4fbbc4[_0x36389c(0xc9)](_0x135328=>_0x135328[_0x36389c(0xf0)]==='warning');return{'valid':_0x89c467[_0x36389c(0xdc)]===0x0,'errors':_0x89c467,'warnings':_0x46e509};}function checkRule(_0x560068,_0x239851,_0x13e672){const _0x59e059=a144_0x3ee2,_0x46acbc=[];if(_0x560068[_0x59e059(0xc3)]['length']===0x0)return _0x46acbc[_0x59e059(0xad)]({'level':_0x59e059(0xf2),'path':_0x239851+_0x59e059(0xcb),'code':_0x59e059(0xb1),'message':_0x59e059(0xb9),'location':getLocationFromPath(_0x13e672[_0x59e059(0xd8)],_0x13e672[_0x59e059(0xd7)],pathToArray(_0x239851+'.conditions'))}),_0x46acbc;return _0x46acbc[_0x59e059(0xad)](...checkConditions(_0x560068[_0x59e059(0xc3)],_0x239851,_0x13e672)),_0x46acbc;}function checkConditions(_0xbfaadb,_0x2547c1,_0x5dbfda){const _0x16fc14=a144_0x3ee2,_0x2eef51=[];for(let _0x96fa7f=0x0;_0x96fa7f<_0xbfaadb[_0x16fc14(0xdc)];_0x96fa7f++){const _0xf18963=_0xbfaadb[_0x96fa7f],_0xd6a7c0=_0x2547c1+'.conditions['+_0x96fa7f+']';_0x2eef51[_0x16fc14(0xad)](...checkCondition(_0xf18963,_0xd6a7c0,_0x5dbfda));}return _0x2eef51;}function checkCondition(_0x2fef72,_0x5552a9,_0x20fd80){const _0x3d3bfa=a144_0x3ee2,_0x55661a=[];if(_0x2fef72[_0x3d3bfa(0xc4)]===_0x3d3bfa(0xb5)||_0x2fef72[_0x3d3bfa(0xc4)]==='Or')return _0x2fef72['conditions'][_0x3d3bfa(0xdc)]===0x0?_0x55661a[_0x3d3bfa(0xad)]({'level':_0x3d3bfa(0xf2),'path':_0x5552a9+_0x3d3bfa(0xcb),'code':'EMPTY_CONDITIONS','message':_0x2fef72[_0x3d3bfa(0xc4)]+_0x3d3bfa(0xb2),'location':getLocationFromPath(_0x20fd80[_0x3d3bfa(0xd8)],_0x20fd80[_0x3d3bfa(0xd7)],pathToArray(_0x5552a9+_0x3d3bfa(0xcb)))}):_0x55661a[_0x3d3bfa(0xad)]({'level':_0x3d3bfa(0xf2),'path':_0x5552a9,'code':_0x3d3bfa(0xee),'message':_0x2fef72[_0x3d3bfa(0xc4)]+_0x3d3bfa(0xc5)+_0x3d3bfa(0xdd)+_0x3d3bfa(0xce),'location':getLocationFromPath(_0x20fd80[_0x3d3bfa(0xd8)],_0x20fd80[_0x3d3bfa(0xd7)],pathToArray(_0x5552a9))}),_0x55661a;if(_0x2fef72['type']===_0x3d3bfa(0xe0)||_0x2fef72[_0x3d3bfa(0xc4)]===_0x3d3bfa(0xe8)){const _0x4e198d=_0x2fef72,_0x10173f=_0x4e198d[_0x3d3bfa(0xd7)],_0x40f1ca=_0x4e198d['aggregation'],_0x374fbe=_0x10173f||_0x40f1ca;(!_0x4e198d['attribute']||_0x4e198d['attribute']==='')&&(!_0x374fbe&&_0x55661a[_0x3d3bfa(0xad)]({'level':_0x3d3bfa(0xf2),'path':_0x5552a9+_0x3d3bfa(0xeb),'code':_0x3d3bfa(0xe9),'message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x20fd80[_0x3d3bfa(0xd8)],_0x20fd80[_0x3d3bfa(0xd7)],pathToArray(_0x5552a9+_0x3d3bfa(0xeb)))}));_0x4e198d[_0x3d3bfa(0xc9)]&&_0x55661a[_0x3d3bfa(0xad)](...checkRule(_0x4e198d['filter'],_0x5552a9+_0x3d3bfa(0xd1),_0x20fd80));if(_0x4e198d[_0x3d3bfa(0xd7)]){const _0xcb4254=_0x4e198d[_0x3d3bfa(0xe2)]&&_0x4e198d['attribute']!=='';_0xcb4254&&!_0x4e198d[_0x3d3bfa(0xc9)]&&_0x55661a[_0x3d3bfa(0xad)]({'level':_0x3d3bfa(0xf2),'path':_0x5552a9+_0x3d3bfa(0xda),'code':_0x3d3bfa(0xaf),'message':_0x3d3bfa(0xb0)+_0x4e198d[_0x3d3bfa(0xd7)]+_0x3d3bfa(0xb7)+_0x4e198d[_0x3d3bfa(0xe2)]+'\x27\x20'+_0x3d3bfa(0xe6)+_0x3d3bfa(0xbb)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x20fd80[_0x3d3bfa(0xd8)],_0x20fd80['source'],pathToArray(_0x5552a9+_0x3d3bfa(0xda)))}),_0xcb4254&&_0x4e198d['filter']&&_0x55661a[_0x3d3bfa(0xad)]({'level':_0x3d3bfa(0xa9),'path':_0x5552a9+'.attribute','code':_0x3d3bfa(0xab),'message':_0x3d3bfa(0xea)+_0x4e198d[_0x3d3bfa(0xe2)]+_0x3d3bfa(0xba)+_0x3d3bfa(0xc8),'location':getLocationFromPath(_0x20fd80[_0x3d3bfa(0xd8)],_0x20fd80[_0x3d3bfa(0xd7)],pathToArray(_0x5552a9+_0x3d3bfa(0xeb)))});}}return _0x55661a;}function a144_0x1703(){const _0x2de16b=['BEHAVIOR_SOURCE_WITH_ATTRIBUTE','MISSING_CONDITIONS','push','224KaHKVY','BEHAVIOR_SOURCE_MISSING_FILTER','Behavior\x20source\x20\x27','EMPTY_CONDITIONS','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','24685ETFgGE','.type','And','symbol','\x27\x20with\x20attribute\x20\x27','MISSING_OPERATOR_VALUE','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','rule','MISSING_NAME','map','50480mBOcSF','name','data','INVALID_ARRAY_MATCHING','conditions','type','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','264657gaHeeo','endsWith','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','filter','match','.conditions','9552eoYxwM','validationCode','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','success','275478qVDyKA','.filter','25597tHMQRh','skipSchema','MISSING_BETWEEN_BOUNDS','rule.type','SEGMENT_SCHEMA_ERROR','source','document','.segment','.source','message','length','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','21738AnPUoT','safeParse','Value','238jyxzTC','attribute','code','INVALID_OPERATOR_TYPE','issues','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','.operator.value','Behavior','EMPTY_ATTRIBUTE','Attribute\x20\x27','.attribute','1224dDOKkV','MISSING_TIME_UNIT','NESTED_CONDITION_GROUP','1130AoHHxD','level','params','error','warning','path'];a144_0x1703=function(){return _0x2de16b;};return a144_0x1703();}
@@ -1 +1 @@
1
- (function(_0x661ce8,_0x5569b7){const _0x3aa823=a145_0x3f9f,_0x319bae=_0x661ce8();while(!![]){try{const _0x6b17b8=parseInt(_0x3aa823(0x18c))/0x1+parseInt(_0x3aa823(0x1b0))/0x2*(parseInt(_0x3aa823(0x1be))/0x3)+-parseInt(_0x3aa823(0x193))/0x4+-parseInt(_0x3aa823(0x1a9))/0x5+-parseInt(_0x3aa823(0x18b))/0x6+-parseInt(_0x3aa823(0x1a4))/0x7*(parseInt(_0x3aa823(0x194))/0x8)+parseInt(_0x3aa823(0x1bc))/0x9;if(_0x6b17b8===_0x5569b7)break;else _0x319bae['push'](_0x319bae['shift']());}catch(_0x30e8a3){_0x319bae['push'](_0x319bae['shift']());}}}(a145_0x2f65,0xc8be2));import a145_0x17acdf from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a145_0x3f9f(_0x1d6083,_0x3526d7){_0x1d6083=_0x1d6083-0x188;const _0x2f6548=a145_0x2f65();let _0x3f9f8d=_0x2f6548[_0x1d6083];return _0x3f9f8d;}import{nodeFileSystem}from'../io/node-filesystem.js';function a145_0x2f65(){const _0x1191ba=['string','isScoped','1761146VyFmsu','directory','folderPath','parent_segment','join','trim','invalid_yaml','context','parentSegment','relative','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','message','15561630PzSIzM','journey','3XzboxO','segment','isDirectory','resourceType','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','readFile','2308248rWhITK','979828wryGeO','File\x20not\x20found:\x20','error','startsWith','no_config','dirname','root','4628456SJYvBP','2752kEljxf','parse','isFile','scopedFolderPath','No\x20tdx.json\x20found','segmentName','Not\x20a\x20YAML\x20file:\x20','resolve','stat','no_parent','Parent\x20segment\x20not\x20specified','No\x20tdx.json\x20found\x20for\x20file:\x20','file','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','type','extname','3962lPnDjW','match','includes','tdx.json','basename','5153515HbctBp','replace','configDir','exists','parent_name'];a145_0x2f65=function(){return _0x1191ba;};return a145_0x2f65();}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x52f77f){const _0x566fc8=a145_0x3f9f;return _0x52f77f[_0x566fc8(0x1a2)]!==_0x566fc8(0x18e);}export function isScopedResolution(_0x12785f){const _0x5957e6=a145_0x3f9f;return _0x12785f[_0x5957e6(0x1a2)]===_0x5957e6(0x1b1)||_0x12785f[_0x5957e6(0x1a2)]==='file'||_0x12785f[_0x5957e6(0x1a2)]==='context';}export function getScopedDetails(_0xc8b641){const _0xdefc8e=a145_0x3f9f;if(isScopedResolution(_0xc8b641))return{'isScoped':_0xc8b641[_0xdefc8e(0x1af)],'scopedFolderPath':_0xc8b641[_0xdefc8e(0x197)]};return undefined;}async function findTdxConfigAsync(_0x23dc13,_0x5ba21f){const _0x4616c3=a145_0x3f9f;let _0x5e6ed5=a145_0x17acdf['resolve'](_0x23dc13);const _0x16a15d=a145_0x17acdf[_0x4616c3(0x195)](_0x5e6ed5)[_0x4616c3(0x192)];while(_0x5e6ed5!==_0x16a15d){const _0x2f00db=a145_0x17acdf[_0x4616c3(0x1b4)](_0x5e6ed5,_0x4616c3(0x1a7));if(await _0x5ba21f[_0x4616c3(0x1ac)](_0x2f00db))try{const _0x5c103d=await _0x5ba21f[_0x4616c3(0x18a)](_0x2f00db),_0x1c8f35=JSON[_0x4616c3(0x195)](_0x5c103d);if(_0x1c8f35[_0x4616c3(0x1b3)]&&typeof _0x1c8f35[_0x4616c3(0x1b3)]===_0x4616c3(0x1ae))return{'configPath':_0x2f00db,'configDir':_0x5e6ed5,'parentSegment':_0x1c8f35[_0x4616c3(0x1b3)]};}catch{}_0x5e6ed5=a145_0x17acdf[_0x4616c3(0x191)](_0x5e6ed5);}return null;}function calculateScopedPath(_0x9c2c22,_0x55ff52){const _0x5bf1c6=a145_0x3f9f,_0x23d423=a145_0x17acdf[_0x5bf1c6(0x1b9)](_0x55ff52,_0x9c2c22),_0x21effe=_0x23d423!==''&&_0x23d423!=='.'&&!_0x23d423[_0x5bf1c6(0x18f)]('..');return{'isScoped':_0x21effe,'scopedFolderPath':_0x21effe?_0x23d423[_0x5bf1c6(0x1aa)](/\\/g,'/'):''};}export async function resolveTarget(_0x39596d){const _0x1b90d0=a145_0x3f9f,{arg:_0x50ed68,contextParent:_0x5536b6,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x39596d;if(_0x50ed68&&isYamlFilePath(_0x50ed68))try{const _0x565a71=await resolveYamlFilePath(_0x50ed68,fs),_0x1238a9=a145_0x17acdf[_0x1b90d0(0x19b)](_0x50ed68),_0x2d643d=a145_0x17acdf[_0x1b90d0(0x191)](_0x1238a9),_0x21e1b9=await findTdxConfigAsync(_0x2d643d,fs);if(!_0x21e1b9){if(_0x5536b6){const _0x260799=a145_0x17acdf[_0x1b90d0(0x191)](_0x1238a9);return{'type':_0x1b90d0(0x1a0),'parentName':_0x5536b6,'targetDir':_0x260799,'configRoot':_0x260799,'filePath':_0x1238a9,'resourceName':_0x565a71[_0x1b90d0(0x199)],'folderPath':_0x565a71[_0x1b90d0(0x1b2)],'resourceType':_0x565a71[_0x1b90d0(0x188)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1b90d0(0x18e),'errorCode':_0x1b90d0(0x190),'message':_0x1b90d0(0x19f)+_0x50ed68,'arg':_0x50ed68,'helpText':_0x1b90d0(0x189)};}const _0x2908ce=calculateScopedPath(_0x2d643d,_0x21e1b9['configDir']);return{'type':_0x1b90d0(0x1a0),'parentName':_0x21e1b9[_0x1b90d0(0x1b8)],'targetDir':_0x21e1b9[_0x1b90d0(0x1ab)],'configRoot':_0x21e1b9[_0x1b90d0(0x1ab)],'filePath':_0x1238a9,'resourceName':_0x565a71[_0x1b90d0(0x199)],'folderPath':_0x565a71[_0x1b90d0(0x1b2)],'resourceType':_0x565a71[_0x1b90d0(0x188)],'isScoped':_0x2908ce[_0x1b90d0(0x1af)],'scopedFolderPath':_0x2908ce[_0x1b90d0(0x197)]};}catch(_0x22a39e){const _0x14e225=_0x22a39e instanceof Error?_0x22a39e[_0x1b90d0(0x1bb)]:String(_0x22a39e);if(_0x14e225[_0x1b90d0(0x1a6)]('File\x20not\x20found'))return{'type':'error','errorCode':'file_not_found','message':_0x1b90d0(0x18d)+_0x50ed68,'arg':_0x50ed68};if(_0x14e225[_0x1b90d0(0x1a6)](_0x1b90d0(0x198))){if(_0x5536b6){const _0x5ae03b=a145_0x17acdf[_0x1b90d0(0x19b)](_0x50ed68);if(await fs[_0x1b90d0(0x1ac)](_0x5ae03b)){const _0x295a13=a145_0x17acdf[_0x1b90d0(0x191)](_0x5ae03b),_0x5f1ba=await fs['readFile'](_0x5ae03b),_0x4598dd=_0x5f1ba[_0x1b90d0(0x1a5)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3c923e=_0x5f1ba[_0x1b90d0(0x1a5)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x417d54=_0x4598dd?_0x4598dd[0x1][_0x1b90d0(0x1b5)]():a145_0x17acdf[_0x1b90d0(0x1a8)](_0x50ed68,a145_0x17acdf[_0x1b90d0(0x1a3)](_0x50ed68)),_0x3a1107=_0x3c923e&&_0x3c923e[0x1][_0x1b90d0(0x1b5)]()===_0x1b90d0(0x1bd)?_0x1b90d0(0x1bd):_0x1b90d0(0x1bf);return{'type':'file','parentName':_0x5536b6,'targetDir':_0x295a13,'configRoot':_0x295a13,'filePath':_0x5ae03b,'resourceName':_0x417d54,'folderPath':'','resourceType':_0x3a1107,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1b90d0(0x18e),'errorCode':_0x1b90d0(0x190),'message':_0x1b90d0(0x19f)+_0x50ed68,'arg':_0x50ed68,'helpText':_0x1b90d0(0x189)};}return{'type':_0x1b90d0(0x18e),'errorCode':'invalid_yaml','message':_0x14e225,'arg':_0x50ed68};}if(_0x50ed68){const _0x16f8c5=a145_0x17acdf[_0x1b90d0(0x19b)](cwd,_0x50ed68);let _0x32ef37=null;try{_0x32ef37=await fs[_0x1b90d0(0x19c)](_0x16f8c5);}catch{}if(_0x32ef37?.[_0x1b90d0(0x1c0)]()){const _0x256691=await findTdxConfigAsync(_0x16f8c5,fs);if(_0x256691){const _0xee647=calculateScopedPath(_0x16f8c5,_0x256691[_0x1b90d0(0x1ab)]);return{'type':'directory','parentName':_0x256691[_0x1b90d0(0x1b8)],'targetDir':_0x16f8c5,'configRoot':_0x256691[_0x1b90d0(0x1ab)],'isScoped':_0xee647[_0x1b90d0(0x1af)],'scopedFolderPath':_0xee647[_0x1b90d0(0x197)]};}if(_0x5536b6)return{'type':_0x1b90d0(0x1b1),'parentName':_0x5536b6,'targetDir':_0x16f8c5,'configRoot':_0x16f8c5,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1b90d0(0x18e),'errorCode':'no_config','message':_0x1b90d0(0x1ba)+_0x50ed68,'arg':_0x50ed68,'helpText':_0x1b90d0(0x189)};}if(_0x32ef37?.[_0x1b90d0(0x196)]())return{'type':_0x1b90d0(0x18e),'errorCode':_0x1b90d0(0x1b6),'message':_0x1b90d0(0x19a)+_0x50ed68,'arg':_0x50ed68,'helpText':_0x1b90d0(0x1a1)};const _0x4f5c07=sanitizeFileName(_0x50ed68),_0x394c4d=getSegmentRootDir(_0x4f5c07,cwd);return{'type':_0x1b90d0(0x1ad),'parentName':_0x50ed68,'targetDir':_0x394c4d,'configRoot':_0x394c4d};}const _0x2e63c5=await findTdxConfigAsync(cwd,fs);if(_0x2e63c5){const _0xb714d2=calculateScopedPath(cwd,_0x2e63c5['configDir']);return{'type':_0x1b90d0(0x1b7),'parentName':_0x2e63c5['parentSegment'],'targetDir':cwd,'configRoot':_0x2e63c5[_0x1b90d0(0x1ab)],'isScoped':_0xb714d2['isScoped'],'scopedFolderPath':_0xb714d2[_0x1b90d0(0x197)]};}if(_0x5536b6){const _0x1b958f=sanitizeFileName(_0x5536b6),_0x253573=getSegmentRootDir(_0x1b958f,cwd);return{'type':'context','parentName':_0x5536b6,'targetDir':_0x253573,'configRoot':_0x253573,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1b90d0(0x18e),'errorCode':_0x1b90d0(0x19d),'message':_0x1b90d0(0x19e),'helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
1
+ (function(_0x2f5a49,_0x192889){const _0x1c0a74=a145_0x26f5,_0x59382b=_0x2f5a49();while(!![]){try{const _0x54ab26=parseInt(_0x1c0a74(0x1c9))/0x1+parseInt(_0x1c0a74(0x1ab))/0x2*(parseInt(_0x1c0a74(0x1c7))/0x3)+parseInt(_0x1c0a74(0x1bd))/0x4+parseInt(_0x1c0a74(0x1d2))/0x5+-parseInt(_0x1c0a74(0x1a6))/0x6+-parseInt(_0x1c0a74(0x1a3))/0x7*(-parseInt(_0x1c0a74(0x1bb))/0x8)+-parseInt(_0x1c0a74(0x1d0))/0x9;if(_0x54ab26===_0x192889)break;else _0x59382b['push'](_0x59382b['shift']());}catch(_0x4bf375){_0x59382b['push'](_0x59382b['shift']());}}}(a145_0x25b9,0xbe69d));import a145_0x4af232 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';function a145_0x26f5(_0x2c243c,_0xc7c2d7){_0x2c243c=_0x2c243c-0x1a3;const _0x25b98d=a145_0x25b9();let _0x26f543=_0x25b98d[_0x2c243c];return _0x26f543;}import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0xd0af72){const _0x2578b0=a145_0x26f5;return _0xd0af72[_0x2578b0(0x1d3)]!=='error';}function a145_0x25b9(){const _0x323877=['resourceType','no_parent','directory','invalid_yaml','File\x20not\x20found','isDirectory','journey','isFile','segmentName','readFile','segment','message','279448oCgter','isScoped','296888oTonKt','trim','stat','File\x20not\x20found:\x20','No\x20tdx.json\x20found','string','file_not_found','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','exists','resolve','474LZCfZB','parentSegment','827990nTXZGY','folderPath','includes','startsWith','scopedFolderPath','replace','configDir','34441452jZQECN','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','5222425qKYHzr','type','match','No\x20tdx.json\x20found\x20for\x20file:\x20','error','root','231lFCicD','no_config','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','104154dxnLOn','context','dirname','parent_name','parse','19300aLYKVS','file','Parent\x20segment\x20not\x20specified','parent_segment'];a145_0x25b9=function(){return _0x323877;};return a145_0x25b9();}export function isScopedResolution(_0x436523){const _0x5ce50c=a145_0x26f5;return _0x436523[_0x5ce50c(0x1d3)]===_0x5ce50c(0x1b1)||_0x436523[_0x5ce50c(0x1d3)]===_0x5ce50c(0x1ac)||_0x436523[_0x5ce50c(0x1d3)]===_0x5ce50c(0x1a7);}export function getScopedDetails(_0x59b940){const _0x4ef1e1=a145_0x26f5;if(isScopedResolution(_0x59b940))return{'isScoped':_0x59b940[_0x4ef1e1(0x1bc)],'scopedFolderPath':_0x59b940['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x5ebb73,_0x4ff43d){const _0x293731=a145_0x26f5;let _0x55cd2c=a145_0x4af232[_0x293731(0x1c6)](_0x5ebb73);const _0x5c778b=a145_0x4af232[_0x293731(0x1aa)](_0x55cd2c)[_0x293731(0x1d7)];while(_0x55cd2c!==_0x5c778b){const _0x57b608=a145_0x4af232['join'](_0x55cd2c,'tdx.json');if(await _0x4ff43d['exists'](_0x57b608))try{const _0x5a7305=await _0x4ff43d[_0x293731(0x1b8)](_0x57b608),_0x14024b=JSON[_0x293731(0x1aa)](_0x5a7305);if(_0x14024b[_0x293731(0x1ae)]&&typeof _0x14024b[_0x293731(0x1ae)]===_0x293731(0x1c2))return{'configPath':_0x57b608,'configDir':_0x55cd2c,'parentSegment':_0x14024b[_0x293731(0x1ae)]};}catch{}_0x55cd2c=a145_0x4af232[_0x293731(0x1a8)](_0x55cd2c);}return null;}function calculateScopedPath(_0xde0615,_0x335389){const _0x46f4a6=a145_0x26f5,_0x20fafc=a145_0x4af232['relative'](_0x335389,_0xde0615),_0x356aa4=_0x20fafc!==''&&_0x20fafc!=='.'&&!_0x20fafc[_0x46f4a6(0x1cc)]('..');return{'isScoped':_0x356aa4,'scopedFolderPath':_0x356aa4?_0x20fafc[_0x46f4a6(0x1ce)](/\\/g,'/'):''};}export async function resolveTarget(_0xb71643){const _0x208d9b=a145_0x26f5,{arg:_0x4e4799,contextParent:_0x1df4f7,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0xb71643;if(_0x4e4799&&isYamlFilePath(_0x4e4799))try{const _0xf476ad=await resolveYamlFilePath(_0x4e4799,fs),_0x21a0d5=a145_0x4af232[_0x208d9b(0x1c6)](_0x4e4799),_0xb655b6=a145_0x4af232[_0x208d9b(0x1a8)](_0x21a0d5),_0x1e3dcc=await findTdxConfigAsync(_0xb655b6,fs);if(!_0x1e3dcc){if(_0x1df4f7){const _0x5560ee=a145_0x4af232[_0x208d9b(0x1a8)](_0x21a0d5);return{'type':'file','parentName':_0x1df4f7,'targetDir':_0x5560ee,'configRoot':_0x5560ee,'filePath':_0x21a0d5,'resourceName':_0xf476ad['segmentName'],'folderPath':_0xf476ad[_0x208d9b(0x1ca)],'resourceType':_0xf476ad[_0x208d9b(0x1af)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x208d9b(0x1d6),'errorCode':_0x208d9b(0x1a4),'message':_0x208d9b(0x1d5)+_0x4e4799,'arg':_0x4e4799,'helpText':_0x208d9b(0x1d1)};}const _0x2eb96c=calculateScopedPath(_0xb655b6,_0x1e3dcc[_0x208d9b(0x1cf)]);return{'type':_0x208d9b(0x1ac),'parentName':_0x1e3dcc['parentSegment'],'targetDir':_0x1e3dcc[_0x208d9b(0x1cf)],'configRoot':_0x1e3dcc['configDir'],'filePath':_0x21a0d5,'resourceName':_0xf476ad[_0x208d9b(0x1b7)],'folderPath':_0xf476ad['folderPath'],'resourceType':_0xf476ad[_0x208d9b(0x1af)],'isScoped':_0x2eb96c['isScoped'],'scopedFolderPath':_0x2eb96c[_0x208d9b(0x1cd)]};}catch(_0xb98651){const _0x365713=_0xb98651 instanceof Error?_0xb98651[_0x208d9b(0x1ba)]:String(_0xb98651);if(_0x365713['includes'](_0x208d9b(0x1b3)))return{'type':_0x208d9b(0x1d6),'errorCode':_0x208d9b(0x1c3),'message':_0x208d9b(0x1c0)+_0x4e4799,'arg':_0x4e4799};if(_0x365713[_0x208d9b(0x1cb)](_0x208d9b(0x1c1))){if(_0x1df4f7){const _0x5291fe=a145_0x4af232[_0x208d9b(0x1c6)](_0x4e4799);if(await fs[_0x208d9b(0x1c5)](_0x5291fe)){const _0x10f66a=a145_0x4af232[_0x208d9b(0x1a8)](_0x5291fe),_0x114b0f=await fs[_0x208d9b(0x1b8)](_0x5291fe),_0x1c1ffd=_0x114b0f['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x292dcd=_0x114b0f[_0x208d9b(0x1d4)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x314ea7=_0x1c1ffd?_0x1c1ffd[0x1][_0x208d9b(0x1be)]():a145_0x4af232['basename'](_0x4e4799,a145_0x4af232['extname'](_0x4e4799)),_0x5c5112=_0x292dcd&&_0x292dcd[0x1][_0x208d9b(0x1be)]()===_0x208d9b(0x1b5)?_0x208d9b(0x1b5):_0x208d9b(0x1b9);return{'type':_0x208d9b(0x1ac),'parentName':_0x1df4f7,'targetDir':_0x10f66a,'configRoot':_0x10f66a,'filePath':_0x5291fe,'resourceName':_0x314ea7,'folderPath':'','resourceType':_0x5c5112,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x208d9b(0x1d6),'errorCode':_0x208d9b(0x1a4),'message':_0x208d9b(0x1d5)+_0x4e4799,'arg':_0x4e4799,'helpText':_0x208d9b(0x1d1)};}return{'type':_0x208d9b(0x1d6),'errorCode':_0x208d9b(0x1b2),'message':_0x365713,'arg':_0x4e4799};}if(_0x4e4799){const _0x46aa3b=a145_0x4af232[_0x208d9b(0x1c6)](cwd,_0x4e4799);let _0x3d2216=null;try{_0x3d2216=await fs[_0x208d9b(0x1bf)](_0x46aa3b);}catch{}if(_0x3d2216?.[_0x208d9b(0x1b4)]()){const _0x4e2ebc=await findTdxConfigAsync(_0x46aa3b,fs);if(_0x4e2ebc){const _0x2984b3=calculateScopedPath(_0x46aa3b,_0x4e2ebc[_0x208d9b(0x1cf)]);return{'type':_0x208d9b(0x1b1),'parentName':_0x4e2ebc['parentSegment'],'targetDir':_0x46aa3b,'configRoot':_0x4e2ebc[_0x208d9b(0x1cf)],'isScoped':_0x2984b3[_0x208d9b(0x1bc)],'scopedFolderPath':_0x2984b3[_0x208d9b(0x1cd)]};}if(_0x1df4f7)return{'type':_0x208d9b(0x1b1),'parentName':_0x1df4f7,'targetDir':_0x46aa3b,'configRoot':_0x46aa3b,'isScoped':![],'scopedFolderPath':''};return{'type':_0x208d9b(0x1d6),'errorCode':_0x208d9b(0x1a4),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x4e4799,'arg':_0x4e4799,'helpText':_0x208d9b(0x1d1)};}if(_0x3d2216?.[_0x208d9b(0x1b6)]())return{'type':_0x208d9b(0x1d6),'errorCode':_0x208d9b(0x1b2),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x4e4799,'arg':_0x4e4799,'helpText':_0x208d9b(0x1c4)};const _0x5e4d26=sanitizeFileName(_0x4e4799),_0xdef970=getSegmentRootDir(_0x5e4d26,cwd);return{'type':_0x208d9b(0x1a9),'parentName':_0x4e4799,'targetDir':_0xdef970,'configRoot':_0xdef970};}const _0x5a2e34=await findTdxConfigAsync(cwd,fs);if(_0x5a2e34){const _0x291635=calculateScopedPath(cwd,_0x5a2e34[_0x208d9b(0x1cf)]);return{'type':_0x208d9b(0x1a7),'parentName':_0x5a2e34[_0x208d9b(0x1c8)],'targetDir':cwd,'configRoot':_0x5a2e34['configDir'],'isScoped':_0x291635[_0x208d9b(0x1bc)],'scopedFolderPath':_0x291635[_0x208d9b(0x1cd)]};}if(_0x1df4f7){const _0x39937b=sanitizeFileName(_0x1df4f7),_0x4f28dc=getSegmentRootDir(_0x39937b,cwd);return{'type':'context','parentName':_0x1df4f7,'targetDir':_0x4f28dc,'configRoot':_0x4f28dc,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x208d9b(0x1b0),'message':_0x208d9b(0x1ad),'helpText':_0x208d9b(0x1a5)};}
@@ -1 +1 @@
1
- const a146_0x1d7db9=a146_0x56e8;(function(_0x539783,_0x123e6b){const _0xbc14e0=a146_0x56e8,_0x3ccc26=_0x539783();while(!![]){try{const _0x3ac608=-parseInt(_0xbc14e0(0x147))/0x1*(-parseInt(_0xbc14e0(0x158))/0x2)+parseInt(_0xbc14e0(0x151))/0x3+-parseInt(_0xbc14e0(0x14b))/0x4+-parseInt(_0xbc14e0(0x157))/0x5+parseInt(_0xbc14e0(0x159))/0x6+-parseInt(_0xbc14e0(0x14a))/0x7+parseInt(_0xbc14e0(0x156))/0x8;if(_0x3ac608===_0x123e6b)break;else _0x3ccc26['push'](_0x3ccc26['shift']());}catch(_0x426072){_0x3ccc26['push'](_0x3ccc26['shift']());}}}(a146_0x13a7,0x402ce));import{existsSync,readFileSync}from'fs';import a146_0x98795b from'path';const TDX_CONFIG_FILE=a146_0x1d7db9(0x15d),SEGMENTS_DIR=a146_0x1d7db9(0x154);function a146_0x56e8(_0x22a4fb,_0x1a585f){_0x22a4fb=_0x22a4fb-0x147;const _0x13a7c0=a146_0x13a7();let _0x56e8e6=_0x13a7c0[_0x22a4fb];return _0x56e8e6;}export function findTdxConfigPath(_0x2b5691=process[a146_0x1d7db9(0x14c)]()){const _0x22e9d5=a146_0x1d7db9;let _0x5316a6=a146_0x98795b[_0x22e9d5(0x15f)](_0x2b5691);const _0x480878=a146_0x98795b['parse'](_0x5316a6)[_0x22e9d5(0x14e)];while(_0x5316a6!==_0x480878){const _0x51f5a8=a146_0x98795b[_0x22e9d5(0x153)](_0x5316a6,TDX_CONFIG_FILE);if(existsSync(_0x51f5a8))return _0x51f5a8;_0x5316a6=a146_0x98795b[_0x22e9d5(0x149)](_0x5316a6);}return null;}export function loadTdxConfig(_0x3a8949){const _0x36e61e=a146_0x1d7db9,_0x361078=readFileSync(_0x3a8949,'utf-8');let _0x1102af;try{_0x1102af=JSON['parse'](_0x361078);}catch{throw new Error(_0x36e61e(0x152)+_0x3a8949);}if(!_0x1102af||typeof _0x1102af!==_0x36e61e(0x148))throw new Error(_0x36e61e(0x15a));const _0x5cbf52=_0x1102af,_0x2be74b=_0x5cbf52[_0x36e61e(0x155)]&&typeof _0x5cbf52['parent_segment']==='string',_0x123aa7=_0x5cbf52['engage_workspace']&&typeof _0x5cbf52[_0x36e61e(0x14d)]===_0x36e61e(0x160);if(!_0x2be74b&&!_0x123aa7)throw new Error(_0x36e61e(0x14f));const _0x11de3c={};return _0x2be74b&&(_0x11de3c['parent_segment']=_0x5cbf52['parent_segment']),_0x123aa7&&(_0x11de3c[_0x36e61e(0x14d)]=_0x5cbf52[_0x36e61e(0x14d)]),_0x11de3c;}export function findTdxConfig(_0x2dc399=process['cwd']()){const _0x4d986a=a146_0x1d7db9,_0x535f84=findTdxConfigPath(_0x2dc399);if(!_0x535f84)throw new Error(_0x4d986a(0x15e));const _0x2aebcb=loadTdxConfig(_0x535f84),_0x4a79fb=a146_0x98795b[_0x4d986a(0x149)](_0x535f84);return{'config':_0x2aebcb,'configPath':_0x535f84,'configDir':_0x4a79fb};}export function tryFindTdxConfig(_0x55b438){try{return findTdxConfig(_0x55b438);}catch{return null;}}export function getSegmentRootDir(_0x1ee0ba,_0x29e8bf=process['cwd']()){const _0x1f3b72=a146_0x1d7db9;return a146_0x98795b[_0x1f3b72(0x153)](_0x29e8bf,SEGMENTS_DIR,_0x1ee0ba);}function a146_0x13a7(){const _0x501628=['128MHuOPE','1031568qcqMim','Invalid\x20tdx.json:\x20expected\x20object','stringify','replace','tdx.json','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','resolve','string','1118ssXCjZ','object','dirname','2271192SWswBQ','1941908HmTmVb','cwd','engage_workspace','root','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','relative','255798veGzdf','Invalid\x20JSON\x20in\x20','join','segments','parent_segment','7084704tvYAwy','707695xalcvK'];a146_0x13a7=function(){return _0x501628;};return a146_0x13a7();}export function getTdxConfigPath(_0x55641a,_0xab225b=process[a146_0x1d7db9(0x14c)]()){const _0x6cd177=a146_0x1d7db9;return a146_0x98795b[_0x6cd177(0x153)](getSegmentRootDir(_0x55641a,_0xab225b),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5d3055,_0x1b2e9f){const _0x3fd36c=a146_0x1d7db9,_0x5eb467=a146_0x98795b[_0x3fd36c(0x15f)](_0x5d3055),_0x42a347=a146_0x98795b[_0x3fd36c(0x150)](_0x1b2e9f,_0x5eb467);if(_0x42a347['startsWith']('..'))return'';return _0x42a347;}export function localPathToTdFolderPath(_0x1d4733){const _0x378ac0=a146_0x1d7db9,_0x47120a=a146_0x98795b[_0x378ac0(0x149)](_0x1d4733);if(_0x47120a==='.'||_0x47120a==='')return'';return _0x47120a[_0x378ac0(0x15c)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x524abf,_0x21d036){if(!_0x524abf)return _0x21d036;return a146_0x98795b['join'](_0x21d036,_0x524abf);}export function createTdxConfigContent(_0x5bb013){const _0x272da4=a146_0x1d7db9,_0x13504b={'parent_segment':_0x5bb013};return JSON[_0x272da4(0x15b)](_0x13504b,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x56472b){const _0x44f9d5={'engage_workspace':_0x56472b};return JSON['stringify'](_0x44f9d5,null,0x2)+'\x0a';}
1
+ const a146_0x46ad8=a146_0x3f56;(function(_0x47ac47,_0x5973f1){const _0x3b1661=a146_0x3f56,_0x43eb9e=_0x47ac47();while(!![]){try{const _0x341151=parseInt(_0x3b1661(0x180))/0x1+-parseInt(_0x3b1661(0x199))/0x2*(-parseInt(_0x3b1661(0x181))/0x3)+parseInt(_0x3b1661(0x191))/0x4+-parseInt(_0x3b1661(0x18a))/0x5+parseInt(_0x3b1661(0x190))/0x6+parseInt(_0x3b1661(0x187))/0x7+-parseInt(_0x3b1661(0x196))/0x8;if(_0x341151===_0x5973f1)break;else _0x43eb9e['push'](_0x43eb9e['shift']());}catch(_0x4ced51){_0x43eb9e['push'](_0x43eb9e['shift']());}}}(a146_0x2b59,0x325c4));import{existsSync,readFileSync}from'fs';function a146_0x2b59(){const _0x3dea8b=['2913256GDhZRU','engage_workspace','relative','144216qFUorY','386759HBPzjU','6GUZshf','cwd','join','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parent_segment','object','25340GnSTQo','resolve','stringify','1019670NNaGwd','parse','utf-8','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','string','Invalid\x20JSON\x20in\x20','1246386OlCwAb','128164tKmrhx','segments','dirname','startsWith','root'];a146_0x2b59=function(){return _0x3dea8b;};return a146_0x2b59();}import a146_0x518a72 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a146_0x46ad8(0x192);export function findTdxConfigPath(_0xaf34bd=process[a146_0x46ad8(0x182)]()){const _0xa5222=a146_0x46ad8;let _0x3ec0c0=a146_0x518a72[_0xa5222(0x188)](_0xaf34bd);const _0x41db34=a146_0x518a72['parse'](_0x3ec0c0)[_0xa5222(0x195)];while(_0x3ec0c0!==_0x41db34){const _0x5ec08c=a146_0x518a72[_0xa5222(0x183)](_0x3ec0c0,TDX_CONFIG_FILE);if(existsSync(_0x5ec08c))return _0x5ec08c;_0x3ec0c0=a146_0x518a72[_0xa5222(0x193)](_0x3ec0c0);}return null;}export function loadTdxConfig(_0x177fe4){const _0x3c3186=a146_0x46ad8,_0x9e18b2=readFileSync(_0x177fe4,_0x3c3186(0x18c));let _0x1c6fdc;try{_0x1c6fdc=JSON[_0x3c3186(0x18b)](_0x9e18b2);}catch{throw new Error(_0x3c3186(0x18f)+_0x177fe4);}if(!_0x1c6fdc||typeof _0x1c6fdc!==_0x3c3186(0x186))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x552cd9=_0x1c6fdc,_0x3f0896=_0x552cd9[_0x3c3186(0x185)]&&typeof _0x552cd9[_0x3c3186(0x185)]===_0x3c3186(0x18e),_0x22ca7d=_0x552cd9[_0x3c3186(0x197)]&&typeof _0x552cd9[_0x3c3186(0x197)]===_0x3c3186(0x18e);if(!_0x3f0896&&!_0x22ca7d)throw new Error(_0x3c3186(0x18d));const _0x2dd784={};return _0x3f0896&&(_0x2dd784[_0x3c3186(0x185)]=_0x552cd9[_0x3c3186(0x185)]),_0x22ca7d&&(_0x2dd784['engage_workspace']=_0x552cd9[_0x3c3186(0x197)]),_0x2dd784;}export function findTdxConfig(_0x42c002=process['cwd']()){const _0x36aac4=a146_0x46ad8,_0x39911d=findTdxConfigPath(_0x42c002);if(!_0x39911d)throw new Error(_0x36aac4(0x184));const _0x35e46f=loadTdxConfig(_0x39911d),_0x5df909=a146_0x518a72[_0x36aac4(0x193)](_0x39911d);return{'config':_0x35e46f,'configPath':_0x39911d,'configDir':_0x5df909};}export function tryFindTdxConfig(_0xfc1347){try{return findTdxConfig(_0xfc1347);}catch{return null;}}export function getSegmentRootDir(_0xee78e3,_0x58634b=process[a146_0x46ad8(0x182)]()){const _0x3e1912=a146_0x46ad8;return a146_0x518a72[_0x3e1912(0x183)](_0x58634b,SEGMENTS_DIR,_0xee78e3);}export function getTdxConfigPath(_0x33f782,_0x3518a0=process[a146_0x46ad8(0x182)]()){return a146_0x518a72['join'](getSegmentRootDir(_0x33f782,_0x3518a0),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x14011c,_0x32a907){const _0x39f4be=a146_0x46ad8,_0x5f30f1=a146_0x518a72['resolve'](_0x14011c),_0x27ba37=a146_0x518a72[_0x39f4be(0x198)](_0x32a907,_0x5f30f1);if(_0x27ba37[_0x39f4be(0x194)]('..'))return'';return _0x27ba37;}export function localPathToTdFolderPath(_0x49f07d){const _0x439a9f=a146_0x518a72['dirname'](_0x49f07d);if(_0x439a9f==='.'||_0x439a9f==='')return'';return _0x439a9f['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x458245,_0x5a7229){const _0x4222a8=a146_0x46ad8;if(!_0x458245)return _0x5a7229;return a146_0x518a72[_0x4222a8(0x183)](_0x5a7229,_0x458245);}export function createTdxConfigContent(_0x4f180f){const _0x389397=a146_0x46ad8,_0x28131b={'parent_segment':_0x4f180f};return JSON[_0x389397(0x189)](_0x28131b,null,0x2)+'\x0a';}function a146_0x3f56(_0x519e15,_0x427c9c){_0x519e15=_0x519e15-0x180;const _0x2b5949=a146_0x2b59();let _0x3f5617=_0x2b5949[_0x519e15];return _0x3f5617;}export function createEngageTdxConfigContent(_0x23e1ba){const _0x1395a4=a146_0x46ad8,_0x28ccb8={'engage_workspace':_0x23e1ba};return JSON[_0x1395a4(0x189)](_0x28ccb8,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a147_0x2660bf=a147_0x4901;(function(_0x42a206,_0x3f8b4b){const _0x93509a=a147_0x4901,_0x100971=_0x42a206();while(!![]){try{const _0x475db2=parseInt(_0x93509a(0x1d7))/0x1*(-parseInt(_0x93509a(0x1e2))/0x2)+-parseInt(_0x93509a(0x1e9))/0x3*(parseInt(_0x93509a(0x1e6))/0x4)+-parseInt(_0x93509a(0x1f6))/0x5+-parseInt(_0x93509a(0x1ee))/0x6*(parseInt(_0x93509a(0x1e8))/0x7)+parseInt(_0x93509a(0x1d9))/0x8*(parseInt(_0x93509a(0x1e3))/0x9)+-parseInt(_0x93509a(0x1ef))/0xa+parseInt(_0x93509a(0x1f7))/0xb;if(_0x475db2===_0x3f8b4b)break;else _0x100971['push'](_0x100971['shift']());}catch(_0x4adac6){_0x100971['push'](_0x100971['shift']());}}}(a147_0x5d28,0x7c06b));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a147_0x2660bf(0x1ec),'hourly',a147_0x2660bf(0x1d4),a147_0x2660bf(0x1eb),a147_0x2660bf(0x1f4),a147_0x2660bf(0x1dd),'minutes_interval']);function a147_0x4901(_0x3fc6be,_0x4ebae5){_0x3fc6be=_0x3fc6be-0x1cd;const _0x5d2849=a147_0x5d28();let _0x490152=_0x5d2849[_0x3fc6be];return _0x490152;}export const RepeatUnitSchema=z[a147_0x2660bf(0x1e1)]([a147_0x2660bf(0x1d0),a147_0x2660bf(0x1da),a147_0x2660bf(0x1d3),a147_0x2660bf(0x1cf),a147_0x2660bf(0x1f2),a147_0x2660bf(0x1d2),a147_0x2660bf(0x1ec)]);function a147_0x5d28(){const _0x346c1f=['number','asc','enum','474244yGxAVu','522qvKrNG','unknown','First','4odLcGh','boolean','21924DyymMy','466113VtvMKH','onSuccess','weekly','none','desc','108VdSWcW','7274130zlaBwH','Connection\x20name\x20is\x20required','Activation\x20name\x20is\x20required','month','Top-N','monthly','All','4011100sybKZL','17269329XrhOXs','object','onFailure','Last','week','minute','masked','once','day','daily','string','nullable','1IsoqyI','record','126424YHxUlF','hour','optional','array','cron','min'];a147_0x5d28=function(){return _0x346c1f;};return a147_0x5d28();}export const ScheduleDefSchema=z[a147_0x2660bf(0x1f8)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a147_0x2660bf(0x1db)](),'repeat_frequency':z[a147_0x2660bf(0x1df)]()[a147_0x2660bf(0x1db)](),'repeat_sub_frequency':z[a147_0x2660bf(0x1dc)](z[a147_0x2660bf(0x1df)]())[a147_0x2660bf(0x1db)](),'start_at':z['string']()['nullable']()['optional'](),'end_on':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1d6)]()[a147_0x2660bf(0x1db)](),'timezone':z['string']()[a147_0x2660bf(0x1db)]()});export const NotificationDefSchema=z['object']({'notify_on':z[a147_0x2660bf(0x1dc)](z[a147_0x2660bf(0x1e1)]([a147_0x2660bf(0x1ea),a147_0x2660bf(0x1cd)]))['optional'](),'email_recipients':z[a147_0x2660bf(0x1dc)](z['string']())[a147_0x2660bf(0x1db)]()});export const ActivationColumnDefSchema=z['union']([z[a147_0x2660bf(0x1d5)](),z[a147_0x2660bf(0x1f8)]({'name':z[a147_0x2660bf(0x1d5)](),'type':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1db)](),'visibility':z[a147_0x2660bf(0x1e1)](['clear',a147_0x2660bf(0x1d1)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a147_0x2660bf(0x1f8)]({'columns':z[a147_0x2660bf(0x1dc)](z[a147_0x2660bf(0x1f8)]({'name':z[a147_0x2660bf(0x1d5)](),'type':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1db)](),'visibility':z[a147_0x2660bf(0x1e1)](['clear',a147_0x2660bf(0x1d1)])[a147_0x2660bf(0x1db)]()}))['optional'](),'behavior_table':z['string']()[a147_0x2660bf(0x1db)](),'join_row':z[a147_0x2660bf(0x1df)]()[a147_0x2660bf(0x1d6)]()['optional'](),'join_strategy':z['enum']([a147_0x2660bf(0x1f5),a147_0x2660bf(0x1e5),a147_0x2660bf(0x1ce),a147_0x2660bf(0x1f3)])['optional'](),'formatting':z[a147_0x2660bf(0x1e1)](['rows','cols'])[a147_0x2660bf(0x1db)](),'order_by':z[a147_0x2660bf(0x1dc)](z[a147_0x2660bf(0x1f8)]({'key':z['string'](),'order':z['enum']([a147_0x2660bf(0x1e0),a147_0x2660bf(0x1ed)])}))[a147_0x2660bf(0x1db)]()});export const ActivationDefSchema=z['object']({'name':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1de)](0x1,a147_0x2660bf(0x1f1)),'description':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1db)](),'connection':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1de)](0x1,a147_0x2660bf(0x1f0)),'all_columns':z[a147_0x2660bf(0x1e7)]()[a147_0x2660bf(0x1db)](),'columns':z[a147_0x2660bf(0x1dc)](ActivationColumnDefSchema)[a147_0x2660bf(0x1db)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a147_0x2660bf(0x1db)](),'connector_config':z[a147_0x2660bf(0x1d8)](z[a147_0x2660bf(0x1d5)](),z[a147_0x2660bf(0x1e4)]())['optional'](),'activation_template_id':z[a147_0x2660bf(0x1d5)]()[a147_0x2660bf(0x1d6)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a147_0x2660bf(0x1d6)]()[a147_0x2660bf(0x1db)](),'run_after_journey_refresh':z[a147_0x2660bf(0x1e7)]()[a147_0x2660bf(0x1db)]()});
1
+ const a147_0x4e7d35=a147_0x34b9;(function(_0x8efa78,_0x2e8418){const _0x2486b7=a147_0x34b9,_0x4fd0ab=_0x8efa78();while(!![]){try{const _0xcb1fa6=-parseInt(_0x2486b7(0x181))/0x1+parseInt(_0x2486b7(0x164))/0x2*(parseInt(_0x2486b7(0x17c))/0x3)+parseInt(_0x2486b7(0x169))/0x4+-parseInt(_0x2486b7(0x162))/0x5+-parseInt(_0x2486b7(0x178))/0x6+-parseInt(_0x2486b7(0x16d))/0x7*(parseInt(_0x2486b7(0x161))/0x8)+-parseInt(_0x2486b7(0x17f))/0x9*(-parseInt(_0x2486b7(0x168))/0xa);if(_0xcb1fa6===_0x2e8418)break;else _0x4fd0ab['push'](_0x4fd0ab['shift']());}catch(_0x2abc25){_0x4fd0ab['push'](_0x4fd0ab['shift']());}}}(a147_0x5650,0x40439));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a147_0x4e7d35(0x179),a147_0x4e7d35(0x171),a147_0x4e7d35(0x17a),'weekly',a147_0x4e7d35(0x15d),a147_0x4e7d35(0x17b),a147_0x4e7d35(0x163)]);export const RepeatUnitSchema=z['enum']([a147_0x4e7d35(0x172),'hour','day',a147_0x4e7d35(0x160),a147_0x4e7d35(0x16b),a147_0x4e7d35(0x15e),a147_0x4e7d35(0x179)]);export const ScheduleDefSchema=z[a147_0x4e7d35(0x16f)]({'type':ScheduleTypeSchema[a147_0x4e7d35(0x17e)](),'repeat_unit':RepeatUnitSchema[a147_0x4e7d35(0x17e)](),'repeat_frequency':z[a147_0x4e7d35(0x173)]()[a147_0x4e7d35(0x17e)](),'repeat_sub_frequency':z[a147_0x4e7d35(0x175)](z['number']())[a147_0x4e7d35(0x17e)](),'start_at':z[a147_0x4e7d35(0x174)]()[a147_0x4e7d35(0x176)]()[a147_0x4e7d35(0x17e)](),'end_on':z[a147_0x4e7d35(0x174)]()['nullable']()['optional'](),'timezone':z[a147_0x4e7d35(0x174)]()['optional']()});function a147_0x34b9(_0x16782f,_0x4ebe16){_0x16782f=_0x16782f-0x15d;const _0x5650ed=a147_0x5650();let _0x34b994=_0x5650ed[_0x16782f];return _0x34b994;}export const NotificationDefSchema=z[a147_0x4e7d35(0x16f)]({'notify_on':z[a147_0x4e7d35(0x175)](z['enum']([a147_0x4e7d35(0x17d),'onFailure']))[a147_0x4e7d35(0x17e)](),'email_recipients':z[a147_0x4e7d35(0x175)](z[a147_0x4e7d35(0x174)]())[a147_0x4e7d35(0x17e)]()});export const ActivationColumnDefSchema=z[a147_0x4e7d35(0x166)]([z[a147_0x4e7d35(0x174)](),z[a147_0x4e7d35(0x16f)]({'name':z[a147_0x4e7d35(0x174)](),'type':z[a147_0x4e7d35(0x174)]()[a147_0x4e7d35(0x17e)](),'visibility':z[a147_0x4e7d35(0x167)]([a147_0x4e7d35(0x185),'masked'])[a147_0x4e7d35(0x17e)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a147_0x4e7d35(0x175)](z[a147_0x4e7d35(0x16f)]({'name':z[a147_0x4e7d35(0x174)](),'type':z[a147_0x4e7d35(0x174)]()[a147_0x4e7d35(0x17e)](),'visibility':z['enum']([a147_0x4e7d35(0x185),a147_0x4e7d35(0x165)])[a147_0x4e7d35(0x17e)]()}))[a147_0x4e7d35(0x17e)](),'behavior_table':z['string']()['optional'](),'join_row':z['number']()[a147_0x4e7d35(0x176)]()[a147_0x4e7d35(0x17e)](),'join_strategy':z[a147_0x4e7d35(0x167)]([a147_0x4e7d35(0x170),a147_0x4e7d35(0x15f),a147_0x4e7d35(0x16c),'Top-N'])[a147_0x4e7d35(0x17e)](),'formatting':z[a147_0x4e7d35(0x167)]([a147_0x4e7d35(0x183),a147_0x4e7d35(0x184)])['optional'](),'order_by':z[a147_0x4e7d35(0x175)](z[a147_0x4e7d35(0x16f)]({'key':z[a147_0x4e7d35(0x174)](),'order':z['enum'](['asc',a147_0x4e7d35(0x16e)])}))['optional']()});function a147_0x5650(){const _0x13a4f1=['869729RIptnA','desc','object','All','hourly','minute','number','string','array','nullable','unknown','715308MkbbeV','none','daily','cron','9VLLdvm','onSuccess','optional','314514PejJdb','min','386969DynAgz','Activation\x20name\x20is\x20required','rows','cols','clear','monthly','once','First','week','32qAuJxz','2330815BOzZbB','minutes_interval','17106QMUjta','masked','union','enum','350vOppnb','1935176KxZILe','Connection\x20name\x20is\x20required','month','Last'];a147_0x5650=function(){return _0x13a4f1;};return a147_0x5650();}export const ActivationDefSchema=z['object']({'name':z[a147_0x4e7d35(0x174)]()['min'](0x1,a147_0x4e7d35(0x182)),'description':z[a147_0x4e7d35(0x174)]()['optional'](),'connection':z[a147_0x4e7d35(0x174)]()[a147_0x4e7d35(0x180)](0x1,a147_0x4e7d35(0x16a)),'all_columns':z['boolean']()[a147_0x4e7d35(0x17e)](),'columns':z['array'](ActivationColumnDefSchema)[a147_0x4e7d35(0x17e)](),'schedule':ScheduleDefSchema[a147_0x4e7d35(0x17e)](),'notification':NotificationDefSchema['optional'](),'connector_config':z['record'](z[a147_0x4e7d35(0x174)](),z[a147_0x4e7d35(0x177)]())[a147_0x4e7d35(0x17e)](),'activation_template_id':z[a147_0x4e7d35(0x174)]()['nullable']()[a147_0x4e7d35(0x17e)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a147_0x4e7d35(0x17e)](),'run_after_journey_refresh':z['boolean']()[a147_0x4e7d35(0x17e)]()});
@@ -1 +1 @@
1
- (function(_0x358468,_0x5d0018){var _0x502ddc=a148_0x3b5b,_0x12a454=_0x358468();while(!![]){try{var _0x18a3a3=parseInt(_0x502ddc(0x134))/0x1*(parseInt(_0x502ddc(0x13d))/0x2)+parseInt(_0x502ddc(0x136))/0x3+-parseInt(_0x502ddc(0x13a))/0x4*(-parseInt(_0x502ddc(0x13c))/0x5)+parseInt(_0x502ddc(0x135))/0x6*(parseInt(_0x502ddc(0x132))/0x7)+parseInt(_0x502ddc(0x137))/0x8+parseInt(_0x502ddc(0x139))/0x9*(-parseInt(_0x502ddc(0x138))/0xa)+-parseInt(_0x502ddc(0x13b))/0xb*(parseInt(_0x502ddc(0x133))/0xc);if(_0x18a3a3===_0x5d0018)break;else _0x12a454['push'](_0x12a454['shift']());}catch(_0x34fef9){_0x12a454['push'](_0x12a454['shift']());}}}(a148_0x3433,0x8a5f3));function a148_0x3b5b(_0x271aa8,_0x24faf0){_0x271aa8=_0x271aa8-0x132;var _0x34334d=a148_0x3433();var _0x3b5b74=_0x34334d[_0x271aa8];return _0x3b5b74;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a148_0x3433(){var _0x587b5e=['856984HUFhYP','1045814qlZcfJ','5BrckHB','2584NKaTCR','2254REZVCf','276HsCMOk','362idngDO','2460xyDQZV','3013272SiXMxE','7545056qMtUGl','80530TtnwWD','9fJhEpT'];a148_0x3433=function(){return _0x587b5e;};return a148_0x3433();}
1
+ function a148_0x39d9(){var _0x5e73da=['63WyRSxp','12207701ICIwVs','21WpJYjE','695882lSpNRR','436bkUuRr','418510pnBeRq','1StNeXy','8285ZwZnus','1285734ANnDMG','2368488AzvcBE','580248VRmWnl'];a148_0x39d9=function(){return _0x5e73da;};return a148_0x39d9();}(function(_0x5952e1,_0x25be13){var _0x2c1ecc=a148_0x3387,_0x1f0c06=_0x5952e1();while(!![]){try{var _0x506bc0=-parseInt(_0x2c1ecc(0x6a))/0x1*(parseInt(_0x2c1ecc(0x67))/0x2)+-parseInt(_0x2c1ecc(0x6e))/0x3+parseInt(_0x2c1ecc(0x68))/0x4*(-parseInt(_0x2c1ecc(0x6b))/0x5)+-parseInt(_0x2c1ecc(0x6c))/0x6*(parseInt(_0x2c1ecc(0x66))/0x7)+parseInt(_0x2c1ecc(0x6d))/0x8+-parseInt(_0x2c1ecc(0x6f))/0x9*(-parseInt(_0x2c1ecc(0x69))/0xa)+parseInt(_0x2c1ecc(0x65))/0xb;if(_0x506bc0===_0x25be13)break;else _0x1f0c06['push'](_0x1f0c06['shift']());}catch(_0x114200){_0x1f0c06['push'](_0x1f0c06['shift']());}}}(a148_0x39d9,0x51894));function a148_0x3387(_0x26d96a,_0x2fce22){_0x26d96a=_0x26d96a-0x65;var _0x39d91b=a148_0x39d9();var _0x3387f2=_0x39d91b[_0x26d96a];return _0x3387f2;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a149_0x3bcc66=a149_0x3260;(function(_0x47d2ff,_0x4ba02e){const _0x1a35f3=a149_0x3260,_0x512a18=_0x47d2ff();while(!![]){try{const _0x3ef4a1=-parseInt(_0x1a35f3(0x1ab))/0x1+-parseInt(_0x1a35f3(0x1a2))/0x2*(-parseInt(_0x1a35f3(0x1af))/0x3)+-parseInt(_0x1a35f3(0x1a3))/0x4*(parseInt(_0x1a35f3(0x19a))/0x5)+parseInt(_0x1a35f3(0x199))/0x6+parseInt(_0x1a35f3(0x193))/0x7+-parseInt(_0x1a35f3(0x19f))/0x8*(parseInt(_0x1a35f3(0x1b1))/0x9)+-parseInt(_0x1a35f3(0x1b8))/0xa*(-parseInt(_0x1a35f3(0x1a0))/0xb);if(_0x3ef4a1===_0x4ba02e)break;else _0x512a18['push'](_0x512a18['shift']());}catch(_0xba99fc){_0x512a18['push'](_0x512a18['shift']());}}}(a149_0x4c7a,0x99f55));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x3bcc66(0x194)]([a149_0x3bcc66(0x19c),a149_0x3bcc66(0x1a6),a149_0x3bcc66(0x198)]);export const ReentryModeTypeSchema=z[a149_0x3bcc66(0x194)]([a149_0x3bcc66(0x1aa),'reentry_unless_goal_achieved',a149_0x3bcc66(0x191)]);export const WaitUnitTypeSchema=z[a149_0x3bcc66(0x194)](['day',a149_0x3bcc66(0x196)]);function a149_0x3260(_0x5a335c,_0x161afa){_0x5a335c=_0x5a335c-0x190;const _0x4c7a9c=a149_0x4c7a();let _0x32601b=_0x4c7a9c[_0x5a335c];return _0x32601b;}export const StepTypeValueSchema=z['enum']([a149_0x3bcc66(0x1ae),a149_0x3bcc66(0x1b2),a149_0x3bcc66(0x1ad),'ab_test',a149_0x3bcc66(0x1a8),a149_0x3bcc66(0x192),a149_0x3bcc66(0x1b7)]);export const EmbeddedSegmentDefSchema=z[a149_0x3bcc66(0x1b0)]({'description':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z['string'](),'stage':z[a149_0x3bcc66(0x1a1)](),'bundle_id':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)]()});export const CriteriaDefSchema=z[a149_0x3bcc66(0x1b0)]({'name':z['string'](),'description':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'segment':z[a149_0x3bcc66(0x1a1)](),'target':JumpTargetDefSchema[a149_0x3bcc66(0x1a5)]()});function a149_0x4c7a(){const _0x5504f7=['literal','end','1321270eKwmJh','versions','reentry_always','jump','5859539OlzpDq','enum','stages','week','array','launched','3374286IVFUbi','6066515huJNWN','boolean','draft','Journey\x20name\x20is\x20required','ab_test','1619152UXniCK','11JmhDgB','string','2kgBNIS','4CgZlZH','lazy','optional','simulation','length','merge','record','no_reentry','46224xQsFma','number','decision_point','wait','3504393LXKcwZ','object','36bOsUpx','activation','isArray','type','discriminatedUnion'];a149_0x4c7a=function(){return _0x5504f7;};return a149_0x4c7a();}const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a149_0x3bcc66(0x1ac)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)]()}),WaitConditionDefSchema=z[a149_0x3bcc66(0x1b0)]({'segment':z[a149_0x3bcc66(0x1a1)](),'next':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'timeout':WaitConditionTimeoutDefSchema[a149_0x3bcc66(0x1a5)]()}),WaitStepParamsDefSchema=z[a149_0x3bcc66(0x1b0)]({'duration':z[a149_0x3bcc66(0x1ac)]()[a149_0x3bcc66(0x1a5)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a149_0x3bcc66(0x197)](z[a149_0x3bcc66(0x1a1)]())[a149_0x3bcc66(0x1a5)]()}),StepBaseFields={'name':z[a149_0x3bcc66(0x1a1)](),'uuid':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'next':z['string']()[a149_0x3bcc66(0x1a5)]()},WaitStepDefSchema=z[a149_0x3bcc66(0x1b0)]({...StepBaseFields,'type':z[a149_0x3bcc66(0x1b6)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x3bcc66(0x1b0)]({'activation':z[a149_0x3bcc66(0x1a1)]()}),ActivationStepDefSchema=z[a149_0x3bcc66(0x1b0)]({...StepBaseFields,'type':z['literal'](a149_0x3bcc66(0x1b2)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a149_0x3bcc66(0x1a1)](),'segment':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'segment_id':z['string']()['optional'](),'excluded':z[a149_0x3bcc66(0x19b)]()[a149_0x3bcc66(0x1a5)](),'next':z[a149_0x3bcc66(0x1a1)]()['optional']()}),DecisionPointStepParamsDefSchema=z[a149_0x3bcc66(0x1b0)]({'branches':z[a149_0x3bcc66(0x197)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x3bcc66(0x1b0)]({...StepBaseFields,'type':z[a149_0x3bcc66(0x1b6)](a149_0x3bcc66(0x1ad)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x3bcc66(0x1b0)]({'id':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'name':z[a149_0x3bcc66(0x1a1)](),'percentage':z[a149_0x3bcc66(0x1ac)](),'next':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a149_0x3bcc66(0x197)](AbTestVariantDefSchema),'unique_id':z['string']()[a149_0x3bcc66(0x1a5)](),'customized_split':z[a149_0x3bcc66(0x19b)]()[a149_0x3bcc66(0x1a5)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x3bcc66(0x1b6)](a149_0x3bcc66(0x19e)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x3bcc66(0x1b6)](a149_0x3bcc66(0x1a8))}),JumpStepParamsDefSchema=z[a149_0x3bcc66(0x1b0)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x3bcc66(0x1b6)](a149_0x3bcc66(0x192)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x3bcc66(0x1b6)](a149_0x3bcc66(0x1b7))})['passthrough']();export const StepDefSchema=z[a149_0x3bcc66(0x1b5)](a149_0x3bcc66(0x1b4),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a149_0x3bcc66(0x1b0)]({'name':z[a149_0x3bcc66(0x1a1)](),'description':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'id':z['string']()[a149_0x3bcc66(0x1a5)](),'entry_criteria':CriteriaDefSchema[a149_0x3bcc66(0x1a5)](),'exit_criteria':z[a149_0x3bcc66(0x197)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a149_0x3bcc66(0x1a5)](),'root_step':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'steps':z[a149_0x3bcc66(0x197)](StepDefSchema)[a149_0x3bcc66(0x1a5)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'version':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'state':JourneyStateTypeSchema[a149_0x3bcc66(0x1a5)](),'latest':z[a149_0x3bcc66(0x19b)]()['optional'](),'stages':z[a149_0x3bcc66(0x197)](StageDefSchema),'id':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'version_number':z[a149_0x3bcc66(0x1ac)]()[a149_0x3bcc66(0x1a5)](),'goal':CriteriaDefSchema[a149_0x3bcc66(0x1a5)](),'reentry':ReentryModeTypeSchema[a149_0x3bcc66(0x1a5)]()});export const JourneyDefSchema=z[a149_0x3bcc66(0x1a4)](()=>z['object']({'type':z['literal']('journey'),'name':z[a149_0x3bcc66(0x1a1)]()['min'](0x1,a149_0x3bcc66(0x19d)),'description':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'bundle_id':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'bundle_name':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'folder_id':z[a149_0x3bcc66(0x1a1)]()[a149_0x3bcc66(0x1a5)](),'reentry':ReentryModeTypeSchema[a149_0x3bcc66(0x1a5)](),'allow_reentry':z[a149_0x3bcc66(0x19b)]()[a149_0x3bcc66(0x1a5)](),'goal':CriteriaDefSchema[a149_0x3bcc66(0x1a5)](),'id':z['string']()[a149_0x3bcc66(0x1a5)](),'version':z['string']()[a149_0x3bcc66(0x1a5)](),'version_number':z[a149_0x3bcc66(0x1ac)]()[a149_0x3bcc66(0x1a5)](),'stages':z['array'](StageDefSchema)[a149_0x3bcc66(0x1a5)](),'versions':z[a149_0x3bcc66(0x197)](JourneyEntryDefSchema)['optional'](),'journeys':z[a149_0x3bcc66(0x197)](JourneyEntryDefSchema)[a149_0x3bcc66(0x1a5)](),'segments':z[a149_0x3bcc66(0x1a9)](z[a149_0x3bcc66(0x1a1)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z['record'](z[a149_0x3bcc66(0x1a1)](),ActivationDefSchema)[a149_0x3bcc66(0x1a5)]()})['refine'](_0x3847fd=>{const _0x2454cc=a149_0x3bcc66,_0x6cae5d=[_0x3847fd['journeys'],_0x3847fd[_0x2454cc(0x195)],_0x3847fd[_0x2454cc(0x190)]]['filter'](_0x5ebb6d=>Array[_0x2454cc(0x1b3)](_0x5ebb6d)&&_0x5ebb6d[_0x2454cc(0x1a7)]>0x0)['length'];return _0x6cae5d===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a149_0x2e5d82=a149_0x1419;(function(_0x59a67c,_0x512d82){const _0x48b85b=a149_0x1419,_0x106b0a=_0x59a67c();while(!![]){try{const _0x558b81=-parseInt(_0x48b85b(0xf6))/0x1+-parseInt(_0x48b85b(0xd5))/0x2+parseInt(_0x48b85b(0xfb))/0x3*(-parseInt(_0x48b85b(0xd7))/0x4)+-parseInt(_0x48b85b(0xd8))/0x5+parseInt(_0x48b85b(0xfa))/0x6*(-parseInt(_0x48b85b(0xee))/0x7)+parseInt(_0x48b85b(0xe8))/0x8+-parseInt(_0x48b85b(0xe7))/0x9*(-parseInt(_0x48b85b(0xd3))/0xa);if(_0x558b81===_0x512d82)break;else _0x106b0a['push'](_0x106b0a['shift']());}catch(_0x22e99d){_0x106b0a['push'](_0x106b0a['shift']());}}}(a149_0x36af,0x59fce));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x2e5d82(0xf7)]([a149_0x2e5d82(0xda),a149_0x2e5d82(0xeb),a149_0x2e5d82(0xe5)]);export const ReentryModeTypeSchema=z[a149_0x2e5d82(0xf7)](['no_reentry',a149_0x2e5d82(0xf8),a149_0x2e5d82(0xdf)]);export const WaitUnitTypeSchema=z[a149_0x2e5d82(0xf7)]([a149_0x2e5d82(0xf0),a149_0x2e5d82(0xe4)]);export const StepTypeValueSchema=z[a149_0x2e5d82(0xf7)]([a149_0x2e5d82(0xd4),a149_0x2e5d82(0xf2),'decision_point',a149_0x2e5d82(0xdc),a149_0x2e5d82(0xd9),a149_0x2e5d82(0xf9),a149_0x2e5d82(0xe1)]);function a149_0x1419(_0x24ade4,_0x5815ad){_0x24ade4=_0x24ade4-0xcf;const _0x36af03=a149_0x36af();let _0x1419f3=_0x36af03[_0x24ade4];return _0x1419f3;}export const EmbeddedSegmentDefSchema=z[a149_0x2e5d82(0xe3)]({'description':z[a149_0x2e5d82(0xe2)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0x2e5d82(0xe3)]({'journey':z[a149_0x2e5d82(0xe2)](),'stage':z[a149_0x2e5d82(0xe2)](),'bundle_id':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)]()});export const CriteriaDefSchema=z[a149_0x2e5d82(0xe3)]({'name':z[a149_0x2e5d82(0xe2)](),'description':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'segment':z[a149_0x2e5d82(0xe2)](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z[a149_0x2e5d82(0xe3)]({'duration':z[a149_0x2e5d82(0xdb)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)]()}),WaitConditionDefSchema=z[a149_0x2e5d82(0xe3)]({'segment':z[a149_0x2e5d82(0xe2)](),'next':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'timeout':WaitConditionTimeoutDefSchema[a149_0x2e5d82(0xf3)]()}),WaitStepParamsDefSchema=z['object']({'duration':z[a149_0x2e5d82(0xdb)]()[a149_0x2e5d82(0xf3)](),'unit':WaitUnitTypeSchema[a149_0x2e5d82(0xf3)](),'wait_until':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z['array'](z[a149_0x2e5d82(0xe2)]())['optional']()}),StepBaseFields={'name':z[a149_0x2e5d82(0xe2)](),'uuid':z['string']()[a149_0x2e5d82(0xf3)](),'next':z[a149_0x2e5d82(0xe2)]()['optional']()},WaitStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z[a149_0x2e5d82(0xe9)](a149_0x2e5d82(0xd4)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z['string']()}),ActivationStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z[a149_0x2e5d82(0xe9)](a149_0x2e5d82(0xf2)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a149_0x2e5d82(0xe3)]({'name':z['string'](),'segment':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'segment_id':z['string']()[a149_0x2e5d82(0xf3)](),'excluded':z[a149_0x2e5d82(0xde)]()[a149_0x2e5d82(0xf3)](),'next':z[a149_0x2e5d82(0xe2)]()['optional']()}),DecisionPointStepParamsDefSchema=z[a149_0x2e5d82(0xe3)]({'branches':z[a149_0x2e5d82(0xef)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z['literal'](a149_0x2e5d82(0xed)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x2e5d82(0xe3)]({'id':z['string']()[a149_0x2e5d82(0xf3)](),'name':z[a149_0x2e5d82(0xe2)](),'percentage':z[a149_0x2e5d82(0xdb)](),'next':z['string']()[a149_0x2e5d82(0xf3)]()}),AbTestStepParamsDefSchema=z[a149_0x2e5d82(0xe3)]({'variants':z[a149_0x2e5d82(0xef)](AbTestVariantDefSchema),'unique_id':z['string']()[a149_0x2e5d82(0xf3)](),'customized_split':z['boolean']()[a149_0x2e5d82(0xf3)]()}),AbTestStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z[a149_0x2e5d82(0xe9)](a149_0x2e5d82(0xdc)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z[a149_0x2e5d82(0xe9)](a149_0x2e5d82(0xd9))}),JumpStepParamsDefSchema=z[a149_0x2e5d82(0xe3)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z['literal'](a149_0x2e5d82(0xf9)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a149_0x2e5d82(0xe3)]({...StepBaseFields,'type':z[a149_0x2e5d82(0xe9)](a149_0x2e5d82(0xe1))})[a149_0x2e5d82(0xec)]();export const StepDefSchema=z[a149_0x2e5d82(0xdd)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a149_0x36af(){const _0x302be3=['jump','31218Strvck','507tonJaD','min','journey','lazy','length','70sNrTaO','wait','1365018fYSSex','Journey\x20name\x20is\x20required','9568cKLleD','2942640SejUuA','merge','draft','number','ab_test','discriminatedUnion','boolean','reentry_always','versions','end','string','object','week','launched','stages','2530152yKJEVd','3263856vfDuky','literal','isArray','simulation','passthrough','decision_point','182jyICvF','array','day','filter','activation','optional','record','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','196725vWIqBf','enum','reentry_unless_goal_achieved'];a149_0x36af=function(){return _0x302be3;};return a149_0x36af();}export const StageDefSchema=z[a149_0x2e5d82(0xe3)]({'name':z[a149_0x2e5d82(0xe2)](),'description':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'id':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a149_0x2e5d82(0xef)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a149_0x2e5d82(0xf3)](),'root_step':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'steps':z['array'](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a149_0x2e5d82(0xe3)]({'name':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'version':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'state':JourneyStateTypeSchema[a149_0x2e5d82(0xf3)](),'latest':z[a149_0x2e5d82(0xde)]()['optional'](),'stages':z[a149_0x2e5d82(0xef)](StageDefSchema),'id':z[a149_0x2e5d82(0xe2)]()['optional'](),'version_number':z[a149_0x2e5d82(0xdb)]()[a149_0x2e5d82(0xf3)](),'goal':CriteriaDefSchema[a149_0x2e5d82(0xf3)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a149_0x2e5d82(0xd1)](()=>z[a149_0x2e5d82(0xe3)]({'type':z[a149_0x2e5d82(0xe9)](a149_0x2e5d82(0xd0)),'name':z['string']()[a149_0x2e5d82(0xcf)](0x1,a149_0x2e5d82(0xd6)),'description':z[a149_0x2e5d82(0xe2)]()['optional'](),'bundle_id':z[a149_0x2e5d82(0xe2)]()['optional'](),'bundle_name':z['string']()['optional'](),'folder_id':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'reentry':ReentryModeTypeSchema[a149_0x2e5d82(0xf3)](),'allow_reentry':z['boolean']()[a149_0x2e5d82(0xf3)](),'goal':CriteriaDefSchema[a149_0x2e5d82(0xf3)](),'id':z[a149_0x2e5d82(0xe2)]()[a149_0x2e5d82(0xf3)](),'version':z['string']()['optional'](),'version_number':z['number']()['optional'](),'stages':z[a149_0x2e5d82(0xef)](StageDefSchema)[a149_0x2e5d82(0xf3)](),'versions':z[a149_0x2e5d82(0xef)](JourneyEntryDefSchema)[a149_0x2e5d82(0xf3)](),'journeys':z[a149_0x2e5d82(0xef)](JourneyEntryDefSchema)['optional'](),'segments':z[a149_0x2e5d82(0xf4)](z['string'](),EmbeddedSegmentDefSchema)[a149_0x2e5d82(0xf3)](),'activations':z[a149_0x2e5d82(0xf4)](z['string'](),ActivationDefSchema)[a149_0x2e5d82(0xf3)]()})['refine'](_0x5e855d=>{const _0x28adb7=a149_0x2e5d82,_0x2c1198=[_0x5e855d['journeys'],_0x5e855d[_0x28adb7(0xe6)],_0x5e855d[_0x28adb7(0xe0)]][_0x28adb7(0xf1)](_0x3fc897=>Array[_0x28adb7(0xea)](_0x3fc897)&&_0x3fc897[_0x28adb7(0xd2)]>0x0)['length'];return _0x2c1198===0x1;},{'message':a149_0x2e5d82(0xf5)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a151_0x3ba2(){var _0x3b0d48=['906636DCXuAg','13809080cnKYZT','431613EzvTdR','1130188kqVWjL','30ynfRND','3975965cKZCCa','423901jtDUvR','2223052ynJVWG'];a151_0x3ba2=function(){return _0x3b0d48;};return a151_0x3ba2();}function a151_0x4076(_0x5c431d,_0x7603cb){_0x5c431d=_0x5c431d-0xa2;var _0x3ba2d1=a151_0x3ba2();var _0x40760f=_0x3ba2d1[_0x5c431d];return _0x40760f;}(function(_0x40df70,_0x58f436){var _0x330f37=a151_0x4076,_0x3576dc=_0x40df70();while(!![]){try{var _0x4e324d=-parseInt(_0x330f37(0xa4))/0x1+-parseInt(_0x330f37(0xa9))/0x2+parseInt(_0x330f37(0xa6))/0x3+parseInt(_0x330f37(0xa5))/0x4+-parseInt(_0x330f37(0xa3))/0x5+-parseInt(_0x330f37(0xa2))/0x6*(parseInt(_0x330f37(0xa8))/0x7)+parseInt(_0x330f37(0xa7))/0x8;if(_0x4e324d===_0x58f436)break;else _0x3576dc['push'](_0x3576dc['shift']());}catch(_0x42fe94){_0x3576dc['push'](_0x3576dc['shift']());}}}(a151_0x3ba2,0x7806b));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(_0x3f7db6,_0xdee9b8){var _0x456e6e=a151_0x414d,_0x13ba65=_0x3f7db6();while(!![]){try{var _0x9aefdc=-parseInt(_0x456e6e(0x198))/0x1+-parseInt(_0x456e6e(0x192))/0x2+parseInt(_0x456e6e(0x197))/0x3*(parseInt(_0x456e6e(0x191))/0x4)+-parseInt(_0x456e6e(0x195))/0x5*(parseInt(_0x456e6e(0x199))/0x6)+parseInt(_0x456e6e(0x19b))/0x7*(-parseInt(_0x456e6e(0x194))/0x8)+parseInt(_0x456e6e(0x19a))/0x9*(-parseInt(_0x456e6e(0x196))/0xa)+parseInt(_0x456e6e(0x193))/0xb;if(_0x9aefdc===_0xdee9b8)break;else _0x13ba65['push'](_0x13ba65['shift']());}catch(_0x44d862){_0x13ba65['push'](_0x13ba65['shift']());}}}(a151_0xa81c,0xb7043));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a151_0x414d(_0x1378c5,_0x45997f){_0x1378c5=_0x1378c5-0x191;var _0xa81c0c=a151_0xa81c();var _0x414d35=_0xa81c0c[_0x1378c5];return _0x414d35;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a151_0xa81c(){var _0x213ca9=['1300795SdeTJN','7320YxDtWj','141xQZuFj','776661SUIYJi','24dJfaCX','7677ETzjbF','98EmlifA','75584FiPzxD','1718778cegMQY','50069613sETQTn','793816XvRkGt'];a151_0xa81c=function(){return _0x213ca9;};return a151_0xa81c();}
@@ -1 +1 @@
1
- const a152_0x4fc103=a152_0x46fd;(function(_0x411e31,_0x43d6fc){const _0x2e5346=a152_0x46fd,_0x142159=_0x411e31();while(!![]){try{const _0x5c6077=-parseInt(_0x2e5346(0x231))/0x1+-parseInt(_0x2e5346(0x214))/0x2*(-parseInt(_0x2e5346(0x20a))/0x3)+parseInt(_0x2e5346(0x212))/0x4+parseInt(_0x2e5346(0x213))/0x5*(-parseInt(_0x2e5346(0x239))/0x6)+parseInt(_0x2e5346(0x1f1))/0x7+parseInt(_0x2e5346(0x22c))/0x8*(-parseInt(_0x2e5346(0x1fc))/0x9)+parseInt(_0x2e5346(0x1f0))/0xa*(parseInt(_0x2e5346(0x222))/0xb);if(_0x5c6077===_0x43d6fc)break;else _0x142159['push'](_0x142159['shift']());}catch(_0x3935f2){_0x142159['push'](_0x142159['shift']());}}}(a152_0x21fe,0xc2a08));function a152_0x21fe(){const _0x50a1ec=['month','second','number','Behavior','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','min','90110dpVPFD','209685mnLZEW','timestamp','IsNull','EndWith','TimeWithinPast','LessEqual','column','any','GreaterEqual','Operator\x20\x27','Greater','6110649FGnfQW','operator','Sum','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','union','type','Segment\x20reference\x20must\x20not\x20be\x20empty','funnel_stage','custom','boolean','object','has','Contain','3169626xQBjzt','exclude','MISSING_TIME_UNIT','And','day','Column','CountDistinct','max','1400888AKTlaw','5995rEbKWV','2efvNSQ','lazy','Between','superRefine','optional','Min','Equal','Segment\x20name\x20is\x20required','year','TimeRange\x20operator\x20requires\x20\x27from\x27','unit','value','from','Value','1749wWNlPP','duration','array','TimeWithinNext','Less','hour','addIssue','MISSING_BETWEEN_BOUNDS','\x27\x20requires\x20a\x20time\x20unit','Average','8IuDbVz','enum','TimeRange','segment','Regexp','13266eCFtkV','string','StartWith','all','Count','week','First','batch','6906neJEbd','Last','literal'];a152_0x21fe=function(){return _0x50a1ec;};return a152_0x21fe();}import{z}from'zod';export const OperatorTypeSchema=z[a152_0x4fc103(0x22d)]([a152_0x4fc103(0x21a),a152_0x4fc103(0x1fb),a152_0x4fc103(0x226),a152_0x4fc103(0x1f9),'LessEqual','In','Between',a152_0x4fc103(0x230),a152_0x4fc103(0x1f3),a152_0x4fc103(0x1f5),a152_0x4fc103(0x225),'Contain',a152_0x4fc103(0x233),'EndWith','TimeRange']);export const TimeUnitSchema=z['enum']([a152_0x4fc103(0x1eb),'minute',a152_0x4fc103(0x227),a152_0x4fc103(0x20e),a152_0x4fc103(0x236),a152_0x4fc103(0x1ea),a152_0x4fc103(0x21c)]);export const AggregationTypeSchema=z[a152_0x4fc103(0x22d)]([a152_0x4fc103(0x235),'Sum',a152_0x4fc103(0x22b),a152_0x4fc103(0x219),'Max','CountDistinct',a152_0x4fc103(0x237),a152_0x4fc103(0x23a)]);const TemporalValueSchema=z['union']([z['object']({'timestamp':z[a152_0x4fc103(0x232)]()}),z[a152_0x4fc103(0x207)]({'last':z[a152_0x4fc103(0x201)]([z[a152_0x4fc103(0x1ec)](),z['record'](z[a152_0x4fc103(0x232)](),z['number']())]),'unit':z[a152_0x4fc103(0x232)]()})]),OperatorValueSchema=z[a152_0x4fc103(0x201)]([z[a152_0x4fc103(0x232)](),z[a152_0x4fc103(0x1ec)](),z['boolean'](),TemporalValueSchema,z[a152_0x4fc103(0x224)](z[a152_0x4fc103(0x201)]([z[a152_0x4fc103(0x232)](),z[a152_0x4fc103(0x1ec)](),z[a152_0x4fc103(0x206)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x4fc103(0x21a),a152_0x4fc103(0x1fb),a152_0x4fc103(0x1f9),a152_0x4fc103(0x226),a152_0x4fc103(0x1f6),'In',a152_0x4fc103(0x209),'StartWith',a152_0x4fc103(0x1f4),'Regexp',a152_0x4fc103(0x1f5),a152_0x4fc103(0x225)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0x4fc103(0x225)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z['boolean']()[a152_0x4fc103(0x218)](),'value':OperatorValueSchema[a152_0x4fc103(0x218)](),'min':z['union']([z[a152_0x4fc103(0x1ec)](),z[a152_0x4fc103(0x232)](),TemporalValueSchema])[a152_0x4fc103(0x218)](),'max':z[a152_0x4fc103(0x201)]([z[a152_0x4fc103(0x1ec)](),z[a152_0x4fc103(0x232)](),TemporalValueSchema])[a152_0x4fc103(0x218)](),'unit':TimeUnitSchema[a152_0x4fc103(0x218)](),'duration':z[a152_0x4fc103(0x207)]({'day':z['number']()['optional'](),'week':z[a152_0x4fc103(0x1ec)]()[a152_0x4fc103(0x218)](),'month':z['number']()[a152_0x4fc103(0x218)](),'year':z['number']()['optional'](),'hour':z[a152_0x4fc103(0x1ec)]()[a152_0x4fc103(0x218)](),'minute':z[a152_0x4fc103(0x1ec)]()[a152_0x4fc103(0x218)](),'second':z[a152_0x4fc103(0x1ec)]()['optional']()})['optional'](),'from':z[a152_0x4fc103(0x207)]({'last':z[a152_0x4fc103(0x201)]([z[a152_0x4fc103(0x1ec)](),z[a152_0x4fc103(0x232)]()]),'unit':TimeUnitSchema})[a152_0x4fc103(0x218)](),'reverse':z[a152_0x4fc103(0x206)]()['optional']()})['superRefine']((_0x3bc964,_0x582a39)=>{const _0x5ee5c8=a152_0x4fc103;OPERATORS_REQUIRING_VALUE[_0x5ee5c8(0x208)](_0x3bc964[_0x5ee5c8(0x202)])&&(_0x3bc964['value']===undefined||_0x3bc964[_0x5ee5c8(0x21f)]===null)&&_0x582a39['addIssue']({'code':_0x5ee5c8(0x205),'message':_0x5ee5c8(0x1fa)+_0x3bc964[_0x5ee5c8(0x202)]+'\x27\x20requires\x20a\x20value','path':[_0x5ee5c8(0x21f)]}),_0x3bc964[_0x5ee5c8(0x202)]===_0x5ee5c8(0x216)&&_0x3bc964[_0x5ee5c8(0x1ef)]===undefined&&_0x3bc964[_0x5ee5c8(0x211)]===undefined&&_0x582a39[_0x5ee5c8(0x228)]({'code':_0x5ee5c8(0x205),'message':_0x5ee5c8(0x200),'params':{'validationCode':_0x5ee5c8(0x229)}}),OPERATORS_REQUIRING_UNIT[_0x5ee5c8(0x208)](_0x3bc964[_0x5ee5c8(0x202)])&&_0x3bc964[_0x5ee5c8(0x21f)]!==undefined&&!_0x3bc964[_0x5ee5c8(0x21e)]&&_0x582a39[_0x5ee5c8(0x228)]({'code':_0x5ee5c8(0x205),'message':_0x5ee5c8(0x1fa)+_0x3bc964[_0x5ee5c8(0x202)]+_0x5ee5c8(0x22a),'path':['unit'],'params':{'validationCode':_0x5ee5c8(0x20c)}}),_0x3bc964[_0x5ee5c8(0x202)]===_0x5ee5c8(0x22e)&&(!_0x3bc964[_0x5ee5c8(0x223)]&&_0x582a39[_0x5ee5c8(0x228)]({'code':_0x5ee5c8(0x205),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x3bc964['from']&&_0x582a39[_0x5ee5c8(0x228)]({'code':_0x5ee5c8(0x205),'message':_0x5ee5c8(0x21d),'path':[_0x5ee5c8(0x220)]}));});export const ArrayMatchingSchema=z['union']([z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x1f8)),z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x234)),z[a152_0x4fc103(0x207)]({'atLeast':z[a152_0x4fc103(0x1ec)]()}),z[a152_0x4fc103(0x207)]({'atMost':z[a152_0x4fc103(0x1ec)]()}),z[a152_0x4fc103(0x207)]({'exactly':z[a152_0x4fc103(0x1ec)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a152_0x4fc103(0x202),[z['object']({'type':z[a152_0x4fc103(0x22d)]([a152_0x4fc103(0x1fe),a152_0x4fc103(0x219),'Max','Average']),'column':z[a152_0x4fc103(0x232)](),'groupingColumns':z[a152_0x4fc103(0x224)](z[a152_0x4fc103(0x232)]())['optional']()}),z[a152_0x4fc103(0x207)]({'type':z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x235)),'groupingColumns':z[a152_0x4fc103(0x224)](z[a152_0x4fc103(0x232)]())['optional']()}),z['object']({'type':z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x210)),'columns':z[a152_0x4fc103(0x224)](z[a152_0x4fc103(0x232)]())}),z[a152_0x4fc103(0x207)]({'type':z['enum'](['First',a152_0x4fc103(0x23a)]),'column':z[a152_0x4fc103(0x232)](),'orderColumn':z[a152_0x4fc103(0x232)](),'groupingColumns':z[a152_0x4fc103(0x224)](z[a152_0x4fc103(0x232)]())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a152_0x4fc103(0x1ec)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x4fc103(0x1f5),a152_0x4fc103(0x225),'TimeRange']);export const FilterColumnConditionDefSchema=z[a152_0x4fc103(0x207)]({'type':z['literal'](a152_0x4fc103(0x20f)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x4fc103(0x218)]()})[a152_0x4fc103(0x217)]((_0x2fc9be,_0x4b17ab)=>{const _0x28ee7d=a152_0x4fc103,_0x325bf5=_0x2fc9be[_0x28ee7d(0x1fd)][_0x28ee7d(0x202)];_0x2fc9be[_0x28ee7d(0x1f7)]===_0x28ee7d(0x1f2)?!TIMESTAMP_OPERATORS[_0x28ee7d(0x208)](_0x325bf5)&&_0x4b17ab[_0x28ee7d(0x228)]({'code':_0x28ee7d(0x205),'message':_0x28ee7d(0x1ee)+_0x325bf5+'\x27)','path':['operator','type']}):TIMESTAMP_OPERATORS[_0x28ee7d(0x208)](_0x325bf5)&&_0x4b17ab[_0x28ee7d(0x228)]({'code':_0x28ee7d(0x205),'message':_0x28ee7d(0x1fa)+_0x325bf5+_0x28ee7d(0x1ff),'path':[_0x28ee7d(0x1fd),'type']});});export const FilterRuleDefSchema=z[a152_0x4fc103(0x207)]({'type':z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x20d)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x4fc103(0x215)](()=>z[a152_0x4fc103(0x207)]({'type':z['literal'](a152_0x4fc103(0x221)),'attribute':z[a152_0x4fc103(0x232)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x4fc103(0x218)](),'exclude':z[a152_0x4fc103(0x206)]()[a152_0x4fc103(0x218)](),'aggregation':AggregationDefSchema[a152_0x4fc103(0x218)](),'source':z[a152_0x4fc103(0x232)]()['optional'](),'filter':FilterRuleDefSchema[a152_0x4fc103(0x218)](),'limit':z['number']()[a152_0x4fc103(0x218)]()}));export const BehaviorConditionDefSchema=z[a152_0x4fc103(0x215)](()=>z[a152_0x4fc103(0x207)]({'type':z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x1ed)),'attribute':z[a152_0x4fc103(0x232)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a152_0x4fc103(0x218)](),'aggregation':AggregationDefSchema[a152_0x4fc103(0x218)](),'source':z[a152_0x4fc103(0x232)]()[a152_0x4fc103(0x218)](),'filter':FilterRuleDefSchema[a152_0x4fc103(0x218)](),'timeWindow':TimeWindowDefSchema[a152_0x4fc103(0x218)](),'limit':z[a152_0x4fc103(0x1ec)]()['optional']()}));function a152_0x46fd(_0x2d12d4,_0x4b3aa0){_0x2d12d4=_0x2d12d4-0x1e9;const _0x21fe16=a152_0x21fe();let _0x46fdef=_0x21fe16[_0x2d12d4];return _0x46fdef;}export const ColumnConditionDefSchema=z[a152_0x4fc103(0x207)]({'type':z[a152_0x4fc103(0x1e9)](a152_0x4fc103(0x20f)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a152_0x4fc103(0x22d)](['And','Or']),'conditions':z[a152_0x4fc103(0x224)](ConditionDefSchema),'description':z[a152_0x4fc103(0x232)]()[a152_0x4fc103(0x218)]()}));export const SegmentRefConditionDefSchema=z[a152_0x4fc103(0x207)]({'type':z['enum'](['include',a152_0x4fc103(0x20b)]),'segment':z[a152_0x4fc103(0x232)]()[a152_0x4fc103(0x1ef)](0x1,a152_0x4fc103(0x203))});export const ConditionDefSchema=z[a152_0x4fc103(0x215)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x4fc103(0x215)](()=>z[a152_0x4fc103(0x207)]({'type':z[a152_0x4fc103(0x22d)](['And','Or']),'conditions':z[a152_0x4fc103(0x224)](ConditionDefSchema),'description':z[a152_0x4fc103(0x232)]()[a152_0x4fc103(0x218)]()}));export const SegmentDefSchema=z[a152_0x4fc103(0x207)]({'type':z['literal'](a152_0x4fc103(0x22f))['optional'](),'name':z[a152_0x4fc103(0x232)]()[a152_0x4fc103(0x1ef)](0x1,a152_0x4fc103(0x21b)),'description':z[a152_0x4fc103(0x232)]()['optional'](),'folder':z[a152_0x4fc103(0x232)]()[a152_0x4fc103(0x218)](),'rule':RuleDefSchema[a152_0x4fc103(0x218)](),'kind':z[a152_0x4fc103(0x22d)]([a152_0x4fc103(0x238),'realtime',a152_0x4fc103(0x204)])[a152_0x4fc103(0x218)](),'visible':z[a152_0x4fc103(0x206)]()[a152_0x4fc103(0x218)](),'activations':z[a152_0x4fc103(0x224)](z[a152_0x4fc103(0x1f8)]())[a152_0x4fc103(0x218)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a152_0x3280dc=a152_0x3b40;(function(_0x22a32a,_0x4b8b89){const _0x2a3f9b=a152_0x3b40,_0x39ad29=_0x22a32a();while(!![]){try{const _0x424e46=-parseInt(_0x2a3f9b(0x1c9))/0x1*(parseInt(_0x2a3f9b(0x1d5))/0x2)+-parseInt(_0x2a3f9b(0x1c7))/0x3+-parseInt(_0x2a3f9b(0x1f6))/0x4+-parseInt(_0x2a3f9b(0x1ef))/0x5*(-parseInt(_0x2a3f9b(0x1d1))/0x6)+-parseInt(_0x2a3f9b(0x1db))/0x7*(-parseInt(_0x2a3f9b(0x1c2))/0x8)+parseInt(_0x2a3f9b(0x207))/0x9+-parseInt(_0x2a3f9b(0x202))/0xa;if(_0x424e46===_0x4b8b89)break;else _0x39ad29['push'](_0x39ad29['shift']());}catch(_0x587096){_0x39ad29['push'](_0x39ad29['shift']());}}}(a152_0x588e,0xa7cf3));import{z}from'zod';export const OperatorTypeSchema=z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1e0),a152_0x3280dc(0x1b8),a152_0x3280dc(0x1c6),a152_0x3280dc(0x1b9),a152_0x3280dc(0x1e1),'In',a152_0x3280dc(0x200),a152_0x3280dc(0x1fb),'IsNull',a152_0x3280dc(0x1cd),a152_0x3280dc(0x1be),a152_0x3280dc(0x1de),a152_0x3280dc(0x1fc),a152_0x3280dc(0x203),a152_0x3280dc(0x1cb)]);export const TimeUnitSchema=z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1fa),a152_0x3280dc(0x1e5),a152_0x3280dc(0x1e9),'day','week',a152_0x3280dc(0x1ff),'year']);export const AggregationTypeSchema=z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1bb),a152_0x3280dc(0x1d9),a152_0x3280dc(0x201),a152_0x3280dc(0x1ba),a152_0x3280dc(0x1f2),a152_0x3280dc(0x1fd),'First','Last']);const TemporalValueSchema=z[a152_0x3280dc(0x1da)]([z[a152_0x3280dc(0x1f9)]({'timestamp':z[a152_0x3280dc(0x1ec)]()}),z['object']({'last':z[a152_0x3280dc(0x1da)]([z[a152_0x3280dc(0x1f7)](),z[a152_0x3280dc(0x1c4)](z[a152_0x3280dc(0x1ec)](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z[a152_0x3280dc(0x1da)]([z[a152_0x3280dc(0x1ec)](),z['number'](),z[a152_0x3280dc(0x1bf)](),TemporalValueSchema,z['array'](z[a152_0x3280dc(0x1da)]([z[a152_0x3280dc(0x1ec)](),z[a152_0x3280dc(0x1f7)](),z[a152_0x3280dc(0x1bf)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x3280dc(0x1e0),a152_0x3280dc(0x1b8),a152_0x3280dc(0x1b9),a152_0x3280dc(0x1c6),a152_0x3280dc(0x1e1),'In',a152_0x3280dc(0x1de),a152_0x3280dc(0x1fc),a152_0x3280dc(0x203),a152_0x3280dc(0x1fb),a152_0x3280dc(0x1cd),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a152_0x3280dc(0x1cd),a152_0x3280dc(0x1be)]);function a152_0x588e(){const _0x8f0d98=['Last','2HaTQwu','include','has','superRefine','Sum','union','1981sBZmOk','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Column','Contain','TimeRange\x20operator\x20requires\x20\x27from\x27','Equal','LessEqual','Behavior','all','value','minute','min','\x27\x20requires\x20a\x20value','column','hour','MISSING_BETWEEN_BOUNDS','TimeRange\x20operator\x20requires\x20\x27duration\x27','string','operator','from','65dsANJi','duration','lazy','Max','First','array','max','3642528sFXKSd','number','funnel_stage','object','second','Regexp','StartWith','CountDistinct','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','month','Between','Average','5273800mrmRgq','EndWith','\x27\x20requires\x20a\x20time\x20unit','optional','Operator\x20\x27','4136760xUGSac','Greater','GreaterEqual','Min','Count','Segment\x20name\x20is\x20required','type','TimeWithinNext','boolean','literal','custom','37216bPTvaR','any','record','MISSING_TIME_UNIT','Less','1268361ORODkq','realtime','537812GQhzdX','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','TimeRange','addIssue','TimeWithinPast','enum','batch','timestamp','604524wKIOos','And','exclude'];a152_0x588e=function(){return _0x8f0d98;};return a152_0x588e();}function a152_0x3b40(_0x1d43db,_0x1b4317){_0x1d43db=_0x1d43db-0x1b8;const _0x588ee1=a152_0x588e();let _0x3b404b=_0x588ee1[_0x1d43db];return _0x3b404b;}export const OperatorDefSchema=z[a152_0x3280dc(0x1f9)]({'type':OperatorTypeSchema,'not':z['boolean']()[a152_0x3280dc(0x205)](),'value':OperatorValueSchema['optional'](),'min':z['union']([z['number'](),z[a152_0x3280dc(0x1ec)](),TemporalValueSchema])[a152_0x3280dc(0x205)](),'max':z[a152_0x3280dc(0x1da)]([z['number'](),z[a152_0x3280dc(0x1ec)](),TemporalValueSchema])[a152_0x3280dc(0x205)](),'unit':TimeUnitSchema[a152_0x3280dc(0x205)](),'duration':z[a152_0x3280dc(0x1f9)]({'day':z[a152_0x3280dc(0x1f7)]()[a152_0x3280dc(0x205)](),'week':z[a152_0x3280dc(0x1f7)]()[a152_0x3280dc(0x205)](),'month':z[a152_0x3280dc(0x1f7)]()['optional'](),'year':z[a152_0x3280dc(0x1f7)]()[a152_0x3280dc(0x205)](),'hour':z[a152_0x3280dc(0x1f7)]()[a152_0x3280dc(0x205)](),'minute':z['number']()[a152_0x3280dc(0x205)](),'second':z[a152_0x3280dc(0x1f7)]()[a152_0x3280dc(0x205)]()})['optional'](),'from':z['object']({'last':z[a152_0x3280dc(0x1da)]([z[a152_0x3280dc(0x1f7)](),z[a152_0x3280dc(0x1ec)]()]),'unit':TimeUnitSchema})[a152_0x3280dc(0x205)](),'reverse':z[a152_0x3280dc(0x1bf)]()[a152_0x3280dc(0x205)]()})[a152_0x3280dc(0x1d8)]((_0x44ff04,_0x1f6f32)=>{const _0x1a9d31=a152_0x3280dc;OPERATORS_REQUIRING_VALUE['has'](_0x44ff04[_0x1a9d31(0x1bd)])&&(_0x44ff04[_0x1a9d31(0x1e4)]===undefined||_0x44ff04[_0x1a9d31(0x1e4)]===null)&&_0x1f6f32[_0x1a9d31(0x1cc)]({'code':_0x1a9d31(0x1c1),'message':_0x1a9d31(0x206)+_0x44ff04[_0x1a9d31(0x1bd)]+_0x1a9d31(0x1e7),'path':[_0x1a9d31(0x1e4)]}),_0x44ff04[_0x1a9d31(0x1bd)]==='Between'&&_0x44ff04[_0x1a9d31(0x1e6)]===undefined&&_0x44ff04[_0x1a9d31(0x1f5)]===undefined&&_0x1f6f32[_0x1a9d31(0x1cc)]({'code':_0x1a9d31(0x1c1),'message':_0x1a9d31(0x1fe),'params':{'validationCode':_0x1a9d31(0x1ea)}}),OPERATORS_REQUIRING_UNIT[_0x1a9d31(0x1d7)](_0x44ff04[_0x1a9d31(0x1bd)])&&_0x44ff04[_0x1a9d31(0x1e4)]!==undefined&&!_0x44ff04['unit']&&_0x1f6f32[_0x1a9d31(0x1cc)]({'code':'custom','message':_0x1a9d31(0x206)+_0x44ff04[_0x1a9d31(0x1bd)]+_0x1a9d31(0x204),'path':['unit'],'params':{'validationCode':_0x1a9d31(0x1c5)}}),_0x44ff04[_0x1a9d31(0x1bd)]==='TimeRange'&&(!_0x44ff04[_0x1a9d31(0x1f0)]&&_0x1f6f32[_0x1a9d31(0x1cc)]({'code':_0x1a9d31(0x1c1),'message':_0x1a9d31(0x1eb),'path':[_0x1a9d31(0x1f0)]}),!_0x44ff04['from']&&_0x1f6f32[_0x1a9d31(0x1cc)]({'code':_0x1a9d31(0x1c1),'message':_0x1a9d31(0x1df),'path':[_0x1a9d31(0x1ee)]}));});export const ArrayMatchingSchema=z[a152_0x3280dc(0x1da)]([z[a152_0x3280dc(0x1c0)]('any'),z[a152_0x3280dc(0x1c0)](a152_0x3280dc(0x1e3)),z[a152_0x3280dc(0x1f9)]({'atLeast':z[a152_0x3280dc(0x1f7)]()}),z[a152_0x3280dc(0x1f9)]({'atMost':z[a152_0x3280dc(0x1f7)]()}),z[a152_0x3280dc(0x1f9)]({'exactly':z[a152_0x3280dc(0x1f7)]()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1d9),a152_0x3280dc(0x1ba),a152_0x3280dc(0x1f2),'Average']),'column':z[a152_0x3280dc(0x1ec)](),'groupingColumns':z['array'](z[a152_0x3280dc(0x1ec)]())[a152_0x3280dc(0x205)]()}),z[a152_0x3280dc(0x1f9)]({'type':z['literal']('Count'),'groupingColumns':z['array'](z['string']())[a152_0x3280dc(0x205)]()}),z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1c0)](a152_0x3280dc(0x1fd)),'columns':z[a152_0x3280dc(0x1f4)](z[a152_0x3280dc(0x1ec)]())}),z['object']({'type':z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1f3),a152_0x3280dc(0x1d4)]),'column':z[a152_0x3280dc(0x1ec)](),'orderColumn':z[a152_0x3280dc(0x1ec)](),'groupingColumns':z[a152_0x3280dc(0x1f4)](z[a152_0x3280dc(0x1ec)]())[a152_0x3280dc(0x205)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x3280dc(0x1cd),a152_0x3280dc(0x1be),'TimeRange']);export const FilterColumnConditionDefSchema=z[a152_0x3280dc(0x1f9)]({'type':z['literal'](a152_0x3280dc(0x1dd)),'column':z[a152_0x3280dc(0x1ec)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x3280dc(0x205)]()})[a152_0x3280dc(0x1d8)]((_0x4e8816,_0x14cf16)=>{const _0x3b9624=a152_0x3280dc,_0xc9326a=_0x4e8816[_0x3b9624(0x1ed)]['type'];_0x4e8816[_0x3b9624(0x1e8)]===_0x3b9624(0x1d0)?!TIMESTAMP_OPERATORS[_0x3b9624(0x1d7)](_0xc9326a)&&_0x14cf16[_0x3b9624(0x1cc)]({'code':_0x3b9624(0x1c1),'message':_0x3b9624(0x1dc)+_0xc9326a+'\x27)','path':[_0x3b9624(0x1ed),_0x3b9624(0x1bd)]}):TIMESTAMP_OPERATORS[_0x3b9624(0x1d7)](_0xc9326a)&&_0x14cf16[_0x3b9624(0x1cc)]({'code':_0x3b9624(0x1c1),'message':_0x3b9624(0x206)+_0xc9326a+_0x3b9624(0x1ca),'path':[_0x3b9624(0x1ed),'type']});});export const FilterRuleDefSchema=z[a152_0x3280dc(0x1f9)]({'type':z['literal'](a152_0x3280dc(0x1d2)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x3280dc(0x1f1)](()=>z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1c0)]('Value'),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a152_0x3280dc(0x205)](),'aggregation':AggregationDefSchema[a152_0x3280dc(0x205)](),'source':z[a152_0x3280dc(0x1ec)]()[a152_0x3280dc(0x205)](),'filter':FilterRuleDefSchema[a152_0x3280dc(0x205)](),'limit':z['number']()[a152_0x3280dc(0x205)]()}));export const BehaviorConditionDefSchema=z[a152_0x3280dc(0x1f1)](()=>z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1c0)](a152_0x3280dc(0x1e2)),'attribute':z[a152_0x3280dc(0x1ec)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x3280dc(0x205)](),'exclude':z[a152_0x3280dc(0x1bf)]()[a152_0x3280dc(0x205)](),'aggregation':AggregationDefSchema[a152_0x3280dc(0x205)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a152_0x3280dc(0x205)]()}));export const ColumnConditionDefSchema=z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1c0)](a152_0x3280dc(0x1dd)),'column':z[a152_0x3280dc(0x1ec)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a152_0x3280dc(0x1f1)](()=>z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1d2),'Or']),'conditions':z[a152_0x3280dc(0x1f4)](ConditionDefSchema),'description':z[a152_0x3280dc(0x1ec)]()[a152_0x3280dc(0x205)]()}));export const SegmentRefConditionDefSchema=z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1d6),a152_0x3280dc(0x1d3)]),'segment':z[a152_0x3280dc(0x1ec)]()[a152_0x3280dc(0x1e6)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a152_0x3280dc(0x1f1)](()=>z[a152_0x3280dc(0x1da)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x3280dc(0x1f1)](()=>z['object']({'type':z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1d2),'Or']),'conditions':z[a152_0x3280dc(0x1f4)](ConditionDefSchema),'description':z['string']()[a152_0x3280dc(0x205)]()}));export const SegmentDefSchema=z[a152_0x3280dc(0x1f9)]({'type':z[a152_0x3280dc(0x1c0)]('segment')[a152_0x3280dc(0x205)](),'name':z[a152_0x3280dc(0x1ec)]()[a152_0x3280dc(0x1e6)](0x1,a152_0x3280dc(0x1bc)),'description':z[a152_0x3280dc(0x1ec)]()[a152_0x3280dc(0x205)](),'folder':z[a152_0x3280dc(0x1ec)]()[a152_0x3280dc(0x205)](),'rule':RuleDefSchema[a152_0x3280dc(0x205)](),'kind':z[a152_0x3280dc(0x1ce)]([a152_0x3280dc(0x1cf),a152_0x3280dc(0x1c8),a152_0x3280dc(0x1f8)])[a152_0x3280dc(0x205)](),'visible':z[a152_0x3280dc(0x1bf)]()[a152_0x3280dc(0x205)](),'activations':z[a152_0x3280dc(0x1f4)](z[a152_0x3280dc(0x1c3)]())[a152_0x3280dc(0x205)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a153_0x5a2154=a153_0x34ce;(function(_0x417a6b,_0x5416e7){const _0x590254=a153_0x34ce,_0x4aa3de=_0x417a6b();while(!![]){try{const _0x5a9c94=parseInt(_0x590254(0x163))/0x1*(-parseInt(_0x590254(0x168))/0x2)+parseInt(_0x590254(0x172))/0x3+-parseInt(_0x590254(0x161))/0x4*(parseInt(_0x590254(0x166))/0x5)+-parseInt(_0x590254(0x160))/0x6+-parseInt(_0x590254(0x176))/0x7*(parseInt(_0x590254(0x177))/0x8)+parseInt(_0x590254(0x173))/0x9+-parseInt(_0x590254(0x164))/0xa*(-parseInt(_0x590254(0x17d))/0xb);if(_0x5a9c94===_0x5416e7)break;else _0x4aa3de['push'](_0x4aa3de['shift']());}catch(_0xcc91b){_0x4aa3de['push'](_0x4aa3de['shift']());}}}(a153_0x4710,0xb26d4));import{readFileSync}from'fs';import*as a153_0x288ac3 from'path';import*as a153_0x43b1b6 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([a153_0x5a2154(0x165),a153_0x5a2154(0x16c)]);export function isJourneyDef(_0x3ba012){const _0x43524f=a153_0x5a2154;return typeof _0x3ba012===_0x43524f(0x17e)&&_0x3ba012!==null&&'type'in _0x3ba012&&_0x3ba012[_0x43524f(0x15e)]===_0x43524f(0x174);}export function isCampaignDef(_0x213cf5){const _0x1a7591=a153_0x5a2154;if(typeof _0x213cf5!=='object'||_0x213cf5===null)return![];const _0x14329c=_0x213cf5,_0x3763e5=VALID_CAMPAIGN_TYPES[_0x1a7591(0x175)](_0x14329c[_0x1a7591(0x171)]);if(_0x14329c[_0x1a7591(0x15e)]==='campaign'&&_0x3763e5)return!![];if(_0x3763e5&&!_0x14329c[_0x1a7591(0x15e)])return!![];return![];}export function isTemplateDef(_0x587266){const _0x49f259=a153_0x5a2154;return typeof _0x587266==='object'&&_0x587266!==null&&'type'in _0x587266&&_0x587266[_0x49f259(0x15e)]===_0x49f259(0x162);}function a153_0x34ce(_0x111375,_0x289998){_0x111375=_0x111375-0x15d;const _0x471093=a153_0x4710();let _0x34ce7a=_0x471093[_0x111375];return _0x34ce7a;}export function isValidationResult(_0x3c3cef){return!('skipped'in _0x3c3cef);}export function createParseErrorResult(_0x230516,_0x245f86,_0x2c1679,_0x359561,_0xe287dd=a153_0x5a2154(0x16d)){const _0x35b6fa=a153_0x5a2154;return{'filePath':_0x230516,'relativePath':_0x245f86,'source':_0x2c1679,'result':{'valid':![],'errors':[{'level':_0x35b6fa(0x16b),'path':'','code':_0x35b6fa(0x178),'message':_0x359561}],'warnings':[]},'fileType':_0xe287dd};}export function validateYamlFile(_0x245072,_0x4aa617,_0x1b56ce={}){const _0x1942fc=a153_0x5a2154,_0x433cf3=a153_0x288ac3[_0x1942fc(0x17a)](_0x4aa617,_0x245072)||a153_0x288ac3['basename'](_0x245072);try{const _0x392fb3=readFileSync(_0x245072,_0x1942fc(0x16f)),_0x54354d=a153_0x43b1b6[_0x1942fc(0x17c)](_0x392fb3),_0x169e98=_0x54354d[_0x1942fc(0x17b)]();if(!_0x169e98)return createParseErrorResult(_0x245072,_0x433cf3,_0x392fb3,_0x1942fc(0x16e));let _0x51b8ea;if(isJourneyDef(_0x169e98))_0x51b8ea=_0x1942fc(0x174);else{if(isCampaignDef(_0x169e98))_0x51b8ea=_0x1942fc(0x167);else isTemplateDef(_0x169e98)?_0x51b8ea='template':_0x51b8ea=_0x1942fc(0x16d);}if(_0x1b56ce[_0x1942fc(0x15d)]&&_0x51b8ea!==_0x1b56ce[_0x1942fc(0x15d)])return{'filePath':_0x245072,'relativePath':_0x433cf3,'skipped':!![],'reason':_0x1942fc(0x15f)+_0x1b56ce[_0x1942fc(0x15d)]};const _0x927494={'source':_0x392fb3,'document':_0x54354d};let _0x1518a2;if(_0x51b8ea===_0x1942fc(0x174))_0x1518a2=validateJourneyDef(_0x169e98,_0x927494);else{if(_0x51b8ea===_0x1942fc(0x167))_0x1518a2=validateCampaignDef(_0x169e98,_0x927494);else _0x51b8ea===_0x1942fc(0x162)?_0x1518a2=validateTemplateDef(_0x169e98,_0x927494):_0x1518a2=validateSegmentDef(_0x169e98,_0x927494);}return{'filePath':_0x245072,'relativePath':_0x433cf3,'source':_0x392fb3,'result':_0x1518a2,'fileType':_0x51b8ea};}catch(_0x51508a){const _0x3b2d1b=_0x51508a instanceof Error?_0x51508a[_0x1942fc(0x170)]:String(_0x51508a);return createParseErrorResult(_0x245072,_0x433cf3,'','YAML\x20parse\x20error:\x20'+_0x3b2d1b);}}export function validateYamlFiles(_0x4e3d28,_0x20d236,_0x516aff={}){const _0x12d422=a153_0x5a2154;return _0x4e3d28[_0x12d422(0x17f)](_0x16eab6=>validateYamlFile(_0x16eab6,_0x20d236,_0x516aff));}export function calculateSummary(_0x5266d3){const _0x301e3a=a153_0x5a2154;let _0x3277e8=0x0,_0xbccbb3=0x0,_0x1cf2bd=0x0,_0x278e09=0x0;for(const _0x86afa3 of _0x5266d3){if(!isValidationResult(_0x86afa3)){_0x278e09++;continue;}_0x86afa3[_0x301e3a(0x16a)]['valid']?_0x3277e8++:_0xbccbb3++,_0x1cf2bd+=_0x86afa3[_0x301e3a(0x16a)][_0x301e3a(0x169)][_0x301e3a(0x179)];}return{'validCount':_0x3277e8,'invalidCount':_0xbccbb3,'warningCount':_0x1cf2bd,'skippedCount':_0x278e09,'hasErrors':_0xbccbb3>0x0};}function a153_0x4710(){const _0x5611dc=['template','1EVZBrn','10VTormy','email','948125rNNowj','campaign','481970rJXicx','warnings','result','error','push','segment','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','utf-8','message','campaign_type','2640741pLsMiH','2713365pGeuGQ','journey','has','21QvjGzZ','3166920MyQPnG','YAML_PARSE_ERROR','length','relative','toJSON','parseDocument','25508758YcIYvL','object','map','filterType','type','not\x20a\x20','2359014aJFELk','20NWhaOO'];a153_0x4710=function(){return _0x5611dc;};return a153_0x4710();}
1
+ const a153_0x4c04b3=a153_0xb145;(function(_0x20f517,_0x576b74){const _0x2a7629=a153_0xb145,_0x508867=_0x20f517();while(!![]){try{const _0x518675=parseInt(_0x2a7629(0x83))/0x1+parseInt(_0x2a7629(0x86))/0x2*(-parseInt(_0x2a7629(0x6d))/0x3)+-parseInt(_0x2a7629(0x7c))/0x4*(-parseInt(_0x2a7629(0x88))/0x5)+-parseInt(_0x2a7629(0x72))/0x6*(-parseInt(_0x2a7629(0x8a))/0x7)+-parseInt(_0x2a7629(0x71))/0x8+-parseInt(_0x2a7629(0x77))/0x9*(parseInt(_0x2a7629(0x74))/0xa)+parseInt(_0x2a7629(0x7d))/0xb;if(_0x518675===_0x576b74)break;else _0x508867['push'](_0x508867['shift']());}catch(_0x1068ba){_0x508867['push'](_0x508867['shift']());}}}(a153_0x6249,0xedb5c));import{readFileSync}from'fs';function a153_0x6249(){const _0x40b0e3=['template','filterType','1096629BlihFT','warnings','has','16VXzekI','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','1562390KqMGRM','error','7VmARos','relative','campaign','result','campaign_type','YAML\x20parse\x20error:\x20','437349MifteT','length','basename','parseDocument','12762896XhXFgn','4802502ETFpvo','message','11974610WLMyPw','not\x20a\x20','journey','9xNgdoD','email','type','segment','map','8fMvHYY','26518195OVpISg','YAML_PARSE_ERROR','valid','utf-8'];a153_0x6249=function(){return _0x40b0e3;};return a153_0x6249();}import*as a153_0x45da36 from'path';import*as a153_0x24e680 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';function a153_0xb145(_0x500e4b,_0x11b152){_0x500e4b=_0x500e4b-0x6c;const _0x6249cb=a153_0x6249();let _0xb1456a=_0x6249cb[_0x500e4b];return _0xb1456a;}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([a153_0x4c04b3(0x78),'push']);export function isJourneyDef(_0xa05727){const _0x3382b5=a153_0x4c04b3;return typeof _0xa05727==='object'&&_0xa05727!==null&&'type'in _0xa05727&&_0xa05727[_0x3382b5(0x79)]==='journey';}export function isCampaignDef(_0x24c40d){const _0x4a857a=a153_0x4c04b3;if(typeof _0x24c40d!=='object'||_0x24c40d===null)return![];const _0x1ab69a=_0x24c40d,_0x2e2c0f=VALID_CAMPAIGN_TYPES[_0x4a857a(0x85)](_0x1ab69a[_0x4a857a(0x8e)]);if(_0x1ab69a[_0x4a857a(0x79)]===_0x4a857a(0x8c)&&_0x2e2c0f)return!![];if(_0x2e2c0f&&!_0x1ab69a[_0x4a857a(0x79)])return!![];return![];}export function isTemplateDef(_0xebbb3a){return typeof _0xebbb3a==='object'&&_0xebbb3a!==null&&'type'in _0xebbb3a&&_0xebbb3a['type']==='template';}export function isValidationResult(_0x1ab536){return!('skipped'in _0x1ab536);}export function createParseErrorResult(_0x395700,_0x235f8e,_0x2b8b37,_0x59ca95,_0x3575c2='segment'){const _0x218422=a153_0x4c04b3;return{'filePath':_0x395700,'relativePath':_0x235f8e,'source':_0x2b8b37,'result':{'valid':![],'errors':[{'level':_0x218422(0x89),'path':'','code':_0x218422(0x7e),'message':_0x59ca95}],'warnings':[]},'fileType':_0x3575c2};}export function validateYamlFile(_0x30a2e0,_0x34d7a7,_0x5ecd26={}){const _0x31c385=a153_0x4c04b3,_0x2fa3e7=a153_0x45da36[_0x31c385(0x8b)](_0x34d7a7,_0x30a2e0)||a153_0x45da36[_0x31c385(0x6f)](_0x30a2e0);try{const _0x3d7043=readFileSync(_0x30a2e0,_0x31c385(0x80)),_0x2f34b6=a153_0x24e680[_0x31c385(0x70)](_0x3d7043),_0x8bbf47=_0x2f34b6['toJSON']();if(!_0x8bbf47)return createParseErrorResult(_0x30a2e0,_0x2fa3e7,_0x3d7043,_0x31c385(0x87));let _0x443160;if(isJourneyDef(_0x8bbf47))_0x443160=_0x31c385(0x76);else{if(isCampaignDef(_0x8bbf47))_0x443160=_0x31c385(0x8c);else isTemplateDef(_0x8bbf47)?_0x443160='template':_0x443160=_0x31c385(0x7a);}if(_0x5ecd26[_0x31c385(0x82)]&&_0x443160!==_0x5ecd26[_0x31c385(0x82)])return{'filePath':_0x30a2e0,'relativePath':_0x2fa3e7,'skipped':!![],'reason':_0x31c385(0x75)+_0x5ecd26['filterType']};const _0x27f67f={'source':_0x3d7043,'document':_0x2f34b6};let _0x1a8a5f;if(_0x443160===_0x31c385(0x76))_0x1a8a5f=validateJourneyDef(_0x8bbf47,_0x27f67f);else{if(_0x443160==='campaign')_0x1a8a5f=validateCampaignDef(_0x8bbf47,_0x27f67f);else _0x443160===_0x31c385(0x81)?_0x1a8a5f=validateTemplateDef(_0x8bbf47,_0x27f67f):_0x1a8a5f=validateSegmentDef(_0x8bbf47,_0x27f67f);}return{'filePath':_0x30a2e0,'relativePath':_0x2fa3e7,'source':_0x3d7043,'result':_0x1a8a5f,'fileType':_0x443160};}catch(_0x13df0b){const _0x3ec8e3=_0x13df0b instanceof Error?_0x13df0b[_0x31c385(0x73)]:String(_0x13df0b);return createParseErrorResult(_0x30a2e0,_0x2fa3e7,'',_0x31c385(0x6c)+_0x3ec8e3);}}export function validateYamlFiles(_0x4d97b3,_0x195a1c,_0x2cc319={}){const _0x1efe43=a153_0x4c04b3;return _0x4d97b3[_0x1efe43(0x7b)](_0xdb3d9e=>validateYamlFile(_0xdb3d9e,_0x195a1c,_0x2cc319));}export function calculateSummary(_0x6433fe){const _0x13928f=a153_0x4c04b3;let _0x11558b=0x0,_0x3f113b=0x0,_0x38c98f=0x0,_0x399e51=0x0;for(const _0x352885 of _0x6433fe){if(!isValidationResult(_0x352885)){_0x399e51++;continue;}_0x352885[_0x13928f(0x8d)][_0x13928f(0x7f)]?_0x11558b++:_0x3f113b++,_0x38c98f+=_0x352885[_0x13928f(0x8d)][_0x13928f(0x84)][_0x13928f(0x6e)];}return{'validCount':_0x11558b,'invalidCount':_0x3f113b,'warningCount':_0x38c98f,'skippedCount':_0x399e51,'hasErrors':_0x3f113b>0x0};}
@@ -1 +1 @@
1
- (function(_0x300964,_0x33685b){const _0x23969d=a154_0x35f3,_0x4c49f1=_0x300964();while(!![]){try{const _0x4c5350=parseInt(_0x23969d(0x1bb))/0x1+parseInt(_0x23969d(0x1db))/0x2+-parseInt(_0x23969d(0x1e6))/0x3*(parseInt(_0x23969d(0x1cc))/0x4)+-parseInt(_0x23969d(0x1e5))/0x5*(-parseInt(_0x23969d(0x1eb))/0x6)+-parseInt(_0x23969d(0x1e4))/0x7*(-parseInt(_0x23969d(0x1d3))/0x8)+parseInt(_0x23969d(0x1ea))/0x9*(parseInt(_0x23969d(0x1d0))/0xa)+-parseInt(_0x23969d(0x1bc))/0xb;if(_0x4c5350===_0x33685b)break;else _0x4c49f1['push'](_0x4c49f1['shift']());}catch(_0x4b5e00){_0x4c49f1['push'](_0x4c49f1['shift']());}}}(a154_0x26f7,0xcc75d));function a154_0x35f3(_0x14b87e,_0x10bc81){_0x14b87e=_0x14b87e-0x1bb;const _0x26f7c5=a154_0x26f7();let _0x35f324=_0x26f7c5[_0x14b87e];return _0x35f324;}import*as a154_0x420f1b from'yaml';import a154_0x2f050e from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x181aad,_0x59570b,_0x32eeb7){const _0x4d76b7=a154_0x35f3;if(!_0x181aad||!_0x59570b)return undefined;try{let _0x15a73b=_0x181aad[_0x4d76b7(0x1c1)](_0x32eeb7,!![]),_0x35844b=[..._0x32eeb7];while((!_0x15a73b||typeof _0x15a73b!==_0x4d76b7(0x1dd)||!('range'in _0x15a73b)||!_0x15a73b[_0x4d76b7(0x1d5)])&&_0x35844b['length']>0x0){_0x35844b[_0x4d76b7(0x1c2)](),_0x15a73b=_0x35844b['length']>0x0?_0x181aad[_0x4d76b7(0x1c1)](_0x35844b,!![]):_0x181aad[_0x4d76b7(0x1dc)];}if(!_0x15a73b||typeof _0x15a73b!==_0x4d76b7(0x1dd)||!('range'in _0x15a73b)||!_0x15a73b['range'])return undefined;const [_0x2ad94f]=_0x15a73b[_0x4d76b7(0x1d5)];return offsetToLocation(_0x59570b,_0x2ad94f);}catch{return undefined;}}export function offsetToLocation(_0x431088,_0x219956){let _0x30f38c=0x1,_0x305937=0x1;for(let _0xf09985=0x0;_0xf09985<_0x219956&&_0xf09985<_0x431088['length'];_0xf09985++){_0x431088[_0xf09985]==='\x0a'?(_0x30f38c++,_0x305937=0x1):_0x305937++;}return{'line':_0x30f38c,'column':_0x305937,'offset':_0x219956};}export function pathToArray(_0x53b71e){const _0x430a79=a154_0x35f3;if(!_0x53b71e)return[];return _0x53b71e[_0x430a79(0x1e9)]('.')['flatMap'](_0x3ff4dd=>{const _0x41d3da=_0x430a79,_0x4167ce=_0x3ff4dd[_0x41d3da(0x1ca)](/^(\w+)\[(\d+)\]$/);if(_0x4167ce)return[_0x4167ce[0x1],parseInt(_0x4167ce[0x2],0xa)];return[_0x3ff4dd];});}export function formatZodPath(_0xcafbb2){const _0x3400ae=a154_0x35f3;let _0x369ac4='';for(const _0x4521b3 of _0xcafbb2){if(typeof _0x4521b3===_0x3400ae(0x1d8))_0x369ac4+='['+_0x4521b3+']';else{const _0xf1e3b4=String(_0x4521b3);_0x369ac4+=_0x369ac4?'.'+_0xf1e3b4:_0xf1e3b4;}}return _0x369ac4;}function a154_0x26f7(){const _0x4f3b7f=['8cNVGRm','issues','range','dim','repeat','number','map','toString','361280tsodZi','contents','object','YAML\x20validation\x20error\x20at\x20\x27','join','yellow','column','errors','red','3973669ZnBrga','5NLmQjf','129XhGrSy','Invalid\x20YAML:\x20expected\x20an\x20object','invalid_union','split','36nEelbz','6243312cXOcBK','1398130RvrGNW','28495500dfvfgX','safeParse','location','code','error','getIn','pop','max','path','\x20|\x20','level','length','push','min','match','YAML\x20validation\x20error:\x20','17728TXSgfn','parse','data','message','1078890hrugWO','line','\x27:\x20'];a154_0x26f7=function(){return _0x4f3b7f;};return a154_0x26f7();}export function flattenZodIssues(_0x166a9b){const _0x188962=a154_0x35f3,_0x5864d1=[];for(const _0x3a804d of _0x166a9b){if(_0x3a804d[_0x188962(0x1bf)]===_0x188962(0x1e8)&&'errors'in _0x3a804d){const _0x41ea3e=_0x3a804d[_0x188962(0x1e2)];let _0x4abf2d=_0x41ea3e[0x0]||[];for(const _0x3b1fe5 of _0x41ea3e){_0x3b1fe5[_0x188962(0x1c7)]<_0x4abf2d['length']&&(_0x4abf2d=_0x3b1fe5);}const _0x48e210=_0x4abf2d[_0x188962(0x1d9)](_0x517579=>({..._0x517579,'path':[..._0x3a804d['path'],..._0x517579[_0x188962(0x1c4)]]}));_0x5864d1[_0x188962(0x1c8)](...flattenZodIssues(_0x48e210));}else _0x5864d1[_0x188962(0x1c8)](_0x3a804d);}return _0x5864d1;}export function safeParseYaml(_0xae8cf7,_0x101c41){const _0x1bf446=a154_0x35f3,_0x554691=a154_0x420f1b[_0x1bf446(0x1cd)](_0xae8cf7);if(!_0x554691||typeof _0x554691!==_0x1bf446(0x1dd))throw new Error(_0x1bf446(0x1e7));const _0x427ffb=_0x101c41[_0x1bf446(0x1bd)](_0x554691);if(!_0x427ffb['success']){const _0x2f9a80=_0x427ffb[_0x1bf446(0x1c0)][_0x1bf446(0x1d4)][0x0],_0x1b34d4=formatZodPath(_0x2f9a80[_0x1bf446(0x1c4)]);throw new Error(_0x1b34d4?_0x1bf446(0x1de)+_0x1b34d4+_0x1bf446(0x1d2)+_0x2f9a80['message']:_0x1bf446(0x1cb)+_0x2f9a80[_0x1bf446(0x1cf)]);}return _0x427ffb[_0x1bf446(0x1ce)];}export function formatIssueWithContext(_0x4f3da7,_0x4b78fe,_0x452a56){const _0x662236=a154_0x35f3,_0x537de8=[],_0x43b1ef=_0x4f3da7['level']==='error',_0x1a3790=_0x43b1ef?a154_0x2f050e[_0x662236(0x1e3)]:a154_0x2f050e[_0x662236(0x1e0)],_0x56f67=_0x43b1ef?a154_0x2f050e[_0x662236(0x1e3)]:a154_0x2f050e[_0x662236(0x1e0)],_0x2f4fda=_0x452a56?a154_0x2f050e['cyan'](_0x452a56+':'):'';if(_0x4f3da7[_0x662236(0x1be)]){const _0x43a3f9=a154_0x2f050e['cyan'](_0x4f3da7[_0x662236(0x1be)][_0x662236(0x1d1)]+':'+_0x4f3da7[_0x662236(0x1be)][_0x662236(0x1e1)]);_0x537de8[_0x662236(0x1c8)](''+_0x2f4fda+_0x43a3f9+':\x20'+_0x1a3790(_0x4f3da7[_0x662236(0x1c6)])+'\x20'+_0x56f67('['+_0x4f3da7[_0x662236(0x1bf)]+']'));}else _0x537de8[_0x662236(0x1c8)](''+_0x2f4fda+a154_0x2f050e['dim'](_0x4f3da7[_0x662236(0x1c4)])+':\x20'+_0x1a3790(_0x4f3da7[_0x662236(0x1c6)])+'\x20'+_0x56f67('['+_0x4f3da7[_0x662236(0x1bf)]+']'));_0x537de8['push'](_0x4f3da7[_0x662236(0x1cf)]);if(_0x4f3da7[_0x662236(0x1be)]&&_0x4b78fe){const _0x5b31de=_0x4b78fe[_0x662236(0x1e9)]('\x0a'),{line:_0x35f625,column:_0x36e138}=_0x4f3da7[_0x662236(0x1be)],_0x29b077=Math[_0x662236(0x1c3)](0x1,_0x35f625-0x1),_0x5bdd35=Math[_0x662236(0x1c9)](_0x5b31de[_0x662236(0x1c7)],_0x35f625+0x1);_0x537de8[_0x662236(0x1c8)]('');for(let _0x4c70df=_0x29b077;_0x4c70df<=_0x5bdd35;_0x4c70df++){const _0x9103e4=_0x5b31de[_0x4c70df-0x1]||'',_0x268fbf=a154_0x2f050e[_0x662236(0x1d6)](_0x4c70df[_0x662236(0x1da)]()['padStart'](0x4)),_0x995bd1=a154_0x2f050e[_0x662236(0x1d6)](_0x662236(0x1c5));if(_0x4c70df===_0x35f625){_0x537de8[_0x662236(0x1c8)]('\x20\x20'+_0x268fbf+_0x995bd1+_0x1a3790(_0x9103e4));const _0x1aec3c='\x20'[_0x662236(0x1d7)](0x4+0x3+_0x36e138-0x1);_0x537de8['push']('\x20\x20'+_0x1aec3c+_0x1a3790('^'));}else _0x537de8[_0x662236(0x1c8)]('\x20\x20'+_0x268fbf+_0x995bd1+a154_0x2f050e['dim'](_0x9103e4));}}return _0x537de8[_0x662236(0x1df)]('\x0a');}export function formatValidationResult(_0x1c75c1,_0x30c992,_0x1e0ca9){const _0x2f7c90=a154_0x35f3,_0x521e3f=[];for(const _0x388ed3 of _0x1c75c1[_0x2f7c90(0x1e2)]){_0x521e3f[_0x2f7c90(0x1c8)](formatIssueWithContext(_0x388ed3,_0x30c992,_0x1e0ca9)),_0x521e3f[_0x2f7c90(0x1c8)]('');}for(const _0x115a0b of _0x1c75c1['warnings']){_0x521e3f[_0x2f7c90(0x1c8)](formatIssueWithContext(_0x115a0b,_0x30c992,_0x1e0ca9)),_0x521e3f[_0x2f7c90(0x1c8)]('');}return _0x521e3f[_0x2f7c90(0x1df)]('\x0a');}
1
+ (function(_0x58a675,_0x5bea22){const _0x438b0c=a154_0x1a79,_0x29e2e4=_0x58a675();while(!![]){try{const _0x4643e5=parseInt(_0x438b0c(0x1a3))/0x1*(parseInt(_0x438b0c(0x1a7))/0x2)+-parseInt(_0x438b0c(0x1bb))/0x3+-parseInt(_0x438b0c(0x1a6))/0x4*(-parseInt(_0x438b0c(0x1a8))/0x5)+parseInt(_0x438b0c(0x1b8))/0x6+-parseInt(_0x438b0c(0x196))/0x7*(-parseInt(_0x438b0c(0x193))/0x8)+-parseInt(_0x438b0c(0x1aa))/0x9+-parseInt(_0x438b0c(0x19c))/0xa*(parseInt(_0x438b0c(0x19e))/0xb);if(_0x4643e5===_0x5bea22)break;else _0x29e2e4['push'](_0x29e2e4['shift']());}catch(_0x5aaa67){_0x29e2e4['push'](_0x29e2e4['shift']());}}}(a154_0x311f,0xf3207));import*as a154_0x435d1c from'yaml';import a154_0x314bb3 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x53317a,_0x5a6b68,_0x4ed80d){const _0x12bcf2=a154_0x1a79;if(!_0x53317a||!_0x5a6b68)return undefined;try{let _0x3ed726=_0x53317a[_0x12bcf2(0x192)](_0x4ed80d,!![]),_0x3078e4=[..._0x4ed80d];while((!_0x3ed726||typeof _0x3ed726!==_0x12bcf2(0x1b3)||!(_0x12bcf2(0x194)in _0x3ed726)||!_0x3ed726[_0x12bcf2(0x194)])&&_0x3078e4[_0x12bcf2(0x1ac)]>0x0){_0x3078e4[_0x12bcf2(0x1ba)](),_0x3ed726=_0x3078e4[_0x12bcf2(0x1ac)]>0x0?_0x53317a['getIn'](_0x3078e4,!![]):_0x53317a[_0x12bcf2(0x1bf)];}if(!_0x3ed726||typeof _0x3ed726!=='object'||!(_0x12bcf2(0x194)in _0x3ed726)||!_0x3ed726['range'])return undefined;const [_0x4839d6]=_0x3ed726[_0x12bcf2(0x194)];return offsetToLocation(_0x5a6b68,_0x4839d6);}catch{return undefined;}}export function offsetToLocation(_0x1ff36f,_0x3597a2){const _0x1a49cf=a154_0x1a79;let _0xd2e864=0x1,_0x582977=0x1;for(let _0x109025=0x0;_0x109025<_0x3597a2&&_0x109025<_0x1ff36f[_0x1a49cf(0x1ac)];_0x109025++){_0x1ff36f[_0x109025]==='\x0a'?(_0xd2e864++,_0x582977=0x1):_0x582977++;}return{'line':_0xd2e864,'column':_0x582977,'offset':_0x3597a2};}export function pathToArray(_0x50d7e7){const _0x15233e=a154_0x1a79;if(!_0x50d7e7)return[];return _0x50d7e7['split']('.')[_0x15233e(0x195)](_0x5b9d51=>{const _0x24df4b=_0x15233e,_0x3929d1=_0x5b9d51[_0x24df4b(0x1ad)](/^(\w+)\[(\d+)\]$/);if(_0x3929d1)return[_0x3929d1[0x1],parseInt(_0x3929d1[0x2],0xa)];return[_0x5b9d51];});}function a154_0x311f(){const _0x3c7674=['red','column','warnings','number','cyan','object','line','Invalid\x20YAML:\x20expected\x20an\x20object','parse','max','3064866zFeGLY','errors','pop','1195029yTilrq','path','yellow','issues','contents','level','getIn','7216nypIfB','range','flatMap','11669LKwpsQ','success','YAML\x20validation\x20error\x20at\x20\x27','location','map','\x20|\x20','10070eFCRfU','safeParse','16808TOiBwY','error','split','dim','min','1hpQfQV','toString','message','162496sALUuA','2564458oOUfha','5Pznwlt','push','3639708uzQgmZ','code','length','match'];a154_0x311f=function(){return _0x3c7674;};return a154_0x311f();}function a154_0x1a79(_0x21c930,_0x2ddd4a){_0x21c930=_0x21c930-0x191;const _0x311fe2=a154_0x311f();let _0x1a7977=_0x311fe2[_0x21c930];return _0x1a7977;}export function formatZodPath(_0x32e8c0){const _0x12d347=a154_0x1a79;let _0x1da6a6='';for(const _0x3c0803 of _0x32e8c0){if(typeof _0x3c0803===_0x12d347(0x1b1))_0x1da6a6+='['+_0x3c0803+']';else{const _0x422fee=String(_0x3c0803);_0x1da6a6+=_0x1da6a6?'.'+_0x422fee:_0x422fee;}}return _0x1da6a6;}export function flattenZodIssues(_0x2fc23b){const _0x10a0a3=a154_0x1a79,_0x1bb56e=[];for(const _0x17fd60 of _0x2fc23b){if(_0x17fd60['code']==='invalid_union'&&_0x10a0a3(0x1b9)in _0x17fd60){const _0x274728=_0x17fd60[_0x10a0a3(0x1b9)];let _0x42eeca=_0x274728[0x0]||[];for(const _0x47d005 of _0x274728){_0x47d005[_0x10a0a3(0x1ac)]<_0x42eeca['length']&&(_0x42eeca=_0x47d005);}const _0x4ae155=_0x42eeca[_0x10a0a3(0x19a)](_0xbc541f=>({..._0xbc541f,'path':[..._0x17fd60[_0x10a0a3(0x1bc)],..._0xbc541f[_0x10a0a3(0x1bc)]]}));_0x1bb56e['push'](...flattenZodIssues(_0x4ae155));}else _0x1bb56e[_0x10a0a3(0x1a9)](_0x17fd60);}return _0x1bb56e;}export function safeParseYaml(_0x5c52a2,_0x1f8147){const _0xebdfec=a154_0x1a79,_0x2eeb08=a154_0x435d1c[_0xebdfec(0x1b6)](_0x5c52a2);if(!_0x2eeb08||typeof _0x2eeb08!==_0xebdfec(0x1b3))throw new Error(_0xebdfec(0x1b5));const _0x26ba87=_0x1f8147[_0xebdfec(0x19d)](_0x2eeb08);if(!_0x26ba87[_0xebdfec(0x197)]){const _0x20cedb=_0x26ba87[_0xebdfec(0x19f)][_0xebdfec(0x1be)][0x0],_0x33accf=formatZodPath(_0x20cedb[_0xebdfec(0x1bc)]);throw new Error(_0x33accf?_0xebdfec(0x198)+_0x33accf+'\x27:\x20'+_0x20cedb[_0xebdfec(0x1a5)]:'YAML\x20validation\x20error:\x20'+_0x20cedb[_0xebdfec(0x1a5)]);}return _0x26ba87['data'];}export function formatIssueWithContext(_0x5b46d9,_0x6337b7,_0x178d8d){const _0x46efce=a154_0x1a79,_0x264a4b=[],_0xa6087d=_0x5b46d9[_0x46efce(0x191)]===_0x46efce(0x19f),_0x113971=_0xa6087d?a154_0x314bb3[_0x46efce(0x1ae)]:a154_0x314bb3[_0x46efce(0x1bd)],_0x280106=_0xa6087d?a154_0x314bb3[_0x46efce(0x1ae)]:a154_0x314bb3[_0x46efce(0x1bd)],_0x3da683=_0x178d8d?a154_0x314bb3[_0x46efce(0x1b2)](_0x178d8d+':'):'';if(_0x5b46d9['location']){const _0x7ffcda=a154_0x314bb3[_0x46efce(0x1b2)](_0x5b46d9[_0x46efce(0x199)][_0x46efce(0x1b4)]+':'+_0x5b46d9[_0x46efce(0x199)][_0x46efce(0x1af)]);_0x264a4b[_0x46efce(0x1a9)](''+_0x3da683+_0x7ffcda+':\x20'+_0x113971(_0x5b46d9[_0x46efce(0x191)])+'\x20'+_0x280106('['+_0x5b46d9[_0x46efce(0x1ab)]+']'));}else _0x264a4b[_0x46efce(0x1a9)](''+_0x3da683+a154_0x314bb3[_0x46efce(0x1a1)](_0x5b46d9[_0x46efce(0x1bc)])+':\x20'+_0x113971(_0x5b46d9['level'])+'\x20'+_0x280106('['+_0x5b46d9[_0x46efce(0x1ab)]+']'));_0x264a4b[_0x46efce(0x1a9)](_0x5b46d9['message']);if(_0x5b46d9['location']&&_0x6337b7){const _0x2a442a=_0x6337b7[_0x46efce(0x1a0)]('\x0a'),{line:_0x1c9f1f,column:_0x109baa}=_0x5b46d9['location'],_0x443c4d=Math[_0x46efce(0x1b7)](0x1,_0x1c9f1f-0x1),_0x743960=Math[_0x46efce(0x1a2)](_0x2a442a[_0x46efce(0x1ac)],_0x1c9f1f+0x1);_0x264a4b[_0x46efce(0x1a9)]('');for(let _0xdc0792=_0x443c4d;_0xdc0792<=_0x743960;_0xdc0792++){const _0x16515f=_0x2a442a[_0xdc0792-0x1]||'',_0x433a88=a154_0x314bb3[_0x46efce(0x1a1)](_0xdc0792[_0x46efce(0x1a4)]()['padStart'](0x4)),_0x300386=a154_0x314bb3[_0x46efce(0x1a1)](_0x46efce(0x19b));if(_0xdc0792===_0x1c9f1f){_0x264a4b['push']('\x20\x20'+_0x433a88+_0x300386+_0x113971(_0x16515f));const _0x325f6d='\x20'['repeat'](0x4+0x3+_0x109baa-0x1);_0x264a4b[_0x46efce(0x1a9)]('\x20\x20'+_0x325f6d+_0x113971('^'));}else _0x264a4b[_0x46efce(0x1a9)]('\x20\x20'+_0x433a88+_0x300386+a154_0x314bb3[_0x46efce(0x1a1)](_0x16515f));}}return _0x264a4b['join']('\x0a');}export function formatValidationResult(_0xd731d7,_0x2f0580,_0x3560f8){const _0x22d629=a154_0x1a79,_0x2a294e=[];for(const _0x4ce79a of _0xd731d7[_0x22d629(0x1b9)]){_0x2a294e[_0x22d629(0x1a9)](formatIssueWithContext(_0x4ce79a,_0x2f0580,_0x3560f8)),_0x2a294e[_0x22d629(0x1a9)]('');}for(const _0x1b6e93 of _0xd731d7[_0x22d629(0x1b0)]){_0x2a294e[_0x22d629(0x1a9)](formatIssueWithContext(_0x1b6e93,_0x2f0580,_0x3560f8)),_0x2a294e[_0x22d629(0x1a9)]('');}return _0x2a294e['join']('\x0a');}