@treasuredata/tdx 0.25.4 → 0.25.5

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 (183) 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.d.ts.map +1 -1
  7. package/dist/commands/agent-command.js +1 -1
  8. package/dist/commands/agent-command.js.map +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-command.js +1 -1
  21. package/dist/commands/job-command.js +1 -1
  22. package/dist/commands/journey-command.js +1 -1
  23. package/dist/commands/journey-validate-command.js +1 -1
  24. package/dist/commands/llm-command.js +1 -1
  25. package/dist/commands/mcp-command.js +1 -1
  26. package/dist/commands/parent-segment-command.js +1 -1
  27. package/dist/commands/profile-command.js +1 -1
  28. package/dist/commands/profiles-command.js +1 -1
  29. package/dist/commands/query-command.js +1 -1
  30. package/dist/commands/schedule-command.js +1 -1
  31. package/dist/commands/segment-command.js +1 -1
  32. package/dist/commands/segment-create-command.js +1 -1
  33. package/dist/commands/segment-fields-command.js +1 -1
  34. package/dist/commands/segment-pull-command.js +1 -1
  35. package/dist/commands/segment-push-command.js +1 -1
  36. package/dist/commands/segment-update-command.js +1 -1
  37. package/dist/commands/segment-use-command.js +1 -1
  38. package/dist/commands/segment-validate-command.js +1 -1
  39. package/dist/commands/segments.js +1 -1
  40. package/dist/commands/show.js +1 -1
  41. package/dist/commands/status-command.js +1 -1
  42. package/dist/commands/tables.js +1 -1
  43. package/dist/commands/unset-command.js +1 -1
  44. package/dist/commands/use-command.js +1 -1
  45. package/dist/commands/user-command.js +1 -1
  46. package/dist/commands/workflow-command.js +1 -1
  47. package/dist/core/auth.js +1 -1
  48. package/dist/core/command-output.js +1 -1
  49. package/dist/core/config.js +1 -1
  50. package/dist/core/connection-cache.js +1 -1
  51. package/dist/core/constants.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/core/version.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/mcp/server.js +1 -1
  62. package/dist/mcp/tools/index.js +1 -1
  63. package/dist/mcp/tools/tdx-run.js +1 -1
  64. package/dist/mcp/tools/tdx-search.js +1 -1
  65. package/dist/mcp/utils.js +1 -1
  66. package/dist/proxy/claude-usage-tracker.js +1 -1
  67. package/dist/proxy/passthrough-server.js +1 -1
  68. package/dist/proxy/sse-usage-parser.js +1 -1
  69. package/dist/sdk/agent/agent-config.d.ts +10 -0
  70. package/dist/sdk/agent/agent-config.d.ts.map +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-config.js.map +1 -1
  73. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  74. package/dist/sdk/agent/agent-yaml.d.ts +83 -4
  75. package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
  76. package/dist/sdk/agent/agent-yaml.js +1 -1
  77. package/dist/sdk/agent/agent-yaml.js.map +1 -1
  78. package/dist/sdk/agent/test/evaluator.js +1 -1
  79. package/dist/sdk/agent/test/executor.js +1 -1
  80. package/dist/sdk/agent/test/index.js +1 -1
  81. package/dist/sdk/agent/test/output.js +1 -1
  82. package/dist/sdk/agent/test/parser.js +1 -1
  83. package/dist/sdk/agent/types/agent-def.d.ts +54 -1
  84. package/dist/sdk/agent/types/agent-def.d.ts.map +1 -1
  85. package/dist/sdk/api.js +1 -1
  86. package/dist/sdk/client/cdp-api-client.js +1 -1
  87. package/dist/sdk/client/endpoints.js +1 -1
  88. package/dist/sdk/client/engage-api-client.js +1 -1
  89. package/dist/sdk/client/http-client.js +1 -1
  90. package/dist/sdk/client/llm-api-client.d.ts +89 -1
  91. package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
  92. package/dist/sdk/client/llm-api-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js.map +1 -1
  94. package/dist/sdk/client/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.d.ts.map +1 -1
  109. package/dist/sdk/llm/index.js +1 -1
  110. package/dist/sdk/llm/index.js.map +1 -1
  111. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  112. package/dist/sdk/llm/model-factors.js +1 -1
  113. package/dist/sdk/query/index.js +1 -1
  114. package/dist/sdk/query/sql-parser.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-yaml.js +1 -1
  121. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  122. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  123. package/dist/sdk/segment/pull-workflow.js +1 -1
  124. package/dist/sdk/segment/push-workflow.js +1 -1
  125. package/dist/sdk/segment/resolution-context.js +1 -1
  126. package/dist/sdk/segment/segment-path-parser.js +1 -1
  127. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  128. package/dist/sdk/segment/target-resolution.js +1 -1
  129. package/dist/sdk/segment/tdx-config.js +1 -1
  130. package/dist/sdk/segment/validate-files.js +1 -1
  131. package/dist/sdk/segment/yaml-validator.js +1 -1
  132. package/dist/sdk/segment.js +1 -1
  133. package/dist/sdk/types/index.d.ts +1 -1
  134. package/dist/sdk/types/index.d.ts.map +1 -1
  135. package/dist/sdk/types/index.js +1 -1
  136. package/dist/sdk/types/index.js.map +1 -1
  137. package/dist/sdk/types/llm.d.ts +176 -2
  138. package/dist/sdk/types/llm.d.ts.map +1 -1
  139. package/dist/sdk/types/progress.js +1 -1
  140. package/dist/sdk/user.js +1 -1
  141. package/dist/sdk/util/format-detector.js +1 -1
  142. package/dist/sdk/util/formatters.js +1 -1
  143. package/dist/sdk/util/index.js +1 -1
  144. package/dist/sdk/util/tree-formatter.js +1 -1
  145. package/dist/sdk/workflow/archive-validation.js +1 -1
  146. package/dist/sdk/workflow/clone-workflow.js +1 -1
  147. package/dist/sdk/workflow/index.js +1 -1
  148. package/dist/sdk/workflow/pull-workflow.js +1 -1
  149. package/dist/sdk/workflow/push-workflow.js +1 -1
  150. package/dist/sdk/workflow/tdx-config.js +1 -1
  151. package/dist/sdk/workflow/workflow-utils.js +1 -1
  152. package/dist/test-utils/command-runner.js +1 -1
  153. package/dist/test-utils/factories.js +1 -1
  154. package/dist/test-utils/fixtures.js +1 -1
  155. package/dist/test-utils/http-mock.js +1 -1
  156. package/dist/test-utils/index.js +1 -1
  157. package/dist/utils/async.js +1 -1
  158. package/dist/utils/colors.js +1 -1
  159. package/dist/utils/diff.js +1 -1
  160. package/dist/utils/file-permissions.js +1 -1
  161. package/dist/utils/global-cache.js +1 -1
  162. package/dist/utils/json-loader.js +1 -1
  163. package/dist/utils/local-cache.js +1 -1
  164. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  165. package/dist/utils/logger/formatters/index.js +1 -1
  166. package/dist/utils/logger/handlers/console-handler.js +1 -1
  167. package/dist/utils/logger/handlers/file-handler.js +1 -1
  168. package/dist/utils/logger/handlers/index.js +1 -1
  169. package/dist/utils/logger/handlers/null-handler.js +1 -1
  170. package/dist/utils/logger/index.js +1 -1
  171. package/dist/utils/logger/logger.js +1 -1
  172. package/dist/utils/logger/types.js +1 -1
  173. package/dist/utils/option-validation.js +1 -1
  174. package/dist/utils/port.js +1 -1
  175. package/dist/utils/process.js +1 -1
  176. package/dist/utils/prompt.js +1 -1
  177. package/dist/utils/spinner.js +1 -1
  178. package/dist/utils/sse-parser.js +1 -1
  179. package/dist/utils/string-utils.js +1 -1
  180. package/dist/utils/table-ref-parser.js +1 -1
  181. package/dist/utils/tdx-logger.js +1 -1
  182. package/dist/utils/version-check.js +1 -1
  183. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x57ffee,_0x299875){const _0x5f0761=a100_0x568e,_0x14981b=_0x57ffee();while(!![]){try{const _0x4d6e85=-parseInt(_0x5f0761(0xf2))/0x1*(-parseInt(_0x5f0761(0xe2))/0x2)+-parseInt(_0x5f0761(0xfe))/0x3+parseInt(_0x5f0761(0xf4))/0x4+parseInt(_0x5f0761(0xe3))/0x5*(-parseInt(_0x5f0761(0xef))/0x6)+-parseInt(_0x5f0761(0xe8))/0x7*(parseInt(_0x5f0761(0xed))/0x8)+parseInt(_0x5f0761(0xf6))/0x9+parseInt(_0x5f0761(0xf1))/0xa;if(_0x4d6e85===_0x299875)break;else _0x14981b['push'](_0x14981b['shift']());}catch(_0xdcdc89){_0x14981b['push'](_0x14981b['shift']());}}}(a100_0x1949,0x5ca48));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x27ed62){const _0x5f45bc=a100_0x568e;let _0x3120f2=_0x27ed62[_0x5f45bc(0xff)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x3120f2=_0x3120f2[_0x5f45bc(0xff)](/--.*$/gm,''),_0x3120f2[_0x5f45bc(0xf9)]();}function a100_0x1949(){const _0x2303a7=['1280555hLfLNC','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','isTTY','message','length','7zinhOh','EACCES','File\x20\x27','Error\x20reading\x20file\x20\x27','utf-8','5832360JZyRdl','ENOENT','6alpHEv','close','3653230sFqMal','1vRrius','map','267060AoQDnZ','code','6269238KSIgEF','error','stdin\x20','trim','line','join','\x27:\x20','stdin','392163KBRkjO','replace','Permission\x20denied\x20reading\x20file\x20\x27','toLowerCase','Content\x20contains\x20no\x20SQL\x20statements','push','Error\x20reading\x20from\x20stdin:\x20','filter','733342cvXNwf'];a100_0x1949=function(){return _0x2303a7;};return a100_0x1949();}function isEscaped(_0x50df37,_0x5844b0){let _0x525245=0x0;for(let _0x1eda49=_0x5844b0-0x1;_0x1eda49>=0x0&&_0x50df37[_0x1eda49]==='\x5c';_0x1eda49--){_0x525245++;}return _0x525245%0x2===0x1;}export function splitSqlStatements(_0x4a7c14){const _0x339fcb=a100_0x568e,_0x24580a=stripSqlComments(_0x4a7c14);if(!_0x24580a)throw new Error(_0x339fcb(0x102));const _0x3e65ba=[];let _0x2f155c='',_0x468923=![],_0x7d9e33=![],_0x5382d9=![];for(let _0x20db2f=0x0;_0x20db2f<_0x4a7c14[_0x339fcb(0xe7)];_0x20db2f++){const _0x333246=_0x4a7c14[_0x20db2f];if(_0x333246==='\x27'&&!isEscaped(_0x4a7c14,_0x20db2f)&&!_0x7d9e33&&!_0x5382d9)_0x468923=!_0x468923;else{if(_0x333246==='\x22'&&!isEscaped(_0x4a7c14,_0x20db2f)&&!_0x468923&&!_0x5382d9)_0x7d9e33=!_0x7d9e33;else _0x333246==='`'&&!isEscaped(_0x4a7c14,_0x20db2f)&&!_0x468923&&!_0x7d9e33&&(_0x5382d9=!_0x5382d9);}if(_0x333246===';'&&!_0x468923&&!_0x7d9e33&&!_0x5382d9){const _0x327f6a=_0x2f155c[_0x339fcb(0xf9)]();_0x327f6a&&_0x3e65ba[_0x339fcb(0xdf)](_0x327f6a),_0x2f155c='';}else _0x2f155c+=_0x333246;}const _0x32e7f4=_0x2f155c[_0x339fcb(0xf9)]();_0x32e7f4&&_0x3e65ba['push'](_0x32e7f4);const _0x41c978=_0x3e65ba[_0x339fcb(0xf3)](_0x4c2b0c=>_0x4c2b0c[_0x339fcb(0xf9)]())[_0x339fcb(0xe1)](_0x49c002=>{const _0x7116de=_0x339fcb,_0x2cc424=stripSqlComments(_0x49c002);return _0x2cc424[_0x7116de(0xe7)]>0x0;});if(_0x41c978[_0x339fcb(0xe7)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x41c978;}export function readFileContent(_0x2558dd){const _0x401577=a100_0x568e;try{return readFileSync(_0x2558dd,_0x401577(0xec));}catch(_0xb9ed8c){const _0x3250d8=_0xb9ed8c[_0x401577(0xf5)];if(_0x3250d8===_0x401577(0xee))throw new Error(_0x401577(0xea)+_0x2558dd+'\x27\x20not\x20found');else{if(_0x3250d8===_0x401577(0xe9))throw new Error(_0x401577(0x100)+_0x2558dd+'\x27');else throw new Error(_0x401577(0xeb)+_0x2558dd+_0x401577(0xfc)+_0xb9ed8c[_0x401577(0xe6)]);}}}export function readSqlStatementsFromFile(_0x3f2e32){const _0x4e6170=a100_0x568e,_0x5bbdc3=readFileContent(_0x3f2e32);try{return splitSqlStatements(_0x5bbdc3);}catch(_0x32e131){throw new Error(_0x4e6170(0xea)+_0x3f2e32+'\x27\x20'+_0x32e131[_0x4e6170(0xe6)]['toLowerCase']());}}export async function readStdinContent(){const _0x3935cf=a100_0x568e;if(process[_0x3935cf(0xfd)][_0x3935cf(0xe5)])throw new Error(_0x3935cf(0xe4));return new Promise((_0x47c06a,_0x4ec3fa)=>{const _0x4974d2=_0x3935cf,_0x26314b=[],_0xdbe92a=createInterface({'input':process['stdin'],'terminal':![]});_0xdbe92a['on'](_0x4974d2(0xfa),_0x1a1314=>{_0x26314b['push'](_0x1a1314);}),_0xdbe92a['on'](_0x4974d2(0xf0),()=>{const _0x192c76=_0x4974d2;_0x47c06a(_0x26314b[_0x192c76(0xfb)]('\x0a'));}),_0xdbe92a['on'](_0x4974d2(0xf7),_0x3f563b=>{const _0x211c3a=_0x4974d2;_0xdbe92a[_0x211c3a(0xf0)](),_0x4ec3fa(new Error(_0x211c3a(0xe0)+_0x3f563b[_0x211c3a(0xe6)]));});});}function a100_0x568e(_0x555337,_0x2f3ceb){_0x555337=_0x555337-0xdf;const _0x19492e=a100_0x1949();let _0x568ef9=_0x19492e[_0x555337];return _0x568ef9;}export async function readSqlStatementsFromStdin(){const _0x477a8b=a100_0x568e,_0x1f93b8=await readStdinContent();try{return splitSqlStatements(_0x1f93b8);}catch(_0x54b688){throw new Error(_0x477a8b(0xf8)+_0x54b688[_0x477a8b(0xe6)][_0x477a8b(0x101)]());}}export function isSqlFilePath(_0x1fbab2){return/\w\.sql$/['test'](_0x1fbab2);}
1
+ (function(_0x1bd4b4,_0x1603b1){const _0x3c6d6e=a100_0x1b41,_0x3be666=_0x1bd4b4();while(!![]){try{const _0x16aba9=parseInt(_0x3c6d6e(0x99))/0x1*(parseInt(_0x3c6d6e(0xac))/0x2)+-parseInt(_0x3c6d6e(0x9b))/0x3+parseInt(_0x3c6d6e(0xa5))/0x4+parseInt(_0x3c6d6e(0x9e))/0x5+-parseInt(_0x3c6d6e(0xad))/0x6+-parseInt(_0x3c6d6e(0x91))/0x7+-parseInt(_0x3c6d6e(0x98))/0x8*(parseInt(_0x3c6d6e(0xa7))/0x9);if(_0x16aba9===_0x1603b1)break;else _0x3be666['push'](_0x3be666['shift']());}catch(_0x38bbd6){_0x3be666['push'](_0x3be666['shift']());}}}(a100_0x2082,0x85274));function a100_0x2082(){const _0x1cd085=['849196ooGFaV','replace','1226097VCWkEL','Content\x20contains\x20no\x20SQL\x20statements','stdin\x20','\x27:\x20','join','4jWCerS','681750ukaHph','EACCES','4903304WAwzUU','trim','length','\x27\x20not\x20found','line','Permission\x20denied\x20reading\x20file\x20\x27','ENOENT','40fVSvVN','505132EltqKw','code','668559OzZUet','map','stdin','5204740LpOfWj','message','close','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','push','Error\x20reading\x20file\x20\x27','File\x20\x27'];a100_0x2082=function(){return _0x1cd085;};return a100_0x2082();}import{readFileSync}from'fs';function a100_0x1b41(_0x537c31,_0x5d7710){_0x537c31=_0x537c31-0x91;const _0x20828d=a100_0x2082();let _0x1b41ec=_0x20828d[_0x537c31];return _0x1b41ec;}import{createInterface}from'readline';export function stripSqlComments(_0x1ead64){const _0x236654=a100_0x1b41;let _0x509774=_0x1ead64['replace'](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x509774=_0x509774[_0x236654(0xa6)](/--.*$/gm,''),_0x509774[_0x236654(0x92)]();}function isEscaped(_0x1b5d61,_0x43a9b6){let _0x22d7a0=0x0;for(let _0x4b1c0a=_0x43a9b6-0x1;_0x4b1c0a>=0x0&&_0x1b5d61[_0x4b1c0a]==='\x5c';_0x4b1c0a--){_0x22d7a0++;}return _0x22d7a0%0x2===0x1;}export function splitSqlStatements(_0x15e37b){const _0x2c9dea=a100_0x1b41,_0x3add61=stripSqlComments(_0x15e37b);if(!_0x3add61)throw new Error(_0x2c9dea(0xa8));const _0x4bb911=[];let _0x23ed60='',_0x52d72c=![],_0x383acd=![],_0x117f8a=![];for(let _0x32b283=0x0;_0x32b283<_0x15e37b[_0x2c9dea(0x93)];_0x32b283++){const _0x28c10a=_0x15e37b[_0x32b283];if(_0x28c10a==='\x27'&&!isEscaped(_0x15e37b,_0x32b283)&&!_0x383acd&&!_0x117f8a)_0x52d72c=!_0x52d72c;else{if(_0x28c10a==='\x22'&&!isEscaped(_0x15e37b,_0x32b283)&&!_0x52d72c&&!_0x117f8a)_0x383acd=!_0x383acd;else _0x28c10a==='`'&&!isEscaped(_0x15e37b,_0x32b283)&&!_0x52d72c&&!_0x383acd&&(_0x117f8a=!_0x117f8a);}if(_0x28c10a===';'&&!_0x52d72c&&!_0x383acd&&!_0x117f8a){const _0x2e1f32=_0x23ed60['trim']();_0x2e1f32&&_0x4bb911[_0x2c9dea(0xa2)](_0x2e1f32),_0x23ed60='';}else _0x23ed60+=_0x28c10a;}const _0x5bc3c7=_0x23ed60[_0x2c9dea(0x92)]();_0x5bc3c7&&_0x4bb911[_0x2c9dea(0xa2)](_0x5bc3c7);const _0x15175f=_0x4bb911[_0x2c9dea(0x9c)](_0x4f06ff=>_0x4f06ff[_0x2c9dea(0x92)]())['filter'](_0x2ef7cc=>{const _0x1add7f=_0x2c9dea,_0x51c143=stripSqlComments(_0x2ef7cc);return _0x51c143[_0x1add7f(0x93)]>0x0;});if(_0x15175f[_0x2c9dea(0x93)]===0x0)throw new Error(_0x2c9dea(0xa8));return _0x15175f;}export function readFileContent(_0x19b1fb){const _0x51712e=a100_0x1b41;try{return readFileSync(_0x19b1fb,'utf-8');}catch(_0x35b39d){const _0x1733cb=_0x35b39d[_0x51712e(0x9a)];if(_0x1733cb===_0x51712e(0x97))throw new Error(_0x51712e(0xa4)+_0x19b1fb+_0x51712e(0x94));else{if(_0x1733cb===_0x51712e(0xae))throw new Error(_0x51712e(0x96)+_0x19b1fb+'\x27');else throw new Error(_0x51712e(0xa3)+_0x19b1fb+_0x51712e(0xaa)+_0x35b39d[_0x51712e(0x9f)]);}}}export function readSqlStatementsFromFile(_0xcfa113){const _0x2385ec=a100_0x1b41,_0x38dc75=readFileContent(_0xcfa113);try{return splitSqlStatements(_0x38dc75);}catch(_0x5df2da){throw new Error(_0x2385ec(0xa4)+_0xcfa113+'\x27\x20'+_0x5df2da[_0x2385ec(0x9f)]['toLowerCase']());}}export async function readStdinContent(){const _0x49aeb7=a100_0x1b41;if(process['stdin']['isTTY'])throw new Error(_0x49aeb7(0xa1));return new Promise((_0x252245,_0x234b19)=>{const _0x42c182=_0x49aeb7,_0x20cdd4=[],_0x40deb5=createInterface({'input':process[_0x42c182(0x9d)],'terminal':![]});_0x40deb5['on'](_0x42c182(0x95),_0x510ef5=>{const _0x13ff5c=_0x42c182;_0x20cdd4[_0x13ff5c(0xa2)](_0x510ef5);}),_0x40deb5['on']('close',()=>{const _0xbda4f4=_0x42c182;_0x252245(_0x20cdd4[_0xbda4f4(0xab)]('\x0a'));}),_0x40deb5['on']('error',_0x2732b4=>{const _0x10fbca=_0x42c182;_0x40deb5[_0x10fbca(0xa0)](),_0x234b19(new Error('Error\x20reading\x20from\x20stdin:\x20'+_0x2732b4['message']));});});}export async function readSqlStatementsFromStdin(){const _0x213e90=a100_0x1b41,_0x4addfa=await readStdinContent();try{return splitSqlStatements(_0x4addfa);}catch(_0xc581cc){throw new Error(_0x213e90(0xa9)+_0xc581cc['message']['toLowerCase']());}}export function isSqlFilePath(_0x35eb7f){return/\w\.sql$/['test'](_0x35eb7f);}
@@ -1 +1 @@
1
- const a101_0x3d3b99=a101_0x4a74;function a101_0x4a74(_0x42e24a,_0x1a1bed){_0x42e24a=_0x42e24a-0xa1;const _0x1daf21=a101_0x1daf();let _0x4a74e6=_0x1daf21[_0x42e24a];return _0x4a74e6;}function a101_0x1daf(){const _0x47d86f=['Schedule\x20name\x20is\x20required','update','queries','pattern','start_at','Schedule\x20not\x20found:\x20','1075JLfANY','Invalid\x20time\x20format:\x20','8ckZkeN','length','55SgkvIF','listSchedules','2409805ZJsHDV','486560bmiFYC','3053658qzOLOW','getScheduleHistory','3546740zZNHSO','test','getTime','limit','created_at','desc','string','name','6767883nOlIis','find','INVALID_ARGUMENT','replace','num','time','Type\x20is\x20required','client','Database\x20is\x20required','end_at','slice','now','updated_at','num\x20must\x20be\x20between\x201\x20and\x2010','has_next_page','\x20UTC','914985aIBYnc','push','14anhwMn','Query\x20is\x20required','history','createSchedule','filter','map','show','type','listQueries','scheduled','floor','database','118hYTymb','run'];a101_0x1daf=function(){return _0x47d86f;};return a101_0x1daf();}(function(_0x1ea864,_0x11f13e){const _0x59a689=a101_0x4a74,_0x60cd3a=_0x1ea864();while(!![]){try{const _0x4abe31=-parseInt(_0x59a689(0xcb))/0x1*(parseInt(_0x59a689(0xc3))/0x2)+-parseInt(_0x59a689(0xb5))/0x3+parseInt(_0x59a689(0xd5))/0x4+-parseInt(_0x59a689(0xd1))/0x5+parseInt(_0x59a689(0xd3))/0x6*(parseInt(_0x59a689(0xb7))/0x7)+parseInt(_0x59a689(0xcd))/0x8*(-parseInt(_0x59a689(0xa5))/0x9)+parseInt(_0x59a689(0xd2))/0xa*(parseInt(_0x59a689(0xcf))/0xb);if(_0x4abe31===_0x11f13e)break;else _0x60cd3a['push'](_0x60cd3a['shift']());}catch(_0x52a99d){_0x60cd3a['push'](_0x60cd3a['shift']());}}}(a101_0x1daf,0x852cb));import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x5cd15f){const _0x51f4c5=a101_0x4a74;if(!_0x5cd15f)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x51f4c5(0xd6)](_0x5cd15f))return _0x5cd15f;return _0x5cd15f['replace'](_0x51f4c5(0xb4),'Z')[_0x51f4c5(0xa8)]('\x20','T');}export class ScheduleSDK{[a101_0x3d3b99(0xac)];constructor(_0x3939ad){const _0x241ee1=a101_0x3d3b99;this[_0x241ee1(0xac)]=new TDApiClient(_0x3939ad);}async['list'](_0x4e0e9c){const _0x50c2d4=a101_0x3d3b99,_0x5b58e7=await this[_0x50c2d4(0xac)][_0x50c2d4(0xd0)](),_0x4f0e29=_0x5b58e7[_0x50c2d4(0xbc)](_0x335355=>({..._0x335355,'created_at':normalizeTimestamp(_0x335355[_0x50c2d4(0xa1)])??_0x335355[_0x50c2d4(0xa1)]}));if(_0x4e0e9c?.['limit']&&_0x4e0e9c[_0x50c2d4(0xd8)]>0x0)return _0x4f0e29[_0x50c2d4(0xaf)](0x0,_0x4e0e9c['limit']);return _0x4f0e29;}async[a101_0x3d3b99(0xbf)](_0x12a839){const _0x17bd25=a101_0x3d3b99,_0x580d55=0x64,_0x43995c=_0x12a839?.[_0x17bd25(0xd8)],_0x44ba8e=[];let _0x53af8a=!![],_0x4ea8d1,_0x17cc1d,_0x5ba4ea;if(_0x12a839?.[_0x17bd25(0xc8)]){const _0x10b77=_0x12a839[_0x17bd25(0xc8)][_0x17bd25(0xa8)](/[.+^${}()|[\]\\]/g,'\x5c$&'),_0x1c9881=_0x10b77[_0x17bd25(0xa8)](/\*/g,'.*')[_0x17bd25(0xa8)](/\?/g,'.');_0x5ba4ea=new RegExp('^'+_0x1c9881+'$','i');}while(_0x53af8a&&(!_0x43995c||_0x44ba8e['length']<_0x43995c)){const _0xd170f9=await this[_0x17bd25(0xac)]['listQueries']({'anchor_column':_0x17bd25(0xb1),'sort_direction':_0x17bd25(0xa2),'page_size':_0x580d55,'anchor_id':_0x4ea8d1,'anchor_value':_0x17cc1d});let _0x330927=_0xd170f9[_0x17bd25(0xc7)];_0x12a839?.[_0x17bd25(0xc0)]&&(_0x330927=_0x330927[_0x17bd25(0xbb)](_0x5f5c95=>_0x5f5c95['cron']!==null));_0x5ba4ea&&(_0x330927=_0x330927[_0x17bd25(0xbb)](_0x2e5c46=>_0x2e5c46['name']&&_0x5ba4ea['test'](_0x2e5c46['name'])));_0x44ba8e[_0x17bd25(0xb6)](..._0x330927),_0x53af8a=_0xd170f9['pagination'][_0x17bd25(0xb3)];if(_0x53af8a&&_0xd170f9['queries'][_0x17bd25(0xce)]>0x0){const _0x5b1ba9=_0xd170f9[_0x17bd25(0xc7)][_0xd170f9[_0x17bd25(0xc7)][_0x17bd25(0xce)]-0x1];_0x4ea8d1=_0x5b1ba9['id'],_0x17cc1d=_0x5b1ba9[_0x17bd25(0xb1)];}}const _0xefb034=_0x43995c?_0x44ba8e[_0x17bd25(0xaf)](0x0,_0x43995c):_0x44ba8e;return{'queries':_0xefb034,'pagination':{'has_next_page':_0x53af8a||(_0x43995c?_0x44ba8e['length']>_0x43995c:![])}};}async[a101_0x3d3b99(0xbd)](_0xd9b92e){const _0x339118=a101_0x3d3b99,_0x553148=await this['client'][_0x339118(0xd0)](),_0x3d5c87=_0x553148[_0x339118(0xa6)](_0x2c14e4=>_0x2c14e4[_0x339118(0xa4)]===_0xd9b92e);if(!_0x3d5c87)throw new SDKError(ErrorCode['NOT_FOUND'],_0x339118(0xca)+_0xd9b92e);return{..._0x3d5c87,'created_at':normalizeTimestamp(_0x3d5c87[_0x339118(0xa1)])??_0x3d5c87[_0x339118(0xa1)]};}async['create'](_0x1c51e0,_0x2f866b){const _0x40c166=a101_0x3d3b99;if(!_0x1c51e0)throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xc5));if(!_0x2f866b[_0x40c166(0xc2)])throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xad));if(!_0x2f866b['query'])throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xb8));if(!_0x2f866b[_0x40c166(0xbe)])throw new SDKError(ErrorCode[_0x40c166(0xa7)],_0x40c166(0xab));return await this['client'][_0x40c166(0xba)](_0x1c51e0,_0x2f866b);}async[a101_0x3d3b99(0xc6)](_0x34d8d9,_0x399c76){const _0x1125da=a101_0x3d3b99;if(!_0x34d8d9)throw new SDKError(ErrorCode[_0x1125da(0xa7)],_0x1125da(0xc5));return await this[_0x1125da(0xac)]['updateSchedule'](_0x34d8d9,_0x399c76);}async['delete'](_0x26c0fc){const _0x11ae3f=a101_0x3d3b99;if(!_0x26c0fc)throw new SDKError(ErrorCode[_0x11ae3f(0xa7)],_0x11ae3f(0xc5));return await this[_0x11ae3f(0xac)]['deleteSchedule'](_0x26c0fc);}async[a101_0x3d3b99(0xc4)](_0x32bc08,_0x1f81d2){const _0x202bdf=a101_0x3d3b99;if(!_0x32bc08)throw new SDKError(ErrorCode[_0x202bdf(0xa7)],_0x202bdf(0xc5));let _0x52c56a;if(_0x1f81d2?.[_0x202bdf(0xaa)]){const _0x1f4a51=typeof _0x1f81d2[_0x202bdf(0xaa)]===_0x202bdf(0xa3)?new Date(_0x1f81d2['time']):_0x1f81d2['time'];if(isNaN(_0x1f4a51[_0x202bdf(0xd7)]()))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x202bdf(0xcc)+_0x1f81d2[_0x202bdf(0xaa)]);_0x52c56a=Math[_0x202bdf(0xc1)](_0x1f4a51[_0x202bdf(0xd7)]()/0x3e8);}else _0x52c56a=Math[_0x202bdf(0xc1)](Date[_0x202bdf(0xb0)]()/0x3e8);if(_0x1f81d2?.[_0x202bdf(0xa9)]!==undefined){if(_0x1f81d2[_0x202bdf(0xa9)]<0x1||_0x1f81d2['num']>0xa)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x202bdf(0xb2));}return await this['client']['runSchedule'](_0x32bc08,_0x52c56a,_0x1f81d2?.['num']);}async['history'](_0x12e65f,_0x4f5d9c){const _0x39fd76=a101_0x3d3b99;if(!_0x12e65f)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x39fd76(0xc5));const _0x4061cf=await this['client'][_0x39fd76(0xd4)](_0x12e65f,_0x4f5d9c);return{..._0x4061cf,'history':_0x4061cf[_0x39fd76(0xb9)]['map'](_0x1b9cc9=>({..._0x1b9cc9,'created_at':normalizeTimestamp(_0x1b9cc9[_0x39fd76(0xa1)]),'start_at':normalizeTimestamp(_0x1b9cc9[_0x39fd76(0xc9)]),'end_at':normalizeTimestamp(_0x1b9cc9[_0x39fd76(0xae)])}))};}}
1
+ const a101_0x1aa5f6=a101_0x242e;(function(_0x5d35ba,_0x4caad1){const _0x5be32=a101_0x242e,_0x1effbf=_0x5d35ba();while(!![]){try{const _0x2ebc94=parseInt(_0x5be32(0x1d7))/0x1*(parseInt(_0x5be32(0x1ce))/0x2)+parseInt(_0x5be32(0x1d5))/0x3+parseInt(_0x5be32(0x1ca))/0x4*(parseInt(_0x5be32(0x1c5))/0x5)+parseInt(_0x5be32(0x1a5))/0x6*(-parseInt(_0x5be32(0x1bb))/0x7)+-parseInt(_0x5be32(0x1cb))/0x8*(parseInt(_0x5be32(0x1d1))/0x9)+parseInt(_0x5be32(0x1b1))/0xa+-parseInt(_0x5be32(0x1a8))/0xb;if(_0x2ebc94===_0x4caad1)break;else _0x1effbf['push'](_0x1effbf['shift']());}catch(_0x13b653){_0x1effbf['push'](_0x1effbf['shift']());}}}(a101_0x475c,0xd2546));function a101_0x242e(_0x3bda47,_0x17a215){_0x3bda47=_0x3bda47-0x1a5;const _0x475cb5=a101_0x475c();let _0x242eeb=_0x475cb5[_0x3bda47];return _0x242eeb;}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a101_0x475c(){const _0x262a4b=['getScheduleHistory','run','Invalid\x20time\x20format:\x20','num','cron','limit','5860920xrNESO','Schedule\x20name\x20is\x20required','pagination','queries','test','Type\x20is\x20required','type','created_at','NOT_FOUND','list','308hKNWZt','end_at','map','now','time','start_at','getTime','length','listQueries','Query\x20is\x20required','2838475efgGAQ','update','Schedule\x20not\x20found:\x20','listSchedules','string','4AHpcYW','5552rHapZC','updated_at','replace','3021342PKwwPh','INVALID_ARGUMENT','push','5112hMlwpM','createSchedule','slice','pattern','4904454IlRkmC','\x20UTC','1gMwtnK','deleteSchedule','client','has_next_page','name','database','62124VndxeX','filter','create','28467978LPpzzi','scheduled','\x5c$&'];a101_0x475c=function(){return _0x262a4b;};return a101_0x475c();}function normalizeTimestamp(_0x13257b){const _0x53112b=a101_0x242e;if(!_0x13257b)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x53112b(0x1b5)](_0x13257b))return _0x13257b;return _0x13257b[_0x53112b(0x1cd)](_0x53112b(0x1d6),'Z')['replace']('\x20','T');}export class ScheduleSDK{['client'];constructor(_0x3178ad){this['client']=new TDApiClient(_0x3178ad);}async[a101_0x1aa5f6(0x1ba)](_0x2ad858){const _0x345773=a101_0x1aa5f6,_0x44207e=await this[_0x345773(0x1d9)][_0x345773(0x1c8)](),_0x8e0103=_0x44207e[_0x345773(0x1bd)](_0x1eb981=>({..._0x1eb981,'created_at':normalizeTimestamp(_0x1eb981[_0x345773(0x1b8)])??_0x1eb981[_0x345773(0x1b8)]}));if(_0x2ad858?.[_0x345773(0x1b0)]&&_0x2ad858[_0x345773(0x1b0)]>0x0)return _0x8e0103['slice'](0x0,_0x2ad858[_0x345773(0x1b0)]);return _0x8e0103;}async[a101_0x1aa5f6(0x1c3)](_0x33f17d){const _0x4080b0=a101_0x1aa5f6,_0x2456d5=0x64,_0x2e3df1=_0x33f17d?.[_0x4080b0(0x1b0)],_0x4c3502=[];let _0x42aced=!![],_0x3565ea,_0x3faeaa,_0x1592ae;if(_0x33f17d?.['pattern']){const _0x1069dd=_0x33f17d[_0x4080b0(0x1d4)][_0x4080b0(0x1cd)](/[.+^${}()|[\]\\]/g,_0x4080b0(0x1aa)),_0x4f5e6e=_0x1069dd[_0x4080b0(0x1cd)](/\*/g,'.*')[_0x4080b0(0x1cd)](/\?/g,'.');_0x1592ae=new RegExp('^'+_0x4f5e6e+'$','i');}while(_0x42aced&&(!_0x2e3df1||_0x4c3502[_0x4080b0(0x1c2)]<_0x2e3df1)){const _0xc6efa0=await this[_0x4080b0(0x1d9)]['listQueries']({'anchor_column':_0x4080b0(0x1cc),'sort_direction':'desc','page_size':_0x2456d5,'anchor_id':_0x3565ea,'anchor_value':_0x3faeaa});let _0x5f1b21=_0xc6efa0[_0x4080b0(0x1b4)];_0x33f17d?.[_0x4080b0(0x1a9)]&&(_0x5f1b21=_0x5f1b21[_0x4080b0(0x1a6)](_0x302340=>_0x302340[_0x4080b0(0x1af)]!==null));_0x1592ae&&(_0x5f1b21=_0x5f1b21[_0x4080b0(0x1a6)](_0x493946=>_0x493946[_0x4080b0(0x1db)]&&_0x1592ae['test'](_0x493946[_0x4080b0(0x1db)])));_0x4c3502[_0x4080b0(0x1d0)](..._0x5f1b21),_0x42aced=_0xc6efa0[_0x4080b0(0x1b3)][_0x4080b0(0x1da)];if(_0x42aced&&_0xc6efa0[_0x4080b0(0x1b4)][_0x4080b0(0x1c2)]>0x0){const _0x18af75=_0xc6efa0[_0x4080b0(0x1b4)][_0xc6efa0[_0x4080b0(0x1b4)][_0x4080b0(0x1c2)]-0x1];_0x3565ea=_0x18af75['id'],_0x3faeaa=_0x18af75[_0x4080b0(0x1cc)];}}const _0x3e6690=_0x2e3df1?_0x4c3502[_0x4080b0(0x1d3)](0x0,_0x2e3df1):_0x4c3502;return{'queries':_0x3e6690,'pagination':{'has_next_page':_0x42aced||(_0x2e3df1?_0x4c3502[_0x4080b0(0x1c2)]>_0x2e3df1:![])}};}async['show'](_0x355033){const _0x23088c=a101_0x1aa5f6,_0x2a3be4=await this[_0x23088c(0x1d9)]['listSchedules'](),_0x5d9af0=_0x2a3be4['find'](_0x35a707=>_0x35a707['name']===_0x355033);if(!_0x5d9af0)throw new SDKError(ErrorCode[_0x23088c(0x1b9)],_0x23088c(0x1c7)+_0x355033);return{..._0x5d9af0,'created_at':normalizeTimestamp(_0x5d9af0[_0x23088c(0x1b8)])??_0x5d9af0['created_at']};}async[a101_0x1aa5f6(0x1a7)](_0x58b8bd,_0x335ec1){const _0x1703b1=a101_0x1aa5f6;if(!_0x58b8bd)throw new SDKError(ErrorCode[_0x1703b1(0x1cf)],_0x1703b1(0x1b2));if(!_0x335ec1[_0x1703b1(0x1dc)])throw new SDKError(ErrorCode[_0x1703b1(0x1cf)],'Database\x20is\x20required');if(!_0x335ec1['query'])throw new SDKError(ErrorCode[_0x1703b1(0x1cf)],_0x1703b1(0x1c4));if(!_0x335ec1[_0x1703b1(0x1b7)])throw new SDKError(ErrorCode[_0x1703b1(0x1cf)],_0x1703b1(0x1b6));return await this[_0x1703b1(0x1d9)][_0x1703b1(0x1d2)](_0x58b8bd,_0x335ec1);}async[a101_0x1aa5f6(0x1c6)](_0x59a923,_0x10597a){const _0x50ef3b=a101_0x1aa5f6;if(!_0x59a923)throw new SDKError(ErrorCode[_0x50ef3b(0x1cf)],_0x50ef3b(0x1b2));return await this[_0x50ef3b(0x1d9)]['updateSchedule'](_0x59a923,_0x10597a);}async['delete'](_0x5786bb){const _0x928675=a101_0x1aa5f6;if(!_0x5786bb)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x928675(0x1b2));return await this[_0x928675(0x1d9)][_0x928675(0x1d8)](_0x5786bb);}async[a101_0x1aa5f6(0x1ac)](_0x325687,_0x742527){const _0x4facae=a101_0x1aa5f6;if(!_0x325687)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4facae(0x1b2));let _0x3bb343;if(_0x742527?.['time']){const _0x335521=typeof _0x742527[_0x4facae(0x1bf)]===_0x4facae(0x1c9)?new Date(_0x742527[_0x4facae(0x1bf)]):_0x742527['time'];if(isNaN(_0x335521[_0x4facae(0x1c1)]()))throw new SDKError(ErrorCode[_0x4facae(0x1cf)],_0x4facae(0x1ad)+_0x742527[_0x4facae(0x1bf)]);_0x3bb343=Math['floor'](_0x335521[_0x4facae(0x1c1)]()/0x3e8);}else _0x3bb343=Math['floor'](Date[_0x4facae(0x1be)]()/0x3e8);if(_0x742527?.['num']!==undefined){if(_0x742527[_0x4facae(0x1ae)]<0x1||_0x742527[_0x4facae(0x1ae)]>0xa)throw new SDKError(ErrorCode[_0x4facae(0x1cf)],'num\x20must\x20be\x20between\x201\x20and\x2010');}return await this['client']['runSchedule'](_0x325687,_0x3bb343,_0x742527?.[_0x4facae(0x1ae)]);}async['history'](_0x11c222,_0x1fcd65){const _0x495e38=a101_0x1aa5f6;if(!_0x11c222)throw new SDKError(ErrorCode[_0x495e38(0x1cf)],_0x495e38(0x1b2));const _0x5c39e3=await this[_0x495e38(0x1d9)][_0x495e38(0x1ab)](_0x11c222,_0x1fcd65);return{..._0x5c39e3,'history':_0x5c39e3['history'][_0x495e38(0x1bd)](_0x25df54=>({..._0x25df54,'created_at':normalizeTimestamp(_0x25df54[_0x495e38(0x1b8)]),'start_at':normalizeTimestamp(_0x25df54[_0x495e38(0x1c0)]),'end_at':normalizeTimestamp(_0x25df54[_0x495e38(0x1bc)])}))};}}
@@ -1 +1 @@
1
- const a102_0x45780e=a102_0xee4e;(function(_0x1cce0c,_0x1a7728){const _0x5dba9d=a102_0xee4e,_0x3c574d=_0x1cce0c();while(!![]){try{const _0x3eba84=parseInt(_0x5dba9d(0x1c7))/0x1*(-parseInt(_0x5dba9d(0x212))/0x2)+-parseInt(_0x5dba9d(0x249))/0x3+-parseInt(_0x5dba9d(0x1e4))/0x4+-parseInt(_0x5dba9d(0x1fe))/0x5+parseInt(_0x5dba9d(0x22b))/0x6+-parseInt(_0x5dba9d(0x24e))/0x7+-parseInt(_0x5dba9d(0x236))/0x8*(-parseInt(_0x5dba9d(0x24d))/0x9);if(_0x3eba84===_0x1a7728)break;else _0x3c574d['push'](_0x3c574d['shift']());}catch(_0x219df1){_0x3c574d['push'](_0x3c574d['shift']());}}}(a102_0x20f2,0xb9ac3));import*as a102_0x44f7d5 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x513809,_0x15cd07){const _0x43e9f0=a102_0xee4e,_0x271ba4=_0x513809[_0x43e9f0(0x1cb)]&&_0x43e9f0(0x218)in _0x513809[_0x43e9f0(0x1cb)]&&_0x513809['rule'][_0x43e9f0(0x218)];return{'type':_0x43e9f0(0x1c5),'name':_0x513809[_0x43e9f0(0x1e8)],..._0x513809[_0x43e9f0(0x21b)]&&{'description':_0x513809[_0x43e9f0(0x21b)]},..._0x15cd07&&{'folder':_0x15cd07},..._0x271ba4&&{'rule':apiRuleToYaml(_0x513809[_0x43e9f0(0x1cb)])},..._0x513809[_0x43e9f0(0x23f)]!==undefined&&{'kind':_0x513809[_0x43e9f0(0x23f)]===0x0?_0x43e9f0(0x237):_0x513809[_0x43e9f0(0x23f)]===0x1?_0x43e9f0(0x246):_0x43e9f0(0x20a)},..._0x513809['isVisible']!==undefined&&{'visible':_0x513809['isVisible']}};}export async function segmentResponseToDef(_0x45dd92,_0x2b166b,_0x505f26){const _0x276e3b=a102_0xee4e,_0x43c036=segmentResponseToDefSync(_0x45dd92,_0x505f26);if(!_0x2b166b||!_0x2b166b[_0x276e3b(0x220)])return _0x43c036;return _0x43c036[_0x276e3b(0x1cb)]&&(_0x43c036[_0x276e3b(0x1cb)]=await resolveRuleSegmentRefs(_0x43c036[_0x276e3b(0x1cb)],_0x2b166b[_0x276e3b(0x220)])),_0x43c036;}export function apiRuleToYaml(_0x1c168e){const _0x222e22=a102_0xee4e,_0x5eb449=(_0x1c168e['conditions']||[])['map'](apiConditionToYaml);if(_0x5eb449[_0x222e22(0x23d)]===0x1&&!_0x1c168e[_0x222e22(0x21b)]&&_0x222e22(0x218)in _0x5eb449[0x0]&&(_0x5eb449[0x0][_0x222e22(0x218)]==='And'||_0x5eb449[0x0][_0x222e22(0x218)]==='Or')){const _0x1ff9f3=_0x5eb449[0x0];if(_0x1ff9f3[_0x222e22(0x218)]===_0x1c168e[_0x222e22(0x218)]&&_0x1ff9f3[_0x222e22(0x20c)])return{'type':_0x1c168e[_0x222e22(0x218)],'conditions':_0x1ff9f3[_0x222e22(0x20c)],..._0x1ff9f3[_0x222e22(0x21b)]&&{'description':_0x1ff9f3[_0x222e22(0x21b)]}};}return{'type':_0x1c168e[_0x222e22(0x218)],'conditions':_0x5eb449,..._0x1c168e['description']&&{'description':_0x1c168e['description']}};}export async function resolveRuleSegmentRefs(_0x36312d,_0x169c16){const _0x1ba5da=a102_0xee4e,_0x52ebd2=await Promise['all'](_0x36312d[_0x1ba5da(0x20c)]['map'](_0x360b38=>resolveConditionSegmentRefs(_0x360b38,_0x169c16)));return{..._0x36312d,'conditions':_0x52ebd2};}async function resolveConditionSegmentRefs(_0x297d6f,_0x1f8be7){const _0x4839ba=a102_0xee4e;if('segment'in _0x297d6f&&(_0x297d6f['type']===_0x4839ba(0x1f3)||_0x297d6f[_0x4839ba(0x218)]===_0x4839ba(0x219))){const _0x5017ae=_0x297d6f;if(/^\d+$/[_0x4839ba(0x1ec)](_0x5017ae[_0x4839ba(0x1c5)])){const _0x407b95=await _0x1f8be7(_0x5017ae[_0x4839ba(0x1c5)]);return{..._0x5017ae,'segment':_0x407b95};}return _0x297d6f;}if('conditions'in _0x297d6f&&_0x297d6f[_0x4839ba(0x20c)]){const _0x276e6d=_0x297d6f,_0x24d6f5=await Promise['all'](_0x276e6d['conditions'][_0x4839ba(0x21e)](_0xa504df=>resolveConditionSegmentRefs(_0xa504df,_0x1f8be7)));return{..._0x276e6d,'conditions':_0x24d6f5};}if(_0x4839ba(0x24f)in _0x297d6f&&_0x297d6f['filter']){const _0x47b3af=_0x297d6f,_0x263e10=await resolveRuleSegmentRefs(_0x47b3af[_0x4839ba(0x24f)],_0x1f8be7);return{..._0x47b3af,'filter':_0x263e10};}return _0x297d6f;}export async function resolveRuleSegmentIds(_0x2a0b32,_0x40060e){const _0x1c65a5=a102_0xee4e,_0xa92176=await Promise['all'](_0x2a0b32[_0x1c65a5(0x20c)]['map'](_0x137b05=>resolveConditionSegmentIds(_0x137b05,_0x40060e)));return{..._0x2a0b32,'conditions':_0xa92176};}async function resolveConditionSegmentIds(_0x3b6adc,_0x43803c){const _0x82c603=a102_0xee4e;if(_0x82c603(0x1c5)in _0x3b6adc&&(_0x3b6adc[_0x82c603(0x218)]===_0x82c603(0x1f3)||_0x3b6adc[_0x82c603(0x218)]===_0x82c603(0x219))){const _0x570194=_0x3b6adc;if(!/^\d+$/[_0x82c603(0x1ec)](_0x570194['segment'])){const _0x58dc3f=await _0x43803c(_0x570194[_0x82c603(0x1c5)]);return{..._0x570194,'segment':_0x58dc3f};}return _0x3b6adc;}if(_0x82c603(0x20c)in _0x3b6adc&&_0x3b6adc['conditions']){const _0x407038=_0x3b6adc,_0xb5d2b4=await Promise['all'](_0x407038[_0x82c603(0x20c)][_0x82c603(0x21e)](_0x6e905c=>resolveConditionSegmentIds(_0x6e905c,_0x43803c)));return{..._0x407038,'conditions':_0xb5d2b4};}if(_0x82c603(0x24f)in _0x3b6adc&&_0x3b6adc['filter']){const _0x3f9ec6=_0x3b6adc,_0x3499b0=await resolveRuleSegmentIds(_0x3f9ec6[_0x82c603(0x24f)],_0x43803c);return{..._0x3f9ec6,'filter':_0x3499b0};}return _0x3b6adc;}function apiConditionToYaml(_0xc69552){const _0x4c20de=a102_0xee4e;if(_0xc69552[_0x4c20de(0x218)]===_0x4c20de(0x200)||_0xc69552['type']==='Or'){if(_0xc69552[_0x4c20de(0x20c)]){const _0x400870=_0xc69552[_0x4c20de(0x20c)]['map'](apiConditionToYaml);if(_0x400870[_0x4c20de(0x23d)]===0x1&&!_0xc69552[_0x4c20de(0x21b)])return _0x400870[0x0];return{'type':_0xc69552[_0x4c20de(0x218)],'conditions':_0x400870,..._0xc69552['description']&&{'description':_0xc69552[_0x4c20de(0x21b)]}};}}if(_0xc69552[_0x4c20de(0x218)]===_0x4c20de(0x1da)&&_0xc69552['leftValue']&&_0xc69552[_0x4c20de(0x1e6)]){const _0x2a5a06=_0xc69552['leftValue']['aggregation']?{'type':_0xc69552[_0x4c20de(0x242)][_0x4c20de(0x1e7)][_0x4c20de(0x218)],..._0xc69552[_0x4c20de(0x242)][_0x4c20de(0x1e7)]['groupingColumns']&&{'groupingColumns':_0xc69552['leftValue'][_0x4c20de(0x1e7)][_0x4c20de(0x207)]}}:undefined;return{'type':'Value','attribute':_0xc69552[_0x4c20de(0x242)][_0x4c20de(0x1e8)]||'','operator':apiOperatorToYaml(_0xc69552['operator']),..._0xc69552[_0x4c20de(0x1ef)]&&_0xc69552[_0x4c20de(0x1ef)]!=='any'?{'arrayMatching':_0xc69552['arrayMatching']}:{},..._0xc69552['exclude']?{'exclude':_0xc69552['exclude']}:{},..._0x2a5a06?{'aggregation':_0x2a5a06}:{},..._0xc69552['leftValue'][_0x4c20de(0x206)]?{'source':_0xc69552[_0x4c20de(0x242)]['source']['name']}:{},..._0xc69552['leftValue']['filter']?{'filter':apiRuleToYaml(_0xc69552[_0x4c20de(0x242)]['filter'])}:{},..._0xc69552[_0x4c20de(0x21c)]!==undefined&&_0xc69552[_0x4c20de(0x21c)]!==null?{'limit':_0xc69552[_0x4c20de(0x21c)]}:{}};}if(_0xc69552[_0x4c20de(0x218)]===_0x4c20de(0x227)&&_0xc69552['id'])return{'type':_0xc69552[_0x4c20de(0x219)]?_0x4c20de(0x219):'include','segment':_0xc69552['id']};return{'type':_0x4c20de(0x200),'conditions':[]};}function isTemporalOperator(_0x5f1a49){const _0x26f21c=a102_0xee4e;return _0x5f1a49==='TimeWithinPast'||_0x5f1a49===_0x26f21c(0x1ce);}function getEffectiveValue(_0x43a5bf){const _0xd4a94f=a102_0xee4e,_0x43123c=_0x43a5bf['values'];return _0x43a5bf[_0xd4a94f(0x1ed)]??_0x43123c;}function apiOperatorToYaml(_0x273f1a){const _0x2aee47=a102_0xee4e;let _0x102fb0;if(_0x273f1a['rightValues']&&_0x273f1a[_0x2aee47(0x244)][_0x2aee47(0x23d)]>0x0)_0x102fb0=_0x273f1a[_0x2aee47(0x244)];else{if(_0x273f1a[_0x2aee47(0x231)]!==undefined)_0x102fb0=_0x273f1a['rightValue'];else isTemporalOperator(_0x273f1a[_0x2aee47(0x218)])&&_0x273f1a[_0x2aee47(0x1ed)]!==undefined&&(_0x102fb0=_0x273f1a['value']);}return{'type':mapApiOperatorType(_0x273f1a[_0x2aee47(0x218)]),..._0x273f1a['not']&&{'not':_0x273f1a[_0x2aee47(0x21f)]},..._0x102fb0!==undefined&&{'value':_0x102fb0},..._0x273f1a[_0x2aee47(0x1e1)]&&{'unit':_0x273f1a['unit']}};}function a102_0x20f2(){const _0xa5728b=['push','join_row','1890016CVpucy','parse','operator','aggregation','name','connectionNameToIdMap','activationTemplateId','activations','test','value','add','arrayMatching','Invalid\x20connector_config\x20for\x20activation\x20\x22','activationParams','scheduleType','include','notify_on','max','email_recipients','code','localeCompare','behavior','duration','timezone','Connector:\x20','repeatSubFrequency','3477175kVUyGo','connectorConfig','And','connectionId','isArray','CONNECTOR_SCHEMA_NOT_FOUND','\x27:\x20','from','source','groupingColumns','values','attribute','funnel_stage','Unknown\x20email\x20recipient:\x20','conditions','CONNECTION_NOT_FOUND','].attribute\x20cannot\x20be\x20empty.\x0a','activation_template_id','stringify','getSchema','30118yIEqzM','errors','columns','visible','null','replace','type','exclude','valid','description','limit','joinRow','map','not','resolveSegmentName','notifyOn','min','Unknown\x20connection:\x20','repeatFrequency','start_at','behavior_table','Reference','string','keys','__UNRESOLVED__','2448030rHAYMV','attributes','startAt','repeat_frequency','Segment\x20description','repeat_unit','rightValue','emailRecipients','set','\x22:\x0a','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','53256Vhdvgv','batch','\x0a\x0aAvailable\x20fields:\x0a','orderBy','behaviorTableName','object','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','length','has','kind','join_strategy','connectionNameToTypeMap','leftValue','warnings','rightValues','segmentFolderId','realtime','JOURNEY_SYNTAX_ERROR','rule:','4138749LnWRxA','toLowerCase','entries','notification','4959YpEXeB','2845913vTnYGA','filter','any','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','endOn','activations:','formatting','ruleHashToName','sort','usedNames','attribute_name','segment','end_on','24BHNEQB','visibility','order_by','repeatUnit','rule','all_columns','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','TimeWithinNext','connector_config','Equal','localRuleToName','folder','allColumns','joinStrategy','isVisible','every','connection','syndicationBehavior','INVALID_ARGUMENT','Value','repeat_sub_frequency','connector_config\x20for\x20activation\x20\x22','New\x20Segment','get','schedule','forEach','unit'];a102_0x20f2=function(){return _0xa5728b;};return a102_0x20f2();}function mapApiOperatorType(_0x355ea7){return _0x355ea7;}export function segmentDefToCreateRequest(_0x394af2,_0x1372d9){const _0x2cc2f3=a102_0xee4e,_0x261c6c={'name':_0x394af2[_0x2cc2f3(0x1e8)]};return _0x394af2[_0x2cc2f3(0x21b)]&&(_0x261c6c['description']=_0x394af2[_0x2cc2f3(0x21b)]),_0x394af2[_0x2cc2f3(0x1cb)]&&(_0x261c6c[_0x2cc2f3(0x1cb)]=yamlRuleToApi(_0x394af2[_0x2cc2f3(0x1cb)])),_0x394af2[_0x2cc2f3(0x23f)]&&(_0x261c6c[_0x2cc2f3(0x23f)]=_0x394af2[_0x2cc2f3(0x23f)]===_0x2cc2f3(0x237)?0x0:_0x394af2[_0x2cc2f3(0x23f)]===_0x2cc2f3(0x246)?0x1:0x2),_0x394af2['visible']!==undefined&&(_0x261c6c[_0x2cc2f3(0x1d5)]=_0x394af2[_0x2cc2f3(0x215)]),_0x1372d9&&(_0x261c6c[_0x2cc2f3(0x245)]=_0x1372d9),_0x261c6c;}export function segmentDefToUpdateRequest(_0x470a31){const _0xe03e64=a102_0xee4e,_0x4917c5={'name':_0x470a31['name']};return _0x470a31[_0xe03e64(0x21b)]!==undefined&&(_0x4917c5[_0xe03e64(0x21b)]=_0x470a31['description']),_0x470a31['rule']&&(_0x4917c5[_0xe03e64(0x1cb)]=yamlRuleToApi(_0x470a31[_0xe03e64(0x1cb)])),_0x470a31[_0xe03e64(0x23f)]&&(_0x4917c5[_0xe03e64(0x23f)]=_0x470a31[_0xe03e64(0x23f)]===_0xe03e64(0x237)?0x0:_0x470a31['kind']===_0xe03e64(0x246)?0x1:0x2),_0x4917c5;}export function yamlRuleToApi(_0x31c324,_0x242b04=![]){const _0xc4354e=a102_0xee4e,_0xf5b818=_0x31c324['conditions'][_0xc4354e(0x21e)](yamlConditionToApi);if(_0x242b04){const _0x108a58=_0xf5b818[_0xc4354e(0x1d6)](_0x500aa2=>_0x500aa2[_0xc4354e(0x218)]==='And'||_0x500aa2[_0xc4354e(0x218)]==='Or');if(!_0x108a58&&_0xf5b818[_0xc4354e(0x23d)]>0x0)return{'type':_0x31c324[_0xc4354e(0x218)],'conditions':[{'type':_0xc4354e(0x200),'description':_0x31c324['description']||'','conditions':_0xf5b818}]};}return{'type':_0x31c324['type'],'conditions':_0xf5b818,..._0x31c324[_0xc4354e(0x21b)]&&{'description':_0x31c324['description']}};}function yamlConditionToApi(_0x23ec84){const _0x44110c=a102_0xee4e;if(_0x44110c(0x1c5)in _0x23ec84&&(_0x23ec84['type']===_0x44110c(0x1f3)||_0x23ec84['type']===_0x44110c(0x219))){const _0x5cb149=_0x23ec84;return{'type':_0x44110c(0x227),'id':_0x5cb149['segment'],'exclude':_0x5cb149['type']===_0x44110c(0x219)};}if(_0x44110c(0x218)in _0x23ec84&&(_0x23ec84[_0x44110c(0x218)]===_0x44110c(0x200)||_0x23ec84['type']==='Or')){const _0x2f3d82=_0x23ec84;return{'type':_0x2f3d82['type'],'conditions':_0x2f3d82[_0x44110c(0x20c)]['map'](yamlConditionToApi),..._0x2f3d82['description']&&{'description':_0x2f3d82['description']}};}const _0xdb0822=_0x23ec84,_0x52f511={'type':'Value','leftValue':buildLeftValue(_0xdb0822),'operator':yamlOperatorToApi(_0xdb0822[_0x44110c(0x1e6)]),'exclude':_0xdb0822['exclude']??![],'arrayMatching':_0xdb0822[_0x44110c(0x1ef)]??_0x44110c(0x250)};return _0xdb0822['limit']!==undefined&&(_0x52f511[_0x44110c(0x21c)]=_0xdb0822[_0x44110c(0x21c)]),_0x52f511;}function buildLeftValue(_0x4ba0b1){const _0x50ff4a=a102_0xee4e,_0x23f325={'name':_0x4ba0b1[_0x50ff4a(0x209)]};return _0x4ba0b1['aggregation']&&(_0x23f325[_0x50ff4a(0x1e7)]={'type':_0x4ba0b1[_0x50ff4a(0x1e7)][_0x50ff4a(0x218)],..._0x4ba0b1[_0x50ff4a(0x1e7)]['groupingColumns']&&{'groupingColumns':_0x4ba0b1['aggregation']['groupingColumns']}}),_0x4ba0b1[_0x50ff4a(0x206)]&&(_0x23f325[_0x50ff4a(0x206)]={'name':_0x4ba0b1[_0x50ff4a(0x206)]}),_0x4ba0b1[_0x50ff4a(0x24f)]&&(_0x23f325[_0x50ff4a(0x24f)]=yamlRuleToApi(_0x4ba0b1[_0x50ff4a(0x24f)])),_0x23f325;}function yamlOperatorToApi(_0x298db3){const _0xd8a507=a102_0xee4e,_0x23d0b9={'type':mapYamlOperatorType(_0x298db3[_0xd8a507(0x218)]),'not':_0x298db3[_0xd8a507(0x21f)]??![]},_0x363184=getEffectiveValue(_0x298db3);if(_0x363184!==undefined){if(Array[_0xd8a507(0x202)](_0x363184))_0x23d0b9['rightValues']=_0x363184;else isTemporalOperator(_0x298db3[_0xd8a507(0x218)])?_0x23d0b9[_0xd8a507(0x1ed)]=_0x363184:_0x23d0b9['rightValue']=_0x363184;}return _0x298db3[_0xd8a507(0x1e1)]&&(_0x23d0b9['unit']=_0x298db3[_0xd8a507(0x1e1)]),_0x23d0b9;}function mapYamlOperatorType(_0x3b0bb0){return _0x3b0bb0;}export function toYamlString(_0xdef579){const _0x3a576c=a102_0xee4e,_0x51e076=JSON[_0x3a576c(0x1e5)](JSON[_0x3a576c(0x210)](_0xdef579)),_0x55ec57=a102_0x44f7d5[_0x3a576c(0x210)](_0x51e076,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3a576c(0x216)}),_0x3caff2=[_0x3a576c(0x248)];let _0x3b480d=_0x55ec57;for(const _0x1b74c6 of _0x3caff2){_0x3b480d=_0x3b480d[_0x3a576c(0x217)](new RegExp('^('+_0x1b74c6+')','m'),(_0x1296df,_0x397066,_0x276957)=>{if(_0x276957===0x0||_0x3b480d[_0x276957-0x1]==='\x0a'&&_0x3b480d[_0x276957-0x2]==='\x0a')return _0x397066;return'\x0a'+_0x397066;});}return _0x3b480d;}export function parseYamlString(_0x2c187c){const _0x26f6bf=a102_0xee4e,_0x4de2b3=a102_0x44f7d5['parse'](_0x2c187c);if(!_0x4de2b3['name'])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');if(_0x4de2b3['type']&&_0x4de2b3['type']!==_0x26f6bf(0x1c5))throw new Error(_0x26f6bf(0x23c)+_0x4de2b3[_0x26f6bf(0x218)]);return _0x4de2b3;}export function isSegmentYaml(_0x2969fd){const _0xcbd12=a102_0xee4e;if(typeof _0x2969fd!==_0xcbd12(0x23b)||_0x2969fd===null)return![];const _0x230877=_0x2969fd;return _0x230877[_0xcbd12(0x218)]==='segment'||_0x230877[_0xcbd12(0x218)]===undefined;}export function generateTemplate(_0x27619d=a102_0x45780e(0x1dd)){const _0x158d5b=a102_0x45780e,_0x334501={'type':_0x158d5b(0x1c5),'name':_0x27619d,'description':_0x158d5b(0x22f),'rule':{'type':_0x158d5b(0x200),'conditions':[{'type':_0x158d5b(0x1da),'attribute':_0x158d5b(0x1c4),'operator':{'type':_0x158d5b(0x1d0),'value':_0x158d5b(0x1ed)}}]}};return toYamlString(_0x334501);}export function segmentToYamlString(_0x2a4cc0){const _0x486a0a=a102_0x45780e,_0x583bba=JSON[_0x486a0a(0x1e5)](JSON[_0x486a0a(0x210)](_0x2a4cc0)),_0x3e0f7d=a102_0x44f7d5[_0x486a0a(0x210)](_0x583bba,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x486a0a(0x216)}),_0x4172b6=[_0x486a0a(0x248),_0x486a0a(0x253)];let _0x40ce84=_0x3e0f7d;for(const _0x56c7c5 of _0x4172b6){_0x40ce84=_0x40ce84[_0x486a0a(0x217)](new RegExp('^('+_0x56c7c5+')','m'),(_0x506253,_0x565062,_0x4a3490)=>{if(_0x4a3490===0x0||_0x40ce84[_0x4a3490-0x1]==='\x0a'&&_0x40ce84[_0x4a3490-0x2]==='\x0a')return _0x565062;return'\x0a'+_0x565062;});}return _0x40ce84;}export function parseSegmentYamlFile(_0x3a0d17){const _0xd9db53=a102_0x45780e,_0x1a71b2=a102_0x44f7d5['parse'](_0x3a0d17);if(!_0x1a71b2[_0xd9db53(0x1e8)])throw new Error('YAML\x20config\x20missing\x20required\x20field:\x20name');return _0x1a71b2;}export function normalizeChildSegmentYaml(_0x181f82){const _0x468468=a102_0x45780e;return{'type':_0x468468(0x1c5),'name':_0x181f82['name'],..._0x181f82[_0x468468(0x21b)]!==undefined&&{'description':_0x181f82[_0x468468(0x21b)]},..._0x181f82[_0x468468(0x1d2)]!==undefined&&{'folder':_0x181f82[_0x468468(0x1d2)]},..._0x181f82[_0x468468(0x1cb)]&&{'rule':normalizeRule(_0x181f82[_0x468468(0x1cb)])},..._0x181f82[_0x468468(0x23f)]!==undefined&&{'kind':_0x181f82[_0x468468(0x23f)]},..._0x181f82[_0x468468(0x215)]!==undefined&&{'visible':_0x181f82['visible']},..._0x181f82[_0x468468(0x1eb)]&&{'activations':_0x181f82[_0x468468(0x1eb)][_0x468468(0x21e)](normalizeActivation)}};}export function normalizeRule(_0x198391){const _0x16f51e=a102_0x45780e;return{'type':_0x198391[_0x16f51e(0x218)],'conditions':_0x198391[_0x16f51e(0x20c)][_0x16f51e(0x21e)](normalizeCondition),..._0x198391['description']!==undefined&&{'description':_0x198391[_0x16f51e(0x21b)]}};}function normalizeCondition(_0x2a2c5d){const _0x15b3e2=a102_0x45780e;if(_0x15b3e2(0x1c5)in _0x2a2c5d&&(_0x2a2c5d[_0x15b3e2(0x218)]===_0x15b3e2(0x1f3)||_0x2a2c5d[_0x15b3e2(0x218)]===_0x15b3e2(0x219))){const _0x4e8d73=_0x2a2c5d;return{'type':_0x4e8d73[_0x15b3e2(0x218)],'segment':_0x4e8d73[_0x15b3e2(0x1c5)]};}if(_0x15b3e2(0x218)in _0x2a2c5d&&(_0x2a2c5d[_0x15b3e2(0x218)]===_0x15b3e2(0x200)||_0x2a2c5d[_0x15b3e2(0x218)]==='Or')){const _0x48da3e=_0x2a2c5d;return{'type':_0x48da3e[_0x15b3e2(0x218)],'conditions':_0x48da3e[_0x15b3e2(0x20c)][_0x15b3e2(0x21e)](normalizeCondition),..._0x48da3e['description']!==undefined&&{'description':_0x48da3e[_0x15b3e2(0x21b)]}};}const _0x71700d=_0x2a2c5d;return{'type':_0x15b3e2(0x1da),'attribute':_0x71700d[_0x15b3e2(0x209)],'operator':normalizeOperator(_0x71700d[_0x15b3e2(0x1e6)]),..._0x71700d[_0x15b3e2(0x1ef)]!==undefined&&{'arrayMatching':_0x71700d[_0x15b3e2(0x1ef)]},..._0x71700d[_0x15b3e2(0x219)]!==undefined&&{'exclude':_0x71700d[_0x15b3e2(0x219)]},..._0x71700d['aggregation']!==undefined&&{'aggregation':_0x71700d['aggregation']},..._0x71700d[_0x15b3e2(0x206)]!==undefined&&{'source':_0x71700d[_0x15b3e2(0x206)]},..._0x71700d[_0x15b3e2(0x24f)]!==undefined&&{'filter':normalizeRule(_0x71700d[_0x15b3e2(0x24f)])},..._0x71700d[_0x15b3e2(0x21c)]!==undefined&&{'limit':_0x71700d[_0x15b3e2(0x21c)]}};}function normalizeOperator(_0x1246cb){const _0x3eec8b=a102_0x45780e,_0xf595fe=getEffectiveValue(_0x1246cb);return{'type':_0x1246cb[_0x3eec8b(0x218)],..._0x1246cb[_0x3eec8b(0x21f)]!==undefined&&{'not':_0x1246cb[_0x3eec8b(0x21f)]},..._0xf595fe!==undefined&&{'value':_0xf595fe},..._0x1246cb[_0x3eec8b(0x222)]!==undefined&&{'min':_0x1246cb[_0x3eec8b(0x222)]},..._0x1246cb[_0x3eec8b(0x1f5)]!==undefined&&{'max':_0x1246cb[_0x3eec8b(0x1f5)]},..._0x1246cb['unit']!==undefined&&{'unit':_0x1246cb[_0x3eec8b(0x1e1)]},..._0x1246cb[_0x3eec8b(0x1fa)]!==undefined&&{'duration':_0x1246cb[_0x3eec8b(0x1fa)]},..._0x1246cb[_0x3eec8b(0x205)]!==undefined&&{'from':_0x1246cb['from']}};}function normalizeActivation(_0x19ebbd){const _0x32f555=a102_0x45780e;return{'name':_0x19ebbd[_0x32f555(0x1e8)],'connection':_0x19ebbd['connection'],..._0x19ebbd[_0x32f555(0x21b)]!==undefined&&{'description':_0x19ebbd[_0x32f555(0x21b)]},..._0x19ebbd[_0x32f555(0x1cc)]!==undefined&&{'all_columns':_0x19ebbd[_0x32f555(0x1cc)]},..._0x19ebbd[_0x32f555(0x214)]!==undefined&&{'columns':_0x19ebbd[_0x32f555(0x214)]},..._0x19ebbd[_0x32f555(0x1f9)]!==undefined&&{'behavior':_0x19ebbd['behavior']},..._0x19ebbd[_0x32f555(0x1df)]!==undefined&&{'schedule':_0x19ebbd[_0x32f555(0x1df)]},..._0x19ebbd['notification']!==undefined&&{'notification':_0x19ebbd[_0x32f555(0x24c)]},..._0x19ebbd[_0x32f555(0x1cf)]!==undefined&&{'connector_config':_0x19ebbd[_0x32f555(0x1cf)]},..._0x19ebbd[_0x32f555(0x20f)]!==undefined&&{'activation_template_id':_0x19ebbd['activation_template_id']}};}export function activationResponseToDef(_0x410544,_0x3191,_0x3db384){const _0x50285b=a102_0x45780e,_0x1a00a4=_0x410544[_0x50285b(0x201)]||'',_0x4fdf02=_0x3db384?.[_0x50285b(0x1de)](_0x1a00a4)??_0x1a00a4,_0x1a4466={'name':_0x410544[_0x50285b(0x1e8)],'connection':_0x4fdf02};_0x410544[_0x50285b(0x21b)]&&(_0x1a4466[_0x50285b(0x21b)]=_0x410544[_0x50285b(0x21b)]);let _0x4f14e0=[];_0x410544[_0x50285b(0x214)]&&_0x410544[_0x50285b(0x214)][_0x50285b(0x23d)]>0x0&&(_0x4f14e0=_0x410544['columns'][_0x50285b(0x24f)](_0x4ef79f=>_0x4ef79f&&_0x4ef79f[_0x50285b(0x1e8)])['map'](_0x5f4775=>{const _0x408830=_0x50285b;if(_0x5f4775[_0x408830(0x218)]||_0x5f4775[_0x408830(0x1c8)])return{'name':_0x5f4775['name'],..._0x5f4775['type']&&{'type':_0x5f4775[_0x408830(0x218)]},..._0x5f4775[_0x408830(0x1c8)]&&{'visibility':_0x5f4775['visibility']}};return _0x5f4775[_0x408830(0x1e8)];}));_0x4f14e0[_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x214)]=_0x4f14e0);_0x410544[_0x50285b(0x1d3)]!==undefined&&(_0x410544[_0x50285b(0x1d3)]===![]&&_0x4f14e0['length']===0x0?_0x1a4466['all_columns']=!![]:_0x1a4466[_0x50285b(0x1cc)]=_0x410544[_0x50285b(0x1d3)]);const _0x405e08={};let _0x1e478a=![];_0x410544['scheduleType']&&(_0x405e08[_0x50285b(0x218)]=_0x410544[_0x50285b(0x1f2)],_0x1e478a=!![]);_0x410544['repeatUnit']&&(_0x405e08[_0x50285b(0x230)]=_0x410544[_0x50285b(0x1ca)],_0x1e478a=!![]);_0x410544[_0x50285b(0x224)]!==undefined&&_0x410544['repeatFrequency']!==null&&(_0x405e08[_0x50285b(0x22e)]=_0x410544[_0x50285b(0x224)],_0x1e478a=!![]);_0x410544['repeatSubFrequency']&&_0x410544[_0x50285b(0x1fd)][_0x50285b(0x23d)]>0x0&&(_0x405e08[_0x50285b(0x1db)]=_0x410544[_0x50285b(0x1fd)],_0x1e478a=!![]);_0x410544[_0x50285b(0x22d)]!==undefined&&(_0x405e08[_0x50285b(0x225)]=_0x410544['startAt'],_0x1e478a=!![]);_0x410544['endOn']!==undefined&&(_0x405e08[_0x50285b(0x1c6)]=_0x410544['endOn'],_0x1e478a=!![]);_0x410544['timezone']&&(_0x405e08[_0x50285b(0x1fb)]=_0x410544[_0x50285b(0x1fb)],_0x1e478a=!![]);_0x1e478a&&(_0x1a4466[_0x50285b(0x1df)]=_0x405e08);(_0x410544[_0x50285b(0x221)]&&_0x410544[_0x50285b(0x221)]['length']>0x0||_0x410544[_0x50285b(0x232)]&&_0x410544[_0x50285b(0x232)][_0x50285b(0x23d)]>0x0)&&(_0x1a4466[_0x50285b(0x24c)]={},_0x410544[_0x50285b(0x221)]&&_0x410544['notifyOn']['length']>0x0&&(_0x1a4466[_0x50285b(0x24c)][_0x50285b(0x1f4)]=_0x410544[_0x50285b(0x221)]),_0x410544[_0x50285b(0x232)]&&_0x410544['emailRecipients'][_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x24c)][_0x50285b(0x1f6)]=_0x410544[_0x50285b(0x232)]['map'](_0x478e0a=>{const _0xb5902b=_0x50285b,_0x40fddc=_0x3191?.[_0xb5902b(0x1de)](_0x478e0a);return _0x40fddc??String(_0x478e0a);})));_0x410544['connectorConfig']&&Object[_0x50285b(0x229)](_0x410544['connectorConfig'])[_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x1cf)]=normalizeConnectorConfigForYaml(_0x410544[_0x50285b(0x1ff)]));_0x410544[_0x50285b(0x1ea)]&&(_0x1a4466[_0x50285b(0x20f)]=_0x410544[_0x50285b(0x1ea)]);if(_0x410544[_0x50285b(0x1d8)]){const _0x282b96={},_0x42643b=_0x410544[_0x50285b(0x1d8)];_0x42643b[_0x50285b(0x214)]&&_0x42643b[_0x50285b(0x214)][_0x50285b(0x23d)]>0x0&&(_0x282b96['columns']=_0x42643b['columns'][_0x50285b(0x24f)](_0x378bb0=>_0x378bb0&&_0x378bb0['name'])[_0x50285b(0x21e)](_0xe1debc=>({'name':_0xe1debc[_0x50285b(0x1e8)],..._0xe1debc['type']&&{'type':_0xe1debc['type']},..._0xe1debc[_0x50285b(0x1c8)]&&{'visibility':_0xe1debc['visibility']}}))),_0x42643b['behaviorTableName']&&(_0x282b96['behavior_table']=_0x42643b[_0x50285b(0x23a)]),_0x42643b['joinRow']!==undefined&&(_0x282b96[_0x50285b(0x1e3)]=_0x42643b[_0x50285b(0x21d)]),_0x42643b[_0x50285b(0x1d4)]&&(_0x282b96[_0x50285b(0x240)]=_0x42643b[_0x50285b(0x1d4)]),_0x42643b[_0x50285b(0x254)]&&(_0x282b96[_0x50285b(0x254)]=_0x42643b[_0x50285b(0x254)]),_0x42643b[_0x50285b(0x239)]&&_0x42643b[_0x50285b(0x239)]['length']>0x0&&(_0x282b96['order_by']=_0x42643b['orderBy']),Object[_0x50285b(0x229)](_0x282b96)[_0x50285b(0x23d)]>0x0&&(_0x1a4466[_0x50285b(0x1f9)]=_0x282b96);}return _0x1a4466;}export function journeyActivationStepToYaml(_0x37d201,_0x3eb97f,_0x26cd3d){const _0x13fed5=a102_0x45780e,_0x284569=_0x37d201[_0x13fed5(0x22c)][_0x13fed5(0x1f1)],_0x32138e=_0x284569['connectionId']||'',_0x900bea=_0x26cd3d?.[_0x13fed5(0x1de)](_0x32138e)??_0x32138e,_0x3c0456={'name':_0x284569['name']||'','connection':_0x900bea};_0x284569[_0x13fed5(0x21b)]&&(_0x3c0456['description']=_0x284569['description']);let _0x53fe6e=[];_0x284569['columns']&&_0x284569[_0x13fed5(0x214)][_0x13fed5(0x23d)]>0x0&&(_0x53fe6e=_0x284569[_0x13fed5(0x214)][_0x13fed5(0x24f)](_0x215834=>_0x215834&&_0x215834['name'])[_0x13fed5(0x21e)](_0x4865a9=>{const _0x1fa1d5=_0x13fed5;if(_0x4865a9[_0x1fa1d5(0x218)]||_0x4865a9[_0x1fa1d5(0x1c8)])return{'name':_0x4865a9['name'],..._0x4865a9[_0x1fa1d5(0x218)]&&{'type':_0x4865a9[_0x1fa1d5(0x218)]},..._0x4865a9[_0x1fa1d5(0x1c8)]&&{'visibility':_0x4865a9['visibility']}};return _0x4865a9[_0x1fa1d5(0x1e8)];}));_0x53fe6e[_0x13fed5(0x23d)]>0x0&&(_0x3c0456[_0x13fed5(0x214)]=_0x53fe6e);_0x284569[_0x13fed5(0x1d3)]!==undefined&&(_0x284569['allColumns']===![]&&_0x53fe6e['length']===0x0?_0x3c0456[_0x13fed5(0x1cc)]=!![]:_0x3c0456[_0x13fed5(0x1cc)]=_0x284569[_0x13fed5(0x1d3)]);const _0x357776={};let _0x392d3d=![];_0x284569[_0x13fed5(0x1f2)]&&(_0x357776[_0x13fed5(0x218)]=_0x284569['scheduleType'],_0x392d3d=!![]);_0x284569[_0x13fed5(0x1ca)]&&(_0x357776[_0x13fed5(0x230)]=_0x284569[_0x13fed5(0x1ca)],_0x392d3d=!![]);_0x284569[_0x13fed5(0x224)]!==undefined&&_0x284569[_0x13fed5(0x224)]!==null&&(_0x357776[_0x13fed5(0x22e)]=_0x284569['repeatFrequency'],_0x392d3d=!![]);_0x284569[_0x13fed5(0x22d)]!==undefined&&(_0x357776[_0x13fed5(0x225)]=_0x284569['startAt'],_0x392d3d=!![]);_0x284569[_0x13fed5(0x252)]!==undefined&&(_0x357776[_0x13fed5(0x1c6)]=_0x284569[_0x13fed5(0x252)],_0x392d3d=!![]);_0x284569['timezone']&&(_0x357776[_0x13fed5(0x1fb)]=_0x284569[_0x13fed5(0x1fb)],_0x392d3d=!![]);_0x392d3d&&(_0x3c0456[_0x13fed5(0x1df)]=_0x357776);(_0x284569[_0x13fed5(0x221)]&&_0x284569[_0x13fed5(0x221)][_0x13fed5(0x23d)]>0x0||_0x284569['emailRecipients']&&_0x284569[_0x13fed5(0x232)][_0x13fed5(0x23d)]>0x0)&&(_0x3c0456[_0x13fed5(0x24c)]={},_0x284569[_0x13fed5(0x221)]&&_0x284569['notifyOn']['length']>0x0&&(_0x3c0456[_0x13fed5(0x24c)][_0x13fed5(0x1f4)]=_0x284569[_0x13fed5(0x221)]),_0x284569[_0x13fed5(0x232)]&&_0x284569[_0x13fed5(0x232)][_0x13fed5(0x23d)]>0x0&&(_0x3c0456[_0x13fed5(0x24c)]['email_recipients']=_0x284569[_0x13fed5(0x232)][_0x13fed5(0x21e)](_0x49bc1f=>{const _0x581ca3=_0x13fed5,_0x42ca72=_0x3eb97f?.[_0x581ca3(0x1de)](_0x49bc1f);return _0x42ca72??String(_0x49bc1f);})));_0x284569[_0x13fed5(0x1ff)]&&Object[_0x13fed5(0x229)](_0x284569['connectorConfig'])[_0x13fed5(0x23d)]>0x0&&(_0x3c0456[_0x13fed5(0x1cf)]=normalizeConnectorConfigForYaml(_0x284569[_0x13fed5(0x1ff)]));_0x284569[_0x13fed5(0x1ea)]&&(_0x3c0456[_0x13fed5(0x20f)]=_0x284569[_0x13fed5(0x1ea)]);if(_0x284569[_0x13fed5(0x1d8)]){const _0x1865be={},_0x351805=_0x284569[_0x13fed5(0x1d8)];_0x351805[_0x13fed5(0x214)]&&_0x351805[_0x13fed5(0x214)][_0x13fed5(0x23d)]>0x0&&(_0x1865be[_0x13fed5(0x214)]=_0x351805[_0x13fed5(0x214)][_0x13fed5(0x24f)](_0x5a3eb4=>_0x5a3eb4&&_0x5a3eb4[_0x13fed5(0x1e8)])[_0x13fed5(0x21e)](_0x1c754d=>({'name':_0x1c754d[_0x13fed5(0x1e8)],..._0x1c754d['type']&&{'type':_0x1c754d[_0x13fed5(0x218)]},..._0x1c754d['visibility']&&{'visibility':_0x1c754d[_0x13fed5(0x1c8)]}}))),_0x351805['behaviorTableName']&&(_0x1865be[_0x13fed5(0x226)]=_0x351805[_0x13fed5(0x23a)]),_0x351805[_0x13fed5(0x21d)]!==undefined&&(_0x1865be['join_row']=_0x351805['joinRow']),_0x351805[_0x13fed5(0x1d4)]&&(_0x1865be[_0x13fed5(0x240)]=_0x351805['joinStrategy']),_0x351805['formatting']&&(_0x1865be['formatting']=_0x351805[_0x13fed5(0x254)]),_0x351805[_0x13fed5(0x239)]&&_0x351805[_0x13fed5(0x239)][_0x13fed5(0x23d)]>0x0&&(_0x1865be['order_by']=_0x351805['orderBy']),Object[_0x13fed5(0x229)](_0x1865be)[_0x13fed5(0x23d)]>0x0&&(_0x3c0456['behavior']=_0x1865be);}return _0x3c0456;}export function segmentWithActivationsToYaml(_0x197852,_0x766ed6,_0x3dce85,_0x48f627,_0x3285df){const _0x33dc90=a102_0x45780e,_0x588809=segmentResponseToDefSync(_0x197852,_0x3dce85);return _0x766ed6[_0x33dc90(0x23d)]>0x0&&(_0x588809[_0x33dc90(0x1eb)]=_0x766ed6[_0x33dc90(0x21e)](_0x58a2fe=>activationResponseToDef(_0x58a2fe,_0x48f627,_0x3285df))),_0x588809;}function normalizeColumn(_0x2c46a1){const _0x2af00e=a102_0x45780e;if(typeof _0x2c46a1===_0x2af00e(0x228))return{'name':_0x2c46a1};return{'name':_0x2c46a1['name'],..._0x2c46a1[_0x2af00e(0x218)]&&{'type':_0x2c46a1[_0x2af00e(0x218)]},..._0x2c46a1[_0x2af00e(0x1c8)]&&{'visibility':_0x2c46a1[_0x2af00e(0x1c8)]}};}export async function activationDefToCreateRequest(_0x760be,_0x5a6774){const _0x4e6d86=a102_0x45780e,_0x36e169=_0x5a6774?.['emailToIdMap'],_0x546751=_0x5a6774?.[_0x4e6d86(0x1e9)],_0x48ae58=_0x760be[_0x4e6d86(0x1d7)];let _0x257955;const _0x107b76=parseInt(_0x48ae58,0xa);if(!isNaN(_0x107b76)&&String(_0x107b76)===_0x48ae58)_0x257955=_0x107b76;else{const _0x1265c7=_0x546751?.[_0x4e6d86(0x1de)](_0x48ae58);if(_0x1265c7===undefined)throw new SDKError(ErrorCode[_0x4e6d86(0x20d)],_0x4e6d86(0x223)+_0x48ae58,undefined,{'helpText':_0x4e6d86(0x235)});_0x257955=_0x1265c7;}const _0x1c7696={'name':_0x760be[_0x4e6d86(0x1e8)],'connectionId':_0x257955};_0x760be[_0x4e6d86(0x21b)]&&(_0x1c7696[_0x4e6d86(0x21b)]=_0x760be[_0x4e6d86(0x21b)]);let _0x464593=[];_0x760be['columns']&&_0x760be[_0x4e6d86(0x214)][_0x4e6d86(0x23d)]>0x0&&(_0x464593=_0x760be[_0x4e6d86(0x214)][_0x4e6d86(0x24f)](_0x20f102=>_0x20f102!=null)['map'](normalizeColumn));_0x464593[_0x4e6d86(0x23d)]>0x0&&(_0x1c7696['columns']=_0x464593);_0x760be[_0x4e6d86(0x1cc)]!==undefined&&(_0x760be['all_columns']===![]&&_0x464593[_0x4e6d86(0x23d)]===0x0?_0x1c7696[_0x4e6d86(0x1d3)]=!![]:_0x1c7696[_0x4e6d86(0x1d3)]=_0x760be[_0x4e6d86(0x1cc)]);if(_0x760be[_0x4e6d86(0x1df)]){const _0x536833=_0x760be[_0x4e6d86(0x1df)];_0x536833[_0x4e6d86(0x218)]&&(_0x1c7696['scheduleType']=_0x536833[_0x4e6d86(0x218)]),_0x536833['repeat_unit']&&(_0x1c7696[_0x4e6d86(0x1ca)]=_0x536833[_0x4e6d86(0x230)]),_0x536833[_0x4e6d86(0x22e)]!==undefined&&(_0x1c7696[_0x4e6d86(0x224)]=_0x536833[_0x4e6d86(0x22e)]),_0x536833[_0x4e6d86(0x1db)]&&(_0x1c7696[_0x4e6d86(0x1fd)]=_0x536833['repeat_sub_frequency']),_0x536833['start_at']!==undefined&&(_0x1c7696[_0x4e6d86(0x22d)]=_0x536833[_0x4e6d86(0x225)]),_0x536833[_0x4e6d86(0x1c6)]!==undefined&&(_0x1c7696[_0x4e6d86(0x252)]=_0x536833['end_on']),_0x536833['timezone']&&(_0x1c7696['timezone']=_0x536833[_0x4e6d86(0x1fb)]);}_0x760be[_0x4e6d86(0x24c)]&&(_0x760be['notification'][_0x4e6d86(0x1f4)]&&(_0x1c7696[_0x4e6d86(0x221)]=_0x760be[_0x4e6d86(0x24c)][_0x4e6d86(0x1f4)]),_0x760be[_0x4e6d86(0x24c)][_0x4e6d86(0x1f6)]&&(_0x1c7696[_0x4e6d86(0x232)]=_0x760be[_0x4e6d86(0x24c)]['email_recipients'][_0x4e6d86(0x21e)](_0x2dc366=>{const _0x14b4be=_0x4e6d86,_0x12f009=Number(_0x2dc366);if(!isNaN(_0x12f009)&&String(_0x12f009)===_0x2dc366)return _0x12f009;const _0x43f739=_0x36e169?.[_0x14b4be(0x1de)](_0x2dc366[_0x14b4be(0x24a)]());if(_0x43f739===undefined)throw new SDKError(ErrorCode[_0x14b4be(0x1d9)],_0x14b4be(0x20b)+_0x2dc366+_0x14b4be(0x1cd));return _0x43f739;})));if(_0x760be['connector_config']){const _0x68fdff=_0x5a6774?.[_0x4e6d86(0x241)]?.['get'](_0x48ae58);if(_0x68fdff&&_0x5a6774?.[_0x4e6d86(0x211)])try{const _0x3eeef8=await _0x5a6774['getSchema'](_0x68fdff),_0x2ea46b=validateConnectorConfig(_0x760be[_0x4e6d86(0x1cf)],_0x3eeef8);if(!_0x2ea46b[_0x4e6d86(0x21a)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0x4e6d86(0x1f0)+_0x760be['name']+'\x22:\x0a'+formatValidationErrors(_0x2ea46b[_0x4e6d86(0x213)]),undefined,{'helpText':_0x4e6d86(0x1fc)+_0x68fdff+_0x4e6d86(0x238)+formatSchemaAsHelp(_0x3eeef8)});if(_0x2ea46b[_0x4e6d86(0x243)][_0x4e6d86(0x23d)]>0x0){const _0x1a6756=formatValidationWarnings(_0x2ea46b['warnings']);console['warn'](_0x4e6d86(0x1dc)+_0x760be[_0x4e6d86(0x1e8)]+_0x4e6d86(0x234)+_0x1a6756);}_0x1c7696[_0x4e6d86(0x1ff)]=transformConfigToLegacy(_0x760be[_0x4e6d86(0x1cf)],_0x3eeef8);}catch(_0xe6bb9b){if(_0xe6bb9b instanceof SDKError&&_0xe6bb9b[_0x4e6d86(0x1f7)]===ErrorCode[_0x4e6d86(0x203)])_0x1c7696[_0x4e6d86(0x1ff)]=_0x760be[_0x4e6d86(0x1cf)];else throw _0xe6bb9b;}else _0x1c7696[_0x4e6d86(0x1ff)]=_0x760be[_0x4e6d86(0x1cf)];}_0x760be[_0x4e6d86(0x20f)]!==undefined&&(_0x1c7696[_0x4e6d86(0x1ea)]=_0x760be[_0x4e6d86(0x20f)]);if(_0x760be[_0x4e6d86(0x1f9)]){const _0x200ef8=_0x760be[_0x4e6d86(0x1f9)],_0x36e762={};if(_0x200ef8[_0x4e6d86(0x214)]&&_0x200ef8[_0x4e6d86(0x214)][_0x4e6d86(0x23d)]>0x0){const _0x471d06=_0x200ef8[_0x4e6d86(0x214)][_0x4e6d86(0x24f)](_0x3f3381=>_0x3f3381&&_0x3f3381[_0x4e6d86(0x1e8)]);_0x471d06[_0x4e6d86(0x23d)]>0x0&&(_0x36e762[_0x4e6d86(0x214)]=_0x471d06);}_0x200ef8[_0x4e6d86(0x226)]&&(_0x36e762[_0x4e6d86(0x23a)]=_0x200ef8[_0x4e6d86(0x226)]),_0x200ef8[_0x4e6d86(0x1e3)]!==undefined&&(_0x36e762['joinRow']=_0x200ef8[_0x4e6d86(0x1e3)]),_0x200ef8['join_strategy']&&(_0x36e762[_0x4e6d86(0x1d4)]=_0x200ef8[_0x4e6d86(0x240)]),_0x200ef8['formatting']&&(_0x36e762[_0x4e6d86(0x254)]=_0x200ef8[_0x4e6d86(0x254)]),_0x200ef8[_0x4e6d86(0x1c9)]&&(_0x36e762[_0x4e6d86(0x239)]=_0x200ef8[_0x4e6d86(0x1c9)]),_0x1c7696[_0x4e6d86(0x1d8)]=_0x36e762;}return _0x1c7696;}export async function activationDefToUpdateRequest(_0x39e9a9,_0x54f7fd){return activationDefToCreateRequest(_0x39e9a9,_0x54f7fd);}export function deepSortObject(_0x6b9944){const _0x437504=a102_0x45780e;if(_0x6b9944===null||typeof _0x6b9944!=='object')return _0x6b9944;if(Array[_0x437504(0x202)](_0x6b9944))return _0x6b9944[_0x437504(0x21e)](deepSortObject)['sort']((_0x19e0e2,_0x13783c)=>JSON[_0x437504(0x210)](_0x19e0e2)[_0x437504(0x1f8)](JSON['stringify'](_0x13783c)));const _0x3bf376={};for(const _0x5b39ed of Object[_0x437504(0x229)](_0x6b9944)[_0x437504(0x256)]()){_0x3bf376[_0x5b39ed]=deepSortObject(_0x6b9944[_0x5b39ed]);}return _0x3bf376;}export function serializeRule(_0x3b2e04){const _0x81ef54=a102_0x45780e;return JSON[_0x81ef54(0x210)](deepSortObject(_0x3b2e04));}export function normalizeRuleForMatching(_0x4bf46b){return normalizeConditionsForMatching(_0x4bf46b);}function normalizeConditionsForMatching(_0x394d1f){const _0x14ebac=a102_0x45780e;if(_0x394d1f===null||typeof _0x394d1f!=='object')return _0x394d1f;if(Array[_0x14ebac(0x202)](_0x394d1f))return _0x394d1f[_0x14ebac(0x21e)](normalizeConditionsForMatching);const _0x59dede=_0x394d1f;if((_0x59dede[_0x14ebac(0x218)]===_0x14ebac(0x1f3)||_0x59dede[_0x14ebac(0x218)]===_0x14ebac(0x219))&&typeof _0x59dede[_0x14ebac(0x1c5)]===_0x14ebac(0x228))return{..._0x59dede,'segment':'__SEGMENT_REF__'};const _0x220044={};for(const _0x21549a of Object[_0x14ebac(0x229)](_0x59dede)){_0x220044[_0x21549a]=normalizeConditionsForMatching(_0x59dede[_0x21549a]);}return _0x220044;}export function serializeRuleForMatching(_0x55d576){const _0xa6da24=a102_0x45780e;return JSON[_0xa6da24(0x210)](deepSortObject(normalizeRuleForMatching(_0x55d576)));}export function expandSegmentReferences(_0x8201f6,_0x133581,_0xe3fba1=new Set()){return expandConditions(_0x8201f6,_0x133581,_0xe3fba1);}function expandConditions(_0x2e06da,_0x417565,_0x40e9f8){const _0x242b27=a102_0x45780e;if(_0x2e06da===null||typeof _0x2e06da!==_0x242b27(0x23b))return _0x2e06da;if(Array[_0x242b27(0x202)](_0x2e06da))return _0x2e06da[_0x242b27(0x21e)](_0x54c918=>expandConditions(_0x54c918,_0x417565,_0x40e9f8));const _0x5b3e20=_0x2e06da;if((_0x5b3e20[_0x242b27(0x218)]===_0x242b27(0x1f3)||_0x5b3e20[_0x242b27(0x218)]==='exclude')&&typeof _0x5b3e20[_0x242b27(0x1c5)]==='string'){const _0x4a1937=_0x5b3e20[_0x242b27(0x1c5)],_0x37bf57=_0x417565[_0x242b27(0x1de)](_0x4a1937);if(_0x37bf57&&!_0x40e9f8[_0x242b27(0x23e)](_0x4a1937)){const _0x39b146=new Set(_0x40e9f8);_0x39b146[_0x242b27(0x1ee)](_0x4a1937);const _0x213e72=expandConditions(_0x37bf57,_0x417565,_0x39b146);return{'type':_0x5b3e20['type'],'expanded_rule':_0x213e72};}return{'type':_0x5b3e20[_0x242b27(0x218)],'expanded_rule':_0x242b27(0x22a)};}const _0x4ccc5e={};for(const _0x41d98d of Object['keys'](_0x5b3e20)){_0x4ccc5e[_0x41d98d]=expandConditions(_0x5b3e20[_0x41d98d],_0x417565,_0x40e9f8);}return _0x4ccc5e;}function a102_0xee4e(_0x3f7bae,_0xa945a5){_0x3f7bae=_0x3f7bae-0x1c3;const _0x20f205=a102_0x20f2();let _0xee4e0f=_0x20f205[_0x3f7bae];return _0xee4e0f;}export function serializeExpandedRule(_0xd43c96,_0x2e757b){const _0xca38d4=expandSegmentReferences(_0xd43c96,_0x2e757b);return JSON['stringify'](deepSortObject(_0xca38d4));}export function createSegmentNameContext(_0x51bbd6){const _0x519f07=a102_0x45780e,_0x2468ef=new Set(),_0xf0e974=new Map(),_0x3c94d7=new Map();if(_0x51bbd6)for(const [_0x5c5115,_0xffa1a7]of Object[_0x519f07(0x24b)](_0x51bbd6)){if(_0xffa1a7[_0x519f07(0x1cb)]){const _0x4e929a=serializeRule(_0xffa1a7['rule']);_0x3c94d7[_0x519f07(0x233)](_0x4e929a,_0x5c5115),_0x2468ef['add'](_0x5c5115);}}return{'usedNames':_0x2468ef,'ruleHashToName':_0xf0e974,'localRuleToName':_0x51bbd6?_0x3c94d7:undefined};}export function resolveSegmentName(_0x136f9e,_0x3592f7,_0x39f127,_0xa9fa61){const _0x17a797=a102_0x45780e,_0x58ce62=serializeRule(_0x3592f7);if(_0x39f127['localRuleToName']){const _0x42bbca=_0x39f127[_0x17a797(0x1d1)][_0x17a797(0x1de)](_0x58ce62);if(_0x42bbca)return{'name':_0x42bbca,'isDuplicate':![],'isLocalMatch':!![]};}const _0x2d343c=_0x39f127[_0x17a797(0x255)]['get'](_0x58ce62);if(_0x2d343c)return{'name':_0x2d343c,'isDuplicate':!![],'isLocalMatch':![]};const _0x49a5d0=_0xa9fa61(_0x136f9e);let _0x2e26f0=_0x49a5d0||_0x136f9e,_0xc03c5b=_0x2e26f0,_0x13416e=0x2;while(_0x39f127[_0x17a797(0x1c3)][_0x17a797(0x23e)](_0xc03c5b)){_0xc03c5b=_0x2e26f0+'_'+_0x13416e,_0x13416e++;}return _0x39f127[_0x17a797(0x1c3)][_0x17a797(0x1ee)](_0xc03c5b),_0x39f127[_0x17a797(0x255)][_0x17a797(0x233)](_0x58ce62,_0xc03c5b),{'name':_0xc03c5b,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x3cbffe){const _0x2c6562=[],_0x34401c=_0x2b9693=>{const _0x1285a4=a102_0xee4e;if(!_0x2b9693||typeof _0x2b9693!=='object')return;if(Array['isArray'](_0x2b9693)){_0x2b9693[_0x1285a4(0x1e0)](_0x34401c);return;}const _0x4442cf=_0x2b9693;(_0x4442cf[_0x1285a4(0x218)]===_0x1285a4(0x1f3)||_0x4442cf['type']===_0x1285a4(0x219))&&typeof _0x4442cf[_0x1285a4(0x1c5)]===_0x1285a4(0x228)&&_0x2c6562[_0x1285a4(0x1e2)](_0x4442cf[_0x1285a4(0x1c5)]);for(const _0x580ac9 of Object[_0x1285a4(0x208)](_0x4442cf)){_0x34401c(_0x580ac9);}};return _0x34401c(_0x3cbffe),_0x2c6562;}export function validateSegmentRule(_0x5ada0f,_0x5960d0){const _0x470706=a102_0x45780e;if(!_0x5960d0||!_0x5960d0[_0x470706(0x20c)])return;for(let _0x4ab451=0x0;_0x4ab451<_0x5960d0['conditions'][_0x470706(0x23d)];_0x4ab451++){const _0x54dc3a=_0x5960d0[_0x470706(0x20c)][_0x4ab451];if(_0x470706(0x218)in _0x54dc3a&&_0x54dc3a['type']===_0x470706(0x1da)){const _0x1936db=_0x54dc3a;if(!_0x1936db[_0x470706(0x209)]||_0x1936db[_0x470706(0x209)]==='')throw new SDKError(ErrorCode[_0x470706(0x247)],_0x470706(0x251)+_0x5ada0f+_0x470706(0x204)+('conditions['+_0x4ab451+_0x470706(0x20e))+'Please\x20specify\x20a\x20valid\x20attribute\x20name.');}}}
1
+ const a102_0x362023=a102_0x120b;(function(_0x13c464,_0x13c09d){const _0x41a608=a102_0x120b,_0x427d18=_0x13c464();while(!![]){try{const _0x14de47=parseInt(_0x41a608(0x1af))/0x1+parseInt(_0x41a608(0x14a))/0x2+-parseInt(_0x41a608(0x186))/0x3+parseInt(_0x41a608(0x173))/0x4*(-parseInt(_0x41a608(0x15a))/0x5)+-parseInt(_0x41a608(0x187))/0x6+-parseInt(_0x41a608(0x15b))/0x7*(-parseInt(_0x41a608(0x15f))/0x8)+-parseInt(_0x41a608(0x12b))/0x9*(-parseInt(_0x41a608(0x1a8))/0xa);if(_0x14de47===_0x13c09d)break;else _0x427d18['push'](_0x427d18['shift']());}catch(_0x1f5942){_0x427d18['push'](_0x427d18['shift']());}}}(a102_0x4eb7,0x36553));import*as a102_0x540654 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x36713c,_0x55f737){const _0x1ec725=a102_0x120b,_0x3e4662=_0x36713c[_0x1ec725(0x1a9)]&&_0x1ec725(0x138)in _0x36713c[_0x1ec725(0x1a9)]&&_0x36713c['rule'][_0x1ec725(0x138)];return{'type':_0x1ec725(0x188),'name':_0x36713c['name'],..._0x36713c[_0x1ec725(0x1bd)]&&{'description':_0x36713c[_0x1ec725(0x1bd)]},..._0x55f737&&{'folder':_0x55f737},..._0x3e4662&&{'rule':apiRuleToYaml(_0x36713c[_0x1ec725(0x1a9)])},..._0x36713c[_0x1ec725(0x12d)]!==undefined&&{'kind':_0x36713c[_0x1ec725(0x12d)]===0x0?'batch':_0x36713c[_0x1ec725(0x12d)]===0x1?_0x1ec725(0x1b8):_0x1ec725(0x16e)},..._0x36713c[_0x1ec725(0x19b)]!==undefined&&{'visible':_0x36713c[_0x1ec725(0x19b)]}};}export async function segmentResponseToDef(_0x2ed219,_0x2033b3,_0x2ed164){const _0x19d717=a102_0x120b,_0x12a9cf=segmentResponseToDefSync(_0x2ed219,_0x2ed164);if(!_0x2033b3||!_0x2033b3[_0x19d717(0x16a)])return _0x12a9cf;return _0x12a9cf[_0x19d717(0x1a9)]&&(_0x12a9cf[_0x19d717(0x1a9)]=await resolveRuleSegmentRefs(_0x12a9cf['rule'],_0x2033b3[_0x19d717(0x16a)])),_0x12a9cf;}export function apiRuleToYaml(_0x5dea69){const _0x4b379a=a102_0x120b,_0x219f11=(_0x5dea69['conditions']||[])[_0x4b379a(0x135)](apiConditionToYaml);if(_0x219f11['length']===0x1&&!_0x5dea69[_0x4b379a(0x1bd)]&&_0x4b379a(0x138)in _0x219f11[0x0]&&(_0x219f11[0x0][_0x4b379a(0x138)]===_0x4b379a(0x196)||_0x219f11[0x0][_0x4b379a(0x138)]==='Or')){const _0xcee237=_0x219f11[0x0];if(_0xcee237[_0x4b379a(0x138)]===_0x5dea69[_0x4b379a(0x138)]&&_0xcee237['conditions'])return{'type':_0x5dea69[_0x4b379a(0x138)],'conditions':_0xcee237[_0x4b379a(0x16d)],..._0xcee237[_0x4b379a(0x1bd)]&&{'description':_0xcee237['description']}};}return{'type':_0x5dea69[_0x4b379a(0x138)],'conditions':_0x219f11,..._0x5dea69['description']&&{'description':_0x5dea69[_0x4b379a(0x1bd)]}};}export async function resolveRuleSegmentRefs(_0x2e77d3,_0x38301d){const _0x502896=a102_0x120b,_0x3ed0d4=await Promise[_0x502896(0x148)](_0x2e77d3['conditions'][_0x502896(0x135)](_0x57a1ab=>resolveConditionSegmentRefs(_0x57a1ab,_0x38301d)));return{..._0x2e77d3,'conditions':_0x3ed0d4};}async function resolveConditionSegmentRefs(_0x509028,_0x2280d7){const _0x39249d=a102_0x120b;if(_0x39249d(0x188)in _0x509028&&(_0x509028[_0x39249d(0x138)]===_0x39249d(0x18c)||_0x509028[_0x39249d(0x138)]==='exclude')){const _0x30fab3=_0x509028;if(/^\d+$/[_0x39249d(0x185)](_0x30fab3[_0x39249d(0x188)])){const _0x396367=await _0x2280d7(_0x30fab3[_0x39249d(0x188)]);return{..._0x30fab3,'segment':_0x396367};}return _0x509028;}if(_0x39249d(0x16d)in _0x509028&&_0x509028[_0x39249d(0x16d)]){const _0x5e7b8e=_0x509028,_0x3617c4=await Promise[_0x39249d(0x148)](_0x5e7b8e[_0x39249d(0x16d)][_0x39249d(0x135)](_0x1fcf43=>resolveConditionSegmentRefs(_0x1fcf43,_0x2280d7)));return{..._0x5e7b8e,'conditions':_0x3617c4};}if(_0x39249d(0x152)in _0x509028&&_0x509028[_0x39249d(0x152)]){const _0x45fdf1=_0x509028,_0x747c7d=await resolveRuleSegmentRefs(_0x45fdf1[_0x39249d(0x152)],_0x2280d7);return{..._0x45fdf1,'filter':_0x747c7d};}return _0x509028;}export async function resolveRuleSegmentIds(_0x4262f7,_0xd4ee4e){const _0x5ef682=a102_0x120b,_0x4da53c=await Promise[_0x5ef682(0x148)](_0x4262f7['conditions'][_0x5ef682(0x135)](_0x22454e=>resolveConditionSegmentIds(_0x22454e,_0xd4ee4e)));return{..._0x4262f7,'conditions':_0x4da53c};}async function resolveConditionSegmentIds(_0x268f6b,_0x19d4e2){const _0x351811=a102_0x120b;if(_0x351811(0x188)in _0x268f6b&&(_0x268f6b[_0x351811(0x138)]===_0x351811(0x18c)||_0x268f6b[_0x351811(0x138)]===_0x351811(0x1b1))){const _0x48b744=_0x268f6b;if(!/^\d+$/[_0x351811(0x185)](_0x48b744[_0x351811(0x188)])){const _0x2aaf59=await _0x19d4e2(_0x48b744[_0x351811(0x188)]);return{..._0x48b744,'segment':_0x2aaf59};}return _0x268f6b;}if(_0x351811(0x16d)in _0x268f6b&&_0x268f6b['conditions']){const _0x1042ad=_0x268f6b,_0x37bc88=await Promise['all'](_0x1042ad['conditions'][_0x351811(0x135)](_0x1e22f6=>resolveConditionSegmentIds(_0x1e22f6,_0x19d4e2)));return{..._0x1042ad,'conditions':_0x37bc88};}if(_0x351811(0x152)in _0x268f6b&&_0x268f6b[_0x351811(0x152)]){const _0xf0cb18=_0x268f6b,_0x286225=await resolveRuleSegmentIds(_0xf0cb18[_0x351811(0x152)],_0x19d4e2);return{..._0xf0cb18,'filter':_0x286225};}return _0x268f6b;}function apiConditionToYaml(_0x2021fa){const _0x344323=a102_0x120b;if(_0x2021fa[_0x344323(0x138)]===_0x344323(0x196)||_0x2021fa[_0x344323(0x138)]==='Or'){if(_0x2021fa['conditions']){const _0xcf515f=_0x2021fa[_0x344323(0x16d)][_0x344323(0x135)](apiConditionToYaml);if(_0xcf515f['length']===0x1&&!_0x2021fa[_0x344323(0x1bd)])return _0xcf515f[0x0];return{'type':_0x2021fa[_0x344323(0x138)],'conditions':_0xcf515f,..._0x2021fa[_0x344323(0x1bd)]&&{'description':_0x2021fa[_0x344323(0x1bd)]}};}}if(_0x2021fa['type']===_0x344323(0x172)&&_0x2021fa['leftValue']&&_0x2021fa[_0x344323(0x1b4)]){const _0x383e85=_0x2021fa[_0x344323(0x130)]['aggregation']?{'type':_0x2021fa[_0x344323(0x130)][_0x344323(0x17b)][_0x344323(0x138)],..._0x2021fa[_0x344323(0x130)][_0x344323(0x17b)]['groupingColumns']&&{'groupingColumns':_0x2021fa[_0x344323(0x130)][_0x344323(0x17b)][_0x344323(0x1a0)]}}:undefined;return{'type':'Value','attribute':_0x2021fa[_0x344323(0x130)][_0x344323(0x176)]||'','operator':apiOperatorToYaml(_0x2021fa['operator']),..._0x2021fa[_0x344323(0x1a1)]&&_0x2021fa['arrayMatching']!=='any'?{'arrayMatching':_0x2021fa['arrayMatching']}:{},..._0x2021fa[_0x344323(0x1b1)]?{'exclude':_0x2021fa[_0x344323(0x1b1)]}:{},..._0x383e85?{'aggregation':_0x383e85}:{},..._0x2021fa[_0x344323(0x130)]['source']?{'source':_0x2021fa[_0x344323(0x130)][_0x344323(0x142)]['name']}:{},..._0x2021fa[_0x344323(0x130)]['filter']?{'filter':apiRuleToYaml(_0x2021fa[_0x344323(0x130)][_0x344323(0x152)])}:{},..._0x2021fa[_0x344323(0x15d)]!==undefined&&_0x2021fa['limit']!==null?{'limit':_0x2021fa['limit']}:{}};}if(_0x2021fa[_0x344323(0x138)]===_0x344323(0x12e)&&_0x2021fa['id'])return{'type':_0x2021fa[_0x344323(0x1b1)]?_0x344323(0x1b1):_0x344323(0x18c),'segment':_0x2021fa['id']};return{'type':_0x344323(0x196),'conditions':[]};}function isTemporalOperator(_0x3ed0e5){const _0x4ec8d2=a102_0x120b;return _0x3ed0e5===_0x4ec8d2(0x169)||_0x3ed0e5===_0x4ec8d2(0x171);}function getEffectiveValue(_0x2ce55c){const _0x1deece=a102_0x120b,_0x3894f3=_0x2ce55c['values'];return _0x2ce55c[_0x1deece(0x14c)]??_0x3894f3;}function apiOperatorToYaml(_0x1c6df7){const _0x16210a=a102_0x120b;let _0x2655a9;if(_0x1c6df7[_0x16210a(0x1b9)]&&_0x1c6df7[_0x16210a(0x1b9)][_0x16210a(0x198)]>0x0)_0x2655a9=_0x1c6df7[_0x16210a(0x1b9)];else{if(_0x1c6df7[_0x16210a(0x1b2)]!==undefined)_0x2655a9=_0x1c6df7[_0x16210a(0x1b2)];else isTemporalOperator(_0x1c6df7[_0x16210a(0x138)])&&_0x1c6df7[_0x16210a(0x14c)]!==undefined&&(_0x2655a9=_0x1c6df7['value']);}return{'type':mapApiOperatorType(_0x1c6df7[_0x16210a(0x138)]),..._0x1c6df7[_0x16210a(0x1ae)]&&{'not':_0x1c6df7[_0x16210a(0x1ae)]},..._0x2655a9!==undefined&&{'value':_0x2655a9},..._0x1c6df7[_0x16210a(0x143)]&&{'unit':_0x1c6df7[_0x16210a(0x143)]}};}function mapApiOperatorType(_0x92b04a){return _0x92b04a;}export function segmentDefToCreateRequest(_0x2f8efd,_0xe231bb){const _0x1d84da=a102_0x120b,_0xa37b3d={'name':_0x2f8efd[_0x1d84da(0x176)]};return _0x2f8efd[_0x1d84da(0x1bd)]&&(_0xa37b3d[_0x1d84da(0x1bd)]=_0x2f8efd[_0x1d84da(0x1bd)]),_0x2f8efd[_0x1d84da(0x1a9)]&&(_0xa37b3d[_0x1d84da(0x1a9)]=yamlRuleToApi(_0x2f8efd['rule'])),_0x2f8efd[_0x1d84da(0x12d)]&&(_0xa37b3d[_0x1d84da(0x12d)]=_0x2f8efd[_0x1d84da(0x12d)]===_0x1d84da(0x1a3)?0x0:_0x2f8efd[_0x1d84da(0x12d)]===_0x1d84da(0x1b8)?0x1:0x2),_0x2f8efd[_0x1d84da(0x166)]!==undefined&&(_0xa37b3d[_0x1d84da(0x19b)]=_0x2f8efd[_0x1d84da(0x166)]),_0xe231bb&&(_0xa37b3d['segmentFolderId']=_0xe231bb),_0xa37b3d;}export function segmentDefToUpdateRequest(_0x43b062){const _0xc3b5aa=a102_0x120b,_0x301351={'name':_0x43b062[_0xc3b5aa(0x176)]};return _0x43b062[_0xc3b5aa(0x1bd)]!==undefined&&(_0x301351[_0xc3b5aa(0x1bd)]=_0x43b062[_0xc3b5aa(0x1bd)]),_0x43b062[_0xc3b5aa(0x1a9)]&&(_0x301351['rule']=yamlRuleToApi(_0x43b062[_0xc3b5aa(0x1a9)])),_0x43b062[_0xc3b5aa(0x12d)]&&(_0x301351['kind']=_0x43b062[_0xc3b5aa(0x12d)]===_0xc3b5aa(0x1a3)?0x0:_0x43b062[_0xc3b5aa(0x12d)]==='realtime'?0x1:0x2),_0x301351;}export function yamlRuleToApi(_0x8cadbe,_0x320233=![]){const _0x5a4440=a102_0x120b,_0x12c9cf=_0x8cadbe['conditions'][_0x5a4440(0x135)](yamlConditionToApi);if(_0x320233){const _0x973487=_0x12c9cf[_0x5a4440(0x17d)](_0x55824a=>_0x55824a['type']===_0x5a4440(0x196)||_0x55824a['type']==='Or');if(!_0x973487&&_0x12c9cf['length']>0x0)return{'type':_0x8cadbe[_0x5a4440(0x138)],'conditions':[{'type':'And','description':_0x8cadbe['description']||'','conditions':_0x12c9cf}]};}return{'type':_0x8cadbe[_0x5a4440(0x138)],'conditions':_0x12c9cf,..._0x8cadbe['description']&&{'description':_0x8cadbe['description']}};}function yamlConditionToApi(_0x191612){const _0x44b1f5=a102_0x120b;if('segment'in _0x191612&&(_0x191612[_0x44b1f5(0x138)]===_0x44b1f5(0x18c)||_0x191612[_0x44b1f5(0x138)]===_0x44b1f5(0x1b1))){const _0x56eee8=_0x191612;return{'type':'Reference','id':_0x56eee8[_0x44b1f5(0x188)],'exclude':_0x56eee8[_0x44b1f5(0x138)]==='exclude'};}if(_0x44b1f5(0x138)in _0x191612&&(_0x191612['type']===_0x44b1f5(0x196)||_0x191612['type']==='Or')){const _0x54a5d6=_0x191612;return{'type':_0x54a5d6['type'],'conditions':_0x54a5d6[_0x44b1f5(0x16d)]['map'](yamlConditionToApi),..._0x54a5d6['description']&&{'description':_0x54a5d6[_0x44b1f5(0x1bd)]}};}const _0x39e8b0=_0x191612,_0x5dc027={'type':_0x44b1f5(0x172),'leftValue':buildLeftValue(_0x39e8b0),'operator':yamlOperatorToApi(_0x39e8b0[_0x44b1f5(0x1b4)]),'exclude':_0x39e8b0[_0x44b1f5(0x1b1)]??![],'arrayMatching':_0x39e8b0[_0x44b1f5(0x1a1)]??_0x44b1f5(0x19c)};return _0x39e8b0[_0x44b1f5(0x15d)]!==undefined&&(_0x5dc027['limit']=_0x39e8b0[_0x44b1f5(0x15d)]),_0x5dc027;}function buildLeftValue(_0xbe6c1e){const _0x2fc9f9=a102_0x120b,_0x1b7818={'name':_0xbe6c1e[_0x2fc9f9(0x156)]};return _0xbe6c1e[_0x2fc9f9(0x17b)]&&(_0x1b7818['aggregation']={'type':_0xbe6c1e[_0x2fc9f9(0x17b)]['type'],..._0xbe6c1e[_0x2fc9f9(0x17b)][_0x2fc9f9(0x1a0)]&&{'groupingColumns':_0xbe6c1e[_0x2fc9f9(0x17b)][_0x2fc9f9(0x1a0)]}}),_0xbe6c1e['source']&&(_0x1b7818[_0x2fc9f9(0x142)]={'name':_0xbe6c1e[_0x2fc9f9(0x142)]}),_0xbe6c1e[_0x2fc9f9(0x152)]&&(_0x1b7818[_0x2fc9f9(0x152)]=yamlRuleToApi(_0xbe6c1e[_0x2fc9f9(0x152)])),_0x1b7818;}function yamlOperatorToApi(_0x486fcd){const _0x511188=a102_0x120b,_0x168994={'type':mapYamlOperatorType(_0x486fcd[_0x511188(0x138)]),'not':_0x486fcd['not']??![]},_0x48409f=getEffectiveValue(_0x486fcd);if(_0x48409f!==undefined){if(Array[_0x511188(0x164)](_0x48409f))_0x168994[_0x511188(0x1b9)]=_0x48409f;else isTemporalOperator(_0x486fcd[_0x511188(0x138)])?_0x168994[_0x511188(0x14c)]=_0x48409f:_0x168994[_0x511188(0x1b2)]=_0x48409f;}return _0x486fcd[_0x511188(0x143)]&&(_0x168994[_0x511188(0x143)]=_0x486fcd['unit']),_0x168994;}function mapYamlOperatorType(_0x5a4c13){return _0x5a4c13;}export function toYamlString(_0x61872d){const _0x598d45=a102_0x120b,_0x5de980=JSON[_0x598d45(0x162)](JSON[_0x598d45(0x136)](_0x61872d)),_0x1eb9a1=a102_0x540654[_0x598d45(0x136)](_0x5de980,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x598d45(0x178)}),_0x5bd829=[_0x598d45(0x170)];let _0x10d266=_0x1eb9a1;for(const _0xb16dda of _0x5bd829){_0x10d266=_0x10d266[_0x598d45(0x17a)](new RegExp('^('+_0xb16dda+')','m'),(_0x37db63,_0x3424ea,_0x15274b)=>{if(_0x15274b===0x0||_0x10d266[_0x15274b-0x1]==='\x0a'&&_0x10d266[_0x15274b-0x2]==='\x0a')return _0x3424ea;return'\x0a'+_0x3424ea;});}return _0x10d266;}export function parseYamlString(_0x262d4d){const _0x15ccae=a102_0x120b,_0x34c2ed=a102_0x540654[_0x15ccae(0x162)](_0x262d4d);if(!_0x34c2ed['name'])throw new Error(_0x15ccae(0x13b));if(_0x34c2ed[_0x15ccae(0x138)]&&_0x34c2ed[_0x15ccae(0x138)]!==_0x15ccae(0x188))throw new Error(_0x15ccae(0x145)+_0x34c2ed[_0x15ccae(0x138)]);return _0x34c2ed;}export function isSegmentYaml(_0x2b6a05){const _0x136fc8=a102_0x120b;if(typeof _0x2b6a05!=='object'||_0x2b6a05===null)return![];const _0x505ac2=_0x2b6a05;return _0x505ac2[_0x136fc8(0x138)]===_0x136fc8(0x188)||_0x505ac2[_0x136fc8(0x138)]===undefined;}export function generateTemplate(_0x21fe2b=a102_0x362023(0x153)){const _0x450a78=a102_0x362023,_0x4c93dd={'type':_0x450a78(0x188),'name':_0x21fe2b,'description':_0x450a78(0x18a),'rule':{'type':'And','conditions':[{'type':_0x450a78(0x172),'attribute':_0x450a78(0x1b6),'operator':{'type':_0x450a78(0x179),'value':_0x450a78(0x14c)}}]}};return toYamlString(_0x4c93dd);}export function segmentToYamlString(_0x65eb1c){const _0x2e9cfb=a102_0x362023,_0x2eb164=JSON[_0x2e9cfb(0x162)](JSON[_0x2e9cfb(0x136)](_0x65eb1c)),_0x19f151=a102_0x540654['stringify'](_0x2eb164,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x2e9cfb(0x178)}),_0x4169d9=['rule:',_0x2e9cfb(0x1a5)];let _0x2e5cf8=_0x19f151;for(const _0x44c128 of _0x4169d9){_0x2e5cf8=_0x2e5cf8['replace'](new RegExp('^('+_0x44c128+')','m'),(_0x145ead,_0x344704,_0x5553ca)=>{if(_0x5553ca===0x0||_0x2e5cf8[_0x5553ca-0x1]==='\x0a'&&_0x2e5cf8[_0x5553ca-0x2]==='\x0a')return _0x344704;return'\x0a'+_0x344704;});}return _0x2e5cf8;}export function parseSegmentYamlFile(_0x120216){const _0x4a44cf=a102_0x362023,_0x3302ca=a102_0x540654[_0x4a44cf(0x162)](_0x120216);if(!_0x3302ca[_0x4a44cf(0x176)])throw new Error(_0x4a44cf(0x13b));return _0x3302ca;}export function normalizeChildSegmentYaml(_0x17b02a){const _0x3d45a2=a102_0x362023;return{'type':_0x3d45a2(0x188),'name':_0x17b02a[_0x3d45a2(0x176)],..._0x17b02a['description']!==undefined&&{'description':_0x17b02a[_0x3d45a2(0x1bd)]},..._0x17b02a['folder']!==undefined&&{'folder':_0x17b02a[_0x3d45a2(0x131)]},..._0x17b02a[_0x3d45a2(0x1a9)]&&{'rule':normalizeRule(_0x17b02a[_0x3d45a2(0x1a9)])},..._0x17b02a['kind']!==undefined&&{'kind':_0x17b02a[_0x3d45a2(0x12d)]},..._0x17b02a['visible']!==undefined&&{'visible':_0x17b02a[_0x3d45a2(0x166)]},..._0x17b02a[_0x3d45a2(0x1bb)]&&{'activations':_0x17b02a[_0x3d45a2(0x1bb)][_0x3d45a2(0x135)](normalizeActivation)}};}export function normalizeRule(_0x23cb07){const _0x86ba33=a102_0x362023;return{'type':_0x23cb07[_0x86ba33(0x138)],'conditions':_0x23cb07['conditions'][_0x86ba33(0x135)](normalizeCondition),..._0x23cb07['description']!==undefined&&{'description':_0x23cb07['description']}};}function a102_0x4eb7(){const _0x39f49c=['start_at','repeatFrequency','name','getSchema','null','Equal','replace','aggregation','valid','every','keys','visibility','activationParams','connectionNameToTypeMap','end_on','ruleHashToName','toLowerCase','test','493095nXiUqM','1148202OIpseq','segment','repeat_unit','Segment\x20description','CONNECTOR_SCHEMA_NOT_FOUND','include','duration','allColumns','INVALID_ARGUMENT','emailRecipients','object','behaviorTableName','CONNECTION_NOT_FOUND','join_strategy','startAt','And','get','length','Unknown\x20connection:\x20','all_columns','isVisible','any','localRuleToName','from','order_by','groupingColumns','arrayMatching','warnings','batch','behavior','activations:','activation_template_id','CONNECTOR_INVALID_CONFIG','1113470ggzhAO','rule','scheduleType','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','emailToIdMap','usedNames','not','177706Tbaveo','joinRow','exclude','rightValue','\x22:\x0a','operator','set','attribute_name','Invalid\x20connector_config\x20for\x20activation\x20\x22','realtime','rightValues','conditions[','activations','__UNRESOLVED__','description','9BPoEVD','sort','kind','Reference','errors','leftValue','folder','Unknown\x20email\x20recipient:\x20','values','warn','map','stringify','repeat_frequency','type','email_recipients','Please\x20specify\x20a\x20valid\x20attribute\x20name.','YAML\x20config\x20missing\x20required\x20field:\x20name','attributes','min','timezone','notify_on','entries','repeatSubFrequency','source','unit','joinStrategy','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','notification','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','all','repeatUnit','153876BadCWF','string','value','behavior_table','__SEGMENT_REF__','activationTemplateId','max','notifyOn','filter','New\x20Segment','endOn','Connector:\x20','attribute','repeat_sub_frequency','\x0a\x0aAvailable\x20fields:\x0a','connector_config','315SuHtpZ','7MZIiUK','schedule','limit','connection','1850008USOTFw','localeCompare','add','parse','connectorConfig','isArray','orderBy','visible','columns','connectionId','TimeWithinPast','resolveSegmentName','join_row','syndicationBehavior','conditions','funnel_stage','formatting','rule:','TimeWithinNext','Value','1204ZBmVXa'];a102_0x4eb7=function(){return _0x39f49c;};return a102_0x4eb7();}function normalizeCondition(_0x52a48f){const _0x19e3b6=a102_0x362023;if(_0x19e3b6(0x188)in _0x52a48f&&(_0x52a48f[_0x19e3b6(0x138)]===_0x19e3b6(0x18c)||_0x52a48f[_0x19e3b6(0x138)]==='exclude')){const _0x3bf0c4=_0x52a48f;return{'type':_0x3bf0c4[_0x19e3b6(0x138)],'segment':_0x3bf0c4[_0x19e3b6(0x188)]};}if('type'in _0x52a48f&&(_0x52a48f['type']===_0x19e3b6(0x196)||_0x52a48f[_0x19e3b6(0x138)]==='Or')){const _0x53a85c=_0x52a48f;return{'type':_0x53a85c[_0x19e3b6(0x138)],'conditions':_0x53a85c['conditions'][_0x19e3b6(0x135)](normalizeCondition),..._0x53a85c[_0x19e3b6(0x1bd)]!==undefined&&{'description':_0x53a85c[_0x19e3b6(0x1bd)]}};}const _0x5ef85c=_0x52a48f;return{'type':_0x19e3b6(0x172),'attribute':_0x5ef85c[_0x19e3b6(0x156)],'operator':normalizeOperator(_0x5ef85c['operator']),..._0x5ef85c[_0x19e3b6(0x1a1)]!==undefined&&{'arrayMatching':_0x5ef85c[_0x19e3b6(0x1a1)]},..._0x5ef85c[_0x19e3b6(0x1b1)]!==undefined&&{'exclude':_0x5ef85c[_0x19e3b6(0x1b1)]},..._0x5ef85c['aggregation']!==undefined&&{'aggregation':_0x5ef85c[_0x19e3b6(0x17b)]},..._0x5ef85c[_0x19e3b6(0x142)]!==undefined&&{'source':_0x5ef85c[_0x19e3b6(0x142)]},..._0x5ef85c['filter']!==undefined&&{'filter':normalizeRule(_0x5ef85c[_0x19e3b6(0x152)])},..._0x5ef85c[_0x19e3b6(0x15d)]!==undefined&&{'limit':_0x5ef85c[_0x19e3b6(0x15d)]}};}function normalizeOperator(_0xc9df42){const _0x5edfe7=a102_0x362023,_0x37d3a4=getEffectiveValue(_0xc9df42);return{'type':_0xc9df42[_0x5edfe7(0x138)],..._0xc9df42[_0x5edfe7(0x1ae)]!==undefined&&{'not':_0xc9df42[_0x5edfe7(0x1ae)]},..._0x37d3a4!==undefined&&{'value':_0x37d3a4},..._0xc9df42['min']!==undefined&&{'min':_0xc9df42[_0x5edfe7(0x13d)]},..._0xc9df42[_0x5edfe7(0x150)]!==undefined&&{'max':_0xc9df42[_0x5edfe7(0x150)]},..._0xc9df42[_0x5edfe7(0x143)]!==undefined&&{'unit':_0xc9df42[_0x5edfe7(0x143)]},..._0xc9df42[_0x5edfe7(0x18d)]!==undefined&&{'duration':_0xc9df42[_0x5edfe7(0x18d)]},..._0xc9df42[_0x5edfe7(0x19e)]!==undefined&&{'from':_0xc9df42[_0x5edfe7(0x19e)]}};}function normalizeActivation(_0x1b32e0){const _0xe04f52=a102_0x362023;return{'name':_0x1b32e0[_0xe04f52(0x176)],'connection':_0x1b32e0['connection'],..._0x1b32e0[_0xe04f52(0x1bd)]!==undefined&&{'description':_0x1b32e0[_0xe04f52(0x1bd)]},..._0x1b32e0['all_columns']!==undefined&&{'all_columns':_0x1b32e0[_0xe04f52(0x19a)]},..._0x1b32e0['columns']!==undefined&&{'columns':_0x1b32e0[_0xe04f52(0x167)]},..._0x1b32e0['behavior']!==undefined&&{'behavior':_0x1b32e0[_0xe04f52(0x1a4)]},..._0x1b32e0[_0xe04f52(0x15c)]!==undefined&&{'schedule':_0x1b32e0['schedule']},..._0x1b32e0['notification']!==undefined&&{'notification':_0x1b32e0['notification']},..._0x1b32e0[_0xe04f52(0x159)]!==undefined&&{'connector_config':_0x1b32e0[_0xe04f52(0x159)]},..._0x1b32e0[_0xe04f52(0x1a6)]!==undefined&&{'activation_template_id':_0x1b32e0[_0xe04f52(0x1a6)]}};}export function activationResponseToDef(_0x5af8ef,_0x1ced62,_0x5250a9){const _0x5a4866=a102_0x362023,_0x45405c=_0x5af8ef[_0x5a4866(0x168)]||'',_0x2361e5=_0x5250a9?.[_0x5a4866(0x197)](_0x45405c)??_0x45405c,_0x2610fb={'name':_0x5af8ef[_0x5a4866(0x176)],'connection':_0x2361e5};_0x5af8ef[_0x5a4866(0x1bd)]&&(_0x2610fb[_0x5a4866(0x1bd)]=_0x5af8ef['description']);let _0x281aa7=[];_0x5af8ef[_0x5a4866(0x167)]&&_0x5af8ef[_0x5a4866(0x167)][_0x5a4866(0x198)]>0x0&&(_0x281aa7=_0x5af8ef[_0x5a4866(0x167)][_0x5a4866(0x152)](_0x4b93a6=>_0x4b93a6&&_0x4b93a6[_0x5a4866(0x176)])['map'](_0x5dc286=>{const _0x3e1682=_0x5a4866;if(_0x5dc286['type']||_0x5dc286[_0x3e1682(0x17f)])return{'name':_0x5dc286[_0x3e1682(0x176)],..._0x5dc286[_0x3e1682(0x138)]&&{'type':_0x5dc286['type']},..._0x5dc286[_0x3e1682(0x17f)]&&{'visibility':_0x5dc286[_0x3e1682(0x17f)]}};return _0x5dc286[_0x3e1682(0x176)];}));_0x281aa7[_0x5a4866(0x198)]>0x0&&(_0x2610fb[_0x5a4866(0x167)]=_0x281aa7);_0x5af8ef[_0x5a4866(0x18e)]!==undefined&&(_0x5af8ef['allColumns']===![]&&_0x281aa7[_0x5a4866(0x198)]===0x0?_0x2610fb[_0x5a4866(0x19a)]=!![]:_0x2610fb[_0x5a4866(0x19a)]=_0x5af8ef[_0x5a4866(0x18e)]);const _0x3ae662={};let _0x2cb373=![];_0x5af8ef[_0x5a4866(0x1aa)]&&(_0x3ae662[_0x5a4866(0x138)]=_0x5af8ef['scheduleType'],_0x2cb373=!![]);_0x5af8ef[_0x5a4866(0x149)]&&(_0x3ae662[_0x5a4866(0x189)]=_0x5af8ef[_0x5a4866(0x149)],_0x2cb373=!![]);_0x5af8ef[_0x5a4866(0x175)]!==undefined&&_0x5af8ef[_0x5a4866(0x175)]!==null&&(_0x3ae662[_0x5a4866(0x137)]=_0x5af8ef[_0x5a4866(0x175)],_0x2cb373=!![]);_0x5af8ef[_0x5a4866(0x141)]&&_0x5af8ef[_0x5a4866(0x141)][_0x5a4866(0x198)]>0x0&&(_0x3ae662['repeat_sub_frequency']=_0x5af8ef[_0x5a4866(0x141)],_0x2cb373=!![]);_0x5af8ef[_0x5a4866(0x195)]!==undefined&&(_0x3ae662['start_at']=_0x5af8ef['startAt'],_0x2cb373=!![]);_0x5af8ef[_0x5a4866(0x154)]!==undefined&&(_0x3ae662[_0x5a4866(0x182)]=_0x5af8ef[_0x5a4866(0x154)],_0x2cb373=!![]);_0x5af8ef[_0x5a4866(0x13e)]&&(_0x3ae662[_0x5a4866(0x13e)]=_0x5af8ef[_0x5a4866(0x13e)],_0x2cb373=!![]);_0x2cb373&&(_0x2610fb[_0x5a4866(0x15c)]=_0x3ae662);(_0x5af8ef[_0x5a4866(0x151)]&&_0x5af8ef[_0x5a4866(0x151)]['length']>0x0||_0x5af8ef[_0x5a4866(0x190)]&&_0x5af8ef['emailRecipients'][_0x5a4866(0x198)]>0x0)&&(_0x2610fb['notification']={},_0x5af8ef[_0x5a4866(0x151)]&&_0x5af8ef[_0x5a4866(0x151)][_0x5a4866(0x198)]>0x0&&(_0x2610fb[_0x5a4866(0x146)][_0x5a4866(0x13f)]=_0x5af8ef[_0x5a4866(0x151)]),_0x5af8ef[_0x5a4866(0x190)]&&_0x5af8ef[_0x5a4866(0x190)][_0x5a4866(0x198)]>0x0&&(_0x2610fb[_0x5a4866(0x146)]['email_recipients']=_0x5af8ef[_0x5a4866(0x190)][_0x5a4866(0x135)](_0x24ed37=>{const _0x1cf043=_0x5a4866,_0xe44d0c=_0x1ced62?.[_0x1cf043(0x197)](_0x24ed37);return _0xe44d0c??String(_0x24ed37);})));_0x5af8ef['connectorConfig']&&Object[_0x5a4866(0x17e)](_0x5af8ef[_0x5a4866(0x163)])[_0x5a4866(0x198)]>0x0&&(_0x2610fb[_0x5a4866(0x159)]=normalizeConnectorConfigForYaml(_0x5af8ef['connectorConfig']));_0x5af8ef[_0x5a4866(0x14f)]&&(_0x2610fb[_0x5a4866(0x1a6)]=_0x5af8ef['activationTemplateId']);if(_0x5af8ef[_0x5a4866(0x16c)]){const _0x38bf41={},_0xdd3d84=_0x5af8ef['syndicationBehavior'];_0xdd3d84['columns']&&_0xdd3d84[_0x5a4866(0x167)][_0x5a4866(0x198)]>0x0&&(_0x38bf41[_0x5a4866(0x167)]=_0xdd3d84[_0x5a4866(0x167)][_0x5a4866(0x152)](_0x41c750=>_0x41c750&&_0x41c750[_0x5a4866(0x176)])['map'](_0x52857f=>({'name':_0x52857f['name'],..._0x52857f[_0x5a4866(0x138)]&&{'type':_0x52857f['type']},..._0x52857f['visibility']&&{'visibility':_0x52857f[_0x5a4866(0x17f)]}}))),_0xdd3d84[_0x5a4866(0x192)]&&(_0x38bf41[_0x5a4866(0x14d)]=_0xdd3d84[_0x5a4866(0x192)]),_0xdd3d84[_0x5a4866(0x1b0)]!==undefined&&(_0x38bf41['join_row']=_0xdd3d84[_0x5a4866(0x1b0)]),_0xdd3d84[_0x5a4866(0x144)]&&(_0x38bf41[_0x5a4866(0x194)]=_0xdd3d84[_0x5a4866(0x144)]),_0xdd3d84['formatting']&&(_0x38bf41['formatting']=_0xdd3d84[_0x5a4866(0x16f)]),_0xdd3d84['orderBy']&&_0xdd3d84[_0x5a4866(0x165)]['length']>0x0&&(_0x38bf41[_0x5a4866(0x19f)]=_0xdd3d84[_0x5a4866(0x165)]),Object['keys'](_0x38bf41)[_0x5a4866(0x198)]>0x0&&(_0x2610fb['behavior']=_0x38bf41);}return _0x2610fb;}export function journeyActivationStepToYaml(_0x37a27c,_0x4f3950,_0x4b3528){const _0x3ab427=a102_0x362023,_0x4b409a=_0x37a27c[_0x3ab427(0x13c)][_0x3ab427(0x180)],_0x2f0a21=_0x4b409a['connectionId']||'',_0xd03329=_0x4b3528?.['get'](_0x2f0a21)??_0x2f0a21,_0x3a26bc={'name':_0x4b409a['name']||'','connection':_0xd03329};_0x4b409a[_0x3ab427(0x1bd)]&&(_0x3a26bc['description']=_0x4b409a['description']);let _0x49e2f9=[];_0x4b409a[_0x3ab427(0x167)]&&_0x4b409a[_0x3ab427(0x167)][_0x3ab427(0x198)]>0x0&&(_0x49e2f9=_0x4b409a['columns']['filter'](_0xa3165a=>_0xa3165a&&_0xa3165a[_0x3ab427(0x176)])[_0x3ab427(0x135)](_0xbd239c=>{const _0x2dc3b=_0x3ab427;if(_0xbd239c['type']||_0xbd239c['visibility'])return{'name':_0xbd239c[_0x2dc3b(0x176)],..._0xbd239c['type']&&{'type':_0xbd239c[_0x2dc3b(0x138)]},..._0xbd239c[_0x2dc3b(0x17f)]&&{'visibility':_0xbd239c[_0x2dc3b(0x17f)]}};return _0xbd239c[_0x2dc3b(0x176)];}));_0x49e2f9['length']>0x0&&(_0x3a26bc[_0x3ab427(0x167)]=_0x49e2f9);_0x4b409a[_0x3ab427(0x18e)]!==undefined&&(_0x4b409a['allColumns']===![]&&_0x49e2f9[_0x3ab427(0x198)]===0x0?_0x3a26bc[_0x3ab427(0x19a)]=!![]:_0x3a26bc[_0x3ab427(0x19a)]=_0x4b409a[_0x3ab427(0x18e)]);const _0x1f9660={};let _0x54f05a=![];_0x4b409a[_0x3ab427(0x1aa)]&&(_0x1f9660[_0x3ab427(0x138)]=_0x4b409a[_0x3ab427(0x1aa)],_0x54f05a=!![]);_0x4b409a[_0x3ab427(0x149)]&&(_0x1f9660[_0x3ab427(0x189)]=_0x4b409a[_0x3ab427(0x149)],_0x54f05a=!![]);_0x4b409a[_0x3ab427(0x175)]!==undefined&&_0x4b409a[_0x3ab427(0x175)]!==null&&(_0x1f9660[_0x3ab427(0x137)]=_0x4b409a[_0x3ab427(0x175)],_0x54f05a=!![]);_0x4b409a[_0x3ab427(0x195)]!==undefined&&(_0x1f9660[_0x3ab427(0x174)]=_0x4b409a[_0x3ab427(0x195)],_0x54f05a=!![]);_0x4b409a[_0x3ab427(0x154)]!==undefined&&(_0x1f9660['end_on']=_0x4b409a[_0x3ab427(0x154)],_0x54f05a=!![]);_0x4b409a[_0x3ab427(0x13e)]&&(_0x1f9660[_0x3ab427(0x13e)]=_0x4b409a[_0x3ab427(0x13e)],_0x54f05a=!![]);_0x54f05a&&(_0x3a26bc[_0x3ab427(0x15c)]=_0x1f9660);(_0x4b409a[_0x3ab427(0x151)]&&_0x4b409a[_0x3ab427(0x151)][_0x3ab427(0x198)]>0x0||_0x4b409a[_0x3ab427(0x190)]&&_0x4b409a[_0x3ab427(0x190)][_0x3ab427(0x198)]>0x0)&&(_0x3a26bc[_0x3ab427(0x146)]={},_0x4b409a[_0x3ab427(0x151)]&&_0x4b409a['notifyOn'][_0x3ab427(0x198)]>0x0&&(_0x3a26bc[_0x3ab427(0x146)][_0x3ab427(0x13f)]=_0x4b409a['notifyOn']),_0x4b409a[_0x3ab427(0x190)]&&_0x4b409a[_0x3ab427(0x190)][_0x3ab427(0x198)]>0x0&&(_0x3a26bc[_0x3ab427(0x146)][_0x3ab427(0x139)]=_0x4b409a['emailRecipients'][_0x3ab427(0x135)](_0x29c5b6=>{const _0x5df0cd=_0x3ab427,_0x4a3f37=_0x4f3950?.[_0x5df0cd(0x197)](_0x29c5b6);return _0x4a3f37??String(_0x29c5b6);})));_0x4b409a['connectorConfig']&&Object['keys'](_0x4b409a[_0x3ab427(0x163)])[_0x3ab427(0x198)]>0x0&&(_0x3a26bc[_0x3ab427(0x159)]=normalizeConnectorConfigForYaml(_0x4b409a[_0x3ab427(0x163)]));_0x4b409a['activationTemplateId']&&(_0x3a26bc[_0x3ab427(0x1a6)]=_0x4b409a[_0x3ab427(0x14f)]);if(_0x4b409a[_0x3ab427(0x16c)]){const _0x1ec1c6={},_0x2321c8=_0x4b409a['syndicationBehavior'];_0x2321c8[_0x3ab427(0x167)]&&_0x2321c8[_0x3ab427(0x167)][_0x3ab427(0x198)]>0x0&&(_0x1ec1c6[_0x3ab427(0x167)]=_0x2321c8[_0x3ab427(0x167)]['filter'](_0x1ddfb4=>_0x1ddfb4&&_0x1ddfb4[_0x3ab427(0x176)])[_0x3ab427(0x135)](_0x158870=>({'name':_0x158870['name'],..._0x158870[_0x3ab427(0x138)]&&{'type':_0x158870[_0x3ab427(0x138)]},..._0x158870[_0x3ab427(0x17f)]&&{'visibility':_0x158870['visibility']}}))),_0x2321c8[_0x3ab427(0x192)]&&(_0x1ec1c6[_0x3ab427(0x14d)]=_0x2321c8[_0x3ab427(0x192)]),_0x2321c8[_0x3ab427(0x1b0)]!==undefined&&(_0x1ec1c6[_0x3ab427(0x16b)]=_0x2321c8[_0x3ab427(0x1b0)]),_0x2321c8[_0x3ab427(0x144)]&&(_0x1ec1c6[_0x3ab427(0x194)]=_0x2321c8[_0x3ab427(0x144)]),_0x2321c8['formatting']&&(_0x1ec1c6[_0x3ab427(0x16f)]=_0x2321c8[_0x3ab427(0x16f)]),_0x2321c8[_0x3ab427(0x165)]&&_0x2321c8[_0x3ab427(0x165)]['length']>0x0&&(_0x1ec1c6[_0x3ab427(0x19f)]=_0x2321c8['orderBy']),Object[_0x3ab427(0x17e)](_0x1ec1c6)[_0x3ab427(0x198)]>0x0&&(_0x3a26bc['behavior']=_0x1ec1c6);}return _0x3a26bc;}export function segmentWithActivationsToYaml(_0x1aebea,_0xf59cd7,_0x212815,_0x59ab73,_0x5b1507){const _0x23d767=a102_0x362023,_0x451891=segmentResponseToDefSync(_0x1aebea,_0x212815);return _0xf59cd7[_0x23d767(0x198)]>0x0&&(_0x451891[_0x23d767(0x1bb)]=_0xf59cd7[_0x23d767(0x135)](_0x2c8239=>activationResponseToDef(_0x2c8239,_0x59ab73,_0x5b1507))),_0x451891;}function normalizeColumn(_0x483e8a){const _0x4620ae=a102_0x362023;if(typeof _0x483e8a===_0x4620ae(0x14b))return{'name':_0x483e8a};return{'name':_0x483e8a[_0x4620ae(0x176)],..._0x483e8a[_0x4620ae(0x138)]&&{'type':_0x483e8a[_0x4620ae(0x138)]},..._0x483e8a['visibility']&&{'visibility':_0x483e8a[_0x4620ae(0x17f)]}};}export async function activationDefToCreateRequest(_0x2dd82c,_0x516d70){const _0x112a58=a102_0x362023,_0x6b91fb=_0x516d70?.[_0x112a58(0x1ac)],_0x3f878f=_0x516d70?.['connectionNameToIdMap'],_0x1f764d=_0x2dd82c[_0x112a58(0x15e)];let _0x5a01d;const _0x30fca2=parseInt(_0x1f764d,0xa);if(!isNaN(_0x30fca2)&&String(_0x30fca2)===_0x1f764d)_0x5a01d=_0x30fca2;else{const _0x5c94d0=_0x3f878f?.[_0x112a58(0x197)](_0x1f764d);if(_0x5c94d0===undefined)throw new SDKError(ErrorCode[_0x112a58(0x193)],_0x112a58(0x199)+_0x1f764d,undefined,{'helpText':_0x112a58(0x147)});_0x5a01d=_0x5c94d0;}const _0x1b3529={'name':_0x2dd82c[_0x112a58(0x176)],'connectionId':_0x5a01d};_0x2dd82c[_0x112a58(0x1bd)]&&(_0x1b3529['description']=_0x2dd82c[_0x112a58(0x1bd)]);let _0xa2d258=[];_0x2dd82c['columns']&&_0x2dd82c[_0x112a58(0x167)]['length']>0x0&&(_0xa2d258=_0x2dd82c['columns'][_0x112a58(0x152)](_0x21c965=>_0x21c965!=null)['map'](normalizeColumn));_0xa2d258['length']>0x0&&(_0x1b3529[_0x112a58(0x167)]=_0xa2d258);_0x2dd82c[_0x112a58(0x19a)]!==undefined&&(_0x2dd82c['all_columns']===![]&&_0xa2d258[_0x112a58(0x198)]===0x0?_0x1b3529[_0x112a58(0x18e)]=!![]:_0x1b3529[_0x112a58(0x18e)]=_0x2dd82c[_0x112a58(0x19a)]);if(_0x2dd82c['schedule']){const _0x36fc80=_0x2dd82c[_0x112a58(0x15c)];_0x36fc80[_0x112a58(0x138)]&&(_0x1b3529['scheduleType']=_0x36fc80[_0x112a58(0x138)]),_0x36fc80[_0x112a58(0x189)]&&(_0x1b3529[_0x112a58(0x149)]=_0x36fc80[_0x112a58(0x189)]),_0x36fc80[_0x112a58(0x137)]!==undefined&&(_0x1b3529[_0x112a58(0x175)]=_0x36fc80[_0x112a58(0x137)]),_0x36fc80[_0x112a58(0x157)]&&(_0x1b3529['repeatSubFrequency']=_0x36fc80[_0x112a58(0x157)]),_0x36fc80[_0x112a58(0x174)]!==undefined&&(_0x1b3529[_0x112a58(0x195)]=_0x36fc80[_0x112a58(0x174)]),_0x36fc80[_0x112a58(0x182)]!==undefined&&(_0x1b3529[_0x112a58(0x154)]=_0x36fc80[_0x112a58(0x182)]),_0x36fc80['timezone']&&(_0x1b3529[_0x112a58(0x13e)]=_0x36fc80[_0x112a58(0x13e)]);}_0x2dd82c[_0x112a58(0x146)]&&(_0x2dd82c[_0x112a58(0x146)][_0x112a58(0x13f)]&&(_0x1b3529[_0x112a58(0x151)]=_0x2dd82c[_0x112a58(0x146)][_0x112a58(0x13f)]),_0x2dd82c[_0x112a58(0x146)][_0x112a58(0x139)]&&(_0x1b3529[_0x112a58(0x190)]=_0x2dd82c[_0x112a58(0x146)]['email_recipients']['map'](_0x12709d=>{const _0x1353f6=_0x112a58,_0x467630=Number(_0x12709d);if(!isNaN(_0x467630)&&String(_0x467630)===_0x12709d)return _0x467630;const _0x53ef74=_0x6b91fb?.[_0x1353f6(0x197)](_0x12709d[_0x1353f6(0x184)]());if(_0x53ef74===undefined)throw new SDKError(ErrorCode[_0x1353f6(0x18f)],_0x1353f6(0x132)+_0x12709d+_0x1353f6(0x1ab));return _0x53ef74;})));if(_0x2dd82c['connector_config']){const _0x46e69e=_0x516d70?.[_0x112a58(0x181)]?.[_0x112a58(0x197)](_0x1f764d);if(_0x46e69e&&_0x516d70?.[_0x112a58(0x177)])try{const _0x2f91c8=await _0x516d70[_0x112a58(0x177)](_0x46e69e),_0x47e365=validateConnectorConfig(_0x2dd82c[_0x112a58(0x159)],_0x2f91c8);if(!_0x47e365[_0x112a58(0x17c)])throw new SDKError(ErrorCode[_0x112a58(0x1a7)],_0x112a58(0x1b7)+_0x2dd82c[_0x112a58(0x176)]+_0x112a58(0x1b3)+formatValidationErrors(_0x47e365[_0x112a58(0x12f)]),undefined,{'helpText':_0x112a58(0x155)+_0x46e69e+_0x112a58(0x158)+formatSchemaAsHelp(_0x2f91c8)});if(_0x47e365[_0x112a58(0x1a2)][_0x112a58(0x198)]>0x0){const _0x3f105b=formatValidationWarnings(_0x47e365['warnings']);console[_0x112a58(0x134)]('connector_config\x20for\x20activation\x20\x22'+_0x2dd82c[_0x112a58(0x176)]+'\x22:\x0a'+_0x3f105b);}_0x1b3529[_0x112a58(0x163)]=transformConfigToLegacy(_0x2dd82c['connector_config'],_0x2f91c8);}catch(_0x254945){if(_0x254945 instanceof SDKError&&_0x254945['code']===ErrorCode[_0x112a58(0x18b)])_0x1b3529[_0x112a58(0x163)]=_0x2dd82c[_0x112a58(0x159)];else throw _0x254945;}else _0x1b3529['connectorConfig']=_0x2dd82c[_0x112a58(0x159)];}_0x2dd82c[_0x112a58(0x1a6)]!==undefined&&(_0x1b3529[_0x112a58(0x14f)]=_0x2dd82c['activation_template_id']);if(_0x2dd82c[_0x112a58(0x1a4)]){const _0x4fa3bb=_0x2dd82c[_0x112a58(0x1a4)],_0x206456={};if(_0x4fa3bb[_0x112a58(0x167)]&&_0x4fa3bb['columns'][_0x112a58(0x198)]>0x0){const _0x344e27=_0x4fa3bb[_0x112a58(0x167)]['filter'](_0x451e0a=>_0x451e0a&&_0x451e0a['name']);_0x344e27[_0x112a58(0x198)]>0x0&&(_0x206456['columns']=_0x344e27);}_0x4fa3bb[_0x112a58(0x14d)]&&(_0x206456[_0x112a58(0x192)]=_0x4fa3bb[_0x112a58(0x14d)]),_0x4fa3bb[_0x112a58(0x16b)]!==undefined&&(_0x206456[_0x112a58(0x1b0)]=_0x4fa3bb[_0x112a58(0x16b)]),_0x4fa3bb[_0x112a58(0x194)]&&(_0x206456['joinStrategy']=_0x4fa3bb[_0x112a58(0x194)]),_0x4fa3bb[_0x112a58(0x16f)]&&(_0x206456[_0x112a58(0x16f)]=_0x4fa3bb['formatting']),_0x4fa3bb[_0x112a58(0x19f)]&&(_0x206456['orderBy']=_0x4fa3bb['order_by']),_0x1b3529[_0x112a58(0x16c)]=_0x206456;}return _0x1b3529;}export async function activationDefToUpdateRequest(_0x422163,_0x58e60e){return activationDefToCreateRequest(_0x422163,_0x58e60e);}export function deepSortObject(_0xeea533){const _0x3ecf32=a102_0x362023;if(_0xeea533===null||typeof _0xeea533!=='object')return _0xeea533;if(Array[_0x3ecf32(0x164)](_0xeea533))return _0xeea533[_0x3ecf32(0x135)](deepSortObject)[_0x3ecf32(0x12c)]((_0x2436cb,_0x3b12c6)=>JSON[_0x3ecf32(0x136)](_0x2436cb)[_0x3ecf32(0x160)](JSON[_0x3ecf32(0x136)](_0x3b12c6)));const _0x2fc584={};for(const _0x2c7bb0 of Object[_0x3ecf32(0x17e)](_0xeea533)[_0x3ecf32(0x12c)]()){_0x2fc584[_0x2c7bb0]=deepSortObject(_0xeea533[_0x2c7bb0]);}return _0x2fc584;}export function serializeRule(_0x47e3ea){const _0x2216ea=a102_0x362023;return JSON[_0x2216ea(0x136)](deepSortObject(_0x47e3ea));}export function normalizeRuleForMatching(_0x346ea1){return normalizeConditionsForMatching(_0x346ea1);}function normalizeConditionsForMatching(_0x5029a1){const _0x2eefdc=a102_0x362023;if(_0x5029a1===null||typeof _0x5029a1!==_0x2eefdc(0x191))return _0x5029a1;if(Array[_0x2eefdc(0x164)](_0x5029a1))return _0x5029a1[_0x2eefdc(0x135)](normalizeConditionsForMatching);const _0x489a2c=_0x5029a1;if((_0x489a2c[_0x2eefdc(0x138)]===_0x2eefdc(0x18c)||_0x489a2c['type']===_0x2eefdc(0x1b1))&&typeof _0x489a2c[_0x2eefdc(0x188)]===_0x2eefdc(0x14b))return{..._0x489a2c,'segment':_0x2eefdc(0x14e)};const _0x5a3837={};for(const _0x4d8852 of Object['keys'](_0x489a2c)){_0x5a3837[_0x4d8852]=normalizeConditionsForMatching(_0x489a2c[_0x4d8852]);}return _0x5a3837;}export function serializeRuleForMatching(_0x5858ca){const _0xcc4ead=a102_0x362023;return JSON[_0xcc4ead(0x136)](deepSortObject(normalizeRuleForMatching(_0x5858ca)));}export function expandSegmentReferences(_0x2f57cc,_0xa84a60,_0x48afe0=new Set()){return expandConditions(_0x2f57cc,_0xa84a60,_0x48afe0);}function expandConditions(_0x29e452,_0x35bbae,_0x269553){const _0x65ee50=a102_0x362023;if(_0x29e452===null||typeof _0x29e452!=='object')return _0x29e452;if(Array[_0x65ee50(0x164)](_0x29e452))return _0x29e452[_0x65ee50(0x135)](_0x1a0dc2=>expandConditions(_0x1a0dc2,_0x35bbae,_0x269553));const _0x54a529=_0x29e452;if((_0x54a529['type']===_0x65ee50(0x18c)||_0x54a529['type']==='exclude')&&typeof _0x54a529['segment']===_0x65ee50(0x14b)){const _0x3625f1=_0x54a529[_0x65ee50(0x188)],_0x3a9b64=_0x35bbae[_0x65ee50(0x197)](_0x3625f1);if(_0x3a9b64&&!_0x269553['has'](_0x3625f1)){const _0x289bb4=new Set(_0x269553);_0x289bb4[_0x65ee50(0x161)](_0x3625f1);const _0x4a029a=expandConditions(_0x3a9b64,_0x35bbae,_0x289bb4);return{'type':_0x54a529[_0x65ee50(0x138)],'expanded_rule':_0x4a029a};}return{'type':_0x54a529[_0x65ee50(0x138)],'expanded_rule':_0x65ee50(0x1bc)};}const _0x5a6742={};for(const _0x1df1ad of Object[_0x65ee50(0x17e)](_0x54a529)){_0x5a6742[_0x1df1ad]=expandConditions(_0x54a529[_0x1df1ad],_0x35bbae,_0x269553);}return _0x5a6742;}export function serializeExpandedRule(_0x7d4d35,_0x4a5cef){const _0x41917a=a102_0x362023,_0x772223=expandSegmentReferences(_0x7d4d35,_0x4a5cef);return JSON[_0x41917a(0x136)](deepSortObject(_0x772223));}export function createSegmentNameContext(_0x2cbe88){const _0x48f533=a102_0x362023,_0x4688fa=new Set(),_0x388008=new Map(),_0x41c460=new Map();if(_0x2cbe88)for(const [_0x5f234d,_0x3b8ee7]of Object[_0x48f533(0x140)](_0x2cbe88)){if(_0x3b8ee7[_0x48f533(0x1a9)]){const _0x47a903=serializeRule(_0x3b8ee7[_0x48f533(0x1a9)]);_0x41c460[_0x48f533(0x1b5)](_0x47a903,_0x5f234d),_0x4688fa[_0x48f533(0x161)](_0x5f234d);}}return{'usedNames':_0x4688fa,'ruleHashToName':_0x388008,'localRuleToName':_0x2cbe88?_0x41c460:undefined};}export function resolveSegmentName(_0x187fb9,_0x5d6851,_0x2044c0,_0x233799){const _0x58094f=a102_0x362023,_0x44e84e=serializeRule(_0x5d6851);if(_0x2044c0['localRuleToName']){const _0x1bc146=_0x2044c0[_0x58094f(0x19d)]['get'](_0x44e84e);if(_0x1bc146)return{'name':_0x1bc146,'isDuplicate':![],'isLocalMatch':!![]};}const _0x143098=_0x2044c0[_0x58094f(0x183)][_0x58094f(0x197)](_0x44e84e);if(_0x143098)return{'name':_0x143098,'isDuplicate':!![],'isLocalMatch':![]};const _0x1ee29a=_0x233799(_0x187fb9);let _0x22a722=_0x1ee29a||_0x187fb9,_0x326da7=_0x22a722,_0x59d213=0x2;while(_0x2044c0[_0x58094f(0x1ad)]['has'](_0x326da7)){_0x326da7=_0x22a722+'_'+_0x59d213,_0x59d213++;}return _0x2044c0['usedNames'][_0x58094f(0x161)](_0x326da7),_0x2044c0[_0x58094f(0x183)]['set'](_0x44e84e,_0x326da7),{'name':_0x326da7,'isDuplicate':![],'isLocalMatch':![]};}function a102_0x120b(_0xadb5e2,_0xafbad5){_0xadb5e2=_0xadb5e2-0x12b;const _0x4eb750=a102_0x4eb7();let _0x120b40=_0x4eb750[_0xadb5e2];return _0x120b40;}export function collectSegmentRefsFromRule(_0x4f2fe1){const _0x42b7c5=[],_0x6d3a4f=_0x2b0dcf=>{const _0x6f568b=a102_0x120b;if(!_0x2b0dcf||typeof _0x2b0dcf!=='object')return;if(Array[_0x6f568b(0x164)](_0x2b0dcf)){_0x2b0dcf['forEach'](_0x6d3a4f);return;}const _0x15c5f1=_0x2b0dcf;(_0x15c5f1[_0x6f568b(0x138)]===_0x6f568b(0x18c)||_0x15c5f1['type']===_0x6f568b(0x1b1))&&typeof _0x15c5f1[_0x6f568b(0x188)]===_0x6f568b(0x14b)&&_0x42b7c5['push'](_0x15c5f1[_0x6f568b(0x188)]);for(const _0x579453 of Object[_0x6f568b(0x133)](_0x15c5f1)){_0x6d3a4f(_0x579453);}};return _0x6d3a4f(_0x4f2fe1),_0x42b7c5;}export function validateSegmentRule(_0x378e2f,_0x594092){const _0x261326=a102_0x362023;if(!_0x594092||!_0x594092['conditions'])return;for(let _0x586671=0x0;_0x586671<_0x594092[_0x261326(0x16d)][_0x261326(0x198)];_0x586671++){const _0x36dd0f=_0x594092['conditions'][_0x586671];if(_0x261326(0x138)in _0x36dd0f&&_0x36dd0f[_0x261326(0x138)]==='Value'){const _0x1879df=_0x36dd0f;if(!_0x1879df[_0x261326(0x156)]||_0x1879df[_0x261326(0x156)]==='')throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],'Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'+_0x378e2f+'\x27:\x20'+(_0x261326(0x1ba)+_0x586671+'].attribute\x20cannot\x20be\x20empty.\x0a')+_0x261326(0x13a));}}}
@@ -1 +1 @@
1
- (function(_0x3bc995,_0x98757f){const _0x4c18c7=a103_0x2b0e,_0x38228f=_0x3bc995();while(!![]){try{const _0x4910f7=parseInt(_0x4c18c7(0x130))/0x1*(parseInt(_0x4c18c7(0x126))/0x2)+parseInt(_0x4c18c7(0x10f))/0x3*(parseInt(_0x4c18c7(0x112))/0x4)+-parseInt(_0x4c18c7(0x138))/0x5+-parseInt(_0x4c18c7(0x10b))/0x6*(parseInt(_0x4c18c7(0x116))/0x7)+parseInt(_0x4c18c7(0x129))/0x8*(parseInt(_0x4c18c7(0x128))/0x9)+-parseInt(_0x4c18c7(0x137))/0xa*(parseInt(_0x4c18c7(0x117))/0xb)+-parseInt(_0x4c18c7(0x110))/0xc*(parseInt(_0x4c18c7(0x122))/0xd);if(_0x4910f7===_0x98757f)break;else _0x38228f['push'](_0x38228f['shift']());}catch(_0x43e099){_0x38228f['push'](_0x38228f['shift']());}}}(a103_0x5c5e,0x4bf07));function a103_0x5c5e(){const _0x499d18=['type','bold','error','735RipOtQ','491161dPRBvW','behaviorName','Schema\x20query:\x0a','Attributes','\x20\x20\x20\x20','SELECT\x20*\x20FROM\x20(\x0a','column_name','push','source','replace','null','65QhncEA','groupingName','get','startsWith','532958CXzUyk','cyan','36qzwRKO','879288rYDhxh','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','extra','filter','verbose','Behaviors','dim','1LpuZgL','entries','query','name','sort','execute','parentTableName','40MhpvXm','1384280FrnAkE','localeCompare','parentColumn','column_type','set','varchar','slice','key','setJobId','4140IPkEGO','displayName','Unknown','tableName','3hukYAD','873708YteeIH','map','1987516rCJsMd'];a103_0x5c5e=function(){return _0x499d18;};return a103_0x5c5e();}import a103_0x5383df from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x3da89c){const _0x22a116=a103_0x2b0e,_0xd28dc1=_0x3da89c['columns'][_0x22a116(0x111)](_0x28246d=>({'column_name':_0x28246d[_0x22a116(0x133)],'column_type':_0x28246d['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x3da89c,'columns':[{'name':_0x22a116(0x11d),'type':_0x22a116(0x13d)},{'name':_0x22a116(0x13b),'type':'varchar'},{'name':_0x22a116(0x121),'type':_0x22a116(0x13d)},{'name':_0x22a116(0x109),'type':'varchar'},{'name':'default','type':_0x22a116(0x13d)},{'name':_0x22a116(0x12b),'type':'varchar'}],'data':_0xd28dc1};}export async function executeSchemaQuery(_0x490e09,_0x41dbb6,_0x5c1616){const _0x404484=a103_0x2b0e,_0x202e2e=_0x490e09['trim']()[_0x404484(0x120)](/;+$/,''),_0xe5de68=_0x404484(0x11c)+_0x202e2e+_0x404484(0x12a);_0x5c1616[_0x404484(0x12d)]&&console[_0x404484(0x115)](_0x404484(0x119)+_0xe5de68);const _0x117b32=await withProgressSpinner('Fetching\x20schema...',async _0x12cfc0=>{const _0x347705=_0x404484,_0x128c36=await _0x41dbb6[_0x347705(0x132)][_0x347705(0x135)](_0xe5de68,{'catalog':'td','schema':'information_schema','onJobId':_0x571678=>{const _0x140a87=_0x347705;_0x12cfc0[_0x140a87(0x10a)](_0x571678);}});return _0x128c36;},{'verbose':_0x5c1616[_0x404484(0x12d)]});return buildSchemaResult(_0x117b32['data']);}function a103_0x2b0e(_0x2b53f0,_0x45a658){_0x2b53f0=_0x2b53f0-0x108;const _0x5c5e3f=a103_0x5c5e();let _0x2b0ea0=_0x5c5e3f[_0x2b53f0];return _0x2b0ea0;}export function displayFieldsHumanReadable(_0x29c1e,_0x2a64a0){const _0xcd2195=a103_0x2b0e,_0x4221c1=_0x29c1e['filter'](_0x1a165a=>_0x1a165a['source']==='attribute'),_0x2932c2=_0x29c1e[_0xcd2195(0x12c)](_0x1b8a3c=>_0x1b8a3c[_0xcd2195(0x11f)]==='behavior'),_0xfd6d64=new Map();for(const _0x7999ab of _0x4221c1){const _0x92e9fb=_0x7999ab[_0xcd2195(0x123)]||_0x7999ab[_0xcd2195(0x136)]||_0xcd2195(0x10d),_0x501c5e=_0xfd6d64[_0xcd2195(0x124)](_0x92e9fb);_0x501c5e?_0x501c5e['fields']['push'](_0x7999ab):_0xfd6d64['set'](_0x92e9fb,{'displayName':_0x92e9fb,'tableName':_0x7999ab[_0xcd2195(0x136)],'fields':[_0x7999ab]});}const _0x5966a8=new Map();for(const _0x34ef8d of _0x2932c2){const _0x53b802=_0x34ef8d[_0xcd2195(0x118)]||'Unknown',_0x3b04b=_0x5966a8[_0xcd2195(0x124)](_0x53b802)||[];_0x3b04b[_0xcd2195(0x11e)](_0x34ef8d),_0x5966a8[_0xcd2195(0x13c)](_0x53b802,_0x3b04b);}console['error']('\x0a'+a103_0x5383df['bold'](_0x2a64a0));if(_0xfd6d64['size']>0x0){console[_0xcd2195(0x115)]('\x0a'+a103_0x5383df[_0xcd2195(0x12f)](_0xcd2195(0x11a)));const _0x1369cf=[..._0xfd6d64[_0xcd2195(0x131)]()][_0xcd2195(0x134)]((_0x4b053d,_0x467c21)=>_0x4b053d[0x0][_0xcd2195(0x139)](_0x467c21[0x0]));for(const [,_0x2e2160]of _0x1369cf){const _0x19ad4e=_0x2e2160['tableName']&&_0x2e2160['tableName']!==_0x2e2160[_0xcd2195(0x10c)]?'\x20'+a103_0x5383df['dim']('('+_0x2e2160[_0xcd2195(0x10e)]+')'):'';console['error']('\x20\x20'+a103_0x5383df[_0xcd2195(0x114)](_0x2e2160['displayName'])+_0x19ad4e);const _0x5d5449=[..._0x2e2160['fields']][_0xcd2195(0x134)]((_0x48a9d2,_0x1332f9)=>_0x48a9d2[_0xcd2195(0x133)][_0xcd2195(0x139)](_0x1332f9[_0xcd2195(0x133)]));for(const _0x37d3ec of _0x5d5449){const _0x55e3d7=_0x37d3ec[_0xcd2195(0x13a)]&&_0x37d3ec[_0xcd2195(0x13a)]!==_0x37d3ec[_0xcd2195(0x133)]?'\x20'+a103_0x5383df[_0xcd2195(0x12f)]('('+_0x37d3ec[_0xcd2195(0x13a)]+')'):'';console[_0xcd2195(0x115)]('\x20\x20\x20\x20'+_0x37d3ec['name']+_0x55e3d7+':\x20'+a103_0x5383df[_0xcd2195(0x127)](_0x37d3ec[_0xcd2195(0x113)]));}}}if(_0x5966a8['size']>0x0){console[_0xcd2195(0x115)]('\x0a'+a103_0x5383df['dim'](_0xcd2195(0x12e)));const _0x5d6b5f=[..._0x5966a8[_0xcd2195(0x131)]()][_0xcd2195(0x134)]((_0x4675ba,_0x1ae931)=>_0x4675ba[0x0][_0xcd2195(0x139)](_0x1ae931[0x0]));for(const [_0x1b4593,_0x261800]of _0x5d6b5f){const _0xa07959=_0x261800[0x0],_0xf72c9=_0xa07959?.[_0xcd2195(0x136)]||'';console[_0xcd2195(0x115)]('\x20\x20'+a103_0x5383df[_0xcd2195(0x114)](_0x1b4593)+(_0xf72c9?'\x20'+a103_0x5383df[_0xcd2195(0x12f)]('('+_0xf72c9+')'):''));const _0x54a6fa=[..._0x261800][_0xcd2195(0x134)]((_0x3886f2,_0x5e95a5)=>_0x3886f2[_0xcd2195(0x133)][_0xcd2195(0x139)](_0x5e95a5['name']));for(const _0x185535 of _0x54a6fa){const _0xa30f96=_0x185535[_0xcd2195(0x133)][_0xcd2195(0x125)](_0x1b4593+'.')?_0x185535[_0xcd2195(0x133)][_0xcd2195(0x108)](_0x1b4593['length']+0x1):_0x185535[_0xcd2195(0x133)],_0x31015f=_0x185535[_0xcd2195(0x13a)]&&_0x185535[_0xcd2195(0x13a)]!==_0xa30f96?'\x20'+a103_0x5383df[_0xcd2195(0x12f)]('('+_0x185535['parentColumn']+')'):'';console[_0xcd2195(0x115)](_0xcd2195(0x11b)+_0xa30f96+_0x31015f+':\x20'+a103_0x5383df[_0xcd2195(0x127)](_0x185535[_0xcd2195(0x113)]));}}}console[_0xcd2195(0x115)]('');}
1
+ (function(_0x91b566,_0x3673a7){const _0x3d7599=a103_0x486b,_0x505df6=_0x91b566();while(!![]){try{const _0x2649f2=-parseInt(_0x3d7599(0x130))/0x1*(-parseInt(_0x3d7599(0x144))/0x2)+parseInt(_0x3d7599(0x168))/0x3*(-parseInt(_0x3d7599(0x139))/0x4)+parseInt(_0x3d7599(0x14a))/0x5*(parseInt(_0x3d7599(0x148))/0x6)+-parseInt(_0x3d7599(0x14d))/0x7*(-parseInt(_0x3d7599(0x13a))/0x8)+-parseInt(_0x3d7599(0x163))/0x9+parseInt(_0x3d7599(0x136))/0xa*(-parseInt(_0x3d7599(0x132))/0xb)+-parseInt(_0x3d7599(0x13f))/0xc;if(_0x2649f2===_0x3673a7)break;else _0x505df6['push'](_0x505df6['shift']());}catch(_0x2a486c){_0x505df6['push'](_0x505df6['shift']());}}}(a103_0x34aa,0x33d4c));function a103_0x486b(_0x32d2c5,_0x478a6a){_0x32d2c5=_0x32d2c5-0x130;const _0x34aa31=a103_0x34aa();let _0x486b50=_0x34aa31[_0x32d2c5];return _0x486b50;}import a103_0x30c989 from'chalk';function a103_0x34aa(){const _0x462e2f=['50ATdVgO','dim','get','7ZOksVG','name','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','bold','column_name','YES','localeCompare','error','behavior','type','setJobId','cyan','trim','filter','verbose','source','Attributes','Fetching\x20schema...','size','map','tableName','data','111042nwBSvI','attribute','varchar','entries','fields','110496tOTvsk','key','parentColumn','380954rNKjLC','Schema\x20query:\x0a','2766159OBQhha','Behaviors','\x20\x20\x20\x20','Unknown','10yanoqJ','columns','SELECT\x20*\x20FROM\x20(\x0a','28hBBsou','2636328hnwZGk','behaviorName','displayName','replace','groupingName','2760648VaeImt','execute','length','push','parentTableName','2aZHTed','sort','set','column_type','152094aqyjor','extra'];a103_0x34aa=function(){return _0x462e2f;};return a103_0x34aa();}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x271c8b){const _0x539f24=a103_0x486b,_0x6e4131=_0x271c8b[_0x539f24(0x137)][_0x539f24(0x160)](_0x1853a2=>({'column_name':_0x1853a2[_0x539f24(0x14e)],'column_type':_0x1853a2[_0x539f24(0x156)],'null':_0x539f24(0x152),'key':null,'default':null,'extra':null}));return{..._0x271c8b,'columns':[{'name':_0x539f24(0x151),'type':_0x539f24(0x165)},{'name':_0x539f24(0x147),'type':_0x539f24(0x165)},{'name':'null','type':_0x539f24(0x165)},{'name':_0x539f24(0x169),'type':_0x539f24(0x165)},{'name':'default','type':'varchar'},{'name':_0x539f24(0x149),'type':_0x539f24(0x165)}],'data':_0x6e4131};}export async function executeSchemaQuery(_0x9dca12,_0x210f16,_0x160dd2){const _0x94743b=a103_0x486b,_0x5b5a92=_0x9dca12[_0x94743b(0x159)]()[_0x94743b(0x13d)](/;+$/,''),_0x2bc7e1=_0x94743b(0x138)+_0x5b5a92+_0x94743b(0x14f);_0x160dd2['verbose']&&console['error'](_0x94743b(0x131)+_0x2bc7e1);const _0x377a14=await withProgressSpinner(_0x94743b(0x15e),async _0x3bc831=>{const _0x5a2bf0=_0x94743b,_0xc45b15=await _0x210f16['query'][_0x5a2bf0(0x140)](_0x2bc7e1,{'catalog':'td','schema':'information_schema','onJobId':_0x529be3=>{const _0x546119=_0x5a2bf0;_0x3bc831[_0x546119(0x157)](_0x529be3);}});return _0xc45b15;},{'verbose':_0x160dd2[_0x94743b(0x15b)]});return buildSchemaResult(_0x377a14[_0x94743b(0x162)]);}export function displayFieldsHumanReadable(_0x3b6ae0,_0x3d343a){const _0x4f5e9c=a103_0x486b,_0x290994=_0x3b6ae0[_0x4f5e9c(0x15a)](_0x554bef=>_0x554bef[_0x4f5e9c(0x15c)]===_0x4f5e9c(0x164)),_0x50eed8=_0x3b6ae0[_0x4f5e9c(0x15a)](_0x147e75=>_0x147e75['source']===_0x4f5e9c(0x155)),_0x1cfa17=new Map();for(const _0x292f15 of _0x290994){const _0x4be11f=_0x292f15[_0x4f5e9c(0x13e)]||_0x292f15[_0x4f5e9c(0x143)]||_0x4f5e9c(0x135),_0x15968e=_0x1cfa17['get'](_0x4be11f);_0x15968e?_0x15968e['fields'][_0x4f5e9c(0x142)](_0x292f15):_0x1cfa17[_0x4f5e9c(0x146)](_0x4be11f,{'displayName':_0x4be11f,'tableName':_0x292f15[_0x4f5e9c(0x143)],'fields':[_0x292f15]});}const _0x49699b=new Map();for(const _0x4d4bcd of _0x50eed8){const _0x4b6366=_0x4d4bcd[_0x4f5e9c(0x13b)]||_0x4f5e9c(0x135),_0x5a9bde=_0x49699b[_0x4f5e9c(0x14c)](_0x4b6366)||[];_0x5a9bde[_0x4f5e9c(0x142)](_0x4d4bcd),_0x49699b[_0x4f5e9c(0x146)](_0x4b6366,_0x5a9bde);}console[_0x4f5e9c(0x154)]('\x0a'+a103_0x30c989[_0x4f5e9c(0x150)](_0x3d343a));if(_0x1cfa17['size']>0x0){console[_0x4f5e9c(0x154)]('\x0a'+a103_0x30c989[_0x4f5e9c(0x14b)](_0x4f5e9c(0x15d)));const _0x37fa92=[..._0x1cfa17[_0x4f5e9c(0x166)]()]['sort']((_0x4632f7,_0x54fb1e)=>_0x4632f7[0x0][_0x4f5e9c(0x153)](_0x54fb1e[0x0]));for(const [,_0x238847]of _0x37fa92){const _0x3a197b=_0x238847[_0x4f5e9c(0x161)]&&_0x238847['tableName']!==_0x238847[_0x4f5e9c(0x13c)]?'\x20'+a103_0x30c989[_0x4f5e9c(0x14b)]('('+_0x238847['tableName']+')'):'';console[_0x4f5e9c(0x154)]('\x20\x20'+a103_0x30c989[_0x4f5e9c(0x150)](_0x238847[_0x4f5e9c(0x13c)])+_0x3a197b);const _0x2674f6=[..._0x238847[_0x4f5e9c(0x167)]][_0x4f5e9c(0x145)]((_0x4d8bda,_0x33506c)=>_0x4d8bda[_0x4f5e9c(0x14e)]['localeCompare'](_0x33506c[_0x4f5e9c(0x14e)]));for(const _0x56acf8 of _0x2674f6){const _0x4bf709=_0x56acf8[_0x4f5e9c(0x16a)]&&_0x56acf8['parentColumn']!==_0x56acf8['name']?'\x20'+a103_0x30c989[_0x4f5e9c(0x14b)]('('+_0x56acf8[_0x4f5e9c(0x16a)]+')'):'';console[_0x4f5e9c(0x154)](_0x4f5e9c(0x134)+_0x56acf8[_0x4f5e9c(0x14e)]+_0x4bf709+':\x20'+a103_0x30c989[_0x4f5e9c(0x158)](_0x56acf8[_0x4f5e9c(0x156)]));}}}if(_0x49699b[_0x4f5e9c(0x15f)]>0x0){console[_0x4f5e9c(0x154)]('\x0a'+a103_0x30c989[_0x4f5e9c(0x14b)](_0x4f5e9c(0x133)));const _0x192fb8=[..._0x49699b['entries']()][_0x4f5e9c(0x145)]((_0x333a02,_0x540991)=>_0x333a02[0x0][_0x4f5e9c(0x153)](_0x540991[0x0]));for(const [_0x246dc3,_0x3aff08]of _0x192fb8){const _0x5a3177=_0x3aff08[0x0],_0x173958=_0x5a3177?.[_0x4f5e9c(0x143)]||'';console[_0x4f5e9c(0x154)]('\x20\x20'+a103_0x30c989[_0x4f5e9c(0x150)](_0x246dc3)+(_0x173958?'\x20'+a103_0x30c989[_0x4f5e9c(0x14b)]('('+_0x173958+')'):''));const _0x4f9221=[..._0x3aff08][_0x4f5e9c(0x145)]((_0xc5a9c2,_0x2e035f)=>_0xc5a9c2[_0x4f5e9c(0x14e)][_0x4f5e9c(0x153)](_0x2e035f[_0x4f5e9c(0x14e)]));for(const _0x584195 of _0x4f9221){const _0x3cb4fb=_0x584195[_0x4f5e9c(0x14e)]['startsWith'](_0x246dc3+'.')?_0x584195[_0x4f5e9c(0x14e)]['slice'](_0x246dc3[_0x4f5e9c(0x141)]+0x1):_0x584195[_0x4f5e9c(0x14e)],_0xcb4117=_0x584195[_0x4f5e9c(0x16a)]&&_0x584195['parentColumn']!==_0x3cb4fb?'\x20'+a103_0x30c989[_0x4f5e9c(0x14b)]('('+_0x584195[_0x4f5e9c(0x16a)]+')'):'';console['error']('\x20\x20\x20\x20'+_0x3cb4fb+_0xcb4117+':\x20'+a103_0x30c989['cyan'](_0x584195['type']));}}}console[_0x4f5e9c(0x154)]('');}
@@ -1 +1 @@
1
- function a104_0x5ec0(_0x3393fb,_0x42800e){_0x3393fb=_0x3393fb-0x121;const _0x35c2e8=a104_0x35c2();let _0x5ec0e1=_0x35c2e8[_0x3393fb];return _0x5ec0e1;}(function(_0x15dc80,_0x40e1c3){const _0x2fa650=a104_0x5ec0,_0x5a3587=_0x15dc80();while(!![]){try{const _0x3bebb5=parseInt(_0x2fa650(0x124))/0x1*(parseInt(_0x2fa650(0x12a))/0x2)+parseInt(_0x2fa650(0x125))/0x3+-parseInt(_0x2fa650(0x134))/0x4+parseInt(_0x2fa650(0x136))/0x5*(parseInt(_0x2fa650(0x12e))/0x6)+-parseInt(_0x2fa650(0x130))/0x7*(parseInt(_0x2fa650(0x135))/0x8)+-parseInt(_0x2fa650(0x133))/0x9*(parseInt(_0x2fa650(0x12b))/0xa)+parseInt(_0x2fa650(0x123))/0xb;if(_0x3bebb5===_0x40e1c3)break;else _0x5a3587['push'](_0x5a3587['shift']());}catch(_0x55eba7){_0x5a3587['push'](_0x5a3587['shift']());}}}(a104_0x35c2,0x750ec));import{readdirSync,statSync}from'fs';import a104_0xf2d17d from'path';export function findYamlFiles(_0x463cd2){const _0x2a5a83=[];function _0x28ce11(_0x3f774c){const _0x2c7c90=a104_0x5ec0,_0x142d60=readdirSync(_0x3f774c,{'withFileTypes':!![]});for(const _0x592f2e of _0x142d60){const _0x379987=a104_0xf2d17d[_0x2c7c90(0x132)](_0x3f774c,_0x592f2e[_0x2c7c90(0x121)]);if(_0x592f2e[_0x2c7c90(0x12d)]())_0x28ce11(_0x379987);else(_0x592f2e[_0x2c7c90(0x121)][_0x2c7c90(0x128)](_0x2c7c90(0x126))||_0x592f2e[_0x2c7c90(0x121)][_0x2c7c90(0x128)]('.yaml'))&&_0x2a5a83[_0x2c7c90(0x131)](_0x379987);}}return _0x28ce11(_0x463cd2),_0x2a5a83;}function a104_0x35c2(){const _0x3ac014=['isDirectory','78UKSugT','extname','378bKoMyv','push','join','1077993PTbuus','2273524FUcQNI','28928PAJCIB','255770XLAkqs','name','dirname','1516273OqQscm','3kRUDyB','1704921udYDWC','.yml','relative','endsWith','toLowerCase','234046FVXZtc','40ymgVet','.yaml'];a104_0x35c2=function(){return _0x3ac014;};return a104_0x35c2();}export function discoverYamlFiles(_0x1a85f3){const _0x1086bf=findYamlFiles(_0x1a85f3);return _0x1086bf['map'](_0x55950e=>{const _0x566d39=a104_0x5ec0,_0x1d2625=a104_0xf2d17d[_0x566d39(0x127)](_0x1a85f3,_0x55950e),_0xf8bbe2=a104_0xf2d17d[_0x566d39(0x122)](_0x1d2625);return{'absolutePath':_0x55950e,'relativePath':_0x1d2625,'folderPath':_0xf8bbe2==='.'?'':_0xf8bbe2};});}export function isYamlFile(_0x6ccd6b){const _0x1758d4=a104_0x5ec0;try{const _0x22a9ba=statSync(_0x6ccd6b);if(!_0x22a9ba['isFile']())return![];const _0x340115=a104_0xf2d17d[_0x1758d4(0x12f)](_0x6ccd6b)[_0x1758d4(0x129)]();return _0x340115==='.yml'||_0x340115===_0x1758d4(0x12c);}catch{return![];}}
1
+ (function(_0x492914,_0x227e63){const _0x2c3fa4=a104_0xf796,_0x830e0a=_0x492914();while(!![]){try{const _0x12827e=parseInt(_0x2c3fa4(0xf2))/0x1+-parseInt(_0x2c3fa4(0xed))/0x2*(parseInt(_0x2c3fa4(0xee))/0x3)+-parseInt(_0x2c3fa4(0xe6))/0x4+parseInt(_0x2c3fa4(0xea))/0x5+-parseInt(_0x2c3fa4(0xe9))/0x6+-parseInt(_0x2c3fa4(0xf6))/0x7+parseInt(_0x2c3fa4(0xe7))/0x8*(parseInt(_0x2c3fa4(0xe8))/0x9);if(_0x12827e===_0x227e63)break;else _0x830e0a['push'](_0x830e0a['shift']());}catch(_0x44b3e3){_0x830e0a['push'](_0x830e0a['shift']());}}}(a104_0x1102,0x81538));import{readdirSync,statSync}from'fs';function a104_0xf796(_0x4d9ba6,_0x1c5e21){_0x4d9ba6=_0x4d9ba6-0xe4;const _0x11023d=a104_0x1102();let _0xf7965=_0x11023d[_0x4d9ba6];return _0xf7965;}import a104_0x1403a5 from'path';function a104_0x1102(){const _0x4a194c=['3014916PzesAg','8gSUaLS','14151627FkhGgV','4747254hKziUc','3432550pePWLs','isDirectory','isFile','586xXyMIH','327XAiieK','push','name','.yml','382065XmGdOL','.yaml','extname','relative','3740681kfrUHz','endsWith','map'];a104_0x1102=function(){return _0x4a194c;};return a104_0x1102();}export function findYamlFiles(_0x39101b){const _0x55cca8=[];function _0x57f9b2(_0x3959ef){const _0x5cc009=a104_0xf796,_0x5d44b0=readdirSync(_0x3959ef,{'withFileTypes':!![]});for(const _0x4b67af of _0x5d44b0){const _0x438eb9=a104_0x1403a5['join'](_0x3959ef,_0x4b67af['name']);if(_0x4b67af[_0x5cc009(0xeb)]())_0x57f9b2(_0x438eb9);else(_0x4b67af[_0x5cc009(0xf0)][_0x5cc009(0xe4)]('.yml')||_0x4b67af[_0x5cc009(0xf0)][_0x5cc009(0xe4)]('.yaml'))&&_0x55cca8[_0x5cc009(0xef)](_0x438eb9);}}return _0x57f9b2(_0x39101b),_0x55cca8;}export function discoverYamlFiles(_0x23ed7d){const _0x3b7da6=a104_0xf796,_0x45d8ac=findYamlFiles(_0x23ed7d);return _0x45d8ac[_0x3b7da6(0xe5)](_0xb4e8b3=>{const _0x477ad1=_0x3b7da6,_0x3096d2=a104_0x1403a5[_0x477ad1(0xf5)](_0x23ed7d,_0xb4e8b3),_0x5eddc3=a104_0x1403a5['dirname'](_0x3096d2);return{'absolutePath':_0xb4e8b3,'relativePath':_0x3096d2,'folderPath':_0x5eddc3==='.'?'':_0x5eddc3};});}export function isYamlFile(_0x1334b4){const _0x51480f=a104_0xf796;try{const _0x5d7cd7=statSync(_0x1334b4);if(!_0x5d7cd7[_0x51480f(0xec)]())return![];const _0x5bab72=a104_0x1403a5[_0x51480f(0xf4)](_0x1334b4)['toLowerCase']();return _0x5bab72===_0x51480f(0xf1)||_0x5bab72===_0x51480f(0xf3);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x2f185c,_0x866b7d){const _0x577940=a105_0x3fc7,_0x2228e6=_0x2f185c();while(!![]){try{const _0x5209f9=-parseInt(_0x577940(0x18a))/0x1*(parseInt(_0x577940(0x19d))/0x2)+-parseInt(_0x577940(0x15b))/0x3+-parseInt(_0x577940(0x161))/0x4+parseInt(_0x577940(0x199))/0x5*(-parseInt(_0x577940(0x16f))/0x6)+parseInt(_0x577940(0x16c))/0x7+-parseInt(_0x577940(0x169))/0x8+parseInt(_0x577940(0x17e))/0x9;if(_0x5209f9===_0x866b7d)break;else _0x2228e6['push'](_0x2228e6['shift']());}catch(_0x7b5e8e){_0x2228e6['push'](_0x2228e6['shift']());}}}(a105_0x16f9,0x868ac));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a105_0x16f9(){const _0x1c108c=['activation_template_id','merged','latest','bundle_name','branches','connection','toLowerCase','417465CZZQFh','map','all_columns','schedule','rule','attributes','2949460mTUbQO','versions','bundle_id','replace','stringify','journeyStages','isArray','description','5640544DfiUBC','sort','segments','6441421drgFdv','object','get','6JMjlTr','endsWith','from','segment','connector_config','length','yaml','startsWith','activation','keys','launched','some','name','slice','item','24935301ANyOqq','values','columns','version','journeyBundleName','wait','journeys','conditions','null','type','with','push','855845EqVfXQ','goal','behavior','activations','milestone','notification','max','condition','nameMapping','.yaml','decision_point','set','journey','index','trim','3511375wKqvRB','entries','join','stages','2WwJFIK','state','match','entry_criteria','exit_criteria','version_number','steps','include'];a105_0x16f9=function(){return _0x1c108c;};return a105_0x16f9();}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x4130b7){const _0x54c913=a105_0x3fc7;return _0x4130b7[_0x54c913(0x15a)]()[_0x54c913(0x164)](/\s+/g,'_')[_0x54c913(0x164)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x426b19){const _0x1a0a8a=a105_0x3fc7,_0x88bd01=_0x426b19[_0x1a0a8a(0x19f)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x88bd01){const _0x10ef8b=_0x88bd01[0x1]['toLowerCase'](),_0x43fa32=_0x88bd01[0x2],_0x417f34=_0x43fa32['replace'](/-/g,'')['slice'](0x0,0x4)[_0x1a0a8a(0x15a)]();return _0x10ef8b+'_'+_0x417f34;}const _0x547522=_0x426b19[_0x1a0a8a(0x19f)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x547522){const _0x5c604a=_0x547522[0x1],_0x4b53d8=_0x547522[0x2][_0x1a0a8a(0x15a)](),_0x18d83c=_0x5c604a['replace'](/-/g,'')[_0x1a0a8a(0x17c)](0x0,0x4)[_0x1a0a8a(0x15a)]();return _0x4b53d8+'_'+_0x18d83c;}return undefined;}function stableStringify(_0x4cef44){const _0x4f17b8=a105_0x3fc7;if(Array[_0x4f17b8(0x167)](_0x4cef44))return'['+_0x4cef44[_0x4f17b8(0x15c)](_0xd34e11=>stableStringify(_0xd34e11))[_0x4f17b8(0x19b)](',')+']';if(_0x4cef44&&typeof _0x4cef44==='object'){const _0x4184de=_0x4cef44,_0x306456=Object[_0x4f17b8(0x178)](_0x4184de)[_0x4f17b8(0x16a)](),_0x3b4a31=_0x306456[_0x4f17b8(0x15c)](_0x46c9d7=>'\x22'+_0x46c9d7+'\x22:'+stableStringify(_0x4184de[_0x46c9d7]));return'{'+_0x3b4a31['join'](',')+'}';}const _0x139f9f=JSON[_0x4f17b8(0x165)](_0x4cef44);return _0x139f9f===undefined?_0x4f17b8(0x186):_0x139f9f;}export function consolidateActivationsByContent(_0x1e9f6a){const _0x3e2dee=a105_0x3fc7,_0x4c6df0={},_0x2c5c76=new Map(),_0x24bc4a=new Map();for(const _0x1e1c61 of _0x1e9f6a){if(!_0x1e1c61)continue;for(const [_0x1e7199,_0x508f4a]of Object[_0x3e2dee(0x19a)](_0x1e1c61)){const _0x59d8b9={'connection':_0x508f4a[_0x3e2dee(0x159)],..._0x508f4a['all_columns']!==undefined&&{'all_columns':_0x508f4a[_0x3e2dee(0x15d)]},..._0x508f4a[_0x3e2dee(0x180)]!==undefined&&{'columns':_0x508f4a[_0x3e2dee(0x180)]},..._0x508f4a['behavior']!==undefined&&{'behavior':_0x508f4a[_0x3e2dee(0x18c)]},..._0x508f4a[_0x3e2dee(0x15e)]!==undefined&&{'schedule':_0x508f4a['schedule']},..._0x508f4a[_0x3e2dee(0x18f)]!==undefined&&{'notification':_0x508f4a[_0x3e2dee(0x18f)]},..._0x508f4a['connector_config']!==undefined&&{'connector_config':_0x508f4a[_0x3e2dee(0x173)]},..._0x508f4a[_0x3e2dee(0x1a5)]!==undefined&&{'activation_template_id':_0x508f4a[_0x3e2dee(0x1a5)]}},_0x4ba64d=stableStringify(_0x59d8b9),_0x86d3b6=_0x24bc4a['get'](_0x4ba64d);_0x86d3b6?_0x2c5c76[_0x3e2dee(0x195)](_0x1e7199,_0x86d3b6):(_0x4c6df0[_0x1e7199]=_0x508f4a,_0x2c5c76['set'](_0x1e7199,_0x1e7199),_0x24bc4a['set'](_0x4ba64d,_0x1e7199));}}return{'merged':_0x4c6df0,'nameMapping':_0x2c5c76};}export function updateActivationReferences(_0x3fb2d7,_0x49e57e){const _0x4e3d78=a105_0x3fc7;if(!_0x3fb2d7)return;for(const _0x5900e7 of _0x3fb2d7){if(!_0x5900e7['steps'])continue;for(const _0x10fcca of _0x5900e7[_0x4e3d78(0x1a3)]){if(_0x10fcca[_0x4e3d78(0x187)]==='activation'&&_0x10fcca['with']?.[_0x4e3d78(0x177)]){const _0x360d01=_0x49e57e['get'](_0x10fcca[_0x4e3d78(0x188)]['activation']);_0x360d01&&_0x360d01!==_0x10fcca[_0x4e3d78(0x188)][_0x4e3d78(0x177)]&&(_0x10fcca[_0x4e3d78(0x188)][_0x4e3d78(0x177)]=_0x360d01);}}}}export function consolidateSegmentsByContent(_0x1868de,_0x2904e6){const _0xc87429=a105_0x3fc7,_0xbfbf8d={},_0x27469b=new Map(),_0x260371=new Map();for(const _0x2f6667 of _0x1868de){if(!_0x2f6667)continue;for(const [_0x390847,_0x357fa9]of Object[_0xc87429(0x19a)](_0x2f6667)){if(!_0x357fa9[_0xc87429(0x15f)]){_0xbfbf8d[_0x390847]=_0x357fa9,_0x27469b[_0xc87429(0x195)](_0x390847,_0x390847);continue;}const _0x4d8413=_0x357fa9[_0xc87429(0x168)]&&_0x357fa9['description'][_0xc87429(0x198)]()?_0x357fa9[_0xc87429(0x168)]:undefined,_0x2139ee=JSON['stringify']({'description':_0x4d8413,'rule':deepSortObject(_0x357fa9[_0xc87429(0x15f)])}),_0x19e63d=_0x260371[_0xc87429(0x16e)](_0x2139ee);if(_0x19e63d){const _0x5a4e69={..._0x357fa9['description']!==undefined&&{'description':_0x357fa9['description']},'rule':_0x357fa9[_0xc87429(0x15f)]?deepSortObject(_0x357fa9[_0xc87429(0x15f)]):_0x357fa9['rule']};if(_0x390847<_0x19e63d){_0xbfbf8d[_0x390847]=_0x5a4e69,delete _0xbfbf8d[_0x19e63d];for(const [_0x3306ed,_0x27807b]of _0x27469b['entries']()){_0x27807b===_0x19e63d&&_0x27469b['set'](_0x3306ed,_0x390847);}_0x27469b[_0xc87429(0x195)](_0x390847,_0x390847),_0x260371['set'](_0x2139ee,_0x390847);}else _0xbfbf8d[_0x19e63d]=_0x5a4e69,_0x27469b[_0xc87429(0x195)](_0x390847,_0x19e63d);}else{let _0x452f34=_0x390847;if(_0x2904e6){const _0x44db55=_0x2904e6[_0xc87429(0x16e)](_0x2139ee);_0x44db55&&_0x44db55['length']>0x0&&(_0x452f34=_0x44db55[_0xc87429(0x17c)]()[_0xc87429(0x16a)]()[0x0]);}const _0x564d88={..._0x357fa9[_0xc87429(0x168)]!==undefined&&{'description':_0x357fa9[_0xc87429(0x168)]},'rule':_0x357fa9[_0xc87429(0x15f)]?deepSortObject(_0x357fa9['rule']):_0x357fa9['rule']};_0xbfbf8d[_0x452f34]=_0x564d88,_0x27469b[_0xc87429(0x195)](_0x390847,_0x452f34),_0x260371[_0xc87429(0x195)](_0x2139ee,_0x452f34);}}}return{'merged':_0xbfbf8d,'nameMapping':_0x27469b};}export function updateSegmentReferences(_0x41ad0d,_0x19ce7b){const _0x53561a=a105_0x3fc7;if(!_0x41ad0d)return;for(const _0x2edb54 of _0x41ad0d){if(_0x2edb54['entry_criteria']?.[_0x53561a(0x172)]){const _0x564b12=_0x19ce7b['get'](_0x2edb54[_0x53561a(0x1a0)][_0x53561a(0x172)]);_0x564b12&&(_0x2edb54[_0x53561a(0x1a0)][_0x53561a(0x172)]=_0x564b12);}if(_0x2edb54[_0x53561a(0x1a3)])for(const _0x3b7f50 of _0x2edb54[_0x53561a(0x1a3)]){if(_0x3b7f50['type']===_0x53561a(0x194)&&_0x3b7f50[_0x53561a(0x188)]?.[_0x53561a(0x158)])for(const _0x572365 of _0x3b7f50[_0x53561a(0x188)][_0x53561a(0x158)]){if(_0x572365['segment']){const _0x38c75b=_0x19ce7b[_0x53561a(0x16e)](_0x572365[_0x53561a(0x172)]);_0x38c75b&&(_0x572365[_0x53561a(0x172)]=_0x38c75b);}}}}}export function updateSegmentRefsInSegments(_0x287614,_0x373231){const _0x571a54=a105_0x3fc7;for(const _0x26616b of Object[_0x571a54(0x17f)](_0x287614)){_0x26616b[_0x571a54(0x15f)]&&updateSegmentRefsInRule(_0x26616b[_0x571a54(0x15f)],_0x373231);}}function updateSegmentRefsInRule(_0x2d05a6,_0x50da17){const _0xe03ea8=a105_0x3fc7;if(_0x2d05a6===null||typeof _0x2d05a6!==_0xe03ea8(0x16d))return;if(Array[_0xe03ea8(0x167)](_0x2d05a6)){for(const _0x2640c0 of _0x2d05a6){updateSegmentRefsInRule(_0x2640c0,_0x50da17);}return;}const _0x5a6db6=_0x2d05a6;if((_0x5a6db6[_0xe03ea8(0x187)]===_0xe03ea8(0x1a4)||_0x5a6db6[_0xe03ea8(0x187)]==='exclude')&&typeof _0x5a6db6[_0xe03ea8(0x172)]==='string'){const _0x1c5fe1=_0x50da17[_0xe03ea8(0x16e)](_0x5a6db6[_0xe03ea8(0x172)]);_0x1c5fe1&&(_0x5a6db6[_0xe03ea8(0x172)]=_0x1c5fe1);}if(_0x5a6db6['conditions']&&Array['isArray'](_0x5a6db6[_0xe03ea8(0x185)]))for(const _0x770f49 of _0x5a6db6[_0xe03ea8(0x185)]){updateSegmentRefsInRule(_0x770f49,_0x50da17);}}export function buildJourneysArray(_0x1bdf40){const _0x31981f=a105_0x3fc7,_0x112f40=Math[_0x31981f(0x190)](..._0x1bdf40[_0x31981f(0x15c)](_0x1b964d=>_0x1b964d['item']['versionNumber']||0x0));return _0x1bdf40[_0x31981f(0x15c)](_0x258342=>{const _0x41e91d=_0x31981f,_0x50106b=(_0x258342[_0x41e91d(0x17d)]['versionNumber']||0x0)===_0x112f40,_0x2b5b24=_0x258342[_0x41e91d(0x175)]['journeys']?.[0x0],_0x55d28e={'version':_0x2b5b24?.[_0x41e91d(0x181)]||_0x258342[_0x41e91d(0x175)]['version']||_0x258342[_0x41e91d(0x17d)][_0x41e91d(0x17b)],'state':_0x258342['item'][_0x41e91d(0x19e)]===_0x41e91d(0x179)?_0x41e91d(0x179):'draft','stages':_0x2b5b24?.[_0x41e91d(0x19c)]||_0x258342[_0x41e91d(0x175)][_0x41e91d(0x19c)]||[],'id':_0x2b5b24?.['id']||_0x258342[_0x41e91d(0x175)]['id'],'version_number':_0x2b5b24?.[_0x41e91d(0x1a2)]||_0x258342['yaml'][_0x41e91d(0x1a2)]};return _0x50106b&&(_0x55d28e[_0x41e91d(0x156)]=!![]),_0x55d28e;});}export function buildMergedJourneyDef(_0xb6c354,_0x270816){const _0x3a86cc=a105_0x3fc7,_0x414976=_0xb6c354[0x0][_0x3a86cc(0x175)],_0x3bca74=buildJourneysArray(_0xb6c354),{merged:_0x478381,nameMapping:_0x4cf817}=consolidateSegmentsByContent(_0xb6c354[_0x3a86cc(0x15c)](_0x31deaf=>_0x31deaf[_0x3a86cc(0x175)][_0x3a86cc(0x16b)]),_0x270816);updateSegmentRefsInSegments(_0x478381,_0x4cf817);const _0x3011c3=Array[_0x3a86cc(0x171)](_0x4cf817['entries']())[_0x3a86cc(0x17a)](([_0x472341,_0x1032fe])=>_0x472341!==_0x1032fe&&_0x472341[_0x3a86cc(0x176)](_0x3a86cc(0x1a0)));let _0x386b5b=_0x478381,_0x1e3535=new Map();if(_0x3011c3){const _0x37a081=consolidateSegmentsByContent([_0x478381],_0x270816);_0x386b5b=_0x37a081[_0x3a86cc(0x1a6)],_0x1e3535=_0x37a081[_0x3a86cc(0x192)];}const _0x3de4a3=new Map(_0x4cf817);for(const [_0x33a877,_0x3ac897]of _0x1e3535[_0x3a86cc(0x19a)]()){_0x3de4a3[_0x3a86cc(0x195)](_0x33a877,_0x3ac897);}for(const [_0x1a4845,_0x813019]of _0x3de4a3['entries']()){let _0x5eaa02=_0x813019,_0x5851eb=0x0;while(_0x3de4a3['has'](_0x5eaa02)&&_0x3de4a3[_0x3a86cc(0x16e)](_0x5eaa02)!==_0x5eaa02&&_0x5851eb<MAX_MAPPING_CHAIN_DEPTH){_0x5eaa02=_0x3de4a3[_0x3a86cc(0x16e)](_0x5eaa02),_0x5851eb++;}_0x5eaa02!==_0x813019&&_0x3de4a3['set'](_0x1a4845,_0x5eaa02);}for(const _0x4f5cdd of _0x3bca74){updateSegmentReferences(_0x4f5cdd['stages'],_0x3de4a3);}const {merged:_0x3bedf8,nameMapping:_0x93c08a}=consolidateActivationsByContent(_0xb6c354[_0x3a86cc(0x15c)](_0x204a58=>_0x204a58[_0x3a86cc(0x175)][_0x3a86cc(0x18d)]));for(const _0x40b4de of _0x3bca74){updateActivationReferences(_0x40b4de[_0x3a86cc(0x19c)],_0x93c08a);}let _0x2c51cf=_0x414976[_0x3a86cc(0x18b)];if(_0x2c51cf?.[_0x3a86cc(0x172)]){const _0x1e6d9b=_0x3de4a3[_0x3a86cc(0x16e)](_0x2c51cf['segment']);_0x1e6d9b&&(_0x2c51cf={..._0x2c51cf,'segment':_0x1e6d9b});}for(const _0x5bbf53 of _0x3bca74){if(_0x5bbf53[_0x3a86cc(0x18b)]?.[_0x3a86cc(0x172)]){const _0x332fb3=_0x3de4a3[_0x3a86cc(0x16e)](_0x5bbf53[_0x3a86cc(0x18b)][_0x3a86cc(0x172)]);_0x332fb3&&(_0x5bbf53[_0x3a86cc(0x18b)]={..._0x5bbf53[_0x3a86cc(0x18b)],'segment':_0x332fb3});}}return{'type':_0x3a86cc(0x196),'name':_0x414976[_0x3a86cc(0x17b)],'description':_0x414976[_0x3a86cc(0x168)],'goal':_0x2c51cf,'reentry':_0x414976['reentry'],'segments':Object[_0x3a86cc(0x178)](_0x386b5b)[_0x3a86cc(0x174)]>0x0?_0x386b5b:undefined,'activations':Object[_0x3a86cc(0x178)](_0x3bedf8)[_0x3a86cc(0x174)]>0x0?_0x3bedf8:undefined,'journeys':_0x3bca74,'bundle_id':_0x414976[_0x3a86cc(0x163)],'bundle_name':_0x414976[_0x3a86cc(0x157)]};}export function createJumpTargetCache(){return new Map();}function a105_0x3fc7(_0x460c86,_0xb44c16){_0x460c86=_0x460c86-0x156;const _0x16f99f=a105_0x16f9();let _0x3fc7e3=_0x16f99f[_0x460c86];return _0x3fc7e3;}export async function resolveJumpTarget(_0x1be97a,_0x3a2ac8,_0x4b0d02,_0x43dfe0){const _0x3ab04b=a105_0x3fc7,_0x22c681=_0x1be97a+':'+_0x3a2ac8,_0x289a63=_0x4b0d02[_0x3ab04b(0x16e)](_0x22c681);if(_0x289a63)return _0x289a63;const _0x23f1f4=await _0x43dfe0(_0x1be97a),_0x1f0c4a=_0x23f1f4[_0x3ab04b(0x160)][_0x3ab04b(0x182)]||_0x23f1f4[_0x3ab04b(0x160)]['name'],_0x16a236=_0x23f1f4['attributes'][_0x3ab04b(0x166)]['find'](_0x296a78=>String(_0x296a78['id'])===String(_0x3a2ac8)),_0x5aeaad=_0x16a236?.['name']||_0x3a2ac8,_0xd177bf={'journeyName':_0x1f0c4a,'stageName':_0x5aeaad};return _0x4b0d02[_0x3ab04b(0x195)](_0x22c681,_0xd177bf),_0xd177bf;}export function formatApiJourneyName(_0x5cb814,_0x3d6529){return _0x3d6529+'\x20('+_0x5cb814+')';}export function isLocalJourneyRef(_0xe364b9){const _0x295657=a105_0x3fc7;return _0xe364b9['endsWith']('.yml')||_0xe364b9[_0x295657(0x170)](_0x295657(0x193));}export function buildLocalRuleToNameMapping(_0x159301){const _0x3801b3=a105_0x3fc7,_0x56f749=new Map();if(!_0x159301)return _0x56f749;for(const [_0x4937f7,_0x57324d]of Object[_0x3801b3(0x19a)](_0x159301)){if(_0x57324d[_0x3801b3(0x15f)]){const _0x4a569a=serializeRule(_0x57324d['rule']),_0x22ced6=_0x56f749[_0x3801b3(0x16e)](_0x4a569a)||[];_0x22ced6[_0x3801b3(0x189)](_0x4937f7),_0x56f749[_0x3801b3(0x195)](_0x4a569a,_0x22ced6);}}return _0x56f749;}export function buildLocalRuleToNameMappingFromJourney(_0xc5c20e){const _0x3ea8ab=a105_0x3fc7,_0x31dd17=_0xc5c20e[_0x3ea8ab(0x16b)];if(!_0x31dd17)return new Map();const _0x3f52c0=collectSegmentUsageCounts(_0xc5c20e),_0xa1dd98=new Map();let _0x330e4c=0x0;for(const [_0x2cde3b,_0x2f61de]of Object['entries'](_0x31dd17)){if(!_0x2f61de[_0x3ea8ab(0x15f)]){_0x330e4c++;continue;}const _0x239b31=serializeRule(_0x2f61de[_0x3ea8ab(0x15f)]),_0x2aae90=_0xa1dd98['get'](_0x239b31)||[];_0x2aae90[_0x3ea8ab(0x189)]({'name':_0x2cde3b,'index':_0x330e4c}),_0xa1dd98[_0x3ea8ab(0x195)](_0x239b31,_0x2aae90),_0x330e4c++;}const _0x1d254b=new Map();for(const [_0x272ab5,_0x6de06f]of _0xa1dd98){const _0x32b4ac=_0x6de06f[_0x3ea8ab(0x17c)]()[_0x3ea8ab(0x16a)]((_0x2475c1,_0x19a100)=>{const _0x2e36df=_0x3ea8ab,_0x332f61=_0x3f52c0[_0x2e36df(0x16e)](_0x2475c1['name'])||0x0,_0x4c7e03=_0x3f52c0['get'](_0x19a100[_0x2e36df(0x17b)])||0x0;if(_0x332f61!==_0x4c7e03)return _0x4c7e03-_0x332f61;return _0x2475c1['index']-_0x19a100[_0x2e36df(0x197)];})[_0x3ea8ab(0x15c)](_0x409f41=>_0x409f41['name']);_0x1d254b[_0x3ea8ab(0x195)](_0x272ab5,_0x32b4ac);}return _0x1d254b;}export function collectSegmentUsageCounts(_0xd94beb){const _0x91ca71=a105_0x3fc7,_0xf8b944=new Map(),_0x518e66=_0x1d5fea=>{const _0x278506=a105_0x3fc7;if(!_0x1d5fea)return;_0xf8b944[_0x278506(0x195)](_0x1d5fea,(_0xf8b944['get'](_0x1d5fea)||0x0)+0x1);},_0x112a27=_0x2fe812=>{const _0x2391e3=a105_0x3fc7;for(const _0x1e15ad of _0x2fe812){_0x518e66(_0x1e15ad['entry_criteria']?.['segment']);if(_0x1e15ad[_0x2391e3(0x1a1)])for(const _0x157429 of _0x1e15ad[_0x2391e3(0x1a1)]){_0x518e66(_0x157429[_0x2391e3(0x172)]);}_0x518e66(_0x1e15ad[_0x2391e3(0x18e)]?.[_0x2391e3(0x172)]);if(_0x1e15ad[_0x2391e3(0x1a3)])for(const _0x29229a of _0x1e15ad[_0x2391e3(0x1a3)]){if(_0x29229a['type']===_0x2391e3(0x194))for(const _0x55ddf5 of _0x29229a[_0x2391e3(0x188)][_0x2391e3(0x158)]){_0x518e66(_0x55ddf5[_0x2391e3(0x172)]);}else _0x29229a[_0x2391e3(0x187)]===_0x2391e3(0x183)&&_0x518e66(_0x29229a[_0x2391e3(0x188)][_0x2391e3(0x191)]?.[_0x2391e3(0x172)]);}}};_0x518e66(_0xd94beb[_0x91ca71(0x18b)]?.[_0x91ca71(0x172)]);if(_0xd94beb[_0x91ca71(0x184)])for(const _0x25c060 of _0xd94beb[_0x91ca71(0x184)]){_0x518e66(_0x25c060[_0x91ca71(0x18b)]?.[_0x91ca71(0x172)]),_0x112a27(_0x25c060[_0x91ca71(0x19c)]);}_0xd94beb[_0x91ca71(0x19c)]&&_0x112a27(_0xd94beb[_0x91ca71(0x19c)]);if(_0xd94beb[_0x91ca71(0x162)])for(const _0x3d9a20 of _0xd94beb['versions']){_0x112a27(_0x3d9a20[_0x91ca71(0x19c)]);}return _0xf8b944;}
1
+ (function(_0x50fbe5,_0x3c27ad){const _0x2fc5ea=a105_0x3624,_0x3737cf=_0x50fbe5();while(!![]){try{const _0x5b4d5b=-parseInt(_0x2fc5ea(0xda))/0x1*(parseInt(_0x2fc5ea(0xd7))/0x2)+-parseInt(_0x2fc5ea(0x9c))/0x3+-parseInt(_0x2fc5ea(0xa7))/0x4*(-parseInt(_0x2fc5ea(0xb0))/0x5)+-parseInt(_0x2fc5ea(0xbb))/0x6*(-parseInt(_0x2fc5ea(0xb3))/0x7)+-parseInt(_0x2fc5ea(0xe7))/0x8*(-parseInt(_0x2fc5ea(0xe3))/0x9)+-parseInt(_0x2fc5ea(0xa0))/0xa*(-parseInt(_0x2fc5ea(0xcb))/0xb)+-parseInt(_0x2fc5ea(0xd1))/0xc;if(_0x5b4d5b===_0x3c27ad)break;else _0x3737cf['push'](_0x3737cf['shift']());}catch(_0x478138){_0x3737cf['push'](_0x3737cf['shift']());}}}(a105_0x5ff2,0x6e1d0));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x1622d1){const _0x101e2f=a105_0x3624;return _0x1622d1[_0x101e2f(0xa2)]()['replace'](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')[_0x101e2f(0xa1)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x212518){const _0x436cfd=a105_0x3624,_0x337e42=_0x212518['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x337e42){const _0x23312e=_0x337e42[0x1][_0x436cfd(0xa2)](),_0x5533b2=_0x337e42[0x2],_0x4df179=_0x5533b2[_0x436cfd(0xa1)](/-/g,'')[_0x436cfd(0xde)](0x0,0x4)[_0x436cfd(0xa2)]();return _0x23312e+'_'+_0x4df179;}const _0x5ddbe5=_0x212518[_0x436cfd(0xd8)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5ddbe5){const _0x1445f4=_0x5ddbe5[0x1],_0x82003=_0x5ddbe5[0x2][_0x436cfd(0xa2)](),_0x2abfc1=_0x1445f4[_0x436cfd(0xa1)](/-/g,'')['slice'](0x0,0x4)['toLowerCase']();return _0x82003+'_'+_0x2abfc1;}return undefined;}function stableStringify(_0x183c01){const _0x312aae=a105_0x3624;if(Array[_0x312aae(0xb6)](_0x183c01))return'['+_0x183c01[_0x312aae(0xc9)](_0x4fb723=>stableStringify(_0x4fb723))[_0x312aae(0xbe)](',')+']';if(_0x183c01&&typeof _0x183c01===_0x312aae(0xbf)){const _0x1b9bc2=_0x183c01,_0x807ffe=Object[_0x312aae(0xae)](_0x1b9bc2)[_0x312aae(0xa9)](),_0x1f30b1=_0x807ffe[_0x312aae(0xc9)](_0x669d9b=>'\x22'+_0x669d9b+'\x22:'+stableStringify(_0x1b9bc2[_0x669d9b]));return'{'+_0x1f30b1[_0x312aae(0xbe)](',')+'}';}const _0x26f3e6=JSON[_0x312aae(0xbd)](_0x183c01);return _0x26f3e6===undefined?_0x312aae(0xe0):_0x26f3e6;}export function consolidateActivationsByContent(_0x5dec02){const _0x519bf1=a105_0x3624,_0x16bb87={},_0xd330a2=new Map(),_0xe11cc2=new Map();for(const _0x77db6f of _0x5dec02){if(!_0x77db6f)continue;for(const [_0x20990e,_0x4bfb52]of Object[_0x519bf1(0xd2)](_0x77db6f)){const _0x54fd44={'connection':_0x4bfb52[_0x519bf1(0xad)],..._0x4bfb52[_0x519bf1(0xdb)]!==undefined&&{'all_columns':_0x4bfb52[_0x519bf1(0xdb)]},..._0x4bfb52[_0x519bf1(0xdd)]!==undefined&&{'columns':_0x4bfb52[_0x519bf1(0xdd)]},..._0x4bfb52[_0x519bf1(0xb5)]!==undefined&&{'behavior':_0x4bfb52['behavior']},..._0x4bfb52[_0x519bf1(0x9a)]!==undefined&&{'schedule':_0x4bfb52[_0x519bf1(0x9a)]},..._0x4bfb52[_0x519bf1(0xa8)]!==undefined&&{'notification':_0x4bfb52[_0x519bf1(0xa8)]},..._0x4bfb52[_0x519bf1(0x9f)]!==undefined&&{'connector_config':_0x4bfb52[_0x519bf1(0x9f)]},..._0x4bfb52['activation_template_id']!==undefined&&{'activation_template_id':_0x4bfb52['activation_template_id']}},_0x32b62e=stableStringify(_0x54fd44),_0x156151=_0xe11cc2[_0x519bf1(0xc5)](_0x32b62e);_0x156151?_0xd330a2['set'](_0x20990e,_0x156151):(_0x16bb87[_0x20990e]=_0x4bfb52,_0xd330a2[_0x519bf1(0xbc)](_0x20990e,_0x20990e),_0xe11cc2[_0x519bf1(0xbc)](_0x32b62e,_0x20990e));}}return{'merged':_0x16bb87,'nameMapping':_0xd330a2};}function a105_0x5ff2(){const _0x5675dd=['reentry','push','5605453aLjObx','segments','behavior','isArray','description','include','wait','merged','6UmZbXj','set','stringify','join','object','exit_criteria','yaml','version','milestone','some','get','versionNumber','from','versions','map','steps','368203RfQEux','name','state','has','journeyBundleName','segment','8805732BPpDfV','entries','bundle_name','values','condition','activation','204708RUmEBq','match','trim','1yNJUfB','all_columns','goal','columns','slice','length','null','type','decision_point','9gXLENB','latest','version_number','item','14280XbtKKm','launched','with','stages','index','activations','schedule','find','720057wgPdMP','startsWith','conditions','connector_config','140OezZxq','replace','toLowerCase','attributes','exclude','entry_criteria','rule','1832hiujLW','notification','sort','journeys','bundle_id','endsWith','connection','keys','branches','2795mLPGwD'];a105_0x5ff2=function(){return _0x5675dd;};return a105_0x5ff2();}export function updateActivationReferences(_0x577b0d,_0x116e95){const _0x13aab5=a105_0x3624;if(!_0x577b0d)return;for(const _0x211a99 of _0x577b0d){if(!_0x211a99['steps'])continue;for(const _0x2e4301 of _0x211a99[_0x13aab5(0xca)]){if(_0x2e4301[_0x13aab5(0xe1)]==='activation'&&_0x2e4301[_0x13aab5(0xe9)]?.[_0x13aab5(0xd6)]){const _0x4c6161=_0x116e95[_0x13aab5(0xc5)](_0x2e4301['with'][_0x13aab5(0xd6)]);_0x4c6161&&_0x4c6161!==_0x2e4301[_0x13aab5(0xe9)][_0x13aab5(0xd6)]&&(_0x2e4301[_0x13aab5(0xe9)][_0x13aab5(0xd6)]=_0x4c6161);}}}}export function consolidateSegmentsByContent(_0x49f5a7,_0x14fa5a){const _0x335cee=a105_0x3624,_0x4968eb={},_0x2d47f9=new Map(),_0x5d9bb2=new Map();for(const _0x44479e of _0x49f5a7){if(!_0x44479e)continue;for(const [_0xc85500,_0x16a9a4]of Object[_0x335cee(0xd2)](_0x44479e)){if(!_0x16a9a4[_0x335cee(0xa6)]){_0x4968eb[_0xc85500]=_0x16a9a4,_0x2d47f9[_0x335cee(0xbc)](_0xc85500,_0xc85500);continue;}const _0x3b2c04=_0x16a9a4[_0x335cee(0xb7)]&&_0x16a9a4[_0x335cee(0xb7)][_0x335cee(0xd9)]()?_0x16a9a4[_0x335cee(0xb7)]:undefined,_0x4772c2=JSON[_0x335cee(0xbd)]({'description':_0x3b2c04,'rule':deepSortObject(_0x16a9a4[_0x335cee(0xa6)])}),_0x343aac=_0x5d9bb2[_0x335cee(0xc5)](_0x4772c2);if(_0x343aac){const _0x5a199e={..._0x16a9a4[_0x335cee(0xb7)]!==undefined&&{'description':_0x16a9a4[_0x335cee(0xb7)]},'rule':_0x16a9a4[_0x335cee(0xa6)]?deepSortObject(_0x16a9a4['rule']):_0x16a9a4[_0x335cee(0xa6)]};if(_0xc85500<_0x343aac){_0x4968eb[_0xc85500]=_0x5a199e,delete _0x4968eb[_0x343aac];for(const [_0x1b540d,_0x4bbb30]of _0x2d47f9[_0x335cee(0xd2)]()){_0x4bbb30===_0x343aac&&_0x2d47f9['set'](_0x1b540d,_0xc85500);}_0x2d47f9['set'](_0xc85500,_0xc85500),_0x5d9bb2['set'](_0x4772c2,_0xc85500);}else _0x4968eb[_0x343aac]=_0x5a199e,_0x2d47f9[_0x335cee(0xbc)](_0xc85500,_0x343aac);}else{let _0x37f631=_0xc85500;if(_0x14fa5a){const _0x54f4d2=_0x14fa5a[_0x335cee(0xc5)](_0x4772c2);_0x54f4d2&&_0x54f4d2[_0x335cee(0xdf)]>0x0&&(_0x37f631=_0x54f4d2['slice']()[_0x335cee(0xa9)]()[0x0]);}const _0x3d7699={..._0x16a9a4[_0x335cee(0xb7)]!==undefined&&{'description':_0x16a9a4[_0x335cee(0xb7)]},'rule':_0x16a9a4[_0x335cee(0xa6)]?deepSortObject(_0x16a9a4[_0x335cee(0xa6)]):_0x16a9a4[_0x335cee(0xa6)]};_0x4968eb[_0x37f631]=_0x3d7699,_0x2d47f9[_0x335cee(0xbc)](_0xc85500,_0x37f631),_0x5d9bb2[_0x335cee(0xbc)](_0x4772c2,_0x37f631);}}}return{'merged':_0x4968eb,'nameMapping':_0x2d47f9};}export function updateSegmentReferences(_0x1c50b5,_0x5bf697){const _0x4cb3d2=a105_0x3624;if(!_0x1c50b5)return;for(const _0x6ce259 of _0x1c50b5){if(_0x6ce259['entry_criteria']?.[_0x4cb3d2(0xd0)]){const _0x2cc3ad=_0x5bf697[_0x4cb3d2(0xc5)](_0x6ce259[_0x4cb3d2(0xa5)][_0x4cb3d2(0xd0)]);_0x2cc3ad&&(_0x6ce259['entry_criteria']['segment']=_0x2cc3ad);}if(_0x6ce259[_0x4cb3d2(0xca)])for(const _0x3cceaf of _0x6ce259[_0x4cb3d2(0xca)]){if(_0x3cceaf[_0x4cb3d2(0xe1)]===_0x4cb3d2(0xe2)&&_0x3cceaf[_0x4cb3d2(0xe9)]?.[_0x4cb3d2(0xaf)])for(const _0x537d1d of _0x3cceaf[_0x4cb3d2(0xe9)][_0x4cb3d2(0xaf)]){if(_0x537d1d[_0x4cb3d2(0xd0)]){const _0x2c4fb9=_0x5bf697[_0x4cb3d2(0xc5)](_0x537d1d[_0x4cb3d2(0xd0)]);_0x2c4fb9&&(_0x537d1d[_0x4cb3d2(0xd0)]=_0x2c4fb9);}}}}}export function updateSegmentRefsInSegments(_0x4c0877,_0x549326){const _0x32b7dd=a105_0x3624;for(const _0x24b945 of Object[_0x32b7dd(0xd4)](_0x4c0877)){_0x24b945['rule']&&updateSegmentRefsInRule(_0x24b945['rule'],_0x549326);}}function updateSegmentRefsInRule(_0xc4621,_0x118249){const _0x5cfc26=a105_0x3624;if(_0xc4621===null||typeof _0xc4621!==_0x5cfc26(0xbf))return;if(Array['isArray'](_0xc4621)){for(const _0x33a2c6 of _0xc4621){updateSegmentRefsInRule(_0x33a2c6,_0x118249);}return;}const _0x192ade=_0xc4621;if((_0x192ade['type']===_0x5cfc26(0xb8)||_0x192ade[_0x5cfc26(0xe1)]===_0x5cfc26(0xa4))&&typeof _0x192ade[_0x5cfc26(0xd0)]==='string'){const _0x28574e=_0x118249['get'](_0x192ade[_0x5cfc26(0xd0)]);_0x28574e&&(_0x192ade[_0x5cfc26(0xd0)]=_0x28574e);}if(_0x192ade[_0x5cfc26(0x9e)]&&Array[_0x5cfc26(0xb6)](_0x192ade[_0x5cfc26(0x9e)]))for(const _0x253f6f of _0x192ade[_0x5cfc26(0x9e)]){updateSegmentRefsInRule(_0x253f6f,_0x118249);}}export function buildJourneysArray(_0x189cb4){const _0x19336c=a105_0x3624,_0x4776df=Math['max'](..._0x189cb4[_0x19336c(0xc9)](_0x1f2a4c=>_0x1f2a4c[_0x19336c(0xe6)][_0x19336c(0xc6)]||0x0));return _0x189cb4[_0x19336c(0xc9)](_0xa779e8=>{const _0x2f570f=_0x19336c,_0x582d8d=(_0xa779e8['item']['versionNumber']||0x0)===_0x4776df,_0x13212d=_0xa779e8['yaml'][_0x2f570f(0xaa)]?.[0x0],_0x4740ad={'version':_0x13212d?.[_0x2f570f(0xc2)]||_0xa779e8['yaml'][_0x2f570f(0xc2)]||_0xa779e8[_0x2f570f(0xe6)][_0x2f570f(0xcc)],'state':_0xa779e8['item'][_0x2f570f(0xcd)]==='launched'?_0x2f570f(0xe8):'draft','stages':_0x13212d?.['stages']||_0xa779e8['yaml'][_0x2f570f(0x97)]||[],'id':_0x13212d?.['id']||_0xa779e8[_0x2f570f(0xc1)]['id'],'version_number':_0x13212d?.[_0x2f570f(0xe5)]||_0xa779e8[_0x2f570f(0xc1)]['version_number']};return _0x582d8d&&(_0x4740ad[_0x2f570f(0xe4)]=!![]),_0x4740ad;});}export function buildMergedJourneyDef(_0x3d61ec,_0x399d68){const _0x32c3e9=a105_0x3624,_0x39b4cc=_0x3d61ec[0x0][_0x32c3e9(0xc1)],_0x4d3398=buildJourneysArray(_0x3d61ec),{merged:_0x1daa44,nameMapping:_0x3131c}=consolidateSegmentsByContent(_0x3d61ec[_0x32c3e9(0xc9)](_0x4ed8a3=>_0x4ed8a3[_0x32c3e9(0xc1)][_0x32c3e9(0xb4)]),_0x399d68);updateSegmentRefsInSegments(_0x1daa44,_0x3131c);const _0x3a0747=Array[_0x32c3e9(0xc7)](_0x3131c[_0x32c3e9(0xd2)]())[_0x32c3e9(0xc4)](([_0x383a5f,_0x4ef7ed])=>_0x383a5f!==_0x4ef7ed&&_0x383a5f[_0x32c3e9(0x9d)](_0x32c3e9(0xa5)));let _0x4293ad=_0x1daa44,_0x3e5d29=new Map();if(_0x3a0747){const _0x3b4a92=consolidateSegmentsByContent([_0x1daa44],_0x399d68);_0x4293ad=_0x3b4a92[_0x32c3e9(0xba)],_0x3e5d29=_0x3b4a92['nameMapping'];}const _0x15649d=new Map(_0x3131c);for(const [_0x3d5763,_0x2fee35]of _0x3e5d29[_0x32c3e9(0xd2)]()){_0x15649d[_0x32c3e9(0xbc)](_0x3d5763,_0x2fee35);}for(const [_0x37f176,_0x863560]of _0x15649d[_0x32c3e9(0xd2)]()){let _0x1e914f=_0x863560,_0x4316d7=0x0;while(_0x15649d[_0x32c3e9(0xce)](_0x1e914f)&&_0x15649d[_0x32c3e9(0xc5)](_0x1e914f)!==_0x1e914f&&_0x4316d7<MAX_MAPPING_CHAIN_DEPTH){_0x1e914f=_0x15649d[_0x32c3e9(0xc5)](_0x1e914f),_0x4316d7++;}_0x1e914f!==_0x863560&&_0x15649d['set'](_0x37f176,_0x1e914f);}for(const _0x5b8f9a of _0x4d3398){updateSegmentReferences(_0x5b8f9a[_0x32c3e9(0x97)],_0x15649d);}const {merged:_0x3ed942,nameMapping:_0x3d8f74}=consolidateActivationsByContent(_0x3d61ec[_0x32c3e9(0xc9)](_0x324463=>_0x324463[_0x32c3e9(0xc1)][_0x32c3e9(0x99)]));for(const _0x46dbc8 of _0x4d3398){updateActivationReferences(_0x46dbc8[_0x32c3e9(0x97)],_0x3d8f74);}let _0x465a4b=_0x39b4cc[_0x32c3e9(0xdc)];if(_0x465a4b?.[_0x32c3e9(0xd0)]){const _0x4951e0=_0x15649d[_0x32c3e9(0xc5)](_0x465a4b[_0x32c3e9(0xd0)]);_0x4951e0&&(_0x465a4b={..._0x465a4b,'segment':_0x4951e0});}for(const _0xe658aa of _0x4d3398){if(_0xe658aa[_0x32c3e9(0xdc)]?.[_0x32c3e9(0xd0)]){const _0x151bfc=_0x15649d[_0x32c3e9(0xc5)](_0xe658aa[_0x32c3e9(0xdc)][_0x32c3e9(0xd0)]);_0x151bfc&&(_0xe658aa['goal']={..._0xe658aa[_0x32c3e9(0xdc)],'segment':_0x151bfc});}}return{'type':'journey','name':_0x39b4cc['name'],'description':_0x39b4cc[_0x32c3e9(0xb7)],'goal':_0x465a4b,'reentry':_0x39b4cc[_0x32c3e9(0xb1)],'segments':Object[_0x32c3e9(0xae)](_0x4293ad)[_0x32c3e9(0xdf)]>0x0?_0x4293ad:undefined,'activations':Object[_0x32c3e9(0xae)](_0x3ed942)[_0x32c3e9(0xdf)]>0x0?_0x3ed942:undefined,'journeys':_0x4d3398,'bundle_id':_0x39b4cc[_0x32c3e9(0xab)],'bundle_name':_0x39b4cc[_0x32c3e9(0xd3)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x49c320,_0x1be8ed,_0x30f514,_0x540a4e){const _0x31507e=a105_0x3624,_0x14de9b=_0x49c320+':'+_0x1be8ed,_0x3d6f16=_0x30f514[_0x31507e(0xc5)](_0x14de9b);if(_0x3d6f16)return _0x3d6f16;const _0x114522=await _0x540a4e(_0x49c320),_0x19c1b1=_0x114522[_0x31507e(0xa3)][_0x31507e(0xcf)]||_0x114522[_0x31507e(0xa3)][_0x31507e(0xcc)],_0x5cf039=_0x114522['attributes']['journeyStages'][_0x31507e(0x9b)](_0x3938f9=>String(_0x3938f9['id'])===String(_0x1be8ed)),_0xd7106c=_0x5cf039?.[_0x31507e(0xcc)]||_0x1be8ed,_0x4789af={'journeyName':_0x19c1b1,'stageName':_0xd7106c};return _0x30f514[_0x31507e(0xbc)](_0x14de9b,_0x4789af),_0x4789af;}export function formatApiJourneyName(_0x5743c7,_0x30b652){return _0x30b652+'\x20('+_0x5743c7+')';}export function isLocalJourneyRef(_0x5418ce){const _0x440d60=a105_0x3624;return _0x5418ce[_0x440d60(0xac)]('.yml')||_0x5418ce[_0x440d60(0xac)]('.yaml');}export function buildLocalRuleToNameMapping(_0x2221c5){const _0x2761aa=a105_0x3624,_0x22856e=new Map();if(!_0x2221c5)return _0x22856e;for(const [_0x271437,_0x50f80f]of Object[_0x2761aa(0xd2)](_0x2221c5)){if(_0x50f80f[_0x2761aa(0xa6)]){const _0x1ee086=serializeRule(_0x50f80f[_0x2761aa(0xa6)]),_0x48ad5c=_0x22856e[_0x2761aa(0xc5)](_0x1ee086)||[];_0x48ad5c[_0x2761aa(0xb2)](_0x271437),_0x22856e['set'](_0x1ee086,_0x48ad5c);}}return _0x22856e;}function a105_0x3624(_0x2156eb,_0x26bcfa){_0x2156eb=_0x2156eb-0x97;const _0x5ff2fe=a105_0x5ff2();let _0x3624be=_0x5ff2fe[_0x2156eb];return _0x3624be;}export function buildLocalRuleToNameMappingFromJourney(_0x57a689){const _0x15e84f=a105_0x3624,_0x5761f4=_0x57a689[_0x15e84f(0xb4)];if(!_0x5761f4)return new Map();const _0x2671ea=collectSegmentUsageCounts(_0x57a689),_0x340efe=new Map();let _0x5d947e=0x0;for(const [_0x4cc76f,_0x4a621d]of Object[_0x15e84f(0xd2)](_0x5761f4)){if(!_0x4a621d[_0x15e84f(0xa6)]){_0x5d947e++;continue;}const _0x4e8f26=serializeRule(_0x4a621d['rule']),_0xf97490=_0x340efe['get'](_0x4e8f26)||[];_0xf97490['push']({'name':_0x4cc76f,'index':_0x5d947e}),_0x340efe[_0x15e84f(0xbc)](_0x4e8f26,_0xf97490),_0x5d947e++;}const _0x1de858=new Map();for(const [_0x20fd56,_0xe695dc]of _0x340efe){const _0x3ee76=_0xe695dc[_0x15e84f(0xde)]()[_0x15e84f(0xa9)]((_0x29e6bb,_0x1cf107)=>{const _0x4e98f8=_0x15e84f,_0x1ed20c=_0x2671ea[_0x4e98f8(0xc5)](_0x29e6bb[_0x4e98f8(0xcc)])||0x0,_0x4ced0e=_0x2671ea[_0x4e98f8(0xc5)](_0x1cf107[_0x4e98f8(0xcc)])||0x0;if(_0x1ed20c!==_0x4ced0e)return _0x4ced0e-_0x1ed20c;return _0x29e6bb[_0x4e98f8(0x98)]-_0x1cf107[_0x4e98f8(0x98)];})[_0x15e84f(0xc9)](_0x585b82=>_0x585b82[_0x15e84f(0xcc)]);_0x1de858[_0x15e84f(0xbc)](_0x20fd56,_0x3ee76);}return _0x1de858;}export function collectSegmentUsageCounts(_0x4697c){const _0xba4e2e=a105_0x3624,_0x298e4c=new Map(),_0x11fd2f=_0x4ce26b=>{const _0x20a7c1=a105_0x3624;if(!_0x4ce26b)return;_0x298e4c[_0x20a7c1(0xbc)](_0x4ce26b,(_0x298e4c[_0x20a7c1(0xc5)](_0x4ce26b)||0x0)+0x1);},_0x2ae850=_0x29d2bb=>{const _0x1e6518=a105_0x3624;for(const _0x29ee16 of _0x29d2bb){_0x11fd2f(_0x29ee16[_0x1e6518(0xa5)]?.[_0x1e6518(0xd0)]);if(_0x29ee16[_0x1e6518(0xc0)])for(const _0x387eb1 of _0x29ee16['exit_criteria']){_0x11fd2f(_0x387eb1[_0x1e6518(0xd0)]);}_0x11fd2f(_0x29ee16[_0x1e6518(0xc3)]?.[_0x1e6518(0xd0)]);if(_0x29ee16[_0x1e6518(0xca)])for(const _0x233e51 of _0x29ee16[_0x1e6518(0xca)]){if(_0x233e51[_0x1e6518(0xe1)]==='decision_point')for(const _0x35aa67 of _0x233e51['with']['branches']){_0x11fd2f(_0x35aa67[_0x1e6518(0xd0)]);}else _0x233e51[_0x1e6518(0xe1)]===_0x1e6518(0xb9)&&_0x11fd2f(_0x233e51[_0x1e6518(0xe9)][_0x1e6518(0xd5)]?.[_0x1e6518(0xd0)]);}}};_0x11fd2f(_0x4697c['goal']?.[_0xba4e2e(0xd0)]);if(_0x4697c[_0xba4e2e(0xaa)])for(const _0x11311c of _0x4697c[_0xba4e2e(0xaa)]){_0x11fd2f(_0x11311c[_0xba4e2e(0xdc)]?.[_0xba4e2e(0xd0)]),_0x2ae850(_0x11311c[_0xba4e2e(0x97)]);}_0x4697c[_0xba4e2e(0x97)]&&_0x2ae850(_0x4697c['stages']);if(_0x4697c[_0xba4e2e(0xc8)])for(const _0xf28431 of _0x4697c[_0xba4e2e(0xc8)]){_0x2ae850(_0xf28431[_0xba4e2e(0x97)]);}return _0x298e4c;}