@treasuredata/tdx 0.9.3 → 0.9.4

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 (128) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.d.ts +52 -1
  9. package/dist/client/llm-api-client.d.ts.map +1 -1
  10. package/dist/client/llm-api-client.js +1 -1
  11. package/dist/client/llm-api-client.js.map +1 -1
  12. package/dist/client/rate-limiter.js +1 -1
  13. package/dist/client/td-api-client.js +1 -1
  14. package/dist/client/trino-api-client.js +1 -1
  15. package/dist/client/workflow-client.js +1 -1
  16. package/dist/commands/activations.js +1 -1
  17. package/dist/commands/agent-command.js +1 -1
  18. package/dist/commands/api-command.js +1 -1
  19. package/dist/commands/auth-command.js +1 -1
  20. package/dist/commands/chat-command.js +1 -1
  21. package/dist/commands/claude-command.js +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-usage-command.js +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/connection-command.js +1 -1
  26. package/dist/commands/context-command.js +1 -1
  27. package/dist/commands/databases.js +1 -1
  28. package/dist/commands/describe.js +1 -1
  29. package/dist/commands/engage-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/journey-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/llm-proxy.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/profiles-command.js +1 -1
  36. package/dist/commands/query-command.js +1 -1
  37. package/dist/commands/segment-command.js +1 -1
  38. package/dist/commands/segment-create-command.js +1 -1
  39. package/dist/commands/segment-fields-command.js +1 -1
  40. package/dist/commands/segment-pull-command.js +1 -1
  41. package/dist/commands/segment-push-command.js +1 -1
  42. package/dist/commands/segment-update-command.js +1 -1
  43. package/dist/commands/segment-use-command.js +1 -1
  44. package/dist/commands/segments.js +1 -1
  45. package/dist/commands/show.js +1 -1
  46. package/dist/commands/tables.js +1 -1
  47. package/dist/commands/use-command.js +1 -1
  48. package/dist/commands/user-command.js +1 -1
  49. package/dist/commands/workflow-command.js +1 -1
  50. package/dist/core/auth.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/credential-cache.js +1 -1
  54. package/dist/core/global-context.js +1 -1
  55. package/dist/core/keychain.js +1 -1
  56. package/dist/core/profile.js +1 -1
  57. package/dist/core/project-config.js +1 -1
  58. package/dist/core/session.js +1 -1
  59. package/dist/core/user-cache.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/proxy/anthropic-adapter.js +1 -1
  62. package/dist/proxy/claude-usage-tracker.js +1 -1
  63. package/dist/proxy/context-signature.js +1 -1
  64. package/dist/proxy/conversation-utils.js +1 -1
  65. package/dist/proxy/server.js +1 -1
  66. package/dist/proxy/session-cache.js +1 -1
  67. package/dist/sdk/agent/agent-yaml.d.ts +15 -2
  68. package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/agent-yaml.js.map +1 -1
  71. package/dist/sdk/api.js +1 -1
  72. package/dist/sdk/connection.js +1 -1
  73. package/dist/sdk/engage.js +1 -1
  74. package/dist/sdk/errors.js +1 -1
  75. package/dist/sdk/index.js +1 -1
  76. package/dist/sdk/job.js +1 -1
  77. package/dist/sdk/journey.js +1 -1
  78. package/dist/sdk/llm.d.ts.map +1 -1
  79. package/dist/sdk/llm.js +1 -1
  80. package/dist/sdk/llm.js.map +1 -1
  81. package/dist/sdk/query.js +1 -1
  82. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  83. package/dist/sdk/segment/journey-yaml.js +1 -1
  84. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  85. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  86. package/dist/sdk/segment.js +1 -1
  87. package/dist/sdk/user.js +1 -1
  88. package/dist/sdk/workflow.js +1 -1
  89. package/dist/types/endpoints.js +1 -1
  90. package/dist/types/index.d.ts +1 -1
  91. package/dist/types/index.d.ts.map +1 -1
  92. package/dist/types/index.js +1 -1
  93. package/dist/types/llm.d.ts +107 -2
  94. package/dist/types/llm.d.ts.map +1 -1
  95. package/dist/utils/agent-config.js +1 -1
  96. package/dist/utils/agent-ref-parser.js +1 -1
  97. package/dist/utils/async.js +1 -1
  98. package/dist/utils/chat-cache.js +1 -1
  99. package/dist/utils/colors.js +1 -1
  100. package/dist/utils/command-output.js +1 -1
  101. package/dist/utils/constants.js +1 -1
  102. package/dist/utils/diff.js +1 -1
  103. package/dist/utils/fields-display.js +1 -1
  104. package/dist/utils/file-permissions.js +1 -1
  105. package/dist/utils/format-detector.js +1 -1
  106. package/dist/utils/formatters.js +1 -1
  107. package/dist/utils/journey-utils.js +1 -1
  108. package/dist/utils/json-loader.js +1 -1
  109. package/dist/utils/llm-backup-utils.js +1 -1
  110. package/dist/utils/model-aliases.js +1 -1
  111. package/dist/utils/model-factors.js +1 -1
  112. package/dist/utils/option-validation.js +1 -1
  113. package/dist/utils/port.js +1 -1
  114. package/dist/utils/process.js +1 -1
  115. package/dist/utils/prompt.js +1 -1
  116. package/dist/utils/segment-path-parser.js +1 -1
  117. package/dist/utils/segment-ref-parser.js +1 -1
  118. package/dist/utils/spinner.js +1 -1
  119. package/dist/utils/sql-parser.js +1 -1
  120. package/dist/utils/sse-parser.js +1 -1
  121. package/dist/utils/string-utils.js +1 -1
  122. package/dist/utils/table-ref-parser.js +1 -1
  123. package/dist/utils/tdx-config.js +1 -1
  124. package/dist/utils/tdx-logger.js +1 -1
  125. package/dist/utils/tree-formatter.js +1 -1
  126. package/dist/utils/version-check.js +1 -1
  127. package/dist/utils/workflow-utils.js +1 -1
  128. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xcdf1ec,_0x3b8226){const _0xeb83d9=a103_0x23a1,_0x2b36c4=_0xcdf1ec();while(!![]){try{const _0x27e36b=parseInt(_0xeb83d9(0x1b0))/0x1*(parseInt(_0xeb83d9(0x1b2))/0x2)+parseInt(_0xeb83d9(0x1ae))/0x3*(-parseInt(_0xeb83d9(0x1a5))/0x4)+-parseInt(_0xeb83d9(0x1af))/0x5*(parseInt(_0xeb83d9(0x1b3))/0x6)+parseInt(_0xeb83d9(0x1bb))/0x7*(-parseInt(_0xeb83d9(0x1a8))/0x8)+-parseInt(_0xeb83d9(0x1b9))/0x9+-parseInt(_0xeb83d9(0x1ac))/0xa*(parseInt(_0xeb83d9(0x1ba))/0xb)+parseInt(_0xeb83d9(0x1b1))/0xc;if(_0x27e36b===_0x3b8226)break;else _0x2b36c4['push'](_0x2b36c4['shift']());}catch(_0x457439){_0x2b36c4['push'](_0x2b36c4['shift']());}}}(a103_0x12af,0x9cfe7));function a103_0x12af(){const _0x1339e0=['INTERNAL','Invalid\x20JSON\x20in\x20file\x20\x27','4092472YPaVsq','Failed\x20to\x20load\x20JSON:\x20','ENOENT','code','469240gipzha','Invalid\x20JSON\x20string:\x20','3kdGEux','1659525ZqOwnm','14CCJcCQ','48101448wVtThc','15534OwTQKP','18NDRRHn','EACCES','message','NOT_FOUND','PERMISSION_DENIED','utf-8','7089498NstAQG','88iHXXIy','14QiYJqM','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','INVALID_ARGUMENT','1168792eoXlOa'];a103_0x12af=function(){return _0x1339e0;};return a103_0x12af();}function a103_0x23a1(_0xa5a74f,_0x1250c6){_0xa5a74f=_0xa5a74f-0x1a5;const _0x12af74=a103_0x12af();let _0x23a169=_0x12af74[_0xa5a74f];return _0x23a169;}import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x258a94,_0x1e60d7){const _0x54a18c=a103_0x23a1;try{if(_0x1e60d7){const _0x7b3fb=await readFile(_0x258a94,_0x54a18c(0x1b8));try{return JSON['parse'](_0x7b3fb);}catch(_0x54aff9){throw new SDKError(ErrorCode[_0x54a18c(0x1bd)],_0x54a18c(0x1a7)+_0x258a94+'\x27:\x20'+(_0x54aff9 instanceof Error?_0x54aff9['message']:String(_0x54aff9)));}}else try{return JSON['parse'](_0x258a94);}catch(_0xe80077){throw new SDKError(ErrorCode[_0x54a18c(0x1bd)],_0x54a18c(0x1ad)+(_0xe80077 instanceof Error?_0xe80077[_0x54a18c(0x1b5)]:String(_0xe80077)));}}catch(_0x14bd16){if(_0x14bd16 instanceof SDKError)throw _0x14bd16;if(_0x14bd16 instanceof Error&&_0x54a18c(0x1ab)in _0x14bd16){const _0x3f41d3=_0x14bd16;if(_0x3f41d3[_0x54a18c(0x1ab)]===_0x54a18c(0x1aa))throw new SDKError(ErrorCode[_0x54a18c(0x1b6)],'File\x20not\x20found:\x20'+_0x258a94);else{if(_0x3f41d3[_0x54a18c(0x1ab)]===_0x54a18c(0x1b4))throw new SDKError(ErrorCode[_0x54a18c(0x1b7)],'Permission\x20denied\x20reading\x20file:\x20'+_0x258a94);}}throw new SDKError(ErrorCode[_0x54a18c(0x1a6)],_0x54a18c(0x1a9)+(_0x14bd16 instanceof Error?_0x14bd16['message']:String(_0x14bd16)));}}export async function loadJSONFromOptions(_0x37ad57,_0x51006d){const _0x398e47=a103_0x23a1;if(_0x37ad57&&_0x51006d)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x398e47(0x1bc));if(_0x37ad57)return await loadJSON(_0x37ad57,![]);if(_0x51006d)return await loadJSON(_0x51006d,!![]);return undefined;}
1
+ (function(_0x3940ca,_0x268140){const _0x593a8a=a103_0x508d,_0x103178=_0x3940ca();while(!![]){try{const _0xfd35c1=parseInt(_0x593a8a(0x1e8))/0x1*(-parseInt(_0x593a8a(0x1f2))/0x2)+parseInt(_0x593a8a(0x1e3))/0x3+-parseInt(_0x593a8a(0x1ef))/0x4*(parseInt(_0x593a8a(0x1e5))/0x5)+-parseInt(_0x593a8a(0x1eb))/0x6*(-parseInt(_0x593a8a(0x1dc))/0x7)+-parseInt(_0x593a8a(0x1e9))/0x8+-parseInt(_0x593a8a(0x1e7))/0x9*(parseInt(_0x593a8a(0x1de))/0xa)+parseInt(_0x593a8a(0x1e0))/0xb*(parseInt(_0x593a8a(0x1e4))/0xc);if(_0xfd35c1===_0x268140)break;else _0x103178['push'](_0x103178['shift']());}catch(_0x40fe29){_0x103178['push'](_0x103178['shift']());}}}(a103_0x4914,0x7f088));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a103_0x4914(){const _0x356ef1=['PERMISSION_DENIED','19187oLAsdk','Permission\x20denied\x20reading\x20file:\x20','10460NOaJnx','INTERNAL','26354878InFyjK','INVALID_ARGUMENT','ENOENT','998193NKzeFO','12BpbCLJ','10WaKtSl','NOT_FOUND','5625GbYEVd','3NzkzrU','4242232fNJGPU','utf-8','6DaekkG','EACCES','message','parse','313948qxDqBX','Invalid\x20JSON\x20in\x20file\x20\x27','File\x20not\x20found:\x20','580026CiGNYQ'];a103_0x4914=function(){return _0x356ef1;};return a103_0x4914();}export async function loadJSON(_0x181444,_0x51273a){const _0x285eea=a103_0x508d;try{if(_0x51273a){const _0x5f8852=await readFile(_0x181444,_0x285eea(0x1ea));try{return JSON[_0x285eea(0x1ee)](_0x5f8852);}catch(_0x4b5539){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x285eea(0x1f0)+_0x181444+'\x27:\x20'+(_0x4b5539 instanceof Error?_0x4b5539[_0x285eea(0x1ed)]:String(_0x4b5539)));}}else try{return JSON[_0x285eea(0x1ee)](_0x181444);}catch(_0x5903f4){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20string:\x20'+(_0x5903f4 instanceof Error?_0x5903f4[_0x285eea(0x1ed)]:String(_0x5903f4)));}}catch(_0x23e390){if(_0x23e390 instanceof SDKError)throw _0x23e390;if(_0x23e390 instanceof Error&&'code'in _0x23e390){const _0x5e845e=_0x23e390;if(_0x5e845e['code']===_0x285eea(0x1e2))throw new SDKError(ErrorCode[_0x285eea(0x1e6)],_0x285eea(0x1f1)+_0x181444);else{if(_0x5e845e['code']===_0x285eea(0x1ec))throw new SDKError(ErrorCode[_0x285eea(0x1db)],_0x285eea(0x1dd)+_0x181444);}}throw new SDKError(ErrorCode[_0x285eea(0x1df)],'Failed\x20to\x20load\x20JSON:\x20'+(_0x23e390 instanceof Error?_0x23e390[_0x285eea(0x1ed)]:String(_0x23e390)));}}function a103_0x508d(_0x3cf8dc,_0x55bb33){_0x3cf8dc=_0x3cf8dc-0x1db;const _0x491481=a103_0x4914();let _0x508d8a=_0x491481[_0x3cf8dc];return _0x508d8a;}export async function loadJSONFromOptions(_0x5f5029,_0x2256f4){const _0x55e0dd=a103_0x508d;if(_0x5f5029&&_0x2256f4)throw new SDKError(ErrorCode[_0x55e0dd(0x1e1)],'Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.');if(_0x5f5029)return await loadJSON(_0x5f5029,![]);if(_0x2256f4)return await loadJSON(_0x2256f4,!![]);return undefined;}
@@ -1 +1 @@
1
- (function(_0x322503,_0x196ff6){const _0x4261bc=a104_0x152b,_0x516706=_0x322503();while(!![]){try{const _0x2e16c5=parseInt(_0x4261bc(0x1b6))/0x1*(-parseInt(_0x4261bc(0x1b9))/0x2)+-parseInt(_0x4261bc(0x1b0))/0x3*(parseInt(_0x4261bc(0x1b5))/0x4)+parseInt(_0x4261bc(0x1c1))/0x5+parseInt(_0x4261bc(0x1af))/0x6*(-parseInt(_0x4261bc(0x1ae))/0x7)+parseInt(_0x4261bc(0x1bb))/0x8*(parseInt(_0x4261bc(0x1b1))/0x9)+parseInt(_0x4261bc(0x1c0))/0xa*(-parseInt(_0x4261bc(0x1bd))/0xb)+parseInt(_0x4261bc(0x1bf))/0xc;if(_0x2e16c5===_0x196ff6)break;else _0x516706['push'](_0x516706['shift']());}catch(_0x538a5b){_0x516706['push'](_0x516706['shift']());}}}(a104_0x247e,0xb8b8a));export function canCreateAgent(_0x287964,_0x5799c5){const _0xcae0fc=a104_0x152b;for(const _0xa28320 of _0x287964[_0xcae0fc(0x1b8)][_0xcae0fc(0x1b7)]){if(_0xa28320[_0xcae0fc(0x1b2)]&&!_0x5799c5[_0xcae0fc(0x1b3)](_0xa28320[_0xcae0fc(0x1b2)]))return![];}return!![];}export function remapToolIds(_0xaf1e7,_0xa4d887,_0x108325){const _0x18a1c1=a104_0x152b;return _0xaf1e7[_0x18a1c1(0x1ba)](_0x1a70ba=>({..._0x1a70ba,'targetKnowledgeBaseId':_0x1a70ba['targetKnowledgeBaseId']?_0xa4d887['get'](_0x1a70ba[_0x18a1c1(0x1b4)])||_0x1a70ba[_0x18a1c1(0x1b4)]:undefined,'targetAgentId':_0x1a70ba[_0x18a1c1(0x1b2)]?_0x108325[_0x18a1c1(0x1bc)](_0x1a70ba['targetAgentId'])||_0x1a70ba[_0x18a1c1(0x1b2)]:undefined}));}function a104_0x247e(){const _0x31c8d4=['18230LGxiQm','3324950sapbfw','56dWdtGq','929364jXYQfg','33MjdYhJ','1917117PscIER','targetAgentId','has','targetKnowledgeBaseId','517652aHjPbu','1SwdJKy','tools','attributes','2283942MWUMfp','map','56ESVfRh','get','8074AafUsz','1.0','44919420ZtuPTG'];a104_0x247e=function(){return _0x31c8d4;};return a104_0x247e();}function a104_0x152b(_0x31712f,_0x12eb68){_0x31712f=_0x31712f-0x1ae;const _0x247ee3=a104_0x247e();let _0x152b1e=_0x247ee3[_0x31712f];return _0x152b1e;}export function remapVariableIds(_0x257990,_0x913711){const _0x23798e=a104_0x152b;return _0x257990['map'](_0x18bd57=>({..._0x18bd57,'targetKnowledgeBaseId':_0x913711[_0x23798e(0x1bc)](_0x18bd57[_0x23798e(0x1b4)])||_0x18bd57[_0x23798e(0x1b4)]}));}export function isSupportedBackupVersion(_0x1e9d5c){const _0x4a2707=a104_0x152b;return _0x1e9d5c===_0x4a2707(0x1be);}
1
+ (function(_0x470b34,_0x24f5a7){const _0x1e549e=a104_0x3594,_0x1e3edf=_0x470b34();while(!![]){try{const _0x3ad802=-parseInt(_0x1e549e(0x12f))/0x1*(-parseInt(_0x1e549e(0x123))/0x2)+-parseInt(_0x1e549e(0x132))/0x3+parseInt(_0x1e549e(0x130))/0x4+-parseInt(_0x1e549e(0x125))/0x5+-parseInt(_0x1e549e(0x124))/0x6*(parseInt(_0x1e549e(0x12d))/0x7)+parseInt(_0x1e549e(0x12e))/0x8+parseInt(_0x1e549e(0x12a))/0x9;if(_0x3ad802===_0x24f5a7)break;else _0x1e3edf['push'](_0x1e3edf['shift']());}catch(_0x403089){_0x1e3edf['push'](_0x1e3edf['shift']());}}}(a104_0xd0c1,0xd8d7a));function a104_0x3594(_0x47a601,_0x2c9e91){_0x47a601=_0x47a601-0x123;const _0xd0c109=a104_0xd0c1();let _0x35946f=_0xd0c109[_0x47a601];return _0x35946f;}export function canCreateAgent(_0x56392a,_0xeb943){const _0x555be5=a104_0x3594;for(const _0x2eaf9e of _0x56392a[_0x555be5(0x12c)][_0x555be5(0x127)]){if(_0x2eaf9e[_0x555be5(0x131)]&&!_0xeb943[_0x555be5(0x12b)](_0x2eaf9e['targetAgentId']))return![];}return!![];}export function remapToolIds(_0x3f0cbe,_0x4e5ef3,_0x185fac){const _0x23a743=a104_0x3594;return _0x3f0cbe[_0x23a743(0x129)](_0x48ed9f=>({..._0x48ed9f,'targetKnowledgeBaseId':_0x48ed9f[_0x23a743(0x126)]?_0x4e5ef3[_0x23a743(0x128)](_0x48ed9f['targetKnowledgeBaseId'])||_0x48ed9f[_0x23a743(0x126)]:undefined,'targetAgentId':_0x48ed9f[_0x23a743(0x131)]?_0x185fac[_0x23a743(0x128)](_0x48ed9f['targetAgentId'])||_0x48ed9f[_0x23a743(0x131)]:undefined}));}function a104_0xd0c1(){const _0x2ee88f=['1221736flsTtg','959435xROWGd','933524ODtptq','targetAgentId','1471158zbCZxm','2ErKYLE','762sFujjI','2758610mepFem','targetKnowledgeBaseId','tools','get','map','15305247HXOnKc','has','attributes','61502jcaRLo'];a104_0xd0c1=function(){return _0x2ee88f;};return a104_0xd0c1();}export function remapVariableIds(_0x3c7bbe,_0x3d8102){const _0x4f03ea=a104_0x3594;return _0x3c7bbe[_0x4f03ea(0x129)](_0x284d44=>({..._0x284d44,'targetKnowledgeBaseId':_0x3d8102[_0x4f03ea(0x128)](_0x284d44['targetKnowledgeBaseId'])||_0x284d44[_0x4f03ea(0x126)]}));}export function isSupportedBackupVersion(_0x51404d){return _0x51404d==='1.0';}
@@ -1 +1 @@
1
- const a105_0x52be9a=a105_0x89ca;(function(_0x55f005,_0x242745){const _0x483dab=a105_0x89ca,_0x2f011f=_0x55f005();while(!![]){try{const _0x44a68a=parseInt(_0x483dab(0x83))/0x1*(parseInt(_0x483dab(0x7d))/0x2)+parseInt(_0x483dab(0x7c))/0x3*(-parseInt(_0x483dab(0x79))/0x4)+-parseInt(_0x483dab(0x77))/0x5+-parseInt(_0x483dab(0x7b))/0x6*(parseInt(_0x483dab(0x78))/0x7)+-parseInt(_0x483dab(0x7f))/0x8+-parseInt(_0x483dab(0x7a))/0x9+-parseInt(_0x483dab(0x7e))/0xa*(-parseInt(_0x483dab(0x82))/0xb);if(_0x44a68a===_0x242745)break;else _0x2f011f['push'](_0x2f011f['shift']());}catch(_0x5e6726){_0x2f011f['push'](_0x2f011f['shift']());}}}(a105_0x4f30,0xcf757));const MODEL_ALIASES={'haiku':a105_0x52be9a(0x80),'sonnet':'claude-4.5-sonnet'};function a105_0x4f30(){const _0x21508f=['claude-4.5-haiku','toLowerCase','143eyKZPz','32125JZqlbG','5653855XVuNwG','7iBuZdp','12KUfdrt','4813722FijhVh','4220286ZyFUEa','423210jGjsPR','4rRGSjE','3017990mVEnVV','2765328qHbybg'];a105_0x4f30=function(){return _0x21508f;};return a105_0x4f30();}export function extractModelAlias(_0x1b3ff4){const _0x43896d=_0x1b3ff4['match'](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x43896d)return _0x43896d[0x1]['toLowerCase']();return _0x1b3ff4;}export function resolveModelAlias(_0x52aadb){const _0x1155ab=a105_0x52be9a;return MODEL_ALIASES[_0x52aadb[_0x1155ab(0x81)]()]||_0x52aadb;}function a105_0x89ca(_0x56a524,_0x4c8afb){_0x56a524=_0x56a524-0x77;const _0x4f3055=a105_0x4f30();let _0x89ca24=_0x4f3055[_0x56a524];return _0x89ca24;}export function getModelAliases(){return{...MODEL_ALIASES};}
1
+ const a105_0x398315=a105_0x421d;(function(_0x453bfb,_0x4c3e0d){const _0x42a255=a105_0x421d,_0x4db77c=_0x453bfb();while(!![]){try{const _0x3e5e2f=parseInt(_0x42a255(0xdc))/0x1*(-parseInt(_0x42a255(0xd7))/0x2)+parseInt(_0x42a255(0xe0))/0x3*(parseInt(_0x42a255(0xd6))/0x4)+parseInt(_0x42a255(0xdf))/0x5+parseInt(_0x42a255(0xe3))/0x6+parseInt(_0x42a255(0xdb))/0x7+parseInt(_0x42a255(0xda))/0x8*(parseInt(_0x42a255(0xe1))/0x9)+-parseInt(_0x42a255(0xd9))/0xa*(parseInt(_0x42a255(0xdd))/0xb);if(_0x3e5e2f===_0x4c3e0d)break;else _0x4db77c['push'](_0x4db77c['shift']());}catch(_0x290aa1){_0x4db77c['push'](_0x4db77c['shift']());}}}(a105_0x4a0c,0x1e6ea));const MODEL_ALIASES={'haiku':a105_0x398315(0xe2),'sonnet':'claude-4.5-sonnet'};export function extractModelAlias(_0x2f6db9){const _0x18d64f=a105_0x398315,_0x2d1eb1=_0x2f6db9[_0x18d64f(0xd8)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x2d1eb1)return _0x2d1eb1[0x1]['toLowerCase']();return _0x2f6db9;}function a105_0x421d(_0x15ebac,_0xe2971a){_0x15ebac=_0x15ebac-0xd6;const _0x4a0c0c=a105_0x4a0c();let _0x421dd9=_0x4a0c0c[_0x15ebac];return _0x421dd9;}function a105_0x4a0c(){const _0x36c825=['399608TPQAkg','6892AqKUeD','match','100bhivMc','597408CKZaTA','913843YdumEe','65BYsqQE','156277sLjhaj','toLowerCase','28475zDkzvI','3XZryJY','9frstRo','claude-4.5-haiku','1079328HxQYOV'];a105_0x4a0c=function(){return _0x36c825;};return a105_0x4a0c();}export function resolveModelAlias(_0x1abff2){const _0x320894=a105_0x398315;return MODEL_ALIASES[_0x1abff2[_0x320894(0xde)]()]||_0x1abff2;}export function getModelAliases(){return{...MODEL_ALIASES};}
@@ -1 +1 @@
1
- (function(_0x46496b,_0xf37096){const _0x424ae0=a106_0x1463,_0xbfa32b=_0x46496b();while(!![]){try{const _0x2144b6=parseInt(_0x424ae0(0xfb))/0x1*(-parseInt(_0x424ae0(0xff))/0x2)+parseInt(_0x424ae0(0xf5))/0x3*(-parseInt(_0x424ae0(0x100))/0x4)+-parseInt(_0x424ae0(0xfd))/0x5*(parseInt(_0x424ae0(0xfc))/0x6)+parseInt(_0x424ae0(0xee))/0x7+-parseInt(_0x424ae0(0x106))/0x8+parseInt(_0x424ae0(0x105))/0x9*(parseInt(_0x424ae0(0xed))/0xa)+parseInt(_0x424ae0(0x102))/0xb*(parseInt(_0x424ae0(0xf1))/0xc);if(_0x2144b6===_0xf37096)break;else _0xbfa32b['push'](_0xbfa32b['shift']());}catch(_0x4cbb83){_0xbfa32b['push'](_0xbfa32b['shift']());}}}(a106_0x4771,0x94d0e));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};function a106_0x1463(_0x4613ed,_0x23c484){_0x4613ed=_0x4613ed-0xed;const _0x47717b=a106_0x4771();let _0x146352=_0x47717b[_0x4613ed];return _0x146352;}export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x10ea9d){const _0x2299f9=a106_0x1463,_0x5c285e=_0x10ea9d['toLowerCase']();if(MODEL_FACTORS[_0x5c285e])return MODEL_FACTORS[_0x5c285e];if(_0x5c285e[_0x2299f9(0x101)]('sonnet'))return MODEL_FACTORS['sonnet'];if(_0x5c285e['includes']('haiku'))return MODEL_FACTORS[_0x2299f9(0xf4)];if(_0x5c285e[_0x2299f9(0x101)]('opus'))return MODEL_FACTORS['opus'];return MODEL_FACTORS['sonnet'];}export function getContextLimit(_0x280978){const _0x3d2564=a106_0x1463,_0x1ed733=_0x280978['toLowerCase']();if(_0x1ed733['includes'](_0x3d2564(0xf9)))return CONTEXT_LIMITS[_0x3d2564(0xf9)];if(_0x1ed733['includes'](_0x3d2564(0xf4)))return CONTEXT_LIMITS[_0x3d2564(0xf4)];if(_0x1ed733[_0x3d2564(0x101)](_0x3d2564(0xef)))return CONTEXT_LIMITS[_0x3d2564(0xef)];return CONTEXT_LIMITS['default'];}export function calculateChatUnit(_0x2cc17d,_0x5de302,_0x1ca91f){return(_0x2cc17d+_0x5de302)/0x1388*_0x1ca91f;}export function calculateCredits(_0x2f8c00){return _0x2f8c00/0x2904;}export function getModelDisplayName(_0x3814de){const _0x1ba4bd=a106_0x1463,_0x41df43=_0x3814de['toLowerCase']();if(_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf9))){if(_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf8))||_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf6)))return _0x1ba4bd(0xf3);return _0x1ba4bd(0xfa);}if(_0x41df43['includes']('haiku')){if(_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf8))||_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf6)))return'Haiku\x204.5';return _0x1ba4bd(0x103);}if(_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xef))){if(_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf8))||_0x41df43[_0x1ba4bd(0x101)](_0x1ba4bd(0xf6)))return _0x1ba4bd(0xf7);return _0x1ba4bd(0x104);}return _0x1ba4bd(0xf2);}function a106_0x4771(){const _0x19a4ca=['haiku','3nZloln','4.5','Opus\x204.5','4-5','sonnet','Sonnet\x204','629vLvBcL','216buBUHX','90445ipvMHj','round','914BZJvKN','2769872tEXALc','includes','1973279FRGeBH','Haiku\x204','Opus\x204','18WxlGpw','5202704IxEcvc','2542640TLpxmt','352996NCCjue','opus','toLocaleString','156LrwGIQ','Claude','Sonnet\x204.5'];a106_0x4771=function(){return _0x19a4ca;};return a106_0x4771();}export function formatTokenCount(_0x18a1f0){const _0x54352e=a106_0x1463;return _0x18a1f0[_0x54352e(0xf0)]('en-US');}export function calculateContextPercentage(_0x116294,_0x3de268){const _0x40d3ee=a106_0x1463,_0x14168d=getContextLimit(_0x3de268);return Math[_0x40d3ee(0xfe)](_0x116294/_0x14168d*0x64);}
1
+ (function(_0x428456,_0x5a71ed){const _0x3debc0=a106_0x1f8a,_0x32d53d=_0x428456();while(!![]){try{const _0x184b60=-parseInt(_0x3debc0(0xce))/0x1+parseInt(_0x3debc0(0xc4))/0x2*(-parseInt(_0x3debc0(0xc2))/0x3)+-parseInt(_0x3debc0(0xbf))/0x4+parseInt(_0x3debc0(0xc8))/0x5*(-parseInt(_0x3debc0(0xc1))/0x6)+-parseInt(_0x3debc0(0xc0))/0x7+-parseInt(_0x3debc0(0xc9))/0x8*(-parseInt(_0x3debc0(0xcd))/0x9)+parseInt(_0x3debc0(0xcf))/0xa;if(_0x184b60===_0x5a71ed)break;else _0x32d53d['push'](_0x32d53d['shift']());}catch(_0x29ba5e){_0x32d53d['push'](_0x32d53d['shift']());}}}(a106_0x5456,0x238b4));function a106_0x1f8a(_0x3ef822,_0x2a5089){_0x3ef822=_0x3ef822-0xbf;const _0x545650=a106_0x5456();let _0x1f8a55=_0x545650[_0x3ef822];return _0x1f8a55;}export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x41aff2){const _0x5ef154=a106_0x1f8a,_0x1432f5=_0x41aff2[_0x5ef154(0xd6)]();if(MODEL_FACTORS[_0x1432f5])return MODEL_FACTORS[_0x1432f5];if(_0x1432f5[_0x5ef154(0xd4)](_0x5ef154(0xcb)))return MODEL_FACTORS[_0x5ef154(0xcb)];if(_0x1432f5['includes'](_0x5ef154(0xd2)))return MODEL_FACTORS[_0x5ef154(0xd2)];if(_0x1432f5[_0x5ef154(0xd4)](_0x5ef154(0xc5)))return MODEL_FACTORS['opus'];return MODEL_FACTORS[_0x5ef154(0xcb)];}export function getContextLimit(_0x2e6dc2){const _0x78f57d=a106_0x1f8a,_0x39fbd3=_0x2e6dc2['toLowerCase']();if(_0x39fbd3[_0x78f57d(0xd4)](_0x78f57d(0xcb)))return CONTEXT_LIMITS[_0x78f57d(0xcb)];if(_0x39fbd3['includes'](_0x78f57d(0xd2)))return CONTEXT_LIMITS[_0x78f57d(0xd2)];if(_0x39fbd3[_0x78f57d(0xd4)](_0x78f57d(0xc5)))return CONTEXT_LIMITS[_0x78f57d(0xc5)];return CONTEXT_LIMITS[_0x78f57d(0xc7)];}export function calculateChatUnit(_0x43b4f6,_0x5028a0,_0x5d7094){return(_0x43b4f6+_0x5028a0)/0x1388*_0x5d7094;}export function calculateCredits(_0x5509c5){return _0x5509c5/0x2904;}function a106_0x5456(){const _0x6e46f1=['toLocaleString','toLowerCase','53812WDYxiu','1894326cEdzoG','6EjKKwv','297339mreNqq','4-5','2PotOTc','opus','Sonnet\x204','default','2180EPqVlX','48zBiUAs','Haiku\x204','sonnet','en-US','297207kXruyu','213044AdxNNV','5441140OLUKbQ','Sonnet\x204.5','4.5','haiku','Claude','includes'];a106_0x5456=function(){return _0x6e46f1;};return a106_0x5456();}export function getModelDisplayName(_0x1ff3f8){const _0x1e7b68=a106_0x1f8a,_0xb82c6c=_0x1ff3f8[_0x1e7b68(0xd6)]();if(_0xb82c6c[_0x1e7b68(0xd4)](_0x1e7b68(0xcb))){if(_0xb82c6c[_0x1e7b68(0xd4)](_0x1e7b68(0xc3))||_0xb82c6c[_0x1e7b68(0xd4)](_0x1e7b68(0xd1)))return _0x1e7b68(0xd0);return _0x1e7b68(0xc6);}if(_0xb82c6c[_0x1e7b68(0xd4)](_0x1e7b68(0xd2))){if(_0xb82c6c[_0x1e7b68(0xd4)]('4-5')||_0xb82c6c['includes']('4.5'))return'Haiku\x204.5';return _0x1e7b68(0xca);}if(_0xb82c6c[_0x1e7b68(0xd4)](_0x1e7b68(0xc5))){if(_0xb82c6c[_0x1e7b68(0xd4)](_0x1e7b68(0xc3))||_0xb82c6c[_0x1e7b68(0xd4)]('4.5'))return'Opus\x204.5';return'Opus\x204';}return _0x1e7b68(0xd3);}export function formatTokenCount(_0x3b0dc8){const _0x113b24=a106_0x1f8a;return _0x3b0dc8[_0x113b24(0xd5)](_0x113b24(0xcc));}export function calculateContextPercentage(_0x397425,_0x3770d1){const _0x2eeda3=getContextLimit(_0x3770d1);return Math['round'](_0x397425/_0x2eeda3*0x64);}
@@ -1 +1 @@
1
- (function(_0x12f2dd,_0x1fad9e){const _0xdbdba7=a107_0x3f01,_0x54fc49=_0x12f2dd();while(!![]){try{const _0x59fb34=-parseInt(_0xdbdba7(0x137))/0x1*(parseInt(_0xdbdba7(0x138))/0x2)+-parseInt(_0xdbdba7(0x136))/0x3+parseInt(_0xdbdba7(0x145))/0x4+-parseInt(_0xdbdba7(0x140))/0x5*(-parseInt(_0xdbdba7(0x13f))/0x6)+-parseInt(_0xdbdba7(0x143))/0x7*(-parseInt(_0xdbdba7(0x13c))/0x8)+-parseInt(_0xdbdba7(0x141))/0x9*(-parseInt(_0xdbdba7(0x144))/0xa)+-parseInt(_0xdbdba7(0x139))/0xb;if(_0x59fb34===_0x1fad9e)break;else _0x54fc49['push'](_0x54fc49['shift']());}catch(_0x29993f){_0x54fc49['push'](_0x54fc49['shift']());}}}(a107_0x371e,0x9eea0));export function validateLimitOption(_0x575e80){const _0x2b6494=a107_0x3f01;if(!Number[_0x2b6494(0x135)](_0x575e80))return{'isValid':![],'error':_0x2b6494(0x13b)+_0x575e80+'.\x20Must\x20be\x20an\x20integer.'};if(_0x575e80<=0x0)return{'isValid':![],'error':_0x2b6494(0x13b)+_0x575e80+_0x2b6494(0x142)};return{'isValid':!![],'value':_0x575e80};}function a107_0x3f01(_0x2118b9,_0x60f031){_0x2118b9=_0x2118b9-0x135;const _0x371eaf=a107_0x371e();let _0x3f01e9=_0x371eaf[_0x2118b9];return _0x3f01e9;}export function validateTimeoutOption(_0x1e12c6,_0x29bd32=0x1e){const _0x1431c3=a107_0x3f01;if(_0x1e12c6===undefined)return{'isValid':!![],'value':_0x29bd32};const _0x90b0a6=typeof _0x1e12c6==='number'?_0x1e12c6:parseFloat(_0x1e12c6);if(isNaN(_0x90b0a6))return{'isValid':![],'error':_0x1431c3(0x13e)+_0x1e12c6+_0x1431c3(0x13a)};if(_0x90b0a6<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x90b0a6+_0x1431c3(0x13d)};return{'isValid':!![],'value':_0x90b0a6};}function a107_0x371e(){const _0x43cb6d=['150AnVGUK','1208524VNOHtG','isInteger','848013hoxrJm','44483oVNohn','2CZcYiH','11399058lGoETR','.\x20Must\x20be\x20a\x20number.','Invalid\x20limit\x20value:\x20','1521048GztZOA','.\x20Must\x20be\x20a\x20positive\x20number.','Invalid\x20timeout\x20value:\x20','6qdAaTi','6187960nYhJnD','170694MkJTng','.\x20Must\x20be\x20a\x20positive\x20integer.','7Arnnor'];a107_0x371e=function(){return _0x43cb6d;};return a107_0x371e();}
1
+ (function(_0x54f08d,_0x3e48d4){const _0x1b3195=a107_0x1b5e,_0x59f904=_0x54f08d();while(!![]){try{const _0x249c14=parseInt(_0x1b3195(0xd0))/0x1+parseInt(_0x1b3195(0xdb))/0x2*(parseInt(_0x1b3195(0xd8))/0x3)+parseInt(_0x1b3195(0xd6))/0x4+parseInt(_0x1b3195(0xca))/0x5*(parseInt(_0x1b3195(0xd4))/0x6)+parseInt(_0x1b3195(0xda))/0x7+-parseInt(_0x1b3195(0xd2))/0x8*(parseInt(_0x1b3195(0xd9))/0x9)+-parseInt(_0x1b3195(0xcd))/0xa*(parseInt(_0x1b3195(0xce))/0xb);if(_0x249c14===_0x3e48d4)break;else _0x59f904['push'](_0x59f904['shift']());}catch(_0x2fa9ac){_0x59f904['push'](_0x59f904['shift']());}}}(a107_0x3175,0x6ff3e));function a107_0x1b5e(_0x50dd56,_0x51d004){_0x50dd56=_0x50dd56-0xca;const _0x3175c2=a107_0x3175();let _0x1b5e73=_0x3175c2[_0x50dd56];return _0x1b5e73;}function a107_0x3175(){const _0x30bc6f=['824082nsXxhE','2ydLjvf','110aMIwuL','.\x20Must\x20be\x20an\x20integer.','Invalid\x20limit\x20value:\x20','13070SZCfYO','7843UyhOOX','.\x20Must\x20be\x20a\x20positive\x20number.','652987vigmYI','Invalid\x20timeout\x20value:\x20','16Oidaxp','.\x20Must\x20be\x20a\x20positive\x20integer.','179520ZwzNsL','.\x20Must\x20be\x20a\x20number.','61884oDlufF','isInteger','1129929AOeohO','1937781YmuRdp'];a107_0x3175=function(){return _0x30bc6f;};return a107_0x3175();}export function validateLimitOption(_0x2baf6e){const _0x3bd8b1=a107_0x1b5e;if(!Number[_0x3bd8b1(0xd7)](_0x2baf6e))return{'isValid':![],'error':_0x3bd8b1(0xcc)+_0x2baf6e+_0x3bd8b1(0xcb)};if(_0x2baf6e<=0x0)return{'isValid':![],'error':_0x3bd8b1(0xcc)+_0x2baf6e+_0x3bd8b1(0xd3)};return{'isValid':!![],'value':_0x2baf6e};}export function validateTimeoutOption(_0x4c6c01,_0x42c4fa=0x1e){const _0x457add=a107_0x1b5e;if(_0x4c6c01===undefined)return{'isValid':!![],'value':_0x42c4fa};const _0x517270=typeof _0x4c6c01==='number'?_0x4c6c01:parseFloat(_0x4c6c01);if(isNaN(_0x517270))return{'isValid':![],'error':_0x457add(0xd1)+_0x4c6c01+_0x457add(0xd5)};if(_0x517270<=0x0)return{'isValid':![],'error':_0x457add(0xd1)+_0x517270+_0x457add(0xcf)};return{'isValid':!![],'value':_0x517270};}
@@ -1 +1 @@
1
- (function(_0x34a7df,_0x257c02){const _0x458291=a108_0x263d,_0x569369=_0x34a7df();while(!![]){try{const _0x3bcb64=parseInt(_0x458291(0xa3))/0x1*(parseInt(_0x458291(0x99))/0x2)+-parseInt(_0x458291(0x92))/0x3*(-parseInt(_0x458291(0x9a))/0x4)+-parseInt(_0x458291(0x9c))/0x5*(-parseInt(_0x458291(0xa1))/0x6)+-parseInt(_0x458291(0x96))/0x7*(-parseInt(_0x458291(0x9d))/0x8)+parseInt(_0x458291(0x93))/0x9+parseInt(_0x458291(0x97))/0xa+parseInt(_0x458291(0xa5))/0xb*(-parseInt(_0x458291(0x98))/0xc);if(_0x3bcb64===_0x257c02)break;else _0x569369['push'](_0x569369['shift']());}catch(_0x2c56fc){_0x569369['push'](_0x569369['shift']());}}}(a108_0x4c04,0x3e73b));import{createServer}from'node:net';function a108_0x4c04(){const _0x4b0d98=['4128192WYiflo','close','once','3163783uQfvAC','3618330kpDsaM','933456Bvsnks','324814ctTEaJ','8eazzIq','No\x20available\x20port\x20found\x20between\x20','10lcOgVz','8PYQBaZ','listening','EADDRINUSE','0.0.0.0','997866spRogU','\x20and\x20','3RMhEZh','code','330addTtB','listen','745665VzjdZM'];a108_0x4c04=function(){return _0x4b0d98;};return a108_0x4c04();}function a108_0x263d(_0x2f5464,_0x393bd4){_0x2f5464=_0x2f5464-0x91;const _0x4c0432=a108_0x4c04();let _0x263d76=_0x4c0432[_0x2f5464];return _0x263d76;}export async function isPortAvailable(_0x3d05be){return new Promise(_0x5393f6=>{const _0xf29e95=a108_0x263d,_0x21007c=createServer();_0x21007c[_0xf29e95(0x95)]('error',_0x25f664=>{const _0x343b59=_0xf29e95;_0x25f664[_0x343b59(0xa4)]===_0x343b59(0x9f)?_0x5393f6(![]):_0x5393f6(![]);}),_0x21007c[_0xf29e95(0x95)](_0xf29e95(0x9e),()=>{const _0x55ffb0=_0xf29e95;_0x21007c[_0x55ffb0(0x94)](),_0x5393f6(!![]);}),_0x21007c[_0xf29e95(0x91)](_0x3d05be,_0xf29e95(0xa0));});}export async function findAvailablePort(_0x410ec7=0xfa0,_0x84fa29=0x64){const _0x272426=a108_0x263d;for(let _0x3aa1ad=0x0;_0x3aa1ad<_0x84fa29;_0x3aa1ad++){const _0x1e8f06=_0x410ec7+_0x3aa1ad;if(await isPortAvailable(_0x1e8f06))return _0x1e8f06;}throw new Error(_0x272426(0x9b)+_0x410ec7+_0x272426(0xa2)+(_0x410ec7+_0x84fa29-0x1));}
1
+ (function(_0x537bc9,_0x4cde46){const _0x472c9c=a108_0x1ba7,_0x1b9532=_0x537bc9();while(!![]){try{const _0x41cc3d=parseInt(_0x472c9c(0xe9))/0x1*(-parseInt(_0x472c9c(0xec))/0x2)+-parseInt(_0x472c9c(0xe8))/0x3+parseInt(_0x472c9c(0xee))/0x4*(-parseInt(_0x472c9c(0xed))/0x5)+-parseInt(_0x472c9c(0xf7))/0x6*(parseInt(_0x472c9c(0xe3))/0x7)+-parseInt(_0x472c9c(0xea))/0x8*(-parseInt(_0x472c9c(0xf1))/0x9)+-parseInt(_0x472c9c(0xf2))/0xa*(-parseInt(_0x472c9c(0xe4))/0xb)+parseInt(_0x472c9c(0xe5))/0xc*(-parseInt(_0x472c9c(0xeb))/0xd);if(_0x41cc3d===_0x4cde46)break;else _0x1b9532['push'](_0x1b9532['shift']());}catch(_0x2eedab){_0x1b9532['push'](_0x1b9532['shift']());}}}(a108_0x4016,0x5dbff));function a108_0x1ba7(_0x5f07a2,_0x2cc282){_0x5f07a2=_0x5f07a2-0xe3;const _0x401692=a108_0x4016();let _0x1ba7a0=_0x401692[_0x5f07a2];return _0x1ba7a0;}import{createServer}from'node:net';export async function isPortAvailable(_0x1ab876){return new Promise(_0xdc5b8b=>{const _0x4c7beb=a108_0x1ba7,_0x1651c6=createServer();_0x1651c6[_0x4c7beb(0xf4)](_0x4c7beb(0xf0),_0x58f308=>{const _0xeb9eb2=_0x4c7beb;_0x58f308[_0xeb9eb2(0xf6)]===_0xeb9eb2(0xe6)?_0xdc5b8b(![]):_0xdc5b8b(![]);}),_0x1651c6['once'](_0x4c7beb(0xf5),()=>{const _0x5d8a4d=_0x4c7beb;_0x1651c6[_0x5d8a4d(0xe7)](),_0xdc5b8b(!![]);}),_0x1651c6['listen'](_0x1ab876,_0x4c7beb(0xf8));});}export async function findAvailablePort(_0x2104e6=0xfa0,_0x5941a2=0x64){const _0x34c040=a108_0x1ba7;for(let _0xf04958=0x0;_0xf04958<_0x5941a2;_0xf04958++){const _0x3d8b34=_0x2104e6+_0xf04958;if(await isPortAvailable(_0x3d8b34))return _0x3d8b34;}throw new Error(_0x34c040(0xef)+_0x2104e6+_0x34c040(0xf3)+(_0x2104e6+_0x5941a2-0x1));}function a108_0x4016(){const _0x4c7ea6=['code','684606pOpQwc','0.0.0.0','7IqXzzv','11NWiPgA','36rtHQsF','EADDRINUSE','close','35895XYvZEy','4iFYHIH','1688GzQKYu','116311VRNLBt','140810hwrFRz','864925LBfiaa','4FAKwbD','No\x20available\x20port\x20found\x20between\x20','error','19611VTdban','5317420uOriVi','\x20and\x20','once','listening'];a108_0x4016=function(){return _0x4c7ea6;};return a108_0x4016();}
@@ -1 +1 @@
1
- const a109_0x5628c2=a109_0x1913;(function(_0x69042c,_0x554bf6){const _0x1c165b=a109_0x1913,_0x35f332=_0x69042c();while(!![]){try{const _0x2fdbfd=parseInt(_0x1c165b(0x15d))/0x1+-parseInt(_0x1c165b(0x14f))/0x2*(parseInt(_0x1c165b(0x153))/0x3)+-parseInt(_0x1c165b(0x164))/0x4+-parseInt(_0x1c165b(0x16b))/0x5*(parseInt(_0x1c165b(0x155))/0x6)+-parseInt(_0x1c165b(0x16e))/0x7*(-parseInt(_0x1c165b(0x152))/0x8)+-parseInt(_0x1c165b(0x169))/0x9+parseInt(_0x1c165b(0x168))/0xa;if(_0x2fdbfd===_0x554bf6)break;else _0x35f332['push'](_0x35f332['shift']());}catch(_0x3132e3){_0x35f332['push'](_0x35f332['shift']());}}}(a109_0x38b5,0xbc8f2));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a109_0x5628c2(0x173),'zsh','sh',a109_0x5628c2(0x162),a109_0x5628c2(0x15e),a109_0x5628c2(0x14c),'csh',a109_0x5628c2(0x16a),'pwsh',a109_0x5628c2(0x161),'nu','ion',a109_0x5628c2(0x16c),a109_0x5628c2(0x14e)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a109_0x5628c2(0x163),a109_0x5628c2(0x170),'cursor']);function getProcessInfoWindows(_0x393ebd){const _0x4debb7=a109_0x5628c2;try{if(!Number['isInteger'](_0x393ebd)||_0x393ebd<=0x0)return null;const _0x3d2301=execSync(_0x4debb7(0x159)+_0x393ebd+_0x4debb7(0x160),{'encoding':_0x4debb7(0x175),'windowsHide':!![]})['trim'](),_0x401d86=_0x3d2301[_0x4debb7(0x157)]('\x0a')[_0x4debb7(0x16f)](_0x53f784=>_0x53f784['trim']());if(_0x401d86[_0x4debb7(0x154)]<0x2)return null;const _0x19e2da=_0x401d86[_0x401d86[_0x4debb7(0x154)]-0x1][_0x4debb7(0x157)](',');if(_0x19e2da[_0x4debb7(0x154)]<0x3)return null;const _0x1f2078=_0x19e2da[0x1]?.[_0x4debb7(0x166)]()||'',_0x4c14b1=parseInt(_0x19e2da[0x2]?.[_0x4debb7(0x166)]()||'0',0xa);if(isNaN(_0x4c14b1)||!_0x1f2078)return null;return{'pid':_0x393ebd,'ppid':_0x4c14b1,'comm':_0x1f2078[_0x4debb7(0x172)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x5e3274){const _0x23c943=a109_0x5628c2;try{const _0x1c70bc=0x400000;if(!Number[_0x23c943(0x15f)](_0x5e3274)||_0x5e3274<=0x0||_0x5e3274>_0x1c70bc)return null;const _0x5be7fe=execSync(_0x23c943(0x151)+_0x5e3274+'\x20-o\x20ppid=,comm=',{'encoding':_0x23c943(0x175),'stdio':'pipe'})[_0x23c943(0x166)](),[_0x1c5533,..._0x5af6c7]=_0x5be7fe[_0x23c943(0x157)](/\s+/),_0x441844=parseInt(_0x1c5533,0xa),_0x3dda2f=_0x5af6c7[_0x23c943(0x14d)]('\x20');if(isNaN(_0x441844))return null;return{'pid':_0x5e3274,'ppid':_0x441844,'comm':_0x3dda2f};}catch{return null;}}function getProcessInfo(_0x5edc64){const _0x32b427=a109_0x5628c2;if(process['platform']===_0x32b427(0x15b))return getProcessInfoWindows(_0x5edc64);return getProcessInfoPosix(_0x5edc64);}function getBasename(_0x5ab559){const _0x43bb45=a109_0x5628c2;return _0x5ab559[_0x43bb45(0x172)](/^-/,'')[_0x43bb45(0x157)]('/')[_0x43bb45(0x167)]()?.['toLowerCase']()||'';}function isShell(_0x577fdb){const _0x2e5364=a109_0x5628c2;return SHELL_NAMES[_0x2e5364(0x171)](getBasename(_0x577fdb));}function a109_0x38b5(){const _0x12c170=['powershell','fish','claude','5542728nFRYXR','unref','trim','pop','41290870hgVXeV','10076913IhJdhG','dash','2237485iNmPQy','elvish','platform','778351LWTkET','filter','code','has','replace','bash','xdg-open','utf-8','open','tcsh','join','xonsh','1475374PcFhhG','kill','ps\x20-p\x20','8YaIIAi','3RtWTWA','length','12hdLgwd','pid','split','ppid','wmic\x20process\x20where\x20ProcessId=','start','win32','comm','670078DFwVmu','ksh','isInteger','\x20get\x20ParentProcessId,Name\x20/format:csv'];a109_0x38b5=function(){return _0x12c170;};return a109_0x38b5();}function isEphemeralShellSpawner(_0x5ef261){const _0x3db12e=a109_0x5628c2;return EPHEMERAL_SHELL_SPAWNERS[_0x3db12e(0x171)](getBasename(_0x5ef261));}let cachedShellPID;function findShellPID(){const _0x7cf823=a109_0x5628c2;if(process[_0x7cf823(0x158)]===undefined)return process[_0x7cf823(0x156)];let _0x234135=process[_0x7cf823(0x158)];const _0x5c7e0c=0xa;let _0x321e2b=0x0;while(_0x321e2b<_0x5c7e0c){const _0x5456b7=getProcessInfo(_0x234135);if(!_0x5456b7)break;if(isShell(_0x5456b7['comm'])){const _0x178322=getProcessInfo(_0x5456b7['ppid']);if(_0x178322&&isEphemeralShellSpawner(_0x178322[_0x7cf823(0x15c)])){_0x234135=_0x5456b7[_0x7cf823(0x158)],_0x321e2b++;continue;}return _0x5456b7[_0x7cf823(0x156)];}if(_0x5456b7[_0x7cf823(0x158)]===0x0||_0x5456b7[_0x7cf823(0x158)]===0x1){if(isShell(_0x5456b7[_0x7cf823(0x15c)]))return _0x5456b7[_0x7cf823(0x156)];break;}_0x234135=_0x5456b7[_0x7cf823(0x158)],_0x321e2b++;}return process[_0x7cf823(0x158)]!==undefined?process['ppid']:process[_0x7cf823(0x156)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x356ab7){const _0x161503=a109_0x5628c2;if(!Number[_0x161503(0x15f)](_0x356ab7)||_0x356ab7<=0x0)return![];try{return process[_0x161503(0x150)](_0x356ab7,0x0),!![];}catch{return![];}}function a109_0x1913(_0x43e6e6,_0x1f63a6){_0x43e6e6=_0x43e6e6-0x14c;const _0x38b5f5=a109_0x38b5();let _0x1913dc=_0x38b5f5[_0x43e6e6];return _0x1913dc;}export function openBrowser(_0x15312f){const _0x323126=a109_0x5628c2,_0x5191c4=process[_0x323126(0x16d)],_0x512c83=_0x5191c4==='darwin'?_0x323126(0x176):_0x5191c4==='win32'?_0x323126(0x15a):_0x323126(0x174);spawn(_0x512c83,[_0x15312f],{'detached':!![],'stdio':'ignore'})[_0x323126(0x165)]();}
1
+ const a109_0x1e3e08=a109_0x4d14;(function(_0x110525,_0xad7a30){const _0x483def=a109_0x4d14,_0x1475f5=_0x110525();while(!![]){try{const _0x5d989f=parseInt(_0x483def(0x1f9))/0x1+-parseInt(_0x483def(0x209))/0x2*(-parseInt(_0x483def(0x212))/0x3)+parseInt(_0x483def(0x1ef))/0x4+-parseInt(_0x483def(0x1fc))/0x5*(-parseInt(_0x483def(0x1f0))/0x6)+parseInt(_0x483def(0x1f6))/0x7+parseInt(_0x483def(0x1f7))/0x8*(-parseInt(_0x483def(0x20f))/0x9)+-parseInt(_0x483def(0x1f2))/0xa;if(_0x5d989f===_0xad7a30)break;else _0x1475f5['push'](_0x1475f5['shift']());}catch(_0xab9702){_0x1475f5['push'](_0x1475f5['shift']());}}}(a109_0x1317,0xecc7b));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash',a109_0x1e3e08(0x1ea),'sh',a109_0x1e3e08(0x20e),a109_0x1e3e08(0x202),a109_0x1e3e08(0x20b),a109_0x1e3e08(0x1f8),a109_0x1e3e08(0x204),a109_0x1e3e08(0x217),a109_0x1e3e08(0x207),'nu',a109_0x1e3e08(0x1ed),'elvish',a109_0x1e3e08(0x214)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a109_0x1e3e08(0x208),a109_0x1e3e08(0x20a)]);function getProcessInfoWindows(_0x2c60f7){const _0x25bddb=a109_0x1e3e08;try{if(!Number[_0x25bddb(0x215)](_0x2c60f7)||_0x2c60f7<=0x0)return null;const _0x226153=execSync('wmic\x20process\x20where\x20ProcessId='+_0x2c60f7+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':_0x25bddb(0x216),'windowsHide':!![]})[_0x25bddb(0x1f1)](),_0x353bd8=_0x226153[_0x25bddb(0x1ee)]('\x0a')[_0x25bddb(0x203)](_0x562d90=>_0x562d90[_0x25bddb(0x1f1)]());if(_0x353bd8[_0x25bddb(0x201)]<0x2)return null;const _0x311b83=_0x353bd8[_0x353bd8[_0x25bddb(0x201)]-0x1][_0x25bddb(0x1ee)](',');if(_0x311b83[_0x25bddb(0x201)]<0x3)return null;const _0x3a9479=_0x311b83[0x1]?.[_0x25bddb(0x1f1)]()||'',_0x55161a=parseInt(_0x311b83[0x2]?.[_0x25bddb(0x1f1)]()||'0',0xa);if(isNaN(_0x55161a)||!_0x3a9479)return null;return{'pid':_0x2c60f7,'ppid':_0x55161a,'comm':_0x3a9479['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x99bd98){const _0x19b5f8=a109_0x1e3e08;try{const _0x567aca=0x400000;if(!Number[_0x19b5f8(0x215)](_0x99bd98)||_0x99bd98<=0x0||_0x99bd98>_0x567aca)return null;const _0x81540e=execSync(_0x19b5f8(0x211)+_0x99bd98+_0x19b5f8(0x1fa),{'encoding':'utf-8','stdio':_0x19b5f8(0x1ec)})[_0x19b5f8(0x1f1)](),[_0x3badf9,..._0x284b7f]=_0x81540e[_0x19b5f8(0x1ee)](/\s+/),_0x185b02=parseInt(_0x3badf9,0xa),_0xcbcd32=_0x284b7f[_0x19b5f8(0x1fd)]('\x20');if(isNaN(_0x185b02))return null;return{'pid':_0x99bd98,'ppid':_0x185b02,'comm':_0xcbcd32};}catch{return null;}}function getProcessInfo(_0x5e4807){if(process['platform']==='win32')return getProcessInfoWindows(_0x5e4807);return getProcessInfoPosix(_0x5e4807);}function getBasename(_0x2fb217){const _0x5c65e8=a109_0x1e3e08;return _0x2fb217[_0x5c65e8(0x205)](/^-/,'')[_0x5c65e8(0x1ee)]('/')[_0x5c65e8(0x20d)]()?.[_0x5c65e8(0x1ff)]()||'';}function isShell(_0x462782){const _0x3080bf=a109_0x1e3e08;return SHELL_NAMES[_0x3080bf(0x210)](getBasename(_0x462782));}function isEphemeralShellSpawner(_0x28a735){const _0x441b8e=a109_0x1e3e08;return EPHEMERAL_SHELL_SPAWNERS[_0x441b8e(0x210)](getBasename(_0x28a735));}let cachedShellPID;function findShellPID(){const _0x3eef6c=a109_0x1e3e08;if(process[_0x3eef6c(0x200)]===undefined)return process[_0x3eef6c(0x213)];let _0x535f90=process[_0x3eef6c(0x200)];const _0x214abe=0xa;let _0x184883=0x0;while(_0x184883<_0x214abe){const _0x48d7fa=getProcessInfo(_0x535f90);if(!_0x48d7fa)break;if(isShell(_0x48d7fa[_0x3eef6c(0x1f3)])){const _0x3f9e39=getProcessInfo(_0x48d7fa[_0x3eef6c(0x200)]);if(_0x3f9e39&&isEphemeralShellSpawner(_0x3f9e39[_0x3eef6c(0x1f3)])){_0x535f90=_0x48d7fa[_0x3eef6c(0x200)],_0x184883++;continue;}return _0x48d7fa['pid'];}if(_0x48d7fa[_0x3eef6c(0x200)]===0x0||_0x48d7fa[_0x3eef6c(0x200)]===0x1){if(isShell(_0x48d7fa['comm']))return _0x48d7fa['pid'];break;}_0x535f90=_0x48d7fa['ppid'],_0x184883++;}return process[_0x3eef6c(0x200)]!==undefined?process[_0x3eef6c(0x200)]:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x3db059){if(!Number['isInteger'](_0x3db059)||_0x3db059<=0x0)return![];try{return process['kill'](_0x3db059,0x0),!![];}catch{return![];}}function a109_0x4d14(_0x3dbb68,_0x4fa301){_0x3dbb68=_0x3dbb68-0x1ea;const _0x131779=a109_0x1317();let _0x4d14ef=_0x131779[_0x3dbb68];return _0x4d14ef;}export function openBrowser(_0x20b672){const _0x281b09=a109_0x1e3e08,_0x520e62=process['platform'],_0x2b8bee=_0x520e62===_0x281b09(0x1f5)?_0x281b09(0x20c):_0x520e62===_0x281b09(0x1eb)?_0x281b09(0x1f4):_0x281b09(0x206);spawn(_0x2b8bee,[_0x20b672],{'detached':!![],'stdio':_0x281b09(0x1fb)})[_0x281b09(0x1fe)]();}function a109_0x1317(){const _0x3d7ec5=['ion','split','6154848PyOigB','162pbqVpg','trim','38279120shVgYn','comm','start','darwin','9379909RZsGOJ','8SEvyEx','csh','1142162iprGtR','\x20-o\x20ppid=,comm=','ignore','45enzcoQ','join','unref','toLowerCase','ppid','length','ksh','filter','dash','replace','xdg-open','powershell','code','2YyHSpn','cursor','tcsh','open','pop','fish','8238834CELwvT','has','ps\x20-p\x20','5076255cYayAf','pid','xonsh','isInteger','utf-8','pwsh','zsh','win32','pipe'];a109_0x1317=function(){return _0x3d7ec5;};return a109_0x1317();}
@@ -1 +1 @@
1
- (function(_0x22e7e1,_0xe9ec71){const _0x39f55d=a110_0x538e,_0x1dd978=_0x22e7e1();while(!![]){try{const _0x5abec6=parseInt(_0x39f55d(0x1b7))/0x1+parseInt(_0x39f55d(0x1b2))/0x2+-parseInt(_0x39f55d(0x1bc))/0x3+-parseInt(_0x39f55d(0x1b9))/0x4+-parseInt(_0x39f55d(0x1a8))/0x5+parseInt(_0x39f55d(0x1b3))/0x6+-parseInt(_0x39f55d(0x1a9))/0x7*(parseInt(_0x39f55d(0x1ad))/0x8);if(_0x5abec6===_0xe9ec71)break;else _0x1dd978['push'](_0x1dd978['shift']());}catch(_0xa4f1dc){_0x1dd978['push'](_0x1dd978['shift']());}}}(a110_0x539e,0x1a940));function a110_0x539e(){const _0x359319=['\x20[y/N]\x20','797412GLqMlc','setRawMode','exit','281838uzfpFv','resume','setEncoding','170840HYNnau','1050yuReRr','data','createInterface','\x20(y/N):\x20','1064qfGzIF','write','toLowerCase','isTTY','stdin','348542mXzrEh','745218DkfZcM','pause','close','stderr','157807NFwYXA'];a110_0x539e=function(){return _0x359319;};return a110_0x539e();}function a110_0x538e(_0x53d7b7,_0x4609e8){_0x53d7b7=_0x53d7b7-0x1a6;const _0x539e9f=a110_0x539e();let _0x538e52=_0x539e9f[_0x53d7b7];return _0x538e52;}import*as a110_0x467a7d from'readline';export async function confirm(_0x42943c){const _0x1cae53=a110_0x538e,_0x1d732f=a110_0x467a7d[_0x1cae53(0x1ab)]({'input':process[_0x1cae53(0x1b1)],'output':process['stdout']});return new Promise(_0x322d45=>{const _0x3b4c7c=_0x1cae53;_0x1d732f['question'](_0x42943c+_0x3b4c7c(0x1ac),_0x4b4b87=>{const _0x10dc66=_0x3b4c7c;_0x1d732f[_0x10dc66(0x1b5)](),_0x322d45(_0x4b4b87[_0x10dc66(0x1af)]()==='y'||_0x4b4b87[_0x10dc66(0x1af)]()==='yes');});});}export async function confirmKey(_0x4ce6ab){const _0xd848e2=a110_0x538e;if(!process[_0xd848e2(0x1b1)][_0xd848e2(0x1b0)])return![];return process['stderr'][_0xd848e2(0x1ae)](_0x4ce6ab+_0xd848e2(0x1b8)),new Promise(_0x47dfb0=>{const _0x256fe3=_0xd848e2,_0xc72d48=process['stdin'];_0xc72d48[_0x256fe3(0x1ba)](!![]),_0xc72d48[_0x256fe3(0x1a6)](),_0xc72d48[_0x256fe3(0x1a7)]('utf8');const _0x45cb62=_0xb23583=>{const _0x5c8281=_0x256fe3;_0xc72d48[_0x5c8281(0x1ba)](![]),_0xc72d48[_0x5c8281(0x1b4)](),_0xc72d48['removeListener'](_0x5c8281(0x1aa),_0x45cb62);if(_0xb23583==='\x1b'){process[_0x5c8281(0x1b6)]['write']('\x0a'),_0x47dfb0(![]);return;}_0xb23583==='\x03'&&(process['stderr']['write']('\x0a'),process[_0x5c8281(0x1bb)](0x82));if(_0xb23583[_0x5c8281(0x1af)]()==='y'){process['stderr']['write']('y\x0a'),_0x47dfb0(!![]);return;}process[_0x5c8281(0x1b6)][_0x5c8281(0x1ae)]('\x0a'),_0x47dfb0(![]);};_0xc72d48['on'](_0x256fe3(0x1aa),_0x45cb62);});}
1
+ (function(_0x4e93f0,_0x2127c2){const _0x5cd84a=a110_0x3327,_0x555376=_0x4e93f0();while(!![]){try{const _0x517883=parseInt(_0x5cd84a(0x1c4))/0x1*(parseInt(_0x5cd84a(0x1cd))/0x2)+parseInt(_0x5cd84a(0x1bb))/0x3+parseInt(_0x5cd84a(0x1d1))/0x4*(-parseInt(_0x5cd84a(0x1c3))/0x5)+-parseInt(_0x5cd84a(0x1c6))/0x6+parseInt(_0x5cd84a(0x1cb))/0x7+parseInt(_0x5cd84a(0x1d2))/0x8*(parseInt(_0x5cd84a(0x1c1))/0x9)+parseInt(_0x5cd84a(0x1ce))/0xa;if(_0x517883===_0x2127c2)break;else _0x555376['push'](_0x555376['shift']());}catch(_0x306f5d){_0x555376['push'](_0x555376['shift']());}}}(a110_0x2759,0x4733f));function a110_0x2759(){const _0x34c2f8=['133275NQGTPq','setRawMode','toLowerCase','resume','\x20[y/N]\x20','\x20(y/N):\x20','58599Ofudwv','utf8','20yVwgNI','1mSFuvl','question','1396188CGdunQ','stderr','data','stdin','exit','2319282pTqqrX','yes','587230bmwRDY','3387840HwSzpg','isTTY','write','542404WqrgQE','72KGPzEB','close','setEncoding'];a110_0x2759=function(){return _0x34c2f8;};return a110_0x2759();}import*as a110_0xb98ba4 from'readline';export async function confirm(_0x432481){const _0x191a1e=a110_0x3327,_0x39a4a0=a110_0xb98ba4['createInterface']({'input':process[_0x191a1e(0x1c9)],'output':process['stdout']});return new Promise(_0xe7aae9=>{const _0x3d4ddf=_0x191a1e;_0x39a4a0[_0x3d4ddf(0x1c5)](_0x432481+_0x3d4ddf(0x1c0),_0x51fe76=>{const _0x5b87f2=_0x3d4ddf;_0x39a4a0[_0x5b87f2(0x1d3)](),_0xe7aae9(_0x51fe76[_0x5b87f2(0x1bd)]()==='y'||_0x51fe76['toLowerCase']()===_0x5b87f2(0x1cc));});});}function a110_0x3327(_0x4b90fe,_0x589adf){_0x4b90fe=_0x4b90fe-0x1bb;const _0x2759e6=a110_0x2759();let _0x3327ab=_0x2759e6[_0x4b90fe];return _0x3327ab;}export async function confirmKey(_0x399096){const _0x359cfa=a110_0x3327;if(!process[_0x359cfa(0x1c9)][_0x359cfa(0x1cf)])return![];return process[_0x359cfa(0x1c7)][_0x359cfa(0x1d0)](_0x399096+_0x359cfa(0x1bf)),new Promise(_0x4a2633=>{const _0x2a7948=_0x359cfa,_0x24a488=process[_0x2a7948(0x1c9)];_0x24a488[_0x2a7948(0x1bc)](!![]),_0x24a488[_0x2a7948(0x1be)](),_0x24a488[_0x2a7948(0x1d4)](_0x2a7948(0x1c2));const _0x22c190=_0x122384=>{const _0x8c4dd1=_0x2a7948;_0x24a488[_0x8c4dd1(0x1bc)](![]),_0x24a488['pause'](),_0x24a488['removeListener'](_0x8c4dd1(0x1c8),_0x22c190);if(_0x122384==='\x1b'){process[_0x8c4dd1(0x1c7)][_0x8c4dd1(0x1d0)]('\x0a'),_0x4a2633(![]);return;}_0x122384==='\x03'&&(process['stderr'][_0x8c4dd1(0x1d0)]('\x0a'),process[_0x8c4dd1(0x1ca)](0x82));if(_0x122384['toLowerCase']()==='y'){process[_0x8c4dd1(0x1c7)][_0x8c4dd1(0x1d0)]('y\x0a'),_0x4a2633(!![]);return;}process[_0x8c4dd1(0x1c7)]['write']('\x0a'),_0x4a2633(![]);};_0x24a488['on'](_0x2a7948(0x1c8),_0x22c190);});}
@@ -1 +1 @@
1
- (function(_0x52723e,_0x236c3e){const _0x348a34=a111_0x2fa4,_0x48d1cc=_0x52723e();while(!![]){try{const _0xa05dc4=-parseInt(_0x348a34(0xd8))/0x1+-parseInt(_0x348a34(0xbb))/0x2*(parseInt(_0x348a34(0xd9))/0x3)+parseInt(_0x348a34(0xb9))/0x4+parseInt(_0x348a34(0xbe))/0x5+parseInt(_0x348a34(0xc0))/0x6*(parseInt(_0x348a34(0xd1))/0x7)+parseInt(_0x348a34(0xd0))/0x8*(-parseInt(_0x348a34(0xcc))/0x9)+parseInt(_0x348a34(0xc2))/0xa;if(_0xa05dc4===_0x236c3e)break;else _0x48d1cc['push'](_0x48d1cc['shift']());}catch(_0x370c53){_0x48d1cc['push'](_0x48d1cc['shift']());}}}(a111_0x2973,0xdff04));import{existsSync,readFileSync}from'fs';import a111_0x551058 from'path';import{parse as a111_0x3ac2db}from'yaml';export function parsePath(_0x287e1b){const _0x3bc1a3=a111_0x2fa4;if(!_0x287e1b||_0x287e1b[_0x3bc1a3(0xc1)]()==='')throw new Error(_0x3bc1a3(0xce));const _0x2d74ec=_0x287e1b[_0x3bc1a3(0xc1)]();if(_0x2d74ec==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x287e1b};const _0x1a975c=_0x2d74ec[_0x3bc1a3(0xdf)]('/')?_0x2d74ec[_0x3bc1a3(0xbc)](0x1):_0x2d74ec,_0x449cde=_0x1a975c['split']('/')['filter'](_0x268e13=>_0x268e13!=='');if(_0x449cde[_0x3bc1a3(0xda)]===0x0)throw new Error(_0x3bc1a3(0xd5));const _0x1a0489=_0x2d74ec[_0x3bc1a3(0xdf)]('/')||!isRelativePathSegment(_0x449cde[0x0]);for(const _0x5a0d4d of _0x449cde){validatePathSegment(_0x5a0d4d);}return{'segments':_0x449cde,'isAbsolute':_0x1a0489,'raw':_0x287e1b};}function isRelativePathSegment(_0xb06d28){return _0xb06d28==='.'||_0xb06d28==='..';}function validatePathSegment(_0x13ad0c){const _0x578d6c=a111_0x2fa4;if(_0x13ad0c==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x13ad0c==='.'||_0x13ad0c==='..')return;if(/[\x00-\x1F\x7F]/['test'](_0x13ad0c))throw new Error(_0x578d6c(0xb7)+_0x13ad0c);if(_0x13ad0c!==_0x13ad0c[_0x578d6c(0xc1)]()){}}export function validatePath(_0x36fbaf){const _0xc4cbd9=a111_0x2fa4;if(_0x36fbaf['segments']['length']===0x0&&!_0x36fbaf['isAbsolute'])throw new Error(_0xc4cbd9(0xdd));if(_0x36fbaf[_0xc4cbd9(0xdc)]){if(_0x36fbaf['segments'][0x0]==='..')throw new Error('Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22');let _0x27d9b9=0x0;for(const _0x23943f of _0x36fbaf[_0xc4cbd9(0xd7)]){if(_0x23943f==='..'){if(_0x27d9b9===0x0)throw new Error(_0xc4cbd9(0xca));_0x27d9b9--;}else _0x23943f!=='.'&&_0x27d9b9++;}}}export function joinPaths(_0x354397,_0x39167e){const _0x1f72ed=a111_0x2fa4;if(!_0x354397||_0x354397==='/')return _0x39167e;if(!_0x39167e||_0x39167e==='.')return _0x354397;if(_0x39167e[_0x1f72ed(0xdf)]('/'))return _0x39167e;const _0x2ece9f=parsePath(_0x354397),_0x3a255a=parsePath(_0x39167e),_0x20fbd3=[..._0x2ece9f['segments']];for(const _0x249f9c of _0x3a255a[_0x1f72ed(0xd7)]){if(_0x249f9c==='.')continue;else{if(_0x249f9c==='..'){if(_0x20fbd3[_0x1f72ed(0xda)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x20fbd3[_0x1f72ed(0xc6)]();}else _0x20fbd3['push'](_0x249f9c);}}const _0x17761e=_0x20fbd3[_0x1f72ed(0xc4)]('/');return _0x2ece9f[_0x1f72ed(0xd2)][_0x1f72ed(0xdf)]('/')?'/'+_0x17761e:_0x17761e;}function a111_0x2973(){const _0x222328=['Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','36SfUYEa','.yaml','Path\x20cannot\x20be\x20empty','push','990048wxWQqn','509341bygRjT','raw','type','journey','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','replace','segments','1453454YWyzNk','21LcqdDH','length','.yml','isAbsolute','Relative\x20path\x20cannot\x20be\x20empty','parent_segment','startsWith','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','root','1718416ByYsNB','segment','364130BIxAcz','substring','dirname','8014340LwwXZY','parse','12vOtUNO','trim','19621870aKtFmJ','tdx.json','join','File\x20not\x20found:\x20','pop','Cannot\x20navigate\x20above\x20root','slice','utf-8','Path\x20attempts\x20to\x20navigate\x20above\x20root'];a111_0x2973=function(){return _0x222328;};return a111_0x2973();}export function normalizePath(_0x5022bd){const _0xbf3ad2=a111_0x2fa4,_0x18d3b6=parsePath(_0x5022bd),_0x491839=[];for(const _0xd68a3a of _0x18d3b6[_0xbf3ad2(0xd7)]){if(_0xd68a3a==='.')continue;else{if(_0xd68a3a==='..'){if(_0x491839[_0xbf3ad2(0xda)]===0x0){if(_0x18d3b6[_0xbf3ad2(0xdc)])throw new Error(_0xbf3ad2(0xc7));_0x491839[_0xbf3ad2(0xcf)]('..');}else _0x491839[_0x491839[_0xbf3ad2(0xda)]-0x1]==='..'?_0x491839[_0xbf3ad2(0xcf)]('..'):_0x491839[_0xbf3ad2(0xc6)]();}else _0x491839[_0xbf3ad2(0xcf)](_0xd68a3a);}}if(_0x491839[_0xbf3ad2(0xda)]===0x0)return _0x18d3b6[_0xbf3ad2(0xdc)]?'/':'.';const _0x359b4b=_0x491839['join']('/');return _0x18d3b6[_0xbf3ad2(0xd2)]['startsWith']('/')?'/'+_0x359b4b:_0x359b4b;}function a111_0x2fa4(_0x5d8790,_0x222a24){_0x5d8790=_0x5d8790-0xb6;const _0x2973c8=a111_0x2973();let _0x2fa4d1=_0x2973c8[_0x5d8790];return _0x2fa4d1;}export function getParentPath(_0x67075b){const _0x43da0f=a111_0x2fa4,_0x565e70=parsePath(_0x67075b);if(_0x565e70[_0x43da0f(0xd7)][_0x43da0f(0xda)]<=0x1)return'/';const _0x190199=_0x565e70[_0x43da0f(0xd7)][_0x43da0f(0xc8)](0x0,-0x1)[_0x43da0f(0xc4)]('/');return _0x565e70[_0x43da0f(0xd2)][_0x43da0f(0xdf)]('/')?'/'+_0x190199:_0x190199;}export function getBaseName(_0x991fa6){const _0x4de5e8=a111_0x2fa4,_0xd3ae09=parsePath(_0x991fa6);return _0xd3ae09[_0x4de5e8(0xd7)][_0xd3ae09['segments'][_0x4de5e8(0xda)]-0x1]||'';}export function isChildPath(_0x2545ac,_0x2aa8e1){const _0x4a7f2a=a111_0x2fa4,_0x5437f6=parsePath(_0x2545ac),_0x2e4983=parsePath(_0x2aa8e1);if(_0x5437f6[_0x4a7f2a(0xd7)][_0x4a7f2a(0xda)]<=_0x2e4983[_0x4a7f2a(0xd7)][_0x4a7f2a(0xda)])return![];for(let _0x3d88a0=0x0;_0x3d88a0<_0x2e4983[_0x4a7f2a(0xd7)][_0x4a7f2a(0xda)];_0x3d88a0++){if(_0x5437f6['segments'][_0x3d88a0]!==_0x2e4983['segments'][_0x3d88a0])return![];}return!![];}export function splitPath(_0x5dbcce){const _0x3dad05=a111_0x2fa4,_0x3dc2ed=parsePath(_0x5dbcce);if(_0x3dc2ed[_0x3dad05(0xd7)][_0x3dad05(0xda)]===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x3dc2ed[_0x3dad05(0xd7)][_0x3dad05(0xda)]===0x1)return{'parent':_0x3dc2ed[_0x3dad05(0xd7)][0x0]};return{'parent':_0x3dc2ed['segments'][0x0],'child':_0x3dc2ed[_0x3dad05(0xd7)]['slice'](0x1)[_0x3dad05(0xc4)]('/')};}export function isYamlFilePath(_0x47c316){const _0x1729ba=a111_0x2fa4;return _0x47c316['endsWith'](_0x1729ba(0xdb))||_0x47c316['endsWith'](_0x1729ba(0xcd));}export function resolveYamlFilePath(_0x249fe0){const _0x252920=a111_0x2fa4,_0x25d85a=a111_0x551058['resolve'](_0x249fe0);if(!existsSync(_0x25d85a))throw new Error(_0x252920(0xc5)+_0x249fe0);let _0x476f2d=a111_0x551058[_0x252920(0xbd)](_0x25d85a),_0x2ebbfe=null,_0x57a969=null;const _0x449329=a111_0x551058[_0x252920(0xbf)](_0x476f2d)[_0x252920(0xb8)];while(_0x476f2d!==_0x449329){const _0x33beb6=a111_0x551058[_0x252920(0xc4)](_0x476f2d,_0x252920(0xc3));if(existsSync(_0x33beb6)){_0x2ebbfe=_0x33beb6,_0x57a969=_0x476f2d;break;}_0x476f2d=a111_0x551058[_0x252920(0xbd)](_0x476f2d);}if(!_0x2ebbfe||!_0x57a969)throw new Error('No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x249fe0);const _0xeb855a=readFileSync(_0x2ebbfe,_0x252920(0xc9)),_0x3ba4f8=JSON[_0x252920(0xbf)](_0xeb855a),_0x3258ef=_0x3ba4f8[_0x252920(0xde)];if(!_0x3258ef)throw new Error(_0x252920(0xcb));const _0x18c69d=readFileSync(_0x25d85a,'utf-8'),_0x430ab1=a111_0x3ac2db(_0x18c69d),_0x59c7a7=_0x430ab1['name'];if(!_0x59c7a7)throw new Error(_0x252920(0xb6)+_0x249fe0);const _0x58d45e=_0x430ab1[_0x252920(0xd3)]===_0x252920(0xd4)?_0x252920(0xd4):_0x252920(0xba),_0x5ad934=a111_0x551058['relative'](_0x57a969,_0x25d85a),_0x1c9c0c=a111_0x551058[_0x252920(0xbd)](_0x5ad934),_0x4f9931=_0x1c9c0c==='.'?'':_0x1c9c0c[_0x252920(0xd6)](/\\/g,'/'),_0x1fcd58=_0x4f9931?_0x3258ef+'/'+_0x4f9931+'/'+_0x59c7a7:_0x3258ef+'/'+_0x59c7a7;return{'parentSegment':_0x3258ef,'segmentName':_0x59c7a7,'folderPath':_0x4f9931,'fullPath':_0x1fcd58,'resourceType':_0x58d45e};}
1
+ (function(_0x5a44f5,_0x31b6cc){const _0x24b43a=a111_0x10b6,_0x30255f=_0x5a44f5();while(!![]){try{const _0x18887e=-parseInt(_0x24b43a(0x163))/0x1*(parseInt(_0x24b43a(0x165))/0x2)+-parseInt(_0x24b43a(0x13e))/0x3*(parseInt(_0x24b43a(0x149))/0x4)+parseInt(_0x24b43a(0x159))/0x5+parseInt(_0x24b43a(0x14b))/0x6+-parseInt(_0x24b43a(0x156))/0x7+-parseInt(_0x24b43a(0x15a))/0x8*(parseInt(_0x24b43a(0x166))/0x9)+-parseInt(_0x24b43a(0x148))/0xa*(-parseInt(_0x24b43a(0x155))/0xb);if(_0x18887e===_0x31b6cc)break;else _0x30255f['push'](_0x30255f['shift']());}catch(_0x4b933a){_0x30255f['push'](_0x30255f['shift']());}}}(a111_0x4a10,0xaf7d3));import{existsSync,readFileSync}from'fs';import a111_0x257686 from'path';import{parse as a111_0x254431}from'yaml';export function parsePath(_0x4e32e9){const _0x38f54c=a111_0x10b6;if(!_0x4e32e9||_0x4e32e9[_0x38f54c(0x154)]()==='')throw new Error(_0x38f54c(0x141));const _0x14c355=_0x4e32e9[_0x38f54c(0x154)]();if(_0x14c355==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x4e32e9};const _0x43eafb=_0x14c355[_0x38f54c(0x150)]('/')?_0x14c355[_0x38f54c(0x167)](0x1):_0x14c355,_0x1ca769=_0x43eafb[_0x38f54c(0x162)]('/')[_0x38f54c(0x14e)](_0x4764de=>_0x4764de!=='');if(_0x1ca769[_0x38f54c(0x14f)]===0x0)throw new Error(_0x38f54c(0x169));const _0x255d2f=_0x14c355[_0x38f54c(0x150)]('/')||!isRelativePathSegment(_0x1ca769[0x0]);for(const _0x53661a of _0x1ca769){validatePathSegment(_0x53661a);}return{'segments':_0x1ca769,'isAbsolute':_0x255d2f,'raw':_0x4e32e9};}function isRelativePathSegment(_0x1d6031){return _0x1d6031==='.'||_0x1d6031==='..';}function validatePathSegment(_0x5643cc){const _0x5782b7=a111_0x10b6;if(_0x5643cc==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x5643cc==='.'||_0x5643cc==='..')return;if(/[\x00-\x1F\x7F]/[_0x5782b7(0x15e)](_0x5643cc))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0x5643cc);if(_0x5643cc!==_0x5643cc['trim']()){}}export function validatePath(_0x295dfd){const _0x9c65f4=a111_0x10b6;if(_0x295dfd['segments'][_0x9c65f4(0x14f)]===0x0&&!_0x295dfd[_0x9c65f4(0x13f)])throw new Error(_0x9c65f4(0x160));if(_0x295dfd[_0x9c65f4(0x13f)]){if(_0x295dfd['segments'][0x0]==='..')throw new Error(_0x9c65f4(0x147));let _0x2a2c40=0x0;for(const _0x3a5256 of _0x295dfd[_0x9c65f4(0x14d)]){if(_0x3a5256==='..'){if(_0x2a2c40===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x2a2c40--;}else _0x3a5256!=='.'&&_0x2a2c40++;}}}export function joinPaths(_0x50d303,_0x53614a){const _0x25eee0=a111_0x10b6;if(!_0x50d303||_0x50d303==='/')return _0x53614a;if(!_0x53614a||_0x53614a==='.')return _0x50d303;if(_0x53614a['startsWith']('/'))return _0x53614a;const _0x25b227=parsePath(_0x50d303),_0x26f011=parsePath(_0x53614a),_0x573736=[..._0x25b227[_0x25eee0(0x14d)]];for(const _0x1fa694 of _0x26f011[_0x25eee0(0x14d)]){if(_0x1fa694==='.')continue;else{if(_0x1fa694==='..'){if(_0x573736[_0x25eee0(0x14f)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x573736['pop']();}else _0x573736[_0x25eee0(0x15b)](_0x1fa694);}}const _0x1c30ec=_0x573736[_0x25eee0(0x164)]('/');return _0x25b227['raw'][_0x25eee0(0x150)]('/')?'/'+_0x1c30ec:_0x1c30ec;}export function normalizePath(_0x199788){const _0x5293e5=a111_0x10b6,_0x2bb0cb=parsePath(_0x199788),_0x51c97d=[];for(const _0x42e374 of _0x2bb0cb['segments']){if(_0x42e374==='.')continue;else{if(_0x42e374==='..'){if(_0x51c97d[_0x5293e5(0x14f)]===0x0){if(_0x2bb0cb['isAbsolute'])throw new Error(_0x5293e5(0x144));_0x51c97d['push']('..');}else _0x51c97d[_0x51c97d[_0x5293e5(0x14f)]-0x1]==='..'?_0x51c97d[_0x5293e5(0x15b)]('..'):_0x51c97d['pop']();}else _0x51c97d['push'](_0x42e374);}}if(_0x51c97d['length']===0x0)return _0x2bb0cb[_0x5293e5(0x13f)]?'/':'.';const _0x46943c=_0x51c97d[_0x5293e5(0x164)]('/');return _0x2bb0cb[_0x5293e5(0x14a)]['startsWith']('/')?'/'+_0x46943c:_0x46943c;}function a111_0x10b6(_0x456657,_0x4d6528){_0x456657=_0x456657-0x13e;const _0x4a10b5=a111_0x4a10();let _0x10b6f=_0x4a10b5[_0x456657];return _0x10b6f;}function a111_0x4a10(){const _0x40cfde=['Relative\x20path\x20cannot\x20be\x20empty','slice','split','11VcLOJj','join','108388bfnvan','9081YwAaGx','substring','name','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','relative','138ilcOXw','isAbsolute','type','Path\x20cannot\x20be\x20empty','journey','dirname','Cannot\x20navigate\x20above\x20root','endsWith','File\x20not\x20found:\x20','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','20jgzUgS','45644ELgeEI','raw','7987044pDYCbG','utf-8','segments','filter','length','startsWith','root','parent_segment','resolve','trim','9178136htOzvZ','9921905YGfGcI','tdx.json','parse','3698170VeGAqD','3824Zintym','push','No\x20tdx.json\x20found\x20for\x20file:\x20','.yaml','test','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20'];a111_0x4a10=function(){return _0x40cfde;};return a111_0x4a10();}export function getParentPath(_0x42d898){const _0xdcb544=a111_0x10b6,_0x42ca2c=parsePath(_0x42d898);if(_0x42ca2c[_0xdcb544(0x14d)][_0xdcb544(0x14f)]<=0x1)return'/';const _0x3a6274=_0x42ca2c['segments'][_0xdcb544(0x161)](0x0,-0x1)[_0xdcb544(0x164)]('/');return _0x42ca2c[_0xdcb544(0x14a)][_0xdcb544(0x150)]('/')?'/'+_0x3a6274:_0x3a6274;}export function getBaseName(_0x1258c1){const _0x3ec7bf=a111_0x10b6,_0x5c7c60=parsePath(_0x1258c1);return _0x5c7c60[_0x3ec7bf(0x14d)][_0x5c7c60[_0x3ec7bf(0x14d)]['length']-0x1]||'';}export function isChildPath(_0x59c25c,_0x4e04be){const _0x5adcfb=a111_0x10b6,_0x1c8af5=parsePath(_0x59c25c),_0x1fa515=parsePath(_0x4e04be);if(_0x1c8af5[_0x5adcfb(0x14d)]['length']<=_0x1fa515[_0x5adcfb(0x14d)][_0x5adcfb(0x14f)])return![];for(let _0x202b38=0x0;_0x202b38<_0x1fa515[_0x5adcfb(0x14d)]['length'];_0x202b38++){if(_0x1c8af5[_0x5adcfb(0x14d)][_0x202b38]!==_0x1fa515[_0x5adcfb(0x14d)][_0x202b38])return![];}return!![];}export function splitPath(_0x284970){const _0x4751ec=a111_0x10b6,_0x478e9e=parsePath(_0x284970);if(_0x478e9e[_0x4751ec(0x14d)][_0x4751ec(0x14f)]===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x478e9e['segments']['length']===0x1)return{'parent':_0x478e9e[_0x4751ec(0x14d)][0x0]};return{'parent':_0x478e9e[_0x4751ec(0x14d)][0x0],'child':_0x478e9e['segments'][_0x4751ec(0x161)](0x1)[_0x4751ec(0x164)]('/')};}export function isYamlFilePath(_0x29e712){const _0x2f75b5=a111_0x10b6;return _0x29e712[_0x2f75b5(0x145)]('.yml')||_0x29e712[_0x2f75b5(0x145)](_0x2f75b5(0x15d));}export function resolveYamlFilePath(_0x2355b1){const _0x335e37=a111_0x10b6,_0x2399ca=a111_0x257686[_0x335e37(0x153)](_0x2355b1);if(!existsSync(_0x2399ca))throw new Error(_0x335e37(0x146)+_0x2355b1);let _0x5ccc5d=a111_0x257686[_0x335e37(0x143)](_0x2399ca),_0x3af187=null,_0x2c92ef=null;const _0xf9df74=a111_0x257686[_0x335e37(0x158)](_0x5ccc5d)[_0x335e37(0x151)];while(_0x5ccc5d!==_0xf9df74){const _0x498eba=a111_0x257686[_0x335e37(0x164)](_0x5ccc5d,_0x335e37(0x157));if(existsSync(_0x498eba)){_0x3af187=_0x498eba,_0x2c92ef=_0x5ccc5d;break;}_0x5ccc5d=a111_0x257686[_0x335e37(0x143)](_0x5ccc5d);}if(!_0x3af187||!_0x2c92ef)throw new Error(_0x335e37(0x15c)+_0x2355b1);const _0x514908=readFileSync(_0x3af187,_0x335e37(0x14c)),_0x3d84f1=JSON[_0x335e37(0x158)](_0x514908),_0x1e8b12=_0x3d84f1[_0x335e37(0x152)];if(!_0x1e8b12)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x4983f8=readFileSync(_0x2399ca,_0x335e37(0x14c)),_0x214464=a111_0x254431(_0x4983f8),_0x3acbd1=_0x214464[_0x335e37(0x168)];if(!_0x3acbd1)throw new Error(_0x335e37(0x15f)+_0x2355b1);const _0x16530b=_0x214464[_0x335e37(0x140)]===_0x335e37(0x142)?'journey':'segment',_0x46de3f=a111_0x257686[_0x335e37(0x16a)](_0x2c92ef,_0x2399ca),_0x2767fb=a111_0x257686[_0x335e37(0x143)](_0x46de3f),_0x57d674=_0x2767fb==='.'?'':_0x2767fb['replace'](/\\/g,'/'),_0x5f319c=_0x57d674?_0x1e8b12+'/'+_0x57d674+'/'+_0x3acbd1:_0x1e8b12+'/'+_0x3acbd1;return{'parentSegment':_0x1e8b12,'segmentName':_0x3acbd1,'folderPath':_0x57d674,'fullPath':_0x5f319c,'resourceType':_0x16530b};}
@@ -1 +1 @@
1
- function a112_0x5b24(){const _0x1c602a=['4041836KrFgPn','171KsbsFj','2342895VnTnqv','2552463AROdOv','6309177xemybG','28866igcuEF','substring','685356xyiyCs','.\x20Parent\x20name\x20cannot\x20be\x20empty','2148408qvqHFq','Invalid\x20segment\x20reference\x20format:\x20','8RDvfsk'];a112_0x5b24=function(){return _0x1c602a;};return a112_0x5b24();}function a112_0x4ff4(_0x4da2da,_0x4fe92d){_0x4da2da=_0x4da2da-0xf7;const _0x5b2439=a112_0x5b24();let _0x4ff416=_0x5b2439[_0x4da2da];return _0x4ff416;}(function(_0x3190b4,_0x28a6f7){const _0x2d5428=a112_0x4ff4,_0x4c8a99=_0x3190b4();while(!![]){try{const _0x478b02=parseInt(_0x2d5428(0xf7))/0x1+-parseInt(_0x2d5428(0x101))/0x2*(-parseInt(_0x2d5428(0xfd))/0x3)+parseInt(_0x2d5428(0xfc))/0x4+-parseInt(_0x2d5428(0xfe))/0x5+-parseInt(_0x2d5428(0xf9))/0x6+-parseInt(_0x2d5428(0x100))/0x7+-parseInt(_0x2d5428(0xfb))/0x8*(parseInt(_0x2d5428(0xff))/0x9);if(_0x478b02===_0x28a6f7)break;else _0x4c8a99['push'](_0x4c8a99['shift']());}catch(_0x6327ce){_0x4c8a99['push'](_0x4c8a99['shift']());}}}(a112_0x5b24,0x7bc33));export function parseSegmentRef(_0x11d655){const _0x5df280=a112_0x4ff4,_0x1b7ae1=_0x11d655['indexOf']('/');if(_0x1b7ae1===-0x1)return{'parentId':_0x11d655};if(_0x1b7ae1===0x0)throw new Error(_0x5df280(0xfa)+_0x11d655+_0x5df280(0xf8));const _0xb2dc37=_0x11d655['substring'](0x0,_0x1b7ae1),_0x4fd9c2=_0x11d655[_0x5df280(0x102)](_0x1b7ae1+0x1);if(_0x4fd9c2==='')throw new Error(_0x5df280(0xfa)+_0x11d655+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0xb2dc37,'childId':_0x4fd9c2};}
1
+ function a112_0x2535(_0x4c4ab4,_0x4d0a21){_0x4c4ab4=_0x4c4ab4-0x192;const _0x506f4c=a112_0x506f();let _0x2535bb=_0x506f4c[_0x4c4ab4];return _0x2535bb;}(function(_0x133c5d,_0x46550a){const _0x613741=a112_0x2535,_0x45716d=_0x133c5d();while(!![]){try{const _0x50ce9e=parseInt(_0x613741(0x199))/0x1+parseInt(_0x613741(0x19f))/0x2*(parseInt(_0x613741(0x198))/0x3)+-parseInt(_0x613741(0x19d))/0x4*(-parseInt(_0x613741(0x19c))/0x5)+-parseInt(_0x613741(0x197))/0x6+-parseInt(_0x613741(0x196))/0x7+parseInt(_0x613741(0x19a))/0x8*(-parseInt(_0x613741(0x195))/0x9)+parseInt(_0x613741(0x19e))/0xa;if(_0x50ce9e===_0x46550a)break;else _0x45716d['push'](_0x45716d['shift']());}catch(_0x532458){_0x45716d['push'](_0x45716d['shift']());}}}(a112_0x506f,0xe9ee6));function a112_0x506f(){const _0x443d90=['.\x20Child\x20name\x20cannot\x20be\x20empty','7578FnTITm','11353601NRQTWV','772308ZQPrUK','86799YBZZSC','763198jzmsbr','10096NiTqae','indexOf','6647645GrOdrs','4LwPggF','5792660vptbUn','76kiJuVM','Invalid\x20segment\x20reference\x20format:\x20','substring'];a112_0x506f=function(){return _0x443d90;};return a112_0x506f();}export function parseSegmentRef(_0x230ffd){const _0x13bb78=a112_0x2535,_0x3a95e0=_0x230ffd[_0x13bb78(0x19b)]('/');if(_0x3a95e0===-0x1)return{'parentId':_0x230ffd};if(_0x3a95e0===0x0)throw new Error(_0x13bb78(0x192)+_0x230ffd+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x2886ca=_0x230ffd['substring'](0x0,_0x3a95e0),_0x42f20d=_0x230ffd[_0x13bb78(0x193)](_0x3a95e0+0x1);if(_0x42f20d==='')throw new Error(_0x13bb78(0x192)+_0x230ffd+_0x13bb78(0x194));return{'parentId':_0x2886ca,'childId':_0x42f20d};}
@@ -1 +1 @@
1
- (function(_0xfb440a,_0x335443){const _0x3ff3a3=a113_0x2d8f,_0x58ccfb=_0xfb440a();while(!![]){try{const _0x3409dc=-parseInt(_0x3ff3a3(0x1ba))/0x1+parseInt(_0x3ff3a3(0x1b9))/0x2+-parseInt(_0x3ff3a3(0x1b5))/0x3*(-parseInt(_0x3ff3a3(0x1c9))/0x4)+parseInt(_0x3ff3a3(0x1bb))/0x5*(parseInt(_0x3ff3a3(0x1bc))/0x6)+parseInt(_0x3ff3a3(0x1b4))/0x7*(-parseInt(_0x3ff3a3(0x1c0))/0x8)+-parseInt(_0x3ff3a3(0x1bf))/0x9*(-parseInt(_0x3ff3a3(0x1c4))/0xa)+-parseInt(_0x3ff3a3(0x1c2))/0xb*(parseInt(_0x3ff3a3(0x1cc))/0xc);if(_0x3409dc===_0x335443)break;else _0x58ccfb['push'](_0x58ccfb['shift']());}catch(_0x5c57b6){_0x58ccfb['push'](_0x58ccfb['shift']());}}}(a113_0x1e24,0xda86f));function a113_0x2d8f(_0x28ff17,_0x22822a){_0x28ff17=_0x28ff17-0x1b4;const _0x1e24f4=a113_0x1e24();let _0x2d8fbd=_0x1e24f4[_0x28ff17];return _0x2d8fbd;}import a113_0x37d79 from'ora';export function createCommandSpinner(_0x35611c,_0x359e51={}){const _0x5d7c1e=a113_0x2d8f,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x359e51;return a113_0x37d79({'text':_0x35611c,'color':'cyan','isEnabled':forceEnabled||process[_0x5d7c1e(0x1ca)]['isTTY']&&!verbose});}export async function withSpinner(_0x27c108,_0x45892f,_0x393684={}){const _0x3657db=a113_0x2d8f,_0x3626e5=_0x393684[_0x3657db(0x1b6)]??(()=>Date['now']()),_0x7c728d=createCommandSpinner(_0x27c108,_0x393684);_0x7c728d[_0x3657db(0x1c7)]();const _0x4bf996=_0x3626e5();try{const _0x8e099=await _0x45892f(),_0x30f10a=_0x3626e5()-_0x4bf996;return _0x7c728d[_0x3657db(0x1c1)](),{'data':_0x8e099,'elapsedMs':_0x30f10a};}catch(_0x5e0643){_0x7c728d[_0x3657db(0x1c1)]();throw _0x5e0643;}}export async function withQuerySpinner(_0x12f893,_0x5f5b82,_0xea8927={}){const _0x1223eb=a113_0x2d8f,_0x58b08b=_0xea8927['clock']??(()=>Date[_0x1223eb(0x1be)]()),_0x50dadc=_0xea8927[_0x1223eb(0x1c3)]??setInterval,_0x3b348e=createCommandSpinner(_0x12f893,_0xea8927);_0x3b348e[_0x1223eb(0x1c7)]();const _0x438fa8=_0x58b08b(),_0x3e3249=_0x12f893['replace'](_0x1223eb(0x1cb),''),_0x44acac={},_0x1989a8=()=>{const _0x1ca09d=_0x1223eb;if(!_0x3b348e[_0x1ca09d(0x1b7)])return;const _0x1c64dc=_0x58b08b()-_0x438fa8,_0x476548=formatElapsed(_0x1c64dc),_0xff205d=_0x44acac[_0x1ca09d(0x1c6)]??_0x3e3249,_0x5ae481=_0x44acac[_0x1ca09d(0x1c5)]?'\x20[Job\x20ID:\x20'+_0x44acac[_0x1ca09d(0x1c5)]+']':'',_0x425f3c=_0x44acac[_0x1ca09d(0x1b8)]?'\x20'+_0x44acac[_0x1ca09d(0x1b8)]:'';_0x3b348e['text']=_0xff205d+'\x20'+_0x476548+_0x425f3c+_0x5ae481;},_0x916c9c=_0x50dadc(()=>{_0x1989a8();},0x3e8),_0x1992cf={'setPhase':_0x2a03be=>{const _0x172869=_0x1223eb;_0x44acac[_0x172869(0x1c6)]=_0x2a03be,_0x1989a8();},'setJobId':_0x433080=>{const _0x1f3c03=_0x1223eb;_0x44acac[_0x1f3c03(0x1c5)]=_0x433080,_0x1989a8();},'setExtra':_0x2467af=>{const _0x2600d7=_0x1223eb;_0x44acac[_0x2600d7(0x1b8)]=_0x2467af,_0x1989a8();}};_0x1989a8();try{const _0x41e860=await _0x5f5b82(_0x1992cf),_0x1fe06a=_0x58b08b()-_0x438fa8;return{'data':_0x41e860,'elapsedMs':_0x1fe06a};}finally{clearInterval(_0x916c9c),_0x3b348e[_0x1223eb(0x1c1)]();}}function a113_0x1e24(){const _0x339599=['1572541ZTdZix','180VZkpTu','77778cotPAd','toFixed','now','945414gHWCyJ','8DGLcov','stop','1661ygxMmd','intervalFactory','100BGKPwV','jobId','phase','start','floor','7004184BUUskz','stdout','...','83796DOAhUJ','5582927yaNdbU','3KyneKc','clock','isSpinning','extra','2102896DfizcP'];a113_0x1e24=function(){return _0x339599;};return a113_0x1e24();}export function formatElapsed(_0x315887){const _0x1aea2f=a113_0x2d8f,_0x53395e=Math[_0x1aea2f(0x1c8)](_0x315887/0x3e8);if(_0x53395e<0x3c)return(_0x315887/0x3e8)[_0x1aea2f(0x1bd)](0x1)+'s';const _0x405123=Math[_0x1aea2f(0x1c8)](_0x53395e/0x3c),_0x43f6d4=_0x53395e%0x3c;if(_0x405123<0x3c)return _0x405123+'m\x20'+_0x43f6d4+'s';const _0x589291=Math[_0x1aea2f(0x1c8)](_0x405123/0x3c),_0x340048=_0x405123%0x3c;return _0x589291+'h\x20'+_0x340048+'m';}
1
+ (function(_0x5b1967,_0x3f25fe){const _0x419996=a113_0x472f,_0x194dc2=_0x5b1967();while(!![]){try{const _0x49e8c0=-parseInt(_0x419996(0x1e4))/0x1*(-parseInt(_0x419996(0x1d8))/0x2)+-parseInt(_0x419996(0x1e3))/0x3*(-parseInt(_0x419996(0x1cf))/0x4)+parseInt(_0x419996(0x1dd))/0x5+-parseInt(_0x419996(0x1d9))/0x6+-parseInt(_0x419996(0x1d7))/0x7+-parseInt(_0x419996(0x1e5))/0x8+parseInt(_0x419996(0x1de))/0x9*(parseInt(_0x419996(0x1d6))/0xa);if(_0x49e8c0===_0x3f25fe)break;else _0x194dc2['push'](_0x194dc2['shift']());}catch(_0x3a16f1){_0x194dc2['push'](_0x194dc2['shift']());}}}(a113_0x4144,0x406ca));function a113_0x4144(){const _0x172e9b=['257166hEhZxx','13758lpjwYS','1939536ECRdan','extra','stdout','isTTY','2152600erUJZL','80199NpkWFM','\x20[Job\x20ID:\x20','clock','...','phase','138fHiJpy','27eWTLMH','2783504viqLWX','jobId','now','stop','27044vEOzkM','toFixed','floor','cyan','start','replace','text','50CAOGax'];a113_0x4144=function(){return _0x172e9b;};return a113_0x4144();}function a113_0x472f(_0x5d8aff,_0x168bfb){_0x5d8aff=_0x5d8aff-0x1ce;const _0x4144f8=a113_0x4144();let _0x472fcf=_0x4144f8[_0x5d8aff];return _0x472fcf;}import a113_0x287ffa from'ora';export function createCommandSpinner(_0x4b8778,_0x2b8d33={}){const _0x1af7cc=a113_0x472f,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x2b8d33;return a113_0x287ffa({'text':_0x4b8778,'color':_0x1af7cc(0x1d2),'isEnabled':forceEnabled||process[_0x1af7cc(0x1db)][_0x1af7cc(0x1dc)]&&!verbose});}export async function withSpinner(_0x1517fb,_0x2136c9,_0x5e7c2c={}){const _0x4c4e4a=a113_0x472f,_0x1b6487=_0x5e7c2c[_0x4c4e4a(0x1e0)]??(()=>Date[_0x4c4e4a(0x1e7)]()),_0x4feb37=createCommandSpinner(_0x1517fb,_0x5e7c2c);_0x4feb37[_0x4c4e4a(0x1d3)]();const _0x120c27=_0x1b6487();try{const _0xf6f881=await _0x2136c9(),_0x3fa3da=_0x1b6487()-_0x120c27;return _0x4feb37['stop'](),{'data':_0xf6f881,'elapsedMs':_0x3fa3da};}catch(_0x21de4f){_0x4feb37[_0x4c4e4a(0x1ce)]();throw _0x21de4f;}}export async function withQuerySpinner(_0x10ec8f,_0x52588c,_0x1a7484={}){const _0x1577c7=a113_0x472f,_0x22a3c5=_0x1a7484[_0x1577c7(0x1e0)]??(()=>Date['now']()),_0x12edae=_0x1a7484['intervalFactory']??setInterval,_0x2ce560=createCommandSpinner(_0x10ec8f,_0x1a7484);_0x2ce560[_0x1577c7(0x1d3)]();const _0x782075=_0x22a3c5(),_0x5cafe2=_0x10ec8f[_0x1577c7(0x1d4)](_0x1577c7(0x1e1),''),_0x577b9b={},_0x1bcdc4=()=>{const _0x1c0585=_0x1577c7;if(!_0x2ce560['isSpinning'])return;const _0x288647=_0x22a3c5()-_0x782075,_0x419b9b=formatElapsed(_0x288647),_0x4dbc76=_0x577b9b[_0x1c0585(0x1e2)]??_0x5cafe2,_0x3266bf=_0x577b9b[_0x1c0585(0x1e6)]?_0x1c0585(0x1df)+_0x577b9b[_0x1c0585(0x1e6)]+']':'',_0x4471cf=_0x577b9b[_0x1c0585(0x1da)]?'\x20'+_0x577b9b[_0x1c0585(0x1da)]:'';_0x2ce560[_0x1c0585(0x1d5)]=_0x4dbc76+'\x20'+_0x419b9b+_0x4471cf+_0x3266bf;},_0x54da68=_0x12edae(()=>{_0x1bcdc4();},0x3e8),_0x15b6e5={'setPhase':_0x19f920=>{_0x577b9b['phase']=_0x19f920,_0x1bcdc4();},'setJobId':_0x41c9d5=>{const _0x2b3d5b=_0x1577c7;_0x577b9b[_0x2b3d5b(0x1e6)]=_0x41c9d5,_0x1bcdc4();},'setExtra':_0x20d008=>{const _0x597fbe=_0x1577c7;_0x577b9b[_0x597fbe(0x1da)]=_0x20d008,_0x1bcdc4();}};_0x1bcdc4();try{const _0x1a08b4=await _0x52588c(_0x15b6e5),_0x1e2d61=_0x22a3c5()-_0x782075;return{'data':_0x1a08b4,'elapsedMs':_0x1e2d61};}finally{clearInterval(_0x54da68),_0x2ce560[_0x1577c7(0x1ce)]();}}export function formatElapsed(_0x3bbad2){const _0x1e1b41=a113_0x472f,_0x49f32a=Math[_0x1e1b41(0x1d1)](_0x3bbad2/0x3e8);if(_0x49f32a<0x3c)return(_0x3bbad2/0x3e8)[_0x1e1b41(0x1d0)](0x1)+'s';const _0x46ae63=Math['floor'](_0x49f32a/0x3c),_0x40924d=_0x49f32a%0x3c;if(_0x46ae63<0x3c)return _0x46ae63+'m\x20'+_0x40924d+'s';const _0x2759d0=Math[_0x1e1b41(0x1d1)](_0x46ae63/0x3c),_0x2285c1=_0x46ae63%0x3c;return _0x2759d0+'h\x20'+_0x2285c1+'m';}
@@ -1 +1 @@
1
- (function(_0x880061,_0x5c8e43){const _0x1250d3=a114_0x3b12,_0x3e881c=_0x880061();while(!![]){try{const _0x524906=-parseInt(_0x1250d3(0x151))/0x1*(-parseInt(_0x1250d3(0x154))/0x2)+-parseInt(_0x1250d3(0x156))/0x3+parseInt(_0x1250d3(0x165))/0x4*(-parseInt(_0x1250d3(0x14a))/0x5)+-parseInt(_0x1250d3(0x164))/0x6+-parseInt(_0x1250d3(0x161))/0x7+-parseInt(_0x1250d3(0x163))/0x8*(-parseInt(_0x1250d3(0x167))/0x9)+-parseInt(_0x1250d3(0x15e))/0xa*(-parseInt(_0x1250d3(0x155))/0xb);if(_0x524906===_0x5c8e43)break;else _0x3e881c['push'](_0x3e881c['shift']());}catch(_0x5e733b){_0x3e881c['push'](_0x3e881c['shift']());}}}(a114_0x1537,0x8f331));function a114_0x1537(){const _0x2eff98=['toLowerCase','408185WeEyBe','close','\x27:\x20','filter','replace','line','File\x20\x27','271cvfEyc','trim','Error\x20reading\x20from\x20stdin:\x20','8396NiiUkP','44jqMCcE','985008daikRS','code','map','stdin','isTTY','length','ENOENT','Error\x20reading\x20file\x20\x27','2169430bkHDjN','\x27\x20not\x20found','message','6427288sKuohv','stdin\x20','171776yKCKmW','1059696zLHmvO','4jzUftR','test','36LAGvlH','Content\x20contains\x20no\x20SQL\x20statements','join','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','EACCES','push'];a114_0x1537=function(){return _0x2eff98;};return a114_0x1537();}import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x5632a3){const _0x1a8485=a114_0x3b12;let _0x1f7f35=_0x5632a3['replace'](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x1f7f35=_0x1f7f35[_0x1a8485(0x14e)](/--.*$/gm,''),_0x1f7f35[_0x1a8485(0x152)]();}function a114_0x3b12(_0x40f5a9,_0x52e01f){_0x40f5a9=_0x40f5a9-0x147;const _0x15371c=a114_0x1537();let _0x3b124f=_0x15371c[_0x40f5a9];return _0x3b124f;}function isEscaped(_0x195642,_0x2999ef){let _0x215033=0x0;for(let _0x26280b=_0x2999ef-0x1;_0x26280b>=0x0&&_0x195642[_0x26280b]==='\x5c';_0x26280b--){_0x215033++;}return _0x215033%0x2===0x1;}export function splitSqlStatements(_0x272b27){const _0x40a08f=a114_0x3b12,_0x2fd3e3=stripSqlComments(_0x272b27);if(!_0x2fd3e3)throw new Error(_0x40a08f(0x168));const _0x4a3851=[];let _0x5cd149='',_0x1f7fd5=![],_0x96a312=![],_0x496dc8=![];for(let _0x332457=0x0;_0x332457<_0x272b27[_0x40a08f(0x15b)];_0x332457++){const _0x584256=_0x272b27[_0x332457];if(_0x584256==='\x27'&&!isEscaped(_0x272b27,_0x332457)&&!_0x96a312&&!_0x496dc8)_0x1f7fd5=!_0x1f7fd5;else{if(_0x584256==='\x22'&&!isEscaped(_0x272b27,_0x332457)&&!_0x1f7fd5&&!_0x496dc8)_0x96a312=!_0x96a312;else _0x584256==='`'&&!isEscaped(_0x272b27,_0x332457)&&!_0x1f7fd5&&!_0x96a312&&(_0x496dc8=!_0x496dc8);}if(_0x584256===';'&&!_0x1f7fd5&&!_0x96a312&&!_0x496dc8){const _0x4ea9a7=_0x5cd149[_0x40a08f(0x152)]();_0x4ea9a7&&_0x4a3851[_0x40a08f(0x148)](_0x4ea9a7),_0x5cd149='';}else _0x5cd149+=_0x584256;}const _0x1eca63=_0x5cd149['trim']();_0x1eca63&&_0x4a3851['push'](_0x1eca63);const _0x5b024f=_0x4a3851[_0x40a08f(0x158)](_0x4af045=>_0x4af045[_0x40a08f(0x152)]())[_0x40a08f(0x14d)](_0x111fc4=>{const _0x51e6cf=_0x40a08f,_0x5a0618=stripSqlComments(_0x111fc4);return _0x5a0618[_0x51e6cf(0x15b)]>0x0;});if(_0x5b024f['length']===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x5b024f;}export function readFileContent(_0x47b05e){const _0xa24f53=a114_0x3b12;try{return readFileSync(_0x47b05e,'utf-8');}catch(_0x66494b){const _0x2cb251=_0x66494b[_0xa24f53(0x157)];if(_0x2cb251===_0xa24f53(0x15c))throw new Error(_0xa24f53(0x150)+_0x47b05e+_0xa24f53(0x15f));else{if(_0x2cb251===_0xa24f53(0x147))throw new Error('Permission\x20denied\x20reading\x20file\x20\x27'+_0x47b05e+'\x27');else throw new Error(_0xa24f53(0x15d)+_0x47b05e+_0xa24f53(0x14c)+_0x66494b[_0xa24f53(0x160)]);}}}export function readSqlStatementsFromFile(_0x373728){const _0x2b4493=a114_0x3b12,_0xa3b2fa=readFileContent(_0x373728);try{return splitSqlStatements(_0xa3b2fa);}catch(_0xb21c9b){throw new Error('File\x20\x27'+_0x373728+'\x27\x20'+_0xb21c9b[_0x2b4493(0x160)][_0x2b4493(0x149)]());}}export async function readStdinContent(){const _0x28e2e9=a114_0x3b12;if(process[_0x28e2e9(0x159)][_0x28e2e9(0x15a)])throw new Error(_0x28e2e9(0x16a));return new Promise((_0x2558de,_0x516ffd)=>{const _0x375bb4=_0x28e2e9,_0x28b591=[],_0xb48b94=createInterface({'input':process[_0x375bb4(0x159)],'terminal':![]});_0xb48b94['on'](_0x375bb4(0x14f),_0x3b4b02=>{const _0x5e25e5=_0x375bb4;_0x28b591[_0x5e25e5(0x148)](_0x3b4b02);}),_0xb48b94['on'](_0x375bb4(0x14b),()=>{const _0x53a7c1=_0x375bb4;_0x2558de(_0x28b591[_0x53a7c1(0x169)]('\x0a'));}),_0xb48b94['on']('error',_0x3c3fb0=>{const _0x3dbe88=_0x375bb4;_0xb48b94[_0x3dbe88(0x14b)](),_0x516ffd(new Error(_0x3dbe88(0x153)+_0x3c3fb0[_0x3dbe88(0x160)]));});});}export async function readSqlStatementsFromStdin(){const _0x2accaf=a114_0x3b12,_0x4e9012=await readStdinContent();try{return splitSqlStatements(_0x4e9012);}catch(_0x40b0bb){throw new Error(_0x2accaf(0x162)+_0x40b0bb[_0x2accaf(0x160)][_0x2accaf(0x149)]());}}export function isSqlFilePath(_0x31a7d8){const _0x8c8674=a114_0x3b12;return/\w\.sql$/[_0x8c8674(0x166)](_0x31a7d8);}
1
+ function a114_0x259c(_0x5ad8c9,_0x3ecbd1){_0x5ad8c9=_0x5ad8c9-0xe5;const _0x11e475=a114_0x11e4();let _0x259ccf=_0x11e475[_0x5ad8c9];return _0x259ccf;}(function(_0x50c4c4,_0x242aec){const _0x4c7d41=a114_0x259c,_0x428eaf=_0x50c4c4();while(!![]){try{const _0x4f24e7=-parseInt(_0x4c7d41(0xfb))/0x1+parseInt(_0x4c7d41(0xe7))/0x2*(-parseInt(_0x4c7d41(0xf5))/0x3)+-parseInt(_0x4c7d41(0x101))/0x4*(parseInt(_0x4c7d41(0xeb))/0x5)+parseInt(_0x4c7d41(0xf6))/0x6*(parseInt(_0x4c7d41(0xe8))/0x7)+-parseInt(_0x4c7d41(0xf2))/0x8+-parseInt(_0x4c7d41(0xfe))/0x9*(parseInt(_0x4c7d41(0x104))/0xa)+-parseInt(_0x4c7d41(0xf8))/0xb*(-parseInt(_0x4c7d41(0xef))/0xc);if(_0x4f24e7===_0x242aec)break;else _0x428eaf['push'](_0x428eaf['shift']());}catch(_0x1dd28b){_0x428eaf['push'](_0x428eaf['shift']());}}}(a114_0x11e4,0x2ac61));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x2e1e19){const _0x21ae62=a114_0x259c;let _0x35b788=_0x2e1e19[_0x21ae62(0xfd)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x35b788=_0x35b788[_0x21ae62(0xfd)](/--.*$/gm,''),_0x35b788[_0x21ae62(0xed)]();}function isEscaped(_0x1086ac,_0x526fc1){let _0x162f53=0x0;for(let _0x3d84b8=_0x526fc1-0x1;_0x3d84b8>=0x0&&_0x1086ac[_0x3d84b8]==='\x5c';_0x3d84b8--){_0x162f53++;}return _0x162f53%0x2===0x1;}function a114_0x11e4(){const _0x2f2fab=['1315iYoTHQ','utf-8','trim','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','14799516xTdZNN','Permission\x20denied\x20reading\x20file\x20\x27','File\x20\x27','1578064DCsOkK','message','join','960669SbwhjL','2466eYfmtM','length','11PDWKHu','close','isTTY','345065mhIIzV','push','replace','27xGNLtD','test','toLowerCase','1932RuRGjc','Error\x20reading\x20from\x20stdin:\x20','Content\x20contains\x20no\x20SQL\x20statements','709260SQSygQ','Error\x20reading\x20file\x20\x27','line','stdin\x20','2VGfdDD','2457tCZbZP','filter','\x27\x20not\x20found'];a114_0x11e4=function(){return _0x2f2fab;};return a114_0x11e4();}export function splitSqlStatements(_0x59f7f6){const _0x40e181=a114_0x259c,_0x3bf075=stripSqlComments(_0x59f7f6);if(!_0x3bf075)throw new Error(_0x40e181(0x103));const _0x560c15=[];let _0x39d641='',_0x3863b0=![],_0x233eb6=![],_0x31a744=![];for(let _0x4d58ef=0x0;_0x4d58ef<_0x59f7f6[_0x40e181(0xf7)];_0x4d58ef++){const _0x3a5c64=_0x59f7f6[_0x4d58ef];if(_0x3a5c64==='\x27'&&!isEscaped(_0x59f7f6,_0x4d58ef)&&!_0x233eb6&&!_0x31a744)_0x3863b0=!_0x3863b0;else{if(_0x3a5c64==='\x22'&&!isEscaped(_0x59f7f6,_0x4d58ef)&&!_0x3863b0&&!_0x31a744)_0x233eb6=!_0x233eb6;else _0x3a5c64==='`'&&!isEscaped(_0x59f7f6,_0x4d58ef)&&!_0x3863b0&&!_0x233eb6&&(_0x31a744=!_0x31a744);}if(_0x3a5c64===';'&&!_0x3863b0&&!_0x233eb6&&!_0x31a744){const _0x74053f=_0x39d641[_0x40e181(0xed)]();_0x74053f&&_0x560c15['push'](_0x74053f),_0x39d641='';}else _0x39d641+=_0x3a5c64;}const _0x4ebcbd=_0x39d641['trim']();_0x4ebcbd&&_0x560c15[_0x40e181(0xfc)](_0x4ebcbd);const _0x5b5ec0=_0x560c15['map'](_0x270e6c=>_0x270e6c[_0x40e181(0xed)]())[_0x40e181(0xe9)](_0x2af461=>{const _0xab20b3=_0x40e181,_0x1856be=stripSqlComments(_0x2af461);return _0x1856be[_0xab20b3(0xf7)]>0x0;});if(_0x5b5ec0[_0x40e181(0xf7)]===0x0)throw new Error(_0x40e181(0x103));return _0x5b5ec0;}export function readFileContent(_0x4ee16a){const _0x19c160=a114_0x259c;try{return readFileSync(_0x4ee16a,_0x19c160(0xec));}catch(_0x22f8f2){const _0x41bd70=_0x22f8f2['code'];if(_0x41bd70==='ENOENT')throw new Error(_0x19c160(0xf1)+_0x4ee16a+_0x19c160(0xea));else{if(_0x41bd70==='EACCES')throw new Error(_0x19c160(0xf0)+_0x4ee16a+'\x27');else throw new Error(_0x19c160(0x105)+_0x4ee16a+'\x27:\x20'+_0x22f8f2[_0x19c160(0xf3)]);}}}export function readSqlStatementsFromFile(_0x2dfea0){const _0x26958a=a114_0x259c,_0x346480=readFileContent(_0x2dfea0);try{return splitSqlStatements(_0x346480);}catch(_0x48ee76){throw new Error(_0x26958a(0xf1)+_0x2dfea0+'\x27\x20'+_0x48ee76[_0x26958a(0xf3)][_0x26958a(0x100)]());}}export async function readStdinContent(){const _0x2b6df9=a114_0x259c;if(process['stdin'][_0x2b6df9(0xfa)])throw new Error(_0x2b6df9(0xee));return new Promise((_0x5598c9,_0x5385a2)=>{const _0x1bd02c=_0x2b6df9,_0x123686=[],_0x15bf3e=createInterface({'input':process['stdin'],'terminal':![]});_0x15bf3e['on'](_0x1bd02c(0xe5),_0x373e16=>{const _0x3779dd=_0x1bd02c;_0x123686[_0x3779dd(0xfc)](_0x373e16);}),_0x15bf3e['on'](_0x1bd02c(0xf9),()=>{const _0x55d9fd=_0x1bd02c;_0x5598c9(_0x123686[_0x55d9fd(0xf4)]('\x0a'));}),_0x15bf3e['on']('error',_0x119eff=>{const _0x1308b2=_0x1bd02c;_0x15bf3e['close'](),_0x5385a2(new Error(_0x1308b2(0x102)+_0x119eff[_0x1308b2(0xf3)]));});});}export async function readSqlStatementsFromStdin(){const _0x2f160f=a114_0x259c,_0x4ff6b1=await readStdinContent();try{return splitSqlStatements(_0x4ff6b1);}catch(_0x476890){throw new Error(_0x2f160f(0xe6)+_0x476890[_0x2f160f(0xf3)]['toLowerCase']());}}export function isSqlFilePath(_0x2f0d04){const _0x17abd4=a114_0x259c;return/\w\.sql$/[_0x17abd4(0xff)](_0x2f0d04);}
@@ -1 +1 @@
1
- function a115_0x29f5(){const _0x3e3019=['10945396rrvjdI','99QwzYcO','541wPMGBB','event','body','parse','indexOf','4460214pucgig','slice','debug','read','4714NyDERw','Response\x20body\x20is\x20null','data','94340gFkCLr','[LLM\x20API\x20SSE]\x20','decode','getReader','5467645NHwOkb','split','1549976ilFbwU','startsWith','4oLdXYa','3665070YMjIpf'];a115_0x29f5=function(){return _0x3e3019;};return a115_0x29f5();}(function(_0x4cd8df,_0x44c51d){const _0xf0d77e=a115_0x39fb,_0x3b4986=_0x4cd8df();while(!![]){try{const _0x21ed47=parseInt(_0xf0d77e(0x1df))/0x1*(parseInt(_0xf0d77e(0x1e8))/0x2)+-parseInt(_0xf0d77e(0x1e4))/0x3+parseInt(_0xf0d77e(0x1db))/0x4*(-parseInt(_0xf0d77e(0x1d7))/0x5)+parseInt(_0xf0d77e(0x1dc))/0x6+parseInt(_0xf0d77e(0x1dd))/0x7+parseInt(_0xf0d77e(0x1d9))/0x8+parseInt(_0xf0d77e(0x1de))/0x9*(-parseInt(_0xf0d77e(0x1eb))/0xa);if(_0x21ed47===_0x44c51d)break;else _0x3b4986['push'](_0x3b4986['shift']());}catch(_0x7048ad){_0x3b4986['push'](_0x3b4986['shift']());}}}(a115_0x29f5,0xea354));export async function*parseSSEStream(_0x3837ea,_0x5493ef){const _0x1d2acd=a115_0x39fb;if(!_0x3837ea[_0x1d2acd(0x1e1)])throw new Error(_0x1d2acd(0x1e9));const _0x46dfb7=_0x3837ea[_0x1d2acd(0x1e1)][_0x1d2acd(0x1d6)](),_0x1e3628=new TextDecoder();let _0x130dd1='',_0x413de3={};try{while(!![]){const {done:_0x339aa0,value:_0x377b01}=await _0x46dfb7[_0x1d2acd(0x1e7)]();if(_0x339aa0){if(_0x413de3[_0x1d2acd(0x1ea)]){_0x5493ef?.[_0x1d2acd(0x1e6)]('[LLM\x20API\x20SSE]\x20'+_0x413de3[_0x1d2acd(0x1ea)]);const _0x2022ce=parseSSEData(_0x413de3[_0x1d2acd(0x1ea)]);yield _0x2022ce;}break;}_0x130dd1+=_0x1e3628[_0x1d2acd(0x1d5)](_0x377b01,{'stream':!![]});const _0x443fda=_0x130dd1[_0x1d2acd(0x1d8)]('\x0a');_0x130dd1=_0x443fda['pop']()||'';for(const _0x22c328 of _0x443fda){if(_0x22c328['trim']()===''){if(_0x413de3[_0x1d2acd(0x1ea)]){_0x5493ef?.[_0x1d2acd(0x1e6)](_0x1d2acd(0x1ec)+_0x413de3[_0x1d2acd(0x1ea)]);const _0x1acbd7=parseSSEData(_0x413de3[_0x1d2acd(0x1ea)]);yield _0x1acbd7,_0x413de3={};}continue;}if(_0x22c328['startsWith'](':'))continue;const _0x4f648a=_0x22c328[_0x1d2acd(0x1e3)](':');if(_0x4f648a===-0x1)continue;const _0xb885b0=_0x22c328[_0x1d2acd(0x1e5)](0x0,_0x4f648a);let _0x445013=_0x22c328[_0x1d2acd(0x1e5)](_0x4f648a+0x1);_0x445013[_0x1d2acd(0x1da)]('\x20')&&(_0x445013=_0x445013[_0x1d2acd(0x1e5)](0x1));switch(_0xb885b0){case _0x1d2acd(0x1e0):_0x413de3[_0x1d2acd(0x1e0)]=_0x445013;break;case _0x1d2acd(0x1ea):_0x413de3[_0x1d2acd(0x1ea)]=_0x413de3[_0x1d2acd(0x1ea)]?_0x413de3[_0x1d2acd(0x1ea)]+'\x0a'+_0x445013:_0x445013;break;case'id':_0x413de3['id']=_0x445013;break;}}}}finally{_0x46dfb7['releaseLock']();}}function a115_0x39fb(_0x30f461,_0x4fc7c2){_0x30f461=_0x30f461-0x1d5;const _0x29f5b2=a115_0x29f5();let _0x39fb7f=_0x29f5b2[_0x30f461];return _0x39fb7f;}function parseSSEData(_0x244cea){const _0x304254=a115_0x39fb;try{return JSON[_0x304254(0x1e2)](_0x244cea);}catch(_0x1c037c){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x244cea,{'cause':_0x1c037c});}}
1
+ function a115_0x1de6(_0x3c33bf,_0x1467b8){_0x3c33bf=_0x3c33bf-0xde;const _0x570e25=a115_0x570e();let _0x1de66d=_0x570e25[_0x3c33bf];return _0x1de66d;}(function(_0x1c2eba,_0x311c76){const _0x393d53=a115_0x1de6,_0x12874b=_0x1c2eba();while(!![]){try{const _0xba0a91=-parseInt(_0x393d53(0xec))/0x1+-parseInt(_0x393d53(0xf0))/0x2+-parseInt(_0x393d53(0xf4))/0x3*(parseInt(_0x393d53(0xf2))/0x4)+-parseInt(_0x393d53(0xf5))/0x5*(parseInt(_0x393d53(0xf6))/0x6)+parseInt(_0x393d53(0xe2))/0x7+parseInt(_0x393d53(0xe4))/0x8*(parseInt(_0x393d53(0xe0))/0x9)+parseInt(_0x393d53(0xe8))/0xa;if(_0xba0a91===_0x311c76)break;else _0x12874b['push'](_0x12874b['shift']());}catch(_0x3efeb4){_0x12874b['push'](_0x12874b['shift']());}}}(a115_0x570e,0x2c934));export async function*parseSSEStream(_0x5d3092,_0x802332){const _0x483610=a115_0x1de6;if(!_0x5d3092[_0x483610(0xde)])throw new Error('Response\x20body\x20is\x20null');const _0x5b727c=_0x5d3092['body'][_0x483610(0xed)](),_0x474809=new TextDecoder();let _0x481d43='',_0x563ec4={};try{while(!![]){const {done:_0x93bf70,value:_0x1d2095}=await _0x5b727c[_0x483610(0xe1)]();if(_0x93bf70){if(_0x563ec4['data']){_0x802332?.[_0x483610(0xf7)](_0x483610(0xe7)+_0x563ec4[_0x483610(0xeb)]);const _0x239499=parseSSEData(_0x563ec4[_0x483610(0xeb)]);yield _0x239499;}break;}_0x481d43+=_0x474809[_0x483610(0xe5)](_0x1d2095,{'stream':!![]});const _0x4c9cac=_0x481d43[_0x483610(0xea)]('\x0a');_0x481d43=_0x4c9cac[_0x483610(0xdf)]()||'';for(const _0x80fe28 of _0x4c9cac){if(_0x80fe28[_0x483610(0xf1)]()===''){if(_0x563ec4[_0x483610(0xeb)]){_0x802332?.[_0x483610(0xf7)](_0x483610(0xe7)+_0x563ec4['data']);const _0xff1cd2=parseSSEData(_0x563ec4[_0x483610(0xeb)]);yield _0xff1cd2,_0x563ec4={};}continue;}if(_0x80fe28[_0x483610(0xef)](':'))continue;const _0x4f61d4=_0x80fe28[_0x483610(0xee)](':');if(_0x4f61d4===-0x1)continue;const _0x3b067a=_0x80fe28[_0x483610(0xe9)](0x0,_0x4f61d4);let _0x24f929=_0x80fe28[_0x483610(0xe9)](_0x4f61d4+0x1);_0x24f929[_0x483610(0xef)]('\x20')&&(_0x24f929=_0x24f929['slice'](0x1));switch(_0x3b067a){case _0x483610(0xe3):_0x563ec4[_0x483610(0xe3)]=_0x24f929;break;case'data':_0x563ec4['data']=_0x563ec4[_0x483610(0xeb)]?_0x563ec4[_0x483610(0xeb)]+'\x0a'+_0x24f929:_0x24f929;break;case'id':_0x563ec4['id']=_0x24f929;break;}}}}finally{_0x5b727c['releaseLock']();}}function a115_0x570e(){const _0x54bb43=['getReader','indexOf','startsWith','477544TMtStt','trim','12892TJEIgD','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','297rUDStC','15FkqkIX','286734ssrDGb','debug','body','pop','18otEUJc','read','722260RyqhAT','event','1278104tJvFdw','decode','parse','[LLM\x20API\x20SSE]\x20','4992640zYffgO','slice','split','data','38174HSfzZy'];a115_0x570e=function(){return _0x54bb43;};return a115_0x570e();}function parseSSEData(_0x3a8d00){const _0x28ed0e=a115_0x1de6;try{return JSON[_0x28ed0e(0xe6)](_0x3a8d00);}catch(_0x339245){throw new Error(_0x28ed0e(0xf3)+_0x3a8d00,{'cause':_0x339245});}}
@@ -1 +1 @@
1
- (function(_0x66d8f2,_0x58bce4){const _0x35b125=a116_0x45fa,_0x964aac=_0x66d8f2();while(!![]){try{const _0x1638b6=-parseInt(_0x35b125(0x6d))/0x1+-parseInt(_0x35b125(0x78))/0x2+-parseInt(_0x35b125(0x82))/0x3*(parseInt(_0x35b125(0x7f))/0x4)+parseInt(_0x35b125(0x74))/0x5*(-parseInt(_0x35b125(0x77))/0x6)+-parseInt(_0x35b125(0x6b))/0x7*(-parseInt(_0x35b125(0x72))/0x8)+parseInt(_0x35b125(0x70))/0x9+-parseInt(_0x35b125(0x7e))/0xa*(-parseInt(_0x35b125(0x7d))/0xb);if(_0x1638b6===_0x58bce4)break;else _0x964aac['push'](_0x964aac['shift']());}catch(_0x543d9c){_0x964aac['push'](_0x964aac['shift']());}}}(a116_0x493a,0x78bbf));import a116_0x1da8f5 from'string-width';export function stringWidth(_0x4fe3b3){return a116_0x1da8f5(_0x4fe3b3);}export function padEnd(_0xbc2248,_0x327bef){const _0x47ba9f=a116_0x45fa,_0x211c42=stringWidth(_0xbc2248);if(_0x211c42>=_0x327bef)return _0xbc2248;return _0xbc2248+'\x20'[_0x47ba9f(0x69)](_0x327bef-_0x211c42);}export function padStart(_0x19daad,_0x18b7c8){const _0x107c53=a116_0x45fa,_0x43b5cb=stringWidth(_0x19daad);if(_0x43b5cb>=_0x18b7c8)return _0x19daad;return'\x20'[_0x107c53(0x69)](_0x18b7c8-_0x43b5cb)+_0x19daad;}export function centerAlign(_0x44d7c1,_0x21153b){const _0x40ef87=a116_0x45fa,_0x117a16=stringWidth(_0x44d7c1);if(_0x117a16>_0x21153b){if(_0x21153b<=0x1)return'…'[_0x40ef87(0x7a)](0x0,_0x21153b);let _0x1905e3=_0x44d7c1;while(stringWidth(_0x1905e3+'…')>_0x21153b){_0x1905e3=_0x1905e3[_0x40ef87(0x81)](0x0,-0x1);}return _0x1905e3+'…';}if(_0x117a16===_0x21153b)return _0x44d7c1;const _0x13c3ba=_0x21153b-_0x117a16,_0x61d9d4=Math[_0x40ef87(0x6e)](_0x13c3ba/0x2),_0x36cf28=_0x13c3ba-_0x61d9d4;return'\x20'['repeat'](_0x61d9d4)+_0x44d7c1+'\x20'['repeat'](_0x36cf28);}export function escapeStringLiteral(_0x1706d0){const _0xae19d=a116_0x45fa;if(!_0x1706d0||_0x1706d0[_0xae19d(0x7c)]()['length']===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x480a7b=_0x1706d0[_0xae19d(0x6f)](/'/g,'\x27\x27');return'\x27'+_0x480a7b+'\x27';}export function globToLike(_0x3164ab){const _0x4e49da=a116_0x45fa;let _0x2e3e7e=_0x3164ab[_0x4e49da(0x6f)](/\\/g,'\x5c\x5c')[_0x4e49da(0x6f)](/%/g,'\x5c%')[_0x4e49da(0x6f)](/_/g,'\x5c_');return _0x2e3e7e=_0x2e3e7e[_0x4e49da(0x6f)](/\*/g,'%')['replace'](/\?/g,'_'),_0x2e3e7e;}export function buildLikePattern(_0xbb6a36){const _0x2e595d=a116_0x45fa;if(!_0xbb6a36||_0xbb6a36['trim']()[_0x2e595d(0x79)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x28988d=globToLike(_0xbb6a36),_0x5bc405=_0x28988d[_0x2e595d(0x6f)](/'/g,'\x27\x27');return'\x27'+_0x5bc405+'\x27';}function a116_0x493a(){const _0xb22c75=['\x5c$&','365401kisuqh','floor','replace','8775720NbCSjV','random','10888TouJgh','padStart','5uacmJP','unknown','env','4986222BOadnr','1046842EQVweP','length','substring','USERNAME','trim','1309xriDno','95560sfzzhH','8eHHMVz','USER','slice','785877EWLtsQ','test','repeat','toLowerCase','3220wiwBVR'];a116_0x493a=function(){return _0xb22c75;};return a116_0x493a();}export function matchGlobPattern(_0x49f7a5,_0x596c2d){const _0x5a18cf=a116_0x45fa,_0x6c166c=_0x596c2d['replace'](/[.+^${}()|[\]\\]/g,_0x5a18cf(0x6c))[_0x5a18cf(0x6f)](/\*/g,'.*')[_0x5a18cf(0x6f)](/\?/g,'.'),_0x485111=new RegExp('^'+_0x6c166c+'$');return _0x485111[_0x5a18cf(0x83)](_0x49f7a5);}function a116_0x45fa(_0x265aba,_0x488168){_0x265aba=_0x265aba-0x69;const _0x493a78=a116_0x493a();let _0x45fa05=_0x493a78[_0x265aba];return _0x45fa05;}export function getSanitizedUsername(){const _0x3c8228=a116_0x45fa,_0xa4e9c6=process[_0x3c8228(0x76)][_0x3c8228(0x80)]||process[_0x3c8228(0x76)][_0x3c8228(0x7b)]||_0x3c8228(0x75);return _0xa4e9c6[_0x3c8228(0x6f)](/[^a-zA-Z0-9]/g,'')[_0x3c8228(0x6a)]();}export function generateRandomHex(){const _0xf8a38b=a116_0x45fa,_0x7cda0a=Math[_0xf8a38b(0x6e)](Math[_0xf8a38b(0x71)]()*0xfffff);return _0x7cda0a['toString'](0x10)[_0xf8a38b(0x73)](0x5,'0');}export function sanitizeFileName(_0x220bba){const _0x5c22aa=a116_0x45fa;return _0x220bba[_0x5c22aa(0x6a)]()[_0x5c22aa(0x6f)](/[/\\:*?"<>|]/g,'-')[_0x5c22aa(0x6f)](/\s+/g,'-')[_0x5c22aa(0x6f)](/-+/g,'-')[_0x5c22aa(0x6f)](/^-|-$/g,'');}
1
+ (function(_0x5375bd,_0x464479){const _0x59300e=a116_0xf392,_0x3b5299=_0x5375bd();while(!![]){try{const _0x57b1a5=-parseInt(_0x59300e(0x174))/0x1+-parseInt(_0x59300e(0x179))/0x2*(parseInt(_0x59300e(0x16f))/0x3)+parseInt(_0x59300e(0x170))/0x4*(parseInt(_0x59300e(0x16c))/0x5)+-parseInt(_0x59300e(0x17a))/0x6+-parseInt(_0x59300e(0x16b))/0x7+parseInt(_0x59300e(0x168))/0x8+parseInt(_0x59300e(0x161))/0x9;if(_0x57b1a5===_0x464479)break;else _0x3b5299['push'](_0x3b5299['shift']());}catch(_0x145a8d){_0x3b5299['push'](_0x3b5299['shift']());}}}(a116_0x4bfe,0x7a142));import a116_0x36e2ef from'string-width';function a116_0x4bfe(){const _0x44cbb5=['toLowerCase','USER','slice','3388SDTUIn','4285338sYOwNt','unknown','replace','8497980IcRJOc','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','substring','length','\x5c$&','USERNAME','random','3257208VDJDli','padStart','repeat','1138725GeDZjG','603460vpToWp','trim','toString','279rktFKM','12NSwOrC','env','Cannot\x20escape\x20empty\x20string\x20literal','test','178973IzGSum','floor'];a116_0x4bfe=function(){return _0x44cbb5;};return a116_0x4bfe();}export function stringWidth(_0x42ebeb){return a116_0x36e2ef(_0x42ebeb);}export function padEnd(_0x590da9,_0x542a0b){const _0x3571b1=a116_0xf392,_0x37daf5=stringWidth(_0x590da9);if(_0x37daf5>=_0x542a0b)return _0x590da9;return _0x590da9+'\x20'[_0x3571b1(0x16a)](_0x542a0b-_0x37daf5);}export function padStart(_0x4ab289,_0x1c476d){const _0x5edf72=a116_0xf392,_0x549779=stringWidth(_0x4ab289);if(_0x549779>=_0x1c476d)return _0x4ab289;return'\x20'[_0x5edf72(0x16a)](_0x1c476d-_0x549779)+_0x4ab289;}export function centerAlign(_0x3edc4b,_0x2b655c){const _0xf6404e=a116_0xf392,_0xc42c49=stringWidth(_0x3edc4b);if(_0xc42c49>_0x2b655c){if(_0x2b655c<=0x1)return'…'[_0xf6404e(0x163)](0x0,_0x2b655c);let _0x38241f=_0x3edc4b;while(stringWidth(_0x38241f+'…')>_0x2b655c){_0x38241f=_0x38241f[_0xf6404e(0x178)](0x0,-0x1);}return _0x38241f+'…';}if(_0xc42c49===_0x2b655c)return _0x3edc4b;const _0x2e7b37=_0x2b655c-_0xc42c49,_0x5cfe40=Math['floor'](_0x2e7b37/0x2),_0x475f7e=_0x2e7b37-_0x5cfe40;return'\x20'[_0xf6404e(0x16a)](_0x5cfe40)+_0x3edc4b+'\x20'[_0xf6404e(0x16a)](_0x475f7e);}export function escapeStringLiteral(_0x30cfbb){const _0xc1c630=a116_0xf392;if(!_0x30cfbb||_0x30cfbb[_0xc1c630(0x16d)]()[_0xc1c630(0x164)]===0x0)throw new Error(_0xc1c630(0x172));const _0x23f7a4=_0x30cfbb['replace'](/'/g,'\x27\x27');return'\x27'+_0x23f7a4+'\x27';}export function globToLike(_0x5086b7){const _0x72efb4=a116_0xf392;let _0x244b3b=_0x5086b7[_0x72efb4(0x160)](/\\/g,'\x5c\x5c')[_0x72efb4(0x160)](/%/g,'\x5c%')[_0x72efb4(0x160)](/_/g,'\x5c_');return _0x244b3b=_0x244b3b[_0x72efb4(0x160)](/\*/g,'%')[_0x72efb4(0x160)](/\?/g,'_'),_0x244b3b;}export function buildLikePattern(_0x183567){const _0x1a2b91=a116_0xf392;if(!_0x183567||_0x183567[_0x1a2b91(0x16d)]()[_0x1a2b91(0x164)]===0x0)throw new Error(_0x1a2b91(0x162));const _0xa6a984=globToLike(_0x183567),_0x51bd89=_0xa6a984[_0x1a2b91(0x160)](/'/g,'\x27\x27');return'\x27'+_0x51bd89+'\x27';}export function matchGlobPattern(_0x502036,_0x398ab1){const _0x20157a=a116_0xf392,_0x59d41f=_0x398ab1[_0x20157a(0x160)](/[.+^${}()|[\]\\]/g,_0x20157a(0x165))[_0x20157a(0x160)](/\*/g,'.*')[_0x20157a(0x160)](/\?/g,'.'),_0x4954ed=new RegExp('^'+_0x59d41f+'$');return _0x4954ed[_0x20157a(0x173)](_0x502036);}export function getSanitizedUsername(){const _0x4c68ae=a116_0xf392,_0x23da0d=process['env'][_0x4c68ae(0x177)]||process[_0x4c68ae(0x171)][_0x4c68ae(0x166)]||_0x4c68ae(0x15f);return _0x23da0d[_0x4c68ae(0x160)](/[^a-zA-Z0-9]/g,'')[_0x4c68ae(0x176)]();}function a116_0xf392(_0x25868c,_0x4232f4){_0x25868c=_0x25868c-0x15f;const _0x4bfeae=a116_0x4bfe();let _0xf3923=_0x4bfeae[_0x25868c];return _0xf3923;}export function generateRandomHex(){const _0x3d6dcc=a116_0xf392,_0x2a1fb6=Math[_0x3d6dcc(0x175)](Math[_0x3d6dcc(0x167)]()*0xfffff);return _0x2a1fb6[_0x3d6dcc(0x16e)](0x10)[_0x3d6dcc(0x169)](0x5,'0');}export function sanitizeFileName(_0x363c17){const _0x1818b3=a116_0xf392;return _0x363c17[_0x1818b3(0x176)]()[_0x1818b3(0x160)](/[/\\:*?"<>|]/g,'-')[_0x1818b3(0x160)](/\s+/g,'-')[_0x1818b3(0x160)](/-+/g,'-')[_0x1818b3(0x160)](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x5d179a,_0x5a7031){const _0x3f6a8b=a117_0x467c,_0x132bdd=_0x5d179a();while(!![]){try{const _0x4ee91c=-parseInt(_0x3f6a8b(0xfb))/0x1+-parseInt(_0x3f6a8b(0xed))/0x2*(parseInt(_0x3f6a8b(0xf2))/0x3)+parseInt(_0x3f6a8b(0xf1))/0x4+parseInt(_0x3f6a8b(0xef))/0x5+-parseInt(_0x3f6a8b(0xf7))/0x6*(-parseInt(_0x3f6a8b(0xf8))/0x7)+parseInt(_0x3f6a8b(0xf5))/0x8+parseInt(_0x3f6a8b(0x100))/0x9*(-parseInt(_0x3f6a8b(0xf6))/0xa);if(_0x4ee91c===_0x5a7031)break;else _0x132bdd['push'](_0x132bdd['shift']());}catch(_0x3da1c6){_0x132bdd['push'](_0x132bdd['shift']());}}}(a117_0x20b7,0xa35a9));function hasWildcard(_0x7293b8){const _0x52e5d2=a117_0x467c;return _0x7293b8['includes']('*')||_0x7293b8[_0x52e5d2(0xee)]('?');}export function parseTableReference(_0x35737c){const _0x5a2d9b=a117_0x467c;if(!_0x35737c||_0x35737c['trim']()[_0x5a2d9b(0xf0)]===0x0)throw new Error(_0x5a2d9b(0xf4));const _0x811268=_0x35737c[_0x5a2d9b(0xfd)](),_0x3af573={'original':_0x811268},_0xd85407=_0x811268[_0x5a2d9b(0xe9)]('.');if(_0xd85407[_0x5a2d9b(0xf0)]===0x1){const _0x4f2ba7=_0xd85407[0x0];if(!_0x4f2ba7)throw new Error(_0x5a2d9b(0xfa));_0x3af573[_0x5a2d9b(0xff)]=_0x4f2ba7;}else{if(_0xd85407[_0x5a2d9b(0xf0)]===0x2){const [_0xca440a,_0x41a31c]=_0xd85407;if(!_0xca440a)throw new Error(_0x5a2d9b(0xec));if(!_0x41a31c)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x3af573[_0x5a2d9b(0xe8)]=_0xca440a,_0x3af573[_0x5a2d9b(0xff)]=_0x41a31c;}else{if(_0xd85407[_0x5a2d9b(0xf0)]===0x3){const [_0x70bd94,_0x162d8e,_0x268499]=_0xd85407;if(!_0x70bd94||!_0x162d8e||!_0x268499)throw new Error(_0x5a2d9b(0xf3));_0x3af573[_0x5a2d9b(0xfc)]=_0x70bd94,_0x3af573['database']=_0x162d8e,_0x3af573['table']=_0x268499;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x3af573;}export function formatTableReference(_0x656507){const _0x1b1963=a117_0x467c,_0x4bcefa=[];return _0x656507[_0x1b1963(0xfc)]&&_0x4bcefa['push'](_0x656507[_0x1b1963(0xfc)]),_0x656507[_0x1b1963(0xe8)]&&_0x4bcefa[_0x1b1963(0xeb)](_0x656507[_0x1b1963(0xe8)]),_0x656507[_0x1b1963(0xff)]&&_0x4bcefa[_0x1b1963(0xeb)](_0x656507[_0x1b1963(0xff)]),_0x4bcefa['join']('.');}function a117_0x467c(_0x16ce52,_0x354807){_0x16ce52=_0x16ce52-0xe8;const _0x20b791=a117_0x20b7();let _0x467c6f=_0x20b791[_0x16ce52];return _0x467c6f;}export function validateTableListReference(_0x235d5e){return undefined;}function a117_0x20b7(){const _0xbe59f0=['Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','8875352VpYRcK','10mNPsUp','6QVoOjj','2811403fyVXMe','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Pattern\x20cannot\x20be\x20just\x20a\x20dot','1024827EYALTc','catalog','trim','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','table','902574YzZdKd','database','split','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','push','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','32392cICoIO','includes','2783845CJojRI','length','3634804xQVftj','219QlTVJX','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty'];a117_0x20b7=function(){return _0xbe59f0;};return a117_0x20b7();}export function validateTableDescribeReference(_0x133720){const _0x5ed4ae=a117_0x467c;if(!_0x133720[_0x5ed4ae(0xff)])return _0x5ed4ae(0xea);if(_0x133720[_0x5ed4ae(0xe8)]&&hasWildcard(_0x133720[_0x5ed4ae(0xe8)]))return _0x5ed4ae(0xfe);if(hasWildcard(_0x133720['table']))return _0x5ed4ae(0xf9);return undefined;}
1
+ (function(_0x132e81,_0x23b41a){const _0x525958=a117_0x2952,_0x2ee329=_0x132e81();while(!![]){try{const _0x70111e=parseInt(_0x525958(0x8c))/0x1+parseInt(_0x525958(0x8b))/0x2+parseInt(_0x525958(0x8e))/0x3+-parseInt(_0x525958(0x99))/0x4+parseInt(_0x525958(0xa1))/0x5*(-parseInt(_0x525958(0x97))/0x6)+parseInt(_0x525958(0x98))/0x7+parseInt(_0x525958(0x96))/0x8*(parseInt(_0x525958(0x9b))/0x9);if(_0x70111e===_0x23b41a)break;else _0x2ee329['push'](_0x2ee329['shift']());}catch(_0x1403f9){_0x2ee329['push'](_0x2ee329['shift']());}}}(a117_0x236c,0xd3d21));function hasWildcard(_0x103b2c){const _0x15f623=a117_0x2952;return _0x103b2c[_0x15f623(0x9a)]('*')||_0x103b2c['includes']('?');}export function parseTableReference(_0x12c579){const _0x183ea5=a117_0x2952;if(!_0x12c579||_0x12c579['trim']()[_0x183ea5(0x93)]===0x0)throw new Error(_0x183ea5(0x8f));const _0x21c295=_0x12c579[_0x183ea5(0x9f)](),_0x4ebe1c={'original':_0x21c295},_0x1fd3d8=_0x21c295[_0x183ea5(0xa0)]('.');if(_0x1fd3d8[_0x183ea5(0x93)]===0x1){const _0x524955=_0x1fd3d8[0x0];if(!_0x524955)throw new Error(_0x183ea5(0x91));_0x4ebe1c[_0x183ea5(0x92)]=_0x524955;}else{if(_0x1fd3d8[_0x183ea5(0x93)]===0x2){const [_0x59f9a1,_0x1fac53]=_0x1fd3d8;if(!_0x59f9a1)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x1fac53)throw new Error(_0x183ea5(0x94));_0x4ebe1c[_0x183ea5(0x9e)]=_0x59f9a1,_0x4ebe1c[_0x183ea5(0x92)]=_0x1fac53;}else{if(_0x1fd3d8['length']===0x3){const [_0x4b3c6c,_0x1a8c53,_0x337134]=_0x1fd3d8;if(!_0x4b3c6c||!_0x1a8c53||!_0x337134)throw new Error(_0x183ea5(0x9d));_0x4ebe1c[_0x183ea5(0xa2)]=_0x4b3c6c,_0x4ebe1c['database']=_0x1a8c53,_0x4ebe1c[_0x183ea5(0x92)]=_0x337134;}else throw new Error(_0x183ea5(0x90));}}return _0x4ebe1c;}export function formatTableReference(_0x27356b){const _0x4f7a28=a117_0x2952,_0x2be63b=[];return _0x27356b[_0x4f7a28(0xa2)]&&_0x2be63b[_0x4f7a28(0x95)](_0x27356b[_0x4f7a28(0xa2)]),_0x27356b['database']&&_0x2be63b[_0x4f7a28(0x95)](_0x27356b[_0x4f7a28(0x9e)]),_0x27356b[_0x4f7a28(0x92)]&&_0x2be63b['push'](_0x27356b[_0x4f7a28(0x92)]),_0x2be63b['join']('.');}function a117_0x2952(_0x5d9791,_0x3f6e6c){_0x5d9791=_0x5d9791-0x8b;const _0x236cde=a117_0x236c();let _0x2952c5=_0x236cde[_0x5d9791];return _0x2952c5;}function a117_0x236c(){const _0x2dba63=['1270161eWHZrr','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','Pattern\x20cannot\x20be\x20just\x20a\x20dot','table','length','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','push','24uQphXw','18SRxTjV','4293443VKovOd','5194024UIUYdM','includes','1047699sJVZYA','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','database','trim','split','1531775gdXunW','catalog','527382Vileju','1435528sQpuig','Table\x20name\x20is\x20required\x20for\x20describe\x20operation'];a117_0x236c=function(){return _0x2dba63;};return a117_0x236c();}export function validateTableListReference(_0x1ad8d3){return undefined;}export function validateTableDescribeReference(_0x325f8b){const _0xac3d9c=a117_0x2952;if(!_0x325f8b['table'])return _0xac3d9c(0x8d);if(_0x325f8b[_0xac3d9c(0x9e)]&&hasWildcard(_0x325f8b[_0xac3d9c(0x9e)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0x325f8b[_0xac3d9c(0x92)]))return _0xac3d9c(0x9c);return undefined;}
@@ -1 +1 @@
1
- const a118_0x559e9b=a118_0x12bf;function a118_0x3195(){const _0x3b72cb=['5652140eScRcT','dirname','utf-8','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','segments','24QzzmMi','resolve','685123hBTeKb','2246288MxYxqQ','Invalid\x20JSON\x20in\x20','Invalid\x20tdx.json:\x20expected\x20object','2028702HoxqXY','join','297695zjKqdO','replace','678958CzqGXp','parse','6KxkNqF','object','stringify','cwd','root','parent_segment','11174472jdelZd','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','string','4rastnH'];a118_0x3195=function(){return _0x3b72cb;};return a118_0x3195();}(function(_0x327ee5,_0x5d0e8e){const _0x2e0b69=a118_0x12bf,_0x14cf57=_0x327ee5();while(!![]){try{const _0x1f5fa4=parseInt(_0x2e0b69(0x10e))/0x1*(-parseInt(_0x2e0b69(0x121))/0x2)+parseInt(_0x2e0b69(0x112))/0x3+-parseInt(_0x2e0b69(0x10f))/0x4+-parseInt(_0x2e0b69(0x114))/0x5*(parseInt(_0x2e0b69(0x118))/0x6)+parseInt(_0x2e0b69(0x116))/0x7*(parseInt(_0x2e0b69(0x10c))/0x8)+parseInt(_0x2e0b69(0x11e))/0x9+parseInt(_0x2e0b69(0x122))/0xa;if(_0x1f5fa4===_0x5d0e8e)break;else _0x14cf57['push'](_0x14cf57['shift']());}catch(_0x5e2384){_0x14cf57['push'](_0x14cf57['shift']());}}}(a118_0x3195,0xbf159));import{existsSync,readFileSync}from'fs';import a118_0x3ce395 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a118_0x559e9b(0x126);export function findTdxConfigPath(_0x40c38c=process[a118_0x559e9b(0x11b)]()){const _0x53344c=a118_0x559e9b;let _0x4ec54b=a118_0x3ce395['resolve'](_0x40c38c);const _0x2698fc=a118_0x3ce395[_0x53344c(0x117)](_0x4ec54b)[_0x53344c(0x11c)];while(_0x4ec54b!==_0x2698fc){const _0xd48ed1=a118_0x3ce395['join'](_0x4ec54b,TDX_CONFIG_FILE);if(existsSync(_0xd48ed1))return _0xd48ed1;_0x4ec54b=a118_0x3ce395[_0x53344c(0x123)](_0x4ec54b);}return null;}export function loadTdxConfig(_0x5793eb){const _0x384066=a118_0x559e9b,_0x4107e6=readFileSync(_0x5793eb,_0x384066(0x124));let _0x16994f;try{_0x16994f=JSON[_0x384066(0x117)](_0x4107e6);}catch{throw new Error(_0x384066(0x110)+_0x5793eb);}if(!_0x16994f||typeof _0x16994f!==_0x384066(0x119))throw new Error(_0x384066(0x111));const _0xa9ddf6=_0x16994f;if(!_0xa9ddf6[_0x384066(0x11d)]||typeof _0xa9ddf6[_0x384066(0x11d)]!==_0x384066(0x120))throw new Error(_0x384066(0x125));return{'parent_segment':_0xa9ddf6[_0x384066(0x11d)]};}export function findTdxConfig(_0x3d77e6=process['cwd']()){const _0x1f49e0=a118_0x559e9b,_0x2e91bf=findTdxConfigPath(_0x3d77e6);if(!_0x2e91bf)throw new Error(_0x1f49e0(0x11f));const _0x2947a6=loadTdxConfig(_0x2e91bf),_0x231648=a118_0x3ce395[_0x1f49e0(0x123)](_0x2e91bf);return{'config':_0x2947a6,'configPath':_0x2e91bf,'configDir':_0x231648};}export function getSegmentRootDir(_0x1e1c5b,_0x563849=process[a118_0x559e9b(0x11b)]()){const _0x5d6970=a118_0x559e9b;return a118_0x3ce395[_0x5d6970(0x113)](_0x563849,SEGMENTS_DIR,_0x1e1c5b);}export function getTdxConfigPath(_0x507252,_0x5f2185=process[a118_0x559e9b(0x11b)]()){const _0xde421b=a118_0x559e9b;return a118_0x3ce395[_0xde421b(0x113)](getSegmentRootDir(_0x507252,_0x5f2185),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x505aaf,_0x41eef0){const _0xcf254d=a118_0x559e9b,_0x47a681=a118_0x3ce395[_0xcf254d(0x10d)](_0x505aaf),_0x50907d=a118_0x3ce395['relative'](_0x41eef0,_0x47a681);if(_0x50907d['startsWith']('..'))return'';return _0x50907d;}function a118_0x12bf(_0x3e7bd1,_0x262e0a){_0x3e7bd1=_0x3e7bd1-0x10c;const _0x3195c0=a118_0x3195();let _0x12bfb9=_0x3195c0[_0x3e7bd1];return _0x12bfb9;}export function localPathToTdFolderPath(_0x44f4dc){const _0x470ca0=a118_0x559e9b,_0x39f15e=a118_0x3ce395[_0x470ca0(0x123)](_0x44f4dc);if(_0x39f15e==='.'||_0x39f15e==='')return'';return _0x39f15e[_0x470ca0(0x115)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x56d0c9,_0x40ecb4){const _0x4987ee=a118_0x559e9b;if(!_0x56d0c9)return _0x40ecb4;return a118_0x3ce395[_0x4987ee(0x113)](_0x40ecb4,_0x56d0c9);}export function createTdxConfigContent(_0x5bef61){const _0x3430fe=a118_0x559e9b,_0x2e8893={'parent_segment':_0x5bef61};return JSON[_0x3430fe(0x11a)](_0x2e8893,null,0x2)+'\x0a';}
1
+ const a118_0xd32284=a118_0x46ab;(function(_0x3a1eec,_0x42ea5a){const _0x4ae77b=a118_0x46ab,_0x171277=_0x3a1eec();while(!![]){try{const _0x432c27=-parseInt(_0x4ae77b(0x148))/0x1+-parseInt(_0x4ae77b(0x14e))/0x2+-parseInt(_0x4ae77b(0x146))/0x3+parseInt(_0x4ae77b(0x13c))/0x4+-parseInt(_0x4ae77b(0x13b))/0x5+-parseInt(_0x4ae77b(0x149))/0x6*(parseInt(_0x4ae77b(0x13a))/0x7)+parseInt(_0x4ae77b(0x14a))/0x8;if(_0x432c27===_0x42ea5a)break;else _0x171277['push'](_0x171277['shift']());}catch(_0x528fb3){_0x171277['push'](_0x171277['shift']());}}}(a118_0x1073,0x25c62));import{existsSync,readFileSync}from'fs';import a118_0x24ef6e from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x2acdd7=process['cwd']()){const _0x2c07ef=a118_0x46ab;let _0x525a26=a118_0x24ef6e[_0x2c07ef(0x13e)](_0x2acdd7);const _0xf9120e=a118_0x24ef6e[_0x2c07ef(0x13d)](_0x525a26)[_0x2c07ef(0x147)];while(_0x525a26!==_0xf9120e){const _0x420bce=a118_0x24ef6e[_0x2c07ef(0x144)](_0x525a26,TDX_CONFIG_FILE);if(existsSync(_0x420bce))return _0x420bce;_0x525a26=a118_0x24ef6e['dirname'](_0x525a26);}return null;}export function loadTdxConfig(_0x6220f){const _0x57aa64=a118_0x46ab,_0x4c5119=readFileSync(_0x6220f,'utf-8');let _0x1f01e2;try{_0x1f01e2=JSON[_0x57aa64(0x13d)](_0x4c5119);}catch{throw new Error(_0x57aa64(0x143)+_0x6220f);}if(!_0x1f01e2||typeof _0x1f01e2!=='object')throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x5a5ef1=_0x1f01e2;if(!_0x5a5ef1[_0x57aa64(0x145)]||typeof _0x5a5ef1[_0x57aa64(0x145)]!==_0x57aa64(0x14c))throw new Error(_0x57aa64(0x141));return{'parent_segment':_0x5a5ef1[_0x57aa64(0x145)]};}export function findTdxConfig(_0x370c79=process[a118_0xd32284(0x140)]()){const _0x4a9ce2=a118_0xd32284,_0xfc7c3d=findTdxConfigPath(_0x370c79);if(!_0xfc7c3d)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x42832f=loadTdxConfig(_0xfc7c3d),_0xadb939=a118_0x24ef6e[_0x4a9ce2(0x13f)](_0xfc7c3d);return{'config':_0x42832f,'configPath':_0xfc7c3d,'configDir':_0xadb939};}export function getSegmentRootDir(_0x41ec10,_0x53d51f=process[a118_0xd32284(0x140)]()){const _0x4d5408=a118_0xd32284;return a118_0x24ef6e[_0x4d5408(0x144)](_0x53d51f,SEGMENTS_DIR,_0x41ec10);}function a118_0x1073(){const _0x49b07b=['510495rWphES','959684lnzTER','parse','resolve','dirname','cwd','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','replace','Invalid\x20JSON\x20in\x20','join','parent_segment','869223xWhvRt','root','112215CLdHMx','24LQSfmv','4852224rxFmzN','relative','string','stringify','170632OeHfpJ','179123OpRDNX'];a118_0x1073=function(){return _0x49b07b;};return a118_0x1073();}export function getTdxConfigPath(_0x1a8e52,_0x4a30ad=process[a118_0xd32284(0x140)]()){return a118_0x24ef6e['join'](getSegmentRootDir(_0x1a8e52,_0x4a30ad),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x6ec86d,_0x3e4553){const _0x52d3c0=a118_0xd32284,_0x27747d=a118_0x24ef6e[_0x52d3c0(0x13e)](_0x6ec86d),_0x1e7c6a=a118_0x24ef6e[_0x52d3c0(0x14b)](_0x3e4553,_0x27747d);if(_0x1e7c6a['startsWith']('..'))return'';return _0x1e7c6a;}function a118_0x46ab(_0x4c46d6,_0x1e01ad){_0x4c46d6=_0x4c46d6-0x13a;const _0x1073a2=a118_0x1073();let _0x46aba3=_0x1073a2[_0x4c46d6];return _0x46aba3;}export function localPathToTdFolderPath(_0x19ff25){const _0x543716=a118_0xd32284,_0x2f011a=a118_0x24ef6e['dirname'](_0x19ff25);if(_0x2f011a==='.'||_0x2f011a==='')return'';return _0x2f011a[_0x543716(0x142)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x26ce06,_0x1bd87b){const _0x24109a=a118_0xd32284;if(!_0x26ce06)return _0x1bd87b;return a118_0x24ef6e[_0x24109a(0x144)](_0x1bd87b,_0x26ce06);}export function createTdxConfigContent(_0x5b182c){const _0x2f4006=a118_0xd32284,_0x170f5a={'parent_segment':_0x5b182c};return JSON[_0x2f4006(0x14d)](_0x170f5a,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a119_0x4a0191=a119_0xa22d;(function(_0x50d676,_0x48a211){const _0x4c58bd=a119_0xa22d,_0x1add09=_0x50d676();while(!![]){try{const _0x350d76=parseInt(_0x4c58bd(0x178))/0x1+-parseInt(_0x4c58bd(0x17d))/0x2*(parseInt(_0x4c58bd(0x18a))/0x3)+parseInt(_0x4c58bd(0x186))/0x4+-parseInt(_0x4c58bd(0x169))/0x5+-parseInt(_0x4c58bd(0x158))/0x6*(parseInt(_0x4c58bd(0x161))/0x7)+parseInt(_0x4c58bd(0x15d))/0x8*(-parseInt(_0x4c58bd(0x181))/0x9)+-parseInt(_0x4c58bd(0x157))/0xa*(-parseInt(_0x4c58bd(0x184))/0xb);if(_0x350d76===_0x48a211)break;else _0x1add09['push'](_0x1add09['shift']());}catch(_0xd94238){_0x1add09['push'](_0x1add09['shift']());}}}(a119_0x3e55,0x9674a));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';function a119_0xa22d(_0x456639,_0x4b972f){_0x456639=_0x456639-0x155;const _0x3e557c=a119_0x3e55();let _0xa22dea=_0x3e557c[_0x456639];return _0xa22dea;}import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a119_0x2a0447 from'chalk';function safeStringify(_0x39b1cc){const _0x5ed401=a119_0xa22d;if(typeof _0x39b1cc===_0x5ed401(0x16e))return _0x39b1cc;if(_0x39b1cc instanceof Error)return _0x39b1cc[_0x5ed401(0x179)]||_0x39b1cc['name']+':\x20'+_0x39b1cc[_0x5ed401(0x15e)];try{return JSON[_0x5ed401(0x17f)](_0x39b1cc,(_0xa19c08,_0x199742)=>{const _0x545e0a=_0x5ed401;if(_0x199742 instanceof Error)return{'name':_0x199742['name'],'message':_0x199742[_0x545e0a(0x15e)],'stack':_0x199742['stack'],'cause':_0x199742[_0x545e0a(0x188)]};return _0x199742;});}catch{return String(_0x39b1cc);}}function a119_0x3e55(){const _0x46976d=['getHours','tdx.log','getMonth','filter','DEBUG','close','padStart','logLevel','9554070tpLpSj','126306IvBQAq','log','getMinutes','init','ERROR','3936232GeAsYk','message','cyan','logDir','224gPGxDf','split','warn','info','map','join','trace','test','3627275eVJKOW','write','toString','rotateOldLogs','fileOnly','string','toISOString','getFullYear','Proxy\x20session\x20ended','gray','logStream','getDate','mtime','yellow','debug','888564xJAjfM','stack','WARN','red','end','10IENwnt','TRACE','stringify','getSeconds','9fvAHFQ','includes','error','11SiRsyT','abs','3571904NALePb','.gz','cause','Warning:\x20Failed\x20to\x20compress\x20','137739XGPfsd','.log'];a119_0x3e55=function(){return _0x46976d;};return a119_0x3e55();}function getTimezoneOffset(){const _0x1b33e7=a119_0xa22d,_0xf4af5a=-new Date()['getTimezoneOffset'](),_0x3b69ce=Math['floor'](Math[_0x1b33e7(0x185)](_0xf4af5a)/0x3c),_0x518bac=Math[_0x1b33e7(0x185)](_0xf4af5a)%0x3c,_0x2e11d9=_0xf4af5a>=0x0?'+':'-';return''+_0x2e11d9+_0x3b69ce[_0x1b33e7(0x16b)]()[_0x1b33e7(0x155)](0x2,'0')+_0x518bac[_0x1b33e7(0x16b)]()[_0x1b33e7(0x155)](0x2,'0');}function formatTimestamp(){const _0x1644d9=a119_0xa22d,_0x5e24ad=new Date(),_0x280226=_0x5e24ad[_0x1644d9(0x170)](),_0x58d07a=(_0x5e24ad[_0x1644d9(0x18e)]()+0x1)[_0x1644d9(0x16b)]()[_0x1644d9(0x155)](0x2,'0'),_0x5c5339=_0x5e24ad[_0x1644d9(0x174)]()[_0x1644d9(0x16b)]()['padStart'](0x2,'0'),_0x114b4b=_0x5e24ad[_0x1644d9(0x18c)]()['toString']()[_0x1644d9(0x155)](0x2,'0'),_0x440655=_0x5e24ad[_0x1644d9(0x15a)]()['toString']()['padStart'](0x2,'0'),_0x265866=_0x5e24ad[_0x1644d9(0x180)]()[_0x1644d9(0x16b)]()[_0x1644d9(0x155)](0x2,'0'),_0x13b39e=_0x5e24ad['getMilliseconds']()[_0x1644d9(0x16b)]()[_0x1644d9(0x155)](0x3,'0'),_0x2bdcdd=getTimezoneOffset();return _0x280226+'-'+_0x58d07a+'-'+_0x5c5339+'\x20'+_0x114b4b+':'+_0x440655+':'+_0x265866+'.'+_0x13b39e+_0x2bdcdd;}function formatColoredLogEntry(_0x177254,_0x27a212){const _0x5e6e19=a119_0xa22d,_0x1ba861=formatTimestamp(),_0x7efeb9=_0x27a212[_0x5e6e19(0x165)](safeStringify)[_0x5e6e19(0x166)]('\x20'),_0x5545b9=a119_0x2a0447[_0x5e6e19(0x172)](_0x1ba861);let _0x49cc19;switch(_0x177254){case _0x5e6e19(0x164):_0x49cc19=a119_0x2a0447[_0x5e6e19(0x15f)]('['+_0x177254+']\x20');break;case'warn':_0x49cc19=a119_0x2a0447[_0x5e6e19(0x176)]('['+_0x177254+']\x20');break;case _0x5e6e19(0x183):_0x49cc19=a119_0x2a0447[_0x5e6e19(0x17b)]('['+_0x177254+']');break;case _0x5e6e19(0x177):_0x49cc19=a119_0x2a0447[_0x5e6e19(0x172)]('['+_0x177254+']');break;default:_0x49cc19='['+_0x177254+']';}return _0x5545b9+'\x20'+_0x49cc19+'\x20'+_0x7efeb9;}export var LogLevel;(function(_0x3b9f12){const _0x34abc0=a119_0xa22d;_0x3b9f12[_0x3b9f12[_0x34abc0(0x17e)]=-0x2]=_0x34abc0(0x17e),_0x3b9f12[_0x3b9f12[_0x34abc0(0x190)]=-0x1]=_0x34abc0(0x190),_0x3b9f12[_0x3b9f12['INFO']=0x0]='INFO',_0x3b9f12[_0x3b9f12[_0x34abc0(0x17a)]=0x1]=_0x34abc0(0x17a),_0x3b9f12[_0x3b9f12[_0x34abc0(0x15c)]=0x2]=_0x34abc0(0x15c);}(LogLevel||(LogLevel={})));export class TDXLogger{['logStream'];[a119_0x4a0191(0x160)];['logLevel'];[a119_0x4a0191(0x16d)];constructor(_0x4154bd=LogLevel['INFO'],_0xf36c7e=![]){const _0x174aa6=a119_0x4a0191;this[_0x174aa6(0x160)]=join(homedir(),'.cache','tdx','logs'),this[_0x174aa6(0x156)]=_0x4154bd,this['fileOnly']=_0xf36c7e;}async[a119_0x4a0191(0x15b)](){const _0xbb357c=a119_0x4a0191;try{await mkdir(this[_0xbb357c(0x160)],{'recursive':!![]}),await this['rotateOldLogs']();const _0x420509=join(this[_0xbb357c(0x160)],_0xbb357c(0x18d));this[_0xbb357c(0x173)]=createWriteStream(_0x420509,{'flags':'a'}),this['logStream']['on'](_0xbb357c(0x183),_0x3e8b82=>{const _0x37629a=_0xbb357c;console[_0x37629a(0x183)]('Warning:\x20Error\x20writing\x20to\x20tdx.log:',_0x3e8b82['message']);});}catch(_0x53eaee){console[_0xbb357c(0x183)]('Warning:\x20Failed\x20to\x20initialize\x20log\x20files:',_0x53eaee);}}async[a119_0x4a0191(0x16c)](){const _0x45a342=a119_0x4a0191;try{const _0xca6a0=await readdir(this['logDir']),_0x71466e=new Date()['toISOString']()[_0x45a342(0x162)]('T')[0x0];if(_0xca6a0[_0x45a342(0x182)]('tdx.log')){const _0x1f72cb=join(this[_0x45a342(0x160)],_0x45a342(0x18d)),_0x2254ec=await stat(_0x1f72cb),_0xdc85f6=new Date(_0x2254ec[_0x45a342(0x175)])[_0x45a342(0x16f)]()[_0x45a342(0x162)]('T')[0x0];if(_0xdc85f6<_0x71466e){const _0x2a306a=join(this[_0x45a342(0x160)],'tdx-'+_0xdc85f6+_0x45a342(0x18b));await rename(_0x1f72cb,_0x2a306a);}}const _0x328a0c=await readdir(this[_0x45a342(0x160)]),_0x1c293b=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x443a=_0x328a0c[_0x45a342(0x18f)](_0x10d94c=>_0x1c293b[_0x45a342(0x168)](_0x10d94c));for(const _0x1a6797 of _0x443a){const _0x4a7666=join(this[_0x45a342(0x160)],_0x1a6797),_0x35a33e=join(this['logDir'],_0x1a6797+_0x45a342(0x187));try{await pipeline(createReadStream(_0x4a7666),createGzip(),createWriteStream(_0x35a33e)),await unlink(_0x4a7666);}catch(_0x1ef189){console[_0x45a342(0x183)](_0x45a342(0x189)+_0x1a6797+':',_0x1ef189);}}}catch{}}[a119_0x4a0191(0x177)](..._0x5b937b){const _0x1a48ff=a119_0x4a0191;if(this[_0x1a48ff(0x156)]>LogLevel['DEBUG'])return;const _0x491e64=formatColoredLogEntry(_0x1a48ff(0x177),_0x5b937b);this[_0x1a48ff(0x173)]?.[_0x1a48ff(0x16a)](_0x491e64+'\x0a');}[a119_0x4a0191(0x167)](..._0x5a07d6){const _0x5d4a97=a119_0x4a0191;if(this[_0x5d4a97(0x156)]>LogLevel[_0x5d4a97(0x17e)])return;const _0x2b466e=formatColoredLogEntry(_0x5d4a97(0x167),_0x5a07d6);this[_0x5d4a97(0x173)]?.['write'](_0x2b466e+'\x0a');}[a119_0x4a0191(0x164)](..._0x1a479d){const _0x58df04=a119_0x4a0191;if(this['logLevel']>LogLevel['INFO'])return;const _0x5a499b=formatColoredLogEntry(_0x58df04(0x164),_0x1a479d);!this[_0x58df04(0x16d)]&&console[_0x58df04(0x159)](_0x5a499b),this['logStream']?.[_0x58df04(0x16a)](_0x5a499b+'\x0a');}[a119_0x4a0191(0x163)](..._0x4e4bca){const _0x56f326=a119_0x4a0191;if(this['logLevel']>LogLevel[_0x56f326(0x17a)])return;const _0x28b2c1=formatColoredLogEntry('warn',_0x4e4bca);!this[_0x56f326(0x16d)]&&console[_0x56f326(0x183)](_0x28b2c1),this['logStream']?.[_0x56f326(0x16a)](_0x28b2c1+'\x0a');}[a119_0x4a0191(0x183)](..._0x23dbdc){const _0x2c7ca8=a119_0x4a0191,_0x365972=formatColoredLogEntry(_0x2c7ca8(0x183),_0x23dbdc);!this[_0x2c7ca8(0x16d)]&&console[_0x2c7ca8(0x183)](_0x365972),this[_0x2c7ca8(0x173)]?.[_0x2c7ca8(0x16a)](_0x365972+'\x0a');}async[a119_0x4a0191(0x191)](){const _0xa4ccee=a119_0x4a0191;return this['info'](_0xa4ccee(0x171)),new Promise(_0x4dd8a0=>{const _0x38f395=_0xa4ccee;this['logStream']?this[_0x38f395(0x173)][_0x38f395(0x17c)](()=>{_0x4dd8a0();}):_0x4dd8a0();});}['getLogPath'](){const _0x4880b4=a119_0x4a0191;return join(this['logDir'],_0x4880b4(0x18d));}}
1
+ const a119_0x2a998f=a119_0x5aad;(function(_0x3a5162,_0x128719){const _0x47ca82=a119_0x5aad,_0x3b979b=_0x3a5162();while(!![]){try{const _0x47fe51=-parseInt(_0x47ca82(0xbd))/0x1+parseInt(_0x47ca82(0xee))/0x2*(-parseInt(_0x47ca82(0xdb))/0x3)+-parseInt(_0x47ca82(0xf4))/0x4*(parseInt(_0x47ca82(0xc9))/0x5)+parseInt(_0x47ca82(0xba))/0x6*(parseInt(_0x47ca82(0xf0))/0x7)+-parseInt(_0x47ca82(0xea))/0x8+-parseInt(_0x47ca82(0xc6))/0x9+parseInt(_0x47ca82(0xd6))/0xa*(parseInt(_0x47ca82(0xbf))/0xb);if(_0x47fe51===_0x128719)break;else _0x3b979b['push'](_0x3b979b['shift']());}catch(_0x22077d){_0x3b979b['push'](_0x3b979b['shift']());}}}(a119_0x51fe,0xe97ef));function a119_0x5aad(_0x11c53f,_0x1d5040){_0x11c53f=_0x11c53f-0xb8;const _0x51fea1=a119_0x51fe();let _0x5aadc0=_0x51fea1[_0x11c53f];return _0x5aadc0;}import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a119_0x16b4fc from'chalk';function safeStringify(_0x110843){const _0x5b01ef=a119_0x5aad;if(typeof _0x110843===_0x5b01ef(0xbb))return _0x110843;if(_0x110843 instanceof Error)return _0x110843[_0x5b01ef(0xe0)]||_0x110843[_0x5b01ef(0xca)]+':\x20'+_0x110843[_0x5b01ef(0xe3)];try{return JSON[_0x5b01ef(0xe4)](_0x110843,(_0x5a3e37,_0x49fb8d)=>{const _0x53ce39=_0x5b01ef;if(_0x49fb8d instanceof Error)return{'name':_0x49fb8d['name'],'message':_0x49fb8d['message'],'stack':_0x49fb8d[_0x53ce39(0xe0)],'cause':_0x49fb8d[_0x53ce39(0xbc)]};return _0x49fb8d;});}catch{return String(_0x110843);}}function a119_0x51fe(){const _0x240674=['getHours','stack','DEBUG','test','message','stringify','.gz','gray','warn','includes','tdx-','6569736xBjTMC','padStart','WARN','INFO','2iAnxGM','logLevel','105rpegfu','fileOnly','info','getFullYear','1724jiGaYY','error','red','217818dRGrLL','string','cause','1018395elviZo','init','11ILgrXT','write','logStream','.log','tdx.log','logs','abs','965727PEEbuf','log','rotateOldLogs','4615dVirzQ','name','trace','getMinutes','split','.cache','TRACE','Warning:\x20Error\x20writing\x20to\x20tdx.log:','yellow','getTimezoneOffset','toString','getMilliseconds','end','42077910tmpMPS','ERROR','getDate','mtime','debug','4353627SyULTM','Warning:\x20Failed\x20to\x20compress\x20','toISOString','logDir'];a119_0x51fe=function(){return _0x240674;};return a119_0x51fe();}function getTimezoneOffset(){const _0x599818=a119_0x5aad,_0x25cfe=-new Date()[_0x599818(0xd2)](),_0x16195c=Math['floor'](Math[_0x599818(0xc5)](_0x25cfe)/0x3c),_0x2f5121=Math['abs'](_0x25cfe)%0x3c,_0x42010c=_0x25cfe>=0x0?'+':'-';return''+_0x42010c+_0x16195c['toString']()[_0x599818(0xeb)](0x2,'0')+_0x2f5121[_0x599818(0xd3)]()[_0x599818(0xeb)](0x2,'0');}function formatTimestamp(){const _0x405e4f=a119_0x5aad,_0x27764e=new Date(),_0x4358c4=_0x27764e[_0x405e4f(0xf3)](),_0x51727a=(_0x27764e['getMonth']()+0x1)[_0x405e4f(0xd3)]()[_0x405e4f(0xeb)](0x2,'0'),_0x438063=_0x27764e[_0x405e4f(0xd8)]()[_0x405e4f(0xd3)]()[_0x405e4f(0xeb)](0x2,'0'),_0x184f67=_0x27764e[_0x405e4f(0xdf)]()[_0x405e4f(0xd3)]()['padStart'](0x2,'0'),_0x2e6e1b=_0x27764e[_0x405e4f(0xcc)]()['toString']()[_0x405e4f(0xeb)](0x2,'0'),_0x271514=_0x27764e['getSeconds']()['toString']()[_0x405e4f(0xeb)](0x2,'0'),_0x9b3fa6=_0x27764e[_0x405e4f(0xd4)]()[_0x405e4f(0xd3)]()[_0x405e4f(0xeb)](0x3,'0'),_0x75e703=getTimezoneOffset();return _0x4358c4+'-'+_0x51727a+'-'+_0x438063+'\x20'+_0x184f67+':'+_0x2e6e1b+':'+_0x271514+'.'+_0x9b3fa6+_0x75e703;}function formatColoredLogEntry(_0x268e81,_0x53f5b3){const _0x4eaf6c=a119_0x5aad,_0x765bfd=formatTimestamp(),_0x303faa=_0x53f5b3['map'](safeStringify)['join']('\x20'),_0x5850ff=a119_0x16b4fc[_0x4eaf6c(0xe6)](_0x765bfd);let _0x4c29b1;switch(_0x268e81){case _0x4eaf6c(0xf2):_0x4c29b1=a119_0x16b4fc['cyan']('['+_0x268e81+']\x20');break;case _0x4eaf6c(0xe7):_0x4c29b1=a119_0x16b4fc[_0x4eaf6c(0xd1)]('['+_0x268e81+']\x20');break;case _0x4eaf6c(0xb8):_0x4c29b1=a119_0x16b4fc[_0x4eaf6c(0xb9)]('['+_0x268e81+']');break;case _0x4eaf6c(0xda):_0x4c29b1=a119_0x16b4fc[_0x4eaf6c(0xe6)]('['+_0x268e81+']');break;default:_0x4c29b1='['+_0x268e81+']';}return _0x5850ff+'\x20'+_0x4c29b1+'\x20'+_0x303faa;}export var LogLevel;(function(_0x208a01){const _0x5041ba=a119_0x5aad;_0x208a01[_0x208a01[_0x5041ba(0xcf)]=-0x2]=_0x5041ba(0xcf),_0x208a01[_0x208a01[_0x5041ba(0xe1)]=-0x1]=_0x5041ba(0xe1),_0x208a01[_0x208a01[_0x5041ba(0xed)]=0x0]=_0x5041ba(0xed),_0x208a01[_0x208a01[_0x5041ba(0xec)]=0x1]=_0x5041ba(0xec),_0x208a01[_0x208a01[_0x5041ba(0xd7)]=0x2]=_0x5041ba(0xd7);}(LogLevel||(LogLevel={})));export class TDXLogger{[a119_0x2a998f(0xc1)];['logDir'];[a119_0x2a998f(0xef)];[a119_0x2a998f(0xf1)];constructor(_0x56d70c=LogLevel[a119_0x2a998f(0xed)],_0x3d5754=![]){const _0x17f67a=a119_0x2a998f;this[_0x17f67a(0xde)]=join(homedir(),_0x17f67a(0xce),'tdx',_0x17f67a(0xc4)),this[_0x17f67a(0xef)]=_0x56d70c,this[_0x17f67a(0xf1)]=_0x3d5754;}async[a119_0x2a998f(0xbe)](){const _0x2057a8=a119_0x2a998f;try{await mkdir(this[_0x2057a8(0xde)],{'recursive':!![]}),await this[_0x2057a8(0xc8)]();const _0x455353=join(this[_0x2057a8(0xde)],_0x2057a8(0xc3));this[_0x2057a8(0xc1)]=createWriteStream(_0x455353,{'flags':'a'}),this['logStream']['on'](_0x2057a8(0xb8),_0x4acbd5=>{const _0x2346ab=_0x2057a8;console[_0x2346ab(0xb8)](_0x2346ab(0xd0),_0x4acbd5[_0x2346ab(0xe3)]);});}catch(_0x41672a){console[_0x2057a8(0xb8)]('Warning:\x20Failed\x20to\x20initialize\x20log\x20files:',_0x41672a);}}async[a119_0x2a998f(0xc8)](){const _0x1d1462=a119_0x2a998f;try{const _0xc588b6=await readdir(this[_0x1d1462(0xde)]),_0x6bd302=new Date()['toISOString']()[_0x1d1462(0xcd)]('T')[0x0];if(_0xc588b6[_0x1d1462(0xe8)]('tdx.log')){const _0x2593d6=join(this[_0x1d1462(0xde)],'tdx.log'),_0x4510f6=await stat(_0x2593d6),_0x5cda60=new Date(_0x4510f6[_0x1d1462(0xd9)])[_0x1d1462(0xdd)]()[_0x1d1462(0xcd)]('T')[0x0];if(_0x5cda60<_0x6bd302){const _0x1ff87a=join(this['logDir'],_0x1d1462(0xe9)+_0x5cda60+_0x1d1462(0xc2));await rename(_0x2593d6,_0x1ff87a);}}const _0x20fa30=await readdir(this[_0x1d1462(0xde)]),_0x2a3c1e=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x38b5b5=_0x20fa30['filter'](_0x54aa72=>_0x2a3c1e[_0x1d1462(0xe2)](_0x54aa72));for(const _0x5b884e of _0x38b5b5){const _0x2903aa=join(this['logDir'],_0x5b884e),_0x38b949=join(this[_0x1d1462(0xde)],_0x5b884e+_0x1d1462(0xe5));try{await pipeline(createReadStream(_0x2903aa),createGzip(),createWriteStream(_0x38b949)),await unlink(_0x2903aa);}catch(_0x25035c){console[_0x1d1462(0xb8)](_0x1d1462(0xdc)+_0x5b884e+':',_0x25035c);}}}catch{}}[a119_0x2a998f(0xda)](..._0x41cb8d){const _0x1ea673=a119_0x2a998f;if(this['logLevel']>LogLevel[_0x1ea673(0xe1)])return;const _0x4d491b=formatColoredLogEntry('debug',_0x41cb8d);this[_0x1ea673(0xc1)]?.['write'](_0x4d491b+'\x0a');}[a119_0x2a998f(0xcb)](..._0x1428b6){const _0x1aa491=a119_0x2a998f;if(this[_0x1aa491(0xef)]>LogLevel['TRACE'])return;const _0x325658=formatColoredLogEntry(_0x1aa491(0xcb),_0x1428b6);this[_0x1aa491(0xc1)]?.[_0x1aa491(0xc0)](_0x325658+'\x0a');}[a119_0x2a998f(0xf2)](..._0x5b71bc){const _0x5b2e41=a119_0x2a998f;if(this['logLevel']>LogLevel[_0x5b2e41(0xed)])return;const _0x27a04a=formatColoredLogEntry(_0x5b2e41(0xf2),_0x5b71bc);!this[_0x5b2e41(0xf1)]&&console[_0x5b2e41(0xc7)](_0x27a04a),this[_0x5b2e41(0xc1)]?.['write'](_0x27a04a+'\x0a');}[a119_0x2a998f(0xe7)](..._0x51d353){const _0x334c59=a119_0x2a998f;if(this[_0x334c59(0xef)]>LogLevel[_0x334c59(0xec)])return;const _0x572d1c=formatColoredLogEntry('warn',_0x51d353);!this[_0x334c59(0xf1)]&&console[_0x334c59(0xb8)](_0x572d1c),this[_0x334c59(0xc1)]?.[_0x334c59(0xc0)](_0x572d1c+'\x0a');}[a119_0x2a998f(0xb8)](..._0x111874){const _0x546494=a119_0x2a998f,_0x4e9e3b=formatColoredLogEntry(_0x546494(0xb8),_0x111874);!this[_0x546494(0xf1)]&&console['error'](_0x4e9e3b),this[_0x546494(0xc1)]?.[_0x546494(0xc0)](_0x4e9e3b+'\x0a');}async['close'](){const _0x368604=a119_0x2a998f;return this[_0x368604(0xf2)]('Proxy\x20session\x20ended'),new Promise(_0x376680=>{const _0x1ef839=_0x368604;this[_0x1ef839(0xc1)]?this['logStream'][_0x1ef839(0xd5)](()=>{_0x376680();}):_0x376680();});}['getLogPath'](){const _0x1c1032=a119_0x2a998f;return join(this[_0x1c1032(0xde)],_0x1c1032(0xc3));}}