@treasuredata/tdx 0.14.4 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/agent-command.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.d.ts +0 -4
  15. package/dist/commands/claude-command.d.ts.map +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-command.js.map +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/job-command.js +1 -1
  26. package/dist/commands/journey-command.js +1 -1
  27. package/dist/commands/journey-validate-command.js +1 -1
  28. package/dist/commands/llm-command.js +1 -1
  29. package/dist/commands/llm-proxy.js +1 -1
  30. package/dist/commands/parent-segment-command.js +1 -1
  31. package/dist/commands/profile-command.d.ts +1 -1
  32. package/dist/commands/profile-command.d.ts.map +1 -1
  33. package/dist/commands/profile-command.js +1 -1
  34. package/dist/commands/profile-command.js.map +1 -1
  35. package/dist/commands/profiles-command.js +1 -1
  36. package/dist/commands/query-command.js +1 -1
  37. package/dist/commands/segment-command.js +1 -1
  38. package/dist/commands/segment-create-command.js +1 -1
  39. package/dist/commands/segment-fields-command.js +1 -1
  40. package/dist/commands/segment-pull-command.js +1 -1
  41. package/dist/commands/segment-push-command.js +1 -1
  42. package/dist/commands/segment-update-command.js +1 -1
  43. package/dist/commands/segment-use-command.js +1 -1
  44. package/dist/commands/segment-validate-command.js +1 -1
  45. package/dist/commands/segments.js +1 -1
  46. package/dist/commands/show.js +1 -1
  47. package/dist/commands/tables.js +1 -1
  48. package/dist/commands/unset-command.d.ts +18 -0
  49. package/dist/commands/unset-command.d.ts.map +1 -0
  50. package/dist/commands/unset-command.js +1 -0
  51. package/dist/commands/unset-command.js.map +1 -0
  52. package/dist/commands/use-command.d.ts.map +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/use-command.js.map +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/profile.d.ts +18 -0
  66. package/dist/core/profile.d.ts.map +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/profile.js.map +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.d.ts +11 -0
  71. package/dist/core/session.d.ts.map +1 -1
  72. package/dist/core/session.js +1 -1
  73. package/dist/core/session.js.map +1 -1
  74. package/dist/core/user-cache.js +1 -1
  75. package/dist/core/version.js +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/proxy/anthropic-adapter.js +1 -1
  78. package/dist/proxy/claude-usage-tracker.js +1 -1
  79. package/dist/proxy/context-signature.js +1 -1
  80. package/dist/proxy/conversation-utils.js +1 -1
  81. package/dist/proxy/passthrough-server.js +1 -1
  82. package/dist/proxy/server.js +1 -1
  83. package/dist/proxy/session-cache.js +1 -1
  84. package/dist/proxy/sse-usage-parser.js +1 -1
  85. package/dist/sdk/agent/agent-config.js +1 -1
  86. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  87. package/dist/sdk/agent/agent-yaml.js +1 -1
  88. package/dist/sdk/api.js +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/endpoints.js +1 -1
  91. package/dist/sdk/client/engage-api-client.js +1 -1
  92. package/dist/sdk/client/http-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js +1 -1
  94. package/dist/sdk/client/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-aliases.js +1 -1
  111. package/dist/sdk/llm/model-factors.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  115. package/dist/sdk/segment/fields-display.js +1 -1
  116. package/dist/sdk/segment/file-discovery.js +1 -1
  117. package/dist/sdk/segment/journey-utils.js +1 -1
  118. package/dist/sdk/segment/journey-yaml.js +1 -1
  119. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  120. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  121. package/dist/sdk/segment/pull-workflow.js +1 -1
  122. package/dist/sdk/segment/push-workflow.js +1 -1
  123. package/dist/sdk/segment/resolution-context.js +1 -1
  124. package/dist/sdk/segment/segment-path-parser.js +1 -1
  125. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  126. package/dist/sdk/segment/target-resolution.js +1 -1
  127. package/dist/sdk/segment/tdx-config.js +1 -1
  128. package/dist/sdk/segment/validate-files.js +1 -1
  129. package/dist/sdk/segment/yaml-validator.js +1 -1
  130. package/dist/sdk/segment.js +1 -1
  131. package/dist/sdk/types/index.d.ts +1 -0
  132. package/dist/sdk/types/index.d.ts.map +1 -1
  133. package/dist/sdk/types/index.js +1 -1
  134. package/dist/sdk/types/index.js.map +1 -1
  135. package/dist/sdk/types/progress.js +1 -1
  136. package/dist/sdk/user.js +1 -1
  137. package/dist/sdk/util/format-detector.js +1 -1
  138. package/dist/sdk/util/formatters.js +1 -1
  139. package/dist/sdk/util/index.js +1 -1
  140. package/dist/sdk/util/tree-formatter.js +1 -1
  141. package/dist/sdk/workflow/clone-workflow.js +1 -1
  142. package/dist/sdk/workflow/index.js +1 -1
  143. package/dist/sdk/workflow/pull-workflow.js +1 -1
  144. package/dist/sdk/workflow/push-workflow.js +1 -1
  145. package/dist/sdk/workflow/tdx-config.js +1 -1
  146. package/dist/sdk/workflow/workflow-utils.js +1 -1
  147. package/dist/utils/async.js +1 -1
  148. package/dist/utils/colors.js +1 -1
  149. package/dist/utils/diff.js +1 -1
  150. package/dist/utils/file-permissions.js +1 -1
  151. package/dist/utils/json-loader.js +1 -1
  152. package/dist/utils/option-validation.js +1 -1
  153. package/dist/utils/port.js +1 -1
  154. package/dist/utils/process.d.ts +25 -1
  155. package/dist/utils/process.d.ts.map +1 -1
  156. package/dist/utils/process.js +1 -1
  157. package/dist/utils/process.js.map +1 -1
  158. package/dist/utils/prompt.js +1 -1
  159. package/dist/utils/spinner.d.ts +3 -0
  160. package/dist/utils/spinner.d.ts.map +1 -1
  161. package/dist/utils/spinner.js +1 -1
  162. package/dist/utils/spinner.js.map +1 -1
  163. package/dist/utils/sse-parser.js +1 -1
  164. package/dist/utils/string-utils.js +1 -1
  165. package/dist/utils/table-ref-parser.js +1 -1
  166. package/dist/utils/tdx-logger.js +1 -1
  167. package/dist/utils/version-check.js +1 -1
  168. package/package.json +1 -1
@@ -1 +1 @@
1
- const a21_0x52fe5b=a21_0x4595;(function(_0x440ed0,_0xd95c2b){const _0x1746bc=a21_0x4595,_0x5aa4a1=_0x440ed0();while(!![]){try{const _0x2b6904=parseInt(_0x1746bc(0x1f7))/0x1+-parseInt(_0x1746bc(0x2c9))/0x2+parseInt(_0x1746bc(0x271))/0x3*(-parseInt(_0x1746bc(0x205))/0x4)+-parseInt(_0x1746bc(0x24f))/0x5+-parseInt(_0x1746bc(0x2cd))/0x6*(-parseInt(_0x1746bc(0x1ea))/0x7)+-parseInt(_0x1746bc(0x1db))/0x8*(parseInt(_0x1746bc(0x2b4))/0x9)+parseInt(_0x1746bc(0x246))/0xa;if(_0x2b6904===_0xd95c2b)break;else _0x5aa4a1['push'](_0x5aa4a1['shift']());}catch(_0x992603){_0x5aa4a1['push'](_0x5aa4a1['shift']());}}}(a21_0x4a9f,0x98f02));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a21_0x47a985 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a21_0x854bff from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a21_0x52fe5b(0x2c0),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x11eece){const _0x52ba8f=a21_0x52fe5b,_0x45bc08=process['platform'],_0x593970=_0x45bc08===_0x52ba8f(0x245)?_0x52ba8f(0x2c6):_0x45bc08===_0x52ba8f(0x2ec)?'start':_0x52ba8f(0x26a);spawn(_0x593970,[_0x11eece],{'detached':!![],'stdio':_0x52ba8f(0x213)})[_0x52ba8f(0x25e)]();}function migrateLegacyDirectory(){const _0x470259=a21_0x52fe5b;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x42f13b=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x42f13b[_0x470259(0x28b)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x470259(0x27e)](a21_0x854bff[_0x470259(0x1de)]('\x0a⚠️\x20\x20Both\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x470259(0x2b0)+PARENT_SEGMENT_DIR+_0x470259(0x28e))),console[_0x470259(0x27e)](a21_0x854bff[_0x470259(0x2a1)](_0x470259(0x1ce)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x470259(0x27e)](a21_0x854bff[_0x470259(0x1de)](_0x470259(0x284)+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x470259(0x27e)](a21_0x854bff[_0x470259(0x1fd)](_0x470259(0x258)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1fb4ee){const _0x435a11=_0x1fb4ee instanceof Error?_0x1fb4ee[_0x470259(0x1e6)]:String(_0x1fb4ee);return console[_0x470259(0x27e)](a21_0x854bff['red'](_0x470259(0x251)+_0x435a11+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a21_0x52fe5b(0x21c)](_0x237d91){const _0x25c9ca=a21_0x52fe5b;return migrateLegacyDirectory(),super[_0x25c9ca(0x21c)](_0x237d91);}}function resolveYamlFile(_0x28329f){const _0x40b8ac=a21_0x52fe5b;if(_0x28329f[_0x40b8ac(0x212)](_0x40b8ac(0x2e4))||_0x28329f['endsWith'](_0x40b8ac(0x25d)))return _0x28329f;return a21_0x47a985[_0x40b8ac(0x23f)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x28329f)+_0x40b8ac(0x2e4));}function formatProgressMessage(_0x10cc55){const _0x94aa66=a21_0x52fe5b,_0x52dd5b=_0x10cc55['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x52dd5b){const [,_0xbc5b6d,_0x50ad44,_0x23f94e='']=_0x52dd5b;return a21_0x854bff[_0x94aa66(0x2a1)](_0xbc5b6d+':')+'\x20'+_0x50ad44+a21_0x854bff['dim'](_0x23f94e);}return a21_0x854bff['dim'](_0x10cc55);}function showFileNotFoundError(_0x399219,_0x174621){const _0x25ee3c=a21_0x52fe5b;console['error'](a21_0x854bff[_0x25ee3c(0x2da)](_0x25ee3c(0x22b)+_0x399219+'\x0a')),console['error'](a21_0x854bff['cyan'](_0x25ee3c(0x2c4)+_0x174621+'`\x20to\x20download\x20the\x20configuration\x20first'));}function showParentSegmentNotSetError(_0x565648){const _0x34c811=a21_0x52fe5b;console[_0x34c811(0x27e)](a21_0x854bff[_0x34c811(0x1de)](_0x34c811(0x273))),console['error'](_0x565648);}export class ParentSegmentListCommand extends BaseCommand{[a21_0x52fe5b(0x221)]='segment:parent:list';['description']=a21_0x52fe5b(0x1df);async[a21_0x52fe5b(0x1fa)](_0x52fa99){const _0x317863=a21_0x52fe5b,{options:_0x508930,args:_0x94812d,tdx:_0x1548c5}=_0x52fa99,_0x11e7a4=_0x94812d[0x0];_0x508930[_0x317863(0x297)]&&(console['error'](_0x317863(0x2db)+_0x508930[_0x317863(0x228)]),_0x11e7a4&&console['error'](_0x317863(0x25a)+_0x11e7a4));const _0x42eb95=await withSpinner(_0x11e7a4?_0x317863(0x1d1)+_0x11e7a4+_0x317863(0x1e3):_0x317863(0x203),()=>_0x1548c5[_0x317863(0x201)][_0x317863(0x256)](),{'verbose':_0x508930['verbose']});let _0x462de5=_0x42eb95['data'];if(_0x11e7a4){const _0x580b71=_0x11e7a4[_0x317863(0x2e8)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x317863(0x2e8)](/\*/g,'.*')[_0x317863(0x2e8)](/\?/g,'.'),_0x29c5c0=new RegExp('^'+_0x580b71+'$','i');_0x462de5=_0x462de5['filter'](_0x400c31=>_0x29c5c0[_0x317863(0x234)](_0x400c31[_0x317863(0x2d7)][_0x317863(0x221)]));}_0x462de5[_0x317863(0x208)]((_0x842dfa,_0xfda354)=>_0x842dfa[_0x317863(0x2d7)][_0x317863(0x221)][_0x317863(0x1ec)](_0xfda354[_0x317863(0x2d7)][_0x317863(0x221)])),console[_0x317863(0x27e)](_0x317863(0x242)+_0x462de5['length']+'\x20parent\x20segment'+(_0x462de5[_0x317863(0x240)]!==0x1?'s':''));const _0x4045b3=_0x522aa2=>{const _0x3e5543=_0x317863;return getConsoleNextUrl(_0x508930[_0x3e5543(0x228)],_0x3e5543(0x2d4)+_0x522aa2);};if(_0x508930[_0x317863(0x262)]===_0x317863(0x278)||_0x508930[_0x317863(0x262)]==='jsonl'){const _0x5e16c2=_0x462de5[_0x317863(0x1d4)](_0x5321b2=>({..._0x5321b2,'url':_0x4045b3(_0x5321b2['id'])}));await handleSDKOutput(_0x5e16c2,_0x508930);}else{if(_0x462de5[_0x317863(0x240)]===0x0)_0x11e7a4?console[_0x317863(0x1f3)](_0x317863(0x279)+_0x11e7a4):console[_0x317863(0x1f3)]('No\x20parent\x20segments\x20found');else for(const _0x23166e of _0x462de5){const _0x5ca0a4=_0x23166e[_0x317863(0x2d7)][_0x317863(0x2aa)]?a21_0x854bff[_0x317863(0x2a1)]('\x20('+formatRows(_0x23166e['attributes']['population'])+')'):'',_0xd31cd9=hyperlink(_0x23166e['attributes'][_0x317863(0x221)],_0x4045b3(_0x23166e['id']));console[_0x317863(0x1f3)]('👥\x20'+_0xd31cd9+_0x5ca0a4);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x290);[a21_0x52fe5b(0x211)]=a21_0x52fe5b(0x229);async[a21_0x52fe5b(0x1fa)](_0x507843){const _0x4e6e9a=a21_0x52fe5b,{options:_0x2dbca1,args:_0x5effe7,tdx:_0x9b918d}=_0x507843;console[_0x4e6e9a(0x27e)](_0x4e6e9a(0x252)+_0x4e6e9a(0x2b6)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x38a62a=_0x2dbca1;if(_0x5effe7[_0x4e6e9a(0x240)]===0x0)return console[_0x4e6e9a(0x27e)](a21_0x854bff['red']('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x4e6e9a(0x27e)](_0x4e6e9a(0x2a5)),0x1;const _0x3cb678=_0x5effe7[0x0];if(!_0x38a62a['database']||!_0x38a62a[_0x4e6e9a(0x2a3)])return console['error']('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x4e6e9a(0x27e)](_0x4e6e9a(0x2a5)),0x1;_0x38a62a[_0x4e6e9a(0x297)]&&(console[_0x4e6e9a(0x27e)](_0x4e6e9a(0x2db)+_0x38a62a[_0x4e6e9a(0x228)]),console[_0x4e6e9a(0x27e)]('Name:\x20'+_0x3cb678),console[_0x4e6e9a(0x27e)]('Database:\x20'+_0x38a62a['database']),console[_0x4e6e9a(0x27e)](_0x4e6e9a(0x210)+_0x38a62a['table']));const _0x50e9a3=await loadJSONFromOptions(_0x38a62a[_0x4e6e9a(0x2d7)],_0x38a62a['attributesFile']),_0x91606d=await loadJSONFromOptions(_0x38a62a[_0x4e6e9a(0x2df)],_0x38a62a[_0x4e6e9a(0x283)]),_0xbfc9fe=await loadJSONFromOptions(_0x38a62a[_0x4e6e9a(0x1e5)],_0x38a62a[_0x4e6e9a(0x243)]),_0x13636c={'name':_0x3cb678,'description':_0x38a62a['description'],'scheduleType':_0x38a62a[_0x4e6e9a(0x26f)],'scheduleOption':_0x38a62a['scheduleOption'],'timezone':_0x38a62a[_0x4e6e9a(0x2af)],'master':{'parentDatabaseName':_0x38a62a[_0x4e6e9a(0x2cf)],'parentTableName':_0x38a62a['table']},'attributes':_0x50e9a3,'behaviors':_0x91606d,'customerGroup':_0xbfc9fe},_0x334b1c=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x3cb678+_0x4e6e9a(0x1e3),()=>_0x9b918d['segment'][_0x4e6e9a(0x222)](_0x13636c),{'verbose':_0x2dbca1[_0x4e6e9a(0x297)]}),_0x34d3cd=_0x334b1c[_0x4e6e9a(0x29c)];return console[_0x4e6e9a(0x27e)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x34d3cd[_0x4e6e9a(0x221)]+_0x4e6e9a(0x25f)+_0x34d3cd['id']),await handleSDKOutput([_0x34d3cd],_0x2dbca1),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a21_0x52fe5b(0x221)]='segment:parent:update';[a21_0x52fe5b(0x211)]=a21_0x52fe5b(0x26c);async[a21_0x52fe5b(0x1fa)](_0x182424){const _0x4516aa=a21_0x52fe5b,{options:_0x45b32c,args:_0x3e7689,tdx:_0x2cbe72}=_0x182424;console[_0x4516aa(0x27e)](_0x4516aa(0x291)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x495dc9=_0x45b32c;if(_0x3e7689[_0x4516aa(0x240)]===0x0)return console[_0x4516aa(0x27e)](a21_0x854bff[_0x4516aa(0x2da)](_0x4516aa(0x2ce))),console[_0x4516aa(0x27e)](_0x4516aa(0x214)),0x1;const _0x3af2fe=_0x3e7689[0x0];_0x495dc9[_0x4516aa(0x297)]&&(console[_0x4516aa(0x27e)](_0x4516aa(0x2db)+_0x495dc9[_0x4516aa(0x228)]),console[_0x4516aa(0x27e)](_0x4516aa(0x200)+_0x3af2fe));const _0x4c9ee2=await withSpinner(_0x4516aa(0x20a)+_0x3af2fe+_0x4516aa(0x1e3),()=>_0x2cbe72[_0x4516aa(0x201)][_0x4516aa(0x1d8)](_0x3af2fe),{'verbose':_0x495dc9[_0x4516aa(0x297)]}),_0x50f4da=_0x4c9ee2[_0x4516aa(0x29c)],_0xd23497=await loadJSONFromOptions(_0x495dc9[_0x4516aa(0x216)],_0x495dc9[_0x4516aa(0x2e3)]),_0x5aa8b2=await loadJSONFromOptions(_0x495dc9[_0x4516aa(0x2bd)],_0x495dc9[_0x4516aa(0x1eb)]),_0x4dc8d9={'name':_0x50f4da['name'],'description':_0x495dc9[_0x4516aa(0x211)]!==undefined?_0x495dc9[_0x4516aa(0x211)]:_0x50f4da[_0x4516aa(0x211)],'scheduleType':_0x495dc9[_0x4516aa(0x26f)]!==undefined?_0x495dc9[_0x4516aa(0x26f)]:_0x50f4da['scheduleType'],'scheduleOption':_0x495dc9['scheduleOption']!==undefined?_0x495dc9[_0x4516aa(0x2e6)]:_0x50f4da['scheduleOption'],'timezone':_0x495dc9[_0x4516aa(0x2af)]!==undefined?_0x495dc9[_0x4516aa(0x2af)]:_0x50f4da[_0x4516aa(0x2af)],'master':_0x50f4da[_0x4516aa(0x1f6)],'attributes':_0xd23497?[..._0x50f4da['attributes']||[],..._0xd23497]:_0x50f4da['attributes'],'behaviors':_0x5aa8b2?[..._0x50f4da[_0x4516aa(0x2df)]||[],..._0x5aa8b2]:_0x50f4da[_0x4516aa(0x2df)],'customerGroup':_0x50f4da['customerGroup']},_0x325d28=await withSpinner(_0x4516aa(0x23c)+_0x3af2fe+_0x4516aa(0x1e3),()=>_0x2cbe72['segment'][_0x4516aa(0x2c8)](_0x3af2fe,_0x4dc8d9),{'verbose':_0x495dc9[_0x4516aa(0x297)]}),_0x33125e=_0x325d28['data'];return console[_0x4516aa(0x27e)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x33125e[_0x4516aa(0x221)]+'\x27'),await handleSDKOutput([_0x33125e],_0x495dc9),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x28c);['description']=a21_0x52fe5b(0x2a8);async[a21_0x52fe5b(0x1fa)](_0x302781){const _0x47d4d3=a21_0x52fe5b,{options:_0x4c2fde,args:_0x411f9e,tdx:_0x5f02dc}=_0x302781,_0x275728=_0x4c2fde,_0x59b9d2=_0x411f9e[0x0]||_0x4c2fde[_0x47d4d3(0x1e1)];if(!_0x59b9d2)return showParentSegmentNotSetError(_0x47d4d3(0x2d9)+_0x47d4d3(0x21d)),0x1;if(_0x275728[_0x47d4d3(0x270)]&&_0x275728['output'])return console['error'](a21_0x854bff[_0x47d4d3(0x2da)](_0x47d4d3(0x2b7))),console[_0x47d4d3(0x27e)](a21_0x854bff[_0x47d4d3(0x2a1)]('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console['error'](a21_0x854bff['dim'](_0x47d4d3(0x202)+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x47d4d3(0x27e)](a21_0x854bff[_0x47d4d3(0x2c1)](_0x47d4d3(0x274))),0x1;const _0x408550=_0x275728['output']||a21_0x47a985['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x59b9d2)+_0x47d4d3(0x2e4));_0x275728['verbose']&&(console[_0x47d4d3(0x27e)]('Site:\x20'+_0x275728['site']),console['error']('Parent\x20segment:\x20'+_0x59b9d2),console[_0x47d4d3(0x27e)](_0x47d4d3(0x299)+_0x408550));const _0x36df2b=await withSpinner(_0x47d4d3(0x20f)+_0x59b9d2+_0x47d4d3(0x1e3),()=>_0x5f02dc[_0x47d4d3(0x201)][_0x47d4d3(0x26e)](_0x59b9d2),{'verbose':_0x275728[_0x47d4d3(0x297)]}),_0x3002ec=_0x36df2b[_0x47d4d3(0x29c)];if(existsSync(_0x408550)){const _0x41a3fa=readFileSync(_0x408550,_0x47d4d3(0x2bc)),_0x50233d=generateDiff(_0x41a3fa,_0x3002ec);if(!hasChanges(_0x50233d))console['error'](a21_0x854bff['green']('✔')+_0x47d4d3(0x1f5)+a21_0x854bff[_0x47d4d3(0x2c1)](_0x408550)+'\x20is\x20already\x20up\x20to\x20date');else{console['error']('\x0aChanges\x20to\x20\x27'+_0x408550+'\x27:'),console['error']('─'[_0x47d4d3(0x288)](0x3c)),console[_0x47d4d3(0x27e)](formatDiffWithColors(_0x50233d)),console['error']('─'[_0x47d4d3(0x288)](0x3c));if(!_0x275728[_0x47d4d3(0x2c3)]){const _0x523954=await confirmKey(_0x47d4d3(0x24d)+_0x408550+'\x27?');if(!_0x523954)return console[_0x47d4d3(0x27e)](_0x47d4d3(0x1f0)),0x1;}writeFileSync(_0x408550,_0x3002ec,_0x47d4d3(0x2bc)),console['error'](a21_0x854bff[_0x47d4d3(0x1fd)]('✔')+_0x47d4d3(0x2d5)+a21_0x854bff['cyan'](_0x408550));}}else{const _0x27e361=a21_0x47a985[_0x47d4d3(0x27b)](_0x408550);!existsSync(_0x27e361)&&mkdirSync(_0x27e361,{'recursive':!![]}),writeFileSync(_0x408550,_0x3002ec,'utf-8'),console[_0x47d4d3(0x27e)](a21_0x854bff[_0x47d4d3(0x1fd)]('✔')+_0x47d4d3(0x2d5)+a21_0x854bff[_0x47d4d3(0x2c1)](_0x408550));}return saveSessionContext({'parent_segment':_0x59b9d2},_0x275728[_0x47d4d3(0x227)]),console[_0x47d4d3(0x27e)](a21_0x854bff['green']('✔')+'\x20Context\x20set:\x20'+a21_0x854bff[_0x47d4d3(0x2a1)](_0x47d4d3(0x255))+_0x47d4d3(0x28f)+a21_0x854bff['cyan'](_0x59b9d2)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a21_0x52fe5b(0x1e4);[a21_0x52fe5b(0x211)]=a21_0x52fe5b(0x1dc);async[a21_0x52fe5b(0x1fa)](_0x7e2f71){const _0xb054ba=a21_0x52fe5b,{options:_0x381e19,args:_0x46eb5d,tdx:_0x4ca6a7}=_0x7e2f71,_0x270731=_0x381e19,_0x517e44=_0x46eb5d[0x0]||_0x381e19['parentSegment'];if(!_0x517e44)return showParentSegmentNotSetError(_0xb054ba(0x29e)+_0xb054ba(0x2ca)),0x1;const _0x271e75=resolveYamlFile(_0x517e44);if(!existsSync(_0x271e75))return showFileNotFoundError(_0x271e75,_0x517e44),0x1;_0x270731['verbose']&&(console[_0xb054ba(0x27e)](_0xb054ba(0x2db)+_0x270731['site']),console[_0xb054ba(0x27e)](_0xb054ba(0x225)+_0x271e75));let _0x31a676;try{_0x31a676=readFileSync(_0x271e75,_0xb054ba(0x2bc));}catch(_0x5897d1){const _0x18c11a=_0x5897d1 instanceof Error?_0x5897d1[_0xb054ba(0x1e6)]:String(_0x5897d1);return console[_0xb054ba(0x27e)]('Error\x20reading\x20file:\x20'+_0x18c11a),0x1;}const _0x266c94=await withSpinner('Analyzing\x20changes...',()=>_0x4ca6a7['segment'][_0xb054ba(0x296)](_0x31a676),{'verbose':_0x270731['verbose']}),_0x163773=_0x266c94['data'],{isNew:_0x3d71a2,name:_0x1128f6,hasChanges:_0x1b3376,diffFormatted:_0x159bc6}=_0x163773;if(!_0x1b3376)return console[_0xb054ba(0x27e)]('✔\x20No\x20changes\x20-\x20\x27'+_0x1128f6+_0xb054ba(0x2bf)),0x0;_0x3d71a2?console['error'](_0xb054ba(0x23b)+_0x1128f6+'\x27:'):console[_0xb054ba(0x27e)](_0xb054ba(0x22a)+_0x1128f6+'\x27:');console[_0xb054ba(0x27e)]('─'['repeat'](0x3c)),console[_0xb054ba(0x27e)](_0x159bc6),console['error']('─'[_0xb054ba(0x288)](0x3c));const _0x2d1dac=_0x3d71a2?_0xb054ba(0x265)+_0x1128f6+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x1128f6+'\x27?';if(!_0x270731['yes']){const _0x3dc207=await confirmKey(_0x2d1dac);if(!_0x3dc207)return console[_0xb054ba(0x27e)](_0xb054ba(0x1f0)),0x1;}const _0x711bfd=_0x3d71a2?_0xb054ba(0x287):_0xb054ba(0x1ff),_0x53bdac=await withSpinner(_0x711bfd+'\x20parent\x20segment\x20\x27'+_0x1128f6+_0xb054ba(0x1e3),()=>_0x163773[_0xb054ba(0x2cb)](),{'verbose':_0x270731[_0xb054ba(0x297)]}),_0x33ca39=_0x53bdac[_0xb054ba(0x29c)],_0x39ecf0=getConsoleNextUrl(_0x270731[_0xb054ba(0x228)],'/app/dw/parentSegments/'+_0x33ca39['id']),_0x1dd449=_0x3d71a2?_0xb054ba(0x2bb):_0xb054ba(0x207);return console[_0xb054ba(0x27e)]('✔\x20'+_0x1dd449+_0xb054ba(0x2c2)+_0x33ca39['name']+'\x27'),console['error']('\x20\x20'+_0x39ecf0),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x223);[a21_0x52fe5b(0x211)]=a21_0x52fe5b(0x233);async['execute'](_0x4acfd9){const _0x4cb219=a21_0x52fe5b,{options:_0x49790a,args:_0x4064a5,tdx:_0x2634f6}=_0x4acfd9,_0x177560=_0x49790a,_0x495bc7=_0x4064a5[0x0]||_0x49790a[_0x4cb219(0x1e1)];if(!_0x495bc7)return showParentSegmentNotSetError(_0x4cb219(0x220)+_0x4cb219(0x226)+_0x4cb219(0x20c)+_0x4cb219(0x23e)+_0x4cb219(0x21f)+_0x4cb219(0x232)),0x1;const _0x1b0141=resolveYamlFile(_0x495bc7);if(!existsSync(_0x1b0141))return showFileNotFoundError(_0x1b0141,_0x495bc7),0x1;_0x177560['verbose']&&(console[_0x4cb219(0x27e)](_0x4cb219(0x2db)+_0x177560['site']),console[_0x4cb219(0x27e)](_0x4cb219(0x225)+_0x1b0141));let _0x23fb4f;try{_0x23fb4f=readFileSync(_0x1b0141,_0x4cb219(0x2bc));}catch(_0x3914e5){const _0x190bc5=_0x3914e5 instanceof Error?_0x3914e5[_0x4cb219(0x1e6)]:String(_0x3914e5);return console[_0x4cb219(0x27e)](_0x4cb219(0x1f8)+_0x190bc5),0x1;}const _0xf39ffe=createCommandSpinner(a21_0x854bff['dim'](_0x4cb219(0x2a2)),{'verbose':_0x177560['verbose']});_0xf39ffe[_0x4cb219(0x1ee)]();const _0x1b787e={'onProgress':_0x35c151=>{_0xf39ffe['text']=formatProgressMessage(_0x35c151);}};if(_0x177560[_0x4cb219(0x1f6)])_0x1b787e[_0x4cb219(0x1f6)]=!![];if(_0x177560['enriched'])_0x1b787e[_0x4cb219(0x2e9)]=!![];_0x177560[_0x4cb219(0x27d)]&&(_0x1b787e[_0x4cb219(0x27d)]=_0x177560[_0x4cb219(0x27d)]);_0x177560['behavior']&&(_0x1b787e[_0x4cb219(0x29d)]=_0x177560[_0x4cb219(0x29d)]);if(_0x177560[_0x4cb219(0x2dc)])_0x1b787e['interval']=_0x177560[_0x4cb219(0x2dc)];let _0x9bc1ea;try{_0x9bc1ea=await _0x2634f6['segment'][_0x4cb219(0x2b2)](_0x23fb4f,_0x1b787e),_0xf39ffe[_0x4cb219(0x268)]();}catch(_0x493cd0){_0xf39ffe[_0x4cb219(0x268)]();throw _0x493cd0;}const _0x755a73=_0x177560[_0x4cb219(0x2dc)]||'-1d';return this['displayValidateResults'](_0x9bc1ea,_0x1b787e,_0x1b0141,_0x755a73),_0x9bc1ea['allValid']?0x0:0x1;}[a21_0x52fe5b(0x26d)](_0x61d64c,_0x24d223,_0x172ca2,_0x2fde0a){const _0x350574=a21_0x52fe5b;console[_0x350574(0x27e)]('\x0a'+a21_0x854bff[_0x350574(0x26b)](_0x350574(0x2f1))+'\x20'+_0x61d64c[_0x350574(0x221)]),console[_0x350574(0x27e)]('═'[_0x350574(0x288)](0x3c)),this[_0x350574(0x248)](_0x61d64c);if(typeof _0x24d223[_0x350574(0x27d)]===_0x350574(0x24b)){this[_0x350574(0x27c)](_0x61d64c),this[_0x350574(0x266)](_0x61d64c),this[_0x350574(0x215)](_0x172ca2,_0x2fde0a,'attribute',_0x24d223['attribute']);return;}if(_0x24d223[_0x350574(0x27d)]===!![]){this['displayAttributesStats'](_0x61d64c),this['displaySummary'](_0x61d64c),this[_0x350574(0x215)](_0x172ca2,_0x2fde0a,_0x350574(0x2d7));return;}if(typeof _0x24d223[_0x350574(0x29d)]===_0x350574(0x24b)){this['displayBehaviorsStats'](_0x61d64c,_0x2fde0a),this[_0x350574(0x266)](_0x61d64c),this[_0x350574(0x215)](_0x172ca2,_0x2fde0a,_0x350574(0x29d),_0x24d223[_0x350574(0x29d)]);return;}if(_0x24d223['behavior']===!![]){this[_0x350574(0x235)](_0x61d64c,_0x2fde0a),this[_0x350574(0x266)](_0x61d64c),this['displayPreviewHints'](_0x172ca2,_0x2fde0a,'behaviors');return;}this[_0x350574(0x27c)](_0x61d64c),this[_0x350574(0x235)](_0x61d64c,_0x2fde0a),this[_0x350574(0x266)](_0x61d64c),this[_0x350574(0x215)](_0x172ca2,_0x2fde0a,_0x350574(0x276));}['displayPreviewHints'](_0x3b8c54,_0x28b698,_0x1c31b6,_0x186f6f){const _0x28a5cf=a21_0x52fe5b;console[_0x28a5cf(0x27e)]('\x0a'+a21_0x854bff['dim'](_0x28a5cf(0x241)));const _0x58a1ad=_0x28b698!==_0x28a5cf(0x2de)?_0x28a5cf(0x219)+_0x28b698:'';if(_0x1c31b6==='attribute'&&_0x186f6f)console['error']('\x20\x20'+a21_0x854bff['dim'](_0x28a5cf(0x2a4)+_0x3b8c54+_0x28a5cf(0x1e0)+_0x186f6f+'\x22'+_0x58a1ad));else{if(_0x1c31b6==='behavior'&&_0x186f6f)console[_0x28a5cf(0x27e)]('\x20\x20'+a21_0x854bff[_0x28a5cf(0x2a1)](_0x28a5cf(0x2a4)+_0x3b8c54+_0x28a5cf(0x231)+_0x186f6f+'\x22'+_0x58a1ad));else(_0x1c31b6===_0x28a5cf(0x2d7)||_0x1c31b6===_0x28a5cf(0x276))&&console[_0x28a5cf(0x27e)]('\x20\x20'+a21_0x854bff[_0x28a5cf(0x2a1)](_0x28a5cf(0x2a4)+_0x3b8c54+_0x28a5cf(0x1fc)+_0x58a1ad));}(_0x1c31b6===_0x28a5cf(0x2df)||_0x1c31b6==='all')&&console['error']('\x20\x20'+a21_0x854bff[_0x28a5cf(0x2a1)]('tdx\x20segment\x20parent\x20preview\x20'+_0x3b8c54+'\x20--behavior\x20\x22<name>\x22'+_0x58a1ad)),_0x1c31b6===_0x28a5cf(0x276)&&console[_0x28a5cf(0x27e)]('\x20\x20'+a21_0x854bff[_0x28a5cf(0x2a1)](_0x28a5cf(0x2a4)+_0x3b8c54+_0x28a5cf(0x224)+_0x58a1ad));}[a21_0x52fe5b(0x248)](_0x418a90){const _0x125413=a21_0x52fe5b,{master:_0xe04aa5}=_0x418a90,_0x586569=_0xe04aa5['schemaValid']?a21_0x854bff[_0x125413(0x1fd)]('✔'):a21_0x854bff[_0x125413(0x2da)]('✘');console[_0x125413(0x27e)]('\x0a'+a21_0x854bff[_0x125413(0x2a1)](_0x125413(0x21e))),console['error'](_0x586569+'\x20'+a21_0x854bff[_0x125413(0x26b)](_0xe04aa5['database']+'.'+_0xe04aa5[_0x125413(0x2a3)])),_0xe04aa5['schemaValid']?_0xe04aa5[_0x125413(0x2ee)]!==undefined&&console[_0x125413(0x27e)]('\x20\x20'+a21_0x854bff[_0x125413(0x2a1)](_0x125413(0x2ef))+'\x20'+a21_0x854bff[_0x125413(0x2c1)](formatRows(_0xe04aa5[_0x125413(0x2ee)]))):console[_0x125413(0x27e)]('\x20\x20'+a21_0x854bff[_0x125413(0x2da)](_0x125413(0x264))+'\x20'+_0xe04aa5['schemaError']);}[a21_0x52fe5b(0x27c)](_0x11ce9c){const _0x3f3c16=a21_0x52fe5b;if(_0x11ce9c[_0x3f3c16(0x2d7)][_0x3f3c16(0x240)]===0x0)return;console[_0x3f3c16(0x27e)]('\x0a'+a21_0x854bff[_0x3f3c16(0x2a1)](_0x3f3c16(0x2f2)));for(const _0x3eb07c of _0x11ce9c['attributes']){const _0x4de414=_0x3eb07c[_0x3f3c16(0x2b8)]?a21_0x854bff['green']('✔'):a21_0x854bff[_0x3f3c16(0x2da)]('✘');let _0x12d29f='';if(_0x3eb07c[_0x3f3c16(0x2b8)]&&_0x3eb07c[_0x3f3c16(0x1f1)]!==undefined&&_0x3eb07c[_0x3f3c16(0x261)]!==undefined){const _0xe8a6a6=_0x3eb07c[_0x3f3c16(0x261)][_0x3f3c16(0x236)](0x1),_0x3d60cb=_0x3eb07c[_0x3f3c16(0x261)]>=0x50?a21_0x854bff[_0x3f3c16(0x1fd)]:_0x3eb07c['coveragePercent']>=0x32?a21_0x854bff[_0x3f3c16(0x1de)]:a21_0x854bff['red'];_0x12d29f='\x20'+a21_0x854bff[_0x3f3c16(0x2a1)]('Coverage:')+'\x20'+_0x3d60cb(_0xe8a6a6+'%')+'\x20('+formatRows(_0x3eb07c['matchedCount'])+_0x3f3c16(0x25c);}console[_0x3f3c16(0x27e)](_0x4de414+'\x20'+a21_0x854bff[_0x3f3c16(0x26b)](_0x3eb07c[_0x3f3c16(0x221)])+_0x12d29f),console[_0x3f3c16(0x27e)]('\x20\x20'+a21_0x854bff[_0x3f3c16(0x2a1)]('Source:')+'\x20'+a21_0x854bff[_0x3f3c16(0x26b)](_0x3eb07c[_0x3f3c16(0x2cf)]+'.'+_0x3eb07c[_0x3f3c16(0x2a3)]));const _0x5c1f91=_0x3eb07c['joinKey']===_0x3eb07c[_0x3f3c16(0x1d5)]?a21_0x854bff[_0x3f3c16(0x2a1)](_0x3f3c16(0x2a0))+'\x20'+_0x3eb07c[_0x3f3c16(0x2d8)]:a21_0x854bff[_0x3f3c16(0x2a1)]('Join:')+'\x20'+_0x3eb07c[_0x3f3c16(0x2d8)]+_0x3f3c16(0x28f)+_0x3eb07c['foreignKey'];console[_0x3f3c16(0x27e)]('\x20\x20'+_0x5c1f91),console['error']('\x20\x20'+a21_0x854bff['dim'](_0x3f3c16(0x1d3))),this['displayColumns'](_0x3eb07c[_0x3f3c16(0x2b1)]),!_0x3eb07c[_0x3f3c16(0x2b8)]&&console[_0x3f3c16(0x27e)]('\x20\x20'+a21_0x854bff[_0x3f3c16(0x2da)](_0x3f3c16(0x264))+'\x20'+_0x3eb07c['schemaError']);}}[a21_0x52fe5b(0x235)](_0x54d7c3,_0x3918bf){const _0x3ae84b=a21_0x52fe5b;if(_0x54d7c3['behaviors']['length']===0x0)return;console[_0x3ae84b(0x27e)]('\x0a'+a21_0x854bff[_0x3ae84b(0x2a1)]('Behaviors')+'\x20'+a21_0x854bff[_0x3ae84b(0x2a1)]('('+_0x3918bf+')'));for(const _0x49f96e of _0x54d7c3[_0x3ae84b(0x2df)]){const _0x293478=_0x49f96e[_0x3ae84b(0x2b8)]?a21_0x854bff[_0x3ae84b(0x1fd)]('✔'):a21_0x854bff[_0x3ae84b(0x2da)]('✘');let _0x2d05ba='';if(_0x49f96e[_0x3ae84b(0x2b8)]&&_0x49f96e['customersWithEvents']!==undefined&&_0x49f96e[_0x3ae84b(0x2e5)]!==undefined){const _0x17b0bb=_0x49f96e['customerPercent']?.[_0x3ae84b(0x236)](0x1)||'?',_0x264027=(_0x49f96e[_0x3ae84b(0x272)]??0x0)>=0x32?a21_0x854bff[_0x3ae84b(0x1fd)]:(_0x49f96e[_0x3ae84b(0x272)]??0x0)>=0x14?a21_0x854bff[_0x3ae84b(0x1de)]:a21_0x854bff['red'];_0x2d05ba='\x20'+a21_0x854bff[_0x3ae84b(0x2a1)](_0x3ae84b(0x2e1))+'\x20'+_0x264027(formatRows(_0x49f96e[_0x3ae84b(0x23d)]))+'\x20('+_0x17b0bb+'%)\x20'+a21_0x854bff[_0x3ae84b(0x2a1)](_0x3ae84b(0x24e))+'\x20'+a21_0x854bff[_0x3ae84b(0x2c1)](formatRows(_0x49f96e[_0x3ae84b(0x2e5)]));}console['error'](_0x293478+'\x20'+a21_0x854bff[_0x3ae84b(0x26b)](_0x49f96e[_0x3ae84b(0x221)])+_0x2d05ba),console[_0x3ae84b(0x27e)]('\x20\x20'+a21_0x854bff[_0x3ae84b(0x2a1)](_0x3ae84b(0x267))+'\x20'+a21_0x854bff[_0x3ae84b(0x26b)](_0x49f96e[_0x3ae84b(0x2cf)]+'.'+_0x49f96e[_0x3ae84b(0x2a3)]));const _0x21058a=_0x49f96e['joinKey']===_0x49f96e[_0x3ae84b(0x1d5)]?a21_0x854bff[_0x3ae84b(0x2a1)](_0x3ae84b(0x2a0))+'\x20'+_0x49f96e['joinKey']:a21_0x854bff['dim'](_0x3ae84b(0x29f))+'\x20'+_0x49f96e[_0x3ae84b(0x2d8)]+_0x3ae84b(0x28f)+_0x49f96e[_0x3ae84b(0x1d5)];console['error']('\x20\x20'+_0x21058a),console[_0x3ae84b(0x27e)]('\x20\x20'+a21_0x854bff[_0x3ae84b(0x2a1)](_0x3ae84b(0x1d3))),this[_0x3ae84b(0x239)](_0x49f96e[_0x3ae84b(0x2b1)]),!_0x49f96e[_0x3ae84b(0x2b8)]&&console[_0x3ae84b(0x27e)]('\x20\x20'+a21_0x854bff[_0x3ae84b(0x2da)]('Error:')+'\x20'+_0x49f96e['schemaError']);}}['displayColumns'](_0x3d0a6e){const _0x26ae2a=a21_0x52fe5b;for(const _0x3a3df4 of _0x3d0a6e){_0x3a3df4[_0x26ae2a(0x2be)]===_0x3a3df4[_0x26ae2a(0x1d6)]||_0x3a3df4['column']==='*'?console[_0x26ae2a(0x27e)](_0x26ae2a(0x230)+_0x3a3df4[_0x26ae2a(0x2be)]):console['error'](_0x26ae2a(0x230)+_0x3a3df4[_0x26ae2a(0x2be)]+'\x20'+a21_0x854bff[_0x26ae2a(0x2a1)]('('+_0x3a3df4[_0x26ae2a(0x1d6)]+')'));}}[a21_0x52fe5b(0x266)](_0x3706e2){const _0x3b0ffb=a21_0x52fe5b;console['error']('─'[_0x3b0ffb(0x288)](0x3c));if(_0x3706e2[_0x3b0ffb(0x24a)][_0x3b0ffb(0x240)]>0x0){console[_0x3b0ffb(0x27e)]('\x0a'+a21_0x854bff[_0x3b0ffb(0x2da)](_0x3b0ffb(0x2c5)));for(const _0x3b8db5 of _0x3706e2[_0x3b0ffb(0x24a)]){console['error']('\x20\x20'+a21_0x854bff[_0x3b0ffb(0x2da)]('•')+'\x20'+_0x3b8db5);}}_0x3706e2[_0x3b0ffb(0x238)]&&console[_0x3b0ffb(0x27e)]('\x0a'+a21_0x854bff[_0x3b0ffb(0x1fd)]('✔')+_0x3b0ffb(0x217));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x275);[a21_0x52fe5b(0x211)]=a21_0x52fe5b(0x1d0);async['execute'](_0x3fc93c){const _0x438f62=a21_0x52fe5b,{options:_0x1aab97,args:_0x2bf2c4,tdx:_0x1abaae}=_0x3fc93c,_0x5d01bc=_0x1aab97,_0x2ae92c=_0x2bf2c4[0x0]||_0x1aab97[_0x438f62(0x1e1)];if(!_0x2ae92c)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x438f62(0x1fb)+_0x438f62(0x28d)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0x438f62(0x20b)+_0x438f62(0x1f4)+_0x438f62(0x232)),0x1;if(!_0x5d01bc[_0x438f62(0x1f6)]&&!_0x5d01bc[_0x438f62(0x27d)]&&!_0x5d01bc['behavior']&&!_0x5d01bc[_0x438f62(0x2e9)])return console[_0x438f62(0x27e)](a21_0x854bff[_0x438f62(0x2da)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console['error']('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console[_0x438f62(0x27e)](_0x438f62(0x247)),console[_0x438f62(0x27e)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x438f62(0x27e)]('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x438f62(0x27e)](_0x438f62(0x263)),console['error'](_0x438f62(0x2a7)),0x1;const _0x35288d=resolveYamlFile(_0x2ae92c);if(!existsSync(_0x35288d))return showFileNotFoundError(_0x35288d,_0x2ae92c),0x1;_0x5d01bc[_0x438f62(0x297)]&&(console[_0x438f62(0x27e)]('Site:\x20'+_0x5d01bc['site']),console['error'](_0x438f62(0x225)+_0x35288d));let _0x359ec2;try{_0x359ec2=readFileSync(_0x35288d,_0x438f62(0x2bc));}catch(_0x2512ad){const _0x26a55e=_0x2512ad instanceof Error?_0x2512ad['message']:String(_0x2512ad);return console[_0x438f62(0x27e)](_0x438f62(0x1f8)+_0x26a55e),0x1;}let _0x1f55e2;try{_0x1f55e2=parseDef(_0x359ec2);}catch(_0x3524cc){const _0xd3f164=_0x3524cc instanceof Error?_0x3524cc[_0x438f62(0x1e6)]:String(_0x3524cc);return console[_0x438f62(0x27e)](a21_0x854bff['red'](_0x438f62(0x2d1)+_0xd3f164)),0x1;}if(_0x5d01bc[_0x438f62(0x27d)]===!![]||_0x5d01bc[_0x438f62(0x27d)]===''){const _0x3aaa29=_0x1f55e2[_0x438f62(0x2d7)]?.['map'](_0x3e77bb=>_0x3e77bb['name'])||[];if(_0x3aaa29[_0x438f62(0x240)]===0x0)console[_0x438f62(0x27e)](a21_0x854bff[_0x438f62(0x2da)]('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console[_0x438f62(0x27e)](a21_0x854bff['red']('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x438f62(0x27e)](_0x438f62(0x2ea));for(const _0x8297ad of _0x3aaa29){console[_0x438f62(0x27e)]('\x20\x20'+a21_0x854bff[_0x438f62(0x2c1)](_0x8297ad));}console[_0x438f62(0x27e)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2ae92c+_0x438f62(0x1e0)+_0x3aaa29[0x0]+'\x22');}return 0x1;}if(_0x5d01bc[_0x438f62(0x29d)]===!![]||_0x5d01bc[_0x438f62(0x29d)]===''){const _0x10a9ee=_0x1f55e2[_0x438f62(0x2df)]?.['map'](_0x4c9ebf=>_0x4c9ebf['name'])||[];if(_0x10a9ee[_0x438f62(0x240)]===0x0)console['error'](a21_0x854bff[_0x438f62(0x2da)](_0x438f62(0x282)));else{console[_0x438f62(0x27e)](a21_0x854bff[_0x438f62(0x2da)]('Error:\x20--behavior\x20requires\x20a\x20name\x0a')),console['error'](_0x438f62(0x298));for(const _0x32d82c of _0x10a9ee){console[_0x438f62(0x27e)]('\x20\x20'+a21_0x854bff[_0x438f62(0x2c1)](_0x32d82c));}console[_0x438f62(0x27e)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2ae92c+_0x438f62(0x231)+_0x10a9ee[0x0]+'\x22');}return 0x1;}const _0x254857=createCommandSpinner(a21_0x854bff[_0x438f62(0x2a1)](_0x438f62(0x204)),{'verbose':_0x5d01bc[_0x438f62(0x297)]});_0x254857[_0x438f62(0x1ee)]();const _0x33cf31={'onProgress':_0x13fec1=>{const _0x13e790=_0x438f62;_0x254857[_0x13e790(0x24c)]=formatProgressMessage(_0x13fec1);}};if(_0x5d01bc[_0x438f62(0x1f6)])_0x33cf31['master']=!![];if(_0x5d01bc[_0x438f62(0x27d)]&&typeof _0x5d01bc[_0x438f62(0x27d)]==='string')_0x33cf31[_0x438f62(0x27d)]=_0x5d01bc[_0x438f62(0x27d)];if(_0x5d01bc['behavior']&&typeof _0x5d01bc[_0x438f62(0x29d)]===_0x438f62(0x24b))_0x33cf31[_0x438f62(0x29d)]=_0x5d01bc['behavior'];if(_0x5d01bc['enriched'])_0x33cf31[_0x438f62(0x2e9)]=!![];if(_0x5d01bc['interval'])_0x33cf31['interval']=_0x5d01bc[_0x438f62(0x2dc)];let _0x839d97;try{_0x839d97=await _0x1abaae[_0x438f62(0x201)][_0x438f62(0x294)](_0x359ec2,_0x33cf31),_0x254857[_0x438f62(0x268)]();}catch(_0x43bedf){_0x254857['stop']();throw _0x43bedf;}return await this[_0x438f62(0x2dd)](_0x839d97,{'master':_0x5d01bc[_0x438f62(0x1f6)],'attribute':typeof _0x5d01bc['attribute']==='string'?_0x5d01bc[_0x438f62(0x27d)]:undefined,'behavior':typeof _0x5d01bc['behavior']===_0x438f62(0x24b)?_0x5d01bc['behavior']:undefined,'enriched':_0x5d01bc[_0x438f62(0x2e9)]}),_0x839d97['allValid']?0x0:0x1;}async['displayPreviewResults'](_0x2c18ce,_0x3c4be9){const _0x565165=a21_0x52fe5b;console[_0x565165(0x27e)]('\x0a'+a21_0x854bff[_0x565165(0x26b)](_0x565165(0x281))+'\x20'+_0x2c18ce[_0x565165(0x221)]),console['error']('═'['repeat'](0x3c));if(_0x3c4be9[_0x565165(0x1f6)]&&_0x2c18ce[_0x565165(0x2ac)]){const _0x1f3063=a21_0x854bff[_0x565165(0x2a1)](_0x565165(0x2d3))+'\x20'+a21_0x854bff[_0x565165(0x26b)](_0x2c18ce[_0x565165(0x1f6)][_0x565165(0x2cf)]+'.'+_0x2c18ce[_0x565165(0x1f6)]['table']);await this[_0x565165(0x2ed)](_0x1f3063,_0x2c18ce[_0x565165(0x2ac)]);}else{if(_0x3c4be9[_0x565165(0x27d)]&&_0x2c18ce[_0x565165(0x2ac)]){const _0x3cc4a1=a21_0x854bff['dim'](_0x565165(0x20e))+'\x20'+a21_0x854bff[_0x565165(0x26b)](_0x3c4be9[_0x565165(0x27d)]);await this[_0x565165(0x2ed)](_0x3cc4a1,_0x2c18ce[_0x565165(0x2ac)]);}else{if(_0x3c4be9[_0x565165(0x29d)]&&_0x2c18ce[_0x565165(0x2ac)]){const _0x3e0e33=a21_0x854bff[_0x565165(0x2a1)]('Behavior:')+'\x20'+a21_0x854bff['bold'](_0x3c4be9[_0x565165(0x29d)]);await this[_0x565165(0x2ed)](_0x3e0e33,_0x2c18ce[_0x565165(0x2ac)]);}else{if(_0x3c4be9[_0x565165(0x2e9)]&&_0x2c18ce['sampleData']){const _0x442237=a21_0x854bff[_0x565165(0x2a1)]('Enriched:')+'\x20'+a21_0x854bff[_0x565165(0x26b)]('Master\x20+\x20Attributes');await this['displaySampleData'](_0x442237,_0x2c18ce[_0x565165(0x2ac)]);}else!_0x2c18ce[_0x565165(0x2ac)]&&console[_0x565165(0x27e)](_0x565165(0x1e2));}}}if(_0x2c18ce[_0x565165(0x24a)][_0x565165(0x240)]>0x0){console[_0x565165(0x27e)]('─'[_0x565165(0x288)](0x3c)),console[_0x565165(0x27e)]('\x0a'+a21_0x854bff[_0x565165(0x2da)]('Errors:'));for(const _0x358195 of _0x2c18ce['errors']){console[_0x565165(0x27e)]('\x20\x20'+a21_0x854bff['red']('•')+'\x20'+_0x358195);}}}async[a21_0x52fe5b(0x2ed)](_0x47b755,_0x444432){const _0x49a291=a21_0x52fe5b;if(_0x444432[_0x49a291(0x240)]===0x0){console[_0x49a291(0x27e)]('\x0a'+_0x47b755),console[_0x49a291(0x27e)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x49a291(0x27e)]('\x0a'+_0x47b755);const _0x1db3ac=Object['keys'](_0x444432[0x0])[_0x49a291(0x1d4)](_0x4c9c02=>({'name':_0x4c9c02,'type':typeof _0x444432[0x0][_0x4c9c02]==='number'?_0x49a291(0x2d2):_0x49a291(0x218)})),_0x2f4cce={'queryId':_0x49a291(0x2d6),'columns':_0x1db3ac,'data':_0x444432,'stats':{'state':_0x49a291(0x2ae),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x444432[_0x49a291(0x240)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x14fe99=formatAsTable(_0x2f4cce,_0x444432[_0x49a291(0x240)],!![]);await writeOutput(_0x14fe99,undefined,_0x49a291(0x2a3));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x250);[a21_0x52fe5b(0x211)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async['execute'](_0x254c21){const _0xe0c25=a21_0x52fe5b,{options:_0x3602c3,args:_0x1c5024,tdx:_0x149a63}=_0x254c21,_0xdad49a=_0x3602c3,_0x5d2c83=_0x1c5024[0x0]||_0x3602c3[_0xe0c25(0x1e1)];if(!_0x5d2c83)return showParentSegmentNotSetError(_0xe0c25(0x2a9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x227b6b=resolveYamlFile(_0x5d2c83);if(existsSync(_0x227b6b)){_0xdad49a[_0xe0c25(0x297)]&&console['error'](_0xe0c25(0x289)+_0x227b6b);let _0x3172c1;try{_0x3172c1=readFileSync(_0x227b6b,'utf-8');}catch(_0x1c755f){const _0xec8547=_0x1c755f instanceof Error?_0x1c755f[_0xe0c25(0x1e6)]:String(_0x1c755f);return console[_0xe0c25(0x27e)]('Error\x20reading\x20file:\x20'+_0xec8547),0x1;}const _0x109e83=await withSpinner('Analyzing\x20changes...',()=>_0x149a63[_0xe0c25(0x201)][_0xe0c25(0x296)](_0x3172c1),{'verbose':_0xdad49a['verbose']}),_0x5c0eed=_0x109e83['data'],{isNew:_0x4dfb07,name:_0x28cc49,hasChanges:_0x2e726c,diffFormatted:_0x34f0dc}=_0x5c0eed;if(_0x2e726c){_0x4dfb07?console[_0xe0c25(0x27e)](_0xe0c25(0x23b)+_0x28cc49+'\x27:'):console['error']('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x28cc49+'\x27:');console['error']('─'[_0xe0c25(0x288)](0x3c)),console[_0xe0c25(0x27e)](_0x34f0dc),console[_0xe0c25(0x27e)]('─'[_0xe0c25(0x288)](0x3c));const _0x40b7db=_0x4dfb07?_0xe0c25(0x265)+_0x28cc49+'\x27\x20and\x20run\x20workflow?':_0xe0c25(0x1e7)+_0x28cc49+_0xe0c25(0x2b3);if(!_0xdad49a[_0xe0c25(0x2c3)]){const _0x1c8697=await confirmKey(_0x40b7db);if(!_0x1c8697)return console[_0xe0c25(0x27e)]('Aborted.'),0x1;}const _0x10f4d9=_0x4dfb07?'Creating':_0xe0c25(0x1ff);await withSpinner(_0x10f4d9+_0xe0c25(0x2c2)+_0x28cc49+_0xe0c25(0x1e3),()=>_0x5c0eed[_0xe0c25(0x2cb)](),{'verbose':_0xdad49a['verbose']});const _0x4c540d=_0x4dfb07?_0xe0c25(0x2bb):_0xe0c25(0x207);console[_0xe0c25(0x27e)]('✔\x20'+_0x4c540d+_0xe0c25(0x2c2)+_0x28cc49+'\x27');}else console[_0xe0c25(0x27e)](_0xe0c25(0x27a)+_0x28cc49+'\x27\x20is\x20up\x20to\x20date');}const _0x141dad=await withSpinner('Running\x20parent\x20segment\x20workflow\x20for\x20\x27'+_0x5d2c83+_0xe0c25(0x1e3),()=>_0x149a63[_0xe0c25(0x201)][_0xe0c25(0x2ab)](_0x5d2c83),{'verbose':_0xdad49a[_0xe0c25(0x297)]}),_0x55fb20=_0x141dad[_0xe0c25(0x29c)],_0x392049=getConsoleUrl(_0xdad49a[_0xe0c25(0x228)],_0xe0c25(0x293)+_0x55fb20[_0xe0c25(0x1f9)]+_0xe0c25(0x237)+_0x55fb20[_0xe0c25(0x254)]+_0xe0c25(0x257)+_0x55fb20[_0xe0c25(0x277)]);return console[_0xe0c25(0x27e)](_0xe0c25(0x269)),console[_0xe0c25(0x27e)]('\x20\x20'+a21_0x854bff[_0xe0c25(0x2a1)](_0xe0c25(0x2c7))+'\x20'+_0x55fb20[_0xe0c25(0x2a6)]),console['error']('\x20\x20'+a21_0x854bff['dim'](_0xe0c25(0x1e9))+'\x20'+_0x55fb20[_0xe0c25(0x1d9)]),console[_0xe0c25(0x27e)]('\x20\x20'+a21_0x854bff['dim'](_0xe0c25(0x209))+'\x20'+_0x55fb20[_0xe0c25(0x254)]),console[_0xe0c25(0x27e)]('\x20\x20'+a21_0x854bff['dim'](_0xe0c25(0x21b))+'\x20'+_0x55fb20[_0xe0c25(0x277)]),console[_0xe0c25(0x27e)]('\x20\x20'+_0x392049),console[_0xe0c25(0x27e)]('\x0a'+a21_0x854bff['dim'](_0xe0c25(0x29b))+_0xe0c25(0x23a)+_0x55fb20[_0xe0c25(0x277)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x286);['description']='List\x20available\x20fields\x20for\x20segmentation';async['execute'](_0x1d4b9f){const _0x4f54d7=a21_0x52fe5b,{options:_0x4661a6,args:_0x3d32f9,tdx:_0x5c0746}=_0x1d4b9f,_0x25fe2f=_0x3d32f9[0x0]||_0x4661a6[_0x4f54d7(0x1e1)];if(!_0x25fe2f)return showParentSegmentNotSetError(_0x4f54d7(0x2e7)+_0x4f54d7(0x244)),0x1;_0x4661a6[_0x4f54d7(0x297)]&&(console['error'](_0x4f54d7(0x2db)+_0x4661a6[_0x4f54d7(0x228)]),console[_0x4f54d7(0x27e)](_0x4f54d7(0x200)+_0x25fe2f));const _0x173a4a=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x25fe2f+_0x4f54d7(0x1e3),()=>_0x5c0746[_0x4f54d7(0x201)][_0x4f54d7(0x2b9)](_0x25fe2f),{'verbose':_0x4661a6['verbose']}),_0x5ee6de=_0x173a4a[_0x4f54d7(0x29c)];console[_0x4f54d7(0x27e)](_0x4f54d7(0x242)+_0x5ee6de['length']+_0x4f54d7(0x1da)+(_0x5ee6de[_0x4f54d7(0x240)]!==0x1?'s':''));if(_0x4661a6[_0x4f54d7(0x278)]||_0x4661a6['jsonl'])return await handleSDKOutput(_0x5ee6de,_0x4661a6),0x0;return displayFieldsHumanReadable(_0x5ee6de,_0x25fe2f),0x0;}}function a21_0x4a9f(){const _0x1573d3=['Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','behaviorsFile','\x0a⚠️\x20\x20Migrating:\x20','Fetching\x20SQL\x20for\x20\x27','segment:parent:fields','Creating','repeat','Found\x20YAML\x20file:\x20','elapsedTimeMillis','isDirectory','segment:parent:pull','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','/\x20directories\x20exist.','\x20=\x20','segment:parent:create','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','getParentSQL','/app/workflows/','previewParentYaml','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','pushParentYaml','verbose','Available\x20behaviors:','Output\x20file:\x20','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','To\x20cancel:','data','behavior','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Join:','Join\x20on:','dim','Validating\x20configuration...','table','tdx\x20segment\x20parent\x20preview\x20','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','audienceId','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','population','runParent','sampleData','trim','FINISHED','timezone','/\x20and\x20','columns','validateParentYaml','\x27\x20and\x20run\x20workflow?','1137186haeXFa','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','schemaValid','listFields','processedRows','Created','utf-8','addBehaviors','label','\x27\x20is\x20already\x20up\x20to\x20date','parent_segments','cyan','\x20parent\x20segment\x20\x27','yes','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Errors:','open','Audience\x20ID:','updateParent','1082912qDUOic','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','apply','jobId','451662ePvYnc','Error:\x20Parent\x20segment\x20name\x20is\x20required','database','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Error\x20parsing\x20YAML:\x20','double','Master:','/app/dw/parentSegments/','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','preview','attributes','joinKey','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','red','Site:\x20','interval','displayPreviewResults','-1d','behaviors','stats','Customers:','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','addAttributesFile','.yml','totalEvents','scheduleOption','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','replace','enriched','Available\x20attributes:','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','win32','displaySampleData','rowCount','Rows:','Executing\x20parent\x20segment\x20query...','Validate:','Attributes','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','\x20[Job\x20ID:\x20','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','Listing\x20parent\x20segments\x20matching\x20\x27','Get\x20SQL\x20query\x20for\x20parent\x20segment','Columns:','map','foreignKey','column','\x20rows\x20','getParentFull','status','\x20field','64uIHdvc','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','query','yellow','List\x20parent\x20segments','\x20--attribute\x20\x22','parentSegment','\x0aNo\x20sample\x20data\x20available','\x27...','segment:parent:push','customerGroup','message','Apply\x20changes\x20to\x20\x27','web','Status:','35FljAMi','addBehaviorsFile','localeCompare','segment:parent:view','start','Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20(requires\x20context)\x0a','Aborted.','matchedCount','setJobId','log','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x20No\x20changes\x20-\x20','master','237429DosxPd','Error\x20reading\x20file:\x20','workflowId','execute','Options\x20(one\x20required):\x0a','\x20--attribute\x20\x22<name>\x22','green','resolveParentId','Updating','Parent\x20segment:\x20','segment','using\x20the\x20default\x20path:\x20','Listing\x20parent\x20segments...','Fetching\x20sample\x20data...','1414028owUFui','Show\x20parent\x20segment\x20details','Updated','sort','Session:','Fetching\x20current\x20configuration\x20for\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Options:\x0a','in\x20','Attribute:','Fetching\x20parent\x20segment\x20\x27','Table:\x20','description','endsWith','ignore','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','displayPreviewHints','addAttributes','\x20Configuration\x20is\x20valid','varchar','\x20--interval\x20','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Attempt:','run','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','Master\x20Table','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','name','createParent','segment:parent:validate','\x20--enriched','YAML\x20file:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','session','site','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x0aChanges\x20to\x20apply\x20to\x20\x27','Error:\x20File\x20not\x20found:\x20','\x20Opening\x20','limit','Resolving\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','\x20\x20\x20\x20-\x20','\x20--behavior\x20\x22','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','test','displayBehaviorsStats','toFixed','/sessions/','allValid','displayColumns','\x20tdx\x20wf\x20attempt\x20','\x0aNew\x20parent\x20segment\x20\x27','Updating\x20parent\x20segment\x20\x27','customersWithEvents','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','join','length','To\x20view\x20sample\x20data:','✔\x20Found\x20','customerGroupFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','darwin','33291470DFYOMO','Options:','displayMasterInfo','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','errors','string','text','Overwrite\x20\x27','Events:','3518590ECMzyY','segment:parent:run','✘\x20Failed\x20to\x20rename\x20directory:\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','✔\x20Query\x20completed:\x20Processed\x20','workflowSessionId','parent_segment','listParents','/attempt/','✔\x20Renamed\x20directory\x20to\x20','toLocaleString','Pattern:\x20','segment:parent:desc','\x20rows)','.yaml','unref','\x27\x20with\x20ID:\x20','SQL\x20query:\x0a','coveragePercent','format','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Error:','Create\x20parent\x20segment\x20\x27','displaySummary','Source:','stop','\x0a✔\x20Workflow\x20started','xdg-open','bold','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','displayValidateResults','pullParentYaml','scheduleType','use','9adhBZv','customerPercent','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','segment:parent:preview','all','workflowAttemptId','json','No\x20parent\x20segments\x20match\x20pattern:\x20','✔\x20No\x20changes\x20-\x20\x27','dirname','displayAttributesStats','attribute','error','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20specific\x20parent\x20segment','segment:parent:sql','Preview:'];a21_0x4a9f=function(){return _0x1573d3;};return a21_0x4a9f();}export class ParentSegmentViewCommand extends BaseCommand{[a21_0x52fe5b(0x221)]=a21_0x52fe5b(0x1ed);['description']=a21_0x52fe5b(0x206);async[a21_0x52fe5b(0x1fa)](_0x14bf7d){const _0x15b7ed=a21_0x52fe5b,{options:_0x41d102,args:_0x45d6db,tdx:_0x22ca33}=_0x14bf7d,_0x4c896d=_0x41d102,_0x58ab79=_0x45d6db[0x0]||_0x41d102[_0x15b7ed(0x1e1)];if(!_0x58ab79)return showParentSegmentNotSetError(_0x15b7ed(0x2eb)+_0x15b7ed(0x249)+_0x15b7ed(0x20c)+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x41d102[_0x15b7ed(0x297)]&&(console[_0x15b7ed(0x27e)]('Site:\x20'+_0x41d102[_0x15b7ed(0x228)]),console[_0x15b7ed(0x27e)]('Parent\x20segment:\x20'+_0x58ab79));const _0x1fcfc9=await withSpinner(_0x15b7ed(0x20f)+_0x58ab79+_0x15b7ed(0x1e3),()=>_0x22ca33[_0x15b7ed(0x201)]['getParentFull'](_0x58ab79),{'verbose':_0x41d102['verbose']}),_0x11d384=_0x1fcfc9[_0x15b7ed(0x29c)];if(_0x4c896d[_0x15b7ed(0x1e8)]){const _0x350441=getConsoleNextUrl(_0x4c896d[_0x15b7ed(0x228)],_0x15b7ed(0x2d4)+_0x11d384['id']);return console['error'](a21_0x854bff['green']('✔')+_0x15b7ed(0x22c)+a21_0x854bff[_0x15b7ed(0x2c1)](_0x350441)),openBrowser(_0x350441),0x0;}return await handleSingleObjectOutput(_0x11d384,_0x41d102),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a21_0x52fe5b(0x25b);['description']=a21_0x52fe5b(0x21a);async[a21_0x52fe5b(0x1fa)](_0x4d3944){const _0x110268=a21_0x52fe5b,{options:_0x3127fd,args:_0x54c277,tdx:_0x5b73f2}=_0x4d3944,_0x2d718b=_0x54c277[0x0]||_0x3127fd[_0x110268(0x1e1)];if(!_0x2d718b)return showParentSegmentNotSetError(_0x110268(0x1ef)+_0x110268(0x27f)),0x1;_0x3127fd[_0x110268(0x297)]&&(console['error'](_0x110268(0x2db)+_0x3127fd[_0x110268(0x228)]),console['error']('Parent\x20segment:\x20'+_0x2d718b));const _0x1274cf=await withSpinner(_0x110268(0x22e)+_0x2d718b+_0x110268(0x1e3),()=>_0x5b73f2[_0x110268(0x201)]['resolveParentId'](_0x2d718b),{'verbose':_0x3127fd[_0x110268(0x297)]}),_0x4e2d32=_0x1274cf[_0x110268(0x29c)],_0x59e8b9=await withSpinner(_0x110268(0x285)+_0x2d718b+_0x110268(0x1e3),()=>_0x5b73f2[_0x110268(0x201)]['getParentSQL'](_0x4e2d32),{'verbose':_0x3127fd[_0x110268(0x297)]}),_0x38e1af=await executeSchemaQuery(_0x59e8b9[_0x110268(0x29c)],_0x5b73f2,_0x3127fd);return await handleQueryOutput(_0x38e1af,_0x3127fd),0x0;}}function a21_0x4595(_0x542d35,_0x4f943f){_0x542d35=_0x542d35-0x1ce;const _0x4a9fbc=a21_0x4a9f();let _0x4595d8=_0x4a9fbc[_0x542d35];return _0x4595d8;}export class ParentSegmentSQLCommand extends BaseCommand{['name']=a21_0x52fe5b(0x280);['description']=a21_0x52fe5b(0x1d2);async['execute'](_0x5de5d1){const _0x3b695d=a21_0x52fe5b,{options:_0x268771,args:_0x56d412,tdx:_0x4fa419}=_0x5de5d1,_0x3cb36e=_0x56d412[0x0]||_0x268771[_0x3b695d(0x1e1)];if(!_0x3cb36e)return showParentSegmentNotSetError(_0x3b695d(0x2b5)+_0x3b695d(0x22f)),0x1;_0x268771[_0x3b695d(0x297)]&&(console[_0x3b695d(0x27e)](_0x3b695d(0x2db)+_0x268771[_0x3b695d(0x228)]),console[_0x3b695d(0x27e)](_0x3b695d(0x200)+_0x3cb36e));const _0x25f0ee=await withSpinner(_0x3b695d(0x22e)+_0x3cb36e+_0x3b695d(0x1e3),()=>_0x4fa419['segment']['resolveParentId'](_0x3cb36e),{'verbose':_0x268771[_0x3b695d(0x297)]}),_0x429c50=_0x25f0ee[_0x3b695d(0x29c)],_0x5c615f=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x3cb36e+'\x27...',()=>_0x4fa419[_0x3b695d(0x201)]['getParentSQL'](_0x429c50),{'verbose':_0x268771['verbose']}),_0x4260f6=_0x5c615f[_0x3b695d(0x29c)];return _0x268771['format']===_0x3b695d(0x278)||_0x268771[_0x3b695d(0x262)]==='jsonl'?await handleSDKOutput([{'sql':_0x4260f6}],_0x268771):console[_0x3b695d(0x1f3)](_0x4260f6),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a21_0x52fe5b(0x221)]='segment:parent:show';[a21_0x52fe5b(0x211)]=a21_0x52fe5b(0x29a);async[a21_0x52fe5b(0x1fa)](_0x52d57d){const _0x428f0a=a21_0x52fe5b,{options:_0x3cb695,args:_0xf295e8,tdx:_0x5ede1c}=_0x52d57d,_0x1580d7=_0xf295e8[0x0]||_0x3cb695[_0x428f0a(0x1e1)];if(!_0x1580d7)return showParentSegmentNotSetError(_0x428f0a(0x2e2)+_0x428f0a(0x2d0)),0x1;_0x3cb695[_0x428f0a(0x297)]&&(console[_0x428f0a(0x27e)](_0x428f0a(0x2db)+_0x3cb695[_0x428f0a(0x228)]),console[_0x428f0a(0x27e)](_0x428f0a(0x200)+_0x1580d7));const _0x382c79=await withSpinner(_0x428f0a(0x22e)+_0x1580d7+'\x27...',()=>_0x5ede1c[_0x428f0a(0x201)][_0x428f0a(0x1fe)](_0x1580d7),{'verbose':_0x3cb695[_0x428f0a(0x297)]}),_0xe84d94=_0x382c79['data'],_0xbf5bff=await withSpinner(_0x428f0a(0x285)+_0x1580d7+_0x428f0a(0x1e3),()=>_0x5ede1c[_0x428f0a(0x201)][_0x428f0a(0x292)](_0xe84d94),{'verbose':_0x3cb695[_0x428f0a(0x297)]});let _0x3308a4=_0xbf5bff[_0x428f0a(0x29c)];const _0x248dcf=resolveLimit(_0x3cb695[_0x428f0a(0x22d)],DEFAULT_DISPLAY_LIMIT),_0x598692=/\bLIMIT\s+\d+/i[_0x428f0a(0x234)](_0x3308a4);!_0x598692&&(_0x3308a4=_0x3308a4[_0x428f0a(0x2ad)]()[_0x428f0a(0x2e8)](/;+$/,''),_0x3308a4='SELECT\x20*\x20FROM\x20(\x0a'+_0x3308a4+_0x428f0a(0x295)+_0x248dcf);_0x3cb695[_0x428f0a(0x297)]&&console[_0x428f0a(0x27e)](_0x428f0a(0x260)+_0x3308a4);const _0x2c02ec=await withProgressSpinner(_0x428f0a(0x2f0),async _0x1ce52e=>{const _0x1b4bcd=_0x428f0a,_0x4aa28a=await _0x5ede1c[_0x1b4bcd(0x1dd)][_0x1b4bcd(0x1fa)](_0x3308a4,{'catalog':'td','schema':'information_schema','onJobId':_0x8cc8ec=>{const _0x2ae3b1=_0x1b4bcd;_0x1ce52e[_0x2ae3b1(0x1f2)](_0x8cc8ec);}});return _0x4aa28a;},{'verbose':_0x3cb695['verbose']}),_0x433dc0=_0x2c02ec[_0x428f0a(0x29c)],_0x5c81d8=_0x433dc0[_0x428f0a(0x2cc)]?_0x428f0a(0x1cf)+_0x433dc0['jobId']+']':'';return console[_0x428f0a(0x27e)](_0x428f0a(0x253)+_0x433dc0['stats'][_0x428f0a(0x2ba)][_0x428f0a(0x259)]()+_0x428f0a(0x1d7)+(_0x428f0a(0x20d)+formatElapsed(_0x433dc0[_0x428f0a(0x2e0)][_0x428f0a(0x28a)])+_0x5c81d8)),await handleQueryOutput(_0x433dc0,_0x3cb695),0x0;}}
1
+ const a21_0x32761f=a21_0x39f1;(function(_0x14fa34,_0x53f61b){const _0x188e5c=a21_0x39f1,_0x3e3912=_0x14fa34();while(!![]){try{const _0x2a7daa=parseInt(_0x188e5c(0x290))/0x1+-parseInt(_0x188e5c(0x191))/0x2*(-parseInt(_0x188e5c(0x1be))/0x3)+parseInt(_0x188e5c(0x19a))/0x4+-parseInt(_0x188e5c(0x227))/0x5+parseInt(_0x188e5c(0x214))/0x6+-parseInt(_0x188e5c(0x276))/0x7*(-parseInt(_0x188e5c(0x267))/0x8)+-parseInt(_0x188e5c(0x280))/0x9*(parseInt(_0x188e5c(0x22b))/0xa);if(_0x2a7daa===_0x53f61b)break;else _0x3e3912['push'](_0x3e3912['shift']());}catch(_0x13170f){_0x3e3912['push'](_0x3e3912['shift']());}}}(a21_0x2a24,0xc5b20));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a21_0x37b6cd from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a21_0x17398f from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR='parent_segments',LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x3e0dfe){const _0x519e6b=a21_0x39f1,_0x315c48=process[_0x519e6b(0x19d)],_0x431676=_0x315c48===_0x519e6b(0x1c5)?_0x519e6b(0x248):_0x315c48===_0x519e6b(0x291)?_0x519e6b(0x187):_0x519e6b(0x23d);spawn(_0x431676,[_0x3e0dfe],{'detached':!![],'stdio':_0x519e6b(0x234)})[_0x519e6b(0x27f)]();}function migrateLegacyDirectory(){const _0x3b7dcb=a21_0x39f1;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x38fe16=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x38fe16[_0x3b7dcb(0x1ca)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x3b7dcb(0x288)](a21_0x17398f[_0x3b7dcb(0x1a8)](_0x3b7dcb(0x226)+LEGACY_PARENT_SEGMENT_DIR+_0x3b7dcb(0x215)+PARENT_SEGMENT_DIR+_0x3b7dcb(0x2a2))),console[_0x3b7dcb(0x288)](a21_0x17398f[_0x3b7dcb(0x262)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x3b7dcb(0x1d9))),![];console[_0x3b7dcb(0x288)](a21_0x17398f[_0x3b7dcb(0x1a8)](_0x3b7dcb(0x275)+LEGACY_PARENT_SEGMENT_DIR+_0x3b7dcb(0x225)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3b7dcb(0x288)](a21_0x17398f[_0x3b7dcb(0x1d4)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x33d8ad){const _0xb0a02d=_0x33d8ad instanceof Error?_0x33d8ad[_0x3b7dcb(0x21d)]:String(_0x33d8ad);return console[_0x3b7dcb(0x288)](a21_0x17398f[_0x3b7dcb(0x29c)](_0x3b7dcb(0x29a)+_0xb0a02d+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a21_0x32761f(0x237)](_0x4dd7d5){const _0x591a32=a21_0x32761f;return migrateLegacyDirectory(),super[_0x591a32(0x237)](_0x4dd7d5);}}function resolveYamlFile(_0x452e22){const _0x3aea10=a21_0x32761f;if(_0x452e22[_0x3aea10(0x206)](_0x3aea10(0x1ce))||_0x452e22['endsWith'](_0x3aea10(0x193)))return _0x452e22;return a21_0x37b6cd['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x452e22)+_0x3aea10(0x1ce));}function formatProgressMessage(_0x187150){const _0x3db2cd=a21_0x32761f,_0x19b0a3=_0x187150['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x19b0a3){const [,_0x1205d6,_0x1fbaf8,_0x4e3d2f='']=_0x19b0a3;return a21_0x17398f[_0x3db2cd(0x262)](_0x1205d6+':')+'\x20'+_0x1fbaf8+a21_0x17398f[_0x3db2cd(0x262)](_0x4e3d2f);}return a21_0x17398f[_0x3db2cd(0x262)](_0x187150);}function showFileNotFoundError(_0x583743,_0x2e4329){const _0x51183e=a21_0x32761f;console[_0x51183e(0x288)](a21_0x17398f['red'](_0x51183e(0x212)+_0x583743+'\x0a')),console[_0x51183e(0x288)](a21_0x17398f[_0x51183e(0x180)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x2e4329+_0x51183e(0x1df)));}function showParentSegmentNotSetError(_0x214ebf){const _0x47a3ca=a21_0x32761f;console[_0x47a3ca(0x288)](a21_0x17398f[_0x47a3ca(0x1a8)](_0x47a3ca(0x254))),console[_0x47a3ca(0x288)](_0x214ebf);}export class ParentSegmentListCommand extends BaseCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x19e);[a21_0x32761f(0x274)]=a21_0x32761f(0x1f0);async[a21_0x32761f(0x240)](_0x26cbc1){const _0x3cd0d1=a21_0x32761f,{options:_0x16aeb5,args:_0x1ca543,tdx:_0x41994e}=_0x26cbc1,_0x41bd94=_0x1ca543[0x0];_0x16aeb5['verbose']&&(console[_0x3cd0d1(0x288)]('Site:\x20'+_0x16aeb5[_0x3cd0d1(0x27d)]),_0x41bd94&&console[_0x3cd0d1(0x288)](_0x3cd0d1(0x1f2)+_0x41bd94));const _0x1a328e=await withSpinner(_0x41bd94?_0x3cd0d1(0x287)+_0x41bd94+_0x3cd0d1(0x1f4):_0x3cd0d1(0x256),()=>_0x41994e[_0x3cd0d1(0x21c)]['listParents'](),{'verbose':_0x16aeb5[_0x3cd0d1(0x1ab)]});let _0x2784c3=_0x1a328e[_0x3cd0d1(0x28e)];if(_0x41bd94){const _0x3c5715=_0x41bd94[_0x3cd0d1(0x299)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x3cd0d1(0x299)](/\?/g,'.'),_0x127a11=new RegExp('^'+_0x3c5715+'$','i');_0x2784c3=_0x2784c3[_0x3cd0d1(0x181)](_0x1b2dcf=>_0x127a11[_0x3cd0d1(0x272)](_0x1b2dcf['attributes'][_0x3cd0d1(0x286)]));}_0x2784c3[_0x3cd0d1(0x1db)]((_0x16cc49,_0x337545)=>_0x16cc49[_0x3cd0d1(0x1ae)][_0x3cd0d1(0x286)][_0x3cd0d1(0x1e8)](_0x337545[_0x3cd0d1(0x1ae)][_0x3cd0d1(0x286)])),console['error'](_0x3cd0d1(0x28a)+_0x2784c3[_0x3cd0d1(0x1b7)]+'\x20parent\x20segment'+(_0x2784c3[_0x3cd0d1(0x1b7)]!==0x1?'s':''));const _0x36b4e0=_0x330088=>{const _0x2ad9ca=_0x3cd0d1;return getConsoleNextUrl(_0x16aeb5[_0x2ad9ca(0x27d)],_0x2ad9ca(0x18e)+_0x330088);};if(_0x16aeb5[_0x3cd0d1(0x22c)]==='json'||_0x16aeb5[_0x3cd0d1(0x22c)]===_0x3cd0d1(0x1de)){const _0x10a3e4=_0x2784c3[_0x3cd0d1(0x1b5)](_0x3abdd6=>({..._0x3abdd6,'url':_0x36b4e0(_0x3abdd6['id'])}));await handleSDKOutput(_0x10a3e4,_0x16aeb5);}else{if(_0x2784c3['length']===0x0)_0x41bd94?console[_0x3cd0d1(0x284)](_0x3cd0d1(0x278)+_0x41bd94):console['log'](_0x3cd0d1(0x269));else for(const _0x2f14b7 of _0x2784c3){const _0x1afbfa=_0x2f14b7[_0x3cd0d1(0x1ae)][_0x3cd0d1(0x231)]?a21_0x17398f['dim']('\x20('+formatRows(_0x2f14b7[_0x3cd0d1(0x1ae)][_0x3cd0d1(0x231)])+')'):'',_0x2df322=hyperlink(_0x2f14b7['attributes'][_0x3cd0d1(0x286)],_0x36b4e0(_0x2f14b7['id']));console[_0x3cd0d1(0x284)](_0x3cd0d1(0x1af)+_0x2df322+_0x1afbfa);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x1bc);[a21_0x32761f(0x274)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a21_0x32761f(0x240)](_0x38b060){const _0x3d884b=a21_0x32761f,{options:_0x5ce473,args:_0x5977de,tdx:_0x5897c4}=_0x38b060;console['error'](_0x3d884b(0x18b)+_0x3d884b(0x222)+_0x3d884b(0x1c7));const _0x3e776a=_0x5ce473;if(_0x5977de[_0x3d884b(0x1b7)]===0x0)return console[_0x3d884b(0x288)](a21_0x17398f[_0x3d884b(0x29c)](_0x3d884b(0x26d))),console[_0x3d884b(0x288)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x20a7c1=_0x5977de[0x0];if(!_0x3e776a[_0x3d884b(0x19c)]||!_0x3e776a[_0x3d884b(0x1d8)])return console[_0x3d884b(0x288)](_0x3d884b(0x1ac)),console[_0x3d884b(0x288)](_0x3d884b(0x289)),0x1;_0x3e776a[_0x3d884b(0x1ab)]&&(console[_0x3d884b(0x288)](_0x3d884b(0x270)+_0x3e776a[_0x3d884b(0x27d)]),console[_0x3d884b(0x288)]('Name:\x20'+_0x20a7c1),console['error']('Database:\x20'+_0x3e776a[_0x3d884b(0x19c)]),console['error'](_0x3d884b(0x28b)+_0x3e776a[_0x3d884b(0x1d8)]));const _0xb389ff=await loadJSONFromOptions(_0x3e776a[_0x3d884b(0x1ae)],_0x3e776a[_0x3d884b(0x246)]),_0xbf9307=await loadJSONFromOptions(_0x3e776a[_0x3d884b(0x2a5)],_0x3e776a['behaviorsFile']),_0x293bbb=await loadJSONFromOptions(_0x3e776a[_0x3d884b(0x1b6)],_0x3e776a['customerGroupFile']),_0x508711={'name':_0x20a7c1,'description':_0x3e776a[_0x3d884b(0x274)],'scheduleType':_0x3e776a['scheduleType'],'scheduleOption':_0x3e776a[_0x3d884b(0x230)],'timezone':_0x3e776a['timezone'],'master':{'parentDatabaseName':_0x3e776a[_0x3d884b(0x19c)],'parentTableName':_0x3e776a[_0x3d884b(0x1d8)]},'attributes':_0xb389ff,'behaviors':_0xbf9307,'customerGroup':_0x293bbb},_0x744715=await withSpinner(_0x3d884b(0x277)+_0x20a7c1+'\x27...',()=>_0x5897c4[_0x3d884b(0x21c)]['createParent'](_0x508711),{'verbose':_0x5ce473[_0x3d884b(0x1ab)]}),_0x2612ac=_0x744715[_0x3d884b(0x28e)];return console[_0x3d884b(0x288)](_0x3d884b(0x26e)+_0x2612ac[_0x3d884b(0x286)]+_0x3d884b(0x2a6)+_0x2612ac['id']),await handleSDKOutput([_0x2612ac],_0x5ce473),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x238);[a21_0x32761f(0x274)]=a21_0x32761f(0x184);async[a21_0x32761f(0x240)](_0x306b76){const _0x3f5b63=a21_0x32761f,{options:_0x5c5420,args:_0x122ee3,tdx:_0x29a12e}=_0x306b76;console[_0x3f5b63(0x288)](_0x3f5b63(0x1c3)+_0x3f5b63(0x222)+_0x3f5b63(0x1c7));const _0x222f39=_0x5c5420;if(_0x122ee3[_0x3f5b63(0x1b7)]===0x0)return console['error'](a21_0x17398f[_0x3f5b63(0x29c)](_0x3f5b63(0x26d))),console[_0x3f5b63(0x288)](_0x3f5b63(0x1d0)),0x1;const _0x676302=_0x122ee3[0x0];_0x222f39[_0x3f5b63(0x1ab)]&&(console[_0x3f5b63(0x288)](_0x3f5b63(0x270)+_0x222f39[_0x3f5b63(0x27d)]),console[_0x3f5b63(0x288)](_0x3f5b63(0x24f)+_0x676302));const _0x42fb2a=await withSpinner(_0x3f5b63(0x20b)+_0x676302+_0x3f5b63(0x1f4),()=>_0x29a12e[_0x3f5b63(0x21c)][_0x3f5b63(0x20c)](_0x676302),{'verbose':_0x222f39[_0x3f5b63(0x1ab)]}),_0x4f3940=_0x42fb2a[_0x3f5b63(0x28e)],_0x50d70e=await loadJSONFromOptions(_0x222f39[_0x3f5b63(0x2a9)],_0x222f39[_0x3f5b63(0x25c)]),_0x3271ba=await loadJSONFromOptions(_0x222f39[_0x3f5b63(0x239)],_0x222f39['addBehaviorsFile']),_0x411b2c={'name':_0x4f3940['name'],'description':_0x222f39[_0x3f5b63(0x274)]!==undefined?_0x222f39[_0x3f5b63(0x274)]:_0x4f3940[_0x3f5b63(0x274)],'scheduleType':_0x222f39[_0x3f5b63(0x265)]!==undefined?_0x222f39[_0x3f5b63(0x265)]:_0x4f3940[_0x3f5b63(0x265)],'scheduleOption':_0x222f39[_0x3f5b63(0x230)]!==undefined?_0x222f39[_0x3f5b63(0x230)]:_0x4f3940['scheduleOption'],'timezone':_0x222f39[_0x3f5b63(0x22e)]!==undefined?_0x222f39[_0x3f5b63(0x22e)]:_0x4f3940[_0x3f5b63(0x22e)],'master':_0x4f3940[_0x3f5b63(0x1f9)],'attributes':_0x50d70e?[..._0x4f3940['attributes']||[],..._0x50d70e]:_0x4f3940[_0x3f5b63(0x1ae)],'behaviors':_0x3271ba?[..._0x4f3940[_0x3f5b63(0x2a5)]||[],..._0x3271ba]:_0x4f3940[_0x3f5b63(0x2a5)],'customerGroup':_0x4f3940[_0x3f5b63(0x1b6)]},_0x34711b=await withSpinner(_0x3f5b63(0x250)+_0x676302+_0x3f5b63(0x1f4),()=>_0x29a12e['segment'][_0x3f5b63(0x1b9)](_0x676302,_0x411b2c),{'verbose':_0x222f39[_0x3f5b63(0x1ab)]}),_0x5c264c=_0x34711b['data'];return console[_0x3f5b63(0x288)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x5c264c[_0x3f5b63(0x286)]+'\x27'),await handleSDKOutput([_0x5c264c],_0x222f39),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x207);[a21_0x32761f(0x274)]='Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file';async['execute'](_0x1a5ea2){const _0x583564=a21_0x32761f,{options:_0x31dc70,args:_0x24fefa,tdx:_0x1a7c6e}=_0x1a5ea2,_0x406b59=_0x31dc70,_0x462a05=_0x24fefa[0x0]||_0x31dc70[_0x583564(0x259)];if(!_0x462a05)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+_0x583564(0x188)),0x1;if(_0x406b59[_0x583564(0x17e)]&&_0x406b59[_0x583564(0x1cd)])return console[_0x583564(0x288)](a21_0x17398f[_0x583564(0x29c)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x583564(0x288)](a21_0x17398f[_0x583564(0x262)](_0x583564(0x21b))),console['error'](a21_0x17398f['dim']('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+_0x583564(0x1b8))),console['error'](a21_0x17398f[_0x583564(0x180)](_0x583564(0x183))),0x1;const _0x9b113f=_0x406b59['output']||a21_0x37b6cd[_0x583564(0x22f)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x462a05)+_0x583564(0x1ce));_0x406b59[_0x583564(0x1ab)]&&(console[_0x583564(0x288)]('Site:\x20'+_0x406b59[_0x583564(0x27d)]),console[_0x583564(0x288)](_0x583564(0x24f)+_0x462a05),console[_0x583564(0x288)](_0x583564(0x1bd)+_0x9b113f));const _0x150a00=await withSpinner(_0x583564(0x1a2)+_0x462a05+'\x27...',()=>_0x1a7c6e[_0x583564(0x21c)][_0x583564(0x235)](_0x462a05),{'verbose':_0x406b59['verbose']}),_0x9f79d3=_0x150a00[_0x583564(0x28e)];if(existsSync(_0x9b113f)){const _0x3e3d55=readFileSync(_0x9b113f,_0x583564(0x279)),_0x22c155=generateDiff(_0x3e3d55,_0x9f79d3);if(!hasChanges(_0x22c155))console[_0x583564(0x288)](a21_0x17398f[_0x583564(0x1d4)]('✔')+_0x583564(0x24d)+a21_0x17398f[_0x583564(0x180)](_0x9b113f)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x583564(0x288)](_0x583564(0x255)+_0x9b113f+'\x27:'),console[_0x583564(0x288)]('─'[_0x583564(0x218)](0x3c)),console[_0x583564(0x288)](formatDiffWithColors(_0x22c155)),console[_0x583564(0x288)]('─'[_0x583564(0x218)](0x3c));if(!_0x406b59[_0x583564(0x249)]){const _0x107949=await confirmKey(_0x583564(0x261)+_0x9b113f+'\x27?');if(!_0x107949)return console[_0x583564(0x288)](_0x583564(0x220)),0x1;}writeFileSync(_0x9b113f,_0x9f79d3,_0x583564(0x279)),console['error'](a21_0x17398f['green']('✔')+_0x583564(0x1e3)+a21_0x17398f[_0x583564(0x180)](_0x9b113f));}}else{const _0xdbc487=a21_0x37b6cd['dirname'](_0x9b113f);!existsSync(_0xdbc487)&&mkdirSync(_0xdbc487,{'recursive':!![]}),writeFileSync(_0x9b113f,_0x9f79d3,'utf-8'),console[_0x583564(0x288)](a21_0x17398f[_0x583564(0x1d4)]('✔')+_0x583564(0x1e3)+a21_0x17398f[_0x583564(0x180)](_0x9b113f));}return saveSessionContext({'parent_segment':_0x462a05},_0x406b59[_0x583564(0x1d1)]),console[_0x583564(0x288)](a21_0x17398f[_0x583564(0x1d4)]('✔')+_0x583564(0x1c9)+a21_0x17398f[_0x583564(0x262)](_0x583564(0x1cb))+_0x583564(0x22d)+a21_0x17398f[_0x583564(0x180)](_0x462a05)),0x0;}}function a21_0x39f1(_0x299a0d,_0x36f1b7){_0x299a0d=_0x299a0d-0x17e;const _0x2a249b=a21_0x2a24();let _0x39f120=_0x2a249b[_0x299a0d];return _0x39f120;}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a21_0x32761f(0x286)]='segment:parent:push';[a21_0x32761f(0x274)]=a21_0x32761f(0x1ef);async['execute'](_0x18e509){const _0x4b2660=a21_0x32761f,{options:_0x21e0bd,args:_0x1ac7f3,tdx:_0x54b9b0}=_0x18e509,_0x16003d=_0x21e0bd,_0x4468d9=_0x1ac7f3[0x0]||_0x21e0bd['parentSegment'];if(!_0x4468d9)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'+_0x4b2660(0x204)),0x1;const _0xc5a972=resolveYamlFile(_0x4468d9);if(!existsSync(_0xc5a972))return showFileNotFoundError(_0xc5a972,_0x4468d9),0x1;_0x16003d[_0x4b2660(0x1ab)]&&(console['error']('Site:\x20'+_0x16003d[_0x4b2660(0x27d)]),console[_0x4b2660(0x288)](_0x4b2660(0x194)+_0xc5a972));let _0x31caf7;try{_0x31caf7=readFileSync(_0xc5a972,_0x4b2660(0x279));}catch(_0x499d1b){const _0x3c1209=_0x499d1b instanceof Error?_0x499d1b[_0x4b2660(0x21d)]:String(_0x499d1b);return console['error'](_0x4b2660(0x1ad)+_0x3c1209),0x1;}const _0x5f2fda=await withSpinner(_0x4b2660(0x29d),()=>_0x54b9b0[_0x4b2660(0x21c)][_0x4b2660(0x233)](_0x31caf7),{'verbose':_0x16003d[_0x4b2660(0x1ab)]}),_0x21a252=_0x5f2fda[_0x4b2660(0x28e)],{isNew:_0x5e1d4a,name:_0x513eab,hasChanges:_0x46296c,diffFormatted:_0x376436}=_0x21a252;if(!_0x46296c)return console[_0x4b2660(0x288)](_0x4b2660(0x282)+_0x513eab+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x5e1d4a?console[_0x4b2660(0x288)](_0x4b2660(0x199)+_0x513eab+'\x27:'):console['error'](_0x4b2660(0x245)+_0x513eab+'\x27:');console['error']('─'['repeat'](0x3c)),console['error'](_0x376436),console[_0x4b2660(0x288)]('─'['repeat'](0x3c));const _0x32dc1e=_0x5e1d4a?_0x4b2660(0x1ff)+_0x513eab+'\x27?':_0x4b2660(0x292)+_0x513eab+'\x27?';if(!_0x16003d[_0x4b2660(0x249)]){const _0x40aacd=await confirmKey(_0x32dc1e);if(!_0x40aacd)return console[_0x4b2660(0x288)](_0x4b2660(0x220)),0x1;}const _0x546a6e=_0x5e1d4a?_0x4b2660(0x1ba):_0x4b2660(0x217),_0x390234=await withSpinner(_0x546a6e+_0x4b2660(0x203)+_0x513eab+'\x27...',()=>_0x21a252[_0x4b2660(0x268)](),{'verbose':_0x16003d['verbose']}),_0x25d964=_0x390234[_0x4b2660(0x28e)],_0x216825=getConsoleNextUrl(_0x16003d[_0x4b2660(0x27d)],_0x4b2660(0x18e)+_0x25d964['id']),_0x111d63=_0x5e1d4a?'Created':_0x4b2660(0x244);return console[_0x4b2660(0x288)]('✔\x20'+_0x111d63+'\x20parent\x20segment\x20\x27'+_0x25d964['name']+'\x27'),console['error']('\x20\x20'+_0x216825),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x2ac);[a21_0x32761f(0x274)]=a21_0x32761f(0x1f3);async['execute'](_0x26be63){const _0x51c2db=a21_0x32761f,{options:_0x3683ff,args:_0x248af0,tdx:_0xc73041}=_0x26be63,_0x4e67d5=_0x3683ff,_0x47103e=_0x248af0[0x0]||_0x3683ff[_0x51c2db(0x259)];if(!_0x47103e)return showParentSegmentNotSetError(_0x51c2db(0x27e)+_0x51c2db(0x1bf)+_0x51c2db(0x243)+_0x51c2db(0x1a5)+_0x51c2db(0x1f5)+_0x51c2db(0x1aa)),0x1;const _0x38aef9=resolveYamlFile(_0x47103e);if(!existsSync(_0x38aef9))return showFileNotFoundError(_0x38aef9,_0x47103e),0x1;_0x4e67d5[_0x51c2db(0x1ab)]&&(console[_0x51c2db(0x288)](_0x51c2db(0x270)+_0x4e67d5[_0x51c2db(0x27d)]),console[_0x51c2db(0x288)](_0x51c2db(0x194)+_0x38aef9));let _0x394180;try{_0x394180=readFileSync(_0x38aef9,'utf-8');}catch(_0x11cc92){const _0x7b032b=_0x11cc92 instanceof Error?_0x11cc92[_0x51c2db(0x21d)]:String(_0x11cc92);return console[_0x51c2db(0x288)](_0x51c2db(0x1ad)+_0x7b032b),0x1;}const _0x3f239f=createCommandSpinner(a21_0x17398f[_0x51c2db(0x262)](_0x51c2db(0x1fa)),{'verbose':_0x4e67d5['verbose']});_0x3f239f[_0x51c2db(0x187)]();const _0xd5d344={'onProgress':_0x19bd71=>{const _0x2002e5=_0x51c2db;_0x3f239f[_0x2002e5(0x229)]=formatProgressMessage(_0x19bd71);}};if(_0x4e67d5[_0x51c2db(0x1f9)])_0xd5d344['master']=!![];if(_0x4e67d5['enriched'])_0xd5d344['enriched']=!![];_0x4e67d5['attribute']&&(_0xd5d344[_0x51c2db(0x29e)]=_0x4e67d5[_0x51c2db(0x29e)]);_0x4e67d5['behavior']&&(_0xd5d344['behavior']=_0x4e67d5[_0x51c2db(0x26f)]);if(_0x4e67d5[_0x51c2db(0x23c)])_0xd5d344[_0x51c2db(0x23c)]=_0x4e67d5[_0x51c2db(0x23c)];let _0x462eaa;try{_0x462eaa=await _0xc73041[_0x51c2db(0x21c)][_0x51c2db(0x285)](_0x394180,_0xd5d344),_0x3f239f['stop']();}catch(_0x664e2a){_0x3f239f[_0x51c2db(0x24c)]();throw _0x664e2a;}const _0x5edbb9=_0x4e67d5[_0x51c2db(0x23c)]||_0x51c2db(0x1e1);return this['displayValidateResults'](_0x462eaa,_0xd5d344,_0x38aef9,_0x5edbb9),_0x462eaa[_0x51c2db(0x196)]?0x0:0x1;}[a21_0x32761f(0x200)](_0x3dbb81,_0x33e17c,_0x5d1f89,_0x423db3){const _0x23305d=a21_0x32761f;console[_0x23305d(0x288)]('\x0a'+a21_0x17398f[_0x23305d(0x260)]('Validate:')+'\x20'+_0x3dbb81[_0x23305d(0x286)]),console[_0x23305d(0x288)]('═'[_0x23305d(0x218)](0x3c)),this[_0x23305d(0x208)](_0x3dbb81);if(typeof _0x33e17c[_0x23305d(0x29e)]===_0x23305d(0x1eb)){this['displayAttributesStats'](_0x3dbb81),this[_0x23305d(0x18d)](_0x3dbb81),this['displayPreviewHints'](_0x5d1f89,_0x423db3,_0x23305d(0x29e),_0x33e17c[_0x23305d(0x29e)]);return;}if(_0x33e17c[_0x23305d(0x29e)]===!![]){this[_0x23305d(0x28f)](_0x3dbb81),this[_0x23305d(0x18d)](_0x3dbb81),this[_0x23305d(0x1dc)](_0x5d1f89,_0x423db3,_0x23305d(0x1ae));return;}if(typeof _0x33e17c['behavior']===_0x23305d(0x1eb)){this['displayBehaviorsStats'](_0x3dbb81,_0x423db3),this[_0x23305d(0x18d)](_0x3dbb81),this[_0x23305d(0x1dc)](_0x5d1f89,_0x423db3,_0x23305d(0x26f),_0x33e17c[_0x23305d(0x26f)]);return;}if(_0x33e17c[_0x23305d(0x26f)]===!![]){this[_0x23305d(0x1c2)](_0x3dbb81,_0x423db3),this[_0x23305d(0x18d)](_0x3dbb81),this[_0x23305d(0x1dc)](_0x5d1f89,_0x423db3,_0x23305d(0x2a5));return;}this['displayAttributesStats'](_0x3dbb81),this['displayBehaviorsStats'](_0x3dbb81,_0x423db3),this[_0x23305d(0x18d)](_0x3dbb81),this[_0x23305d(0x1dc)](_0x5d1f89,_0x423db3,_0x23305d(0x236));}[a21_0x32761f(0x1dc)](_0x3a620a,_0xe84757,_0x3087be,_0x279990){const _0x171d17=a21_0x32761f;console[_0x171d17(0x288)]('\x0a'+a21_0x17398f[_0x171d17(0x262)](_0x171d17(0x1b1)));const _0x70b0e0=_0xe84757!==_0x171d17(0x1e1)?_0x171d17(0x1a0)+_0xe84757:'';if(_0x3087be==='attribute'&&_0x279990)console['error']('\x20\x20'+a21_0x17398f['dim']('tdx\x20segment\x20parent\x20preview\x20'+_0x3a620a+_0x171d17(0x1c8)+_0x279990+'\x22'+_0x70b0e0));else{if(_0x3087be===_0x171d17(0x26f)&&_0x279990)console[_0x171d17(0x288)]('\x20\x20'+a21_0x17398f[_0x171d17(0x262)](_0x171d17(0x251)+_0x3a620a+_0x171d17(0x1da)+_0x279990+'\x22'+_0x70b0e0));else(_0x3087be===_0x171d17(0x1ae)||_0x3087be===_0x171d17(0x236))&&console[_0x171d17(0x288)]('\x20\x20'+a21_0x17398f[_0x171d17(0x262)](_0x171d17(0x251)+_0x3a620a+_0x171d17(0x27c)+_0x70b0e0));}(_0x3087be===_0x171d17(0x2a5)||_0x3087be==='all')&&console['error']('\x20\x20'+a21_0x17398f[_0x171d17(0x262)]('tdx\x20segment\x20parent\x20preview\x20'+_0x3a620a+'\x20--behavior\x20\x22<name>\x22'+_0x70b0e0)),_0x3087be===_0x171d17(0x236)&&console[_0x171d17(0x288)]('\x20\x20'+a21_0x17398f['dim'](_0x171d17(0x251)+_0x3a620a+_0x171d17(0x2a0)+_0x70b0e0));}[a21_0x32761f(0x208)](_0x41d7d2){const _0x239b97=a21_0x32761f,{master:_0xa824a6}=_0x41d7d2,_0x862d8f=_0xa824a6[_0x239b97(0x198)]?a21_0x17398f['green']('✔'):a21_0x17398f[_0x239b97(0x29c)]('✘');console['error']('\x0a'+a21_0x17398f[_0x239b97(0x262)](_0x239b97(0x1e5))),console['error'](_0x862d8f+'\x20'+a21_0x17398f['bold'](_0xa824a6[_0x239b97(0x19c)]+'.'+_0xa824a6[_0x239b97(0x1d8)])),_0xa824a6[_0x239b97(0x198)]?_0xa824a6[_0x239b97(0x241)]!==undefined&&console[_0x239b97(0x288)]('\x20\x20'+a21_0x17398f['dim'](_0x239b97(0x210))+'\x20'+a21_0x17398f[_0x239b97(0x180)](formatRows(_0xa824a6[_0x239b97(0x241)]))):console['error']('\x20\x20'+a21_0x17398f[_0x239b97(0x29c)](_0x239b97(0x1fd))+'\x20'+_0xa824a6[_0x239b97(0x25b)]);}['displayAttributesStats'](_0x1a609b){const _0x2be73d=a21_0x32761f;if(_0x1a609b[_0x2be73d(0x1ae)][_0x2be73d(0x1b7)]===0x0)return;console['error']('\x0a'+a21_0x17398f['dim'](_0x2be73d(0x2aa)));for(const _0x43c88d of _0x1a609b['attributes']){const _0x49140e=_0x43c88d['schemaValid']?a21_0x17398f['green']('✔'):a21_0x17398f[_0x2be73d(0x29c)]('✘');let _0x469876='';if(_0x43c88d[_0x2be73d(0x198)]&&_0x43c88d[_0x2be73d(0x20e)]!==undefined&&_0x43c88d[_0x2be73d(0x21a)]!==undefined){const _0x106b43=_0x43c88d[_0x2be73d(0x21a)][_0x2be73d(0x18f)](0x1),_0x1debd5=_0x43c88d[_0x2be73d(0x21a)]>=0x50?a21_0x17398f[_0x2be73d(0x1d4)]:_0x43c88d['coveragePercent']>=0x32?a21_0x17398f[_0x2be73d(0x1a8)]:a21_0x17398f[_0x2be73d(0x29c)];_0x469876='\x20'+a21_0x17398f[_0x2be73d(0x262)](_0x2be73d(0x2a8))+'\x20'+_0x1debd5(_0x106b43+'%')+'\x20('+formatRows(_0x43c88d[_0x2be73d(0x20e)])+_0x2be73d(0x2a4);}console['error'](_0x49140e+'\x20'+a21_0x17398f[_0x2be73d(0x260)](_0x43c88d[_0x2be73d(0x286)])+_0x469876),console['error']('\x20\x20'+a21_0x17398f['dim'](_0x2be73d(0x25a))+'\x20'+a21_0x17398f[_0x2be73d(0x260)](_0x43c88d[_0x2be73d(0x19c)]+'.'+_0x43c88d[_0x2be73d(0x1d8)]));const _0x1c091b=_0x43c88d[_0x2be73d(0x1fe)]===_0x43c88d['foreignKey']?a21_0x17398f[_0x2be73d(0x262)](_0x2be73d(0x27a))+'\x20'+_0x43c88d[_0x2be73d(0x1fe)]:a21_0x17398f['dim'](_0x2be73d(0x1fc))+'\x20'+_0x43c88d[_0x2be73d(0x1fe)]+_0x2be73d(0x22d)+_0x43c88d[_0x2be73d(0x1c4)];console[_0x2be73d(0x288)]('\x20\x20'+_0x1c091b),console[_0x2be73d(0x288)]('\x20\x20'+a21_0x17398f[_0x2be73d(0x262)](_0x2be73d(0x1ed))),this[_0x2be73d(0x20a)](_0x43c88d[_0x2be73d(0x23a)]),!_0x43c88d[_0x2be73d(0x198)]&&console[_0x2be73d(0x288)]('\x20\x20'+a21_0x17398f['red'](_0x2be73d(0x1fd))+'\x20'+_0x43c88d[_0x2be73d(0x25b)]);}}[a21_0x32761f(0x1c2)](_0x31788e,_0x35609c){const _0x1797bd=a21_0x32761f;if(_0x31788e[_0x1797bd(0x2a5)]['length']===0x0)return;console[_0x1797bd(0x288)]('\x0a'+a21_0x17398f[_0x1797bd(0x262)](_0x1797bd(0x1e7))+'\x20'+a21_0x17398f['dim']('('+_0x35609c+')'));for(const _0x34f54e of _0x31788e[_0x1797bd(0x2a5)]){const _0x7c8d9d=_0x34f54e['schemaValid']?a21_0x17398f[_0x1797bd(0x1d4)]('✔'):a21_0x17398f[_0x1797bd(0x29c)]('✘');let _0x461891='';if(_0x34f54e['schemaValid']&&_0x34f54e[_0x1797bd(0x1d7)]!==undefined&&_0x34f54e[_0x1797bd(0x1f7)]!==undefined){const _0x45c84e=_0x34f54e[_0x1797bd(0x1a1)]?.[_0x1797bd(0x18f)](0x1)||'?',_0x5110c7=(_0x34f54e[_0x1797bd(0x1a1)]??0x0)>=0x32?a21_0x17398f['green']:(_0x34f54e[_0x1797bd(0x1a1)]??0x0)>=0x14?a21_0x17398f[_0x1797bd(0x1a8)]:a21_0x17398f[_0x1797bd(0x29c)];_0x461891='\x20'+a21_0x17398f[_0x1797bd(0x262)]('Customers:')+'\x20'+_0x5110c7(formatRows(_0x34f54e[_0x1797bd(0x1d7)]))+'\x20('+_0x45c84e+_0x1797bd(0x242)+a21_0x17398f[_0x1797bd(0x262)](_0x1797bd(0x1c1))+'\x20'+a21_0x17398f[_0x1797bd(0x180)](formatRows(_0x34f54e[_0x1797bd(0x1f7)]));}console[_0x1797bd(0x288)](_0x7c8d9d+'\x20'+a21_0x17398f[_0x1797bd(0x260)](_0x34f54e[_0x1797bd(0x286)])+_0x461891),console['error']('\x20\x20'+a21_0x17398f['dim'](_0x1797bd(0x25a))+'\x20'+a21_0x17398f[_0x1797bd(0x260)](_0x34f54e[_0x1797bd(0x19c)]+'.'+_0x34f54e[_0x1797bd(0x1d8)]));const _0x266474=_0x34f54e['joinKey']===_0x34f54e['foreignKey']?a21_0x17398f['dim'](_0x1797bd(0x27a))+'\x20'+_0x34f54e['joinKey']:a21_0x17398f[_0x1797bd(0x262)](_0x1797bd(0x1fc))+'\x20'+_0x34f54e[_0x1797bd(0x1fe)]+_0x1797bd(0x22d)+_0x34f54e['foreignKey'];console[_0x1797bd(0x288)]('\x20\x20'+_0x266474),console[_0x1797bd(0x288)]('\x20\x20'+a21_0x17398f[_0x1797bd(0x262)](_0x1797bd(0x1ed))),this['displayColumns'](_0x34f54e[_0x1797bd(0x23a)]),!_0x34f54e[_0x1797bd(0x198)]&&console[_0x1797bd(0x288)]('\x20\x20'+a21_0x17398f[_0x1797bd(0x29c)](_0x1797bd(0x1fd))+'\x20'+_0x34f54e['schemaError']);}}[a21_0x32761f(0x20a)](_0x3b402e){const _0x2be59=a21_0x32761f;for(const _0x597b14 of _0x3b402e){_0x597b14['label']===_0x597b14[_0x2be59(0x21f)]||_0x597b14[_0x2be59(0x21f)]==='*'?console['error']('\x20\x20\x20\x20-\x20'+_0x597b14['label']):console[_0x2be59(0x288)](_0x2be59(0x23e)+_0x597b14['label']+'\x20'+a21_0x17398f[_0x2be59(0x262)]('('+_0x597b14[_0x2be59(0x21f)]+')'));}}['displaySummary'](_0x194b2e){const _0x3b0bd9=a21_0x32761f;console[_0x3b0bd9(0x288)]('─'['repeat'](0x3c));if(_0x194b2e[_0x3b0bd9(0x29b)][_0x3b0bd9(0x1b7)]>0x0){console[_0x3b0bd9(0x288)]('\x0a'+a21_0x17398f[_0x3b0bd9(0x29c)](_0x3b0bd9(0x1a3)));for(const _0x40cf5f of _0x194b2e['errors']){console[_0x3b0bd9(0x288)]('\x20\x20'+a21_0x17398f[_0x3b0bd9(0x29c)]('•')+'\x20'+_0x40cf5f);}}_0x194b2e[_0x3b0bd9(0x196)]&&console[_0x3b0bd9(0x288)]('\x0a'+a21_0x17398f[_0x3b0bd9(0x1d4)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a21_0x32761f(0x286)]='segment:parent:preview';[a21_0x32761f(0x274)]=a21_0x32761f(0x1cc);async[a21_0x32761f(0x240)](_0x2a3f02){const _0x487152=a21_0x32761f,{options:_0x125680,args:_0x566b77,tdx:_0x5716d4}=_0x2a3f02,_0x4f9203=_0x125680,_0x2649d=_0x566b77[0x0]||_0x125680['parentSegment'];if(!_0x2649d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x487152(0x228)+_0x487152(0x202)+_0x487152(0x25d)+_0x487152(0x1b2)+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+_0x487152(0x1aa)),0x1;if(!_0x4f9203['master']&&!_0x4f9203[_0x487152(0x29e)]&&!_0x4f9203['behavior']&&!_0x4f9203[_0x487152(0x1dd)])return console[_0x487152(0x288)](a21_0x17398f[_0x487152(0x29c)](_0x487152(0x205))),console[_0x487152(0x288)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console['error'](_0x487152(0x209)),console[_0x487152(0x288)](_0x487152(0x2a7)),console[_0x487152(0x288)](_0x487152(0x1fb)),console[_0x487152(0x288)]('\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior'),console[_0x487152(0x288)](_0x487152(0x22a)),0x1;const _0x380519=resolveYamlFile(_0x2649d);if(!existsSync(_0x380519))return showFileNotFoundError(_0x380519,_0x2649d),0x1;_0x4f9203['verbose']&&(console[_0x487152(0x288)](_0x487152(0x270)+_0x4f9203['site']),console[_0x487152(0x288)](_0x487152(0x194)+_0x380519));let _0x596ed5;try{_0x596ed5=readFileSync(_0x380519,'utf-8');}catch(_0x2e9d03){const _0x5d7dde=_0x2e9d03 instanceof Error?_0x2e9d03['message']:String(_0x2e9d03);return console['error'](_0x487152(0x1ad)+_0x5d7dde),0x1;}let _0x3d300f;try{_0x3d300f=parseDef(_0x596ed5);}catch(_0x18acf2){const _0x1ac409=_0x18acf2 instanceof Error?_0x18acf2[_0x487152(0x21d)]:String(_0x18acf2);return console['error'](a21_0x17398f['red']('Error\x20parsing\x20YAML:\x20'+_0x1ac409)),0x1;}if(_0x4f9203[_0x487152(0x29e)]===!![]||_0x4f9203[_0x487152(0x29e)]===''){const _0x3db729=_0x3d300f[_0x487152(0x1ae)]?.[_0x487152(0x1b5)](_0x6bcd74=>_0x6bcd74[_0x487152(0x286)])||[];if(_0x3db729[_0x487152(0x1b7)]===0x0)console[_0x487152(0x288)](a21_0x17398f[_0x487152(0x29c)](_0x487152(0x273)));else{console[_0x487152(0x288)](a21_0x17398f[_0x487152(0x29c)](_0x487152(0x1b3))),console['error']('Available\x20attributes:');for(const _0x4c7cf9 of _0x3db729){console[_0x487152(0x288)]('\x20\x20'+a21_0x17398f[_0x487152(0x180)](_0x4c7cf9));}console[_0x487152(0x288)](_0x487152(0x2ab)+_0x2649d+_0x487152(0x1c8)+_0x3db729[0x0]+'\x22');}return 0x1;}if(_0x4f9203[_0x487152(0x26f)]===!![]||_0x4f9203[_0x487152(0x26f)]===''){const _0x2d6ce5=_0x3d300f[_0x487152(0x2a5)]?.[_0x487152(0x1b5)](_0xbbf721=>_0xbbf721[_0x487152(0x286)])||[];if(_0x2d6ce5['length']===0x0)console[_0x487152(0x288)](a21_0x17398f['red'](_0x487152(0x20d)));else{console['error'](a21_0x17398f[_0x487152(0x29c)](_0x487152(0x298))),console['error'](_0x487152(0x219));for(const _0x2017be of _0x2d6ce5){console['error']('\x20\x20'+a21_0x17398f[_0x487152(0x180)](_0x2017be));}console[_0x487152(0x288)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2649d+_0x487152(0x1da)+_0x2d6ce5[0x0]+'\x22');}return 0x1;}const _0x46784b=createCommandSpinner(a21_0x17398f[_0x487152(0x262)](_0x487152(0x1a4)),{'verbose':_0x4f9203[_0x487152(0x1ab)]});_0x46784b[_0x487152(0x187)]();const _0x527c66={'onProgress':_0xf5842f=>{const _0x4dfa22=_0x487152;_0x46784b[_0x4dfa22(0x229)]=formatProgressMessage(_0xf5842f);}};if(_0x4f9203[_0x487152(0x1f9)])_0x527c66[_0x487152(0x1f9)]=!![];if(_0x4f9203['attribute']&&typeof _0x4f9203['attribute']===_0x487152(0x1eb))_0x527c66['attribute']=_0x4f9203[_0x487152(0x29e)];if(_0x4f9203[_0x487152(0x26f)]&&typeof _0x4f9203[_0x487152(0x26f)]===_0x487152(0x1eb))_0x527c66['behavior']=_0x4f9203[_0x487152(0x26f)];if(_0x4f9203[_0x487152(0x1dd)])_0x527c66['enriched']=!![];if(_0x4f9203[_0x487152(0x23c)])_0x527c66['interval']=_0x4f9203['interval'];let _0x2f77e1;try{_0x2f77e1=await _0x5716d4[_0x487152(0x21c)][_0x487152(0x252)](_0x596ed5,_0x527c66),_0x46784b[_0x487152(0x24c)]();}catch(_0x3ac435){_0x46784b[_0x487152(0x24c)]();throw _0x3ac435;}return await this[_0x487152(0x1b0)](_0x2f77e1,{'master':_0x4f9203[_0x487152(0x1f9)],'attribute':typeof _0x4f9203[_0x487152(0x29e)]===_0x487152(0x1eb)?_0x4f9203[_0x487152(0x29e)]:undefined,'behavior':typeof _0x4f9203[_0x487152(0x26f)]===_0x487152(0x1eb)?_0x4f9203[_0x487152(0x26f)]:undefined,'enriched':_0x4f9203[_0x487152(0x1dd)]}),_0x2f77e1[_0x487152(0x196)]?0x0:0x1;}async['displayPreviewResults'](_0x38bc0e,_0x4febbe){const _0x2669b7=a21_0x32761f;console[_0x2669b7(0x288)]('\x0a'+a21_0x17398f[_0x2669b7(0x260)](_0x2669b7(0x1a9))+'\x20'+_0x38bc0e['name']),console[_0x2669b7(0x288)]('═'[_0x2669b7(0x218)](0x3c));if(_0x4febbe[_0x2669b7(0x1f9)]&&_0x38bc0e[_0x2669b7(0x232)]){const _0x2aa7c2=a21_0x17398f[_0x2669b7(0x262)](_0x2669b7(0x263))+'\x20'+a21_0x17398f[_0x2669b7(0x260)](_0x38bc0e[_0x2669b7(0x1f9)][_0x2669b7(0x19c)]+'.'+_0x38bc0e[_0x2669b7(0x1f9)][_0x2669b7(0x1d8)]);await this[_0x2669b7(0x27b)](_0x2aa7c2,_0x38bc0e['sampleData']);}else{if(_0x4febbe[_0x2669b7(0x29e)]&&_0x38bc0e[_0x2669b7(0x232)]){const _0x313474=a21_0x17398f[_0x2669b7(0x262)]('Attribute:')+'\x20'+a21_0x17398f['bold'](_0x4febbe[_0x2669b7(0x29e)]);await this[_0x2669b7(0x27b)](_0x313474,_0x38bc0e[_0x2669b7(0x232)]);}else{if(_0x4febbe[_0x2669b7(0x26f)]&&_0x38bc0e[_0x2669b7(0x232)]){const _0x2a2763=a21_0x17398f[_0x2669b7(0x262)](_0x2669b7(0x223))+'\x20'+a21_0x17398f[_0x2669b7(0x260)](_0x4febbe[_0x2669b7(0x26f)]);await this[_0x2669b7(0x27b)](_0x2a2763,_0x38bc0e['sampleData']);}else{if(_0x4febbe[_0x2669b7(0x1dd)]&&_0x38bc0e[_0x2669b7(0x232)]){const _0x30448c=a21_0x17398f['dim'](_0x2669b7(0x182))+'\x20'+a21_0x17398f[_0x2669b7(0x260)](_0x2669b7(0x24b));await this[_0x2669b7(0x27b)](_0x30448c,_0x38bc0e[_0x2669b7(0x232)]);}else!_0x38bc0e[_0x2669b7(0x232)]&&console[_0x2669b7(0x288)](_0x2669b7(0x1e2));}}}if(_0x38bc0e[_0x2669b7(0x29b)]['length']>0x0){console[_0x2669b7(0x288)]('─'[_0x2669b7(0x218)](0x3c)),console['error']('\x0a'+a21_0x17398f[_0x2669b7(0x29c)](_0x2669b7(0x1a3)));for(const _0x3e4c4a of _0x38bc0e[_0x2669b7(0x29b)]){console['error']('\x20\x20'+a21_0x17398f[_0x2669b7(0x29c)]('•')+'\x20'+_0x3e4c4a);}}}async[a21_0x32761f(0x27b)](_0x3d2f3e,_0xc7917c){const _0x317353=a21_0x32761f;if(_0xc7917c['length']===0x0){console[_0x317353(0x288)]('\x0a'+_0x3d2f3e),console[_0x317353(0x288)](_0x317353(0x296));return;}console[_0x317353(0x288)]('\x0a'+_0x3d2f3e);const _0x2ff469=Object[_0x317353(0x281)](_0xc7917c[0x0])[_0x317353(0x1b5)](_0x145a68=>({'name':_0x145a68,'type':typeof _0xc7917c[0x0][_0x145a68]==='number'?_0x317353(0x297):'varchar'})),_0x1af4aa={'queryId':_0x317353(0x24a),'columns':_0x2ff469,'data':_0xc7917c,'stats':{'state':_0x317353(0x1bb),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0xc7917c[_0x317353(0x1b7)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x185596=formatAsTable(_0x1af4aa,_0xc7917c[_0x317353(0x1b7)],!![]);await writeOutput(_0x185596,undefined,_0x317353(0x1d8));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x264);[a21_0x32761f(0x274)]=a21_0x32761f(0x190);async[a21_0x32761f(0x240)](_0x57ae91){const _0x3281fa=a21_0x32761f,{options:_0x1bd1e9,args:_0x24cacf,tdx:_0x29ca25}=_0x57ae91,_0x545ba7=_0x1bd1e9,_0x480c3b=_0x24cacf[0x0]||_0x1bd1e9['parentSegment'];if(!_0x480c3b)return showParentSegmentNotSetError(_0x3281fa(0x24e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x130ea7=resolveYamlFile(_0x480c3b);if(existsSync(_0x130ea7)){_0x545ba7['verbose']&&console['error'](_0x3281fa(0x1cf)+_0x130ea7);let _0x163dd6;try{_0x163dd6=readFileSync(_0x130ea7,'utf-8');}catch(_0x15a67b){const _0x5dcbcc=_0x15a67b instanceof Error?_0x15a67b[_0x3281fa(0x21d)]:String(_0x15a67b);return console[_0x3281fa(0x288)](_0x3281fa(0x1ad)+_0x5dcbcc),0x1;}const _0x633655=await withSpinner(_0x3281fa(0x29d),()=>_0x29ca25[_0x3281fa(0x21c)][_0x3281fa(0x233)](_0x163dd6),{'verbose':_0x545ba7[_0x3281fa(0x1ab)]}),_0xa6c495=_0x633655[_0x3281fa(0x28e)],{isNew:_0x403f3d,name:_0xe0aaa6,hasChanges:_0x149c21,diffFormatted:_0x49a06b}=_0xa6c495;if(_0x149c21){_0x403f3d?console['error'](_0x3281fa(0x199)+_0xe0aaa6+'\x27:'):console['error'](_0x3281fa(0x245)+_0xe0aaa6+'\x27:');console[_0x3281fa(0x288)]('─'['repeat'](0x3c)),console['error'](_0x49a06b),console['error']('─'[_0x3281fa(0x218)](0x3c));const _0x41913b=_0x403f3d?_0x3281fa(0x1ff)+_0xe0aaa6+_0x3281fa(0x271):'Apply\x20changes\x20to\x20\x27'+_0xe0aaa6+_0x3281fa(0x271);if(!_0x545ba7[_0x3281fa(0x249)]){const _0x1cef4c=await confirmKey(_0x41913b);if(!_0x1cef4c)return console[_0x3281fa(0x288)](_0x3281fa(0x220)),0x1;}const _0x4bfe48=_0x403f3d?_0x3281fa(0x1ba):_0x3281fa(0x217);await withSpinner(_0x4bfe48+_0x3281fa(0x203)+_0xe0aaa6+_0x3281fa(0x1f4),()=>_0xa6c495[_0x3281fa(0x268)](),{'verbose':_0x545ba7[_0x3281fa(0x1ab)]});const _0x4db656=_0x403f3d?_0x3281fa(0x258):_0x3281fa(0x244);console['error']('✔\x20'+_0x4db656+_0x3281fa(0x203)+_0xe0aaa6+'\x27');}else console[_0x3281fa(0x288)](_0x3281fa(0x282)+_0xe0aaa6+'\x27\x20is\x20up\x20to\x20date');}const _0x492ffd=await withSpinner(_0x3281fa(0x1c6)+_0x480c3b+_0x3281fa(0x1f4),()=>_0x29ca25[_0x3281fa(0x21c)][_0x3281fa(0x1ec)](_0x480c3b),{'verbose':_0x545ba7[_0x3281fa(0x1ab)]}),_0x2e8756=_0x492ffd[_0x3281fa(0x28e)],_0x147b3a=getConsoleUrl(_0x545ba7[_0x3281fa(0x27d)],_0x3281fa(0x253)+_0x2e8756[_0x3281fa(0x1a6)]+_0x3281fa(0x185)+_0x2e8756[_0x3281fa(0x28c)]+_0x3281fa(0x283)+_0x2e8756[_0x3281fa(0x2a1)]);return console[_0x3281fa(0x288)]('\x0a✔\x20Workflow\x20started'),console['error']('\x20\x20'+a21_0x17398f[_0x3281fa(0x262)](_0x3281fa(0x294))+'\x20'+_0x2e8756[_0x3281fa(0x23f)]),console[_0x3281fa(0x288)]('\x20\x20'+a21_0x17398f['dim'](_0x3281fa(0x1f8))+'\x20'+_0x2e8756[_0x3281fa(0x197)]),console['error']('\x20\x20'+a21_0x17398f[_0x3281fa(0x262)](_0x3281fa(0x192))+'\x20'+_0x2e8756[_0x3281fa(0x28c)]),console[_0x3281fa(0x288)]('\x20\x20'+a21_0x17398f['dim'](_0x3281fa(0x25f))+'\x20'+_0x2e8756[_0x3281fa(0x2a1)]),console['error']('\x20\x20'+_0x147b3a),console[_0x3281fa(0x288)]('\x0a'+a21_0x17398f[_0x3281fa(0x262)](_0x3281fa(0x1f6))+_0x3281fa(0x213)+_0x2e8756[_0x3281fa(0x2a1)]+_0x3281fa(0x201)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{['name']=a21_0x32761f(0x26a);['description']=a21_0x32761f(0x1e0);async['execute'](_0xd3fb19){const _0xfacee4=a21_0x32761f,{options:_0x1ddc6c,args:_0x537633,tdx:_0x231336}=_0xd3fb19,_0x31ef04=_0x537633[0x0]||_0x1ddc6c['parentSegment'];if(!_0x31ef04)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a'+_0xfacee4(0x1d6)),0x1;_0x1ddc6c['verbose']&&(console[_0xfacee4(0x288)]('Site:\x20'+_0x1ddc6c['site']),console['error'](_0xfacee4(0x24f)+_0x31ef04));const _0x111449=await withSpinner(_0xfacee4(0x26b)+_0x31ef04+_0xfacee4(0x1f4),()=>_0x231336['segment'][_0xfacee4(0x19f)](_0x31ef04),{'verbose':_0x1ddc6c[_0xfacee4(0x1ab)]}),_0x481559=_0x111449[_0xfacee4(0x28e)];console['error'](_0xfacee4(0x28a)+_0x481559['length']+_0xfacee4(0x23b)+(_0x481559[_0xfacee4(0x1b7)]!==0x1?'s':''));if(_0x1ddc6c[_0xfacee4(0x247)]||_0x1ddc6c[_0xfacee4(0x1de)])return await handleSDKOutput(_0x481559,_0x1ddc6c),0x0;return displayFieldsHumanReadable(_0x481559,_0x31ef04),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x28d);['description']=a21_0x32761f(0x186);async[a21_0x32761f(0x240)](_0x57a9b1){const _0x1cc53d=a21_0x32761f,{options:_0x1374bc,args:_0x30de7d,tdx:_0xaaf3df}=_0x57a9b1,_0x2c32b3=_0x1374bc,_0x8968fb=_0x30de7d[0x0]||_0x1374bc[_0x1cc53d(0x259)];if(!_0x8968fb)return showParentSegmentNotSetError(_0x1cc53d(0x21e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a'+_0x1cc53d(0x243)+_0x1cc53d(0x17f)),0x1;_0x1374bc[_0x1cc53d(0x1ab)]&&(console[_0x1cc53d(0x288)]('Site:\x20'+_0x1374bc[_0x1cc53d(0x27d)]),console[_0x1cc53d(0x288)](_0x1cc53d(0x24f)+_0x8968fb));const _0x1b24af=await withSpinner(_0x1cc53d(0x1a2)+_0x8968fb+_0x1cc53d(0x1f4),()=>_0xaaf3df[_0x1cc53d(0x21c)]['getParentFull'](_0x8968fb),{'verbose':_0x1374bc['verbose']}),_0x52db75=_0x1b24af[_0x1cc53d(0x28e)];if(_0x2c32b3[_0x1cc53d(0x257)]){const _0x1e549f=getConsoleNextUrl(_0x2c32b3[_0x1cc53d(0x27d)],_0x1cc53d(0x18e)+_0x52db75['id']);return console[_0x1cc53d(0x288)](a21_0x17398f[_0x1cc53d(0x1d4)]('✔')+_0x1cc53d(0x1a7)+a21_0x17398f[_0x1cc53d(0x180)](_0x1e549f)),openBrowser(_0x1e549f),0x0;}return await handleSingleObjectOutput(_0x52db75,_0x1374bc),0x0;}}function a21_0x2a24(){const _0x14532b=['\x20\x20\x20\x20-\x20','audienceId','execute','rowCount','%)\x20','Options:\x0a','Updated','\x0aChanges\x20to\x20apply\x20to\x20\x27','attributesFile','json','open','yes','preview','Master\x20+\x20Attributes','stop','\x20No\x20changes\x20-\x20','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Parent\x20segment:\x20','Updating\x20parent\x20segment\x20\x27','tdx\x20segment\x20parent\x20preview\x20','previewParentYaml','/app/workflows/','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x0aChanges\x20to\x20\x27','Listing\x20parent\x20segments...','web','Created','parentSegment','Source:','schemaError','addAttributesFile','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','trim','Attempt:','bold','Overwrite\x20\x27','dim','Master:','segment:parent:run','scheduleType','✔\x20Query\x20completed:\x20Processed\x20','3586368vRRpdl','apply','No\x20parent\x20segments\x20found','segment:parent:fields','Listing\x20fields\x20for\x20\x27','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','Error:\x20Parent\x20segment\x20name\x20is\x20required','✔\x20Created\x20parent\x20segment\x20\x27','behavior','Site:\x20','\x27\x20and\x20run\x20workflow?','test','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','description','\x0a⚠️\x20\x20Migrating:\x20','14THDRDJ','Creating\x20parent\x20segment\x20\x27','No\x20parent\x20segments\x20match\x20pattern:\x20','utf-8','Join\x20on:','displaySampleData','\x20--attribute\x20\x22<name>\x22','site','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','unref','15579NcyLIi','keys','✔\x20No\x20changes\x20-\x20\x27','/attempt/','log','validateParentYaml','name','Listing\x20parent\x20segments\x20matching\x20\x27','error','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','✔\x20Found\x20','Table:\x20','workflowSessionId','segment:parent:view','data','displayAttributesStats','1550367kiRycW','win32','Apply\x20changes\x20to\x20\x27','stats','Audience\x20ID:','Executing\x20parent\x20segment\x20query...','\x20\x20No\x20sample\x20data\x20available','double','Error:\x20--behavior\x20requires\x20a\x20name\x0a','replace','✘\x20Failed\x20to\x20rename\x20directory:\x20','errors','red','Analyzing\x20changes...','attribute','SELECT\x20*\x20FROM\x20(\x0a','\x20--enriched','workflowAttemptId','/\x20directories\x20exist.','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x20rows)','behaviors','\x27\x20with\x20ID:\x20','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Coverage:','addAttributes','Attributes','\x0aUsage:\x20tdx\x20ps\x20preview\x20','segment:parent:validate','use','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','cyan','filter','Enriched:','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','/sessions/','Show\x20parent\x20segment\x20details','start','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','segment:parent:show','in\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','segment:parent:desc','displaySummary','/app/dw/parentSegments/','toFixed','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','49652vUigYe','Session:','.yaml','YAML\x20file:\x20','jobId','allValid','status','schemaValid','\x0aNew\x20parent\x20segment\x20\x27','5539664HXQIuB','\x20[Job\x20ID:\x20','database','platform','segment:parent:list','listFields','\x20--interval\x20','customerPercent','Fetching\x20parent\x20segment\x20\x27','Errors:','Fetching\x20sample\x20data...','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','workflowId','\x20Opening\x20','yellow','Preview:','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','verbose','Error:\x20--database\x20and\x20--table\x20are\x20required','Error\x20reading\x20file:\x20','attributes','👥\x20','displayPreviewResults','To\x20view\x20sample\x20data:','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20(requires\x20context)\x0a','map','customerGroup','length','/{name}.yml\x0a','updateParent','Creating','FINISHED','segment:parent:create','Output\x20file:\x20','102AotYqp','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','SQL\x20query:\x0a','Events:','displayBehaviorsStats','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','foreignKey','darwin','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20--attribute\x20\x22','\x20Context\x20set:\x20','isDirectory','parent_segment','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','output','.yml','Found\x20YAML\x20file:\x20','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','session','limit','information_schema','green','Fetching\x20SQL\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','customersWithEvents','table','/\x20directory.\x0a','\x20--behavior\x20\x22','sort','displayPreviewHints','enriched','jsonl','`\x20to\x20download\x20the\x20configuration\x20first','List\x20available\x20fields\x20for\x20segmentation','-1d','\x0aNo\x20sample\x20data\x20available','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Master\x20Table','processedRows','Behaviors','localeCompare','getParentSQL','elapsedTimeMillis','string','runParent','Columns:','query','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','List\x20parent\x20segments','toLocaleString','Pattern:\x20','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','\x27...','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','To\x20cancel:','totalEvents','Status:','master','Validating\x20configuration...','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','Join:','Error:','joinKey','Create\x20parent\x20segment\x20\x27','displayValidateResults','\x20kill','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','endsWith','segment:parent:pull','displayMasterInfo','Options:','displayColumns','Fetching\x20current\x20configuration\x20for\x20\x27','getParentFull','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','matchedCount','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Rows:','resolveParentId','Error:\x20File\x20not\x20found:\x20','\x20tdx\x20wf\x20attempt\x20','4699110IhlxTF','/\x20and\x20','Resolving\x20parent\x20segment\x20\x27','Updating','repeat','Available\x20behaviors:','coveragePercent','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','segment','message','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','column','Aborted.','segment:parent:sql','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Behavior:','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','/\x20→\x20','\x0a⚠️\x20\x20Both\x20','5954230JbGOsB','Options\x20(one\x20required):\x0a','text','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','19980hzTBxP','format','\x20=\x20','timezone','join','scheduleOption','population','sampleData','pushParentYaml','ignore','pullParentYaml','all','run','segment:parent:update','addBehaviors','columns','\x20field','interval','xdg-open'];a21_0x2a24=function(){return _0x14532b;};return a21_0x2a24();}export class ParentSegmentDescCommand extends BaseCommand{['name']=a21_0x32761f(0x18c);[a21_0x32761f(0x274)]=a21_0x32761f(0x2a3);async['execute'](_0x53c38d){const _0x5c6e26=a21_0x32761f,{options:_0x3fa6ac,args:_0x977b4,tdx:_0x1006af}=_0x53c38d,_0x31fd8b=_0x977b4[0x0]||_0x3fa6ac['parentSegment'];if(!_0x31fd8b)return showParentSegmentNotSetError(_0x5c6e26(0x1b4)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20specific\x20parent\x20segment'),0x1;_0x3fa6ac[_0x5c6e26(0x1ab)]&&(console['error'](_0x5c6e26(0x270)+_0x3fa6ac[_0x5c6e26(0x27d)]),console[_0x5c6e26(0x288)](_0x5c6e26(0x24f)+_0x31fd8b));const _0x21aacc=await withSpinner(_0x5c6e26(0x216)+_0x31fd8b+_0x5c6e26(0x1f4),()=>_0x1006af[_0x5c6e26(0x21c)][_0x5c6e26(0x211)](_0x31fd8b),{'verbose':_0x3fa6ac[_0x5c6e26(0x1ab)]}),_0x170b26=_0x21aacc[_0x5c6e26(0x28e)],_0x107531=await withSpinner(_0x5c6e26(0x1d5)+_0x31fd8b+_0x5c6e26(0x1f4),()=>_0x1006af['segment']['getParentSQL'](_0x170b26),{'verbose':_0x3fa6ac[_0x5c6e26(0x1ab)]}),_0xac5e2a=await executeSchemaQuery(_0x107531[_0x5c6e26(0x28e)],_0x1006af,_0x3fa6ac);return await handleQueryOutput(_0xac5e2a,_0x3fa6ac),0x0;}}export class ParentSegmentSQLCommand extends BaseCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x221);[a21_0x32761f(0x274)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a21_0x32761f(0x240)](_0x1038f6){const _0x2d71e0=a21_0x32761f,{options:_0x10f181,args:_0x1c3a9f,tdx:_0x141039}=_0x1038f6,_0xd9c260=_0x1c3a9f[0x0]||_0x10f181[_0x2d71e0(0x259)];if(!_0xd9c260)return showParentSegmentNotSetError(_0x2d71e0(0x20f)+_0x2d71e0(0x1e4)),0x1;_0x10f181['verbose']&&(console['error'](_0x2d71e0(0x270)+_0x10f181['site']),console[_0x2d71e0(0x288)](_0x2d71e0(0x24f)+_0xd9c260));const _0xe9c0de=await withSpinner(_0x2d71e0(0x216)+_0xd9c260+_0x2d71e0(0x1f4),()=>_0x141039[_0x2d71e0(0x21c)][_0x2d71e0(0x211)](_0xd9c260),{'verbose':_0x10f181[_0x2d71e0(0x1ab)]}),_0x55726e=_0xe9c0de['data'],_0xeef6b9=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0xd9c260+_0x2d71e0(0x1f4),()=>_0x141039['segment'][_0x2d71e0(0x1e9)](_0x55726e),{'verbose':_0x10f181[_0x2d71e0(0x1ab)]}),_0x31a41c=_0xeef6b9['data'];return _0x10f181[_0x2d71e0(0x22c)]===_0x2d71e0(0x247)||_0x10f181[_0x2d71e0(0x22c)]===_0x2d71e0(0x1de)?await handleSDKOutput([{'sql':_0x31a41c}],_0x10f181):console[_0x2d71e0(0x284)](_0x31a41c),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a21_0x32761f(0x286)]=a21_0x32761f(0x189);[a21_0x32761f(0x274)]=a21_0x32761f(0x26c);async[a21_0x32761f(0x240)](_0x509486){const _0xc5504b=a21_0x32761f,{options:_0x592a7e,args:_0x522dbb,tdx:_0x409104}=_0x509486,_0xb3f290=_0x522dbb[0x0]||_0x592a7e[_0xc5504b(0x259)];if(!_0xb3f290)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment'),0x1;_0x592a7e['verbose']&&(console[_0xc5504b(0x288)]('Site:\x20'+_0x592a7e[_0xc5504b(0x27d)]),console['error'](_0xc5504b(0x24f)+_0xb3f290));const _0x4487b2=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xb3f290+_0xc5504b(0x1f4),()=>_0x409104[_0xc5504b(0x21c)]['resolveParentId'](_0xb3f290),{'verbose':_0x592a7e[_0xc5504b(0x1ab)]}),_0x4bf3d8=_0x4487b2[_0xc5504b(0x28e)],_0x1fa95b=await withSpinner(_0xc5504b(0x1d5)+_0xb3f290+'\x27...',()=>_0x409104[_0xc5504b(0x21c)][_0xc5504b(0x1e9)](_0x4bf3d8),{'verbose':_0x592a7e[_0xc5504b(0x1ab)]});let _0x20f1a5=_0x1fa95b[_0xc5504b(0x28e)];const _0x5e0373=resolveLimit(_0x592a7e[_0xc5504b(0x1d2)],DEFAULT_DISPLAY_LIMIT),_0x3de3be=/\bLIMIT\s+\d+/i[_0xc5504b(0x272)](_0x20f1a5);!_0x3de3be&&(_0x20f1a5=_0x20f1a5[_0xc5504b(0x25e)]()[_0xc5504b(0x299)](/;+$/,''),_0x20f1a5=_0xc5504b(0x29f)+_0x20f1a5+_0xc5504b(0x224)+_0x5e0373);_0x592a7e[_0xc5504b(0x1ab)]&&console[_0xc5504b(0x288)](_0xc5504b(0x1c0)+_0x20f1a5);const _0x2cafe9=await withProgressSpinner(_0xc5504b(0x295),async _0x2f211b=>{const _0x5c324b=_0xc5504b,_0x3e43bf=await _0x409104[_0x5c324b(0x1ee)][_0x5c324b(0x240)](_0x20f1a5,{'catalog':'td','schema':_0x5c324b(0x1d3),'onJobId':_0x14b15c=>{_0x2f211b['setJobId'](_0x14b15c);}});return _0x3e43bf;},{'verbose':_0x592a7e[_0xc5504b(0x1ab)]}),_0x5e761c=_0x2cafe9[_0xc5504b(0x28e)],_0x2c4b2e=_0x5e761c[_0xc5504b(0x195)]?_0xc5504b(0x19b)+_0x5e761c[_0xc5504b(0x195)]+']':'';return console[_0xc5504b(0x288)](_0xc5504b(0x266)+_0x5e761c[_0xc5504b(0x293)][_0xc5504b(0x1e6)][_0xc5504b(0x1f1)]()+'\x20rows\x20'+(_0xc5504b(0x18a)+formatElapsed(_0x5e761c[_0xc5504b(0x293)][_0xc5504b(0x1ea)])+_0x2c4b2e)),await handleQueryOutput(_0x5e761c,_0x592a7e),0x0;}}
@@ -37,7 +37,7 @@ export declare class ProfileSetCommand extends BaseCommand {
37
37
  execute(context: CommandContext): Promise<number>;
38
38
  }
39
39
  /**
40
- * Profile use command - Set session profile
40
+ * Profile use command - Set session profile or global default profile
41
41
  * Same as 'tdx use profile <name>' but more discoverable
42
42
  */
43
43
  export declare class ProfileUseCommand extends BaseCommand {
@@ -1 +1 @@
1
- {"version":3,"file":"profile-command.d.ts","sourceRoot":"","sources":["../../src/commands/profile-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAC;AA0ChF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,WAAW,0BAA0B;IAExC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAgLxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,WAAW,sBAAsB;IAE1C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;IAQzD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAwDxD;AAED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iBAAkB,SAAQ,WAAW;IAChD,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,WAAW,uCAAuC;IAG3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAqF;IAEvH,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;IA0BzD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAkGxD;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,WAAW,yBAAyB;IAE7C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;IAQzD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA2CxD"}
@@ -1 +1 @@
1
- const a22_0xa81a40=a22_0x36f4;(function(_0x284c76,_0x349d4f){const _0x1655d7=a22_0x36f4,_0x2cdc31=_0x284c76();while(!![]){try{const _0x141b3f=parseInt(_0x1655d7(0x138))/0x1*(parseInt(_0x1655d7(0x122))/0x2)+-parseInt(_0x1655d7(0x158))/0x3+parseInt(_0x1655d7(0x154))/0x4+parseInt(_0x1655d7(0x160))/0x5*(parseInt(_0x1655d7(0x11b))/0x6)+-parseInt(_0x1655d7(0x149))/0x7*(-parseInt(_0x1655d7(0x153))/0x8)+-parseInt(_0x1655d7(0x166))/0x9*(parseInt(_0x1655d7(0x180))/0xa)+-parseInt(_0x1655d7(0x174))/0xb;if(_0x141b3f===_0x349d4f)break;else _0x2cdc31['push'](_0x2cdc31['shift']());}catch(_0x408443){_0x2cdc31['push'](_0x2cdc31['shift']());}}}(a22_0x4434,0xed5ad));import{BaseCommand,printAuthError}from'./command.js';import{listProfiles,profileExists,saveProfileToUserConfig,removeProfileFromUserConfig,loadProfile,getActiveProfile}from'../core/profile.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions}from'../core/session.js';import{saveAPIKeyAsync,resolveSite}from'../core/config.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';function a22_0x4434(){const _0x4693c5=['getUserInfo','message','\x20\x20tdx\x20--profile\x20','Profile\x20name\x20is\x20required.\x0a\x0aUsage:\x20tdx\x20profile\x20remove\x20<name>','Profile\x20\x27','jobs','tdx:\x20profile\x20remove','95744NFzPvk','4118484fzaQcJ','findIndex','red','ap02\x20-\x20Korea','2025435HIlYhB','profile:set','text','other','warn','Validating\x20API\x20key...','profile:use','green','525obOUVQ','create','tdx:\x20profile\x20set','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','profileName','parent_segment','9pUjlTV','\x20\x20(no\x20profiles\x20found)','\x0aSetting\x20up\x20authentication\x20for\x20site:\x20','Site\x20was\x20not\x20changed.','select','Key=value\x20pair\x20is\x20required.\x0a\x0aUsage:\x20tdx\x20profile\x20set\x20[--profile\x20<name>]\x20<key>=<value>\x0a\x0aValid\x20keys:\x20','\x20\x20-\x20','config','\x20API\x20key\x20is\x20valid\x20(User:\x20','Operation\x20cancelled','Set\x20session\x20profile','profile:remove','execute','test','8511030mjVcgZ','\x27\x20removed\x20from\x20configuration','logLevel','Profile\x20name\x20is\x20required.\x0a\x0aUsage:\x20tdx\x20profile\x20use\x20<name>','description','Session\x20profile\x20set\x20to:\x20','✗\x20Validation\x20failed:\x20','API\x20key\x20cannot\x20be\x20empty','Profile\x20name\x20must\x20contain\x20only\x20alphanumeric\x20characters,\x20dash,\x20and\x20underscore','name','error','\x27.\x0a\x0aValid\x20keys:\x20','10715310xfFMrF','length','status','Changing\x20site\x20to\x20\x27','join','\x0aYou\x20can\x20find\x20your\x20API\x20key\x20at:','email','profile','us\x20\x20\x20-\x20United\x20States','Select\x20Treasure\x20Data\x20site\x20for\x20profile\x20\x27','\x27\x20already\x20exists.\x20Use\x20\x27tdx\x20profile\x20set\x27\x20to\x20modify\x20it.','Removal\x20cancelled','\x27\x20updated:\x20','tdx:\x20profile\x20create','\x27\x20created','\x27\x20requires\x20API\x20key\x20validation.','No\x20active\x20profile.\x20Use\x20--profile\x20flag\x20or\x20set\x20session\x20profile\x20with:\x20tdx\x20profile\x20use\x20<name>\x0a\x0aUsage:\x20tdx\x20profile\x20set\x20[--profile\x20<name>]\x20<key>=<value>','39654LTAmUz','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','\x20Profile\x20\x27','profile:create','Enter\x20profile\x20name:','site','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','276770LhsTaA','ap02','session','dim','customSite','(session:\x20','\x0aOperation\x20cancelled','Enter\x20description\x20(optional):','bold','You\x20can\x20now\x20use\x20tdx\x20commands\x20with\x20this\x20profile.\x20Try:','\x20API\x20key\x20removed\x20from\x20system\x20keychain','apiKey','jp\x20\x20\x20-\x20Japan','push','Set\x20a\x20profile\x20configuration\x20value','yellow','\x0aAvailable\x20profiles:','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','log','validate','Remove\x20a\x20profile','\x27\x20does\x20not\x20exist.\x20Create\x20it?','5DekWAe','Profile\x20name\x20cannot\x20be\x20empty','split','eu01','includes','\x0aSetup\x20cancelled','confirm','Failed\x20to\x20remove\x20profile:\x20','database','us01','password','\x27\x20does\x20not\x20exist.','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','Profile\x20was\x20not\x20created.\x20Please\x20try\x20again.','\x20API\x20key\x20saved\x20to\x20system\x20keychain','trim','VALID_KEYS','630jsEzrp','jp01','llm_project'];a22_0x4434=function(){return _0x4693c5;};return a22_0x4434();}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a22_0x296651 from'prompts';import a22_0x373702 from'chalk';function validateProfileName(_0x1236a8){const _0x5cf86d=a22_0x36f4;if(!_0x1236a8||!_0x1236a8[_0x5cf86d(0x147)]())return _0x5cf86d(0x139);const _0x309d23=_0x1236a8[_0x5cf86d(0x147)]();if(!/^[a-zA-Z0-9_-]+$/[_0x5cf86d(0x173)](_0x309d23))return _0x5cf86d(0x17c);if(profileExists(_0x309d23))return'Profile\x20\x27'+_0x309d23+_0x5cf86d(0x18a);return!![];}export class ProfileCreateCommand extends BaseCommand{[a22_0xa81a40(0x17d)]=a22_0xa81a40(0x11e);[a22_0xa81a40(0x178)]='Create\x20a\x20new\x20profile';async['execute'](_0x5a12ee){const _0x49bed3=a22_0xa81a40,{options:_0x1f3480,args:_0x37bd09}=_0x5a12ee;console['log'](a22_0x373702[_0x49bed3(0x12a)](_0x49bed3(0x18d)));let _0x2cba8a;if(_0x37bd09[_0x49bed3(0x181)]>0x0&&_0x37bd09[0x0]){const _0x310876=_0x37bd09[0x0][_0x49bed3(0x147)](),_0x59fddb=validateProfileName(_0x310876);if(_0x59fddb!==!![])return console[_0x49bed3(0x17e)](a22_0x373702[_0x49bed3(0x156)](_0x59fddb)),0x1;_0x2cba8a=_0x310876;}else{const _0x1191bb=await a22_0x296651({'type':_0x49bed3(0x15a),'name':'profileName','message':_0x49bed3(0x11f),'validate':validateProfileName});if(!_0x1191bb[_0x49bed3(0x164)])return console[_0x49bed3(0x134)]('\x0aSetup\x20cancelled'),0x1;_0x2cba8a=_0x1191bb[_0x49bed3(0x164)][_0x49bed3(0x147)]();}const _0x4bf864=await a22_0x296651({'type':_0x49bed3(0x15a),'name':_0x49bed3(0x178),'message':_0x49bed3(0x129)}),_0x587ec7=_0x4bf864[_0x49bed3(0x178)]?.[_0x49bed3(0x147)]()||undefined,_0x227cb0=_0x1f3480[_0x49bed3(0x120)]||_0x49bed3(0x141),_0x1772b7=[{'title':_0x49bed3(0x188),'value':_0x49bed3(0x141)},{'title':_0x49bed3(0x12e),'value':_0x49bed3(0x14a)},{'title':'eu\x20\x20\x20-\x20Europe','value':_0x49bed3(0x13b)},{'title':_0x49bed3(0x157),'value':_0x49bed3(0x123)}];let _0x8a4489=_0x1772b7[_0x49bed3(0x155)](_0x2c75a0=>_0x2c75a0['value']===_0x227cb0);_0x8a4489===-0x1&&_0x227cb0!==_0x49bed3(0x141)&&(_0x1772b7[_0x49bed3(0x12f)]({'title':_0x227cb0,'value':_0x227cb0}),_0x8a4489=_0x1772b7[_0x49bed3(0x181)]-0x1);_0x1772b7[_0x49bed3(0x12f)]({'title':'Enter\x20custom\x20site','value':_0x49bed3(0x15b)});const _0x2ed623=await a22_0x296651({'type':_0x49bed3(0x16a),'name':'site','message':_0x49bed3(0x189)+_0x2cba8a+'\x27:','choices':_0x1772b7,'initial':_0x8a4489>=0x0?_0x8a4489:0x0});if(!_0x2ed623[_0x49bed3(0x120)])return console['log']('\x0aSetup\x20cancelled'),0x1;let _0x30dc61;if(_0x2ed623[_0x49bed3(0x120)]==='other'){const _0x23d131=await a22_0x296651({'type':_0x49bed3(0x15a),'name':_0x49bed3(0x126),'message':'Enter\x20site\x20name:','initial':_0x49bed3(0x141),'validate':_0x44f806=>{const _0x518b20=_0x49bed3;if(!_0x44f806||!_0x44f806[_0x518b20(0x147)]())return'Site\x20name\x20cannot\x20be\x20empty';if(!/^[a-z0-9-]+$/[_0x518b20(0x173)](_0x44f806[_0x518b20(0x147)]()))return _0x518b20(0x144);return!![];}});if(!_0x23d131[_0x49bed3(0x126)])return console[_0x49bed3(0x134)](_0x49bed3(0x13d)),0x1;_0x30dc61=_0x23d131[_0x49bed3(0x126)];}else _0x30dc61=_0x2ed623[_0x49bed3(0x120)];const _0x1e4ba2=resolveSite(_0x30dc61);console[_0x49bed3(0x134)](_0x49bed3(0x168)+_0x1e4ba2),console[_0x49bed3(0x134)]('You\x20can\x20find\x20your\x20API\x20key\x20at:'),console[_0x49bed3(0x134)]('\x20\x20'+getConsoleUrl(_0x1e4ba2,'/app/mp/ak'));const _0x386a41=await a22_0x296651({'type':_0x49bed3(0x142),'name':_0x49bed3(0x12d),'message':'Enter\x20your\x20TD\x20API\x20key:','validate':_0x38f196=>{const _0x3840d2=_0x49bed3;if(!_0x38f196||!_0x38f196[_0x3840d2(0x147)]())return _0x3840d2(0x17b);return!![];}});if(!_0x386a41[_0x49bed3(0x12d)])return console[_0x49bed3(0x134)](_0x49bed3(0x13d)),0x1;const _0xe44cea=_0x386a41[_0x49bed3(0x12d)];console[_0x49bed3(0x134)](_0x49bed3(0x15d));try{const _0x237661=TDX['create']({'site':_0x1e4ba2,'apiKey':_0xe44cea[_0x49bed3(0x147)](),'logLevel':_0x1f3480['logLevel']??LogLevel['ERROR']}),_0x1e6365=await _0x237661['jobs'][_0x49bed3(0x14c)]();console[_0x49bed3(0x134)](a22_0x373702[_0x49bed3(0x15f)]('✓')+'\x20API\x20key\x20is\x20valid\x20(User:\x20'+_0x1e6365[_0x49bed3(0x186)]+')');const _0x16a892=await isKeychainAvailable();_0x16a892?(await saveAPIKeyAsync(_0xe44cea[_0x49bed3(0x147)](),_0x1e4ba2,_0x2cba8a),console[_0x49bed3(0x134)](a22_0x373702['green']('✓')+'\x20API\x20key\x20saved\x20to\x20system\x20keychain\x20(profile:\x20'+_0x2cba8a+')')):(console[_0x49bed3(0x15c)](a22_0x373702['yellow'](_0x49bed3(0x133))),console[_0x49bed3(0x15c)](a22_0x373702[_0x49bed3(0x131)](_0x49bed3(0x163))));const _0xe2aa7a={'site':_0x1e4ba2,..._0x587ec7&&{'description':_0x587ec7}};return saveProfileToUserConfig(_0x2cba8a,_0xe2aa7a),console[_0x49bed3(0x134)](a22_0x373702[_0x49bed3(0x15f)]('✓')+_0x49bed3(0x11d)+_0x2cba8a+_0x49bed3(0x18e)),console['log'](),console[_0x49bed3(0x134)](_0x49bed3(0x12b)),console[_0x49bed3(0x134)](_0x49bed3(0x14e)+_0x2cba8a+_0x49bed3(0x11c)),console[_0x49bed3(0x134)](_0x49bed3(0x14e)+_0x2cba8a+_0x49bed3(0x121)),0x0;}catch(_0x3106ef){if(_0x3106ef instanceof HTTPClientError&&_0x3106ef[_0x49bed3(0x182)]===0x191)return printAuthError(_0x3106ef),0x1;return console['error'](a22_0x373702['red'](_0x49bed3(0x17a)+(_0x3106ef instanceof Error?_0x3106ef[_0x49bed3(0x14d)]:String(_0x3106ef)))),console[_0x49bed3(0x17e)](_0x49bed3(0x145)),0x1;}}}export class ProfileRemoveCommand extends BaseCommand{[a22_0xa81a40(0x17d)]=a22_0xa81a40(0x171);['description']=a22_0xa81a40(0x136);['validate'](_0x54de16){const _0x43fc63=a22_0xa81a40,{args:_0x410fbe}=_0x54de16;if(_0x410fbe['length']===0x0)return _0x43fc63(0x14f);return undefined;}async[a22_0xa81a40(0x172)](_0x270824){const _0x14f7fd=a22_0xa81a40,{args:_0x3e6436}=_0x270824,_0x31932f=_0x3e6436[0x0];console[_0x14f7fd(0x134)](a22_0x373702[_0x14f7fd(0x12a)](_0x14f7fd(0x152)));if(!profileExists(_0x31932f)){console['error'](a22_0x373702[_0x14f7fd(0x156)](_0x14f7fd(0x150)+_0x31932f+_0x14f7fd(0x143))),console[_0x14f7fd(0x134)](_0x14f7fd(0x132));const _0x28f0f2=listProfiles();if(_0x28f0f2[_0x14f7fd(0x181)]===0x0)console[_0x14f7fd(0x134)](_0x14f7fd(0x167));else for(const _0x1af2f3 of _0x28f0f2){console['log'](_0x14f7fd(0x16c)+_0x1af2f3[_0x14f7fd(0x17d)]);}return 0x1;}const _0x42b51b=await a22_0x296651({'type':_0x14f7fd(0x13e),'name':_0x14f7fd(0x13e),'message':'Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20profile\x20\x27'+_0x31932f+'\x27?','initial':![]});if(!_0x42b51b[_0x14f7fd(0x13e)])return console[_0x14f7fd(0x134)](_0x14f7fd(0x18b)),0x0;try{removeProfileFromUserConfig(_0x31932f),console[_0x14f7fd(0x134)](a22_0x373702[_0x14f7fd(0x15f)]('✓')+_0x14f7fd(0x11d)+_0x31932f+_0x14f7fd(0x175));}catch(_0xda011){return console[_0x14f7fd(0x17e)](a22_0x373702[_0x14f7fd(0x156)](_0x14f7fd(0x13f)+(_0xda011 instanceof Error?_0xda011[_0x14f7fd(0x14d)]:String(_0xda011)))),0x1;}const _0x1af25f=await isKeychainAvailable();if(_0x1af25f){const _0x18fc3c=await deleteKeychainAPIKey(_0x31932f);_0x18fc3c&&console[_0x14f7fd(0x134)](a22_0x373702[_0x14f7fd(0x15f)]('✓')+_0x14f7fd(0x12c));}return 0x0;}}function a22_0x36f4(_0x479ed1,_0x42ff23){_0x479ed1=_0x479ed1-0x119;const _0x443484=a22_0x4434();let _0x36f42f=_0x443484[_0x479ed1];return _0x36f42f;}export class ProfileSetCommand extends BaseCommand{[a22_0xa81a40(0x17d)]=a22_0xa81a40(0x159);['description']=a22_0xa81a40(0x130);static [a22_0xa81a40(0x148)]=['site',a22_0xa81a40(0x140),a22_0xa81a40(0x165),a22_0xa81a40(0x14b),'llm_agent',a22_0xa81a40(0x178)];[a22_0xa81a40(0x135)](_0x84efb7){const _0x35d5bf=a22_0xa81a40,{args:_0x189964,options:_0x1b78be}=_0x84efb7,_0x13b27b=_0x1b78be[_0x35d5bf(0x187)]||getActiveProfile();if(!_0x13b27b)return _0x35d5bf(0x11a);if(_0x189964[_0x35d5bf(0x181)]===0x0)return _0x35d5bf(0x16b)+ProfileSetCommand['VALID_KEYS'][_0x35d5bf(0x184)](',\x20');const _0x392c30=_0x189964[0x0];if(!_0x392c30[_0x35d5bf(0x13c)]('='))return'Invalid\x20format.\x20Use:\x20tdx\x20profile\x20set\x20[--profile\x20<name>]\x20<key>=<value>\x0a\x0aValid\x20keys:\x20'+ProfileSetCommand['VALID_KEYS'][_0x35d5bf(0x184)](',\x20');const [_0x124bba]=_0x392c30['split']('=',0x2);if(!ProfileSetCommand[_0x35d5bf(0x148)]['includes'](_0x124bba))return'Unknown\x20key\x20\x27'+_0x124bba+_0x35d5bf(0x17f)+ProfileSetCommand[_0x35d5bf(0x148)][_0x35d5bf(0x184)](',\x20');return undefined;}async[a22_0xa81a40(0x172)](_0x4a967c){const _0x2a7b37=a22_0xa81a40,{args:_0x3c9841,options:_0x53b344}=_0x4a967c,_0x492498=_0x53b344[_0x2a7b37(0x187)]||getActiveProfile(),[_0x23aaba,..._0x19742c]=_0x3c9841[0x0][_0x2a7b37(0x13a)]('='),_0x6072c9=_0x19742c[_0x2a7b37(0x184)]('=');console['log'](a22_0x373702[_0x2a7b37(0x12a)](_0x2a7b37(0x162)));if(!profileExists(_0x492498)){const _0x16cf56=await a22_0x296651({'type':'confirm','name':_0x2a7b37(0x161),'message':_0x2a7b37(0x150)+_0x492498+_0x2a7b37(0x137),'initial':!![]});if(!_0x16cf56[_0x2a7b37(0x161)])return console[_0x2a7b37(0x134)](_0x2a7b37(0x16f)),0x1;}const _0x2f0c80=loadProfile(_0x492498),_0x51be3d=_0x2f0c80?.[_0x2a7b37(0x16d)]||{};if(_0x23aaba===_0x2a7b37(0x120)){const _0x392b97=resolveSite(_0x6072c9);console['log'](_0x2a7b37(0x183)+_0x392b97+_0x2a7b37(0x119)),console['log'](_0x2a7b37(0x185)),console[_0x2a7b37(0x134)]('\x20\x20'+getConsoleUrl(_0x392b97,'/app/mp/ak'));const _0x5674c5=await a22_0x296651({'type':_0x2a7b37(0x142),'name':_0x2a7b37(0x12d),'message':'Enter\x20your\x20TD\x20API\x20key\x20for\x20the\x20new\x20site:','validate':_0x4cebf4=>{const _0x5e1452=_0x2a7b37;if(!_0x4cebf4||!_0x4cebf4[_0x5e1452(0x147)]())return _0x5e1452(0x17b);return!![];}});if(!_0x5674c5[_0x2a7b37(0x12d)])return console[_0x2a7b37(0x134)](_0x2a7b37(0x128)),0x1;console['log'](_0x2a7b37(0x15d));try{const _0x3a0037=TDX[_0x2a7b37(0x161)]({'site':_0x392b97,'apiKey':_0x5674c5[_0x2a7b37(0x12d)]['trim'](),'logLevel':_0x53b344[_0x2a7b37(0x176)]??LogLevel['ERROR']}),_0x1d6270=await _0x3a0037[_0x2a7b37(0x151)][_0x2a7b37(0x14c)]();console[_0x2a7b37(0x134)](a22_0x373702[_0x2a7b37(0x15f)]('✓')+_0x2a7b37(0x16e)+_0x1d6270['email']+')');const _0x1181ad=await isKeychainAvailable();_0x1181ad?(await saveAPIKeyAsync(_0x5674c5[_0x2a7b37(0x12d)][_0x2a7b37(0x147)](),_0x392b97,_0x492498),console['log'](a22_0x373702['green']('✓')+_0x2a7b37(0x146))):console['warn'](a22_0x373702[_0x2a7b37(0x131)](_0x2a7b37(0x133))),_0x51be3d[_0x2a7b37(0x120)]=_0x392b97;}catch(_0x21f89a){if(_0x21f89a instanceof HTTPClientError&&_0x21f89a[_0x2a7b37(0x182)]===0x191)return printAuthError(_0x21f89a),0x1;return console[_0x2a7b37(0x17e)](a22_0x373702[_0x2a7b37(0x156)](_0x2a7b37(0x17a)+(_0x21f89a instanceof Error?_0x21f89a[_0x2a7b37(0x14d)]:String(_0x21f89a)))),console[_0x2a7b37(0x17e)](_0x2a7b37(0x169)),0x1;}}else _0x51be3d[_0x23aaba]=_0x6072c9||undefined;return saveProfileToUserConfig(_0x492498,_0x51be3d),console['log'](a22_0x373702[_0x2a7b37(0x15f)]('✓')+_0x2a7b37(0x11d)+_0x492498+_0x2a7b37(0x18c)+_0x23aaba+'='+(_0x6072c9||'(cleared)')),0x0;}}export class ProfileUseCommand extends BaseCommand{['name']=a22_0xa81a40(0x15e);[a22_0xa81a40(0x178)]=a22_0xa81a40(0x170);[a22_0xa81a40(0x135)](_0x13797b){const _0x252ca3=a22_0xa81a40,{args:_0x494ee6}=_0x13797b;if(_0x494ee6[_0x252ca3(0x181)]===0x0)return _0x252ca3(0x177);return undefined;}async[a22_0xa81a40(0x172)](_0x13c5b7){const _0x220dc5=a22_0xa81a40,{args:_0x2e4d80,options:_0x117dd}=_0x13c5b7,_0x2a1647=_0x2e4d80[0x0];cleanExpiredSessions();if(!profileExists(_0x2a1647)){console['error'](a22_0x373702[_0x220dc5(0x156)](_0x220dc5(0x150)+_0x2a1647+_0x220dc5(0x143))),console[_0x220dc5(0x134)]('\x0aAvailable\x20profiles:');const _0x245bee=listProfiles();if(_0x245bee['length']===0x0)console[_0x220dc5(0x134)]('\x20\x20(no\x20profiles\x20found)');else for(const _0x509b3e of _0x245bee){console[_0x220dc5(0x134)](_0x220dc5(0x16c)+_0x509b3e[_0x220dc5(0x17d)]);}return 0x1;}const _0x470e3d=_0x117dd[_0x220dc5(0x124)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x2a1647},_0x117dd['session']),console['log'](_0x220dc5(0x179)+a22_0x373702[_0x220dc5(0x15f)](_0x2a1647)+'\x20'+a22_0x373702[_0x220dc5(0x125)](_0x220dc5(0x127)+_0x470e3d+')')),console['log'](a22_0x373702[_0x220dc5(0x125)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}}
1
+ const a22_0x14a0ad=a22_0xc3af;(function(_0x5c3951,_0x53212e){const _0x5ebcc0=a22_0xc3af,_0x31baf6=_0x5c3951();while(!![]){try{const _0x1728af=-parseInt(_0x5ebcc0(0xcd))/0x1+-parseInt(_0x5ebcc0(0x108))/0x2*(parseInt(_0x5ebcc0(0xb2))/0x3)+parseInt(_0x5ebcc0(0x9c))/0x4+-parseInt(_0x5ebcc0(0xd7))/0x5*(-parseInt(_0x5ebcc0(0xf4))/0x6)+parseInt(_0x5ebcc0(0xa8))/0x7+parseInt(_0x5ebcc0(0xc7))/0x8*(-parseInt(_0x5ebcc0(0xfa))/0x9)+-parseInt(_0x5ebcc0(0xd4))/0xa*(parseInt(_0x5ebcc0(0xb8))/0xb);if(_0x1728af===_0x53212e)break;else _0x31baf6['push'](_0x31baf6['shift']());}catch(_0x3f6a34){_0x31baf6['push'](_0x31baf6['shift']());}}}(a22_0x7968,0xc3b30));import{BaseCommand,printAuthError}from'./command.js';import{listProfiles,profileExists,saveProfileToUserConfig,removeProfileFromUserConfig,loadProfile,getActiveProfile,saveActiveProfileToUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import*as a22_0x14d041 from'node:path';function a22_0x7968(){const _0x186045=['Remove\x20a\x20profile','validate','test','Profile\x20\x27','You\x20can\x20now\x20use\x20tdx\x20commands\x20with\x20this\x20profile.\x20Try:','default','profile:remove','9237btwjBx','\x20--default\x27\x20to\x20save\x20permanently','eu01','Select\x20Treasure\x20Data\x20site\x20for\x20profile\x20\x27','jp01','tdx:\x20profile\x20set','16313dHMHJc','apiKey','error','profileName','toString','Unknown\x20key\x20\x27','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','tdx:\x20profile\x20create','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','create','\x0aAvailable\x20profiles:','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','tdx:\x20profile\x20remove','site','parent_segment','8WuiXxc','Enter\x20your\x20TD\x20API\x20key:','\x20API\x20key\x20removed\x20from\x20system\x20keychain','Enter\x20custom\x20site','config','description','555066veyqSr','\x20\x20-\x20','Profile\x20name\x20is\x20required.\x0a\x0aUsage:\x20tdx\x20profile\x20remove\x20<name>','ap02','profile','name','\x20API\x20key\x20is\x20valid\x20(User:\x20','2040pdprjl','password','eu\x20\x20\x20-\x20Europe','31805CgByEB','\x0aYou\x20can\x20find\x20your\x20API\x20key\x20at:','split','VALID_KEYS','logLevel','Operation\x20cancelled','tdx.json','status','\x0aTip:\x20Use\x20\x27tdx\x20profile\x20use\x20','llm_agent','ERROR','select','\x20API\x20key\x20saved\x20to\x20system\x20keychain','\x0aSetting\x20up\x20authentication\x20for\x20site:\x20','\x27\x20updated:\x20','\x0aOperation\x20cancelled','API\x20key\x20cannot\x20be\x20empty','(session:\x20','Key=value\x20pair\x20is\x20required.\x0a\x0aUsage:\x20tdx\x20profile\x20set\x20[--profile\x20<name>]\x20<key>=<value>\x0a\x0aValid\x20keys:\x20','\x20\x20tdx\x20--profile\x20','jobs','jp\x20\x20\x20-\x20Japan','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','findIndex','dim','You\x20can\x20find\x20your\x20API\x20key\x20at:','other','message','Profile\x20name\x20must\x20contain\x20only\x20alphanumeric\x20characters,\x20dash,\x20and\x20underscore','396IwSpFS','red','customSite','\x27\x20already\x20exists.\x20Use\x20\x27tdx\x20profile\x20set\x27\x20to\x20modify\x20it.','includes','Set\x20session\x20profile','3883986WnrqOE','\x27\x20created','No\x20active\x20profile.\x20Use\x20--profile\x20flag\x20or\x20set\x20session\x20profile\x20with:\x20tdx\x20profile\x20use\x20<name>\x0a\x0aUsage:\x20tdx\x20profile\x20set\x20[--profile\x20<name>]\x20<key>=<value>','push','profile:use','Enter\x20site\x20name:','\x27.\x0a\x0aValid\x20keys:\x20','\x20Profile\x20\x27','us01','us\x20\x20\x20-\x20United\x20States','Validating\x20API\x20key...','Set\x20a\x20profile\x20configuration\x20value','ap02\x20-\x20Korea','green','548RsNFqu','profile:create','\x20\x20(no\x20profiles\x20found)','\x27\x20does\x20not\x20exist.\x20Create\x20it?','Removal\x20cancelled','execute','Enter\x20your\x20TD\x20API\x20key\x20for\x20the\x20new\x20site:','Profile\x20name\x20is\x20required.\x0a\x0aUsage:\x20tdx\x20profile\x20use\x20<name>\x20[--default]','getUserInfo','log','Create\x20a\x20new\x20profile','join','Profile\x20name\x20cannot\x20be\x20empty','trim','session','6043224eKDdqC','text','Profile\x20was\x20not\x20created.\x20Please\x20try\x20again.','✗\x20Validation\x20failed:\x20','warn','Default\x20profile\x20set\x20to:\x20','\x0aSaved\x20to:\x20','bold','confirm','Changing\x20site\x20to\x20\x27','\x27\x20removed\x20from\x20configuration','database','7026250YpumdH','length','\x0aSetup\x20cancelled'];a22_0x7968=function(){return _0x186045;};return a22_0x7968();}import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions}from'../core/session.js';import{saveAPIKeyAsync,resolveSite}from'../core/config.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';function a22_0xc3af(_0x4e11f9,_0x197fbb){_0x4e11f9=_0x4e11f9-0x97;const _0x796837=a22_0x7968();let _0xc3af75=_0x796837[_0x4e11f9];return _0xc3af75;}import a22_0x5ca639 from'prompts';import a22_0x2e6c6b from'chalk';function validateProfileName(_0x2985d0){const _0x11db4a=a22_0xc3af;if(!_0x2985d0||!_0x2985d0[_0x11db4a(0x9a)]())return _0x11db4a(0x99);const _0x4407dd=_0x2985d0[_0x11db4a(0x9a)]();if(!/^[a-zA-Z0-9_-]+$/[_0x11db4a(0xad)](_0x4407dd))return _0x11db4a(0xf3);if(profileExists(_0x4407dd))return'Profile\x20\x27'+_0x4407dd+_0x11db4a(0xf7);return!![];}export class ProfileCreateCommand extends BaseCommand{[a22_0x14a0ad(0xd2)]=a22_0x14a0ad(0x109);[a22_0x14a0ad(0xcc)]=a22_0x14a0ad(0x97);async[a22_0x14a0ad(0x10d)](_0x5751cc){const _0x591509=a22_0x14a0ad,{options:_0x4ef92d,args:_0x43d91d}=_0x5751cc;console[_0x591509(0x111)](a22_0x2e6c6b[_0x591509(0xa3)](_0x591509(0xbf)));let _0x3ceb1c;if(_0x43d91d['length']>0x0&&_0x43d91d[0x0]){const _0x1eb407=_0x43d91d[0x0][_0x591509(0x9a)](),_0x101bc2=validateProfileName(_0x1eb407);if(_0x101bc2!==!![])return console[_0x591509(0xba)](a22_0x2e6c6b[_0x591509(0xf5)](_0x101bc2)),0x1;_0x3ceb1c=_0x1eb407;}else{const _0x3b8d99=await a22_0x5ca639({'type':_0x591509(0x9d),'name':_0x591509(0xbb),'message':'Enter\x20profile\x20name:','validate':validateProfileName});if(!_0x3b8d99[_0x591509(0xbb)])return console['log']('\x0aSetup\x20cancelled'),0x1;_0x3ceb1c=_0x3b8d99[_0x591509(0xbb)][_0x591509(0x9a)]();}const _0x1d8fbf=await a22_0x5ca639({'type':'text','name':'description','message':'Enter\x20description\x20(optional):'}),_0x115691=_0x1d8fbf[_0x591509(0xcc)]?.[_0x591509(0x9a)]()||undefined,_0x10fdfb=_0x4ef92d[_0x591509(0xc5)]||_0x591509(0x102),_0x12b38b=[{'title':_0x591509(0x103),'value':_0x591509(0x102)},{'title':_0x591509(0xec),'value':_0x591509(0xb6)},{'title':_0x591509(0xd6),'value':_0x591509(0xb4)},{'title':_0x591509(0x106),'value':_0x591509(0xd0)}];let _0x484cc0=_0x12b38b[_0x591509(0xee)](_0x355234=>_0x355234['value']===_0x10fdfb);_0x484cc0===-0x1&&_0x10fdfb!=='us01'&&(_0x12b38b[_0x591509(0xfd)]({'title':_0x10fdfb,'value':_0x10fdfb}),_0x484cc0=_0x12b38b['length']-0x1);_0x12b38b['push']({'title':_0x591509(0xca),'value':_0x591509(0xf1)});const _0x33d265=await a22_0x5ca639({'type':_0x591509(0xe2),'name':_0x591509(0xc5),'message':_0x591509(0xb5)+_0x3ceb1c+'\x27:','choices':_0x12b38b,'initial':_0x484cc0>=0x0?_0x484cc0:0x0});if(!_0x33d265[_0x591509(0xc5)])return console[_0x591509(0x111)](_0x591509(0xaa)),0x1;let _0x407a26;if(_0x33d265[_0x591509(0xc5)]===_0x591509(0xf1)){const _0x474df8=await a22_0x5ca639({'type':_0x591509(0x9d),'name':_0x591509(0xf6),'message':_0x591509(0xff),'initial':_0x591509(0x102),'validate':_0x42f640=>{const _0x4c6f19=_0x591509;if(!_0x42f640||!_0x42f640[_0x4c6f19(0x9a)]())return'Site\x20name\x20cannot\x20be\x20empty';if(!/^[a-z0-9-]+$/[_0x4c6f19(0xad)](_0x42f640[_0x4c6f19(0x9a)]()))return _0x4c6f19(0xbe);return!![];}});if(!_0x474df8[_0x591509(0xf6)])return console['log'](_0x591509(0xaa)),0x1;_0x407a26=_0x474df8['customSite'];}else _0x407a26=_0x33d265['site'];const _0x5473c5=resolveSite(_0x407a26);console[_0x591509(0x111)](_0x591509(0xe4)+_0x5473c5),console[_0x591509(0x111)](_0x591509(0xf0)),console[_0x591509(0x111)]('\x20\x20'+getConsoleUrl(_0x5473c5,'/app/mp/ak'));const _0x11a92b=await a22_0x5ca639({'type':_0x591509(0xd5),'name':_0x591509(0xb9),'message':_0x591509(0xc8),'validate':_0x58c9fb=>{if(!_0x58c9fb||!_0x58c9fb['trim']())return'API\x20key\x20cannot\x20be\x20empty';return!![];}});if(!_0x11a92b[_0x591509(0xb9)])return console['log']('\x0aSetup\x20cancelled'),0x1;const _0x501a81=_0x11a92b[_0x591509(0xb9)];console[_0x591509(0x111)](_0x591509(0x104));try{const _0x128b3c=TDX['create']({'site':_0x5473c5,'apiKey':_0x501a81[_0x591509(0x9a)](),'logLevel':_0x4ef92d[_0x591509(0xdb)]??LogLevel[_0x591509(0xe1)]}),_0x42ccb6=await _0x128b3c['jobs'][_0x591509(0x110)]();console[_0x591509(0x111)](a22_0x2e6c6b[_0x591509(0x107)]('✓')+_0x591509(0xd3)+_0x42ccb6['email']+')');const _0x541616=await isKeychainAvailable();_0x541616?(await saveAPIKeyAsync(_0x501a81[_0x591509(0x9a)](),_0x5473c5,_0x3ceb1c),console[_0x591509(0x111)](a22_0x2e6c6b[_0x591509(0x107)]('✓')+'\x20API\x20key\x20saved\x20to\x20system\x20keychain\x20(profile:\x20'+_0x3ceb1c+')')):(console['warn'](a22_0x2e6c6b['yellow'](_0x591509(0xed))),console[_0x591509(0xa0)](a22_0x2e6c6b['yellow'](_0x591509(0xc0))));const _0x590439={'site':_0x5473c5,..._0x115691&&{'description':_0x115691}};return saveProfileToUserConfig(_0x3ceb1c,_0x590439),console[_0x591509(0x111)](a22_0x2e6c6b[_0x591509(0x107)]('✓')+_0x591509(0x101)+_0x3ceb1c+_0x591509(0xfb)),console['log'](),console[_0x591509(0x111)](_0x591509(0xaf)),console['log'](_0x591509(0xea)+_0x3ceb1c+'\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication'),console['log'](_0x591509(0xea)+_0x3ceb1c+_0x591509(0xc3)),0x0;}catch(_0x24d9b6){if(_0x24d9b6 instanceof HTTPClientError&&_0x24d9b6[_0x591509(0xde)]===0x191)return printAuthError(_0x24d9b6),0x1;return console[_0x591509(0xba)](a22_0x2e6c6b[_0x591509(0xf5)](_0x591509(0x9f)+(_0x24d9b6 instanceof Error?_0x24d9b6['message']:String(_0x24d9b6)))),console['error'](_0x591509(0x9e)),0x1;}}}export class ProfileRemoveCommand extends BaseCommand{[a22_0x14a0ad(0xd2)]=a22_0x14a0ad(0xb1);['description']=a22_0x14a0ad(0xab);[a22_0x14a0ad(0xac)](_0x27a750){const _0x4f831f=a22_0x14a0ad,{args:_0x108009}=_0x27a750;if(_0x108009[_0x4f831f(0xa9)]===0x0)return _0x4f831f(0xcf);return undefined;}async[a22_0x14a0ad(0x10d)](_0x3376ba){const _0x277c2a=a22_0x14a0ad,{args:_0x572399}=_0x3376ba,_0x3d2efa=_0x572399[0x0];console['log'](a22_0x2e6c6b['bold'](_0x277c2a(0xc4)));if(!profileExists(_0x3d2efa)){console[_0x277c2a(0xba)](a22_0x2e6c6b[_0x277c2a(0xf5)]('Profile\x20\x27'+_0x3d2efa+'\x27\x20does\x20not\x20exist.')),console['log'](_0x277c2a(0xc2));const _0x6c8882=listProfiles();if(_0x6c8882[_0x277c2a(0xa9)]===0x0)console['log'](_0x277c2a(0x10a));else for(const _0x3ff302 of _0x6c8882){console[_0x277c2a(0x111)](_0x277c2a(0xce)+_0x3ff302[_0x277c2a(0xd2)]);}return 0x1;}const _0x1c7f7b=await a22_0x5ca639({'type':_0x277c2a(0xa4),'name':_0x277c2a(0xa4),'message':'Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20profile\x20\x27'+_0x3d2efa+'\x27?','initial':![]});if(!_0x1c7f7b[_0x277c2a(0xa4)])return console[_0x277c2a(0x111)](_0x277c2a(0x10c)),0x0;try{removeProfileFromUserConfig(_0x3d2efa),console[_0x277c2a(0x111)](a22_0x2e6c6b[_0x277c2a(0x107)]('✓')+_0x277c2a(0x101)+_0x3d2efa+_0x277c2a(0xa6));}catch(_0xa065e4){return console[_0x277c2a(0xba)](a22_0x2e6c6b[_0x277c2a(0xf5)]('Failed\x20to\x20remove\x20profile:\x20'+(_0xa065e4 instanceof Error?_0xa065e4[_0x277c2a(0xf2)]:String(_0xa065e4)))),0x1;}const _0xbd10fe=await isKeychainAvailable();if(_0xbd10fe){const _0x1a1a80=await deleteKeychainAPIKey(_0x3d2efa);_0x1a1a80&&console[_0x277c2a(0x111)](a22_0x2e6c6b[_0x277c2a(0x107)]('✓')+_0x277c2a(0xc9));}return 0x0;}}export class ProfileSetCommand extends BaseCommand{[a22_0x14a0ad(0xd2)]='profile:set';[a22_0x14a0ad(0xcc)]=a22_0x14a0ad(0x105);static [a22_0x14a0ad(0xda)]=[a22_0x14a0ad(0xc5),a22_0x14a0ad(0xa7),a22_0x14a0ad(0xc6),'llm_project',a22_0x14a0ad(0xe0),a22_0x14a0ad(0xcc)];['validate'](_0x1e2503){const _0x5bbbfd=a22_0x14a0ad,{args:_0x281f10,options:_0x38a473}=_0x1e2503,_0x485b96=_0x38a473[_0x5bbbfd(0xd1)]||getActiveProfile();if(!_0x485b96)return _0x5bbbfd(0xfc);if(_0x281f10['length']===0x0)return _0x5bbbfd(0xe9)+ProfileSetCommand['VALID_KEYS'][_0x5bbbfd(0x98)](',\x20');const _0x2379ae=_0x281f10[0x0];if(!_0x2379ae[_0x5bbbfd(0xf8)]('='))return'Invalid\x20format.\x20Use:\x20tdx\x20profile\x20set\x20[--profile\x20<name>]\x20<key>=<value>\x0a\x0aValid\x20keys:\x20'+ProfileSetCommand[_0x5bbbfd(0xda)][_0x5bbbfd(0x98)](',\x20');const [_0x18ffdd]=_0x2379ae['split']('=',0x2);if(!ProfileSetCommand['VALID_KEYS'][_0x5bbbfd(0xf8)](_0x18ffdd))return _0x5bbbfd(0xbd)+_0x18ffdd+_0x5bbbfd(0x100)+ProfileSetCommand[_0x5bbbfd(0xda)][_0x5bbbfd(0x98)](',\x20');return undefined;}async['execute'](_0x38551d){const _0x45961c=a22_0x14a0ad,{args:_0x1a93f8,options:_0x291eb9}=_0x38551d,_0x2cbea6=_0x291eb9['profile']||getActiveProfile(),[_0x1b20d8,..._0x71b929]=_0x1a93f8[0x0][_0x45961c(0xd9)]('='),_0xae3e54=_0x71b929['join']('=');console[_0x45961c(0x111)](a22_0x2e6c6b[_0x45961c(0xa3)](_0x45961c(0xb7)));if(!profileExists(_0x2cbea6)){const _0x274344=await a22_0x5ca639({'type':_0x45961c(0xa4),'name':_0x45961c(0xc1),'message':_0x45961c(0xae)+_0x2cbea6+_0x45961c(0x10b),'initial':!![]});if(!_0x274344[_0x45961c(0xc1)])return console['log'](_0x45961c(0xdc)),0x1;}const _0x1fa201=loadProfile(_0x2cbea6),_0x50ad79=_0x1fa201?.[_0x45961c(0xcb)]||{};if(_0x1b20d8==='site'){const _0x114da2=resolveSite(_0xae3e54);console[_0x45961c(0x111)](_0x45961c(0xa5)+_0x114da2+'\x27\x20requires\x20API\x20key\x20validation.'),console[_0x45961c(0x111)](_0x45961c(0xd8)),console['log']('\x20\x20'+getConsoleUrl(_0x114da2,'/app/mp/ak'));const _0x119b4f=await a22_0x5ca639({'type':_0x45961c(0xd5),'name':_0x45961c(0xb9),'message':_0x45961c(0x10e),'validate':_0xf5cfa1=>{const _0x35cb23=_0x45961c;if(!_0xf5cfa1||!_0xf5cfa1[_0x35cb23(0x9a)]())return _0x35cb23(0xe7);return!![];}});if(!_0x119b4f[_0x45961c(0xb9)])return console['log'](_0x45961c(0xe6)),0x1;console['log'](_0x45961c(0x104));try{const _0x5b01b8=TDX[_0x45961c(0xc1)]({'site':_0x114da2,'apiKey':_0x119b4f[_0x45961c(0xb9)][_0x45961c(0x9a)](),'logLevel':_0x291eb9['logLevel']??LogLevel[_0x45961c(0xe1)]}),_0x94c569=await _0x5b01b8[_0x45961c(0xeb)][_0x45961c(0x110)]();console['log'](a22_0x2e6c6b[_0x45961c(0x107)]('✓')+_0x45961c(0xd3)+_0x94c569['email']+')');const _0x244083=await isKeychainAvailable();_0x244083?(await saveAPIKeyAsync(_0x119b4f[_0x45961c(0xb9)][_0x45961c(0x9a)](),_0x114da2,_0x2cbea6),console['log'](a22_0x2e6c6b[_0x45961c(0x107)]('✓')+_0x45961c(0xe3))):console[_0x45961c(0xa0)](a22_0x2e6c6b['yellow'](_0x45961c(0xed))),_0x50ad79['site']=_0x114da2;}catch(_0x352d0e){if(_0x352d0e instanceof HTTPClientError&&_0x352d0e[_0x45961c(0xde)]===0x191)return printAuthError(_0x352d0e),0x1;return console[_0x45961c(0xba)](a22_0x2e6c6b[_0x45961c(0xf5)](_0x45961c(0x9f)+(_0x352d0e instanceof Error?_0x352d0e[_0x45961c(0xf2)]:String(_0x352d0e)))),console[_0x45961c(0xba)]('Site\x20was\x20not\x20changed.'),0x1;}}else _0x50ad79[_0x1b20d8]=_0xae3e54||undefined;return saveProfileToUserConfig(_0x2cbea6,_0x50ad79),console['log'](a22_0x2e6c6b[_0x45961c(0x107)]('✓')+_0x45961c(0x101)+_0x2cbea6+_0x45961c(0xe5)+_0x1b20d8+'='+(_0xae3e54||'(cleared)')),0x0;}}export class ProfileUseCommand extends BaseCommand{[a22_0x14a0ad(0xd2)]=a22_0x14a0ad(0xfe);['description']=a22_0x14a0ad(0xf9);[a22_0x14a0ad(0xac)](_0x2d50eb){const _0x39a537=a22_0x14a0ad,{args:_0x511467}=_0x2d50eb;if(_0x511467['length']===0x0)return _0x39a537(0x10f);return undefined;}async[a22_0x14a0ad(0x10d)](_0x330a4d){const _0x1a82e8=a22_0x14a0ad,{args:_0x1836c9,options:_0x2f291e}=_0x330a4d,_0x577d68=_0x1836c9[0x0],_0x3e7e7b=_0x2f291e[_0x1a82e8(0xb0)];cleanExpiredSessions();if(!profileExists(_0x577d68)){console[_0x1a82e8(0xba)](a22_0x2e6c6b['red']('Profile\x20\x27'+_0x577d68+'\x27\x20does\x20not\x20exist.')),console[_0x1a82e8(0x111)]('\x0aAvailable\x20profiles:');const _0x5d3987=listProfiles();if(_0x5d3987[_0x1a82e8(0xa9)]===0x0)console[_0x1a82e8(0x111)](_0x1a82e8(0x10a));else for(const _0x33f432 of _0x5d3987){console[_0x1a82e8(0x111)](_0x1a82e8(0xce)+_0x33f432[_0x1a82e8(0xd2)]);}return 0x1;}if(_0x3e7e7b){const _0x5ad57d=a22_0x14d041[_0x1a82e8(0x98)](getConfigDir(),_0x1a82e8(0xdd));return saveActiveProfileToUserConfig(_0x577d68),console[_0x1a82e8(0x111)](_0x1a82e8(0xa1)+a22_0x2e6c6b[_0x1a82e8(0x107)](_0x577d68)),console['log'](a22_0x2e6c6b[_0x1a82e8(0xef)](_0x1a82e8(0xa2)+_0x5ad57d)),0x0;}const _0x4dae22=_0x2f291e[_0x1a82e8(0x9b)]||getCurrentSessionPID()[_0x1a82e8(0xbc)]();return saveSessionContext({'profile':_0x577d68},_0x2f291e[_0x1a82e8(0x9b)]),console[_0x1a82e8(0x111)]('Session\x20profile\x20set\x20to:\x20'+a22_0x2e6c6b[_0x1a82e8(0x107)](_0x577d68)+'\x20'+a22_0x2e6c6b[_0x1a82e8(0xef)](_0x1a82e8(0xe8)+_0x4dae22+')')),console[_0x1a82e8(0x111)](a22_0x2e6c6b[_0x1a82e8(0xef)](_0x1a82e8(0xdf)+_0x577d68+_0x1a82e8(0xb3))),0x0;}}
@@ -1 +1 @@
1
- {"version":3,"file":"profile-command.js","sourceRoot":"","sources":["../../src/commands/profile-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAuB,cAAc,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,gBAAgB,GAEjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,GACrB,MAA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,_0x2cd02e){_0x388f24=_0x388f24-0x12c;const _0x3b4d81=a23_0x3b4d();let _0x1f3201=_0x3b4d81[_0x388f24];return _0x1f3201;}const a23_0x186193=a23_0x1f32;(function(_0x1459d8,_0x31dbc9){const _0xda9960=a23_0x1f32,_0x172460=_0x1459d8();while(!![]){try{const _0x59f15e=-parseInt(_0xda9960(0x143))/0x1*(-parseInt(_0xda9960(0x13a))/0x2)+parseInt(_0xda9960(0x131))/0x3+-parseInt(_0xda9960(0x13e))/0x4+parseInt(_0xda9960(0x13d))/0x5*(parseInt(_0xda9960(0x139))/0x6)+-parseInt(_0xda9960(0x140))/0x7*(-parseInt(_0xda9960(0x13c))/0x8)+parseInt(_0xda9960(0x12f))/0x9+parseInt(_0xda9960(0x137))/0xa*(-parseInt(_0xda9960(0x135))/0xb);if(_0x59f15e===_0x31dbc9)break;else _0x172460['push'](_0x172460['shift']());}catch(_0x5756b7){_0x172460['push'](_0x172460['shift']());}}}(a23_0x3b4d,0xaee11));import{BaseCommand}from'./command.js';function a23_0x3b4d(){const _0xcc1b13=['7OnCFgs','scope','Error:\x20','1ezGBRM','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','length','description','1072026pSZzqf','\x20\x20Global:\x20~/.config/tdx/tdx.json','4064424MTYkbD','config','log','execute','792imIYic','name','258260pEZJZM','map','12pXQYQz','734434xSOOUq','profiles','1691320rwYtAq','3404330fGTBpx','3354036HkFpHz','No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a'];a23_0x3b4d=function(){return _0xcc1b13;};return a23_0x3b4d();}import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../core/command-output.js';export class ProfilesCommand extends BaseCommand{['name']=a23_0x186193(0x13b);[a23_0x186193(0x12e)]='List\x20all\x20available\x20profiles';async[a23_0x186193(0x134)](_0xfba1c4){const _0x47c186=a23_0x186193,{options:_0xccf24e}=_0xfba1c4;try{const _0x5be8a2=listProfiles(),_0x4cbb36=getActiveProfile();if(_0x5be8a2[_0x47c186(0x12d)]===0x0)return console[_0x47c186(0x133)](_0x47c186(0x13f)),console['log'](_0x47c186(0x12c)),console[_0x47c186(0x133)](_0x47c186(0x130)),0x0;const _0x4d41d2=_0x5be8a2[_0x47c186(0x138)](_0x42e976=>{const _0xc535e7=_0x47c186,_0x42629e=_0x42e976[_0xc535e7(0x136)]===_0x4cbb36,_0x207a9d=getProfileParams(_0x42e976[_0xc535e7(0x132)]);return{'name':_0x42e976[_0xc535e7(0x136)],'active':_0x42629e,'scope':_0x42e976[_0xc535e7(0x141)],'description':_0x42e976[_0xc535e7(0x132)][_0xc535e7(0x12e)]||'','params':_0x207a9d};});return await handleSDKOutput(_0x4d41d2,_0xccf24e),0x0;}catch(_0x546945){return _0x546945 instanceof Error&&console['error'](_0x47c186(0x142)+_0x546945['message']),0x1;}}}
1
+ const a23_0x3b7964=a23_0x33e2;function a23_0x33e2(_0x17a029,_0x56c21a){_0x17a029=_0x17a029-0x17d;const _0x56f91d=a23_0x56f9();let _0x33e258=_0x56f91d[_0x17a029];return _0x33e258;}(function(_0x3f857d,_0x54720e){const _0x5345e2=a23_0x33e2,_0x4514ae=_0x3f857d();while(!![]){try{const _0x4bef64=-parseInt(_0x5345e2(0x180))/0x1+parseInt(_0x5345e2(0x190))/0x2+parseInt(_0x5345e2(0x189))/0x3+-parseInt(_0x5345e2(0x191))/0x4*(parseInt(_0x5345e2(0x188))/0x5)+-parseInt(_0x5345e2(0x192))/0x6+parseInt(_0x5345e2(0x187))/0x7*(-parseInt(_0x5345e2(0x18f))/0x8)+parseInt(_0x5345e2(0x18a))/0x9*(parseInt(_0x5345e2(0x17d))/0xa);if(_0x4bef64===_0x54720e)break;else _0x4514ae['push'](_0x4514ae['shift']());}catch(_0x163ebe){_0x4514ae['push'](_0x4514ae['shift']());}}}(a23_0x56f9,0x8ed2e));import{BaseCommand}from'./command.js';import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../core/command-output.js';export class ProfilesCommand extends BaseCommand{[a23_0x3b7964(0x182)]='profiles';[a23_0x3b7964(0x186)]=a23_0x3b7964(0x18e);async['execute'](_0x560791){const _0x478657=a23_0x3b7964,{options:_0x25a99e}=_0x560791;try{const _0x195349=listProfiles(),_0x180efa=getActiveProfile();if(_0x195349[_0x478657(0x184)]===0x0)return console[_0x478657(0x18c)](_0x478657(0x185)),console[_0x478657(0x18c)](_0x478657(0x181)),console[_0x478657(0x18c)](_0x478657(0x17e)),0x0;const _0x13c939=_0x195349[_0x478657(0x193)](_0x4be489=>{const _0x16b500=_0x478657,_0x2ea346=_0x4be489[_0x16b500(0x182)]===_0x180efa,_0x27fcbc=getProfileParams(_0x4be489['config']);return{'name':_0x4be489[_0x16b500(0x182)],'active':_0x2ea346,'scope':_0x4be489[_0x16b500(0x18b)],'description':_0x4be489[_0x16b500(0x183)]['description']||'','params':_0x27fcbc};});return await handleSDKOutput(_0x13c939,_0x25a99e),0x0;}catch(_0x465b17){return _0x465b17 instanceof Error&&console[_0x478657(0x18d)](_0x478657(0x17f)+_0x465b17[_0x478657(0x194)]),0x1;}}}function a23_0x56f9(){const _0x5d1a73=['No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a','description','14MYXNle','5LczcYu','990918EflhQK','45Taqdom','scope','log','error','List\x20all\x20available\x20profiles','2304328kAUkXh','834272mOaeYN','1889796JGybXZ','823452sZNFbG','map','message','2248930fDwugX','\x20\x20Global:\x20~/.config/tdx/tdx.json','Error:\x20','101128tOhFak','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','name','config','length'];a23_0x56f9=function(){return _0x5d1a73;};return a23_0x56f9();}
@@ -1 +1 @@
1
- const a24_0xafee6c=a24_0xba19;function a24_0x13a4(){const _0x34bf3e=['1098412bqKXys','site','state','Executing\x20query\x20[','6983019izbOOS','output','totalSplits','setJobId','message','length','10beTOqi','stats','...','19914059hhzaOt','5kvmNKd','\x20rows\x20','completedSplits','name','631716kferBt','Error:\x20','6dSKirj','catalog','SQL:\x20','processedRows','No\x20SQL\x20provided','\x20[Job\x20ID:\x20','elapsedTimeMillis','error','Executing\x20query...','args','execute','data','Schema:\x20','Catalog:\x20','query','options','Statement\x20','validate','in\x20','12014512FtFvuu','information_schema','database','\x20-\x20','2ApLksh','file','842463filcHV','Run\x20Trino\x20queries\x20(streaming)','5818127ZkKnAS','setExtra'];a24_0x13a4=function(){return _0x34bf3e;};return a24_0x13a4();}(function(_0xa6bc92,_0x4d22c3){const _0x84c1c7=a24_0xba19,_0x1fc108=_0xa6bc92();while(!![]){try{const _0x24277c=parseInt(_0x84c1c7(0xee))/0x1*(parseInt(_0x84c1c7(0x106))/0x2)+parseInt(_0x84c1c7(0xf0))/0x3+-parseInt(_0x84c1c7(0xf4))/0x4*(-parseInt(_0x84c1c7(0x102))/0x5)+-parseInt(_0x84c1c7(0x108))/0x6*(parseInt(_0x84c1c7(0xf2))/0x7)+parseInt(_0x84c1c7(0xea))/0x8+parseInt(_0x84c1c7(0xf8))/0x9+-parseInt(_0x84c1c7(0xfe))/0xa*(parseInt(_0x84c1c7(0x101))/0xb);if(_0x24277c===_0x4d22c3)break;else _0x1fc108['push'](_0x1fc108['shift']());}catch(_0x492bff){_0x1fc108['push'](_0x1fc108['shift']());}}}(a24_0x13a4,0xc9013));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../core/command-output.js';import{readSqlStatementsFromFile,readSqlStatementsFromStdin,splitSqlStatements,isSqlFilePath}from'../sdk/query/sql-parser.js';import{writeFileSync}from'fs';import{withProgressSpinner,formatElapsed}from'../utils/spinner.js';function a24_0xba19(_0x529ad1,_0x28d9bc){_0x529ad1=_0x529ad1-0xdc;const _0x13a4f0=a24_0x13a4();let _0xba19e4=_0x13a4f0[_0x529ad1];return _0xba19e4;}import{formatRows}from'../sdk/util/formatters.js';export class QueryCommand extends BaseCommand{[a24_0xafee6c(0x105)]=a24_0xafee6c(0xe5);['description']=a24_0xafee6c(0xf1);async[a24_0xafee6c(0xe1)](_0x2149ec){const _0x5098e8=a24_0xafee6c,{options:_0x22b08b,args:_0x5c477b,tdx:_0x2c34cb}=_0x2149ec,_0x712abd=_0x5c477b[0x0],_0xfcba14=_0x22b08b[_0x5098e8(0xef)];let _0xeadf8c;try{if(_0xfcba14)_0xeadf8c=readSqlStatementsFromFile(_0xfcba14);else{if(_0x712abd==='-')_0xeadf8c=await readSqlStatementsFromStdin();else{if(_0x712abd&&isSqlFilePath(_0x712abd))_0xeadf8c=readSqlStatementsFromFile(_0x712abd);else{if(_0x712abd)_0xeadf8c=splitSqlStatements(_0x712abd);else throw new Error(_0x5098e8(0x10c));}}}}catch(_0x51c911){return console['error'](_0x5098e8(0x107)+_0x51c911[_0x5098e8(0xfc)]),0x1;}const _0x1e39de=_0x22b08b[_0x5098e8(0xec)]||_0x5098e8(0xeb),_0x244aec=_0x22b08b[_0x5098e8(0x109)];try{const _0x239b00=[],_0x49d048=!!_0x22b08b[_0x5098e8(0xf9)];for(let _0x4ded98=0x0;_0x4ded98<_0xeadf8c[_0x5098e8(0xfd)];_0x4ded98++){const _0x41366f=_0xeadf8c[_0x4ded98],_0x475d2f=_0x4ded98+0x1,_0x19ff6d=_0xeadf8c[_0x5098e8(0xfd)],_0x21f6ff=_0x19ff6d>0x1;_0x22b08b['verbose']&&(console['error']('\x0a'+(_0x21f6ff?_0x5098e8(0xe7)+_0x475d2f+'/'+_0x19ff6d+':':'')),console[_0x5098e8(0xde)]('Site:\x20'+_0x22b08b[_0x5098e8(0xf5)]),console[_0x5098e8(0xde)](_0x5098e8(0xe4)+(_0x244aec||'td')),console[_0x5098e8(0xde)](_0x5098e8(0xe3)+_0x1e39de),console[_0x5098e8(0xde)](_0x5098e8(0x10a)+_0x41366f));const _0x5a5f8c=_0x21f6ff?'Executing\x20statement\x20'+_0x475d2f+'/'+_0x19ff6d+_0x5098e8(0x100):_0x5098e8(0xdf);try{const _0x7d990e=await withProgressSpinner(_0x5a5f8c,async _0x5b4676=>{const _0x158628=_0x5098e8,_0x16ff0c=await _0x2c34cb['query'][_0x158628(0xe1)](_0x41366f,{'catalog':_0x244aec,'schema':_0x1e39de,'onJobId':_0x3082e1=>{const _0x2fa51d=_0x158628;_0x5b4676[_0x2fa51d(0xfb)](_0x3082e1);},'onProgress':_0xc8a564=>{const _0x3734aa=_0x158628;_0x5b4676['setPhase'](_0x3734aa(0xf7)+_0xc8a564[_0x3734aa(0xf6)]+']'),_0x5b4676[_0x3734aa(0xf3)](formatRows(_0xc8a564[_0x3734aa(0x10b)])+_0x3734aa(0x103)+_0xc8a564[_0x3734aa(0x104)]+'/'+_0xc8a564[_0x3734aa(0xfa)]+'\x20splits');}});return _0x16ff0c;},{'verbose':_0x22b08b['verbose']}),_0x499428=_0x7d990e[_0x5098e8(0xe2)],_0x21719d=_0x499428['jobId']?_0x5098e8(0xdc)+_0x499428['jobId']+']':'',_0xd98b59=_0x21f6ff?'Statement\x20'+_0x475d2f+'/'+_0x19ff6d+_0x5098e8(0xed):'';console[_0x5098e8(0xde)]('✔\x20'+_0xd98b59+'Query\x20completed:\x20Processed\x20'+formatRows(_0x499428['stats'][_0x5098e8(0x10b)])+_0x5098e8(0x103)+(_0x5098e8(0xe9)+formatElapsed(_0x499428[_0x5098e8(0xff)][_0x5098e8(0xdd)])+_0x21719d));if(_0x21f6ff&&_0x49d048){const _0x1029a2=resolveOutputOptions(_0x22b08b),_0x190206=await formatQueryOutput(_0x499428,_0x1029a2);_0x239b00['push'](_0x190206);}else await handleQueryOutput(_0x499428,_0x22b08b);}catch(_0xa7f106){const _0x54ae6d=_0x21f6ff?_0x5098e8(0xe7)+_0x475d2f+'/'+_0x19ff6d+':\x0a':'',_0x13637a=_0xa7f106 instanceof SDKError?_0xa7f106['originalMessage']:_0xa7f106[_0x5098e8(0xfc)];return console['error'](''+_0x54ae6d+_0x13637a),0x1;}}if(_0xeadf8c[_0x5098e8(0xfd)]>0x1&&_0x49d048&&_0x239b00[_0x5098e8(0xfd)]>0x0){const _0x4f291a=_0x239b00['join']('\x0a');writeFileSync(_0x22b08b['output'],_0x4f291a),console['error']('\x0aAll\x20results\x20saved\x20to\x20'+_0x22b08b['output']);}return 0x0;}catch(_0x5e1f20){throw _0x5e1f20;}}[a24_0xafee6c(0xe8)](_0x4ae42f){const _0xac285b=a24_0xafee6c,_0x4bb30c=_0x4ae42f[_0xac285b(0xe0)][0x0],_0x29d801=_0x4ae42f[_0xac285b(0xe6)][_0xac285b(0xef)];if(!_0x4bb30c&&!_0x29d801)return'Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20query.sql\x0a\x20\x20\x20or:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options';if(_0x4bb30c&&_0x29d801)return'Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option';return undefined;}}
1
+ const a24_0x381c33=a24_0xea2d;(function(_0x73851c,_0x55370e){const _0x2151f0=a24_0xea2d,_0x364b20=_0x73851c();while(!![]){try{const _0x149a56=-parseInt(_0x2151f0(0x19d))/0x1*(-parseInt(_0x2151f0(0x18a))/0x2)+parseInt(_0x2151f0(0x1a3))/0x3+parseInt(_0x2151f0(0x199))/0x4+-parseInt(_0x2151f0(0x187))/0x5*(-parseInt(_0x2151f0(0x193))/0x6)+-parseInt(_0x2151f0(0x181))/0x7+parseInt(_0x2151f0(0x18d))/0x8*(-parseInt(_0x2151f0(0x1a5))/0x9)+parseInt(_0x2151f0(0x178))/0xa*(-parseInt(_0x2151f0(0x194))/0xb);if(_0x149a56===_0x55370e)break;else _0x364b20['push'](_0x364b20['shift']());}catch(_0x27b73a){_0x364b20['push'](_0x364b20['shift']());}}}(a24_0x53b3,0x7be86));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../core/command-output.js';import{readSqlStatementsFromFile,readSqlStatementsFromStdin,splitSqlStatements,isSqlFilePath}from'../sdk/query/sql-parser.js';import{writeFileSync}from'fs';function a24_0x53b3(){const _0x533904=['2TnkgeN','state','Site:\x20','78712tdZDCF','execute','validate','setExtra','length','message','3072282FVwOYl','3421AohiZK','options','Executing\x20query\x20[','setPhase','output','1547316DRWJwV','SQL:\x20','file','join','447036dPmUyP','originalMessage','setJobId','query','No\x20SQL\x20provided','Statement\x20','2174814QFLaAa','information_schema','171vAvozc','\x20splits','\x20rows\x20','data','Executing\x20query...','41660nAWagl','\x20-\x20','Query\x20completed:\x20Processed\x20','error','catalog','Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20query.sql\x0a\x20\x20\x20or:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options','stats','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','jobId','565299WWzCQX','push','Error:\x20','completedSplits','name','Catalog:\x20','5YuvPbB','elapsedTimeMillis','verbose'];a24_0x53b3=function(){return _0x533904;};return a24_0x53b3();}import{withProgressSpinner,formatElapsed}from'../utils/spinner.js';function a24_0xea2d(_0x15beca,_0x43439c){_0x15beca=_0x15beca-0x178;const _0x53b378=a24_0x53b3();let _0xea2dad=_0x53b378[_0x15beca];return _0xea2dad;}import{formatRows}from'../sdk/util/formatters.js';export class QueryCommand extends BaseCommand{[a24_0x381c33(0x185)]='query';['description']='Run\x20Trino\x20queries\x20(streaming)';async[a24_0x381c33(0x18e)](_0x7894ce){const _0x1b9d1d=a24_0x381c33,{options:_0x450a1d,args:_0x1f2b3e,tdx:_0x2c086b}=_0x7894ce,_0x548706=_0x1f2b3e[0x0],_0x4d5077=_0x450a1d[_0x1b9d1d(0x19b)];let _0x1a7c71;try{if(_0x4d5077)_0x1a7c71=readSqlStatementsFromFile(_0x4d5077);else{if(_0x548706==='-')_0x1a7c71=await readSqlStatementsFromStdin();else{if(_0x548706&&isSqlFilePath(_0x548706))_0x1a7c71=readSqlStatementsFromFile(_0x548706);else{if(_0x548706)_0x1a7c71=splitSqlStatements(_0x548706);else throw new Error(_0x1b9d1d(0x1a1));}}}}catch(_0x2acc05){return console[_0x1b9d1d(0x17b)](_0x1b9d1d(0x183)+_0x2acc05['message']),0x1;}const _0x3eb06b=_0x450a1d['database']||_0x1b9d1d(0x1a4),_0x130160=_0x450a1d[_0x1b9d1d(0x17c)];try{const _0x5dacb5=[],_0x58e37a=!!_0x450a1d['output'];for(let _0x291de6=0x0;_0x291de6<_0x1a7c71[_0x1b9d1d(0x191)];_0x291de6++){const _0x30e989=_0x1a7c71[_0x291de6],_0x4773d9=_0x291de6+0x1,_0x10525b=_0x1a7c71[_0x1b9d1d(0x191)],_0x18828e=_0x10525b>0x1;_0x450a1d[_0x1b9d1d(0x189)]&&(console[_0x1b9d1d(0x17b)]('\x0a'+(_0x18828e?_0x1b9d1d(0x1a2)+_0x4773d9+'/'+_0x10525b+':':'')),console[_0x1b9d1d(0x17b)](_0x1b9d1d(0x18c)+_0x450a1d['site']),console['error'](_0x1b9d1d(0x186)+(_0x130160||'td')),console[_0x1b9d1d(0x17b)]('Schema:\x20'+_0x3eb06b),console[_0x1b9d1d(0x17b)](_0x1b9d1d(0x19a)+_0x30e989));const _0x41cc9c=_0x18828e?'Executing\x20statement\x20'+_0x4773d9+'/'+_0x10525b+'...':_0x1b9d1d(0x1a9);try{const _0x4e3a57=await withProgressSpinner(_0x41cc9c,async _0x1392dd=>{const _0x511803=_0x1b9d1d,_0x4ef3b8=await _0x2c086b[_0x511803(0x1a0)][_0x511803(0x18e)](_0x30e989,{'catalog':_0x130160,'schema':_0x3eb06b,'onJobId':_0x3cb117=>{const _0x1c2d4f=_0x511803;_0x1392dd[_0x1c2d4f(0x19f)](_0x3cb117);},'onProgress':_0x49fc92=>{const _0x3a3931=_0x511803;_0x1392dd[_0x3a3931(0x197)](_0x3a3931(0x196)+_0x49fc92[_0x3a3931(0x18b)]+']'),_0x1392dd[_0x3a3931(0x190)](formatRows(_0x49fc92['processedRows'])+_0x3a3931(0x1a7)+_0x49fc92[_0x3a3931(0x184)]+'/'+_0x49fc92['totalSplits']+_0x3a3931(0x1a6));}});return _0x4ef3b8;},{'verbose':_0x450a1d[_0x1b9d1d(0x189)]}),_0x1aa660=_0x4e3a57[_0x1b9d1d(0x1a8)],_0x3b9baa=_0x1aa660[_0x1b9d1d(0x180)]?'\x20[Job\x20ID:\x20'+_0x1aa660['jobId']+']':'',_0x4c5b7d=_0x18828e?_0x1b9d1d(0x1a2)+_0x4773d9+'/'+_0x10525b+_0x1b9d1d(0x179):'';console[_0x1b9d1d(0x17b)]('✔\x20'+_0x4c5b7d+_0x1b9d1d(0x17a)+formatRows(_0x1aa660['stats']['processedRows'])+_0x1b9d1d(0x1a7)+('in\x20'+formatElapsed(_0x1aa660[_0x1b9d1d(0x17e)][_0x1b9d1d(0x188)])+_0x3b9baa));if(_0x18828e&&_0x58e37a){const _0x16c591=resolveOutputOptions(_0x450a1d),_0x276d95=await formatQueryOutput(_0x1aa660,_0x16c591);_0x5dacb5[_0x1b9d1d(0x182)](_0x276d95);}else await handleQueryOutput(_0x1aa660,_0x450a1d);}catch(_0x4a647b){const _0x3393eb=_0x18828e?_0x1b9d1d(0x1a2)+_0x4773d9+'/'+_0x10525b+':\x0a':'',_0x452312=_0x4a647b instanceof SDKError?_0x4a647b[_0x1b9d1d(0x19e)]:_0x4a647b[_0x1b9d1d(0x192)];return console[_0x1b9d1d(0x17b)](''+_0x3393eb+_0x452312),0x1;}}if(_0x1a7c71[_0x1b9d1d(0x191)]>0x1&&_0x58e37a&&_0x5dacb5[_0x1b9d1d(0x191)]>0x0){const _0xfe49fd=_0x5dacb5[_0x1b9d1d(0x19c)]('\x0a');writeFileSync(_0x450a1d[_0x1b9d1d(0x198)],_0xfe49fd),console[_0x1b9d1d(0x17b)]('\x0aAll\x20results\x20saved\x20to\x20'+_0x450a1d[_0x1b9d1d(0x198)]);}return 0x0;}catch(_0x3b4a7d){throw _0x3b4a7d;}}[a24_0x381c33(0x18f)](_0x53bf57){const _0x423784=a24_0x381c33,_0x14999d=_0x53bf57['args'][0x0],_0x24fa67=_0x53bf57[_0x423784(0x195)]['file'];if(!_0x14999d&&!_0x24fa67)return _0x423784(0x17d);if(_0x14999d&&_0x24fa67)return _0x423784(0x17f);return undefined;}}