@treasuredata/tdx 2026.3.17 → 2026.3.19

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(_0x4c9df3,_0x2a60de){const _0x155ec9=a144_0x3850,_0x17597f=_0x4c9df3();while(!![]){try{const _0x35bb20=-parseInt(_0x155ec9(0x187))/0x1+-parseInt(_0x155ec9(0x15c))/0x2*(-parseInt(_0x155ec9(0x16b))/0x3)+parseInt(_0x155ec9(0x17e))/0x4*(-parseInt(_0x155ec9(0x18f))/0x5)+parseInt(_0x155ec9(0x14f))/0x6*(parseInt(_0x155ec9(0x162))/0x7)+parseInt(_0x155ec9(0x159))/0x8*(parseInt(_0x155ec9(0x183))/0x9)+-parseInt(_0x155ec9(0x172))/0xa+parseInt(_0x155ec9(0x186))/0xb*(parseInt(_0x155ec9(0x16e))/0xc);if(_0x35bb20===_0x2a60de)break;else _0x17597f['push'](_0x17597f['shift']());}catch(_0x2bf3e2){_0x17597f['push'](_0x17597f['shift']());}}}(a144_0x58ca,0x4f9b7));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x14df0d,_0x35ebcd={},_0xde223b={}){const _0x56a6b6=a144_0x3850;if(_0xde223b[_0x56a6b6(0x14c)])return runSemanticChecks(_0x14df0d,_0x35ebcd);const _0x426108=SegmentDefSchema[_0x56a6b6(0x188)](_0x14df0d);if(_0x426108[_0x56a6b6(0x180)])return runSemanticChecks(_0x426108[_0x56a6b6(0x16d)],_0x35ebcd);return zodErrorsToValidationResult(_0x426108['error'],_0x35ebcd);}export function validateRuleDef(_0x3e9bff,_0x43fcc4,_0x535272){const _0x59b91e=a144_0x3850;if(!_0x3e9bff)return[];const _0x4e185a=RuleDefSchema[_0x59b91e(0x188)](_0x3e9bff);if(_0x4e185a[_0x59b91e(0x180)])return checkRule(_0x4e185a[_0x59b91e(0x16d)],_0x43fcc4,_0x535272);const _0x51d7d5=flattenZodIssues(_0x4e185a[_0x59b91e(0x157)][_0x59b91e(0x156)]);return _0x51d7d5['map'](_0x52f1fe=>{const _0x3b0228=_0x59b91e,_0x2b5011=formatZodPath(_0x52f1fe[_0x3b0228(0x141)]),_0x1adc25=_0x2b5011?_0x43fcc4+'.'+_0x2b5011:_0x43fcc4,_0x596101=mapZodIssueToCode(_0x52f1fe,_0x2b5011),_0x135467=getLocationFromPath(_0x535272[_0x3b0228(0x13e)],_0x535272[_0x3b0228(0x18c)],pathToArray(_0x1adc25));return{'level':_0x3b0228(0x157),'path':_0x1adc25,'code':_0x596101,'message':_0x52f1fe[_0x3b0228(0x152)],..._0x135467&&{'location':_0x135467}};});}function a144_0x58ca(){const _0x585aaf=['SEGMENT_SCHEMA_ERROR','.operator.type','path','Value','Behavior','length','invalid_value','code','validationCode','match','BEHAVIOR_SOURCE_MISSING_FILTER','.segment','INVALID_RULE_TYPE','skipSchema','conditions','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','6vXCFfx','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','message','arrayMatching','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','issues','error','name','808MTkCTg','push','.source','2ZbdcQD','rule','INVALID_ARRAY_MATCHING','EMPTY_ATTRIBUTE','MISSING_BETWEEN_BOUNDS','MISSING_SEGMENT_REFERENCE','2212105UkdOWf','INVALID_OPERATOR_TYPE','level','EMPTY_CONDITIONS','.operator.value','.conditions','includes','.conditions[','.type','1291290DmGHoW','Attribute\x20name\x20cannot\x20be\x20empty','data','216fRexde','warning','rule.type','type','6015820BSuRmz','aggregation','\x27\x20with\x20attribute\x20\x27','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','.attribute','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','endsWith','map','MISSING_TIME_UNIT','params','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','attribute','4dXPKni','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','success','symbol','Behavior\x20source\x20\x27','46791VQubBp','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','MISSING_NAME','42647ewASLB','390158qdFOGj','safeParse','MISSING_CONDITIONS','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','MISSING_OPERATOR_VALUE','source','And','filter','117595psqOBO','document'];a144_0x58ca=function(){return _0x585aaf;};return a144_0x58ca();}function zodErrorsToValidationResult(_0x50cb3e,_0x419f03){const _0x3abb42=a144_0x3850,_0x4f1198=flattenZodIssues(_0x50cb3e[_0x3abb42(0x156)]),_0x2b0779=_0x4f1198[_0x3abb42(0x179)](_0xea337=>{const _0x5e5997=_0x3abb42,_0x1640d8=formatZodPath(_0xea337['path']),_0xfb0257=mapZodIssueToCode(_0xea337,_0x1640d8),_0x4980c8=getLocationFromPath(_0x419f03[_0x5e5997(0x13e)],_0x419f03[_0x5e5997(0x18c)],_0xea337[_0x5e5997(0x141)][_0x5e5997(0x179)](_0x4fc03f=>typeof _0x4fc03f===_0x5e5997(0x181)?String(_0x4fc03f):_0x4fc03f));return{'level':'error','path':_0x1640d8,'code':_0xfb0257,'message':_0xea337['message'],..._0x4980c8&&{'location':_0x4980c8}};});return{'valid':![],'errors':_0x2b0779,'warnings':[]};}function a144_0x3850(_0x29c7e1,_0x1c1374){_0x29c7e1=_0x29c7e1-0x13e;const _0x58cae5=a144_0x58ca();let _0x3850b3=_0x58cae5[_0x29c7e1];return _0x3850b3;}function mapZodIssueToCode(_0x746daf,_0x53bd3e){const _0x3a8c5b=a144_0x3850,_0xc138c4=_0x746daf[_0x3a8c5b(0x146)]==='custom'?_0x746daf[_0x3a8c5b(0x17b)]:undefined;if(_0x53bd3e===_0x3a8c5b(0x158))return _0x3a8c5b(0x185);if(_0x53bd3e===_0x3a8c5b(0x170)||_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x16a))){if(_0x746daf[_0x3a8c5b(0x146)]===_0x3a8c5b(0x145)){if(_0x53bd3e==='rule.type'||_0x53bd3e[_0x3a8c5b(0x148)](/\.conditions\[\d+\]\.type$/))return _0x3a8c5b(0x14b);}}if(_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x140)))return _0x3a8c5b(0x163);if(_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x166)))return _0x3a8c5b(0x18b);if(_0xc138c4?.[_0x3a8c5b(0x147)]===_0x3a8c5b(0x160))return'MISSING_BETWEEN_BOUNDS';if(_0xc138c4?.[_0x3a8c5b(0x147)]==='MISSING_TIME_UNIT')return _0x3a8c5b(0x17a);if(_0x53bd3e['endsWith'](_0x3a8c5b(0x167))||_0x53bd3e===_0x3a8c5b(0x14d))return _0x3a8c5b(0x189);if(_0x53bd3e[_0x3a8c5b(0x168)](_0x3a8c5b(0x153)))return _0x3a8c5b(0x15e);if(_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x14a)))return _0x3a8c5b(0x161);return _0x3a8c5b(0x13f);}function runSemanticChecks(_0xfd4ff,_0xe2468b){const _0x5610ab=a144_0x3850,_0x5aa829=[];_0xfd4ff[_0x5610ab(0x15d)]&&_0x5aa829[_0x5610ab(0x15a)](...checkRule(_0xfd4ff[_0x5610ab(0x15d)],_0x5610ab(0x15d),_0xe2468b));const _0xde6904=_0x5aa829[_0x5610ab(0x18e)](_0x308012=>_0x308012[_0x5610ab(0x164)]===_0x5610ab(0x157)),_0x190bda=_0x5aa829[_0x5610ab(0x18e)](_0x390f99=>_0x390f99[_0x5610ab(0x164)]===_0x5610ab(0x16f));return{'valid':_0xde6904['length']===0x0,'errors':_0xde6904,'warnings':_0x190bda};}function checkRule(_0x2dc4c6,_0x190a97,_0x2cf18e){const _0x1be05c=a144_0x3850,_0x196662=[];if(_0x2dc4c6[_0x1be05c(0x14d)][_0x1be05c(0x144)]===0x0)return _0x196662[_0x1be05c(0x15a)]({'level':'error','path':_0x190a97+_0x1be05c(0x167),'code':_0x1be05c(0x165),'message':_0x1be05c(0x184),'location':getLocationFromPath(_0x2cf18e['document'],_0x2cf18e[_0x1be05c(0x18c)],pathToArray(_0x190a97+_0x1be05c(0x167)))}),_0x196662;return _0x196662[_0x1be05c(0x15a)](...checkConditions(_0x2dc4c6[_0x1be05c(0x14d)],_0x190a97,_0x2cf18e)),_0x196662;}function checkConditions(_0x35a78e,_0x4e928,_0x3f509a){const _0x18e173=a144_0x3850,_0x2c3811=[];for(let _0x50d0a7=0x0;_0x50d0a7<_0x35a78e['length'];_0x50d0a7++){const _0xd0c526=_0x35a78e[_0x50d0a7],_0x2d71d7=_0x4e928+_0x18e173(0x169)+_0x50d0a7+']';_0x2c3811[_0x18e173(0x15a)](...checkCondition(_0xd0c526,_0x2d71d7,_0x3f509a));}return _0x2c3811;}function checkCondition(_0x34e27a,_0xfa9937,_0x18a103){const _0x313d5e=a144_0x3850,_0x9e69fd=[];if(_0x34e27a[_0x313d5e(0x171)]===_0x313d5e(0x18d)||_0x34e27a[_0x313d5e(0x171)]==='Or')return _0x34e27a['conditions'][_0x313d5e(0x144)]===0x0?_0x9e69fd['push']({'level':_0x313d5e(0x157),'path':_0xfa9937+_0x313d5e(0x167),'code':_0x313d5e(0x165),'message':_0x34e27a[_0x313d5e(0x171)]+_0x313d5e(0x14e),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103['source'],pathToArray(_0xfa9937+_0x313d5e(0x167)))}):_0x9e69fd[_0x313d5e(0x15a)]({'level':'error','path':_0xfa9937,'code':'NESTED_CONDITION_GROUP','message':_0x34e27a['type']+_0x313d5e(0x177)+_0x313d5e(0x175)+_0x313d5e(0x150),'location':getLocationFromPath(_0x18a103['document'],_0x18a103[_0x313d5e(0x18c)],pathToArray(_0xfa9937))}),_0x9e69fd;if(_0x34e27a[_0x313d5e(0x171)]===_0x313d5e(0x142)||_0x34e27a[_0x313d5e(0x171)]===_0x313d5e(0x143)){const _0x2ce2eb=_0x34e27a,_0x2b4ede=_0x2ce2eb[_0x313d5e(0x18c)],_0x30be2b=_0x2ce2eb[_0x313d5e(0x173)],_0x27b5ef=_0x2b4ede||_0x30be2b;(!_0x2ce2eb[_0x313d5e(0x17d)]||_0x2ce2eb[_0x313d5e(0x17d)]==='')&&(!_0x27b5ef&&_0x9e69fd['push']({'level':'error','path':_0xfa9937+_0x313d5e(0x176),'code':_0x313d5e(0x15f),'message':_0x313d5e(0x16c),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103['source'],pathToArray(_0xfa9937+_0x313d5e(0x176)))}));_0x2ce2eb[_0x313d5e(0x18e)]&&_0x9e69fd[_0x313d5e(0x15a)](...checkRule(_0x2ce2eb[_0x313d5e(0x18e)],_0xfa9937+'.filter',_0x18a103));if(_0x2ce2eb[_0x313d5e(0x18c)]){const _0x212daa=_0x2ce2eb[_0x313d5e(0x17d)]&&_0x2ce2eb[_0x313d5e(0x17d)]!=='';_0x212daa&&!_0x2ce2eb[_0x313d5e(0x18e)]&&_0x9e69fd['push']({'level':_0x313d5e(0x157),'path':_0xfa9937+_0x313d5e(0x15b),'code':_0x313d5e(0x149),'message':_0x313d5e(0x182)+_0x2ce2eb['source']+_0x313d5e(0x174)+_0x2ce2eb[_0x313d5e(0x17d)]+'\x27\x20'+_0x313d5e(0x17c)+_0x313d5e(0x154)+_0x313d5e(0x17f),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103['source'],pathToArray(_0xfa9937+_0x313d5e(0x15b)))}),_0x212daa&&_0x2ce2eb['filter']&&_0x9e69fd[_0x313d5e(0x15a)]({'level':'warning','path':_0xfa9937+_0x313d5e(0x176),'code':_0x313d5e(0x155),'message':'Attribute\x20\x27'+_0x2ce2eb['attribute']+_0x313d5e(0x151)+_0x313d5e(0x18a),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103[_0x313d5e(0x18c)],pathToArray(_0xfa9937+_0x313d5e(0x176)))});}}return _0x9e69fd;}
1
+ (function(_0xb0d628,_0x1da98d){const _0x11a9b5=a144_0x173e,_0x4ea578=_0xb0d628();while(!![]){try{const _0x531061=parseInt(_0x11a9b5(0x1a3))/0x1*(-parseInt(_0x11a9b5(0x191))/0x2)+-parseInt(_0x11a9b5(0x199))/0x3*(parseInt(_0x11a9b5(0x1af))/0x4)+-parseInt(_0x11a9b5(0x1bc))/0x5+parseInt(_0x11a9b5(0x18f))/0x6+-parseInt(_0x11a9b5(0x1ca))/0x7*(parseInt(_0x11a9b5(0x19c))/0x8)+-parseInt(_0x11a9b5(0x1cd))/0x9+parseInt(_0x11a9b5(0x1b7))/0xa*(parseInt(_0x11a9b5(0x19f))/0xb);if(_0x531061===_0x1da98d)break;else _0x4ea578['push'](_0x4ea578['shift']());}catch(_0x3d9606){_0x4ea578['push'](_0x4ea578['shift']());}}}(a144_0xfa52,0x66695));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a144_0xfa52(){const _0x44d56e=['type','rule.type','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','Value','\x27\x20with\x20attribute\x20\x27','INVALID_ARRAY_MATCHING','EMPTY_CONDITIONS','INVALID_OPERATOR_TYPE','MISSING_BETWEEN_BOUNDS','3762060DBiMWy','.source','22058mqrWqY','SEGMENT_SCHEMA_ERROR','length','NESTED_CONDITION_GROUP','custom','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','INVALID_RULE_TYPE','Behavior\x20source\x20\x27','3rlzUzG','arrayMatching','rule','8lbOwzv','name','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','274901vPeIop','MISSING_NAME','push','params','59ubVblM','map','endsWith','MISSING_OPERATOR_VALUE','message','source','document','.type','warning','level','issues','validationCode','2591692XduyAR','attribute','MISSING_TIME_UNIT','error','BEHAVIOR_SOURCE_MISSING_FILTER','data','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','MISSING_CONDITIONS','930BSKGRE','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','.operator.value','Attribute\x20name\x20cannot\x20be\x20empty','filter','548160rxzYmm','invalid_value','Attribute\x20\x27','code','.conditions','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','skipSchema','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','includes','path','.attribute','aggregation','2906519yIGXDL','success','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','6373917ZkHqKx','conditions'];a144_0xfa52=function(){return _0x44d56e;};return a144_0xfa52();}export function validateSegmentDef(_0x1f57d3,_0x819756={},_0x34ddcc={}){const _0x427363=a144_0x173e;if(_0x34ddcc[_0x427363(0x1c4)])return runSemanticChecks(_0x1f57d3,_0x819756);const _0x16f40a=SegmentDefSchema['safeParse'](_0x1f57d3);if(_0x16f40a[_0x427363(0x1cb)])return runSemanticChecks(_0x16f40a[_0x427363(0x1b4)],_0x819756);return zodErrorsToValidationResult(_0x16f40a[_0x427363(0x1b2)],_0x819756);}export function validateRuleDef(_0x4cf0fd,_0x27c1e6,_0x1a0b63){const _0x1afe41=a144_0x173e;if(!_0x4cf0fd)return[];const _0x2a998b=RuleDefSchema['safeParse'](_0x4cf0fd);if(_0x2a998b[_0x1afe41(0x1cb)])return checkRule(_0x2a998b[_0x1afe41(0x1b4)],_0x27c1e6,_0x1a0b63);const _0x50a7f5=flattenZodIssues(_0x2a998b[_0x1afe41(0x1b2)][_0x1afe41(0x1ad)]);return _0x50a7f5[_0x1afe41(0x1a4)](_0x32e00c=>{const _0x252de7=_0x1afe41,_0xd8f6e9=formatZodPath(_0x32e00c[_0x252de7(0x1c7)]),_0x467481=_0xd8f6e9?_0x27c1e6+'.'+_0xd8f6e9:_0x27c1e6,_0x1fe0ff=mapZodIssueToCode(_0x32e00c,_0xd8f6e9),_0x148b6c=getLocationFromPath(_0x1a0b63[_0x252de7(0x1a9)],_0x1a0b63['source'],pathToArray(_0x467481));return{'level':_0x252de7(0x1b2),'path':_0x467481,'code':_0x1fe0ff,'message':_0x32e00c[_0x252de7(0x1a7)],..._0x148b6c&&{'location':_0x148b6c}};});}function zodErrorsToValidationResult(_0x10bd25,_0xe7df3e){const _0x5b8565=a144_0x173e,_0x1c4850=flattenZodIssues(_0x10bd25[_0x5b8565(0x1ad)]),_0x3761ab=_0x1c4850[_0x5b8565(0x1a4)](_0x51151e=>{const _0x562df2=_0x5b8565,_0x3cf2fa=formatZodPath(_0x51151e[_0x562df2(0x1c7)]),_0x519c39=mapZodIssueToCode(_0x51151e,_0x3cf2fa),_0xcdd37e=getLocationFromPath(_0xe7df3e[_0x562df2(0x1a9)],_0xe7df3e['source'],_0x51151e['path'][_0x562df2(0x1a4)](_0x4d7778=>typeof _0x4d7778==='symbol'?String(_0x4d7778):_0x4d7778));return{'level':_0x562df2(0x1b2),'path':_0x3cf2fa,'code':_0x519c39,'message':_0x51151e['message'],..._0xcdd37e&&{'location':_0xcdd37e}};});return{'valid':![],'errors':_0x3761ab,'warnings':[]};}function mapZodIssueToCode(_0x1c1ea6,_0x587df4){const _0x2418a1=a144_0x173e,_0x3d6545=_0x1c1ea6['code']===_0x2418a1(0x195)?_0x1c1ea6[_0x2418a1(0x1a2)]:undefined;if(_0x587df4===_0x2418a1(0x19d))return _0x2418a1(0x1a0);if(_0x587df4===_0x2418a1(0x187)||_0x587df4[_0x2418a1(0x1a5)](_0x2418a1(0x1aa))){if(_0x1c1ea6[_0x2418a1(0x1bf)]===_0x2418a1(0x1bd)){if(_0x587df4==='rule.type'||_0x587df4['match'](/\.conditions\[\d+\]\.type$/))return _0x2418a1(0x197);}}if(_0x587df4[_0x2418a1(0x1a5)]('.operator.type'))return _0x2418a1(0x18d);if(_0x587df4[_0x2418a1(0x1a5)](_0x2418a1(0x1b9)))return _0x2418a1(0x1a6);if(_0x3d6545?.[_0x2418a1(0x1ae)]===_0x2418a1(0x18e))return _0x2418a1(0x18e);if(_0x3d6545?.[_0x2418a1(0x1ae)]==='MISSING_TIME_UNIT')return _0x2418a1(0x1b1);if(_0x587df4[_0x2418a1(0x1a5)](_0x2418a1(0x1c0))||_0x587df4==='conditions')return _0x2418a1(0x1b6);if(_0x587df4[_0x2418a1(0x1c6)](_0x2418a1(0x19a)))return _0x2418a1(0x18b);if(_0x587df4[_0x2418a1(0x1a5)]('.segment'))return'MISSING_SEGMENT_REFERENCE';return _0x2418a1(0x192);}function a144_0x173e(_0x4707ab,_0x53f494){_0x4707ab=_0x4707ab-0x185;const _0xfa5222=a144_0xfa52();let _0x173edd=_0xfa5222[_0x4707ab];return _0x173edd;}function runSemanticChecks(_0xecb60a,_0x5ca4e1){const _0x5ae67b=a144_0x173e,_0xf4800b=[];_0xecb60a[_0x5ae67b(0x19b)]&&_0xf4800b['push'](...checkRule(_0xecb60a[_0x5ae67b(0x19b)],_0x5ae67b(0x19b),_0x5ca4e1));const _0x3d069e=_0xf4800b[_0x5ae67b(0x1bb)](_0x35086e=>_0x35086e[_0x5ae67b(0x1ac)]===_0x5ae67b(0x1b2)),_0x277e0f=_0xf4800b[_0x5ae67b(0x1bb)](_0x4ec391=>_0x4ec391[_0x5ae67b(0x1ac)]===_0x5ae67b(0x1ab));return{'valid':_0x3d069e[_0x5ae67b(0x193)]===0x0,'errors':_0x3d069e,'warnings':_0x277e0f};}function checkRule(_0x437a21,_0x1c42c5,_0x567e2a){const _0x5dfce2=a144_0x173e,_0xba30ea=[];if(_0x437a21[_0x5dfce2(0x185)][_0x5dfce2(0x193)]===0x0)return _0xba30ea[_0x5dfce2(0x1a1)]({'level':_0x5dfce2(0x1b2),'path':_0x1c42c5+'.conditions','code':'EMPTY_CONDITIONS','message':_0x5dfce2(0x1cc),'location':getLocationFromPath(_0x567e2a[_0x5dfce2(0x1a9)],_0x567e2a[_0x5dfce2(0x1a8)],pathToArray(_0x1c42c5+_0x5dfce2(0x1c0)))}),_0xba30ea;return _0xba30ea[_0x5dfce2(0x1a1)](...checkConditions(_0x437a21[_0x5dfce2(0x185)],_0x1c42c5,_0x567e2a)),_0xba30ea;}function checkConditions(_0x114c93,_0x7288c1,_0xea5aa0){const _0xb89e0=a144_0x173e,_0x246631=[];for(let _0x5b6bdf=0x0;_0x5b6bdf<_0x114c93[_0xb89e0(0x193)];_0x5b6bdf++){const _0xfe257d=_0x114c93[_0x5b6bdf],_0x443da4=_0x7288c1+'.conditions['+_0x5b6bdf+']';_0x246631['push'](...checkCondition(_0xfe257d,_0x443da4,_0xea5aa0));}return _0x246631;}function checkCondition(_0xdbcd85,_0x485277,_0x14d810){const _0x3648c0=a144_0x173e,_0x37f1c3=[];if(_0xdbcd85[_0x3648c0(0x186)]==='And'||_0xdbcd85[_0x3648c0(0x186)]==='Or')return _0xdbcd85[_0x3648c0(0x185)][_0x3648c0(0x193)]===0x0?_0x37f1c3[_0x3648c0(0x1a1)]({'level':'error','path':_0x485277+_0x3648c0(0x1c0),'code':_0x3648c0(0x18c),'message':_0xdbcd85['type']+_0x3648c0(0x1c3),'location':getLocationFromPath(_0x14d810[_0x3648c0(0x1a9)],_0x14d810[_0x3648c0(0x1a8)],pathToArray(_0x485277+_0x3648c0(0x1c0)))}):_0x37f1c3[_0x3648c0(0x1a1)]({'level':_0x3648c0(0x1b2),'path':_0x485277,'code':_0x3648c0(0x194),'message':_0xdbcd85[_0x3648c0(0x186)]+'\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20'+_0x3648c0(0x196)+_0x3648c0(0x1c1),'location':getLocationFromPath(_0x14d810[_0x3648c0(0x1a9)],_0x14d810['source'],pathToArray(_0x485277))}),_0x37f1c3;if(_0xdbcd85[_0x3648c0(0x186)]===_0x3648c0(0x189)||_0xdbcd85['type']==='Behavior'){const _0x4cff19=_0xdbcd85,_0x42945a=_0x4cff19[_0x3648c0(0x1a8)],_0x1d3e4a=_0x4cff19[_0x3648c0(0x1c9)],_0x4a5888=_0x42945a||_0x1d3e4a;(!_0x4cff19['attribute']||_0x4cff19['attribute']==='')&&(!_0x4a5888&&_0x37f1c3['push']({'level':_0x3648c0(0x1b2),'path':_0x485277+_0x3648c0(0x1c8),'code':'EMPTY_ATTRIBUTE','message':_0x3648c0(0x1ba),'location':getLocationFromPath(_0x14d810[_0x3648c0(0x1a9)],_0x14d810[_0x3648c0(0x1a8)],pathToArray(_0x485277+'.attribute'))}));_0x4cff19[_0x3648c0(0x1bb)]&&_0x37f1c3[_0x3648c0(0x1a1)](...checkRule(_0x4cff19['filter'],_0x485277+'.filter',_0x14d810));if(_0x4cff19[_0x3648c0(0x1a8)]){const _0x1346e2=_0x4cff19[_0x3648c0(0x1b0)]&&_0x4cff19[_0x3648c0(0x1b0)]!=='';_0x1346e2&&!_0x4cff19[_0x3648c0(0x1bb)]&&_0x37f1c3[_0x3648c0(0x1a1)]({'level':_0x3648c0(0x1b2),'path':_0x485277+_0x3648c0(0x190),'code':_0x3648c0(0x1b3),'message':_0x3648c0(0x198)+_0x4cff19[_0x3648c0(0x1a8)]+_0x3648c0(0x18a)+_0x4cff19['attribute']+'\x27\x20'+_0x3648c0(0x19e)+_0x3648c0(0x1b8)+_0x3648c0(0x188),'location':getLocationFromPath(_0x14d810[_0x3648c0(0x1a9)],_0x14d810['source'],pathToArray(_0x485277+_0x3648c0(0x190)))}),_0x1346e2&&_0x4cff19[_0x3648c0(0x1bb)]&&_0x37f1c3[_0x3648c0(0x1a1)]({'level':_0x3648c0(0x1ab),'path':_0x485277+_0x3648c0(0x1c8),'code':_0x3648c0(0x1c5),'message':_0x3648c0(0x1be)+_0x4cff19['attribute']+_0x3648c0(0x1c2)+_0x3648c0(0x1b5),'location':getLocationFromPath(_0x14d810['document'],_0x14d810[_0x3648c0(0x1a8)],pathToArray(_0x485277+'.attribute'))});}}return _0x37f1c3;}
@@ -1 +1 @@
1
- (function(_0x2badb4,_0x39f078){const _0x1a48ee=a145_0x536d,_0x4e4b7b=_0x2badb4();while(!![]){try{const _0x5c6461=parseInt(_0x1a48ee(0x192))/0x1+parseInt(_0x1a48ee(0x199))/0x2*(parseInt(_0x1a48ee(0x18b))/0x3)+parseInt(_0x1a48ee(0x1b0))/0x4+-parseInt(_0x1a48ee(0x19c))/0x5*(parseInt(_0x1a48ee(0x19b))/0x6)+-parseInt(_0x1a48ee(0x19e))/0x7+-parseInt(_0x1a48ee(0x1a2))/0x8*(-parseInt(_0x1a48ee(0x1ba))/0x9)+-parseInt(_0x1a48ee(0x18c))/0xa*(parseInt(_0x1a48ee(0x1af))/0xb);if(_0x5c6461===_0x39f078)break;else _0x4e4b7b['push'](_0x4e4b7b['shift']());}catch(_0x435bd7){_0x4e4b7b['push'](_0x4e4b7b['shift']());}}}(a145_0x2f1b,0x7f9b4));import a145_0x17c8d9 from'path';function a145_0x2f1b(){const _0x4fb3e7=['segmentName','2712108dtXbSM','readFile','tdx.json','resourceType','8UQWsNC','File\x20not\x20found:\x20','file_not_found','basename','trim','message','directory','string','Not\x20a\x20YAML\x20file:\x20','File\x20not\x20found','isFile','error','join','16137PSpoXB','2845468BdXzgK','parent_segment','dirname','No\x20tdx.json\x20found\x20for\x20file:\x20','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','invalid_yaml','journey','extname','parentSegment','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','5310198UOwJmd','cwd','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','isScoped','stat','folderPath','root','102gnKALi','6110PJiDJO','type','no_config','parse','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','Parent\x20segment\x20not\x20specified','362814ViQuOn','replace','isDirectory','configDir','match','file','parent_name','11164OkDSoq','scopedFolderPath','6vjRYKm','237670UxTmQt'];a145_0x2f1b=function(){return _0x4fb3e7;};return a145_0x2f1b();}import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x7cfa9a){const _0x48c5f7=a145_0x536d;return _0x7cfa9a[_0x48c5f7(0x18d)]!=='error';}export function isScopedResolution(_0x45e958){const _0x46bd15=a145_0x536d;return _0x45e958[_0x46bd15(0x18d)]==='directory'||_0x45e958[_0x46bd15(0x18d)]==='file'||_0x45e958[_0x46bd15(0x18d)]==='context';}function a145_0x536d(_0x3f21ee,_0x35d51d){_0x3f21ee=_0x3f21ee-0x189;const _0x2f1b6c=a145_0x2f1b();let _0x536d41=_0x2f1b6c[_0x3f21ee];return _0x536d41;}export function getScopedDetails(_0x3b43e7){const _0xb4babf=a145_0x536d;if(isScopedResolution(_0x3b43e7))return{'isScoped':_0x3b43e7['isScoped'],'scopedFolderPath':_0x3b43e7[_0xb4babf(0x19a)]};return undefined;}async function findTdxConfigAsync(_0x2d9764,_0x2109e1){const _0x2f42f8=a145_0x536d;let _0x493a35=a145_0x17c8d9['resolve'](_0x2d9764);const _0x4f5bbb=a145_0x17c8d9['parse'](_0x493a35)[_0x2f42f8(0x18a)];while(_0x493a35!==_0x4f5bbb){const _0xff3e09=a145_0x17c8d9[_0x2f42f8(0x1ae)](_0x493a35,_0x2f42f8(0x1a0));if(await _0x2109e1['exists'](_0xff3e09))try{const _0xa8233a=await _0x2109e1[_0x2f42f8(0x19f)](_0xff3e09),_0x1816f4=JSON[_0x2f42f8(0x18f)](_0xa8233a);if(_0x1816f4[_0x2f42f8(0x1b1)]&&typeof _0x1816f4[_0x2f42f8(0x1b1)]===_0x2f42f8(0x1a9))return{'configPath':_0xff3e09,'configDir':_0x493a35,'parentSegment':_0x1816f4[_0x2f42f8(0x1b1)]};}catch{}_0x493a35=a145_0x17c8d9[_0x2f42f8(0x1b2)](_0x493a35);}return null;}function calculateScopedPath(_0xe3e94a,_0x38f578){const _0x138ba1=a145_0x536d,_0x4bf90c=a145_0x17c8d9['relative'](_0x38f578,_0xe3e94a),_0x210256=_0x4bf90c!==''&&_0x4bf90c!=='.'&&!_0x4bf90c['startsWith']('..');return{'isScoped':_0x210256,'scopedFolderPath':_0x210256?_0x4bf90c[_0x138ba1(0x193)](/\\/g,'/'):''};}export async function resolveTarget(_0x151d88){const _0x4efe03=a145_0x536d,{arg:_0x4c2468,contextParent:_0x2fa81f,cwd:cwd=process[_0x4efe03(0x1bb)](),fs:fs=nodeFileSystem}=_0x151d88;if(_0x4c2468&&isYamlFilePath(_0x4c2468))try{const _0x2d91f3=await resolveYamlFilePath(_0x4c2468,fs),_0xa7d27=a145_0x17c8d9['resolve'](_0x4c2468),_0x321f5b=a145_0x17c8d9[_0x4efe03(0x1b2)](_0xa7d27),_0xa592c0=await findTdxConfigAsync(_0x321f5b,fs);if(!_0xa592c0){if(_0x2fa81f){const _0x1bb21b=a145_0x17c8d9[_0x4efe03(0x1b2)](_0xa7d27);return{'type':'file','parentName':_0x2fa81f,'targetDir':_0x1bb21b,'configRoot':_0x1bb21b,'filePath':_0xa7d27,'resourceName':_0x2d91f3[_0x4efe03(0x19d)],'folderPath':_0x2d91f3[_0x4efe03(0x189)],'resourceType':_0x2d91f3[_0x4efe03(0x1a1)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4efe03(0x1ad),'errorCode':'no_config','message':_0x4efe03(0x1b3)+_0x4c2468,'arg':_0x4c2468,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x83eba6=calculateScopedPath(_0x321f5b,_0xa592c0[_0x4efe03(0x195)]);return{'type':_0x4efe03(0x197),'parentName':_0xa592c0['parentSegment'],'targetDir':_0xa592c0[_0x4efe03(0x195)],'configRoot':_0xa592c0[_0x4efe03(0x195)],'filePath':_0xa7d27,'resourceName':_0x2d91f3['segmentName'],'folderPath':_0x2d91f3['folderPath'],'resourceType':_0x2d91f3[_0x4efe03(0x1a1)],'isScoped':_0x83eba6[_0x4efe03(0x1bd)],'scopedFolderPath':_0x83eba6[_0x4efe03(0x19a)]};}catch(_0x4cb703){const _0x25e353=_0x4cb703 instanceof Error?_0x4cb703[_0x4efe03(0x1a7)]:String(_0x4cb703);if(_0x25e353['includes'](_0x4efe03(0x1ab)))return{'type':_0x4efe03(0x1ad),'errorCode':_0x4efe03(0x1a4),'message':_0x4efe03(0x1a3)+_0x4c2468,'arg':_0x4c2468};if(_0x25e353['includes']('No\x20tdx.json\x20found')){if(_0x2fa81f){const _0x5c9b5d=a145_0x17c8d9['resolve'](_0x4c2468);if(await fs['exists'](_0x5c9b5d)){const _0x340f49=a145_0x17c8d9[_0x4efe03(0x1b2)](_0x5c9b5d),_0x3bb6ca=await fs[_0x4efe03(0x19f)](_0x5c9b5d),_0x528636=_0x3bb6ca[_0x4efe03(0x196)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xdc0fe1=_0x3bb6ca[_0x4efe03(0x196)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3da213=_0x528636?_0x528636[0x1]['trim']():a145_0x17c8d9[_0x4efe03(0x1a5)](_0x4c2468,a145_0x17c8d9[_0x4efe03(0x1b7)](_0x4c2468)),_0x3c3d0d=_0xdc0fe1&&_0xdc0fe1[0x1][_0x4efe03(0x1a6)]()===_0x4efe03(0x1b6)?_0x4efe03(0x1b6):'segment';return{'type':_0x4efe03(0x197),'parentName':_0x2fa81f,'targetDir':_0x340f49,'configRoot':_0x340f49,'filePath':_0x5c9b5d,'resourceName':_0x3da213,'folderPath':'','resourceType':_0x3c3d0d,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x4efe03(0x18e),'message':_0x4efe03(0x1b3)+_0x4c2468,'arg':_0x4c2468,'helpText':_0x4efe03(0x1b4)};}return{'type':_0x4efe03(0x1ad),'errorCode':_0x4efe03(0x1b5),'message':_0x25e353,'arg':_0x4c2468};}if(_0x4c2468){const _0x3abf06=a145_0x17c8d9['resolve'](cwd,_0x4c2468);let _0x524456=null;try{_0x524456=await fs[_0x4efe03(0x1be)](_0x3abf06);}catch{}if(_0x524456?.[_0x4efe03(0x194)]()){const _0x254aec=await findTdxConfigAsync(_0x3abf06,fs);if(_0x254aec){const _0x354dc8=calculateScopedPath(_0x3abf06,_0x254aec[_0x4efe03(0x195)]);return{'type':_0x4efe03(0x1a8),'parentName':_0x254aec[_0x4efe03(0x1b8)],'targetDir':_0x3abf06,'configRoot':_0x254aec[_0x4efe03(0x195)],'isScoped':_0x354dc8[_0x4efe03(0x1bd)],'scopedFolderPath':_0x354dc8[_0x4efe03(0x19a)]};}if(_0x2fa81f)return{'type':_0x4efe03(0x1a8),'parentName':_0x2fa81f,'targetDir':_0x3abf06,'configRoot':_0x3abf06,'isScoped':![],'scopedFolderPath':''};return{'type':_0x4efe03(0x1ad),'errorCode':_0x4efe03(0x18e),'message':_0x4efe03(0x190)+_0x4c2468,'arg':_0x4c2468,'helpText':_0x4efe03(0x1b4)};}if(_0x524456?.[_0x4efe03(0x1ac)]())return{'type':_0x4efe03(0x1ad),'errorCode':'invalid_yaml','message':_0x4efe03(0x1aa)+_0x4c2468,'arg':_0x4c2468,'helpText':_0x4efe03(0x1b9)};const _0x3cb12f=sanitizeFileName(_0x4c2468),_0x5ee12d=getSegmentRootDir(_0x3cb12f,cwd);return{'type':_0x4efe03(0x198),'parentName':_0x4c2468,'targetDir':_0x5ee12d,'configRoot':_0x5ee12d};}const _0x392c3c=await findTdxConfigAsync(cwd,fs);if(_0x392c3c){const _0x8cf023=calculateScopedPath(cwd,_0x392c3c[_0x4efe03(0x195)]);return{'type':'context','parentName':_0x392c3c[_0x4efe03(0x1b8)],'targetDir':cwd,'configRoot':_0x392c3c['configDir'],'isScoped':_0x8cf023[_0x4efe03(0x1bd)],'scopedFolderPath':_0x8cf023['scopedFolderPath']};}if(_0x2fa81f){const _0x482d3f=sanitizeFileName(_0x2fa81f),_0x88339e=getSegmentRootDir(_0x482d3f,cwd);return{'type':'context','parentName':_0x2fa81f,'targetDir':_0x88339e,'configRoot':_0x88339e,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':_0x4efe03(0x191),'helpText':_0x4efe03(0x1bc)};}
1
+ function a145_0x4a7d(){const _0x3c7fee=['File\x20not\x20found:\x20','match','2940VwbiuE','26112ydilMB','isScoped','resourceType','type','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','configDir','No\x20tdx.json\x20found\x20for\x20file:\x20','parse','parent_segment','segmentName','directory','basename','relative','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','tdx.json','55825sloCoj','scopedFolderPath','663835RYfiqu','error','join','1174206KGCZkC','folderPath','2909115sBKuEf','exists','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','message','root','journey','Not\x20a\x20YAML\x20file:\x20','Parent\x20segment\x20not\x20specified','parent_name','startsWith','invalid_yaml','no_parent','3070ipeaoY','461967SxYPdv','isFile','context','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','no_config','readFile','includes','trim','dirname','string','file','21zgRIli','66AocFUq','replace','parentSegment','564952AAjZEn','extname','resolve'];a145_0x4a7d=function(){return _0x3c7fee;};return a145_0x4a7d();}function a145_0xfa0c(_0x41a204,_0x5598b8){_0x41a204=_0x41a204-0xce;const _0x4a7d76=a145_0x4a7d();let _0xfa0c5d=_0x4a7d76[_0x41a204];return _0xfa0c5d;}(function(_0x4c6a58,_0x2f928c){const _0x2d6654=a145_0xfa0c,_0x5e367e=_0x4c6a58();while(!![]){try{const _0x2ee015=parseInt(_0x2d6654(0xfe))/0x1+-parseInt(_0x2d6654(0xef))/0x2+parseInt(_0x2d6654(0xd1))/0x3*(-parseInt(_0x2d6654(0xd5))/0x4)+parseInt(_0x2d6654(0xec))/0x5*(parseInt(_0x2d6654(0xd2))/0x6)+parseInt(_0x2d6654(0xda))/0x7*(-parseInt(_0x2d6654(0xdb))/0x8)+parseInt(_0x2d6654(0xf1))/0x9+parseInt(_0x2d6654(0xfd))/0xa*(parseInt(_0x2d6654(0xea))/0xb);if(_0x2ee015===_0x2f928c)break;else _0x5e367e['push'](_0x5e367e['shift']());}catch(_0x11599a){_0x5e367e['push'](_0x5e367e['shift']());}}}(a145_0x4a7d,0xd13b7));import a145_0x826236 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x1ce933){const _0x16a4f5=a145_0xfa0c;return _0x1ce933[_0x16a4f5(0xde)]!=='error';}export function isScopedResolution(_0x366cce){const _0x2e9ccc=a145_0xfa0c;return _0x366cce[_0x2e9ccc(0xde)]==='directory'||_0x366cce[_0x2e9ccc(0xde)]===_0x2e9ccc(0xd0)||_0x366cce[_0x2e9ccc(0xde)]===_0x2e9ccc(0x100);}export function getScopedDetails(_0x5c314a){const _0x2c58a8=a145_0xfa0c;if(isScopedResolution(_0x5c314a))return{'isScoped':_0x5c314a[_0x2c58a8(0xdc)],'scopedFolderPath':_0x5c314a[_0x2c58a8(0xeb)]};return undefined;}async function findTdxConfigAsync(_0x2f7ea2,_0x182614){const _0x6d6d7c=a145_0xfa0c;let _0x219c59=a145_0x826236[_0x6d6d7c(0xd7)](_0x2f7ea2);const _0x4007aa=a145_0x826236['parse'](_0x219c59)[_0x6d6d7c(0xf5)];while(_0x219c59!==_0x4007aa){const _0x4759e1=a145_0x826236[_0x6d6d7c(0xee)](_0x219c59,_0x6d6d7c(0xe9));if(await _0x182614[_0x6d6d7c(0xf2)](_0x4759e1))try{const _0x424296=await _0x182614[_0x6d6d7c(0x103)](_0x4759e1),_0x4e655c=JSON[_0x6d6d7c(0xe2)](_0x424296);if(_0x4e655c[_0x6d6d7c(0xe3)]&&typeof _0x4e655c[_0x6d6d7c(0xe3)]===_0x6d6d7c(0xcf))return{'configPath':_0x4759e1,'configDir':_0x219c59,'parentSegment':_0x4e655c[_0x6d6d7c(0xe3)]};}catch{}_0x219c59=a145_0x826236[_0x6d6d7c(0xce)](_0x219c59);}return null;}function calculateScopedPath(_0x526603,_0x5e1052){const _0x41578d=a145_0xfa0c,_0x2b0939=a145_0x826236[_0x41578d(0xe7)](_0x5e1052,_0x526603),_0x1d29a4=_0x2b0939!==''&&_0x2b0939!=='.'&&!_0x2b0939[_0x41578d(0xfa)]('..');return{'isScoped':_0x1d29a4,'scopedFolderPath':_0x1d29a4?_0x2b0939[_0x41578d(0xd3)](/\\/g,'/'):''};}export async function resolveTarget(_0x3210f1){const _0x13a96c=a145_0xfa0c,{arg:_0x1e22d0,contextParent:_0x53eefa,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x3210f1;if(_0x1e22d0&&isYamlFilePath(_0x1e22d0))try{const _0x8f495e=await resolveYamlFilePath(_0x1e22d0,fs),_0x1d6b16=a145_0x826236[_0x13a96c(0xd7)](_0x1e22d0),_0x4d1669=a145_0x826236['dirname'](_0x1d6b16),_0x4bdfbb=await findTdxConfigAsync(_0x4d1669,fs);if(!_0x4bdfbb){if(_0x53eefa){const _0x5de683=a145_0x826236[_0x13a96c(0xce)](_0x1d6b16);return{'type':_0x13a96c(0xd0),'parentName':_0x53eefa,'targetDir':_0x5de683,'configRoot':_0x5de683,'filePath':_0x1d6b16,'resourceName':_0x8f495e[_0x13a96c(0xe4)],'folderPath':_0x8f495e[_0x13a96c(0xf0)],'resourceType':_0x8f495e[_0x13a96c(0xdd)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x13a96c(0xed),'errorCode':_0x13a96c(0x102),'message':_0x13a96c(0xe1)+_0x1e22d0,'arg':_0x1e22d0,'helpText':_0x13a96c(0x101)};}const _0x424f25=calculateScopedPath(_0x4d1669,_0x4bdfbb['configDir']);return{'type':_0x13a96c(0xd0),'parentName':_0x4bdfbb['parentSegment'],'targetDir':_0x4bdfbb[_0x13a96c(0xe0)],'configRoot':_0x4bdfbb[_0x13a96c(0xe0)],'filePath':_0x1d6b16,'resourceName':_0x8f495e[_0x13a96c(0xe4)],'folderPath':_0x8f495e['folderPath'],'resourceType':_0x8f495e[_0x13a96c(0xdd)],'isScoped':_0x424f25[_0x13a96c(0xdc)],'scopedFolderPath':_0x424f25[_0x13a96c(0xeb)]};}catch(_0x25db63){const _0x4c596d=_0x25db63 instanceof Error?_0x25db63[_0x13a96c(0xf4)]:String(_0x25db63);if(_0x4c596d[_0x13a96c(0x104)]('File\x20not\x20found'))return{'type':_0x13a96c(0xed),'errorCode':'file_not_found','message':_0x13a96c(0xd8)+_0x1e22d0,'arg':_0x1e22d0};if(_0x4c596d[_0x13a96c(0x104)]('No\x20tdx.json\x20found')){if(_0x53eefa){const _0x3e0cd1=a145_0x826236[_0x13a96c(0xd7)](_0x1e22d0);if(await fs[_0x13a96c(0xf2)](_0x3e0cd1)){const _0x15e57e=a145_0x826236[_0x13a96c(0xce)](_0x3e0cd1),_0x28b04c=await fs[_0x13a96c(0x103)](_0x3e0cd1),_0x5c1e14=_0x28b04c[_0x13a96c(0xd9)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3b809e=_0x28b04c[_0x13a96c(0xd9)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x19d8d7=_0x5c1e14?_0x5c1e14[0x1][_0x13a96c(0x105)]():a145_0x826236[_0x13a96c(0xe6)](_0x1e22d0,a145_0x826236[_0x13a96c(0xd6)](_0x1e22d0)),_0xa811a=_0x3b809e&&_0x3b809e[0x1][_0x13a96c(0x105)]()===_0x13a96c(0xf6)?_0x13a96c(0xf6):'segment';return{'type':_0x13a96c(0xd0),'parentName':_0x53eefa,'targetDir':_0x15e57e,'configRoot':_0x15e57e,'filePath':_0x3e0cd1,'resourceName':_0x19d8d7,'folderPath':'','resourceType':_0xa811a,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x13a96c(0xed),'errorCode':_0x13a96c(0x102),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x1e22d0,'arg':_0x1e22d0,'helpText':_0x13a96c(0x101)};}return{'type':_0x13a96c(0xed),'errorCode':'invalid_yaml','message':_0x4c596d,'arg':_0x1e22d0};}if(_0x1e22d0){const _0x4b46e8=a145_0x826236[_0x13a96c(0xd7)](cwd,_0x1e22d0);let _0x90142f=null;try{_0x90142f=await fs['stat'](_0x4b46e8);}catch{}if(_0x90142f?.['isDirectory']()){const _0x5769ee=await findTdxConfigAsync(_0x4b46e8,fs);if(_0x5769ee){const _0x425f4a=calculateScopedPath(_0x4b46e8,_0x5769ee[_0x13a96c(0xe0)]);return{'type':'directory','parentName':_0x5769ee[_0x13a96c(0xd4)],'targetDir':_0x4b46e8,'configRoot':_0x5769ee[_0x13a96c(0xe0)],'isScoped':_0x425f4a[_0x13a96c(0xdc)],'scopedFolderPath':_0x425f4a[_0x13a96c(0xeb)]};}if(_0x53eefa)return{'type':_0x13a96c(0xe5),'parentName':_0x53eefa,'targetDir':_0x4b46e8,'configRoot':_0x4b46e8,'isScoped':![],'scopedFolderPath':''};return{'type':_0x13a96c(0xed),'errorCode':_0x13a96c(0x102),'message':_0x13a96c(0xe8)+_0x1e22d0,'arg':_0x1e22d0,'helpText':_0x13a96c(0x101)};}if(_0x90142f?.[_0x13a96c(0xff)]())return{'type':_0x13a96c(0xed),'errorCode':_0x13a96c(0xfb),'message':_0x13a96c(0xf7)+_0x1e22d0,'arg':_0x1e22d0,'helpText':_0x13a96c(0xdf)};const _0x3350d2=sanitizeFileName(_0x1e22d0),_0x1aa825=getSegmentRootDir(_0x3350d2,cwd);return{'type':_0x13a96c(0xf9),'parentName':_0x1e22d0,'targetDir':_0x1aa825,'configRoot':_0x1aa825};}const _0x50e630=await findTdxConfigAsync(cwd,fs);if(_0x50e630){const _0x2c02c6=calculateScopedPath(cwd,_0x50e630[_0x13a96c(0xe0)]);return{'type':_0x13a96c(0x100),'parentName':_0x50e630['parentSegment'],'targetDir':cwd,'configRoot':_0x50e630[_0x13a96c(0xe0)],'isScoped':_0x2c02c6[_0x13a96c(0xdc)],'scopedFolderPath':_0x2c02c6[_0x13a96c(0xeb)]};}if(_0x53eefa){const _0x184814=sanitizeFileName(_0x53eefa),_0x38c39e=getSegmentRootDir(_0x184814,cwd);return{'type':_0x13a96c(0x100),'parentName':_0x53eefa,'targetDir':_0x38c39e,'configRoot':_0x38c39e,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x13a96c(0xed),'errorCode':_0x13a96c(0xfc),'message':_0x13a96c(0xf8),'helpText':_0x13a96c(0xf3)};}
@@ -1 +1 @@
1
- const a146_0x564c64=a146_0x5e60;(function(_0x56ecf4,_0x398f0a){const _0x414ac5=a146_0x5e60,_0xe53207=_0x56ecf4();while(!![]){try{const _0x590cff=-parseInt(_0x414ac5(0x17c))/0x1+parseInt(_0x414ac5(0x177))/0x2*(-parseInt(_0x414ac5(0x167))/0x3)+-parseInt(_0x414ac5(0x173))/0x4*(-parseInt(_0x414ac5(0x16a))/0x5)+parseInt(_0x414ac5(0x17b))/0x6+-parseInt(_0x414ac5(0x16c))/0x7*(-parseInt(_0x414ac5(0x16f))/0x8)+-parseInt(_0x414ac5(0x179))/0x9+parseInt(_0x414ac5(0x180))/0xa*(parseInt(_0x414ac5(0x181))/0xb);if(_0x590cff===_0x398f0a)break;else _0xe53207['push'](_0xe53207['shift']());}catch(_0x17508a){_0xe53207['push'](_0xe53207['shift']());}}}(a146_0x5b89,0x37610));import{existsSync,readFileSync}from'fs';import a146_0x390dd from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a146_0x564c64(0x175);export function findTdxConfigPath(_0x35c738=process[a146_0x564c64(0x171)]()){const _0x36faab=a146_0x564c64;let _0x3e73db=a146_0x390dd[_0x36faab(0x174)](_0x35c738);const _0x1fd8d7=a146_0x390dd[_0x36faab(0x17f)](_0x3e73db)[_0x36faab(0x166)];while(_0x3e73db!==_0x1fd8d7){const _0x2bbda3=a146_0x390dd[_0x36faab(0x178)](_0x3e73db,TDX_CONFIG_FILE);if(existsSync(_0x2bbda3))return _0x2bbda3;_0x3e73db=a146_0x390dd[_0x36faab(0x16b)](_0x3e73db);}return null;}export function loadTdxConfig(_0x45d482){const _0x33c571=a146_0x564c64,_0x203cfe=readFileSync(_0x45d482,_0x33c571(0x17d));let _0x1bc323;try{_0x1bc323=JSON[_0x33c571(0x17f)](_0x203cfe);}catch{throw new Error(_0x33c571(0x17a)+_0x45d482);}if(!_0x1bc323||typeof _0x1bc323!=='object')throw new Error(_0x33c571(0x17e));const _0x1f5f47=_0x1bc323,_0x1be670=_0x1f5f47['parent_segment']&&typeof _0x1f5f47[_0x33c571(0x165)]==='string',_0x2360db=_0x1f5f47['engage_workspace']&&typeof _0x1f5f47[_0x33c571(0x176)]===_0x33c571(0x16d);if(!_0x1be670&&!_0x2360db)throw new Error(_0x33c571(0x170));const _0x3c41f0={};return _0x1be670&&(_0x3c41f0[_0x33c571(0x165)]=_0x1f5f47['parent_segment']),_0x2360db&&(_0x3c41f0['engage_workspace']=_0x1f5f47['engage_workspace']),_0x3c41f0;}export function findTdxConfig(_0x1eb377=process['cwd']()){const _0x390cc1=a146_0x564c64,_0x28d09b=findTdxConfigPath(_0x1eb377);if(!_0x28d09b)throw new Error(_0x390cc1(0x16e));const _0x367099=loadTdxConfig(_0x28d09b),_0x1932b0=a146_0x390dd[_0x390cc1(0x16b)](_0x28d09b);return{'config':_0x367099,'configPath':_0x28d09b,'configDir':_0x1932b0};}export function tryFindTdxConfig(_0x17c1e2){try{return findTdxConfig(_0x17c1e2);}catch{return null;}}export function getSegmentRootDir(_0x5b1e32,_0x795a92=process[a146_0x564c64(0x171)]()){return a146_0x390dd['join'](_0x795a92,SEGMENTS_DIR,_0x5b1e32);}export function getTdxConfigPath(_0x13fc09,_0x5ced67=process['cwd']()){const _0x1ec0da=a146_0x564c64;return a146_0x390dd[_0x1ec0da(0x178)](getSegmentRootDir(_0x13fc09,_0x5ced67),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x278d68,_0x1a342b){const _0x522c10=a146_0x564c64,_0x41dc71=a146_0x390dd[_0x522c10(0x174)](_0x278d68),_0x361d56=a146_0x390dd[_0x522c10(0x169)](_0x1a342b,_0x41dc71);if(_0x361d56[_0x522c10(0x172)]('..'))return'';return _0x361d56;}function a146_0x5e60(_0x47057f,_0x290dd1){_0x47057f=_0x47057f-0x165;const _0x5b8987=a146_0x5b89();let _0x5e6007=_0x5b8987[_0x47057f];return _0x5e6007;}export function localPathToTdFolderPath(_0x390f2d){const _0x23f550=a146_0x390dd['dirname'](_0x390f2d);if(_0x23f550==='.'||_0x23f550==='')return'';return _0x23f550['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x4fc33f,_0x788d7){const _0x350836=a146_0x564c64;if(!_0x4fc33f)return _0x788d7;return a146_0x390dd[_0x350836(0x178)](_0x788d7,_0x4fc33f);}export function createTdxConfigContent(_0x299288){const _0x4aeef=a146_0x564c64,_0x33e524={'parent_segment':_0x299288};return JSON[_0x4aeef(0x168)](_0x33e524,null,0x2)+'\x0a';}function a146_0x5b89(){const _0x1cc380=['338946uPIvJv','utf-8','Invalid\x20tdx.json:\x20expected\x20object','parse','2491100vSiFwb','22wygetU','parent_segment','root','3fVRMlg','stringify','relative','5GaUuiv','dirname','1439354JjBHEM','string','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','8JClxpj','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','cwd','startsWith','252476zNTfFc','resolve','segments','engage_workspace','532744OrJNFl','join','2843676epsvBs','Invalid\x20JSON\x20in\x20','2286918LLzPPH'];a146_0x5b89=function(){return _0x1cc380;};return a146_0x5b89();}export function createEngageTdxConfigContent(_0x33dfbc){const _0x2b695f=a146_0x564c64,_0x497c48={'engage_workspace':_0x33dfbc};return JSON[_0x2b695f(0x168)](_0x497c48,null,0x2)+'\x0a';}
1
+ const a146_0x1269f2=a146_0x3fdc;function a146_0x3fdc(_0x464790,_0x9bbd13){_0x464790=_0x464790-0x11e;const _0x4c1476=a146_0x4c14();let _0x3fdc82=_0x4c1476[_0x464790];return _0x3fdc82;}(function(_0x5782a,_0x233590){const _0x252f86=a146_0x3fdc,_0x36f4ef=_0x5782a();while(!![]){try{const _0x120f12=parseInt(_0x252f86(0x129))/0x1*(-parseInt(_0x252f86(0x12a))/0x2)+-parseInt(_0x252f86(0x135))/0x3+-parseInt(_0x252f86(0x13a))/0x4+-parseInt(_0x252f86(0x126))/0x5*(-parseInt(_0x252f86(0x130))/0x6)+parseInt(_0x252f86(0x125))/0x7+parseInt(_0x252f86(0x122))/0x8*(parseInt(_0x252f86(0x136))/0x9)+-parseInt(_0x252f86(0x133))/0xa*(parseInt(_0x252f86(0x12f))/0xb);if(_0x120f12===_0x233590)break;else _0x36f4ef['push'](_0x36f4ef['shift']());}catch(_0x1cfb9b){_0x36f4ef['push'](_0x36f4ef['shift']());}}}(a146_0x4c14,0x8e0da));import{existsSync,readFileSync}from'fs';function a146_0x4c14(){const _0x2d66f1=['2280coyfbA','join','segments','130jqPlFW','relative','2877393xUlesx','265869Yeaqqv','cwd','utf-8','parent_segment','77640XLLdGR','tdx.json','engage_workspace','stringify','object','264yHFdop','parse','string','6297466ivPGhe','12115GPDqHi','dirname','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','808739VKBCKo','2DfSjAh','startsWith','replace','Invalid\x20tdx.json:\x20expected\x20object','resolve','360547cmLrTn'];a146_0x4c14=function(){return _0x2d66f1;};return a146_0x4c14();}import a146_0x29ddbc from'path';const TDX_CONFIG_FILE=a146_0x1269f2(0x11e),SEGMENTS_DIR=a146_0x1269f2(0x132);export function findTdxConfigPath(_0x4c8ecb=process[a146_0x1269f2(0x137)]()){const _0x12e0e8=a146_0x1269f2;let _0x3e4cac=a146_0x29ddbc[_0x12e0e8(0x12e)](_0x4c8ecb);const _0x4dda73=a146_0x29ddbc[_0x12e0e8(0x123)](_0x3e4cac)['root'];while(_0x3e4cac!==_0x4dda73){const _0x59cae0=a146_0x29ddbc[_0x12e0e8(0x131)](_0x3e4cac,TDX_CONFIG_FILE);if(existsSync(_0x59cae0))return _0x59cae0;_0x3e4cac=a146_0x29ddbc[_0x12e0e8(0x127)](_0x3e4cac);}return null;}export function loadTdxConfig(_0x5dedbe){const _0x2852e3=a146_0x1269f2,_0x3b1a60=readFileSync(_0x5dedbe,_0x2852e3(0x138));let _0x15d29f;try{_0x15d29f=JSON[_0x2852e3(0x123)](_0x3b1a60);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x5dedbe);}if(!_0x15d29f||typeof _0x15d29f!==_0x2852e3(0x121))throw new Error(_0x2852e3(0x12d));const _0x3f44e2=_0x15d29f,_0x13a8a9=_0x3f44e2[_0x2852e3(0x139)]&&typeof _0x3f44e2[_0x2852e3(0x139)]==='string',_0x49ab0f=_0x3f44e2[_0x2852e3(0x11f)]&&typeof _0x3f44e2[_0x2852e3(0x11f)]===_0x2852e3(0x124);if(!_0x13a8a9&&!_0x49ab0f)throw new Error(_0x2852e3(0x128));const _0x9fe2d0={};return _0x13a8a9&&(_0x9fe2d0[_0x2852e3(0x139)]=_0x3f44e2[_0x2852e3(0x139)]),_0x49ab0f&&(_0x9fe2d0[_0x2852e3(0x11f)]=_0x3f44e2[_0x2852e3(0x11f)]),_0x9fe2d0;}export function findTdxConfig(_0x33c9ea=process[a146_0x1269f2(0x137)]()){const _0x105c5c=a146_0x1269f2,_0x5f54ea=findTdxConfigPath(_0x33c9ea);if(!_0x5f54ea)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x2c00ab=loadTdxConfig(_0x5f54ea),_0x526800=a146_0x29ddbc[_0x105c5c(0x127)](_0x5f54ea);return{'config':_0x2c00ab,'configPath':_0x5f54ea,'configDir':_0x526800};}export function tryFindTdxConfig(_0x401d47){try{return findTdxConfig(_0x401d47);}catch{return null;}}export function getSegmentRootDir(_0x5c7e6b,_0x3715d6=process[a146_0x1269f2(0x137)]()){const _0x2a6a9d=a146_0x1269f2;return a146_0x29ddbc[_0x2a6a9d(0x131)](_0x3715d6,SEGMENTS_DIR,_0x5c7e6b);}export function getTdxConfigPath(_0x225a9a,_0x25a7fa=process[a146_0x1269f2(0x137)]()){const _0x575c09=a146_0x1269f2;return a146_0x29ddbc[_0x575c09(0x131)](getSegmentRootDir(_0x225a9a,_0x25a7fa),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2d51ff,_0x98dd72){const _0x2fdab=a146_0x1269f2,_0x58ff62=a146_0x29ddbc[_0x2fdab(0x12e)](_0x2d51ff),_0x45f3b1=a146_0x29ddbc[_0x2fdab(0x134)](_0x98dd72,_0x58ff62);if(_0x45f3b1[_0x2fdab(0x12b)]('..'))return'';return _0x45f3b1;}export function localPathToTdFolderPath(_0x2cfe84){const _0x4e97cb=a146_0x1269f2,_0x409eaf=a146_0x29ddbc['dirname'](_0x2cfe84);if(_0x409eaf==='.'||_0x409eaf==='')return'';return _0x409eaf[_0x4e97cb(0x12c)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x43b436,_0x4333e9){const _0x43fa60=a146_0x1269f2;if(!_0x43b436)return _0x4333e9;return a146_0x29ddbc[_0x43fa60(0x131)](_0x4333e9,_0x43b436);}export function createTdxConfigContent(_0x986b7a){const _0x464ace=a146_0x1269f2,_0x351c97={'parent_segment':_0x986b7a};return JSON[_0x464ace(0x120)](_0x351c97,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x51bfc9){const _0x47f7e2={'engage_workspace':_0x51bfc9};return JSON['stringify'](_0x47f7e2,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a147_0x35fdc7=a147_0xed24;(function(_0x136b4f,_0x3eb570){const _0x5871db=a147_0xed24,_0x1ef835=_0x136b4f();while(!![]){try{const _0xadbf50=-parseInt(_0x5871db(0x197))/0x1+parseInt(_0x5871db(0x192))/0x2+parseInt(_0x5871db(0x17d))/0x3+-parseInt(_0x5871db(0x18d))/0x4+-parseInt(_0x5871db(0x180))/0x5+-parseInt(_0x5871db(0x196))/0x6*(-parseInt(_0x5871db(0x19d))/0x7)+-parseInt(_0x5871db(0x1a1))/0x8;if(_0xadbf50===_0x3eb570)break;else _0x1ef835['push'](_0x1ef835['shift']());}catch(_0x1cc92e){_0x1ef835['push'](_0x1ef835['shift']());}}}(a147_0x1b99,0x3b330));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x35fdc7(0x18c)](['none',a147_0x35fdc7(0x1a0),a147_0x35fdc7(0x182),a147_0x35fdc7(0x194),a147_0x35fdc7(0x18e),a147_0x35fdc7(0x191),a147_0x35fdc7(0x17e)]);export const RepeatUnitSchema=z['enum'](['minute',a147_0x35fdc7(0x184),a147_0x35fdc7(0x18f),'week',a147_0x35fdc7(0x181),a147_0x35fdc7(0x199),a147_0x35fdc7(0x1a2)]);export const ScheduleDefSchema=z[a147_0x35fdc7(0x18a)]({'type':ScheduleTypeSchema[a147_0x35fdc7(0x186)](),'repeat_unit':RepeatUnitSchema[a147_0x35fdc7(0x186)](),'repeat_frequency':z[a147_0x35fdc7(0x19e)]()[a147_0x35fdc7(0x186)](),'repeat_sub_frequency':z[a147_0x35fdc7(0x18b)](z['number']())[a147_0x35fdc7(0x186)](),'start_at':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x193)]()[a147_0x35fdc7(0x186)](),'end_on':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x193)]()[a147_0x35fdc7(0x186)](),'timezone':z['string']()[a147_0x35fdc7(0x186)]()});function a147_0xed24(_0x3696cf,_0x4d484f){_0x3696cf=_0x3696cf-0x17d;const _0x1b99ed=a147_0x1b99();let _0xed2493=_0x1b99ed[_0x3696cf];return _0xed2493;}export const NotificationDefSchema=z['object']({'notify_on':z['array'](z[a147_0x35fdc7(0x18c)](['onSuccess',a147_0x35fdc7(0x17f)]))[a147_0x35fdc7(0x186)](),'email_recipients':z[a147_0x35fdc7(0x18b)](z[a147_0x35fdc7(0x195)]())[a147_0x35fdc7(0x186)]()});export const ActivationColumnDefSchema=z[a147_0x35fdc7(0x189)]([z[a147_0x35fdc7(0x195)](),z[a147_0x35fdc7(0x18a)]({'name':z['string'](),'type':z[a147_0x35fdc7(0x195)]()['optional'](),'visibility':z[a147_0x35fdc7(0x18c)](['clear',a147_0x35fdc7(0x187)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a147_0x35fdc7(0x18a)]({'columns':z[a147_0x35fdc7(0x18b)](z[a147_0x35fdc7(0x18a)]({'name':z[a147_0x35fdc7(0x195)](),'type':z['string']()['optional'](),'visibility':z[a147_0x35fdc7(0x18c)]([a147_0x35fdc7(0x188),a147_0x35fdc7(0x187)])['optional']()}))[a147_0x35fdc7(0x186)](),'behavior_table':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x186)](),'join_row':z[a147_0x35fdc7(0x19e)]()['nullable']()[a147_0x35fdc7(0x186)](),'join_strategy':z[a147_0x35fdc7(0x18c)]([a147_0x35fdc7(0x190),'First','Last','Top-N'])['optional'](),'formatting':z[a147_0x35fdc7(0x18c)](['rows',a147_0x35fdc7(0x185)])[a147_0x35fdc7(0x186)](),'order_by':z[a147_0x35fdc7(0x18b)](z[a147_0x35fdc7(0x18a)]({'key':z[a147_0x35fdc7(0x195)](),'order':z[a147_0x35fdc7(0x18c)]([a147_0x35fdc7(0x19c),'desc'])}))[a147_0x35fdc7(0x186)]()});function a147_0x1b99(){const _0x24a6bb=['345943niHhej','Activation\x20name\x20is\x20required','once','record','min','asc','14mDvNkq','number','unknown','hourly','3180536vpQGnW','none','1438824ruFUdM','minutes_interval','onFailure','608045tnitbf','month','daily','Connection\x20name\x20is\x20required','hour','cols','optional','masked','clear','union','object','array','enum','141300lBQSaz','monthly','day','All','cron','654420RorKtt','nullable','weekly','string','1008318SocVjE'];a147_0x1b99=function(){return _0x24a6bb;};return a147_0x1b99();}export const ActivationDefSchema=z['object']({'name':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x19b)](0x1,a147_0x35fdc7(0x198)),'description':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x186)](),'connection':z['string']()[a147_0x35fdc7(0x19b)](0x1,a147_0x35fdc7(0x183)),'all_columns':z['boolean']()['optional'](),'columns':z[a147_0x35fdc7(0x18b)](ActivationColumnDefSchema)[a147_0x35fdc7(0x186)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a147_0x35fdc7(0x19a)](z[a147_0x35fdc7(0x195)](),z[a147_0x35fdc7(0x19f)]())[a147_0x35fdc7(0x186)](),'activation_template_id':z['string']()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a147_0x35fdc7(0x193)]()[a147_0x35fdc7(0x186)](),'run_after_journey_refresh':z['boolean']()[a147_0x35fdc7(0x186)]()});
1
+ const a147_0x2bb411=a147_0x16c7;(function(_0x6caa1d,_0x146911){const _0x5345e8=a147_0x16c7,_0x89123d=_0x6caa1d();while(!![]){try{const _0x2b984d=-parseInt(_0x5345e8(0xd6))/0x1*(-parseInt(_0x5345e8(0xd8))/0x2)+-parseInt(_0x5345e8(0xbd))/0x3+parseInt(_0x5345e8(0xcc))/0x4+parseInt(_0x5345e8(0xd7))/0x5*(-parseInt(_0x5345e8(0xc4))/0x6)+-parseInt(_0x5345e8(0xda))/0x7+-parseInt(_0x5345e8(0xca))/0x8+parseInt(_0x5345e8(0xcd))/0x9;if(_0x2b984d===_0x146911)break;else _0x89123d['push'](_0x89123d['shift']());}catch(_0x134827){_0x89123d['push'](_0x89123d['shift']());}}}(a147_0x35c8,0x3ee7c));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x2bb411(0xc2)]([a147_0x2bb411(0xcb),a147_0x2bb411(0xbf),a147_0x2bb411(0xd4),a147_0x2bb411(0xd0),a147_0x2bb411(0xc7),a147_0x2bb411(0xc3),a147_0x2bb411(0xb9)]);function a147_0x16c7(_0x20f5f5,_0x12f30e){_0x20f5f5=_0x20f5f5-0xb3;const _0x35c808=a147_0x35c8();let _0x16c78a=_0x35c808[_0x20f5f5];return _0x16c78a;}export const RepeatUnitSchema=z[a147_0x2bb411(0xc2)]([a147_0x2bb411(0xd5),a147_0x2bb411(0xc5),a147_0x2bb411(0xc8),a147_0x2bb411(0xb8),a147_0x2bb411(0xc0),a147_0x2bb411(0xde),a147_0x2bb411(0xcb)]);export const ScheduleDefSchema=z[a147_0x2bb411(0xd3)]({'type':ScheduleTypeSchema[a147_0x2bb411(0xb5)](),'repeat_unit':RepeatUnitSchema[a147_0x2bb411(0xb5)](),'repeat_frequency':z[a147_0x2bb411(0xb6)]()['optional'](),'repeat_sub_frequency':z[a147_0x2bb411(0xbb)](z['number']())['optional'](),'start_at':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xb7)]()[a147_0x2bb411(0xb5)](),'end_on':z[a147_0x2bb411(0xba)]()['nullable']()['optional'](),'timezone':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xb5)]()});export const NotificationDefSchema=z[a147_0x2bb411(0xd3)]({'notify_on':z[a147_0x2bb411(0xbb)](z['enum']([a147_0x2bb411(0xd2),a147_0x2bb411(0xdf)]))['optional'](),'email_recipients':z[a147_0x2bb411(0xbb)](z[a147_0x2bb411(0xba)]())['optional']()});function a147_0x35c8(){const _0x3c6d20=['17060TRJeuf','20pvXwhL','clear','190008XlYsVR','boolean','All','Connection\x20name\x20is\x20required','once','onFailure','rows','union','optional','number','nullable','week','minutes_interval','string','array','record','749145Hcezis','First','hourly','month','Top-N','enum','cron','522BSKnjy','hour','min','monthly','day','masked','2097776XproHr','none','1359220XRAuSF','5788980QYKCTf','desc','Last','weekly','Activation\x20name\x20is\x20required','onSuccess','object','daily','minute','11056HoflCN'];a147_0x35c8=function(){return _0x3c6d20;};return a147_0x35c8();}export const ActivationColumnDefSchema=z[a147_0x2bb411(0xb4)]([z[a147_0x2bb411(0xba)](),z[a147_0x2bb411(0xd3)]({'name':z[a147_0x2bb411(0xba)](),'type':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xb5)](),'visibility':z[a147_0x2bb411(0xc2)](['clear',a147_0x2bb411(0xc9)])['optional']()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a147_0x2bb411(0xbb)](z[a147_0x2bb411(0xd3)]({'name':z[a147_0x2bb411(0xba)](),'type':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xb5)](),'visibility':z['enum']([a147_0x2bb411(0xd9),a147_0x2bb411(0xc9)])[a147_0x2bb411(0xb5)]()}))[a147_0x2bb411(0xb5)](),'behavior_table':z[a147_0x2bb411(0xba)]()['optional'](),'join_row':z[a147_0x2bb411(0xb6)]()[a147_0x2bb411(0xb7)]()[a147_0x2bb411(0xb5)](),'join_strategy':z['enum']([a147_0x2bb411(0xdc),a147_0x2bb411(0xbe),a147_0x2bb411(0xcf),a147_0x2bb411(0xc1)])[a147_0x2bb411(0xb5)](),'formatting':z['enum']([a147_0x2bb411(0xb3),'cols'])['optional'](),'order_by':z[a147_0x2bb411(0xbb)](z[a147_0x2bb411(0xd3)]({'key':z['string'](),'order':z[a147_0x2bb411(0xc2)](['asc',a147_0x2bb411(0xce)])}))[a147_0x2bb411(0xb5)]()});export const ActivationDefSchema=z[a147_0x2bb411(0xd3)]({'name':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xc6)](0x1,a147_0x2bb411(0xd1)),'description':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xb5)](),'connection':z[a147_0x2bb411(0xba)]()['min'](0x1,a147_0x2bb411(0xdd)),'all_columns':z['boolean']()[a147_0x2bb411(0xb5)](),'columns':z[a147_0x2bb411(0xbb)](ActivationColumnDefSchema)[a147_0x2bb411(0xb5)](),'schedule':ScheduleDefSchema[a147_0x2bb411(0xb5)](),'notification':NotificationDefSchema[a147_0x2bb411(0xb5)](),'connector_config':z[a147_0x2bb411(0xbc)](z[a147_0x2bb411(0xba)](),z['unknown']())['optional'](),'activation_template_id':z[a147_0x2bb411(0xba)]()[a147_0x2bb411(0xb7)]()[a147_0x2bb411(0xb5)](),'behavior':ActivationBehaviorDefSchema[a147_0x2bb411(0xb7)]()[a147_0x2bb411(0xb5)](),'run_after_journey_refresh':z[a147_0x2bb411(0xdb)]()['optional']()});
@@ -1 +1 @@
1
- function a148_0x3649(){var _0x3ef08c=['9aBBaIk','213DwecJI','1943611JnohAp','4118892ddFinO','11208WMTwII','8053470qrarCd','745060POojBx','7106505IswmrO','13364184JqbdQl'];a148_0x3649=function(){return _0x3ef08c;};return a148_0x3649();}(function(_0x5d68d2,_0x4cca54){var _0x13e039=a148_0x4db9,_0x4b8414=_0x5d68d2();while(!![]){try{var _0x44727d=-parseInt(_0x13e039(0xa7))/0x1+-parseInt(_0x13e039(0xa9))/0x2*(-parseInt(_0x13e039(0xa6))/0x3)+parseInt(_0x13e039(0xa8))/0x4+parseInt(_0x13e039(0xa2))/0x5+-parseInt(_0x13e039(0xaa))/0x6+parseInt(_0x13e039(0xa3))/0x7+parseInt(_0x13e039(0xa4))/0x8*(parseInt(_0x13e039(0xa5))/0x9);if(_0x44727d===_0x4cca54)break;else _0x4b8414['push'](_0x4b8414['shift']());}catch(_0x37d8e8){_0x4b8414['push'](_0x4b8414['shift']());}}}(a148_0x3649,0xee675));function a148_0x4db9(_0x7d17b6,_0x18ca9d){_0x7d17b6=_0x7d17b6-0xa2;var _0x36498d=a148_0x3649();var _0x4db92c=_0x36498d[_0x7d17b6];return _0x4db92c;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ (function(_0xc462bd,_0x36ff25){var _0x206d90=a148_0xbd91,_0x1eb7d2=_0xc462bd();while(!![]){try{var _0x30546b=-parseInt(_0x206d90(0x16d))/0x1*(parseInt(_0x206d90(0x16c))/0x2)+parseInt(_0x206d90(0x16f))/0x3*(-parseInt(_0x206d90(0x16a))/0x4)+parseInt(_0x206d90(0x169))/0x5*(-parseInt(_0x206d90(0x168))/0x6)+-parseInt(_0x206d90(0x16e))/0x7*(parseInt(_0x206d90(0x170))/0x8)+parseInt(_0x206d90(0x166))/0x9+parseInt(_0x206d90(0x167))/0xa+parseInt(_0x206d90(0x16b))/0xb;if(_0x30546b===_0x36ff25)break;else _0x1eb7d2['push'](_0x1eb7d2['shift']());}catch(_0x5324b4){_0x1eb7d2['push'](_0x1eb7d2['shift']());}}}(a148_0x1697,0x28b26));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a148_0xbd91(_0x162fb2,_0x164e89){_0x162fb2=_0x162fb2-0x166;var _0x169742=a148_0x1697();var _0xbd9159=_0x169742[_0x162fb2];return _0xbd9159;}function a148_0x1697(){var _0x485d49=['84670xmKpsF','8ivBCzi','7474830CuzxJe','2098ytZOZZ','311AnXKaW','273434byQmBQ','439764NaDkLf','32eifLjK','2615895ssdcFd','2600500ZNNmJV','102KHDXKq'];a148_0x1697=function(){return _0x485d49;};return a148_0x1697();}
@@ -1 +1 @@
1
- const a149_0x28d9ab=a149_0x4b48;(function(_0x44af7d,_0x3ae31b){const _0x20c3d2=a149_0x4b48,_0x52ec9f=_0x44af7d();while(!![]){try{const _0x24629c=-parseInt(_0x20c3d2(0x1bf))/0x1+-parseInt(_0x20c3d2(0x1b9))/0x2*(-parseInt(_0x20c3d2(0x1c0))/0x3)+parseInt(_0x20c3d2(0x1b8))/0x4+parseInt(_0x20c3d2(0x1c1))/0x5+-parseInt(_0x20c3d2(0x1b4))/0x6*(parseInt(_0x20c3d2(0x1c4))/0x7)+parseInt(_0x20c3d2(0x1b5))/0x8*(parseInt(_0x20c3d2(0x1d0))/0x9)+parseInt(_0x20c3d2(0x1b1))/0xa;if(_0x24629c===_0x3ae31b)break;else _0x52ec9f['push'](_0x52ec9f['shift']());}catch(_0x5160f1){_0x52ec9f['push'](_0x52ec9f['shift']());}}}(a149_0x40e6,0xe043e));function a149_0x40e6(){const _0x301ab1=['3928149obxCHH','1545420uPMtbR','filter','isArray','7EpUURk','simulation','literal','ab_test','reentry_unless_goal_achieved','length','type','array','enum','week','jump','wait','342afWOGc','optional','discriminatedUnion','lazy','day','activation','passthrough','number','object','decision_point','end','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','draft','9322370syuweE','min','boolean','9464550GTrwMn','36056RgVYYK','record','journey','2972576gSighE','2yXnDZF','Journey\x20name\x20is\x20required','string','launched','no_reentry','merge','969099GooIHJ'];a149_0x40e6=function(){return _0x301ab1;};return a149_0x40e6();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1dc),a149_0x28d9ab(0x1c5),a149_0x28d9ab(0x1bc)]);export const ReentryModeTypeSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1bd),a149_0x28d9ab(0x1c8),'reentry_always']);function a149_0x4b48(_0x271285,_0x182842){_0x271285=_0x271285-0x1b1;const _0x40e677=a149_0x40e6();let _0x4b48ae=_0x40e677[_0x271285];return _0x4b48ae;}export const WaitUnitTypeSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1d4),a149_0x28d9ab(0x1cd)]);export const StepTypeValueSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1cf),a149_0x28d9ab(0x1d5),a149_0x28d9ab(0x1d9),a149_0x28d9ab(0x1c7),a149_0x28d9ab(0x1be),a149_0x28d9ab(0x1ce),a149_0x28d9ab(0x1da)]);export const EmbeddedSegmentDefSchema=z[a149_0x28d9ab(0x1d8)]({'description':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0x28d9ab(0x1d8)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)]()});export const CriteriaDefSchema=z[a149_0x28d9ab(0x1d8)]({'name':z[a149_0x28d9ab(0x1bb)](),'description':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'segment':z[a149_0x28d9ab(0x1bb)](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z[a149_0x28d9ab(0x1d8)]({'duration':z[a149_0x28d9ab(0x1d7)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)]()}),WaitConditionDefSchema=z[a149_0x28d9ab(0x1d8)]({'segment':z[a149_0x28d9ab(0x1bb)](),'next':z[a149_0x28d9ab(0x1bb)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a149_0x28d9ab(0x1d1)]()}),WaitStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'duration':z['number']()[a149_0x28d9ab(0x1d1)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'condition':WaitConditionDefSchema[a149_0x28d9ab(0x1d1)](),'days_of_week':z[a149_0x28d9ab(0x1cb)](z[a149_0x28d9ab(0x1bb)]())[a149_0x28d9ab(0x1d1)]()}),StepBaseFields={'name':z[a149_0x28d9ab(0x1bb)](),'uuid':z['string']()[a149_0x28d9ab(0x1d1)](),'next':z[a149_0x28d9ab(0x1bb)]()['optional']()},WaitStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z['literal'](a149_0x28d9ab(0x1cf)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'activation':z[a149_0x28d9ab(0x1bb)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a149_0x28d9ab(0x1d8)]({'name':z[a149_0x28d9ab(0x1bb)](),'segment':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'segment_id':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'excluded':z['boolean']()['optional'](),'next':z['string']()[a149_0x28d9ab(0x1d1)]()}),DecisionPointStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'branches':z[a149_0x28d9ab(0x1cb)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1d9)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x28d9ab(0x1d8)]({'id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'name':z[a149_0x28d9ab(0x1bb)](),'percentage':z[a149_0x28d9ab(0x1d7)](),'next':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)]()}),AbTestStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'variants':z[a149_0x28d9ab(0x1cb)](AbTestVariantDefSchema),'unique_id':z['string']()[a149_0x28d9ab(0x1d1)](),'customized_split':z[a149_0x28d9ab(0x1b3)]()[a149_0x28d9ab(0x1d1)]()}),AbTestStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1c7)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1be))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z['literal'](a149_0x28d9ab(0x1ce)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z['literal']('end')})[a149_0x28d9ab(0x1d6)]();export const StepDefSchema=z[a149_0x28d9ab(0x1d2)](a149_0x28d9ab(0x1ca),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a149_0x28d9ab(0x1bb)](),'description':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a149_0x28d9ab(0x1cb)](CriteriaDefSchema)[a149_0x28d9ab(0x1d1)](),'milestone':CriteriaDefSchema[a149_0x28d9ab(0x1d1)](),'root_step':z[a149_0x28d9ab(0x1bb)]()['optional'](),'steps':z[a149_0x28d9ab(0x1cb)](StepDefSchema)[a149_0x28d9ab(0x1d1)]()});export const JourneyEntryDefSchema=z[a149_0x28d9ab(0x1d8)]({'name':z['string']()['optional'](),'version':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'state':JourneyStateTypeSchema[a149_0x28d9ab(0x1d1)](),'latest':z[a149_0x28d9ab(0x1b3)]()['optional'](),'stages':z[a149_0x28d9ab(0x1cb)](StageDefSchema),'id':z['string']()[a149_0x28d9ab(0x1d1)](),'version_number':z[a149_0x28d9ab(0x1d7)]()[a149_0x28d9ab(0x1d1)](),'goal':CriteriaDefSchema[a149_0x28d9ab(0x1d1)](),'reentry':ReentryModeTypeSchema[a149_0x28d9ab(0x1d1)]()});export const JourneyDefSchema=z[a149_0x28d9ab(0x1d3)](()=>z['object']({'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1b7)),'name':z['string']()[a149_0x28d9ab(0x1b2)](0x1,a149_0x28d9ab(0x1ba)),'description':z['string']()[a149_0x28d9ab(0x1d1)](),'bundle_id':z['string']()[a149_0x28d9ab(0x1d1)](),'bundle_name':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'folder_id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'reentry':ReentryModeTypeSchema[a149_0x28d9ab(0x1d1)](),'allow_reentry':z[a149_0x28d9ab(0x1b3)]()[a149_0x28d9ab(0x1d1)](),'goal':CriteriaDefSchema[a149_0x28d9ab(0x1d1)](),'id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'version':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'version_number':z['number']()[a149_0x28d9ab(0x1d1)](),'stages':z[a149_0x28d9ab(0x1cb)](StageDefSchema)[a149_0x28d9ab(0x1d1)](),'versions':z[a149_0x28d9ab(0x1cb)](JourneyEntryDefSchema)[a149_0x28d9ab(0x1d1)](),'journeys':z['array'](JourneyEntryDefSchema)[a149_0x28d9ab(0x1d1)](),'segments':z[a149_0x28d9ab(0x1b6)](z[a149_0x28d9ab(0x1bb)](),EmbeddedSegmentDefSchema)[a149_0x28d9ab(0x1d1)](),'activations':z[a149_0x28d9ab(0x1b6)](z[a149_0x28d9ab(0x1bb)](),ActivationDefSchema)[a149_0x28d9ab(0x1d1)]()})['refine'](_0x2d4904=>{const _0x5d7b70=a149_0x28d9ab,_0xf84196=[_0x2d4904['journeys'],_0x2d4904['stages'],_0x2d4904['versions']][_0x5d7b70(0x1c2)](_0x51e68a=>Array[_0x5d7b70(0x1c3)](_0x51e68a)&&_0x51e68a[_0x5d7b70(0x1c9)]>0x0)[_0x5d7b70(0x1c9)];return _0xf84196===0x1;},{'message':a149_0x28d9ab(0x1db)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a149_0x919e86=a149_0x464e;(function(_0xaad7b9,_0x474e73){const _0x504e92=a149_0x464e,_0x1a515a=_0xaad7b9();while(!![]){try{const _0x5752b9=-parseInt(_0x504e92(0x128))/0x1*(parseInt(_0x504e92(0x122))/0x2)+-parseInt(_0x504e92(0x125))/0x3*(-parseInt(_0x504e92(0x13e))/0x4)+-parseInt(_0x504e92(0x11d))/0x5*(parseInt(_0x504e92(0x13b))/0x6)+parseInt(_0x504e92(0x129))/0x7+parseInt(_0x504e92(0x144))/0x8*(parseInt(_0x504e92(0x143))/0x9)+parseInt(_0x504e92(0x13d))/0xa*(-parseInt(_0x504e92(0x145))/0xb)+-parseInt(_0x504e92(0x124))/0xc*(parseInt(_0x504e92(0x140))/0xd);if(_0x5752b9===_0x474e73)break;else _0x1a515a['push'](_0x1a515a['shift']());}catch(_0x4502be){_0x1a515a['push'](_0x1a515a['shift']());}}}(a149_0x4061,0x30485));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x919e86(0x11e)]([a149_0x919e86(0x11f),'simulation','launched']);export const ReentryModeTypeSchema=z[a149_0x919e86(0x11e)](['no_reentry','reentry_unless_goal_achieved',a149_0x919e86(0x135)]);export const WaitUnitTypeSchema=z['enum']([a149_0x919e86(0x12e),'week']);export const StepTypeValueSchema=z[a149_0x919e86(0x11e)](['wait',a149_0x919e86(0x12d),'decision_point','ab_test',a149_0x919e86(0x121),'jump',a149_0x919e86(0x13f)]);export const EmbeddedSegmentDefSchema=z[a149_0x919e86(0x13a)]({'description':z['string']()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0x919e86(0x13a)]({'journey':z[a149_0x919e86(0x13c)](),'stage':z[a149_0x919e86(0x13c)](),'bundle_id':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)]()});export const CriteriaDefSchema=z[a149_0x919e86(0x13a)]({'name':z[a149_0x919e86(0x13c)](),'description':z['string']()['optional'](),'segment':z[a149_0x919e86(0x13c)](),'target':JumpTargetDefSchema[a149_0x919e86(0x12c)]()});function a149_0x4061(){const _0x924397=['literal','discriminatedUnion','15NyWsuz','enum','draft','Journey\x20name\x20is\x20required','merge','2dzHZeG','boolean','229728kFkmhP','4179hsMkVd','min','record','116438gAXkcJ','232603WXJYrB','versions','wait','optional','activation','day','journey','passthrough','stages','number','refine','type','reentry_always','filter','ab_test','length','lazy','object','100014ktBxYq','string','10PhhABB','796XOspaC','end','13lFBNOC','isArray','jump','90SmJfxH','206552DYbDcy','2037992YrcmTi','array'];a149_0x4061=function(){return _0x924397;};return a149_0x4061();}const WaitConditionTimeoutDefSchema=z[a149_0x919e86(0x13a)]({'duration':z[a149_0x919e86(0x132)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x919e86(0x13c)]()['optional']()}),WaitConditionDefSchema=z[a149_0x919e86(0x13a)]({'segment':z[a149_0x919e86(0x13c)](),'next':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'timeout':WaitConditionTimeoutDefSchema[a149_0x919e86(0x12c)]()}),WaitStepParamsDefSchema=z[a149_0x919e86(0x13a)]({'duration':z[a149_0x919e86(0x132)]()['optional'](),'unit':WaitUnitTypeSchema[a149_0x919e86(0x12c)](),'wait_until':z['string']()['optional'](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z['array'](z[a149_0x919e86(0x13c)]())['optional']()}),StepBaseFields={'name':z[a149_0x919e86(0x13c)](),'uuid':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'next':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x919e86(0x11b)](a149_0x919e86(0x12b)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x919e86(0x13a)]({'activation':z['string']()}),ActivationStepDefSchema=z[a149_0x919e86(0x13a)]({...StepBaseFields,'type':z[a149_0x919e86(0x11b)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a149_0x919e86(0x13c)](),'segment':z[a149_0x919e86(0x13c)]()['optional'](),'segment_id':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'excluded':z[a149_0x919e86(0x123)]()[a149_0x919e86(0x12c)](),'next':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)]()}),DecisionPointStepParamsDefSchema=z[a149_0x919e86(0x13a)]({'branches':z[a149_0x919e86(0x146)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x919e86(0x13a)]({...StepBaseFields,'type':z['literal']('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x919e86(0x13a)]({'id':z[a149_0x919e86(0x13c)]()['optional'](),'name':z[a149_0x919e86(0x13c)](),'percentage':z[a149_0x919e86(0x132)](),'next':z['string']()['optional']()}),AbTestStepParamsDefSchema=z[a149_0x919e86(0x13a)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a149_0x919e86(0x12c)](),'customized_split':z[a149_0x919e86(0x123)]()[a149_0x919e86(0x12c)]()}),AbTestStepDefSchema=z[a149_0x919e86(0x13a)]({...StepBaseFields,'type':z[a149_0x919e86(0x11b)](a149_0x919e86(0x137)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x919e86(0x13a)]({...StepBaseFields,'type':z[a149_0x919e86(0x11b)](a149_0x919e86(0x121))}),JumpStepParamsDefSchema=z[a149_0x919e86(0x13a)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0x919e86(0x13a)]({...StepBaseFields,'type':z[a149_0x919e86(0x11b)](a149_0x919e86(0x142)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x919e86(0x11b)](a149_0x919e86(0x13f))})[a149_0x919e86(0x130)]();export const StepDefSchema=z[a149_0x919e86(0x11c)](a149_0x919e86(0x134),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a149_0x464e(_0x1e9ad4,_0x171759){_0x1e9ad4=_0x1e9ad4-0x11b;const _0x4061dd=a149_0x4061();let _0x464ede=_0x4061dd[_0x1e9ad4];return _0x464ede;}export const StageDefSchema=z[a149_0x919e86(0x13a)]({'name':z[a149_0x919e86(0x13c)](),'description':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'id':z[a149_0x919e86(0x13c)]()['optional'](),'entry_criteria':CriteriaDefSchema[a149_0x919e86(0x12c)](),'exit_criteria':z[a149_0x919e86(0x146)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a149_0x919e86(0x13c)]()['optional'](),'steps':z['array'](StepDefSchema)[a149_0x919e86(0x12c)]()});export const JourneyEntryDefSchema=z[a149_0x919e86(0x13a)]({'name':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'version':z['string']()[a149_0x919e86(0x12c)](),'state':JourneyStateTypeSchema[a149_0x919e86(0x12c)](),'latest':z[a149_0x919e86(0x123)]()[a149_0x919e86(0x12c)](),'stages':z[a149_0x919e86(0x146)](StageDefSchema),'id':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'version_number':z[a149_0x919e86(0x132)]()[a149_0x919e86(0x12c)](),'goal':CriteriaDefSchema[a149_0x919e86(0x12c)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a149_0x919e86(0x139)](()=>z[a149_0x919e86(0x13a)]({'type':z[a149_0x919e86(0x11b)](a149_0x919e86(0x12f)),'name':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x126)](0x1,a149_0x919e86(0x120)),'description':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'bundle_id':z['string']()['optional'](),'bundle_name':z[a149_0x919e86(0x13c)]()['optional'](),'folder_id':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'reentry':ReentryModeTypeSchema[a149_0x919e86(0x12c)](),'allow_reentry':z[a149_0x919e86(0x123)]()[a149_0x919e86(0x12c)](),'goal':CriteriaDefSchema['optional'](),'id':z[a149_0x919e86(0x13c)]()[a149_0x919e86(0x12c)](),'version':z['string']()[a149_0x919e86(0x12c)](),'version_number':z[a149_0x919e86(0x132)]()['optional'](),'stages':z[a149_0x919e86(0x146)](StageDefSchema)[a149_0x919e86(0x12c)](),'versions':z[a149_0x919e86(0x146)](JourneyEntryDefSchema)[a149_0x919e86(0x12c)](),'journeys':z[a149_0x919e86(0x146)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z[a149_0x919e86(0x13c)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a149_0x919e86(0x127)](z[a149_0x919e86(0x13c)](),ActivationDefSchema)[a149_0x919e86(0x12c)]()})[a149_0x919e86(0x133)](_0x4f1e3e=>{const _0x5dc0ce=a149_0x919e86,_0x4a44fe=[_0x4f1e3e['journeys'],_0x4f1e3e[_0x5dc0ce(0x131)],_0x4f1e3e[_0x5dc0ce(0x12a)]][_0x5dc0ce(0x136)](_0x47b59d=>Array[_0x5dc0ce(0x141)](_0x47b59d)&&_0x47b59d[_0x5dc0ce(0x138)]>0x0)[_0x5dc0ce(0x138)];return _0x4a44fe===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x4cdbca,_0xfa3c79){var _0x4bd7bb=a151_0x27bc,_0xc29e15=_0x4cdbca();while(!![]){try{var _0x2ea3ad=parseInt(_0x4bd7bb(0xf1))/0x1*(parseInt(_0x4bd7bb(0xf7))/0x2)+parseInt(_0x4bd7bb(0xf2))/0x3+-parseInt(_0x4bd7bb(0xf4))/0x4+-parseInt(_0x4bd7bb(0xf8))/0x5*(parseInt(_0x4bd7bb(0xf9))/0x6)+-parseInt(_0x4bd7bb(0xf3))/0x7*(-parseInt(_0x4bd7bb(0xfa))/0x8)+-parseInt(_0x4bd7bb(0xf5))/0x9+parseInt(_0x4bd7bb(0xf6))/0xa;if(_0x2ea3ad===_0xfa3c79)break;else _0xc29e15['push'](_0xc29e15['shift']());}catch(_0x3affed){_0xc29e15['push'](_0xc29e15['shift']());}}}(a151_0x47ab,0x2c568));function a151_0x47ab(){var _0x3dd6bd=['114KiklXw','2062024FymiOr','36386rGnqKv','838770TcGsqO','7iJbsRu','815752TnRiRO','1139157qwhgdF','255580ihwBdn','10iKZSwj','61240CGuIYb'];a151_0x47ab=function(){return _0x3dd6bd;};return a151_0x47ab();}function a151_0x27bc(_0x383c62,_0xba568a){_0x383c62=_0x383c62-0xf1;var _0x47ab80=a151_0x47ab();var _0x27bc08=_0x47ab80[_0x383c62];return _0x27bc08;}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 a151_0x1f74(){var _0x47f8ac=['2973351DAwzvd','1323GdQoFI','29YoJnPF','103195pWwiNg','3218836OyQIou','50488PFpuEx','50sOwXyB','1671813Befzyk','228xHaBQm','31845616convFJ','29346sLvrxz'];a151_0x1f74=function(){return _0x47f8ac;};return a151_0x1f74();}function a151_0x4da1(_0x92cdb8,_0x787f8e){_0x92cdb8=_0x92cdb8-0x1e0;var _0x1f7408=a151_0x1f74();var _0x4da1d8=_0x1f7408[_0x92cdb8];return _0x4da1d8;}(function(_0x2498b9,_0x2c73bf){var _0xb2d5cf=a151_0x4da1,_0x5c7f15=_0x2498b9();while(!![]){try{var _0x51dc10=parseInt(_0xb2d5cf(0x1e0))/0x1*(parseInt(_0xb2d5cf(0x1e8))/0x2)+parseInt(_0xb2d5cf(0x1e9))/0x3+-parseInt(_0xb2d5cf(0x1e2))/0x4+-parseInt(_0xb2d5cf(0x1e1))/0x5*(parseInt(_0xb2d5cf(0x1e6))/0x6)+parseInt(_0xb2d5cf(0x1ea))/0x7*(-parseInt(_0xb2d5cf(0x1e3))/0x8)+parseInt(_0xb2d5cf(0x1e5))/0x9*(-parseInt(_0xb2d5cf(0x1e4))/0xa)+parseInt(_0xb2d5cf(0x1e7))/0xb;if(_0x51dc10===_0x2c73bf)break;else _0x5c7f15['push'](_0x5c7f15['shift']());}catch(_0x2f3947){_0x5c7f15['push'](_0x5c7f15['shift']());}}}(a151_0x1f74,0x92c2f));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a152_0xf1e1b0=a152_0x35c7;(function(_0x44033c,_0x292059){const _0x357fec=a152_0x35c7,_0x5eb782=_0x44033c();while(!![]){try{const _0x2560cf=parseInt(_0x357fec(0x213))/0x1+-parseInt(_0x357fec(0x229))/0x2*(parseInt(_0x357fec(0x208))/0x3)+-parseInt(_0x357fec(0x218))/0x4*(-parseInt(_0x357fec(0x226))/0x5)+-parseInt(_0x357fec(0x207))/0x6+parseInt(_0x357fec(0x203))/0x7*(parseInt(_0x357fec(0x1f3))/0x8)+parseInt(_0x357fec(0x204))/0x9*(parseInt(_0x357fec(0x21e))/0xa)+parseInt(_0x357fec(0x202))/0xb*(-parseInt(_0x357fec(0x231))/0xc);if(_0x2560cf===_0x292059)break;else _0x5eb782['push'](_0x5eb782['shift']());}catch(_0x3fb05c){_0x5eb782['push'](_0x5eb782['shift']());}}}(a152_0x475c,0xeb82e));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a152_0xf1e1b0(0x1f8),'Greater',a152_0xf1e1b0(0x20c),a152_0xf1e1b0(0x228),a152_0xf1e1b0(0x22b),'In',a152_0xf1e1b0(0x227),a152_0xf1e1b0(0x1ee),a152_0xf1e1b0(0x201),a152_0xf1e1b0(0x20f),a152_0xf1e1b0(0x1eb),a152_0xf1e1b0(0x225),'StartWith',a152_0xf1e1b0(0x235),a152_0xf1e1b0(0x238)]);export const TimeUnitSchema=z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x21a),a152_0xf1e1b0(0x20d),a152_0xf1e1b0(0x236),a152_0xf1e1b0(0x1ec),'week',a152_0xf1e1b0(0x232),a152_0xf1e1b0(0x212)]);export const AggregationTypeSchema=z['enum']([a152_0xf1e1b0(0x217),a152_0xf1e1b0(0x205),a152_0xf1e1b0(0x22f),'Min',a152_0xf1e1b0(0x234),a152_0xf1e1b0(0x1fc),a152_0xf1e1b0(0x221),a152_0xf1e1b0(0x216)]);const TemporalValueSchema=z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x1fd)]({'timestamp':z['string']()}),z[a152_0xf1e1b0(0x1fd)]({'last':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x211)](z['string'](),z[a152_0xf1e1b0(0x20a)]())]),'unit':z[a152_0xf1e1b0(0x22d)]()})]),OperatorValueSchema=z['union']([z['string'](),z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22e)](),TemporalValueSchema,z[a152_0xf1e1b0(0x1fe)](z['union']([z[a152_0xf1e1b0(0x22d)](),z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0xf1e1b0(0x1f8),'Greater',a152_0xf1e1b0(0x228),'Less',a152_0xf1e1b0(0x22b),'In',a152_0xf1e1b0(0x225),a152_0xf1e1b0(0x22a),a152_0xf1e1b0(0x235),'Regexp',a152_0xf1e1b0(0x20f),a152_0xf1e1b0(0x1eb)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0xf1e1b0(0x1eb)]);export const OperatorDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':OperatorTypeSchema,'not':z['boolean']()[a152_0xf1e1b0(0x1fa)](),'value':OperatorValueSchema[a152_0xf1e1b0(0x1fa)](),'min':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22d)](),TemporalValueSchema])['optional'](),'max':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z['string'](),TemporalValueSchema])[a152_0xf1e1b0(0x1fa)](),'unit':TimeUnitSchema['optional'](),'duration':z[a152_0xf1e1b0(0x1fd)]({'day':z[a152_0xf1e1b0(0x20a)]()['optional'](),'week':z['number']()['optional'](),'month':z['number']()[a152_0xf1e1b0(0x1fa)](),'year':z[a152_0xf1e1b0(0x20a)]()[a152_0xf1e1b0(0x1fa)](),'hour':z['number']()['optional'](),'minute':z['number']()[a152_0xf1e1b0(0x1fa)](),'second':z[a152_0xf1e1b0(0x20a)]()[a152_0xf1e1b0(0x1fa)]()})[a152_0xf1e1b0(0x1fa)](),'from':z['object']({'last':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22d)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a152_0xf1e1b0(0x22e)]()[a152_0xf1e1b0(0x1fa)]()})[a152_0xf1e1b0(0x21b)]((_0x3ee651,_0x30ffe5)=>{const _0x474ab4=a152_0xf1e1b0;OPERATORS_REQUIRING_VALUE[_0x474ab4(0x1f4)](_0x3ee651[_0x474ab4(0x21f)])&&(_0x3ee651[_0x474ab4(0x1f9)]===undefined||_0x3ee651['value']===null)&&_0x30ffe5[_0x474ab4(0x219)]({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x222)+_0x3ee651['type']+_0x474ab4(0x22c),'path':[_0x474ab4(0x1f9)]}),_0x3ee651[_0x474ab4(0x21f)]===_0x474ab4(0x227)&&_0x3ee651[_0x474ab4(0x1f6)]===undefined&&_0x3ee651[_0x474ab4(0x1ed)]===undefined&&_0x30ffe5[_0x474ab4(0x219)]({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x1f2),'params':{'validationCode':_0x474ab4(0x239)}}),OPERATORS_REQUIRING_UNIT['has'](_0x3ee651[_0x474ab4(0x21f)])&&_0x3ee651['value']!==undefined&&!_0x3ee651[_0x474ab4(0x1f7)]&&_0x30ffe5[_0x474ab4(0x219)]({'code':'custom','message':'Operator\x20\x27'+_0x3ee651[_0x474ab4(0x21f)]+_0x474ab4(0x223),'path':[_0x474ab4(0x1f7)],'params':{'validationCode':_0x474ab4(0x1ff)}}),_0x3ee651['type']===_0x474ab4(0x238)&&(!_0x3ee651[_0x474ab4(0x215)]&&_0x30ffe5[_0x474ab4(0x219)]({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x206),'path':[_0x474ab4(0x215)]}),!_0x3ee651['from']&&_0x30ffe5['addIssue']({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x21d),'path':[_0x474ab4(0x230)]}));});export const ArrayMatchingSchema=z[a152_0xf1e1b0(0x1e8)]([z['literal']('any'),z[a152_0xf1e1b0(0x224)]('all'),z[a152_0xf1e1b0(0x1fd)]({'atLeast':z['number']()}),z[a152_0xf1e1b0(0x1fd)]({'atMost':z['number']()}),z[a152_0xf1e1b0(0x1fd)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a152_0xf1e1b0(0x1f5)]('type',[z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x205),a152_0xf1e1b0(0x200),a152_0xf1e1b0(0x234),'Average']),'column':z['string'](),'groupingColumns':z['array'](z[a152_0xf1e1b0(0x22d)]())['optional']()}),z['object']({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x217)),'groupingColumns':z[a152_0xf1e1b0(0x1fe)](z[a152_0xf1e1b0(0x22d)]())[a152_0xf1e1b0(0x1fa)]()}),z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x1fc)),'columns':z[a152_0xf1e1b0(0x1fe)](z[a152_0xf1e1b0(0x22d)]())}),z['object']({'type':z[a152_0xf1e1b0(0x1ea)](['First','Last']),'column':z[a152_0xf1e1b0(0x22d)](),'orderColumn':z['string'](),'groupingColumns':z[a152_0xf1e1b0(0x1fe)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0xf1e1b0(0x20f),a152_0xf1e1b0(0x1eb),'TimeRange']);export const FilterColumnConditionDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)]('Column'),'column':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0xf1e1b0(0x1fa)]()})[a152_0xf1e1b0(0x21b)]((_0x5b0ce9,_0x54dd21)=>{const _0x3f284b=a152_0xf1e1b0,_0x4b61ce=_0x5b0ce9['operator'][_0x3f284b(0x21f)];_0x5b0ce9[_0x3f284b(0x220)]===_0x3f284b(0x237)?!TIMESTAMP_OPERATORS[_0x3f284b(0x1f4)](_0x4b61ce)&&_0x54dd21['addIssue']({'code':_0x3f284b(0x23a),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x4b61ce+'\x27)','path':[_0x3f284b(0x1f0),'type']}):TIMESTAMP_OPERATORS['has'](_0x4b61ce)&&_0x54dd21['addIssue']({'code':_0x3f284b(0x23a),'message':_0x3f284b(0x222)+_0x4b61ce+_0x3f284b(0x1f1),'path':[_0x3f284b(0x1f0),_0x3f284b(0x21f)]});});export const FilterRuleDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x1ef)),'conditions':z[a152_0xf1e1b0(0x1fe)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z['object']({'type':z['literal']('Value'),'attribute':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0xf1e1b0(0x1fa)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)](),'filter':FilterRuleDefSchema[a152_0xf1e1b0(0x1fa)](),'limit':z[a152_0xf1e1b0(0x20a)]()['optional']()}));export const BehaviorConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z['object']({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x20e)),'attribute':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0xf1e1b0(0x1fa)](),'exclude':z[a152_0xf1e1b0(0x22e)]()[a152_0xf1e1b0(0x1fa)](),'aggregation':AggregationDefSchema[a152_0xf1e1b0(0x1fa)](),'source':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)](),'filter':FilterRuleDefSchema[a152_0xf1e1b0(0x1fa)](),'timeWindow':TimeWindowDefSchema[a152_0xf1e1b0(0x1fa)](),'limit':z[a152_0xf1e1b0(0x20a)]()[a152_0xf1e1b0(0x1fa)]()}));function a152_0x35c7(_0x2403fc,_0x5b3808){_0x2403fc=_0x2403fc-0x1e8;const _0x475c0=a152_0x475c();let _0x35c7ad=_0x475c0[_0x2403fc];return _0x35c7ad;}export const ColumnConditionDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x23b)),'column':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x1ef),'Or']),'conditions':z[a152_0xf1e1b0(0x1fe)](ConditionDefSchema),'description':z['string']()[a152_0xf1e1b0(0x1fa)]()}));export const SegmentRefConditionDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x210),'exclude']),'segment':z[a152_0xf1e1b0(0x22d)]()['min'](0x1,a152_0xf1e1b0(0x20b))});export const ConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z[a152_0xf1e1b0(0x1e8)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z['object']({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x1ef),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)]()}));function a152_0x475c(){const _0x177c7d=['Count','20xwQMWL','addIssue','second','superRefine','lazy','TimeRange\x20operator\x20requires\x20\x27from\x27','19176030ybEENa','type','column','First','Operator\x20\x27','\x27\x20requires\x20a\x20time\x20unit','literal','Contain','122890qkMYZV','Between','GreaterEqual','24yChsvY','StartWith','LessEqual','\x27\x20requires\x20a\x20value','string','boolean','Average','from','204JdbbhG','month','funnel_stage','Max','EndWith','hour','timestamp','TimeRange','MISSING_BETWEEN_BOUNDS','custom','Column','Segment\x20name\x20is\x20required','union','realtime','enum','TimeWithinNext','day','max','Regexp','And','operator','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','656HPtHPz','has','discriminatedUnion','min','unit','Equal','value','optional','segment','CountDistinct','object','array','MISSING_TIME_UNIT','Min','IsNull','595342aFZHic','7329gErXVz','9ZjwttE','Sum','TimeRange\x20operator\x20requires\x20\x27duration\x27','7845900msVjke','135021CbmUbI','batch','number','Segment\x20reference\x20must\x20not\x20be\x20empty','Less','minute','Behavior','TimeWithinPast','include','record','year','1606115ivjmFg','any','duration','Last'];a152_0x475c=function(){return _0x177c7d;};return a152_0x475c();}export const SegmentDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x1fb))[a152_0xf1e1b0(0x1fa)](),'name':z[a152_0xf1e1b0(0x22d)]()['min'](0x1,a152_0xf1e1b0(0x23c)),'description':z['string']()[a152_0xf1e1b0(0x1fa)](),'folder':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)](),'rule':RuleDefSchema[a152_0xf1e1b0(0x1fa)](),'kind':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x209),a152_0xf1e1b0(0x1e9),a152_0xf1e1b0(0x233)])['optional'](),'visible':z[a152_0xf1e1b0(0x22e)]()[a152_0xf1e1b0(0x1fa)](),'activations':z[a152_0xf1e1b0(0x1fe)](z[a152_0xf1e1b0(0x214)]())[a152_0xf1e1b0(0x1fa)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a152_0x1f6bc0=a152_0x4d3f;(function(_0x47227b,_0x1e967b){const _0x202f51=a152_0x4d3f,_0x5ae0cd=_0x47227b();while(!![]){try{const _0x756803=-parseInt(_0x202f51(0x103))/0x1+parseInt(_0x202f51(0xd5))/0x2*(parseInt(_0x202f51(0xc4))/0x3)+-parseInt(_0x202f51(0xd0))/0x4+parseInt(_0x202f51(0xe7))/0x5*(-parseInt(_0x202f51(0xf1))/0x6)+-parseInt(_0x202f51(0xfe))/0x7+parseInt(_0x202f51(0xe8))/0x8*(parseInt(_0x202f51(0xdf))/0x9)+parseInt(_0x202f51(0xf9))/0xa;if(_0x756803===_0x1e967b)break;else _0x5ae0cd['push'](_0x5ae0cd['shift']());}catch(_0x2cc177){_0x5ae0cd['push'](_0x5ae0cd['shift']());}}}(a152_0x518a,0x2488d));import{z}from'zod';export const OperatorTypeSchema=z[a152_0x1f6bc0(0x111)](['Equal',a152_0x1f6bc0(0x101),a152_0x1f6bc0(0x106),a152_0x1f6bc0(0xde),a152_0x1f6bc0(0xdd),'In','Between',a152_0x1f6bc0(0xf0),a152_0x1f6bc0(0xea),a152_0x1f6bc0(0xee),a152_0x1f6bc0(0xc6),a152_0x1f6bc0(0xf4),'StartWith',a152_0x1f6bc0(0xcc),a152_0x1f6bc0(0xfa)]);export const TimeUnitSchema=z['enum']([a152_0x1f6bc0(0x108),a152_0x1f6bc0(0xe5),'hour',a152_0x1f6bc0(0xe4),a152_0x1f6bc0(0xc9),a152_0x1f6bc0(0xcb),'year']);export const AggregationTypeSchema=z['enum'](['Count',a152_0x1f6bc0(0xd7),a152_0x1f6bc0(0xfc),a152_0x1f6bc0(0xc8),a152_0x1f6bc0(0xca),a152_0x1f6bc0(0xdc),a152_0x1f6bc0(0x10c),a152_0x1f6bc0(0xf8)]);const TemporalValueSchema=z[a152_0x1f6bc0(0xcd)]([z['object']({'timestamp':z['string']()}),z['object']({'last':z['union']([z[a152_0x1f6bc0(0xd8)](),z[a152_0x1f6bc0(0x102)](z[a152_0x1f6bc0(0xd2)](),z[a152_0x1f6bc0(0xd8)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a152_0x1f6bc0(0xcd)]([z[a152_0x1f6bc0(0xd2)](),z['number'](),z[a152_0x1f6bc0(0x115)](),TemporalValueSchema,z[a152_0x1f6bc0(0xcf)](z[a152_0x1f6bc0(0xcd)]([z[a152_0x1f6bc0(0xd2)](),z[a152_0x1f6bc0(0xd8)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x1f6bc0(0xec),a152_0x1f6bc0(0x101),a152_0x1f6bc0(0xde),a152_0x1f6bc0(0x106),'LessEqual','In',a152_0x1f6bc0(0xf4),a152_0x1f6bc0(0xe3),a152_0x1f6bc0(0xcc),a152_0x1f6bc0(0xf0),a152_0x1f6bc0(0xee),a152_0x1f6bc0(0xc6)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0x1f6bc0(0xc6)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a152_0x1f6bc0(0x115)]()[a152_0x1f6bc0(0xeb)](),'value':OperatorValueSchema[a152_0x1f6bc0(0xeb)](),'min':z[a152_0x1f6bc0(0xcd)]([z[a152_0x1f6bc0(0xd8)](),z['string'](),TemporalValueSchema])[a152_0x1f6bc0(0xeb)](),'max':z[a152_0x1f6bc0(0xcd)]([z['number'](),z[a152_0x1f6bc0(0xd2)](),TemporalValueSchema])[a152_0x1f6bc0(0xeb)](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a152_0x1f6bc0(0xd8)]()[a152_0x1f6bc0(0xeb)](),'week':z[a152_0x1f6bc0(0xd8)]()[a152_0x1f6bc0(0xeb)](),'month':z['number']()[a152_0x1f6bc0(0xeb)](),'year':z[a152_0x1f6bc0(0xd8)]()['optional'](),'hour':z[a152_0x1f6bc0(0xd8)]()['optional'](),'minute':z[a152_0x1f6bc0(0xd8)]()[a152_0x1f6bc0(0xeb)](),'second':z[a152_0x1f6bc0(0xd8)]()[a152_0x1f6bc0(0xeb)]()})[a152_0x1f6bc0(0xeb)](),'from':z[a152_0x1f6bc0(0xce)]({'last':z[a152_0x1f6bc0(0xcd)]([z[a152_0x1f6bc0(0xd8)](),z[a152_0x1f6bc0(0xd2)]()]),'unit':TimeUnitSchema})[a152_0x1f6bc0(0xeb)](),'reverse':z['boolean']()[a152_0x1f6bc0(0xeb)]()})[a152_0x1f6bc0(0x109)]((_0x117291,_0x3aebee)=>{const _0x1fa08d=a152_0x1f6bc0;OPERATORS_REQUIRING_VALUE[_0x1fa08d(0xc7)](_0x117291[_0x1fa08d(0xe6)])&&(_0x117291[_0x1fa08d(0x100)]===undefined||_0x117291[_0x1fa08d(0x100)]===null)&&_0x3aebee[_0x1fa08d(0x10f)]({'code':_0x1fa08d(0xe9),'message':_0x1fa08d(0xd9)+_0x117291[_0x1fa08d(0xe6)]+_0x1fa08d(0x114),'path':['value']}),_0x117291[_0x1fa08d(0xe6)]===_0x1fa08d(0xf2)&&_0x117291[_0x1fa08d(0x105)]===undefined&&_0x117291[_0x1fa08d(0x10b)]===undefined&&_0x3aebee['addIssue']({'code':_0x1fa08d(0xe9),'message':_0x1fa08d(0x113),'params':{'validationCode':_0x1fa08d(0xe0)}}),OPERATORS_REQUIRING_UNIT[_0x1fa08d(0xc7)](_0x117291[_0x1fa08d(0xe6)])&&_0x117291[_0x1fa08d(0x100)]!==undefined&&!_0x117291['unit']&&_0x3aebee[_0x1fa08d(0x10f)]({'code':_0x1fa08d(0xe9),'message':_0x1fa08d(0xd9)+_0x117291[_0x1fa08d(0xe6)]+_0x1fa08d(0xd3),'path':[_0x1fa08d(0xf6)],'params':{'validationCode':_0x1fa08d(0x112)}}),_0x117291[_0x1fa08d(0xe6)]===_0x1fa08d(0xfa)&&(!_0x117291[_0x1fa08d(0xfb)]&&_0x3aebee[_0x1fa08d(0x10f)]({'code':_0x1fa08d(0xe9),'message':_0x1fa08d(0xd6),'path':[_0x1fa08d(0xfb)]}),!_0x117291['from']&&_0x3aebee[_0x1fa08d(0x10f)]({'code':_0x1fa08d(0xe9),'message':_0x1fa08d(0xf3),'path':[_0x1fa08d(0x10e)]}));});export const ArrayMatchingSchema=z[a152_0x1f6bc0(0xcd)]([z[a152_0x1f6bc0(0x110)]('any'),z[a152_0x1f6bc0(0x110)](a152_0x1f6bc0(0xed)),z['object']({'atLeast':z['number']()}),z[a152_0x1f6bc0(0xce)]({'atMost':z[a152_0x1f6bc0(0xd8)]()}),z[a152_0x1f6bc0(0xce)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a152_0x1f6bc0(0xf7)](a152_0x1f6bc0(0xe6),[z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x111)]([a152_0x1f6bc0(0xd7),a152_0x1f6bc0(0xc8),'Max',a152_0x1f6bc0(0xfc)]),'column':z[a152_0x1f6bc0(0xd2)](),'groupingColumns':z[a152_0x1f6bc0(0xcf)](z[a152_0x1f6bc0(0xd2)]())[a152_0x1f6bc0(0xeb)]()}),z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x110)](a152_0x1f6bc0(0xdb)),'groupingColumns':z[a152_0x1f6bc0(0xcf)](z[a152_0x1f6bc0(0xd2)]())[a152_0x1f6bc0(0xeb)]()}),z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x110)](a152_0x1f6bc0(0xdc)),'columns':z['array'](z[a152_0x1f6bc0(0xd2)]())}),z[a152_0x1f6bc0(0xce)]({'type':z['enum']([a152_0x1f6bc0(0x10c),a152_0x1f6bc0(0xf8)]),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a152_0x1f6bc0(0xcf)](z['string']())[a152_0x1f6bc0(0xeb)]()})]);export const TimeWindowDefSchema=z[a152_0x1f6bc0(0xce)]({'duration':z[a152_0x1f6bc0(0xd8)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x1f6bc0(0xee),a152_0x1f6bc0(0xc6),a152_0x1f6bc0(0xfa)]);export const FilterColumnConditionDefSchema=z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x110)]('Column'),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x1f6bc0(0xeb)]()})[a152_0x1f6bc0(0x109)]((_0x54f4eb,_0x4f42bf)=>{const _0x601cfd=a152_0x1f6bc0,_0x528c74=_0x54f4eb['operator'][_0x601cfd(0xe6)];_0x54f4eb[_0x601cfd(0xd1)]===_0x601cfd(0x10a)?!TIMESTAMP_OPERATORS[_0x601cfd(0xc7)](_0x528c74)&&_0x4f42bf['addIssue']({'code':_0x601cfd(0xe9),'message':_0x601cfd(0xef)+_0x528c74+'\x27)','path':['operator',_0x601cfd(0xe6)]}):TIMESTAMP_OPERATORS['has'](_0x528c74)&&_0x4f42bf[_0x601cfd(0x10f)]({'code':'custom','message':_0x601cfd(0xd9)+_0x528c74+_0x601cfd(0xe2),'path':[_0x601cfd(0x116),_0x601cfd(0xe6)]});});export const FilterRuleDefSchema=z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x110)]('And'),'conditions':z[a152_0x1f6bc0(0xcf)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0x1f6bc0(0xc5)](()=>z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x110)](a152_0x1f6bc0(0xe1)),'attribute':z[a152_0x1f6bc0(0xd2)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x1f6bc0(0xeb)](),'exclude':z[a152_0x1f6bc0(0x115)]()[a152_0x1f6bc0(0xeb)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0x1f6bc0(0xd2)]()[a152_0x1f6bc0(0xeb)](),'filter':FilterRuleDefSchema[a152_0x1f6bc0(0xeb)](),'limit':z[a152_0x1f6bc0(0xd8)]()[a152_0x1f6bc0(0xeb)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a152_0x1f6bc0(0x110)](a152_0x1f6bc0(0xfd)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x1f6bc0(0xeb)](),'exclude':z[a152_0x1f6bc0(0x115)]()[a152_0x1f6bc0(0xeb)](),'aggregation':AggregationDefSchema[a152_0x1f6bc0(0xeb)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a152_0x1f6bc0(0xeb)](),'timeWindow':TimeWindowDefSchema[a152_0x1f6bc0(0xeb)](),'limit':z[a152_0x1f6bc0(0xd8)]()[a152_0x1f6bc0(0xeb)]()}));export const ColumnConditionDefSchema=z[a152_0x1f6bc0(0xce)]({'type':z['literal'](a152_0x1f6bc0(0xd4)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a152_0x1f6bc0(0xc5)](()=>z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x111)](['And','Or']),'conditions':z[a152_0x1f6bc0(0xcf)](ConditionDefSchema),'description':z[a152_0x1f6bc0(0xd2)]()['optional']()}));function a152_0x4d3f(_0x2ce158,_0x51d66c){_0x2ce158=_0x2ce158-0xc4;const _0x518a8a=a152_0x518a();let _0x4d3fe2=_0x518a8a[_0x2ce158];return _0x4d3fe2;}export const SegmentRefConditionDefSchema=z['object']({'type':z[a152_0x1f6bc0(0x111)]([a152_0x1f6bc0(0x107),a152_0x1f6bc0(0x104)]),'segment':z[a152_0x1f6bc0(0xd2)]()[a152_0x1f6bc0(0x105)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a152_0x1f6bc0(0xc5)](()=>z[a152_0x1f6bc0(0xcd)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x111)](['And','Or']),'conditions':z[a152_0x1f6bc0(0xcf)](ConditionDefSchema),'description':z[a152_0x1f6bc0(0xd2)]()[a152_0x1f6bc0(0xeb)]()}));export const SegmentDefSchema=z[a152_0x1f6bc0(0xce)]({'type':z[a152_0x1f6bc0(0x110)](a152_0x1f6bc0(0x10d))[a152_0x1f6bc0(0xeb)](),'name':z[a152_0x1f6bc0(0xd2)]()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z['string']()[a152_0x1f6bc0(0xeb)](),'folder':z[a152_0x1f6bc0(0xd2)]()[a152_0x1f6bc0(0xeb)](),'rule':RuleDefSchema['optional'](),'kind':z[a152_0x1f6bc0(0x111)]([a152_0x1f6bc0(0xf5),a152_0x1f6bc0(0xff),a152_0x1f6bc0(0xda)])[a152_0x1f6bc0(0xeb)](),'visible':z[a152_0x1f6bc0(0x115)]()[a152_0x1f6bc0(0xeb)](),'activations':z['array'](z['any']())[a152_0x1f6bc0(0xeb)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;function a152_0x518a(){const _0x393570=['MISSING_TIME_UNIT','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','\x27\x20requires\x20a\x20value','boolean','operator','3DAWkRC','lazy','TimeWithinNext','has','Min','week','Max','month','EndWith','union','object','array','1035732pxpSYS','column','string','\x27\x20requires\x20a\x20time\x20unit','Column','560546Gwyelh','TimeRange\x20operator\x20requires\x20\x27duration\x27','Sum','number','Operator\x20\x27','funnel_stage','Count','CountDistinct','LessEqual','GreaterEqual','9czPIiP','MISSING_BETWEEN_BOUNDS','Value','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','StartWith','day','minute','type','260lTBcEt','1657960sDMmhx','custom','IsNull','optional','Equal','all','TimeWithinPast','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Regexp','28890vgRdxS','Between','TimeRange\x20operator\x20requires\x20\x27from\x27','Contain','batch','unit','discriminatedUnion','Last','5390540NAjkWu','TimeRange','duration','Average','Behavior','780591luvTJa','realtime','value','Greater','record','256101sEtlOU','exclude','min','Less','include','second','superRefine','timestamp','max','First','segment','from','addIssue','literal','enum'];a152_0x518a=function(){return _0x393570;};return a152_0x518a();}
@@ -1 +1 @@
1
- const a153_0x449fd5=a153_0x2457;(function(_0x17edd2,_0x2e227b){const _0x1ec674=a153_0x2457,_0x565d26=_0x17edd2();while(!![]){try{const _0x382947=parseInt(_0x1ec674(0x132))/0x1+parseInt(_0x1ec674(0x11a))/0x2+-parseInt(_0x1ec674(0x120))/0x3+parseInt(_0x1ec674(0x11e))/0x4*(-parseInt(_0x1ec674(0x12c))/0x5)+-parseInt(_0x1ec674(0x117))/0x6+parseInt(_0x1ec674(0x118))/0x7*(parseInt(_0x1ec674(0x134))/0x8)+parseInt(_0x1ec674(0x12a))/0x9*(parseInt(_0x1ec674(0x12b))/0xa);if(_0x382947===_0x2e227b)break;else _0x565d26['push'](_0x565d26['shift']());}catch(_0x520a23){_0x565d26['push'](_0x565d26['shift']());}}}(a153_0x2f13,0x989ae));import{readFileSync}from'fs';function a153_0x2457(_0x31179f,_0x1fd505){_0x31179f=_0x31179f-0x116;const _0x2f139b=a153_0x2f13();let _0x2457b1=_0x2f139b[_0x31179f];return _0x2457b1;}import*as a153_0x36dd5f from'path';import*as a153_0x3523f9 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(['email',a153_0x449fd5(0x133)]);export function isJourneyDef(_0x1e1335){const _0x4be7a5=a153_0x449fd5;return typeof _0x1e1335===_0x4be7a5(0x11f)&&_0x1e1335!==null&&'type'in _0x1e1335&&_0x1e1335[_0x4be7a5(0x127)]===_0x4be7a5(0x126);}export function isCampaignDef(_0x361426){const _0x4bc12c=a153_0x449fd5;if(typeof _0x361426!==_0x4bc12c(0x11f)||_0x361426===null)return![];const _0x34c759=_0x361426,_0x13eac8=VALID_CAMPAIGN_TYPES['has'](_0x34c759['campaign_type']);if(_0x34c759[_0x4bc12c(0x127)]===_0x4bc12c(0x131)&&_0x13eac8)return!![];if(_0x13eac8&&!_0x34c759[_0x4bc12c(0x127)])return!![];return![];}export function isTemplateDef(_0x3a4124){const _0x5095cd=a153_0x449fd5;return typeof _0x3a4124===_0x5095cd(0x11f)&&_0x3a4124!==null&&_0x5095cd(0x127)in _0x3a4124&&_0x3a4124[_0x5095cd(0x127)]===_0x5095cd(0x11b);}export function isValidationResult(_0x8e463c){const _0x29880c=a153_0x449fd5;return!(_0x29880c(0x11d)in _0x8e463c);}function a153_0x2f13(){const _0x2fa73a=['5697923ILEfWu','length','806098NZmJns','template','not\x20a\x20','skipped','4394812yQtyss','object','3303504eASbhL','segment','warnings','parseDocument','valid','relative','journey','type','error','toJSON','9tUInaY','16249670KcuKLu','5axlYYf','utf-8','message','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','basename','campaign','112423xvcSJa','push','8CnaRog','filterType','result','YAML\x20parse\x20error:\x20','776922QWllGq'];a153_0x2f13=function(){return _0x2fa73a;};return a153_0x2f13();}export function createParseErrorResult(_0x53c476,_0x5c4f4c,_0x3b8421,_0x126678,_0x15f706=a153_0x449fd5(0x121)){const _0x539ab1=a153_0x449fd5;return{'filePath':_0x53c476,'relativePath':_0x5c4f4c,'source':_0x3b8421,'result':{'valid':![],'errors':[{'level':_0x539ab1(0x128),'path':'','code':'YAML_PARSE_ERROR','message':_0x126678}],'warnings':[]},'fileType':_0x15f706};}export function validateYamlFile(_0x393882,_0x6f0087,_0x3823e9={}){const _0x57b508=a153_0x449fd5,_0x481aeb=a153_0x36dd5f[_0x57b508(0x125)](_0x6f0087,_0x393882)||a153_0x36dd5f[_0x57b508(0x130)](_0x393882);try{const _0x4efb14=readFileSync(_0x393882,_0x57b508(0x12d)),_0x33f968=a153_0x3523f9[_0x57b508(0x123)](_0x4efb14),_0x3a5dc0=_0x33f968[_0x57b508(0x129)]();if(!_0x3a5dc0)return createParseErrorResult(_0x393882,_0x481aeb,_0x4efb14,_0x57b508(0x12f));let _0x1a418d;if(isJourneyDef(_0x3a5dc0))_0x1a418d=_0x57b508(0x126);else{if(isCampaignDef(_0x3a5dc0))_0x1a418d=_0x57b508(0x131);else isTemplateDef(_0x3a5dc0)?_0x1a418d=_0x57b508(0x11b):_0x1a418d=_0x57b508(0x121);}if(_0x3823e9[_0x57b508(0x135)]&&_0x1a418d!==_0x3823e9[_0x57b508(0x135)])return{'filePath':_0x393882,'relativePath':_0x481aeb,'skipped':!![],'reason':_0x57b508(0x11c)+_0x3823e9[_0x57b508(0x135)]};const _0x3b0caf={'source':_0x4efb14,'document':_0x33f968};let _0xb4f2d2;if(_0x1a418d==='journey')_0xb4f2d2=validateJourneyDef(_0x3a5dc0,_0x3b0caf);else{if(_0x1a418d===_0x57b508(0x131))_0xb4f2d2=validateCampaignDef(_0x3a5dc0,_0x3b0caf);else _0x1a418d===_0x57b508(0x11b)?_0xb4f2d2=validateTemplateDef(_0x3a5dc0,_0x3b0caf):_0xb4f2d2=validateSegmentDef(_0x3a5dc0,_0x3b0caf);}return{'filePath':_0x393882,'relativePath':_0x481aeb,'source':_0x4efb14,'result':_0xb4f2d2,'fileType':_0x1a418d};}catch(_0x57ba53){const _0x59f049=_0x57ba53 instanceof Error?_0x57ba53[_0x57b508(0x12e)]:String(_0x57ba53);return createParseErrorResult(_0x393882,_0x481aeb,'',_0x57b508(0x116)+_0x59f049);}}export function validateYamlFiles(_0x502a56,_0x28c95c,_0x11839f={}){return _0x502a56['map'](_0x4ea306=>validateYamlFile(_0x4ea306,_0x28c95c,_0x11839f));}export function calculateSummary(_0x252284){const _0x4c6bc8=a153_0x449fd5;let _0x447246=0x0,_0x4f1abf=0x0,_0x2e537b=0x0,_0x23645e=0x0;for(const _0x1e1494 of _0x252284){if(!isValidationResult(_0x1e1494)){_0x23645e++;continue;}_0x1e1494[_0x4c6bc8(0x136)][_0x4c6bc8(0x124)]?_0x447246++:_0x4f1abf++,_0x2e537b+=_0x1e1494[_0x4c6bc8(0x136)][_0x4c6bc8(0x122)][_0x4c6bc8(0x119)];}return{'validCount':_0x447246,'invalidCount':_0x4f1abf,'warningCount':_0x2e537b,'skippedCount':_0x23645e,'hasErrors':_0x4f1abf>0x0};}
1
+ function a153_0x39f3(){const _0x2185da=['370AOzszV','segment','type','valid','34800akhduj','69507xcJqgx','template','utf-8','campaign_type','email','parseDocument','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','filterType','2Tolcfv','result','76425XQtUsT','453684MrFxWf','message','push','529996vDrfWI','1370Keuxzz','map','skipped','446544IFUwnS','campaign','basename','error','1416616FDrCZP','object','relative'];a153_0x39f3=function(){return _0x2185da;};return a153_0x39f3();}function a153_0x811f(_0x35af5c,_0x25f3ea){_0x35af5c=_0x35af5c-0x120;const _0x39f335=a153_0x39f3();let _0x811f22=_0x39f335[_0x35af5c];return _0x811f22;}const a153_0x4c5ce8=a153_0x811f;(function(_0x3dba8d,_0x4a4b33){const _0x3df160=a153_0x811f,_0x3f25a0=_0x3dba8d();while(!![]){try{const _0x1b11dd=-parseInt(_0x3df160(0x125))/0x1+-parseInt(_0x3df160(0x122))/0x2*(-parseInt(_0x3df160(0x124))/0x3)+parseInt(_0x3df160(0x128))/0x4+parseInt(_0x3df160(0x133))/0x5*(-parseInt(_0x3df160(0x137))/0x6)+-parseInt(_0x3df160(0x12c))/0x7+parseInt(_0x3df160(0x130))/0x8+-parseInt(_0x3df160(0x138))/0x9*(-parseInt(_0x3df160(0x129))/0xa);if(_0x1b11dd===_0x4a4b33)break;else _0x3f25a0['push'](_0x3f25a0['shift']());}catch(_0x457021){_0x3f25a0['push'](_0x3f25a0['shift']());}}}(a153_0x39f3,0x6cfda));import{readFileSync}from'fs';import*as a153_0x143a6f from'path';import*as a153_0x573dac 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_0x4c5ce8(0x13c),a153_0x4c5ce8(0x127)]);export function isJourneyDef(_0xdd6b7d){const _0x25e798=a153_0x4c5ce8;return typeof _0xdd6b7d===_0x25e798(0x131)&&_0xdd6b7d!==null&&_0x25e798(0x135)in _0xdd6b7d&&_0xdd6b7d[_0x25e798(0x135)]==='journey';}export function isCampaignDef(_0x56c8dd){const _0x467506=a153_0x4c5ce8;if(typeof _0x56c8dd!==_0x467506(0x131)||_0x56c8dd===null)return![];const _0xcac366=_0x56c8dd,_0x137992=VALID_CAMPAIGN_TYPES['has'](_0xcac366[_0x467506(0x13b)]);if(_0xcac366[_0x467506(0x135)]===_0x467506(0x12d)&&_0x137992)return!![];if(_0x137992&&!_0xcac366[_0x467506(0x135)])return!![];return![];}export function isTemplateDef(_0x2535fb){const _0x388eb2=a153_0x4c5ce8;return typeof _0x2535fb==='object'&&_0x2535fb!==null&&'type'in _0x2535fb&&_0x2535fb[_0x388eb2(0x135)]===_0x388eb2(0x139);}export function isValidationResult(_0x9e69e8){const _0x12ceb3=a153_0x4c5ce8;return!(_0x12ceb3(0x12b)in _0x9e69e8);}export function createParseErrorResult(_0x3523bd,_0x4b9b93,_0x469ea3,_0x1bed4e,_0x4b79cb=a153_0x4c5ce8(0x134)){const _0x2b5120=a153_0x4c5ce8;return{'filePath':_0x3523bd,'relativePath':_0x4b9b93,'source':_0x469ea3,'result':{'valid':![],'errors':[{'level':_0x2b5120(0x12f),'path':'','code':'YAML_PARSE_ERROR','message':_0x1bed4e}],'warnings':[]},'fileType':_0x4b79cb};}export function validateYamlFile(_0x517a45,_0xffc1e,_0x4547fb={}){const _0x1427c7=a153_0x4c5ce8,_0x10c228=a153_0x143a6f[_0x1427c7(0x132)](_0xffc1e,_0x517a45)||a153_0x143a6f[_0x1427c7(0x12e)](_0x517a45);try{const _0x4bdc44=readFileSync(_0x517a45,_0x1427c7(0x13a)),_0x138593=a153_0x573dac[_0x1427c7(0x13d)](_0x4bdc44),_0x34bfba=_0x138593['toJSON']();if(!_0x34bfba)return createParseErrorResult(_0x517a45,_0x10c228,_0x4bdc44,_0x1427c7(0x120));let _0x277281;if(isJourneyDef(_0x34bfba))_0x277281='journey';else{if(isCampaignDef(_0x34bfba))_0x277281='campaign';else isTemplateDef(_0x34bfba)?_0x277281=_0x1427c7(0x139):_0x277281='segment';}if(_0x4547fb['filterType']&&_0x277281!==_0x4547fb[_0x1427c7(0x121)])return{'filePath':_0x517a45,'relativePath':_0x10c228,'skipped':!![],'reason':'not\x20a\x20'+_0x4547fb['filterType']};const _0x4bef91={'source':_0x4bdc44,'document':_0x138593};let _0x1edda1;if(_0x277281==='journey')_0x1edda1=validateJourneyDef(_0x34bfba,_0x4bef91);else{if(_0x277281===_0x1427c7(0x12d))_0x1edda1=validateCampaignDef(_0x34bfba,_0x4bef91);else _0x277281==='template'?_0x1edda1=validateTemplateDef(_0x34bfba,_0x4bef91):_0x1edda1=validateSegmentDef(_0x34bfba,_0x4bef91);}return{'filePath':_0x517a45,'relativePath':_0x10c228,'source':_0x4bdc44,'result':_0x1edda1,'fileType':_0x277281};}catch(_0x4fd9d2){const _0x3f80b2=_0x4fd9d2 instanceof Error?_0x4fd9d2[_0x1427c7(0x126)]:String(_0x4fd9d2);return createParseErrorResult(_0x517a45,_0x10c228,'','YAML\x20parse\x20error:\x20'+_0x3f80b2);}}export function validateYamlFiles(_0x5e4af4,_0x396c9d,_0x4bc263={}){const _0x15d0b5=a153_0x4c5ce8;return _0x5e4af4[_0x15d0b5(0x12a)](_0x41b64d=>validateYamlFile(_0x41b64d,_0x396c9d,_0x4bc263));}export function calculateSummary(_0x1c8dd7){const _0x3bf8f0=a153_0x4c5ce8;let _0x30dd9b=0x0,_0x5827a2=0x0,_0x41b3e3=0x0,_0x2fbcd9=0x0;for(const _0x338031 of _0x1c8dd7){if(!isValidationResult(_0x338031)){_0x2fbcd9++;continue;}_0x338031[_0x3bf8f0(0x123)][_0x3bf8f0(0x136)]?_0x30dd9b++:_0x5827a2++,_0x41b3e3+=_0x338031[_0x3bf8f0(0x123)]['warnings']['length'];}return{'validCount':_0x30dd9b,'invalidCount':_0x5827a2,'warningCount':_0x41b3e3,'skippedCount':_0x2fbcd9,'hasErrors':_0x5827a2>0x0};}
@@ -1 +1 @@
1
- (function(_0x2ce6a9,_0x5c94da){const _0x5516f1=a154_0x5ac7,_0x1d874f=_0x2ce6a9();while(!![]){try{const _0x5cbdd8=-parseInt(_0x5516f1(0x1ac))/0x1*(parseInt(_0x5516f1(0x1ad))/0x2)+parseInt(_0x5516f1(0x1b7))/0x3*(parseInt(_0x5516f1(0x1a9))/0x4)+parseInt(_0x5516f1(0x1c1))/0x5+-parseInt(_0x5516f1(0x1c5))/0x6*(-parseInt(_0x5516f1(0x1a8))/0x7)+-parseInt(_0x5516f1(0x1ce))/0x8*(parseInt(_0x5516f1(0x1c0))/0x9)+-parseInt(_0x5516f1(0x1ca))/0xa*(parseInt(_0x5516f1(0x1c8))/0xb)+parseInt(_0x5516f1(0x1bb))/0xc;if(_0x5cbdd8===_0x5c94da)break;else _0x1d874f['push'](_0x1d874f['shift']());}catch(_0x58ed9a){_0x1d874f['push'](_0x1d874f['shift']());}}}(a154_0xb010,0xc3a9f));import*as a154_0x2c547d from'yaml';function a154_0x5ac7(_0x2fc225,_0x2b76dd){_0x2fc225=_0x2fc225-0x1a4;const _0xb010fc=a154_0xb010();let _0x5ac7ad=_0xb010fc[_0x2fc225];return _0x5ac7ad;}function a154_0xb010(){const _0x1f343b=['flatMap','push','\x20|\x20','getIn','code','range','cyan','map','path','7NGNqda','238508rEjrTm','yellow','number','5nLmSaZ','42656CoqyIP','dim','safeParse','match','location','column','object','parse','toString','pop','15nTESWp','invalid_union','repeat','warnings','13712196HLdGtq','max','level','red','message','1216638vdOOIa','1694585XFGWqi','\x27:\x20','YAML\x20validation\x20error\x20at\x20\x27','split','7854774kXUqRE','join','length','662145Woedys','error','250wZbOyw','contents','data','errors','40LSMCXn'];a154_0xb010=function(){return _0x1f343b;};return a154_0xb010();}import a154_0x50d6ad from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x42d7cf,_0x3a8d03,_0x276574){const _0x5638e3=a154_0x5ac7;if(!_0x42d7cf||!_0x3a8d03)return undefined;try{let _0x49e4fa=_0x42d7cf[_0x5638e3(0x1d2)](_0x276574,!![]),_0x52b36c=[..._0x276574];while((!_0x49e4fa||typeof _0x49e4fa!=='object'||!('range'in _0x49e4fa)||!_0x49e4fa[_0x5638e3(0x1a4)])&&_0x52b36c[_0x5638e3(0x1c7)]>0x0){_0x52b36c[_0x5638e3(0x1b6)](),_0x49e4fa=_0x52b36c[_0x5638e3(0x1c7)]>0x0?_0x42d7cf[_0x5638e3(0x1d2)](_0x52b36c,!![]):_0x42d7cf[_0x5638e3(0x1cb)];}if(!_0x49e4fa||typeof _0x49e4fa!=='object'||!(_0x5638e3(0x1a4)in _0x49e4fa)||!_0x49e4fa[_0x5638e3(0x1a4)])return undefined;const [_0x5af52d]=_0x49e4fa['range'];return offsetToLocation(_0x3a8d03,_0x5af52d);}catch{return undefined;}}export function offsetToLocation(_0x4754b4,_0x1ca39e){const _0x47dabd=a154_0x5ac7;let _0x10f9e4=0x1,_0x33df50=0x1;for(let _0x5a10a2=0x0;_0x5a10a2<_0x1ca39e&&_0x5a10a2<_0x4754b4[_0x47dabd(0x1c7)];_0x5a10a2++){_0x4754b4[_0x5a10a2]==='\x0a'?(_0x10f9e4++,_0x33df50=0x1):_0x33df50++;}return{'line':_0x10f9e4,'column':_0x33df50,'offset':_0x1ca39e};}export function pathToArray(_0x164a44){const _0x4c12f0=a154_0x5ac7;if(!_0x164a44)return[];return _0x164a44[_0x4c12f0(0x1c4)]('.')[_0x4c12f0(0x1cf)](_0x315170=>{const _0x51563b=_0x4c12f0,_0x469faf=_0x315170[_0x51563b(0x1b0)](/^(\w+)\[(\d+)\]$/);if(_0x469faf)return[_0x469faf[0x1],parseInt(_0x469faf[0x2],0xa)];return[_0x315170];});}export function formatZodPath(_0x1611e4){const _0x4555d0=a154_0x5ac7;let _0x22b086='';for(const _0x851407 of _0x1611e4){if(typeof _0x851407===_0x4555d0(0x1ab))_0x22b086+='['+_0x851407+']';else{const _0x839b3a=String(_0x851407);_0x22b086+=_0x22b086?'.'+_0x839b3a:_0x839b3a;}}return _0x22b086;}export function flattenZodIssues(_0x59fdd5){const _0x4c21a0=a154_0x5ac7,_0x15b5c1=[];for(const _0x355bea of _0x59fdd5){if(_0x355bea[_0x4c21a0(0x1d3)]===_0x4c21a0(0x1b8)&&_0x4c21a0(0x1cd)in _0x355bea){const _0x28344e=_0x355bea[_0x4c21a0(0x1cd)];let _0x45a197=_0x28344e[0x0]||[];for(const _0xec009a of _0x28344e){_0xec009a[_0x4c21a0(0x1c7)]<_0x45a197['length']&&(_0x45a197=_0xec009a);}const _0x234f30=_0x45a197[_0x4c21a0(0x1a6)](_0x4ed484=>({..._0x4ed484,'path':[..._0x355bea[_0x4c21a0(0x1a7)],..._0x4ed484[_0x4c21a0(0x1a7)]]}));_0x15b5c1[_0x4c21a0(0x1d0)](...flattenZodIssues(_0x234f30));}else _0x15b5c1[_0x4c21a0(0x1d0)](_0x355bea);}return _0x15b5c1;}export function safeParseYaml(_0x2c10c7,_0xbf21b3){const _0x1523ec=a154_0x5ac7,_0x5d3674=a154_0x2c547d[_0x1523ec(0x1b4)](_0x2c10c7);if(!_0x5d3674||typeof _0x5d3674!==_0x1523ec(0x1b3))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x328a57=_0xbf21b3[_0x1523ec(0x1af)](_0x5d3674);if(!_0x328a57['success']){const _0xed56f2=_0x328a57[_0x1523ec(0x1c9)]['issues'][0x0],_0x390144=formatZodPath(_0xed56f2[_0x1523ec(0x1a7)]);throw new Error(_0x390144?_0x1523ec(0x1c3)+_0x390144+_0x1523ec(0x1c2)+_0xed56f2[_0x1523ec(0x1bf)]:'YAML\x20validation\x20error:\x20'+_0xed56f2[_0x1523ec(0x1bf)]);}return _0x328a57[_0x1523ec(0x1cc)];}export function formatIssueWithContext(_0x1438ce,_0x49d8bd,_0xaf8e3d){const _0x55064c=a154_0x5ac7,_0x5ed3be=[],_0x499aad=_0x1438ce[_0x55064c(0x1bd)]===_0x55064c(0x1c9),_0x3d0a2e=_0x499aad?a154_0x50d6ad[_0x55064c(0x1be)]:a154_0x50d6ad[_0x55064c(0x1aa)],_0xdf8034=_0x499aad?a154_0x50d6ad[_0x55064c(0x1be)]:a154_0x50d6ad['yellow'],_0x3f6caa=_0xaf8e3d?a154_0x50d6ad[_0x55064c(0x1a5)](_0xaf8e3d+':'):'';if(_0x1438ce[_0x55064c(0x1b1)]){const _0x465de2=a154_0x50d6ad[_0x55064c(0x1a5)](_0x1438ce[_0x55064c(0x1b1)]['line']+':'+_0x1438ce[_0x55064c(0x1b1)][_0x55064c(0x1b2)]);_0x5ed3be[_0x55064c(0x1d0)](''+_0x3f6caa+_0x465de2+':\x20'+_0x3d0a2e(_0x1438ce[_0x55064c(0x1bd)])+'\x20'+_0xdf8034('['+_0x1438ce[_0x55064c(0x1d3)]+']'));}else _0x5ed3be['push'](''+_0x3f6caa+a154_0x50d6ad['dim'](_0x1438ce[_0x55064c(0x1a7)])+':\x20'+_0x3d0a2e(_0x1438ce['level'])+'\x20'+_0xdf8034('['+_0x1438ce[_0x55064c(0x1d3)]+']'));_0x5ed3be[_0x55064c(0x1d0)](_0x1438ce[_0x55064c(0x1bf)]);if(_0x1438ce['location']&&_0x49d8bd){const _0x4ef643=_0x49d8bd[_0x55064c(0x1c4)]('\x0a'),{line:_0x603315,column:_0x1ce5cb}=_0x1438ce[_0x55064c(0x1b1)],_0x2f9546=Math[_0x55064c(0x1bc)](0x1,_0x603315-0x1),_0x521ff8=Math['min'](_0x4ef643[_0x55064c(0x1c7)],_0x603315+0x1);_0x5ed3be[_0x55064c(0x1d0)]('');for(let _0x5030c3=_0x2f9546;_0x5030c3<=_0x521ff8;_0x5030c3++){const _0x2a09a3=_0x4ef643[_0x5030c3-0x1]||'',_0x2441b1=a154_0x50d6ad['dim'](_0x5030c3[_0x55064c(0x1b5)]()['padStart'](0x4)),_0x309a09=a154_0x50d6ad[_0x55064c(0x1ae)](_0x55064c(0x1d1));if(_0x5030c3===_0x603315){_0x5ed3be[_0x55064c(0x1d0)]('\x20\x20'+_0x2441b1+_0x309a09+_0x3d0a2e(_0x2a09a3));const _0x5ba760='\x20'[_0x55064c(0x1b9)](0x4+0x3+_0x1ce5cb-0x1);_0x5ed3be[_0x55064c(0x1d0)]('\x20\x20'+_0x5ba760+_0x3d0a2e('^'));}else _0x5ed3be[_0x55064c(0x1d0)]('\x20\x20'+_0x2441b1+_0x309a09+a154_0x50d6ad['dim'](_0x2a09a3));}}return _0x5ed3be[_0x55064c(0x1c6)]('\x0a');}export function formatValidationResult(_0x549f12,_0x13d462,_0x25ace4){const _0x23353d=a154_0x5ac7,_0x132608=[];for(const _0x5a61ee of _0x549f12['errors']){_0x132608[_0x23353d(0x1d0)](formatIssueWithContext(_0x5a61ee,_0x13d462,_0x25ace4)),_0x132608[_0x23353d(0x1d0)]('');}for(const _0x15c261 of _0x549f12[_0x23353d(0x1ba)]){_0x132608[_0x23353d(0x1d0)](formatIssueWithContext(_0x15c261,_0x13d462,_0x25ace4)),_0x132608[_0x23353d(0x1d0)]('');}return _0x132608[_0x23353d(0x1c6)]('\x0a');}
1
+ (function(_0x1d0df4,_0x26ed17){const _0x439a36=a154_0x525e,_0x4c57c3=_0x1d0df4();while(!![]){try{const _0x4050e4=-parseInt(_0x439a36(0xe7))/0x1+-parseInt(_0x439a36(0xfb))/0x2*(-parseInt(_0x439a36(0x101))/0x3)+-parseInt(_0x439a36(0xfd))/0x4+parseInt(_0x439a36(0xf4))/0x5+parseInt(_0x439a36(0xed))/0x6*(parseInt(_0x439a36(0xdf))/0x7)+parseInt(_0x439a36(0xea))/0x8*(-parseInt(_0x439a36(0xe2))/0x9)+-parseInt(_0x439a36(0xfc))/0xa*(-parseInt(_0x439a36(0xe3))/0xb);if(_0x4050e4===_0x26ed17)break;else _0x4c57c3['push'](_0x4c57c3['shift']());}catch(_0x57bea5){_0x4c57c3['push'](_0x4c57c3['shift']());}}}(a154_0x17f9,0x755b9));import*as a154_0x7320ed from'yaml';import a154_0x4896d5 from'chalk';function a154_0x525e(_0x1925e1,_0x1350bf){_0x1925e1=_0x1925e1-0xd5;const _0x17f923=a154_0x17f9();let _0x525e66=_0x17f923[_0x1925e1];return _0x525e66;}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x4382c9,_0x6b9d00,_0xe1d14){const _0x1ee9e6=a154_0x525e;if(!_0x4382c9||!_0x6b9d00)return undefined;try{let _0x40b479=_0x4382c9[_0x1ee9e6(0x102)](_0xe1d14,!![]),_0x3969da=[..._0xe1d14];while((!_0x40b479||typeof _0x40b479!==_0x1ee9e6(0xe5)||!('range'in _0x40b479)||!_0x40b479[_0x1ee9e6(0xef)])&&_0x3969da[_0x1ee9e6(0xf6)]>0x0){_0x3969da[_0x1ee9e6(0xdb)](),_0x40b479=_0x3969da[_0x1ee9e6(0xf6)]>0x0?_0x4382c9[_0x1ee9e6(0x102)](_0x3969da,!![]):_0x4382c9[_0x1ee9e6(0xfa)];}if(!_0x40b479||typeof _0x40b479!==_0x1ee9e6(0xe5)||!(_0x1ee9e6(0xef)in _0x40b479)||!_0x40b479['range'])return undefined;const [_0x4758e0]=_0x40b479[_0x1ee9e6(0xef)];return offsetToLocation(_0x6b9d00,_0x4758e0);}catch{return undefined;}}export function offsetToLocation(_0x5ae6f6,_0x437340){const _0x162b56=a154_0x525e;let _0x90b922=0x1,_0x2274a8=0x1;for(let _0x45279e=0x0;_0x45279e<_0x437340&&_0x45279e<_0x5ae6f6[_0x162b56(0xf6)];_0x45279e++){_0x5ae6f6[_0x45279e]==='\x0a'?(_0x90b922++,_0x2274a8=0x1):_0x2274a8++;}return{'line':_0x90b922,'column':_0x2274a8,'offset':_0x437340};}export function pathToArray(_0x5a383c){const _0x5d0942=a154_0x525e;if(!_0x5a383c)return[];return _0x5a383c[_0x5d0942(0xd6)]('.')[_0x5d0942(0xd9)](_0x296f70=>{const _0x3c46c3=_0x296f70['match'](/^(\w+)\[(\d+)\]$/);if(_0x3c46c3)return[_0x3c46c3[0x1],parseInt(_0x3c46c3[0x2],0xa)];return[_0x296f70];});}function a154_0x17f9(){const _0x28f745=['column','14YVsEbE','push','\x20|\x20','1476mKRapQ','2001109aazvGg','message','object','yellow','532222erLWlo','dim','safeParse','12248EkDStS','warnings','red','1094034llBkat','code','range','issues','YAML\x20validation\x20error\x20at\x20\x27','min','data','1761920mJFeIu','toString','length','join','errors','parse','contents','272slSXJz','70mitYdU','3052304PWNyLo','number','map','success','807LrvsUI','getIn','location','line','path','split','level','invalid_union','flatMap','Invalid\x20YAML:\x20expected\x20an\x20object','pop','YAML\x20validation\x20error:\x20','error'];a154_0x17f9=function(){return _0x28f745;};return a154_0x17f9();}export function formatZodPath(_0x47aab7){const _0x4bb70c=a154_0x525e;let _0x1993b8='';for(const _0x1244d9 of _0x47aab7){if(typeof _0x1244d9===_0x4bb70c(0xfe))_0x1993b8+='['+_0x1244d9+']';else{const _0x51c28e=String(_0x1244d9);_0x1993b8+=_0x1993b8?'.'+_0x51c28e:_0x51c28e;}}return _0x1993b8;}export function flattenZodIssues(_0x4fc4bc){const _0xc2b823=a154_0x525e,_0x222447=[];for(const _0x52f05f of _0x4fc4bc){if(_0x52f05f[_0xc2b823(0xee)]===_0xc2b823(0xd8)&&'errors'in _0x52f05f){const _0x2cd2a8=_0x52f05f['errors'];let _0x56bb59=_0x2cd2a8[0x0]||[];for(const _0x3a1f5c of _0x2cd2a8){_0x3a1f5c[_0xc2b823(0xf6)]<_0x56bb59[_0xc2b823(0xf6)]&&(_0x56bb59=_0x3a1f5c);}const _0x4faba9=_0x56bb59[_0xc2b823(0xff)](_0x38d7e0=>({..._0x38d7e0,'path':[..._0x52f05f[_0xc2b823(0xd5)],..._0x38d7e0[_0xc2b823(0xd5)]]}));_0x222447['push'](...flattenZodIssues(_0x4faba9));}else _0x222447['push'](_0x52f05f);}return _0x222447;}export function safeParseYaml(_0x5c28a9,_0x559a3a){const _0xe4b200=a154_0x525e,_0x452cf7=a154_0x7320ed[_0xe4b200(0xf9)](_0x5c28a9);if(!_0x452cf7||typeof _0x452cf7!=='object')throw new Error(_0xe4b200(0xda));const _0x4b3ee6=_0x559a3a[_0xe4b200(0xe9)](_0x452cf7);if(!_0x4b3ee6[_0xe4b200(0x100)]){const _0x431e5a=_0x4b3ee6[_0xe4b200(0xdd)][_0xe4b200(0xf0)][0x0],_0x5aed01=formatZodPath(_0x431e5a[_0xe4b200(0xd5)]);throw new Error(_0x5aed01?_0xe4b200(0xf1)+_0x5aed01+'\x27:\x20'+_0x431e5a[_0xe4b200(0xe4)]:_0xe4b200(0xdc)+_0x431e5a[_0xe4b200(0xe4)]);}return _0x4b3ee6[_0xe4b200(0xf3)];}export function formatIssueWithContext(_0x285f53,_0x46547d,_0x5cb237){const _0x564331=a154_0x525e,_0x4c6adf=[],_0x86dcbe=_0x285f53['level']===_0x564331(0xdd),_0x4c3390=_0x86dcbe?a154_0x4896d5[_0x564331(0xec)]:a154_0x4896d5[_0x564331(0xe6)],_0x58cf6b=_0x86dcbe?a154_0x4896d5[_0x564331(0xec)]:a154_0x4896d5['yellow'],_0x33500e=_0x5cb237?a154_0x4896d5['cyan'](_0x5cb237+':'):'';if(_0x285f53['location']){const _0x151f61=a154_0x4896d5['cyan'](_0x285f53[_0x564331(0x103)][_0x564331(0x104)]+':'+_0x285f53[_0x564331(0x103)][_0x564331(0xde)]);_0x4c6adf[_0x564331(0xe0)](''+_0x33500e+_0x151f61+':\x20'+_0x4c3390(_0x285f53[_0x564331(0xd7)])+'\x20'+_0x58cf6b('['+_0x285f53['code']+']'));}else _0x4c6adf[_0x564331(0xe0)](''+_0x33500e+a154_0x4896d5[_0x564331(0xe8)](_0x285f53['path'])+':\x20'+_0x4c3390(_0x285f53['level'])+'\x20'+_0x58cf6b('['+_0x285f53[_0x564331(0xee)]+']'));_0x4c6adf[_0x564331(0xe0)](_0x285f53[_0x564331(0xe4)]);if(_0x285f53[_0x564331(0x103)]&&_0x46547d){const _0x599895=_0x46547d['split']('\x0a'),{line:_0x555938,column:_0x4f2ca1}=_0x285f53[_0x564331(0x103)],_0x71d2ef=Math['max'](0x1,_0x555938-0x1),_0x2af2a9=Math[_0x564331(0xf2)](_0x599895[_0x564331(0xf6)],_0x555938+0x1);_0x4c6adf[_0x564331(0xe0)]('');for(let _0xe9088=_0x71d2ef;_0xe9088<=_0x2af2a9;_0xe9088++){const _0x207085=_0x599895[_0xe9088-0x1]||'',_0x49c57d=a154_0x4896d5[_0x564331(0xe8)](_0xe9088[_0x564331(0xf5)]()['padStart'](0x4)),_0x20f9bf=a154_0x4896d5['dim'](_0x564331(0xe1));if(_0xe9088===_0x555938){_0x4c6adf[_0x564331(0xe0)]('\x20\x20'+_0x49c57d+_0x20f9bf+_0x4c3390(_0x207085));const _0x151cc6='\x20'['repeat'](0x4+0x3+_0x4f2ca1-0x1);_0x4c6adf[_0x564331(0xe0)]('\x20\x20'+_0x151cc6+_0x4c3390('^'));}else _0x4c6adf[_0x564331(0xe0)]('\x20\x20'+_0x49c57d+_0x20f9bf+a154_0x4896d5[_0x564331(0xe8)](_0x207085));}}return _0x4c6adf[_0x564331(0xf7)]('\x0a');}export function formatValidationResult(_0x5369a6,_0x431efc,_0x5a290c){const _0x17be89=a154_0x525e,_0x18424b=[];for(const _0x36d533 of _0x5369a6[_0x17be89(0xf8)]){_0x18424b[_0x17be89(0xe0)](formatIssueWithContext(_0x36d533,_0x431efc,_0x5a290c)),_0x18424b[_0x17be89(0xe0)]('');}for(const _0x32cf05 of _0x5369a6[_0x17be89(0xeb)]){_0x18424b['push'](formatIssueWithContext(_0x32cf05,_0x431efc,_0x5a290c)),_0x18424b[_0x17be89(0xe0)]('');}return _0x18424b[_0x17be89(0xf7)]('\x0a');}