@treasuredata/tdx 0.8.10 → 0.8.11

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 (131) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.d.ts +10 -1
  6. package/dist/client/cdp-api-client.d.ts.map +1 -1
  7. package/dist/client/cdp-api-client.js +1 -1
  8. package/dist/client/cdp-api-client.js.map +1 -1
  9. package/dist/client/engage-api-client.js +1 -1
  10. package/dist/client/http-client.js +1 -1
  11. package/dist/client/llm-api-client.js +1 -1
  12. package/dist/client/rate-limiter.js +1 -1
  13. package/dist/client/td-api-client.js +1 -1
  14. package/dist/client/trino-api-client.js +1 -1
  15. package/dist/client/workflow-client.js +1 -1
  16. package/dist/commands/activations.js +1 -1
  17. package/dist/commands/api-command.js +1 -1
  18. package/dist/commands/auth-command.js +1 -1
  19. package/dist/commands/chat-command.js +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-statusline-command.js +1 -1
  22. package/dist/commands/claude-usage-command.js +1 -1
  23. package/dist/commands/command.js +1 -1
  24. package/dist/commands/connection-command.js +1 -1
  25. package/dist/commands/context-command.js +1 -1
  26. package/dist/commands/databases.js +1 -1
  27. package/dist/commands/describe.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/llm-proxy.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pull-command.js +1 -1
  40. package/dist/commands/segment-push-command.d.ts.map +1 -1
  41. package/dist/commands/segment-push-command.js +1 -1
  42. package/dist/commands/segment-push-command.js.map +1 -1
  43. package/dist/commands/segment-update-command.js +1 -1
  44. package/dist/commands/segment-use-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/use-command.js +1 -1
  49. package/dist/commands/user-command.js +1 -1
  50. package/dist/commands/workflow-command.js +1 -1
  51. package/dist/core/auth.js +1 -1
  52. package/dist/core/config.js +1 -1
  53. package/dist/core/connection-cache.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/index.js +1 -1
  62. package/dist/proxy/anthropic-adapter.js +1 -1
  63. package/dist/proxy/claude-usage-tracker.js +1 -1
  64. package/dist/proxy/context-signature.js +1 -1
  65. package/dist/proxy/conversation-utils.js +1 -1
  66. package/dist/proxy/server.js +1 -1
  67. package/dist/proxy/session-cache.js +1 -1
  68. package/dist/sdk/api.js +1 -1
  69. package/dist/sdk/connection.js +1 -1
  70. package/dist/sdk/engage.js +1 -1
  71. package/dist/sdk/errors.js +1 -1
  72. package/dist/sdk/index.js +1 -1
  73. package/dist/sdk/job.js +1 -1
  74. package/dist/sdk/journey.d.ts +15 -1
  75. package/dist/sdk/journey.d.ts.map +1 -1
  76. package/dist/sdk/journey.js +1 -1
  77. package/dist/sdk/journey.js.map +1 -1
  78. package/dist/sdk/llm.js +1 -1
  79. package/dist/sdk/query.js +1 -1
  80. package/dist/sdk/segment/child-segment-yaml.d.ts +1 -1
  81. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  82. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  83. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  84. package/dist/sdk/segment/journey-yaml.d.ts +5 -0
  85. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  86. package/dist/sdk/segment/journey-yaml.js +1 -1
  87. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  88. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  89. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  90. package/dist/sdk/segment.js +1 -1
  91. package/dist/sdk/user.js +1 -1
  92. package/dist/sdk/workflow.js +1 -1
  93. package/dist/types/cdp.d.ts +37 -0
  94. package/dist/types/cdp.d.ts.map +1 -1
  95. package/dist/types/endpoints.js +1 -1
  96. package/dist/types/index.d.ts +1 -1
  97. package/dist/types/index.d.ts.map +1 -1
  98. package/dist/types/index.js +1 -1
  99. package/dist/utils/agent-ref-parser.js +1 -1
  100. package/dist/utils/async.js +1 -1
  101. package/dist/utils/chat-cache.js +1 -1
  102. package/dist/utils/colors.js +1 -1
  103. package/dist/utils/command-output.js +1 -1
  104. package/dist/utils/constants.js +1 -1
  105. package/dist/utils/diff.js +1 -1
  106. package/dist/utils/fields-display.js +1 -1
  107. package/dist/utils/file-permissions.js +1 -1
  108. package/dist/utils/format-detector.js +1 -1
  109. package/dist/utils/formatters.js +1 -1
  110. package/dist/utils/journey-utils.js +1 -1
  111. package/dist/utils/json-loader.js +1 -1
  112. package/dist/utils/llm-backup-utils.js +1 -1
  113. package/dist/utils/model-aliases.js +1 -1
  114. package/dist/utils/model-factors.js +1 -1
  115. package/dist/utils/option-validation.js +1 -1
  116. package/dist/utils/port.js +1 -1
  117. package/dist/utils/process.js +1 -1
  118. package/dist/utils/prompt.js +1 -1
  119. package/dist/utils/segment-path-parser.js +1 -1
  120. package/dist/utils/segment-ref-parser.js +1 -1
  121. package/dist/utils/spinner.js +1 -1
  122. package/dist/utils/sql-parser.js +1 -1
  123. package/dist/utils/sse-parser.js +1 -1
  124. package/dist/utils/string-utils.js +1 -1
  125. package/dist/utils/table-ref-parser.js +1 -1
  126. package/dist/utils/tdx-config.js +1 -1
  127. package/dist/utils/tdx-logger.js +1 -1
  128. package/dist/utils/tree-formatter.js +1 -1
  129. package/dist/utils/version-check.js +1 -1
  130. package/dist/utils/workflow-utils.js +1 -1
  131. package/package.json +1 -1
@@ -1 +1 @@
1
- const a30_0x542c6e=a30_0x4360;(function(_0x5dd640,_0xdd2467){const _0x43174e=a30_0x4360,_0x3bc5b1=_0x5dd640();while(!![]){try{const _0x3e9d77=-parseInt(_0x43174e(0x1d8))/0x1+parseInt(_0x43174e(0x1e7))/0x2*(-parseInt(_0x43174e(0x1dd))/0x3)+-parseInt(_0x43174e(0x1bd))/0x4+parseInt(_0x43174e(0x1d7))/0x5+-parseInt(_0x43174e(0x1d4))/0x6+parseInt(_0x43174e(0x1ca))/0x7*(-parseInt(_0x43174e(0x1d6))/0x8)+-parseInt(_0x43174e(0x1e1))/0x9*(-parseInt(_0x43174e(0x1bc))/0xa);if(_0x3e9d77===_0xdd2467)break;else _0x3bc5b1['push'](_0x3bc5b1['shift']());}catch(_0x563485){_0x3bc5b1['push'](_0x3bc5b1['shift']());}}}(a30_0x45f3,0x97adf));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a30_0x4360(_0x48aab6,_0x290557){_0x48aab6=_0x48aab6-0x1bc;const _0x45f32a=a30_0x45f3();let _0x436036=_0x45f32a[_0x48aab6];return _0x436036;}import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';import{readSqlStatementsFromFile,readSqlStatementsFromStdin,splitSqlStatements,isSqlFilePath}from'../utils/sql-parser.js';import{writeFileSync}from'fs';import{withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{formatRows}from'../utils/formatters.js';function a30_0x45f3(){const _0x1edecf=['file','validate','push','error','database','38uRLYcT','Executing\x20statement\x20','Schema:\x20','25740860NrVDry','1257680GWDoRm','Executing\x20query\x20[','stats','length','No\x20SQL\x20provided','site','totalSplits','data','Statement\x20','jobId','setJobId','Error:\x20','elapsedTimeMillis','35882qmXhpH','Executing\x20query...','Query\x20completed:\x20Processed\x20','\x20splits','processedRows','in\x20','name','information_schema','...','\x0aAll\x20results\x20saved\x20to\x20','4434384sytvfe','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','488MOyGgI','2113280LdGazk','45062STnBEt','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','\x20rows\x20','setPhase','completedSplits','152247xmTDyG','verbose','message','\x20-\x20','9qCnyen'];a30_0x45f3=function(){return _0x1edecf;};return a30_0x45f3();}export class QueryCommand extends BaseCommand{[a30_0x542c6e(0x1d0)]='query';['description']='Run\x20Trino\x20queries\x20(streaming)';async['execute'](_0x1973ba){const _0x2e50a5=a30_0x542c6e,{options:_0x5c6bc3,args:_0x33edff,tdx:_0x443406}=_0x1973ba,_0x53b485=_0x33edff[0x0],_0x4ad135=_0x5c6bc3['file'];let _0x278c36;try{if(_0x4ad135)_0x278c36=readSqlStatementsFromFile(_0x4ad135);else{if(_0x53b485==='-')_0x278c36=await readSqlStatementsFromStdin();else{if(_0x53b485&&isSqlFilePath(_0x53b485))_0x278c36=readSqlStatementsFromFile(_0x53b485);else{if(_0x53b485)_0x278c36=splitSqlStatements(_0x53b485);else throw new Error(_0x2e50a5(0x1c1));}}}}catch(_0xbb75a8){return console[_0x2e50a5(0x1e5)](_0x2e50a5(0x1c8)+_0xbb75a8['message']),0x1;}const _0x3dadc4=_0x5c6bc3[_0x2e50a5(0x1e6)]||_0x2e50a5(0x1d1),_0x1fe860=_0x5c6bc3['catalog'];try{const _0x4bdc9d=[],_0x3e8c8c=!!_0x5c6bc3['output'];for(let _0x5b47be=0x0;_0x5b47be<_0x278c36[_0x2e50a5(0x1c0)];_0x5b47be++){const _0x3432e1=_0x278c36[_0x5b47be],_0x29085a=_0x5b47be+0x1,_0x4c658b=_0x278c36[_0x2e50a5(0x1c0)],_0x519f89=_0x4c658b>0x1;_0x5c6bc3[_0x2e50a5(0x1de)]&&(console[_0x2e50a5(0x1e5)]('\x0a'+(_0x519f89?_0x2e50a5(0x1c5)+_0x29085a+'/'+_0x4c658b+':':'')),console[_0x2e50a5(0x1e5)]('Site:\x20'+_0x5c6bc3[_0x2e50a5(0x1c2)]),console[_0x2e50a5(0x1e5)]('Catalog:\x20'+(_0x1fe860||'td')),console[_0x2e50a5(0x1e5)](_0x2e50a5(0x1e9)+_0x3dadc4),console[_0x2e50a5(0x1e5)]('SQL:\x20'+_0x3432e1));const _0x390072=_0x519f89?_0x2e50a5(0x1e8)+_0x29085a+'/'+_0x4c658b+_0x2e50a5(0x1d2):_0x2e50a5(0x1cb);try{const _0x2cb4cc=await withQuerySpinner(_0x390072,async _0x225e09=>{const _0x4e69b3=await _0x443406['query']['execute'](_0x3432e1,{'catalog':_0x1fe860,'schema':_0x3dadc4,'onJobId':_0x222427=>{const _0xf33eea=a30_0x4360;_0x225e09[_0xf33eea(0x1c7)](_0x222427);},'onProgress':_0x211f77=>{const _0x42d8c2=a30_0x4360;_0x225e09[_0x42d8c2(0x1db)](_0x42d8c2(0x1be)+_0x211f77['state']+']'),_0x225e09['setExtra'](formatRows(_0x211f77[_0x42d8c2(0x1ce)])+_0x42d8c2(0x1da)+_0x211f77[_0x42d8c2(0x1dc)]+'/'+_0x211f77[_0x42d8c2(0x1c3)]+_0x42d8c2(0x1cd));}});return _0x4e69b3;},{'verbose':_0x5c6bc3[_0x2e50a5(0x1de)]}),_0xd1fd10=_0x2cb4cc[_0x2e50a5(0x1c4)],_0x57b84b=_0xd1fd10['jobId']?'\x20[Job\x20ID:\x20'+_0xd1fd10[_0x2e50a5(0x1c6)]+']':'',_0x520f0f=_0x519f89?'Statement\x20'+_0x29085a+'/'+_0x4c658b+_0x2e50a5(0x1e0):'';console[_0x2e50a5(0x1e5)]('✔\x20'+_0x520f0f+_0x2e50a5(0x1cc)+formatRows(_0xd1fd10['stats'][_0x2e50a5(0x1ce)])+_0x2e50a5(0x1da)+(_0x2e50a5(0x1cf)+formatElapsed(_0xd1fd10[_0x2e50a5(0x1bf)][_0x2e50a5(0x1c9)])+_0x57b84b));if(_0x519f89&&_0x3e8c8c){const _0x4d080a=resolveOutputOptions(_0x5c6bc3),_0x128802=await formatQueryOutput(_0xd1fd10,_0x4d080a);_0x4bdc9d[_0x2e50a5(0x1e4)](_0x128802);}else await handleQueryOutput(_0xd1fd10,_0x5c6bc3);}catch(_0x2ec035){const _0x50a625=_0x519f89?_0x2e50a5(0x1c5)+_0x29085a+'/'+_0x4c658b+':\x0a':'',_0x114b13=_0x2ec035 instanceof SDKError?_0x2ec035['originalMessage']:_0x2ec035[_0x2e50a5(0x1df)];return console[_0x2e50a5(0x1e5)](''+_0x50a625+_0x114b13),0x1;}}if(_0x278c36[_0x2e50a5(0x1c0)]>0x1&&_0x3e8c8c&&_0x4bdc9d[_0x2e50a5(0x1c0)]>0x0){const _0xe21c43=_0x4bdc9d['join']('\x0a');writeFileSync(_0x5c6bc3['output'],_0xe21c43),console['error'](_0x2e50a5(0x1d3)+_0x5c6bc3['output']);}return 0x0;}catch(_0x2a59ee){throw _0x2a59ee;}}[a30_0x542c6e(0x1e3)](_0x4d2561){const _0x57e337=a30_0x542c6e,_0x56d243=_0x4d2561['args'][0x0],_0x50dc17=_0x4d2561['options'][_0x57e337(0x1e2)];if(!_0x56d243&&!_0x50dc17)return _0x57e337(0x1d9);if(_0x56d243&&_0x50dc17)return _0x57e337(0x1d5);return undefined;}}
1
+ const a30_0x50deb6=a30_0x2c56;function a30_0x3e00(){const _0x9e4300=['elapsedTimeMillis','output','6laysvL','Executing\x20query\x20[','\x20rows\x20','stats','data','No\x20SQL\x20provided','79309TkRRRb','\x0aAll\x20results\x20saved\x20to\x20','Executing\x20query...','9406656gmOQOv','database','SQL:\x20','Executing\x20statement\x20','message','options','3FHwAKc','site','validate','originalMessage','\x20splits','1778112xLWiho','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','1375ZFEQXp','40NutvQX','setExtra','1942564dHjVcR','Error:\x20','in\x20','catalog','jobId','\x20-\x20','execute','Run\x20Trino\x20queries\x20(streaming)','args','totalSplits','length','Query\x20completed:\x20Processed\x20','description','8088aZdaIT','Statement\x20','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','query','setPhase','information_schema','2136920VrSTzU','file','completedSplits','processedRows','11400499dFNIhV','state','name','Site:\x20','error'];a30_0x3e00=function(){return _0x9e4300;};return a30_0x3e00();}(function(_0x20e933,_0x5bb845){const _0x3c7a13=a30_0x2c56,_0x1b55a3=_0x20e933();while(!![]){try{const _0x2f0b00=parseInt(_0x3c7a13(0x15c))/0x1*(parseInt(_0x3c7a13(0x156))/0x2)+-parseInt(_0x3c7a13(0x165))/0x3*(parseInt(_0x3c7a13(0x16f))/0x4)+parseInt(_0x3c7a13(0x16c))/0x5*(-parseInt(_0x3c7a13(0x17c))/0x6)+-parseInt(_0x3c7a13(0x16a))/0x7*(-parseInt(_0x3c7a13(0x16d))/0x8)+parseInt(_0x3c7a13(0x15f))/0x9+parseInt(_0x3c7a13(0x182))/0xa+-parseInt(_0x3c7a13(0x186))/0xb;if(_0x2f0b00===_0x5bb845)break;else _0x1b55a3['push'](_0x1b55a3['shift']());}catch(_0x20316d){_0x1b55a3['push'](_0x1b55a3['shift']());}}}(a30_0x3e00,0xd5695));function a30_0x2c56(_0x26b9e4,_0x34e883){_0x26b9e4=_0x26b9e4-0x156;const _0x3e0074=a30_0x3e00();let _0x2c5637=_0x3e0074[_0x26b9e4];return _0x2c5637;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';import{readSqlStatementsFromFile,readSqlStatementsFromStdin,splitSqlStatements,isSqlFilePath}from'../utils/sql-parser.js';import{writeFileSync}from'fs';import{withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{formatRows}from'../utils/formatters.js';export class QueryCommand extends BaseCommand{[a30_0x50deb6(0x188)]=a30_0x50deb6(0x17f);[a30_0x50deb6(0x17b)]=a30_0x50deb6(0x176);async[a30_0x50deb6(0x175)](_0x414a2e){const _0x4802a3=a30_0x50deb6,{options:_0x6ae740,args:_0x5af9d7,tdx:_0x215ec4}=_0x414a2e,_0x2cd631=_0x5af9d7[0x0],_0x15698b=_0x6ae740['file'];let _0x3984b1;try{if(_0x15698b)_0x3984b1=readSqlStatementsFromFile(_0x15698b);else{if(_0x2cd631==='-')_0x3984b1=await readSqlStatementsFromStdin();else{if(_0x2cd631&&isSqlFilePath(_0x2cd631))_0x3984b1=readSqlStatementsFromFile(_0x2cd631);else{if(_0x2cd631)_0x3984b1=splitSqlStatements(_0x2cd631);else throw new Error(_0x4802a3(0x15b));}}}}catch(_0x4c9dc1){return console['error'](_0x4802a3(0x170)+_0x4c9dc1[_0x4802a3(0x163)]),0x1;}const _0x1762b6=_0x6ae740[_0x4802a3(0x160)]||_0x4802a3(0x181),_0x41f849=_0x6ae740[_0x4802a3(0x172)];try{const _0x5b5f22=[],_0x3206c1=!!_0x6ae740[_0x4802a3(0x18c)];for(let _0x5a80f5=0x0;_0x5a80f5<_0x3984b1[_0x4802a3(0x179)];_0x5a80f5++){const _0x4c1816=_0x3984b1[_0x5a80f5],_0x355204=_0x5a80f5+0x1,_0x170a1e=_0x3984b1[_0x4802a3(0x179)],_0x1179f8=_0x170a1e>0x1;_0x6ae740['verbose']&&(console[_0x4802a3(0x18a)]('\x0a'+(_0x1179f8?_0x4802a3(0x17d)+_0x355204+'/'+_0x170a1e+':':'')),console[_0x4802a3(0x18a)](_0x4802a3(0x189)+_0x6ae740[_0x4802a3(0x166)]),console[_0x4802a3(0x18a)]('Catalog:\x20'+(_0x41f849||'td')),console[_0x4802a3(0x18a)]('Schema:\x20'+_0x1762b6),console[_0x4802a3(0x18a)](_0x4802a3(0x161)+_0x4c1816));const _0x180091=_0x1179f8?_0x4802a3(0x162)+_0x355204+'/'+_0x170a1e+'...':_0x4802a3(0x15e);try{const _0x1e0232=await withQuerySpinner(_0x180091,async _0x17072d=>{const _0x233002=_0x4802a3,_0x2f5a40=await _0x215ec4[_0x233002(0x17f)][_0x233002(0x175)](_0x4c1816,{'catalog':_0x41f849,'schema':_0x1762b6,'onJobId':_0x861341=>{_0x17072d['setJobId'](_0x861341);},'onProgress':_0x382d3a=>{const _0xb1058=_0x233002;_0x17072d[_0xb1058(0x180)](_0xb1058(0x157)+_0x382d3a[_0xb1058(0x187)]+']'),_0x17072d[_0xb1058(0x16e)](formatRows(_0x382d3a['processedRows'])+_0xb1058(0x158)+_0x382d3a[_0xb1058(0x184)]+'/'+_0x382d3a[_0xb1058(0x178)]+_0xb1058(0x169));}});return _0x2f5a40;},{'verbose':_0x6ae740['verbose']}),_0xc50492=_0x1e0232[_0x4802a3(0x15a)],_0x145b57=_0xc50492[_0x4802a3(0x173)]?'\x20[Job\x20ID:\x20'+_0xc50492[_0x4802a3(0x173)]+']':'',_0x5d9261=_0x1179f8?_0x4802a3(0x17d)+_0x355204+'/'+_0x170a1e+_0x4802a3(0x174):'';console[_0x4802a3(0x18a)]('✔\x20'+_0x5d9261+_0x4802a3(0x17a)+formatRows(_0xc50492[_0x4802a3(0x159)][_0x4802a3(0x185)])+_0x4802a3(0x158)+(_0x4802a3(0x171)+formatElapsed(_0xc50492[_0x4802a3(0x159)][_0x4802a3(0x18b)])+_0x145b57));if(_0x1179f8&&_0x3206c1){const _0x31e0b9=resolveOutputOptions(_0x6ae740),_0x5e0d30=await formatQueryOutput(_0xc50492,_0x31e0b9);_0x5b5f22['push'](_0x5e0d30);}else await handleQueryOutput(_0xc50492,_0x6ae740);}catch(_0x4ad5ff){const _0x2c6268=_0x1179f8?_0x4802a3(0x17d)+_0x355204+'/'+_0x170a1e+':\x0a':'',_0x512bbb=_0x4ad5ff instanceof SDKError?_0x4ad5ff[_0x4802a3(0x168)]:_0x4ad5ff[_0x4802a3(0x163)];return console[_0x4802a3(0x18a)](''+_0x2c6268+_0x512bbb),0x1;}}if(_0x3984b1[_0x4802a3(0x179)]>0x1&&_0x3206c1&&_0x5b5f22[_0x4802a3(0x179)]>0x0){const _0x536f3f=_0x5b5f22['join']('\x0a');writeFileSync(_0x6ae740[_0x4802a3(0x18c)],_0x536f3f),console[_0x4802a3(0x18a)](_0x4802a3(0x15d)+_0x6ae740['output']);}return 0x0;}catch(_0x4790b8){throw _0x4790b8;}}[a30_0x50deb6(0x167)](_0x3a4f15){const _0x53c3b5=a30_0x50deb6,_0x2aa4bc=_0x3a4f15[_0x53c3b5(0x177)][0x0],_0x50cef3=_0x3a4f15[_0x53c3b5(0x164)][_0x53c3b5(0x183)];if(!_0x2aa4bc&&!_0x50cef3)return _0x53c3b5(0x16b);if(_0x2aa4bc&&_0x50cef3)return _0x53c3b5(0x17e);return undefined;}}
@@ -1 +1 @@
1
- function a31_0x22f1(){const _0x4f7158=['cause','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','\x20rows\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','verbose','Resolving\x20\x27','Parent\x20name:\x20','22476NqGLUQ','segment:folder:list','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Folder\x20ID\x20missing\x20from\x20resolved\x20path','limit','Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.','data','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','resolvePathToResource','386544PicQlb','Resolved\x20type:\x20','Resolved\x20YAML\x20file:\x20','Fetching\x20parent\x20segment\x20details...','folderId','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','elapsedTimeMillis','155722KcRGhS','Fetching\x20folder\x20details...','✔\x20Created\x20folder\x20\x27','getParent','Error:\x20','parentSegment','Resolved\x20parent\x20folder\x20ID:\x20','724620AhtOPR','1188okOAUD','Use:\x20tdx\x20ps\x20show','createFolder','\x20\x20tdx\x20sg\x20sql\x20segments/my-audience/premium-users.yml','getFolder','Fetching\x20segment\x20details...','segment','✔\x20Query\x20completed:\x20Processed\x20','message','(root)','format','Folder\x20ID:\x20','segment:view','folderPath','error','Usage:\x20tdx\x20sg\x20show\x20<name>','2vpZUDn','segment:folder:create','Resolved\x20folder\x20ID:\x20','in\x20','parentId','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','/app/ps/','Segment\x20ID:\x20','Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]','SEGMENT_FOLDER_NOT_FOUND','293988JUpStB','55zQWjxd','jsonl','includes','10670eNOOWr','Get\x20SQL\x20query\x20for\x20child\x20segment','execute','Error:\x20Path\x20or\x20name\x20is\x20required','Show\x20folder\x20or\x20child\x20segment\x20details','site','\x20\x20Folder\x20path:\x20','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','segmentId','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','type','segment:folder:show','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','✖\x20Query\x20failed\x20[','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','length','INVALID_ARGUMENT','resolveParentId','url','segment:sql','fullPath','9giPSYP','segmentPath','Use:\x20tdx\x20ps\x20sql','\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml','json','SEGMENT_NOT_FOUND','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','\x27\x20with\x20ID:\x20','trim','information_schema','Examples:','\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22','folder','Segment\x20ID\x20missing\x20from\x20resolved\x20path','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','\x20\x20Cause:\x20','segment:describe','Parent\x20segment:\x20','Options:','query','Executing\x20segment\x20query...','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Folder\x20name:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','Resolving\x20parent\x20segment\x20\x27','name','Target\x20path:\x20','Resolving\x20parent\x20folder\x20\x27','\x27...','/e/','Site:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','Use:\x20tdx\x20ps\x20view','Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required','Resolving\x20folder\x20\x27','\x20\x20Segment\x20name:\x20','Parent\x20ID:\x20','Resolved\x20parent\x20ID:\x20','code','Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.','Fetching\x20folder\x20\x27','getSegmentSQL','description','216454kqBXPH','test','green','Use:\x20tdx\x20ps\x20desc','cyan','Usage:\x20tdx\x20segment\x20describe\x20<path>','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','log','Create\x20segment\x20folder\x20for\x20organization','Usage:\x20tdx\x20sg\x20sql\x20<name>','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Use:\x20tdx\x20ps\x20view\x20-w','\x20\x20Parent\x20segment:\x20','\x20[Job\x20ID:\x20','8ydtPJh','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','segment:desc','Fetching\x20SQL\x20for\x20segment...','Resolving\x20path\x20\x27','parent','parentFolder','getSegment','jobId','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','stats'];a31_0x22f1=function(){return _0x4f7158;};return a31_0x22f1();}const a31_0x2da761=a31_0x2621;function a31_0x2621(_0x51f5ac,_0x20bab0){_0x51f5ac=_0x51f5ac-0x75;const _0x22f186=a31_0x22f1();let _0x2621ab=_0x22f186[_0x51f5ac];return _0x2621ab;}(function(_0x12e61f,_0x4edcf7){const _0x3c81e0=a31_0x2621,_0x25bea6=_0x12e61f();while(!![]){try{const _0x4662bd=parseInt(_0x3c81e0(0x103))/0x1+parseInt(_0x3c81e0(0x80))/0x2*(-parseInt(_0x3c81e0(0x8a))/0x3)+parseInt(_0x3c81e0(0xfc))/0x4+-parseInt(_0x3c81e0(0x8b))/0x5*(parseInt(_0x3c81e0(0xf3))/0x6)+-parseInt(_0x3c81e0(0xd1))/0x7*(-parseInt(_0x3c81e0(0xe1))/0x8)+parseInt(_0x3c81e0(0xa5))/0x9*(parseInt(_0x3c81e0(0x10a))/0xa)+-parseInt(_0x3c81e0(0x8e))/0xb*(parseInt(_0x3c81e0(0x10b))/0xc);if(_0x4662bd===_0x4edcf7)break;else _0x25bea6['push'](_0x25bea6['shift']());}catch(_0x96dc24){_0x25bea6['push'](_0x25bea6['shift']());}}}(a31_0x22f1,0x1d6be));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';import{executeSchemaQuery}from'../utils/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../utils/segment-path-parser.js';import{getConsoleNextUrl}from'../types/endpoints.js';import{openBrowser}from'../utils/process.js';import a31_0x22ea07 from'chalk';function resolveSegmentTarget(_0x872580,_0x194581,_0xb2c597){const _0x203df9=a31_0x2621;if(isYamlFilePath(_0x872580))try{const _0x2bc500=resolveYamlFilePath(_0x872580);return _0xb2c597&&(console[_0x203df9(0x7e)](_0x203df9(0xfe)+_0x872580),console[_0x203df9(0x7e)](_0x203df9(0xdf)+_0x2bc500[_0x203df9(0x108)]),console[_0x203df9(0x7e)](_0x203df9(0xc9)+_0x2bc500['segmentName']),console[_0x203df9(0x7e)](_0x203df9(0x94)+(_0x2bc500[_0x203df9(0x7d)]||_0x203df9(0x79))),console[_0x203df9(0x7e)]('\x20\x20Full\x20path:\x20'+_0x2bc500['fullPath'])),_0x2bc500[_0x203df9(0xa4)];}catch(_0x9bc120){throw new SDKError(ErrorCode[_0x203df9(0xa0)],'Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20'+_0x9bc120[_0x203df9(0x78)]);}if(!_0x194581)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x203df9(0x95));return _0x194581+'/'+_0x872580;}export class SegmentDescribeCommand extends BaseCommand{[a31_0x2da761(0xbe)]=a31_0x2da761(0xb5);[a31_0x2da761(0xd0)]='Show\x20segment\x20or\x20folder\x20details';async['execute'](_0x1943e6){const _0x24a47d=a31_0x2da761,{options:_0x412697,args:_0x2c4eae,tdx:_0x513638}=_0x1943e6,_0x182d20=_0x2c4eae[0x0],_0x3160ce=!_0x182d20&&!!_0x412697[_0x24a47d(0x108)],_0x88415f=_0x182d20||_0x412697[_0x24a47d(0x108)];if(!_0x88415f)return console[_0x24a47d(0x7e)](_0x24a47d(0x91)),console[_0x24a47d(0x7e)](_0x24a47d(0xd6)),console[_0x24a47d(0x7e)](_0x24a47d(0xaf)),console[_0x24a47d(0x7e)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22'),console[_0x24a47d(0x7e)](_0x24a47d(0x9e)),console[_0x24a47d(0x7e)](_0x24a47d(0x97)),console[_0x24a47d(0x7e)](_0x24a47d(0xc5)),0x1;try{const _0x139fc9=_0x412697[_0x24a47d(0xa6)];let _0x46e883=_0x88415f;!_0x3160ce&&_0x139fc9&&!_0x88415f[_0x24a47d(0x8d)]('/')&&(_0x46e883=_0x139fc9+'/'+_0x88415f,_0x412697[_0x24a47d(0xf0)]&&console[_0x24a47d(0x7e)]('Resolved\x20relative\x20path\x20to:\x20'+_0x46e883));const _0x373426=await withSpinner(_0x24a47d(0xe5)+_0x46e883+_0x24a47d(0xc1),()=>_0x513638[_0x24a47d(0x76)][_0x24a47d(0xfb)](_0x46e883),{'verbose':_0x412697['verbose']}),_0x54dd71=_0x373426['data'];_0x412697[_0x24a47d(0xf0)]&&(console[_0x24a47d(0x7e)](_0x24a47d(0xfd)+_0x54dd71['type']),console[_0x24a47d(0x7e)](_0x24a47d(0xca)+_0x54dd71[_0x24a47d(0x84)]),_0x54dd71[_0x24a47d(0x100)]&&console[_0x24a47d(0x7e)](_0x24a47d(0x7b)+_0x54dd71[_0x24a47d(0x100)]),_0x54dd71[_0x24a47d(0x96)]&&console[_0x24a47d(0x7e)]('Segment\x20ID:\x20'+_0x54dd71[_0x24a47d(0x96)]));if(_0x54dd71[_0x24a47d(0x99)]==='parent'){const _0x9e18=await withSpinner(_0x24a47d(0xff),()=>_0x513638[_0x24a47d(0x76)][_0x24a47d(0x106)](_0x54dd71[_0x24a47d(0x84)]),{'verbose':_0x412697['verbose']});await handleSingleObjectOutput(_0x9e18[_0x24a47d(0xf9)],_0x412697);}else{if(_0x54dd71[_0x24a47d(0x99)]===_0x24a47d(0xb1)){if(!_0x54dd71[_0x24a47d(0x100)])throw new SDKError(ErrorCode[_0x24a47d(0x89)],_0x24a47d(0xf6));const _0xa0da43=await withSpinner(_0x24a47d(0x104),()=>_0x513638[_0x24a47d(0x76)][_0x24a47d(0x10f)](_0x54dd71[_0x24a47d(0x100)]),{'verbose':_0x412697[_0x24a47d(0xf0)]});await handleSingleObjectOutput(_0xa0da43[_0x24a47d(0xf9)],_0x412697);}else{if(_0x54dd71[_0x24a47d(0x99)]==='segment'){if(!_0x54dd71['segmentId'])throw new SDKError(ErrorCode[_0x24a47d(0xaa)],_0x24a47d(0xb2));const _0x200877=await withSpinner(_0x24a47d(0x75),()=>_0x513638[_0x24a47d(0x76)][_0x24a47d(0xe8)](_0x54dd71[_0x24a47d(0x84)],_0x54dd71[_0x24a47d(0x96)]),{'verbose':_0x412697[_0x24a47d(0xf0)]});await handleSingleObjectOutput(_0x200877[_0x24a47d(0xf9)],_0x412697);}}}return 0x0;}catch(_0x528635){if(_0x528635 instanceof SDKError)return console['error'](_0x24a47d(0x107)+_0x528635['message']),_0x528635[_0x24a47d(0xec)]&&console['error'](_0x24a47d(0xb4)+_0x528635[_0x24a47d(0xec)]),0x1;throw _0x528635;}}}export class SegmentShowCommand extends BaseCommand{['name']='segment:show';[a31_0x2da761(0xd0)]='Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x2da761(0x90)](_0xaa22d){const _0x5be198=a31_0x2da761,{options:_0x27dbf4,args:_0x1de427,tdx:_0x3c0120}=_0xaa22d,_0x5a2165=_0x1de427[0x0];if(!_0x5a2165)return console[_0x5be198(0x7e)](_0x5be198(0x98)),console[_0x5be198(0x7e)](_0x5be198(0x7f)),console[_0x5be198(0x7e)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>'),console[_0x5be198(0x7e)](_0x5be198(0xaf)),console['error'](_0x5be198(0x101)),console[_0x5be198(0x7e)]('\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x22080b=_0x27dbf4[_0x5be198(0x108)],_0x3cc734=resolveSegmentTarget(_0x5a2165,_0x22080b,_0x27dbf4[_0x5be198(0xf0)]);_0x27dbf4[_0x5be198(0xf0)]&&console[_0x5be198(0x7e)]('Target\x20path:\x20'+_0x3cc734);const _0x8b6b3f=await withSpinner(_0x5be198(0xf1)+_0x5a2165+'\x27...',()=>_0x3c0120[_0x5be198(0x76)][_0x5be198(0xfb)](_0x3cc734),{'verbose':_0x27dbf4[_0x5be198(0xf0)]}),_0x393f62=_0x8b6b3f[_0x5be198(0xf9)];_0x27dbf4[_0x5be198(0xf0)]&&(console[_0x5be198(0x7e)](_0x5be198(0xfd)+_0x393f62[_0x5be198(0x99)]),console['error']('Parent\x20ID:\x20'+_0x393f62[_0x5be198(0x84)]));if(_0x393f62[_0x5be198(0x99)]===_0x5be198(0xb1))return console[_0x5be198(0x7e)](_0x5be198(0xab)),console[_0x5be198(0x7e)](_0x5be198(0xed)),0x1;if(_0x393f62['type']===_0x5be198(0xe6))return console[_0x5be198(0x7e)](_0x5be198(0xf8)),console['error'](_0x5be198(0x10c)),0x1;if(!_0x393f62[_0x5be198(0x96)])throw new SDKError(ErrorCode[_0x5be198(0xaa)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x13d1e1=await withSpinner(_0x5be198(0xe4),()=>_0x3c0120[_0x5be198(0x76)][_0x5be198(0xcf)](_0x393f62[_0x5be198(0x84)],_0x393f62[_0x5be198(0x96)]),{'verbose':_0x27dbf4[_0x5be198(0xf0)]});let _0x46fc23=_0x13d1e1[_0x5be198(0xf9)];const _0x47e7ca=resolveLimit(_0x27dbf4[_0x5be198(0xf7)],DEFAULT_DISPLAY_LIMIT),_0x82a0af=/\bLIMIT\s+\d+/i[_0x5be198(0xd2)](_0x46fc23);!_0x82a0af&&(_0x46fc23=_0x46fc23[_0x5be198(0xad)]()['replace'](/;+$/,''),_0x46fc23='SELECT\x20*\x20FROM\x20(\x0a'+_0x46fc23+_0x5be198(0xb3)+_0x47e7ca);_0x27dbf4[_0x5be198(0xf0)]&&console[_0x5be198(0x7e)]('SQL\x20query:\x0a'+_0x46fc23);const _0x28feba=await withQuerySpinner(_0x5be198(0xb9),async _0x20bf45=>{const _0x574f1d=_0x5be198,_0xfb8c99=await _0x3c0120[_0x574f1d(0xb8)][_0x574f1d(0x90)](_0x46fc23,{'catalog':'td','schema':_0x574f1d(0xae),'onJobId':_0x1c5d7e=>{_0x20bf45['setJobId'](_0x1c5d7e);}});return _0xfb8c99;},{'verbose':_0x27dbf4[_0x5be198(0xf0)]}),_0x3a863f=_0x28feba['data'],_0x30b265=_0x3a863f[_0x5be198(0xe9)]?_0x5be198(0xe0)+_0x3a863f['jobId']+']':'';return console['error'](_0x5be198(0x77)+_0x3a863f[_0x5be198(0xeb)]['processedRows']['toLocaleString']()+_0x5be198(0xee)+(_0x5be198(0x83)+formatElapsed(_0x3a863f[_0x5be198(0xeb)][_0x5be198(0x102)])+_0x30b265)),await handleQueryOutput(_0x3a863f,_0x27dbf4),0x0;}catch(_0x44c0bb){if(_0x44c0bb instanceof SDKError)return console[_0x5be198(0x7e)](_0x5be198(0x9d)+_0x44c0bb[_0x5be198(0xcc)]+']'),console['error']('\x0a'+_0x44c0bb['message']),0x1;throw _0x44c0bb;}}}export class SegmentFolderListCommand extends BaseCommand{[a31_0x2da761(0xbe)]=a31_0x2da761(0xf4);['description']=a31_0x2da761(0xba);async[a31_0x2da761(0x90)](_0x430aa6){const _0x55ccb0=a31_0x2da761,{options:_0x395080,args:_0xf2dcbe,tdx:_0x44ef61}=_0x430aa6;if(_0xf2dcbe[_0x55ccb0(0x9f)]===0x0)return console[_0x55ccb0(0x7e)](_0x55ccb0(0xef)),console[_0x55ccb0(0x7e)](_0x55ccb0(0xdd)),0x1;const _0x447020=_0xf2dcbe[0x0];try{_0x395080['verbose']&&(console['error']('Site:\x20'+_0x395080[_0x55ccb0(0x93)]),console[_0x55ccb0(0x7e)](_0x55ccb0(0xf2)+_0x447020));const _0x23ba62=await withSpinner(_0x55ccb0(0xbd)+_0x447020+_0x55ccb0(0xc1),()=>_0x44ef61[_0x55ccb0(0x76)][_0x55ccb0(0xa1)](_0x447020),{'verbose':_0x395080['verbose']}),_0x1aaefd=_0x23ba62['data'];_0x395080['verbose']&&console[_0x55ccb0(0x7e)]('Resolved\x20parent\x20ID:\x20'+_0x1aaefd);const _0x2ffccc=await withSpinner('Listing\x20folders\x20for\x20parent\x20\x27'+_0x447020+'\x27...',()=>_0x44ef61[_0x55ccb0(0x76)]['listFolders'](_0x1aaefd),{'verbose':_0x395080[_0x55ccb0(0xf0)]}),_0x3abcc3=_0x2ffccc[_0x55ccb0(0xf9)];return console[_0x55ccb0(0x7e)]('✔\x20Found\x20'+_0x3abcc3[_0x55ccb0(0x9f)]+'\x20folder'+(_0x3abcc3['length']!==0x1?'s':'')),await handleSDKOutput(_0x3abcc3,_0x395080),0x0;}catch(_0x42b0c2){if(_0x42b0c2 instanceof SDKError)return console['error'](_0x55ccb0(0x107)+_0x42b0c2['message']),_0x42b0c2[_0x55ccb0(0xec)]&&console['error'](_0x55ccb0(0xb4)+_0x42b0c2[_0x55ccb0(0xec)]),0x1;throw _0x42b0c2;}}}export class SegmentFolderShowCommand extends BaseCommand{[a31_0x2da761(0xbe)]=a31_0x2da761(0x9a);[a31_0x2da761(0xd0)]='Show\x20segment\x20folder\x20details';async[a31_0x2da761(0x90)](_0x1e3979){const _0x151bf8=a31_0x2da761,{options:_0x1b5493,args:_0x13efa1,tdx:_0xb2a31}=_0x1e3979;if(_0x13efa1[_0x151bf8(0x9f)]===0x0)return console[_0x151bf8(0x7e)]('Error:\x20Folder\x20reference\x20is\x20required'),console[_0x151bf8(0x7e)]('Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>'),0x1;try{const {parentId:_0x3176c0,childId:_0x46e45e}=parseSegmentRef(_0x13efa1[0x0]);_0x1b5493['verbose']&&(console['error'](_0x151bf8(0xc3)+_0x1b5493['site']),console['error'](_0x151bf8(0xf2)+_0x3176c0),_0x46e45e&&console[_0x151bf8(0x7e)](_0x151bf8(0xbb)+_0x46e45e));if(!_0x46e45e)return console['error']('Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)'),0x1;const _0x11c52d=await withSpinner(_0x151bf8(0xbd)+_0x3176c0+_0x151bf8(0xc1),()=>_0xb2a31[_0x151bf8(0x76)]['resolveParentId'](_0x3176c0),{'verbose':_0x1b5493[_0x151bf8(0xf0)]}),_0x272165=_0x11c52d[_0x151bf8(0xf9)];_0x1b5493['verbose']&&console[_0x151bf8(0x7e)](_0x151bf8(0xcb)+_0x272165);const _0x5852d6=await withSpinner(_0x151bf8(0xc8)+_0x46e45e+_0x151bf8(0xc1),()=>_0xb2a31[_0x151bf8(0x76)]['resolveFolderId'](_0x272165,_0x46e45e),{'verbose':_0x1b5493[_0x151bf8(0xf0)]}),_0x21c439=_0x5852d6[_0x151bf8(0xf9)];_0x1b5493['verbose']&&console[_0x151bf8(0x7e)](_0x151bf8(0x82)+_0x21c439);const _0x3096b2=await withSpinner(_0x151bf8(0xce)+_0x46e45e+_0x151bf8(0xc1),()=>_0xb2a31['segment'][_0x151bf8(0x10f)](_0x21c439),{'verbose':_0x1b5493[_0x151bf8(0xf0)]});return await handleSDKOutput([_0x3096b2[_0x151bf8(0xf9)]],_0x1b5493),0x0;}catch(_0x5a8203){if(_0x5a8203 instanceof SDKError)return console[_0x151bf8(0x7e)](_0x151bf8(0x107)+_0x5a8203[_0x151bf8(0x78)]),_0x5a8203['cause']&&console['error']('\x20\x20Cause:\x20'+_0x5a8203[_0x151bf8(0xec)]),0x1;throw _0x5a8203;}}}export class SegmentSQLCommand extends BaseCommand{[a31_0x2da761(0xbe)]=a31_0x2da761(0xa3);['description']=a31_0x2da761(0x8f);async['execute'](_0x2e3c79){const _0x59fa42=a31_0x2da761,{options:_0x35cc35,args:_0x3ca4f3,tdx:_0x4801f2}=_0x2e3c79,_0x15c4b9=_0x3ca4f3[0x0];if(!_0x15c4b9)return console[_0x59fa42(0x7e)](_0x59fa42(0x98)),console[_0x59fa42(0x7e)](_0x59fa42(0xdc)),console[_0x59fa42(0x7e)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20<path/to/segment.yml>'),console[_0x59fa42(0x7e)](_0x59fa42(0xaf)),console['error']('\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22'),console[_0x59fa42(0x7e)](_0x59fa42(0x10e)),0x1;try{const _0x2ad49f=_0x35cc35[_0x59fa42(0x108)],_0x50af29=resolveSegmentTarget(_0x15c4b9,_0x2ad49f,_0x35cc35[_0x59fa42(0xf0)]);_0x35cc35[_0x59fa42(0xf0)]&&console[_0x59fa42(0x7e)](_0x59fa42(0xbf)+_0x50af29);const _0x4ea6b2=await withSpinner(_0x59fa42(0xf1)+_0x15c4b9+_0x59fa42(0xc1),()=>_0x4801f2[_0x59fa42(0x76)]['resolvePathToResource'](_0x50af29),{'verbose':_0x35cc35[_0x59fa42(0xf0)]}),_0x5705ac=_0x4ea6b2[_0x59fa42(0xf9)];_0x35cc35[_0x59fa42(0xf0)]&&(console[_0x59fa42(0x7e)]('Resolved\x20type:\x20'+_0x5705ac[_0x59fa42(0x99)]),console[_0x59fa42(0x7e)]('Parent\x20ID:\x20'+_0x5705ac[_0x59fa42(0x84)]));if(_0x5705ac[_0x59fa42(0x99)]===_0x59fa42(0xb1))return console[_0x59fa42(0x7e)](_0x59fa42(0xd7)),console[_0x59fa42(0x7e)](_0x59fa42(0xe2)),0x1;if(_0x5705ac[_0x59fa42(0x99)]===_0x59fa42(0xe6))return console['error']('Error:\x20Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console[_0x59fa42(0x7e)](_0x59fa42(0xa7)),0x1;if(!_0x5705ac['segmentId'])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x59fa42(0xb2));const _0x1adbcf=await withSpinner(_0x59fa42(0xe4),()=>_0x4801f2[_0x59fa42(0x76)][_0x59fa42(0xcf)](_0x5705ac[_0x59fa42(0x84)],_0x5705ac[_0x59fa42(0x96)]),{'verbose':_0x35cc35[_0x59fa42(0xf0)]}),_0x2ecb02=_0x1adbcf['data'];return _0x35cc35['format']===_0x59fa42(0xa9)||_0x35cc35[_0x59fa42(0x7a)]===_0x59fa42(0x8c)?await handleSDKOutput([{'sql':_0x2ecb02}],_0x35cc35):console[_0x59fa42(0xda)](_0x2ecb02),0x0;}catch(_0x49311d){if(_0x49311d instanceof SDKError)return console[_0x59fa42(0x7e)](_0x59fa42(0x107)+_0x49311d[_0x59fa42(0x78)]),_0x49311d[_0x59fa42(0xec)]&&console[_0x59fa42(0x7e)](_0x59fa42(0xb4)+_0x49311d[_0x59fa42(0xec)]),0x1;throw _0x49311d;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a31_0x2da761(0xbe)]=a31_0x2da761(0x81);[a31_0x2da761(0xd0)]=a31_0x2da761(0xdb);async[a31_0x2da761(0x90)](_0x51e5bf){const _0x47993a=a31_0x2da761,{options:_0xf41aac,args:_0x2a54fa,tdx:_0x313607}=_0x51e5bf,_0x39588c=_0xf41aac;if(_0x2a54fa[_0x47993a(0x9f)]<0x2)return console[_0x47993a(0x7e)](_0x47993a(0xf5)),console['error']('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0xd3cc37=_0x2a54fa[0x0],_0xf48e77=_0x2a54fa[0x1];_0x39588c[_0x47993a(0xf0)]&&(console['error'](_0x47993a(0xc3)+_0x39588c['site']),console[_0x47993a(0x7e)](_0x47993a(0xb6)+_0xd3cc37),console[_0x47993a(0x7e)](_0x47993a(0xbb)+_0xf48e77));let _0x44a2b1;if(_0x39588c['parentFolder']){const _0x2e73ec=_0x39588c[_0x47993a(0xe7)],_0x48a6f0=await withSpinner(_0x47993a(0xbd)+_0xd3cc37+_0x47993a(0xc1),()=>_0x313607[_0x47993a(0x76)][_0x47993a(0xa1)](_0xd3cc37),{'verbose':_0x39588c[_0x47993a(0xf0)]}),_0x48c858=_0x48a6f0[_0x47993a(0xf9)],_0x52cf13=await withSpinner(_0x47993a(0xc0)+_0x2e73ec+'\x27...',()=>_0x313607[_0x47993a(0x76)]['resolveFolderId'](_0x48c858,_0x2e73ec),{'verbose':_0x39588c[_0x47993a(0xf0)]});_0x44a2b1=_0x52cf13['data'],_0x39588c['verbose']&&console[_0x47993a(0x7e)](_0x47993a(0x109)+_0x44a2b1);}const _0x63135e={'name':_0xf48e77,'description':_0x39588c['description'],'parentFolderId':_0x44a2b1},_0x478ad5=await withSpinner('Creating\x20folder\x20\x27'+_0xf48e77+'\x27...',()=>_0x313607['segment'][_0x47993a(0x10d)](_0xd3cc37,_0x63135e),{'verbose':_0x39588c[_0x47993a(0xf0)]}),_0x59a117=_0x478ad5[_0x47993a(0xf9)];return console[_0x47993a(0x7e)](_0x47993a(0x105)+_0x59a117[_0x47993a(0xbe)]+_0x47993a(0xac)+_0x59a117['id']),await handleSDKOutput([_0x59a117],_0x39588c),0x0;}}export class SegmentViewCommand extends BaseCommand{['name']=a31_0x2da761(0x7c);['description']=a31_0x2da761(0x92);async[a31_0x2da761(0x90)](_0x24a470){const _0x320393=a31_0x2da761,{options:_0x39ca83,args:_0x3191b6,tdx:_0x5ba140}=_0x24a470,_0x5e1740=_0x3191b6[0x0];if(!_0x5e1740)return console[_0x320393(0x7e)](_0x320393(0xc7)),console[_0x320393(0x7e)](_0x320393(0x88)),console['error'](_0x320393(0xfa)),console[_0x320393(0x7e)](_0x320393(0xb7)),console[_0x320393(0x7e)](_0x320393(0x9b)),console[_0x320393(0x7e)](_0x320393(0xaf)),console[_0x320393(0x7e)](_0x320393(0xc4)),console['error'](_0x320393(0xbc)),console['error']('\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser'),console[_0x320393(0x7e)](_0x320393(0xa8)),0x1;try{const _0x2d8186=_0x39ca83[_0x320393(0x108)],_0x34a603=resolveSegmentTarget(_0x5e1740,_0x2d8186,_0x39ca83[_0x320393(0xf0)]);_0x39ca83[_0x320393(0xf0)]&&console['error']('Target\x20path:\x20'+_0x34a603);const _0x4b74e6=await withSpinner(_0x320393(0xf1)+_0x5e1740+'\x27...',()=>_0x5ba140[_0x320393(0x76)][_0x320393(0xfb)](_0x34a603),{'verbose':_0x39ca83[_0x320393(0xf0)]}),_0x4ac2d7=_0x4b74e6[_0x320393(0xf9)];_0x39ca83[_0x320393(0xf0)]&&(console[_0x320393(0x7e)]('Resolved\x20type:\x20'+_0x4ac2d7[_0x320393(0x99)]),console['error']('Parent\x20ID:\x20'+_0x4ac2d7[_0x320393(0x84)]),_0x4ac2d7['folderId']&&console['error'](_0x320393(0x7b)+_0x4ac2d7['folderId']),_0x4ac2d7[_0x320393(0x96)]&&console[_0x320393(0x7e)](_0x320393(0x87)+_0x4ac2d7[_0x320393(0x96)]));if(_0x39ca83['web']){if(_0x4ac2d7[_0x320393(0x99)]===_0x320393(0xb1))return console[_0x320393(0x7e)](_0x320393(0xd9)),0x1;if(_0x4ac2d7['type']===_0x320393(0xe6))return console[_0x320393(0x7e)](_0x320393(0xea)),console[_0x320393(0x7e)](_0x320393(0xde)),0x1;if(!_0x4ac2d7[_0x320393(0x96)])throw new SDKError(ErrorCode[_0x320393(0xaa)],_0x320393(0xb2));const _0x11e256=getConsoleNextUrl(_0x39ca83[_0x320393(0x93)],_0x320393(0x86)+_0x4ac2d7['parentId']+'/e/'+_0x4ac2d7[_0x320393(0x96)]);return console[_0x320393(0x7e)](a31_0x22ea07[_0x320393(0xd3)]('✔')+'\x20Opening\x20'+a31_0x22ea07[_0x320393(0xd5)](_0x11e256)),openBrowser(_0x11e256),0x0;}if(_0x4ac2d7[_0x320393(0x99)]===_0x320393(0xb1)){if(!_0x4ac2d7[_0x320393(0x100)])throw new SDKError(ErrorCode['SEGMENT_FOLDER_NOT_FOUND'],_0x320393(0xf6));const _0x213033=await withSpinner(_0x320393(0x104),()=>_0x5ba140['segment'][_0x320393(0x10f)](_0x4ac2d7[_0x320393(0x100)]),{'verbose':_0x39ca83[_0x320393(0xf0)]});await handleSingleObjectOutput(_0x213033['data'],_0x39ca83);}else{if(_0x4ac2d7['type']===_0x320393(0x76)){if(!_0x4ac2d7[_0x320393(0x96)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x4d2415=await withSpinner(_0x320393(0x75),()=>_0x5ba140['segment'][_0x320393(0xe8)](_0x4ac2d7[_0x320393(0x84)],_0x4ac2d7[_0x320393(0x96)]),{'verbose':_0x39ca83[_0x320393(0xf0)]}),_0x174ee4=getConsoleNextUrl(_0x39ca83[_0x320393(0x93)],_0x320393(0x86)+_0x4ac2d7[_0x320393(0x84)]+_0x320393(0xc2)+_0x4ac2d7[_0x320393(0x96)]),_0x1aa9ec=_0x4d2415[_0x320393(0xf9)];_0x1aa9ec[_0x320393(0xa2)]=_0x174ee4,await handleSingleObjectOutput(_0x1aa9ec,_0x39ca83);}else return console[_0x320393(0x7e)](_0x320393(0x9c)),console[_0x320393(0x7e)](_0x320393(0xc6)),0x1;}return 0x0;}catch(_0xb9e62b){if(_0xb9e62b instanceof SDKError)return console[_0x320393(0x7e)]('Error:\x20'+_0xb9e62b[_0x320393(0x78)]),_0xb9e62b['cause']&&console[_0x320393(0x7e)](_0x320393(0xb4)+_0xb9e62b[_0x320393(0xec)]),0x1;throw _0xb9e62b;}}}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{[a31_0x2da761(0xbe)]=a31_0x2da761(0xe3);[a31_0x2da761(0xd0)]='Show\x20child\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x48c755){const _0x516007=a31_0x2da761,{options:_0xd45ccd,args:_0x1b927b,tdx:_0x4697db}=_0x48c755,_0x9f50ad=_0x1b927b[0x0];if(!_0x9f50ad)return console[_0x516007(0x7e)](_0x516007(0x98)),console['error']('Usage:\x20tdx\x20sg\x20desc\x20<name>'),console[_0x516007(0x7e)](_0x516007(0x85)),console[_0x516007(0x7e)](_0x516007(0xaf)),console[_0x516007(0x7e)](_0x516007(0xb0)),console[_0x516007(0x7e)]('\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x5055fc=_0xd45ccd[_0x516007(0x108)],_0x4c90e2=resolveSegmentTarget(_0x9f50ad,_0x5055fc,_0xd45ccd[_0x516007(0xf0)]);_0xd45ccd['verbose']&&console[_0x516007(0x7e)](_0x516007(0xbf)+_0x4c90e2);const _0x12c326=await withSpinner(_0x516007(0xf1)+_0x9f50ad+_0x516007(0xc1),()=>_0x4697db[_0x516007(0x76)][_0x516007(0xfb)](_0x4c90e2),{'verbose':_0xd45ccd[_0x516007(0xf0)]}),_0x3cc39c=_0x12c326[_0x516007(0xf9)];_0xd45ccd[_0x516007(0xf0)]&&(console[_0x516007(0x7e)](_0x516007(0xfd)+_0x3cc39c[_0x516007(0x99)]),console[_0x516007(0x7e)](_0x516007(0xca)+_0x3cc39c[_0x516007(0x84)]));if(_0x3cc39c['type']===_0x516007(0xb1))return console['error'](_0x516007(0xcd)),console['error'](_0x516007(0xe2)),0x1;if(_0x3cc39c['type']===_0x516007(0xe6))return console[_0x516007(0x7e)](_0x516007(0xd8)),console[_0x516007(0x7e)](_0x516007(0xd4)),0x1;if(!_0x3cc39c[_0x516007(0x96)])throw new SDKError(ErrorCode[_0x516007(0xaa)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x17e35e=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x4697db['segment'][_0x516007(0xcf)](_0x3cc39c[_0x516007(0x84)],_0x3cc39c[_0x516007(0x96)]),{'verbose':_0xd45ccd[_0x516007(0xf0)]}),_0x548fbd=_0x17e35e[_0x516007(0xf9)],_0x5b9d77=await executeSchemaQuery(_0x548fbd,_0x4697db,_0xd45ccd);return await handleQueryOutput(_0x5b9d77,_0xd45ccd),0x0;}catch(_0x52c343){if(_0x52c343 instanceof SDKError)return console[_0x516007(0x7e)](_0x516007(0x107)+_0x52c343[_0x516007(0x78)]),_0x52c343[_0x516007(0xec)]&&console[_0x516007(0x7e)](_0x516007(0xb4)+_0x52c343[_0x516007(0xec)]),0x1;throw _0x52c343;}}}
1
+ const a31_0x1537fe=a31_0x4a9a;(function(_0x4e7692,_0xa484b4){const _0x2bc9f5=a31_0x4a9a,_0x5c1076=_0x4e7692();while(!![]){try{const _0x348c01=-parseInt(_0x2bc9f5(0xf4))/0x1+-parseInt(_0x2bc9f5(0x139))/0x2*(-parseInt(_0x2bc9f5(0x11a))/0x3)+parseInt(_0x2bc9f5(0xa0))/0x4*(-parseInt(_0x2bc9f5(0xb7))/0x5)+-parseInt(_0x2bc9f5(0xec))/0x6+-parseInt(_0x2bc9f5(0xe1))/0x7+parseInt(_0x2bc9f5(0xe5))/0x8+-parseInt(_0x2bc9f5(0x115))/0x9*(-parseInt(_0x2bc9f5(0xf8))/0xa);if(_0x348c01===_0xa484b4)break;else _0x5c1076['push'](_0x5c1076['shift']());}catch(_0x3c329d){_0x5c1076['push'](_0x5c1076['shift']());}}}(a31_0x1d49,0x7b89f));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';import{executeSchemaQuery}from'../utils/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../utils/segment-path-parser.js';function a31_0x1d49(){const _0x30486e=['processedRows','length','Parent\x20name:\x20','SEGMENT_FOLDER_NOT_FOUND','segment:folder:create','10eaQNjw','Use:\x20tdx\x20ps\x20desc','Usage:\x20tdx\x20sg\x20desc\x20<name>','web','Error:\x20Folder\x20reference\x20is\x20required','/app/ps/','Site:\x20','Use:\x20tdx\x20ps\x20view\x20-w','listFolders','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required','✔\x20Created\x20folder\x20\x27','segment:view','parentId','error','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','\x20\x20Segment\x20name:\x20','Fetching\x20SQL\x20for\x20segment...','Usage:\x20tdx\x20segment\x20describe\x20<path>','data','parentSegment','test','Fetching\x20segment\x20details...','\x20\x20Folder\x20path:\x20','Error:\x20Path\x20or\x20name\x20is\x20required','Show\x20segment\x20folder\x20details','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','parent','name','✔\x20Query\x20completed:\x20Processed\x20','getFolder','parentFolder','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','replace','\x20\x20tdx\x20sg\x20sql\x20segments/my-audience/premium-users.yml','Listing\x20folders\x20for\x20parent\x20\x27','Resolved\x20relative\x20path\x20to:\x20','\x20Opening\x20','Show\x20child\x20segment\x20schema\x20(column\x20types)','toLocaleString','execute','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','2774800OGCEKL','Fetching\x20folder\x20details...','getSegment','Segment\x20ID:\x20','6559872eLxbLr','Options:','resolvePathToResource','INVALID_ARGUMENT','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','Use:\x20tdx\x20ps\x20show','Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.','4003926tElhkS','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','query','segmentName','Folder\x20name:\x20','verbose','Error:\x20Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.','555200wVDNrg','jobId','format','segment:folder:show','39390bWCGXG','code','/e/','✔\x20Found\x20','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','Show\x20folder\x20or\x20child\x20segment\x20details','Resolved\x20parent\x20ID:\x20','segment:describe','setJobId','\x27\x20with\x20ID:\x20','Resolved\x20type:\x20','Resolving\x20parent\x20folder\x20\x27','\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20<path/to/segment.yml>','in\x20','segment:desc','Use:\x20tdx\x20ps\x20view','description','(root)','\x20\x20Parent\x20segment:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details','Error:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','resolveFolderId','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Usage:\x20tdx\x20sg\x20sql\x20<name>','green','3582hYSvvy','Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','\x20rows\x20','3kkFaba','segment','message','Error:\x20Parent\x20segment\x20name\x20is\x20required','json','SQL\x20query:\x0a','\x20\x20Cause:\x20','url','Show\x20segment\x20or\x20folder\x20details','Examples:','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','Resolving\x20parent\x20segment\x20\x27','segment:folder:list','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','Resolved\x20YAML\x20file:\x20','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','getSegmentSQL','Executing\x20segment\x20query...','Creating\x20folder\x20\x27','trim','\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22','Target\x20path:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','type','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','createFolder','Fetching\x20folder\x20\x27','Folder\x20ID\x20missing\x20from\x20resolved\x20path','719848PSLniO','elapsedTimeMillis','\x27...','1245388WVMYGm','Resolving\x20folder\x20\x27','fullPath','resolveParentId','segmentId','folder','log','Parent\x20ID:\x20','cause','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','segment:sql','SEGMENT_NOT_FOUND','Resolving\x20\x27','folderId','site','folderPath','Resolved\x20parent\x20folder\x20ID:\x20'];a31_0x1d49=function(){return _0x30486e;};return a31_0x1d49();}import{getConsoleNextUrl}from'../types/endpoints.js';import{openBrowser}from'../utils/process.js';import a31_0x447bcc from'chalk';function resolveSegmentTarget(_0x3d795d,_0x505f88,_0x29dfb9){const _0x1ec324=a31_0x4a9a;if(isYamlFilePath(_0x3d795d))try{const _0x32eac4=resolveYamlFilePath(_0x3d795d);return _0x29dfb9&&(console[_0x1ec324(0xc5)](_0x1ec324(0x128)+_0x3d795d),console[_0x1ec324(0xc5)](_0x1ec324(0x10c)+_0x32eac4[_0x1ec324(0xcb)]),console[_0x1ec324(0xc5)](_0x1ec324(0xc7)+_0x32eac4[_0x1ec324(0xf0)]),console[_0x1ec324(0xc5)](_0x1ec324(0xce)+(_0x32eac4[_0x1ec324(0xb0)]||_0x1ec324(0x10b))),console[_0x1ec324(0xc5)]('\x20\x20Full\x20path:\x20'+_0x32eac4[_0x1ec324(0xa2)])),_0x32eac4[_0x1ec324(0xa2)];}catch(_0xf97541){throw new SDKError(ErrorCode[_0x1ec324(0xe8)],_0x1ec324(0xc6)+_0xf97541[_0x1ec324(0x11c)]);}if(!_0x505f88)throw new SDKError(ErrorCode[_0x1ec324(0xe8)],'No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');return _0x505f88+'/'+_0x3d795d;}export class SegmentDescribeCommand extends BaseCommand{['name']=a31_0x1537fe(0x100);['description']=a31_0x1537fe(0x122);async[a31_0x1537fe(0xdf)](_0x30bf2c){const _0x2dee87=a31_0x1537fe,{options:_0x58b349,args:_0x4f3966,tdx:_0x2ea92f}=_0x30bf2c,_0x5b433e=_0x4f3966[0x0],_0x14aaaa=!_0x5b433e&&!!_0x58b349['parentSegment'],_0x476311=_0x5b433e||_0x58b349['parentSegment'];if(!_0x476311)return console[_0x2dee87(0xc5)](_0x2dee87(0xcf)),console['error'](_0x2dee87(0xc9)),console[_0x2dee87(0xc5)]('Examples:'),console[_0x2dee87(0xc5)](_0x2dee87(0x124)),console[_0x2dee87(0xc5)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x2dee87(0xc5)](_0x2dee87(0xaa)),console[_0x2dee87(0xc5)](_0x2dee87(0xe0)),0x1;try{const _0x2161c0=_0x58b349['segmentPath'];let _0x3a8886=_0x476311;!_0x14aaaa&&_0x2161c0&&!_0x476311['includes']('/')&&(_0x3a8886=_0x2161c0+'/'+_0x476311,_0x58b349[_0x2dee87(0xf2)]&&console[_0x2dee87(0xc5)](_0x2dee87(0xdb)+_0x3a8886));const _0x3dc1b9=await withSpinner('Resolving\x20path\x20\x27'+_0x3a8886+'\x27...',()=>_0x2ea92f[_0x2dee87(0x11b)]['resolvePathToResource'](_0x3a8886),{'verbose':_0x58b349[_0x2dee87(0xf2)]}),_0x43b7f6=_0x3dc1b9[_0x2dee87(0xca)];_0x58b349['verbose']&&(console['error']('Resolved\x20type:\x20'+_0x43b7f6[_0x2dee87(0x132)]),console[_0x2dee87(0xc5)](_0x2dee87(0xa7)+_0x43b7f6[_0x2dee87(0xc4)]),_0x43b7f6['folderId']&&console[_0x2dee87(0xc5)](_0x2dee87(0xa9)+_0x43b7f6[_0x2dee87(0xae)]),_0x43b7f6[_0x2dee87(0xa4)]&&console['error']('Segment\x20ID:\x20'+_0x43b7f6['segmentId']));if(_0x43b7f6['type']===_0x2dee87(0xd2)){const _0x1c61ad=await withSpinner('Fetching\x20parent\x20segment\x20details...',()=>_0x2ea92f[_0x2dee87(0x11b)]['getParent'](_0x43b7f6[_0x2dee87(0xc4)]),{'verbose':_0x58b349[_0x2dee87(0xf2)]});await handleSingleObjectOutput(_0x1c61ad[_0x2dee87(0xca)],_0x58b349);}else{if(_0x43b7f6[_0x2dee87(0x132)]===_0x2dee87(0xa5)){if(!_0x43b7f6['folderId'])throw new SDKError(ErrorCode[_0x2dee87(0xb5)],_0x2dee87(0x138));const _0x695944=await withSpinner(_0x2dee87(0xe2),()=>_0x2ea92f[_0x2dee87(0x11b)][_0x2dee87(0xd5)](_0x43b7f6[_0x2dee87(0xae)]),{'verbose':_0x58b349['verbose']});await handleSingleObjectOutput(_0x695944[_0x2dee87(0xca)],_0x58b349);}else{if(_0x43b7f6[_0x2dee87(0x132)]==='segment'){if(!_0x43b7f6[_0x2dee87(0xa4)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x2dee87(0x10f));const _0x5ddc52=await withSpinner('Fetching\x20segment\x20details...',()=>_0x2ea92f[_0x2dee87(0x11b)]['getSegment'](_0x43b7f6[_0x2dee87(0xc4)],_0x43b7f6[_0x2dee87(0xa4)]),{'verbose':_0x58b349[_0x2dee87(0xf2)]});await handleSingleObjectOutput(_0x5ddc52['data'],_0x58b349);}}}return 0x0;}catch(_0x269ba7){if(_0x269ba7 instanceof SDKError)return console[_0x2dee87(0xc5)](_0x2dee87(0x10e)+_0x269ba7[_0x2dee87(0x11c)]),_0x269ba7['cause']&&console['error'](_0x2dee87(0x120)+_0x269ba7[_0x2dee87(0xa8)]),0x1;throw _0x269ba7;}}}export class SegmentShowCommand extends BaseCommand{[a31_0x1537fe(0xd3)]='segment:show';['description']='Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x1537fe(0xdf)](_0x3b9dfb){const _0x3618c8=a31_0x1537fe,{options:_0x3323e5,args:_0x9a6bcd,tdx:_0x4188c5}=_0x3b9dfb,_0x291346=_0x9a6bcd[0x0];if(!_0x291346)return console[_0x3618c8(0xc5)](_0x3618c8(0xed)),console[_0x3618c8(0xc5)]('Usage:\x20tdx\x20sg\x20show\x20<name>'),console[_0x3618c8(0xc5)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>'),console[_0x3618c8(0xc5)]('Examples:'),console['error'](_0x3618c8(0x127)),console[_0x3618c8(0xc5)]('\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x503c32=_0x3323e5[_0x3618c8(0xcb)],_0x4aa25f=resolveSegmentTarget(_0x291346,_0x503c32,_0x3323e5['verbose']);_0x3323e5[_0x3618c8(0xf2)]&&console['error']('Target\x20path:\x20'+_0x4aa25f);const _0x3c4249=await withSpinner(_0x3618c8(0xad)+_0x291346+_0x3618c8(0x13b),()=>_0x4188c5[_0x3618c8(0x11b)][_0x3618c8(0xe7)](_0x4aa25f),{'verbose':_0x3323e5['verbose']}),_0x21e9e6=_0x3c4249['data'];_0x3323e5[_0x3618c8(0xf2)]&&(console['error'](_0x3618c8(0x103)+_0x21e9e6[_0x3618c8(0x132)]),console[_0x3618c8(0xc5)]('Parent\x20ID:\x20'+_0x21e9e6['parentId']));if(_0x21e9e6[_0x3618c8(0x132)]==='folder')return console[_0x3618c8(0xc5)](_0x3618c8(0xd1)),console['error'](_0x3618c8(0x117)),0x1;if(_0x21e9e6['type']==='parent')return console[_0x3618c8(0xc5)]('Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console[_0x3618c8(0xc5)](_0x3618c8(0xea)),0x1;if(!_0x21e9e6['segmentId'])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x24db6e=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x4188c5[_0x3618c8(0x11b)][_0x3618c8(0x12a)](_0x21e9e6[_0x3618c8(0xc4)],_0x21e9e6[_0x3618c8(0xa4)]),{'verbose':_0x3323e5[_0x3618c8(0xf2)]});let _0x5e7fac=_0x24db6e[_0x3618c8(0xca)];const _0x52a9a1=resolveLimit(_0x3323e5['limit'],DEFAULT_DISPLAY_LIMIT),_0x10fda9=/\bLIMIT\s+\d+/i[_0x3618c8(0xcc)](_0x5e7fac);!_0x10fda9&&(_0x5e7fac=_0x5e7fac[_0x3618c8(0x12d)]()[_0x3618c8(0xd8)](/;+$/,''),_0x5e7fac='SELECT\x20*\x20FROM\x20(\x0a'+_0x5e7fac+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x52a9a1);_0x3323e5['verbose']&&console[_0x3618c8(0xc5)](_0x3618c8(0x11f)+_0x5e7fac);const _0x30d7ab=await withQuerySpinner(_0x3618c8(0x12b),async _0x56102f=>{const _0xd5e00d=_0x3618c8,_0x1bd299=await _0x4188c5[_0xd5e00d(0xef)][_0xd5e00d(0xdf)](_0x5e7fac,{'catalog':'td','schema':'information_schema','onJobId':_0x4cd62a=>{const _0x128b9d=_0xd5e00d;_0x56102f[_0x128b9d(0x101)](_0x4cd62a);}});return _0x1bd299;},{'verbose':_0x3323e5['verbose']}),_0x98a008=_0x30d7ab[_0x3618c8(0xca)],_0x15f98f=_0x98a008[_0x3618c8(0xf5)]?'\x20[Job\x20ID:\x20'+_0x98a008['jobId']+']':'';return console['error'](_0x3618c8(0xd4)+_0x98a008['stats'][_0x3618c8(0xb2)][_0x3618c8(0xde)]()+_0x3618c8(0x119)+(_0x3618c8(0x107)+formatElapsed(_0x98a008['stats'][_0x3618c8(0x13a)])+_0x15f98f)),await handleQueryOutput(_0x98a008,_0x3323e5),0x0;}catch(_0x5e81fb){if(_0x5e81fb instanceof SDKError)return console[_0x3618c8(0xc5)]('✖\x20Query\x20failed\x20['+_0x5e81fb[_0x3618c8(0xf9)]+']'),console[_0x3618c8(0xc5)]('\x0a'+_0x5e81fb[_0x3618c8(0x11c)]),0x1;throw _0x5e81fb;}}}export class SegmentFolderListCommand extends BaseCommand{[a31_0x1537fe(0xd3)]=a31_0x1537fe(0x126);[a31_0x1537fe(0x10a)]=a31_0x1537fe(0xee);async[a31_0x1537fe(0xdf)](_0x3a5c1f){const _0x49bb9c=a31_0x1537fe,{options:_0x12f090,args:_0x5e20af,tdx:_0x559a3f}=_0x3a5c1f;if(_0x5e20af[_0x49bb9c(0xb3)]===0x0)return console[_0x49bb9c(0xc5)](_0x49bb9c(0x11d)),console[_0x49bb9c(0xc5)](_0x49bb9c(0x134)),0x1;const _0x1f51f6=_0x5e20af[0x0];try{_0x12f090[_0x49bb9c(0xf2)]&&(console[_0x49bb9c(0xc5)](_0x49bb9c(0xbd)+_0x12f090[_0x49bb9c(0xaf)]),console['error']('Parent\x20name:\x20'+_0x1f51f6));const _0x41480c=await withSpinner(_0x49bb9c(0x125)+_0x1f51f6+'\x27...',()=>_0x559a3f['segment'][_0x49bb9c(0xa3)](_0x1f51f6),{'verbose':_0x12f090['verbose']}),_0x4c1962=_0x41480c[_0x49bb9c(0xca)];_0x12f090[_0x49bb9c(0xf2)]&&console[_0x49bb9c(0xc5)](_0x49bb9c(0xff)+_0x4c1962);const _0x51038c=await withSpinner(_0x49bb9c(0xda)+_0x1f51f6+'\x27...',()=>_0x559a3f[_0x49bb9c(0x11b)][_0x49bb9c(0xbf)](_0x4c1962),{'verbose':_0x12f090[_0x49bb9c(0xf2)]}),_0x3a4370=_0x51038c['data'];return console['error'](_0x49bb9c(0xfb)+_0x3a4370[_0x49bb9c(0xb3)]+'\x20folder'+(_0x3a4370[_0x49bb9c(0xb3)]!==0x1?'s':'')),await handleSDKOutput(_0x3a4370,_0x12f090),0x0;}catch(_0x48b558){if(_0x48b558 instanceof SDKError)return console[_0x49bb9c(0xc5)](_0x49bb9c(0x10e)+_0x48b558['message']),_0x48b558[_0x49bb9c(0xa8)]&&console[_0x49bb9c(0xc5)]('\x20\x20Cause:\x20'+_0x48b558['cause']),0x1;throw _0x48b558;}}}export class SegmentFolderShowCommand extends BaseCommand{[a31_0x1537fe(0xd3)]=a31_0x1537fe(0xf7);['description']=a31_0x1537fe(0xd0);async['execute'](_0x14ae70){const _0x17391a=a31_0x1537fe,{options:_0x2d370f,args:_0x5be10a,tdx:_0xff4f2c}=_0x14ae70;if(_0x5be10a[_0x17391a(0xb3)]===0x0)return console['error'](_0x17391a(0xbb)),console[_0x17391a(0xc5)](_0x17391a(0x112)),0x1;try{const {parentId:_0x15c8dc,childId:_0x2d0f2c}=parseSegmentRef(_0x5be10a[0x0]);_0x2d370f['verbose']&&(console[_0x17391a(0xc5)](_0x17391a(0xbd)+_0x2d370f[_0x17391a(0xaf)]),console[_0x17391a(0xc5)](_0x17391a(0xb4)+_0x15c8dc),_0x2d0f2c&&console[_0x17391a(0xc5)](_0x17391a(0xf1)+_0x2d0f2c));if(!_0x2d0f2c)return console['error'](_0x17391a(0xc0)),0x1;const _0x20f907=await withSpinner(_0x17391a(0x125)+_0x15c8dc+_0x17391a(0x13b),()=>_0xff4f2c[_0x17391a(0x11b)][_0x17391a(0xa3)](_0x15c8dc),{'verbose':_0x2d370f[_0x17391a(0xf2)]}),_0x52fb18=_0x20f907[_0x17391a(0xca)];_0x2d370f['verbose']&&console[_0x17391a(0xc5)](_0x17391a(0xff)+_0x52fb18);const _0x2ac02b=await withSpinner(_0x17391a(0xa1)+_0x2d0f2c+'\x27...',()=>_0xff4f2c[_0x17391a(0x11b)][_0x17391a(0x110)](_0x52fb18,_0x2d0f2c),{'verbose':_0x2d370f[_0x17391a(0xf2)]}),_0x37b471=_0x2ac02b['data'];_0x2d370f[_0x17391a(0xf2)]&&console[_0x17391a(0xc5)]('Resolved\x20folder\x20ID:\x20'+_0x37b471);const _0x1f808e=await withSpinner(_0x17391a(0x137)+_0x2d0f2c+'\x27...',()=>_0xff4f2c[_0x17391a(0x11b)][_0x17391a(0xd5)](_0x37b471),{'verbose':_0x2d370f['verbose']});return await handleSDKOutput([_0x1f808e[_0x17391a(0xca)]],_0x2d370f),0x0;}catch(_0xd65787){if(_0xd65787 instanceof SDKError)return console[_0x17391a(0xc5)](_0x17391a(0x10e)+_0xd65787[_0x17391a(0x11c)]),_0xd65787[_0x17391a(0xa8)]&&console['error'](_0x17391a(0x120)+_0xd65787[_0x17391a(0xa8)]),0x1;throw _0xd65787;}}}export class SegmentSQLCommand extends BaseCommand{[a31_0x1537fe(0xd3)]=a31_0x1537fe(0xab);[a31_0x1537fe(0x10a)]='Get\x20SQL\x20query\x20for\x20child\x20segment';async['execute'](_0x307b5e){const _0x4cb765=a31_0x1537fe,{options:_0x318afa,args:_0x3993dd,tdx:_0x4409e8}=_0x307b5e,_0x4a7194=_0x3993dd[0x0];if(!_0x4a7194)return console[_0x4cb765(0xc5)]('Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0x4cb765(0xc5)](_0x4cb765(0x113)),console['error'](_0x4cb765(0x106)),console[_0x4cb765(0xc5)](_0x4cb765(0x123)),console[_0x4cb765(0xc5)](_0x4cb765(0x12e)),console['error'](_0x4cb765(0xd9)),0x1;try{const _0x97474a=_0x318afa[_0x4cb765(0xcb)],_0x589e3c=resolveSegmentTarget(_0x4a7194,_0x97474a,_0x318afa[_0x4cb765(0xf2)]);_0x318afa['verbose']&&console[_0x4cb765(0xc5)](_0x4cb765(0x12f)+_0x589e3c);const _0x193bd5=await withSpinner(_0x4cb765(0xad)+_0x4a7194+_0x4cb765(0x13b),()=>_0x4409e8[_0x4cb765(0x11b)]['resolvePathToResource'](_0x589e3c),{'verbose':_0x318afa[_0x4cb765(0xf2)]}),_0x3f760f=_0x193bd5[_0x4cb765(0xca)];_0x318afa[_0x4cb765(0xf2)]&&(console[_0x4cb765(0xc5)](_0x4cb765(0x103)+_0x3f760f[_0x4cb765(0x132)]),console[_0x4cb765(0xc5)](_0x4cb765(0xa7)+_0x3f760f[_0x4cb765(0xc4)]));if(_0x3f760f[_0x4cb765(0x132)]==='folder')return console[_0x4cb765(0xc5)]('Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.'),console[_0x4cb765(0xc5)](_0x4cb765(0x135)),0x1;if(_0x3f760f[_0x4cb765(0x132)]===_0x4cb765(0xd2))return console[_0x4cb765(0xc5)](_0x4cb765(0xf3)),console[_0x4cb765(0xc5)]('Use:\x20tdx\x20ps\x20sql'),0x1;if(!_0x3f760f['segmentId'])throw new SDKError(ErrorCode[_0x4cb765(0xac)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2427f8=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x4409e8[_0x4cb765(0x11b)][_0x4cb765(0x12a)](_0x3f760f[_0x4cb765(0xc4)],_0x3f760f['segmentId']),{'verbose':_0x318afa['verbose']}),_0xea784b=_0x2427f8[_0x4cb765(0xca)];return _0x318afa[_0x4cb765(0xf6)]===_0x4cb765(0x11e)||_0x318afa[_0x4cb765(0xf6)]==='jsonl'?await handleSDKOutput([{'sql':_0xea784b}],_0x318afa):console[_0x4cb765(0xa6)](_0xea784b),0x0;}catch(_0x3ed016){if(_0x3ed016 instanceof SDKError)return console['error'](_0x4cb765(0x10e)+_0x3ed016[_0x4cb765(0x11c)]),_0x3ed016[_0x4cb765(0xa8)]&&console['error'](_0x4cb765(0x120)+_0x3ed016[_0x4cb765(0xa8)]),0x1;throw _0x3ed016;}}}export class SegmentFolderCreateCommand extends BaseCommand{['name']=a31_0x1537fe(0xb6);[a31_0x1537fe(0x10a)]='Create\x20segment\x20folder\x20for\x20organization';async[a31_0x1537fe(0xdf)](_0x5639f3){const _0x454165=a31_0x1537fe,{options:_0xcb807c,args:_0x224102,tdx:_0x570011}=_0x5639f3,_0x1e35e5=_0xcb807c;if(_0x224102['length']<0x2)return console[_0x454165(0xc5)](_0x454165(0x129)),console['error'](_0x454165(0xfc)),0x1;const _0x7898c5=_0x224102[0x0],_0x11b706=_0x224102[0x1];_0x1e35e5['verbose']&&(console[_0x454165(0xc5)]('Site:\x20'+_0x1e35e5[_0x454165(0xaf)]),console[_0x454165(0xc5)]('Parent\x20segment:\x20'+_0x7898c5),console[_0x454165(0xc5)](_0x454165(0xf1)+_0x11b706));let _0x5eff2f;if(_0x1e35e5[_0x454165(0xd6)]){const _0x359cc4=_0x1e35e5[_0x454165(0xd6)],_0x3cf9ff=await withSpinner(_0x454165(0x125)+_0x7898c5+_0x454165(0x13b),()=>_0x570011[_0x454165(0x11b)][_0x454165(0xa3)](_0x7898c5),{'verbose':_0x1e35e5[_0x454165(0xf2)]}),_0x177fa1=_0x3cf9ff['data'],_0x1f12e5=await withSpinner(_0x454165(0x104)+_0x359cc4+'\x27...',()=>_0x570011[_0x454165(0x11b)][_0x454165(0x110)](_0x177fa1,_0x359cc4),{'verbose':_0x1e35e5[_0x454165(0xf2)]});_0x5eff2f=_0x1f12e5[_0x454165(0xca)],_0x1e35e5[_0x454165(0xf2)]&&console[_0x454165(0xc5)](_0x454165(0xb1)+_0x5eff2f);}const _0x355eef={'name':_0x11b706,'description':_0x1e35e5['description'],'parentFolderId':_0x5eff2f},_0x517128=await withSpinner(_0x454165(0x12c)+_0x11b706+_0x454165(0x13b),()=>_0x570011[_0x454165(0x11b)][_0x454165(0x136)](_0x7898c5,_0x355eef),{'verbose':_0x1e35e5[_0x454165(0xf2)]}),_0x3cbb88=_0x517128[_0x454165(0xca)];return console[_0x454165(0xc5)](_0x454165(0xc2)+_0x3cbb88[_0x454165(0xd3)]+_0x454165(0x102)+_0x3cbb88['id']),await handleSDKOutput([_0x3cbb88],_0x1e35e5),0x0;}}function a31_0x4a9a(_0x510f5b,_0x5a24bc){_0x510f5b=_0x510f5b-0xa0;const _0x1d49c3=a31_0x1d49();let _0x4a9af3=_0x1d49c3[_0x510f5b];return _0x4a9af3;}export class SegmentViewCommand extends BaseCommand{['name']=a31_0x1537fe(0xc3);[a31_0x1537fe(0x10a)]=a31_0x1537fe(0xfe);async[a31_0x1537fe(0xdf)](_0x2e2af8){const _0x299747=a31_0x1537fe,{options:_0x5be7a5,args:_0x183b50,tdx:_0x4b2e63}=_0x2e2af8,_0x1ddb3a=_0x183b50[0x0];if(!_0x1ddb3a)return console[_0x299747(0xc5)](_0x299747(0xc1)),console[_0x299747(0xc5)]('Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]'),console[_0x299747(0xc5)](_0x299747(0xd7)),console[_0x299747(0xc5)](_0x299747(0xe6)),console[_0x299747(0xc5)](_0x299747(0xe9)),console[_0x299747(0xc5)]('Examples:'),console[_0x299747(0xc5)](_0x299747(0x10d)),console['error'](_0x299747(0xfd)),console[_0x299747(0xc5)](_0x299747(0x130)),console['error'](_0x299747(0x105)),0x1;try{const _0x32137e=_0x5be7a5[_0x299747(0xcb)],_0xc79510=resolveSegmentTarget(_0x1ddb3a,_0x32137e,_0x5be7a5[_0x299747(0xf2)]);_0x5be7a5['verbose']&&console[_0x299747(0xc5)](_0x299747(0x12f)+_0xc79510);const _0x465d55=await withSpinner(_0x299747(0xad)+_0x1ddb3a+_0x299747(0x13b),()=>_0x4b2e63['segment'][_0x299747(0xe7)](_0xc79510),{'verbose':_0x5be7a5[_0x299747(0xf2)]}),_0x8f51d9=_0x465d55['data'];_0x5be7a5[_0x299747(0xf2)]&&(console[_0x299747(0xc5)]('Resolved\x20type:\x20'+_0x8f51d9[_0x299747(0x132)]),console['error']('Parent\x20ID:\x20'+_0x8f51d9[_0x299747(0xc4)]),_0x8f51d9[_0x299747(0xae)]&&console[_0x299747(0xc5)](_0x299747(0xa9)+_0x8f51d9[_0x299747(0xae)]),_0x8f51d9['segmentId']&&console[_0x299747(0xc5)](_0x299747(0xe4)+_0x8f51d9[_0x299747(0xa4)]));if(_0x5be7a5[_0x299747(0xba)]){if(_0x8f51d9['type']==='folder')return console['error'](_0x299747(0x111)),0x1;if(_0x8f51d9[_0x299747(0x132)]===_0x299747(0xd2))return console[_0x299747(0xc5)](_0x299747(0x131)),console['error'](_0x299747(0xbe)),0x1;if(!_0x8f51d9[_0x299747(0xa4)])throw new SDKError(ErrorCode[_0x299747(0xac)],_0x299747(0x10f));const _0x4f7d78=getConsoleNextUrl(_0x5be7a5['site'],_0x299747(0xbc)+_0x8f51d9[_0x299747(0xc4)]+_0x299747(0xfa)+_0x8f51d9[_0x299747(0xa4)]);return console['error'](a31_0x447bcc[_0x299747(0x114)]('✔')+_0x299747(0xdc)+a31_0x447bcc['cyan'](_0x4f7d78)),openBrowser(_0x4f7d78),0x0;}if(_0x8f51d9[_0x299747(0x132)]==='folder'){if(!_0x8f51d9[_0x299747(0xae)])throw new SDKError(ErrorCode['SEGMENT_FOLDER_NOT_FOUND'],_0x299747(0x138));const _0x821f27=await withSpinner('Fetching\x20folder\x20details...',()=>_0x4b2e63[_0x299747(0x11b)]['getFolder'](_0x8f51d9['folderId']),{'verbose':_0x5be7a5[_0x299747(0xf2)]});await handleSingleObjectOutput(_0x821f27['data'],_0x5be7a5);}else{if(_0x8f51d9[_0x299747(0x132)]==='segment'){if(!_0x8f51d9['segmentId'])throw new SDKError(ErrorCode[_0x299747(0xac)],_0x299747(0x10f));const _0x15cf2e=await withSpinner(_0x299747(0xcd),()=>_0x4b2e63[_0x299747(0x11b)][_0x299747(0xe3)](_0x8f51d9[_0x299747(0xc4)],_0x8f51d9[_0x299747(0xa4)]),{'verbose':_0x5be7a5[_0x299747(0xf2)]}),_0x1445f3=getConsoleNextUrl(_0x5be7a5[_0x299747(0xaf)],'/app/ps/'+_0x8f51d9[_0x299747(0xc4)]+_0x299747(0xfa)+_0x8f51d9['segmentId']),_0x2a908a=_0x15cf2e[_0x299747(0xca)];_0x2a908a[_0x299747(0x121)]=_0x1445f3,await handleSingleObjectOutput(_0x2a908a,_0x5be7a5);}else return console[_0x299747(0xc5)](_0x299747(0x133)),console[_0x299747(0xc5)](_0x299747(0x109)),0x1;}return 0x0;}catch(_0x3e405b){if(_0x3e405b instanceof SDKError)return console[_0x299747(0xc5)](_0x299747(0x10e)+_0x3e405b[_0x299747(0x11c)]),_0x3e405b['cause']&&console[_0x299747(0xc5)](_0x299747(0x120)+_0x3e405b[_0x299747(0xa8)]),0x1;throw _0x3e405b;}}}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{[a31_0x1537fe(0xd3)]=a31_0x1537fe(0x108);[a31_0x1537fe(0x10a)]=a31_0x1537fe(0xdd);async[a31_0x1537fe(0xdf)](_0x217084){const _0x10401c=a31_0x1537fe,{options:_0x1a5f8b,args:_0x28fd97,tdx:_0x581050}=_0x217084,_0x40e0dc=_0x28fd97[0x0];if(!_0x40e0dc)return console[_0x10401c(0xc5)]('Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0x10401c(0xc5)](_0x10401c(0xb9)),console['error'](_0x10401c(0x118)),console['error'](_0x10401c(0x123)),console['error']('\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22'),console[_0x10401c(0xc5)]('\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x56339f=_0x1a5f8b[_0x10401c(0xcb)],_0x3ababe=resolveSegmentTarget(_0x40e0dc,_0x56339f,_0x1a5f8b[_0x10401c(0xf2)]);_0x1a5f8b[_0x10401c(0xf2)]&&console['error'](_0x10401c(0x12f)+_0x3ababe);const _0x4188b0=await withSpinner(_0x10401c(0xad)+_0x40e0dc+'\x27...',()=>_0x581050[_0x10401c(0x11b)][_0x10401c(0xe7)](_0x3ababe),{'verbose':_0x1a5f8b[_0x10401c(0xf2)]}),_0x817ea3=_0x4188b0[_0x10401c(0xca)];_0x1a5f8b[_0x10401c(0xf2)]&&(console[_0x10401c(0xc5)]('Resolved\x20type:\x20'+_0x817ea3['type']),console[_0x10401c(0xc5)](_0x10401c(0xa7)+_0x817ea3[_0x10401c(0xc4)]));if(_0x817ea3['type']==='folder')return console['error'](_0x10401c(0xeb)),console[_0x10401c(0xc5)](_0x10401c(0x135)),0x1;if(_0x817ea3['type']==='parent')return console[_0x10401c(0xc5)](_0x10401c(0x116)),console[_0x10401c(0xc5)](_0x10401c(0xb8)),0x1;if(!_0x817ea3[_0x10401c(0xa4)])throw new SDKError(ErrorCode[_0x10401c(0xac)],_0x10401c(0x10f));const _0x5ceac4=await withSpinner(_0x10401c(0xc8),()=>_0x581050['segment'][_0x10401c(0x12a)](_0x817ea3[_0x10401c(0xc4)],_0x817ea3['segmentId']),{'verbose':_0x1a5f8b[_0x10401c(0xf2)]}),_0x5709a9=_0x5ceac4['data'],_0x33d145=await executeSchemaQuery(_0x5709a9,_0x581050,_0x1a5f8b);return await handleQueryOutput(_0x33d145,_0x1a5f8b),0x0;}catch(_0x4fe0f9){if(_0x4fe0f9 instanceof SDKError)return console['error'](_0x10401c(0x10e)+_0x4fe0f9['message']),_0x4fe0f9[_0x10401c(0xa8)]&&console[_0x10401c(0xc5)](_0x10401c(0x120)+_0x4fe0f9[_0x10401c(0xa8)]),0x1;throw _0x4fe0f9;}}}
@@ -1 +1 @@
1
- const a32_0x38e488=a32_0x4f47;function a32_0x4f47(_0x2ecd76,_0x5d5795){_0x2ecd76=_0x2ecd76-0x1b3;const _0x17c44b=a32_0x17c4();let _0x4f470f=_0x17c44b[_0x2ecd76];return _0x4f470f;}(function(_0x5c8c9f,_0x318535){const _0x4bc388=a32_0x4f47,_0x1df55c=_0x5c8c9f();while(!![]){try{const _0x5652b6=parseInt(_0x4bc388(0x1c2))/0x1+-parseInt(_0x4bc388(0x1cc))/0x2+-parseInt(_0x4bc388(0x1b6))/0x3*(parseInt(_0x4bc388(0x1bb))/0x4)+-parseInt(_0x4bc388(0x1d7))/0x5+parseInt(_0x4bc388(0x1d2))/0x6+parseInt(_0x4bc388(0x1b3))/0x7*(parseInt(_0x4bc388(0x1e1))/0x8)+parseInt(_0x4bc388(0x1c3))/0x9;if(_0x5652b6===_0x318535)break;else _0x1df55c['push'](_0x1df55c['shift']());}catch(_0x142052){_0x1df55c['push'](_0x1df55c['shift']());}}}(a32_0x17c4,0xac1e9));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a32_0x17c4(){const _0x5dd437=['\x20\x20\x20Path:\x20','segmentPath','execute','Segment\x20name:\x20','type','Target\x20path:\x20','length','339424njCOnn','createSegment','Parent\x20path:\x20','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','verbose','2949144WVyMUE','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','description','Site:\x20','kind','3287185nUTQai','segment:create','segment','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','yellow','folderId','Resolving\x20folder\x20path\x20\x27','segments','Resolved\x20folder\x20ID:\x20','rule','262184byFqZp','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','ruleFile','site','data','245sJQWMt','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','3BPGoRr','Creating\x20segment\x20\x27','error','name','Resolved\x20relative\x20path\x20to:\x20','5444776zYrxYV','Parent:\x20','resolveParentId','noCountPopulation','\x27...','resolveFolderId','resolvePathToResource','116404auxvbE','10245249NOzyMs','folder'];a32_0x17c4=function(){return _0x5dd437;};return a32_0x17c4();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';import a32_0x242930 from'chalk';export class SegmentCreateCommand extends BaseCommand{[a32_0x38e488(0x1b9)]=a32_0x38e488(0x1d8);[a32_0x38e488(0x1d4)]='Create\x20child\x20segment\x20with\x20filtering\x20rules';async[a32_0x38e488(0x1c7)](_0x2b0938){const _0x52d47a=a32_0x38e488;console['error'](a32_0x242930['yellow']('⚠\x20Deprecation\x20warning:\x20`segment\x20create`\x20is\x20deprecated.')),console['error'](a32_0x242930[_0x52d47a(0x1db)]('\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a'));const {options:_0x19b03a,args:_0x3dff98,tdx:_0x48d3d5}=_0x2b0938,_0x146c91=_0x19b03a;if(_0x3dff98[_0x52d47a(0x1cb)]===0x0)return console[_0x52d47a(0x1b8)](_0x52d47a(0x1d3)),console[_0x52d47a(0x1b8)](_0x52d47a(0x1b4)),console[_0x52d47a(0x1b8)]('Examples:'),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x52d47a(0x1b8)](_0x52d47a(0x1b5)),console[_0x52d47a(0x1b8)](_0x52d47a(0x1e2)),0x1;const _0x40c663=_0x3dff98[0x0],_0x4bc5ff=_0x19b03a[_0x52d47a(0x1c6)];let _0x1c3d79=_0x40c663;_0x4bc5ff&&!_0x40c663['includes']('/')&&(_0x1c3d79=_0x4bc5ff+'/'+_0x40c663,_0x146c91[_0x52d47a(0x1d1)]&&console[_0x52d47a(0x1b8)](_0x52d47a(0x1ba)+_0x1c3d79));const _0x3a61a1=parsePath(_0x1c3d79);if(_0x3a61a1[_0x52d47a(0x1de)]['length']<0x2)return console[_0x52d47a(0x1b8)](_0x52d47a(0x1cf)),console[_0x52d47a(0x1b8)](_0x52d47a(0x1d0)),0x1;const _0x576377=_0x3a61a1[_0x52d47a(0x1de)][0x0],_0x196a6e=getBaseName(_0x1c3d79),_0x53e4ee=getParentPath(_0x1c3d79);_0x146c91['verbose']&&(console[_0x52d47a(0x1b8)](_0x52d47a(0x1d5)+_0x146c91[_0x52d47a(0x1e4)]),console[_0x52d47a(0x1b8)](_0x52d47a(0x1ca)+_0x1c3d79),console[_0x52d47a(0x1b8)](_0x52d47a(0x1bc)+_0x576377),console['error'](_0x52d47a(0x1c8)+_0x196a6e),console[_0x52d47a(0x1b8)](_0x52d47a(0x1ce)+_0x53e4ee));const _0x1b9273=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x576377+_0x52d47a(0x1bf),()=>_0x48d3d5['segment'][_0x52d47a(0x1bd)](_0x576377),{'verbose':_0x146c91['verbose']}),_0x588a73=_0x1b9273['data'];let _0x499ba4;if(_0x3a61a1[_0x52d47a(0x1de)][_0x52d47a(0x1cb)]>0x2){const _0x12ad82=await withSpinner(_0x52d47a(0x1dd)+_0x53e4ee+_0x52d47a(0x1bf),()=>_0x48d3d5['segment'][_0x52d47a(0x1c1)](_0x53e4ee),{'verbose':_0x146c91[_0x52d47a(0x1d1)]}),_0xed57ea=_0x12ad82[_0x52d47a(0x1e5)];if(_0xed57ea[_0x52d47a(0x1c9)]!==_0x52d47a(0x1c4)&&_0xed57ea['type']!=='parent')return console[_0x52d47a(0x1b8)](_0x52d47a(0x1da)),0x1;_0x499ba4=_0xed57ea[_0x52d47a(0x1dc)];}else{if(_0x146c91[_0x52d47a(0x1c4)]){const _0x2e1899=await withSpinner('Resolving\x20folder\x20\x27'+_0x146c91[_0x52d47a(0x1c4)]+_0x52d47a(0x1bf),()=>_0x48d3d5[_0x52d47a(0x1d9)][_0x52d47a(0x1c0)](_0x588a73,_0x146c91['folder']),{'verbose':_0x146c91[_0x52d47a(0x1d1)]});_0x499ba4=_0x2e1899['data'];}}_0x146c91['verbose']&&_0x499ba4&&console[_0x52d47a(0x1b8)](_0x52d47a(0x1df)+_0x499ba4);const _0x566aca=await loadJSONFromOptions(_0x146c91[_0x52d47a(0x1e0)],_0x146c91[_0x52d47a(0x1e3)]),_0x4ce917={'name':_0x196a6e,'description':_0x146c91[_0x52d47a(0x1d4)],'rule':_0x566aca,'kind':_0x146c91['kind']!==undefined?parseInt(_0x146c91[_0x52d47a(0x1d6)],0xa):undefined,'isVisible':_0x146c91['invisible']?![]:undefined,'segmentFolderId':_0x499ba4,'countPopulation':_0x146c91[_0x52d47a(0x1be)]?![]:undefined},_0x4a6448=await withSpinner(_0x52d47a(0x1b7)+_0x196a6e+_0x52d47a(0x1bf),()=>_0x48d3d5['segment'][_0x52d47a(0x1cd)](_0x588a73,_0x4ce917),{'verbose':_0x146c91['verbose']}),_0x3ed297=_0x4a6448[_0x52d47a(0x1e5)];return console[_0x52d47a(0x1b8)]('✔\x20Created\x20segment\x20\x27'+_0x3ed297['name']+'\x27\x20with\x20ID:\x20'+_0x3ed297['id']),_0x1c3d79!==_0x40c663&&console[_0x52d47a(0x1b8)](_0x52d47a(0x1c5)+_0x1c3d79),await handleSDKOutput([_0x3ed297],_0x146c91),0x0;}}
1
+ const a32_0x2cdf58=a32_0x2880;(function(_0x3393ec,_0x2181d5){const _0x843706=a32_0x2880,_0x15d3f7=_0x3393ec();while(!![]){try{const _0x50e4a4=parseInt(_0x843706(0xa2))/0x1*(-parseInt(_0x843706(0x91))/0x2)+parseInt(_0x843706(0x8f))/0x3*(-parseInt(_0x843706(0xbd))/0x4)+-parseInt(_0x843706(0xc1))/0x5+parseInt(_0x843706(0xc4))/0x6+parseInt(_0x843706(0x93))/0x7*(parseInt(_0x843706(0xba))/0x8)+parseInt(_0x843706(0xab))/0x9*(parseInt(_0x843706(0x96))/0xa)+parseInt(_0x843706(0x95))/0xb;if(_0x50e4a4===_0x2181d5)break;else _0x15d3f7['push'](_0x15d3f7['shift']());}catch(_0x21eb02){_0x15d3f7['push'](_0x15d3f7['shift']());}}}(a32_0x451a,0x37245));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a32_0x2880(_0x5e93c2,_0x394ec9){_0x5e93c2=_0x5e93c2-0x8c;const _0x451a1c=a32_0x451a();let _0x28805a=_0x451a1c[_0x5e93c2];return _0x28805a;}import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';import a32_0x3a704f from'chalk';function a32_0x451a(){const _0xcef714=['51UqWWvt','\x27...','✔\x20Created\x20segment\x20\x27','⚠\x20Deprecation\x20warning:\x20`segment\x20create`\x20is\x20deprecated.','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','execute','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','noCountPopulation','length','528858pPvXFJ','Site:\x20','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','parent','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','Resolving\x20folder\x20path\x20\x27','segment:create','Resolving\x20parent\x20segment\x20\x27','name','kind','data','Segment\x20name:\x20','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','resolveFolderId','280FKOndQ','description','error','4880BzWMzO','includes','yellow','createSegment','925710TSODut','segmentPath','Target\x20path:\x20','236904KwSYoc','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','Parent:\x20','invisible','Resolving\x20folder\x20\x27','segment','Resolved\x20relative\x20path\x20to:\x20','verbose','357TJxPXb','Create\x20child\x20segment\x20with\x20filtering\x20rules','2092CwHqcr','site','19327HlurKr','ruleFile','1975600ShOiQZ','50fqTUWi','rule','folder','Parent\x20path:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','resolvePathToResource','folderId','segments','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','resolveParentId','\x20\x20\x20Path:\x20','type'];a32_0x451a=function(){return _0xcef714;};return a32_0x451a();}export class SegmentCreateCommand extends BaseCommand{[a32_0x2cdf58(0xb4)]=a32_0x2cdf58(0xb2);[a32_0x2cdf58(0xbb)]=a32_0x2cdf58(0x90);async[a32_0x2cdf58(0xa7)](_0x2ebd5a){const _0x16851e=a32_0x2cdf58;console[_0x16851e(0xbc)](a32_0x3a704f[_0x16851e(0xbf)](_0x16851e(0xa5))),console['error'](a32_0x3a704f[_0x16851e(0xbf)](_0x16851e(0xad)));const {options:_0x359b15,args:_0x3b6131,tdx:_0x394bd2}=_0x2ebd5a,_0x5e3414=_0x359b15;if(_0x3b6131['length']===0x0)return console['error'](_0x16851e(0x9a)),console[_0x16851e(0xbc)](_0x16851e(0x9e)),console[_0x16851e(0xbc)]('Examples:'),console['error'](_0x16851e(0xaf)),console['error'](_0x16851e(0xa6)),console[_0x16851e(0xbc)](_0x16851e(0xa8)),0x1;const _0x363b02=_0x3b6131[0x0],_0x2514ab=_0x359b15[_0x16851e(0xc2)];let _0x1b30be=_0x363b02;_0x2514ab&&!_0x363b02[_0x16851e(0xbe)]('/')&&(_0x1b30be=_0x2514ab+'/'+_0x363b02,_0x5e3414[_0x16851e(0x8e)]&&console[_0x16851e(0xbc)](_0x16851e(0x8d)+_0x1b30be));const _0x1b262e=parsePath(_0x1b30be);if(_0x1b262e[_0x16851e(0x9d)]['length']<0x2)return console['error'](_0x16851e(0xb0)),console[_0x16851e(0xbc)](_0x16851e(0xb8)),0x1;const _0x2ca984=_0x1b262e['segments'][0x0],_0x4cbaf9=getBaseName(_0x1b30be),_0x69a810=getParentPath(_0x1b30be);_0x5e3414[_0x16851e(0x8e)]&&(console[_0x16851e(0xbc)](_0x16851e(0xac)+_0x5e3414[_0x16851e(0x92)]),console['error'](_0x16851e(0xc3)+_0x1b30be),console['error'](_0x16851e(0xc6)+_0x2ca984),console[_0x16851e(0xbc)](_0x16851e(0xb7)+_0x4cbaf9),console[_0x16851e(0xbc)](_0x16851e(0x99)+_0x69a810));const _0x9909a6=await withSpinner(_0x16851e(0xb3)+_0x2ca984+_0x16851e(0xa3),()=>_0x394bd2['segment'][_0x16851e(0x9f)](_0x2ca984),{'verbose':_0x5e3414[_0x16851e(0x8e)]}),_0x1cac8d=_0x9909a6['data'];let _0x3e3b79;if(_0x1b262e[_0x16851e(0x9d)][_0x16851e(0xaa)]>0x2){const _0x596bd7=await withSpinner(_0x16851e(0xb1)+_0x69a810+_0x16851e(0xa3),()=>_0x394bd2[_0x16851e(0x8c)][_0x16851e(0x9b)](_0x69a810),{'verbose':_0x5e3414['verbose']}),_0x228f59=_0x596bd7[_0x16851e(0xb6)];if(_0x228f59[_0x16851e(0xa1)]!=='folder'&&_0x228f59[_0x16851e(0xa1)]!==_0x16851e(0xae))return console[_0x16851e(0xbc)](_0x16851e(0xc5)),0x1;_0x3e3b79=_0x228f59[_0x16851e(0x9c)];}else{if(_0x5e3414[_0x16851e(0x98)]){const _0x3d1dee=await withSpinner(_0x16851e(0xc8)+_0x5e3414[_0x16851e(0x98)]+_0x16851e(0xa3),()=>_0x394bd2[_0x16851e(0x8c)][_0x16851e(0xb9)](_0x1cac8d,_0x5e3414[_0x16851e(0x98)]),{'verbose':_0x5e3414[_0x16851e(0x8e)]});_0x3e3b79=_0x3d1dee['data'];}}_0x5e3414[_0x16851e(0x8e)]&&_0x3e3b79&&console[_0x16851e(0xbc)]('Resolved\x20folder\x20ID:\x20'+_0x3e3b79);const _0x24066c=await loadJSONFromOptions(_0x5e3414[_0x16851e(0x97)],_0x5e3414[_0x16851e(0x94)]),_0xf96d4d={'name':_0x4cbaf9,'description':_0x5e3414[_0x16851e(0xbb)],'rule':_0x24066c,'kind':_0x5e3414[_0x16851e(0xb5)]!==undefined?parseInt(_0x5e3414[_0x16851e(0xb5)],0xa):undefined,'isVisible':_0x5e3414[_0x16851e(0xc7)]?![]:undefined,'segmentFolderId':_0x3e3b79,'countPopulation':_0x5e3414[_0x16851e(0xa9)]?![]:undefined},_0x535d77=await withSpinner('Creating\x20segment\x20\x27'+_0x4cbaf9+_0x16851e(0xa3),()=>_0x394bd2[_0x16851e(0x8c)][_0x16851e(0xc0)](_0x1cac8d,_0xf96d4d),{'verbose':_0x5e3414[_0x16851e(0x8e)]}),_0x278acc=_0x535d77[_0x16851e(0xb6)];return console['error'](_0x16851e(0xa4)+_0x278acc[_0x16851e(0xb4)]+'\x27\x20with\x20ID:\x20'+_0x278acc['id']),_0x1b30be!==_0x363b02&&console['error'](_0x16851e(0xa0)+_0x1b30be),await handleSDKOutput([_0x278acc],_0x5e3414),0x0;}}
@@ -1 +1 @@
1
- const a33_0x462843=a33_0x1299;(function(_0xc2f4d8,_0x340b3d){const _0x44be00=a33_0x1299,_0x228589=_0xc2f4d8();while(!![]){try{const _0x3f059d=-parseInt(_0x44be00(0x1ee))/0x1+parseInt(_0x44be00(0x1f4))/0x2*(-parseInt(_0x44be00(0x204))/0x3)+parseInt(_0x44be00(0x1f3))/0x4+-parseInt(_0x44be00(0x20b))/0x5*(-parseInt(_0x44be00(0x1fb))/0x6)+parseInt(_0x44be00(0x1eb))/0x7*(parseInt(_0x44be00(0x1ff))/0x8)+-parseInt(_0x44be00(0x209))/0x9*(-parseInt(_0x44be00(0x1f9))/0xa)+-parseInt(_0x44be00(0x208))/0xb;if(_0x3f059d===_0x340b3d)break;else _0x228589['push'](_0x228589['shift']());}catch(_0x216894){_0x228589['push'](_0x228589['shift']());}}}(a33_0x5193,0xbf458));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a33_0x1299(_0x4b0a59,_0x26aef9){_0x4b0a59=_0x4b0a59-0x1eb;const _0x519356=a33_0x5193();let _0x1299f7=_0x519356[_0x4b0a59];return _0x1299f7;}import{withSpinner}from'../utils/spinner.js';import{displayFieldsHumanReadable}from'../utils/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{[a33_0x462843(0x1fa)]=a33_0x462843(0x20a);[a33_0x462843(0x1ef)]=a33_0x462843(0x1f7);async[a33_0x462843(0x1ed)](_0x360f5b){const _0x6df6af=a33_0x462843,{options:_0x54d6a4,args:_0x2af01f,tdx:_0x119f12}=_0x360f5b,_0x4d5fb7=_0x2af01f[0x0]||_0x54d6a4[_0x6df6af(0x1fc)];if(!_0x4d5fb7)return console[_0x6df6af(0x206)](_0x6df6af(0x1f5)),console[_0x6df6af(0x206)](_0x6df6af(0x203)),console[_0x6df6af(0x206)](_0x6df6af(0x1f6)),0x1;_0x54d6a4['verbose']&&(console[_0x6df6af(0x206)](_0x6df6af(0x1f1)+_0x54d6a4[_0x6df6af(0x205)]),console['error'](_0x6df6af(0x201)+_0x4d5fb7));const _0x14d8fe=await withSpinner(_0x6df6af(0x1fd)+_0x4d5fb7+_0x6df6af(0x1f0),()=>_0x119f12[_0x6df6af(0x1f8)][_0x6df6af(0x1ec)](_0x4d5fb7),{'verbose':_0x54d6a4[_0x6df6af(0x207)]}),_0x36ae4b=_0x14d8fe['data'];console[_0x6df6af(0x206)](_0x6df6af(0x1fe)+_0x36ae4b[_0x6df6af(0x1f2)]+'\x20field'+(_0x36ae4b[_0x6df6af(0x1f2)]!==0x1?'s':''));if(_0x54d6a4[_0x6df6af(0x202)]||_0x54d6a4[_0x6df6af(0x200)])return await handleSDKOutput(_0x36ae4b,_0x54d6a4),0x0;return displayFieldsHumanReadable(_0x36ae4b,_0x4d5fb7),0x0;}}function a33_0x5193(){const _0x3508bf=['236637nAZshm','segment:fields','1562525aRPqgQ','7271761xlVueY','listFields','execute','192660mvAKlS','description','\x27...','Site:\x20','length','4831724MSWFvb','16KFVUlt','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','List\x20available\x20fields\x20for\x20segmentation','segment','290JFBNqM','name','6uWXWcA','parentSegment','Listing\x20fields\x20for\x20\x27','✔\x20Found\x20','8tiIKYd','jsonl','Parent\x20segment:\x20','json','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','247119jPHwRB','site','error','verbose','18553304APjAOb'];a33_0x5193=function(){return _0x3508bf;};return a33_0x5193();}
1
+ const a33_0x62f89d=a33_0x2528;function a33_0x2528(_0x1ae314,_0x1a4edb){_0x1ae314=_0x1ae314-0xa1;const _0x240964=a33_0x2409();let _0x2528da=_0x240964[_0x1ae314];return _0x2528da;}(function(_0x3c6fa6,_0x38d954){const _0x53c148=a33_0x2528,_0x1d52ec=_0x3c6fa6();while(!![]){try{const _0x5c03f4=-parseInt(_0x53c148(0xbd))/0x1+parseInt(_0x53c148(0xa1))/0x2+-parseInt(_0x53c148(0xa5))/0x3*(parseInt(_0x53c148(0xb4))/0x4)+-parseInt(_0x53c148(0xb8))/0x5*(-parseInt(_0x53c148(0xa9))/0x6)+parseInt(_0x53c148(0xb2))/0x7*(parseInt(_0x53c148(0xa8))/0x8)+-parseInt(_0x53c148(0xb6))/0x9*(-parseInt(_0x53c148(0xa2))/0xa)+parseInt(_0x53c148(0xb3))/0xb*(-parseInt(_0x53c148(0xa6))/0xc);if(_0x5c03f4===_0x38d954)break;else _0x1d52ec['push'](_0x1d52ec['shift']());}catch(_0x39008c){_0x1d52ec['push'](_0x1d52ec['shift']());}}}(a33_0x2409,0x7f6be));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{displayFieldsHumanReadable}from'../utils/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{[a33_0x62f89d(0xc0)]=a33_0x62f89d(0xb1);[a33_0x62f89d(0xb7)]='List\x20available\x20fields\x20for\x20segmentation';async['execute'](_0x46a524){const _0x1ed197=a33_0x62f89d,{options:_0x1fa0ba,args:_0x4ef9a2,tdx:_0x40862f}=_0x46a524,_0x56a507=_0x4ef9a2[0x0]||_0x1fa0ba[_0x1ed197(0xb9)];if(!_0x56a507)return console['error'](_0x1ed197(0xac)),console['error'](_0x1ed197(0xbe)),console[_0x1ed197(0xa3)](_0x1ed197(0xbc)),0x1;_0x1fa0ba[_0x1ed197(0xb5)]&&(console['error'](_0x1ed197(0xbb)+_0x1fa0ba[_0x1ed197(0xba)]),console[_0x1ed197(0xa3)]('Parent\x20segment:\x20'+_0x56a507));const _0x202371=await withSpinner(_0x1ed197(0xa4)+_0x56a507+'\x27...',()=>_0x40862f[_0x1ed197(0xad)][_0x1ed197(0xaf)](_0x56a507),{'verbose':_0x1fa0ba[_0x1ed197(0xb5)]}),_0x5cde97=_0x202371[_0x1ed197(0xae)];console[_0x1ed197(0xa3)](_0x1ed197(0xab)+_0x5cde97[_0x1ed197(0xa7)]+_0x1ed197(0xbf)+(_0x5cde97[_0x1ed197(0xa7)]!==0x1?'s':''));if(_0x1fa0ba[_0x1ed197(0xb0)]||_0x1fa0ba[_0x1ed197(0xaa)])return await handleSDKOutput(_0x5cde97,_0x1fa0ba),0x0;return displayFieldsHumanReadable(_0x5cde97,_0x56a507),0x0;}}function a33_0x2409(){const _0x2db94e=['length','2744clnESA','54OfSBvT','jsonl','✔\x20Found\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','segment','data','listFields','json','segment:fields','8533upWIvN','55mHMADA','4wXvfjX','verbose','101214SsygoQ','description','112055VavqTW','parentSegment','site','Site:\x20','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','461217cfiMCT','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','\x20field','name','1506466PhkKqy','350oWclHg','error','Listing\x20fields\x20for\x20\x27','2208687jpSpEO','113508lSTdXe'];a33_0x2409=function(){return _0x2db94e;};return a33_0x2409();}
@@ -1 +1 @@
1
- const a34_0x5ab9ed=a34_0x1131;(function(_0x160864,_0x2be0a0){const _0x378765=a34_0x1131,_0x18f742=_0x160864();while(!![]){try{const _0x2543e0=parseInt(_0x378765(0x1d2))/0x1+-parseInt(_0x378765(0x205))/0x2*(parseInt(_0x378765(0x1b4))/0x3)+parseInt(_0x378765(0x1ea))/0x4*(-parseInt(_0x378765(0x1c8))/0x5)+parseInt(_0x378765(0x1a1))/0x6+parseInt(_0x378765(0x1c6))/0x7*(parseInt(_0x378765(0x1d4))/0x8)+parseInt(_0x378765(0x1a4))/0x9*(-parseInt(_0x378765(0x1dd))/0xa)+parseInt(_0x378765(0x1ef))/0xb*(parseInt(_0x378765(0x1a6))/0xc);if(_0x2543e0===_0x2be0a0)break;else _0x18f742['push'](_0x18f742['shift']());}catch(_0x4a5934){_0x18f742['push'](_0x18f742['shift']());}}}(a34_0x22b9,0x1a973));import{BaseCommand}from'./command.js';import{withSpinner,withQuerySpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{confirmKey}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';function a34_0x22b9(){const _0x364bff=['all','journeyBundleName','Found\x20tdx.json\x20at:\x20','dryRun','✔\x20Pulled\x20','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','getSegment','session','versionNumber','Usage:\x20tdx\x20sg\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20(requires\x20context\x20or\x20tdx.json)','parent_segment','activationParams','\x20files\x20to\x20','hasChanges','Fetching\x20folders...','length','.yml','kind','listFolders','290SORpGB','values','name','join','segmentFolderId','Parent\x20segment:\x20','message','data','user','Using\x20parent\x20segment:\x20','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','get','setExtra','utf-8','attributes','802788rrFNWh','yaml','description','9JPtYUf','listJourneysFromParentSegment','12JrKXpV','from','segment:pull','set','buildIdToEmailMap','folderId','\x20segments','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','add','filter','listActivations','listSegments','green','buildIdToNameMap','2085ZtZVCp','cyan','dim','Fetching\x20users\x20for\x20email\x20resolution...','size','journey','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','rule','Processing\x20journeys...','Resolving\x20parent\x20segment\x20\x27','\x20=\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent','verbose','activation_','resolveParentId','has','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','\x20\x20🗺️\x20\x20','7admuOV','\x20activations','5OaHqff','Fetching\x20journey\x20\x27','\x27...','reduce','\x20unchanged\x20files','Fetching\x20segments...','dirname','slice','content','✔\x20Context\x20set:\x20','53192KMTMxZ','then','176184Ksmktc','site','error','yellow','sort','Write\x20','getJourney','repeat','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','222590XuPWXz','Site:\x20','segment','parentSegment','absolutePath','parentFolderId','push','yes','Found\x20existing\x20tdx.json\x20at:\x20','tdx.json','\x20\x20🎯\x20','Warning:\x20Could\x20not\x20resolve\x20segment\x20','Fetching\x20connections\x20for\x20name\x20resolution...','522748oAfcdZ','\x20with\x20','\x20versions)','isNew','\x20new\x20files','1689853EpDrVL','execute','Warning:\x20Could\x20not\x20resolve\x20activation\x20'];a34_0x22b9=function(){return _0x364bff;};return a34_0x22b9();}import{getSegmentRootDir,createTdxConfigContent,findTdxConfigPath,loadTdxConfig}from'../utils/tdx-config.js';import{saveSessionContext}from'../core/session.js';import{segmentWithActivationsToYaml,segmentToYamlString,apiRuleToYaml,journeyActivationStepToYaml}from'../sdk/segment/child-segment-yaml.js';import{apiToYamlAsync,toYamlString as a34_0x15a109}from'../sdk/segment/journey-yaml.js';import a34_0x2db30a from'chalk';import{existsSync,mkdirSync,readFileSync,writeFileSync,statSync}from'fs';import a34_0x149348 from'path';function a34_0x1131(_0x188024,_0x371c73){_0x188024=_0x188024-0x196;const _0x22b98b=a34_0x22b9();let _0x113134=_0x22b98b[_0x188024];return _0x113134;}import{sanitizeFileName}from'../utils/string-utils.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyYaml,createJumpTargetCache,resolveJumpTarget}from'../utils/journey-utils.js';export class SegmentPullCommand extends BaseCommand{['name']=a34_0x5ab9ed(0x1a8);[a34_0x5ab9ed(0x1a3)]=a34_0x5ab9ed(0x1c4);async[a34_0x5ab9ed(0x1f0)](_0x5b8c06){const _0x3b367a=a34_0x5ab9ed,{options:_0x56c987,args:_0x555cd2,tdx:_0x1ec751}=_0x5b8c06,_0x2acef2=_0x56c987,_0xddbc4d=_0x56c987[_0x3b367a(0x1e0)],_0x598614=_0x555cd2[0x0],_0x24bcf6=findTdxConfigPath();let _0x410ee2,_0x196c01;if(!_0x598614&&_0x24bcf6){const _0x227256=loadTdxConfig(_0x24bcf6);_0x410ee2=_0x227256[_0x3b367a(0x1fc)],_0x196c01=a34_0x149348[_0x3b367a(0x1ce)](_0x24bcf6),_0x2acef2['verbose']&&(console[_0x3b367a(0x1d6)](_0x3b367a(0x1e5)+_0x24bcf6),console[_0x3b367a(0x1d6)](_0x3b367a(0x19b)+_0x410ee2));}else{if(_0x598614){if(existsSync(_0x598614)&&statSync(_0x598614)['isDirectory']()){const _0x1354fe=findTdxConfigPath(_0x598614);if(_0x1354fe){const _0x498ff5=loadTdxConfig(_0x1354fe);_0x410ee2=_0x498ff5['parent_segment'],_0x196c01=a34_0x149348['dirname'](_0x1354fe),_0x2acef2['verbose']&&(console[_0x3b367a(0x1d6)](_0x3b367a(0x1f4)+_0x1354fe),console[_0x3b367a(0x1d6)](_0x3b367a(0x19b)+_0x410ee2));}else return console['error'](a34_0x2db30a['red'](_0x3b367a(0x1ad)+_0x598614+'\x0a')),console[_0x3b367a(0x1d6)](a34_0x2db30a[_0x3b367a(0x1b5)](_0x3b367a(0x19c))),0x1;}else _0x410ee2=_0x598614;}else _0x410ee2=_0xddbc4d;}if(!_0x410ee2)return console[_0x3b367a(0x1d6)](a34_0x2db30a[_0x3b367a(0x1d7)](_0x3b367a(0x1ba))),console['error'](_0x3b367a(0x1fb)),console['error'](_0x3b367a(0x1bf)),console[_0x3b367a(0x1d6)](_0x3b367a(0x1dc)),0x1;_0x2acef2[_0x3b367a(0x1c0)]&&(console[_0x3b367a(0x1d6)](_0x3b367a(0x1de)+_0x2acef2[_0x3b367a(0x1d5)]),console[_0x3b367a(0x1d6)](_0x3b367a(0x197)+_0x410ee2));const _0x31e87c=await withSpinner(_0x3b367a(0x1bd)+_0x410ee2+_0x3b367a(0x1ca),()=>_0x1ec751[_0x3b367a(0x1df)][_0x3b367a(0x1c2)](_0x410ee2),{'verbose':_0x2acef2[_0x3b367a(0x1c0)]}),_0x3b8dd6=_0x31e87c['data'],_0x36a43d=await withSpinner('Fetching\x20parent\x20segment\x20info...',()=>_0x1ec751[_0x3b367a(0x1df)]['getParent'](_0x3b8dd6),{'verbose':_0x2acef2['verbose']}),_0x5dea6d=_0x36a43d[_0x3b367a(0x199)][_0x3b367a(0x1a0)]['name'];_0x2acef2[_0x3b367a(0x1c0)]&&console['error']('Resolved\x20parent\x20name:\x20'+_0x5dea6d);const [_0x49392e,_0x3c6e61,_0x3bad09]=await Promise[_0x3b367a(0x1f2)]([withSpinner(_0x3b367a(0x1cd),()=>_0x1ec751[_0x3b367a(0x1df)][_0x3b367a(0x1b1)](_0x3b8dd6),{'verbose':_0x2acef2[_0x3b367a(0x1c0)]}),withSpinner(_0x3b367a(0x200),()=>_0x1ec751[_0x3b367a(0x1df)][_0x3b367a(0x204)](_0x3b8dd6),{'verbose':_0x2acef2[_0x3b367a(0x1c0)]}),withSpinner('Fetching\x20journeys...',()=>_0x1ec751[_0x3b367a(0x1b9)][_0x3b367a(0x1a5)](_0x3b8dd6),{'verbose':_0x2acef2[_0x3b367a(0x1c0)]})]),_0x3392f7=_0x49392e[_0x3b367a(0x199)],_0x361b01=_0x3c6e61['data'],_0x22e7ec=_0x3bad09[_0x3b367a(0x199)];if(_0x3392f7[_0x3b367a(0x201)]===0x0&&_0x22e7ec[_0x3b367a(0x201)]===0x0)return console[_0x3b367a(0x1d6)](a34_0x2db30a[_0x3b367a(0x1d7)]('No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27'+_0x5dea6d+'\x27')),0x0;const _0x36f205=buildFolderPathMap(_0x361b01),_0xe35091=_0x196c01||getSegmentRootDir(sanitizeFileName(_0x410ee2)),_0x559972=new Map();await withSpinner('Fetching\x20activations...',async()=>{await batchAsync(_0x3392f7,async _0x618ad8=>{const _0x366a12=a34_0x1131,_0x367a35=await _0x1ec751['segment'][_0x366a12(0x1b0)](_0x3b8dd6,_0x618ad8['id']);_0x559972[_0x366a12(0x1a9)](_0x618ad8['id'],_0x367a35);});},{'verbose':_0x2acef2['verbose']});const _0x33373d=await withSpinner(_0x3b367a(0x1b7),()=>_0x1ec751[_0x3b367a(0x19a)][_0x3b367a(0x1aa)](),{'verbose':_0x2acef2[_0x3b367a(0x1c0)]})['then'](_0x7e5373=>_0x7e5373['data']),_0x28a99a=await withSpinner(_0x3b367a(0x1e9),()=>_0x1ec751['connection'][_0x3b367a(0x1b3)](),{'verbose':_0x2acef2[_0x3b367a(0x1c0)]})[_0x3b367a(0x1d3)](_0x5b85c6=>_0x5b85c6[_0x3b367a(0x199)]),_0x578cb9=[],_0x17143f=a34_0x149348[_0x3b367a(0x208)](_0xe35091,_0x3b367a(0x1e6)),_0x59c1de=createTdxConfigContent(_0x5dea6d);_0x578cb9[_0x3b367a(0x1e3)](prepareFile(_0x17143f,_0x59c1de,_0xe35091));const _0x504e13=new Map();for(const _0x297776 of _0x3392f7){if(_0x297776[_0x3b367a(0x203)]===SEGMENT_KIND_JOURNEY)continue;const _0x462a4d=_0x297776[_0x3b367a(0x196)]?_0x36f205['get'](_0x297776[_0x3b367a(0x196)])||'':'',_0x5dd640=_0x559972['get'](_0x297776['id'])||[],_0x463221=segmentWithActivationsToYaml(_0x297776,_0x5dd640,undefined,_0x33373d,_0x28a99a),_0x1c7166=_0x462a4d?a34_0x149348[_0x3b367a(0x208)](_0xe35091,_0x462a4d):_0xe35091,_0x102c4a=sanitizeFileName(_0x297776[_0x3b367a(0x207)]),_0x5a1b61=getUniqueFileName(_0x1c7166,_0x102c4a,_0x504e13),_0x32410a=a34_0x149348[_0x3b367a(0x208)](_0x1c7166,_0x5a1b61+_0x3b367a(0x202)),_0x1a9969=segmentToYamlString(_0x463221);_0x578cb9[_0x3b367a(0x1e3)](prepareFile(_0x32410a,_0x1a9969,_0xe35091));}const _0x10650e=new Map();for(const _0x54d968 of _0x3392f7){_0x10650e[_0x3b367a(0x1a9)](_0x54d968['id'],_0x54d968);}const _0x479f44=new Map();for(const _0x467aa6 of _0x22e7ec){const _0x3a5a33=_0x467aa6['journeyBundleId'];!_0x479f44['has'](_0x3a5a33)&&_0x479f44['set'](_0x3a5a33,[]),_0x479f44[_0x3b367a(0x19d)](_0x3a5a33)[_0x3b367a(0x1e3)](_0x467aa6);}for(const _0x404bee of _0x479f44[_0x3b367a(0x206)]()){_0x404bee[_0x3b367a(0x1d8)]((_0x57820d,_0x2c1a03)=>(_0x57820d[_0x3b367a(0x1fa)]||0x0)-(_0x2c1a03[_0x3b367a(0x1fa)]||0x0));}const _0x5228a8=()=>{const _0x33f909=_0x3b367a,_0x38189d=new Set(),_0x1a197a=new Set(),_0x5dade6=new Map(),_0x1aced7=new Map(),_0x29365f=createJumpTargetCache(),_0x5f4351=(_0x580ff2,_0x207a9f)=>({'resolveSegment':async _0xc440c8=>{const _0x206cf2=a34_0x1131,_0x3d3b51=_0x5dade6[_0x206cf2(0x19d)](_0xc440c8);if(_0x3d3b51!==undefined)return{'name':_0x3d3b51,'isJourneyLocal':!![]};if(!_0x207a9f)return{'name':_0xc440c8,'isJourneyLocal':![]};try{let _0x2c4b59=_0x10650e[_0x206cf2(0x19d)](_0xc440c8);!_0x2c4b59&&(_0x2c4b59=await _0x1ec751['segment'][_0x206cf2(0x1f8)](_0x207a9f,_0xc440c8));const _0x5891b2=generateJourneyLocalName(_0x2c4b59[_0x206cf2(0x207)]),_0x3a9697=_0x2c4b59[_0x206cf2(0x203)]===SEGMENT_KIND_JOURNEY&&_0x5891b2!==undefined;let _0x4e8b59=_0x2c4b59[_0x206cf2(0x207)];if(_0x3a9697&&_0x5891b2){let _0xdd3fb2=_0x5891b2,_0x70459b=0x2;while(_0x38189d[_0x206cf2(0x1c3)](_0xdd3fb2)){_0xdd3fb2=_0x5891b2+'_'+_0x70459b,_0x70459b++;}_0x38189d[_0x206cf2(0x1ae)](_0xdd3fb2),_0x4e8b59=_0xdd3fb2,_0x5dade6[_0x206cf2(0x1a9)](_0xc440c8,_0x4e8b59);}let _0x1ee613;return _0x3a9697&&_0x2c4b59[_0x206cf2(0x1bb)]&&(_0x1ee613={'description':_0x2c4b59[_0x206cf2(0x1a3)],'rule':apiRuleToYaml(_0x2c4b59[_0x206cf2(0x1bb)])}),{'name':_0x4e8b59,'isJourneyLocal':_0x3a9697,'definition':_0x1ee613};}catch(_0x3a034e){return _0x2acef2['verbose']&&console['error'](_0x206cf2(0x1e8)+_0xc440c8+':\x20'+_0x3a034e[_0x206cf2(0x198)]),{'name':_0xc440c8,'isJourneyLocal':![]};}},'resolveActivation':async _0xe19b76=>{const _0x4ef0d3=a34_0x1131,_0x2a7264=_0x1aced7[_0x4ef0d3(0x19d)](_0xe19b76);if(_0x2a7264!==undefined)return{'name':_0x2a7264,'isJourneyLocal':!![]};try{const _0x4dc52b=await _0x1ec751['journey']['getActivation'](_0x580ff2,_0xe19b76),_0x27b0d0=_0x4dc52b[_0x4ef0d3(0x1a0)][_0x4ef0d3(0x1fd)]['name']||_0xe19b76,_0x489a01=sanitizeYamlKey(_0x27b0d0)||_0x4ef0d3(0x1c1)+_0xe19b76;let _0x23ad54=_0x489a01,_0x41dee6=0x2;while(_0x1a197a[_0x4ef0d3(0x1c3)](_0x23ad54)){_0x23ad54=_0x489a01+'_'+_0x41dee6,_0x41dee6++;}_0x1a197a[_0x4ef0d3(0x1ae)](_0x23ad54),_0x1aced7['set'](_0xe19b76,_0x23ad54);const _0x2450c1=journeyActivationStepToYaml(_0x4dc52b,_0x33373d,_0x28a99a);return{'name':_0x23ad54,'isJourneyLocal':!![],'definition':_0x2450c1};}catch(_0x2c2ebc){return _0x2acef2[_0x4ef0d3(0x1c0)]&&console[_0x4ef0d3(0x1d6)](_0x4ef0d3(0x1f1)+_0xe19b76+':\x20'+_0x2c2ebc[_0x4ef0d3(0x198)]),{'name':_0xe19b76,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x2fcaa3,_0x19b366)=>resolveJumpTarget(_0x2fcaa3,_0x19b366,_0x29365f,_0x367e2d=>_0x1ec751[_0x33f909(0x1b9)]['getJourney'](_0x367e2d))});return{'createYamlContext':_0x5f4351};};if(_0x479f44[_0x3b367a(0x1b8)]>0x0){const _0x57da66=Array[_0x3b367a(0x1a7)](_0x479f44[_0x3b367a(0x206)]()),_0x51085a=await withQuerySpinner(_0x3b367a(0x1bc),async _0x4f3263=>{const _0x53ab7c=_0x3b367a,_0xed4862=[];let _0x34b040=0x0;const _0x294856=0x5;for(let _0x2cefe7=0x0;_0x2cefe7<_0x57da66[_0x53ab7c(0x201)];_0x2cefe7+=_0x294856){const _0x320502=_0x57da66[_0x53ab7c(0x1cf)](_0x2cefe7,_0x2cefe7+_0x294856),_0x14fccc=await Promise[_0x53ab7c(0x1f2)](_0x320502['map'](async _0x39beb0=>{const _0x38b0f1=_0x53ab7c,_0x1aefca=_0x39beb0[0x0],_0x27a634=_0x1aefca[_0x38b0f1(0x1f3)];_0x4f3263['setPhase'](_0x38b0f1(0x1c9)+_0x27a634+'\x27');const _0x569a5a=_0x1aefca[_0x38b0f1(0x1ab)]?_0x36f205[_0x38b0f1(0x19d)](_0x1aefca['folderId'])||'':'',{createYamlContext:_0x54a867}=_0x5228a8(),_0x39faa8=[];for(const _0x1ba470 of _0x39beb0){const _0x1437af=await _0x1ec751['journey'][_0x38b0f1(0x1da)](_0x1ba470['id']),_0x279e79=_0x1437af[_0x38b0f1(0x1a0)]?.['audienceId'],_0x2088f1=_0x54a867(_0x1ba470['id'],_0x279e79),_0x29064e=await apiToYamlAsync(_0x1437af,_0x2088f1);_0x39faa8['push']({'item':_0x1ba470,'yaml':_0x29064e});}let _0x8eb42f;return _0x39faa8[_0x38b0f1(0x201)]===0x1?_0x8eb42f=_0x39faa8[0x0][_0x38b0f1(0x1a2)]:_0x8eb42f=buildMergedJourneyYaml(_0x39faa8),{'bundleName':_0x27a634,'folderPath':_0x569a5a,'finalYaml':_0x8eb42f};}));_0xed4862[_0x53ab7c(0x1e3)](..._0x14fccc),_0x34b040+=_0x320502['length'],_0x4f3263[_0x53ab7c(0x19e)]('('+_0x34b040+'/'+_0x57da66[_0x53ab7c(0x201)]+')');}return _0xed4862;},{'verbose':_0x2acef2['verbose']});for(const {bundleName:_0x6d0a1b,folderPath:_0x13c7a2,finalYaml:_0x10b8f6}of _0x51085a[_0x3b367a(0x199)]){const _0x17d550=a34_0x15a109(_0x10b8f6),_0x499ac9=_0x13c7a2?a34_0x149348[_0x3b367a(0x208)](_0xe35091,_0x13c7a2):_0xe35091,_0x428e95=sanitizeFileName(_0x6d0a1b),_0x521344=getUniqueFileName(_0x499ac9,_0x428e95,_0x504e13),_0x1a8001=a34_0x149348[_0x3b367a(0x208)](_0x499ac9,_0x521344+'.yml');_0x578cb9[_0x3b367a(0x1e3)](prepareFile(_0x1a8001,_0x17d550,_0xe35091));}}const _0xfc34b9=Array[_0x3b367a(0x1a7)](_0x559972[_0x3b367a(0x206)]())[_0x3b367a(0x1cb)]((_0x13c103,_0x2e88ca)=>_0x13c103+_0x2e88ca['length'],0x0),_0x44c3ac=_0x578cb9['filter'](_0x2e29da=>_0x2e29da['isNew']),_0x6899a5=_0x578cb9['filter'](_0x548984=>!_0x548984[_0x3b367a(0x1ed)]&&_0x548984[_0x3b367a(0x1ff)]),_0x5d34fe=_0x578cb9[_0x3b367a(0x1af)](_0x67433f=>!_0x67433f[_0x3b367a(0x1ed)]&&!_0x67433f['hasChanges']),_0x10c382=_0x3392f7['filter'](_0x406bc1=>_0x406bc1[_0x3b367a(0x203)]!==SEGMENT_KIND_JOURNEY);console[_0x3b367a(0x1d6)]('\x0aPull\x20summary\x20for\x20\x27'+_0x5dea6d+'\x27:'),console[_0x3b367a(0x1d6)](_0x3b367a(0x1e7)+a34_0x2db30a[_0x3b367a(0x1b5)](_0x10c382[_0x3b367a(0x201)]+_0x3b367a(0x1ac))+_0x3b367a(0x1eb)+a34_0x2db30a[_0x3b367a(0x1b5)](_0xfc34b9+_0x3b367a(0x1c7)));if(_0x479f44['size']>0x0){const _0x3ceaf3=_0x22e7ec[_0x3b367a(0x201)],_0x46c0dc=_0x479f44[_0x3b367a(0x1b8)],_0x56e33c=_0x3ceaf3>_0x46c0dc?'\x20('+_0x3ceaf3+_0x3b367a(0x1ec):'';console['error'](_0x3b367a(0x1c5)+a34_0x2db30a[_0x3b367a(0x1b5)](_0x46c0dc+'\x20journeys')+a34_0x2db30a['dim'](_0x56e33c));}console[_0x3b367a(0x1d6)]('\x20\x20'+a34_0x2db30a['green']('+\x20'+_0x44c3ac[_0x3b367a(0x201)]+_0x3b367a(0x1ee))),console[_0x3b367a(0x1d6)]('\x20\x20'+a34_0x2db30a[_0x3b367a(0x1d7)]('~\x20'+_0x6899a5[_0x3b367a(0x201)]+'\x20changed\x20files')),console[_0x3b367a(0x1d6)]('\x20\x20'+a34_0x2db30a[_0x3b367a(0x1b6)]('=\x20'+_0x5d34fe[_0x3b367a(0x201)]+_0x3b367a(0x1cc))),console['error']('\x20\x20Target:\x20'+a34_0x2db30a[_0x3b367a(0x1b5)](_0xe35091)+'\x0a');if(_0x6899a5[_0x3b367a(0x201)]>0x0)for(const _0x33ad10 of _0x6899a5){console[_0x3b367a(0x1d6)]('\x0aChanges\x20to\x20\x27'+_0x33ad10['relativePath']+'\x27:'),console['error']('─'[_0x3b367a(0x1db)](0x3c)),console[_0x3b367a(0x1d6)](_0x33ad10['diff']),console[_0x3b367a(0x1d6)]('─'[_0x3b367a(0x1db)](0x3c));}if(_0x2acef2[_0x3b367a(0x1f5)])return console[_0x3b367a(0x1d6)](a34_0x2db30a[_0x3b367a(0x1d7)](_0x3b367a(0x1f7))),0x0;if(_0x44c3ac[_0x3b367a(0x201)]===0x0&&_0x6899a5[_0x3b367a(0x201)]===0x0)return console[_0x3b367a(0x1d6)](a34_0x2db30a['green']('✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'parent_segment':_0x5dea6d},_0x2acef2['session']),console['error'](a34_0x2db30a[_0x3b367a(0x1b2)](_0x3b367a(0x1d1)+a34_0x2db30a[_0x3b367a(0x1b6)](_0x3b367a(0x1fc))+'\x20=\x20'+a34_0x2db30a[_0x3b367a(0x1b5)](_0x5dea6d))),0x0;if(!_0x2acef2[_0x3b367a(0x1e4)]&&(_0x44c3ac[_0x3b367a(0x201)]>0x0||_0x6899a5[_0x3b367a(0x201)]>0x0)){const _0x59d033=await confirmKey(_0x3b367a(0x1d9)+(_0x44c3ac[_0x3b367a(0x201)]+_0x6899a5[_0x3b367a(0x201)])+'\x20files?');if(!_0x59d033)return console[_0x3b367a(0x1d6)]('Aborted.'),0x1;}for(const _0x89282 of _0x578cb9){if(_0x89282[_0x3b367a(0x1ed)]||_0x89282[_0x3b367a(0x1ff)]){const _0x5d1962=a34_0x149348[_0x3b367a(0x1ce)](_0x89282[_0x3b367a(0x1e1)]);!existsSync(_0x5d1962)&&mkdirSync(_0x5d1962,{'recursive':!![]}),writeFileSync(_0x89282['absolutePath'],_0x89282[_0x3b367a(0x1d0)],_0x3b367a(0x19f));}}return console['error'](a34_0x2db30a[_0x3b367a(0x1b2)](_0x3b367a(0x1f6)+(_0x44c3ac[_0x3b367a(0x201)]+_0x6899a5[_0x3b367a(0x201)])+_0x3b367a(0x1fe)+_0xe35091)),saveSessionContext({'parent_segment':_0x5dea6d},_0x2acef2[_0x3b367a(0x1f9)]),console[_0x3b367a(0x1d6)](a34_0x2db30a['green'](_0x3b367a(0x1d1)+a34_0x2db30a[_0x3b367a(0x1b6)](_0x3b367a(0x1fc))+_0x3b367a(0x1be)+a34_0x2db30a[_0x3b367a(0x1b5)](_0x5dea6d))),0x0;}}function buildFolderPathMap(_0x1b7817){const _0x5b5ee0=a34_0x5ab9ed,_0x17a0f9=new Map(),_0x5b7fa2=new Map();for(const _0x271afd of _0x1b7817){_0x5b7fa2[_0x5b5ee0(0x1a9)](_0x271afd['id'],_0x271afd);}const _0x524d61=new Set();for(const _0x570f7b of _0x1b7817){!_0x570f7b[_0x5b5ee0(0x1e2)]&&_0x524d61[_0x5b5ee0(0x1ae)](_0x570f7b['id']);}function _0x32307e(_0x193b59){const _0x3cb227=_0x5b5ee0;if(_0x17a0f9['has'](_0x193b59['id']))return _0x17a0f9[_0x3cb227(0x19d)](_0x193b59['id']);if(_0x524d61[_0x3cb227(0x1c3)](_0x193b59['id']))return _0x17a0f9[_0x3cb227(0x1a9)](_0x193b59['id'],''),'';if(_0x193b59['parentFolderId']){const _0x3dcebb=_0x5b7fa2['get'](_0x193b59['parentFolderId']);if(_0x3dcebb){const _0x489d27=_0x32307e(_0x3dcebb),_0x8904dc=_0x489d27?_0x489d27+'/'+_0x193b59[_0x3cb227(0x207)]:_0x193b59[_0x3cb227(0x207)];return _0x17a0f9[_0x3cb227(0x1a9)](_0x193b59['id'],_0x8904dc),_0x8904dc;}}const _0x4a53c7=_0x193b59[_0x3cb227(0x207)];return _0x17a0f9[_0x3cb227(0x1a9)](_0x193b59['id'],_0x4a53c7),_0x4a53c7;}for(const _0x4d1d1d of _0x1b7817){_0x32307e(_0x4d1d1d);}return _0x17a0f9;}function getUniqueFileName(_0x3be942,_0x543667,_0x442ebd){const _0x13defd=a34_0x5ab9ed,_0x2be457=_0x3be942+':'+_0x543667,_0x1d67cc=_0x442ebd[_0x13defd(0x19d)](_0x2be457)||0x0;_0x442ebd[_0x13defd(0x1a9)](_0x2be457,_0x1d67cc+0x1);if(_0x1d67cc===0x0)return _0x543667;return _0x543667+'-'+_0x1d67cc;}function prepareFile(_0x5f1310,_0x555142,_0x16d9b4){const _0x191821=a34_0x149348['relative'](_0x16d9b4,_0x5f1310);if(existsSync(_0x5f1310)){const _0x324fbb=readFileSync(_0x5f1310,'utf-8'),_0x2ee5b3=generateDiff(_0x324fbb,_0x555142),_0x4142dd=hasChanges(_0x2ee5b3);return{'relativePath':_0x191821,'absolutePath':_0x5f1310,'content':_0x555142,'isNew':![],'hasChanges':_0x4142dd,'diff':_0x4142dd?formatDiffWithColors(_0x2ee5b3):undefined};}return{'relativePath':_0x191821,'absolutePath':_0x5f1310,'content':_0x555142,'isNew':!![],'hasChanges':![]};}
1
+ const a34_0x1efa65=a34_0x3cbd;(function(_0x13f8ba,_0x3acb99){const _0x52f482=a34_0x3cbd,_0xa87cbf=_0x13f8ba();while(!![]){try{const _0x2e11e3=parseInt(_0x52f482(0x213))/0x1*(-parseInt(_0x52f482(0x261))/0x2)+parseInt(_0x52f482(0x25d))/0x3*(-parseInt(_0x52f482(0x250))/0x4)+parseInt(_0x52f482(0x24a))/0x5*(parseInt(_0x52f482(0x1f3))/0x6)+parseInt(_0x52f482(0x1f8))/0x7*(parseInt(_0x52f482(0x229))/0x8)+parseInt(_0x52f482(0x228))/0x9+parseInt(_0x52f482(0x246))/0xa*(-parseInt(_0x52f482(0x1f4))/0xb)+-parseInt(_0x52f482(0x1f6))/0xc*(-parseInt(_0x52f482(0x20f))/0xd);if(_0x2e11e3===_0x3acb99)break;else _0xa87cbf['push'](_0xa87cbf['shift']());}catch(_0x587475){_0xa87cbf['push'](_0xa87cbf['shift']());}}}(a34_0x3262,0x2e298));function a34_0x3cbd(_0x58414c,_0x3b371b){_0x58414c=_0x58414c-0x1ee;const _0x32622e=a34_0x3262();let _0x3cbdd2=_0x32622e[_0x58414c];return _0x3cbdd2;}import{BaseCommand}from'./command.js';import{withSpinner,withQuerySpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{confirmKey}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{getSegmentRootDir,createTdxConfigContent,findTdxConfigPath,loadTdxConfig}from'../utils/tdx-config.js';import{saveSessionContext}from'../core/session.js';import{segmentWithActivationsToYaml,segmentToYamlString,apiRuleToYaml,journeyActivationStepToYaml}from'../sdk/segment/child-segment-yaml.js';import{apiToYamlAsync,toYamlString as a34_0x318de8}from'../sdk/segment/journey-yaml.js';import a34_0x2b6657 from'chalk';function a34_0x3262(){const _0x597872=['green','buildIdToNameMap','13MCPWKV','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cyan','connection','12196KvLfJW','setPhase','Fetching\x20journeys...','filter','\x20\x20Target:\x20','segment:pull','\x20versions)','yaml','relative','absolutePath','parentFolderId','segment','Found\x20existing\x20tdx.json\x20at:\x20','\x20files?','slice','\x20files\x20to\x20','\x20\x20🗺️\x20\x20','\x20with\x20','content','data','hasChanges','189414xFtbiv','87272HKuDFJ','Fetching\x20activations...','Warning:\x20Could\x20not\x20resolve\x20activation\x20','✔\x20Pulled\x20','user','Fetching\x20users\x20for\x20email\x20resolution...','listActivations','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','folderId','\x20activations','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20journeys','kind','execute','parentSegment','\x20changed\x20files','\x0aChanges\x20to\x20\x27','\x0aPull\x20summary\x20for\x20\x27','Site:\x20','getActivation','add','get','Warning:\x20Could\x20not\x20resolve\x20segment\x20','\x20=\x20','getJourney','from','has','segmentFolderId','Parent\x20segment:\x20','354610RbBaSE','red','journeyBundleId','dryRun','5oevytF','Write\x20','Usage:\x20tdx\x20sg\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20(requires\x20context\x20or\x20tdx.json)','getSegment','yellow','length','9244QXlCYJ','join','journey','site','audienceId','isDirectory','Fetching\x20connections\x20for\x20name\x20resolution...','isNew','parent_segment','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','\x20segments','values','✔\x20Context\x20set:\x20','60rfPLBU','Using\x20parent\x20segment:\x20','journeyBundleName','Resolved\x20parent\x20name:\x20','14onVZBf','\x20new\x20files','attributes','rule','activation_','size','verbose','all','listJourneysFromParentSegment','\x20unchanged\x20files','repeat','Found\x20tdx.json\x20at:\x20','session','131286JzIMxk','55kbmQjn','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','4020612iiEzSa','.yml','77uyXnqs','name','listSegments','set','dim','message','versionNumber','Processing\x20journeys...','relativePath','dirname','\x20\x20🎯\x20','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','description','Resolving\x20parent\x20segment\x20\x27','then','Fetching\x20folders...','error','✔\x20All\x20files\x20are\x20up\x20to\x20date','Aborted.','push','utf-8'];a34_0x3262=function(){return _0x597872;};return a34_0x3262();}import{existsSync,mkdirSync,readFileSync,writeFileSync,statSync}from'fs';import a34_0x5ed439 from'path';import{sanitizeFileName}from'../utils/string-utils.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyYaml,createJumpTargetCache,resolveJumpTarget}from'../utils/journey-utils.js';export class SegmentPullCommand extends BaseCommand{[a34_0x1efa65(0x1f9)]=a34_0x1efa65(0x218);[a34_0x1efa65(0x204)]=a34_0x1efa65(0x1f5);async[a34_0x1efa65(0x236)](_0x50f9e8){const _0x493df3=a34_0x1efa65,{options:_0x32b421,args:_0xbc599e,tdx:_0x2a178a}=_0x50f9e8,_0x2594b1=_0x32b421,_0x5cb6ce=_0x32b421[_0x493df3(0x237)],_0x1ec076=_0xbc599e[0x0],_0x50dadf=findTdxConfigPath();let _0x2c764f,_0x2bcf30;if(!_0x1ec076&&_0x50dadf){const _0x41c98d=loadTdxConfig(_0x50dadf);_0x2c764f=_0x41c98d[_0x493df3(0x258)],_0x2bcf30=a34_0x5ed439['dirname'](_0x50dadf),_0x2594b1[_0x493df3(0x267)]&&(console[_0x493df3(0x208)](_0x493df3(0x21f)+_0x50dadf),console[_0x493df3(0x208)](_0x493df3(0x25e)+_0x2c764f));}else{if(_0x1ec076){if(existsSync(_0x1ec076)&&statSync(_0x1ec076)[_0x493df3(0x255)]()){const _0x5edf26=findTdxConfigPath(_0x1ec076);if(_0x5edf26){const _0x3dec22=loadTdxConfig(_0x5edf26);_0x2c764f=_0x3dec22['parent_segment'],_0x2bcf30=a34_0x5ed439[_0x493df3(0x201)](_0x5edf26),_0x2594b1[_0x493df3(0x267)]&&(console['error'](_0x493df3(0x1f1)+_0x5edf26),console[_0x493df3(0x208)]('Using\x20parent\x20segment:\x20'+_0x2c764f));}else return console[_0x493df3(0x208)](a34_0x2b6657[_0x493df3(0x247)](_0x493df3(0x210)+_0x1ec076+'\x0a')),console['error'](a34_0x2b6657['cyan'](_0x493df3(0x259))),0x1;}else _0x2c764f=_0x1ec076;}else _0x2c764f=_0x5cb6ce;}if(!_0x2c764f)return console[_0x493df3(0x208)](a34_0x2b6657[_0x493df3(0x24e)](_0x493df3(0x233))),console['error'](_0x493df3(0x24c)),console[_0x493df3(0x208)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent'),console[_0x493df3(0x208)](_0x493df3(0x230)),0x1;_0x2594b1[_0x493df3(0x267)]&&(console[_0x493df3(0x208)](_0x493df3(0x23b)+_0x2594b1[_0x493df3(0x253)]),console[_0x493df3(0x208)](_0x493df3(0x245)+_0x2c764f));const _0x567b00=await withSpinner(_0x493df3(0x205)+_0x2c764f+'\x27...',()=>_0x2a178a[_0x493df3(0x21e)]['resolveParentId'](_0x2c764f),{'verbose':_0x2594b1[_0x493df3(0x267)]}),_0x5e536b=_0x567b00['data'],_0x1b1dd9=await withSpinner('Fetching\x20parent\x20segment\x20info...',()=>_0x2a178a['segment']['getParent'](_0x5e536b),{'verbose':_0x2594b1['verbose']}),_0x131124=_0x1b1dd9[_0x493df3(0x226)][_0x493df3(0x263)]['name'];_0x2594b1['verbose']&&console[_0x493df3(0x208)](_0x493df3(0x260)+_0x131124);const [_0x4e0d6c,_0x45e64b,_0x47e7ad]=await Promise[_0x493df3(0x268)]([withSpinner('Fetching\x20segments...',()=>_0x2a178a['segment'][_0x493df3(0x1fa)](_0x5e536b),{'verbose':_0x2594b1[_0x493df3(0x267)]}),withSpinner(_0x493df3(0x207),()=>_0x2a178a['segment']['listFolders'](_0x5e536b),{'verbose':_0x2594b1[_0x493df3(0x267)]}),withSpinner(_0x493df3(0x215),()=>_0x2a178a[_0x493df3(0x252)][_0x493df3(0x1ee)](_0x5e536b),{'verbose':_0x2594b1[_0x493df3(0x267)]})]),_0x51fd65=_0x4e0d6c[_0x493df3(0x226)],_0x4b7a98=_0x45e64b[_0x493df3(0x226)],_0x45ca82=_0x47e7ad[_0x493df3(0x226)];if(_0x51fd65[_0x493df3(0x24f)]===0x0&&_0x45ca82['length']===0x0)return console[_0x493df3(0x208)](a34_0x2b6657[_0x493df3(0x24e)]('No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27'+_0x131124+'\x27')),0x0;const _0xe3c608=buildFolderPathMap(_0x4b7a98),_0x1ff18a=_0x2bcf30||getSegmentRootDir(sanitizeFileName(_0x2c764f)),_0x59a75c=new Map();await withSpinner(_0x493df3(0x22a),async()=>{await batchAsync(_0x51fd65,async _0x1b4efd=>{const _0x4fd717=a34_0x3cbd,_0x3d75fd=await _0x2a178a[_0x4fd717(0x21e)][_0x4fd717(0x22f)](_0x5e536b,_0x1b4efd['id']);_0x59a75c[_0x4fd717(0x1fb)](_0x1b4efd['id'],_0x3d75fd);});},{'verbose':_0x2594b1[_0x493df3(0x267)]});const _0x4c7124=await withSpinner(_0x493df3(0x22e),()=>_0x2a178a[_0x493df3(0x22d)]['buildIdToEmailMap'](),{'verbose':_0x2594b1[_0x493df3(0x267)]})['then'](_0x512282=>_0x512282[_0x493df3(0x226)]),_0x39c142=await withSpinner(_0x493df3(0x256),()=>_0x2a178a[_0x493df3(0x212)][_0x493df3(0x20e)](),{'verbose':_0x2594b1[_0x493df3(0x267)]})[_0x493df3(0x206)](_0xd20435=>_0xd20435['data']),_0x587437=[],_0x23182f=a34_0x5ed439['join'](_0x1ff18a,'tdx.json'),_0x4d860c=createTdxConfigContent(_0x131124);_0x587437[_0x493df3(0x20b)](prepareFile(_0x23182f,_0x4d860c,_0x1ff18a));const _0x20ca0d=new Map();for(const _0x4ed3b2 of _0x51fd65){if(_0x4ed3b2['kind']===SEGMENT_KIND_JOURNEY)continue;const _0xaf678e=_0x4ed3b2[_0x493df3(0x244)]?_0xe3c608[_0x493df3(0x23e)](_0x4ed3b2['segmentFolderId'])||'':'',_0x488f4e=_0x59a75c[_0x493df3(0x23e)](_0x4ed3b2['id'])||[],_0x48fbec=segmentWithActivationsToYaml(_0x4ed3b2,_0x488f4e,undefined,_0x4c7124,_0x39c142),_0x4c9f4a=_0xaf678e?a34_0x5ed439[_0x493df3(0x251)](_0x1ff18a,_0xaf678e):_0x1ff18a,_0x4f2883=sanitizeFileName(_0x4ed3b2['name']),_0xe996e8=getUniqueFileName(_0x4c9f4a,_0x4f2883,_0x20ca0d),_0x28939e=a34_0x5ed439[_0x493df3(0x251)](_0x4c9f4a,_0xe996e8+_0x493df3(0x1f7)),_0x1be4cb=segmentToYamlString(_0x48fbec);_0x587437['push'](prepareFile(_0x28939e,_0x1be4cb,_0x1ff18a));}const _0x23cce1=new Map();for(const _0x5cf746 of _0x51fd65){_0x23cce1[_0x493df3(0x1fb)](_0x5cf746['id'],_0x5cf746);}const _0x72bad5=new Map();for(const _0x1d5399 of _0x45ca82){const _0x51bd10=_0x1d5399[_0x493df3(0x248)];!_0x72bad5[_0x493df3(0x243)](_0x51bd10)&&_0x72bad5[_0x493df3(0x1fb)](_0x51bd10,[]),_0x72bad5[_0x493df3(0x23e)](_0x51bd10)[_0x493df3(0x20b)](_0x1d5399);}for(const _0x281005 of _0x72bad5[_0x493df3(0x25b)]()){_0x281005['sort']((_0x35fd00,_0x5536d1)=>(_0x35fd00[_0x493df3(0x1fe)]||0x0)-(_0x5536d1[_0x493df3(0x1fe)]||0x0));}const _0x358448=()=>{const _0xbfa565=_0x493df3,_0x1f05b0=new Set(),_0x3bf8f9=new Set(),_0x1f9825=new Map(),_0x210a74=new Map(),_0x3c250d=createJumpTargetCache(),_0xdd6aa=(_0x404619,_0x14645d)=>({'resolveSegment':async _0x36052f=>{const _0x3ba572=a34_0x3cbd,_0x287131=_0x1f9825[_0x3ba572(0x23e)](_0x36052f);if(_0x287131!==undefined)return{'name':_0x287131,'isJourneyLocal':!![]};if(!_0x14645d)return{'name':_0x36052f,'isJourneyLocal':![]};try{let _0x1f4026=_0x23cce1[_0x3ba572(0x23e)](_0x36052f);!_0x1f4026&&(_0x1f4026=await _0x2a178a['segment'][_0x3ba572(0x24d)](_0x14645d,_0x36052f));const _0x41284b=generateJourneyLocalName(_0x1f4026['name']),_0x5ae649=_0x1f4026[_0x3ba572(0x235)]===SEGMENT_KIND_JOURNEY&&_0x41284b!==undefined;let _0x2dc488=_0x1f4026[_0x3ba572(0x1f9)];if(_0x5ae649&&_0x41284b){let _0x1357a0=_0x41284b,_0x420f3e=0x2;while(_0x1f05b0[_0x3ba572(0x243)](_0x1357a0)){_0x1357a0=_0x41284b+'_'+_0x420f3e,_0x420f3e++;}_0x1f05b0['add'](_0x1357a0),_0x2dc488=_0x1357a0,_0x1f9825['set'](_0x36052f,_0x2dc488);}let _0x1b664f;return _0x5ae649&&_0x1f4026[_0x3ba572(0x264)]&&(_0x1b664f={'description':_0x1f4026[_0x3ba572(0x204)],'rule':apiRuleToYaml(_0x1f4026[_0x3ba572(0x264)])}),{'name':_0x2dc488,'isJourneyLocal':_0x5ae649,'definition':_0x1b664f};}catch(_0x1f7fdb){return _0x2594b1[_0x3ba572(0x267)]&&console[_0x3ba572(0x208)](_0x3ba572(0x23f)+_0x36052f+':\x20'+_0x1f7fdb[_0x3ba572(0x1fd)]),{'name':_0x36052f,'isJourneyLocal':![]};}},'resolveActivation':async _0x49844b=>{const _0x597019=a34_0x3cbd,_0xab69be=_0x210a74['get'](_0x49844b);if(_0xab69be!==undefined)return{'name':_0xab69be,'isJourneyLocal':!![]};try{const _0x2ee8b5=await _0x2a178a[_0x597019(0x252)][_0x597019(0x23c)](_0x404619,_0x49844b),_0xa37de2=_0x2ee8b5[_0x597019(0x263)]['activationParams']['name']||_0x49844b,_0x1caf90=sanitizeYamlKey(_0xa37de2)||_0x597019(0x265)+_0x49844b;let _0x1ec687=_0x1caf90,_0x1a504d=0x2;while(_0x3bf8f9[_0x597019(0x243)](_0x1ec687)){_0x1ec687=_0x1caf90+'_'+_0x1a504d,_0x1a504d++;}_0x3bf8f9[_0x597019(0x23d)](_0x1ec687),_0x210a74[_0x597019(0x1fb)](_0x49844b,_0x1ec687);const _0x1c9d2f=journeyActivationStepToYaml(_0x2ee8b5,_0x4c7124,_0x39c142);return{'name':_0x1ec687,'isJourneyLocal':!![],'definition':_0x1c9d2f};}catch(_0x966cc4){return _0x2594b1[_0x597019(0x267)]&&console['error'](_0x597019(0x22b)+_0x49844b+':\x20'+_0x966cc4[_0x597019(0x1fd)]),{'name':_0x49844b,'isJourneyLocal':![]};}},'resolveJumpTarget':(_0x10d671,_0x165417)=>resolveJumpTarget(_0x10d671,_0x165417,_0x3c250d,_0x193345=>_0x2a178a[_0xbfa565(0x252)][_0xbfa565(0x241)](_0x193345))});return{'createYamlContext':_0xdd6aa};};if(_0x72bad5[_0x493df3(0x266)]>0x0){const _0x18c3b2=Array['from'](_0x72bad5[_0x493df3(0x25b)]()),_0x41bbe3=await withQuerySpinner(_0x493df3(0x1ff),async _0x3043d2=>{const _0x1a1c76=_0x493df3,_0x43c6f5=[];let _0x395269=0x0;const _0x1a2c1b=0x5;for(let _0x1072cd=0x0;_0x1072cd<_0x18c3b2[_0x1a1c76(0x24f)];_0x1072cd+=_0x1a2c1b){const _0x24cc8e=_0x18c3b2[_0x1a1c76(0x221)](_0x1072cd,_0x1072cd+_0x1a2c1b),_0x4d43d6=await Promise[_0x1a1c76(0x268)](_0x24cc8e['map'](async _0x3b726f=>{const _0x2721d2=_0x1a1c76,_0x5e31b6=_0x3b726f[0x0],_0x259cce=_0x5e31b6[_0x2721d2(0x25f)];_0x3043d2[_0x2721d2(0x214)]('Fetching\x20journey\x20\x27'+_0x259cce+'\x27');const _0x21ad84=_0x5e31b6[_0x2721d2(0x231)]?_0xe3c608[_0x2721d2(0x23e)](_0x5e31b6['folderId'])||'':'',{createYamlContext:_0x5c74f9}=_0x358448(),_0x58a59b=[];for(const _0x4abfd9 of _0x3b726f){const _0x441964=await _0x2a178a['journey'][_0x2721d2(0x241)](_0x4abfd9['id']),_0x461a84=_0x441964[_0x2721d2(0x263)]?.[_0x2721d2(0x254)],_0x501183=_0x5c74f9(_0x4abfd9['id'],_0x461a84),_0x294685=await apiToYamlAsync(_0x441964,_0x501183);_0x58a59b['push']({'item':_0x4abfd9,'yaml':_0x294685});}let _0x4a9832;return _0x58a59b[_0x2721d2(0x24f)]===0x1?_0x4a9832=_0x58a59b[0x0][_0x2721d2(0x21a)]:_0x4a9832=buildMergedJourneyYaml(_0x58a59b),{'bundleName':_0x259cce,'folderPath':_0x21ad84,'finalYaml':_0x4a9832};}));_0x43c6f5[_0x1a1c76(0x20b)](..._0x4d43d6),_0x395269+=_0x24cc8e[_0x1a1c76(0x24f)],_0x3043d2['setExtra']('('+_0x395269+'/'+_0x18c3b2['length']+')');}return _0x43c6f5;},{'verbose':_0x2594b1['verbose']});for(const {bundleName:_0x685382,folderPath:_0x15a516,finalYaml:_0x1f49b5}of _0x41bbe3[_0x493df3(0x226)]){const _0x24edee=a34_0x318de8(_0x1f49b5),_0x41e613=_0x15a516?a34_0x5ed439[_0x493df3(0x251)](_0x1ff18a,_0x15a516):_0x1ff18a,_0x2a4616=sanitizeFileName(_0x685382),_0x36efb2=getUniqueFileName(_0x41e613,_0x2a4616,_0x20ca0d),_0x2cf4db=a34_0x5ed439[_0x493df3(0x251)](_0x41e613,_0x36efb2+'.yml');_0x587437[_0x493df3(0x20b)](prepareFile(_0x2cf4db,_0x24edee,_0x1ff18a));}}const _0x43df25=Array[_0x493df3(0x242)](_0x59a75c['values']())['reduce']((_0x5b4fe1,_0x3bd158)=>_0x5b4fe1+_0x3bd158[_0x493df3(0x24f)],0x0),_0x5852ed=_0x587437[_0x493df3(0x216)](_0x5577a6=>_0x5577a6['isNew']),_0x427b7f=_0x587437[_0x493df3(0x216)](_0x1f5405=>!_0x1f5405[_0x493df3(0x257)]&&_0x1f5405[_0x493df3(0x227)]),_0x3be316=_0x587437[_0x493df3(0x216)](_0x2260e9=>!_0x2260e9[_0x493df3(0x257)]&&!_0x2260e9[_0x493df3(0x227)]),_0x3edb48=_0x51fd65['filter'](_0x360c3b=>_0x360c3b[_0x493df3(0x235)]!==SEGMENT_KIND_JOURNEY);console[_0x493df3(0x208)](_0x493df3(0x23a)+_0x131124+'\x27:'),console[_0x493df3(0x208)](_0x493df3(0x202)+a34_0x2b6657[_0x493df3(0x211)](_0x3edb48['length']+_0x493df3(0x25a))+_0x493df3(0x224)+a34_0x2b6657[_0x493df3(0x211)](_0x43df25+_0x493df3(0x232)));if(_0x72bad5[_0x493df3(0x266)]>0x0){const _0x36cfb1=_0x45ca82['length'],_0x405716=_0x72bad5[_0x493df3(0x266)],_0x267af5=_0x36cfb1>_0x405716?'\x20('+_0x36cfb1+_0x493df3(0x219):'';console[_0x493df3(0x208)](_0x493df3(0x223)+a34_0x2b6657[_0x493df3(0x211)](_0x405716+_0x493df3(0x234))+a34_0x2b6657[_0x493df3(0x1fc)](_0x267af5));}console['error']('\x20\x20'+a34_0x2b6657[_0x493df3(0x20d)]('+\x20'+_0x5852ed[_0x493df3(0x24f)]+_0x493df3(0x262))),console[_0x493df3(0x208)]('\x20\x20'+a34_0x2b6657[_0x493df3(0x24e)]('~\x20'+_0x427b7f[_0x493df3(0x24f)]+_0x493df3(0x238))),console[_0x493df3(0x208)]('\x20\x20'+a34_0x2b6657[_0x493df3(0x1fc)]('=\x20'+_0x3be316['length']+_0x493df3(0x1ef))),console[_0x493df3(0x208)](_0x493df3(0x217)+a34_0x2b6657[_0x493df3(0x211)](_0x1ff18a)+'\x0a');if(_0x427b7f[_0x493df3(0x24f)]>0x0)for(const _0x26d410 of _0x427b7f){console[_0x493df3(0x208)](_0x493df3(0x239)+_0x26d410[_0x493df3(0x200)]+'\x27:'),console['error']('─'[_0x493df3(0x1f0)](0x3c)),console[_0x493df3(0x208)](_0x26d410['diff']),console[_0x493df3(0x208)]('─'[_0x493df3(0x1f0)](0x3c));}if(_0x2594b1[_0x493df3(0x249)])return console['error'](a34_0x2b6657[_0x493df3(0x24e)](_0x493df3(0x203))),0x0;if(_0x5852ed[_0x493df3(0x24f)]===0x0&&_0x427b7f[_0x493df3(0x24f)]===0x0)return console[_0x493df3(0x208)](a34_0x2b6657[_0x493df3(0x20d)](_0x493df3(0x209))),saveSessionContext({'parent_segment':_0x131124},_0x2594b1['session']),console[_0x493df3(0x208)](a34_0x2b6657[_0x493df3(0x20d)](_0x493df3(0x25c)+a34_0x2b6657[_0x493df3(0x1fc)](_0x493df3(0x258))+'\x20=\x20'+a34_0x2b6657['cyan'](_0x131124))),0x0;if(!_0x2594b1['yes']&&(_0x5852ed['length']>0x0||_0x427b7f[_0x493df3(0x24f)]>0x0)){const _0xbcd908=await confirmKey(_0x493df3(0x24b)+(_0x5852ed[_0x493df3(0x24f)]+_0x427b7f['length'])+_0x493df3(0x220));if(!_0xbcd908)return console[_0x493df3(0x208)](_0x493df3(0x20a)),0x1;}for(const _0x184e7c of _0x587437){if(_0x184e7c[_0x493df3(0x257)]||_0x184e7c[_0x493df3(0x227)]){const _0xe4f6f7=a34_0x5ed439[_0x493df3(0x201)](_0x184e7c[_0x493df3(0x21c)]);!existsSync(_0xe4f6f7)&&mkdirSync(_0xe4f6f7,{'recursive':!![]}),writeFileSync(_0x184e7c[_0x493df3(0x21c)],_0x184e7c[_0x493df3(0x225)],_0x493df3(0x20c));}}return console['error'](a34_0x2b6657[_0x493df3(0x20d)](_0x493df3(0x22c)+(_0x5852ed[_0x493df3(0x24f)]+_0x427b7f[_0x493df3(0x24f)])+_0x493df3(0x222)+_0x1ff18a)),saveSessionContext({'parent_segment':_0x131124},_0x2594b1[_0x493df3(0x1f2)]),console[_0x493df3(0x208)](a34_0x2b6657[_0x493df3(0x20d)](_0x493df3(0x25c)+a34_0x2b6657[_0x493df3(0x1fc)]('parent_segment')+_0x493df3(0x240)+a34_0x2b6657[_0x493df3(0x211)](_0x131124))),0x0;}}function buildFolderPathMap(_0xd3ca0e){const _0x56eb47=a34_0x1efa65,_0x57f429=new Map(),_0x2c47e7=new Map();for(const _0x34e2ac of _0xd3ca0e){_0x2c47e7[_0x56eb47(0x1fb)](_0x34e2ac['id'],_0x34e2ac);}const _0x522f55=new Set();for(const _0x320c1d of _0xd3ca0e){!_0x320c1d['parentFolderId']&&_0x522f55[_0x56eb47(0x23d)](_0x320c1d['id']);}function _0x1121d2(_0x128c0b){const _0x38c6b2=_0x56eb47;if(_0x57f429[_0x38c6b2(0x243)](_0x128c0b['id']))return _0x57f429[_0x38c6b2(0x23e)](_0x128c0b['id']);if(_0x522f55[_0x38c6b2(0x243)](_0x128c0b['id']))return _0x57f429[_0x38c6b2(0x1fb)](_0x128c0b['id'],''),'';if(_0x128c0b[_0x38c6b2(0x21d)]){const _0x2473fd=_0x2c47e7[_0x38c6b2(0x23e)](_0x128c0b[_0x38c6b2(0x21d)]);if(_0x2473fd){const _0x21f1a9=_0x1121d2(_0x2473fd),_0x2153f9=_0x21f1a9?_0x21f1a9+'/'+_0x128c0b[_0x38c6b2(0x1f9)]:_0x128c0b[_0x38c6b2(0x1f9)];return _0x57f429[_0x38c6b2(0x1fb)](_0x128c0b['id'],_0x2153f9),_0x2153f9;}}const _0x1d817f=_0x128c0b[_0x38c6b2(0x1f9)];return _0x57f429['set'](_0x128c0b['id'],_0x1d817f),_0x1d817f;}for(const _0xb5f72b of _0xd3ca0e){_0x1121d2(_0xb5f72b);}return _0x57f429;}function getUniqueFileName(_0x33be19,_0x4d73a0,_0x2ce36e){const _0x502f67=a34_0x1efa65,_0x34bc6b=_0x33be19+':'+_0x4d73a0,_0x59fed5=_0x2ce36e[_0x502f67(0x23e)](_0x34bc6b)||0x0;_0x2ce36e[_0x502f67(0x1fb)](_0x34bc6b,_0x59fed5+0x1);if(_0x59fed5===0x0)return _0x4d73a0;return _0x4d73a0+'-'+_0x59fed5;}function prepareFile(_0x30f6eb,_0x1c08d5,_0x3cefae){const _0xcaf3d6=a34_0x1efa65,_0x41ca99=a34_0x5ed439[_0xcaf3d6(0x21b)](_0x3cefae,_0x30f6eb);if(existsSync(_0x30f6eb)){const _0x3cac4c=readFileSync(_0x30f6eb,_0xcaf3d6(0x20c)),_0x416437=generateDiff(_0x3cac4c,_0x1c08d5),_0x484cee=hasChanges(_0x416437);return{'relativePath':_0x41ca99,'absolutePath':_0x30f6eb,'content':_0x1c08d5,'isNew':![],'hasChanges':_0x484cee,'diff':_0x484cee?formatDiffWithColors(_0x416437):undefined};}return{'relativePath':_0x41ca99,'absolutePath':_0x30f6eb,'content':_0x1c08d5,'isNew':!![],'hasChanges':![]};}
@@ -1 +1 @@
1
- {"version":3,"file":"segment-push-command.d.ts","sourceRoot":"","sources":["../../src/commands/segment-push-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AA0KhE;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,wDAAwD;IAEtE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA04CxD"}
1
+ {"version":3,"file":"segment-push-command.d.ts","sourceRoot":"","sources":["../../src/commands/segment-push-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAqMhE;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,wDAAwD;IAEtE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA4lDxD"}