@treasuredata/tdx 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.d.ts.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/parent-segment-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.d.ts +12 -0
- package/dist/types/endpoints.d.ts.map +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/endpoints.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/fields-display.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a82_0xbe4e(_0x36b0a1,_0x5b0d00){const _0xa6294e=a82_0xa629();return a82_0xbe4e=function(_0xbe4e47,_0x366d35){_0xbe4e47=_0xbe4e47-0xbf;let _0xb85ccd=_0xa6294e[_0xbe4e47];return _0xb85ccd;},a82_0xbe4e(_0x36b0a1,_0x5b0d00);}(function(_0x47b4cb,_0x38ae00){const _0x299817=a82_0xbe4e,_0x8e74df=_0x47b4cb();while(!![]){try{const _0x4f2d81=-parseInt(_0x299817(0xc7))/0x1+parseInt(_0x299817(0xc5))/0x2*(-parseInt(_0x299817(0xe5))/0x3)+-parseInt(_0x299817(0xc6))/0x4+parseInt(_0x299817(0xca))/0x5*(-parseInt(_0x299817(0xcf))/0x6)+parseInt(_0x299817(0xd9))/0x7+-parseInt(_0x299817(0xcb))/0x8+parseInt(_0x299817(0xda))/0x9;if(_0x4f2d81===_0x38ae00)break;else _0x8e74df['push'](_0x8e74df['shift']());}catch(_0x4efb00){_0x8e74df['push'](_0x8e74df['shift']());}}}(a82_0xa629,0x9d2a8));import a82_0x5a46b from'chalk';import{withQuerySpinner}from'./spinner.js';export function buildSchemaResult(_0x50d54e){const _0x2768d4=a82_0xbe4e,_0x44105b=_0x50d54e['columns'][_0x2768d4(0xe1)](_0x28598b=>({'column_name':_0x28598b[_0x2768d4(0xdc)],'column_type':_0x28598b[_0x2768d4(0xde)],'null':_0x2768d4(0xd5),'key':null,'default':null,'extra':null}));return{..._0x50d54e,'columns':[{'name':_0x2768d4(0xd1),'type':_0x2768d4(0xc9)},{'name':'column_type','type':_0x2768d4(0xc9)},{'name':'null','type':_0x2768d4(0xc9)},{'name':'key','type':_0x2768d4(0xc9)},{'name':_0x2768d4(0xd4),'type':_0x2768d4(0xc9)},{'name':_0x2768d4(0xf0),'type':_0x2768d4(0xc9)}],'data':_0x44105b};}export async function executeSchemaQuery(_0x2acd60,_0x111c83,_0x20153b){const _0x1b937b=a82_0xbe4e,_0xb908e1=_0x2acd60[_0x1b937b(0xf2)]()[_0x1b937b(0xeb)](/;+$/,''),_0x4b470e=_0x1b937b(0xc3)+_0xb908e1+_0x1b937b(0xdf);_0x20153b[_0x1b937b(0xd6)]&&console[_0x1b937b(0xe6)](_0x1b937b(0xdd)+_0x4b470e);const _0x465667=await withQuerySpinner(_0x1b937b(0xc0),async _0x3d1c0d=>{const _0x1d7dc1=_0x1b937b,_0x4ea001=await _0x111c83[_0x1d7dc1(0xcd)][_0x1d7dc1(0xd3)](_0x4b470e,{'catalog':'td','schema':_0x1d7dc1(0xe9),'onJobId':_0x235657=>{const _0x178d5d=_0x1d7dc1;_0x3d1c0d[_0x178d5d(0xc4)](_0x235657);}});return _0x4ea001;},{'verbose':_0x20153b[_0x1b937b(0xd6)]});return buildSchemaResult(_0x465667[_0x1b937b(0xe3)]);}export function displayFieldsHumanReadable(_0x535e0d,_0xc955be){const _0x17425f=a82_0xbe4e,_0x5b0f26=_0x535e0d['filter'](_0x5e13aa=>_0x5e13aa[_0x17425f(0xea)]==='attribute'),_0x5bfbf9=_0x535e0d[_0x17425f(0xce)](_0x5232f2=>_0x5232f2[_0x17425f(0xea)]===_0x17425f(0xe8)),_0x359006=new Map();for(const _0x38e779 of _0x5b0f26){const _0x5723eb=_0x38e779[_0x17425f(0xf1)]||_0x17425f(0xe0),_0xcf4dbb=_0x359006[_0x17425f(0xee)](_0x5723eb)||[];_0xcf4dbb[_0x17425f(0xe2)](_0x38e779),_0x359006[_0x17425f(0xe4)](_0x5723eb,_0xcf4dbb);}const _0x277fbd=new Map();for(const _0x2e9056 of _0x5bfbf9){const _0x4aaa29=_0x2e9056[_0x17425f(0xec)]||_0x17425f(0xe0),_0x2449d0=_0x277fbd[_0x17425f(0xee)](_0x4aaa29)||[];_0x2449d0[_0x17425f(0xe2)](_0x2e9056),_0x277fbd[_0x17425f(0xe4)](_0x4aaa29,_0x2449d0);}console['error']('\x0a'+a82_0x5a46b['bold'](_0xc955be));if(_0x359006[_0x17425f(0xef)]>0x0){console[_0x17425f(0xe6)]('\x0a'+a82_0x5a46b[_0x17425f(0xbf)](_0x17425f(0xd2)));const _0x49759c=[..._0x359006[_0x17425f(0xd8)]()]['sort']((_0x51fca8,_0x5a3506)=>_0x51fca8[0x0]['localeCompare'](_0x5a3506[0x0]));for(const [_0x1617fc,_0x13c265]of _0x49759c){console[_0x17425f(0xe6)]('\x20\x20'+a82_0x5a46b[_0x17425f(0xdb)](_0x1617fc));const _0x29272b=[..._0x13c265]['sort']((_0x327241,_0x52a624)=>_0x327241['name'][_0x17425f(0xcc)](_0x52a624['name']));for(const _0x487d09 of _0x29272b){const _0x5a70be=_0x487d09[_0x17425f(0xd7)]&&_0x487d09[_0x17425f(0xd7)]!==_0x487d09[_0x17425f(0xdc)]?'\x20'+a82_0x5a46b['dim']('('+_0x487d09[_0x17425f(0xd7)]+')'):'';console[_0x17425f(0xe6)]('\x20\x20\x20\x20'+_0x487d09['name']+_0x5a70be+':\x20'+a82_0x5a46b[_0x17425f(0xc1)](_0x487d09['type']));}}}if(_0x277fbd[_0x17425f(0xef)]>0x0){console[_0x17425f(0xe6)]('\x0a'+a82_0x5a46b[_0x17425f(0xbf)](_0x17425f(0xc2)));const _0x4b0792=[..._0x277fbd[_0x17425f(0xd8)]()][_0x17425f(0xe7)]((_0x4082a5,_0x4e20f1)=>_0x4082a5[0x0][_0x17425f(0xcc)](_0x4e20f1[0x0]));for(const [_0x7cf8cf,_0x53eea0]of _0x4b0792){const _0x9cf54d=_0x53eea0[0x0],_0x1428c5=_0x9cf54d?.['parentTableName']||'';console[_0x17425f(0xe6)]('\x20\x20'+a82_0x5a46b[_0x17425f(0xdb)](_0x7cf8cf)+(_0x1428c5?'\x20'+a82_0x5a46b[_0x17425f(0xbf)]('('+_0x1428c5+')'):''));const _0x2c83b4=[..._0x53eea0][_0x17425f(0xe7)]((_0x4fddb4,_0x2045a4)=>_0x4fddb4['name'][_0x17425f(0xcc)](_0x2045a4['name']));for(const _0x19b870 of _0x2c83b4){const _0x91f637=_0x19b870[_0x17425f(0xdc)][_0x17425f(0xed)](_0x7cf8cf+'.')?_0x19b870[_0x17425f(0xdc)][_0x17425f(0xf3)](_0x7cf8cf[_0x17425f(0xd0)]+0x1):_0x19b870[_0x17425f(0xdc)],_0x4249c4=_0x19b870[_0x17425f(0xd7)]&&_0x19b870[_0x17425f(0xd7)]!==_0x91f637?'\x20'+a82_0x5a46b['dim']('('+_0x19b870[_0x17425f(0xd7)]+')'):'';console['error'](_0x17425f(0xc8)+_0x91f637+_0x4249c4+':\x20'+a82_0x5a46b['cyan'](_0x19b870[_0x17425f(0xde)]));}}}console[_0x17425f(0xe6)]('');}function a82_0xa629(){const _0x3666b0=['localeCompare','query','filter','22242lZFwMu','length','column_name','Attributes','execute','default','YES','verbose','parentColumn','entries','4662182FDoyWT','28239102lGQdgK','bold','name','Schema\x20query:\x0a','type','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','Unknown','map','push','data','set','7689mhAtGz','error','sort','behavior','information_schema','source','replace','behaviorName','startsWith','get','size','extra','parentTableName','trim','slice','dim','Fetching\x20schema...','cyan','Behaviors','SELECT\x20*\x20FROM\x20(\x0a','setJobId','226qEouxf','4450608kzvPEw','369508sFqgyW','\x20\x20\x20\x20','varchar','1120kJPdOf','4462440RYcdtW'];a82_0xa629=function(){return _0x3666b0;};return a82_0xa629();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23e4ed,_0x57471b){const _0xe5f6aa=a83_0x2e35,_0x51222c=_0x23e4ed();while(!![]){try{const _0xbcedc0=-parseInt(_0xe5f6aa(0x1a7))/0x1+-parseInt(_0xe5f6aa(0x1aa))/0x2*(-parseInt(_0xe5f6aa(0x1ac))/0x3)+-parseInt(_0xe5f6aa(0x1a8))/0x4+-parseInt(_0xe5f6aa(0x1a3))/0x5+-parseInt(_0xe5f6aa(0x19e))/0x6*(-parseInt(_0xe5f6aa(0x19a))/0x7)+-parseInt(_0xe5f6aa(0x1a5))/0x8*(-parseInt(_0xe5f6aa(0x1ab))/0x9)+parseInt(_0xe5f6aa(0x19b))/0xa*(parseInt(_0xe5f6aa(0x19f))/0xb);if(_0xbcedc0===_0x57471b)break;else _0x51222c['push'](_0x51222c['shift']());}catch(_0x3aafb5){_0x51222c['push'](_0x51222c['shift']());}}}(a83_0x1488,0xae9c6));function a83_0x1488(){const _0x2af5f0=['7216bgljyb','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','749513ehLUUA','4555848cYlnwy','Should\x20be\x200600\x20or\x20more\x20restrictive.','104582ragwnk','11322xqpszW','57zNJhRU','dirname','statSync','mkdirSync','63RbPElS','755630mHvAlr','mode','toString','309486CGaiyn','11clGlkL','existsSync','writeFileSync','chmodSync','321780FLIcKY','warn'];a83_0x1488=function(){return _0x2af5f0;};return a83_0x1488();}import*as a83_0x5df5a9 from'node:fs';import*as a83_0x21b374 from'node:path';export function setSecureFilePermissions(_0x4d6353){const _0xd4fd06=a83_0x2e35;try{a83_0x5df5a9[_0xd4fd06(0x1a2)](_0x4d6353,0x180);}catch{console['warn']('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x4d6353);}}export function setSecureDirectoryPermissions(_0x5e6f67){const _0x51936b=a83_0x2e35;try{a83_0x5df5a9[_0x51936b(0x1a2)](_0x5e6f67,0x1c0);}catch{console[_0x51936b(0x1a4)](_0x51936b(0x1a6)+_0x5e6f67);}}export function createSecureDirectory(_0x62f084){const _0x32527e=a83_0x2e35;!a83_0x5df5a9[_0x32527e(0x1a0)](_0x62f084)&&(a83_0x5df5a9[_0x32527e(0x199)](_0x62f084,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x62f084));}function a83_0x2e35(_0x5f2e2a,_0x35816b){const _0x148822=a83_0x1488();return a83_0x2e35=function(_0x2e352e,_0x1a8447){_0x2e352e=_0x2e352e-0x198;let _0x1edda1=_0x148822[_0x2e352e];return _0x1edda1;},a83_0x2e35(_0x5f2e2a,_0x35816b);}export function validateSecureFilePermissions(_0x20c220){const _0x3e6871=a83_0x2e35;try{const _0x1779e7=a83_0x5df5a9[_0x3e6871(0x198)](_0x20c220),_0x55f02d=_0x1779e7[_0x3e6871(0x19c)]&0x1ff,_0xbb1a03=(_0x55f02d&0x3f)!==0x0;if(_0xbb1a03)return console[_0x3e6871(0x1a4)]('Warning:\x20'+_0x20c220+'\x20has\x20insecure\x20permissions\x20('+_0x55f02d[_0x3e6871(0x19d)](0x8)+').\x20'+_0x3e6871(0x1a9)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x3c61af,_0x316a56){const _0x1dca9e=a83_0x2e35,_0x17261b=a83_0x21b374[_0x1dca9e(0x1ad)](_0x3c61af);createSecureDirectory(_0x17261b),a83_0x5df5a9[_0x1dca9e(0x1a1)](_0x3c61af,_0x316a56,{'mode':0x180}),setSecureFilePermissions(_0x3c61af);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb7ea0e,_0x5c768e){const _0x1721a7=a84_0x338f,_0x2cd746=_0xb7ea0e();while(!![]){try{const _0x312ff3=parseInt(_0x1721a7(0x125))/0x1+-parseInt(_0x1721a7(0x132))/0x2*(-parseInt(_0x1721a7(0x12d))/0x3)+-parseInt(_0x1721a7(0x131))/0x4+-parseInt(_0x1721a7(0x133))/0x5*(-parseInt(_0x1721a7(0x12e))/0x6)+parseInt(_0x1721a7(0x126))/0x7+-parseInt(_0x1721a7(0x12a))/0x8+-parseInt(_0x1721a7(0x12f))/0x9;if(_0x312ff3===_0x5c768e)break;else _0x2cd746['push'](_0x2cd746['shift']());}catch(_0x402fba){_0x2cd746['push'](_0x2cd746['shift']());}}}(a84_0x1545,0x7cc90));function a84_0x1545(){const _0x2066d3=['5081472TOTCkD','jsonl','json','36QFFCcw','32718GtNAfo','16737516hLSAXq','split','760096KhZNyh','98944ZVzQxt','780NWliml','pop','854053PJDCFI','6283669KTnLtJ','tsv','text','table'];a84_0x1545=function(){return _0x2066d3;};return a84_0x1545();}function a84_0x338f(_0x544d21,_0x547364){const _0x1545d8=a84_0x1545();return a84_0x338f=function(_0x338ff5,_0x16deb5){_0x338ff5=_0x338ff5-0x125;let _0x55eae2=_0x1545d8[_0x338ff5];return _0x55eae2;},a84_0x338f(_0x544d21,_0x547364);}export function detectFormatFromExtension(_0x28da45){const _0x9eb1fc=a84_0x338f,_0x102750=_0x28da45['toLowerCase']()[_0x9eb1fc(0x130)]('.')[_0x9eb1fc(0x134)]();switch(_0x102750){case _0x9eb1fc(0x12c):return _0x9eb1fc(0x12c);case _0x9eb1fc(0x12b):return _0x9eb1fc(0x12b);case _0x9eb1fc(0x127):case'tab':return'tsv';case'txt':case _0x9eb1fc(0x128):return _0x9eb1fc(0x129);default:return undefined;}}export function resolveOutputFormat(_0x49d922,_0x19aecd,_0x5484bf){if(_0x49d922)return _0x49d922;if(_0x19aecd){const _0x3ec0e1=detectFormatFromExtension(_0x19aecd);if(_0x3ec0e1)return _0x3ec0e1;}return _0x5484bf;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xe8e20c,_0x570327){const _0x1cdbf7=a85_0x2af6,_0x4df4b1=_0xe8e20c();while(!![]){try{const _0x4e0922=-parseInt(_0x1cdbf7(0x1ed))/0x1*(-parseInt(_0x1cdbf7(0x1fd))/0x2)+parseInt(_0x1cdbf7(0x21e))/0x3+parseInt(_0x1cdbf7(0x1f6))/0x4+parseInt(_0x1cdbf7(0x21d))/0x5*(-parseInt(_0x1cdbf7(0x207))/0x6)+parseInt(_0x1cdbf7(0x216))/0x7+parseInt(_0x1cdbf7(0x1f3))/0x8+-parseInt(_0x1cdbf7(0x224))/0x9;if(_0x4e0922===_0x570327)break;else _0x4df4b1['push'](_0x4df4b1['shift']());}catch(_0x403d8b){_0x4df4b1['push'](_0x4df4b1['shift']());}}}(a85_0x109e,0x43f64));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function a85_0x2af6(_0x4d3938,_0xde5c17){const _0x109e1a=a85_0x109e();return a85_0x2af6=function(_0x2af676,_0x1f9562){_0x2af676=_0x2af676-0x1ed;let _0x42bd12=_0x109e1a[_0x2af676];return _0x42bd12;},a85_0x2af6(_0x4d3938,_0xde5c17);}function getTerminalWidth(){const _0x22f5bd=a85_0x2af6;return process[_0x22f5bd(0x1f7)][_0x22f5bd(0x1f1)]||Infinity;}export function formatAsTable(_0x1a44d1,_0x4cabba=DEFAULT_MAX_DISPLAY_ROWS,_0x492f09=![],_0x1a01b8={}){const _0x3df6e8=a85_0x2af6;if(_0x1a44d1[_0x3df6e8(0x21c)][_0x3df6e8(0x1ee)]===0x0)return _0x3df6e8(0x1fa);const _0x314245=_0x1a44d1[_0x3df6e8(0x1f1)][_0x3df6e8(0x201)](_0x59454c=>_0x59454c[_0x3df6e8(0x20d)]),_0x225a4f=_0x1a44d1[_0x3df6e8(0x1f1)][_0x3df6e8(0x201)](_0x469a65=>simplifyType(_0x469a65[_0x3df6e8(0x204)])),_0x51dbbd=_0x1a44d1['data'][_0x3df6e8(0x1ef)](0x0,_0x4cabba),_0x581e02=_0x1a44d1['data'][_0x3df6e8(0x1ee)],_0x3de2b6=_0x581e02>_0x4cabba,_0x342eec=[],_0x141ef1=getTerminalWidth(),_0x2f5474=_0x141ef1!==Infinity,_0x3ffae4=0x32;let _0x11c762=_0x314245[_0x3df6e8(0x201)]((_0xc230a1,_0x5748b8)=>{const _0x5009b3=_0x3df6e8,_0x53fc44=stringWidth(_0x225a4f[_0x5748b8]),_0x432315=Math['max'](..._0x51dbbd[_0x5009b3(0x201)](_0x3bd286=>{const _0x570651=_0x3bd286[_0xc230a1];return stringWidth(formatValue(_0x570651));})),_0x1e33f7=Math[_0x5009b3(0x218)](stringWidth(_0xc230a1),_0x53fc44,_0x432315);return _0x492f09?_0x1e33f7:Math[_0x5009b3(0x1f2)](_0x1e33f7,_0x3ffae4);});if(_0x2f5474&&!_0x492f09&&_0x314245[_0x3df6e8(0x1ee)]>0x0){const _0x70dd5b=_0x2fbe42=>{let _0x24d587=0x1;for(const _0x459638 of _0x2fbe42){_0x24d587+=_0x459638+0x3;}return _0x24d587+0x1;};let _0x499652=_0x70dd5b(_0x11c762);if(_0x499652>_0x141ef1){const _0x21199f=0x3;for(let _0x1d5166=_0x11c762[_0x3df6e8(0x1ee)]-0x1;_0x1d5166>=0x0;_0x1d5166--){_0x499652=_0x70dd5b(_0x11c762);if(_0x499652<=_0x141ef1)break;const _0x48aeeb=_0x11c762[_0x1d5166],_0x16116a=_0x499652-_0x141ef1,_0x29db0c=_0x48aeeb-_0x21199f,_0x5b924f=Math[_0x3df6e8(0x1f2)](_0x16116a,_0x29db0c);_0x5b924f>0x0&&(_0x11c762[_0x1d5166]=_0x48aeeb-_0x5b924f);}}}const _0x5a995f=_0x314245,_0x23e517=_0x225a4f,_0x4c5526=_0x11c762,_0x1974a5=_0x11c762;_0x342eec[_0x3df6e8(0x1ff)](colorBorder('┌'+_0x1974a5[_0x3df6e8(0x201)](_0x1a2070=>'─'[_0x3df6e8(0x210)](_0x1a2070+0x2))[_0x3df6e8(0x1f4)]('┬')+'┐',_0x1a01b8));const _0x1d6346=_0x5a995f[_0x3df6e8(0x201)]((_0x20f8ce,_0x20129f)=>centerAlign(_0x20f8ce,_0x4c5526[_0x20129f]));_0x342eec[_0x3df6e8(0x1ff)](colorBorder('│',_0x1a01b8)+'\x20'+_0x1d6346['join']('\x20'+colorBorder('│',_0x1a01b8)+'\x20')+'\x20'+colorBorder('│',_0x1a01b8));const _0x407b30=_0x23e517['map']((_0x1cc70e,_0x1dcfac)=>colorType(centerAlign(_0x1cc70e,_0x4c5526[_0x1dcfac]),_0x1a01b8));_0x342eec[_0x3df6e8(0x1ff)](colorBorder('│',_0x1a01b8)+'\x20'+_0x407b30[_0x3df6e8(0x1f4)]('\x20'+colorBorder('│',_0x1a01b8)+'\x20')+'\x20'+colorBorder('│',_0x1a01b8)),_0x342eec['push'](colorBorder('├'+_0x1974a5[_0x3df6e8(0x201)](_0x4fcb62=>'─'[_0x3df6e8(0x210)](_0x4fcb62+0x2))[_0x3df6e8(0x1f4)]('┼')+'┤',_0x1a01b8));const _0x236843=(_0x3bc9f1,_0x4efd2e)=>{const _0x1e4fd6=_0x3df6e8,_0x45ad23=stringWidth(_0x3bc9f1);if(_0x45ad23<=_0x4efd2e)return _0x3bc9f1;let _0x239c04=_0x3bc9f1;while(stringWidth(_0x239c04+'…')>_0x4efd2e&&_0x239c04[_0x1e4fd6(0x1ee)]>0x0){_0x239c04=_0x239c04['slice'](0x0,-0x1);}return _0x239c04+'…';};_0x51dbbd[_0x3df6e8(0x214)](_0xe72444=>{const _0x476359=_0x3df6e8,_0x1ffc40=_0x314245[_0x476359(0x201)]((_0x1ca64a,_0x4455ad)=>{const _0x182593=_0x476359,_0x35a727=_0xe72444[_0x1ca64a],_0x2d6395=formatValue(_0x35a727),_0x5d30dd=_0x4c5526[_0x4455ad],_0x484c4f=_0x236843(_0x2d6395,_0x5d30dd),_0x5f392d=typeof _0x35a727===_0x182593(0x223)||typeof _0x35a727===_0x182593(0x1f8)&&/^-?\d+$/[_0x182593(0x215)](_0x35a727);return _0x5f392d?padStart(_0x484c4f,_0x5d30dd):padEnd(_0x484c4f,_0x5d30dd);});_0x342eec['push'](colorBorder('│',_0x1a01b8)+'\x20'+_0x1ffc40['join']('\x20'+colorBorder('│',_0x1a01b8)+'\x20')+'\x20'+colorBorder('│',_0x1a01b8));});const _0x44531d=_0x1974a5['reduce']((_0x27203d,_0x242d5e)=>_0x27203d+_0x242d5e+0x3,-0x1);_0x342eec[_0x3df6e8(0x1ff)](colorBorder('├'+_0x1974a5[_0x3df6e8(0x201)](_0x284260=>'─'[_0x3df6e8(0x210)](_0x284260+0x2))['join']('┴')+'┤',_0x1a01b8));let _0xfd4c2e;_0x3de2b6?_0xfd4c2e=_0x581e02+'\x20rows\x20('+_0x4cabba+_0x3df6e8(0x1fe):_0xfd4c2e=_0x581e02+_0x3df6e8(0x213)+(_0x581e02===0x1?'':'s');const _0x2c32d1=_0xfd4c2e[_0x3df6e8(0x221)](_0x44531d-0x2);return _0x342eec[_0x3df6e8(0x1ff)](colorBorder('│',_0x1a01b8)+'\x20'+_0x2c32d1+'\x20'+colorBorder('│',_0x1a01b8)),_0x342eec[_0x3df6e8(0x1ff)](colorBorder('└'+'─'[_0x3df6e8(0x210)](_0x44531d)+'┘',_0x1a01b8)),_0x342eec['join']('\x0a');}function simplifyType(_0x5bc354){const _0x2f9d01=a85_0x2af6,_0x98bfdc={'varchar':_0x2f9d01(0x1f8),'bigint':_0x2f9d01(0x202),'integer':_0x2f9d01(0x20c),'double':'double','boolean':_0x2f9d01(0x1fb),'date':_0x2f9d01(0x222),'timestamp':_0x2f9d01(0x1fc),'array':_0x2f9d01(0x206),'map':_0x2f9d01(0x201),'row':_0x2f9d01(0x20a)},_0x10ce92=_0x5bc354['toLowerCase']();for(const [_0x3d0628,_0xdfbc8b]of Object[_0x2f9d01(0x21b)](_0x98bfdc)){if(_0x10ce92[_0x2f9d01(0x1f9)](_0x3d0628))return _0xdfbc8b;}return _0x5bc354[_0x2f9d01(0x1ee)]>0xa?_0x5bc354[_0x2f9d01(0x1f0)](0x0,0xa):_0x5bc354;}export function formatAsJSON(_0xb2b525,_0x174ea4={}){const _0x58719e=a85_0x2af6;if(_0xb2b525['data']['length']===0x0)return'[]';if(shouldUseColor(_0x174ea4))return colorizeJSON(_0xb2b525[_0x58719e(0x21c)],_0x174ea4);const _0x5b2e13=_0xb2b525['data'][_0x58719e(0x201)](_0x657ca5=>'\x20\x20'+JSON[_0x58719e(0x21a)](_0x657ca5));return'[\x0a'+_0x5b2e13[_0x58719e(0x1f4)](',\x0a')+'\x0a]';}function a85_0x109e(){const _0x2e5501=['array','156bDWWVr','json','toFixed','row','jsonl','int','name','false','replace','repeat','toString','tsv','\x20row','forEach','test','2372209cwHFkb','floor','max','true','stringify','entries','data','89090pMGLSN','1576551oozxiz','pow','boolean','padEnd','date','number','9392499QoMLtU','3lYgnBB','length','slice','substring','columns','min','3012184zkOeLd','join','log','1730164WUZQZP','stdout','string','startsWith','No\x20rows\x20returned','bool','timestamp','74522AQdVdO','\x20shown)','push','toISOString','map','long','object','type','0\x20B'];a85_0x109e=function(){return _0x2e5501;};return a85_0x109e();}export function formatAsJSONL(_0xc7b459,_0x573f8b={}){const _0x221946=a85_0x2af6;if(_0xc7b459['data']['length']===0x0)return'';if(shouldUseColor(_0x573f8b))return _0xc7b459[_0x221946(0x21c)][_0x221946(0x201)](_0x34bb59=>colorizeJSONCompact(_0x34bb59,_0x573f8b))[_0x221946(0x1f4)]('\x0a');return _0xc7b459[_0x221946(0x21c)]['map'](_0x232dd4=>JSON[_0x221946(0x21a)](_0x232dd4))[_0x221946(0x1f4)]('\x0a');}export function formatAsTSV(_0x2f43cf){const _0x299de0=a85_0x2af6;if(_0x2f43cf[_0x299de0(0x21c)]['length']===0x0)return'';const _0x477e36=[],_0x3445a6=_0x2f43cf['columns'][_0x299de0(0x201)](_0x18e14e=>_0x18e14e[_0x299de0(0x20d)]);return _0x477e36['push'](_0x3445a6['join']('\x09')),_0x2f43cf[_0x299de0(0x21c)][_0x299de0(0x214)](_0x59fbdd=>{const _0x452355=_0x299de0,_0x1a729e=_0x3445a6[_0x452355(0x201)](_0xaa94fb=>{const _0x59292c=_0x59fbdd[_0xaa94fb];return formatValueForTSV(_0x59292c);});_0x477e36[_0x452355(0x1ff)](_0x1a729e[_0x452355(0x1f4)]('\x09'));}),_0x477e36[_0x299de0(0x1f4)]('\x0a');}function formatValue(_0x3354d9){const _0x9728e3=a85_0x2af6;if(_0x3354d9===null||_0x3354d9===undefined)return'';if(typeof _0x3354d9===_0x9728e3(0x1f8)){const _0x15cc4c=_0x3354d9[_0x9728e3(0x20f)](/\n/g,'\x5cn')[_0x9728e3(0x20f)](/\r/g,'\x5cr')[_0x9728e3(0x20f)](/\t/g,'\x5ct');return _0x15cc4c;}if(typeof _0x3354d9===_0x9728e3(0x223))return String(_0x3354d9);if(typeof _0x3354d9==='boolean')return _0x3354d9?_0x9728e3(0x219):_0x9728e3(0x20e);if(_0x3354d9 instanceof Date)return _0x3354d9[_0x9728e3(0x200)]();if(typeof _0x3354d9===_0x9728e3(0x203))return JSON['stringify'](_0x3354d9);return String(_0x3354d9);}function formatValueForTSV(_0x2fda9e){const _0x5d2c3d=a85_0x2af6;if(_0x2fda9e===null||_0x2fda9e===undefined)return'';if(typeof _0x2fda9e===_0x5d2c3d(0x1f8))return _0x2fda9e[_0x5d2c3d(0x20f)](/\t/g,'\x5ct')[_0x5d2c3d(0x20f)](/\n/g,'\x5cn');if(typeof _0x2fda9e===_0x5d2c3d(0x223)||typeof _0x2fda9e===_0x5d2c3d(0x220))return String(_0x2fda9e);if(_0x2fda9e instanceof Date)return _0x2fda9e[_0x5d2c3d(0x200)]();if(typeof _0x2fda9e===_0x5d2c3d(0x203))return JSON[_0x5d2c3d(0x21a)](_0x2fda9e);return String(_0x2fda9e);}export function formatQueryResult(_0x97f23e,_0x567b44){const _0x391890=a85_0x2af6;switch(_0x567b44){case'table':return formatAsTable(_0x97f23e);case _0x391890(0x208):return formatAsJSON(_0x97f23e);case _0x391890(0x20b):return formatAsJSONL(_0x97f23e);case _0x391890(0x212):return formatAsTSV(_0x97f23e);default:return formatAsJSON(_0x97f23e);}}export function formatBytes(_0x2d06d0){const _0x2812af=a85_0x2af6;if(_0x2d06d0===0x0)return _0x2812af(0x205);const _0x91b936=['B','KB','MB','GB','TB'],_0x1caebf=0x400,_0x494e6a=Math[_0x2812af(0x217)](Math[_0x2812af(0x1f5)](_0x2d06d0)/Math[_0x2812af(0x1f5)](_0x1caebf)),_0x2857f6=_0x2d06d0/Math['pow'](_0x1caebf,_0x494e6a),_0xc6186b=_0x2857f6>=0xa?0x1:0x2;return _0x2857f6[_0x2812af(0x209)](_0xc6186b)+'\x20'+_0x91b936[_0x494e6a];}export function formatRows(_0x4833e2){const _0x2f6180=a85_0x2af6;if(_0x4833e2==null)return'-';if(_0x4833e2===0x0)return'0';if(_0x4833e2<0x3e8)return _0x4833e2[_0x2f6180(0x211)]();const _0x4e7fa1=['','K','M','B','T'],_0x2af266=0x3e8,_0x4745d5=Math['floor'](Math[_0x2f6180(0x1f5)](_0x4833e2)/Math['log'](_0x2af266)),_0xfe8d29=_0x4833e2/Math[_0x2f6180(0x21f)](_0x2af266,_0x4745d5),_0xa7e832=_0xfe8d29>=0xa?0x1:0x2;return''+_0xfe8d29[_0x2f6180(0x209)](_0xa7e832)+_0x4e7fa1[_0x4745d5];}
|
|
1
|
+
(function(_0x4662ce,_0x3e6984){const _0x342e62=a85_0x1f21,_0x41c846=_0x4662ce();while(!![]){try{const _0x4dec04=parseInt(_0x342e62(0x143))/0x1+parseInt(_0x342e62(0x11c))/0x2*(parseInt(_0x342e62(0x119))/0x3)+parseInt(_0x342e62(0x122))/0x4*(-parseInt(_0x342e62(0x130))/0x5)+-parseInt(_0x342e62(0x132))/0x6*(parseInt(_0x342e62(0x12f))/0x7)+-parseInt(_0x342e62(0x123))/0x8+parseInt(_0x342e62(0x138))/0x9*(parseInt(_0x342e62(0x113))/0xa)+parseInt(_0x342e62(0x12d))/0xb;if(_0x4dec04===_0x3e6984)break;else _0x41c846['push'](_0x41c846['shift']());}catch(_0x4ac453){_0x41c846['push'](_0x41c846['shift']());}}}(a85_0x2ae2,0x85ddf));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x47770c=a85_0x1f21;return process[_0x47770c(0x112)][_0x47770c(0x114)]||Infinity;}export function formatAsTable(_0x2c3bf1,_0xa1bd78=DEFAULT_MAX_DISPLAY_ROWS,_0x3cbb67=![],_0xecfb2a={}){const _0x596d12=a85_0x1f21;if(_0x2c3bf1[_0x596d12(0x11b)][_0x596d12(0x139)]===0x0)return'No\x20rows\x20returned';const _0x39939a=_0x2c3bf1[_0x596d12(0x114)][_0x596d12(0x136)](_0x147318=>_0x147318[_0x596d12(0x126)]),_0x26ac25=_0x2c3bf1['columns']['map'](_0x3382f9=>simplifyType(_0x3382f9['type'])),_0x5cb8ba=_0x2c3bf1[_0x596d12(0x11b)][_0x596d12(0x12e)](0x0,_0xa1bd78),_0x5c0207=_0x2c3bf1['data'][_0x596d12(0x139)],_0x37d145=_0x5c0207>_0xa1bd78,_0x1ea5bc=[],_0x419cf1=getTerminalWidth(),_0x1a4764=_0x419cf1!==Infinity,_0x413437=0x32;let _0x3710df=_0x39939a[_0x596d12(0x136)]((_0xa3ab05,_0x30bd82)=>{const _0x4cb96=_0x596d12,_0x33db57=stringWidth(_0x26ac25[_0x30bd82]),_0x2239fd=Math[_0x4cb96(0x131)](..._0x5cb8ba[_0x4cb96(0x136)](_0x580ede=>{const _0x79d4ee=_0x580ede[_0xa3ab05];return stringWidth(formatValue(_0x79d4ee));})),_0x559389=Math[_0x4cb96(0x131)](stringWidth(_0xa3ab05),_0x33db57,_0x2239fd);return _0x3cbb67?_0x559389:Math[_0x4cb96(0x115)](_0x559389,_0x413437);});if(_0x1a4764&&!_0x3cbb67&&_0x39939a[_0x596d12(0x139)]>0x0){const _0x202181=_0x1e05cc=>{let _0x57f013=0x1;for(const _0x5dd932 of _0x1e05cc){_0x57f013+=_0x5dd932+0x3;}return _0x57f013+0x1;};let _0x29fa5f=_0x202181(_0x3710df);if(_0x29fa5f>_0x419cf1){const _0x2a67af=0x3;for(let _0x3621c5=_0x3710df[_0x596d12(0x139)]-0x1;_0x3621c5>=0x0;_0x3621c5--){_0x29fa5f=_0x202181(_0x3710df);if(_0x29fa5f<=_0x419cf1)break;const _0x566c1d=_0x3710df[_0x3621c5],_0x41580a=_0x29fa5f-_0x419cf1,_0x2a1d03=_0x566c1d-_0x2a67af,_0x38e31f=Math['min'](_0x41580a,_0x2a1d03);_0x38e31f>0x0&&(_0x3710df[_0x3621c5]=_0x566c1d-_0x38e31f);}}}const _0x4f40b7=_0x39939a,_0x525f5d=_0x26ac25,_0x303923=_0x3710df,_0x7155ac=_0x3710df;_0x1ea5bc[_0x596d12(0x135)](colorBorder('┌'+_0x7155ac[_0x596d12(0x136)](_0x22a58e=>'─'[_0x596d12(0x120)](_0x22a58e+0x2))[_0x596d12(0x110)]('┬')+'┐',_0xecfb2a));const _0x8117bf=_0x4f40b7[_0x596d12(0x136)]((_0x509615,_0x43384f)=>centerAlign(_0x509615,_0x303923[_0x43384f]));_0x1ea5bc[_0x596d12(0x135)](colorBorder('│',_0xecfb2a)+'\x20'+_0x8117bf['join']('\x20'+colorBorder('│',_0xecfb2a)+'\x20')+'\x20'+colorBorder('│',_0xecfb2a));const _0x4b88c8=_0x525f5d[_0x596d12(0x136)]((_0x21a14b,_0x5d1a62)=>colorType(centerAlign(_0x21a14b,_0x303923[_0x5d1a62]),_0xecfb2a));_0x1ea5bc['push'](colorBorder('│',_0xecfb2a)+'\x20'+_0x4b88c8[_0x596d12(0x110)]('\x20'+colorBorder('│',_0xecfb2a)+'\x20')+'\x20'+colorBorder('│',_0xecfb2a)),_0x1ea5bc['push'](colorBorder('├'+_0x7155ac[_0x596d12(0x136)](_0x5413a7=>'─'['repeat'](_0x5413a7+0x2))[_0x596d12(0x110)]('┼')+'┤',_0xecfb2a));const _0x7e6605=(_0xdf01c1,_0x57a47b)=>{const _0x461fbe=_0x596d12,_0x315406=stringWidth(_0xdf01c1);if(_0x315406<=_0x57a47b)return _0xdf01c1;let _0x476900=_0xdf01c1;while(stringWidth(_0x476900+'…')>_0x57a47b&&_0x476900[_0x461fbe(0x139)]>0x0){_0x476900=_0x476900[_0x461fbe(0x12e)](0x0,-0x1);}return _0x476900+'…';};_0x5cb8ba['forEach'](_0x2fa104=>{const _0x432bab=_0x596d12,_0x3f2a49=_0x39939a['map']((_0x134914,_0x510f09)=>{const _0xff2f56=a85_0x1f21,_0x1ac984=_0x2fa104[_0x134914],_0x5cf050=formatValue(_0x1ac984),_0x5c7cb3=_0x303923[_0x510f09],_0x24e021=_0x7e6605(_0x5cf050,_0x5c7cb3),_0x1d687d=typeof _0x1ac984==='number'||typeof _0x1ac984==='string'&&/^-?\d+$/[_0xff2f56(0x13f)](_0x1ac984);return _0x1d687d?padStart(_0x24e021,_0x5c7cb3):padEnd(_0x24e021,_0x5c7cb3);});_0x1ea5bc[_0x432bab(0x135)](colorBorder('│',_0xecfb2a)+'\x20'+_0x3f2a49[_0x432bab(0x110)]('\x20'+colorBorder('│',_0xecfb2a)+'\x20')+'\x20'+colorBorder('│',_0xecfb2a));});const _0x4e57f8=_0x7155ac['reduce']((_0x3ebbca,_0x4d6380)=>_0x3ebbca+_0x4d6380+0x3,-0x1);_0x1ea5bc[_0x596d12(0x135)](colorBorder('├'+_0x7155ac[_0x596d12(0x136)](_0x405ac7=>'─'[_0x596d12(0x120)](_0x405ac7+0x2))[_0x596d12(0x110)]('┴')+'┤',_0xecfb2a));let _0x15b1dd;_0x37d145?_0x15b1dd=_0x5c0207+_0x596d12(0x140)+_0xa1bd78+'\x20shown)':_0x15b1dd=_0x5c0207+'\x20row'+(_0x5c0207===0x1?'':'s');const _0x5c7a84=_0x15b1dd['padEnd'](_0x4e57f8-0x2);return _0x1ea5bc[_0x596d12(0x135)](colorBorder('│',_0xecfb2a)+'\x20'+_0x5c7a84+'\x20'+colorBorder('│',_0xecfb2a)),_0x1ea5bc['push'](colorBorder('└'+'─'[_0x596d12(0x120)](_0x4e57f8)+'┘',_0xecfb2a)),_0x1ea5bc[_0x596d12(0x110)]('\x0a');}function a85_0x1f21(_0xb6755b,_0x41f271){const _0x2ae296=a85_0x2ae2();return a85_0x1f21=function(_0x1f2100,_0x1a8e12){_0x1f2100=_0x1f2100-0x110;let _0x1d28e7=_0x2ae296[_0x1f2100];return _0x1d28e7;},a85_0x1f21(_0xb6755b,_0x41f271);}function simplifyType(_0x4abaf4){const _0x18cc23=a85_0x1f21,_0x2738e8={'varchar':_0x18cc23(0x118),'bigint':_0x18cc23(0x124),'integer':'int','double':_0x18cc23(0x13e),'boolean':_0x18cc23(0x141),'date':'date','timestamp':'timestamp','array':'array','map':_0x18cc23(0x136),'row':_0x18cc23(0x117)},_0x49db76=_0x4abaf4[_0x18cc23(0x111)]();for(const [_0x470836,_0x1f3739]of Object[_0x18cc23(0x13c)](_0x2738e8)){if(_0x49db76[_0x18cc23(0x12c)](_0x470836))return _0x1f3739;}return _0x4abaf4['length']>0xa?_0x4abaf4[_0x18cc23(0x137)](0x0,0xa):_0x4abaf4;}export function formatAsJSON(_0x4af418,_0x1f0cf9={}){const _0x5ce23e=a85_0x1f21;if(_0x4af418['data'][_0x5ce23e(0x139)]===0x0)return'[]';if(shouldUseColor(_0x1f0cf9))return colorizeJSON(_0x4af418[_0x5ce23e(0x11b)],_0x1f0cf9);const _0x235ddc=_0x4af418['data'][_0x5ce23e(0x136)](_0x55f60a=>'\x20\x20'+JSON[_0x5ce23e(0x12b)](_0x55f60a));return'[\x0a'+_0x235ddc[_0x5ce23e(0x110)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x47a0bb,_0x3375ff={}){const _0xf9fbea=a85_0x1f21;if(_0x47a0bb[_0xf9fbea(0x11b)][_0xf9fbea(0x139)]===0x0)return'';if(shouldUseColor(_0x3375ff))return _0x47a0bb[_0xf9fbea(0x11b)][_0xf9fbea(0x136)](_0x1c232a=>colorizeJSONCompact(_0x1c232a,_0x3375ff))['join']('\x0a');return _0x47a0bb['data']['map'](_0x24d1eb=>JSON[_0xf9fbea(0x12b)](_0x24d1eb))[_0xf9fbea(0x110)]('\x0a');}export function formatAsTSV(_0x14c7df){const _0xcd8719=a85_0x1f21;if(_0x14c7df[_0xcd8719(0x11b)][_0xcd8719(0x139)]===0x0)return'';const _0x4839ed=[],_0x232d01=_0x14c7df[_0xcd8719(0x114)][_0xcd8719(0x136)](_0x189164=>_0x189164[_0xcd8719(0x126)]);return _0x4839ed[_0xcd8719(0x135)](_0x232d01[_0xcd8719(0x110)]('\x09')),_0x14c7df['data'][_0xcd8719(0x11d)](_0x387cf4=>{const _0x2294a2=_0xcd8719,_0x153c4a=_0x232d01[_0x2294a2(0x136)](_0x2c772e=>{const _0x3c6815=_0x387cf4[_0x2c772e];return formatValueForTSV(_0x3c6815);});_0x4839ed['push'](_0x153c4a[_0x2294a2(0x110)]('\x09'));}),_0x4839ed[_0xcd8719(0x110)]('\x0a');}function formatValue(_0x394f03){const _0x25fbb5=a85_0x1f21;if(_0x394f03===null||_0x394f03===undefined)return'';if(typeof _0x394f03===_0x25fbb5(0x118)){const _0x49e371=_0x394f03[_0x25fbb5(0x13b)](/\n/g,'\x5cn')[_0x25fbb5(0x13b)](/\r/g,'\x5cr')[_0x25fbb5(0x13b)](/\t/g,'\x5ct');return _0x49e371;}if(typeof _0x394f03===_0x25fbb5(0x129))return String(_0x394f03);if(typeof _0x394f03===_0x25fbb5(0x121))return _0x394f03?_0x25fbb5(0x127):_0x25fbb5(0x128);if(_0x394f03 instanceof Date)return _0x394f03[_0x25fbb5(0x12a)]();if(typeof _0x394f03===_0x25fbb5(0x13d))return JSON[_0x25fbb5(0x12b)](_0x394f03);return String(_0x394f03);}function a85_0x2ae2(){const _0x2e2bf8=['4100240sCujkq','long','toFixed','name','true','false','number','toISOString','stringify','startsWith','11184437EjXraf','slice','890911oRHqyk','593585yrVsnT','max','24FhNfBa','toString','jsonl','push','map','substring','7807545hghKux','length','0\x20B','replace','entries','object','double','test','\x20rows\x20(','bool','json','141839uGppDu','join','toLowerCase','stdout','10DwfadZ','columns','min','pow','row','string','1124547ALwUbY','log','data','2rGigHU','forEach','floor','tsv','repeat','boolean','28DPjqFS'];a85_0x2ae2=function(){return _0x2e2bf8;};return a85_0x2ae2();}function formatValueForTSV(_0xaa016e){const _0x199c56=a85_0x1f21;if(_0xaa016e===null||_0xaa016e===undefined)return'';if(typeof _0xaa016e==='string')return _0xaa016e[_0x199c56(0x13b)](/\t/g,'\x5ct')[_0x199c56(0x13b)](/\n/g,'\x5cn');if(typeof _0xaa016e==='number'||typeof _0xaa016e===_0x199c56(0x121))return String(_0xaa016e);if(_0xaa016e instanceof Date)return _0xaa016e['toISOString']();if(typeof _0xaa016e===_0x199c56(0x13d))return JSON[_0x199c56(0x12b)](_0xaa016e);return String(_0xaa016e);}export function formatQueryResult(_0x499ac3,_0x528fdc){const _0x13bb9f=a85_0x1f21;switch(_0x528fdc){case'table':return formatAsTable(_0x499ac3);case _0x13bb9f(0x142):return formatAsJSON(_0x499ac3);case _0x13bb9f(0x134):return formatAsJSONL(_0x499ac3);case _0x13bb9f(0x11f):return formatAsTSV(_0x499ac3);default:return formatAsJSON(_0x499ac3);}}export function formatBytes(_0xd4b6e1){const _0x3911bf=a85_0x1f21;if(_0xd4b6e1===0x0)return _0x3911bf(0x13a);const _0x2a0f22=['B','KB','MB','GB','TB'],_0x2e5b4a=0x400,_0x372052=Math[_0x3911bf(0x11e)](Math[_0x3911bf(0x11a)](_0xd4b6e1)/Math[_0x3911bf(0x11a)](_0x2e5b4a)),_0x2118f1=_0xd4b6e1/Math[_0x3911bf(0x116)](_0x2e5b4a,_0x372052),_0x4645dd=_0x2118f1>=0xa?0x1:0x2;return _0x2118f1[_0x3911bf(0x125)](_0x4645dd)+'\x20'+_0x2a0f22[_0x372052];}export function formatRows(_0x10d38a){const _0x4a6fbe=a85_0x1f21;if(_0x10d38a==null)return'-';if(_0x10d38a===0x0)return'0';if(_0x10d38a<0x3e8)return _0x10d38a[_0x4a6fbe(0x133)]();const _0x1452cb=['','K','M','B','T'],_0x17375a=0x3e8,_0x5a99d0=Math['floor'](Math[_0x4a6fbe(0x11a)](_0x10d38a)/Math[_0x4a6fbe(0x11a)](_0x17375a)),_0xf07e1a=_0x10d38a/Math[_0x4a6fbe(0x116)](_0x17375a,_0x5a99d0),_0x9136ea=_0xf07e1a>=0xa?0x1:0x2;return''+_0xf07e1a[_0x4a6fbe(0x125)](_0x9136ea)+_0x1452cb[_0x5a99d0];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32f243,_0x544d7a){const _0x5049b7=a86_0x4bd2,_0x38d15c=_0x32f243();while(!![]){try{const _0x5ea280=parseInt(_0x5049b7(0x1a0))/0x1*(parseInt(_0x5049b7(0x1a6))/0x2)+-parseInt(_0x5049b7(0x19d))/0x3*(parseInt(_0x5049b7(0x19f))/0x4)+parseInt(_0x5049b7(0x1af))/0x5*(parseInt(_0x5049b7(0x1ac))/0x6)+-parseInt(_0x5049b7(0x1b0))/0x7+parseInt(_0x5049b7(0x1a9))/0x8*(parseInt(_0x5049b7(0x19a))/0x9)+-parseInt(_0x5049b7(0x199))/0xa+-parseInt(_0x5049b7(0x1a7))/0xb*(-parseInt(_0x5049b7(0x197))/0xc);if(_0x5ea280===_0x544d7a)break;else _0x38d15c['push'](_0x38d15c['shift']());}catch(_0x4abdcd){_0x38d15c['push'](_0x38d15c['shift']());}}}(a86_0x2c4c,0xbf0a2));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a86_0x4bd2(_0x9f0556,_0x329231){const _0x2c4cd6=a86_0x2c4c();return a86_0x4bd2=function(_0x4bd25e,_0x36b0a2){_0x4bd25e=_0x4bd25e-0x196;let _0x90e865=_0x2c4cd6[_0x4bd25e];return _0x90e865;},a86_0x4bd2(_0x9f0556,_0x329231);}function a86_0x2c4c(){const _0x4f1934=['101409wuWbyk','Invalid\x20JSON\x20string:\x20','33344OefPzk','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','message','3900870bMiFEk','ENOENT','code','5cuituG','7495572UTsTBR','NOT_FOUND','1836GOcMYp','PERMISSION_DENIED','8508670arxWFM','189CfshwL','Invalid\x20JSON\x20in\x20file\x20\x27','Failed\x20to\x20load\x20JSON:\x20','3EXNNUd','Permission\x20denied\x20reading\x20file:\x20','1140832BZwduT','841189VgGBHz','parse','EACCES','File\x20not\x20found:\x20','INVALID_ARGUMENT','INTERNAL','2bQSNhw'];a86_0x2c4c=function(){return _0x4f1934;};return a86_0x2c4c();}export async function loadJSON(_0x38cc2e,_0x2b6d27){const _0x4997ca=a86_0x4bd2;try{if(_0x2b6d27){const _0x33038d=await readFile(_0x38cc2e,'utf-8');try{return JSON[_0x4997ca(0x1a1)](_0x33038d);}catch(_0x110999){throw new SDKError(ErrorCode[_0x4997ca(0x1a4)],_0x4997ca(0x19b)+_0x38cc2e+'\x27:\x20'+(_0x110999 instanceof Error?_0x110999[_0x4997ca(0x1ab)]:String(_0x110999)));}}else try{return JSON['parse'](_0x38cc2e);}catch(_0x39c64c){throw new SDKError(ErrorCode[_0x4997ca(0x1a4)],_0x4997ca(0x1a8)+(_0x39c64c instanceof Error?_0x39c64c['message']:String(_0x39c64c)));}}catch(_0x42c548){if(_0x42c548 instanceof SDKError)throw _0x42c548;if(_0x42c548 instanceof Error&&_0x4997ca(0x1ae)in _0x42c548){const _0x48283b=_0x42c548;if(_0x48283b[_0x4997ca(0x1ae)]===_0x4997ca(0x1ad))throw new SDKError(ErrorCode[_0x4997ca(0x196)],_0x4997ca(0x1a3)+_0x38cc2e);else{if(_0x48283b['code']===_0x4997ca(0x1a2))throw new SDKError(ErrorCode[_0x4997ca(0x198)],_0x4997ca(0x19e)+_0x38cc2e);}}throw new SDKError(ErrorCode[_0x4997ca(0x1a5)],_0x4997ca(0x19c)+(_0x42c548 instanceof Error?_0x42c548[_0x4997ca(0x1ab)]:String(_0x42c548)));}}export async function loadJSONFromOptions(_0x592671,_0x2b02ce){const _0x1db25e=a86_0x4bd2;if(_0x592671&&_0x2b02ce)throw new SDKError(ErrorCode[_0x1db25e(0x1a4)],_0x1db25e(0x1aa));if(_0x592671)return await loadJSON(_0x592671,![]);if(_0x2b02ce)return await loadJSON(_0x2b02ce,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5cc21d,_0x9d4fd6){const _0x49b0dd=a87_0x4424,_0x36405e=_0x5cc21d();while(!![]){try{const _0x48cf22=-parseInt(_0x49b0dd(0x1b4))/0x1+parseInt(_0x49b0dd(0x1b8))/0x2*(parseInt(_0x49b0dd(0x1ba))/0x3)+-parseInt(_0x49b0dd(0x1b5))/0x4*(parseInt(_0x49b0dd(0x1c2))/0x5)+-parseInt(_0x49b0dd(0x1bd))/0x6*(-parseInt(_0x49b0dd(0x1c4))/0x7)+-parseInt(_0x49b0dd(0x1b3))/0x8*(parseInt(_0x49b0dd(0x1b2))/0x9)+parseInt(_0x49b0dd(0x1c3))/0xa*(parseInt(_0x49b0dd(0x1bb))/0xb)+parseInt(_0x49b0dd(0x1b9))/0xc*(parseInt(_0x49b0dd(0x1bf))/0xd);if(_0x48cf22===_0x9d4fd6)break;else _0x36405e['push'](_0x36405e['shift']());}catch(_0x22f367){_0x36405e['push'](_0x36405e['shift']());}}}(a87_0x2d9b,0x5b55e));function a87_0x2d9b(){const _0x40a34c=['1446gacjrl','targetAgentId','69121eJEebQ','tools','attributes','5GhGiAq','10IhMEQe','16723cLGOwW','map','has','3205143yFpaTe','16siLlgp','82311udBYLy','1784428TIyvFt','get','targetKnowledgeBaseId','1120510IbESSD','504IJNKsu','3zNwEmh','2810104ipjPMm','1.0'];a87_0x2d9b=function(){return _0x40a34c;};return a87_0x2d9b();}export function canCreateAgent(_0x1e239b,_0x5c8357){const _0x525ff1=a87_0x4424;for(const _0x424a16 of _0x1e239b[_0x525ff1(0x1c1)][_0x525ff1(0x1c0)]){if(_0x424a16[_0x525ff1(0x1be)]&&!_0x5c8357[_0x525ff1(0x1c6)](_0x424a16[_0x525ff1(0x1be)]))return![];}return!![];}export function remapToolIds(_0x219584,_0x35f9fe,_0x378122){const _0x722ef9=a87_0x4424;return _0x219584[_0x722ef9(0x1c5)](_0x525837=>({..._0x525837,'targetKnowledgeBaseId':_0x525837[_0x722ef9(0x1b7)]?_0x35f9fe[_0x722ef9(0x1b6)](_0x525837['targetKnowledgeBaseId'])||_0x525837[_0x722ef9(0x1b7)]:undefined,'targetAgentId':_0x525837['targetAgentId']?_0x378122['get'](_0x525837[_0x722ef9(0x1be)])||_0x525837[_0x722ef9(0x1be)]:undefined}));}function a87_0x4424(_0x56d3b9,_0x146298){const _0x2d9b25=a87_0x2d9b();return a87_0x4424=function(_0x4424a1,_0x92061c){_0x4424a1=_0x4424a1-0x1b2;let _0x5bc72f=_0x2d9b25[_0x4424a1];return _0x5bc72f;},a87_0x4424(_0x56d3b9,_0x146298);}export function remapVariableIds(_0x6dad84,_0x5ea9fa){const _0x2c35cf=a87_0x4424;return _0x6dad84[_0x2c35cf(0x1c5)](_0x1ec616=>({..._0x1ec616,'targetKnowledgeBaseId':_0x5ea9fa['get'](_0x1ec616['targetKnowledgeBaseId'])||_0x1ec616[_0x2c35cf(0x1b7)]}));}export function isSupportedBackupVersion(_0x58fa9d){const _0x25df7a=a87_0x4424;return _0x58fa9d===_0x25df7a(0x1bc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x357afb=a88_0x4791;function a88_0x1563(){const _0x45d604=['236799dUnUAx','match','claude-4.5-sonnet','2840760hJAEvt','6qtjGwv','442475DwwikD','2116VQuiQC','4589809hOnCLK','toLowerCase','5589UNYCkE','2278090dkaVRz','185683KZCmfg','176ddBCYO','6LQhTlX','claude-4.5-haiku'];a88_0x1563=function(){return _0x45d604;};return a88_0x1563();}function a88_0x4791(_0x1b05a3,_0x1701f6){const _0x156374=a88_0x1563();return a88_0x4791=function(_0x4791b0,_0x32c698){_0x4791b0=_0x4791b0-0x18f;let _0x327cff=_0x156374[_0x4791b0];return _0x327cff;},a88_0x4791(_0x1b05a3,_0x1701f6);}(function(_0x44f61f,_0x2d3442){const _0x377302=a88_0x4791,_0x465a3f=_0x44f61f();while(!![]){try{const _0x1f5b27=parseInt(_0x377302(0x191))/0x1*(parseInt(_0x377302(0x199))/0x2)+parseInt(_0x377302(0x18f))/0x3*(parseInt(_0x377302(0x19b))/0x4)+-parseInt(_0x377302(0x198))/0x5+-parseInt(_0x377302(0x193))/0x6*(parseInt(_0x377302(0x19c))/0x7)+-parseInt(_0x377302(0x192))/0x8*(-parseInt(_0x377302(0x195))/0x9)+-parseInt(_0x377302(0x190))/0xa+-parseInt(_0x377302(0x19a))/0xb;if(_0x1f5b27===_0x2d3442)break;else _0x465a3f['push'](_0x465a3f['shift']());}catch(_0x26051a){_0x465a3f['push'](_0x465a3f['shift']());}}}(a88_0x1563,0x99b29));const MODEL_ALIASES={'haiku':a88_0x357afb(0x194),'sonnet':a88_0x357afb(0x197)};export function extractModelAlias(_0x5ab37b){const _0x3cdd93=a88_0x357afb,_0x103afc=_0x5ab37b[_0x3cdd93(0x196)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x103afc)return _0x103afc[0x1][_0x3cdd93(0x19d)]();return _0x5ab37b;}export function resolveModelAlias(_0x42d08f){return MODEL_ALIASES[_0x42d08f['toLowerCase']()]||_0x42d08f;}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bb756,_0x15037f){const _0x10355a=a89_0x514f,_0x55cc63=_0x2bb756();while(!![]){try{const _0x546247=parseInt(_0x10355a(0x183))/0x1*(parseInt(_0x10355a(0x187))/0x2)+-parseInt(_0x10355a(0x17d))/0x3*(-parseInt(_0x10355a(0x184))/0x4)+parseInt(_0x10355a(0x18c))/0x5+-parseInt(_0x10355a(0x186))/0x6+parseInt(_0x10355a(0x17a))/0x7*(-parseInt(_0x10355a(0x193))/0x8)+-parseInt(_0x10355a(0x190))/0x9+parseInt(_0x10355a(0x17c))/0xa*(parseInt(_0x10355a(0x185))/0xb);if(_0x546247===_0x15037f)break;else _0x55cc63['push'](_0x55cc63['shift']());}catch(_0x4f7668){_0x55cc63['push'](_0x55cc63['shift']());}}}(a89_0x5d4d,0xbc8ae));function a89_0x514f(_0x2dfcf0,_0x2fe7e7){const _0x5d4d71=a89_0x5d4d();return a89_0x514f=function(_0x514f04,_0x31799c){_0x514f04=_0x514f04-0x179;let _0x11d5ad=_0x5d4d71[_0x514f04];return _0x11d5ad;},a89_0x514f(_0x2dfcf0,_0x2fe7e7);}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 a89_0x5d4d(){const _0x4d828d=['61340OaCLxN','Haiku\x204','4.5','Haiku\x204.5','4-5','1991085OoZEGf','opus','Sonnet\x204.5','default','9266499MzKayH','includes','en-US','504DWcxcH','sonnet','167496FhYHXa','toLowerCase','56320xxFnjh','57gYpPZl','round','haiku','toLocaleString','Sonnet\x204','Opus\x204','4ZKQXYw','29584KejarP','8151qfemBc','9152328SlpkkA'];a89_0x5d4d=function(){return _0x4d828d;};return a89_0x5d4d();}export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x50beeb){const _0x4f5b0b=a89_0x514f,_0x1d0c8e=_0x50beeb[_0x4f5b0b(0x17b)]();if(MODEL_FACTORS[_0x1d0c8e])return MODEL_FACTORS[_0x1d0c8e];if(_0x1d0c8e[_0x4f5b0b(0x191)](_0x4f5b0b(0x179)))return MODEL_FACTORS[_0x4f5b0b(0x179)];if(_0x1d0c8e[_0x4f5b0b(0x191)](_0x4f5b0b(0x17f)))return MODEL_FACTORS[_0x4f5b0b(0x17f)];if(_0x1d0c8e[_0x4f5b0b(0x191)](_0x4f5b0b(0x18d)))return MODEL_FACTORS[_0x4f5b0b(0x18d)];return MODEL_FACTORS[_0x4f5b0b(0x179)];}export function getContextLimit(_0x39425e){const _0x3ce5b4=a89_0x514f,_0x43ca52=_0x39425e[_0x3ce5b4(0x17b)]();if(_0x43ca52[_0x3ce5b4(0x191)](_0x3ce5b4(0x179)))return CONTEXT_LIMITS[_0x3ce5b4(0x179)];if(_0x43ca52['includes'](_0x3ce5b4(0x17f)))return CONTEXT_LIMITS['haiku'];if(_0x43ca52['includes']('opus'))return CONTEXT_LIMITS[_0x3ce5b4(0x18d)];return CONTEXT_LIMITS[_0x3ce5b4(0x18f)];}export function calculateChatUnit(_0x35acdd,_0x4e06d4,_0x3367da){return(_0x35acdd+_0x4e06d4)/0x1388*_0x3367da;}export function calculateCredits(_0x441a0a){return _0x441a0a/0x2904;}export function getModelDisplayName(_0x42dc01){const _0x1171de=a89_0x514f,_0x3610fc=_0x42dc01[_0x1171de(0x17b)]();if(_0x3610fc['includes']('sonnet')){if(_0x3610fc[_0x1171de(0x191)](_0x1171de(0x18b))||_0x3610fc[_0x1171de(0x191)](_0x1171de(0x189)))return _0x1171de(0x18e);return _0x1171de(0x181);}if(_0x3610fc[_0x1171de(0x191)]('haiku')){if(_0x3610fc['includes'](_0x1171de(0x18b))||_0x3610fc[_0x1171de(0x191)](_0x1171de(0x189)))return _0x1171de(0x18a);return _0x1171de(0x188);}if(_0x3610fc[_0x1171de(0x191)](_0x1171de(0x18d))){if(_0x3610fc[_0x1171de(0x191)]('4-5')||_0x3610fc[_0x1171de(0x191)]('4.5'))return'Opus\x204.5';return _0x1171de(0x182);}return'Claude';}export function formatTokenCount(_0x1373da){const _0x11cc4b=a89_0x514f;return _0x1373da[_0x11cc4b(0x180)](_0x11cc4b(0x192));}export function calculateContextPercentage(_0xb1509d,_0x38ffac){const _0x1dee8c=a89_0x514f,_0x1902be=getContextLimit(_0x38ffac);return Math[_0x1dee8c(0x17e)](_0xb1509d/_0x1902be*0x64);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x43cb55,_0x21f523){const _0x17650e=a90_0x4f20,_0x4aa8b3=_0x43cb55();while(!![]){try{const _0x5b41f2=-parseInt(_0x17650e(0x1a3))/0x1*(parseInt(_0x17650e(0x19b))/0x2)+parseInt(_0x17650e(0x19a))/0x3+parseInt(_0x17650e(0x19e))/0x4+parseInt(_0x17650e(0x1a1))/0x5*(parseInt(_0x17650e(0x1a2))/0x6)+parseInt(_0x17650e(0x197))/0x7+parseInt(_0x17650e(0x198))/0x8+-parseInt(_0x17650e(0x194))/0x9*(parseInt(_0x17650e(0x19d))/0xa);if(_0x5b41f2===_0x21f523)break;else _0x4aa8b3['push'](_0x4aa8b3['shift']());}catch(_0x96c513){_0x4aa8b3['push'](_0x4aa8b3['shift']());}}}(a90_0x2af6,0x5be1f));export function validateLimitOption(_0x2de550){const _0x35df48=a90_0x4f20;if(!Number['isInteger'](_0x2de550))return{'isValid':![],'error':_0x35df48(0x199)+_0x2de550+_0x35df48(0x193)};if(_0x2de550<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x2de550+_0x35df48(0x195)};return{'isValid':!![],'value':_0x2de550};}function a90_0x4f20(_0x11fca1,_0x2724ae){const _0x2af6a0=a90_0x2af6();return a90_0x4f20=function(_0x4f209d,_0x9945b){_0x4f209d=_0x4f209d-0x193;let _0x170bc4=_0x2af6a0[_0x4f209d];return _0x170bc4;},a90_0x4f20(_0x11fca1,_0x2724ae);}export function validateTimeoutOption(_0xb70ae2,_0x2b2af6=0x1e){const _0x1767ac=a90_0x4f20;if(_0xb70ae2===undefined)return{'isValid':!![],'value':_0x2b2af6};const _0x1129a8=typeof _0xb70ae2===_0x1767ac(0x196)?_0xb70ae2:parseFloat(_0xb70ae2);if(isNaN(_0x1129a8))return{'isValid':![],'error':_0x1767ac(0x19c)+_0xb70ae2+_0x1767ac(0x1a0)};if(_0x1129a8<=0x0)return{'isValid':![],'error':_0x1767ac(0x19c)+_0x1129a8+_0x1767ac(0x19f)};return{'isValid':!![],'value':_0x1129a8};}function a90_0x2af6(){const _0x8643fb=['.\x20Must\x20be\x20a\x20number.','362125rQjlpF','6aHqBUj','6uFjXXi','.\x20Must\x20be\x20an\x20integer.','9ksWWsj','.\x20Must\x20be\x20a\x20positive\x20integer.','number','1065351HBjqgZ','1795128pyJafL','Invalid\x20limit\x20value:\x20','1807884JIrFOe','23238OvMAeI','Invalid\x20timeout\x20value:\x20','9704410vtgcka','1459476cusXZN','.\x20Must\x20be\x20a\x20positive\x20number.'];a90_0x2af6=function(){return _0x8643fb;};return a90_0x2af6();}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x186560,_0x309b8c){const _0x27d298=a91_0x3158,_0x232d12=_0x186560();while(!![]){try{const _0x5cec6b=-parseInt(_0x27d298(0xc9))/0x1*(parseInt(_0x27d298(0xc6))/0x2)+parseInt(_0x27d298(0xcd))/0x3+-parseInt(_0x27d298(0xc3))/0x4*(parseInt(_0x27d298(0xc0))/0x5)+parseInt(_0x27d298(0xd0))/0x6+-parseInt(_0x27d298(0xce))/0x7+-parseInt(_0x27d298(0xc5))/0x8*(-parseInt(_0x27d298(0xc8))/0x9)+parseInt(_0x27d298(0xc4))/0xa*(parseInt(_0x27d298(0xc7))/0xb);if(_0x5cec6b===_0x309b8c)break;else _0x232d12['push'](_0x232d12['shift']());}catch(_0x5e9a41){_0x232d12['push'](_0x232d12['shift']());}}}(a91_0xaf38,0xa7273));function a91_0xaf38(){const _0x2e1677=['code','once','1178433zSJKjK','9122638ZhMHxe','listening','4355970IDVrqP','50430fFmpPK','No\x20available\x20port\x20found\x20between\x20','listen','428YsuqGI','20780qqWZQO','8qeXpdf','736456pjnicq','6017WEzoeJ','10618659oVKkUz','1vFJoik','error'];a91_0xaf38=function(){return _0x2e1677;};return a91_0xaf38();}import{createServer}from'node:net';export async function isPortAvailable(_0xd85b5e){return new Promise(_0x1909e3=>{const _0x52b961=a91_0x3158,_0x50c39c=createServer();_0x50c39c[_0x52b961(0xcc)](_0x52b961(0xca),_0x125e5a=>{const _0x344134=_0x52b961;_0x125e5a[_0x344134(0xcb)]==='EADDRINUSE'?_0x1909e3(![]):_0x1909e3(![]);}),_0x50c39c[_0x52b961(0xcc)](_0x52b961(0xcf),()=>{_0x50c39c['close'](),_0x1909e3(!![]);}),_0x50c39c[_0x52b961(0xc2)](_0xd85b5e,'0.0.0.0');});}function a91_0x3158(_0xfda1ef,_0xe2be44){const _0xaf3873=a91_0xaf38();return a91_0x3158=function(_0x315802,_0x3959e6){_0x315802=_0x315802-0xc0;let _0x4e2b8c=_0xaf3873[_0x315802];return _0x4e2b8c;},a91_0x3158(_0xfda1ef,_0xe2be44);}export async function findAvailablePort(_0x90cb09=0xfa0,_0x2ba5b3=0x64){const _0x2cbf15=a91_0x3158;for(let _0x57152d=0x0;_0x57152d<_0x2ba5b3;_0x57152d++){const _0x1a7cd6=_0x90cb09+_0x57152d;if(await isPortAvailable(_0x1a7cd6))return _0x1a7cd6;}throw new Error(_0x2cbf15(0xc1)+_0x90cb09+'\x20and\x20'+(_0x90cb09+_0x2ba5b3-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x32f252=a92_0x1369;(function(_0x6a0e4b,_0x26fbeb){const _0x245d4b=a92_0x1369,_0x384ee6=_0x6a0e4b();while(!![]){try{const _0x182de7=-parseInt(_0x245d4b(0x18a))/0x1*(parseInt(_0x245d4b(0x178))/0x2)+-parseInt(_0x245d4b(0x180))/0x3+-parseInt(_0x245d4b(0x19f))/0x4*(parseInt(_0x245d4b(0x1a1))/0x5)+parseInt(_0x245d4b(0x1a0))/0x6+-parseInt(_0x245d4b(0x197))/0x7+parseInt(_0x245d4b(0x18b))/0x8+parseInt(_0x245d4b(0x192))/0x9;if(_0x182de7===_0x26fbeb)break;else _0x384ee6['push'](_0x384ee6['shift']());}catch(_0x358138){_0x384ee6['push'](_0x384ee6['shift']());}}}(a92_0x4f76,0x8cbaa));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a92_0x32f252(0x191),a92_0x32f252(0x174),'sh',a92_0x32f252(0x18f),a92_0x32f252(0x186),a92_0x32f252(0x198),a92_0x32f252(0x19e),a92_0x32f252(0x187),'pwsh',a92_0x32f252(0x17a),'nu',a92_0x32f252(0x196),a92_0x32f252(0x193),a92_0x32f252(0x182)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a92_0x32f252(0x173),a92_0x32f252(0x175),a92_0x32f252(0x188)]);function getProcessInfoWindows(_0x142e5c){const _0x5551b5=a92_0x32f252;try{const _0x286940=execSync(_0x5551b5(0x179)+_0x142e5c+_0x5551b5(0x18e),{'encoding':'utf-8','windowsHide':!![]})[_0x5551b5(0x199)](),_0x24b3b6=_0x286940['split']('\x0a')[_0x5551b5(0x184)](_0x2382ab=>_0x2382ab[_0x5551b5(0x199)]());if(_0x24b3b6[_0x5551b5(0x17c)]<0x2)return null;const _0x20dde7=_0x24b3b6[_0x24b3b6[_0x5551b5(0x17c)]-0x1]['split'](',');if(_0x20dde7[_0x5551b5(0x17c)]<0x3)return null;const _0x1b620c=_0x20dde7[0x1]?.[_0x5551b5(0x199)]()||'',_0x2cb076=parseInt(_0x20dde7[0x2]?.[_0x5551b5(0x199)]()||'0',0xa);if(isNaN(_0x2cb076)||!_0x1b620c)return null;return{'pid':_0x142e5c,'ppid':_0x2cb076,'comm':_0x1b620c[_0x5551b5(0x189)](/\.exe$/i,'')};}catch(_0x2979a8){return process[_0x5551b5(0x185)]['DEBUG']&&console[_0x5551b5(0x181)]('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0x142e5c+_0x5551b5(0x19d),_0x2979a8),null;}}function getProcessInfoPosix(_0x31dfce){const _0x39252b=a92_0x32f252;try{const _0x177c89=execSync(_0x39252b(0x17f)+_0x31dfce+_0x39252b(0x19c),{'encoding':'utf-8'})[_0x39252b(0x199)](),[_0x3a0f39,..._0x388ff2]=_0x177c89['split'](/\s+/),_0x55d2fd=parseInt(_0x3a0f39,0xa),_0x29f4d3=_0x388ff2['join']('\x20');if(isNaN(_0x55d2fd))return null;return{'pid':_0x31dfce,'ppid':_0x55d2fd,'comm':_0x29f4d3};}catch(_0x45b234){return process['env']['DEBUG']&&console[_0x39252b(0x181)](_0x39252b(0x17d)+_0x31dfce+'\x20on\x20POSIX:',_0x45b234),null;}}function getProcessInfo(_0x1a84d2){const _0x477eab=a92_0x32f252;if(process[_0x477eab(0x195)]===_0x477eab(0x183))return getProcessInfoWindows(_0x1a84d2);return getProcessInfoPosix(_0x1a84d2);}function getBasename(_0x23d843){const _0x4706c6=a92_0x32f252;return _0x23d843[_0x4706c6(0x189)](/^-/,'')['split']('/')[_0x4706c6(0x19b)]()?.['toLowerCase']()||'';}function isShell(_0x4f9640){const _0x24af2b=a92_0x32f252;return SHELL_NAMES[_0x24af2b(0x17b)](getBasename(_0x4f9640));}function a92_0x1369(_0x4180a9,_0x3fcaa9){const _0x4f7636=a92_0x4f76();return a92_0x1369=function(_0x1369be,_0x2b389c){_0x1369be=_0x1369be-0x172;let _0x5b3ca7=_0x4f7636[_0x1369be];return _0x5b3ca7;},a92_0x1369(_0x4180a9,_0x3fcaa9);}function isEphemeralShellSpawner(_0x5219f2){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x5219f2));}function a92_0x4f76(){const _0xce5d88=['filter','env','ksh','dash','cursor','replace','1174HtnyhL','7109944MDnHEt','comm',')\x20spawned\x20by\x20','\x20get\x20ParentProcessId,Name\x20/format:csv','fish',',\x20using\x20fallback','bash','2823363AyTAoh','elvish','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','platform','ion','826651BAcECv','tcsh','trim','ppid','pop','\x20-o\x20ppid=,comm=','\x20on\x20Windows:','csh','572444azVOYP','6087390hRFmJO','5fIcnno','pid','claude','zsh','code','DEBUG','Found\x20ephemeral\x20shell\x20','1514TthfHM','wmic\x20process\x20where\x20ProcessId=','powershell','has','length','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','ps\x20-p\x20','1472001oJlRSO','error','xonsh','win32'];a92_0x4f76=function(){return _0xce5d88;};return a92_0x4f76();}let cachedShellPID;function findShellPID(){const _0x419914=a92_0x32f252;let _0xc7b5ba=process['ppid'];const _0x1d59e2=0xa;let _0x11f22a=0x0;while(_0x11f22a<_0x1d59e2){const _0x2eb523=getProcessInfo(_0xc7b5ba);if(!_0x2eb523){process[_0x419914(0x185)]['DEBUG']&&console[_0x419914(0x181)](_0x419914(0x194)+_0xc7b5ba+_0x419914(0x190));break;}if(isShell(_0x2eb523[_0x419914(0x18c)])){const _0x7ec7a2=getProcessInfo(_0x2eb523[_0x419914(0x19a)]);if(_0x7ec7a2&&isEphemeralShellSpawner(_0x7ec7a2[_0x419914(0x18c)])){process['env'][_0x419914(0x176)]&&console[_0x419914(0x181)](_0x419914(0x177)+_0x2eb523[_0x419914(0x172)]+'\x20('+_0x2eb523[_0x419914(0x18c)]+_0x419914(0x18d)+_0x7ec7a2[_0x419914(0x18c)]+',\x20continuing\x20up');_0xc7b5ba=_0x2eb523['ppid'],_0x11f22a++;continue;}return _0x2eb523[_0x419914(0x172)];}if(_0x2eb523[_0x419914(0x19a)]===0x0||_0x2eb523[_0x419914(0x19a)]===0x1){if(isShell(_0x2eb523[_0x419914(0x18c)]))return _0x2eb523['pid'];break;}_0xc7b5ba=_0x2eb523[_0x419914(0x19a)],_0x11f22a++;}return process[_0x419914(0x185)]['DEBUG']&&console[_0x419914(0x181)](_0x419914(0x17e)),process['ppid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x165e38){try{return process['kill'](_0x165e38,0x0),!![];}catch{return![];}}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb87619,_0x37aafd){const _0x53da42=a93_0x2b8a,_0x3da0cb=_0xb87619();while(!![]){try{const _0x42a874=-parseInt(_0x53da42(0x9b))/0x1+-parseInt(_0x53da42(0x8f))/0x2*(parseInt(_0x53da42(0xa4))/0x3)+-parseInt(_0x53da42(0x99))/0x4*(parseInt(_0x53da42(0xa0))/0x5)+-parseInt(_0x53da42(0x90))/0x6+parseInt(_0x53da42(0xa3))/0x7*(parseInt(_0x53da42(0x9a))/0x8)+parseInt(_0x53da42(0x96))/0x9*(-parseInt(_0x53da42(0x8d))/0xa)+-parseInt(_0x53da42(0x9e))/0xb*(-parseInt(_0x53da42(0x8e))/0xc);if(_0x42a874===_0x37aafd)break;else _0x3da0cb['push'](_0x3da0cb['shift']());}catch(_0x2c8a88){_0x3da0cb['push'](_0x3da0cb['shift']());}}}(a93_0x2102,0xec2c8));import*as a93_0x450d94 from'readline';function a93_0x2102(){const _0x226154=['createInterface','\x20(y/N):\x20','removeListener','1179ISUgbH','\x20[y/N]\x20','stderr','31292VKngDW','152JhweGx','117523RtjLVR','data','stdin','2981MsMtHF','toLowerCase','410cxwyXc','question','close','315917WJKPVq','60okjzrK','resume','107140frACBW','159708fWsZRg','50342rkXNwb','4985382aWjaqN','isTTY','write'];a93_0x2102=function(){return _0x226154;};return a93_0x2102();}function a93_0x2b8a(_0x2cb0ea,_0x375a9d){const _0x2102cf=a93_0x2102();return a93_0x2b8a=function(_0x2b8ae,_0x3880c6){_0x2b8ae=_0x2b8ae-0x8c;let _0x1a116e=_0x2102cf[_0x2b8ae];return _0x1a116e;},a93_0x2b8a(_0x2cb0ea,_0x375a9d);}export async function confirm(_0x3f8067){const _0xc4f71=a93_0x2b8a,_0x2fd9fe=a93_0x450d94[_0xc4f71(0x93)]({'input':process[_0xc4f71(0x9d)],'output':process['stdout']});return new Promise(_0x32e5d5=>{const _0x2e4353=_0xc4f71;_0x2fd9fe[_0x2e4353(0xa1)](_0x3f8067+_0x2e4353(0x94),_0x2dfced=>{const _0x39396c=_0x2e4353;_0x2fd9fe[_0x39396c(0xa2)](),_0x32e5d5(_0x2dfced['toLowerCase']()==='y'||_0x2dfced[_0x39396c(0x9f)]()==='yes');});});}export async function confirmKey(_0x5c3e36){const _0x1fbb47=a93_0x2b8a;if(!process[_0x1fbb47(0x9d)][_0x1fbb47(0x91)])return![];return process['stderr'][_0x1fbb47(0x92)](_0x5c3e36+_0x1fbb47(0x97)),new Promise(_0x294c53=>{const _0x4019d6=_0x1fbb47,_0x2bc839=process[_0x4019d6(0x9d)];_0x2bc839['setRawMode'](!![]),_0x2bc839[_0x4019d6(0x8c)](),_0x2bc839['setEncoding']('utf8');const _0x23aaf7=_0x35345f=>{const _0xd6ecaa=_0x4019d6;_0x2bc839['setRawMode'](![]),_0x2bc839['pause'](),_0x2bc839[_0xd6ecaa(0x95)](_0xd6ecaa(0x9c),_0x23aaf7);if(_0x35345f==='\x1b'){process[_0xd6ecaa(0x98)]['write']('\x0a'),_0x294c53(![]);return;}_0x35345f==='\x03'&&(process[_0xd6ecaa(0x98)][_0xd6ecaa(0x92)]('\x0a'),process['exit'](0x82));if(_0x35345f[_0xd6ecaa(0x9f)]()==='y'){process[_0xd6ecaa(0x98)][_0xd6ecaa(0x92)]('y\x0a'),_0x294c53(!![]);return;}process[_0xd6ecaa(0x98)][_0xd6ecaa(0x92)]('\x0a'),_0x294c53(![]);};_0x2bc839['on'](_0x4019d6(0x9c),_0x23aaf7);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x491302,_0x25826b){const _0x4bc78a=a94_0x518b,_0x5116c4=_0x491302();while(!![]){try{const _0x2be724=-parseInt(_0x4bc78a(0x8b))/0x1*(-parseInt(_0x4bc78a(0x87))/0x2)+-parseInt(_0x4bc78a(0x99))/0x3*(-parseInt(_0x4bc78a(0x9c))/0x4)+-parseInt(_0x4bc78a(0x98))/0x5*(parseInt(_0x4bc78a(0xa2))/0x6)+parseInt(_0x4bc78a(0x89))/0x7*(-parseInt(_0x4bc78a(0x8d))/0x8)+parseInt(_0x4bc78a(0x86))/0x9*(parseInt(_0x4bc78a(0xa5))/0xa)+parseInt(_0x4bc78a(0xa0))/0xb*(-parseInt(_0x4bc78a(0x88))/0xc)+parseInt(_0x4bc78a(0xa4))/0xd*(-parseInt(_0x4bc78a(0x92))/0xe);if(_0x2be724===_0x25826b)break;else _0x5116c4['push'](_0x5116c4['shift']());}catch(_0x404948){_0x5116c4['push'](_0x5116c4['shift']());}}}(a94_0x4415,0x49bdc));export function parsePath(_0x96c7e8){const _0x245c9b=a94_0x518b;if(!_0x96c7e8||_0x96c7e8[_0x245c9b(0x8f)]()==='')throw new Error(_0x245c9b(0x8a));const _0x318ba2=_0x96c7e8['trim']();if(_0x318ba2==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x96c7e8};const _0x3ed61f=_0x318ba2[_0x245c9b(0x91)]('/')?_0x318ba2['substring'](0x1):_0x318ba2,_0x3fb9ed=_0x3ed61f[_0x245c9b(0x9e)]('/')[_0x245c9b(0x90)](_0x1dec0a=>_0x1dec0a!=='');if(_0x3fb9ed[_0x245c9b(0x94)]===0x0)throw new Error(_0x245c9b(0x9f));const _0x3bef30=_0x318ba2['startsWith']('/')||!isRelativePathSegment(_0x3fb9ed[0x0]);for(const _0x5a76b2 of _0x3fb9ed){validatePathSegment(_0x5a76b2);}return{'segments':_0x3fb9ed,'isAbsolute':_0x3bef30,'raw':_0x96c7e8};}function a94_0x518b(_0x1efec3,_0x37a8db){const _0x44159f=a94_0x4415();return a94_0x518b=function(_0x518bf7,_0x560ffa){_0x518bf7=_0x518bf7-0x83;let _0x55b4ba=_0x44159f[_0x518bf7];return _0x55b4ba;},a94_0x518b(_0x1efec3,_0x37a8db);}function isRelativePathSegment(_0x5572a1){return _0x5572a1==='.'||_0x5572a1==='..';}function validatePathSegment(_0x561409){const _0x161022=a94_0x518b;if(_0x561409==='')throw new Error(_0x161022(0x8c));if(_0x561409==='.'||_0x561409==='..')return;if(/[\x00-\x1F\x7F]/[_0x161022(0x93)](_0x561409))throw new Error(_0x161022(0x95)+_0x561409);if(_0x561409!==_0x561409['trim']()){}}export function validatePath(_0x4ec9d4){const _0x5aa7bd=a94_0x518b;if(_0x4ec9d4[_0x5aa7bd(0x9b)][_0x5aa7bd(0x94)]===0x0&&!_0x4ec9d4[_0x5aa7bd(0x85)])throw new Error(_0x5aa7bd(0x97));if(_0x4ec9d4[_0x5aa7bd(0x85)]){if(_0x4ec9d4[_0x5aa7bd(0x9b)][0x0]==='..')throw new Error('Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22');let _0x4d6726=0x0;for(const _0x56af7d of _0x4ec9d4[_0x5aa7bd(0x9b)]){if(_0x56af7d==='..'){if(_0x4d6726===0x0)throw new Error(_0x5aa7bd(0x96));_0x4d6726--;}else _0x56af7d!=='.'&&_0x4d6726++;}}}export function joinPaths(_0x243ec8,_0x300a22){const _0x47a3a2=a94_0x518b;if(!_0x243ec8||_0x243ec8==='/')return _0x300a22;if(!_0x300a22||_0x300a22==='.')return _0x243ec8;if(_0x300a22[_0x47a3a2(0x91)]('/'))return _0x300a22;const _0x4b2b8c=parsePath(_0x243ec8),_0x438753=parsePath(_0x300a22),_0x5eb6c3=[..._0x4b2b8c[_0x47a3a2(0x9b)]];for(const _0x22aa2a of _0x438753[_0x47a3a2(0x9b)]){if(_0x22aa2a==='.')continue;else{if(_0x22aa2a==='..'){if(_0x5eb6c3['length']===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x5eb6c3[_0x47a3a2(0x9d)]();}else _0x5eb6c3[_0x47a3a2(0x8e)](_0x22aa2a);}}const _0x28f537=_0x5eb6c3['join']('/');return _0x4b2b8c['raw'][_0x47a3a2(0x91)]('/')?'/'+_0x28f537:_0x28f537;}function a94_0x4415(){const _0x5c0497=['63300zuDwrZ','14NhCUmb','Path\x20cannot\x20be\x20empty','1VFGgGu','Path\x20segment\x20cannot\x20be\x20empty','603776NxGqmV','push','trim','filter','startsWith','14orPXaK','test','length','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','Path\x20attempts\x20to\x20navigate\x20above\x20root','Relative\x20path\x20cannot\x20be\x20empty','270990YhQcpo','79110BJeRnE','slice','segments','72NeFVYj','pop','split','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','275BJPtHZ','raw','66zeAidU','join','5853913dvpfBr','340wFVnVA','Cannot\x20split\x20empty\x20path','Cannot\x20navigate\x20above\x20root','isAbsolute','147834OGuChD','1196396ghjqHR'];a94_0x4415=function(){return _0x5c0497;};return a94_0x4415();}export function normalizePath(_0x413731){const _0x1438e0=a94_0x518b,_0x4cadaf=parsePath(_0x413731),_0x463e8b=[];for(const _0x3a2612 of _0x4cadaf[_0x1438e0(0x9b)]){if(_0x3a2612==='.')continue;else{if(_0x3a2612==='..'){if(_0x463e8b[_0x1438e0(0x94)]===0x0){if(_0x4cadaf[_0x1438e0(0x85)])throw new Error(_0x1438e0(0x84));_0x463e8b[_0x1438e0(0x8e)]('..');}else _0x463e8b[_0x463e8b[_0x1438e0(0x94)]-0x1]==='..'?_0x463e8b[_0x1438e0(0x8e)]('..'):_0x463e8b[_0x1438e0(0x9d)]();}else _0x463e8b[_0x1438e0(0x8e)](_0x3a2612);}}if(_0x463e8b['length']===0x0)return _0x4cadaf[_0x1438e0(0x85)]?'/':'.';const _0x1b898e=_0x463e8b[_0x1438e0(0xa3)]('/');return _0x4cadaf[_0x1438e0(0xa1)][_0x1438e0(0x91)]('/')?'/'+_0x1b898e:_0x1b898e;}export function getParentPath(_0x1cb30d){const _0x6623d=a94_0x518b,_0x24597a=parsePath(_0x1cb30d);if(_0x24597a[_0x6623d(0x9b)][_0x6623d(0x94)]<=0x1)return'/';const _0x3c6f53=_0x24597a[_0x6623d(0x9b)][_0x6623d(0x9a)](0x0,-0x1)[_0x6623d(0xa3)]('/');return _0x24597a[_0x6623d(0xa1)]['startsWith']('/')?'/'+_0x3c6f53:_0x3c6f53;}export function getBaseName(_0x285bfc){const _0x31b308=a94_0x518b,_0x427a39=parsePath(_0x285bfc);return _0x427a39[_0x31b308(0x9b)][_0x427a39['segments']['length']-0x1]||'';}export function isChildPath(_0x4af86d,_0xa8a605){const _0x3b7ba8=a94_0x518b,_0x2c57f9=parsePath(_0x4af86d),_0x4dadfb=parsePath(_0xa8a605);if(_0x2c57f9[_0x3b7ba8(0x9b)]['length']<=_0x4dadfb[_0x3b7ba8(0x9b)][_0x3b7ba8(0x94)])return![];for(let _0x329d17=0x0;_0x329d17<_0x4dadfb[_0x3b7ba8(0x9b)][_0x3b7ba8(0x94)];_0x329d17++){if(_0x2c57f9[_0x3b7ba8(0x9b)][_0x329d17]!==_0x4dadfb['segments'][_0x329d17])return![];}return!![];}export function splitPath(_0x54861e){const _0x54f0b2=a94_0x518b,_0x56e2f3=parsePath(_0x54861e);if(_0x56e2f3[_0x54f0b2(0x9b)][_0x54f0b2(0x94)]===0x0)throw new Error(_0x54f0b2(0x83));if(_0x56e2f3[_0x54f0b2(0x9b)]['length']===0x1)return{'parent':_0x56e2f3[_0x54f0b2(0x9b)][0x0]};return{'parent':_0x56e2f3[_0x54f0b2(0x9b)][0x0],'child':_0x56e2f3['segments'][_0x54f0b2(0x9a)](0x1)['join']('/')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x207adf,_0xa2af3a){const _0x2a4f67=a95_0x74c7,_0x882857=_0x207adf();while(!![]){try{const _0x5a862f=-parseInt(_0x2a4f67(0x1f3))/0x1*(parseInt(_0x2a4f67(0x1f2))/0x2)+parseInt(_0x2a4f67(0x1f6))/0x3*(parseInt(_0x2a4f67(0x1f7))/0x4)+-parseInt(_0x2a4f67(0x1f1))/0x5+parseInt(_0x2a4f67(0x1f0))/0x6+-parseInt(_0x2a4f67(0x1ef))/0x7*(-parseInt(_0x2a4f67(0x1f5))/0x8)+-parseInt(_0x2a4f67(0x1f9))/0x9+parseInt(_0x2a4f67(0x1f8))/0xa;if(_0x5a862f===_0xa2af3a)break;else _0x882857['push'](_0x882857['shift']());}catch(_0x5c5467){_0x882857['push'](_0x882857['shift']());}}}(a95_0x41f3,0xa6d9a));export function parseSegmentRef(_0x57bc82){const _0x36d64b=a95_0x74c7,_0x2bf06a=_0x57bc82['indexOf']('/');if(_0x2bf06a===-0x1)return{'parentId':_0x57bc82};if(_0x2bf06a===0x0)throw new Error(_0x36d64b(0x1ed)+_0x57bc82+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x22fd54=_0x57bc82[_0x36d64b(0x1f4)](0x0,_0x2bf06a),_0x57142b=_0x57bc82[_0x36d64b(0x1f4)](_0x2bf06a+0x1);if(_0x57142b==='')throw new Error(_0x36d64b(0x1ed)+_0x57bc82+_0x36d64b(0x1ee));return{'parentId':_0x22fd54,'childId':_0x57142b};}function a95_0x74c7(_0x5862ef,_0x90b86a){const _0x41f32c=a95_0x41f3();return a95_0x74c7=function(_0x74c76b,_0x3ed444){_0x74c76b=_0x74c76b-0x1ed;let _0x284b48=_0x41f32c[_0x74c76b];return _0x284b48;},a95_0x74c7(_0x5862ef,_0x90b86a);}function a95_0x41f3(){const _0x370554=['18400900NymRoe','4893948kMrJXo','Invalid\x20segment\x20reference\x20format:\x20','.\x20Child\x20name\x20cannot\x20be\x20empty','14FaySIw','2738376YzUWNF','4414425jKKVOY','2yxRCqr','991906OrnCTH','substring','515392mSXCpM','11871PlUDMv','684ltjJRb'];a95_0x41f3=function(){return _0x370554;};return a95_0x41f3();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a96_0x2603(_0x387ef0,_0x58f158){const _0x234995=a96_0x2349();return a96_0x2603=function(_0x2603c0,_0x26f05d){_0x2603c0=_0x2603c0-0x1e9;let _0x1bb1a8=_0x234995[_0x2603c0];return _0x1bb1a8;},a96_0x2603(_0x387ef0,_0x58f158);}(function(_0x492d0f,_0xc409e9){const _0x4cb976=a96_0x2603,_0x4a31db=_0x492d0f();while(!![]){try{const _0x5c55a8=-parseInt(_0x4cb976(0x1f9))/0x1*(-parseInt(_0x4cb976(0x1f8))/0x2)+parseInt(_0x4cb976(0x1e9))/0x3*(parseInt(_0x4cb976(0x1fe))/0x4)+-parseInt(_0x4cb976(0x1ec))/0x5*(-parseInt(_0x4cb976(0x1ff))/0x6)+parseInt(_0x4cb976(0x1fa))/0x7*(-parseInt(_0x4cb976(0x1f3))/0x8)+-parseInt(_0x4cb976(0x1eb))/0x9+-parseInt(_0x4cb976(0x203))/0xa+parseInt(_0x4cb976(0x1fc))/0xb*(parseInt(_0x4cb976(0x1ef))/0xc);if(_0x5c55a8===_0xc409e9)break;else _0x4a31db['push'](_0x4a31db['shift']());}catch(_0x51b7a3){_0x4a31db['push'](_0x4a31db['shift']());}}}(a96_0x2349,0xbc654));import a96_0x1702d1 from'ora';export function createCommandSpinner(_0x2a6ca3,_0x1ca1f9={}){const _0x51bc33=a96_0x2603,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x1ca1f9;return a96_0x1702d1({'text':_0x2a6ca3,'color':_0x51bc33(0x1f6),'isEnabled':forceEnabled||process[_0x51bc33(0x1f0)][_0x51bc33(0x1f4)]&&!verbose});}export async function withSpinner(_0x3792e6,_0x3649fa,_0x31214d={}){const _0x68282e=a96_0x2603,_0x136391=_0x31214d[_0x68282e(0x1f7)]??(()=>Date['now']()),_0x42feae=createCommandSpinner(_0x3792e6,_0x31214d);_0x42feae[_0x68282e(0x1f1)]();const _0x5f1051=_0x136391();try{const _0x453aaa=await _0x3649fa(),_0x963618=_0x136391()-_0x5f1051;return _0x42feae[_0x68282e(0x1ed)](),{'data':_0x453aaa,'elapsedMs':_0x963618};}catch(_0x27fc55){_0x42feae[_0x68282e(0x1ed)]();throw _0x27fc55;}}export async function withQuerySpinner(_0x497a51,_0x49c804,_0x4d364f={}){const _0xb39dc1=a96_0x2603,_0x3041b2=_0x4d364f['clock']??(()=>Date[_0xb39dc1(0x1ee)]()),_0x3d95fc=_0x4d364f['intervalFactory']??setInterval,_0x22ca8f=createCommandSpinner(_0x497a51,_0x4d364f);_0x22ca8f[_0xb39dc1(0x1f1)]();const _0x11538e=_0x3041b2(),_0x1ab0c1=_0x497a51['replace']('...',''),_0x5d85bb={},_0x530850=()=>{const _0x2e9188=_0xb39dc1;if(!_0x22ca8f[_0x2e9188(0x1f2)])return;const _0x3694d6=_0x3041b2()-_0x11538e,_0x9903ad=formatElapsed(_0x3694d6),_0x310062=_0x5d85bb[_0x2e9188(0x200)]??_0x1ab0c1,_0x8042ce=_0x5d85bb['jobId']?_0x2e9188(0x1fd)+_0x5d85bb[_0x2e9188(0x1f5)]+']':'',_0x1740e0=_0x5d85bb[_0x2e9188(0x1fb)]?'\x20'+_0x5d85bb[_0x2e9188(0x1fb)]:'';_0x22ca8f[_0x2e9188(0x201)]=_0x310062+'\x20'+_0x9903ad+_0x1740e0+_0x8042ce;},_0x10e1b5=_0x3d95fc(()=>{_0x530850();},0x3e8),_0x363748={'setPhase':_0x30f94d=>{_0x5d85bb['phase']=_0x30f94d,_0x530850();},'setJobId':_0x3a49c5=>{const _0x50a01e=_0xb39dc1;_0x5d85bb[_0x50a01e(0x1f5)]=_0x3a49c5,_0x530850();},'setExtra':_0x59189d=>{_0x5d85bb['extra']=_0x59189d,_0x530850();}};_0x530850();try{const _0x3320d4=await _0x49c804(_0x363748),_0x3c31b7=_0x3041b2()-_0x11538e;return{'data':_0x3320d4,'elapsedMs':_0x3c31b7};}finally{clearInterval(_0x10e1b5),_0x22ca8f[_0xb39dc1(0x1ed)]();}}function a96_0x2349(){const _0x25164e=['cyan','clock','82886AXeoWf','3zoplZG','938EncMDa','extra','7513LHzzde','\x20[Job\x20ID:\x20','12yvicNP','152676BPsjis','phase','text','toFixed','9841380fDkJIP','1490100IYQAbs','floor','5564646kmBXZT','270aEqLGs','stop','now','13956qOBTdv','stdout','start','isSpinning','84104YBGSwu','isTTY','jobId'];a96_0x2349=function(){return _0x25164e;};return a96_0x2349();}export function formatElapsed(_0x5cf764){const _0x541e2b=a96_0x2603,_0xd9cf1f=Math[_0x541e2b(0x1ea)](_0x5cf764/0x3e8);if(_0xd9cf1f<0x3c)return(_0x5cf764/0x3e8)[_0x541e2b(0x202)](0x1)+'s';const _0x1db4a8=Math[_0x541e2b(0x1ea)](_0xd9cf1f/0x3c),_0x396ad9=_0xd9cf1f%0x3c;if(_0x1db4a8<0x3c)return _0x1db4a8+'m\x20'+_0x396ad9+'s';const _0x5b3233=Math[_0x541e2b(0x1ea)](_0x1db4a8/0x3c),_0x2b0440=_0x1db4a8%0x3c;return _0x5b3233+'h\x20'+_0x2b0440+'m';}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x23ca52,_0x3f08f9){const _0x1a9501=a97_0x23b9,_0x17cd68=_0x23ca52();while(!![]){try{const _0x1c1dcc=-parseInt(_0x1a9501(0xfd))/0x1*(parseInt(_0x1a9501(0xf9))/0x2)+parseInt(_0x1a9501(0x101))/0x3+-parseInt(_0x1a9501(0x106))/0x4+parseInt(_0x1a9501(0x103))/0x5*(-parseInt(_0x1a9501(0xff))/0x6)+parseInt(_0x1a9501(0xfa))/0x7+-parseInt(_0x1a9501(0xfc))/0x8+parseInt(_0x1a9501(0xf8))/0x9*(parseInt(_0x1a9501(0xf3))/0xa);if(_0x1c1dcc===_0x3f08f9)break;else _0x17cd68['push'](_0x17cd68['shift']());}catch(_0x164a19){_0x17cd68['push'](_0x17cd68['shift']());}}}(a97_0x2ce5,0x2e8e0));import{readFileSync}from'fs';export function stripSqlComments(_0x32bfaa){const _0x50ff4e=a97_0x23b9;let _0x57d43c=_0x32bfaa[_0x50ff4e(0x102)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x57d43c=_0x57d43c[_0x50ff4e(0x102)](/--.*$/gm,''),_0x57d43c[_0x50ff4e(0x109)]();}function isEscaped(_0x166b47,_0x206e90){let _0x1a9e62=0x0;for(let _0x525ac3=_0x206e90-0x1;_0x525ac3>=0x0&&_0x166b47[_0x525ac3]==='\x5c';_0x525ac3--){_0x1a9e62++;}return _0x1a9e62%0x2===0x1;}export function splitSqlStatements(_0x437c12){const _0x2235cf=a97_0x23b9,_0x5b1ddd=stripSqlComments(_0x437c12);if(!_0x5b1ddd)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');const _0x2ca4c3=[];let _0x5b1785='',_0x4ec49f=![],_0x3bdfc5=![],_0x4e9621=![];for(let _0x3c36aa=0x0;_0x3c36aa<_0x437c12[_0x2235cf(0x104)];_0x3c36aa++){const _0x2f47a8=_0x437c12[_0x3c36aa];if(_0x2f47a8==='\x27'&&!isEscaped(_0x437c12,_0x3c36aa)&&!_0x3bdfc5&&!_0x4e9621)_0x4ec49f=!_0x4ec49f;else{if(_0x2f47a8==='\x22'&&!isEscaped(_0x437c12,_0x3c36aa)&&!_0x4ec49f&&!_0x4e9621)_0x3bdfc5=!_0x3bdfc5;else _0x2f47a8==='`'&&!isEscaped(_0x437c12,_0x3c36aa)&&!_0x4ec49f&&!_0x3bdfc5&&(_0x4e9621=!_0x4e9621);}if(_0x2f47a8===';'&&!_0x4ec49f&&!_0x3bdfc5&&!_0x4e9621){const _0xd7ba1d=_0x5b1785['trim']();_0xd7ba1d&&_0x2ca4c3['push'](_0xd7ba1d),_0x5b1785='';}else _0x5b1785+=_0x2f47a8;}const _0x226607=_0x5b1785[_0x2235cf(0x109)]();_0x226607&&_0x2ca4c3[_0x2235cf(0xf6)](_0x226607);const _0x24c8ff=_0x2ca4c3['map'](_0x265d0a=>_0x265d0a[_0x2235cf(0x109)]())['filter'](_0x5efa64=>{const _0x3136e5=stripSqlComments(_0x5efa64);return _0x3136e5['length']>0x0;});if(_0x24c8ff[_0x2235cf(0x104)]===0x0)throw new Error(_0x2235cf(0x105));return _0x24c8ff;}export function readFileContent(_0x2239e2){const _0x2aa625=a97_0x23b9;try{return readFileSync(_0x2239e2,_0x2aa625(0xf5));}catch(_0x11240e){const _0x168f65=_0x11240e[_0x2aa625(0xf7)];if(_0x168f65===_0x2aa625(0xfe))throw new Error('File\x20\x27'+_0x2239e2+_0x2aa625(0x108));else{if(_0x168f65===_0x2aa625(0x107))throw new Error('Permission\x20denied\x20reading\x20file\x20\x27'+_0x2239e2+'\x27');else throw new Error(_0x2aa625(0x10a)+_0x2239e2+'\x27:\x20'+_0x11240e[_0x2aa625(0xf4)]);}}}function a97_0x2ce5(){const _0x834c5b=['Error\x20reading\x20file\x20\x27','99530GItgJu','message','utf-8','push','code','585PgBQYM','2wGgllf','563850LFAduu','File\x20\x27','1798584xAeyim','83445XZyEeG','ENOENT','96dtOqGc','toLowerCase','435999MVifim','replace','3185KEZXWb','length','Content\x20contains\x20no\x20SQL\x20statements','1454720JNJsem','EACCES','\x27\x20not\x20found','trim'];a97_0x2ce5=function(){return _0x834c5b;};return a97_0x2ce5();}function a97_0x23b9(_0x393edf,_0x3f4e6c){const _0x2ce5f2=a97_0x2ce5();return a97_0x23b9=function(_0x23b9cf,_0x26b8a2){_0x23b9cf=_0x23b9cf-0xf3;let _0x2665cb=_0x2ce5f2[_0x23b9cf];return _0x2665cb;},a97_0x23b9(_0x393edf,_0x3f4e6c);}export function readSqlStatementsFromFile(_0x429acf){const _0x29c971=a97_0x23b9,_0x2541ea=readFileContent(_0x429acf);try{return splitSqlStatements(_0x2541ea);}catch(_0x54da84){throw new Error(_0x29c971(0xfb)+_0x429acf+'\x27\x20'+_0x54da84['message'][_0x29c971(0x100)]());}}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x385ddd,_0x1050b4){const _0x5a7966=a98_0x27a1,_0x43ec47=_0x385ddd();while(!![]){try{const _0x2fcef1=-parseInt(_0x5a7966(0xd7))/0x1+-parseInt(_0x5a7966(0xde))/0x2*(parseInt(_0x5a7966(0xe2))/0x3)+parseInt(_0x5a7966(0xdb))/0x4+-parseInt(_0x5a7966(0xda))/0x5*(-parseInt(_0x5a7966(0xea))/0x6)+parseInt(_0x5a7966(0xdd))/0x7+parseInt(_0x5a7966(0xe5))/0x8+parseInt(_0x5a7966(0xdf))/0x9*(-parseInt(_0x5a7966(0xd8))/0xa);if(_0x2fcef1===_0x1050b4)break;else _0x43ec47['push'](_0x43ec47['shift']());}catch(_0x3c5a0e){_0x43ec47['push'](_0x43ec47['shift']());}}}(a98_0x3b3d,0x4b7c8));function a98_0x3b3d(){const _0x2450d8=['slice','trim','2066872MnyVqT','getReader','read','parse','data','8016aQLbtd','[LLM\x20API\x20SSE]\x20','Response\x20body\x20is\x20null','debug','28700auvIqV','82730ipAXIg','pop','1160XEtKwR','1931136riFNTH','split','3628408qhsyFq','65732WwCdPB','1161lYGEcn','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','body','15WVqBkJ'];a98_0x3b3d=function(){return _0x2450d8;};return a98_0x3b3d();}export async function*parseSSEStream(_0x318082,_0x1388a0){const _0x2f1407=a98_0x27a1;if(!_0x318082['body'])throw new Error(_0x2f1407(0xd5));const _0x2da892=_0x318082[_0x2f1407(0xe1)][_0x2f1407(0xe6)](),_0x4f143d=new TextDecoder();let _0x5b18fb='',_0x585bfb={};try{while(!![]){const {done:_0x325621,value:_0x4894a2}=await _0x2da892[_0x2f1407(0xe7)]();if(_0x325621){if(_0x585bfb[_0x2f1407(0xe9)]){_0x1388a0?.[_0x2f1407(0xd6)](_0x2f1407(0xd4)+_0x585bfb[_0x2f1407(0xe9)]);const _0x340f0c=parseSSEData(_0x585bfb['data']);yield _0x340f0c;}break;}_0x5b18fb+=_0x4f143d['decode'](_0x4894a2,{'stream':!![]});const _0x460877=_0x5b18fb[_0x2f1407(0xdc)]('\x0a');_0x5b18fb=_0x460877[_0x2f1407(0xd9)]()||'';for(const _0x6a11be of _0x460877){if(_0x6a11be[_0x2f1407(0xe4)]()===''){if(_0x585bfb[_0x2f1407(0xe9)]){_0x1388a0?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x585bfb[_0x2f1407(0xe9)]);const _0x240fb9=parseSSEData(_0x585bfb[_0x2f1407(0xe9)]);yield _0x240fb9,_0x585bfb={};}continue;}if(_0x6a11be['startsWith'](':'))continue;const _0x4af561=_0x6a11be['indexOf'](':');if(_0x4af561===-0x1)continue;const _0x5d471f=_0x6a11be[_0x2f1407(0xe3)](0x0,_0x4af561);let _0x51eae0=_0x6a11be['slice'](_0x4af561+0x1);_0x51eae0['startsWith']('\x20')&&(_0x51eae0=_0x51eae0[_0x2f1407(0xe3)](0x1));switch(_0x5d471f){case'event':_0x585bfb['event']=_0x51eae0;break;case _0x2f1407(0xe9):_0x585bfb[_0x2f1407(0xe9)]=_0x585bfb[_0x2f1407(0xe9)]?_0x585bfb[_0x2f1407(0xe9)]+'\x0a'+_0x51eae0:_0x51eae0;break;case'id':_0x585bfb['id']=_0x51eae0;break;}}}}finally{_0x2da892['releaseLock']();}}function a98_0x27a1(_0x4afde5,_0x5714d2){const _0x3b3d66=a98_0x3b3d();return a98_0x27a1=function(_0x27a1fb,_0x151d86){_0x27a1fb=_0x27a1fb-0xd4;let _0x238a68=_0x3b3d66[_0x27a1fb];return _0x238a68;},a98_0x27a1(_0x4afde5,_0x5714d2);}function parseSSEData(_0x45f51b){const _0x279ef3=a98_0x27a1;try{return JSON[_0x279ef3(0xe8)](_0x45f51b);}catch(_0xaaaa2c){throw new Error(_0x279ef3(0xe0)+_0x45f51b,{'cause':_0xaaaa2c});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a99_0x3282(_0xa53d66,_0xe30f94){const _0x4fe8d6=a99_0x4fe8();return a99_0x3282=function(_0x3282e0,_0x19cfa4){_0x3282e0=_0x3282e0-0x1ec;let _0xdd1ed2=_0x4fe8d6[_0x3282e0];return _0xdd1ed2;},a99_0x3282(_0xa53d66,_0xe30f94);}(function(_0x4fc00c,_0x177bde){const _0xb755a3=a99_0x3282,_0x357c50=_0x4fc00c();while(!![]){try{const _0x110187=-parseInt(_0xb755a3(0x1ff))/0x1+parseInt(_0xb755a3(0x200))/0x2*(-parseInt(_0xb755a3(0x1fd))/0x3)+-parseInt(_0xb755a3(0x1f1))/0x4+-parseInt(_0xb755a3(0x1f4))/0x5*(parseInt(_0xb755a3(0x1f2))/0x6)+-parseInt(_0xb755a3(0x1f0))/0x7*(-parseInt(_0xb755a3(0x1fa))/0x8)+parseInt(_0xb755a3(0x1fc))/0x9*(parseInt(_0xb755a3(0x1fe))/0xa)+parseInt(_0xb755a3(0x1ed))/0xb*(parseInt(_0xb755a3(0x205))/0xc);if(_0x110187===_0x177bde)break;else _0x357c50['push'](_0x357c50['shift']());}catch(_0x2a9642){_0x357c50['push'](_0x357c50['shift']());}}}(a99_0x4fe8,0x5f9b1));import a99_0x52a274 from'string-width';export function stringWidth(_0x1c5465){return a99_0x52a274(_0x1c5465);}export function padEnd(_0x2fb7a9,_0x1d0d0f){const _0x2e3347=a99_0x3282,_0x1bb502=stringWidth(_0x2fb7a9);if(_0x1bb502>=_0x1d0d0f)return _0x2fb7a9;return _0x2fb7a9+'\x20'[_0x2e3347(0x203)](_0x1d0d0f-_0x1bb502);}export function padStart(_0x23880c,_0x2db198){const _0x4f7778=stringWidth(_0x23880c);if(_0x4f7778>=_0x2db198)return _0x23880c;return'\x20'['repeat'](_0x2db198-_0x4f7778)+_0x23880c;}export function centerAlign(_0x2d2bd2,_0x4e11c8){const _0x3de220=a99_0x3282,_0x4eca9d=stringWidth(_0x2d2bd2);if(_0x4eca9d>_0x4e11c8){if(_0x4e11c8<=0x1)return'…'[_0x3de220(0x1ef)](0x0,_0x4e11c8);let _0x4fddba=_0x2d2bd2;while(stringWidth(_0x4fddba+'…')>_0x4e11c8){_0x4fddba=_0x4fddba['slice'](0x0,-0x1);}return _0x4fddba+'…';}if(_0x4eca9d===_0x4e11c8)return _0x2d2bd2;const _0x5d4414=_0x4e11c8-_0x4eca9d,_0x2318b9=Math['floor'](_0x5d4414/0x2),_0x5eb2e3=_0x5d4414-_0x2318b9;return'\x20'[_0x3de220(0x203)](_0x2318b9)+_0x2d2bd2+'\x20'[_0x3de220(0x203)](_0x5eb2e3);}function a99_0x4fe8(){const _0x3f848f=['replace','trim','repeat','length','492RaGvrO','padStart','Cannot\x20escape\x20empty\x20string\x20literal','262427puqpyW','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','substring','77NmvDUI','945464ordaGV','150jGKuhN','floor','5315eKjnVL','USER','USERNAME','toLowerCase','\x5c$&','random','171664JmilfN','test','99pOFvRR','1506453ujxrEn','440000QogoGs','541482wRcnqj','2UXdKDA'];a99_0x4fe8=function(){return _0x3f848f;};return a99_0x4fe8();}export function escapeStringLiteral(_0x17e5f6){const _0x35dad4=a99_0x3282;if(!_0x17e5f6||_0x17e5f6['trim']()['length']===0x0)throw new Error(_0x35dad4(0x1ec));const _0x15213f=_0x17e5f6['replace'](/'/g,'\x27\x27');return'\x27'+_0x15213f+'\x27';}export function globToLike(_0x5c08a5){const _0x1c63bf=a99_0x3282;let _0x1378e7=_0x5c08a5[_0x1c63bf(0x201)](/\\/g,'\x5c\x5c')[_0x1c63bf(0x201)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x1378e7=_0x1378e7[_0x1c63bf(0x201)](/\*/g,'%')['replace'](/\?/g,'_'),_0x1378e7;}export function buildLikePattern(_0x179925){const _0x1c3657=a99_0x3282;if(!_0x179925||_0x179925[_0x1c3657(0x202)]()[_0x1c3657(0x204)]===0x0)throw new Error(_0x1c3657(0x1ee));const _0x123cb4=globToLike(_0x179925),_0x4bbb88=_0x123cb4['replace'](/'/g,'\x27\x27');return'\x27'+_0x4bbb88+'\x27';}export function matchGlobPattern(_0x16fe33,_0x222178){const _0x40cd41=a99_0x3282,_0x23ac8d=_0x222178[_0x40cd41(0x201)](/[.+^${}()|[\]\\]/g,_0x40cd41(0x1f8))[_0x40cd41(0x201)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x1fafec=new RegExp('^'+_0x23ac8d+'$');return _0x1fafec[_0x40cd41(0x1fb)](_0x16fe33);}export function getSanitizedUsername(){const _0x3dba07=a99_0x3282,_0x159951=process['env'][_0x3dba07(0x1f5)]||process['env'][_0x3dba07(0x1f6)]||'unknown';return _0x159951[_0x3dba07(0x201)](/[^a-zA-Z0-9]/g,'')[_0x3dba07(0x1f7)]();}export function generateRandomHex(){const _0x1799a4=a99_0x3282,_0x4c9199=Math[_0x1799a4(0x1f3)](Math[_0x1799a4(0x1f9)]()*0xfffff);return _0x4c9199['toString'](0x10)[_0x1799a4(0x206)](0x5,'0');}
|