@treasuredata/tdx 0.28.1 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x591dc6=a46_0x2532;(function(_0x5bfb5e,_0x325086){const _0x66e9b3=a46_0x2532,_0x4e3ab1=_0x5bfb5e();while(!![]){try{const _0x156a9e=-parseInt(_0x66e9b3(0x20a))/0x1*(-parseInt(_0x66e9b3(0x13b))/0x2)+parseInt(_0x66e9b3(0x1a8))/0x3*(parseInt(_0x66e9b3(0x184))/0x4)+parseInt(_0x66e9b3(0xc1))/0x5+parseInt(_0x66e9b3(0x1bb))/0x6+parseInt(_0x66e9b3(0x183))/0x7+parseInt(_0x66e9b3(0xe4))/0x8*(parseInt(_0x66e9b3(0x1d2))/0x9)+-parseInt(_0x66e9b3(0x1a3))/0xa*(parseInt(_0x66e9b3(0x1e9))/0xb);if(_0x156a9e===_0x325086)break;else _0x4e3ab1['push'](_0x4e3ab1['shift']());}catch(_0x4fba12){_0x4e3ab1['push'](_0x4e3ab1['shift']());}}}(a46_0x5415,0xb849f));import a46_0x1f96c9 from'chalk';import{existsSync}from'fs';import a46_0x14a963 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a46_0x1147d5 from'prompts';function getAttemptStatusDisplay(_0x26298c){const _0x36e94d=a46_0x2532;if(!_0x26298c)return{'icon':'⏳','text':''};const {done:_0x457900,success:_0x289f09,cancelRequested:_0x2e1690}=_0x26298c;if(!_0x457900)return _0x2e1690?{'icon':'🛑','text':a46_0x1f96c9[_0x36e94d(0x15c)](_0x36e94d(0x146))}:{'icon':'🔄','text':a46_0x1f96c9[_0x36e94d(0x122)](_0x36e94d(0x185))};if(_0x289f09)return{'icon':'✅','text':a46_0x1f96c9[_0x36e94d(0x17f)](_0x36e94d(0xb1))};return{'icon':'❌','text':a46_0x1f96c9[_0x36e94d(0xb9)](_0x36e94d(0xb3))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x41332c,_0xad1148,_0x1edd4e=0x0){const _0x380dac=a46_0x2532;return _0x41332c[_0x1edd4e]||_0xad1148[_0x380dac(0x12c)];}[a46_0x591dc6(0x1ac)](_0x4e28ed,_0x3caaf2,_0x30318a=0x0){const _0x3ae238=a46_0x591dc6,_0x4b81a4=this[_0x3ae238(0x203)](_0x4e28ed,_0x3caaf2,_0x30318a);if(!_0x4b81a4)return console[_0x3ae238(0xb3)](a46_0x1f96c9[_0x3ae238(0xb9)]('Error:'),_0x3ae238(0x1b3)),console['error'](a46_0x1f96c9[_0x3ae238(0x192)](_0x3ae238(0x83))),null;return _0x4b81a4;}[a46_0x591dc6(0x1e1)](_0x5f0f40,_0x13a62f){const _0x2e21b0=a46_0x591dc6;if(_0x5f0f40[0x0]){const _0x2f4e2e=_0x5f0f40[0x0][_0x2e21b0(0x1a4)]('.');if(_0x2f4e2e['length']===0x1)return{'projectName':_0x2f4e2e[0x0],'workflowName':undefined};else return _0x2f4e2e[_0x2e21b0(0x1ff)]===0x2?{'projectName':_0x2f4e2e[0x0],'workflowName':_0x2f4e2e[0x1]}:(console[_0x2e21b0(0xb3)](a46_0x1f96c9['red'](_0x2e21b0(0x1a9)),_0x2e21b0(0x19e)),null);}return{'projectName':_0x13a62f['workflowProject'],'workflowName':undefined};}[a46_0x591dc6(0xef)](_0x29644d,_0x5e845d,_0x23dfb4=0x0){const _0x3854d5=a46_0x591dc6;if(_0x29644d[_0x23dfb4])return _0x29644d[_0x23dfb4];if(_0x5e845d[_0x3854d5(0x12c)]){const _0x1ffe90=a46_0x14a963[_0x3854d5(0x84)](process[_0x3854d5(0xb7)](),_0x3854d5(0x22b),_0x5e845d[_0x3854d5(0x12c)]);if(existsSync(a46_0x14a963[_0x3854d5(0x84)](_0x1ffe90,'tdx.json')))return _0x1ffe90;}return undefined;}async[a46_0x591dc6(0x13d)](_0x1ce709,_0x46a61d,_0xa7b171){const _0x158b07=a46_0x591dc6;try{const _0x5668c0=await _0x1ce709['workflow']['workflows'](_0x46a61d,{'limit':0x1});if(_0x5668c0[_0x158b07(0x1ff)]>0x0){const _0x4e9961=_0x5668c0[0x0]['id'],_0x4f77b=getWorkflowUrl(_0xa7b171,_0x4e9961);console['error']('\x20\x20Console:\x20'+a46_0x1f96c9[_0x158b07(0xd9)](_0x4f77b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x222);[a46_0x591dc6(0x193)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async['execute'](_0x544083){const _0x4feef4=a46_0x591dc6,{options:_0x286b80,args:_0x4f2a6a,tdx:_0x27e8e9}=_0x544083,_0x5c0015=_0x4f2a6a[0x0],_0x5ecc8d=_0x286b80[_0x4feef4(0x12b)];if(_0x5ecc8d)return saveSessionContext({'workflow_project':undefined},_0x286b80['session']),console[_0x4feef4(0x9e)](a46_0x1f96c9[_0x4feef4(0x17f)](_0x4feef4(0x17c))),0x0;if(!_0x5c0015)return console[_0x4feef4(0xb3)](a46_0x1f96c9[_0x4feef4(0xb9)](_0x4feef4(0x1a9)),_0x4feef4(0x1b3)),console[_0x4feef4(0xb3)](a46_0x1f96c9['dim'](_0x4feef4(0x11d))),console[_0x4feef4(0xb3)](a46_0x1f96c9[_0x4feef4(0x192)](_0x4feef4(0x104))),0x1;const _0x6a3596=await withSpinner(_0x4feef4(0x213)+_0x5c0015+_0x4feef4(0x172),()=>_0x27e8e9[_0x4feef4(0x1f4)]['resolveProjectId'](_0x5c0015),{'verbose':_0x286b80[_0x4feef4(0x1a6)]}),{name:_0x3526e1}=_0x6a3596[_0x4feef4(0x164)];return saveSessionContext({'workflow_project':_0x3526e1},_0x286b80[_0x4feef4(0xd7)]),console[_0x4feef4(0x9e)](a46_0x1f96c9['green'](_0x4feef4(0xfe)+a46_0x1f96c9['cyan'](_0x3526e1))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a46_0x591dc6(0xc9)]='workflow:projects';[a46_0x591dc6(0x193)]=a46_0x591dc6(0x133);async['execute'](_0x5c0ea8){const _0x346516=a46_0x591dc6,{options:_0x4a4a39,args:_0x5aac43,tdx:_0x5c772c}=_0x5c0ea8,_0xca8dd9=_0x5aac43[0x0];_0x4a4a39[_0x346516(0x1a6)]&&_0xca8dd9&&console[_0x346516(0xb3)]('Pattern:\x20'+_0xca8dd9);const _0x55773b=await withSpinner(_0x346516(0x1f7),()=>_0x5c772c[_0x346516(0x1f4)]['projects'](_0xca8dd9,{'limit':_0x4a4a39[_0x346516(0xa1)]}),{'verbose':_0x4a4a39[_0x346516(0x1a6)]});let _0x1ef5f5=_0x55773b['data'];_0x1ef5f5[_0x346516(0xf9)]((_0x45c097,_0x1aeea9)=>_0x45c097[_0x346516(0xc9)][_0x346516(0x21d)](_0x1aeea9['name']));const _0x358945=_0x4a4a39[_0x346516(0xa1)]||0x64,_0x5441a8=_0x1ef5f5[_0x346516(0x1ff)]>=_0x358945?a46_0x1f96c9[_0x346516(0x192)](_0x346516(0x179)):'';console[_0x346516(0xb3)](_0x346516(0x182)+_0x1ef5f5[_0x346516(0x1ff)]+_0x346516(0x1db)+(_0x1ef5f5[_0x346516(0x1ff)]!==0x1?'s':'')+_0x5441a8);if(_0x4a4a39['format']===_0x346516(0x1fb)||_0x4a4a39['format']===_0x346516(0x1d8)||_0x4a4a39[_0x346516(0xa5)]===_0x346516(0x147))await handleSDKOutput(_0x1ef5f5,_0x4a4a39);else{if(_0x1ef5f5[_0x346516(0x1ff)]===0x0)_0xca8dd9?console[_0x346516(0x9e)](_0x346516(0x1b7)+_0xca8dd9):console[_0x346516(0x9e)](_0x346516(0x194));else{const _0x983f26=_0x1ef5f5['map'](_0x1b25dd=>{const _0x353b1f=_0x346516,_0xb03255=_0x1b25dd[_0x353b1f(0x98)]?.[_0x353b1f(0x1fe)](_0x2aa586=>_0x2aa586[_0x353b1f(0x21f)]===_0x353b1f(0x11e)),_0x5d2fdc=_0xb03255?a46_0x1f96c9['dim'](_0x353b1f(0x16c)):'';return'📁\x20'+_0x1b25dd[_0x353b1f(0xc9)]+_0x5d2fdc;});await writeOutput(_0x983f26[_0x346516(0x84)]('\x0a'),_0x4a4a39[_0x346516(0x19b)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x1bc);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x1e5);async[a46_0x591dc6(0x1a1)](_0xdb8acb){const _0x168268=a46_0x591dc6,{options:_0x2f3f2a,args:_0x2b7e40,tdx:_0x50ea72}=_0xdb8acb,_0x1356cb=this['resolveProject'](_0x2b7e40,_0x2f3f2a);_0x2f3f2a[_0x168268(0x1a6)]&&_0x1356cb&&console[_0x168268(0xb3)](_0x168268(0x8a)+_0x1356cb);const _0x156a28=await withSpinner(_0x168268(0xc5),()=>_0x50ea72[_0x168268(0x1f4)][_0x168268(0x22b)](_0x1356cb,{'limit':_0x2f3f2a[_0x168268(0xa1)]}),{'verbose':_0x2f3f2a[_0x168268(0x1a6)]});let _0x44e6bb=_0x156a28[_0x168268(0x164)];_0x44e6bb[_0x168268(0xf9)]((_0x288cd9,_0xa3c99e)=>{const _0x4738f3=_0x168268,_0xcadcc1=_0x288cd9[_0x4738f3(0xc9)]['localeCompare'](_0xa3c99e[_0x4738f3(0xc9)]);if(_0xcadcc1!==0x0)return _0xcadcc1;return(_0x288cd9[_0x4738f3(0x1f6)]?.[_0x4738f3(0xc9)]||'')['localeCompare'](_0xa3c99e[_0x4738f3(0x1f6)]?.['name']||'');});const _0x38c308=_0x2f3f2a['limit']||0x64,_0x1af4bf=_0x44e6bb[_0x168268(0x1ff)]>=_0x38c308?a46_0x1f96c9[_0x168268(0x192)](_0x168268(0x179)):'';console['error']('✔\x20Found\x20'+_0x44e6bb['length']+_0x168268(0x208)+(_0x44e6bb[_0x168268(0x1ff)]!==0x1?'s':'')+_0x1af4bf);if(_0x2f3f2a[_0x168268(0xa5)]===_0x168268(0x1fb)||_0x2f3f2a[_0x168268(0xa5)]===_0x168268(0x1d8)||_0x2f3f2a[_0x168268(0xa5)]===_0x168268(0x147))await handleSDKOutput(_0x44e6bb,_0x2f3f2a);else{if(_0x44e6bb['length']===0x0)_0x1356cb?console[_0x168268(0x9e)](_0x168268(0xe1)+_0x1356cb):console[_0x168268(0x9e)]('No\x20workflows\x20found');else{const _0x2dd58b=_0x2f3f2a[_0x168268(0x1fa)],_0x40023d=_0x44e6bb[_0x168268(0x112)](_0x374b50=>{const _0x582f1d=_0x168268,_0x1e7e2e=a46_0x1f96c9[_0x582f1d(0x192)]('#'+_0x374b50['id']),_0x11edd7=hyperlink(_0x1e7e2e,getWorkflowUrl(_0x2dd58b,_0x374b50['id'])),_0x4631e7=_0x374b50[_0x582f1d(0x1f6)]?.['name']?a46_0x1f96c9[_0x582f1d(0x192)]('\x20('+_0x374b50[_0x582f1d(0x1f6)][_0x582f1d(0xc9)]+')'):'';return _0x582f1d(0x1ad)+_0x11edd7+'\x20'+_0x374b50[_0x582f1d(0xc9)]+_0x4631e7;});await writeOutput(_0x40023d[_0x168268(0x84)]('\x0a'),_0x2f3f2a['output'],_0x168268(0x14d));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a46_0x591dc6(0xec);['description']=a46_0x591dc6(0x131);async['execute'](_0x35ca0a){const _0x47b1b2=a46_0x591dc6,{options:_0x17fb54,args:_0x18c98b,tdx:_0x3a0cd9}=_0x35ca0a,_0xd79ff2=this['parseProjectWorkflowPattern'](_0x18c98b,_0x17fb54);if(!_0xd79ff2)return 0x1;const {projectName:_0x1d28ca,workflowName:_0x265fb8}=_0xd79ff2;if(_0x17fb54[_0x47b1b2(0x1a6)]){if(_0x1d28ca&&_0x265fb8)console[_0x47b1b2(0xb3)](_0x47b1b2(0x216)+_0x1d28ca+'.'+_0x265fb8);else _0x1d28ca&&console[_0x47b1b2(0xb3)](_0x47b1b2(0x204)+_0x1d28ca);const _0x49234d=_0x17fb54[_0x47b1b2(0xe0)];_0x49234d&&console[_0x47b1b2(0xb3)](_0x47b1b2(0x22e)+_0x49234d);}let _0x3c03ba=0x28;if(process[_0x47b1b2(0xf4)][_0x47b1b2(0xe9)]&&!_0x17fb54[_0x47b1b2(0x19b)]&&!_0x17fb54[_0x47b1b2(0xa5)]){const _0x7d4fde=process[_0x47b1b2(0xf4)][_0x47b1b2(0xbd)]||0x28;_0x3c03ba=Math[_0x47b1b2(0x13e)](0x14,Math[_0x47b1b2(0x1df)](_0x7d4fde*0x2/0x3));}const _0x673466=_0x17fb54['limit']||_0x3c03ba,_0x104e54=await withSpinner(_0x47b1b2(0x20c),()=>_0x3a0cd9[_0x47b1b2(0x1f4)][_0x47b1b2(0x1be)]({'projectName':_0x1d28ca,'workflowName':_0x265fb8,'status':_0x17fb54[_0x47b1b2(0xe0)],'fromTime':_0x17fb54[_0x47b1b2(0xc0)],'toTime':_0x17fb54['to'],'limit':_0x673466}),{'verbose':_0x17fb54[_0x47b1b2(0x1a6)]}),_0x4fe35c=_0x104e54[_0x47b1b2(0x164)];_0x4fe35c[_0x47b1b2(0xf9)]((_0x29091c,_0x265cf4)=>{const _0xdb029c=_0x47b1b2,_0x3c2904=_0x29091c[_0xdb029c(0x1a5)]||'',_0x53794d=_0x265cf4[_0xdb029c(0x1a5)]||'';return _0x53794d[_0xdb029c(0x21d)](_0x3c2904);});_0x4fe35c['length']>=_0x673466?console[_0x47b1b2(0xb3)](_0x47b1b2(0x217)+_0x4fe35c[_0x47b1b2(0x1ff)]+_0x47b1b2(0x165)+a46_0x1f96c9[_0x47b1b2(0x192)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x47b1b2(0xb3)](_0x47b1b2(0x182)+_0x4fe35c[_0x47b1b2(0x1ff)]+_0x47b1b2(0x99)+(_0x4fe35c[_0x47b1b2(0x1ff)]!==0x1?'s':''));if(_0x17fb54[_0x47b1b2(0xa5)]===_0x47b1b2(0x1fb)||_0x17fb54[_0x47b1b2(0xa5)]===_0x47b1b2(0x1d8)||_0x17fb54[_0x47b1b2(0xa5)]===_0x47b1b2(0x147))await handleSDKOutput(_0x4fe35c,_0x17fb54);else{if(!process[_0x47b1b2(0xf4)][_0x47b1b2(0xe9)]||_0x17fb54['output']){if(_0x4fe35c[_0x47b1b2(0x1ff)]===0x0){if(_0x1d28ca&&_0x265fb8)console[_0x47b1b2(0x9e)](_0x47b1b2(0x1b0)+_0x1d28ca+'.'+_0x265fb8);else _0x1d28ca?console['log'](_0x47b1b2(0x181)+_0x1d28ca):console[_0x47b1b2(0x9e)](_0x47b1b2(0xcb));}else{const _0x42580b=_0x17fb54[_0x47b1b2(0x1fa)],_0x26b1e3=this[_0x47b1b2(0x170)](_0x4fe35c,_0x42580b);_0x17fb54[_0x47b1b2(0x19b)]?await writeOutput(_0x26b1e3,_0x17fb54['output'],_0x47b1b2(0x14d)):console['log'](_0x26b1e3);}!_0x1d28ca&&(console[_0x47b1b2(0xb3)](''),console['error'](a46_0x1f96c9[_0x47b1b2(0x192)](_0x47b1b2(0xfd))),console[_0x47b1b2(0xb3)](a46_0x1f96c9['dim'](_0x47b1b2(0xac))+'or'+a46_0x1f96c9[_0x47b1b2(0x192)](_0x47b1b2(0xd5))));}else{if(_0x4fe35c[_0x47b1b2(0x1ff)]===0x0){if(_0x1d28ca&&_0x265fb8)console['log'](_0x47b1b2(0x1b0)+_0x1d28ca+'.'+_0x265fb8);else _0x1d28ca?console['log'](_0x47b1b2(0x181)+_0x1d28ca):console[_0x47b1b2(0x9e)](_0x47b1b2(0xcb));}else await this[_0x47b1b2(0xdb)](_0x4fe35c,_0x35ca0a,_0x1d28ca);}}return 0x0;}['renderSessionsTimeline'](_0x9d8224,_0x3b6af0){const _0x2d87ec=a46_0x591dc6,_0x1e08ff=[],_0x42d3fa=new Map();let _0x59ef64=Infinity,_0x464bee=-Infinity;for(const _0x5a9f78 of _0x9d8224){if(_0x5a9f78['lastAttempt']?.['createdAt']){const _0x2a8c34=new Date(_0x5a9f78[_0x2d87ec(0xae)][_0x2d87ec(0x154)])[_0x2d87ec(0xa4)](),_0x3116b5=_0x5a9f78[_0x2d87ec(0xae)]['finishedAt']?new Date(_0x5a9f78[_0x2d87ec(0xae)]['finishedAt'])['getTime']():Date['now'](),_0xc06d48=_0x5a9f78[_0x2d87ec(0x1f6)]?.[_0x2d87ec(0xc9)]||_0x2d87ec(0x144);!_0x42d3fa[_0x2d87ec(0x8f)](_0xc06d48)&&_0x42d3fa[_0x2d87ec(0x1f8)](_0xc06d48,[]),_0x42d3fa['get'](_0xc06d48)[_0x2d87ec(0x1dd)]({'session':_0x5a9f78,'startTime':_0x2a8c34,'endTime':_0x3116b5,'duration':_0x3116b5-_0x2a8c34}),_0x59ef64=Math[_0x2d87ec(0x80)](_0x59ef64,_0x2a8c34),_0x464bee=Math[_0x2d87ec(0x13e)](_0x464bee,_0x3116b5);}}if(_0x42d3fa[_0x2d87ec(0xf1)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x59b8ad=process[_0x2d87ec(0xf4)][_0x2d87ec(0x1ae)]||0x78,_0x304f7d=0x1e,_0x7fecea=0x32,_0x1d02a1=0x4,_0x29f68b=Math[_0x2d87ec(0x80)](_0x7fecea,Math[_0x2d87ec(0x13e)](_0x304f7d,Math[_0x2d87ec(0x1df)](_0x59b8ad*0.3))),_0x432718=_0x59b8ad-_0x29f68b-TIMELINE_CONFIG[_0x2d87ec(0xd8)]-0x3-_0x1d02a1,_0x2bcd2a=_0x464bee-_0x59ef64,_0x62b588=_0x2bcd2a/_0x29f68b,_0x50409c=renderTimeAxis({'startTime':_0x59ef64,'endTime':_0x464bee,'durationMs':_0x2bcd2a,'msPerChar':_0x62b588},_0x29f68b),_0x50e04d=[];for(const _0x5eb984 of _0x42d3fa[_0x2d87ec(0x93)]()){_0x50e04d['push'](..._0x5eb984);}_0x50e04d[_0x2d87ec(0xf9)]((_0x2950b6,_0x43d694)=>_0x43d694[_0x2d87ec(0x136)]-_0x2950b6[_0x2d87ec(0x136)]);const _0x57b55a=new Date(_0x59ef64),_0x1ee1ba=formatDate(_0x57b55a),_0x1ea236=_0x1d02a1+TIMELINE_CONFIG[_0x2d87ec(0x1dc)]+TIMELINE_CONFIG[_0x2d87ec(0x1e3)]+_0x432718,_0x3bbe00='\x20'[_0x2d87ec(0x20d)](_0x1ea236-_0x1ee1ba[_0x2d87ec(0x1ff)]),_0x3bb67f=_0x3bbe00+a46_0x1f96c9['dim'](_0x1ee1ba)+'\x20'+_0x50409c;_0x1e08ff[_0x2d87ec(0x1dd)](_0x3bb67f);const _0x1b0ac0=0x16;let _0x38adaf=0x0;for(const _0x574060 of _0x50e04d){const _0x381a07=_0x574060[_0x2d87ec(0xd7)][_0x2d87ec(0x1f6)]?.['name']||'?',_0x3d3a04=Math[_0x2d87ec(0x80)](stringWidth(_0x381a07),_0x1b0ac0);_0x38adaf=Math['max'](_0x38adaf,_0x3d3a04);}for(const _0x11d869 of _0x50e04d){const {session:_0x2c7c2f,startTime:_0x43b9b9,endTime:_0x5efb85,duration:_0x5d171e}=_0x11d869,_0x32ded9=_0x2c7c2f['project']?.['id'],_0x5b77a1=_0x2c7c2f['id'],_0x55288c=_0x2c7c2f['project']?.['name']||'?',_0x1d830f=_0x2c7c2f[_0x2d87ec(0x1f4)]?.[_0x2d87ec(0xc9)]||'?';let _0x6158b6,_0x26012b;if(_0x2c7c2f[_0x2d87ec(0xae)]){const _0x2140d8=_0x2c7c2f['lastAttempt'];!_0x2140d8['done']?(_0x6158b6=_0x2140d8[_0x2d87ec(0x118)]?'🛑':'🔄',_0x26012b=_0x2140d8[_0x2d87ec(0x118)]?a46_0x1f96c9[_0x2d87ec(0x15c)]:a46_0x1f96c9['blue']):(_0x6158b6=_0x2140d8[_0x2d87ec(0xb1)]?'✅':'❌',_0x26012b=_0x2140d8[_0x2d87ec(0xb1)]?a46_0x1f96c9[_0x2d87ec(0x17f)]:a46_0x1f96c9[_0x2d87ec(0xb9)]);}else _0x6158b6='⏳',_0x26012b=a46_0x1f96c9[_0x2d87ec(0x192)];const _0x1f36fe='#'+_0x5b77a1,_0x54d12d=_0x32ded9?hyperlink(_0x1f36fe,getWorkflowSessionUrl(_0x3b6af0,_0x32ded9,_0x5b77a1)):_0x1f36fe;let _0x71fbdc=_0x55288c;stringWidth(_0x55288c)>_0x1b0ac0&&(_0x71fbdc=_0x55288c[_0x2d87ec(0x130)](0x0,_0x1b0ac0-0x1)+'…');const _0x1ddbf1=a46_0x1f96c9[_0x2d87ec(0x192)](_0x71fbdc),_0x523810=stringWidth(_0x71fbdc),_0x3b895f='\x20'[_0x2d87ec(0x20d)](_0x38adaf-stringWidth(_0x71fbdc)+0x2),_0x400bdf='('+formatElapsed(_0x5d171e)+')',_0x23423e=stringWidth(_0x400bdf),_0x2caad1=stringWidth(_0x1f36fe),_0x322df7=_0x2caad1+0x1+_0x523810+_0x3b895f[_0x2d87ec(0x1ff)],_0x2a8380=_0x432718-_0x322df7-_0x23423e-0x1-0x8;let _0x58bc6d=_0x1d830f;stringWidth(_0x58bc6d)>_0x2a8380&&(_0x58bc6d=_0x58bc6d[_0x2d87ec(0x130)](0x0,_0x2a8380-0x1)+'…');const _0x23c9b2=_0x54d12d+'\x20'+_0x1ddbf1+_0x3b895f+_0x58bc6d,_0x412f02=stringWidth(_0x23c9b2),_0x2b0bbd=_0x432718-_0x412f02-_0x23423e,_0x22a3c6=_0x23c9b2+'\x20'[_0x2d87ec(0x20d)](Math[_0x2d87ec(0x13e)](0x1,_0x2b0bbd))+a46_0x1f96c9[_0x2d87ec(0x192)](_0x400bdf),_0x49b450=Math[_0x2d87ec(0x1df)]((_0x43b9b9-_0x59ef64)/_0x62b588),_0x2b027e=Math['floor']((_0x5efb85-_0x59ef64)/_0x62b588),_0x3710c4=Math['max'](_0x49b450+0x1,_0x2b027e),_0x22bf54=new Array(_0x29f68b)['fill']('\x20');for(let _0x8dffd7=_0x49b450;_0x8dffd7<Math[_0x2d87ec(0x80)](_0x3710c4,_0x29f68b);_0x8dffd7++){_0x22bf54[_0x8dffd7]='─';}const _0x44789e=_0x22bf54[_0x2d87ec(0x112)](_0x3d5518=>_0x3d5518==='\x20'?'\x20':_0x26012b(_0x3d5518))[_0x2d87ec(0x84)]('');_0x1e08ff[_0x2d87ec(0x1dd)](_0x6158b6+'\x20'+_0x22a3c6+'│'+_0x44789e+'│');}return _0x1e08ff[_0x2d87ec(0x84)]('\x0a');}async[a46_0x591dc6(0xdb)](_0x187fcd,_0x1eb7ac,_0x440d52){const _0x516a89=a46_0x591dc6,{options:_0x3e10d2,tdx:_0x55308a}=_0x1eb7ac,_0xad612c=_0x3e10d2[_0x516a89(0x1fa)],{timelineRows:_0x1d0fd9,timeAxisHeader:_0xe7956}=this['generateSessionTimelineRows'](_0x187fcd,_0xad612c),_0x3a7d6a=_0x1d0fd9[_0x516a89(0x214)](_0x119c4e=>_0x119c4e['attemptId']);if(_0x3a7d6a[_0x516a89(0x1ff)]===0x0){const _0x4beac0=this['renderSessionsTimeline'](_0x187fcd,_0xad612c);console[_0x516a89(0x9e)](_0x4beac0);!_0x440d52&&(console[_0x516a89(0xb3)](''),console[_0x516a89(0xb3)](a46_0x1f96c9[_0x516a89(0x192)](_0x516a89(0xfd))),console['error'](a46_0x1f96c9[_0x516a89(0x192)](_0x516a89(0xac))+'or'+a46_0x1f96c9[_0x516a89(0x192)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0xe7956&&console[_0x516a89(0x9e)](_0xe7956);const _0x3f06db=_0x1d0fd9[_0x516a89(0x214)](_0x55a4c5=>_0x55a4c5['attemptId'])['map'](_0xf79821=>({'title':_0xf79821[_0x516a89(0x12a)],'value':_0xf79821[_0x516a89(0x1c8)]})),_0x2ffa02=process[_0x516a89(0xf4)][_0x516a89(0xbd)]||0x3c,_0x5e423e=Math[_0x516a89(0x13e)](0x28,Math['floor'](_0x2ffa02*0x2/0x3)),_0x4f742e=await a46_0x1147d5({'type':'autocomplete','name':'attemptId','message':_0x516a89(0x1ce),'choices':_0x3f06db,'initial':-0x1,'limit':_0x5e423e,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x52b20a,_0x1b47dd)=>{const _0xc58f3c=_0x516a89;if(!_0x52b20a)return Promise[_0xc58f3c(0xde)](_0x1b47dd);const _0x3b77ed=_0x1b47dd[_0xc58f3c(0x214)](_0x500456=>{const _0x3f5f19=_0xc58f3c,_0x902fe5=_0x500456;return _0x902fe5[_0x3f5f19(0x1f1)][_0x3f5f19(0x1c4)]()[_0x3f5f19(0x18c)](_0x52b20a['toLowerCase']());});return Promise[_0xc58f3c(0xde)](_0x3b77ed);}}),_0x597cbd=()=>{const _0x44935f=_0x516a89;process[_0x44935f(0xf4)]['write'](_0x44935f(0x127)),process[_0x44935f(0xf4)][_0x44935f(0xeb)](_0x44935f(0x127)),process[_0x44935f(0xf4)]['write'](_0x44935f(0x127));},_0x8281f4=_0x4f742e&&_0x4f742e[_0x516a89(0x1c8)]&&_0x4f742e['attemptId']!==null&&_0x4f742e[_0x516a89(0x1c8)]['trim']()!=='';if(!_0x8281f4){_0x597cbd(),console[_0x516a89(0x9e)](a46_0x1f96c9[_0x516a89(0x192)]('Cancelled'));return;}_0x597cbd();const _0x40f2db=_0x187fcd['find'](_0x356f36=>_0x356f36['lastAttempt']?.['id']===_0x4f742e[_0x516a89(0x1c8)]);if(_0x40f2db){const _0x12168d=_0x40f2db[_0x516a89(0x1f6)]?.[_0x516a89(0xc9)]||'?',_0x2c6a11=_0x40f2db[_0x516a89(0x1f4)]?.[_0x516a89(0xc9)]||'?';console[_0x516a89(0x9e)]('Project:\x20'+a46_0x1f96c9['dim'](_0x12168d)+_0x516a89(0xdc)+a46_0x1f96c9[_0x516a89(0x192)](_0x2c6a11));}const _0x76d1f7=new WorkflowTimelineCommand();await _0x76d1f7[_0x516a89(0x1a1)]({'args':[],'options':{..._0x3e10d2,'attemptId':_0x4f742e[_0x516a89(0x1c8)]},'tdx':_0x55308a});}[a46_0x591dc6(0x1d6)](_0xb1b5aa,_0x31d5c3){const _0x4fb884=a46_0x591dc6,_0x4fe1c1=new Map();for(const _0xd65bb7 of _0xb1b5aa){_0xd65bb7['id']&&_0xd65bb7[_0x4fb884(0xae)]?.['id']&&_0x4fe1c1[_0x4fb884(0x1f8)](_0xd65bb7['id'],_0xd65bb7[_0x4fb884(0xae)]['id']);}const _0x418003=[];let _0x5c43dd='';const _0x45d5a8=this[_0x4fb884(0x170)](_0xb1b5aa,_0x31d5c3),_0x4703dc=_0x45d5a8[_0x4fb884(0x1a4)]('\x0a');for(const _0x4a6860 of _0x4703dc){if(_0x4a6860[_0x4fb884(0x175)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x4a6860['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x5c43dd=_0x4a6860;else{if(_0x4a6860[_0x4fb884(0x1d0)](/^[✅❌🔄🛑⏳]/)){const _0x4e2f84=_0x4a6860[_0x4fb884(0x1d0)](/#(\d+)/),_0x1e8c13=_0x4e2f84?_0x4e2f84[0x1]:null,_0x1dfaca=_0x1e8c13?_0x4fe1c1['get'](_0x1e8c13)||null:null,_0x57582a=_0xb1b5aa[_0x4fb884(0x1a2)](_0x35ddfc=>_0x35ddfc['id']===_0x1e8c13),_0x4963f3=_0x57582a?.[_0x4fb884(0x1f6)]?.['name']||'';_0x418003[_0x4fb884(0x1dd)]({'displayLine':_0x4a6860,'attemptId':_0x1dfaca,'projectName':_0x4963f3});}}}return{'timelineRows':_0x418003,'timeAxisHeader':_0x5c43dd};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]='workflow:attempts';['description']=a46_0x591dc6(0xcc);async[a46_0x591dc6(0x1a1)](_0x2a0c3d){const _0x135a3c=a46_0x591dc6,{options:_0x5db1df,args:_0x348d5d,tdx:_0x3d86cf}=_0x2a0c3d,_0xf59eb=this[_0x135a3c(0x1e1)](_0x348d5d,_0x5db1df);if(!_0xf59eb)return 0x1;const {projectName:_0x636b6d,workflowName:_0x385655}=_0xf59eb,_0x26981c=_0x5db1df[_0x135a3c(0x1cf)];if(_0x5db1df[_0x135a3c(0x1a6)]){if(_0x636b6d&&_0x385655)console[_0x135a3c(0xb3)](_0x135a3c(0x216)+_0x636b6d+'.'+_0x385655);else _0x636b6d&&console[_0x135a3c(0xb3)](_0x135a3c(0x204)+_0x636b6d);_0x26981c&&console[_0x135a3c(0xb3)](_0x135a3c(0x126));}const _0x3db5d0=await withSpinner(_0x135a3c(0x230),()=>_0x3d86cf[_0x135a3c(0x1f4)][_0x135a3c(0xe7)]({'projectName':_0x636b6d,'workflowName':_0x385655,'includeRetried':_0x26981c,'limit':_0x5db1df[_0x135a3c(0xa1)]}),{'verbose':_0x5db1df[_0x135a3c(0x1a6)]}),_0x463e55=_0x3db5d0[_0x135a3c(0x164)],_0x4a2025=_0x5db1df[_0x135a3c(0xa1)]||0x64,_0xe58a93=_0x463e55['length']>=_0x4a2025?a46_0x1f96c9[_0x135a3c(0x192)](_0x135a3c(0x179)):'';console[_0x135a3c(0xb3)](_0x135a3c(0x182)+_0x463e55['length']+_0x135a3c(0x100)+(_0x463e55['length']!==0x1?'s':'')+_0xe58a93);if(_0x5db1df['format']===_0x135a3c(0x1fb)||_0x5db1df['format']===_0x135a3c(0x1d8)||_0x5db1df[_0x135a3c(0xa5)]==='table')await handleSDKOutput(_0x463e55,_0x5db1df);else{if(_0x463e55['length']===0x0){if(_0x636b6d&&_0x385655)console['log'](_0x135a3c(0x94)+_0x636b6d+'.'+_0x385655);else _0x636b6d?console[_0x135a3c(0x9e)](_0x135a3c(0x158)+_0x636b6d):console[_0x135a3c(0x9e)](_0x135a3c(0x9d));}else{const _0x313ed1=_0x5db1df[_0x135a3c(0x1fa)],_0xe5333a=_0x463e55[_0x135a3c(0x112)](_0x15c85f=>{const _0x5b917a=_0x135a3c,_0x261baa=a46_0x1f96c9[_0x5b917a(0x192)]('#'+_0x15c85f['id']),_0x3f11ab=_0x15c85f['project']?.['id'],_0x18c85a=_0x15c85f[_0x5b917a(0x22d)]||_0x15c85f['sessionId'],_0xa89771=_0x3f11ab&&_0x18c85a?hyperlink(_0x261baa,getWorkflowAttemptUrl(_0x313ed1,_0x3f11ab,_0x18c85a,_0x15c85f['id'])):_0x261baa,{icon:_0x5d93fa,text:_0x3c9bf8}=getAttemptStatusDisplay(_0x15c85f),_0x4597e8=(_0x15c85f[_0x5b917a(0x1f6)]?.[_0x5b917a(0xc9)]||'?')+'.'+(_0x15c85f[_0x5b917a(0x1f4)]?.[_0x5b917a(0xc9)]||'?'),_0x289a26=_0x15c85f[_0x5b917a(0x1a5)]?a46_0x1f96c9[_0x5b917a(0x192)](_0x15c85f[_0x5b917a(0x1a5)]):'';return(_0xa89771+'\x20'+_0x5d93fa+(_0x3c9bf8?'\x20'+_0x3c9bf8:'')+'\x20'+_0x4597e8+'\x20'+_0x289a26)[_0x5b917a(0xb8)]();});await writeOutput(_0xe5333a[_0x135a3c(0x84)]('\x0a'),_0x5db1df[_0x135a3c(0x19b)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a46_0x591dc6(0xc9)]='workflow:attempt';[a46_0x591dc6(0x193)]='Show\x20specific\x20attempt\x20details';async[a46_0x591dc6(0x1a1)](_0x15c85b){const _0x288aa2=a46_0x591dc6,{options:_0x1fd21b,args:_0x133913,tdx:_0x48ab47}=_0x15c85b,_0x1949e7=_0x133913[0x0];if(!_0x1949e7)return console[_0x288aa2(0xb3)](_0x288aa2(0x10e)),0x1;_0x1fd21b['verbose']&&console['error'](_0x288aa2(0x10f)+_0x1949e7);const _0x49fa79=await withSpinner(_0x288aa2(0x1e2),()=>_0x48ab47[_0x288aa2(0x1f4)][_0x288aa2(0x95)](_0x1949e7),{'verbose':_0x1fd21b[_0x288aa2(0x1a6)]}),_0x53cab0=_0x49fa79['data'];let _0x358e43;!_0x53cab0['done']?_0x358e43=_0x53cab0[_0x288aa2(0x118)]?'canceling':'running':_0x358e43=_0x53cab0[_0x288aa2(0xb1)]?_0x288aa2(0xb1):'error';let _0x2b442f;if(_0x53cab0[_0x288aa2(0x154)]&&_0x53cab0[_0x288aa2(0x152)]){const _0x4b3771=new Date(_0x53cab0['createdAt'])[_0x288aa2(0xa4)](),_0x53f5e5=new Date(_0x53cab0[_0x288aa2(0x152)])[_0x288aa2(0xa4)]();_0x2b442f=Math[_0x288aa2(0x91)]((_0x53f5e5-_0x4b3771)/0x3e8);}const _0x117071={'attempt_id':_0x53cab0['id'],'status':_0x358e43,..._0x53cab0[_0x288aa2(0x1b4)]!==undefined&&{'index':_0x53cab0[_0x288aa2(0x1b4)]},..._0x53cab0['project']&&{'project':_0x53cab0[_0x288aa2(0x1f6)][_0x288aa2(0xc9)]},..._0x53cab0[_0x288aa2(0x1f4)]&&{'workflow':_0x53cab0[_0x288aa2(0x1f4)][_0x288aa2(0xc9)]},..._0x53cab0[_0x288aa2(0xee)]&&{'session_id':_0x53cab0[_0x288aa2(0xee)]},..._0x53cab0['sessionTime']&&{'session_time':_0x53cab0[_0x288aa2(0x1a5)]},..._0x53cab0['retryAttemptName']&&{'retry_attempt':_0x53cab0[_0x288aa2(0x148)]},..._0x2b442f!==undefined&&{'duration_sec':_0x2b442f},..._0x53cab0[_0x288aa2(0x154)]&&{'created_at':_0x53cab0[_0x288aa2(0x154)]},..._0x53cab0[_0x288aa2(0x152)]&&{'finished_at':_0x53cab0['finishedAt']},...Object[_0x288aa2(0x1b9)](_0x53cab0[_0x288aa2(0xd4)])['length']>0x0&&{'params':_0x53cab0[_0x288aa2(0xd4)]}};return await handleSingleObjectOutput(_0x117071,_0x1fd21b),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x166);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x115);async[a46_0x591dc6(0x1a1)](_0x1004c2){const _0x2d498e=a46_0x591dc6,{options:_0x5923ef,args:_0x3db45b,tdx:_0x3461dd}=_0x1004c2,_0x3cfe7d=_0x3db45b[0x0];if(!_0x3cfe7d)return console[_0x2d498e(0xb3)](_0x2d498e(0x10e)),0x1;const _0x3db895=_0x5923ef[_0x2d498e(0x198)];_0x5923ef[_0x2d498e(0x1a6)]&&(console[_0x2d498e(0xb3)]('Attempt\x20ID:\x20'+_0x3cfe7d),_0x3db895&&console[_0x2d498e(0xb3)](_0x2d498e(0x189)));const _0x41b8f7=await withSpinner(_0x2d498e(0x199),()=>_0x3461dd[_0x2d498e(0x1f4)][_0x2d498e(0x14a)](_0x3cfe7d,_0x3db895||![]),{'verbose':_0x5923ef[_0x2d498e(0x1a6)]}),_0x5ddff3=_0x41b8f7[_0x2d498e(0x164)];return console[_0x2d498e(0xb3)](_0x2d498e(0x182)+_0x5ddff3[_0x2d498e(0x1ff)]+_0x2d498e(0x81)+(_0x5ddff3[_0x2d498e(0x1ff)]!==0x1?'s':'')),await handleSDKOutput(_0x5ddff3,_0x5923ef),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x21c);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x1c1);async['execute'](_0x1dacd0){const _0x4daee9=a46_0x591dc6,{options:_0x21bc50,args:_0x78d20e,tdx:_0x4df8b8}=_0x1dacd0,_0x23b26f=_0x78d20e[0x0];let _0x59ebac=_0x78d20e[0x1];if(!_0x23b26f)return console[_0x4daee9(0xb3)](_0x4daee9(0x10e)),0x1;_0x21bc50[_0x4daee9(0x1a6)]&&(console[_0x4daee9(0xb3)]('Attempt\x20ID:\x20'+_0x23b26f),_0x59ebac&&console['error'](_0x4daee9(0x212)+_0x59ebac));const _0x43b57c=await withSpinner(_0x4daee9(0x1eb),()=>_0x4df8b8['workflow']['logFiles'](_0x23b26f,_0x59ebac),{'verbose':_0x21bc50[_0x4daee9(0x1a6)]}),_0xe94d8a=_0x43b57c['data'];if(_0xe94d8a[_0x4daee9(0x1ff)]===0x0)return console['error'](_0x4daee9(0x9a)),0x0;if(!_0x59ebac&&(_0x21bc50[_0x4daee9(0x1fb)]||_0x21bc50[_0x4daee9(0xa5)]))return await handleSDKOutput(_0xe94d8a,_0x21bc50),0x0;if(!_0x59ebac){const _0x20eb8d=_0xe94d8a['map'](_0x504d25=>({'title':_0x504d25[_0x4daee9(0x9f)]+'\x20('+formatBytes(_0x504d25[_0x4daee9(0x224)])+')','value':_0x504d25[_0x4daee9(0x9f)]})),_0x3598e3=await a46_0x1147d5({'type':_0x4daee9(0x188),'name':_0x4daee9(0x1ea),'message':_0x4daee9(0xa8),'choices':_0x20eb8d});if(!_0x3598e3[_0x4daee9(0x1ea)])return console[_0x4daee9(0xb3)]('Cancelled'),0x0;_0x59ebac=_0x3598e3[_0x4daee9(0x1ea)];}const _0x4906ad=await withSpinner(_0x4daee9(0x103),()=>_0x4df8b8[_0x4daee9(0x1f4)]['logs'](_0x23b26f,_0x59ebac),{'verbose':_0x21bc50[_0x4daee9(0x1a6)]}),_0x43a7c6=_0x4906ad[_0x4daee9(0x164)];return _0x43a7c6?console[_0x4daee9(0x9e)](_0x43a7c6):console[_0x4daee9(0xb3)](_0x4daee9(0x219)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x178);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x206);async[a46_0x591dc6(0x1a1)](_0xc468db){const _0x4da579=a46_0x591dc6,{options:_0xd50f31,args:_0x55f3bd,tdx:_0x1b6269}=_0xc468db,_0x40c194=_0x55f3bd[0x0];if(!_0x40c194)return console[_0x4da579(0xb3)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x38a3d4=_0xd50f31[_0x4da579(0x174)];_0xd50f31['verbose']&&(console[_0x4da579(0xb3)](_0x4da579(0x10f)+_0x40c194),_0x38a3d4&&console['error'](_0x4da579(0x18f)+_0x38a3d4));if(!_0xd50f31['yes']){if(!isInteractive())return console['error'](a46_0x1f96c9[_0x4da579(0xb9)](_0x4da579(0x218)),_0x4da579(0x195)),console['error'](a46_0x1f96c9[_0x4da579(0x192)](_0x4da579(0x1e6))),0x1;const _0x6dba1a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x40c194+'?');if(!_0x6dba1a)return console['error'](a46_0x1f96c9['yellow'](_0x4da579(0x200))),0x1;}const _0x4d5ada=await withSpinner(_0x4da579(0x14f),()=>_0x1b6269[_0x4da579(0x1f4)]['kill'](_0x40c194,_0x38a3d4),{'verbose':_0xd50f31['verbose']}),_0x4256bc=_0x4d5ada[_0x4da579(0x164)];return console[_0x4da579(0xb3)]('✔\x20'+_0x4256bc),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0xcd);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x1c0);async[a46_0x591dc6(0x1a1)](_0x556f75){const _0x26eb84=a46_0x591dc6,{options:_0x14b4b9,args:_0x1e5217,tdx:_0x214b21}=_0x556f75,_0xb11a88=_0x1e5217[0x0];if(!_0xb11a88)return console[_0x26eb84(0xb3)](_0x26eb84(0x15f)),console[_0x26eb84(0xb3)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x2cc6e9=![],_0x4668e8=_0xb11a88;if(_0xb11a88[_0x26eb84(0x175)](_0x26eb84(0x1ef)))_0x2cc6e9=!![],_0x4668e8=_0xb11a88[_0x26eb84(0x201)](0x8);else{if(_0xb11a88[_0x26eb84(0x175)](_0x26eb84(0x141)))_0x2cc6e9=![],_0x4668e8=_0xb11a88['substring'](0x8);else return console[_0x26eb84(0xb3)](_0x26eb84(0x16f)),console[_0x26eb84(0xb3)](_0x26eb84(0x10a)),0x1;}const _0x43da21=_0x14b4b9[_0x26eb84(0x1b6)],_0x489c5d=_0x14b4b9[_0x26eb84(0x1d4)],_0x57284a=_0x14b4b9['params'],_0x5d06f9=_0x14b4b9[_0x26eb84(0x128)];_0x14b4b9['verbose']&&(console[_0x26eb84(0xb3)](_0x26eb84(0x1a7)+(_0x2cc6e9?_0x26eb84(0xd7):_0x26eb84(0x95))+'\x20'+_0x4668e8),_0x43da21&&console['error'](_0x26eb84(0xbf)+_0x43da21),_0x489c5d&&console[_0x26eb84(0xb3)](_0x26eb84(0x140)+_0x489c5d),_0x57284a&&console['error']('Params:\x20'+_0x57284a),_0x5d06f9&&console[_0x26eb84(0xb3)](_0x26eb84(0x22f)));let _0x33d5ae;if(_0x57284a)try{if(_0x57284a['startsWith']('@')){const _0x4f33d0=await import(_0x26eb84(0xe6)),_0x6a0960=_0x57284a[_0x26eb84(0x201)](0x1),_0x23e9cb=await _0x4f33d0['readFile'](_0x6a0960,'utf-8');_0x33d5ae=JSON[_0x26eb84(0x116)](_0x23e9cb);}else _0x33d5ae=JSON[_0x26eb84(0x116)](_0x57284a);}catch{return console[_0x26eb84(0xb3)](_0x26eb84(0x211)),0x1;}if(!_0x14b4b9[_0x26eb84(0x1cd)]){if(!isInteractive())return console[_0x26eb84(0xb3)](a46_0x1f96c9['red']('\x0aError:'),_0x26eb84(0x195)),console['error'](a46_0x1f96c9[_0x26eb84(0x192)](_0x26eb84(0x1e6))),0x1;const _0x4f3c58=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x2cc6e9?_0x26eb84(0xd7):'attempt')+'\x20'+_0x4668e8+'?');if(!_0x4f3c58)return console[_0x26eb84(0xb3)](a46_0x1f96c9[_0x26eb84(0x15c)](_0x26eb84(0x200))),0x1;}let _0x24dd13;_0x2cc6e9?_0x24dd13=await withSpinner('Retrying\x20session...',()=>_0x214b21[_0x26eb84(0x1f4)][_0x26eb84(0x1d3)](_0x4668e8,{'fromTask':_0x43da21,'retryParams':_0x33d5ae}),{'verbose':_0x14b4b9[_0x26eb84(0x1a6)]}):_0x24dd13=await withSpinner(_0x26eb84(0x13f),()=>_0x214b21['workflow'][_0x26eb84(0x8e)](_0x4668e8,{'resumeFrom':_0x489c5d,'retryParams':_0x33d5ae,'force':_0x5d06f9}),{'verbose':_0x14b4b9[_0x26eb84(0x1a6)]});const _0x277f77=_0x24dd13[_0x26eb84(0x164)];return console['error'](_0x26eb84(0x114)),console[_0x26eb84(0xb3)](_0x26eb84(0x223)+_0x277f77['attemptId']),console[_0x26eb84(0xb3)](_0x26eb84(0x1d7)+_0x277f77[_0x26eb84(0xee)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x119);['description']=a46_0x591dc6(0x1aa);async[a46_0x591dc6(0x1a1)](_0x228ec0){const _0x357d29=a46_0x591dc6,{options:_0x5106ab,args:_0x54201e,tdx:_0x19bd46}=_0x228ec0;let _0x1d1641=_0x54201e[0x0];if(!_0x1d1641){const _0x82f783=this[_0x357d29(0x203)]([],_0x5106ab),_0x1b1c54=await withSpinner(_0x357d29(0x157),()=>_0x19bd46[_0x357d29(0x1f4)]['workflows'](_0x82f783,{'limit':_0x5106ab[_0x357d29(0xa1)]}),{'verbose':_0x5106ab[_0x357d29(0x1a6)]}),_0x171b95=_0x1b1c54[_0x357d29(0x164)];if(_0x171b95[_0x357d29(0x1ff)]===0x0)return console[_0x357d29(0xb3)](_0x357d29(0x92)),!_0x82f783&&console[_0x357d29(0xb3)](a46_0x1f96c9[_0x357d29(0x192)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x47c2f2=_0x171b95[_0x357d29(0x112)](_0x2517e6=>({'title':_0x2517e6['project']?.[_0x357d29(0xc9)]+'.'+_0x2517e6[_0x357d29(0xc9)],'value':_0x2517e6[_0x357d29(0x1f6)]?.[_0x357d29(0xc9)]+'.'+_0x2517e6['name'],'description':_0x2517e6[_0x357d29(0x11b)]?'revision:\x20'+_0x2517e6['revision']:undefined})),_0x5b1ebf=await a46_0x1147d5({'type':'select','name':_0x357d29(0x1f4),'message':_0x357d29(0x21e),'choices':_0x47c2f2});if(!_0x5b1ebf[_0x357d29(0x1f4)])return 0x1;_0x1d1641=_0x5b1ebf['workflow'];}if(!_0x1d1641[_0x357d29(0x18c)]('.')){const _0x5a7ff6=this[_0x357d29(0x203)]([],_0x5106ab);if(_0x5a7ff6)_0x1d1641=_0x5a7ff6+'.'+_0x1d1641;else return console['error'](a46_0x1f96c9[_0x357d29(0xb9)](_0x357d29(0x1a9)),_0x357d29(0x221)),console[_0x357d29(0xb3)](a46_0x1f96c9[_0x357d29(0x192)](_0x357d29(0x83))),0x1;}const _0x33de10=_0x5106ab[_0x357d29(0x1d5)],_0x4d3d35=_0x5106ab[_0x357d29(0x1a5)],_0xebedaa={};if(_0x33de10&&Array[_0x357d29(0x1ba)](_0x33de10))for(const _0x1bb4a6 of _0x33de10){const _0x388322=_0x1bb4a6['indexOf']('=');if(_0x388322===-0x1)return console[_0x357d29(0xb3)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x1bb4a6),console[_0x357d29(0xb3)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x5e1ecd=_0x1bb4a6[_0x357d29(0x201)](0x0,_0x388322),_0x28c2bf=_0x1bb4a6[_0x357d29(0x201)](_0x388322+0x1);try{_0xebedaa[_0x5e1ecd]=JSON[_0x357d29(0x116)](_0x28c2bf);}catch{_0xebedaa[_0x5e1ecd]=_0x28c2bf;}}_0x5106ab[_0x357d29(0x1a6)]&&(console[_0x357d29(0xb3)](_0x357d29(0x1b8)+_0x1d1641),Object['keys'](_0xebedaa)['length']>0x0&&console['error'](_0x357d29(0x1de)+JSON[_0x357d29(0x19d)](_0xebedaa)),_0x4d3d35&&console[_0x357d29(0xb3)](_0x357d29(0x10c)+_0x4d3d35));const _0x39d8a5=await withSpinner(_0x357d29(0x117),()=>_0x19bd46[_0x357d29(0x1f4)][_0x357d29(0x1d9)](_0x1d1641,_0xebedaa,{'sessionTime':_0x4d3d35}),{'verbose':_0x5106ab['verbose']}),_0x41bb84=_0x39d8a5[_0x357d29(0x164)];console[_0x357d29(0xb3)](_0x357d29(0x13c)),console['error']('\x20\x20Attempt\x20ID:\x20'+_0x41bb84['id']),console[_0x357d29(0xb3)](_0x357d29(0x1d7)+_0x41bb84[_0x357d29(0xee)]),console[_0x357d29(0xb3)]('\x20\x20Project:\x20'+_0x41bb84['project']?.[_0x357d29(0xc9)]),console[_0x357d29(0xb3)](_0x357d29(0x18b)+_0x41bb84[_0x357d29(0x1f4)]?.[_0x357d29(0xc9)]);if(_0x41bb84[_0x357d29(0x1f6)]?.['id']&&_0x41bb84[_0x357d29(0xee)]&&_0x41bb84['id']){const _0x56047a=_0x5106ab['site'],_0x1a24c5=getConsoleUrl(_0x56047a,'/app/workflows/'+_0x41bb84[_0x357d29(0x1f6)]['id']+'/sessions/'+_0x41bb84[_0x357d29(0xee)]+_0x357d29(0xa7)+_0x41bb84['id']);console[_0x357d29(0xb3)](_0x357d29(0x19f)+a46_0x1f96c9[_0x357d29(0xd9)](_0x1a24c5));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a46_0x591dc6(0xab);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x97);async[a46_0x591dc6(0x1a1)](_0x5bed36){const _0x456e89=a46_0x591dc6,{options:_0x38c476,args:_0x465dd5,tdx:_0x14cde4}=_0x5bed36,_0x3f8f10=_0x465dd5[0x0],_0x57d838=_0x465dd5[0x1]||'.';if(!_0x3f8f10)return console['error'](_0x456e89(0x1b5)),console[_0x456e89(0xb3)](_0x456e89(0x1e0)),0x1;const _0x57f28c=_0x38c476[_0x456e89(0x11b)];_0x38c476['verbose']&&(console['error'](_0x456e89(0xb0)+_0x3f8f10),console[_0x456e89(0xb3)](_0x456e89(0xe3)+_0x57d838),_0x57f28c&&console[_0x456e89(0xb3)](_0x456e89(0x1d1)+_0x57f28c));const _0x2f8893=await withSpinner('Downloading\x20project\x20'+_0x3f8f10+_0x456e89(0x12f),()=>_0x14cde4[_0x456e89(0x1f4)][_0x456e89(0x16e)](_0x3f8f10,_0x57d838,{'revision':_0x57f28c}),{'verbose':_0x38c476[_0x456e89(0x1a6)]}),_0x3623d3=_0x2f8893[_0x456e89(0x164)];return console[_0x456e89(0xb3)](_0x456e89(0x123)+_0x3623d3['projectName']),console[_0x456e89(0xb3)](_0x456e89(0x145)+_0x3623d3[_0x456e89(0x11b)]),console[_0x456e89(0xb3)](_0x456e89(0xf8)+_0x3623d3['filesExtracted']),console[_0x456e89(0xb3)]('\x20\x20Location:\x20'+_0x57d838+'/'+_0x3623d3[_0x456e89(0x191)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x13a);[a46_0x591dc6(0x193)]=a46_0x591dc6(0xc8);async[a46_0x591dc6(0x1a1)](_0x3773c1){const _0x18e74e=a46_0x591dc6,{options:_0x8ed5bc,args:_0x430e52,tdx:_0x4232d6}=_0x3773c1;let _0x144db8='.',_0x1f402b=_0x8ed5bc[_0x18e74e(0xc9)];if(_0x430e52[0x0]){const {promises:_0x173ad5}=await import('fs');try{const _0x39d674=await _0x173ad5[_0x18e74e(0x190)](_0x430e52[0x0]);if(_0x39d674[_0x18e74e(0xaf)]())_0x144db8=_0x430e52[0x0];else return console['error'](_0x18e74e(0x15b)+_0x430e52[0x0]+_0x18e74e(0x18d)),0x1;}catch{_0x1f402b=_0x430e52[0x0],_0x144db8='.';}}const _0xd0c305=_0x8ed5bc[_0x18e74e(0x11b)],_0x26a97b=_0x8ed5bc[_0x18e74e(0x124)];_0x8ed5bc[_0x18e74e(0x1a6)]&&(console[_0x18e74e(0xb3)](_0x18e74e(0x20e)+_0x144db8),_0x1f402b&&console[_0x18e74e(0xb3)](_0x18e74e(0x1c5)+_0x1f402b),_0xd0c305&&console[_0x18e74e(0xb3)](_0x18e74e(0x1d1)+_0xd0c305),_0x26a97b&&console[_0x18e74e(0xb3)](_0x18e74e(0x10d)));const _0x48dd58=await withSpinner(_0x18e74e(0xfb),()=>_0x4232d6['workflow'][_0x18e74e(0x1dd)](_0x144db8,{'projectName':_0x1f402b,'revision':_0xd0c305,'skipValidation':_0x26a97b}),{'verbose':_0x8ed5bc['verbose']}),_0x38db18=_0x48dd58[_0x18e74e(0x164)];return console['error'](_0x18e74e(0x202)+_0x38db18[_0x18e74e(0x191)]),console[_0x18e74e(0xb3)](_0x18e74e(0x169)+_0x38db18[_0x18e74e(0xd2)]),console['error'](_0x18e74e(0x145)+_0x38db18[_0x18e74e(0x11b)]),await this['showWorkflowConsoleUrl'](_0x4232d6,_0x38db18['projectName'],_0x8ed5bc[_0x18e74e(0x1fa)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a46_0x591dc6(0xc9)]='workflow:pull';[a46_0x591dc6(0x193)]=a46_0x591dc6(0x8b);async[a46_0x591dc6(0x1a1)](_0x451730){const _0x1d62e6=a46_0x591dc6,{options:_0x122910,args:_0xc5d21c,tdx:_0x5f2d66}=_0x451730,_0x34ec84=_0xc5d21c[0x0],_0x49d441=_0xc5d21c[0x1];if(!_0x34ec84)return console[_0x1d62e6(0xb3)](a46_0x1f96c9['red'](_0x1d62e6(0x1a9)),_0x1d62e6(0x1b3)),console['error'](a46_0x1f96c9['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x2b52c6=_0x122910[_0x1d62e6(0x11b)];_0x122910['verbose']&&(console[_0x1d62e6(0xb3)](_0x1d62e6(0xb0)+_0x34ec84),_0x49d441&&console[_0x1d62e6(0xb3)](_0x1d62e6(0x96)+_0x49d441),_0x2b52c6&&console[_0x1d62e6(0xb3)](_0x1d62e6(0x1d1)+_0x2b52c6),_0x122910[_0x1d62e6(0x18a)]&&console[_0x1d62e6(0xb3)]('Dry\x20run:\x20yes'));const _0xfd7d81=await withSpinner(_0x1d62e6(0x82)+_0x34ec84+_0x1d62e6(0x12f),()=>_0x5f2d66[_0x1d62e6(0x1f4)][_0x1d62e6(0x107)](_0x34ec84,{'targetDir':_0x49d441,'revision':_0x2b52c6}),{'verbose':_0x122910[_0x1d62e6(0x1a6)]}),_0x497671=_0xfd7d81['data'];_0x497671[_0x1d62e6(0x155)]?console['error'](_0x1d62e6(0x7f)+_0x497671[_0x1d62e6(0x191)]):console[_0x1d62e6(0xb3)](_0x1d62e6(0x159)+_0x497671['projectName']);console['error'](_0x1d62e6(0x145)+_0x497671[_0x1d62e6(0x11b)]),console[_0x1d62e6(0xb3)](_0x1d62e6(0x1ed)+(a46_0x14a963['relative'](process[_0x1d62e6(0xb7)](),_0x497671['targetDir'])||'.')),console[_0x1d62e6(0xb3)](_0x1d62e6(0x1f5)+a46_0x1f96c9['green']('+'+_0x497671[_0x1d62e6(0x1cb)][_0x1d62e6(0x205)]+_0x1d62e6(0xc3))+',\x20'+(a46_0x1f96c9[_0x1d62e6(0x15c)]('~'+_0x497671[_0x1d62e6(0x1cb)][_0x1d62e6(0x9b)]+_0x1d62e6(0x1bf))+',\x20')+(a46_0x1f96c9['red']('-'+_0x497671[_0x1d62e6(0x1cb)][_0x1d62e6(0xd3)]+_0x1d62e6(0x19a))+',\x20')+(''+a46_0x1f96c9['dim'](_0x497671[_0x1d62e6(0x1cb)][_0x1d62e6(0xf7)]+_0x1d62e6(0x160))));for(const _0x5e9917 of _0x497671[_0x1d62e6(0x1ee)]){_0x5e9917[_0x1d62e6(0x1e7)]===_0x1d62e6(0x9b)&&_0x5e9917['diff']&&(console['error']('\x0a'+a46_0x1f96c9['cyan']('---\x20'+_0x5e9917[_0x1d62e6(0x167)])),console['error'](_0x5e9917['diff']));}if(!_0x497671['hasChanges'])return saveSessionContext({'workflow_project':_0x497671[_0x1d62e6(0x191)]},_0x122910['session']),console['error'](a46_0x1f96c9[_0x1d62e6(0x17f)](_0x1d62e6(0xbc))),console[_0x1d62e6(0xb3)](a46_0x1f96c9[_0x1d62e6(0x192)](_0x1d62e6(0x1e4)+_0x497671[_0x1d62e6(0x191)])),0x0;if(_0x122910['dryRun'])return console['error'](a46_0x1f96c9[_0x1d62e6(0x15c)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x122910['yes']){if(!isInteractive())return console[_0x1d62e6(0xb3)](a46_0x1f96c9[_0x1d62e6(0xb9)](_0x1d62e6(0x218)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1d62e6(0xb3)](a46_0x1f96c9[_0x1d62e6(0x192)](_0x1d62e6(0x1e6))),0x1;const _0x2da3f7=await confirmKey(_0x1d62e6(0x17a));if(!_0x2da3f7)return console['error'](a46_0x1f96c9['yellow'](_0x1d62e6(0x200)),_0x1d62e6(0x12e)),0x1;}await withSpinner(_0x1d62e6(0xda),()=>_0x5f2d66['workflow'][_0x1d62e6(0x163)](_0x497671,{'revision':_0x2b52c6}),{'verbose':_0x122910[_0x1d62e6(0x1a6)]}),saveSessionContext({'workflow_project':_0x497671[_0x1d62e6(0x191)]},_0x122910[_0x1d62e6(0xd7)]),console[_0x1d62e6(0xb3)](a46_0x1f96c9['green'](_0x1d62e6(0xc2)));const _0x151795=a46_0x14a963[_0x1d62e6(0x15d)](process[_0x1d62e6(0xb7)](),_0x497671[_0x1d62e6(0xea)])||'.';return console[_0x1d62e6(0xb3)](a46_0x1f96c9[_0x1d62e6(0x192)](_0x1d62e6(0x106)+_0x151795)),console[_0x1d62e6(0xb3)](a46_0x1f96c9[_0x1d62e6(0x192)](_0x1d62e6(0x1e4)+_0x497671[_0x1d62e6(0x191)])),0x0;}}function a46_0x5415(){const _0x4df00d=['Updating\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','name','preparePushProject','No\x20sessions\x20found','List\x20workflow\x20attempts','workflow:retry','pollTimeline','\x20secret','\x0a✔\x20Attempt\x20complete','Warning:','projectId','deleted','params','\x20\x20tdx\x20wf\x20use\x20<project>','fileCount','session','GUTTER','cyan','Writing\x20files...','navigateSessionsInteractive',',\x20Workflow:\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','resolve','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','status','No\x20workflows\x20found\x20in\x20project:\x20','done','Output\x20directory:\x20','3608104obsHCo','indexOf','fs/promises','attempts','Loading\x20session...','isTTY','targetDir','write','workflow:sessions','padStart','sessionId','resolveProjectDir','✔\x20Project\x20updated','size','Key\x20cannot\x20be\x20empty','renderSingleTimeline','stdout','icon','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','unchanged','\x20\x20Files\x20extracted:\x20','sort','\x0aDry\x20run\x20-\x20no\x20project\x20created','Pushing\x20workflow\x20project...','\x20has\x20no\x20attempts','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','✔\x20Workflow\x20project\x20set\x20to:\x20','\x20-\x20','\x20attempt','existingProjectId','toISOString','Downloading\x20logs...','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','workflow:secrets:set','\x20\x20Location:\x20','pullProject','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','setSecret','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:push','Session\x20time:\x20','Validation:\x20skipped','Error:\x20Attempt\x20ID\x20is\x20required','Attempt\x20ID:\x20','MAX_TIMELINE_WIDTH','basename','map','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','✔\x20Retry\x20started','Show\x20tasks\x20for\x20an\x20attempt','parse','Starting\x20workflow\x20run...','cancelRequested','workflow:run','newProjectId','revision','getFullYear','Usage:\x20tdx\x20wf\x20use\x20<project>','sys','sourceProjectName','white','\x20logs','blue','✔\x20Downloaded\x20','skipValidation','\x22?\x20This\x20cannot\x20be\x20undone.','Include\x20retried:\x20yes','\x1b[1A\x1b[2K','force','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','displayLine','clear','workflowProject','workflowName','-\x20no\x20files\x20written','...','slice','List\x20workflow\x20execution\x20sessions','Invalid\x20format:\x20','List\x20all\x20workflow\x20projects','⚠\x20Showing\x20first\x20','Dry\x20run:\x20yes','startTime','workflow:secrets:delete','Tip:\x20cd\x20to\x20workflows/','MAX_TASKS_DISPLAY','workflow:upload','155012xkNTPu','✔\x20Workflow\x20run\x20started','showWorkflowConsoleUrl','max','Retrying\x20attempt...','Resume\x20from:\x20','attempt:','buildTimelineData','\x20to\x20see\x20detailed\x20logs','(unknown)','\x20\x20Revision:\x20','canceling','table','retryAttemptName','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','tasks','tdx\x20wf\x20attempt\x20','✔\x20Project:\x20','list','MIN_TIMELINE_WIDTH','Killing\x20attempt...','newProjectName','diff','finishedAt','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','createdAt','isNewProject','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Loading\x20workflows...','No\x20attempts\x20found\x20in\x20project:\x20','→\x20Project:\x20','\x20\x20Project:\x20','Error:\x20','yellow','relative','---\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20unchanged','Cloning\x20to\x20','Session\x20','applyPullProject','data','\x20sessions\x20','workflow:tasks','path','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20Project\x20ID:\x20','Auto-selected\x20latest\x20session:\x20','TASK_NAME_WIDTH','\x20(system)','planned','download','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','renderSessionsTimeline','targetExists','\x27...','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','reason','startsWith','workflow:secrets:list','end','workflow:kill','\x20(use\x20--limit\x20to\x20show\x20more)','\x0aApply\x20these\x20changes?','LABEL_MIN_SPACING','✔\x20Workflow\x20project\x20context\x20cleared.','\x0a✔\x20No\x20changes\x20to\x20push','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','green','\x0a⚠\x20Project\x20\x22','No\x20sessions\x20found\x20in\x20project:\x20','✔\x20Found\x20','149345FpIFXX','345112LIANEe','running','listSecrets','fill','select','Including\x20subtasks:\x20yes','dryRun','\x20\x20Workflow:\x20','includes','\x20is\x20not\x20a\x20directory','message','Reason:\x20','stat','projectName','dim','description','No\x20workflow\x20projects\x20found','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Analyzing\x20project...','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','includeSubtasks','Getting\x20attempt\x20tasks...','\x20deleted','output','context','stringify','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','\x20\x20Console:\x20','\x0aClone\x20\x22','execute','find','110OmSGNC','split','sessionTime','verbose','Target:\x20','15dBgttN','Error:','Start\x20a\x20workflow\x20run','.\x20Expected\x20format:\x20KEY=VALUE','requireProject','📋\x20','columns','Pushing\x20project...','No\x20sessions\x20found\x20for:\x20','Analyzing\x20changes...','✔\x20Clone\x20complete','Project\x20name\x20is\x20required','index','Error:\x20Project\x20name\x20is\x20required','fromTask','No\x20projects\x20match\x20pattern:\x20','Workflow:\x20','keys','isArray','8346888BUzrdn','workflow:workflows','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','sessions','\x20modified','Retry\x20a\x20session\x20or\x20attempt','Show\x20logs\x20for\x20a\x20workflow\x20attempt','workflow:timeline','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','toLowerCase','Project\x20name:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x27\x20from\x20project\x20\x27','attemptId','pending','total','summary','window','yes','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','includeRetried','match','Revision:\x20','9noQfED','retrySession','resumeFrom','param','generateSessionTimelineRows','\x20\x20Session\x20ID:\x20','jsonl','run','workflow:clone','\x20project','ICON_WIDTH','push','Parameters:\x20','floor','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','parseProjectWorkflowPattern','Getting\x20attempt\x20details...','ICON_SPACING','\x20\x20Session\x20context\x20set\x20to:\x20','List\x20workflows','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','type','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','2529307dtHAnp','task','Fetching\x20log\x20files...','hasChanges','\x20\x20Target:\x20','changes','session:','fullName','title','startedAt','updatedAt','workflow','\x20\x20Changes:\x20','project','Listing\x20workflow\x20projects...','set','start','site','json','Deleting\x20project\x20','Key:\x20','some','length','Cancelled','substring','✔\x20Pushed\x20','resolveProject','Filter:\x20project=','new','Kill\x20a\x20running\x20attempt','splice','\x20workflow','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','12mXLAUt','now','Listing\x20workflow\x20sessions...','repeat','Project\x20directory:\x20','Session\x20not\x20found:\x20','\x0aPolling...\x20(','Error:\x20Invalid\x20JSON\x20in\x20--params','Task\x20name:\x20','Resolving\x20project\x20\x27','filter','Error:\x20Secret\x20key\x20is\x20required','Filter:\x20','✔\x20Showing\x20','\x0aError:','No\x20log\x20content\x20found','\x22\x20with\x20new\x20revision?','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','workflow:logs','localeCompare','Select\x20a\x20workflow\x20to\x20run','key','text','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','workflow:use','\x20\x20New\x20attempt\x20ID:\x20','fileSize','Listing\x20secrets...','\x22\x20already\x20exists\x20(ID:\x20','follow','executePushProject','workflow:delete','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','workflows','duration','session_id','Status:\x20','Force:\x20yes','Listing\x20workflow\x20attempts...','→\x20New\x20project:\x20','min','\x20task','Pulling\x20project\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','join','group_error','Attempt:\x20','✔\x20Secret\x20\x27','all','getDate','Project\x20filter:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','delete','retryAttempt','has','✔\x20Deleted\x20project\x20','round','No\x20workflows\x20found','values','No\x20attempts\x20found\x20for:\x20','attempt','Target\x20directory:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','metadata','\x20session','No\x20log\x20files\x20found\x20for\x20this\x20attempt','modified','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','No\x20attempts\x20found','log','taskName','-\x20nothing\x20pushed','limit','renderTimeline','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','getTime','format','Loading\x20sessions...','/attempt/','Select\x20a\x20task\x20to\x20view\x20logs:','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','New\x20project\x20name:\x20','workflow:download','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','lastAttempt','isDirectory','Project:\x20','success','state','error','Using\x20attempt\x20','getMonth','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','cwd','trimEnd','red','Source\x20directory:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','\x0a✔\x20Already\x20up\x20to\x20date','rows','No\x20workflow\x20sessions\x20found','From\x20task:\x20','from','295980XcOXjO','✔\x20Pull\x20complete','\x20new','msPerChar','Listing\x20workflows...','Deleting\x20secret...'];a46_0x5415=function(){return _0x4df00d;};return a46_0x5415();}export class WorkflowPushCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x10b);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x1bd);async[a46_0x591dc6(0x1a1)](_0x20ed33){const _0x101a6b=a46_0x591dc6,{options:_0x24d268,args:_0x16115c,tdx:_0x36eb71}=_0x20ed33,_0x3909ce=this[_0x101a6b(0xef)](_0x16115c,_0x24d268),_0x127ae6=_0x24d268[_0x101a6b(0x11b)],_0x4e8dc5=_0x24d268[_0x101a6b(0x124)];_0x24d268['verbose']&&(_0x3909ce&&console[_0x101a6b(0xb3)](_0x101a6b(0xba)+_0x3909ce),_0x127ae6&&console[_0x101a6b(0xb3)]('Revision:\x20'+_0x127ae6),_0x24d268[_0x101a6b(0x18a)]&&console[_0x101a6b(0xb3)](_0x101a6b(0x135)),_0x4e8dc5&&console[_0x101a6b(0xb3)](_0x101a6b(0x10d)));let _0x50e42b;try{_0x50e42b=await withSpinner(_0x101a6b(0x1b1),()=>_0x36eb71[_0x101a6b(0x1f4)][_0x101a6b(0xca)]({'sourceDir':_0x3909ce,'revision':_0x127ae6,'skipValidation':_0x4e8dc5}),{'verbose':_0x24d268[_0x101a6b(0x1a6)]});}catch(_0x431245){if(_0x431245 instanceof Error&&_0x431245[_0x101a6b(0x18e)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0xb9)](_0x101a6b(0x1a9)),_0x101a6b(0xa3)),_0x24d268['workflowProject']?console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0x192)](_0x101a6b(0x138)+_0x24d268[_0x101a6b(0x12c)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x24d268[_0x101a6b(0x12c)]+'\x27')):console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0x192)](_0x101a6b(0x1c3))),0x1;throw _0x431245;}const _0x34f961=_0x50e42b['data'];console[_0x101a6b(0xb3)](_0x101a6b(0x14c)+_0x34f961['projectName']),console[_0x101a6b(0xb3)]('\x20\x20Source:\x20'+_0x34f961['sourceDir']),console[_0x101a6b(0xb3)](_0x101a6b(0x145)+_0x34f961['revision']),console['error'](_0x101a6b(0x1f5)+a46_0x1f96c9[_0x101a6b(0x17f)]('+'+_0x34f961['summary'][_0x101a6b(0x205)]+_0x101a6b(0xc3))+',\x20'+(a46_0x1f96c9[_0x101a6b(0x15c)]('~'+_0x34f961[_0x101a6b(0x1cb)]['modified']+_0x101a6b(0x1bf))+',\x20')+(a46_0x1f96c9[_0x101a6b(0xb9)]('-'+_0x34f961[_0x101a6b(0x1cb)][_0x101a6b(0xd3)]+_0x101a6b(0x19a))+',\x20')+(''+a46_0x1f96c9[_0x101a6b(0x192)](_0x34f961[_0x101a6b(0x1cb)][_0x101a6b(0xf7)]+_0x101a6b(0x160))));for(const _0x2bb642 of _0x34f961[_0x101a6b(0x1ee)]){_0x2bb642[_0x101a6b(0x1e7)]==='modified'&&_0x2bb642[_0x101a6b(0x151)]&&(console[_0x101a6b(0xb3)]('\x0a'+a46_0x1f96c9[_0x101a6b(0xd9)](_0x101a6b(0x15e)+_0x2bb642[_0x101a6b(0x167)])),console[_0x101a6b(0xb3)](_0x2bb642[_0x101a6b(0x151)]));}if(!_0x34f961[_0x101a6b(0x1ec)])return console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0x17f)](_0x101a6b(0x17d))),await this[_0x101a6b(0x13d)](_0x36eb71,_0x34f961[_0x101a6b(0x191)],_0x24d268[_0x101a6b(0x1fa)]),0x0;if(_0x24d268[_0x101a6b(0x18a)])return console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0x15c)](_0x101a6b(0x1c6))),0x0;if(!_0x24d268[_0x101a6b(0x1cd)]){if(!isInteractive())return console['error'](a46_0x1f96c9['red'](_0x101a6b(0x218)),_0x101a6b(0x195)),console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0x192)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x253e4d=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x253e4d)return console['error'](a46_0x1f96c9['yellow'](_0x101a6b(0x200)),_0x101a6b(0xa0)),0x1;}const _0x244315=await withSpinner(_0x101a6b(0x1af),()=>_0x36eb71[_0x101a6b(0x1f4)][_0x101a6b(0x228)](_0x34f961),{'verbose':_0x24d268[_0x101a6b(0x1a6)]}),_0x4fb920=_0x244315['data'];return console[_0x101a6b(0xb3)](a46_0x1f96c9[_0x101a6b(0x17f)]('✔\x20Push\x20complete')),console['error']('\x20\x20Project\x20ID:\x20'+_0x4fb920[_0x101a6b(0xd2)]),console[_0x101a6b(0xb3)](_0x101a6b(0x145)+_0x4fb920[_0x101a6b(0x11b)]),await this[_0x101a6b(0x13d)](_0x36eb71,_0x4fb920['projectName'],_0x24d268[_0x101a6b(0x1fa)]),0x0;}}function a46_0x2532(_0x4b16d4,_0x228a88){_0x4b16d4=_0x4b16d4-0x7f;const _0x5415d2=a46_0x5415();let _0x253266=_0x5415d2[_0x4b16d4];return _0x253266;}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x1da);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x129);async['execute'](_0x511e27){const _0xaa6c73=a46_0x591dc6,{options:_0x53155b,args:_0x227b09,tdx:_0x1467d2}=_0x511e27,_0x229af7=this['resolveProjectDir'](_0x227b09,_0x53155b),_0x2a5d9f=_0x53155b[_0xaa6c73(0xc9)],_0x258363=_0x53155b[_0xaa6c73(0x11b)],_0x5f5121=_0x53155b[_0xaa6c73(0x124)];if(!_0x229af7)return console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0xb9)](_0xaa6c73(0x1a9)),'Source\x20directory\x20is\x20required'),console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x192)](_0xaa6c73(0xf6))),console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x192)](_0xaa6c73(0x21b))),0x1;if(!_0x2a5d9f)return console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0xb9)](_0xaa6c73(0x1a9)),_0xaa6c73(0xdd)),console[_0xaa6c73(0xb3)](a46_0x1f96c9['dim'](_0xaa6c73(0xf6))),0x1;_0x53155b[_0xaa6c73(0x1a6)]&&(console['error']('Source\x20directory:\x20'+_0x229af7),console[_0xaa6c73(0xb3)](_0xaa6c73(0xaa)+_0x2a5d9f),_0x258363&&console[_0xaa6c73(0xb3)]('Revision:\x20'+_0x258363),_0x53155b[_0xaa6c73(0x18a)]&&console[_0xaa6c73(0xb3)]('Dry\x20run:\x20yes'),_0x5f5121&&console[_0xaa6c73(0xb3)]('Validation:\x20skipped'));const _0xe3dc0d=await withSpinner(_0xaa6c73(0x196),()=>_0x1467d2[_0xaa6c73(0x1f4)]['prepareCloneProject'](_0x229af7,_0x2a5d9f,{'revision':_0x258363,'skipValidation':_0x5f5121}),{'verbose':_0x53155b['verbose']}),_0x1b716f=_0xe3dc0d[_0xaa6c73(0x164)];console[_0xaa6c73(0xb3)]('Source:\x20'+_0x1b716f['sourceDir']);_0x1b716f[_0xaa6c73(0x11f)]&&console[_0xaa6c73(0xb3)]('Source\x20project:\x20'+_0x1b716f['sourceProjectName']);console['error'](_0xaa6c73(0xaa)+_0x1b716f[_0xaa6c73(0x150)]),console[_0xaa6c73(0xb3)](_0xaa6c73(0x1d1)+_0x1b716f[_0xaa6c73(0x11b)]),console['error']('Files\x20to\x20upload:\x20'+_0x1b716f[_0xaa6c73(0xd6)]);_0x1b716f[_0xaa6c73(0x171)]&&(console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x15c)](_0xaa6c73(0x180)+_0x1b716f[_0xaa6c73(0x150)]+_0xaa6c73(0x226)+_0x1b716f[_0xaa6c73(0x101)]+')')),console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x15c)](_0xaa6c73(0xa9))));if(_0x53155b['dryRun'])return console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x15c)](_0xaa6c73(0xfa))),0x0;if(!_0x53155b['yes']){if(!isInteractive())return console[_0xaa6c73(0xb3)](a46_0x1f96c9['red'](_0xaa6c73(0x218)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x192)](_0xaa6c73(0x1e6))),0x1;const _0x2aa901=_0x1b716f[_0xaa6c73(0x11f)]||a46_0x14a963[_0xaa6c73(0x111)](_0x229af7),_0x41680a=_0x1b716f[_0xaa6c73(0x171)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x2a5d9f+_0xaa6c73(0x21a):_0xaa6c73(0x1a0)+_0x2aa901+'\x22\x20to\x20new\x20project\x20\x22'+_0x2a5d9f+'\x22?',_0x48511d=await confirmKey(_0x41680a);if(!_0x48511d)return console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x15c)](_0xaa6c73(0x200))),0x1;}const _0xd3d402=await withSpinner(_0x1b716f[_0xaa6c73(0x171)]?_0xaa6c73(0xc7)+_0x2a5d9f+_0xaa6c73(0x12f):_0xaa6c73(0x161)+_0x2a5d9f+_0xaa6c73(0x12f),()=>_0x1467d2[_0xaa6c73(0x1f4)]['executeCloneProject'](_0x1b716f),{'verbose':_0x53155b[_0xaa6c73(0x1a6)]}),_0xfa6e75=_0xd3d402['data'];return console[_0xaa6c73(0xb3)](a46_0x1f96c9[_0xaa6c73(0x17f)](_0x1b716f['targetExists']?_0xaa6c73(0xf0):_0xaa6c73(0x1b2))),console[_0xaa6c73(0xb3)](_0xaa6c73(0x15a)+_0xfa6e75['newProjectName']),console['error'](_0xaa6c73(0x169)+_0xfa6e75[_0xaa6c73(0x11a)]),console[_0xaa6c73(0xb3)](_0xaa6c73(0x145)+_0xfa6e75[_0xaa6c73(0x11b)]),await this[_0xaa6c73(0x13d)](_0x1467d2,_0xfa6e75[_0xaa6c73(0x150)],_0x53155b[_0xaa6c73(0x1fa)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x229);[a46_0x591dc6(0x193)]=a46_0x591dc6(0xad);async[a46_0x591dc6(0x1a1)](_0x35407a){const _0x77adb0=a46_0x591dc6,{options:_0x28657a,args:_0x507d6f,tdx:_0x621581}=_0x35407a,_0x5a75e1=_0x507d6f[0x0];if(!_0x5a75e1)return console['error'](_0x77adb0(0x17e)),console[_0x77adb0(0xb3)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x28657a['verbose']&&console['error'](_0x77adb0(0xb0)+_0x5a75e1);if(!_0x28657a[_0x77adb0(0x1cd)]){if(!isInteractive())return console[_0x77adb0(0xb3)](a46_0x1f96c9[_0x77adb0(0xb9)](_0x77adb0(0x218)),_0x77adb0(0x195)),console[_0x77adb0(0xb3)](a46_0x1f96c9[_0x77adb0(0x192)](_0x77adb0(0x1e6))),0x1;const _0x2f5367=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x5a75e1+_0x77adb0(0x125));if(!_0x2f5367)return console[_0x77adb0(0xb3)](a46_0x1f96c9[_0x77adb0(0x15c)](_0x77adb0(0x200))),0x1;}const _0x16ff8c=await withSpinner(_0x77adb0(0x1fc)+_0x5a75e1+_0x77adb0(0x12f),()=>_0x621581[_0x77adb0(0x1f4)][_0x77adb0(0x8d)](_0x5a75e1),{'verbose':_0x28657a[_0x77adb0(0x1a6)]}),_0x4f70d6=_0x16ff8c['data'];return console[_0x77adb0(0xb3)](_0x77adb0(0x90)+_0x4f70d6[_0x77adb0(0x191)]),console[_0x77adb0(0xb3)](_0x77adb0(0x169)+_0x4f70d6[_0x77adb0(0xd2)]),0x0;}}export function parseKeyValue(_0xc606e4){const _0x419b2c=a46_0x591dc6,_0x42a4ba=_0xc606e4[_0x419b2c(0xe5)]('=');if(_0x42a4ba===-0x1)throw new Error(_0x419b2c(0x132)+_0xc606e4+_0x419b2c(0x1ab));const _0x3f7e8d=_0xc606e4[_0x419b2c(0x201)](0x0,_0x42a4ba),_0x50eb01=_0xc606e4[_0x419b2c(0x201)](_0x42a4ba+0x1);if(!_0x3f7e8d)throw new Error(_0x419b2c(0xf2));return{'key':_0x3f7e8d,'value':_0x50eb01};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x176);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x1e8);async['execute'](_0x48c514){const _0x5ea267=a46_0x591dc6,{options:_0x488049,args:_0x1e7197,tdx:_0x5c7f0e}=_0x48c514,_0x3f3989=this['requireProject'](_0x1e7197,_0x488049);if(!_0x3f3989)return 0x1;_0x488049[_0x5ea267(0x1a6)]&&console['error'](_0x5ea267(0xb0)+_0x3f3989);const _0x2ac552=await withSpinner(_0x5ea267(0x225),()=>_0x5c7f0e[_0x5ea267(0x1f4)][_0x5ea267(0x186)](_0x3f3989),{'verbose':_0x488049[_0x5ea267(0x1a6)]}),{secrets:_0x285934}=_0x2ac552[_0x5ea267(0x164)];return console[_0x5ea267(0xb3)](_0x5ea267(0x182)+_0x285934[_0x5ea267(0x1ff)]+_0x5ea267(0xcf)+(_0x285934['length']!==0x1?'s':'')),await handleSDKOutput(_0x285934,_0x488049),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a46_0x591dc6(0x105);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x149);async['execute'](_0x541e64){const _0x48817e=a46_0x591dc6,{options:_0x57a14f,args:_0x403ade,tdx:_0x2a9bfb}=_0x541e64;let _0x4afdb2,_0x29ba21;if(_0x403ade['length']>=0x2)_0x4afdb2=_0x403ade[0x0],_0x29ba21=_0x403ade[0x1];else{if(_0x403ade[_0x48817e(0x1ff)]===0x1&&_0x57a14f[_0x48817e(0x12c)])_0x4afdb2=_0x57a14f[_0x48817e(0x12c)],_0x29ba21=_0x403ade[0x0];else return _0x403ade[_0x48817e(0x1ff)]===0x1?(console['error'](_0x48817e(0x1b5)),console[_0x48817e(0xb3)](_0x48817e(0x83)),0x1):(console[_0x48817e(0xb3)]('Error:\x20KEY=VALUE\x20is\x20required'),console[_0x48817e(0xb3)](_0x48817e(0x9c)),0x1);}let _0x4e0c2f,_0x445cbb;try{({key:_0x4e0c2f,value:_0x445cbb}=parseKeyValue(_0x29ba21));}catch(_0x222332){return _0x222332 instanceof Error&&console[_0x48817e(0xb3)](a46_0x1f96c9['red'](_0x48817e(0x1a9)),_0x222332[_0x48817e(0x18e)]),0x1;}_0x57a14f[_0x48817e(0x1a6)]&&(console[_0x48817e(0xb3)](_0x48817e(0xb0)+_0x4afdb2),console['error'](_0x48817e(0x1fd)+_0x4e0c2f));const _0x141511=await withSpinner('Setting\x20secret...',()=>_0x2a9bfb[_0x48817e(0x1f4)][_0x48817e(0x109)](_0x4afdb2,_0x4e0c2f,_0x445cbb),{'verbose':_0x57a14f[_0x48817e(0x1a6)]}),_0xdc055=_0x141511[_0x48817e(0x164)];return console[_0x48817e(0xb3)](_0x48817e(0x87)+_0xdc055[_0x48817e(0x21f)]+_0x48817e(0x197)+_0xdc055[_0x48817e(0x191)]+'\x27'),(_0x57a14f[_0x48817e(0x1fb)]||_0x57a14f['jsonl'])&&await handleSingleObjectOutput(_0xdc055,_0x57a14f),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a46_0x591dc6(0xc9)]=a46_0x591dc6(0x137);[a46_0x591dc6(0x193)]=a46_0x591dc6(0x22a);async[a46_0x591dc6(0x1a1)](_0x30a400){const _0x1d210a=a46_0x591dc6,{options:_0x30bdab,args:_0x57bb64,tdx:_0x193785}=_0x30a400;let _0x129784,_0x366049;if(_0x57bb64[_0x1d210a(0x1ff)]>=0x2)_0x129784=_0x57bb64[0x0],_0x366049=_0x57bb64[0x1];else{if(_0x57bb64[_0x1d210a(0x1ff)]===0x1&&_0x30bdab['workflowProject'])_0x129784=_0x30bdab[_0x1d210a(0x12c)],_0x366049=_0x57bb64[0x0];else return _0x57bb64['length']===0x1?(console[_0x1d210a(0xb3)](_0x1d210a(0x1b5)),console[_0x1d210a(0xb3)](_0x1d210a(0x83)),0x1):(console[_0x1d210a(0xb3)](_0x1d210a(0x215)),console[_0x1d210a(0xb3)](_0x1d210a(0x108)),0x1);}_0x30bdab['verbose']&&(console[_0x1d210a(0xb3)](_0x1d210a(0xb0)+_0x129784),console[_0x1d210a(0xb3)]('Key:\x20'+_0x366049));if(!_0x30bdab[_0x1d210a(0x1cd)]){if(!isInteractive())return console[_0x1d210a(0xb3)](a46_0x1f96c9[_0x1d210a(0xb9)](_0x1d210a(0x218)),_0x1d210a(0x195)),console[_0x1d210a(0xb3)](a46_0x1f96c9[_0x1d210a(0x192)](_0x1d210a(0x1e6))),0x1;const _0x2c4418=await confirmKey(_0x1d210a(0x209)+_0x366049+_0x1d210a(0x1c7)+_0x129784+'\x27?');if(!_0x2c4418)return console[_0x1d210a(0xb3)](a46_0x1f96c9['yellow'](_0x1d210a(0x200))),0x1;}const _0x3be673=await withSpinner(_0x1d210a(0xc6),()=>_0x193785['workflow']['deleteSecret'](_0x129784,_0x366049),{'verbose':_0x30bdab[_0x1d210a(0x1a6)]}),_0x3fa871=_0x3be673[_0x1d210a(0x164)];return console['error'](_0x1d210a(0x87)+_0x3fa871[_0x1d210a(0x21f)]+_0x1d210a(0x113)+_0x3fa871[_0x1d210a(0x191)]+'\x27'),(_0x30bdab['json']||_0x30bdab[_0x1d210a(0x1d8)])&&await handleSingleObjectOutput(_0x3fa871,_0x30bdab),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x4d6956){const _0x318b2f=a46_0x591dc6,_0x291eca=Math[_0x318b2f(0x1df)](_0x4d6956/0x3e8),_0x1d2032=Math[_0x318b2f(0x1df)](_0x291eca/0x3c),_0x118473=Math[_0x318b2f(0x1df)](_0x1d2032/0x3c),_0x4d3966=Math['floor'](_0x118473/0x18);if(_0x4d3966>0x0){const _0x19e9fd=_0x118473%0x18;return _0x19e9fd>0x0?_0x4d3966+'d\x20'+_0x19e9fd+'h':_0x4d3966+'d';}else{if(_0x118473>0x0){const _0x50f46e=_0x1d2032%0x3c;return _0x50f46e>0x0?_0x118473+'h\x20'+_0x50f46e+'m':_0x118473+'h';}else{if(_0x1d2032>0x0){const _0x32fad8=_0x291eca%0x3c;return _0x32fad8>0x0?_0x1d2032+'m\x20'+_0x32fad8+'s':_0x1d2032+'m';}else return _0x291eca+'s';}}}function formatTimestamp(_0x164b2b,_0x477106){const _0x42959c=a46_0x591dc6,_0x4d7de0=new Date(_0x164b2b),_0x401497=String(_0x4d7de0['getHours']())['padStart'](0x2,'0'),_0x52b2a6=String(_0x4d7de0['getMinutes']())[_0x42959c(0xed)](0x2,'0'),_0x1c9773=_0x401497+':'+_0x52b2a6,_0x1ed625=_0x4d7de0[_0x42959c(0x11c)]()===_0x477106[_0x42959c(0x11c)]()&&_0x4d7de0[_0x42959c(0xb5)]()===_0x477106['getMonth']()&&_0x4d7de0[_0x42959c(0x89)]()===_0x477106['getDate']();if(_0x1ed625)return _0x1c9773;else{const _0x549d49=String(_0x4d7de0[_0x42959c(0xb5)]()+0x1)[_0x42959c(0xed)](0x2,'0'),_0x70420e=String(_0x4d7de0['getDate']())[_0x42959c(0xed)](0x2,'0');return _0x549d49+'-'+_0x70420e+'\x20'+_0x1c9773;}}function formatDate(_0x484673){const _0x171ad2=a46_0x591dc6,_0x223867=_0x484673[_0x171ad2(0x11c)](),_0x5549f2=String(_0x484673[_0x171ad2(0xb5)]()+0x1)['padStart'](0x2,'0'),_0xb24153=String(_0x484673['getDate']())[_0x171ad2(0xed)](0x2,'0');return _0x223867+'-'+_0x5549f2+'-'+_0xb24153;}function getTaskStateIcon(_0x412f1f){const _0x1ab5a7={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1ab5a7[_0x412f1f]||'⚪';}function getBarChar(_0x23db8d){const _0x5c8c42=a46_0x591dc6;return _0x23db8d===_0x5c8c42(0xb3)||_0x23db8d===_0x5c8c42(0x85)?'×':'─';}function getBarColor(_0x129267){const _0x205c27=a46_0x591dc6,_0x21d1a6={'success':a46_0x1f96c9[_0x205c27(0x17f)],'error':a46_0x1f96c9['red'],'group_error':a46_0x1f96c9[_0x205c27(0xb9)],'running':a46_0x1f96c9[_0x205c27(0x122)],'blocked':a46_0x1f96c9['yellow'],'planned':a46_0x1f96c9[_0x205c27(0x192)],'canceling':a46_0x1f96c9[_0x205c27(0x15c)]};return _0x21d1a6[_0x129267]||a46_0x1f96c9[_0x205c27(0x120)];}function parseTaskName(_0x269d39){const _0x2fd023=a46_0x591dc6;let _0x1b0857=_0x269d39['replace'](/^\++/,'');const _0x33ec6d=_0x1b0857[_0x2fd023(0x1a4)]('+'),_0x11c9a7=_0x33ec6d[_0x2fd023(0x1ff)]>0x1?_0x33ec6d['length']-0x2:0x0,_0x500725=_0x33ec6d[_0x33ec6d['length']-0x1]||_0x1b0857;return{'level':_0x11c9a7,'name':'+'+_0x500725};}function truncateTaskName(_0x3d993b,_0x50853d){const _0xbb01bf=a46_0x591dc6,_0x2d3636=stringWidth(_0x3d993b);if(_0x2d3636<=_0x50853d)return _0x3d993b;let _0x434bae=_0x3d993b;while(stringWidth(_0x434bae+'…')>_0x50853d&&_0x434bae[_0xbb01bf(0x1ff)]>0x0){_0x434bae=_0x434bae[_0xbb01bf(0x130)](0x0,-0x1);}return _0x434bae+'…';}function calculateTimeScale(_0x357a78,_0x44569c){const _0xc60444=a46_0x591dc6;return{'startTime':_0x357a78[_0xc60444(0x1f9)],'endTime':_0x357a78[_0xc60444(0x177)],'durationMs':_0x357a78[_0xc60444(0x22c)],'msPerChar':_0x357a78[_0xc60444(0x22c)]/_0x44569c};}function timeToPosition(_0x3f457d,_0x93e0a0,_0x357df8){const _0x41e1db=a46_0x591dc6,_0x48d351=_0x3f457d-_0x93e0a0[_0x41e1db(0x136)],_0x22eeaa=Math[_0x41e1db(0x1df)](_0x48d351/_0x93e0a0[_0x41e1db(0xc4)]);return Math[_0x41e1db(0x13e)](0x0,Math[_0x41e1db(0x80)](_0x22eeaa,_0x357df8));}function renderTimeAxis(_0x45b9b8,_0x500a03){const _0x57eeb3=a46_0x591dc6,_0x9cdb9f=Math[_0x57eeb3(0x80)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x57eeb3(0x13e)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x57eeb3(0x1df)](_0x500a03/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x4858d1=_0x45b9b8['durationMs']/(_0x9cdb9f-0x1),_0x437d36=new Date(_0x45b9b8[_0x57eeb3(0x136)]),_0x3770fc=[];for(let _0x52ad37=0x0;_0x52ad37<_0x9cdb9f;_0x52ad37++){const _0x563aa5=_0x45b9b8[_0x57eeb3(0x136)]+_0x52ad37*_0x4858d1,_0x239119=timeToPosition(_0x563aa5,_0x45b9b8,_0x500a03),_0x33af50=formatTimestamp(_0x563aa5,_0x437d36);_0x3770fc[_0x57eeb3(0x1dd)]({'pos':_0x239119,'text':_0x33af50});}const _0x522c5d=new Array(_0x500a03)['fill']('\x20');let _0xd56e35=-0x1;for(const {pos:_0x46cc30,text:_0x45f942}of _0x3770fc){let _0x3b0c61=Math['max'](0x0,_0x46cc30-Math[_0x57eeb3(0x1df)](_0x45f942[_0x57eeb3(0x1ff)]/0x2));_0x3b0c61<=_0xd56e35+TIMELINE_CONFIG[_0x57eeb3(0x17b)]&&(_0x3b0c61=_0xd56e35+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x3b0c61+_0x45f942[_0x57eeb3(0x1ff)]>_0x500a03&&(_0x3b0c61=_0x500a03-_0x45f942['length']);if(_0x3b0c61>=0x0&&_0x3b0c61+_0x45f942[_0x57eeb3(0x1ff)]<=_0x500a03&&_0x3b0c61>_0xd56e35){for(let _0x122703=0x0;_0x122703<_0x45f942['length'];_0x122703++){_0x522c5d[_0x3b0c61+_0x122703]=_0x45f942[_0x122703];}_0xd56e35=_0x3b0c61+_0x45f942[_0x57eeb3(0x1ff)]-0x1;}}return _0x522c5d[_0x57eeb3(0x84)]('');}function renderTaskRow(_0x2a25ca,_0x2c3506,_0x5a7754,_0x41a5a9){const _0x4e8606=a46_0x591dc6,{level:_0x3edb52,name:_0x2a36ca}=parseTaskName(_0x2a25ca[_0x4e8606(0xc9)]),_0x378c78='\x20'[_0x4e8606(0x20d)](_0x3edb52),_0x2d8919=_0x2a25ca[_0x4e8606(0x1cc)]?'('+formatElapsed(_0x2a25ca[_0x4e8606(0x1cc)][_0x4e8606(0x22c)])+')':'',_0x2a3981=stringWidth(_0x2d8919),_0x2efba8=_0x3edb52*0x1,_0x57480e=_0x41a5a9-_0x2efba8-_0x2a3981-0x1,_0x18a197=truncateTaskName(_0x2a36ca,_0x57480e),_0x41905e=_0x378c78+_0x18a197,_0x2755bd=stringWidth(_0x41905e),_0x464669=_0x41a5a9-_0x2755bd-_0x2a3981,_0x3be83f=_0x41905e+'\x20'[_0x4e8606(0x20d)](Math[_0x4e8606(0x13e)](0x1,_0x464669))+a46_0x1f96c9['dim'](_0x2d8919),_0x18c578=getTaskStateIcon(_0x2a25ca['state']),_0x39318f=new Array(_0x5a7754)[_0x4e8606(0x187)]('\x20');if(_0x2a25ca[_0x4e8606(0x1cc)]){const _0x4ba5ec=timeToPosition(_0x2a25ca[_0x4e8606(0x1cc)][_0x4e8606(0x1f9)],_0x2c3506,_0x5a7754),_0x59b05b=timeToPosition(_0x2a25ca[_0x4e8606(0x1cc)]['end'],_0x2c3506,_0x5a7754),_0x35f798=getBarChar(_0x2a25ca[_0x4e8606(0xb2)]),_0x216068=Math['max'](_0x4ba5ec+0x1,_0x59b05b);for(let _0x20c21f=_0x4ba5ec;_0x20c21f<Math[_0x4e8606(0x80)](_0x216068,_0x5a7754);_0x20c21f++){_0x39318f[_0x20c21f]=_0x35f798;}}const _0xa0edbd=getBarColor(_0x2a25ca[_0x4e8606(0xb2)]),_0x2a0926=_0x39318f[_0x4e8606(0x112)](_0x52a672=>_0x52a672==='\x20'?'\x20':_0xa0edbd(_0x52a672))['join']('');return _0x18c578+'\x20'+_0x3be83f+'│'+_0x2a0926+'│';}function calculateStats(_0x36e205){const _0x4b01d4=a46_0x591dc6,_0x1b08f0={'total':_0x36e205[_0x4b01d4(0x1ff)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x1bc202 of _0x36e205){if(_0x1bc202['state']===_0x4b01d4(0xb1))_0x1b08f0[_0x4b01d4(0xb1)]++;else{if(_0x1bc202[_0x4b01d4(0xb2)]===_0x4b01d4(0xb3)||_0x1bc202[_0x4b01d4(0xb2)]==='group_error')_0x1b08f0[_0x4b01d4(0xb3)]++;else _0x1bc202[_0x4b01d4(0xb2)]===_0x4b01d4(0x185)?_0x1b08f0[_0x4b01d4(0x185)]++:_0x1b08f0['pending']++;}}return _0x1b08f0;}function formatStats(_0x3f57ec){const _0x2984b9=a46_0x591dc6;return['Total:\x20'+_0x3f57ec[_0x2984b9(0x1ca)],'✅\x20'+_0x3f57ec[_0x2984b9(0xb1)],'❌\x20'+_0x3f57ec[_0x2984b9(0xb3)],'🔄\x20'+_0x3f57ec[_0x2984b9(0x185)],'⏳\x20'+_0x3f57ec[_0x2984b9(0x1c9)]][_0x2984b9(0x84)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a46_0x591dc6(0x1c2);['description']=a46_0x591dc6(0x168);async['execute'](_0x52c25c){const _0x15b007=a46_0x591dc6,{options:_0x2e2c31,args:_0x478a02,tdx:_0x1a2613}=_0x52c25c;let _0x3c2189,_0x5403b2,_0x5327fe=![];if(_0x478a02[0x0]){if(_0x478a02[0x0][_0x15b007(0x18c)]('.')){const _0x259f0f=this[_0x15b007(0x1e1)](_0x478a02,_0x2e2c31);if(!_0x259f0f)return 0x1;_0x3c2189=_0x259f0f[_0x15b007(0x191)],_0x5403b2=_0x259f0f[_0x15b007(0x12d)];}else{_0x5403b2=_0x478a02[0x0],_0x3c2189=_0x2e2c31[_0x15b007(0x12c)];if(!_0x3c2189)return console[_0x15b007(0xb3)](a46_0x1f96c9['red'](_0x15b007(0x1a9)),_0x15b007(0x153)),0x1;_0x5327fe=!![];}}else{const _0x1e8ecc=this['parseProjectWorkflowPattern'](_0x478a02,_0x2e2c31);if(!_0x1e8ecc)return 0x1;_0x3c2189=_0x1e8ecc[_0x15b007(0x191)],_0x5403b2=_0x1e8ecc[_0x15b007(0x12d)];}if(_0x2e2c31[_0x15b007(0x1a6)]){if(_0x3c2189&&_0x5403b2)console[_0x15b007(0xb3)]('Filter:\x20'+_0x3c2189+'.'+_0x5403b2);else _0x3c2189&&console['error'](_0x15b007(0x204)+_0x3c2189);}const _0x355a97=_0x2e2c31[_0x15b007(0x1c8)],_0x40ec71=_0x2e2c31[_0x15b007(0xee)];if(_0x355a97){_0x40ec71&&console[_0x15b007(0xb3)](a46_0x1f96c9[_0x15b007(0x15c)](_0x15b007(0xd1)),_0x15b007(0xdf));const _0x1dcf97=_0x2e2c31[_0x15b007(0x227)];return _0x1dcf97?await this[_0x15b007(0xce)](_0x52c25c,_0x355a97):await this[_0x15b007(0xf3)](_0x52c25c,_0x355a97,_0x2e2c31),0x0;}if(_0x40ec71){const _0x572cdc=await withSpinner(_0x15b007(0xe8),()=>_0x1a2613['workflow']['sessions']({'projectName':_0x3c2189,'workflowName':_0x5403b2,'limit':0x64}),{'verbose':_0x2e2c31[_0x15b007(0x1a6)]}),_0x45f22e=_0x572cdc[_0x15b007(0x164)][_0x15b007(0x1a2)](_0x29b14b=>_0x29b14b['id']===_0x40ec71);if(!_0x45f22e)return console[_0x15b007(0xb3)](a46_0x1f96c9[_0x15b007(0xb9)]('Error:'),_0x15b007(0x20f)+_0x40ec71),0x1;if(!_0x45f22e['lastAttempt']?.['id'])return console[_0x15b007(0xb3)](a46_0x1f96c9['red'](_0x15b007(0x1a9)),_0x15b007(0x162)+_0x40ec71+_0x15b007(0xfc)),0x1;const _0x5e132b=_0x45f22e['lastAttempt']['id'];_0x2e2c31['verbose']&&console[_0x15b007(0xb3)](_0x15b007(0xb4)+_0x5e132b+'\x20from\x20session\x20'+_0x40ec71);const _0x45b306=_0x2e2c31[_0x15b007(0x227)];return _0x45b306?await this['pollTimeline'](_0x52c25c,_0x5e132b):await this[_0x15b007(0xf3)](_0x52c25c,_0x5e132b,_0x2e2c31),0x0;}const _0x3beada=await withSpinner(_0x15b007(0xa6),()=>_0x1a2613[_0x15b007(0x1f4)][_0x15b007(0x1be)]({'projectName':_0x3c2189,'workflowName':_0x5403b2,'limit':_0x2e2c31[_0x15b007(0xa1)]||0x32}),{'verbose':_0x2e2c31[_0x15b007(0x1a6)]}),_0x538402=_0x3beada[_0x15b007(0x164)];if(_0x538402[_0x15b007(0x1ff)]===0x0){if(_0x3c2189&&_0x5403b2)console[_0x15b007(0xb3)](_0x15b007(0x1b0)+_0x3c2189+'.'+_0x5403b2);else _0x3c2189?console[_0x15b007(0xb3)](_0x15b007(0x181)+_0x3c2189):(console['error'](_0x15b007(0xbe)),console['error'](a46_0x1f96c9['dim'](_0x15b007(0x8c))));return 0x0;}_0x538402[_0x15b007(0xf9)]((_0x1c2c30,_0xd15ae)=>{const _0x53fb43=_0x15b007,_0xc858d0=_0x1c2c30[_0x53fb43(0x1a5)]||'',_0x3a309e=_0xd15ae[_0x53fb43(0x1a5)]||'';return _0x3a309e['localeCompare'](_0xc858d0);});if(_0x2e2c31[_0x15b007(0x1fb)]||_0x2e2c31[_0x15b007(0x1d8)])return await handleSDKOutput(_0x538402,_0x2e2c31),0x0;let _0x56c8b5;if(_0x5327fe){const _0x56c17e=_0x538402[0x0];if(!_0x56c17e[_0x15b007(0xae)]?.['id'])return console['error']('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x56c8b5=_0x56c17e[_0x15b007(0xae)]['id'],_0x2e2c31[_0x15b007(0x1a6)]&&console[_0x15b007(0xb3)](_0x15b007(0x16a)+_0x56c17e['sessionTime']);}else{const _0x2f545c=_0x538402['map'](_0x51315c=>{const _0x846fa3=_0x15b007,_0x1fb9ea=getAttemptStatusDisplay(_0x51315c[_0x846fa3(0xae)]);return{'title':_0x51315c[_0x846fa3(0x1f6)]?.[_0x846fa3(0xc9)]+'.'+_0x51315c[_0x846fa3(0x1f4)]?.[_0x846fa3(0xc9)]+_0x846fa3(0xff)+_0x51315c[_0x846fa3(0x1a5)]+'\x20'+_0x1fb9ea[_0x846fa3(0xf5)],'value':_0x51315c[_0x846fa3(0xae)]?.['id']||'','description':_0x1fb9ea[_0x846fa3(0x220)]};}),_0x3e74c1=await a46_0x1147d5({'type':'select','name':_0x15b007(0x1c8),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x2f545c[_0x15b007(0x214)](_0x568ed9=>_0x568ed9['value']!=='')});if(!_0x3e74c1['attemptId'])return 0x0;_0x56c8b5=_0x3e74c1['attemptId'];}const _0x2eb482=_0x2e2c31[_0x15b007(0x227)];return _0x2eb482?await this[_0x15b007(0xce)](_0x52c25c,_0x56c8b5):await this['renderSingleTimeline'](_0x52c25c,_0x56c8b5,_0x2e2c31),0x0;}async[a46_0x591dc6(0xf3)](_0x257268,_0x54a38d,_0x36b4b9){const _0x4bd3e8=a46_0x591dc6,{tdx:_0x1166b0}=_0x257268;let _0x2928a3,_0x43160d;try{[_0x2928a3,_0x43160d]=await Promise[_0x4bd3e8(0x88)]([_0x1166b0[_0x4bd3e8(0x1f4)]['attempt'](_0x54a38d),_0x1166b0[_0x4bd3e8(0x1f4)][_0x4bd3e8(0x14a)](_0x54a38d,![])]);}catch(_0x57bec1){console[_0x4bd3e8(0xb3)](a46_0x1f96c9[_0x4bd3e8(0xb9)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x36b4b9[_0x4bd3e8(0x1a6)]&&console['error'](_0x57bec1);throw _0x57bec1;}if(_0x36b4b9[_0x4bd3e8(0x1fb)]||_0x36b4b9['jsonl']){const _0x19744a=this[_0x4bd3e8(0x142)](_0x2928a3,_0x43160d);await handleSDKOutput([_0x19744a],_0x36b4b9);return;}const _0x348055=_0x1166b0[_0x4bd3e8(0x19c)][_0x4bd3e8(0x1fa)],_0xd1752c=this[_0x4bd3e8(0xa2)](_0x2928a3,_0x43160d,_0x348055);console['log'](_0xd1752c);}async[a46_0x591dc6(0xce)](_0x3067aa,_0x4b4253){const _0x23f49d=a46_0x591dc6,{tdx:_0x5acc37}=_0x3067aa,_0x3f9b1d=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x42ce4d=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x99f558=0x0;while(_0x99f558<_0x42ce4d){process[_0x23f49d(0xf4)][_0x23f49d(0xe9)]&&process[_0x23f49d(0xf4)][_0x23f49d(0xeb)]('\x1bc');let _0x7a9d12,_0x35ab1e;try{[_0x7a9d12,_0x35ab1e]=await Promise['all']([_0x5acc37[_0x23f49d(0x1f4)][_0x23f49d(0x95)](_0x4b4253),_0x5acc37[_0x23f49d(0x1f4)][_0x23f49d(0x14a)](_0x4b4253,![])]);}catch(_0x4c21aa){console[_0x23f49d(0xb3)](a46_0x1f96c9[_0x23f49d(0xb9)](_0x23f49d(0x156)));_0x99f558>0x0&&console[_0x23f49d(0xb3)](a46_0x1f96c9[_0x23f49d(0x192)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x99f558));throw _0x4c21aa;}const _0x2d5460=_0x5acc37['context'][_0x23f49d(0x1fa)],_0x18d4ba=this[_0x23f49d(0xa2)](_0x7a9d12,_0x35ab1e,_0x2d5460);console['log'](_0x18d4ba);const _0x2de901=_0x7a9d12[_0x23f49d(0xe2)]&&_0x35ab1e['every'](_0x47531a=>_0x47531a[_0x23f49d(0xb2)]!==_0x23f49d(0x185)&&_0x47531a['state']!=='planned');if(_0x2de901){console[_0x23f49d(0xb3)](a46_0x1f96c9[_0x23f49d(0x17f)](_0x23f49d(0xd0)));break;}console[_0x23f49d(0xb3)](a46_0x1f96c9[_0x23f49d(0x192)](_0x23f49d(0x210)+_0x99f558*0x2+_0x23f49d(0xbb))),await new Promise(_0x440ce3=>setTimeout(_0x440ce3,_0x3f9b1d)),_0x99f558++;}_0x99f558>=_0x42ce4d&&console[_0x23f49d(0xb3)](a46_0x1f96c9['yellow'](_0x23f49d(0x173)));}[a46_0x591dc6(0xa2)](_0x4f5973,_0x5a9bf1,_0x4926e9){const _0xa85c74=a46_0x591dc6,_0x2165e1=[],_0x53d95e=TIMELINE_CONFIG[_0xa85c74(0x16b)],_0x1a870b=0x5,_0x2a6e02=process[_0xa85c74(0xf4)][_0xa85c74(0x1ae)]||0x78,_0x5acf47=_0x2a6e02-_0x53d95e-_0x1a870b,_0x258584=Math[_0xa85c74(0x13e)](TIMELINE_CONFIG[_0xa85c74(0x14e)],Math['min'](_0x5acf47,TIMELINE_CONFIG[_0xa85c74(0x110)])),_0x31eae7=new Date(_0x4f5973[_0xa85c74(0x154)])[_0xa85c74(0xa4)](),_0x4ebc04=_0x4f5973[_0xa85c74(0x152)]?new Date(_0x4f5973[_0xa85c74(0x152)])['getTime']():Date[_0xa85c74(0x20b)](),_0x53f2bf={'start':_0x31eae7,'end':_0x4ebc04,'duration':_0x4ebc04-_0x31eae7},_0x1a74d5=new Map(),_0x5d1fea=[];for(const _0x18dd83 of _0x5a9bf1){if(_0x18dd83['startedAt']){const _0x1e62de=new Date(_0x18dd83[_0xa85c74(0x1f2)])['getTime'](),_0x55ce1e=_0x18dd83['updatedAt']?new Date(_0x18dd83[_0xa85c74(0x1f3)])[_0xa85c74(0xa4)]():Date[_0xa85c74(0x20b)](),_0x21c64a={'start':_0x1e62de,'end':_0x55ce1e,'duration':_0x55ce1e-_0x1e62de};_0x1a74d5[_0xa85c74(0x1f8)](_0x18dd83['id'],_0x21c64a),_0x5d1fea['push']({'name':_0x18dd83[_0xa85c74(0x1f0)],'state':_0x18dd83[_0xa85c74(0xb2)]||'unknown','window':_0x21c64a});}else _0x5d1fea[_0xa85c74(0x1dd)]({'name':_0x18dd83[_0xa85c74(0x1f0)],'state':_0x18dd83[_0xa85c74(0xb2)]||_0xa85c74(0x16d),'window':undefined});}_0x5d1fea['sort']((_0x417744,_0x223d6b)=>{const _0x2fe4e7=_0xa85c74;if(!_0x417744[_0x2fe4e7(0x1cc)])return 0x1;if(!_0x223d6b[_0x2fe4e7(0x1cc)])return-0x1;return _0x417744[_0x2fe4e7(0x1cc)]['start']-_0x223d6b['window'][_0x2fe4e7(0x1f9)];});const _0x523b76=_0x5d1fea[_0xa85c74(0x1ff)],_0x5cbcc9=_0x523b76>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x5cbcc9&&_0x5d1fea[_0xa85c74(0x207)](TIMELINE_CONFIG[_0xa85c74(0x139)]);const _0x2c43ab=calculateTimeScale(_0x53f2bf,_0x258584),_0x9ed2a8=_0x4f5973[_0xa85c74(0xe2)]?_0x4f5973[_0xa85c74(0xb1)]?a46_0x1f96c9[_0xa85c74(0x17f)](_0xa85c74(0xb1)):a46_0x1f96c9[_0xa85c74(0xb9)](_0xa85c74(0xb3)):a46_0x1f96c9[_0xa85c74(0x122)]('running'),_0x4a8cb4=_0x4f5973[_0xa85c74(0x1f6)]?.['id'],_0x51f3da=_0x4f5973[_0xa85c74(0xee)];let _0x2a5eed;if(_0x4a8cb4&&_0x51f3da){const _0x3abe28=getWorkflowAttemptUrl(_0x4926e9,_0x4a8cb4,_0x51f3da,_0x4f5973['id']);_0x2a5eed=hyperlink(a46_0x1f96c9[_0xa85c74(0x192)](_0x4f5973['id']),_0x3abe28);}else _0x2a5eed=a46_0x1f96c9[_0xa85c74(0x192)](_0x4f5973['id']);_0x2165e1[_0xa85c74(0x1dd)](_0xa85c74(0x86)+_0x2a5eed+_0xa85c74(0xff)+_0x9ed2a8+_0xa85c74(0xff)+formatElapsed(_0x53f2bf[_0xa85c74(0x22c)]));if(_0x5d1fea['length']>0x0){const _0x11f384=renderTimeAxis(_0x2c43ab,_0x258584),_0x5093ab=new Date(_0x53f2bf[_0xa85c74(0x1f9)]),_0x6781f5=formatDate(_0x5093ab),_0x90687a=TIMELINE_CONFIG[_0xa85c74(0x1dc)]+TIMELINE_CONFIG[_0xa85c74(0x1e3)]+_0x53d95e,_0x578a70=_0x6781f5[_0xa85c74(0xed)](_0x90687a),_0x56e8f9=a46_0x1f96c9[_0xa85c74(0x192)](_0x578a70);_0x2165e1[_0xa85c74(0x1dd)](_0x56e8f9+'\x20'+_0x11f384);for(const _0x5572f9 of _0x5d1fea){_0x2165e1[_0xa85c74(0x1dd)](renderTaskRow(_0x5572f9,_0x2c43ab,_0x258584,_0x53d95e));}const _0x1040d4=calculateStats(_0x5d1fea);_0x2165e1[_0xa85c74(0x1dd)](formatStats(_0x1040d4)),_0x5cbcc9&&_0x2165e1[_0xa85c74(0x1dd)](a46_0x1f96c9['yellow'](_0xa85c74(0x134)+TIMELINE_CONFIG[_0xa85c74(0x139)]+'\x20of\x20'+_0x523b76+'\x20tasks')),_0x2165e1[_0xa85c74(0x1dd)](''),_0x2165e1[_0xa85c74(0x1dd)](a46_0x1f96c9['dim']('💡\x20Tip:\x20Use\x20')+(_0xa85c74(0x14b)+_0x4f5973['id']+_0xa85c74(0x121))+a46_0x1f96c9[_0xa85c74(0x192)](_0xa85c74(0x143)));}else _0x2165e1['push'](_0xa85c74(0xb6));return _0x2165e1[_0xa85c74(0x84)]('\x0a');}['buildTimelineData'](_0x660512,_0x9fc5bf){const _0x302563=a46_0x591dc6,_0x1fb1b4=new Date(_0x660512[_0x302563(0x154)])[_0x302563(0xa4)](),_0xa2484a=_0x660512[_0x302563(0x152)]?new Date(_0x660512[_0x302563(0x152)])[_0x302563(0xa4)]():Date[_0x302563(0x20b)](),_0x37bac6=_0xa2484a-_0x1fb1b4,_0x182e12=[];for(const _0x42185b of _0x9fc5bf){if(_0x42185b[_0x302563(0x1f2)]){const _0x2a3dbf=new Date(_0x42185b[_0x302563(0x1f2)])[_0x302563(0xa4)](),_0x47c554=_0x42185b['updatedAt']?new Date(_0x42185b[_0x302563(0x1f3)])[_0x302563(0xa4)]():Date[_0x302563(0x20b)]();_0x182e12['push']({'name':_0x42185b[_0x302563(0x1f0)],'state':_0x42185b[_0x302563(0xb2)]||'unknown','window':{'start':_0x2a3dbf,'end':_0x47c554,'duration':_0x47c554-_0x2a3dbf}});}else _0x182e12['push']({'name':_0x42185b[_0x302563(0x1f0)],'state':_0x42185b[_0x302563(0xb2)]||_0x302563(0x16d),'window':undefined});}const _0x4c0cb6=calculateStats(_0x182e12);return{'attempt':{'id':_0x660512['id'],'status':_0x660512[_0x302563(0xe2)]?_0x660512['success']?_0x302563(0xb1):_0x302563(0xb3):_0x302563(0x185),'createdAt':_0x660512['createdAt'],'finishedAt':_0x660512[_0x302563(0x152)],'duration_ms':_0x37bac6},'tasks':_0x182e12[_0x302563(0x112)](_0x3416ae=>({'name':_0x3416ae[_0x302563(0xc9)],'state':_0x3416ae[_0x302563(0xb2)],'startedAt':_0x3416ae['window']?new Date(_0x3416ae[_0x302563(0x1cc)][_0x302563(0x1f9)])['toISOString']():null,'updatedAt':_0x3416ae['window']?new Date(_0x3416ae[_0x302563(0x1cc)][_0x302563(0x177)])[_0x302563(0x102)]():null,'duration_ms':_0x3416ae[_0x302563(0x1cc)]?.[_0x302563(0x22c)]||null})),'stats':_0x4c0cb6};}}
|
|
1
|
+
const a46_0x49f959=a46_0x9ea7;(function(_0x2665a1,_0x5d62f0){const _0x28f6bb=a46_0x9ea7,_0xa82152=_0x2665a1();while(!![]){try{const _0x4aea52=parseInt(_0x28f6bb(0x1eb))/0x1+-parseInt(_0x28f6bb(0x35f))/0x2+-parseInt(_0x28f6bb(0x2d4))/0x3*(parseInt(_0x28f6bb(0x1ba))/0x4)+parseInt(_0x28f6bb(0x353))/0x5*(-parseInt(_0x28f6bb(0x284))/0x6)+parseInt(_0x28f6bb(0x21d))/0x7+-parseInt(_0x28f6bb(0x236))/0x8+parseInt(_0x28f6bb(0x203))/0x9;if(_0x4aea52===_0x5d62f0)break;else _0xa82152['push'](_0xa82152['shift']());}catch(_0x4c1445){_0xa82152['push'](_0xa82152['shift']());}}}(a46_0x2388,0x97283));import a46_0x283a50 from'chalk';import{existsSync}from'fs';function a46_0x9ea7(_0x59d66f,_0x496500){_0x59d66f=_0x59d66f-0x1ae;const _0x2388c1=a46_0x2388();let _0x9ea79c=_0x2388c1[_0x59d66f];return _0x9ea79c;}import a46_0x6d3a63 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a46_0x10d2c2 from'prompts';function getAttemptStatusDisplay(_0x3d412e){const _0x233088=a46_0x9ea7;if(!_0x3d412e)return{'icon':'⏳','text':''};const {done:_0x47d7fb,success:_0x24381c,cancelRequested:_0x1ba893}=_0x3d412e;if(!_0x47d7fb)return _0x1ba893?{'icon':'🛑','text':a46_0x283a50['yellow']('canceling')}:{'icon':'🔄','text':a46_0x283a50[_0x233088(0x1bf)](_0x233088(0x2bf))};if(_0x24381c)return{'icon':'✅','text':a46_0x283a50['green'](_0x233088(0x331))};return{'icon':'❌','text':a46_0x283a50[_0x233088(0x296)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a46_0x49f959(0x30d)](_0x382a99,_0x49dd68,_0x232565=0x0){return _0x382a99[_0x232565]||_0x49dd68['workflowProject'];}['requireProject'](_0x1bcd5d,_0x4d2b80,_0x5752c4=0x0){const _0x356950=a46_0x49f959,_0x2340fd=this['resolveProject'](_0x1bcd5d,_0x4d2b80,_0x5752c4);if(!_0x2340fd)return console[_0x356950(0x23e)](a46_0x283a50[_0x356950(0x296)](_0x356950(0x2a2)),_0x356950(0x1bb)),console[_0x356950(0x23e)](a46_0x283a50['dim'](_0x356950(0x324))),null;return _0x2340fd;}['parseProjectWorkflowPattern'](_0x56c3e5,_0x26ffc1){const _0x595222=a46_0x49f959;if(_0x56c3e5[0x0]){const _0x8add59=_0x56c3e5[0x0][_0x595222(0x348)]('.');if(_0x8add59[_0x595222(0x1ec)]===0x1)return{'projectName':_0x8add59[0x0],'workflowName':undefined};else return _0x8add59[_0x595222(0x1ec)]===0x2?{'projectName':_0x8add59[0x0],'workflowName':_0x8add59[0x1]}:(console[_0x595222(0x23e)](a46_0x283a50[_0x595222(0x296)](_0x595222(0x2a2)),_0x595222(0x1e3)),null);}return{'projectName':_0x26ffc1[_0x595222(0x2b0)],'workflowName':undefined};}[a46_0x49f959(0x303)](_0x4cdc51,_0x5c79bc,_0x39a04e=0x0){const _0x5a59b5=a46_0x49f959;if(_0x4cdc51[_0x39a04e])return _0x4cdc51[_0x39a04e];if(_0x5c79bc[_0x5a59b5(0x2b0)]){const _0x113609=a46_0x6d3a63[_0x5a59b5(0x2bb)](process[_0x5a59b5(0x21e)](),_0x5a59b5(0x1c0),_0x5c79bc['workflowProject']);if(existsSync(a46_0x6d3a63['join'](_0x113609,_0x5a59b5(0x2c3))))return _0x113609;}return undefined;}async[a46_0x49f959(0x1c4)](_0x432c8c,_0x4efdbc,_0x426275){const _0xd76b3=a46_0x49f959;try{const _0x3bf1ad=await _0x432c8c[_0xd76b3(0x1cc)][_0xd76b3(0x1c0)](_0x4efdbc,{'limit':0x1});if(_0x3bf1ad[_0xd76b3(0x1ec)]>0x0){const _0x479dff=_0x3bf1ad[0x0]['id'],_0x21cc96=getWorkflowUrl(_0x426275,_0x479dff);console[_0xd76b3(0x23e)](_0xd76b3(0x1f2)+a46_0x283a50[_0xd76b3(0x215)](_0x21cc96));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a46_0x49f959(0x248)]='workflow:use';['description']=a46_0x49f959(0x23a);async[a46_0x49f959(0x214)](_0x535fda){const _0x3b6f1e=a46_0x49f959,{options:_0x393dcc,args:_0xd5b3b2,tdx:_0x3883d4}=_0x535fda,_0xb19f83=_0xd5b3b2[0x0],_0x28caf1=_0x393dcc[_0x3b6f1e(0x34b)];if(_0x28caf1)return saveSessionContext({'workflow_project':undefined},_0x393dcc[_0x3b6f1e(0x25d)]),console[_0x3b6f1e(0x1d2)](a46_0x283a50[_0x3b6f1e(0x262)](_0x3b6f1e(0x351))),0x0;if(!_0xb19f83)return console[_0x3b6f1e(0x23e)](a46_0x283a50[_0x3b6f1e(0x296)](_0x3b6f1e(0x2a2)),_0x3b6f1e(0x1bb)),console[_0x3b6f1e(0x23e)](a46_0x283a50[_0x3b6f1e(0x2fe)](_0x3b6f1e(0x1e5))),console[_0x3b6f1e(0x23e)](a46_0x283a50['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x15d9c8=await withSpinner(_0x3b6f1e(0x28d)+_0xb19f83+'\x27...',()=>_0x3883d4['workflow'][_0x3b6f1e(0x1b2)](_0xb19f83),{'verbose':_0x393dcc[_0x3b6f1e(0x2f0)]}),{name:_0x4a22f7}=_0x15d9c8[_0x3b6f1e(0x207)];return saveSessionContext({'workflow_project':_0x4a22f7},_0x393dcc[_0x3b6f1e(0x25d)]),console[_0x3b6f1e(0x1d2)](a46_0x283a50[_0x3b6f1e(0x262)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a46_0x283a50[_0x3b6f1e(0x215)](_0x4a22f7))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x2c5);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x2e7);async[a46_0x49f959(0x214)](_0x3b58fd){const _0x496c82=a46_0x49f959,{options:_0x485b8d,args:_0x1306e1,tdx:_0x434875}=_0x3b58fd,_0x254036=_0x1306e1[0x0];_0x485b8d[_0x496c82(0x2f0)]&&_0x254036&&console[_0x496c82(0x23e)]('Pattern:\x20'+_0x254036);const _0x9c9c09=await withSpinner(_0x496c82(0x2cc),()=>_0x434875[_0x496c82(0x1cc)][_0x496c82(0x357)](_0x254036,{'limit':_0x485b8d[_0x496c82(0x24f)]}),{'verbose':_0x485b8d['verbose']});let _0x426fe0=_0x9c9c09[_0x496c82(0x207)];_0x426fe0[_0x496c82(0x30a)]((_0x4a27eb,_0x433700)=>_0x4a27eb['name']['localeCompare'](_0x433700['name']));const _0x4e7c84=_0x485b8d[_0x496c82(0x24f)]||0x64,_0x569add=_0x426fe0[_0x496c82(0x1ec)]>=_0x4e7c84?a46_0x283a50['dim'](_0x496c82(0x365)):'';console['error'](_0x496c82(0x294)+_0x426fe0[_0x496c82(0x1ec)]+_0x496c82(0x300)+(_0x426fe0['length']!==0x1?'s':'')+_0x569add);if(_0x485b8d[_0x496c82(0x2fd)]===_0x496c82(0x219)||_0x485b8d[_0x496c82(0x2fd)]===_0x496c82(0x29d)||_0x485b8d[_0x496c82(0x2fd)]==='table')await handleSDKOutput(_0x426fe0,_0x485b8d);else{if(_0x426fe0[_0x496c82(0x1ec)]===0x0)_0x254036?console[_0x496c82(0x1d2)]('No\x20projects\x20match\x20pattern:\x20'+_0x254036):console[_0x496c82(0x1d2)](_0x496c82(0x2af));else{const _0x3db27f=_0x426fe0[_0x496c82(0x1c7)](_0x260146=>{const _0x4425d3=_0x496c82,_0x1877a3=_0x260146[_0x4425d3(0x23d)]?.['some'](_0x4cdbc5=>_0x4cdbc5[_0x4425d3(0x21f)]===_0x4425d3(0x29c)),_0x22ccbb=_0x1877a3?a46_0x283a50[_0x4425d3(0x2fe)]('\x20(system)'):'';return _0x4425d3(0x1d7)+_0x260146[_0x4425d3(0x248)]+_0x22ccbb;});await writeOutput(_0x3db27f[_0x496c82(0x2bb)]('\x0a'),_0x485b8d[_0x496c82(0x249)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a46_0x49f959(0x2d2);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x339);async['execute'](_0xf0ca17){const _0x9abc25=a46_0x49f959,{options:_0x411a31,args:_0x1ceb3f,tdx:_0x53490f}=_0xf0ca17,_0x562ae7=this[_0x9abc25(0x30d)](_0x1ceb3f,_0x411a31);_0x411a31[_0x9abc25(0x2f0)]&&_0x562ae7&&console[_0x9abc25(0x23e)](_0x9abc25(0x24d)+_0x562ae7);const _0x5ea178=await withSpinner(_0x9abc25(0x278),()=>_0x53490f[_0x9abc25(0x1cc)][_0x9abc25(0x1c0)](_0x562ae7,{'limit':_0x411a31[_0x9abc25(0x24f)]}),{'verbose':_0x411a31[_0x9abc25(0x2f0)]});let _0x4c3b0a=_0x5ea178['data'];_0x4c3b0a['sort']((_0x22d28c,_0x481d93)=>{const _0x26652f=_0x9abc25,_0x532a05=_0x22d28c['name'][_0x26652f(0x2ec)](_0x481d93[_0x26652f(0x248)]);if(_0x532a05!==0x0)return _0x532a05;return(_0x22d28c[_0x26652f(0x277)]?.[_0x26652f(0x248)]||'')[_0x26652f(0x2ec)](_0x481d93['project']?.[_0x26652f(0x248)]||'');});const _0x268059=_0x411a31[_0x9abc25(0x24f)]||0x64,_0x160617=_0x4c3b0a[_0x9abc25(0x1ec)]>=_0x268059?a46_0x283a50[_0x9abc25(0x2fe)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x9abc25(0x23e)]('✔\x20Found\x20'+_0x4c3b0a[_0x9abc25(0x1ec)]+_0x9abc25(0x29f)+(_0x4c3b0a['length']!==0x1?'s':'')+_0x160617);if(_0x411a31[_0x9abc25(0x2fd)]===_0x9abc25(0x219)||_0x411a31[_0x9abc25(0x2fd)]===_0x9abc25(0x29d)||_0x411a31[_0x9abc25(0x2fd)]===_0x9abc25(0x354))await handleSDKOutput(_0x4c3b0a,_0x411a31);else{if(_0x4c3b0a['length']===0x0)_0x562ae7?console[_0x9abc25(0x1d2)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x562ae7):console[_0x9abc25(0x1d2)]('No\x20workflows\x20found');else{const _0xb244de=_0x411a31['site'],_0x531f97=_0x4c3b0a[_0x9abc25(0x1c7)](_0x3dfa4f=>{const _0x10f3bd=_0x9abc25,_0x26be47=a46_0x283a50[_0x10f3bd(0x2fe)]('#'+_0x3dfa4f['id']),_0x37e7f1=hyperlink(_0x26be47,getWorkflowUrl(_0xb244de,_0x3dfa4f['id'])),_0x12700f=_0x3dfa4f[_0x10f3bd(0x277)]?.[_0x10f3bd(0x248)]?a46_0x283a50[_0x10f3bd(0x2fe)]('\x20('+_0x3dfa4f['project'][_0x10f3bd(0x248)]+')'):'';return _0x10f3bd(0x1d4)+_0x37e7f1+'\x20'+_0x3dfa4f[_0x10f3bd(0x248)]+_0x12700f;});await writeOutput(_0x531f97[_0x9abc25(0x2bb)]('\x0a'),_0x411a31['output'],_0x9abc25(0x326));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]='workflow:sessions';[a46_0x49f959(0x1ca)]=a46_0x49f959(0x321);async['execute'](_0x3badbb){const _0xd1dc1a=a46_0x49f959,{options:_0x1b47a4,args:_0x129ff6,tdx:_0x48e022}=_0x3badbb,_0x8acac6=this[_0xd1dc1a(0x21b)](_0x129ff6,_0x1b47a4);if(!_0x8acac6)return 0x1;const {projectName:_0x2c574e,workflowName:_0x2d97d0}=_0x8acac6;if(_0x1b47a4[_0xd1dc1a(0x2f0)]){if(_0x2c574e&&_0x2d97d0)console[_0xd1dc1a(0x23e)]('Filter:\x20'+_0x2c574e+'.'+_0x2d97d0);else _0x2c574e&&console['error'](_0xd1dc1a(0x2c4)+_0x2c574e);const _0x100d31=_0x1b47a4['status'];_0x100d31&&console[_0xd1dc1a(0x23e)](_0xd1dc1a(0x2b7)+_0x100d31);}let _0x4edfe4=0x28;if(process['stdout'][_0xd1dc1a(0x1ef)]&&!_0x1b47a4[_0xd1dc1a(0x249)]&&!_0x1b47a4['format']){const _0x2c32bb=process[_0xd1dc1a(0x265)][_0xd1dc1a(0x220)]||0x28;_0x4edfe4=Math[_0xd1dc1a(0x22a)](0x14,Math[_0xd1dc1a(0x34a)](_0x2c32bb*0x2/0x3));}const _0x3f72d2=_0x1b47a4[_0xd1dc1a(0x24f)]||_0x4edfe4,_0x37d138=await withSpinner(_0xd1dc1a(0x33b),()=>_0x48e022[_0xd1dc1a(0x1cc)]['sessions']({'projectName':_0x2c574e,'workflowName':_0x2d97d0,'status':_0x1b47a4[_0xd1dc1a(0x240)],'fromTime':_0x1b47a4['from'],'toTime':_0x1b47a4['to'],'limit':_0x3f72d2}),{'verbose':_0x1b47a4['verbose']}),_0x2ca8da=_0x37d138[_0xd1dc1a(0x207)];_0x2ca8da[_0xd1dc1a(0x30a)]((_0x184ce7,_0x31a736)=>{const _0x34b86f=_0xd1dc1a,_0x4faeb6=_0x184ce7[_0x34b86f(0x1b3)]||'',_0x38feae=_0x31a736['sessionTime']||'';return _0x38feae[_0x34b86f(0x2ec)](_0x4faeb6);});_0x2ca8da[_0xd1dc1a(0x1ec)]>=_0x3f72d2?console[_0xd1dc1a(0x23e)](_0xd1dc1a(0x1b5)+_0x2ca8da['length']+'\x20sessions\x20'+a46_0x283a50[_0xd1dc1a(0x2fe)](_0xd1dc1a(0x223))):console[_0xd1dc1a(0x23e)]('✔\x20Found\x20'+_0x2ca8da[_0xd1dc1a(0x1ec)]+_0xd1dc1a(0x1ee)+(_0x2ca8da[_0xd1dc1a(0x1ec)]!==0x1?'s':''));if(_0x1b47a4[_0xd1dc1a(0x2fd)]===_0xd1dc1a(0x219)||_0x1b47a4[_0xd1dc1a(0x2fd)]===_0xd1dc1a(0x29d)||_0x1b47a4['format']==='table')await handleSDKOutput(_0x2ca8da,_0x1b47a4);else{if(!process[_0xd1dc1a(0x265)]['isTTY']||_0x1b47a4[_0xd1dc1a(0x249)]){if(_0x2ca8da[_0xd1dc1a(0x1ec)]===0x0){if(_0x2c574e&&_0x2d97d0)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x2c574e+'.'+_0x2d97d0);else _0x2c574e?console[_0xd1dc1a(0x1d2)](_0xd1dc1a(0x2e2)+_0x2c574e):console[_0xd1dc1a(0x1d2)]('No\x20sessions\x20found');}else{const _0x1f76a3=_0x1b47a4[_0xd1dc1a(0x31a)],_0x1781d4=this[_0xd1dc1a(0x216)](_0x2ca8da,_0x1f76a3);_0x1b47a4[_0xd1dc1a(0x249)]?await writeOutput(_0x1781d4,_0x1b47a4[_0xd1dc1a(0x249)],'list'):console[_0xd1dc1a(0x1d2)](_0x1781d4);}!_0x2c574e&&(console['error'](''),console['error'](a46_0x283a50[_0xd1dc1a(0x2fe)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a46_0x283a50[_0xd1dc1a(0x2fe)](_0xd1dc1a(0x2c8))+'or'+a46_0x283a50[_0xd1dc1a(0x2fe)](_0xd1dc1a(0x251))));}else{if(_0x2ca8da['length']===0x0){if(_0x2c574e&&_0x2d97d0)console[_0xd1dc1a(0x1d2)]('No\x20sessions\x20found\x20for:\x20'+_0x2c574e+'.'+_0x2d97d0);else _0x2c574e?console[_0xd1dc1a(0x1d2)](_0xd1dc1a(0x2e2)+_0x2c574e):console[_0xd1dc1a(0x1d2)](_0xd1dc1a(0x1da));}else await this[_0xd1dc1a(0x283)](_0x2ca8da,_0x3badbb,_0x2c574e);}}return 0x0;}[a46_0x49f959(0x216)](_0x1c7480,_0x29989e){const _0xb88b8e=a46_0x49f959,_0x52417c=[],_0x471033=new Map();let _0x2b5988=Infinity,_0x2ae6c4=-Infinity;for(const _0x16d65c of _0x1c7480){if(_0x16d65c['lastAttempt']?.[_0xb88b8e(0x21a)]){const _0x551c28=new Date(_0x16d65c[_0xb88b8e(0x2f4)][_0xb88b8e(0x21a)])[_0xb88b8e(0x2f6)](),_0x1d4a36=_0x16d65c[_0xb88b8e(0x2f4)][_0xb88b8e(0x291)]?new Date(_0x16d65c[_0xb88b8e(0x2f4)][_0xb88b8e(0x291)])['getTime']():Date[_0xb88b8e(0x1d0)](),_0x2e22db=_0x16d65c[_0xb88b8e(0x277)]?.[_0xb88b8e(0x248)]||'(unknown)';!_0x471033[_0xb88b8e(0x2ba)](_0x2e22db)&&_0x471033['set'](_0x2e22db,[]),_0x471033[_0xb88b8e(0x2fb)](_0x2e22db)[_0xb88b8e(0x26f)]({'session':_0x16d65c,'startTime':_0x551c28,'endTime':_0x1d4a36,'duration':_0x1d4a36-_0x551c28}),_0x2b5988=Math['min'](_0x2b5988,_0x551c28),_0x2ae6c4=Math[_0xb88b8e(0x22a)](_0x2ae6c4,_0x1d4a36);}}if(_0x471033[_0xb88b8e(0x33c)]===0x0)return _0xb88b8e(0x306);const _0x27b271=process[_0xb88b8e(0x265)][_0xb88b8e(0x1c5)]||0x78,_0xd08180=0x1e,_0x2bcf4e=0x32,_0x1bff7b=0x4,_0x1699c8=Math['min'](_0x2bcf4e,Math[_0xb88b8e(0x22a)](_0xd08180,Math[_0xb88b8e(0x34a)](_0x27b271*0.3))),_0x487b70=_0x27b271-_0x1699c8-TIMELINE_CONFIG[_0xb88b8e(0x263)]-0x3-_0x1bff7b,_0x1629f9=_0x2ae6c4-_0x2b5988,_0x34363e=_0x1629f9/_0x1699c8,_0x2da75e=renderTimeAxis({'startTime':_0x2b5988,'endTime':_0x2ae6c4,'durationMs':_0x1629f9,'msPerChar':_0x34363e},_0x1699c8),_0x549012=[];for(const _0x28f580 of _0x471033[_0xb88b8e(0x2b2)]()){_0x549012[_0xb88b8e(0x26f)](..._0x28f580);}_0x549012[_0xb88b8e(0x30a)]((_0x4f942d,_0x505a69)=>_0x505a69['startTime']-_0x4f942d[_0xb88b8e(0x315)]);const _0x114558=new Date(_0x2b5988),_0x5cef00=formatDate(_0x114558),_0x3379dd=_0x1bff7b+TIMELINE_CONFIG[_0xb88b8e(0x2e1)]+TIMELINE_CONFIG[_0xb88b8e(0x260)]+_0x487b70,_0x259d51='\x20'[_0xb88b8e(0x1d1)](_0x3379dd-_0x5cef00[_0xb88b8e(0x1ec)]),_0x5a3506=_0x259d51+a46_0x283a50['dim'](_0x5cef00)+'\x20'+_0x2da75e;_0x52417c['push'](_0x5a3506);const _0x565271=0x16;let _0x53d20c=0x0;for(const _0x18e781 of _0x549012){const _0x2c77f5=_0x18e781[_0xb88b8e(0x25d)][_0xb88b8e(0x277)]?.['name']||'?',_0x205c53=Math[_0xb88b8e(0x2b3)](stringWidth(_0x2c77f5),_0x565271);_0x53d20c=Math[_0xb88b8e(0x22a)](_0x53d20c,_0x205c53);}for(const _0xf9cb5 of _0x549012){const {session:_0x376bea,startTime:_0x139623,endTime:_0x2bd36d,duration:_0xaee24d}=_0xf9cb5,_0x4a155e=_0x376bea[_0xb88b8e(0x277)]?.['id'],_0x384adb=_0x376bea['id'],_0x49e1d6=_0x376bea[_0xb88b8e(0x277)]?.[_0xb88b8e(0x248)]||'?',_0x2911ad=_0x376bea['workflow']?.[_0xb88b8e(0x248)]||'?';let _0x1520f9,_0x43ec37;if(_0x376bea[_0xb88b8e(0x2f4)]){const _0x4756b8=_0x376bea[_0xb88b8e(0x2f4)];!_0x4756b8[_0xb88b8e(0x334)]?(_0x1520f9=_0x4756b8['cancelRequested']?'🛑':'🔄',_0x43ec37=_0x4756b8['cancelRequested']?a46_0x283a50['yellow']:a46_0x283a50[_0xb88b8e(0x1bf)]):(_0x1520f9=_0x4756b8[_0xb88b8e(0x331)]?'✅':'❌',_0x43ec37=_0x4756b8[_0xb88b8e(0x331)]?a46_0x283a50[_0xb88b8e(0x262)]:a46_0x283a50[_0xb88b8e(0x296)]);}else _0x1520f9='⏳',_0x43ec37=a46_0x283a50['dim'];const _0x1108d0='#'+_0x384adb,_0x49aed5=_0x4a155e?hyperlink(_0x1108d0,getWorkflowSessionUrl(_0x29989e,_0x4a155e,_0x384adb)):_0x1108d0;let _0xa016e5=_0x49e1d6;stringWidth(_0x49e1d6)>_0x565271&&(_0xa016e5=_0x49e1d6[_0xb88b8e(0x2d8)](0x0,_0x565271-0x1)+'…');const _0x15756c=a46_0x283a50[_0xb88b8e(0x2fe)](_0xa016e5),_0xb86bca=stringWidth(_0xa016e5),_0x16e7b2='\x20'[_0xb88b8e(0x1d1)](_0x53d20c-stringWidth(_0xa016e5)+0x2),_0x16dbc1='('+formatElapsed(_0xaee24d)+')',_0x3d6d36=stringWidth(_0x16dbc1),_0x271907=stringWidth(_0x1108d0),_0x213fb5=_0x271907+0x1+_0xb86bca+_0x16e7b2[_0xb88b8e(0x1ec)],_0x1a7da5=_0x487b70-_0x213fb5-_0x3d6d36-0x1-0x8;let _0x2dfe82=_0x2911ad;stringWidth(_0x2dfe82)>_0x1a7da5&&(_0x2dfe82=_0x2dfe82['slice'](0x0,_0x1a7da5-0x1)+'…');const _0x474df5=_0x49aed5+'\x20'+_0x15756c+_0x16e7b2+_0x2dfe82,_0x16d2c1=stringWidth(_0x474df5),_0x3b41cf=_0x487b70-_0x16d2c1-_0x3d6d36,_0x1eb377=_0x474df5+'\x20'['repeat'](Math['max'](0x1,_0x3b41cf))+a46_0x283a50[_0xb88b8e(0x2fe)](_0x16dbc1),_0x21a9a8=Math[_0xb88b8e(0x34a)]((_0x139623-_0x2b5988)/_0x34363e),_0x52c308=Math[_0xb88b8e(0x34a)]((_0x2bd36d-_0x2b5988)/_0x34363e),_0x2faf7c=Math[_0xb88b8e(0x22a)](_0x21a9a8+0x1,_0x52c308),_0x55e5e2=new Array(_0x1699c8)[_0xb88b8e(0x35b)]('\x20');for(let _0x5220b1=_0x21a9a8;_0x5220b1<Math[_0xb88b8e(0x2b3)](_0x2faf7c,_0x1699c8);_0x5220b1++){_0x55e5e2[_0x5220b1]='─';}const _0x1f8cb0=_0x55e5e2['map'](_0x5a26cd=>_0x5a26cd==='\x20'?'\x20':_0x43ec37(_0x5a26cd))[_0xb88b8e(0x2bb)]('');_0x52417c[_0xb88b8e(0x26f)](_0x1520f9+'\x20'+_0x1eb377+'│'+_0x1f8cb0+'│');}return _0x52417c['join']('\x0a');}async[a46_0x49f959(0x283)](_0x3caa71,_0x236c50,_0x6da63c){const _0x15e3eb=a46_0x49f959,{options:_0x28e040,tdx:_0x9c6348}=_0x236c50,_0x24202e=_0x28e040[_0x15e3eb(0x31a)],{timelineRows:_0x543893,timeAxisHeader:_0x67883a}=this['generateSessionTimelineRows'](_0x3caa71,_0x24202e),_0x1fb79a=_0x543893[_0x15e3eb(0x202)](_0x273c70=>_0x273c70[_0x15e3eb(0x2a6)]);if(_0x1fb79a[_0x15e3eb(0x1ec)]===0x0){const _0x414b43=this[_0x15e3eb(0x216)](_0x3caa71,_0x24202e);console[_0x15e3eb(0x1d2)](_0x414b43);!_0x6da63c&&(console[_0x15e3eb(0x23e)](''),console[_0x15e3eb(0x23e)](a46_0x283a50[_0x15e3eb(0x2fe)](_0x15e3eb(0x2f1))),console[_0x15e3eb(0x23e)](a46_0x283a50[_0x15e3eb(0x2fe)](_0x15e3eb(0x2c8))+'or'+a46_0x283a50[_0x15e3eb(0x2fe)](_0x15e3eb(0x251))));return;}_0x67883a&&console[_0x15e3eb(0x1d2)](_0x67883a);const _0x50b5ce=_0x543893['filter'](_0x3e99e0=>_0x3e99e0[_0x15e3eb(0x2a6)])[_0x15e3eb(0x1c7)](_0x5cff63=>({'title':_0x5cff63[_0x15e3eb(0x217)],'value':_0x5cff63[_0x15e3eb(0x2a6)]})),_0x56ef4f=process[_0x15e3eb(0x265)][_0x15e3eb(0x220)]||0x3c,_0x492e91=Math[_0x15e3eb(0x22a)](0x28,Math['floor'](_0x56ef4f*0x2/0x3)),_0x453d51=await a46_0x10d2c2({'type':_0x15e3eb(0x206),'name':_0x15e3eb(0x2a6),'message':_0x15e3eb(0x2d7),'choices':_0x50b5ce,'initial':-0x1,'limit':_0x492e91,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x2e0d53,_0x37ecc5)=>{const _0x11fdfa=_0x15e3eb;if(!_0x2e0d53)return Promise[_0x11fdfa(0x2c7)](_0x37ecc5);const _0x26f554=_0x37ecc5[_0x11fdfa(0x202)](_0x55ef60=>{const _0x51f0b7=_0x11fdfa,_0x2f728a=_0x55ef60;return _0x2f728a['title']['toLowerCase']()[_0x51f0b7(0x2d1)](_0x2e0d53[_0x51f0b7(0x2c6)]());});return Promise['resolve'](_0x26f554);}}),_0x16ea4b=()=>{const _0x2365f3=_0x15e3eb;process[_0x2365f3(0x265)][_0x2365f3(0x316)]('\x1b[1A\x1b[2K'),process[_0x2365f3(0x265)][_0x2365f3(0x316)](_0x2365f3(0x2ee)),process[_0x2365f3(0x265)][_0x2365f3(0x316)](_0x2365f3(0x2ee));},_0x3fd161=_0x453d51&&_0x453d51['attemptId']&&_0x453d51[_0x15e3eb(0x2a6)]!==null&&_0x453d51[_0x15e3eb(0x2a6)][_0x15e3eb(0x1f4)]()!=='';if(!_0x3fd161){_0x16ea4b(),console['log'](a46_0x283a50[_0x15e3eb(0x2fe)](_0x15e3eb(0x22d)));return;}_0x16ea4b();const _0x4a06c7=_0x3caa71[_0x15e3eb(0x31c)](_0x46de3c=>_0x46de3c[_0x15e3eb(0x2f4)]?.['id']===_0x453d51['attemptId']);if(_0x4a06c7){const _0x302149=_0x4a06c7['project']?.['name']||'?',_0x522afb=_0x4a06c7['workflow']?.[_0x15e3eb(0x248)]||'?';console[_0x15e3eb(0x1d2)](_0x15e3eb(0x2e6)+a46_0x283a50[_0x15e3eb(0x2fe)](_0x302149)+_0x15e3eb(0x26e)+a46_0x283a50[_0x15e3eb(0x2fe)](_0x522afb));}const _0x360e7d=new WorkflowTimelineCommand();await _0x360e7d[_0x15e3eb(0x214)]({'args':[],'options':{..._0x28e040,'attemptId':_0x453d51[_0x15e3eb(0x2a6)]},'tdx':_0x9c6348});}['generateSessionTimelineRows'](_0x3e283d,_0x4b9a7c){const _0x3ae87f=a46_0x49f959,_0x4f4428=new Map();for(const _0x5d7484 of _0x3e283d){_0x5d7484['id']&&_0x5d7484[_0x3ae87f(0x2f4)]?.['id']&&_0x4f4428[_0x3ae87f(0x201)](_0x5d7484['id'],_0x5d7484[_0x3ae87f(0x2f4)]['id']);}const _0x28b56a=[];let _0x193b14='';const _0x2401f4=this['renderSessionsTimeline'](_0x3e283d,_0x4b9a7c),_0x100726=_0x2401f4['split']('\x0a');for(const _0x17d17c of _0x100726){if(_0x17d17c[_0x3ae87f(0x335)](_0x3ae87f(0x337))||_0x17d17c[_0x3ae87f(0x34f)](/^\s+\d{4}-\d{2}-\d{2}/))_0x193b14=_0x17d17c;else{if(_0x17d17c['match'](/^[✅❌🔄🛑⏳]/)){const _0x3b8ce7=_0x17d17c[_0x3ae87f(0x34f)](/#(\d+)/),_0x2932c1=_0x3b8ce7?_0x3b8ce7[0x1]:null,_0x37974f=_0x2932c1?_0x4f4428[_0x3ae87f(0x2fb)](_0x2932c1)||null:null,_0x2ba76a=_0x3e283d['find'](_0xe48a58=>_0xe48a58['id']===_0x2932c1),_0x511f06=_0x2ba76a?.[_0x3ae87f(0x277)]?.[_0x3ae87f(0x248)]||'';_0x28b56a[_0x3ae87f(0x26f)]({'displayLine':_0x17d17c,'attemptId':_0x37974f,'projectName':_0x511f06});}}}return{'timelineRows':_0x28b56a,'timeAxisHeader':_0x193b14};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]='workflow:attempts';['description']=a46_0x49f959(0x1fb);async[a46_0x49f959(0x214)](_0x2ccf15){const _0x6d5197=a46_0x49f959,{options:_0x49f462,args:_0x2a5608,tdx:_0x477e45}=_0x2ccf15,_0x886af9=this[_0x6d5197(0x21b)](_0x2a5608,_0x49f462);if(!_0x886af9)return 0x1;const {projectName:_0x5b5ad9,workflowName:_0x166bee}=_0x886af9,_0x32b726=_0x49f462[_0x6d5197(0x2cb)];if(_0x49f462[_0x6d5197(0x2f0)]){if(_0x5b5ad9&&_0x166bee)console[_0x6d5197(0x23e)](_0x6d5197(0x33a)+_0x5b5ad9+'.'+_0x166bee);else _0x5b5ad9&&console[_0x6d5197(0x23e)](_0x6d5197(0x2c4)+_0x5b5ad9);_0x32b726&&console[_0x6d5197(0x23e)]('Include\x20retried:\x20yes');}const _0x23be57=await withSpinner(_0x6d5197(0x361),()=>_0x477e45[_0x6d5197(0x1cc)][_0x6d5197(0x287)]({'projectName':_0x5b5ad9,'workflowName':_0x166bee,'includeRetried':_0x32b726,'limit':_0x49f462[_0x6d5197(0x24f)]}),{'verbose':_0x49f462[_0x6d5197(0x2f0)]}),_0x13325e=_0x23be57[_0x6d5197(0x207)],_0x398234=_0x49f462['limit']||0x64,_0x5321ab=_0x13325e[_0x6d5197(0x1ec)]>=_0x398234?a46_0x283a50['dim'](_0x6d5197(0x365)):'';console[_0x6d5197(0x23e)](_0x6d5197(0x294)+_0x13325e[_0x6d5197(0x1ec)]+_0x6d5197(0x273)+(_0x13325e[_0x6d5197(0x1ec)]!==0x1?'s':'')+_0x5321ab);if(_0x49f462['format']===_0x6d5197(0x219)||_0x49f462[_0x6d5197(0x2fd)]===_0x6d5197(0x29d)||_0x49f462[_0x6d5197(0x2fd)]===_0x6d5197(0x354))await handleSDKOutput(_0x13325e,_0x49f462);else{if(_0x13325e['length']===0x0){if(_0x5b5ad9&&_0x166bee)console[_0x6d5197(0x1d2)]('No\x20attempts\x20found\x20for:\x20'+_0x5b5ad9+'.'+_0x166bee);else _0x5b5ad9?console[_0x6d5197(0x1d2)](_0x6d5197(0x2eb)+_0x5b5ad9):console[_0x6d5197(0x1d2)](_0x6d5197(0x2a7));}else{const _0x3f3fc8=_0x49f462['site'],_0x55eacc=_0x13325e[_0x6d5197(0x1c7)](_0x1828f3=>{const _0x438d57=_0x6d5197,_0x21444f=a46_0x283a50[_0x438d57(0x2fe)]('#'+_0x1828f3['id']),_0x16562e=_0x1828f3[_0x438d57(0x277)]?.['id'],_0x4e832b=_0x1828f3[_0x438d57(0x2f3)]||_0x1828f3[_0x438d57(0x225)],_0x5e8e8d=_0x16562e&&_0x4e832b?hyperlink(_0x21444f,getWorkflowAttemptUrl(_0x3f3fc8,_0x16562e,_0x4e832b,_0x1828f3['id'])):_0x21444f,{icon:_0x4429fd,text:_0x534d7e}=getAttemptStatusDisplay(_0x1828f3),_0x3e6d86=(_0x1828f3['project']?.[_0x438d57(0x248)]||'?')+'.'+(_0x1828f3[_0x438d57(0x1cc)]?.[_0x438d57(0x248)]||'?'),_0x2f2475=_0x1828f3['sessionTime']?a46_0x283a50[_0x438d57(0x2fe)](_0x1828f3[_0x438d57(0x1b3)]):'';return(_0x5e8e8d+'\x20'+_0x4429fd+(_0x534d7e?'\x20'+_0x534d7e:'')+'\x20'+_0x3e6d86+'\x20'+_0x2f2475)[_0x438d57(0x232)]();});await writeOutput(_0x55eacc[_0x6d5197(0x2bb)]('\x0a'),_0x49f462[_0x6d5197(0x249)],_0x6d5197(0x326));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a46_0x49f959(0x2b1);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x247);async[a46_0x49f959(0x214)](_0x49d227){const _0xd88def=a46_0x49f959,{options:_0x51746d,args:_0x48f19f,tdx:_0x41f9a5}=_0x49d227,_0x5ed505=_0x48f19f[0x0];if(!_0x5ed505)return console[_0xd88def(0x23e)](_0xd88def(0x1c6)),0x1;_0x51746d[_0xd88def(0x2f0)]&&console['error'](_0xd88def(0x28f)+_0x5ed505);const _0x476a03=await withSpinner('Getting\x20attempt\x20details...',()=>_0x41f9a5['workflow'][_0xd88def(0x311)](_0x5ed505),{'verbose':_0x51746d[_0xd88def(0x2f0)]}),_0x434f04=_0x476a03[_0xd88def(0x207)];let _0x3a2edd;!_0x434f04['done']?_0x3a2edd=_0x434f04[_0xd88def(0x2dd)]?_0xd88def(0x289):_0xd88def(0x2bf):_0x3a2edd=_0x434f04['success']?'success':_0xd88def(0x23e);let _0x5d3034;if(_0x434f04[_0xd88def(0x21a)]&&_0x434f04[_0xd88def(0x291)]){const _0x3c23cc=new Date(_0x434f04[_0xd88def(0x21a)])['getTime'](),_0x277627=new Date(_0x434f04[_0xd88def(0x291)])[_0xd88def(0x2f6)]();_0x5d3034=Math[_0xd88def(0x336)]((_0x277627-_0x3c23cc)/0x3e8);}const _0x3634a3={'attempt_id':_0x434f04['id'],'status':_0x3a2edd,..._0x434f04[_0xd88def(0x2e5)]!==undefined&&{'index':_0x434f04[_0xd88def(0x2e5)]},..._0x434f04[_0xd88def(0x277)]&&{'project':_0x434f04[_0xd88def(0x277)]['name']},..._0x434f04[_0xd88def(0x1cc)]&&{'workflow':_0x434f04[_0xd88def(0x1cc)]['name']},..._0x434f04[_0xd88def(0x225)]&&{'session_id':_0x434f04['sessionId']},..._0x434f04[_0xd88def(0x1b3)]&&{'session_time':_0x434f04['sessionTime']},..._0x434f04[_0xd88def(0x1b9)]&&{'retry_attempt':_0x434f04[_0xd88def(0x1b9)]},..._0x5d3034!==undefined&&{'duration_sec':_0x5d3034},..._0x434f04[_0xd88def(0x21a)]&&{'created_at':_0x434f04[_0xd88def(0x21a)]},..._0x434f04[_0xd88def(0x291)]&&{'finished_at':_0x434f04[_0xd88def(0x291)]},...Object[_0xd88def(0x250)](_0x434f04[_0xd88def(0x292)])[_0xd88def(0x1ec)]>0x0&&{'params':_0x434f04['params']}};return await handleSingleObjectOutput(_0x3634a3,_0x51746d),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x2a8);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x33e);async[a46_0x49f959(0x214)](_0x346dbe){const _0x294319=a46_0x49f959,{options:_0x5aa0e3,args:_0x4e787f,tdx:_0x540dfe}=_0x346dbe,_0x59d54f=_0x4e787f[0x0];if(!_0x59d54f)return console[_0x294319(0x23e)](_0x294319(0x1c6)),0x1;const _0x157045=_0x5aa0e3['includeSubtasks'];_0x5aa0e3[_0x294319(0x2f0)]&&(console['error'](_0x294319(0x28f)+_0x59d54f),_0x157045&&console[_0x294319(0x23e)](_0x294319(0x1bc)));const _0x5cffb9=await withSpinner(_0x294319(0x228),()=>_0x540dfe[_0x294319(0x1cc)][_0x294319(0x1f8)](_0x59d54f,_0x157045||![]),{'verbose':_0x5aa0e3[_0x294319(0x2f0)]}),_0x3ca2e9=_0x5cffb9['data'];return console[_0x294319(0x23e)](_0x294319(0x294)+_0x3ca2e9['length']+'\x20task'+(_0x3ca2e9[_0x294319(0x1ec)]!==0x1?'s':'')),await handleSDKOutput(_0x3ca2e9,_0x5aa0e3),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a46_0x49f959(0x2c2);['description']=a46_0x49f959(0x269);async['execute'](_0xe59b49){const _0x9305b0=a46_0x49f959,{options:_0x5e131e,args:_0x5739b3,tdx:_0x3725a6}=_0xe59b49,_0x16b839=_0x5739b3[0x0];let _0xf8bb97=_0x5739b3[0x1];if(!_0x16b839)return console[_0x9305b0(0x23e)](_0x9305b0(0x1c6)),0x1;_0x5e131e[_0x9305b0(0x2f0)]&&(console[_0x9305b0(0x23e)](_0x9305b0(0x28f)+_0x16b839),_0xf8bb97&&console[_0x9305b0(0x23e)](_0x9305b0(0x1e8)+_0xf8bb97));const _0x2b56e1=await withSpinner(_0x9305b0(0x1ae),()=>_0x3725a6[_0x9305b0(0x1cc)][_0x9305b0(0x344)](_0x16b839,_0xf8bb97),{'verbose':_0x5e131e[_0x9305b0(0x2f0)]}),_0x1fac65=_0x2b56e1[_0x9305b0(0x207)];if(_0x1fac65[_0x9305b0(0x1ec)]===0x0)return console[_0x9305b0(0x23e)](_0x9305b0(0x1db)),0x0;if(!_0xf8bb97&&(_0x5e131e['json']||_0x5e131e['format']))return await handleSDKOutput(_0x1fac65,_0x5e131e),0x0;if(!_0xf8bb97){const _0x3a0efa=_0x1fac65[_0x9305b0(0x1c7)](_0x6385ae=>({'title':_0x6385ae[_0x9305b0(0x1e1)]+'\x20('+formatBytes(_0x6385ae[_0x9305b0(0x2e8)])+')','value':_0x6385ae[_0x9305b0(0x1e1)]})),_0x57ba5b=await a46_0x10d2c2({'type':_0x9305b0(0x238),'name':'task','message':_0x9305b0(0x285),'choices':_0x3a0efa});if(!_0x57ba5b[_0x9305b0(0x2a4)])return console['error']('Cancelled'),0x0;_0xf8bb97=_0x57ba5b['task'];}const _0x241d22=await withSpinner('Downloading\x20logs...',()=>_0x3725a6['workflow'][_0x9305b0(0x281)](_0x16b839,_0xf8bb97),{'verbose':_0x5e131e[_0x9305b0(0x2f0)]}),_0x4f49d0=_0x241d22[_0x9305b0(0x207)];return _0x4f49d0?console['log'](_0x4f49d0):console[_0x9305b0(0x23e)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x297);[a46_0x49f959(0x1ca)]='Kill\x20a\x20running\x20attempt';async[a46_0x49f959(0x214)](_0x1992d4){const _0x52944b=a46_0x49f959,{options:_0x46462e,args:_0x1d8f8c,tdx:_0x56f47e}=_0x1992d4,_0x1f156a=_0x1d8f8c[0x0];if(!_0x1f156a)return console[_0x52944b(0x23e)](_0x52944b(0x1c6)),0x1;const _0x439c67=_0x46462e[_0x52944b(0x2b4)];_0x46462e[_0x52944b(0x2f0)]&&(console[_0x52944b(0x23e)](_0x52944b(0x28f)+_0x1f156a),_0x439c67&&console[_0x52944b(0x23e)](_0x52944b(0x28a)+_0x439c67));if(!_0x46462e[_0x52944b(0x246)]){if(!isInteractive())return console[_0x52944b(0x23e)](a46_0x283a50[_0x52944b(0x296)](_0x52944b(0x332)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x52944b(0x23e)](a46_0x283a50[_0x52944b(0x2fe)](_0x52944b(0x2ae))),0x1;const _0x33f7fd=await confirmKey(_0x52944b(0x346)+_0x1f156a+'?');if(!_0x33f7fd)return console[_0x52944b(0x23e)](a46_0x283a50['yellow'](_0x52944b(0x22d))),0x1;}const _0xa937f7=await withSpinner(_0x52944b(0x1fe),()=>_0x56f47e[_0x52944b(0x1cc)][_0x52944b(0x30f)](_0x1f156a,_0x439c67),{'verbose':_0x46462e[_0x52944b(0x2f0)]}),_0x309972=_0xa937f7[_0x52944b(0x207)];return console[_0x52944b(0x23e)]('✔\x20'+_0x309972),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a46_0x49f959(0x2dc);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a46_0x49f959(0x214)](_0x5505d8){const _0x5e1d03=a46_0x49f959,{options:_0x34f6b9,args:_0x4ff5d3,tdx:_0x453db0}=_0x5505d8,_0x1af387=_0x4ff5d3[0x0];if(!_0x1af387)return console['error'](_0x5e1d03(0x230)),console[_0x5e1d03(0x23e)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x24ca6a=![],_0x17cb92=_0x1af387;if(_0x1af387[_0x5e1d03(0x335)](_0x5e1d03(0x313)))_0x24ca6a=!![],_0x17cb92=_0x1af387['substring'](0x8);else{if(_0x1af387[_0x5e1d03(0x335)](_0x5e1d03(0x308)))_0x24ca6a=![],_0x17cb92=_0x1af387[_0x5e1d03(0x1b8)](0x8);else return console[_0x5e1d03(0x23e)](_0x5e1d03(0x26a)),console[_0x5e1d03(0x23e)](_0x5e1d03(0x1c2)),0x1;}const _0x2a81da=_0x34f6b9[_0x5e1d03(0x2df)],_0x3c5d95=_0x34f6b9[_0x5e1d03(0x1c8)],_0x46af2b=_0x34f6b9[_0x5e1d03(0x292)],_0x1310f6=_0x34f6b9[_0x5e1d03(0x34d)];_0x34f6b9[_0x5e1d03(0x2f0)]&&(console[_0x5e1d03(0x23e)](_0x5e1d03(0x1f3)+(_0x24ca6a?'session':_0x5e1d03(0x311))+'\x20'+_0x17cb92),_0x2a81da&&console[_0x5e1d03(0x23e)]('From\x20task:\x20'+_0x2a81da),_0x3c5d95&&console[_0x5e1d03(0x23e)](_0x5e1d03(0x2fc)+_0x3c5d95),_0x46af2b&&console['error'](_0x5e1d03(0x1f9)+_0x46af2b),_0x1310f6&&console[_0x5e1d03(0x23e)](_0x5e1d03(0x349)));let _0x13ee94;if(_0x46af2b)try{if(_0x46af2b['startsWith']('@')){const _0x5d2450=await import(_0x5e1d03(0x2be)),_0x5a74b5=_0x46af2b[_0x5e1d03(0x1b8)](0x1),_0x33c374=await _0x5d2450[_0x5e1d03(0x347)](_0x5a74b5,_0x5e1d03(0x28b));_0x13ee94=JSON[_0x5e1d03(0x23b)](_0x33c374);}else _0x13ee94=JSON[_0x5e1d03(0x23b)](_0x46af2b);}catch{return console[_0x5e1d03(0x23e)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x34f6b9['yes']){if(!isInteractive())return console[_0x5e1d03(0x23e)](a46_0x283a50[_0x5e1d03(0x296)]('\x0aError:'),_0x5e1d03(0x350)),console[_0x5e1d03(0x23e)](a46_0x283a50['dim'](_0x5e1d03(0x2ae))),0x1;const _0x52b651=await confirmKey(_0x5e1d03(0x27b)+(_0x24ca6a?_0x5e1d03(0x25d):_0x5e1d03(0x311))+'\x20'+_0x17cb92+'?');if(!_0x52b651)return console[_0x5e1d03(0x23e)](a46_0x283a50['yellow'](_0x5e1d03(0x22d))),0x1;}let _0x3e8bfa;_0x24ca6a?_0x3e8bfa=await withSpinner(_0x5e1d03(0x2ac),()=>_0x453db0['workflow'][_0x5e1d03(0x29b)](_0x17cb92,{'fromTask':_0x2a81da,'retryParams':_0x13ee94}),{'verbose':_0x34f6b9['verbose']}):_0x3e8bfa=await withSpinner(_0x5e1d03(0x1ce),()=>_0x453db0[_0x5e1d03(0x1cc)][_0x5e1d03(0x234)](_0x17cb92,{'resumeFrom':_0x3c5d95,'retryParams':_0x13ee94,'force':_0x1310f6}),{'verbose':_0x34f6b9[_0x5e1d03(0x2f0)]});const _0x4c8164=_0x3e8bfa[_0x5e1d03(0x207)];return console[_0x5e1d03(0x23e)](_0x5e1d03(0x24e)),console['error'](_0x5e1d03(0x32b)+_0x4c8164[_0x5e1d03(0x2a6)]),console[_0x5e1d03(0x23e)](_0x5e1d03(0x266)+_0x4c8164['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x200);['description']=a46_0x49f959(0x209);async[a46_0x49f959(0x214)](_0x4b2063){const _0x50e364=a46_0x49f959,{options:_0x5dabe0,args:_0xcd63fe,tdx:_0x596dbe}=_0x4b2063;let _0x225463=_0xcd63fe[0x0];if(!_0x225463){const _0x1d1c70=this[_0x50e364(0x30d)]([],_0x5dabe0),_0x22cfc5=await withSpinner(_0x50e364(0x222),()=>_0x596dbe[_0x50e364(0x1cc)][_0x50e364(0x1c0)](_0x1d1c70,{'limit':_0x5dabe0['limit']}),{'verbose':_0x5dabe0[_0x50e364(0x2f0)]}),_0x1021f6=_0x22cfc5[_0x50e364(0x207)];if(_0x1021f6['length']===0x0)return console[_0x50e364(0x23e)]('No\x20workflows\x20found'),!_0x1d1c70&&console[_0x50e364(0x23e)](a46_0x283a50[_0x50e364(0x2fe)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x44765=_0x1021f6[_0x50e364(0x1c7)](_0x150f3e=>({'title':_0x150f3e[_0x50e364(0x277)]?.['name']+'.'+_0x150f3e[_0x50e364(0x248)],'value':_0x150f3e['project']?.[_0x50e364(0x248)]+'.'+_0x150f3e[_0x50e364(0x248)],'description':_0x150f3e['revision']?_0x50e364(0x35d)+_0x150f3e['revision']:undefined})),_0x375182=await a46_0x10d2c2({'type':_0x50e364(0x238),'name':_0x50e364(0x1cc),'message':_0x50e364(0x31d),'choices':_0x44765});if(!_0x375182[_0x50e364(0x1cc)])return 0x1;_0x225463=_0x375182['workflow'];}if(!_0x225463[_0x50e364(0x2d1)]('.')){const _0xb54364=this[_0x50e364(0x30d)]([],_0x5dabe0);if(_0xb54364)_0x225463=_0xb54364+'.'+_0x225463;else return console[_0x50e364(0x23e)](a46_0x283a50['red']('Error:'),_0x50e364(0x211)),console[_0x50e364(0x23e)](a46_0x283a50[_0x50e364(0x2fe)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x2886a2=_0x5dabe0[_0x50e364(0x20d)],_0x3e0d1e=_0x5dabe0[_0x50e364(0x1b3)],_0x30aab0={};if(_0x2886a2&&Array[_0x50e364(0x259)](_0x2886a2))for(const _0x44caaf of _0x2886a2){const _0x4ff984=_0x44caaf[_0x50e364(0x1dd)]('=');if(_0x4ff984===-0x1)return console['error'](_0x50e364(0x20b)+_0x44caaf),console[_0x50e364(0x23e)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x42c34b=_0x44caaf[_0x50e364(0x1b8)](0x0,_0x4ff984),_0x2ea4b8=_0x44caaf[_0x50e364(0x1b8)](_0x4ff984+0x1);try{_0x30aab0[_0x42c34b]=JSON['parse'](_0x2ea4b8);}catch{_0x30aab0[_0x42c34b]=_0x2ea4b8;}}_0x5dabe0[_0x50e364(0x2f0)]&&(console[_0x50e364(0x23e)](_0x50e364(0x2c0)+_0x225463),Object[_0x50e364(0x250)](_0x30aab0)[_0x50e364(0x1ec)]>0x0&&console[_0x50e364(0x23e)](_0x50e364(0x28c)+JSON[_0x50e364(0x304)](_0x30aab0)),_0x3e0d1e&&console[_0x50e364(0x23e)](_0x50e364(0x26b)+_0x3e0d1e));const _0x4421f9=await withSpinner(_0x50e364(0x1cd),()=>_0x596dbe[_0x50e364(0x1cc)][_0x50e364(0x2f9)](_0x225463,_0x30aab0,{'sessionTime':_0x3e0d1e}),{'verbose':_0x5dabe0[_0x50e364(0x2f0)]}),_0x21e0c0=_0x4421f9[_0x50e364(0x207)];console[_0x50e364(0x23e)](_0x50e364(0x27f)),console[_0x50e364(0x23e)](_0x50e364(0x2bc)+_0x21e0c0['id']),console[_0x50e364(0x23e)](_0x50e364(0x266)+_0x21e0c0[_0x50e364(0x225)]),console[_0x50e364(0x23e)](_0x50e364(0x35c)+_0x21e0c0[_0x50e364(0x277)]?.[_0x50e364(0x248)]),console[_0x50e364(0x23e)](_0x50e364(0x2f5)+_0x21e0c0[_0x50e364(0x1cc)]?.[_0x50e364(0x248)]);if(_0x21e0c0[_0x50e364(0x277)]?.['id']&&_0x21e0c0[_0x50e364(0x225)]&&_0x21e0c0['id']){const _0x3cdf6a=_0x5dabe0[_0x50e364(0x31a)],_0x2c0a35=getConsoleUrl(_0x3cdf6a,_0x50e364(0x23c)+_0x21e0c0[_0x50e364(0x277)]['id']+_0x50e364(0x27d)+_0x21e0c0['sessionId']+_0x50e364(0x270)+_0x21e0c0['id']);console[_0x50e364(0x23e)](_0x50e364(0x1f2)+a46_0x283a50[_0x50e364(0x215)](_0x2c0a35));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x271);['description']=a46_0x49f959(0x210);async['execute'](_0x532bfa){const _0x29a72a=a46_0x49f959,{options:_0x431878,args:_0x892c79,tdx:_0x2d5089}=_0x532bfa,_0x1f82ae=_0x892c79[0x0],_0x23cd9b=_0x892c79[0x1]||'.';if(!_0x1f82ae)return console[_0x29a72a(0x23e)](_0x29a72a(0x1fa)),console['error'](_0x29a72a(0x226)),0x1;const _0x4a4f8e=_0x431878[_0x29a72a(0x286)];_0x431878[_0x29a72a(0x2f0)]&&(console[_0x29a72a(0x23e)](_0x29a72a(0x2e6)+_0x1f82ae),console[_0x29a72a(0x23e)](_0x29a72a(0x253)+_0x23cd9b),_0x4a4f8e&&console[_0x29a72a(0x23e)](_0x29a72a(0x2c9)+_0x4a4f8e));const _0x3379c1=await withSpinner(_0x29a72a(0x363)+_0x1f82ae+_0x29a72a(0x1cb),()=>_0x2d5089[_0x29a72a(0x1cc)][_0x29a72a(0x288)](_0x1f82ae,_0x23cd9b,{'revision':_0x4a4f8e}),{'verbose':_0x431878[_0x29a72a(0x2f0)]}),_0x5540d2=_0x3379c1['data'];return console[_0x29a72a(0x23e)](_0x29a72a(0x305)+_0x5540d2[_0x29a72a(0x360)]),console[_0x29a72a(0x23e)]('\x20\x20Revision:\x20'+_0x5540d2['revision']),console['error'](_0x29a72a(0x1e6)+_0x5540d2[_0x29a72a(0x1f6)]),console[_0x29a72a(0x23e)]('\x20\x20Location:\x20'+_0x23cd9b+'/'+_0x5540d2[_0x29a72a(0x360)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a46_0x49f959(0x24a);['description']=a46_0x49f959(0x33f);async[a46_0x49f959(0x214)](_0x156e16){const _0x573508=a46_0x49f959,{options:_0x5dcb8b,args:_0x13f3cd,tdx:_0x31820f}=_0x156e16;let _0x49e403='.',_0x330333=_0x5dcb8b['name'];if(_0x13f3cd[0x0]){const {promises:_0x883ae6}=await import('fs');try{const _0x507de8=await _0x883ae6[_0x573508(0x2d6)](_0x13f3cd[0x0]);if(_0x507de8[_0x573508(0x355)]())_0x49e403=_0x13f3cd[0x0];else return console[_0x573508(0x23e)](_0x573508(0x212)+_0x13f3cd[0x0]+_0x573508(0x323)),0x1;}catch{_0x330333=_0x13f3cd[0x0],_0x49e403='.';}}const _0x4b68d2=_0x5dcb8b[_0x573508(0x286)],_0x1e307a=_0x5dcb8b[_0x573508(0x27e)];_0x5dcb8b['verbose']&&(console['error']('Project\x20directory:\x20'+_0x49e403),_0x330333&&console['error'](_0x573508(0x307)+_0x330333),_0x4b68d2&&console['error'](_0x573508(0x2c9)+_0x4b68d2),_0x1e307a&&console[_0x573508(0x23e)](_0x573508(0x1d6)));const _0x5e7bae=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x31820f[_0x573508(0x1cc)]['push'](_0x49e403,{'projectName':_0x330333,'revision':_0x4b68d2,'skipValidation':_0x1e307a}),{'verbose':_0x5dcb8b[_0x573508(0x2f0)]}),_0x1afb55=_0x5e7bae[_0x573508(0x207)];return console[_0x573508(0x23e)](_0x573508(0x282)+_0x1afb55[_0x573508(0x360)]),console[_0x573508(0x23e)](_0x573508(0x290)+_0x1afb55['projectId']),console['error'](_0x573508(0x293)+_0x1afb55[_0x573508(0x286)]),await this[_0x573508(0x1c4)](_0x31820f,_0x1afb55[_0x573508(0x360)],_0x5dcb8b['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']='workflow:pull';[a46_0x49f959(0x1ca)]=a46_0x49f959(0x268);async['execute'](_0x20a303){const _0x2c985e=a46_0x49f959,{options:_0x25b5b4,args:_0x5b83f1,tdx:_0x2c88a8}=_0x20a303,_0x1b0e9c=_0x5b83f1[0x0],_0xd0fcdc=_0x5b83f1[0x1];if(!_0x1b0e9c)return console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x296)](_0x2c985e(0x2a2)),_0x2c985e(0x1bb)),console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x2fe)](_0x2c985e(0x327))),0x1;const _0x7b6c2a=_0x25b5b4['revision'];_0x25b5b4[_0x2c985e(0x2f0)]&&(console[_0x2c985e(0x23e)](_0x2c985e(0x2e6)+_0x1b0e9c),_0xd0fcdc&&console[_0x2c985e(0x23e)](_0x2c985e(0x22c)+_0xd0fcdc),_0x7b6c2a&&console[_0x2c985e(0x23e)](_0x2c985e(0x2c9)+_0x7b6c2a),_0x25b5b4[_0x2c985e(0x29e)]&&console[_0x2c985e(0x23e)](_0x2c985e(0x340)));const _0x4c048f=await withSpinner(_0x2c985e(0x25f)+_0x1b0e9c+_0x2c985e(0x1cb),()=>_0x2c88a8[_0x2c985e(0x1cc)][_0x2c985e(0x258)](_0x1b0e9c,{'targetDir':_0xd0fcdc,'revision':_0x7b6c2a}),{'verbose':_0x25b5b4[_0x2c985e(0x2f0)]}),_0x8b92ee=_0x4c048f[_0x2c985e(0x207)];_0x8b92ee[_0x2c985e(0x204)]?console[_0x2c985e(0x23e)]('→\x20New\x20project:\x20'+_0x8b92ee[_0x2c985e(0x360)]):console['error']('→\x20Project:\x20'+_0x8b92ee[_0x2c985e(0x360)]);console[_0x2c985e(0x23e)](_0x2c985e(0x293)+_0x8b92ee[_0x2c985e(0x286)]),console['error']('\x20\x20Target:\x20'+(a46_0x6d3a63[_0x2c985e(0x2f2)](process['cwd'](),_0x8b92ee[_0x2c985e(0x1c9)])||'.')),console[_0x2c985e(0x23e)]('\x20\x20Changes:\x20'+a46_0x283a50[_0x2c985e(0x262)]('+'+_0x8b92ee[_0x2c985e(0x1ff)][_0x2c985e(0x318)]+_0x2c985e(0x1b1))+',\x20'+(a46_0x283a50[_0x2c985e(0x1e7)]('~'+_0x8b92ee['summary']['modified']+_0x2c985e(0x2a9))+',\x20')+(a46_0x283a50['red']('-'+_0x8b92ee[_0x2c985e(0x1ff)]['deleted']+_0x2c985e(0x32d))+',\x20')+(''+a46_0x283a50[_0x2c985e(0x2fe)](_0x8b92ee[_0x2c985e(0x1ff)][_0x2c985e(0x2f8)]+_0x2c985e(0x272))));for(const _0x1e135b of _0x8b92ee[_0x2c985e(0x30b)]){_0x1e135b[_0x2c985e(0x243)]==='modified'&&_0x1e135b['diff']&&(console['error']('\x0a'+a46_0x283a50[_0x2c985e(0x215)](_0x2c985e(0x2db)+_0x1e135b[_0x2c985e(0x2a5)])),console[_0x2c985e(0x23e)](_0x1e135b[_0x2c985e(0x276)]));}if(!_0x8b92ee[_0x2c985e(0x280)])return saveSessionContext({'workflow_project':_0x8b92ee[_0x2c985e(0x360)]},_0x25b5b4['session']),console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x262)](_0x2c985e(0x252))),console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x2fe)](_0x2c985e(0x1ea)+_0x8b92ee[_0x2c985e(0x360)])),0x0;if(_0x25b5b4[_0x2c985e(0x29e)])return console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x1e7)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x25b5b4[_0x2c985e(0x246)]){if(!isInteractive())return console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x296)](_0x2c985e(0x332)),_0x2c985e(0x350)),console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x2fe)](_0x2c985e(0x2ae))),0x1;const _0x5a071e=await confirmKey(_0x2c985e(0x2e0));if(!_0x5a071e)return console[_0x2c985e(0x23e)](a46_0x283a50['yellow'](_0x2c985e(0x22d)),_0x2c985e(0x1bd)),0x1;}await withSpinner(_0x2c985e(0x27a),()=>_0x2c88a8[_0x2c985e(0x1cc)][_0x2c985e(0x2da)](_0x8b92ee,{'revision':_0x7b6c2a}),{'verbose':_0x25b5b4[_0x2c985e(0x2f0)]}),saveSessionContext({'workflow_project':_0x8b92ee[_0x2c985e(0x360)]},_0x25b5b4[_0x2c985e(0x25d)]),console[_0x2c985e(0x23e)](a46_0x283a50[_0x2c985e(0x262)](_0x2c985e(0x34e)));const _0x3567d5=a46_0x6d3a63[_0x2c985e(0x2f2)](process[_0x2c985e(0x21e)](),_0x8b92ee[_0x2c985e(0x1c9)])||'.';return console[_0x2c985e(0x23e)](a46_0x283a50['dim']('\x20\x20Location:\x20'+_0x3567d5)),console[_0x2c985e(0x23e)](a46_0x283a50['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x8b92ee[_0x2c985e(0x360)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x2a3);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x25c);async[a46_0x49f959(0x214)](_0x586187){const _0x3e789e=a46_0x49f959,{options:_0x96c3a1,args:_0x1d8fa1,tdx:_0x2fec68}=_0x586187,_0x2337d0=this[_0x3e789e(0x303)](_0x1d8fa1,_0x96c3a1),_0x247365=_0x96c3a1[_0x3e789e(0x286)],_0xf5008f=_0x96c3a1[_0x3e789e(0x27e)];_0x96c3a1[_0x3e789e(0x2f0)]&&(_0x2337d0&&console[_0x3e789e(0x23e)]('Source\x20directory:\x20'+_0x2337d0),_0x247365&&console[_0x3e789e(0x23e)](_0x3e789e(0x2c9)+_0x247365),_0x96c3a1[_0x3e789e(0x29e)]&&console[_0x3e789e(0x23e)](_0x3e789e(0x340)),_0xf5008f&&console[_0x3e789e(0x23e)](_0x3e789e(0x1d6)));let _0x2451b6;try{_0x2451b6=await withSpinner('Analyzing\x20changes...',()=>_0x2fec68[_0x3e789e(0x1cc)][_0x3e789e(0x2cf)]({'sourceDir':_0x2337d0,'revision':_0x247365,'skipValidation':_0xf5008f}),{'verbose':_0x96c3a1['verbose']});}catch(_0x4a3edd){if(_0x4a3edd instanceof Error&&_0x4a3edd[_0x3e789e(0x358)]['includes'](_0x3e789e(0x28e)))return console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x296)](_0x3e789e(0x2a2)),_0x3e789e(0x2b5)),_0x96c3a1[_0x3e789e(0x2b0)]?console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x2fe)](_0x3e789e(0x24b)+_0x96c3a1[_0x3e789e(0x2b0)]+_0x3e789e(0x20f)+_0x96c3a1[_0x3e789e(0x2b0)]+'\x27')):console['error'](a46_0x283a50[_0x3e789e(0x2fe)](_0x3e789e(0x231))),0x1;throw _0x4a3edd;}const _0x278efa=_0x2451b6[_0x3e789e(0x207)];console[_0x3e789e(0x23e)](_0x3e789e(0x20e)+_0x278efa['projectName']),console[_0x3e789e(0x23e)](_0x3e789e(0x213)+_0x278efa[_0x3e789e(0x20c)]),console[_0x3e789e(0x23e)]('\x20\x20Revision:\x20'+_0x278efa[_0x3e789e(0x286)]),console[_0x3e789e(0x23e)]('\x20\x20Changes:\x20'+a46_0x283a50[_0x3e789e(0x262)]('+'+_0x278efa[_0x3e789e(0x1ff)][_0x3e789e(0x318)]+_0x3e789e(0x1b1))+',\x20'+(a46_0x283a50['yellow']('~'+_0x278efa[_0x3e789e(0x1ff)][_0x3e789e(0x35e)]+_0x3e789e(0x2a9))+',\x20')+(a46_0x283a50['red']('-'+_0x278efa['summary']['deleted']+_0x3e789e(0x32d))+',\x20')+(''+a46_0x283a50[_0x3e789e(0x2fe)](_0x278efa['summary']['unchanged']+_0x3e789e(0x272))));for(const _0x1a410c of _0x278efa[_0x3e789e(0x30b)]){_0x1a410c['type']===_0x3e789e(0x35e)&&_0x1a410c[_0x3e789e(0x276)]&&(console['error']('\x0a'+a46_0x283a50['cyan'](_0x3e789e(0x2db)+_0x1a410c['path'])),console[_0x3e789e(0x23e)](_0x1a410c[_0x3e789e(0x276)]));}if(!_0x278efa['hasChanges'])return console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x262)](_0x3e789e(0x322))),await this[_0x3e789e(0x1c4)](_0x2fec68,_0x278efa[_0x3e789e(0x360)],_0x96c3a1[_0x3e789e(0x31a)]),0x0;if(_0x96c3a1[_0x3e789e(0x29e)])return console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x1e7)](_0x3e789e(0x275))),0x0;if(!_0x96c3a1[_0x3e789e(0x246)]){if(!isInteractive())return console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x296)](_0x3e789e(0x332)),_0x3e789e(0x350)),console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x2fe)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2fcfec=await confirmKey(_0x3e789e(0x1f1));if(!_0x2fcfec)return console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x1e7)](_0x3e789e(0x22d)),_0x3e789e(0x1fd)),0x1;}const _0x36a5c9=await withSpinner(_0x3e789e(0x1d3),()=>_0x2fec68['workflow']['executePushProject'](_0x278efa),{'verbose':_0x96c3a1[_0x3e789e(0x2f0)]}),_0xdb4cc5=_0x36a5c9[_0x3e789e(0x207)];return console[_0x3e789e(0x23e)](a46_0x283a50[_0x3e789e(0x262)](_0x3e789e(0x1f5))),console[_0x3e789e(0x23e)](_0x3e789e(0x290)+_0xdb4cc5[_0x3e789e(0x329)]),console[_0x3e789e(0x23e)]('\x20\x20Revision:\x20'+_0xdb4cc5[_0x3e789e(0x286)]),await this[_0x3e789e(0x1c4)](_0x2fec68,_0xdb4cc5[_0x3e789e(0x360)],_0x96c3a1[_0x3e789e(0x31a)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x35a);[a46_0x49f959(0x1ca)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async['execute'](_0x3e0b4c){const _0x2c33dc=a46_0x49f959,{options:_0x4e07c8,args:_0x549d6c,tdx:_0xcc7663}=_0x3e0b4c,_0x5cc17d=this[_0x2c33dc(0x303)](_0x549d6c,_0x4e07c8),_0x845822=_0x4e07c8[_0x2c33dc(0x248)],_0x33e6b2=_0x4e07c8[_0x2c33dc(0x286)],_0x45b23b=_0x4e07c8[_0x2c33dc(0x27e)];if(!_0x5cc17d)return console[_0x2c33dc(0x23e)](a46_0x283a50['red'](_0x2c33dc(0x2a2)),_0x2c33dc(0x20a)),console[_0x2c33dc(0x23e)](a46_0x283a50[_0x2c33dc(0x2fe)](_0x2c33dc(0x32a))),console[_0x2c33dc(0x23e)](a46_0x283a50[_0x2c33dc(0x2fe)](_0x2c33dc(0x333))),0x1;if(!_0x845822)return console['error'](a46_0x283a50[_0x2c33dc(0x296)]('Error:'),_0x2c33dc(0x22f)),console['error'](a46_0x283a50[_0x2c33dc(0x2fe)](_0x2c33dc(0x32a))),0x1;_0x4e07c8[_0x2c33dc(0x2f0)]&&(console[_0x2c33dc(0x23e)]('Source\x20directory:\x20'+_0x5cc17d),console['error']('New\x20project\x20name:\x20'+_0x845822),_0x33e6b2&&console['error']('Revision:\x20'+_0x33e6b2),_0x4e07c8[_0x2c33dc(0x29e)]&&console[_0x2c33dc(0x23e)]('Dry\x20run:\x20yes'),_0x45b23b&&console[_0x2c33dc(0x23e)](_0x2c33dc(0x1d6)));const _0x1e701d=await withSpinner(_0x2c33dc(0x233),()=>_0xcc7663[_0x2c33dc(0x1cc)][_0x2c33dc(0x32f)](_0x5cc17d,_0x845822,{'revision':_0x33e6b2,'skipValidation':_0x45b23b}),{'verbose':_0x4e07c8[_0x2c33dc(0x2f0)]}),_0x325f06=_0x1e701d[_0x2c33dc(0x207)];console[_0x2c33dc(0x23e)](_0x2c33dc(0x224)+_0x325f06[_0x2c33dc(0x20c)]);_0x325f06[_0x2c33dc(0x309)]&&console[_0x2c33dc(0x23e)]('Source\x20project:\x20'+_0x325f06['sourceProjectName']);console[_0x2c33dc(0x23e)](_0x2c33dc(0x2de)+_0x325f06[_0x2c33dc(0x23f)]),console['error'](_0x2c33dc(0x2c9)+_0x325f06[_0x2c33dc(0x286)]),console[_0x2c33dc(0x23e)](_0x2c33dc(0x2d0)+_0x325f06[_0x2c33dc(0x208)]);_0x325f06[_0x2c33dc(0x342)]&&(console[_0x2c33dc(0x23e)](a46_0x283a50[_0x2c33dc(0x1e7)](_0x2c33dc(0x1fc)+_0x325f06['newProjectName']+_0x2c33dc(0x257)+_0x325f06[_0x2c33dc(0x1de)]+')')),console['error'](a46_0x283a50[_0x2c33dc(0x1e7)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x4e07c8[_0x2c33dc(0x29e)])return console[_0x2c33dc(0x23e)](a46_0x283a50['yellow']('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x4e07c8['yes']){if(!isInteractive())return console[_0x2c33dc(0x23e)](a46_0x283a50[_0x2c33dc(0x296)]('\x0aError:'),_0x2c33dc(0x350)),console[_0x2c33dc(0x23e)](a46_0x283a50[_0x2c33dc(0x2fe)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xfa02b5=_0x325f06[_0x2c33dc(0x309)]||a46_0x6d3a63['basename'](_0x5cc17d),_0x34dd02=_0x325f06[_0x2c33dc(0x342)]?_0x2c33dc(0x279)+_0x845822+_0x2c33dc(0x2b8):'\x0aClone\x20\x22'+_0xfa02b5+'\x22\x20to\x20new\x20project\x20\x22'+_0x845822+'\x22?',_0x48603f=await confirmKey(_0x34dd02);if(!_0x48603f)return console['error'](a46_0x283a50[_0x2c33dc(0x1e7)]('Cancelled')),0x1;}const _0x18f65a=await withSpinner(_0x325f06['targetExists']?'Updating\x20'+_0x845822+_0x2c33dc(0x1cb):_0x2c33dc(0x2a0)+_0x845822+'...',()=>_0xcc7663[_0x2c33dc(0x1cc)][_0x2c33dc(0x364)](_0x325f06),{'verbose':_0x4e07c8[_0x2c33dc(0x2f0)]}),_0x87fb15=_0x18f65a['data'];return console[_0x2c33dc(0x23e)](a46_0x283a50[_0x2c33dc(0x262)](_0x325f06[_0x2c33dc(0x342)]?_0x2c33dc(0x362):_0x2c33dc(0x1ed))),console['error'](_0x2c33dc(0x35c)+_0x87fb15[_0x2c33dc(0x23f)]),console['error'](_0x2c33dc(0x290)+_0x87fb15['newProjectId']),console[_0x2c33dc(0x23e)](_0x2c33dc(0x293)+_0x87fb15['revision']),await this['showWorkflowConsoleUrl'](_0xcc7663,_0x87fb15['newProjectName'],_0x4e07c8[_0x2c33dc(0x31a)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a46_0x49f959(0x25e);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x1d8);async['execute'](_0x58cc97){const _0x1383e6=a46_0x49f959,{options:_0x1ad4a7,args:_0x446a36,tdx:_0x2dfa2a}=_0x58cc97,_0x3c9b3a=_0x446a36[0x0];if(!_0x3c9b3a)return console[_0x1383e6(0x23e)](_0x1383e6(0x2fa)),console[_0x1383e6(0x23e)](_0x1383e6(0x2ed)),0x1;_0x1ad4a7[_0x1383e6(0x2f0)]&&console['error']('Project:\x20'+_0x3c9b3a);if(!_0x1ad4a7[_0x1383e6(0x246)]){if(!isInteractive())return console[_0x1383e6(0x23e)](a46_0x283a50[_0x1383e6(0x296)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a46_0x283a50['dim'](_0x1383e6(0x2ae))),0x1;const _0x30c8fd=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x3c9b3a+_0x1383e6(0x2d9));if(!_0x30c8fd)return console[_0x1383e6(0x23e)](a46_0x283a50['yellow'](_0x1383e6(0x22d))),0x1;}const _0x5009ca=await withSpinner(_0x1383e6(0x22e)+_0x3c9b3a+_0x1383e6(0x1cb),()=>_0x2dfa2a[_0x1383e6(0x1cc)]['delete'](_0x3c9b3a),{'verbose':_0x1ad4a7[_0x1383e6(0x2f0)]}),_0x49e29b=_0x5009ca[_0x1383e6(0x207)];return console[_0x1383e6(0x23e)](_0x1383e6(0x25a)+_0x49e29b[_0x1383e6(0x360)]),console[_0x1383e6(0x23e)](_0x1383e6(0x290)+_0x49e29b[_0x1383e6(0x329)]),0x0;}}export function parseKeyValue(_0x33e45d){const _0x5f4f7e=a46_0x49f959,_0x12dbda=_0x33e45d[_0x5f4f7e(0x1dd)]('=');if(_0x12dbda===-0x1)throw new Error(_0x5f4f7e(0x2d3)+_0x33e45d+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x2238d=_0x33e45d[_0x5f4f7e(0x1b8)](0x0,_0x12dbda),_0x596aa0=_0x33e45d[_0x5f4f7e(0x1b8)](_0x12dbda+0x1);if(!_0x2238d)throw new Error(_0x5f4f7e(0x295));return{'key':_0x2238d,'value':_0x596aa0};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x359);['description']=a46_0x49f959(0x2a1);async[a46_0x49f959(0x214)](_0x1338ba){const _0x3ff121=a46_0x49f959,{options:_0x34a2e0,args:_0x1ab412,tdx:_0x2bceb1}=_0x1338ba,_0x3201f8=this[_0x3ff121(0x26c)](_0x1ab412,_0x34a2e0);if(!_0x3201f8)return 0x1;_0x34a2e0[_0x3ff121(0x2f0)]&&console[_0x3ff121(0x23e)]('Project:\x20'+_0x3201f8);const _0x2514aa=await withSpinner(_0x3ff121(0x229),()=>_0x2bceb1['workflow'][_0x3ff121(0x341)](_0x3201f8),{'verbose':_0x34a2e0[_0x3ff121(0x2f0)]}),{secrets:_0x5b0ef9}=_0x2514aa['data'];return console[_0x3ff121(0x23e)]('✔\x20Found\x20'+_0x5b0ef9[_0x3ff121(0x1ec)]+_0x3ff121(0x34c)+(_0x5b0ef9[_0x3ff121(0x1ec)]!==0x1?'s':'')),await handleSDKOutput(_0x5b0ef9,_0x34a2e0),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x1c3);['description']=a46_0x49f959(0x1b4);async['execute'](_0x342266){const _0x7dc81e=a46_0x49f959,{options:_0x4ed9e7,args:_0x55c1c7,tdx:_0x423316}=_0x342266;let _0x24d2ca,_0xfdae60;if(_0x55c1c7[_0x7dc81e(0x1ec)]>=0x2)_0x24d2ca=_0x55c1c7[0x0],_0xfdae60=_0x55c1c7[0x1];else{if(_0x55c1c7[_0x7dc81e(0x1ec)]===0x1&&_0x4ed9e7[_0x7dc81e(0x2b0)])_0x24d2ca=_0x4ed9e7['workflowProject'],_0xfdae60=_0x55c1c7[0x0];else return _0x55c1c7[_0x7dc81e(0x1ec)]===0x1?(console[_0x7dc81e(0x23e)](_0x7dc81e(0x1fa)),console['error'](_0x7dc81e(0x324)),0x1):(console[_0x7dc81e(0x23e)](_0x7dc81e(0x2c1)),console[_0x7dc81e(0x23e)](_0x7dc81e(0x261)),0x1);}let _0x240fc3,_0x17e144;try{({key:_0x240fc3,value:_0x17e144}=parseKeyValue(_0xfdae60));}catch(_0x4aa3d3){return _0x4aa3d3 instanceof Error&&console[_0x7dc81e(0x23e)](a46_0x283a50[_0x7dc81e(0x296)](_0x7dc81e(0x2a2)),_0x4aa3d3[_0x7dc81e(0x358)]),0x1;}_0x4ed9e7[_0x7dc81e(0x2f0)]&&(console[_0x7dc81e(0x23e)](_0x7dc81e(0x2e6)+_0x24d2ca),console[_0x7dc81e(0x23e)](_0x7dc81e(0x1b7)+_0x240fc3));const _0xdf3af3=await withSpinner(_0x7dc81e(0x328),()=>_0x423316['workflow'][_0x7dc81e(0x320)](_0x24d2ca,_0x240fc3,_0x17e144),{'verbose':_0x4ed9e7[_0x7dc81e(0x2f0)]}),_0x2bc88c=_0xdf3af3[_0x7dc81e(0x207)];return console['error'](_0x7dc81e(0x1e9)+_0x2bc88c['key']+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x2bc88c[_0x7dc81e(0x360)]+'\x27'),(_0x4ed9e7[_0x7dc81e(0x219)]||_0x4ed9e7[_0x7dc81e(0x29d)])&&await handleSingleObjectOutput(_0x2bc88c,_0x4ed9e7),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a46_0x49f959(0x248)]=a46_0x49f959(0x31f);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x338);async['execute'](_0x16b85d){const _0x4da9f3=a46_0x49f959,{options:_0x224a3f,args:_0x215dc9,tdx:_0xa0ac6d}=_0x16b85d;let _0x41a429,_0xa6da55;if(_0x215dc9[_0x4da9f3(0x1ec)]>=0x2)_0x41a429=_0x215dc9[0x0],_0xa6da55=_0x215dc9[0x1];else{if(_0x215dc9[_0x4da9f3(0x1ec)]===0x1&&_0x224a3f[_0x4da9f3(0x2b0)])_0x41a429=_0x224a3f[_0x4da9f3(0x2b0)],_0xa6da55=_0x215dc9[0x0];else return _0x215dc9[_0x4da9f3(0x1ec)]===0x1?(console[_0x4da9f3(0x23e)](_0x4da9f3(0x1fa)),console[_0x4da9f3(0x23e)](_0x4da9f3(0x324)),0x1):(console['error'](_0x4da9f3(0x24c)),console[_0x4da9f3(0x23e)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x224a3f[_0x4da9f3(0x2f0)]&&(console[_0x4da9f3(0x23e)]('Project:\x20'+_0x41a429),console['error'](_0x4da9f3(0x1b7)+_0xa6da55));if(!_0x224a3f[_0x4da9f3(0x246)]){if(!isInteractive())return console[_0x4da9f3(0x23e)](a46_0x283a50[_0x4da9f3(0x296)](_0x4da9f3(0x332)),_0x4da9f3(0x350)),console[_0x4da9f3(0x23e)](a46_0x283a50[_0x4da9f3(0x2fe)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x375b4a=await confirmKey(_0x4da9f3(0x317)+_0xa6da55+_0x4da9f3(0x2ce)+_0x41a429+'\x27?');if(!_0x375b4a)return console[_0x4da9f3(0x23e)](a46_0x283a50['yellow'](_0x4da9f3(0x22d))),0x1;}const _0x2dcc67=await withSpinner(_0x4da9f3(0x1f0),()=>_0xa0ac6d[_0x4da9f3(0x1cc)][_0x4da9f3(0x2e3)](_0x41a429,_0xa6da55),{'verbose':_0x224a3f[_0x4da9f3(0x2f0)]}),_0x3a87fa=_0x2dcc67[_0x4da9f3(0x207)];return console[_0x4da9f3(0x23e)](_0x4da9f3(0x1e9)+_0x3a87fa['key']+_0x4da9f3(0x314)+_0x3a87fa[_0x4da9f3(0x360)]+'\x27'),(_0x224a3f['json']||_0x224a3f[_0x4da9f3(0x29d)])&&await handleSingleObjectOutput(_0x3a87fa,_0x224a3f),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x1cae55){const _0x3f8dfd=a46_0x49f959,_0x4814e9=Math['floor'](_0x1cae55/0x3e8),_0x14e9e2=Math[_0x3f8dfd(0x34a)](_0x4814e9/0x3c),_0x3d9cfd=Math['floor'](_0x14e9e2/0x3c),_0x19c1c4=Math[_0x3f8dfd(0x34a)](_0x3d9cfd/0x18);if(_0x19c1c4>0x0){const _0x36d8a2=_0x3d9cfd%0x18;return _0x36d8a2>0x0?_0x19c1c4+'d\x20'+_0x36d8a2+'h':_0x19c1c4+'d';}else{if(_0x3d9cfd>0x0){const _0x34039f=_0x14e9e2%0x3c;return _0x34039f>0x0?_0x3d9cfd+'h\x20'+_0x34039f+'m':_0x3d9cfd+'h';}else{if(_0x14e9e2>0x0){const _0x17c0d0=_0x4814e9%0x3c;return _0x17c0d0>0x0?_0x14e9e2+'m\x20'+_0x17c0d0+'s':_0x14e9e2+'m';}else return _0x4814e9+'s';}}}function formatTimestamp(_0x27047a,_0x50dee3){const _0x5ea940=a46_0x49f959,_0x35ecfa=new Date(_0x27047a),_0x2bd0c9=String(_0x35ecfa[_0x5ea940(0x299)]())[_0x5ea940(0x254)](0x2,'0'),_0x2d89a2=String(_0x35ecfa['getMinutes']())[_0x5ea940(0x254)](0x2,'0'),_0x11d197=_0x2bd0c9+':'+_0x2d89a2,_0x1fd058=_0x35ecfa[_0x5ea940(0x245)]()===_0x50dee3[_0x5ea940(0x245)]()&&_0x35ecfa[_0x5ea940(0x301)]()===_0x50dee3[_0x5ea940(0x301)]()&&_0x35ecfa[_0x5ea940(0x1d9)]()===_0x50dee3[_0x5ea940(0x1d9)]();if(_0x1fd058)return _0x11d197;else{const _0x52f876=String(_0x35ecfa[_0x5ea940(0x301)]()+0x1)[_0x5ea940(0x254)](0x2,'0'),_0x2b01bf=String(_0x35ecfa[_0x5ea940(0x1d9)]())[_0x5ea940(0x254)](0x2,'0');return _0x52f876+'-'+_0x2b01bf+'\x20'+_0x11d197;}}function formatDate(_0x182b26){const _0x1e5eda=a46_0x49f959,_0x30283f=_0x182b26['getFullYear'](),_0x47ea72=String(_0x182b26[_0x1e5eda(0x301)]()+0x1)[_0x1e5eda(0x254)](0x2,'0'),_0x41c07e=String(_0x182b26[_0x1e5eda(0x1d9)]())['padStart'](0x2,'0');return _0x30283f+'-'+_0x47ea72+'-'+_0x41c07e;}function getTaskStateIcon(_0x40b7ba){const _0xf6cfae={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0xf6cfae[_0x40b7ba]||'⚪';}function getBarChar(_0x59b567){const _0x57b52=a46_0x49f959;return _0x59b567==='error'||_0x59b567===_0x57b52(0x227)?'×':'─';}function getBarColor(_0x5cb9b3){const _0x29d01a=a46_0x49f959,_0x34dd4d={'success':a46_0x283a50[_0x29d01a(0x262)],'error':a46_0x283a50['red'],'group_error':a46_0x283a50[_0x29d01a(0x296)],'running':a46_0x283a50[_0x29d01a(0x1bf)],'blocked':a46_0x283a50[_0x29d01a(0x1e7)],'planned':a46_0x283a50['dim'],'canceling':a46_0x283a50[_0x29d01a(0x1e7)]};return _0x34dd4d[_0x5cb9b3]||a46_0x283a50[_0x29d01a(0x356)];}function parseTaskName(_0x24c21e){const _0x26e3f7=a46_0x49f959;let _0x22225e=_0x24c21e[_0x26e3f7(0x2ef)](/^\++/,'');const _0x281b49=_0x22225e[_0x26e3f7(0x348)]('+'),_0x10991a=_0x281b49[_0x26e3f7(0x1ec)]>0x1?_0x281b49[_0x26e3f7(0x1ec)]-0x2:0x0,_0x19e11c=_0x281b49[_0x281b49['length']-0x1]||_0x22225e;return{'level':_0x10991a,'name':'+'+_0x19e11c};}function truncateTaskName(_0x5a0dda,_0x2bf628){const _0x22666b=a46_0x49f959,_0x45beda=stringWidth(_0x5a0dda);if(_0x45beda<=_0x2bf628)return _0x5a0dda;let _0x2fe13c=_0x5a0dda;while(stringWidth(_0x2fe13c+'…')>_0x2bf628&&_0x2fe13c[_0x22666b(0x1ec)]>0x0){_0x2fe13c=_0x2fe13c['slice'](0x0,-0x1);}return _0x2fe13c+'…';}function calculateTimeScale(_0x1727f7,_0x281821){const _0x47611f=a46_0x49f959;return{'startTime':_0x1727f7[_0x47611f(0x1f7)],'endTime':_0x1727f7[_0x47611f(0x21c)],'durationMs':_0x1727f7[_0x47611f(0x255)],'msPerChar':_0x1727f7[_0x47611f(0x255)]/_0x281821};}function timeToPosition(_0x51e92e,_0x124e60,_0x245d73){const _0x4449f0=a46_0x49f959,_0x3eb95f=_0x51e92e-_0x124e60[_0x4449f0(0x315)],_0x304caa=Math['floor'](_0x3eb95f/_0x124e60[_0x4449f0(0x267)]);return Math['max'](0x0,Math[_0x4449f0(0x2b3)](_0x304caa,_0x245d73));}function renderTimeAxis(_0x189b85,_0xee0688){const _0x2b5a1f=a46_0x49f959,_0x3d0464=Math[_0x2b5a1f(0x2b3)](TIMELINE_CONFIG[_0x2b5a1f(0x1e4)],Math[_0x2b5a1f(0x22a)](TIMELINE_CONFIG[_0x2b5a1f(0x1df)],Math[_0x2b5a1f(0x34a)](_0xee0688/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x2fa3a3=_0x189b85['durationMs']/(_0x3d0464-0x1),_0x1b60fe=new Date(_0x189b85[_0x2b5a1f(0x315)]),_0x190545=[];for(let _0x16e1b9=0x0;_0x16e1b9<_0x3d0464;_0x16e1b9++){const _0x1d2671=_0x189b85[_0x2b5a1f(0x315)]+_0x16e1b9*_0x2fa3a3,_0x5c6eb8=timeToPosition(_0x1d2671,_0x189b85,_0xee0688),_0x5cd437=formatTimestamp(_0x1d2671,_0x1b60fe);_0x190545['push']({'pos':_0x5c6eb8,'text':_0x5cd437});}const _0x3eef89=new Array(_0xee0688)[_0x2b5a1f(0x35b)]('\x20');let _0x56e952=-0x1;for(const {pos:_0xfed4d2,text:_0x20968c}of _0x190545){let _0x4477d3=Math[_0x2b5a1f(0x22a)](0x0,_0xfed4d2-Math['floor'](_0x20968c[_0x2b5a1f(0x1ec)]/0x2));_0x4477d3<=_0x56e952+TIMELINE_CONFIG[_0x2b5a1f(0x235)]&&(_0x4477d3=_0x56e952+TIMELINE_CONFIG[_0x2b5a1f(0x235)]+0x1);_0x4477d3+_0x20968c['length']>_0xee0688&&(_0x4477d3=_0xee0688-_0x20968c['length']);if(_0x4477d3>=0x0&&_0x4477d3+_0x20968c[_0x2b5a1f(0x1ec)]<=_0xee0688&&_0x4477d3>_0x56e952){for(let _0x54167f=0x0;_0x54167f<_0x20968c[_0x2b5a1f(0x1ec)];_0x54167f++){_0x3eef89[_0x4477d3+_0x54167f]=_0x20968c[_0x54167f];}_0x56e952=_0x4477d3+_0x20968c[_0x2b5a1f(0x1ec)]-0x1;}}return _0x3eef89[_0x2b5a1f(0x2bb)]('');}function renderTaskRow(_0x16a369,_0x487ab1,_0x3f7956,_0x40dead){const _0x4dbfba=a46_0x49f959,{level:_0x174936,name:_0x5b69d0}=parseTaskName(_0x16a369[_0x4dbfba(0x248)]),_0x5a5af7='\x20'[_0x4dbfba(0x1d1)](_0x174936),_0x2f9a6e=_0x16a369[_0x4dbfba(0x2d5)]?'('+formatElapsed(_0x16a369[_0x4dbfba(0x2d5)][_0x4dbfba(0x255)])+')':'',_0x146a27=stringWidth(_0x2f9a6e),_0x1cd193=_0x174936*0x1,_0x557f39=_0x40dead-_0x1cd193-_0x146a27-0x1,_0x108a08=truncateTaskName(_0x5b69d0,_0x557f39),_0x20fb25=_0x5a5af7+_0x108a08,_0x53369d=stringWidth(_0x20fb25),_0x3bb299=_0x40dead-_0x53369d-_0x146a27,_0x4d496f=_0x20fb25+'\x20'['repeat'](Math['max'](0x1,_0x3bb299))+a46_0x283a50['dim'](_0x2f9a6e),_0x3e14f3=getTaskStateIcon(_0x16a369[_0x4dbfba(0x325)]),_0x4b4a62=new Array(_0x3f7956)[_0x4dbfba(0x35b)]('\x20');if(_0x16a369['window']){const _0x253879=timeToPosition(_0x16a369[_0x4dbfba(0x2d5)]['start'],_0x487ab1,_0x3f7956),_0x581531=timeToPosition(_0x16a369[_0x4dbfba(0x2d5)][_0x4dbfba(0x21c)],_0x487ab1,_0x3f7956),_0x17788e=getBarChar(_0x16a369[_0x4dbfba(0x325)]),_0xabe7ff=Math[_0x4dbfba(0x22a)](_0x253879+0x1,_0x581531);for(let _0x58672b=_0x253879;_0x58672b<Math['min'](_0xabe7ff,_0x3f7956);_0x58672b++){_0x4b4a62[_0x58672b]=_0x17788e;}}const _0xa5b065=getBarColor(_0x16a369[_0x4dbfba(0x325)]),_0x250b40=_0x4b4a62[_0x4dbfba(0x1c7)](_0x1cee02=>_0x1cee02==='\x20'?'\x20':_0xa5b065(_0x1cee02))[_0x4dbfba(0x2bb)]('');return _0x3e14f3+'\x20'+_0x4d496f+'│'+_0x250b40+'│';}function calculateStats(_0x52d143){const _0x2d2e76=a46_0x49f959,_0x39fa37={'total':_0x52d143[_0x2d2e76(0x1ec)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x408fae of _0x52d143){if(_0x408fae[_0x2d2e76(0x325)]==='success')_0x39fa37[_0x2d2e76(0x331)]++;else{if(_0x408fae[_0x2d2e76(0x325)]===_0x2d2e76(0x23e)||_0x408fae['state']===_0x2d2e76(0x227))_0x39fa37[_0x2d2e76(0x23e)]++;else _0x408fae[_0x2d2e76(0x325)]===_0x2d2e76(0x2bf)?_0x39fa37[_0x2d2e76(0x2bf)]++:_0x39fa37['pending']++;}}return _0x39fa37;}function a46_0x2388(){const _0x115e30=['New\x20project\x20name:\x20','fromTask','\x0aApply\x20these\x20changes?','ICON_WIDTH','No\x20sessions\x20found\x20in\x20project:\x20','deleteSecret','\x0aPolling...\x20(','index','Project:\x20','List\x20all\x20workflow\x20projects','fileSize','all','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','No\x20attempts\x20found\x20in\x20project:\x20','localeCompare','Usage:\x20workflow:delete\x20<project-name-or-id>','\x1b[1A\x1b[2K','replace','verbose','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','relative','session_id','lastAttempt','\x20\x20Workflow:\x20','getTime','splice','unchanged','run','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','get','Resume\x20from:\x20','format','dim','text','\x20project','getMonth','Auto-selected\x20latest\x20session:\x20','resolveProjectDir','stringify','✔\x20Downloaded\x20','No\x20sessions\x20with\x20timing\x20information','Project\x20name:\x20','attempt:','sourceProjectName','sort','changes','Select\x20a\x20session\x20to\x20view\x20timeline:','resolveProject','POLL_INTERVAL_MS','kill','MIN_TIMELINE_WIDTH','attempt','TASK_NAME_WIDTH','session:','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','startTime','write','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','new','planned','site','total','find','Select\x20a\x20workflow\x20to\x20run','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','workflow:secrets:delete','setSecret','List\x20workflow\x20execution\x20sessions','\x0a✔\x20No\x20changes\x20to\x20push','\x20is\x20not\x20a\x20directory','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','state','list','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Setting\x20secret...','projectId','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20\x20New\x20attempt\x20ID:\x20','\x20-\x20','\x20deleted','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','prepareCloneProject','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','success','\x0aError:','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','done','startsWith','round','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','List\x20workflows','Filter:\x20','Listing\x20workflow\x20sessions...','size','every','Show\x20tasks\x20for\x20an\x20attempt','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Dry\x20run:\x20yes','listSecrets','targetExists','MAX_POLL_ITERATIONS','logFiles','pending','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','readFile','split','Force:\x20yes','floor','clear','\x20secret','force','✔\x20Pull\x20complete','match','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','✔\x20Workflow\x20project\x20context\x20cleared.','🔄\x20','26515TCznWk','table','isDirectory','white','projects','message','workflow:secrets:list','workflow:clone','fill','\x20\x20Project:\x20','revision:\x20','modified','1574378GqVRVN','projectName','Listing\x20workflow\x20attempts...','✔\x20Project\x20updated','Downloading\x20project\x20','executeCloneProject','\x20(use\x20--limit\x20to\x20show\x20more)','Fetching\x20log\x20files...','⚠\x20Showing\x20first\x20','tdx\x20wf\x20attempt\x20','\x20new','resolveProjectId','sessionTime','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','✔\x20Showing\x20','renderTimeline','Key:\x20','substring','retryAttemptName','12GfyZlt','Project\x20name\x20is\x20required','Including\x20subtasks:\x20yes','-\x20no\x20files\x20written','💡\x20Tip:\x20Use\x20','blue','workflows','startedAt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:secrets:set','showWorkflowConsoleUrl','columns','Error:\x20Attempt\x20ID\x20is\x20required','map','resumeFrom','targetDir','description','...','workflow','Starting\x20workflow\x20run...','Retrying\x20attempt...','\x20has\x20no\x20attempts','now','repeat','log','Pushing\x20project...','📋\x20','\x20of\x20','Validation:\x20skipped','📁\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','getDate','No\x20sessions\x20found','No\x20log\x20files\x20found\x20for\x20this\x20attempt','workflow:timeline','indexOf','existingProjectId','MIN_LABEL_COUNT','sessions','taskName','context','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','MAX_LABEL_COUNT','Usage:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Files\x20extracted:\x20','yellow','Task\x20name:\x20','✔\x20Secret\x20\x27','\x20\x20Session\x20context\x20set\x20to:\x20','634203pRqtwG','length','✔\x20Clone\x20complete','\x20session','isTTY','Deleting\x20secret...','\x0aPush\x20these\x20changes?','\x20\x20Console:\x20','Target:\x20','trim','✔\x20Push\x20complete','filesExtracted','start','tasks','Params:\x20','Error:\x20Project\x20name\x20is\x20required','List\x20workflow\x20attempts','\x0a⚠\x20Project\x20\x22','-\x20nothing\x20pushed','Killing\x20attempt...','summary','workflow:run','set','filter','16031961ZWmvWr','isNewProject','workflowName','autocomplete','data','fileCount','Start\x20a\x20workflow\x20run','Source\x20directory\x20is\x20required','Error:\x20Invalid\x20parameter\x20format:\x20','sourceDir','param','✔\x20Project:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Error:\x20','\x20\x20Source:\x20','execute','cyan','renderSessionsTimeline','displayLine','fullName','json','createdAt','parseProjectWorkflowPattern','end','2956926VzIDky','cwd','key','rows','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Loading\x20workflows...','(use\x20--limit\x20to\x20see\x20more)','Source:\x20','sessionId','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','group_error','Getting\x20attempt\x20tasks...','Listing\x20secrets...','max','No\x20workflow\x20sessions\x20found','Target\x20directory:\x20','Cancelled','Deleting\x20project\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','trimEnd','Analyzing\x20project...','retryAttempt','LABEL_MIN_SPACING','2845656eipwxG','pollTimeline','select','unknown','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','parse','/app/workflows/','metadata','error','newProjectName','status','updatedAt','Loading\x20session...','type','Latest\x20session\x20has\x20no\x20attempt','getFullYear','yes','Show\x20specific\x20attempt\x20details','name','output','workflow:upload','Tip:\x20cd\x20to\x20workflows/','Error:\x20Secret\x20key\x20is\x20required','Project\x20filter:\x20','✔\x20Retry\x20started','limit','keys','\x20\x20tdx\x20wf\x20use\x20<project>','\x0a✔\x20Already\x20up\x20to\x20date','Output\x20directory:\x20','padStart','duration','\x20to\x20see\x20detailed\x20logs','\x22\x20already\x20exists\x20(ID:\x20','pullProject','isArray','✔\x20Deleted\x20project\x20','MAX_TIMELINE_WIDTH','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','session','workflow:delete','Pulling\x20project\x20','ICON_SPACING','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','green','GUTTER','\x0aFailed\x20to\x20fetch\x20attempt\x20data','stdout','\x20\x20Session\x20ID:\x20','msPerChar','Pull\x20workflow\x20project\x20to\x20local\x20folder','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Session\x20time:\x20','requireProject','Attempt:\x20',',\x20Workflow:\x20','push','/attempt/','workflow:download','\x20unchanged','\x20attempt','toISOString','\x0aDry\x20run\x20-\x20nothing\x20pushed','diff','project','Listing\x20workflows...','\x0aUpdate\x20existing\x20project\x20\x22','Writing\x20files...','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','renderSingleTimeline','/sessions/','skipValidation','✔\x20Workflow\x20run\x20started','hasChanges','logs','✔\x20Pushed\x20','navigateSessionsInteractive','48Aemjhm','Select\x20a\x20task\x20to\x20view\x20logs:','revision','attempts','download','canceling','Reason:\x20','utf-8','Parameters:\x20','Resolving\x20project\x20\x27','No\x20workflow\x20tdx.json\x20found','Attempt\x20ID:\x20','\x20\x20Project\x20ID:\x20','finishedAt','params','\x20\x20Revision:\x20','✔\x20Found\x20','Key\x20cannot\x20be\x20empty','red','workflow:kill','MAX_TASKS_DISPLAY','getHours','Warning:','retrySession','sys','jsonl','dryRun','\x20workflow','Cloning\x20to\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Error:','workflow:push','task','path','attemptId','No\x20attempts\x20found','workflow:tasks','\x20modified','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','value','Retrying\x20session...','\x20from\x20session\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','No\x20workflow\x20projects\x20found','workflowProject','workflow:attempt','values','min','reason','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Status:\x20','\x22\x20with\x20new\x20revision?','follow','has','join','\x20\x20Attempt\x20ID:\x20','buildTimelineData','fs/promises','running','Workflow:\x20','Error:\x20KEY=VALUE\x20is\x20required','workflow:logs','tdx.json','Filter:\x20project=','workflow:projects','toLowerCase','resolve','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Revision:\x20','\x20logs','includeRetried','Listing\x20workflow\x20projects...','No\x20sessions\x20found\x20for:\x20','\x27\x20from\x20project\x20\x27','preparePushProject','Files\x20to\x20upload:\x20','includes','workflow:workflows','Invalid\x20format:\x20','1033491YzqNWq','window','stat','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','slice','\x22?\x20This\x20cannot\x20be\x20undone.','applyPullProject','---\x20','workflow:retry','cancelRequested'];a46_0x2388=function(){return _0x115e30;};return a46_0x2388();}function formatStats(_0x4a838f){const _0x1a1dd7=a46_0x49f959;return['Total:\x20'+_0x4a838f[_0x1a1dd7(0x31b)],'✅\x20'+_0x4a838f[_0x1a1dd7(0x331)],'❌\x20'+_0x4a838f[_0x1a1dd7(0x23e)],_0x1a1dd7(0x352)+_0x4a838f[_0x1a1dd7(0x2bf)],'⏳\x20'+_0x4a838f[_0x1a1dd7(0x345)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a46_0x49f959(0x1dc);[a46_0x49f959(0x1ca)]=a46_0x49f959(0x2aa);async[a46_0x49f959(0x214)](_0x4df29b){const _0x3d429e=a46_0x49f959,{options:_0x5d6fb4,args:_0x575ec7,tdx:_0x501dba}=_0x4df29b;let _0x15fb68,_0x5d457c,_0x3c864f=![];if(_0x575ec7[0x0]){if(_0x575ec7[0x0][_0x3d429e(0x2d1)]('.')){const _0x6e8169=this['parseProjectWorkflowPattern'](_0x575ec7,_0x5d6fb4);if(!_0x6e8169)return 0x1;_0x15fb68=_0x6e8169[_0x3d429e(0x360)],_0x5d457c=_0x6e8169[_0x3d429e(0x205)];}else{_0x5d457c=_0x575ec7[0x0],_0x15fb68=_0x5d6fb4[_0x3d429e(0x2b0)];if(!_0x15fb68)return console[_0x3d429e(0x23e)](a46_0x283a50[_0x3d429e(0x296)](_0x3d429e(0x2a2)),_0x3d429e(0x2ea)),0x1;_0x3c864f=!![];}}else{const _0x3baf99=this['parseProjectWorkflowPattern'](_0x575ec7,_0x5d6fb4);if(!_0x3baf99)return 0x1;_0x15fb68=_0x3baf99[_0x3d429e(0x360)],_0x5d457c=_0x3baf99[_0x3d429e(0x205)];}if(_0x5d6fb4[_0x3d429e(0x2f0)]){if(_0x15fb68&&_0x5d457c)console['error'](_0x3d429e(0x33a)+_0x15fb68+'.'+_0x5d457c);else _0x15fb68&&console['error'](_0x3d429e(0x2c4)+_0x15fb68);}const _0x3968ca=_0x5d6fb4['attemptId'],_0x1fcd2c=_0x5d6fb4[_0x3d429e(0x225)];if(_0x3968ca){_0x1fcd2c&&console[_0x3d429e(0x23e)](a46_0x283a50[_0x3d429e(0x1e7)](_0x3d429e(0x29a)),_0x3d429e(0x330));const _0x13f848=_0x5d6fb4[_0x3d429e(0x2b9)];return _0x13f848?await this[_0x3d429e(0x237)](_0x4df29b,_0x3968ca):await this['renderSingleTimeline'](_0x4df29b,_0x3968ca,_0x5d6fb4),0x0;}if(_0x1fcd2c){const _0x638a1c=await withSpinner(_0x3d429e(0x242),()=>_0x501dba[_0x3d429e(0x1cc)]['sessions']({'projectName':_0x15fb68,'workflowName':_0x5d457c,'limit':0x64}),{'verbose':_0x5d6fb4[_0x3d429e(0x2f0)]}),_0x3d43d5=_0x638a1c[_0x3d429e(0x207)][_0x3d429e(0x31c)](_0x130932=>_0x130932['id']===_0x1fcd2c);if(!_0x3d43d5)return console[_0x3d429e(0x23e)](a46_0x283a50[_0x3d429e(0x296)]('Error:'),'Session\x20not\x20found:\x20'+_0x1fcd2c),0x1;if(!_0x3d43d5[_0x3d429e(0x2f4)]?.['id'])return console[_0x3d429e(0x23e)](a46_0x283a50[_0x3d429e(0x296)]('Error:'),'Session\x20'+_0x1fcd2c+_0x3d429e(0x1cf)),0x1;const _0x55cafe=_0x3d43d5['lastAttempt']['id'];_0x5d6fb4[_0x3d429e(0x2f0)]&&console['error']('Using\x20attempt\x20'+_0x55cafe+_0x3d429e(0x2ad)+_0x1fcd2c);const _0x75a28a=_0x5d6fb4[_0x3d429e(0x2b9)];return _0x75a28a?await this[_0x3d429e(0x237)](_0x4df29b,_0x55cafe):await this['renderSingleTimeline'](_0x4df29b,_0x55cafe,_0x5d6fb4),0x0;}const _0x225ebb=await withSpinner('Loading\x20sessions...',()=>_0x501dba[_0x3d429e(0x1cc)][_0x3d429e(0x1e0)]({'projectName':_0x15fb68,'workflowName':_0x5d457c,'limit':_0x5d6fb4['limit']||0x32}),{'verbose':_0x5d6fb4[_0x3d429e(0x2f0)]}),_0xf2fb45=_0x225ebb[_0x3d429e(0x207)];if(_0xf2fb45[_0x3d429e(0x1ec)]===0x0){if(_0x15fb68&&_0x5d457c)console[_0x3d429e(0x23e)](_0x3d429e(0x2cd)+_0x15fb68+'.'+_0x5d457c);else _0x15fb68?console[_0x3d429e(0x23e)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x15fb68):(console[_0x3d429e(0x23e)](_0x3d429e(0x22b)),console[_0x3d429e(0x23e)](a46_0x283a50['dim'](_0x3d429e(0x32e))));return 0x0;}_0xf2fb45['sort']((_0x3e490f,_0x3c4e7a)=>{const _0x47db3b=_0x3d429e,_0x285580=_0x3e490f[_0x47db3b(0x1b3)]||'',_0x3efcb1=_0x3c4e7a[_0x47db3b(0x1b3)]||'';return _0x3efcb1[_0x47db3b(0x2ec)](_0x285580);});if(_0x5d6fb4[_0x3d429e(0x219)]||_0x5d6fb4[_0x3d429e(0x29d)])return await handleSDKOutput(_0xf2fb45,_0x5d6fb4),0x0;let _0xcbe789;if(_0x3c864f){const _0x4c3d49=_0xf2fb45[0x0];if(!_0x4c3d49['lastAttempt']?.['id'])return console[_0x3d429e(0x23e)](_0x3d429e(0x244)),0x0;_0xcbe789=_0x4c3d49[_0x3d429e(0x2f4)]['id'],_0x5d6fb4[_0x3d429e(0x2f0)]&&console[_0x3d429e(0x23e)](_0x3d429e(0x302)+_0x4c3d49[_0x3d429e(0x1b3)]);}else{const _0x3772f1=_0xf2fb45[_0x3d429e(0x1c7)](_0x572a49=>{const _0x40a1f0=_0x3d429e,_0x52465f=getAttemptStatusDisplay(_0x572a49[_0x40a1f0(0x2f4)]);return{'title':_0x572a49[_0x40a1f0(0x277)]?.[_0x40a1f0(0x248)]+'.'+_0x572a49[_0x40a1f0(0x1cc)]?.[_0x40a1f0(0x248)]+_0x40a1f0(0x32c)+_0x572a49['sessionTime']+'\x20'+_0x52465f['icon'],'value':_0x572a49[_0x40a1f0(0x2f4)]?.['id']||'','description':_0x52465f[_0x40a1f0(0x2ff)]};}),_0x3a7c44=await a46_0x10d2c2({'type':_0x3d429e(0x238),'name':'attemptId','message':_0x3d429e(0x30c),'choices':_0x3772f1[_0x3d429e(0x202)](_0x41e7a3=>_0x41e7a3[_0x3d429e(0x2ab)]!=='')});if(!_0x3a7c44['attemptId'])return 0x0;_0xcbe789=_0x3a7c44[_0x3d429e(0x2a6)];}const _0x31130f=_0x5d6fb4[_0x3d429e(0x2b9)];return _0x31130f?await this['pollTimeline'](_0x4df29b,_0xcbe789):await this[_0x3d429e(0x27c)](_0x4df29b,_0xcbe789,_0x5d6fb4),0x0;}async['renderSingleTimeline'](_0x1dd044,_0x32cf4d,_0x2e4189){const _0x1b1e62=a46_0x49f959,{tdx:_0x10f5cb}=_0x1dd044;let _0x43abab,_0x2c4c6a;try{[_0x43abab,_0x2c4c6a]=await Promise['all']([_0x10f5cb[_0x1b1e62(0x1cc)]['attempt'](_0x32cf4d),_0x10f5cb[_0x1b1e62(0x1cc)]['tasks'](_0x32cf4d,![])]);}catch(_0x1b8b6e){console[_0x1b1e62(0x23e)](a46_0x283a50['red']('Failed\x20to\x20fetch\x20attempt\x20data'));_0x2e4189[_0x1b1e62(0x2f0)]&&console[_0x1b1e62(0x23e)](_0x1b8b6e);throw _0x1b8b6e;}if(_0x2e4189[_0x1b1e62(0x219)]||_0x2e4189['jsonl']){const _0x135120=this[_0x1b1e62(0x2bd)](_0x43abab,_0x2c4c6a);await handleSDKOutput([_0x135120],_0x2e4189);return;}const _0x2a6867=_0x10f5cb[_0x1b1e62(0x1e2)]['site'],_0x1ffc23=this[_0x1b1e62(0x1b6)](_0x43abab,_0x2c4c6a,_0x2a6867);console[_0x1b1e62(0x1d2)](_0x1ffc23);}async[a46_0x49f959(0x237)](_0x52724b,_0x54e325){const _0x2ddcb5=a46_0x49f959,{tdx:_0x224d6e}=_0x52724b,_0x1463c8=TIMELINE_CONFIG[_0x2ddcb5(0x30e)],_0x2f86d7=TIMELINE_CONFIG[_0x2ddcb5(0x343)];let _0x377ca5=0x0;while(_0x377ca5<_0x2f86d7){process[_0x2ddcb5(0x265)][_0x2ddcb5(0x1ef)]&&process[_0x2ddcb5(0x265)][_0x2ddcb5(0x316)]('\x1bc');let _0x3f4671,_0x380993;try{[_0x3f4671,_0x380993]=await Promise[_0x2ddcb5(0x2e9)]([_0x224d6e[_0x2ddcb5(0x1cc)]['attempt'](_0x54e325),_0x224d6e['workflow'][_0x2ddcb5(0x1f8)](_0x54e325,![])]);}catch(_0x4d876b){console[_0x2ddcb5(0x23e)](a46_0x283a50[_0x2ddcb5(0x296)](_0x2ddcb5(0x264)));_0x377ca5>0x0&&console[_0x2ddcb5(0x23e)](a46_0x283a50['dim']('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x377ca5));throw _0x4d876b;}const _0x15f521=_0x224d6e[_0x2ddcb5(0x1e2)][_0x2ddcb5(0x31a)],_0x57aad1=this[_0x2ddcb5(0x1b6)](_0x3f4671,_0x380993,_0x15f521);console['log'](_0x57aad1);const _0x49825f=_0x3f4671[_0x2ddcb5(0x334)]&&_0x380993[_0x2ddcb5(0x33d)](_0x574384=>_0x574384[_0x2ddcb5(0x325)]!==_0x2ddcb5(0x2bf)&&_0x574384[_0x2ddcb5(0x325)]!=='planned');if(_0x49825f){console[_0x2ddcb5(0x23e)](a46_0x283a50[_0x2ddcb5(0x262)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x2ddcb5(0x23e)](a46_0x283a50['dim'](_0x2ddcb5(0x2e4)+_0x377ca5*0x2+_0x2ddcb5(0x31e))),await new Promise(_0x40f091=>setTimeout(_0x40f091,_0x1463c8)),_0x377ca5++;}_0x377ca5>=_0x2f86d7&&console[_0x2ddcb5(0x23e)](a46_0x283a50[_0x2ddcb5(0x1e7)](_0x2ddcb5(0x2b6)));}[a46_0x49f959(0x1b6)](_0x206d1f,_0x4816d9,_0x53123c){const _0x1c5ce6=a46_0x49f959,_0x516dc7=[],_0x5a674d=TIMELINE_CONFIG[_0x1c5ce6(0x312)],_0x43be02=0x5,_0x574249=process[_0x1c5ce6(0x265)][_0x1c5ce6(0x1c5)]||0x78,_0x4a06a4=_0x574249-_0x5a674d-_0x43be02,_0xf254ec=Math[_0x1c5ce6(0x22a)](TIMELINE_CONFIG[_0x1c5ce6(0x310)],Math[_0x1c5ce6(0x2b3)](_0x4a06a4,TIMELINE_CONFIG[_0x1c5ce6(0x25b)])),_0x49a546=new Date(_0x206d1f[_0x1c5ce6(0x21a)])[_0x1c5ce6(0x2f6)](),_0x9db73d=_0x206d1f[_0x1c5ce6(0x291)]?new Date(_0x206d1f[_0x1c5ce6(0x291)])[_0x1c5ce6(0x2f6)]():Date[_0x1c5ce6(0x1d0)](),_0x45231f={'start':_0x49a546,'end':_0x9db73d,'duration':_0x9db73d-_0x49a546},_0x31168c=new Map(),_0x3c772d=[];for(const _0x1d431a of _0x4816d9){if(_0x1d431a[_0x1c5ce6(0x1c1)]){const _0x4b948d=new Date(_0x1d431a[_0x1c5ce6(0x1c1)])['getTime'](),_0x522346=_0x1d431a[_0x1c5ce6(0x241)]?new Date(_0x1d431a['updatedAt'])[_0x1c5ce6(0x2f6)]():Date['now'](),_0x2da9de={'start':_0x4b948d,'end':_0x522346,'duration':_0x522346-_0x4b948d};_0x31168c[_0x1c5ce6(0x201)](_0x1d431a['id'],_0x2da9de),_0x3c772d[_0x1c5ce6(0x26f)]({'name':_0x1d431a[_0x1c5ce6(0x218)],'state':_0x1d431a['state']||'unknown','window':_0x2da9de});}else _0x3c772d[_0x1c5ce6(0x26f)]({'name':_0x1d431a[_0x1c5ce6(0x218)],'state':_0x1d431a[_0x1c5ce6(0x325)]||_0x1c5ce6(0x319),'window':undefined});}_0x3c772d[_0x1c5ce6(0x30a)]((_0x51883c,_0x436593)=>{const _0x2ca969=_0x1c5ce6;if(!_0x51883c[_0x2ca969(0x2d5)])return 0x1;if(!_0x436593[_0x2ca969(0x2d5)])return-0x1;return _0x51883c[_0x2ca969(0x2d5)][_0x2ca969(0x1f7)]-_0x436593[_0x2ca969(0x2d5)][_0x2ca969(0x1f7)];});const _0x430fef=_0x3c772d[_0x1c5ce6(0x1ec)],_0x24530b=_0x430fef>TIMELINE_CONFIG[_0x1c5ce6(0x298)];_0x24530b&&_0x3c772d[_0x1c5ce6(0x2f7)](TIMELINE_CONFIG[_0x1c5ce6(0x298)]);const _0x3cfebe=calculateTimeScale(_0x45231f,_0xf254ec),_0x43e757=_0x206d1f['done']?_0x206d1f[_0x1c5ce6(0x331)]?a46_0x283a50[_0x1c5ce6(0x262)](_0x1c5ce6(0x331)):a46_0x283a50[_0x1c5ce6(0x296)](_0x1c5ce6(0x23e)):a46_0x283a50[_0x1c5ce6(0x1bf)](_0x1c5ce6(0x2bf)),_0x440b34=_0x206d1f['project']?.['id'],_0x41a928=_0x206d1f[_0x1c5ce6(0x225)];let _0x66e582;if(_0x440b34&&_0x41a928){const _0x567e2a=getWorkflowAttemptUrl(_0x53123c,_0x440b34,_0x41a928,_0x206d1f['id']);_0x66e582=hyperlink(a46_0x283a50[_0x1c5ce6(0x2fe)](_0x206d1f['id']),_0x567e2a);}else _0x66e582=a46_0x283a50['dim'](_0x206d1f['id']);_0x516dc7[_0x1c5ce6(0x26f)](_0x1c5ce6(0x26d)+_0x66e582+_0x1c5ce6(0x32c)+_0x43e757+_0x1c5ce6(0x32c)+formatElapsed(_0x45231f[_0x1c5ce6(0x255)]));if(_0x3c772d['length']>0x0){const _0x4f0750=renderTimeAxis(_0x3cfebe,_0xf254ec),_0x370686=new Date(_0x45231f[_0x1c5ce6(0x1f7)]),_0x1f8e2a=formatDate(_0x370686),_0x18dcf9=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x1c5ce6(0x260)]+_0x5a674d,_0x105592=_0x1f8e2a['padStart'](_0x18dcf9),_0x5e4f87=a46_0x283a50[_0x1c5ce6(0x2fe)](_0x105592);_0x516dc7[_0x1c5ce6(0x26f)](_0x5e4f87+'\x20'+_0x4f0750);for(const _0x555f2d of _0x3c772d){_0x516dc7[_0x1c5ce6(0x26f)](renderTaskRow(_0x555f2d,_0x3cfebe,_0xf254ec,_0x5a674d));}const _0x354cf6=calculateStats(_0x3c772d);_0x516dc7['push'](formatStats(_0x354cf6)),_0x24530b&&_0x516dc7[_0x1c5ce6(0x26f)](a46_0x283a50[_0x1c5ce6(0x1e7)](_0x1c5ce6(0x1af)+TIMELINE_CONFIG[_0x1c5ce6(0x298)]+_0x1c5ce6(0x1d5)+_0x430fef+'\x20tasks')),_0x516dc7[_0x1c5ce6(0x26f)](''),_0x516dc7[_0x1c5ce6(0x26f)](a46_0x283a50[_0x1c5ce6(0x2fe)](_0x1c5ce6(0x1be))+(_0x1c5ce6(0x1b0)+_0x206d1f['id']+_0x1c5ce6(0x2ca))+a46_0x283a50[_0x1c5ce6(0x2fe)](_0x1c5ce6(0x256)));}else _0x516dc7[_0x1c5ce6(0x26f)](_0x1c5ce6(0x221));return _0x516dc7[_0x1c5ce6(0x2bb)]('\x0a');}[a46_0x49f959(0x2bd)](_0x45f5db,_0x1e81d0){const _0x51831c=a46_0x49f959,_0x39e568=new Date(_0x45f5db[_0x51831c(0x21a)])[_0x51831c(0x2f6)](),_0x148597=_0x45f5db[_0x51831c(0x291)]?new Date(_0x45f5db[_0x51831c(0x291)])[_0x51831c(0x2f6)]():Date[_0x51831c(0x1d0)](),_0x33d174=_0x148597-_0x39e568,_0x5900ac=[];for(const _0x146fb8 of _0x1e81d0){if(_0x146fb8[_0x51831c(0x1c1)]){const _0x1b123b=new Date(_0x146fb8['startedAt'])['getTime'](),_0x22da1c=_0x146fb8[_0x51831c(0x241)]?new Date(_0x146fb8[_0x51831c(0x241)])[_0x51831c(0x2f6)]():Date[_0x51831c(0x1d0)]();_0x5900ac[_0x51831c(0x26f)]({'name':_0x146fb8['fullName'],'state':_0x146fb8[_0x51831c(0x325)]||_0x51831c(0x239),'window':{'start':_0x1b123b,'end':_0x22da1c,'duration':_0x22da1c-_0x1b123b}});}else _0x5900ac[_0x51831c(0x26f)]({'name':_0x146fb8[_0x51831c(0x218)],'state':_0x146fb8[_0x51831c(0x325)]||_0x51831c(0x319),'window':undefined});}const _0x16f88c=calculateStats(_0x5900ac);return{'attempt':{'id':_0x45f5db['id'],'status':_0x45f5db['done']?_0x45f5db[_0x51831c(0x331)]?_0x51831c(0x331):_0x51831c(0x23e):_0x51831c(0x2bf),'createdAt':_0x45f5db['createdAt'],'finishedAt':_0x45f5db[_0x51831c(0x291)],'duration_ms':_0x33d174},'tasks':_0x5900ac['map'](_0x401fa4=>({'name':_0x401fa4['name'],'state':_0x401fa4[_0x51831c(0x325)],'startedAt':_0x401fa4['window']?new Date(_0x401fa4[_0x51831c(0x2d5)][_0x51831c(0x1f7)])[_0x51831c(0x274)]():null,'updatedAt':_0x401fa4[_0x51831c(0x2d5)]?new Date(_0x401fa4[_0x51831c(0x2d5)][_0x51831c(0x21c)])[_0x51831c(0x274)]():null,'duration_ms':_0x401fa4['window']?.[_0x51831c(0x255)]||null})),'stats':_0x16f88c};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2365cd,_0x3a0a26){const _0x10cded=a47_0x292a,_0x5d3893=_0x2365cd();while(!![]){try{const _0x4c91c8=parseInt(_0x10cded(0xd2))/0x1+parseInt(_0x10cded(0xc9))/0x2+parseInt(_0x10cded(0xd1))/0x3*(parseInt(_0x10cded(0xd9))/0x4)+-parseInt(_0x10cded(0xd8))/0x5*(parseInt(_0x10cded(0xcc))/0x6)+-parseInt(_0x10cded(0xcb))/0x7*(-parseInt(_0x10cded(0xce))/0x8)+parseInt(_0x10cded(0xd6))/0x9+-parseInt(_0x10cded(0xd0))/0xa*(parseInt(_0x10cded(0xc8))/0xb);if(_0x4c91c8===_0x3a0a26)break;else _0x5d3893['push'](_0x5d3893['shift']());}catch(_0x360211){_0x5d3893['push'](_0x5d3893['shift']());}}}(a47_0x50af,0x45340));import{platform}from'os';function a47_0x292a(_0x1adcac,_0x439da2){_0x1adcac=_0x1adcac-0xc8;const _0x50af43=a47_0x50af();let _0x292a1b=_0x50af43[_0x1adcac];return _0x292a1b;}import{getAPIKey}from'./config.js';function a47_0x50af(){const _0x2643e6=['784778PbZAIX','Authorization','7OzfSDD','1484634rhwWAT','tdx','1990088uicyUv','TD1\x20','5710260hSsazK','12306BgKtBu','141014TcmLRM','replace','version','entries','2003652mXwcgL','tdx/','10SrSNzx','336MITHYQ','length','11ZIOjEX'];a47_0x50af=function(){return _0x2643e6;};return a47_0x50af();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x13d97c=a47_0x292a,_0x109503=getVersion(),_0x254cf4=platform(),_0x4f1c71=process[_0x13d97c(0xd4)][_0x13d97c(0xd3)]('v','');return _0x13d97c(0xd7)+_0x109503+'\x20('+_0x254cf4+';\x20node/'+_0x4f1c71+')';}export function getAuthHeaders(_0x4542f4,_0x5a824e){const _0x102fef=a47_0x292a,_0x18bac0=getVersion(),_0x14dfc1={'User-Agent':getUserAgent(),'X-TD-Client':_0x102fef(0xcd),'X-TD-Client-Version':_0x18bac0};return _0x5a824e&&(_0x14dfc1[_0x102fef(0xca)]=_0x102fef(0xcf)+_0x5a824e),_0x14dfc1;}export function toHeaderRecord(_0x50bebf){const _0x278091=a47_0x292a,_0x22e19f={};for(const [_0x539aff,_0x33cf00]of Object[_0x278091(0xd5)](_0x50bebf)){_0x33cf00!==undefined&&(_0x22e19f[_0x539aff]=_0x33cf00);}return _0x22e19f;}export function getTrinoHeaders(_0x42017e,_0x3a5bd5){const _0x2278c2=getAuthHeaders(_0x42017e,_0x3a5bd5),_0x1dbc57=toHeaderRecord(_0x2278c2);return delete _0x1dbc57['Authorization'],_0x3a5bd5&&(_0x1dbc57['X-Trino-User']=_0x3a5bd5),_0x1dbc57;}export function hasAPIKey(_0x21b467){const _0x12db4c=a47_0x292a,_0x1208ef=getAPIKey();return _0x1208ef!==undefined&&_0x1208ef[_0x12db4c(0xda)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5d9691,_0x3dfbb6){const _0x50a2f0=a48_0x3619,_0x473bb1=_0x5d9691();while(!![]){try{const _0x3b0b04=-parseInt(_0x50a2f0(0x1fa))/0x1*(parseInt(_0x50a2f0(0x217))/0x2)+parseInt(_0x50a2f0(0x203))/0x3+parseInt(_0x50a2f0(0x1f9))/0x4+-parseInt(_0x50a2f0(0x1ff))/0x5+-parseInt(_0x50a2f0(0x1f7))/0x6*(parseInt(_0x50a2f0(0x1e7))/0x7)+-parseInt(_0x50a2f0(0x1f0))/0x8+-parseInt(_0x50a2f0(0x228))/0x9*(-parseInt(_0x50a2f0(0x225))/0xa);if(_0x3b0b04===_0x3dfbb6)break;else _0x473bb1['push'](_0x473bb1['shift']());}catch(_0x4bafe8){_0x473bb1['push'](_0x473bb1['shift']());}}}(a48_0x545c,0x80060));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a48_0x3619(_0x449206,_0x40f1fb){_0x449206=_0x449206-0x1e6;const _0x545c5a=a48_0x545c();let _0x361995=_0x545c5a[_0x449206];return _0x361995;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a48_0x530eb2 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1cc330){const _0x3faccc=a48_0x3619;return _0x1cc330[_0x3faccc(0x206)]===_0x3faccc(0x20f)||_0x1cc330[_0x3faccc(0x206)]==='jsonl'||_0x1cc330['format']===_0x3faccc(0x210)||_0x1cc330[_0x3faccc(0x206)]===_0x3faccc(0x209)||_0x1cc330['json']===!![]||_0x1cc330[_0x3faccc(0x21f)]===!![]||_0x1cc330['tsv']===!![]||_0x1cc330[_0x3faccc(0x209)]===!![];}export function parseOutputOptions(_0x47df49){const _0x13d141=a48_0x3619;return{'format':_0x47df49['format']||_0x13d141(0x209),'output':_0x47df49[_0x13d141(0x21d)]||'','limit':_0x47df49[_0x13d141(0x226)],'color':_0x47df49[_0x13d141(0x208)],'noColor':_0x47df49['noColor']};}function convertSDKResultToQueryResult(_0x421979){const _0x158bae=a48_0x3619,_0x26b754=[];if(_0x421979[_0x158bae(0x229)]>0x0){const _0x44d395=_0x421979[0x0];for(const [_0x6b0cdd,_0x128136]of Object[_0x158bae(0x205)](_0x44d395)){let _0x41a8bb='varchar';if(typeof _0x128136===_0x158bae(0x1fc))_0x41a8bb=Number['isInteger'](_0x128136)?'bigint':_0x158bae(0x20d);else{if(typeof _0x128136===_0x158bae(0x218))_0x41a8bb='boolean';else _0x128136===null&&(_0x41a8bb=_0x158bae(0x20b));}_0x26b754['push']({'name':_0x6b0cdd,'type':_0x41a8bb});}}return{'queryId':_0x158bae(0x219),'columns':_0x26b754,'data':_0x421979,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x421979['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x411f6c,_0x3cf290){const _0x13545a=convertSDKResultToQueryResult(_0x411f6c);return formatQueryOutput(_0x13545a,_0x3cf290);}export async function formatQueryOutput(_0x1bb8ba,_0xc0e5a2){const _0x256b52=a48_0x3619,{format:_0x33eec8,limit:_0x53c65c,output:_0x80c100,color:_0x3e4506,noColor:_0x3e81cf}=_0xc0e5a2,_0x16d5d6=Boolean(_0x80c100)&&!_0x3e4506,_0x12d80f={'color':_0x3e4506,'noColor':_0x3e81cf||_0x16d5d6};if(_0x33eec8==='table'){const _0x297c3f=shouldUseLess(_0x33eec8,_0x80c100);return formatAsTable(_0x1bb8ba,_0x53c65c,_0x297c3f,_0x12d80f);}else{if(_0x33eec8===_0x256b52(0x20f))return formatAsJSON(_0x1bb8ba,_0x12d80f);else return _0x33eec8===_0x256b52(0x21f)?formatAsJSONL(_0x1bb8ba,_0x12d80f):formatQueryResult(_0x1bb8ba,_0x33eec8);}}function shouldUseLess(_0x38ef59,_0xd24ad2){const _0x161b05=a48_0x3619;return(_0x38ef59===_0x161b05(0x209)||_0x38ef59===_0x161b05(0x224))&&process[_0x161b05(0x202)][_0x161b05(0x222)]&&!_0xd24ad2;}export function resolveOutputOptions(_0x159a60){const _0x2264f4=a48_0x3619,_0x138ac1=resolveOutputFormat(_0x159a60['format'],_0x159a60[_0x2264f4(0x21d)],_0x2264f4(0x209));let _0x5da469=typeof _0x159a60[_0x2264f4(0x226)]==='number'?_0x159a60[_0x2264f4(0x226)]:parseInt(_0x159a60[_0x2264f4(0x226)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x3157f2=_0x159a60[_0x2264f4(0x21d)]||'';return shouldUseLess(_0x138ac1,_0x3157f2)&&(_0x5da469=Infinity),{'format':_0x138ac1,'output':_0x3157f2,'limit':_0x5da469,'color':_0x159a60[_0x2264f4(0x208)],'noColor':_0x159a60[_0x2264f4(0x1ed)]};}function a48_0x545c(){const _0x716c5b=['push','isTTY','cmdout','list','3277190PoZnjD','limit','debug','36HAIvgs','length','rule','less','273xQrvgD','log','yellow','padEnd','stdin','keys','noColor','[Object]','bold','4650024zkEDTd','Results\x20saved\x20to\x20','filter','blue','end','stringify','spawn','63102jkKydx','[params]','1611640ULPigk','427678ktQvaX','No\x20data','number','pipe','─┴─','921015hSZmMG','join','[error]','stdout','1241685FKWGpc','trim','entries','format','split','color','table','inherit','varchar','max','double','red','json','tsv','resolve','object','stderr','close','forEach','repeat','2eTONTW','boolean','sdk-result','error','[query]','write','output','magenta','jsonl','map'];a48_0x545c=function(){return _0x716c5b;};return a48_0x545c();}export function writeOutput(_0x3dd3a4,_0x555d42,_0x44b73a){const _0xfa75d6=a48_0x3619;return _0x555d42?(writeFileSync(_0x555d42,_0x3dd3a4),console['error'](_0xfa75d6(0x1f1)+_0x555d42),Promise[_0xfa75d6(0x211)]()):shouldUseLess(_0x44b73a||'','')?new Promise(_0x384393=>{const _0x3920c2=_0xfa75d6,_0x3ee8f4=spawn(_0x3920c2(0x1e6),['-FXRSn'],{'stdio':[_0x3920c2(0x1fd),_0x3920c2(0x20a),'inherit']});let _0x1fc492=![];_0x3ee8f4['on']('error',()=>{!_0x1fc492&&(_0x1fc492=!![],console['log'](_0x3dd3a4),_0x384393());}),_0x3ee8f4['on'](_0x3920c2(0x214),()=>{!_0x1fc492&&(_0x1fc492=!![],_0x384393());}),_0x3ee8f4['on'](_0x3920c2(0x1f6),()=>{const _0x5ebb5b=_0x3920c2;!_0x1fc492&&_0x3ee8f4[_0x5ebb5b(0x1eb)]&&(_0x3ee8f4['stdin']['on'](_0x5ebb5b(0x21a),()=>{}),_0x3ee8f4[_0x5ebb5b(0x1eb)][_0x5ebb5b(0x21c)](_0x3dd3a4),_0x3ee8f4[_0x5ebb5b(0x1eb)][_0x5ebb5b(0x1f4)]());}),!_0x3ee8f4['stdin']&&(!_0x1fc492&&(_0x1fc492=!![],console[_0x3920c2(0x1e8)](_0x3dd3a4),_0x384393()));}):(console[_0xfa75d6(0x1e8)](_0x3dd3a4),Promise[_0xfa75d6(0x211)]());}export async function handleSDKOutput(_0x22f0ac,_0x5df2c2){const _0x3b8cd6=a48_0x3619,_0x3dc570=resolveOutputOptions(_0x5df2c2),_0x565aa4=await formatSDKOutput(_0x22f0ac,_0x3dc570);await writeOutput(_0x565aa4,_0x3dc570[_0x3b8cd6(0x21d)]||undefined,_0x3dc570['format']);}export async function handleQueryOutput(_0x479b95,_0x3cbc59){const _0x21c32f=a48_0x3619,_0x19cf32=resolveOutputOptions(_0x3cbc59),_0x133b55=await formatQueryOutput(_0x479b95,_0x19cf32);await writeOutput(_0x133b55,_0x19cf32[_0x21c32f(0x21d)]||undefined,_0x19cf32[_0x21c32f(0x206)]);}async function formatSingleObject(_0xeaad34,_0x56b197){const _0x4b26e1=a48_0x3619,{format:_0x5eefd9,color:_0x1b077e,noColor:_0x5eead2}=_0x56b197,_0x1b7766={'color':_0x1b077e,'noColor':_0x5eead2};if(_0x5eefd9===_0x4b26e1(0x20f)){if(shouldUseColor(_0x1b7766))return colorizeJSON(_0xeaad34,_0x1b7766);return JSON['stringify'](_0xeaad34,null,0x2);}else{if(_0x5eefd9===_0x4b26e1(0x21f)){if(shouldUseColor(_0x1b7766))return colorizeJSONCompact(_0xeaad34,_0x1b7766);return JSON[_0x4b26e1(0x1f5)](_0xeaad34);}else{if(_0x5eefd9===_0x4b26e1(0x210))return Object[_0x4b26e1(0x205)](_0xeaad34)[_0x4b26e1(0x220)](([_0x35bd30,_0x49aa2e])=>_0x35bd30+'\x09'+_0x49aa2e)[_0x4b26e1(0x200)]('\x0a');else{const _0x44eb46=Object[_0x4b26e1(0x205)](_0xeaad34);if(_0x44eb46[_0x4b26e1(0x229)]===0x0)return _0x4b26e1(0x1fb);const _0x310f87=_0xeaad34['debug'],_0x38dc67=_0xeaad34['query'],_0x12f103=_0xeaad34['params'],_0x385709=_0xeaad34['rule'],_0x51b6e8=_0x38dc67?typeof _0x38dc67==='string'?_0x38dc67:JSON[_0x4b26e1(0x1f5)](_0x38dc67,null,0x2):undefined,_0x405aee=_0x12f103&&Object[_0x4b26e1(0x1ec)](_0x12f103)[_0x4b26e1(0x229)]>0x0?JSON[_0x4b26e1(0x1f5)](_0x12f103,null,0x2):undefined,_0xc45e33=_0x385709&&Object[_0x4b26e1(0x1ec)](_0x385709)['length']>0x0?JSON[_0x4b26e1(0x1f5)](_0x385709,null,0x2):undefined,_0x2ef7ab=_0x44eb46[_0x4b26e1(0x1f2)](([_0xb00059])=>_0xb00059!==_0x4b26e1(0x227)&&_0xb00059!=='query'&&_0xb00059!=='params'&&_0xb00059!==_0x4b26e1(0x22a)),_0x11b557=Math[_0x4b26e1(0x20c)](..._0x2ef7ab['map'](([_0x5ed54b])=>_0x5ed54b[_0x4b26e1(0x229)])),_0x2fb5c1=Math['max'](..._0x2ef7ab[_0x4b26e1(0x220)](([,_0x4a2329])=>{const _0x17cfe1=_0x4b26e1;try{const _0x13e058=_0x4a2329===null||_0x4a2329===undefined?'':typeof _0x4a2329==='object'?JSON[_0x17cfe1(0x1f5)](_0x4a2329):String(_0x4a2329),_0x43144a=_0x13e058[_0x17cfe1(0x207)]('\x0a');return Math[_0x17cfe1(0x20c)](..._0x43144a[_0x17cfe1(0x220)](_0x74501c=>_0x74501c[_0x17cfe1(0x229)]),0x0);}catch{return 0x0;}}),0x14),_0xdc505c=[];_0xdc505c['push'](colorBorder('┌─'+'─'[_0x4b26e1(0x216)](_0x11b557)+'─┬─'+'─'[_0x4b26e1(0x216)](_0x2fb5c1)+'─┐',_0x1b7766)),_0x2ef7ab[_0x4b26e1(0x215)](([_0x8e29ce,_0x6371e4])=>{const _0x311ab0=_0x4b26e1;let _0x67b9c6;try{_0x67b9c6=_0x6371e4===null||_0x6371e4===undefined?'':typeof _0x6371e4===_0x311ab0(0x212)?JSON[_0x311ab0(0x1f5)](_0x6371e4):String(_0x6371e4);}catch{_0x67b9c6=_0x311ab0(0x1ee);}const _0x1bdf23=_0x8e29ce[_0x311ab0(0x1ea)](_0x11b557),_0x5b704f=_0x67b9c6['split']('\x0a');_0x5b704f[_0x311ab0(0x215)]((_0xc71323,_0x5e33c1)=>{const _0x3a597f=_0x311ab0,_0x72cffc=colorBorder('│',_0x1b7766);_0x5e33c1===0x0?_0xdc505c[_0x3a597f(0x221)](_0x72cffc+'\x20'+_0x1bdf23+'\x20'+_0x72cffc+'\x20'+_0xc71323[_0x3a597f(0x1ea)](_0x2fb5c1)+'\x20'+_0x72cffc):_0xdc505c['push'](_0x72cffc+'\x20'+'\x20'[_0x3a597f(0x216)](_0x11b557)+'\x20'+_0x72cffc+'\x20'+_0xc71323[_0x3a597f(0x1ea)](_0x2fb5c1)+'\x20'+_0x72cffc);});}),_0xdc505c[_0x4b26e1(0x221)](colorBorder('└─'+'─'[_0x4b26e1(0x216)](_0x11b557)+_0x4b26e1(0x1fe)+'─'[_0x4b26e1(0x216)](_0x2fb5c1)+'─┘',_0x1b7766));_0x51b6e8&&(_0xdc505c['push'](''),_0xdc505c['push'](String(a48_0x530eb2[_0x4b26e1(0x1e9)][_0x4b26e1(0x1ef)](_0x4b26e1(0x21b)))),_0xdc505c[_0x4b26e1(0x221)](_0x51b6e8));_0x405aee&&(_0xdc505c[_0x4b26e1(0x221)](''),_0xdc505c[_0x4b26e1(0x221)](String(a48_0x530eb2[_0x4b26e1(0x1f3)][_0x4b26e1(0x1ef)](_0x4b26e1(0x1f8)))),_0xdc505c[_0x4b26e1(0x221)](_0x405aee));_0xc45e33&&(_0xdc505c[_0x4b26e1(0x221)](''),_0xdc505c[_0x4b26e1(0x221)](String(a48_0x530eb2[_0x4b26e1(0x21e)]['bold']('[rule]'))),_0xdc505c[_0x4b26e1(0x221)](_0xc45e33));if(_0x310f87){if(_0x310f87['stderr']){_0xdc505c['push'](''),_0xdc505c[_0x4b26e1(0x221)](String(a48_0x530eb2[_0x4b26e1(0x20e)][_0x4b26e1(0x1ef)](_0x4b26e1(0x201))));const _0x2f9768=_0x310f87[_0x4b26e1(0x213)][_0x4b26e1(0x207)]('\x0a');_0x2f9768['forEach'](_0x1d0c78=>{const _0x470a3a=_0x4b26e1;_0x1d0c78[_0x470a3a(0x204)]()&&_0xdc505c[_0x470a3a(0x221)](_0x1d0c78);});}if(_0x310f87[_0x4b26e1(0x223)]){_0xdc505c['push'](''),_0xdc505c['push'](String(a48_0x530eb2['cyan']['bold']('[logs]')));const _0x3a96e2=_0x310f87[_0x4b26e1(0x223)][_0x4b26e1(0x207)]('\x0a');_0x3a96e2[_0x4b26e1(0x215)](_0x70239b=>{const _0x429099=_0x4b26e1;_0x70239b[_0x429099(0x204)]()&&_0xdc505c['push'](_0x70239b);});}}return _0xdc505c[_0x4b26e1(0x200)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x1dc3a7,_0x3f3b9e){const _0xb40dc2=a48_0x3619;if(_0x3f3b9e['format']==='table'){await handleSDKOutput([_0x1dc3a7],_0x3f3b9e);return;}const _0xe5b0a7=resolveOutputOptions(_0x3f3b9e),_0x5a7eb1=await formatSingleObject(_0x1dc3a7,_0xe5b0a7);await writeOutput(_0x5a7eb1,_0xe5b0a7[_0xb40dc2(0x21d)]||undefined,_0xe5b0a7[_0xb40dc2(0x206)]);}
|
|
1
|
+
(function(_0x2c3550,_0x15458d){const _0x19d04d=a48_0x2fc8,_0x2485cc=_0x2c3550();while(!![]){try{const _0x352dee=-parseInt(_0x19d04d(0x1b2))/0x1+-parseInt(_0x19d04d(0x198))/0x2*(-parseInt(_0x19d04d(0x18a))/0x3)+-parseInt(_0x19d04d(0x17b))/0x4+parseInt(_0x19d04d(0x1a6))/0x5*(-parseInt(_0x19d04d(0x176))/0x6)+parseInt(_0x19d04d(0x17a))/0x7*(parseInt(_0x19d04d(0x197))/0x8)+-parseInt(_0x19d04d(0x1b8))/0x9+parseInt(_0x19d04d(0x1b0))/0xa;if(_0x352dee===_0x15458d)break;else _0x2485cc['push'](_0x2485cc['shift']());}catch(_0x3c1db2){_0x2485cc['push'](_0x2485cc['shift']());}}}(a48_0x3020,0x6e696));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';function a48_0x3020(){const _0x177905=['15754070ZNRnZY','─┴─','825225FgOwRf','[params]','list','debug','-FXRSn','FINISHED','5178834mArxAW','jsonl','entries','6xhfauV','log','repeat','close','489391SdLukH','1405628SBqoGo','rule','boolean','push','params','object','number','varchar','bold','json','isInteger','string','forEach','table','double','1946289vJPIzx','keys','No\x20data','stringify','yellow','length','cmdout','output','color','noColor','format','[logs]','[Object]','88RgVnls','2DrSgqe','tsv','red','pipe','spawn','stdin','bigint','trim','filter','stdout','map','Results\x20saved\x20to\x20','query','split','3944545ysdruU','padEnd','end','max','resolve','error','stderr','inherit','limit','isTTY'];a48_0x3020=function(){return _0x177905;};return a48_0x3020();}function a48_0x2fc8(_0x59c7cf,_0x7aab86){_0x59c7cf=_0x59c7cf-0x176;const _0x3020b8=a48_0x3020();let _0x2fc85b=_0x3020b8[_0x59c7cf];return _0x2fc85b;}import a48_0x26e45b from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x560e88){const _0x455610=a48_0x2fc8;return _0x560e88[_0x455610(0x194)]===_0x455610(0x184)||_0x560e88[_0x455610(0x194)]==='jsonl'||_0x560e88[_0x455610(0x194)]===_0x455610(0x199)||_0x560e88['format']===_0x455610(0x188)||_0x560e88['json']===!![]||_0x560e88[_0x455610(0x1b9)]===!![]||_0x560e88[_0x455610(0x199)]===!![]||_0x560e88['table']===!![];}export function parseOutputOptions(_0x599a10){const _0x257e0d=a48_0x2fc8;return{'format':_0x599a10[_0x257e0d(0x194)]||'table','output':_0x599a10[_0x257e0d(0x191)]||'','limit':_0x599a10[_0x257e0d(0x1ae)],'color':_0x599a10[_0x257e0d(0x192)],'noColor':_0x599a10[_0x257e0d(0x193)]};}function convertSDKResultToQueryResult(_0x55189e){const _0x258b8e=a48_0x2fc8,_0xc9668e=[];if(_0x55189e[_0x258b8e(0x18f)]>0x0){const _0x55cf3e=_0x55189e[0x0];for(const [_0xfaf3a8,_0xc0fbf5]of Object[_0x258b8e(0x1ba)](_0x55cf3e)){let _0x30a763=_0x258b8e(0x182);if(typeof _0xc0fbf5==='number')_0x30a763=Number[_0x258b8e(0x185)](_0xc0fbf5)?_0x258b8e(0x19e):_0x258b8e(0x189);else{if(typeof _0xc0fbf5===_0x258b8e(0x17d))_0x30a763='boolean';else _0xc0fbf5===null&&(_0x30a763='varchar');}_0xc9668e[_0x258b8e(0x17e)]({'name':_0xfaf3a8,'type':_0x30a763});}}return{'queryId':'sdk-result','columns':_0xc9668e,'data':_0x55189e,'stats':{'state':_0x258b8e(0x1b7),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x55189e[_0x258b8e(0x18f)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x184fcc,_0x2c7f2e){const _0x253177=convertSDKResultToQueryResult(_0x184fcc);return formatQueryOutput(_0x253177,_0x2c7f2e);}export async function formatQueryOutput(_0x1e4e8f,_0x546963){const _0x1ad905=a48_0x2fc8,{format:_0x562a71,limit:_0x416975,output:_0x21786d,color:_0xd0292f,noColor:_0x78b64a}=_0x546963,_0x5036fa=Boolean(_0x21786d)&&!_0xd0292f,_0x1fcc0b={'color':_0xd0292f,'noColor':_0x78b64a||_0x5036fa};if(_0x562a71===_0x1ad905(0x188)){const _0x204bd4=shouldUseLess(_0x562a71,_0x21786d);return formatAsTable(_0x1e4e8f,_0x416975,_0x204bd4,_0x1fcc0b);}else{if(_0x562a71===_0x1ad905(0x184))return formatAsJSON(_0x1e4e8f,_0x1fcc0b);else return _0x562a71===_0x1ad905(0x1b9)?formatAsJSONL(_0x1e4e8f,_0x1fcc0b):formatQueryResult(_0x1e4e8f,_0x562a71);}}function shouldUseLess(_0x110ac6,_0x5943c7){const _0x4c8e51=a48_0x2fc8;return(_0x110ac6===_0x4c8e51(0x188)||_0x110ac6===_0x4c8e51(0x1b4))&&process[_0x4c8e51(0x1a1)][_0x4c8e51(0x1af)]&&!_0x5943c7;}export function resolveOutputOptions(_0x3d1ff9){const _0x2fc431=a48_0x2fc8,_0x380850=resolveOutputFormat(_0x3d1ff9[_0x2fc431(0x194)],_0x3d1ff9['output'],_0x2fc431(0x188));let _0x221307=typeof _0x3d1ff9['limit']===_0x2fc431(0x181)?_0x3d1ff9[_0x2fc431(0x1ae)]:parseInt(_0x3d1ff9[_0x2fc431(0x1ae)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x36f9d3=_0x3d1ff9[_0x2fc431(0x191)]||'';return shouldUseLess(_0x380850,_0x36f9d3)&&(_0x221307=Infinity),{'format':_0x380850,'output':_0x36f9d3,'limit':_0x221307,'color':_0x3d1ff9[_0x2fc431(0x192)],'noColor':_0x3d1ff9[_0x2fc431(0x193)]};}export function writeOutput(_0x252eff,_0x1523a1,_0x5e87c3){const _0xe97b33=a48_0x2fc8;return _0x1523a1?(writeFileSync(_0x1523a1,_0x252eff),console[_0xe97b33(0x1ab)](_0xe97b33(0x1a3)+_0x1523a1),Promise[_0xe97b33(0x1aa)]()):shouldUseLess(_0x5e87c3||'','')?new Promise(_0x4cbf8d=>{const _0x355a77=_0xe97b33,_0x4d1701=spawn('less',[_0x355a77(0x1b6)],{'stdio':[_0x355a77(0x19b),_0x355a77(0x1ad),_0x355a77(0x1ad)]});let _0x59890b=![];_0x4d1701['on'](_0x355a77(0x1ab),()=>{const _0x4ab3c0=_0x355a77;!_0x59890b&&(_0x59890b=!![],console[_0x4ab3c0(0x177)](_0x252eff),_0x4cbf8d());}),_0x4d1701['on'](_0x355a77(0x179),()=>{!_0x59890b&&(_0x59890b=!![],_0x4cbf8d());}),_0x4d1701['on'](_0x355a77(0x19c),()=>{const _0x414577=_0x355a77;!_0x59890b&&_0x4d1701[_0x414577(0x19d)]&&(_0x4d1701[_0x414577(0x19d)]['on']('error',()=>{}),_0x4d1701[_0x414577(0x19d)]['write'](_0x252eff),_0x4d1701[_0x414577(0x19d)][_0x414577(0x1a8)]());}),!_0x4d1701[_0x355a77(0x19d)]&&(!_0x59890b&&(_0x59890b=!![],console['log'](_0x252eff),_0x4cbf8d()));}):(console[_0xe97b33(0x177)](_0x252eff),Promise[_0xe97b33(0x1aa)]());}export async function handleSDKOutput(_0xaf8d7b,_0x19b621){const _0xd16fc7=a48_0x2fc8,_0x5c2d6f=resolveOutputOptions(_0x19b621),_0x20a581=await formatSDKOutput(_0xaf8d7b,_0x5c2d6f);await writeOutput(_0x20a581,_0x5c2d6f['output']||undefined,_0x5c2d6f[_0xd16fc7(0x194)]);}export async function handleQueryOutput(_0x432a3a,_0x54d1ff){const _0x45c242=a48_0x2fc8,_0x496c4f=resolveOutputOptions(_0x54d1ff),_0x12e745=await formatQueryOutput(_0x432a3a,_0x496c4f);await writeOutput(_0x12e745,_0x496c4f[_0x45c242(0x191)]||undefined,_0x496c4f[_0x45c242(0x194)]);}async function formatSingleObject(_0x34bbcb,_0x12da57){const _0x5e8814=a48_0x2fc8,{format:_0x71180,color:_0x55e277,noColor:_0x57886f}=_0x12da57,_0x4a46f8={'color':_0x55e277,'noColor':_0x57886f};if(_0x71180===_0x5e8814(0x184)){if(shouldUseColor(_0x4a46f8))return colorizeJSON(_0x34bbcb,_0x4a46f8);return JSON[_0x5e8814(0x18d)](_0x34bbcb,null,0x2);}else{if(_0x71180===_0x5e8814(0x1b9)){if(shouldUseColor(_0x4a46f8))return colorizeJSONCompact(_0x34bbcb,_0x4a46f8);return JSON[_0x5e8814(0x18d)](_0x34bbcb);}else{if(_0x71180===_0x5e8814(0x199))return Object[_0x5e8814(0x1ba)](_0x34bbcb)[_0x5e8814(0x1a2)](([_0x45d03e,_0x17f2a3])=>_0x45d03e+'\x09'+_0x17f2a3)['join']('\x0a');else{const _0x2459cc=Object[_0x5e8814(0x1ba)](_0x34bbcb);if(_0x2459cc[_0x5e8814(0x18f)]===0x0)return _0x5e8814(0x18c);const _0x5d53bc=_0x34bbcb[_0x5e8814(0x1b5)],_0x5c535a=_0x34bbcb[_0x5e8814(0x1a4)],_0x150813=_0x34bbcb['params'],_0x201015=_0x34bbcb[_0x5e8814(0x17c)],_0x4a8d7e=_0x5c535a?typeof _0x5c535a===_0x5e8814(0x186)?_0x5c535a:JSON[_0x5e8814(0x18d)](_0x5c535a,null,0x2):undefined,_0x5d5ccc=_0x150813&&Object[_0x5e8814(0x18b)](_0x150813)['length']>0x0?JSON[_0x5e8814(0x18d)](_0x150813,null,0x2):undefined,_0x284887=_0x201015&&Object['keys'](_0x201015)[_0x5e8814(0x18f)]>0x0?JSON[_0x5e8814(0x18d)](_0x201015,null,0x2):undefined,_0x2fb5bc=_0x2459cc[_0x5e8814(0x1a0)](([_0x299368])=>_0x299368!=='debug'&&_0x299368!=='query'&&_0x299368!==_0x5e8814(0x17f)&&_0x299368!==_0x5e8814(0x17c)),_0x55509c=Math[_0x5e8814(0x1a9)](..._0x2fb5bc[_0x5e8814(0x1a2)](([_0x4d83a8])=>_0x4d83a8[_0x5e8814(0x18f)])),_0x1bed6a=Math['max'](..._0x2fb5bc[_0x5e8814(0x1a2)](([,_0x4c0659])=>{const _0x138cf3=_0x5e8814;try{const _0x20f256=_0x4c0659===null||_0x4c0659===undefined?'':typeof _0x4c0659==='object'?JSON[_0x138cf3(0x18d)](_0x4c0659):String(_0x4c0659),_0x51004c=_0x20f256[_0x138cf3(0x1a5)]('\x0a');return Math[_0x138cf3(0x1a9)](..._0x51004c['map'](_0x4d1888=>_0x4d1888[_0x138cf3(0x18f)]),0x0);}catch{return 0x0;}}),0x14),_0x6483fb=[];_0x6483fb[_0x5e8814(0x17e)](colorBorder('┌─'+'─'['repeat'](_0x55509c)+'─┬─'+'─'[_0x5e8814(0x178)](_0x1bed6a)+'─┐',_0x4a46f8)),_0x2fb5bc[_0x5e8814(0x187)](([_0x9a4749,_0x3ec10d])=>{const _0x45a451=_0x5e8814;let _0x3f7c86;try{_0x3f7c86=_0x3ec10d===null||_0x3ec10d===undefined?'':typeof _0x3ec10d===_0x45a451(0x180)?JSON[_0x45a451(0x18d)](_0x3ec10d):String(_0x3ec10d);}catch{_0x3f7c86=_0x45a451(0x196);}const _0x886f8=_0x9a4749[_0x45a451(0x1a7)](_0x55509c),_0x302880=_0x3f7c86[_0x45a451(0x1a5)]('\x0a');_0x302880[_0x45a451(0x187)]((_0x35bccf,_0x25e3dd)=>{const _0xfc9aa7=_0x45a451,_0x1c64e3=colorBorder('│',_0x4a46f8);_0x25e3dd===0x0?_0x6483fb['push'](_0x1c64e3+'\x20'+_0x886f8+'\x20'+_0x1c64e3+'\x20'+_0x35bccf[_0xfc9aa7(0x1a7)](_0x1bed6a)+'\x20'+_0x1c64e3):_0x6483fb[_0xfc9aa7(0x17e)](_0x1c64e3+'\x20'+'\x20'[_0xfc9aa7(0x178)](_0x55509c)+'\x20'+_0x1c64e3+'\x20'+_0x35bccf['padEnd'](_0x1bed6a)+'\x20'+_0x1c64e3);});}),_0x6483fb[_0x5e8814(0x17e)](colorBorder('└─'+'─'['repeat'](_0x55509c)+_0x5e8814(0x1b1)+'─'[_0x5e8814(0x178)](_0x1bed6a)+'─┘',_0x4a46f8));_0x4a8d7e&&(_0x6483fb['push'](''),_0x6483fb[_0x5e8814(0x17e)](String(a48_0x26e45b[_0x5e8814(0x18e)][_0x5e8814(0x183)]('[query]'))),_0x6483fb[_0x5e8814(0x17e)](_0x4a8d7e));_0x5d5ccc&&(_0x6483fb['push'](''),_0x6483fb[_0x5e8814(0x17e)](String(a48_0x26e45b['blue'][_0x5e8814(0x183)](_0x5e8814(0x1b3)))),_0x6483fb[_0x5e8814(0x17e)](_0x5d5ccc));_0x284887&&(_0x6483fb[_0x5e8814(0x17e)](''),_0x6483fb[_0x5e8814(0x17e)](String(a48_0x26e45b['magenta']['bold']('[rule]'))),_0x6483fb[_0x5e8814(0x17e)](_0x284887));if(_0x5d53bc){if(_0x5d53bc[_0x5e8814(0x1ac)]){_0x6483fb[_0x5e8814(0x17e)](''),_0x6483fb[_0x5e8814(0x17e)](String(a48_0x26e45b[_0x5e8814(0x19a)][_0x5e8814(0x183)]('[error]')));const _0x538738=_0x5d53bc['stderr'][_0x5e8814(0x1a5)]('\x0a');_0x538738[_0x5e8814(0x187)](_0x49e4b8=>{const _0xde36bd=_0x5e8814;_0x49e4b8[_0xde36bd(0x19f)]()&&_0x6483fb[_0xde36bd(0x17e)](_0x49e4b8);});}if(_0x5d53bc[_0x5e8814(0x190)]){_0x6483fb[_0x5e8814(0x17e)](''),_0x6483fb[_0x5e8814(0x17e)](String(a48_0x26e45b['cyan']['bold'](_0x5e8814(0x195))));const _0x2dbd60=_0x5d53bc[_0x5e8814(0x190)]['split']('\x0a');_0x2dbd60[_0x5e8814(0x187)](_0x390413=>{const _0x30df65=_0x5e8814;_0x390413[_0x30df65(0x19f)]()&&_0x6483fb[_0x30df65(0x17e)](_0x390413);});}}return _0x6483fb['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x175f0c,_0x558a09){const _0x50b6ea=a48_0x2fc8;if(_0x558a09['format']===_0x50b6ea(0x188)){await handleSDKOutput([_0x175f0c],_0x558a09);return;}const _0x25b7ce=resolveOutputOptions(_0x558a09),_0x20fa71=await formatSingleObject(_0x175f0c,_0x25b7ce);await writeOutput(_0x20fa71,_0x25b7ce[_0x50b6ea(0x191)]||undefined,_0x25b7ce['format']);}
|