@treasuredata/tdx 0.4.5 → 0.4.7

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 (90) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-api-client.js +1 -1
  5. package/dist/client/engage-api-client.js +1 -1
  6. package/dist/client/http-client.js +1 -1
  7. package/dist/client/llm-api-client.js +1 -1
  8. package/dist/client/rate-limiter.js +1 -1
  9. package/dist/client/td-api-client.js +1 -1
  10. package/dist/client/trino-api-client.js +1 -1
  11. package/dist/client/workflow-client.js +1 -1
  12. package/dist/commands/activations.js +1 -1
  13. package/dist/commands/api-command.js +1 -1
  14. package/dist/commands/auth-command.js +1 -1
  15. package/dist/commands/chat-command.js +1 -1
  16. package/dist/commands/claude-command.d.ts.map +1 -1
  17. package/dist/commands/claude-command.js +1 -1
  18. package/dist/commands/claude-command.js.map +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/context-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/job-command.js +1 -1
  25. package/dist/commands/llm-command.js +1 -1
  26. package/dist/commands/llm-proxy.js +1 -1
  27. package/dist/commands/parent-segment-command.js +1 -1
  28. package/dist/commands/profiles-command.js +1 -1
  29. package/dist/commands/query-command.js +1 -1
  30. package/dist/commands/segment-command.js +1 -1
  31. package/dist/commands/segment-create-command.js +1 -1
  32. package/dist/commands/segment-fields-command.js +1 -1
  33. package/dist/commands/segment-pwd-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segments.js +1 -1
  37. package/dist/commands/show.js +1 -1
  38. package/dist/commands/tables.js +1 -1
  39. package/dist/commands/use-command.js +1 -1
  40. package/dist/commands/workflow-command.js +1 -1
  41. package/dist/core/auth.js +1 -1
  42. package/dist/core/config.js +1 -1
  43. package/dist/core/credential-cache.js +1 -1
  44. package/dist/core/global-context.js +1 -1
  45. package/dist/core/keychain.js +1 -1
  46. package/dist/core/profile.js +1 -1
  47. package/dist/core/project-config.js +1 -1
  48. package/dist/core/session.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/proxy/anthropic-adapter.js +1 -1
  51. package/dist/proxy/server.js +1 -1
  52. package/dist/proxy/session-cache.js +1 -1
  53. package/dist/sdk/api.js +1 -1
  54. package/dist/sdk/engage.js +1 -1
  55. package/dist/sdk/errors.js +1 -1
  56. package/dist/sdk/index.js +1 -1
  57. package/dist/sdk/job.js +1 -1
  58. package/dist/sdk/llm.js +1 -1
  59. package/dist/sdk/query.js +1 -1
  60. package/dist/sdk/segment.js +1 -1
  61. package/dist/sdk/workflow.js +1 -1
  62. package/dist/types/endpoints.js +1 -1
  63. package/dist/types/index.js +1 -1
  64. package/dist/utils/agent-ref-parser.js +1 -1
  65. package/dist/utils/chat-cache.js +1 -1
  66. package/dist/utils/colors.js +1 -1
  67. package/dist/utils/command-output.js +1 -1
  68. package/dist/utils/constants.js +1 -1
  69. package/dist/utils/file-permissions.js +1 -1
  70. package/dist/utils/format-detector.js +1 -1
  71. package/dist/utils/formatters.js +1 -1
  72. package/dist/utils/json-loader.js +1 -1
  73. package/dist/utils/llm-backup-utils.js +1 -1
  74. package/dist/utils/model-aliases.js +1 -1
  75. package/dist/utils/option-validation.js +1 -1
  76. package/dist/utils/port.js +1 -1
  77. package/dist/utils/process.js +1 -1
  78. package/dist/utils/prompt.js +1 -1
  79. package/dist/utils/segment-path-parser.js +1 -1
  80. package/dist/utils/segment-ref-parser.js +1 -1
  81. package/dist/utils/spinner.js +1 -1
  82. package/dist/utils/sql-parser.js +1 -1
  83. package/dist/utils/sse-parser.js +1 -1
  84. package/dist/utils/string-utils.js +1 -1
  85. package/dist/utils/table-ref-parser.js +1 -1
  86. package/dist/utils/tdx-logger.js +1 -1
  87. package/dist/utils/tree-formatter.js +1 -1
  88. package/dist/utils/version-check.js +1 -1
  89. package/dist/utils/workflow-utils.js +1 -1
  90. package/package.json +6 -5
@@ -1 +1 @@
1
- const a21_0x3f5d35=a21_0x29a1;(function(_0x30e1ff,_0x5476f5){const _0x5270e6=a21_0x29a1,_0x4cea23=_0x30e1ff();while(!![]){try{const _0x32941e=parseInt(_0x5270e6(0x155))/0x1+-parseInt(_0x5270e6(0x136))/0x2+parseInt(_0x5270e6(0x147))/0x3+parseInt(_0x5270e6(0x142))/0x4*(parseInt(_0x5270e6(0x14e))/0x5)+-parseInt(_0x5270e6(0x12f))/0x6*(parseInt(_0x5270e6(0x140))/0x7)+parseInt(_0x5270e6(0x13e))/0x8+-parseInt(_0x5270e6(0x131))/0x9;if(_0x32941e===_0x5476f5)break;else _0x4cea23['push'](_0x4cea23['shift']());}catch(_0x4edfc0){_0x4cea23['push'](_0x4cea23['shift']());}}}(a21_0x483c,0xbc874));import a21_0x3f5b3e from'chalk';import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';function a21_0x29a1(_0x490524,_0x4354e0){const _0x483c17=a21_0x483c();return a21_0x29a1=function(_0x29a1fb,_0x478f13){_0x29a1fb=_0x29a1fb-0x122;let _0x351e85=_0x483c17[_0x29a1fb];return _0x351e85;},a21_0x29a1(_0x490524,_0x4354e0);}import{TDXLogger}from'../utils/tdx-logger.js';function a21_0x483c(){const _0x3a0565=['482766NiJtoo','stop','6620256fwNFRa','\x20\x20Create\x20a\x20.claude/settings.local.json\x20file\x20with:\x0a','\x0aClaude\x20Code\x20Configuration:','description','\x20\x20https://docs.claude.com/en/docs/agent-sdk/typescript','1675530uhEvut','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration','\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_MODEL\x22:\x20\x22sonnet\x22','init','log','\x20\x20\x20\x20\x22env\x22:\x20{','SIGTERM','start','7138872xrnsuG','\x20\x20}','28RILwQy','✓\x20Proxy\x20server\x20stopped','10660pMxfHv','Please\x20report\x20issues\x20at:\x20https://github.com/treasure-data/tdx/issues\x0a','exit','llm','green','8343sboDPG','site','bold','Port\x20','✓\x20TD\x20LLM\x20Proxy\x20Server\x20is\x20running!\x0a','\x0aTesting\x20with\x20Agent\x20SDK:','white','625lJiPul','\x0a\x0aShutting\x20down\x20proxy\x20server...','\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_BASE_URL\x22:\x20\x22http://127.0.0.1:','project','Server\x20Configuration:','\x20\x20Agents:','server','1439140KeDTHF','close','\x20\x20Address:','\x20\x20Project:','\x20\x20The\x20proxy\x20can\x20also\x20be\x20tested\x20with\x20Claude\x20Agent\x20SDK','NOT_FOUND','Starting\x20proxy\x20server...','SIGINT','name','\x20\x20\x20\x20}','llmProject','projects','\x20\x20The\x20SDK\x20reads\x20.claude/settings.json\x20for\x20ANTHROPIC_BASE_URL\x0a','\x0a⚠️\x20\x20EXPERIMENTAL\x20FEATURE','yellow','dim','llm:proxy','logger','logLevel','find','execute','cyan','Press\x20Ctrl+C\x20to\x20stop\x20the\x20server\x0a','\x27\x20not\x20found','attributes','http://0.0.0.0:','\x20is\x20unavailable,\x20using\x20port\x20'];a21_0x483c=function(){return _0x3a0565;};return a21_0x483c();}import{SDKError,ErrorCode}from'../sdk/errors.js';import{findAvailablePort}from'../utils/port.js';async function getProjectIdOrDefault(_0x537fd1,_0x10738a){const _0x3c9baa=a21_0x29a1,{tdx:_0x5a262f,options:_0x142117}=_0x537fd1,_0x470ab0=_0x10738a||_0x142117[_0x3c9baa(0x15f)];if(_0x470ab0){const _0x41a11b=await _0x5a262f[_0x3c9baa(0x145)][_0x3c9baa(0x160)](),_0x31e6dc=_0x41a11b[_0x3c9baa(0x127)](_0x53e2eb=>_0x53e2eb[_0x3c9baa(0x12c)][_0x3c9baa(0x15d)]===_0x470ab0);if(!_0x31e6dc)throw new SDKError(ErrorCode[_0x3c9baa(0x15a)],'Project\x20\x27'+_0x470ab0+_0x3c9baa(0x12b),undefined,{'helpText':'Use\x20\x22tdx\x20llm\x20projects\x22\x20to\x20see\x20available\x20projects'});return _0x31e6dc['id'];}const _0x583872=await _0x5a262f[_0x3c9baa(0x145)]['getOrCreateDefaultProject']();return _0x583872['id'];}export class LLMProxyCommand extends BaseCommand{[a21_0x3f5d35(0x15d)]=a21_0x3f5d35(0x124);[a21_0x3f5d35(0x134)]=a21_0x3f5d35(0x137);[a21_0x3f5d35(0x154)];[a21_0x3f5d35(0x125)];async[a21_0x3f5d35(0x128)](_0x5d1098){const _0x3f585b=a21_0x3f5d35,{tdx:_0x3baff3,options:_0x1b7989}=_0x5d1098;try{const _0x4153de=_0x1b7989,_0x1a8be8=_0x4153de['port']||0xfa0,_0x2d71ce=_0x4153de[_0x3f585b(0x151)],_0x59bd7a=await findAvailablePort(_0x1a8be8);console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x123)]('Resolving\x20project...'));const _0x3e0075=await getProjectIdOrDefault(_0x5d1098,_0x2d71ce),_0x1bf02f=await _0x3baff3[_0x3f585b(0x145)]['projects'](),_0x2254cc=_0x1bf02f[_0x3f585b(0x127)](_0x1829ec=>_0x1829ec['id']===_0x3e0075);this['logger']=new TDXLogger(_0x1b7989[_0x3f585b(0x126)]),await this[_0x3f585b(0x125)][_0x3f585b(0x139)](),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x15b)));_0x59bd7a!==_0x1a8be8&&console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x122)](_0x3f585b(0x14a)+_0x1a8be8+_0x3f585b(0x12e)+_0x59bd7a));this[_0x3f585b(0x154)]=new ProxyServer({'port':_0x59bd7a,'projectId':_0x3e0075,'tdx':_0x3baff3,'logger':this[_0x3f585b(0x125)],'site':_0x1b7989[_0x3f585b(0x148)]}),await this[_0x3f585b(0x154)][_0x3f585b(0x13d)](),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x122)][_0x3f585b(0x149)](_0x3f585b(0x162))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x122)]('This\x20proxy\x20server\x20is\x20experimental\x20and\x20may\x20have\x20limitations.')),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x122)](_0x3f585b(0x143))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x146)][_0x3f585b(0x149)](_0x3f585b(0x14b))),console['log'](a21_0x3f5b3e[_0x3f585b(0x129)](_0x3f585b(0x152))),console[_0x3f585b(0x13a)](a21_0x3f5b3e['dim'](_0x3f585b(0x157)),a21_0x3f5b3e[_0x3f585b(0x14d)](_0x3f585b(0x12d)+_0x59bd7a)),console['log'](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x158)),a21_0x3f5b3e[_0x3f585b(0x14d)](_0x2254cc?.['attributes']['name']||_0x3e0075)),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x153)),a21_0x3f5b3e[_0x3f585b(0x14d)]('created\x20on-demand\x20per\x20model')),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x123)]('\x20\x20Site:'),a21_0x3f5b3e[_0x3f585b(0x14d)](_0x1b7989[_0x3f585b(0x148)])),console['log'](a21_0x3f5b3e['cyan'](_0x3f585b(0x133))),console['log'](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x132))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x14d)]('\x20\x20{')),console[_0x3f585b(0x13a)](a21_0x3f5b3e['white'](_0x3f585b(0x13b))),console['log'](a21_0x3f5b3e['white'](_0x3f585b(0x150)+_0x59bd7a+'\x22,')),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x14d)](_0x3f585b(0x138))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x14d)](_0x3f585b(0x15e))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x14d)](_0x3f585b(0x13f))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x129)](_0x3f585b(0x14c))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x159))),console['log'](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x135))),console['log'](a21_0x3f5b3e[_0x3f585b(0x123)](_0x3f585b(0x161))),console[_0x3f585b(0x13a)](a21_0x3f5b3e[_0x3f585b(0x122)](_0x3f585b(0x12a)));const _0x3341bf=async()=>{const _0x49beb5=_0x3f585b;console[_0x49beb5(0x13a)](a21_0x3f5b3e['dim'](_0x49beb5(0x14f))),this[_0x49beb5(0x154)]&&await this[_0x49beb5(0x154)][_0x49beb5(0x130)](),this[_0x49beb5(0x125)]&&await this['logger']['close'](),console[_0x49beb5(0x13a)](a21_0x3f5b3e['green'](_0x49beb5(0x141))),process[_0x49beb5(0x144)](0x0);};return process['on'](_0x3f585b(0x15c),_0x3341bf),process['on'](_0x3f585b(0x13c),_0x3341bf),await new Promise(()=>{}),0x0;}catch(_0x493580){this[_0x3f585b(0x154)]&&await this[_0x3f585b(0x154)][_0x3f585b(0x130)]();this['logger']&&await this[_0x3f585b(0x125)][_0x3f585b(0x156)]();throw _0x493580;}}}
1
+ const a21_0x58f308=a21_0x5977;(function(_0x5c7216,_0x51f90c){const _0x1858a7=a21_0x5977,_0x50cac2=_0x5c7216();while(!![]){try{const _0x42447f=parseInt(_0x1858a7(0x117))/0x1+-parseInt(_0x1858a7(0x10e))/0x2*(parseInt(_0x1858a7(0x100))/0x3)+parseInt(_0x1858a7(0xe8))/0x4+-parseInt(_0x1858a7(0xf9))/0x5*(parseInt(_0x1858a7(0x11f))/0x6)+-parseInt(_0x1858a7(0xf1))/0x7+parseInt(_0x1858a7(0x11a))/0x8+parseInt(_0x1858a7(0x121))/0x9;if(_0x42447f===_0x51f90c)break;else _0x50cac2['push'](_0x50cac2['shift']());}catch(_0x77d90b){_0x50cac2['push'](_0x50cac2['shift']());}}}(a21_0x3a62,0x959e2));import a21_0x47cbae from'chalk';function a21_0x3a62(){const _0x24f387=['log','Server\x20Configuration:','\x20\x20Project:','1486412HlSRFt','\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_BASE_URL\x22:\x20\x22http://127.0.0.1:','logger','http://0.0.0.0:','yellow','\x20\x20The\x20SDK\x20reads\x20.claude/settings.json\x20for\x20ANTHROPIC_BASE_URL\x0a','\x0a\x0aShutting\x20down\x20proxy\x20server...','\x20\x20\x20\x20}','site','4201260YzruhW','dim','✓\x20Proxy\x20server\x20stopped','\x27\x20not\x20found','find','projects','Press\x20Ctrl+C\x20to\x20stop\x20the\x20server\x0a','NOT_FOUND','4145suOpgp','name','Resolving\x20project...','\x20\x20Site:','Please\x20report\x20issues\x20at:\x20https://github.com/treasure-data/tdx/issues\x0a','\x0aClaude\x20Code\x20Configuration:','llm','9bQbmPV','close','getOrCreateDefaultProject','port','description','exit','server','llm:proxy','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration','white','Use\x20\x22tdx\x20llm\x20projects\x22\x20to\x20see\x20available\x20projects','green','\x0a⚠️\x20\x20EXPERIMENTAL\x20FEATURE','cyan','526412csVAjS','start','This\x20proxy\x20server\x20is\x20experimental\x20and\x20may\x20have\x20limitations.','\x20\x20{','created\x20on-demand\x20per\x20model','Starting\x20proxy\x20server...','stop','bold','\x0aTesting\x20with\x20Agent\x20SDK:','446234qZeotX','project','init','7256512cdGHSB','Port\x20','\x20\x20Address:','SIGTERM','attributes','30JLohJx','execute','2536884uyIxlm','Project\x20\x27','\x20\x20}'];a21_0x3a62=function(){return _0x24f387;};return a21_0x3a62();}import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{TDXLogger}from'../utils/tdx-logger.js';import{SDKError,ErrorCode}from'../sdk/errors.js';function a21_0x5977(_0x3a1491,_0x576f0e){const _0x3a623f=a21_0x3a62();return a21_0x5977=function(_0x59774f,_0x197063){_0x59774f=_0x59774f-0xe6;let _0x220a60=_0x3a623f[_0x59774f];return _0x220a60;},a21_0x5977(_0x3a1491,_0x576f0e);}import{findAvailablePort}from'../utils/port.js';async function getProjectIdOrDefault(_0x193ea1,_0x13653d){const _0x5f1317=a21_0x5977,{tdx:_0x4c9a3a,options:_0x205e8a}=_0x193ea1,_0x393010=_0x13653d||_0x205e8a['llmProject'];if(_0x393010){const _0x3a2daa=await _0x4c9a3a[_0x5f1317(0xff)][_0x5f1317(0xf6)](),_0x566320=_0x3a2daa[_0x5f1317(0xf5)](_0x5c7ed5=>_0x5c7ed5[_0x5f1317(0x11e)][_0x5f1317(0xfa)]===_0x393010);if(!_0x566320)throw new SDKError(ErrorCode[_0x5f1317(0xf8)],_0x5f1317(0x122)+_0x393010+_0x5f1317(0xf4),undefined,{'helpText':_0x5f1317(0x10a)});return _0x566320['id'];}const _0x230893=await _0x4c9a3a[_0x5f1317(0xff)][_0x5f1317(0x102)]();return _0x230893['id'];}export class LLMProxyCommand extends BaseCommand{[a21_0x58f308(0xfa)]=a21_0x58f308(0x107);[a21_0x58f308(0x104)]=a21_0x58f308(0x108);[a21_0x58f308(0x106)];[a21_0x58f308(0xea)];async[a21_0x58f308(0x120)](_0x13ef79){const _0x28e468=a21_0x58f308,{tdx:_0x47d7d6,options:_0x26e183}=_0x13ef79;try{const _0x5e35b3=_0x26e183,_0x213b08=_0x5e35b3[_0x28e468(0x103)]||0xfa0,_0x1093d0=_0x5e35b3[_0x28e468(0x118)],_0xccba5c=await findAvailablePort(_0x213b08);console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)](_0x28e468(0xfb)));const _0x410fc7=await getProjectIdOrDefault(_0x13ef79,_0x1093d0),_0x1d3e6e=await _0x47d7d6[_0x28e468(0xff)][_0x28e468(0xf6)](),_0x5ed590=_0x1d3e6e['find'](_0xac705=>_0xac705['id']===_0x410fc7);this[_0x28e468(0xea)]=new TDXLogger(_0x26e183['logLevel']),await this['logger'][_0x28e468(0x119)](),console['log'](a21_0x47cbae[_0x28e468(0xf2)](_0x28e468(0x113)));_0xccba5c!==_0x213b08&&console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xec)](_0x28e468(0x11b)+_0x213b08+'\x20is\x20unavailable,\x20using\x20port\x20'+_0xccba5c));this[_0x28e468(0x106)]=new ProxyServer({'port':_0xccba5c,'projectId':_0x410fc7,'tdx':_0x47d7d6,'logger':this[_0x28e468(0xea)],'site':_0x26e183[_0x28e468(0xf0)]}),await this[_0x28e468(0x106)][_0x28e468(0x10f)](),console['log'](a21_0x47cbae[_0x28e468(0xec)][_0x28e468(0x115)](_0x28e468(0x10c))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xec)](_0x28e468(0x110))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xec)](_0x28e468(0xfd))),console['log'](a21_0x47cbae[_0x28e468(0x10b)]['bold']('✓\x20TD\x20LLM\x20Proxy\x20Server\x20is\x20running!\x0a')),console['log'](a21_0x47cbae['cyan'](_0x28e468(0xe6))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)](_0x28e468(0x11c)),a21_0x47cbae[_0x28e468(0x109)](_0x28e468(0xeb)+_0xccba5c)),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)](_0x28e468(0xe7)),a21_0x47cbae[_0x28e468(0x109)](_0x5ed590?.[_0x28e468(0x11e)][_0x28e468(0xfa)]||_0x410fc7)),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)]('\x20\x20Agents:'),a21_0x47cbae['white'](_0x28e468(0x112))),console['log'](a21_0x47cbae['dim'](_0x28e468(0xfc)),a21_0x47cbae[_0x28e468(0x109)](_0x26e183[_0x28e468(0xf0)])),console['log'](a21_0x47cbae['cyan'](_0x28e468(0xfe))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)]('\x20\x20Create\x20a\x20.claude/settings.local.json\x20file\x20with:\x0a')),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0x109)](_0x28e468(0x111))),console['log'](a21_0x47cbae[_0x28e468(0x109)]('\x20\x20\x20\x20\x22env\x22:\x20{')),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0x109)](_0x28e468(0xe9)+_0xccba5c+'\x22,')),console['log'](a21_0x47cbae[_0x28e468(0x109)]('\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_MODEL\x22:\x20\x22sonnet\x22')),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0x109)](_0x28e468(0xef))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0x109)](_0x28e468(0x123))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0x10d)](_0x28e468(0x116))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)]('\x20\x20The\x20proxy\x20can\x20also\x20be\x20tested\x20with\x20Claude\x20Agent\x20SDK')),console['log'](a21_0x47cbae[_0x28e468(0xf2)]('\x20\x20https://docs.claude.com/en/docs/agent-sdk/typescript')),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xf2)](_0x28e468(0xed))),console[_0x28e468(0x124)](a21_0x47cbae[_0x28e468(0xec)](_0x28e468(0xf7)));const _0x30b715=async()=>{const _0x545da1=_0x28e468;console['log'](a21_0x47cbae[_0x545da1(0xf2)](_0x545da1(0xee))),this[_0x545da1(0x106)]&&await this['server'][_0x545da1(0x114)](),this[_0x545da1(0xea)]&&await this[_0x545da1(0xea)][_0x545da1(0x101)](),console[_0x545da1(0x124)](a21_0x47cbae[_0x545da1(0x10b)](_0x545da1(0xf3))),process[_0x545da1(0x105)](0x0);};return process['on']('SIGINT',_0x30b715),process['on'](_0x28e468(0x11d),_0x30b715),await new Promise(()=>{}),0x0;}catch(_0x38b96b){this[_0x28e468(0x106)]&&await this[_0x28e468(0x106)][_0x28e468(0x114)]();this['logger']&&await this['logger'][_0x28e468(0x101)]();throw _0x38b96b;}}}
@@ -1 +1 @@
1
- const a22_0x11fef3=a22_0x5ec7;(function(_0x4a4c8c,_0x5303df){const _0x1cca09=a22_0x5ec7,_0x3055e8=_0x4a4c8c();while(!![]){try{const _0x2231e2=-parseInt(_0x1cca09(0xcc))/0x1+-parseInt(_0x1cca09(0xb0))/0x2+-parseInt(_0x1cca09(0xc7))/0x3+parseInt(_0x1cca09(0xb8))/0x4*(parseInt(_0x1cca09(0xab))/0x5)+-parseInt(_0x1cca09(0xaa))/0x6+-parseInt(_0x1cca09(0xc6))/0x7+parseInt(_0x1cca09(0xbf))/0x8;if(_0x2231e2===_0x5303df)break;else _0x3055e8['push'](_0x3055e8['shift']());}catch(_0x57060a){_0x3055e8['push'](_0x3055e8['shift']());}}}(a22_0x2dc1,0x1ce46));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';export class ParentSegmentCreateCommand extends BaseCommand{[a22_0x11fef3(0xd8)]='segment:parent:create';[a22_0x11fef3(0xd2)]=a22_0x11fef3(0xc4);async['execute'](_0x38f072){const _0x50da32=a22_0x11fef3,{options:_0x39b11a,args:_0x5ec9b5,tdx:_0x5aed9c}=_0x38f072,_0x468663=_0x39b11a;if(_0x5ec9b5[_0x50da32(0xd3)]===0x0)return console[_0x50da32(0xba)](_0x50da32(0xaf)),console[_0x50da32(0xba)](_0x50da32(0xbb)),0x1;const _0x2e9b86=_0x5ec9b5[0x0];if(!_0x468663[_0x50da32(0xd9)]||!_0x468663[_0x50da32(0xb9)])return console[_0x50da32(0xba)](_0x50da32(0xb7)),console['error'](_0x50da32(0xbb)),0x1;_0x468663['verbose']&&(console[_0x50da32(0xba)](_0x50da32(0xd1)+_0x468663[_0x50da32(0xd7)]),console[_0x50da32(0xba)](_0x50da32(0xc1)+_0x2e9b86),console[_0x50da32(0xba)](_0x50da32(0xb5)+_0x468663[_0x50da32(0xd9)]),console[_0x50da32(0xba)](_0x50da32(0xb2)+_0x468663[_0x50da32(0xb9)]));const _0x4003ef=await loadJSONFromOptions(_0x468663[_0x50da32(0xbc)],_0x468663[_0x50da32(0xbd)]),_0x2cf637=await loadJSONFromOptions(_0x468663[_0x50da32(0xb4)],_0x468663[_0x50da32(0xae)]),_0x2a5da5=await loadJSONFromOptions(_0x468663[_0x50da32(0xcb)],_0x468663[_0x50da32(0xc3)]),_0x2f8075={'name':_0x2e9b86,'description':_0x468663[_0x50da32(0xd2)],'scheduleType':_0x468663[_0x50da32(0xca)],'scheduleOption':_0x468663[_0x50da32(0xcf)],'timezone':_0x468663[_0x50da32(0xd6)],'master':{'parentDatabaseName':_0x468663['database'],'parentTableName':_0x468663['table']},'attributes':_0x4003ef,'behaviors':_0x2cf637,'customerGroup':_0x2a5da5},_0x8e19df=await withSpinner(_0x50da32(0xc9)+_0x2e9b86+'\x27...',()=>_0x5aed9c[_0x50da32(0xc2)][_0x50da32(0xda)](_0x2f8075),{'verbose':_0x39b11a[_0x50da32(0xd4)]}),_0x406371=_0x8e19df[_0x50da32(0xad)];return console['error'](_0x50da32(0xcd)+_0x406371[_0x50da32(0xd8)]+_0x50da32(0xd5)+_0x406371['id']),await handleSDKOutput([_0x406371],_0x39b11a),0x0;}}function a22_0x5ec7(_0x5bc50f,_0x429b27){const _0x2dc197=a22_0x2dc1();return a22_0x5ec7=function(_0x5ec72c,_0x482d3b){_0x5ec72c=_0x5ec72c-0xa9;let _0x3424dc=_0x2dc197[_0x5ec72c];return _0x3424dc;},a22_0x5ec7(_0x5bc50f,_0x429b27);}function a22_0x2dc1(){const _0x11d1c6=['site','name','database','createParent','✔\x20Updated\x20parent\x20segment\x20\x27','1144224wCnlVW','5eJccJY','addBehaviors','data','behaviorsFile','Error:\x20Parent\x20segment\x20name\x20is\x20required','412838CYxgFv','Fetching\x20current\x20configuration\x20for\x20\x27','Table:\x20','addBehaviorsFile','behaviors','Database:\x20','getParentFull','Error:\x20--database\x20and\x20--table\x20are\x20required','7972PXGEED','table','error','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','attributes','attributesFile','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','6916088pSKHls','addAttributes','Name:\x20','segment','customerGroupFile','Create\x20new\x20parent\x20segment\x20(audience)','Update\x20existing\x20parent\x20segment\x20(audience)','547414oUawiY','467922ybGolW','\x27...','Creating\x20parent\x20segment\x20\x27','scheduleType','customerGroup','116863bEsveh','✔\x20Created\x20parent\x20segment\x20\x27','updateParent','scheduleOption','master','Site:\x20','description','length','verbose','\x27\x20with\x20ID:\x20','timezone'];a22_0x2dc1=function(){return _0x11d1c6;};return a22_0x2dc1();}export class ParentSegmentUpdateCommand extends BaseCommand{['name']='segment:parent:update';[a22_0x11fef3(0xd2)]=a22_0x11fef3(0xc5);async['execute'](_0x238a6a){const _0x572cc8=a22_0x11fef3,{options:_0x4a685a,args:_0x18bbc6,tdx:_0x35823d}=_0x238a6a,_0x5465af=_0x4a685a;if(_0x18bbc6['length']===0x0)return console[_0x572cc8(0xba)](_0x572cc8(0xaf)),console[_0x572cc8(0xba)](_0x572cc8(0xbe)),0x1;const _0x2be581=_0x18bbc6[0x0];_0x5465af[_0x572cc8(0xd4)]&&(console[_0x572cc8(0xba)]('Site:\x20'+_0x5465af[_0x572cc8(0xd7)]),console['error']('Parent\x20segment:\x20'+_0x2be581));const _0x426837=await withSpinner(_0x572cc8(0xb1)+_0x2be581+_0x572cc8(0xc8),()=>_0x35823d['segment'][_0x572cc8(0xb6)](_0x2be581),{'verbose':_0x5465af[_0x572cc8(0xd4)]}),_0x2be697=_0x426837[_0x572cc8(0xad)],_0x135511=await loadJSONFromOptions(_0x5465af[_0x572cc8(0xc0)],_0x5465af['addAttributesFile']),_0x397316=await loadJSONFromOptions(_0x5465af[_0x572cc8(0xac)],_0x5465af[_0x572cc8(0xb3)]),_0x556e61={'name':_0x2be697[_0x572cc8(0xd8)],'description':_0x5465af[_0x572cc8(0xd2)]!==undefined?_0x5465af['description']:_0x2be697[_0x572cc8(0xd2)],'scheduleType':_0x5465af[_0x572cc8(0xca)]!==undefined?_0x5465af['scheduleType']:_0x2be697[_0x572cc8(0xca)],'scheduleOption':_0x5465af[_0x572cc8(0xcf)]!==undefined?_0x5465af['scheduleOption']:_0x2be697[_0x572cc8(0xcf)],'timezone':_0x5465af[_0x572cc8(0xd6)]!==undefined?_0x5465af[_0x572cc8(0xd6)]:_0x2be697[_0x572cc8(0xd6)],'master':_0x2be697[_0x572cc8(0xd0)],'attributes':_0x135511?[..._0x2be697[_0x572cc8(0xbc)]||[],..._0x135511]:_0x2be697[_0x572cc8(0xbc)],'behaviors':_0x397316?[..._0x2be697[_0x572cc8(0xb4)]||[],..._0x397316]:_0x2be697['behaviors'],'customerGroup':_0x2be697[_0x572cc8(0xcb)]},_0x1b0498=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x2be581+'\x27...',()=>_0x35823d[_0x572cc8(0xc2)][_0x572cc8(0xce)](_0x2be581,_0x556e61),{'verbose':_0x5465af[_0x572cc8(0xd4)]}),_0x3cc4d9=_0x1b0498[_0x572cc8(0xad)];return console[_0x572cc8(0xba)](_0x572cc8(0xa9)+_0x3cc4d9[_0x572cc8(0xd8)]+'\x27'),await handleSDKOutput([_0x3cc4d9],_0x5465af),0x0;}}
1
+ const a22_0x12ccdc=a22_0x5923;(function(_0xc92f5a,_0x463b05){const _0x50294a=a22_0x5923,_0x309fcb=_0xc92f5a();while(!![]){try{const _0x43d191=-parseInt(_0x50294a(0x1b7))/0x1*(parseInt(_0x50294a(0x196))/0x2)+parseInt(_0x50294a(0x199))/0x3+parseInt(_0x50294a(0x1b3))/0x4+parseInt(_0x50294a(0x1b6))/0x5+parseInt(_0x50294a(0x1b5))/0x6*(-parseInt(_0x50294a(0x19a))/0x7)+parseInt(_0x50294a(0x1ad))/0x8*(parseInt(_0x50294a(0x1c0))/0x9)+-parseInt(_0x50294a(0x1a0))/0xa;if(_0x43d191===_0x463b05)break;else _0x309fcb['push'](_0x309fcb['shift']());}catch(_0x74eeb1){_0x309fcb['push'](_0x309fcb['shift']());}}}(a22_0x31cc,0xd8c92));function a22_0x5923(_0x58d15c,_0x16c2e0){const _0x31ccab=a22_0x31cc();return a22_0x5923=function(_0x592336,_0x5532c3){_0x592336=_0x592336-0x191;let _0xeed090=_0x31ccab[_0x592336];return _0xeed090;},a22_0x5923(_0x58d15c,_0x16c2e0);}function a22_0x31cc(){const _0x213587=['8767620NnKjfL','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Site:\x20','description','data','scheduleOption','segment','Fetching\x20current\x20configuration\x20for\x20\x27','behaviorsFile','execute','\x27...','customerGroupFile','site','3931920axCDzH','✔\x20Updated\x20parent\x20segment\x20\x27','timezone','database','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','length','1423564gxagId','Parent\x20segment:\x20','6eYirBS','4956925YIIjoI','450lqAjfa','error','behaviors','verbose','createParent','addBehaviors','✔\x20Created\x20parent\x20segment\x20\x27','Error:\x20Parent\x20segment\x20name\x20is\x20required','name','9JMqKFv','Database:\x20','addAttributesFile','segment:parent:create','Create\x20new\x20parent\x20segment\x20(audience)','customerGroup','Update\x20existing\x20parent\x20segment\x20(audience)','table','attributes','4358oxVSCP','addAttributes','Creating\x20parent\x20segment\x20\x27','3160665VhDdBq','1029385yhVUhm','scheduleType','attributesFile','addBehaviorsFile','Updating\x20parent\x20segment\x20\x27','master'];a22_0x31cc=function(){return _0x213587;};return a22_0x31cc();}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';export class ParentSegmentCreateCommand extends BaseCommand{['name']=a22_0x12ccdc(0x1c3);[a22_0x12ccdc(0x1a3)]=a22_0x12ccdc(0x191);async[a22_0x12ccdc(0x1a9)](_0x345661){const _0x165804=a22_0x12ccdc,{options:_0x49c8d6,args:_0x2b098,tdx:_0x375d50}=_0x345661,_0x19ed2c=_0x49c8d6;if(_0x2b098[_0x165804(0x1b2)]===0x0)return console[_0x165804(0x1b8)](_0x165804(0x1be)),console['error'](_0x165804(0x1a1)),0x1;const _0x26db2f=_0x2b098[0x0];if(!_0x19ed2c[_0x165804(0x1b0)]||!_0x19ed2c['table'])return console[_0x165804(0x1b8)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x165804(0x1b8)](_0x165804(0x1a1)),0x1;_0x19ed2c[_0x165804(0x1ba)]&&(console[_0x165804(0x1b8)](_0x165804(0x1a2)+_0x19ed2c[_0x165804(0x1ac)]),console[_0x165804(0x1b8)]('Name:\x20'+_0x26db2f),console[_0x165804(0x1b8)](_0x165804(0x1c1)+_0x19ed2c['database']),console[_0x165804(0x1b8)]('Table:\x20'+_0x19ed2c[_0x165804(0x194)]));const _0x12d713=await loadJSONFromOptions(_0x19ed2c[_0x165804(0x195)],_0x19ed2c[_0x165804(0x19c)]),_0xcbed50=await loadJSONFromOptions(_0x19ed2c[_0x165804(0x1b9)],_0x19ed2c[_0x165804(0x1a8)]),_0x136f7=await loadJSONFromOptions(_0x19ed2c[_0x165804(0x192)],_0x19ed2c[_0x165804(0x1ab)]),_0x3bb3b2={'name':_0x26db2f,'description':_0x19ed2c[_0x165804(0x1a3)],'scheduleType':_0x19ed2c[_0x165804(0x19b)],'scheduleOption':_0x19ed2c[_0x165804(0x1a5)],'timezone':_0x19ed2c[_0x165804(0x1af)],'master':{'parentDatabaseName':_0x19ed2c[_0x165804(0x1b0)],'parentTableName':_0x19ed2c[_0x165804(0x194)]},'attributes':_0x12d713,'behaviors':_0xcbed50,'customerGroup':_0x136f7},_0x326e24=await withSpinner(_0x165804(0x198)+_0x26db2f+'\x27...',()=>_0x375d50[_0x165804(0x1a6)][_0x165804(0x1bb)](_0x3bb3b2),{'verbose':_0x49c8d6[_0x165804(0x1ba)]}),_0x226caf=_0x326e24[_0x165804(0x1a4)];return console['error'](_0x165804(0x1bd)+_0x226caf[_0x165804(0x1bf)]+'\x27\x20with\x20ID:\x20'+_0x226caf['id']),await handleSDKOutput([_0x226caf],_0x49c8d6),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a22_0x12ccdc(0x1bf)]='segment:parent:update';[a22_0x12ccdc(0x1a3)]=a22_0x12ccdc(0x193);async[a22_0x12ccdc(0x1a9)](_0x64e871){const _0x4253cd=a22_0x12ccdc,{options:_0x1afa17,args:_0x4de8ed,tdx:_0x5ea16d}=_0x64e871,_0x5f5456=_0x1afa17;if(_0x4de8ed[_0x4253cd(0x1b2)]===0x0)return console['error'](_0x4253cd(0x1be)),console[_0x4253cd(0x1b8)](_0x4253cd(0x1b1)),0x1;const _0x1af36c=_0x4de8ed[0x0];_0x5f5456[_0x4253cd(0x1ba)]&&(console[_0x4253cd(0x1b8)](_0x4253cd(0x1a2)+_0x5f5456[_0x4253cd(0x1ac)]),console[_0x4253cd(0x1b8)](_0x4253cd(0x1b4)+_0x1af36c));const _0x29cec8=await withSpinner(_0x4253cd(0x1a7)+_0x1af36c+_0x4253cd(0x1aa),()=>_0x5ea16d[_0x4253cd(0x1a6)]['getParentFull'](_0x1af36c),{'verbose':_0x5f5456['verbose']}),_0x5ae4f4=_0x29cec8[_0x4253cd(0x1a4)],_0x189da9=await loadJSONFromOptions(_0x5f5456[_0x4253cd(0x197)],_0x5f5456[_0x4253cd(0x1c2)]),_0x238e17=await loadJSONFromOptions(_0x5f5456[_0x4253cd(0x1bc)],_0x5f5456[_0x4253cd(0x19d)]),_0x51cb6f={'name':_0x5ae4f4[_0x4253cd(0x1bf)],'description':_0x5f5456[_0x4253cd(0x1a3)]!==undefined?_0x5f5456[_0x4253cd(0x1a3)]:_0x5ae4f4[_0x4253cd(0x1a3)],'scheduleType':_0x5f5456[_0x4253cd(0x19b)]!==undefined?_0x5f5456[_0x4253cd(0x19b)]:_0x5ae4f4[_0x4253cd(0x19b)],'scheduleOption':_0x5f5456['scheduleOption']!==undefined?_0x5f5456[_0x4253cd(0x1a5)]:_0x5ae4f4['scheduleOption'],'timezone':_0x5f5456[_0x4253cd(0x1af)]!==undefined?_0x5f5456['timezone']:_0x5ae4f4[_0x4253cd(0x1af)],'master':_0x5ae4f4[_0x4253cd(0x19f)],'attributes':_0x189da9?[..._0x5ae4f4[_0x4253cd(0x195)]||[],..._0x189da9]:_0x5ae4f4[_0x4253cd(0x195)],'behaviors':_0x238e17?[..._0x5ae4f4[_0x4253cd(0x1b9)]||[],..._0x238e17]:_0x5ae4f4[_0x4253cd(0x1b9)],'customerGroup':_0x5ae4f4['customerGroup']},_0x275139=await withSpinner(_0x4253cd(0x19e)+_0x1af36c+_0x4253cd(0x1aa),()=>_0x5ea16d['segment']['updateParent'](_0x1af36c,_0x51cb6f),{'verbose':_0x5f5456['verbose']}),_0x21df39=_0x275139[_0x4253cd(0x1a4)];return console[_0x4253cd(0x1b8)](_0x4253cd(0x1ae)+_0x21df39[_0x4253cd(0x1bf)]+'\x27'),await handleSDKOutput([_0x21df39],_0x5f5456),0x0;}}
@@ -1 +1 @@
1
- const a23_0x3b266f=a23_0x3b60;(function(_0x16a397,_0x2ec0f9){const _0x3d3280=a23_0x3b60,_0x213c96=_0x16a397();while(!![]){try{const _0x382691=-parseInt(_0x3d3280(0x1c3))/0x1+-parseInt(_0x3d3280(0x1b8))/0x2+-parseInt(_0x3d3280(0x1b1))/0x3*(parseInt(_0x3d3280(0x1b5))/0x4)+parseInt(_0x3d3280(0x1bf))/0x5+-parseInt(_0x3d3280(0x1b7))/0x6*(parseInt(_0x3d3280(0x1b6))/0x7)+parseInt(_0x3d3280(0x1b9))/0x8*(parseInt(_0x3d3280(0x1c5))/0x9)+parseInt(_0x3d3280(0x1c6))/0xa;if(_0x382691===_0x2ec0f9)break;else _0x213c96['push'](_0x213c96['shift']());}catch(_0x2a610e){_0x213c96['push'](_0x213c96['shift']());}}}(a23_0x399c,0x576f2));import{BaseCommand}from'./command.js';import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';function a23_0x3b60(_0x40e16e,_0x608abf){const _0x399cbd=a23_0x399c();return a23_0x3b60=function(_0x3b60ab,_0x511764){_0x3b60ab=_0x3b60ab-0x1b1;let _0x2248b3=_0x399cbd[_0x3b60ab];return _0x2248b3;},a23_0x3b60(_0x40e16e,_0x608abf);}function a23_0x399c(){const _0xb3cf93=['365172UyvJhj','957010BkYutR','4848632LrpMSx','log','profiles','description','Error:\x20','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','2538775ktSzcC','error','execute','scope','508041UEcUNQ','No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a','9EtQNZc','7829080lzMOQh','87LtEVrL','name','length','\x20\x20Global:\x20~/.config/tdx/tdx.json','42568Vttset','28QOWMFh'];a23_0x399c=function(){return _0xb3cf93;};return a23_0x399c();}import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{[a23_0x3b266f(0x1b2)]=a23_0x3b266f(0x1bb);['description']='List\x20all\x20available\x20profiles';async[a23_0x3b266f(0x1c1)](_0x58df7f){const _0x490deb=a23_0x3b266f,{options:_0x82d60e}=_0x58df7f;try{const _0x56d865=listProfiles(),_0x33ae92=getActiveProfile();if(_0x56d865[_0x490deb(0x1b3)]===0x0)return console['log'](_0x490deb(0x1c4)),console[_0x490deb(0x1ba)](_0x490deb(0x1be)),console[_0x490deb(0x1ba)](_0x490deb(0x1b4)),0x0;const _0x31de42=_0x56d865['map'](_0x35eed0=>{const _0x2f6e1e=_0x490deb,_0x2e2f21=_0x35eed0[_0x2f6e1e(0x1b2)]===_0x33ae92,_0x1b76f3=getProfileParams(_0x35eed0['config']);return{'name':_0x35eed0[_0x2f6e1e(0x1b2)],'active':_0x2e2f21,'scope':_0x35eed0[_0x2f6e1e(0x1c2)],'description':_0x35eed0['config'][_0x2f6e1e(0x1bc)]||'','params':_0x1b76f3};});return await handleSDKOutput(_0x31de42,_0x82d60e),0x0;}catch(_0x3029fe){return _0x3029fe instanceof Error&&console[_0x490deb(0x1c0)](_0x490deb(0x1bd)+_0x3029fe['message']),0x1;}}}
1
+ const a23_0x2d6f8f=a23_0x6c6b;function a23_0x5df6(){const _0xccc886=['58852442XdRNkW','length','10876134XmQvCo','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','1697668CBulcZ','10sPelgT','5730513QfJxFH','917384stTAim','7NBpgZJ','1zOVoJe','config','13833801eAjGUt','1641800fWOidr','name','5qpEfKr','\x20\x20Global:\x20~/.config/tdx/tdx.json','List\x20all\x20available\x20profiles','log','profiles','description','message','scope','12ihQtuq'];a23_0x5df6=function(){return _0xccc886;};return a23_0x5df6();}function a23_0x6c6b(_0x522efe,_0x423c8c){const _0x5df689=a23_0x5df6();return a23_0x6c6b=function(_0x6c6bb5,_0x53a7ba){_0x6c6bb5=_0x6c6bb5-0x6e;let _0x43a7d5=_0x5df689[_0x6c6bb5];return _0x43a7d5;},a23_0x6c6b(_0x522efe,_0x423c8c);}(function(_0xc539f,_0x1d502b){const _0x287931=a23_0x6c6b,_0x3f8b03=_0xc539f();while(!![]){try{const _0xad7772=parseInt(_0x287931(0x7a))/0x1*(parseInt(_0x287931(0x78))/0x2)+parseInt(_0x287931(0x77))/0x3+parseInt(_0x287931(0x75))/0x4*(parseInt(_0x287931(0x7f))/0x5)+parseInt(_0x287931(0x73))/0x6*(parseInt(_0x287931(0x79))/0x7)+parseInt(_0x287931(0x7d))/0x8+-parseInt(_0x287931(0x7c))/0x9*(-parseInt(_0x287931(0x76))/0xa)+-parseInt(_0x287931(0x71))/0xb*(parseInt(_0x287931(0x70))/0xc);if(_0xad7772===_0x1d502b)break;else _0x3f8b03['push'](_0x3f8b03['shift']());}catch(_0x2b77e0){_0x3f8b03['push'](_0x3f8b03['shift']());}}}(a23_0x5df6,0xf3aad));import{BaseCommand}from'./command.js';import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{[a23_0x2d6f8f(0x7e)]=a23_0x2d6f8f(0x83);['description']=a23_0x2d6f8f(0x81);async['execute'](_0x52235c){const _0x2dd73a=a23_0x2d6f8f,{options:_0xc83717}=_0x52235c;try{const _0x2cd4cf=listProfiles(),_0x40f5cf=getActiveProfile();if(_0x2cd4cf[_0x2dd73a(0x72)]===0x0)return console[_0x2dd73a(0x82)]('No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a'),console[_0x2dd73a(0x82)](_0x2dd73a(0x74)),console['log'](_0x2dd73a(0x80)),0x0;const _0x2ebe6f=_0x2cd4cf['map'](_0x2ec0c3=>{const _0x555cf0=_0x2dd73a,_0x24d212=_0x2ec0c3[_0x555cf0(0x7e)]===_0x40f5cf,_0x2505cd=getProfileParams(_0x2ec0c3[_0x555cf0(0x7b)]);return{'name':_0x2ec0c3[_0x555cf0(0x7e)],'active':_0x24d212,'scope':_0x2ec0c3[_0x555cf0(0x6f)],'description':_0x2ec0c3[_0x555cf0(0x7b)][_0x555cf0(0x84)]||'','params':_0x2505cd};});return await handleSDKOutput(_0x2ebe6f,_0xc83717),0x0;}catch(_0x5e1b3f){return _0x5e1b3f instanceof Error&&console['error']('Error:\x20'+_0x5e1b3f[_0x2dd73a(0x6e)]),0x1;}}}
@@ -1 +1 @@
1
- const a24_0x5d2fc6=a24_0x1b00;function a24_0x1b00(_0x1ee25e,_0x314001){const _0x587708=a24_0x5877();return a24_0x1b00=function(_0x1b0002,_0x5bc754){_0x1b0002=_0x1b0002-0xaf;let _0x229aff=_0x587708[_0x1b0002];return _0x229aff;},a24_0x1b00(_0x1ee25e,_0x314001);}(function(_0x536666,_0x47977f){const _0x1b3127=a24_0x1b00,_0x309d77=_0x536666();while(!![]){try{const _0x33024f=parseInt(_0x1b3127(0xd9))/0x1*(parseInt(_0x1b3127(0xc1))/0x2)+-parseInt(_0x1b3127(0xd7))/0x3+parseInt(_0x1b3127(0xc3))/0x4*(parseInt(_0x1b3127(0xb7))/0x5)+parseInt(_0x1b3127(0xd4))/0x6+parseInt(_0x1b3127(0xca))/0x7+parseInt(_0x1b3127(0xe0))/0x8*(parseInt(_0x1b3127(0xd6))/0x9)+-parseInt(_0x1b3127(0xb1))/0xa*(parseInt(_0x1b3127(0xbf))/0xb);if(_0x33024f===_0x47977f)break;else _0x309d77['push'](_0x309d77['shift']());}catch(_0x1fbd7f){_0x309d77['push'](_0x309d77['shift']());}}}(a24_0x5877,0x81bfe));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a24_0x5877(){const _0x5afb20=['information_schema','3687576LAzqSj','query','state','Error:\x20','5590zAKZsx','file','jobId','\x20[Job\x20ID:\x20','error','Schema:\x20','4509705UhSUKN','processedRows','Executing\x20query\x20[','database','name','verbose','message','setExtra','43483tTjukx','elapsedTimeMillis','1975882AFNuAu','originalMessage','4HkSikZ','\x20splits','description','\x20rows\x20','Executing\x20query...','output','\x0aAll\x20results\x20saved\x20to\x20','4591524AORgPF','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','args','\x20-\x20','join','Query\x20completed:\x20Processed\x20','validate','Statement\x20','options','data','471618zYFcau','site','9PVSdHr','1032549GPyVia','completedSplits','1FhYLRI','push','length','Site:\x20','stats','setJobId'];a24_0x5877=function(){return _0x5afb20;};return a24_0x5877();}import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';import{readSqlStatementsFromFile,splitSqlStatements}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{[a24_0x5d2fc6(0xbb)]=a24_0x5d2fc6(0xe1);[a24_0x5d2fc6(0xc5)]='Run\x20Trino\x20queries\x20(streaming)';async['execute'](_0x360ba9){const _0x1b7c82=a24_0x5d2fc6,{options:_0x3d76e7,args:_0x558ec6,tdx:_0xbee988}=_0x360ba9,_0x274569=_0x558ec6[0x0],_0x4d464c=_0x3d76e7['file'];let _0x6b21d9;if(_0x4d464c)try{_0x6b21d9=readSqlStatementsFromFile(_0x4d464c);}catch(_0x1992af){return console[_0x1b7c82(0xb5)]('Error:\x20'+_0x1992af[_0x1b7c82(0xbd)]),0x1;}else try{_0x6b21d9=splitSqlStatements(_0x274569);}catch(_0x217dd4){return console['error'](_0x1b7c82(0xb0)+_0x217dd4['message']),0x1;}const _0x24ef0e=_0x3d76e7[_0x1b7c82(0xba)]||_0x1b7c82(0xdf),_0x2db84a=_0x3d76e7['catalog'];try{const _0x167e7e=[],_0x377a4c=!!_0x3d76e7[_0x1b7c82(0xc8)];for(let _0x230bf5=0x0;_0x230bf5<_0x6b21d9[_0x1b7c82(0xdb)];_0x230bf5++){const _0x213f10=_0x6b21d9[_0x230bf5],_0x9b4fd6=_0x230bf5+0x1,_0x3461db=_0x6b21d9['length'],_0xb79fa=_0x3461db>0x1;_0x3d76e7[_0x1b7c82(0xbc)]&&(console[_0x1b7c82(0xb5)]('\x0a'+(_0xb79fa?_0x1b7c82(0xd1)+_0x9b4fd6+'/'+_0x3461db+':':'')),console[_0x1b7c82(0xb5)](_0x1b7c82(0xdc)+_0x3d76e7[_0x1b7c82(0xd5)]),console['error']('Catalog:\x20'+(_0x2db84a||'td')),console['error'](_0x1b7c82(0xb6)+_0x24ef0e),console['error']('SQL:\x20'+_0x213f10));const _0x330c2b=_0xb79fa?'Executing\x20statement\x20'+_0x9b4fd6+'/'+_0x3461db+'...':_0x1b7c82(0xc7);try{const _0x43c712=await withQuerySpinner(_0x330c2b,async _0x13ebd6=>{const _0xabc58b=_0x1b7c82,_0x559451=await _0xbee988[_0xabc58b(0xe1)]['execute'](_0x213f10,{'catalog':_0x2db84a,'schema':_0x24ef0e,'onJobId':_0x261d83=>{const _0x577102=_0xabc58b;_0x13ebd6[_0x577102(0xde)](_0x261d83);},'onProgress':_0x23375e=>{const _0x344db3=_0xabc58b;_0x13ebd6['setPhase'](_0x344db3(0xb9)+_0x23375e[_0x344db3(0xaf)]+']'),_0x13ebd6[_0x344db3(0xbe)](formatRows(_0x23375e[_0x344db3(0xb8)])+'\x20rows\x20'+_0x23375e[_0x344db3(0xd8)]+'/'+_0x23375e['totalSplits']+_0x344db3(0xc4));}});return _0x559451;},{'verbose':_0x3d76e7[_0x1b7c82(0xbc)]}),_0x5de81c=_0x43c712[_0x1b7c82(0xd3)],_0x222119=_0x5de81c[_0x1b7c82(0xb3)]?_0x1b7c82(0xb4)+_0x5de81c[_0x1b7c82(0xb3)]+']':'',_0x38dafc=_0xb79fa?_0x1b7c82(0xd1)+_0x9b4fd6+'/'+_0x3461db+_0x1b7c82(0xcd):'';console[_0x1b7c82(0xb5)]('✔\x20'+_0x38dafc+_0x1b7c82(0xcf)+formatRows(_0x5de81c['stats'][_0x1b7c82(0xb8)])+_0x1b7c82(0xc6)+('in\x20'+formatElapsed(_0x5de81c[_0x1b7c82(0xdd)][_0x1b7c82(0xc0)])+_0x222119));if(_0xb79fa&&_0x377a4c){const _0x43e04b=resolveOutputOptions(_0x3d76e7),_0x415449=await formatQueryOutput(_0x5de81c,_0x43e04b);_0x167e7e[_0x1b7c82(0xda)](_0x415449);}else await handleQueryOutput(_0x5de81c,_0x3d76e7);}catch(_0x3c4e58){const _0x167cce=_0xb79fa?_0x1b7c82(0xd1)+_0x9b4fd6+'/'+_0x3461db+':\x0a':'',_0x27df0c=_0x3c4e58 instanceof SDKError?_0x3c4e58[_0x1b7c82(0xc2)]:_0x3c4e58[_0x1b7c82(0xbd)];return console[_0x1b7c82(0xb5)](''+_0x167cce+_0x27df0c),0x1;}}if(_0x6b21d9[_0x1b7c82(0xdb)]>0x1&&_0x377a4c&&_0x167e7e[_0x1b7c82(0xdb)]>0x0){const _0xfb328e=_0x167e7e[_0x1b7c82(0xce)]('\x0a');writeFileSync(_0x3d76e7['output'],_0xfb328e),console[_0x1b7c82(0xb5)](_0x1b7c82(0xc9)+_0x3d76e7['output']);}return 0x0;}catch(_0x2ec349){throw _0x2ec349;}}[a24_0x5d2fc6(0xd0)](_0x59dc21){const _0x37dd2d=a24_0x5d2fc6,_0x3f5271=_0x59dc21[_0x37dd2d(0xcc)][0x0],_0x1dfbd4=_0x59dc21[_0x37dd2d(0xd2)][_0x37dd2d(0xb2)];if(!_0x3f5271&&!_0x1dfbd4)return'Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20--file\x20query.sql\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options';if(_0x3f5271&&_0x1dfbd4)return _0x37dd2d(0xcb);return undefined;}}
1
+ const a24_0x365ce1=a24_0xdac9;function a24_0x5028(){const _0xd837dd=['in\x20','18554LXimLt','...','name','data','error','jobId','224150QriRiN','information_schema','47652xWWUpx','elapsedTimeMillis','Executing\x20statement\x20','options','database','Executing\x20query\x20[','message','SQL:\x20','Error:\x20','1195348djFLQo','setPhase','output','args','\x20rows\x20','length','verbose','file','20kOBkaz','Site:\x20','processedRows','9BJmyVX','completedSplits','site','Statement\x20','query','stats','\x20splits','Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20--file\x20query.sql\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options','3118866YDlezt','state','735664mcFxgU','originalMessage','Run\x20Trino\x20queries\x20(streaming)','setExtra','\x20[Job\x20ID:\x20','47176wGiXcr','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','totalSplits','push','Schema:\x20','execute','catalog','253JkSJSv','177rLxJRv'];a24_0x5028=function(){return _0xd837dd;};return a24_0x5028();}(function(_0x3f7c81,_0x5afcce){const _0x1f474b=a24_0xdac9,_0x132530=_0x3f7c81();while(!![]){try{const _0x493e95=parseInt(_0x1f474b(0xea))/0x1+-parseInt(_0x1f474b(0xe2))/0x2*(parseInt(_0x1f474b(0xe0))/0x3)+-parseInt(_0x1f474b(0x10d))/0x4*(-parseInt(_0x1f474b(0xfb))/0x5)+parseInt(_0x1f474b(0x106))/0x6+-parseInt(_0x1f474b(0xf3))/0x7+parseInt(_0x1f474b(0x108))/0x8*(-parseInt(_0x1f474b(0xfe))/0x9)+-parseInt(_0x1f474b(0xe8))/0xa*(-parseInt(_0x1f474b(0xdf))/0xb);if(_0x493e95===_0x5afcce)break;else _0x132530['push'](_0x132530['shift']());}catch(_0x2ee7a1){_0x132530['push'](_0x132530['shift']());}}}(a24_0x5028,0x4e277));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';function a24_0xdac9(_0x4b5489,_0x5f2ece){const _0x502890=a24_0x5028();return a24_0xdac9=function(_0xdac9dd,_0x85b661){_0xdac9dd=_0xdac9dd-0xdd;let _0x59d2cd=_0x502890[_0xdac9dd];return _0x59d2cd;},a24_0xdac9(_0x4b5489,_0x5f2ece);}import{readSqlStatementsFromFile,splitSqlStatements}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{[a24_0x365ce1(0xe4)]=a24_0x365ce1(0x102);['description']=a24_0x365ce1(0x10a);async[a24_0x365ce1(0xdd)](_0x3e65a2){const _0x47abc1=a24_0x365ce1,{options:_0x1bb65d,args:_0x148db1,tdx:_0x321889}=_0x3e65a2,_0x31b686=_0x148db1[0x0],_0x297cf9=_0x1bb65d[_0x47abc1(0xfa)];let _0x10add6;if(_0x297cf9)try{_0x10add6=readSqlStatementsFromFile(_0x297cf9);}catch(_0x1c058c){return console[_0x47abc1(0xe6)]('Error:\x20'+_0x1c058c['message']),0x1;}else try{_0x10add6=splitSqlStatements(_0x31b686);}catch(_0x53d4d2){return console[_0x47abc1(0xe6)](_0x47abc1(0xf2)+_0x53d4d2[_0x47abc1(0xf0)]),0x1;}const _0x4cad19=_0x1bb65d[_0x47abc1(0xee)]||_0x47abc1(0xe9),_0x49dd6c=_0x1bb65d[_0x47abc1(0xde)];try{const _0x53d1b6=[],_0x320bbb=!!_0x1bb65d['output'];for(let _0x186f86=0x0;_0x186f86<_0x10add6[_0x47abc1(0xf8)];_0x186f86++){const _0x5397cf=_0x10add6[_0x186f86],_0xd9d50c=_0x186f86+0x1,_0x42a969=_0x10add6['length'],_0x2dcced=_0x42a969>0x1;_0x1bb65d[_0x47abc1(0xf9)]&&(console['error']('\x0a'+(_0x2dcced?_0x47abc1(0x101)+_0xd9d50c+'/'+_0x42a969+':':'')),console[_0x47abc1(0xe6)](_0x47abc1(0xfc)+_0x1bb65d[_0x47abc1(0x100)]),console[_0x47abc1(0xe6)]('Catalog:\x20'+(_0x49dd6c||'td')),console[_0x47abc1(0xe6)](_0x47abc1(0x111)+_0x4cad19),console['error'](_0x47abc1(0xf1)+_0x5397cf));const _0x4ca589=_0x2dcced?_0x47abc1(0xec)+_0xd9d50c+'/'+_0x42a969+_0x47abc1(0xe3):'Executing\x20query...';try{const _0x2e7d21=await withQuerySpinner(_0x4ca589,async _0xd30094=>{const _0x13a28d=_0x47abc1,_0x140eed=await _0x321889[_0x13a28d(0x102)][_0x13a28d(0xdd)](_0x5397cf,{'catalog':_0x49dd6c,'schema':_0x4cad19,'onJobId':_0x75b85=>{_0xd30094['setJobId'](_0x75b85);},'onProgress':_0xd5f7c4=>{const _0x12c1d7=_0x13a28d;_0xd30094[_0x12c1d7(0xf4)](_0x12c1d7(0xef)+_0xd5f7c4[_0x12c1d7(0x107)]+']'),_0xd30094[_0x12c1d7(0x10b)](formatRows(_0xd5f7c4[_0x12c1d7(0xfd)])+_0x12c1d7(0xf7)+_0xd5f7c4[_0x12c1d7(0xff)]+'/'+_0xd5f7c4[_0x12c1d7(0x10f)]+_0x12c1d7(0x104));}});return _0x140eed;},{'verbose':_0x1bb65d[_0x47abc1(0xf9)]}),_0xad5912=_0x2e7d21[_0x47abc1(0xe5)],_0x227078=_0xad5912['jobId']?_0x47abc1(0x10c)+_0xad5912[_0x47abc1(0xe7)]+']':'',_0x1b8e9e=_0x2dcced?_0x47abc1(0x101)+_0xd9d50c+'/'+_0x42a969+'\x20-\x20':'';console[_0x47abc1(0xe6)]('✔\x20'+_0x1b8e9e+'Query\x20completed:\x20Processed\x20'+formatRows(_0xad5912[_0x47abc1(0x103)][_0x47abc1(0xfd)])+_0x47abc1(0xf7)+(_0x47abc1(0xe1)+formatElapsed(_0xad5912[_0x47abc1(0x103)][_0x47abc1(0xeb)])+_0x227078));if(_0x2dcced&&_0x320bbb){const _0x1a3b03=resolveOutputOptions(_0x1bb65d),_0x25cd51=await formatQueryOutput(_0xad5912,_0x1a3b03);_0x53d1b6[_0x47abc1(0x110)](_0x25cd51);}else await handleQueryOutput(_0xad5912,_0x1bb65d);}catch(_0x7a2cc){const _0x11382a=_0x2dcced?_0x47abc1(0x101)+_0xd9d50c+'/'+_0x42a969+':\x0a':'',_0x321dc0=_0x7a2cc instanceof SDKError?_0x7a2cc[_0x47abc1(0x109)]:_0x7a2cc[_0x47abc1(0xf0)];return console[_0x47abc1(0xe6)](''+_0x11382a+_0x321dc0),0x1;}}if(_0x10add6[_0x47abc1(0xf8)]>0x1&&_0x320bbb&&_0x53d1b6['length']>0x0){const _0x3cc1da=_0x53d1b6['join']('\x0a');writeFileSync(_0x1bb65d[_0x47abc1(0xf5)],_0x3cc1da),console[_0x47abc1(0xe6)]('\x0aAll\x20results\x20saved\x20to\x20'+_0x1bb65d[_0x47abc1(0xf5)]);}return 0x0;}catch(_0x111321){throw _0x111321;}}['validate'](_0x554f67){const _0x65bfb9=a24_0x365ce1,_0x36eee7=_0x554f67[_0x65bfb9(0xf6)][0x0],_0x148ac9=_0x554f67[_0x65bfb9(0xed)]['file'];if(!_0x36eee7&&!_0x148ac9)return _0x65bfb9(0x105);if(_0x36eee7&&_0x148ac9)return _0x65bfb9(0x10e);return undefined;}}
@@ -1 +1 @@
1
- function a25_0x6f8b(){const _0x475cc4=['error','\x27\x20with\x20ID:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','SELECT\x20*\x20FROM\x20(\x0a','getParent','Examples:','Resolving\x20parent\x20folder\x20\x27','Listing\x20folders\x20for\x20parent\x20\x27','folderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Usage:\x20tdx\x20segment\x20show\x20<path>','\x20rows\x20','Error:\x20','cause','4VCaAJM','log','Fetching\x20folder\x20details...','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','name','parentFolder','INTERNAL','Resolving\x20parent\x20segment\x20\x27','segmentPath','getSegment','format','parent','folder','Site:\x20','type','\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','getSegmentSQL','4nsDItI','Executing\x20segment\x20query...','\x27...','Parent\x20segment:\x20','execute','length','Show\x20segment\x20folder\x20details','listFolders','resolvePathToResource','trim','Usage:\x20tdx\x20segment\x20sql\x20<path>','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','json','✖\x20Query\x20failed\x20[','segment:folder:list','178407UUqJBb','Error:\x20Folder\x20reference\x20is\x20required','Resolved\x20type:\x20','segmentId','4911080kYQcPh','parentId','Error:\x20Parent\x20segment\x20name\x20is\x20required','site','Fetching\x20folder\x20\x27','jobId','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','elapsedTimeMillis','in\x20','✔\x20Found\x20','Creating\x20folder\x20\x27','segment','✔\x20Query\x20completed:\x20Processed\x20','replace','description','Show\x20segment\x20or\x20folder\x20details','Folder\x20ID:\x20','query','507085wQRyXX','21197946YqHZEO','2466600shmbEi','\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','jsonl','segment:folder:create','Fetching\x20parent\x20segment\x20details...','verbose','✔\x20Created\x20folder\x20\x27','resolveFolderId','processedRows','message','Fetching\x20SQL\x20for\x20segment...','createFolder','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Error:\x20Path\x20or\x20name\x20is\x20required','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','1031859uMEnZJ','Resolving\x20path\x20\x27','60893YBbIYY','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','segment:describe','248zckXGY','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','includes','getFolder','Resolved\x20relative\x20path\x20to:\x20','code','Usage:\x20tdx\x20segment\x20describe\x20<path>','Parent\x20name:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','84dyxcZH','parentSegment','data','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','test','\x20\x20Cause:\x20','Parent\x20ID:\x20','limit','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','information_schema','Resolved\x20parent\x20ID:\x20','getParentSQL','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','resolveParentId','Resolved\x20folder\x20ID:\x20','Resolving\x20folder\x20\x27','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','setJobId'];a25_0x6f8b=function(){return _0x475cc4;};return a25_0x6f8b();}const a25_0x15c124=a25_0x3915;(function(_0x1edfa0,_0x4334d2){const _0x28cd45=a25_0x3915,_0x216b98=_0x1edfa0();while(!![]){try{const _0x42df5b=-parseInt(_0x28cd45(0xcd))/0x1*(-parseInt(_0x28cd45(0x11f))/0x2)+parseInt(_0x28cd45(0xdf))/0x3+-parseInt(_0x28cd45(0x10e))/0x4*(-parseInt(_0x28cd45(0x133))/0x5)+parseInt(_0x28cd45(0xee))/0x6*(-parseInt(_0x28cd45(0xe1))/0x7)+-parseInt(_0x28cd45(0xe4))/0x8*(-parseInt(_0x28cd45(0x12f))/0x9)+-parseInt(_0x28cd45(0xcf))/0xa+-parseInt(_0x28cd45(0xce))/0xb;if(_0x42df5b===_0x4334d2)break;else _0x216b98['push'](_0x216b98['shift']());}catch(_0x2bf282){_0x216b98['push'](_0x216b98['shift']());}}}(a25_0x6f8b,0xa0f78));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';function a25_0x3915(_0x185223,_0x399166){const _0x6f8b7d=a25_0x6f8b();return a25_0x3915=function(_0x3915ad,_0x5cde36){_0x3915ad=_0x3915ad-0xc5;let _0x158695=_0x6f8b7d[_0x3915ad];return _0x158695;},a25_0x3915(_0x185223,_0x399166);}export class SegmentDescribeCommand extends BaseCommand{[a25_0x15c124(0x112)]=a25_0x15c124(0xe3);[a25_0x15c124(0xc9)]=a25_0x15c124(0xca);async[a25_0x15c124(0x123)](_0x239716){const _0x3dac85=a25_0x15c124,{options:_0x315d08,args:_0xf898f0,tdx:_0x2ec315}=_0x239716,_0x5b9330=_0xf898f0[0x0],_0x548f7c=!_0x5b9330&&!!_0x315d08['parentSegment'],_0x380002=_0x5b9330||_0x315d08[_0x3dac85(0xef)];if(!_0x380002)return console['error'](_0x3dac85(0xdd)),console[_0x3dac85(0x100)](_0x3dac85(0xeb)),console[_0x3dac85(0x100)](_0x3dac85(0x105)),console[_0x3dac85(0x100)](_0x3dac85(0xf1)),console[_0x3dac85(0x100)](_0x3dac85(0xdb)),console[_0x3dac85(0x100)](_0x3dac85(0xed)),console[_0x3dac85(0x100)](_0x3dac85(0x12b)),0x1;try{const _0x3b342e=_0x315d08[_0x3dac85(0x116)];let _0xb1d3af=_0x380002;!_0x548f7c&&_0x3b342e&&!_0x380002[_0x3dac85(0xe7)]('/')&&(_0xb1d3af=_0x3b342e+'/'+_0x380002,_0x315d08[_0x3dac85(0xd4)]&&console[_0x3dac85(0x100)]('Resolved\x20relative\x20path\x20to:\x20'+_0xb1d3af));const _0xbeacd6=await withSpinner(_0x3dac85(0xe0)+_0xb1d3af+_0x3dac85(0x121),()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0x127)](_0xb1d3af),{'verbose':_0x315d08['verbose']}),_0x50f256=_0xbeacd6[_0x3dac85(0xf0)];_0x315d08[_0x3dac85(0xd4)]&&(console[_0x3dac85(0x100)](_0x3dac85(0x131)+_0x50f256[_0x3dac85(0x11c)]),console['error']('Parent\x20ID:\x20'+_0x50f256['parentId']),_0x50f256['folderId']&&console[_0x3dac85(0x100)](_0x3dac85(0xcb)+_0x50f256[_0x3dac85(0x108)]),_0x50f256[_0x3dac85(0x132)]&&console[_0x3dac85(0x100)]('Segment\x20ID:\x20'+_0x50f256[_0x3dac85(0x132)]));if(_0x50f256[_0x3dac85(0x11c)]==='parent'){const _0x50a450=await withSpinner(_0x3dac85(0xd3),()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0x104)](_0x50f256[_0x3dac85(0x134)]),{'verbose':_0x315d08[_0x3dac85(0xd4)]});await handleSingleObjectOutput(_0x50a450[_0x3dac85(0xf0)],_0x315d08);}else{if(_0x50f256[_0x3dac85(0x11c)]===_0x3dac85(0x11a)){if(!_0x50f256[_0x3dac85(0x108)])throw new SDKError(ErrorCode[_0x3dac85(0x114)],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x3e6086=await withSpinner(_0x3dac85(0x110),()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0xe8)](_0x50f256[_0x3dac85(0x108)]),{'verbose':_0x315d08[_0x3dac85(0xd4)]});await handleSingleObjectOutput(_0x3e6086[_0x3dac85(0xf0)],_0x315d08);}else{if(_0x50f256[_0x3dac85(0x11c)]===_0x3dac85(0xc6)){if(!_0x50f256[_0x3dac85(0x132)])throw new SDKError(ErrorCode[_0x3dac85(0x114)],_0x3dac85(0x102));const _0x3aba0b=await withSpinner('Fetching\x20segment\x20details...',()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0x117)](_0x50f256['parentId'],_0x50f256[_0x3dac85(0x132)]),{'verbose':_0x315d08[_0x3dac85(0xd4)]});await handleSingleObjectOutput(_0x3aba0b[_0x3dac85(0xf0)],_0x315d08);}}}return 0x0;}catch(_0x7eb1a6){if(_0x7eb1a6 instanceof SDKError)return console[_0x3dac85(0x100)](_0x3dac85(0x10c)+_0x7eb1a6[_0x3dac85(0xd8)]),_0x7eb1a6[_0x3dac85(0x10d)]&&console[_0x3dac85(0x100)](_0x3dac85(0xf3)+_0x7eb1a6[_0x3dac85(0x10d)]),0x1;throw _0x7eb1a6;}}}export class SegmentShowCommand extends BaseCommand{['name']='segment:show';[a25_0x15c124(0xc9)]='Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a25_0x15c124(0x123)](_0x38d1d8){const _0x4e7b1d=a25_0x15c124,{options:_0x233f15,args:_0x28a870,tdx:_0x540aeb}=_0x38d1d8,_0x23ba64=_0x28a870[0x0],_0x20c89a=!_0x23ba64&&!!_0x233f15[_0x4e7b1d(0xef)],_0x287ffb=_0x23ba64||_0x233f15['parentSegment'];if(!_0x287ffb)return console[_0x4e7b1d(0x100)](_0x4e7b1d(0x109)),console[_0x4e7b1d(0x100)](_0x4e7b1d(0x10a)),console[_0x4e7b1d(0x100)](_0x4e7b1d(0x105)),console[_0x4e7b1d(0x100)]('\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22'),console[_0x4e7b1d(0x100)](_0x4e7b1d(0xe2)),console[_0x4e7b1d(0x100)](_0x4e7b1d(0x11d)),console[_0x4e7b1d(0x100)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;try{const _0x36d5a3=_0x233f15[_0x4e7b1d(0x116)];let _0x1e9dc4=_0x287ffb;!_0x20c89a&&_0x36d5a3&&!_0x287ffb[_0x4e7b1d(0xe7)]('/')&&(_0x1e9dc4=_0x36d5a3+'/'+_0x287ffb,_0x233f15[_0x4e7b1d(0xd4)]&&console[_0x4e7b1d(0x100)](_0x4e7b1d(0xe9)+_0x1e9dc4));const _0x197d99=await withSpinner(_0x4e7b1d(0xe0)+_0x1e9dc4+_0x4e7b1d(0x121),()=>_0x540aeb['segment'][_0x4e7b1d(0x127)](_0x1e9dc4),{'verbose':_0x233f15['verbose']}),_0xe0b1bb=_0x197d99[_0x4e7b1d(0xf0)];_0x233f15[_0x4e7b1d(0xd4)]&&(console['error'](_0x4e7b1d(0x131)+_0xe0b1bb[_0x4e7b1d(0x11c)]),console['error'](_0x4e7b1d(0xf4)+_0xe0b1bb[_0x4e7b1d(0x134)]));if(_0xe0b1bb[_0x4e7b1d(0x11c)]===_0x4e7b1d(0x11a))return console[_0x4e7b1d(0x100)](_0x4e7b1d(0xfe)),console['error']('Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details'),0x1;let _0x324610;if(_0xe0b1bb[_0x4e7b1d(0x11c)]===_0x4e7b1d(0x119)){const _0x518dfc=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20segment...',()=>_0x540aeb[_0x4e7b1d(0xc6)][_0x4e7b1d(0xf9)](_0xe0b1bb[_0x4e7b1d(0x134)]),{'verbose':_0x233f15[_0x4e7b1d(0xd4)]});_0x324610=_0x518dfc[_0x4e7b1d(0xf0)];}else{if(!_0xe0b1bb[_0x4e7b1d(0x132)])throw new SDKError(ErrorCode[_0x4e7b1d(0x114)],_0x4e7b1d(0x102));const _0x234910=await withSpinner(_0x4e7b1d(0xd9),()=>_0x540aeb[_0x4e7b1d(0xc6)][_0x4e7b1d(0x11e)](_0xe0b1bb[_0x4e7b1d(0x134)],_0xe0b1bb['segmentId']),{'verbose':_0x233f15[_0x4e7b1d(0xd4)]});_0x324610=_0x234910[_0x4e7b1d(0xf0)];}const _0x39f23f=resolveLimit(_0x233f15[_0x4e7b1d(0xf5)],DEFAULT_DISPLAY_LIMIT),_0x4051c4=/\bLIMIT\s+\d+/i[_0x4e7b1d(0xf2)](_0x324610);!_0x4051c4&&(_0x324610=_0x324610[_0x4e7b1d(0x128)]()[_0x4e7b1d(0xc8)](/;+$/,''),_0x324610=_0x4e7b1d(0x103)+_0x324610+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x39f23f);_0x233f15[_0x4e7b1d(0xd4)]&&console['error']('SQL\x20query:\x0a'+_0x324610);const _0x45cd9d=await withQuerySpinner(_0x4e7b1d(0x120),async _0x561463=>{const _0x5b7fac=_0x4e7b1d,_0x40fb20=await _0x540aeb[_0x5b7fac(0xcc)]['execute'](_0x324610,{'catalog':'td','schema':_0x5b7fac(0xf7),'onJobId':_0x1006e9=>{const _0x1f9583=_0x5b7fac;_0x561463[_0x1f9583(0xff)](_0x1006e9);}});return _0x40fb20;},{'verbose':_0x233f15['verbose']}),_0x14897f=_0x45cd9d['data'],_0x429f12=_0x14897f[_0x4e7b1d(0x138)]?'\x20[Job\x20ID:\x20'+_0x14897f['jobId']+']':'';return console[_0x4e7b1d(0x100)](_0x4e7b1d(0xc7)+_0x14897f['stats'][_0x4e7b1d(0xd7)]['toLocaleString']()+_0x4e7b1d(0x10b)+(_0x4e7b1d(0x13b)+formatElapsed(_0x14897f['stats'][_0x4e7b1d(0x13a)])+_0x429f12)),await handleQueryOutput(_0x14897f,_0x233f15),0x0;}catch(_0x564381){if(_0x564381 instanceof SDKError)return console[_0x4e7b1d(0x100)](_0x4e7b1d(0x12d)+_0x564381[_0x4e7b1d(0xea)]+']'),console[_0x4e7b1d(0x100)]('\x0a'+_0x564381['message']),0x1;throw _0x564381;}}}export class SegmentFolderListCommand extends BaseCommand{[a25_0x15c124(0x112)]=a25_0x15c124(0x12e);['description']='List\x20segment\x20folders\x20under\x20a\x20parent\x20segment';async[a25_0x15c124(0x123)](_0x579ac5){const _0x5393a6=a25_0x15c124,{options:_0x60c820,args:_0x4a5820,tdx:_0x37dfba}=_0x579ac5;if(_0x4a5820[_0x5393a6(0x124)]===0x0)return console[_0x5393a6(0x100)](_0x5393a6(0x135)),console['error'](_0x5393a6(0x12a)),0x1;const _0x3ab948=_0x4a5820[0x0];try{_0x60c820['verbose']&&(console['error'](_0x5393a6(0x11b)+_0x60c820['site']),console[_0x5393a6(0x100)](_0x5393a6(0xec)+_0x3ab948));const _0x32520c=await withSpinner(_0x5393a6(0x115)+_0x3ab948+_0x5393a6(0x121),()=>_0x37dfba['segment'][_0x5393a6(0xfb)](_0x3ab948),{'verbose':_0x60c820[_0x5393a6(0xd4)]}),_0x3ca0a4=_0x32520c[_0x5393a6(0xf0)];_0x60c820[_0x5393a6(0xd4)]&&console[_0x5393a6(0x100)](_0x5393a6(0xf8)+_0x3ca0a4);const _0x14189a=await withSpinner(_0x5393a6(0x107)+_0x3ab948+_0x5393a6(0x121),()=>_0x37dfba['segment'][_0x5393a6(0x126)](_0x3ca0a4),{'verbose':_0x60c820[_0x5393a6(0xd4)]}),_0x301d0d=_0x14189a[_0x5393a6(0xf0)];return console[_0x5393a6(0x100)](_0x5393a6(0x13c)+_0x301d0d[_0x5393a6(0x124)]+'\x20folder'+(_0x301d0d[_0x5393a6(0x124)]!==0x1?'s':'')),await handleSDKOutput(_0x301d0d,_0x60c820),0x0;}catch(_0x3e1331){if(_0x3e1331 instanceof SDKError)return console['error'](_0x5393a6(0x10c)+_0x3e1331[_0x5393a6(0xd8)]),_0x3e1331[_0x5393a6(0x10d)]&&console['error'](_0x5393a6(0xf3)+_0x3e1331[_0x5393a6(0x10d)]),0x1;throw _0x3e1331;}}}export class SegmentFolderShowCommand extends BaseCommand{[a25_0x15c124(0x112)]='segment:folder:show';['description']=a25_0x15c124(0x125);async[a25_0x15c124(0x123)](_0x4d659e){const _0x223219=a25_0x15c124,{options:_0x54352b,args:_0x110592,tdx:_0x3a3941}=_0x4d659e;if(_0x110592[_0x223219(0x124)]===0x0)return console[_0x223219(0x100)](_0x223219(0x130)),console[_0x223219(0x100)](_0x223219(0xf6)),0x1;try{const {parentId:_0x59ae7c,childId:_0xfecd51}=parseSegmentRef(_0x110592[0x0]);_0x54352b[_0x223219(0xd4)]&&(console[_0x223219(0x100)]('Site:\x20'+_0x54352b[_0x223219(0x136)]),console['error'](_0x223219(0xec)+_0x59ae7c),_0xfecd51&&console[_0x223219(0x100)]('Folder\x20name:\x20'+_0xfecd51));if(!_0xfecd51)return console[_0x223219(0x100)](_0x223219(0x111)),0x1;const _0x1e3aa9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x59ae7c+'\x27...',()=>_0x3a3941[_0x223219(0xc6)][_0x223219(0xfb)](_0x59ae7c),{'verbose':_0x54352b[_0x223219(0xd4)]}),_0x539f96=_0x1e3aa9[_0x223219(0xf0)];_0x54352b[_0x223219(0xd4)]&&console[_0x223219(0x100)](_0x223219(0xf8)+_0x539f96);const _0x147a71=await withSpinner(_0x223219(0xfd)+_0xfecd51+_0x223219(0x121),()=>_0x3a3941['segment'][_0x223219(0xd6)](_0x539f96,_0xfecd51),{'verbose':_0x54352b[_0x223219(0xd4)]}),_0x234923=_0x147a71['data'];_0x54352b[_0x223219(0xd4)]&&console[_0x223219(0x100)](_0x223219(0xfc)+_0x234923);const _0xa87699=await withSpinner(_0x223219(0x137)+_0xfecd51+_0x223219(0x121),()=>_0x3a3941[_0x223219(0xc6)][_0x223219(0xe8)](_0x234923),{'verbose':_0x54352b[_0x223219(0xd4)]});return await handleSDKOutput([_0xa87699[_0x223219(0xf0)]],_0x54352b),0x0;}catch(_0x393ed0){if(_0x393ed0 instanceof SDKError)return console['error']('Error:\x20'+_0x393ed0[_0x223219(0xd8)]),_0x393ed0[_0x223219(0x10d)]&&console['error'](_0x223219(0xf3)+_0x393ed0[_0x223219(0x10d)]),0x1;throw _0x393ed0;}}}export class SegmentSQLCommand extends BaseCommand{[a25_0x15c124(0x112)]='segment:sql';[a25_0x15c124(0xc9)]=a25_0x15c124(0xe5);async[a25_0x15c124(0x123)](_0x1db591){const _0x5d5c89=a25_0x15c124,{options:_0x11de56,args:_0x273500,tdx:_0x240785}=_0x1db591,_0x1575b7=_0x273500[0x0],_0x1c5001=!_0x1575b7&&!!_0x11de56[_0x5d5c89(0xef)],_0x392b42=_0x1575b7||_0x11de56[_0x5d5c89(0xef)];if(!_0x392b42)return console[_0x5d5c89(0x100)](_0x5d5c89(0x109)),console[_0x5d5c89(0x100)](_0x5d5c89(0x129)),console[_0x5d5c89(0x100)](_0x5d5c89(0x105)),console[_0x5d5c89(0x100)](_0x5d5c89(0xe6)),console[_0x5d5c89(0x100)](_0x5d5c89(0x139)),console[_0x5d5c89(0x100)](_0x5d5c89(0xd0)),console[_0x5d5c89(0x100)](_0x5d5c89(0x12b)),0x1;try{const _0x4715d5=_0x11de56[_0x5d5c89(0x116)];let _0x4718e6=_0x392b42;!_0x1c5001&&_0x4715d5&&!_0x392b42['includes']('/')&&(_0x4718e6=_0x4715d5+'/'+_0x392b42,_0x11de56['verbose']&&console[_0x5d5c89(0x100)](_0x5d5c89(0xe9)+_0x4718e6));const _0x75663b=await withSpinner(_0x5d5c89(0xe0)+_0x4718e6+_0x5d5c89(0x121),()=>_0x240785['segment'][_0x5d5c89(0x127)](_0x4718e6),{'verbose':_0x11de56[_0x5d5c89(0xd4)]}),_0x44198f=_0x75663b['data'];_0x11de56['verbose']&&(console[_0x5d5c89(0x100)](_0x5d5c89(0x131)+_0x44198f[_0x5d5c89(0x11c)]),console[_0x5d5c89(0x100)]('Parent\x20ID:\x20'+_0x44198f[_0x5d5c89(0x134)]));if(_0x44198f['type']===_0x5d5c89(0x11a))return console['error'](_0x5d5c89(0xdc)),console[_0x5d5c89(0x100)](_0x5d5c89(0xde)),0x1;let _0x3dfece;if(_0x44198f[_0x5d5c89(0x11c)]===_0x5d5c89(0x119)){const _0x3acb69=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20segment...',()=>_0x240785['segment'][_0x5d5c89(0xf9)](_0x44198f['parentId']),{'verbose':_0x11de56['verbose']});_0x3dfece=_0x3acb69['data'];}else{if(!_0x44198f[_0x5d5c89(0x132)])throw new SDKError(ErrorCode['INTERNAL'],_0x5d5c89(0x102));const _0x5e2894=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x240785[_0x5d5c89(0xc6)][_0x5d5c89(0x11e)](_0x44198f[_0x5d5c89(0x134)],_0x44198f[_0x5d5c89(0x132)]),{'verbose':_0x11de56[_0x5d5c89(0xd4)]});_0x3dfece=_0x5e2894[_0x5d5c89(0xf0)];}return _0x11de56[_0x5d5c89(0x118)]===_0x5d5c89(0x12c)||_0x11de56[_0x5d5c89(0x118)]===_0x5d5c89(0xd1)?await handleSDKOutput([{'sql':_0x3dfece}],_0x11de56):console[_0x5d5c89(0x10f)](_0x3dfece),0x0;}catch(_0x9b1e02){if(_0x9b1e02 instanceof SDKError)return console[_0x5d5c89(0x100)](_0x5d5c89(0x10c)+_0x9b1e02[_0x5d5c89(0xd8)]),_0x9b1e02['cause']&&console[_0x5d5c89(0x100)]('\x20\x20Cause:\x20'+_0x9b1e02[_0x5d5c89(0x10d)]),0x1;throw _0x9b1e02;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a25_0x15c124(0x112)]=a25_0x15c124(0xd2);['description']='Create\x20segment\x20folder\x20for\x20organization';async[a25_0x15c124(0x123)](_0x292458){const _0x4f9487=a25_0x15c124,{options:_0x302cfa,args:_0x473409,tdx:_0x2108fe}=_0x292458,_0x8b89f9=_0x302cfa;if(_0x473409[_0x4f9487(0x124)]<0x2)return console[_0x4f9487(0x100)](_0x4f9487(0xfa)),console[_0x4f9487(0x100)]('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0x36ab76=_0x473409[0x0],_0x19be06=_0x473409[0x1];_0x8b89f9[_0x4f9487(0xd4)]&&(console[_0x4f9487(0x100)](_0x4f9487(0x11b)+_0x8b89f9[_0x4f9487(0x136)]),console[_0x4f9487(0x100)](_0x4f9487(0x122)+_0x36ab76),console['error']('Folder\x20name:\x20'+_0x19be06));let _0x2eefc4;if(_0x8b89f9['parentFolder']){const _0x34c054=_0x8b89f9[_0x4f9487(0x113)],_0x539e2e=await withSpinner(_0x4f9487(0x115)+_0x36ab76+_0x4f9487(0x121),()=>_0x2108fe[_0x4f9487(0xc6)]['resolveParentId'](_0x36ab76),{'verbose':_0x8b89f9[_0x4f9487(0xd4)]}),_0x2480f0=_0x539e2e[_0x4f9487(0xf0)],_0x4ba96a=await withSpinner(_0x4f9487(0x106)+_0x34c054+_0x4f9487(0x121),()=>_0x2108fe[_0x4f9487(0xc6)][_0x4f9487(0xd6)](_0x2480f0,_0x34c054),{'verbose':_0x8b89f9[_0x4f9487(0xd4)]});_0x2eefc4=_0x4ba96a['data'],_0x8b89f9[_0x4f9487(0xd4)]&&console[_0x4f9487(0x100)]('Resolved\x20parent\x20folder\x20ID:\x20'+_0x2eefc4);}const _0x14605b={'name':_0x19be06,'description':_0x8b89f9[_0x4f9487(0xc9)],'parentFolderId':_0x2eefc4},_0x32126b=await withSpinner(_0x4f9487(0xc5)+_0x19be06+_0x4f9487(0x121),()=>_0x2108fe[_0x4f9487(0xc6)][_0x4f9487(0xda)](_0x36ab76,_0x14605b),{'verbose':_0x8b89f9['verbose']}),_0x2e8de0=_0x32126b[_0x4f9487(0xf0)];return console[_0x4f9487(0x100)](_0x4f9487(0xd5)+_0x2e8de0[_0x4f9487(0x112)]+_0x4f9487(0x101)+_0x2e8de0['id']),await handleSDKOutput([_0x2e8de0],_0x8b89f9),0x0;}}
1
+ const a25_0x1b0f17=a25_0x37b6;(function(_0x5c2395,_0x4f1bc3){const _0xcd0356=a25_0x37b6,_0x48ac3e=_0x5c2395();while(!![]){try{const _0x255244=-parseInt(_0xcd0356(0x1f5))/0x1*(parseInt(_0xcd0356(0x1fe))/0x2)+parseInt(_0xcd0356(0x216))/0x3*(-parseInt(_0xcd0356(0x1fc))/0x4)+parseInt(_0xcd0356(0x1d6))/0x5+-parseInt(_0xcd0356(0x21d))/0x6*(parseInt(_0xcd0356(0x1c2))/0x7)+-parseInt(_0xcd0356(0x20f))/0x8*(-parseInt(_0xcd0356(0x1fb))/0x9)+-parseInt(_0xcd0356(0x1be))/0xa*(-parseInt(_0xcd0356(0x1ed))/0xb)+parseInt(_0xcd0356(0x1ea))/0xc;if(_0x255244===_0x4f1bc3)break;else _0x48ac3e['push'](_0x48ac3e['shift']());}catch(_0x48889a){_0x48ac3e['push'](_0x48ac3e['shift']());}}}(a25_0xe305,0x8cc74));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';function a25_0x37b6(_0x4ef331,_0x59df51){const _0xe30599=a25_0xe305();return a25_0x37b6=function(_0x37b604,_0x245eb5){_0x37b604=_0x37b604-0x1b7;let _0x16f59e=_0xe30599[_0x37b604];return _0x16f59e;},a25_0x37b6(_0x4ef331,_0x59df51);}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class SegmentDescribeCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]='segment:describe';[a25_0x1b0f17(0x1f0)]='Show\x20segment\x20or\x20folder\x20details';async[a25_0x1b0f17(0x20d)](_0x55844b){const _0x99d294=a25_0x1b0f17,{options:_0x56210a,args:_0x11d6c9,tdx:_0x4acf09}=_0x55844b,_0x2f5dc2=_0x11d6c9[0x0],_0x53e4d4=!_0x2f5dc2&&!!_0x56210a[_0x99d294(0x1d5)],_0x239ce9=_0x2f5dc2||_0x56210a['parentSegment'];if(!_0x239ce9)return console[_0x99d294(0x1d8)](_0x99d294(0x22a)),console['error'](_0x99d294(0x1bb)),console[_0x99d294(0x1d8)](_0x99d294(0x222)),console[_0x99d294(0x1d8)](_0x99d294(0x20e)),console['error'](_0x99d294(0x20b)),console[_0x99d294(0x1d8)](_0x99d294(0x1d7)),console['error']('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;try{const _0x49c597=_0x56210a[_0x99d294(0x209)];let _0x24a2b0=_0x239ce9;!_0x53e4d4&&_0x49c597&&!_0x239ce9[_0x99d294(0x21c)]('/')&&(_0x24a2b0=_0x49c597+'/'+_0x239ce9,_0x56210a[_0x99d294(0x1f4)]&&console[_0x99d294(0x1d8)](_0x99d294(0x1b9)+_0x24a2b0));const _0x4a9170=await withSpinner(_0x99d294(0x228)+_0x24a2b0+_0x99d294(0x1f3),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x217)](_0x24a2b0),{'verbose':_0x56210a[_0x99d294(0x1f4)]}),_0x408c8e=_0x4a9170[_0x99d294(0x1bd)];_0x56210a[_0x99d294(0x1f4)]&&(console[_0x99d294(0x1d8)](_0x99d294(0x1cd)+_0x408c8e[_0x99d294(0x201)]),console[_0x99d294(0x1d8)](_0x99d294(0x1ba)+_0x408c8e[_0x99d294(0x1c9)]),_0x408c8e[_0x99d294(0x1fa)]&&console[_0x99d294(0x1d8)](_0x99d294(0x1c7)+_0x408c8e[_0x99d294(0x1fa)]),_0x408c8e['segmentId']&&console[_0x99d294(0x1d8)](_0x99d294(0x1d0)+_0x408c8e[_0x99d294(0x1de)]));if(_0x408c8e[_0x99d294(0x201)]===_0x99d294(0x1eb)){const _0x311572=await withSpinner(_0x99d294(0x1ef),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x1c4)](_0x408c8e['parentId']),{'verbose':_0x56210a[_0x99d294(0x1f4)]});await handleSingleObjectOutput(_0x311572[_0x99d294(0x1bd)],_0x56210a);}else{if(_0x408c8e[_0x99d294(0x201)]===_0x99d294(0x1f7)){if(!_0x408c8e[_0x99d294(0x1fa)])throw new SDKError(ErrorCode[_0x99d294(0x21a)],_0x99d294(0x226));const _0x4bed17=await withSpinner(_0x99d294(0x1da),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x1f6)](_0x408c8e['folderId']),{'verbose':_0x56210a[_0x99d294(0x1f4)]});await handleSingleObjectOutput(_0x4bed17[_0x99d294(0x1bd)],_0x56210a);}else{if(_0x408c8e[_0x99d294(0x201)]===_0x99d294(0x1e7)){if(!_0x408c8e['segmentId'])throw new SDKError(ErrorCode[_0x99d294(0x21a)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x5ec586=await withSpinner(_0x99d294(0x214),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x200)](_0x408c8e['parentId'],_0x408c8e[_0x99d294(0x1de)]),{'verbose':_0x56210a['verbose']});await handleSingleObjectOutput(_0x5ec586[_0x99d294(0x1bd)],_0x56210a);}}}return 0x0;}catch(_0x34b0ba){if(_0x34b0ba instanceof SDKError)return console[_0x99d294(0x1d8)](_0x99d294(0x1c1)+_0x34b0ba[_0x99d294(0x21e)]),_0x34b0ba['cause']&&console['error'](_0x99d294(0x22d)+_0x34b0ba[_0x99d294(0x1e2)]),0x1;throw _0x34b0ba;}}}export class SegmentShowCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]='segment:show';['description']='Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a25_0x1b0f17(0x20d)](_0x1e6275){const _0xede804=a25_0x1b0f17,{options:_0x5e1eb5,args:_0xb36816,tdx:_0x14ac8b}=_0x1e6275,_0x31dc93=_0xb36816[0x0],_0x2d0b68=!_0x31dc93&&!!_0x5e1eb5[_0xede804(0x1d5)],_0x44c0b6=_0x31dc93||_0x5e1eb5[_0xede804(0x1d5)];if(!_0x44c0b6)return console[_0xede804(0x1d8)](_0xede804(0x1cb)),console[_0xede804(0x1d8)](_0xede804(0x1e3)),console[_0xede804(0x1d8)]('Examples:'),console[_0xede804(0x1d8)](_0xede804(0x1e4)),console[_0xede804(0x1d8)](_0xede804(0x1c6)),console[_0xede804(0x1d8)]('\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0xede804(0x1d8)](_0xede804(0x1cc)),0x1;try{const _0xab8c99=_0x5e1eb5['segmentPath'];let _0x183e4c=_0x44c0b6;!_0x2d0b68&&_0xab8c99&&!_0x44c0b6[_0xede804(0x21c)]('/')&&(_0x183e4c=_0xab8c99+'/'+_0x44c0b6,_0x5e1eb5[_0xede804(0x1f4)]&&console['error'](_0xede804(0x1b9)+_0x183e4c));const _0x231d5f=await withSpinner(_0xede804(0x228)+_0x183e4c+_0xede804(0x1f3),()=>_0x14ac8b[_0xede804(0x1e7)][_0xede804(0x217)](_0x183e4c),{'verbose':_0x5e1eb5['verbose']}),_0xf3b081=_0x231d5f[_0xede804(0x1bd)];_0x5e1eb5[_0xede804(0x1f4)]&&(console[_0xede804(0x1d8)]('Resolved\x20type:\x20'+_0xf3b081[_0xede804(0x201)]),console[_0xede804(0x1d8)](_0xede804(0x1ba)+_0xf3b081[_0xede804(0x1c9)]));if(_0xf3b081[_0xede804(0x201)]===_0xede804(0x1f7))return console['error'](_0xede804(0x1c8)),console[_0xede804(0x1d8)](_0xede804(0x210)),0x1;let _0x18ba74;if(_0xf3b081[_0xede804(0x201)]===_0xede804(0x1eb)){const _0x1d7174=await withSpinner(_0xede804(0x1ec),()=>_0x14ac8b['segment']['getParentSQL'](_0xf3b081[_0xede804(0x1c9)]),{'verbose':_0x5e1eb5[_0xede804(0x1f4)]});_0x18ba74=_0x1d7174[_0xede804(0x1bd)];}else{if(!_0xf3b081[_0xede804(0x1de)])throw new SDKError(ErrorCode[_0xede804(0x21a)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x302d5c=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x14ac8b['segment']['getSegmentSQL'](_0xf3b081[_0xede804(0x1c9)],_0xf3b081[_0xede804(0x1de)]),{'verbose':_0x5e1eb5[_0xede804(0x1f4)]});_0x18ba74=_0x302d5c['data'];}const _0x4d9ba3=resolveLimit(_0x5e1eb5[_0xede804(0x21f)],DEFAULT_DISPLAY_LIMIT),_0x39d193=/\bLIMIT\s+\d+/i['test'](_0x18ba74);!_0x39d193&&(_0x18ba74=_0x18ba74[_0xede804(0x1e0)]()[_0xede804(0x1c3)](/;+$/,''),_0x18ba74='SELECT\x20*\x20FROM\x20(\x0a'+_0x18ba74+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x4d9ba3);_0x5e1eb5[_0xede804(0x1f4)]&&console[_0xede804(0x1d8)](_0xede804(0x229)+_0x18ba74);const _0x4995f9=await withQuerySpinner(_0xede804(0x219),async _0x1963db=>{const _0x2d2371=_0xede804,_0x38241d=await _0x14ac8b[_0x2d2371(0x221)][_0x2d2371(0x20d)](_0x18ba74,{'catalog':'td','schema':_0x2d2371(0x21b),'onJobId':_0x426d93=>{_0x1963db['setJobId'](_0x426d93);}});return _0x38241d;},{'verbose':_0x5e1eb5['verbose']}),_0x5a3843=_0x4995f9[_0xede804(0x1bd)],_0x2ec146=_0x5a3843['jobId']?_0xede804(0x1d4)+_0x5a3843[_0xede804(0x215)]+']':'';return console['error'](_0xede804(0x225)+_0x5a3843['stats'][_0xede804(0x204)][_0xede804(0x20c)]()+_0xede804(0x227)+('in\x20'+formatElapsed(_0x5a3843[_0xede804(0x1f1)]['elapsedTimeMillis'])+_0x2ec146)),await handleQueryOutput(_0x5a3843,_0x5e1eb5),0x0;}catch(_0x58154a){if(_0x58154a instanceof SDKError)return console[_0xede804(0x1d8)](_0xede804(0x202)+_0x58154a[_0xede804(0x1bf)]+']'),console[_0xede804(0x1d8)]('\x0a'+_0x58154a['message']),0x1;throw _0x58154a;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a25_0x1b0f17(0x212);['description']=a25_0x1b0f17(0x1b8);async[a25_0x1b0f17(0x20d)](_0x384e35){const _0x3a790a=a25_0x1b0f17,{options:_0x43f92a,args:_0x422a11,tdx:_0x503511}=_0x384e35;if(_0x422a11[_0x3a790a(0x218)]===0x0)return console['error'](_0x3a790a(0x1d2)),console['error'](_0x3a790a(0x1b7)),0x1;const _0x402c6f=_0x422a11[0x0];try{_0x43f92a[_0x3a790a(0x1f4)]&&(console['error']('Site:\x20'+_0x43f92a[_0x3a790a(0x1f8)]),console[_0x3a790a(0x1d8)](_0x3a790a(0x205)+_0x402c6f));const _0x87cfc4=await withSpinner(_0x3a790a(0x1e6)+_0x402c6f+_0x3a790a(0x1f3),()=>_0x503511['segment'][_0x3a790a(0x1c5)](_0x402c6f),{'verbose':_0x43f92a['verbose']}),_0x4873e9=_0x87cfc4[_0x3a790a(0x1bd)];_0x43f92a[_0x3a790a(0x1f4)]&&console['error'](_0x3a790a(0x1df)+_0x4873e9);const _0x5104b8=await withSpinner(_0x3a790a(0x20a)+_0x402c6f+'\x27...',()=>_0x503511[_0x3a790a(0x1e7)][_0x3a790a(0x22b)](_0x4873e9),{'verbose':_0x43f92a['verbose']}),_0x3b4155=_0x5104b8[_0x3a790a(0x1bd)];return console[_0x3a790a(0x1d8)](_0x3a790a(0x1dd)+_0x3b4155['length']+_0x3a790a(0x1c0)+(_0x3b4155[_0x3a790a(0x218)]!==0x1?'s':'')),await handleSDKOutput(_0x3b4155,_0x43f92a),0x0;}catch(_0x41818f){if(_0x41818f instanceof SDKError)return console['error'](_0x3a790a(0x1c1)+_0x41818f[_0x3a790a(0x21e)]),_0x41818f[_0x3a790a(0x1e2)]&&console[_0x3a790a(0x1d8)](_0x3a790a(0x22d)+_0x41818f['cause']),0x1;throw _0x41818f;}}}export class SegmentFolderShowCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]=a25_0x1b0f17(0x220);[a25_0x1b0f17(0x1f0)]=a25_0x1b0f17(0x1fd);async[a25_0x1b0f17(0x20d)](_0x526d97){const _0x5998d5=a25_0x1b0f17,{options:_0x432624,args:_0x2ead07,tdx:_0x22f56d}=_0x526d97;if(_0x2ead07[_0x5998d5(0x218)]===0x0)return console['error']('Error:\x20Folder\x20reference\x20is\x20required'),console[_0x5998d5(0x1d8)](_0x5998d5(0x213)),0x1;try{const {parentId:_0x4bca9b,childId:_0x5c1e47}=parseSegmentRef(_0x2ead07[0x0]);_0x432624[_0x5998d5(0x1f4)]&&(console['error'](_0x5998d5(0x1e1)+_0x432624[_0x5998d5(0x1f8)]),console['error']('Parent\x20name:\x20'+_0x4bca9b),_0x5c1e47&&console[_0x5998d5(0x1d8)]('Folder\x20name:\x20'+_0x5c1e47));if(!_0x5c1e47)return console['error'](_0x5998d5(0x211)),0x1;const _0x534075=await withSpinner(_0x5998d5(0x1e6)+_0x4bca9b+_0x5998d5(0x1f3),()=>_0x22f56d[_0x5998d5(0x1e7)][_0x5998d5(0x1c5)](_0x4bca9b),{'verbose':_0x432624[_0x5998d5(0x1f4)]}),_0x21182b=_0x534075[_0x5998d5(0x1bd)];_0x432624['verbose']&&console['error'](_0x5998d5(0x1df)+_0x21182b);const _0xe9f565=await withSpinner(_0x5998d5(0x1db)+_0x5c1e47+_0x5998d5(0x1f3),()=>_0x22f56d['segment'][_0x5998d5(0x1ca)](_0x21182b,_0x5c1e47),{'verbose':_0x432624[_0x5998d5(0x1f4)]}),_0x1b7074=_0xe9f565['data'];_0x432624[_0x5998d5(0x1f4)]&&console['error'](_0x5998d5(0x1ff)+_0x1b7074);const _0x506548=await withSpinner('Fetching\x20folder\x20\x27'+_0x5c1e47+'\x27...',()=>_0x22f56d['segment']['getFolder'](_0x1b7074),{'verbose':_0x432624[_0x5998d5(0x1f4)]});return await handleSDKOutput([_0x506548[_0x5998d5(0x1bd)]],_0x432624),0x0;}catch(_0x20d040){if(_0x20d040 instanceof SDKError)return console[_0x5998d5(0x1d8)]('Error:\x20'+_0x20d040[_0x5998d5(0x21e)]),_0x20d040[_0x5998d5(0x1e2)]&&console[_0x5998d5(0x1d8)](_0x5998d5(0x22d)+_0x20d040[_0x5998d5(0x1e2)]),0x1;throw _0x20d040;}}}function a25_0xe305(){const _0x4a5cd9=['\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22','Create\x20segment\x20folder\x20for\x20organization','Resolving\x20parent\x20segment\x20\x27','segment','Creating\x20folder\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','8156088dhVXuP','parent','Fetching\x20SQL\x20for\x20parent\x20segment...','224642aYcTDx','log','Fetching\x20parent\x20segment\x20details...','description','stats','Folder\x20name:\x20','\x27...','verbose','92520kcuSle','getFolder','folder','site','\x27\x20with\x20ID:\x20','folderId','9806301DjAroA','4448FsmKnL','Show\x20segment\x20folder\x20details','2HRpwlV','Resolved\x20folder\x20ID:\x20','getSegment','type','✖\x20Query\x20failed\x20[','format','processedRows','Parent\x20name:\x20','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Usage:\x20tdx\x20segment\x20sql\x20<path>','json','segmentPath','Listing\x20folders\x20for\x20parent\x20\x27','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','toLocaleString','execute','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','8QVgDZb','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','segment:folder:list','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Fetching\x20segment\x20details...','jobId','2469Wyjmwm','resolvePathToResource','length','Executing\x20segment\x20query...','INTERNAL','information_schema','includes','258864PKlKxI','message','limit','segment:folder:show','query','Examples:','Parent\x20segment:\x20','parentFolder','✔\x20Query\x20completed:\x20Processed\x20','Folder\x20ID\x20missing\x20from\x20resolved\x20path','\x20rows\x20','Resolving\x20path\x20\x27','SQL\x20query:\x0a','Error:\x20Path\x20or\x20name\x20is\x20required','listFolders','segment:sql','\x20\x20Cause:\x20','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Resolved\x20relative\x20path\x20to:\x20','Parent\x20ID:\x20','Usage:\x20tdx\x20segment\x20describe\x20<path>','getSegmentSQL','data','220eZdMzX','code','\x20folder','Error:\x20','140pysEpP','replace','getParent','resolveParentId','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Folder\x20ID:\x20','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','parentId','resolveFolderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','Resolved\x20type:\x20','name','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','Segment\x20ID:\x20','createFolder','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','\x20[Job\x20ID:\x20','parentSegment','1143285VLkozo','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','error','Resolved\x20parent\x20folder\x20ID:\x20','Fetching\x20folder\x20details...','Resolving\x20folder\x20\x27','segment:folder:create','✔\x20Found\x20','segmentId','Resolved\x20parent\x20ID:\x20','trim','Site:\x20','cause','Usage:\x20tdx\x20segment\x20show\x20<path>'];a25_0xe305=function(){return _0x4a5cd9;};return a25_0xe305();}export class SegmentSQLCommand extends BaseCommand{['name']=a25_0x1b0f17(0x22c);[a25_0x1b0f17(0x1f0)]='Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment';async['execute'](_0x17d2db){const _0x5f504d=a25_0x1b0f17,{options:_0x1981f3,args:_0x147b09,tdx:_0x3919a8}=_0x17d2db,_0x3dc8ac=_0x147b09[0x0],_0x2a6240=!_0x3dc8ac&&!!_0x1981f3[_0x5f504d(0x1d5)],_0x4a9ad7=_0x3dc8ac||_0x1981f3[_0x5f504d(0x1d5)];if(!_0x4a9ad7)return console[_0x5f504d(0x1d8)](_0x5f504d(0x1cb)),console[_0x5f504d(0x1d8)](_0x5f504d(0x207)),console[_0x5f504d(0x1d8)](_0x5f504d(0x222)),console[_0x5f504d(0x1d8)]('\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22'),console[_0x5f504d(0x1d8)](_0x5f504d(0x1d3)),console[_0x5f504d(0x1d8)]('\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0x5f504d(0x1d8)](_0x5f504d(0x1cc)),0x1;try{const _0x37f8d3=_0x1981f3[_0x5f504d(0x209)];let _0x144d03=_0x4a9ad7;!_0x2a6240&&_0x37f8d3&&!_0x4a9ad7[_0x5f504d(0x21c)]('/')&&(_0x144d03=_0x37f8d3+'/'+_0x4a9ad7,_0x1981f3[_0x5f504d(0x1f4)]&&console['error'](_0x5f504d(0x1b9)+_0x144d03));const _0x554c5d=await withSpinner('Resolving\x20path\x20\x27'+_0x144d03+_0x5f504d(0x1f3),()=>_0x3919a8[_0x5f504d(0x1e7)][_0x5f504d(0x217)](_0x144d03),{'verbose':_0x1981f3['verbose']}),_0x54a4dd=_0x554c5d[_0x5f504d(0x1bd)];_0x1981f3[_0x5f504d(0x1f4)]&&(console[_0x5f504d(0x1d8)](_0x5f504d(0x1cd)+_0x54a4dd[_0x5f504d(0x201)]),console['error']('Parent\x20ID:\x20'+_0x54a4dd['parentId']));if(_0x54a4dd['type']===_0x5f504d(0x1f7))return console['error'](_0x5f504d(0x206)),console[_0x5f504d(0x1d8)](_0x5f504d(0x1cf)),0x1;let _0x2afb69;if(_0x54a4dd[_0x5f504d(0x201)]==='parent'){const _0x1698f0=await withSpinner(_0x5f504d(0x1ec),()=>_0x3919a8[_0x5f504d(0x1e7)]['getParentSQL'](_0x54a4dd[_0x5f504d(0x1c9)]),{'verbose':_0x1981f3[_0x5f504d(0x1f4)]});_0x2afb69=_0x1698f0['data'];}else{if(!_0x54a4dd['segmentId'])throw new SDKError(ErrorCode[_0x5f504d(0x21a)],_0x5f504d(0x1e9));const _0x25f36c=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3919a8[_0x5f504d(0x1e7)][_0x5f504d(0x1bc)](_0x54a4dd[_0x5f504d(0x1c9)],_0x54a4dd['segmentId']),{'verbose':_0x1981f3['verbose']});_0x2afb69=_0x25f36c[_0x5f504d(0x1bd)];}return _0x1981f3[_0x5f504d(0x203)]===_0x5f504d(0x208)||_0x1981f3['format']==='jsonl'?await handleSDKOutput([{'sql':_0x2afb69}],_0x1981f3):console[_0x5f504d(0x1ee)](_0x2afb69),0x0;}catch(_0x50a941){if(_0x50a941 instanceof SDKError)return console[_0x5f504d(0x1d8)](_0x5f504d(0x1c1)+_0x50a941[_0x5f504d(0x21e)]),_0x50a941[_0x5f504d(0x1e2)]&&console[_0x5f504d(0x1d8)]('\x20\x20Cause:\x20'+_0x50a941[_0x5f504d(0x1e2)]),0x1;throw _0x50a941;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]=a25_0x1b0f17(0x1dc);[a25_0x1b0f17(0x1f0)]=a25_0x1b0f17(0x1e5);async[a25_0x1b0f17(0x20d)](_0x3aa82d){const _0x225e55=a25_0x1b0f17,{options:_0x392d90,args:_0x1e4b27,tdx:_0x3726ef}=_0x3aa82d,_0x557434=_0x392d90;if(_0x1e4b27[_0x225e55(0x218)]<0x2)return console['error']('Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required'),console['error']('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0x299027=_0x1e4b27[0x0],_0x2fa1e9=_0x1e4b27[0x1];_0x557434['verbose']&&(console[_0x225e55(0x1d8)]('Site:\x20'+_0x557434[_0x225e55(0x1f8)]),console['error'](_0x225e55(0x223)+_0x299027),console[_0x225e55(0x1d8)](_0x225e55(0x1f2)+_0x2fa1e9));let _0x52b75e;if(_0x557434[_0x225e55(0x224)]){const _0x518e29=_0x557434[_0x225e55(0x224)],_0x2861c3=await withSpinner(_0x225e55(0x1e6)+_0x299027+_0x225e55(0x1f3),()=>_0x3726ef[_0x225e55(0x1e7)][_0x225e55(0x1c5)](_0x299027),{'verbose':_0x557434[_0x225e55(0x1f4)]}),_0x32e73a=_0x2861c3[_0x225e55(0x1bd)],_0x596f2b=await withSpinner('Resolving\x20parent\x20folder\x20\x27'+_0x518e29+_0x225e55(0x1f3),()=>_0x3726ef[_0x225e55(0x1e7)]['resolveFolderId'](_0x32e73a,_0x518e29),{'verbose':_0x557434[_0x225e55(0x1f4)]});_0x52b75e=_0x596f2b['data'],_0x557434[_0x225e55(0x1f4)]&&console[_0x225e55(0x1d8)](_0x225e55(0x1d9)+_0x52b75e);}const _0x1043ff={'name':_0x2fa1e9,'description':_0x557434[_0x225e55(0x1f0)],'parentFolderId':_0x52b75e},_0xc906b9=await withSpinner(_0x225e55(0x1e8)+_0x2fa1e9+_0x225e55(0x1f3),()=>_0x3726ef[_0x225e55(0x1e7)][_0x225e55(0x1d1)](_0x299027,_0x1043ff),{'verbose':_0x557434[_0x225e55(0x1f4)]}),_0xaa0cf9=_0xc906b9['data'];return console['error']('✔\x20Created\x20folder\x20\x27'+_0xaa0cf9[_0x225e55(0x1ce)]+_0x225e55(0x1f9)+_0xaa0cf9['id']),await handleSDKOutput([_0xaa0cf9],_0x557434),0x0;}}
@@ -1 +1 @@
1
- const a26_0x30ce8d=a26_0x5d6d;(function(_0x52b78f,_0x4dcb34){const _0xf24e76=a26_0x5d6d,_0x27ed35=_0x52b78f();while(!![]){try{const _0x17f71b=-parseInt(_0xf24e76(0xb7))/0x1*(parseInt(_0xf24e76(0xc3))/0x2)+parseInt(_0xf24e76(0xb8))/0x3+parseInt(_0xf24e76(0xca))/0x4+-parseInt(_0xf24e76(0xb1))/0x5*(-parseInt(_0xf24e76(0xdb))/0x6)+parseInt(_0xf24e76(0xdd))/0x7+-parseInt(_0xf24e76(0xb5))/0x8*(parseInt(_0xf24e76(0xdc))/0x9)+-parseInt(_0xf24e76(0xcf))/0xa;if(_0x17f71b===_0x4dcb34)break;else _0x27ed35['push'](_0x27ed35['shift']());}catch(_0x18d6f4){_0x27ed35['push'](_0x27ed35['shift']());}}}(a26_0x5395,0xb8c11));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a26_0x5d6d(_0x43d277,_0x32af43){const _0x5395d7=a26_0x5395();return a26_0x5d6d=function(_0x5d6df1,_0x446a0a){_0x5d6df1=_0x5d6df1-0xac;let _0x374b0f=_0x5395d7[_0x5d6df1];return _0x374b0f;},a26_0x5d6d(_0x43d277,_0x32af43);}import{loadJSONFromOptions}from'../utils/json-loader.js';function a26_0x5395(){const _0x6fc99f=['1564192whYqvE','type','Resolved\x20relative\x20path\x20to:\x20','invisible','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','execute','createSegment','5xHVrFU','includes','segment','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','1601528WReLls','error','99xvvzuF','3861225HAqgOn','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','kind','✔\x20Created\x20segment\x20\x27','Resolving\x20parent\x20segment\x20\x27','site','folder','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','name','\x27\x20with\x20ID:\x20','13132wJaFOl','Parent:\x20','description','\x27...','Resolving\x20folder\x20path\x20\x27','noCountPopulation','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','3675372DlTmal','Target\x20path:\x20','folderId','verbose','segmentPath','14109360vzBtEe','length','Segment\x20name:\x20','segment:create','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','data','parent','Site:\x20','segments','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','Examples:','4732386dqLcoB','18rfdBIS'];a26_0x5395=function(){return _0x6fc99f;};return a26_0x5395();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a26_0x30ce8d(0xc1)]=a26_0x30ce8d(0xd2);['description']='Create\x20child\x20segment\x20with\x20filtering\x20rules';async[a26_0x30ce8d(0xaf)](_0x1e0a21){const _0x8bf6b=a26_0x30ce8d,{options:_0x59a94f,args:_0x49f1a3,tdx:_0xe8c863}=_0x1e0a21,_0x532d60=_0x59a94f;if(_0x49f1a3[_0x8bf6b(0xd0)]===0x0)return console[_0x8bf6b(0xb6)](_0x8bf6b(0xae)),console['error'](_0x8bf6b(0xb4)),console[_0x8bf6b(0xb6)](_0x8bf6b(0xda)),console[_0x8bf6b(0xb6)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x8bf6b(0xb6)](_0x8bf6b(0xba)),console[_0x8bf6b(0xb6)](_0x8bf6b(0xc9)),0x1;const _0x469bed=_0x49f1a3[0x0],_0x431527=_0x59a94f[_0x8bf6b(0xce)];let _0x275cae=_0x469bed;_0x431527&&!_0x469bed[_0x8bf6b(0xb2)]('/')&&(_0x275cae=_0x431527+'/'+_0x469bed,_0x532d60[_0x8bf6b(0xcd)]&&console[_0x8bf6b(0xb6)](_0x8bf6b(0xac)+_0x275cae));const _0x22a24b=parsePath(_0x275cae);if(_0x22a24b[_0x8bf6b(0xd7)][_0x8bf6b(0xd0)]<0x2)return console[_0x8bf6b(0xb6)](_0x8bf6b(0xc0)),console['error'](_0x8bf6b(0xd3)),0x1;const _0x4970c1=_0x22a24b[_0x8bf6b(0xd7)][0x0],_0x592bc8=getBaseName(_0x275cae),_0x50d62e=getParentPath(_0x275cae);_0x532d60[_0x8bf6b(0xcd)]&&(console[_0x8bf6b(0xb6)](_0x8bf6b(0xd6)+_0x532d60[_0x8bf6b(0xbe)]),console[_0x8bf6b(0xb6)](_0x8bf6b(0xcb)+_0x275cae),console[_0x8bf6b(0xb6)](_0x8bf6b(0xc4)+_0x4970c1),console[_0x8bf6b(0xb6)](_0x8bf6b(0xd1)+_0x592bc8),console[_0x8bf6b(0xb6)]('Parent\x20path:\x20'+_0x50d62e));const _0x377b31=await withSpinner(_0x8bf6b(0xbd)+_0x4970c1+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)]['resolveParentId'](_0x4970c1),{'verbose':_0x532d60['verbose']}),_0x537dd0=_0x377b31['data'];let _0x5e2673;if(_0x22a24b[_0x8bf6b(0xd7)][_0x8bf6b(0xd0)]>0x2){const _0x359ad8=await withSpinner(_0x8bf6b(0xc7)+_0x50d62e+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)]['resolvePathToResource'](_0x50d62e),{'verbose':_0x532d60[_0x8bf6b(0xcd)]}),_0x4b71a8=_0x359ad8[_0x8bf6b(0xd4)];if(_0x4b71a8[_0x8bf6b(0xde)]!==_0x8bf6b(0xbf)&&_0x4b71a8[_0x8bf6b(0xde)]!==_0x8bf6b(0xd5))return console[_0x8bf6b(0xb6)](_0x8bf6b(0xb9)),0x1;_0x5e2673=_0x4b71a8[_0x8bf6b(0xcc)];}else{if(_0x532d60[_0x8bf6b(0xbf)]){const _0x1d2bb7=await withSpinner(_0x8bf6b(0xd8)+_0x532d60[_0x8bf6b(0xbf)]+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)]['resolveFolderId'](_0x537dd0,_0x532d60[_0x8bf6b(0xbf)]),{'verbose':_0x532d60[_0x8bf6b(0xcd)]});_0x5e2673=_0x1d2bb7[_0x8bf6b(0xd4)];}}_0x532d60[_0x8bf6b(0xcd)]&&_0x5e2673&&console[_0x8bf6b(0xb6)]('Resolved\x20folder\x20ID:\x20'+_0x5e2673);const _0x23271b=await loadJSONFromOptions(_0x532d60['rule'],_0x532d60['ruleFile']),_0x53f600={'name':_0x592bc8,'description':_0x532d60[_0x8bf6b(0xc5)],'rule':_0x23271b,'kind':_0x532d60[_0x8bf6b(0xbb)]!==undefined?parseInt(_0x532d60[_0x8bf6b(0xbb)],0xa):undefined,'isVisible':_0x532d60[_0x8bf6b(0xad)]?![]:undefined,'segmentFolderId':_0x5e2673,'countPopulation':_0x532d60[_0x8bf6b(0xc8)]?![]:undefined},_0xb0256a=await withSpinner('Creating\x20segment\x20\x27'+_0x592bc8+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)][_0x8bf6b(0xb0)](_0x537dd0,_0x53f600),{'verbose':_0x532d60['verbose']}),_0x188325=_0xb0256a[_0x8bf6b(0xd4)];return console[_0x8bf6b(0xb6)](_0x8bf6b(0xbc)+_0x188325[_0x8bf6b(0xc1)]+_0x8bf6b(0xc2)+_0x188325['id']),_0x275cae!==_0x469bed&&console[_0x8bf6b(0xb6)](_0x8bf6b(0xd9)+_0x275cae),await handleSDKOutput([_0x188325],_0x532d60),0x0;}}
1
+ function a26_0x4d40(_0x2ff981,_0x4ccc82){const _0x373882=a26_0x3738();return a26_0x4d40=function(_0x4d4095,_0x4eb633){_0x4d4095=_0x4d4095-0xf0;let _0x352260=_0x373882[_0x4d4095];return _0x352260;},a26_0x4d40(_0x2ff981,_0x4ccc82);}const a26_0xeb3d08=a26_0x4d40;(function(_0x6e5b8,_0x381ea6){const _0x15c448=a26_0x4d40,_0x34feac=_0x6e5b8();while(!![]){try{const _0x503f19=-parseInt(_0x15c448(0x115))/0x1+-parseInt(_0x15c448(0x106))/0x2+parseInt(_0x15c448(0xf7))/0x3+parseInt(_0x15c448(0x122))/0x4*(-parseInt(_0x15c448(0x121))/0x5)+-parseInt(_0x15c448(0x11d))/0x6*(parseInt(_0x15c448(0x11b))/0x7)+-parseInt(_0x15c448(0x114))/0x8*(-parseInt(_0x15c448(0x116))/0x9)+-parseInt(_0x15c448(0xfc))/0xa*(-parseInt(_0x15c448(0xfb))/0xb);if(_0x503f19===_0x381ea6)break;else _0x34feac['push'](_0x34feac['shift']());}catch(_0x128227){_0x34feac['push'](_0x34feac['shift']());}}}(a26_0x3738,0x494b5));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';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';function a26_0x3738(){const _0x5dfb63=['Resolved\x20relative\x20path\x20to:\x20','kind','resolveFolderId','3419997ubeXrL','Parent:\x20','6dRPArH','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','Resolving\x20parent\x20segment\x20\x27','Resolving\x20folder\x20path\x20\x27','245mNcqVz','30144fJDOUi','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Parent\x20path:\x20','rule','parent','noCountPopulation','type','createSegment','error','ruleFile','data','1309638tYKstV','verbose','folderId','Creating\x20segment\x20\x27','392194cpksdZ','190VbAaSR','\x20\x20\x20Path:\x20','site','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','name','segment:create','includes','segmentPath','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','execute','702992eoMime','Site:\x20','segment','\x27...','✔\x20Created\x20segment\x20\x27','resolvePathToResource','invisible','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','folder','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','description','length','Create\x20child\x20segment\x20with\x20filtering\x20rules','segments','4428272lXToWl','157962GYQhZW','9pBDvNt','Resolving\x20folder\x20\x27'];a26_0x3738=function(){return _0x5dfb63;};return a26_0x3738();}export class SegmentCreateCommand extends BaseCommand{[a26_0xeb3d08(0x100)]=a26_0xeb3d08(0x101);['description']=a26_0xeb3d08(0x112);async[a26_0xeb3d08(0x105)](_0x29a6d4){const _0x53a78b=a26_0xeb3d08,{options:_0x14cc45,args:_0x47689e,tdx:_0x5bf94b}=_0x29a6d4,_0x2c9382=_0x14cc45;if(_0x47689e[_0x53a78b(0x111)]===0x0)return console[_0x53a78b(0xf4)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error'](_0x53a78b(0x11e)),console[_0x53a78b(0xf4)]('Examples:'),console[_0x53a78b(0xf4)](_0x53a78b(0xff)),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0x53a78b(0xf4)](_0x53a78b(0x104)),0x1;const _0x18659c=_0x47689e[0x0],_0x29f1ab=_0x14cc45[_0x53a78b(0x103)];let _0x56f0a3=_0x18659c;_0x29f1ab&&!_0x18659c[_0x53a78b(0x102)]('/')&&(_0x56f0a3=_0x29f1ab+'/'+_0x18659c,_0x2c9382['verbose']&&console['error'](_0x53a78b(0x118)+_0x56f0a3));const _0x48495d=parsePath(_0x56f0a3);if(_0x48495d[_0x53a78b(0x113)][_0x53a78b(0x111)]<0x2)return console['error'](_0x53a78b(0x10d)),console[_0x53a78b(0xf4)](_0x53a78b(0x124)),0x1;const _0x15d473=_0x48495d[_0x53a78b(0x113)][0x0],_0x24b3a3=getBaseName(_0x56f0a3),_0x3e9d1b=getParentPath(_0x56f0a3);_0x2c9382[_0x53a78b(0xf8)]&&(console[_0x53a78b(0xf4)](_0x53a78b(0x107)+_0x2c9382[_0x53a78b(0xfe)]),console['error'](_0x53a78b(0x123)+_0x56f0a3),console[_0x53a78b(0xf4)](_0x53a78b(0x11c)+_0x15d473),console[_0x53a78b(0xf4)]('Segment\x20name:\x20'+_0x24b3a3),console[_0x53a78b(0xf4)](_0x53a78b(0x125)+_0x3e9d1b));const _0x2bd0eb=await withSpinner(_0x53a78b(0x11f)+_0x15d473+_0x53a78b(0x109),()=>_0x5bf94b['segment']['resolveParentId'](_0x15d473),{'verbose':_0x2c9382[_0x53a78b(0xf8)]}),_0x3f9e70=_0x2bd0eb[_0x53a78b(0xf6)];let _0x241ccc;if(_0x48495d[_0x53a78b(0x113)][_0x53a78b(0x111)]>0x2){const _0x143af6=await withSpinner(_0x53a78b(0x120)+_0x3e9d1b+_0x53a78b(0x109),()=>_0x5bf94b[_0x53a78b(0x108)][_0x53a78b(0x10b)](_0x3e9d1b),{'verbose':_0x2c9382['verbose']}),_0x4e7ac8=_0x143af6[_0x53a78b(0xf6)];if(_0x4e7ac8[_0x53a78b(0xf2)]!==_0x53a78b(0x10e)&&_0x4e7ac8[_0x53a78b(0xf2)]!==_0x53a78b(0xf0))return console[_0x53a78b(0xf4)](_0x53a78b(0x10f)),0x1;_0x241ccc=_0x4e7ac8[_0x53a78b(0xf9)];}else{if(_0x2c9382[_0x53a78b(0x10e)]){const _0x35e7d0=await withSpinner(_0x53a78b(0x117)+_0x2c9382[_0x53a78b(0x10e)]+_0x53a78b(0x109),()=>_0x5bf94b[_0x53a78b(0x108)][_0x53a78b(0x11a)](_0x3f9e70,_0x2c9382[_0x53a78b(0x10e)]),{'verbose':_0x2c9382[_0x53a78b(0xf8)]});_0x241ccc=_0x35e7d0['data'];}}_0x2c9382[_0x53a78b(0xf8)]&&_0x241ccc&&console[_0x53a78b(0xf4)]('Resolved\x20folder\x20ID:\x20'+_0x241ccc);const _0x201b39=await loadJSONFromOptions(_0x2c9382[_0x53a78b(0x126)],_0x2c9382[_0x53a78b(0xf5)]),_0x540f10={'name':_0x24b3a3,'description':_0x2c9382[_0x53a78b(0x110)],'rule':_0x201b39,'kind':_0x2c9382[_0x53a78b(0x119)]!==undefined?parseInt(_0x2c9382[_0x53a78b(0x119)],0xa):undefined,'isVisible':_0x2c9382[_0x53a78b(0x10c)]?![]:undefined,'segmentFolderId':_0x241ccc,'countPopulation':_0x2c9382[_0x53a78b(0xf1)]?![]:undefined},_0x465db8=await withSpinner(_0x53a78b(0xfa)+_0x24b3a3+_0x53a78b(0x109),()=>_0x5bf94b[_0x53a78b(0x108)][_0x53a78b(0xf3)](_0x3f9e70,_0x540f10),{'verbose':_0x2c9382['verbose']}),_0x41c69c=_0x465db8[_0x53a78b(0xf6)];return console['error'](_0x53a78b(0x10a)+_0x41c69c[_0x53a78b(0x100)]+'\x27\x20with\x20ID:\x20'+_0x41c69c['id']),_0x56f0a3!==_0x18659c&&console['error'](_0x53a78b(0xfd)+_0x56f0a3),await handleSDKOutput([_0x41c69c],_0x2c9382),0x0;}}
@@ -1 +1 @@
1
- function a27_0xa3e3(){const _0x3c7810=['50RGdrwi','✔\x20Found\x20','data','Error:\x20Parent\x20segment\x20name\x20is\x20required','5717880CBkIWc','68cnhyAV','Parent\x20segment:\x20','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','8dxYddn','parentSegment','454uTDMLk','name','Listing\x20fields\x20for\x20\x27','1035083sHWHpF','description','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','listFields','segment','328818idVYPi','List\x20available\x20fields\x20for\x20segmentation','error','27564OQeVWW','1166eulwIf','\x20field','verbose','133890NoQfIq','2129xxyhQr','12835251UeUyBQ','length'];a27_0xa3e3=function(){return _0x3c7810;};return a27_0xa3e3();}const a27_0x5a8095=a27_0x3bff;(function(_0x2632be,_0x70e19a){const _0x843b7c=a27_0x3bff,_0x5adb9d=_0x2632be();while(!![]){try{const _0x49f5eb=parseInt(_0x843b7c(0x198))/0x1*(parseInt(_0x843b7c(0x1a5))/0x2)+parseInt(_0x843b7c(0x1b4))/0x3*(-parseInt(_0x843b7c(0x1a0))/0x4)+-parseInt(_0x843b7c(0x19b))/0x5*(-parseInt(_0x843b7c(0x1ad))/0x6)+parseInt(_0x843b7c(0x1a8))/0x7*(-parseInt(_0x843b7c(0x1a3))/0x8)+parseInt(_0x843b7c(0x199))/0x9+-parseInt(_0x843b7c(0x19f))/0xa+-parseInt(_0x843b7c(0x1b1))/0xb*(parseInt(_0x843b7c(0x1b0))/0xc);if(_0x49f5eb===_0x70e19a)break;else _0x5adb9d['push'](_0x5adb9d['shift']());}catch(_0x2b3524){_0x5adb9d['push'](_0x5adb9d['shift']());}}}(a27_0xa3e3,0xb3973));function a27_0x3bff(_0x45f764,_0xa03f33){const _0xa3e3e=a27_0xa3e3();return a27_0x3bff=function(_0x3bff67,_0x2737a4){_0x3bff67=_0x3bff67-0x198;let _0x5878f3=_0xa3e3e[_0x3bff67];return _0x5878f3;},a27_0x3bff(_0x45f764,_0xa03f33);}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a27_0x5a8095(0x1a6)]='segment:fields';[a27_0x5a8095(0x1a9)]=a27_0x5a8095(0x1ae);async['execute'](_0x5e7e2f){const _0x5f19af=a27_0x5a8095,{options:_0x2d08c1,args:_0x21bcae,tdx:_0x10f6e0}=_0x5e7e2f,_0x5a688c=_0x21bcae[0x0]||_0x2d08c1[_0x5f19af(0x1a4)];if(!_0x5a688c)return console[_0x5f19af(0x1af)](_0x5f19af(0x19e)),console[_0x5f19af(0x1af)](_0x5f19af(0x1a2)),console[_0x5f19af(0x1af)](_0x5f19af(0x1aa)),0x1;_0x2d08c1[_0x5f19af(0x1b3)]&&(console[_0x5f19af(0x1af)]('Site:\x20'+_0x2d08c1['site']),console[_0x5f19af(0x1af)](_0x5f19af(0x1a1)+_0x5a688c));const _0x1fbd88=await withSpinner(_0x5f19af(0x1a7)+_0x5a688c+'\x27...',()=>_0x10f6e0[_0x5f19af(0x1ac)][_0x5f19af(0x1ab)](_0x5a688c),{'verbose':_0x2d08c1[_0x5f19af(0x1b3)]}),_0x496f55=_0x1fbd88[_0x5f19af(0x19d)];return console[_0x5f19af(0x1af)](_0x5f19af(0x19c)+_0x496f55['length']+_0x5f19af(0x1b2)+(_0x496f55[_0x5f19af(0x19a)]!==0x1?'s':'')),await handleSDKOutput(_0x496f55,_0x2d08c1),0x0;}}
1
+ function a27_0x52b8(){const _0x42104f=['\x20field','parentSegment','1IjGNQm','8133160smIstk','19812089KLVxEJ','4950zYirfQ','Parent\x20segment:\x20','listFields','List\x20available\x20fields\x20for\x20segmentation','verbose','Error:\x20Parent\x20segment\x20name\x20is\x20required','length','40216cUQUkV','name','segment:fields','4164SQgsRa','error','\x27...','643517xpRTHX','segment','16BZgTZG','7705107PJOBMh','site','600774OEynuB','264uzhZoP','Site:\x20','data','✔\x20Found\x20'];a27_0x52b8=function(){return _0x42104f;};return a27_0x52b8();}const a27_0x15235e=a27_0x19e0;(function(_0x1bbdd7,_0x193f92){const _0x59233a=a27_0x19e0,_0x4c44bf=_0x1bbdd7();while(!![]){try{const _0x56029c=-parseInt(_0x59233a(0x163))/0x1*(-parseInt(_0x59233a(0x15c))/0x2)+-parseInt(_0x59233a(0x15d))/0x3*(-parseInt(_0x59233a(0x151))/0x4)+-parseInt(_0x59233a(0x14a))/0x5*(parseInt(_0x59233a(0x154))/0x6)+parseInt(_0x59233a(0x157))/0x7*(parseInt(_0x59233a(0x159))/0x8)+parseInt(_0x59233a(0x15a))/0x9+parseInt(_0x59233a(0x164))/0xa+-parseInt(_0x59233a(0x149))/0xb;if(_0x56029c===_0x193f92)break;else _0x4c44bf['push'](_0x4c44bf['shift']());}catch(_0x10631d){_0x4c44bf['push'](_0x4c44bf['shift']());}}}(a27_0x52b8,0x86589));import{BaseCommand}from'./command.js';function a27_0x19e0(_0x1b4e27,_0x277b78){const _0x52b818=a27_0x52b8();return a27_0x19e0=function(_0x19e0f6,_0x4bd0b1){_0x19e0f6=_0x19e0f6-0x149;let _0x5281e5=_0x52b818[_0x19e0f6];return _0x5281e5;},a27_0x19e0(_0x1b4e27,_0x277b78);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a27_0x15235e(0x152)]=a27_0x15235e(0x153);['description']=a27_0x15235e(0x14d);async['execute'](_0x40160a){const _0x52b268=a27_0x15235e,{options:_0xac331b,args:_0x1280a4,tdx:_0x16d6dd}=_0x40160a,_0x440db2=_0x1280a4[0x0]||_0xac331b[_0x52b268(0x162)];if(!_0x440db2)return console[_0x52b268(0x155)](_0x52b268(0x14f)),console[_0x52b268(0x155)]('Usage:\x20tdx\x20segment\x20fields\x20<parent_name>'),console[_0x52b268(0x155)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;_0xac331b[_0x52b268(0x14e)]&&(console[_0x52b268(0x155)](_0x52b268(0x15e)+_0xac331b[_0x52b268(0x15b)]),console[_0x52b268(0x155)](_0x52b268(0x14b)+_0x440db2));const _0x19fa47=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x440db2+_0x52b268(0x156),()=>_0x16d6dd[_0x52b268(0x158)][_0x52b268(0x14c)](_0x440db2),{'verbose':_0xac331b[_0x52b268(0x14e)]}),_0x4cdac9=_0x19fa47[_0x52b268(0x15f)];return console['error'](_0x52b268(0x160)+_0x4cdac9[_0x52b268(0x150)]+_0x52b268(0x161)+(_0x4cdac9[_0x52b268(0x150)]!==0x1?'s':'')),await handleSDKOutput(_0x4cdac9,_0xac331b),0x0;}}
@@ -1 +1 @@
1
- function a28_0x3250(_0x398df8,_0x3e9812){const _0x2c521a=a28_0x2c52();return a28_0x3250=function(_0x32506,_0x453c97){_0x32506=_0x32506-0xf2;let _0x169b3e=_0x2c521a[_0x32506];return _0x169b3e;},a28_0x3250(_0x398df8,_0x3e9812);}function a28_0x2c52(){const _0x3a8641=['stringify','root','94806OwDJed','\x20\x20Path:\x20','error','126wtbqXj','11jmIQpQ','3JgVSzI','3152388VzQoZV','22037292rwygCh','name','4ystidF','4374675rJRPFb','segmentPath','4421310TEDquI','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','format','582066NgNFTO','verbose','json','Context\x20details:','segment:pwd','description','log','24VIjFRh','362034BRAzRL'];a28_0x2c52=function(){return _0x3a8641;};return a28_0x2c52();}const a28_0x5f0cb4=a28_0x3250;(function(_0x739ac9,_0x26af47){const _0x17928e=a28_0x3250,_0x36f44d=_0x739ac9();while(!![]){try{const _0x217083=-parseInt(_0x17928e(0xf4))/0x1*(parseInt(_0x17928e(0x109))/0x2)+-parseInt(_0x17928e(0xf5))/0x3*(parseInt(_0x17928e(0xf8))/0x4)+-parseInt(_0x17928e(0xf9))/0x5+parseInt(_0x17928e(0x106))/0x6*(parseInt(_0x17928e(0xf2))/0x7)+parseInt(_0x17928e(0x105))/0x8*(parseInt(_0x17928e(0xfe))/0x9)+-parseInt(_0x17928e(0xfb))/0xa*(parseInt(_0x17928e(0xf3))/0xb)+parseInt(_0x17928e(0xf6))/0xc;if(_0x217083===_0x26af47)break;else _0x36f44d['push'](_0x36f44d['shift']());}catch(_0x1afb97){_0x36f44d['push'](_0x36f44d['shift']());}}}(a28_0x2c52,0x9411e));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a28_0x5f0cb4(0xf7)]=a28_0x5f0cb4(0x102);[a28_0x5f0cb4(0x103)]='Show\x20current\x20segment/folder\x20context';async['execute'](_0x4bc9d1){const _0x223220=a28_0x5f0cb4,{options:_0x145043}=_0x4bc9d1;try{const _0x13e454=_0x145043[_0x223220(0xfa)];if(!_0x13e454)return _0x145043[_0x223220(0xfd)]===_0x223220(0x100)||_0x145043[_0x223220(0xfd)]==='jsonl'?console[_0x223220(0x104)](JSON[_0x223220(0x107)]({'path':'/','type':_0x223220(0x108)})):console[_0x223220(0x104)]('/'),0x0;if(_0x145043[_0x223220(0xfd)]==='json'||_0x145043[_0x223220(0xfd)]==='jsonl'){const _0x166a9c={'path':_0x13e454};console[_0x223220(0x104)](JSON['stringify'](_0x166a9c));}else console[_0x223220(0x104)](_0x13e454),_0x145043[_0x223220(0xff)]&&(console['error'](''),console[_0x223220(0x10b)](_0x223220(0x101)),console['error'](_0x223220(0x10a)+_0x13e454),console[_0x223220(0x10b)](''),console[_0x223220(0x10b)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console['error'](_0x223220(0xfc)));return 0x0;}catch(_0x13e731){throw _0x13e731;}}}
1
+ function a28_0x2979(_0x303c42,_0x1a529c){const _0x52b8ee=a28_0x52b8();return a28_0x2979=function(_0x2979a7,_0x17c11){_0x2979a7=_0x2979a7-0x114;let _0x733daf=_0x52b8ee[_0x2979a7];return _0x733daf;},a28_0x2979(_0x303c42,_0x1a529c);}const a28_0xa6d3a6=a28_0x2979;(function(_0xa9ee0d,_0x15a985){const _0x331624=a28_0x2979,_0x24a354=_0xa9ee0d();while(!![]){try{const _0x4d6f3d=-parseInt(_0x331624(0x128))/0x1*(parseInt(_0x331624(0x118))/0x2)+parseInt(_0x331624(0x11c))/0x3+parseInt(_0x331624(0x114))/0x4+parseInt(_0x331624(0x125))/0x5+-parseInt(_0x331624(0x122))/0x6*(parseInt(_0x331624(0x117))/0x7)+parseInt(_0x331624(0x11b))/0x8+parseInt(_0x331624(0x116))/0x9;if(_0x4d6f3d===_0x15a985)break;else _0x24a354['push'](_0x24a354['shift']());}catch(_0x32cb88){_0x24a354['push'](_0x24a354['shift']());}}}(a28_0x52b8,0x2d5da));import{BaseCommand}from'./command.js';function a28_0x52b8(){const _0x2b4127=['segmentPath','stringify','name','Show\x20current\x20segment/folder\x20context','16956elSKrM','error','2492982XasUzc','334369Xzteax','1414AryZTn','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','verbose','337840VEmnsS','65202cCJTWY','log','json','execute','root','Context\x20details:','18ocZKEh','format','jsonl','615985eRWRdp','segment:pwd','\x20\x20Path:\x20','197DzWzZy'];a28_0x52b8=function(){return _0x2b4127;};return a28_0x52b8();}export class SegmentPwdCommand extends BaseCommand{[a28_0xa6d3a6(0x12b)]=a28_0xa6d3a6(0x126);['description']=a28_0xa6d3a6(0x12c);async[a28_0xa6d3a6(0x11f)](_0x4ff85b){const _0x113a8a=a28_0xa6d3a6,{options:_0x23d409}=_0x4ff85b;try{const _0x59ee20=_0x23d409[_0x113a8a(0x129)];if(!_0x59ee20)return _0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x11e)||_0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x124)?console[_0x113a8a(0x11d)](JSON[_0x113a8a(0x12a)]({'path':'/','type':_0x113a8a(0x120)})):console[_0x113a8a(0x11d)]('/'),0x0;if(_0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x11e)||_0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x124)){const _0x5d9dd0={'path':_0x59ee20};console[_0x113a8a(0x11d)](JSON[_0x113a8a(0x12a)](_0x5d9dd0));}else console['log'](_0x59ee20),_0x23d409[_0x113a8a(0x11a)]&&(console[_0x113a8a(0x115)](''),console[_0x113a8a(0x115)](_0x113a8a(0x121)),console[_0x113a8a(0x115)](_0x113a8a(0x127)+_0x59ee20),console['error'](''),console[_0x113a8a(0x115)](_0x113a8a(0x119)),console[_0x113a8a(0x115)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x1afe1f){throw _0x1afe1f;}}}
@@ -1 +1 @@
1
- const a29_0x112769=a29_0x4551;(function(_0x17abea,_0x2d9900){const _0x4dc7d9=a29_0x4551,_0x3518c3=_0x17abea();while(!![]){try{const _0x4404bb=-parseInt(_0x4dc7d9(0x204))/0x1*(-parseInt(_0x4dc7d9(0x1e3))/0x2)+-parseInt(_0x4dc7d9(0x1f2))/0x3+parseInt(_0x4dc7d9(0x1da))/0x4*(parseInt(_0x4dc7d9(0x1d7))/0x5)+parseInt(_0x4dc7d9(0x1eb))/0x6*(-parseInt(_0x4dc7d9(0x1ec))/0x7)+-parseInt(_0x4dc7d9(0x208))/0x8+-parseInt(_0x4dc7d9(0x1f8))/0x9*(-parseInt(_0x4dc7d9(0x1f1))/0xa)+parseInt(_0x4dc7d9(0x1e1))/0xb*(parseInt(_0x4dc7d9(0x1e9))/0xc);if(_0x4404bb===_0x2d9900)break;else _0x3518c3['push'](_0x3518c3['shift']());}catch(_0x333cdc){_0x3518c3['push'](_0x3518c3['shift']());}}}(a29_0x1f25,0xa24b9));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a29_0x4551(_0x33bbfa,_0x394d37){const _0x1f25e2=a29_0x1f25();return a29_0x4551=function(_0x455111,_0x49f967){_0x455111=_0x455111-0x1d5;let _0x503293=_0x1f25e2[_0x455111];return _0x503293;},a29_0x4551(_0x33bbfa,_0x394d37);}import{loadJSONFromOptions}from'../utils/json-loader.js';function a29_0x1f25(){const _0x1da124=['Resolving\x20folder\x20\x27','error','132cmHEIb','updateSegmentById','1006762zzjlJd','\x20\x20\x20Path:\x20','Updating\x20segment\x20\x27','includes','segment:update','INTERNAL','944796TyotyE','rule','2411052XyICRG','21YzgqoJ','Resolved\x20folder\x20ID:\x20','Parent\x20ID:\x20','segmentId','Update\x20existing\x20child\x20segment','10392170CuUhMI','2378859foXKeC','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segment','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','length','9kwRwDX','segmentPath','verbose','ruleFile','type','parentId','\x27...','execute','name','folder','data','resolveFolderId','2wAoUIV','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','3364136LGBQjf','kind','Resolving\x20path\x20\x27','Segment\x20ID:\x20','77485jSSVpD','segmentName','resolvePathToResource','24VuQnfv','Examples:','Segment\x20ID\x20missing\x20from\x20resolved\x20path','✔\x20Updated\x20segment\x20\x27','description'];a29_0x1f25=function(){return _0x1da124;};return a29_0x1f25();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{['name']=a29_0x112769(0x1e7);[a29_0x112769(0x1de)]=a29_0x112769(0x1f0);async[a29_0x112769(0x1ff)](_0x365e4e){const _0x58ca38=a29_0x112769,{options:_0x3f2f35,args:_0x2d55cf,tdx:_0x50e905}=_0x365e4e,_0x10f6b9=_0x3f2f35;if(_0x2d55cf[_0x58ca38(0x1f7)]===0x0)return console['error'](_0x58ca38(0x1f4)),console[_0x58ca38(0x1e0)](_0x58ca38(0x205)),console['error'](_0x58ca38(0x1db)),console['error'](_0x58ca38(0x1f6)),console[_0x58ca38(0x1e0)](_0x58ca38(0x206)),0x1;const _0x54122f=_0x2d55cf[0x0],_0x22a3dd=_0x3f2f35[_0x58ca38(0x1f9)];let _0x245cec=_0x54122f;_0x22a3dd&&!_0x54122f[_0x58ca38(0x1e6)]('/')&&(_0x245cec=_0x22a3dd+'/'+_0x54122f,_0x10f6b9['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x245cec));const _0x4c7f1f=await withSpinner(_0x58ca38(0x1d5)+_0x245cec+_0x58ca38(0x1fe),()=>_0x50e905[_0x58ca38(0x1f5)][_0x58ca38(0x1d9)](_0x245cec),{'verbose':_0x10f6b9[_0x58ca38(0x1fa)]}),_0x437f03=_0x4c7f1f['data'];_0x10f6b9['verbose']&&console[_0x58ca38(0x1e0)]('Resolved\x20type:\x20'+_0x437f03[_0x58ca38(0x1fc)]);if(_0x437f03[_0x58ca38(0x1fc)]!=='segment')return console[_0x58ca38(0x1e0)]('Error:\x20Cannot\x20update\x20'+_0x437f03['type']+_0x58ca38(0x1f3)),console[_0x58ca38(0x1e0)](_0x58ca38(0x207)),0x1;if(!_0x437f03[_0x58ca38(0x1ef)])throw new SDKError(ErrorCode[_0x58ca38(0x1e8)],_0x58ca38(0x1dc));const _0x49de2f=_0x437f03[_0x58ca38(0x1fd)],_0x499395=_0x437f03[_0x58ca38(0x1ef)];_0x10f6b9['verbose']&&(console[_0x58ca38(0x1e0)](_0x58ca38(0x1ee)+_0x49de2f),console[_0x58ca38(0x1e0)](_0x58ca38(0x1d6)+_0x499395));let _0x150bc0;if(_0x10f6b9[_0x58ca38(0x201)]){const _0x32e06e=_0x10f6b9[_0x58ca38(0x201)],_0x3c05b9=await withSpinner(_0x58ca38(0x1df)+_0x32e06e+_0x58ca38(0x1fe),()=>_0x50e905[_0x58ca38(0x1f5)][_0x58ca38(0x203)](_0x49de2f,_0x32e06e),{'verbose':_0x10f6b9[_0x58ca38(0x1fa)]});_0x150bc0=parseInt(_0x3c05b9[_0x58ca38(0x202)],0xa),_0x10f6b9[_0x58ca38(0x1fa)]&&console[_0x58ca38(0x1e0)](_0x58ca38(0x1ed)+_0x150bc0);}const _0x5a4343=await loadJSONFromOptions(_0x10f6b9[_0x58ca38(0x1ea)],_0x10f6b9[_0x58ca38(0x1fb)]),_0x585f01={'name':_0x10f6b9[_0x58ca38(0x200)],'description':_0x10f6b9[_0x58ca38(0x1de)],'rule':_0x5a4343,'kind':_0x10f6b9[_0x58ca38(0x209)]!==undefined?parseInt(_0x10f6b9[_0x58ca38(0x209)],0xa):undefined,'segmentFolderId':_0x150bc0},_0x54e7d9=await withSpinner(_0x58ca38(0x1e5)+_0x437f03[_0x58ca38(0x1d8)]+_0x58ca38(0x1fe),()=>_0x50e905[_0x58ca38(0x1f5)][_0x58ca38(0x1e2)](_0x49de2f,_0x499395,_0x585f01),{'verbose':_0x10f6b9[_0x58ca38(0x1fa)]}),_0x23f468=_0x54e7d9[_0x58ca38(0x202)];return console['error'](_0x58ca38(0x1dd)+_0x23f468[_0x58ca38(0x200)]+'\x27'),_0x245cec!==_0x54122f&&console['error'](_0x58ca38(0x1e4)+_0x245cec),await handleSDKOutput([_0x23f468],_0x10f6b9),0x0;}}
1
+ const a29_0x375358=a29_0x31e0;(function(_0x26154d,_0x2456b9){const _0x1ab87c=a29_0x31e0,_0x55b982=_0x26154d();while(!![]){try{const _0x2ae3fa=parseInt(_0x1ab87c(0xe2))/0x1+-parseInt(_0x1ab87c(0xbf))/0x2*(-parseInt(_0x1ab87c(0xcf))/0x3)+-parseInt(_0x1ab87c(0xc1))/0x4*(parseInt(_0x1ab87c(0xe7))/0x5)+-parseInt(_0x1ab87c(0xcc))/0x6+parseInt(_0x1ab87c(0xde))/0x7*(-parseInt(_0x1ab87c(0xba))/0x8)+parseInt(_0x1ab87c(0xc3))/0x9+parseInt(_0x1ab87c(0xd6))/0xa;if(_0x2ae3fa===_0x2456b9)break;else _0x55b982['push'](_0x55b982['shift']());}catch(_0x1c0a22){_0x55b982['push'](_0x55b982['shift']());}}}(a29_0x2e05,0x4897c));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a29_0x2e05(){const _0x40306c=['Parent\x20ID:\x20','Resolving\x20folder\x20\x27','segmentId','updateSegmentById','245rNgIQA','\x27...','4504ZNIVhH','includes','Examples:','✔\x20Updated\x20segment\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','106KGCosd','Resolved\x20folder\x20ID:\x20','16280NFhoKm','description','821907ImGbQa','Updating\x20segment\x20\x27','Resolved\x20type:\x20','segment:update','data','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','execute','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','217056TSXZRV','length','parentId','32847CwVkPt','error','folder','segmentName','Update\x20existing\x20child\x20segment','segment','resolvePathToResource','291120KJmzvs','\x20\x20\x20Path:\x20','type','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','resolveFolderId','INTERNAL','kind','verbose','6111jTxLBb','name','Error:\x20Cannot\x20update\x20','Segment\x20ID:\x20','323713CbJqMC'];a29_0x2e05=function(){return _0x40306c;};return a29_0x2e05();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a29_0x31e0(_0x1a8fa0,_0x3327a3){const _0x2e0582=a29_0x2e05();return a29_0x31e0=function(_0x31e0d1,_0x16c9ee){_0x31e0d1=_0x31e0d1-0xba;let _0x21e644=_0x2e0582[_0x31e0d1];return _0x21e644;},a29_0x31e0(_0x1a8fa0,_0x3327a3);}export class SegmentUpdateCommand extends BaseCommand{[a29_0x375358(0xdf)]=a29_0x375358(0xc6);[a29_0x375358(0xc2)]=a29_0x375358(0xd3);async[a29_0x375358(0xc9)](_0x177bec){const _0x1366f7=a29_0x375358,{options:_0x2fbd1c,args:_0x19e746,tdx:_0x211796}=_0x177bec,_0x310771=_0x2fbd1c;if(_0x19e746[_0x1366f7(0xcd)]===0x0)return console[_0x1366f7(0xd0)](_0x1366f7(0xbe)),console[_0x1366f7(0xd0)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x1366f7(0xd0)](_0x1366f7(0xbc)),console[_0x1366f7(0xd0)](_0x1366f7(0xcb)),console['error'](_0x1366f7(0xca)),0x1;const _0x2ba233=_0x19e746[0x0],_0x3537bc=_0x2fbd1c['segmentPath'];let _0x260337=_0x2ba233;_0x3537bc&&!_0x2ba233[_0x1366f7(0xbb)]('/')&&(_0x260337=_0x3537bc+'/'+_0x2ba233,_0x310771['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x260337));const _0x173e7c=await withSpinner('Resolving\x20path\x20\x27'+_0x260337+'\x27...',()=>_0x211796[_0x1366f7(0xd4)][_0x1366f7(0xd5)](_0x260337),{'verbose':_0x310771[_0x1366f7(0xdd)]}),_0x6173c1=_0x173e7c[_0x1366f7(0xc7)];_0x310771[_0x1366f7(0xdd)]&&console[_0x1366f7(0xd0)](_0x1366f7(0xc5)+_0x6173c1[_0x1366f7(0xd8)]);if(_0x6173c1[_0x1366f7(0xd8)]!=='segment')return console[_0x1366f7(0xd0)](_0x1366f7(0xe0)+_0x6173c1[_0x1366f7(0xd8)]+_0x1366f7(0xc8)),console[_0x1366f7(0xd0)](_0x1366f7(0xd9)),0x1;if(!_0x6173c1[_0x1366f7(0xe5)])throw new SDKError(ErrorCode[_0x1366f7(0xdb)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1d286d=_0x6173c1[_0x1366f7(0xce)],_0x52182e=_0x6173c1[_0x1366f7(0xe5)];_0x310771['verbose']&&(console[_0x1366f7(0xd0)](_0x1366f7(0xe3)+_0x1d286d),console[_0x1366f7(0xd0)](_0x1366f7(0xe1)+_0x52182e));let _0x210340;if(_0x310771[_0x1366f7(0xd1)]){const _0xcf5877=_0x310771[_0x1366f7(0xd1)],_0x4cc510=await withSpinner(_0x1366f7(0xe4)+_0xcf5877+_0x1366f7(0xe8),()=>_0x211796[_0x1366f7(0xd4)][_0x1366f7(0xda)](_0x1d286d,_0xcf5877),{'verbose':_0x310771[_0x1366f7(0xdd)]});_0x210340=parseInt(_0x4cc510[_0x1366f7(0xc7)],0xa),_0x310771[_0x1366f7(0xdd)]&&console[_0x1366f7(0xd0)](_0x1366f7(0xc0)+_0x210340);}const _0xa68a0c=await loadJSONFromOptions(_0x310771['rule'],_0x310771['ruleFile']),_0x11e394={'name':_0x310771[_0x1366f7(0xdf)],'description':_0x310771[_0x1366f7(0xc2)],'rule':_0xa68a0c,'kind':_0x310771[_0x1366f7(0xdc)]!==undefined?parseInt(_0x310771[_0x1366f7(0xdc)],0xa):undefined,'segmentFolderId':_0x210340},_0x8cb0ce=await withSpinner(_0x1366f7(0xc4)+_0x6173c1[_0x1366f7(0xd2)]+_0x1366f7(0xe8),()=>_0x211796[_0x1366f7(0xd4)][_0x1366f7(0xe6)](_0x1d286d,_0x52182e,_0x11e394),{'verbose':_0x310771[_0x1366f7(0xdd)]}),_0x51e99c=_0x8cb0ce[_0x1366f7(0xc7)];return console['error'](_0x1366f7(0xbd)+_0x51e99c['name']+'\x27'),_0x260337!==_0x2ba233&&console['error'](_0x1366f7(0xd7)+_0x260337),await handleSDKOutput([_0x51e99c],_0x310771),0x0;}}
@@ -1 +1 @@
1
- const a30_0x50b0c9=a30_0x1056;(function(_0x3e588b,_0x494549){const _0x249d3d=a30_0x1056,_0x7e0446=_0x3e588b();while(!![]){try{const _0x288e87=parseInt(_0x249d3d(0x161))/0x1+-parseInt(_0x249d3d(0x167))/0x2*(parseInt(_0x249d3d(0x160))/0x3)+-parseInt(_0x249d3d(0x163))/0x4+parseInt(_0x249d3d(0x144))/0x5*(parseInt(_0x249d3d(0x172))/0x6)+-parseInt(_0x249d3d(0x171))/0x7+parseInt(_0x249d3d(0x140))/0x8*(-parseInt(_0x249d3d(0x13f))/0x9)+parseInt(_0x249d3d(0x164))/0xa;if(_0x288e87===_0x494549)break;else _0x7e0446['push'](_0x7e0446['shift']());}catch(_0x8e1849){_0x7e0446['push'](_0x7e0446['shift']());}}}(a30_0x58ce,0xdb6e6));function a30_0x58ce(){const _0x28b98b=['65CjPqpA','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','segmentPath','folderId','Target\x20path:\x20','split','Resolving\x20path\x20\x27','execute','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Error:\x20Path\x20is\x20required','length','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Usage:\x20tdx\x20segment\x20use\x20<path>','parentId','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Parent\x20ID:\x20','Use:\x20tdx\x20segment\x20use\x20','error','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Resolved\x20relative\x20path\x20to:\x20','fullPath','join','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','verbose','log','Folder\x20ID:\x20','segment','slice','3kQAhcy','246365mgMxdg','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1148788lFaheY','29762700aDqcuk','segment:use','isAbsolute','983842idZbdy','Examples:','Resolved\x20path\x20type:\x20','data','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','description','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Site:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','parentName','11279800omsTDe','211518JVtppG','resolvePathToResource','site','Context\x20cleared.\x20Back\x20to\x20root.','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','8352NjoLzk','3376auPRom','folderPath','\x27...','type'];a30_0x58ce=function(){return _0x28b98b;};return a30_0x58ce();}import{BaseCommand}from'./command.js';function a30_0x1056(_0x45f6f3,_0x103927){const _0x58ce13=a30_0x58ce();return a30_0x1056=function(_0x105670,_0x2ae3b9){_0x105670=_0x105670-0x13b;let _0x5c3d42=_0x58ce13[_0x105670];return _0x5c3d42;},a30_0x1056(_0x45f6f3,_0x103927);}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{['name']=a30_0x50b0c9(0x165);[a30_0x50b0c9(0x16c)]=a30_0x50b0c9(0x16f);async[a30_0x50b0c9(0x14b)](_0x273695){const _0x1e2ced=a30_0x50b0c9,{options:_0x3703f3,args:_0x2880b8,tdx:_0x49b664}=_0x273695;if(_0x2880b8[_0x1e2ced(0x14e)]===0x0)return console[_0x1e2ced(0x155)](_0x1e2ced(0x14d)),console[_0x1e2ced(0x155)](_0x1e2ced(0x150)),console[_0x1e2ced(0x155)](_0x1e2ced(0x168)),console[_0x1e2ced(0x155)](_0x1e2ced(0x162)),console[_0x1e2ced(0x155)](_0x1e2ced(0x16d)),console['error'](_0x1e2ced(0x145)),console['error'](_0x1e2ced(0x16b)),0x1;const _0x500701=_0x2880b8[0x0],_0x380690=_0x3703f3['session'];try{if(_0x500701==='/')return saveSessionContext({'segment_path':undefined},_0x380690),console[_0x1e2ced(0x15c)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x558681=_0x3703f3[_0x1e2ced(0x146)];let _0x5697d4=_0x500701;const _0x23a50f=parsePath(_0x500701);if(!_0x23a50f[_0x1e2ced(0x166)]){if(!_0x558681)return console[_0x1e2ced(0x155)](_0x1e2ced(0x14c)),console[_0x1e2ced(0x155)](_0x1e2ced(0x14f)),0x1;if(_0x500701==='..'){const _0x3c8962=_0x558681[_0x1e2ced(0x149)]('/')[_0x1e2ced(0x15f)](0x0,-0x1)[_0x1e2ced(0x159)]('/');_0x5697d4=_0x3c8962||'/';}else _0x500701==='.'?_0x5697d4=_0x558681:_0x5697d4=_0x558681+'/'+_0x500701;_0x3703f3[_0x1e2ced(0x15b)]&&console[_0x1e2ced(0x155)](_0x1e2ced(0x157)+_0x5697d4);}if(_0x5697d4==='/'||_0x5697d4==='')return saveSessionContext({'segment_path':undefined},_0x380690),console[_0x1e2ced(0x15c)](_0x1e2ced(0x13d)),0x0;_0x5697d4=normalizePath(_0x5697d4);const _0x3df30a=parsePath(_0x5697d4)['segments'];if(_0x3df30a[_0x1e2ced(0x14e)]===0x0)return saveSessionContext({'segment_path':undefined},_0x380690),console[_0x1e2ced(0x15c)](_0x1e2ced(0x13d)),0x0;_0x3703f3['verbose']&&(console[_0x1e2ced(0x155)](_0x1e2ced(0x16e)+_0x3703f3[_0x1e2ced(0x13c)]),console[_0x1e2ced(0x155)](_0x1e2ced(0x148)+_0x5697d4));const _0x4892ec=await withSpinner(_0x1e2ced(0x14a)+_0x5697d4+_0x1e2ced(0x142),()=>_0x49b664[_0x1e2ced(0x15e)][_0x1e2ced(0x13b)](_0x5697d4),{'verbose':_0x3703f3['verbose']}),_0x16d59b=_0x4892ec[_0x1e2ced(0x16a)];_0x3703f3[_0x1e2ced(0x15b)]&&(console[_0x1e2ced(0x155)](_0x1e2ced(0x169)+_0x16d59b['type']),console[_0x1e2ced(0x155)](_0x1e2ced(0x153)+_0x16d59b[_0x1e2ced(0x151)]),_0x16d59b[_0x1e2ced(0x147)]&&console[_0x1e2ced(0x155)](_0x1e2ced(0x15d)+_0x16d59b['folderId']));if(_0x16d59b[_0x1e2ced(0x143)]===_0x1e2ced(0x15e))return console[_0x1e2ced(0x155)](_0x1e2ced(0x15a)),console[_0x1e2ced(0x155)](_0x1e2ced(0x156)),console[_0x1e2ced(0x155)](_0x1e2ced(0x154)+_0x16d59b[_0x1e2ced(0x170)]+(_0x16d59b[_0x1e2ced(0x141)]?'/'+_0x16d59b['folderPath'][_0x1e2ced(0x159)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x16d59b[_0x1e2ced(0x158)],'parent_segment':_0x16d59b[_0x1e2ced(0x170)]},_0x380690),console[_0x1e2ced(0x15c)]('Context\x20set\x20to:\x20'+_0x16d59b['fullPath']),_0x3703f3['verbose']&&(console[_0x1e2ced(0x155)](_0x1e2ced(0x13e)),console[_0x1e2ced(0x155)]('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0x1e2ced(0x155)](_0x1e2ced(0x152))),0x0;}catch(_0x12178e){throw _0x12178e;}}}
1
+ function a30_0x4d5a(){const _0x4719b1=['1856822PdMRvq','resolvePathToResource','session','Examples:','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','slice','segment:use','Context\x20cleared.\x20Back\x20to\x20root.','name','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','isAbsolute','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','folderPath','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Resolved\x20path\x20type:\x20','parentId','Resolving\x20path\x20\x27','site','61512tJYCTA','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderId','4897270nSZcPD','segments','log','5nbpsLU','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','32320128tCngFl','data','parentName','verbose','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','length','fullPath','join','type','split','5472864OIqPFu','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Error:\x20Path\x20is\x20required','execute','167598axlICd','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Parent\x20ID:\x20','Folder\x20ID:\x20','3423788gsBHbT','Context\x20set\x20to:\x20','\x27...','error','segment'];a30_0x4d5a=function(){return _0x4719b1;};return a30_0x4d5a();}const a30_0x1f1c61=a30_0x2b72;function a30_0x2b72(_0x5a210a,_0x440e80){const _0x4d5a75=a30_0x4d5a();return a30_0x2b72=function(_0x2b724a,_0x13a25e){_0x2b724a=_0x2b724a-0xc7;let _0x41e001=_0x4d5a75[_0x2b724a];return _0x41e001;},a30_0x2b72(_0x5a210a,_0x440e80);}(function(_0x55998f,_0x468cec){const _0x6db71f=a30_0x2b72,_0x4b24a9=_0x55998f();while(!![]){try{const _0x40e57d=-parseInt(_0x6db71f(0xcc))/0x1+-parseInt(_0x6db71f(0xd5))/0x2+parseInt(_0x6db71f(0xe8))/0x3+-parseInt(_0x6db71f(0xd0))/0x4*(parseInt(_0x6db71f(0xee))/0x5)+-parseInt(_0x6db71f(0xc8))/0x6+-parseInt(_0x6db71f(0xeb))/0x7+parseInt(_0x6db71f(0xf0))/0x8;if(_0x40e57d===_0x468cec)break;else _0x4b24a9['push'](_0x4b24a9['shift']());}catch(_0x192b31){_0x4b24a9['push'](_0x4b24a9['shift']());}}}(a30_0x4d5a,0x794aa));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a30_0x1f1c61(0xdd)]=a30_0x1f1c61(0xdb);['description']=a30_0x1f1c61(0xd9);async[a30_0x1f1c61(0xcb)](_0x143b61){const _0x389798=a30_0x1f1c61,{options:_0x13ffb7,args:_0x508333,tdx:_0x1e77e1}=_0x143b61;if(_0x508333[_0x389798(0xf5)]===0x0)return console[_0x389798(0xd3)](_0x389798(0xca)),console[_0x389798(0xd3)](_0x389798(0xe1)),console['error'](_0x389798(0xd8)),console[_0x389798(0xd3)](_0x389798(0xde)),console[_0x389798(0xd3)](_0x389798(0xf4)),console[_0x389798(0xd3)](_0x389798(0xe3)),console[_0x389798(0xd3)](_0x389798(0xef)),0x1;const _0x7fbfca=_0x508333[0x0],_0x5829bf=_0x13ffb7[_0x389798(0xd7)];try{if(_0x7fbfca==='/')return saveSessionContext({'segment_path':undefined},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xdc)),0x0;const _0x453515=_0x13ffb7['segmentPath'];let _0x1585a3=_0x7fbfca;const _0x2c19a4=parsePath(_0x7fbfca);if(!_0x2c19a4[_0x389798(0xdf)]){if(!_0x453515)return console[_0x389798(0xd3)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x389798(0xd3)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'),0x1;if(_0x7fbfca==='..'){const _0x184eaa=_0x453515[_0x389798(0xc7)]('/')[_0x389798(0xda)](0x0,-0x1)[_0x389798(0xf7)]('/');_0x1585a3=_0x184eaa||'/';}else _0x7fbfca==='.'?_0x1585a3=_0x453515:_0x1585a3=_0x453515+'/'+_0x7fbfca;_0x13ffb7[_0x389798(0xf3)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x1585a3);}if(_0x1585a3==='/'||_0x1585a3==='')return saveSessionContext({'segment_path':undefined},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xdc)),0x0;_0x1585a3=normalizePath(_0x1585a3);const _0x2a863f=parsePath(_0x1585a3)[_0x389798(0xec)];if(_0x2a863f[_0x389798(0xf5)]===0x0)return saveSessionContext({'segment_path':undefined},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xdc)),0x0;_0x13ffb7['verbose']&&(console['error']('Site:\x20'+_0x13ffb7[_0x389798(0xe7)]),console['error'](_0x389798(0xe0)+_0x1585a3));const _0x16b0a2=await withSpinner(_0x389798(0xe6)+_0x1585a3+_0x389798(0xd2),()=>_0x1e77e1[_0x389798(0xd4)][_0x389798(0xd6)](_0x1585a3),{'verbose':_0x13ffb7['verbose']}),_0x432c53=_0x16b0a2[_0x389798(0xf1)];_0x13ffb7['verbose']&&(console[_0x389798(0xd3)](_0x389798(0xe4)+_0x432c53[_0x389798(0xf8)]),console[_0x389798(0xd3)](_0x389798(0xce)+_0x432c53[_0x389798(0xe5)]),_0x432c53[_0x389798(0xea)]&&console[_0x389798(0xd3)](_0x389798(0xcf)+_0x432c53[_0x389798(0xea)]));if(_0x432c53[_0x389798(0xf8)]===_0x389798(0xd4))return console[_0x389798(0xd3)](_0x389798(0xe9)),console[_0x389798(0xd3)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console['error']('Use:\x20tdx\x20segment\x20use\x20'+_0x432c53[_0x389798(0xf2)]+(_0x432c53[_0x389798(0xe2)]?'/'+_0x432c53[_0x389798(0xe2)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x432c53[_0x389798(0xf6)],'parent_segment':_0x432c53[_0x389798(0xf2)]},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xd1)+_0x432c53[_0x389798(0xf6)]),_0x13ffb7[_0x389798(0xf3)]&&(console['error']('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context'),console[_0x389798(0xd3)](_0x389798(0xc9)),console[_0x389798(0xd3)](_0x389798(0xcd))),0x0;}catch(_0x4da47b){throw _0x4da47b;}}}