@treasuredata/tdx 0.9.6 → 0.9.8

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 (123) 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.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/agent-command.js +1 -1
  15. package/dist/commands/api-command.js +1 -1
  16. package/dist/commands/auth-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-statusline-command.js +1 -1
  20. package/dist/commands/claude-usage-command.js +1 -1
  21. package/dist/commands/command.js +1 -1
  22. package/dist/commands/connection-command.js +1 -1
  23. package/dist/commands/context-command.js +1 -1
  24. package/dist/commands/databases.js +1 -1
  25. package/dist/commands/describe.js +1 -1
  26. package/dist/commands/engage-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/llm-command.js +1 -1
  30. package/dist/commands/llm-proxy.js +1 -1
  31. package/dist/commands/parent-segment-command.js +1 -1
  32. package/dist/commands/profiles-command.js +1 -1
  33. package/dist/commands/query-command.js +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-create-command.js +1 -1
  36. package/dist/commands/segment-fields-command.js +1 -1
  37. package/dist/commands/segment-pull-command.js +1 -1
  38. package/dist/commands/segment-push-command.js +1 -1
  39. package/dist/commands/segment-update-command.js +1 -1
  40. package/dist/commands/segment-use-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/tables.js +1 -1
  44. package/dist/commands/use-command.js +1 -1
  45. package/dist/commands/user-command.js +1 -1
  46. package/dist/commands/workflow-command.js +1 -1
  47. package/dist/core/auth.js +1 -1
  48. package/dist/core/config.js +1 -1
  49. package/dist/core/connection-cache.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/proxy/anthropic-adapter.js +1 -1
  59. package/dist/proxy/claude-usage-tracker.js +1 -1
  60. package/dist/proxy/context-signature.js +1 -1
  61. package/dist/proxy/conversation-utils.js +1 -1
  62. package/dist/proxy/server.js +1 -1
  63. package/dist/proxy/session-cache.js +1 -1
  64. package/dist/sdk/agent/agent-yaml.js +1 -1
  65. package/dist/sdk/api.js +1 -1
  66. package/dist/sdk/connection-validator.js +1 -1
  67. package/dist/sdk/connection.js +1 -1
  68. package/dist/sdk/engage.js +1 -1
  69. package/dist/sdk/errors.js +1 -1
  70. package/dist/sdk/index.js +1 -1
  71. package/dist/sdk/job.js +1 -1
  72. package/dist/sdk/journey.js +1 -1
  73. package/dist/sdk/llm.js +1 -1
  74. package/dist/sdk/query.js +1 -1
  75. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  76. package/dist/sdk/segment/journey-yaml.d.ts +53 -18
  77. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  78. package/dist/sdk/segment/journey-yaml.js +1 -1
  79. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  80. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  81. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  82. package/dist/sdk/segment.js +1 -1
  83. package/dist/sdk/user.js +1 -1
  84. package/dist/sdk/workflow.js +1 -1
  85. package/dist/types/endpoints.js +1 -1
  86. package/dist/types/index.js +1 -1
  87. package/dist/utils/agent-config.js +1 -1
  88. package/dist/utils/agent-ref-parser.js +1 -1
  89. package/dist/utils/async.js +1 -1
  90. package/dist/utils/chat-cache.js +1 -1
  91. package/dist/utils/colors.js +1 -1
  92. package/dist/utils/command-output.js +1 -1
  93. package/dist/utils/constants.js +1 -1
  94. package/dist/utils/diff.js +1 -1
  95. package/dist/utils/fields-display.js +1 -1
  96. package/dist/utils/file-permissions.js +1 -1
  97. package/dist/utils/format-detector.js +1 -1
  98. package/dist/utils/formatters.js +1 -1
  99. package/dist/utils/journey-utils.d.ts +30 -0
  100. package/dist/utils/journey-utils.d.ts.map +1 -1
  101. package/dist/utils/journey-utils.js +1 -1
  102. package/dist/utils/journey-utils.js.map +1 -1
  103. package/dist/utils/json-loader.js +1 -1
  104. package/dist/utils/llm-backup-utils.js +1 -1
  105. package/dist/utils/model-aliases.js +1 -1
  106. package/dist/utils/model-factors.js +1 -1
  107. package/dist/utils/option-validation.js +1 -1
  108. package/dist/utils/port.js +1 -1
  109. package/dist/utils/process.js +1 -1
  110. package/dist/utils/prompt.js +1 -1
  111. package/dist/utils/segment-path-parser.js +1 -1
  112. package/dist/utils/segment-ref-parser.js +1 -1
  113. package/dist/utils/spinner.js +1 -1
  114. package/dist/utils/sql-parser.js +1 -1
  115. package/dist/utils/sse-parser.js +1 -1
  116. package/dist/utils/string-utils.js +1 -1
  117. package/dist/utils/table-ref-parser.js +1 -1
  118. package/dist/utils/tdx-config.js +1 -1
  119. package/dist/utils/tdx-logger.js +1 -1
  120. package/dist/utils/tree-formatter.js +1 -1
  121. package/dist/utils/version-check.js +1 -1
  122. package/dist/utils/workflow-utils.js +1 -1
  123. package/package.json +1 -1
@@ -1 +1 @@
1
- const a77_0x3ab297=a77_0x202a;(function(_0x2b91c4,_0x16736f){const _0x5daef4=a77_0x202a,_0x12b6a7=_0x2b91c4();while(!![]){try{const _0xacadbd=-parseInt(_0x5daef4(0x19c))/0x1+parseInt(_0x5daef4(0x15d))/0x2+-parseInt(_0x5daef4(0x167))/0x3*(parseInt(_0x5daef4(0x156))/0x4)+-parseInt(_0x5daef4(0x15e))/0x5*(-parseInt(_0x5daef4(0x180))/0x6)+parseInt(_0x5daef4(0x15a))/0x7+parseInt(_0x5daef4(0x161))/0x8+-parseInt(_0x5daef4(0x198))/0x9*(parseInt(_0x5daef4(0x174))/0xa);if(_0xacadbd===_0x16736f)break;else _0x12b6a7['push'](_0x12b6a7['shift']());}catch(_0x196ac1){_0x12b6a7['push'](_0x12b6a7['shift']());}}}(a77_0x1730,0x99eab));import{CDPApiClient}from'../client/cdp-api-client.js';import{TrinoApiClient}from'../client/trino-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a77_0x1730(){const _0x4524ff=['onProgress','schemaValid','Attribute\x20\x27','trinoClient','Child\x20segment\x20not\x20found:\x20','catch','updateSegmentById','push','deleteSegment','coveragePercent','attributes','Validating\x20all\x20attributes\x20in\x20parallel...','map','rowCount','attribute','some','name','master','Fetching\x20sample\x20data\x20for:\x20','then','Fetching\x20master\x20sample\x20data...','row_count','updateParent','type','Calculating\x20statistics\x20for:\x20','updatedAt','Counting\x20master\x20table\x20rows...','parentColumn','filter','Folder\x20\x27','getFolder','listRecursive','parentDatabaseName','Segment\x20\x27','resolveFolderId','segment','getParentFull','runParentSegment','listFolders','getSegment','INVALID_ARGUMENT','customerPercent','2379844ngMSXf','behaviors',')\x20exceeded','parent_key','4600617ShxbZk','getAudienceAttributes','Maximum\x20recursion\x20depth\x20(','1538854YFofMf','10FoKRIv','message','Master\x20table:\x20','10068024BQkiLh','data','child_key','getParent','detectResourceTypeInFolder','\x20in\x20parent\x20','3tCTJrb','Validating\x20behavior:\x20','description','Behavior\x20\x27','createSegmentFolder','resolveParentId','getActivation','resolvePathToResource','Fetching\x20enriched\x20master\x20data...','getSegmentSQL','\x27\x20not\x20found\x20in\x20path','getParentSegmentFull','listSegmentFolders','10OtlXHF','parent\x20segment','segmentFolderId','listFields','folder','resolveSegmentId','deleteActivation','string','ambiguous','executeQuery','detectResourceType','total_events','2915538xrzCDt','parentTableName','createParent','Validating\x20attribute:\x20','matchedCount','\x27:\x20','schemaError','allValid','updateActivation','rootFolderId','schema','previewParentYaml','pushParentYaml','Calculating\x20coverage\x20for:\x20','Resource\x20\x27','createSegment','getParentSQL','\x27\x20not\x20found','length','segments','Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...','getAudienceBehaviors','createActivation','pullParentYaml','13073229OcjUWl','groupingName','behavior','updateParentSegment','979022EtyvnI','totalEvents','Enriched\x20query:\x20','listSegments','error','customersWithEvents','all','database','getSegmentFolder','enriched','test','join','source','listActivations','sampleData','client','createFolder','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','SEGMENT_NOT_FOUND','createdAt','table','resolveParentIdOrName','find','parentFolderId','interval','population','logger','listUnified','Folder\x20not\x20found:\x20','listParents','Validating\x20master\x20table:\x20'];a77_0x1730=function(){return _0x4524ff;};return a77_0x1730();}import{parsePath}from'../utils/segment-path-parser.js';import{apiToYaml,yamlToApi,toYamlString,parseYamlString}from'./segment/parent-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';function a77_0x202a(_0x238833,_0x4f42e9){_0x238833=_0x238833-0x12a;const _0x173070=a77_0x1730();let _0x202a44=_0x173070[_0x238833];return _0x202a44;}import{DEFAULT_TIME_RANGE,DEFAULT_SAMPLE_LIMIT,generateSchemaValidationSQL,generateMasterCountSQL,generateMasterSampleSQL,generateAttributeCoverageSQL,generateBehaviorStatsSQL,generateAttributeSampleSQL,generateBehaviorSampleSQL,generateEnrichedSQL,generateAttributeSchemaSQL,generateBehaviorSchemaSQL,findAttributeByName,findBehaviorByName,getAttributeColumns,getBehaviorColumns}from'./segment/parent-segment-preview.js';export class SegmentSDK{['client'];[a77_0x3ab297(0x12f)];constructor(_0x5946cd){const _0x117b2f=a77_0x3ab297;this[_0x117b2f(0x1ab)]=new CDPApiClient(_0x5946cd,_0x5946cd['logger']),this[_0x117b2f(0x12f)]=new TrinoApiClient(_0x5946cd,_0x5946cd[_0x117b2f(0x1b6)]);}async['listParents'](){const _0x233834=a77_0x3ab297;return await this[_0x233834(0x1ab)]['listParentSegments']();}async[a77_0x3ab297(0x164)](_0x165a5b){const _0x4fa35c=a77_0x3ab297;return await this[_0x4fa35c(0x1ab)]['getParentSegment'](_0x165a5b);}async[a77_0x3ab297(0x19f)](_0x1a3d00){const _0x3e5536=a77_0x3ab297;return await this[_0x3e5536(0x1ab)][_0x3e5536(0x19f)](_0x1a3d00);}async[a77_0x3ab297(0x153)](_0x41933c,_0x518138){const _0xc12e18=a77_0x3ab297;return await this[_0xc12e18(0x1ab)][_0xc12e18(0x153)](_0x41933c,_0x518138);}async[a77_0x3ab297(0x152)](_0x37a2a1){const _0x3c6cc5=a77_0x3ab297;return await this[_0x3c6cc5(0x1ab)][_0x3c6cc5(0x173)](_0x37a2a1);}async[a77_0x3ab297(0x14a)](_0x5d9f63){const _0x114fe7=a77_0x3ab297;return await this[_0x114fe7(0x1ab)][_0x114fe7(0x1a4)](_0x5d9f63);}async[a77_0x3ab297(0x1a9)](_0x1a106d,_0x677463){const _0x17d3b4=a77_0x3ab297;return await this[_0x17d3b4(0x1ab)][_0x17d3b4(0x1a9)](_0x1a106d,_0x677463);}async[a77_0x3ab297(0x16d)](_0x405e58,_0x302331,_0x2d1986){return await this['client']['getActivation'](_0x405e58,_0x302331,_0x2d1986);}async[a77_0x3ab297(0x196)](_0x4fbf57,_0x28a181,_0x17234d){const _0x944464=a77_0x3ab297;return await this[_0x944464(0x1ab)][_0x944464(0x196)](_0x4fbf57,_0x28a181,_0x17234d);}async[a77_0x3ab297(0x188)](_0x4e0d6a,_0x39dc12,_0x26a057,_0x227f0a){const _0x5d7f7f=a77_0x3ab297;return await this[_0x5d7f7f(0x1ab)][_0x5d7f7f(0x188)](_0x4e0d6a,_0x39dc12,_0x26a057,_0x227f0a);}async['deleteActivation'](_0x2f879f,_0x2ff20f,_0xb34de){const _0x162ac3=a77_0x3ab297;return await this['client'][_0x162ac3(0x17a)](_0x2f879f,_0x2ff20f,_0xb34de);}async[a77_0x3ab297(0x190)](_0x256e5c){const _0x407433=a77_0x3ab297;return await this[_0x407433(0x1ab)]['getParentSegmentSQL'](_0x256e5c);}async[a77_0x3ab297(0x170)](_0x4f37ef,_0x583e0b){const _0x283382=a77_0x3ab297;return await this[_0x283382(0x1ab)]['getSegmentSQL'](_0x4f37ef,_0x583e0b);}async[a77_0x3ab297(0x16c)](_0x5249ab){const _0x4519f0=a77_0x3ab297,_0x5cfe0b=await this[_0x4519f0(0x12a)](),_0x151396=_0x5cfe0b['find'](_0xc24501=>_0xc24501[_0x4519f0(0x136)][_0x4519f0(0x13c)]===_0x5249ab);if(!_0x151396)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Parent\x20segment\x20not\x20found:\x20'+_0x5249ab);return _0x151396['id'];}async['runParent'](_0x1474b0){const _0x460f16=a77_0x3ab297;let _0x10a41c=_0x1474b0;return!/^\d+$/[_0x460f16(0x1a6)](_0x1474b0)&&(_0x10a41c=await this['resolveParentId'](_0x1474b0)),await this[_0x460f16(0x1ab)][_0x460f16(0x151)](_0x10a41c);}async[a77_0x3ab297(0x179)](_0x34033c,_0x347025){const _0x5ef6e3=a77_0x3ab297,_0x41f14c=await this['listSegments'](_0x34033c),_0x239993=_0x41f14c[_0x5ef6e3(0x1b2)](_0x398ad2=>_0x398ad2[_0x5ef6e3(0x13c)]===_0x347025);if(!_0x239993)throw new SDKError(ErrorCode[_0x5ef6e3(0x1ae)],_0x5ef6e3(0x130)+_0x347025+_0x5ef6e3(0x166)+_0x34033c);return _0x239993['id'];}async[a77_0x3ab297(0x14e)](_0x3131db,_0x40f45a){const _0x1874d7=a77_0x3ab297,_0x4a0904=await this[_0x1874d7(0x152)](_0x3131db),_0x1e5199=_0x4a0904['find'](_0x1a1056=>_0x1a1056[_0x1874d7(0x13c)]===_0x40f45a);if(!_0x1e5199)throw new SDKError(ErrorCode[_0x1874d7(0x1ae)],_0x1874d7(0x1b8)+_0x40f45a+'\x20in\x20parent\x20'+_0x3131db);return _0x1e5199['id'];}async[a77_0x3ab297(0x177)](_0x123ebd){const _0x150df1=a77_0x3ab297,_0x1cb6ca=await this[_0x150df1(0x1b1)](_0x123ebd),[_0x3f9638,_0x227cc1]=await Promise[_0x150df1(0x1a2)]([this[_0x150df1(0x1ab)][_0x150df1(0x15b)](_0x1cb6ca),this[_0x150df1(0x1ab)][_0x150df1(0x195)](_0x1cb6ca)]),_0x121f9e=[];for(const _0x3c25b4 of _0x3f9638){_0x121f9e[_0x150df1(0x133)]({'name':_0x3c25b4[_0x150df1(0x13c)],'type':_0x3c25b4[_0x150df1(0x143)],'source':'attribute','parentDatabaseName':_0x3c25b4[_0x150df1(0x14c)],'parentTableName':_0x3c25b4[_0x150df1(0x181)],'parentColumn':_0x3c25b4[_0x150df1(0x147)],'groupingName':_0x3c25b4[_0x150df1(0x199)]??undefined});}for(const _0x12f7d5 of _0x227cc1){const _0x258f62=_0x12f7d5[_0x150df1(0x13c)];if(_0x12f7d5[_0x150df1(0x18a)]&&Array['isArray'](_0x12f7d5[_0x150df1(0x18a)]))for(const _0x2c8d29 of _0x12f7d5[_0x150df1(0x18a)]){_0x2c8d29[_0x150df1(0x13c)]&&_0x2c8d29[_0x150df1(0x143)]&&_0x121f9e[_0x150df1(0x133)]({'name':_0x258f62+'.'+_0x2c8d29[_0x150df1(0x13c)],'type':_0x2c8d29['type'],'source':_0x150df1(0x19a),'behaviorName':_0x258f62,'parentDatabaseName':_0x12f7d5[_0x150df1(0x14c)],'parentTableName':_0x12f7d5[_0x150df1(0x181)],'parentColumn':_0x2c8d29[_0x150df1(0x147)]});}}return _0x121f9e;}async[a77_0x3ab297(0x182)](_0x34fd6e){return await this['client']['createParentSegment'](_0x34fd6e);}async[a77_0x3ab297(0x142)](_0x4b1fad,_0x558f94){const _0xff8f64=a77_0x3ab297,_0x46d3d1=await this[_0xff8f64(0x1b1)](_0x4b1fad);return await this[_0xff8f64(0x1ab)][_0xff8f64(0x19b)](_0x46d3d1,_0x558f94);}async['getParentFull'](_0x3ce0f7){const _0x17671a=a77_0x3ab297,_0x400597=await this[_0x17671a(0x1b1)](_0x3ce0f7);return await this[_0x17671a(0x1ab)][_0x17671a(0x172)](_0x400597);}async[a77_0x3ab297(0x197)](_0x459613){const _0x3c36d3=await this['getParentFull'](_0x459613),_0x1c70dd=apiToYaml(_0x3c36d3);return toYamlString(_0x1c70dd);}async[a77_0x3ab297(0x18c)](_0x4bcffe){const _0x45ca67=a77_0x3ab297,_0x4e82bb=typeof _0x4bcffe===_0x45ca67(0x17b)?parseYamlString(_0x4bcffe):_0x4bcffe,_0x4f1e5d=yamlToApi(_0x4e82bb);let _0x6f16bb=null,_0x32b188='';try{_0x6f16bb=await this[_0x45ca67(0x150)](_0x4e82bb[_0x45ca67(0x13c)]);const _0x1fecbc=apiToYaml(_0x6f16bb);_0x32b188=toYamlString(_0x1fecbc);}catch{}const _0xd1da7c=toYamlString(_0x4e82bb),_0x1a14d6=generateDiff(_0x32b188,_0xd1da7c),_0x2df37b=formatDiffWithColors(_0x1a14d6),_0x366d36=_0x6f16bb===null,_0x25d785=hasChanges(_0x1a14d6),_0x29b5f0={'isNew':_0x366d36,'id':_0x6f16bb?.['id']||'','name':_0x4e82bb['name'],'diff':_0x1a14d6,'diffFormatted':_0x2df37b,'hasChanges':_0x25d785},_0x3d1ca4=async()=>{const _0x2a2ccf=_0x45ca67;return _0x366d36?await this[_0x2a2ccf(0x182)](_0x4f1e5d):await this[_0x2a2ccf(0x142)](_0x6f16bb['id'],_0x4f1e5d);};return{..._0x29b5f0,'apply':_0x3d1ca4};}async['validateParentYaml'](_0x2271b2,_0x4b9fe9={}){const _0x41f492=a77_0x3ab297,_0x521585=typeof _0x2271b2==='string'?parseYamlString(_0x2271b2):_0x2271b2,_0x5580f0=[];let _0x5cf4e6=!![];const _0x122618=_0x432617=>_0x4b9fe9[_0x41f492(0x12c)]?.(_0x432617),_0x383087={'name':_0x521585[_0x41f492(0x13c)],'master':{'database':_0x521585['master']['database'],'table':_0x521585['master'][_0x41f492(0x1b0)],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x5580f0,'allValid':!![]},_0x43f0fa=async _0x540a49=>{const _0x35b330=_0x41f492;try{const _0x21c116=await this['trinoClient'][_0x35b330(0x17d)](_0x540a49);return{'data':_0x21c116['data']};}catch(_0x2672f5){const _0xb9db89=_0x2672f5 instanceof Error?_0x2672f5[_0x35b330(0x15f)]:String(_0x2672f5);return{'data':[],'error':_0xb9db89};}};_0x122618(_0x41f492(0x12b)+_0x521585['master'][_0x41f492(0x1a3)]+'.'+_0x521585['master'][_0x41f492(0x1b0)]);const _0x5e1c5c=generateSchemaValidationSQL(_0x521585[_0x41f492(0x13d)]['database'],_0x521585[_0x41f492(0x13d)]['table']),_0x4fbbbd=await _0x43f0fa(_0x5e1c5c);if(_0x4fbbbd['error'])_0x383087[_0x41f492(0x13d)][_0x41f492(0x12d)]=![],_0x383087[_0x41f492(0x13d)][_0x41f492(0x186)]=_0x4fbbbd[_0x41f492(0x1a0)],_0x5580f0[_0x41f492(0x133)](_0x41f492(0x160)+_0x4fbbbd['error']),_0x5cf4e6=![];else{_0x383087[_0x41f492(0x13d)][_0x41f492(0x12d)]=!![],_0x122618(_0x41f492(0x146));const _0x134533=await _0x43f0fa(generateMasterCountSQL(_0x521585));!_0x134533[_0x41f492(0x1a0)]&&_0x134533[_0x41f492(0x162)]['length']>0x0&&(_0x383087[_0x41f492(0x13d)][_0x41f492(0x139)]=_0x134533['data'][0x0][_0x41f492(0x141)]);}if(_0x4b9fe9[_0x41f492(0x13d)])return _0x383087[_0x41f492(0x187)]=_0x5cf4e6,_0x383087;const _0x5d30d6=async _0x5cd9ec=>{const _0xd60b53=_0x41f492,_0x10fc73={'name':_0x5cd9ec[_0xd60b53(0x13c)],'database':_0x5cd9ec[_0xd60b53(0x1a8)][_0xd60b53(0x1a3)],'table':_0x5cd9ec[_0xd60b53(0x1a8)][_0xd60b53(0x1b0)],'joinKey':_0x5cd9ec[_0xd60b53(0x1a7)][_0xd60b53(0x163)],'foreignKey':_0x5cd9ec[_0xd60b53(0x1a7)][_0xd60b53(0x159)],'columns':getAttributeColumns(_0x5cd9ec),'schemaValid':![]};_0x122618(_0xd60b53(0x183)+_0x5cd9ec[_0xd60b53(0x13c)]);const _0x43d6c6=await _0x43f0fa(generateAttributeSchemaSQL(_0x521585,_0x5cd9ec));if(_0x43d6c6['error'])_0x10fc73[_0xd60b53(0x186)]=_0x43d6c6['error'];else{_0x10fc73[_0xd60b53(0x12d)]=!![],_0x122618(_0xd60b53(0x18d)+_0x5cd9ec[_0xd60b53(0x13c)]);const _0x2d7e16=await _0x43f0fa(generateAttributeCoverageSQL(_0x521585,_0x5cd9ec));!_0x2d7e16[_0xd60b53(0x1a0)]&&_0x2d7e16['data'][_0xd60b53(0x192)]>0x0&&(_0x10fc73[_0xd60b53(0x184)]=_0x2d7e16['data'][0x0]['matched_count'],_0x383087[_0xd60b53(0x13d)]['rowCount']&&_0x383087[_0xd60b53(0x13d)]['rowCount']>0x0&&(_0x10fc73[_0xd60b53(0x135)]=_0x10fc73[_0xd60b53(0x184)]/_0x383087[_0xd60b53(0x13d)][_0xd60b53(0x139)]*0x64));}return _0x10fc73;},_0x386b9c=async(_0x3249bb,_0x2e930b)=>{const _0x1d7372=_0x41f492,_0x4ea663={'name':_0x3249bb[_0x1d7372(0x13c)],'database':_0x3249bb['source'][_0x1d7372(0x1a3)],'table':_0x3249bb[_0x1d7372(0x1a8)][_0x1d7372(0x1b0)],'joinKey':_0x3249bb[_0x1d7372(0x1a7)][_0x1d7372(0x163)],'foreignKey':_0x3249bb[_0x1d7372(0x1a7)][_0x1d7372(0x159)],'columns':getBehaviorColumns(_0x3249bb),'schemaValid':![]};_0x122618(_0x1d7372(0x168)+_0x3249bb[_0x1d7372(0x13c)]);const _0x3d4055=await _0x43f0fa(generateBehaviorSchemaSQL(_0x521585,_0x3249bb));if(_0x3d4055['error'])_0x4ea663[_0x1d7372(0x186)]=_0x3d4055['error'];else{_0x4ea663['schemaValid']=!![],_0x122618(_0x1d7372(0x144)+_0x3249bb['name']+'\x20('+_0x2e930b+')');const _0x3bf4df=await _0x43f0fa(generateBehaviorStatsSQL(_0x521585,_0x3249bb,_0x2e930b));!_0x3bf4df[_0x1d7372(0x1a0)]&&_0x3bf4df[_0x1d7372(0x162)][_0x1d7372(0x192)]>0x0&&(_0x4ea663[_0x1d7372(0x1a1)]=_0x3bf4df[_0x1d7372(0x162)][0x0]['customers_with_events'],_0x4ea663[_0x1d7372(0x19d)]=_0x3bf4df[_0x1d7372(0x162)][0x0][_0x1d7372(0x17f)],_0x383087[_0x1d7372(0x13d)][_0x1d7372(0x139)]&&_0x383087[_0x1d7372(0x13d)]['rowCount']>0x0&&(_0x4ea663[_0x1d7372(0x155)]=_0x4ea663['customersWithEvents']/_0x383087['master'][_0x1d7372(0x139)]*0x64));}return _0x4ea663;},_0x281cb8=(_0xb078cb,_0x1264ce)=>{const _0x4aadf7=_0x41f492;_0x383087[_0x4aadf7(0x136)]=_0xb078cb,_0x383087[_0x4aadf7(0x157)]=_0x1264ce;for(const _0x3d990b of _0xb078cb){!_0x3d990b[_0x4aadf7(0x12d)]&&(_0x5580f0[_0x4aadf7(0x133)](_0x4aadf7(0x12e)+_0x3d990b['name']+_0x4aadf7(0x185)+_0x3d990b[_0x4aadf7(0x186)]),_0x5cf4e6=![]);}for(const _0x29772f of _0x1264ce){!_0x29772f[_0x4aadf7(0x12d)]&&(_0x5580f0[_0x4aadf7(0x133)](_0x4aadf7(0x16a)+_0x29772f[_0x4aadf7(0x13c)]+_0x4aadf7(0x185)+_0x29772f[_0x4aadf7(0x186)]),_0x5cf4e6=![]);}},_0x4dbdb1=_0x4b9fe9[_0x41f492(0x1b4)]||DEFAULT_TIME_RANGE;if(typeof _0x4b9fe9['attribute']==='string'){const _0xe8be96=findAttributeByName(_0x521585,_0x4b9fe9[_0x41f492(0x13a)]);if(!_0xe8be96)throw new SDKError(ErrorCode[_0x41f492(0x1ae)],_0x41f492(0x12e)+_0x4b9fe9[_0x41f492(0x13a)]+'\x27\x20not\x20found');const _0x5246c2=await _0x5d30d6(_0xe8be96);return _0x281cb8([_0x5246c2],[]),_0x383087[_0x41f492(0x187)]=_0x5cf4e6,_0x383087;}if(_0x4b9fe9[_0x41f492(0x13a)]===!![]){_0x122618(_0x41f492(0x137));const _0x5201a7=await Promise[_0x41f492(0x1a2)]((_0x521585[_0x41f492(0x136)]||[])[_0x41f492(0x138)](_0x5bf1b3=>_0x5d30d6(_0x5bf1b3)));return _0x281cb8(_0x5201a7,[]),_0x383087['allValid']=_0x5cf4e6,_0x383087;}if(typeof _0x4b9fe9['behavior']==='string'){const _0x40f5e5=findBehaviorByName(_0x521585,_0x4b9fe9[_0x41f492(0x19a)]);if(!_0x40f5e5)throw new SDKError(ErrorCode[_0x41f492(0x1ae)],_0x41f492(0x16a)+_0x4b9fe9[_0x41f492(0x19a)]+_0x41f492(0x191));const _0x2af14a=await _0x386b9c(_0x40f5e5,_0x4dbdb1);return _0x281cb8([],[_0x2af14a]),_0x383087[_0x41f492(0x187)]=_0x5cf4e6,_0x383087;}if(_0x4b9fe9['behavior']===!![]){_0x122618('Validating\x20all\x20behaviors\x20in\x20parallel...');const _0x25d408=await Promise[_0x41f492(0x1a2)]((_0x521585[_0x41f492(0x157)]||[])[_0x41f492(0x138)](_0x38670b=>_0x386b9c(_0x38670b,_0x4dbdb1)));return _0x281cb8([],_0x25d408),_0x383087[_0x41f492(0x187)]=_0x5cf4e6,_0x383087;}if(_0x4b9fe9[_0x41f492(0x1a5)]){_0x122618(_0x41f492(0x137));const _0x1fc307=await Promise[_0x41f492(0x1a2)]((_0x521585[_0x41f492(0x136)]||[])['map'](_0x240c28=>_0x5d30d6(_0x240c28)));return _0x281cb8(_0x1fc307,[]),_0x383087[_0x41f492(0x187)]=_0x5cf4e6,_0x383087;}_0x122618(_0x41f492(0x194));const [_0x13451a,_0x3ab412]=await Promise[_0x41f492(0x1a2)]([Promise[_0x41f492(0x1a2)]((_0x521585[_0x41f492(0x136)]||[])[_0x41f492(0x138)](_0xa60a27=>_0x5d30d6(_0xa60a27))),Promise[_0x41f492(0x1a2)]((_0x521585['behaviors']||[])[_0x41f492(0x138)](_0x3bd1fc=>_0x386b9c(_0x3bd1fc,_0x4dbdb1)))]);return _0x281cb8(_0x13451a,_0x3ab412),_0x383087['allValid']=_0x5cf4e6,_0x383087;}async[a77_0x3ab297(0x18b)](_0x594053,_0x31433c={}){const _0xf17e92=a77_0x3ab297,_0x456fce=typeof _0x594053===_0xf17e92(0x17b)?parseYamlString(_0x594053):_0x594053,_0x58f6ad=[];let _0x4ad859=!![];const _0x526b42=_0x371b9a=>_0x31433c[_0xf17e92(0x12c)]?.(_0x371b9a),_0x2d86b4={'name':_0x456fce[_0xf17e92(0x13c)],'master':{'database':_0x456fce[_0xf17e92(0x13d)]['database'],'table':_0x456fce['master'][_0xf17e92(0x1b0)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0x58f6ad,'allValid':!![]},_0x558e74=async _0xd62e1f=>{const _0x4439c5=_0xf17e92;try{const _0x297321=await this[_0x4439c5(0x12f)]['executeQuery'](_0xd62e1f);return{'data':_0x297321['data']};}catch(_0x3e0e91){const _0x213d7d=_0x3e0e91 instanceof Error?_0x3e0e91[_0x4439c5(0x15f)]:String(_0x3e0e91);return{'data':[],'error':_0x213d7d};}};if(_0x31433c[_0xf17e92(0x13d)]){_0x526b42(_0xf17e92(0x140));const _0x4c2453=generateMasterSampleSQL(_0x456fce,DEFAULT_SAMPLE_LIMIT),_0x1571a6=await _0x558e74(_0x4c2453);return!_0x1571a6['error']?_0x2d86b4[_0xf17e92(0x1aa)]=_0x1571a6['data']:(_0x58f6ad['push'](_0xf17e92(0x160)+_0x1571a6[_0xf17e92(0x1a0)]),_0x4ad859=![]),_0x2d86b4[_0xf17e92(0x187)]=_0x4ad859,_0x2d86b4;}if(_0x31433c[_0xf17e92(0x13a)]){const _0x261bec=findAttributeByName(_0x456fce,_0x31433c[_0xf17e92(0x13a)]);if(!_0x261bec)throw new SDKError(ErrorCode[_0xf17e92(0x1ae)],_0xf17e92(0x12e)+_0x31433c[_0xf17e92(0x13a)]+_0xf17e92(0x191));_0x526b42(_0xf17e92(0x13e)+_0x261bec[_0xf17e92(0x13c)]);const _0x4d2555=generateAttributeSampleSQL(_0x456fce,_0x261bec,DEFAULT_SAMPLE_LIMIT),_0x30f481=await _0x558e74(_0x4d2555);return!_0x30f481[_0xf17e92(0x1a0)]?_0x2d86b4[_0xf17e92(0x1aa)]=_0x30f481[_0xf17e92(0x162)]:(_0x58f6ad[_0xf17e92(0x133)](_0xf17e92(0x12e)+_0x261bec[_0xf17e92(0x13c)]+_0xf17e92(0x185)+_0x30f481[_0xf17e92(0x1a0)]),_0x4ad859=![]),_0x2d86b4[_0xf17e92(0x187)]=_0x4ad859,_0x2d86b4;}if(_0x31433c[_0xf17e92(0x19a)]){const _0x156fb6=findBehaviorByName(_0x456fce,_0x31433c[_0xf17e92(0x19a)]);if(!_0x156fb6)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Behavior\x20\x27'+_0x31433c[_0xf17e92(0x19a)]+_0xf17e92(0x191));const _0xbef734=_0x31433c['interval']||DEFAULT_TIME_RANGE;_0x526b42(_0xf17e92(0x13e)+_0x156fb6[_0xf17e92(0x13c)]+'\x20('+_0xbef734+')');const _0x5f6179=generateBehaviorSampleSQL(_0x456fce,_0x156fb6,DEFAULT_SAMPLE_LIMIT,_0xbef734),_0x48cb12=await _0x558e74(_0x5f6179);return!_0x48cb12[_0xf17e92(0x1a0)]?_0x2d86b4[_0xf17e92(0x1aa)]=_0x48cb12[_0xf17e92(0x162)]:(_0x58f6ad[_0xf17e92(0x133)](_0xf17e92(0x16a)+_0x156fb6[_0xf17e92(0x13c)]+'\x27:\x20'+_0x48cb12['error']),_0x4ad859=![]),_0x2d86b4[_0xf17e92(0x187)]=_0x4ad859,_0x2d86b4;}if(_0x31433c[_0xf17e92(0x1a5)]){_0x526b42(_0xf17e92(0x16f));const _0x2b5876=generateEnrichedSQL(_0x456fce,DEFAULT_SAMPLE_LIMIT),_0x561328=await _0x558e74(_0x2b5876);return!_0x561328[_0xf17e92(0x1a0)]?_0x2d86b4[_0xf17e92(0x1aa)]=_0x561328[_0xf17e92(0x162)]:(_0x58f6ad['push'](_0xf17e92(0x19e)+_0x561328[_0xf17e92(0x1a0)]),_0x4ad859=![]),_0x2d86b4['allValid']=_0x4ad859,_0x2d86b4;}return _0x2d86b4[_0xf17e92(0x187)]=_0x4ad859,_0x2d86b4;}async['createSegment'](_0x1b0519,_0x2d3b3c){const _0x442d8b=a77_0x3ab297;return await this[_0x442d8b(0x1ab)][_0x442d8b(0x18f)](_0x1b0519,_0x2d3b3c);}async['createJourneySegment'](_0x21e37f){const _0x4b66d7=a77_0x3ab297;return await this[_0x4b66d7(0x1ab)]['createJourneySegment'](_0x21e37f);}async[a77_0x3ab297(0x132)](_0x3aa1fd,_0x104131,_0x493dc6){const _0x396c50=a77_0x3ab297;return await this[_0x396c50(0x1ab)]['updateSegment'](_0x3aa1fd,_0x104131,_0x493dc6);}async[a77_0x3ab297(0x134)](_0x4cb155){const _0x473086=a77_0x3ab297;return await this['client'][_0x473086(0x134)](_0x4cb155);}async[a77_0x3ab297(0x1ac)](_0x89fc1f,_0x181460){const _0x13e27b=a77_0x3ab297,_0x5046db=await this[_0x13e27b(0x1b1)](_0x89fc1f);return await this['client'][_0x13e27b(0x16b)](_0x5046db,_0x181460);}async['resolveParentIdOrName'](_0xf7d56e){const _0x16967f=a77_0x3ab297;if(/^\d+$/[_0x16967f(0x1a6)](_0xf7d56e))return _0xf7d56e;return await this[_0x16967f(0x16c)](_0xf7d56e);}async[a77_0x3ab297(0x17e)](_0x1aeeaf,_0x576700){const _0x23c0fe=a77_0x3ab297,[_0x1345b5,_0x3b714a]=await Promise[_0x23c0fe(0x1a2)]([this[_0x23c0fe(0x14e)](_0x1aeeaf,_0x576700)[_0x23c0fe(0x13f)](()=>!![])[_0x23c0fe(0x131)](()=>![]),this[_0x23c0fe(0x179)](_0x1aeeaf,_0x576700)[_0x23c0fe(0x13f)](()=>!![])[_0x23c0fe(0x131)](()=>![])]);if(_0x1345b5&&_0x3b714a)return'ambiguous';else{if(_0x1345b5)return _0x23c0fe(0x178);else{if(_0x3b714a)return _0x23c0fe(0x14f);}}throw new SDKError(ErrorCode[_0x23c0fe(0x1ae)],_0x23c0fe(0x18e)+_0x576700+'\x27\x20not\x20found\x20in\x20parent\x20segment');}async[a77_0x3ab297(0x165)](_0x355a0,_0x1905cd,_0x88bde0){const _0x428b3d=a77_0x3ab297,[_0x549fc6,_0x4425d3]=await Promise['all']([this[_0x428b3d(0x152)](_0x355a0),this[_0x428b3d(0x19f)](_0x355a0)]),_0x216665=_0x88bde0?_0x549fc6[_0x428b3d(0x148)](_0x1987e3=>_0x1987e3[_0x428b3d(0x1b3)]===_0x88bde0):_0x549fc6[_0x428b3d(0x148)](_0x572aa9=>!_0x572aa9['parentFolderId']),_0x1dde63=_0x88bde0?_0x4425d3['filter'](_0x68f58b=>_0x68f58b[_0x428b3d(0x176)]===_0x88bde0):_0x4425d3[_0x428b3d(0x148)](_0x5af184=>!_0x5af184[_0x428b3d(0x176)]),_0x1b4978=_0x216665[_0x428b3d(0x13b)](_0x4bac5b=>_0x4bac5b[_0x428b3d(0x13c)]===_0x1905cd),_0x1a6f12=_0x1dde63[_0x428b3d(0x13b)](_0x52c235=>_0x52c235[_0x428b3d(0x13c)]===_0x1905cd);if(_0x1b4978&&_0x1a6f12)return _0x428b3d(0x17c);else{if(_0x1b4978)return'folder';else{if(_0x1a6f12)return _0x428b3d(0x14f);}}throw new SDKError(ErrorCode[_0x428b3d(0x1ae)],_0x428b3d(0x18e)+_0x1905cd+'\x27\x20not\x20found\x20in\x20'+(_0x88bde0?_0x428b3d(0x178):_0x428b3d(0x175)));}async['traversePath'](_0x8acfe6){const _0x1c40c8=a77_0x3ab297;if(_0x8acfe6[_0x1c40c8(0x192)]===0x0)throw new SDKError(ErrorCode[_0x1c40c8(0x154)],'Path\x20cannot\x20be\x20empty');const _0x62770f=_0x8acfe6[0x0],_0x11f101=await this['resolveParentId'](_0x62770f);if(_0x8acfe6[_0x1c40c8(0x192)]===0x1)return{'parentId':_0x11f101,'parentName':_0x62770f,'type':'parent','fullPath':_0x62770f};const _0x9729f8=await this[_0x1c40c8(0x150)](_0x11f101),_0x261cf2=_0x9729f8[_0x1c40c8(0x189)],_0x59d614=[];let _0x3b1188=_0x261cf2;for(let _0x5079db=0x1;_0x5079db<_0x8acfe6[_0x1c40c8(0x192)]-0x1;_0x5079db++){const _0x14a4d2=_0x8acfe6[_0x5079db],_0x425df0=await this[_0x1c40c8(0x152)](_0x11f101),_0x28d634=_0x3b1188?_0x425df0[_0x1c40c8(0x1b2)](_0x520196=>_0x520196[_0x1c40c8(0x13c)]===_0x14a4d2&&_0x520196[_0x1c40c8(0x1b3)]===_0x3b1188):_0x425df0[_0x1c40c8(0x1b2)](_0x2d486b=>_0x2d486b[_0x1c40c8(0x13c)]===_0x14a4d2&&!_0x2d486b['parentFolderId']);if(!_0x28d634)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x1c40c8(0x149)+_0x14a4d2+_0x1c40c8(0x171));_0x59d614['push'](_0x14a4d2),_0x3b1188=_0x28d634['id'];}const _0x379c6d=_0x8acfe6[_0x8acfe6[_0x1c40c8(0x192)]-0x1],_0x4e468e=await this[_0x1c40c8(0x165)](_0x11f101,_0x379c6d,_0x3b1188);if(_0x4e468e==='ambiguous'||_0x4e468e===_0x1c40c8(0x178)){const _0x2debf3=await this[_0x1c40c8(0x152)](_0x11f101),_0x571ba7=_0x3b1188?_0x2debf3['find'](_0x5cea8e=>_0x5cea8e['name']===_0x379c6d&&_0x5cea8e['parentFolderId']===_0x3b1188):_0x2debf3[_0x1c40c8(0x1b2)](_0xbcb37f=>_0xbcb37f[_0x1c40c8(0x13c)]===_0x379c6d&&!_0xbcb37f[_0x1c40c8(0x1b3)]);if(!_0x571ba7)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x1c40c8(0x149)+_0x379c6d+_0x1c40c8(0x191));return _0x59d614[_0x1c40c8(0x133)](_0x379c6d),{'parentId':_0x11f101,'parentName':_0x62770f,'folderId':_0x571ba7['id'],'folderPath':_0x59d614,'type':_0x1c40c8(0x178),'fullPath':_0x8acfe6[_0x1c40c8(0x1a7)]('/')};}else{const _0x5634bc=await this[_0x1c40c8(0x19f)](_0x11f101),_0x12580b=_0x3b1188?_0x5634bc[_0x1c40c8(0x1b2)](_0x3232d6=>_0x3232d6[_0x1c40c8(0x13c)]===_0x379c6d&&_0x3232d6[_0x1c40c8(0x176)]===_0x3b1188):_0x5634bc[_0x1c40c8(0x1b2)](_0x579e98=>_0x579e98[_0x1c40c8(0x13c)]===_0x379c6d&&!_0x579e98[_0x1c40c8(0x176)]);if(!_0x12580b)throw new SDKError(ErrorCode[_0x1c40c8(0x1ae)],_0x1c40c8(0x14d)+_0x379c6d+'\x27\x20not\x20found');return{'parentId':_0x11f101,'parentName':_0x62770f,'folderId':_0x3b1188,'folderPath':_0x59d614[_0x1c40c8(0x192)]>0x0?_0x59d614:undefined,'segmentId':_0x12580b['id'],'segmentName':_0x379c6d,'type':'segment','fullPath':_0x8acfe6['join']('/')};}}async[a77_0x3ab297(0x16e)](_0x4f26d5){const _0xbce6cc=a77_0x3ab297,_0x5ce76c=parsePath(_0x4f26d5);if(!_0x5ce76c['isAbsolute'])throw new SDKError(ErrorCode[_0xbce6cc(0x154)],_0xbce6cc(0x1ad));return await this['traversePath'](_0x5ce76c[_0xbce6cc(0x193)]);}async[a77_0x3ab297(0x1b7)](_0x4e067a,_0x4ec856){const _0x38c91b=a77_0x3ab297,[_0x3c3d67,_0x345c04]=await Promise[_0x38c91b(0x1a2)]([this[_0x38c91b(0x152)](_0x4e067a),this[_0x38c91b(0x19f)](_0x4e067a)]);if(_0x4ec856){const _0x5514e4=_0x3c3d67['filter'](_0x49ac3c=>_0x49ac3c[_0x38c91b(0x1b3)]===_0x4ec856),_0x5a3fd8=_0x345c04[_0x38c91b(0x148)](_0x378e51=>_0x378e51[_0x38c91b(0x176)]===_0x4ec856);return{'folders':_0x5514e4,'segments':_0x5a3fd8};}const _0x778675=await this[_0x38c91b(0x150)](_0x4e067a),_0x125fc8=_0x778675[_0x38c91b(0x189)];if(_0x125fc8){const _0x3b2990=_0x3c3d67[_0x38c91b(0x148)](_0x313aa7=>_0x313aa7[_0x38c91b(0x1b3)]===_0x125fc8),_0x46b704=_0x345c04[_0x38c91b(0x148)](_0x2cd8d2=>_0x2cd8d2[_0x38c91b(0x176)]===_0x125fc8);return{'folders':_0x3b2990,'segments':_0x46b704};}const _0x28243b=_0x3c3d67[_0x38c91b(0x148)](_0x325bfa=>!_0x325bfa['parentFolderId']),_0x1bc154=_0x345c04[_0x38c91b(0x148)](_0x24efd8=>!_0x24efd8[_0x38c91b(0x176)]);return{'folders':_0x28243b,'segments':_0x1bc154};}async[a77_0x3ab297(0x14b)](_0x195b32,_0x826da6,_0x50527a=0x0,_0x4bcd06=0xa){const _0x18e3c1=a77_0x3ab297;if(_0x50527a>=_0x4bcd06)throw new SDKError(ErrorCode[_0x18e3c1(0x154)],_0x18e3c1(0x15c)+_0x4bcd06+_0x18e3c1(0x158));const {folders:_0x5addcf,segments:_0x1bf242}=await this[_0x18e3c1(0x1b7)](_0x195b32,_0x826da6),_0x3e24ec=[];for(const _0x4c01c3 of _0x5addcf){const _0x12bcd1=await this[_0x18e3c1(0x14b)](_0x195b32,_0x4c01c3['id'],_0x50527a+0x1,_0x4bcd06);_0x3e24ec['push']({'type':_0x18e3c1(0x178),'id':_0x4c01c3['id'],'name':_0x4c01c3[_0x18e3c1(0x13c)],'children':_0x12bcd1[_0x18e3c1(0x192)]>0x0?_0x12bcd1:undefined,'metadata':{'description':_0x4c01c3[_0x18e3c1(0x169)]||undefined,'folderCount':_0x12bcd1[_0x18e3c1(0x148)](_0xecbaac=>_0xecbaac[_0x18e3c1(0x143)]===_0x18e3c1(0x178))[_0x18e3c1(0x192)],'segmentCount':_0x12bcd1[_0x18e3c1(0x148)](_0x23ce7d=>_0x23ce7d[_0x18e3c1(0x143)]===_0x18e3c1(0x14f))[_0x18e3c1(0x192)],'createdAt':_0x4c01c3[_0x18e3c1(0x1af)],'updatedAt':_0x4c01c3['updatedAt']}});}for(const _0x23e1c1 of _0x1bf242){_0x3e24ec[_0x18e3c1(0x133)]({'type':_0x18e3c1(0x14f),'id':_0x23e1c1['id'],'name':_0x23e1c1[_0x18e3c1(0x13c)],'population':_0x23e1c1[_0x18e3c1(0x1b5)],'metadata':{'description':_0x23e1c1[_0x18e3c1(0x169)],'createdAt':_0x23e1c1[_0x18e3c1(0x1af)],'updatedAt':_0x23e1c1[_0x18e3c1(0x145)]}});}return _0x3e24ec;}}
1
+ const a77_0x4525f3=a77_0x31b0;(function(_0x186365,_0x2937ac){const _0x259f72=a77_0x31b0,_0xe0aa5a=_0x186365();while(!![]){try{const _0x4d5a4e=parseInt(_0x259f72(0x1c5))/0x1*(-parseInt(_0x259f72(0x204))/0x2)+-parseInt(_0x259f72(0x1df))/0x3*(parseInt(_0x259f72(0x207))/0x4)+parseInt(_0x259f72(0x1f5))/0x5*(-parseInt(_0x259f72(0x182))/0x6)+parseInt(_0x259f72(0x189))/0x7+parseInt(_0x259f72(0x1d4))/0x8*(-parseInt(_0x259f72(0x1a7))/0x9)+parseInt(_0x259f72(0x1db))/0xa+parseInt(_0x259f72(0x17a))/0xb;if(_0x4d5a4e===_0x2937ac)break;else _0xe0aa5a['push'](_0xe0aa5a['shift']());}catch(_0x45e13f){_0xe0aa5a['push'](_0xe0aa5a['shift']());}}}(a77_0xd52d,0xa6b79));import{CDPApiClient}from'../client/cdp-api-client.js';function a77_0xd52d(){const _0x35688c=['string','INVALID_ARGUMENT','Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...','deleteActivation','all','type','matchedCount','error','679nuuHVL','Validating\x20master\x20table:\x20','getActivation','Folder\x20\x27','getFolder','Child\x20segment\x20not\x20found:\x20','resolveSegmentId','matched_count','name','test','listSegments','segment','map','listUnified','getParentSQL','80UBMREy','message','coveragePercent','runParentSegment','traversePath','updateSegmentById','find','12033120tTfddp','updateActivation','rowCount','parent','99onhmNg','some','parentFolderId','ambiguous','segmentFolderId','parentTableName','listRecursive','\x27\x20not\x20found','Path\x20cannot\x20be\x20empty','getParentSegmentSQL','Behavior\x20\x27','attribute','createdAt','detectResourceTypeInFolder','getAudienceBehaviors','Fetching\x20master\x20sample\x20data...','runParent','sampleData','schemaError','resolveParentIdOrName','Parent\x20segment\x20not\x20found:\x20','getSegment','5qYblMH','Fetching\x20enriched\x20master\x20data...','onProgress','updateParentSegment','customersWithEvents','deleteSegment','trinoClient','catch','listSegmentFolders','getAudienceAttributes','getSegmentSQL','then','source','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','isAbsolute','386wbHWBP','pushParentYaml','behaviors','88552XYKxDo',')\x20exceeded','getSegmentFolder','createSegmentFolder','customerPercent','Fetching\x20sample\x20data\x20for:\x20','resolvePathToResource','7973020bTQfPE','child_key','enriched','isArray','listActivations','length','behavior','detectResourceType','4086072wnFkFW','customers_with_events','join','createActivation','resolveFolderId','totalEvents','pullParentYaml','3347218OtCqKS','listFields','schemaValid','groupingName','\x20in\x20parent\x20','table','Validating\x20all\x20attributes\x20in\x20parallel...','getParentFull','createFolder','filter','executeQuery','Calculating\x20statistics\x20for:\x20','allValid','master','parent\x20segment','createSegment','listFolders','description','rootFolderId','getParentSegment','Calculating\x20coverage\x20for:\x20','database','client','createParent','Attribute\x20\x27','SEGMENT_NOT_FOUND','logger','validateParentYaml','listParentSegments','Resource\x20\x27','162738RhVNks','getParentSegmentFull','previewParentYaml','Master\x20table:\x20','parentColumn','\x27\x20not\x20found\x20in\x20path','listParents','attributes','Validating\x20all\x20behaviors\x20in\x20parallel...','interval','folder','\x27:\x20','push','resolveParentId','Maximum\x20recursion\x20depth\x20(','updateSegment','schema','createJourneySegment','Segment\x20\x27','data','updateParent','segments'];a77_0xd52d=function(){return _0x35688c;};return a77_0xd52d();}import{TrinoApiClient}from'../client/trino-api-client.js';function a77_0x31b0(_0x4e90e5,_0x5e8ac1){_0x4e90e5=_0x4e90e5-0x176;const _0xd52dff=a77_0xd52d();let _0x31b0d1=_0xd52dff[_0x4e90e5];return _0x31b0d1;}import{SDKError,ErrorCode}from'./errors.js';import{parsePath}from'../utils/segment-path-parser.js';import{apiToYaml,yamlToApi,toYamlString,parseYamlString}from'./segment/parent-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{DEFAULT_TIME_RANGE,DEFAULT_SAMPLE_LIMIT,generateSchemaValidationSQL,generateMasterCountSQL,generateMasterSampleSQL,generateAttributeCoverageSQL,generateBehaviorStatsSQL,generateAttributeSampleSQL,generateBehaviorSampleSQL,generateEnrichedSQL,generateAttributeSchemaSQL,generateBehaviorSchemaSQL,findAttributeByName,findBehaviorByName,getAttributeColumns,getBehaviorColumns}from'./segment/parent-segment-preview.js';export class SegmentSDK{[a77_0x4525f3(0x19f)];['trinoClient'];constructor(_0x4065be){const _0x22a7e7=a77_0x4525f3;this[_0x22a7e7(0x19f)]=new CDPApiClient(_0x4065be,_0x4065be[_0x22a7e7(0x1a3)]),this[_0x22a7e7(0x1fb)]=new TrinoApiClient(_0x4065be,_0x4065be['logger']);}async[a77_0x4525f3(0x1ad)](){const _0x226067=a77_0x4525f3;return await this['client'][_0x226067(0x1a5)]();}async['getParent'](_0x4740a2){const _0x35747b=a77_0x4525f3;return await this[_0x35747b(0x19f)][_0x35747b(0x19c)](_0x4740a2);}async['listSegments'](_0x6c0355){const _0x4a3c4b=a77_0x4525f3;return await this[_0x4a3c4b(0x19f)]['listSegments'](_0x6c0355);}async[a77_0x4525f3(0x1f4)](_0x4a7a8f,_0x3ca212){const _0x1bf108=a77_0x4525f3;return await this[_0x1bf108(0x19f)][_0x1bf108(0x1f4)](_0x4a7a8f,_0x3ca212);}async[a77_0x4525f3(0x199)](_0x46e3fd){const _0x8128da=a77_0x4525f3;return await this['client'][_0x8128da(0x1fd)](_0x46e3fd);}async[a77_0x4525f3(0x1c9)](_0x29b140){const _0x1e9ac3=a77_0x4525f3;return await this[_0x1e9ac3(0x19f)][_0x1e9ac3(0x209)](_0x29b140);}async[a77_0x4525f3(0x17e)](_0x17c289,_0x4caf5e){const _0x30e546=a77_0x4525f3;return await this[_0x30e546(0x19f)]['listActivations'](_0x17c289,_0x4caf5e);}async[a77_0x4525f3(0x1c7)](_0x5c34b8,_0x209805,_0x4c6130){const _0x5a8d51=a77_0x4525f3;return await this[_0x5a8d51(0x19f)][_0x5a8d51(0x1c7)](_0x5c34b8,_0x209805,_0x4c6130);}async[a77_0x4525f3(0x185)](_0xf4d375,_0x555e5d,_0xc529bd){const _0x5dc57f=a77_0x4525f3;return await this[_0x5dc57f(0x19f)][_0x5dc57f(0x185)](_0xf4d375,_0x555e5d,_0xc529bd);}async['updateActivation'](_0x55a7a1,_0x2f9271,_0x3e3b84,_0x17d887){const _0x208f50=a77_0x4525f3;return await this[_0x208f50(0x19f)][_0x208f50(0x1dc)](_0x55a7a1,_0x2f9271,_0x3e3b84,_0x17d887);}async['deleteActivation'](_0x381bba,_0x222616,_0xc120b0){const _0x4bd40c=a77_0x4525f3;return await this[_0x4bd40c(0x19f)][_0x4bd40c(0x1c0)](_0x381bba,_0x222616,_0xc120b0);}async[a77_0x4525f3(0x1d3)](_0x474c0d){const _0x59f7d0=a77_0x4525f3;return await this[_0x59f7d0(0x19f)][_0x59f7d0(0x1e8)](_0x474c0d);}async[a77_0x4525f3(0x1ff)](_0x37600a,_0x2935c7){const _0xf19a49=a77_0x4525f3;return await this[_0xf19a49(0x19f)][_0xf19a49(0x1ff)](_0x37600a,_0x2935c7);}async[a77_0x4525f3(0x1b4)](_0x48cce6){const _0xd9169f=a77_0x4525f3,_0x1f9816=await this[_0xd9169f(0x1ad)](),_0x4cd9dc=_0x1f9816['find'](_0x51133a=>_0x51133a['attributes']['name']===_0x48cce6);if(!_0x4cd9dc)throw new SDKError(ErrorCode[_0xd9169f(0x1a2)],_0xd9169f(0x1f3)+_0x48cce6);return _0x4cd9dc['id'];}async[a77_0x4525f3(0x1ef)](_0x10df5b){const _0x5a897e=a77_0x4525f3;let _0x55a428=_0x10df5b;return!/^\d+$/[_0x5a897e(0x1ce)](_0x10df5b)&&(_0x55a428=await this[_0x5a897e(0x1b4)](_0x10df5b)),await this[_0x5a897e(0x19f)][_0x5a897e(0x1d7)](_0x55a428);}async[a77_0x4525f3(0x1cb)](_0x945a51,_0x1fc232){const _0x3ff784=a77_0x4525f3,_0x2f2d52=await this[_0x3ff784(0x1cf)](_0x945a51),_0x5f0612=_0x2f2d52[_0x3ff784(0x1da)](_0xde203c=>_0xde203c[_0x3ff784(0x1cd)]===_0x1fc232);if(!_0x5f0612)throw new SDKError(ErrorCode[_0x3ff784(0x1a2)],_0x3ff784(0x1ca)+_0x1fc232+'\x20in\x20parent\x20'+_0x945a51);return _0x5f0612['id'];}async[a77_0x4525f3(0x186)](_0x4d6542,_0x1200ed){const _0x902529=a77_0x4525f3,_0x2e25a6=await this[_0x902529(0x199)](_0x4d6542),_0x1a955e=_0x2e25a6['find'](_0x1e3b40=>_0x1e3b40[_0x902529(0x1cd)]===_0x1200ed);if(!_0x1a955e)throw new SDKError(ErrorCode[_0x902529(0x1a2)],'Folder\x20not\x20found:\x20'+_0x1200ed+_0x902529(0x18d)+_0x4d6542);return _0x1a955e['id'];}async[a77_0x4525f3(0x18a)](_0x14f22c){const _0x25bcba=a77_0x4525f3,_0x4a5d91=await this[_0x25bcba(0x1f2)](_0x14f22c),[_0x2dea13,_0x4ad17a]=await Promise[_0x25bcba(0x1c1)]([this['client'][_0x25bcba(0x1fe)](_0x4a5d91),this[_0x25bcba(0x19f)][_0x25bcba(0x1ed)](_0x4a5d91)]),_0x52e1d7=[];for(const _0x5bd93a of _0x2dea13){_0x52e1d7[_0x25bcba(0x1b3)]({'name':_0x5bd93a[_0x25bcba(0x1cd)],'type':_0x5bd93a[_0x25bcba(0x1c2)],'source':_0x25bcba(0x1ea),'parentDatabaseName':_0x5bd93a['parentDatabaseName'],'parentTableName':_0x5bd93a[_0x25bcba(0x1e4)],'parentColumn':_0x5bd93a[_0x25bcba(0x1ab)],'groupingName':_0x5bd93a[_0x25bcba(0x18c)]??undefined});}for(const _0x4f4062 of _0x4ad17a){const _0x2ebc10=_0x4f4062[_0x25bcba(0x1cd)];if(_0x4f4062['schema']&&Array[_0x25bcba(0x17d)](_0x4f4062[_0x25bcba(0x1b7)]))for(const _0x64569f of _0x4f4062[_0x25bcba(0x1b7)]){_0x64569f[_0x25bcba(0x1cd)]&&_0x64569f['type']&&_0x52e1d7[_0x25bcba(0x1b3)]({'name':_0x2ebc10+'.'+_0x64569f[_0x25bcba(0x1cd)],'type':_0x64569f[_0x25bcba(0x1c2)],'source':_0x25bcba(0x180),'behaviorName':_0x2ebc10,'parentDatabaseName':_0x4f4062['parentDatabaseName'],'parentTableName':_0x4f4062[_0x25bcba(0x1e4)],'parentColumn':_0x64569f[_0x25bcba(0x1ab)]});}}return _0x52e1d7;}async[a77_0x4525f3(0x1a0)](_0x3ed17c){return await this['client']['createParentSegment'](_0x3ed17c);}async[a77_0x4525f3(0x1bb)](_0x25c083,_0x27ce4f){const _0x3a6f65=a77_0x4525f3,_0x4610aa=await this[_0x3a6f65(0x1f2)](_0x25c083);return await this[_0x3a6f65(0x19f)][_0x3a6f65(0x1f8)](_0x4610aa,_0x27ce4f);}async[a77_0x4525f3(0x190)](_0x473fb7){const _0x367338=a77_0x4525f3,_0x3be3dd=await this[_0x367338(0x1f2)](_0x473fb7);return await this[_0x367338(0x19f)][_0x367338(0x1a8)](_0x3be3dd);}async[a77_0x4525f3(0x188)](_0x120436){const _0x312bfb=a77_0x4525f3,_0x155613=await this[_0x312bfb(0x190)](_0x120436),_0x3f8959=apiToYaml(_0x155613);return toYamlString(_0x3f8959);}async[a77_0x4525f3(0x205)](_0x23d3d1){const _0x5d2e79=a77_0x4525f3,_0x53283b=typeof _0x23d3d1===_0x5d2e79(0x1bd)?parseYamlString(_0x23d3d1):_0x23d3d1,_0x370720=yamlToApi(_0x53283b);let _0x128b02=null,_0x157a7b='';try{_0x128b02=await this[_0x5d2e79(0x190)](_0x53283b[_0x5d2e79(0x1cd)]);const _0x362258=apiToYaml(_0x128b02);_0x157a7b=toYamlString(_0x362258);}catch{}const _0x20ce91=toYamlString(_0x53283b),_0x18f071=generateDiff(_0x157a7b,_0x20ce91),_0x4138c1=formatDiffWithColors(_0x18f071),_0x5f0a66=_0x128b02===null,_0x5ded9b=hasChanges(_0x18f071),_0x37072d={'isNew':_0x5f0a66,'id':_0x128b02?.['id']||'','name':_0x53283b[_0x5d2e79(0x1cd)],'diff':_0x18f071,'diffFormatted':_0x4138c1,'hasChanges':_0x5ded9b},_0x2dede9=async()=>{const _0x5ede12=_0x5d2e79;return _0x5f0a66?await this[_0x5ede12(0x1a0)](_0x370720):await this[_0x5ede12(0x1bb)](_0x128b02['id'],_0x370720);};return{..._0x37072d,'apply':_0x2dede9};}async[a77_0x4525f3(0x1a4)](_0x3ec01f,_0x129252={}){const _0x59d7c7=a77_0x4525f3,_0x3744d5=typeof _0x3ec01f===_0x59d7c7(0x1bd)?parseYamlString(_0x3ec01f):_0x3ec01f,_0x38149e=[];let _0x416891=!![];const _0x552b6a=_0x3845ba=>_0x129252[_0x59d7c7(0x1f7)]?.(_0x3845ba),_0x27fb89={'name':_0x3744d5[_0x59d7c7(0x1cd)],'master':{'database':_0x3744d5[_0x59d7c7(0x196)][_0x59d7c7(0x19e)],'table':_0x3744d5['master']['table'],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x38149e,'allValid':!![]},_0x2654b7=async _0xa756c6=>{const _0x4bf142=_0x59d7c7;try{const _0x10ddff=await this[_0x4bf142(0x1fb)][_0x4bf142(0x193)](_0xa756c6);return{'data':_0x10ddff[_0x4bf142(0x1ba)]};}catch(_0x4f2b4e){const _0x64487=_0x4f2b4e instanceof Error?_0x4f2b4e[_0x4bf142(0x1d5)]:String(_0x4f2b4e);return{'data':[],'error':_0x64487};}};_0x552b6a(_0x59d7c7(0x1c6)+_0x3744d5['master'][_0x59d7c7(0x19e)]+'.'+_0x3744d5[_0x59d7c7(0x196)][_0x59d7c7(0x18e)]);const _0x26132b=generateSchemaValidationSQL(_0x3744d5[_0x59d7c7(0x196)][_0x59d7c7(0x19e)],_0x3744d5['master']['table']),_0x3b9c96=await _0x2654b7(_0x26132b);if(_0x3b9c96['error'])_0x27fb89[_0x59d7c7(0x196)][_0x59d7c7(0x18b)]=![],_0x27fb89[_0x59d7c7(0x196)][_0x59d7c7(0x1f1)]=_0x3b9c96['error'],_0x38149e[_0x59d7c7(0x1b3)](_0x59d7c7(0x1aa)+_0x3b9c96[_0x59d7c7(0x1c4)]),_0x416891=![];else{_0x27fb89[_0x59d7c7(0x196)]['schemaValid']=!![],_0x552b6a('Counting\x20master\x20table\x20rows...');const _0x2c8af2=await _0x2654b7(generateMasterCountSQL(_0x3744d5));!_0x2c8af2[_0x59d7c7(0x1c4)]&&_0x2c8af2['data'][_0x59d7c7(0x17f)]>0x0&&(_0x27fb89['master']['rowCount']=_0x2c8af2[_0x59d7c7(0x1ba)][0x0]['row_count']);}if(_0x129252[_0x59d7c7(0x196)])return _0x27fb89[_0x59d7c7(0x195)]=_0x416891,_0x27fb89;const _0x733776=async _0x269a67=>{const _0x565122=_0x59d7c7,_0x6da59f={'name':_0x269a67[_0x565122(0x1cd)],'database':_0x269a67[_0x565122(0x201)][_0x565122(0x19e)],'table':_0x269a67[_0x565122(0x201)][_0x565122(0x18e)],'joinKey':_0x269a67['join'][_0x565122(0x17b)],'foreignKey':_0x269a67[_0x565122(0x184)]['parent_key'],'columns':getAttributeColumns(_0x269a67),'schemaValid':![]};_0x552b6a('Validating\x20attribute:\x20'+_0x269a67['name']);const _0x363ca5=await _0x2654b7(generateAttributeSchemaSQL(_0x3744d5,_0x269a67));if(_0x363ca5['error'])_0x6da59f[_0x565122(0x1f1)]=_0x363ca5[_0x565122(0x1c4)];else{_0x6da59f[_0x565122(0x18b)]=!![],_0x552b6a(_0x565122(0x19d)+_0x269a67[_0x565122(0x1cd)]);const _0x30e09c=await _0x2654b7(generateAttributeCoverageSQL(_0x3744d5,_0x269a67));!_0x30e09c[_0x565122(0x1c4)]&&_0x30e09c['data'][_0x565122(0x17f)]>0x0&&(_0x6da59f[_0x565122(0x1c3)]=_0x30e09c[_0x565122(0x1ba)][0x0][_0x565122(0x1cc)],_0x27fb89[_0x565122(0x196)][_0x565122(0x1dd)]&&_0x27fb89[_0x565122(0x196)][_0x565122(0x1dd)]>0x0&&(_0x6da59f[_0x565122(0x1d6)]=_0x6da59f[_0x565122(0x1c3)]/_0x27fb89['master'][_0x565122(0x1dd)]*0x64));}return _0x6da59f;},_0x128065=async(_0x39421d,_0x4e6ee5)=>{const _0x179955=_0x59d7c7,_0x5054ba={'name':_0x39421d[_0x179955(0x1cd)],'database':_0x39421d[_0x179955(0x201)][_0x179955(0x19e)],'table':_0x39421d[_0x179955(0x201)]['table'],'joinKey':_0x39421d[_0x179955(0x184)][_0x179955(0x17b)],'foreignKey':_0x39421d['join']['parent_key'],'columns':getBehaviorColumns(_0x39421d),'schemaValid':![]};_0x552b6a('Validating\x20behavior:\x20'+_0x39421d[_0x179955(0x1cd)]);const _0x367c41=await _0x2654b7(generateBehaviorSchemaSQL(_0x3744d5,_0x39421d));if(_0x367c41['error'])_0x5054ba[_0x179955(0x1f1)]=_0x367c41[_0x179955(0x1c4)];else{_0x5054ba['schemaValid']=!![],_0x552b6a(_0x179955(0x194)+_0x39421d[_0x179955(0x1cd)]+'\x20('+_0x4e6ee5+')');const _0x4999fb=await _0x2654b7(generateBehaviorStatsSQL(_0x3744d5,_0x39421d,_0x4e6ee5));!_0x4999fb[_0x179955(0x1c4)]&&_0x4999fb[_0x179955(0x1ba)][_0x179955(0x17f)]>0x0&&(_0x5054ba[_0x179955(0x1f9)]=_0x4999fb[_0x179955(0x1ba)][0x0][_0x179955(0x183)],_0x5054ba[_0x179955(0x187)]=_0x4999fb[_0x179955(0x1ba)][0x0]['total_events'],_0x27fb89[_0x179955(0x196)][_0x179955(0x1dd)]&&_0x27fb89['master'][_0x179955(0x1dd)]>0x0&&(_0x5054ba[_0x179955(0x177)]=_0x5054ba[_0x179955(0x1f9)]/_0x27fb89[_0x179955(0x196)]['rowCount']*0x64));}return _0x5054ba;},_0x1f43a8=(_0x5d10de,_0x575268)=>{const _0x26de4c=_0x59d7c7;_0x27fb89[_0x26de4c(0x1ae)]=_0x5d10de,_0x27fb89[_0x26de4c(0x206)]=_0x575268;for(const _0x1b473b of _0x5d10de){!_0x1b473b[_0x26de4c(0x18b)]&&(_0x38149e[_0x26de4c(0x1b3)](_0x26de4c(0x1a1)+_0x1b473b[_0x26de4c(0x1cd)]+'\x27:\x20'+_0x1b473b[_0x26de4c(0x1f1)]),_0x416891=![]);}for(const _0x29f2be of _0x575268){!_0x29f2be[_0x26de4c(0x18b)]&&(_0x38149e[_0x26de4c(0x1b3)](_0x26de4c(0x1e9)+_0x29f2be[_0x26de4c(0x1cd)]+_0x26de4c(0x1b2)+_0x29f2be[_0x26de4c(0x1f1)]),_0x416891=![]);}},_0x682c1a=_0x129252[_0x59d7c7(0x1b0)]||DEFAULT_TIME_RANGE;if(typeof _0x129252[_0x59d7c7(0x1ea)]===_0x59d7c7(0x1bd)){const _0x1695a2=findAttributeByName(_0x3744d5,_0x129252['attribute']);if(!_0x1695a2)throw new SDKError(ErrorCode[_0x59d7c7(0x1a2)],'Attribute\x20\x27'+_0x129252[_0x59d7c7(0x1ea)]+'\x27\x20not\x20found');const _0x5ac7f5=await _0x733776(_0x1695a2);return _0x1f43a8([_0x5ac7f5],[]),_0x27fb89[_0x59d7c7(0x195)]=_0x416891,_0x27fb89;}if(_0x129252['attribute']===!![]){_0x552b6a(_0x59d7c7(0x18f));const _0x29b688=await Promise[_0x59d7c7(0x1c1)]((_0x3744d5['attributes']||[])[_0x59d7c7(0x1d1)](_0x479997=>_0x733776(_0x479997)));return _0x1f43a8(_0x29b688,[]),_0x27fb89['allValid']=_0x416891,_0x27fb89;}if(typeof _0x129252['behavior']===_0x59d7c7(0x1bd)){const _0x391d81=findBehaviorByName(_0x3744d5,_0x129252[_0x59d7c7(0x180)]);if(!_0x391d81)throw new SDKError(ErrorCode[_0x59d7c7(0x1a2)],_0x59d7c7(0x1e9)+_0x129252[_0x59d7c7(0x180)]+_0x59d7c7(0x1e6));const _0x347a21=await _0x128065(_0x391d81,_0x682c1a);return _0x1f43a8([],[_0x347a21]),_0x27fb89[_0x59d7c7(0x195)]=_0x416891,_0x27fb89;}if(_0x129252[_0x59d7c7(0x180)]===!![]){_0x552b6a(_0x59d7c7(0x1af));const _0x4c0a1b=await Promise[_0x59d7c7(0x1c1)]((_0x3744d5['behaviors']||[])[_0x59d7c7(0x1d1)](_0x5305ff=>_0x128065(_0x5305ff,_0x682c1a)));return _0x1f43a8([],_0x4c0a1b),_0x27fb89[_0x59d7c7(0x195)]=_0x416891,_0x27fb89;}if(_0x129252[_0x59d7c7(0x17c)]){_0x552b6a('Validating\x20all\x20attributes\x20in\x20parallel...');const _0x232de5=await Promise[_0x59d7c7(0x1c1)]((_0x3744d5[_0x59d7c7(0x1ae)]||[])[_0x59d7c7(0x1d1)](_0x2eadd8=>_0x733776(_0x2eadd8)));return _0x1f43a8(_0x232de5,[]),_0x27fb89[_0x59d7c7(0x195)]=_0x416891,_0x27fb89;}_0x552b6a(_0x59d7c7(0x1bf));const [_0x4bd3e3,_0x1e1aae]=await Promise[_0x59d7c7(0x1c1)]([Promise['all']((_0x3744d5[_0x59d7c7(0x1ae)]||[])[_0x59d7c7(0x1d1)](_0x4b5fc6=>_0x733776(_0x4b5fc6))),Promise['all']((_0x3744d5[_0x59d7c7(0x206)]||[])[_0x59d7c7(0x1d1)](_0x42982b=>_0x128065(_0x42982b,_0x682c1a)))]);return _0x1f43a8(_0x4bd3e3,_0x1e1aae),_0x27fb89[_0x59d7c7(0x195)]=_0x416891,_0x27fb89;}async[a77_0x4525f3(0x1a9)](_0x1c52a6,_0x26d308={}){const _0x53e85a=a77_0x4525f3,_0x2a4343=typeof _0x1c52a6===_0x53e85a(0x1bd)?parseYamlString(_0x1c52a6):_0x1c52a6,_0x251358=[];let _0x2bc09d=!![];const _0x28e456=_0x2a0005=>_0x26d308['onProgress']?.(_0x2a0005),_0x2c445f={'name':_0x2a4343[_0x53e85a(0x1cd)],'master':{'database':_0x2a4343['master'][_0x53e85a(0x19e)],'table':_0x2a4343[_0x53e85a(0x196)][_0x53e85a(0x18e)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0x251358,'allValid':!![]},_0x24f292=async _0x568cba=>{const _0x3b0bd5=_0x53e85a;try{const _0x4b8cb2=await this['trinoClient'][_0x3b0bd5(0x193)](_0x568cba);return{'data':_0x4b8cb2[_0x3b0bd5(0x1ba)]};}catch(_0x2db93a){const _0x59130a=_0x2db93a instanceof Error?_0x2db93a[_0x3b0bd5(0x1d5)]:String(_0x2db93a);return{'data':[],'error':_0x59130a};}};if(_0x26d308[_0x53e85a(0x196)]){_0x28e456(_0x53e85a(0x1ee));const _0x3e4cfe=generateMasterSampleSQL(_0x2a4343,DEFAULT_SAMPLE_LIMIT),_0x2bdb33=await _0x24f292(_0x3e4cfe);return!_0x2bdb33['error']?_0x2c445f[_0x53e85a(0x1f0)]=_0x2bdb33[_0x53e85a(0x1ba)]:(_0x251358[_0x53e85a(0x1b3)](_0x53e85a(0x1aa)+_0x2bdb33[_0x53e85a(0x1c4)]),_0x2bc09d=![]),_0x2c445f['allValid']=_0x2bc09d,_0x2c445f;}if(_0x26d308[_0x53e85a(0x1ea)]){const _0x16475e=findAttributeByName(_0x2a4343,_0x26d308['attribute']);if(!_0x16475e)throw new SDKError(ErrorCode[_0x53e85a(0x1a2)],_0x53e85a(0x1a1)+_0x26d308['attribute']+'\x27\x20not\x20found');_0x28e456(_0x53e85a(0x178)+_0x16475e[_0x53e85a(0x1cd)]);const _0x440a0e=generateAttributeSampleSQL(_0x2a4343,_0x16475e,DEFAULT_SAMPLE_LIMIT),_0xa90544=await _0x24f292(_0x440a0e);return!_0xa90544[_0x53e85a(0x1c4)]?_0x2c445f[_0x53e85a(0x1f0)]=_0xa90544[_0x53e85a(0x1ba)]:(_0x251358[_0x53e85a(0x1b3)](_0x53e85a(0x1a1)+_0x16475e['name']+_0x53e85a(0x1b2)+_0xa90544['error']),_0x2bc09d=![]),_0x2c445f[_0x53e85a(0x195)]=_0x2bc09d,_0x2c445f;}if(_0x26d308[_0x53e85a(0x180)]){const _0x29e689=findBehaviorByName(_0x2a4343,_0x26d308[_0x53e85a(0x180)]);if(!_0x29e689)throw new SDKError(ErrorCode[_0x53e85a(0x1a2)],_0x53e85a(0x1e9)+_0x26d308[_0x53e85a(0x180)]+'\x27\x20not\x20found');const _0x1aa6db=_0x26d308[_0x53e85a(0x1b0)]||DEFAULT_TIME_RANGE;_0x28e456(_0x53e85a(0x178)+_0x29e689[_0x53e85a(0x1cd)]+'\x20('+_0x1aa6db+')');const _0x64f73a=generateBehaviorSampleSQL(_0x2a4343,_0x29e689,DEFAULT_SAMPLE_LIMIT,_0x1aa6db),_0x49fe3a=await _0x24f292(_0x64f73a);return!_0x49fe3a['error']?_0x2c445f[_0x53e85a(0x1f0)]=_0x49fe3a[_0x53e85a(0x1ba)]:(_0x251358[_0x53e85a(0x1b3)](_0x53e85a(0x1e9)+_0x29e689[_0x53e85a(0x1cd)]+_0x53e85a(0x1b2)+_0x49fe3a[_0x53e85a(0x1c4)]),_0x2bc09d=![]),_0x2c445f['allValid']=_0x2bc09d,_0x2c445f;}if(_0x26d308[_0x53e85a(0x17c)]){_0x28e456(_0x53e85a(0x1f6));const _0x5bb677=generateEnrichedSQL(_0x2a4343,DEFAULT_SAMPLE_LIMIT),_0x4398d8=await _0x24f292(_0x5bb677);return!_0x4398d8[_0x53e85a(0x1c4)]?_0x2c445f[_0x53e85a(0x1f0)]=_0x4398d8[_0x53e85a(0x1ba)]:(_0x251358['push']('Enriched\x20query:\x20'+_0x4398d8[_0x53e85a(0x1c4)]),_0x2bc09d=![]),_0x2c445f['allValid']=_0x2bc09d,_0x2c445f;}return _0x2c445f[_0x53e85a(0x195)]=_0x2bc09d,_0x2c445f;}async[a77_0x4525f3(0x198)](_0x48078d,_0x4d9b03){const _0x347639=a77_0x4525f3;return await this[_0x347639(0x19f)][_0x347639(0x198)](_0x48078d,_0x4d9b03);}async[a77_0x4525f3(0x1b8)](_0x2cecff){const _0x42fe13=a77_0x4525f3;return await this[_0x42fe13(0x19f)][_0x42fe13(0x1b8)](_0x2cecff);}async[a77_0x4525f3(0x1d9)](_0x2571da,_0x187f49,_0x858c3a){const _0x564aa6=a77_0x4525f3;return await this['client'][_0x564aa6(0x1b6)](_0x2571da,_0x187f49,_0x858c3a);}async[a77_0x4525f3(0x1fa)](_0xeab54c){const _0x1b8ce3=a77_0x4525f3;return await this[_0x1b8ce3(0x19f)][_0x1b8ce3(0x1fa)](_0xeab54c);}async[a77_0x4525f3(0x191)](_0xa92028,_0x449169){const _0x270f15=a77_0x4525f3,_0x16700e=await this[_0x270f15(0x1f2)](_0xa92028);return await this[_0x270f15(0x19f)][_0x270f15(0x176)](_0x16700e,_0x449169);}async[a77_0x4525f3(0x1f2)](_0x3eb706){const _0x34ebef=a77_0x4525f3;if(/^\d+$/[_0x34ebef(0x1ce)](_0x3eb706))return _0x3eb706;return await this[_0x34ebef(0x1b4)](_0x3eb706);}async[a77_0x4525f3(0x181)](_0x3a1cf9,_0x48f2ec){const _0x40f390=a77_0x4525f3,[_0x951228,_0x1c3b05]=await Promise['all']([this[_0x40f390(0x186)](_0x3a1cf9,_0x48f2ec)[_0x40f390(0x200)](()=>!![])['catch'](()=>![]),this[_0x40f390(0x1cb)](_0x3a1cf9,_0x48f2ec)[_0x40f390(0x200)](()=>!![])[_0x40f390(0x1fc)](()=>![])]);if(_0x951228&&_0x1c3b05)return'ambiguous';else{if(_0x951228)return _0x40f390(0x1b1);else{if(_0x1c3b05)return'segment';}}throw new SDKError(ErrorCode[_0x40f390(0x1a2)],_0x40f390(0x1a6)+_0x48f2ec+'\x27\x20not\x20found\x20in\x20parent\x20segment');}async[a77_0x4525f3(0x1ec)](_0xd77d71,_0x125c53,_0x2cbec9){const _0x3ed88e=a77_0x4525f3,[_0x4d0714,_0x10b033]=await Promise[_0x3ed88e(0x1c1)]([this[_0x3ed88e(0x199)](_0xd77d71),this['listSegments'](_0xd77d71)]),_0x508713=_0x2cbec9?_0x4d0714[_0x3ed88e(0x192)](_0x562321=>_0x562321[_0x3ed88e(0x1e1)]===_0x2cbec9):_0x4d0714[_0x3ed88e(0x192)](_0x268fa1=>!_0x268fa1[_0x3ed88e(0x1e1)]),_0x20bf2e=_0x2cbec9?_0x10b033[_0x3ed88e(0x192)](_0x396113=>_0x396113[_0x3ed88e(0x1e3)]===_0x2cbec9):_0x10b033['filter'](_0x3c5f03=>!_0x3c5f03['segmentFolderId']),_0x1f6393=_0x508713[_0x3ed88e(0x1e0)](_0x3a1ce8=>_0x3a1ce8['name']===_0x125c53),_0x62c84e=_0x20bf2e[_0x3ed88e(0x1e0)](_0x1e76ef=>_0x1e76ef[_0x3ed88e(0x1cd)]===_0x125c53);if(_0x1f6393&&_0x62c84e)return'ambiguous';else{if(_0x1f6393)return _0x3ed88e(0x1b1);else{if(_0x62c84e)return _0x3ed88e(0x1d0);}}throw new SDKError(ErrorCode[_0x3ed88e(0x1a2)],_0x3ed88e(0x1a6)+_0x125c53+'\x27\x20not\x20found\x20in\x20'+(_0x2cbec9?'folder':_0x3ed88e(0x197)));}async[a77_0x4525f3(0x1d8)](_0x5088fd){const _0x5851db=a77_0x4525f3;if(_0x5088fd[_0x5851db(0x17f)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5851db(0x1e7));const _0x17200e=_0x5088fd[0x0],_0x436a5e=await this[_0x5851db(0x1b4)](_0x17200e);if(_0x5088fd[_0x5851db(0x17f)]===0x1)return{'parentId':_0x436a5e,'parentName':_0x17200e,'type':_0x5851db(0x1de),'fullPath':_0x17200e};const _0x418590=await this[_0x5851db(0x190)](_0x436a5e),_0x555277=_0x418590[_0x5851db(0x19b)],_0x404acc=[];let _0x59058b=_0x555277;for(let _0x1fe21f=0x1;_0x1fe21f<_0x5088fd['length']-0x1;_0x1fe21f++){const _0x3a12c9=_0x5088fd[_0x1fe21f],_0x29c312=await this[_0x5851db(0x199)](_0x436a5e),_0x3ef46a=_0x59058b?_0x29c312['find'](_0x56862f=>_0x56862f['name']===_0x3a12c9&&_0x56862f[_0x5851db(0x1e1)]===_0x59058b):_0x29c312[_0x5851db(0x1da)](_0xb45b04=>_0xb45b04[_0x5851db(0x1cd)]===_0x3a12c9&&!_0xb45b04[_0x5851db(0x1e1)]);if(!_0x3ef46a)throw new SDKError(ErrorCode[_0x5851db(0x1a2)],_0x5851db(0x1c8)+_0x3a12c9+_0x5851db(0x1ac));_0x404acc[_0x5851db(0x1b3)](_0x3a12c9),_0x59058b=_0x3ef46a['id'];}const _0x44298b=_0x5088fd[_0x5088fd[_0x5851db(0x17f)]-0x1],_0x25de37=await this[_0x5851db(0x1ec)](_0x436a5e,_0x44298b,_0x59058b);if(_0x25de37===_0x5851db(0x1e2)||_0x25de37===_0x5851db(0x1b1)){const _0x4a77ba=await this[_0x5851db(0x199)](_0x436a5e),_0xffa8ac=_0x59058b?_0x4a77ba[_0x5851db(0x1da)](_0x27bf52=>_0x27bf52['name']===_0x44298b&&_0x27bf52[_0x5851db(0x1e1)]===_0x59058b):_0x4a77ba[_0x5851db(0x1da)](_0x114035=>_0x114035[_0x5851db(0x1cd)]===_0x44298b&&!_0x114035[_0x5851db(0x1e1)]);if(!_0xffa8ac)throw new SDKError(ErrorCode[_0x5851db(0x1a2)],_0x5851db(0x1c8)+_0x44298b+_0x5851db(0x1e6));return _0x404acc['push'](_0x44298b),{'parentId':_0x436a5e,'parentName':_0x17200e,'folderId':_0xffa8ac['id'],'folderPath':_0x404acc,'type':_0x5851db(0x1b1),'fullPath':_0x5088fd[_0x5851db(0x184)]('/')};}else{const _0x5ecf3a=await this[_0x5851db(0x1cf)](_0x436a5e),_0x7cebad=_0x59058b?_0x5ecf3a[_0x5851db(0x1da)](_0x4c5d65=>_0x4c5d65[_0x5851db(0x1cd)]===_0x44298b&&_0x4c5d65[_0x5851db(0x1e3)]===_0x59058b):_0x5ecf3a[_0x5851db(0x1da)](_0x3d45a4=>_0x3d45a4['name']===_0x44298b&&!_0x3d45a4[_0x5851db(0x1e3)]);if(!_0x7cebad)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x5851db(0x1b9)+_0x44298b+_0x5851db(0x1e6));return{'parentId':_0x436a5e,'parentName':_0x17200e,'folderId':_0x59058b,'folderPath':_0x404acc[_0x5851db(0x17f)]>0x0?_0x404acc:undefined,'segmentId':_0x7cebad['id'],'segmentName':_0x44298b,'type':'segment','fullPath':_0x5088fd[_0x5851db(0x184)]('/')};}}async[a77_0x4525f3(0x179)](_0x3e4891){const _0x5c24fd=a77_0x4525f3,_0x2c014b=parsePath(_0x3e4891);if(!_0x2c014b[_0x5c24fd(0x203)])throw new SDKError(ErrorCode[_0x5c24fd(0x1be)],_0x5c24fd(0x202));return await this[_0x5c24fd(0x1d8)](_0x2c014b[_0x5c24fd(0x1bc)]);}async[a77_0x4525f3(0x1d2)](_0x2af16e,_0x20d4c0){const _0x2d2f48=a77_0x4525f3,[_0x5a4f7b,_0x141bfa]=await Promise['all']([this[_0x2d2f48(0x199)](_0x2af16e),this[_0x2d2f48(0x1cf)](_0x2af16e)]);if(_0x20d4c0){const _0x20647f=_0x5a4f7b[_0x2d2f48(0x192)](_0x22ce74=>_0x22ce74[_0x2d2f48(0x1e1)]===_0x20d4c0),_0x2fa41c=_0x141bfa[_0x2d2f48(0x192)](_0xbbb399=>_0xbbb399['segmentFolderId']===_0x20d4c0);return{'folders':_0x20647f,'segments':_0x2fa41c};}const _0x537992=await this[_0x2d2f48(0x190)](_0x2af16e),_0x23746d=_0x537992[_0x2d2f48(0x19b)];if(_0x23746d){const _0x43cbbd=_0x5a4f7b[_0x2d2f48(0x192)](_0x170615=>_0x170615[_0x2d2f48(0x1e1)]===_0x23746d),_0x20db4d=_0x141bfa[_0x2d2f48(0x192)](_0x15f57a=>_0x15f57a[_0x2d2f48(0x1e3)]===_0x23746d);return{'folders':_0x43cbbd,'segments':_0x20db4d};}const _0x285893=_0x5a4f7b['filter'](_0x3b6c76=>!_0x3b6c76[_0x2d2f48(0x1e1)]),_0x38f0b8=_0x141bfa[_0x2d2f48(0x192)](_0x4406ea=>!_0x4406ea[_0x2d2f48(0x1e3)]);return{'folders':_0x285893,'segments':_0x38f0b8};}async[a77_0x4525f3(0x1e5)](_0x5d4d0a,_0x2e9e1d,_0x5f1a36=0x0,_0x209af7=0xa){const _0x218eb0=a77_0x4525f3;if(_0x5f1a36>=_0x209af7)throw new SDKError(ErrorCode[_0x218eb0(0x1be)],_0x218eb0(0x1b5)+_0x209af7+_0x218eb0(0x208));const {folders:_0x58433a,segments:_0x196328}=await this[_0x218eb0(0x1d2)](_0x5d4d0a,_0x2e9e1d),_0x5cf2cb=[];for(const _0x1c9c85 of _0x58433a){const _0x54405f=await this[_0x218eb0(0x1e5)](_0x5d4d0a,_0x1c9c85['id'],_0x5f1a36+0x1,_0x209af7);_0x5cf2cb[_0x218eb0(0x1b3)]({'type':'folder','id':_0x1c9c85['id'],'name':_0x1c9c85[_0x218eb0(0x1cd)],'children':_0x54405f[_0x218eb0(0x17f)]>0x0?_0x54405f:undefined,'metadata':{'description':_0x1c9c85[_0x218eb0(0x19a)]||undefined,'folderCount':_0x54405f[_0x218eb0(0x192)](_0x101e7d=>_0x101e7d[_0x218eb0(0x1c2)]===_0x218eb0(0x1b1))[_0x218eb0(0x17f)],'segmentCount':_0x54405f[_0x218eb0(0x192)](_0x2d5c87=>_0x2d5c87['type']===_0x218eb0(0x1d0))['length'],'createdAt':_0x1c9c85['createdAt'],'updatedAt':_0x1c9c85['updatedAt']}});}for(const _0x4fde62 of _0x196328){_0x5cf2cb[_0x218eb0(0x1b3)]({'type':_0x218eb0(0x1d0),'id':_0x4fde62['id'],'name':_0x4fde62['name'],'population':_0x4fde62['population'],'metadata':{'description':_0x4fde62[_0x218eb0(0x19a)],'createdAt':_0x4fde62[_0x218eb0(0x1eb)],'updatedAt':_0x4fde62['updatedAt']}});}return _0x5cf2cb;}}
package/dist/sdk/user.js CHANGED
@@ -1 +1 @@
1
- const a78_0x1513db=a78_0x4019;function a78_0x5a37(){const _0x5d7037=['findByEmail','client','8TdasAK','1394iWeWGS','map','default','91VZZeru','find','1950042FyxTce','getUserInfo','77UYQqLR','toLowerCase','682myKcLA','profile','email','buildIdToEmailMap','910245aGOupV','buildUserMaps','5556321QSjOaG','listUsers','3460560DmOpbZ','findById','16puTXZi','list','1413564ZFyEjl','38202hxJBMo','getCurrent'];a78_0x5a37=function(){return _0x5d7037;};return a78_0x5a37();}(function(_0x3374c6,_0x4c03e4){const _0x2f8474=a78_0x4019,_0x1f8aeb=_0x3374c6();while(!![]){try{const _0x2eb3c3=parseInt(_0x2f8474(0x126))/0x1*(-parseInt(_0x2f8474(0x12f))/0x2)+parseInt(_0x2f8474(0x12b))/0x3+parseInt(_0x2f8474(0x11e))/0x4*(parseInt(_0x2f8474(0x118))/0x5)+parseInt(_0x2f8474(0x121))/0x6*(parseInt(_0x2f8474(0x129))/0x7)+-parseInt(_0x2f8474(0x125))/0x8*(-parseInt(_0x2f8474(0x11a))/0x9)+-parseInt(_0x2f8474(0x11c))/0xa+-parseInt(_0x2f8474(0x12d))/0xb*(parseInt(_0x2f8474(0x120))/0xc);if(_0x2eb3c3===_0x4c03e4)break;else _0x1f8aeb['push'](_0x1f8aeb['shift']());}catch(_0x4d1cac){_0x1f8aeb['push'](_0x1f8aeb['shift']());}}}(a78_0x5a37,0x698e9));import{TDApiClient}from'../client/td-api-client.js';function a78_0x4019(_0x51f9df,_0x4de5b0){_0x51f9df=_0x51f9df-0x117;const _0x5a37f2=a78_0x5a37();let _0x40199a=_0x5a37f2[_0x51f9df];return _0x40199a;}import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';export class UserSDK{[a78_0x1513db(0x124)];[a78_0x1513db(0x130)];constructor(_0x8338bc){const _0xa24b73=a78_0x1513db;this['client']=new TDApiClient(_0x8338bc,_0x8338bc['logger']),this[_0xa24b73(0x130)]=_0x8338bc['profile']||_0xa24b73(0x128);}async[a78_0x1513db(0x122)](){const _0x5dd6be=a78_0x1513db;return await this[_0x5dd6be(0x124)][_0x5dd6be(0x12c)]();}async[a78_0x1513db(0x11f)](_0x4ea69f=![]){const _0x4f0945=a78_0x1513db;if(!_0x4ea69f){const _0x3aa626=loadCachedUsers(this[_0x4f0945(0x130)]);if(_0x3aa626)return _0x3aa626;}const _0x24863f=await this[_0x4f0945(0x124)][_0x4f0945(0x11b)]();return saveCachedUsers(this['profile'],_0x24863f),_0x24863f;}['clearCache'](){clearUserCache(this['profile']);}async[a78_0x1513db(0x123)](_0x1e1ba7){const _0x1655b4=a78_0x1513db,_0x22c5e7=await this[_0x1655b4(0x11f)]();return _0x22c5e7[_0x1655b4(0x12a)](_0x3a3988=>_0x3a3988[_0x1655b4(0x131)][_0x1655b4(0x12e)]()===_0x1e1ba7['toLowerCase']());}async[a78_0x1513db(0x11d)](_0x28e922){const _0x56c789=a78_0x1513db,_0x5c9d4a=await this[_0x56c789(0x11f)]();return _0x5c9d4a[_0x56c789(0x12a)](_0x30afa8=>_0x30afa8['id']===_0x28e922);}async['buildEmailToIdMap'](){const _0x5dc8e2=a78_0x1513db,_0x4b5d7a=await this['list']();return new Map(_0x4b5d7a[_0x5dc8e2(0x127)](_0x4e3916=>[_0x4e3916['email'][_0x5dc8e2(0x12e)](),_0x4e3916['id']]));}async[a78_0x1513db(0x117)](){const _0x3845bb=a78_0x1513db,_0x5d5a9c=await this[_0x3845bb(0x11f)]();return new Map(_0x5d5a9c[_0x3845bb(0x127)](_0x58698b=>[_0x58698b['id'],_0x58698b[_0x3845bb(0x131)]]));}async[a78_0x1513db(0x119)](){const _0x3561b0=a78_0x1513db,_0x45936b=await this[_0x3561b0(0x11f)]();return{'emailToId':new Map(_0x45936b['map'](_0x373509=>[_0x373509['email'][_0x3561b0(0x12e)](),_0x373509['id']])),'idToEmail':new Map(_0x45936b[_0x3561b0(0x127)](_0x19496c=>[_0x19496c['id'],_0x19496c[_0x3561b0(0x131)]]))};}}
1
+ const a78_0x30d475=a78_0x5746;function a78_0x5ea7(){const _0x561926=['getUserInfo','145uekReL','256767EsmnkO','122580dTzKPM','default','315mFHHnZ','listUsers','client','18822hFUAWJ','1iCzhHH','email','map','logger','list','buildEmailToIdMap','getCurrent','profile','find','527374MykTDP','findByEmail','buildIdToEmailMap','clearCache','toLowerCase','494544sytqhP','3508989IRcTof','2745673kDmLEl','16lKkTOb'];a78_0x5ea7=function(){return _0x561926;};return a78_0x5ea7();}(function(_0x3205b3,_0x44ca6f){const _0x1609b2=a78_0x5746,_0xa04a45=_0x3205b3();while(!![]){try{const _0xfbecee=-parseInt(_0x1609b2(0x15a))/0x1*(-parseInt(_0x1609b2(0x148))/0x2)+-parseInt(_0x1609b2(0x153))/0x3*(parseInt(_0x1609b2(0x150))/0x4)+-parseInt(_0x1609b2(0x152))/0x5*(-parseInt(_0x1609b2(0x159))/0x6)+parseInt(_0x1609b2(0x14f))/0x7+-parseInt(_0x1609b2(0x14d))/0x8+parseInt(_0x1609b2(0x156))/0x9*(-parseInt(_0x1609b2(0x154))/0xa)+parseInt(_0x1609b2(0x14e))/0xb;if(_0xfbecee===_0x44ca6f)break;else _0xa04a45['push'](_0xa04a45['shift']());}catch(_0x100e89){_0xa04a45['push'](_0xa04a45['shift']());}}}(a78_0x5ea7,0x38cf6));import{TDApiClient}from'../client/td-api-client.js';function a78_0x5746(_0x4424a8,_0x1cff0d){_0x4424a8=_0x4424a8-0x140;const _0x5ea7a7=a78_0x5ea7();let _0x57463e=_0x5ea7a7[_0x4424a8];return _0x57463e;}import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';export class UserSDK{[a78_0x30d475(0x158)];[a78_0x30d475(0x146)];constructor(_0x2ba746){const _0x40adfa=a78_0x30d475;this[_0x40adfa(0x158)]=new TDApiClient(_0x2ba746,_0x2ba746[_0x40adfa(0x142)]),this[_0x40adfa(0x146)]=_0x2ba746[_0x40adfa(0x146)]||_0x40adfa(0x155);}async[a78_0x30d475(0x145)](){const _0x3a953c=a78_0x30d475;return await this['client'][_0x3a953c(0x151)]();}async[a78_0x30d475(0x143)](_0x3dcd91=![]){const _0x2594fa=a78_0x30d475;if(!_0x3dcd91){const _0x49f8f5=loadCachedUsers(this[_0x2594fa(0x146)]);if(_0x49f8f5)return _0x49f8f5;}const _0x528feb=await this[_0x2594fa(0x158)][_0x2594fa(0x157)]();return saveCachedUsers(this['profile'],_0x528feb),_0x528feb;}[a78_0x30d475(0x14b)](){const _0x5ccfd3=a78_0x30d475;clearUserCache(this[_0x5ccfd3(0x146)]);}async[a78_0x30d475(0x149)](_0x485378){const _0x4c8bd8=a78_0x30d475,_0x3aa759=await this[_0x4c8bd8(0x143)]();return _0x3aa759['find'](_0x3fa9f6=>_0x3fa9f6[_0x4c8bd8(0x140)][_0x4c8bd8(0x14c)]()===_0x485378[_0x4c8bd8(0x14c)]());}async['findById'](_0x59e780){const _0x46d971=a78_0x30d475,_0x586541=await this[_0x46d971(0x143)]();return _0x586541[_0x46d971(0x147)](_0x4c74dd=>_0x4c74dd['id']===_0x59e780);}async[a78_0x30d475(0x144)](){const _0x37ea8e=a78_0x30d475,_0x4f5dea=await this[_0x37ea8e(0x143)]();return new Map(_0x4f5dea[_0x37ea8e(0x141)](_0xecdaa8=>[_0xecdaa8[_0x37ea8e(0x140)][_0x37ea8e(0x14c)](),_0xecdaa8['id']]));}async[a78_0x30d475(0x14a)](){const _0x368b6c=a78_0x30d475,_0x430980=await this[_0x368b6c(0x143)]();return new Map(_0x430980['map'](_0x258cb7=>[_0x258cb7['id'],_0x258cb7[_0x368b6c(0x140)]]));}async['buildUserMaps'](){const _0x46c429=a78_0x30d475,_0x3fe512=await this[_0x46c429(0x143)]();return{'emailToId':new Map(_0x3fe512[_0x46c429(0x141)](_0x1ecd00=>[_0x1ecd00[_0x46c429(0x140)][_0x46c429(0x14c)](),_0x1ecd00['id']])),'idToEmail':new Map(_0x3fe512[_0x46c429(0x141)](_0x53dcc4=>[_0x53dcc4['id'],_0x53dcc4[_0x46c429(0x140)]]))};}}
@@ -1 +1 @@
1
- function a79_0x3ce2(_0xaf5122,_0x1b54c0){_0xaf5122=_0xaf5122-0x168;const _0x2265fc=a79_0x2265();let _0x3ce22c=_0x2265fc[_0xaf5122];return _0x3ce22c;}const a79_0x3af88c=a79_0x3ce2;(function(_0x4cad68,_0x1e604c){const _0x232ef2=a79_0x3ce2,_0x3bf32e=_0x4cad68();while(!![]){try{const _0x5a2761=-parseInt(_0x232ef2(0x1ab))/0x1+-parseInt(_0x232ef2(0x192))/0x2+parseInt(_0x232ef2(0x195))/0x3*(-parseInt(_0x232ef2(0x183))/0x4)+parseInt(_0x232ef2(0x196))/0x5+parseInt(_0x232ef2(0x17a))/0x6*(parseInt(_0x232ef2(0x1be))/0x7)+parseInt(_0x232ef2(0x1bb))/0x8*(parseInt(_0x232ef2(0x186))/0x9)+parseInt(_0x232ef2(0x1ac))/0xa*(parseInt(_0x232ef2(0x1a3))/0xb);if(_0x5a2761===_0x1e604c)break;else _0x3bf32e['push'](_0x3bf32e['shift']());}catch(_0x887698){_0x3bf32e['push'](_0x3bf32e['shift']());}}}(a79_0x2265,0x7c491));import{WorkflowApiClient}from'../client/workflow-client.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowSDK{static ['NUMERIC_ID_PATTERN']=/^\d+$/;[a79_0x3af88c(0x1a8)];constructor(_0x2cfaff){const _0x5bd58e=a79_0x3af88c;this[_0x5bd58e(0x1a8)]=new WorkflowApiClient(_0x2cfaff,_0x2cfaff[_0x5bd58e(0x177)]);}async[a79_0x3af88c(0x176)](_0x58d8ad){const _0x34c5c7=a79_0x3af88c;if(WorkflowSDK[_0x34c5c7(0x198)]['test'](_0x58d8ad))return{'id':_0x58d8ad,'name':_0x58d8ad};const _0x5573a9=await this[_0x34c5c7(0x1a8)][_0x34c5c7(0x1da)]({'name_pattern':_0x58d8ad}),_0x1acf08=_0x5573a9[_0x34c5c7(0x1b4)][_0x34c5c7(0x1b5)](_0x242713=>_0x242713[_0x34c5c7(0x1ce)]===_0x58d8ad);if(!_0x1acf08)throw new Error('Project\x20not\x20found:\x20'+_0x58d8ad);return{'id':_0x1acf08['id'],'name':_0x1acf08[_0x34c5c7(0x1ce)]};}async['projects'](_0x85dc4a,_0x127e10){const _0x44e60d=a79_0x3af88c,_0x23d9ad=await this[_0x44e60d(0x1a8)][_0x44e60d(0x1da)]({'name_pattern':_0x85dc4a,..._0x127e10});return _0x23d9ad[_0x44e60d(0x1b4)][_0x44e60d(0x1c0)](_0xb98a01=>({..._0xb98a01,'project_id':_0xb98a01['id'],'project_name':_0xb98a01[_0x44e60d(0x1ce)]}));}async[a79_0x3af88c(0x179)](_0x341e2e,_0x196313){const _0x5e69fe=a79_0x3af88c,_0xae4c61=await this[_0x5e69fe(0x1a8)][_0x5e69fe(0x19a)]({'project_name':_0x341e2e,..._0x196313});return _0xae4c61[_0x5e69fe(0x1b4)][_0x5e69fe(0x1c0)](_0x2fa4da=>({'project_id':_0x2fa4da[_0x5e69fe(0x1d5)]?.['id'],'project_name':_0x2fa4da[_0x5e69fe(0x1d5)]?.['name'],'workflow_id':_0x2fa4da['id'],'workflow_name':_0x2fa4da['name'],'revision':_0x2fa4da['revision'],'timezone':_0x2fa4da[_0x5e69fe(0x1a2)],'config':_0x2fa4da[_0x5e69fe(0x169)],'id':_0x2fa4da['id'],'name':_0x2fa4da[_0x5e69fe(0x1ce)],'project':_0x2fa4da['project']}));}async[a79_0x3af88c(0x168)](_0x41748c){const _0x143739=a79_0x3af88c;let _0x1c4627;if(_0x41748c?.[_0x143739(0x1cc)]){let _0x538565,_0x43e315=![];while(!_0x43e315){const _0x7b4e99=await this[_0x143739(0x1a8)][_0x143739(0x1da)]({'limit':0x64,'last_id':_0x538565}),_0xab3678=_0x7b4e99[_0x143739(0x1b4)][_0x143739(0x1b5)](_0x1c9292=>_0x1c9292[_0x143739(0x1ce)]===_0x41748c[_0x143739(0x1cc)]);if(_0xab3678){_0x1c4627=_0xab3678['id'],_0x43e315=!![];break;}if(!_0x7b4e99[_0x143739(0x19f)]||_0x7b4e99['data']['length']===0x0)break;_0x538565=_0x7b4e99[_0x143739(0x19f)];}if(!_0x1c4627)throw new Error(_0x143739(0x1b1)+_0x41748c[_0x143739(0x1cc)]);}const _0x1ce4da=await this[_0x143739(0x1a8)][_0x143739(0x1dc)]({'project_id':_0x1c4627,'project_name':_0x41748c?.[_0x143739(0x1cc)],'workflow_name':_0x41748c?.[_0x143739(0x1b8)],'status':_0x41748c?.[_0x143739(0x1dd)],'from_time':_0x41748c?.[_0x143739(0x1af)],'to_time':_0x41748c?.[_0x143739(0x1b9)],'limit':_0x41748c?.[_0x143739(0x1c5)],'last_id':_0x41748c?.[_0x143739(0x1c7)]});return _0x1ce4da[_0x143739(0x1b4)][_0x143739(0x1c0)](_0x5e5afd=>({'project_id':_0x5e5afd[_0x143739(0x1d5)]?.['id'],'project_name':_0x5e5afd[_0x143739(0x1d5)]?.[_0x143739(0x1ce)],'workflow_id':_0x5e5afd[_0x143739(0x1ba)]?.['id'],'workflow_name':_0x5e5afd[_0x143739(0x1ba)]?.[_0x143739(0x1ce)],'session_id':_0x5e5afd['id'],'sessionUuid':_0x5e5afd[_0x143739(0x18e)],'sessionTime':_0x5e5afd[_0x143739(0x197)],'lastAttempt':_0x5e5afd[_0x143739(0x19e)],'id':_0x5e5afd['id'],'project':_0x5e5afd[_0x143739(0x1d5)],'workflow':_0x5e5afd[_0x143739(0x1ba)]}));}async[a79_0x3af88c(0x1c2)](_0x5cbec9){const _0x54245a=a79_0x3af88c,_0x29726f=await this[_0x54245a(0x1a8)]['listAttempts']({'project_name':_0x5cbec9?.[_0x54245a(0x1cc)],'workflow_name':_0x5cbec9?.[_0x54245a(0x1b8)],'include_retried':_0x5cbec9?.[_0x54245a(0x1ad)],'limit':_0x5cbec9?.['limit'],'last_id':_0x5cbec9?.[_0x54245a(0x1c7)]});return _0x29726f[_0x54245a(0x1b4)][_0x54245a(0x1c0)](_0x4a9361=>({'project_id':_0x4a9361[_0x54245a(0x1d5)]?.['id'],'project_name':_0x4a9361[_0x54245a(0x1d5)]?.[_0x54245a(0x1ce)],'workflow_id':_0x4a9361['workflow']?.['id'],'workflow_name':_0x4a9361[_0x54245a(0x1ba)]?.[_0x54245a(0x1ce)],'session_id':_0x4a9361[_0x54245a(0x18f)],'sessionUuid':_0x4a9361[_0x54245a(0x18e)],'sessionTime':_0x4a9361[_0x54245a(0x197)],'attempt_id':_0x4a9361['id'],'attempt_index':_0x4a9361[_0x54245a(0x1c4)],'retryAttemptName':_0x4a9361['retryAttemptName'],'done':_0x4a9361[_0x54245a(0x1a6)],'success':_0x4a9361[_0x54245a(0x1aa)],'cancelRequested':_0x4a9361['cancelRequested'],'params':_0x4a9361[_0x54245a(0x1d8)],'createdAt':_0x4a9361[_0x54245a(0x194)],'finishedAt':_0x4a9361['finishedAt'],'id':_0x4a9361['id'],'index':_0x4a9361[_0x54245a(0x1c4)],'project':_0x4a9361[_0x54245a(0x1d5)],'workflow':_0x4a9361[_0x54245a(0x1ba)]}));}async['attempt'](_0x43a8ad){const _0x579de5=a79_0x3af88c,_0x2a7369=await this[_0x579de5(0x1a8)][_0x579de5(0x1b7)](_0x43a8ad);return _0x2a7369;}async[a79_0x3af88c(0x1d6)](_0x370400,_0xb483b3=![]){const _0x39f4bd=a79_0x3af88c,_0x30e3b7=await this['client'][_0x39f4bd(0x1a5)](_0x370400,_0xb483b3);return _0x30e3b7[_0x39f4bd(0x1c0)](_0x1f632f=>({'task_id':_0x1f632f['id'],'task_name':_0x1f632f['fullName'],'parentId':_0x1f632f['parentId'],'config':_0x1f632f[_0x39f4bd(0x169)],'upstreams':_0x1f632f[_0x39f4bd(0x17c)],'state':_0x1f632f['state'],'exportParams':_0x1f632f[_0x39f4bd(0x16f)],'storeParams':_0x1f632f[_0x39f4bd(0x170)],'stateParams':_0x1f632f[_0x39f4bd(0x171)],'updatedAt':_0x1f632f[_0x39f4bd(0x1a1)],'retryAt':_0x1f632f[_0x39f4bd(0x188)],'startedAt':_0x1f632f[_0x39f4bd(0x18c)],'error':_0x1f632f[_0x39f4bd(0x1d3)],'isGroup':_0x1f632f[_0x39f4bd(0x1cd)],'id':_0x1f632f['id'],'fullName':_0x1f632f[_0x39f4bd(0x18a)]}));}async['logFiles'](_0x5c888e,_0x319f63){const _0x55dab5=a79_0x3af88c;return await this[_0x55dab5(0x1a8)][_0x55dab5(0x1bc)](_0x5c888e,_0x319f63);}async[a79_0x3af88c(0x190)](_0x389582,_0x48c4dd){const _0x12da94=a79_0x3af88c,_0x1b5114=await import(_0x12da94(0x1d1)),{promisify:_0xd3f7a8}=await import('util'),_0x5a6cfc=_0xd3f7a8(_0x1b5114[_0x12da94(0x1a7)]),_0x3c7981=await this[_0x12da94(0x1a8)][_0x12da94(0x1bc)](_0x389582,_0x48c4dd);if(_0x3c7981[_0x12da94(0x1a0)]===0x0)return'';const _0x6d82ea=[];for(const _0x57492f of _0x3c7981){if(!_0x57492f[_0x12da94(0x17f)])continue;const _0x387f80=await fetch(_0x57492f[_0x12da94(0x17f)]);if(!_0x387f80['ok'])throw new Error(_0x12da94(0x182)+_0x387f80['status']);const _0x56a5d3=Buffer[_0x12da94(0x191)](await _0x387f80[_0x12da94(0x1c6)]()),_0x5ae660=await _0x5a6cfc(_0x56a5d3);_0x6d82ea['push'](_0x5ae660[_0x12da94(0x16c)](_0x12da94(0x1ca)));}return _0x6d82ea[_0x12da94(0x16d)]('\x0a');}async[a79_0x3af88c(0x172)](_0x3c4888,_0x85aedd){const _0x2c51b7=a79_0x3af88c,_0x38587e=await this[_0x2c51b7(0x1a8)][_0x2c51b7(0x1d7)](_0x3c4888,_0x85aedd);return _0x38587e?.[_0x2c51b7(0x185)]??_0x2c51b7(0x18d);}async['retrySession'](_0x16d137,_0xead8){const _0x5576b8=a79_0x3af88c,_0x163451=await this['client']['retrySession'](_0x16d137,{'from_task':_0xead8?.[_0x5576b8(0x17d)],'retry_params':_0xead8?.[_0x5576b8(0x16e)]});return{'attemptId':_0x163451['id'],'sessionId':_0x163451['sessionId']};}async[a79_0x3af88c(0x1de)](_0x506e2e,_0x546fc4){const _0x30df43=a79_0x3af88c,_0x56fc23=await this[_0x30df43(0x1a8)][_0x30df43(0x1de)](_0x506e2e,{'resume_from':_0x546fc4?.[_0x30df43(0x18b)],'retry_params':_0x546fc4?.[_0x30df43(0x16e)],'force':_0x546fc4?.[_0x30df43(0x1df)]});return{'attemptId':_0x56fc23['id'],'sessionId':_0x56fc23[_0x30df43(0x18f)]};}async[a79_0x3af88c(0x174)](_0x3e3dac,_0x5df3f2={},_0x2fe216){const _0x40d17c=a79_0x3af88c,_0x102828=_0x3e3dac[_0x40d17c(0x189)]('.');let _0x5eb234,_0x13d7ee;if(_0x102828===-0x1)throw new Error(_0x40d17c(0x175));_0x5eb234=_0x3e3dac['substring'](0x0,_0x102828),_0x13d7ee=_0x3e3dac[_0x40d17c(0x187)](_0x102828+0x1);if(!_0x5eb234||!_0x13d7ee)throw new Error(_0x40d17c(0x1b6)+_0x3e3dac+_0x40d17c(0x1cb));const _0x5e93df=_0x2fe216?.[_0x40d17c(0x197)]||new Date()[_0x40d17c(0x180)]();return await this[_0x40d17c(0x1a8)]['startAttempt']({'projectName':_0x5eb234,'workflowName':_0x13d7ee,'sessionTime':_0x5e93df,'params':_0x5df3f2});}async[a79_0x3af88c(0x19c)](_0x4cc895,_0x2f384f,_0x2493e7){const _0x4acbe7=a79_0x3af88c,{promises:_0xccc0c9}=await import('fs'),_0x422176=await import('path'),_0xef97b9=await import('os'),_0x17efee=await import(_0x4acbe7(0x193)),{id:_0x4150a1,name:_0x362cb4}=await this[_0x4acbe7(0x176)](_0x4cc895),_0x3920d7=_0xef97b9[_0x4acbe7(0x1c9)](),_0x1bd0e8=_0x422176['join'](_0x3920d7,_0x4acbe7(0x17b)+_0x4150a1+'-'+Date[_0x4acbe7(0x1a9)]()+_0x4acbe7(0x1c8));try{await this[_0x4acbe7(0x1a8)][_0x4acbe7(0x184)](_0x4150a1,_0x1bd0e8,_0x2493e7?.['revision']);const _0x233c3e=_0x422176[_0x4acbe7(0x16d)](_0x2f384f,_0x362cb4);await _0xccc0c9[_0x4acbe7(0x1a4)](_0x233c3e,{'recursive':!![]}),await _0x17efee[_0x4acbe7(0x16a)]({'file':_0x1bd0e8,'cwd':_0x233c3e,'gzip':!![]});const _0x59a6b4=async _0x318551=>{const _0x17b77b=_0x4acbe7;let _0x2961fb=0x0;const _0x4bc346=await _0xccc0c9['readdir'](_0x318551,{'withFileTypes':!![]});for(const _0x2c7cb2 of _0x4bc346){const _0x3de983=_0x422176['join'](_0x318551,_0x2c7cb2['name']);if(_0x2c7cb2[_0x17b77b(0x1bf)]())_0x2961fb++;else _0x2c7cb2[_0x17b77b(0x19d)]()&&(_0x2961fb+=await _0x59a6b4(_0x3de983));}return _0x2961fb;},_0x50eb33=await _0x59a6b4(_0x233c3e);return{'projectName':_0x362cb4,'revision':_0x2493e7?.[_0x4acbe7(0x173)]||_0x4acbe7(0x19b),'filesExtracted':_0x50eb33};}finally{try{await _0xccc0c9[_0x4acbe7(0x1bd)](_0x1bd0e8);}catch{}}}async['push'](_0x5db709,_0x4d0027){const _0x40931e=a79_0x3af88c,{promises:_0x4a4171}=await import('fs'),_0x431d98=await import(_0x40931e(0x1b2)),_0x25f473=await import('tar'),_0x1757af=_0x4d0027?.[_0x40931e(0x1cc)]||_0x431d98[_0x40931e(0x1d0)](_0x5db709),_0x27f004=_0x4d0027?.[_0x40931e(0x173)]||new Date()[_0x40931e(0x180)]()[_0x40931e(0x1c3)](/[:.]/g,'-');try{await _0x4a4171[_0x40931e(0x1d4)](_0x5db709);}catch{throw new Error(_0x40931e(0x1b0)+_0x5db709);}if(!_0x4d0027?.[_0x40931e(0x1d9)]){const _0x3c6ca9=await _0x4a4171[_0x40931e(0x178)](_0x5db709),_0x2a8bd4=_0x3c6ca9['filter'](_0x8540d=>_0x8540d['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x2a8bd4[_0x40931e(0x1a0)]===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+_0x40931e(0x1c1));for(const _0x1ffba1 of _0x2a8bd4){const _0x1b5962=_0x431d98[_0x40931e(0x16d)](_0x5db709,_0x1ffba1);try{await _0x4a4171[_0x40931e(0x1d4)](_0x1b5962);}catch{throw new Error(_0x40931e(0x1db)+_0x1ffba1);}}}const _0x106ee5=async(_0x5bdd80,_0x3024ca='')=>{const _0x3608d8=_0x40931e,_0x45069c=await _0x4a4171['readdir'](_0x5bdd80,{'withFileTypes':!![]}),_0x300396=[];for(const _0x412a90 of _0x45069c){const _0x1c2612=_0x431d98[_0x3608d8(0x16d)](_0x3024ca,_0x412a90[_0x3608d8(0x1ce)]),_0x5c49e7=_0x431d98[_0x3608d8(0x16d)](_0x5bdd80,_0x412a90['name']);if(!shouldIncludeInArchive(_0x412a90[_0x3608d8(0x1ce)]))continue;_0x412a90[_0x3608d8(0x19d)]()?_0x300396[_0x3608d8(0x199)](...await _0x106ee5(_0x5c49e7,_0x1c2612)):_0x300396['push'](_0x1c2612);}return _0x300396;},_0x159f98=await _0x106ee5(_0x5db709),_0x1116b0=await import('os'),_0x117b40=_0x1116b0[_0x40931e(0x1c9)](),_0x541fb6=_0x431d98[_0x40931e(0x16d)](_0x117b40,_0x40931e(0x17e)+Date['now']()+_0x40931e(0x1c8));try{await _0x25f473[_0x40931e(0x1ae)]({'file':_0x541fb6,'gzip':!![],'cwd':_0x5db709,'portable':!![]},_0x159f98);const _0x337d46=await this['client'][_0x40931e(0x16b)](_0x1757af,_0x27f004,_0x541fb6,{'scheduleFrom':_0x4d0027?.[_0x40931e(0x181)],'clearSchedule':_0x4d0027?.['clearSchedule'],'clearScheduleAll':_0x4d0027?.[_0x40931e(0x1cf)]});return{'projectId':_0x337d46['id'],'projectName':_0x337d46[_0x40931e(0x1ce)],'revision':_0x337d46[_0x40931e(0x173)]};}finally{try{await _0x4a4171[_0x40931e(0x1bd)](_0x541fb6);}catch{}}}async[a79_0x3af88c(0x1d2)](_0x415333){const _0x34ecf1=a79_0x3af88c,{id:_0x291e34}=await this[_0x34ecf1(0x176)](_0x415333),_0x3ababc=await this[_0x34ecf1(0x1a8)][_0x34ecf1(0x1b3)](_0x291e34);return{'projectId':_0x3ababc['id'],'projectName':_0x3ababc[_0x34ecf1(0x1ce)]};}}function a79_0x2265(){const _0x292561=['projectName','isGroup','name','clearScheduleAll','basename','zlib','delete','error','access','project','tasks','killAttempt','params','skipValidation','listProjects','Cannot\x20read\x20workflow\x20file:\x20','listSessions','status','retryAttempt','force','sessions','config','extract','uploadProjectArchive','toString','join','retryParams','exportParams','storeParams','stateParams','kill','revision','run','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','resolveProjectId','logger','readdir','workflows','6tXNMin','tdx-workflow-','upstreams','fromTask','tdx-workflow-push-','direct','toISOString','scheduleFrom','Failed\x20to\x20download\x20log\x20file:\x20','3116608SLTmJS','downloadProjectArchive','message','5274OGvKnv','substring','retryAt','indexOf','fullName','resumeFrom','startedAt','Kill\x20request\x20accepted','sessionUuid','sessionId','logs','from','1122266WqmXhZ','tar','createdAt','3sjtAwI','38045zwwnnr','sessionTime','NUMERIC_ID_PATTERN','push','listWorkflows','latest','download','isDirectory','lastAttempt','lastId','length','updatedAt','timezone','7165917pBFkiL','mkdir','getAttemptTasks','done','gunzip','client','now','success','773555FDxvLz','30RJjWoV','includeRetried','create','fromTime','Project\x20directory\x20not\x20found:\x20','Project\x20not\x20found:\x20','path','deleteProject','data','find','Invalid\x20workflow\x20format:\x20','getAttempt','workflowName','toTime','workflow','2224jAUuFw','listLogFiles','unlink','3486385mkuJJD','isFile','map','\x20workflow\x20files\x20found\x20in\x20project\x20directory','attempts','replace','index','limit','arrayBuffer','last_id','.tar.gz','tmpdir','utf-8','.\x20Expected\x20\x22project.workflow\x22'];a79_0x2265=function(){return _0x292561;};return a79_0x2265();}
1
+ function a79_0xd39b(_0x1378f6,_0x5af7cf){_0x1378f6=_0x1378f6-0xb7;const _0x378d08=a79_0x378d();let _0xd39bdf=_0x378d08[_0x1378f6];return _0xd39bdf;}const a79_0x5cf841=a79_0xd39b;(function(_0x36da3c,_0x4b3279){const _0x2c5c3d=a79_0xd39b,_0xf4d789=_0x36da3c();while(!![]){try{const _0x5b733f=parseInt(_0x2c5c3d(0xd1))/0x1*(parseInt(_0x2c5c3d(0xeb))/0x2)+parseInt(_0x2c5c3d(0x10b))/0x3*(parseInt(_0x2c5c3d(0x11d))/0x4)+-parseInt(_0x2c5c3d(0xc1))/0x5*(parseInt(_0x2c5c3d(0x110))/0x6)+parseInt(_0x2c5c3d(0xca))/0x7*(-parseInt(_0x2c5c3d(0xf9))/0x8)+parseInt(_0x2c5c3d(0x11b))/0x9+parseInt(_0x2c5c3d(0xbc))/0xa+-parseInt(_0x2c5c3d(0x10c))/0xb;if(_0x5b733f===_0x4b3279)break;else _0xf4d789['push'](_0xf4d789['shift']());}catch(_0x54468f){_0xf4d789['push'](_0xf4d789['shift']());}}}(a79_0x378d,0x19574));import{WorkflowApiClient}from'../client/workflow-client.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowSDK{static [a79_0x5cf841(0xfd)]=/^\d+$/;[a79_0x5cf841(0xbf)];constructor(_0x28b58d){const _0x494689=a79_0x5cf841;this[_0x494689(0xbf)]=new WorkflowApiClient(_0x28b58d,_0x28b58d['logger']);}async[a79_0x5cf841(0xd6)](_0x34d339){const _0x3edfd5=a79_0x5cf841;if(WorkflowSDK[_0x3edfd5(0xfd)][_0x3edfd5(0xe8)](_0x34d339))return{'id':_0x34d339,'name':_0x34d339};const _0x4add28=await this['client'][_0x3edfd5(0xc9)]({'name_pattern':_0x34d339}),_0x27a124=_0x4add28[_0x3edfd5(0xe2)][_0x3edfd5(0xd5)](_0x5efbf6=>_0x5efbf6['name']===_0x34d339);if(!_0x27a124)throw new Error(_0x3edfd5(0x109)+_0x34d339);return{'id':_0x27a124['id'],'name':_0x27a124[_0x3edfd5(0xef)]};}async[a79_0x5cf841(0x124)](_0x3a47fb,_0x2a1a27){const _0x39792d=a79_0x5cf841,_0x3bcd9c=await this[_0x39792d(0xbf)][_0x39792d(0xc9)]({'name_pattern':_0x3a47fb,..._0x2a1a27});return _0x3bcd9c[_0x39792d(0xe2)][_0x39792d(0xcc)](_0x3e5632=>({..._0x3e5632,'project_id':_0x3e5632['id'],'project_name':_0x3e5632[_0x39792d(0xef)]}));}async['workflows'](_0x27a4fe,_0x58d8b0){const _0x5cd109=a79_0x5cf841,_0x4b8673=await this[_0x5cd109(0xbf)][_0x5cd109(0xd0)]({'project_name':_0x27a4fe,..._0x58d8b0});return _0x4b8673[_0x5cd109(0xe2)][_0x5cd109(0xcc)](_0x261af8=>({'project_id':_0x261af8[_0x5cd109(0x101)]?.['id'],'project_name':_0x261af8[_0x5cd109(0x101)]?.[_0x5cd109(0xef)],'workflow_id':_0x261af8['id'],'workflow_name':_0x261af8[_0x5cd109(0xef)],'revision':_0x261af8[_0x5cd109(0xed)],'timezone':_0x261af8['timezone'],'config':_0x261af8['config'],'id':_0x261af8['id'],'name':_0x261af8[_0x5cd109(0xef)],'project':_0x261af8[_0x5cd109(0x101)]}));}async[a79_0x5cf841(0x118)](_0x4259fc){const _0x1ce6de=a79_0x5cf841;let _0x5e3639;if(_0x4259fc?.['projectName']){let _0x626b86,_0x2797ef=![];while(!_0x2797ef){const _0x594067=await this[_0x1ce6de(0xbf)][_0x1ce6de(0xc9)]({'limit':0x64,'last_id':_0x626b86}),_0x21ab2d=_0x594067[_0x1ce6de(0xe2)]['find'](_0x1be81e=>_0x1be81e[_0x1ce6de(0xef)]===_0x4259fc[_0x1ce6de(0xc5)]);if(_0x21ab2d){_0x5e3639=_0x21ab2d['id'],_0x2797ef=!![];break;}if(!_0x594067[_0x1ce6de(0xfe)]||_0x594067[_0x1ce6de(0xe2)][_0x1ce6de(0x117)]===0x0)break;_0x626b86=_0x594067[_0x1ce6de(0xfe)];}if(!_0x5e3639)throw new Error('Project\x20not\x20found:\x20'+_0x4259fc['projectName']);}const _0x5ac3f3=await this[_0x1ce6de(0xbf)][_0x1ce6de(0xc3)]({'project_id':_0x5e3639,'project_name':_0x4259fc?.[_0x1ce6de(0xc5)],'workflow_name':_0x4259fc?.[_0x1ce6de(0x108)],'status':_0x4259fc?.[_0x1ce6de(0x126)],'from_time':_0x4259fc?.['fromTime'],'to_time':_0x4259fc?.[_0x1ce6de(0x10e)],'limit':_0x4259fc?.[_0x1ce6de(0xc2)],'last_id':_0x4259fc?.['last_id']});return _0x5ac3f3[_0x1ce6de(0xe2)][_0x1ce6de(0xcc)](_0x1a234e=>({'project_id':_0x1a234e['project']?.['id'],'project_name':_0x1a234e[_0x1ce6de(0x101)]?.['name'],'workflow_id':_0x1a234e[_0x1ce6de(0x11f)]?.['id'],'workflow_name':_0x1a234e[_0x1ce6de(0x11f)]?.[_0x1ce6de(0xef)],'session_id':_0x1a234e['id'],'sessionUuid':_0x1a234e['sessionUuid'],'sessionTime':_0x1a234e['sessionTime'],'lastAttempt':_0x1a234e[_0x1ce6de(0xf7)],'id':_0x1a234e['id'],'project':_0x1a234e[_0x1ce6de(0x101)],'workflow':_0x1a234e['workflow']}));}async['attempts'](_0x58b95c){const _0x228a4e=a79_0x5cf841,_0x3f38c9=await this[_0x228a4e(0xbf)]['listAttempts']({'project_name':_0x58b95c?.[_0x228a4e(0xc5)],'workflow_name':_0x58b95c?.[_0x228a4e(0x108)],'include_retried':_0x58b95c?.[_0x228a4e(0x119)],'limit':_0x58b95c?.[_0x228a4e(0xc2)],'last_id':_0x58b95c?.[_0x228a4e(0xce)]});return _0x3f38c9['data']['map'](_0x2be07b=>({'project_id':_0x2be07b[_0x228a4e(0x101)]?.['id'],'project_name':_0x2be07b[_0x228a4e(0x101)]?.[_0x228a4e(0xef)],'workflow_id':_0x2be07b[_0x228a4e(0x11f)]?.['id'],'workflow_name':_0x2be07b[_0x228a4e(0x11f)]?.[_0x228a4e(0xef)],'session_id':_0x2be07b[_0x228a4e(0xea)],'sessionUuid':_0x2be07b['sessionUuid'],'sessionTime':_0x2be07b[_0x228a4e(0xf2)],'attempt_id':_0x2be07b['id'],'attempt_index':_0x2be07b['index'],'retryAttemptName':_0x2be07b[_0x228a4e(0xcf)],'done':_0x2be07b[_0x228a4e(0xde)],'success':_0x2be07b[_0x228a4e(0x113)],'cancelRequested':_0x2be07b[_0x228a4e(0xdd)],'params':_0x2be07b[_0x228a4e(0x105)],'createdAt':_0x2be07b[_0x228a4e(0xc0)],'finishedAt':_0x2be07b[_0x228a4e(0xe4)],'id':_0x2be07b['id'],'index':_0x2be07b['index'],'project':_0x2be07b[_0x228a4e(0x101)],'workflow':_0x2be07b['workflow']}));}async['attempt'](_0x1f5170){const _0x2def3f=a79_0x5cf841,_0x5afa3f=await this[_0x2def3f(0xbf)][_0x2def3f(0xf1)](_0x1f5170);return _0x5afa3f;}async[a79_0x5cf841(0xc7)](_0x4c1f55,_0x25c1ab=![]){const _0x2f9e1e=a79_0x5cf841,_0x56631d=await this[_0x2f9e1e(0xbf)][_0x2f9e1e(0xf0)](_0x4c1f55,_0x25c1ab);return _0x56631d[_0x2f9e1e(0xcc)](_0x36ab54=>({'task_id':_0x36ab54['id'],'task_name':_0x36ab54[_0x2f9e1e(0xfb)],'parentId':_0x36ab54[_0x2f9e1e(0x102)],'config':_0x36ab54['config'],'upstreams':_0x36ab54['upstreams'],'state':_0x36ab54[_0x2f9e1e(0xe9)],'exportParams':_0x36ab54[_0x2f9e1e(0xc4)],'storeParams':_0x36ab54[_0x2f9e1e(0xdb)],'stateParams':_0x36ab54[_0x2f9e1e(0xbe)],'updatedAt':_0x36ab54[_0x2f9e1e(0xd7)],'retryAt':_0x36ab54[_0x2f9e1e(0x128)],'startedAt':_0x36ab54[_0x2f9e1e(0xba)],'error':_0x36ab54[_0x2f9e1e(0xf4)],'isGroup':_0x36ab54[_0x2f9e1e(0xfc)],'id':_0x36ab54['id'],'fullName':_0x36ab54['fullName']}));}async[a79_0x5cf841(0xe1)](_0x3eb570,_0x27395f){const _0x594f2c=a79_0x5cf841;return await this[_0x594f2c(0xbf)][_0x594f2c(0xe0)](_0x3eb570,_0x27395f);}async['logs'](_0x4b1a27,_0x1113b0){const _0x5c5d07=a79_0x5cf841,_0x1051d3=await import(_0x5c5d07(0x123)),{promisify:_0x3511df}=await import('util'),_0x50a162=_0x3511df(_0x1051d3[_0x5c5d07(0x11a)]),_0x778d87=await this['client'][_0x5c5d07(0xe0)](_0x4b1a27,_0x1113b0);if(_0x778d87[_0x5c5d07(0x117)]===0x0)return'';const _0x3dd4a6=[];for(const _0x1cc320 of _0x778d87){if(!_0x1cc320[_0x5c5d07(0xf8)])continue;const _0x5272a0=await fetch(_0x1cc320[_0x5c5d07(0xf8)]);if(!_0x5272a0['ok'])throw new Error('Failed\x20to\x20download\x20log\x20file:\x20'+_0x5272a0['status']);const _0x20a121=Buffer[_0x5c5d07(0xbb)](await _0x5272a0[_0x5c5d07(0xf3)]()),_0x4eb127=await _0x50a162(_0x20a121);_0x3dd4a6[_0x5c5d07(0xc8)](_0x4eb127[_0x5c5d07(0xe3)](_0x5c5d07(0xcd)));}return _0x3dd4a6[_0x5c5d07(0x129)]('\x0a');}async['kill'](_0x5daf56,_0x212e66){const _0x52b6dc=a79_0x5cf841,_0x46bf5b=await this[_0x52b6dc(0xbf)][_0x52b6dc(0x115)](_0x5daf56,_0x212e66);return _0x46bf5b?.[_0x52b6dc(0xe7)]??_0x52b6dc(0xfa);}async[a79_0x5cf841(0xe6)](_0x5be603,_0x5a703e){const _0xbcde16=a79_0x5cf841,_0x3e3dea=await this['client'][_0xbcde16(0xe6)](_0x5be603,{'from_task':_0x5a703e?.[_0xbcde16(0xd2)],'retry_params':_0x5a703e?.[_0xbcde16(0xb8)]});return{'attemptId':_0x3e3dea['id'],'sessionId':_0x3e3dea[_0xbcde16(0xea)]};}async[a79_0x5cf841(0xf5)](_0x59f912,_0x3837f8){const _0x4d3f33=a79_0x5cf841,_0x2648ab=await this[_0x4d3f33(0xbf)][_0x4d3f33(0xf5)](_0x59f912,{'resume_from':_0x3837f8?.[_0x4d3f33(0x121)],'retry_params':_0x3837f8?.['retryParams'],'force':_0x3837f8?.['force']});return{'attemptId':_0x2648ab['id'],'sessionId':_0x2648ab['sessionId']};}async[a79_0x5cf841(0xb9)](_0x5419d1,_0x1cfd60={},_0x3c2649){const _0x16a82c=a79_0x5cf841,_0x52aa23=_0x5419d1[_0x16a82c(0x122)]('.');let _0xafd7,_0x35e7a1;if(_0x52aa23===-0x1)throw new Error(_0x16a82c(0xd4));_0xafd7=_0x5419d1[_0x16a82c(0xff)](0x0,_0x52aa23),_0x35e7a1=_0x5419d1[_0x16a82c(0xff)](_0x52aa23+0x1);if(!_0xafd7||!_0x35e7a1)throw new Error(_0x16a82c(0xc6)+_0x5419d1+_0x16a82c(0xec));const _0x10b758=_0x3c2649?.['sessionTime']||new Date()['toISOString']();return await this[_0x16a82c(0xbf)]['startAttempt']({'projectName':_0xafd7,'workflowName':_0x35e7a1,'sessionTime':_0x10b758,'params':_0x1cfd60});}async[a79_0x5cf841(0x107)](_0x2a97af,_0x20f3eb,_0x534b4b){const _0x235dc4=a79_0x5cf841,{promises:_0x40c281}=await import('fs'),_0x3e4766=await import('path'),_0x2066f8=await import('os'),_0x39bb5a=await import(_0x235dc4(0xf6)),{id:_0x10769e,name:_0x584e91}=await this[_0x235dc4(0xd6)](_0x2a97af),_0x3bab7a=_0x2066f8['tmpdir'](),_0x582031=_0x3e4766['join'](_0x3bab7a,_0x235dc4(0x114)+_0x10769e+'-'+Date[_0x235dc4(0xee)]()+_0x235dc4(0x106));try{await this[_0x235dc4(0xbf)][_0x235dc4(0xd9)](_0x10769e,_0x582031,_0x534b4b?.[_0x235dc4(0xed)]);const _0x5aa680=_0x3e4766[_0x235dc4(0x129)](_0x20f3eb,_0x584e91);await _0x40c281[_0x235dc4(0x11c)](_0x5aa680,{'recursive':!![]}),await _0x39bb5a[_0x235dc4(0x100)]({'file':_0x582031,'cwd':_0x5aa680,'gzip':!![]});const _0x1c3de6=async _0x51b62d=>{const _0x1f7d3f=_0x235dc4;let _0x62a4e1=0x0;const _0x44d799=await _0x40c281[_0x1f7d3f(0x111)](_0x51b62d,{'withFileTypes':!![]});for(const _0xa22a7d of _0x44d799){const _0x2e1787=_0x3e4766['join'](_0x51b62d,_0xa22a7d['name']);if(_0xa22a7d[_0x1f7d3f(0xdf)]())_0x62a4e1++;else _0xa22a7d[_0x1f7d3f(0x120)]()&&(_0x62a4e1+=await _0x1c3de6(_0x2e1787));}return _0x62a4e1;},_0x41f2fe=await _0x1c3de6(_0x5aa680);return{'projectName':_0x584e91,'revision':_0x534b4b?.['revision']||_0x235dc4(0xe5),'filesExtracted':_0x41f2fe};}finally{try{await _0x40c281['unlink'](_0x582031);}catch{}}}async[a79_0x5cf841(0xc8)](_0x257ea9,_0x230a34){const _0x70d819=a79_0x5cf841,{promises:_0x51b5a6}=await import('fs'),_0x497713=await import(_0x70d819(0x103)),_0x2f74ed=await import(_0x70d819(0xf6)),_0x2694fe=_0x230a34?.['projectName']||_0x497713[_0x70d819(0xb7)](_0x257ea9),_0x47cf08=_0x230a34?.[_0x70d819(0xed)]||new Date()[_0x70d819(0x125)]()['replace'](/[:.]/g,'-');try{await _0x51b5a6[_0x70d819(0xbd)](_0x257ea9);}catch{throw new Error(_0x70d819(0x104)+_0x257ea9);}if(!_0x230a34?.['skipValidation']){const _0x35cfd4=await _0x51b5a6['readdir'](_0x257ea9),_0x1afed1=_0x35cfd4[_0x70d819(0xcb)](_0x3b46a6=>_0x3b46a6[_0x70d819(0xda)](WORKFLOW_FILE_EXTENSION));if(_0x1afed1[_0x70d819(0x117)]===0x0)throw new Error(_0x70d819(0x10d)+WORKFLOW_FILE_EXTENSION+_0x70d819(0xdc));for(const _0x261922 of _0x1afed1){const _0x49f450=_0x497713[_0x70d819(0x129)](_0x257ea9,_0x261922);try{await _0x51b5a6[_0x70d819(0xbd)](_0x49f450);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0x261922);}}}const _0x5b529d=async(_0x125ad5,_0x332613='')=>{const _0x281c8d=_0x70d819,_0xf847eb=await _0x51b5a6[_0x281c8d(0x111)](_0x125ad5,{'withFileTypes':!![]}),_0xe4e1d0=[];for(const _0x353b02 of _0xf847eb){const _0x5dfdc0=_0x497713[_0x281c8d(0x129)](_0x332613,_0x353b02[_0x281c8d(0xef)]),_0x1bce8a=_0x497713[_0x281c8d(0x129)](_0x125ad5,_0x353b02['name']);if(!shouldIncludeInArchive(_0x353b02[_0x281c8d(0xef)]))continue;_0x353b02[_0x281c8d(0x120)]()?_0xe4e1d0['push'](...await _0x5b529d(_0x1bce8a,_0x5dfdc0)):_0xe4e1d0[_0x281c8d(0xc8)](_0x5dfdc0);}return _0xe4e1d0;},_0x3888ce=await _0x5b529d(_0x257ea9),_0x4cad83=await import('os'),_0x3e4461=_0x4cad83['tmpdir'](),_0x23bcb1=_0x497713[_0x70d819(0x129)](_0x3e4461,_0x70d819(0x11e)+Date[_0x70d819(0xee)]()+_0x70d819(0x106));try{await _0x2f74ed[_0x70d819(0x10f)]({'file':_0x23bcb1,'gzip':!![],'cwd':_0x257ea9,'portable':!![]},_0x3888ce);const _0x5c7506=await this[_0x70d819(0xbf)][_0x70d819(0x116)](_0x2694fe,_0x47cf08,_0x23bcb1,{'scheduleFrom':_0x230a34?.[_0x70d819(0x112)],'clearSchedule':_0x230a34?.[_0x70d819(0xd8)],'clearScheduleAll':_0x230a34?.[_0x70d819(0x127)]});return{'projectId':_0x5c7506['id'],'projectName':_0x5c7506['name'],'revision':_0x5c7506[_0x70d819(0xed)]};}finally{try{await _0x51b5a6[_0x70d819(0xd3)](_0x23bcb1);}catch{}}}async['delete'](_0xdb2152){const _0x24cae7=a79_0x5cf841,{id:_0x7f20dc}=await this[_0x24cae7(0xd6)](_0xdb2152),_0x49f273=await this['client'][_0x24cae7(0x10a)](_0x7f20dc);return{'projectId':_0x49f273['id'],'projectName':_0x49f273[_0x24cae7(0xef)]};}}function a79_0x378d(){const _0x94d80=['resumeFrom','indexOf','zlib','projects','toISOString','status','clearScheduleAll','retryAt','join','basename','retryParams','run','startedAt','from','1855900AcFGkS','access','stateParams','client','createdAt','794590LGwJQK','limit','listSessions','exportParams','projectName','Invalid\x20workflow\x20format:\x20','tasks','push','listProjects','7kHyQBy','filter','map','utf-8','last_id','retryAttemptName','listWorkflows','13197tzuVRK','fromTask','unlink','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','find','resolveProjectId','updatedAt','clearSchedule','downloadProjectArchive','endsWith','storeParams','\x20workflow\x20files\x20found\x20in\x20project\x20directory','cancelRequested','done','isFile','listLogFiles','logFiles','data','toString','finishedAt','latest','retrySession','message','test','state','sessionId','30CPbyHT','.\x20Expected\x20\x22project.workflow\x22','revision','now','name','getAttemptTasks','getAttempt','sessionTime','arrayBuffer','error','retryAttempt','tar','lastAttempt','direct','1656872rfxcRe','Kill\x20request\x20accepted','fullName','isGroup','NUMERIC_ID_PATTERN','lastId','substring','extract','project','parentId','path','Project\x20directory\x20not\x20found:\x20','params','.tar.gz','download','workflowName','Project\x20not\x20found:\x20','deleteProject','279492YdsAso','3137673ckHbiI','No\x20','toTime','create','6ejBzlJ','readdir','scheduleFrom','success','tdx-workflow-','killAttempt','uploadProjectArchive','length','sessions','includeRetried','gunzip','1666737OoHEGI','mkdir','8djsSje','tdx-workflow-push-','workflow','isDirectory'];a79_0x378d=function(){return _0x94d80;};return a79_0x378d();}
@@ -1 +1 @@
1
- const a85_0x178ce1=a85_0x2578;function a85_0x3610(){const _0x3d8448=['/ag/','https://console-development.eu01.treasuredata.com','.treasuredata.com','\x27\x20and\x20site\x20\x27','https://engage-api-staging.treasuredata.co.jp','https://api-development-workflow.us01.treasuredata.com','https://api-cdp.ap03.treasuredata.com','https://api-staging-presto.treasuredata.co.jp','https://llm-api-staging.ap03.treasuredata.com','https://api.ap02.treasuredata.com','1281318cLCkfl','1302918FJriHj','356992qlyJbr','https://api.eu01.treasuredata.com','https://console-staging-next.treasuredata.co.jp','https://api-development.eu01.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://api-presto.treasuredata.co.jp','https://console-next.eu01.treasuredata.com','https://console-staging.treasuredata.co.jp','8816jwitML','2274055fttNyc','https://api-presto.eu01.treasuredata.com','https://api-development-cdp.us01.treasuredata.com','/ag','https://console-next.us01.treasuredata.com','https://api-workflow.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','https://api-development-presto.treasuredata.com','12YeEmds','https://api-workflow.eu01.treasuredata.com','https://console-next.','https://llm-api.ap02.treasuredata.com','https://console-development-next.us01.treasuredata.com','https://console-next.ap03.treasuredata.com','https://llm-api.treasuredata.co.jp','https://api-staging.treasuredata.co.jp','145089Fdowef','https://api-staging-presto.ap03.treasuredata.com','https://api-presto.ap02.treasuredata.com','https://api-cdp.eu01.treasuredata.com','https://llm-api.eu01.treasuredata.com','https://api-staging-presto.treasuredata.com','/app/af/','https://engage-api-staging.us01.treasuredata.com','https://console.ap02.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-cdp.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','https://console-staging-next.us01.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://api-presto.ap03.treasuredata.com','https://console-staging-next.ap03.treasuredata.com','https://api-staging.ap03.treasuredata.com','https://engage-api-development.us01.treasuredata.com','https://api-presto.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','https://engage-api.eu01.treasuredata.com','2988732uqkbzu','https://api-workflow.treasuredata.co.jp','https://api-development-cdp.eu01.treasuredata.com','https://console.treasuredata.com','https://console.treasuredata.co.jp','710ZdtURy','https://engage-api.ap03.treasuredata.com','https://api.treasuredata.com','https://api-development-workflow.eu01.treasuredata.com','https://api-cdp.treasuredata.co.jp','https://console.ap03.treasuredata.com','https://console.','https://console-staging.ap03.treasuredata.com','https://api-staging-cdp.ap03.treasuredata.com','https://api.ap03.treasuredata.com','https://llm-api-development.us01.treasuredata.com','https://console-staging.us01.treasuredata.com','14DSZgwS','https://llm-api-development.eu01.treasuredata.com'];a85_0x3610=function(){return _0x3d8448;};return a85_0x3610();}(function(_0x4d7bcd,_0xd24923){const _0x4b41dd=a85_0x2578,_0x31d300=_0x4d7bcd();while(!![]){try{const _0x2b9b35=-parseInt(_0x4b41dd(0xa3))/0x1+-parseInt(_0x4b41dd(0xa1))/0x2+-parseInt(_0x4b41dd(0xd1))/0x3+parseInt(_0x4b41dd(0xb4))/0x4*(parseInt(_0x4b41dd(0xac))/0x5)+parseInt(_0x4b41dd(0xa2))/0x6*(parseInt(_0x4b41dd(0x95))/0x7)+-parseInt(_0x4b41dd(0xab))/0x8+parseInt(_0x4b41dd(0xbc))/0x9*(parseInt(_0x4b41dd(0x89))/0xa);if(_0x2b9b35===_0xd24923)break;else _0x31d300['push'](_0x31d300['shift']());}catch(_0x933be7){_0x31d300['push'](_0x31d300['shift']());}}}(a85_0x3610,0xe786d));export const TD_ENDPOINTS={'us01':a85_0x178ce1(0x8b),'jp01':'https://api.treasuredata.co.jp','eu01':a85_0x178ce1(0xa4),'ap02':a85_0x178ce1(0xa0),'ap03':a85_0x178ce1(0x92),'dev-us01':'https://api-development.treasuredata.com','dev-eu01':a85_0x178ce1(0xa6),'stg-us01':'https://api-staging.us01.treasuredata.com','stg-jp01':a85_0x178ce1(0xbb),'stg-ap03':a85_0x178ce1(0xcc)};export const CDP_ENDPOINTS={'us01':a85_0x178ce1(0xc6),'jp01':a85_0x178ce1(0x8d),'eu01':a85_0x178ce1(0xbf),'ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a85_0x178ce1(0x9d),'dev-us01':a85_0x178ce1(0xae),'dev-eu01':a85_0x178ce1(0xd3),'stg-us01':a85_0x178ce1(0xc7),'stg-jp01':a85_0x178ce1(0xb2),'stg-ap03':a85_0x178ce1(0x91)};export const WORKFLOW_ENDPOINTS={'us01':a85_0x178ce1(0xb1),'jp01':a85_0x178ce1(0xd2),'eu01':a85_0x178ce1(0xb5),'ap02':'https://api-workflow.ap02.treasuredata.com','ap03':'https://api-workflow.ap03.treasuredata.com','dev-us01':a85_0x178ce1(0x9c),'dev-eu01':a85_0x178ce1(0x8c),'stg-us01':'https://api-staging-workflow.us01.treasuredata.com','stg-jp01':'https://api-staging-workflow.treasuredata.co.jp','stg-ap03':a85_0x178ce1(0xcf)};export const TRINO_ENDPOINTS={'us01':a85_0x178ce1(0xce),'jp01':a85_0x178ce1(0xa8),'eu01':a85_0x178ce1(0xad),'ap02':a85_0x178ce1(0xbe),'ap03':a85_0x178ce1(0xca),'dev-us01':a85_0x178ce1(0xb3),'dev-eu01':'https://api-development-presto.eu01.treasuredata.com','stg-us01':a85_0x178ce1(0xc1),'stg-jp01':a85_0x178ce1(0x9e),'stg-ap03':a85_0x178ce1(0xbd)};export const LLM_ENDPOINTS={'us01':'https://llm-api.treasuredata.com','jp01':a85_0x178ce1(0xba),'eu01':a85_0x178ce1(0xc0),'ap02':a85_0x178ce1(0xb7),'ap03':a85_0x178ce1(0xc5),'dev-us01':a85_0x178ce1(0x93),'dev-eu01':a85_0x178ce1(0x96),'stg-us01':a85_0x178ce1(0xa7),'stg-jp01':'https://llm-api-staging.treasuredata.co.jp','stg-ap03':a85_0x178ce1(0x9f)};export const ENGAGE_ENDPOINTS={'us01':'https://engage-api.treasuredata.com','jp01':'https://engage-api.treasuredata.co.jp','eu01':a85_0x178ce1(0xd0),'ap02':'https://engage-api.ap02.treasuredata.com','ap03':a85_0x178ce1(0x8a),'dev-us01':a85_0x178ce1(0xcd),'dev-eu01':'https://engage-api-development.eu01.treasuredata.com','stg-us01':a85_0x178ce1(0xc3),'stg-jp01':a85_0x178ce1(0x9b),'stg-ap03':'https://engage-api-staging.ap03.treasuredata.com'};export const CONSOLE_ENDPOINTS={'us01':a85_0x178ce1(0xd4),'jp01':a85_0x178ce1(0x88),'eu01':'https://console.eu01.treasuredata.com','ap02':a85_0x178ce1(0xc4),'ap03':a85_0x178ce1(0x8e),'dev-us01':'https://console-development.treasuredata.com','dev-eu01':a85_0x178ce1(0x98),'stg-us01':a85_0x178ce1(0x94),'stg-jp01':a85_0x178ce1(0xaa),'stg-ap03':a85_0x178ce1(0x90)};export const CONSOLE_NEXT_ENDPOINTS={'us01':a85_0x178ce1(0xb0),'jp01':'https://console-next.treasuredata.co.jp','eu01':a85_0x178ce1(0xa9),'ap02':'https://console-next.ap02.treasuredata.com','ap03':a85_0x178ce1(0xb9),'dev-us01':a85_0x178ce1(0xb8),'dev-eu01':'https://console-development-next.eu01.treasuredata.com','stg-us01':a85_0x178ce1(0xc8),'stg-jp01':a85_0x178ce1(0xa5),'stg-ap03':a85_0x178ce1(0xcb)};export function getConsoleUrl(_0x1f1c10,_0x2c1953){const _0x251de5=a85_0x178ce1,_0x4c5c7a=CONSOLE_ENDPOINTS[_0x1f1c10]||_0x251de5(0x8f)+_0x1f1c10+'.treasuredata.com';return _0x2c1953?''+_0x4c5c7a+_0x2c1953:_0x4c5c7a;}export function getConsoleNextUrl(_0x1bb27f,_0x270fd7){const _0x5afc12=a85_0x178ce1,_0x9e1b04=CONSOLE_NEXT_ENDPOINTS[_0x1bb27f]||_0x5afc12(0xb6)+_0x1bb27f+_0x5afc12(0x99);return _0x270fd7?''+_0x9e1b04+_0x270fd7:_0x9e1b04;}export function getLLMProjectUrl(_0x4bca83,_0x219247){const _0x5d86ca=a85_0x178ce1;return getConsoleNextUrl(_0x4bca83,'/app/af/'+_0x219247+_0x5d86ca(0xaf));}export function getLLMAgentChatUrl(_0x4d4316,_0x594f71,_0x5afcb0){const _0x513a27=a85_0x178ce1;return getConsoleNextUrl(_0x4d4316,_0x513a27(0xc2)+_0x594f71+_0x513a27(0x97)+_0x5afcb0+'/tc');}function a85_0x2578(_0x27d7f5,_0x20615e){_0x27d7f5=_0x27d7f5-0x88;const _0x3610dd=a85_0x3610();let _0x25784d=_0x3610dd[_0x27d7f5];return _0x25784d;}export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS,'engage':ENGAGE_ENDPOINTS};export function getEndpoint(_0x2b8c51,_0x47cb1d='td'){const _0x1e0005=a85_0x178ce1,_0x51df32=API_ENDPOINTS[_0x47cb1d]?.[_0x2b8c51];if(!_0x51df32)throw new Error(_0x1e0005(0xc9)+_0x47cb1d+_0x1e0005(0x9a)+_0x2b8c51+'\x27');return _0x51df32;}
1
+ function a85_0x4348(_0x57f036,_0x52b0cf){_0x57f036=_0x57f036-0x156;const _0x309ab8=a85_0x309a();let _0x43484b=_0x309ab8[_0x57f036];return _0x43484b;}const a85_0x3a8510=a85_0x4348;(function(_0x3c6f9e,_0x2ea423){const _0x1cb7f1=a85_0x4348,_0x3d7603=_0x3c6f9e();while(!![]){try{const _0x53cc6e=-parseInt(_0x1cb7f1(0x178))/0x1+parseInt(_0x1cb7f1(0x197))/0x2+-parseInt(_0x1cb7f1(0x165))/0x3+-parseInt(_0x1cb7f1(0x188))/0x4+-parseInt(_0x1cb7f1(0x180))/0x5+-parseInt(_0x1cb7f1(0x16b))/0x6*(parseInt(_0x1cb7f1(0x199))/0x7)+-parseInt(_0x1cb7f1(0x187))/0x8*(-parseInt(_0x1cb7f1(0x166))/0x9);if(_0x53cc6e===_0x2ea423)break;else _0x3d7603['push'](_0x3d7603['shift']());}catch(_0x59699f){_0x3d7603['push'](_0x3d7603['shift']());}}}(a85_0x309a,0x67f71));export const TD_ENDPOINTS={'us01':a85_0x3a8510(0x17d),'jp01':'https://api.treasuredata.co.jp','eu01':a85_0x3a8510(0x19d),'ap02':a85_0x3a8510(0x179),'ap03':a85_0x3a8510(0x186),'dev-us01':a85_0x3a8510(0x16f),'dev-eu01':a85_0x3a8510(0x173),'stg-us01':a85_0x3a8510(0x17b),'stg-jp01':a85_0x3a8510(0x18c),'stg-ap03':'https://api-staging.ap03.treasuredata.com'};export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a85_0x3a8510(0x175),'eu01':a85_0x3a8510(0x161),'ap02':a85_0x3a8510(0x189),'ap03':'https://api-cdp.ap03.treasuredata.com','dev-us01':a85_0x3a8510(0x16c),'dev-eu01':a85_0x3a8510(0x185),'stg-us01':a85_0x3a8510(0x190),'stg-jp01':a85_0x3a8510(0x19c),'stg-ap03':'https://api-staging-cdp.ap03.treasuredata.com'};function a85_0x309a(){const _0x4972a7=['https://api-workflow.treasuredata.com','https://api-development-presto.treasuredata.com','https://llm-api.ap02.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','https://console.ap03.treasuredata.com','https://engage-api-staging.ap03.treasuredata.com','https://console-next.treasuredata.co.jp','https://console-next.ap03.treasuredata.com','https://console-staging.treasuredata.co.jp','https://api-cdp.eu01.treasuredata.com','https://console-next.us01.treasuredata.com','https://console-development.treasuredata.com','https://api-workflow.ap03.treasuredata.com','1254294UMTaUQ','9TNZKpv','https://api-staging-presto.treasuredata.co.jp','https://console-next.ap02.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://console.','486GXXoYY','https://api-development-cdp.us01.treasuredata.com','https://console-staging.us01.treasuredata.com','https://api-presto.treasuredata.com','https://api-development.treasuredata.com','/ag/','https://console.eu01.treasuredata.com','/app/af/','https://api-development.eu01.treasuredata.com','https://engage-api.eu01.treasuredata.com','https://api-cdp.treasuredata.co.jp','https://engage-api.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','148254xpGjPm','https://api.ap02.treasuredata.com','https://console-staging.ap03.treasuredata.com','https://api-staging.us01.treasuredata.com','https://llm-api.treasuredata.com','https://api.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','2358040UszADo','https://engage-api-staging.us01.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','https://engage-api.treasuredata.co.jp','https://api-development-workflow.us01.treasuredata.com','https://api-development-cdp.eu01.treasuredata.com','https://api.ap03.treasuredata.com','15477032vJimpB','1831492CzeGYl','https://api-cdp.ap02.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-staging.treasuredata.co.jp','https://api-presto.ap02.treasuredata.com','https://api-workflow.ap02.treasuredata.com','https://console-staging-next.us01.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','/tc','https://api-workflow.treasuredata.co.jp','https://console-next.eu01.treasuredata.com','https://api-presto.eu01.treasuredata.com','https://api-development-workflow.eu01.treasuredata.com','https://api-workflow.eu01.treasuredata.com','1278028eIsFst','https://engage-api.ap02.treasuredata.com','56343WoVErU','/ag','https://console-staging-next.treasuredata.co.jp','https://api-staging-cdp.treasuredata.co.jp','https://api.eu01.treasuredata.com','https://engage-api-development.us01.treasuredata.com','.treasuredata.com'];a85_0x309a=function(){return _0x4972a7;};return a85_0x309a();}export const WORKFLOW_ENDPOINTS={'us01':a85_0x3a8510(0x158),'jp01':a85_0x3a8510(0x192),'eu01':a85_0x3a8510(0x196),'ap02':a85_0x3a8510(0x18e),'ap03':a85_0x3a8510(0x164),'dev-us01':a85_0x3a8510(0x184),'dev-eu01':a85_0x3a8510(0x195),'stg-us01':a85_0x3a8510(0x17f),'stg-jp01':'https://api-staging-workflow.treasuredata.co.jp','stg-ap03':a85_0x3a8510(0x182)};export const TRINO_ENDPOINTS={'us01':a85_0x3a8510(0x16e),'jp01':'https://api-presto.treasuredata.co.jp','eu01':a85_0x3a8510(0x194),'ap02':a85_0x3a8510(0x18d),'ap03':'https://api-presto.ap03.treasuredata.com','dev-us01':a85_0x3a8510(0x159),'dev-eu01':a85_0x3a8510(0x177),'stg-us01':'https://api-staging-presto.treasuredata.com','stg-jp01':a85_0x3a8510(0x167),'stg-ap03':a85_0x3a8510(0x169)};export const LLM_ENDPOINTS={'us01':a85_0x3a8510(0x17c),'jp01':'https://llm-api.treasuredata.co.jp','eu01':'https://llm-api.eu01.treasuredata.com','ap02':a85_0x3a8510(0x15a),'ap03':a85_0x3a8510(0x18b),'dev-us01':'https://llm-api-development.us01.treasuredata.com','dev-eu01':a85_0x3a8510(0x15b),'stg-us01':a85_0x3a8510(0x17e),'stg-jp01':'https://llm-api-staging.treasuredata.co.jp','stg-ap03':a85_0x3a8510(0x18a)};export const ENGAGE_ENDPOINTS={'us01':a85_0x3a8510(0x176),'jp01':a85_0x3a8510(0x183),'eu01':a85_0x3a8510(0x174),'ap02':a85_0x3a8510(0x198),'ap03':'https://engage-api.ap03.treasuredata.com','dev-us01':a85_0x3a8510(0x156),'dev-eu01':'https://engage-api-development.eu01.treasuredata.com','stg-us01':a85_0x3a8510(0x181),'stg-jp01':'https://engage-api-staging.treasuredata.co.jp','stg-ap03':a85_0x3a8510(0x15d)};export const CONSOLE_ENDPOINTS={'us01':'https://console.treasuredata.com','jp01':'https://console.treasuredata.co.jp','eu01':a85_0x3a8510(0x171),'ap02':'https://console.ap02.treasuredata.com','ap03':a85_0x3a8510(0x15c),'dev-us01':a85_0x3a8510(0x163),'dev-eu01':'https://console-development.eu01.treasuredata.com','stg-us01':a85_0x3a8510(0x16d),'stg-jp01':a85_0x3a8510(0x160),'stg-ap03':a85_0x3a8510(0x17a)};export const CONSOLE_NEXT_ENDPOINTS={'us01':a85_0x3a8510(0x162),'jp01':a85_0x3a8510(0x15e),'eu01':a85_0x3a8510(0x193),'ap02':a85_0x3a8510(0x168),'ap03':a85_0x3a8510(0x15f),'dev-us01':'https://console-development-next.us01.treasuredata.com','dev-eu01':'https://console-development-next.eu01.treasuredata.com','stg-us01':a85_0x3a8510(0x18f),'stg-jp01':a85_0x3a8510(0x19b),'stg-ap03':'https://console-staging-next.ap03.treasuredata.com'};export function getConsoleUrl(_0x581308,_0x3c03ea){const _0x203b66=a85_0x3a8510,_0x4547c8=CONSOLE_ENDPOINTS[_0x581308]||_0x203b66(0x16a)+_0x581308+'.treasuredata.com';return _0x3c03ea?''+_0x4547c8+_0x3c03ea:_0x4547c8;}export function getConsoleNextUrl(_0x589cfc,_0xda0f2d){const _0x13b9f7=a85_0x3a8510,_0x407f16=CONSOLE_NEXT_ENDPOINTS[_0x589cfc]||'https://console-next.'+_0x589cfc+_0x13b9f7(0x157);return _0xda0f2d?''+_0x407f16+_0xda0f2d:_0x407f16;}export function getLLMProjectUrl(_0x5eabf4,_0x3b76b9){const _0x4816fe=a85_0x3a8510;return getConsoleNextUrl(_0x5eabf4,_0x4816fe(0x172)+_0x3b76b9+_0x4816fe(0x19a));}export function getLLMAgentChatUrl(_0x4a9186,_0x10e2e4,_0x268116){const _0x549eae=a85_0x3a8510;return getConsoleNextUrl(_0x4a9186,_0x549eae(0x172)+_0x10e2e4+_0x549eae(0x170)+_0x268116+_0x549eae(0x191));}export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS,'engage':ENGAGE_ENDPOINTS};export function getEndpoint(_0x4cd2f8,_0x171bbe='td'){const _0x1a26d3=API_ENDPOINTS[_0x171bbe]?.[_0x4cd2f8];if(!_0x1a26d3)throw new Error('No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27'+_0x171bbe+'\x27\x20and\x20site\x20\x27'+_0x4cd2f8+'\x27');return _0x1a26d3;}
@@ -1 +1 @@
1
- const a87_0x4c8238=a87_0x408e;(function(_0x3b969f,_0x14ec7e){const _0x2085f2=a87_0x408e,_0x114469=_0x3b969f();while(!![]){try{const _0x4b6c4f=parseInt(_0x2085f2(0x191))/0x1*(-parseInt(_0x2085f2(0x18e))/0x2)+parseInt(_0x2085f2(0x199))/0x3*(-parseInt(_0x2085f2(0x196))/0x4)+-parseInt(_0x2085f2(0x18b))/0x5*(-parseInt(_0x2085f2(0x19b))/0x6)+-parseInt(_0x2085f2(0x192))/0x7*(-parseInt(_0x2085f2(0x193))/0x8)+-parseInt(_0x2085f2(0x18c))/0x9*(-parseInt(_0x2085f2(0x190))/0xa)+-parseInt(_0x2085f2(0x19a))/0xb*(-parseInt(_0x2085f2(0x198))/0xc)+-parseInt(_0x2085f2(0x18d))/0xd;if(_0x4b6c4f===_0x14ec7e)break;else _0x114469['push'](_0x114469['shift']());}catch(_0x3ebe03){_0x114469['push'](_0x114469['shift']());}}}(a87_0x16fa,0x57aa8));export const SITE_ALIASES={'us':'us01','aws':a87_0x4c8238(0x18f),'jp':a87_0x4c8238(0x197),'aws-tokyo':a87_0x4c8238(0x197),'dev':a87_0x4c8238(0x195),'stg':a87_0x4c8238(0x194)};function a87_0x408e(_0x1d2d8c,_0x33b99c){_0x1d2d8c=_0x1d2d8c-0x18b;const _0x16fa13=a87_0x16fa();let _0x408e46=_0x16fa13[_0x1d2d8c];return _0x408e46;}export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';function a87_0x16fa(){const _0x13f607=['825693jAOhEi','1933129fSiYFe','184806PDdDib','60AQBEig','45lytbxp','2986256AmXJio','611992sahkpS','us01','265460ddcQdd','2zIlHyx','14DgSYMo','1785824qMIAKr','stg-us01','dev-us01','4CgqjSk','jp01','36tQoNid'];a87_0x16fa=function(){return _0x13f607;};return a87_0x16fa();}
1
+ function a87_0x7328(){const _0x4161b0=['us01','132ZgyRrL','2341758NmNkkb','stg-us01','27460xyxzSq','dev-us01','7dpXUTC','4187051FkvOdH','jp01','2882sZGLAm','5202BacFoc','117eSniUz','2445845GUPwhq','13478032hxOvOK','1344116orrQia','6qBSaTE'];a87_0x7328=function(){return _0x4161b0;};return a87_0x7328();}function a87_0x4d4e(_0x43d8fe,_0x1af948){_0x43d8fe=_0x43d8fe-0x1e9;const _0x73282=a87_0x7328();let _0x4d4e3c=_0x73282[_0x43d8fe];return _0x4d4e3c;}const a87_0xaaccf8=a87_0x4d4e;(function(_0x2d3cfe,_0x53d11f){const _0x42b284=a87_0x4d4e,_0x59d11d=_0x2d3cfe();while(!![]){try{const _0xf3c87b=parseInt(_0x42b284(0x1f4))/0x1*(-parseInt(_0x42b284(0x1f2))/0x2)+-parseInt(_0x42b284(0x1f8))/0x3*(parseInt(_0x42b284(0x1f7))/0x4)+parseInt(_0x42b284(0x1f5))/0x5+parseInt(_0x42b284(0x1eb))/0x6+-parseInt(_0x42b284(0x1ef))/0x7*(parseInt(_0x42b284(0x1f6))/0x8)+-parseInt(_0x42b284(0x1f3))/0x9*(parseInt(_0x42b284(0x1ed))/0xa)+-parseInt(_0x42b284(0x1f0))/0xb*(-parseInt(_0x42b284(0x1ea))/0xc);if(_0xf3c87b===_0x53d11f)break;else _0x59d11d['push'](_0x59d11d['shift']());}catch(_0x5bf179){_0x59d11d['push'](_0x59d11d['shift']());}}}(a87_0x7328,0xe8e3c));export const SITE_ALIASES={'us':a87_0xaaccf8(0x1e9),'aws':a87_0xaaccf8(0x1e9),'jp':'jp01','aws-tokyo':a87_0xaaccf8(0x1f1),'dev':a87_0xaaccf8(0x1ee),'stg':a87_0xaaccf8(0x1ec)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
@@ -1 +1 @@
1
- const a92_0x38901c=a92_0x16b3;(function(_0x126e23,_0x2f5403){const _0x2e3269=a92_0x16b3,_0x1dcdfb=_0x126e23();while(!![]){try{const _0x5cb982=-parseInt(_0x2e3269(0xec))/0x1*(-parseInt(_0x2e3269(0xd6))/0x2)+-parseInt(_0x2e3269(0xd5))/0x3*(-parseInt(_0x2e3269(0xd9))/0x4)+parseInt(_0x2e3269(0xd8))/0x5*(-parseInt(_0x2e3269(0xd3))/0x6)+-parseInt(_0x2e3269(0xdf))/0x7+-parseInt(_0x2e3269(0xda))/0x8+-parseInt(_0x2e3269(0xe1))/0x9*(-parseInt(_0x2e3269(0xed))/0xa)+-parseInt(_0x2e3269(0xde))/0xb*(-parseInt(_0x2e3269(0xeb))/0xc);if(_0x5cb982===_0x2f5403)break;else _0x1dcdfb['push'](_0x1dcdfb['shift']());}catch(_0x3a7931){_0x1dcdfb['push'](_0x1dcdfb['shift']());}}}(a92_0xd610,0x75985));import{existsSync,readFileSync}from'fs';function a92_0x16b3(_0x423f65,_0x5cdd41){_0x423f65=_0x423f65-0xd0;const _0xd61013=a92_0xd610();let _0x16b3fb=_0xd61013[_0x423f65];return _0x16b3fb;}import a92_0x550c66 from'path';const TDX_CONFIG_FILE='tdx.json',AGENTS_DIR='agents';export function findAgentConfigPath(_0x4a7e02=process[a92_0x38901c(0xd4)]()){const _0x1dc7cd=a92_0x38901c;let _0xd85968=a92_0x550c66[_0x1dc7cd(0xe0)](_0x4a7e02);const _0x134a90=a92_0x550c66[_0x1dc7cd(0xe3)](_0xd85968)[_0x1dc7cd(0xd0)];while(_0xd85968!==_0x134a90){const _0x2fb246=a92_0x550c66[_0x1dc7cd(0xe5)](_0xd85968,TDX_CONFIG_FILE);if(existsSync(_0x2fb246))try{const _0x147b8a=readFileSync(_0x2fb246,_0x1dc7cd(0xe4)),_0x4098f6=JSON[_0x1dc7cd(0xe3)](_0x147b8a);if(_0x4098f6[_0x1dc7cd(0xe6)])return _0x2fb246;}catch{}_0xd85968=a92_0x550c66[_0x1dc7cd(0xdb)](_0xd85968);}return null;}export function loadAgentConfig(_0x30dfa6){const _0x264c49=a92_0x38901c,_0x2f36a0=readFileSync(_0x30dfa6,_0x264c49(0xe4));let _0x2ba7d5;try{_0x2ba7d5=JSON[_0x264c49(0xe3)](_0x2f36a0);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x30dfa6);}if(!_0x2ba7d5||typeof _0x2ba7d5!==_0x264c49(0xd2))throw new Error(_0x264c49(0xe8));const _0xadd518=_0x2ba7d5;if(!_0xadd518['llm_project']||typeof _0xadd518[_0x264c49(0xe6)]!=='string')throw new Error(_0x264c49(0xd1));return{'llm_project':_0xadd518[_0x264c49(0xe6)]};}export function findAgentConfig(_0x4923d7=process[a92_0x38901c(0xd4)]()){const _0x26bbc3=a92_0x38901c,_0x4502b8=findAgentConfigPath(_0x4923d7);if(!_0x4502b8)throw new Error(_0x26bbc3(0xdc));const _0x31fb67=loadAgentConfig(_0x4502b8),_0x3faa95=a92_0x550c66[_0x26bbc3(0xdb)](_0x4502b8);return{'config':_0x31fb67,'configPath':_0x4502b8,'configDir':_0x3faa95};}export function getAgentProjectDir(_0x20a438,_0x50d328=process[a92_0x38901c(0xd4)]()){const _0x4f9f6c=a92_0x38901c;return a92_0x550c66[_0x4f9f6c(0xe5)](_0x50d328,AGENTS_DIR,_0x20a438);}export function getAgentConfigPath(_0x1fa6ee,_0x56d02d=process[a92_0x38901c(0xd4)]()){const _0x30383c=a92_0x38901c;return a92_0x550c66[_0x30383c(0xe5)](getAgentProjectDir(_0x1fa6ee,_0x56d02d),TDX_CONFIG_FILE);}export function createAgentConfigContent(_0x28df6c){const _0x347137=a92_0x38901c,_0x1d048b={'llm_project':_0x28df6c};return JSON[_0x347137(0xe2)](_0x1d048b,null,0x2)+'\x0a';}function a92_0xd610(){const _0x258618=['Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27llm_project\x27\x20field','object','18gkTIvr','cwd','9SElPBL','656LvEofI','PROMPTS','700690pyHkbp','127420fQKcis','5050464GgICGP','dirname','No\x20agent\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','basename','2295711beIEtJ','2125550LichBk','resolve','63qXuOIO','stringify','parse','utf-8','join','llm_project','integrations','Invalid\x20tdx.json:\x20expected\x20object','KNOWLEDGE_BASES','agent.yml','36aRLFhJ','707QVgBEd','1262110qvbBWS','prompts','root'];a92_0xd610=function(){return _0x258618;};return a92_0xd610();}export function isAgentDir(_0x5a5b20){const _0x14cab7=a92_0x38901c;return existsSync(a92_0x550c66[_0x14cab7(0xe5)](_0x5a5b20,_0x14cab7(0xea)));}export function isAgentYamlPath(_0x859036){const _0x2a4be8=a92_0x38901c;return a92_0x550c66[_0x2a4be8(0xdd)](_0x859036)==='agent.yml';}export function getAgentDirFromYamlPath(_0x3593bf){return a92_0x550c66['dirname'](_0x3593bf);}export const PROJECT_SUBDIRS={'KNOWLEDGE_BASES':'knowledge_bases','PROMPTS':a92_0x38901c(0xee),'INTEGRATIONS':a92_0x38901c(0xe7)};export function getKnowledgeBasesDir(_0x114070){const _0x106903=a92_0x38901c;return a92_0x550c66[_0x106903(0xe5)](_0x114070,PROJECT_SUBDIRS[_0x106903(0xe9)]);}export function getPromptsDir(_0x2e1193){const _0x2bfb46=a92_0x38901c;return a92_0x550c66['join'](_0x2e1193,PROJECT_SUBDIRS[_0x2bfb46(0xd7)]);}export function getIntegrationsDir(_0xb98735){const _0x2a1da6=a92_0x38901c;return a92_0x550c66[_0x2a1da6(0xe5)](_0xb98735,PROJECT_SUBDIRS['INTEGRATIONS']);}
1
+ const a92_0x2ea5b5=a92_0x4df5;(function(_0x498ae3,_0x407e1a){const _0x1211e4=a92_0x4df5,_0x3c58fc=_0x498ae3();while(!![]){try{const _0xbd200d=parseInt(_0x1211e4(0xd9))/0x1+-parseInt(_0x1211e4(0xeb))/0x2+-parseInt(_0x1211e4(0xe0))/0x3+parseInt(_0x1211e4(0xdc))/0x4+-parseInt(_0x1211e4(0xf3))/0x5+parseInt(_0x1211e4(0xea))/0x6*(parseInt(_0x1211e4(0xe2))/0x7)+parseInt(_0x1211e4(0xe6))/0x8;if(_0xbd200d===_0x407e1a)break;else _0x3c58fc['push'](_0x3c58fc['shift']());}catch(_0xd78a31){_0x3c58fc['push'](_0x3c58fc['shift']());}}}(a92_0x4557,0x34274));import{existsSync,readFileSync}from'fs';import a92_0x2026f5 from'path';const TDX_CONFIG_FILE='tdx.json',AGENTS_DIR=a92_0x2ea5b5(0xf0);function a92_0x4df5(_0x24a34c,_0x3df5bb){_0x24a34c=_0x24a34c-0xd9;const _0x4557b3=a92_0x4557();let _0x4df5d3=_0x4557b3[_0x24a34c];return _0x4df5d3;}export function findAgentConfigPath(_0x449339=process[a92_0x2ea5b5(0xf4)]()){const _0x9fa33f=a92_0x2ea5b5;let _0x1a5138=a92_0x2026f5['resolve'](_0x449339);const _0x46bd6b=a92_0x2026f5[_0x9fa33f(0xdd)](_0x1a5138)[_0x9fa33f(0xdb)];while(_0x1a5138!==_0x46bd6b){const _0xd6f8d8=a92_0x2026f5['join'](_0x1a5138,TDX_CONFIG_FILE);if(existsSync(_0xd6f8d8))try{const _0x33b03d=readFileSync(_0xd6f8d8,_0x9fa33f(0xec)),_0x376a22=JSON['parse'](_0x33b03d);if(_0x376a22['llm_project'])return _0xd6f8d8;}catch{}_0x1a5138=a92_0x2026f5['dirname'](_0x1a5138);}return null;}export function loadAgentConfig(_0x395c66){const _0x32fd50=a92_0x2ea5b5,_0x1dbd29=readFileSync(_0x395c66,_0x32fd50(0xec));let _0x45425d;try{_0x45425d=JSON[_0x32fd50(0xdd)](_0x1dbd29);}catch{throw new Error(_0x32fd50(0xe4)+_0x395c66);}if(!_0x45425d||typeof _0x45425d!==_0x32fd50(0xe7))throw new Error(_0x32fd50(0xf5));const _0x38f81a=_0x45425d;if(!_0x38f81a[_0x32fd50(0xde)]||typeof _0x38f81a[_0x32fd50(0xde)]!==_0x32fd50(0xed))throw new Error(_0x32fd50(0xf1));return{'llm_project':_0x38f81a[_0x32fd50(0xde)]};}export function findAgentConfig(_0x2ef794=process[a92_0x2ea5b5(0xf4)]()){const _0x5e2360=a92_0x2ea5b5,_0x1c2151=findAgentConfigPath(_0x2ef794);if(!_0x1c2151)throw new Error(_0x5e2360(0xe1));const _0x10c6ec=loadAgentConfig(_0x1c2151),_0xf274c6=a92_0x2026f5[_0x5e2360(0xee)](_0x1c2151);return{'config':_0x10c6ec,'configPath':_0x1c2151,'configDir':_0xf274c6};}export function getAgentProjectDir(_0x3eec91,_0x336378=process['cwd']()){const _0x5b6702=a92_0x2ea5b5;return a92_0x2026f5[_0x5b6702(0xda)](_0x336378,AGENTS_DIR,_0x3eec91);}export function getAgentConfigPath(_0x49c898,_0x366322=process[a92_0x2ea5b5(0xf4)]()){const _0x599705=a92_0x2ea5b5;return a92_0x2026f5[_0x599705(0xda)](getAgentProjectDir(_0x49c898,_0x366322),TDX_CONFIG_FILE);}export function createAgentConfigContent(_0x1890cb){const _0x150c1d=a92_0x2ea5b5,_0x118095={'llm_project':_0x1890cb};return JSON[_0x150c1d(0xe8)](_0x118095,null,0x2)+'\x0a';}function a92_0x4557(){const _0x4c73be=['object','stringify','knowledge_bases','181464pjTTOp','772040JQfATG','utf-8','string','dirname','integrations','agents','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27llm_project\x27\x20field','INTEGRATIONS','1099585BroGbR','cwd','Invalid\x20tdx.json:\x20expected\x20object','216620tcLVqU','join','root','483580wSvKEN','parse','llm_project','KNOWLEDGE_BASES','616425CZhUxu','No\x20agent\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','14xFvHSO','agent.yml','Invalid\x20JSON\x20in\x20','prompts','5016232IMfadC'];a92_0x4557=function(){return _0x4c73be;};return a92_0x4557();}export function isAgentDir(_0x466725){const _0x31a4c0=a92_0x2ea5b5;return existsSync(a92_0x2026f5[_0x31a4c0(0xda)](_0x466725,_0x31a4c0(0xe3)));}export function isAgentYamlPath(_0x4bbafe){return a92_0x2026f5['basename'](_0x4bbafe)==='agent.yml';}export function getAgentDirFromYamlPath(_0x87722b){return a92_0x2026f5['dirname'](_0x87722b);}export const PROJECT_SUBDIRS={'KNOWLEDGE_BASES':a92_0x2ea5b5(0xe9),'PROMPTS':a92_0x2ea5b5(0xe5),'INTEGRATIONS':a92_0x2ea5b5(0xef)};export function getKnowledgeBasesDir(_0x12f6a8){const _0x3278c3=a92_0x2ea5b5;return a92_0x2026f5['join'](_0x12f6a8,PROJECT_SUBDIRS[_0x3278c3(0xdf)]);}export function getPromptsDir(_0x24b3dd){return a92_0x2026f5['join'](_0x24b3dd,PROJECT_SUBDIRS['PROMPTS']);}export function getIntegrationsDir(_0x4c9341){const _0x2c9959=a92_0x2ea5b5;return a92_0x2026f5['join'](_0x4c9341,PROJECT_SUBDIRS[_0x2c9959(0xf2)]);}
@@ -1 +1 @@
1
- function a93_0x320e(){const _0x41e502=['968849JFVkak','split','9YEVASb','126uFiBMg','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','Project\x20name\x20cannot\x20be\x20empty','437632KxlXCZ','138940MWOYVE','140307elTaoc','trim','274362TpWvkQ','6826EVuokw','length','2625576ZZvjJn','Agent\x20name\x20cannot\x20be\x20empty'];a93_0x320e=function(){return _0x41e502;};return a93_0x320e();}function a93_0x52a6(_0x425fd0,_0x15df28){_0x425fd0=_0x425fd0-0x198;const _0x320e15=a93_0x320e();let _0x52a666=_0x320e15[_0x425fd0];return _0x52a666;}(function(_0x2272b9,_0xc1966f){const _0x40b04d=a93_0x52a6,_0x47ffd3=_0x2272b9();while(!![]){try{const _0x1d4729=parseInt(_0x40b04d(0x19a))/0x1+-parseInt(_0x40b04d(0x19d))/0x2*(-parseInt(_0x40b04d(0x1a4))/0x3)+parseInt(_0x40b04d(0x198))/0x4+parseInt(_0x40b04d(0x199))/0x5+-parseInt(_0x40b04d(0x19c))/0x6+parseInt(_0x40b04d(0x1a1))/0x7+parseInt(_0x40b04d(0x19f))/0x8*(-parseInt(_0x40b04d(0x1a3))/0x9);if(_0x1d4729===_0xc1966f)break;else _0x47ffd3['push'](_0x47ffd3['shift']());}catch(_0x2de3e2){_0x47ffd3['push'](_0x47ffd3['shift']());}}}(a93_0x320e,0x2d3f4));export function parseAgentRef(_0x3ae9ff){const _0x54f356=a93_0x52a6;if(!_0x3ae9ff||_0x3ae9ff[_0x54f356(0x19b)]()==='')throw new Error('Agent\x20reference\x20cannot\x20be\x20empty');const _0x4fd379=_0x3ae9ff[_0x54f356(0x19b)](),_0x50e237=_0x4fd379[_0x54f356(0x1a2)]('/');if(_0x50e237['length']===0x1)return{'projectName':_0x50e237[0x0],'agentName':undefined};else{if(_0x50e237[_0x54f356(0x19e)]===0x2){const [_0x118fe0,_0x5ec902]=_0x50e237;if(!_0x118fe0||_0x118fe0[_0x54f356(0x19b)]()==='')throw new Error(_0x54f356(0x1a6));if(!_0x5ec902||_0x5ec902[_0x54f356(0x19b)]()==='')throw new Error(_0x54f356(0x1a0));return{'projectName':_0x118fe0[_0x54f356(0x19b)](),'agentName':_0x5ec902['trim']()};}else throw new Error('Invalid\x20agent\x20reference\x20format:\x20'+_0x3ae9ff+_0x54f356(0x1a5));}}
1
+ (function(_0xfc5e2c,_0x18a0f6){const _0x248578=a93_0x3f50,_0x4d71b4=_0xfc5e2c();while(!![]){try{const _0xd5bbcf=parseInt(_0x248578(0x1ef))/0x1*(parseInt(_0x248578(0x1fa))/0x2)+-parseInt(_0x248578(0x1fd))/0x3*(parseInt(_0x248578(0x1f9))/0x4)+-parseInt(_0x248578(0x1f2))/0x5+parseInt(_0x248578(0x1fe))/0x6+parseInt(_0x248578(0x1fc))/0x7*(parseInt(_0x248578(0x1fb))/0x8)+-parseInt(_0x248578(0x1f6))/0x9+parseInt(_0x248578(0x1f4))/0xa*(-parseInt(_0x248578(0x1ff))/0xb);if(_0xd5bbcf===_0x18a0f6)break;else _0x4d71b4['push'](_0x4d71b4['shift']());}catch(_0x105784){_0x4d71b4['push'](_0x4d71b4['shift']());}}}(a93_0x4108,0x8b057));function a93_0x3f50(_0x144e16,_0x542134){_0x144e16=_0x144e16-0x1ef;const _0x410866=a93_0x4108();let _0x3f50cd=_0x410866[_0x144e16];return _0x3f50cd;}function a93_0x4108(){const _0xccf0c8=['Invalid\x20agent\x20reference\x20format:\x20','26030ZURrXh','Project\x20name\x20cannot\x20be\x20empty','2410qriOik','trim','3011967shVsGD','length','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','8LLNJSF','358342ioLIwo','31344pzSnSp','1071Zrwmdj','667911BgsiaM','282024kUadHV','8569rXgMry','split','5syiksM','Agent\x20reference\x20cannot\x20be\x20empty'];a93_0x4108=function(){return _0xccf0c8;};return a93_0x4108();}export function parseAgentRef(_0x5ebaa5){const _0x3da6ac=a93_0x3f50;if(!_0x5ebaa5||_0x5ebaa5[_0x3da6ac(0x1f5)]()==='')throw new Error(_0x3da6ac(0x1f0));const _0x2d470a=_0x5ebaa5[_0x3da6ac(0x1f5)](),_0x53dda8=_0x2d470a[_0x3da6ac(0x200)]('/');if(_0x53dda8[_0x3da6ac(0x1f7)]===0x1)return{'projectName':_0x53dda8[0x0],'agentName':undefined};else{if(_0x53dda8['length']===0x2){const [_0x32affa,_0x564b6d]=_0x53dda8;if(!_0x32affa||_0x32affa['trim']()==='')throw new Error(_0x3da6ac(0x1f3));if(!_0x564b6d||_0x564b6d['trim']()==='')throw new Error('Agent\x20name\x20cannot\x20be\x20empty');return{'projectName':_0x32affa['trim'](),'agentName':_0x564b6d['trim']()};}else throw new Error(_0x3da6ac(0x1f1)+_0x5ebaa5+_0x3da6ac(0x1f8));}}
@@ -1 +1 @@
1
- function a94_0x5331(_0x2ecdb7,_0x10cdf8){_0x2ecdb7=_0x2ecdb7-0x7f;const _0x3083e=a94_0x3083();let _0x5331f3=_0x3083e[_0x2ecdb7];return _0x5331f3;}(function(_0x160662,_0x219a84){const _0x144cb0=a94_0x5331,_0x49ddc2=_0x160662();while(!![]){try{const _0x4afee8=parseInt(_0x144cb0(0x8b))/0x1*(parseInt(_0x144cb0(0x8a))/0x2)+parseInt(_0x144cb0(0x88))/0x3*(parseInt(_0x144cb0(0x81))/0x4)+parseInt(_0x144cb0(0x85))/0x5+parseInt(_0x144cb0(0x80))/0x6*(parseInt(_0x144cb0(0x86))/0x7)+parseInt(_0x144cb0(0x8c))/0x8+-parseInt(_0x144cb0(0x7f))/0x9*(parseInt(_0x144cb0(0x83))/0xa)+-parseInt(_0x144cb0(0x82))/0xb;if(_0x4afee8===_0x219a84)break;else _0x49ddc2['push'](_0x49ddc2['shift']());}catch(_0x3f0cb0){_0x49ddc2['push'](_0x49ddc2['shift']());}}}(a94_0x3083,0x387bc));export async function batchAsync(_0x243a89,_0x45b40e,_0x2a101b=0xa){const _0x4338fd=a94_0x5331,_0x59a6c4=[];for(let _0x2de514=0x0;_0x2de514<_0x243a89[_0x4338fd(0x84)];_0x2de514+=_0x2a101b){const _0x2bf9b2=_0x243a89[_0x4338fd(0x87)](_0x2de514,_0x2de514+_0x2a101b),_0x4ba2c8=await Promise['all'](_0x2bf9b2[_0x4338fd(0x8d)](_0x45b40e));_0x59a6c4[_0x4338fd(0x89)](..._0x4ba2c8);}return _0x59a6c4;}function a94_0x3083(){const _0x1d6721=['slice','34797WxVqem','push','2uAlgkg','169003XYPwcM','1225800Czsits','map','9dOyhhq','96MQEFOU','140iInJHg','13334684aphwxw','1346270SiipaA','length','2070490WuQtEF','190722hlkusX'];a94_0x3083=function(){return _0x1d6721;};return a94_0x3083();}
1
+ function a94_0x5664(_0x442f2b,_0x58868d){_0x442f2b=_0x442f2b-0xce;const _0x230a55=a94_0x230a();let _0x56643d=_0x230a55[_0x442f2b];return _0x56643d;}(function(_0xe8b570,_0x448176){const _0xd24e37=a94_0x5664,_0x2ba37e=_0xe8b570();while(!![]){try{const _0x1afa77=-parseInt(_0xd24e37(0xd6))/0x1+-parseInt(_0xd24e37(0xd9))/0x2*(parseInt(_0xd24e37(0xd3))/0x3)+parseInt(_0xd24e37(0xd4))/0x4+parseInt(_0xd24e37(0xd2))/0x5+-parseInt(_0xd24e37(0xd8))/0x6+-parseInt(_0xd24e37(0xdb))/0x7*(parseInt(_0xd24e37(0xd5))/0x8)+parseInt(_0xd24e37(0xd0))/0x9*(parseInt(_0xd24e37(0xdc))/0xa);if(_0x1afa77===_0x448176)break;else _0x2ba37e['push'](_0x2ba37e['shift']());}catch(_0x52d79c){_0x2ba37e['push'](_0x2ba37e['shift']());}}}(a94_0x230a,0x78d16));export async function batchAsync(_0x3fe9ba,_0x4bbfd0,_0x131183=0xa){const _0x2461f3=a94_0x5664,_0x285df7=[];for(let _0x324efd=0x0;_0x324efd<_0x3fe9ba[_0x2461f3(0xcf)];_0x324efd+=_0x131183){const _0x4e0fed=_0x3fe9ba[_0x2461f3(0xda)](_0x324efd,_0x324efd+_0x131183),_0x550c48=await Promise[_0x2461f3(0xd1)](_0x4e0fed[_0x2461f3(0xd7)](_0x4bbfd0));_0x285df7[_0x2461f3(0xce)](..._0x550c48);}return _0x285df7;}function a94_0x230a(){const _0x546fcd=['length','18ZNfgQr','all','4355955LyTeXg','30AWKwuz','2503944KQCTwf','6960752JhKeEx','813665STsRbr','map','3532332QfovmE','76292XcNbZc','slice','7RPbMmx','8258170QpCNtV','push'];a94_0x230a=function(){return _0x546fcd;};return a94_0x230a();}
@@ -1 +1 @@
1
- function a95_0x5d25(_0x1dd017,_0x28d835){_0x1dd017=_0x1dd017-0xbc;const _0xbb7d95=a95_0xbb7d();let _0x5d2565=_0xbb7d95[_0x1dd017];return _0x5d2565;}function a95_0xbb7d(){const _0x487413=['20WvyWhN','6jLZrof','684aDPsdc','4AXLMpe','7536634brwRDu','11jkrQYn','10749411fDETUk','109269UPFuvH','8YmVTyc','tdx','trim','cwd','4334661WsgCwB','10838550LRDGNK','last_chat_id','7176460ohMqzc','.cache','885781HzQzCF','utf-8'];a95_0xbb7d=function(){return _0x487413;};return a95_0xbb7d();}(function(_0x52c7da,_0x4dce7b){const _0x1d0529=a95_0x5d25,_0x31e3e6=_0x52c7da();while(!![]){try{const _0x46cbf7=parseInt(_0x1d0529(0xc6))/0x1*(parseInt(_0x1d0529(0xbf))/0x2)+parseInt(_0x1d0529(0xcb))/0x3*(-parseInt(_0x1d0529(0xc2))/0x4)+-parseInt(_0x1d0529(0xce))/0x5+parseInt(_0x1d0529(0xc0))/0x6*(-parseInt(_0x1d0529(0xc3))/0x7)+parseInt(_0x1d0529(0xc7))/0x8*(-parseInt(_0x1d0529(0xc5))/0x9)+-parseInt(_0x1d0529(0xcc))/0xa*(-parseInt(_0x1d0529(0xc4))/0xb)+parseInt(_0x1d0529(0xc1))/0xc*(parseInt(_0x1d0529(0xbd))/0xd);if(_0x46cbf7===_0x4dce7b)break;else _0x31e3e6['push'](_0x31e3e6['shift']());}catch(_0x5e89d5){_0x31e3e6['push'](_0x31e3e6['shift']());}}}(a95_0xbb7d,0xddf4e));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x501a31=a95_0x5d25;return join(process[_0x501a31(0xca)](),_0x501a31(0xbc),_0x501a31(0xc8));}function getLastChatIdPath(){const _0x5d5324=a95_0x5d25;return join(getCacheDir(),_0x5d5324(0xcd));}function ensureCacheDir(){const _0x31a336=getCacheDir();!existsSync(_0x31a336)&&mkdirSync(_0x31a336,{'recursive':!![]});}export function saveLastChatId(_0x6fd150){const _0x2b5dc0=a95_0x5d25;ensureCacheDir();const _0x551478=getLastChatIdPath();writeFileSync(_0x551478,_0x6fd150,_0x2b5dc0(0xbe));}export function loadLastChatId(){const _0x4db3a4=a95_0x5d25,_0x498eb9=getLastChatIdPath();if(!existsSync(_0x498eb9))return undefined;try{const _0x5d0994=readFileSync(_0x498eb9,_0x4db3a4(0xbe))[_0x4db3a4(0xc9)]();return _0x5d0994||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x491486=a95_0x5d25,_0x4d6d4c=getLastChatIdPath();if(existsSync(_0x4d6d4c))try{writeFileSync(_0x4d6d4c,'',_0x491486(0xbe));}catch{}}
1
+ (function(_0x32273f,_0x2f5e55){const _0x575fa5=a95_0x1e10,_0x366c70=_0x32273f();while(!![]){try{const _0xe032eb=parseInt(_0x575fa5(0x103))/0x1*(-parseInt(_0x575fa5(0x104))/0x2)+parseInt(_0x575fa5(0x10a))/0x3*(parseInt(_0x575fa5(0xff))/0x4)+parseInt(_0x575fa5(0x10b))/0x5+parseInt(_0x575fa5(0x106))/0x6*(parseInt(_0x575fa5(0x101))/0x7)+parseInt(_0x575fa5(0x10c))/0x8*(parseInt(_0x575fa5(0x108))/0x9)+parseInt(_0x575fa5(0x10d))/0xa+parseInt(_0x575fa5(0x109))/0xb*(-parseInt(_0x575fa5(0x100))/0xc);if(_0xe032eb===_0x2f5e55)break;else _0x366c70['push'](_0x366c70['shift']());}catch(_0x35f40e){_0x366c70['push'](_0x366c70['shift']());}}}(a95_0x339c,0x19b5f));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x5cb749=a95_0x1e10;return join(process[_0x5cb749(0x102)](),'.cache','tdx');}function a95_0x1e10(_0xbfa855,_0x1b6aef){_0xbfa855=_0xbfa855-0xff;const _0x339cf3=a95_0x339c();let _0x1e1061=_0x339cf3[_0xbfa855];return _0x1e1061;}function a95_0x339c(){const _0x106ffb=['7Hseclj','cwd','32953ITSlmg','4AnyPce','last_chat_id','895506gjKXDN','utf-8','92880gxjPCt','90343olgLrR','1161TBovYG','290355vmzFAn','104cwuISx','1514180ZwcWbk','1344pkhzyG','660HxAnlm'];a95_0x339c=function(){return _0x106ffb;};return a95_0x339c();}function getLastChatIdPath(){const _0x10ea82=a95_0x1e10;return join(getCacheDir(),_0x10ea82(0x105));}function ensureCacheDir(){const _0x15cf89=getCacheDir();!existsSync(_0x15cf89)&&mkdirSync(_0x15cf89,{'recursive':!![]});}export function saveLastChatId(_0x1f5c9f){const _0x14e872=a95_0x1e10;ensureCacheDir();const _0x3dd256=getLastChatIdPath();writeFileSync(_0x3dd256,_0x1f5c9f,_0x14e872(0x107));}export function loadLastChatId(){const _0x1ede59=a95_0x1e10,_0x47feed=getLastChatIdPath();if(!existsSync(_0x47feed))return undefined;try{const _0x3d62e1=readFileSync(_0x47feed,_0x1ede59(0x107))['trim']();return _0x3d62e1||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x3d46b1=getLastChatIdPath();if(existsSync(_0x3d46b1))try{writeFileSync(_0x3d46b1,'','utf-8');}catch{}}
@@ -1 +1 @@
1
- (function(_0x5bd2d6,_0x1f21f3){const _0x4bf28e=a96_0x2cae,_0x13dd8f=_0x5bd2d6();while(!![]){try{const _0x3cf8f5=-parseInt(_0x4bf28e(0xd5))/0x1*(-parseInt(_0x4bf28e(0xe0))/0x2)+parseInt(_0x4bf28e(0xe6))/0x3*(parseInt(_0x4bf28e(0xd3))/0x4)+-parseInt(_0x4bf28e(0xe1))/0x5+-parseInt(_0x4bf28e(0xd8))/0x6+parseInt(_0x4bf28e(0xdb))/0x7*(-parseInt(_0x4bf28e(0xdf))/0x8)+-parseInt(_0x4bf28e(0xd9))/0x9*(parseInt(_0x4bf28e(0xdd))/0xa)+parseInt(_0x4bf28e(0xe8))/0xb*(parseInt(_0x4bf28e(0xe7))/0xc);if(_0x3cf8f5===_0x1f21f3)break;else _0x13dd8f['push'](_0x13dd8f['shift']());}catch(_0x57109b){_0x13dd8f['push'](_0x13dd8f['shift']());}}}(a96_0x33b8,0x3d91a));import{Chalk}from'chalk';export function shouldUseColor(_0x208ac3={}){const _0x4b24d5=a96_0x2cae;if(_0x208ac3[_0x4b24d5(0xf0)]===!![])return![];if(_0x208ac3[_0x4b24d5(0xe3)]===!![])return!![];if(process[_0x4b24d5(0xef)][_0x4b24d5(0xd2)]!==undefined)return![];return process[_0x4b24d5(0xf1)]['isTTY']??![];}export function getChalk(_0x2da4eb={}){if(shouldUseColor(_0x2da4eb))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x16e4f6,_0xa61c01={}){return getChalk(_0xa61c01)['dim'](_0x16e4f6);}export function colorHeader(_0x4f65a3,_0x18a5a1={}){const _0x1cc807=a96_0x2cae;return getChalk(_0x18a5a1)[_0x1cc807(0xec)](_0x4f65a3);}export function colorType(_0x18bf9a,_0x2a8f72={}){const _0x477f15=a96_0x2cae;return getChalk(_0x2a8f72)[_0x477f15(0xee)](_0x18bf9a);}export function colorJSONKey(_0x5dd988,_0x3f2191={}){const _0x41eed8=a96_0x2cae;return getChalk(_0x3f2191)[_0x41eed8(0xde)](_0x5dd988);}export function colorJSONString(_0x157b0a,_0x5e5db8={}){const _0x22302f=a96_0x2cae;return getChalk(_0x5e5db8)[_0x22302f(0xea)](_0x157b0a);}function a96_0x2cae(_0x55aa97,_0x527f32){_0x55aa97=_0x55aa97-0xd2;const _0x33b88e=a96_0x33b8();let _0x2caef2=_0x33b88e[_0x55aa97];return _0x2caef2;}export function colorJSONNumber(_0x1ca9bc,_0x15bd67={}){return getChalk(_0x15bd67)['cyan'](_0x1ca9bc);}export function colorJSONBoolean(_0xd0a85d,_0x3af296={}){return getChalk(_0x3af296)['yellow'](_0xd0a85d);}export function colorJSONNull(_0x166fae,_0x38d884={}){const _0x3011fb=a96_0x2cae;return getChalk(_0x38d884)[_0x3011fb(0xee)](_0x166fae);}export function colorizeJSONCompact(_0x18d57d,_0x3905e4={}){const _0x4ab3e0=a96_0x2cae;if(!shouldUseColor(_0x3905e4))return JSON[_0x4ab3e0(0xe2)](_0x18d57d);if(_0x18d57d===null)return colorJSONNull('null',_0x3905e4);if(typeof _0x18d57d===_0x4ab3e0(0xd7))return colorJSONBoolean(String(_0x18d57d),_0x3905e4);if(typeof _0x18d57d===_0x4ab3e0(0xe5))return colorJSONNumber(String(_0x18d57d),_0x3905e4);if(typeof _0x18d57d===_0x4ab3e0(0xdc))return colorJSONString(JSON[_0x4ab3e0(0xe2)](_0x18d57d),_0x3905e4);if(Array[_0x4ab3e0(0xf2)](_0x18d57d)){if(_0x18d57d[_0x4ab3e0(0xd6)]===0x0)return'[]';const _0x1d719d=_0x18d57d[_0x4ab3e0(0xed)](_0x1bc62b=>colorizeJSONCompact(_0x1bc62b,_0x3905e4));return'['+_0x1d719d['join'](',')+']';}if(typeof _0x18d57d===_0x4ab3e0(0xe9)){const _0x394e94=Object[_0x4ab3e0(0xda)](_0x18d57d);if(_0x394e94[_0x4ab3e0(0xd6)]===0x0)return'{}';const _0x12c1cc=_0x394e94[_0x4ab3e0(0xed)](([_0x478e7e,_0x47f633])=>{const _0x1d15fc=_0x4ab3e0,_0x186a73=colorJSONKey(JSON[_0x1d15fc(0xe2)](_0x478e7e),_0x3905e4),_0x11834c=colorizeJSONCompact(_0x47f633,_0x3905e4);return _0x186a73+':'+_0x11834c;});return'{'+_0x12c1cc['join'](',')+'}';}return String(_0x18d57d);}export function colorizeJSON(_0x16bea8,_0x420f35={},_0x1a1098=0x0){const _0x29907c=a96_0x2cae;if(!shouldUseColor(_0x420f35))return JSON[_0x29907c(0xe2)](_0x16bea8,null,0x2);const _0xb74c45='\x20'['repeat'](_0x1a1098),_0x32fa39=_0x1a1098+0x2;if(_0x16bea8===null)return colorJSONNull(_0x29907c(0xeb),_0x420f35);if(typeof _0x16bea8===_0x29907c(0xd7))return colorJSONBoolean(String(_0x16bea8),_0x420f35);if(typeof _0x16bea8===_0x29907c(0xe5))return colorJSONNumber(String(_0x16bea8),_0x420f35);if(typeof _0x16bea8==='string')return colorJSONString(JSON[_0x29907c(0xe2)](_0x16bea8),_0x420f35);if(Array[_0x29907c(0xf2)](_0x16bea8)){if(_0x16bea8[_0x29907c(0xd6)]===0x0)return'[]';const _0x973ef0=_0x16bea8[_0x29907c(0xed)](_0x499e56=>{const _0x17fbc4=_0x29907c,_0x405134=colorizeJSON(_0x499e56,_0x420f35,_0x32fa39);return''+'\x20'[_0x17fbc4(0xe4)](_0x32fa39)+_0x405134;});return'[\x0a'+_0x973ef0[_0x29907c(0xd4)](',\x0a')+('\x0a'+_0xb74c45+']');}if(typeof _0x16bea8===_0x29907c(0xe9)){const _0x4df489=Object['entries'](_0x16bea8);if(_0x4df489[_0x29907c(0xd6)]===0x0)return'{}';const _0x42c0bf=_0x4df489['map'](([_0x1c26c4,_0x3789fa])=>{const _0x54fac0=_0x29907c,_0x17782d=colorJSONKey(JSON[_0x54fac0(0xe2)](_0x1c26c4),_0x420f35),_0x36b9d6=colorizeJSON(_0x3789fa,_0x420f35,_0x32fa39);return''+'\x20'[_0x54fac0(0xe4)](_0x32fa39)+_0x17782d+':\x20'+_0x36b9d6;});return'{\x0a'+_0x42c0bf[_0x29907c(0xd4)](',\x0a')+('\x0a'+_0xb74c45+'}');}return String(_0x16bea8);}function a96_0x33b8(){const _0x23db05=['length','boolean','2153502zFXDGl','1719wczzhd','entries','3038PbwjZq','string','8490RCCGYC','blue','3912HVqlFx','26ldMfgU','288080NcTnNd','stringify','color','repeat','number','1271751DXBWms','12Ouojzi','1338447usXRwI','object','green','null','cyan','map','dim','env','noColor','stdout','isArray','NO_COLOR','4KLZdxx','join','38270VJDcrN'];a96_0x33b8=function(){return _0x23db05;};return a96_0x33b8();}
1
+ (function(_0x421562,_0xea6535){const _0x18900c=a96_0x540a,_0x3a0e60=_0x421562();while(!![]){try{const _0x58d8ce=parseInt(_0x18900c(0x1a8))/0x1+-parseInt(_0x18900c(0x1ae))/0x2+-parseInt(_0x18900c(0x1b2))/0x3*(-parseInt(_0x18900c(0x1a6))/0x4)+-parseInt(_0x18900c(0x1b3))/0x5+-parseInt(_0x18900c(0x1ad))/0x6+-parseInt(_0x18900c(0x1b0))/0x7+parseInt(_0x18900c(0x1a7))/0x8*(parseInt(_0x18900c(0x1ab))/0x9);if(_0x58d8ce===_0xea6535)break;else _0x3a0e60['push'](_0x3a0e60['shift']());}catch(_0x4b074f){_0x3a0e60['push'](_0x3a0e60['shift']());}}}(a96_0x59e1,0x57a85));import{Chalk}from'chalk';export function shouldUseColor(_0x44237c={}){const _0x2bcaef=a96_0x540a;if(_0x44237c['noColor']===!![])return![];if(_0x44237c['color']===!![])return!![];if(process[_0x2bcaef(0x1ba)]['NO_COLOR']!==undefined)return![];return process['stdout'][_0x2bcaef(0x1b8)]??![];}export function getChalk(_0x4beb5a={}){if(shouldUseColor(_0x4beb5a))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x8a1018,_0x14df7f={}){const _0x2b2c25=a96_0x540a;return getChalk(_0x14df7f)[_0x2b2c25(0x1b7)](_0x8a1018);}export function colorHeader(_0x3ff746,_0x2f7ceb={}){return getChalk(_0x2f7ceb)['cyan'](_0x3ff746);}export function colorType(_0x26ce5b,_0xd2d39d={}){const _0x42b3dc=a96_0x540a;return getChalk(_0xd2d39d)[_0x42b3dc(0x1b7)](_0x26ce5b);}export function colorJSONKey(_0x12d2ba,_0x14b958={}){const _0x26f87d=a96_0x540a;return getChalk(_0x14b958)[_0x26f87d(0x1b4)](_0x12d2ba);}function a96_0x59e1(){const _0x859384=['repeat','7973136elGmmo','string','2939004YKAlTk','18712lbsSBY','green','4734142YVSNck','join','1389yCzxnl','3114660sBMAia','blue','length','map','dim','isTTY','yellow','env','boolean','number','entries','null','isArray','cyan','object','316BTVMRG','16FtbtNc','349088BsTLiX','stringify'];a96_0x59e1=function(){return _0x859384;};return a96_0x59e1();}export function colorJSONString(_0x1987d3,_0x423d8a={}){const _0xefda14=a96_0x540a;return getChalk(_0x423d8a)[_0xefda14(0x1af)](_0x1987d3);}export function colorJSONNumber(_0x445b8d,_0x9e83ec={}){const _0x3979f0=a96_0x540a;return getChalk(_0x9e83ec)[_0x3979f0(0x1a4)](_0x445b8d);}export function colorJSONBoolean(_0x12ea96,_0x2f975b={}){const _0x3dce68=a96_0x540a;return getChalk(_0x2f975b)[_0x3dce68(0x1b9)](_0x12ea96);}export function colorJSONNull(_0x46de21,_0x4ed6f8={}){return getChalk(_0x4ed6f8)['dim'](_0x46de21);}export function colorizeJSONCompact(_0x427680,_0x10489f={}){const _0x16589c=a96_0x540a;if(!shouldUseColor(_0x10489f))return JSON['stringify'](_0x427680);if(_0x427680===null)return colorJSONNull(_0x16589c(0x1be),_0x10489f);if(typeof _0x427680===_0x16589c(0x1bb))return colorJSONBoolean(String(_0x427680),_0x10489f);if(typeof _0x427680==='number')return colorJSONNumber(String(_0x427680),_0x10489f);if(typeof _0x427680===_0x16589c(0x1ac))return colorJSONString(JSON[_0x16589c(0x1a9)](_0x427680),_0x10489f);if(Array[_0x16589c(0x1bf)](_0x427680)){if(_0x427680[_0x16589c(0x1b5)]===0x0)return'[]';const _0x3c467a=_0x427680['map'](_0x1c3adc=>colorizeJSONCompact(_0x1c3adc,_0x10489f));return'['+_0x3c467a[_0x16589c(0x1b1)](',')+']';}if(typeof _0x427680==='object'){const _0x28041b=Object[_0x16589c(0x1bd)](_0x427680);if(_0x28041b[_0x16589c(0x1b5)]===0x0)return'{}';const _0x411c5e=_0x28041b[_0x16589c(0x1b6)](([_0x1b7a2a,_0x80d8d9])=>{const _0x2cab7c=_0x16589c,_0x38ee41=colorJSONKey(JSON[_0x2cab7c(0x1a9)](_0x1b7a2a),_0x10489f),_0x1e93b1=colorizeJSONCompact(_0x80d8d9,_0x10489f);return _0x38ee41+':'+_0x1e93b1;});return'{'+_0x411c5e[_0x16589c(0x1b1)](',')+'}';}return String(_0x427680);}function a96_0x540a(_0x44a89b,_0x1372a5){_0x44a89b=_0x44a89b-0x1a4;const _0x59e121=a96_0x59e1();let _0x540a4e=_0x59e121[_0x44a89b];return _0x540a4e;}export function colorizeJSON(_0x5ecdf5,_0x266ea7={},_0x4aff33=0x0){const _0x4d589b=a96_0x540a;if(!shouldUseColor(_0x266ea7))return JSON[_0x4d589b(0x1a9)](_0x5ecdf5,null,0x2);const _0x4f84ae='\x20'['repeat'](_0x4aff33),_0x13c8d2=_0x4aff33+0x2;if(_0x5ecdf5===null)return colorJSONNull('null',_0x266ea7);if(typeof _0x5ecdf5===_0x4d589b(0x1bb))return colorJSONBoolean(String(_0x5ecdf5),_0x266ea7);if(typeof _0x5ecdf5===_0x4d589b(0x1bc))return colorJSONNumber(String(_0x5ecdf5),_0x266ea7);if(typeof _0x5ecdf5==='string')return colorJSONString(JSON[_0x4d589b(0x1a9)](_0x5ecdf5),_0x266ea7);if(Array[_0x4d589b(0x1bf)](_0x5ecdf5)){if(_0x5ecdf5[_0x4d589b(0x1b5)]===0x0)return'[]';const _0x115eba=_0x5ecdf5[_0x4d589b(0x1b6)](_0x88e45b=>{const _0x5a5546=_0x4d589b,_0x443e01=colorizeJSON(_0x88e45b,_0x266ea7,_0x13c8d2);return''+'\x20'[_0x5a5546(0x1aa)](_0x13c8d2)+_0x443e01;});return'[\x0a'+_0x115eba['join'](',\x0a')+('\x0a'+_0x4f84ae+']');}if(typeof _0x5ecdf5===_0x4d589b(0x1a5)){const _0x512c59=Object[_0x4d589b(0x1bd)](_0x5ecdf5);if(_0x512c59[_0x4d589b(0x1b5)]===0x0)return'{}';const _0x37182b=_0x512c59[_0x4d589b(0x1b6)](([_0x474bcc,_0x2f7814])=>{const _0x3c43a7=_0x4d589b,_0x3fe2e1=colorJSONKey(JSON[_0x3c43a7(0x1a9)](_0x474bcc),_0x266ea7),_0x26e914=colorizeJSON(_0x2f7814,_0x266ea7,_0x13c8d2);return''+'\x20'[_0x3c43a7(0x1aa)](_0x13c8d2)+_0x3fe2e1+':\x20'+_0x26e914;});return'{\x0a'+_0x37182b[_0x4d589b(0x1b1)](',\x0a')+('\x0a'+_0x4f84ae+'}');}return String(_0x5ecdf5);}
@@ -1 +1 @@
1
- (function(_0x122724,_0x2f2b1e){const _0x48706b=a97_0x3e3e,_0x277545=_0x122724();while(!![]){try{const _0x3f3949=-parseInt(_0x48706b(0x7a))/0x1*(-parseInt(_0x48706b(0x7e))/0x2)+-parseInt(_0x48706b(0xa5))/0x3+-parseInt(_0x48706b(0x89))/0x4+-parseInt(_0x48706b(0x83))/0x5*(-parseInt(_0x48706b(0x9d))/0x6)+parseInt(_0x48706b(0x84))/0x7+-parseInt(_0x48706b(0x9a))/0x8+-parseInt(_0x48706b(0xa2))/0x9*(-parseInt(_0x48706b(0x93))/0xa);if(_0x3f3949===_0x2f2b1e)break;else _0x277545['push'](_0x277545['shift']());}catch(_0x2ccd42){_0x277545['push'](_0x277545['shift']());}}}(a97_0x4814,0x730cc));import{writeFileSync}from'fs';function a97_0x4814(){const _0x55ca9c=['debug','stderr','error','cyan','double','37VaSxSq','params','No\x20data','pipe','20758Bsawsm','log','[params]','forEach','end','10IuuafY','6459208hYpZGO','write','bold','stringify','repeat','1947092HBOrOU','limit','filter','less','FINISHED','[error]','query','[Object]','[query]','object','260vDcSfj','isTTY','push','cmdout','Results\x20saved\x20to\x20','close','split','3363936LRkmzS','output','trim','1487766HKIdwq','varchar','─┴─','format','inherit','18054TJXEgx','length','-FXRSn','1429008MMAejH','resolve','stdin','tsv','jsonl','bigint','isInteger','padEnd','sdk-result','keys','magenta','max','table','boolean','blue','join','entries','[rule]','noColor','yellow','json','rule','map'];a97_0x4814=function(){return _0x55ca9c;};return a97_0x4814();}import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a97_0x5b71e8 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';function a97_0x3e3e(_0x2e617a,_0x4ab262){_0x2e617a=_0x2e617a-0x70;const _0x481491=a97_0x4814();let _0x3e3e70=_0x481491[_0x2e617a];return _0x3e3e70;}export function isStructuredFormat(_0x164192){const _0x34aa95=a97_0x3e3e;return _0x164192[_0x34aa95(0xa0)]===_0x34aa95(0x72)||_0x164192[_0x34aa95(0xa0)]===_0x34aa95(0xa9)||_0x164192[_0x34aa95(0xa0)]===_0x34aa95(0xa8)||_0x164192[_0x34aa95(0xa0)]===_0x34aa95(0xb1)||_0x164192[_0x34aa95(0x72)]===!![]||_0x164192['jsonl']===!![]||_0x164192[_0x34aa95(0xa8)]===!![]||_0x164192[_0x34aa95(0xb1)]===!![];}export function parseOutputOptions(_0x438d36){const _0x516db4=a97_0x3e3e;return{'format':_0x438d36['format']||'table','output':_0x438d36['output']||'','limit':_0x438d36[_0x516db4(0x8a)],'color':_0x438d36['color'],'noColor':_0x438d36[_0x516db4(0x70)]};}function convertSDKResultToQueryResult(_0x126259){const _0x36c015=a97_0x3e3e,_0x2b59d8=[];if(_0x126259['length']>0x0){const _0x3f58ae=_0x126259[0x0];for(const [_0x26bd63,_0x59e664]of Object[_0x36c015(0xb5)](_0x3f58ae)){let _0x5a5a15=_0x36c015(0x9e);if(typeof _0x59e664==='number')_0x5a5a15=Number[_0x36c015(0xab)](_0x59e664)?_0x36c015(0xaa):_0x36c015(0x79);else{if(typeof _0x59e664===_0x36c015(0xb2))_0x5a5a15=_0x36c015(0xb2);else _0x59e664===null&&(_0x5a5a15='varchar');}_0x2b59d8[_0x36c015(0x95)]({'name':_0x26bd63,'type':_0x5a5a15});}}return{'queryId':_0x36c015(0xad),'columns':_0x2b59d8,'data':_0x126259,'stats':{'state':_0x36c015(0x8d),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x126259['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x52f9be,_0x587175){const _0x36c8e3=convertSDKResultToQueryResult(_0x52f9be);return formatQueryOutput(_0x36c8e3,_0x587175);}export async function formatQueryOutput(_0x16973e,_0x3cfdba){const _0x16f9c6=a97_0x3e3e,{format:_0x135ae6,limit:_0x502c03,output:_0x98376b,color:_0x1f42c3,noColor:_0x486091}=_0x3cfdba,_0x250d2e=Boolean(_0x98376b)&&!_0x1f42c3,_0x3c2e26={'color':_0x1f42c3,'noColor':_0x486091||_0x250d2e};if(_0x135ae6==='table'){const _0x59d414=shouldUseLess(_0x135ae6,_0x98376b);return formatAsTable(_0x16973e,_0x502c03,_0x59d414,_0x3c2e26);}else{if(_0x135ae6===_0x16f9c6(0x72))return formatAsJSON(_0x16973e,_0x3c2e26);else return _0x135ae6===_0x16f9c6(0xa9)?formatAsJSONL(_0x16973e,_0x3c2e26):formatQueryResult(_0x16973e,_0x135ae6);}}function shouldUseLess(_0x1ef677,_0x136c2c){const _0x54676c=a97_0x3e3e;return _0x1ef677===_0x54676c(0xb1)&&process['stdout'][_0x54676c(0x94)]&&!_0x136c2c;}export function resolveOutputOptions(_0x3578b2){const _0x5e5cd9=a97_0x3e3e,_0x3eef71=resolveOutputFormat(_0x3578b2[_0x5e5cd9(0xa0)],_0x3578b2[_0x5e5cd9(0x9b)],_0x5e5cd9(0xb1));let _0x1ff18b=typeof _0x3578b2['limit']==='number'?_0x3578b2[_0x5e5cd9(0x8a)]:parseInt(_0x3578b2[_0x5e5cd9(0x8a)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x1670ef=_0x3578b2[_0x5e5cd9(0x9b)]||'';return shouldUseLess(_0x3eef71,_0x1670ef)&&(_0x1ff18b=Infinity),{'format':_0x3eef71,'output':_0x1670ef,'limit':_0x1ff18b,'color':_0x3578b2['color'],'noColor':_0x3578b2[_0x5e5cd9(0x70)]};}export function writeOutput(_0x358f77,_0x50d610,_0x21bc01){const _0x7cc6e0=a97_0x3e3e;return _0x50d610?(writeFileSync(_0x50d610,_0x358f77),console[_0x7cc6e0(0x77)](_0x7cc6e0(0x97)+_0x50d610),Promise[_0x7cc6e0(0xa6)]()):shouldUseLess(_0x21bc01||'','')?new Promise(_0xaf2a8d=>{const _0xa73a2c=_0x7cc6e0,_0x4d80d3=spawn(_0xa73a2c(0x8c),[_0xa73a2c(0xa4)],{'stdio':[_0xa73a2c(0x7d),_0xa73a2c(0xa1),_0xa73a2c(0xa1)]});let _0x44928a=![];_0x4d80d3['on'](_0xa73a2c(0x77),()=>{const _0x1bcbec=_0xa73a2c;!_0x44928a&&(_0x44928a=!![],console[_0x1bcbec(0x7f)](_0x358f77),_0xaf2a8d());}),_0x4d80d3['on'](_0xa73a2c(0x98),()=>{!_0x44928a&&(_0x44928a=!![],_0xaf2a8d());}),_0x4d80d3['on']('spawn',()=>{const _0x495573=_0xa73a2c;!_0x44928a&&_0x4d80d3['stdin']&&(_0x4d80d3[_0x495573(0xa7)]['on']('error',()=>{}),_0x4d80d3[_0x495573(0xa7)][_0x495573(0x85)](_0x358f77),_0x4d80d3[_0x495573(0xa7)][_0x495573(0x82)]());}),!_0x4d80d3[_0xa73a2c(0xa7)]&&(!_0x44928a&&(_0x44928a=!![],console['log'](_0x358f77),_0xaf2a8d()));}):(console['log'](_0x358f77),Promise['resolve']());}export async function handleSDKOutput(_0xedd7e8,_0x157d25){const _0x4a4166=a97_0x3e3e,_0x17039b=resolveOutputOptions(_0x157d25),_0x2c3c76=await formatSDKOutput(_0xedd7e8,_0x17039b);await writeOutput(_0x2c3c76,_0x17039b[_0x4a4166(0x9b)]||undefined,_0x17039b['format']);}export async function handleQueryOutput(_0x168b69,_0x4c9b3b){const _0x3e7900=a97_0x3e3e,_0x452115=resolveOutputOptions(_0x4c9b3b),_0x38ba87=await formatQueryOutput(_0x168b69,_0x452115);await writeOutput(_0x38ba87,_0x452115['output']||undefined,_0x452115[_0x3e7900(0xa0)]);}async function formatSingleObject(_0x2fc468,_0x4615fd){const _0x3f0e0b=a97_0x3e3e,{format:_0x536791,color:_0x34eeb0,noColor:_0x331b73}=_0x4615fd,_0x497b00={'color':_0x34eeb0,'noColor':_0x331b73};if(_0x536791===_0x3f0e0b(0x72)){if(shouldUseColor(_0x497b00))return colorizeJSON(_0x2fc468,_0x497b00);return JSON[_0x3f0e0b(0x87)](_0x2fc468,null,0x2);}else{if(_0x536791===_0x3f0e0b(0xa9)){if(shouldUseColor(_0x497b00))return colorizeJSONCompact(_0x2fc468,_0x497b00);return JSON[_0x3f0e0b(0x87)](_0x2fc468);}else{if(_0x536791===_0x3f0e0b(0xa8))return Object[_0x3f0e0b(0xb5)](_0x2fc468)[_0x3f0e0b(0x74)](([_0x3600cc,_0xf687f6])=>_0x3600cc+'\x09'+_0xf687f6)[_0x3f0e0b(0xb4)]('\x0a');else{const _0x48c426=Object['entries'](_0x2fc468);if(_0x48c426[_0x3f0e0b(0xa3)]===0x0)return _0x3f0e0b(0x7c);const _0x3e8127=_0x2fc468['debug'],_0x541518=_0x2fc468[_0x3f0e0b(0x8f)],_0x1164f8=_0x2fc468['params'],_0x10a531=_0x2fc468[_0x3f0e0b(0x73)],_0x2cb3a0=_0x541518?typeof _0x541518==='string'?_0x541518:JSON[_0x3f0e0b(0x87)](_0x541518,null,0x2):undefined,_0x2febfb=_0x1164f8&&Object[_0x3f0e0b(0xae)](_0x1164f8)[_0x3f0e0b(0xa3)]>0x0?JSON[_0x3f0e0b(0x87)](_0x1164f8,null,0x2):undefined,_0xd394b4=_0x10a531&&Object[_0x3f0e0b(0xae)](_0x10a531)['length']>0x0?JSON[_0x3f0e0b(0x87)](_0x10a531,null,0x2):undefined,_0x5342e2=_0x48c426[_0x3f0e0b(0x8b)](([_0x299e02])=>_0x299e02!==_0x3f0e0b(0x75)&&_0x299e02!==_0x3f0e0b(0x8f)&&_0x299e02!==_0x3f0e0b(0x7b)&&_0x299e02!==_0x3f0e0b(0x73)),_0x34cdcb=Math[_0x3f0e0b(0xb0)](..._0x5342e2[_0x3f0e0b(0x74)](([_0x30ba3e])=>_0x30ba3e[_0x3f0e0b(0xa3)])),_0xa1b7fb=Math[_0x3f0e0b(0xb0)](..._0x5342e2[_0x3f0e0b(0x74)](([,_0x3a5695])=>{const _0xc1c28d=_0x3f0e0b;try{const _0x5de733=_0x3a5695===null||_0x3a5695===undefined?'':typeof _0x3a5695===_0xc1c28d(0x92)?JSON[_0xc1c28d(0x87)](_0x3a5695):String(_0x3a5695),_0x45b5a7=_0x5de733[_0xc1c28d(0x99)]('\x0a');return Math[_0xc1c28d(0xb0)](..._0x45b5a7[_0xc1c28d(0x74)](_0x3a8df5=>_0x3a8df5['length']),0x0);}catch{return 0x0;}}),0x14),_0x1f2753=[];_0x1f2753['push'](colorBorder('┌─'+'─'['repeat'](_0x34cdcb)+'─┬─'+'─'[_0x3f0e0b(0x88)](_0xa1b7fb)+'─┐',_0x497b00)),_0x5342e2[_0x3f0e0b(0x81)](([_0x562997,_0x38fe3c])=>{const _0x5145b2=_0x3f0e0b;let _0x247eae;try{_0x247eae=_0x38fe3c===null||_0x38fe3c===undefined?'':typeof _0x38fe3c===_0x5145b2(0x92)?JSON[_0x5145b2(0x87)](_0x38fe3c):String(_0x38fe3c);}catch{_0x247eae=_0x5145b2(0x90);}const _0x36ae1d=_0x562997['padEnd'](_0x34cdcb),_0x3c0781=_0x247eae['split']('\x0a');_0x3c0781['forEach']((_0xbe0e75,_0x2f5e50)=>{const _0x3cc479=_0x5145b2,_0x315715=colorBorder('│',_0x497b00);_0x2f5e50===0x0?_0x1f2753['push'](_0x315715+'\x20'+_0x36ae1d+'\x20'+_0x315715+'\x20'+_0xbe0e75[_0x3cc479(0xac)](_0xa1b7fb)+'\x20'+_0x315715):_0x1f2753['push'](_0x315715+'\x20'+'\x20'[_0x3cc479(0x88)](_0x34cdcb)+'\x20'+_0x315715+'\x20'+_0xbe0e75[_0x3cc479(0xac)](_0xa1b7fb)+'\x20'+_0x315715);});}),_0x1f2753[_0x3f0e0b(0x95)](colorBorder('└─'+'─'[_0x3f0e0b(0x88)](_0x34cdcb)+_0x3f0e0b(0x9f)+'─'['repeat'](_0xa1b7fb)+'─┘',_0x497b00));_0x2cb3a0&&(_0x1f2753[_0x3f0e0b(0x95)](''),_0x1f2753[_0x3f0e0b(0x95)](String(a97_0x5b71e8[_0x3f0e0b(0x71)]['bold'](_0x3f0e0b(0x91)))),_0x1f2753[_0x3f0e0b(0x95)](_0x2cb3a0));_0x2febfb&&(_0x1f2753[_0x3f0e0b(0x95)](''),_0x1f2753['push'](String(a97_0x5b71e8[_0x3f0e0b(0xb3)][_0x3f0e0b(0x86)](_0x3f0e0b(0x80)))),_0x1f2753[_0x3f0e0b(0x95)](_0x2febfb));_0xd394b4&&(_0x1f2753[_0x3f0e0b(0x95)](''),_0x1f2753[_0x3f0e0b(0x95)](String(a97_0x5b71e8[_0x3f0e0b(0xaf)][_0x3f0e0b(0x86)](_0x3f0e0b(0xb6)))),_0x1f2753[_0x3f0e0b(0x95)](_0xd394b4));if(_0x3e8127){if(_0x3e8127[_0x3f0e0b(0x76)]){_0x1f2753['push'](''),_0x1f2753[_0x3f0e0b(0x95)](String(a97_0x5b71e8['red'][_0x3f0e0b(0x86)](_0x3f0e0b(0x8e))));const _0x2ef93e=_0x3e8127[_0x3f0e0b(0x76)]['split']('\x0a');_0x2ef93e[_0x3f0e0b(0x81)](_0x115209=>{const _0xe6bcf5=_0x3f0e0b;_0x115209[_0xe6bcf5(0x9c)]()&&_0x1f2753['push'](_0x115209);});}if(_0x3e8127[_0x3f0e0b(0x96)]){_0x1f2753['push'](''),_0x1f2753['push'](String(a97_0x5b71e8[_0x3f0e0b(0x78)][_0x3f0e0b(0x86)]('[logs]')));const _0x36700d=_0x3e8127[_0x3f0e0b(0x96)][_0x3f0e0b(0x99)]('\x0a');_0x36700d[_0x3f0e0b(0x81)](_0x57c1a7=>{const _0x176681=_0x3f0e0b;_0x57c1a7[_0x176681(0x9c)]()&&_0x1f2753[_0x176681(0x95)](_0x57c1a7);});}}return _0x1f2753[_0x3f0e0b(0xb4)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x308558,_0x281c80){const _0x21e78c=a97_0x3e3e;if(_0x281c80[_0x21e78c(0xa0)]===_0x21e78c(0xb1)){await handleSDKOutput([_0x308558],_0x281c80);return;}const _0x369d38=resolveOutputOptions(_0x281c80),_0x31eea7=await formatSingleObject(_0x308558,_0x369d38);await writeOutput(_0x31eea7,_0x369d38[_0x21e78c(0x9b)]||undefined,_0x369d38[_0x21e78c(0xa0)]);}
1
+ function a97_0x3f10(){const _0x1f9e73=['join','boolean','stdout','noColor','debug','6402704naojUm','json','log','cmdout','1200345YzhkMe','tsv','─┬─','repeat','table','22491360NxLxDz','map','double','params','2MXzyDC','yellow','blue','length','isTTY','varchar','output','color','number','jsonl','resolve','No\x20data','error','sdk-result','end','limit','stringify','450UZXlBT','inherit','stderr','─┴─','format','red','query','bigint','FINISHED','object','max','bold','magenta','padEnd','[params]','entries','less','close','1709627GWZtmf','16ecGvdw','[query]','spawn','4683889GXfnsb','7411248yfMxdl','forEach','write','stdin','[rule]','push','split','rule','23015srcdDN','cyan','keys','filter','isInteger','[error]'];a97_0x3f10=function(){return _0x1f9e73;};return a97_0x3f10();}(function(_0x334d3d,_0x9296d1){const _0x47cab3=a97_0x1851,_0x3acd2f=_0x334d3d();while(!![]){try{const _0x176f1e=parseInt(_0x47cab3(0x1b3))/0x1*(-parseInt(_0x47cab3(0x190))/0x2)+-parseInt(_0x47cab3(0x187))/0x3+parseInt(_0x47cab3(0x183))/0x4+parseInt(_0x47cab3(0x1c0))/0x5*(-parseInt(_0x47cab3(0x1a1))/0x6)+parseInt(_0x47cab3(0x1b7))/0x7*(-parseInt(_0x47cab3(0x1b4))/0x8)+parseInt(_0x47cab3(0x1b8))/0x9+parseInt(_0x47cab3(0x18c))/0xa;if(_0x176f1e===_0x9296d1)break;else _0x3acd2f['push'](_0x3acd2f['shift']());}catch(_0x40d3a6){_0x3acd2f['push'](_0x3acd2f['shift']());}}}(a97_0x3f10,0xd6dbf));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a97_0x3fab2 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function isStructuredFormat(_0x507fd6){const _0x5e3441=a97_0x1851;return _0x507fd6[_0x5e3441(0x1a5)]===_0x5e3441(0x184)||_0x507fd6[_0x5e3441(0x1a5)]===_0x5e3441(0x199)||_0x507fd6[_0x5e3441(0x1a5)]===_0x5e3441(0x188)||_0x507fd6[_0x5e3441(0x1a5)]==='table'||_0x507fd6[_0x5e3441(0x184)]===!![]||_0x507fd6[_0x5e3441(0x199)]===!![]||_0x507fd6['tsv']===!![]||_0x507fd6[_0x5e3441(0x18b)]===!![];}export function parseOutputOptions(_0x1a9ddc){const _0x2e7a4e=a97_0x1851;return{'format':_0x1a9ddc['format']||_0x2e7a4e(0x18b),'output':_0x1a9ddc['output']||'','limit':_0x1a9ddc['limit'],'color':_0x1a9ddc[_0x2e7a4e(0x197)],'noColor':_0x1a9ddc[_0x2e7a4e(0x181)]};}function convertSDKResultToQueryResult(_0x3ec3c8){const _0x6865f7=a97_0x1851,_0x2d94ca=[];if(_0x3ec3c8[_0x6865f7(0x193)]>0x0){const _0x2f1183=_0x3ec3c8[0x0];for(const [_0x2d5e42,_0x353eac]of Object['entries'](_0x2f1183)){let _0x4fab7e='varchar';if(typeof _0x353eac===_0x6865f7(0x198))_0x4fab7e=Number[_0x6865f7(0x17c)](_0x353eac)?_0x6865f7(0x1a8):_0x6865f7(0x18e);else{if(typeof _0x353eac===_0x6865f7(0x17f))_0x4fab7e=_0x6865f7(0x17f);else _0x353eac===null&&(_0x4fab7e=_0x6865f7(0x195));}_0x2d94ca[_0x6865f7(0x1bd)]({'name':_0x2d5e42,'type':_0x4fab7e});}}return{'queryId':_0x6865f7(0x19d),'columns':_0x2d94ca,'data':_0x3ec3c8,'stats':{'state':_0x6865f7(0x1a9),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3ec3c8[_0x6865f7(0x193)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x1d6f82,_0x414812){const _0x3d77a5=convertSDKResultToQueryResult(_0x1d6f82);return formatQueryOutput(_0x3d77a5,_0x414812);}function a97_0x1851(_0x3a013f,_0x5e6264){_0x3a013f=_0x3a013f-0x179;const _0x3f1060=a97_0x3f10();let _0x185161=_0x3f1060[_0x3a013f];return _0x185161;}export async function formatQueryOutput(_0xf69f52,_0x45600f){const _0x5b78d2=a97_0x1851,{format:_0x19c814,limit:_0x45c06a,output:_0x53e0e2,color:_0x389384,noColor:_0x40c608}=_0x45600f,_0x4c872d=Boolean(_0x53e0e2)&&!_0x389384,_0x39e13a={'color':_0x389384,'noColor':_0x40c608||_0x4c872d};if(_0x19c814===_0x5b78d2(0x18b)){const _0x548770=shouldUseLess(_0x19c814,_0x53e0e2);return formatAsTable(_0xf69f52,_0x45c06a,_0x548770,_0x39e13a);}else{if(_0x19c814===_0x5b78d2(0x184))return formatAsJSON(_0xf69f52,_0x39e13a);else return _0x19c814==='jsonl'?formatAsJSONL(_0xf69f52,_0x39e13a):formatQueryResult(_0xf69f52,_0x19c814);}}function shouldUseLess(_0x50c361,_0x1bbf4b){const _0x14d37f=a97_0x1851;return _0x50c361===_0x14d37f(0x18b)&&process[_0x14d37f(0x180)][_0x14d37f(0x194)]&&!_0x1bbf4b;}export function resolveOutputOptions(_0x2a712d){const _0x510be0=a97_0x1851,_0x167517=resolveOutputFormat(_0x2a712d[_0x510be0(0x1a5)],_0x2a712d['output'],_0x510be0(0x18b));let _0x4b9e2a=typeof _0x2a712d[_0x510be0(0x19f)]===_0x510be0(0x198)?_0x2a712d[_0x510be0(0x19f)]:parseInt(_0x2a712d[_0x510be0(0x19f)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x3edb1a=_0x2a712d[_0x510be0(0x196)]||'';return shouldUseLess(_0x167517,_0x3edb1a)&&(_0x4b9e2a=Infinity),{'format':_0x167517,'output':_0x3edb1a,'limit':_0x4b9e2a,'color':_0x2a712d['color'],'noColor':_0x2a712d[_0x510be0(0x181)]};}export function writeOutput(_0x3411c2,_0x1f8f4d,_0x486a91){const _0x2f605e=a97_0x1851;return _0x1f8f4d?(writeFileSync(_0x1f8f4d,_0x3411c2),console[_0x2f605e(0x19c)]('Results\x20saved\x20to\x20'+_0x1f8f4d),Promise[_0x2f605e(0x19a)]()):shouldUseLess(_0x486a91||'','')?new Promise(_0xddf73e=>{const _0x249c99=_0x2f605e,_0x10b99c=spawn(_0x249c99(0x1b1),['-FXRSn'],{'stdio':['pipe','inherit',_0x249c99(0x1a2)]});let _0x1a19ab=![];_0x10b99c['on'](_0x249c99(0x19c),()=>{!_0x1a19ab&&(_0x1a19ab=!![],console['log'](_0x3411c2),_0xddf73e());}),_0x10b99c['on'](_0x249c99(0x1b2),()=>{!_0x1a19ab&&(_0x1a19ab=!![],_0xddf73e());}),_0x10b99c['on'](_0x249c99(0x1b6),()=>{const _0x7aece3=_0x249c99;!_0x1a19ab&&_0x10b99c[_0x7aece3(0x1bb)]&&(_0x10b99c['stdin']['on'](_0x7aece3(0x19c),()=>{}),_0x10b99c['stdin'][_0x7aece3(0x1ba)](_0x3411c2),_0x10b99c[_0x7aece3(0x1bb)][_0x7aece3(0x19e)]());}),!_0x10b99c[_0x249c99(0x1bb)]&&(!_0x1a19ab&&(_0x1a19ab=!![],console[_0x249c99(0x185)](_0x3411c2),_0xddf73e()));}):(console[_0x2f605e(0x185)](_0x3411c2),Promise[_0x2f605e(0x19a)]());}export async function handleSDKOutput(_0x19426e,_0x3a163a){const _0x1e4082=a97_0x1851,_0x3bc6a4=resolveOutputOptions(_0x3a163a),_0x38d5e6=await formatSDKOutput(_0x19426e,_0x3bc6a4);await writeOutput(_0x38d5e6,_0x3bc6a4[_0x1e4082(0x196)]||undefined,_0x3bc6a4[_0x1e4082(0x1a5)]);}export async function handleQueryOutput(_0x59bd34,_0x3db447){const _0x3a0b4d=resolveOutputOptions(_0x3db447),_0x463ece=await formatQueryOutput(_0x59bd34,_0x3a0b4d);await writeOutput(_0x463ece,_0x3a0b4d['output']||undefined,_0x3a0b4d['format']);}async function formatSingleObject(_0x4cb521,_0x59159a){const _0x23161c=a97_0x1851,{format:_0x2b40bf,color:_0x54b601,noColor:_0x4f64c6}=_0x59159a,_0x2be686={'color':_0x54b601,'noColor':_0x4f64c6};if(_0x2b40bf===_0x23161c(0x184)){if(shouldUseColor(_0x2be686))return colorizeJSON(_0x4cb521,_0x2be686);return JSON[_0x23161c(0x1a0)](_0x4cb521,null,0x2);}else{if(_0x2b40bf===_0x23161c(0x199)){if(shouldUseColor(_0x2be686))return colorizeJSONCompact(_0x4cb521,_0x2be686);return JSON['stringify'](_0x4cb521);}else{if(_0x2b40bf===_0x23161c(0x188))return Object[_0x23161c(0x1b0)](_0x4cb521)[_0x23161c(0x18d)](([_0x3e2a22,_0x30f3d7])=>_0x3e2a22+'\x09'+_0x30f3d7)[_0x23161c(0x17e)]('\x0a');else{const _0x47d85f=Object['entries'](_0x4cb521);if(_0x47d85f[_0x23161c(0x193)]===0x0)return _0x23161c(0x19b);const _0x142e21=_0x4cb521['debug'],_0x5e2e14=_0x4cb521[_0x23161c(0x1a7)],_0x57e4f0=_0x4cb521[_0x23161c(0x18f)],_0x54c805=_0x4cb521[_0x23161c(0x1bf)],_0x1471c0=_0x5e2e14?typeof _0x5e2e14==='string'?_0x5e2e14:JSON['stringify'](_0x5e2e14,null,0x2):undefined,_0x226a85=_0x57e4f0&&Object['keys'](_0x57e4f0)['length']>0x0?JSON[_0x23161c(0x1a0)](_0x57e4f0,null,0x2):undefined,_0x3e7ea1=_0x54c805&&Object[_0x23161c(0x17a)](_0x54c805)[_0x23161c(0x193)]>0x0?JSON[_0x23161c(0x1a0)](_0x54c805,null,0x2):undefined,_0x5f48a0=_0x47d85f[_0x23161c(0x17b)](([_0x198bdb])=>_0x198bdb!==_0x23161c(0x182)&&_0x198bdb!=='query'&&_0x198bdb!==_0x23161c(0x18f)&&_0x198bdb!=='rule'),_0x595ed0=Math[_0x23161c(0x1ab)](..._0x5f48a0[_0x23161c(0x18d)](([_0x45b771])=>_0x45b771[_0x23161c(0x193)])),_0x4eb758=Math['max'](..._0x5f48a0[_0x23161c(0x18d)](([,_0x2c7d3e])=>{const _0x1b37b9=_0x23161c;try{const _0x1cf6e4=_0x2c7d3e===null||_0x2c7d3e===undefined?'':typeof _0x2c7d3e===_0x1b37b9(0x1aa)?JSON[_0x1b37b9(0x1a0)](_0x2c7d3e):String(_0x2c7d3e),_0x4a70bc=_0x1cf6e4[_0x1b37b9(0x1be)]('\x0a');return Math[_0x1b37b9(0x1ab)](..._0x4a70bc[_0x1b37b9(0x18d)](_0x261712=>_0x261712[_0x1b37b9(0x193)]),0x0);}catch{return 0x0;}}),0x14),_0x4ac888=[];_0x4ac888['push'](colorBorder('┌─'+'─'[_0x23161c(0x18a)](_0x595ed0)+_0x23161c(0x189)+'─'[_0x23161c(0x18a)](_0x4eb758)+'─┐',_0x2be686)),_0x5f48a0[_0x23161c(0x1b9)](([_0x56aaaf,_0x4537b7])=>{const _0x327045=_0x23161c;let _0xe31df4;try{_0xe31df4=_0x4537b7===null||_0x4537b7===undefined?'':typeof _0x4537b7===_0x327045(0x1aa)?JSON[_0x327045(0x1a0)](_0x4537b7):String(_0x4537b7);}catch{_0xe31df4='[Object]';}const _0x5dbcff=_0x56aaaf[_0x327045(0x1ae)](_0x595ed0),_0xf6602f=_0xe31df4[_0x327045(0x1be)]('\x0a');_0xf6602f[_0x327045(0x1b9)]((_0x30ab9c,_0x392e75)=>{const _0x19e08c=_0x327045,_0x4a9956=colorBorder('│',_0x2be686);_0x392e75===0x0?_0x4ac888[_0x19e08c(0x1bd)](_0x4a9956+'\x20'+_0x5dbcff+'\x20'+_0x4a9956+'\x20'+_0x30ab9c[_0x19e08c(0x1ae)](_0x4eb758)+'\x20'+_0x4a9956):_0x4ac888['push'](_0x4a9956+'\x20'+'\x20'[_0x19e08c(0x18a)](_0x595ed0)+'\x20'+_0x4a9956+'\x20'+_0x30ab9c[_0x19e08c(0x1ae)](_0x4eb758)+'\x20'+_0x4a9956);});}),_0x4ac888['push'](colorBorder('└─'+'─'[_0x23161c(0x18a)](_0x595ed0)+_0x23161c(0x1a4)+'─'['repeat'](_0x4eb758)+'─┘',_0x2be686));_0x1471c0&&(_0x4ac888['push'](''),_0x4ac888[_0x23161c(0x1bd)](String(a97_0x3fab2[_0x23161c(0x191)]['bold'](_0x23161c(0x1b5)))),_0x4ac888[_0x23161c(0x1bd)](_0x1471c0));_0x226a85&&(_0x4ac888[_0x23161c(0x1bd)](''),_0x4ac888[_0x23161c(0x1bd)](String(a97_0x3fab2[_0x23161c(0x192)][_0x23161c(0x1ac)](_0x23161c(0x1af)))),_0x4ac888['push'](_0x226a85));_0x3e7ea1&&(_0x4ac888[_0x23161c(0x1bd)](''),_0x4ac888['push'](String(a97_0x3fab2[_0x23161c(0x1ad)][_0x23161c(0x1ac)](_0x23161c(0x1bc)))),_0x4ac888[_0x23161c(0x1bd)](_0x3e7ea1));if(_0x142e21){if(_0x142e21[_0x23161c(0x1a3)]){_0x4ac888['push'](''),_0x4ac888[_0x23161c(0x1bd)](String(a97_0x3fab2[_0x23161c(0x1a6)][_0x23161c(0x1ac)](_0x23161c(0x17d))));const _0x3d0d8f=_0x142e21[_0x23161c(0x1a3)][_0x23161c(0x1be)]('\x0a');_0x3d0d8f['forEach'](_0x5da446=>{const _0x407d01=_0x23161c;_0x5da446['trim']()&&_0x4ac888[_0x407d01(0x1bd)](_0x5da446);});}if(_0x142e21[_0x23161c(0x186)]){_0x4ac888[_0x23161c(0x1bd)](''),_0x4ac888['push'](String(a97_0x3fab2[_0x23161c(0x179)][_0x23161c(0x1ac)]('[logs]')));const _0xc612b3=_0x142e21[_0x23161c(0x186)][_0x23161c(0x1be)]('\x0a');_0xc612b3[_0x23161c(0x1b9)](_0x2a2a64=>{const _0x398095=_0x23161c;_0x2a2a64['trim']()&&_0x4ac888[_0x398095(0x1bd)](_0x2a2a64);});}}return _0x4ac888[_0x23161c(0x17e)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x679184,_0x4267b7){const _0x931c2=a97_0x1851;if(_0x4267b7[_0x931c2(0x1a5)]===_0x931c2(0x18b)){await handleSDKOutput([_0x679184],_0x4267b7);return;}const _0x29c4c6=resolveOutputOptions(_0x4267b7),_0x507f84=await formatSingleObject(_0x679184,_0x29c4c6);await writeOutput(_0x507f84,_0x29c4c6[_0x931c2(0x196)]||undefined,_0x29c4c6['format']);}
@@ -1 +1 @@
1
- (function(_0x3af60b,_0x1e4be4){const _0x1ebb28=a98_0x2826,_0x1e2f94=_0x3af60b();while(!![]){try{const _0x183f53=-parseInt(_0x1ebb28(0x1a5))/0x1*(-parseInt(_0x1ebb28(0x1ab))/0x2)+-parseInt(_0x1ebb28(0x1a8))/0x3*(parseInt(_0x1ebb28(0x1a4))/0x4)+-parseInt(_0x1ebb28(0x1ad))/0x5+parseInt(_0x1ebb28(0x1ae))/0x6*(parseInt(_0x1ebb28(0x1af))/0x7)+parseInt(_0x1ebb28(0x1a9))/0x8*(parseInt(_0x1ebb28(0x1a7))/0x9)+-parseInt(_0x1ebb28(0x1a6))/0xa*(-parseInt(_0x1ebb28(0x1a3))/0xb)+parseInt(_0x1ebb28(0x1ac))/0xc*(-parseInt(_0x1ebb28(0x1aa))/0xd);if(_0x183f53===_0x1e4be4)break;else _0x1e2f94['push'](_0x1e2f94['shift']());}catch(_0x23a4d6){_0x1e2f94['push'](_0x1e2f94['shift']());}}}(a98_0x5c46,0x6aa6e));function a98_0x2826(_0x217a46,_0x28e1bc){_0x217a46=_0x217a46-0x1a3;const _0x5c465b=a98_0x5c46();let _0x28260f=_0x5c465b[_0x217a46];return _0x28260f;}export const DEFAULT_DISPLAY_LIMIT=0x28;export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x4dc614,_0x43a199){if(_0x4dc614===undefined)return _0x43a199;if(typeof _0x4dc614==='number')return _0x4dc614;return parseInt(_0x4dc614,0xa);}function a98_0x5c46(){const _0x26f2ee=['11466watfRV','10SaZmNf','9UfdWGk','175767lGWScw','5470568DjjTvn','1658293mjZpXF','14gGSiqg','12BnUjCj','2565235EKjLdV','14466aMbPrx','2212nfvnDg','2155714FzGdlp','44oECMrF'];a98_0x5c46=function(){return _0x26f2ee;};return a98_0x5c46();}
1
+ function a98_0x2f85(_0x433066,_0x1cd6b6){_0x433066=_0x433066-0x16e;const _0x32f792=a98_0x32f7();let _0x2f8571=_0x32f792[_0x433066];return _0x2f8571;}(function(_0x1fb3a3,_0xb04ef2){const _0x47465d=a98_0x2f85,_0x3fb0ed=_0x1fb3a3();while(!![]){try{const _0x22ab6a=parseInt(_0x47465d(0x175))/0x1+-parseInt(_0x47465d(0x174))/0x2*(-parseInt(_0x47465d(0x172))/0x3)+-parseInt(_0x47465d(0x173))/0x4+-parseInt(_0x47465d(0x170))/0x5+-parseInt(_0x47465d(0x171))/0x6+-parseInt(_0x47465d(0x16e))/0x7+parseInt(_0x47465d(0x16f))/0x8;if(_0x22ab6a===_0xb04ef2)break;else _0x3fb0ed['push'](_0x3fb0ed['shift']());}catch(_0x80d37a){_0x3fb0ed['push'](_0x3fb0ed['shift']());}}}(a98_0x32f7,0x5aa3c));export const DEFAULT_DISPLAY_LIMIT=0x28;function a98_0x32f7(){const _0x99ef01=['3ngiEQl','1391136wCnVan','880162boDwKq','495866ixozOp','187796lTImoy','5873608ZWBZBx','3352650nCkWKl','1522476MXRdEy'];a98_0x32f7=function(){return _0x99ef01;};return a98_0x32f7();}export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x3e6cb3,_0x59a04b){if(_0x3e6cb3===undefined)return _0x59a04b;if(typeof _0x3e6cb3==='number')return _0x3e6cb3;return parseInt(_0x3e6cb3,0xa);}