@tangle-network/sandbox 0.9.2 → 0.9.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/agent/index.js +1026 -1
- package/dist/auth/index.js +273 -1
- package/dist/client-BBZ7YLmq.js +2193 -1
- package/dist/collaboration/index.js +2 -1
- package/dist/collaboration-BxlfZ2Uh.js +201 -1
- package/dist/core.js +4 -1
- package/dist/errors-DZsfJUuc.js +262 -1
- package/dist/index.js +1180 -1
- package/dist/intelligence/index.js +225 -1
- package/dist/openai/index.js +1760 -1
- package/dist/sandbox-joKtQ5y3.js +4457 -1
- package/dist/session-gateway/index.js +667 -1
- package/dist/tangle/index.js +2 -1
- package/dist/tangle-DM0o66lW.js +831 -1
- package/package.json +3 -3
package/dist/client-BBZ7YLmq.js
CHANGED
|
@@ -1 +1,2193 @@
|
|
|
1
|
-
function a0_0x9471(_0x2ef4e0,_0xc3dd01){_0x2ef4e0=_0x2ef4e0-0x11e;const _0x882c2e=a0_0x882c();let _0x947166=_0x882c2e[_0x2ef4e0];if(a0_0x9471['\x77\x63\x4b\x45\x47\x54']===undefined){var _0xf81d1f=function(_0x1903a5){const _0x100efa='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x42300f='',_0x498e16='';for(let _0x441908=0x0,_0x308cc1,_0x360eb8,_0x1b9243=0x0;_0x360eb8=_0x1903a5['\x63\x68\x61\x72\x41\x74'](_0x1b9243++);~_0x360eb8&&(_0x308cc1=_0x441908%0x4?_0x308cc1*0x40+_0x360eb8:_0x360eb8,_0x441908++%0x4)?_0x42300f+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x308cc1>>(-0x2*_0x441908&0x6)):0x0){_0x360eb8=_0x100efa['\x69\x6e\x64\x65\x78\x4f\x66'](_0x360eb8);}for(let _0x16e270=0x0,_0x585c80=_0x42300f['\x6c\x65\x6e\x67\x74\x68'];_0x16e270<_0x585c80;_0x16e270++){_0x498e16+='\x25'+('\x30\x30'+_0x42300f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x16e270)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x498e16);};a0_0x9471['\x4b\x6c\x42\x70\x61\x57']=_0xf81d1f,a0_0x9471['\x69\x68\x45\x66\x76\x44']={},a0_0x9471['\x77\x63\x4b\x45\x47\x54']=!![];}const _0x545e75=_0x882c2e[0x0],_0x2c1cb0=_0x2ef4e0+_0x545e75,_0x3750ee=a0_0x9471['\x69\x68\x45\x66\x76\x44'][_0x2c1cb0];return!_0x3750ee?(_0x947166=a0_0x9471['\x4b\x6c\x42\x70\x61\x57'](_0x947166),a0_0x9471['\x69\x68\x45\x66\x76\x44'][_0x2c1cb0]=_0x947166):_0x947166=_0x3750ee,_0x947166;}const a0_0x314c3e=a0_0x9471;(function(_0x483611,_0x463856){const _0x272b75=a0_0x9471,_0x18189c=_0x483611();while(!![]){try{const _0x19e4d4=-parseInt(_0x272b75(0x34c))/0x1*(parseInt(_0x272b75(0x341))/0x2)+-parseInt(_0x272b75(0x1c1))/0x3+parseInt(_0x272b75(0x35d))/0x4+parseInt(_0x272b75(0x1e7))/0x5+parseInt(_0x272b75(0x357))/0x6*(-parseInt(_0x272b75(0x29d))/0x7)+-parseInt(_0x272b75(0x298))/0x8+parseInt(_0x272b75(0x16e))/0x9;if(_0x19e4d4===_0x463856)break;else _0x18189c['push'](_0x18189c['shift']());}catch(_0x7a93b3){_0x18189c['push'](_0x18189c['shift']());}}}(a0_0x882c,0xe7ed9));import{f as a0_0x4a37a3,l as a0_0x7ec8bc,p as a0_0x293e9f,s as a0_0x55b251,t as a0_0x96bd7c}from'\x2e\x2f\x73\x61\x6e\x64\x62\x6f\x78\x2d\x6a\x6f\x4b\x74\x51\x35\x79\x33\x2e\x6a\x73';import{d as a0_0x54c689,f as a0_0x4a887c,i as a0_0xd4b83e,r as a0_0x3b5aa4,t as a0_0x3161f6,u as a0_0x34ddb0}from'\x2e\x2f\x65\x72\x72\x6f\x72\x73\x2d\x44\x5a\x73\x66\x4a\x55\x75\x63\x2e\x6a\x73';const SANDBOX_SIZE_PRESET_NAMES=[a0_0x314c3e(0x1b0),a0_0x314c3e(0x2bb),a0_0x314c3e(0x2b3),a0_0x314c3e(0x283)],SANDBOX_SIZE_PRESETS={'\x6e\x61\x6e\x6f':{'\x63\x70\x75\x43\x6f\x72\x65\x73':0x1,'\x6d\x65\x6d\x6f\x72\x79\x4d\x42':0x800,'\x64\x69\x73\x6b\x47\x42':0x5},'\x73\x6d\x61\x6c\x6c':{'\x63\x70\x75\x43\x6f\x72\x65\x73':0x2,'\x6d\x65\x6d\x6f\x72\x79\x4d\x42':0x1000,'\x64\x69\x73\x6b\x47\x42':0xa},'\x6d\x65\x64\x69\x75\x6d':{'\x63\x70\x75\x43\x6f\x72\x65\x73':0x4,'\x6d\x65\x6d\x6f\x72\x79\x4d\x42':0x2000,'\x64\x69\x73\x6b\x47\x42':0x14},'\x6c\x61\x72\x67\x65':{'\x63\x70\x75\x43\x6f\x72\x65\x73':0x8,'\x6d\x65\x6d\x6f\x72\x79\x4d\x42':0x4000,'\x64\x69\x73\x6b\x47\x42':0x32}},DEFAULT_SANDBOX_SIZE=a0_0x314c3e(0x2bb);function sandboxResourcesForSize(_0x40f89c){const _0xcda83=a0_0x314c3e,_0x528d24=SANDBOX_SIZE_PRESETS[_0x40f89c];if(!_0x528d24)throw new Error(_0xcda83(0x1c4)+_0x40f89c+'\x27\x20\x28\x65\x78\x70\x65\x63\x74\x65\x64\x20\x6f\x6e\x65\x20\x6f\x66\x20'+SANDBOX_SIZE_PRESET_NAMES[_0xcda83(0x206)]('\x2c\x20')+'\x29');return{..._0x528d24};}function resolveSandboxResources(_0x399cac){const _0x4f3bc6=a0_0x314c3e;if(_0x399cac['\x72\x65\x73\x6f\x75\x72\x63\x65\x73'])return _0x399cac[_0x4f3bc6(0x1cb)];if(_0x399cac[_0x4f3bc6(0x169)])return sandboxResourcesForSize(_0x399cac[_0x4f3bc6(0x169)]);}function normalizeSandboxResources(_0x183bdb,_0x18e6a7){const _0x586626=a0_0x314c3e,_0x2027f2=_0x18e6a7?.[_0x586626(0x281)]||_0x18e6a7?.[_0x586626(0x12e)]||_0x18e6a7?.[_0x586626(0x31d)]?{'\x6b\x69\x6e\x64':_0x18e6a7[_0x586626(0x12e)]??_0x586626(0x34b),'\x63\x6f\x75\x6e\x74':_0x18e6a7['\x67\x70\x75\x43\x6f\x75\x6e\x74']??0x1}:void 0x0;if(!_0x2027f2)return _0x183bdb;return{..._0x183bdb,'\x61\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72':_0x183bdb?.[_0x586626(0x1cf)]??_0x2027f2};}const FLEET_ID_META=a0_0x314c3e(0x320),MACHINE_ID_META=a0_0x314c3e(0x34f),MACHINE_ROLE_META=a0_0x314c3e(0x2d1),FLEET_CREATED_BY_META=a0_0x314c3e(0x297),WORKSPACE_MODE_META=a0_0x314c3e(0x17d),WORKSPACE_ID_META=a0_0x314c3e(0x185),WORKSPACE_QUOTA_META=a0_0x314c3e(0x192),WORKSPACE_MOUNT_META=a0_0x314c3e(0x2d9),RESERVED_METADATA_PREFIX=a0_0x314c3e(0x250),DEFAULT_MACHINE_LIFETIME_SECONDS=0xe10,DEFAULT_MAX_CONCURRENT_CREATES=0x4,MAX_CONCURRENT_ARTIFACT_READS=0x8,DEFAULT_ARTIFACT_ROOT=a0_0x314c3e(0x251),DEFAULT_MAX_ARTIFACT_BYTES=0x19*0x400*0x400,MAX_MACHINE_ID_LENGTH=0x40,machineIdPattern=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;function createFleetId(){const _0x1fd771=a0_0x314c3e,_0x5de536={'\x49\x47\x4f\x75\x59':_0x1fd771(0x31e)},_0x3e3b32=globalThis[_0x1fd771(0x288)];if(_0x3e3b32?.[_0x1fd771(0x15d)])return'\x66\x6c\x65\x65\x74\x5f'+_0x3e3b32['\x72\x61\x6e\x64\x6f\x6d\x55\x55\x49\x44']()['\x72\x65\x70\x6c\x61\x63\x65\x41\x6c\x6c']('\x2d','')[_0x1fd771(0x1e2)](0x0,0x18);if(_0x3e3b32?.[_0x1fd771(0x21e)]){const _0x5493c3=_0x3e3b32[_0x1fd771(0x21e)](new Uint8Array(0xc));return'\x66\x6c\x65\x65\x74\x5f'+Array[_0x1fd771(0x15e)](_0x5493c3,_0x3f7f92=>_0x3f7f92[_0x1fd771(0x27c)](0x10)[_0x1fd771(0x1b4)](0x2,'\x30'))[_0x1fd771(0x206)]('');}throw new a0_0x54c689(_0x5de536['\x49\x47\x4f\x75\x59']);}function assertSafeId(_0x3e2d8f,_0x3788b2){const _0x133eb3=a0_0x314c3e;if(_0x3e2d8f[_0x133eb3(0x23f)]===0x0||_0x3e2d8f[_0x133eb3(0x23f)]>MAX_MACHINE_ID_LENGTH||!machineIdPattern[_0x133eb3(0x1df)](_0x3e2d8f))throw new a0_0x54c689(_0x3788b2+'\x20\x6d\x75\x73\x74\x20\x62\x65\x20\x31\x2d'+MAX_MACHINE_ID_LENGTH+_0x133eb3(0x18f),{[_0x3788b2]:'\x69\x6e\x76\x61\x6c\x69\x64'});}function assertUniqueMachineIds(_0x516a58){const _0x30f4d0=a0_0x314c3e,_0xccde47={'\x5a\x76\x45\x6b\x43':_0x30f4d0(0x317)},_0x1c6d1b=new Set();for(const _0x435ad3 of _0x516a58){assertSafeId(_0x435ad3['\x6d\x61\x63\x68\x69\x6e\x65\x49\x64'],_0x30f4d0(0x1f3));if(_0x1c6d1b[_0x30f4d0(0x2a0)](_0x435ad3[_0x30f4d0(0x1f3)]))throw new a0_0x54c689(_0x30f4d0(0x247)+_0x435ad3[_0x30f4d0(0x1f3)]+_0x30f4d0(0x259),{'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0xccde47['\x5a\x76\x45\x6b\x43']});_0x1c6d1b[_0x30f4d0(0x348)](_0x435ad3[_0x30f4d0(0x1f3)]);}}function assertNoReservedMetadata(_0x24606c,_0x3983ec){const _0x6fdf9f=a0_0x314c3e;if(!_0x24606c)return;const _0x585bb6=Object[_0x6fdf9f(0x329)](_0x24606c)[_0x6fdf9f(0x16d)](_0x21288f=>_0x21288f[_0x6fdf9f(0x1d6)](RESERVED_METADATA_PREFIX));if(_0x585bb6)throw new a0_0x54c689(_0x3983ec+_0x6fdf9f(0x125)+_0x585bb6+_0x6fdf9f(0x305),{'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x6fdf9f(0x201)});}function mergeCreateOptions(_0x3ebc74,_0x19ba50){const _0x58d505=a0_0x314c3e,{machineId:_0x16db32,metadata:_0x4813ac,name:_0x34170d,role:_0x10f558,..._0x477a11}=_0x19ba50,_0x321db3=_0x3ebc74?.[_0x58d505(0x121)]||_0x19ba50[_0x58d505(0x121)]?{..._0x3ebc74?.['\x62\x61\x63\x6b\x65\x6e\x64'],..._0x19ba50['\x62\x61\x63\x6b\x65\x6e\x64'],'\x74\x79\x70\x65':_0x19ba50[_0x58d505(0x121)]?.[_0x58d505(0x277)]??_0x3ebc74?.[_0x58d505(0x121)]?.['\x74\x79\x70\x65']??_0x58d505(0x1b2),'\x6d\x6f\x64\x65\x6c':{..._0x3ebc74?.['\x62\x61\x63\x6b\x65\x6e\x64']?.[_0x58d505(0x1de)],..._0x19ba50[_0x58d505(0x121)]?.['\x6d\x6f\x64\x65\x6c']}}:void 0x0,_0x1d70f3=_0x19ba50[_0x58d505(0x23b)]??_0x3ebc74?.[_0x58d505(0x23b)];return{..._0x3ebc74,..._0x477a11,'\x72\x65\x73\x6f\x75\x72\x63\x65\x73':normalizeSandboxResources({..._0x3ebc74?.[_0x58d505(0x1cb)],..._0x19ba50[_0x58d505(0x1cb)]},_0x1d70f3),'\x65\x6e\x76':{..._0x3ebc74?.[_0x58d505(0x2e9)],..._0x19ba50[_0x58d505(0x2e9)]},'\x62\x61\x63\x6b\x65\x6e\x64':_0x321db3,'\x64\x72\x69\x76\x65\x72':_0x1d70f3};}function assertPolicy(_0x3d40df,_0x20ea9f,_0x3af285){const _0x40a262=a0_0x314c3e,_0x3e42d3={'\x61\x73\x78\x71\x47':'\x65\x78\x63\x65\x65\x64\x65\x64','\x66\x5a\x41\x6e\x64':function(_0x229362,_0x3acd0b){return _0x229362<_0x3acd0b;},'\x4b\x71\x66\x4b\x71':function(_0x3232cd,_0x27ba68,_0xe9a07a,_0x172939){return _0x3232cd(_0x27ba68,_0xe9a07a,_0x172939);}},_0x5b89e6=_0x3af285?.['\x6d\x61\x78\x4d\x61\x63\x68\x69\x6e\x65\x73']??_0x3d40df[_0x40a262(0x23f)];if(!Number['\x69\x73\x49\x6e\x74\x65\x67\x65\x72'](_0x5b89e6)||_0x5b89e6<=0x0)throw new a0_0x54c689('\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x4d\x61\x63\x68\x69\x6e\x65\x73\x20\x6d\x75\x73\x74\x20\x62\x65\x20\x61\x20\x70\x6f\x73\x69\x74\x69\x76\x65\x20\x69\x6e\x74\x65\x67\x65\x72');if(_0x3d40df['\x6c\x65\x6e\x67\x74\x68']>_0x5b89e6)throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20'+_0x3d40df['\x6c\x65\x6e\x67\x74\x68']+'\x20\x6d\x61\x63\x68\x69\x6e\x65\x73\x20\x62\x75\x74\x20\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x4d\x61\x63\x68\x69\x6e\x65\x73\x20\x69\x73\x20'+_0x5b89e6,{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x4d\x61\x63\x68\x69\x6e\x65\x73':_0x3e42d3[_0x40a262(0x128)]});if(_0x3af285?.[_0x40a262(0x340)]!==void 0x0&&(!Number[_0x40a262(0x1b7)](_0x3af285[_0x40a262(0x340)])||_0x3af285[_0x40a262(0x340)]<=0x0))throw new a0_0x54c689(_0x40a262(0x327),{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73':_0x40a262(0x35e)});if(_0x3af285?.[_0x40a262(0x2a8)]!==void 0x0&&(!Number[_0x40a262(0x22a)](_0x3af285[_0x40a262(0x2a8)])||_0x3e42d3['\x66\x5a\x41\x6e\x64'](_0x3af285[_0x40a262(0x2a8)],0x0)))throw new a0_0x54c689(_0x40a262(0x246),{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x53\x70\x65\x6e\x64\x55\x73\x64':'\x69\x6e\x76\x61\x6c\x69\x64'});let _0x199ffc=0x0,_0x293326=0x0,_0x301a6e=0x0,_0x4db4cf=0x0;for(const _0x31cf0c of _0x3d40df){const _0x5f2d6f=mergeCreateOptions(_0x20ea9f,_0x31cf0c)[_0x40a262(0x1cb)];_0x199ffc+=_0x5f2d6f?.['\x63\x70\x75\x43\x6f\x72\x65\x73']??0x0,_0x293326+=_0x5f2d6f?.[_0x40a262(0x12c)]??0x0,_0x301a6e+=_0x5f2d6f?.['\x64\x69\x73\x6b\x47\x42']?_0x5f2d6f['\x64\x69\x73\x6b\x47\x42']*0x400:0x0,_0x4db4cf+=_0x5f2d6f?.[_0x40a262(0x1cf)]?.[_0x40a262(0x303)]??(_0x5f2d6f?.[_0x40a262(0x1cf)]?0x1:0x0);}if(_0x3af285?.['\x6d\x61\x78\x54\x6f\x74\x61\x6c\x43\x70\x75']!==void 0x0&&_0x199ffc>_0x3af285[_0x40a262(0x174)])throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20'+_0x199ffc+'\x20\x43\x50\x55\x20\x63\x6f\x72\x65\x73\x20\x62\x75\x74\x20\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x54\x6f\x74\x61\x6c\x43\x70\x75\x20\x69\x73\x20'+_0x3af285[_0x40a262(0x174)],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x54\x6f\x74\x61\x6c\x43\x70\x75':_0x40a262(0x22b)});if(_0x3af285?.[_0x40a262(0x16f)]!==void 0x0&&_0x293326>_0x3af285['\x6d\x61\x78\x54\x6f\x74\x61\x6c\x4d\x65\x6d\x6f\x72\x79\x4d\x62'])throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20'+_0x293326+'\x20\x4d\x42\x20\x52\x41\x4d\x20\x62\x75\x74\x20\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x54\x6f\x74\x61\x6c\x4d\x65\x6d\x6f\x72\x79\x4d\x62\x20\x69\x73\x20'+_0x3af285['\x6d\x61\x78\x54\x6f\x74\x61\x6c\x4d\x65\x6d\x6f\x72\x79\x4d\x62'],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x54\x6f\x74\x61\x6c\x4d\x65\x6d\x6f\x72\x79\x4d\x62':'\x65\x78\x63\x65\x65\x64\x65\x64'});if(_0x3af285?.[_0x40a262(0x2e6)]!==void 0x0&&_0x301a6e>_0x3af285[_0x40a262(0x2e6)])throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20'+_0x301a6e+_0x40a262(0x323)+_0x3af285[_0x40a262(0x2e6)],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x54\x6f\x74\x61\x6c\x53\x74\x6f\x72\x61\x67\x65\x4d\x62':_0x40a262(0x22b)});if(_0x3af285?.[_0x40a262(0x349)]!==void 0x0&&_0x4db4cf>_0x3af285['\x6d\x61\x78\x54\x6f\x74\x61\x6c\x41\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72\x73'])throw new a0_0x54c689(_0x40a262(0x124)+_0x4db4cf+_0x40a262(0x1d4)+_0x3af285[_0x40a262(0x349)],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x54\x6f\x74\x61\x6c\x41\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72\x73':_0x3e42d3[_0x40a262(0x128)]});const _0x2706d9=Math[_0x40a262(0x204)](..._0x3d40df[_0x40a262(0x249)](_0x4fbd6e=>mergeCreateOptions(_0x20ea9f,_0x4fbd6e)[_0x40a262(0x1b6)]??DEFAULT_MACHINE_LIFETIME_SECONDS));if(_0x3af285?.[_0x40a262(0x1b6)]!==void 0x0&&_0x2706d9>_0x3af285[_0x40a262(0x1b6)])throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20'+_0x2706d9+'\x73\x20\x6d\x61\x78\x20\x6c\x69\x66\x65\x74\x69\x6d\x65\x20\x62\x75\x74\x20\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x4c\x69\x66\x65\x74\x69\x6d\x65\x53\x65\x63\x6f\x6e\x64\x73\x20\x69\x73\x20'+_0x3af285[_0x40a262(0x1b6)],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x4c\x69\x66\x65\x74\x69\x6d\x65\x53\x65\x63\x6f\x6e\x64\x73':_0x3e42d3[_0x40a262(0x128)]});for(const _0xa747ba of _0x3d40df){const _0x34dd95=mergeCreateOptions(_0x20ea9f,_0xa747ba);_0x3e42d3[_0x40a262(0x187)](assertMachineDescriptorPolicy,_0xa747ba[_0x40a262(0x1f3)],_0x34dd95,_0x3af285);}}function assertMachineDescriptorPolicy(_0x1c75d0,_0x121b50,_0x166c23){const _0x8989d7=a0_0x314c3e,_0x42ac1f={'\x68\x78\x65\x4b\x73':function(_0x4dbed6,_0x583f79){return _0x4dbed6>_0x583f79;}};if(!_0x166c23)return;const _0x4ad3e5=_0x121b50[_0x8989d7(0x23b)]?.[_0x8989d7(0x277)];if(_0x166c23[_0x8989d7(0x276)]&&_0x4ad3e5&&!_0x166c23[_0x8989d7(0x276)][_0x8989d7(0x149)](_0x4ad3e5))throw new a0_0x54c689(_0x8989d7(0x2ff)+_0x1c75d0+_0x8989d7(0x1dc)+_0x4ad3e5+_0x8989d7(0x2bc),{'\x70\x6f\x6c\x69\x63\x79\x2e\x61\x6c\x6c\x6f\x77\x65\x64\x44\x72\x69\x76\x65\x72\x73':_0x8989d7(0x22b)});const _0x21331a=_0x121b50[_0x8989d7(0x328)]??_0x121b50[_0x8989d7(0x208)];if(_0x166c23['\x61\x6c\x6c\x6f\x77\x65\x64\x49\x6d\x61\x67\x65\x73']&&_0x21331a&&!_0x166c23['\x61\x6c\x6c\x6f\x77\x65\x64\x49\x6d\x61\x67\x65\x73'][_0x8989d7(0x149)](_0x21331a))throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x6d\x61\x63\x68\x69\x6e\x65\x20\x27'+_0x1c75d0+_0x8989d7(0x29c)+_0x21331a+_0x8989d7(0x2a1),{'\x70\x6f\x6c\x69\x63\x79\x2e\x61\x6c\x6c\x6f\x77\x65\x64\x49\x6d\x61\x67\x65\x73':_0x8989d7(0x22b)});const _0x127d96=_0x121b50[_0x8989d7(0x1dd)]??_0x121b50['\x70\x75\x62\x6c\x69\x63\x54\x65\x6d\x70\x6c\x61\x74\x65\x49\x64'];if(_0x166c23['\x61\x6c\x6c\x6f\x77\x65\x64\x54\x65\x6d\x70\x6c\x61\x74\x65\x49\x64\x73']&&_0x127d96&&!_0x166c23[_0x8989d7(0x2cb)][_0x8989d7(0x149)](_0x127d96))throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x6d\x61\x63\x68\x69\x6e\x65\x20\x27'+_0x1c75d0+_0x8989d7(0x13a)+_0x127d96+_0x8989d7(0x203),{'\x70\x6f\x6c\x69\x63\x79\x2e\x61\x6c\x6c\x6f\x77\x65\x64\x54\x65\x6d\x70\x6c\x61\x74\x65\x49\x64\x73':_0x8989d7(0x22b)});if(_0x166c23[_0x8989d7(0x343)]===![]&&_0x42ac1f[_0x8989d7(0x26f)](_0x121b50['\x72\x65\x73\x6f\x75\x72\x63\x65\x73']?.[_0x8989d7(0x1cf)]?.[_0x8989d7(0x303)]??(_0x121b50['\x72\x65\x73\x6f\x75\x72\x63\x65\x73']?.['\x61\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72']?0x1:0x0),0x0))throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x6d\x61\x63\x68\x69\x6e\x65\x20\x27'+_0x1c75d0+_0x8989d7(0x301),{'\x70\x6f\x6c\x69\x63\x79\x2e\x61\x6c\x6c\x6f\x77\x41\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72\x73':'\x65\x78\x63\x65\x65\x64\x65\x64'});}function calculateResourceTotals(_0x33122b,_0x177c5f){const _0x57fb1d=a0_0x314c3e;let _0x1487ca=0x0,_0x544090=0x0,_0x315348=0x0,_0x52a42e=0x0,_0x422495=0x0;for(const _0x4aee33 of _0x33122b){const _0x4516b4=mergeCreateOptions(_0x177c5f,_0x4aee33),_0x441d30=_0x4516b4[_0x57fb1d(0x1cb)];_0x1487ca+=_0x441d30?.['\x63\x70\x75\x43\x6f\x72\x65\x73']??0x0,_0x544090+=_0x441d30?.['\x6d\x65\x6d\x6f\x72\x79\x4d\x42']??0x0,_0x315348+=_0x441d30?.[_0x57fb1d(0x2d0)]?_0x441d30[_0x57fb1d(0x2d0)]*0x400:0x0,_0x52a42e+=_0x441d30?.[_0x57fb1d(0x1cf)]?.['\x63\x6f\x75\x6e\x74']??(_0x441d30?.['\x61\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72']?0x1:0x0),_0x422495=Math[_0x57fb1d(0x204)](_0x422495,_0x4516b4['\x6d\x61\x78\x4c\x69\x66\x65\x74\x69\x6d\x65\x53\x65\x63\x6f\x6e\x64\x73']??DEFAULT_MACHINE_LIFETIME_SECONDS);}return{'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x33122b[_0x57fb1d(0x23f)],'\x74\x6f\x74\x61\x6c\x43\x70\x75':_0x1487ca,'\x74\x6f\x74\x61\x6c\x4d\x65\x6d\x6f\x72\x79\x4d\x62':_0x544090,'\x74\x6f\x74\x61\x6c\x53\x74\x6f\x72\x61\x67\x65\x4d\x62':_0x315348,'\x74\x6f\x74\x61\x6c\x41\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72\x73':_0x52a42e,'\x6d\x61\x78\x4c\x69\x66\x65\x74\x69\x6d\x65\x53\x65\x63\x6f\x6e\x64\x73':_0x422495};}function workspaceMetadata(_0x59e2a1){const _0x4737d6=a0_0x314c3e;return{[WORKSPACE_MODE_META]:_0x59e2a1?.[_0x4737d6(0x13d)]??_0x4737d6(0x2db),..._0x59e2a1?.['\x69\x64']?{[WORKSPACE_ID_META]:_0x59e2a1['\x69\x64']}:{},..._0x59e2a1?.[_0x4737d6(0x11e)]?{[WORKSPACE_QUOTA_META]:_0x59e2a1[_0x4737d6(0x11e)]}:{},..._0x59e2a1?.[_0x4737d6(0x2c5)]?{[WORKSPACE_MOUNT_META]:_0x59e2a1[_0x4737d6(0x2c5)]}:{}};}function resolveMaxConcurrentCreates(_0x1c4a64){const _0x17dca2=a0_0x314c3e,_0x4faa85=_0x1c4a64??DEFAULT_MAX_CONCURRENT_CREATES;if(!Number[_0x17dca2(0x1b7)](_0x4faa85)||_0x4faa85<=0x0)throw new a0_0x54c689(_0x17dca2(0x263));return _0x4faa85;}function getMachineId(_0x10f83d){const _0x3cbac3=a0_0x314c3e,_0x3afe07={'\x69\x55\x45\x44\x69':_0x3cbac3(0x304)},_0x57fcec=_0x10f83d[_0x3cbac3(0x273)]?.[MACHINE_ID_META];return typeof _0x57fcec===_0x3afe07['\x69\x55\x45\x44\x69']&&_0x57fcec[_0x3cbac3(0x23f)]>0x0?_0x57fcec:null;}function getFleetId(_0xb56073){const _0x48fd52=a0_0x314c3e,_0x4a1ca8={'\x6a\x62\x51\x6f\x4a':function(_0x38cc93,_0x1b5821){return _0x38cc93===_0x1b5821;},'\x72\x53\x69\x50\x56':function(_0x2eb834,_0x2e24c0){return _0x2eb834>_0x2e24c0;}},_0x57fa17=_0xb56073[_0x48fd52(0x273)]?.[FLEET_ID_META];return _0x4a1ca8['\x6a\x62\x51\x6f\x4a'](typeof _0x57fa17,'\x73\x74\x72\x69\x6e\x67')&&_0x4a1ca8[_0x48fd52(0x337)](_0x57fa17[_0x48fd52(0x23f)],0x0)?_0x57fa17:null;}function dispatchResultsPath(_0x245279,_0x4d2944,_0x1b228e){const _0x4f501e=a0_0x314c3e,_0x2b42e0={'\x6d\x55\x4d\x72\x6a':function(_0x537a8b,_0x2666ef){return _0x537a8b(_0x2666ef);},'\x71\x7a\x64\x6d\x73':_0x4f501e(0x1b3)},_0x289686=new URLSearchParams();if(_0x1b228e?.[_0x4f501e(0x289)])_0x289686['\x73\x65\x74']('\x63\x75\x72\x73\x6f\x72',_0x1b228e[_0x4f501e(0x289)]);if(_0x1b228e?.['\x6c\x69\x6d\x69\x74']!==void 0x0)_0x289686[_0x4f501e(0x207)](_0x4f501e(0x2d4),_0x2b42e0[_0x4f501e(0x191)](String,_0x1b228e[_0x4f501e(0x2d4)]));for(const _0x6a2611 of _0x1b228e?.['\x6d\x61\x63\x68\x69\x6e\x65\x73']??[])_0x289686[_0x4f501e(0x14b)](_0x2b42e0[_0x4f501e(0x20f)],_0x6a2611);const _0x145bf9=_0x289686[_0x4f501e(0x27c)](),_0x4ea763=_0x4f501e(0x145)+_0x245279+'\x2f\x64\x69\x73\x70\x61\x74\x63\x68\x2f'+encodeURIComponent(_0x4d2944)+_0x4f501e(0x147);return _0x145bf9?_0x4ea763+'\x3f'+_0x145bf9:_0x4ea763;}function execDispatchBody(_0x58cee9,_0x23864b){const _0x31e18a=a0_0x314c3e;return{'\x74\x79\x70\x65':_0x31e18a(0x29f),'\x63\x6f\x6d\x6d\x61\x6e\x64':_0x58cee9,'\x63\x77\x64':_0x23864b?.[_0x31e18a(0x1b5)],'\x65\x6e\x76':_0x23864b?.['\x65\x6e\x76'],'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':_0x23864b?.[_0x31e18a(0x25d)],'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x23864b?.[_0x31e18a(0x307)],'\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74':_0x23864b?.['\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74'],'\x72\x65\x74\x72\x79':_0x23864b?.[_0x31e18a(0x1f0)],'\x64\x69\x73\x70\x61\x74\x63\x68\x49\x64':_0x23864b?.['\x64\x69\x73\x70\x61\x74\x63\x68\x49\x64'],'\x62\x75\x66\x66\x65\x72\x52\x65\x73\x75\x6c\x74\x73':_0x23864b?.['\x62\x75\x66\x66\x65\x72\x52\x65\x73\x75\x6c\x74\x73']};}function promptDispatchBody(_0xa8e212,_0x1aa3e6){const _0x5beea3=a0_0x314c3e;return{'\x74\x79\x70\x65':_0x5beea3(0x23c),'\x70\x61\x72\x74\x73':a0_0x4a37a3(_0xa8e212),'\x73\x65\x73\x73\x69\x6f\x6e\x49\x64':_0x1aa3e6?.[_0x5beea3(0x255)],'\x6d\x6f\x64\x65\x6c':_0x1aa3e6?.[_0x5beea3(0x1de)],'\x62\x61\x63\x6b\x65\x6e\x64':_0x1aa3e6?.[_0x5beea3(0x121)],'\x63\x6f\x6e\x74\x65\x78\x74':_0x1aa3e6?.['\x63\x6f\x6e\x74\x65\x78\x74'],'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':_0x1aa3e6?.[_0x5beea3(0x25d)],'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x1aa3e6?.[_0x5beea3(0x307)],'\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74':_0x1aa3e6?.[_0x5beea3(0x28f)],'\x72\x65\x74\x72\x79':_0x1aa3e6?.[_0x5beea3(0x1f0)],'\x64\x69\x73\x70\x61\x74\x63\x68\x49\x64':_0x1aa3e6?.[_0x5beea3(0x1f6)],'\x62\x75\x66\x66\x65\x72\x52\x65\x73\x75\x6c\x74\x73':_0x1aa3e6?.[_0x5beea3(0x24f)]};}var SandboxFleet=class{constructor(_0x228f7e,_0x1bc15a,_0xc572d){const _0xe1267e=a0_0x314c3e;this[_0xe1267e(0x2bf)]=_0x228f7e,this['\x66\x6c\x65\x65\x74\x49\x64']=_0x1bc15a,this['\x6d\x61\x63\x68\x69\x6e\x65\x73']=_0xc572d;}get['\x69\x64\x73'](){const _0x331430=a0_0x314c3e;return[...this[_0x331430(0x307)][_0x331430(0x329)]()];}[a0_0x314c3e(0x17f)](_0x32b967){const _0x2a6192=a0_0x314c3e,_0x4e143f=this[_0x2a6192(0x307)]['\x67\x65\x74'](_0x32b967);if(!_0x4e143f)throw new a0_0x54c689(_0x2a6192(0x2ce)+_0x32b967+'\x27');return _0x4e143f;}['\x73\x61\x6e\x64\x62\x6f\x78'](_0x47a287){return this['\x72\x65\x71\x75\x69\x72\x65\x53\x61\x6e\x64\x62\x6f\x78'](_0x47a287);}async['\x63\x6f\x6c\x6c\x65\x63\x74\x41\x72\x74\x69\x66\x61\x63\x74\x73'](_0x5952d3){const _0x392340=a0_0x314c3e;return mapConcurrent(_0x5952d3,Math[_0x392340(0x34e)](MAX_CONCURRENT_ARTIFACT_READS,_0x5952d3['\x6c\x65\x6e\x67\x74\x68']||0x1),async _0x123366=>{const _0x20e984=_0x392340;assertArtifactPath(_0x123366['\x70\x61\x74\x68']);const _0x22916b=this[_0x20e984(0x17f)](_0x123366[_0x20e984(0x1f3)]),_0x1c6169=await(await this[_0x20e984(0x1fa)](_0x123366[_0x20e984(0x1f3)]))[_0x20e984(0x2b4)](_0x123366['\x70\x61\x74\x68']);return assertArtifactSize(_0x1c6169,_0x123366),{..._0x123366,'\x73\x61\x6e\x64\x62\x6f\x78\x49\x64':_0x22916b['\x69\x64'],'\x63\x6f\x6e\x74\x65\x6e\x74':_0x1c6169};});}async[a0_0x314c3e(0x29f)](_0x83fc60,_0x35e21f,_0xfa3102){const _0x2c1777=a0_0x314c3e,[_0x19a87d]=await this[_0x2c1777(0x173)](_0x35e21f,{..._0xfa3102,'\x6d\x61\x63\x68\x69\x6e\x65\x73':[_0x83fc60]});if(_0x19a87d?.['\x6f\x6b']&&_0x19a87d['\x72\x65\x73\x75\x6c\x74'])return _0x19a87d['\x72\x65\x73\x75\x6c\x74'];if(_0x19a87d?.[_0x2c1777(0x2b5)])throw new Error(_0x19a87d[_0x2c1777(0x2b5)]['\x6d\x65\x73\x73\x61\x67\x65']);throw new Error(_0x2c1777(0x180)+_0x83fc60+'\x27');}async[a0_0x314c3e(0x173)](_0x38d038,_0x184f4b){const _0x22fc46=a0_0x314c3e;return(await this[_0x22fc46(0x344)](_0x38d038,_0x184f4b))['\x72\x65\x73\x75\x6c\x74\x73'];}async[a0_0x314c3e(0x344)](_0x484942,_0x257bf5){const _0x3fcef1=a0_0x314c3e,_0x1449f0={'\x6e\x54\x58\x67\x6c':function(_0x41919e,_0x291f3f,_0x59f6ee){return _0x41919e(_0x291f3f,_0x59f6ee);}},_0x32e0c2=await this[_0x3fcef1(0x2bf)][_0x3fcef1(0x365)](_0x3fcef1(0x145)+this[_0x3fcef1(0x294)]+_0x3fcef1(0x279),{'\x6d\x65\x74\x68\x6f\x64':_0x3fcef1(0x17e),'\x62\x6f\x64\x79':JSON[_0x3fcef1(0x232)](_0x1449f0['\x6e\x54\x58\x67\x6c'](execDispatchBody,_0x484942,_0x257bf5))});if(!_0x32e0c2['\x6f\x6b']){const _0x40c2ea=await _0x32e0c2[_0x3fcef1(0x142)]();throw a0_0x4a887c(_0x32e0c2[_0x3fcef1(0x1ca)],_0x40c2ea,void 0x0,_0x32e0c2[_0x3fcef1(0x2e8)]);}return await _0x32e0c2[_0x3fcef1(0x32a)]();}async[a0_0x314c3e(0x23c)](_0x2a48c6,_0xbdc0da,_0x25cf70){const _0x4ef431=a0_0x314c3e,[_0xb3ebb1]=await this['\x64\x69\x73\x70\x61\x74\x63\x68\x50\x72\x6f\x6d\x70\x74'](_0xbdc0da,{..._0x25cf70,'\x6d\x61\x63\x68\x69\x6e\x65\x73':[_0x2a48c6]});if(_0xb3ebb1?.[_0x4ef431(0x23c)])return _0xb3ebb1[_0x4ef431(0x23c)];if(_0xb3ebb1?.['\x65\x72\x72\x6f\x72'])throw new Error(_0xb3ebb1['\x65\x72\x72\x6f\x72'][_0x4ef431(0x2b9)]);throw new Error(_0x4ef431(0x353)+_0x2a48c6+'\x27');}async['\x64\x69\x73\x70\x61\x74\x63\x68\x50\x72\x6f\x6d\x70\x74'](_0x1c5aff,_0x4fba45){const _0x27f2b5=a0_0x314c3e;return(await this[_0x27f2b5(0x2f1)](_0x1c5aff,_0x4fba45))[_0x27f2b5(0x195)];}async[a0_0x314c3e(0x2f1)](_0x1c6582,_0x4f90e8){const _0x5d85da=a0_0x314c3e,_0x5c5587=await this['\x63\x6c\x69\x65\x6e\x74'][_0x5d85da(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+this[_0x5d85da(0x294)]+'\x2f\x64\x69\x73\x70\x61\x74\x63\x68',{'\x6d\x65\x74\x68\x6f\x64':'\x50\x4f\x53\x54','\x62\x6f\x64\x79':JSON[_0x5d85da(0x232)](promptDispatchBody(_0x1c6582,_0x4f90e8))});if(!_0x5c5587['\x6f\x6b']){const _0x127e51=await _0x5c5587[_0x5d85da(0x142)]();throw a0_0x4a887c(_0x5c5587[_0x5d85da(0x1ca)],_0x127e51,void 0x0,_0x5c5587['\x68\x65\x61\x64\x65\x72\x73']);}return await _0x5c5587[_0x5d85da(0x32a)]();}[a0_0x314c3e(0x32f)](){const _0x91c859=a0_0x314c3e;return this['\x63\x6c\x69\x65\x6e\x74'][_0x91c859(0x332)][_0x91c859(0x32f)](this[_0x91c859(0x294)]);}[a0_0x314c3e(0x29e)](_0x7c87e6){const _0x16e3dc=a0_0x314c3e;return this[_0x16e3dc(0x2bf)]['\x66\x6c\x65\x65\x74\x73']['\x61\x74\x74\x61\x63\x68\x4d\x61\x63\x68\x69\x6e\x65'](this['\x66\x6c\x65\x65\x74\x49\x64'],_0x7c87e6);}[a0_0x314c3e(0x262)](_0x11abe5){const _0xd4e50e=a0_0x314c3e;return this[_0xd4e50e(0x2bf)]['\x66\x6c\x65\x65\x74\x73']['\x64\x65\x74\x61\x63\x68\x4d\x61\x63\x68\x69\x6e\x65'](this['\x66\x6c\x65\x65\x74\x49\x64'],_0x11abe5);}[a0_0x314c3e(0x2ef)](_0x4852c1,_0x34a28c){const _0x2be025=a0_0x314c3e;return this[_0x2be025(0x2bf)][_0x2be025(0x332)]['\x64\x69\x73\x70\x61\x74\x63\x68\x52\x65\x73\x75\x6c\x74\x73'](this['\x66\x6c\x65\x65\x74\x49\x64'],_0x4852c1,_0x34a28c);}[a0_0x314c3e(0x20c)](_0x373248,_0x5a3e1f){const _0x2ea928=a0_0x314c3e;return this[_0x2ea928(0x2bf)]['\x66\x6c\x65\x65\x74\x73'][_0x2ea928(0x20c)](this[_0x2ea928(0x294)],_0x373248,_0x5a3e1f);}[a0_0x314c3e(0x1f2)](){const _0x2beec0=a0_0x314c3e;return this[_0x2beec0(0x2bf)]['\x66\x6c\x65\x65\x74\x73'][_0x2beec0(0x1f2)](this[_0x2beec0(0x294)]);}['\x72\x65\x73\x74\x6f\x72\x65\x57\x6f\x72\x6b\x73\x70\x61\x63\x65\x53\x6e\x61\x70\x73\x68\x6f\x74'](_0x55ae8e){const _0x1e2b9a=a0_0x314c3e;return this[_0x1e2b9a(0x2bf)][_0x1e2b9a(0x332)][_0x1e2b9a(0x18e)](this[_0x1e2b9a(0x294)],_0x55ae8e);}[a0_0x314c3e(0x23e)](){const _0x12a69a=a0_0x314c3e;return this[_0x12a69a(0x2bf)][_0x12a69a(0x332)][_0x12a69a(0x23e)](this[_0x12a69a(0x294)]);}[a0_0x314c3e(0x1d2)](_0x4989ce,_0x4751fa){const _0x29e5c5=a0_0x314c3e;return this['\x63\x6c\x69\x65\x6e\x74']['\x66\x6c\x65\x65\x74\x73'][_0x29e5c5(0x1d2)](this[_0x29e5c5(0x294)],_0x4989ce,_0x4751fa);}[a0_0x314c3e(0x2dc)](_0x2f2d52,_0x48b4ee){const _0x352311=a0_0x314c3e;return this[_0x352311(0x2bf)][_0x352311(0x332)][_0x352311(0x2dc)](this['\x66\x6c\x65\x65\x74\x49\x64'],_0x2f2d52,_0x48b4ee);}async[a0_0x314c3e(0x1f4)](_0x1d93b9){const _0x41f564=a0_0x314c3e,_0x144586={'\x55\x6b\x4d\x59\x70':function(_0x3ec11d,_0x24b1ab){return _0x3ec11d instanceof _0x24b1ab;}},_0x180084=[];await Promise[_0x41f564(0x143)]([...this[_0x41f564(0x307)]['\x76\x61\x6c\x75\x65\x73']()]['\x6d\x61\x70'](async _0x2c2a38=>{const _0x36f9da=_0x41f564,_0x1f1822=await this[_0x36f9da(0x2bf)][_0x36f9da(0x17f)](_0x2c2a38['\x69\x64']);if(!_0x1f1822)return;try{await _0x1f1822[_0x36f9da(0x1f4)]();}catch(_0x4dcff9){_0x180084['\x70\x75\x73\x68'](_0x144586['\x55\x6b\x4d\x59\x70'](_0x4dcff9,Error)?_0x4dcff9:new Error(String(_0x4dcff9)));}})),await this[_0x41f564(0x2bf)][_0x41f564(0x332)]['\x64\x65\x6c\x65\x74\x65\x52\x65\x63\x6f\x72\x64'](this[_0x41f564(0x294)]);if(_0x180084[_0x41f564(0x23f)]>0x0){if(!_0x1d93b9?.[_0x41f564(0x300)])throw _0x180084[0x0];}}async[a0_0x314c3e(0x140)](){const _0x261530=a0_0x314c3e,_0x69a2e={'\x52\x51\x7a\x42\x71':function(_0x40f798,_0x1e4696,_0x5e993c,_0x47a1d3,_0x4534aa){return _0x40f798(_0x1e4696,_0x5e993c,_0x47a1d3,_0x4534aa);}},_0x557d41=await this[_0x261530(0x2bf)][_0x261530(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+this[_0x261530(0x294)]+_0x261530(0x230));if(!_0x557d41['\x6f\x6b']){const _0x55e4fb=await _0x557d41[_0x261530(0x142)]();throw _0x69a2e[_0x261530(0x19c)](a0_0x4a887c,_0x557d41[_0x261530(0x1ca)],_0x55e4fb,void 0x0,_0x557d41[_0x261530(0x2e8)]);}return await _0x557d41['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x139)](_0x28fff1={}){const _0x4ebe12=a0_0x314c3e;return this[_0x4ebe12(0x2bf)][_0x4ebe12(0x332)][_0x4ebe12(0x139)](this['\x66\x6c\x65\x65\x74\x49\x64'],_0x28fff1);}async[a0_0x314c3e(0x1d5)](){const _0x248054=a0_0x314c3e,_0x81589=(await this[_0x248054(0x139)]({'\x69\x6e\x63\x6c\x75\x64\x65\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65':!![]}))[_0x248054(0x1d5)];if(!_0x81589)throw new Error(_0x248054(0x1a5));return _0x81589;}async['\x63\x72\x65\x61\x74\x65\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65\x52\x65\x70\x6f\x72\x74'](_0x46763d={}){const _0x2e4bdc=a0_0x314c3e,_0x4a1474={'\x75\x41\x43\x57\x79':_0x2e4bdc(0x308)},{dispatchId:_0x24d4df,window:_0x4ff690,compareTo:_0x36682a,..._0x555f0d}=_0x46763d;return this[_0x2e4bdc(0x2bf)][_0x2e4bdc(0x1d5)][_0x2e4bdc(0x2b0)]({'\x73\x75\x62\x6a\x65\x63\x74':{'\x74\x79\x70\x65':_0x4a1474[_0x2e4bdc(0x21a)],'\x69\x64':this['\x66\x6c\x65\x65\x74\x49\x64'],'\x64\x69\x73\x70\x61\x74\x63\x68\x49\x64':_0x24d4df,'\x77\x69\x6e\x64\x6f\x77':_0x4ff690,'\x63\x6f\x6d\x70\x61\x72\x65\x54\x6f':_0x36682a},..._0x555f0d});}async['\x63\x72\x65\x61\x74\x65\x41\x67\x65\x6e\x74\x69\x63\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65\x52\x65\x70\x6f\x72\x74'](_0x2c818e){const _0x4d9cd2=a0_0x314c3e,_0x4d1803={'\x56\x4f\x46\x54\x45':_0x4d9cd2(0x15a),'\x53\x68\x6f\x74\x54':_0x4d9cd2(0x331)};return this['\x63\x72\x65\x61\x74\x65\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65\x52\x65\x70\x6f\x72\x74']({'\x6d\x6f\x64\x65':_0x4d1803['\x56\x4f\x46\x54\x45'],'\x62\x75\x64\x67\x65\x74':{'\x62\x69\x6c\x6c\x54\x6f':_0x4d1803[_0x4d9cd2(0x271)],'\x6d\x61\x78\x55\x73\x64':_0x2c818e[_0x4d9cd2(0x153)]},'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x2c818e['\x6d\x65\x74\x61\x64\x61\x74\x61'],'\x64\x69\x73\x70\x61\x74\x63\x68\x49\x64':_0x2c818e['\x64\x69\x73\x70\x61\x74\x63\x68\x49\x64'],'\x77\x69\x6e\x64\x6f\x77':_0x2c818e[_0x4d9cd2(0x163)],'\x63\x6f\x6d\x70\x61\x72\x65\x54\x6f':_0x2c818e[_0x4d9cd2(0x26e)]});}async[a0_0x314c3e(0x1eb)](_0x4b6bbe){const _0x278365=a0_0x314c3e,_0x3da8b4={'\x72\x5a\x57\x5a\x68':function(_0x3a33b6,_0x1a2dbe,_0x329591){return _0x3a33b6(_0x1a2dbe,_0x329591);}};return _0x3da8b4['\x72\x5a\x57\x5a\x68'](a0_0x7ec8bc,await this[_0x278365(0x139)](),_0x4b6bbe);}async[a0_0x314c3e(0x1ac)](){const _0x403a5b=a0_0x314c3e;return this[_0x403a5b(0x2bf)][_0x403a5b(0x332)][_0x403a5b(0x1ac)](this[_0x403a5b(0x294)]);}async['\x63\x72\x65\x61\x74\x65\x54\x6f\x6b\x65\x6e'](_0x38d6e6){const _0x25cc3f=a0_0x314c3e;return this[_0x25cc3f(0x2bf)]['\x66\x6c\x65\x65\x74\x73'][_0x25cc3f(0x196)](this[_0x25cc3f(0x294)],_0x38d6e6);}async[a0_0x314c3e(0x1fa)](_0x5add31){const _0x5348c5=a0_0x314c3e,_0x16b378=this[_0x5348c5(0x17f)](_0x5add31),_0x49d224=await this[_0x5348c5(0x2bf)][_0x5348c5(0x17f)](_0x16b378['\x69\x64']);if(!_0x49d224)throw new a0_0x54c689(_0x5348c5(0x2ff)+_0x5add31+_0x5348c5(0x248),{'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0x5348c5(0x2a3)});return _0x49d224;}},SandboxFleetClient=class{constructor(_0x20b659){this['\x63\x6c\x69\x65\x6e\x74']=_0x20b659;}async[a0_0x314c3e(0x138)](){const _0x1dbcd9=a0_0x314c3e,_0x3ed095={'\x5a\x43\x73\x47\x6f':function(_0xf032ce,_0x3cc1ff,_0x40a50c,_0x1d32e8,_0x33d4a2){return _0xf032ce(_0x3cc1ff,_0x40a50c,_0x1d32e8,_0x33d4a2);}},_0x403c95=await this[_0x1dbcd9(0x2bf)][_0x1dbcd9(0x365)](_0x1dbcd9(0x296));if(!_0x403c95['\x6f\x6b']){const _0x33dde1=await _0x403c95['\x74\x65\x78\x74']();throw _0x3ed095[_0x1dbcd9(0x1da)](a0_0x4a887c,_0x403c95[_0x1dbcd9(0x1ca)],_0x33dde1,void 0x0,_0x403c95[_0x1dbcd9(0x2e8)]);}return await _0x403c95['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x21c)](){const _0x1256b7=a0_0x314c3e,_0x3b0a85={'\x4c\x6d\x48\x6b\x45':function(_0x518433,_0x59fc74,_0x362296,_0x49a6c3,_0x3f08f5){return _0x518433(_0x59fc74,_0x362296,_0x49a6c3,_0x3f08f5);}},_0x703e0a=await this[_0x1256b7(0x2bf)][_0x1256b7(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f\x6f\x70\x65\x72\x61\x74\x69\x6f\x6e\x73');if(!_0x703e0a['\x6f\x6b']){const _0x320acc=await _0x703e0a[_0x1256b7(0x142)]();throw _0x3b0a85['\x4c\x6d\x48\x6b\x45'](a0_0x4a887c,_0x703e0a[_0x1256b7(0x1ca)],_0x320acc,void 0x0,_0x703e0a[_0x1256b7(0x2e8)]);}return await _0x703e0a['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x19f)](_0xc574eb){const _0x2fc80b=a0_0x314c3e,_0x187ece={'\x78\x4a\x41\x53\x71':function(_0x559a9a,_0x472959,_0x15b861,_0x45acfd,_0x1a580e){return _0x559a9a(_0x472959,_0x15b861,_0x45acfd,_0x1a580e);}},_0xf85427=await this[_0x2fc80b(0x2bf)][_0x2fc80b(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f\x72\x65\x63\x6f\x6e\x63\x69\x6c\x65',{'\x6d\x65\x74\x68\x6f\x64':_0x2fc80b(0x17e),'\x62\x6f\x64\x79':JSON[_0x2fc80b(0x232)](_0xc574eb??{})});if(!_0xf85427['\x6f\x6b']){const _0x5d8199=await _0xf85427['\x74\x65\x78\x74']();throw _0x187ece[_0x2fc80b(0x13c)](a0_0x4a887c,_0xf85427[_0x2fc80b(0x1ca)],_0x5d8199,void 0x0,_0xf85427[_0x2fc80b(0x2e8)]);}return await _0xf85427[_0x2fc80b(0x32a)]();}async[a0_0x314c3e(0x2a6)](_0x13b9cb){const _0x3fb110=a0_0x314c3e,_0x1bd6d3={'\x6c\x64\x43\x70\x71':function(_0x38ec5a,_0x5f19d6){return _0x38ec5a===_0x5f19d6;},'\x64\x4a\x61\x75\x57':_0x3fb110(0x27e),'\x55\x41\x7a\x4a\x43':_0x3fb110(0x1a0),'\x70\x78\x72\x62\x47':_0x3fb110(0x17e)};if(_0x1bd6d3[_0x3fb110(0x229)](_0x13b9cb[_0x3fb110(0x307)][_0x3fb110(0x23f)],0x0))throw new a0_0x54c689(_0x1bd6d3[_0x3fb110(0x225)]);assertUniqueMachineIds(_0x13b9cb[_0x3fb110(0x307)]),assertPolicy(_0x13b9cb[_0x3fb110(0x307)],_0x13b9cb['\x64\x65\x66\x61\x75\x6c\x74\x73'],_0x13b9cb[_0x3fb110(0x342)]);const _0x1a8a15=await this[_0x3fb110(0x2bf)][_0x3fb110(0x365)](_0x1bd6d3[_0x3fb110(0x12d)],{'\x6d\x65\x74\x68\x6f\x64':_0x1bd6d3['\x70\x78\x72\x62\x47'],'\x62\x6f\x64\x79':JSON[_0x3fb110(0x232)]({'\x6d\x61\x63\x68\x69\x6e\x65\x43\x6f\x75\x6e\x74':_0x13b9cb[_0x3fb110(0x307)][_0x3fb110(0x23f)],'\x70\x6f\x6c\x69\x63\x79':_0x13b9cb[_0x3fb110(0x342)],'\x72\x65\x73\x6f\x75\x72\x63\x65\x73':calculateResourceTotals(_0x13b9cb[_0x3fb110(0x307)],_0x13b9cb[_0x3fb110(0x260)]),'\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73':_0x13b9cb['\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73']})});if(!_0x1a8a15['\x6f\x6b']){const _0x281fcb=await _0x1a8a15[_0x3fb110(0x142)]();throw a0_0x4a887c(_0x1a8a15['\x73\x74\x61\x74\x75\x73'],_0x281fcb,void 0x0,_0x1a8a15['\x68\x65\x61\x64\x65\x72\x73']);}return(await _0x1a8a15[_0x3fb110(0x32a)]())[_0x3fb110(0x179)];}async[a0_0x314c3e(0x200)](_0x51e86a){const _0x41ec9d=a0_0x314c3e,_0x12efcd={'\x69\x75\x64\x62\x70':function(_0x15e226,_0x46725b,_0x30605d){return _0x15e226(_0x46725b,_0x30605d);},'\x62\x59\x4e\x51\x54':function(_0x2aa3fe,_0x561d6c){return _0x2aa3fe===_0x561d6c;},'\x66\x48\x78\x71\x55':_0x41ec9d(0x2c6),'\x54\x52\x63\x67\x57':function(_0x5e2740,_0x36a1be){return _0x5e2740>_0x36a1be;},'\x71\x5a\x65\x79\x63':function(_0x5955b0,_0xf3b3e2){return _0x5955b0!==_0xf3b3e2;},'\x75\x41\x78\x69\x68':function(_0x51143c,_0x20f151){return _0x51143c<_0x20f151;}},_0x1cd5cf=_0x51e86a[_0x41ec9d(0x294)]??createFleetId();_0x12efcd[_0x41ec9d(0x306)](assertSafeId,_0x1cd5cf,_0x41ec9d(0x294));if(_0x12efcd[_0x41ec9d(0x2e5)](_0x51e86a[_0x41ec9d(0x307)]['\x6c\x65\x6e\x67\x74\x68'],0x0))throw new a0_0x54c689(_0x12efcd[_0x41ec9d(0x25c)]);assertUniqueMachineIds(_0x51e86a[_0x41ec9d(0x307)]),_0x12efcd[_0x41ec9d(0x306)](assertNoReservedMetadata,_0x51e86a['\x6d\x65\x74\x61\x64\x61\x74\x61'],_0x41ec9d(0x2aa));for(const _0x53aab7 of _0x51e86a['\x6d\x61\x63\x68\x69\x6e\x65\x73'])assertNoReservedMetadata(_0x53aab7[_0x41ec9d(0x273)],_0x41ec9d(0x2ff)+_0x53aab7[_0x41ec9d(0x1f3)]+'\x27');assertPolicy(_0x51e86a[_0x41ec9d(0x307)],_0x51e86a[_0x41ec9d(0x260)],_0x51e86a[_0x41ec9d(0x342)]);const _0x43a16e=resolveMaxConcurrentCreates(_0x51e86a[_0x41ec9d(0x340)]);if(_0x51e86a[_0x41ec9d(0x342)]?.[_0x41ec9d(0x340)]!==void 0x0&&_0x12efcd[_0x41ec9d(0x1af)](_0x43a16e,_0x51e86a[_0x41ec9d(0x342)][_0x41ec9d(0x340)]))throw new a0_0x54c689(_0x41ec9d(0x124)+_0x43a16e+_0x41ec9d(0x30d)+_0x51e86a[_0x41ec9d(0x342)]['\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73'],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73':_0x41ec9d(0x22b)});if(_0x12efcd['\x71\x5a\x65\x79\x63'](_0x51e86a[_0x41ec9d(0x342)]?.[_0x41ec9d(0x2a8)],void 0x0)){const _0x53bcaa=await this[_0x41ec9d(0x2a6)]({'\x64\x65\x66\x61\x75\x6c\x74\x73':_0x51e86a[_0x41ec9d(0x260)],'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x51e86a[_0x41ec9d(0x307)],'\x70\x6f\x6c\x69\x63\x79':_0x51e86a[_0x41ec9d(0x342)],'\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73':_0x43a16e});if(_0x53bcaa[_0x41ec9d(0x23a)]>_0x51e86a[_0x41ec9d(0x342)][_0x41ec9d(0x2a8)])throw new a0_0x54c689(_0x41ec9d(0x227)+_0x53bcaa[_0x41ec9d(0x23a)]+_0x41ec9d(0x363)+_0x51e86a[_0x41ec9d(0x342)][_0x41ec9d(0x2a8)],{'\x70\x6f\x6c\x69\x63\x79\x2e\x6d\x61\x78\x53\x70\x65\x6e\x64\x55\x73\x64':_0x41ec9d(0x22b)});}const _0x44a1d0=[];try{for(let _0x50e9f3=0x0;_0x12efcd['\x75\x41\x78\x69\x68'](_0x50e9f3,_0x51e86a[_0x41ec9d(0x307)][_0x41ec9d(0x23f)]);_0x50e9f3+=_0x43a16e){const _0x3e81b7=_0x51e86a[_0x41ec9d(0x307)][_0x41ec9d(0x1e2)](_0x50e9f3,_0x50e9f3+_0x43a16e),_0x35283d=await Promise[_0x41ec9d(0x324)](_0x3e81b7[_0x41ec9d(0x249)](_0x1b68c9=>this[_0x41ec9d(0x364)](_0x1cd5cf,_0x1b68c9,_0x51e86a))),_0x2e101d=_0x35283d[_0x41ec9d(0x16d)](_0x10e49b=>_0x10e49b[_0x41ec9d(0x1ca)]===_0x41ec9d(0x24d));for(const _0x54d04d of _0x35283d)if(_0x54d04d['\x73\x74\x61\x74\x75\x73']===_0x41ec9d(0x1a8))_0x44a1d0[_0x41ec9d(0x336)](_0x54d04d['\x76\x61\x6c\x75\x65']);if(_0x2e101d)throw _0x2e101d['\x72\x65\x61\x73\x6f\x6e'];}}catch(_0x3ddf66){if(_0x51e86a[_0x41ec9d(0x25a)]!==![])await Promise[_0x41ec9d(0x324)](_0x44a1d0[_0x41ec9d(0x249)](async _0x434c26=>{const _0x4ca4e1=_0x41ec9d;await(await this[_0x4ca4e1(0x2bf)][_0x4ca4e1(0x17f)](_0x434c26[_0x4ca4e1(0x321)]['\x69\x64']))?.[_0x4ca4e1(0x1f4)]();}));throw _0x3ddf66;}try{await this[_0x41ec9d(0x1d9)](_0x1cd5cf,_0x44a1d0,_0x51e86a);}catch(_0x2eaa51){if(_0x51e86a[_0x41ec9d(0x25a)]!==![])await Promise['\x61\x6c\x6c\x53\x65\x74\x74\x6c\x65\x64'](_0x44a1d0[_0x41ec9d(0x249)](async _0x4569f6=>{const _0x2f645b=_0x41ec9d;await(await this[_0x2f645b(0x2bf)]['\x67\x65\x74'](_0x4569f6['\x73\x61\x6e\x64\x62\x6f\x78']['\x69\x64']))?.[_0x2f645b(0x1f4)]();}));throw _0x2eaa51;}return this[_0x41ec9d(0x238)]({'\x66\x6c\x65\x65\x74\x49\x64':_0x1cd5cf,'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x44a1d0});}async[a0_0x314c3e(0x132)](_0x4da378){const _0xd0a11a=a0_0x314c3e,_0x2bcba4={'\x44\x4a\x4a\x77\x64':_0xd0a11a(0x367)},{coordinator:_0xfd5ed9,workers:_0x10f718,..._0x5054b4}=_0x4da378,_0x3d1ba9={..._0xfd5ed9,'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0xfd5ed9?.[_0xd0a11a(0x1f3)]??_0xd0a11a(0x367),'\x72\x6f\x6c\x65':_0x2bcba4['\x44\x4a\x4a\x77\x64']};return this[_0xd0a11a(0x200)]({..._0x5054b4,'\x6d\x61\x63\x68\x69\x6e\x65\x73':[_0x3d1ba9,..._0x10f718[_0xd0a11a(0x249)](_0x24936d=>({..._0x24936d,'\x72\x6f\x6c\x65':_0x24936d['\x72\x6f\x6c\x65']??_0xd0a11a(0x189)}))]});}async['\x63\x72\x65\x61\x74\x65\x4d\x61\x63\x68\x69\x6e\x65'](_0x4fefc3,_0x5c5f61,_0x442b32){const _0xd96c40=a0_0x314c3e,_0x41ba61={'\x47\x64\x58\x73\x42':_0xd96c40(0x274),'\x65\x49\x64\x75\x69':function(_0x1a3302,_0x5a83d9){return _0x1a3302(_0x5a83d9);}},_0x1c1b88=mergeCreateOptions(_0x442b32[_0xd96c40(0x260)],_0x5c5f61),_0x259eb7=await this['\x63\x6c\x69\x65\x6e\x74']['\x63\x72\x65\x61\x74\x65']({..._0x1c1b88,'\x6e\x61\x6d\x65':_0x5c5f61[_0xd96c40(0x242)]??_0x4fefc3+'\x2d'+_0x5c5f61['\x6d\x61\x63\x68\x69\x6e\x65\x49\x64'],'\x6d\x61\x78\x4c\x69\x66\x65\x74\x69\x6d\x65\x53\x65\x63\x6f\x6e\x64\x73':_0x1c1b88[_0xd96c40(0x1b6)]??DEFAULT_MACHINE_LIFETIME_SECONDS,'\x6d\x65\x74\x61\x64\x61\x74\x61':{..._0x442b32[_0xd96c40(0x273)],..._0x5c5f61[_0xd96c40(0x273)],[FLEET_ID_META]:_0x4fefc3,[MACHINE_ID_META]:_0x5c5f61[_0xd96c40(0x1f3)],[MACHINE_ROLE_META]:_0x5c5f61[_0xd96c40(0x126)]??_0xd96c40(0x189),[FLEET_CREATED_BY_META]:_0x41ba61[_0xd96c40(0x346)],..._0x41ba61[_0xd96c40(0x239)](workspaceMetadata,_0x442b32[_0xd96c40(0x269)])}});return{'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0x5c5f61[_0xd96c40(0x1f3)],'\x73\x61\x6e\x64\x62\x6f\x78':_0x259eb7[_0xd96c40(0x1ed)](),'\x72\x6f\x6c\x65':_0x5c5f61[_0xd96c40(0x126)]};}async[a0_0x314c3e(0x265)](_0x30bc85){const _0x26a792=a0_0x314c3e;assertSafeId(_0x30bc85[_0x26a792(0x294)],'\x66\x6c\x65\x65\x74\x49\x64');const _0x3920b7=await this['\x67\x65\x74\x53\x65\x72\x76\x65\x72\x46\x6c\x65\x65\x74'](_0x30bc85[_0x26a792(0x294)]);if(_0x3920b7)return this[_0x26a792(0x238)](await this[_0x26a792(0x193)](_0x3920b7,_0x30bc85));return this[_0x26a792(0x2e2)](_0x30bc85);}async[a0_0x314c3e(0x1f4)](_0x20b365,_0x283d70){const _0x2bd065=a0_0x314c3e;await(await this['\x6c\x69\x73\x74']({..._0x283d70,'\x66\x6c\x65\x65\x74\x49\x64':_0x20b365}))[_0x2bd065(0x1f4)]({'\x63\x6f\x6e\x74\x69\x6e\x75\x65\x4f\x6e\x45\x72\x72\x6f\x72':_0x283d70?.[_0x2bd065(0x300)]});}[a0_0x314c3e(0x238)](_0x5d40f0){const _0x241b0f=a0_0x314c3e,_0x20b239=new Map();for(const _0x4705d3 of _0x5d40f0['\x6d\x61\x63\x68\x69\x6e\x65\x73'])_0x20b239[_0x241b0f(0x207)](_0x4705d3[_0x241b0f(0x1f3)],_0x4705d3[_0x241b0f(0x321)]);return new SandboxFleet(this[_0x241b0f(0x2bf)],_0x5d40f0[_0x241b0f(0x294)],_0x20b239);}async[a0_0x314c3e(0x1d9)](_0x2982a5,_0x2e1ef4,_0x55f63f){const _0x10104a=a0_0x314c3e,_0x1eebf2={'\x4a\x69\x78\x44\x6a':function(_0x468f7f,_0x5aed93,_0x45d18d){return _0x468f7f(_0x5aed93,_0x45d18d);}},_0x4d7b98=await this[_0x10104a(0x2bf)][_0x10104a(0x365)](_0x10104a(0x20e),{'\x6d\x65\x74\x68\x6f\x64':_0x10104a(0x17e),'\x68\x65\x61\x64\x65\x72\x73':{'\x49\x64\x65\x6d\x70\x6f\x74\x65\x6e\x63\x79\x2d\x4b\x65\x79':_0x55f63f[_0x10104a(0x120)]??_0x2982a5},'\x62\x6f\x64\x79':JSON[_0x10104a(0x232)]({'\x69\x64':_0x2982a5,'\x6d\x65\x74\x61\x64\x61\x74\x61':{..._0x55f63f['\x6d\x65\x74\x61\x64\x61\x74\x61'],...workspaceMetadata(_0x55f63f[_0x10104a(0x269)])},'\x77\x6f\x72\x6b\x73\x70\x61\x63\x65':_0x55f63f[_0x10104a(0x269)],'\x70\x6f\x6c\x69\x63\x79':_0x55f63f['\x70\x6f\x6c\x69\x63\x79'],'\x72\x65\x73\x6f\x75\x72\x63\x65\x73':_0x1eebf2[_0x10104a(0x26a)](calculateResourceTotals,_0x55f63f[_0x10104a(0x307)],_0x55f63f[_0x10104a(0x260)]),'\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x43\x72\x65\x61\x74\x65\x73':_0x55f63f[_0x10104a(0x340)],'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x2e1ef4[_0x10104a(0x249)](_0x5d3315=>({'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0x5d3315[_0x10104a(0x1f3)],'\x73\x61\x6e\x64\x62\x6f\x78\x49\x64':_0x5d3315[_0x10104a(0x321)]['\x69\x64'],'\x73\x74\x61\x74\x75\x73':_0x5d3315[_0x10104a(0x321)][_0x10104a(0x1ca)],'\x72\x6f\x6c\x65':_0x5d3315[_0x10104a(0x126)],...getMachineDescriptor(_0x55f63f,_0x5d3315['\x6d\x61\x63\x68\x69\x6e\x65\x49\x64'])}))})});if(!_0x4d7b98['\x6f\x6b']){const _0x1e124d=await _0x4d7b98['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x4d7b98['\x73\x74\x61\x74\x75\x73'],_0x1e124d,void 0x0,_0x4d7b98[_0x10104a(0x2e8)]);}}async[a0_0x314c3e(0x1ba)](_0x378c6f){const _0x28e953=a0_0x314c3e,_0x1b5dba={'\x76\x55\x48\x45\x78':function(_0xaf352d,_0x507e9e){return _0xaf352d===_0x507e9e;}},_0x165a30=await this[_0x28e953(0x2bf)][_0x28e953(0x365)](_0x28e953(0x145)+_0x378c6f);if(_0x1b5dba['\x76\x55\x48\x45\x78'](_0x165a30['\x73\x74\x61\x74\x75\x73'],0x194))return null;if(!_0x165a30['\x6f\x6b']){const _0x58981c=await _0x165a30[_0x28e953(0x142)]();throw a0_0x4a887c(_0x165a30[_0x28e953(0x1ca)],_0x58981c,void 0x0,_0x165a30[_0x28e953(0x2e8)]);}return(await _0x165a30[_0x28e953(0x32a)]())[_0x28e953(0x308)]??null;}async['\x64\x65\x6c\x65\x74\x65\x52\x65\x63\x6f\x72\x64'](_0x14774b){const _0x4446f9=a0_0x314c3e,_0x29fbab={'\x57\x73\x4f\x66\x50':function(_0x2a7a9b,_0x53dfa9,_0x4ce0dc){return _0x2a7a9b(_0x53dfa9,_0x4ce0dc);},'\x71\x4e\x45\x43\x54':function(_0xa98fe8,_0xb95bc2){return _0xa98fe8===_0xb95bc2;},'\x63\x6b\x46\x48\x6a':function(_0x49eb77,_0x574df6,_0x21188f,_0x558a58,_0x276136){return _0x49eb77(_0x574df6,_0x21188f,_0x558a58,_0x276136);}};_0x29fbab[_0x4446f9(0x212)](assertSafeId,_0x14774b,'\x66\x6c\x65\x65\x74\x49\x64');const _0x38320d=await this[_0x4446f9(0x2bf)][_0x4446f9(0x365)](_0x4446f9(0x145)+_0x14774b,{'\x6d\x65\x74\x68\x6f\x64':'\x44\x45\x4c\x45\x54\x45'});if(_0x29fbab[_0x4446f9(0x2d2)](_0x38320d[_0x4446f9(0x1ca)],0x194))return;if(!_0x38320d['\x6f\x6b']){const _0x3f63f7=await _0x38320d['\x74\x65\x78\x74']();throw _0x29fbab[_0x4446f9(0x31a)](a0_0x4a887c,_0x38320d[_0x4446f9(0x1ca)],_0x3f63f7,void 0x0,_0x38320d[_0x4446f9(0x2e8)]);}}async[a0_0x314c3e(0x140)](_0x4b5c11){const _0x2371ef=a0_0x314c3e,_0x31fbc9={'\x46\x6f\x46\x63\x7a':function(_0x3bffb9,_0x21cbdf,_0x131c20){return _0x3bffb9(_0x21cbdf,_0x131c20);},'\x73\x69\x4d\x65\x50':function(_0x277b15,_0x352fea,_0x145f2e,_0xe33e9c,_0x15ae1c){return _0x277b15(_0x352fea,_0x145f2e,_0xe33e9c,_0x15ae1c);}};_0x31fbc9[_0x2371ef(0x33a)](assertSafeId,_0x4b5c11,_0x2371ef(0x294));const _0x56b1db=await this['\x63\x6c\x69\x65\x6e\x74'][_0x2371ef(0x365)](_0x2371ef(0x145)+_0x4b5c11+_0x2371ef(0x230));if(!_0x56b1db['\x6f\x6b']){const _0xe3f7bb=await _0x56b1db[_0x2371ef(0x142)]();throw _0x31fbc9[_0x2371ef(0x369)](a0_0x4a887c,_0x56b1db[_0x2371ef(0x1ca)],_0xe3f7bb,void 0x0,_0x56b1db[_0x2371ef(0x2e8)]);}return await _0x56b1db['\x6a\x73\x6f\x6e']();}async['\x74\x72\x61\x63\x65'](_0x1a7a5c,_0x40502a={}){const _0x195c13=a0_0x314c3e,_0x58c7c1={'\x41\x6d\x52\x47\x54':function(_0x630735,_0x4a49b4,_0x12bfa2,_0x14f64b,_0x9122f2){return _0x630735(_0x4a49b4,_0x12bfa2,_0x14f64b,_0x9122f2);}};assertSafeId(_0x1a7a5c,'\x66\x6c\x65\x65\x74\x49\x64');const _0x280f54=new URLSearchParams();if(_0x40502a['\x69\x6e\x63\x6c\x75\x64\x65\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65']===!![])_0x280f54['\x73\x65\x74'](_0x195c13(0x24b),_0x195c13(0x32b));const _0x52c74f=await this[_0x195c13(0x2bf)][_0x195c13(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+_0x1a7a5c+_0x195c13(0x2b1)+(_0x280f54[_0x195c13(0x169)]?'\x3f'+_0x280f54:''));if(!_0x52c74f['\x6f\x6b']){const _0x2d20e2=await _0x52c74f[_0x195c13(0x142)]();throw _0x58c7c1['\x41\x6d\x52\x47\x54'](a0_0x4a887c,_0x52c74f[_0x195c13(0x1ca)],_0x2d20e2,void 0x0,_0x52c74f[_0x195c13(0x2e8)]);}return await _0x52c74f[_0x195c13(0x32a)]();}async[a0_0x314c3e(0x1d5)](_0x1256ff){const _0x5cc919=a0_0x314c3e,_0x3f9896={'\x57\x5a\x76\x42\x7a':_0x5cc919(0x1a5)},_0x2c6ed7=(await this[_0x5cc919(0x139)](_0x1256ff,{'\x69\x6e\x63\x6c\x75\x64\x65\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65':!![]}))['\x69\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65'];if(!_0x2c6ed7)throw new Error(_0x3f9896['\x57\x5a\x76\x42\x7a']);return _0x2c6ed7;}async['\x63\x72\x65\x61\x74\x65\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65\x52\x65\x70\x6f\x72\x74'](_0x31003c,_0xe5546f={}){const _0xeb2b09=a0_0x314c3e;return this[_0xeb2b09(0x2bf)]['\x69\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65']['\x63\x72\x65\x61\x74\x65\x52\x65\x70\x6f\x72\x74']({'\x73\x75\x62\x6a\x65\x63\x74':{'\x74\x79\x70\x65':_0xeb2b09(0x308),'\x69\x64':_0x31003c},..._0xe5546f});}async[a0_0x314c3e(0x22c)](_0xbb5a48,_0x5314ec){const _0x8d15e1=a0_0x314c3e;return this[_0x8d15e1(0x1d1)](_0xbb5a48,{'\x6d\x6f\x64\x65':_0x8d15e1(0x15a),'\x62\x75\x64\x67\x65\x74':{'\x62\x69\x6c\x6c\x54\x6f':_0x8d15e1(0x331),'\x6d\x61\x78\x55\x73\x64':_0x5314ec[_0x8d15e1(0x153)]},'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x5314ec[_0x8d15e1(0x273)]});}async[a0_0x314c3e(0x1eb)](_0x359b33,_0x5adb86){return a0_0x7ec8bc(await this['\x74\x72\x61\x63\x65'](_0x359b33),_0x5adb86);}async['\x63\x6f\x73\x74'](_0x1b1424){const _0x485580=a0_0x314c3e,_0x2a1154={'\x73\x47\x6c\x42\x4f':function(_0x4623e5,_0x310275,_0x15bd96){return _0x4623e5(_0x310275,_0x15bd96);},'\x56\x6c\x49\x67\x71':function(_0x3202e6,_0x5a7b77,_0x1aff1e,_0x5bba1e,_0x41e741){return _0x3202e6(_0x5a7b77,_0x1aff1e,_0x5bba1e,_0x41e741);}};_0x2a1154[_0x485580(0x2a5)](assertSafeId,_0x1b1424,_0x485580(0x294));const _0x1ad521=await this[_0x485580(0x2bf)][_0x485580(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+_0x1b1424+_0x485580(0x21f));if(!_0x1ad521['\x6f\x6b']){const _0x26896e=await _0x1ad521[_0x485580(0x142)]();throw _0x2a1154[_0x485580(0x127)](a0_0x4a887c,_0x1ad521[_0x485580(0x1ca)],_0x26896e,void 0x0,_0x1ad521[_0x485580(0x2e8)]);}return(await _0x1ad521[_0x485580(0x32a)]())[_0x485580(0x179)];}async[a0_0x314c3e(0x196)](_0xa215d,_0x5936e8){const _0x38ed06=a0_0x314c3e;assertSafeId(_0xa215d,'\x66\x6c\x65\x65\x74\x49\x64');const _0x53a1ed=await this[_0x38ed06(0x2bf)][_0x38ed06(0x365)](_0x38ed06(0x145)+_0xa215d+_0x38ed06(0x268),{'\x6d\x65\x74\x68\x6f\x64':'\x50\x4f\x53\x54','\x62\x6f\x64\x79':JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79'](_0x5936e8??{})});if(!_0x53a1ed['\x6f\x6b']){const _0x5e2f71=await _0x53a1ed[_0x38ed06(0x142)]();throw a0_0x4a887c(_0x53a1ed[_0x38ed06(0x1ca)],_0x5e2f71,void 0x0,_0x53a1ed[_0x38ed06(0x2e8)]);}return await _0x53a1ed['\x6a\x73\x6f\x6e']();}async['\x6d\x61\x6e\x69\x66\x65\x73\x74'](_0x17494f){const _0x2a7ea5=a0_0x314c3e,_0x41e7ee={'\x48\x71\x4d\x4a\x54':function(_0x4e8184,_0x6f64e0,_0x13b9a7){return _0x4e8184(_0x6f64e0,_0x13b9a7);}};_0x41e7ee[_0x2a7ea5(0x182)](assertSafeId,_0x17494f,_0x2a7ea5(0x294));const _0x48f5da=await this['\x63\x6c\x69\x65\x6e\x74'][_0x2a7ea5(0x365)](_0x2a7ea5(0x145)+_0x17494f+_0x2a7ea5(0x35f));if(!_0x48f5da['\x6f\x6b']){const _0x4b712e=await _0x48f5da[_0x2a7ea5(0x142)]();throw a0_0x4a887c(_0x48f5da[_0x2a7ea5(0x1ca)],_0x4b712e,void 0x0,_0x48f5da['\x68\x65\x61\x64\x65\x72\x73']);}return await _0x48f5da[_0x2a7ea5(0x32a)]();}async[a0_0x314c3e(0x29e)](_0x18e13d,_0x56c9d0){const _0x2c1c53=a0_0x314c3e,_0x28a9e8={'\x77\x45\x4d\x66\x54':function(_0x483a1d,_0x1c0aaa,_0x775ded){return _0x483a1d(_0x1c0aaa,_0x775ded);},'\x54\x44\x64\x46\x52':_0x2c1c53(0x1f3)};assertSafeId(_0x18e13d,_0x2c1c53(0x294)),_0x28a9e8[_0x2c1c53(0x28e)](assertSafeId,_0x56c9d0['\x6d\x61\x63\x68\x69\x6e\x65\x49\x64'],_0x28a9e8[_0x2c1c53(0x30c)]);const _0x1337e4=await this[_0x2c1c53(0x2bf)][_0x2c1c53(0x365)](_0x2c1c53(0x145)+_0x18e13d+_0x2c1c53(0x1db),{'\x6d\x65\x74\x68\x6f\x64':_0x2c1c53(0x17e),'\x62\x6f\x64\x79':JSON[_0x2c1c53(0x232)](_0x56c9d0)});if(!_0x1337e4['\x6f\x6b']){const _0x4db8e0=await _0x1337e4['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x1337e4['\x73\x74\x61\x74\x75\x73'],_0x4db8e0,void 0x0,_0x1337e4[_0x2c1c53(0x2e8)]);}return(await _0x1337e4['\x6a\x73\x6f\x6e']())[_0x2c1c53(0x1b3)];}async['\x64\x65\x74\x61\x63\x68\x4d\x61\x63\x68\x69\x6e\x65'](_0x141d20,_0x12245f){const _0x52a030=a0_0x314c3e,_0x1e5f25={'\x4d\x66\x6d\x6b\x4f':_0x52a030(0x144)};assertSafeId(_0x141d20,'\x66\x6c\x65\x65\x74\x49\x64'),assertSafeId(_0x12245f,_0x52a030(0x1f3));const _0x46e500=await this['\x63\x6c\x69\x65\x6e\x74'][_0x52a030(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+_0x141d20+_0x52a030(0x194)+encodeURIComponent(_0x12245f),{'\x6d\x65\x74\x68\x6f\x64':_0x1e5f25['\x4d\x66\x6d\x6b\x4f']});if(!_0x46e500['\x6f\x6b']){const _0x182710=await _0x46e500['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x46e500['\x73\x74\x61\x74\x75\x73'],_0x182710,void 0x0,_0x46e500[_0x52a030(0x2e8)]);}return await _0x46e500['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x2ef)](_0x9d4313,_0x18854f,_0x577952){const _0x3b6429=a0_0x314c3e,_0xed615={'\x4b\x55\x59\x75\x52':function(_0x4f3e2c,_0x4b82b5,_0x26a015){return _0x4f3e2c(_0x4b82b5,_0x26a015);},'\x63\x51\x53\x63\x6b':function(_0x4c3384,_0x16cb25,_0x2ceb2b,_0x4a1e6b,_0xf68544){return _0x4c3384(_0x16cb25,_0x2ceb2b,_0x4a1e6b,_0xf68544);}};_0xed615[_0x3b6429(0x1a7)](assertSafeId,_0x9d4313,_0x3b6429(0x294)),assertSafeId(_0x18854f,_0x3b6429(0x1f6));const _0x1931fd=await this[_0x3b6429(0x2bf)][_0x3b6429(0x365)](dispatchResultsPath(_0x9d4313,_0x18854f,_0x577952));if(!_0x1931fd['\x6f\x6b']){const _0x4b42bf=await _0x1931fd[_0x3b6429(0x142)]();throw _0xed615[_0x3b6429(0x160)](a0_0x4a887c,_0x1931fd[_0x3b6429(0x1ca)],_0x4b42bf,void 0x0,_0x1931fd[_0x3b6429(0x2e8)]);}return await _0x1931fd['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x20c)](_0x4c5fec,_0x4ced02,_0x7fc0b6){const _0x261913=a0_0x314c3e,_0x340810={'\x52\x67\x72\x75\x59':_0x261913(0x1f6),'\x43\x62\x4f\x71\x67':function(_0x224c21,_0x4d3bb2){return _0x224c21(_0x4d3bb2);},'\x79\x49\x4a\x70\x52':_0x261913(0x17e)};assertSafeId(_0x4c5fec,_0x261913(0x294)),assertSafeId(_0x4ced02,_0x340810[_0x261913(0x2c4)]);const _0x18e221=await this[_0x261913(0x2bf)][_0x261913(0x365)](_0x261913(0x145)+_0x4c5fec+_0x261913(0x2bd)+_0x340810['\x43\x62\x4f\x71\x67'](encodeURIComponent,_0x4ced02)+'\x2f\x63\x61\x6e\x63\x65\x6c',{'\x6d\x65\x74\x68\x6f\x64':_0x340810[_0x261913(0x1b1)],'\x62\x6f\x64\x79':JSON[_0x261913(0x232)](_0x7fc0b6?{'\x72\x65\x61\x73\x6f\x6e':_0x7fc0b6}:{})});if(!_0x18e221['\x6f\x6b']){const _0x1e854=await _0x18e221['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x18e221[_0x261913(0x1ca)],_0x1e854,void 0x0,_0x18e221[_0x261913(0x2e8)]);}return await _0x18e221['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x1f2)](_0x1c2ce9){const _0x2ba0d2=a0_0x314c3e,_0x3adff6={'\x48\x5a\x54\x69\x52':_0x2ba0d2(0x17e),'\x59\x73\x75\x74\x43':function(_0x495690,_0x40018f,_0x446a4a,_0x4b656d,_0x5d13a0){return _0x495690(_0x40018f,_0x446a4a,_0x4b656d,_0x5d13a0);}};assertSafeId(_0x1c2ce9,'\x66\x6c\x65\x65\x74\x49\x64');const _0x11f5f6=await this[_0x2ba0d2(0x2bf)][_0x2ba0d2(0x365)]('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+_0x1c2ce9+_0x2ba0d2(0x176),{'\x6d\x65\x74\x68\x6f\x64':_0x3adff6[_0x2ba0d2(0x313)]});if(!_0x11f5f6['\x6f\x6b']){const _0x3356da=await _0x11f5f6[_0x2ba0d2(0x142)]();throw _0x3adff6[_0x2ba0d2(0x214)](a0_0x4a887c,_0x11f5f6[_0x2ba0d2(0x1ca)],_0x3356da,void 0x0,_0x11f5f6[_0x2ba0d2(0x2e8)]);}return await _0x11f5f6[_0x2ba0d2(0x32a)]();}async[a0_0x314c3e(0x18e)](_0x3c0618,_0x5ada7f){const _0x3ae932=a0_0x314c3e,_0x5cd0da={'\x6b\x67\x57\x43\x56':function(_0x2d6f98,_0x311f0d,_0x189527){return _0x2d6f98(_0x311f0d,_0x189527);},'\x66\x4d\x69\x51\x77':function(_0xf9a5fc,_0x29add3){return _0xf9a5fc(_0x29add3);}};_0x5cd0da['\x6b\x67\x57\x43\x56'](assertSafeId,_0x3c0618,_0x3ae932(0x294));const _0x253ef4=await this[_0x3ae932(0x2bf)]['\x66\x65\x74\x63\x68'](_0x3ae932(0x145)+_0x3c0618+'\x2f\x77\x6f\x72\x6b\x73\x70\x61\x63\x65\x2f\x73\x6e\x61\x70\x73\x68\x6f\x74\x73\x2f'+_0x5cd0da[_0x3ae932(0x1d3)](encodeURIComponent,_0x5ada7f)+_0x3ae932(0x2fc),{'\x6d\x65\x74\x68\x6f\x64':'\x50\x4f\x53\x54'});if(!_0x253ef4['\x6f\x6b']){const _0x37b721=await _0x253ef4[_0x3ae932(0x142)]();throw a0_0x4a887c(_0x253ef4[_0x3ae932(0x1ca)],_0x37b721,void 0x0,_0x253ef4[_0x3ae932(0x2e8)]);}return await _0x253ef4[_0x3ae932(0x32a)]();}async['\x72\x65\x63\x6f\x6e\x63\x69\x6c\x65\x57\x6f\x72\x6b\x73\x70\x61\x63\x65'](_0x2d8810){const _0x1cea89=a0_0x314c3e,_0x42b5b0={'\x64\x54\x6f\x78\x57':function(_0x388827,_0x34cc7a,_0x165a43){return _0x388827(_0x34cc7a,_0x165a43);},'\x50\x6c\x6f\x6a\x67':_0x1cea89(0x294),'\x6f\x77\x4a\x44\x45':_0x1cea89(0x17e),'\x55\x74\x41\x6e\x71':function(_0x4edd3,_0x36e779,_0x2fc38f,_0x489195,_0x4ebf3f){return _0x4edd3(_0x36e779,_0x2fc38f,_0x489195,_0x4ebf3f);}};_0x42b5b0[_0x1cea89(0x318)](assertSafeId,_0x2d8810,_0x42b5b0[_0x1cea89(0x33e)]);const _0x3c3dda=await this[_0x1cea89(0x2bf)][_0x1cea89(0x365)](_0x1cea89(0x145)+_0x2d8810+'\x2f\x77\x6f\x72\x6b\x73\x70\x61\x63\x65\x2f\x72\x65\x63\x6f\x6e\x63\x69\x6c\x65',{'\x6d\x65\x74\x68\x6f\x64':_0x42b5b0[_0x1cea89(0x35b)]});if(!_0x3c3dda['\x6f\x6b']){const _0x5a8f6e=await _0x3c3dda[_0x1cea89(0x142)]();throw _0x42b5b0[_0x1cea89(0x2ec)](a0_0x4a887c,_0x3c3dda[_0x1cea89(0x1ca)],_0x5a8f6e,void 0x0,_0x3c3dda['\x68\x65\x61\x64\x65\x72\x73']);}return await _0x3c3dda[_0x1cea89(0x32a)]();}async*[a0_0x314c3e(0x1d2)](_0x5ac351,_0xe1f86a,_0x52dafd){const _0x16f803=a0_0x314c3e,_0x49ff95={'\x57\x63\x79\x6b\x4f':function(_0xf6d17f,_0x48a24c,_0x1eca9d){return _0xf6d17f(_0x48a24c,_0x1eca9d);},'\x4e\x58\x69\x6d\x45':_0x16f803(0x294)};_0x49ff95[_0x16f803(0x18b)](assertSafeId,_0x5ac351,_0x49ff95[_0x16f803(0x221)]);const _0x13a2cf=await this['\x63\x6c\x69\x65\x6e\x74']['\x66\x65\x74\x63\x68']('\x2f\x76\x31\x2f\x66\x6c\x65\x65\x74\x73\x2f'+_0x5ac351+_0x16f803(0x1bc),{'\x6d\x65\x74\x68\x6f\x64':_0x16f803(0x17e),'\x68\x65\x61\x64\x65\x72\x73':{'\x41\x63\x63\x65\x70\x74':'\x74\x65\x78\x74\x2f\x65\x76\x65\x6e\x74\x2d\x73\x74\x72\x65\x61\x6d'},'\x73\x69\x67\x6e\x61\x6c':_0x52dafd?.['\x73\x69\x67\x6e\x61\x6c'],'\x62\x6f\x64\x79':JSON[_0x16f803(0x232)](execDispatchBody(_0xe1f86a,_0x52dafd))});if(!_0x13a2cf['\x6f\x6b']){const _0x418168=await _0x13a2cf[_0x16f803(0x142)]();throw a0_0x4a887c(_0x13a2cf['\x73\x74\x61\x74\x75\x73'],_0x418168,void 0x0,_0x13a2cf[_0x16f803(0x2e8)]);}yield*a0_0x293e9f(_0x13a2cf[_0x16f803(0x325)],{'\x73\x69\x67\x6e\x61\x6c':_0x52dafd?.[_0x16f803(0x2a9)]});}async*['\x64\x69\x73\x70\x61\x74\x63\x68\x50\x72\x6f\x6d\x70\x74\x53\x74\x72\x65\x61\x6d'](_0x2d0237,_0x5616f4,_0x4f5bc1){const _0x29d59d=a0_0x314c3e,_0x25d968={'\x4f\x4d\x7a\x74\x6d':'\x66\x6c\x65\x65\x74\x49\x64','\x58\x66\x75\x4e\x71':function(_0x64e2ef,_0x5b6ab0,_0x464df0){return _0x64e2ef(_0x5b6ab0,_0x464df0);},'\x76\x6d\x72\x71\x64':function(_0x4623ba,_0x5612ec,_0x1e9bb1,_0x345fc8,_0x11986a){return _0x4623ba(_0x5612ec,_0x1e9bb1,_0x345fc8,_0x11986a);}};assertSafeId(_0x2d0237,_0x25d968['\x4f\x4d\x7a\x74\x6d']);const _0x3f6caa=await this[_0x29d59d(0x2bf)][_0x29d59d(0x365)](_0x29d59d(0x145)+_0x2d0237+_0x29d59d(0x1bc),{'\x6d\x65\x74\x68\x6f\x64':'\x50\x4f\x53\x54','\x68\x65\x61\x64\x65\x72\x73':{'\x41\x63\x63\x65\x70\x74':_0x29d59d(0x13f)},'\x73\x69\x67\x6e\x61\x6c':_0x4f5bc1?.[_0x29d59d(0x2a9)],'\x62\x6f\x64\x79':JSON[_0x29d59d(0x232)](_0x25d968['\x58\x66\x75\x4e\x71'](promptDispatchBody,_0x5616f4,_0x4f5bc1))});if(!_0x3f6caa['\x6f\x6b']){const _0x1cadde=await _0x3f6caa[_0x29d59d(0x142)]();throw _0x25d968[_0x29d59d(0x1b9)](a0_0x4a887c,_0x3f6caa[_0x29d59d(0x1ca)],_0x1cadde,void 0x0,_0x3f6caa[_0x29d59d(0x2e8)]);}yield*_0x25d968[_0x29d59d(0x330)](a0_0x293e9f,_0x3f6caa[_0x29d59d(0x325)],{'\x73\x69\x67\x6e\x61\x6c':_0x4f5bc1?.[_0x29d59d(0x2a9)]});}async['\x72\x65\x61\x70\x45\x78\x70\x69\x72\x65\x64'](_0xcf1882){const _0x1c2dec=a0_0x314c3e,_0x24c347={'\x71\x4b\x53\x6e\x74':'\x50\x4f\x53\x54'},_0x4cfeb7=await this[_0x1c2dec(0x2bf)]['\x66\x65\x74\x63\x68'](_0x1c2dec(0x164),{'\x6d\x65\x74\x68\x6f\x64':_0x24c347['\x71\x4b\x53\x6e\x74'],'\x62\x6f\x64\x79':JSON[_0x1c2dec(0x232)](_0xcf1882??{})});if(!_0x4cfeb7['\x6f\x6b']){const _0x5376ff=await _0x4cfeb7[_0x1c2dec(0x142)]();throw a0_0x4a887c(_0x4cfeb7[_0x1c2dec(0x1ca)],_0x5376ff,void 0x0,_0x4cfeb7['\x68\x65\x61\x64\x65\x72\x73']);}return await _0x4cfeb7[_0x1c2dec(0x32a)]();}async[a0_0x314c3e(0x193)](_0x1bb5a8,_0x1ffc65){const _0x32043b=a0_0x314c3e,_0x5ce8fe={'\x53\x66\x62\x59\x59':_0x32043b(0x31c)},_0x2c13e9=await Promise[_0x32043b(0x143)](_0x1bb5a8[_0x32043b(0x307)][_0x32043b(0x249)](async _0x2160ef=>{const _0x1950b6=_0x32043b,_0x767536=await this['\x63\x6c\x69\x65\x6e\x74'][_0x1950b6(0x17f)](_0x2160ef[_0x1950b6(0x2f4)]);if(!_0x767536)throw new a0_0x54c689(_0x1950b6(0x2ff)+_0x2160ef[_0x1950b6(0x1f3)]+'\x27\x20\x70\x6f\x69\x6e\x74\x73\x20\x61\x74\x20\x6d\x69\x73\x73\x69\x6e\x67\x20\x73\x61\x6e\x64\x62\x6f\x78\x20\x27'+_0x2160ef[_0x1950b6(0x2f4)]+'\x27',{'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0x5ce8fe[_0x1950b6(0x1d0)]});return{'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0x2160ef['\x6d\x61\x63\x68\x69\x6e\x65\x49\x64'],'\x73\x61\x6e\x64\x62\x6f\x78':_0x767536[_0x1950b6(0x1ed)](),'\x72\x6f\x6c\x65':_0x2160ef[_0x1950b6(0x126)]};})),_0x230edb=_0x1ffc65[_0x32043b(0x1ca)]?_0x2c13e9['\x66\x69\x6c\x74\x65\x72'](_0x266671=>_0x266671[_0x32043b(0x321)]['\x73\x74\x61\x74\x75\x73']===_0x1ffc65[_0x32043b(0x1ca)]):_0x2c13e9;return{'\x66\x6c\x65\x65\x74\x49\x64':_0x1bb5a8['\x69\x64'],'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x230edb};}async[a0_0x314c3e(0x2e2)](_0x3b2527){const _0x56fb1f=a0_0x314c3e,_0x23e134={'\x4e\x4c\x58\x6e\x59':function(_0x360376,_0x694796){return _0x360376(_0x694796);}},_0x1e70ef=(await this[_0x56fb1f(0x2bf)][_0x56fb1f(0x265)](_0x3b2527))[_0x56fb1f(0x249)](_0x28cc15=>_0x28cc15['\x74\x6f\x4a\x53\x4f\x4e']())[_0x56fb1f(0x319)](_0x1a0081=>getFleetId(_0x1a0081)===_0x3b2527[_0x56fb1f(0x294)])['\x66\x6c\x61\x74\x4d\x61\x70'](_0x1f49f0=>{const _0x28527b=_0x23e134['\x4e\x4c\x58\x6e\x59'](getMachineId,_0x1f49f0);return _0x28527b?[{'\x6d\x61\x63\x68\x69\x6e\x65\x49\x64':_0x28527b,'\x73\x61\x6e\x64\x62\x6f\x78':_0x1f49f0,'\x72\x6f\x6c\x65':getMachineRole(_0x1f49f0)}]:[];});return this[_0x56fb1f(0x238)]({'\x66\x6c\x65\x65\x74\x49\x64':_0x3b2527['\x66\x6c\x65\x65\x74\x49\x64'],'\x6d\x61\x63\x68\x69\x6e\x65\x73':_0x1e70ef});}};function getMachineDescriptor(_0x55eccf,_0x56c95f){const _0xd46ef7=a0_0x314c3e,_0x11fa05=_0x55eccf[_0xd46ef7(0x307)][_0xd46ef7(0x16d)](_0x286986=>_0x286986[_0xd46ef7(0x1f3)]===_0x56c95f);if(!_0x11fa05)return{};const _0x2ecf91=mergeCreateOptions(_0x55eccf[_0xd46ef7(0x260)],_0x11fa05);return{'\x64\x72\x69\x76\x65\x72\x54\x79\x70\x65':_0x2ecf91[_0xd46ef7(0x23b)]?.['\x74\x79\x70\x65'],'\x69\x6d\x61\x67\x65':_0x2ecf91[_0xd46ef7(0x208)],'\x65\x6e\x76\x69\x72\x6f\x6e\x6d\x65\x6e\x74':_0x2ecf91[_0xd46ef7(0x328)],'\x74\x65\x6d\x70\x6c\x61\x74\x65\x49\x64':_0x2ecf91['\x74\x65\x6d\x70\x6c\x61\x74\x65\x49\x64'],'\x70\x75\x62\x6c\x69\x63\x54\x65\x6d\x70\x6c\x61\x74\x65\x49\x64':_0x2ecf91[_0xd46ef7(0x287)],'\x61\x63\x63\x65\x6c\x65\x72\x61\x74\x6f\x72\x43\x6f\x75\x6e\x74':_0x2ecf91[_0xd46ef7(0x1cb)]?.[_0xd46ef7(0x1cf)]?.[_0xd46ef7(0x303)]??(_0x2ecf91[_0xd46ef7(0x1cb)]?.[_0xd46ef7(0x1cf)]?0x1:void 0x0)};}async function mapConcurrent(_0x4ccccb,_0x205a2f,_0x56d932){const _0x13c9a2=a0_0x314c3e,_0x1c1dc6={'\x55\x42\x63\x75\x55':function(_0x5ae53a,_0x3043c2){return _0x5ae53a<_0x3043c2;},'\x66\x56\x77\x59\x67':function(_0x21c0c7,_0x156924){return _0x21c0c7===_0x156924;},'\x65\x65\x72\x6f\x4c':function(_0x5695a7,_0x3bc82f){return _0x5695a7(_0x3bc82f);}},_0x54e412=new Array(_0x4ccccb[_0x13c9a2(0x23f)]);let _0x43e6cf=0x0;const _0xac5974=Array[_0x13c9a2(0x15e)]({'\x6c\x65\x6e\x67\x74\x68':Math[_0x13c9a2(0x34e)](_0x205a2f,_0x4ccccb[_0x13c9a2(0x23f)])},async()=>{const _0x4d8787=_0x13c9a2;while(_0x1c1dc6['\x55\x42\x63\x75\x55'](_0x43e6cf,_0x4ccccb['\x6c\x65\x6e\x67\x74\x68'])){const _0x17a9ec=_0x43e6cf;_0x43e6cf+=0x1;const _0xf5632a=_0x4ccccb[_0x17a9ec];if(_0x1c1dc6[_0x4d8787(0x28b)](_0xf5632a,void 0x0))throw new Error(_0x4d8787(0x23d)+_0x17a9ec);_0x54e412[_0x17a9ec]=await _0x1c1dc6['\x65\x65\x72\x6f\x4c'](_0x56d932,_0xf5632a);}});return await Promise[_0x13c9a2(0x143)](_0xac5974),_0x54e412;}function assertArtifactPath(_0x1947dc){const _0x12e646=a0_0x314c3e,_0x107085={'\x4f\x4a\x4f\x62\x6a':_0x12e646(0x35e)};if(_0x1947dc!==DEFAULT_ARTIFACT_ROOT&&!_0x1947dc[_0x12e646(0x1d6)](DEFAULT_ARTIFACT_ROOT+'\x2f'))throw new a0_0x54c689(_0x12e646(0x335)+_0x1947dc+'\x27\x20\x6d\x75\x73\x74\x20\x62\x65\x20\x75\x6e\x64\x65\x72\x20'+DEFAULT_ARTIFACT_ROOT,{'\x70\x61\x74\x68':_0x12e646(0x35c)});if(_0x1947dc[_0x12e646(0x149)]('\x00')||_0x1947dc[_0x12e646(0x2c2)]('\x2f')[_0x12e646(0x149)]('\x2e\x2e'))throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x61\x72\x74\x69\x66\x61\x63\x74\x20\x70\x61\x74\x68\x20\x27'+_0x1947dc+'\x27\x20\x6d\x75\x73\x74\x20\x6e\x6f\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x20\x74\x72\x61\x76\x65\x72\x73\x61\x6c\x20\x73\x65\x67\x6d\x65\x6e\x74\x73',{'\x70\x61\x74\x68':_0x107085[_0x12e646(0x1e5)]});}function assertArtifactSize(_0x2fd9be,_0x39b13f){const _0x3cadf4=a0_0x314c3e,_0x44d0bd={'\x4c\x78\x73\x66\x4f':function(_0xa038ff,_0x5389c0){return _0xa038ff<=_0x5389c0;},'\x47\x4d\x66\x71\x75':_0x3cadf4(0x2fa),'\x55\x4f\x6b\x55\x6a':_0x3cadf4(0x356)},_0x266bd3=_0x39b13f[_0x3cadf4(0x299)]??DEFAULT_MAX_ARTIFACT_BYTES;if(!Number[_0x3cadf4(0x22a)](_0x266bd3)||_0x44d0bd['\x4c\x78\x73\x66\x4f'](_0x266bd3,0x0))throw new a0_0x54c689(_0x44d0bd['\x47\x4d\x66\x71\x75'],{'\x6d\x61\x78\x42\x79\x74\x65\x73':_0x3cadf4(0x35e)});if(new TextEncoder()[_0x3cadf4(0x2ae)](_0x2fd9be)[_0x3cadf4(0x20a)]>_0x266bd3)throw new a0_0x54c689('\x46\x6c\x65\x65\x74\x20\x61\x72\x74\x69\x66\x61\x63\x74\x20\x27'+_0x39b13f[_0x3cadf4(0x252)]+_0x3cadf4(0x30e)+_0x266bd3+_0x3cadf4(0x360),{'\x70\x61\x74\x68':_0x44d0bd[_0x3cadf4(0x20d)]});}function getMachineRole(_0x3a3615){const _0x4f84e5=a0_0x314c3e,_0x10d8de={'\x75\x7a\x48\x51\x6d':function(_0x56e0de,_0x2dd334){return _0x56e0de===_0x2dd334;},'\x47\x76\x77\x4c\x74':_0x4f84e5(0x367),'\x49\x65\x48\x65\x73':_0x4f84e5(0x189)},_0x55ef82=_0x3a3615[_0x4f84e5(0x273)]?.[MACHINE_ROLE_META];return _0x10d8de[_0x4f84e5(0x228)](_0x55ef82,_0x10d8de['\x47\x76\x77\x4c\x74'])||_0x55ef82===_0x10d8de[_0x4f84e5(0x2cd)]?_0x55ef82:void 0x0;}const DEFAULT_TIMEOUT_MS=0x7530,DEFAULT_CREATE_TIMEOUT_MS=0x1d4c0,CLIENT_DEADLINE_GRACE_MS=0x7530;function isLocalSandboxEndpoint(_0xbe468c){const _0x451ecf=a0_0x314c3e,_0x27946e={'\x44\x53\x4f\x62\x56':function(_0x33fc8e,_0x234703){return _0x33fc8e===_0x234703;},'\x52\x4b\x71\x47\x46':_0x451ecf(0x291),'\x50\x48\x6b\x44\x53':_0x451ecf(0x2ea)};try{const {hostname:_0x2461e7}=new URL(_0xbe468c);return _0x27946e[_0x451ecf(0x27a)](_0x2461e7,_0x451ecf(0x197))||_0x27946e[_0x451ecf(0x27a)](_0x2461e7,_0x27946e['\x52\x4b\x71\x47\x46'])||_0x2461e7===_0x27946e[_0x451ecf(0x243)];}catch{return![];}}function generateIdempotencyKey(){const _0x11ffec=a0_0x314c3e,_0x5bb5b4=globalThis[_0x11ffec(0x288)];if(_0x5bb5b4?.[_0x11ffec(0x15d)])return _0x5bb5b4[_0x11ffec(0x15d)]();if(_0x5bb5b4?.[_0x11ffec(0x21e)]){const _0x51d9b3=_0x5bb5b4[_0x11ffec(0x21e)](new Uint8Array(0x10));return Array['\x66\x72\x6f\x6d'](_0x51d9b3,_0x449db2=>_0x449db2[_0x11ffec(0x27c)](0x10)['\x70\x61\x64\x53\x74\x61\x72\x74'](0x2,'\x30'))[_0x11ffec(0x206)]('');}throw new Error('\x69\x64\x65\x6d\x70\x6f\x74\x65\x6e\x63\x79\x20\x6b\x65\x79\x20\x67\x65\x6e\x65\x72\x61\x74\x69\x6f\x6e\x20\x72\x65\x71\x75\x69\x72\x65\x73\x20\x67\x6c\x6f\x62\x61\x6c\x20\x63\x72\x79\x70\x74\x6f');}function withRequestContextHeaders(_0x7f6e7d,_0x2a92c6,_0x4106e4){const _0x1b50ce=a0_0x314c3e,_0x48531f=new Headers(_0x7f6e7d[_0x1b50ce(0x2e8)]);_0x48531f[_0x1b50ce(0x207)](_0x1b50ce(0x2c0),_0x2a92c6);if(_0x4106e4)_0x48531f[_0x1b50ce(0x207)](_0x1b50ce(0x26d),_0x4106e4);return new Response(_0x7f6e7d[_0x1b50ce(0x325)],{'\x73\x74\x61\x74\x75\x73':_0x7f6e7d['\x73\x74\x61\x74\x75\x73'],'\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74':_0x7f6e7d[_0x1b50ce(0x1c0)],'\x68\x65\x61\x64\x65\x72\x73':_0x48531f});}async function resolveLocalCliAuthFiles(_0x489a63){const _0x12338d={'\x52\x43\x61\x4b\x4f':function(_0x53bf3f){return _0x53bf3f();}};try{const {discoverLocalCliAuthFiles:_0x3a121f}=await _0x12338d['\x52\x43\x61\x4b\x4f'](importLocalCliRegistry);return _0x3a121f(_0x489a63);}catch{return discoverLocalCliAuthFilesFallback(_0x489a63);}}async function discoverLocalCliAuthFilesFallback(_0x4001a7){const _0x4238b9=a0_0x314c3e,_0x592512={'\x42\x6c\x49\x71\x72':function(_0x460817,_0x5a92ad,_0x47ce79){return _0x460817(_0x5a92ad,_0x47ce79);},'\x43\x48\x4b\x6c\x56':'\x75\x74\x66\x38','\x50\x5a\x7a\x44\x41':function(_0x2c6ed0,_0x5de9ec){return _0x2c6ed0===_0x5de9ec;},'\x5a\x57\x58\x66\x70':_0x4238b9(0x22e)};try{const [{existsSync:_0x28aadf,readFileSync:_0xd7a74},{homedir:_0x45f8ef},{join:_0x30b390}]=await Promise[_0x4238b9(0x143)]([import(_0x4238b9(0x1ea)),import(_0x4238b9(0x32d)),import('\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68')]),_0x4af3c4=_0x45f8ef(),_0x87c951=(_0x592512[_0x4238b9(0x136)](_0x4001a7,_0x4238b9(0x311))?[_0x4238b9(0x2f3)]:[_0x4238b9(0x1a2),_0x592512[_0x4238b9(0x31b)]])[_0x4238b9(0x338)](_0x5b0861=>{const _0x3e34eb=_0x4238b9,_0xabb9fb=_0x592512[_0x3e34eb(0x1ff)](_0x30b390,_0x4af3c4,_0x5b0861);if(!_0x28aadf(_0xabb9fb))return[];return[{'\x70\x61\x74\x68':_0x5b0861,'\x63\x6f\x6e\x74\x65\x6e\x74':_0xd7a74(_0xabb9fb,_0x592512[_0x3e34eb(0x131)]),'\x6d\x6f\x64\x65':0x180}];});return _0x87c951['\x6c\x65\x6e\x67\x74\x68']?_0x87c951:void 0x0;}catch{return;}}async function describeLocalCliAuthExpectation(_0x1b7d8d){const _0x5e410f=a0_0x314c3e;try{return(await importLocalCliRegistry())[_0x5e410f(0x1f7)](_0x1b7d8d);}catch{return _0x1b7d8d==='\x63\x6f\x64\x65\x78'?_0x5e410f(0x2fe):_0x5e410f(0x1ef);}}async function importLocalCliRegistry(){const _0x1f6947=a0_0x314c3e;return await import([_0x1f6947(0x14c),_0x1f6947(0x11f)][_0x1f6947(0x206)]('\x2f'));}async function hydrateLocalCliBackendAuth(_0x76a82f,_0x38b341,_0x11ca34){const _0x3ab734=a0_0x314c3e,_0x58ec7d={'\x43\x47\x54\x51\x5a':_0x3ab734(0x1cd),'\x49\x78\x4b\x6c\x4b':function(_0xe3676f,_0x2c4986){return _0xe3676f===_0x2c4986;},'\x4b\x74\x50\x4e\x64':_0x3ab734(0x311),'\x55\x54\x72\x64\x48':_0x3ab734(0x275)};if(!_0x76a82f)return void 0x0;if(!isLocalSandboxEndpoint(_0x38b341))return _0x76a82f;if(_0x76a82f[_0x3ab734(0x277)]!==_0x3ab734(0x311)&&_0x76a82f[_0x3ab734(0x277)]!==_0x58ec7d[_0x3ab734(0x27d)])return _0x76a82f;if(_0x76a82f[_0x3ab734(0x1de)]?.[_0x3ab734(0x2f8)]?.[_0x3ab734(0x23f)])return _0x76a82f;if(_0x76a82f[_0x3ab734(0x1de)]?.[_0x3ab734(0x216)])return _0x76a82f;if(_0x76a82f[_0x3ab734(0x1de)]?.[_0x3ab734(0x1be)]===_0x3ab734(0x1c3))return _0x76a82f;if(!_0x11ca34){const _0x3f93a8=_0x58ec7d[_0x3ab734(0x12f)](_0x76a82f['\x74\x79\x70\x65'],_0x3ab734(0x311))?_0x58ec7d[_0x3ab734(0x312)]:_0x58ec7d['\x55\x54\x72\x64\x48'];throw new a0_0x3161f6(_0x3ab734(0x2c8)+_0x76a82f[_0x3ab734(0x277)]+'\x20\x62\x61\x63\x6b\x65\x6e\x64\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x66\x6f\x72\x20'+_0x38b341+'\x2c\x20\x62\x75\x74\x20\x74\x68\x65\x20\x53\x44\x4b\x20\x77\x69\x6c\x6c\x20\x6e\x6f\x74\x20\x72\x65\x61\x64\x20\x43\x4c\x49\x20\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x20\x66\x72\x6f\x6d\x20\x74\x68\x65\x20\x68\x6f\x73\x74\x20\x68\x6f\x6d\x65\x20\x64\x69\x72\x65\x63\x74\x6f\x72\x79\x20\x75\x6e\x6c\x65\x73\x73\x20\x79\x6f\x75\x20\x6f\x70\x74\x20\x69\x6e\x20\x62\x79\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x69\x6e\x67\x20\x74\x68\x65\x20\x63\x6c\x69\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x60\x6e\x65\x77\x20\x53\x61\x6e\x64\x62\x6f\x78\x28\x7b\x20\x2e\x2e\x2e\x2c\x20\x74\x72\x75\x73\x74\x4c\x6f\x63\x61\x6c\x43\x6c\x69\x41\x75\x74\x68\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x60\x2e\x20\x4f\x6e\x6c\x79\x20\x6f\x70\x74\x20\x69\x6e\x20\x77\x68\x65\x6e\x20\x74\x68\x65\x20\x6c\x6f\x63\x61\x6c\x68\x6f\x73\x74\x20\x65\x6e\x64\x70\x6f\x69\x6e\x74\x20\x69\x73\x20\x6f\x6e\x65\x20\x79\x6f\x75\x20\x63\x6f\x6e\x74\x72\x6f\x6c\x2e\x20\x4f\x74\x68\x65\x72\x77\x69\x73\x65\x2c\x20\x70\x61\x73\x73\x20\x60\x62\x61\x63\x6b\x65\x6e\x64\x2e\x6d\x6f\x64\x65\x6c\x2e\x61\x70\x69\x4b\x65\x79\x60\x20\x2f\x20\x60\x62\x61\x63\x6b\x65\x6e\x64\x2e\x6d\x6f\x64\x65\x6c\x2e\x61\x75\x74\x68\x46\x69\x6c\x65\x73\x60\x20\x65\x78\x70\x6c\x69\x63\x69\x74\x6c\x79\x2c\x20\x6f\x72\x20\x72\x75\x6e\x20\x60'+_0x3f93a8+_0x3ab734(0x2d8));}const _0x198d7c=await resolveLocalCliAuthFiles(_0x76a82f[_0x3ab734(0x277)]);if(!_0x198d7c?.[_0x3ab734(0x23f)]){const _0x37fa3b=_0x58ec7d[_0x3ab734(0x12f)](_0x76a82f[_0x3ab734(0x277)],_0x3ab734(0x311))?_0x58ec7d[_0x3ab734(0x312)]:_0x58ec7d['\x55\x54\x72\x64\x48'],_0x286ade=await describeLocalCliAuthExpectation(_0x76a82f['\x74\x79\x70\x65']);throw new a0_0x3161f6('\x4c\x6f\x63\x61\x6c\x20'+_0x76a82f[_0x3ab734(0x277)]+_0x3ab734(0x2c9)+_0x38b341+_0x3ab734(0x235)+_0x37fa3b+'\x20\x6c\x6f\x67\x69\x6e\x60\x20\x6f\x6e\x20\x74\x68\x65\x20\x68\x6f\x73\x74\x20\x6f\x72\x20\x70\x72\x6f\x76\x69\x64\x65\x20\x62\x61\x63\x6b\x65\x6e\x64\x2e\x6d\x6f\x64\x65\x6c\x2e\x61\x70\x69\x4b\x65\x79\x2f\x61\x75\x74\x68\x46\x69\x6c\x65\x73\x20\x65\x78\x70\x6c\x69\x63\x69\x74\x6c\x79\x2e\x20\x45\x78\x70\x65\x63\x74\x65\x64\x20\x61\x75\x74\x68\x20\x75\x6e\x64\x65\x72\x20'+_0x286ade+'\x2e');}return{..._0x76a82f,'\x6d\x6f\x64\x65\x6c':{..._0x76a82f[_0x3ab734(0x1de)],'\x61\x75\x74\x68\x4d\x6f\x64\x65':_0x76a82f[_0x3ab734(0x1de)]?.[_0x3ab734(0x1be)]??'\x6f\x61\x75\x74\x68','\x61\x75\x74\x68\x46\x69\x6c\x65\x73':_0x198d7c}};}var SandboxClient=class{[a0_0x314c3e(0x211)];[a0_0x314c3e(0x216)];[a0_0x314c3e(0x25d)];[a0_0x314c3e(0x2b2)];[a0_0x314c3e(0x2da)]=null;['\x5f\x73\x73\x68\x4b\x65\x79\x73']=null;[a0_0x314c3e(0x333)]=null;[a0_0x314c3e(0x326)]=null;constructor(_0xf31abd){const _0x1d033b=a0_0x314c3e;if(!_0xf31abd[_0x1d033b(0x216)])throw new a0_0x3161f6(_0x1d033b(0x245));if(!_0xf31abd[_0x1d033b(0x211)])throw new a0_0x54c689(_0x1d033b(0x21d));this[_0x1d033b(0x211)]=_0xf31abd['\x62\x61\x73\x65\x55\x72\x6c'][_0x1d033b(0x220)](/\/$/,''),this[_0x1d033b(0x216)]=_0xf31abd[_0x1d033b(0x216)],this[_0x1d033b(0x25d)]=_0xf31abd['\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73']??DEFAULT_TIMEOUT_MS,this[_0x1d033b(0x2b2)]=_0xf31abd[_0x1d033b(0x2b2)]===!![];}get[a0_0x314c3e(0x332)](){const _0x158837=a0_0x314c3e;if(!this[_0x158837(0x333)])this['\x5f\x66\x6c\x65\x65\x74\x73']=new SandboxFleetClient(this);return this[_0x158837(0x333)];}get[a0_0x314c3e(0x1d5)](){const _0x1d4a27=a0_0x314c3e;if(!this[_0x1d4a27(0x326)])this[_0x1d4a27(0x326)]=new IntelligenceClient(this);return this[_0x1d4a27(0x326)];}[a0_0x314c3e(0x14d)](){const _0x275bc5=a0_0x314c3e;return this[_0x275bc5(0x216)];}get['\x73\x65\x63\x72\x65\x74\x73'](){const _0x7fc844=a0_0x314c3e;if(!this[_0x7fc844(0x2da)])this[_0x7fc844(0x2da)]=new SecretsManagerImpl(this);return this[_0x7fc844(0x2da)];}get[a0_0x314c3e(0x240)](){const _0x1c74f0=a0_0x314c3e;if(!this[_0x1c74f0(0x16c)])this[_0x1c74f0(0x16c)]=new SshKeysManagerImpl(this);return this[_0x1c74f0(0x16c)];}[a0_0x314c3e(0x24e)]=null;get[a0_0x314c3e(0x222)](){const _0x25e1e8=a0_0x314c3e;if(!this[_0x25e1e8(0x24e)])this[_0x25e1e8(0x24e)]=new EnvironmentsClient(this);return this[_0x25e1e8(0x24e)];}[a0_0x314c3e(0x29a)]=null;[a0_0x314c3e(0x26b)]=null;get[a0_0x314c3e(0x15f)](){const _0x20cfbc=a0_0x314c3e;if(!this[_0x20cfbc(0x29a)])this[_0x20cfbc(0x29a)]=new TeamsClient(this);return this[_0x20cfbc(0x29a)];}get[a0_0x314c3e(0x1bb)](){const _0x219181=a0_0x314c3e;if(!this[_0x219181(0x26b)])this[_0x219181(0x26b)]=new PublicTemplatesClient(this);return this[_0x219181(0x26b)];}async['\x63\x72\x65\x61\x74\x65'](_0x400d9b,_0x1d7e2d){const _0x2c4ac9=a0_0x314c3e,_0x34fb8a={'\x44\x41\x51\x4f\x4f':function(_0x3b6a5e,_0xed2342){return _0x3b6a5e+_0xed2342;},'\x4b\x51\x6e\x79\x45':_0x2c4ac9(0x231)},_0x431bbd=_0x1d7e2d?.[_0x2c4ac9(0x25d)]??DEFAULT_CREATE_TIMEOUT_MS,_0x482133=_0x400d9b?.[_0x2c4ac9(0x120)]??generateIdempotencyKey(),_0x5907e2=_0x34fb8a[_0x2c4ac9(0x2eb)](Date[_0x2c4ac9(0x2fd)](),_0x431bbd),_0x28ac5a=_0x400d9b?.[_0x2c4ac9(0x33b)]?{'\x75\x72\x6c':_0x400d9b[_0x2c4ac9(0x33b)][_0x2c4ac9(0x339)],'\x72\x65\x66':_0x400d9b[_0x2c4ac9(0x33b)][_0x2c4ac9(0x254)],'\x64\x65\x70\x74\x68':_0x400d9b[_0x2c4ac9(0x33b)]['\x64\x65\x70\x74\x68'],'\x73\x70\x61\x72\x73\x65':_0x400d9b[_0x2c4ac9(0x33b)]['\x73\x70\x61\x72\x73\x65'],'\x61\x75\x74\x68':_0x400d9b['\x67\x69\x74']['\x61\x75\x74\x68']}:void 0x0,_0x557e91=_0x400d9b?.[_0x2c4ac9(0x328)]??_0x400d9b?.[_0x2c4ac9(0x208)],_0x2fbf93=await hydrateLocalCliBackendAuth(_0x400d9b?.[_0x2c4ac9(0x121)],this[_0x2c4ac9(0x211)],this[_0x2c4ac9(0x2b2)]),_0x3ed7ee=_0x2fbf93?{..._0x2fbf93,'\x74\x79\x70\x65':_0x2fbf93[_0x2c4ac9(0x277)]??'\x6f\x70\x65\x6e\x63\x6f\x64\x65'}:void 0x0,_0x19e61c=normalizeSandboxResources(_0x400d9b?.[_0x2c4ac9(0x1cb)],_0x400d9b?.[_0x2c4ac9(0x23b)]),_0xbea4a3=AbortSignal['\x74\x69\x6d\x65\x6f\x75\x74'](_0x431bbd),_0x2baf2e=_0x1d7e2d?.[_0x2c4ac9(0x2a9)]?AbortSignal[_0x2c4ac9(0x133)]([_0x1d7e2d[_0x2c4ac9(0x2a9)],_0xbea4a3]):_0xbea4a3;let _0x22ae9d;try{_0x22ae9d=await this[_0x2c4ac9(0x365)](_0x2c4ac9(0x16a),{'\x6d\x65\x74\x68\x6f\x64':_0x2c4ac9(0x17e),'\x68\x65\x61\x64\x65\x72\x73':{'\x49\x64\x65\x6d\x70\x6f\x74\x65\x6e\x63\x79\x2d\x4b\x65\x79':_0x482133},'\x73\x69\x67\x6e\x61\x6c':_0x2baf2e,'\x62\x6f\x64\x79':JSON[_0x2c4ac9(0x232)]({'\x6e\x61\x6d\x65':_0x400d9b?.['\x6e\x61\x6d\x65'],..._0x557e91!==void 0x0?{'\x65\x6e\x76\x69\x72\x6f\x6e\x6d\x65\x6e\x74':_0x557e91,'\x69\x6d\x61\x67\x65':_0x557e91}:{},'\x67\x69\x74':_0x28ac5a,'\x74\x6f\x6f\x6c\x73':_0x400d9b?.[_0x2c4ac9(0x1c7)],'\x62\x61\x72\x65':_0x400d9b?.[_0x2c4ac9(0x1f8)],'\x64\x72\x69\x76\x65\x72':_0x400d9b?.[_0x2c4ac9(0x23b)],'\x62\x61\x63\x6b\x65\x6e\x64':_0x3ed7ee,'\x70\x65\x72\x6d\x69\x73\x73\x69\x6f\x6e\x73':_0x400d9b?.[_0x2c4ac9(0x183)],'\x65\x6e\x76':_0x400d9b?.[_0x2c4ac9(0x2e9)],'\x72\x65\x73\x6f\x75\x72\x63\x65\x73':_0x19e61c,'\x73\x73\x68\x45\x6e\x61\x62\x6c\x65\x64':_0x400d9b?.[_0x2c4ac9(0x233)],'\x73\x73\x68\x50\x75\x62\x6c\x69\x63\x4b\x65\x79\x73':_0x400d9b?.['\x73\x73\x68\x50\x75\x62\x6c\x69\x63\x4b\x65\x79\x73']??(_0x400d9b?.[_0x2c4ac9(0x334)]?[_0x400d9b[_0x2c4ac9(0x334)]]:void 0x0),'\x73\x73\x68\x4b\x65\x79\x49\x64\x73':_0x400d9b?.[_0x2c4ac9(0x34d)],'\x77\x65\x62\x54\x65\x72\x6d\x69\x6e\x61\x6c\x45\x6e\x61\x62\x6c\x65\x64':_0x400d9b?.[_0x2c4ac9(0x355)],'\x6d\x61\x78\x4c\x69\x66\x65\x74\x69\x6d\x65\x53\x65\x63\x6f\x6e\x64\x73':_0x400d9b?.[_0x2c4ac9(0x1b6)],'\x69\x64\x6c\x65\x54\x69\x6d\x65\x6f\x75\x74\x53\x65\x63\x6f\x6e\x64\x73':_0x400d9b?.[_0x2c4ac9(0x282)],'\x73\x74\x6f\x72\x61\x67\x65':_0x400d9b?.[_0x2c4ac9(0x33f)],'\x66\x72\x6f\x6d\x53\x6e\x61\x70\x73\x68\x6f\x74':_0x400d9b?.[_0x2c4ac9(0x2a7)],'\x66\x72\x6f\x6d\x53\x61\x6e\x64\x62\x6f\x78\x49\x64':_0x400d9b?.[_0x2c4ac9(0x1bf)],'\x74\x65\x6d\x70\x6c\x61\x74\x65\x49\x64':_0x400d9b?.[_0x2c4ac9(0x1dd)],'\x70\x75\x62\x6c\x69\x63\x54\x65\x6d\x70\x6c\x61\x74\x65\x49\x64':_0x400d9b?.[_0x2c4ac9(0x287)],'\x70\x75\x62\x6c\x69\x63\x54\x65\x6d\x70\x6c\x61\x74\x65\x56\x65\x72\x73\x69\x6f\x6e\x49\x64':_0x400d9b?.['\x70\x75\x62\x6c\x69\x63\x54\x65\x6d\x70\x6c\x61\x74\x65\x56\x65\x72\x73\x69\x6f\x6e\x49\x64'],'\x73\x65\x63\x72\x65\x74\x73':_0x400d9b?.[_0x2c4ac9(0x2c3)],'\x63\x6f\x6e\x66\x69\x64\x65\x6e\x74\x69\x61\x6c':_0x400d9b?.[_0x2c4ac9(0x266)],'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x400d9b?.[_0x2c4ac9(0x273)],'\x74\x65\x61\x6d\x49\x64':_0x400d9b?.[_0x2c4ac9(0x285)],'\x63\x61\x70\x61\x62\x69\x6c\x69\x74\x69\x65\x73':_0x400d9b?.[_0x2c4ac9(0x138)],'\x70\x72\x69\x76\x61\x63\x79':_0x400d9b?.[_0x2c4ac9(0x1c6)],'\x65\x67\x72\x65\x73\x73\x50\x6f\x6c\x69\x63\x79':_0x400d9b?.[_0x2c4ac9(0x354)],'\x69\x64\x65\x6d\x70\x6f\x74\x65\x6e\x63\x79\x4b\x65\x79':_0x482133})});}catch(_0x142f1e){if(_0x1d7e2d?.['\x73\x69\x67\x6e\x61\x6c']?.[_0x2c4ac9(0x1cc)])throw _0x142f1e;if(_0x142f1e instanceof a0_0x34ddb0||_0x142f1e instanceof Error&&(_0x142f1e[_0x2c4ac9(0x242)]===_0x2c4ac9(0x1c8)||_0x142f1e[_0x2c4ac9(0x242)]===_0x34fb8a[_0x2c4ac9(0x1fb)]))throw new a0_0x34ddb0(_0x431bbd,_0x2c4ac9(0x2d3)+_0x431bbd+'\x6d\x73\x2e\x20\x54\x68\x65\x20\x70\x72\x6f\x76\x69\x73\x69\x6f\x6e\x20\x6d\x61\x79\x20\x73\x74\x69\x6c\x6c\x20\x62\x65\x20\x72\x75\x6e\x6e\x69\x6e\x67\x20\x73\x65\x72\x76\x65\x72\x2d\x73\x69\x64\x65\x3b\x20\x72\x65\x74\x72\x79\x20\x63\x72\x65\x61\x74\x65\x28\x29\x20\x77\x69\x74\x68\x20\x69\x64\x65\x6d\x70\x6f\x74\x65\x6e\x63\x79\x4b\x65\x79\x3d\x22'+_0x482133+_0x2c4ac9(0x1e9));throw _0x142f1e;}if(!_0x22ae9d['\x6f\x6b']){const _0x212da5=await _0x22ae9d['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x22ae9d[_0x2c4ac9(0x1ca)],_0x212da5,void 0x0,_0x22ae9d['\x68\x65\x61\x64\x65\x72\x73']);}const _0x490664=await _0x22ae9d[_0x2c4ac9(0x32a)](),_0x1eb2b4=new a0_0x96bd7c(this,this[_0x2c4ac9(0x24a)](_0x490664),_0x3ed7ee);if(_0x1eb2b4[_0x2c4ac9(0x1ca)]===_0x2c4ac9(0x33d)||_0x1eb2b4[_0x2c4ac9(0x1ca)]==='\x70\x65\x6e\x64\x69\x6e\x67'){const _0x215e5b=Math['\x6d\x61\x78'](0x0,_0x5907e2-Date[_0x2c4ac9(0x2fd)]());await _0x1eb2b4[_0x2c4ac9(0x2f5)](_0x2c4ac9(0x199),{'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':_0x215e5b,'\x73\x69\x67\x6e\x61\x6c':_0x1d7e2d?.[_0x2c4ac9(0x2a9)]});}return _0x1eb2b4;}async[a0_0x314c3e(0x135)](_0x51cd5e,_0x2d19bb){const _0x5df8e2=a0_0x314c3e,_0x137ac3={'\x57\x62\x44\x75\x53':_0x5df8e2(0x17c),'\x62\x54\x43\x61\x6f':_0x5df8e2(0x199)},_0x22c145=await this['\x67\x65\x74'](_0x51cd5e);if(!_0x22c145)throw new a0_0xd4b83e(_0x137ac3[_0x5df8e2(0x352)],_0x51cd5e,{'\x65\x6e\x64\x70\x6f\x69\x6e\x74':_0x5df8e2(0x18c)+_0x51cd5e,'\x6f\x72\x69\x67\x69\x6e':_0x5df8e2(0x2ad)});return await _0x22c145[_0x5df8e2(0x2f5)](_0x137ac3[_0x5df8e2(0x157)],{'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':_0x2d19bb?.['\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73']??DEFAULT_CREATE_TIMEOUT_MS,'\x73\x69\x67\x6e\x61\x6c':_0x2d19bb?.[_0x5df8e2(0x2a9)]}),_0x22c145;}async['\x6c\x69\x73\x74'](_0x2b0646){const _0x5e4f2f=a0_0x314c3e,_0x407be6={'\x63\x70\x62\x46\x4b':function(_0x29feed,_0x462acf){return _0x29feed(_0x462acf);},'\x4c\x6b\x4e\x47\x6f':function(_0xa2aa,_0x3d9996){return _0xa2aa!==_0x3d9996;},'\x59\x6a\x63\x74\x45':function(_0x165bfa,_0x64c4b1){return _0x165bfa(_0x64c4b1);},'\x58\x56\x6c\x48\x76':_0x5e4f2f(0x22f)},_0x5f1317=new URLSearchParams();if(_0x2b0646?.[_0x5e4f2f(0x1ca)]){const _0x1c0bc5=Array[_0x5e4f2f(0x129)](_0x2b0646['\x73\x74\x61\x74\x75\x73'])?_0x2b0646[_0x5e4f2f(0x1ca)]:[_0x2b0646['\x73\x74\x61\x74\x75\x73']];for(const _0x521397 of _0x1c0bc5)_0x5f1317['\x61\x70\x70\x65\x6e\x64'](_0x5e4f2f(0x1ca),_0x521397);}if(_0x2b0646?.['\x6c\x69\x6d\x69\x74']!==void 0x0)_0x5f1317['\x73\x65\x74'](_0x5e4f2f(0x2d4),_0x407be6[_0x5e4f2f(0x210)](String,_0x2b0646['\x6c\x69\x6d\x69\x74']));if(_0x407be6[_0x5e4f2f(0x171)](_0x2b0646?.[_0x5e4f2f(0x30a)],void 0x0))_0x5f1317[_0x5e4f2f(0x207)](_0x5e4f2f(0x30a),_0x407be6[_0x5e4f2f(0x223)](String,_0x2b0646[_0x5e4f2f(0x30a)]));if(_0x2b0646?.[_0x5e4f2f(0x22f)]!==void 0x0)_0x5f1317['\x73\x65\x74'](_0x407be6[_0x5e4f2f(0x19a)],_0x2b0646[_0x5e4f2f(0x22f)]);const _0x53fc05=_0x5f1317['\x74\x6f\x53\x74\x72\x69\x6e\x67'](),_0x326e9f=_0x53fc05?_0x5e4f2f(0x1ae)+_0x53fc05:_0x5e4f2f(0x16a),_0x57fa2d=await this[_0x5e4f2f(0x365)](_0x326e9f);if(!_0x57fa2d['\x6f\x6b']){const _0x1e3bac=await _0x57fa2d[_0x5e4f2f(0x142)]();throw a0_0x4a887c(_0x57fa2d['\x73\x74\x61\x74\x75\x73'],_0x1e3bac,void 0x0,_0x57fa2d['\x68\x65\x61\x64\x65\x72\x73']);}const _0x4378cd=await _0x57fa2d['\x6a\x73\x6f\x6e']();return(Array[_0x5e4f2f(0x129)](_0x4378cd)?_0x4378cd:_0x4378cd[_0x5e4f2f(0x272)]??[])[_0x5e4f2f(0x249)](_0x264aed=>new a0_0x96bd7c(this,this['\x70\x61\x72\x73\x65\x49\x6e\x66\x6f'](_0x264aed)));}async[a0_0x314c3e(0x17f)](_0x37eec9){const _0x19f50d=a0_0x314c3e,_0x54ee29={'\x62\x72\x59\x4c\x63':function(_0x28770a,_0x56d52b){return _0x28770a(_0x56d52b);}},_0x275c4a=await this['\x66\x65\x74\x63\x68'](_0x19f50d(0x18c)+_0x54ee29['\x62\x72\x59\x4c\x63'](encodeURIComponent,_0x37eec9));if(_0x275c4a['\x73\x74\x61\x74\x75\x73']===0x194)return null;if(!_0x275c4a['\x6f\x6b']){const _0xa3a1b8=await _0x275c4a[_0x19f50d(0x142)]();throw a0_0x4a887c(_0x275c4a[_0x19f50d(0x1ca)],_0xa3a1b8,void 0x0,_0x275c4a[_0x19f50d(0x2e8)]);}const _0x29b068=await _0x275c4a[_0x19f50d(0x32a)]();return new a0_0x96bd7c(this,this[_0x19f50d(0x24a)](_0x29b068));}async[a0_0x314c3e(0x140)](){const _0x2a6669=a0_0x314c3e,_0x435dcf={'\x45\x4b\x7a\x51\x61':'\x2f\x75\x73\x61\x67\x65'},_0x3d6b22=await this['\x66\x65\x74\x63\x68'](_0x435dcf['\x45\x4b\x7a\x51\x61']);if(!_0x3d6b22['\x6f\x6b']){const _0x49c356=await _0x3d6b22['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x3d6b22[_0x2a6669(0x1ca)],_0x49c356,void 0x0,_0x3d6b22['\x68\x65\x61\x64\x65\x72\x73']);}const _0x3588a0=await _0x3d6b22['\x6a\x73\x6f\x6e']();return{'\x63\x6f\x6d\x70\x75\x74\x65\x4d\x69\x6e\x75\x74\x65\x73':_0x3588a0[_0x2a6669(0x161)]??0x0,'\x61\x63\x74\x69\x76\x65\x53\x61\x6e\x64\x62\x6f\x78\x65\x73':_0x3588a0['\x61\x63\x74\x69\x76\x65\x53\x61\x6e\x64\x62\x6f\x78\x65\x73']??0x0,'\x74\x6f\x74\x61\x6c\x53\x61\x6e\x64\x62\x6f\x78\x65\x73':_0x3588a0[_0x2a6669(0x1a3)]??0x0,'\x70\x65\x72\x69\x6f\x64\x53\x74\x61\x72\x74':new Date(_0x3588a0[_0x2a6669(0x25f)]),'\x70\x65\x72\x69\x6f\x64\x45\x6e\x64':new Date(_0x3588a0[_0x2a6669(0x253)])};}async[a0_0x314c3e(0x25b)](){const _0x32a3bf=a0_0x314c3e,_0x4d093d=await this[_0x32a3bf(0x365)](_0x32a3bf(0x1fc));if(!_0x4d093d['\x6f\x6b']){const _0x5f0585=await _0x4d093d[_0x32a3bf(0x142)]();throw a0_0x4a887c(_0x4d093d['\x73\x74\x61\x74\x75\x73'],_0x5f0585,void 0x0,_0x4d093d[_0x32a3bf(0x2e8)]);}const _0x57e44a=await _0x4d093d[_0x32a3bf(0x32a)]();return{'\x70\x6c\x61\x6e':_0x57e44a[_0x32a3bf(0x292)]??_0x32a3bf(0x156),'\x73\x74\x61\x74\x75\x73':_0x57e44a[_0x32a3bf(0x1ca)]??_0x32a3bf(0x2d5),'\x63\x72\x65\x64\x69\x74\x73\x41\x76\x61\x69\x6c\x61\x62\x6c\x65\x55\x73\x64':_0x57e44a[_0x32a3bf(0x2cf)]??0x0,'\x63\x72\x65\x64\x69\x74\x73\x55\x73\x65\x64\x55\x73\x64':_0x57e44a['\x63\x72\x65\x64\x69\x74\x73\x55\x73\x65\x64\x55\x73\x64']??0x0,'\x6d\x6f\x6e\x74\x68\x6c\x79\x42\x61\x6c\x61\x6e\x63\x65\x55\x73\x64':_0x57e44a[_0x32a3bf(0x151)]??0x0,'\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x53\x61\x6e\x64\x62\x6f\x78\x65\x73':_0x57e44a['\x6d\x61\x78\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x74\x53\x61\x6e\x64\x62\x6f\x78\x65\x73']??0x0,'\x6f\x76\x65\x72\x61\x67\x65\x41\x6c\x6c\x6f\x77\x65\x64':_0x57e44a[_0x32a3bf(0x264)]??![],'\x6c\x69\x6d\x69\x74\x73':_0x57e44a[_0x32a3bf(0x237)]??{'\x6d\x61\x78\x43\x70\x75\x43\x6f\x72\x65\x73':0x1,'\x6d\x61\x78\x52\x61\x6d\x47\x42':0x2,'\x6d\x61\x78\x53\x74\x6f\x72\x61\x67\x65\x47\x42':0x32},'\x63\x75\x72\x72\x65\x6e\x74\x50\x65\x72\x69\x6f\x64\x45\x6e\x64':_0x57e44a[_0x32a3bf(0x217)]??0x0};}async[a0_0x314c3e(0x12b)](){const _0x509d5e=a0_0x314c3e;try{return(await this[_0x509d5e(0x365)](_0x509d5e(0x209)))['\x6f\x6b'];}catch{return![];}}async['\x63\x72\x69\x75\x53\x74\x61\x74\x75\x73'](){const _0x19ebf6=a0_0x314c3e,_0x5ef287=await this['\x66\x65\x74\x63\x68'](_0x19ebf6(0x226));if(!_0x5ef287['\x6f\x6b']){const _0x847c7c=await _0x5ef287[_0x19ebf6(0x142)]();throw a0_0x4a887c(_0x5ef287[_0x19ebf6(0x1ca)],_0x847c7c,void 0x0,_0x5ef287[_0x19ebf6(0x2e8)]);}return await _0x5ef287['\x6a\x73\x6f\x6e']();}async['\x72\x75\x6e\x42\x61\x74\x63\x68'](_0x423fe7,_0x2724bc){const _0x4d5197=a0_0x314c3e,_0x32d9d5={'\x66\x76\x75\x78\x74':function(_0x36ad3f,_0x217c6c){return _0x36ad3f+_0x217c6c;},'\x4f\x6e\x52\x75\x4a':function(_0x16f7a7,_0x2eebb9){return _0x16f7a7===_0x2eebb9;},'\x59\x62\x66\x5a\x4a':function(_0x2b9aaa,_0x5f0e18){return _0x2b9aaa>_0x5f0e18;},'\x71\x41\x47\x6b\x49':function(_0xe529fd,_0x2daea0){return _0xe529fd*_0x2daea0;}},_0x1af106=[];let _0x5647b1=0x0;for await(const _0x32e9cf of this['\x73\x74\x72\x65\x61\x6d\x42\x61\x74\x63\x68'](_0x423fe7,_0x2724bc)){if(_0x32e9cf[_0x4d5197(0x277)]===_0x4d5197(0x2a2)){const _0x2c8cf1=_0x32e9cf['\x64\x61\x74\x61'],_0x5050e4=_0x32d9d5[_0x4d5197(0x158)](_0x2c8cf1[_0x4d5197(0x140)]?.[_0x4d5197(0x2be)]??0x0,_0x2c8cf1[_0x4d5197(0x140)]?.['\x6f\x75\x74\x70\x75\x74\x54\x6f\x6b\x65\x6e\x73']??0x0);_0x1af106[_0x4d5197(0x336)]({'\x74\x61\x73\x6b\x49\x64':_0x2c8cf1[_0x4d5197(0x2dd)],'\x73\x75\x63\x63\x65\x73\x73':!![],'\x72\x65\x73\x70\x6f\x6e\x73\x65':_0x2c8cf1[_0x4d5197(0x2b8)]??_0x2c8cf1['\x72\x65\x73\x70\x6f\x6e\x73\x65'],'\x64\x75\x72\x61\x74\x69\x6f\x6e\x4d\x73':_0x2c8cf1[_0x4d5197(0x1e4)]??0x0,'\x72\x65\x74\x72\x69\x65\x73':_0x2c8cf1[_0x4d5197(0x170)]??0x0,'\x74\x6f\x6b\x65\x6e\x73\x55\x73\x65\x64':_0x2c8cf1[_0x4d5197(0x1a4)]??(_0x5050e4>0x0?_0x5050e4:void 0x0)}),_0x5647b1+=_0x2c8cf1[_0x4d5197(0x170)]??0x0;}if(_0x32e9cf[_0x4d5197(0x277)]===_0x4d5197(0x31f)){const _0x16dcb7=_0x32e9cf['\x64\x61\x74\x61'];_0x1af106[_0x4d5197(0x336)]({'\x74\x61\x73\x6b\x49\x64':_0x16dcb7[_0x4d5197(0x2dd)],'\x73\x75\x63\x63\x65\x73\x73':![],'\x65\x72\x72\x6f\x72':_0x16dcb7[_0x4d5197(0x2b5)],'\x64\x75\x72\x61\x74\x69\x6f\x6e\x4d\x73':_0x16dcb7[_0x4d5197(0x1e4)]??0x0,'\x72\x65\x74\x72\x69\x65\x73':_0x16dcb7[_0x4d5197(0x170)]??0x0}),_0x5647b1+=_0x16dcb7['\x72\x65\x74\x72\x69\x65\x73']??0x0;}if(_0x32d9d5[_0x4d5197(0x286)](_0x32e9cf[_0x4d5197(0x277)],'\x62\x61\x74\x63\x68\x2e\x66\x61\x69\x6c\x65\x64')){const _0x590d7a=_0x32e9cf[_0x4d5197(0x1f9)];throw new Error(_0x590d7a[_0x4d5197(0x2b5)]??_0x4d5197(0x358));}}const _0x264d79=_0x1af106[_0x4d5197(0x319)](_0x67b5d2=>_0x67b5d2['\x73\x75\x63\x63\x65\x73\x73'])[_0x4d5197(0x23f)],_0x6af75c=_0x1af106[_0x4d5197(0x319)](_0x398d81=>!_0x398d81['\x73\x75\x63\x63\x65\x73\x73'])['\x6c\x65\x6e\x67\x74\x68'];return{'\x74\x6f\x74\x61\x6c\x54\x61\x73\x6b\x73':_0x423fe7[_0x4d5197(0x23f)],'\x73\x75\x63\x63\x65\x65\x64\x65\x64':_0x264d79,'\x66\x61\x69\x6c\x65\x64':_0x6af75c,'\x74\x6f\x74\x61\x6c\x52\x65\x74\x72\x69\x65\x73':_0x5647b1,'\x73\x75\x63\x63\x65\x73\x73\x52\x61\x74\x65':_0x32d9d5[_0x4d5197(0x270)](_0x423fe7[_0x4d5197(0x23f)],0x0)?_0x32d9d5[_0x4d5197(0x19b)](_0x264d79/_0x423fe7[_0x4d5197(0x23f)],0x64):0x0,'\x72\x65\x73\x75\x6c\x74\x73':_0x1af106};}async*[a0_0x314c3e(0x2ac)](_0x411620,_0x2f0e49){const _0x27f67e=a0_0x314c3e,_0x448806={'\x4c\x4f\x71\x49\x4d':_0x27f67e(0x1b2),'\x74\x76\x6e\x4f\x6a':'\x50\x4f\x53\x54','\x73\x47\x4b\x73\x6a':function(_0x4ab618,_0x35c72e){return _0x4ab618 instanceof _0x35c72e;},'\x4f\x49\x44\x4a\x65':_0x27f67e(0x1c8),'\x6f\x49\x70\x58\x59':_0x27f67e(0x2f9),'\x4e\x45\x42\x71\x4c':function(_0x3d6a10,_0x2ec017){return _0x3d6a10===_0x2ec017;},'\x53\x59\x5a\x44\x5a':_0x27f67e(0x231),'\x43\x77\x72\x50\x52':'\x42\x61\x74\x63\x68\x20\x72\x65\x71\x75\x65\x73\x74\x20\x74\x69\x6d\x65\x64\x20\x6f\x75\x74\x20\x62\x65\x66\x6f\x72\x65\x20\x74\x68\x65\x20\x66\x69\x72\x73\x74\x20\x53\x53\x45\x20\x65\x76\x65\x6e\x74','\x6b\x51\x41\x63\x4d':function(_0x4496f4,_0x2c6481){return _0x4496f4(_0x2c6481);},'\x42\x65\x4a\x4f\x65':function(_0x1d9d47,_0x32348c,_0x284a9b){return _0x1d9d47(_0x32348c,_0x284a9b);}},_0x312d3d=this[_0x27f67e(0x211)]+_0x27f67e(0x315),_0x58c514=_0x2f0e49?.[_0x27f67e(0x25d)]??0x493e0,_0x14effe=JSON[_0x27f67e(0x232)]({'\x74\x61\x73\x6b\x73':_0x411620,'\x62\x61\x63\x6b\x65\x6e\x64':_0x2f0e49?.['\x62\x61\x63\x6b\x65\x6e\x64']?{..._0x2f0e49[_0x27f67e(0x121)],'\x74\x79\x70\x65':_0x2f0e49[_0x27f67e(0x121)][_0x27f67e(0x277)]??_0x448806[_0x27f67e(0x1bd)]}:{'\x74\x79\x70\x65':_0x448806[_0x27f67e(0x1bd)]},'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':_0x58c514,'\x73\x63\x61\x6c\x69\x6e\x67\x4d\x6f\x64\x65':_0x2f0e49?.[_0x27f67e(0x162)]??'\x62\x61\x6c\x61\x6e\x63\x65\x64','\x70\x65\x72\x73\x69\x73\x74\x65\x6e\x74':_0x2f0e49?.[_0x27f67e(0x302)]??![],'\x67\x72\x61\x63\x65\x4d\x73':_0x2f0e49?.[_0x27f67e(0x310)]??0x0}),_0x44e497=AbortSignal['\x74\x69\x6d\x65\x6f\x75\x74'](_0x58c514+CLIENT_DEADLINE_GRACE_MS),_0x169da6=_0x2f0e49?.[_0x27f67e(0x2a9)]?AbortSignal['\x61\x6e\x79']([_0x2f0e49[_0x27f67e(0x2a9)],_0x44e497]):_0x44e497;let _0x199184;try{_0x199184=await globalThis['\x66\x65\x74\x63\x68'](_0x312d3d,{'\x6d\x65\x74\x68\x6f\x64':_0x448806[_0x27f67e(0x368)],'\x68\x65\x61\x64\x65\x72\x73':{'\x41\x75\x74\x68\x6f\x72\x69\x7a\x61\x74\x69\x6f\x6e':_0x27f67e(0x24c)+this['\x61\x70\x69\x4b\x65\x79'],'\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65':_0x27f67e(0x184),'\x41\x63\x63\x65\x70\x74':_0x27f67e(0x13f)},'\x62\x6f\x64\x79':_0x14effe,'\x73\x69\x67\x6e\x61\x6c':_0x169da6});}catch(_0x52d2bd){if(_0x2f0e49?.[_0x27f67e(0x2a9)]?.[_0x27f67e(0x1cc)])throw _0x448806[_0x27f67e(0x218)](_0x52d2bd,Error)&&_0x52d2bd['\x6e\x61\x6d\x65']===_0x448806[_0x27f67e(0x258)]?_0x52d2bd:new DOMException(_0x448806[_0x27f67e(0x1ad)],_0x27f67e(0x1c8));if(_0x448806[_0x27f67e(0x218)](_0x52d2bd,Error)&&(_0x448806[_0x27f67e(0x13e)](_0x52d2bd[_0x27f67e(0x242)],_0x27f67e(0x1c8))||_0x448806[_0x27f67e(0x13e)](_0x52d2bd[_0x27f67e(0x242)],_0x448806[_0x27f67e(0x2b6)])))throw new a0_0x34ddb0(_0x58c514,_0x448806[_0x27f67e(0x244)]);throw new a0_0x3b5aa4('\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x63\x6f\x6e\x6e\x65\x63\x74\x20\x74\x6f\x20\x53\x61\x6e\x64\x62\x6f\x78\x20\x41\x50\x49\x3a\x20'+(_0x52d2bd instanceof Error?_0x52d2bd[_0x27f67e(0x2b9)]:_0x448806[_0x27f67e(0x293)](String,_0x52d2bd)),_0x52d2bd instanceof Error?_0x52d2bd:void 0x0,{'\x65\x6e\x64\x70\x6f\x69\x6e\x74':_0x27f67e(0x315),'\x6f\x72\x69\x67\x69\x6e':_0x27f67e(0x2ad)});}if(!_0x199184['\x6f\x6b']){const _0x4d2e2f=await _0x199184['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x199184[_0x27f67e(0x1ca)],_0x4d2e2f,void 0x0,_0x199184['\x68\x65\x61\x64\x65\x72\x73']);}yield*_0x448806['\x42\x65\x4a\x4f\x65'](a0_0x293e9f,_0x199184[_0x27f67e(0x325)],{'\x73\x69\x67\x6e\x61\x6c':_0x169da6});}async['\x66\x65\x74\x63\x68'](_0x2ef43f,_0xd5ff8a,_0x89f88d){const _0x36f3d5=a0_0x314c3e,_0x5efa7f={'\x48\x68\x52\x67\x62':'\x6e\x75\x6d\x62\x65\x72','\x51\x6b\x57\x77\x48':function(_0x3d1cf1,_0x74971c,_0x24937f){return _0x3d1cf1(_0x74971c,_0x24937f);},'\x6d\x41\x67\x64\x42':'\x41\x75\x74\x68\x6f\x72\x69\x7a\x61\x74\x69\x6f\x6e','\x70\x56\x57\x53\x58':function(_0xfc54f3,_0x5735b5){return _0xfc54f3!==_0x5735b5;},'\x63\x61\x50\x65\x74':_0x36f3d5(0x18d),'\x5a\x4a\x69\x4d\x4a':function(_0x4f3005,_0x1037b8){return _0x4f3005 instanceof _0x1037b8;},'\x59\x73\x52\x43\x42':function(_0x1e8ae5,_0x269b9e,_0x288c70,_0x1c5326){return _0x1e8ae5(_0x269b9e,_0x288c70,_0x1c5326);},'\x71\x70\x4c\x78\x4c':'\x41\x62\x6f\x72\x74\x45\x72\x72\x6f\x72','\x44\x44\x6a\x41\x41':_0x36f3d5(0x2ad),'\x63\x72\x6e\x77\x6f':function(_0xe57b2d,_0x1a71e5){return _0xe57b2d(_0x1a71e5);}},_0x4913ee=''+this['\x62\x61\x73\x65\x55\x72\x6c']+_0x2ef43f,_0x4fe02f=typeof _0x89f88d?.['\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73']===_0x5efa7f[_0x36f3d5(0x316)]&&_0x89f88d[_0x36f3d5(0x25d)]>0x0?_0x89f88d[_0x36f3d5(0x25d)]:this[_0x36f3d5(0x25d)],_0x5a0d61=new AbortController(),_0x4a62d6=_0x5efa7f[_0x36f3d5(0x1fe)](setTimeout,()=>_0x5a0d61[_0x36f3d5(0x178)](),_0x4fe02f);try{const _0x2623f2=new Headers(_0xd5ff8a?.[_0x36f3d5(0x2e8)]);_0x2623f2[_0x36f3d5(0x207)](_0x5efa7f[_0x36f3d5(0x1aa)],_0x36f3d5(0x24c)+this[_0x36f3d5(0x216)]);const _0xb8f754=_0x5efa7f[_0x36f3d5(0x350)](typeof FormData,_0x5efa7f[_0x36f3d5(0x19d)])&&_0x5efa7f[_0x36f3d5(0x168)](_0xd5ff8a?.['\x62\x6f\x64\x79'],FormData);if(!_0x2623f2[_0x36f3d5(0x2a0)](_0x36f3d5(0x20b))&&!_0xb8f754)_0x2623f2[_0x36f3d5(0x207)](_0x36f3d5(0x20b),'\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x2f\x6a\x73\x6f\x6e');return _0x5efa7f['\x59\x73\x52\x43\x42'](withRequestContextHeaders,await globalThis['\x66\x65\x74\x63\x68'](_0x4913ee,{..._0xd5ff8a,'\x68\x65\x61\x64\x65\x72\x73':_0x2623f2,'\x73\x69\x67\x6e\x61\x6c':_0xd5ff8a?.[_0x36f3d5(0x2a9)]??_0x5a0d61[_0x36f3d5(0x2a9)]}),_0x2ef43f,_0xd5ff8a?.[_0x36f3d5(0x34a)]);}catch(_0x998991){if(_0x998991 instanceof Error&&_0x998991[_0x36f3d5(0x242)]===_0x5efa7f[_0x36f3d5(0x15b)])throw new a0_0x34ddb0(_0x4fe02f);throw new a0_0x3b5aa4(_0x36f3d5(0x295)+(_0x998991 instanceof Error?_0x998991[_0x36f3d5(0x2b9)]:String(_0x998991)),_0x998991 instanceof Error?_0x998991:void 0x0,{'\x65\x6e\x64\x70\x6f\x69\x6e\x74':_0x2ef43f,'\x6f\x72\x69\x67\x69\x6e':_0x5efa7f[_0x36f3d5(0x175)]});}finally{_0x5efa7f[_0x36f3d5(0x32e)](clearTimeout,_0x4a62d6);}}[a0_0x314c3e(0x24a)](_0x5b0717){const _0x38fc25=a0_0x314c3e;return{'\x69\x64':_0x5b0717['\x69\x64']??'','\x6e\x61\x6d\x65':_0x5b0717[_0x38fc25(0x242)],'\x73\x74\x61\x74\x75\x73':_0x5b0717['\x73\x74\x61\x74\x75\x73']??_0x38fc25(0x278),'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':a0_0x55b251(_0x5b0717[_0x38fc25(0x261)]),'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x5b0717['\x6d\x65\x74\x61\x64\x61\x74\x61'],'\x63\x72\x65\x61\x74\x65\x64\x41\x74':_0x5b0717[_0x38fc25(0x130)]?new Date(_0x5b0717[_0x38fc25(0x130)]):new Date(),'\x73\x74\x61\x72\x74\x65\x64\x41\x74':_0x5b0717[_0x38fc25(0x2d7)]?new Date(_0x5b0717[_0x38fc25(0x2d7)]):void 0x0,'\x6c\x61\x73\x74\x41\x63\x74\x69\x76\x69\x74\x79\x41\x74':_0x5b0717[_0x38fc25(0x2cc)]?new Date(_0x5b0717[_0x38fc25(0x2cc)]):void 0x0,'\x65\x78\x70\x69\x72\x65\x73\x41\x74':_0x5b0717[_0x38fc25(0x359)]?new Date(_0x5b0717[_0x38fc25(0x359)]):void 0x0,'\x65\x72\x72\x6f\x72':_0x5b0717[_0x38fc25(0x2b5)]};}[a0_0x314c3e(0x290)]=new Set();['\x6f\x6e\x54\x6f\x6b\x65\x6e\x52\x65\x66\x72\x65\x73\x68'](_0x5e805f){const _0x49edba=a0_0x314c3e;return this[_0x49edba(0x290)][_0x49edba(0x348)](_0x5e805f),()=>{const _0x38ed62=_0x49edba;this[_0x38ed62(0x290)][_0x38ed62(0x1f4)](_0x5e805f);};}['\x5f\x65\x6d\x69\x74\x54\x6f\x6b\x65\x6e\x52\x65\x66\x72\x65\x73\x68'](_0x1faf23,_0x15711b){const _0x917fc8=a0_0x314c3e,_0x2def77={'\x64\x62\x54\x64\x6e':function(_0x4b0ac1,_0x3159b8,_0x200474){return _0x4b0ac1(_0x3159b8,_0x200474);}};for(const _0x37d46c of this[_0x917fc8(0x290)])try{_0x2def77[_0x917fc8(0x2a4)](_0x37d46c,_0x1faf23,_0x15711b);}catch(_0x30226f){console['\x77\x61\x72\x6e'](_0x917fc8(0x234)+(_0x30226f instanceof Error?_0x30226f['\x6d\x65\x73\x73\x61\x67\x65']:String(_0x30226f)));}}},SecretsManagerImpl=class{constructor(_0x3a6ab2){const _0x1434de=a0_0x314c3e;this[_0x1434de(0x2bf)]=_0x3a6ab2;}async[a0_0x314c3e(0x200)](_0x36e4c3,_0x37ff13){const _0x2fb36a=a0_0x314c3e,_0x579fd3={'\x66\x58\x78\x43\x75':_0x2fb36a(0x17e),'\x74\x62\x61\x70\x42':function(_0x5984cd,_0x47fa3a,_0x16e108,_0x2daea9,_0x32381d){return _0x5984cd(_0x47fa3a,_0x16e108,_0x2daea9,_0x32381d);},'\x4e\x61\x4e\x66\x78':function(_0x5cd0db,_0x568291){return _0x5cd0db===_0x568291;},'\x4c\x65\x6f\x43\x53':function(_0x247ab6,_0x37d44e,_0x45352e,_0x7b20fb,_0x4d1644){return _0x247ab6(_0x37d44e,_0x45352e,_0x7b20fb,_0x4d1644);}},_0x2855a7=await this[_0x2fb36a(0x2bf)][_0x2fb36a(0x365)]('\x2f\x76\x31\x2f\x73\x65\x63\x72\x65\x74\x73',{'\x6d\x65\x74\x68\x6f\x64':_0x579fd3[_0x2fb36a(0x141)],'\x62\x6f\x64\x79':JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79']({'\x6e\x61\x6d\x65':_0x36e4c3,'\x76\x61\x6c\x75\x65':_0x37ff13})});if(_0x2855a7[_0x2fb36a(0x1ca)]===0x199){const _0x880b48=await _0x2855a7[_0x2fb36a(0x142)]();throw _0x579fd3[_0x2fb36a(0x219)](a0_0x4a887c,_0x2855a7[_0x2fb36a(0x1ca)],_0x880b48,void 0x0,_0x2855a7['\x68\x65\x61\x64\x65\x72\x73']);}if(_0x579fd3[_0x2fb36a(0x366)](_0x2855a7[_0x2fb36a(0x1ca)],0x190)){const _0xdf80a=await _0x2855a7[_0x2fb36a(0x142)]();throw _0x579fd3['\x74\x62\x61\x70\x42'](a0_0x4a887c,_0x2855a7[_0x2fb36a(0x1ca)],_0xdf80a,void 0x0,_0x2855a7[_0x2fb36a(0x2e8)]);}if(!_0x2855a7['\x6f\x6b']){const _0x8cf515=await _0x2855a7['\x74\x65\x78\x74']();throw _0x579fd3[_0x2fb36a(0x159)](a0_0x4a887c,_0x2855a7[_0x2fb36a(0x1ca)],_0x8cf515,void 0x0,_0x2855a7[_0x2fb36a(0x2e8)]);}const _0x56df5f=await _0x2855a7[_0x2fb36a(0x32a)]();return{'\x6e\x61\x6d\x65':_0x56df5f[_0x2fb36a(0x242)],'\x63\x72\x65\x61\x74\x65\x64\x41\x74':new Date(_0x56df5f[_0x2fb36a(0x130)]),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new Date(_0x56df5f['\x75\x70\x64\x61\x74\x65\x64\x41\x74'])};}async[a0_0x314c3e(0x265)](){const _0x3ea129=a0_0x314c3e,_0x3aa87f=await this[_0x3ea129(0x2bf)][_0x3ea129(0x365)](_0x3ea129(0x2de));if(!_0x3aa87f['\x6f\x6b']){const _0x2ad52f=await _0x3aa87f['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x3aa87f[_0x3ea129(0x1ca)],_0x2ad52f,void 0x0,_0x3aa87f[_0x3ea129(0x2e8)]);}return((await _0x3aa87f['\x6a\x73\x6f\x6e']())[_0x3ea129(0x2c3)]??[])[_0x3ea129(0x249)](_0x2b574e=>({'\x6e\x61\x6d\x65':_0x2b574e[_0x3ea129(0x242)],'\x63\x72\x65\x61\x74\x65\x64\x41\x74':new Date(_0x2b574e[_0x3ea129(0x130)]),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new Date(_0x2b574e['\x75\x70\x64\x61\x74\x65\x64\x41\x74'])}));}async[a0_0x314c3e(0x17f)](_0x556c5a){const _0x49bb3e=a0_0x314c3e,_0x20fb8a={'\x67\x42\x77\x61\x79':function(_0x2653f5,_0x25c53d){return _0x2653f5===_0x25c53d;}},_0x3f7d02=await this[_0x49bb3e(0x2bf)]['\x66\x65\x74\x63\x68'](_0x49bb3e(0x21b)+encodeURIComponent(_0x556c5a));if(_0x20fb8a[_0x49bb3e(0x1ee)](_0x3f7d02[_0x49bb3e(0x1ca)],0x194))throw new a0_0xd4b83e('\x53\x65\x63\x72\x65\x74',_0x556c5a);if(!_0x3f7d02['\x6f\x6b']){const _0x5a7de3=await _0x3f7d02[_0x49bb3e(0x142)]();throw a0_0x4a887c(_0x3f7d02[_0x49bb3e(0x1ca)],_0x5a7de3,void 0x0,_0x3f7d02[_0x49bb3e(0x2e8)]);}return(await _0x3f7d02[_0x49bb3e(0x32a)]())[_0x49bb3e(0x309)];}async[a0_0x314c3e(0x2f6)](_0x38b246,_0x10898f){const _0x44f952=a0_0x314c3e,_0x3c0a83={'\x4d\x58\x42\x6d\x4a':function(_0x210f27,_0x1b2dae){return _0x210f27(_0x1b2dae);},'\x4b\x56\x6b\x53\x6e':function(_0x11f67f,_0x55e8a1){return _0x11f67f===_0x55e8a1;},'\x7a\x42\x71\x57\x4b':function(_0x34ca08,_0x6f7b4e,_0x41eb42,_0x55c6b0,_0xca82ec){return _0x34ca08(_0x6f7b4e,_0x41eb42,_0x55c6b0,_0xca82ec);},'\x50\x76\x57\x77\x47':function(_0x44e0a6,_0x3237ab,_0x3d0b40,_0x3fbfd1,_0x5138da){return _0x44e0a6(_0x3237ab,_0x3d0b40,_0x3fbfd1,_0x5138da);}},_0x3e0793=await this['\x63\x6c\x69\x65\x6e\x74'][_0x44f952(0x365)](_0x44f952(0x21b)+_0x3c0a83['\x4d\x58\x42\x6d\x4a'](encodeURIComponent,_0x38b246),{'\x6d\x65\x74\x68\x6f\x64':_0x44f952(0x167),'\x62\x6f\x64\x79':JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79']({'\x76\x61\x6c\x75\x65':_0x10898f})});if(_0x3e0793[_0x44f952(0x1ca)]===0x194)throw new a0_0xd4b83e(_0x44f952(0x122),_0x38b246);if(_0x3c0a83[_0x44f952(0x361)](_0x3e0793[_0x44f952(0x1ca)],0x190)){const _0x2a0ad6=await _0x3e0793[_0x44f952(0x142)]();throw _0x3c0a83['\x7a\x42\x71\x57\x4b'](a0_0x4a887c,_0x3e0793[_0x44f952(0x1ca)],_0x2a0ad6,void 0x0,_0x3e0793[_0x44f952(0x2e8)]);}if(!_0x3e0793['\x6f\x6b']){const _0x3ff3a2=await _0x3e0793[_0x44f952(0x142)]();throw _0x3c0a83['\x50\x76\x57\x77\x47'](a0_0x4a887c,_0x3e0793[_0x44f952(0x1ca)],_0x3ff3a2,void 0x0,_0x3e0793['\x68\x65\x61\x64\x65\x72\x73']);}const _0x227187=await _0x3e0793[_0x44f952(0x32a)]();return{'\x6e\x61\x6d\x65':_0x227187[_0x44f952(0x242)],'\x63\x72\x65\x61\x74\x65\x64\x41\x74':new Date(_0x227187[_0x44f952(0x130)]),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new Date(_0x227187[_0x44f952(0x29b)])};}async[a0_0x314c3e(0x1f4)](_0x24c802){const _0x2f82b4=a0_0x314c3e,_0x4ce796={'\x53\x74\x47\x4b\x45':_0x2f82b4(0x122)},_0x2ad67f=await this[_0x2f82b4(0x2bf)][_0x2f82b4(0x365)](_0x2f82b4(0x21b)+encodeURIComponent(_0x24c802),{'\x6d\x65\x74\x68\x6f\x64':_0x2f82b4(0x144)});if(_0x2ad67f[_0x2f82b4(0x1ca)]===0x194)throw new a0_0xd4b83e(_0x4ce796[_0x2f82b4(0x25e)],_0x24c802);if(!_0x2ad67f['\x6f\x6b']){const _0x2923b5=await _0x2ad67f[_0x2f82b4(0x142)]();throw a0_0x4a887c(_0x2ad67f[_0x2f82b4(0x1ca)],_0x2923b5,void 0x0,_0x2ad67f[_0x2f82b4(0x2e8)]);}}},SshKeysManagerImpl=class{constructor(_0x44cfc7){this['\x63\x6c\x69\x65\x6e\x74']=_0x44cfc7;}async[a0_0x314c3e(0x200)](_0x2e5d98,_0x30c62f){const _0x3c0571=a0_0x314c3e,_0x1d5a2a={'\x7a\x6b\x78\x6b\x67':_0x3c0571(0x190),'\x76\x61\x6f\x56\x7a':function(_0x27e8ae,_0x5490b7){return _0x27e8ae(_0x5490b7);}},_0x3027af=await this[_0x3c0571(0x2bf)][_0x3c0571(0x365)](_0x1d5a2a[_0x3c0571(0x1ce)],{'\x6d\x65\x74\x68\x6f\x64':_0x3c0571(0x17e),'\x62\x6f\x64\x79':JSON[_0x3c0571(0x232)]({'\x6e\x61\x6d\x65':_0x2e5d98,'\x70\x75\x62\x6c\x69\x63\x4b\x65\x79':_0x30c62f})});if(!_0x3027af['\x6f\x6b']){const _0x4a1d9e=await _0x3027af[_0x3c0571(0x142)]();throw a0_0x4a887c(_0x3027af[_0x3c0571(0x1ca)],_0x4a1d9e,void 0x0,_0x3027af['\x68\x65\x61\x64\x65\x72\x73']);}return _0x1d5a2a['\x76\x61\x6f\x56\x7a'](toSshKeyInfo,(await _0x3027af[_0x3c0571(0x32a)]())[_0x3c0571(0x205)]);}async[a0_0x314c3e(0x265)](){const _0x108fc7=a0_0x314c3e,_0x8d0de6=await this[_0x108fc7(0x2bf)][_0x108fc7(0x365)](_0x108fc7(0x190));if(!_0x8d0de6['\x6f\x6b']){const _0x2b7945=await _0x8d0de6[_0x108fc7(0x142)]();throw a0_0x4a887c(_0x8d0de6['\x73\x74\x61\x74\x75\x73'],_0x2b7945,void 0x0,_0x8d0de6['\x68\x65\x61\x64\x65\x72\x73']);}return((await _0x8d0de6[_0x108fc7(0x32a)]())['\x73\x73\x68\x4b\x65\x79\x73']??[])['\x6d\x61\x70'](toSshKeyInfo);}async[a0_0x314c3e(0x1f4)](_0x4e53d6){const _0x2f9fac=a0_0x314c3e,_0xd07899=await this[_0x2f9fac(0x2bf)]['\x66\x65\x74\x63\x68'](_0x2f9fac(0x2af)+encodeURIComponent(_0x4e53d6),{'\x6d\x65\x74\x68\x6f\x64':_0x2f9fac(0x144)});if(_0xd07899['\x73\x74\x61\x74\x75\x73']===0x194)throw new a0_0xd4b83e(_0x2f9fac(0x1c9),_0x4e53d6);if(!_0xd07899['\x6f\x6b']){const _0x49a2ef=await _0xd07899[_0x2f9fac(0x142)]();throw a0_0x4a887c(_0xd07899['\x73\x74\x61\x74\x75\x73'],_0x49a2ef,void 0x0,_0xd07899['\x68\x65\x61\x64\x65\x72\x73']);}}};function toSshKeyInfo(_0x2b4630){const _0x11365f=a0_0x314c3e;return{..._0x2b4630,'\x63\x72\x65\x61\x74\x65\x64\x41\x74':new Date(_0x2b4630[_0x11365f(0x130)]),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new Date(_0x2b4630[_0x11365f(0x29b)])};}var IntelligenceClient=class{constructor(_0x580f65){const _0x3c8de0=a0_0x314c3e;this[_0x3c8de0(0x2bf)]=_0x580f65;}async['\x63\x72\x65\x61\x74\x65\x52\x65\x70\x6f\x72\x74'](_0x5e7394){const _0x1dc556=a0_0x314c3e,_0x2494c0=await this['\x63\x6c\x69\x65\x6e\x74'][_0x1dc556(0x365)]('\x2f\x76\x31\x2f\x69\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65\x2f\x72\x65\x70\x6f\x72\x74\x73',{'\x6d\x65\x74\x68\x6f\x64':'\x50\x4f\x53\x54','\x62\x6f\x64\x79':JSON[_0x1dc556(0x232)](_0x5e7394)}),_0x2d2dd7=await _0x2494c0[_0x1dc556(0x142)]();if(!_0x2494c0['\x6f\x6b'])throw a0_0x4a887c(_0x2494c0[_0x1dc556(0x1ca)],_0x2d2dd7,void 0x0,_0x2494c0[_0x1dc556(0x2e8)]);return JSON['\x70\x61\x72\x73\x65'](_0x2d2dd7)[_0x1dc556(0x33c)];}async[a0_0x314c3e(0x28c)](_0x35b788){const _0x45d436=a0_0x314c3e;return this[_0x45d436(0x2b0)]({'\x73\x75\x62\x6a\x65\x63\x74':_0x35b788[_0x45d436(0x198)],'\x6d\x6f\x64\x65':'\x61\x67\x65\x6e\x74\x69\x63','\x62\x75\x64\x67\x65\x74':{'\x62\x69\x6c\x6c\x54\x6f':_0x45d436(0x331),'\x6d\x61\x78\x55\x73\x64':_0x35b788[_0x45d436(0x153)]},'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x35b788[_0x45d436(0x273)]});}async['\x65\x73\x74\x69\x6d\x61\x74\x65\x52\x65\x70\x6f\x72\x74'](_0x56a5f6){const _0x362c31=a0_0x314c3e,_0x455c98={'\x70\x57\x62\x49\x6f':_0x362c31(0x2f2),'\x6b\x71\x47\x49\x46':function(_0x4878a9,_0x88dc38,_0x59322f,_0x36f9cb,_0x200b64){return _0x4878a9(_0x88dc38,_0x59322f,_0x36f9cb,_0x200b64);}},_0xfb21fc=await this[_0x362c31(0x2bf)][_0x362c31(0x365)](_0x455c98[_0x362c31(0x148)],{'\x6d\x65\x74\x68\x6f\x64':_0x362c31(0x17e),'\x62\x6f\x64\x79':JSON[_0x362c31(0x232)](_0x56a5f6)}),_0x2525d3=await _0xfb21fc[_0x362c31(0x142)]();if(!_0xfb21fc['\x6f\x6b'])throw _0x455c98[_0x362c31(0x2f7)](a0_0x4a887c,_0xfb21fc[_0x362c31(0x1ca)],_0x2525d3,void 0x0,_0xfb21fc['\x68\x65\x61\x64\x65\x72\x73']);return JSON['\x70\x61\x72\x73\x65'](_0x2525d3)[_0x362c31(0x179)];}async['\x67\x65\x74\x52\x65\x70\x6f\x72\x74'](_0x1372e9){const _0xe7a4cb=a0_0x314c3e,_0x386910={'\x46\x53\x56\x46\x75':function(_0x12825d,_0x18d9f6,_0xe06ee6,_0x1d4072,_0x43045c){return _0x12825d(_0x18d9f6,_0xe06ee6,_0x1d4072,_0x43045c);}},_0x3bc2df=await this[_0xe7a4cb(0x2bf)]['\x66\x65\x74\x63\x68'](_0xe7a4cb(0x28d)+encodeURIComponent(_0x1372e9)),_0x21ef50=await _0x3bc2df[_0xe7a4cb(0x142)]();if(!_0x3bc2df['\x6f\x6b'])throw _0x386910[_0xe7a4cb(0x1d8)](a0_0x4a887c,_0x3bc2df[_0xe7a4cb(0x1ca)],_0x21ef50,void 0x0,_0x3bc2df[_0xe7a4cb(0x2e8)]);return JSON[_0xe7a4cb(0x17b)](_0x21ef50)[_0xe7a4cb(0x33c)];}async[a0_0x314c3e(0x36a)](_0x2b4789={}){const _0x2ece0b=a0_0x314c3e,_0x154972={'\x74\x53\x6f\x46\x50':_0x2ece0b(0x2c7),'\x4a\x54\x75\x7a\x5a':_0x2ece0b(0x2b7),'\x54\x41\x67\x43\x71':_0x2ece0b(0x2d4),'\x6f\x65\x42\x71\x51':function(_0x5eef82,_0x44952a){return _0x5eef82(_0x44952a);},'\x56\x6c\x70\x7a\x52':function(_0x3155ab,_0x10f526,_0x5df81e,_0x140143,_0x4d9a4e){return _0x3155ab(_0x10f526,_0x5df81e,_0x140143,_0x4d9a4e);}},_0x2da013=new URLSearchParams();if(_0x2b4789[_0x2ece0b(0x2c7)])_0x2da013[_0x2ece0b(0x207)](_0x154972[_0x2ece0b(0x155)],_0x2b4789[_0x2ece0b(0x2c7)]);if(_0x2b4789[_0x2ece0b(0x2b7)])_0x2da013['\x73\x65\x74'](_0x154972[_0x2ece0b(0x1fd)],_0x2b4789[_0x2ece0b(0x2b7)]);if(_0x2b4789['\x6c\x69\x6d\x69\x74']!==void 0x0)_0x2da013[_0x2ece0b(0x207)](_0x154972[_0x2ece0b(0x27b)],_0x154972[_0x2ece0b(0x30b)](String,_0x2b4789[_0x2ece0b(0x2d4)]));const _0x1284a1=_0x2da013[_0x2ece0b(0x169)]>0x0?'\x3f'+_0x2da013:'',_0x5b0bf4=await this[_0x2ece0b(0x2bf)][_0x2ece0b(0x365)](_0x2ece0b(0x2e3)+_0x1284a1),_0x46c803=await _0x5b0bf4[_0x2ece0b(0x142)]();if(!_0x5b0bf4['\x6f\x6b'])throw _0x154972[_0x2ece0b(0x123)](a0_0x4a887c,_0x5b0bf4['\x73\x74\x61\x74\x75\x73'],_0x46c803,void 0x0,_0x5b0bf4['\x68\x65\x61\x64\x65\x72\x73']);return JSON['\x70\x61\x72\x73\x65'](_0x46c803)[_0x2ece0b(0x2e7)];}async['\x77\x61\x69\x74\x46\x6f\x72\x52\x65\x70\x6f\x72\x74'](_0x4980d3,_0x38db0f={}){const _0x2c09d2=a0_0x314c3e,_0xf7e99d={'\x54\x7a\x56\x64\x7a':function(_0x2cb048,_0x1fcb85){return _0x2cb048===_0x1fcb85;}},_0x395f08=Date[_0x2c09d2(0x2fd)]()+(_0x38db0f['\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73']??0xea60),_0x424be7=_0x38db0f[_0x2c09d2(0x224)]??0x3e8;while(!![]){const _0x28b11c=await this['\x67\x65\x74\x52\x65\x70\x6f\x72\x74'](_0x4980d3);if(_0x28b11c[_0x2c09d2(0x1ca)]===_0x2c09d2(0x1e0)||_0xf7e99d['\x54\x7a\x56\x64\x7a'](_0x28b11c['\x73\x74\x61\x74\x75\x73'],_0x2c09d2(0x14e)))return _0x28b11c;if(Date[_0x2c09d2(0x2fd)]()>=_0x395f08)throw new a0_0x34ddb0(_0x38db0f['\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73']??0xea60);await new Promise(_0x11c701=>setTimeout(_0x11c701,Math[_0x2c09d2(0x34e)](_0x424be7,Math[_0x2c09d2(0x204)](0x0,_0x395f08-Date[_0x2c09d2(0x2fd)]()))));}}},EnvironmentsClient=class{constructor(_0x4e1452){this['\x63\x6c\x69\x65\x6e\x74']=_0x4e1452;}async[a0_0x314c3e(0x265)](){const _0x1e1b47=a0_0x314c3e,_0x56608e={'\x6d\x57\x76\x6c\x61':_0x1e1b47(0x32c)},_0x210a31=await this[_0x1e1b47(0x2bf)][_0x1e1b47(0x365)](_0x56608e[_0x1e1b47(0x27f)]);if(!_0x210a31['\x6f\x6b']){const _0x591bf2=await _0x210a31[_0x1e1b47(0x142)]();throw a0_0x4a887c(_0x210a31[_0x1e1b47(0x1ca)],_0x591bf2,void 0x0,_0x210a31[_0x1e1b47(0x2e8)]);}return(await _0x210a31[_0x1e1b47(0x32a)]())[_0x1e1b47(0x222)]??[];}async[a0_0x314c3e(0x17f)](_0x484780){const _0x4c9514=a0_0x314c3e;return(await this[_0x4c9514(0x265)]())[_0x4c9514(0x16d)](_0x308bad=>_0x308bad['\x69\x64']===_0x484780)??null;}},PublicTemplatesClient=class{constructor(_0x13c68b){const _0x35ddc5=a0_0x314c3e;this[_0x35ddc5(0x2bf)]=_0x13c68b;}async[a0_0x314c3e(0x265)](_0x20478e){const _0x15ab34=a0_0x314c3e,_0x57bc79={'\x6e\x45\x6e\x76\x64':'\x74\x61\x67','\x51\x5a\x41\x45\x79':'\x74\x72\x75\x65','\x42\x78\x48\x79\x64':function(_0x116dd9,_0x4600f1){return _0x116dd9(_0x4600f1);},'\x70\x6b\x46\x78\x6d':function(_0x4a9944,_0x2a7dae,_0x373dfc,_0x134ed2,_0x57542c){return _0x4a9944(_0x2a7dae,_0x373dfc,_0x134ed2,_0x57542c);}},_0xc09ef9=new URLSearchParams();if(_0x20478e?.[_0x15ab34(0x280)])_0xc09ef9['\x73\x65\x74']('\x71',_0x20478e[_0x15ab34(0x280)]);if(_0x20478e?.[_0x15ab34(0x15c)])_0xc09ef9[_0x15ab34(0x207)](_0x57bc79[_0x15ab34(0x2ed)],_0x20478e[_0x15ab34(0x15c)]);if(_0x20478e?.[_0x15ab34(0x322)])_0xc09ef9[_0x15ab34(0x207)](_0x15ab34(0x188),_0x57bc79[_0x15ab34(0x2ca)]);if(_0x20478e?.[_0x15ab34(0x2d4)]!==void 0x0)_0xc09ef9['\x73\x65\x74'](_0x15ab34(0x2d4),_0x57bc79[_0x15ab34(0x2e0)](String,_0x20478e[_0x15ab34(0x2d4)]));if(_0x20478e?.[_0x15ab34(0x30a)]!==void 0x0)_0xc09ef9[_0x15ab34(0x207)](_0x15ab34(0x30a),_0x57bc79['\x42\x78\x48\x79\x64'](String,_0x20478e[_0x15ab34(0x30a)]));const _0x3c2d27=_0xc09ef9[_0x15ab34(0x27c)](),_0x2570c3=await this[_0x15ab34(0x2bf)]['\x66\x65\x74\x63\x68']('\x2f\x76\x31\x2f\x70\x75\x62\x6c\x69\x63\x2d\x74\x65\x6d\x70\x6c\x61\x74\x65\x73'+(_0x3c2d27?'\x3f'+_0x3c2d27:''));if(!_0x2570c3['\x6f\x6b']){const _0x1ad645=await _0x2570c3[_0x15ab34(0x142)]();throw _0x57bc79[_0x15ab34(0x14a)](a0_0x4a887c,_0x2570c3[_0x15ab34(0x1ca)],_0x1ad645,void 0x0,_0x2570c3[_0x15ab34(0x2e8)]);}return(await _0x2570c3[_0x15ab34(0x32a)]())[_0x15ab34(0x12a)]??[];}async['\x66\x65\x61\x74\x75\x72\x65\x64'](){const _0x496714=a0_0x314c3e,_0x2538c4={'\x41\x75\x6d\x59\x59':'\x2f\x76\x31\x2f\x70\x75\x62\x6c\x69\x63\x2d\x74\x65\x6d\x70\x6c\x61\x74\x65\x73\x2f\x66\x65\x61\x74\x75\x72\x65\x64'},_0x5a2172=await this[_0x496714(0x2bf)][_0x496714(0x365)](_0x2538c4[_0x496714(0x2ba)]);if(!_0x5a2172['\x6f\x6b']){const _0x95ab6e=await _0x5a2172['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x5a2172[_0x496714(0x1ca)],_0x95ab6e,void 0x0,_0x5a2172[_0x496714(0x2e8)]);}return(await _0x5a2172[_0x496714(0x32a)]())['\x74\x65\x6d\x70\x6c\x61\x74\x65\x73']??[];}async[a0_0x314c3e(0x17f)](_0x7d66e5){const _0x3926d9=a0_0x314c3e,_0x2cdd75=await this[_0x3926d9(0x2bf)]['\x66\x65\x74\x63\x68'](_0x3926d9(0x134)+encodeURIComponent(_0x7d66e5));if(!_0x2cdd75['\x6f\x6b']){const _0x144807=await _0x2cdd75[_0x3926d9(0x142)]();throw a0_0x4a887c(_0x2cdd75['\x73\x74\x61\x74\x75\x73'],_0x144807,void 0x0,_0x2cdd75[_0x3926d9(0x2e8)]);}return(await _0x2cdd75[_0x3926d9(0x32a)]())[_0x3926d9(0x30f)];}async[a0_0x314c3e(0x2fb)](_0x2b3ab3){const _0x27abc8=a0_0x314c3e,_0x61f4ac={'\x79\x76\x68\x6f\x64':function(_0x46dcbc,_0x3ad5bd,_0xc8ff38,_0x35d0d9,_0x236111){return _0x46dcbc(_0x3ad5bd,_0xc8ff38,_0x35d0d9,_0x236111);}},_0x286fa6=await this[_0x27abc8(0x2bf)][_0x27abc8(0x365)](_0x27abc8(0x134)+encodeURIComponent(_0x2b3ab3)+_0x27abc8(0x186));if(!_0x286fa6['\x6f\x6b']){const _0xb3d139=await _0x286fa6[_0x27abc8(0x142)]();throw _0x61f4ac[_0x27abc8(0x257)](a0_0x4a887c,_0x286fa6[_0x27abc8(0x1ca)],_0xb3d139,void 0x0,_0x286fa6[_0x27abc8(0x2e8)]);}return(await _0x286fa6[_0x27abc8(0x32a)]())['\x76\x65\x72\x73\x69\x6f\x6e\x73']??[];}async[a0_0x314c3e(0x154)](_0x28b165){const _0x5e00d7=a0_0x314c3e,_0x367d40={'\x50\x45\x78\x6f\x78':_0x5e00d7(0x17e)},_0x63c9dc=await this[_0x5e00d7(0x2bf)][_0x5e00d7(0x365)](_0x5e00d7(0x2c1),{'\x6d\x65\x74\x68\x6f\x64':_0x367d40[_0x5e00d7(0x1d7)],'\x62\x6f\x64\x79':JSON[_0x5e00d7(0x232)](_0x28b165)});if(!_0x63c9dc['\x6f\x6b']){const _0x12ad95=await _0x63c9dc[_0x5e00d7(0x142)]();throw a0_0x4a887c(_0x63c9dc[_0x5e00d7(0x1ca)],_0x12ad95,void 0x0,_0x63c9dc[_0x5e00d7(0x2e8)]);}return(await _0x63c9dc[_0x5e00d7(0x32a)]())[_0x5e00d7(0x30f)];}async[a0_0x314c3e(0x26c)](_0x55eb9d,_0x1fdd30){const _0x16e2d1=a0_0x314c3e,_0x13c069={'\x61\x43\x6b\x72\x69':function(_0x1046ed,_0x64da6e){return _0x1046ed(_0x64da6e);},'\x74\x61\x4f\x52\x67':_0x16e2d1(0x17e)},_0x2750dd=await this[_0x16e2d1(0x2bf)][_0x16e2d1(0x365)](_0x16e2d1(0x134)+_0x13c069[_0x16e2d1(0x1a1)](encodeURIComponent,_0x55eb9d)+'\x2f\x76\x65\x72\x73\x69\x6f\x6e\x73',{'\x6d\x65\x74\x68\x6f\x64':_0x13c069['\x74\x61\x4f\x52\x67'],'\x62\x6f\x64\x79':JSON[_0x16e2d1(0x232)](_0x1fdd30)});if(!_0x2750dd['\x6f\x6b']){const _0x52da46=await _0x2750dd[_0x16e2d1(0x142)]();throw a0_0x4a887c(_0x2750dd[_0x16e2d1(0x1ca)],_0x52da46,void 0x0,_0x2750dd[_0x16e2d1(0x2e8)]);}return(await _0x2750dd[_0x16e2d1(0x32a)]())[_0x16e2d1(0x345)];}},TeamsClient=class{constructor(_0x4fd462){const _0x3af5d7=a0_0x314c3e;this[_0x3af5d7(0x2bf)]=_0x4fd462;}async[a0_0x314c3e(0x265)](){const _0x414b62=a0_0x314c3e,_0x538724={'\x4a\x67\x48\x51\x44':function(_0x2ad63f,_0x17e8c1,_0x2ebf42,_0x1ce47e,_0x3f016b){return _0x2ad63f(_0x17e8c1,_0x2ebf42,_0x1ce47e,_0x3f016b);}},_0x3895db=await this[_0x414b62(0x2bf)][_0x414b62(0x365)](_0x414b62(0x18a));if(!_0x3895db['\x6f\x6b']){const _0x2219d9=await _0x3895db[_0x414b62(0x142)]();throw _0x538724['\x4a\x67\x48\x51\x44'](a0_0x4a887c,_0x3895db[_0x414b62(0x1ca)],_0x2219d9,void 0x0,_0x3895db[_0x414b62(0x2e8)]);}return(await _0x3895db[_0x414b62(0x32a)]())[_0x414b62(0x15f)]??[];}async[a0_0x314c3e(0x200)](_0x1770d3){const _0x41d797=a0_0x314c3e,_0x364739=await this[_0x41d797(0x2bf)]['\x66\x65\x74\x63\x68']('\x2f\x76\x31\x2f\x74\x65\x61\x6d\x73',{'\x6d\x65\x74\x68\x6f\x64':'\x50\x4f\x53\x54','\x62\x6f\x64\x79':JSON[_0x41d797(0x232)](_0x1770d3)});if(!_0x364739['\x6f\x6b']){const _0x14e6ef=await _0x364739[_0x41d797(0x142)]();throw a0_0x4a887c(_0x364739[_0x41d797(0x1ca)],_0x14e6ef,void 0x0,_0x364739[_0x41d797(0x2e8)]);}return(await _0x364739[_0x41d797(0x32a)]())['\x74\x65\x61\x6d'];}async['\x67\x65\x74'](_0x56b98a){const _0x57428e=a0_0x314c3e,_0x2480f5=await this[_0x57428e(0x2bf)][_0x57428e(0x365)](_0x57428e(0x166)+encodeURIComponent(_0x56b98a));if(!_0x2480f5['\x6f\x6b']){const _0x1d67a9=await _0x2480f5['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x2480f5[_0x57428e(0x1ca)],_0x1d67a9,void 0x0,_0x2480f5['\x68\x65\x61\x64\x65\x72\x73']);}return(await _0x2480f5[_0x57428e(0x32a)]())['\x74\x65\x61\x6d'];}async[a0_0x314c3e(0x2f6)](_0xb97058,_0x311ac6){const _0x2c561b=a0_0x314c3e,_0x1384e1={'\x6a\x78\x62\x61\x73':function(_0x23f38e,_0x13c449,_0x420068,_0x545198,_0x2607a2){return _0x23f38e(_0x13c449,_0x420068,_0x545198,_0x2607a2);}},_0x22fcf4=await this['\x63\x6c\x69\x65\x6e\x74']['\x66\x65\x74\x63\x68']('\x2f\x76\x31\x2f\x74\x65\x61\x6d\x73\x2f'+encodeURIComponent(_0xb97058),{'\x6d\x65\x74\x68\x6f\x64':_0x2c561b(0x167),'\x62\x6f\x64\x79':JSON[_0x2c561b(0x232)](_0x311ac6)});if(!_0x22fcf4['\x6f\x6b']){const _0x5ea629=await _0x22fcf4['\x74\x65\x78\x74']();throw _0x1384e1[_0x2c561b(0x213)](a0_0x4a887c,_0x22fcf4[_0x2c561b(0x1ca)],_0x5ea629,void 0x0,_0x22fcf4[_0x2c561b(0x2e8)]);}return(await _0x22fcf4['\x6a\x73\x6f\x6e']())[_0x2c561b(0x2ab)];}async[a0_0x314c3e(0x1f4)](_0x35af55){const _0x2c8276=a0_0x314c3e,_0x20c9ec={'\x6c\x59\x4e\x51\x62':function(_0x5e7576,_0x3961ce){return _0x5e7576(_0x3961ce);}},_0x3a2f7b=await this[_0x2c8276(0x2bf)][_0x2c8276(0x365)](_0x2c8276(0x166)+_0x20c9ec[_0x2c8276(0x351)](encodeURIComponent,_0x35af55),{'\x6d\x65\x74\x68\x6f\x64':'\x44\x45\x4c\x45\x54\x45'});if(!_0x3a2f7b['\x6f\x6b']){const _0x3602c9=await _0x3a2f7b['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x3a2f7b[_0x2c8276(0x1ca)],_0x3602c9,void 0x0,_0x3a2f7b[_0x2c8276(0x2e8)]);}}async[a0_0x314c3e(0x137)](_0x3e2c31){const _0x5ab1c9=a0_0x314c3e,_0x4be9e1={'\x47\x70\x78\x77\x77':function(_0x48fdfd,_0x4fb28){return _0x48fdfd(_0x4fb28);}},_0x3ed1fa=await this[_0x5ab1c9(0x2bf)][_0x5ab1c9(0x365)]('\x2f\x76\x31\x2f\x74\x65\x61\x6d\x73\x2f'+_0x4be9e1['\x47\x70\x78\x77\x77'](encodeURIComponent,_0x3e2c31)+_0x5ab1c9(0x2e1),{'\x6d\x65\x74\x68\x6f\x64':_0x5ab1c9(0x17e)});if(!_0x3ed1fa['\x6f\x6b']){const _0x3bd314=await _0x3ed1fa[_0x5ab1c9(0x142)]();throw a0_0x4a887c(_0x3ed1fa['\x73\x74\x61\x74\x75\x73'],_0x3bd314,void 0x0,_0x3ed1fa[_0x5ab1c9(0x2e8)]);}}async[a0_0x314c3e(0x1b8)](_0x144d10,_0x36d66a){const _0x55b4af=a0_0x314c3e,_0xe38c57={'\x52\x57\x56\x58\x42':function(_0x427f6e,_0x517c78){return _0x427f6e(_0x517c78);},'\x45\x4e\x4f\x57\x68':function(_0x49c423,_0x48adf0,_0x437467,_0x218c25,_0x102836){return _0x49c423(_0x48adf0,_0x437467,_0x218c25,_0x102836);}},_0x42f5f6=await this[_0x55b4af(0x2bf)][_0x55b4af(0x365)](_0x55b4af(0x166)+_0xe38c57[_0x55b4af(0x35a)](encodeURIComponent,_0x144d10)+'\x2f\x74\x72\x61\x6e\x73\x66\x65\x72',{'\x6d\x65\x74\x68\x6f\x64':_0x55b4af(0x17e),'\x62\x6f\x64\x79':JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79']({'\x6e\x65\x77\x4f\x77\x6e\x65\x72\x43\x75\x73\x74\x6f\x6d\x65\x72\x49\x64':_0x36d66a})});if(!_0x42f5f6['\x6f\x6b']){const _0x1bfd47=await _0x42f5f6['\x74\x65\x78\x74']();throw _0xe38c57[_0x55b4af(0x1c2)](a0_0x4a887c,_0x42f5f6[_0x55b4af(0x1ca)],_0x1bfd47,void 0x0,_0x42f5f6[_0x55b4af(0x2e8)]);}}async[a0_0x314c3e(0x172)](_0xfffbcb){const _0x3b43c2=a0_0x314c3e,_0x26b526=await this[_0x3b43c2(0x2bf)]['\x66\x65\x74\x63\x68'](_0x3b43c2(0x166)+encodeURIComponent(_0xfffbcb)+_0x3b43c2(0x1ec));if(!_0x26b526['\x6f\x6b']){const _0x57accb=await _0x26b526[_0x3b43c2(0x142)]();throw a0_0x4a887c(_0x26b526[_0x3b43c2(0x1ca)],_0x57accb,void 0x0,_0x26b526['\x68\x65\x61\x64\x65\x72\x73']);}return(await _0x26b526[_0x3b43c2(0x32a)]())[_0x3b43c2(0x2df)]??[];}async[a0_0x314c3e(0x152)](_0x19138a,_0xb24be4,_0x2260e5){const _0xab213c=a0_0x314c3e,_0x1ff757={'\x55\x68\x57\x70\x6e':function(_0x33e70a,_0x55fed0){return _0x33e70a(_0x55fed0);}},_0x127eee=await this[_0xab213c(0x2bf)][_0xab213c(0x365)](_0xab213c(0x166)+_0x1ff757[_0xab213c(0x1a9)](encodeURIComponent,_0x19138a)+_0xab213c(0x202)+encodeURIComponent(_0xb24be4),{'\x6d\x65\x74\x68\x6f\x64':_0xab213c(0x167),'\x62\x6f\x64\x79':JSON[_0xab213c(0x232)](_0x2260e5)});if(!_0x127eee['\x6f\x6b']){const _0x323f9e=await _0x127eee[_0xab213c(0x142)]();throw a0_0x4a887c(_0x127eee[_0xab213c(0x1ca)],_0x323f9e,void 0x0,_0x127eee[_0xab213c(0x2e8)]);}return(await _0x127eee[_0xab213c(0x32a)]())[_0xab213c(0x1e3)];}async[a0_0x314c3e(0x28a)](_0x4617ed,_0x25e9b7){const _0x5d5f40=a0_0x314c3e,_0x33bce7={'\x62\x44\x50\x79\x45':function(_0x1e50f9,_0x3a0798){return _0x1e50f9(_0x3a0798);}},_0x1dacdf=await this[_0x5d5f40(0x2bf)][_0x5d5f40(0x365)](_0x5d5f40(0x166)+encodeURIComponent(_0x4617ed)+_0x5d5f40(0x202)+_0x33bce7[_0x5d5f40(0x284)](encodeURIComponent,_0x25e9b7),{'\x6d\x65\x74\x68\x6f\x64':_0x5d5f40(0x144)});if(!_0x1dacdf['\x6f\x6b']){const _0x1ca329=await _0x1dacdf[_0x5d5f40(0x142)]();throw a0_0x4a887c(_0x1dacdf['\x73\x74\x61\x74\x75\x73'],_0x1ca329,void 0x0,_0x1dacdf[_0x5d5f40(0x2e8)]);}}async[a0_0x314c3e(0x1e8)](_0x45cc7b){const _0x123d62=a0_0x314c3e,_0xdc6320=await this[_0x123d62(0x2bf)]['\x66\x65\x74\x63\x68'](_0x123d62(0x166)+encodeURIComponent(_0x45cc7b)+_0x123d62(0x17a));if(!_0xdc6320['\x6f\x6b']){const _0x111908=await _0xdc6320[_0x123d62(0x142)]();throw a0_0x4a887c(_0xdc6320['\x73\x74\x61\x74\x75\x73'],_0x111908,void 0x0,_0xdc6320['\x68\x65\x61\x64\x65\x72\x73']);}return(await _0xdc6320[_0x123d62(0x32a)]())[_0x123d62(0x22d)]??[];}async[a0_0x314c3e(0x2d6)](_0x4ace63,_0x2b8d2e){const _0x19bad8=a0_0x314c3e,_0x54a1d2=await this[_0x19bad8(0x2bf)][_0x19bad8(0x365)](_0x19bad8(0x166)+encodeURIComponent(_0x4ace63)+_0x19bad8(0x17a),{'\x6d\x65\x74\x68\x6f\x64':_0x19bad8(0x17e),'\x62\x6f\x64\x79':JSON[_0x19bad8(0x232)](_0x2b8d2e)});if(!_0x54a1d2['\x6f\x6b']){const _0x26fc8c=await _0x54a1d2['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x54a1d2[_0x19bad8(0x1ca)],_0x26fc8c,void 0x0,_0x54a1d2['\x68\x65\x61\x64\x65\x72\x73']);}return(await _0x54a1d2[_0x19bad8(0x32a)]())['\x69\x6e\x76\x69\x74\x61\x74\x69\x6f\x6e'];}async[a0_0x314c3e(0x314)](_0x347352){const _0x361724=a0_0x314c3e,_0x1f8404={'\x6c\x4e\x66\x64\x6e':function(_0xb5ef58,_0x12ce43){return _0xb5ef58(_0x12ce43);},'\x54\x7a\x77\x71\x41':function(_0x410799,_0x4be411,_0x2cd0cc,_0x2cbd87,_0x597f6e){return _0x410799(_0x4be411,_0x2cd0cc,_0x2cbd87,_0x597f6e);}},_0x3c9948=await this[_0x361724(0x2bf)]['\x66\x65\x74\x63\x68']('\x2f\x76\x31\x2f\x74\x65\x61\x6d\x73\x2f\x69\x6e\x76\x69\x74\x61\x74\x69\x6f\x6e\x73\x2f'+_0x1f8404['\x6c\x4e\x66\x64\x6e'](encodeURIComponent,_0x347352),{'\x6d\x65\x74\x68\x6f\x64':_0x361724(0x144)});if(!_0x3c9948['\x6f\x6b']){const _0x5b4e22=await _0x3c9948[_0x361724(0x142)]();throw _0x1f8404['\x54\x7a\x77\x71\x41'](a0_0x4a887c,_0x3c9948[_0x361724(0x1ca)],_0x5b4e22,void 0x0,_0x3c9948[_0x361724(0x2e8)]);}}async[a0_0x314c3e(0x1e6)](_0x2e9f79){const _0x374ce4=a0_0x314c3e,_0x2e9896={'\x46\x74\x6c\x4a\x61':function(_0x5cbcaa,_0xcb4bac){return _0x5cbcaa(_0xcb4bac);}},_0x57814c=await this['\x63\x6c\x69\x65\x6e\x74'][_0x374ce4(0x365)](_0x374ce4(0x16b)+_0x2e9896[_0x374ce4(0x2f0)](encodeURIComponent,_0x2e9f79)+_0x374ce4(0x215),{'\x6d\x65\x74\x68\x6f\x64':_0x374ce4(0x17e)});if(!_0x57814c['\x6f\x6b']){const _0x4e67ab=await _0x57814c['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x57814c['\x73\x74\x61\x74\x75\x73'],_0x4e67ab,void 0x0,_0x57814c[_0x374ce4(0x2e8)]);}return(await _0x57814c[_0x374ce4(0x32a)]())[_0x374ce4(0x1e3)];}async[a0_0x314c3e(0x1c5)](_0x1e7042){const _0x1079cb=a0_0x314c3e,_0x19a0a5=await this['\x63\x6c\x69\x65\x6e\x74'][_0x1079cb(0x365)](_0x1079cb(0x16b)+encodeURIComponent(_0x1e7042));if(!_0x19a0a5['\x6f\x6b']){const _0x5e2ea4=await _0x19a0a5['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x19a0a5[_0x1079cb(0x1ca)],_0x5e2ea4,void 0x0,_0x19a0a5['\x68\x65\x61\x64\x65\x72\x73']);}return(await _0x19a0a5[_0x1079cb(0x32a)]())[_0x1079cb(0x14f)];}async[a0_0x314c3e(0x362)](_0xfa61e5){const _0x11d455=a0_0x314c3e,_0x95cc35=await this['\x63\x6c\x69\x65\x6e\x74']['\x66\x65\x74\x63\x68'](_0x11d455(0x166)+encodeURIComponent(_0xfa61e5)+_0x11d455(0x236));if(!_0x95cc35['\x6f\x6b']){const _0x3165d8=await _0x95cc35[_0x11d455(0x142)]();throw a0_0x4a887c(_0x95cc35[_0x11d455(0x1ca)],_0x3165d8,void 0x0,_0x95cc35[_0x11d455(0x2e8)]);}return(await _0x95cc35[_0x11d455(0x32a)]())[_0x11d455(0x2c3)]??[];}async[a0_0x314c3e(0x1e1)](_0x1d8566,_0x55ef2c,_0x186263){const _0x53e91f=a0_0x314c3e,_0x19e8f1={'\x47\x46\x6e\x4f\x6d':function(_0x24629e,_0x56a9dc){return _0x24629e(_0x56a9dc);}},_0x21dac7=await this[_0x53e91f(0x2bf)][_0x53e91f(0x365)](_0x53e91f(0x166)+_0x19e8f1['\x47\x46\x6e\x4f\x6d'](encodeURIComponent,_0x1d8566)+_0x53e91f(0x165)+encodeURIComponent(_0x55ef2c),{'\x6d\x65\x74\x68\x6f\x64':_0x53e91f(0x177),'\x62\x6f\x64\x79':JSON[_0x53e91f(0x232)]({'\x76\x61\x6c\x75\x65':_0x186263})});if(!_0x21dac7['\x6f\x6b']){const _0x4f0eab=await _0x21dac7[_0x53e91f(0x142)]();throw a0_0x4a887c(_0x21dac7[_0x53e91f(0x1ca)],_0x4f0eab,void 0x0,_0x21dac7[_0x53e91f(0x2e8)]);}return(await _0x21dac7[_0x53e91f(0x32a)]())[_0x53e91f(0x19e)];}async[a0_0x314c3e(0x1f1)](_0x42e0cb,_0x9f1741){const _0x257f54=a0_0x314c3e,_0x316e12={'\x78\x51\x53\x4b\x62':function(_0x3b07e0,_0xa6acef){return _0x3b07e0(_0xa6acef);},'\x41\x44\x71\x43\x6b':_0x257f54(0x144),'\x52\x6a\x65\x48\x52':function(_0x4c3bd0,_0x2cb8a1,_0x396317,_0x1d1b88,_0x3de07a){return _0x4c3bd0(_0x2cb8a1,_0x396317,_0x1d1b88,_0x3de07a);}},_0x7e29d6=await this[_0x257f54(0x2bf)][_0x257f54(0x365)](_0x257f54(0x166)+_0x316e12['\x78\x51\x53\x4b\x62'](encodeURIComponent,_0x42e0cb)+_0x257f54(0x165)+encodeURIComponent(_0x9f1741),{'\x6d\x65\x74\x68\x6f\x64':_0x316e12[_0x257f54(0x241)]});if(!_0x7e29d6['\x6f\x6b']){const _0x3e0ec7=await _0x7e29d6[_0x257f54(0x142)]();throw _0x316e12['\x52\x6a\x65\x48\x52'](a0_0x4a887c,_0x7e29d6[_0x257f54(0x1ca)],_0x3e0ec7,void 0x0,_0x7e29d6[_0x257f54(0x2e8)]);}}async[a0_0x314c3e(0x1f5)](_0x1f5b75,_0x51e5fc){const _0x5a73ae=a0_0x314c3e,_0x5b9561=await this[_0x5a73ae(0x2bf)][_0x5a73ae(0x365)]('\x2f\x76\x31\x2f\x74\x65\x61\x6d\x73\x2f'+encodeURIComponent(_0x1f5b75)+'\x2f\x73\x65\x63\x72\x65\x74\x73\x2f'+encodeURIComponent(_0x51e5fc)+_0x5a73ae(0x1ab),{'\x6d\x65\x74\x68\x6f\x64':_0x5a73ae(0x17e)});if(!_0x5b9561['\x6f\x6b']){const _0x58de3d=await _0x5b9561['\x74\x65\x78\x74']();throw a0_0x4a887c(_0x5b9561[_0x5a73ae(0x1ca)],_0x58de3d,void 0x0,_0x5b9561[_0x5a73ae(0x2e8)]);}return await _0x5b9561['\x6a\x73\x6f\x6e']();}async[a0_0x314c3e(0x150)](_0x13f030){const _0xe7c857=a0_0x314c3e,_0x20e329={'\x4c\x54\x4b\x5a\x6f':function(_0x557be1,_0x511dd3,_0x2dbb04,_0x11b08b,_0x753e62){return _0x557be1(_0x511dd3,_0x2dbb04,_0x11b08b,_0x753e62);}},_0x65ae16=await this[_0xe7c857(0x2bf)]['\x66\x65\x74\x63\x68']('\x2f\x76\x31\x2f\x74\x65\x61\x6d\x73\x2f'+encodeURIComponent(_0x13f030)+_0xe7c857(0x267));if(!_0x65ae16['\x6f\x6b']){const _0xdc7437=await _0x65ae16[_0xe7c857(0x142)]();throw _0x20e329[_0xe7c857(0x347)](a0_0x4a887c,_0x65ae16[_0xe7c857(0x1ca)],_0xdc7437,void 0x0,_0x65ae16[_0xe7c857(0x2e8)]);}return(await _0x65ae16['\x6a\x73\x6f\x6e']())[_0xe7c857(0x12a)]??[];}async[a0_0x314c3e(0x1a6)](_0x474eec,_0x2a2259){const _0x208c1e=a0_0x314c3e,_0x12e68c=await this['\x63\x6c\x69\x65\x6e\x74'][_0x208c1e(0x365)](_0x208c1e(0x166)+encodeURIComponent(_0x474eec)+_0x208c1e(0x267),{'\x6d\x65\x74\x68\x6f\x64':_0x208c1e(0x17e),'\x62\x6f\x64\x79':JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79']({'\x6e\x61\x6d\x65':_0x2a2259['\x6e\x61\x6d\x65'],'\x73\x6e\x61\x70\x73\x68\x6f\x74\x49\x64':_0x2a2259[_0x208c1e(0x181)],'\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e':_0x2a2259[_0x208c1e(0x2e4)],'\x65\x6e\x76\x69\x72\x6f\x6e\x6d\x65\x6e\x74':_0x2a2259['\x65\x6e\x76\x69\x72\x6f\x6e\x6d\x65\x6e\x74'],'\x63\x6f\x6e\x66\x69\x67':_0x2a2259[_0x208c1e(0x256)]})});if(!_0x12e68c['\x6f\x6b']){const _0x16a3b9=await _0x12e68c[_0x208c1e(0x142)]();throw a0_0x4a887c(_0x12e68c['\x73\x74\x61\x74\x75\x73'],_0x16a3b9,void 0x0,_0x12e68c[_0x208c1e(0x2e8)]);}return(await _0x12e68c[_0x208c1e(0x32a)]())[_0x208c1e(0x30f)];}async[a0_0x314c3e(0x2ee)](_0x350ed3,_0xc3a27f){const _0x3a8188=a0_0x314c3e,_0x11ccd7={'\x66\x51\x5a\x73\x71':function(_0x5c9b4b,_0x22edb4){return _0x5c9b4b(_0x22edb4);}},_0x2a57ea=await this[_0x3a8188(0x2bf)]['\x66\x65\x74\x63\x68'](_0x3a8188(0x166)+encodeURIComponent(_0x350ed3)+_0x3a8188(0x146)+_0x11ccd7[_0x3a8188(0x13b)](encodeURIComponent,_0xc3a27f),{'\x6d\x65\x74\x68\x6f\x64':'\x44\x45\x4c\x45\x54\x45'});if(!_0x2a57ea['\x6f\x6b']){const _0x1e3f42=await _0x2a57ea[_0x3a8188(0x142)]();throw a0_0x4a887c(_0x2a57ea[_0x3a8188(0x1ca)],_0x1e3f42,void 0x0,_0x2a57ea[_0x3a8188(0x2e8)]);}}};export{DEFAULT_SANDBOX_SIZE as a,resolveSandboxResources as c,SandboxFleetClient as i,sandboxResourcesForSize as l,SandboxClient as n,SANDBOX_SIZE_PRESETS as o,SandboxFleet as r,SANDBOX_SIZE_PRESET_NAMES as s,IntelligenceClient as t};function a0_0x882c(){const _0x19b32d=['\x79\x32\x39\x55\x7a\x4d\x4c\x4b\x7a\x77\x35\x30\x41\x77\x66\x53','\x6c\x33\x72\x4c\x42\x78\x62\x53\x79\x78\x72\x4c\x43\x57','\x6c\x33\x72\x56\x41\x32\x76\x55','\x44\x32\x39\x59\x41\x33\x6e\x57\x79\x77\x6e\x4c','\x73\x4d\x4c\x34\x72\x67\x4f','\x78\x33\x62\x31\x79\x4d\x58\x50\x79\x31\x72\x4c\x42\x78\x62\x53\x79\x78\x72\x4c\x43\x57','\x43\x68\x76\x49\x42\x67\x4c\x5a\x41\x66\x7a\x4c\x43\x4e\x6e\x50\x42\x32\x34','\x45\x63\x31\x30\x79\x77\x35\x4e\x42\x67\x75\x54\x43\x4d\x76\x58\x44\x77\x76\x5a\x44\x63\x31\x54\x7a\x78\x72\x4f\x42\x32\x71','\x79\x32\x39\x54\x43\x67\x66\x59\x7a\x76\x72\x56','\x41\x68\x48\x4c\x73\x33\x6d','\x77\x77\x6a\x4d\x77\x4b\x4f','\x75\x32\x48\x56\x44\x66\x71','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x67\x76\x5a','\x42\x77\x76\x30\x79\x77\x72\x48\x44\x67\x65','\x71\x68\x72\x48\x42\x4d\x44\x53\x7a\x73\x31\x55\x7a\x78\x72\x33\x42\x33\x6a\x52\x6c\x33\x6e\x48\x42\x4d\x72\x49\x42\x33\x47','\x79\x32\x58\x48\x44\x77\x72\x4c','\x79\x77\x58\x53\x42\x33\x44\x4c\x7a\x65\x72\x59\x41\x78\x7a\x4c\x43\x4e\x6d','\x44\x68\x4c\x57\x7a\x71','\x43\x67\x76\x55\x7a\x67\x4c\x55\x7a\x57','\x6c\x32\x72\x50\x43\x33\x62\x48\x44\x67\x6e\x4f','\x72\x66\x6e\x70\x79\x4c\x79','\x76\x65\x66\x4e\x71\x33\x65','\x44\x67\x39\x74\x44\x68\x6a\x50\x42\x4d\x43','\x71\x30\x44\x75\x75\x76\x4f','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x79\x32\x39\x5a\x44\x63\x62\x4c\x43\x33\x72\x50\x42\x77\x66\x30\x7a\x73\x62\x59\x7a\x78\x66\x31\x41\x78\x6a\x4c\x43\x59\x62\x48\x44\x63\x62\x53\x7a\x77\x66\x5a\x44\x63\x62\x56\x42\x4d\x75\x47\x42\x77\x66\x4a\x41\x67\x4c\x55\x7a\x71','\x42\x76\x44\x32\x42\x67\x65','\x43\x78\x76\x4c\x43\x4e\x4b','\x7a\x33\x62\x31\x75\x4d\x76\x58\x44\x77\x4c\x59\x7a\x77\x71','\x41\x77\x72\x53\x7a\x76\x72\x50\x42\x77\x76\x56\x44\x78\x72\x74\x7a\x77\x6e\x56\x42\x4d\x72\x5a','\x42\x67\x66\x59\x7a\x32\x75','\x79\x4b\x72\x71\x45\x75\x75','\x44\x67\x76\x48\x42\x75\x4c\x4b','\x74\x32\x35\x73\x44\x75\x4f','\x43\x68\x76\x49\x42\x67\x4c\x4a\x76\x67\x76\x54\x43\x67\x58\x48\x44\x67\x76\x6a\x7a\x61','\x79\x33\x6a\x35\x43\x68\x72\x56','\x79\x33\x76\x59\x43\x32\x39\x59','\x43\x4d\x76\x54\x42\x33\x7a\x4c\x74\x77\x76\x54\x79\x4d\x76\x59','\x7a\x4c\x7a\x33\x77\x77\x43','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x71\x77\x44\x4c\x42\x4e\x72\x50\x79\x31\x6a\x4c\x43\x67\x39\x59\x44\x61','\x6c\x33\x79\x58\x6c\x32\x4c\x55\x44\x67\x76\x53\x42\x67\x4c\x4e\x7a\x77\x35\x4a\x7a\x73\x39\x59\x7a\x78\x62\x56\x43\x4e\x72\x5a\x6c\x57','\x44\x30\x76\x6e\x7a\x4c\x71','\x42\x77\x66\x34\x71\x32\x39\x55\x79\x33\x76\x59\x43\x4d\x76\x55\x44\x61','\x78\x33\x72\x56\x41\x32\x76\x55\x75\x4d\x76\x4d\x43\x4d\x76\x5a\x41\x65\x48\x48\x42\x4d\x72\x53\x7a\x78\x6a\x5a','\x6d\x74\x69\x33\x6c\x4a\x61\x55\x6d\x63\x34\x58','\x43\x67\x58\x48\x42\x47','\x41\x31\x66\x62\x79\x30\x30','\x7a\x4d\x58\x4c\x7a\x78\x72\x6a\x7a\x61','\x72\x4d\x66\x50\x42\x67\x76\x4b\x69\x68\x72\x56\x69\x67\x6e\x56\x42\x4d\x35\x4c\x79\x33\x71\x47\x44\x67\x38\x47\x75\x32\x66\x55\x7a\x67\x6a\x56\x45\x63\x62\x62\x75\x65\x4b\x36\x69\x61','\x6c\x33\x79\x58\x6c\x32\x7a\x53\x7a\x77\x76\x30\x43\x59\x39\x4a\x79\x78\x62\x48\x79\x4d\x4c\x53\x41\x78\x72\x50\x7a\x78\x6d','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4d\x6e\x59\x7a\x77\x66\x30\x7a\x77\x72\x46\x79\x4e\x4b','\x6f\x74\x71\x32\x6d\x5a\x71\x32\x6e\x67\x6e\x68\x79\x4e\x7a\x78\x74\x61','\x42\x77\x66\x34\x71\x4e\x4c\x30\x7a\x78\x6d','\x78\x33\x72\x4c\x79\x77\x31\x5a','\x44\x78\x62\x4b\x79\x78\x72\x4c\x7a\x65\x66\x30','\x6a\x59\x62\x59\x7a\x78\x66\x31\x7a\x78\x6e\x30\x7a\x77\x71\x47\x41\x77\x31\x48\x7a\x32\x75\x47\x6a\x57','\x6d\x4a\x48\x4e\x76\x4c\x50\x5a\x73\x76\x61','\x79\x78\x72\x30\x79\x77\x6e\x4f\x74\x77\x66\x4a\x41\x67\x4c\x55\x7a\x71','\x7a\x78\x48\x4c\x79\x57','\x41\x67\x66\x5a','\x6a\x59\x62\x56\x44\x78\x72\x5a\x41\x77\x72\x4c\x69\x68\x62\x56\x42\x67\x4c\x4a\x45\x73\x35\x48\x42\x67\x58\x56\x44\x32\x76\x4b\x73\x77\x31\x48\x7a\x32\x76\x5a','\x44\x67\x66\x5a\x41\x59\x35\x4a\x42\x32\x31\x57\x42\x67\x76\x30\x7a\x77\x71','\x42\x4d\x39\x30\x78\x32\x7a\x56\x44\x77\x35\x4b','\x7a\x67\x6a\x75\x7a\x67\x34','\x43\x30\x44\x53\x71\x4b\x38','\x7a\x78\x6e\x30\x41\x77\x31\x48\x44\x67\x76\x64\x42\x33\x6e\x30','\x7a\x4e\x6a\x56\x42\x76\x6e\x55\x79\x78\x62\x5a\x41\x67\x39\x30','\x42\x77\x66\x34\x75\x33\x62\x4c\x42\x4d\x72\x76\x43\x32\x71','\x43\x32\x4c\x4e\x42\x4d\x66\x53','\x72\x4d\x58\x4c\x7a\x78\x71','\x44\x67\x76\x48\x42\x71','\x43\x33\x72\x59\x7a\x77\x66\x54\x71\x4d\x66\x30\x79\x32\x47','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x63\x31\x48\x43\x67\x4b','\x7a\x77\x35\x4a\x42\x32\x72\x4c','\x6c\x33\x79\x58\x6c\x33\x6e\x5a\x41\x63\x31\x52\x7a\x78\x4c\x5a\x6c\x57','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x75\x4d\x76\x57\x42\x33\x6a\x30','\x6c\x33\x72\x59\x79\x77\x6e\x4c','\x44\x68\x6a\x31\x43\x33\x72\x6d\x42\x32\x6e\x48\x42\x65\x6e\x53\x41\x75\x66\x31\x44\x67\x47','\x42\x77\x76\x4b\x41\x78\x76\x54','\x43\x4d\x76\x48\x7a\x61','\x7a\x78\x6a\x59\x42\x33\x69','\x75\x31\x4c\x41\x72\x66\x4f','\x43\x33\x76\x49\x41\x4d\x76\x4a\x44\x65\x4c\x4b','\x43\x4d\x76\x5a\x44\x77\x58\x30\x75\x33\x76\x54\x42\x77\x66\x59\x45\x71','\x42\x77\x76\x5a\x43\x32\x66\x4e\x7a\x71','\x71\x78\x76\x54\x77\x76\x4b','\x43\x32\x31\x48\x42\x67\x57','\x6a\x59\x62\x56\x44\x78\x72\x5a\x41\x77\x72\x4c\x69\x68\x62\x56\x42\x67\x4c\x4a\x45\x73\x35\x48\x42\x67\x58\x56\x44\x32\x76\x4b\x72\x68\x6a\x50\x44\x4d\x76\x59\x43\x57','\x6c\x32\x72\x50\x43\x33\x62\x48\x44\x67\x6e\x4f\x6c\x57','\x41\x77\x35\x57\x44\x78\x72\x75\x42\x32\x54\x4c\x42\x4e\x6d','\x79\x32\x58\x50\x7a\x77\x35\x30','\x45\x63\x31\x30\x79\x77\x35\x4e\x42\x67\x75\x54\x43\x4d\x76\x58\x44\x77\x76\x5a\x44\x63\x31\x57\x79\x78\x72\x4f','\x6c\x33\x79\x58\x6c\x33\x62\x31\x79\x4d\x58\x50\x79\x59\x31\x30\x7a\x77\x31\x57\x42\x67\x66\x30\x7a\x78\x6d','\x43\x33\x62\x53\x41\x78\x71','\x43\x32\x76\x4a\x43\x4d\x76\x30\x43\x57','\x75\x4d\x44\x59\x44\x76\x4b','\x42\x77\x39\x31\x42\x4e\x72\x71\x79\x78\x72\x4f','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x79\x33\x6a\x4c\x79\x78\x72\x4c\x69\x68\x6a\x4c\x43\x78\x76\x50\x43\x4d\x76\x5a\x69\x67\x66\x30\x69\x67\x58\x4c\x79\x78\x6e\x30\x69\x67\x39\x55\x7a\x73\x62\x54\x79\x77\x6e\x4f\x41\x77\x35\x4c','\x43\x33\x76\x49\x41\x4d\x76\x4a\x44\x66\x72\x35\x43\x67\x75','\x74\x67\x39\x4a\x79\x77\x57\x47','\x69\x67\x6a\x48\x79\x32\x54\x4c\x42\x4d\x71\x47\x43\x4d\x76\x58\x44\x77\x76\x5a\x44\x67\x76\x4b\x69\x67\x7a\x56\x43\x49\x61','\x75\x76\x50\x62\x72\x78\x4b','\x79\x77\x58\x53\x42\x33\x44\x4c\x7a\x66\x72\x4c\x42\x78\x62\x53\x79\x78\x72\x4c\x73\x77\x72\x5a','\x42\x67\x66\x5a\x44\x65\x66\x4a\x44\x67\x4c\x32\x41\x78\x72\x35\x71\x78\x71','\x73\x77\x76\x69\x7a\x78\x6d','\x76\x77\x35\x52\x42\x4d\x39\x33\x42\x49\x62\x4d\x42\x67\x76\x4c\x44\x63\x62\x54\x79\x77\x6e\x4f\x41\x77\x35\x4c\x69\x63\x43','\x79\x33\x6a\x4c\x7a\x67\x4c\x30\x43\x30\x66\x32\x79\x77\x4c\x53\x79\x77\x6a\x53\x7a\x76\x76\x5a\x7a\x61','\x7a\x67\x4c\x5a\x41\x30\x44\x63','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4d\x31\x48\x79\x32\x48\x50\x42\x4d\x76\x46\x43\x4d\x39\x53\x7a\x71','\x43\x75\x35\x66\x71\x31\x71','\x75\x32\x66\x55\x7a\x67\x6a\x56\x45\x63\x62\x4a\x43\x4d\x76\x48\x44\x67\x75\x47\x7a\x67\x4c\x4b\x69\x67\x35\x56\x44\x63\x62\x4a\x42\x32\x31\x57\x42\x67\x76\x30\x7a\x73\x62\x33\x41\x78\x72\x4f\x41\x77\x34\x47','\x42\x67\x4c\x54\x41\x78\x71','\x79\x77\x6e\x30\x41\x78\x7a\x4c','\x41\x77\x35\x32\x41\x78\x72\x4c','\x43\x33\x72\x48\x43\x4e\x72\x4c\x7a\x65\x66\x30','\x69\x67\x58\x56\x7a\x32\x4c\x55\x79\x63\x62\x50\x42\x4e\x6e\x50\x7a\x67\x75\x47\x44\x67\x48\x4c\x69\x68\x6e\x48\x42\x4d\x72\x49\x42\x33\x47\x55','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4e\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x73\x35\x54\x42\x33\x76\x55\x44\x66\x39\x57\x79\x78\x72\x4f','\x78\x33\x6e\x4c\x79\x33\x6a\x4c\x44\x68\x6d','\x41\x78\x6e\x56\x42\x67\x66\x30\x7a\x77\x71','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x71\x43\x4d\x39\x54\x43\x68\x72\x74\x44\x68\x6a\x4c\x79\x77\x30','\x44\x67\x66\x5a\x41\x30\x4c\x4b','\x6c\x33\x79\x58\x6c\x33\x6e\x4c\x79\x33\x6a\x4c\x44\x68\x6d','\x42\x77\x76\x54\x79\x4d\x76\x59\x43\x57','\x71\x4e\x48\x69\x45\x77\x71','\x6c\x32\x58\x4c\x79\x78\x7a\x4c','\x42\x67\x4c\x5a\x44\x65\x6a\x35\x75\x32\x66\x55\x7a\x67\x6a\x56\x45\x65\x31\x4c\x44\x67\x66\x4b\x79\x78\x72\x48','\x6c\x33\x79\x58\x6c\x32\x4c\x55\x44\x67\x76\x53\x42\x67\x4c\x4e\x7a\x77\x35\x4a\x7a\x73\x39\x59\x7a\x78\x62\x56\x43\x4e\x72\x5a','\x7a\x67\x76\x5a\x79\x33\x6a\x50\x43\x68\x72\x50\x42\x32\x34','\x79\x4c\x4c\x6f\x75\x76\x71','\x42\x77\x66\x34\x76\x67\x39\x30\x79\x77\x58\x74\x44\x67\x39\x59\x79\x77\x44\x4c\x74\x77\x69','\x43\x4d\x76\x57\x42\x33\x6a\x30\x43\x57','\x41\x67\x76\x48\x7a\x67\x76\x59\x43\x57','\x7a\x77\x35\x32','\x6f\x4a\x4f\x58','\x72\x65\x66\x72\x74\x30\x38','\x76\x78\x72\x62\x42\x4e\x65','\x42\x4b\x76\x55\x44\x4d\x71','\x7a\x67\x76\x53\x7a\x78\x72\x4c\x76\x67\x76\x54\x43\x67\x58\x48\x44\x67\x75','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x73\x7a\x78\x6e\x31\x42\x68\x72\x5a','\x72\x4e\x72\x53\x73\x4d\x65','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x71\x43\x4d\x39\x54\x43\x68\x72\x65\x7a\x78\x72\x48\x41\x77\x58\x4c\x7a\x61','\x6c\x33\x79\x58\x6c\x32\x4c\x55\x44\x67\x76\x53\x42\x67\x4c\x4e\x7a\x77\x35\x4a\x7a\x73\x39\x59\x7a\x78\x62\x56\x43\x4e\x72\x5a\x6c\x32\x76\x5a\x44\x67\x4c\x54\x79\x78\x72\x4c','\x6c\x4d\x6e\x56\x7a\x67\x76\x34\x6c\x32\x66\x31\x44\x67\x47\x55\x41\x4e\x6e\x56\x42\x47','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x65\x4c\x4b','\x44\x32\x66\x50\x44\x65\x7a\x56\x43\x47','\x44\x78\x62\x4b\x79\x78\x72\x4c','\x41\x33\x66\x68\x73\x75\x79','\x79\x78\x76\x30\x41\x65\x7a\x50\x42\x67\x76\x5a','\x71\x4d\x66\x30\x79\x32\x47\x47\x79\x77\x6a\x56\x43\x4e\x72\x4c\x7a\x61','\x79\x78\x6a\x30\x41\x77\x7a\x48\x79\x33\x71\x55\x42\x77\x66\x34\x71\x4e\x4c\x30\x7a\x78\x6d\x47\x42\x78\x76\x5a\x44\x63\x62\x49\x7a\x73\x62\x48\x69\x68\x62\x56\x43\x32\x4c\x30\x41\x78\x7a\x4c\x69\x67\x35\x31\x42\x77\x6a\x4c\x43\x47','\x44\x4d\x76\x59\x43\x32\x4c\x56\x42\x4e\x6d','\x6c\x33\x6a\x4c\x43\x33\x72\x56\x43\x4d\x75','\x42\x4d\x39\x33','\x46\x49\x38\x55\x79\x32\x39\x4b\x7a\x78\x47\x56\x79\x78\x76\x30\x41\x63\x35\x51\x43\x32\x39\x55','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x42\x77\x66\x4a\x41\x67\x4c\x55\x7a\x73\x61\x4e','\x79\x32\x39\x55\x44\x67\x4c\x55\x44\x77\x76\x70\x42\x4b\x76\x59\x43\x4d\x39\x59','\x6a\x59\x62\x59\x7a\x78\x66\x31\x7a\x78\x6e\x30\x7a\x77\x71\x47\x79\x77\x6e\x4a\x7a\x77\x58\x4c\x43\x4d\x66\x30\x42\x33\x6a\x5a\x69\x67\x6a\x31\x44\x63\x62\x57\x42\x32\x58\x50\x79\x33\x4b\x55\x79\x77\x58\x53\x42\x33\x44\x62\x79\x32\x6e\x4c\x42\x67\x76\x59\x79\x78\x72\x56\x43\x4e\x6d\x47\x41\x78\x6d\x47\x7a\x4d\x66\x53\x43\x32\x75','\x43\x67\x76\x59\x43\x32\x4c\x5a\x44\x67\x76\x55\x44\x61','\x79\x32\x39\x31\x42\x4e\x71','\x43\x33\x72\x59\x41\x77\x35\x4e','\x6a\x59\x62\x50\x43\x59\x62\x59\x7a\x78\x6e\x4c\x43\x4e\x7a\x4c\x7a\x63\x62\x49\x45\x73\x62\x75\x79\x77\x35\x4e\x42\x67\x75','\x41\x78\x76\x4b\x79\x4e\x61','\x42\x77\x66\x4a\x41\x67\x4c\x55\x7a\x78\x6d','\x7a\x4d\x58\x4c\x7a\x78\x71','\x44\x4d\x66\x53\x44\x77\x75','\x42\x32\x7a\x4d\x43\x32\x76\x30','\x42\x32\x76\x63\x43\x76\x65','\x76\x65\x72\x4b\x72\x4c\x69','\x69\x67\x6e\x56\x42\x4d\x6e\x31\x43\x4e\x6a\x4c\x42\x4e\x71\x47\x79\x33\x6a\x4c\x79\x78\x72\x4c\x43\x59\x62\x49\x44\x78\x71\x47\x43\x67\x39\x53\x41\x77\x6e\x35\x6c\x4d\x31\x48\x45\x65\x6e\x56\x42\x4d\x6e\x31\x43\x4e\x6a\x4c\x42\x4e\x72\x64\x43\x4d\x76\x48\x44\x67\x76\x5a\x69\x67\x4c\x5a\x69\x61','\x6a\x59\x62\x4c\x45\x67\x6e\x4c\x7a\x77\x72\x4c\x7a\x63\x61','\x44\x67\x76\x54\x43\x67\x58\x48\x44\x67\x75','\x7a\x33\x6a\x48\x79\x32\x76\x6e\x43\x57','\x79\x32\x39\x4b\x7a\x78\x47','\x73\x33\x72\x71\x74\x4d\x71','\x73\x66\x50\x75\x41\x76\x69','\x43\x4d\x76\x32\x42\x32\x54\x4c\x73\x77\x35\x32\x41\x78\x72\x48\x44\x67\x4c\x56\x42\x47','\x6c\x32\x6a\x48\x44\x67\x6e\x4f\x6c\x33\x6a\x31\x42\x47','\x73\x67\x48\x73\x7a\x32\x69','\x7a\x68\x76\x57\x42\x67\x4c\x4a\x79\x78\x72\x4c','\x7a\x66\x72\x56\x45\x66\x43','\x7a\x4d\x4c\x53\x44\x67\x76\x59','\x79\x32\x54\x67\x73\x67\x4f','\x77\x4c\x44\x79\x7a\x4e\x61','\x42\x77\x4c\x5a\x43\x32\x4c\x55\x7a\x31\x39\x5a\x79\x77\x35\x4b\x79\x4d\x39\x34','\x7a\x33\x62\x31\x71\x32\x39\x31\x42\x4e\x71','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x41\x77\x71\x47\x7a\x32\x76\x55\x7a\x78\x6a\x48\x44\x67\x4c\x56\x42\x49\x62\x59\x7a\x78\x66\x31\x41\x78\x6a\x4c\x43\x59\x62\x4e\x42\x67\x39\x49\x79\x77\x57\x47\x79\x33\x6a\x35\x43\x68\x72\x56','\x44\x67\x66\x5a\x41\x59\x35\x4d\x79\x77\x4c\x53\x7a\x77\x71','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4d\x4c\x4b','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x61','\x7a\x4d\x76\x48\x44\x68\x76\x59\x7a\x77\x72\x70\x42\x4d\x58\x35','\x69\x65\x31\x63\x69\x68\x6e\x30\x42\x33\x6a\x48\x7a\x32\x75\x47\x79\x4e\x76\x30\x69\x68\x62\x56\x42\x67\x4c\x4a\x45\x73\x35\x54\x79\x78\x48\x75\x42\x33\x72\x48\x42\x66\x6e\x30\x42\x33\x6a\x48\x7a\x32\x76\x6e\x79\x49\x62\x50\x43\x59\x61','\x79\x77\x58\x53\x75\x32\x76\x30\x44\x67\x58\x4c\x7a\x61','\x79\x4d\x39\x4b\x45\x71','\x78\x32\x4c\x55\x44\x67\x76\x53\x42\x67\x4c\x4e\x7a\x77\x35\x4a\x7a\x71','\x43\x67\x39\x53\x41\x77\x6e\x35\x6c\x4d\x31\x48\x45\x65\x6e\x56\x42\x4d\x6e\x31\x43\x4e\x6a\x4c\x42\x4e\x72\x64\x43\x4d\x76\x48\x44\x67\x76\x5a\x69\x67\x31\x31\x43\x33\x71\x47\x79\x4d\x75\x47\x79\x73\x62\x57\x42\x33\x6e\x50\x44\x67\x4c\x32\x7a\x73\x62\x50\x42\x4e\x72\x4c\x7a\x32\x76\x59','\x7a\x77\x35\x32\x41\x78\x6a\x56\x42\x4d\x31\x4c\x42\x4e\x71','\x41\x32\x76\x35\x43\x57','\x41\x4e\x6e\x56\x42\x47','\x44\x68\x6a\x31\x7a\x71','\x6c\x33\x79\x58\x6c\x32\x76\x55\x44\x4d\x4c\x59\x42\x32\x35\x54\x7a\x77\x35\x30\x43\x57','\x42\x4d\x39\x4b\x7a\x74\x50\x56\x43\x57','\x79\x33\x6a\x55\x44\x32\x38','\x42\x77\x66\x55\x41\x77\x7a\x4c\x43\x33\x71','\x77\x67\x7a\x31\x74\x4e\x65','\x79\x33\x76\x5a\x44\x67\x39\x54\x7a\x78\x69','\x7a\x4d\x58\x4c\x7a\x78\x72\x5a','\x78\x32\x7a\x53\x7a\x77\x76\x30\x43\x57','\x43\x33\x6e\x4f\x75\x68\x76\x49\x42\x67\x4c\x4a\x73\x32\x76\x35','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x79\x78\x6a\x30\x41\x77\x7a\x48\x79\x33\x71\x47\x43\x67\x66\x30\x41\x63\x61\x4e','\x43\x68\x76\x5a\x41\x61','\x43\x4c\x6e\x50\x75\x66\x79','\x7a\x4d\x58\x48\x44\x65\x31\x48\x43\x61','\x44\x78\x6a\x53','\x72\x4d\x39\x67\x79\x33\x4f','\x7a\x32\x4c\x30','\x43\x4d\x76\x57\x42\x33\x6a\x30','\x43\x68\x6a\x56\x44\x4d\x4c\x5a\x41\x77\x39\x55\x41\x77\x35\x4e','\x75\x67\x58\x56\x41\x4d\x43','\x43\x33\x72\x56\x43\x4d\x66\x4e\x7a\x71','\x42\x77\x66\x34\x71\x32\x39\x55\x79\x33\x76\x59\x43\x4d\x76\x55\x44\x65\x6e\x59\x7a\x77\x66\x30\x7a\x78\x6d','\x6d\x4a\x43\x32\x6e\x4a\x6a\x35\x72\x30\x66\x7a\x7a\x31\x43','\x43\x67\x39\x53\x41\x77\x6e\x35','\x79\x77\x58\x53\x42\x33\x44\x62\x79\x32\x6e\x4c\x42\x67\x76\x59\x79\x78\x72\x56\x43\x4e\x6d','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x66\x45\x67\x76\x4a\x72\x67\x76\x30\x79\x77\x4c\x53\x7a\x77\x71','\x44\x4d\x76\x59\x43\x32\x4c\x56\x42\x47','\x72\x32\x72\x79\x43\x30\x69','\x74\x66\x72\x6c\x77\x4d\x38','\x79\x77\x72\x4b','\x42\x77\x66\x34\x76\x67\x39\x30\x79\x77\x58\x62\x79\x32\x6e\x4c\x42\x67\x76\x59\x79\x78\x72\x56\x43\x4e\x6d','\x42\x77\x76\x30\x41\x67\x39\x4b','\x7a\x33\x62\x31','\x6d\x74\x72\x6a\x75\x31\x76\x6e\x72\x76\x6d','\x43\x33\x6e\x4f\x73\x32\x76\x35\x73\x77\x72\x5a','\x42\x77\x4c\x55','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4d\x31\x48\x79\x32\x48\x50\x42\x4d\x76\x46\x41\x77\x71','\x43\x66\x7a\x78\x75\x31\x47','\x42\x66\x4c\x6f\x75\x77\x69','\x76\x32\x6a\x65\x44\x76\x6d','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x43\x68\x6a\x56\x42\x78\x62\x30\x69\x68\x62\x59\x42\x32\x72\x31\x79\x32\x76\x4b\x69\x67\x35\x56\x69\x68\x6a\x4c\x43\x33\x76\x53\x44\x63\x62\x4d\x42\x33\x69\x47\x42\x77\x66\x4a\x41\x67\x4c\x55\x7a\x73\x61\x4e','\x7a\x77\x44\x59\x7a\x78\x6e\x5a\x75\x67\x39\x53\x41\x77\x6e\x35','\x44\x32\x76\x49\x76\x67\x76\x59\x42\x77\x4c\x55\x79\x77\x58\x66\x42\x4d\x66\x49\x42\x67\x76\x4b','\x44\x67\x39\x56\x78\x32\x58\x48\x43\x4d\x44\x4c','\x6d\x4a\x61\x57\x6d\x5a\x69\x34\x6e\x4d\x72\x69\x74\x4b\x54\x48\x73\x47','\x71\x4d\x66\x30\x79\x32\x47\x47\x7a\x4d\x66\x50\x42\x67\x76\x4b','\x7a\x78\x48\x57\x41\x78\x6a\x4c\x43\x30\x66\x30','\x75\x4c\x44\x77\x77\x65\x69','\x42\x33\x44\x6b\x72\x65\x75','\x42\x33\x76\x30\x43\x32\x4c\x4b\x7a\x76\x39\x33\x42\x33\x6a\x52\x43\x33\x62\x48\x79\x32\x75','\x6e\x5a\x69\x58\x6d\x64\x4b\x57\x6f\x67\x39\x64\x45\x4b\x35\x77\x75\x71','\x41\x77\x35\x32\x79\x77\x58\x50\x7a\x61','\x6c\x32\x31\x48\x42\x4d\x4c\x4d\x7a\x78\x6e\x30','\x69\x67\x6a\x35\x44\x67\x76\x5a','\x73\x31\x7a\x52\x75\x32\x34','\x42\x67\x4c\x5a\x44\x66\x6e\x4c\x79\x33\x6a\x4c\x44\x68\x6d','\x69\x67\x76\x34\x79\x32\x76\x4c\x7a\x68\x6d\x47\x43\x67\x39\x53\x41\x77\x6e\x35\x6c\x4d\x31\x48\x45\x66\x6e\x57\x7a\x77\x35\x4b\x76\x78\x6e\x4b\x69\x63\x71','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x74\x77\x66\x4a\x41\x67\x4c\x55\x7a\x71','\x7a\x4d\x76\x30\x79\x32\x47','\x74\x4d\x66\x6f\x7a\x4e\x47','\x79\x32\x39\x56\x43\x4d\x72\x50\x42\x4d\x66\x30\x42\x33\x69','\x44\x68\x7a\x55\x74\x32\x4f','\x43\x32\x4c\x6e\x7a\x76\x61','\x42\x67\x4c\x5a\x44\x66\x6a\x4c\x43\x67\x39\x59\x44\x68\x6d','\x43\x78\x76\x56\x44\x67\x66\x6e\x79\x47','\x79\x32\x58\x50\x6c\x77\x66\x4e\x7a\x77\x35\x30\x6c\x78\x6a\x4c\x7a\x32\x4c\x5a\x44\x68\x6a\x35','\x41\x77\x72\x4c\x42\x78\x62\x56\x44\x67\x76\x55\x79\x33\x4c\x6c\x7a\x78\x4b','\x79\x4d\x66\x4a\x41\x32\x76\x55\x7a\x61','\x75\x32\x76\x4a\x43\x4d\x76\x30','\x76\x4d\x58\x57\x45\x4c\x69','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x79\x33\x6a\x4c\x79\x78\x72\x4c\x69\x68\x6a\x4c\x43\x78\x76\x4c\x43\x33\x72\x4c\x7a\x63\x61','\x69\x67\x31\x4c\x44\x67\x66\x4b\x79\x78\x72\x48\x69\x67\x54\x4c\x45\x73\x61\x4e','\x43\x4d\x39\x53\x7a\x71','\x76\x4d\x58\x6a\x7a\x33\x65','\x79\x78\x6e\x34\x43\x75\x43','\x41\x78\x6e\x62\x43\x4e\x6a\x48\x45\x71','\x44\x67\x76\x54\x43\x67\x58\x48\x44\x67\x76\x5a','\x41\x67\x76\x48\x42\x68\x72\x4f','\x42\x77\x76\x54\x42\x33\x6a\x35\x74\x75\x69','\x76\x75\x66\x36\x73\x4b\x6d','\x7a\x33\x62\x31\x76\x68\x4c\x57\x7a\x71','\x73\x78\x48\x6c\x42\x65\x53','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x7a\x65\x66\x30','\x71\x30\x48\x6c\x42\x66\x79','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x76\x32\x4c\x30\x41\x65\x6e\x56\x42\x33\x6a\x4b\x41\x77\x35\x48\x44\x67\x39\x59','\x79\x77\x35\x35','\x6c\x33\x79\x58\x6c\x33\x62\x31\x79\x4d\x58\x50\x79\x59\x31\x30\x7a\x77\x31\x57\x42\x67\x66\x30\x7a\x78\x6d\x56','\x44\x32\x66\x50\x44\x65\x7a\x56\x43\x4c\x6a\x31\x42\x4d\x35\x50\x42\x4d\x43','\x75\x66\x50\x36\x72\x65\x65','\x42\x67\x76\x48\x44\x4d\x75','\x79\x32\x66\x57\x79\x77\x6a\x50\x42\x67\x4c\x30\x41\x77\x76\x5a','\x44\x68\x6a\x48\x79\x32\x75','\x6a\x59\x62\x59\x7a\x78\x66\x31\x7a\x78\x6e\x30\x7a\x77\x71\x47\x44\x67\x76\x54\x43\x67\x58\x48\x44\x67\x75\x47\x6a\x57','\x7a\x4c\x66\x41\x43\x33\x65','\x45\x65\x50\x62\x75\x33\x65','\x42\x77\x39\x4b\x7a\x71','\x74\x4b\x76\x63\x43\x75\x57','\x44\x67\x76\x34\x44\x63\x39\x4c\x44\x4d\x76\x55\x44\x63\x31\x5a\x44\x68\x6a\x4c\x79\x77\x30','\x44\x78\x6e\x48\x7a\x32\x75','\x7a\x4c\x48\x34\x71\x33\x75','\x44\x67\x76\x34\x44\x61','\x79\x77\x58\x53','\x72\x65\x76\x6d\x72\x76\x72\x66','\x6c\x33\x79\x58\x6c\x32\x7a\x53\x7a\x77\x76\x30\x43\x59\x38','\x6c\x33\x72\x4c\x42\x78\x62\x53\x79\x78\x72\x4c\x43\x59\x38','\x6c\x33\x6a\x4c\x43\x33\x76\x53\x44\x68\x6d','\x43\x66\x44\x49\x73\x77\x38','\x41\x77\x35\x4a\x42\x68\x76\x4b\x7a\x78\x6d','\x43\x67\x54\x67\x45\x67\x30','\x79\x78\x62\x57\x7a\x77\x35\x4b','\x71\x68\x72\x48\x42\x4d\x44\x53\x7a\x73\x31\x55\x7a\x78\x72\x33\x42\x33\x6a\x52','\x7a\x32\x76\x30\x71\x78\x62\x50\x73\x32\x76\x35','\x7a\x4d\x66\x50\x42\x67\x76\x4b','\x41\x77\x35\x32\x41\x78\x72\x48\x44\x67\x4c\x56\x42\x47','\x42\x67\x4c\x5a\x44\x66\x72\x4c\x42\x78\x62\x53\x79\x78\x72\x4c\x43\x57','\x42\x77\x39\x55\x44\x67\x48\x53\x45\x75\x6a\x48\x42\x67\x66\x55\x79\x32\x76\x76\x43\x32\x71','\x44\x78\x62\x4b\x79\x78\x72\x4c\x74\x77\x76\x54\x79\x4d\x76\x59','\x42\x77\x66\x34\x76\x78\x6e\x4b','\x43\x68\x76\x49\x42\x67\x4c\x5a\x41\x61','\x44\x66\x6e\x56\x72\x4c\x61','\x7a\x4e\x6a\x4c\x7a\x71','\x79\x4c\x72\x64\x79\x77\x38','\x7a\x4e\x7a\x31\x45\x68\x71','\x74\x67\x76\x56\x71\x31\x6d','\x79\x77\x44\x4c\x42\x4e\x72\x50\x79\x57','\x43\x78\x62\x6d\x45\x65\x57','\x44\x67\x66\x4e','\x43\x4d\x66\x55\x7a\x67\x39\x54\x76\x76\x76\x6a\x72\x61','\x7a\x4e\x6a\x56\x42\x71','\x44\x67\x76\x48\x42\x78\x6d','\x79\x31\x66\x74\x79\x32\x53','\x79\x32\x39\x54\x43\x68\x76\x30\x7a\x75\x31\x50\x42\x4e\x76\x30\x7a\x78\x6d','\x43\x32\x6e\x48\x42\x67\x4c\x55\x7a\x30\x31\x56\x7a\x67\x75','\x44\x32\x4c\x55\x7a\x67\x39\x33','\x6c\x33\x79\x58\x6c\x32\x7a\x53\x7a\x77\x76\x30\x43\x59\x39\x59\x7a\x77\x66\x57\x6c\x77\x76\x34\x43\x67\x4c\x59\x7a\x77\x71','\x6c\x33\x6e\x4c\x79\x33\x6a\x4c\x44\x68\x6d\x56','\x6c\x33\x79\x58\x6c\x33\x72\x4c\x79\x77\x31\x5a\x6c\x57','\x75\x65\x66\x75\x71\x30\x47','\x77\x4b\x50\x50\x74\x75\x4f','\x43\x32\x4c\x36\x7a\x71','\x6c\x33\x79\x58\x6c\x33\x6e\x48\x42\x4d\x72\x49\x42\x33\x48\x4c\x43\x57','\x6c\x33\x79\x58\x6c\x33\x72\x4c\x79\x77\x31\x5a\x6c\x32\x4c\x55\x44\x4d\x4c\x30\x79\x78\x72\x50\x42\x32\x35\x5a\x6c\x57','\x78\x33\x6e\x5a\x41\x65\x54\x4c\x45\x78\x6d','\x7a\x4d\x4c\x55\x7a\x61','\x6d\x4a\x6d\x32\x6d\x5a\x6d\x58\x6e\x5a\x6a\x68\x7a\x75\x50\x7a\x72\x67\x43','\x42\x77\x66\x34\x76\x67\x39\x30\x79\x77\x58\x6e\x7a\x77\x31\x56\x43\x4e\x4c\x6e\x79\x47','\x43\x4d\x76\x30\x43\x4d\x4c\x4c\x43\x57','\x74\x67\x54\x6f\x72\x32\x38','\x42\x67\x4c\x5a\x44\x65\x31\x4c\x42\x77\x6a\x4c\x43\x4e\x6d','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x66\x45\x67\x76\x4a','\x42\x77\x66\x34\x76\x67\x39\x30\x79\x77\x58\x64\x43\x68\x75','\x72\x65\x72\x51\x71\x75\x65','\x6c\x33\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x73\x39\x5a\x42\x4d\x66\x57\x43\x32\x48\x56\x44\x68\x6d','\x75\x66\x76\x75','\x79\x77\x6a\x56\x43\x4e\x71','\x7a\x78\x6e\x30\x41\x77\x31\x48\x44\x67\x75','\x6c\x32\x4c\x55\x44\x4d\x4c\x30\x79\x78\x72\x50\x42\x32\x35\x5a','\x43\x67\x66\x59\x43\x32\x75','\x75\x32\x66\x55\x7a\x67\x6a\x56\x45\x61','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4e\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x73\x35\x54\x42\x32\x72\x4c','\x75\x65\x39\x74\x76\x61','\x7a\x32\x76\x30','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x7a\x78\x48\x4c\x79\x59\x62\x57\x43\x4d\x39\x4b\x44\x77\x6e\x4c\x7a\x63\x62\x55\x42\x59\x62\x59\x7a\x78\x6e\x31\x42\x68\x71\x47\x7a\x4d\x39\x59\x69\x67\x31\x48\x79\x32\x48\x50\x42\x4d\x75\x47\x6a\x57','\x43\x32\x35\x48\x43\x68\x6e\x4f\x42\x33\x72\x6a\x7a\x61','\x73\x68\x66\x6e\x73\x4c\x71','\x43\x67\x76\x59\x42\x77\x4c\x5a\x43\x32\x4c\x56\x42\x4e\x6d','\x79\x78\x62\x57\x42\x67\x4c\x4a\x79\x78\x72\x50\x42\x32\x34\x56\x41\x4e\x6e\x56\x42\x47','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4e\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x73\x35\x50\x7a\x61','\x6c\x33\x7a\x4c\x43\x4e\x6e\x50\x42\x32\x35\x5a','\x73\x33\x66\x4d\x73\x33\x65','\x7a\x4d\x76\x48\x44\x68\x76\x59\x7a\x77\x71','\x44\x32\x39\x59\x41\x32\x76\x59','\x6c\x33\x79\x58\x6c\x33\x72\x4c\x79\x77\x31\x5a','\x76\x32\x6e\x35\x41\x30\x38','\x6c\x33\x79\x58\x6c\x33\x6e\x48\x42\x4d\x72\x49\x42\x33\x48\x4c\x43\x59\x38','\x44\x77\x35\x4b\x7a\x77\x7a\x50\x42\x4d\x76\x4b','\x43\x4d\x76\x5a\x44\x67\x39\x59\x7a\x76\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x76\x6e\x55\x79\x78\x62\x5a\x41\x67\x39\x30','\x69\x67\x6e\x4f\x79\x78\x6a\x48\x79\x33\x72\x4c\x43\x4e\x6d\x47\x79\x77\x35\x4b\x69\x67\x6e\x56\x42\x4e\x72\x48\x41\x77\x34\x47\x42\x32\x35\x53\x45\x73\x62\x53\x7a\x78\x72\x30\x7a\x78\x6a\x5a\x6c\x63\x62\x55\x44\x77\x31\x49\x7a\x78\x6a\x5a\x6c\x63\x61\x4e\x6c\x49\x43\x53\x69\x63\x44\x46\x6a\x59\x62\x56\x43\x49\x61\x4e\x6c\x73\x43','\x6c\x33\x79\x58\x6c\x33\x6e\x5a\x41\x63\x31\x52\x7a\x78\x4c\x5a','\x42\x76\x76\x6e\x43\x4d\x4f','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4d\x7a\x53\x7a\x77\x76\x30\x6c\x4e\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x73\x35\x58\x44\x77\x39\x30\x79\x76\x39\x54\x79\x47','\x41\x68\x4c\x4b\x43\x4d\x66\x30\x7a\x76\x6e\x4c\x43\x4e\x7a\x4c\x43\x4b\x7a\x53\x7a\x77\x76\x30','\x6c\x32\x31\x48\x79\x32\x48\x50\x42\x4d\x76\x5a\x6c\x57','\x43\x4d\x76\x5a\x44\x77\x58\x30\x43\x57','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x76\x67\x39\x52\x7a\x77\x34','\x42\x67\x39\x4a\x79\x77\x58\x4f\x42\x33\x6e\x30','\x43\x33\x76\x49\x41\x4d\x76\x4a\x44\x61','\x43\x4e\x76\x55\x42\x4d\x4c\x55\x7a\x57','\x77\x66\x7a\x53\x73\x68\x79','\x43\x75\x66\x68\x41\x30\x4b','\x75\x4c\x66\x36\x71\x4e\x65','\x79\x32\x66\x71\x7a\x78\x71','\x43\x32\x76\x4a\x43\x4d\x76\x30','\x43\x4d\x76\x4a\x42\x32\x35\x4a\x41\x77\x58\x4c','\x6c\x33\x79\x58\x6c\x32\x7a\x53\x7a\x77\x76\x30\x43\x59\x39\x4c\x43\x33\x72\x50\x42\x77\x66\x30\x7a\x71','\x79\x75\x6e\x52\x43\x4d\x4b','\x6c\x4d\x6e\x53\x79\x78\x76\x4b\x7a\x73\x38\x55\x79\x33\x6a\x4c\x7a\x67\x76\x55\x44\x67\x4c\x48\x42\x68\x6d\x55\x41\x4e\x6e\x56\x42\x47','\x44\x67\x39\x30\x79\x77\x58\x74\x79\x77\x35\x4b\x79\x4d\x39\x34\x7a\x78\x6d','\x44\x67\x39\x52\x7a\x77\x35\x5a\x76\x78\x6e\x4c\x7a\x61','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x41\x77\x35\x30\x7a\x77\x58\x53\x41\x77\x44\x4c\x42\x4d\x6e\x4c\x69\x68\x44\x48\x43\x59\x62\x55\x42\x33\x71\x47\x43\x4d\x76\x30\x44\x78\x6a\x55\x7a\x77\x71','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x76\x67\x76\x54\x43\x67\x58\x48\x44\x67\x75','\x73\x31\x76\x7a\x44\x76\x69','\x7a\x4e\x76\x53\x7a\x4d\x4c\x53\x42\x67\x76\x4b','\x76\x77\x48\x78\x43\x67\x34','\x42\x75\x66\x4e\x7a\x65\x69','\x6c\x33\x6a\x4c\x44\x4d\x76\x48\x42\x61','\x79\x32\x39\x5a\x44\x61','\x42\x30\x4c\x57\x77\x66\x4b','\x6c\x33\x79\x58\x6c\x33\x6e\x48\x42\x4d\x72\x49\x42\x33\x48\x4c\x43\x5a\x38','\x76\x66\x6a\x4a\x7a\x31\x43','\x42\x4d\x66\x55\x42\x57','\x45\x75\x4c\x6b\x43\x66\x69','\x42\x33\x62\x4c\x42\x4d\x6e\x56\x7a\x67\x75','\x42\x77\x66\x4a\x41\x67\x4c\x55\x7a\x71','\x43\x67\x66\x4b\x75\x33\x72\x48\x43\x4e\x71','\x79\x33\x44\x4b','\x42\x77\x66\x34\x74\x67\x4c\x4d\x7a\x78\x72\x50\x42\x77\x76\x74\x7a\x77\x6e\x56\x42\x4d\x72\x5a','\x41\x78\x6e\x6a\x42\x4e\x72\x4c\x7a\x32\x76\x59','\x44\x68\x6a\x48\x42\x4e\x6e\x4d\x7a\x78\x6a\x70\x44\x32\x35\x4c\x43\x4e\x6e\x4f\x41\x78\x61','\x44\x4d\x31\x59\x43\x77\x71','\x7a\x32\x76\x30\x75\x32\x76\x59\x44\x4d\x76\x59\x72\x4d\x58\x4c\x7a\x78\x71','\x43\x68\x76\x49\x42\x67\x4c\x4a\x76\x67\x76\x54\x43\x67\x58\x48\x44\x67\x76\x5a','\x6c\x32\x72\x50\x43\x33\x62\x48\x44\x67\x6e\x4f\x6c\x33\x6e\x30\x43\x4d\x76\x48\x42\x71','\x74\x65\x39\x58\x73\x75\x30','\x79\x78\x76\x30\x41\x65\x31\x56\x7a\x67\x75','\x7a\x4e\x6a\x56\x42\x76\x6e\x48\x42\x4d\x72\x49\x42\x33\x48\x6a\x7a\x61','\x43\x33\x72\x48\x44\x68\x76\x5a\x76\x67\x76\x34\x44\x61','\x6d\x5a\x47\x57\x6e\x64\x71\x32\x6f\x67\x72\x63\x75\x75\x31\x54\x7a\x71','\x72\x75\x35\x70\x76\x32\x47','\x79\x78\x62\x50\x6c\x77\x54\x4c\x45\x71','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x66\x6a\x4c\x43\x32\x39\x31\x43\x4d\x6e\x4c\x43\x30\x7a\x56\x43\x4c\x6e\x50\x45\x4d\x75\x36\x69\x68\x76\x55\x41\x32\x35\x56\x44\x32\x34\x47\x43\x32\x4c\x36\x7a\x73\x62\x57\x43\x4d\x76\x5a\x7a\x78\x71\x47\x6a\x57','\x7a\x32\x76\x30\x73\x77\x35\x32\x41\x78\x72\x48\x44\x67\x4c\x56\x42\x47','\x43\x68\x6a\x50\x44\x4d\x66\x4a\x45\x71','\x44\x67\x39\x56\x42\x68\x6d','\x71\x77\x6a\x56\x43\x4e\x72\x66\x43\x4e\x6a\x56\x43\x47','\x75\x31\x6e\x69\x69\x67\x54\x4c\x45\x71','\x43\x33\x72\x48\x44\x68\x76\x5a','\x43\x4d\x76\x5a\x42\x33\x76\x59\x79\x32\x76\x5a','\x79\x77\x6a\x56\x43\x4e\x72\x4c\x7a\x61','\x79\x32\x58\x48\x44\x77\x72\x4c\x6c\x77\x6e\x56\x7a\x67\x75','\x45\x4d\x54\x34\x41\x32\x43','\x79\x77\x6e\x4a\x7a\x77\x58\x4c\x43\x4d\x66\x30\x42\x33\x69','\x75\x32\x7a\x49\x77\x76\x4b','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x73\x77\x35\x30\x7a\x77\x58\x53\x41\x77\x44\x4c\x42\x4d\x6e\x4c\x75\x4d\x76\x57\x42\x33\x6a\x30','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x66\x45\x67\x76\x4a\x75\x33\x72\x59\x7a\x77\x66\x54','\x7a\x4b\x31\x50\x75\x78\x43','\x69\x67\x66\x4a\x79\x32\x76\x53\x7a\x78\x6a\x48\x44\x67\x39\x59\x69\x67\x72\x4c\x44\x4d\x4c\x4a\x7a\x78\x6d\x47\x79\x4e\x76\x30\x69\x68\x62\x56\x42\x67\x4c\x4a\x45\x73\x35\x54\x79\x78\x48\x75\x42\x33\x72\x48\x42\x65\x66\x4a\x79\x32\x76\x53\x7a\x78\x6a\x48\x44\x67\x39\x59\x43\x59\x62\x50\x43\x59\x61','\x41\x77\x35\x30\x7a\x77\x58\x53\x41\x77\x44\x4c\x42\x4d\x6e\x4c','\x43\x33\x72\x48\x43\x4e\x72\x5a\x76\x32\x4c\x30\x41\x61','\x75\x65\x76\x34\x42\x33\x47','\x72\x4c\x6e\x77\x72\x4e\x75','\x43\x67\x76\x59\x43\x32\x4c\x5a\x44\x65\x7a\x53\x7a\x77\x76\x30','\x77\x4b\x6e\x5a\x72\x32\x38','\x6c\x32\x31\x48\x79\x32\x48\x50\x42\x4d\x76\x5a','\x6a\x59\x62\x59\x7a\x78\x66\x31\x7a\x78\x6e\x30\x7a\x77\x71\x47\x7a\x68\x6a\x50\x44\x4d\x76\x59\x69\x63\x43','\x44\x67\x76\x54\x43\x67\x58\x48\x44\x67\x76\x6a\x7a\x61','\x42\x77\x39\x4b\x7a\x77\x57','\x44\x67\x76\x5a\x44\x61','\x79\x32\x39\x54\x43\x67\x58\x4c\x44\x67\x76\x4b','\x44\x78\x62\x5a\x7a\x78\x6a\x30\x75\x32\x76\x4a\x43\x4d\x76\x30','\x43\x32\x58\x50\x79\x32\x75','\x42\x77\x76\x54\x79\x4d\x76\x59','\x7a\x68\x76\x59\x79\x78\x72\x50\x42\x32\x35\x6e\x43\x57','\x74\x30\x50\x70\x79\x4d\x4f','\x79\x77\x6e\x4a\x7a\x78\x62\x30\x73\x77\x35\x32\x41\x78\x72\x48\x44\x67\x4c\x56\x42\x47','\x6d\x4a\x75\x57\x6e\x5a\x4b\x30\x6e\x77\x35\x30\x71\x4b\x7a\x62\x74\x61','\x42\x67\x4c\x5a\x44\x65\x4c\x55\x44\x4d\x4c\x30\x79\x78\x72\x50\x42\x32\x35\x5a','\x69\x49\x62\x30\x42\x59\x62\x51\x42\x32\x4c\x55\x69\x67\x4c\x30\x6c\x47','\x42\x4d\x39\x4b\x7a\x74\x50\x4d\x43\x57','\x7a\x78\x48\x57\x42\x33\x6a\x30\x76\x68\x6a\x48\x79\x32\x75','\x6c\x32\x31\x4c\x42\x77\x6a\x4c\x43\x4e\x6d','\x44\x67\x39\x6b\x75\x30\x39\x6f','\x7a\x30\x6a\x33\x79\x78\x4b','\x46\x49\x38\x55\x79\x32\x58\x48\x44\x77\x72\x4c\x6c\x59\x35\x4a\x43\x4d\x76\x4b\x7a\x77\x35\x30\x41\x77\x66\x53\x43\x59\x35\x51\x43\x32\x39\x55\x69\x67\x39\x59\x69\x68\x34\x56\x6c\x4d\x6e\x53\x79\x78\x76\x4b\x7a\x73\x39\x5a\x7a\x78\x72\x30\x41\x77\x35\x4e\x43\x59\x35\x51\x43\x32\x39\x55','\x43\x4d\x76\x30\x43\x4e\x4b','\x7a\x67\x76\x53\x7a\x78\x72\x4c\x75\x32\x76\x4a\x43\x4d\x76\x30','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x76\x32\x39\x59\x41\x33\x6e\x57\x79\x77\x6e\x4c\x75\x32\x35\x48\x43\x68\x6e\x4f\x42\x33\x71','\x42\x77\x66\x4a\x41\x67\x4c\x55\x7a\x75\x4c\x4b','\x7a\x67\x76\x53\x7a\x78\x72\x4c','\x43\x4d\x76\x32\x7a\x77\x66\x53\x75\x32\x76\x4a\x43\x4d\x76\x30','\x7a\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x48\x6a\x7a\x61','\x7a\x67\x76\x5a\x79\x33\x6a\x50\x79\x4d\x76\x6d\x42\x32\x6e\x48\x42\x65\x6e\x53\x41\x75\x66\x31\x44\x67\x48\x66\x45\x68\x62\x4c\x79\x33\x72\x48\x44\x67\x4c\x56\x42\x47','\x79\x4d\x66\x59\x7a\x71','\x7a\x67\x66\x30\x79\x71','\x43\x4d\x76\x58\x44\x77\x4c\x59\x7a\x76\x6e\x48\x42\x4d\x72\x49\x42\x33\x47','\x73\x31\x66\x55\x45\x75\x75','\x6c\x33\x6e\x31\x79\x4e\x6e\x4a\x43\x4d\x4c\x57\x44\x67\x4c\x56\x42\x47','\x73\x4c\x72\x31\x45\x4c\x4f','\x75\x77\x54\x78\x44\x30\x47','\x71\x4d\x58\x6a\x43\x78\x69','\x79\x33\x6a\x4c\x79\x78\x72\x4c','\x43\x4d\x76\x5a\x7a\x78\x6a\x32\x7a\x77\x71','\x6c\x32\x31\x4c\x42\x77\x6a\x4c\x43\x4e\x6d\x56','\x6a\x59\x62\x56\x44\x78\x72\x5a\x41\x77\x72\x4c\x69\x68\x62\x56\x42\x67\x4c\x4a\x45\x73\x35\x48\x42\x67\x58\x56\x44\x32\x76\x4b\x76\x67\x76\x54\x43\x67\x58\x48\x44\x67\x76\x6a\x7a\x68\x6d','\x42\x77\x66\x34','\x43\x33\x6e\x4f\x73\x32\x76\x35','\x41\x4d\x39\x50\x42\x47','\x43\x32\x76\x30','\x41\x77\x31\x48\x7a\x32\x75','\x6c\x32\x48\x4c\x79\x77\x58\x30\x41\x61','\x79\x4e\x4c\x30\x7a\x75\x58\x4c\x42\x4d\x44\x30\x41\x61','\x71\x32\x39\x55\x44\x67\x76\x55\x44\x63\x31\x75\x45\x78\x62\x4c','\x79\x32\x66\x55\x79\x32\x76\x53\x72\x67\x4c\x5a\x43\x67\x66\x30\x79\x32\x47','\x76\x75\x39\x52\x76\x77\x4f','\x6c\x33\x79\x58\x6c\x32\x7a\x53\x7a\x77\x76\x30\x43\x57','\x43\x78\x50\x4b\x42\x78\x6d','\x79\x33\x62\x49\x72\x4b\x53','\x79\x4d\x66\x5a\x7a\x76\x76\x59\x42\x61','\x76\x33\x6e\x70\x7a\x4c\x61','\x41\x4e\x48\x49\x79\x78\x6d','\x77\x78\x6e\x31\x44\x65\x6d','\x6c\x32\x66\x4a\x79\x32\x76\x57\x44\x61','\x79\x78\x62\x50\x73\x32\x76\x35','\x79\x33\x76\x59\x43\x4d\x76\x55\x44\x66\x62\x4c\x43\x4d\x4c\x56\x7a\x65\x76\x55\x7a\x61','\x43\x30\x44\x6c\x43\x32\x4f','\x44\x67\x6a\x48\x43\x65\x69','\x44\x75\x66\x64\x76\x33\x4b','\x6c\x33\x79\x58\x6c\x33\x6e\x4c\x79\x33\x6a\x4c\x44\x68\x6d\x56','\x42\x33\x62\x4c\x43\x4d\x66\x30\x41\x77\x39\x55\x43\x57','\x71\x4d\x66\x5a\x7a\x73\x62\x76\x75\x4b\x57\x47\x41\x78\x6d\x47\x43\x4d\x76\x58\x44\x77\x4c\x59\x7a\x77\x71','\x7a\x32\x76\x30\x75\x4d\x66\x55\x7a\x67\x39\x54\x76\x4d\x66\x53\x44\x77\x76\x5a','\x6c\x32\x6e\x56\x43\x33\x71','\x43\x4d\x76\x57\x42\x67\x66\x4a\x7a\x71','\x74\x4c\x48\x50\x42\x75\x75','\x7a\x77\x35\x32\x41\x78\x6a\x56\x42\x4d\x31\x4c\x42\x4e\x72\x5a','\x77\x77\x50\x4a\x44\x65\x75','\x43\x67\x39\x53\x42\x65\x31\x5a','\x7a\x65\x50\x48\x44\x76\x43','\x6c\x33\x79\x58\x6c\x33\x6e\x35\x43\x33\x72\x4c\x42\x73\x39\x4a\x43\x4d\x4c\x31\x6c\x78\x6e\x30\x79\x78\x72\x31\x43\x57','\x72\x4d\x58\x4c\x7a\x78\x71\x47\x7a\x78\x6e\x30\x41\x77\x31\x48\x44\x67\x76\x4b\x69\x67\x31\x48\x45\x63\x62\x53\x41\x77\x7a\x4c\x44\x67\x4c\x54\x7a\x73\x62\x4a\x42\x33\x6e\x30\x69\x63\x71','\x44\x78\x50\x69\x75\x77\x30','\x42\x67\x72\x64\x43\x68\x65','\x41\x78\x6e\x67\x41\x77\x35\x50\x44\x67\x75','\x7a\x78\x48\x4a\x7a\x77\x76\x4b\x7a\x77\x71','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x71\x77\x44\x4c\x42\x4e\x72\x50\x79\x30\x4c\x55\x44\x67\x76\x53\x42\x67\x4c\x4e\x7a\x77\x35\x4a\x7a\x76\x6a\x4c\x43\x67\x39\x59\x44\x61','\x41\x77\x35\x32\x41\x78\x72\x48\x44\x67\x4c\x56\x42\x4e\x6d','\x6c\x4d\x6e\x53\x79\x78\x76\x4b\x7a\x73\x39\x5a\x7a\x78\x72\x30\x41\x77\x35\x4e\x43\x59\x35\x51\x43\x32\x39\x55','\x43\x32\x6e\x56\x43\x67\x75','\x6c\x33\x76\x5a\x79\x77\x44\x4c','\x76\x67\x4c\x54\x7a\x77\x39\x31\x44\x65\x76\x59\x43\x4d\x39\x59','\x43\x33\x72\x59\x41\x77\x35\x4e\x41\x77\x7a\x35','\x43\x33\x6e\x4f\x72\x77\x35\x48\x79\x4d\x58\x4c\x7a\x61','\x77\x33\x6e\x48\x42\x4d\x72\x49\x42\x33\x47\x54\x43\x32\x72\x52\x78\x73\x62\x30\x42\x32\x54\x4c\x42\x4c\x6a\x4c\x7a\x4e\x6a\x4c\x43\x32\x47\x47\x41\x67\x66\x55\x7a\x67\x58\x4c\x43\x49\x62\x30\x41\x68\x6a\x4c\x44\x5a\x4f\x47','\x6c\x63\x62\x49\x44\x78\x71\x47\x42\x4d\x38\x47\x42\x67\x39\x4a\x79\x77\x57\x47\x71\x30\x58\x6a\x69\x67\x66\x31\x44\x67\x47\x47\x44\x32\x66\x5a\x69\x67\x7a\x56\x44\x77\x35\x4b\x6c\x49\x62\x73\x44\x77\x34\x47\x79\x61','\x6c\x33\x6e\x4c\x79\x33\x6a\x4c\x44\x68\x6d','\x42\x67\x4c\x54\x41\x78\x72\x5a','\x7a\x4e\x6a\x56\x42\x75\x4c\x55\x7a\x4d\x38','\x7a\x75\x4c\x4b\x44\x77\x4b','\x7a\x78\x6e\x30\x41\x77\x31\x48\x44\x67\x76\x4b\x74\x77\x66\x34\x74\x67\x4c\x4d\x7a\x78\x72\x50\x42\x77\x76\x76\x43\x32\x71','\x7a\x68\x6a\x50\x44\x4d\x76\x59','\x43\x68\x6a\x56\x42\x78\x62\x30','\x74\x77\x4c\x5a\x43\x32\x4c\x55\x7a\x59\x62\x4d\x42\x67\x76\x4c\x44\x63\x62\x50\x44\x67\x76\x54\x69\x67\x66\x30\x69\x67\x4c\x55\x7a\x67\x76\x34\x69\x61','\x43\x4d\x76\x4a\x42\x32\x35\x4a\x41\x77\x58\x4c\x76\x32\x39\x59\x41\x33\x6e\x57\x79\x77\x6e\x4c','\x42\x67\x76\x55\x7a\x33\x72\x4f','\x43\x33\x6e\x4f\x73\x32\x76\x35\x43\x57','\x71\x75\x72\x58\x71\x32\x53','\x42\x4d\x66\x54\x7a\x71','\x75\x65\x48\x52\x72\x66\x6d','\x71\x33\x44\x59\x75\x66\x69','\x71\x76\x62\x6a\x69\x67\x54\x4c\x45\x73\x62\x50\x43\x59\x62\x59\x7a\x78\x66\x31\x41\x78\x6a\x4c\x7a\x61','\x43\x67\x39\x53\x41\x77\x6e\x35\x6c\x4d\x31\x48\x45\x66\x6e\x57\x7a\x77\x35\x4b\x76\x78\x6e\x4b\x69\x67\x31\x31\x43\x33\x71\x47\x79\x4d\x75\x47\x42\x4d\x39\x55\x6c\x77\x35\x4c\x7a\x32\x66\x30\x41\x78\x7a\x4c','\x72\x68\x76\x57\x42\x67\x4c\x4a\x79\x78\x72\x4c\x69\x67\x31\x48\x79\x32\x48\x50\x42\x4d\x76\x6a\x7a\x63\x61\x4e','\x6a\x59\x62\x55\x42\x59\x62\x53\x42\x32\x35\x4e\x7a\x78\x69\x47\x7a\x78\x48\x50\x43\x33\x72\x5a','\x42\x77\x66\x57','\x43\x67\x66\x59\x43\x32\x76\x6a\x42\x4d\x7a\x56','\x41\x77\x35\x4a\x42\x68\x76\x4b\x7a\x75\x4c\x55\x44\x67\x76\x53\x42\x67\x4c\x4e\x7a\x77\x35\x4a\x7a\x71','\x71\x4d\x76\x48\x43\x4d\x76\x59\x69\x61','\x43\x4d\x76\x51\x7a\x77\x6e\x30\x7a\x77\x71','\x78\x32\x76\x55\x44\x4d\x4c\x59\x42\x32\x35\x54\x7a\x77\x35\x30\x43\x57','\x79\x4e\x76\x4d\x7a\x4d\x76\x59\x75\x4d\x76\x5a\x44\x77\x58\x30\x43\x57','\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x47','\x6c\x33\x44\x56\x43\x4d\x54\x5a\x43\x67\x66\x4a\x7a\x71','\x43\x67\x66\x30\x41\x61','\x43\x67\x76\x59\x41\x77\x39\x4b\x72\x77\x35\x4b','\x43\x4d\x76\x4d','\x43\x32\x76\x5a\x43\x32\x4c\x56\x42\x4b\x4c\x4b','\x79\x32\x39\x55\x7a\x4d\x4c\x4e','\x45\x78\x7a\x4f\x42\x32\x71','\x74\x30\x4c\x65\x73\x4d\x75','\x6a\x59\x62\x50\x42\x49\x62\x4d\x42\x67\x76\x4c\x44\x63\x62\x4a\x43\x4d\x76\x48\x44\x67\x75\x47\x43\x4d\x76\x58\x44\x77\x76\x5a\x44\x61','\x79\x32\x58\x4c\x79\x77\x35\x31\x43\x65\x39\x55\x72\x4d\x66\x50\x42\x68\x76\x59\x7a\x71','\x43\x33\x76\x49\x43\x32\x6e\x59\x41\x78\x62\x30\x41\x77\x39\x55','\x7a\x4b\x48\x34\x43\x76\x75','\x44\x67\x4c\x54\x7a\x77\x39\x31\x44\x65\x31\x5a','\x75\x33\x72\x68\x73\x30\x75','\x43\x67\x76\x59\x41\x77\x39\x4b\x75\x33\x72\x48\x43\x4e\x71','\x7a\x67\x76\x4d\x79\x78\x76\x53\x44\x68\x6d','\x79\x32\x39\x55\x42\x4d\x76\x4a\x44\x67\x4c\x56\x42\x47','\x7a\x67\x76\x30\x79\x77\x6e\x4f\x74\x77\x66\x4a\x41\x67\x4c\x55\x7a\x71','\x42\x77\x66\x34\x71\x32\x39\x55\x79\x33\x76\x59\x43\x4d\x76\x55\x44\x65\x6e\x59\x7a\x77\x66\x30\x7a\x78\x6d\x47\x42\x78\x76\x5a\x44\x63\x62\x49\x7a\x73\x62\x48\x69\x68\x62\x56\x43\x32\x4c\x30\x41\x78\x7a\x4c\x69\x67\x4c\x55\x44\x67\x76\x4e\x7a\x78\x69','\x42\x33\x7a\x4c\x43\x4d\x66\x4e\x7a\x75\x66\x53\x42\x67\x39\x33\x7a\x77\x71','\x42\x67\x4c\x5a\x44\x61'];a0_0x882c=function(){return _0x19b32d;};return a0_0x882c();}
|
|
1
|
+
import { f as encodePromptForWire, l as exportTraceBundle, p as parseSSEStream, s as normalizeConnection, t as SandboxInstance } from "./sandbox-joKtQ5y3.js";
|
|
2
|
+
import { d as ValidationError, f as parseErrorResponse, i as NotFoundError, r as NetworkError, t as AuthError, u as TimeoutError } from "./errors-DZsfJUuc.js";
|
|
3
|
+
//#region src/resources.ts
|
|
4
|
+
/**
|
|
5
|
+
* Compute tiers, ordered smallest → largest. Defined HERE (not imported from
|
|
6
|
+
* `@tangle-network/agent-interface`) so the SDK is self-contained: a consumer
|
|
7
|
+
* that type-checks the SDK SOURCE never has to resolve a cross-package export
|
|
8
|
+
* for the size vocabulary. `agent-interface` keeps its own identical copy for
|
|
9
|
+
* `Capability.recommendedSize`; a platform test guards the two against drift.
|
|
10
|
+
*/
|
|
11
|
+
const SANDBOX_SIZE_PRESET_NAMES = [
|
|
12
|
+
"nano",
|
|
13
|
+
"small",
|
|
14
|
+
"medium",
|
|
15
|
+
"large"
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* The concrete compute behind each {@link SandboxSizePreset} — the SINGLE source
|
|
19
|
+
* of truth for what a tier means. `@tangle-network/agent-interface` owns the
|
|
20
|
+
* tier NAMES (so the lowest layer can reference a size); this owns the numbers.
|
|
21
|
+
*
|
|
22
|
+
* Values stay within the sandbox-api default plan caps (8 vCPU / 16 GB / 100 GB)
|
|
23
|
+
* and keep memory at or above the driver's firecracker-snapshot floor (1536 MB),
|
|
24
|
+
* so a requested tier is never silently bumped. `diskGB` is in gigabytes;
|
|
25
|
+
* `memoryMB` in megabytes. The server still clamps every request to the owner's
|
|
26
|
+
* actual plan limits — these are the unclamped tier definitions, not guarantees.
|
|
27
|
+
*/
|
|
28
|
+
const SANDBOX_SIZE_PRESETS = {
|
|
29
|
+
nano: {
|
|
30
|
+
cpuCores: 1,
|
|
31
|
+
memoryMB: 2048,
|
|
32
|
+
diskGB: 5
|
|
33
|
+
},
|
|
34
|
+
small: {
|
|
35
|
+
cpuCores: 2,
|
|
36
|
+
memoryMB: 4096,
|
|
37
|
+
diskGB: 10
|
|
38
|
+
},
|
|
39
|
+
medium: {
|
|
40
|
+
cpuCores: 4,
|
|
41
|
+
memoryMB: 8192,
|
|
42
|
+
diskGB: 20
|
|
43
|
+
},
|
|
44
|
+
large: {
|
|
45
|
+
cpuCores: 8,
|
|
46
|
+
memoryMB: 16384,
|
|
47
|
+
diskGB: 50
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Default tier when a caller provisions without picking a size. The smallest
|
|
52
|
+
* tier that comfortably runs an agent harness (opencode + a repo clone + a
|
|
53
|
+
* build) — deliberately NOT a maxed box, so a thin task is cheap by default and
|
|
54
|
+
* a heavy one opts up explicitly.
|
|
55
|
+
*/
|
|
56
|
+
const DEFAULT_SANDBOX_SIZE = "small";
|
|
57
|
+
/** The resources for a named tier, as a fresh object (never the shared preset).
|
|
58
|
+
* Fails loud on an unknown key rather than spreading `undefined` into an empty
|
|
59
|
+
* resources object — a silent zero would send no compute request downstream. */
|
|
60
|
+
function sandboxResourcesForSize(size) {
|
|
61
|
+
const preset = SANDBOX_SIZE_PRESETS[size];
|
|
62
|
+
if (!preset) throw new Error(`sandboxResourcesForSize: unknown size preset '${size}' (expected one of ${SANDBOX_SIZE_PRESET_NAMES.join(", ")})`);
|
|
63
|
+
return { ...preset };
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Resolve a caller's size intent to concrete {@link SandboxResources}. Raw
|
|
67
|
+
* `resources` win (an explicit cpu/memory request is authoritative); else a
|
|
68
|
+
* named `size` expands to its preset; else `undefined` (the caller applies its
|
|
69
|
+
* own default). Raw and preset are intentionally exclusive at the schema layer —
|
|
70
|
+
* if both arrive here, the explicit numbers take precedence rather than being
|
|
71
|
+
* silently merged.
|
|
72
|
+
*/
|
|
73
|
+
function resolveSandboxResources(opts) {
|
|
74
|
+
if (opts.resources) return opts.resources;
|
|
75
|
+
if (opts.size) return sandboxResourcesForSize(opts.size);
|
|
76
|
+
}
|
|
77
|
+
function normalizeSandboxResources(resources, driver) {
|
|
78
|
+
const legacyAccelerator = driver?.gpuRequired || driver?.gpuType || driver?.gpuCount ? {
|
|
79
|
+
kind: driver.gpuType ?? "gpu",
|
|
80
|
+
count: driver.gpuCount ?? 1
|
|
81
|
+
} : void 0;
|
|
82
|
+
if (!legacyAccelerator) return resources;
|
|
83
|
+
return {
|
|
84
|
+
...resources,
|
|
85
|
+
accelerator: resources?.accelerator ?? legacyAccelerator
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/fleet.ts
|
|
90
|
+
const FLEET_ID_META = "tangle.fleet.id";
|
|
91
|
+
const MACHINE_ID_META = "tangle.fleet.machine_id";
|
|
92
|
+
const MACHINE_ROLE_META = "tangle.fleet.machine_role";
|
|
93
|
+
const FLEET_CREATED_BY_META = "tangle.fleet.created_by";
|
|
94
|
+
const WORKSPACE_MODE_META = "tangle.fleet.workspace.mode";
|
|
95
|
+
const WORKSPACE_ID_META = "tangle.fleet.workspace.id";
|
|
96
|
+
const WORKSPACE_QUOTA_META = "tangle.fleet.workspace.quota_mb";
|
|
97
|
+
const WORKSPACE_MOUNT_META = "tangle.fleet.workspace.mount_path";
|
|
98
|
+
const RESERVED_METADATA_PREFIX = "tangle.";
|
|
99
|
+
const DEFAULT_MACHINE_LIFETIME_SECONDS = 3600;
|
|
100
|
+
const DEFAULT_MAX_CONCURRENT_CREATES = 4;
|
|
101
|
+
const MAX_CONCURRENT_ARTIFACT_READS = 8;
|
|
102
|
+
const DEFAULT_ARTIFACT_ROOT = "/workspace";
|
|
103
|
+
const DEFAULT_MAX_ARTIFACT_BYTES = 25 * 1024 * 1024;
|
|
104
|
+
const MAX_MACHINE_ID_LENGTH = 64;
|
|
105
|
+
const machineIdPattern = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
|
|
106
|
+
function createFleetId() {
|
|
107
|
+
const crypto = globalThis.crypto;
|
|
108
|
+
if (crypto?.randomUUID) return `fleet_${crypto.randomUUID().replaceAll("-", "").slice(0, 24)}`;
|
|
109
|
+
if (crypto?.getRandomValues) {
|
|
110
|
+
const bytes = crypto.getRandomValues(new Uint8Array(12));
|
|
111
|
+
return `fleet_${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
112
|
+
}
|
|
113
|
+
throw new ValidationError("Fleet id generation requires global crypto");
|
|
114
|
+
}
|
|
115
|
+
function assertSafeId(value, label) {
|
|
116
|
+
if (value.length === 0 || value.length > MAX_MACHINE_ID_LENGTH || !machineIdPattern.test(value)) throw new ValidationError(`${label} must be 1-${MAX_MACHINE_ID_LENGTH} characters and contain only letters, numbers, '.', '_' or '-'`, { [label]: "invalid" });
|
|
117
|
+
}
|
|
118
|
+
function assertUniqueMachineIds(machines) {
|
|
119
|
+
const seen = /* @__PURE__ */ new Set();
|
|
120
|
+
for (const machine of machines) {
|
|
121
|
+
assertSafeId(machine.machineId, "machineId");
|
|
122
|
+
if (seen.has(machine.machineId)) throw new ValidationError(`Duplicate machineId '${machine.machineId}' in fleet create request`, { machineId: "duplicate" });
|
|
123
|
+
seen.add(machine.machineId);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function assertNoReservedMetadata(metadata, label) {
|
|
127
|
+
if (!metadata) return;
|
|
128
|
+
const reserved = Object.keys(metadata).find((key) => key.startsWith(RESERVED_METADATA_PREFIX));
|
|
129
|
+
if (reserved) throw new ValidationError(`${label} metadata key '${reserved}' is reserved by Tangle`, { metadata: "reserved" });
|
|
130
|
+
}
|
|
131
|
+
function mergeCreateOptions(defaults, machine) {
|
|
132
|
+
const { machineId: _machineId, metadata: _metadata, name: _name, role: _role, ...rest } = machine;
|
|
133
|
+
const backend = defaults?.backend || machine.backend ? {
|
|
134
|
+
...defaults?.backend,
|
|
135
|
+
...machine.backend,
|
|
136
|
+
type: machine.backend?.type ?? defaults?.backend?.type ?? "opencode",
|
|
137
|
+
model: {
|
|
138
|
+
...defaults?.backend?.model,
|
|
139
|
+
...machine.backend?.model
|
|
140
|
+
}
|
|
141
|
+
} : void 0;
|
|
142
|
+
const driver = machine.driver ?? defaults?.driver;
|
|
143
|
+
return {
|
|
144
|
+
...defaults,
|
|
145
|
+
...rest,
|
|
146
|
+
resources: normalizeSandboxResources({
|
|
147
|
+
...defaults?.resources,
|
|
148
|
+
...machine.resources
|
|
149
|
+
}, driver),
|
|
150
|
+
env: {
|
|
151
|
+
...defaults?.env,
|
|
152
|
+
...machine.env
|
|
153
|
+
},
|
|
154
|
+
backend,
|
|
155
|
+
driver
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function assertPolicy(machines, defaults, policy) {
|
|
159
|
+
const maxMachines = policy?.maxMachines ?? machines.length;
|
|
160
|
+
if (!Number.isInteger(maxMachines) || maxMachines <= 0) throw new ValidationError("policy.maxMachines must be a positive integer");
|
|
161
|
+
if (machines.length > maxMachines) throw new ValidationError(`Fleet create requested ${machines.length} machines but policy.maxMachines is ${maxMachines}`, { "policy.maxMachines": "exceeded" });
|
|
162
|
+
if (policy?.maxConcurrentCreates !== void 0 && (!Number.isInteger(policy.maxConcurrentCreates) || policy.maxConcurrentCreates <= 0)) throw new ValidationError("policy.maxConcurrentCreates must be a positive integer", { "policy.maxConcurrentCreates": "invalid" });
|
|
163
|
+
if (policy?.maxSpendUsd !== void 0 && (!Number.isFinite(policy.maxSpendUsd) || policy.maxSpendUsd < 0)) throw new ValidationError("policy.maxSpendUsd must be non-negative", { "policy.maxSpendUsd": "invalid" });
|
|
164
|
+
let totalCpu = 0;
|
|
165
|
+
let totalMemoryMb = 0;
|
|
166
|
+
let totalStorageMb = 0;
|
|
167
|
+
let totalAccelerators = 0;
|
|
168
|
+
for (const machine of machines) {
|
|
169
|
+
const resources = mergeCreateOptions(defaults, machine).resources;
|
|
170
|
+
totalCpu += resources?.cpuCores ?? 0;
|
|
171
|
+
totalMemoryMb += resources?.memoryMB ?? 0;
|
|
172
|
+
totalStorageMb += resources?.diskGB ? resources.diskGB * 1024 : 0;
|
|
173
|
+
totalAccelerators += resources?.accelerator?.count ?? (resources?.accelerator ? 1 : 0);
|
|
174
|
+
}
|
|
175
|
+
if (policy?.maxTotalCpu !== void 0 && totalCpu > policy.maxTotalCpu) throw new ValidationError(`Fleet create requested ${totalCpu} CPU cores but policy.maxTotalCpu is ${policy.maxTotalCpu}`, { "policy.maxTotalCpu": "exceeded" });
|
|
176
|
+
if (policy?.maxTotalMemoryMb !== void 0 && totalMemoryMb > policy.maxTotalMemoryMb) throw new ValidationError(`Fleet create requested ${totalMemoryMb} MB RAM but policy.maxTotalMemoryMb is ${policy.maxTotalMemoryMb}`, { "policy.maxTotalMemoryMb": "exceeded" });
|
|
177
|
+
if (policy?.maxTotalStorageMb !== void 0 && totalStorageMb > policy.maxTotalStorageMb) throw new ValidationError(`Fleet create requested ${totalStorageMb} MB storage but policy.maxTotalStorageMb is ${policy.maxTotalStorageMb}`, { "policy.maxTotalStorageMb": "exceeded" });
|
|
178
|
+
if (policy?.maxTotalAccelerators !== void 0 && totalAccelerators > policy.maxTotalAccelerators) throw new ValidationError(`Fleet create requested ${totalAccelerators} accelerator devices but policy.maxTotalAccelerators is ${policy.maxTotalAccelerators}`, { "policy.maxTotalAccelerators": "exceeded" });
|
|
179
|
+
const maxLifetimeSeconds = Math.max(...machines.map((machine) => mergeCreateOptions(defaults, machine).maxLifetimeSeconds ?? DEFAULT_MACHINE_LIFETIME_SECONDS));
|
|
180
|
+
if (policy?.maxLifetimeSeconds !== void 0 && maxLifetimeSeconds > policy.maxLifetimeSeconds) throw new ValidationError(`Fleet create requested ${maxLifetimeSeconds}s max lifetime but policy.maxLifetimeSeconds is ${policy.maxLifetimeSeconds}`, { "policy.maxLifetimeSeconds": "exceeded" });
|
|
181
|
+
for (const machine of machines) {
|
|
182
|
+
const options = mergeCreateOptions(defaults, machine);
|
|
183
|
+
assertMachineDescriptorPolicy(machine.machineId, options, policy);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function assertMachineDescriptorPolicy(machineId, options, policy) {
|
|
187
|
+
if (!policy) return;
|
|
188
|
+
const driverType = options.driver?.type;
|
|
189
|
+
if (policy.allowedDrivers && driverType && !policy.allowedDrivers.includes(driverType)) throw new ValidationError(`Fleet machine '${machineId}' requested driver '${driverType}' outside policy.allowedDrivers`, { "policy.allowedDrivers": "exceeded" });
|
|
190
|
+
const image = options.environment ?? options.image;
|
|
191
|
+
if (policy.allowedImages && image && !policy.allowedImages.includes(image)) throw new ValidationError(`Fleet machine '${machineId}' requested image '${image}' outside policy.allowedImages`, { "policy.allowedImages": "exceeded" });
|
|
192
|
+
const templateId = options.templateId ?? options.publicTemplateId;
|
|
193
|
+
if (policy.allowedTemplateIds && templateId && !policy.allowedTemplateIds.includes(templateId)) throw new ValidationError(`Fleet machine '${machineId}' requested template '${templateId}' outside policy.allowedTemplateIds`, { "policy.allowedTemplateIds": "exceeded" });
|
|
194
|
+
if (policy.allowAccelerators === false && (options.resources?.accelerator?.count ?? (options.resources?.accelerator ? 1 : 0)) > 0) throw new ValidationError(`Fleet machine '${machineId}' requested accelerators but policy.allowAccelerators is false`, { "policy.allowAccelerators": "exceeded" });
|
|
195
|
+
}
|
|
196
|
+
function calculateResourceTotals(machines, defaults) {
|
|
197
|
+
let totalCpu = 0;
|
|
198
|
+
let totalMemoryMb = 0;
|
|
199
|
+
let totalStorageMb = 0;
|
|
200
|
+
let totalAccelerators = 0;
|
|
201
|
+
let maxLifetimeSeconds = 0;
|
|
202
|
+
for (const machine of machines) {
|
|
203
|
+
const options = mergeCreateOptions(defaults, machine);
|
|
204
|
+
const resources = options.resources;
|
|
205
|
+
totalCpu += resources?.cpuCores ?? 0;
|
|
206
|
+
totalMemoryMb += resources?.memoryMB ?? 0;
|
|
207
|
+
totalStorageMb += resources?.diskGB ? resources.diskGB * 1024 : 0;
|
|
208
|
+
totalAccelerators += resources?.accelerator?.count ?? (resources?.accelerator ? 1 : 0);
|
|
209
|
+
maxLifetimeSeconds = Math.max(maxLifetimeSeconds, options.maxLifetimeSeconds ?? DEFAULT_MACHINE_LIFETIME_SECONDS);
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
machines: machines.length,
|
|
213
|
+
totalCpu,
|
|
214
|
+
totalMemoryMb,
|
|
215
|
+
totalStorageMb,
|
|
216
|
+
totalAccelerators,
|
|
217
|
+
maxLifetimeSeconds
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function workspaceMetadata(workspace) {
|
|
221
|
+
return {
|
|
222
|
+
[WORKSPACE_MODE_META]: workspace?.mode ?? "isolated",
|
|
223
|
+
...workspace?.id ? { [WORKSPACE_ID_META]: workspace.id } : {},
|
|
224
|
+
...workspace?.quotaMb ? { [WORKSPACE_QUOTA_META]: workspace.quotaMb } : {},
|
|
225
|
+
...workspace?.mountPath ? { [WORKSPACE_MOUNT_META]: workspace.mountPath } : {}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function resolveMaxConcurrentCreates(value) {
|
|
229
|
+
const resolved = value ?? DEFAULT_MAX_CONCURRENT_CREATES;
|
|
230
|
+
if (!Number.isInteger(resolved) || resolved <= 0) throw new ValidationError("maxConcurrentCreates must be a positive integer");
|
|
231
|
+
return resolved;
|
|
232
|
+
}
|
|
233
|
+
function getMachineId(info) {
|
|
234
|
+
const value = info.metadata?.[MACHINE_ID_META];
|
|
235
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
236
|
+
}
|
|
237
|
+
function getFleetId(info) {
|
|
238
|
+
const value = info.metadata?.[FLEET_ID_META];
|
|
239
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
240
|
+
}
|
|
241
|
+
function dispatchResultsPath(fleetId, dispatchId, options) {
|
|
242
|
+
const params = new URLSearchParams();
|
|
243
|
+
if (options?.cursor) params.set("cursor", options.cursor);
|
|
244
|
+
if (options?.limit !== void 0) params.set("limit", String(options.limit));
|
|
245
|
+
for (const machine of options?.machines ?? []) params.append("machine", machine);
|
|
246
|
+
const query = params.toString();
|
|
247
|
+
const path = `/v1/fleets/${fleetId}/dispatch/${encodeURIComponent(dispatchId)}/results`;
|
|
248
|
+
return query ? `${path}?${query}` : path;
|
|
249
|
+
}
|
|
250
|
+
function execDispatchBody(command, options) {
|
|
251
|
+
return {
|
|
252
|
+
type: "exec",
|
|
253
|
+
command,
|
|
254
|
+
cwd: options?.cwd,
|
|
255
|
+
env: options?.env,
|
|
256
|
+
timeoutMs: options?.timeoutMs,
|
|
257
|
+
machines: options?.machines,
|
|
258
|
+
maxConcurrent: options?.maxConcurrent,
|
|
259
|
+
retry: options?.retry,
|
|
260
|
+
dispatchId: options?.dispatchId,
|
|
261
|
+
bufferResults: options?.bufferResults
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function promptDispatchBody(message, options) {
|
|
265
|
+
return {
|
|
266
|
+
type: "prompt",
|
|
267
|
+
parts: encodePromptForWire(message),
|
|
268
|
+
sessionId: options?.sessionId,
|
|
269
|
+
model: options?.model,
|
|
270
|
+
backend: options?.backend,
|
|
271
|
+
context: options?.context,
|
|
272
|
+
timeoutMs: options?.timeoutMs,
|
|
273
|
+
machines: options?.machines,
|
|
274
|
+
maxConcurrent: options?.maxConcurrent,
|
|
275
|
+
retry: options?.retry,
|
|
276
|
+
dispatchId: options?.dispatchId,
|
|
277
|
+
bufferResults: options?.bufferResults
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
var SandboxFleet = class {
|
|
281
|
+
constructor(client, fleetId, machines) {
|
|
282
|
+
this.client = client;
|
|
283
|
+
this.fleetId = fleetId;
|
|
284
|
+
this.machines = machines;
|
|
285
|
+
}
|
|
286
|
+
get ids() {
|
|
287
|
+
return [...this.machines.keys()];
|
|
288
|
+
}
|
|
289
|
+
get(machineId) {
|
|
290
|
+
const machine = this.machines.get(machineId);
|
|
291
|
+
if (!machine) throw new ValidationError(`Unknown fleet machine '${machineId}'`);
|
|
292
|
+
return machine;
|
|
293
|
+
}
|
|
294
|
+
sandbox(machineId) {
|
|
295
|
+
return this.requireSandbox(machineId);
|
|
296
|
+
}
|
|
297
|
+
async collectArtifacts(artifacts) {
|
|
298
|
+
return mapConcurrent(artifacts, Math.min(MAX_CONCURRENT_ARTIFACT_READS, artifacts.length || 1), async (artifact) => {
|
|
299
|
+
assertArtifactPath(artifact.path);
|
|
300
|
+
const machine = this.get(artifact.machineId);
|
|
301
|
+
const content = await (await this.requireSandbox(artifact.machineId)).read(artifact.path);
|
|
302
|
+
assertArtifactSize(content, artifact);
|
|
303
|
+
return {
|
|
304
|
+
...artifact,
|
|
305
|
+
sandboxId: machine.id,
|
|
306
|
+
content
|
|
307
|
+
};
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
async exec(machineId, command, options) {
|
|
311
|
+
const [result] = await this.dispatchExec(command, {
|
|
312
|
+
...options,
|
|
313
|
+
machines: [machineId]
|
|
314
|
+
});
|
|
315
|
+
if (result?.ok && result.result) return result.result;
|
|
316
|
+
if (result?.error) throw new Error(result.error.message);
|
|
317
|
+
throw new Error(`Fleet exec produced no result for machine '${machineId}'`);
|
|
318
|
+
}
|
|
319
|
+
async dispatchExec(command, options) {
|
|
320
|
+
return (await this.dispatchExecDetailed(command, options)).results;
|
|
321
|
+
}
|
|
322
|
+
async dispatchExecDetailed(command, options) {
|
|
323
|
+
const response = await this.client.fetch(`/v1/fleets/${this.fleetId}/dispatch`, {
|
|
324
|
+
method: "POST",
|
|
325
|
+
body: JSON.stringify(execDispatchBody(command, options))
|
|
326
|
+
});
|
|
327
|
+
if (!response.ok) {
|
|
328
|
+
const body = await response.text();
|
|
329
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
330
|
+
}
|
|
331
|
+
return await response.json();
|
|
332
|
+
}
|
|
333
|
+
async prompt(machineId, message, options) {
|
|
334
|
+
const [result] = await this.dispatchPrompt(message, {
|
|
335
|
+
...options,
|
|
336
|
+
machines: [machineId]
|
|
337
|
+
});
|
|
338
|
+
if (result?.prompt) return result.prompt;
|
|
339
|
+
if (result?.error) throw new Error(result.error.message);
|
|
340
|
+
throw new Error(`Fleet prompt produced no result for machine '${machineId}'`);
|
|
341
|
+
}
|
|
342
|
+
async dispatchPrompt(message, options) {
|
|
343
|
+
return (await this.dispatchPromptDetailed(message, options)).results;
|
|
344
|
+
}
|
|
345
|
+
async dispatchPromptDetailed(message, options) {
|
|
346
|
+
const response = await this.client.fetch(`/v1/fleets/${this.fleetId}/dispatch`, {
|
|
347
|
+
method: "POST",
|
|
348
|
+
body: JSON.stringify(promptDispatchBody(message, options))
|
|
349
|
+
});
|
|
350
|
+
if (!response.ok) {
|
|
351
|
+
const body = await response.text();
|
|
352
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
353
|
+
}
|
|
354
|
+
return await response.json();
|
|
355
|
+
}
|
|
356
|
+
manifest() {
|
|
357
|
+
return this.client.fleets.manifest(this.fleetId);
|
|
358
|
+
}
|
|
359
|
+
attachMachine(machine) {
|
|
360
|
+
return this.client.fleets.attachMachine(this.fleetId, machine);
|
|
361
|
+
}
|
|
362
|
+
detachMachine(machineId) {
|
|
363
|
+
return this.client.fleets.detachMachine(this.fleetId, machineId);
|
|
364
|
+
}
|
|
365
|
+
dispatchResults(dispatchId, options) {
|
|
366
|
+
return this.client.fleets.dispatchResults(this.fleetId, dispatchId, options);
|
|
367
|
+
}
|
|
368
|
+
cancelDispatch(dispatchId, reason) {
|
|
369
|
+
return this.client.fleets.cancelDispatch(this.fleetId, dispatchId, reason);
|
|
370
|
+
}
|
|
371
|
+
createWorkspaceSnapshot() {
|
|
372
|
+
return this.client.fleets.createWorkspaceSnapshot(this.fleetId);
|
|
373
|
+
}
|
|
374
|
+
restoreWorkspaceSnapshot(snapshotId) {
|
|
375
|
+
return this.client.fleets.restoreWorkspaceSnapshot(this.fleetId, snapshotId);
|
|
376
|
+
}
|
|
377
|
+
reconcileWorkspace() {
|
|
378
|
+
return this.client.fleets.reconcileWorkspace(this.fleetId);
|
|
379
|
+
}
|
|
380
|
+
dispatchExecStream(command, options) {
|
|
381
|
+
return this.client.fleets.dispatchExecStream(this.fleetId, command, options);
|
|
382
|
+
}
|
|
383
|
+
dispatchPromptStream(message, options) {
|
|
384
|
+
return this.client.fleets.dispatchPromptStream(this.fleetId, message, options);
|
|
385
|
+
}
|
|
386
|
+
async delete(options) {
|
|
387
|
+
const errors = [];
|
|
388
|
+
await Promise.all([...this.machines.values()].map(async (machine) => {
|
|
389
|
+
const box = await this.client.get(machine.id);
|
|
390
|
+
if (!box) return;
|
|
391
|
+
try {
|
|
392
|
+
await box.delete();
|
|
393
|
+
} catch (err) {
|
|
394
|
+
errors.push(err instanceof Error ? err : new Error(String(err)));
|
|
395
|
+
}
|
|
396
|
+
}));
|
|
397
|
+
await this.client.fleets.deleteRecord(this.fleetId);
|
|
398
|
+
if (errors.length > 0) {
|
|
399
|
+
if (!options?.continueOnError) throw errors[0];
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
async usage() {
|
|
403
|
+
const response = await this.client.fetch(`/v1/fleets/${this.fleetId}/usage`);
|
|
404
|
+
if (!response.ok) {
|
|
405
|
+
const body = await response.text();
|
|
406
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
407
|
+
}
|
|
408
|
+
return await response.json();
|
|
409
|
+
}
|
|
410
|
+
async trace(options = {}) {
|
|
411
|
+
return this.client.fleets.trace(this.fleetId, options);
|
|
412
|
+
}
|
|
413
|
+
async intelligence() {
|
|
414
|
+
const intelligence = (await this.trace({ includeIntelligence: true })).intelligence;
|
|
415
|
+
if (!intelligence) throw new Error("Fleet intelligence was not returned");
|
|
416
|
+
return intelligence;
|
|
417
|
+
}
|
|
418
|
+
async createIntelligenceReport(options = {}) {
|
|
419
|
+
const { dispatchId, window, compareTo, ...rest } = options;
|
|
420
|
+
return this.client.intelligence.createReport({
|
|
421
|
+
subject: {
|
|
422
|
+
type: "fleet",
|
|
423
|
+
id: this.fleetId,
|
|
424
|
+
dispatchId,
|
|
425
|
+
window,
|
|
426
|
+
compareTo
|
|
427
|
+
},
|
|
428
|
+
...rest
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
async createAgenticIntelligenceReport(options) {
|
|
432
|
+
return this.createIntelligenceReport({
|
|
433
|
+
mode: "agentic",
|
|
434
|
+
budget: {
|
|
435
|
+
billTo: "customer",
|
|
436
|
+
maxUsd: options.maxUsd
|
|
437
|
+
},
|
|
438
|
+
metadata: options.metadata,
|
|
439
|
+
dispatchId: options.dispatchId,
|
|
440
|
+
window: options.window,
|
|
441
|
+
compareTo: options.compareTo
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
async exportTrace(sink) {
|
|
445
|
+
return exportTraceBundle(await this.trace(), sink);
|
|
446
|
+
}
|
|
447
|
+
async cost() {
|
|
448
|
+
return this.client.fleets.cost(this.fleetId);
|
|
449
|
+
}
|
|
450
|
+
async createToken(options) {
|
|
451
|
+
return this.client.fleets.createToken(this.fleetId, options);
|
|
452
|
+
}
|
|
453
|
+
async requireSandbox(machineId) {
|
|
454
|
+
const machine = this.get(machineId);
|
|
455
|
+
const box = await this.client.get(machine.id);
|
|
456
|
+
if (!box) throw new ValidationError(`Fleet machine '${machineId}' no longer exists`, { machineId: "not_found" });
|
|
457
|
+
return box;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
var SandboxFleetClient = class {
|
|
461
|
+
constructor(client) {
|
|
462
|
+
this.client = client;
|
|
463
|
+
}
|
|
464
|
+
async capabilities() {
|
|
465
|
+
const response = await this.client.fetch("/v1/fleets/capabilities");
|
|
466
|
+
if (!response.ok) {
|
|
467
|
+
const body = await response.text();
|
|
468
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
469
|
+
}
|
|
470
|
+
return await response.json();
|
|
471
|
+
}
|
|
472
|
+
async operations() {
|
|
473
|
+
const response = await this.client.fetch("/v1/fleets/operations");
|
|
474
|
+
if (!response.ok) {
|
|
475
|
+
const body = await response.text();
|
|
476
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
477
|
+
}
|
|
478
|
+
return await response.json();
|
|
479
|
+
}
|
|
480
|
+
async reconcile(options) {
|
|
481
|
+
const response = await this.client.fetch("/v1/fleets/reconcile", {
|
|
482
|
+
method: "POST",
|
|
483
|
+
body: JSON.stringify(options ?? {})
|
|
484
|
+
});
|
|
485
|
+
if (!response.ok) {
|
|
486
|
+
const body = await response.text();
|
|
487
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
488
|
+
}
|
|
489
|
+
return await response.json();
|
|
490
|
+
}
|
|
491
|
+
async estimateCost(options) {
|
|
492
|
+
if (options.machines.length === 0) throw new ValidationError("Fleet cost estimate requires at least one machine");
|
|
493
|
+
assertUniqueMachineIds(options.machines);
|
|
494
|
+
assertPolicy(options.machines, options.defaults, options.policy);
|
|
495
|
+
const response = await this.client.fetch("/v1/fleets/estimate", {
|
|
496
|
+
method: "POST",
|
|
497
|
+
body: JSON.stringify({
|
|
498
|
+
machineCount: options.machines.length,
|
|
499
|
+
policy: options.policy,
|
|
500
|
+
resources: calculateResourceTotals(options.machines, options.defaults),
|
|
501
|
+
maxConcurrentCreates: options.maxConcurrentCreates
|
|
502
|
+
})
|
|
503
|
+
});
|
|
504
|
+
if (!response.ok) {
|
|
505
|
+
const body = await response.text();
|
|
506
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
507
|
+
}
|
|
508
|
+
return (await response.json()).estimate;
|
|
509
|
+
}
|
|
510
|
+
async create(options) {
|
|
511
|
+
const fleetId = options.fleetId ?? createFleetId();
|
|
512
|
+
assertSafeId(fleetId, "fleetId");
|
|
513
|
+
if (options.machines.length === 0) throw new ValidationError("Fleet create requires at least one machine");
|
|
514
|
+
assertUniqueMachineIds(options.machines);
|
|
515
|
+
assertNoReservedMetadata(options.metadata, "Fleet");
|
|
516
|
+
for (const machine of options.machines) assertNoReservedMetadata(machine.metadata, `Fleet machine '${machine.machineId}'`);
|
|
517
|
+
assertPolicy(options.machines, options.defaults, options.policy);
|
|
518
|
+
const maxConcurrentCreates = resolveMaxConcurrentCreates(options.maxConcurrentCreates);
|
|
519
|
+
if (options.policy?.maxConcurrentCreates !== void 0 && maxConcurrentCreates > options.policy.maxConcurrentCreates) throw new ValidationError(`Fleet create requested ${maxConcurrentCreates} concurrent creates but policy.maxConcurrentCreates is ${options.policy.maxConcurrentCreates}`, { "policy.maxConcurrentCreates": "exceeded" });
|
|
520
|
+
if (options.policy?.maxSpendUsd !== void 0) {
|
|
521
|
+
const estimate = await this.estimateCost({
|
|
522
|
+
defaults: options.defaults,
|
|
523
|
+
machines: options.machines,
|
|
524
|
+
policy: options.policy,
|
|
525
|
+
maxConcurrentCreates
|
|
526
|
+
});
|
|
527
|
+
if (estimate.estimatedMaxLifetimeUsd > options.policy.maxSpendUsd) throw new ValidationError(`Fleet estimated max lifetime cost $${estimate.estimatedMaxLifetimeUsd} exceeds policy.maxSpendUsd $${options.policy.maxSpendUsd}`, { "policy.maxSpendUsd": "exceeded" });
|
|
528
|
+
}
|
|
529
|
+
const created = [];
|
|
530
|
+
try {
|
|
531
|
+
for (let i = 0; i < options.machines.length; i += maxConcurrentCreates) {
|
|
532
|
+
const batch = options.machines.slice(i, i + maxConcurrentCreates);
|
|
533
|
+
const results = await Promise.allSettled(batch.map((machine) => this.createMachine(fleetId, machine, options)));
|
|
534
|
+
const rejected = results.find((result) => result.status === "rejected");
|
|
535
|
+
for (const result of results) if (result.status === "fulfilled") created.push(result.value);
|
|
536
|
+
if (rejected) throw rejected.reason;
|
|
537
|
+
}
|
|
538
|
+
} catch (err) {
|
|
539
|
+
if (options.cleanupOnFailure !== false) await Promise.allSettled(created.map(async (machine) => {
|
|
540
|
+
await (await this.client.get(machine.sandbox.id))?.delete();
|
|
541
|
+
}));
|
|
542
|
+
throw err;
|
|
543
|
+
}
|
|
544
|
+
try {
|
|
545
|
+
await this.persistFleet(fleetId, created, options);
|
|
546
|
+
} catch (err) {
|
|
547
|
+
if (options.cleanupOnFailure !== false) await Promise.allSettled(created.map(async (machine) => {
|
|
548
|
+
await (await this.client.get(machine.sandbox.id))?.delete();
|
|
549
|
+
}));
|
|
550
|
+
throw err;
|
|
551
|
+
}
|
|
552
|
+
return this.fromInfo({
|
|
553
|
+
fleetId,
|
|
554
|
+
machines: created
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
async createWithCoordinator(options) {
|
|
558
|
+
const { coordinator: coordinatorOptions, workers, ...createOptions } = options;
|
|
559
|
+
const coordinator = {
|
|
560
|
+
...coordinatorOptions,
|
|
561
|
+
machineId: coordinatorOptions?.machineId ?? "coordinator",
|
|
562
|
+
role: "coordinator"
|
|
563
|
+
};
|
|
564
|
+
return this.create({
|
|
565
|
+
...createOptions,
|
|
566
|
+
machines: [coordinator, ...workers.map((worker) => ({
|
|
567
|
+
...worker,
|
|
568
|
+
role: worker.role ?? "worker"
|
|
569
|
+
}))]
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
async createMachine(fleetId, machine, options) {
|
|
573
|
+
const merged = mergeCreateOptions(options.defaults, machine);
|
|
574
|
+
const sandbox = await this.client.create({
|
|
575
|
+
...merged,
|
|
576
|
+
name: machine.name ?? `${fleetId}-${machine.machineId}`,
|
|
577
|
+
maxLifetimeSeconds: merged.maxLifetimeSeconds ?? DEFAULT_MACHINE_LIFETIME_SECONDS,
|
|
578
|
+
metadata: {
|
|
579
|
+
...options.metadata,
|
|
580
|
+
...machine.metadata,
|
|
581
|
+
[FLEET_ID_META]: fleetId,
|
|
582
|
+
[MACHINE_ID_META]: machine.machineId,
|
|
583
|
+
[MACHINE_ROLE_META]: machine.role ?? "worker",
|
|
584
|
+
[FLEET_CREATED_BY_META]: "@tangle-network/sandbox",
|
|
585
|
+
...workspaceMetadata(options.workspace)
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
return {
|
|
589
|
+
machineId: machine.machineId,
|
|
590
|
+
sandbox: sandbox.toJSON(),
|
|
591
|
+
role: machine.role
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
async list(options) {
|
|
595
|
+
assertSafeId(options.fleetId, "fleetId");
|
|
596
|
+
const serverFleet = await this.getServerFleet(options.fleetId);
|
|
597
|
+
if (serverFleet) return this.fromInfo(await this.hydrateServerFleet(serverFleet, options));
|
|
598
|
+
return this.listBySandboxMetadata(options);
|
|
599
|
+
}
|
|
600
|
+
async delete(fleetId, options) {
|
|
601
|
+
await (await this.list({
|
|
602
|
+
...options,
|
|
603
|
+
fleetId
|
|
604
|
+
})).delete({ continueOnError: options?.continueOnError });
|
|
605
|
+
}
|
|
606
|
+
fromInfo(info) {
|
|
607
|
+
const machines = /* @__PURE__ */ new Map();
|
|
608
|
+
for (const machine of info.machines) machines.set(machine.machineId, machine.sandbox);
|
|
609
|
+
return new SandboxFleet(this.client, info.fleetId, machines);
|
|
610
|
+
}
|
|
611
|
+
async persistFleet(fleetId, machines, options) {
|
|
612
|
+
const response = await this.client.fetch("/v1/fleets", {
|
|
613
|
+
method: "POST",
|
|
614
|
+
headers: { "Idempotency-Key": options.idempotencyKey ?? fleetId },
|
|
615
|
+
body: JSON.stringify({
|
|
616
|
+
id: fleetId,
|
|
617
|
+
metadata: {
|
|
618
|
+
...options.metadata,
|
|
619
|
+
...workspaceMetadata(options.workspace)
|
|
620
|
+
},
|
|
621
|
+
workspace: options.workspace,
|
|
622
|
+
policy: options.policy,
|
|
623
|
+
resources: calculateResourceTotals(options.machines, options.defaults),
|
|
624
|
+
maxConcurrentCreates: options.maxConcurrentCreates,
|
|
625
|
+
machines: machines.map((machine) => ({
|
|
626
|
+
machineId: machine.machineId,
|
|
627
|
+
sandboxId: machine.sandbox.id,
|
|
628
|
+
status: machine.sandbox.status,
|
|
629
|
+
role: machine.role,
|
|
630
|
+
...getMachineDescriptor(options, machine.machineId)
|
|
631
|
+
}))
|
|
632
|
+
})
|
|
633
|
+
});
|
|
634
|
+
if (!response.ok) {
|
|
635
|
+
const body = await response.text();
|
|
636
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
async getServerFleet(fleetId) {
|
|
640
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}`);
|
|
641
|
+
if (response.status === 404) return null;
|
|
642
|
+
if (!response.ok) {
|
|
643
|
+
const body = await response.text();
|
|
644
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
645
|
+
}
|
|
646
|
+
return (await response.json()).fleet ?? null;
|
|
647
|
+
}
|
|
648
|
+
async deleteRecord(fleetId) {
|
|
649
|
+
assertSafeId(fleetId, "fleetId");
|
|
650
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}`, { method: "DELETE" });
|
|
651
|
+
if (response.status === 404) return;
|
|
652
|
+
if (!response.ok) {
|
|
653
|
+
const body = await response.text();
|
|
654
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
async usage(fleetId) {
|
|
658
|
+
assertSafeId(fleetId, "fleetId");
|
|
659
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/usage`);
|
|
660
|
+
if (!response.ok) {
|
|
661
|
+
const body = await response.text();
|
|
662
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
663
|
+
}
|
|
664
|
+
return await response.json();
|
|
665
|
+
}
|
|
666
|
+
async trace(fleetId, options = {}) {
|
|
667
|
+
assertSafeId(fleetId, "fleetId");
|
|
668
|
+
const query = new URLSearchParams();
|
|
669
|
+
if (options.includeIntelligence === true) query.set("includeIntelligence", "true");
|
|
670
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/trace${query.size ? `?${query}` : ""}`);
|
|
671
|
+
if (!response.ok) {
|
|
672
|
+
const body = await response.text();
|
|
673
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
674
|
+
}
|
|
675
|
+
return await response.json();
|
|
676
|
+
}
|
|
677
|
+
async intelligence(fleetId) {
|
|
678
|
+
const intelligence = (await this.trace(fleetId, { includeIntelligence: true })).intelligence;
|
|
679
|
+
if (!intelligence) throw new Error("Fleet intelligence was not returned");
|
|
680
|
+
return intelligence;
|
|
681
|
+
}
|
|
682
|
+
async createIntelligenceReport(fleetId, options = {}) {
|
|
683
|
+
return this.client.intelligence.createReport({
|
|
684
|
+
subject: {
|
|
685
|
+
type: "fleet",
|
|
686
|
+
id: fleetId
|
|
687
|
+
},
|
|
688
|
+
...options
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
async createAgenticIntelligenceReport(fleetId, options) {
|
|
692
|
+
return this.createIntelligenceReport(fleetId, {
|
|
693
|
+
mode: "agentic",
|
|
694
|
+
budget: {
|
|
695
|
+
billTo: "customer",
|
|
696
|
+
maxUsd: options.maxUsd
|
|
697
|
+
},
|
|
698
|
+
metadata: options.metadata
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
async exportTrace(fleetId, sink) {
|
|
702
|
+
return exportTraceBundle(await this.trace(fleetId), sink);
|
|
703
|
+
}
|
|
704
|
+
async cost(fleetId) {
|
|
705
|
+
assertSafeId(fleetId, "fleetId");
|
|
706
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/cost`);
|
|
707
|
+
if (!response.ok) {
|
|
708
|
+
const body = await response.text();
|
|
709
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
710
|
+
}
|
|
711
|
+
return (await response.json()).estimate;
|
|
712
|
+
}
|
|
713
|
+
async createToken(fleetId, options) {
|
|
714
|
+
assertSafeId(fleetId, "fleetId");
|
|
715
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/token`, {
|
|
716
|
+
method: "POST",
|
|
717
|
+
body: JSON.stringify(options ?? {})
|
|
718
|
+
});
|
|
719
|
+
if (!response.ok) {
|
|
720
|
+
const body = await response.text();
|
|
721
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
722
|
+
}
|
|
723
|
+
return await response.json();
|
|
724
|
+
}
|
|
725
|
+
async manifest(fleetId) {
|
|
726
|
+
assertSafeId(fleetId, "fleetId");
|
|
727
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/manifest`);
|
|
728
|
+
if (!response.ok) {
|
|
729
|
+
const body = await response.text();
|
|
730
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
731
|
+
}
|
|
732
|
+
return await response.json();
|
|
733
|
+
}
|
|
734
|
+
async attachMachine(fleetId, machine) {
|
|
735
|
+
assertSafeId(fleetId, "fleetId");
|
|
736
|
+
assertSafeId(machine.machineId, "machineId");
|
|
737
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/machines`, {
|
|
738
|
+
method: "POST",
|
|
739
|
+
body: JSON.stringify(machine)
|
|
740
|
+
});
|
|
741
|
+
if (!response.ok) {
|
|
742
|
+
const body = await response.text();
|
|
743
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
744
|
+
}
|
|
745
|
+
return (await response.json()).machine;
|
|
746
|
+
}
|
|
747
|
+
async detachMachine(fleetId, machineId) {
|
|
748
|
+
assertSafeId(fleetId, "fleetId");
|
|
749
|
+
assertSafeId(machineId, "machineId");
|
|
750
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/machines/${encodeURIComponent(machineId)}`, { method: "DELETE" });
|
|
751
|
+
if (!response.ok) {
|
|
752
|
+
const body = await response.text();
|
|
753
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
754
|
+
}
|
|
755
|
+
return await response.json();
|
|
756
|
+
}
|
|
757
|
+
async dispatchResults(fleetId, dispatchId, options) {
|
|
758
|
+
assertSafeId(fleetId, "fleetId");
|
|
759
|
+
assertSafeId(dispatchId, "dispatchId");
|
|
760
|
+
const response = await this.client.fetch(dispatchResultsPath(fleetId, dispatchId, options));
|
|
761
|
+
if (!response.ok) {
|
|
762
|
+
const body = await response.text();
|
|
763
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
764
|
+
}
|
|
765
|
+
return await response.json();
|
|
766
|
+
}
|
|
767
|
+
async cancelDispatch(fleetId, dispatchId, reason) {
|
|
768
|
+
assertSafeId(fleetId, "fleetId");
|
|
769
|
+
assertSafeId(dispatchId, "dispatchId");
|
|
770
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/dispatch/${encodeURIComponent(dispatchId)}/cancel`, {
|
|
771
|
+
method: "POST",
|
|
772
|
+
body: JSON.stringify(reason ? { reason } : {})
|
|
773
|
+
});
|
|
774
|
+
if (!response.ok) {
|
|
775
|
+
const body = await response.text();
|
|
776
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
777
|
+
}
|
|
778
|
+
return await response.json();
|
|
779
|
+
}
|
|
780
|
+
async createWorkspaceSnapshot(fleetId) {
|
|
781
|
+
assertSafeId(fleetId, "fleetId");
|
|
782
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/workspace/snapshots`, { method: "POST" });
|
|
783
|
+
if (!response.ok) {
|
|
784
|
+
const body = await response.text();
|
|
785
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
786
|
+
}
|
|
787
|
+
return await response.json();
|
|
788
|
+
}
|
|
789
|
+
async restoreWorkspaceSnapshot(fleetId, snapshotId) {
|
|
790
|
+
assertSafeId(fleetId, "fleetId");
|
|
791
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/workspace/snapshots/${encodeURIComponent(snapshotId)}/restore`, { method: "POST" });
|
|
792
|
+
if (!response.ok) {
|
|
793
|
+
const body = await response.text();
|
|
794
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
795
|
+
}
|
|
796
|
+
return await response.json();
|
|
797
|
+
}
|
|
798
|
+
async reconcileWorkspace(fleetId) {
|
|
799
|
+
assertSafeId(fleetId, "fleetId");
|
|
800
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/workspace/reconcile`, { method: "POST" });
|
|
801
|
+
if (!response.ok) {
|
|
802
|
+
const body = await response.text();
|
|
803
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
804
|
+
}
|
|
805
|
+
return await response.json();
|
|
806
|
+
}
|
|
807
|
+
async *dispatchExecStream(fleetId, command, options) {
|
|
808
|
+
assertSafeId(fleetId, "fleetId");
|
|
809
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/dispatch/stream`, {
|
|
810
|
+
method: "POST",
|
|
811
|
+
headers: { Accept: "text/event-stream" },
|
|
812
|
+
signal: options?.signal,
|
|
813
|
+
body: JSON.stringify(execDispatchBody(command, options))
|
|
814
|
+
});
|
|
815
|
+
if (!response.ok) {
|
|
816
|
+
const body = await response.text();
|
|
817
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
818
|
+
}
|
|
819
|
+
yield* parseSSEStream(response.body, { signal: options?.signal });
|
|
820
|
+
}
|
|
821
|
+
async *dispatchPromptStream(fleetId, message, options) {
|
|
822
|
+
assertSafeId(fleetId, "fleetId");
|
|
823
|
+
const response = await this.client.fetch(`/v1/fleets/${fleetId}/dispatch/stream`, {
|
|
824
|
+
method: "POST",
|
|
825
|
+
headers: { Accept: "text/event-stream" },
|
|
826
|
+
signal: options?.signal,
|
|
827
|
+
body: JSON.stringify(promptDispatchBody(message, options))
|
|
828
|
+
});
|
|
829
|
+
if (!response.ok) {
|
|
830
|
+
const body = await response.text();
|
|
831
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
832
|
+
}
|
|
833
|
+
yield* parseSSEStream(response.body, { signal: options?.signal });
|
|
834
|
+
}
|
|
835
|
+
async reapExpired(options) {
|
|
836
|
+
const response = await this.client.fetch("/v1/fleets/reap-expired", {
|
|
837
|
+
method: "POST",
|
|
838
|
+
body: JSON.stringify(options ?? {})
|
|
839
|
+
});
|
|
840
|
+
if (!response.ok) {
|
|
841
|
+
const body = await response.text();
|
|
842
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
843
|
+
}
|
|
844
|
+
return await response.json();
|
|
845
|
+
}
|
|
846
|
+
async hydrateServerFleet(fleet, options) {
|
|
847
|
+
const machines = await Promise.all(fleet.machines.map(async (machine) => {
|
|
848
|
+
const box = await this.client.get(machine.sandboxId);
|
|
849
|
+
if (!box) throw new ValidationError(`Fleet machine '${machine.machineId}' points at missing sandbox '${machine.sandboxId}'`, { machineId: "missing_sandbox" });
|
|
850
|
+
return {
|
|
851
|
+
machineId: machine.machineId,
|
|
852
|
+
sandbox: box.toJSON(),
|
|
853
|
+
role: machine.role
|
|
854
|
+
};
|
|
855
|
+
}));
|
|
856
|
+
const filtered = options.status ? machines.filter((machine) => machine.sandbox.status === options.status) : machines;
|
|
857
|
+
return {
|
|
858
|
+
fleetId: fleet.id,
|
|
859
|
+
machines: filtered
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
async listBySandboxMetadata(options) {
|
|
863
|
+
const machines = (await this.client.list(options)).map((box) => box.toJSON()).filter((info) => getFleetId(info) === options.fleetId).flatMap((info) => {
|
|
864
|
+
const machineId = getMachineId(info);
|
|
865
|
+
return machineId ? [{
|
|
866
|
+
machineId,
|
|
867
|
+
sandbox: info,
|
|
868
|
+
role: getMachineRole(info)
|
|
869
|
+
}] : [];
|
|
870
|
+
});
|
|
871
|
+
return this.fromInfo({
|
|
872
|
+
fleetId: options.fleetId,
|
|
873
|
+
machines
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
function getMachineDescriptor(options, machineId) {
|
|
878
|
+
const spec = options.machines.find((machine) => machine.machineId === machineId);
|
|
879
|
+
if (!spec) return {};
|
|
880
|
+
const merged = mergeCreateOptions(options.defaults, spec);
|
|
881
|
+
return {
|
|
882
|
+
driverType: merged.driver?.type,
|
|
883
|
+
image: merged.image,
|
|
884
|
+
environment: merged.environment,
|
|
885
|
+
templateId: merged.templateId,
|
|
886
|
+
publicTemplateId: merged.publicTemplateId,
|
|
887
|
+
acceleratorCount: merged.resources?.accelerator?.count ?? (merged.resources?.accelerator ? 1 : void 0)
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
async function mapConcurrent(items, concurrency, fn) {
|
|
891
|
+
const results = new Array(items.length);
|
|
892
|
+
let index = 0;
|
|
893
|
+
const workers = Array.from({ length: Math.min(concurrency, items.length) }, async () => {
|
|
894
|
+
while (index < items.length) {
|
|
895
|
+
const current = index;
|
|
896
|
+
index += 1;
|
|
897
|
+
const item = items[current];
|
|
898
|
+
if (item === void 0) throw new Error(`Missing fleet item at index ${current}`);
|
|
899
|
+
results[current] = await fn(item);
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
await Promise.all(workers);
|
|
903
|
+
return results;
|
|
904
|
+
}
|
|
905
|
+
function assertArtifactPath(path) {
|
|
906
|
+
if (path !== DEFAULT_ARTIFACT_ROOT && !path.startsWith(`${DEFAULT_ARTIFACT_ROOT}/`)) throw new ValidationError(`Fleet artifact path '${path}' must be under ${DEFAULT_ARTIFACT_ROOT}`, { path: "outside_workspace" });
|
|
907
|
+
if (path.includes("\0") || path.split("/").includes("..")) throw new ValidationError(`Fleet artifact path '${path}' must not contain traversal segments`, { path: "invalid" });
|
|
908
|
+
}
|
|
909
|
+
function assertArtifactSize(content, artifact) {
|
|
910
|
+
const maxBytes = artifact.maxBytes ?? DEFAULT_MAX_ARTIFACT_BYTES;
|
|
911
|
+
if (!Number.isFinite(maxBytes) || maxBytes <= 0) throw new ValidationError("artifact.maxBytes must be a positive number", { maxBytes: "invalid" });
|
|
912
|
+
if (new TextEncoder().encode(content).byteLength > maxBytes) throw new ValidationError(`Fleet artifact '${artifact.path}' exceeded ${maxBytes} bytes`, { path: "too_large" });
|
|
913
|
+
}
|
|
914
|
+
function getMachineRole(info) {
|
|
915
|
+
const value = info.metadata?.[MACHINE_ROLE_META];
|
|
916
|
+
return value === "coordinator" || value === "worker" ? value : void 0;
|
|
917
|
+
}
|
|
918
|
+
//#endregion
|
|
919
|
+
//#region src/client.ts
|
|
920
|
+
/**
|
|
921
|
+
* Sandbox Client
|
|
922
|
+
*
|
|
923
|
+
* Main client class for interacting with the Sandbox API.
|
|
924
|
+
*/
|
|
925
|
+
const DEFAULT_TIMEOUT_MS = 3e4;
|
|
926
|
+
/**
|
|
927
|
+
* Default time budget for `create()` — the full create-and-reach-running
|
|
928
|
+
* flow. Cold provisions (image pull + container create + sidecar boot)
|
|
929
|
+
* routinely take ~25–40s, well past the generic 30s request timeout, so
|
|
930
|
+
* the create POST and the poll-to-running ride this higher ceiling
|
|
931
|
+
* instead. A POST that rides the deadline polls the box to `running`
|
|
932
|
+
* rather than re-POSTing (the idempotency key already makes a re-POST
|
|
933
|
+
* safe server-side, but polling is cheaper and avoids duplicate work).
|
|
934
|
+
*/
|
|
935
|
+
const DEFAULT_CREATE_TIMEOUT_MS = 12e4;
|
|
936
|
+
/**
|
|
937
|
+
* Extra grace the SDK's client-side batch deadline gets on top of
|
|
938
|
+
* the server-side `timeoutMs`. The server's clock starts when the
|
|
939
|
+
* HTTP request lands on the server; the SDK's `AbortSignal.timeout`
|
|
940
|
+
* clock starts before the TCP handshake. Without a grace buffer,
|
|
941
|
+
* the two deadlines line up almost exactly — and a batch that legitimately
|
|
942
|
+
* runs to the full `timeoutMs` on the server will race the SDK
|
|
943
|
+
* deadline firing as the final `batch.completed` SSE event is still
|
|
944
|
+
* in transit, making the caller throw `AbortError` and drop the
|
|
945
|
+
* result.
|
|
946
|
+
*
|
|
947
|
+
* The client deadline is purely a safety valve against hung
|
|
948
|
+
* connections, not a batch correctness timer — the server enforces
|
|
949
|
+
* the real `timeoutMs`. 30s is enough to cover TCP/TLS setup, the
|
|
950
|
+
* server-side batch bookkeeping, and SSE teardown, while still
|
|
951
|
+
* shutting down quickly on a truly hung stream.
|
|
952
|
+
*/
|
|
953
|
+
const CLIENT_DEADLINE_GRACE_MS = 3e4;
|
|
954
|
+
function isLocalSandboxEndpoint(baseUrl) {
|
|
955
|
+
try {
|
|
956
|
+
const { hostname } = new URL(baseUrl);
|
|
957
|
+
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";
|
|
958
|
+
} catch {
|
|
959
|
+
return false;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
function generateIdempotencyKey() {
|
|
963
|
+
const c = globalThis.crypto;
|
|
964
|
+
if (c?.randomUUID) return c.randomUUID();
|
|
965
|
+
if (c?.getRandomValues) {
|
|
966
|
+
const bytes = c.getRandomValues(new Uint8Array(16));
|
|
967
|
+
return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
968
|
+
}
|
|
969
|
+
throw new Error("idempotency key generation requires global crypto");
|
|
970
|
+
}
|
|
971
|
+
function withRequestContextHeaders(response, path, method) {
|
|
972
|
+
const headers = new Headers(response.headers);
|
|
973
|
+
headers.set("x-tangle-request-path", path);
|
|
974
|
+
if (method) headers.set("x-tangle-request-method", method);
|
|
975
|
+
return new Response(response.body, {
|
|
976
|
+
status: response.status,
|
|
977
|
+
statusText: response.statusText,
|
|
978
|
+
headers
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
async function resolveLocalCliAuthFiles(backendType) {
|
|
982
|
+
try {
|
|
983
|
+
const { discoverLocalCliAuthFiles } = await importLocalCliRegistry();
|
|
984
|
+
return discoverLocalCliAuthFiles(backendType);
|
|
985
|
+
} catch {
|
|
986
|
+
return discoverLocalCliAuthFilesFallback(backendType);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
async function discoverLocalCliAuthFilesFallback(backendType) {
|
|
990
|
+
try {
|
|
991
|
+
const [{ existsSync, readFileSync }, { homedir }, { join }] = await Promise.all([
|
|
992
|
+
import("node:fs"),
|
|
993
|
+
import("node:os"),
|
|
994
|
+
import("node:path")
|
|
995
|
+
]);
|
|
996
|
+
const homeDir = homedir();
|
|
997
|
+
const authFiles = (backendType === "codex" ? [".codex/auth.json"] : [".claude/.credentials.json", ".claude/settings.json"]).flatMap((path) => {
|
|
998
|
+
const absolutePath = join(homeDir, path);
|
|
999
|
+
if (!existsSync(absolutePath)) return [];
|
|
1000
|
+
return [{
|
|
1001
|
+
path,
|
|
1002
|
+
content: readFileSync(absolutePath, "utf8"),
|
|
1003
|
+
mode: 384
|
|
1004
|
+
}];
|
|
1005
|
+
});
|
|
1006
|
+
return authFiles.length ? authFiles : void 0;
|
|
1007
|
+
} catch {
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
async function describeLocalCliAuthExpectation(backendType) {
|
|
1012
|
+
try {
|
|
1013
|
+
return (await importLocalCliRegistry()).describeLocalCliAuthExpectation(backendType);
|
|
1014
|
+
} catch {
|
|
1015
|
+
return backendType === "codex" ? "~/.codex/auth.json" : "~/.claude/.credentials.json or ~/.claude/settings.json";
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
async function importLocalCliRegistry() {
|
|
1019
|
+
return await import(
|
|
1020
|
+
/* @vite-ignore */
|
|
1021
|
+
["@tangle-network", "cli-agent-registry"].join("/")
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
async function hydrateLocalCliBackendAuth(backend, baseUrl, trustLocalCliAuth) {
|
|
1025
|
+
if (!backend) return void 0;
|
|
1026
|
+
if (!isLocalSandboxEndpoint(baseUrl)) return backend;
|
|
1027
|
+
if (backend.type !== "codex" && backend.type !== "claude-code") return backend;
|
|
1028
|
+
if (backend.model?.authFiles?.length) return backend;
|
|
1029
|
+
if (backend.model?.apiKey) return backend;
|
|
1030
|
+
if (backend.model?.authMode === "api-key") return backend;
|
|
1031
|
+
if (!trustLocalCliAuth) {
|
|
1032
|
+
const cliName = backend.type === "codex" ? "codex" : "claude";
|
|
1033
|
+
throw new AuthError(`Local ${backend.type} backend requested for ${baseUrl}, but the SDK will not read CLI credentials from the host home directory unless you opt in by constructing the client with \`new Sandbox({ ..., trustLocalCliAuth: true })\`. Only opt in when the localhost endpoint is one you control. Otherwise, pass \`backend.model.apiKey\` / \`backend.model.authFiles\` explicitly, or run \`${cliName} login\` inside the sandbox.`);
|
|
1034
|
+
}
|
|
1035
|
+
const authFiles = await resolveLocalCliAuthFiles(backend.type);
|
|
1036
|
+
if (!authFiles?.length) {
|
|
1037
|
+
const cliName = backend.type === "codex" ? "codex" : "claude";
|
|
1038
|
+
const expectation = await describeLocalCliAuthExpectation(backend.type);
|
|
1039
|
+
throw new AuthError(`Local ${backend.type} backend requested for ${baseUrl}, but no local CLI auth was found. Run \`${cliName} login\` on the host or provide backend.model.apiKey/authFiles explicitly. Expected auth under ${expectation}.`);
|
|
1040
|
+
}
|
|
1041
|
+
return {
|
|
1042
|
+
...backend,
|
|
1043
|
+
model: {
|
|
1044
|
+
...backend.model,
|
|
1045
|
+
authMode: backend.model?.authMode ?? "oauth",
|
|
1046
|
+
authFiles
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Client for the Tangle Sandbox platform.
|
|
1052
|
+
*
|
|
1053
|
+
* @example
|
|
1054
|
+
* ```typescript
|
|
1055
|
+
* import { Sandbox } from "@tangle-network/sandbox";
|
|
1056
|
+
*
|
|
1057
|
+
* const client = new Sandbox({
|
|
1058
|
+
* apiKey: "sk_sandbox_...",
|
|
1059
|
+
* baseUrl: "https://your-sandbox-api.example.com",
|
|
1060
|
+
* });
|
|
1061
|
+
*
|
|
1062
|
+
* // Create a sandbox
|
|
1063
|
+
* const box = await client.create({
|
|
1064
|
+
* name: "my-project",
|
|
1065
|
+
* sshEnabled: true,
|
|
1066
|
+
* });
|
|
1067
|
+
*
|
|
1068
|
+
* // Execute commands
|
|
1069
|
+
* const result = await box.exec("npm install");
|
|
1070
|
+
*
|
|
1071
|
+
* // Clean up
|
|
1072
|
+
* await box.delete();
|
|
1073
|
+
* ```
|
|
1074
|
+
*/
|
|
1075
|
+
var SandboxClient = class {
|
|
1076
|
+
baseUrl;
|
|
1077
|
+
apiKey;
|
|
1078
|
+
timeoutMs;
|
|
1079
|
+
trustLocalCliAuth;
|
|
1080
|
+
_secrets = null;
|
|
1081
|
+
_sshKeys = null;
|
|
1082
|
+
_fleets = null;
|
|
1083
|
+
_intelligence = null;
|
|
1084
|
+
constructor(config) {
|
|
1085
|
+
if (!config.apiKey) throw new AuthError("API key is required");
|
|
1086
|
+
if (!config.baseUrl) throw new ValidationError("Base URL is required");
|
|
1087
|
+
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
1088
|
+
this.apiKey = config.apiKey;
|
|
1089
|
+
this.timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
1090
|
+
this.trustLocalCliAuth = config.trustLocalCliAuth === true;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Fleet operations for agent-managed groups of sandboxes.
|
|
1094
|
+
*
|
|
1095
|
+
* Fleets are an SDK-level convenience over the existing sandbox lifecycle
|
|
1096
|
+
* API. Each worker is a normal sandbox tagged with stable fleet metadata,
|
|
1097
|
+
* so older clients and dashboards can still inspect and delete them.
|
|
1098
|
+
*/
|
|
1099
|
+
get fleets() {
|
|
1100
|
+
if (!this._fleets) this._fleets = new SandboxFleetClient(this);
|
|
1101
|
+
return this._fleets;
|
|
1102
|
+
}
|
|
1103
|
+
get intelligence() {
|
|
1104
|
+
if (!this._intelligence) this._intelligence = new IntelligenceClient(this);
|
|
1105
|
+
return this._intelligence;
|
|
1106
|
+
}
|
|
1107
|
+
getApiKey() {
|
|
1108
|
+
return this.apiKey;
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* Access the secrets manager for storing and retrieving encrypted secrets.
|
|
1112
|
+
*
|
|
1113
|
+
* @example
|
|
1114
|
+
* ```typescript
|
|
1115
|
+
* // Create a secret
|
|
1116
|
+
* await client.secrets.create("HF_TOKEN", "hf_xxx");
|
|
1117
|
+
*
|
|
1118
|
+
* // List secrets (names only)
|
|
1119
|
+
* const secrets = await client.secrets.list();
|
|
1120
|
+
*
|
|
1121
|
+
* // Get secret value
|
|
1122
|
+
* const value = await client.secrets.get("HF_TOKEN");
|
|
1123
|
+
*
|
|
1124
|
+
* // Update secret
|
|
1125
|
+
* await client.secrets.update("HF_TOKEN", "hf_new_value");
|
|
1126
|
+
*
|
|
1127
|
+
* // Delete secret
|
|
1128
|
+
* await client.secrets.delete("HF_TOKEN");
|
|
1129
|
+
* ```
|
|
1130
|
+
*/
|
|
1131
|
+
get secrets() {
|
|
1132
|
+
if (!this._secrets) this._secrets = new SecretsManagerImpl(this);
|
|
1133
|
+
return this._secrets;
|
|
1134
|
+
}
|
|
1135
|
+
get sshKeys() {
|
|
1136
|
+
if (!this._sshKeys) this._sshKeys = new SshKeysManagerImpl(this);
|
|
1137
|
+
return this._sshKeys;
|
|
1138
|
+
}
|
|
1139
|
+
_environments = null;
|
|
1140
|
+
/**
|
|
1141
|
+
* Access available development environments.
|
|
1142
|
+
*
|
|
1143
|
+
* @example
|
|
1144
|
+
* ```typescript
|
|
1145
|
+
* const envs = await client.environments.list();
|
|
1146
|
+
* // → [{ id: "universal", description: "Universal environment with all toolchains via Nix", ... }]
|
|
1147
|
+
*
|
|
1148
|
+
* const sandbox = await client.create({ environment: "universal" });
|
|
1149
|
+
* ```
|
|
1150
|
+
*/
|
|
1151
|
+
get environments() {
|
|
1152
|
+
if (!this._environments) this._environments = new EnvironmentsClient(this);
|
|
1153
|
+
return this._environments;
|
|
1154
|
+
}
|
|
1155
|
+
_teams = null;
|
|
1156
|
+
_publicTemplates = null;
|
|
1157
|
+
/**
|
|
1158
|
+
* Access team management (collaboration groups, invitations,
|
|
1159
|
+
* member roles). Teams scope shared sandboxes — pass `teamId` to
|
|
1160
|
+
* `client.create()` to create a sandbox accessible to a team's
|
|
1161
|
+
* members.
|
|
1162
|
+
*
|
|
1163
|
+
* @example
|
|
1164
|
+
* ```typescript
|
|
1165
|
+
* const teams = await client.teams.list();
|
|
1166
|
+
* const invite = await client.teams.invite(teams[0].id, {
|
|
1167
|
+
* email: "alice@example.com",
|
|
1168
|
+
* role: "member",
|
|
1169
|
+
* });
|
|
1170
|
+
* ```
|
|
1171
|
+
*/
|
|
1172
|
+
get teams() {
|
|
1173
|
+
if (!this._teams) this._teams = new TeamsClient(this);
|
|
1174
|
+
return this._teams;
|
|
1175
|
+
}
|
|
1176
|
+
get publicTemplates() {
|
|
1177
|
+
if (!this._publicTemplates) this._publicTemplates = new PublicTemplatesClient(this);
|
|
1178
|
+
return this._publicTemplates;
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Create a new sandbox.
|
|
1182
|
+
*
|
|
1183
|
+
* @param options - Configuration for the new sandbox
|
|
1184
|
+
* @returns A SandboxInstance representing the created sandbox
|
|
1185
|
+
*
|
|
1186
|
+
* @example
|
|
1187
|
+
* ```typescript
|
|
1188
|
+
* const box = await client.create({
|
|
1189
|
+
* name: "my-project",
|
|
1190
|
+
* environment: "universal",
|
|
1191
|
+
* sshEnabled: true,
|
|
1192
|
+
* env: { NODE_ENV: "development" },
|
|
1193
|
+
* });
|
|
1194
|
+
* ```
|
|
1195
|
+
*/
|
|
1196
|
+
async create(options, requestOptions) {
|
|
1197
|
+
const timeoutMs = requestOptions?.timeoutMs ?? DEFAULT_CREATE_TIMEOUT_MS;
|
|
1198
|
+
const idempotencyKey = options?.idempotencyKey ?? generateIdempotencyKey();
|
|
1199
|
+
const deadline = Date.now() + timeoutMs;
|
|
1200
|
+
const git = options?.git ? {
|
|
1201
|
+
url: options.git.url,
|
|
1202
|
+
ref: options.git.ref,
|
|
1203
|
+
depth: options.git.depth,
|
|
1204
|
+
sparse: options.git.sparse,
|
|
1205
|
+
auth: options.git.auth
|
|
1206
|
+
} : void 0;
|
|
1207
|
+
const resolvedEnvironment = options?.environment ?? options?.image;
|
|
1208
|
+
const backend = await hydrateLocalCliBackendAuth(options?.backend, this.baseUrl, this.trustLocalCliAuth);
|
|
1209
|
+
const resolvedBackend = backend ? {
|
|
1210
|
+
...backend,
|
|
1211
|
+
type: backend.type ?? "opencode"
|
|
1212
|
+
} : void 0;
|
|
1213
|
+
const resources = normalizeSandboxResources(options?.resources, options?.driver);
|
|
1214
|
+
const postDeadline = AbortSignal.timeout(timeoutMs);
|
|
1215
|
+
const postSignal = requestOptions?.signal ? AbortSignal.any([requestOptions.signal, postDeadline]) : postDeadline;
|
|
1216
|
+
let response;
|
|
1217
|
+
try {
|
|
1218
|
+
response = await this.fetch("/v1/sandboxes", {
|
|
1219
|
+
method: "POST",
|
|
1220
|
+
headers: { "Idempotency-Key": idempotencyKey },
|
|
1221
|
+
signal: postSignal,
|
|
1222
|
+
body: JSON.stringify({
|
|
1223
|
+
name: options?.name,
|
|
1224
|
+
...resolvedEnvironment !== void 0 ? {
|
|
1225
|
+
environment: resolvedEnvironment,
|
|
1226
|
+
image: resolvedEnvironment
|
|
1227
|
+
} : {},
|
|
1228
|
+
git,
|
|
1229
|
+
tools: options?.tools,
|
|
1230
|
+
bare: options?.bare,
|
|
1231
|
+
driver: options?.driver,
|
|
1232
|
+
backend: resolvedBackend,
|
|
1233
|
+
permissions: options?.permissions,
|
|
1234
|
+
env: options?.env,
|
|
1235
|
+
resources,
|
|
1236
|
+
sshEnabled: options?.sshEnabled,
|
|
1237
|
+
sshPublicKeys: options?.sshPublicKeys ?? (options?.sshPublicKey ? [options.sshPublicKey] : void 0),
|
|
1238
|
+
sshKeyIds: options?.sshKeyIds,
|
|
1239
|
+
webTerminalEnabled: options?.webTerminalEnabled,
|
|
1240
|
+
maxLifetimeSeconds: options?.maxLifetimeSeconds,
|
|
1241
|
+
idleTimeoutSeconds: options?.idleTimeoutSeconds,
|
|
1242
|
+
storage: options?.storage,
|
|
1243
|
+
fromSnapshot: options?.fromSnapshot,
|
|
1244
|
+
fromSandboxId: options?.fromSandboxId,
|
|
1245
|
+
templateId: options?.templateId,
|
|
1246
|
+
publicTemplateId: options?.publicTemplateId,
|
|
1247
|
+
publicTemplateVersionId: options?.publicTemplateVersionId,
|
|
1248
|
+
secrets: options?.secrets,
|
|
1249
|
+
confidential: options?.confidential,
|
|
1250
|
+
metadata: options?.metadata,
|
|
1251
|
+
teamId: options?.teamId,
|
|
1252
|
+
capabilities: options?.capabilities,
|
|
1253
|
+
privacy: options?.privacy,
|
|
1254
|
+
egressPolicy: options?.egressPolicy,
|
|
1255
|
+
idempotencyKey
|
|
1256
|
+
})
|
|
1257
|
+
});
|
|
1258
|
+
} catch (err) {
|
|
1259
|
+
if (requestOptions?.signal?.aborted) throw err;
|
|
1260
|
+
if (err instanceof TimeoutError || err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError")) throw new TimeoutError(timeoutMs, `Sandbox create did not complete within ${timeoutMs}ms. The provision may still be running server-side; retry create() with idempotencyKey="${idempotencyKey}" to join it.`);
|
|
1261
|
+
throw err;
|
|
1262
|
+
}
|
|
1263
|
+
if (!response.ok) {
|
|
1264
|
+
const body = await response.text();
|
|
1265
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1266
|
+
}
|
|
1267
|
+
const data = await response.json();
|
|
1268
|
+
const instance = new SandboxInstance(this, this.parseInfo(data), resolvedBackend);
|
|
1269
|
+
if (instance.status === "provisioning" || instance.status === "pending") {
|
|
1270
|
+
const remainingMs = Math.max(0, deadline - Date.now());
|
|
1271
|
+
await instance.waitFor("running", {
|
|
1272
|
+
timeoutMs: remainingMs,
|
|
1273
|
+
signal: requestOptions?.signal
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
return instance;
|
|
1277
|
+
}
|
|
1278
|
+
/**
|
|
1279
|
+
* Poll a sandbox to `running` by id. Surfaces a real provision failure
|
|
1280
|
+
* as a {@link StateError} (carrying the sandbox's error message) rather
|
|
1281
|
+
* than an opaque timeout, and throws {@link NotFoundError} if the id is
|
|
1282
|
+
* unknown. Use after a {@link create} that timed out client-side but may
|
|
1283
|
+
* have continued provisioning server-side under its idempotency key.
|
|
1284
|
+
*/
|
|
1285
|
+
async waitForRunning(id, options) {
|
|
1286
|
+
const instance = await this.get(id);
|
|
1287
|
+
if (!instance) throw new NotFoundError("Sandbox", id, {
|
|
1288
|
+
endpoint: `/v1/sandboxes/${id}`,
|
|
1289
|
+
origin: "sandbox-api"
|
|
1290
|
+
});
|
|
1291
|
+
await instance.waitFor("running", {
|
|
1292
|
+
timeoutMs: options?.timeoutMs ?? DEFAULT_CREATE_TIMEOUT_MS,
|
|
1293
|
+
signal: options?.signal
|
|
1294
|
+
});
|
|
1295
|
+
return instance;
|
|
1296
|
+
}
|
|
1297
|
+
/**
|
|
1298
|
+
* List all sandboxes.
|
|
1299
|
+
*
|
|
1300
|
+
* @param options - Filtering and pagination options
|
|
1301
|
+
* @returns Array of SandboxInstance objects
|
|
1302
|
+
*
|
|
1303
|
+
* @example
|
|
1304
|
+
* ```typescript
|
|
1305
|
+
* // List all running sandboxes
|
|
1306
|
+
* const running = await client.list({ status: "running" });
|
|
1307
|
+
*
|
|
1308
|
+
* // List with pagination
|
|
1309
|
+
* const page = await client.list({ limit: 10, offset: 0 });
|
|
1310
|
+
* ```
|
|
1311
|
+
*/
|
|
1312
|
+
async list(options) {
|
|
1313
|
+
const params = new URLSearchParams();
|
|
1314
|
+
if (options?.status) {
|
|
1315
|
+
const statuses = Array.isArray(options.status) ? options.status : [options.status];
|
|
1316
|
+
for (const s of statuses) params.append("status", s);
|
|
1317
|
+
}
|
|
1318
|
+
if (options?.limit !== void 0) params.set("limit", String(options.limit));
|
|
1319
|
+
if (options?.offset !== void 0) params.set("offset", String(options.offset));
|
|
1320
|
+
if (options?.scope !== void 0) params.set("scope", options.scope);
|
|
1321
|
+
const query = params.toString();
|
|
1322
|
+
const path = query ? `/v1/sandboxes?${query}` : "/v1/sandboxes";
|
|
1323
|
+
const response = await this.fetch(path);
|
|
1324
|
+
if (!response.ok) {
|
|
1325
|
+
const body = await response.text();
|
|
1326
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1327
|
+
}
|
|
1328
|
+
const data = await response.json();
|
|
1329
|
+
return (Array.isArray(data) ? data : data.sandboxes ?? []).map((item) => new SandboxInstance(this, this.parseInfo(item)));
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Get a sandbox by ID.
|
|
1333
|
+
*
|
|
1334
|
+
* @param id - The sandbox ID
|
|
1335
|
+
* @returns A SandboxInstance or null if not found
|
|
1336
|
+
*
|
|
1337
|
+
* @example
|
|
1338
|
+
* ```typescript
|
|
1339
|
+
* const box = await client.get("sandbox_abc123");
|
|
1340
|
+
* if (box) {
|
|
1341
|
+
* console.log(box.status);
|
|
1342
|
+
* }
|
|
1343
|
+
* ```
|
|
1344
|
+
*/
|
|
1345
|
+
async get(id) {
|
|
1346
|
+
const response = await this.fetch(`/v1/sandboxes/${encodeURIComponent(id)}`);
|
|
1347
|
+
if (response.status === 404) return null;
|
|
1348
|
+
if (!response.ok) {
|
|
1349
|
+
const body = await response.text();
|
|
1350
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1351
|
+
}
|
|
1352
|
+
const data = await response.json();
|
|
1353
|
+
return new SandboxInstance(this, this.parseInfo(data));
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Get usage information for the account.
|
|
1357
|
+
*
|
|
1358
|
+
* @returns Usage statistics for the current billing period
|
|
1359
|
+
*
|
|
1360
|
+
* @example
|
|
1361
|
+
* ```typescript
|
|
1362
|
+
* const usage = await client.usage();
|
|
1363
|
+
* console.log(`Active sandboxes: ${usage.activeSandboxes}`);
|
|
1364
|
+
* console.log(`Compute minutes: ${usage.computeMinutes}`);
|
|
1365
|
+
* ```
|
|
1366
|
+
*/
|
|
1367
|
+
async usage() {
|
|
1368
|
+
const response = await this.fetch("/usage");
|
|
1369
|
+
if (!response.ok) {
|
|
1370
|
+
const body = await response.text();
|
|
1371
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1372
|
+
}
|
|
1373
|
+
const data = await response.json();
|
|
1374
|
+
return {
|
|
1375
|
+
computeMinutes: data.computeMinutes ?? 0,
|
|
1376
|
+
activeSandboxes: data.activeSandboxes ?? 0,
|
|
1377
|
+
totalSandboxes: data.totalSandboxes ?? 0,
|
|
1378
|
+
periodStart: new Date(data.periodStart),
|
|
1379
|
+
periodEnd: new Date(data.periodEnd)
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Get subscription and billing information for the account.
|
|
1384
|
+
*
|
|
1385
|
+
* @returns Subscription details including plan, credits, and limits
|
|
1386
|
+
*
|
|
1387
|
+
* @example
|
|
1388
|
+
* ```typescript
|
|
1389
|
+
* const sub = await client.subscription();
|
|
1390
|
+
* console.log(`Plan: ${sub.plan}`);
|
|
1391
|
+
* console.log(`Credits: $${sub.creditsAvailableUsd.toFixed(2)}`);
|
|
1392
|
+
* ```
|
|
1393
|
+
*/
|
|
1394
|
+
async subscription() {
|
|
1395
|
+
const response = await this.fetch("/subscription");
|
|
1396
|
+
if (!response.ok) {
|
|
1397
|
+
const body = await response.text();
|
|
1398
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1399
|
+
}
|
|
1400
|
+
const data = await response.json();
|
|
1401
|
+
return {
|
|
1402
|
+
plan: data.plan ?? "free",
|
|
1403
|
+
status: data.status ?? "active",
|
|
1404
|
+
creditsAvailableUsd: data.creditsAvailableUsd ?? 0,
|
|
1405
|
+
creditsUsedUsd: data.creditsUsedUsd ?? 0,
|
|
1406
|
+
monthlyBalanceUsd: data.monthlyBalanceUsd ?? 0,
|
|
1407
|
+
maxConcurrentSandboxes: data.maxConcurrentSandboxes ?? 0,
|
|
1408
|
+
overageAllowed: data.overageAllowed ?? false,
|
|
1409
|
+
limits: data.limits ?? {
|
|
1410
|
+
maxCpuCores: 1,
|
|
1411
|
+
maxRamGB: 2,
|
|
1412
|
+
maxStorageGB: 50
|
|
1413
|
+
},
|
|
1414
|
+
currentPeriodEnd: data.currentPeriodEnd ?? 0
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Check if the Sandbox API is available.
|
|
1419
|
+
*
|
|
1420
|
+
* @returns true if the API is healthy, false otherwise
|
|
1421
|
+
*/
|
|
1422
|
+
async health() {
|
|
1423
|
+
try {
|
|
1424
|
+
return (await this.fetch("/health")).ok;
|
|
1425
|
+
} catch {
|
|
1426
|
+
return false;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Check if CRIU checkpointing is available on the platform.
|
|
1431
|
+
*
|
|
1432
|
+
* CRIU enables memory preservation for true pause/resume and fork operations.
|
|
1433
|
+
* It requires specific host configuration.
|
|
1434
|
+
*
|
|
1435
|
+
* @returns CRIU availability status
|
|
1436
|
+
*
|
|
1437
|
+
* @example
|
|
1438
|
+
* ```typescript
|
|
1439
|
+
* const status = await client.criuStatus();
|
|
1440
|
+
* if (status.available) {
|
|
1441
|
+
* console.log(`CRIU ${status.criuVersion} available`);
|
|
1442
|
+
* } else {
|
|
1443
|
+
* console.log(`CRIU not available: ${status.reason}`);
|
|
1444
|
+
* }
|
|
1445
|
+
* ```
|
|
1446
|
+
*/
|
|
1447
|
+
async criuStatus() {
|
|
1448
|
+
const response = await this.fetch("/v1/system/criu-status");
|
|
1449
|
+
if (!response.ok) {
|
|
1450
|
+
const body = await response.text();
|
|
1451
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1452
|
+
}
|
|
1453
|
+
return await response.json();
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Run multiple tasks in parallel across sandboxes.
|
|
1457
|
+
* Returns the aggregated results after all tasks complete.
|
|
1458
|
+
*
|
|
1459
|
+
* @param tasks - Array of tasks to execute
|
|
1460
|
+
* @param options - Batch execution options
|
|
1461
|
+
* @returns Aggregated batch results
|
|
1462
|
+
*
|
|
1463
|
+
* @throws {@link TimeoutError} if the server hasn't begun responding
|
|
1464
|
+
* before the deadline (pre-stream timeout).
|
|
1465
|
+
* @throws {@link ValidationError} / {@link QuotaError} / other typed
|
|
1466
|
+
* SDK errors if the server rejects the request before streaming.
|
|
1467
|
+
* @throws `DOMException` with `name === "AbortError"` if
|
|
1468
|
+
* `options.signal` fires OR the safety-valve deadline fires
|
|
1469
|
+
* AFTER streaming has begun — parseSSEStream can't distinguish
|
|
1470
|
+
* the source mid-stream. Callers that need to tell cancel from
|
|
1471
|
+
* timeout should check `options.signal?.aborted` in their catch.
|
|
1472
|
+
* @throws `Error` with the server message if the stream emits a
|
|
1473
|
+
* `batch.failed` event.
|
|
1474
|
+
*
|
|
1475
|
+
* @example
|
|
1476
|
+
* ```typescript
|
|
1477
|
+
* const result = await client.runBatch([
|
|
1478
|
+
* { id: "task-1", message: "Analyze this file" },
|
|
1479
|
+
* { id: "task-2", message: "Generate a summary" },
|
|
1480
|
+
* ]);
|
|
1481
|
+
* console.log(`Success rate: ${result.successRate}%`);
|
|
1482
|
+
* ```
|
|
1483
|
+
*/
|
|
1484
|
+
async runBatch(tasks, options) {
|
|
1485
|
+
const results = [];
|
|
1486
|
+
let totalRetries = 0;
|
|
1487
|
+
for await (const event of this.streamBatch(tasks, options)) {
|
|
1488
|
+
if (event.type === "task.completed") {
|
|
1489
|
+
const data = event.data;
|
|
1490
|
+
const usageTotal = (data.usage?.inputTokens ?? 0) + (data.usage?.outputTokens ?? 0);
|
|
1491
|
+
results.push({
|
|
1492
|
+
taskId: data.taskId,
|
|
1493
|
+
success: true,
|
|
1494
|
+
response: data.resultSummary ?? data.response,
|
|
1495
|
+
durationMs: data.durationMs ?? 0,
|
|
1496
|
+
retries: data.retries ?? 0,
|
|
1497
|
+
tokensUsed: data.tokensUsed ?? (usageTotal > 0 ? usageTotal : void 0)
|
|
1498
|
+
});
|
|
1499
|
+
totalRetries += data.retries ?? 0;
|
|
1500
|
+
}
|
|
1501
|
+
if (event.type === "task.failed") {
|
|
1502
|
+
const data = event.data;
|
|
1503
|
+
results.push({
|
|
1504
|
+
taskId: data.taskId,
|
|
1505
|
+
success: false,
|
|
1506
|
+
error: data.error,
|
|
1507
|
+
durationMs: data.durationMs ?? 0,
|
|
1508
|
+
retries: data.retries ?? 0
|
|
1509
|
+
});
|
|
1510
|
+
totalRetries += data.retries ?? 0;
|
|
1511
|
+
}
|
|
1512
|
+
if (event.type === "batch.failed") {
|
|
1513
|
+
const data = event.data;
|
|
1514
|
+
throw new Error(data.error ?? "Batch failed");
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
const succeeded = results.filter((r) => r.success).length;
|
|
1518
|
+
const failed = results.filter((r) => !r.success).length;
|
|
1519
|
+
return {
|
|
1520
|
+
totalTasks: tasks.length,
|
|
1521
|
+
succeeded,
|
|
1522
|
+
failed,
|
|
1523
|
+
totalRetries,
|
|
1524
|
+
successRate: tasks.length > 0 ? succeeded / tasks.length * 100 : 0,
|
|
1525
|
+
results
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
/**
|
|
1529
|
+
* Stream events from a batch execution.
|
|
1530
|
+
* Use this for real-time progress updates during batch processing.
|
|
1531
|
+
*
|
|
1532
|
+
* @param tasks - Array of tasks to execute
|
|
1533
|
+
* @param options - Batch execution options
|
|
1534
|
+
*
|
|
1535
|
+
* @throws {@link TimeoutError} if the server hasn't begun responding
|
|
1536
|
+
* before the deadline (pre-stream timeout).
|
|
1537
|
+
* @throws {@link ValidationError} / {@link QuotaError} / other typed
|
|
1538
|
+
* SDK errors if the server rejects the request before streaming.
|
|
1539
|
+
* @throws `DOMException` with `name === "AbortError"` if
|
|
1540
|
+
* `options.signal` fires OR the safety-valve deadline fires
|
|
1541
|
+
* AFTER streaming has begun. Distinguish via
|
|
1542
|
+
* `options.signal?.aborted` in the consumer's catch.
|
|
1543
|
+
*
|
|
1544
|
+
* @example
|
|
1545
|
+
* ```typescript
|
|
1546
|
+
* for await (const event of client.streamBatch(tasks)) {
|
|
1547
|
+
* if (event.type === "task.completed") {
|
|
1548
|
+
* console.log(`Task ${event.data.taskId} completed`);
|
|
1549
|
+
* }
|
|
1550
|
+
* }
|
|
1551
|
+
* ```
|
|
1552
|
+
*/
|
|
1553
|
+
async *streamBatch(tasks, options) {
|
|
1554
|
+
const url = `${this.baseUrl}/batch/run`;
|
|
1555
|
+
const resolvedTimeoutMs = options?.timeoutMs ?? 3e5;
|
|
1556
|
+
const requestBody = JSON.stringify({
|
|
1557
|
+
tasks,
|
|
1558
|
+
backend: options?.backend ? {
|
|
1559
|
+
...options.backend,
|
|
1560
|
+
type: options.backend.type ?? "opencode"
|
|
1561
|
+
} : { type: "opencode" },
|
|
1562
|
+
timeoutMs: resolvedTimeoutMs,
|
|
1563
|
+
scalingMode: options?.scalingMode ?? "balanced",
|
|
1564
|
+
persistent: options?.persistent ?? false,
|
|
1565
|
+
graceMs: options?.graceMs ?? 0
|
|
1566
|
+
});
|
|
1567
|
+
const deadline = AbortSignal.timeout(resolvedTimeoutMs + CLIENT_DEADLINE_GRACE_MS);
|
|
1568
|
+
const combinedSignal = options?.signal ? AbortSignal.any([options.signal, deadline]) : deadline;
|
|
1569
|
+
let response;
|
|
1570
|
+
try {
|
|
1571
|
+
response = await globalThis.fetch(url, {
|
|
1572
|
+
method: "POST",
|
|
1573
|
+
headers: {
|
|
1574
|
+
Authorization: `Bearer ${this.apiKey}`,
|
|
1575
|
+
"Content-Type": "application/json",
|
|
1576
|
+
Accept: "text/event-stream"
|
|
1577
|
+
},
|
|
1578
|
+
body: requestBody,
|
|
1579
|
+
signal: combinedSignal
|
|
1580
|
+
});
|
|
1581
|
+
} catch (err) {
|
|
1582
|
+
if (options?.signal?.aborted) throw err instanceof Error && err.name === "AbortError" ? err : new DOMException("Batch aborted", "AbortError");
|
|
1583
|
+
if (err instanceof Error && (err.name === "AbortError" || err.name === "TimeoutError")) throw new TimeoutError(resolvedTimeoutMs, "Batch request timed out before the first SSE event");
|
|
1584
|
+
throw new NetworkError(`Failed to connect to Sandbox API: ${err instanceof Error ? err.message : String(err)}`, err instanceof Error ? err : void 0, {
|
|
1585
|
+
endpoint: "/batch/run",
|
|
1586
|
+
origin: "sandbox-api"
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
if (!response.ok) {
|
|
1590
|
+
const errBody = await response.text();
|
|
1591
|
+
throw parseErrorResponse(response.status, errBody, void 0, response.headers);
|
|
1592
|
+
}
|
|
1593
|
+
yield* parseSSEStream(response.body, { signal: combinedSignal });
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Make an authenticated HTTP request to the API.
|
|
1597
|
+
* This is exposed for use by SandboxInstance.
|
|
1598
|
+
*
|
|
1599
|
+
* `fetchOptions.timeoutMs` overrides the client-wide `this.timeoutMs`
|
|
1600
|
+
* for a single request. Slow data-plane operations (snapshot create
|
|
1601
|
+
* blocks the server up to 600s while the host-agent compresses and
|
|
1602
|
+
* uploads the rootfs) must pass a higher ceiling, otherwise the
|
|
1603
|
+
* default client timeout aborts mid-operation with a `TimeoutError`
|
|
1604
|
+
* even though the server is still working.
|
|
1605
|
+
*/
|
|
1606
|
+
async fetch(path, options, fetchOptions) {
|
|
1607
|
+
const url = `${this.baseUrl}${path}`;
|
|
1608
|
+
const requestTimeoutMs = typeof fetchOptions?.timeoutMs === "number" && fetchOptions.timeoutMs > 0 ? fetchOptions.timeoutMs : this.timeoutMs;
|
|
1609
|
+
const controller = new AbortController();
|
|
1610
|
+
const timeoutId = setTimeout(() => controller.abort(), requestTimeoutMs);
|
|
1611
|
+
try {
|
|
1612
|
+
const headers = new Headers(options?.headers);
|
|
1613
|
+
headers.set("Authorization", `Bearer ${this.apiKey}`);
|
|
1614
|
+
const isFormDataBody = typeof FormData !== "undefined" && options?.body instanceof FormData;
|
|
1615
|
+
if (!headers.has("Content-Type") && !isFormDataBody) headers.set("Content-Type", "application/json");
|
|
1616
|
+
return withRequestContextHeaders(await globalThis.fetch(url, {
|
|
1617
|
+
...options,
|
|
1618
|
+
headers,
|
|
1619
|
+
signal: options?.signal ?? controller.signal
|
|
1620
|
+
}), path, options?.method);
|
|
1621
|
+
} catch (err) {
|
|
1622
|
+
if (err instanceof Error && err.name === "AbortError") throw new TimeoutError(requestTimeoutMs);
|
|
1623
|
+
throw new NetworkError(`Failed to connect to Sandbox API: ${err instanceof Error ? err.message : String(err)}`, err instanceof Error ? err : void 0, {
|
|
1624
|
+
endpoint: path,
|
|
1625
|
+
origin: "sandbox-api"
|
|
1626
|
+
});
|
|
1627
|
+
} finally {
|
|
1628
|
+
clearTimeout(timeoutId);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
parseInfo(data) {
|
|
1632
|
+
return {
|
|
1633
|
+
id: data.id ?? "",
|
|
1634
|
+
name: data.name,
|
|
1635
|
+
status: data.status ?? "pending",
|
|
1636
|
+
connection: normalizeConnection(data.connection),
|
|
1637
|
+
metadata: data.metadata,
|
|
1638
|
+
createdAt: data.createdAt ? new Date(data.createdAt) : /* @__PURE__ */ new Date(),
|
|
1639
|
+
startedAt: data.startedAt ? new Date(data.startedAt) : void 0,
|
|
1640
|
+
lastActivityAt: data.lastActivityAt ? new Date(data.lastActivityAt) : void 0,
|
|
1641
|
+
expiresAt: data.expiresAt ? new Date(data.expiresAt) : void 0,
|
|
1642
|
+
error: data.error
|
|
1643
|
+
};
|
|
1644
|
+
}
|
|
1645
|
+
_tokenRefreshHandlers = /* @__PURE__ */ new Set();
|
|
1646
|
+
/**
|
|
1647
|
+
* Register a handler invoked when the SDK transparently refreshes a
|
|
1648
|
+
* sandbox bearer after a 401 retry. Returns a function that
|
|
1649
|
+
* unregisters the handler when called.
|
|
1650
|
+
*/
|
|
1651
|
+
onTokenRefresh(handler) {
|
|
1652
|
+
this._tokenRefreshHandlers.add(handler);
|
|
1653
|
+
return () => {
|
|
1654
|
+
this._tokenRefreshHandlers.delete(handler);
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1657
|
+
/** @internal — fired by the runtime-fetch retry path after a successful
|
|
1658
|
+
* refresh. Errors thrown by handlers are caught and surfaced as
|
|
1659
|
+
* console warnings so one bad subscriber does not poison the rest. */
|
|
1660
|
+
_emitTokenRefresh(sandboxId, newToken) {
|
|
1661
|
+
for (const h of this._tokenRefreshHandlers) try {
|
|
1662
|
+
h(sandboxId, newToken);
|
|
1663
|
+
} catch (err) {
|
|
1664
|
+
console.warn(`[sandbox-sdk] tokenRefresh handler threw: ${err instanceof Error ? err.message : String(err)}`);
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
};
|
|
1668
|
+
var SecretsManagerImpl = class {
|
|
1669
|
+
constructor(client) {
|
|
1670
|
+
this.client = client;
|
|
1671
|
+
}
|
|
1672
|
+
async create(name, value) {
|
|
1673
|
+
const response = await this.client.fetch("/v1/secrets", {
|
|
1674
|
+
method: "POST",
|
|
1675
|
+
body: JSON.stringify({
|
|
1676
|
+
name,
|
|
1677
|
+
value
|
|
1678
|
+
})
|
|
1679
|
+
});
|
|
1680
|
+
if (response.status === 409) {
|
|
1681
|
+
const body = await response.text();
|
|
1682
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1683
|
+
}
|
|
1684
|
+
if (response.status === 400) {
|
|
1685
|
+
const body = await response.text();
|
|
1686
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1687
|
+
}
|
|
1688
|
+
if (!response.ok) {
|
|
1689
|
+
const body = await response.text();
|
|
1690
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1691
|
+
}
|
|
1692
|
+
const data = await response.json();
|
|
1693
|
+
return {
|
|
1694
|
+
name: data.name,
|
|
1695
|
+
createdAt: new Date(data.createdAt),
|
|
1696
|
+
updatedAt: new Date(data.updatedAt)
|
|
1697
|
+
};
|
|
1698
|
+
}
|
|
1699
|
+
async list() {
|
|
1700
|
+
const response = await this.client.fetch("/v1/secrets");
|
|
1701
|
+
if (!response.ok) {
|
|
1702
|
+
const body = await response.text();
|
|
1703
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1704
|
+
}
|
|
1705
|
+
return ((await response.json()).secrets ?? []).map((s) => ({
|
|
1706
|
+
name: s.name,
|
|
1707
|
+
createdAt: new Date(s.createdAt),
|
|
1708
|
+
updatedAt: new Date(s.updatedAt)
|
|
1709
|
+
}));
|
|
1710
|
+
}
|
|
1711
|
+
async get(name) {
|
|
1712
|
+
const response = await this.client.fetch(`/v1/secrets/${encodeURIComponent(name)}`);
|
|
1713
|
+
if (response.status === 404) throw new NotFoundError("Secret", name);
|
|
1714
|
+
if (!response.ok) {
|
|
1715
|
+
const body = await response.text();
|
|
1716
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1717
|
+
}
|
|
1718
|
+
return (await response.json()).value;
|
|
1719
|
+
}
|
|
1720
|
+
async update(name, value) {
|
|
1721
|
+
const response = await this.client.fetch(`/v1/secrets/${encodeURIComponent(name)}`, {
|
|
1722
|
+
method: "PATCH",
|
|
1723
|
+
body: JSON.stringify({ value })
|
|
1724
|
+
});
|
|
1725
|
+
if (response.status === 404) throw new NotFoundError("Secret", name);
|
|
1726
|
+
if (response.status === 400) {
|
|
1727
|
+
const body = await response.text();
|
|
1728
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1729
|
+
}
|
|
1730
|
+
if (!response.ok) {
|
|
1731
|
+
const body = await response.text();
|
|
1732
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1733
|
+
}
|
|
1734
|
+
const data = await response.json();
|
|
1735
|
+
return {
|
|
1736
|
+
name: data.name,
|
|
1737
|
+
createdAt: new Date(data.createdAt),
|
|
1738
|
+
updatedAt: new Date(data.updatedAt)
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
async delete(name) {
|
|
1742
|
+
const response = await this.client.fetch(`/v1/secrets/${encodeURIComponent(name)}`, { method: "DELETE" });
|
|
1743
|
+
if (response.status === 404) throw new NotFoundError("Secret", name);
|
|
1744
|
+
if (!response.ok) {
|
|
1745
|
+
const body = await response.text();
|
|
1746
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
};
|
|
1750
|
+
var SshKeysManagerImpl = class {
|
|
1751
|
+
constructor(client) {
|
|
1752
|
+
this.client = client;
|
|
1753
|
+
}
|
|
1754
|
+
async create(name, publicKey) {
|
|
1755
|
+
const response = await this.client.fetch("/v1/ssh-keys", {
|
|
1756
|
+
method: "POST",
|
|
1757
|
+
body: JSON.stringify({
|
|
1758
|
+
name,
|
|
1759
|
+
publicKey
|
|
1760
|
+
})
|
|
1761
|
+
});
|
|
1762
|
+
if (!response.ok) {
|
|
1763
|
+
const body = await response.text();
|
|
1764
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1765
|
+
}
|
|
1766
|
+
return toSshKeyInfo((await response.json()).sshKey);
|
|
1767
|
+
}
|
|
1768
|
+
async list() {
|
|
1769
|
+
const response = await this.client.fetch("/v1/ssh-keys");
|
|
1770
|
+
if (!response.ok) {
|
|
1771
|
+
const body = await response.text();
|
|
1772
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1773
|
+
}
|
|
1774
|
+
return ((await response.json()).sshKeys ?? []).map(toSshKeyInfo);
|
|
1775
|
+
}
|
|
1776
|
+
async delete(id) {
|
|
1777
|
+
const response = await this.client.fetch(`/v1/ssh-keys/${encodeURIComponent(id)}`, { method: "DELETE" });
|
|
1778
|
+
if (response.status === 404) throw new NotFoundError("SSH key", id);
|
|
1779
|
+
if (!response.ok) {
|
|
1780
|
+
const body = await response.text();
|
|
1781
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
function toSshKeyInfo(key) {
|
|
1786
|
+
return {
|
|
1787
|
+
...key,
|
|
1788
|
+
createdAt: new Date(key.createdAt),
|
|
1789
|
+
updatedAt: new Date(key.updatedAt)
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Client for the Intelligence Reports API.
|
|
1794
|
+
*
|
|
1795
|
+
* Two analysis modes:
|
|
1796
|
+
*
|
|
1797
|
+
* - `deterministic` (default): free, rule-based platform analysis over
|
|
1798
|
+
* the subject's trace evidence. Returns immediately.
|
|
1799
|
+
* - `agentic`: routes to the **Tangle Trace Analyst**, an LLM-driven
|
|
1800
|
+
* reasoning loop that reads OTLP-shaped trace evidence and emits
|
|
1801
|
+
* findings, evidence references, recommended actions, and a
|
|
1802
|
+
* validation plan. Billed against `budget.maxUsd`; the platform
|
|
1803
|
+
* never spends past the budget the caller sets.
|
|
1804
|
+
*
|
|
1805
|
+
* Subjects: `sandbox` or `fleet`. A fleet subject can be narrowed to
|
|
1806
|
+
* a single coordinated command via `subject.dispatchId`.
|
|
1807
|
+
*/
|
|
1808
|
+
var IntelligenceClient = class {
|
|
1809
|
+
constructor(client) {
|
|
1810
|
+
this.client = client;
|
|
1811
|
+
}
|
|
1812
|
+
/**
|
|
1813
|
+
* Create an intelligence report over the given subject.
|
|
1814
|
+
*
|
|
1815
|
+
* Use `mode: "agentic"` to engage the **Tangle Trace Analyst** with a
|
|
1816
|
+
* spending budget. The budget is enforced server-side before billing
|
|
1817
|
+
* fires — a request whose computed cost exceeds `budget.maxUsd`
|
|
1818
|
+
* returns 402 without charging the customer.
|
|
1819
|
+
*/
|
|
1820
|
+
async createReport(options) {
|
|
1821
|
+
const response = await this.client.fetch("/v1/intelligence/reports", {
|
|
1822
|
+
method: "POST",
|
|
1823
|
+
body: JSON.stringify(options)
|
|
1824
|
+
});
|
|
1825
|
+
const body = await response.text();
|
|
1826
|
+
if (!response.ok) throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1827
|
+
return JSON.parse(body).report;
|
|
1828
|
+
}
|
|
1829
|
+
async createAgenticReport(options) {
|
|
1830
|
+
return this.createReport({
|
|
1831
|
+
subject: options.subject,
|
|
1832
|
+
mode: "agentic",
|
|
1833
|
+
budget: {
|
|
1834
|
+
billTo: "customer",
|
|
1835
|
+
maxUsd: options.maxUsd
|
|
1836
|
+
},
|
|
1837
|
+
metadata: options.metadata
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Estimate the cost of a prospective report without creating one.
|
|
1842
|
+
* Verifies subject ownership the same way `createReport` does, so it
|
|
1843
|
+
* never becomes an existence oracle for foreign subjects.
|
|
1844
|
+
*/
|
|
1845
|
+
async estimateReport(options) {
|
|
1846
|
+
const response = await this.client.fetch("/v1/intelligence/reports/estimate", {
|
|
1847
|
+
method: "POST",
|
|
1848
|
+
body: JSON.stringify(options)
|
|
1849
|
+
});
|
|
1850
|
+
const body = await response.text();
|
|
1851
|
+
if (!response.ok) throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1852
|
+
return JSON.parse(body).estimate;
|
|
1853
|
+
}
|
|
1854
|
+
async getReport(jobId) {
|
|
1855
|
+
const response = await this.client.fetch(`/v1/intelligence/reports/${encodeURIComponent(jobId)}`);
|
|
1856
|
+
const body = await response.text();
|
|
1857
|
+
if (!response.ok) throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1858
|
+
return JSON.parse(body).report;
|
|
1859
|
+
}
|
|
1860
|
+
async listReports(options = {}) {
|
|
1861
|
+
const query = new URLSearchParams();
|
|
1862
|
+
if (options.subjectType) query.set("subjectType", options.subjectType);
|
|
1863
|
+
if (options.subjectId) query.set("subjectId", options.subjectId);
|
|
1864
|
+
if (options.limit !== void 0) query.set("limit", String(options.limit));
|
|
1865
|
+
const suffix = query.size > 0 ? `?${query}` : "";
|
|
1866
|
+
const response = await this.client.fetch(`/v1/intelligence/reports${suffix}`);
|
|
1867
|
+
const body = await response.text();
|
|
1868
|
+
if (!response.ok) throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1869
|
+
return JSON.parse(body).reports;
|
|
1870
|
+
}
|
|
1871
|
+
async waitForReport(jobId, options = {}) {
|
|
1872
|
+
const deadline = Date.now() + (options.timeoutMs ?? 6e4);
|
|
1873
|
+
const pollMs = options.pollMs ?? 1e3;
|
|
1874
|
+
while (true) {
|
|
1875
|
+
const report = await this.getReport(jobId);
|
|
1876
|
+
if (report.status === "completed" || report.status === "failed") return report;
|
|
1877
|
+
if (Date.now() >= deadline) throw new TimeoutError(options.timeoutMs ?? 6e4);
|
|
1878
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(pollMs, Math.max(0, deadline - Date.now()))));
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
};
|
|
1882
|
+
/**
|
|
1883
|
+
* Client for browsing available development environments.
|
|
1884
|
+
*/
|
|
1885
|
+
var EnvironmentsClient = class {
|
|
1886
|
+
constructor(client) {
|
|
1887
|
+
this.client = client;
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* List available development environments.
|
|
1891
|
+
*
|
|
1892
|
+
* @returns Array of available environments with metadata
|
|
1893
|
+
*
|
|
1894
|
+
* @example
|
|
1895
|
+
* ```typescript
|
|
1896
|
+
* const envs = await client.environments.list();
|
|
1897
|
+
* for (const env of envs) {
|
|
1898
|
+
* console.log(`${env.id}: ${env.description}`);
|
|
1899
|
+
* }
|
|
1900
|
+
* ```
|
|
1901
|
+
*/
|
|
1902
|
+
async list() {
|
|
1903
|
+
const response = await this.client.fetch("/v1/environments");
|
|
1904
|
+
if (!response.ok) {
|
|
1905
|
+
const body = await response.text();
|
|
1906
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1907
|
+
}
|
|
1908
|
+
return (await response.json()).environments ?? [];
|
|
1909
|
+
}
|
|
1910
|
+
/**
|
|
1911
|
+
* Get details for a specific environment.
|
|
1912
|
+
*
|
|
1913
|
+
* @param id - Environment identifier (e.g., "universal")
|
|
1914
|
+
*/
|
|
1915
|
+
async get(id) {
|
|
1916
|
+
return (await this.list()).find((e) => e.id === id) ?? null;
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1919
|
+
var PublicTemplatesClient = class {
|
|
1920
|
+
constructor(client) {
|
|
1921
|
+
this.client = client;
|
|
1922
|
+
}
|
|
1923
|
+
async list(options) {
|
|
1924
|
+
const params = new URLSearchParams();
|
|
1925
|
+
if (options?.query) params.set("q", options.query);
|
|
1926
|
+
if (options?.tag) params.set("tag", options.tag);
|
|
1927
|
+
if (options?.featuredOnly) params.set("featured", "true");
|
|
1928
|
+
if (options?.limit !== void 0) params.set("limit", String(options.limit));
|
|
1929
|
+
if (options?.offset !== void 0) params.set("offset", String(options.offset));
|
|
1930
|
+
const suffix = params.toString();
|
|
1931
|
+
const response = await this.client.fetch(`/v1/public-templates${suffix ? `?${suffix}` : ""}`);
|
|
1932
|
+
if (!response.ok) {
|
|
1933
|
+
const body = await response.text();
|
|
1934
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1935
|
+
}
|
|
1936
|
+
return (await response.json()).templates ?? [];
|
|
1937
|
+
}
|
|
1938
|
+
async featured() {
|
|
1939
|
+
const response = await this.client.fetch("/v1/public-templates/featured");
|
|
1940
|
+
if (!response.ok) {
|
|
1941
|
+
const body = await response.text();
|
|
1942
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1943
|
+
}
|
|
1944
|
+
return (await response.json()).templates ?? [];
|
|
1945
|
+
}
|
|
1946
|
+
async get(idOrSlug) {
|
|
1947
|
+
const response = await this.client.fetch(`/v1/public-templates/${encodeURIComponent(idOrSlug)}`);
|
|
1948
|
+
if (!response.ok) {
|
|
1949
|
+
const body = await response.text();
|
|
1950
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1951
|
+
}
|
|
1952
|
+
return (await response.json()).template;
|
|
1953
|
+
}
|
|
1954
|
+
async versions(idOrSlug) {
|
|
1955
|
+
const response = await this.client.fetch(`/v1/public-templates/${encodeURIComponent(idOrSlug)}/versions`);
|
|
1956
|
+
if (!response.ok) {
|
|
1957
|
+
const body = await response.text();
|
|
1958
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1959
|
+
}
|
|
1960
|
+
return (await response.json()).versions ?? [];
|
|
1961
|
+
}
|
|
1962
|
+
async publish(options) {
|
|
1963
|
+
const response = await this.client.fetch("/v1/public-templates", {
|
|
1964
|
+
method: "POST",
|
|
1965
|
+
body: JSON.stringify(options)
|
|
1966
|
+
});
|
|
1967
|
+
if (!response.ok) {
|
|
1968
|
+
const body = await response.text();
|
|
1969
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1970
|
+
}
|
|
1971
|
+
return (await response.json()).template;
|
|
1972
|
+
}
|
|
1973
|
+
async publishVersion(idOrSlug, options) {
|
|
1974
|
+
const response = await this.client.fetch(`/v1/public-templates/${encodeURIComponent(idOrSlug)}/versions`, {
|
|
1975
|
+
method: "POST",
|
|
1976
|
+
body: JSON.stringify(options)
|
|
1977
|
+
});
|
|
1978
|
+
if (!response.ok) {
|
|
1979
|
+
const body = await response.text();
|
|
1980
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
1981
|
+
}
|
|
1982
|
+
return (await response.json()).version;
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
/**
|
|
1986
|
+
* Client for managing teams and team-scoped sharing.
|
|
1987
|
+
*
|
|
1988
|
+
* Team resources are scoped to the authenticated user's membership —
|
|
1989
|
+
* the client never needs to pass an org id explicitly.
|
|
1990
|
+
*/
|
|
1991
|
+
var TeamsClient = class {
|
|
1992
|
+
constructor(client) {
|
|
1993
|
+
this.client = client;
|
|
1994
|
+
}
|
|
1995
|
+
async list() {
|
|
1996
|
+
const response = await this.client.fetch("/v1/teams");
|
|
1997
|
+
if (!response.ok) {
|
|
1998
|
+
const body = await response.text();
|
|
1999
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2000
|
+
}
|
|
2001
|
+
return (await response.json()).teams ?? [];
|
|
2002
|
+
}
|
|
2003
|
+
async create(options) {
|
|
2004
|
+
const response = await this.client.fetch("/v1/teams", {
|
|
2005
|
+
method: "POST",
|
|
2006
|
+
body: JSON.stringify(options)
|
|
2007
|
+
});
|
|
2008
|
+
if (!response.ok) {
|
|
2009
|
+
const body = await response.text();
|
|
2010
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2011
|
+
}
|
|
2012
|
+
return (await response.json()).team;
|
|
2013
|
+
}
|
|
2014
|
+
async get(teamId) {
|
|
2015
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}`);
|
|
2016
|
+
if (!response.ok) {
|
|
2017
|
+
const body = await response.text();
|
|
2018
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2019
|
+
}
|
|
2020
|
+
return (await response.json()).team;
|
|
2021
|
+
}
|
|
2022
|
+
async update(teamId, updates) {
|
|
2023
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}`, {
|
|
2024
|
+
method: "PATCH",
|
|
2025
|
+
body: JSON.stringify(updates)
|
|
2026
|
+
});
|
|
2027
|
+
if (!response.ok) {
|
|
2028
|
+
const body = await response.text();
|
|
2029
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2030
|
+
}
|
|
2031
|
+
return (await response.json()).team;
|
|
2032
|
+
}
|
|
2033
|
+
async delete(teamId) {
|
|
2034
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}`, { method: "DELETE" });
|
|
2035
|
+
if (!response.ok) {
|
|
2036
|
+
const body = await response.text();
|
|
2037
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
async leave(teamId) {
|
|
2041
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/leave`, { method: "POST" });
|
|
2042
|
+
if (!response.ok) {
|
|
2043
|
+
const body = await response.text();
|
|
2044
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
async transferOwnership(teamId, newOwnerCustomerId) {
|
|
2048
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/transfer`, {
|
|
2049
|
+
method: "POST",
|
|
2050
|
+
body: JSON.stringify({ newOwnerCustomerId })
|
|
2051
|
+
});
|
|
2052
|
+
if (!response.ok) {
|
|
2053
|
+
const body = await response.text();
|
|
2054
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
async listMembers(teamId) {
|
|
2058
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/members`);
|
|
2059
|
+
if (!response.ok) {
|
|
2060
|
+
const body = await response.text();
|
|
2061
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2062
|
+
}
|
|
2063
|
+
return (await response.json()).members ?? [];
|
|
2064
|
+
}
|
|
2065
|
+
async updateMember(teamId, memberId, updates) {
|
|
2066
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/members/${encodeURIComponent(memberId)}`, {
|
|
2067
|
+
method: "PATCH",
|
|
2068
|
+
body: JSON.stringify(updates)
|
|
2069
|
+
});
|
|
2070
|
+
if (!response.ok) {
|
|
2071
|
+
const body = await response.text();
|
|
2072
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2073
|
+
}
|
|
2074
|
+
return (await response.json()).member;
|
|
2075
|
+
}
|
|
2076
|
+
async removeMember(teamId, memberId) {
|
|
2077
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/members/${encodeURIComponent(memberId)}`, { method: "DELETE" });
|
|
2078
|
+
if (!response.ok) {
|
|
2079
|
+
const body = await response.text();
|
|
2080
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
async listInvitations(teamId) {
|
|
2084
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/invitations`);
|
|
2085
|
+
if (!response.ok) {
|
|
2086
|
+
const body = await response.text();
|
|
2087
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2088
|
+
}
|
|
2089
|
+
return (await response.json()).invitations ?? [];
|
|
2090
|
+
}
|
|
2091
|
+
async invite(teamId, options) {
|
|
2092
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/invitations`, {
|
|
2093
|
+
method: "POST",
|
|
2094
|
+
body: JSON.stringify(options)
|
|
2095
|
+
});
|
|
2096
|
+
if (!response.ok) {
|
|
2097
|
+
const body = await response.text();
|
|
2098
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2099
|
+
}
|
|
2100
|
+
return (await response.json()).invitation;
|
|
2101
|
+
}
|
|
2102
|
+
async revokeInvitation(invitationId) {
|
|
2103
|
+
const response = await this.client.fetch(`/v1/teams/invitations/${encodeURIComponent(invitationId)}`, { method: "DELETE" });
|
|
2104
|
+
if (!response.ok) {
|
|
2105
|
+
const body = await response.text();
|
|
2106
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
async acceptInvitation(token) {
|
|
2110
|
+
const response = await this.client.fetch(`/v1/teams/invitations/${encodeURIComponent(token)}/accept`, { method: "POST" });
|
|
2111
|
+
if (!response.ok) {
|
|
2112
|
+
const body = await response.text();
|
|
2113
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2114
|
+
}
|
|
2115
|
+
return (await response.json()).member;
|
|
2116
|
+
}
|
|
2117
|
+
async getInvitation(token) {
|
|
2118
|
+
const response = await this.client.fetch(`/v1/teams/invitations/${encodeURIComponent(token)}`);
|
|
2119
|
+
if (!response.ok) {
|
|
2120
|
+
const body = await response.text();
|
|
2121
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2122
|
+
}
|
|
2123
|
+
return (await response.json()).invitation;
|
|
2124
|
+
}
|
|
2125
|
+
async listSecrets(teamId) {
|
|
2126
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/secrets`);
|
|
2127
|
+
if (!response.ok) {
|
|
2128
|
+
const body = await response.text();
|
|
2129
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2130
|
+
}
|
|
2131
|
+
return (await response.json()).secrets ?? [];
|
|
2132
|
+
}
|
|
2133
|
+
async upsertSecret(teamId, name, value) {
|
|
2134
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/secrets/${encodeURIComponent(name)}`, {
|
|
2135
|
+
method: "PUT",
|
|
2136
|
+
body: JSON.stringify({ value })
|
|
2137
|
+
});
|
|
2138
|
+
if (!response.ok) {
|
|
2139
|
+
const body = await response.text();
|
|
2140
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2141
|
+
}
|
|
2142
|
+
return (await response.json()).secret;
|
|
2143
|
+
}
|
|
2144
|
+
async deleteSecret(teamId, name) {
|
|
2145
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/secrets/${encodeURIComponent(name)}`, { method: "DELETE" });
|
|
2146
|
+
if (!response.ok) {
|
|
2147
|
+
const body = await response.text();
|
|
2148
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
async revealSecret(teamId, name) {
|
|
2152
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/secrets/${encodeURIComponent(name)}/reveal`, { method: "POST" });
|
|
2153
|
+
if (!response.ok) {
|
|
2154
|
+
const body = await response.text();
|
|
2155
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2156
|
+
}
|
|
2157
|
+
return await response.json();
|
|
2158
|
+
}
|
|
2159
|
+
async listTemplates(teamId) {
|
|
2160
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/templates`);
|
|
2161
|
+
if (!response.ok) {
|
|
2162
|
+
const body = await response.text();
|
|
2163
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2164
|
+
}
|
|
2165
|
+
return (await response.json()).templates ?? [];
|
|
2166
|
+
}
|
|
2167
|
+
async createTemplate(teamId, options) {
|
|
2168
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/templates`, {
|
|
2169
|
+
method: "POST",
|
|
2170
|
+
body: JSON.stringify({
|
|
2171
|
+
name: options.name,
|
|
2172
|
+
snapshotId: options.snapshotId,
|
|
2173
|
+
description: options.description,
|
|
2174
|
+
environment: options.environment,
|
|
2175
|
+
config: options.config
|
|
2176
|
+
})
|
|
2177
|
+
});
|
|
2178
|
+
if (!response.ok) {
|
|
2179
|
+
const body = await response.text();
|
|
2180
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2181
|
+
}
|
|
2182
|
+
return (await response.json()).template;
|
|
2183
|
+
}
|
|
2184
|
+
async deleteTemplate(teamId, templateId) {
|
|
2185
|
+
const response = await this.client.fetch(`/v1/teams/${encodeURIComponent(teamId)}/templates/${encodeURIComponent(templateId)}`, { method: "DELETE" });
|
|
2186
|
+
if (!response.ok) {
|
|
2187
|
+
const body = await response.text();
|
|
2188
|
+
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
//#endregion
|
|
2193
|
+
export { DEFAULT_SANDBOX_SIZE as a, resolveSandboxResources as c, SandboxFleetClient as i, sandboxResourcesForSize as l, SandboxClient as n, SANDBOX_SIZE_PRESETS as o, SandboxFleet as r, SANDBOX_SIZE_PRESET_NAMES as s, IntelligenceClient as t };
|