@treasuredata/tdx 0.25.0 → 0.25.2

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 (163) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/prompt.js +1 -1
  157. package/dist/utils/spinner.js +1 -1
  158. package/dist/utils/sse-parser.js +1 -1
  159. package/dist/utils/string-utils.js +1 -1
  160. package/dist/utils/table-ref-parser.js +1 -1
  161. package/dist/utils/tdx-logger.js +1 -1
  162. package/dist/utils/version-check.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x21dc51,_0x304188){const _0x3d7b7c=a100_0x484d,_0xaa9871=_0x21dc51();while(!![]){try{const _0xdc4700=-parseInt(_0x3d7b7c(0xfb))/0x1+parseInt(_0x3d7b7c(0x109))/0x2+-parseInt(_0x3d7b7c(0x104))/0x3*(parseInt(_0x3d7b7c(0xfd))/0x4)+-parseInt(_0x3d7b7c(0x112))/0x5+parseInt(_0x3d7b7c(0x113))/0x6+-parseInt(_0x3d7b7c(0x10d))/0x7+parseInt(_0x3d7b7c(0x105))/0x8*(parseInt(_0x3d7b7c(0x102))/0x9);if(_0xdc4700===_0x304188)break;else _0xaa9871['push'](_0xaa9871['shift']());}catch(_0x44f937){_0xaa9871['push'](_0xaa9871['shift']());}}}(a100_0x21d1,0x41bea));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x488e1b){const _0x3e38d9=a100_0x484d;let _0x4f0ad7=_0x488e1b[_0x3e38d9(0x111)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x4f0ad7=_0x4f0ad7[_0x3e38d9(0x111)](/--.*$/gm,''),_0x4f0ad7[_0x3e38d9(0x10f)]();}function a100_0x21d1(){const _0x3ed78a=['toLowerCase','stdin','message','Content\x20contains\x20no\x20SQL\x20statements','map','382072XxObDO','code','358244yQVLfQ','length','stdin\x20','close','File\x20\x27','9gYWnPr','line','15ybvYly','11261016oyKaZl','filter','EACCES','isTTY','148882XFmMRs','ENOENT','utf-8','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','2925797dgeWyv','\x27\x20not\x20found','trim','Permission\x20denied\x20reading\x20file\x20\x27','replace','1200350pYzhYE','1650840uexMZZ','test','push'];a100_0x21d1=function(){return _0x3ed78a;};return a100_0x21d1();}function isEscaped(_0x2cff6b,_0x9f8832){let _0x6997e1=0x0;for(let _0x4c57ad=_0x9f8832-0x1;_0x4c57ad>=0x0&&_0x2cff6b[_0x4c57ad]==='\x5c';_0x4c57ad--){_0x6997e1++;}return _0x6997e1%0x2===0x1;}export function splitSqlStatements(_0x4c3b69){const _0x1d9a75=a100_0x484d,_0x5d3cc2=stripSqlComments(_0x4c3b69);if(!_0x5d3cc2)throw new Error(_0x1d9a75(0x119));const _0x4c83a7=[];let _0x20dd39='',_0x43031f=![],_0x554bfd=![],_0x4a3f97=![];for(let _0x34d909=0x0;_0x34d909<_0x4c3b69[_0x1d9a75(0xfe)];_0x34d909++){const _0x77d1bb=_0x4c3b69[_0x34d909];if(_0x77d1bb==='\x27'&&!isEscaped(_0x4c3b69,_0x34d909)&&!_0x554bfd&&!_0x4a3f97)_0x43031f=!_0x43031f;else{if(_0x77d1bb==='\x22'&&!isEscaped(_0x4c3b69,_0x34d909)&&!_0x43031f&&!_0x4a3f97)_0x554bfd=!_0x554bfd;else _0x77d1bb==='`'&&!isEscaped(_0x4c3b69,_0x34d909)&&!_0x43031f&&!_0x554bfd&&(_0x4a3f97=!_0x4a3f97);}if(_0x77d1bb===';'&&!_0x43031f&&!_0x554bfd&&!_0x4a3f97){const _0x5c724a=_0x20dd39['trim']();_0x5c724a&&_0x4c83a7[_0x1d9a75(0x115)](_0x5c724a),_0x20dd39='';}else _0x20dd39+=_0x77d1bb;}const _0x1fc76e=_0x20dd39[_0x1d9a75(0x10f)]();_0x1fc76e&&_0x4c83a7['push'](_0x1fc76e);const _0x20f097=_0x4c83a7[_0x1d9a75(0xfa)](_0x47d63e=>_0x47d63e[_0x1d9a75(0x10f)]())[_0x1d9a75(0x106)](_0x5e92a1=>{const _0x5ca76b=stripSqlComments(_0x5e92a1);return _0x5ca76b['length']>0x0;});if(_0x20f097[_0x1d9a75(0xfe)]===0x0)throw new Error(_0x1d9a75(0x119));return _0x20f097;}export function readFileContent(_0x1ec47a){const _0x4075a1=a100_0x484d;try{return readFileSync(_0x1ec47a,_0x4075a1(0x10b));}catch(_0x39259b){const _0x22863c=_0x39259b[_0x4075a1(0xfc)];if(_0x22863c===_0x4075a1(0x10a))throw new Error('File\x20\x27'+_0x1ec47a+_0x4075a1(0x10e));else{if(_0x22863c===_0x4075a1(0x107))throw new Error(_0x4075a1(0x110)+_0x1ec47a+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x1ec47a+'\x27:\x20'+_0x39259b[_0x4075a1(0x118)]);}}}export function readSqlStatementsFromFile(_0x5ae43a){const _0x14ee78=a100_0x484d,_0x1dce04=readFileContent(_0x5ae43a);try{return splitSqlStatements(_0x1dce04);}catch(_0x4ef5a9){throw new Error(_0x14ee78(0x101)+_0x5ae43a+'\x27\x20'+_0x4ef5a9[_0x14ee78(0x118)][_0x14ee78(0x116)]());}}export async function readStdinContent(){const _0x4a5323=a100_0x484d;if(process[_0x4a5323(0x117)][_0x4a5323(0x108)])throw new Error(_0x4a5323(0x10c));return new Promise((_0x8755d4,_0x3d99fd)=>{const _0x258352=_0x4a5323,_0x2591a5=[],_0x396179=createInterface({'input':process['stdin'],'terminal':![]});_0x396179['on'](_0x258352(0x103),_0x18adcf=>{const _0xfbb49c=_0x258352;_0x2591a5[_0xfbb49c(0x115)](_0x18adcf);}),_0x396179['on'](_0x258352(0x100),()=>{_0x8755d4(_0x2591a5['join']('\x0a'));}),_0x396179['on']('error',_0x5c3d9f=>{const _0x19ea23=_0x258352;_0x396179['close'](),_0x3d99fd(new Error('Error\x20reading\x20from\x20stdin:\x20'+_0x5c3d9f[_0x19ea23(0x118)]));});});}function a100_0x484d(_0x4854cf,_0x1f038e){_0x4854cf=_0x4854cf-0xfa;const _0x21d122=a100_0x21d1();let _0x484d1a=_0x21d122[_0x4854cf];return _0x484d1a;}export async function readSqlStatementsFromStdin(){const _0x1e9299=a100_0x484d,_0x401c81=await readStdinContent();try{return splitSqlStatements(_0x401c81);}catch(_0x9a787f){throw new Error(_0x1e9299(0xff)+_0x9a787f['message']['toLowerCase']());}}export function isSqlFilePath(_0x3c3cca){const _0x59412=a100_0x484d;return/\w\.sql$/[_0x59412(0x114)](_0x3c3cca);}
1
+ (function(_0x5a4e20,_0x2c0490){const _0x10376b=a100_0x2505,_0x4a8773=_0x5a4e20();while(!![]){try{const _0x560e47=parseInt(_0x10376b(0x124))/0x1*(parseInt(_0x10376b(0x12f))/0x2)+-parseInt(_0x10376b(0x142))/0x3*(-parseInt(_0x10376b(0x130))/0x4)+-parseInt(_0x10376b(0x125))/0x5+parseInt(_0x10376b(0x12d))/0x6*(parseInt(_0x10376b(0x129))/0x7)+parseInt(_0x10376b(0x136))/0x8*(parseInt(_0x10376b(0x12e))/0x9)+parseInt(_0x10376b(0x137))/0xa+-parseInt(_0x10376b(0x121))/0xb*(parseInt(_0x10376b(0x138))/0xc);if(_0x560e47===_0x2c0490)break;else _0x4a8773['push'](_0x4a8773['shift']());}catch(_0x5f3211){_0x4a8773['push'](_0x4a8773['shift']());}}}(a100_0x4d51,0xb126a));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x367459){const _0x54f3ea=a100_0x2505;let _0x30ce6a=_0x367459[_0x54f3ea(0x127)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x30ce6a=_0x30ce6a[_0x54f3ea(0x127)](/--.*$/gm,''),_0x30ce6a[_0x54f3ea(0x13d)]();}function isEscaped(_0x5badf5,_0x48ad54){let _0x457aad=0x0;for(let _0x257d9f=_0x48ad54-0x1;_0x257d9f>=0x0&&_0x5badf5[_0x257d9f]==='\x5c';_0x257d9f--){_0x457aad++;}return _0x457aad%0x2===0x1;}export function splitSqlStatements(_0x583045){const _0x24163b=a100_0x2505,_0x169ba6=stripSqlComments(_0x583045);if(!_0x169ba6)throw new Error(_0x24163b(0x132));const _0x42a114=[];let _0x203d41='',_0x4e3338=![],_0x52eceb=![],_0x4be53a=![];for(let _0x4696a1=0x0;_0x4696a1<_0x583045[_0x24163b(0x12a)];_0x4696a1++){const _0x45ba9b=_0x583045[_0x4696a1];if(_0x45ba9b==='\x27'&&!isEscaped(_0x583045,_0x4696a1)&&!_0x52eceb&&!_0x4be53a)_0x4e3338=!_0x4e3338;else{if(_0x45ba9b==='\x22'&&!isEscaped(_0x583045,_0x4696a1)&&!_0x4e3338&&!_0x4be53a)_0x52eceb=!_0x52eceb;else _0x45ba9b==='`'&&!isEscaped(_0x583045,_0x4696a1)&&!_0x4e3338&&!_0x52eceb&&(_0x4be53a=!_0x4be53a);}if(_0x45ba9b===';'&&!_0x4e3338&&!_0x52eceb&&!_0x4be53a){const _0x15a925=_0x203d41[_0x24163b(0x13d)]();_0x15a925&&_0x42a114[_0x24163b(0x133)](_0x15a925),_0x203d41='';}else _0x203d41+=_0x45ba9b;}const _0x44a100=_0x203d41[_0x24163b(0x13d)]();_0x44a100&&_0x42a114[_0x24163b(0x133)](_0x44a100);const _0x483f51=_0x42a114['map'](_0x3a9b3b=>_0x3a9b3b[_0x24163b(0x13d)]())[_0x24163b(0x126)](_0x5a7892=>{const _0xa2ab75=stripSqlComments(_0x5a7892);return _0xa2ab75['length']>0x0;});if(_0x483f51[_0x24163b(0x12a)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x483f51;}export function readFileContent(_0x53f574){const _0x574e41=a100_0x2505;try{return readFileSync(_0x53f574,_0x574e41(0x141));}catch(_0x567032){const _0x3f5973=_0x567032[_0x574e41(0x12b)];if(_0x3f5973===_0x574e41(0x13b))throw new Error(_0x574e41(0x131)+_0x53f574+_0x574e41(0x139));else{if(_0x3f5973==='EACCES')throw new Error(_0x574e41(0x13c)+_0x53f574+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x53f574+_0x574e41(0x12c)+_0x567032[_0x574e41(0x122)]);}}}export function readSqlStatementsFromFile(_0x3942c1){const _0x527024=a100_0x2505,_0x50d210=readFileContent(_0x3942c1);try{return splitSqlStatements(_0x50d210);}catch(_0x2a0145){throw new Error(_0x527024(0x131)+_0x3942c1+'\x27\x20'+_0x2a0145[_0x527024(0x122)][_0x527024(0x123)]());}}function a100_0x4d51(){const _0x5dd2dd=['length','code','\x27:\x20','100602ZQEUBM','8939358YhgwhO','866958YyYjqX','4njFTub','File\x20\x27','Content\x20contains\x20no\x20SQL\x20statements','push','error','Error\x20reading\x20from\x20stdin:\x20','8djazFH','5202840zNIcWj','17855688kjQbuZ','\x27\x20not\x20found','test','ENOENT','Permission\x20denied\x20reading\x20file\x20\x27','trim','stdin\x20','line','close','utf-8','3150033rAFgii','11dxtwii','message','toLowerCase','1vLGzkM','5342455HheyuA','filter','replace','stdin','119oFLtSk'];a100_0x4d51=function(){return _0x5dd2dd;};return a100_0x4d51();}export async function readStdinContent(){const _0x219c5b=a100_0x2505;if(process[_0x219c5b(0x128)]['isTTY'])throw new Error('No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-');return new Promise((_0x4d615e,_0x277bad)=>{const _0x1fab30=_0x219c5b,_0x213ece=[],_0x21a508=createInterface({'input':process[_0x1fab30(0x128)],'terminal':![]});_0x21a508['on'](_0x1fab30(0x13f),_0x17abd8=>{const _0x22f7f6=_0x1fab30;_0x213ece[_0x22f7f6(0x133)](_0x17abd8);}),_0x21a508['on']('close',()=>{_0x4d615e(_0x213ece['join']('\x0a'));}),_0x21a508['on'](_0x1fab30(0x134),_0x3b0f17=>{const _0xe2737c=_0x1fab30;_0x21a508[_0xe2737c(0x140)](),_0x277bad(new Error(_0xe2737c(0x135)+_0x3b0f17[_0xe2737c(0x122)]));});});}function a100_0x2505(_0x56e402,_0x29a960){_0x56e402=_0x56e402-0x121;const _0x4d51f6=a100_0x4d51();let _0x25050c=_0x4d51f6[_0x56e402];return _0x25050c;}export async function readSqlStatementsFromStdin(){const _0xbcc0d2=a100_0x2505,_0xeccb5b=await readStdinContent();try{return splitSqlStatements(_0xeccb5b);}catch(_0x276c25){throw new Error(_0xbcc0d2(0x13e)+_0x276c25[_0xbcc0d2(0x122)][_0xbcc0d2(0x123)]());}}export function isSqlFilePath(_0x3c34b1){const _0x3467a1=a100_0x2505;return/\w\.sql$/[_0x3467a1(0x13a)](_0x3c34b1);}
@@ -1 +1 @@
1
- const a101_0x241ae3=a101_0x2a57;function a101_0x36c8(){const _0xce1781=['replace','delete','listSchedules','test','Query\x20is\x20required','queries','deleteSchedule','limit','client','created_at','NOT_FOUND','\x5c$&','string','\x20UTC','filter','push','356476XbawCa','Type\x20is\x20required','length','history','runSchedule','desc','pagination','1993149kFvkko','cron','update','num\x20must\x20be\x20between\x201\x20and\x2010','8yfGMsz','name','query','6esLofj','scheduled','find','show','type','5uubnlF','4096780lLVtha','65034dfMyZR','map','getScheduleHistory','11cdFQZo','1890427EncQtf','pattern','updateSchedule','slice','end_at','createSchedule','num','updated_at','Schedule\x20name\x20is\x20required','time','14680932xSdsqI','now','start_at','create','40gieieJ','Schedule\x20not\x20found:\x20','412086umlfQQ','Database\x20is\x20required','INVALID_ARGUMENT'];a101_0x36c8=function(){return _0xce1781;};return a101_0x36c8();}(function(_0x527f45,_0x7e9502){const _0x4a078c=a101_0x2a57,_0x71b4e0=_0x527f45();while(!![]){try{const _0x5904b0=-parseInt(_0x4a078c(0x13b))/0x1+parseInt(_0x4a078c(0x139))/0x2*(parseInt(_0x4a078c(0x163))/0x3)+-parseInt(_0x4a078c(0x14e))/0x4*(parseInt(_0x4a078c(0x161))/0x5)+parseInt(_0x4a078c(0x15c))/0x6*(-parseInt(_0x4a078c(0x12b))/0x7)+parseInt(_0x4a078c(0x159))/0x8*(-parseInt(_0x4a078c(0x155))/0x9)+-parseInt(_0x4a078c(0x162))/0xa+parseInt(_0x4a078c(0x12a))/0xb*(parseInt(_0x4a078c(0x135))/0xc);if(_0x5904b0===_0x7e9502)break;else _0x71b4e0['push'](_0x71b4e0['shift']());}catch(_0x63f480){_0x71b4e0['push'](_0x71b4e0['shift']());}}}(a101_0x36c8,0x3e266));function a101_0x2a57(_0x38f7c2,_0x350e02){_0x38f7c2=_0x38f7c2-0x128;const _0x36c8fc=a101_0x36c8();let _0x2a57a9=_0x36c8fc[_0x38f7c2];return _0x2a57a9;}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0xdbcc3a){const _0x41cfc0=a101_0x2a57;if(!_0xdbcc3a)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x41cfc0(0x141)](_0xdbcc3a))return _0xdbcc3a;return _0xdbcc3a['replace'](_0x41cfc0(0x14b),'Z')[_0x41cfc0(0x13e)]('\x20','T');}export class ScheduleSDK{[a101_0x241ae3(0x146)];constructor(_0x4511df){const _0x15ad66=a101_0x241ae3;this[_0x15ad66(0x146)]=new TDApiClient(_0x4511df);}async['list'](_0x2e426f){const _0x2ab318=a101_0x241ae3,_0x4843d7=await this[_0x2ab318(0x146)][_0x2ab318(0x140)](),_0xa5b0af=_0x4843d7[_0x2ab318(0x128)](_0x3fd9be=>({..._0x3fd9be,'created_at':normalizeTimestamp(_0x3fd9be['created_at'])??_0x3fd9be[_0x2ab318(0x147)]}));if(_0x2e426f?.[_0x2ab318(0x145)]&&_0x2e426f[_0x2ab318(0x145)]>0x0)return _0xa5b0af[_0x2ab318(0x12e)](0x0,_0x2e426f['limit']);return _0xa5b0af;}async['listQueries'](_0x4a5572){const _0x3824dd=a101_0x241ae3,_0x108da9=0x64,_0x2e2e4f=_0x4a5572?.[_0x3824dd(0x145)],_0x524574=[];let _0x265879=!![],_0x1a8242,_0x5acd64,_0x261f01;if(_0x4a5572?.[_0x3824dd(0x12c)]){const _0x523fe2=_0x4a5572[_0x3824dd(0x12c)][_0x3824dd(0x13e)](/[.+^${}()|[\]\\]/g,_0x3824dd(0x149)),_0xee5d1c=_0x523fe2[_0x3824dd(0x13e)](/\*/g,'.*')[_0x3824dd(0x13e)](/\?/g,'.');_0x261f01=new RegExp('^'+_0xee5d1c+'$','i');}while(_0x265879&&(!_0x2e2e4f||_0x524574['length']<_0x2e2e4f)){const _0x1524c4=await this['client']['listQueries']({'anchor_column':_0x3824dd(0x132),'sort_direction':_0x3824dd(0x153),'page_size':_0x108da9,'anchor_id':_0x1a8242,'anchor_value':_0x5acd64});let _0x267ec8=_0x1524c4[_0x3824dd(0x143)];_0x4a5572?.[_0x3824dd(0x15d)]&&(_0x267ec8=_0x267ec8['filter'](_0x4faefb=>_0x4faefb[_0x3824dd(0x156)]!==null));_0x261f01&&(_0x267ec8=_0x267ec8[_0x3824dd(0x14c)](_0xd8567c=>_0xd8567c[_0x3824dd(0x15a)]&&_0x261f01[_0x3824dd(0x141)](_0xd8567c[_0x3824dd(0x15a)])));_0x524574[_0x3824dd(0x14d)](..._0x267ec8),_0x265879=_0x1524c4[_0x3824dd(0x154)]['has_next_page'];if(_0x265879&&_0x1524c4[_0x3824dd(0x143)][_0x3824dd(0x150)]>0x0){const _0x299cb7=_0x1524c4['queries'][_0x1524c4[_0x3824dd(0x143)][_0x3824dd(0x150)]-0x1];_0x1a8242=_0x299cb7['id'],_0x5acd64=_0x299cb7[_0x3824dd(0x132)];}}const _0x4e8c42=_0x2e2e4f?_0x524574[_0x3824dd(0x12e)](0x0,_0x2e2e4f):_0x524574;return{'queries':_0x4e8c42,'pagination':{'has_next_page':_0x265879||(_0x2e2e4f?_0x524574['length']>_0x2e2e4f:![])}};}async[a101_0x241ae3(0x15f)](_0x2c6f62){const _0x54b585=a101_0x241ae3,_0x235b67=await this[_0x54b585(0x146)][_0x54b585(0x140)](),_0x281a8f=_0x235b67[_0x54b585(0x15e)](_0xfe7e2=>_0xfe7e2[_0x54b585(0x15a)]===_0x2c6f62);if(!_0x281a8f)throw new SDKError(ErrorCode[_0x54b585(0x148)],_0x54b585(0x13a)+_0x2c6f62);return{..._0x281a8f,'created_at':normalizeTimestamp(_0x281a8f[_0x54b585(0x147)])??_0x281a8f['created_at']};}async[a101_0x241ae3(0x138)](_0x1e8c71,_0x1a47e3){const _0x13b22a=a101_0x241ae3;if(!_0x1e8c71)throw new SDKError(ErrorCode[_0x13b22a(0x13d)],_0x13b22a(0x133));if(!_0x1a47e3['database'])throw new SDKError(ErrorCode[_0x13b22a(0x13d)],_0x13b22a(0x13c));if(!_0x1a47e3[_0x13b22a(0x15b)])throw new SDKError(ErrorCode[_0x13b22a(0x13d)],_0x13b22a(0x142));if(!_0x1a47e3[_0x13b22a(0x160)])throw new SDKError(ErrorCode[_0x13b22a(0x13d)],_0x13b22a(0x14f));return await this['client'][_0x13b22a(0x130)](_0x1e8c71,_0x1a47e3);}async[a101_0x241ae3(0x157)](_0x5af1ed,_0xe5f200){const _0xa5901f=a101_0x241ae3;if(!_0x5af1ed)throw new SDKError(ErrorCode[_0xa5901f(0x13d)],_0xa5901f(0x133));return await this[_0xa5901f(0x146)][_0xa5901f(0x12d)](_0x5af1ed,_0xe5f200);}async[a101_0x241ae3(0x13f)](_0x13a540){const _0x54cfb6=a101_0x241ae3;if(!_0x13a540)throw new SDKError(ErrorCode[_0x54cfb6(0x13d)],_0x54cfb6(0x133));return await this[_0x54cfb6(0x146)][_0x54cfb6(0x144)](_0x13a540);}async['run'](_0x3da2c0,_0x50690c){const _0x2be313=a101_0x241ae3;if(!_0x3da2c0)throw new SDKError(ErrorCode[_0x2be313(0x13d)],'Schedule\x20name\x20is\x20required');let _0x598cec;if(_0x50690c?.[_0x2be313(0x134)]){const _0x391f18=typeof _0x50690c[_0x2be313(0x134)]===_0x2be313(0x14a)?new Date(_0x50690c[_0x2be313(0x134)]):_0x50690c[_0x2be313(0x134)];if(isNaN(_0x391f18['getTime']()))throw new SDKError(ErrorCode[_0x2be313(0x13d)],'Invalid\x20time\x20format:\x20'+_0x50690c[_0x2be313(0x134)]);_0x598cec=Math['floor'](_0x391f18['getTime']()/0x3e8);}else _0x598cec=Math['floor'](Date[_0x2be313(0x136)]()/0x3e8);if(_0x50690c?.['num']!==undefined){if(_0x50690c[_0x2be313(0x131)]<0x1||_0x50690c['num']>0xa)throw new SDKError(ErrorCode[_0x2be313(0x13d)],_0x2be313(0x158));}return await this[_0x2be313(0x146)][_0x2be313(0x152)](_0x3da2c0,_0x598cec,_0x50690c?.[_0x2be313(0x131)]);}async[a101_0x241ae3(0x151)](_0x2efda6,_0x43f1b4){const _0x291173=a101_0x241ae3;if(!_0x2efda6)throw new SDKError(ErrorCode[_0x291173(0x13d)],_0x291173(0x133));const _0x32970c=await this[_0x291173(0x146)][_0x291173(0x129)](_0x2efda6,_0x43f1b4);return{..._0x32970c,'history':_0x32970c[_0x291173(0x151)]['map'](_0xa84b03=>({..._0xa84b03,'created_at':normalizeTimestamp(_0xa84b03[_0x291173(0x147)]),'start_at':normalizeTimestamp(_0xa84b03[_0x291173(0x137)]),'end_at':normalizeTimestamp(_0xa84b03[_0x291173(0x12f)])}))};}}
1
+ const a101_0x39f250=a101_0x500e;(function(_0x265c2c,_0x10dd63){const _0x35d025=a101_0x500e,_0x43c978=_0x265c2c();while(!![]){try{const _0x47c5f2=-parseInt(_0x35d025(0x89))/0x1+-parseInt(_0x35d025(0x94))/0x2+parseInt(_0x35d025(0x96))/0x3+parseInt(_0x35d025(0xaa))/0x4+-parseInt(_0x35d025(0x95))/0x5+parseInt(_0x35d025(0x84))/0x6+parseInt(_0x35d025(0x99))/0x7;if(_0x47c5f2===_0x10dd63)break;else _0x43c978['push'](_0x43c978['shift']());}catch(_0x21e906){_0x43c978['push'](_0x43c978['shift']());}}}(a101_0x1440,0xadeba));function a101_0x500e(_0xa8d8ae,_0x3f2726){_0xa8d8ae=_0xa8d8ae-0x84;const _0x144083=a101_0x1440();let _0x500e9e=_0x144083[_0xa8d8ae];return _0x500e9e;}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a101_0x1440(){const _0x27af09=['map','scheduled','type','database','run','getScheduleHistory','2360142WqQCLc','594105KmrurW','2328657RQELhk','test','Invalid\x20time\x20format:\x20','3449117MBTRaz','push','filter','createSchedule','\x5c$&','INVALID_ARGUMENT','string','create','getTime','replace','limit','pagination','time','updateSchedule','num','name','runSchedule','3121364TKLBpZ','desc','client','history','listQueries','queries','Schedule\x20not\x20found:\x20','end_at','updated_at','query','now','update','Type\x20is\x20required','floor','length','pattern','delete','643296lzSpKa','created_at','num\x20must\x20be\x20between\x201\x20and\x2010','cron','Query\x20is\x20required','145237AqaPwy','NOT_FOUND','slice','Schedule\x20name\x20is\x20required','listSchedules'];a101_0x1440=function(){return _0x27af09;};return a101_0x1440();}function normalizeTimestamp(_0x2b0605){const _0x55a12a=a101_0x500e;if(!_0x2b0605)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/['test'](_0x2b0605))return _0x2b0605;return _0x2b0605[_0x55a12a(0xa2)]('\x20UTC','Z')[_0x55a12a(0xa2)]('\x20','T');}export class ScheduleSDK{[a101_0x39f250(0xac)];constructor(_0x2a8ebc){const _0xc76828=a101_0x39f250;this[_0xc76828(0xac)]=new TDApiClient(_0x2a8ebc);}async['list'](_0x449d78){const _0x5ab88b=a101_0x39f250,_0x24e7ae=await this[_0x5ab88b(0xac)]['listSchedules'](),_0x20a36d=_0x24e7ae[_0x5ab88b(0x8e)](_0xb0716=>({..._0xb0716,'created_at':normalizeTimestamp(_0xb0716[_0x5ab88b(0x85)])??_0xb0716[_0x5ab88b(0x85)]}));if(_0x449d78?.[_0x5ab88b(0xa3)]&&_0x449d78[_0x5ab88b(0xa3)]>0x0)return _0x20a36d[_0x5ab88b(0x8b)](0x0,_0x449d78[_0x5ab88b(0xa3)]);return _0x20a36d;}async[a101_0x39f250(0xae)](_0x3a9580){const _0x36a5b8=a101_0x39f250,_0x3fb5f8=0x64,_0x59bc9c=_0x3a9580?.[_0x36a5b8(0xa3)],_0x1e6b05=[];let _0x246cec=!![],_0x327d8f,_0x4e96f2,_0x1bf4a7;if(_0x3a9580?.['pattern']){const _0x1bd4a0=_0x3a9580[_0x36a5b8(0xb9)]['replace'](/[.+^${}()|[\]\\]/g,_0x36a5b8(0x9d)),_0x50732c=_0x1bd4a0[_0x36a5b8(0xa2)](/\*/g,'.*')['replace'](/\?/g,'.');_0x1bf4a7=new RegExp('^'+_0x50732c+'$','i');}while(_0x246cec&&(!_0x59bc9c||_0x1e6b05[_0x36a5b8(0xb8)]<_0x59bc9c)){const _0x17cf3f=await this[_0x36a5b8(0xac)][_0x36a5b8(0xae)]({'anchor_column':_0x36a5b8(0xb2),'sort_direction':_0x36a5b8(0xab),'page_size':_0x3fb5f8,'anchor_id':_0x327d8f,'anchor_value':_0x4e96f2});let _0x36b0fb=_0x17cf3f[_0x36a5b8(0xaf)];_0x3a9580?.[_0x36a5b8(0x8f)]&&(_0x36b0fb=_0x36b0fb[_0x36a5b8(0x9b)](_0x430c77=>_0x430c77[_0x36a5b8(0x87)]!==null));_0x1bf4a7&&(_0x36b0fb=_0x36b0fb[_0x36a5b8(0x9b)](_0x366e64=>_0x366e64[_0x36a5b8(0xa8)]&&_0x1bf4a7[_0x36a5b8(0x97)](_0x366e64[_0x36a5b8(0xa8)])));_0x1e6b05[_0x36a5b8(0x9a)](..._0x36b0fb),_0x246cec=_0x17cf3f[_0x36a5b8(0xa4)]['has_next_page'];if(_0x246cec&&_0x17cf3f['queries'][_0x36a5b8(0xb8)]>0x0){const _0x126b4a=_0x17cf3f[_0x36a5b8(0xaf)][_0x17cf3f[_0x36a5b8(0xaf)][_0x36a5b8(0xb8)]-0x1];_0x327d8f=_0x126b4a['id'],_0x4e96f2=_0x126b4a[_0x36a5b8(0xb2)];}}const _0xba4f7c=_0x59bc9c?_0x1e6b05[_0x36a5b8(0x8b)](0x0,_0x59bc9c):_0x1e6b05;return{'queries':_0xba4f7c,'pagination':{'has_next_page':_0x246cec||(_0x59bc9c?_0x1e6b05['length']>_0x59bc9c:![])}};}async['show'](_0x23ef50){const _0x429a2c=a101_0x39f250,_0x46c6f6=await this[_0x429a2c(0xac)][_0x429a2c(0x8d)](),_0x3748e6=_0x46c6f6['find'](_0x51551e=>_0x51551e[_0x429a2c(0xa8)]===_0x23ef50);if(!_0x3748e6)throw new SDKError(ErrorCode[_0x429a2c(0x8a)],_0x429a2c(0xb0)+_0x23ef50);return{..._0x3748e6,'created_at':normalizeTimestamp(_0x3748e6[_0x429a2c(0x85)])??_0x3748e6[_0x429a2c(0x85)]};}async[a101_0x39f250(0xa0)](_0x3eb49c,_0x27c2ce){const _0x1c6291=a101_0x39f250;if(!_0x3eb49c)throw new SDKError(ErrorCode[_0x1c6291(0x9e)],'Schedule\x20name\x20is\x20required');if(!_0x27c2ce[_0x1c6291(0x91)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Database\x20is\x20required');if(!_0x27c2ce[_0x1c6291(0xb3)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1c6291(0x88));if(!_0x27c2ce[_0x1c6291(0x90)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1c6291(0xb6));return await this[_0x1c6291(0xac)][_0x1c6291(0x9c)](_0x3eb49c,_0x27c2ce);}async[a101_0x39f250(0xb5)](_0x4eed28,_0xaa6f9){const _0x191c4c=a101_0x39f250;if(!_0x4eed28)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Schedule\x20name\x20is\x20required');return await this['client'][_0x191c4c(0xa6)](_0x4eed28,_0xaa6f9);}async[a101_0x39f250(0xba)](_0x24edbd){const _0x44f271=a101_0x39f250;if(!_0x24edbd)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x44f271(0x8c));return await this['client']['deleteSchedule'](_0x24edbd);}async[a101_0x39f250(0x92)](_0x408f5e,_0x3653ce){const _0x19213f=a101_0x39f250;if(!_0x408f5e)throw new SDKError(ErrorCode[_0x19213f(0x9e)],'Schedule\x20name\x20is\x20required');let _0x182f4c;if(_0x3653ce?.['time']){const _0x24b03d=typeof _0x3653ce[_0x19213f(0xa5)]===_0x19213f(0x9f)?new Date(_0x3653ce['time']):_0x3653ce[_0x19213f(0xa5)];if(isNaN(_0x24b03d[_0x19213f(0xa1)]()))throw new SDKError(ErrorCode[_0x19213f(0x9e)],_0x19213f(0x98)+_0x3653ce['time']);_0x182f4c=Math[_0x19213f(0xb7)](_0x24b03d[_0x19213f(0xa1)]()/0x3e8);}else _0x182f4c=Math[_0x19213f(0xb7)](Date[_0x19213f(0xb4)]()/0x3e8);if(_0x3653ce?.['num']!==undefined){if(_0x3653ce[_0x19213f(0xa7)]<0x1||_0x3653ce['num']>0xa)throw new SDKError(ErrorCode[_0x19213f(0x9e)],_0x19213f(0x86));}return await this[_0x19213f(0xac)][_0x19213f(0xa9)](_0x408f5e,_0x182f4c,_0x3653ce?.[_0x19213f(0xa7)]);}async[a101_0x39f250(0xad)](_0x3624ab,_0x494034){const _0x5e05eb=a101_0x39f250;if(!_0x3624ab)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5e05eb(0x8c));const _0x4057f2=await this[_0x5e05eb(0xac)][_0x5e05eb(0x93)](_0x3624ab,_0x494034);return{..._0x4057f2,'history':_0x4057f2['history'][_0x5e05eb(0x8e)](_0x587409=>({..._0x587409,'created_at':normalizeTimestamp(_0x587409[_0x5e05eb(0x85)]),'start_at':normalizeTimestamp(_0x587409['start_at']),'end_at':normalizeTimestamp(_0x587409[_0x5e05eb(0xb1)])}))};}}
@@ -1 +1 @@
1
- const a102_0x435497=a102_0x3b3f;(function(_0x173acf,_0x552b5d){const _0x48db62=a102_0x3b3f,_0x1e06fd=_0x173acf();while(!![]){try{const _0x5e2a61=parseInt(_0x48db62(0x224))/0x1*(-parseInt(_0x48db62(0x245))/0x2)+parseInt(_0x48db62(0x22e))/0x3*(parseInt(_0x48db62(0x239))/0x4)+parseInt(_0x48db62(0x24e))/0x5+parseInt(_0x48db62(0x209))/0x6*(parseInt(_0x48db62(0x1ef))/0x7)+parseInt(_0x48db62(0x231))/0x8*(parseInt(_0x48db62(0x25d))/0x9)+parseInt(_0x48db62(0x243))/0xa*(-parseInt(_0x48db62(0x234))/0xb)+parseInt(_0x48db62(0x21a))/0xc*(-parseInt(_0x48db62(0x223))/0xd);if(_0x5e2a61===_0x552b5d)break;else _0x1e06fd['push'](_0x1e06fd['shift']());}catch(_0x4974ca){_0x1e06fd['push'](_0x1e06fd['shift']());}}}(a102_0x405c,0xdc0b2));import*as a102_0x46e16e from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0xaa2de0,_0x4721df){const _0x32149f=a102_0x3b3f,_0x198ddf=_0xaa2de0[_0x32149f(0x204)]&&_0x32149f(0x23a)in _0xaa2de0[_0x32149f(0x204)]&&_0xaa2de0['rule'][_0x32149f(0x23a)];return{'type':_0x32149f(0x274),'name':_0xaa2de0[_0x32149f(0x215)],..._0xaa2de0[_0x32149f(0x255)]&&{'description':_0xaa2de0[_0x32149f(0x255)]},..._0x4721df&&{'folder':_0x4721df},..._0x198ddf&&{'rule':apiRuleToYaml(_0xaa2de0[_0x32149f(0x204)])},..._0xaa2de0['kind']!==undefined&&{'kind':_0xaa2de0[_0x32149f(0x238)]===0x0?'batch':_0xaa2de0[_0x32149f(0x238)]===0x1?'realtime':'funnel_stage'},..._0xaa2de0['isVisible']!==undefined&&{'visible':_0xaa2de0['isVisible']}};}export async function segmentResponseToDef(_0x4f6919,_0x342290,_0x5921c2){const _0x16f473=a102_0x3b3f,_0x1b1fa5=segmentResponseToDefSync(_0x4f6919,_0x5921c2);if(!_0x342290||!_0x342290[_0x16f473(0x22d)])return _0x1b1fa5;return _0x1b1fa5[_0x16f473(0x204)]&&(_0x1b1fa5[_0x16f473(0x204)]=await resolveRuleSegmentRefs(_0x1b1fa5['rule'],_0x342290[_0x16f473(0x22d)])),_0x1b1fa5;}export function apiRuleToYaml(_0x472e99){const _0x1d15a7=a102_0x3b3f,_0x5dfd71=(_0x472e99[_0x1d15a7(0x21e)]||[])[_0x1d15a7(0x200)](apiConditionToYaml);if(_0x5dfd71[_0x1d15a7(0x20b)]===0x1&&!_0x472e99['description']&&'type'in _0x5dfd71[0x0]&&(_0x5dfd71[0x0]['type']===_0x1d15a7(0x1ed)||_0x5dfd71[0x0][_0x1d15a7(0x23a)]==='Or')){const _0x59f28e=_0x5dfd71[0x0];if(_0x59f28e[_0x1d15a7(0x23a)]===_0x472e99[_0x1d15a7(0x23a)]&&_0x59f28e[_0x1d15a7(0x21e)])return{'type':_0x472e99['type'],'conditions':_0x59f28e[_0x1d15a7(0x21e)],..._0x59f28e[_0x1d15a7(0x255)]&&{'description':_0x59f28e['description']}};}return{'type':_0x472e99[_0x1d15a7(0x23a)],'conditions':_0x5dfd71,..._0x472e99[_0x1d15a7(0x255)]&&{'description':_0x472e99[_0x1d15a7(0x255)]}};}export async function resolveRuleSegmentRefs(_0x119adb,_0x340769){const _0xeabc10=a102_0x3b3f,_0x5906fd=await Promise['all'](_0x119adb[_0xeabc10(0x21e)][_0xeabc10(0x200)](_0x3372ad=>resolveConditionSegmentRefs(_0x3372ad,_0x340769)));return{..._0x119adb,'conditions':_0x5906fd};}async function resolveConditionSegmentRefs(_0x2a8998,_0x3e89eb){const _0x10f760=a102_0x3b3f;if('segment'in _0x2a8998&&(_0x2a8998[_0x10f760(0x23a)]===_0x10f760(0x201)||_0x2a8998[_0x10f760(0x23a)]===_0x10f760(0x21c))){const _0x2b3795=_0x2a8998;if(/^\d+$/[_0x10f760(0x230)](_0x2b3795['segment'])){const _0x546387=await _0x3e89eb(_0x2b3795[_0x10f760(0x274)]);return{..._0x2b3795,'segment':_0x546387};}return _0x2a8998;}if(_0x10f760(0x21e)in _0x2a8998&&_0x2a8998[_0x10f760(0x21e)]){const _0x42207f=_0x2a8998,_0x3c92d8=await Promise[_0x10f760(0x261)](_0x42207f[_0x10f760(0x21e)][_0x10f760(0x200)](_0x561dc6=>resolveConditionSegmentRefs(_0x561dc6,_0x3e89eb)));return{..._0x42207f,'conditions':_0x3c92d8};}if(_0x10f760(0x1ee)in _0x2a8998&&_0x2a8998[_0x10f760(0x1ee)]){const _0x40135e=_0x2a8998,_0x5906bd=await resolveRuleSegmentRefs(_0x40135e[_0x10f760(0x1ee)],_0x3e89eb);return{..._0x40135e,'filter':_0x5906bd};}return _0x2a8998;}export async function resolveRuleSegmentIds(_0x1c8b25,_0x12467c){const _0x2e76dd=a102_0x3b3f,_0x293f70=await Promise[_0x2e76dd(0x261)](_0x1c8b25[_0x2e76dd(0x21e)][_0x2e76dd(0x200)](_0x237181=>resolveConditionSegmentIds(_0x237181,_0x12467c)));return{..._0x1c8b25,'conditions':_0x293f70};}async function resolveConditionSegmentIds(_0xcfa668,_0x49954f){const _0x1db032=a102_0x3b3f;if(_0x1db032(0x274)in _0xcfa668&&(_0xcfa668[_0x1db032(0x23a)]===_0x1db032(0x201)||_0xcfa668['type']===_0x1db032(0x21c))){const _0x64e183=_0xcfa668;if(!/^\d+$/[_0x1db032(0x230)](_0x64e183[_0x1db032(0x274)])){const _0x469b83=await _0x49954f(_0x64e183[_0x1db032(0x274)]);return{..._0x64e183,'segment':_0x469b83};}return _0xcfa668;}if(_0x1db032(0x21e)in _0xcfa668&&_0xcfa668[_0x1db032(0x21e)]){const _0x83f698=_0xcfa668,_0x2053c7=await Promise[_0x1db032(0x261)](_0x83f698['conditions'][_0x1db032(0x200)](_0x802436=>resolveConditionSegmentIds(_0x802436,_0x49954f)));return{..._0x83f698,'conditions':_0x2053c7};}if(_0x1db032(0x1ee)in _0xcfa668&&_0xcfa668['filter']){const _0x10a9ae=_0xcfa668,_0x3e7adb=await resolveRuleSegmentIds(_0x10a9ae[_0x1db032(0x1ee)],_0x49954f);return{..._0x10a9ae,'filter':_0x3e7adb};}return _0xcfa668;}function apiConditionToYaml(_0x5e193b){const _0xa69553=a102_0x3b3f;if(_0x5e193b['type']==='And'||_0x5e193b[_0xa69553(0x23a)]==='Or'){if(_0x5e193b[_0xa69553(0x21e)]){const _0x4713c1=_0x5e193b['conditions'][_0xa69553(0x200)](apiConditionToYaml);if(_0x4713c1[_0xa69553(0x20b)]===0x1&&!_0x5e193b[_0xa69553(0x255)])return _0x4713c1[0x0];return{'type':_0x5e193b[_0xa69553(0x23a)],'conditions':_0x4713c1,..._0x5e193b[_0xa69553(0x255)]&&{'description':_0x5e193b[_0xa69553(0x255)]}};}}if(_0x5e193b[_0xa69553(0x23a)]===_0xa69553(0x220)&&_0x5e193b[_0xa69553(0x254)]&&_0x5e193b[_0xa69553(0x21d)]){const _0x395ee0=_0x5e193b['leftValue'][_0xa69553(0x257)]?{'type':_0x5e193b[_0xa69553(0x254)][_0xa69553(0x257)][_0xa69553(0x23a)],..._0x5e193b['leftValue']['aggregation'][_0xa69553(0x1f3)]&&{'groupingColumns':_0x5e193b[_0xa69553(0x254)][_0xa69553(0x257)]['groupingColumns']}}:undefined;return{'type':_0xa69553(0x220),'attribute':_0x5e193b[_0xa69553(0x254)][_0xa69553(0x215)]||'','operator':apiOperatorToYaml(_0x5e193b[_0xa69553(0x21d)]),..._0x5e193b[_0xa69553(0x1fa)]&&_0x5e193b[_0xa69553(0x1fa)]!==_0xa69553(0x20e)?{'arrayMatching':_0x5e193b[_0xa69553(0x1fa)]}:{},..._0x5e193b[_0xa69553(0x21c)]?{'exclude':_0x5e193b['exclude']}:{},..._0x395ee0?{'aggregation':_0x395ee0}:{},..._0x5e193b[_0xa69553(0x254)]['source']?{'source':_0x5e193b[_0xa69553(0x254)]['source'][_0xa69553(0x215)]}:{},..._0x5e193b['leftValue'][_0xa69553(0x1ee)]?{'filter':apiRuleToYaml(_0x5e193b[_0xa69553(0x254)]['filter'])}:{},..._0x5e193b['limit']!==undefined&&_0x5e193b[_0xa69553(0x244)]!==null?{'limit':_0x5e193b[_0xa69553(0x244)]}:{}};}if(_0x5e193b[_0xa69553(0x23a)]==='Reference'&&_0x5e193b['id'])return{'type':_0x5e193b[_0xa69553(0x21c)]?'exclude':_0xa69553(0x201),'segment':_0x5e193b['id']};return{'type':_0xa69553(0x1ed),'conditions':[]};}function isTemporalOperator(_0x242784){const _0x249770=a102_0x3b3f;return _0x242784==='TimeWithinPast'||_0x242784===_0x249770(0x253);}function getEffectiveValue(_0xac81c4){const _0x88815=a102_0x3b3f,_0x37d04a=_0xac81c4[_0x88815(0x1f6)];return _0xac81c4['value']??_0x37d04a;}function apiOperatorToYaml(_0xfe0f25){const _0x2f174d=a102_0x3b3f;let _0x4c31af;if(_0xfe0f25[_0x2f174d(0x214)]&&_0xfe0f25[_0x2f174d(0x214)][_0x2f174d(0x20b)]>0x0)_0x4c31af=_0xfe0f25[_0x2f174d(0x214)];else{if(_0xfe0f25[_0x2f174d(0x26c)]!==undefined)_0x4c31af=_0xfe0f25[_0x2f174d(0x26c)];else isTemporalOperator(_0xfe0f25[_0x2f174d(0x23a)])&&_0xfe0f25[_0x2f174d(0x229)]!==undefined&&(_0x4c31af=_0xfe0f25['value']);}return{'type':mapApiOperatorType(_0xfe0f25[_0x2f174d(0x23a)]),..._0xfe0f25[_0x2f174d(0x278)]&&{'not':_0xfe0f25[_0x2f174d(0x278)]},..._0x4c31af!==undefined&&{'value':_0x4c31af},..._0xfe0f25[_0x2f174d(0x1f5)]&&{'unit':_0xfe0f25[_0x2f174d(0x1f5)]}};}function mapApiOperatorType(_0x7d7d2a){return _0x7d7d2a;}export function segmentDefToCreateRequest(_0x1545e8,_0x4abc52){const _0x356be3=a102_0x3b3f,_0x307dfc={'name':_0x1545e8[_0x356be3(0x215)]};return _0x1545e8[_0x356be3(0x255)]&&(_0x307dfc['description']=_0x1545e8[_0x356be3(0x255)]),_0x1545e8[_0x356be3(0x204)]&&(_0x307dfc[_0x356be3(0x204)]=yamlRuleToApi(_0x1545e8[_0x356be3(0x204)])),_0x1545e8[_0x356be3(0x238)]&&(_0x307dfc[_0x356be3(0x238)]=_0x1545e8[_0x356be3(0x238)]===_0x356be3(0x203)?0x0:_0x1545e8['kind']===_0x356be3(0x23e)?0x1:0x2),_0x1545e8[_0x356be3(0x22a)]!==undefined&&(_0x307dfc[_0x356be3(0x225)]=_0x1545e8[_0x356be3(0x22a)]),_0x4abc52&&(_0x307dfc[_0x356be3(0x24c)]=_0x4abc52),_0x307dfc;}export function segmentDefToUpdateRequest(_0x5b5375){const _0x1eda63=a102_0x3b3f,_0x218324={'name':_0x5b5375[_0x1eda63(0x215)]};return _0x5b5375['description']!==undefined&&(_0x218324['description']=_0x5b5375[_0x1eda63(0x255)]),_0x5b5375[_0x1eda63(0x204)]&&(_0x218324['rule']=yamlRuleToApi(_0x5b5375[_0x1eda63(0x204)])),_0x5b5375[_0x1eda63(0x238)]&&(_0x218324[_0x1eda63(0x238)]=_0x5b5375['kind']==='batch'?0x0:_0x5b5375[_0x1eda63(0x238)]===_0x1eda63(0x23e)?0x1:0x2),_0x218324;}export function yamlRuleToApi(_0x1c5b55,_0x375c1=![]){const _0x415758=a102_0x3b3f,_0x312fa5=_0x1c5b55[_0x415758(0x21e)][_0x415758(0x200)](yamlConditionToApi);if(_0x375c1){const _0x5cd4d2=_0x312fa5['every'](_0x45bdf5=>_0x45bdf5[_0x415758(0x23a)]===_0x415758(0x1ed)||_0x45bdf5[_0x415758(0x23a)]==='Or');if(!_0x5cd4d2&&_0x312fa5[_0x415758(0x20b)]>0x0)return{'type':_0x1c5b55['type'],'conditions':[{'type':'And','description':_0x1c5b55[_0x415758(0x255)]||'','conditions':_0x312fa5}]};}return{'type':_0x1c5b55[_0x415758(0x23a)],'conditions':_0x312fa5,..._0x1c5b55[_0x415758(0x255)]&&{'description':_0x1c5b55[_0x415758(0x255)]}};}function yamlConditionToApi(_0x4b8c29){const _0x57f1e7=a102_0x3b3f;if(_0x57f1e7(0x274)in _0x4b8c29&&(_0x4b8c29[_0x57f1e7(0x23a)]===_0x57f1e7(0x201)||_0x4b8c29[_0x57f1e7(0x23a)]===_0x57f1e7(0x21c))){const _0x555e36=_0x4b8c29;return{'type':_0x57f1e7(0x1fc),'id':_0x555e36[_0x57f1e7(0x274)],'exclude':_0x555e36['type']===_0x57f1e7(0x21c)};}if(_0x57f1e7(0x23a)in _0x4b8c29&&(_0x4b8c29[_0x57f1e7(0x23a)]===_0x57f1e7(0x1ed)||_0x4b8c29['type']==='Or')){const _0x1dbfd2=_0x4b8c29;return{'type':_0x1dbfd2[_0x57f1e7(0x23a)],'conditions':_0x1dbfd2[_0x57f1e7(0x21e)]['map'](yamlConditionToApi),..._0x1dbfd2[_0x57f1e7(0x255)]&&{'description':_0x1dbfd2[_0x57f1e7(0x255)]}};}const _0x233266=_0x4b8c29,_0x597d02={'type':_0x57f1e7(0x220),'leftValue':buildLeftValue(_0x233266),'operator':yamlOperatorToApi(_0x233266[_0x57f1e7(0x21d)]),'exclude':_0x233266[_0x57f1e7(0x21c)]??![],'arrayMatching':_0x233266[_0x57f1e7(0x1fa)]??_0x57f1e7(0x20e)};return _0x233266[_0x57f1e7(0x244)]!==undefined&&(_0x597d02[_0x57f1e7(0x244)]=_0x233266[_0x57f1e7(0x244)]),_0x597d02;}function buildLeftValue(_0x230351){const _0x18eef0=a102_0x3b3f,_0x2198f1={'name':_0x230351[_0x18eef0(0x22f)]};return _0x230351['aggregation']&&(_0x2198f1[_0x18eef0(0x257)]={'type':_0x230351[_0x18eef0(0x257)]['type'],..._0x230351[_0x18eef0(0x257)][_0x18eef0(0x1f3)]&&{'groupingColumns':_0x230351['aggregation'][_0x18eef0(0x1f3)]}}),_0x230351[_0x18eef0(0x247)]&&(_0x2198f1[_0x18eef0(0x247)]={'name':_0x230351['source']}),_0x230351[_0x18eef0(0x1ee)]&&(_0x2198f1['filter']=yamlRuleToApi(_0x230351[_0x18eef0(0x1ee)])),_0x2198f1;}function yamlOperatorToApi(_0x4b85fb){const _0x2fbba2=a102_0x3b3f,_0x1b89f0={'type':mapYamlOperatorType(_0x4b85fb[_0x2fbba2(0x23a)]),'not':_0x4b85fb['not']??![]},_0x209e85=getEffectiveValue(_0x4b85fb);if(_0x209e85!==undefined){if(Array['isArray'](_0x209e85))_0x1b89f0[_0x2fbba2(0x214)]=_0x209e85;else isTemporalOperator(_0x4b85fb[_0x2fbba2(0x23a)])?_0x1b89f0[_0x2fbba2(0x229)]=_0x209e85:_0x1b89f0[_0x2fbba2(0x26c)]=_0x209e85;}return _0x4b85fb['unit']&&(_0x1b89f0[_0x2fbba2(0x1f5)]=_0x4b85fb[_0x2fbba2(0x1f5)]),_0x1b89f0;}function mapYamlOperatorType(_0x197957){return _0x197957;}export function toYamlString(_0x5f0547){const _0x203fbc=a102_0x3b3f,_0x393071=JSON[_0x203fbc(0x232)](JSON['stringify'](_0x5f0547)),_0x3e6ee5=a102_0x46e16e[_0x203fbc(0x264)](_0x393071,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x4a66bb=[_0x203fbc(0x259)];let _0x33599f=_0x3e6ee5;for(const _0x3d9acf of _0x4a66bb){_0x33599f=_0x33599f[_0x203fbc(0x205)](new RegExp('^('+_0x3d9acf+')','m'),(_0x4ecb92,_0x3074cd,_0x5a24be)=>{if(_0x5a24be===0x0||_0x33599f[_0x5a24be-0x1]==='\x0a'&&_0x33599f[_0x5a24be-0x2]==='\x0a')return _0x3074cd;return'\x0a'+_0x3074cd;});}return _0x33599f;}export function parseYamlString(_0x532bfe){const _0x3c854d=a102_0x3b3f,_0x9f5927=a102_0x46e16e[_0x3c854d(0x232)](_0x532bfe);if(!_0x9f5927[_0x3c854d(0x215)])throw new Error(_0x3c854d(0x269));if(_0x9f5927[_0x3c854d(0x23a)]&&_0x9f5927[_0x3c854d(0x23a)]!==_0x3c854d(0x274))throw new Error(_0x3c854d(0x272)+_0x9f5927[_0x3c854d(0x23a)]);return _0x9f5927;}export function isSegmentYaml(_0x2b7d73){const _0x51fa27=a102_0x3b3f;if(typeof _0x2b7d73!==_0x51fa27(0x20a)||_0x2b7d73===null)return![];const _0x55a4fa=_0x2b7d73;return _0x55a4fa[_0x51fa27(0x23a)]===_0x51fa27(0x274)||_0x55a4fa['type']===undefined;}export function generateTemplate(_0xbdd4a7=a102_0x435497(0x266)){const _0x47df9e=a102_0x435497,_0x2c723e={'type':_0x47df9e(0x274),'name':_0xbdd4a7,'description':_0x47df9e(0x23f),'rule':{'type':_0x47df9e(0x1ed),'conditions':[{'type':_0x47df9e(0x220),'attribute':_0x47df9e(0x1ec),'operator':{'type':'Equal','value':_0x47df9e(0x229)}}]}};return toYamlString(_0x2c723e);}export function segmentToYamlString(_0x5d0ba1){const _0x85ccbe=a102_0x435497,_0x2a685a=JSON['parse'](JSON[_0x85ccbe(0x264)](_0x5d0ba1)),_0x2c0c33=a102_0x46e16e[_0x85ccbe(0x264)](_0x2a685a,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0xb6ff95=[_0x85ccbe(0x259),_0x85ccbe(0x256)];let _0x6c2830=_0x2c0c33;for(const _0x962216 of _0xb6ff95){_0x6c2830=_0x6c2830['replace'](new RegExp('^('+_0x962216+')','m'),(_0x4c8d59,_0x1ae6e0,_0x427816)=>{if(_0x427816===0x0||_0x6c2830[_0x427816-0x1]==='\x0a'&&_0x6c2830[_0x427816-0x2]==='\x0a')return _0x1ae6e0;return'\x0a'+_0x1ae6e0;});}return _0x6c2830;}export function parseSegmentYamlFile(_0x4d8a18){const _0x269cb6=a102_0x435497,_0x3d6238=a102_0x46e16e[_0x269cb6(0x232)](_0x4d8a18);if(!_0x3d6238[_0x269cb6(0x215)])throw new Error(_0x269cb6(0x269));return _0x3d6238;}export function normalizeChildSegmentYaml(_0x1e9b34){const _0x1b2583=a102_0x435497;return{'type':'segment','name':_0x1e9b34['name'],..._0x1e9b34[_0x1b2583(0x255)]!==undefined&&{'description':_0x1e9b34[_0x1b2583(0x255)]},..._0x1e9b34[_0x1b2583(0x22b)]!==undefined&&{'folder':_0x1e9b34[_0x1b2583(0x22b)]},..._0x1e9b34[_0x1b2583(0x204)]&&{'rule':normalizeRule(_0x1e9b34['rule'])},..._0x1e9b34[_0x1b2583(0x238)]!==undefined&&{'kind':_0x1e9b34['kind']},..._0x1e9b34['visible']!==undefined&&{'visible':_0x1e9b34[_0x1b2583(0x22a)]},..._0x1e9b34['activations']&&{'activations':_0x1e9b34['activations'][_0x1b2583(0x200)](normalizeActivation)}};}export function normalizeRule(_0x46b2a7){const _0xe8dcf=a102_0x435497;return{'type':_0x46b2a7['type'],'conditions':_0x46b2a7[_0xe8dcf(0x21e)][_0xe8dcf(0x200)](normalizeCondition),..._0x46b2a7[_0xe8dcf(0x255)]!==undefined&&{'description':_0x46b2a7[_0xe8dcf(0x255)]}};}function normalizeCondition(_0x230796){const _0x1134c2=a102_0x435497;if(_0x1134c2(0x274)in _0x230796&&(_0x230796[_0x1134c2(0x23a)]===_0x1134c2(0x201)||_0x230796[_0x1134c2(0x23a)]===_0x1134c2(0x21c))){const _0x43d8eb=_0x230796;return{'type':_0x43d8eb['type'],'segment':_0x43d8eb[_0x1134c2(0x274)]};}if(_0x1134c2(0x23a)in _0x230796&&(_0x230796[_0x1134c2(0x23a)]===_0x1134c2(0x1ed)||_0x230796[_0x1134c2(0x23a)]==='Or')){const _0x1b25d7=_0x230796;return{'type':_0x1b25d7['type'],'conditions':_0x1b25d7['conditions']['map'](normalizeCondition),..._0x1b25d7[_0x1134c2(0x255)]!==undefined&&{'description':_0x1b25d7[_0x1134c2(0x255)]}};}const _0x589a0a=_0x230796;return{'type':_0x1134c2(0x220),'attribute':_0x589a0a[_0x1134c2(0x22f)],'operator':normalizeOperator(_0x589a0a[_0x1134c2(0x21d)]),..._0x589a0a['arrayMatching']!==undefined&&{'arrayMatching':_0x589a0a[_0x1134c2(0x1fa)]},..._0x589a0a[_0x1134c2(0x21c)]!==undefined&&{'exclude':_0x589a0a[_0x1134c2(0x21c)]},..._0x589a0a[_0x1134c2(0x257)]!==undefined&&{'aggregation':_0x589a0a['aggregation']},..._0x589a0a['source']!==undefined&&{'source':_0x589a0a[_0x1134c2(0x247)]},..._0x589a0a['filter']!==undefined&&{'filter':normalizeRule(_0x589a0a[_0x1134c2(0x1ee)])},..._0x589a0a['limit']!==undefined&&{'limit':_0x589a0a[_0x1134c2(0x244)]}};}function normalizeOperator(_0x563eee){const _0x41b4cd=a102_0x435497,_0x11a874=getEffectiveValue(_0x563eee);return{'type':_0x563eee['type'],..._0x563eee[_0x41b4cd(0x278)]!==undefined&&{'not':_0x563eee['not']},..._0x11a874!==undefined&&{'value':_0x11a874},..._0x563eee['min']!==undefined&&{'min':_0x563eee[_0x41b4cd(0x24b)]},..._0x563eee['max']!==undefined&&{'max':_0x563eee[_0x41b4cd(0x207)]},..._0x563eee[_0x41b4cd(0x1f5)]!==undefined&&{'unit':_0x563eee[_0x41b4cd(0x1f5)]},..._0x563eee[_0x41b4cd(0x1f0)]!==undefined&&{'duration':_0x563eee[_0x41b4cd(0x1f0)]},..._0x563eee[_0x41b4cd(0x251)]!==undefined&&{'from':_0x563eee[_0x41b4cd(0x251)]}};}function normalizeActivation(_0x8af785){const _0x4f3ccf=a102_0x435497;return{'name':_0x8af785[_0x4f3ccf(0x215)],'connection':_0x8af785[_0x4f3ccf(0x237)],..._0x8af785['description']!==undefined&&{'description':_0x8af785[_0x4f3ccf(0x255)]},..._0x8af785['all_columns']!==undefined&&{'all_columns':_0x8af785[_0x4f3ccf(0x235)]},..._0x8af785[_0x4f3ccf(0x228)]!==undefined&&{'columns':_0x8af785[_0x4f3ccf(0x228)]},..._0x8af785[_0x4f3ccf(0x26a)]!==undefined&&{'behavior':_0x8af785[_0x4f3ccf(0x26a)]},..._0x8af785['schedule']!==undefined&&{'schedule':_0x8af785[_0x4f3ccf(0x233)]},..._0x8af785[_0x4f3ccf(0x1ff)]!==undefined&&{'notification':_0x8af785[_0x4f3ccf(0x1ff)]},..._0x8af785[_0x4f3ccf(0x210)]!==undefined&&{'connector_config':_0x8af785[_0x4f3ccf(0x210)]},..._0x8af785[_0x4f3ccf(0x248)]!==undefined&&{'activation_template_id':_0x8af785[_0x4f3ccf(0x248)]}};}export function activationResponseToDef(_0x1b57ff,_0x3fb838,_0x2ad998){const _0x1f88f6=a102_0x435497,_0x624109=_0x1b57ff['connectionId']||'',_0x4eb477=_0x2ad998?.[_0x1f88f6(0x1fe)](_0x624109)??_0x624109,_0xd2f64a={'name':_0x1b57ff[_0x1f88f6(0x215)],'connection':_0x4eb477};_0x1b57ff['description']&&(_0xd2f64a['description']=_0x1b57ff[_0x1f88f6(0x255)]);let _0x546747=[];_0x1b57ff['columns']&&_0x1b57ff['columns'][_0x1f88f6(0x20b)]>0x0&&(_0x546747=_0x1b57ff[_0x1f88f6(0x228)]['filter'](_0x38571a=>_0x38571a&&_0x38571a[_0x1f88f6(0x215)])[_0x1f88f6(0x200)](_0x21b90f=>{const _0x331ac0=_0x1f88f6;if(_0x21b90f[_0x331ac0(0x23a)]||_0x21b90f[_0x331ac0(0x240)])return{'name':_0x21b90f[_0x331ac0(0x215)],..._0x21b90f['type']&&{'type':_0x21b90f[_0x331ac0(0x23a)]},..._0x21b90f[_0x331ac0(0x240)]&&{'visibility':_0x21b90f[_0x331ac0(0x240)]}};return _0x21b90f['name'];}));_0x546747[_0x1f88f6(0x20b)]>0x0&&(_0xd2f64a[_0x1f88f6(0x228)]=_0x546747);_0x1b57ff['allColumns']!==undefined&&(_0x1b57ff[_0x1f88f6(0x25a)]===![]&&_0x546747[_0x1f88f6(0x20b)]===0x0?_0xd2f64a[_0x1f88f6(0x235)]=!![]:_0xd2f64a['all_columns']=_0x1b57ff['allColumns']);const _0x5355a8={};let _0x3c1e5f=![];_0x1b57ff['scheduleType']&&(_0x5355a8[_0x1f88f6(0x23a)]=_0x1b57ff['scheduleType'],_0x3c1e5f=!![]);_0x1b57ff[_0x1f88f6(0x23c)]&&(_0x5355a8[_0x1f88f6(0x1f9)]=_0x1b57ff['repeatUnit'],_0x3c1e5f=!![]);_0x1b57ff[_0x1f88f6(0x1f7)]!==undefined&&_0x1b57ff[_0x1f88f6(0x1f7)]!==null&&(_0x5355a8[_0x1f88f6(0x263)]=_0x1b57ff[_0x1f88f6(0x1f7)],_0x3c1e5f=!![]);_0x1b57ff[_0x1f88f6(0x258)]&&_0x1b57ff[_0x1f88f6(0x258)][_0x1f88f6(0x20b)]>0x0&&(_0x5355a8[_0x1f88f6(0x227)]=_0x1b57ff['repeatSubFrequency'],_0x3c1e5f=!![]);_0x1b57ff[_0x1f88f6(0x213)]!==undefined&&(_0x5355a8['start_at']=_0x1b57ff[_0x1f88f6(0x213)],_0x3c1e5f=!![]);_0x1b57ff[_0x1f88f6(0x1fb)]!==undefined&&(_0x5355a8[_0x1f88f6(0x1f1)]=_0x1b57ff[_0x1f88f6(0x1fb)],_0x3c1e5f=!![]);_0x1b57ff[_0x1f88f6(0x1f8)]&&(_0x5355a8['timezone']=_0x1b57ff[_0x1f88f6(0x1f8)],_0x3c1e5f=!![]);_0x3c1e5f&&(_0xd2f64a[_0x1f88f6(0x233)]=_0x5355a8);(_0x1b57ff[_0x1f88f6(0x260)]&&_0x1b57ff[_0x1f88f6(0x260)][_0x1f88f6(0x20b)]>0x0||_0x1b57ff[_0x1f88f6(0x275)]&&_0x1b57ff[_0x1f88f6(0x275)][_0x1f88f6(0x20b)]>0x0)&&(_0xd2f64a[_0x1f88f6(0x1ff)]={},_0x1b57ff[_0x1f88f6(0x260)]&&_0x1b57ff['notifyOn'][_0x1f88f6(0x20b)]>0x0&&(_0xd2f64a[_0x1f88f6(0x1ff)][_0x1f88f6(0x217)]=_0x1b57ff[_0x1f88f6(0x260)]),_0x1b57ff[_0x1f88f6(0x275)]&&_0x1b57ff[_0x1f88f6(0x275)]['length']>0x0&&(_0xd2f64a['notification'][_0x1f88f6(0x25b)]=_0x1b57ff[_0x1f88f6(0x275)][_0x1f88f6(0x200)](_0x24cbac=>{const _0x4249ea=_0x1f88f6,_0x2d5324=_0x3fb838?.[_0x4249ea(0x1fe)](_0x24cbac);return _0x2d5324??String(_0x24cbac);})));_0x1b57ff[_0x1f88f6(0x26b)]&&Object[_0x1f88f6(0x226)](_0x1b57ff['connectorConfig'])[_0x1f88f6(0x20b)]>0x0&&(_0xd2f64a['connector_config']=normalizeConnectorConfigForYaml(_0x1b57ff[_0x1f88f6(0x26b)]));_0x1b57ff[_0x1f88f6(0x218)]&&(_0xd2f64a['activation_template_id']=_0x1b57ff['activationTemplateId']);if(_0x1b57ff['syndicationBehavior']){const _0x15473d={},_0x27cd27=_0x1b57ff[_0x1f88f6(0x25f)];_0x27cd27[_0x1f88f6(0x228)]&&_0x27cd27[_0x1f88f6(0x228)][_0x1f88f6(0x20b)]>0x0&&(_0x15473d[_0x1f88f6(0x228)]=_0x27cd27[_0x1f88f6(0x228)][_0x1f88f6(0x1ee)](_0x161c91=>_0x161c91&&_0x161c91['name'])[_0x1f88f6(0x200)](_0x1b6f4a=>({'name':_0x1b6f4a['name'],..._0x1b6f4a[_0x1f88f6(0x23a)]&&{'type':_0x1b6f4a[_0x1f88f6(0x23a)]},..._0x1b6f4a[_0x1f88f6(0x240)]&&{'visibility':_0x1b6f4a[_0x1f88f6(0x240)]}}))),_0x27cd27[_0x1f88f6(0x219)]&&(_0x15473d[_0x1f88f6(0x1f4)]=_0x27cd27['behaviorTableName']),_0x27cd27[_0x1f88f6(0x277)]!==undefined&&(_0x15473d[_0x1f88f6(0x252)]=_0x27cd27['joinRow']),_0x27cd27[_0x1f88f6(0x242)]&&(_0x15473d['join_strategy']=_0x27cd27[_0x1f88f6(0x242)]),_0x27cd27['formatting']&&(_0x15473d[_0x1f88f6(0x249)]=_0x27cd27[_0x1f88f6(0x249)]),_0x27cd27[_0x1f88f6(0x26e)]&&_0x27cd27[_0x1f88f6(0x26e)][_0x1f88f6(0x20b)]>0x0&&(_0x15473d[_0x1f88f6(0x26d)]=_0x27cd27['orderBy']),Object[_0x1f88f6(0x226)](_0x15473d)['length']>0x0&&(_0xd2f64a[_0x1f88f6(0x26a)]=_0x15473d);}return _0xd2f64a;}export function journeyActivationStepToYaml(_0x3a3ecc,_0x35a156,_0xe2d5e3){const _0x332ac0=a102_0x435497,_0x4a0f83=_0x3a3ecc['attributes'][_0x332ac0(0x216)],_0x44ed48=_0x4a0f83[_0x332ac0(0x21b)]||'',_0x146851=_0xe2d5e3?.[_0x332ac0(0x1fe)](_0x44ed48)??_0x44ed48,_0x4a5760={'name':_0x4a0f83[_0x332ac0(0x215)]||'','connection':_0x146851};_0x4a0f83[_0x332ac0(0x255)]&&(_0x4a5760[_0x332ac0(0x255)]=_0x4a0f83['description']);let _0x1537bc=[];_0x4a0f83[_0x332ac0(0x228)]&&_0x4a0f83[_0x332ac0(0x228)]['length']>0x0&&(_0x1537bc=_0x4a0f83[_0x332ac0(0x228)][_0x332ac0(0x1ee)](_0x2e7c3b=>_0x2e7c3b&&_0x2e7c3b['name'])[_0x332ac0(0x200)](_0x5defec=>{const _0x53fec2=_0x332ac0;if(_0x5defec[_0x53fec2(0x23a)]||_0x5defec[_0x53fec2(0x240)])return{'name':_0x5defec[_0x53fec2(0x215)],..._0x5defec[_0x53fec2(0x23a)]&&{'type':_0x5defec[_0x53fec2(0x23a)]},..._0x5defec[_0x53fec2(0x240)]&&{'visibility':_0x5defec['visibility']}};return _0x5defec['name'];}));_0x1537bc[_0x332ac0(0x20b)]>0x0&&(_0x4a5760[_0x332ac0(0x228)]=_0x1537bc);_0x4a0f83[_0x332ac0(0x25a)]!==undefined&&(_0x4a0f83[_0x332ac0(0x25a)]===![]&&_0x1537bc[_0x332ac0(0x20b)]===0x0?_0x4a5760[_0x332ac0(0x235)]=!![]:_0x4a5760[_0x332ac0(0x235)]=_0x4a0f83['allColumns']);const _0x2f37f7={};let _0x11493d=![];_0x4a0f83[_0x332ac0(0x26f)]&&(_0x2f37f7[_0x332ac0(0x23a)]=_0x4a0f83['scheduleType'],_0x11493d=!![]);_0x4a0f83[_0x332ac0(0x23c)]&&(_0x2f37f7[_0x332ac0(0x1f9)]=_0x4a0f83[_0x332ac0(0x23c)],_0x11493d=!![]);_0x4a0f83[_0x332ac0(0x1f7)]!==undefined&&_0x4a0f83['repeatFrequency']!==null&&(_0x2f37f7['repeat_frequency']=_0x4a0f83['repeatFrequency'],_0x11493d=!![]);_0x4a0f83['startAt']!==undefined&&(_0x2f37f7['start_at']=_0x4a0f83[_0x332ac0(0x213)],_0x11493d=!![]);_0x4a0f83[_0x332ac0(0x1fb)]!==undefined&&(_0x2f37f7['end_on']=_0x4a0f83['endOn'],_0x11493d=!![]);_0x4a0f83['timezone']&&(_0x2f37f7[_0x332ac0(0x1f8)]=_0x4a0f83['timezone'],_0x11493d=!![]);_0x11493d&&(_0x4a5760[_0x332ac0(0x233)]=_0x2f37f7);(_0x4a0f83['notifyOn']&&_0x4a0f83['notifyOn'][_0x332ac0(0x20b)]>0x0||_0x4a0f83[_0x332ac0(0x275)]&&_0x4a0f83['emailRecipients'][_0x332ac0(0x20b)]>0x0)&&(_0x4a5760[_0x332ac0(0x1ff)]={},_0x4a0f83[_0x332ac0(0x260)]&&_0x4a0f83[_0x332ac0(0x260)][_0x332ac0(0x20b)]>0x0&&(_0x4a5760[_0x332ac0(0x1ff)][_0x332ac0(0x217)]=_0x4a0f83[_0x332ac0(0x260)]),_0x4a0f83[_0x332ac0(0x275)]&&_0x4a0f83[_0x332ac0(0x275)]['length']>0x0&&(_0x4a5760[_0x332ac0(0x1ff)][_0x332ac0(0x25b)]=_0x4a0f83[_0x332ac0(0x275)][_0x332ac0(0x200)](_0x3874ae=>{const _0x178387=_0x332ac0,_0x233922=_0x35a156?.[_0x178387(0x1fe)](_0x3874ae);return _0x233922??String(_0x3874ae);})));_0x4a0f83[_0x332ac0(0x26b)]&&Object[_0x332ac0(0x226)](_0x4a0f83[_0x332ac0(0x26b)])[_0x332ac0(0x20b)]>0x0&&(_0x4a5760[_0x332ac0(0x210)]=normalizeConnectorConfigForYaml(_0x4a0f83[_0x332ac0(0x26b)]));_0x4a0f83[_0x332ac0(0x218)]&&(_0x4a5760[_0x332ac0(0x248)]=_0x4a0f83[_0x332ac0(0x218)]);if(_0x4a0f83[_0x332ac0(0x25f)]){const _0x338db1={},_0x235d54=_0x4a0f83['syndicationBehavior'];_0x235d54['columns']&&_0x235d54[_0x332ac0(0x228)][_0x332ac0(0x20b)]>0x0&&(_0x338db1[_0x332ac0(0x228)]=_0x235d54[_0x332ac0(0x228)][_0x332ac0(0x1ee)](_0x2c6961=>_0x2c6961&&_0x2c6961[_0x332ac0(0x215)])[_0x332ac0(0x200)](_0x4c3ebb=>({'name':_0x4c3ebb['name'],..._0x4c3ebb[_0x332ac0(0x23a)]&&{'type':_0x4c3ebb[_0x332ac0(0x23a)]},..._0x4c3ebb['visibility']&&{'visibility':_0x4c3ebb[_0x332ac0(0x240)]}}))),_0x235d54['behaviorTableName']&&(_0x338db1[_0x332ac0(0x1f4)]=_0x235d54[_0x332ac0(0x219)]),_0x235d54['joinRow']!==undefined&&(_0x338db1['join_row']=_0x235d54[_0x332ac0(0x277)]),_0x235d54['joinStrategy']&&(_0x338db1[_0x332ac0(0x24d)]=_0x235d54[_0x332ac0(0x242)]),_0x235d54[_0x332ac0(0x249)]&&(_0x338db1[_0x332ac0(0x249)]=_0x235d54[_0x332ac0(0x249)]),_0x235d54['orderBy']&&_0x235d54[_0x332ac0(0x26e)][_0x332ac0(0x20b)]>0x0&&(_0x338db1['order_by']=_0x235d54[_0x332ac0(0x26e)]),Object[_0x332ac0(0x226)](_0x338db1)[_0x332ac0(0x20b)]>0x0&&(_0x4a5760[_0x332ac0(0x26a)]=_0x338db1);}return _0x4a5760;}export function segmentWithActivationsToYaml(_0x2122b7,_0x3630a9,_0x216a20,_0x3f077e,_0x45a657){const _0x251b54=a102_0x435497,_0x1d91a8=segmentResponseToDefSync(_0x2122b7,_0x216a20);return _0x3630a9[_0x251b54(0x20b)]>0x0&&(_0x1d91a8['activations']=_0x3630a9[_0x251b54(0x200)](_0x252a53=>activationResponseToDef(_0x252a53,_0x3f077e,_0x45a657))),_0x1d91a8;}function normalizeColumn(_0x16b5db){const _0x21565c=a102_0x435497;if(typeof _0x16b5db==='string')return{'name':_0x16b5db};return{'name':_0x16b5db[_0x21565c(0x215)],..._0x16b5db[_0x21565c(0x23a)]&&{'type':_0x16b5db[_0x21565c(0x23a)]},..._0x16b5db[_0x21565c(0x240)]&&{'visibility':_0x16b5db[_0x21565c(0x240)]}};}function a102_0x405c(){const _0x59fecd=['connector_config','add','warnings','startAt','rightValues','name','activationParams','notify_on','activationTemplateId','behaviorTableName','12MhxOrY','connectionId','exclude','operator','conditions','Unknown\x20email\x20recipient:\x20','Value','emailToIdMap','forEach','2386982EsLRkL','1vLLhTn','isVisible','keys','repeat_sub_frequency','columns','value','visible','folder','\x27:\x20','resolveSegmentName','140433zVAkrS','attribute','test','1168ICOrGU','parse','schedule','64097cOtqkV','all_columns','usedNames','connection','kind','92gVIaiS','type','localRuleToName','repeatUnit','\x0a\x0aAvailable\x20fields:\x0a','realtime','Segment\x20description','visibility','INVALID_ARGUMENT','joinStrategy','1990aCnTyV','limit','2813316CfbQJd','Connector:\x20','source','activation_template_id','formatting','code','min','segmentFolderId','join_strategy','5163660QAQSxo','connectionNameToTypeMap','Please\x20specify\x20a\x20valid\x20attribute\x20name.','from','join_row','TimeWithinNext','leftValue','description','activations:','aggregation','repeatSubFrequency','rule:','allColumns','email_recipients','localeCompare','5805tOoxbY','].attribute\x20cannot\x20be\x20empty.\x0a','syndicationBehavior','notifyOn','all','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','repeat_frequency','stringify','getSchema','New\x20Segment','sort','JOURNEY_SYNTAX_ERROR','YAML\x20config\x20missing\x20required\x20field:\x20name','behavior','connectorConfig','rightValue','order_by','orderBy','scheduleType','string','set','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','has','segment','emailRecipients','__UNRESOLVED__','joinRow','not','connectionNameToIdMap','attribute_name','And','filter','7mLeddc','duration','end_on','\x22:\x0a','groupingColumns','behavior_table','unit','values','repeatFrequency','timezone','repeat_unit','arrayMatching','endOn','Reference','push','get','notification','map','include','Unknown\x20connection:\x20','batch','rule','replace','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','max','start_at','8685528hcrZbZ','object','length','errors','toLowerCase','any','isArray'];a102_0x405c=function(){return _0x59fecd;};return a102_0x405c();}function a102_0x3b3f(_0x28f93b,_0x51fa4f){_0x28f93b=_0x28f93b-0x1ec;const _0x405c17=a102_0x405c();let _0x3b3f99=_0x405c17[_0x28f93b];return _0x3b3f99;}export async function activationDefToCreateRequest(_0x29a104,_0x961a97){const _0x52f96e=a102_0x435497,_0x281bf6=_0x961a97?.[_0x52f96e(0x221)],_0x466de2=_0x961a97?.[_0x52f96e(0x279)],_0x51f7d5=_0x29a104[_0x52f96e(0x237)];let _0x48b633;const _0x29820d=parseInt(_0x51f7d5,0xa);if(!isNaN(_0x29820d)&&String(_0x29820d)===_0x51f7d5)_0x48b633=_0x29820d;else{const _0x43be6d=_0x466de2?.[_0x52f96e(0x1fe)](_0x51f7d5);if(_0x43be6d===undefined)throw new SDKError(ErrorCode['CONNECTION_NOT_FOUND'],_0x52f96e(0x202)+_0x51f7d5,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x48b633=_0x43be6d;}const _0x853425={'name':_0x29a104['name'],'connectionId':_0x48b633};_0x29a104[_0x52f96e(0x255)]&&(_0x853425['description']=_0x29a104['description']);let _0x5bfa87=[];_0x29a104['columns']&&_0x29a104[_0x52f96e(0x228)][_0x52f96e(0x20b)]>0x0&&(_0x5bfa87=_0x29a104['columns'][_0x52f96e(0x1ee)](_0x18c3d2=>_0x18c3d2!=null)[_0x52f96e(0x200)](normalizeColumn));_0x5bfa87[_0x52f96e(0x20b)]>0x0&&(_0x853425[_0x52f96e(0x228)]=_0x5bfa87);_0x29a104[_0x52f96e(0x235)]!==undefined&&(_0x29a104[_0x52f96e(0x235)]===![]&&_0x5bfa87[_0x52f96e(0x20b)]===0x0?_0x853425[_0x52f96e(0x25a)]=!![]:_0x853425[_0x52f96e(0x25a)]=_0x29a104[_0x52f96e(0x235)]);if(_0x29a104['schedule']){const _0x36c6b5=_0x29a104[_0x52f96e(0x233)];_0x36c6b5[_0x52f96e(0x23a)]&&(_0x853425[_0x52f96e(0x26f)]=_0x36c6b5[_0x52f96e(0x23a)]),_0x36c6b5[_0x52f96e(0x1f9)]&&(_0x853425['repeatUnit']=_0x36c6b5[_0x52f96e(0x1f9)]),_0x36c6b5[_0x52f96e(0x263)]!==undefined&&(_0x853425[_0x52f96e(0x1f7)]=_0x36c6b5['repeat_frequency']),_0x36c6b5[_0x52f96e(0x227)]&&(_0x853425[_0x52f96e(0x258)]=_0x36c6b5[_0x52f96e(0x227)]),_0x36c6b5[_0x52f96e(0x208)]!==undefined&&(_0x853425[_0x52f96e(0x213)]=_0x36c6b5[_0x52f96e(0x208)]),_0x36c6b5[_0x52f96e(0x1f1)]!==undefined&&(_0x853425[_0x52f96e(0x1fb)]=_0x36c6b5[_0x52f96e(0x1f1)]),_0x36c6b5[_0x52f96e(0x1f8)]&&(_0x853425['timezone']=_0x36c6b5['timezone']);}_0x29a104[_0x52f96e(0x1ff)]&&(_0x29a104[_0x52f96e(0x1ff)][_0x52f96e(0x217)]&&(_0x853425[_0x52f96e(0x260)]=_0x29a104[_0x52f96e(0x1ff)][_0x52f96e(0x217)]),_0x29a104[_0x52f96e(0x1ff)][_0x52f96e(0x25b)]&&(_0x853425[_0x52f96e(0x275)]=_0x29a104[_0x52f96e(0x1ff)][_0x52f96e(0x25b)]['map'](_0x4d47c6=>{const _0x1a869c=_0x52f96e,_0x3a9769=Number(_0x4d47c6);if(!isNaN(_0x3a9769)&&String(_0x3a9769)===_0x4d47c6)return _0x3a9769;const _0x197dea=_0x281bf6?.[_0x1a869c(0x1fe)](_0x4d47c6[_0x1a869c(0x20d)]());if(_0x197dea===undefined)throw new SDKError(ErrorCode[_0x1a869c(0x241)],_0x1a869c(0x21f)+_0x4d47c6+_0x1a869c(0x262));return _0x197dea;})));if(_0x29a104['connector_config']){const _0x5986d0=_0x961a97?.[_0x52f96e(0x24f)]?.[_0x52f96e(0x1fe)](_0x51f7d5);if(_0x5986d0&&_0x961a97?.[_0x52f96e(0x265)])try{const _0x26c513=await _0x961a97[_0x52f96e(0x265)](_0x5986d0),_0x3fa281=validateConnectorConfig(_0x29a104[_0x52f96e(0x210)],_0x26c513);if(!_0x3fa281['valid'])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x29a104['name']+_0x52f96e(0x1f2)+formatValidationErrors(_0x3fa281[_0x52f96e(0x20c)]),undefined,{'helpText':_0x52f96e(0x246)+_0x5986d0+_0x52f96e(0x23d)+formatSchemaAsHelp(_0x26c513)});if(_0x3fa281[_0x52f96e(0x212)][_0x52f96e(0x20b)]>0x0){const _0x31333e=formatValidationWarnings(_0x3fa281[_0x52f96e(0x212)]);console['warn']('connector_config\x20for\x20activation\x20\x22'+_0x29a104[_0x52f96e(0x215)]+_0x52f96e(0x1f2)+_0x31333e);}_0x853425['connectorConfig']=transformConfigToLegacy(_0x29a104[_0x52f96e(0x210)],_0x26c513);}catch(_0x42b897){if(_0x42b897 instanceof SDKError&&_0x42b897[_0x52f96e(0x24a)]===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x853425['connectorConfig']=_0x29a104[_0x52f96e(0x210)];else throw _0x42b897;}else _0x853425[_0x52f96e(0x26b)]=_0x29a104[_0x52f96e(0x210)];}_0x29a104[_0x52f96e(0x248)]!==undefined&&(_0x853425[_0x52f96e(0x218)]=_0x29a104[_0x52f96e(0x248)]);if(_0x29a104[_0x52f96e(0x26a)]){const _0x52c37c=_0x29a104[_0x52f96e(0x26a)],_0x517d44={};if(_0x52c37c[_0x52f96e(0x228)]&&_0x52c37c[_0x52f96e(0x228)][_0x52f96e(0x20b)]>0x0){const _0x29ac5c=_0x52c37c[_0x52f96e(0x228)][_0x52f96e(0x1ee)](_0x327598=>_0x327598&&_0x327598['name']);_0x29ac5c['length']>0x0&&(_0x517d44['columns']=_0x29ac5c);}_0x52c37c[_0x52f96e(0x1f4)]&&(_0x517d44[_0x52f96e(0x219)]=_0x52c37c['behavior_table']),_0x52c37c['join_row']!==undefined&&(_0x517d44['joinRow']=_0x52c37c[_0x52f96e(0x252)]),_0x52c37c['join_strategy']&&(_0x517d44[_0x52f96e(0x242)]=_0x52c37c['join_strategy']),_0x52c37c[_0x52f96e(0x249)]&&(_0x517d44['formatting']=_0x52c37c[_0x52f96e(0x249)]),_0x52c37c['order_by']&&(_0x517d44['orderBy']=_0x52c37c[_0x52f96e(0x26d)]),_0x853425[_0x52f96e(0x25f)]=_0x517d44;}return _0x853425;}export async function activationDefToUpdateRequest(_0x5ca34a,_0x34fb6d){return activationDefToCreateRequest(_0x5ca34a,_0x34fb6d);}export function deepSortObject(_0x5dee2f){const _0x33bde6=a102_0x435497;if(_0x5dee2f===null||typeof _0x5dee2f!==_0x33bde6(0x20a))return _0x5dee2f;if(Array['isArray'](_0x5dee2f))return _0x5dee2f[_0x33bde6(0x200)](deepSortObject)[_0x33bde6(0x267)]((_0x4a8e1e,_0x1d20e9)=>JSON[_0x33bde6(0x264)](_0x4a8e1e)[_0x33bde6(0x25c)](JSON['stringify'](_0x1d20e9)));const _0x134265={};for(const _0x47e4d4 of Object[_0x33bde6(0x226)](_0x5dee2f)[_0x33bde6(0x267)]()){_0x134265[_0x47e4d4]=deepSortObject(_0x5dee2f[_0x47e4d4]);}return _0x134265;}export function serializeRule(_0x3b954e){return JSON['stringify'](deepSortObject(_0x3b954e));}export function normalizeRuleForMatching(_0xc0d7c7){return normalizeConditionsForMatching(_0xc0d7c7);}function normalizeConditionsForMatching(_0x15bec8){const _0x433978=a102_0x435497;if(_0x15bec8===null||typeof _0x15bec8!==_0x433978(0x20a))return _0x15bec8;if(Array[_0x433978(0x20f)](_0x15bec8))return _0x15bec8[_0x433978(0x200)](normalizeConditionsForMatching);const _0x202771=_0x15bec8;if((_0x202771[_0x433978(0x23a)]===_0x433978(0x201)||_0x202771[_0x433978(0x23a)]===_0x433978(0x21c))&&typeof _0x202771[_0x433978(0x274)]==='string')return{..._0x202771,'segment':'__SEGMENT_REF__'};const _0x582a1a={};for(const _0x5eb59e of Object[_0x433978(0x226)](_0x202771)){_0x582a1a[_0x5eb59e]=normalizeConditionsForMatching(_0x202771[_0x5eb59e]);}return _0x582a1a;}export function serializeRuleForMatching(_0x32c37f){return JSON['stringify'](deepSortObject(normalizeRuleForMatching(_0x32c37f)));}export function expandSegmentReferences(_0x15aad2,_0x3e382f,_0x3fec1b=new Set()){return expandConditions(_0x15aad2,_0x3e382f,_0x3fec1b);}function expandConditions(_0x56aaae,_0x9ed83b,_0x5bab04){const _0x5ce63e=a102_0x435497;if(_0x56aaae===null||typeof _0x56aaae!==_0x5ce63e(0x20a))return _0x56aaae;if(Array['isArray'](_0x56aaae))return _0x56aaae[_0x5ce63e(0x200)](_0x59e6c0=>expandConditions(_0x59e6c0,_0x9ed83b,_0x5bab04));const _0x571720=_0x56aaae;if((_0x571720[_0x5ce63e(0x23a)]===_0x5ce63e(0x201)||_0x571720[_0x5ce63e(0x23a)]==='exclude')&&typeof _0x571720['segment']==='string'){const _0x52dbd2=_0x571720[_0x5ce63e(0x274)],_0x440f16=_0x9ed83b[_0x5ce63e(0x1fe)](_0x52dbd2);if(_0x440f16&&!_0x5bab04['has'](_0x52dbd2)){const _0x21761c=new Set(_0x5bab04);_0x21761c[_0x5ce63e(0x211)](_0x52dbd2);const _0x55c5ab=expandConditions(_0x440f16,_0x9ed83b,_0x21761c);return{'type':_0x571720[_0x5ce63e(0x23a)],'expanded_rule':_0x55c5ab};}return{'type':_0x571720[_0x5ce63e(0x23a)],'expanded_rule':_0x5ce63e(0x276)};}const _0x3abd6a={};for(const _0x2cfff9 of Object[_0x5ce63e(0x226)](_0x571720)){_0x3abd6a[_0x2cfff9]=expandConditions(_0x571720[_0x2cfff9],_0x9ed83b,_0x5bab04);}return _0x3abd6a;}export function serializeExpandedRule(_0x4043b1,_0x4df523){const _0x1cf6df=expandSegmentReferences(_0x4043b1,_0x4df523);return JSON['stringify'](deepSortObject(_0x1cf6df));}export function createSegmentNameContext(_0x11de44){const _0x2cf0f5=a102_0x435497,_0x3d4933=new Set(),_0xfa8d8d=new Map(),_0x38ea04=new Map();if(_0x11de44)for(const [_0x59f43e,_0x241104]of Object['entries'](_0x11de44)){if(_0x241104[_0x2cf0f5(0x204)]){const _0x17ab3b=serializeRule(_0x241104[_0x2cf0f5(0x204)]);_0x38ea04[_0x2cf0f5(0x271)](_0x17ab3b,_0x59f43e),_0x3d4933[_0x2cf0f5(0x211)](_0x59f43e);}}return{'usedNames':_0x3d4933,'ruleHashToName':_0xfa8d8d,'localRuleToName':_0x11de44?_0x38ea04:undefined};}export function resolveSegmentName(_0x35ff77,_0x1857e3,_0x40122a,_0x50c98e){const _0x3d5180=a102_0x435497,_0x5cfdc6=serializeRule(_0x1857e3);if(_0x40122a[_0x3d5180(0x23b)]){const _0x2a16cd=_0x40122a[_0x3d5180(0x23b)][_0x3d5180(0x1fe)](_0x5cfdc6);if(_0x2a16cd)return{'name':_0x2a16cd,'isDuplicate':![],'isLocalMatch':!![]};}const _0x5a768a=_0x40122a['ruleHashToName']['get'](_0x5cfdc6);if(_0x5a768a)return{'name':_0x5a768a,'isDuplicate':!![],'isLocalMatch':![]};const _0x221c27=_0x50c98e(_0x35ff77);let _0x3b9d86=_0x221c27||_0x35ff77,_0x165226=_0x3b9d86,_0x2f1e35=0x2;while(_0x40122a['usedNames'][_0x3d5180(0x273)](_0x165226)){_0x165226=_0x3b9d86+'_'+_0x2f1e35,_0x2f1e35++;}return _0x40122a[_0x3d5180(0x236)][_0x3d5180(0x211)](_0x165226),_0x40122a['ruleHashToName'][_0x3d5180(0x271)](_0x5cfdc6,_0x165226),{'name':_0x165226,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x46387c){const _0x4a1bed=[],_0x35d94e=_0x4899bf=>{const _0x2c9dbf=a102_0x3b3f;if(!_0x4899bf||typeof _0x4899bf!==_0x2c9dbf(0x20a))return;if(Array[_0x2c9dbf(0x20f)](_0x4899bf)){_0x4899bf[_0x2c9dbf(0x222)](_0x35d94e);return;}const _0x5e6a79=_0x4899bf;(_0x5e6a79[_0x2c9dbf(0x23a)]===_0x2c9dbf(0x201)||_0x5e6a79['type']==='exclude')&&typeof _0x5e6a79[_0x2c9dbf(0x274)]===_0x2c9dbf(0x270)&&_0x4a1bed[_0x2c9dbf(0x1fd)](_0x5e6a79[_0x2c9dbf(0x274)]);for(const _0xe10494 of Object['values'](_0x5e6a79)){_0x35d94e(_0xe10494);}};return _0x35d94e(_0x46387c),_0x4a1bed;}export function validateSegmentRule(_0x33f7a1,_0x3c7b74){const _0x2315a4=a102_0x435497;if(!_0x3c7b74||!_0x3c7b74['conditions'])return;for(let _0x4fbb28=0x0;_0x4fbb28<_0x3c7b74[_0x2315a4(0x21e)][_0x2315a4(0x20b)];_0x4fbb28++){const _0x25bf7e=_0x3c7b74[_0x2315a4(0x21e)][_0x4fbb28];if(_0x2315a4(0x23a)in _0x25bf7e&&_0x25bf7e[_0x2315a4(0x23a)]===_0x2315a4(0x220)){const _0x3f477f=_0x25bf7e;if(!_0x3f477f['attribute']||_0x3f477f[_0x2315a4(0x22f)]==='')throw new SDKError(ErrorCode[_0x2315a4(0x268)],_0x2315a4(0x206)+_0x33f7a1+_0x2315a4(0x22c)+('conditions['+_0x4fbb28+_0x2315a4(0x25e))+_0x2315a4(0x250));}}}
1
+ (function(_0x596aa8,_0x4a7ce1){const _0x1d8c0b=a102_0x2f61,_0x4d5503=_0x596aa8();while(!![]){try{const _0x1a4068=parseInt(_0x1d8c0b(0x253))/0x1+-parseInt(_0x1d8c0b(0x239))/0x2+-parseInt(_0x1d8c0b(0x210))/0x3+parseInt(_0x1d8c0b(0x23a))/0x4*(-parseInt(_0x1d8c0b(0x265))/0x5)+parseInt(_0x1d8c0b(0x266))/0x6+parseInt(_0x1d8c0b(0x1ec))/0x7*(parseInt(_0x1d8c0b(0x24b))/0x8)+parseInt(_0x1d8c0b(0x230))/0x9*(parseInt(_0x1d8c0b(0x261))/0xa);if(_0x1a4068===_0x4a7ce1)break;else _0x4d5503['push'](_0x4d5503['shift']());}catch(_0x141232){_0x4d5503['push'](_0x4d5503['shift']());}}}(a102_0x3587,0xd58af));import*as a102_0x48e21f from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x4ec200,_0x1ec739){const _0x2db4e4=a102_0x2f61,_0x3b6547=_0x4ec200[_0x2db4e4(0x247)]&&'type'in _0x4ec200[_0x2db4e4(0x247)]&&_0x4ec200[_0x2db4e4(0x247)]['type'];return{'type':'segment','name':_0x4ec200['name'],..._0x4ec200['description']&&{'description':_0x4ec200[_0x2db4e4(0x207)]},..._0x1ec739&&{'folder':_0x1ec739},..._0x3b6547&&{'rule':apiRuleToYaml(_0x4ec200[_0x2db4e4(0x247)])},..._0x4ec200['kind']!==undefined&&{'kind':_0x4ec200[_0x2db4e4(0x208)]===0x0?_0x2db4e4(0x211):_0x4ec200[_0x2db4e4(0x208)]===0x1?_0x2db4e4(0x220):_0x2db4e4(0x22e)},..._0x4ec200[_0x2db4e4(0x243)]!==undefined&&{'visible':_0x4ec200['isVisible']}};}export async function segmentResponseToDef(_0xef1561,_0x244118,_0x4c7dcf){const _0x52180b=a102_0x2f61,_0x51df8f=segmentResponseToDefSync(_0xef1561,_0x4c7dcf);if(!_0x244118||!_0x244118['resolveSegmentName'])return _0x51df8f;return _0x51df8f['rule']&&(_0x51df8f[_0x52180b(0x247)]=await resolveRuleSegmentRefs(_0x51df8f[_0x52180b(0x247)],_0x244118[_0x52180b(0x267)])),_0x51df8f;}export function apiRuleToYaml(_0x5583bd){const _0x488cae=a102_0x2f61,_0x170894=(_0x5583bd['conditions']||[])['map'](apiConditionToYaml);if(_0x170894[_0x488cae(0x202)]===0x1&&!_0x5583bd[_0x488cae(0x207)]&&_0x488cae(0x1f5)in _0x170894[0x0]&&(_0x170894[0x0]['type']===_0x488cae(0x22d)||_0x170894[0x0][_0x488cae(0x1f5)]==='Or')){const _0x548b89=_0x170894[0x0];if(_0x548b89[_0x488cae(0x1f5)]===_0x5583bd[_0x488cae(0x1f5)]&&_0x548b89[_0x488cae(0x1f2)])return{'type':_0x5583bd[_0x488cae(0x1f5)],'conditions':_0x548b89[_0x488cae(0x1f2)],..._0x548b89[_0x488cae(0x207)]&&{'description':_0x548b89[_0x488cae(0x207)]}};}return{'type':_0x5583bd[_0x488cae(0x1f5)],'conditions':_0x170894,..._0x5583bd[_0x488cae(0x207)]&&{'description':_0x5583bd[_0x488cae(0x207)]}};}export async function resolveRuleSegmentRefs(_0x27c586,_0x34ca5e){const _0x1078fc=a102_0x2f61,_0x15e1e8=await Promise[_0x1078fc(0x20e)](_0x27c586['conditions'][_0x1078fc(0x1f7)](_0x155fd7=>resolveConditionSegmentRefs(_0x155fd7,_0x34ca5e)));return{..._0x27c586,'conditions':_0x15e1e8};}async function resolveConditionSegmentRefs(_0x475dc6,_0x3ada49){const _0x48e9cb=a102_0x2f61;if('segment'in _0x475dc6&&(_0x475dc6[_0x48e9cb(0x1f5)]==='include'||_0x475dc6['type']===_0x48e9cb(0x1f9))){const _0x1ea479=_0x475dc6;if(/^\d+$/[_0x48e9cb(0x21b)](_0x1ea479[_0x48e9cb(0x1f3)])){const _0x3819ba=await _0x3ada49(_0x1ea479[_0x48e9cb(0x1f3)]);return{..._0x1ea479,'segment':_0x3819ba};}return _0x475dc6;}if(_0x48e9cb(0x1f2)in _0x475dc6&&_0x475dc6[_0x48e9cb(0x1f2)]){const _0x4a97cb=_0x475dc6,_0x52f9ef=await Promise['all'](_0x4a97cb[_0x48e9cb(0x1f2)]['map'](_0x21babc=>resolveConditionSegmentRefs(_0x21babc,_0x3ada49)));return{..._0x4a97cb,'conditions':_0x52f9ef};}if(_0x48e9cb(0x218)in _0x475dc6&&_0x475dc6[_0x48e9cb(0x218)]){const _0x53fcaf=_0x475dc6,_0x446923=await resolveRuleSegmentRefs(_0x53fcaf[_0x48e9cb(0x218)],_0x3ada49);return{..._0x53fcaf,'filter':_0x446923};}return _0x475dc6;}export async function resolveRuleSegmentIds(_0xc071e8,_0x1214df){const _0x38e9cf=a102_0x2f61,_0x1db9ab=await Promise[_0x38e9cf(0x20e)](_0xc071e8[_0x38e9cf(0x1f2)]['map'](_0x2d44f4=>resolveConditionSegmentIds(_0x2d44f4,_0x1214df)));return{..._0xc071e8,'conditions':_0x1db9ab};}async function resolveConditionSegmentIds(_0x3c0cf3,_0x4af942){const _0x5e4666=a102_0x2f61;if(_0x5e4666(0x1f3)in _0x3c0cf3&&(_0x3c0cf3[_0x5e4666(0x1f5)]===_0x5e4666(0x249)||_0x3c0cf3['type']===_0x5e4666(0x1f9))){const _0x1857b8=_0x3c0cf3;if(!/^\d+$/[_0x5e4666(0x21b)](_0x1857b8[_0x5e4666(0x1f3)])){const _0x1d533a=await _0x4af942(_0x1857b8[_0x5e4666(0x1f3)]);return{..._0x1857b8,'segment':_0x1d533a};}return _0x3c0cf3;}if(_0x5e4666(0x1f2)in _0x3c0cf3&&_0x3c0cf3[_0x5e4666(0x1f2)]){const _0x462958=_0x3c0cf3,_0x44f466=await Promise['all'](_0x462958[_0x5e4666(0x1f2)]['map'](_0x6a22ec=>resolveConditionSegmentIds(_0x6a22ec,_0x4af942)));return{..._0x462958,'conditions':_0x44f466};}if(_0x5e4666(0x218)in _0x3c0cf3&&_0x3c0cf3[_0x5e4666(0x218)]){const _0x59205c=_0x3c0cf3,_0x2c261e=await resolveRuleSegmentIds(_0x59205c['filter'],_0x4af942);return{..._0x59205c,'filter':_0x2c261e};}return _0x3c0cf3;}function apiConditionToYaml(_0x14ba7f){const _0x2fc85b=a102_0x2f61;if(_0x14ba7f[_0x2fc85b(0x1f5)]===_0x2fc85b(0x22d)||_0x14ba7f[_0x2fc85b(0x1f5)]==='Or'){if(_0x14ba7f[_0x2fc85b(0x1f2)]){const _0x3aa54d=_0x14ba7f['conditions']['map'](apiConditionToYaml);if(_0x3aa54d[_0x2fc85b(0x202)]===0x1&&!_0x14ba7f[_0x2fc85b(0x207)])return _0x3aa54d[0x0];return{'type':_0x14ba7f[_0x2fc85b(0x1f5)],'conditions':_0x3aa54d,..._0x14ba7f[_0x2fc85b(0x207)]&&{'description':_0x14ba7f[_0x2fc85b(0x207)]}};}}if(_0x14ba7f[_0x2fc85b(0x1f5)]==='Value'&&_0x14ba7f[_0x2fc85b(0x24d)]&&_0x14ba7f[_0x2fc85b(0x26f)]){const _0x1f382a=_0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x219)]?{'type':_0x14ba7f[_0x2fc85b(0x24d)]['aggregation']['type'],..._0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x219)]['groupingColumns']&&{'groupingColumns':_0x14ba7f[_0x2fc85b(0x24d)]['aggregation']['groupingColumns']}}:undefined;return{'type':'Value','attribute':_0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x1fb)]||'','operator':apiOperatorToYaml(_0x14ba7f[_0x2fc85b(0x26f)]),..._0x14ba7f['arrayMatching']&&_0x14ba7f[_0x2fc85b(0x222)]!==_0x2fc85b(0x235)?{'arrayMatching':_0x14ba7f[_0x2fc85b(0x222)]}:{},..._0x14ba7f['exclude']?{'exclude':_0x14ba7f['exclude']}:{},..._0x1f382a?{'aggregation':_0x1f382a}:{},..._0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x1e5)]?{'source':_0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x1e5)][_0x2fc85b(0x1fb)]}:{},..._0x14ba7f[_0x2fc85b(0x24d)][_0x2fc85b(0x218)]?{'filter':apiRuleToYaml(_0x14ba7f['leftValue'][_0x2fc85b(0x218)])}:{},..._0x14ba7f[_0x2fc85b(0x264)]!==undefined&&_0x14ba7f[_0x2fc85b(0x264)]!==null?{'limit':_0x14ba7f[_0x2fc85b(0x264)]}:{}};}if(_0x14ba7f[_0x2fc85b(0x1f5)]===_0x2fc85b(0x23d)&&_0x14ba7f['id'])return{'type':_0x14ba7f['exclude']?_0x2fc85b(0x1f9):_0x2fc85b(0x249),'segment':_0x14ba7f['id']};return{'type':_0x2fc85b(0x22d),'conditions':[]};}function isTemporalOperator(_0x1852a4){const _0x255799=a102_0x2f61;return _0x1852a4===_0x255799(0x237)||_0x1852a4===_0x255799(0x200);}function getEffectiveValue(_0x4fa5be){const _0x4196f4=a102_0x2f61,_0x27fc90=_0x4fa5be[_0x4196f4(0x20a)];return _0x4fa5be[_0x4196f4(0x256)]??_0x27fc90;}function apiOperatorToYaml(_0x5598b0){const _0x388a51=a102_0x2f61;let _0x3b6776;if(_0x5598b0['rightValues']&&_0x5598b0[_0x388a51(0x20f)][_0x388a51(0x202)]>0x0)_0x3b6776=_0x5598b0['rightValues'];else{if(_0x5598b0[_0x388a51(0x22f)]!==undefined)_0x3b6776=_0x5598b0[_0x388a51(0x22f)];else isTemporalOperator(_0x5598b0[_0x388a51(0x1f5)])&&_0x5598b0[_0x388a51(0x256)]!==undefined&&(_0x3b6776=_0x5598b0['value']);}return{'type':mapApiOperatorType(_0x5598b0[_0x388a51(0x1f5)]),..._0x5598b0[_0x388a51(0x227)]&&{'not':_0x5598b0[_0x388a51(0x227)]},..._0x3b6776!==undefined&&{'value':_0x3b6776},..._0x5598b0[_0x388a51(0x259)]&&{'unit':_0x5598b0[_0x388a51(0x259)]}};}function mapApiOperatorType(_0x43c718){return _0x43c718;}export function segmentDefToCreateRequest(_0x310f6e,_0xb7084a){const _0x4838fc=a102_0x2f61,_0x5e7249={'name':_0x310f6e[_0x4838fc(0x1fb)]};return _0x310f6e['description']&&(_0x5e7249[_0x4838fc(0x207)]=_0x310f6e[_0x4838fc(0x207)]),_0x310f6e['rule']&&(_0x5e7249[_0x4838fc(0x247)]=yamlRuleToApi(_0x310f6e[_0x4838fc(0x247)])),_0x310f6e[_0x4838fc(0x208)]&&(_0x5e7249[_0x4838fc(0x208)]=_0x310f6e[_0x4838fc(0x208)]==='batch'?0x0:_0x310f6e[_0x4838fc(0x208)]==='realtime'?0x1:0x2),_0x310f6e[_0x4838fc(0x22b)]!==undefined&&(_0x5e7249['isVisible']=_0x310f6e[_0x4838fc(0x22b)]),_0xb7084a&&(_0x5e7249['segmentFolderId']=_0xb7084a),_0x5e7249;}export function segmentDefToUpdateRequest(_0x493ad2){const _0x202037=a102_0x2f61,_0x2a39d6={'name':_0x493ad2[_0x202037(0x1fb)]};return _0x493ad2[_0x202037(0x207)]!==undefined&&(_0x2a39d6[_0x202037(0x207)]=_0x493ad2[_0x202037(0x207)]),_0x493ad2[_0x202037(0x247)]&&(_0x2a39d6['rule']=yamlRuleToApi(_0x493ad2[_0x202037(0x247)])),_0x493ad2[_0x202037(0x208)]&&(_0x2a39d6[_0x202037(0x208)]=_0x493ad2[_0x202037(0x208)]===_0x202037(0x211)?0x0:_0x493ad2['kind']===_0x202037(0x220)?0x1:0x2),_0x2a39d6;}export function yamlRuleToApi(_0x4bf145,_0x4205cf=![]){const _0x35d332=a102_0x2f61,_0x4871cb=_0x4bf145[_0x35d332(0x1f2)]['map'](yamlConditionToApi);if(_0x4205cf){const _0x2d947b=_0x4871cb['every'](_0x351e82=>_0x351e82['type']===_0x35d332(0x22d)||_0x351e82['type']==='Or');if(!_0x2d947b&&_0x4871cb[_0x35d332(0x202)]>0x0)return{'type':_0x4bf145[_0x35d332(0x1f5)],'conditions':[{'type':_0x35d332(0x22d),'description':_0x4bf145[_0x35d332(0x207)]||'','conditions':_0x4871cb}]};}return{'type':_0x4bf145[_0x35d332(0x1f5)],'conditions':_0x4871cb,..._0x4bf145[_0x35d332(0x207)]&&{'description':_0x4bf145['description']}};}function yamlConditionToApi(_0x505e70){const _0x8bf428=a102_0x2f61;if(_0x8bf428(0x1f3)in _0x505e70&&(_0x505e70[_0x8bf428(0x1f5)]===_0x8bf428(0x249)||_0x505e70[_0x8bf428(0x1f5)]==='exclude')){const _0x57352f=_0x505e70;return{'type':_0x8bf428(0x23d),'id':_0x57352f[_0x8bf428(0x1f3)],'exclude':_0x57352f['type']==='exclude'};}if('type'in _0x505e70&&(_0x505e70[_0x8bf428(0x1f5)]==='And'||_0x505e70[_0x8bf428(0x1f5)]==='Or')){const _0x567505=_0x505e70;return{'type':_0x567505[_0x8bf428(0x1f5)],'conditions':_0x567505[_0x8bf428(0x1f2)][_0x8bf428(0x1f7)](yamlConditionToApi),..._0x567505[_0x8bf428(0x207)]&&{'description':_0x567505[_0x8bf428(0x207)]}};}const _0x4cb793=_0x505e70,_0x3d85f8={'type':_0x8bf428(0x26c),'leftValue':buildLeftValue(_0x4cb793),'operator':yamlOperatorToApi(_0x4cb793[_0x8bf428(0x26f)]),'exclude':_0x4cb793[_0x8bf428(0x1f9)]??![],'arrayMatching':_0x4cb793[_0x8bf428(0x222)]??'any'};return _0x4cb793['limit']!==undefined&&(_0x3d85f8[_0x8bf428(0x264)]=_0x4cb793[_0x8bf428(0x264)]),_0x3d85f8;}function buildLeftValue(_0xf3d239){const _0x3a06d8=a102_0x2f61,_0x36511e={'name':_0xf3d239[_0x3a06d8(0x238)]};return _0xf3d239['aggregation']&&(_0x36511e[_0x3a06d8(0x219)]={'type':_0xf3d239[_0x3a06d8(0x219)][_0x3a06d8(0x1f5)],..._0xf3d239[_0x3a06d8(0x219)][_0x3a06d8(0x255)]&&{'groupingColumns':_0xf3d239[_0x3a06d8(0x219)]['groupingColumns']}}),_0xf3d239[_0x3a06d8(0x1e5)]&&(_0x36511e['source']={'name':_0xf3d239[_0x3a06d8(0x1e5)]}),_0xf3d239[_0x3a06d8(0x218)]&&(_0x36511e['filter']=yamlRuleToApi(_0xf3d239[_0x3a06d8(0x218)])),_0x36511e;}function yamlOperatorToApi(_0x5a392f){const _0x41edc6=a102_0x2f61,_0x4864a5={'type':mapYamlOperatorType(_0x5a392f[_0x41edc6(0x1f5)]),'not':_0x5a392f['not']??![]},_0x13f102=getEffectiveValue(_0x5a392f);if(_0x13f102!==undefined){if(Array[_0x41edc6(0x1e9)](_0x13f102))_0x4864a5[_0x41edc6(0x20f)]=_0x13f102;else isTemporalOperator(_0x5a392f[_0x41edc6(0x1f5)])?_0x4864a5[_0x41edc6(0x256)]=_0x13f102:_0x4864a5['rightValue']=_0x13f102;}return _0x5a392f[_0x41edc6(0x259)]&&(_0x4864a5[_0x41edc6(0x259)]=_0x5a392f[_0x41edc6(0x259)]),_0x4864a5;}function mapYamlOperatorType(_0x2d4f49){return _0x2d4f49;}export function toYamlString(_0x3ba3e0){const _0x500fce=a102_0x2f61,_0x45b735=JSON['parse'](JSON[_0x500fce(0x214)](_0x3ba3e0)),_0x27e5aa=a102_0x48e21f[_0x500fce(0x214)](_0x45b735,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x500fce(0x1eb)}),_0x3a52ae=[_0x500fce(0x25e)];let _0x481d78=_0x27e5aa;for(const _0x4ea191 of _0x3a52ae){_0x481d78=_0x481d78[_0x500fce(0x233)](new RegExp('^('+_0x4ea191+')','m'),(_0x5a380d,_0x47a0c3,_0x31b330)=>{if(_0x31b330===0x0||_0x481d78[_0x31b330-0x1]==='\x0a'&&_0x481d78[_0x31b330-0x2]==='\x0a')return _0x47a0c3;return'\x0a'+_0x47a0c3;});}return _0x481d78;}export function parseYamlString(_0x4417b2){const _0x5a3e01=a102_0x2f61,_0x5625cc=a102_0x48e21f[_0x5a3e01(0x23b)](_0x4417b2);if(!_0x5625cc[_0x5a3e01(0x1fb)])throw new Error(_0x5a3e01(0x24a));if(_0x5625cc[_0x5a3e01(0x1f5)]&&_0x5625cc[_0x5a3e01(0x1f5)]!==_0x5a3e01(0x1f3))throw new Error(_0x5a3e01(0x251)+_0x5625cc[_0x5a3e01(0x1f5)]);return _0x5625cc;}export function isSegmentYaml(_0x4c077f){const _0x1ac11a=a102_0x2f61;if(typeof _0x4c077f!=='object'||_0x4c077f===null)return![];const _0x4e6051=_0x4c077f;return _0x4e6051[_0x1ac11a(0x1f5)]===_0x1ac11a(0x1f3)||_0x4e6051[_0x1ac11a(0x1f5)]===undefined;}export function generateTemplate(_0x55db3a='New\x20Segment'){const _0x4c1f3c=a102_0x2f61,_0x5cbc4b={'type':_0x4c1f3c(0x1f3),'name':_0x55db3a,'description':_0x4c1f3c(0x1f8),'rule':{'type':_0x4c1f3c(0x22d),'conditions':[{'type':_0x4c1f3c(0x26c),'attribute':_0x4c1f3c(0x26e),'operator':{'type':_0x4c1f3c(0x258),'value':'value'}}]}};return toYamlString(_0x5cbc4b);}function a102_0x3587(){const _0x5505f9=['max','Equal','unit','entries','duration','getSchema','columns','rule:','usedNames','string','9630XnMkZK','\x0a\x0aAvailable\x20fields:\x0a','schedule','limit','3295HWFvno','3223818wFuaBc','resolveSegmentName','notifyOn','repeatSubFrequency','behavior','connection','Value','joinStrategy','attribute_name','operator','attributes','get','behavior_table','all_columns','activationTemplateId','source','connectionId','connectionNameToIdMap','INVALID_ARGUMENT','isArray','Invalid\x20connector_config\x20for\x20activation\x20\x22','null','165599AgsUaL','CONNECTION_NOT_FOUND','from','formatting','joinRow','repeatFrequency','conditions','segment','has','type','notification','map','Segment\x20description','exclude','min','name','allColumns','activations','join_row','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','TimeWithinNext','__SEGMENT_REF__','length','JOURNEY_SYNTAX_ERROR','repeatUnit','syndicationBehavior','start_at','description','kind','notify_on','values','repeat_sub_frequency','startAt','keys','all','rightValues','2329398NwDqLp','batch','repeat_frequency','Please\x20specify\x20a\x20valid\x20attribute\x20name.','stringify','activation_template_id','timezone','warn','filter','aggregation','code','test','].attribute\x20cannot\x20be\x20empty.\x0a','end_on','localeCompare','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','realtime','Unknown\x20email\x20recipient:\x20','arrayMatching','forEach','object','CONNECTOR_SCHEMA_NOT_FOUND','connector_config','not','connector_config\x20for\x20activation\x20\x22','ruleHashToName','activations:','visible','activationParams','And','funnel_stage','rightValue','4716KamcIo','order_by','scheduleType','replace','push','any','repeat_unit','TimeWithinPast','attribute','1198466iUSBzm','684trnPRK','parse','join_strategy','Reference','connectionNameToTypeMap','behaviorTableName','valid','\x27:\x20','connectorConfig','isVisible','folder','emailRecipients','orderBy','rule','endOn','include','YAML\x20config\x20missing\x20required\x20field:\x20name','32lbKmqb','set','leftValue','localRuleToName','email_recipients','visibility','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','conditions[','1226516PLVfFb','CONNECTOR_INVALID_CONFIG','groupingColumns','value'];a102_0x3587=function(){return _0x5505f9;};return a102_0x3587();}export function segmentToYamlString(_0x1aae30){const _0x12e3da=a102_0x2f61,_0x2078f8=JSON[_0x12e3da(0x23b)](JSON['stringify'](_0x1aae30)),_0x36b0a8=a102_0x48e21f[_0x12e3da(0x214)](_0x2078f8,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x39dac1=[_0x12e3da(0x25e),_0x12e3da(0x22a)];let _0x2e290f=_0x36b0a8;for(const _0x3058f6 of _0x39dac1){_0x2e290f=_0x2e290f['replace'](new RegExp('^('+_0x3058f6+')','m'),(_0x4d5deb,_0x4b28d7,_0x34ef46)=>{if(_0x34ef46===0x0||_0x2e290f[_0x34ef46-0x1]==='\x0a'&&_0x2e290f[_0x34ef46-0x2]==='\x0a')return _0x4b28d7;return'\x0a'+_0x4b28d7;});}return _0x2e290f;}function a102_0x2f61(_0x35d1a3,_0x4b949b){_0x35d1a3=_0x35d1a3-0x1e3;const _0x35876a=a102_0x3587();let _0x2f61df=_0x35876a[_0x35d1a3];return _0x2f61df;}export function parseSegmentYamlFile(_0x4c0f66){const _0x368e45=a102_0x2f61,_0x32c2a0=a102_0x48e21f['parse'](_0x4c0f66);if(!_0x32c2a0[_0x368e45(0x1fb)])throw new Error(_0x368e45(0x24a));return _0x32c2a0;}export function normalizeChildSegmentYaml(_0x52c289){const _0x145ab3=a102_0x2f61;return{'type':_0x145ab3(0x1f3),'name':_0x52c289[_0x145ab3(0x1fb)],..._0x52c289[_0x145ab3(0x207)]!==undefined&&{'description':_0x52c289[_0x145ab3(0x207)]},..._0x52c289['folder']!==undefined&&{'folder':_0x52c289[_0x145ab3(0x244)]},..._0x52c289[_0x145ab3(0x247)]&&{'rule':normalizeRule(_0x52c289['rule'])},..._0x52c289[_0x145ab3(0x208)]!==undefined&&{'kind':_0x52c289[_0x145ab3(0x208)]},..._0x52c289[_0x145ab3(0x22b)]!==undefined&&{'visible':_0x52c289['visible']},..._0x52c289[_0x145ab3(0x1fd)]&&{'activations':_0x52c289[_0x145ab3(0x1fd)][_0x145ab3(0x1f7)](normalizeActivation)}};}export function normalizeRule(_0x3114da){const _0xf808af=a102_0x2f61;return{'type':_0x3114da[_0xf808af(0x1f5)],'conditions':_0x3114da['conditions']['map'](normalizeCondition),..._0x3114da[_0xf808af(0x207)]!==undefined&&{'description':_0x3114da[_0xf808af(0x207)]}};}function normalizeCondition(_0x301138){const _0x5dd1a3=a102_0x2f61;if(_0x5dd1a3(0x1f3)in _0x301138&&(_0x301138[_0x5dd1a3(0x1f5)]==='include'||_0x301138['type']==='exclude')){const _0x3a630c=_0x301138;return{'type':_0x3a630c[_0x5dd1a3(0x1f5)],'segment':_0x3a630c[_0x5dd1a3(0x1f3)]};}if(_0x5dd1a3(0x1f5)in _0x301138&&(_0x301138[_0x5dd1a3(0x1f5)]===_0x5dd1a3(0x22d)||_0x301138[_0x5dd1a3(0x1f5)]==='Or')){const _0x3bab60=_0x301138;return{'type':_0x3bab60[_0x5dd1a3(0x1f5)],'conditions':_0x3bab60[_0x5dd1a3(0x1f2)][_0x5dd1a3(0x1f7)](normalizeCondition),..._0x3bab60[_0x5dd1a3(0x207)]!==undefined&&{'description':_0x3bab60[_0x5dd1a3(0x207)]}};}const _0x53df93=_0x301138;return{'type':_0x5dd1a3(0x26c),'attribute':_0x53df93[_0x5dd1a3(0x238)],'operator':normalizeOperator(_0x53df93[_0x5dd1a3(0x26f)]),..._0x53df93['arrayMatching']!==undefined&&{'arrayMatching':_0x53df93[_0x5dd1a3(0x222)]},..._0x53df93[_0x5dd1a3(0x1f9)]!==undefined&&{'exclude':_0x53df93['exclude']},..._0x53df93[_0x5dd1a3(0x219)]!==undefined&&{'aggregation':_0x53df93[_0x5dd1a3(0x219)]},..._0x53df93[_0x5dd1a3(0x1e5)]!==undefined&&{'source':_0x53df93[_0x5dd1a3(0x1e5)]},..._0x53df93[_0x5dd1a3(0x218)]!==undefined&&{'filter':normalizeRule(_0x53df93[_0x5dd1a3(0x218)])},..._0x53df93[_0x5dd1a3(0x264)]!==undefined&&{'limit':_0x53df93['limit']}};}function normalizeOperator(_0x1c318d){const _0x3dda3f=a102_0x2f61,_0x5d5cb7=getEffectiveValue(_0x1c318d);return{'type':_0x1c318d['type'],..._0x1c318d[_0x3dda3f(0x227)]!==undefined&&{'not':_0x1c318d[_0x3dda3f(0x227)]},..._0x5d5cb7!==undefined&&{'value':_0x5d5cb7},..._0x1c318d[_0x3dda3f(0x1fa)]!==undefined&&{'min':_0x1c318d['min']},..._0x1c318d[_0x3dda3f(0x257)]!==undefined&&{'max':_0x1c318d[_0x3dda3f(0x257)]},..._0x1c318d[_0x3dda3f(0x259)]!==undefined&&{'unit':_0x1c318d['unit']},..._0x1c318d[_0x3dda3f(0x25b)]!==undefined&&{'duration':_0x1c318d[_0x3dda3f(0x25b)]},..._0x1c318d[_0x3dda3f(0x1ee)]!==undefined&&{'from':_0x1c318d['from']}};}function normalizeActivation(_0x284240){const _0x336466=a102_0x2f61;return{'name':_0x284240[_0x336466(0x1fb)],'connection':_0x284240[_0x336466(0x26b)],..._0x284240[_0x336466(0x207)]!==undefined&&{'description':_0x284240[_0x336466(0x207)]},..._0x284240[_0x336466(0x1e3)]!==undefined&&{'all_columns':_0x284240[_0x336466(0x1e3)]},..._0x284240[_0x336466(0x25d)]!==undefined&&{'columns':_0x284240[_0x336466(0x25d)]},..._0x284240[_0x336466(0x26a)]!==undefined&&{'behavior':_0x284240[_0x336466(0x26a)]},..._0x284240[_0x336466(0x263)]!==undefined&&{'schedule':_0x284240['schedule']},..._0x284240['notification']!==undefined&&{'notification':_0x284240[_0x336466(0x1f6)]},..._0x284240['connector_config']!==undefined&&{'connector_config':_0x284240[_0x336466(0x226)]},..._0x284240[_0x336466(0x215)]!==undefined&&{'activation_template_id':_0x284240[_0x336466(0x215)]}};}export function activationResponseToDef(_0x46d156,_0x221086,_0x2389d2){const _0x57aeb6=a102_0x2f61,_0xc15ef9=_0x46d156[_0x57aeb6(0x1e6)]||'',_0x24c51a=_0x2389d2?.[_0x57aeb6(0x271)](_0xc15ef9)??_0xc15ef9,_0x2efd02={'name':_0x46d156['name'],'connection':_0x24c51a};_0x46d156[_0x57aeb6(0x207)]&&(_0x2efd02[_0x57aeb6(0x207)]=_0x46d156[_0x57aeb6(0x207)]);let _0x10cd46=[];_0x46d156['columns']&&_0x46d156[_0x57aeb6(0x25d)][_0x57aeb6(0x202)]>0x0&&(_0x10cd46=_0x46d156[_0x57aeb6(0x25d)][_0x57aeb6(0x218)](_0x4a3911=>_0x4a3911&&_0x4a3911[_0x57aeb6(0x1fb)])['map'](_0x19995d=>{const _0x5967b9=_0x57aeb6;if(_0x19995d[_0x5967b9(0x1f5)]||_0x19995d[_0x5967b9(0x250)])return{'name':_0x19995d['name'],..._0x19995d['type']&&{'type':_0x19995d['type']},..._0x19995d['visibility']&&{'visibility':_0x19995d[_0x5967b9(0x250)]}};return _0x19995d[_0x5967b9(0x1fb)];}));_0x10cd46[_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x25d)]=_0x10cd46);_0x46d156[_0x57aeb6(0x1fc)]!==undefined&&(_0x46d156[_0x57aeb6(0x1fc)]===![]&&_0x10cd46[_0x57aeb6(0x202)]===0x0?_0x2efd02['all_columns']=!![]:_0x2efd02['all_columns']=_0x46d156['allColumns']);const _0x2536e5={};let _0x147834=![];_0x46d156[_0x57aeb6(0x232)]&&(_0x2536e5['type']=_0x46d156[_0x57aeb6(0x232)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x204)]&&(_0x2536e5[_0x57aeb6(0x236)]=_0x46d156[_0x57aeb6(0x204)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x1f1)]!==undefined&&_0x46d156[_0x57aeb6(0x1f1)]!==null&&(_0x2536e5['repeat_frequency']=_0x46d156[_0x57aeb6(0x1f1)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x269)]&&_0x46d156[_0x57aeb6(0x269)]['length']>0x0&&(_0x2536e5[_0x57aeb6(0x20b)]=_0x46d156[_0x57aeb6(0x269)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x20c)]!==undefined&&(_0x2536e5[_0x57aeb6(0x206)]=_0x46d156[_0x57aeb6(0x20c)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x248)]!==undefined&&(_0x2536e5[_0x57aeb6(0x21d)]=_0x46d156[_0x57aeb6(0x248)],_0x147834=!![]);_0x46d156[_0x57aeb6(0x216)]&&(_0x2536e5[_0x57aeb6(0x216)]=_0x46d156[_0x57aeb6(0x216)],_0x147834=!![]);_0x147834&&(_0x2efd02[_0x57aeb6(0x263)]=_0x2536e5);(_0x46d156[_0x57aeb6(0x268)]&&_0x46d156[_0x57aeb6(0x268)][_0x57aeb6(0x202)]>0x0||_0x46d156[_0x57aeb6(0x245)]&&_0x46d156[_0x57aeb6(0x245)][_0x57aeb6(0x202)]>0x0)&&(_0x2efd02['notification']={},_0x46d156[_0x57aeb6(0x268)]&&_0x46d156[_0x57aeb6(0x268)][_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x1f6)][_0x57aeb6(0x209)]=_0x46d156['notifyOn']),_0x46d156[_0x57aeb6(0x245)]&&_0x46d156['emailRecipients']['length']>0x0&&(_0x2efd02[_0x57aeb6(0x1f6)][_0x57aeb6(0x24f)]=_0x46d156[_0x57aeb6(0x245)][_0x57aeb6(0x1f7)](_0x1db8d5=>{const _0x50a319=_0x221086?.['get'](_0x1db8d5);return _0x50a319??String(_0x1db8d5);})));_0x46d156[_0x57aeb6(0x242)]&&Object[_0x57aeb6(0x20d)](_0x46d156[_0x57aeb6(0x242)])[_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x226)]=normalizeConnectorConfigForYaml(_0x46d156['connectorConfig']));_0x46d156[_0x57aeb6(0x1e4)]&&(_0x2efd02['activation_template_id']=_0x46d156['activationTemplateId']);if(_0x46d156[_0x57aeb6(0x205)]){const _0x47a934={},_0x15d9ed=_0x46d156[_0x57aeb6(0x205)];_0x15d9ed[_0x57aeb6(0x25d)]&&_0x15d9ed[_0x57aeb6(0x25d)][_0x57aeb6(0x202)]>0x0&&(_0x47a934[_0x57aeb6(0x25d)]=_0x15d9ed[_0x57aeb6(0x25d)]['filter'](_0x4d15d0=>_0x4d15d0&&_0x4d15d0['name'])[_0x57aeb6(0x1f7)](_0x1cef34=>({'name':_0x1cef34[_0x57aeb6(0x1fb)],..._0x1cef34[_0x57aeb6(0x1f5)]&&{'type':_0x1cef34[_0x57aeb6(0x1f5)]},..._0x1cef34['visibility']&&{'visibility':_0x1cef34['visibility']}}))),_0x15d9ed[_0x57aeb6(0x23f)]&&(_0x47a934[_0x57aeb6(0x272)]=_0x15d9ed[_0x57aeb6(0x23f)]),_0x15d9ed[_0x57aeb6(0x1f0)]!==undefined&&(_0x47a934[_0x57aeb6(0x1fe)]=_0x15d9ed['joinRow']),_0x15d9ed[_0x57aeb6(0x26d)]&&(_0x47a934[_0x57aeb6(0x23c)]=_0x15d9ed[_0x57aeb6(0x26d)]),_0x15d9ed['formatting']&&(_0x47a934[_0x57aeb6(0x1ef)]=_0x15d9ed[_0x57aeb6(0x1ef)]),_0x15d9ed['orderBy']&&_0x15d9ed[_0x57aeb6(0x246)][_0x57aeb6(0x202)]>0x0&&(_0x47a934[_0x57aeb6(0x231)]=_0x15d9ed['orderBy']),Object[_0x57aeb6(0x20d)](_0x47a934)[_0x57aeb6(0x202)]>0x0&&(_0x2efd02[_0x57aeb6(0x26a)]=_0x47a934);}return _0x2efd02;}export function journeyActivationStepToYaml(_0x323e21,_0x3a5eca,_0x3bd88a){const _0x376ffa=a102_0x2f61,_0x4d4aa5=_0x323e21[_0x376ffa(0x270)][_0x376ffa(0x22c)],_0x5e60f7=_0x4d4aa5[_0x376ffa(0x1e6)]||'',_0x1dfa7c=_0x3bd88a?.[_0x376ffa(0x271)](_0x5e60f7)??_0x5e60f7,_0x1f3eb4={'name':_0x4d4aa5[_0x376ffa(0x1fb)]||'','connection':_0x1dfa7c};_0x4d4aa5[_0x376ffa(0x207)]&&(_0x1f3eb4['description']=_0x4d4aa5[_0x376ffa(0x207)]);let _0x1e0903=[];_0x4d4aa5['columns']&&_0x4d4aa5[_0x376ffa(0x25d)]['length']>0x0&&(_0x1e0903=_0x4d4aa5[_0x376ffa(0x25d)][_0x376ffa(0x218)](_0x550fb6=>_0x550fb6&&_0x550fb6[_0x376ffa(0x1fb)])[_0x376ffa(0x1f7)](_0x1bb14c=>{const _0x181b0d=_0x376ffa;if(_0x1bb14c[_0x181b0d(0x1f5)]||_0x1bb14c[_0x181b0d(0x250)])return{'name':_0x1bb14c[_0x181b0d(0x1fb)],..._0x1bb14c[_0x181b0d(0x1f5)]&&{'type':_0x1bb14c[_0x181b0d(0x1f5)]},..._0x1bb14c[_0x181b0d(0x250)]&&{'visibility':_0x1bb14c['visibility']}};return _0x1bb14c[_0x181b0d(0x1fb)];}));_0x1e0903[_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x25d)]=_0x1e0903);_0x4d4aa5[_0x376ffa(0x1fc)]!==undefined&&(_0x4d4aa5['allColumns']===![]&&_0x1e0903[_0x376ffa(0x202)]===0x0?_0x1f3eb4['all_columns']=!![]:_0x1f3eb4['all_columns']=_0x4d4aa5[_0x376ffa(0x1fc)]);const _0x355787={};let _0x47f9e6=![];_0x4d4aa5['scheduleType']&&(_0x355787[_0x376ffa(0x1f5)]=_0x4d4aa5[_0x376ffa(0x232)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x204)]&&(_0x355787[_0x376ffa(0x236)]=_0x4d4aa5[_0x376ffa(0x204)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x1f1)]!==undefined&&_0x4d4aa5[_0x376ffa(0x1f1)]!==null&&(_0x355787['repeat_frequency']=_0x4d4aa5[_0x376ffa(0x1f1)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x20c)]!==undefined&&(_0x355787['start_at']=_0x4d4aa5['startAt'],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x248)]!==undefined&&(_0x355787[_0x376ffa(0x21d)]=_0x4d4aa5[_0x376ffa(0x248)],_0x47f9e6=!![]);_0x4d4aa5[_0x376ffa(0x216)]&&(_0x355787['timezone']=_0x4d4aa5[_0x376ffa(0x216)],_0x47f9e6=!![]);_0x47f9e6&&(_0x1f3eb4[_0x376ffa(0x263)]=_0x355787);(_0x4d4aa5[_0x376ffa(0x268)]&&_0x4d4aa5[_0x376ffa(0x268)][_0x376ffa(0x202)]>0x0||_0x4d4aa5['emailRecipients']&&_0x4d4aa5['emailRecipients'][_0x376ffa(0x202)]>0x0)&&(_0x1f3eb4[_0x376ffa(0x1f6)]={},_0x4d4aa5[_0x376ffa(0x268)]&&_0x4d4aa5[_0x376ffa(0x268)][_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x1f6)][_0x376ffa(0x209)]=_0x4d4aa5[_0x376ffa(0x268)]),_0x4d4aa5[_0x376ffa(0x245)]&&_0x4d4aa5[_0x376ffa(0x245)][_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x1f6)][_0x376ffa(0x24f)]=_0x4d4aa5[_0x376ffa(0x245)][_0x376ffa(0x1f7)](_0x5d1eb7=>{const _0x51014a=_0x376ffa,_0x3020d5=_0x3a5eca?.[_0x51014a(0x271)](_0x5d1eb7);return _0x3020d5??String(_0x5d1eb7);})));_0x4d4aa5[_0x376ffa(0x242)]&&Object[_0x376ffa(0x20d)](_0x4d4aa5[_0x376ffa(0x242)])['length']>0x0&&(_0x1f3eb4['connector_config']=normalizeConnectorConfigForYaml(_0x4d4aa5[_0x376ffa(0x242)]));_0x4d4aa5[_0x376ffa(0x1e4)]&&(_0x1f3eb4[_0x376ffa(0x215)]=_0x4d4aa5[_0x376ffa(0x1e4)]);if(_0x4d4aa5[_0x376ffa(0x205)]){const _0x440813={},_0x26e2e1=_0x4d4aa5[_0x376ffa(0x205)];_0x26e2e1[_0x376ffa(0x25d)]&&_0x26e2e1[_0x376ffa(0x25d)]['length']>0x0&&(_0x440813[_0x376ffa(0x25d)]=_0x26e2e1[_0x376ffa(0x25d)][_0x376ffa(0x218)](_0xf6e9f5=>_0xf6e9f5&&_0xf6e9f5[_0x376ffa(0x1fb)])[_0x376ffa(0x1f7)](_0x3b5121=>({'name':_0x3b5121[_0x376ffa(0x1fb)],..._0x3b5121[_0x376ffa(0x1f5)]&&{'type':_0x3b5121[_0x376ffa(0x1f5)]},..._0x3b5121['visibility']&&{'visibility':_0x3b5121[_0x376ffa(0x250)]}}))),_0x26e2e1[_0x376ffa(0x23f)]&&(_0x440813['behavior_table']=_0x26e2e1[_0x376ffa(0x23f)]),_0x26e2e1[_0x376ffa(0x1f0)]!==undefined&&(_0x440813['join_row']=_0x26e2e1[_0x376ffa(0x1f0)]),_0x26e2e1['joinStrategy']&&(_0x440813[_0x376ffa(0x23c)]=_0x26e2e1[_0x376ffa(0x26d)]),_0x26e2e1[_0x376ffa(0x1ef)]&&(_0x440813[_0x376ffa(0x1ef)]=_0x26e2e1[_0x376ffa(0x1ef)]),_0x26e2e1['orderBy']&&_0x26e2e1['orderBy'][_0x376ffa(0x202)]>0x0&&(_0x440813[_0x376ffa(0x231)]=_0x26e2e1['orderBy']),Object[_0x376ffa(0x20d)](_0x440813)[_0x376ffa(0x202)]>0x0&&(_0x1f3eb4[_0x376ffa(0x26a)]=_0x440813);}return _0x1f3eb4;}export function segmentWithActivationsToYaml(_0x4bf7d8,_0x97d42e,_0x11c82b,_0xb35f58,_0x160f94){const _0x5c30d4=a102_0x2f61,_0x21fdb1=segmentResponseToDefSync(_0x4bf7d8,_0x11c82b);return _0x97d42e[_0x5c30d4(0x202)]>0x0&&(_0x21fdb1['activations']=_0x97d42e[_0x5c30d4(0x1f7)](_0x3f1fa3=>activationResponseToDef(_0x3f1fa3,_0xb35f58,_0x160f94))),_0x21fdb1;}function normalizeColumn(_0x59f5eb){const _0x46f603=a102_0x2f61;if(typeof _0x59f5eb===_0x46f603(0x260))return{'name':_0x59f5eb};return{'name':_0x59f5eb[_0x46f603(0x1fb)],..._0x59f5eb[_0x46f603(0x1f5)]&&{'type':_0x59f5eb[_0x46f603(0x1f5)]},..._0x59f5eb[_0x46f603(0x250)]&&{'visibility':_0x59f5eb['visibility']}};}export async function activationDefToCreateRequest(_0x2d9aea,_0x388ff7){const _0x2e6bfb=a102_0x2f61,_0x5a5eec=_0x388ff7?.['emailToIdMap'],_0x23c7d6=_0x388ff7?.[_0x2e6bfb(0x1e7)],_0x21c70f=_0x2d9aea[_0x2e6bfb(0x26b)];let _0x29af79;const _0x5cfca8=parseInt(_0x21c70f,0xa);if(!isNaN(_0x5cfca8)&&String(_0x5cfca8)===_0x21c70f)_0x29af79=_0x5cfca8;else{const _0x35c006=_0x23c7d6?.[_0x2e6bfb(0x271)](_0x21c70f);if(_0x35c006===undefined)throw new SDKError(ErrorCode[_0x2e6bfb(0x1ed)],'Unknown\x20connection:\x20'+_0x21c70f,undefined,{'helpText':_0x2e6bfb(0x21f)});_0x29af79=_0x35c006;}const _0x23a5c7={'name':_0x2d9aea[_0x2e6bfb(0x1fb)],'connectionId':_0x29af79};_0x2d9aea[_0x2e6bfb(0x207)]&&(_0x23a5c7[_0x2e6bfb(0x207)]=_0x2d9aea[_0x2e6bfb(0x207)]);let _0x3fc67b=[];_0x2d9aea['columns']&&_0x2d9aea['columns'][_0x2e6bfb(0x202)]>0x0&&(_0x3fc67b=_0x2d9aea[_0x2e6bfb(0x25d)]['filter'](_0x32c4c4=>_0x32c4c4!=null)[_0x2e6bfb(0x1f7)](normalizeColumn));_0x3fc67b[_0x2e6bfb(0x202)]>0x0&&(_0x23a5c7[_0x2e6bfb(0x25d)]=_0x3fc67b);_0x2d9aea[_0x2e6bfb(0x1e3)]!==undefined&&(_0x2d9aea['all_columns']===![]&&_0x3fc67b[_0x2e6bfb(0x202)]===0x0?_0x23a5c7[_0x2e6bfb(0x1fc)]=!![]:_0x23a5c7[_0x2e6bfb(0x1fc)]=_0x2d9aea['all_columns']);if(_0x2d9aea[_0x2e6bfb(0x263)]){const _0x410956=_0x2d9aea[_0x2e6bfb(0x263)];_0x410956[_0x2e6bfb(0x1f5)]&&(_0x23a5c7[_0x2e6bfb(0x232)]=_0x410956[_0x2e6bfb(0x1f5)]),_0x410956[_0x2e6bfb(0x236)]&&(_0x23a5c7[_0x2e6bfb(0x204)]=_0x410956['repeat_unit']),_0x410956[_0x2e6bfb(0x212)]!==undefined&&(_0x23a5c7[_0x2e6bfb(0x1f1)]=_0x410956[_0x2e6bfb(0x212)]),_0x410956[_0x2e6bfb(0x20b)]&&(_0x23a5c7[_0x2e6bfb(0x269)]=_0x410956[_0x2e6bfb(0x20b)]),_0x410956[_0x2e6bfb(0x206)]!==undefined&&(_0x23a5c7[_0x2e6bfb(0x20c)]=_0x410956['start_at']),_0x410956[_0x2e6bfb(0x21d)]!==undefined&&(_0x23a5c7[_0x2e6bfb(0x248)]=_0x410956['end_on']),_0x410956[_0x2e6bfb(0x216)]&&(_0x23a5c7[_0x2e6bfb(0x216)]=_0x410956[_0x2e6bfb(0x216)]);}_0x2d9aea[_0x2e6bfb(0x1f6)]&&(_0x2d9aea[_0x2e6bfb(0x1f6)][_0x2e6bfb(0x209)]&&(_0x23a5c7[_0x2e6bfb(0x268)]=_0x2d9aea[_0x2e6bfb(0x1f6)][_0x2e6bfb(0x209)]),_0x2d9aea['notification'][_0x2e6bfb(0x24f)]&&(_0x23a5c7[_0x2e6bfb(0x245)]=_0x2d9aea[_0x2e6bfb(0x1f6)][_0x2e6bfb(0x24f)]['map'](_0x54ce74=>{const _0x25963c=_0x2e6bfb,_0x501e97=Number(_0x54ce74);if(!isNaN(_0x501e97)&&String(_0x501e97)===_0x54ce74)return _0x501e97;const _0x549c3f=_0x5a5eec?.['get'](_0x54ce74['toLowerCase']());if(_0x549c3f===undefined)throw new SDKError(ErrorCode[_0x25963c(0x1e8)],_0x25963c(0x221)+_0x54ce74+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x549c3f;})));if(_0x2d9aea[_0x2e6bfb(0x226)]){const _0xc5461c=_0x388ff7?.[_0x2e6bfb(0x23e)]?.[_0x2e6bfb(0x271)](_0x21c70f);if(_0xc5461c&&_0x388ff7?.['getSchema'])try{const _0x46b8f=await _0x388ff7[_0x2e6bfb(0x25c)](_0xc5461c),_0x4296c2=validateConnectorConfig(_0x2d9aea[_0x2e6bfb(0x226)],_0x46b8f);if(!_0x4296c2[_0x2e6bfb(0x240)])throw new SDKError(ErrorCode[_0x2e6bfb(0x254)],_0x2e6bfb(0x1ea)+_0x2d9aea[_0x2e6bfb(0x1fb)]+'\x22:\x0a'+formatValidationErrors(_0x4296c2['errors']),undefined,{'helpText':'Connector:\x20'+_0xc5461c+_0x2e6bfb(0x262)+formatSchemaAsHelp(_0x46b8f)});if(_0x4296c2['warnings'][_0x2e6bfb(0x202)]>0x0){const _0x53d1eb=formatValidationWarnings(_0x4296c2['warnings']);console[_0x2e6bfb(0x217)](_0x2e6bfb(0x228)+_0x2d9aea[_0x2e6bfb(0x1fb)]+'\x22:\x0a'+_0x53d1eb);}_0x23a5c7[_0x2e6bfb(0x242)]=transformConfigToLegacy(_0x2d9aea['connector_config'],_0x46b8f);}catch(_0x251a81){if(_0x251a81 instanceof SDKError&&_0x251a81[_0x2e6bfb(0x21a)]===ErrorCode[_0x2e6bfb(0x225)])_0x23a5c7[_0x2e6bfb(0x242)]=_0x2d9aea[_0x2e6bfb(0x226)];else throw _0x251a81;}else _0x23a5c7[_0x2e6bfb(0x242)]=_0x2d9aea[_0x2e6bfb(0x226)];}_0x2d9aea[_0x2e6bfb(0x215)]!==undefined&&(_0x23a5c7['activationTemplateId']=_0x2d9aea[_0x2e6bfb(0x215)]);if(_0x2d9aea['behavior']){const _0x1bfa52=_0x2d9aea['behavior'],_0x7f9e1e={};if(_0x1bfa52[_0x2e6bfb(0x25d)]&&_0x1bfa52[_0x2e6bfb(0x25d)][_0x2e6bfb(0x202)]>0x0){const _0x44e69b=_0x1bfa52['columns']['filter'](_0x246d59=>_0x246d59&&_0x246d59['name']);_0x44e69b[_0x2e6bfb(0x202)]>0x0&&(_0x7f9e1e[_0x2e6bfb(0x25d)]=_0x44e69b);}_0x1bfa52[_0x2e6bfb(0x272)]&&(_0x7f9e1e[_0x2e6bfb(0x23f)]=_0x1bfa52[_0x2e6bfb(0x272)]),_0x1bfa52[_0x2e6bfb(0x1fe)]!==undefined&&(_0x7f9e1e[_0x2e6bfb(0x1f0)]=_0x1bfa52[_0x2e6bfb(0x1fe)]),_0x1bfa52[_0x2e6bfb(0x23c)]&&(_0x7f9e1e[_0x2e6bfb(0x26d)]=_0x1bfa52[_0x2e6bfb(0x23c)]),_0x1bfa52['formatting']&&(_0x7f9e1e[_0x2e6bfb(0x1ef)]=_0x1bfa52[_0x2e6bfb(0x1ef)]),_0x1bfa52[_0x2e6bfb(0x231)]&&(_0x7f9e1e[_0x2e6bfb(0x246)]=_0x1bfa52['order_by']),_0x23a5c7[_0x2e6bfb(0x205)]=_0x7f9e1e;}return _0x23a5c7;}export async function activationDefToUpdateRequest(_0x1ddf10,_0x31ebfa){return activationDefToCreateRequest(_0x1ddf10,_0x31ebfa);}export function deepSortObject(_0x34a215){const _0x8c366d=a102_0x2f61;if(_0x34a215===null||typeof _0x34a215!==_0x8c366d(0x224))return _0x34a215;if(Array[_0x8c366d(0x1e9)](_0x34a215))return _0x34a215[_0x8c366d(0x1f7)](deepSortObject)['sort']((_0x24101a,_0x5a6772)=>JSON['stringify'](_0x24101a)[_0x8c366d(0x21e)](JSON[_0x8c366d(0x214)](_0x5a6772)));const _0x1d3631={};for(const _0xfe1f3f of Object[_0x8c366d(0x20d)](_0x34a215)['sort']()){_0x1d3631[_0xfe1f3f]=deepSortObject(_0x34a215[_0xfe1f3f]);}return _0x1d3631;}export function serializeRule(_0x1675cc){const _0x44d62b=a102_0x2f61;return JSON[_0x44d62b(0x214)](deepSortObject(_0x1675cc));}export function normalizeRuleForMatching(_0x431e82){return normalizeConditionsForMatching(_0x431e82);}function normalizeConditionsForMatching(_0x10593a){const _0x4efa56=a102_0x2f61;if(_0x10593a===null||typeof _0x10593a!==_0x4efa56(0x224))return _0x10593a;if(Array[_0x4efa56(0x1e9)](_0x10593a))return _0x10593a[_0x4efa56(0x1f7)](normalizeConditionsForMatching);const _0x4f4da5=_0x10593a;if((_0x4f4da5[_0x4efa56(0x1f5)]===_0x4efa56(0x249)||_0x4f4da5[_0x4efa56(0x1f5)]===_0x4efa56(0x1f9))&&typeof _0x4f4da5[_0x4efa56(0x1f3)]===_0x4efa56(0x260))return{..._0x4f4da5,'segment':_0x4efa56(0x201)};const _0x3cc912={};for(const _0x18ae71 of Object['keys'](_0x4f4da5)){_0x3cc912[_0x18ae71]=normalizeConditionsForMatching(_0x4f4da5[_0x18ae71]);}return _0x3cc912;}export function serializeRuleForMatching(_0xb52424){const _0x4e132a=a102_0x2f61;return JSON[_0x4e132a(0x214)](deepSortObject(normalizeRuleForMatching(_0xb52424)));}export function expandSegmentReferences(_0x16a2c4,_0x55a220,_0x1f50e0=new Set()){return expandConditions(_0x16a2c4,_0x55a220,_0x1f50e0);}function expandConditions(_0xed2149,_0x21add7,_0x33e04e){const _0x39ef00=a102_0x2f61;if(_0xed2149===null||typeof _0xed2149!=='object')return _0xed2149;if(Array[_0x39ef00(0x1e9)](_0xed2149))return _0xed2149[_0x39ef00(0x1f7)](_0x1f90e4=>expandConditions(_0x1f90e4,_0x21add7,_0x33e04e));const _0x2a7a8d=_0xed2149;if((_0x2a7a8d['type']===_0x39ef00(0x249)||_0x2a7a8d[_0x39ef00(0x1f5)]===_0x39ef00(0x1f9))&&typeof _0x2a7a8d[_0x39ef00(0x1f3)]===_0x39ef00(0x260)){const _0x17e207=_0x2a7a8d['segment'],_0x1168a2=_0x21add7[_0x39ef00(0x271)](_0x17e207);if(_0x1168a2&&!_0x33e04e['has'](_0x17e207)){const _0x249951=new Set(_0x33e04e);_0x249951['add'](_0x17e207);const _0x53afb6=expandConditions(_0x1168a2,_0x21add7,_0x249951);return{'type':_0x2a7a8d[_0x39ef00(0x1f5)],'expanded_rule':_0x53afb6};}return{'type':_0x2a7a8d['type'],'expanded_rule':'__UNRESOLVED__'};}const _0x3dcfb4={};for(const _0x496306 of Object[_0x39ef00(0x20d)](_0x2a7a8d)){_0x3dcfb4[_0x496306]=expandConditions(_0x2a7a8d[_0x496306],_0x21add7,_0x33e04e);}return _0x3dcfb4;}export function serializeExpandedRule(_0x554d67,_0x2c6809){const _0x4f13e9=a102_0x2f61,_0x1ff399=expandSegmentReferences(_0x554d67,_0x2c6809);return JSON[_0x4f13e9(0x214)](deepSortObject(_0x1ff399));}export function createSegmentNameContext(_0x4cd761){const _0x4297b6=a102_0x2f61,_0x61d907=new Set(),_0xaa2e94=new Map(),_0x18b1e6=new Map();if(_0x4cd761)for(const [_0x295a18,_0x38bb15]of Object[_0x4297b6(0x25a)](_0x4cd761)){if(_0x38bb15[_0x4297b6(0x247)]){const _0x4c96d7=serializeRule(_0x38bb15[_0x4297b6(0x247)]);_0x18b1e6[_0x4297b6(0x24c)](_0x4c96d7,_0x295a18),_0x61d907['add'](_0x295a18);}}return{'usedNames':_0x61d907,'ruleHashToName':_0xaa2e94,'localRuleToName':_0x4cd761?_0x18b1e6:undefined};}export function resolveSegmentName(_0x526c83,_0x299b1d,_0x49bf35,_0x57fdbc){const _0x6e6b08=a102_0x2f61,_0x5224e5=serializeRule(_0x299b1d);if(_0x49bf35[_0x6e6b08(0x24e)]){const _0x34f4c6=_0x49bf35[_0x6e6b08(0x24e)]['get'](_0x5224e5);if(_0x34f4c6)return{'name':_0x34f4c6,'isDuplicate':![],'isLocalMatch':!![]};}const _0x56c739=_0x49bf35[_0x6e6b08(0x229)][_0x6e6b08(0x271)](_0x5224e5);if(_0x56c739)return{'name':_0x56c739,'isDuplicate':!![],'isLocalMatch':![]};const _0x23b1ff=_0x57fdbc(_0x526c83);let _0x5f248c=_0x23b1ff||_0x526c83,_0x202c19=_0x5f248c,_0x4ebab2=0x2;while(_0x49bf35[_0x6e6b08(0x25f)][_0x6e6b08(0x1f4)](_0x202c19)){_0x202c19=_0x5f248c+'_'+_0x4ebab2,_0x4ebab2++;}return _0x49bf35[_0x6e6b08(0x25f)]['add'](_0x202c19),_0x49bf35['ruleHashToName'][_0x6e6b08(0x24c)](_0x5224e5,_0x202c19),{'name':_0x202c19,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x18de1a){const _0x2200ef=[],_0x5a35cb=_0x44d0f0=>{const _0x3a073d=a102_0x2f61;if(!_0x44d0f0||typeof _0x44d0f0!==_0x3a073d(0x224))return;if(Array[_0x3a073d(0x1e9)](_0x44d0f0)){_0x44d0f0[_0x3a073d(0x223)](_0x5a35cb);return;}const _0x8b952a=_0x44d0f0;(_0x8b952a[_0x3a073d(0x1f5)]===_0x3a073d(0x249)||_0x8b952a['type']===_0x3a073d(0x1f9))&&typeof _0x8b952a[_0x3a073d(0x1f3)]===_0x3a073d(0x260)&&_0x2200ef[_0x3a073d(0x234)](_0x8b952a[_0x3a073d(0x1f3)]);for(const _0x58a420 of Object[_0x3a073d(0x20a)](_0x8b952a)){_0x5a35cb(_0x58a420);}};return _0x5a35cb(_0x18de1a),_0x2200ef;}export function validateSegmentRule(_0x27b69e,_0x29f10e){const _0x139db0=a102_0x2f61;if(!_0x29f10e||!_0x29f10e[_0x139db0(0x1f2)])return;for(let _0x22b8b2=0x0;_0x22b8b2<_0x29f10e[_0x139db0(0x1f2)][_0x139db0(0x202)];_0x22b8b2++){const _0xfc283c=_0x29f10e[_0x139db0(0x1f2)][_0x22b8b2];if(_0x139db0(0x1f5)in _0xfc283c&&_0xfc283c['type']===_0x139db0(0x26c)){const _0x4afcc1=_0xfc283c;if(!_0x4afcc1[_0x139db0(0x238)]||_0x4afcc1[_0x139db0(0x238)]==='')throw new SDKError(ErrorCode[_0x139db0(0x203)],_0x139db0(0x1ff)+_0x27b69e+_0x139db0(0x241)+(_0x139db0(0x252)+_0x22b8b2+_0x139db0(0x21c))+_0x139db0(0x213));}}}
@@ -1 +1 @@
1
- (function(_0x3b9853,_0x3cd5eb){const _0x248bf4=a103_0x7c18,_0x43c188=_0x3b9853();while(!![]){try{const _0x3a9547=-parseInt(_0x248bf4(0x1b4))/0x1+-parseInt(_0x248bf4(0x1d8))/0x2+-parseInt(_0x248bf4(0x1c3))/0x3+-parseInt(_0x248bf4(0x1d1))/0x4*(-parseInt(_0x248bf4(0x1cf))/0x5)+-parseInt(_0x248bf4(0x1c0))/0x6*(parseInt(_0x248bf4(0x1c2))/0x7)+parseInt(_0x248bf4(0x1bf))/0x8*(parseInt(_0x248bf4(0x1c7))/0x9)+parseInt(_0x248bf4(0x1c1))/0xa*(parseInt(_0x248bf4(0x1dd))/0xb);if(_0x3a9547===_0x3cd5eb)break;else _0x43c188['push'](_0x43c188['shift']());}catch(_0x3d165b){_0x43c188['push'](_0x43c188['shift']());}}}(a103_0x5cc8,0x20e73));function a103_0x7c18(_0x144965,_0x2dc7e7){_0x144965=_0x144965-0x1ab;const _0x5cc8dd=a103_0x5cc8();let _0x7c1890=_0x5cc8dd[_0x144965];return _0x7c1890;}import a103_0x103647 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x2f60eb){const _0x32f670=a103_0x7c18,_0x41d1bf=_0x2f60eb[_0x32f670(0x1ce)][_0x32f670(0x1de)](_0x1503a7=>({'column_name':_0x1503a7[_0x32f670(0x1c9)],'column_type':_0x1503a7['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x2f60eb,'columns':[{'name':_0x32f670(0x1b6),'type':_0x32f670(0x1d7)},{'name':_0x32f670(0x1d9),'type':'varchar'},{'name':_0x32f670(0x1af),'type':_0x32f670(0x1d7)},{'name':'key','type':_0x32f670(0x1d7)},{'name':_0x32f670(0x1ba),'type':_0x32f670(0x1d7)},{'name':_0x32f670(0x1bb),'type':_0x32f670(0x1d7)}],'data':_0x41d1bf};}export async function executeSchemaQuery(_0x268687,_0x52eb6d,_0x51fd1e){const _0x1d7a5c=a103_0x7c18,_0x9b0fd7=_0x268687[_0x1d7a5c(0x1bd)]()[_0x1d7a5c(0x1b1)](/;+$/,''),_0x488f6a='SELECT\x20*\x20FROM\x20(\x0a'+_0x9b0fd7+_0x1d7a5c(0x1b2);_0x51fd1e[_0x1d7a5c(0x1cd)]&&console[_0x1d7a5c(0x1b3)](_0x1d7a5c(0x1ae)+_0x488f6a);const _0x4d7a9b=await withProgressSpinner('Fetching\x20schema...',async _0x292533=>{const _0xf3aaf8=_0x1d7a5c,_0x56d95e=await _0x52eb6d[_0xf3aaf8(0x1b8)][_0xf3aaf8(0x1ad)](_0x488f6a,{'catalog':'td','schema':'information_schema','onJobId':_0x5a78f6=>{const _0x134daf=_0xf3aaf8;_0x292533[_0x134daf(0x1d4)](_0x5a78f6);}});return _0x56d95e;},{'verbose':_0x51fd1e[_0x1d7a5c(0x1cd)]});return buildSchemaResult(_0x4d7a9b[_0x1d7a5c(0x1cb)]);}export function displayFieldsHumanReadable(_0x31b423,_0x37b0ca){const _0x548613=a103_0x7c18,_0x526fc4=_0x31b423[_0x548613(0x1db)](_0x3af64b=>_0x3af64b[_0x548613(0x1c8)]==='attribute'),_0x44341f=_0x31b423[_0x548613(0x1db)](_0x154478=>_0x154478['source']===_0x548613(0x1d6)),_0x2a4198=new Map();for(const _0x4e8234 of _0x526fc4){const _0x104d85=_0x4e8234[_0x548613(0x1ca)]||_0x4e8234['parentTableName']||'Unknown',_0x234891=_0x2a4198[_0x548613(0x1d5)](_0x104d85);_0x234891?_0x234891['fields'][_0x548613(0x1c4)](_0x4e8234):_0x2a4198[_0x548613(0x1bc)](_0x104d85,{'displayName':_0x104d85,'tableName':_0x4e8234[_0x548613(0x1d2)],'fields':[_0x4e8234]});}const _0x41b03f=new Map();for(const _0x2a38e4 of _0x44341f){const _0x154dbf=_0x2a38e4['behaviorName']||_0x548613(0x1da),_0x37341b=_0x41b03f[_0x548613(0x1d5)](_0x154dbf)||[];_0x37341b[_0x548613(0x1c4)](_0x2a38e4),_0x41b03f[_0x548613(0x1bc)](_0x154dbf,_0x37341b);}console[_0x548613(0x1b3)]('\x0a'+a103_0x103647[_0x548613(0x1cc)](_0x37b0ca));if(_0x2a4198[_0x548613(0x1b0)]>0x0){console['error']('\x0a'+a103_0x103647[_0x548613(0x1b7)]('Attributes'));const _0x3f42cf=[..._0x2a4198['entries']()][_0x548613(0x1d0)]((_0x3e5957,_0x21564b)=>_0x3e5957[0x0][_0x548613(0x1b9)](_0x21564b[0x0]));for(const [,_0x267504]of _0x3f42cf){const _0x39b7ee=_0x267504['tableName']&&_0x267504[_0x548613(0x1b5)]!==_0x267504[_0x548613(0x1d3)]?'\x20'+a103_0x103647[_0x548613(0x1b7)]('('+_0x267504['tableName']+')'):'';console[_0x548613(0x1b3)]('\x20\x20'+a103_0x103647[_0x548613(0x1cc)](_0x267504[_0x548613(0x1d3)])+_0x39b7ee);const _0x4593d5=[..._0x267504['fields']][_0x548613(0x1d0)]((_0x292293,_0x2a223a)=>_0x292293[_0x548613(0x1c9)]['localeCompare'](_0x2a223a[_0x548613(0x1c9)]));for(const _0x3b860c of _0x4593d5){const _0x4bea31=_0x3b860c['parentColumn']&&_0x3b860c[_0x548613(0x1be)]!==_0x3b860c[_0x548613(0x1c9)]?'\x20'+a103_0x103647[_0x548613(0x1b7)]('('+_0x3b860c['parentColumn']+')'):'';console['error'](_0x548613(0x1dc)+_0x3b860c[_0x548613(0x1c9)]+_0x4bea31+':\x20'+a103_0x103647[_0x548613(0x1c5)](_0x3b860c[_0x548613(0x1ac)]));}}}if(_0x41b03f[_0x548613(0x1b0)]>0x0){console[_0x548613(0x1b3)]('\x0a'+a103_0x103647['dim'](_0x548613(0x1ab)));const _0xaf5c67=[..._0x41b03f['entries']()][_0x548613(0x1d0)]((_0x3deb34,_0x4d6e1e)=>_0x3deb34[0x0]['localeCompare'](_0x4d6e1e[0x0]));for(const [_0x3106ce,_0x3f790b]of _0xaf5c67){const _0x3ef592=_0x3f790b[0x0],_0x2ac1d8=_0x3ef592?.[_0x548613(0x1d2)]||'';console['error']('\x20\x20'+a103_0x103647[_0x548613(0x1cc)](_0x3106ce)+(_0x2ac1d8?'\x20'+a103_0x103647[_0x548613(0x1b7)]('('+_0x2ac1d8+')'):''));const _0x75f027=[..._0x3f790b][_0x548613(0x1d0)]((_0x18f657,_0x532815)=>_0x18f657[_0x548613(0x1c9)]['localeCompare'](_0x532815[_0x548613(0x1c9)]));for(const _0x5d6136 of _0x75f027){const _0x3ce1c6=_0x5d6136['name'][_0x548613(0x1c6)](_0x3106ce+'.')?_0x5d6136[_0x548613(0x1c9)]['slice'](_0x3106ce['length']+0x1):_0x5d6136[_0x548613(0x1c9)],_0x106b0b=_0x5d6136['parentColumn']&&_0x5d6136['parentColumn']!==_0x3ce1c6?'\x20'+a103_0x103647[_0x548613(0x1b7)]('('+_0x5d6136[_0x548613(0x1be)]+')'):'';console[_0x548613(0x1b3)](_0x548613(0x1dc)+_0x3ce1c6+_0x106b0b+':\x20'+a103_0x103647[_0x548613(0x1c5)](_0x5d6136[_0x548613(0x1ac)]));}}}console[_0x548613(0x1b3)]('');}function a103_0x5cc8(){const _0x3e8305=['filter','\x20\x20\x20\x20','44BrhVfR','map','Behaviors','type','execute','Schema\x20query:\x0a','null','size','replace','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','error','27746hkrFqB','tableName','column_name','dim','query','localeCompare','default','extra','set','trim','parentColumn','3064ikpxrg','1253718JGYSmO','801890DrZgHr','7lqtjlA','484116kQSOsx','push','cyan','startsWith','1962bmxUuE','source','name','groupingName','data','bold','verbose','columns','5tYNasg','sort','563660PekueW','parentTableName','displayName','setJobId','get','behavior','varchar','24646swSQAg','column_type','Unknown'];a103_0x5cc8=function(){return _0x3e8305;};return a103_0x5cc8();}
1
+ (function(_0x37407d,_0x173c17){const _0x357522=a103_0x4987,_0x4c00e1=_0x37407d();while(!![]){try{const _0x5394e2=parseInt(_0x357522(0xf9))/0x1+parseInt(_0x357522(0x10c))/0x2+parseInt(_0x357522(0x103))/0x3*(-parseInt(_0x357522(0x10b))/0x4)+parseInt(_0x357522(0x10f))/0x5+-parseInt(_0x357522(0xfb))/0x6+parseInt(_0x357522(0x110))/0x7+parseInt(_0x357522(0x119))/0x8*(-parseInt(_0x357522(0xf0))/0x9);if(_0x5394e2===_0x173c17)break;else _0x4c00e1['push'](_0x4c00e1['shift']());}catch(_0x55c873){_0x4c00e1['push'](_0x4c00e1['shift']());}}}(a103_0x92b2,0x31acc));function a103_0x4987(_0x19f178,_0x2cbf10){_0x19f178=_0x19f178-0xe3;const _0x92b2a3=a103_0x92b2();let _0x49877f=_0x92b2a3[_0x19f178];return _0x49877f;}import a103_0x1715f5 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x4b2738){const _0x3fbdaf=a103_0x4987,_0x2a5571=_0x4b2738[_0x3fbdaf(0xe4)]['map'](_0x523c46=>({'column_name':_0x523c46['name'],'column_type':_0x523c46['type'],'null':_0x3fbdaf(0x116),'key':null,'default':null,'extra':null}));return{..._0x4b2738,'columns':[{'name':_0x3fbdaf(0x10e),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x101),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x10a),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x113),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0xe3),'type':_0x3fbdaf(0x118)},{'name':_0x3fbdaf(0x112),'type':'varchar'}],'data':_0x2a5571};}function a103_0x92b2(){const _0x32458d=['push','slice','attribute','sort','270870LZbQeh','Fetching\x20schema...','2130468cXvLTT','SELECT\x20*\x20FROM\x20(\x0a','query','entries','Schema\x20query:\x0a','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','column_type','startsWith','8628napwdh','information_schema','groupingName','Behaviors','\x20\x20\x20\x20','setJobId','error','null','88BsRffK','332130Ctcvhy','filter','column_name','1050035ueYYDe','1942388tkZxkC','Unknown','extra','key','dim','fields','YES','size','varchar','302608UebOrU','data','default','columns','cyan','displayName','set','bold','execute','type','name','get','localeCompare','parentColumn','verbose','72iJKgNL','length','tableName','parentTableName','source'];a103_0x92b2=function(){return _0x32458d;};return a103_0x92b2();}export async function executeSchemaQuery(_0x331785,_0xf3b135,_0x21ecf3){const _0x1749f8=a103_0x4987,_0x10a9a3=_0x331785['trim']()['replace'](/;+$/,''),_0x5ddc6c=_0x1749f8(0xfc)+_0x10a9a3+_0x1749f8(0x100);_0x21ecf3[_0x1749f8(0xef)]&&console['error'](_0x1749f8(0xff)+_0x5ddc6c);const _0x5e91ad=await withProgressSpinner(_0x1749f8(0xfa),async _0x3bd811=>{const _0x4aac26=_0x1749f8,_0x4ea6ba=await _0xf3b135[_0x4aac26(0xfd)][_0x4aac26(0xe9)](_0x5ddc6c,{'catalog':'td','schema':_0x4aac26(0x104),'onJobId':_0x2887fb=>{const _0x56904f=_0x4aac26;_0x3bd811[_0x56904f(0x108)](_0x2887fb);}});return _0x4ea6ba;},{'verbose':_0x21ecf3[_0x1749f8(0xef)]});return buildSchemaResult(_0x5e91ad[_0x1749f8(0x11a)]);}export function displayFieldsHumanReadable(_0x581aa0,_0x14c12c){const _0x36530b=a103_0x4987,_0x38d4f1=_0x581aa0[_0x36530b(0x10d)](_0x5b3eb5=>_0x5b3eb5[_0x36530b(0xf4)]===_0x36530b(0xf7)),_0x2993a9=_0x581aa0[_0x36530b(0x10d)](_0x472dba=>_0x472dba[_0x36530b(0xf4)]==='behavior'),_0x31d1fb=new Map();for(const _0x5a6766 of _0x38d4f1){const _0x3cf48f=_0x5a6766[_0x36530b(0x105)]||_0x5a6766['parentTableName']||_0x36530b(0x111),_0x28d959=_0x31d1fb[_0x36530b(0xec)](_0x3cf48f);_0x28d959?_0x28d959[_0x36530b(0x115)][_0x36530b(0xf5)](_0x5a6766):_0x31d1fb[_0x36530b(0xe7)](_0x3cf48f,{'displayName':_0x3cf48f,'tableName':_0x5a6766[_0x36530b(0xf3)],'fields':[_0x5a6766]});}const _0x3523d7=new Map();for(const _0x42a876 of _0x2993a9){const _0x16eca8=_0x42a876['behaviorName']||_0x36530b(0x111),_0x28456e=_0x3523d7[_0x36530b(0xec)](_0x16eca8)||[];_0x28456e[_0x36530b(0xf5)](_0x42a876),_0x3523d7[_0x36530b(0xe7)](_0x16eca8,_0x28456e);}console[_0x36530b(0x109)]('\x0a'+a103_0x1715f5[_0x36530b(0xe8)](_0x14c12c));if(_0x31d1fb[_0x36530b(0x117)]>0x0){console['error']('\x0a'+a103_0x1715f5['dim']('Attributes'));const _0x80712a=[..._0x31d1fb['entries']()][_0x36530b(0xf8)]((_0x475d0b,_0x2b66ab)=>_0x475d0b[0x0][_0x36530b(0xed)](_0x2b66ab[0x0]));for(const [,_0x995990]of _0x80712a){const _0x243508=_0x995990[_0x36530b(0xf2)]&&_0x995990[_0x36530b(0xf2)]!==_0x995990[_0x36530b(0xe6)]?'\x20'+a103_0x1715f5[_0x36530b(0x114)]('('+_0x995990[_0x36530b(0xf2)]+')'):'';console[_0x36530b(0x109)]('\x20\x20'+a103_0x1715f5[_0x36530b(0xe8)](_0x995990[_0x36530b(0xe6)])+_0x243508);const _0x4208eb=[..._0x995990['fields']][_0x36530b(0xf8)]((_0x1191fa,_0x11b8de)=>_0x1191fa['name']['localeCompare'](_0x11b8de[_0x36530b(0xeb)]));for(const _0x48c949 of _0x4208eb){const _0x22b50b=_0x48c949['parentColumn']&&_0x48c949[_0x36530b(0xee)]!==_0x48c949[_0x36530b(0xeb)]?'\x20'+a103_0x1715f5[_0x36530b(0x114)]('('+_0x48c949[_0x36530b(0xee)]+')'):'';console[_0x36530b(0x109)](_0x36530b(0x107)+_0x48c949[_0x36530b(0xeb)]+_0x22b50b+':\x20'+a103_0x1715f5[_0x36530b(0xe5)](_0x48c949[_0x36530b(0xea)]));}}}if(_0x3523d7[_0x36530b(0x117)]>0x0){console['error']('\x0a'+a103_0x1715f5[_0x36530b(0x114)](_0x36530b(0x106)));const _0x280b6a=[..._0x3523d7[_0x36530b(0xfe)]()][_0x36530b(0xf8)]((_0x5d5a2,_0x51940c)=>_0x5d5a2[0x0]['localeCompare'](_0x51940c[0x0]));for(const [_0x4982dc,_0x4b44b8]of _0x280b6a){const _0x482943=_0x4b44b8[0x0],_0xaa5bf1=_0x482943?.[_0x36530b(0xf3)]||'';console[_0x36530b(0x109)]('\x20\x20'+a103_0x1715f5[_0x36530b(0xe8)](_0x4982dc)+(_0xaa5bf1?'\x20'+a103_0x1715f5[_0x36530b(0x114)]('('+_0xaa5bf1+')'):''));const _0x376dab=[..._0x4b44b8][_0x36530b(0xf8)]((_0x30c066,_0x1c42af)=>_0x30c066[_0x36530b(0xeb)]['localeCompare'](_0x1c42af[_0x36530b(0xeb)]));for(const _0x1e2f51 of _0x376dab){const _0x5a6d54=_0x1e2f51[_0x36530b(0xeb)][_0x36530b(0x102)](_0x4982dc+'.')?_0x1e2f51[_0x36530b(0xeb)][_0x36530b(0xf6)](_0x4982dc[_0x36530b(0xf1)]+0x1):_0x1e2f51['name'],_0x27bd0a=_0x1e2f51[_0x36530b(0xee)]&&_0x1e2f51['parentColumn']!==_0x5a6d54?'\x20'+a103_0x1715f5['dim']('('+_0x1e2f51[_0x36530b(0xee)]+')'):'';console[_0x36530b(0x109)](_0x36530b(0x107)+_0x5a6d54+_0x27bd0a+':\x20'+a103_0x1715f5[_0x36530b(0xe5)](_0x1e2f51[_0x36530b(0xea)]));}}}console[_0x36530b(0x109)]('');}
@@ -1 +1 @@
1
- (function(_0x927234,_0x3dc112){const _0x13dc3f=a104_0x3bcf,_0x2f16a4=_0x927234();while(!![]){try{const _0x32e722=-parseInt(_0x13dc3f(0x1c2))/0x1*(parseInt(_0x13dc3f(0x1c5))/0x2)+parseInt(_0x13dc3f(0x1b6))/0x3*(parseInt(_0x13dc3f(0x1c4))/0x4)+parseInt(_0x13dc3f(0x1b1))/0x5*(parseInt(_0x13dc3f(0x1b4))/0x6)+-parseInt(_0x13dc3f(0x1bd))/0x7+-parseInt(_0x13dc3f(0x1b8))/0x8+parseInt(_0x13dc3f(0x1b9))/0x9+parseInt(_0x13dc3f(0x1ba))/0xa;if(_0x32e722===_0x3dc112)break;else _0x2f16a4['push'](_0x2f16a4['shift']());}catch(_0x20e5ec){_0x2f16a4['push'](_0x2f16a4['shift']());}}}(a104_0x9321,0x7b788));import{readdirSync,statSync}from'fs';import a104_0xe4e36b from'path';function a104_0x3bcf(_0x2323d4,_0xede3a0){_0x2323d4=_0x2323d4-0x1b1;const _0x9321cb=a104_0x9321();let _0x3bcf0e=_0x9321cb[_0x2323d4];return _0x3bcf0e;}export function findYamlFiles(_0x116337){const _0x3a309f=[];function _0x3ce4e1(_0xb28dda){const _0xea5904=a104_0x3bcf,_0x3be266=readdirSync(_0xb28dda,{'withFileTypes':!![]});for(const _0x38935a of _0x3be266){const _0x1fc532=a104_0xe4e36b['join'](_0xb28dda,_0x38935a[_0xea5904(0x1bc)]);if(_0x38935a[_0xea5904(0x1b7)]())_0x3ce4e1(_0x1fc532);else(_0x38935a['name'][_0xea5904(0x1be)](_0xea5904(0x1c1))||_0x38935a['name']['endsWith'](_0xea5904(0x1b3)))&&_0x3a309f['push'](_0x1fc532);}}return _0x3ce4e1(_0x116337),_0x3a309f;}export function discoverYamlFiles(_0x545692){const _0xd98d76=a104_0x3bcf,_0x13f149=findYamlFiles(_0x545692);return _0x13f149[_0xd98d76(0x1bb)](_0x5c730e=>{const _0x9d2343=_0xd98d76,_0x11fcb7=a104_0xe4e36b[_0x9d2343(0x1b5)](_0x545692,_0x5c730e),_0x2b6bf0=a104_0xe4e36b[_0x9d2343(0x1c0)](_0x11fcb7);return{'absolutePath':_0x5c730e,'relativePath':_0x11fcb7,'folderPath':_0x2b6bf0==='.'?'':_0x2b6bf0};});}function a104_0x9321(){const _0x55e787=['.yaml','3054eqhGAi','relative','258zhlPUc','isDirectory','5105776EnFwJL','3601224XdIhmi','6530040HcpyBu','map','name','3914379qTgQEw','endsWith','isFile','dirname','.yml','112139qUMAOP','toLowerCase','7892NQpOPY','2WDuJQV','5820QCkPiE','extname'];a104_0x9321=function(){return _0x55e787;};return a104_0x9321();}export function isYamlFile(_0x4378d3){const _0x49ee3a=a104_0x3bcf;try{const _0x23a370=statSync(_0x4378d3);if(!_0x23a370[_0x49ee3a(0x1bf)]())return![];const _0x452ca6=a104_0xe4e36b[_0x49ee3a(0x1b2)](_0x4378d3)[_0x49ee3a(0x1c3)]();return _0x452ca6===_0x49ee3a(0x1c1)||_0x452ca6===_0x49ee3a(0x1b3);}catch{return![];}}
1
+ (function(_0x21b2f5,_0x476b56){const _0x2769b1=a104_0x67aa,_0x4e6e9c=_0x21b2f5();while(!![]){try{const _0x2a1c3a=parseInt(_0x2769b1(0x161))/0x1*(parseInt(_0x2769b1(0x163))/0x2)+-parseInt(_0x2769b1(0x160))/0x3+parseInt(_0x2769b1(0x16b))/0x4+-parseInt(_0x2769b1(0x15d))/0x5*(-parseInt(_0x2769b1(0x15f))/0x6)+-parseInt(_0x2769b1(0x158))/0x7*(-parseInt(_0x2769b1(0x168))/0x8)+parseInt(_0x2769b1(0x16c))/0x9+-parseInt(_0x2769b1(0x16a))/0xa*(parseInt(_0x2769b1(0x166))/0xb);if(_0x2a1c3a===_0x476b56)break;else _0x4e6e9c['push'](_0x4e6e9c['shift']());}catch(_0x5b6999){_0x4e6e9c['push'](_0x4e6e9c['shift']());}}}(a104_0x5694,0xd72c1));function a104_0x67aa(_0x10f391,_0x543472){_0x10f391=_0x10f391-0x158;const _0x569412=a104_0x5694();let _0x67aab7=_0x569412[_0x10f391];return _0x67aab7;}import{readdirSync,statSync}from'fs';import a104_0x516703 from'path';export function findYamlFiles(_0x53c8a5){const _0x575191=[];function _0x356514(_0x9c088e){const _0x14bd81=a104_0x67aa,_0x202112=readdirSync(_0x9c088e,{'withFileTypes':!![]});for(const _0x1d42aa of _0x202112){const _0x1ba553=a104_0x516703[_0x14bd81(0x162)](_0x9c088e,_0x1d42aa[_0x14bd81(0x15c)]);if(_0x1d42aa[_0x14bd81(0x15b)]())_0x356514(_0x1ba553);else(_0x1d42aa[_0x14bd81(0x15c)][_0x14bd81(0x15e)](_0x14bd81(0x16d))||_0x1d42aa['name'][_0x14bd81(0x15e)](_0x14bd81(0x15a)))&&_0x575191[_0x14bd81(0x169)](_0x1ba553);}}return _0x356514(_0x53c8a5),_0x575191;}function a104_0x5694(){const _0x3a1c73=['toLowerCase','relative','14068450xLOnCY','map','5176QLLkfL','push','10ytrQoe','1507448HggeYc','3995739EGsSur','.yml','2996pXjnwx','isFile','.yaml','isDirectory','name','5420GRGjye','endsWith','5232ogNMnD','2387547IttTSd','1EtIxEh','join','1826294uRdctV'];a104_0x5694=function(){return _0x3a1c73;};return a104_0x5694();}export function discoverYamlFiles(_0x5fbd97){const _0xa615ce=a104_0x67aa,_0x1e12ba=findYamlFiles(_0x5fbd97);return _0x1e12ba[_0xa615ce(0x167)](_0x261179=>{const _0x287938=_0xa615ce,_0x707709=a104_0x516703[_0x287938(0x165)](_0x5fbd97,_0x261179),_0x129c07=a104_0x516703['dirname'](_0x707709);return{'absolutePath':_0x261179,'relativePath':_0x707709,'folderPath':_0x129c07==='.'?'':_0x129c07};});}export function isYamlFile(_0x32e94a){const _0x1ff91d=a104_0x67aa;try{const _0x2c2b95=statSync(_0x32e94a);if(!_0x2c2b95[_0x1ff91d(0x159)]())return![];const _0x32ed31=a104_0x516703['extname'](_0x32e94a)[_0x1ff91d(0x164)]();return _0x32ed31===_0x1ff91d(0x16d)||_0x32ed31===_0x1ff91d(0x15a);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3bbf04,_0x5b9dbf){const _0x1bb2ca=a105_0x2e8c,_0x1d7a24=_0x3bbf04();while(!![]){try{const _0x2b7415=-parseInt(_0x1bb2ca(0xd4))/0x1*(-parseInt(_0x1bb2ca(0x10f))/0x2)+-parseInt(_0x1bb2ca(0xe1))/0x3*(parseInt(_0x1bb2ca(0xe3))/0x4)+parseInt(_0x1bb2ca(0x102))/0x5+parseInt(_0x1bb2ca(0xd8))/0x6+parseInt(_0x1bb2ca(0xfa))/0x7+-parseInt(_0x1bb2ca(0x10a))/0x8+-parseInt(_0x1bb2ca(0xf1))/0x9*(parseInt(_0x1bb2ca(0xe7))/0xa);if(_0x2b7415===_0x5b9dbf)break;else _0x1d7a24['push'](_0x1d7a24['shift']());}catch(_0x4f2d85){_0x1d7a24['push'](_0x1d7a24['shift']());}}}(a105_0x3b76,0xa8cbe));function a105_0x2e8c(_0x15b1dd,_0x3f0c9d){_0x15b1dd=_0x15b1dd-0xd4;const _0x3b7669=a105_0x3b76();let _0x2e8c68=_0x3b7669[_0x15b1dd];return _0x2e8c68;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x3c75f7){const _0x574e86=a105_0x2e8c;return _0x3c75f7['toLowerCase']()[_0x574e86(0x106)](/\s+/g,'_')[_0x574e86(0x106)](/[^a-z0-9_]/g,'')[_0x574e86(0x106)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x35a6cd){const _0x34a73d=a105_0x2e8c,_0x2aa269=_0x35a6cd['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2aa269){const _0x172075=_0x2aa269[0x1][_0x34a73d(0xe9)](),_0x5b8725=_0x2aa269[0x2],_0x29a149=_0x5b8725[_0x34a73d(0x106)](/-/g,'')[_0x34a73d(0xec)](0x0,0x4)[_0x34a73d(0xe9)]();return _0x172075+'_'+_0x29a149;}const _0x6c5811=_0x35a6cd[_0x34a73d(0xe2)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x6c5811){const _0x527cf3=_0x6c5811[0x1],_0x32f754=_0x6c5811[0x2][_0x34a73d(0xe9)](),_0x1e1c81=_0x527cf3[_0x34a73d(0x106)](/-/g,'')[_0x34a73d(0xec)](0x0,0x4)[_0x34a73d(0xe9)]();return _0x32f754+'_'+_0x1e1c81;}return undefined;}function stableStringify(_0x1e9e5b){const _0x4be9b1=a105_0x2e8c;if(Array[_0x4be9b1(0x11f)](_0x1e9e5b))return'['+_0x1e9e5b[_0x4be9b1(0x100)](_0x453fba=>stableStringify(_0x453fba))[_0x4be9b1(0x10e)](',')+']';if(_0x1e9e5b&&typeof _0x1e9e5b===_0x4be9b1(0x122)){const _0x58d36b=_0x1e9e5b,_0x1b8f78=Object[_0x4be9b1(0xf0)](_0x58d36b)['sort'](),_0x1cb0cf=_0x1b8f78[_0x4be9b1(0x100)](_0x4c15a6=>'\x22'+_0x4c15a6+'\x22:'+stableStringify(_0x58d36b[_0x4c15a6]));return'{'+_0x1cb0cf[_0x4be9b1(0x10e)](',')+'}';}const _0xda66b6=JSON[_0x4be9b1(0xfc)](_0x1e9e5b);return _0xda66b6===undefined?_0x4be9b1(0xe6):_0xda66b6;}export function consolidateActivationsByContent(_0x2c092f){const _0xbcab8c=a105_0x2e8c,_0x59ed72={},_0x238c05=new Map(),_0x530571=new Map();for(const _0x3e2537 of _0x2c092f){if(!_0x3e2537)continue;for(const [_0x878bc,_0x270240]of Object[_0xbcab8c(0xed)](_0x3e2537)){const _0x26c342={'connection':_0x270240[_0xbcab8c(0x113)],..._0x270240[_0xbcab8c(0x101)]!==undefined&&{'all_columns':_0x270240[_0xbcab8c(0x101)]},..._0x270240[_0xbcab8c(0xdc)]!==undefined&&{'columns':_0x270240[_0xbcab8c(0xdc)]},..._0x270240['behavior']!==undefined&&{'behavior':_0x270240[_0xbcab8c(0x111)]},..._0x270240[_0xbcab8c(0x117)]!==undefined&&{'schedule':_0x270240[_0xbcab8c(0x117)]},..._0x270240[_0xbcab8c(0xe8)]!==undefined&&{'notification':_0x270240[_0xbcab8c(0xe8)]},..._0x270240['connector_config']!==undefined&&{'connector_config':_0x270240[_0xbcab8c(0x110)]},..._0x270240[_0xbcab8c(0x115)]!==undefined&&{'activation_template_id':_0x270240['activation_template_id']}},_0x43a35c=stableStringify(_0x26c342),_0x5d77c9=_0x530571[_0xbcab8c(0x125)](_0x43a35c);_0x5d77c9?_0x238c05['set'](_0x878bc,_0x5d77c9):(_0x59ed72[_0x878bc]=_0x270240,_0x238c05[_0xbcab8c(0x11a)](_0x878bc,_0x878bc),_0x530571[_0xbcab8c(0x11a)](_0x43a35c,_0x878bc));}}return{'merged':_0x59ed72,'nameMapping':_0x238c05};}export function updateActivationReferences(_0xab9cf5,_0x555120){const _0x240499=a105_0x2e8c;if(!_0xab9cf5)return;for(const _0x57031e of _0xab9cf5){if(!_0x57031e[_0x240499(0x123)])continue;for(const _0x38f994 of _0x57031e[_0x240499(0x123)]){if(_0x38f994[_0x240499(0xf8)]===_0x240499(0xdd)&&_0x38f994[_0x240499(0x107)]?.[_0x240499(0xdd)]){const _0x3ba0a3=_0x555120[_0x240499(0x125)](_0x38f994[_0x240499(0x107)][_0x240499(0xdd)]);_0x3ba0a3&&_0x3ba0a3!==_0x38f994[_0x240499(0x107)][_0x240499(0xdd)]&&(_0x38f994[_0x240499(0x107)][_0x240499(0xdd)]=_0x3ba0a3);}}}}export function consolidateSegmentsByContent(_0x494d2c,_0x2f2ddd){const _0x257155=a105_0x2e8c,_0x39d489={},_0x539d15=new Map(),_0x405ef1=new Map();for(const _0x1bb755 of _0x494d2c){if(!_0x1bb755)continue;for(const [_0x135623,_0xe21e91]of Object['entries'](_0x1bb755)){if(!_0xe21e91[_0x257155(0x121)]){_0x39d489[_0x135623]=_0xe21e91,_0x539d15[_0x257155(0x11a)](_0x135623,_0x135623);continue;}const _0x1c5b1d=_0xe21e91[_0x257155(0x116)]&&_0xe21e91['description'][_0x257155(0x10c)]()?_0xe21e91[_0x257155(0x116)]:undefined,_0x5e31a5=JSON[_0x257155(0xfc)]({'description':_0x1c5b1d,'rule':deepSortObject(_0xe21e91[_0x257155(0x121)])}),_0x5e3d09=_0x405ef1[_0x257155(0x125)](_0x5e31a5);if(_0x5e3d09){const _0x1b75a6={..._0xe21e91[_0x257155(0x116)]!==undefined&&{'description':_0xe21e91[_0x257155(0x116)]},'rule':_0xe21e91[_0x257155(0x121)]?deepSortObject(_0xe21e91[_0x257155(0x121)]):_0xe21e91['rule']};if(_0x135623<_0x5e3d09){_0x39d489[_0x135623]=_0x1b75a6,delete _0x39d489[_0x5e3d09];for(const [_0x4e81b0,_0x3f4094]of _0x539d15[_0x257155(0xed)]()){_0x3f4094===_0x5e3d09&&_0x539d15[_0x257155(0x11a)](_0x4e81b0,_0x135623);}_0x539d15[_0x257155(0x11a)](_0x135623,_0x135623),_0x405ef1[_0x257155(0x11a)](_0x5e31a5,_0x135623);}else _0x39d489[_0x5e3d09]=_0x1b75a6,_0x539d15['set'](_0x135623,_0x5e3d09);}else{let _0x1b3a68=_0x135623;if(_0x2f2ddd){const _0x3b36c4=_0x2f2ddd[_0x257155(0x125)](_0x5e31a5);_0x3b36c4&&_0x3b36c4[_0x257155(0x114)]>0x0&&(_0x1b3a68=_0x3b36c4[_0x257155(0xec)]()[_0x257155(0x103)]()[0x0]);}const _0x33a6d5={..._0xe21e91[_0x257155(0x116)]!==undefined&&{'description':_0xe21e91[_0x257155(0x116)]},'rule':_0xe21e91[_0x257155(0x121)]?deepSortObject(_0xe21e91['rule']):_0xe21e91[_0x257155(0x121)]};_0x39d489[_0x1b3a68]=_0x33a6d5,_0x539d15[_0x257155(0x11a)](_0x135623,_0x1b3a68),_0x405ef1[_0x257155(0x11a)](_0x5e31a5,_0x1b3a68);}}}return{'merged':_0x39d489,'nameMapping':_0x539d15};}function a105_0x3b76(){const _0x4307ce=['exclude','slice','entries','milestone','decision_point','keys','12519grfruq','latest','item','draft','versionNumber','journeys','conditions','type','version','181006BlzlBP','versions','stringify','values','bundle_name','index','map','all_columns','1938450XuuUja','sort','journeyStages','exit_criteria','replace','with','nameMapping','attributes','2638800KVhYBe','push','trim','segment','join','3326mquXkJ','connector_config','behavior','yaml','connection','length','activation_template_id','description','schedule','state','journeyBundleName','set','journey','segments','activations','from','isArray','string','rule','object','steps','some','get','769QsRZPl','wait','endsWith','entry_criteria','6653982cAvRSa','name','.yml','version_number','columns','activation','goal','find','condition','123SQYdrU','match','50044cGpzVE','launched','branches','null','9110AuXpiw','notification','toLowerCase','stages'];a105_0x3b76=function(){return _0x4307ce;};return a105_0x3b76();}export function updateSegmentReferences(_0x3baefa,_0xd720df){const _0x5b243e=a105_0x2e8c;if(!_0x3baefa)return;for(const _0x1983e0 of _0x3baefa){if(_0x1983e0[_0x5b243e(0xd7)]?.['segment']){const _0x107480=_0xd720df[_0x5b243e(0x125)](_0x1983e0[_0x5b243e(0xd7)]['segment']);_0x107480&&(_0x1983e0['entry_criteria'][_0x5b243e(0x10d)]=_0x107480);}if(_0x1983e0['steps'])for(const _0x481194 of _0x1983e0[_0x5b243e(0x123)]){if(_0x481194['type']==='decision_point'&&_0x481194['with']?.[_0x5b243e(0xe5)])for(const _0x2e834c of _0x481194[_0x5b243e(0x107)][_0x5b243e(0xe5)]){if(_0x2e834c[_0x5b243e(0x10d)]){const _0x1f7d48=_0xd720df[_0x5b243e(0x125)](_0x2e834c[_0x5b243e(0x10d)]);_0x1f7d48&&(_0x2e834c['segment']=_0x1f7d48);}}}}}export function updateSegmentRefsInSegments(_0x337453,_0x5048f8){const _0x4437dc=a105_0x2e8c;for(const _0x41c88e of Object[_0x4437dc(0xfd)](_0x337453)){_0x41c88e['rule']&&updateSegmentRefsInRule(_0x41c88e[_0x4437dc(0x121)],_0x5048f8);}}function updateSegmentRefsInRule(_0x49558a,_0x1a655c){const _0x19154e=a105_0x2e8c;if(_0x49558a===null||typeof _0x49558a!=='object')return;if(Array[_0x19154e(0x11f)](_0x49558a)){for(const _0x40dc5f of _0x49558a){updateSegmentRefsInRule(_0x40dc5f,_0x1a655c);}return;}const _0x1768d3=_0x49558a;if((_0x1768d3[_0x19154e(0xf8)]==='include'||_0x1768d3['type']===_0x19154e(0xeb))&&typeof _0x1768d3[_0x19154e(0x10d)]===_0x19154e(0x120)){const _0x52d07a=_0x1a655c['get'](_0x1768d3[_0x19154e(0x10d)]);_0x52d07a&&(_0x1768d3[_0x19154e(0x10d)]=_0x52d07a);}if(_0x1768d3[_0x19154e(0xf7)]&&Array['isArray'](_0x1768d3[_0x19154e(0xf7)]))for(const _0x3ed64f of _0x1768d3[_0x19154e(0xf7)]){updateSegmentRefsInRule(_0x3ed64f,_0x1a655c);}}export function buildJourneysArray(_0x45ad6c){const _0x3f241b=a105_0x2e8c,_0x21b27b=Math['max'](..._0x45ad6c[_0x3f241b(0x100)](_0xc2096f=>_0xc2096f[_0x3f241b(0xf3)][_0x3f241b(0xf5)]||0x0));return _0x45ad6c[_0x3f241b(0x100)](_0x3e856b=>{const _0xcd794f=_0x3f241b,_0x509629=(_0x3e856b[_0xcd794f(0xf3)][_0xcd794f(0xf5)]||0x0)===_0x21b27b,_0x4c4765=_0x3e856b[_0xcd794f(0x112)][_0xcd794f(0xf6)]?.[0x0],_0x2430ef={'version':_0x4c4765?.[_0xcd794f(0xf9)]||_0x3e856b[_0xcd794f(0x112)]['version']||_0x3e856b[_0xcd794f(0xf3)][_0xcd794f(0xd9)],'state':_0x3e856b[_0xcd794f(0xf3)][_0xcd794f(0x118)]===_0xcd794f(0xe4)?'launched':_0xcd794f(0xf4),'stages':_0x4c4765?.[_0xcd794f(0xea)]||_0x3e856b['yaml'][_0xcd794f(0xea)]||[],'id':_0x4c4765?.['id']||_0x3e856b['yaml']['id'],'version_number':_0x4c4765?.[_0xcd794f(0xdb)]||_0x3e856b[_0xcd794f(0x112)][_0xcd794f(0xdb)]};return _0x509629&&(_0x2430ef[_0xcd794f(0xf2)]=!![]),_0x2430ef;});}export function buildMergedJourneyDef(_0x455601,_0x5d17d8){const _0xa78f6c=a105_0x2e8c,_0x3f4480=_0x455601[0x0][_0xa78f6c(0x112)],_0x4aeb5d=buildJourneysArray(_0x455601),{merged:_0x4bfca3,nameMapping:_0x1826c6}=consolidateSegmentsByContent(_0x455601[_0xa78f6c(0x100)](_0x3e62a4=>_0x3e62a4[_0xa78f6c(0x112)][_0xa78f6c(0x11c)]),_0x5d17d8);updateSegmentRefsInSegments(_0x4bfca3,_0x1826c6);const _0x249f12=Array[_0xa78f6c(0x11e)](_0x1826c6[_0xa78f6c(0xed)]())[_0xa78f6c(0x124)](([_0x594333,_0x2f85fd])=>_0x594333!==_0x2f85fd&&_0x594333['startsWith'](_0xa78f6c(0xd7)));let _0x2be45c=_0x4bfca3,_0x42c2f2=new Map();if(_0x249f12){const _0x332fb6=consolidateSegmentsByContent([_0x4bfca3],_0x5d17d8);_0x2be45c=_0x332fb6['merged'],_0x42c2f2=_0x332fb6[_0xa78f6c(0x108)];}const _0x4aee07=new Map(_0x1826c6);for(const [_0x1e2b19,_0x10a411]of _0x42c2f2[_0xa78f6c(0xed)]()){_0x4aee07[_0xa78f6c(0x11a)](_0x1e2b19,_0x10a411);}for(const [_0xa1c065,_0x4a8353]of _0x4aee07[_0xa78f6c(0xed)]()){let _0x588857=_0x4a8353,_0x103f6d=0x0;while(_0x4aee07['has'](_0x588857)&&_0x4aee07[_0xa78f6c(0x125)](_0x588857)!==_0x588857&&_0x103f6d<MAX_MAPPING_CHAIN_DEPTH){_0x588857=_0x4aee07['get'](_0x588857),_0x103f6d++;}_0x588857!==_0x4a8353&&_0x4aee07[_0xa78f6c(0x11a)](_0xa1c065,_0x588857);}for(const _0x110ee1 of _0x4aeb5d){updateSegmentReferences(_0x110ee1['stages'],_0x4aee07);}const {merged:_0x3ef241,nameMapping:_0x2a87cd}=consolidateActivationsByContent(_0x455601['map'](_0x1957c0=>_0x1957c0['yaml'][_0xa78f6c(0x11d)]));for(const _0x149044 of _0x4aeb5d){updateActivationReferences(_0x149044[_0xa78f6c(0xea)],_0x2a87cd);}let _0x276e74=_0x3f4480['goal'];if(_0x276e74?.[_0xa78f6c(0x10d)]){const _0x49c802=_0x4aee07[_0xa78f6c(0x125)](_0x276e74[_0xa78f6c(0x10d)]);_0x49c802&&(_0x276e74={..._0x276e74,'segment':_0x49c802});}for(const _0x3b9cc8 of _0x4aeb5d){if(_0x3b9cc8[_0xa78f6c(0xde)]?.[_0xa78f6c(0x10d)]){const _0x4ae16e=_0x4aee07[_0xa78f6c(0x125)](_0x3b9cc8[_0xa78f6c(0xde)]['segment']);_0x4ae16e&&(_0x3b9cc8[_0xa78f6c(0xde)]={..._0x3b9cc8[_0xa78f6c(0xde)],'segment':_0x4ae16e});}}return{'type':_0xa78f6c(0x11b),'name':_0x3f4480[_0xa78f6c(0xd9)],'description':_0x3f4480['description'],'goal':_0x276e74,'reentry':_0x3f4480['reentry'],'segments':Object[_0xa78f6c(0xf0)](_0x2be45c)[_0xa78f6c(0x114)]>0x0?_0x2be45c:undefined,'activations':Object['keys'](_0x3ef241)['length']>0x0?_0x3ef241:undefined,'journeys':_0x4aeb5d,'bundle_id':_0x3f4480['bundle_id'],'bundle_name':_0x3f4480[_0xa78f6c(0xfe)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x4dd2b4,_0x11a1e9,_0x169544,_0x1bd44e){const _0x2f93da=a105_0x2e8c,_0x35b982=_0x4dd2b4+':'+_0x11a1e9,_0x2eeaa4=_0x169544[_0x2f93da(0x125)](_0x35b982);if(_0x2eeaa4)return _0x2eeaa4;const _0x54dfc1=await _0x1bd44e(_0x4dd2b4),_0x2e87fa=_0x54dfc1[_0x2f93da(0x109)][_0x2f93da(0x119)]||_0x54dfc1['attributes'][_0x2f93da(0xd9)],_0x52f2be=_0x54dfc1[_0x2f93da(0x109)][_0x2f93da(0x104)][_0x2f93da(0xdf)](_0x51e983=>String(_0x51e983['id'])===String(_0x11a1e9)),_0x5ec148=_0x52f2be?.['name']||_0x11a1e9,_0x100bd8={'journeyName':_0x2e87fa,'stageName':_0x5ec148};return _0x169544[_0x2f93da(0x11a)](_0x35b982,_0x100bd8),_0x100bd8;}export function formatApiJourneyName(_0x115f0b,_0x5ee182){return _0x5ee182+'\x20('+_0x115f0b+')';}export function isLocalJourneyRef(_0x132b7c){const _0x4260ae=a105_0x2e8c;return _0x132b7c[_0x4260ae(0xd6)](_0x4260ae(0xda))||_0x132b7c[_0x4260ae(0xd6)]('.yaml');}export function buildLocalRuleToNameMapping(_0x18db08){const _0x5c6029=a105_0x2e8c,_0x5be1be=new Map();if(!_0x18db08)return _0x5be1be;for(const [_0x1205ce,_0x4ebd3d]of Object[_0x5c6029(0xed)](_0x18db08)){if(_0x4ebd3d[_0x5c6029(0x121)]){const _0x44f19b=serializeRule(_0x4ebd3d['rule']),_0x1e923c=_0x5be1be['get'](_0x44f19b)||[];_0x1e923c['push'](_0x1205ce),_0x5be1be['set'](_0x44f19b,_0x1e923c);}}return _0x5be1be;}export function buildLocalRuleToNameMappingFromJourney(_0x2f05c6){const _0x1f84d4=a105_0x2e8c,_0x437718=_0x2f05c6[_0x1f84d4(0x11c)];if(!_0x437718)return new Map();const _0x241a46=collectSegmentUsageCounts(_0x2f05c6),_0x2ec85d=new Map();let _0x5cc978=0x0;for(const [_0x521eb5,_0x112873]of Object[_0x1f84d4(0xed)](_0x437718)){if(!_0x112873[_0x1f84d4(0x121)]){_0x5cc978++;continue;}const _0x4c2339=serializeRule(_0x112873[_0x1f84d4(0x121)]),_0x1517b4=_0x2ec85d[_0x1f84d4(0x125)](_0x4c2339)||[];_0x1517b4[_0x1f84d4(0x10b)]({'name':_0x521eb5,'index':_0x5cc978}),_0x2ec85d[_0x1f84d4(0x11a)](_0x4c2339,_0x1517b4),_0x5cc978++;}const _0x38490d=new Map();for(const [_0x17060a,_0x53e991]of _0x2ec85d){const _0x5651c8=_0x53e991[_0x1f84d4(0xec)]()[_0x1f84d4(0x103)]((_0x46f0b9,_0x16104a)=>{const _0x1817f9=_0x1f84d4,_0x420a24=_0x241a46['get'](_0x46f0b9['name'])||0x0,_0x5c0c0=_0x241a46[_0x1817f9(0x125)](_0x16104a[_0x1817f9(0xd9)])||0x0;if(_0x420a24!==_0x5c0c0)return _0x5c0c0-_0x420a24;return _0x46f0b9[_0x1817f9(0xff)]-_0x16104a[_0x1817f9(0xff)];})[_0x1f84d4(0x100)](_0x4751bc=>_0x4751bc['name']);_0x38490d[_0x1f84d4(0x11a)](_0x17060a,_0x5651c8);}return _0x38490d;}export function collectSegmentUsageCounts(_0x187365){const _0x2af4b2=a105_0x2e8c,_0xd671f1=new Map(),_0x45dba9=_0x1e5e94=>{const _0x3d44e0=a105_0x2e8c;if(!_0x1e5e94)return;_0xd671f1[_0x3d44e0(0x11a)](_0x1e5e94,(_0xd671f1['get'](_0x1e5e94)||0x0)+0x1);},_0xf38e9=_0x2f8c20=>{const _0x34a351=a105_0x2e8c;for(const _0x38bd5d of _0x2f8c20){_0x45dba9(_0x38bd5d[_0x34a351(0xd7)]?.[_0x34a351(0x10d)]);if(_0x38bd5d[_0x34a351(0x105)])for(const _0x4e2057 of _0x38bd5d[_0x34a351(0x105)]){_0x45dba9(_0x4e2057[_0x34a351(0x10d)]);}_0x45dba9(_0x38bd5d[_0x34a351(0xee)]?.['segment']);if(_0x38bd5d['steps'])for(const _0x2f4160 of _0x38bd5d['steps']){if(_0x2f4160[_0x34a351(0xf8)]===_0x34a351(0xef))for(const _0x28379f of _0x2f4160[_0x34a351(0x107)][_0x34a351(0xe5)]){_0x45dba9(_0x28379f[_0x34a351(0x10d)]);}else _0x2f4160[_0x34a351(0xf8)]===_0x34a351(0xd5)&&_0x45dba9(_0x2f4160[_0x34a351(0x107)][_0x34a351(0xe0)]?.[_0x34a351(0x10d)]);}}};_0x45dba9(_0x187365[_0x2af4b2(0xde)]?.['segment']);if(_0x187365[_0x2af4b2(0xf6)])for(const _0x2f41e0 of _0x187365['journeys']){_0x45dba9(_0x2f41e0[_0x2af4b2(0xde)]?.[_0x2af4b2(0x10d)]),_0xf38e9(_0x2f41e0['stages']);}_0x187365[_0x2af4b2(0xea)]&&_0xf38e9(_0x187365[_0x2af4b2(0xea)]);if(_0x187365[_0x2af4b2(0xfb)])for(const _0x251af9 of _0x187365[_0x2af4b2(0xfb)]){_0xf38e9(_0x251af9[_0x2af4b2(0xea)]);}return _0xd671f1;}
1
+ (function(_0x46da8c,_0x37d44e){const _0x678aa=a105_0x464b,_0x519013=_0x46da8c();while(!![]){try{const _0x481278=parseInt(_0x678aa(0x10f))/0x1*(-parseInt(_0x678aa(0xd5))/0x2)+-parseInt(_0x678aa(0xd4))/0x3*(parseInt(_0x678aa(0xdc))/0x4)+-parseInt(_0x678aa(0xf5))/0x5+-parseInt(_0x678aa(0xd2))/0x6+parseInt(_0x678aa(0x10c))/0x7+parseInt(_0x678aa(0xcf))/0x8*(parseInt(_0x678aa(0xc8))/0x9)+-parseInt(_0x678aa(0xf4))/0xa*(-parseInt(_0x678aa(0xda))/0xb);if(_0x481278===_0x37d44e)break;else _0x519013['push'](_0x519013['shift']());}catch(_0x4b8bef){_0x519013['push'](_0x519013['shift']());}}}(a105_0x26f0,0x4c7d9));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x12fbcf){const _0x40b440=a105_0x464b;return _0x12fbcf[_0x40b440(0x104)]()['replace'](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0x40b440(0x107)](/_+/g,'_')[_0x40b440(0x107)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x8b981f){const _0x343ee2=a105_0x464b,_0x4b723c=_0x8b981f[_0x343ee2(0xe4)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x4b723c){const _0x52e339=_0x4b723c[0x1]['toLowerCase'](),_0x1e01be=_0x4b723c[0x2],_0x1c4361=_0x1e01be['replace'](/-/g,'')[_0x343ee2(0x102)](0x0,0x4)[_0x343ee2(0x104)]();return _0x52e339+'_'+_0x1c4361;}const _0xae4c68=_0x8b981f[_0x343ee2(0xe4)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xae4c68){const _0x2b5128=_0xae4c68[0x1],_0x88ea2a=_0xae4c68[0x2][_0x343ee2(0x104)](),_0x13e9ee=_0x2b5128['replace'](/-/g,'')[_0x343ee2(0x102)](0x0,0x4)['toLowerCase']();return _0x88ea2a+'_'+_0x13e9ee;}return undefined;}function stableStringify(_0x5c3fac){const _0x4ad7b6=a105_0x464b;if(Array['isArray'](_0x5c3fac))return'['+_0x5c3fac[_0x4ad7b6(0xe6)](_0x3e7cf0=>stableStringify(_0x3e7cf0))[_0x4ad7b6(0xe9)](',')+']';if(_0x5c3fac&&typeof _0x5c3fac===_0x4ad7b6(0xd7)){const _0x79ea37=_0x5c3fac,_0x50aba=Object[_0x4ad7b6(0xd3)](_0x79ea37)[_0x4ad7b6(0xe5)](),_0x16c273=_0x50aba[_0x4ad7b6(0xe6)](_0x291feb=>'\x22'+_0x291feb+'\x22:'+stableStringify(_0x79ea37[_0x291feb]));return'{'+_0x16c273['join'](',')+'}';}const _0xab6633=JSON[_0x4ad7b6(0xdf)](_0x5c3fac);return _0xab6633===undefined?_0x4ad7b6(0xea):_0xab6633;}function a105_0x26f0(){const _0x371201=['stages','trim','journeyStages','launched','index','11720iyRMjd','versionNumber','yaml','1934082NCzMeF','keys','111354RlCLIf','288846uSNnNp','schedule','object','activation','steps','55NTDEvr','journeys','52bKZqDw','push','has','stringify','bundle_id','length','latest','conditions','match','sort','map','entry_criteria','segments','join','null','decision_point','versions','columns','attributes','behavior','nameMapping','string','with','rule','2267890WyuMBh','373285PTinwl','activation_template_id','notification','exit_criteria','journey','entries','bundle_name','draft','values','type','set','version_number','goal','slice','item','toLowerCase','all_columns','wait','replace','journeyBundleName','version','name','connector_config','594279EgXGqa','segment','endsWith','3qhITsC','isArray','get','some','branches','2502JpYqkP','description'];a105_0x26f0=function(){return _0x371201;};return a105_0x26f0();}export function consolidateActivationsByContent(_0x4dc460){const _0x5890cf=a105_0x464b,_0x1eafc8={},_0x50cc78=new Map(),_0xc93a8c=new Map();for(const _0x56f35c of _0x4dc460){if(!_0x56f35c)continue;for(const [_0x2e4e1f,_0x55a1a3]of Object[_0x5890cf(0xfa)](_0x56f35c)){const _0x4dfd34={'connection':_0x55a1a3['connection'],..._0x55a1a3[_0x5890cf(0x105)]!==undefined&&{'all_columns':_0x55a1a3['all_columns']},..._0x55a1a3['columns']!==undefined&&{'columns':_0x55a1a3[_0x5890cf(0xed)]},..._0x55a1a3['behavior']!==undefined&&{'behavior':_0x55a1a3[_0x5890cf(0xef)]},..._0x55a1a3['schedule']!==undefined&&{'schedule':_0x55a1a3[_0x5890cf(0xd6)]},..._0x55a1a3[_0x5890cf(0xf7)]!==undefined&&{'notification':_0x55a1a3[_0x5890cf(0xf7)]},..._0x55a1a3['connector_config']!==undefined&&{'connector_config':_0x55a1a3[_0x5890cf(0x10b)]},..._0x55a1a3[_0x5890cf(0xf6)]!==undefined&&{'activation_template_id':_0x55a1a3[_0x5890cf(0xf6)]}},_0x30403e=stableStringify(_0x4dfd34),_0xc92876=_0xc93a8c[_0x5890cf(0x111)](_0x30403e);_0xc92876?_0x50cc78[_0x5890cf(0xff)](_0x2e4e1f,_0xc92876):(_0x1eafc8[_0x2e4e1f]=_0x55a1a3,_0x50cc78['set'](_0x2e4e1f,_0x2e4e1f),_0xc93a8c['set'](_0x30403e,_0x2e4e1f));}}return{'merged':_0x1eafc8,'nameMapping':_0x50cc78};}export function updateActivationReferences(_0x253b13,_0x4e6107){const _0x1a4f5f=a105_0x464b;if(!_0x253b13)return;for(const _0x4377cb of _0x253b13){if(!_0x4377cb[_0x1a4f5f(0xd9)])continue;for(const _0x43874d of _0x4377cb[_0x1a4f5f(0xd9)]){if(_0x43874d[_0x1a4f5f(0xfe)]===_0x1a4f5f(0xd8)&&_0x43874d[_0x1a4f5f(0xf2)]?.[_0x1a4f5f(0xd8)]){const _0x238bad=_0x4e6107[_0x1a4f5f(0x111)](_0x43874d[_0x1a4f5f(0xf2)][_0x1a4f5f(0xd8)]);_0x238bad&&_0x238bad!==_0x43874d[_0x1a4f5f(0xf2)][_0x1a4f5f(0xd8)]&&(_0x43874d['with'][_0x1a4f5f(0xd8)]=_0x238bad);}}}}export function consolidateSegmentsByContent(_0x348839,_0x44e2b9){const _0x4c6773=a105_0x464b,_0x3747d6={},_0x4a0062=new Map(),_0x4623ef=new Map();for(const _0x8fe327 of _0x348839){if(!_0x8fe327)continue;for(const [_0xa2de4f,_0x2b70b7]of Object[_0x4c6773(0xfa)](_0x8fe327)){if(!_0x2b70b7[_0x4c6773(0xf3)]){_0x3747d6[_0xa2de4f]=_0x2b70b7,_0x4a0062[_0x4c6773(0xff)](_0xa2de4f,_0xa2de4f);continue;}const _0xe29c66=_0x2b70b7[_0x4c6773(0xc9)]&&_0x2b70b7[_0x4c6773(0xc9)][_0x4c6773(0xcb)]()?_0x2b70b7[_0x4c6773(0xc9)]:undefined,_0x2404f1=JSON['stringify']({'description':_0xe29c66,'rule':deepSortObject(_0x2b70b7[_0x4c6773(0xf3)])}),_0x1174ab=_0x4623ef[_0x4c6773(0x111)](_0x2404f1);if(_0x1174ab){const _0x290a48={..._0x2b70b7[_0x4c6773(0xc9)]!==undefined&&{'description':_0x2b70b7[_0x4c6773(0xc9)]},'rule':_0x2b70b7[_0x4c6773(0xf3)]?deepSortObject(_0x2b70b7[_0x4c6773(0xf3)]):_0x2b70b7[_0x4c6773(0xf3)]};if(_0xa2de4f<_0x1174ab){_0x3747d6[_0xa2de4f]=_0x290a48,delete _0x3747d6[_0x1174ab];for(const [_0x2cde17,_0x72ca1f]of _0x4a0062[_0x4c6773(0xfa)]()){_0x72ca1f===_0x1174ab&&_0x4a0062[_0x4c6773(0xff)](_0x2cde17,_0xa2de4f);}_0x4a0062['set'](_0xa2de4f,_0xa2de4f),_0x4623ef['set'](_0x2404f1,_0xa2de4f);}else _0x3747d6[_0x1174ab]=_0x290a48,_0x4a0062[_0x4c6773(0xff)](_0xa2de4f,_0x1174ab);}else{let _0x2066dd=_0xa2de4f;if(_0x44e2b9){const _0x110ca0=_0x44e2b9[_0x4c6773(0x111)](_0x2404f1);_0x110ca0&&_0x110ca0[_0x4c6773(0xe1)]>0x0&&(_0x2066dd=_0x110ca0[_0x4c6773(0x102)]()['sort']()[0x0]);}const _0x9dcb0d={..._0x2b70b7[_0x4c6773(0xc9)]!==undefined&&{'description':_0x2b70b7[_0x4c6773(0xc9)]},'rule':_0x2b70b7[_0x4c6773(0xf3)]?deepSortObject(_0x2b70b7[_0x4c6773(0xf3)]):_0x2b70b7['rule']};_0x3747d6[_0x2066dd]=_0x9dcb0d,_0x4a0062['set'](_0xa2de4f,_0x2066dd),_0x4623ef[_0x4c6773(0xff)](_0x2404f1,_0x2066dd);}}}return{'merged':_0x3747d6,'nameMapping':_0x4a0062};}export function updateSegmentReferences(_0x13071e,_0x4f201c){const _0x286970=a105_0x464b;if(!_0x13071e)return;for(const _0x1e017e of _0x13071e){if(_0x1e017e[_0x286970(0xe7)]?.[_0x286970(0x10d)]){const _0x2d9178=_0x4f201c[_0x286970(0x111)](_0x1e017e[_0x286970(0xe7)]['segment']);_0x2d9178&&(_0x1e017e[_0x286970(0xe7)][_0x286970(0x10d)]=_0x2d9178);}if(_0x1e017e[_0x286970(0xd9)])for(const _0x2aa446 of _0x1e017e['steps']){if(_0x2aa446[_0x286970(0xfe)]===_0x286970(0xeb)&&_0x2aa446[_0x286970(0xf2)]?.[_0x286970(0xc7)])for(const _0x3cdf21 of _0x2aa446[_0x286970(0xf2)][_0x286970(0xc7)]){if(_0x3cdf21[_0x286970(0x10d)]){const _0x222466=_0x4f201c[_0x286970(0x111)](_0x3cdf21['segment']);_0x222466&&(_0x3cdf21[_0x286970(0x10d)]=_0x222466);}}}}}export function updateSegmentRefsInSegments(_0xaf255e,_0x42c57d){const _0x2ae8da=a105_0x464b;for(const _0x34196f of Object[_0x2ae8da(0xfd)](_0xaf255e)){_0x34196f[_0x2ae8da(0xf3)]&&updateSegmentRefsInRule(_0x34196f[_0x2ae8da(0xf3)],_0x42c57d);}}function updateSegmentRefsInRule(_0x43e44e,_0x56679e){const _0x466154=a105_0x464b;if(_0x43e44e===null||typeof _0x43e44e!=='object')return;if(Array[_0x466154(0x110)](_0x43e44e)){for(const _0x46f485 of _0x43e44e){updateSegmentRefsInRule(_0x46f485,_0x56679e);}return;}const _0xd91940=_0x43e44e;if((_0xd91940[_0x466154(0xfe)]==='include'||_0xd91940[_0x466154(0xfe)]==='exclude')&&typeof _0xd91940[_0x466154(0x10d)]===_0x466154(0xf1)){const _0x3561ed=_0x56679e['get'](_0xd91940[_0x466154(0x10d)]);_0x3561ed&&(_0xd91940[_0x466154(0x10d)]=_0x3561ed);}if(_0xd91940[_0x466154(0xe3)]&&Array['isArray'](_0xd91940[_0x466154(0xe3)]))for(const _0x3a3117 of _0xd91940[_0x466154(0xe3)]){updateSegmentRefsInRule(_0x3a3117,_0x56679e);}}export function buildJourneysArray(_0x501fa1){const _0x536113=a105_0x464b,_0x4f9eee=Math['max'](..._0x501fa1[_0x536113(0xe6)](_0xa79872=>_0xa79872['item'][_0x536113(0xd0)]||0x0));return _0x501fa1[_0x536113(0xe6)](_0x363a52=>{const _0x456ebd=_0x536113,_0x550e25=(_0x363a52[_0x456ebd(0x103)]['versionNumber']||0x0)===_0x4f9eee,_0x34109a=_0x363a52[_0x456ebd(0xd1)][_0x456ebd(0xdb)]?.[0x0],_0x19f0a3={'version':_0x34109a?.['version']||_0x363a52['yaml'][_0x456ebd(0x109)]||_0x363a52[_0x456ebd(0x103)]['name'],'state':_0x363a52[_0x456ebd(0x103)]['state']===_0x456ebd(0xcd)?'launched':_0x456ebd(0xfc),'stages':_0x34109a?.[_0x456ebd(0xca)]||_0x363a52[_0x456ebd(0xd1)]['stages']||[],'id':_0x34109a?.['id']||_0x363a52[_0x456ebd(0xd1)]['id'],'version_number':_0x34109a?.[_0x456ebd(0x100)]||_0x363a52[_0x456ebd(0xd1)][_0x456ebd(0x100)]};return _0x550e25&&(_0x19f0a3[_0x456ebd(0xe2)]=!![]),_0x19f0a3;});}export function buildMergedJourneyDef(_0x1de575,_0xb7f5a0){const _0xd514cc=a105_0x464b,_0x429834=_0x1de575[0x0][_0xd514cc(0xd1)],_0x58ba49=buildJourneysArray(_0x1de575),{merged:_0x5c4834,nameMapping:_0x4eff25}=consolidateSegmentsByContent(_0x1de575['map'](_0x144c14=>_0x144c14[_0xd514cc(0xd1)]['segments']),_0xb7f5a0);updateSegmentRefsInSegments(_0x5c4834,_0x4eff25);const _0x446bd8=Array['from'](_0x4eff25[_0xd514cc(0xfa)]())[_0xd514cc(0x112)](([_0x49add4,_0x334bc8])=>_0x49add4!==_0x334bc8&&_0x49add4['startsWith'](_0xd514cc(0xe7)));let _0xb5bd27=_0x5c4834,_0x1aeea4=new Map();if(_0x446bd8){const _0x4bd66b=consolidateSegmentsByContent([_0x5c4834],_0xb7f5a0);_0xb5bd27=_0x4bd66b['merged'],_0x1aeea4=_0x4bd66b[_0xd514cc(0xf0)];}const _0x349f4c=new Map(_0x4eff25);for(const [_0x43cb04,_0x2e32a0]of _0x1aeea4['entries']()){_0x349f4c['set'](_0x43cb04,_0x2e32a0);}for(const [_0x32c0c7,_0x254130]of _0x349f4c[_0xd514cc(0xfa)]()){let _0x4b9313=_0x254130,_0x51855d=0x0;while(_0x349f4c[_0xd514cc(0xde)](_0x4b9313)&&_0x349f4c[_0xd514cc(0x111)](_0x4b9313)!==_0x4b9313&&_0x51855d<MAX_MAPPING_CHAIN_DEPTH){_0x4b9313=_0x349f4c[_0xd514cc(0x111)](_0x4b9313),_0x51855d++;}_0x4b9313!==_0x254130&&_0x349f4c[_0xd514cc(0xff)](_0x32c0c7,_0x4b9313);}for(const _0x59abdd of _0x58ba49){updateSegmentReferences(_0x59abdd[_0xd514cc(0xca)],_0x349f4c);}const {merged:_0x1ae85e,nameMapping:_0x32e9c1}=consolidateActivationsByContent(_0x1de575['map'](_0x206f6a=>_0x206f6a[_0xd514cc(0xd1)]['activations']));for(const _0x418d69 of _0x58ba49){updateActivationReferences(_0x418d69[_0xd514cc(0xca)],_0x32e9c1);}let _0x3e4c29=_0x429834['goal'];if(_0x3e4c29?.[_0xd514cc(0x10d)]){const _0x3712a6=_0x349f4c['get'](_0x3e4c29[_0xd514cc(0x10d)]);_0x3712a6&&(_0x3e4c29={..._0x3e4c29,'segment':_0x3712a6});}for(const _0x49870c of _0x58ba49){if(_0x49870c[_0xd514cc(0x101)]?.[_0xd514cc(0x10d)]){const _0x1b0963=_0x349f4c[_0xd514cc(0x111)](_0x49870c[_0xd514cc(0x101)][_0xd514cc(0x10d)]);_0x1b0963&&(_0x49870c['goal']={..._0x49870c[_0xd514cc(0x101)],'segment':_0x1b0963});}}return{'type':_0xd514cc(0xf9),'name':_0x429834[_0xd514cc(0x10a)],'description':_0x429834[_0xd514cc(0xc9)],'goal':_0x3e4c29,'reentry':_0x429834['reentry'],'segments':Object[_0xd514cc(0xd3)](_0xb5bd27)[_0xd514cc(0xe1)]>0x0?_0xb5bd27:undefined,'activations':Object[_0xd514cc(0xd3)](_0x1ae85e)['length']>0x0?_0x1ae85e:undefined,'journeys':_0x58ba49,'bundle_id':_0x429834[_0xd514cc(0xe0)],'bundle_name':_0x429834[_0xd514cc(0xfb)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x2e9fc1,_0x1b8597,_0x1b03e9,_0x3713b1){const _0x4bd2fb=a105_0x464b,_0x20c2b1=_0x2e9fc1+':'+_0x1b8597,_0xcd2ffd=_0x1b03e9[_0x4bd2fb(0x111)](_0x20c2b1);if(_0xcd2ffd)return _0xcd2ffd;const _0x36254b=await _0x3713b1(_0x2e9fc1),_0x532aa9=_0x36254b[_0x4bd2fb(0xee)][_0x4bd2fb(0x108)]||_0x36254b[_0x4bd2fb(0xee)]['name'],_0x574c4e=_0x36254b[_0x4bd2fb(0xee)][_0x4bd2fb(0xcc)]['find'](_0x254448=>String(_0x254448['id'])===String(_0x1b8597)),_0x388114=_0x574c4e?.[_0x4bd2fb(0x10a)]||_0x1b8597,_0x8e63da={'journeyName':_0x532aa9,'stageName':_0x388114};return _0x1b03e9['set'](_0x20c2b1,_0x8e63da),_0x8e63da;}export function formatApiJourneyName(_0x498175,_0x53073b){return _0x53073b+'\x20('+_0x498175+')';}export function isLocalJourneyRef(_0xd06ad7){const _0x591cf7=a105_0x464b;return _0xd06ad7[_0x591cf7(0x10e)]('.yml')||_0xd06ad7[_0x591cf7(0x10e)]('.yaml');}export function buildLocalRuleToNameMapping(_0x3314d2){const _0x3be272=a105_0x464b,_0x1b3e89=new Map();if(!_0x3314d2)return _0x1b3e89;for(const [_0x18e337,_0x2672fb]of Object[_0x3be272(0xfa)](_0x3314d2)){if(_0x2672fb[_0x3be272(0xf3)]){const _0x475427=serializeRule(_0x2672fb[_0x3be272(0xf3)]),_0xd13f62=_0x1b3e89['get'](_0x475427)||[];_0xd13f62[_0x3be272(0xdd)](_0x18e337),_0x1b3e89['set'](_0x475427,_0xd13f62);}}return _0x1b3e89;}export function buildLocalRuleToNameMappingFromJourney(_0x1c0a84){const _0x506fff=a105_0x464b,_0x301997=_0x1c0a84[_0x506fff(0xe8)];if(!_0x301997)return new Map();const _0x28f830=collectSegmentUsageCounts(_0x1c0a84),_0x4f6a85=new Map();let _0x524804=0x0;for(const [_0xf346a5,_0x5f5508]of Object[_0x506fff(0xfa)](_0x301997)){if(!_0x5f5508['rule']){_0x524804++;continue;}const _0x47c08a=serializeRule(_0x5f5508['rule']),_0x2da86d=_0x4f6a85[_0x506fff(0x111)](_0x47c08a)||[];_0x2da86d[_0x506fff(0xdd)]({'name':_0xf346a5,'index':_0x524804}),_0x4f6a85[_0x506fff(0xff)](_0x47c08a,_0x2da86d),_0x524804++;}const _0xfbb03d=new Map();for(const [_0x14ecb9,_0x47c85a]of _0x4f6a85){const _0x20ecdf=_0x47c85a[_0x506fff(0x102)]()[_0x506fff(0xe5)]((_0x4dbf0a,_0x334364)=>{const _0x3fd0b7=_0x506fff,_0x2684e0=_0x28f830[_0x3fd0b7(0x111)](_0x4dbf0a['name'])||0x0,_0x4a4bda=_0x28f830['get'](_0x334364['name'])||0x0;if(_0x2684e0!==_0x4a4bda)return _0x4a4bda-_0x2684e0;return _0x4dbf0a[_0x3fd0b7(0xce)]-_0x334364[_0x3fd0b7(0xce)];})[_0x506fff(0xe6)](_0x4b6bb2=>_0x4b6bb2[_0x506fff(0x10a)]);_0xfbb03d[_0x506fff(0xff)](_0x14ecb9,_0x20ecdf);}return _0xfbb03d;}function a105_0x464b(_0x2534e1,_0x221493){_0x2534e1=_0x2534e1-0xc7;const _0x26f0cb=a105_0x26f0();let _0x464b1f=_0x26f0cb[_0x2534e1];return _0x464b1f;}export function collectSegmentUsageCounts(_0x343074){const _0x563d31=a105_0x464b,_0x2e1531=new Map(),_0x3a619a=_0x4bc469=>{const _0x961bb6=a105_0x464b;if(!_0x4bc469)return;_0x2e1531[_0x961bb6(0xff)](_0x4bc469,(_0x2e1531[_0x961bb6(0x111)](_0x4bc469)||0x0)+0x1);},_0x5912f6=_0x563bea=>{const _0x434ba6=a105_0x464b;for(const _0x28031c of _0x563bea){_0x3a619a(_0x28031c[_0x434ba6(0xe7)]?.[_0x434ba6(0x10d)]);if(_0x28031c[_0x434ba6(0xf8)])for(const _0xb379ac of _0x28031c[_0x434ba6(0xf8)]){_0x3a619a(_0xb379ac[_0x434ba6(0x10d)]);}_0x3a619a(_0x28031c['milestone']?.[_0x434ba6(0x10d)]);if(_0x28031c[_0x434ba6(0xd9)])for(const _0x2155fe of _0x28031c[_0x434ba6(0xd9)]){if(_0x2155fe['type']===_0x434ba6(0xeb))for(const _0x125675 of _0x2155fe[_0x434ba6(0xf2)][_0x434ba6(0xc7)]){_0x3a619a(_0x125675[_0x434ba6(0x10d)]);}else _0x2155fe['type']===_0x434ba6(0x106)&&_0x3a619a(_0x2155fe['with']['condition']?.['segment']);}}};_0x3a619a(_0x343074[_0x563d31(0x101)]?.[_0x563d31(0x10d)]);if(_0x343074[_0x563d31(0xdb)])for(const _0x2396ed of _0x343074[_0x563d31(0xdb)]){_0x3a619a(_0x2396ed['goal']?.[_0x563d31(0x10d)]),_0x5912f6(_0x2396ed['stages']);}_0x343074['stages']&&_0x5912f6(_0x343074[_0x563d31(0xca)]);if(_0x343074[_0x563d31(0xec)])for(const _0x27bca2 of _0x343074[_0x563d31(0xec)]){_0x5912f6(_0x27bca2[_0x563d31(0xca)]);}return _0x2e1531;}