@kedem/okdb 2.3.2 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x457462=_0x5d69;function _0x5d69(_0x67162,_0x3af333){_0x67162=_0x67162-0x137;const _0x6e238a=_0x6e23();let _0x5d6961=_0x6e238a[_0x67162];return _0x5d6961;}(function(_0x4f24e9,_0x2471b9){const _0x4fb88e=_0x5d69,_0x4d8091=_0x4f24e9();while(!![]){try{const _0x4bdc28=parseInt(_0x4fb88e(0x511))/0x1+-parseInt(_0x4fb88e(0x588))/0x2+parseInt(_0x4fb88e(0x414))/0x3*(parseInt(_0x4fb88e(0x3ea))/0x4)+parseInt(_0x4fb88e(0x417))/0x5+-parseInt(_0x4fb88e(0x1f9))/0x6+parseInt(_0x4fb88e(0x5a2))/0x7*(-parseInt(_0x4fb88e(0x384))/0x8)+parseInt(_0x4fb88e(0x4e2))/0x9*(parseInt(_0x4fb88e(0x514))/0xa);if(_0x4bdc28===_0x2471b9)break;else _0x4d8091['push'](_0x4d8091['shift']());}catch(_0x5f5629){_0x4d8091['push'](_0x4d8091['shift']());}}}(_0x6e23,0x4e448));var require$$1=require(_0x457462(0x188)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x457462(0x4f1)),require$$5=require(_0x457462(0x1fa)),require$$0$3=require('readline'),require$$0$1=require(_0x457462(0x5d4)),require$$0$2=require(_0x457462(0x2e8)),require$$4=require(_0x457462(0x254)),require$$1$2=require(_0x457462(0x2b2)),require$$0$4=require('node:perf_hooks'),require$$0$5=require(_0x457462(0x4f9)),require$$0$6=require(_0x457462(0x27e));function getDefaultExportFromCjs(_0x2e4edd){const _0x24af06=_0x457462;return _0x2e4edd&&_0x2e4edd[_0x24af06(0x3e0)]&&Object[_0x24af06(0x5e0)][_0x24af06(0x4ba)][_0x24af06(0x578)](_0x2e4edd,_0x24af06(0x2c4))?_0x2e4edd[_0x24af06(0x2c4)]:_0x2e4edd;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x4d253f=require$$0,_0xe9042d=require$$1$1,_0x4ae848=require$$1;let _0x35a717;function _0xc56034(){const _0x2ec2bc=_0x5d69;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x35a717!==undefined)return _0x35a717;try{const _0x21c7b1=_0x4ae848[_0x2ec2bc(0x347)](require[_0x2ec2bc(0x205)](_0x2ec2bc(0x274)));_0x35a717=_0xe9042d[_0x2ec2bc(0x36a)](_0x4ae848[_0x2ec2bc(0x1f6)](_0x21c7b1,_0x2ec2bc(0x54b),_0x2ec2bc(0x445),_0x2ec2bc(0x579)));}catch{_0x35a717=![];}return _0x35a717;}function _0x33a760(){const _0x5eb1c0=_0x5d69,_0x560c3f=_0x4d253f[_0x5eb1c0(0x2c7)]()['length'];return Math[_0x5eb1c0(0x142)](0x1,_0x560c3f-0x1);}function _0x229bdd(_0x160520,_0x5b3ac9={}){const _0x35c53d=_0x5d69,_0x241880=_0x5b3ac9[_0x35c53d(0x456)]!==undefined?_0x5b3ac9[_0x35c53d(0x456)]:_0xc56034();let _0x56f807;if(_0x160520?.[_0x35c53d(0x49e)])_0x56f807=0x1;else{let _0x1ac5ea,_0x3c651a;if(_0x160520?.[_0x35c53d(0x1ad)]!==undefined&&_0x160520[_0x35c53d(0x1ad)]!==null&&_0x160520[_0x35c53d(0x1ad)]!=='')_0x1ac5ea=_0x160520[_0x35c53d(0x1ad)],_0x3c651a='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x1ac5ea=process.env.OKDB_HTTP_WORKERS,_0x3c651a=_0x35c53d(0x238);else _0x160520?.[_0x35c53d(0x338)]?.[_0x35c53d(0x606)]!==undefined&&_0x160520['http'][_0x35c53d(0x606)]!==null&&_0x160520[_0x35c53d(0x338)][_0x35c53d(0x606)]!==''&&(_0x1ac5ea=_0x160520[_0x35c53d(0x338)][_0x35c53d(0x606)],_0x3c651a=_0x35c53d(0x25d));}if(_0x1ac5ea===undefined)_0x56f807=_0x33a760();else{const _0x1eed79=Number(_0x1ac5ea);!Number[_0x35c53d(0x5a5)](_0x1eed79)||_0x1eed79<0x1?(console['warn'](_0x35c53d(0x388)+_0x3c651a+'='+JSON[_0x35c53d(0x36e)](_0x1ac5ea)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x56f807=0x1):_0x56f807=_0x1eed79;}}return!_0x241880&&_0x56f807>0x1&&(console['warn'](_0x35c53d(0x364)+(_0x35c53d(0x4ad)+_0x56f807+').')),_0x56f807=0x1),_0x56f807;}return okdbWorkers={'isShmbufNative':_0xc56034,'defaultWorkers':_0x33a760,'resolveWorkers':_0x229bdd},okdbWorkers;}var version=_0x457462(0x1ff),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3eed8d=require$$0$1;function _0x477b54(_0x31bfa5,_0x2d1322){const _0x4d0996=_0x5d69;return _0x3eed8d['createHmac'](_0x4d0996(0x53d),_0x2d1322)[_0x4d0996(0x16c)](_0x31bfa5)[_0x4d0996(0x155)](_0x4d0996(0x357));}function _0x473eaa(_0x3bb5c9,_0x59d784){const _0x1003c5=_0x5d69;if(typeof _0x3bb5c9!=='string'||typeof _0x59d784!=='string')return![];if(Buffer[_0x1003c5(0x2da)](_0x3bb5c9)!==Buffer['byteLength'](_0x59d784))return![];return _0x3eed8d['timingSafeEqual'](Buffer[_0x1003c5(0x1f8)](_0x3bb5c9),Buffer[_0x1003c5(0x1f8)](_0x59d784));}function _0x51b49d(_0x17a322){const _0x3ccc6a=_0x5d69;if(!_0x17a322?.['startsWith'](_0x3ccc6a(0x2dd)))return null;return _0x17a322['slice'](0x7);}function _0x16eba5(_0x290755=0x20){const _0x329915=_0x5d69;return _0x3eed8d['randomBytes'](_0x290755)[_0x329915(0x4d7)](_0x329915(0x357));}function _0x1b77a5(_0xcb176c){const _0x5dc7d0=_0x5d69;return _0x3eed8d['createHash'](_0x5dc7d0(0x53d))['update'](_0xcb176c)[_0x5dc7d0(0x155)](_0x5dc7d0(0x1ce));}function _0x324133(_0x11e55c,_0x5e8f87,_0x2660e9=0x36ee80){const _0x28bb53=_0x5d69;if(!_0x5e8f87)throw new Error(_0x28bb53(0x5ad));const _0x414668=Date['now'](),_0xcf7dc6=Buffer['from'](JSON[_0x28bb53(0x36e)]({'iat':_0x414668,'exp':_0x414668+_0x2660e9,'sub':_0x11e55c?.['id']??_0x11e55c?.[_0x28bb53(0x1bf)]??null,'username':_0x11e55c?.['username']??_0x11e55c?.['name']??null,'roles':Array[_0x28bb53(0x283)](_0x11e55c?.['roles'])?_0x11e55c[_0x28bb53(0x478)]:[]}))['toString'](_0x28bb53(0x357)),_0x556f4a=_0x477b54(_0xcf7dc6,_0x5e8f87);return _0xcf7dc6+'.'+_0x556f4a;}function _0x34d62b(_0x3bab22,_0x31f5a1){const _0x1f19ae=_0x5d69;if(!_0x31f5a1||typeof _0x3bab22!=='string')return null;const [_0x274271,_0xd8f976]=_0x3bab22[_0x1f19ae(0x1f5)]('.');if(!_0x274271||!_0xd8f976)return null;const _0x5574e3=_0x477b54(_0x274271,_0x31f5a1);if(!_0x473eaa(_0xd8f976,_0x5574e3))return null;try{const _0x7bcec5=JSON[_0x1f19ae(0x530)](Buffer[_0x1f19ae(0x1f8)](_0x274271,_0x1f19ae(0x357))[_0x1f19ae(0x4d7)]()),_0x474ce8=0x7530;if(Date['now']()>Number(_0x7bcec5?.['exp']??0x0)+_0x474ce8)return null;return _0x7bcec5;}catch{return null;}}async function _0x1b622b(_0x5d9b6a){return new Promise((_0x147064,_0x420d2e)=>{const _0x1277ae=_0x5d69,_0x4b4832=_0x3eed8d[_0x1277ae(0x1df)](0x10);_0x3eed8d[_0x1277ae(0x4a5)](_0x5d9b6a,_0x4b4832,0x40,(_0x5892fc,_0x222638)=>{const _0x17b690=_0x1277ae;if(_0x5892fc)_0x420d2e(_0x5892fc);_0x147064(_0x4b4832[_0x17b690(0x4d7)](_0x17b690(0x1ce))+':'+_0x222638['toString']('hex'));});});}async function _0x441166(_0x58eafa,_0x31818c){const _0x5f3fc7=_0x5d69,[_0x130b75,_0x623b0e]=_0x31818c[_0x5f3fc7(0x1f5)](':');if(!_0x130b75||!_0x623b0e)return![];const _0x17eeeb=Buffer[_0x5f3fc7(0x1f8)](_0x130b75,_0x5f3fc7(0x1ce));return new Promise((_0x5b2993,_0x4221a9)=>{_0x3eed8d['scrypt'](_0x58eafa,_0x17eeeb,0x40,(_0x27da67,_0x4f3fc3)=>{const _0x2f8ead=_0x5d69;if(_0x27da67)_0x4221a9(_0x27da67);_0x5b2993(_0x3eed8d['timingSafeEqual'](_0x4f3fc3,Buffer[_0x2f8ead(0x1f8)](_0x623b0e,_0x2f8ead(0x1ce))));});});}return okdbAuthTokens={'hmac':_0x477b54,'timingSafeEqual':_0x473eaa,'parseBearer':_0x51b49d,'randomToken':_0x16eba5,'hashToken':_0x1b77a5,'issueToken':_0x324133,'authenticateToken':_0x34d62b,'hashPassword':_0x1b622b,'verifyPassword':_0x441166},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x367b93=_0x457462;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x51cf6d=require$$0$2,_0x2afa74=_0x367b93(0x5bd),_0x587d0f=new Uint8Array(0x100)[_0x367b93(0x4c1)](0xff);for(let _0x342eb6=0x0;_0x342eb6<_0x2afa74[_0x367b93(0x3bf)];_0x342eb6++){_0x587d0f[_0x2afa74[_0x367b93(0x601)](_0x342eb6)]=_0x342eb6,_0x587d0f[_0x2afa74[_0x367b93(0x601)](_0x342eb6)+0x20]=_0x342eb6;}_0x587d0f['O'['charCodeAt'](0x0)]=0x0,_0x587d0f['o'[_0x367b93(0x601)](0x0)]=0x0,_0x587d0f['I'[_0x367b93(0x601)](0x0)]=0x1,_0x587d0f['i'[_0x367b93(0x601)](0x0)]=0x1,_0x587d0f['L'['charCodeAt'](0x0)]=0x1,_0x587d0f['l'[_0x367b93(0x601)](0x0)]=0x1;function _0x2368ef(_0x337cd3){const _0x351b30=_0x367b93;let _0x340aca=0x0,_0x9c0ad3=0x0,_0x341a2b='';for(let _0x465305=0x0;_0x465305<_0x337cd3[_0x351b30(0x3bf)];_0x465305++){_0x9c0ad3=_0x9c0ad3<<0x8|_0x337cd3[_0x465305],_0x340aca+=0x8;while(_0x340aca>=0x5){_0x340aca-=0x5,_0x341a2b+=_0x2afa74[_0x9c0ad3>>>_0x340aca&0x1f];}}return _0x340aca>0x0&&(_0x341a2b+=_0x2afa74[_0x9c0ad3<<0x5-_0x340aca&0x1f]),_0x341a2b;}function _0x2966c6(_0x27d1f3){const _0x52299c=_0x367b93;_0x27d1f3=_0x27d1f3[_0x52299c(0x5c4)](/-/g,'')[_0x52299c(0x4d6)]();let _0x44dfbe=0x0,_0x1c957b=0x0;const _0x3db879=[];for(let _0x1cfbec=0x0;_0x1cfbec<_0x27d1f3[_0x52299c(0x3bf)];_0x1cfbec++){const _0x3e4714=_0x587d0f[_0x27d1f3[_0x52299c(0x601)](_0x1cfbec)];if(_0x3e4714===0xff)continue;_0x1c957b=_0x1c957b<<0x5|_0x3e4714,_0x44dfbe+=0x5,_0x44dfbe>=0x8&&(_0x44dfbe-=0x8,_0x3db879[_0x52299c(0x437)](_0x1c957b>>>_0x44dfbe&0xff));}return Buffer[_0x52299c(0x1f8)](_0x3db879);}const _0x27c52e=['sync',_0x367b93(0x513),_0x367b93(0x599),_0x367b93(0x4ea),_0x367b93(0x3a3),_0x367b93(0x3c0),_0x367b93(0x532),_0x367b93(0x5c2)],_0x2c6035=0x0,_0x368a6e=0x1,_0x1937e8=0x2,_0x276758=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x3ac77d({issuedAt:_0x361244,expiresAt:_0x1b9169,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x2c6035}){const _0x4a7745=_0x367b93,_0x4528e2=Buffer[_0x4a7745(0x1f8)](licensee,_0x4a7745(0x3b1))[_0x4a7745(0x467)](0x0,0x40),_0xc1cc57=0x1+0x1+0x4+0x4+0x1+_0x4528e2[_0x4a7745(0x3bf)]+0x2+0x10,_0xac13e5=Buffer[_0x4a7745(0x49f)](_0xc1cc57);let _0x49cbfc=0x0;_0xac13e5[_0x4a7745(0x455)](0x1,_0x49cbfc++),_0xac13e5[_0x4a7745(0x455)](licenseType,_0x49cbfc++),_0xac13e5['writeUInt32BE'](Math['floor'](_0x361244/0x3e8),_0x49cbfc),_0x49cbfc+=0x4,_0xac13e5[_0x4a7745(0x28d)](Math[_0x4a7745(0x299)](_0x1b9169/0x3e8),_0x49cbfc),_0x49cbfc+=0x4,_0xac13e5[_0x4a7745(0x455)](_0x4528e2['length'],_0x49cbfc++),_0x4528e2[_0x4a7745(0x534)](_0xac13e5,_0x49cbfc),_0x49cbfc+=_0x4528e2['length'];let _0x34f9b4=0x0;for(let _0x53810d=0x0;_0x53810d<_0x27c52e['length'];_0x53810d++){if(features[_0x27c52e[_0x53810d]])_0x34f9b4|=0x1<<_0x53810d;}_0xac13e5[_0x4a7745(0x321)](_0x34f9b4,_0x49cbfc),_0x49cbfc+=0x2;const _0x4e8e7f=['envs',_0x4a7745(0x35c),'syncPeers','maxWrites'];for(const _0x262453 of _0x4e8e7f){_0xac13e5[_0x4a7745(0x28d)](limits[_0x262453]||0x0,_0x49cbfc),_0x49cbfc+=0x4;}return _0xac13e5;}function _0x416bf1(_0xd15963){const _0x2d8d8a=_0x367b93;let _0x4f786b=0x0;const _0x2b15cb=_0xd15963[_0x2d8d8a(0x221)](_0x4f786b++),_0x27c6c3=_0xd15963['readUInt8'](_0x4f786b++),_0x3ed6ad=_0xd15963[_0x2d8d8a(0x39e)](_0x4f786b);_0x4f786b+=0x4;const _0xda9558=_0xd15963[_0x2d8d8a(0x39e)](_0x4f786b);_0x4f786b+=0x4;const _0x3e4ec5=_0xd15963[_0x2d8d8a(0x221)](_0x4f786b++),_0x49ddd5=_0xd15963[_0x2d8d8a(0x467)](_0x4f786b,_0x4f786b+_0x3e4ec5)[_0x2d8d8a(0x4d7)](_0x2d8d8a(0x3b1));_0x4f786b+=_0x3e4ec5;const _0xf33727=_0xd15963[_0x2d8d8a(0x1ba)](_0x4f786b);_0x4f786b+=0x2;const _0xf6e3b3={};for(let _0x17acb5=0x0;_0x17acb5<_0x27c52e[_0x2d8d8a(0x3bf)];_0x17acb5++){_0xf6e3b3[_0x27c52e[_0x17acb5]]=Boolean(_0xf33727&0x1<<_0x17acb5);}const _0x459d39=['envs','typesPerEnv',_0x2d8d8a(0x2a8),_0x2d8d8a(0x486)],_0x21cf9e={};for(const _0x1dc44c of _0x459d39){const _0x2e75ae=_0xd15963[_0x2d8d8a(0x39e)](_0x4f786b);_0x4f786b+=0x4,_0x21cf9e[_0x1dc44c]=_0x2e75ae===0x0?null:_0x2e75ae;}return{'v':_0x2b15cb,'licenseType':_0x27c6c3,'issuedAt':_0x3ed6ad*0x3e8,'expiresAt':_0xda9558*0x3e8,'licensee':_0x49ddd5,'features':_0xf6e3b3,'limits':_0x21cf9e};}function _0x13aec6(_0xb1fcf8,_0x4fc487){const _0x3b8def=_0x367b93,_0x2d1df6=Buffer[_0x3b8def(0x562)]([_0xb1fcf8,_0x4fc487]),_0x15e5fd=_0x2368ef(_0x2d1df6),_0x502983=[];for(let _0x5b1ccc=0x0;_0x5b1ccc<_0x15e5fd[_0x3b8def(0x3bf)];_0x5b1ccc+=0x8){_0x502983[_0x3b8def(0x437)](_0x15e5fd['slice'](_0x5b1ccc,_0x5b1ccc+0x8));}return _0x502983[_0x3b8def(0x1f6)]('-');}function _0x18cf55(_0x2292b5){const _0x2aa67c=_0x367b93;if(typeof _0x2292b5!==_0x2aa67c(0x5d2))throw new Error(_0x2aa67c(0x55b));const _0x56c451=_0x2966c6(_0x2292b5[_0x2aa67c(0x5c4)](/-/g,''));if(_0x56c451[_0x2aa67c(0x3bf)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x56c451['length']+_0x2aa67c(0x395));const _0x5b88ea=_0x56c451['slice'](0x0,_0x56c451['length']-0x40),_0x257362=_0x56c451['slice'](_0x56c451[_0x2aa67c(0x3bf)]-0x40);let _0x33b9a7;try{_0x33b9a7=_0x416bf1(_0x5b88ea);}catch(_0x31df27){throw new Error(_0x2aa67c(0x18e)+_0x31df27[_0x2aa67c(0x154)]);}return{'rawBuf':_0x56c451,'payload':_0x5b88ea,'sig':_0x257362,'decoded':_0x33b9a7};}function _0x418951(_0x20d7c4){const _0x32e5f5=_0x367b93;return _0x51cf6d[_0x32e5f5(0x1c8)](_0x32e5f5(0x53d))['update'](_0x20d7c4)['digest']()[_0x32e5f5(0x467)](0x0,0x8);}function _0x14920a(_0x37fc84,_0x59a52e,_0x6188de){const _0x16c2b3=_0x367b93,_0x3a0aa6=_0x16c2b3(0x3c9)+_0x6188de,_0x1656ad=Buffer['concat']([Buffer[_0x16c2b3(0x1f8)](_0x37fc84,'utf8'),_0x59a52e]),_0x1837b0=_0x51cf6d[_0x16c2b3(0x186)](_0x16c2b3(0x53d),_0x3a0aa6)[_0x16c2b3(0x16c)](_0x1656ad)['digest'](),_0x59f1de=_0x2368ef(_0x1837b0[_0x16c2b3(0x467)](0x0,0x5));return{'pin':_0x59f1de,'pinHmac':_0x1837b0};}function _0x13a82e(_0x2fea35,_0x5cc169,_0x1ef9ec){const _0x13f881=_0x367b93,_0x1bafc9=Buffer['allocUnsafe'](0x4d);let _0x56c6f3=0x0;_0x1bafc9[_0x13f881(0x455)](0x1,_0x56c6f3++),_0x2fea35['copy'](_0x1bafc9,_0x56c6f3),_0x56c6f3+=0x8,_0x1bafc9['writeUInt32BE'](_0x5cc169,_0x56c6f3),_0x56c6f3+=0x4,_0x1ef9ec['copy'](_0x1bafc9,_0x56c6f3);const _0x14464d=_0x2368ef(_0x1bafc9),_0x504e8d=[];for(let _0x217ef2=0x0;_0x217ef2<_0x14464d['length'];_0x217ef2+=0x6){_0x504e8d['push'](_0x14464d[_0x13f881(0x467)](_0x217ef2,_0x217ef2+0x6));}return _0x504e8d[_0x13f881(0x1f6)]('-');}function _0x23dbf8(_0x335931){const _0x3b1d63=_0x367b93;if(typeof _0x335931!==_0x3b1d63(0x5d2))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x18799b=_0x2966c6(_0x335931[_0x3b1d63(0x5c4)](/-/g,''));if(_0x18799b['length']!==0x4d)throw new Error(_0x3b1d63(0x5bc)+_0x18799b[_0x3b1d63(0x3bf)]);let _0x3b4a8c=0x0;const _0x2cad1b=_0x18799b[_0x3b1d63(0x221)](_0x3b4a8c++),_0x381fd7=_0x18799b[_0x3b1d63(0x467)](_0x3b4a8c,_0x3b4a8c+0x8);_0x3b4a8c+=0x8;const _0x5ba588=_0x18799b['readUInt32BE'](_0x3b4a8c);_0x3b4a8c+=0x4;const _0x1dee2f=_0x18799b['slice'](_0x3b4a8c);return{'v':_0x2cad1b,'licenseHash':_0x381fd7,'expiry':_0x5ba588,'sig':_0x1dee2f};}function _0x47a57b({tokenString:_0x2a531a,nodeId:_0x5c0ad9,rawBlobBuf:_0x3ec57f,pubKeyPem:_0x87304,pubFingerprint:_0x3de232}){const _0xb5cd9b=_0x367b93;let _0x233d29;try{_0x233d29=_0x23dbf8(_0x2a531a);}catch(_0x2ae6d4){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x3b8a96=_0x418951(_0x3ec57f);if(!_0x3b8a96[_0xb5cd9b(0x282)](_0x233d29['licenseHash']))return{'valid':![],'reason':_0xb5cd9b(0x38b)};const {pinHmac:_0x495259}=_0x14920a(_0x5c0ad9,_0x3b8a96,_0x3de232),_0x540053=Buffer[_0xb5cd9b(0x49f)](0x4);_0x540053['writeUInt32BE'](_0x233d29[_0xb5cd9b(0x419)],0x0);const _0x1d811a=Buffer[_0xb5cd9b(0x562)]([Buffer[_0xb5cd9b(0x1f8)]([_0x233d29['v']]),_0x495259[_0xb5cd9b(0x467)](0x0,0x5),_0x233d29[_0xb5cd9b(0x3a1)],_0x540053]);try{const _0x1df5cf=_0x51cf6d[_0xb5cd9b(0x5b6)](null,_0x1d811a,_0x87304,_0x233d29[_0xb5cd9b(0x273)]);if(!_0x1df5cf)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x465b3e){return{'valid':![],'reason':_0xb5cd9b(0x459)};}if(_0x233d29[_0xb5cd9b(0x419)]<Date[_0xb5cd9b(0x4b1)]()/0x3e8)return{'valid':![],'reason':_0xb5cd9b(0x5ed)};return{'valid':!![],'reason':'ok'};}function _0x119b53(_0x4bda85){const _0xe78a47=_0x367b93;if(typeof _0x4bda85!==_0xe78a47(0x5d2))return _0xe78a47(0x37a);const _0x1dd231=_0x4bda85['trim']();if(_0x1dd231[_0xe78a47(0x3ca)]('/')||_0x1dd231[_0xe78a47(0x3ca)]('./')||_0x1dd231[_0xe78a47(0x3ca)]('../')||/^[A-Za-z]:[\\/]/[_0xe78a47(0x3e8)](_0x1dd231))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0xe78a47(0x3e8)](_0x1dd231))return _0xe78a47(0x541);const _0x3d6438=_0x1dd231[_0xe78a47(0x5c4)](/[\s-]+/g,'')['length'];if(_0x3d6438===0x7c)return _0xe78a47(0x18a);if(_0x3d6438>=0x95&&_0x3d6438<=0xfc)return _0xe78a47(0x359);return'unknown';}return okdbLicenseCodec={'toBase32':_0x2368ef,'fromBase32':_0x2966c6,'encodeLicensePayload':_0x3ac77d,'decodeLicensePayload':_0x416bf1,'encodeLicenseBlob':_0x13aec6,'decodeLicenseBlob':_0x18cf55,'licenseHash':_0x418951,'derivePin':_0x14920a,'encodeActivationToken':_0x13a82e,'decodeActivationToken':_0x23dbf8,'verifyActivation':_0x47a57b,'detectInputType':_0x119b53,'FEATURE_NAMES':_0x27c52e,'LICENSE_TYPE_STANDARD':_0x2c6035,'LICENSE_TYPE_OPEN':_0x368a6e,'LICENSE_TYPE_INTERNAL':_0x1937e8,'OPEN_LICENSE_MAX_DURATION_MS':_0x276758},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x24e813 extends Error{constructor(_0x26c6dd,_0x2183ea,_0x21f035={}){const _0x2b6346=_0x5d69;super(_0x26c6dd),this[_0x2b6346(0x2f3)]=_0x2b6346(0x187),this[_0x2b6346(0x4bf)]=_0x2183ea,this['details']=_0x21f035,_0x21f035[_0x2b6346(0x3da)]&&(this[_0x2b6346(0x3da)]=_0x21f035['cause']),Error['captureStackTrace'](this,this[_0x2b6346(0x58e)]);}}class _0x16232f extends _0x24e813{constructor(_0x39c5e7,_0x284d30,_0x5d264e,_0x380659){const _0x24bf08=_0x5d69;super('Version\x20mismatch\x20for\x20'+_0x39c5e7+'@'+_0x284d30+':\x20expected\x20'+_0x5d264e+_0x24bf08(0x393)+_0x380659,_0x24bf08(0x56c),{'type':_0x39c5e7,'key':_0x284d30,'expectedVersion':_0x5d264e,'actualVersion':_0x380659}),this[_0x24bf08(0x2f3)]=_0x24bf08(0x178);}}class _0xe1c38f extends _0x24e813{constructor(_0x39f1c1,_0xe82271){const _0x4f0842=_0x5d69;super(_0x39f1c1+'@'+_0xe82271+_0x4f0842(0x319),'NOT_FOUND',{'type':_0x39f1c1,'key':_0xe82271}),this[_0x4f0842(0x2f3)]=_0x4f0842(0x3e5);}}class _0xeda0f1 extends _0x24e813{constructor(_0x30b930,_0x5595b1){const _0x2f5641=_0x5d69;super(_0x30b930+'@'+_0x5595b1+_0x2f5641(0x497),_0x2f5641(0x242),{'type':_0x30b930,'key':_0x5595b1}),this[_0x2f5641(0x2f3)]=_0x2f5641(0x36b);}}class _0x1dfe13 extends _0x24e813{constructor(_0xcc359f,_0x166518){const _0x303f6f=_0x5d69,_0x1ad635=typeof _0x166518;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0xcc359f+'\x27:\x20'+_0x1ad635+_0x303f6f(0x377)+_0x166518,'INVALID_INDEX_KEY',{'index':_0xcc359f,'key':_0x166518,'keyType':_0x1ad635}),this['name']=_0x303f6f(0x520);}}class _0xc39d70 extends _0x24e813{constructor(_0x3b37e0){const _0x25d8f6=_0x5d69,_0x5fc21b=typeof _0x3b37e0;super('Invalid\x20primary\x20key\x20type:\x20'+_0x5fc21b+_0x25d8f6(0x5c9)+_0x3b37e0,_0x25d8f6(0x50c),{'key':_0x3b37e0,'keyType':_0x5fc21b}),this['name']=_0x25d8f6(0x5ea);}}class _0x331963 extends _0x24e813{constructor(_0x5a954a){const _0x2ccdf6=_0x5d69;super(_0x2ccdf6(0x153)+_0x5a954a+_0x2ccdf6(0x2f0),'TYPE_NOT_REGISTERED',{'type':_0x5a954a}),this['name']='OKDBTypeNotRegisteredError';}}class _0x3153c7 extends _0x24e813{constructor(_0x1c47c6){const _0x13d87f=_0x5d69;super(_0x13d87f(0x153)+_0x1c47c6+_0x13d87f(0x59a),_0x13d87f(0x28b),{'type':_0x1c47c6}),this['name']=_0x13d87f(0x570);}}class _0x231973 extends _0x24e813{constructor(_0x518053,_0x50a83a){const _0xd87af=_0x5d69;super(_0xd87af(0x1ea)+_0x50a83a+'\x27\x20on\x20type\x20\x27'+_0x518053+_0xd87af(0x2f0),_0xd87af(0x3d4),{'type':_0x518053,'index':_0x50a83a}),this[_0xd87af(0x2f3)]=_0xd87af(0x1dc);}}class _0x1b384b extends _0x24e813{constructor(_0x4a9116,_0x52b7b5){const _0xdc03f3=_0x5d69;super(_0xdc03f3(0x1ea)+_0x52b7b5+_0xdc03f3(0x1ca)+_0x4a9116+_0xdc03f3(0x2aa),_0xdc03f3(0x2bd),{'type':_0x4a9116,'index':_0x52b7b5}),this[_0xdc03f3(0x2f3)]=_0xdc03f3(0x556);}}class _0x2bc760 extends _0x24e813{constructor(_0x1d0471,_0x5b5a5f={}){const _0x4e60c4=_0x5d69;super(_0x1d0471,_0x4e60c4(0x517),_0x5b5a5f),this[_0x4e60c4(0x2f3)]='OKDBInvalidValueError';}}class _0x79e825 extends _0x24e813{constructor(_0x3f6a37,_0x4df74b,_0x44abe6,_0x3b802d,_0x9682f0){const _0x30ca2f=_0x5d69;super(_0x30ca2f(0x1e9)+_0x3f6a37+'@'+_0x4df74b+_0x30ca2f(0x3b6)+_0x44abe6+_0x30ca2f(0x4f4)+_0x3b802d+_0x30ca2f(0x1e7)+_0x9682f0+'\x27','UNIQUE_CONSTRAINT',{'type':_0x3f6a37,'index':_0x4df74b,'indexKey':_0x44abe6,'existingKey':_0x3b802d,'conflictingKey':_0x9682f0}),this['name']=_0x30ca2f(0x4d8);}}class _0x294fb2 extends _0x24e813{constructor(_0x37623b,_0x562c41,_0xf74f92){const _0x45f755=_0x5d69;super(_0x45f755(0x167)+_0x37623b+'@'+_0x562c41,_0x45f755(0x482),{'type':_0x37623b,'key':_0x562c41,'errors':_0xf74f92}),this[_0x45f755(0x2f3)]=_0x45f755(0x5de),this['type']=_0x37623b,this[_0x45f755(0x2ac)]=_0x562c41,this['errors']=_0xf74f92;}}class _0x159f98 extends _0x24e813{constructor(_0x36b4ca,_0x21a565){const _0x5d9d45=_0x5d69;super(_0x5d9d45(0x3f1)+_0x36b4ca+':\x20'+_0x21a565[_0x5d9d45(0x3bf)]+_0x5d9d45(0x185),_0x5d9d45(0x22a),{'type':_0x36b4ca,'failures':_0x21a565}),this[_0x5d9d45(0x2f3)]=_0x5d9d45(0x1e3),this[_0x5d9d45(0x2cd)]=_0x36b4ca,this[_0x5d9d45(0x243)]=_0x21a565;}}class _0x402b98 extends _0x24e813{constructor(_0x4b8eb5,_0x2120c7,_0x7fa7b6,_0x3747f7,_0x5579f2){const _0x2f6c46=_0x5d69;super(_0x2f6c46(0x2e4)+_0x4b8eb5+'@'+_0x2120c7+'.'+_0x7fa7b6+_0x2f6c46(0x23d)+_0x3747f7+'@'+_0x5579f2+'\x20which\x20does\x20not\x20exist',_0x2f6c46(0x48b),{'sourceType':_0x4b8eb5,'sourceKey':_0x2120c7,'fieldPath':_0x7fa7b6,'targetType':_0x3747f7,'targetKey':_0x5579f2}),this[_0x2f6c46(0x2f3)]=_0x2f6c46(0x2d6),this[_0x2f6c46(0x2cb)]=_0x4b8eb5,this[_0x2f6c46(0x502)]=_0x2120c7,this['fieldPath']=_0x7fa7b6,this['targetType']=_0x3747f7,this[_0x2f6c46(0x2ba)]=_0x5579f2;}}class _0x32a018 extends _0x24e813{constructor(_0x2a83b9,_0x277da7,_0x4f9228){const _0x6e45c2=_0x5d69;super(_0x6e45c2(0x207)+_0x2a83b9+'@'+_0x277da7+':\x20'+_0x4f9228[_0x6e45c2(0x3bf)]+_0x6e45c2(0x59b),_0x6e45c2(0x31e),{'targetType':_0x2a83b9,'targetKey':_0x277da7,'references':_0x4f9228}),this[_0x6e45c2(0x2f3)]=_0x6e45c2(0x529),this[_0x6e45c2(0x23a)]=_0x2a83b9,this[_0x6e45c2(0x2ba)]=_0x277da7,this[_0x6e45c2(0x34c)]=_0x4f9228;}}class _0x540d4a extends _0x24e813{constructor(_0x4ac6e2,_0x33f352,_0x537b09){const _0x2c3658=_0x5d69;super(_0x2c3658(0x5df)+_0x33f352+_0x2c3658(0x4f2)+_0x4ac6e2+_0x2c3658(0x499)+_0x537b09['map'](_0x3348f8=>_0x3348f8[_0x2c3658(0x201)]+':'+_0x3348f8[_0x2c3658(0x2f3)])[_0x2c3658(0x1f6)](',\x20'),_0x2c3658(0x2ed),{'type':_0x4ac6e2,'index':_0x33f352,'usedBy':_0x537b09}),this[_0x2c3658(0x2f3)]=_0x2c3658(0x163);}}return okdbError={'OKDBError':_0x24e813,'OKDBVersionMismatchError':_0x16232f,'OKDBNotFoundError':_0xe1c38f,'OKDBAlreadyExistsError':_0xeda0f1,'OKDBInvalidIndexKeyError':_0x1dfe13,'OKDBInvalidPrimaryKeyError':_0xc39d70,'OKDBTypeNotRegisteredError':_0x331963,'OKDBTypeAlreadyRegisteredError':_0x3153c7,'OKDBIndexNotRegisteredError':_0x231973,'OKDBIndexAlreadyRegisteredError':_0x1b384b,'OKDBInvalidValueError':_0x2bc760,'OKDBUniqueConstraintError':_0x79e825,'OKDBSchemaValidationError':_0x294fb2,'OKDBSchemaCollectionError':_0x159f98,'OKDBForeignKeyError':_0x402b98,'OKDBForeignKeyDeleteError':_0x32a018,'OKDBIndexHasConsumersError':_0x540d4a},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5d6ed5=_0x457462;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4b31df={'PUT':_0x5d6ed5(0x491),'REMOVE':'remove','INDEX_DROP':_0x5d6ed5(0x438),'INDEX_REGISTER':_0x5d6ed5(0x16f),'INDEX_RESET':_0x5d6ed5(0x42a),'TYPE_REGISTER':_0x5d6ed5(0x52e),'TYPE_DROP':_0x5d6ed5(0x5e2),'FTS_REGISTER':'registerFts','FTS_DROP':_0x5d6ed5(0x564),'FTS_RESET':_0x5d6ed5(0x2f6),'SCHEMA_SET':_0x5d6ed5(0x528),'SCHEMA_DROP':_0x5d6ed5(0x4a4),'TTL_SET':_0x5d6ed5(0x15a),'TTL_CLEAR':'clearTtl'},_0x434b22={'SYSTEM_READY':_0x5d6ed5(0x33a),'FIELD_RESOLVER_REGISTERED':_0x5d6ed5(0x1b9),'SYSTEM_STOPPED':_0x5d6ed5(0x442),'SYSTEM_CLOCK_CHANGE':_0x5d6ed5(0x49c),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x5d6ed5(0x574),'SYSTEM_TYPE_DROP':_0x5d6ed5(0x404),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5d6ed5(0x5cf),'ITEM_CREATE':_0x5d6ed5(0x4ee),'ITEM_UPDATE':_0x5d6ed5(0x5d8),'ITEM_REMOVE':_0x5d6ed5(0x495),'INDEX_RESET':_0x5d6ed5(0x3dd),'INDEX_READY':_0x5d6ed5(0x3f0),'INDEX_PROGRESS':_0x5d6ed5(0x508),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x5d6ed5(0x43d),'INDEX_REGISTERED':_0x5d6ed5(0x32a),'FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0x5d6ed5(0x29c),'SCHEMA_SET':_0x5d6ed5(0x3cd),'SCHEMA_DROP':_0x5d6ed5(0x2bf),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x5d6ed5(0x4ef),'REF_VIOLATION_RESOLVED':_0x5d6ed5(0x261),'SYNC_APPLY':'sync:apply','TXN_START':_0x5d6ed5(0x28f),'TXN_END':_0x5d6ed5(0x47b),'TXN_ROLLBACK':_0x5d6ed5(0x256),'TYPE_REGISTERED':_0x5d6ed5(0x3f9),'TYPE_DROP':_0x5d6ed5(0x3e6),'ENV_OPENED':_0x5d6ed5(0x1a4),'ENV_REMOVED':_0x5d6ed5(0x36f),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x5d6ed5(0x250),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x5d6ed5(0x160),'LICENSE_ADDED':_0x5d6ed5(0x149),'LICENSE_ACTIVATED':_0x5d6ed5(0x591),'LICENSE_REMOVED':_0x5d6ed5(0x374)},_0x4f2b71={'CREATING':_0x5d6ed5(0x22f),'RESETTING':_0x5d6ed5(0x1de),'READY':_0x5d6ed5(0x457),'DROPPING':_0x5d6ed5(0x35f),'WAITING':_0x5d6ed5(0x4bc),'ERROR':_0x5d6ed5(0x1db)},_0x4e4d20={'CREATED':_0x5d6ed5(0x37b),'STARTING':_0x5d6ed5(0x190),'STARTED':_0x5d6ed5(0x449),'STOPPING':'stopping','STOPPED':_0x5d6ed5(0x2fd)},_0x58aa8d={'CREATING':_0x5d6ed5(0x22f),'READY':'ready','HALTED':'halted','STOPPED':_0x5d6ed5(0x2fd),'RESETTING':_0x5d6ed5(0x1de)},_0x51df5b=Object[_0x5d6ed5(0x355)]({'POKE':_0x5d6ed5(0x232),'DRAIN':_0x5d6ed5(0x53a),'TYPE_DROP':_0x5d6ed5(0x25a),'PROC':'bus:proc','ENV_RELEASE':_0x5d6ed5(0x4b4)});return okdbEnums={'BUS_EVENTS':_0x51df5b,'CHANGE_ACTIONS':_0x4b31df,'EVENTS':_0x434b22,'INDEX_STATE':_0x4f2b71,'OKDB_STATE':_0x4e4d20,'VIEW_STATE':_0x58aa8d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x1c00e0=_0x457462;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x29d61e=require$$1$1,_0x3f0add=require$$1,_0x4b30c6=require$$0$1,_0x544193=_0x29d61e[_0x1c00e0(0x47f)](_0x3f0add[_0x1c00e0(0x1f6)](__dirname,_0x1c00e0(0x390)),'utf8')[_0x1c00e0(0x4e5)](),_0x51fca9=_0x4b30c6[_0x1c00e0(0x451)](_0x544193)[_0x1c00e0(0x1b6)]({'type':_0x1c00e0(0x32f),'format':_0x1c00e0(0x494)}),_0x1e06f1=_0x4b30c6[_0x1c00e0(0x1c8)](_0x1c00e0(0x53d))['update'](_0x51fca9)[_0x1c00e0(0x155)](_0x1c00e0(0x1ce))[_0x1c00e0(0x467)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x544193,'PUB_FINGERPRINT':_0x1e06f1},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x313a33=_0x457462;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x13a248=require$$0$1,{OKDBError:_0x3b5bb9}=requireOkdbError(),{EVENTS:_0x1d7ee0}=requireOkdbEnums(),_0x542dda=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1a7541,LICENSE_TYPE_INTERNAL:_0x5bf23e,OPEN_LICENSE_MAX_DURATION_MS:_0x22dc9d}=_0x542dda,_0x670e91=requireOkdbPubkey(),_0x33040b={'LICENSED_BUILD':_0x313a33(0x59e),'PUBLIC_KEY_PEM':_0x670e91[_0x313a33(0x26e)],'PUB_FINGERPRINT':_0x670e91[_0x313a33(0x17e)],'LICENSE_EXPIRED_ACTION':_0x313a33(0x337)},_0x20988b=_0x313a33(0x228),_0x5cfee2={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x3993d0(_0x2bd323){const _0x378324=_0x313a33;!_0x2bd323['hasType'](_0x20988b)&&await _0x2bd323[_0x378324(0x52e)](_0x20988b);}class _0x515605{constructor(_0x4a48ff){const _0x511884=_0x313a33;this['okdb']=_0x4a48ff,this[_0x511884(0x177)]=null;}async[_0x313a33(0x303)](){const _0x165c3d=_0x313a33,_0x3268aa=this[_0x165c3d(0x57c)]['_systemEnv'];if(!_0x3268aa||!_0x3268aa[_0x165c3d(0x5b0)](_0x20988b)){this[_0x165c3d(0x177)]=null;return;}const _0xc54d16=this['okdb']['id'];let _0x5db929=null;for(const {key:_0x1baed6,value:_0x1af7cf}of _0x3268aa[_0x165c3d(0x180)](_0x20988b)){const _0x2b3565=this['_computeStatus'](_0x1af7cf,_0xc54d16);_0x2b3565===_0x165c3d(0x4a2)&&!_0x5db929&&(_0x5db929={..._0x1af7cf,'id':_0x1baed6,'status':_0x2b3565});}this['_active']=_0x5db929;if(this[_0x165c3d(0x177)]&&this[_0x165c3d(0x177)][_0x165c3d(0x1c4)]===_0x1a7541){const _0x216ee1=Math[_0x165c3d(0x4e3)]((this[_0x165c3d(0x177)][_0x165c3d(0x304)]-Date[_0x165c3d(0x4b1)]())/0x5265c00);this['okdb']['log']?.['warn'](_0x165c3d(0x496)+_0x216ee1+'\x20day(s).',{'feature':_0x165c3d(0x224),'licensee':this[_0x165c3d(0x177)][_0x165c3d(0x4f8)],'expiresAt':new Date(this[_0x165c3d(0x177)][_0x165c3d(0x304)])[_0x165c3d(0x1e5)]()});}this[_0x165c3d(0x177)]&&this['_active'][_0x165c3d(0x1c4)]===_0x5bf23e&&this['okdb']['log']?.[_0x165c3d(0x1f0)](_0x165c3d(0x436),{'feature':_0x165c3d(0x224),'licensee':this[_0x165c3d(0x177)][_0x165c3d(0x4f8)]});}[_0x313a33(0x3e9)](_0x54522c,_0x4a7404){const _0x233d27=_0x313a33;if(!_0x54522c[_0x233d27(0x359)])return _0x233d27(0x37f);let _0x581b5b;try{_0x581b5b=_0x542dda[_0x233d27(0x5cc)](_0x54522c[_0x233d27(0x359)]);}catch(_0x3ea660){return _0x233d27(0x37f);}try{const _0x90ffc3=_0x13a248[_0x233d27(0x5b6)](null,_0x581b5b['payload'],_0x33040b['PUBLIC_KEY_PEM'],_0x581b5b['sig']);if(!_0x90ffc3)return'invalid';}catch(_0x26f276){return _0x233d27(0x37f);}if(_0x581b5b[_0x233d27(0x2b1)][_0x233d27(0x1c4)]===_0x5bf23e)return _0x233d27(0x4a2);if(_0x581b5b['decoded'][_0x233d27(0x304)]<=Date['now']())return'expired';if(_0x581b5b[_0x233d27(0x2b1)]['licenseType']===_0x1a7541)return _0x233d27(0x4a2);if(!_0x54522c['activation'])return _0x233d27(0x2df);const _0x5dc23c=_0x542dda[_0x233d27(0x3d2)]({'tokenString':_0x54522c[_0x233d27(0x18a)],'nodeId':_0x4a7404,'rawBlobBuf':_0x581b5b[_0x233d27(0x346)],'pubKeyPem':_0x33040b[_0x233d27(0x26e)],'pubFingerprint':_0x33040b[_0x233d27(0x17e)]});if(_0x5dc23c[_0x233d27(0x443)]===_0x233d27(0x38b)||_0x5dc23c[_0x233d27(0x443)]===_0x233d27(0x459))return _0x233d27(0x52b);if(_0x5dc23c[_0x233d27(0x443)]===_0x233d27(0x5ed))return _0x233d27(0x31a);if(!_0x5dc23c[_0x233d27(0x1d3)])return _0x233d27(0x52b);return _0x233d27(0x4a2);}get[_0x313a33(0x4a2)](){return this['_active'];}get['effective'](){const _0x46e5a1=_0x313a33;return this[_0x46e5a1(0x177)]??_0x5cfee2;}[_0x313a33(0x270)](_0x49729d){const _0x343cf3=_0x313a33;if(_0x33040b[_0x343cf3(0x3f7)]!=='true')return;const _0xda4a6d=this[_0x343cf3(0x249)];if(!_0xda4a6d[_0x343cf3(0x308)]?.[_0x49729d]){const _0x26e049=_0xda4a6d['_isFree']?_0x343cf3(0x5f9)+_0x49729d+_0x343cf3(0x461)+_0x49729d+_0x343cf3(0x25f):_0x343cf3(0x1ae)+_0x49729d+_0x343cf3(0x5a7)+_0x49729d+'\x22.';throw new _0x3b5bb9(_0x26e049,_0x343cf3(0x18b),{'feature':_0x49729d});}}[_0x313a33(0x415)](_0x20b8a7){const _0x374376=_0x313a33;if(_0x33040b[_0x374376(0x3f7)]!==_0x374376(0x59e))return!![];return!!this[_0x374376(0x249)][_0x374376(0x308)]?.[_0x20b8a7];}[_0x313a33(0x2ca)](_0x415a6a){const _0x392f68=_0x313a33;if(_0x33040b[_0x392f68(0x3f7)]!==_0x392f68(0x59e))return![];const _0xcd3625=this['effective'][_0x392f68(0x48f)]?.[_0x415a6a];return!(_0xcd3625===null||_0xcd3625===undefined||_0xcd3625===0x0);}[_0x313a33(0x39a)](_0xb36ef0,_0x5b8604){const _0x2a9137=_0x313a33;if(_0x33040b[_0x2a9137(0x3f7)]!=='true')return;const _0x491b8d=this[_0x2a9137(0x249)],_0x9a68a6=_0x491b8d[_0x2a9137(0x48f)]?.[_0xb36ef0];if(_0x9a68a6===null||_0x9a68a6===undefined||_0x9a68a6===0x0)return;if(_0x5b8604>=_0x9a68a6)throw new _0x3b5bb9(_0x2a9137(0x225)+_0xb36ef0+'\x20('+_0x5b8604+'/'+_0x9a68a6+')',_0x2a9137(0x2b4),{'limit':_0xb36ef0,'current':_0x5b8604,'max':_0x9a68a6});}async['addLicense'](_0x158f92){const _0x4d843f=_0x313a33;let _0x398a16;try{_0x398a16=_0x542dda['decodeLicenseBlob'](_0x158f92);}catch(_0x1c877f){throw new _0x3b5bb9(_0x4d843f(0x51c)+_0x1c877f[_0x4d843f(0x154)],_0x4d843f(0x3ef));}let _0x2695d1;try{_0x2695d1=_0x13a248['verify'](null,_0x398a16['payload'],_0x33040b[_0x4d843f(0x26e)],_0x398a16[_0x4d843f(0x273)]);}catch(_0x687f89){throw new _0x3b5bb9('License\x20signature\x20invalid:\x20'+_0x687f89[_0x4d843f(0x154)],_0x4d843f(0x3ef));}if(!_0x2695d1)throw new _0x3b5bb9(_0x4d843f(0x552)+(_0x4d843f(0x212)+_0x33040b[_0x4d843f(0x17e)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x4d843f(0x3ef),{'expectedFingerprint':_0x33040b['PUB_FINGERPRINT']});if(_0x398a16[_0x4d843f(0x2b1)][_0x4d843f(0x1c4)]===_0x1a7541){const _0x3784a6=_0x398a16[_0x4d843f(0x2b1)]['expiresAt']-_0x398a16[_0x4d843f(0x2b1)][_0x4d843f(0x4ca)];if(_0x3784a6>_0x22dc9d)throw new _0x3b5bb9('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x4d843f(0x4e3)](_0x3784a6/(0x1e*0x5265c00))+_0x4d843f(0x468),_0x4d843f(0x3ef));}const _0x131352=this['okdb'][_0x4d843f(0x466)];await _0x3993d0(_0x131352);const _0x210b8d=_0x542dda[_0x4d843f(0x3a1)](_0x398a16[_0x4d843f(0x346)])[_0x4d843f(0x4d7)](_0x4d843f(0x1ce));for(const {key:_0x2a038e,value:_0x26bb81}of _0x131352[_0x4d843f(0x180)](_0x20988b)){if(_0x26bb81[_0x4d843f(0x2b9)]===_0x210b8d)throw new _0x3b5bb9(_0x4d843f(0x51e),'LICENSE_ALREADY_STORED',{'id':_0x2a038e});}const _0x3d80a2=_0x13a248[_0x4d843f(0x429)](),_0x4daeff={'blob':_0x158f92,'activation':null,'addedAt':Date[_0x4d843f(0x4b1)](),'_licenseHash':_0x210b8d,'licensee':_0x398a16[_0x4d843f(0x2b1)][_0x4d843f(0x4f8)],'expiresAt':_0x398a16[_0x4d843f(0x2b1)][_0x4d843f(0x304)],'features':_0x398a16['decoded'][_0x4d843f(0x308)],'limits':_0x398a16['decoded']['limits'],'licenseType':_0x398a16[_0x4d843f(0x2b1)]['licenseType']};return await _0x131352[_0x4d843f(0x491)](_0x20988b,_0x3d80a2,_0x4daeff),{'id':_0x3d80a2,..._0x4daeff};}async[_0x313a33(0x1c9)](_0x4f0023){const _0x92c9e=_0x313a33;let _0x1a69ca;try{_0x1a69ca=_0x542dda['decodeActivationToken'](_0x4f0023);}catch(_0x176448){throw new _0x3b5bb9(_0x92c9e(0x57f)+_0x176448[_0x92c9e(0x154)],_0x92c9e(0x271));}const _0x26b462=_0x1a69ca[_0x92c9e(0x3a1)][_0x92c9e(0x4d7)]('hex'),_0xc3197d=this['okdb']['_systemEnv'];if(!_0xc3197d||!_0xc3197d['hasType'](_0x20988b))throw new _0x3b5bb9(_0x92c9e(0x2f5),_0x92c9e(0x271));let _0x2c609b=null,_0x363f68=null;for(const {key:_0x43535e,value:_0x55d60e}of _0xc3197d[_0x92c9e(0x180)](_0x20988b)){if(_0x55d60e[_0x92c9e(0x2b9)]===_0x26b462){_0x2c609b=_0x43535e,_0x363f68=_0x55d60e;break;}}if(!_0x2c609b)throw new _0x3b5bb9('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x92c9e(0x271));const {rawBuf:_0x2f2f4e}=_0x542dda[_0x92c9e(0x5cc)](_0x363f68[_0x92c9e(0x359)]),_0x57b13a=_0x542dda[_0x92c9e(0x3d2)]({'tokenString':_0x4f0023,'nodeId':this[_0x92c9e(0x57c)]['id'],'rawBlobBuf':_0x2f2f4e,'pubKeyPem':_0x33040b['PUBLIC_KEY_PEM'],'pubFingerprint':_0x33040b[_0x92c9e(0x17e)]});if(!_0x57b13a[_0x92c9e(0x1d3)])throw new _0x3b5bb9('Activation\x20invalid:\x20'+_0x57b13a[_0x92c9e(0x443)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x57b13a[_0x92c9e(0x443)]});const _0x141ca2={..._0x363f68,'activation':_0x4f0023};return await _0xc3197d[_0x92c9e(0x16c)](_0x20988b,_0x2c609b,_0x141ca2),{'id':_0x2c609b,..._0x141ca2};}async[_0x313a33(0x522)](_0x497f1a){const _0xf092e2=_0x313a33,_0x25d0d8=this[_0xf092e2(0x57c)]['_systemEnv'];if(!_0x25d0d8||!_0x25d0d8[_0xf092e2(0x5b0)](_0x20988b))return;await _0x25d0d8[_0xf092e2(0x492)](_0x20988b,_0x497f1a);}async[_0x313a33(0x5ce)](){const _0x3aac24=_0x313a33,_0x470843=this[_0x3aac24(0x57c)][_0x3aac24(0x466)];if(!_0x470843||!_0x470843[_0x3aac24(0x5b0)](_0x20988b))return[];const _0x4c12b5=this[_0x3aac24(0x57c)]['id'],_0x354c6f=[];for(const {key:_0x95c598,value:_0x5b8a9d}of _0x470843[_0x3aac24(0x180)](_0x20988b)){const _0x3fff66=this[_0x3aac24(0x3e9)](_0x5b8a9d,_0x4c12b5);_0x354c6f[_0x3aac24(0x437)]({..._0x5b8a9d,'id':_0x95c598,'status':_0x3fff66});}return _0x354c6f;}['getPins'](){const _0x48e0ff=_0x313a33,_0x428221=this[_0x48e0ff(0x57c)][_0x48e0ff(0x466)];if(!_0x428221||!_0x428221['hasType'](_0x20988b))return[];const _0x192804=this['okdb']['id'],_0x4dd090=[];for(const {key:_0x1fc022,value:_0x4e10a3}of _0x428221[_0x48e0ff(0x180)](_0x20988b)){if(_0x4e10a3[_0x48e0ff(0x2b9)]){if(_0x4e10a3[_0x48e0ff(0x1c4)]===_0x1a7541)_0x4dd090[_0x48e0ff(0x437)]({'licenseId':_0x1fc022,'pin':null});else{const _0x6d1d00=Buffer['from'](_0x4e10a3['_licenseHash'],_0x48e0ff(0x1ce)),{pin:_0xf14439}=_0x542dda['derivePin'](_0x192804,_0x6d1d00,_0x33040b[_0x48e0ff(0x17e)]);_0x4dd090['push']({'licenseId':_0x1fc022,'pin':_0xf14439});}}}return _0x4dd090;}async[_0x313a33(0x60c)](){const _0x14a93d=_0x313a33,_0x26a32d=this['_active'];await this['reload']();if(this['_active']&&this['_active'][_0x14a93d(0x1c4)]===_0x1a7541){const _0x803163=Math[_0x14a93d(0x4e3)]((this[_0x14a93d(0x177)][_0x14a93d(0x304)]-Date[_0x14a93d(0x4b1)]())/0x5265c00);this['okdb'][_0x14a93d(0x337)]?.[_0x14a93d(0x1f0)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x803163+_0x14a93d(0x266),{'feature':_0x14a93d(0x224),'licensee':this[_0x14a93d(0x177)][_0x14a93d(0x4f8)],'expiresAt':new Date(this[_0x14a93d(0x177)][_0x14a93d(0x304)])[_0x14a93d(0x1e5)]()});}this[_0x14a93d(0x177)]&&this[_0x14a93d(0x177)]['licenseType']===_0x5bf23e&&this[_0x14a93d(0x57c)][_0x14a93d(0x337)]?.['warn'](_0x14a93d(0x436),{'feature':_0x14a93d(0x224),'licensee':this[_0x14a93d(0x177)][_0x14a93d(0x4f8)]});if(_0x26a32d&&!this[_0x14a93d(0x177)]){this['okdb']['log']?.['warn'](_0x14a93d(0x14a),{'feature':_0x14a93d(0x224)}),this[_0x14a93d(0x57c)]['events']?.[_0x14a93d(0x3dc)](_0x1d7ee0['LICENSE_INVALID'],{'previous':_0x26a32d});const _0x454629=this[_0x14a93d(0x57c)][_0x14a93d(0x421)]?.['onLicenseExpired']??_0x33040b[_0x14a93d(0x5ab)];_0x454629===_0x14a93d(0x5a6)&&(this['okdb']['log']?.['error'](_0x14a93d(0x19a),{'feature':_0x14a93d(0x224)}),this[_0x14a93d(0x57c)][_0x14a93d(0x5b3)]()['catch'](()=>{})[_0x14a93d(0x366)](()=>process[_0x14a93d(0x2be)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x515605,'_C':_0x33040b,'FREE_TIER':_0x5cfee2},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x5d3e94=_0x457462;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x31c374=require$$0$3,_0xb46e57=require$$1$1,_0x4600ab=require$$0,_0x51b577=require$$1,_0x5e77df=_0x51b577[_0x5d3e94(0x1f6)](_0x4600ab['homedir'](),_0x5d3e94(0x18f)),_0x123a7e=0x3e8,_0x201e12={'reset':_0x5d3e94(0x21b),'bold':_0x5d3e94(0x563),'dim':_0x5d3e94(0x519),'red':_0x5d3e94(0x480),'green':_0x5d3e94(0x4b0),'yellow':_0x5d3e94(0x29d),'blue':_0x5d3e94(0x197),'magenta':_0x5d3e94(0x3e2),'cyan':_0x5d3e94(0x54e),'white':_0x5d3e94(0x52c),'gray':_0x5d3e94(0x1e8)},_0x305204=!process['stdout'][_0x5d3e94(0x302)]||!!process.env.NO_COLOR,_0xb79df3=(_0x1af0ae,_0x516041)=>_0x305204?_0x516041:''+_0x1af0ae+_0x516041+_0x201e12['reset'],_0x16a513={'error':_0x201e12[_0x5d3e94(0x2a1)],'warn':_0x201e12[_0x5d3e94(0x43a)],'info':_0x201e12[_0x5d3e94(0x339)],'debug':_0x201e12['gray']},_0x5486ae={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x18fd06(_0x25283a,_0x55d1df=_0x5d3e94(0x219)){const _0x52ea9b=_0x5d3e94,{level:_0x3a99db,msg:_0x4b0642,meta:_0x4075d1,context:_0x3b5adb,ts:_0xcd8286}=_0x25283a;if((_0x5486ae[_0x3a99db]??0x1)<(_0x5486ae[_0x55d1df]??0x1))return;const _0x551f3d=_0xb79df3(_0x201e12[_0x52ea9b(0x44c)],new Date(_0xcd8286)[_0x52ea9b(0x1e5)]()),_0x17904e=_0xb79df3(_0x16a513[_0x3a99db]??_0x201e12[_0x52ea9b(0x17d)],_0x3a99db['padEnd'](0x5));let _0x3e97cf='\x20\x20'+_0x551f3d+'\x20'+_0xb79df3(_0x201e12[_0x52ea9b(0x4c7)],_0x17904e)+'\x20'+_0x4b0642;if(_0x4075d1&&Object[_0x52ea9b(0x17a)](_0x4075d1)[_0x52ea9b(0x3bf)]>0x0){const _0x1892f8=Object['entries'](_0x4075d1)[_0x52ea9b(0x3b9)](([_0x4b8e45,_0x258ef2])=>_0x4b8e45+'='+_0x258ef2)['join']('\x20');_0x3e97cf+=_0xb79df3(_0x201e12[_0x52ea9b(0x3af)],_0x52ea9b(0x531)+_0x1892f8+']');}if(_0x3b5adb!==undefined){const _0x3e388b=typeof _0x3b5adb===_0x52ea9b(0x3aa)?JSON[_0x52ea9b(0x36e)](_0x3b5adb):String(_0x3b5adb);_0x3e97cf+=_0xb79df3(_0x201e12[_0x52ea9b(0x3af)],'\x20\x20'+_0x3e388b);}const _0x5cf023=_0x3a99db===_0x52ea9b(0x1db)||_0x3a99db===_0x52ea9b(0x1f0)?process[_0x52ea9b(0x595)]['write'][_0x52ea9b(0x569)](process['stderr']):process[_0x52ea9b(0x4ff)][_0x52ea9b(0x2cf)]['bind'](process[_0x52ea9b(0x4ff)]);_0x5cf023(_0x3e97cf+'\x0a');}function _0x90c36f(_0x41008b,_0x50235e){const _0x4f90f6=_0x5d3e94;if(_0x41008b===0xcc||_0x41008b>=0xc8&&_0x41008b<0x12c&&!_0x50235e){console[_0x4f90f6(0x337)](_0x4f90f6(0x17b)+_0xb79df3(_0x201e12[_0x4f90f6(0x1a6)],'✓')+'\x0a');return;}if(_0x41008b>=0x190||_0x50235e?.['error']){const _0x100a3b=_0x50235e?.['error']??_0x50235e?.[_0x4f90f6(0x154)]??'HTTP\x20'+_0x41008b;console[_0x4f90f6(0x337)](_0x4f90f6(0x17b)+_0xb79df3(_0x201e12['red'],'✗')+'\x20'+_0xb79df3(_0x201e12[_0x4f90f6(0x4c7)]+_0x201e12['red'],String(_0x41008b))+'\x20\x20'+_0x100a3b+'\x0a');return;}const _0x24e6d9=Object['prototype'][_0x4f90f6(0x4ba)]['call'](_0x50235e??{},_0x4f90f6(0x53e))?_0x50235e[_0x4f90f6(0x53e)]:_0x50235e,_0xa90053=_0x50235e?.['meta'];console[_0x4f90f6(0x337)](''),_0x81c686(_0x24e6d9,'\x20\x20');if(_0xa90053?.[_0x4f90f6(0x420)]!=null||_0xa90053?.[_0x4f90f6(0x440)]!=null){const _0x396aa8=[];if(_0xa90053['count']!=null)_0x396aa8[_0x4f90f6(0x437)](_0xa90053['count']+_0x4f90f6(0x13c)+(_0xa90053[_0x4f90f6(0x420)]!==0x1?'s':''));if(_0xa90053[_0x4f90f6(0x440)]!=null)_0x396aa8[_0x4f90f6(0x437)](_0xa90053[_0x4f90f6(0x440)]+'ms');console[_0x4f90f6(0x337)](_0x4f90f6(0x17b)+_0xb79df3(_0x201e12[_0x4f90f6(0x3af)],_0x396aa8[_0x4f90f6(0x1f6)]('\x20\x20·\x20\x20')));}console['log']('');}function _0x81c686(_0x37c2e0,_0x17ca88=''){const _0x281552=_0x5d3e94;if(_0x37c2e0===null||_0x37c2e0===undefined){console[_0x281552(0x337)](_0x17ca88+_0xb79df3(_0x201e12[_0x281552(0x3af)],_0x281552(0x336)));return;}if(Array['isArray'](_0x37c2e0)){if(_0x37c2e0[_0x281552(0x3bf)]===0x0){console['log'](_0x17ca88+_0xb79df3(_0x201e12['dim'],'(empty)'));return;}if(_0x37c2e0[_0x281552(0x2e9)](_0x10720c=>_0x10720c&&typeof _0x10720c===_0x281552(0x3aa)&&_0x281552(0x2ac)in _0x10720c&&_0x281552(0x43e)in _0x10720c)){_0x38e4ad(_0x37c2e0,_0x17ca88);return;}if(_0x37c2e0[_0x281552(0x2e9)](_0x15e206=>_0x15e206&&typeof _0x15e206===_0x281552(0x3aa)&&'type'in _0x15e206&&_0x281552(0x420)in _0x15e206)){_0x3823e7(_0x37c2e0,_0x17ca88);return;}if(_0x37c2e0[_0x281552(0x2e9)](_0x1e063b=>typeof _0x1e063b!==_0x281552(0x3aa)||_0x1e063b===null)){_0x37c2e0['forEach']((_0xaf27ba,_0xba79b)=>console[_0x281552(0x337)](_0x17ca88+_0xb79df3(_0x201e12[_0x281552(0x44c)],_0xba79b+0x1+'.')+'\x20'+_0xb79df3(_0x201e12[_0x281552(0x17d)],String(_0xaf27ba))));return;}_0x37c2e0[_0x281552(0x1a8)]((_0x1452b4,_0x1a01cc)=>{const _0x14ac70=_0x281552;console[_0x14ac70(0x337)](_0x17ca88+_0xb79df3(_0x201e12[_0x14ac70(0x3af)],'['+_0x1a01cc+']'));if(typeof _0x1452b4===_0x14ac70(0x3aa)&&_0x1452b4!==null)_0x5485e0(_0x1452b4,_0x17ca88+'\x20\x20');else console[_0x14ac70(0x337)](_0x17ca88+'\x20\x20'+String(_0x1452b4));});return;}if(typeof _0x37c2e0===_0x281552(0x3aa)){if(_0x281552(0x2ac)in _0x37c2e0&&_0x281552(0x43e)in _0x37c2e0&&Object[_0x281552(0x17a)](_0x37c2e0)[_0x281552(0x3bf)]<=0x3){console[_0x281552(0x337)](_0x17ca88+_0xb79df3(_0x201e12['bold']+_0x201e12['cyan'],String(_0x37c2e0[_0x281552(0x2ac)])));const _0x2cc17d=_0x37c2e0[_0x281552(0x43e)];if(_0x2cc17d&&typeof _0x2cc17d===_0x281552(0x3aa))_0x5485e0(_0x2cc17d,_0x17ca88);else console['log'](_0x17ca88+_0xb79df3(_0x201e12[_0x281552(0x17d)],String(_0x2cc17d)));return;}_0x5485e0(_0x37c2e0,_0x17ca88);return;}console[_0x281552(0x337)](_0x17ca88+_0xb79df3(_0x201e12[_0x281552(0x17d)],String(_0x37c2e0)));}function _0x5485e0(_0x86695f,_0x147372=''){const _0x4c2d2b=_0x5d3e94,_0x345445=Object['entries'](_0x86695f);if(_0x345445[_0x4c2d2b(0x3bf)]===0x0){console[_0x4c2d2b(0x337)](_0x147372+_0xb79df3(_0x201e12[_0x4c2d2b(0x3af)],'{}'));return;}const _0x2eb76c=Math[_0x4c2d2b(0x41f)](0x1c,Math[_0x4c2d2b(0x142)](..._0x345445['map'](([_0x230f52])=>_0x230f52[_0x4c2d2b(0x3bf)])));for(const [_0x2c4a23,_0x298a53]of _0x345445){const _0x36d4f4=_0xb79df3(_0x201e12['cyan'],_0x2c4a23['padEnd'](_0x2eb76c));if(_0x298a53===null||_0x298a53===undefined)console[_0x4c2d2b(0x337)](_0x147372+_0x36d4f4+'\x20\x20'+_0xb79df3(_0x201e12['dim'],'null'));else{if(typeof _0x298a53===_0x4c2d2b(0x3aa)){const _0x56e1=JSON[_0x4c2d2b(0x36e)](_0x298a53);_0x56e1[_0x4c2d2b(0x3bf)]<=0x50?console[_0x4c2d2b(0x337)](_0x147372+_0x36d4f4+'\x20\x20'+_0xb79df3(_0x201e12['dim'],_0x56e1)):(console[_0x4c2d2b(0x337)](_0x147372+_0x36d4f4),_0x81c686(_0x298a53,_0x147372+'\x20\x20'));}else{const _0x31a4b4=typeof _0x298a53===_0x4c2d2b(0x2b6)?_0xb79df3(_0x298a53?_0x201e12[_0x4c2d2b(0x1a6)]:_0x201e12[_0x4c2d2b(0x43a)],String(_0x298a53)):typeof _0x298a53===_0x4c2d2b(0x5e4)?_0xb79df3(_0x201e12[_0x4c2d2b(0x21c)],String(_0x298a53)):_0xb79df3(_0x201e12[_0x4c2d2b(0x17d)],String(_0x298a53));console[_0x4c2d2b(0x337)](_0x147372+_0x36d4f4+'\x20\x20'+_0x31a4b4);}}}}function _0x38e4ad(_0x59f13b,_0x332504=''){const _0x29a1e6=_0x5d3e94,_0xb877fe=Math[_0x29a1e6(0x41f)](0x20,Math[_0x29a1e6(0x142)](..._0x59f13b[_0x29a1e6(0x3b9)](_0x402739=>String(_0x402739['key'])[_0x29a1e6(0x3bf)])));for(const {key:_0xcb500e,value:_0x244abc,score:_0xee5c67,clock:_0x22bba9}of _0x59f13b){const _0x21cbf5=_0xb79df3(_0x201e12[_0x29a1e6(0x4c7)]+_0x201e12['cyan'],String(_0xcb500e)[_0x29a1e6(0x44d)](_0xb877fe)),_0x48060d=_0x244abc==null?_0xb79df3(_0x201e12[_0x29a1e6(0x3af)],_0x29a1e6(0x543)):typeof _0x244abc===_0x29a1e6(0x3aa)?_0xb79df3(_0x201e12['dim'],JSON[_0x29a1e6(0x36e)](_0x244abc)):_0xb79df3(_0x201e12[_0x29a1e6(0x17d)],String(_0x244abc)),_0x5604f5=_0xee5c67!=null?_0xb79df3(_0x201e12['gray'],_0x29a1e6(0x24b)+_0xee5c67['toFixed'](0x4)):'',_0x2d6efe=_0x22bba9!=null?_0xb79df3(_0x201e12['gray'],'\x20\x20@'+_0x22bba9):'';console['log'](_0x332504+_0x21cbf5+'\x20\x20'+_0x48060d+_0x5604f5+_0x2d6efe);}}function _0x3823e7(_0x1ef07b,_0x1c2de8=''){const _0x12b902=_0x5d3e94,_0x5e0e8b=Math['min'](0x20,Math[_0x12b902(0x142)](..._0x1ef07b[_0x12b902(0x3b9)](_0x29318b=>_0x29318b[_0x12b902(0x2cd)][_0x12b902(0x3bf)])));for(const {type:_0x3d4abe,count:_0x1039c2,fields:_0x1b422e}of _0x1ef07b){if(_0x3d4abe['startsWith']('~'))continue;const _0x11dca7=_0xb79df3(_0x201e12[_0x12b902(0x4c7)]+_0x201e12[_0x12b902(0x339)],_0x3d4abe[_0x12b902(0x44d)](_0x5e0e8b)),_0x19bff7=_0xb79df3(_0x201e12['magenta'],String(_0x1039c2)['padStart'](0x6))+_0xb79df3(_0x201e12['dim'],'\x20records'),_0x31ce7e=_0x1b422e&&Object[_0x12b902(0x17a)](_0x1b422e)[_0x12b902(0x3bf)]?_0xb79df3(_0x201e12[_0x12b902(0x3af)],'\x20\x20·\x20'+Object[_0x12b902(0x17a)](_0x1b422e)[_0x12b902(0x467)](0x0,0x6)[_0x12b902(0x1f6)](',\x20')+(Object['keys'](_0x1b422e)['length']>0x6?'…':'')):'';console[_0x12b902(0x337)](_0x1c2de8+_0x11dca7+'\x20\x20'+_0x19bff7+_0x31ce7e);}}const _0x1c2e5a=['types',_0x5d3e94(0x3a2),'queue/',_0x5d3e94(0x2a3),'transaction',_0x5d3e94(0x26d)];function _0xf5407a(_0x213316,_0x147f9){const _0x2e78fe=_0x5d3e94;if(_0x213316[_0x2e78fe(0x3ca)]('/api/'))return _0x213316;if(_0x213316['startsWith']('/'))return _0x2e78fe(0x298)+_0x213316;if(_0x213316[_0x2e78fe(0x3ca)](_0x2e78fe(0x26a)))return _0x2e78fe(0x5f7)+_0x213316;const _0x30fbde=_0x1c2e5a['some'](_0x38064d=>_0x213316===_0x38064d[_0x2e78fe(0x5c4)](/\/$/,'')||_0x213316[_0x2e78fe(0x3ca)](_0x38064d));return _0x30fbde?_0x2e78fe(0x223)+_0x147f9+'/'+_0x213316:_0x2e78fe(0x5f7)+_0x213316;}function _0x2a1085(_0x3ebc7d){const _0x176491=_0x5d3e94,_0x5cc390={},_0x2a6ab5=[];let _0x1ad748=0x0;while(_0x1ad748<_0x3ebc7d[_0x176491(0x3bf)]){if((_0x3ebc7d[_0x1ad748]===_0x176491(0x1ed)||_0x3ebc7d[_0x1ad748]==='-e')&&_0x3ebc7d[_0x1ad748+0x1]&&!_0x3ebc7d[_0x1ad748+0x1][_0x176491(0x3ca)]('-'))_0x5cc390[_0x176491(0x15f)]=_0x3ebc7d[++_0x1ad748];else _0x3ebc7d[_0x1ad748]===_0x176491(0x584)||_0x3ebc7d[_0x1ad748]==='-h'?_0x5cc390['help']=!![]:_0x2a6ab5[_0x176491(0x437)](_0x3ebc7d[_0x1ad748]);_0x1ad748++;}return{'flags':_0x5cc390,'rest':_0x2a6ab5};}const _0x27ba07={'system':_0x5d3e94(0x5fa),'envs':_0x5d3e94(0x37c),'types':_0x5d3e94(0x4d9),'data':_0x5d3e94(0x45c),'indexes':'Indexes','fts':_0x5d3e94(0x3cb),'sync':_0x5d3e94(0x376),'queue':'Queue','files':_0x5d3e94(0x379),'embeddings':_0x5d3e94(0x275),'engines':_0x5d3e94(0x5bf),'admin':'Admin','event':_0x5d3e94(0x354),'processor':_0x5d3e94(0x407)},_0x312a92=[_0x5d3e94(0x231),_0x5d3e94(0x33c),_0x5d3e94(0x196),_0x5d3e94(0x317),'indexes',_0x5d3e94(0x4ea),_0x5d3e94(0x16d),_0x5d3e94(0x204),_0x5d3e94(0x5c2),_0x5d3e94(0x513),_0x5d3e94(0x599),_0x5d3e94(0x3bc)];function _0x241ddc(_0x45e3a7){const _0x946c51=_0x5d3e94;return _0x45e3a7[_0x946c51(0x5c4)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x946c51(0x229))['replace'](/^\/env\/:env/,_0x946c51(0x1f3))[_0x946c51(0x5c4)](/^\//,'');}function _0xd54d29(_0x118523,_0x41aea9=''){const _0x1a90d4=_0x5d3e94,_0x28890a=_0x118523['http']['listRoutes']()[_0x1a90d4(0x233)](_0x4cd1a0=>!_0x4cd1a0[_0x1a90d4(0x25c)]?.[_0x1a90d4(0x32e)]),_0x2176bc=_0x41aea9?_0x28890a[_0x1a90d4(0x233)](_0x125e9a=>_0x125e9a[_0x1a90d4(0x188)][_0x1a90d4(0x549)]()['includes'](_0x41aea9['toLowerCase']())||(_0x1a9d64(_0x125e9a)??'')['toLowerCase']()[_0x1a90d4(0x4c4)](_0x41aea9['toLowerCase']())||_0x551fd8(_0x125e9a)[_0x1a90d4(0x4c6)](_0x35ce5a=>_0x35ce5a['toLowerCase']()[_0x1a90d4(0x4c4)](_0x41aea9[_0x1a90d4(0x549)]()))):_0x28890a;if(!_0x2176bc['length']){console[_0x1a90d4(0x337)](_0xb79df3(_0x201e12[_0x1a90d4(0x43a)],_0x1a90d4(0x3d7)+_0x41aea9+'\x22\x0a'));return;}const _0x502fe1=new Map();for(const _0xbed26 of _0x2176bc){const _0x15f741=_0x551fd8(_0xbed26)[0x0]??_0x1a90d4(0x4ab);if(!_0x502fe1[_0x1a90d4(0x30f)](_0x15f741))_0x502fe1[_0x1a90d4(0x2dc)](_0x15f741,[]);_0x502fe1['get'](_0x15f741)[_0x1a90d4(0x437)](_0xbed26);}const _0x2225e7=[..._0x312a92['filter'](_0x7af122=>_0x502fe1[_0x1a90d4(0x30f)](_0x7af122)),...[..._0x502fe1[_0x1a90d4(0x17a)]()][_0x1a90d4(0x233)](_0x2cb0e4=>!_0x312a92[_0x1a90d4(0x4c4)](_0x2cb0e4))];console[_0x1a90d4(0x337)]('');for(const _0x280a24 of _0x2225e7){const _0x5d44b3=_0x502fe1[_0x1a90d4(0x3b5)](_0x280a24);if(!_0x5d44b3?.[_0x1a90d4(0x3bf)])continue;console[_0x1a90d4(0x337)](_0xb79df3(_0x201e12[_0x1a90d4(0x4c7)],'\x20\x20'+(_0x27ba07[_0x280a24]??_0x280a24)));for(const _0x3c55e0 of _0x5d44b3){const _0x50a3cf=_0xb79df3(_0x201e12[_0x1a90d4(0x21c)],_0x3c55e0['method'][_0x1a90d4(0x44d)](0x7)),_0x21ed77=_0xb79df3(_0x201e12[_0x1a90d4(0x339)],_0x241ddc(_0x3c55e0[_0x1a90d4(0x188)])),_0x5a1b47=_0x1a9d64(_0x3c55e0)?_0xb79df3(_0x201e12[_0x1a90d4(0x3af)],'\x20\x20'+_0x1a9d64(_0x3c55e0)):'',_0x81f4b1=_0x3c55e0[_0x1a90d4(0x4d3)]?.['id']?_0xb79df3(_0x201e12[_0x1a90d4(0x44c)],_0x1a90d4(0x531)+_0x3c55e0[_0x1a90d4(0x4d3)]['id']+']'):'';console['log'](_0x1a90d4(0x5c1)+_0x50a3cf+'\x20'+_0x21ed77+_0x5a1b47+_0x81f4b1);}console[_0x1a90d4(0x337)]('');}}function _0x47087e(_0x1dc5fd,_0x207ff9){const _0x5a8998=_0x5d3e94,_0x4be87b=_0x207ff9['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x5a8998(0x1f5)]('/')[0x0],_0x253681=_0x1dc5fd[_0x5a8998(0x338)][_0x5a8998(0x416)]()[_0x5a8998(0x233)](_0x462ee9=>_0x462ee9[_0x5a8998(0x188)][_0x5a8998(0x549)]()[_0x5a8998(0x4c4)](_0x4be87b[_0x5a8998(0x549)]()));if(!_0x253681[_0x5a8998(0x3bf)]){console[_0x5a8998(0x337)](_0xb79df3(_0x201e12[_0x5a8998(0x43a)],_0x5a8998(0x58f)+_0x207ff9+'\x0a'));return;}console[_0x5a8998(0x337)]('');for(const _0x512692 of _0x253681['slice'](0x0,0xc)){for(const _0x4bfb96 of _0x245b94(_0x512692)){console[_0x5a8998(0x337)](_0x4bfb96);}console[_0x5a8998(0x337)]('');}}function _0x1a9d64(_0x310a61){const _0x4118d5=_0x5d3e94;return _0x310a61[_0x4118d5(0x4d3)]?.[_0x4118d5(0x296)]??_0x310a61['meta']?.['summary']??'';}function _0x131a9d(_0x30608e){const _0xdfa0bc=_0x5d3e94;return _0x30608e[_0xdfa0bc(0x4d3)]?.[_0xdfa0bc(0x210)]??_0x30608e[_0xdfa0bc(0x25c)]?.[_0xdfa0bc(0x210)]??'';}function _0x551fd8(_0xd711e8){const _0x43fea8=_0x5d3e94;return _0xd711e8[_0x43fea8(0x4d3)]?.[_0x43fea8(0x60e)]?.[_0x43fea8(0x3bf)]?_0xd711e8[_0x43fea8(0x4d3)][_0x43fea8(0x60e)]:_0xd711e8[_0x43fea8(0x25c)]?.[_0x43fea8(0x60e)]??[];}function _0x245b94(_0x1fbd4f){const _0x5eef9e=_0x5d3e94,_0x49fcf3=[];_0x49fcf3[_0x5eef9e(0x437)]('\x20\x20'+_0xb79df3(_0x201e12['bold']+_0x201e12[_0x5eef9e(0x21c)],_0x1fbd4f[_0x5eef9e(0x3c6)][_0x5eef9e(0x44d)](0x7))+'\x20'+_0xb79df3(_0x201e12['bold']+_0x201e12[_0x5eef9e(0x339)],_0x1fbd4f[_0x5eef9e(0x188)]));_0x1fbd4f[_0x5eef9e(0x4d3)]?.['id']&&_0x49fcf3['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb79df3(_0x201e12['gray'],'id:\x20'+_0x1fbd4f[_0x5eef9e(0x4d3)]['id']));_0x1a9d64(_0x1fbd4f)&&_0x49fcf3[_0x5eef9e(0x437)](_0x5eef9e(0x340)+_0xb79df3(_0x201e12[_0x5eef9e(0x17d)],_0x1a9d64(_0x1fbd4f)));_0x131a9d(_0x1fbd4f)&&_0x49fcf3[_0x5eef9e(0x437)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb79df3(_0x201e12[_0x5eef9e(0x3af)],_0x131a9d(_0x1fbd4f)));_0x551fd8(_0x1fbd4f)[_0x5eef9e(0x3bf)]&&_0x49fcf3[_0x5eef9e(0x437)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb79df3(_0x201e12[_0x5eef9e(0x44c)],'tags:\x20'+_0x551fd8(_0x1fbd4f)[_0x5eef9e(0x1f6)](',\x20')));_0x1fbd4f[_0x5eef9e(0x4d3)]?.[_0x5eef9e(0x42c)]?.[_0x5eef9e(0x1bb)]&&_0x49fcf3[_0x5eef9e(0x437)](_0x5eef9e(0x340)+_0xb79df3(_0x201e12['gray'],_0x5eef9e(0x5b1)+_0x1fbd4f[_0x5eef9e(0x4d3)][_0x5eef9e(0x42c)][_0x5eef9e(0x1bb)]));_0x1fbd4f[_0x5eef9e(0x4d3)]?.[_0x5eef9e(0x338)]?.[_0x5eef9e(0x558)]&&_0x1fbd4f[_0x5eef9e(0x4d3)][_0x5eef9e(0x338)][_0x5eef9e(0x558)]!==_0x5eef9e(0x399)&&_0x49fcf3[_0x5eef9e(0x437)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb79df3(_0x201e12[_0x5eef9e(0x44c)],_0x5eef9e(0x38c)+_0x1fbd4f[_0x5eef9e(0x4d3)]['http'][_0x5eef9e(0x558)]));if(_0x1fbd4f[_0x5eef9e(0x4d3)]?.[_0x5eef9e(0x157)]){const _0x5f1b28=Object[_0x5eef9e(0x17a)](_0x1fbd4f[_0x5eef9e(0x4d3)][_0x5eef9e(0x157)][_0x5eef9e(0x49a)]||{});if(_0x5f1b28[_0x5eef9e(0x3bf)])_0x49fcf3[_0x5eef9e(0x437)](_0x5eef9e(0x340)+_0xb79df3(_0x201e12[_0x5eef9e(0x44c)],_0x5eef9e(0x28a)+_0x5f1b28[_0x5eef9e(0x1f6)](',\x20')));}return _0x1fbd4f['meta']?.[_0x5eef9e(0x504)]&&_0x49fcf3['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb79df3(_0x201e12[_0x5eef9e(0x44c)],_0x5eef9e(0x1a2)+JSON[_0x5eef9e(0x36e)](_0x1fbd4f['meta'][_0x5eef9e(0x504)]))),_0x49fcf3;}async function _0x1225fb(_0x3c9c1c,_0x366e23,_0x5d1a3f,_0x1e8b4c=null){const _0x12de5d=_0x5d3e94,_0x5e18f7=_0x5d1a3f[_0x12de5d(0x396)]('?'),_0x3d00f0=_0x5e18f7>=0x0?_0x5d1a3f['slice'](0x0,_0x5e18f7):_0x5d1a3f,_0x21f48d=_0x5e18f7>=0x0?_0x5d1a3f[_0x12de5d(0x467)](_0x5e18f7+0x1):'',_0x1975e8=Object[_0x12de5d(0x3df)](new URLSearchParams(_0x21f48d)[_0x12de5d(0x487)]());return _0x3c9c1c[_0x12de5d(0x338)][_0x12de5d(0x493)](_0x366e23,_0x3d00f0,{'body':_0x1e8b4c,'query':_0x1975e8,'headers':{'content-type':_0x12de5d(0x1c2)}},{'internal':!![]});}function _0x1ecb67(_0x5aec0c){const _0x21d901=_0x5d3e94;if(!_0x5aec0c)return null;const _0x4408ec=_0x5aec0c['trim']();if(!_0x4408ec)return null;try{return JSON['parse'](_0x4408ec);}catch{}try{return JSON[_0x21d901(0x530)](_0x763e4(_0x4408ec));}catch(_0x463b1b){throw new SyntaxError(_0x463b1b['message'],{'cause':_0x463b1b});}}function _0x763e4(_0x5da429){const _0x527c6e=_0x5d3e94;let _0x4e1e97='',_0x580e30=0x0;while(_0x580e30<_0x5da429['length']){const _0x27f4f3=_0x5da429[_0x580e30];if(_0x27f4f3==='\x22'){_0x4e1e97+='\x22',_0x580e30++;while(_0x580e30<_0x5da429[_0x527c6e(0x3bf)]&&_0x5da429[_0x580e30]!=='\x22'){if(_0x5da429[_0x580e30]==='\x5c'){_0x4e1e97+=_0x5da429[_0x580e30++];if(_0x580e30<_0x5da429['length'])_0x4e1e97+=_0x5da429[_0x580e30++];}else _0x4e1e97+=_0x5da429[_0x580e30++];}_0x4e1e97+='\x22';if(_0x580e30<_0x5da429[_0x527c6e(0x3bf)])_0x580e30++;continue;}if(_0x27f4f3==='\x27'){_0x4e1e97+='\x22',_0x580e30++;while(_0x580e30<_0x5da429['length']&&_0x5da429[_0x580e30]!=='\x27'){if(_0x5da429[_0x580e30]==='\x5c'&&_0x5da429[_0x580e30+0x1]==='\x27')_0x4e1e97+='\x27',_0x580e30+=0x2;else _0x5da429[_0x580e30]==='\x22'?(_0x4e1e97+='\x5c\x22',_0x580e30++):_0x4e1e97+=_0x5da429[_0x580e30++];}_0x4e1e97+='\x22';if(_0x580e30<_0x5da429[_0x527c6e(0x3bf)])_0x580e30++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x527c6e(0x4c4)](_0x27f4f3)){_0x4e1e97+=_0x27f4f3,_0x580e30++;continue;}let _0x192d22='';while(_0x580e30<_0x5da429['length']&&!_0x527c6e(0x286)[_0x527c6e(0x4c4)](_0x5da429[_0x580e30])&&_0x5da429[_0x580e30]!=='\x20'&&_0x5da429[_0x580e30]!=='\x09'&&_0x5da429[_0x580e30]!=='\x0a'&&_0x5da429[_0x580e30]!=='\x0d'){_0x192d22+=_0x5da429[_0x580e30++];}let _0xefd183=_0x580e30;while(_0xefd183<_0x5da429[_0x527c6e(0x3bf)]&&(_0x5da429[_0xefd183]==='\x20'||_0x5da429[_0xefd183]==='\x09'))_0xefd183++;if(_0x5da429[_0xefd183]===':')_0x4e1e97+='\x22'+_0x192d22+'\x22';else _0x192d22===_0x527c6e(0x59e)||_0x192d22===_0x527c6e(0x314)||_0x192d22===_0x527c6e(0x543)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x527c6e(0x3e8)](_0x192d22)?_0x4e1e97+=_0x192d22:_0x4e1e97+='\x22'+_0x192d22+'\x22';}return _0x4e1e97['replace'](/,(\s*[}\]])/g,'$1');}function _0x3a1f4e(_0x5cd6cf){const _0xf7a43b=_0x5d3e94,_0x253482=[];let _0x57981b=0x0;while(_0x57981b<_0x5cd6cf['length']){while(_0x57981b<_0x5cd6cf[_0xf7a43b(0x3bf)]&&(_0x5cd6cf[_0x57981b]==='\x20'||_0x5cd6cf[_0x57981b]==='\x09'))_0x57981b++;if(_0x57981b>=_0x5cd6cf[_0xf7a43b(0x3bf)])break;const _0x207272=_0x5cd6cf[_0x57981b];if(_0x207272==='{'||_0x207272==='['){const _0x45602d=_0x207272==='{'?'}':']',_0x4baf7c=_0x57981b++;let _0x2290d8=0x1,_0x495714=![],_0x2d93d3='';while(_0x57981b<_0x5cd6cf[_0xf7a43b(0x3bf)]&&_0x2290d8>0x0){const _0x385801=_0x5cd6cf[_0x57981b];if(_0x495714){if(_0x385801==='\x5c')_0x57981b++;else{if(_0x385801===_0x2d93d3)_0x495714=![];}}else{if(_0x385801==='\x22'||_0x385801==='\x27')_0x495714=!![],_0x2d93d3=_0x385801;else{if(_0x385801===_0x207272)_0x2290d8++;else{if(_0x385801===_0x45602d)_0x2290d8--;}}}_0x57981b++;}_0x253482['push'](_0x5cd6cf[_0xf7a43b(0x467)](_0x4baf7c,_0x57981b));continue;}if(_0x207272==='\x22'||_0x207272==='\x27'){const _0x54d111=_0x207272;_0x57981b++;let _0x22fa76='';while(_0x57981b<_0x5cd6cf[_0xf7a43b(0x3bf)]&&_0x5cd6cf[_0x57981b]!==_0x54d111){if(_0x5cd6cf[_0x57981b]==='\x5c'&&_0x57981b+0x1<_0x5cd6cf[_0xf7a43b(0x3bf)])_0x57981b++,_0x22fa76+=_0x5cd6cf[_0x57981b++];else _0x22fa76+=_0x5cd6cf[_0x57981b++];}if(_0x57981b<_0x5cd6cf['length'])_0x57981b++;_0x253482['push'](_0x22fa76);continue;}let _0x1f4e8f='';while(_0x57981b<_0x5cd6cf[_0xf7a43b(0x3bf)]&&_0x5cd6cf[_0x57981b]!=='\x20'&&_0x5cd6cf[_0x57981b]!=='\x09'&&_0x5cd6cf[_0x57981b]!=='{'&&_0x5cd6cf[_0x57981b]!=='['){_0x1f4e8f+=_0x5cd6cf[_0x57981b++];}if(_0x1f4e8f)_0x253482[_0xf7a43b(0x437)](_0x1f4e8f);}return _0x253482;}function _0x12453d(_0x126800,_0x11df86){const _0x29f1ab=_0x5d3e94,_0x305da2=[..._0x126800[_0x29f1ab(0x580)][_0x29f1ab(0x17a)]()][_0x29f1ab(0x233)](_0x1a4fa9=>!_0x1a4fa9[_0x29f1ab(0x3ca)]('~'));console[_0x29f1ab(0x337)](['',_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)]+_0x201e12[_0x29f1ab(0x339)],'\x20\x20╔═══════════════════════════╗'),_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)]+_0x201e12['cyan'],_0x29f1ab(0x48d))+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],_0x29f1ab(0x387))+_0xb79df3(_0x201e12['bold']+_0x201e12[_0x29f1ab(0x339)],'║'),_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)]+_0x201e12[_0x29f1ab(0x339)],_0x29f1ab(0x360)),'','\x20\x20'+_0xb79df3(_0x201e12['green'],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],_0x29f1ab(0x571))+'\x20\x20http://localhost:'+_0x11df86[_0x29f1ab(0x5eb)],..._0x11df86[_0x29f1ab(0x245)]>0x1?['\x20\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x1a6)],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],_0x29f1ab(0x2b2))+'\x20'+_0x11df86[_0x29f1ab(0x245)]+_0x29f1ab(0x50e)+_0xb79df3(_0x201e12['gray'],_0x29f1ab(0x356))]:[],'\x20\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x1a6)],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],_0x29f1ab(0x150))+'\x20\x20\x20\x20\x20http://localhost:'+_0x11df86[_0x29f1ab(0x5eb)]+'/api','\x20\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x1a6)],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],_0x29f1ab(0x188))+'\x20\x20\x20\x20'+_0x11df86['dbPath'],'\x20\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x1a6)],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],'id')+_0x29f1ab(0x198)+_0xb79df3(_0x201e12[_0x29f1ab(0x44c)],_0x126800['id']),'\x20\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x1a6)],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],'envs')+_0x29f1ab(0x5c1)+_0x305da2['map'](_0x5a1afb=>_0xb79df3(_0x201e12[_0x29f1ab(0x339)],_0x5a1afb))[_0x29f1ab(0x1f6)]('\x20\x20'),..._0x11df86[_0x29f1ab(0x25e)]?[]:['\x20\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x1a6)],'✓')+'\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],'admin')+_0x29f1ab(0x292)+_0x11df86['port']+_0x29f1ab(0x293)],'',_0xb79df3(_0x201e12[_0x29f1ab(0x3af)],_0x29f1ab(0x450)+_0xb79df3(_0x201e12['bold'],_0x29f1ab(0x16a))+_0x29f1ab(0x506)+_0xb79df3(_0x201e12['bold'],_0x29f1ab(0x5b2))+'\x20to\x20browse\x20the\x20API,\x20'+_0xb79df3(_0x201e12[_0x29f1ab(0x4c7)],_0x29f1ab(0x2be))+_0x29f1ab(0x349)),''][_0x29f1ab(0x1f6)]('\x0a'));}function _0x26731f(_0x5a9bad){const _0x4b6d32=_0x5d3e94;console[_0x4b6d32(0x337)]('\x0a'+_0xb79df3(_0x201e12[_0x4b6d32(0x4c7)],'\x20\x20Path\x20access')+'\x20\x20'+_0xb79df3(_0x201e12['dim'],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0x4b6d32(0x2ef)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x2c1))+_0x4b6d32(0x214)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x2c1))+'\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x43a)],_0x4b6d32(0x501))+_0x4b6d32(0x310)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x5f2))+'\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x2c1))+'\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x43a)],_0x4b6d32(0x5ae))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x3af)],_0x4b6d32(0x559))+_0x4b6d32(0x5e9)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],_0x4b6d32(0x219))+_0x4b6d32(0x2b0)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],'envs')+_0x4b6d32(0x424)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],_0x4b6d32(0x196))+_0x4b6d32(0x351)+_0x5a9bad[_0x4b6d32(0x15f)]+_0x4b6d32(0x1ac)+_0xb79df3(_0x201e12['gray'],'type/users')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x5a9bad['env']+_0x4b6d32(0x4b3)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],'type/users/item/alice')+_0x4b6d32(0x31c)+_0x5a9bad[_0x4b6d32(0x15f)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],_0x4b6d32(0x35b))+_0x4b6d32(0x170)+_0x5a9bad[_0x4b6d32(0x15f)]+_0x4b6d32(0x60d)+_0xb79df3(_0x201e12['gray'],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x4b6d32(0x5e9)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],_0x4b6d32(0x39d))+_0x4b6d32(0x5e9)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],_0x4b6d32(0x4f0))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0xb79df3(_0x201e12[_0x4b6d32(0x4c7)],_0x4b6d32(0x509))+'\x20\x20'+_0xb79df3(_0x201e12['dim'],_0x4b6d32(0x4c5))+_0x4b6d32(0x2ef)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x5fb))+_0x4b6d32(0x24d)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x584))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20'+_0xb79df3(_0x201e12['dim'],_0x4b6d32(0x559))+_0x4b6d32(0x5e9)+_0xb79df3(_0x201e12['gray'],_0x4b6d32(0x239))+'\x0a\x20\x20\x20\x20'+_0xb79df3(_0x201e12['gray'],_0x4b6d32(0x573))+_0x4b6d32(0x5e9)+_0xb79df3(_0x201e12[_0x4b6d32(0x44c)],_0x4b6d32(0x572))+'\x0a\x0a'+_0xb79df3(_0x201e12[_0x4b6d32(0x4c7)],'\x20\x20Shell\x20commands')+'\x0a\x0a\x20\x20'+_0xb79df3(_0x201e12['cyan'],_0x4b6d32(0x54d))+_0x4b6d32(0x5c3)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x15f))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],'routes')+'\x20'+_0xb79df3(_0x201e12['dim'],_0x4b6d32(0x333))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x5f5))+'\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x3af)],_0x4b6d32(0x55d))+_0x4b6d32(0x3c5)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x510))+_0x4b6d32(0x1e1)+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x16a))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x4b6d32(0x339)],_0x4b6d32(0x2be))+'\x20'+_0xb79df3(_0x201e12['dim'],_0x4b6d32(0x192))+_0x4b6d32(0x5c7));}let _0x19efed=![];async function _0x3bedf0(_0x1b4d7b,_0x3b2eba=0x0,_0x7db10f=null){const _0x36b7a5=_0x5d3e94;_0x19efed&&(process['stderr']['write'](_0xb79df3(_0x201e12[_0x36b7a5(0x2a1)],'\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a')),process[_0x36b7a5(0x2be)](0x82));_0x19efed=!![],process['stdout'][_0x36b7a5(0x2cf)]('\x0a'),process[_0x36b7a5(0x595)]['write'](_0xb79df3(_0x201e12['yellow'],_0x36b7a5(0x3d5)+(_0x7db10f?_0x36b7a5(0x1d7)+_0x7db10f+',\x20':'')+_0x36b7a5(0x3d6)));const _0x485cba=setTimeout(()=>{const _0xba260f=_0x36b7a5;process[_0xba260f(0x595)][_0xba260f(0x2cf)](_0xb79df3(_0x201e12[_0xba260f(0x2a1)],_0xba260f(0x462))),process[_0xba260f(0x2be)](0x1);},0x1388);try{await _0x1b4d7b[_0x36b7a5(0x5b3)]();}catch(_0x2d4149){console[_0x36b7a5(0x1db)](_0xb79df3(_0x201e12[_0x36b7a5(0x2a1)],'\x20\x20'+_0x2d4149[_0x36b7a5(0x154)]));}clearTimeout(_0x485cba),process['stderr']['write'](_0xb79df3(_0x201e12[_0x36b7a5(0x3af)],_0x36b7a5(0x470))),process[_0x36b7a5(0x2be)](_0x3b2eba);}function _0x5c9c71(_0x27dc95){const _0x1f4286=_0x5d3e94,_0x5a8f93=_0x27dc95[_0x1f4286(0x15f)]!==_0x1f4286(0x2c4)?_0xb79df3(_0x201e12[_0x1f4286(0x43a)],'['+_0x27dc95[_0x1f4286(0x15f)]+']'):'';return _0xb79df3(_0x201e12['bold']+_0x201e12[_0x1f4286(0x339)],_0x1f4286(0x57c))+_0x5a8f93+_0xb79df3(_0x201e12[_0x1f4286(0x44c)],'>\x20');}const _0x206729=new Set([_0x5d3e94(0x41d),_0x5d3e94(0x341),_0x5d3e94(0x551),_0x5d3e94(0x589),'DELETE']);async function _0x3d1136(_0x446f39,_0x4ce378,_0xec1b7,_0x11020a,_0x1d5439,_0x17e19c){const _0x47d933=_0x5d3e94;_0x446f39=_0x446f39['trim']();if(!_0x446f39||_0x446f39[_0x47d933(0x3ca)]('#'))return;const _0x59877b=_0x3a1f4e(_0x446f39),{flags:_0x5005d0,rest:_0x292618}=_0x2a1085(_0x59877b);if(!_0x292618[_0x47d933(0x3bf)])return;const _0x16d1f0=_0x292618[0x0],_0x1688d1=_0x16d1f0['toUpperCase']();if(_0x1688d1===_0x47d933(0x4f7)){if(_0x292618[0x1])_0x47087e(_0x4ce378,_0xf5407a(_0x292618[0x1],_0x5005d0[_0x47d933(0x15f)]??_0x1d5439[_0x47d933(0x15f)]));else _0x26731f(_0x1d5439);return;}if(_0x1688d1===_0x47d933(0x566)){const _0x811bc=_0x292618[0x1];if(!_0x811bc){console[_0x47d933(0x337)](_0xb79df3(_0x201e12['red'],_0x47d933(0x285)));return;}try{_0x4ce378[_0x47d933(0x15f)](_0x811bc),_0x1d5439[_0x47d933(0x15f)]=_0x811bc,_0x17e19c?.[_0x47d933(0x45a)](_0x5c9c71(_0x1d5439)),console[_0x47d933(0x337)](_0x47d933(0x17b)+_0xb79df3(_0x201e12[_0x47d933(0x1a6)],'✓')+_0x47d933(0x193)+_0xb79df3(_0x201e12[_0x47d933(0x4c7)]+_0x201e12[_0x47d933(0x339)],_0x811bc)+'\x0a');}catch{console[_0x47d933(0x337)](_0x47d933(0x17b)+_0xb79df3(_0x201e12[_0x47d933(0x2a1)],'✗')+_0x47d933(0x50a)+_0xb79df3(_0x201e12[_0x47d933(0x4c7)],_0x811bc)+'\x20not\x20found'+_0xb79df3(_0x201e12[_0x47d933(0x3af)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x1688d1===_0x47d933(0x30d)){const _0x3da760=[..._0x4ce378['_envs']['keys']()][_0x47d933(0x233)](_0x5daaf7=>!_0x5daaf7['startsWith']('~'));console['log']('');for(const _0x1477e2 of _0x3da760){const _0x1a42db=_0x1477e2===_0x1d5439['env'];console['log']('\x20\x20'+(_0x1a42db?_0xb79df3(_0x201e12[_0x47d933(0x1a6)],'●'):_0xb79df3(_0x201e12[_0x47d933(0x3af)],'○'))+'\x20\x20'+(_0x1a42db?_0xb79df3(_0x201e12[_0x47d933(0x4c7)]+_0x201e12[_0x47d933(0x339)],_0x1477e2):_0xb79df3(_0x201e12[_0x47d933(0x3af)],_0x1477e2)));}console[_0x47d933(0x337)]('\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x47d933(0x3af)],_0x47d933(0x33e))+'\x20'+_0xb79df3(_0x201e12['cyan'],_0x1d5439[_0x47d933(0x15f)])),console['log']('');return;}if(_0x1688d1===_0x47d933(0x2e7)){const _0x1873b1=[..._0x4ce378[_0x47d933(0x580)][_0x47d933(0x3e1)]()][_0x47d933(0x233)](_0x436ab0=>!_0x436ab0['name'][_0x47d933(0x3ca)]('~'));console[_0x47d933(0x337)]('');const _0x44221c=Math['max'](..._0x1873b1[_0x47d933(0x3b9)](_0x18f8ae=>_0x18f8ae['name'][_0x47d933(0x3bf)]));for(const _0x3fa228 of _0x1873b1){const _0x89a35c=_0x3fa228['name']===_0x1d5439[_0x47d933(0x15f)],_0x49e1e0=_0x89a35c?_0xb79df3(_0x201e12[_0x47d933(0x1a6)],'●'):_0xb79df3(_0x201e12['dim'],'○'),_0x54c339=_0x89a35c?_0xb79df3(_0x201e12[_0x47d933(0x4c7)]+_0x201e12[_0x47d933(0x339)],_0x3fa228[_0x47d933(0x2f3)][_0x47d933(0x44d)](_0x44221c)):_0xb79df3(_0x201e12['dim'],_0x3fa228[_0x47d933(0x2f3)]['padEnd'](_0x44221c)),_0x198c0a=[..._0x3fa228[_0x47d933(0x1a7)]['keys']()]['filter'](_0x46da50=>!_0x46da50[_0x47d933(0x3ca)]('~')),_0x294952=_0x198c0a[_0x47d933(0x3bf)]?_0xb79df3(_0x201e12['dim'],_0x198c0a[_0x47d933(0x467)](0x0,0x5)[_0x47d933(0x1f6)](',\x20')+(_0x198c0a[_0x47d933(0x3bf)]>0x5?'\x20\x20+'+(_0x198c0a['length']-0x5)+'\x20more':'')):_0xb79df3(_0x201e12[_0x47d933(0x3af)],'(no\x20types)');console[_0x47d933(0x337)]('\x20\x20'+_0x49e1e0+'\x20\x20'+_0x54c339+'\x20\x20'+_0x294952);}console[_0x47d933(0x337)]('');return;}if(_0x1688d1===_0x47d933(0x162)){const _0x40ab9e=_0x5005d0[_0x47d933(0x15f)]??_0x292618[0x1]??_0x1d5439['env'];try{const _0x2e34b3=_0x4ce378[_0x47d933(0x15f)](_0x40ab9e),_0x3cbf22=[..._0x2e34b3['typeSubDbs'][_0x47d933(0x17a)]()][_0x47d933(0x233)](_0xde8a76=>!_0xde8a76[_0x47d933(0x3ca)]('~'))['sort']();console[_0x47d933(0x337)](_0x47d933(0x17b)+_0xb79df3(_0x201e12[_0x47d933(0x3af)],_0x3cbf22[_0x47d933(0x3bf)]+_0x47d933(0x23b)+(_0x3cbf22['length']!==0x1?'s':'')+_0x47d933(0x5f1)+_0x40ab9e));for(const _0x4bd354 of _0x3cbf22){const _0x571756=_0x2e34b3['typeSubDbs'][_0x47d933(0x3b5)](_0x4bd354),_0x3a436a=_0x571756?.[_0x47d933(0x317)]?.[_0x47d933(0x365)]?.()??0x0,_0xc4a3a3=_0xb79df3(_0x201e12[_0x47d933(0x4c7)]+_0x201e12[_0x47d933(0x339)],_0x4bd354[_0x47d933(0x44d)](0x1c));console[_0x47d933(0x337)](_0x47d933(0x5c1)+_0xc4a3a3+'\x20\x20'+_0xb79df3(_0x201e12[_0x47d933(0x21c)],String(_0x3a436a)[_0x47d933(0x1cd)](0x6))+'\x20'+_0xb79df3(_0x201e12[_0x47d933(0x3af)],'records'));}console[_0x47d933(0x337)]('');}catch(_0x268216){console['error'](_0xb79df3(_0x201e12[_0x47d933(0x2a1)],_0x47d933(0x17b)+_0x268216[_0x47d933(0x154)]+'\x0a'));}return;}if(_0x1688d1===_0x47d933(0x145)){_0xd54d29(_0x4ce378,_0x292618[_0x47d933(0x467)](0x1)[_0x47d933(0x1f6)]('\x20'));return;}if(_0x1688d1==='LOGS'){const _0x190d9f=(_0x292618[0x1]??'')[_0x47d933(0x549)]();if(!_0x190d9f||_0x190d9f==='on')_0x11020a[_0x47d933(0x431)]=!![],_0x11020a[_0x47d933(0x300)]='info',console['log']('\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x47d933(0x1a6)],'✓')+_0x47d933(0x315)+_0xb79df3(_0x201e12[_0x47d933(0x3af)],_0x47d933(0x35d))+'\x0a');else{if(_0x190d9f===_0x47d933(0x5bb))_0x11020a[_0x47d933(0x431)]=![],console[_0x47d933(0x337)]('\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x47d933(0x43a)],'○')+_0x47d933(0x24c));else _0x5486ae[_0x190d9f]!==undefined?(_0x11020a[_0x47d933(0x431)]=!![],_0x11020a[_0x47d933(0x300)]=_0x190d9f,console[_0x47d933(0x337)](_0x47d933(0x17b)+_0xb79df3(_0x201e12[_0x47d933(0x1a6)],'✓')+_0x47d933(0x4e7)+_0xb79df3(_0x201e12[_0x47d933(0x4c7)],_0x190d9f)+'\x0a')):console[_0x47d933(0x1db)](_0xb79df3(_0x201e12[_0x47d933(0x2a1)],_0x47d933(0x46f)));}return;}if(_0x1688d1===_0x47d933(0x344)||_0x1688d1===_0x47d933(0x561)){await _0x3bedf0(_0x4ce378,0x0);return;}if(_0x1688d1==='OPEN'){const _0x4a2eac='http://localhost:'+_0xec1b7['port']+'/admin/index.html',_0x1fb11a=process[_0x47d933(0x164)]===_0x47d933(0x408)?_0x47d933(0x40e)+_0x4a2eac:process[_0x47d933(0x164)]==='darwin'?_0x47d933(0x24f)+_0x4a2eac:_0x47d933(0x434)+_0x4a2eac;require$$4[_0x47d933(0x33b)](_0x1fb11a),console[_0x47d933(0x337)](_0x47d933(0x17b)+_0xb79df3(_0x201e12[_0x47d933(0x1a6)],'✓')+'\x20opening\x20'+_0xb79df3(_0x201e12[_0x47d933(0x339)],_0x4a2eac)+'\x0a');return;}let _0x308c71,_0x32b79c,_0x5674f2;if(_0x206729['has'](_0x1688d1)){_0x308c71=_0x1688d1,_0x32b79c=_0x292618[0x1],_0x5674f2=_0x292618[_0x47d933(0x467)](0x2);if(!_0x32b79c){console[_0x47d933(0x1db)](_0xb79df3(_0x201e12[_0x47d933(0x2a1)],_0x47d933(0x568)+_0x16d1f0+'\x20<path>\x20[json-body]'));return;}}else _0x308c71=null,_0x32b79c=_0x292618[0x0],_0x5674f2=_0x292618[_0x47d933(0x467)](0x1);const _0x325e2b=_0x5005d0[_0x47d933(0x15f)]??_0x1d5439[_0x47d933(0x15f)],_0x5c09cf=_0xf5407a(_0x32b79c,_0x325e2b);if(_0x5005d0[_0x47d933(0x16a)]){_0x47087e(_0x4ce378,_0x5c09cf);return;}let _0x368a45=null;if(_0x5674f2[_0x47d933(0x3bf)]){const _0x5d11a8=_0x5674f2[_0x47d933(0x1f6)]('\x20');try{_0x368a45=_0x1ecb67(_0x5d11a8);}catch(_0x3e5dbc){console[_0x47d933(0x1db)](_0xb79df3(_0x201e12['red'],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x5d11a8+_0x47d933(0x17b)+_0xb79df3(_0x201e12[_0x47d933(0x3af)],_0x3e5dbc['message'])+'\x0a'));return;}}if(!_0x308c71)_0x308c71=_0x368a45!==null?_0x47d933(0x341):'GET';try{const _0x1824dc=await _0x1225fb(_0x4ce378,_0x308c71,_0x5c09cf,_0x368a45);_0x90c36f(_0x1824dc[_0x47d933(0x281)],_0x1824dc[_0x47d933(0x504)]);}catch(_0x127690){console[_0x47d933(0x1db)]('\x0a\x20\x20'+_0xb79df3(_0x201e12[_0x47d933(0x2a1)],'✗')+'\x20'+_0x127690[_0x47d933(0x154)]+'\x0a');}}class _0x1904cc{constructor(){const _0x50b73a=_0x5d3e94;this['children']=new Map(),this[_0x50b73a(0x5a4)]=null,this[_0x50b73a(0x19b)]=![];}}function _0x3e04f6(_0x293515){const _0x471018=_0x5d3e94,_0x3c0f05=new _0x1904cc();for(const _0x1e7bc0 of _0x293515){if(_0x1e7bc0[_0x471018(0x25c)]?.[_0x471018(0x32e)])continue;const _0x2d3a31=_0x1e7bc0[_0x471018(0x188)][_0x471018(0x5c4)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x471018(0x5c4)](/^\//,'');if(!_0x2d3a31)continue;let _0x3a057e=_0x3c0f05;for(const _0x135a1a of _0x2d3a31[_0x471018(0x1f5)]('/')[_0x471018(0x233)](Boolean)){if(_0x135a1a[_0x471018(0x3ca)](':')){const _0x5cf7f6=_0x135a1a[_0x471018(0x467)](0x1);if(!_0x3a057e[_0x471018(0x5a4)])_0x3a057e[_0x471018(0x5a4)]={'param':_0x5cf7f6,'node':new _0x1904cc()};_0x3a057e=_0x3a057e['dynamic']['node'];}else{if(!_0x3a057e['children'][_0x471018(0x30f)](_0x135a1a))_0x3a057e[_0x471018(0x585)]['set'](_0x135a1a,new _0x1904cc());_0x3a057e=_0x3a057e[_0x471018(0x585)][_0x471018(0x3b5)](_0x135a1a);}}_0x3a057e['terminal']=!![];}return _0x3c0f05;}const _0x5e4d4f=new Map();function _0x3ab378(_0x8a5f5a,_0x3f3d2e,_0x390527){const _0x57f7c1=_0x5d3e94,_0x96b980=_0x5e4d4f[_0x57f7c1(0x3b5)](_0x8a5f5a);if(_0x96b980&&_0x96b980['exp']>Date[_0x57f7c1(0x4b1)]())return _0x96b980['val'];const _0x4fcb1a=_0x390527();return _0x5e4d4f[_0x57f7c1(0x2dc)](_0x8a5f5a,{'val':_0x4fcb1a,'exp':Date[_0x57f7c1(0x4b1)]()+_0x3f3d2e}),_0x4fcb1a;}function _0x33ee30(_0xd49ee6,_0x35671f,_0x4a7541,_0x2e2e07){const _0x377c0f=_0x5d3e94,_0x366985=_0x35671f[_0x377c0f(0x15f)]??_0x2e2e07[_0x377c0f(0x15f)];switch(_0xd49ee6){case _0x377c0f(0x15f):return[..._0x4a7541[_0x377c0f(0x580)][_0x377c0f(0x17a)]()][_0x377c0f(0x233)](_0x499a3e=>!_0x499a3e[_0x377c0f(0x3ca)]('~'));case _0x377c0f(0x2cd):return _0x3ab378(_0x377c0f(0x287)+_0x366985,0x7d0,()=>{const _0x17585d=_0x377c0f;try{return[..._0x4a7541[_0x17585d(0x15f)](_0x366985)['typeSubDbs'][_0x17585d(0x17a)]()][_0x17585d(0x233)](_0xab29e2=>!_0xab29e2[_0x17585d(0x3ca)]('~'));}catch{return[];}});case _0x377c0f(0x2ac):if(!_0x35671f[_0x377c0f(0x2cd)])return[];return _0x3ab378(_0x377c0f(0x465)+_0x366985+':'+_0x35671f[_0x377c0f(0x2cd)],0x5dc,()=>{const _0x133761=_0x377c0f;try{const _0x736071=_0x4a7541[_0x133761(0x15f)](_0x366985)[_0x133761(0x1a7)][_0x133761(0x3b5)](_0x35671f[_0x133761(0x2cd)]);if(!_0x736071?.[_0x133761(0x317)])return[];const _0xd3e5db=[];for(const {key:_0x562bf9}of _0x736071[_0x133761(0x317)][_0x133761(0x180)]({'limit':0x32})){_0xd3e5db['push'](String(_0x562bf9));if(_0xd3e5db['length']>=0x32)break;}return _0xd3e5db;}catch{return[];}});case _0x377c0f(0x53b):if(!_0x35671f[_0x377c0f(0x2cd)])return[];return _0x3ab378('idx:'+_0x366985+':'+_0x35671f[_0x377c0f(0x2cd)],0x7d0,()=>{const _0x240297=_0x377c0f;try{const _0x397f5c=_0x4a7541[_0x240297(0x15f)](_0x366985)[_0x240297(0x1a7)]['get'](_0x35671f[_0x240297(0x2cd)]);return _0x397f5c?[..._0x397f5c[_0x240297(0x538)]?.[_0x240297(0x17a)]()??[]]:[];}catch{return[];}});case _0x377c0f(0x557):if(!_0x35671f[_0x377c0f(0x2cd)])return[];return _0x3ab378(_0x377c0f(0x36c)+_0x366985+':'+_0x35671f[_0x377c0f(0x2cd)],0x7d0,()=>{const _0x457c95=_0x377c0f;try{return _0x4a7541['fts']?.['list']?.(_0x35671f['type'],_0x4a7541[_0x457c95(0x15f)](_0x366985))?.[_0x457c95(0x3b9)](_0x2af39e=>_0x2af39e[_0x457c95(0x2f3)])??[];}catch{return[];}});default:return[];}}function _0x1c73e2(_0x418069,_0x111012,_0x382b93,_0x9924f0){const _0x3cf584=_0x5d3e94,_0x3dc8e9=_0x418069[_0x3cf584(0x2cc)]('/'),_0x9973da=_0x418069[_0x3cf584(0x1f5)]('/'),_0x5719bc=_0x3dc8e9?_0x9973da[_0x3cf584(0x467)](0x0,-0x1):_0x9973da[_0x3cf584(0x467)](0x0,-0x1),_0x428794=_0x3dc8e9?'':_0x9973da[_0x9973da[_0x3cf584(0x3bf)]-0x1];let _0x2f069c=_0x111012;const _0x2e8b84={};for(const _0x5034ac of _0x5719bc){if(!_0x5034ac)continue;if(_0x2f069c[_0x3cf584(0x585)]['has'](_0x5034ac))_0x2f069c=_0x2f069c[_0x3cf584(0x585)]['get'](_0x5034ac);else{if(_0x2f069c[_0x3cf584(0x5a4)])_0x2e8b84[_0x2f069c['dynamic'][_0x3cf584(0x57e)]]=_0x5034ac,_0x2f069c=_0x2f069c[_0x3cf584(0x5a4)][_0x3cf584(0x5e5)];else return[];}}const _0x4a63c4=_0x5719bc[_0x3cf584(0x233)](Boolean),_0x224fa6=_0x4a63c4['length']?_0x4a63c4[_0x3cf584(0x1f6)]('/')+'/':'',_0x272fb1=[];for(const [_0x5e3b49]of _0x2f069c[_0x3cf584(0x585)]){if(_0x5e3b49['startsWith'](_0x428794))_0x272fb1[_0x3cf584(0x437)](_0x224fa6+_0x5e3b49);}if(_0x2f069c[_0x3cf584(0x5a4)])for(const _0xc45573 of _0x33ee30(_0x2f069c[_0x3cf584(0x5a4)][_0x3cf584(0x57e)],_0x2e8b84,_0x382b93,_0x9924f0)){if(String(_0xc45573)[_0x3cf584(0x3ca)](_0x428794))_0x272fb1[_0x3cf584(0x437)](_0x224fa6+_0xc45573);}return _0x272fb1[_0x3cf584(0x467)](0x0,0x64);}const _0xa75ba6=[_0x5d3e94(0x16a),_0x5d3e94(0x44e),'env',_0x5d3e94(0x33c),'types','routes',_0x5d3e94(0x5f5),'open',_0x5d3e94(0x2be),_0x5d3e94(0x183)];function _0x3b3ee6(_0x4ee681,_0x1307df,_0x2d38b6){return function _0x307842(_0xdac9d2){const _0x1ec379=_0x5d69;try{const _0x7f4f53=_0xdac9d2[_0x1ec379(0x1eb)](/\s[{[]/),_0x4e5d98=_0x7f4f53>=0x0?_0xdac9d2['slice'](0x0,_0x7f4f53):_0xdac9d2,_0x5c6a62=_0x4e5d98[_0x1ec379(0x59f)]();if(!_0x5c6a62){const _0x511d93=[..._0xa75ba6,...[..._0x4ee681[_0x1ec379(0x585)][_0x1ec379(0x17a)]()]][_0x1ec379(0x467)](0x0,0x64);return[_0x511d93,''];}const _0x2fe2b5=_0x5c6a62[_0x1ec379(0x1f5)](/\s+/),_0x16bf1e=_0x2fe2b5[0x0],_0x2e4ff2=_0x16bf1e['toUpperCase']();if(_0x2fe2b5[_0x1ec379(0x3bf)]===0x1){const _0x47d173=_0x16bf1e[_0x1ec379(0x549)](),_0x196e65=_0xa75ba6[_0x1ec379(0x233)](_0x6f1cc6=>_0x6f1cc6[_0x1ec379(0x3ca)](_0x47d173)),_0x313dae=_0x1c73e2(_0x16bf1e,_0x4ee681,_0x1307df,_0x2d38b6),_0x55ad97=[...new Set([..._0x196e65,..._0x313dae])][_0x1ec379(0x467)](0x0,0x64);return[_0x55ad97,_0x16bf1e];}if(_0x206729['has'](_0x2e4ff2)&&_0x2fe2b5['length']===0x2){const _0x91afca=_0x2fe2b5[0x1],_0xbc97e2=_0x1c73e2(_0x91afca,_0x4ee681,_0x1307df,_0x2d38b6);return[_0xbc97e2[_0x1ec379(0x3b9)](_0x4e0901=>_0x16bf1e+'\x20'+_0x4e0901),_0x16bf1e+'\x20'+_0x91afca];}if(!_0x206729['has'](_0x2e4ff2)&&_0x2fe2b5[_0x1ec379(0x3bf)]>0x1){const _0x5060f4=_0x1c73e2(_0x16bf1e,_0x4ee681,_0x1307df,_0x2d38b6),_0x941371='\x20'+_0x2fe2b5['slice'](0x1)[_0x1ec379(0x1f6)]('\x20');return[_0x5060f4['map'](_0x429b70=>_0x429b70+_0x941371),_0x16bf1e+_0x941371];}return[[],_0xdac9d2];}catch{return[[],_0xdac9d2];}};}async function _0x49c65a(_0x4c29aa,_0x203427){const _0x20ab39=_0x5d3e94,_0x482445={'enabled':!![],'level':_0x203427[_0x20ab39(0x40c)]??_0x20ab39(0x219)},_0x1c7bc9={'env':_0x20ab39(0x2c4)},_0x2c6d26={'current':null},_0x4a5d7d=_0x3e04f6(_0x4c29aa[_0x20ab39(0x338)][_0x20ab39(0x416)]()),_0xcf47ad=_0x3b3ee6(_0x4a5d7d,_0x4c29aa,_0x1c7bc9);_0x4c29aa[_0x20ab39(0x337)][_0x20ab39(0x3c7)](_0x3f5c21=>{const _0x6610e=_0x20ab39;if(!_0x482445[_0x6610e(0x431)])return;_0x18fd06(_0x3f5c21,_0x482445['level']),_0x2c6d26['current']?.['prompt'](!![]);}),_0x12453d(_0x4c29aa,_0x203427);const _0x5e0552=_0x31c374['createInterface']({'input':process[_0x20ab39(0x240)],'output':process[_0x20ab39(0x4ff)],'terminal':!![],'completer':_0xcf47ad,'prompt':_0x5c9c71(_0x1c7bc9),'historySize':_0x123a7e});try{const _0x41cfc7=_0xb46e57[_0x20ab39(0x47f)](_0x5e77df,_0x20ab39(0x3b1))[_0x20ab39(0x1f5)]('\x0a')[_0x20ab39(0x233)](Boolean);_0x5e0552[_0x20ab39(0x2b5)]=_0x41cfc7[_0x20ab39(0x265)]()[_0x20ab39(0x467)](0x0,_0x123a7e);}catch{}_0x2c6d26['current']=_0x5e0552,_0x5e0552['on'](_0x20ab39(0x1b2),async _0x34942c=>{const _0x3f381f=_0x20ab39;_0x5e0552[_0x3f381f(0x4b2)]();try{await _0x3d1136(_0x34942c,_0x4c29aa,_0x203427,_0x482445,_0x1c7bc9,_0x5e0552);}catch(_0xdd0abc){console[_0x3f381f(0x1db)](_0xb79df3(_0x201e12[_0x3f381f(0x2a1)],'\x20\x20Error:\x20'+_0xdd0abc[_0x3f381f(0x154)]));}finally{_0x5e0552[_0x3f381f(0x26f)](),_0x5e0552['prompt']();}}),_0x5e0552['on'](_0x20ab39(0x5b3),()=>{const _0x24afb5=_0x20ab39;try{const _0x17b94f=[..._0x5e0552[_0x24afb5(0x2b5)]][_0x24afb5(0x265)]()[_0x24afb5(0x233)](Boolean)[_0x24afb5(0x467)](0x0,_0x123a7e);_0xb46e57[_0x24afb5(0x279)](_0x5e77df,_0x17b94f['join']('\x0a')+'\x0a');}catch{}_0x3bedf0(_0x4c29aa,0x0);});let _0xcd838e=0x0;return process['on'](_0x20ab39(0x2f2),()=>{const _0x5d0fa8=_0x20ab39;if(_0x19efed)return _0x3bedf0(_0x4c29aa,0x82,_0x5d0fa8(0x2f2));if(_0x5e0552[_0x5d0fa8(0x1b2)]==='')return _0x3bedf0(_0x4c29aa,0x0,_0x5d0fa8(0x2f2));const _0x537150=Date['now']();if(_0x537150-_0xcd838e<0x5dc)return _0x3bedf0(_0x4c29aa,0x0,_0x5d0fa8(0x2e0));_0xcd838e=_0x537150,process[_0x5d0fa8(0x4ff)][_0x5d0fa8(0x2cf)]('\x0a'),_0x5e0552[_0x5d0fa8(0x593)](0x0),_0x5e0552[_0x5d0fa8(0x13f)](),process['stderr'][_0x5d0fa8(0x2cf)](_0xb79df3(_0x201e12[_0x5d0fa8(0x3af)],_0x5d0fa8(0x5d0)));}),process['on'](_0x20ab39(0x241),()=>_0x3bedf0(_0x4c29aa,0x0,_0x20ab39(0x241))),process['on'](_0x20ab39(0x526),()=>_0x3bedf0(_0x4c29aa,0x0,_0x20ab39(0x526))),_0x5e0552[_0x20ab39(0x13f)](),_0x5e0552;}return okdbShell={'start':_0x49c65a,'colorLog':_0x18fd06,'lenientParse':_0x1ecb67,'_splitLine':_0x3a1f4e,'_formatRouteHelpLines':_0x245b94,'_routeSummary':_0x1a9d64,'_routeTags':_0x551fd8},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2720b9=_0x457462;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2a9b4a,performance:_0x1bbdec}=require$$0$4,_0x380f63=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2720b9(0x59e),_0x518552=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2a6920=process.env.OKDB_LOOP_LAG_ALL==='1',_0x51179e=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x3c6ed5{constructor(){const _0x169b2e=_0x2720b9;this['enabled']=_0x380f63,this[_0x169b2e(0x402)]=new Map(),this['_h']=null,this[_0x169b2e(0x60b)]=null,this[_0x169b2e(0x4e1)]=![],this[_0x169b2e(0x5da)]=(_0x36a6b8,_0xd58323)=>process[_0x169b2e(0x595)]['write'](_0x36a6b8+(_0xd58323?'\x20'+JSON[_0x169b2e(0x36e)](_0xd58323):'')+'\x0a');}['now'](){const _0xd28b09=_0x2720b9;return _0x1bbdec[_0xd28b09(0x4b1)]();}[_0x2720b9(0x1fb)](_0x535ba0){const _0x19c684=_0x2720b9;if(typeof _0x535ba0===_0x19c684(0x3ee))this[_0x19c684(0x5da)]=_0x535ba0;}['note'](_0x430905,_0x4498c7,_0x4b2d05){const _0x4fe506=_0x2720b9;if(!this['enabled'])return;let _0x1b3a28=this['_buckets'][_0x4fe506(0x3b5)](_0x430905);!_0x1b3a28&&(_0x1b3a28={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4fe506(0x402)][_0x4fe506(0x2dc)](_0x430905,_0x1b3a28)),_0x1b3a28['ms']+=_0x4498c7,_0x1b3a28[_0x4fe506(0x420)]+=0x1,_0x4498c7>_0x1b3a28[_0x4fe506(0x605)]&&(_0x1b3a28['maxMs']=_0x4498c7,_0x1b3a28[_0x4fe506(0x3d0)]=_0x4b2d05||'');}[_0x2720b9(0x184)](_0x29b0dc){const _0x2b308a=_0x2720b9;if(!this['enabled']||this[_0x2b308a(0x4e1)])return;this[_0x2b308a(0x4e1)]=!![];if(_0x29b0dc)this['_log']=_0x29b0dc;this['_h']=_0x2a9b4a({'resolution':0xa}),this['_h'][_0x2b308a(0x1a5)](),this['_timer']=setInterval(()=>this[_0x2b308a(0x2c0)](),_0x518552);if(this['_timer']['unref'])this[_0x2b308a(0x60b)][_0x2b308a(0x23c)]();}[_0x2720b9(0x140)](_0x1710d4){const _0x242c4e=_0x2720b9;if(!this['_windowCbs'])this['_windowCbs']=new Set();this['_windowCbs'][_0x242c4e(0x3ce)](_0x1710d4);if(!this['_started'])this[_0x242c4e(0x5cd)]();}[_0x2720b9(0x259)](_0x2fdfd3){this['_windowCbs']?.['delete'](_0x2fdfd3);}[_0x2720b9(0x5cd)](){const _0x405cb5=_0x2720b9;if(this[_0x405cb5(0x28e)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x2a9b4a({'resolution':0xa}),this['_h'][_0x405cb5(0x1a5)]());const _0xe54e1c=_0x518552;this['_admissionTimer']=setInterval(()=>{const _0x5d3445=_0x405cb5,_0x3d8bd4=this['_h'];if(!_0x3d8bd4)return;const _0x5ae4de=_0x3d8bd4[_0x5d3445(0x27c)](0x63)/0xf4240,_0x2798e3=_0x3d8bd4[_0x5d3445(0x142)]/0xf4240,_0x3fcbac=_0x3d8bd4[_0x5d3445(0x3be)]/0xf4240;_0x3d8bd4['reset']();if(this[_0x5d3445(0x1ef)])for(const _0xdce08f of this[_0x5d3445(0x1ef)]){try{_0xdce08f({'p99Ms':_0x5ae4de,'maxMs':_0x2798e3,'meanMs':_0x3fcbac,'reportMs':_0xe54e1c});}catch{}}},_0xe54e1c);if(this['_admissionTimer']['unref'])this[_0x405cb5(0x21d)]['unref']();}['_report'](){const _0xe76a97=_0x2720b9,_0xb15699=this['_h'],_0x1e3266=_0xb15699[_0xe76a97(0x142)]/0xf4240,_0x3b00cd=_0xb15699[_0xe76a97(0x27c)](0x63)/0xf4240,_0x688297=_0xb15699[_0xe76a97(0x3be)]/0xf4240;_0xb15699[_0xe76a97(0x5a8)]();const _0x20783e=[...this[_0xe76a97(0x402)][_0xe76a97(0x487)]()][_0xe76a97(0x3b9)](([_0x3e248d,_0x2de06f])=>({'label':_0x3e248d,..._0x2de06f}))[_0xe76a97(0x4a0)]((_0x2ffe4f,_0x4f7d82)=>_0x4f7d82['ms']-_0x2ffe4f['ms'])['slice'](0x0,0x8);this[_0xe76a97(0x402)][_0xe76a97(0x1f1)]();const _0x5ce4da=_0x20783e['reduce']((_0x2cb503,_0x2946eb)=>_0x2cb503+_0x2946eb['ms'],0x0),_0x52df26=_0x20783e[_0xe76a97(0x3b9)](_0x1070f1=>_0x1070f1[_0xe76a97(0x380)]+'='+_0x1070f1['ms']['toFixed'](0x0)+_0xe76a97(0x458)+_0x1070f1[_0xe76a97(0x420)]+(_0x1070f1['maxMs']>0x5?_0xe76a97(0x42f)+_0x1070f1[_0xe76a97(0x605)]['toFixed'](0x0)+'ms'+(_0x1070f1[_0xe76a97(0x3d0)]?'\x20'+_0x1070f1[_0xe76a97(0x3d0)]:'')+')':''));(_0x2a6920||_0x1e3266>=_0x51179e)&&this[_0xe76a97(0x5da)](_0xe76a97(0x476)+_0x518552+_0xe76a97(0x263)+_0x1e3266['toFixed'](0x0)+'ms\x20p99='+_0x3b00cd[_0xe76a97(0x3fe)](0x0)+_0xe76a97(0x577)+_0x688297[_0xe76a97(0x3fe)](0x0)+_0xe76a97(0x49d)+_0x5ce4da[_0xe76a97(0x3fe)](0x0)+'ms'+(_0x52df26[_0xe76a97(0x3bf)]?_0xe76a97(0x5a1)+_0x52df26[_0xe76a97(0x1f6)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0xe76a97(0x1ef)])for(const _0x30a513 of this[_0xe76a97(0x1ef)]){try{_0x30a513({'p99Ms':_0x3b00cd,'maxMs':_0x1e3266,'meanMs':_0x688297,'reportMs':_0x518552});}catch{}}}[_0x2720b9(0x44f)](){const _0x2fa8b2=_0x2720b9;if(this['_timer'])clearInterval(this[_0x2fa8b2(0x60b)]);if(this['_h'])this['_h'][_0x2fa8b2(0x4fe)]();this[_0x2fa8b2(0x60b)]=null,this['_h']=null,this[_0x2fa8b2(0x4e1)]=![];}}const _0x22635c=new _0x3c6ed5();if(_0x22635c['enabled'])_0x22635c['start']();return okdbLoopMonitor={'LOOP':_0x22635c},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x5defd5=require$$1$1,_0xc85e49=require$$1;let _0x1612c1,_0x4829aa,_0x18e690,_0x28a730,_0x4570ca,_0x46f50e,_0x3199e1,_0x16c650=![];const _0x1e9e41=new Set();let _0x200b76=null;const _0x2db6aa=new Map();function _0x3514f9(){const _0x3127c1=_0x5d69;if(_0x1612c1!==undefined)return _0x1612c1;_0x1612c1=process.env.OKDB_DIAG==='1';if(!_0x1612c1)return![];_0x4829aa=process.env.OKDB_DIAG_STACK==='1',_0x28a730=Math[_0x3127c1(0x142)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x18e690=new Array(_0x28a730),_0x4570ca=0x0,_0x46f50e=0x0,_0x3199e1=process.env.OKDB_DIAG_DIR||null;if(_0x3199e1)try{_0x5defd5['mkdirSync'](_0x3199e1,{'recursive':!![]});}catch{}return!![];}function _0x147e7e(){return _0x1612c1===undefined?_0x3514f9():_0x1612c1;}function _0x3e8566(_0xdbb115,_0x4ae40b){const _0x13d3d2=_0x5d69;if(_0x1612c1===undefined?!_0x3514f9():!_0x1612c1)return;let _0x1b18e5;if(_0x4829aa){const _0x4c64c2=new Error()['stack']||'';_0x1b18e5=_0x4c64c2[_0x13d3d2(0x1f5)]('\x0a')[_0x13d3d2(0x467)](0x3)[_0x13d3d2(0x3b9)](_0x58631f=>_0x58631f[_0x13d3d2(0x4e5)]())[_0x13d3d2(0x233)](Boolean)[_0x13d3d2(0x467)](0x0,0x8);}_0x18e690[_0x4570ca]={'seq':_0x46f50e++,'t':Date[_0x13d3d2(0x4b1)](),'env':_0xdbb115,'kind':_0x4ae40b||_0x13d3d2(0x166),'stack':_0x1b18e5},_0x4570ca=(_0x4570ca+0x1)%_0x28a730;}function _0x58480f(_0x569751){const _0x37a099=_0x5d69,_0x34bd28=[];for(let _0x2f4395=0x0;_0x2f4395<_0x28a730;_0x2f4395++){const _0x3945ec=_0x18e690[(_0x4570ca-0x1-_0x2f4395+_0x28a730*0x2)%_0x28a730];if(!_0x3945ec)continue;_0x34bd28[_0x37a099(0x437)](_0x3945ec);if(_0x34bd28[_0x37a099(0x3bf)]>=_0x569751)break;}return _0x34bd28;}function _0x192e0b(_0x30679f){const _0x1bb1ee=_0x5d69;try{process[_0x1bb1ee(0x595)]['write'](_0x30679f+'\x0a');}catch{}if(_0x3199e1)try{_0x5defd5[_0x1bb1ee(0x40b)](_0xc85e49[_0x1bb1ee(0x1f6)](_0x3199e1,'okdb-diag.'+process['pid']+'.log'),_0x30679f+'\x0a');}catch{}}function _0x2da304(_0x46432d){const _0x4c8171=_0x5d69,_0x571138=_0x58480f(_0x46432d);if(!_0x571138[_0x4c8171(0x3bf)])return _0x4c8171(0x2a7);const _0x5173f8=Date['now']();return _0x571138[_0x4c8171(0x3b9)](_0x8ff493=>{const _0x5d6191=_0x4c8171,_0x5c006c='\x20\x20#'+_0x8ff493['seq']+'\x20-'+(_0x5173f8-_0x8ff493['t'])+_0x5d6191(0x5d5)+_0x8ff493[_0x5d6191(0x15f)]+'\x20'+_0x8ff493['kind'];return _0x8ff493[_0x5d6191(0x220)]&&_0x8ff493[_0x5d6191(0x220)]['length']?_0x5c006c+_0x5d6191(0x1c6)+_0x8ff493[_0x5d6191(0x220)][_0x5d6191(0x1f6)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x5c006c;})[_0x4c8171(0x1f6)]('\x0a');}function _0x1d463(_0x12cfb0,_0x1bbdd1){const _0x2f9a40=_0x5d69,_0x4d7b03=_0x2f9a40(0x3a5)+_0x12cfb0+_0x2f9a40(0x4a3)+new Date()[_0x2f9a40(0x1e5)]()+'\x20pid='+process[_0x2f9a40(0x4af)]+_0x2f9a40(0x1a1),_0x665d0d=[_0x4d7b03,_0x2f9a40(0x547)+(_0x1bbdd1&&_0x1bbdd1[_0x2f9a40(0x220)]?_0x1bbdd1[_0x2f9a40(0x220)][_0x2f9a40(0x1f5)]('\x0a')[0x0]:_0x1bbdd1),_0x2f9a40(0x222)+(_0x4829aa?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x2da304(0x18),_0x4b5366(),'='[_0x2f9a40(0x1c0)](_0x4d7b03[_0x2f9a40(0x3bf)]-0x1)];_0x192e0b(_0x665d0d['join']('\x0a'));}function _0x3e89f6(_0x292b53){const _0xf636d=_0x5d69;if(!_0x147e7e())return;const _0x4cdabc=String(_0x292b53&&_0x292b53[_0xf636d(0x154)]||_0x292b53||''),_0x1bf10e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xf636d(0x3e8)](_0x4cdabc);_0x1d463(_0x1bf10e?'ORPHAN\x20(env-closed\x20write)':'uncaughtException',_0x292b53);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x1bf10e)return;try{console['error'](_0x292b53&&_0x292b53[_0xf636d(0x220)]?_0x292b53[_0xf636d(0x220)]:_0x292b53);}catch{}process[_0xf636d(0x2be)](0x1);}function _0x219e92(_0x42494a){const _0x27d738=_0x5d69;if(!_0x147e7e())return;const _0x59b935=String(_0x42494a&&_0x42494a[_0x27d738(0x154)]||_0x42494a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x27d738(0x3e8)](_0x59b935)&&_0x1d463(_0x27d738(0x55e),_0x42494a);}function _0x4b5366(){const _0x57aaef=_0x5d69,_0x3ca97a=[_0x57aaef(0x20e)];let _0x36a6bf=![];for(const _0x5a88f5 of _0x1e9e41){const _0x5b0472=_0x5a88f5&&_0x5a88f5[_0x57aaef(0x580)];if(!_0x5b0472)continue;for(const [_0x9f2bd1,_0x2d1f21]of _0x5b0472){const _0x4d7ecf=_0x2d1f21&&_0x2d1f21[_0x57aaef(0x182)]&&_0x2d1f21[_0x57aaef(0x182)][_0x57aaef(0x334)];if(!_0x4d7ecf)continue;let _0x5b7497,_0x4fc134;try{_0x5b7497=Atomics['load'](_0x4d7ecf,0x0),_0x4fc134=Atomics['load'](_0x4d7ecf,0x1);}catch{continue;}if(_0x5b7497===0x0)continue;_0x36a6bf=!![];const _0x19ffe7=_0x5b7497>0x0?'SWAP':_0x57aaef(0x534),_0x4d0af6=Date[_0x57aaef(0x4b1)]()-Math[_0x57aaef(0x463)](_0x5b7497)*0x3e8,_0x44cc18=((()=>{const _0x4aeeb1=_0x57aaef;try{return _0x2d1f21[_0x4aeeb1(0x56b)]&&_0x2d1f21[_0x4aeeb1(0x56b)][_0x4aeeb1(0x281)]?_0x2d1f21['_writer'][_0x4aeeb1(0x281)]():null;}catch{return null;}})());_0x3ca97a[_0x57aaef(0x437)](_0x57aaef(0x60a)+_0x9f2bd1+_0x57aaef(0x152)+_0x19ffe7+_0x57aaef(0x42e)+_0x4d0af6+_0x57aaef(0x144)+_0x4fc134+(_0x44cc18?_0x57aaef(0x4df)+_0x44cc18['depth']+_0x57aaef(0x527)+_0x44cc18[_0x57aaef(0x3ed)]+_0x57aaef(0x410)+_0x44cc18[_0x57aaef(0x44a)]+'}':''));}}if(!_0x36a6bf)_0x3ca97a[_0x57aaef(0x437)](_0x57aaef(0x255));return _0x3ca97a[_0x57aaef(0x1f6)]('\x0a');}function _0x1fc776(){const _0x2a6bd2=_0x5d69;if(!_0x147e7e())return;const _0x3a2704=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x33bbe5=Date['now']();for(const _0x322225 of _0x1e9e41){const _0x7c65ce=_0x322225&&_0x322225[_0x2a6bd2(0x580)];if(!_0x7c65ce)continue;for(const [_0x18396f,_0x114218]of _0x7c65ce){const _0x461c97=_0x114218&&_0x114218[_0x2a6bd2(0x182)]&&_0x114218[_0x2a6bd2(0x182)][_0x2a6bd2(0x334)];if(!_0x461c97)continue;let _0x275e84;try{_0x275e84=Atomics[_0x2a6bd2(0x3bd)](_0x461c97,0x0);}catch{continue;}const _0x427f23=_0x322225['path']+'|'+_0x18396f;if(_0x275e84<=0x0){_0x2db6aa[_0x2a6bd2(0x4a1)](_0x427f23);continue;}const _0x51c50e=_0x33bbe5-_0x275e84*0x3e8,_0x84e3c2=_0x2db6aa[_0x2a6bd2(0x3b5)](_0x427f23);if(_0x51c50e<_0x3a2704)continue;if(_0x84e3c2&&_0x33bbe5-_0x84e3c2[_0x2a6bd2(0x1d9)]<_0x3a2704)continue;_0x2db6aa[_0x2a6bd2(0x2dc)](_0x427f23,{'firstTs':_0x84e3c2?_0x84e3c2['firstTs']:_0x275e84,'dumpedAt':_0x33bbe5});const _0x260b8e='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x51c50e+_0x2a6bd2(0x280)+_0x18396f+_0x2a6bd2(0x4a3)+new Date()['toISOString']()+_0x2a6bd2(0x2db)+process[_0x2a6bd2(0x4af)]+'\x20===';_0x192e0b([_0x260b8e,_0x4b5366(),'='[_0x2a6bd2(0x1c0)](_0x260b8e[_0x2a6bd2(0x3bf)]-0x1)][_0x2a6bd2(0x1f6)]('\x0a'));}}}function _0x568524(){const _0x135d10=_0x5d69;if(!_0x147e7e()||_0x16c650)return;_0x16c650=!![],process[_0x135d10(0x31d)](_0x135d10(0x378),_0x3e89f6),process[_0x135d10(0x31d)](_0x135d10(0x47c),_0x219e92);const _0xd2c0d5=Math[_0x135d10(0x142)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x200b76=setInterval(_0x1fc776,_0xd2c0d5);if(_0x200b76[_0x135d10(0x23c)])_0x200b76['unref']();}function _0x80529a(_0x24c4cb){const _0x1c0f89=_0x5d69;if(!_0x147e7e()||!_0x24c4cb)return;_0x1e9e41[_0x1c0f89(0x3ce)](_0x24c4cb),_0x568524();}function _0x5a1300(_0x472c60){const _0xc0e898=_0x5d69;_0x1e9e41[_0xc0e898(0x4a1)](_0x472c60);}function _0x5a121d(){const _0x40eccd=_0x5d69;if(!_0x147e7e())return{'enabled':![],'hint':_0x40eccd(0x58c)};return{'enabled':!![],'stackCapture':!!_0x4829aa,'recentWrites':_0x58480f(0x10),'drain':_0x4b5366()};}return okdbDiag={'isEnabled':_0x147e7e,'recordWrite':_0x3e8566,'installDiag':_0x568524,'registerOkdb':_0x80529a,'unregisterOkdb':_0x5a1300,'snapshot':_0x5a121d},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x540100=_0x457462;if(hasRequiredOkdbWriter)return okdbWriter[_0x540100(0x1d0)];hasRequiredOkdbWriter=0x1;const {performance:_0x2942bf}=require$$0$5,_0x558b17=requireOkdbDiag(),_0x8faa11=process.env.OKDB_COMMIT_MODE==='sync';class _0x341c64{constructor(_0x5cc362){const _0x4053a5=_0x540100;this[_0x4053a5(0x15f)]=_0x5cc362,this['_inflight']=new Set(),this[_0x4053a5(0x247)]=new Map(),this[_0x4053a5(0x58b)]=0x0,this['_durs']=[],this[_0x4053a5(0x4eb)]=[],this[_0x4053a5(0x386)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x4053a5(0x4c2)]=0x0,this[_0x4053a5(0x4f6)]=[],this['_bpParkedTotal']=0x0,this[_0x4053a5(0x464)]=null,this['_heldTotal']=0x0,this[_0x4053a5(0x1fd)]=0x0,this['_nestedWarned']=![];}async[_0x540100(0x590)](_0x5ccb03,_0x27180c){const _0x200992=_0x540100;if(_0x558b17[_0x200992(0x2a5)]())_0x558b17[_0x200992(0x35e)](this['env']?.[_0x200992(0x2f3)],_0x27180c);if(this['_closed']){const _0x253c21=new Error(_0x200992(0x1ee));_0x253c21[_0x200992(0x4bf)]=_0x200992(0x203);throw _0x253c21;}if(this[_0x200992(0x386)]>0x0){let _0x2684de=![];while(this[_0x200992(0x4c2)]>=this[_0x200992(0x386)]&&!this[_0x200992(0x3eb)]){!_0x2684de&&(_0x2684de=!![],this['_bpParkedTotal']++),await new Promise(_0x2451c3=>this[_0x200992(0x4f6)][_0x200992(0x437)](_0x2451c3));}if(this[_0x200992(0x3eb)]){const _0x582273=new Error(_0x200992(0x1ee));_0x582273[_0x200992(0x4bf)]=_0x200992(0x203);throw _0x582273;}}this[_0x200992(0x4c2)]++;const _0x2aac29=this[_0x200992(0x15f)]['_coordinator'];for(;;){while(this[_0x200992(0x464)])await this[_0x200992(0x464)];if(_0x2aac29)await _0x2aac29[_0x200992(0x50f)]();if(!this['_held'])break;if(_0x2aac29)_0x2aac29[_0x200992(0x2fe)]();}if(this[_0x200992(0x3eb)]){if(_0x2aac29)_0x2aac29['afterWrite']();this[_0x200992(0x4c2)]--;if(this[_0x200992(0x4f6)][_0x200992(0x3bf)]&&this[_0x200992(0x4c2)]<this[_0x200992(0x386)])this[_0x200992(0x4f6)][_0x200992(0x409)]()();const _0x27238d=new Error(_0x200992(0x1ee));_0x27238d[_0x200992(0x4bf)]=_0x200992(0x203);throw _0x27238d;}const _0x34807c=_0x2942bf['now']();if(_0x8faa11)try{const _0x50d5c7=this[_0x200992(0x15f)]['db'][_0x200992(0x426)](_0x5ccb03);this['_committed']++;if(this[_0x200992(0x22b)][_0x200992(0x437)](_0x2942bf[_0x200992(0x4b1)]()-_0x34807c)>0x100)this['_durs']['shift']();if(this[_0x200992(0x4eb)][_0x200992(0x437)](_0x2942bf[_0x200992(0x4b1)]())>0x800)this[_0x200992(0x4eb)]['shift']();return _0x50d5c7;}finally{this[_0x200992(0x4c2)]--;if(this[_0x200992(0x4f6)][_0x200992(0x3bf)]&&this[_0x200992(0x4c2)]<this[_0x200992(0x386)])this[_0x200992(0x4f6)]['shift']()();if(_0x2aac29)_0x2aac29[_0x200992(0x2fe)]();}let _0x36a318=null;const _0x4f672e=()=>{const _0xae6e6d=_0x200992,_0x5c9d54=_0x5ccb03();if(_0x5c9d54&&typeof _0x5c9d54['then']===_0xae6e6d(0x3ee)&&!_0x36a318){this['_heldTotal']++;let _0x5f5a13;const _0x450b1b=new Promise(_0x74f23e=>_0x5f5a13=_0x74f23e);this['_held']=_0x450b1b,_0x36a318=()=>{const _0x1ada9b=_0xae6e6d;if(this['_held']===_0x450b1b)this[_0x1ada9b(0x464)]=null;_0x5f5a13();};}return _0x5c9d54;};let _0xfb020;try{_0xfb020=this['env']['db'][_0x200992(0x5ba)](_0x4f672e);}catch(_0x566adb){_0xfb020=Promise[_0x200992(0x194)](_0x566adb);}(!_0xfb020||typeof _0xfb020['then']!==_0x200992(0x3ee))&&(this['_nestedTotal']++,!this['_nestedWarned']&&(this[_0x200992(0x1b3)]=!![],console['warn'](_0x200992(0x373)+(this[_0x200992(0x15f)]?.[_0x200992(0x2f3)]??'?')+_0x200992(0x148))),_0xfb020=Promise[_0x200992(0x205)](_0xfb020));const _0x3a44e6=()=>{if(_0x36a318)_0x36a318();};_0xfb020[_0x200992(0x2c6)](_0x3a44e6,_0x3a44e6),this[_0x200992(0x1e0)][_0x200992(0x3ce)](_0xfb020),this[_0x200992(0x247)][_0x200992(0x2dc)](_0xfb020,_0x34807c);const _0x4c6a0e=()=>{const _0x4ea586=_0x200992;this[_0x4ea586(0x1e0)][_0x4ea586(0x4a1)](_0xfb020),this[_0x4ea586(0x247)]['delete'](_0xfb020),this[_0x4ea586(0x58b)]++,this[_0x4ea586(0x4c2)]--;this[_0x4ea586(0x4f6)][_0x4ea586(0x3bf)]&&this[_0x4ea586(0x4c2)]<this['_highWater']&&this[_0x4ea586(0x4f6)][_0x4ea586(0x409)]()();if(this[_0x4ea586(0x22b)][_0x4ea586(0x437)](_0x2942bf['now']()-_0x34807c)>0x100)this[_0x4ea586(0x22b)][_0x4ea586(0x409)]();if(this['_done'][_0x4ea586(0x437)](_0x2942bf['now']())>0x800)this['_done'][_0x4ea586(0x409)]();};_0xfb020['then'](_0x4c6a0e,_0x4c6a0e);try{return await _0xfb020;}finally{if(_0x2aac29)_0x2aac29[_0x200992(0x2fe)]();}}[_0x540100(0x281)](){const _0x15cf6e=_0x540100,_0x1c1cd9=_0x2942bf[_0x15cf6e(0x4b1)]();let _0x24d2c1=0x0;for(const _0x33bf55 of this['_enqueuedAt'][_0x15cf6e(0x3e1)]()){const _0x3db3f0=_0x1c1cd9-_0x33bf55;if(_0x3db3f0>_0x24d2c1)_0x24d2c1=_0x3db3f0;}let _0x55f011=0x0;for(let _0x2a4ccb=this[_0x15cf6e(0x4eb)][_0x15cf6e(0x3bf)]-0x1;_0x2a4ccb>=0x0;_0x2a4ccb--){if(_0x1c1cd9-this[_0x15cf6e(0x4eb)][_0x2a4ccb]>0x3e8)break;_0x55f011++;}let _0x45009d=0x0;if(this[_0x15cf6e(0x22b)][_0x15cf6e(0x3bf)]){const _0x11a9e6=[...this['_durs']]['sort']((_0x30d2cb,_0x3d7639)=>_0x30d2cb-_0x3d7639);_0x45009d=_0x11a9e6[Math[_0x15cf6e(0x41f)](_0x11a9e6['length']-0x1,Math[_0x15cf6e(0x299)](_0x11a9e6[_0x15cf6e(0x3bf)]*0.99))];}return{'depth':this[_0x15cf6e(0x1e0)][_0x15cf6e(0x5e1)],'oldestPendingMs':Math['round'](_0x24d2c1),'committed':this[_0x15cf6e(0x58b)],'commitsPerSec':_0x55f011,'commitP99Ms':Math[_0x15cf6e(0x47a)](_0x45009d),'parkedNow':this['_bpWaiters'][_0x15cf6e(0x3bf)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x15cf6e(0x386)]};}[_0x540100(0x40d)](){const _0x3f4317=_0x540100,_0x51f235=_0x2942bf[_0x3f4317(0x4b1)]();return[...this[_0x3f4317(0x247)][_0x3f4317(0x3e1)]()]['map'](_0x1b85bd=>Math['round'](_0x51f235-_0x1b85bd))[_0x3f4317(0x4a0)]((_0x12d8fd,_0x61dd3c)=>_0x61dd3c-_0x12d8fd);}['markClosed'](){const _0x2ad71f=_0x540100;this['_closed']=!![];for(const _0x232cec of this[_0x2ad71f(0x4f6)][_0x2ad71f(0x1c1)](0x0))_0x232cec();}async[_0x540100(0x2fa)](){const _0x25e6bc=_0x540100;let _0x520c8d=0x0;while(this[_0x25e6bc(0x1e0)]['size']&&_0x520c8d++<0x3e8){await Promise[_0x25e6bc(0x540)]([...this['_inflight']]);}}async[_0x540100(0x491)](_0x416581,_0x11c52d,_0x34d243,_0x27b2ca){return this['transaction'](()=>{const _0xca1304=_0x5d69;if(_0x27b2ca===undefined)_0x416581[_0xca1304(0x49b)](_0x11c52d,_0x34d243);else _0x416581['putSync'](_0x11c52d,_0x34d243,_0x27b2ca);},'raw-put');}async['remove'](_0x7b6b65,_0x18e9d5){const _0x1d4cf2=_0x540100;return this['transaction'](()=>_0x7b6b65[_0x1d4cf2(0x1c7)](_0x18e9d5),'raw-remove');}}async function _0x40b5f1(_0x89edd8,_0x4d04b2){const _0x343a95=_0x540100;if(_0x4d04b2==null)_0x4d04b2=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x37b8a4=_0x89edd8?.['flushed'];if(!_0x37b8a4||typeof _0x37b8a4[_0x343a95(0x2c6)]!=='function')return;await Promise[_0x343a95(0x4d2)]([Promise[_0x343a95(0x205)](_0x37b8a4)[_0x343a95(0x488)](()=>{}),new Promise(_0x469921=>{const _0x141229=setTimeout(_0x469921,_0x4d04b2);if(_0x141229['unref'])_0x141229['unref']();})]);}catch{}}function _0x3d617f(_0xad26c4){const _0x4767c3=_0x540100;if(_0x8faa11)return Promise['resolve']();const _0x222d3c=_0xad26c4?.[_0x4767c3(0x147)];return _0x222d3c&&typeof _0x222d3c[_0x4767c3(0x2c6)]===_0x4767c3(0x3ee)?_0x222d3c:Promise['resolve']();}return okdbWriter[_0x540100(0x1d0)]=_0x341c64,okdbWriter['exports']['flushLmdb']=_0x40b5f1,okdbWriter[_0x540100(0x1d0)][_0x540100(0x147)]=_0x3d617f,okdbWriter[_0x540100(0x1d0)][_0x540100(0x14b)]=_0x8faa11,okdbWriter[_0x540100(0x1d0)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x26356e=_0x457462;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x29b93f=require$$0,{SYNC_COMMITS:_0x392fef}=requireOkdbWriter(),_0x3454c9=_0x26356e(0x3b3);class _0x37b0f1{constructor(_0x385092,_0x2c002d,_0x316958){const _0x2332d6=_0x26356e;this['_lock']=_0x385092,this[_0x2332d6(0x4b9)]=_0x2c002d,this[_0x2332d6(0x4f5)]=_0x316958,this[_0x2332d6(0x5d9)]=![],this['_heartbeatTimer']=null,this[_0x2332d6(0x474)]=null;}[_0x26356e(0x5ee)](){const _0x1b082c=_0x26356e;if(this[_0x1b082c(0x5d9)])return![];try{const _0x58083b=this['_lock']['_db']()[_0x1b082c(0x3b5)](this[_0x1b082c(0x4b9)]);if(!_0x58083b||_0x58083b[_0x1b082c(0x2d7)]!==this[_0x1b082c(0x4f5)])return![];const _0x168fb8=_0x58083b[_0x1b082c(0x330)]??_0x58083b[_0x1b082c(0x2d7)];if(_0x168fb8+_0x58083b[_0x1b082c(0x536)]<Date[_0x1b082c(0x4b1)]())return![];return!![];}catch{return!this[_0x1b082c(0x5d9)];}}[_0x26356e(0x174)](){const _0x4366de=_0x26356e;if(this['_released'])return null;try{return this[_0x4366de(0x14c)][_0x4366de(0x2fb)]()[_0x4366de(0x3b5)](this[_0x4366de(0x4b9)])??null;}catch{return null;}}async['extend'](_0x44434d){const _0xfe3255=_0x26356e;if(this[_0xfe3255(0x5d9)])return;try{const _0x4ccda6=this[_0xfe3255(0x14c)][_0xfe3255(0x2fb)]()[_0xfe3255(0x3b5)](this['_key']);if(!_0x4ccda6||_0x4ccda6[_0xfe3255(0x2d7)]!==this[_0xfe3255(0x4f5)])return;if(_0x392fef)this[_0xfe3255(0x14c)][_0xfe3255(0x2fb)]()[_0xfe3255(0x49b)](this[_0xfe3255(0x4b9)],{..._0x4ccda6,'ttlMs':_0x4ccda6['ttlMs']+_0x44434d});else await this['_lock'][_0xfe3255(0x2fb)]()['put'](this[_0xfe3255(0x4b9)],{..._0x4ccda6,'ttlMs':_0x4ccda6[_0xfe3255(0x536)]+_0x44434d});}catch{}}async[_0x26356e(0x2f1)](){const _0x1c8372=_0x26356e;if(this['_released'])return;if(this['_heartbeatInFlight'])try{await this[_0x1c8372(0x474)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x1c8372(0x27b)]=null,this['_released']=!![];try{const _0x27db33=this[_0x1c8372(0x14c)][_0x1c8372(0x2fb)]()[_0x1c8372(0x3b5)](this['_key']);if(_0x27db33&&_0x27db33[_0x1c8372(0x2d7)]===this[_0x1c8372(0x4f5)]){if(_0x392fef)this[_0x1c8372(0x14c)][_0x1c8372(0x2fb)]()[_0x1c8372(0x1c7)](this[_0x1c8372(0x4b9)]);else await this[_0x1c8372(0x14c)][_0x1c8372(0x2fb)]()[_0x1c8372(0x492)](this[_0x1c8372(0x4b9)]);}}catch{}}[_0x26356e(0x4ed)](_0xe6669f,_0x169099){const _0x5e055e=_0x26356e,_0x274cb3=_0x169099??Math[_0x5e055e(0x299)](_0xe6669f/0x3);this[_0x5e055e(0x27b)]=setInterval(()=>{const _0x1eaaab=_0x5e055e;if(this['_released'])return;this[_0x1eaaab(0x474)]=((async()=>{const _0xe30745=_0x1eaaab;try{const _0x73da75=this[_0xe30745(0x14c)][_0xe30745(0x2fb)]()['get'](this[_0xe30745(0x4b9)]);if(!_0x73da75||_0x73da75[_0xe30745(0x2d7)]!==this[_0xe30745(0x4f5)]){this[_0xe30745(0x5d9)]=!![],clearInterval(this['_heartbeatTimer']),this[_0xe30745(0x27b)]=null;return;}if(_0x392fef)this['_lock']['_db']()[_0xe30745(0x49b)](this[_0xe30745(0x4b9)],{..._0x73da75,'updatedAt':Date[_0xe30745(0x4b1)]()});else await this[_0xe30745(0x14c)][_0xe30745(0x2fb)]()[_0xe30745(0x491)](this[_0xe30745(0x4b9)],{..._0x73da75,'updatedAt':Date[_0xe30745(0x4b1)]()});}catch{}this[_0xe30745(0x474)]=null;})());},_0x274cb3);if(this[_0x5e055e(0x27b)][_0x5e055e(0x23c)])this[_0x5e055e(0x27b)][_0x5e055e(0x23c)]();}}class _0x5cb158{constructor(_0x334bdd,{namespace:_0x583b50,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x143591=_0x26356e;this[_0x143591(0x56f)]=_0x334bdd,this[_0x143591(0x21e)]=_0x583b50,this[_0x143591(0x536)]=ttlMs,this['heartbeatMs']=heartbeatMs,this[_0x143591(0x5f3)]=null;}[_0x26356e(0x2fb)](){const _0x405d89=_0x26356e;return!this[_0x405d89(0x5f3)]&&(this[_0x405d89(0x5f3)]=this[_0x405d89(0x56f)][_0x405d89(0x592)](_0x3454c9,{'dupSort':![]})),this[_0x405d89(0x5f3)];}[_0x26356e(0x209)](){const _0x48ca90=_0x26356e;return!this[_0x48ca90(0x473)]&&(this[_0x48ca90(0x473)]=this[_0x48ca90(0x56f)]['openDB'](_0x3454c9+':want',{'dupSort':![]})),this[_0x48ca90(0x473)];}['_key'](_0x4e2946){const _0x5b18e6=_0x26356e;return this[_0x5b18e6(0x21e)]+':'+_0x4e2946;}['signalWant'](_0x3bc4da){const _0x5d08aa=_0x26356e;try{_0x392fef?this[_0x5d08aa(0x209)]()[_0x5d08aa(0x49b)](this[_0x5d08aa(0x4b9)](_0x3bc4da),Date[_0x5d08aa(0x4b1)]()):this[_0x5d08aa(0x209)]()[_0x5d08aa(0x491)](this['_key'](_0x3bc4da),Date[_0x5d08aa(0x4b1)]())?.[_0x5d08aa(0x488)]?.(()=>{});}catch{}}[_0x26356e(0x3ff)](_0x1c5ae9,_0x50af88=0x3e8){const _0x5f3781=_0x26356e;try{const _0x599448=this[_0x5f3781(0x209)]()['get'](this[_0x5f3781(0x4b9)](_0x1c5ae9));return typeof _0x599448==='number'&&Date[_0x5f3781(0x4b1)]()-_0x599448<_0x50af88;}catch{return![];}}[_0x26356e(0x4cf)](_0x287cfa){const _0x1da76b=_0x26356e,_0xe0be34=_0x287cfa[_0x1da76b(0x330)]??_0x287cfa[_0x1da76b(0x2d7)];return _0xe0be34+_0x287cfa[_0x1da76b(0x536)]<Date[_0x1da76b(0x4b1)]();}static['_holderDead'](_0x2c8a15){const _0x3fa18d=_0x26356e,_0xdd550d=_0x2c8a15?.[_0x3fa18d(0x174)];if(!_0xdd550d||typeof _0xdd550d[_0x3fa18d(0x4af)]!=='number')return![];if(_0xdd550d[_0x3fa18d(0x5b9)]!==_0x29b93f[_0x3fa18d(0x5b9)]())return![];if(_0xdd550d[_0x3fa18d(0x4af)]===process[_0x3fa18d(0x4af)])return![];try{return process['kill'](_0xdd550d[_0x3fa18d(0x4af)],0x0),![];}catch(_0x13a9bb){return _0x13a9bb[_0x3fa18d(0x4bf)]===_0x3fa18d(0x581);}}async[_0x26356e(0x2d5)](_0x7f5668,_0x4f53e5={},_0x20b029={}){const _0x10926a=_0x26356e,_0x243aec=this[_0x10926a(0x4b9)](_0x7f5668),_0x2ed8ae=_0x20b029['ttlMs']??this[_0x10926a(0x536)],_0x512eaa=Date['now'](),_0x4ae82a={'holder':{'pid':process[_0x10926a(0x4af)],'hostname':_0x29b93f[_0x10926a(0x5b9)](),..._0x4f53e5},'acquiredAt':_0x512eaa,'updatedAt':_0x512eaa,'ttlMs':_0x2ed8ae};let _0xf8b4a1=![],_0x2f1852=null;try{const _0xabaef=()=>{const _0x1ebe84=_0x10926a,_0x2d488d=this[_0x1ebe84(0x2fb)]()[_0x1ebe84(0x3b5)](_0x243aec);if(_0x2d488d&&!this['_isStale'](_0x2d488d)&&!_0x5cb158[_0x1ebe84(0x1b5)](_0x2d488d)){const _0x531c6c=_0x4f53e5['processorId']!=null&&_0x2d488d[_0x1ebe84(0x174)][_0x1ebe84(0x4af)]===process[_0x1ebe84(0x4af)]&&_0x2d488d[_0x1ebe84(0x174)][_0x1ebe84(0x158)]===_0x4f53e5[_0x1ebe84(0x158)];if(!_0x531c6c){_0xf8b4a1=![],_0x2f1852=_0x2d488d;return;}_0x4ae82a['acquiredAt']<=_0x2d488d[_0x1ebe84(0x2d7)]&&(_0x4ae82a[_0x1ebe84(0x2d7)]=_0x2d488d['acquiredAt']+0x1,_0x4ae82a[_0x1ebe84(0x330)]=_0x4ae82a[_0x1ebe84(0x2d7)]);}this[_0x1ebe84(0x2fb)]()[_0x1ebe84(0x491)](_0x243aec,_0x4ae82a),_0xf8b4a1=!![],_0x2f1852=_0x4ae82a;};if(_0x392fef)this['_db']()[_0x10926a(0x426)](_0xabaef);else await this[_0x10926a(0x2fb)]()[_0x10926a(0x5ba)](_0xabaef);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0xf8b4a1)return{'acquired':![],'handle':null,'current':_0x2f1852};const _0x31e477=new _0x37b0f1(this,_0x243aec,_0x4ae82a['acquiredAt']);return _0x31e477[_0x10926a(0x4ed)](_0x2ed8ae,this['heartbeatMs']),{'acquired':!![],'handle':_0x31e477,'current':_0x2f1852};}[_0x26356e(0x5fc)](_0x4c77e4){const _0x1a36c0=_0x26356e;try{return this[_0x1a36c0(0x2fb)]()['get'](this[_0x1a36c0(0x4b9)](_0x4c77e4))??null;}catch{return null;}}[_0x26356e(0x381)](){const _0x402b54=_0x26356e,_0x252a1a=this['namespace']+':',_0x67a6e1=[];try{for(const {key:_0x3b71c0,value:_0x259c4b}of this[_0x402b54(0x2fb)]()[_0x402b54(0x180)]({'start':_0x252a1a,'end':_0x252a1a+'\xff'})){typeof _0x3b71c0===_0x402b54(0x5d2)&&_0x3b71c0[_0x402b54(0x3ca)](_0x252a1a)&&_0x67a6e1[_0x402b54(0x437)]({'id':_0x3b71c0[_0x402b54(0x467)](_0x252a1a['length']),'entry':_0x259c4b});}}catch{}return _0x67a6e1;}static[_0x26356e(0x262)](_0x2036e1){const _0xedb2e3=_0x26356e,_0x5a8600=[];try{const _0xef0969=_0x2036e1[_0xedb2e3(0x592)](_0x3454c9,{'dupSort':![]});for(const {key:_0x32a0c6,value:_0x35d5a7}of _0xef0969[_0xedb2e3(0x180)]({})){if(typeof _0x32a0c6!==_0xedb2e3(0x5d2))continue;const _0x577591=_0x32a0c6[_0xedb2e3(0x396)](':');if(_0x577591<0x1)continue;_0x5a8600[_0xedb2e3(0x437)]({'namespace':_0x32a0c6[_0xedb2e3(0x467)](0x0,_0x577591),'id':_0x32a0c6[_0xedb2e3(0x467)](_0x577591+0x1),'entry':_0x35d5a7});}}catch{}return _0x5a8600;}}return okdbLock={'OKDBLock':_0x5cb158},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3cad20=_0x457462;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x328466=require$$0,_0x198ec7=require$$1$2,_0x23eb42=require$$0$1,{LOOP:_0x1fd8ef}=requireOkdbLoopMonitor(),{OKDBLock:_0x4b86ac}=requireOkdbLock(),{SYNC_COMMITS:_0x388f3a}=requireOkdbWriter(),_0x24ad5e=_0x3cad20(0x594),_0x2042c0=_0x3cad20(0x5e5),_0x4b65f1=_0x3cad20(0x168),_0x31a30f=_0x3cad20(0x329),_0x4618b1=(_0x48241a,_0x2a225d)=>_0x48241a+':'+_0x2a225d,_0x3aa567=(_0x349572,_0x338329)=>_0x349572+'::'+_0x338329,_0x951548=(_0x392630,_0x3778db)=>_0x392630+'/'+_0x3778db,_0x4a7eba=(_0x447f00,_0x31f54d)=>_0x447f00+'#'+_0x31f54d,_0x5b531e=_0x96f940=>{const _0x115b15=_0x3cad20;if(_0x96f940?.[_0x115b15(0x40f)])return _0x96f940[_0x115b15(0x40f)];const _0x72a936=_0x96f940?.['nodeKey'];return typeof _0x72a936===_0x115b15(0x5d2)&&_0x72a936[_0x115b15(0x4c4)]('#')?_0x72a936[_0x115b15(0x467)](0x0,_0x72a936[_0x115b15(0x396)]('#')):_0x72a936;},_0x4b473e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x2e42c9=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x393321=_0x4b473e*0x3,_0xea7e9e=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x393321*0x14),_0x2c2f2d=['processor:progress',_0x3cad20(0x199),_0x3cad20(0x31b),_0x3cad20(0x4fb),'processor:paused',_0x3cad20(0x3fc)];let _0x42a019=null;function _0x5db2a7(){const _0x4f0b8f=_0x3cad20;if(_0x42a019==null)_0x42a019=Math['round']((Date[_0x4f0b8f(0x4b1)]()-process[_0x4f0b8f(0x5ff)]()*0x3e8)/0x3e8)*0x3e8;return _0x42a019;}function _0x3fad21(_0x3b8c4a){const _0x20b724=_0x3cad20;if(process.env.OKDB_PROCESS_KILL===_0x20b724(0x5bb))return![];if(_0x3b8c4a?.[_0x20b724(0x421)]?.['processes']&&typeof _0x3b8c4a[_0x20b724(0x421)][_0x20b724(0x5db)]==='object'&&_0x3b8c4a[_0x20b724(0x421)]['processes'][_0x20b724(0x217)]===![])return![];return!![];}function _0x345bf3(_0x4a9404,_0xcd2f10){const _0x271760=_0x3cad20,_0x9e2e6=!!_0xcd2f10?.[_0x271760(0x260)];switch(_0x4a9404){case _0x271760(0x13e):return{'controllable':_0x9e2e6,'decommissionable':![],'killable':!![],'killConfirm':_0x271760(0x55f)};case _0x271760(0x305):case _0x271760(0x37d):return{'controllable':_0x9e2e6,'decommissionable':![],'killable':!![],'killConfirm':_0x271760(0x383)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x271760(0x3d9):case _0x271760(0x175):case _0x271760(0x4d0):case _0x271760(0x248):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x271760(0x5d6)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1c8313{constructor(_0x50b04f){const _0x2bfb3d=_0x3cad20;this['okdb']=_0x50b04f,this[_0x2bfb3d(0x361)]=null,this[_0x2bfb3d(0x318)]=null,this[_0x2bfb3d(0x3db)]=new Map(),this[_0x2bfb3d(0x2af)]=null,this[_0x2bfb3d(0x4a6)]=![],this[_0x2bfb3d(0x1b8)]=![],this[_0x2bfb3d(0x41e)]=_0x5db2a7(),this[_0x2bfb3d(0x343)]=_0x4618b1(process[_0x2bfb3d(0x4af)],this['_processStartedAt']),this[_0x2bfb3d(0x425)]=_0x23eb42[_0x2bfb3d(0x429)]()[_0x2bfb3d(0x467)](0x0,0x8),this[_0x2bfb3d(0x489)]=_0x4a7eba(this[_0x2bfb3d(0x343)],this['_instanceId']),this[_0x2bfb3d(0x159)]=Date[_0x2bfb3d(0x4b1)](),this[_0x2bfb3d(0x235)]=null,this[_0x2bfb3d(0x1bd)]=null,this[_0x2bfb3d(0x141)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this[_0x2bfb3d(0x216)]=null,this['_lastPublishAt']=0x0,this[_0x2bfb3d(0x432)]={},this[_0x2bfb3d(0x2a2)]=new Map(),this[_0x2bfb3d(0x4f3)]=process[_0x2bfb3d(0x586)](),this[_0x2bfb3d(0x4e4)]=Date['now'](),this[_0x2bfb3d(0x1a0)]=0x0,this['_threadStats']=new Map();}get[_0x3cad20(0x320)](){const _0x198579=_0x3cad20;return this[_0x198579(0x343)];}get['rowKey'](){const _0x1bfc9d=_0x3cad20;return this[_0x1bfc9d(0x489)];}['_caps'](_0x9947b3,_0x3daf7d){const _0x48945e=_0x3cad20,_0x28d466=_0x345bf3(_0x9947b3,_0x3daf7d);if(_0x28d466[_0x48945e(0x3b7)]&&!_0x3fad21(this['okdb']))return{..._0x28d466,'killable':![],'killConfirm':undefined};return _0x28d466;}[_0x3cad20(0x2e6)](){return!!this['_statusEnv'];}[_0x3cad20(0x244)](_0x5dd7b2){const _0x294d4f=_0x3cad20;Object['assign'](this[_0x294d4f(0x432)],_0x5dd7b2||{});}['noteListenAddr'](_0x40e9d6){const _0x53d15c=_0x3cad20;if(_0x40e9d6)this[_0x53d15c(0x141)]=_0x40e9d6;}[_0x3cad20(0x345)](_0x3a6e88={}){const _0x5f3b71=_0x3cad20;return this[_0x5f3b71(0x57c)][_0x5f3b71(0x38a)](_0x3a6e88);}['processingStatusView'](){const _0x5c2c57=_0x3cad20,_0xe3a33d={};let _0x4c938d=0x0,_0x1d4451=0x0;const _0x5667e8=new Set();for(const _0x5a60f1 of this[_0x5c2c57(0x20d)]()){_0x1d4451++;const _0x212262=_0x5a60f1['processing'];if(!_0x212262)continue;if(_0x212262['participate'])_0x4c938d++;for(const _0x4881af of _0x212262['processors']||[]){if(![_0x5c2c57(0x5c6),_0x5c2c57(0x32b)][_0x5c2c57(0x4c4)](_0x4881af[_0x5c2c57(0x1e2)]))continue;(_0x4881af[_0x5c2c57(0x3ba)]===_0x5c2c57(0x3a4)||_0x4881af[_0x5c2c57(0x3ba)]===_0x5c2c57(0x47d))&&_0x4881af[_0x5c2c57(0x4c9)]&&_0x5667e8[_0x5c2c57(0x3ce)]((_0x4881af['env']||_0x5c2c57(0x2c4))+':'+_0x4881af[_0x5c2c57(0x4c9)]);const _0x15727e=_0x4881af[_0x5c2c57(0x15f)]||_0x5c2c57(0x2c4);(_0xe3a33d[_0x15727e]||=[])[_0x5c2c57(0x437)]({..._0x4881af,'env':_0x15727e,'owner':{'pid':_0x5a60f1[_0x5c2c57(0x4af)]??null,'kind':_0x5a60f1[_0x5c2c57(0x201)]??null}});}}for(const [_0x3d92bd,_0x8a40dc]of Object[_0x5c2c57(0x487)](_0xe3a33d)){for(const _0x4f8f19 of _0x8a40dc){if(_0x4f8f19[_0x5c2c57(0x1e2)]===_0x5c2c57(0x5c6)&&!_0x4f8f19['claimGated']){const _0x2b2f7b=_0x3d92bd+':'+(_0x4f8f19['cursorKey']??'');if(!_0x5667e8[_0x5c2c57(0x30f)](_0x2b2f7b))_0x4f8f19[_0x5c2c57(0x3ac)]=!![];}}}return{'envs':_0xe3a33d,'policy':null,'participation':{'participating':_0x4c938d,'total':_0x1d4451},'source':_0x5c2c57(0x606)};}['processorsView'](){const _0x130246=_0x3cad20,_0x35f4c9=_0x4417e7=>{const _0x4bddd8=_0x5d69;if(_0x4417e7[_0x4bddd8(0x3ba)]===_0x4bddd8(0x3a4)||_0x4417e7['state']===_0x4bddd8(0x47d)||_0x4417e7[_0x4bddd8(0x3ba)]===_0x4bddd8(0x1db))return 0x3;if(_0x4417e7[_0x4bddd8(0x481)])return 0x1;return 0x2;},_0x3d8074=new Map();for(const _0x249dfb of this[_0x130246(0x20d)]()){for(const _0x118c2f of _0x249dfb[_0x130246(0x17f)]?.['processors']||[]){const _0x1c55ff={..._0x118c2f,'owner':{'pid':_0x249dfb[_0x130246(0x4af)]??null,'kind':_0x249dfb[_0x130246(0x201)]??null,'host':_0x249dfb[_0x130246(0x34b)]??null}},_0x36f14a=_0x118c2f['mode']===_0x130246(0x5c6)?'1ofN:'+(_0x118c2f[_0x130246(0x15f)]??'')+'::'+(_0x118c2f[_0x130246(0x4c9)]??_0x118c2f[_0x130246(0x2cd)]??_0x118c2f['id']):_0x130246(0x5e6)+(_0x249dfb[_0x130246(0x2c3)]??_0x249dfb['processKey']??'')+'::'+(_0x118c2f[_0x130246(0x15f)]??'')+'::'+_0x118c2f['id'],_0x2eb447=_0x3d8074[_0x130246(0x3b5)](_0x36f14a);if(!_0x2eb447||_0x35f4c9(_0x1c55ff)>_0x35f4c9(_0x2eb447))_0x3d8074[_0x130246(0x2dc)](_0x36f14a,_0x1c55ff);}}return[..._0x3d8074[_0x130246(0x3e1)]()];}[_0x3cad20(0x471)](){const _0x15c049=_0x3cad20,_0x436879=Date[_0x15c049(0x4b1)](),_0x23f749=this[_0x15c049(0x20d)](),_0x4cca15=_0x537632=>Math[_0x15c049(0x142)](0x0,Math['round']((_0x436879-(_0x537632[_0x15c049(0x24e)]||_0x436879))/0x3e8)),_0x26a501=_0x23f749['find'](_0xa2b75f=>_0xa2b75f['kind']==='primary'),_0xbf0b9b=_0x23f749[_0x15c049(0x233)](_0xce8800=>_0xce8800['kind']==='http-server');if(_0x26a501||_0xbf0b9b['length'])return{'primary':_0x26a501?{'pid':_0x26a501[_0x15c049(0x4af)],'uptime':_0x4cca15(_0x26a501)}:null,'workers':_0xbf0b9b[_0x15c049(0x3b9)](_0x1de04d=>({'pid':_0x1de04d[_0x15c049(0x4af)],'uptime':_0x4cca15(_0x1de04d)})),'workersConfigured':_0x26a501?.[_0x15c049(0x25c)]?.[_0x15c049(0x2a9)]??_0xbf0b9b[_0x15c049(0x3bf)],'mode':_0x15c049(0x2b2)};const _0x58f351=_0x23f749['find'](_0x52b66a=>_0x52b66a[_0x15c049(0x201)]===_0x15c049(0x305)||_0x52b66a[_0x15c049(0x201)]==='standalone'||_0x52b66a[_0x15c049(0x201)]==='embedded'),_0x898db2=_0x58f351?{'pid':_0x58f351[_0x15c049(0x4af)],'uptime':_0x4cca15(_0x58f351)}:{'pid':process[_0x15c049(0x4af)],'uptime':Math[_0x15c049(0x142)](0x0,Math['round'](process[_0x15c049(0x5ff)]()))};return{'primary':_0x898db2,'workers':[_0x898db2],'workersConfigured':0x1,'mode':_0x15c049(0x5c6)};}[_0x3cad20(0x54f)](){const _0x4c55e1=_0x3cad20;return this[_0x4c55e1(0x202)]();}['treeView'](){const _0x248dd6=_0x3cad20,_0x31d58b=new Map();for(const _0x5007c9 of this[_0x248dd6(0x202)]())_0x31d58b[_0x248dd6(0x2dc)](_0x5007c9['processKey'],{..._0x5007c9,'children':[]});const _0x4e3ec5=[];for(const _0x1fb517 of _0x31d58b['values']()){const _0x5ab797=_0x1fb517['supervisorKey']?_0x31d58b[_0x248dd6(0x3b5)](_0x1fb517[_0x248dd6(0x335)]):null;if(_0x5ab797&&_0x5ab797!==_0x1fb517)_0x5ab797[_0x248dd6(0x585)]['push'](_0x1fb517);else _0x4e3ec5[_0x248dd6(0x437)](_0x1fb517);}const _0x30e09f=(_0x2ccd6f,_0x15d187)=>_0x2ccd6f['kind']===_0x15d187[_0x248dd6(0x201)]?(_0x2ccd6f[_0x248dd6(0x4af)]||0x0)-(_0x15d187[_0x248dd6(0x4af)]||0x0):(_0x2ccd6f[_0x248dd6(0x201)]??'')<(_0x15d187[_0x248dd6(0x201)]??'')?-0x1:0x1,_0x5464d0=_0x48aac6=>{const _0x39a4b9=_0x248dd6;_0x48aac6['sort'](_0x30e09f);for(const _0x54b79d of _0x48aac6)if(_0x54b79d[_0x39a4b9(0x585)][_0x39a4b9(0x3bf)])_0x5464d0(_0x54b79d[_0x39a4b9(0x585)]);};return _0x5464d0(_0x4e3ec5),_0x4e3ec5;}['getProcess'](_0x22b2ae){const _0x3ba35a=_0x3cad20;return this[_0x3ba35a(0x202)]()[_0x3ba35a(0x51b)](_0x63ef6a=>_0x63ef6a[_0x3ba35a(0x40f)]===_0x22b2ae)??null;}[_0x3cad20(0x202)](_0xa85b35=Date[_0x3cad20(0x4b1)]()){const _0x905cef=_0x3cad20,_0x134668=new Map();for(const _0x2d2ffe of this['listNodes']()){const _0x14804d=_0x5b531e(_0x2d2ffe);let _0xf8da0b=_0x134668[_0x905cef(0x3b5)](_0x14804d);!_0xf8da0b&&(_0xf8da0b={'processKey':_0x14804d,'nodeKey':_0x14804d,'pid':_0x2d2ffe[_0x905cef(0x4af)],'ppid':_0x2d2ffe['ppid']??null,'host':_0x2d2ffe[_0x905cef(0x34b)]??null,'kind':_0x2d2ffe[_0x905cef(0x201)],'role':null,'supervisorKey':_0x2d2ffe['supervisorKey']??null,'slot':_0x2d2ffe[_0x905cef(0x608)]??null,'slotKey':_0x2d2ffe[_0x905cef(0x236)]??null,'caps':_0x2d2ffe['caps']??null,'lifecycle':_0x2d2ffe['lifecycle']??null,'uptime':Math[_0x905cef(0x142)](0x0,Math[_0x905cef(0x47a)]((_0xa85b35-(_0x2d2ffe[_0x905cef(0x24e)]||_0xa85b35))/0x3e8)),'startedAt':_0x2d2ffe[_0x905cef(0x24e)]??null,'meta':_0x2d2ffe[_0x905cef(0x25c)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x134668[_0x905cef(0x2dc)](_0x14804d,_0xf8da0b));_0xf8da0b[_0x905cef(0x3a8)][_0x905cef(0x437)]({'instanceId':_0x2d2ffe[_0x905cef(0x5ec)]??null,'role':_0x2d2ffe['role']??null,'listenAddr':_0x2d2ffe[_0x905cef(0x5cb)]??null,'lifecycle':_0x2d2ffe['lifecycle']??null,'processing':_0x2d2ffe['processing']??null});if(!_0xf8da0b[_0x905cef(0x452)]&&_0x2d2ffe['role'])_0xf8da0b[_0x905cef(0x452)]=_0x2d2ffe['role'];if(!_0xf8da0b[_0x905cef(0x5cb)]&&_0x2d2ffe['listenAddr'])_0xf8da0b[_0x905cef(0x5cb)]=_0x2d2ffe[_0x905cef(0x5cb)];if(!_0xf8da0b[_0x905cef(0x17f)]&&_0x2d2ffe[_0x905cef(0x17f)])_0xf8da0b[_0x905cef(0x17f)]=_0x2d2ffe[_0x905cef(0x17f)];if(!_0xf8da0b[_0x905cef(0x599)]&&_0x2d2ffe[_0x905cef(0x599)])_0xf8da0b[_0x905cef(0x599)]=_0x2d2ffe[_0x905cef(0x599)];if(!_0xf8da0b[_0x905cef(0x555)]&&_0x2d2ffe[_0x905cef(0x555)])_0xf8da0b[_0x905cef(0x555)]=_0x2d2ffe[_0x905cef(0x555)];if(_0xf8da0b['caps']==null&&_0x2d2ffe['caps'])_0xf8da0b[_0x905cef(0x326)]=_0x2d2ffe[_0x905cef(0x326)];if(_0x2d2ffe[_0x905cef(0x267)]&&(!_0xf8da0b[_0x905cef(0x267)]||(_0x2d2ffe['stats']['at']??0x0)>(_0xf8da0b[_0x905cef(0x267)]['at']??0x0)))_0xf8da0b['stats']=_0x2d2ffe['stats'];}return[..._0x134668[_0x905cef(0x3e1)]()];}['runtimeProcessesView'](){const _0x4e6da6=_0x3cad20,_0x2c3cce=[],_0x444716={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x43966e of this['_groupByProcess']()){_0x2c3cce[_0x4e6da6(0x437)]({'processKey':_0x43966e[_0x4e6da6(0x40f)],'kind':_0x43966e[_0x4e6da6(0x201)],'pid':_0x43966e[_0x4e6da6(0x4af)],'supervisorKey':_0x43966e[_0x4e6da6(0x335)],'meta':_0x43966e['meta']??null,'uptime':_0x43966e[_0x4e6da6(0x5ff)],'stats':_0x43966e[_0x4e6da6(0x267)]??null}),_0x444716[_0x4e6da6(0x5db)]++;if(_0x43966e[_0x4e6da6(0x267)]){_0x444716[_0x4e6da6(0x195)]+=_0x43966e[_0x4e6da6(0x267)][_0x4e6da6(0x195)]||0x0,_0x444716[_0x4e6da6(0x156)]+=(_0x43966e[_0x4e6da6(0x267)]['heapUsed']||0x0)+(_0x43966e[_0x4e6da6(0x267)][_0x4e6da6(0x352)]?.[_0x4e6da6(0x156)]||0x0);const _0x3c3384=_0x43966e['stats'][_0x4e6da6(0x352)];_0x3c3384&&(_0x444716[_0x4e6da6(0x352)][_0x4e6da6(0x420)]+=_0x3c3384['count']||0x0,_0x444716[_0x4e6da6(0x352)]['sandbox']+=_0x3c3384['sandbox']||0x0,_0x444716[_0x4e6da6(0x352)]['busy']+=_0x3c3384[_0x4e6da6(0x4ec)]||0x0);}}return{'totals':_0x444716,'nodes':_0x2c3cce};}async[_0x3cad20(0x510)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1c1a8e=_0x3cad20;this['_isWriter']=this['_isWriter']||!!writer,this['_isReader']=this[_0x1c1a8e(0x1b8)]||!!reader,this['_kind']=kind||this[_0x1c1a8e(0x235)]||(_0x198ec7['isWorker']?_0x1c1a8e(0x3d9):_0x1c1a8e(0x305)),this[_0x1c1a8e(0x1bd)]=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x1c1a8e(0x141)],this[_0x1c1a8e(0x4db)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x1c1a8e(0x361)]){const _0x121063=await this['okdb'][_0x1c1a8e(0x430)](_0x24ad5e,{'sync':![],'durability':_0x1c1a8e(0x4cd)});await _0x121063[_0x1c1a8e(0x325)](_0x2042c0),this[_0x1c1a8e(0x361)]=_0x121063;}return this['_statusEnv'];}[_0x3cad20(0x13b)](){const _0x1f5653=_0x3cad20;return this[_0x1f5653(0x2d3)]!==this['_statusEnv']&&(this[_0x1f5653(0x2d3)]=this[_0x1f5653(0x361)],this[_0x1f5653(0x5d1)]=this['_statusEnv']['_getType'](_0x2042c0)['data']),this[_0x1f5653(0x5d1)];}[_0x3cad20(0x1fe)](_0x76d2c5){const _0x48e58e=_0x3cad20;if(_0x388f3a)return this[_0x48e58e(0x13b)]()['putSync'](_0x76d2c5[_0x48e58e(0x2c3)],_0x76d2c5,0x1);const _0x5e6dda=this[_0x48e58e(0x13b)]()[_0x48e58e(0x491)](_0x76d2c5[_0x48e58e(0x2c3)],_0x76d2c5,0x1);if(_0x5e6dda&&typeof _0x5e6dda[_0x48e58e(0x2c6)]===_0x48e58e(0x3ee))_0x5e6dda[_0x48e58e(0x2c6)](undefined,()=>{});return _0x5e6dda;}[_0x3cad20(0x516)](_0x5f467b){const _0x56b7be=_0x3cad20;return this[_0x56b7be(0x13b)]()['putSync'](_0x5f467b[_0x56b7be(0x2c3)],_0x5f467b,0x1);}['_removeRowAsync'](_0x18c6fd){const _0x8fda=_0x3cad20;if(_0x388f3a)try{return this[_0x8fda(0x13b)]()['removeSync'](_0x18c6fd);}catch{return![];}const _0xe1b7a3=this[_0x8fda(0x13b)]()[_0x8fda(0x492)](_0x18c6fd);if(_0xe1b7a3&&typeof _0xe1b7a3[_0x8fda(0x2c6)]===_0x8fda(0x3ee))_0xe1b7a3[_0x8fda(0x2c6)](undefined,()=>{});return _0xe1b7a3;}async[_0x3cad20(0x1aa)](_0x5c07b5){const _0x3c7f0f=_0x3cad20;if(!this[_0x3c7f0f(0x361)]||!this['_isWriter']||!_0x5c07b5?.[_0x3c7f0f(0x2c3)])return;return this[_0x3c7f0f(0x1fe)](_0x5c07b5);}async[_0x3cad20(0x4c0)](_0x37f12a){const _0x45a051=_0x3cad20;if(!this[_0x45a051(0x361)]||!this[_0x45a051(0x4a6)]||!_0x37f12a)return;const _0x18778d=_0x37f12a['includes']('#'),_0x46f392=[];for(const {key:_0x38f17c}of this['_statusEnv']['getRange'](_0x2042c0)){if(_0x38f17c===_0x37f12a||!_0x18778d&&typeof _0x38f17c==='string'&&_0x38f17c[_0x45a051(0x3ca)](_0x37f12a+'#'))_0x46f392[_0x45a051(0x437)](_0x38f17c);}for(const _0x5c4a54 of _0x46f392){try{this['_nodeDb']()[_0x45a051(0x1c7)](_0x5c4a54);}catch{}}}[_0x3cad20(0x30e)](_0x513b0d){const _0x366751=_0x3cad20;if(typeof _0x513b0d?.[_0x366751(0x4af)]!==_0x366751(0x5e4))return![];if(_0x513b0d['host']!==_0x328466[_0x366751(0x5b9)]())return![];if(_0x513b0d['pid']===process[_0x366751(0x4af)])return![];if(_0x513b0d['expiresAt']!=null&&_0x513b0d[_0x366751(0x304)]<Date[_0x366751(0x4b1)]()-_0xea7e9e)return!![];try{return process[_0x366751(0x217)](_0x513b0d[_0x366751(0x4af)],0x0),![];}catch(_0x571b1c){return _0x571b1c[_0x366751(0x4bf)]===_0x366751(0x581);}}['listNodes'](){const _0xa95b66=_0x3cad20;if(!this[_0xa95b66(0x361)])return[];try{this[_0xa95b66(0x361)]['db']?.[_0xa95b66(0x161)]?.();}catch{}const _0xcd541=Date['now'](),_0xbac22e=_0x328466['hostname'](),_0x241068=[];for(const {value:_0x52ad86}of this[_0xa95b66(0x361)][_0xa95b66(0x180)](_0x2042c0)){if(!_0x52ad86)continue;let _0xf3c378=null;_0x52ad86[_0xa95b66(0x34b)]===_0xbac22e&&typeof _0x52ad86[_0xa95b66(0x4af)]==='number'&&(_0xf3c378=!this[_0xa95b66(0x30e)](_0x52ad86));if(_0xf3c378===![])continue;const _0x5d0499=_0x52ad86[_0xa95b66(0x304)]==null||_0x52ad86[_0xa95b66(0x304)]>=_0xcd541;if(_0xf3c378===!![]||_0x5d0499)_0x241068['push'](_0x52ad86);}return _0x241068;}async[_0x3cad20(0x5fd)](_0x50defb=0x0){const _0x23d24b=_0x3cad20;if(!this[_0x23d24b(0x361)]||!this[_0x23d24b(0x4a6)])return;const _0x4bc055=Date[_0x23d24b(0x4b1)]()-_0x50defb,_0x698249=new Set(),_0x878df=[],_0x13b79a=_0x328466[_0x23d24b(0x5b9)](),_0x491471=require$$3[_0x23d24b(0x59d)];for(const {key:_0xd45011,value:_0x3ce3a5}of this[_0x23d24b(0x361)][_0x23d24b(0x180)](_0x2042c0)){if(!_0x3ce3a5)continue;const _0x111592=_0x3ce3a5['host']===_0x13b79a&&typeof _0x3ce3a5[_0x23d24b(0x4af)]==='number',_0x59d5ac=_0x111592?this[_0x23d24b(0x30e)](_0x3ce3a5):_0x3ce3a5[_0x23d24b(0x304)]!=null&&_0x3ce3a5[_0x23d24b(0x304)]<_0x4bc055;if(_0x59d5ac)_0x878df['push'](_0xd45011);else{_0x698249[_0x23d24b(0x3ce)](_0x5b531e(_0x3ce3a5)??_0xd45011);if(_0x3ce3a5[_0x23d24b(0x59d)]&&_0x3ce3a5[_0x23d24b(0x59d)]!==_0x491471){if(!this['_versionSkewWarned'])this[_0x23d24b(0x3cc)]=new Set();!this['_versionSkewWarned'][_0x23d24b(0x30f)](_0x3ce3a5[_0x23d24b(0x59d)])&&(this[_0x23d24b(0x3cc)][_0x23d24b(0x3ce)](_0x3ce3a5[_0x23d24b(0x59d)]),this['okdb'][_0x23d24b(0x337)]?.[_0x23d24b(0x1f0)]?.('process\x20'+(_0x3ce3a5['pid']??'?')+_0x23d24b(0x24a)+_0x3ce3a5[_0x23d24b(0x59d)]+'\x20while\x20this\x20process\x20runs\x20'+_0x491471+_0x23d24b(0x350)+_0x23d24b(0x567),{'feature':'migrations'}));}}}for(const _0x177a01 of _0x878df)this[_0x23d24b(0x5b7)](_0x177a01);if(this['_ensureDesired']()){const _0x8740e0=[];for(const {key:_0x2a605e}of this[_0x23d24b(0x5d3)](_0x23d24b(0x5e5))){if(!_0x698249[_0x23d24b(0x30f)](_0x2a605e)){if(_0x388f3a)try{this['_desired'][_0x23d24b(0x1c7)](_0x23d24b(0x4b6)+_0x2a605e);}catch{}else _0x8740e0['push'](this[_0x23d24b(0x318)][_0x23d24b(0x492)](_0x23d24b(0x4b6)+_0x2a605e));}}if(_0x8740e0[_0x23d24b(0x3bf)])await Promise[_0x23d24b(0x540)](_0x8740e0);}}['startHeartbeat'](_0x122eb3=null){const _0x2916d2=_0x3cad20;if(this['_hbTimer'])return;if(!this['_isWriter']||!this[_0x2916d2(0x361)]){this[_0x2916d2(0x57c)]?.[_0x2916d2(0x337)]?.[_0x2916d2(0x1f0)]?.(_0x2916d2(0x313)+this[_0x2916d2(0x4a6)]+_0x2916d2(0x48e)+!!this['_statusEnv']+_0x2916d2(0x5e3),{'feature':_0x2916d2(0x5db)});return;}this[_0x2916d2(0x216)]=_0x122eb3,this['_onProcEvent']=()=>this[_0x2916d2(0x51d)]();for(const _0x202ab4 of _0x2c2f2d)this[_0x2916d2(0x57c)]['events']['on'](_0x202ab4,this[_0x2916d2(0x542)]);this[_0x2916d2(0x323)]();const _0xfd345a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4b473e;this[_0x2916d2(0x20a)]=setInterval(()=>{const _0x465f96=_0x2916d2;if(this[_0x465f96(0x216)])try{this[_0x465f96(0x216)]();}catch{}this[_0x465f96(0x323)](),this[_0x465f96(0x5fd)]()[_0x465f96(0x488)](()=>{});},_0xfd345a);if(this['_hbTimer']['unref'])this[_0x2916d2(0x20a)]['unref']();}['_maybePublish'](){const _0x5342bf=_0x3cad20;if(!this[_0x5342bf(0x4a6)]||!this['_statusEnv'])return;if(Date[_0x5342bf(0x4b1)]()-this[_0x5342bf(0x367)]<_0x2e42c9)return;this['_publishNow']();}[_0x3cad20(0x323)](){const _0x34533d=_0x3cad20;if(!this[_0x34533d(0x4a6)]||!this['_statusEnv'])return;this[_0x34533d(0x367)]=Date[_0x34533d(0x4b1)]();try{const _0x539c76=[this[_0x34533d(0x368)]()];for(const _0x7fa591 of this['_children'][_0x34533d(0x3e1)]())_0x539c76['push'](this[_0x34533d(0x389)](_0x7fa591));const _0x378275=_0x1fd8ef[_0x34533d(0x431)]?_0x1fd8ef[_0x34533d(0x4b1)]():0x0;for(const _0x1a7bd5 of _0x539c76){try{this[_0x34533d(0x516)](_0x1a7bd5),this[_0x34533d(0x328)]=![];}catch(_0x257de8){!this[_0x34533d(0x328)]&&(this[_0x34533d(0x328)]=!![],this[_0x34533d(0x57c)]?.[_0x34533d(0x337)]?.['warn']?.(_0x34533d(0x2d0)+_0x257de8['message'],{'feature':_0x34533d(0x5db)}));}}if(_0x1fd8ef[_0x34533d(0x431)])_0x1fd8ef[_0x34533d(0x587)](_0x34533d(0x4be),_0x1fd8ef[_0x34533d(0x4b1)]()-_0x378275,'rows='+_0x539c76['length']+_0x34533d(0x418));}catch(_0x1774a2){!this[_0x34533d(0x328)]&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x34533d(0x337)]?.[_0x34533d(0x1f0)]?.(_0x34533d(0x2d0)+_0x1774a2[_0x34533d(0x154)],{'feature':_0x34533d(0x5db)}));}}async[_0x3cad20(0x4b8)](){const _0x48ce22=_0x3cad20;if(this[_0x48ce22(0x542)]){for(const _0x47ef53 of _0x2c2f2d){try{this['okdb'][_0x48ce22(0x472)][_0x48ce22(0x5bb)](_0x47ef53,this['_onProcEvent']);}catch{}}this[_0x48ce22(0x542)]=null;}this['_hbTimer']&&(clearInterval(this[_0x48ce22(0x20a)]),this['_hbTimer']=null);try{if(this[_0x48ce22(0x361)]&&this[_0x48ce22(0x4a6)])await this['removeNode'](this['_rowKey']);}catch{}}async[_0x3cad20(0x288)](){const _0x125887=_0x3cad20;if(!this[_0x125887(0x361)]||!this[_0x125887(0x4a6)])return;try{await this[_0x125887(0x4c0)](this[_0x125887(0x489)]);}catch{}try{const _0x35406e=[];for(const {value:_0x77461d}of this[_0x125887(0x361)][_0x125887(0x180)](_0x2042c0)){if(_0x77461d?.[_0x125887(0x5ac)]===process[_0x125887(0x4af)]&&_0x77461d['nodeKey'])_0x35406e[_0x125887(0x437)](_0x77461d[_0x125887(0x2c3)]);}for(const _0x1450ed of _0x35406e){try{await this[_0x125887(0x4c0)](_0x1450ed);}catch{}}}catch{}}async[_0x3cad20(0x29a)](){const _0x103c89=_0x3cad20;return this[_0x103c89(0x1aa)](this[_0x103c89(0x368)]());}async['publishChildRow'](_0x2b9edb){const _0x2da6f6=_0x3cad20;if(!this['_statusEnv']||!this[_0x2da6f6(0x4a6)])return;return this['putNode'](this[_0x2da6f6(0x389)](_0x2b9edb));}['_buildChildRow']({pid:_0x53bf1d,startedAt:_0x22ca92,kind:_0xab8b62,supervisorKey:_0x2ffdc4,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3cad20(0x28c),meta:meta=null,stats:stats=null}){const _0x38c605=_0x3cad20,_0x223430=Date[_0x38c605(0x4b1)](),_0x35bb75=_0x4618b1(_0x53bf1d,_0x22ca92);return{'nodeKey':_0x4a7eba(_0x35bb75,'0'),'processKey':_0x35bb75,'instanceId':'0','pid':_0x53bf1d,'startedAt':_0x22ca92,'ppid':process[_0x38c605(0x4af)],'host':_0x328466[_0x38c605(0x5b9)](),'supervisorKey':_0x2ffdc4,'slot':slot,'slotKey':slotKey,'kind':_0xab8b62,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x223430,'expiresAt':_0x223430+_0x393321,'caps':this[_0x38c605(0x38f)](_0xab8b62,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3cad20(0x391)](_0x1dfb2b){const _0x379ecf=_0x3cad20;if(!_0x1dfb2b?.['pid'])return null;const _0x537f34=_0x4618b1(_0x1dfb2b['pid'],_0x1dfb2b[_0x379ecf(0x24e)]);this[_0x379ecf(0x2a2)]['set'](_0x537f34,{..._0x1dfb2b,'supervisorKey':_0x1dfb2b['supervisorKey']??this['_selfKey']});if(this[_0x379ecf(0x4a6)])await this[_0x379ecf(0x146)](this[_0x379ecf(0x2a2)][_0x379ecf(0x3b5)](_0x537f34))[_0x379ecf(0x488)]?.(()=>{});return _0x537f34;}[_0x3cad20(0x1d4)](_0x3d67a6){const _0x347b75=_0x3cad20;if(!_0x3d67a6)return;return this['_children'][_0x347b75(0x4a1)](_0x3d67a6),this[_0x347b75(0x4c0)](_0x3d67a6);}['_sampleOwnStats'](){const _0xf64eda=_0x3cad20,_0x2b3e74=Date[_0xf64eda(0x4b1)](),_0x613bdb=process[_0xf64eda(0x586)](),_0x51c622=(_0x2b3e74-this['_lastCpuAt'])*0x3e8;if(_0x51c622>=0x3d090){const _0x5d28dc=_0x613bdb[_0xf64eda(0x2de)]-this[_0xf64eda(0x4f3)][_0xf64eda(0x2de)]+(_0x613bdb['system']-this['_lastCpuUsage'][_0xf64eda(0x231)]),_0x569b7c=_0x328466['cpus']()['length']||0x1;this[_0xf64eda(0x1a0)]=Math['min'](0x64,Math[_0xf64eda(0x47a)](_0x5d28dc/(_0x51c622*_0x569b7c)*0x64)),this[_0xf64eda(0x1f4)]=Math[_0xf64eda(0x47a)](_0x51c622/0x3e8),this['_lastCpuUsage']=_0x613bdb,this[_0xf64eda(0x4e4)]=_0x2b3e74;}const _0x362e1b=process[_0xf64eda(0x3d1)](),_0xa9fc15=this[_0xf64eda(0x34e)][_0xf64eda(0x5e1)];let _0x4543e0=0x0;if(_0xa9fc15>0x0){const _0x1e4396=[this[_0xf64eda(0x57c)],...this[_0xf64eda(0x57c)]['_envs']?.[_0xf64eda(0x3e1)]?.()??[]];for(const _0xc5eaf9 of _0x1e4396){const _0x2ace31=_0xc5eaf9['functions']?.[_0xf64eda(0x3e7)];if(_0x2ace31)_0x4543e0+=_0x2ace31['liveThreadStats']['busy'];}}let _0x1c9780=null;const _0x1161fb=_0xa9fc15;if(_0x1161fb>0x0){let _0x28a8f4=0x0;for(const _0x48f52f of this[_0xf64eda(0x34e)][_0xf64eda(0x3e1)]())_0x28a8f4+=_0x48f52f[_0xf64eda(0x156)]||0x0;_0x1c9780={'count':_0x1161fb,'heapUsed':_0x28a8f4,'sandbox':_0xa9fc15,'busy':_0x4543e0};}return{'rss':_0x362e1b[_0xf64eda(0x195)],'heapUsed':_0x362e1b[_0xf64eda(0x156)],'heapTotal':_0x362e1b[_0xf64eda(0x16e)],'external':_0x362e1b[_0xf64eda(0x278)],'cpuPct':this[_0xf64eda(0x1a0)],'cpuWindowMs':this[_0xf64eda(0x1f4)]??null,'threads':_0x1c9780,'at':_0x2b3e74};}['reportThreadStats'](_0x490e47,_0x14f4c3){const _0x5c7ee3=_0x3cad20;if(!_0x490e47||!_0x14f4c3)return;this[_0x5c7ee3(0x34e)][_0x5c7ee3(0x2dc)](_0x490e47,_0x14f4c3);}['clearThreadStats'](_0x46625d){const _0x5c7b4f=_0x3cad20;this['_threadStats'][_0x5c7b4f(0x4a1)](_0x46625d);}[_0x3cad20(0x27f)](_0x993b11,_0x5bc434,_0x5e5643=undefined){const _0x89fdc4=_0x3cad20,_0x52ed49=this[_0x89fdc4(0x2a2)][_0x89fdc4(0x3b5)](_0x993b11);if(!_0x52ed49||!_0x5bc434)return;if(_0x5e5643!==undefined)_0x52ed49[_0x89fdc4(0x17f)]=_0x5e5643;_0x52ed49[_0x89fdc4(0x267)]={'rss':_0x5bc434[_0x89fdc4(0x195)]??null,'heapUsed':_0x5bc434[_0x89fdc4(0x156)]??null,'heapTotal':_0x5bc434[_0x89fdc4(0x16e)]??null,'external':_0x5bc434[_0x89fdc4(0x278)]??null,'cpuPct':_0x5bc434['cpuPct']??null,'cpuWindowMs':_0x5bc434[_0x89fdc4(0x454)]??null,'threads':_0x5bc434['threads']??null,'claims':_0x5bc434[_0x89fdc4(0x14f)]??null,'envsOpen':_0x5bc434[_0x89fdc4(0x30a)]??null,'at':Date['now']()};}[_0x3cad20(0x368)](){const _0x59ddee=_0x3cad20,_0x462962=Date['now'](),_0x2a5a38=this[_0x59ddee(0x57c)][_0x59ddee(0x503)]||{},_0x387ee3=this[_0x59ddee(0x235)]||'cli';return{'nodeKey':this['_rowKey'],'processKey':this[_0x59ddee(0x343)],'instanceId':this['_instanceId'],'pid':process[_0x59ddee(0x4af)],'startedAt':this[_0x59ddee(0x41e)],'instanceStartedAt':this[_0x59ddee(0x159)],'ppid':typeof process[_0x59ddee(0x5ac)]===_0x59ddee(0x5e4)?process['ppid']:null,'host':_0x328466[_0x59ddee(0x5b9)](),'supervisorKey':this[_0x59ddee(0x1bd)]??null,'version':require$$3[_0x59ddee(0x59d)],'kind':_0x387ee3,'role':{'engines':!!_0x2a5a38['engines'],'processors':!!_0x2a5a38[_0x59ddee(0x260)],'compaction':_0x2a5a38[_0x59ddee(0x46b)],'http':_0x2a5a38[_0x59ddee(0x338)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x462962,'expiresAt':_0x462962+_0x393321,'caps':this[_0x59ddee(0x38f)](_0x387ee3,_0x2a5a38),'lifecycle':{'state':_0x59ddee(0x28c),'desiredVersionApplied':null},'meta':{...this[_0x59ddee(0x432)]},'processing':_0x2a5a38['processors']?this[_0x59ddee(0x398)]():null,'engines':_0x2a5a38[_0x59ddee(0x599)]?[...this[_0x59ddee(0x57c)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x59ddee(0x507)](),'stats':this[_0x59ddee(0x27d)](),'writers':this[_0x59ddee(0x50b)]()};}['_collectWriterFacet'](){const _0xfce3a4=_0x3cad20,_0x3164d5={};try{for(const [_0x2b9e5e,_0x45a6a1]of this['okdb'][_0xfce3a4(0x580)]){try{const _0x34b2be=_0x45a6a1['writerStatus']?.();if(!_0x34b2be)continue;if(!_0x34b2be[_0xfce3a4(0x5a3)]&&!_0x34b2be['committed']&&!(_0x34b2be[_0xfce3a4(0x44a)]??0x0)&&!_0x34b2be['draining'])continue;_0x3164d5[_0x2b9e5e]={'depth':_0x34b2be[_0xfce3a4(0x5a3)],'oldestPendingMs':_0x34b2be[_0xfce3a4(0x3ed)],'committed':_0x34b2be[_0xfce3a4(0x147)],'commitsPerSec':_0x34b2be[_0xfce3a4(0x5ca)],'commitP99Ms':_0x34b2be[_0xfce3a4(0x41c)],'parkedNow':_0x34b2be[_0xfce3a4(0x44a)]??0x0,'draining':!!_0x34b2be[_0xfce3a4(0x575)]};}catch{}}}catch{}return Object[_0xfce3a4(0x17a)](_0x3164d5)['length']?_0x3164d5:null;}[_0x3cad20(0x507)](){const _0x2d84ef=_0x3cad20,_0x28a502=process['pid'],_0x15325a=Date[_0x2d84ef(0x4b1)](),_0x18895b=_0x2ac44d=>{const _0x2e6111=_0x2d84ef;if(!_0x2ac44d)return[];const _0x263786=[];try{for(const {id:_0x43e933,entry:_0x1c6f46}of _0x2ac44d[_0x2e6111(0x381)]()){if(_0x1c6f46?.[_0x2e6111(0x174)]?.[_0x2e6111(0x4af)]!==_0x28a502)continue;const _0x13e6be=_0x1c6f46[_0x2e6111(0x330)]??_0x1c6f46['acquiredAt']??0x0;if(_0x13e6be+(_0x1c6f46[_0x2e6111(0x536)]??0x0)<_0x15325a)continue;_0x263786['push'](_0x43e933);}}catch{}return _0x263786;},_0x2a9a0d=_0x18895b(this['_singletonLock']('compact')),_0x42a4bc=_0x18895b(this[_0x2d84ef(0x230)](_0x2d84ef(0x16d)));if(!_0x2a9a0d[_0x2d84ef(0x3bf)]&&!_0x42a4bc['length'])return null;return{'compact':_0x2a9a0d,'replicate':_0x42a4bc};}[_0x3cad20(0x230)](_0x1bfad8){const _0x2b4d3d=_0x3cad20;if(!this[_0x2b4d3d(0x57c)]?.[_0x2b4d3d(0x560)])return null;if(!this['_singletonLocks'])this[_0x2b4d3d(0x3f5)]=new Map();let _0x2f9d49=this['_singletonLocks'][_0x2b4d3d(0x3b5)](_0x1bfad8);if(!_0x2f9d49)try{_0x2f9d49=new _0x4b86ac(this[_0x2b4d3d(0x57c)][_0x2b4d3d(0x560)],{'namespace':_0x1bfad8}),this[_0x2b4d3d(0x3f5)][_0x2b4d3d(0x2dc)](_0x1bfad8,_0x2f9d49);}catch{return null;}return _0x2f9d49;}[_0x3cad20(0x398)](){const _0xe492f4=_0x3cad20,_0x3f4cec=[];try{for(const [_0x1dafad,_0x36d4af]of this[_0xe492f4(0x57c)][_0xe492f4(0x580)]){if(_0x1dafad[_0xe492f4(0x3ca)]('~'))continue;for(const _0x4a0376 of _0x36d4af[_0xe492f4(0x3a0)][_0xe492f4(0x3f8)]())_0x3f4cec[_0xe492f4(0x437)]({..._0x4a0376,'env':_0x1dafad});}}catch{}return{'participate':this[_0xe492f4(0x57c)][_0xe492f4(0x260)]?.[_0xe492f4(0x51f)]??![],'processors':_0x3f4cec};}['_ensureDesired'](){const _0x366d81=_0x3cad20;if(this[_0x366d81(0x318)])return!![];const _0x2226c2=this['okdb'][_0x366d81(0x560)];if(!_0x2226c2)return![];return this[_0x366d81(0x318)]=_0x2226c2[_0x366d81(0x592)](_0x4b65f1,{'dupSort':![]}),this[_0x366d81(0x2af)]=_0x2226c2[_0x366d81(0x592)](_0x31a30f,{'dupSort':![]}),!![];}async[_0x3cad20(0x55a)](){const _0x2a8e65=_0x3cad20;if(!this[_0x2a8e65(0x4db)]())return;const _0x32a8ea=_0x2a8e65(0x2ad),_0x3505c2=0x1,_0x3883bc=this[_0x2a8e65(0x318)][_0x2a8e65(0x3b5)](_0x32a8ea)??0x0;if(_0x3883bc>=_0x3505c2)return;const _0x5663de=_0x101f5e=>{const _0x1a5a4e=_0x2a8e65;if(_0x101f5e===_0x1a5a4e(0x248))return'single';if(_0x101f5e===_0x1a5a4e(0x52f))return _0x1a5a4e(0x32b);return _0x101f5e;};await this[_0x2a8e65(0x57c)]['_systemEnv']['_writer']['transaction'](()=>{const _0x10518e=_0x2a8e65;for(const _0x466e5a of[_0x10518e(0x385),'procmodeack/']){for(const {key:_0x3d77f6,value:_0x48412a}of this['_desired']['getRange']({'start':_0x466e5a,'end':_0x466e5a+'\xff'})){if(typeof _0x3d77f6!==_0x10518e(0x5d2)||!_0x3d77f6[_0x10518e(0x3ca)](_0x466e5a))break;const _0x2d34c4=_0x5663de(_0x48412a[_0x10518e(0x1e2)]);if(_0x2d34c4!==_0x48412a['mode'])this[_0x10518e(0x318)][_0x10518e(0x491)](_0x3d77f6,{..._0x48412a,'mode':_0x2d34c4});}}this['_desired']['put'](_0x32a8ea,_0x3505c2);});}[_0x3cad20(0x316)](){const _0x35e562=_0x3cad20;return!!this[_0x35e562(0x318)];}[_0x3cad20(0x1f2)](_0x5e4522,_0x2327e3){const _0x438dd4=_0x3cad20;if(!this[_0x438dd4(0x4db)]())return null;const _0x1f77db=_0x5e4522+'/'+_0x2327e3;return this[_0x438dd4(0x1f7)](),this[_0x438dd4(0x3db)][_0x438dd4(0x3b5)](_0x1f77db)??this['_desired'][_0x438dd4(0x3b5)](_0x1f77db)??null;}[_0x3cad20(0x1f7)](){const _0x2cbdb3=_0x3cad20;if(!_0x388f3a)return;try{this[_0x2cbdb3(0x57c)][_0x2cbdb3(0x466)]?.['db']?.[_0x2cbdb3(0x161)]?.();}catch{}}async[_0x3cad20(0x4dc)](_0x2d82fa,_0x19bccc,_0x28eb7f){const _0x7ae403=_0x3cad20;if(!this[_0x7ae403(0x4db)]())return null;const _0x3133ea=_0x2d82fa+'/'+_0x19bccc;this[_0x7ae403(0x1f7)]();const _0x432e67=this[_0x7ae403(0x3db)][_0x7ae403(0x3b5)](_0x3133ea)??this[_0x7ae403(0x318)][_0x7ae403(0x3b5)](_0x3133ea)??{'version':0x0},_0x37a6dd=(_0x432e67['version']||0x0)+0x1,_0x5d43ed={..._0x432e67,..._0x28eb7f,'version':_0x37a6dd,'updatedAt':Date[_0x7ae403(0x4b1)]()};this[_0x7ae403(0x3db)]['set'](_0x3133ea,_0x5d43ed);try{await this[_0x7ae403(0x57c)][_0x7ae403(0x466)][_0x7ae403(0x56b)][_0x7ae403(0x590)](()=>{const _0x54a385=_0x7ae403;this['_desired'][_0x54a385(0x491)](_0x3133ea,_0x5d43ed);});}finally{if(this[_0x7ae403(0x3db)][_0x7ae403(0x3b5)](_0x3133ea)===_0x5d43ed)this['_desiredOverlay'][_0x7ae403(0x4a1)](_0x3133ea);}return _0x37a6dd;}[_0x3cad20(0x5d3)](_0x5c29bc){const _0x5b6be1=_0x3cad20;if(!this[_0x5b6be1(0x4db)]())return[];this[_0x5b6be1(0x1f7)]();const _0x19fd40=_0x5c29bc+'/',_0x43fc85=[];for(const {key:_0x3a04d1,value:_0x5d23ed}of this['_desired'][_0x5b6be1(0x180)]({'start':_0x19fd40,'end':_0x19fd40+'\xff'})){if(typeof _0x3a04d1!==_0x5b6be1(0x5d2)||!_0x3a04d1[_0x5b6be1(0x3ca)](_0x19fd40))break;_0x43fc85[_0x5b6be1(0x437)]({'key':_0x3a04d1[_0x5b6be1(0x467)](_0x19fd40[_0x5b6be1(0x3bf)]),'value':_0x5d23ed});}return _0x43fc85;}[_0x3cad20(0x604)](_0x471daa){const _0x335f11=_0x3cad20;if(!this[_0x335f11(0x4db)]())return null;return this['_cmd'][_0x335f11(0x3b5)](_0x471daa)??null;}async[_0x3cad20(0x2b3)](_0x486830,_0x11aa07,_0x20b1a8={}){const _0x3accdb=_0x3cad20;if(!this['_ensureDesired']())return null;let _0x374eb7;return await this[_0x3accdb(0x57c)][_0x3accdb(0x466)][_0x3accdb(0x56b)]['transaction'](()=>{const _0x20b9a0=_0x3accdb,_0x546285=this[_0x20b9a0(0x2af)][_0x20b9a0(0x3b5)](_0x486830)||{'epoch':0x0};_0x374eb7=(_0x546285[_0x20b9a0(0x306)]||0x0)+0x1,this['_cmd']['put'](_0x486830,{..._0x546285,..._0x20b1a8,'cmd':_0x11aa07,'epoch':_0x374eb7,'updatedAt':Date[_0x20b9a0(0x4b1)]()});}),_0x374eb7;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1c8313,'nodeKey':_0x4618b1,'logicalKey':_0x3aa567,'slotKey':_0x951548,'PROCESS_ENV':_0x24ad5e,'NODE_TYPE':_0x2042c0},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x53b1e7=_0x457462;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5677a1=require$$0$6,{EVENTS:_0x220218,CHANGE_ACTIONS:_0x399e24}=requireOkdbEnums(),{LOOP:_0xaa5763}=requireOkdbLoopMonitor(),_0xf1c10a=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x1f4c7d=0x5,_0x26e302=0x2710;class _0x131354 extends _0x5677a1{constructor(_0x185c7c,_0x2849dd={}){const _0x4057ca=_0x5d69;super(),this[_0x4057ca(0x57c)]=_0x185c7c,this[_0x4057ca(0x294)]=_0x2849dd[_0x4057ca(0x5e8)]??_0xf1c10a,this[_0x4057ca(0x3bb)]=_0x2849dd['flushDebounce']??_0x1f4c7d,this[_0x4057ca(0x3a7)]=_0x2849dd[_0x4057ca(0x35a)]??_0x26e302,this['_started']=![],this[_0x4057ca(0x3b8)]=new Map(),this[_0x4057ca(0x46e)]=new Map(),this[_0x4057ca(0x272)]=new Map(),this[_0x4057ca(0x1a9)]=null,this[_0x4057ca(0x15e)]=![],this[_0x4057ca(0x39b)]=new Set(),this[_0x4057ca(0x2ff)]=_0x1007e9=>this[_0x4057ca(0x523)](_0x1007e9),this['_onPoke']=_0xe70819=>this['_handlePoke'](_0xe70819),this['_onStop']=()=>this['stop']();}[_0x53b1e7(0x184)](){const _0x4c77b3=_0x53b1e7;if(this[_0x4c77b3(0x4e1)])return;this[_0x4c77b3(0x4e1)]=!![];for(const [_0x3d88d7,_0x1865d3]of this['okdb'][_0x4c77b3(0x580)]){if(_0x3d88d7[_0x4c77b3(0x3ca)]('~'))continue;try{_0x1865d3[_0x4c77b3(0x2e1)]();}catch{}}for(const [_0x14418e,_0x37080b]of this[_0x4c77b3(0x57c)][_0x4c77b3(0x580)]){if(_0x14418e['startsWith']('~'))continue;try{this['_baselines'][_0x4c77b3(0x2dc)](_0x14418e,_0x37080b[_0x4c77b3(0x1d5)]()||0x0);}catch{}}const {events:_0x2ea1a2}=this['okdb'];_0x2ea1a2['on'](_0x220218[_0x4c77b3(0x191)],this[_0x4c77b3(0x2ff)]),_0x2ea1a2['on'](_0x220218[_0x4c77b3(0x309)],this[_0x4c77b3(0x2ff)]),_0x2ea1a2['on'](_0x220218[_0x4c77b3(0x53c)],this[_0x4c77b3(0x2ff)]),_0x2ea1a2['on'](_0x220218[_0x4c77b3(0x401)],this[_0x4c77b3(0x52d)]),_0x2ea1a2[_0x4c77b3(0x3c1)](_0x220218[_0x4c77b3(0x21a)],this[_0x4c77b3(0x58d)]);}[_0x53b1e7(0x44f)](){const _0x4bae3a=_0x53b1e7;if(!this[_0x4bae3a(0x4e1)])return;this[_0x4bae3a(0x4e1)]=![];const {events:_0x2b7022}=this[_0x4bae3a(0x57c)];_0x2b7022[_0x4bae3a(0x5bb)](_0x220218[_0x4bae3a(0x191)],this[_0x4bae3a(0x2ff)]),_0x2b7022['off'](_0x220218[_0x4bae3a(0x309)],this['_onItem']),_0x2b7022[_0x4bae3a(0x5bb)](_0x220218[_0x4bae3a(0x53c)],this['_onItem']),_0x2b7022['off'](_0x220218[_0x4bae3a(0x401)],this[_0x4bae3a(0x52d)]);try{_0x2b7022[_0x4bae3a(0x5bb)](_0x220218[_0x4bae3a(0x21a)],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x4bae3a(0x1a9)]),this[_0x4bae3a(0x1a9)]=null),this[_0x4bae3a(0x272)][_0x4bae3a(0x1f1)](),this[_0x4bae3a(0x3b8)][_0x4bae3a(0x1f1)](),this[_0x4bae3a(0x46e)]['clear'](),this[_0x4bae3a(0x39b)][_0x4bae3a(0x1f1)]();}[_0x53b1e7(0x535)](_0xc13753,_0x5c93a8,_0x467fc5,_0x1e4edd){return _0xc13753+'\x00'+_0x5c93a8+'\x00'+_0x467fc5+'\x00'+_0x1e4edd;}['_markSeen'](_0x93278f,_0x2d8e21,_0x527c83,_0x5cb0f5){const _0x561d41=_0x53b1e7,_0x13e2fd=this[_0x561d41(0x535)](_0x93278f,_0x2d8e21,_0x527c83,_0x5cb0f5);if(this[_0x561d41(0x39b)][_0x561d41(0x30f)](_0x13e2fd))return![];this[_0x561d41(0x39b)]['add'](_0x13e2fd);if(this[_0x561d41(0x39b)]['size']>this[_0x561d41(0x3a7)]){const _0x9bf0bf=this[_0x561d41(0x39b)]['values']()[_0x561d41(0x505)]()['value'];this[_0x561d41(0x39b)][_0x561d41(0x4a1)](_0x9bf0bf);}return!![];}['_handleInProcess'](_0x9a2e2){const _0x155795=_0x53b1e7;if(!this[_0x155795(0x4e1)]||!_0x9a2e2)return;const {env:_0x53d40b,type:_0x3d7b9e,key:_0x35b8de,clock:_0x34c361,origin:_0x3d5149,action:_0x18323e,newValue:_0x31923b,oldValue:_0x2985a0}=_0x9a2e2;if(_0x53d40b==null||_0x3d7b9e==null||_0x35b8de==null)return;if(typeof _0x53d40b===_0x155795(0x5d2)&&_0x53d40b[_0x155795(0x3ca)]('~'))return;if(typeof _0x3d7b9e===_0x155795(0x5d2)&&_0x3d7b9e['startsWith']('~'))return;if(!this[_0x155795(0x3c2)](_0x53d40b,_0x3d7b9e,_0x35b8de,_0x34c361))return;const _0x276c3b=_0x18323e===_0x399e24[_0x155795(0x5a0)]?_0x155795(0x492):'put';this[_0x155795(0x3dc)](_0x155795(0x143),{'env':_0x53d40b,'type':_0x3d7b9e,'key':_0x35b8de,'op':_0x276c3b,'clock':_0x34c361,'origin':_0x3d5149,'value':_0x276c3b===_0x155795(0x492)?null:_0x31923b,'prevValue':_0x2985a0});}['_handlePoke'](_0x5bd348){const _0x2df96e=_0x53b1e7;if(!this[_0x2df96e(0x4e1)])return;if(!_0x5bd348||typeof _0x5bd348[_0x2df96e(0x15f)]!==_0x2df96e(0x5d2)||typeof _0x5bd348[_0x2df96e(0x2cd)]!==_0x2df96e(0x5d2))return;const {env:_0x1baa4c,type:_0x1baf32}=_0x5bd348;if(_0x1baa4c['startsWith']('~')||_0x1baf32[_0x2df96e(0x3ca)]('~'))return;this[_0x2df96e(0x272)][_0x2df96e(0x2dc)](_0x1baa4c+'\x00'+_0x1baf32,{'env':_0x1baa4c,'type':_0x1baf32}),this[_0x2df96e(0x403)]();}[_0x53b1e7(0x403)](){const _0x4e1179=_0x53b1e7;if(this[_0x4e1179(0x1a9)])return;const _0x62f712=()=>{const _0x4233bb=_0x4e1179;this[_0x4233bb(0x1a9)]=null,this[_0x4233bb(0x15d)]()[_0x4233bb(0x488)](()=>{});};this[_0x4e1179(0x1a9)]=setTimeout(_0x62f712,this[_0x4e1179(0x3bb)]>0x0?this[_0x4e1179(0x3bb)]:0x0);}async[_0x53b1e7(0x15d)](){const _0x185650=_0x53b1e7;if(this['_draining']){this[_0x185650(0x403)]();return;}this['_draining']=!![];try{const _0x4456ed=[...this[_0x185650(0x272)][_0x185650(0x3e1)]()];this[_0x185650(0x272)][_0x185650(0x1f1)]();let _0xfc68b2=![];for(const {env:_0x547e01,type:_0x29756d}of _0x4456ed){try{const _0x930640=await this[_0x185650(0x312)](_0x547e01,_0x29756d);if(_0x930640)_0xfc68b2=!![];}catch{this[_0x185650(0x272)][_0x185650(0x2dc)](_0x547e01+'\x00'+_0x29756d,{'env':_0x547e01,'type':_0x29756d}),_0xfc68b2=!![];}}if(_0xfc68b2||this[_0x185650(0x272)][_0x185650(0x5e1)]>0x0)this[_0x185650(0x403)]();}finally{this[_0x185650(0x15e)]=![];}}async['_drainOne'](_0x3988a1,_0x2eb408){const _0x5110cb=_0x53b1e7,_0x23662d=await this[_0x5110cb(0x57c)]['_openEnvLazy'](_0x3988a1),_0x5a3111=_0x3988a1+'\x00'+_0x2eb408;!this['_cursors']['has'](_0x5a3111)&&(!this[_0x5110cb(0x46e)][_0x5110cb(0x30f)](_0x3988a1)&&(_0x23662d[_0x5110cb(0x2e1)](),this['_baselines']['set'](_0x3988a1,_0x23662d[_0x5110cb(0x1d5)]()||0x0)),this[_0x5110cb(0x3b8)]['set'](_0x5a3111,this[_0x5110cb(0x46e)][_0x5110cb(0x3b5)](_0x3988a1)));const _0x147288=this[_0x5110cb(0x3b8)][_0x5110cb(0x3b5)](_0x5a3111),_0x286aac=_0x23662d[_0x5110cb(0x1d5)](_0x2eb408)||0x0;if(_0x286aac<=_0x147288)return![];const _0x2e5756=_0x147288+this[_0x5110cb(0x294)],_0x2ba1be=Math[_0x5110cb(0x41f)](_0x286aac,_0x2e5756),_0x5c8ee5=_0xaa5763[_0x5110cb(0x431)]?_0xaa5763[_0x5110cb(0x4b1)]():0x0,_0x3afffc=Array[_0x5110cb(0x1f8)](_0x23662d['getChanges'](_0x2eb408,_0x147288+0x1,_0x2ba1be));let _0x594a48=_0x147288;for(const _0x5627f7 of _0x3afffc){const {clock:_0x416920,key:_0x1d843d,action:_0x840dcb,origin:_0x453bd9}=_0x5627f7;if(_0x416920>_0x594a48)_0x594a48=_0x416920;if(_0x1d843d==null)continue;if(!this[_0x5110cb(0x3c2)](_0x3988a1,_0x2eb408,_0x1d843d,_0x416920))continue;let _0x1a3e35,_0x18997f;if(_0x840dcb===_0x399e24[_0x5110cb(0x5a0)])_0x1a3e35=_0x5110cb(0x492),_0x18997f=null;else{const _0x11b110=_0x23662d[_0x5110cb(0x3b5)](_0x2eb408,_0x1d843d);_0x11b110==null?(_0x1a3e35=_0x5110cb(0x492),_0x18997f=null):(_0x1a3e35=_0x5110cb(0x491),_0x18997f=_0x11b110);}this[_0x5110cb(0x3dc)](_0x5110cb(0x143),{'env':_0x3988a1,'type':_0x2eb408,'key':_0x1d843d,'op':_0x1a3e35,'clock':_0x416920,'origin':_0x453bd9,'value':_0x18997f});}if(_0xaa5763[_0x5110cb(0x431)])_0xaa5763[_0x5110cb(0x587)](_0x5110cb(0x518)+_0x3988a1+':'+_0x2eb408,_0xaa5763[_0x5110cb(0x4b1)]()-_0x5c8ee5,'n='+_0x3afffc[_0x5110cb(0x3bf)]);return this['_cursors']['set'](_0x5a3111,Math['max'](_0x594a48,_0x2ba1be)),_0x23662d[_0x5110cb(0x1d5)](_0x2eb408)>_0x2ba1be;}[_0x53b1e7(0x281)](){const _0x1173ca=_0x53b1e7;return{'started':this['_started'],'quantum':this[_0x1173ca(0x294)],'flushDebounce':this[_0x1173ca(0x3bb)],'cursors':Object['fromEntries']([...this[_0x1173ca(0x3b8)][_0x1173ca(0x487)]()][_0x1173ca(0x3b9)](([_0x686239,_0x2b8138])=>[_0x686239[_0x1173ca(0x5c4)]('\x00',':'),_0x2b8138])),'pending':this['_pending'][_0x1173ca(0x5e1)],'seen':this['_seen']['size']};}}return _0x131354[_0x53b1e7(0x3a9)]=_0xf1c10a,okdbChangefeed={'OKDBChangefeed':_0x131354},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x4358a0=_0x457462;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x16db44=require$$1$2,_0x19c480=require$$1,{EVENTS:_0x5b5f21}=requireOkdbEnums(),_0x22ae5c=require$$0,{slotKey:_0x31b235}=requireOkdbProcessRegistry(),_0x17cccf=0xfa,_0x3a78db=0xfa0,_0x5ce21c=0x5,_0x3f4915=0x2710,_0x9ff3cd=0xbb8,_0x343c86=0x7d0,_0x4aa645='__okdbCluster',_0x285803=_0x4358a0(0x276),_0x2af57f=_0x4358a0(0x337),_0xed134e='stats',_0x245a5b=[_0x5b5f21[_0x4358a0(0x34d)],_0x5b5f21[_0x4358a0(0x550)],_0x5b5f21[_0x4358a0(0x369)],_0x5b5f21[_0x4358a0(0x331)],_0x5b5f21[_0x4358a0(0x19f)],_0x5b5f21[_0x4358a0(0x392)],_0x5b5f21[_0x4358a0(0x46d)],_0x5b5f21['INDEX_REGISTERED'],_0x4358a0(0x199),_0x4358a0(0x1c3),_0x4358a0(0x4fb),_0x4358a0(0x237),_0x4358a0(0x3fc),'processor:retry'],_0x370fbd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x23be2a({workers:_0x1c536d,makeOkdb:_0x20db35,port:_0x3e13ed,primaryOkdb:_0x1d7e14,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x442575=_0x4358a0;if(_0x16db44['isPrimary'])return childEntry&&_0x16db44[_0x442575(0x453)]({'exec':_0x19c480[_0x442575(0x1f6)](__dirname,_0x442575(0x4fd)),'args':[],'execArgv':((()=>{const _0x11aaf8=_0x442575,_0x2d12fd=[];for(let _0x365f47=0x0;_0x365f47<process['execArgv'][_0x11aaf8(0x3bf)];_0x365f47++){const _0x514c9f=process[_0x11aaf8(0x370)][_0x365f47];if(_0x514c9f[_0x11aaf8(0x3ca)](_0x11aaf8(0x2bc))||_0x514c9f[_0x11aaf8(0x3ca)](_0x11aaf8(0x179))||_0x514c9f['startsWith'](_0x11aaf8(0x4a9)))continue;if(_0x514c9f==='-e'||_0x514c9f==='--eval'||_0x514c9f==='-p'||_0x514c9f===_0x11aaf8(0x36d)){_0x365f47++;continue;}_0x2d12fd['push'](_0x514c9f);}return _0x2d12fd;})())}),_0x4a5238({'workers':_0x1c536d,'port':_0x3e13ed,'primaryOkdb':_0x1d7e14,'workerEnv':workerEnv});return _0x5650ce({'makeOkdb':_0x20db35,'port':_0x3e13ed});}function _0x4a5238({workers:_0x52e4e7,port:_0x1d355e,primaryOkdb:_0x5af39a,workerEnv:_0x3a25ac}){const _0x446f1a=_0x4358a0,_0x5c817a=new Map(),_0x56c7a2=new Map();let _0x152dce=![];const _0x49565f=_0x3a805c=>_0x3a805c?.[_0x446f1a(0x400)],_0x406271=_0x5a2b31=>{const _0x250196=_0x446f1a,_0x3b7a2e=_0x16db44['fork']({...process.env,..._0x3a25ac||{},'OKDB_CLUSTER_SLOT':String(_0x5a2b31)});return _0x3b7a2e[_0x250196(0x400)]=_0x5a2b31,_0x5c817a['set'](_0x3b7a2e[_0x250196(0x1cf)][_0x250196(0x4af)],{'worker':_0x3b7a2e,'startedAt':Date['now'](),'slot':_0x5a2b31}),_0x3b7a2e['on'](_0x250196(0x1db),_0x4af997=>{const _0x8d29bc=_0x250196;console[_0x8d29bc(0x337)](_0x8d29bc(0x1b0)+_0x3b7a2e[_0x8d29bc(0x1cf)]['pid']+_0x8d29bc(0x57b)+(_0x4af997?.[_0x8d29bc(0x154)]??_0x4af997));}),_0x3b7a2e['on'](_0x250196(0x3a4),()=>_0x4293bb()),_0x3b7a2e;},_0x45181a=_0x4bd64=>{const _0x395a1c=_0x446f1a;for(const {worker:_0x2092fb}of _0x5c817a[_0x395a1c(0x3e1)]()){if(_0x2092fb[_0x395a1c(0x13a)]()||!_0x2092fb[_0x395a1c(0x2b8)]())continue;try{_0x2092fb[_0x395a1c(0x353)](_0x4bd64);}catch{}}};_0x5af39a?.['_activateProcesses']?.({'kind':_0x446f1a(0x13e),'listenAddr':':'+_0x1d355e})['catch'](()=>{}),_0x5af39a?.[_0x446f1a(0x5db)]?.[_0x446f1a(0x244)]?.({'workersConfigured':_0x52e4e7});const _0x33da1f={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x4293bb=()=>{const _0x36e861=_0x446f1a,_0x18e531=_0x5af39a?.[_0x36e861(0x5db)];if(!_0x18e531||!_0x18e531[_0x36e861(0x4a6)])return;const _0x2c332d=_0x18e531[_0x36e861(0x320)];for(const {worker:_0xa7594f,startedAt:_0x1c6d3f,slot:_0x197fba,stats:_0x49ec21,processing:_0x5b4fdb}of _0x5c817a[_0x36e861(0x3e1)]()){if(_0xa7594f[_0x36e861(0x13a)]())continue;const _0x75e12b=_0x18e531[_0x36e861(0x316)]?.()&&_0x18e531['getDesired'](_0x36e861(0x608),_0x38926f(_0x197fba))?.[_0x36e861(0x1d8)]===!![];_0x18e531[_0x36e861(0x146)]({'pid':_0xa7594f['process'][_0x36e861(0x4af)],'startedAt':_0x1c6d3f,'kind':_0x36e861(0x3d9),'supervisorKey':_0x2c332d,'slot':_0x197fba,'slotKey':_0x38926f(_0x197fba),'role':_0x33da1f,'listenAddr':':'+_0x1d355e,'lifecycle':_0x75e12b?_0x36e861(0x18d):'running','processing':_0x5b4fdb??null,'stats':_0x49ec21??null})[_0x36e861(0x488)](()=>{});}},_0x38926f=_0x3826cb=>_0x31b235(_0x446f1a(0x40a)+_0x1d355e,_0x3826cb),_0x594fbf=_0x182766=>{const _0x177136=_0x446f1a,_0x2f16be=_0x5af39a?.['processes'];if(!_0x2f16be?.[_0x177136(0x316)]?.())return![];return _0x2f16be[_0x177136(0x1f2)](_0x177136(0x608),_0x38926f(_0x182766))?.['decommission']===!![];};for(let _0x5caff6=0x0;_0x5caff6<_0x52e4e7;_0x5caff6++){const _0x16b928=_0x594fbf(_0x5caff6);_0x56c7a2['set'](_0x5caff6,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x16b928,'respawnTimer':null}),_0x16b928?console[_0x446f1a(0x337)](_0x446f1a(0x23e)+_0x5caff6+_0x446f1a(0x17c)):_0x406271(_0x5caff6);}const _0x4ee0ec=()=>{const _0xb80370=_0x446f1a,_0x4c4b95=_0x5af39a?.[_0xb80370(0x5db)];if(!_0x4c4b95?.[_0xb80370(0x4a6)]||!_0x4c4b95['hasDesired']?.())return;for(const [_0x2339f3,_0x553be7]of _0x56c7a2[_0xb80370(0x487)]()){const _0x46a987=_0x4c4b95[_0xb80370(0x1f2)](_0xb80370(0x608),_0x38926f(_0x2339f3)),_0x40398a=_0x46a987?.['decommission']===!![],_0x3b8866=_0x46a987?.[_0xb80370(0x217)]===!![];if(_0x40398a&&!_0x553be7['dead']){_0x553be7[_0xb80370(0x5dd)]=!![];_0x553be7['respawnTimer']&&(clearTimeout(_0x553be7[_0xb80370(0x406)]),_0x553be7[_0xb80370(0x406)]=null);for(const {worker:_0x51e55d}of _0x5c817a[_0xb80370(0x3e1)]()){if(_0x49565f(_0x51e55d)!==_0x2339f3||_0x51e55d['isDead']())continue;try{if(_0x3b8866)_0x51e55d[_0xb80370(0x1cf)][_0xb80370(0x217)](_0xb80370(0x22e));else _0x51e55d[_0xb80370(0x2b8)]()&&_0x51e55d[_0xb80370(0x3fd)]();}catch{}}console[_0xb80370(0x337)](_0xb80370(0x3d3)+(_0x3b8866?_0xb80370(0x582):_0xb80370(0x3c8))+_0xb80370(0x2ee)+_0x2339f3+_0xb80370(0x475));}else{if(!_0x40398a&&_0x553be7[_0xb80370(0x5dd)]&&_0x46a987){_0x553be7['dead']=![],_0x553be7[_0xb80370(0x2ec)]=[],_0x553be7[_0xb80370(0x5d7)]=0x0;const _0x28ec63=[..._0x5c817a['values']()][_0xb80370(0x4c6)](({worker:_0x7e3a04})=>_0x49565f(_0x7e3a04)===_0x2339f3&&!_0x7e3a04[_0xb80370(0x13a)]());!_0x28ec63&&!_0x152dce&&(_0x406271(_0x2339f3),console[_0xb80370(0x337)](_0xb80370(0x39f)+_0x2339f3));}}}},_0x507cc6=()=>{try{_0x4ee0ec();}catch{}};_0x5af39a?.[_0x446f1a(0x472)]?.['on']?.(_0x5b5f21['SYSTEM_PROC'],_0x507cc6);const _0x16b5be=[];if(_0x5af39a?.[_0x446f1a(0x472)]?.['on'])for(const _0x514682 of _0x245a5b){const _0x352bb9=_0x4984b6=>{_0x45181a({[_0x4aa645]:_0x285803,'event':_0x514682,'data':_0x4984b6??{}});};_0x5af39a[_0x446f1a(0x472)]['on'](_0x514682,_0x352bb9),_0x16b5be[_0x446f1a(0x437)]({'event':_0x514682,'handler':_0x352bb9});}const _0x3641de=setInterval(()=>{_0x4ee0ec(),_0x4293bb();},_0x370fbd);_0x3641de[_0x446f1a(0x23c)]?.();const _0x52fbbe=(_0x47f115,_0x48c3aa)=>{const _0x3713de=_0x446f1a;if(!_0x48c3aa||typeof _0x48c3aa!==_0x3713de(0x3aa)||_0x48c3aa[_0x4aa645]!==_0x2af57f)return;if(!_0x5af39a?.[_0x3713de(0x337)]?.[_0x3713de(0x423)])return;const _0x4a1a4e=_0x48c3aa[_0x3713de(0x2c9)]||{};_0x5af39a[_0x3713de(0x337)][_0x3713de(0x423)]({..._0x4a1a4e,'msg':'[w'+_0x48c3aa[_0x3713de(0x608)]+']\x20'+(_0x4a1a4e[_0x3713de(0x29e)]??''),'meta':{..._0x4a1a4e['meta']||{},'worker':_0x48c3aa[_0x3713de(0x608)],'workerPid':_0x48c3aa[_0x3713de(0x4af)]}});};_0x16db44['on']('message',_0x52fbbe);const _0x31f6cf=(_0x2befa1,_0x5effde)=>{const _0x4900a5=_0x446f1a;if(!_0x5effde||typeof _0x5effde!==_0x4900a5(0x3aa)||_0x5effde[_0x4aa645]!==_0xed134e)return;const _0x180c4b=_0x5c817a[_0x4900a5(0x3b5)](_0x2befa1[_0x4900a5(0x1cf)][_0x4900a5(0x4af)]);if(_0x180c4b){_0x180c4b[_0x4900a5(0x267)]={..._0x5effde[_0x4900a5(0x267)],'at':Date[_0x4900a5(0x4b1)]()};if(_0x5effde['processing']!==undefined)_0x180c4b['processing']=_0x5effde['processing'];}};_0x16db44['on'](_0x446f1a(0x154),_0x31f6cf),_0x16db44['on'](_0x446f1a(0x2be),(_0x5399b3,_0x2fa178,_0x2cf233)=>{const _0x2b14d8=_0x446f1a,_0x163d53=_0x5399b3['process']['pid'],_0x102067=_0x49565f(_0x5399b3),_0x4000a8=_0x5c817a[_0x2b14d8(0x3b5)](_0x163d53);if(_0x4000a8&&_0x5af39a?.['processes'])_0x5af39a['processes'][_0x2b14d8(0x4c0)](_0x163d53+':'+_0x4000a8[_0x2b14d8(0x24e)])['catch'](()=>{});_0x5c817a[_0x2b14d8(0x4a1)](_0x163d53),console['log'](_0x2b14d8(0x1b0)+_0x163d53+_0x2b14d8(0x435)+(_0x102067??'?')+_0x2b14d8(0x165)+(_0x2b14d8(0x598)+_0x2fa178+_0x2b14d8(0x30c)+(_0x2cf233??'none')+');\x20'+_0x5c817a['size']+'\x20worker(s)\x20remaining')),_0x4293bb();if(_0x152dce||_0x102067==null)return;const _0x43f349=_0x56c7a2['get'](_0x102067);if(!_0x43f349||_0x43f349['dead'])return;const _0x29a3e1=Date['now']();_0x43f349[_0x2b14d8(0x2ec)][_0x2b14d8(0x437)](_0x29a3e1),_0x43f349[_0x2b14d8(0x2ec)]=_0x43f349[_0x2b14d8(0x2ec)]['filter'](_0x3d3542=>_0x29a3e1-_0x3d3542<=_0x3f4915);if(_0x43f349[_0x2b14d8(0x2ec)]['length']>=_0x5ce21c){_0x43f349[_0x2b14d8(0x5dd)]=!![],console[_0x2b14d8(0x1db)](_0x2b14d8(0x1bc)+_0x102067+_0x2b14d8(0x19d)+_0x43f349[_0x2b14d8(0x2ec)][_0x2b14d8(0x3bf)]+'\x20times\x20in\x20'+(_0x3f4915+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x5c817a[_0x2b14d8(0x5e1)]+_0x2b14d8(0x137)));return;}_0x43f349[_0x2b14d8(0x5d7)]++;const _0x4bc893=Math[_0x2b14d8(0x41f)](_0x3a78db,_0x17cccf*0x2**(_0x43f349[_0x2b14d8(0x5d7)]-0x1));console['log'](_0x2b14d8(0x427)+_0x102067+'\x20in\x20'+_0x4bc893+_0x2b14d8(0x1d2)+_0x43f349['consecutiveFailures']+')'),_0x43f349[_0x2b14d8(0x406)]=setTimeout(()=>{const _0x36dac5=_0x2b14d8;_0x43f349[_0x36dac5(0x406)]=null;if(_0x152dce||_0x43f349[_0x36dac5(0x5dd)])return;const _0x5dc3d6=_0x406271(_0x102067);_0x5dc3d6[_0x36dac5(0x3c1)](_0x36dac5(0x4bd),()=>{const _0x4b8623=_0x36dac5;if(_0x56c7a2['get'](_0x102067)===_0x43f349)_0x43f349[_0x4b8623(0x5d7)]=0x0;});},_0x4bc893),_0x43f349[_0x2b14d8(0x406)][_0x2b14d8(0x23c)]?.();});const _0x5403c5=[..._0x5c817a[_0x446f1a(0x17a)]()];console['log'](_0x446f1a(0x521)+process[_0x446f1a(0x4af)]+'\x20forked\x20'+_0x52e4e7+_0x446f1a(0x5c0)+_0x1d355e+':\x20'+('['+_0x5403c5[_0x446f1a(0x1f6)](',\x20')+']'));const _0x53446d={'_isClusterController':!![],'port':_0x1d355e,'primaryOkdb':_0x5af39a??null,'status'(){const _0x2b82f3=_0x446f1a;return{'clustered':!![],'primaryPid':process[_0x2b82f3(0x4af)],'port':_0x1d355e,'primaryRole':_0x5af39a?.[_0x2b82f3(0x452)]??null,'processorPid':null,'supervisorPid':process[_0x2b82f3(0x4af)],'workers':[..._0x5c817a[_0x2b82f3(0x3e1)]()][_0x2b82f3(0x3b9)](({worker:_0x4c5006})=>({'pid':_0x4c5006['process']['pid'],'id':_0x4c5006['id'],'dead':_0x4c5006[_0x2b82f3(0x13a)]()}))};},async 'close'(){const _0x4534e0=_0x446f1a;_0x152dce=!![];for(const _0x5367db of _0x56c7a2[_0x4534e0(0x3e1)]()){_0x5367db['dead']=!![],_0x5367db['respawnTimer']&&(clearTimeout(_0x5367db[_0x4534e0(0x406)]),_0x5367db[_0x4534e0(0x406)]=null);}clearInterval(_0x3641de),_0x16db44[_0x4534e0(0x5bb)]('message',_0x52fbbe),_0x16db44['off'](_0x4534e0(0x154),_0x31f6cf),_0x5af39a?.[_0x4534e0(0x472)]?.[_0x4534e0(0x5bb)]?.(_0x5b5f21[_0x4534e0(0x597)],_0x507cc6);if(_0x5af39a?.['events']?.[_0x4534e0(0x5bb)])for(const {event:_0x488a0d,handler:_0x4cb1ea}of _0x16b5be){try{_0x5af39a['events'][_0x4534e0(0x5bb)](_0x488a0d,_0x4cb1ea);}catch{}}_0x16b5be[_0x4534e0(0x3bf)]=0x0;const _0xbee34b=[..._0x5c817a[_0x4534e0(0x3e1)]()][_0x4534e0(0x3b9)](({worker:_0x5939dd})=>_0x5939dd);if(_0xbee34b[_0x4534e0(0x3bf)]===0x0)return;await Promise['all'](_0xbee34b['map'](_0x462a9f=>new Promise(_0x42036a=>{const _0x120fc2=_0x4534e0;if(_0x462a9f[_0x120fc2(0x13a)]()){_0x42036a();return;}let _0x10c60e=![];const _0x4ff454=()=>{if(_0x10c60e)return;_0x10c60e=!![];if(_0x42dc9c)clearTimeout(_0x42dc9c);_0x42036a();};_0x462a9f[_0x120fc2(0x3c1)]('exit',_0x4ff454);const _0x42dc9c=setTimeout(()=>{const _0x473267=_0x120fc2;try{_0x462a9f[_0x473267(0x1cf)][_0x473267(0x217)]();}catch{}},_0x9ff3cd+0x1f4);_0x42dc9c['unref']?.();try{_0x462a9f['disconnect']();}catch{try{_0x462a9f['process']['kill']();}catch{}}})));}};return _0x53446d;}async function _0x5650ce({makeOkdb:_0x4df6d9,port:_0x1ae912}){const _0x4552e6=_0x4358a0,_0x2214d5=await _0x4df6d9();return _0x11f970(_0x2214d5),_0x2214d5[_0x4552e6(0x338)][_0x4552e6(0x439)](_0x1ae912);}function _0x11f970(_0x40bd24){const _0x59fa60=_0x4358a0;if(!_0x40bd24||_0x40bd24[_0x59fa60(0x45b)])return;_0x40bd24[_0x59fa60(0x45b)]=!![];try{const {OKDBChangefeed:_0x2b082b}=requireOkdbChangefeed(),_0x44c71b=_0x40bd24[_0x59fa60(0x3b0)];if(_0x44c71b&&typeof _0x44c71b[_0x59fa60(0x15c)]==='function'){const _0x4e19e8=new _0x2b082b(_0x40bd24);_0x4e19e8[_0x59fa60(0x184)](),_0x44c71b[_0x59fa60(0x15c)](_0x4e19e8),_0x40bd24['_changefeed']=_0x4e19e8;}}catch(_0x4786ea){_0x40bd24[_0x59fa60(0x337)]?.[_0x59fa60(0x1f0)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x4786ea?.[_0x59fa60(0x154)]??_0x4786ea),{'feature':_0x59fa60(0x2b2)});}const _0x4a1311=_0x5ad551=>{const _0x326876=_0x59fa60;if(!_0x5ad551||typeof _0x5ad551!=='object'||_0x5ad551[_0x4aa645]==null)return;if(_0x5ad551[_0x4aa645]===_0x285803)try{_0x40bd24[_0x326876(0x3b0)]?.['pushEphemeral']?.(_0x5ad551[_0x326876(0x324)],_0x5ad551[_0x326876(0x317)]);}catch{}};process['on'](_0x59fa60(0x154),_0x4a1311),_0x40bd24[_0x59fa60(0x500)]=_0x4a1311;{let _0x2ff9b4=process['cpuUsage'](),_0x11c524=Date[_0x59fa60(0x4b1)]();const _0x48ed33=()=>{const _0x344fb3=_0x59fa60;if(typeof process[_0x344fb3(0x353)]!==_0x344fb3(0x3ee)||!process[_0x344fb3(0x48c)])return;const _0x1466a3=Date[_0x344fb3(0x4b1)](),_0x55211c=process[_0x344fb3(0x586)](),_0x4263c2=(_0x1466a3-_0x11c524)*0x3e8,_0x10412f=_0x55211c[_0x344fb3(0x2de)]-_0x2ff9b4['user']+(_0x55211c[_0x344fb3(0x231)]-_0x2ff9b4[_0x344fb3(0x231)]),_0x44ab4f=_0x4263c2>0x0?Math[_0x344fb3(0x41f)](0x64,Math[_0x344fb3(0x47a)](_0x10412f/(_0x4263c2*(_0x22ae5c[_0x344fb3(0x2c7)]()[_0x344fb3(0x3bf)]||0x1))*0x64)):0x0;_0x2ff9b4=_0x55211c,_0x11c524=_0x1466a3;const _0x30d173=process['memoryUsage']();let _0xf9da26=null;try{_0xf9da26=_0x40bd24['role']?.['processors']?_0x40bd24['processes']?.[_0x344fb3(0x398)]?.()??null:null;}catch{}try{process[_0x344fb3(0x353)]({[_0x4aa645]:_0xed134e,'stats':{'rss':_0x30d173[_0x344fb3(0x195)],'heapUsed':_0x30d173['heapUsed'],'heapTotal':_0x30d173['heapTotal'],'external':_0x30d173[_0x344fb3(0x278)],'cpuPct':_0x44ab4f,'cpuWindowMs':Math[_0x344fb3(0x47a)](_0x4263c2/0x3e8)||null},'processing':_0xf9da26});}catch{}},_0x2a2fbf=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x12742b=setInterval(_0x48ed33,_0x2a2fbf);_0x12742b[_0x59fa60(0x23c)]?.(),_0x48ed33();for(const _0x1846cd of[_0x59fa60(0x237),_0x59fa60(0x3fc)]){_0x40bd24[_0x59fa60(0x472)]?.['on']?.(_0x1846cd,()=>{try{_0x48ed33();}catch{}});}}let _0x38c762=![];const _0x213fe1=async _0x1fe31a=>{const _0x4009a5=_0x59fa60;if(_0x38c762)return;_0x38c762=!![];const _0x25a82e=setTimeout(()=>process['exit'](_0x1fe31a),_0x9ff3cd);_0x25a82e[_0x4009a5(0x23c)]?.();try{await _0x40bd24[_0x4009a5(0x5b3)]?.();}catch{}process[_0x4009a5(0x2be)](_0x1fe31a);};process['on'](_0x59fa60(0x3fd),()=>_0x213fe1(0x0));if(process[_0x59fa60(0x164)]!=='win32'){const _0x330956=setInterval(()=>{const _0x328ae8=_0x59fa60;if(process[_0x328ae8(0x5ac)]===0x1)_0x213fe1(0x0);},_0x343c86);_0x330956[_0x59fa60(0x23c)]?.(),_0x40bd24[_0x59fa60(0x1fc)]=_0x330956;}}return okdbCluster={'runClustered':_0x23be2a,'attachWorkerCluster':_0x11f970},okdbCluster;}function _0x6e23(){const _0x3fb40b=['cpuUsage','note','1156094baWcDY','PATCH','./okdb-export.ndjson','_committed','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_onStop','constructor','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','transaction','license:activated','openDB','clearLine','~processes','stderr','\x20\x20Writes:\x20\x20','SYSTEM_PROC','(code=','engines','\x27\x20already\x20registered','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','mkdirSync','version','true','trimStart','REMOVE','\x20│\x20','7xBbGIp','depth','dynamic','isInteger','shutdown','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','reset','\x20\x20Some\x20checks\x20failed.\x0a','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','LICENSE_EXPIRED_ACTION','ppid','Token\x20secret\x20not\x20configured','[body]','\x0a[okdb]\x20received\x20','hasType','access:\x20','routes','close','node\x20','[okdb]\x20exporting\x20blobs…','verify','_removeRowAsync','./okdb-backup','hostname','childTransaction','off','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ',',\x20label:\x20','Engines','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20\x20\x20\x20','files','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','replace','\x22.\x20Use:\x20create,\x20list,\x20revoke','single','\x20\x20\x20\x20graceful\x20shutdown\x0a','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','commitsPerSec','listenAddr','decodeLicenseBlob','_startAdmission','listLicenses','system:bus_state_change','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','_nodeDbCache','string','listDesired','crypto','ms\x20env=','force','consecutiveFailures','item:update','_released','_log','processes','\x20\x20(name:\x20','dead','OKDBSchemaValidationError','Index\x20\x22','prototype','size','dropType',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','number','node','inst:','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','quantum','\x0a\x20\x20\x20\x20','OKDBInvalidPrimaryKeyError','port','instanceId','ACTIVATION_EXPIRED','isHeld','(add\x20a\x20license\x20first)','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20in\x20','VERB','_lockDb','licenses','logs','\x20licenses','/api/','\x20writes\x20(','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','System','--env\x20<name>','inspect','reap','[okdb]\x20backing\x20up\x20to\x20','uptime','isWorker','charCodeAt','[okdb]\x20close\x20error:\x20','changed','getCmd','maxMs','workers','auth','slot','--drop','\x20\x20env=','_timer','recheck','/type/users/query\x0a\x20\x20\x20\x20','tags','logRequests','\x20worker(s)\x20still\x20serving','--permissions','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','isDead','_nodeDb','\x20result','--port','primary','prompt','onWindow','_listenAddr','max','change','ms\x20activeWriters=','ROUTES','publishChildRow','committed',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','license:added','License\x20expired\x20or\x20invalidated','SYNC_COMMITS','_lock','\x20license(s)','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','claims','api','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20phase=','Type\x20\x27','message','digest','heapUsed','inputSchema','processorId','_startedAt','setTtl','getSecurityNotices','attachFeed','_drain','_draining','env','license:invalid','resetReadTxn','TYPES','OKDBIndexHasConsumersError','platform',')\x20exited\x20','commit','Schema\x20validation\x20failed\x20for\x20','~processes:desired','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','help','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','update','sync','heapTotal','registerIndex','\x20→\x20POST\x20/api/env/','\x20license\x20—\x20no\x20activation\x20needed)','\x0a\x20\x20✓\x20Token\x20created','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','holder','queue-worker','[okdb]\x20blobs:\x20imported=','_active','OKDBVersionMismatchError','--watch','keys','\x0a\x20\x20','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','white','PUB_FINGERPRINT','processing','getRange','\x20+\x20','_coordinator','quit','start','\x20documents\x20fail\x20validation','createHmac','OKDBError','path','[okdb]\x20reset:\x20','activation','LICENSE_FEATURE_DISABLED','--grants','decommissioning','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','.kdb_history','starting','ITEM_CREATE','/\x20quit\x20/\x20Ctrl+C','\x20active\x20env:\x20','reject','rss','types','\x1b[34m','\x20\x20\x20\x20\x20\x20','processor:ready','Shutting\x20down\x20due\x20to\x20license\x20expiry','terminal','yes','\x20died\x20','\x20\x20Envs:\x20\x20\x20\x20','INDEX_PROGRESS','_lastCpuPct','\x20===','body:\x20','--key','env:opened','enable','green','typeSubDbs','forEach','_flushTimer','putNode','\x22\x20matches\x20','/types\x0a\x20\x20\x20\x20','workersFlag','Feature\x20not\x20licensed:\x20','\x0d[okdb]\x20blobs:\x20','[okdb-cluster]\x20worker\x20pid=','noRepl','line','_nestedWarned','127.0.0.1','_holderDead','export','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','_isReader','field:resolver_registered','readUInt16BE','access','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_supervisorKey','changes','sub','repeat','splice','application/json','processor:progress','licenseType','\x20env','\x0a\x20\x20\x20\x20\x20\x20','removeSync','createHash','activateLicense','\x27\x20on\x20type\x20\x27','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','__writeCounter','padStart','hex','process','exports','[okdb]\x20http\x20workers:\x20','ms\x20(attempt\x20','valid','removeSupervisedChild','getClock','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','received\x20','decommission','dumpedAt','[okdb]\x20error:\x20failed\x20to\x20read\x20','error','OKDBIndexNotRegisteredError','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','resetting','randomBytes','_inflight','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','mode','OKDBSchemaCollectionError','\x22\x20already\x20exists','toISOString','LICENSEE','\x27,\x20cannot\x20map\x20to\x20\x27','\x1b[90m','Unique\x20constraint\x20violated\x20on\x20','Index\x20\x27','search','--username','--env','okdb-writer:\x20env\x20closing\x20—\x20retry','_windowCbs','warn','clear','getDesired','env/:env','_lastCpuWindowMs','split','join','_refreshDesiredSnapshot','from','1111212irujVp','../okdb','setLogger','_clusterOrphanWatch','_nestedTotal','_putRowAsync','2.3.2','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','kind','_groupByProcess','ENV_CLOSING_RETRY','queue','resolve','\x20\x20→\x20\x20','Cannot\x20delete\x20','database\x20path\x20not\x20writable:\x20','_wantDb','_hbTimer','\x20\x20\x20\x20licensee:\x20\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','listNodes','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','derivePin','description','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','Build\x20expects\x20public\x20key\x20fingerprint\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','[okdb]\x20cluster\x20close\x20error:\x20','_onTick','kill','[okdb]\x20exported\x20\x20types=','info','SYSTEM_STOPPED','\x1b[0m','magenta','_admissionTimer','namespace','cluster:\x20ready\x20(','stack','readUInt8','recent\x20writes\x20(newest\x20first)','/api/env/','license','License\x20limit\x20exceeded:\x20','--open','detectInputType','~licenses','[env]','SCHEMA_COLLECTION_INVALID','_durs','columns','[okdb]\x20closed\x20cleanly\x0a','SIGKILL','creating','_singletonLock','system','bus:poke','filter','\x20\x20\x20\x20expires:\x20\x20\x20','_kind','slotKey','processor:paused','OKDB_HTTP_WORKERS','types\x20--env\x20staging','targetType','\x20type','unref','\x20references\x20','[okdb-cluster]\x20slot=','[okdb]\x20preserved:\x20','stdin','SIGTERM','ALREADY_EXISTS','failures','setOwnMeta','clusterWorkers','types/env=','_enqueuedAt','worker','effective','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','\x20\x20score:','\x20logs\x20off\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','startedAt','open\x20','ttl:set','activate','unlinkSync','identity','child_process','\x20\x20(no\x20env\x20draining)','txn:rollback','records','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','offWindow','bus:type_drop','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','meta','http.workers','noAdmin','\x22\x20to\x20enable\x20it.','processors','ref:violation_resolved','listAll','ms\x20max=','PIN','reverse','\x20day(s).','stats','--blobs','exportToFile','env/','\x20\x20\x20\x20permissions:\x20','STATUS','processors/','PUBLIC_KEY_PEM','resume','assertFeature','LICENSE_ACTIVATION_INVALID','_pending','sig','shmbuf/package.json','Embeddings','ephemeral','dbPath','external','writeFileSync','--no-repl','_heartbeatTimer','percentile','_sampleOwnStats','node:events','updateSupervisedChildStats','ms\x20on\x20env=','status','equals','isArray','[okdb]\x20opening\x20','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','{}[]:,\x27\x22','types:','deregisterSelf','\x20\x20\x20\x20features:\x20\x20','input:\x20','TYPE_ALREADY_REGISTERED','running','writeUInt32BE','_admissionStarted','txn:start','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','migrate','\x20\x20\x20http://localhost:','/admin/index.html','_quantum','createdAt','summary','[okdb]\x20export\x20complete','/api','floor','publishOwnRow','--workers','fts:reset','\x1b[33m','msg','\x20\x20\x20\x20admin:\x20http://localhost:','\x0a\x20\x20License\x20details:','red','_children','files/',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','isEnabled','\x20\x20Usage:','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','syncPeers','workersConfigured','\x27\x20is\x20already\x20registered','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','key','__vocab/version','\x20\x20\x20\x20\x20\x20\x20','_cmd','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','decoded','cluster','bumpCmd','LICENSE_LIMIT_EXCEEDED','history','boolean','licensed','isConnected','_licenseHash','targetKey','pin','--test','INDEX_ALREADY_REGISTERED','exit','schema:drop','_report','<path>',')\x20to\x20your\x20license\x20vendor.','nodeKey','default','\x20/\x20','then','cpus','--changes','entry','hasLimit','sourceType','endsWith','type','\x0a\x20\x20✓\x20License\x20added','write','registry\x20publish\x20failing:\x20','config','\x0d[okdb]\x20','_nodeDbFor','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','tryAcquire','OKDBForeignKeyError','acquiredAt','%),\x20','\x20\x20⚠\x20\x20','byteLength','\x20pid=','set','Bearer\x20','user','pending','SIGINT\x20(double-tap)','_enableChangelog','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','selfAddress','Foreign\x20key\x20violation:\x20','\x20worker','isActive','ENVS','node:crypto','every','NAME','writes=','deaths','INDEX_HAS_CONSUMERS','\x20worker\x20slot=','\x0a\x0a\x20\x20','\x27\x20doesn\x27t\x20exist','release','SIGINT','name','--name','No\x20license\x20found\x20matching\x20this\x20activation\x20token','resetFts','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','[okdb]\x20created\x20./okdb-data','drain','_db','node\x20identity','stopped','afterWrite','_onItem','level','__OKDB_PUB_FINGERPRINT__','isTTY','reload','expiresAt','cli','epoch','port\x20','features','ITEM_UPDATE','envsOpen','available',',\x20signal=','ENV','_nodeDead','has','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','never','_drainOne','registry\x20heartbeat\x20skipped\x20(writer=','false','\x20logs\x20on\x20\x20','hasDesired','data','_desired','\x20does\x20not\x20exist','expired','processor:retry','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','prependListener','FOREIGN_KEY_DELETE_RESTRICTED','alloc','selfKey','writeUInt16BE','\x20\x20(','_publishNow','event','ensureType','caps','\x20MB)','_publishFailWarned','~processes:cmd','index:registered','fanout','addedAt','title','hidden','spki','updatedAt','FTS_RESET','argv','[filter]','view','supervisorKey','(null)','log','http','cyan','system:ready','exec','envs','_isClusterController','active:','.kdbconfig','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','POST','\x20already\x20in\x20use','_selfKey','EXIT','register','rawBuf','dirname','toLocaleString','\x20to\x20quit.','\x20\x20\x20\x20license:\x20','host','references','VIEW_PROGRESS','_threadStats','importBlobs','\x20—\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','threads','send','Events','freeze','(primary\x20=\x20processor)','base64url','\x20\x20\x20\x20usage:\x20\x20\x20','blob','dedupeMax','type/users/query\x20{\x22active\x22:true}','typesPerEnv','level:\x20info','recordWrite','dropping','\x20\x20╚═══════════════════════════╝','_statusEnv','\x20\x20⚠','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','getCount','finally','_lastPublishAt','_buildOwnRow','FTS_DROP','existsSync','OKDBAlreadyExistsError','fts:','--print','stringify','env:removed','execArgv','permissions','token','okdb-writer[','license:removed','[okdb]\x20importing\x20','Sync','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','uncaughtException','Files','unknown','created','Environments','standalone','[okdb]\x20started\x20in\x20','invalid','label','list','--password','confirm','4358648hKTlAT','procmode/','_highWater','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20invalid\x20','_buildChildRow','_activateProcesses','LICENSE_HASH_MISMATCH','transport:\x20','rmSync','config\x20http.workers','_caps','keys/public.pem','addSupervisedChild','INDEX_READY',',\x20got\x20','[okdb]\x20unknown\x20token\x20action:\x20\x22','\x20bytes,\x20need\x20>=\x2065)','indexOf','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','_buildProcessingFacet','standard','assertLimit','_seen','blobs','DELETE\x20type/users/item/x','readUInt32BE','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','processor','licenseHash','type/','timeMachine','online','\x0a===\x20OKDB_DIAG\x20','backup','_dedupeMax','instances','CHANGEFEED_QUANTUM','object','--label','unclaimed','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','dim','_adminRelay','utf8','[okdb]\x20imported\x20\x20types=','~lock',',\x20stopping\x20workers…\x0a','get',':\x20key\x20[','killable','_cursors','map','state','_flushDebounce','admin','load','mean','length','views','once','_markSeen','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','method','attach','decommissioned','OKDB-PIN-V1:','startsWith','Full-text\x20search','_versionSkewWarned','schema:set','add','\x20process','maxExtra','memoryUsage','verifyActivation','[okdb-cluster]\x20','INDEX_NOT_REGISTERED','\x20\x20[okdb]\x20','shutting\x20down…\x0a','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','http-server','cause','_desiredOverlay','emit','index:reset','\x20deleted','fromEntries','__esModule','values','\x1b[35m','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','peers=','OKDBNotFoundError','type:drop','_sandbox','test','_computeStatus','164lEOwds','_closed','_ensureTokensType','oldestPendingMs','function','LICENSE_INVALID','index:ready','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20records=','[okdb]\x20port\x20','\x20\x20All\x20checks\x20passed.\x0a','_singletonLocks','[okdb]\x20starting…\x0a','LICENSED_BUILD','tierList','type:registered','--path','getPins','processor:resumed','disconnect','toFixed','isWanted','__okdbSlot','SYSTEM_POKE','_buckets','_scheduleFlush','system:type_drop','\x20\x20✓\x20','respawnTimer','Processors','win32','shift','cluster:','appendFileSync','logLevel','inflightAgesMs','start\x20','processKey','\x20parkedNow=','needsActivation',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','~tokens','16953mAtlOx','isFeatureEnabled','listRoutes','709390ItDqlx','\x20sync','expiry','\x20MB\x20→\x20','\x20tokens:','commitP99Ms','GET','_processStartedAt','min','count','options','config\x20file\x20invalid:\x20','ingest','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','_instanceId','transactionSync','[okdb-cluster]\x20respawning\x20worker\x20slot=','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','randomUUID','resetIndex','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','safety','username','\x20drainAge=','(worst\x20','createEnvironment','enabled','_ownMeta','--no-cluster','xdg-open\x20','\x20(slot=','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','push','dropIndex','listen','yellow','--address','hint','index:drop','value','\x22\x20→\x20','time','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','system:stopped','reason','Hint:\x20','Release','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','--ttl','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','started','parkedNow','importFromFile','gray','padEnd','use','stop','\x20\x20Type\x20','createPublicKey','role','setupPrimary','cpuWindowMs','writeUInt8','shmbufNative','ready','ms/','SIG_INVALID','setPrompt','_clusterWorkerAttached','Records','dest','[okdb]\x20reset\x20aborted','\x20\x20\x20\x20port:\x20\x20','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','abs','_held','keys:','_systemEnv','slice','\x20months\x20from\x20issuance)','--version','[okdb]\x20cluster\x20primary\x20pid=','compaction','[okdb]\x20invalid\x20port:\x20','INDEX_RESET','_baselines','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20[okdb]\x20closed\x20cleanly\x0a','clusterStatusView','events','_wantDbHandle','_heartbeatInFlight','\x20(durable\x20desired-state)','loop-lag\x20','[okdb]\x20nothing\x20to\x20reset\x20—\x20','roles','question','round','txn:end','unhandledRejection','building','EADDRINUSE','readFileSync','\x1b[31m','claimGated','SCHEMA_VALIDATION_FAILED','--config','sizeBefore','\x20\x20\x20\x20id:\x20\x20\x20\x20','maxWrites','entries','catch','_rowKey','expires','FOREIGN_KEY_VIOLATION','connected','\x20\x20║','\x20statusEnv=','limits','\x20\x20(need\x20≥\x2018)','put','remove','handle','der','item:remove','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20already\x20exists','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x22\x20is\x20used\x20by:\x20','properties','putSync','system:clock_change','ms\x20busy=','noCluster','allocUnsafe','sort','delete','active','\x20@\x20','dropSchema','scrypt','_isWriter','detachConsole','EXPIRES','--inspect','drop','other','\x22\x20(must\x20be\x20debug|info|warn|error)','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','[okdb]\x20import\x20complete','pid','\x1b[32m','now','pause','/type/users\x0a\x20\x20\x20\x20','bus:env_release','import','node/','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','stopHeartbeat','_key','hasOwnProperty','--no-admin','waiting','listening','registry-publish','code','removeNode','fill','_outstanding','\x20\x20changes=','includes','(on\x20any\x20path\x20command)','some','bold','sizeAfter','cursorKey','issuedAt','createServer','./okdb-data','fast','database\x20path\x20writable:\x20','_isStale','fn-runner','(none)','race','operation','CREATED','okdb.pid','toUpperCase','toString','OKDBUniqueConstraintError','Types','\x20\x20Expected\x20one\x20of:','_ensureDesired','setDesired','processes:\x20','--token','\x20writer{depth=','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','_started','17838AGMeyn','ceil','_lastCpuAt','trim','revoke','\x20log\x20level:\x20','[okdb]\x20error:\x20','no\x20.kdbconfig\x20(using\x20defaults)','fts','_done','busy','_startHeartbeat','item:create','ref:violation','env/staging/info','net','\x22\x20on\x20\x22','_lastCpuUsage',']\x20already\x20maps\x20to\x20\x27','_acquiredAt','_bpWaiters','HELP','licensee','perf_hooks','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','processor:error','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','okdb-http-worker-child.js','disable','stdout','_clusterOnMessage','<json-body>','sourceKey','_role','body','next','\x20for\x20commands,\x20','_collectSingletonClaims','index:progress','\x20\x20Flags','\x20environment\x20','_collectWriterFacet','INVALID_PRIMARY_KEY','--types','\x20HTTP\x20workers\x20','beforeWrite','open','192743hdwndE','\x20\x20✓\x20OKDB\x20server\x20running','embeddings','5360khfeNW','password','_putRowSync','INVALID_VALUE','feed:','\x1b[2m','\x20file','find','Invalid\x20license\x20blob:\x20','_maybePublish','License\x20already\x20stored','_participate','OKDBInvalidIndexKeyError','[okdb-cluster]\x20primary\x20pid=','removeLicense','_handleInProcess','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','debug','SIGBREAK','\x20oldestPendingMs=','setSchema','OKDBForeignKeyDeleteError','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','wrong_node','\x1b[37m','_onPoke','registerType','async','parse','\x20\x20[','mcp','\x20\x20\x20\x20writes:\x20\x20\x20\x20','copy','_dedupeKey','ttlMs','grants','indexToDb','ttl','bus:drain','index','ITEM_REMOVE','sha256','result','\x20\x20(unlimited)','allSettled','uuid','_onProcEvent','null','__identity','_license','statSync','error:\x20','\x20\x20\x20\x20path:\x20\x20','toLowerCase','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','build','--log-level','use\x20<env>','\x1b[36m','nodesView','FTS_REGISTERED','PUT','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20\x20\x20\x20limits:\x20\x20\x20\x20','\x0a\x20\x20okdb\x20doctor\x0a','singletonClaims','OKDBIndexAlreadyRegisteredError','ftsName','transport','Examples','_migrateVocab','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','(unset)','[on|off|level]','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','cluster-wide','_rootDb','QUIT','concat','\x1b[1m','dropFts','\x20\x20\x20\x20status:\x20\x20\x20\x20active','USE','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','\x20\x20Usage:\x20','bind','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','_writer','VERSION_MISMATCH','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','_rawDb','OKDBTypeAlreadyRegisteredError','server','type/users\x20--help','type/users/item/alice\x20--env\x20staging','system:drain','draining','envs=','ms\x20mean=','call','shmbuf.node','\x0a[okdb]\x20error:\x20','\x20ipc\x20error:\x20','okdb','loadEnvFile','param','Invalid\x20activation\x20token:\x20','_envs','ESRCH','hard-killed','\x0a\x20\x20✓\x20License\x20activated','--help','children'];_0x6e23=function(){return _0x3fb40b;};return _0x6e23();}var hasRequiredOkdb;function requireOkdb(){const _0x2832a7=_0x457462;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x2832a7(0x57d)]();}catch{}const _0x33df59=require$$1,_0x3782e3=require$$1$1,{resolveWorkers:_0xf98c96,isShmbufNative:_0x1fd81c}=requireOkdbWorkers();function _0x5a04fb(_0x155a47){const _0x2a1e50=_0x2832a7,_0x2f9476=_0x155a47[_0x2a1e50(0x467)](0x2),_0x64e27c={};let _0x22a480=0x0;while(_0x22a480<_0x2f9476['length']){const _0x124b24=_0x2f9476[_0x22a480];if(_0x124b24==='--port'||_0x124b24==='-p')_0x64e27c[_0x2a1e50(0x5eb)]=Number(_0x2f9476[++_0x22a480]);else{if(_0x124b24==='--path'||_0x124b24==='-d')_0x64e27c[_0x2a1e50(0x188)]=_0x2f9476[++_0x22a480];else{if(_0x124b24==='--key'||_0x124b24==='-k')_0x64e27c[_0x2a1e50(0x2ac)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x483)||_0x124b24==='-c')_0x64e27c[_0x2a1e50(0x2d1)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x54c))_0x64e27c[_0x2a1e50(0x40c)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x27a))_0x64e27c[_0x2a1e50(0x1b1)]=!![];else{if(_0x124b24===_0x2a1e50(0x4bb))_0x64e27c[_0x2a1e50(0x25e)]=!![];else{if(_0x124b24==='--workers')_0x64e27c['workers']=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x433))_0x64e27c[_0x2a1e50(0x49e)]=!![];else{if(_0x124b24===_0x2a1e50(0x1ed)||_0x124b24==='-e')_0x64e27c[_0x2a1e50(0x15f)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x50d))_0x64e27c[_0x2a1e50(0x196)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x2c8))_0x64e27c[_0x2a1e50(0x1be)]=!![];else{if(_0x124b24===_0x2a1e50(0x268))_0x64e27c[_0x2a1e50(0x39c)]=!![];else{if(_0x124b24===_0x2a1e50(0x609))_0x64e27c[_0x2a1e50(0x4aa)]=!![];else{if(_0x124b24===_0x2a1e50(0x226)){const _0x2ffcd2=[];while(_0x22a480+0x1<_0x2f9476[_0x2a1e50(0x3bf)]&&!_0x2f9476[_0x22a480+0x1]['startsWith']('--')){_0x2ffcd2[_0x2a1e50(0x437)](_0x2f9476[++_0x22a480]);}_0x64e27c['open']=_0x2ffcd2['length']>0x0?_0x2ffcd2:!![];}else{if(_0x124b24==='--log-requests')_0x64e27c[_0x2a1e50(0x60f)]=!![];else{if(_0x124b24===_0x2a1e50(0x2f4))_0x64e27c[_0x2a1e50(0x2f3)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x382))_0x64e27c[_0x2a1e50(0x515)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x3ab))_0x64e27c['label']=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x138))_0x64e27c[_0x2a1e50(0x371)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x18c))_0x64e27c['grants']=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x447))_0x64e27c[_0x2a1e50(0x539)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x4de))_0x64e27c[_0x2a1e50(0x372)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x1ec)||_0x124b24==='-u')_0x64e27c[_0x2a1e50(0x42d)]=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x43b))_0x64e27c['selfAddress']=_0x2f9476[++_0x22a480];else{if(_0x124b24===_0x2a1e50(0x469)||_0x124b24==='-v'){const _0x3f6391=require$$3;console[_0x2a1e50(0x337)](_0x3f6391[_0x2a1e50(0x59d)]),process[_0x2a1e50(0x2be)](0x0);}else(_0x124b24===_0x2a1e50(0x584)||_0x124b24==='-h')&&(_0x2f20cd(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x22a480++;}return _0x64e27c;}function _0x2f20cd(){const _0x4c2e03=_0x2832a7;console['log'](_0x4c2e03(0x2f7));}const _0x42e1d2=new Set([_0x2832a7(0x525),'info',_0x2832a7(0x1f0),_0x2832a7(0x1db)]);function _0x4a4bfe(_0x21f46b){const _0xd5ccc4=_0x2832a7,_0x577f99=_0x21f46b[_0xd5ccc4(0x2d1)]?_0x33df59[_0xd5ccc4(0x205)](_0x21f46b[_0xd5ccc4(0x2d1)]):_0x33df59[_0xd5ccc4(0x205)]('.kdbconfig');let _0x28826a={};if(_0x3782e3['existsSync'](_0x577f99))try{const _0x4d9f8d=_0x3782e3[_0xd5ccc4(0x47f)](_0x577f99,_0xd5ccc4(0x3b1))[_0xd5ccc4(0x5c4)](/^\uFEFF/,'');_0x28826a=JSON['parse'](_0x4d9f8d),console[_0xd5ccc4(0x337)]('[okdb]\x20loaded\x20config:\x20'+_0x577f99);}catch(_0x4e45c5){console[_0xd5ccc4(0x1db)](_0xd5ccc4(0x3c3)+_0x577f99+':\x20'+_0x4e45c5[_0xd5ccc4(0x154)]),process[_0xd5ccc4(0x2be)](0x1);}const _0x12b6bf={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x575778={'port':_0x21f46b[_0xd5ccc4(0x5eb)]??_0x28826a[_0xd5ccc4(0x5eb)]??_0x12b6bf[_0xd5ccc4(0x5eb)]??0x2124,'dbPath':_0x21f46b[_0xd5ccc4(0x188)]??_0x28826a['path']??_0x12b6bf[_0xd5ccc4(0x188)]??'./okdb-data','key':_0x21f46b[_0xd5ccc4(0x2ac)]??_0x28826a['key']??_0x12b6bf[_0xd5ccc4(0x2ac)]??undefined,'logLevel':_0x21f46b[_0xd5ccc4(0x40c)]??_0x28826a[_0xd5ccc4(0x40c)]??_0x12b6bf[_0xd5ccc4(0x40c)]??_0xd5ccc4(0x219),'noRepl':_0x21f46b['noRepl']??_0x28826a[_0xd5ccc4(0x1b1)]??_0x12b6bf[_0xd5ccc4(0x1b1)]??![],'noAdmin':_0x21f46b[_0xd5ccc4(0x25e)]??_0x28826a[_0xd5ccc4(0x25e)]??_0x12b6bf[_0xd5ccc4(0x25e)]??![],'admin':_0x28826a['admin']??{},'api':_0x28826a[_0xd5ccc4(0x150)]??undefined,'auth':_0x28826a[_0xd5ccc4(0x607)]??undefined,'mcp':_0x28826a[_0xd5ccc4(0x532)]??undefined,'http':_0x28826a['http']??undefined,'timeMachine':_0x28826a['timeMachine']!==![]?_0x28826a[_0xd5ccc4(0x3a3)]??{}:![]};if(_0x21f46b['noCluster'])_0x575778[_0xd5ccc4(0x49e)]=!![];if(_0x21f46b['workers']!==undefined)_0x575778[_0xd5ccc4(0x1ad)]=_0x21f46b['workers'];return _0x21f46b['open']!==undefined&&(_0x575778[_0xd5ccc4(0x607)]=_0x575778['auth']||{},_0x575778['auth'][_0xd5ccc4(0x510)]=_0x21f46b[_0xd5ccc4(0x510)]),_0x21f46b[_0xd5ccc4(0x60f)]&&(_0x575778['debug']=_0x575778[_0xd5ccc4(0x525)]||{},_0x575778[_0xd5ccc4(0x525)][_0xd5ccc4(0x60f)]=!![]),(!Number[_0xd5ccc4(0x5a5)](_0x575778[_0xd5ccc4(0x5eb)])||_0x575778['port']<0x1||_0x575778[_0xd5ccc4(0x5eb)]>0xffff)&&(console[_0xd5ccc4(0x1db)](_0xd5ccc4(0x46c)+_0x575778[_0xd5ccc4(0x5eb)]+'\x20(must\x20be\x201–65535)'),process[_0xd5ccc4(0x2be)](0x1)),!_0x42e1d2[_0xd5ccc4(0x30f)](_0x575778[_0xd5ccc4(0x40c)])&&(console[_0xd5ccc4(0x1db)](_0xd5ccc4(0x20c)+_0x575778['logLevel']+_0xd5ccc4(0x4ac)),process[_0xd5ccc4(0x2be)](0x1)),_0x575778;}function _0x3d85e1(_0x3bd190){const _0x3f295d=_0x2832a7;return!!(_0x3bd190&&typeof _0x3bd190===_0x3f295d(0x3aa)&&!Array['isArray'](_0x3bd190)&&Object['keys'](_0x3bd190)['length']>0x0);}function _0x266ed4(_0x34c815){return{..._0x34c815['key']?{'encryptionKey':_0x34c815['key']}:{},'engines':![],'processors':![],'compaction':![]};}const _0x145700=!process[_0x2832a7(0x4ff)]['isTTY']||!!process.env.NO_COLOR;function _0x2d3023(_0x20631a,_0x45e8db){const _0x1351b6=_0x2832a7;return _0x145700?_0x45e8db:'\x1b['+_0x20631a+'m'+_0x45e8db+_0x1351b6(0x21b);}function _0x56dbed(_0x41b73c){const _0x1f6385=_0x2832a7;if(!_0x41b73c||_0x41b73c[_0x1f6385(0x3bf)]===0x0)return;const _0x26324b='─'[_0x1f6385(0x1c0)](0x38);process[_0x1f6385(0x595)][_0x1f6385(0x2cf)]('\x0a'),process[_0x1f6385(0x595)][_0x1f6385(0x2cf)](_0x2d3023('33',_0x1f6385(0x2d9)+_0x41b73c[_0x1f6385(0x3bf)]+'\x20SECURITY\x20NOTICE'+(_0x41b73c[_0x1f6385(0x3bf)]>0x1?'S':'')+'\x0a')),process[_0x1f6385(0x595)]['write']('\x20\x20'+_0x26324b+'\x0a');for(const _0x184ffa of _0x41b73c){const _0x47ee5b=_0x184ffa[_0x1f6385(0x300)]===_0x1f6385(0x1db)?_0x2d3023('31','\x20\x20✗'):_0x2d3023('33',_0x1f6385(0x362));process[_0x1f6385(0x595)][_0x1f6385(0x2cf)](_0x47ee5b+'\x20\x20'+_0x2d3023('1',_0x184ffa[_0x1f6385(0x32d)])+'\x0a'),process[_0x1f6385(0x595)][_0x1f6385(0x2cf)](_0x1f6385(0x2ae)+_0x184ffa[_0x1f6385(0x154)]+'\x0a');if(_0x184ffa['hint'])process[_0x1f6385(0x595)][_0x1f6385(0x2cf)](_0x1f6385(0x2ae)+_0x2d3023('2',_0x1f6385(0x444)+_0x184ffa[_0x1f6385(0x43c)])+'\x0a');process[_0x1f6385(0x595)]['write']('\x0a');}process['stderr'][_0x1f6385(0x2cf)]('\x20\x20'+_0x26324b+'\x0a\x0a');}function _0x112187(_0x2fbbdd,_0x292db2,_0x5b024a={}){const _0x5ecb75=_0x2832a7,_0x51c62a=_0x2fbbdd[_0x5ecb75(0x338)][_0x5ecb75(0x439)](_0x292db2,_0x5b024a);if(_0x51c62a&&_0x51c62a[_0x5ecb75(0x33d)])return Promise['resolve'](_0x51c62a);return new Promise((_0x401a57,_0x1a5675)=>{const _0x44cef8=_0x5ecb75;_0x51c62a[_0x44cef8(0x3c1)](_0x44cef8(0x4bd),_0x401a57),_0x51c62a['once']('error',_0x1a5675);});}async function _0x25b10e(_0x3e0fba){const _0x31e793=_0x2832a7,_0x42577d=require$$4$1;console['log'](_0x31e793(0x554));let _0x193dc0=!![];const _0x3a4990=(_0x1a56a7,_0x23e132)=>{const _0x3a907a=_0x31e793;console[_0x3a907a(0x337)]('\x20\x20'+(_0x1a56a7?'✓':'✗')+'\x20'+_0x23e132);if(!_0x1a56a7)_0x193dc0=![];},_0x3ebd45=Number(process['version'][_0x31e793(0x5c4)]('v','')[_0x31e793(0x1f5)]('.')[0x0]);_0x3a4990(_0x3ebd45>=0x12,_0x31e793(0x5b4)+process[_0x31e793(0x59d)]+(_0x3ebd45<0x12?_0x31e793(0x490):''));const _0x4a603a=_0x33df59[_0x31e793(0x205)](_0x3e0fba[_0x31e793(0x277)]);try{_0x3782e3[_0x31e793(0x59c)](_0x4a603a,{'recursive':!![]});const _0x1be6c8=_0x33df59[_0x31e793(0x1f6)](_0x4a603a,'.okdb-write-test');_0x3782e3['writeFileSync'](_0x1be6c8,''),_0x3782e3[_0x31e793(0x252)](_0x1be6c8),_0x3a4990(!![],_0x31e793(0x4ce)+_0x4a603a);}catch(_0x37d077){_0x3a4990(![],_0x31e793(0x208)+_0x4a603a+_0x31e793(0x322)+_0x37d077['message']+')');}const _0x5c13a2=await new Promise(_0x36e654=>{const _0x4a4156=_0x31e793,_0x3563b0=_0x42577d[_0x4a4156(0x4cb)]();_0x3563b0[_0x4a4156(0x3c1)](_0x4a4156(0x1db),()=>_0x36e654(![])),_0x3563b0[_0x4a4156(0x3c1)](_0x4a4156(0x4bd),()=>{const _0x38266d=_0x4a4156;_0x3563b0[_0x38266d(0x5b3)](),_0x36e654(!![]);}),_0x3563b0[_0x4a4156(0x439)](_0x3e0fba[_0x4a4156(0x5eb)],_0x4a4156(0x1b4));});_0x3a4990(_0x5c13a2,_0x31e793(0x307)+_0x3e0fba[_0x31e793(0x5eb)]+'\x20'+(_0x5c13a2?_0x31e793(0x30b):'already\x20in\x20use'));const _0x2f90f4=_0x33df59['resolve'](_0x31e793(0x33f));if(_0x3782e3[_0x31e793(0x36a)](_0x2f90f4))try{JSON['parse'](_0x3782e3['readFileSync'](_0x2f90f4,_0x31e793(0x3b1))[_0x31e793(0x5c4)](/^\uFEFF/,'')),_0x3a4990(!![],'config\x20file\x20valid:\x20'+_0x2f90f4);}catch(_0x3c8e95){_0x3a4990(![],_0x31e793(0x422)+_0x3c8e95[_0x31e793(0x154)]);}else _0x3a4990(!![],_0x31e793(0x4e9));if(_0x1fd81c()){const _0x3e22b2=_0xf98c96(_0x3e0fba,{'shmbufNative':!![]});_0x3a4990(!![],_0x31e793(0x21f)+_0x3e22b2+_0x31e793(0x2e5)+(_0x3e22b2===0x1?'':'s')+')');}else _0x3a4990(!![],_0x31e793(0x5e7));if(!_0x5c13a2)try{const _0x55143e=require(_0x31e793(0x1fa)),_0x22452a=new _0x55143e(_0x4a603a,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x22452a[_0x31e793(0x510)]();try{await _0x22452a['processes'][_0x31e793(0x510)]({'reader':!![]});const _0x5d0aad=_0x22452a[_0x31e793(0x5db)][_0x31e793(0x20d)](),_0x3fad4e=_0x5d0aad[_0x31e793(0x233)](_0x9ab267=>_0x9ab267['supervisorKey']!=null)[_0x31e793(0x3bf)];_0x3a4990(!![],_0x31e793(0x4dd)+_0x5d0aad[_0x31e793(0x3bf)]+_0x31e793(0x3cf)+(_0x5d0aad[_0x31e793(0x3bf)]===0x1?'':'es')+'\x20('+_0x3fad4e+'\x20supervised)');}finally{await _0x22452a['close']();}}catch{}console[_0x31e793(0x337)](''),_0x193dc0?console[_0x31e793(0x337)](_0x31e793(0x3f4)):(console[_0x31e793(0x337)](_0x31e793(0x5a9)),process[_0x31e793(0x2be)](0x1));}async function _0x49711f(){const _0x5700d4=_0x2832a7,_0x43ffa2=_0x33df59[_0x5700d4(0x205)](_0x5700d4(0x33f));!_0x3782e3[_0x5700d4(0x36a)](_0x43ffa2)?(_0x3782e3[_0x5700d4(0x279)](_0x43ffa2,JSON[_0x5700d4(0x36e)]({'port':0x2124,'path':_0x5700d4(0x4cc),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x5700d4(0x337)]('[okdb]\x20created\x20.kdbconfig')):console[_0x5700d4(0x337)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x4baf94=_0x33df59[_0x5700d4(0x205)](_0x5700d4(0x4cc));!_0x3782e3[_0x5700d4(0x36a)](_0x4baf94)?(_0x3782e3[_0x5700d4(0x59c)](_0x4baf94,{'recursive':!![]}),console['log'](_0x5700d4(0x2f9))):console[_0x5700d4(0x337)](_0x5700d4(0x3ad)),console[_0x5700d4(0x337)](_0x5700d4(0x1b7));}async function _0x2f3e00(_0x271bb3){const _0x35f3e3=_0x2832a7,_0x1b81a4=_0x33df59[_0x35f3e3(0x205)](_0x271bb3[_0x35f3e3(0x277)]);if(!_0x3782e3[_0x35f3e3(0x36a)](_0x1b81a4)){console[_0x35f3e3(0x337)](_0x35f3e3(0x477)+_0x1b81a4+_0x35f3e3(0x319));return;}const _0x35ca4b=require$$0$3,_0x5bb356=_0x35ca4b['createInterface']({'input':process['stdin'],'output':process[_0x35f3e3(0x4ff)]}),_0x237074=await new Promise(_0x2d54d6=>_0x5bb356[_0x35f3e3(0x479)](_0x35f3e3(0x397)+_0x1b81a4+_0x35f3e3(0x52a),_0x2d54d6));_0x5bb356[_0x35f3e3(0x5b3)](),console[_0x35f3e3(0x337)]('');if(_0x237074['trim']()['toLowerCase']()!==_0x35f3e3(0x19c)){console[_0x35f3e3(0x337)](_0x35f3e3(0x45e));return;}let _0x2dc7fc=null;try{_0x2dc7fc=await _0x15cc9f(_0x1b81a4,_0x271bb3,async _0x2025be=>{const _0x2cb155=_0x35f3e3,_0x55a2f7=_0x2025be[_0x2cb155(0x466)],_0x22389c=_0x55a2f7?.['db']?.[_0x2cb155(0x3b5)](_0x2cb155(0x544))??null,_0x446456=[];if(_0x55a2f7?.[_0x2cb155(0x5b0)](_0x2cb155(0x228)))for(const {key:_0x141e3a,value:_0x12cbe1}of _0x55a2f7[_0x2cb155(0x180)](_0x2cb155(0x228))){_0x446456[_0x2cb155(0x437)]({'key':_0x141e3a,'value':_0x12cbe1});}return{'identity':_0x22389c,'licenses':_0x446456};});}catch(_0x5eaa58){console[_0x35f3e3(0x337)](_0x35f3e3(0x173)+_0x5eaa58['message']+_0x35f3e3(0x412));}_0x3782e3[_0x35f3e3(0x38d)](_0x1b81a4,{'recursive':!![],'force':!![]}),console[_0x35f3e3(0x337)](_0x35f3e3(0x189)+_0x1b81a4+_0x35f3e3(0x3de));if(_0x2dc7fc&&(_0x2dc7fc[_0x35f3e3(0x253)]||_0x2dc7fc[_0x35f3e3(0x5f4)][_0x35f3e3(0x3bf)]>0x0))try{await _0x15cc9f(_0x1b81a4,_0x271bb3,async _0x32b69b=>{const _0x597d2a=_0x35f3e3,_0x2e78ee=_0x32b69b[_0x597d2a(0x466)];_0x2dc7fc['identity']&&_0x2e78ee['db'][_0x597d2a(0x49b)]('__identity',_0x2dc7fc[_0x597d2a(0x253)]);if(_0x2dc7fc[_0x597d2a(0x5f4)][_0x597d2a(0x3bf)]>0x0){if(!_0x2e78ee[_0x597d2a(0x5b0)](_0x597d2a(0x228)))await _0x2e78ee[_0x597d2a(0x52e)](_0x597d2a(0x228));for(const {key:_0x3d56d4,value:_0x16f599}of _0x2dc7fc[_0x597d2a(0x5f4)]){await _0x2e78ee[_0x597d2a(0x491)](_0x597d2a(0x228),_0x3d56d4,_0x16f599);}}});const _0x5990c7=[];if(_0x2dc7fc['identity'])_0x5990c7[_0x35f3e3(0x437)](_0x35f3e3(0x2fc));if(_0x2dc7fc[_0x35f3e3(0x5f4)][_0x35f3e3(0x3bf)]>0x0)_0x5990c7[_0x35f3e3(0x437)](_0x2dc7fc[_0x35f3e3(0x5f4)][_0x35f3e3(0x3bf)]+_0x35f3e3(0x14d));console[_0x35f3e3(0x337)](_0x35f3e3(0x23f)+_0x5990c7[_0x35f3e3(0x1f6)](_0x35f3e3(0x181)));}catch(_0x113430){console[_0x35f3e3(0x337)](_0x35f3e3(0x4fa)+_0x113430[_0x35f3e3(0x154)]);}}async function _0x15cc9f(_0x42b9d1,_0x329325,_0x5a56ee){const _0x2d6898=_0x2832a7,_0x17638d=require$$5,_0x5da271=new _0x17638d(_0x42b9d1,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x266ed4(_0x329325)});await _0x5da271[_0x2d6898(0x510)]();try{return await _0x5a56ee(_0x5da271);}finally{await _0x5da271['close']();}}async function _0x2740ad(_0x3df16a,_0x33b5f8){const _0x4f190f=_0x2832a7,_0x3f0a80=require$$5,_0x4a8234=_0x33df59[_0x4f190f(0x205)](_0x33b5f8[_0x4f190f(0x277)]);console[_0x4f190f(0x337)](_0x4f190f(0x284)+_0x4a8234+'…');const _0x155fdd=new _0x3f0a80(_0x4a8234,_0x266ed4(_0x33b5f8));await _0x155fdd['open'](),console['log'](_0x4f190f(0x5fe)+_0x3df16a+'…');const {envs:_0x4ca4a7}=await _0x155fdd[_0x4f190f(0x291)][_0x4f190f(0x3a6)](_0x3df16a);for(const _0x300843 of _0x4ca4a7){const _0x341c2f=_0x300843[_0x4f190f(0x484)]>0x0?_0x4f190f(0x322)+(_0x300843[_0x4f190f(0x484)]/0x400/0x400)['toFixed'](0x2)+_0x4f190f(0x41a)+(_0x300843[_0x4f190f(0x4c8)]/0x400/0x400)[_0x4f190f(0x3fe)](0x2)+_0x4f190f(0x327):'';console[_0x4f190f(0x337)](_0x4f190f(0x405)+_0x300843[_0x4f190f(0x2f3)]+_0x4f190f(0x206)+_0x300843[_0x4f190f(0x45d)]+_0x341c2f);}await _0x155fdd[_0x4f190f(0x5b3)](),console[_0x4f190f(0x337)]('[okdb]\x20backup\x20complete');}async function _0x3f58df(_0x31f254,_0x3ed34c,_0x2a7a40){const _0x3087a9=_0x2832a7,_0x249dcd=require$$5,_0xbaf05=_0x33df59[_0x3087a9(0x205)](_0x3ed34c[_0x3087a9(0x277)]),_0x2c7295=_0x2a7a40[_0x3087a9(0x15f)]??'default',_0x3b3d8b=_0x2a7a40['types']?_0x2a7a40[_0x3087a9(0x196)][_0x3087a9(0x1f5)](',')[_0x3087a9(0x3b9)](_0x2b2c86=>_0x2b2c86[_0x3087a9(0x4e5)]()):null;console[_0x3087a9(0x337)](_0x3087a9(0x284)+_0xbaf05+'…');const _0x549e7a=new _0x249dcd(_0xbaf05,_0x266ed4(_0x3ed34c));await _0x549e7a[_0x3087a9(0x510)](),console[_0x3087a9(0x337)]('[okdb]\x20exporting\x20env\x20\x22'+_0x2c7295+_0x3087a9(0x43f)+_0x31f254+'…');const _0x581c21=await _0x549e7a[_0x3087a9(0x291)][_0x3087a9(0x269)](_0x31f254,{'envName':_0x2c7295,'types':_0x3b3d8b,'includeChanges':!!_0x2a7a40[_0x3087a9(0x1be)]});console['log'](_0x3087a9(0x218)+_0x581c21[_0x3087a9(0x196)]+'\x20\x20records='+_0x581c21[_0x3087a9(0x257)]+_0x3087a9(0x4c3)+_0x581c21[_0x3087a9(0x1be)]);if(_0x2a7a40[_0x3087a9(0x39c)]){const _0xd9eedc=_0x33df59[_0x3087a9(0x1f6)](_0x33df59['dirname'](_0x31f254),_0x3087a9(0x39c));process[_0x3087a9(0x4ff)][_0x3087a9(0x2cf)](_0x3087a9(0x5b5));const {count:_0x571192,bytes:_0x14f2af}=await _0x549e7a['migrate']['exportBlobs'](_0xd9eedc);console['log'](_0x3087a9(0x1af)+_0xd9eedc+'\x20\x20('+_0x571192+_0x3087a9(0x51a)+(_0x571192!==0x1?'s':'')+',\x20'+(_0x14f2af/0x400/0x400)[_0x3087a9(0x3fe)](0x2)+_0x3087a9(0x327));}await _0x549e7a[_0x3087a9(0x5b3)](),console[_0x3087a9(0x337)](_0x3087a9(0x297));}async function _0xec2dea(_0x293b5b,_0x561979,_0xe48456){const _0x402c4f=_0x2832a7,_0x482c5a=require$$5,_0x3e9d91=_0x33df59['resolve'](_0x561979[_0x402c4f(0x277)]),_0x2e5638=_0xe48456['env']??null,_0x39bb94=_0xe48456[_0x402c4f(0x196)]?_0xe48456[_0x402c4f(0x196)]['split'](',')[_0x402c4f(0x3b9)](_0x152274=>_0x152274[_0x402c4f(0x4e5)]()):null,_0x16cd4b=!!_0xe48456[_0x402c4f(0x4aa)];console['log'](_0x402c4f(0x284)+_0x3e9d91+'…');const _0x160170=new _0x482c5a(_0x3e9d91,_0x266ed4(_0x561979));await _0x160170[_0x402c4f(0x510)](),console[_0x402c4f(0x337)](_0x402c4f(0x375)+_0x293b5b+'…');const _0xe25939=await _0x160170[_0x402c4f(0x291)][_0x402c4f(0x44b)](_0x293b5b,{'envName':_0x2e5638,'types':_0x39bb94,'dropExisting':_0x16cd4b,'includeChanges':!!_0xe48456[_0x402c4f(0x1be)],'onProgress':({type:_0x299f20,count:_0x195402})=>{const _0x254e01=_0x402c4f;process['stdout'][_0x254e01(0x2cf)](_0x254e01(0x2d2)+_0x299f20+':\x20'+_0x195402+'\x20records…');}});process[_0x402c4f(0x4ff)][_0x402c4f(0x2cf)]('\x0a'),console[_0x402c4f(0x337)](_0x402c4f(0x3b2)+_0xe25939[_0x402c4f(0x196)]+_0x402c4f(0x3f2)+_0xe25939[_0x402c4f(0x257)]+_0x402c4f(0x4c3)+_0xe25939[_0x402c4f(0x1be)]);if(_0xe48456['blobs']){const _0x11b271=_0x33df59[_0x402c4f(0x1f6)](_0x33df59[_0x402c4f(0x347)](_0x293b5b),_0x402c4f(0x39c));if(_0x3782e3['existsSync'](_0x11b271)){const {imported:_0xed1f54,skipped:_0x4f97ba}=await _0x160170[_0x402c4f(0x291)][_0x402c4f(0x34f)](_0x11b271);console[_0x402c4f(0x337)](_0x402c4f(0x176)+_0xed1f54+'\x20\x20skipped='+_0x4f97ba);}}await _0x160170[_0x402c4f(0x5b3)](),console[_0x402c4f(0x337)](_0x402c4f(0x4ae));}async function _0x5cc34b(_0x26b2c1,_0x4669ac){const _0x2d0e72=_0x2832a7;_0x4669ac[_0x2d0e72(0x515)]&&!_0x4669ac['name']&&(console['error']('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x2d0e72(0x2be)](0x1));const _0x43db82=_0x4669ac[_0x2d0e72(0x371)]?_0x4669ac[_0x2d0e72(0x371)]['split'](',')[_0x2d0e72(0x3b9)](_0x5e8918=>_0x5e8918[_0x2d0e72(0x4e5)]())[_0x2d0e72(0x233)](Boolean):[];let _0x49749a={};if(_0x4669ac[_0x2d0e72(0x537)])try{_0x49749a=JSON[_0x2d0e72(0x530)](_0x4669ac[_0x2d0e72(0x537)]);if(typeof _0x49749a!==_0x2d0e72(0x3aa)||Array[_0x2d0e72(0x283)](_0x49749a)||_0x49749a===null)throw new Error();}catch{console[_0x2d0e72(0x1db)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x2d0e72(0x2be)](0x1);}const _0x325432=require$$5,{randomToken:_0x67ada2,hashToken:_0x2e1274,hashPassword:_0x222646}=requireOkdbAuthTokens(),_0x5ea8c7=require$$0$1,_0x17b6c4=_0x33df59[_0x2d0e72(0x205)](_0x26b2c1[_0x2d0e72(0x277)]),_0x4ee734=new _0x325432(_0x17b6c4,_0x266ed4(_0x26b2c1));await _0x4ee734[_0x2d0e72(0x510)]();try{await _0x4ee734['auth'][_0x2d0e72(0x3ec)]();if(_0x4669ac[_0x2d0e72(0x2f3)]){const _0x1dad0a=await _0x4ee734[_0x2d0e72(0x607)]['_lookupByName'](_0x4669ac[_0x2d0e72(0x2f3)]);_0x1dad0a&&(console[_0x2d0e72(0x1db)](_0x2d0e72(0x5aa)+_0x4669ac[_0x2d0e72(0x2f3)]+_0x2d0e72(0x1e4)),process['exit'](0x1));}const _0x1773da=_0x67ada2(0x20),_0x94fbb1=_0x2e1274(_0x1773da),_0x4de024=_0x4669ac[_0x2d0e72(0x515)]?await _0x222646(_0x4669ac['password']):null,_0x179f15=_0x5ea8c7['randomUUID'](),_0x40312a={'tokenHash':_0x94fbb1,'name':_0x4669ac[_0x2d0e72(0x2f3)]||null,'passwordHash':_0x4de024,'label':_0x4669ac[_0x2d0e72(0x380)]||null,'permissions':_0x43db82,'grants':_0x49749a,'createdAt':Date[_0x2d0e72(0x4b1)](),'lastUsedAt':null},_0x11d84c=_0x4669ac['ttl']?{'ttl':Number(_0x4669ac[_0x2d0e72(0x539)])}:undefined;await _0x4ee734['_systemEnv'][_0x2d0e72(0x491)](_0x2d0e72(0x413),_0x179f15,_0x40312a,_0x11d84c),console[_0x2d0e72(0x337)](_0x2d0e72(0x172)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x179f15),console[_0x2d0e72(0x337)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4669ac[_0x2d0e72(0x2f3)]||_0x2d0e72(0x55c))),console[_0x2d0e72(0x337)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x4669ac[_0x2d0e72(0x380)]||_0x2d0e72(0x55c))),console[_0x2d0e72(0x337)](_0x2d0e72(0x26b)+(_0x43db82[_0x2d0e72(0x1f6)](',\x20')||_0x2d0e72(0x4d1))),console[_0x2d0e72(0x337)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x2d0e72(0x337)](_0x2d0e72(0x5c1)+_0x1773da+'\x0a');}finally{await _0x4ee734[_0x2d0e72(0x5b3)]();}}async function _0x3963bb(_0x42bfe3){const _0x48fd72=_0x2832a7,_0x131697=require$$5,_0x2b9041=_0x33df59[_0x48fd72(0x205)](_0x42bfe3[_0x48fd72(0x277)]),_0x13fcef=new _0x131697(_0x2b9041,_0x266ed4(_0x42bfe3));await _0x13fcef[_0x48fd72(0x510)]();try{const _0x4cf69d=_0x13fcef[_0x48fd72(0x466)];if(!_0x4cf69d||!_0x4cf69d[_0x48fd72(0x5b0)]('~tokens')){console[_0x48fd72(0x337)]('No\x20tokens.');return;}const _0x5a8a15=[];for(const {key:_0x2cedc0,value:_0x1b60f6}of _0x4cf69d['getRange'](_0x48fd72(0x413))){_0x5a8a15['push']({'id':_0x2cedc0,'name':_0x1b60f6[_0x48fd72(0x2f3)]||_0x48fd72(0x55c),'label':_0x1b60f6[_0x48fd72(0x380)]||_0x48fd72(0x55c),'permissions':Array[_0x48fd72(0x283)](_0x1b60f6[_0x48fd72(0x371)])?_0x1b60f6[_0x48fd72(0x371)][_0x48fd72(0x1f6)](','):'','created':_0x1b60f6[_0x48fd72(0x295)]?new Date(_0x1b60f6[_0x48fd72(0x295)])['toISOString']()[_0x48fd72(0x467)](0x0,0xa):''});}if(_0x5a8a15['length']===0x0){console[_0x48fd72(0x337)]('No\x20tokens.');return;}const _0x14f124=!process[_0x48fd72(0x4ff)][_0x48fd72(0x22c)]||process[_0x48fd72(0x4ff)][_0x48fd72(0x22c)]>=0x64,_0x491fe0=_0x14f124?0x24:0xa,_0x29e2af=['ID'[_0x48fd72(0x44d)](_0x491fe0),_0x48fd72(0x2ea)[_0x48fd72(0x44d)](0x10),'LABEL'['padEnd'](0x14),'PERMISSIONS'['padEnd'](0x14),_0x48fd72(0x4d4)][_0x48fd72(0x1f6)]('\x20\x20');console[_0x48fd72(0x337)]('\x0a'+_0x29e2af),console['log']('-'['repeat'](_0x29e2af[_0x48fd72(0x3bf)]));for(const _0x10b459 of _0x5a8a15){const _0x3ef28c=_0x14f124?_0x10b459['id']:_0x10b459['id']['slice'](0x0,0x8)+'…';console[_0x48fd72(0x337)]([_0x3ef28c[_0x48fd72(0x44d)](_0x491fe0),_0x10b459[_0x48fd72(0x2f3)][_0x48fd72(0x467)](0x0,0x10)[_0x48fd72(0x44d)](0x10),_0x10b459[_0x48fd72(0x380)][_0x48fd72(0x467)](0x0,0x14)[_0x48fd72(0x44d)](0x14),_0x10b459[_0x48fd72(0x371)][_0x48fd72(0x467)](0x0,0x14)[_0x48fd72(0x44d)](0x14),_0x10b459[_0x48fd72(0x37b)]][_0x48fd72(0x1f6)]('\x20\x20'));}console[_0x48fd72(0x337)]('');}finally{await _0x13fcef['close']();}}async function _0xcb9d3c(_0x325459,_0xd0d248){const _0x392891=_0x2832a7;!_0x325459&&(console[_0x392891(0x1db)](_0x392891(0x56d)),process[_0x392891(0x2be)](0x1));const _0x25ebe4=require$$5,_0x2b5679=_0x33df59[_0x392891(0x205)](_0xd0d248['dbPath']),_0xcc7598=new _0x25ebe4(_0x2b5679,_0x266ed4(_0xd0d248));await _0xcc7598[_0x392891(0x510)]();try{const _0x58a248=_0xcc7598[_0x392891(0x466)];(!_0x58a248||!_0x58a248['hasType']('~tokens'))&&(console[_0x392891(0x1db)](_0x392891(0x4fc)+_0x325459+'\x22'),process[_0x392891(0x2be)](0x1));let _0x7f6b47=null,_0x4b8c6d=null;const _0x5d506f=_0x58a248[_0x392891(0x3b5)]('~tokens',_0x325459);if(_0x5d506f)_0x7f6b47=_0x325459,_0x4b8c6d=_0x5d506f;else{const _0x16d060=[];for(const {key:_0x289f67,value:_0x78737b}of _0x58a248[_0x392891(0x180)](_0x392891(0x413))){if(_0x289f67[_0x392891(0x3ca)](_0x325459))_0x16d060[_0x392891(0x437)]({'key':_0x289f67,'value':_0x78737b});}_0x16d060[_0x392891(0x3bf)]===0x0&&(console[_0x392891(0x1db)](_0x392891(0x4fc)+_0x325459+'\x22'),process['exit'](0x1));if(_0x16d060[_0x392891(0x3bf)]>0x1){console[_0x392891(0x1db)](_0x392891(0x1d6)+_0x325459+_0x392891(0x1ab)+_0x16d060[_0x392891(0x3bf)]+_0x392891(0x41b));for(const _0x5079f9 of _0x16d060){console['error']('\x20\x20'+_0x5079f9[_0x392891(0x2ac)]+_0x392891(0x5dc)+(_0x5079f9[_0x392891(0x43e)][_0x392891(0x2f3)]||_0x392891(0x55c))+')');}process[_0x392891(0x2be)](0x1);}_0x7f6b47=_0x16d060[0x0][_0x392891(0x2ac)],_0x4b8c6d=_0x16d060[0x0]['value'];}await _0x58a248['remove'](_0x392891(0x413),_0x7f6b47),console[_0x392891(0x337)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x7f6b47+_0x392891(0x5dc)+(_0x4b8c6d['name']||_0x392891(0x55c))+_0x392891(0x5be)+(_0x4b8c6d[_0x392891(0x380)]||'(unset)')+')');}finally{await _0xcc7598[_0x392891(0x5b3)]();}}function _0x53915f(_0x192a4e,_0x1a789c){const _0x1205ac=_0x2832a7;if(!_0x192a4e['activation'])return _0x1205ac(0x2df);const _0x3bbe34=_0x192a4e['expiresAt'];if(!_0x3bbe34)return'active';if(_0x1a789c>_0x3bbe34)return _0x1205ac(0x31a);return _0x1205ac(0x4a2);}function _0x52573f(_0x466f30){const _0x2d61b8=_0x2832a7;if(!_0x466f30||typeof _0x466f30!==_0x2d61b8(0x3aa))return'';const _0x38c9bb=Object[_0x2d61b8(0x487)](_0x466f30)['filter'](([,_0x34af54])=>_0x34af54)[_0x2d61b8(0x3b9)](([_0x243cb0])=>_0x243cb0);if(_0x38c9bb['length']===0x0)return _0x2d61b8(0x4d1);if(_0x38c9bb['length']<=0x3)return _0x38c9bb['join']('\x20');return _0x38c9bb['slice'](0x0,0x3)[_0x2d61b8(0x1f6)]('\x20')+('\x20+'+(_0x38c9bb[_0x2d61b8(0x3bf)]-0x3));}async function _0x2bb149(_0x248daf){const _0x48f240=_0x2832a7,_0x417d0b=require$$5,_0x54b83b=requireOkdbLicenseCodec(),{_C:_0x199628}=requireOkdbLicense(),_0x56e645=_0x33df59['resolve'](_0x248daf['dbPath']),_0x36e036=new _0x417d0b(_0x56e645,_0x266ed4(_0x248daf));await _0x36e036['open']();try{const _0x53879d=_0x36e036[_0x48f240(0x466)],_0x2c1f3a=_0x53879d?.['db']?.[_0x48f240(0x3b5)]?.('__writeCounter')??0x0,_0x444a74=[..._0x36e036[_0x48f240(0x580)][_0x48f240(0x17a)]()][_0x48f240(0x233)](_0x2eaa60=>!_0x2eaa60[_0x48f240(0x3ca)]('~'))[_0x48f240(0x3bf)],_0x189255=_0x36e036[_0x48f240(0x545)]?.[_0x48f240(0x249)];if(_0x189255){const _0x41c340=_0x189255['_isFree']===!![],_0x50fed3=_0x41c340?'free\x20tier':_0x36e036[_0x48f240(0x545)]['active']?.[_0x48f240(0x4f8)]||_0x48f240(0x2b7);console['log'](''),console['log']('\x20\x20Tier:\x20\x20\x20\x20'+_0x50fed3);const _0x3ee36b=_0x189255[_0x48f240(0x48f)]||{};if(_0x3ee36b[_0x48f240(0x486)]){const _0x5a12d6=Math[_0x48f240(0x47a)](_0x2c1f3a/_0x3ee36b[_0x48f240(0x486)]*0x64);console[_0x48f240(0x337)]('\x20\x20Writes:\x20\x20'+_0x2c1f3a[_0x48f240(0x348)]()+_0x48f240(0x2c5)+_0x3ee36b[_0x48f240(0x486)][_0x48f240(0x348)]()+_0x48f240(0x322)+_0x5a12d6+'%)');}else console[_0x48f240(0x337)](_0x48f240(0x596)+_0x2c1f3a[_0x48f240(0x348)]());_0x3ee36b[_0x48f240(0x33c)]?console['log'](_0x48f240(0x19e)+_0x444a74+_0x48f240(0x2c5)+_0x3ee36b[_0x48f240(0x33c)]):console[_0x48f240(0x337)](_0x48f240(0x19e)+_0x444a74),_0x199628?.['PUB_FINGERPRINT']&&console['log'](_0x48f240(0x446)+_0x199628[_0x48f240(0x17e)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x53879d||!_0x53879d[_0x48f240(0x5b0)](_0x48f240(0x228))){console[_0x48f240(0x337)](''),console[_0x48f240(0x337)](_0x48f240(0x42b)),console[_0x48f240(0x337)]('');return;}const _0x4f3d93=[],_0x351088=Date[_0x48f240(0x4b1)](),_0x192b02=_0x36e036['id'],_0x30a708=_0x48f240(0x301);for(const {key:_0x4476ee,value:_0x16607b}of _0x53879d[_0x48f240(0x180)](_0x48f240(0x228))){const _0x557414=_0x16607b['_licenseHash']?Buffer[_0x48f240(0x1f8)](_0x16607b[_0x48f240(0x2b9)],_0x48f240(0x1ce)):Buffer[_0x48f240(0x31f)](0x8);let _0x30d585='';try{_0x30d585=_0x54b83b[_0x48f240(0x20f)](_0x192b02,_0x557414,_0x30a708)[_0x48f240(0x2bb)];}catch{}_0x4f3d93[_0x48f240(0x437)]({'id':_0x4476ee,'licensee':_0x16607b[_0x48f240(0x4f8)]||'','expires':_0x16607b[_0x48f240(0x304)]?new Date(_0x16607b[_0x48f240(0x304)])[_0x48f240(0x1e5)]()['slice'](0x0,0xa):'','features':_0x52573f(_0x16607b[_0x48f240(0x308)]),'pin':_0x30d585,'status':_0x53915f(_0x16607b,_0x351088)});}if(_0x4f3d93[_0x48f240(0x3bf)]===0x0){console[_0x48f240(0x337)](''),console[_0x48f240(0x337)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x48f240(0x337)]('');return;}const _0x1a56db=['\x20\x20'+'ID'[_0x48f240(0x44d)](0xe),_0x48f240(0x1e6)['padEnd'](0xe),_0x48f240(0x4a8)[_0x48f240(0x44d)](0xc),'FEATURES'[_0x48f240(0x44d)](0x1e),_0x48f240(0x264)[_0x48f240(0x44d)](0xa),_0x48f240(0x26c)][_0x48f240(0x1f6)]('\x20');console['log']('\x0a'+_0x1a56db);for(const _0x409342 of _0x4f3d93){const _0x3c2090=_0x409342['id'][_0x48f240(0x467)](0x0,0x8)+'\u2026';console[_0x48f240(0x337)](['\x20\x20'+_0x3c2090[_0x48f240(0x44d)](0xe),_0x409342[_0x48f240(0x4f8)][_0x48f240(0x467)](0x0,0xe)['padEnd'](0xe),_0x409342[_0x48f240(0x48a)]['padEnd'](0xc),_0x409342[_0x48f240(0x308)][_0x48f240(0x467)](0x0,0x1e)[_0x48f240(0x44d)](0x1e),_0x409342[_0x48f240(0x2bb)][_0x48f240(0x44d)](0xa),_0x409342['status']][_0x48f240(0x1f6)]('\x20'));}console[_0x48f240(0x337)]('');}finally{await _0x36e036[_0x48f240(0x5b3)]();}}async function _0x1eebd8(_0x59d01e,_0xdbfc39){const _0x18ff57=_0x2832a7,_0x1bb53b=require$$5,_0x21e0a4=requireOkdbLicenseCodec();let _0x38d8ff=_0x59d01e;(_0x21e0a4[_0x18ff57(0x227)](_0x59d01e)===_0x18ff57(0x188)||_0x3782e3['existsSync'](_0x59d01e)&&_0x3782e3[_0x18ff57(0x546)](_0x59d01e)['isFile']())&&(_0x38d8ff=_0x3782e3[_0x18ff57(0x47f)](_0x59d01e,'utf8')[_0x18ff57(0x4e5)]());const _0x453681=_0x33df59[_0x18ff57(0x205)](_0xdbfc39[_0x18ff57(0x277)]),_0x3e45b5=new _0x1bb53b(_0x453681,_0x266ed4(_0xdbfc39));await _0x3e45b5['open']();try{let _0x554fcb;try{_0x554fcb=await _0x3e45b5[_0x18ff57(0x5f4)]['add']({'blob':_0x38d8ff});}catch(_0x476018){console[_0x18ff57(0x1db)]('[okdb]\x20error:\x20'+_0x476018['message']),process['exit'](0x1);}const _0xcd39a5=_0x554fcb[_0x18ff57(0x2bb)]||'',_0x42915f=Object[_0x18ff57(0x487)](_0x554fcb['features']||{})[_0x18ff57(0x233)](([,_0x42bb89])=>_0x42bb89)[_0x18ff57(0x3b9)](([_0x4ca592])=>_0x4ca592),_0x55cd1f=_0x554fcb['limits']||{},_0xbcca8d=[_0x55cd1f[_0x18ff57(0x33c)]?_0x18ff57(0x576)+_0x55cd1f[_0x18ff57(0x33c)]:null,_0x55cd1f[_0x18ff57(0x35c)]?_0x18ff57(0x246)+_0x55cd1f[_0x18ff57(0x35c)]:null,_0x55cd1f[_0x18ff57(0x2a8)]?_0x18ff57(0x3e4)+_0x55cd1f[_0x18ff57(0x2a8)]:null,_0x55cd1f[_0x18ff57(0x486)]?_0x18ff57(0x2eb)+_0x55cd1f[_0x18ff57(0x486)][_0x18ff57(0x348)]():null][_0x18ff57(0x233)](Boolean)[_0x18ff57(0x1f6)]('\x20\x20'),_0x4ae80c=_0x554fcb[_0x18ff57(0x2cd)]!==_0x18ff57(0x399);console[_0x18ff57(0x337)](_0x554fcb[_0x18ff57(0x603)]?_0x18ff57(0x2ce):_0x18ff57(0x441)),console['log'](_0x18ff57(0x213)+_0x554fcb['id']),console[_0x18ff57(0x337)](_0x18ff57(0x20b)+_0x554fcb[_0x18ff57(0x4f8)]),console[_0x18ff57(0x337)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x554fcb[_0x18ff57(0x304)]?new Date(_0x554fcb[_0x18ff57(0x304)])['toISOString']()[_0x18ff57(0x467)](0x0,0xa):_0x18ff57(0x311))),console[_0x18ff57(0x337)](_0x18ff57(0x289)+(_0x42915f[_0x18ff57(0x1f6)](',\x20')||_0x18ff57(0x4d1)));if(_0xbcca8d)console['log'](_0x18ff57(0x553)+_0xbcca8d);if(_0x4ae80c)console[_0x18ff57(0x337)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x554fcb[_0x18ff57(0x2cd)]+_0x18ff57(0x171)),console[_0x18ff57(0x337)]('');else!_0x554fcb[_0x18ff57(0x411)]?(console[_0x18ff57(0x337)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x554fcb[_0x18ff57(0x281)]),console[_0x18ff57(0x337)]('')):(console['log'](_0x18ff57(0x363)+_0xcd39a5),console[_0x18ff57(0x337)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console[_0x18ff57(0x337)](''),console[_0x18ff57(0x337)](_0x18ff57(0x2e2)),console[_0x18ff57(0x337)](_0x18ff57(0x139)+_0xcd39a5+_0x18ff57(0x2c2)),console['log']('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x18ff57(0x337)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x18ff57(0x337)](''));}finally{await _0x3e45b5[_0x18ff57(0x5b3)]();}}async function _0x5c6831(_0x5dbf85,_0x4abee7){const _0x3b8665=_0x2832a7,_0x4f463d=require$$5,_0x34eb75=_0x33df59[_0x3b8665(0x205)](_0x4abee7[_0x3b8665(0x277)]),_0x1c8006=new _0x4f463d(_0x34eb75,_0x266ed4(_0x4abee7));await _0x1c8006[_0x3b8665(0x510)]();try{let _0x5cdaf6;try{_0x5cdaf6=await _0x1c8006['licenses'][_0x3b8665(0x251)](_0x5dbf85);}catch(_0x483d5e){console['error'](_0x3b8665(0x4e8)+_0x483d5e[_0x3b8665(0x154)]),console[_0x3b8665(0x1db)](''),console['error']('\x20\x20Common\x20causes:'),console[_0x3b8665(0x1db)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x3b8665(0x1db)](_0x3b8665(0x258)),console['error'](_0x3b8665(0x3c4)),console[_0x3b8665(0x1db)](''),process['exit'](0x1);}console['log'](_0x3b8665(0x583)),console[_0x3b8665(0x337)](_0x3b8665(0x213)+_0x5cdaf6['id']),console['log'](_0x3b8665(0x20b)+_0x5cdaf6['licensee']),console[_0x3b8665(0x337)](_0x3b8665(0x234)+(_0x5cdaf6['expiresAt']?new Date(_0x5cdaf6[_0x3b8665(0x304)])['toISOString']()[_0x3b8665(0x467)](0x0,0xa):_0x3b8665(0x311))),console['log'](_0x3b8665(0x565)),console[_0x3b8665(0x337)]('');}finally{await _0x1c8006['close']();}}async function _0x3e180d(_0x5a40e4,_0x3aebd){const _0x12f04e=_0x2832a7;!_0x5a40e4&&(console[_0x12f04e(0x1db)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x12f04e(0x2be)](0x1));const _0x4d7442=require$$5,_0x533590=requireOkdbLicenseCodec(),_0x13ce64=_0x33df59[_0x12f04e(0x205)](_0x3aebd['dbPath']),_0x4c6149=new _0x4d7442(_0x13ce64,_0x266ed4(_0x3aebd));await _0x4c6149[_0x12f04e(0x510)]();try{const _0x27f684=_0x4c6149[_0x12f04e(0x466)];(!_0x27f684||!_0x27f684[_0x12f04e(0x5b0)](_0x12f04e(0x228)))&&(console[_0x12f04e(0x1db)](_0x12f04e(0x460)+_0x5a40e4+'\x22'),process[_0x12f04e(0x2be)](0x1));let _0x43655d=null,_0x241cdd=null;const _0x42e27b=_0x27f684[_0x12f04e(0x3b5)](_0x12f04e(0x228),_0x5a40e4);if(_0x42e27b)_0x43655d=_0x5a40e4,_0x241cdd=_0x42e27b;else{const _0x2fe81c=[];for(const {key:_0x1320cd,value:_0x5cc236}of _0x27f684[_0x12f04e(0x180)](_0x12f04e(0x228))){if(_0x1320cd[_0x12f04e(0x3ca)](_0x5a40e4))_0x2fe81c[_0x12f04e(0x437)]({'key':_0x1320cd,'value':_0x5cc236});}_0x2fe81c[_0x12f04e(0x3bf)]===0x0&&(console[_0x12f04e(0x1db)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x5a40e4+'\x22'),process[_0x12f04e(0x2be)](0x1)),_0x2fe81c[_0x12f04e(0x3bf)]>0x1&&(console['error'](_0x12f04e(0x1d6)+_0x5a40e4+_0x12f04e(0x1ab)+_0x2fe81c[_0x12f04e(0x3bf)]+'\x20licenses'),process[_0x12f04e(0x2be)](0x1)),_0x43655d=_0x2fe81c[0x0][_0x12f04e(0x2ac)],_0x241cdd=_0x2fe81c[0x0][_0x12f04e(0x43e)];}const _0x666f44=Date[_0x12f04e(0x4b1)](),_0x18555d=_0x53915f(_0x241cdd,_0x666f44),_0x29d7d6=_0x4c6149['id'],_0x49351f=_0x12f04e(0x301);let _0x3ed2d6='';try{const _0x45bb66=Buffer[_0x12f04e(0x1f8)](_0x241cdd['_licenseHash'],_0x12f04e(0x1ce));_0x3ed2d6=_0x533590[_0x12f04e(0x20f)](_0x29d7d6,_0x45bb66,_0x49351f)[_0x12f04e(0x2bb)];}catch{}const _0x3d7efd=_0x241cdd[_0x12f04e(0x308)]?Object[_0x12f04e(0x487)](_0x241cdd['features'])[_0x12f04e(0x233)](([,_0x1cef3d])=>_0x1cef3d)[_0x12f04e(0x3b9)](([_0x1601d1])=>_0x1601d1):[],_0x4e2443=_0x241cdd[_0x12f04e(0x48f)]||{},_0x1638ce=_0x27f684?.['db']?.[_0x12f04e(0x3b5)]?.(_0x12f04e(0x1cc))??0x0,_0x5be268=[..._0x4c6149[_0x12f04e(0x580)]['keys']()][_0x12f04e(0x233)](_0x3e99e5=>!_0x3e99e5[_0x12f04e(0x3ca)]('~'))[_0x12f04e(0x3bf)];console[_0x12f04e(0x337)](_0x12f04e(0x2a0)),console['log'](_0x12f04e(0x213)+_0x43655d),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+(_0x241cdd['licensee']||'')),console[_0x12f04e(0x337)](_0x12f04e(0x234)+(_0x241cdd[_0x12f04e(0x304)]?new Date(_0x241cdd[_0x12f04e(0x304)])[_0x12f04e(0x1e5)]()[_0x12f04e(0x467)](0x0,0xa):'')),console[_0x12f04e(0x337)](_0x12f04e(0x289)+(_0x3d7efd[_0x12f04e(0x1f6)](',\x20')||_0x12f04e(0x4d1))),console[_0x12f04e(0x337)](_0x12f04e(0x363)+_0x3ed2d6),console[_0x12f04e(0x337)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x18555d),console['log']('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x241cdd[_0x12f04e(0x32c)])[_0x12f04e(0x1e5)]());if(_0x18555d==='active'){console[_0x12f04e(0x337)](''),console[_0x12f04e(0x337)](_0x12f04e(0x2a6));if(_0x4e2443['maxWrites']){const _0x28c02e=Math[_0x12f04e(0x47a)](_0x1638ce/_0x4e2443[_0x12f04e(0x486)]*0x64);console['log'](_0x12f04e(0x533)+_0x1638ce['toLocaleString']()+'\x20/\x20'+_0x4e2443[_0x12f04e(0x486)]['toLocaleString']()+_0x12f04e(0x322)+_0x28c02e+'%)');}else console[_0x12f04e(0x337)](_0x12f04e(0x533)+_0x1638ce[_0x12f04e(0x348)]()+'\x20\x20(unlimited)');_0x4e2443['envs']?console['log']('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x5be268+_0x12f04e(0x2c5)+_0x4e2443['envs']):console[_0x12f04e(0x337)](_0x12f04e(0x16b)+_0x5be268+_0x12f04e(0x53f));}console[_0x12f04e(0x337)]('');}finally{await _0x4c6149[_0x12f04e(0x5b3)]();}}async function _0x5215fc(_0x4539e6,_0x24c8b4){const _0x3fe48e=_0x2832a7;!_0x4539e6&&(console[_0x3fe48e(0x1db)](_0x3fe48e(0x428)),process[_0x3fe48e(0x2be)](0x1));const _0x2e7ac5=require$$5,_0x2ef313=_0x33df59['resolve'](_0x24c8b4['dbPath']),_0x481bd1=new _0x2e7ac5(_0x2ef313,_0x266ed4(_0x24c8b4));await _0x481bd1['open']();try{const _0x58bf01=_0x481bd1[_0x3fe48e(0x466)];(!_0x58bf01||!_0x58bf01[_0x3fe48e(0x5b0)](_0x3fe48e(0x228)))&&(console['error'](_0x3fe48e(0x460)+_0x4539e6+'\x22'),process['exit'](0x1));let _0x15101f=null,_0x2b348b=null;const _0x3804b6=_0x58bf01['get'](_0x3fe48e(0x228),_0x4539e6);if(_0x3804b6)_0x15101f=_0x4539e6,_0x2b348b=_0x3804b6;else{const _0x303bdb=[];for(const {key:_0x5536ee,value:_0x548c13}of _0x58bf01[_0x3fe48e(0x180)](_0x3fe48e(0x228))){if(_0x5536ee['startsWith'](_0x4539e6))_0x303bdb[_0x3fe48e(0x437)]({'key':_0x5536ee,'value':_0x548c13});}_0x303bdb['length']===0x0&&(console[_0x3fe48e(0x1db)](_0x3fe48e(0x460)+_0x4539e6+'\x22'),process[_0x3fe48e(0x2be)](0x1)),_0x303bdb['length']>0x1&&(console[_0x3fe48e(0x1db)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x4539e6+_0x3fe48e(0x1ab)+_0x303bdb[_0x3fe48e(0x3bf)]+_0x3fe48e(0x5f6)),process[_0x3fe48e(0x2be)](0x1)),_0x15101f=_0x303bdb[0x0][_0x3fe48e(0x2ac)],_0x2b348b=_0x303bdb[0x0][_0x3fe48e(0x43e)];}await _0x58bf01[_0x3fe48e(0x492)]('~licenses',_0x15101f),console[_0x3fe48e(0x337)]('\x20\x20✓\x20Removed\x20license\x20'+_0x15101f+'\x20\x20(licensee:\x20'+(_0x2b348b[_0x3fe48e(0x4f8)]||_0x3fe48e(0x55c))+')');}finally{await _0x481bd1[_0x3fe48e(0x5b3)]();}}async function _0x263374(_0x472bd3,_0x327477,_0x476bdc){const _0x4ace39=_0x2832a7;!_0x472bd3&&(console['error'](_0x4ace39(0x200)),process[_0x4ace39(0x2be)](0x1));!_0x476bdc['token']&&!(_0x476bdc[_0x4ace39(0x42d)]&&_0x476bdc[_0x4ace39(0x515)])&&(console[_0x4ace39(0x1db)](_0x4ace39(0x211)),process[_0x4ace39(0x2be)](0x1));const _0x3fc5ec=_0x476bdc[_0x4ace39(0x2e3)]||_0x327477[_0x4ace39(0x16d)]?.['address'];!_0x3fc5ec&&(console[_0x4ace39(0x1db)](_0x4ace39(0x3ae)+_0x4ace39(0x56a)+_0x4ace39(0x290)),process[_0x4ace39(0x2be)](0x1));const _0x2b271d=require$$5,_0x1bfef9=new _0x2b271d(_0x327477[_0x4ace39(0x277)],{'sync':{'address':_0x3fc5ec,'auto_reconcile':![]}});await _0x1bfef9['open']();try{const _0xf1d3ed=_0x1bfef9['_systemEnv'];if(_0xf1d3ed&&_0xf1d3ed[_0x4ace39(0x5b0)](_0x4ace39(0x413))){let _0x5cfdee=![];for(const _0x47bf05 of _0xf1d3ed[_0x4ace39(0x180)]('~tokens')){_0x5cfdee=!![];break;}_0x5cfdee&&console[_0x4ace39(0x337)](_0x4ace39(0x2ab)+_0x4ace39(0x2d4));}console['log'](_0x4ace39(0x151)+_0x472bd3+'…'),await _0x1bfef9['sync'][_0x4ace39(0x1f6)](_0x472bd3[_0x4ace39(0x5c4)](/\/+$/,''),{'token':_0x476bdc[_0x4ace39(0x372)],'username':_0x476bdc[_0x4ace39(0x42d)],'password':_0x476bdc[_0x4ace39(0x515)]}),console[_0x4ace39(0x337)](_0x4ace39(0x4e0)),console['log']('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x1bfef9[_0x4ace39(0x5b3)]();}}async function _0x9d24(){const _0x39ae0d=_0x2832a7,_0x132ec9=Date[_0x39ae0d(0x4b1)](),_0x5eeedc=_0x5a04fb(process[_0x39ae0d(0x332)]),_0x163cce=_0x4a4bfe(_0x5eeedc),_0x38d99e=_0x33df59[_0x39ae0d(0x205)](_0x163cce[_0x39ae0d(0x277)]);!_0x163cce[_0x39ae0d(0x1b1)]&&!process['stdin']['isTTY']&&(_0x163cce[_0x39ae0d(0x1b1)]=!![]);const _0x1d49c6=require$$5,{start:_0x24faaa,colorLog:_0xd08ea3}=requireOkdbShell(),_0x48c2f7=require$$1$2,_0x2df145={..._0x163cce[_0x39ae0d(0x2ac)]?{'encryptionKey':_0x163cce[_0x39ae0d(0x2ac)]}:{},..._0x163cce[_0x39ae0d(0x25e)]?{'admin':![]}:_0x3d85e1(_0x163cce[_0x39ae0d(0x3bc)])?{'admin':_0x163cce['admin']}:{},..._0x3d85e1(_0x163cce[_0x39ae0d(0x150)])?{'api':_0x163cce[_0x39ae0d(0x150)]}:{},..._0x3d85e1(_0x163cce[_0x39ae0d(0x607)])?{'auth':_0x163cce[_0x39ae0d(0x607)]}:{},..._0x3d85e1(_0x163cce[_0x39ae0d(0x532)])?{'mcp':_0x163cce['mcp']}:{},..._0x163cce[_0x39ae0d(0x3a3)]!==![]?{'timeMachine':_0x163cce[_0x39ae0d(0x3a3)]}:{}},_0x4342fa=_0xf98c96(_0x163cce);if(!_0x48c2f7[_0x39ae0d(0x600)]){const _0x3e174c=_0x1fd81c(),_0x28676d=_0x163cce['noCluster']?_0x39ae0d(0x433):_0x163cce[_0x39ae0d(0x1ad)]!=null&&_0x163cce[_0x39ae0d(0x1ad)]!==''?_0x39ae0d(0x29b):process.env.OKDB_HTTP_WORKERS?'OKDB_HTTP_WORKERS\x20env':_0x163cce[_0x39ae0d(0x338)]?.[_0x39ae0d(0x606)]!=null?_0x39ae0d(0x38e):'default:\x20cores−1\x20=\x20'+Math[_0x39ae0d(0x142)](0x1,require$$0[_0x39ae0d(0x2c7)]()['length']-0x1);process[_0x39ae0d(0x4ff)]['write'](_0x39ae0d(0x1d1)+_0x4342fa+'\x20('+_0x28676d+(!_0x3e174c?_0x39ae0d(0x2a4):'')+')\x0a');}if(_0x48c2f7[_0x39ae0d(0x600)]){const _0x1ed275={..._0x2df145},_0x24b655=new _0x1d49c6(_0x38d99e,_0x1ed275);_0x24b655[_0x39ae0d(0x337)][_0x39ae0d(0x4a7)]?.();const _0x2011b5=process.env.OKDB_CLUSTER_SLOT??'?',_0x359f2f={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x164272=_0x359f2f[_0x163cce['logLevel']]??_0x359f2f[_0x39ae0d(0x219)];_0x24b655[_0x39ae0d(0x337)][_0x39ae0d(0x3c7)](_0xe6c7fe=>{const _0x33b86e=_0x39ae0d;if((_0x359f2f[_0xe6c7fe['level']]??0x1)<_0x164272)return;try{process[_0x33b86e(0x353)]?.({'__okdbCluster':_0x33b86e(0x337),'slot':_0x2011b5,'pid':process[_0x33b86e(0x4af)],'entry':_0xe6c7fe});}catch{}}),await _0x24b655[_0x39ae0d(0x510)]();const {attachWorkerCluster:_0x56e93e}=requireOkdbCluster();_0x56e93e(_0x24b655),await _0x112187(_0x24b655,_0x163cce['port']);return;}if(_0x4342fa>0x1){const {runClustered:_0x3f486b}=requireOkdbCluster(),_0x53831c=new _0x1d49c6(_0x38d99e,{..._0x2df145,'engines':![],'processors':![],'compaction':![]});await _0x53831c[_0x39ae0d(0x510)]();const _0x2005c2=async()=>{const _0x351207=_0x39ae0d,_0x1d43cf=new _0x1d49c6(_0x38d99e,{..._0x2df145});return await _0x1d43cf[_0x351207(0x510)](),_0x1d43cf;},_0x134719=_0x3f486b({'workers':_0x4342fa,'makeOkdb':_0x2005c2,'port':_0x163cce[_0x39ae0d(0x5eb)],'primaryOkdb':_0x53831c});let _0x5e64d1=![];async function _0x4fbc8e(_0x3ae5f8){const _0x4969a4=_0x39ae0d;_0x5e64d1&&(process[_0x4969a4(0x595)]['write']('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x4969a4(0x2be)](0x82));_0x5e64d1=!![],process[_0x4969a4(0x595)]['write'](_0x4969a4(0x5af)+(_0x3ae5f8||'shutdown')+_0x4969a4(0x3b4));const _0x84bfcb=setTimeout(()=>{const _0x4daf40=_0x4969a4;process[_0x4daf40(0x595)]['write']('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process['exit'](0x0);},0xbb8);_0x84bfcb[_0x4969a4(0x23c)]?.();try{await _0x134719['close']();}catch(_0x34f274){process[_0x4969a4(0x595)][_0x4969a4(0x2cf)](_0x4969a4(0x215)+(_0x34f274?.[_0x4969a4(0x154)]??_0x34f274)+'\x0a');}try{await _0x53831c[_0x4969a4(0x5b3)]();}catch(_0x49f1fc){process[_0x4969a4(0x595)][_0x4969a4(0x2cf)](_0x4969a4(0x169)+(_0x49f1fc?.[_0x4969a4(0x154)]??_0x49f1fc)+'\x0a');}process['exit'](0x0);}_0x163cce['clusterWorkers']=_0x4342fa;if(!_0x163cce[_0x39ae0d(0x1b1)]){_0x53831c['log']['detachConsole']?.(),_0x56dbed(_0x53831c[_0x39ae0d(0x607)]?.[_0x39ae0d(0x15b)]?.()??[]),await _0x24faaa(_0x53831c,_0x163cce);return;}process[_0x39ae0d(0x4ff)]['write'](_0x39ae0d(0x46a)+process[_0x39ae0d(0x4af)]+':\x20processor\x20(HTTP-silent),\x20'+_0x4342fa+'\x20'+('passive\x20HTTP\x20worker(s)\x20serving\x20:'+_0x163cce[_0x39ae0d(0x5eb)]+'\x0a')),console[_0x39ae0d(0x337)](''),console['log']('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x39ae0d(0x337)]('\x20\x20\x20\x20port:\x20\x20\x20\x20'+_0x163cce['port']+'\x20\x20('+_0x4342fa+'\x20HTTP\x20workers,\x20primary\x20=\x20processor)'),console[_0x39ae0d(0x337)]('\x20\x20\x20\x20path:\x20\x20\x20\x20'+_0x38d99e),console[_0x39ae0d(0x337)](_0x39ae0d(0x56e)+_0x53831c['id']),console[_0x39ae0d(0x337)](_0x39ae0d(0x2f8)+_0x163cce[_0x39ae0d(0x5eb)]+_0x39ae0d(0x298));!_0x163cce['noAdmin']&&console[_0x39ae0d(0x337)](_0x39ae0d(0x25b)+_0x163cce[_0x39ae0d(0x5eb)]+_0x39ae0d(0x293));console['log'](''),_0x56dbed(_0x53831c[_0x39ae0d(0x607)]?.[_0x39ae0d(0x15b)]?.()??[]),process['on'](_0x39ae0d(0x2f2),()=>_0x4fbc8e('SIGINT')),process['on'](_0x39ae0d(0x241),()=>_0x4fbc8e(_0x39ae0d(0x241))),process['on'](_0x39ae0d(0x526),()=>_0x4fbc8e(_0x39ae0d(0x526)));return;}const _0x2c4978=new _0x1d49c6(_0x38d99e,_0x2df145);_0x2c4978[_0x39ae0d(0x337)][_0x39ae0d(0x4a7)]?.();const _0x1a12a5=_0x2c4978[_0x39ae0d(0x337)][_0x39ae0d(0x3c7)](_0x14d297=>_0xd08ea3(_0x14d297,_0x163cce['logLevel']));if(_0x163cce[_0x39ae0d(0x1b1)])process['stdout'][_0x39ae0d(0x2cf)](_0x39ae0d(0x3f6));await _0x2c4978[_0x39ae0d(0x510)]();if(_0x163cce[_0x39ae0d(0x1b1)])process['stdout'][_0x39ae0d(0x2cf)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x112187(_0x2c4978,_0x163cce[_0x39ae0d(0x5eb)]);}catch(_0x264366){_0x264366['code']===_0x39ae0d(0x47e)&&(console['error'](_0x39ae0d(0x3f3)+_0x163cce[_0x39ae0d(0x5eb)]+_0x39ae0d(0x342)),process['exit'](0x1));throw _0x264366;}if(_0x163cce['noRepl'])process[_0x39ae0d(0x4ff)][_0x39ae0d(0x2cf)]('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x163cce[_0x39ae0d(0x5eb)]+'\x0a');if(!_0x163cce[_0x39ae0d(0x1b1)])_0x2c4978[_0x39ae0d(0x337)][_0x39ae0d(0x4a7)]?.(),_0x1a12a5?.(),_0x56dbed(_0x2c4978[_0x39ae0d(0x607)]?.[_0x39ae0d(0x15b)]?.()??[]),await _0x24faaa(_0x2c4978,_0x163cce);else{const _0x4b441e=_0x33df59['join'](_0x38d99e,_0x39ae0d(0x4d5));try{_0x3782e3[_0x39ae0d(0x279)](_0x4b441e,String(process[_0x39ae0d(0x4af)]));}catch{}const _0x2ec4f2=Date[_0x39ae0d(0x4b1)]()-_0x132ec9;console[_0x39ae0d(0x337)](''),console[_0x39ae0d(0x337)](_0x39ae0d(0x512)),console['log'](_0x39ae0d(0x45f)+_0x163cce['port']),console[_0x39ae0d(0x337)](_0x39ae0d(0x548)+_0x38d99e),console['log'](_0x39ae0d(0x485)+_0x2c4978['id']);{const _0x64316f=_0x2c4978[_0x39ae0d(0x466)]?.['db']?.[_0x39ae0d(0x3b5)]?.(_0x39ae0d(0x1cc))??0x0,_0x2cc299=[..._0x2c4978[_0x39ae0d(0x580)][_0x39ae0d(0x17a)]()][_0x39ae0d(0x233)](_0x5b8365=>!_0x5b8365['startsWith']('~'))[_0x39ae0d(0x3bf)];if(_0x2c4978['_license']?.['active']?.[_0x39ae0d(0x1c4)]===0x1){const _0x9b40bc=Math[_0x39ae0d(0x4e3)]((_0x2c4978[_0x39ae0d(0x545)][_0x39ae0d(0x4a2)][_0x39ae0d(0x304)]-Date[_0x39ae0d(0x4b1)]())/0x5265c00);console[_0x39ae0d(0x337)](_0x39ae0d(0x3e3)+_0x2c4978[_0x39ae0d(0x545)][_0x39ae0d(0x4a2)]['licensee']+'\x20(expires\x20in\x20'+_0x9b40bc+_0x39ae0d(0x14e));}else{if(_0x2c4978[_0x39ae0d(0x545)]?.[_0x39ae0d(0x4a2)]){const _0x57c653=_0x2c4978[_0x39ae0d(0x545)][_0x39ae0d(0x4a2)];console[_0x39ae0d(0x337)](_0x39ae0d(0x34a)+_0x57c653[_0x39ae0d(0x4f8)]+'\x20(expires\x20'+new Date(_0x57c653['expiresAt'])['toISOString']()[_0x39ae0d(0x467)](0x0,0xa)+')');const _0x8c7385=_0x57c653[_0x39ae0d(0x48f)]||{};if(_0x8c7385[_0x39ae0d(0x486)]){const _0x17be65=Math[_0x39ae0d(0x47a)](_0x64316f/_0x8c7385[_0x39ae0d(0x486)]*0x64);console[_0x39ae0d(0x337)](_0x39ae0d(0x358)+_0x64316f[_0x39ae0d(0x348)]()+_0x39ae0d(0x2c5)+_0x8c7385[_0x39ae0d(0x486)][_0x39ae0d(0x348)]()+_0x39ae0d(0x5f8)+_0x17be65+_0x39ae0d(0x2d8)+_0x2cc299+(_0x8c7385[_0x39ae0d(0x33c)]?'/'+_0x8c7385[_0x39ae0d(0x33c)]:'')+_0x39ae0d(0x1c5)+(_0x2cc299===0x1?'':'s'));}}else{if(_0x2c4978['_license']){const _0x3b809f=_0x2c4978[_0x39ae0d(0x545)][_0x39ae0d(0x3fb)](),_0x84d1fb=_0x3b809f['length']?_0x3b809f[_0x39ae0d(0x3b9)](_0x2bf577=>_0x2bf577[_0x39ae0d(0x2bb)])[_0x39ae0d(0x1f6)](',\x20'):_0x39ae0d(0x5ef),_0x1b4f1d=_0x2c4978['_license']['effective'],_0x4cca37=_0x1b4f1d['limits'][_0x39ae0d(0x486)]?Math['round'](_0x64316f/_0x1b4f1d[_0x39ae0d(0x48f)]['maxWrites']*0x64):0x0;console[_0x39ae0d(0x337)](_0x39ae0d(0x524)),console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x64316f['toLocaleString']()+_0x39ae0d(0x2c5)+_0x1b4f1d[_0x39ae0d(0x48f)][_0x39ae0d(0x486)][_0x39ae0d(0x348)]()+'\x20writes\x20('+_0x4cca37+_0x39ae0d(0x2d8)+_0x2cc299+'\x20/\x20'+_0x1b4f1d[_0x39ae0d(0x48f)]['envs']+'\x20envs'),console[_0x39ae0d(0x337)](_0x39ae0d(0x448)+_0x84d1fb);}}}}console['log'](_0x39ae0d(0x3d8)+_0x163cce[_0x39ae0d(0x5eb)]+_0x39ae0d(0x298));!_0x163cce[_0x39ae0d(0x25e)]&&console[_0x39ae0d(0x337)](_0x39ae0d(0x29f)+_0x163cce[_0x39ae0d(0x5eb)]+'/admin/index.html');console['log'](''),console[_0x39ae0d(0x337)](_0x39ae0d(0x37e)+_0x2ec4f2+'ms'),_0x56dbed(_0x2c4978[_0x39ae0d(0x607)]?.[_0x39ae0d(0x15b)]?.()??[]);let _0x13fe2f=![];async function _0x15dc94(_0x5daf93){const _0x30ff9b=_0x39ae0d;_0x13fe2f&&(process[_0x30ff9b(0x595)]['write'](_0x30ff9b(0x498)),process[_0x30ff9b(0x2be)](0x82));_0x13fe2f=!![],process[_0x30ff9b(0x595)][_0x30ff9b(0x2cf)](_0x30ff9b(0x5af)+(_0x5daf93||_0x30ff9b(0x5a6))+',\x20closing…\x0a');const _0x228788=setTimeout(()=>{const _0x12a850=_0x30ff9b;process[_0x12a850(0x595)]['write'](_0x12a850(0x54a)),process[_0x12a850(0x2be)](0x1);},0x1388);try{_0x3782e3[_0x30ff9b(0x252)](_0x4b441e);}catch{}try{await _0x2c4978['close']();}catch(_0x1b2e23){process[_0x30ff9b(0x595)][_0x30ff9b(0x2cf)](_0x30ff9b(0x602)+(_0x1b2e23?.[_0x30ff9b(0x154)]??_0x1b2e23)+'\x0a');}clearTimeout(_0x228788),process[_0x30ff9b(0x595)]['write'](_0x30ff9b(0x22d)),process[_0x30ff9b(0x2be)](0x0);}process['on']('SIGINT',()=>_0x15dc94(_0x39ae0d(0x2f2))),process['on']('SIGTERM',()=>_0x15dc94(_0x39ae0d(0x241))),process['on']('SIGBREAK',()=>_0x15dc94(_0x39ae0d(0x526)));}}const _0x24890f=new Set([_0x2832a7(0x59d),'doctor','init',_0x2832a7(0x3a6),_0x2832a7(0x1b6),_0x2832a7(0x4b5),_0x2832a7(0x5a8),_0x2832a7(0x372),_0x2832a7(0x1f6),_0x2832a7(0x224)]),_0x2857d4=process[_0x2832a7(0x332)][0x2];if(_0x2857d4==='version')console[_0x2832a7(0x337)](require$$3[_0x2832a7(0x59d)]),process[_0x2832a7(0x2be)](0x0);else{if(_0x2857d4&&_0x24890f[_0x2832a7(0x30f)](_0x2857d4)){const _0x1d9c98=process[_0x2832a7(0x332)][_0x2832a7(0x467)](0x3),_0x5a344b=_0x5a04fb([_0x2832a7(0x5e5),_0x2832a7(0x57c),..._0x1d9c98]),_0x21c02f=_0x4a4bfe(_0x5a344b),_0x2198b2=new Set([_0x2832a7(0x3fa),'-d',_0x2832a7(0x1a3),'-k',_0x2832a7(0x483),'-c',_0x2832a7(0x13d),'-p',_0x2832a7(0x54c),_0x2832a7(0x1ed),'-e',_0x2832a7(0x50d),'--name',_0x2832a7(0x382),_0x2832a7(0x3ab),'--permissions',_0x2832a7(0x18c),_0x2832a7(0x447),_0x2832a7(0x4de),'--username','-u',_0x2832a7(0x43b)]);let _0x595fa3=null;for(let _0x4b2187=0x0;_0x4b2187<_0x1d9c98['length'];_0x4b2187++){if(_0x2198b2['has'](_0x1d9c98[_0x4b2187])){_0x4b2187++;continue;}if(!_0x1d9c98[_0x4b2187][_0x2832a7(0x3ca)]('-')){_0x595fa3=_0x1d9c98[_0x4b2187];break;}}(async()=>{const _0x41db22=_0x2832a7;if(_0x2857d4===_0x41db22(0x372)){const _0x4f92fa=process[_0x41db22(0x332)][0x3],_0x17218a=process[_0x41db22(0x332)]['slice'](0x4),_0x3b6269=_0x5a04fb(['node','okdb',..._0x17218a]),_0x49503b=_0x4a4bfe(_0x3b6269),_0x30496c=new Set([_0x41db22(0x3fa),'-d',_0x41db22(0x1a3),'-k',_0x41db22(0x483),'-c','--port','-p',_0x41db22(0x2f4),_0x41db22(0x382),'--label','--permissions',_0x41db22(0x18c),'--ttl','--log-level',_0x41db22(0x1ed),'-e',_0x41db22(0x50d)]),_0x559883=[];for(let _0x323fc6=0x0;_0x323fc6<_0x17218a[_0x41db22(0x3bf)];_0x323fc6++){if(_0x30496c[_0x41db22(0x30f)](_0x17218a[_0x323fc6])){_0x323fc6++;continue;}if(_0x17218a[_0x323fc6][_0x41db22(0x3ca)]('-'))continue;_0x559883[_0x41db22(0x437)](_0x17218a[_0x323fc6]);}switch(_0x4f92fa){case'create':await _0x5cc34b(_0x49503b,_0x3b6269);break;case _0x41db22(0x381):await _0x3963bb(_0x49503b);break;case _0x41db22(0x4e6):await _0xcb9d3c(_0x559883[0x0],_0x49503b);break;default:console[_0x41db22(0x1db)](_0x41db22(0x394)+_0x4f92fa+_0x41db22(0x5c5)),process['exit'](0x1);}return;}if(_0x2857d4===_0x41db22(0x224)){const _0x2dde44=requireOkdbLicenseCodec(),_0x3f733a=process[_0x41db22(0x332)][_0x41db22(0x467)](0x3),_0x1ccdbd=_0x5a04fb([_0x41db22(0x5e5),'okdb',..._0x3f733a]),_0x2f31c4=_0x4a4bfe(_0x1ccdbd),_0x46eb1c=new Set([_0x41db22(0x3fa),'-d','--key','-k',_0x41db22(0x483),'-c','--port','-p','--log-level']),_0x6ab245=[];for(let _0x250251=0x0;_0x250251<_0x3f733a[_0x41db22(0x3bf)];_0x250251++){if(_0x46eb1c[_0x41db22(0x30f)](_0x3f733a[_0x250251])){_0x250251++;continue;}if(_0x3f733a[_0x250251][_0x41db22(0x3ca)]('-'))continue;_0x6ab245[_0x41db22(0x437)](_0x3f733a[_0x250251]);}const _0xb56c39=_0x6ab245[0x0]??null;if(_0xb56c39===_0x41db22(0x492))await _0x5215fc(_0x6ab245[0x1],_0x2f31c4);else{if(!_0xb56c39)await _0x2bb149(_0x2f31c4);else{let _0x301eef=_0x2dde44[_0x41db22(0x227)](_0xb56c39);if(_0x301eef==='unknown'&&_0x3782e3[_0x41db22(0x36a)](_0xb56c39))_0x301eef=_0x41db22(0x188);if(_0x301eef===_0x41db22(0x188))try{const _0x1166cd=_0x3782e3[_0x41db22(0x47f)](_0xb56c39,_0x41db22(0x3b1))[_0x41db22(0x4e5)](),_0x33a256=_0x2dde44[_0x41db22(0x227)](_0x1166cd);if(_0x33a256===_0x41db22(0x18a)){await _0x5c6831(_0x1166cd,_0x2f31c4);return;}await _0x1eebd8(_0xb56c39,_0x2f31c4);return;}catch(_0x4358e1){console[_0x41db22(0x1db)](_0x41db22(0x1da)+_0xb56c39+':\x20'+_0x4358e1[_0x41db22(0x154)]),process['exit'](0x1);}switch(_0x301eef){case _0x41db22(0x359):await _0x1eebd8(_0xb56c39,_0x2f31c4);break;case _0x41db22(0x18a):await _0x5c6831(_0xb56c39,_0x2f31c4);break;case _0x41db22(0x541):await _0x3e180d(_0xb56c39,_0x2f31c4);break;default:console[_0x41db22(0x1db)](_0x41db22(0x5c8)+_0xb56c39+'\x22'),console['error'](''),console['error'](_0x41db22(0x4da)),console[_0x41db22(0x1db)](_0x41db22(0x1cb)),console[_0x41db22(0x1db)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x41db22(0x1db)](_0x41db22(0x1dd)),console[_0x41db22(0x1db)](_0x41db22(0x5f0)),console[_0x41db22(0x1db)](''),console['error'](_0x41db22(0x4b7)),process[_0x41db22(0x2be)](0x1);}}}return;}switch(_0x2857d4){case'doctor':await _0x25b10e(_0x21c02f);break;case'init':await _0x49711f();break;case _0x41db22(0x5a8):await _0x2f3e00(_0x21c02f);break;case _0x41db22(0x3a6):await _0x2740ad(_0x595fa3??_0x33df59[_0x41db22(0x205)](_0x41db22(0x5b8)),_0x21c02f);break;case _0x41db22(0x1b6):await _0x3f58df(_0x595fa3??_0x33df59[_0x41db22(0x205)](_0x41db22(0x58a)),_0x21c02f,_0x5a344b);break;case _0x41db22(0x4b5):await _0xec2dea(_0x595fa3??_0x33df59[_0x41db22(0x205)](_0x41db22(0x58a)),_0x21c02f,_0x5a344b);break;case _0x41db22(0x1f6):await _0x263374(_0x595fa3,_0x21c02f,_0x5a344b);break;}})()[_0x2832a7(0x2c6)](()=>process[_0x2832a7(0x2be)](0x0))['catch'](_0xb7359e=>{const _0x12439c=_0x2832a7;console[_0x12439c(0x1db)](_0x12439c(0x57a)+(_0xb7359e[_0x12439c(0x154)]||_0xb7359e)+'\x0a'),process['exit'](0x1);});}else _0x9d24()[_0x2832a7(0x488)](_0x133e7e=>{const _0x1b40c5=_0x2832a7;console[_0x1b40c5(0x1db)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x1b40c5(0x1db)](_0x133e7e[_0x1b40c5(0x220)]||_0x133e7e),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x457462(0x1d0)]=okdb;
2
+ 'use strict';const _0x5411c3=_0x5511;(function(_0x4214a2,_0x3484be){const _0xc643ce=_0x5511,_0x1499f6=_0x4214a2();while(!![]){try{const _0xcf17a4=-parseInt(_0xc643ce(0x2eb))/0x1+-parseInt(_0xc643ce(0x730))/0x2*(parseInt(_0xc643ce(0x5ee))/0x3)+parseInt(_0xc643ce(0x4d0))/0x4+-parseInt(_0xc643ce(0x190))/0x5*(-parseInt(_0xc643ce(0x719))/0x6)+-parseInt(_0xc643ce(0x467))/0x7+-parseInt(_0xc643ce(0x379))/0x8*(parseInt(_0xc643ce(0x38e))/0x9)+parseInt(_0xc643ce(0x72a))/0xa;if(_0xcf17a4===_0x3484be)break;else _0x1499f6['push'](_0x1499f6['shift']());}catch(_0x51e184){_0x1499f6['push'](_0x1499f6['shift']());}}}(_0x358f,0x2993b));var require$$1=require(_0x5411c3(0x504)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x5411c3(0x303)),require$$5=require(_0x5411c3(0x6ec)),require$$0$2=require(_0x5411c3(0x439)),require$$2=require(_0x5411c3(0x3d2)),require$$0$1=require('node:crypto'),require$$4=require(_0x5411c3(0x3f0)),require$$1$2=require(_0x5411c3(0x543)),require$$0$3=require(_0x5411c3(0x253)),require$$0$4=require(_0x5411c3(0x519)),require$$0$5=require(_0x5411c3(0x2ea)),require$$0$6=require(_0x5411c3(0x277)),require$$1$3=require(_0x5411c3(0x500)),require$$2$1=require(_0x5411c3(0x51d)),require$$8=require(_0x5411c3(0x508)),commonjsGlobal=typeof globalThis!==_0x5411c3(0x31e)?globalThis:typeof window!==_0x5411c3(0x31e)?window:typeof global!==_0x5411c3(0x31e)?global:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(_0xa13eb0){const _0x199eb9=_0x5411c3;return _0xa13eb0&&_0xa13eb0[_0x199eb9(0x3cc)]&&Object[_0x199eb9(0x6f7)][_0x199eb9(0x60b)][_0x199eb9(0x65a)](_0xa13eb0,'default')?_0xa13eb0[_0x199eb9(0x45b)]:_0xa13eb0;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x3bb0bc=require$$0,_0x2b7267=require$$1$1,_0x340292=require$$1;let _0x53c2a8;function _0x2e1999(){const _0x266dd5=_0x5511;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x53c2a8!==undefined)return _0x53c2a8;try{const _0x511aff=_0x340292[_0x266dd5(0x5e9)](require[_0x266dd5(0x25c)](_0x266dd5(0x393)));_0x53c2a8=_0x2b7267[_0x266dd5(0x2d5)](_0x340292[_0x266dd5(0x2b6)](_0x511aff,_0x266dd5(0x25b),_0x266dd5(0x396),_0x266dd5(0x73b)));}catch{_0x53c2a8=![];}return _0x53c2a8;}function _0x5348f5(){const _0x479d1b=_0x5511,_0x140dda=_0x3bb0bc[_0x479d1b(0x383)]()[_0x479d1b(0x1b1)];return Math['max'](0x1,_0x140dda-0x1);}function _0x300a21(_0x39f858,_0x2e923d={}){const _0x1c9d59=_0x5511,_0x343488=_0x2e923d['shmbufNative']!==undefined?_0x2e923d[_0x1c9d59(0x20f)]:_0x2e1999();let _0x53004d;if(_0x39f858?.[_0x1c9d59(0x37c)])_0x53004d=0x1;else{let _0x26e689,_0x535f8d;if(_0x39f858?.[_0x1c9d59(0x74e)]!==undefined&&_0x39f858[_0x1c9d59(0x74e)]!==null&&_0x39f858['workersFlag']!=='')_0x26e689=_0x39f858[_0x1c9d59(0x74e)],_0x535f8d='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x26e689=process.env.OKDB_HTTP_WORKERS,_0x535f8d=_0x1c9d59(0x537);else _0x39f858?.[_0x1c9d59(0x277)]?.[_0x1c9d59(0x4d1)]!==undefined&&_0x39f858['http'][_0x1c9d59(0x4d1)]!==null&&_0x39f858[_0x1c9d59(0x277)][_0x1c9d59(0x4d1)]!==''&&(_0x26e689=_0x39f858['http'][_0x1c9d59(0x4d1)],_0x535f8d='http.workers');}if(_0x26e689===undefined)_0x53004d=_0x5348f5();else{const _0xc712be=Number(_0x26e689);!Number[_0x1c9d59(0x428)](_0xc712be)||_0xc712be<0x1?(console[_0x1c9d59(0x305)](_0x1c9d59(0x5ad)+_0x535f8d+'='+JSON[_0x1c9d59(0x540)](_0x26e689)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x53004d=0x1):_0x53004d=_0xc712be;}}return!_0x343488&&_0x53004d>0x1&&(console[_0x1c9d59(0x305)]('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+(_0x1c9d59(0x432)+_0x53004d+').')),_0x53004d=0x1),_0x53004d;}return okdbWorkers={'isShmbufNative':_0x2e1999,'defaultWorkers':_0x5348f5,'resolveWorkers':_0x300a21},okdbWorkers;}function _0x5511(_0x3f2074,_0x3a0262){_0x3f2074=_0x3f2074-0x185;const _0x358fd3=_0x358f();let _0x551101=_0x358fd3[_0x3f2074];return _0x551101;}var version='2.3.4',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x4d50d6=require$$2;function _0x472e84(_0x1b865c,_0x2d57d9){const _0x4a7e01=_0x5511;return _0x4d50d6['createHmac'](_0x4a7e01(0x755),_0x2d57d9)[_0x4a7e01(0x751)](_0x1b865c)['digest'](_0x4a7e01(0x465));}function _0x4530b9(_0x1aba88,_0x3869de){const _0x4fae55=_0x5511;if(typeof _0x1aba88!=='string'||typeof _0x3869de!==_0x4fae55(0x54f))return![];if(Buffer[_0x4fae55(0x3f8)](_0x1aba88)!==Buffer[_0x4fae55(0x3f8)](_0x3869de))return![];return _0x4d50d6[_0x4fae55(0x42b)](Buffer['from'](_0x1aba88),Buffer[_0x4fae55(0x716)](_0x3869de));}function _0x273516(_0x1d9b0d){const _0x1e30b8=_0x5511;if(!_0x1d9b0d?.['startsWith'](_0x1e30b8(0x4be)))return null;return _0x1d9b0d['slice'](0x7);}function _0x23cfc5(_0x19a8b5=0x20){return _0x4d50d6['randomBytes'](_0x19a8b5)['toString']('base64url');}function _0x7e1fe3(_0x558eff){const _0x530118=_0x5511;return _0x4d50d6[_0x530118(0x78f)](_0x530118(0x755))[_0x530118(0x751)](_0x558eff)['digest'](_0x530118(0x723));}function _0xaf640f(_0x455fee,_0x18e208,_0x43e82e=0x36ee80){const _0x283b78=_0x5511;if(!_0x18e208)throw new Error('Token\x20secret\x20not\x20configured');const _0x574b2f=Date[_0x283b78(0x6a7)](),_0x269bb2=Buffer['from'](JSON[_0x283b78(0x540)]({'iat':_0x574b2f,'exp':_0x574b2f+_0x43e82e,'sub':_0x455fee?.['id']??_0x455fee?.[_0x283b78(0x6ca)]??null,'username':_0x455fee?.['username']??_0x455fee?.[_0x283b78(0x60a)]??null,'roles':Array[_0x283b78(0x729)](_0x455fee?.[_0x283b78(0x56c)])?_0x455fee[_0x283b78(0x56c)]:[]}))[_0x283b78(0x202)](_0x283b78(0x465)),_0xe3a93d=_0x472e84(_0x269bb2,_0x18e208);return _0x269bb2+'.'+_0xe3a93d;}function _0x3deaec(_0x1570e5,_0x1a3e93){const _0x5818d9=_0x5511;if(!_0x1a3e93||typeof _0x1570e5!==_0x5818d9(0x54f))return null;const [_0x179c70,_0x59805e]=_0x1570e5['split']('.');if(!_0x179c70||!_0x59805e)return null;const _0x3beb43=_0x472e84(_0x179c70,_0x1a3e93);if(!_0x4530b9(_0x59805e,_0x3beb43))return null;try{const _0xd694eb=JSON[_0x5818d9(0x355)](Buffer[_0x5818d9(0x716)](_0x179c70,_0x5818d9(0x465))[_0x5818d9(0x202)]()),_0x2938ad=0x7530;if(Date['now']()>Number(_0xd694eb?.['exp']??0x0)+_0x2938ad)return null;return _0xd694eb;}catch{return null;}}async function _0x6fe079(_0x2fb76d){return new Promise((_0x6d4fa1,_0x33df2a)=>{const _0x4c3ab1=_0x5511,_0x34e27e=_0x4d50d6[_0x4c3ab1(0x209)](0x10);_0x4d50d6[_0x4c3ab1(0x19a)](_0x2fb76d,_0x34e27e,0x40,(_0x3b369b,_0x505f09)=>{const _0x5ef70a=_0x4c3ab1;if(_0x3b369b)_0x33df2a(_0x3b369b);_0x6d4fa1(_0x34e27e[_0x5ef70a(0x202)](_0x5ef70a(0x723))+':'+_0x505f09[_0x5ef70a(0x202)](_0x5ef70a(0x723)));});});}async function _0x1a75cd(_0x12b6a5,_0x872876){const _0x358b01=_0x5511,[_0x34a0b3,_0x5207a4]=_0x872876['split'](':');if(!_0x34a0b3||!_0x5207a4)return![];const _0x118df6=Buffer[_0x358b01(0x716)](_0x34a0b3,_0x358b01(0x723));return new Promise((_0x5b2c39,_0x56d163)=>{const _0x3a0a81=_0x358b01;_0x4d50d6[_0x3a0a81(0x19a)](_0x12b6a5,_0x118df6,0x40,(_0x531e49,_0x1d3bb7)=>{const _0x1f5cff=_0x3a0a81;if(_0x531e49)_0x56d163(_0x531e49);_0x5b2c39(_0x4d50d6['timingSafeEqual'](_0x1d3bb7,Buffer[_0x1f5cff(0x716)](_0x5207a4,_0x1f5cff(0x723))));});});}return okdbAuthTokens={'hmac':_0x472e84,'timingSafeEqual':_0x4530b9,'parseBearer':_0x273516,'randomToken':_0x23cfc5,'hashToken':_0x7e1fe3,'issueToken':_0xaf640f,'authenticateToken':_0x3deaec,'hashPassword':_0x6fe079,'verifyPassword':_0x1a75cd},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x279b05=_0x5411c3;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x6fa97e=require$$0$1,_0x152cc5=_0x279b05(0x79f),_0x4d1e0c=new Uint8Array(0x100)[_0x279b05(0x481)](0xff);for(let _0x4cb11b=0x0;_0x4cb11b<_0x152cc5[_0x279b05(0x1b1)];_0x4cb11b++){_0x4d1e0c[_0x152cc5[_0x279b05(0x37f)](_0x4cb11b)]=_0x4cb11b,_0x4d1e0c[_0x152cc5['charCodeAt'](_0x4cb11b)+0x20]=_0x4cb11b;}_0x4d1e0c['O'[_0x279b05(0x37f)](0x0)]=0x0,_0x4d1e0c['o'[_0x279b05(0x37f)](0x0)]=0x0,_0x4d1e0c['I'[_0x279b05(0x37f)](0x0)]=0x1,_0x4d1e0c['i'[_0x279b05(0x37f)](0x0)]=0x1,_0x4d1e0c['L'[_0x279b05(0x37f)](0x0)]=0x1,_0x4d1e0c['l'[_0x279b05(0x37f)](0x0)]=0x1;function _0x4954b0(_0x2b44b2){let _0x12d06c=0x0,_0x5d57d0=0x0,_0xc0d96e='';for(let _0x5e5df3=0x0;_0x5e5df3<_0x2b44b2['length'];_0x5e5df3++){_0x5d57d0=_0x5d57d0<<0x8|_0x2b44b2[_0x5e5df3],_0x12d06c+=0x8;while(_0x12d06c>=0x5){_0x12d06c-=0x5,_0xc0d96e+=_0x152cc5[_0x5d57d0>>>_0x12d06c&0x1f];}}return _0x12d06c>0x0&&(_0xc0d96e+=_0x152cc5[_0x5d57d0<<0x5-_0x12d06c&0x1f]),_0xc0d96e;}function _0x2b4791(_0x52abb2){const _0x4a5869=_0x279b05;_0x52abb2=_0x52abb2[_0x4a5869(0x1f7)](/-/g,'')[_0x4a5869(0x26a)]();let _0x1ad981=0x0,_0x174da4=0x0;const _0x310545=[];for(let _0x566f00=0x0;_0x566f00<_0x52abb2[_0x4a5869(0x1b1)];_0x566f00++){const _0x1fc859=_0x4d1e0c[_0x52abb2[_0x4a5869(0x37f)](_0x566f00)];if(_0x1fc859===0xff)continue;_0x174da4=_0x174da4<<0x5|_0x1fc859,_0x1ad981+=0x5,_0x1ad981>=0x8&&(_0x1ad981-=0x8,_0x310545[_0x4a5869(0x494)](_0x174da4>>>_0x1ad981&0xff));}return Buffer[_0x4a5869(0x716)](_0x310545);}const _0x380f93=['sync',_0x279b05(0x64c),_0x279b05(0x5bf),_0x279b05(0x37a),_0x279b05(0x556),_0x279b05(0x696),_0x279b05(0x3b5),_0x279b05(0x261)],_0x489b13=0x0,_0x5b7e17=0x1,_0x502cb6=0x2,_0x240929=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x3226fb({issuedAt:_0x297720,expiresAt:_0x2bc86,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x489b13}){const _0x1bada9=_0x279b05,_0x19eb74=Buffer[_0x1bada9(0x716)](licensee,_0x1bada9(0x1f4))[_0x1bada9(0x7a7)](0x0,0x40),_0x302c24=0x1+0x1+0x4+0x4+0x1+_0x19eb74[_0x1bada9(0x1b1)]+0x2+0x10,_0x1fc3af=Buffer['allocUnsafe'](_0x302c24);let _0x2eaf67=0x0;_0x1fc3af[_0x1bada9(0x414)](0x1,_0x2eaf67++),_0x1fc3af[_0x1bada9(0x414)](licenseType,_0x2eaf67++),_0x1fc3af[_0x1bada9(0x35e)](Math[_0x1bada9(0x1f9)](_0x297720/0x3e8),_0x2eaf67),_0x2eaf67+=0x4,_0x1fc3af[_0x1bada9(0x35e)](Math[_0x1bada9(0x1f9)](_0x2bc86/0x3e8),_0x2eaf67),_0x2eaf67+=0x4,_0x1fc3af[_0x1bada9(0x414)](_0x19eb74['length'],_0x2eaf67++),_0x19eb74[_0x1bada9(0x79d)](_0x1fc3af,_0x2eaf67),_0x2eaf67+=_0x19eb74[_0x1bada9(0x1b1)];let _0x56d5c0=0x0;for(let _0x4bc19c=0x0;_0x4bc19c<_0x380f93[_0x1bada9(0x1b1)];_0x4bc19c++){if(features[_0x380f93[_0x4bc19c]])_0x56d5c0|=0x1<<_0x4bc19c;}_0x1fc3af[_0x1bada9(0x576)](_0x56d5c0,_0x2eaf67),_0x2eaf67+=0x2;const _0x15b8e2=[_0x1bada9(0x71b),_0x1bada9(0x761),_0x1bada9(0x3b3),_0x1bada9(0x1d8)];for(const _0x79f98e of _0x15b8e2){_0x1fc3af[_0x1bada9(0x35e)](limits[_0x79f98e]||0x0,_0x2eaf67),_0x2eaf67+=0x4;}return _0x1fc3af;}function _0x1fc224(_0x2899d2){const _0x462acf=_0x279b05;let _0x4ab210=0x0;const _0x40e921=_0x2899d2['readUInt8'](_0x4ab210++),_0x2548a7=_0x2899d2[_0x462acf(0x4b2)](_0x4ab210++),_0x26909a=_0x2899d2[_0x462acf(0x33a)](_0x4ab210);_0x4ab210+=0x4;const _0x3b47d8=_0x2899d2[_0x462acf(0x33a)](_0x4ab210);_0x4ab210+=0x4;const _0x3eb7e1=_0x2899d2[_0x462acf(0x4b2)](_0x4ab210++),_0x4a3f87=_0x2899d2['slice'](_0x4ab210,_0x4ab210+_0x3eb7e1)[_0x462acf(0x202)](_0x462acf(0x1f4));_0x4ab210+=_0x3eb7e1;const _0x1ba97f=_0x2899d2['readUInt16BE'](_0x4ab210);_0x4ab210+=0x2;const _0x2095f4={};for(let _0x51b28a=0x0;_0x51b28a<_0x380f93[_0x462acf(0x1b1)];_0x51b28a++){_0x2095f4[_0x380f93[_0x51b28a]]=Boolean(_0x1ba97f&0x1<<_0x51b28a);}const _0x2bc216=[_0x462acf(0x71b),_0x462acf(0x761),'syncPeers',_0x462acf(0x1d8)],_0x3488ba={};for(const _0x160071 of _0x2bc216){const _0x2e928a=_0x2899d2['readUInt32BE'](_0x4ab210);_0x4ab210+=0x4,_0x3488ba[_0x160071]=_0x2e928a===0x0?null:_0x2e928a;}return{'v':_0x40e921,'licenseType':_0x2548a7,'issuedAt':_0x26909a*0x3e8,'expiresAt':_0x3b47d8*0x3e8,'licensee':_0x4a3f87,'features':_0x2095f4,'limits':_0x3488ba};}function _0x20fd84(_0x26a080,_0x46aed3){const _0x2b221d=_0x279b05,_0x5dc6a4=Buffer[_0x2b221d(0x33f)]([_0x26a080,_0x46aed3]),_0xfc5695=_0x4954b0(_0x5dc6a4),_0x2e323a=[];for(let _0x38cd4e=0x0;_0x38cd4e<_0xfc5695[_0x2b221d(0x1b1)];_0x38cd4e+=0x8){_0x2e323a['push'](_0xfc5695[_0x2b221d(0x7a7)](_0x38cd4e,_0x38cd4e+0x8));}return _0x2e323a[_0x2b221d(0x2b6)]('-');}function _0x545e90(_0xd7653a){const _0x1ffbc9=_0x279b05;if(typeof _0xd7653a!==_0x1ffbc9(0x54f))throw new Error(_0x1ffbc9(0x6e7));const _0x3601bd=_0x2b4791(_0xd7653a['replace'](/-/g,''));if(_0x3601bd[_0x1ffbc9(0x1b1)]<0x41)throw new Error(_0x1ffbc9(0x60f)+_0x3601bd[_0x1ffbc9(0x1b1)]+_0x1ffbc9(0x703));const _0x35e425=_0x3601bd[_0x1ffbc9(0x7a7)](0x0,_0x3601bd['length']-0x40),_0x43f10e=_0x3601bd[_0x1ffbc9(0x7a7)](_0x3601bd['length']-0x40);let _0x4d9b73;try{_0x4d9b73=_0x1fc224(_0x35e425);}catch(_0xbc7cc1){throw new Error(_0x1ffbc9(0x41c)+_0xbc7cc1['message']);}return{'rawBuf':_0x3601bd,'payload':_0x35e425,'sig':_0x43f10e,'decoded':_0x4d9b73};}function _0x2b3d0f(_0x21f7a0){const _0x39bc49=_0x279b05;return _0x6fa97e[_0x39bc49(0x78f)]('sha256')[_0x39bc49(0x751)](_0x21f7a0)[_0x39bc49(0x2ab)]()[_0x39bc49(0x7a7)](0x0,0x8);}function _0x139259(_0x30e4bb,_0x37779d,_0xbba941){const _0x365e74=_0x279b05,_0x5266ea='OKDB-PIN-V1:'+_0xbba941,_0x12e67a=Buffer[_0x365e74(0x33f)]([Buffer[_0x365e74(0x716)](_0x30e4bb,_0x365e74(0x1f4)),_0x37779d]),_0x40aaa2=_0x6fa97e[_0x365e74(0x630)](_0x365e74(0x755),_0x5266ea)[_0x365e74(0x751)](_0x12e67a)[_0x365e74(0x2ab)](),_0x4f01c9=_0x4954b0(_0x40aaa2[_0x365e74(0x7a7)](0x0,0x5));return{'pin':_0x4f01c9,'pinHmac':_0x40aaa2};}function _0x10f085(_0x425e15,_0x28d767,_0x4275ff){const _0x40fd6b=_0x279b05,_0x222590=Buffer[_0x40fd6b(0x5eb)](0x4d);let _0x43de44=0x0;_0x222590['writeUInt8'](0x1,_0x43de44++),_0x425e15[_0x40fd6b(0x79d)](_0x222590,_0x43de44),_0x43de44+=0x8,_0x222590[_0x40fd6b(0x35e)](_0x28d767,_0x43de44),_0x43de44+=0x4,_0x4275ff[_0x40fd6b(0x79d)](_0x222590,_0x43de44);const _0x48a3b4=_0x4954b0(_0x222590),_0x5a6ed9=[];for(let _0x3e0d97=0x0;_0x3e0d97<_0x48a3b4[_0x40fd6b(0x1b1)];_0x3e0d97+=0x6){_0x5a6ed9[_0x40fd6b(0x494)](_0x48a3b4[_0x40fd6b(0x7a7)](_0x3e0d97,_0x3e0d97+0x6));}return _0x5a6ed9[_0x40fd6b(0x2b6)]('-');}function _0x1747e6(_0x519568){const _0x2e2d4e=_0x279b05;if(typeof _0x519568!==_0x2e2d4e(0x54f))throw new Error(_0x2e2d4e(0x620));const _0xd8bf88=_0x2b4791(_0x519568[_0x2e2d4e(0x1f7)](/-/g,''));if(_0xd8bf88[_0x2e2d4e(0x1b1)]!==0x4d)throw new Error(_0x2e2d4e(0x53c)+_0xd8bf88[_0x2e2d4e(0x1b1)]);let _0x297c19=0x0;const _0x34ffee=_0xd8bf88[_0x2e2d4e(0x4b2)](_0x297c19++),_0x404ece=_0xd8bf88['slice'](_0x297c19,_0x297c19+0x8);_0x297c19+=0x8;const _0x262c4d=_0xd8bf88[_0x2e2d4e(0x33a)](_0x297c19);_0x297c19+=0x4;const _0x25d106=_0xd8bf88['slice'](_0x297c19);return{'v':_0x34ffee,'licenseHash':_0x404ece,'expiry':_0x262c4d,'sig':_0x25d106};}function _0x22cbea({tokenString:_0x7ed1ff,nodeId:_0x3ae957,rawBlobBuf:_0xa6ae69,pubKeyPem:_0xbcc411,pubFingerprint:_0x12adc5}){const _0x5d4d5e=_0x279b05;let _0x1ed6aa;try{_0x1ed6aa=_0x1747e6(_0x7ed1ff);}catch(_0x19c954){return{'valid':![],'reason':_0x5d4d5e(0x1c5)};}const _0x587176=_0x2b3d0f(_0xa6ae69);if(!_0x587176[_0x5d4d5e(0x3e3)](_0x1ed6aa['licenseHash']))return{'valid':![],'reason':_0x5d4d5e(0x346)};const {pinHmac:_0x522079}=_0x139259(_0x3ae957,_0x587176,_0x12adc5),_0x534b3d=Buffer[_0x5d4d5e(0x5eb)](0x4);_0x534b3d['writeUInt32BE'](_0x1ed6aa['expiry'],0x0);const _0x4233db=Buffer[_0x5d4d5e(0x33f)]([Buffer[_0x5d4d5e(0x716)]([_0x1ed6aa['v']]),_0x522079[_0x5d4d5e(0x7a7)](0x0,0x5),_0x1ed6aa[_0x5d4d5e(0x4bd)],_0x534b3d]);try{const _0x566a4f=_0x6fa97e['verify'](null,_0x4233db,_0xbcc411,_0x1ed6aa['sig']);if(!_0x566a4f)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x4f64df){return{'valid':![],'reason':_0x5d4d5e(0x293)};}if(_0x1ed6aa[_0x5d4d5e(0x650)]<Date[_0x5d4d5e(0x6a7)]()/0x3e8)return{'valid':![],'reason':_0x5d4d5e(0x389)};return{'valid':!![],'reason':'ok'};}function _0x21e02a(_0x38535c){const _0x15d74a=_0x279b05;if(typeof _0x38535c!=='string')return _0x15d74a(0x2e0);const _0x58c73f=_0x38535c[_0x15d74a(0x29c)]();if(_0x58c73f[_0x15d74a(0x72d)]('/')||_0x58c73f[_0x15d74a(0x72d)]('./')||_0x58c73f['startsWith']('../')||/^[A-Za-z]:[\\/]/['test'](_0x58c73f))return _0x15d74a(0x504);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x15d74a(0x279)](_0x58c73f))return _0x15d74a(0x376);const _0x1a6f6d=_0x58c73f['replace'](/[\s-]+/g,'')[_0x15d74a(0x1b1)];if(_0x1a6f6d===0x7c)return _0x15d74a(0x50b);if(_0x1a6f6d>=0x95&&_0x1a6f6d<=0xfc)return _0x15d74a(0x5e2);return _0x15d74a(0x2e0);}return okdbLicenseCodec={'toBase32':_0x4954b0,'fromBase32':_0x2b4791,'encodeLicensePayload':_0x3226fb,'decodeLicensePayload':_0x1fc224,'encodeLicenseBlob':_0x20fd84,'decodeLicenseBlob':_0x545e90,'licenseHash':_0x2b3d0f,'derivePin':_0x139259,'encodeActivationToken':_0x10f085,'decodeActivationToken':_0x1747e6,'verifyActivation':_0x22cbea,'detectInputType':_0x21e02a,'FEATURE_NAMES':_0x380f93,'LICENSE_TYPE_STANDARD':_0x489b13,'LICENSE_TYPE_OPEN':_0x5b7e17,'LICENSE_TYPE_INTERNAL':_0x502cb6,'OPEN_LICENSE_MAX_DURATION_MS':_0x240929},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0xdf8de1 extends Error{constructor(_0x1f5cfc,_0x5f1235,_0xe83bc9={}){const _0x5a9ebb=_0x5511;super(_0x1f5cfc),this['name']=_0x5a9ebb(0x6d3),this['code']=_0x5f1235,this['details']=_0xe83bc9,_0xe83bc9['cause']&&(this['cause']=_0xe83bc9[_0x5a9ebb(0x5ab)]),Error[_0x5a9ebb(0x71f)](this,this[_0x5a9ebb(0x4ca)]);}}class _0xd9af98 extends _0xdf8de1{constructor(_0x4b2774,_0xe7d1bd,_0x4031e7,_0xf146e3){const _0x4a5583=_0x5511;super(_0x4a5583(0x2de)+_0x4b2774+'@'+_0xe7d1bd+':\x20expected\x20'+_0x4031e7+_0x4a5583(0x19c)+_0xf146e3,_0x4a5583(0x374),{'type':_0x4b2774,'key':_0xe7d1bd,'expectedVersion':_0x4031e7,'actualVersion':_0xf146e3}),this[_0x4a5583(0x60a)]=_0x4a5583(0x3f9);}}class _0x1ba0f8 extends _0xdf8de1{constructor(_0x35b898,_0x3685c6){const _0x153f66=_0x5511;super(_0x35b898+'@'+_0x3685c6+_0x153f66(0x52c),_0x153f66(0x5c1),{'type':_0x35b898,'key':_0x3685c6}),this[_0x153f66(0x60a)]=_0x153f66(0x40e);}}class _0x2dc2c6 extends _0xdf8de1{constructor(_0x5c3de3,_0x4c2932){const _0xa83834=_0x5511;super(_0x5c3de3+'@'+_0x4c2932+_0xa83834(0x40b),_0xa83834(0x516),{'type':_0x5c3de3,'key':_0x4c2932}),this[_0xa83834(0x60a)]='OKDBAlreadyExistsError';}}class _0x5804bf extends _0xdf8de1{constructor(_0x28e5e6,_0x2142e3){const _0x4ed0a8=_0x5511,_0x36dd5a=typeof _0x2142e3;super(_0x4ed0a8(0x579)+_0x28e5e6+_0x4ed0a8(0x5ac)+_0x36dd5a+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x2142e3,_0x4ed0a8(0x325),{'index':_0x28e5e6,'key':_0x2142e3,'keyType':_0x36dd5a}),this[_0x4ed0a8(0x60a)]='OKDBInvalidIndexKeyError';}}class _0x1c57c7 extends _0xdf8de1{constructor(_0x257fe9){const _0x19d536=_0x5511,_0x5e17f5=typeof _0x257fe9;super(_0x19d536(0x658)+_0x5e17f5+_0x19d536(0x3bf)+_0x257fe9,_0x19d536(0x558),{'key':_0x257fe9,'keyType':_0x5e17f5}),this[_0x19d536(0x60a)]=_0x19d536(0x33e);}}class _0x4bff00 extends _0xdf8de1{constructor(_0xf86d50){const _0x44fe51=_0x5511;super(_0x44fe51(0x370)+_0xf86d50+_0x44fe51(0x30b),_0x44fe51(0x4da),{'type':_0xf86d50}),this[_0x44fe51(0x60a)]=_0x44fe51(0x40a);}}class _0x4b662c extends _0xdf8de1{constructor(_0x3523a7){const _0xe825b7=_0x5511;super('Type\x20\x27'+_0x3523a7+'\x27\x20already\x20registered',_0xe825b7(0x646),{'type':_0x3523a7}),this['name']=_0xe825b7(0x4bb);}}class _0x392d10 extends _0xdf8de1{constructor(_0x51e2ae,_0x40cc04){const _0x4031e4=_0x5511;super('Index\x20\x27'+_0x40cc04+_0x4031e4(0x787)+_0x51e2ae+'\x27\x20doesn\x27t\x20exist',_0x4031e4(0x783),{'type':_0x51e2ae,'index':_0x40cc04}),this[_0x4031e4(0x60a)]=_0x4031e4(0x457);}}class _0x50dc1b extends _0xdf8de1{constructor(_0x27635d,_0x587fde){const _0x270c9b=_0x5511;super(_0x270c9b(0x482)+_0x587fde+_0x270c9b(0x787)+_0x27635d+'\x27\x20is\x20already\x20registered',_0x270c9b(0x283),{'type':_0x27635d,'index':_0x587fde}),this[_0x270c9b(0x60a)]=_0x270c9b(0x363);}}class _0x2f6443 extends _0xdf8de1{constructor(_0x4fd26e,_0x1272a2={}){const _0x4fdcd5=_0x5511;super(_0x4fd26e,'INVALID_VALUE',_0x1272a2),this['name']=_0x4fdcd5(0x2ce);}}class _0x4a7001 extends _0xdf8de1{constructor(_0x26e146,_0x5853bb,_0x4d04ab,_0x3969ba,_0x2c9f92){const _0x27d58a=_0x5511;super(_0x27d58a(0x6d5)+_0x26e146+'@'+_0x5853bb+':\x20key\x20['+_0x4d04ab+']\x20already\x20maps\x20to\x20\x27'+_0x3969ba+_0x27d58a(0x6f5)+_0x2c9f92+'\x27','UNIQUE_CONSTRAINT',{'type':_0x26e146,'index':_0x5853bb,'indexKey':_0x4d04ab,'existingKey':_0x3969ba,'conflictingKey':_0x2c9f92}),this['name']='OKDBUniqueConstraintError';}}class _0x1029a7 extends _0xdf8de1{constructor(_0x2e3f4a,_0x23813c,_0x210275){const _0x5da772=_0x5511;super(_0x5da772(0x61e)+_0x2e3f4a+'@'+_0x23813c,_0x5da772(0x743),{'type':_0x2e3f4a,'key':_0x23813c,'errors':_0x210275}),this[_0x5da772(0x60a)]=_0x5da772(0x475),this[_0x5da772(0x737)]=_0x2e3f4a,this[_0x5da772(0x5af)]=_0x23813c,this[_0x5da772(0x5bc)]=_0x210275;}}class _0x41f32b extends _0xdf8de1{constructor(_0x5a28e8,_0x59e509){const _0x4346cb=_0x5511;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x5a28e8+':\x20'+_0x59e509[_0x4346cb(0x1b1)]+_0x4346cb(0x695),'SCHEMA_COLLECTION_INVALID',{'type':_0x5a28e8,'failures':_0x59e509}),this['name']=_0x4346cb(0x77c),this[_0x4346cb(0x737)]=_0x5a28e8,this[_0x4346cb(0x725)]=_0x59e509;}}class _0x317178 extends _0xdf8de1{constructor(_0x541bdc,_0x18da1d,_0x2b942e,_0x21e044,_0x1a88ab){const _0x1d993b=_0x5511;super(_0x1d993b(0x5f2)+_0x541bdc+'@'+_0x18da1d+'.'+_0x2b942e+_0x1d993b(0x1c0)+_0x21e044+'@'+_0x1a88ab+_0x1d993b(0x3a5),_0x1d993b(0x276),{'sourceType':_0x541bdc,'sourceKey':_0x18da1d,'fieldPath':_0x2b942e,'targetType':_0x21e044,'targetKey':_0x1a88ab}),this[_0x1d993b(0x60a)]=_0x1d993b(0x3e4),this[_0x1d993b(0x242)]=_0x541bdc,this[_0x1d993b(0x712)]=_0x18da1d,this[_0x1d993b(0x5b1)]=_0x2b942e,this[_0x1d993b(0x27c)]=_0x21e044,this[_0x1d993b(0x416)]=_0x1a88ab;}}class _0x8c08e1 extends _0xdf8de1{constructor(_0x165b1d,_0xeb626,_0x25e228){const _0x3a0e16=_0x5511;super('Cannot\x20delete\x20'+_0x165b1d+'@'+_0xeb626+':\x20'+_0x25e228[_0x3a0e16(0x1b1)]+_0x3a0e16(0x664),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x165b1d,'targetKey':_0xeb626,'references':_0x25e228}),this[_0x3a0e16(0x60a)]=_0x3a0e16(0x1c7),this[_0x3a0e16(0x27c)]=_0x165b1d,this[_0x3a0e16(0x416)]=_0xeb626,this[_0x3a0e16(0x5fd)]=_0x25e228;}}class _0x39936c extends _0xdf8de1{constructor(_0x47a325,_0x11c2ad,_0x452fbe){const _0xb00c82=_0x5511;super(_0xb00c82(0x405)+_0x11c2ad+_0xb00c82(0x2d4)+_0x47a325+_0xb00c82(0x418)+_0x452fbe[_0xb00c82(0x2cc)](_0x268130=>_0x268130[_0xb00c82(0x3cb)]+':'+_0x268130[_0xb00c82(0x60a)])[_0xb00c82(0x2b6)](',\x20'),_0xb00c82(0x19e),{'type':_0x47a325,'index':_0x11c2ad,'usedBy':_0x452fbe}),this[_0xb00c82(0x60a)]=_0xb00c82(0x1f3);}}return okdbError={'OKDBError':_0xdf8de1,'OKDBVersionMismatchError':_0xd9af98,'OKDBNotFoundError':_0x1ba0f8,'OKDBAlreadyExistsError':_0x2dc2c6,'OKDBInvalidIndexKeyError':_0x5804bf,'OKDBInvalidPrimaryKeyError':_0x1c57c7,'OKDBTypeNotRegisteredError':_0x4bff00,'OKDBTypeAlreadyRegisteredError':_0x4b662c,'OKDBIndexNotRegisteredError':_0x392d10,'OKDBIndexAlreadyRegisteredError':_0x50dc1b,'OKDBInvalidValueError':_0x2f6443,'OKDBUniqueConstraintError':_0x4a7001,'OKDBSchemaValidationError':_0x1029a7,'OKDBSchemaCollectionError':_0x41f32b,'OKDBForeignKeyError':_0x317178,'OKDBForeignKeyDeleteError':_0x8c08e1,'OKDBIndexHasConsumersError':_0x39936c},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2ca608=_0x5411c3;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x43075e={'PUT':'put','REMOVE':_0x2ca608(0x43f),'INDEX_DROP':_0x2ca608(0x531),'INDEX_REGISTER':_0x2ca608(0x2f8),'INDEX_RESET':_0x2ca608(0x1c3),'TYPE_REGISTER':_0x2ca608(0x300),'TYPE_DROP':_0x2ca608(0x388),'FTS_REGISTER':'registerFts','FTS_DROP':_0x2ca608(0x385),'FTS_RESET':'resetFts','SCHEMA_SET':_0x2ca608(0x607),'SCHEMA_DROP':_0x2ca608(0x1aa),'TTL_SET':_0x2ca608(0x2c7),'TTL_CLEAR':_0x2ca608(0x479)},_0x404b64={'SYSTEM_READY':_0x2ca608(0x51f),'FIELD_RESOLVER_REGISTERED':_0x2ca608(0x1c2),'SYSTEM_STOPPED':_0x2ca608(0x66b),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2ca608(0x4bc),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x2ca608(0x79a),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x2ca608(0x406),'ITEM_CREATE':_0x2ca608(0x3dd),'ITEM_UPDATE':_0x2ca608(0x239),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x2ca608(0x567),'INDEX_READY':_0x2ca608(0x1c4),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x2ca608(0x5cb),'INDEX_DROP':_0x2ca608(0x68b),'INDEX_REGISTERED':_0x2ca608(0x62d),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x2ca608(0x411),'FTS_RESET':_0x2ca608(0x5fa),'SCHEMA_SET':_0x2ca608(0x62c),'SCHEMA_DROP':_0x2ca608(0x59e),'UNIQUE_VIOLATION':_0x2ca608(0x69a),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x2ca608(0x3b7),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2ca608(0x2a2),'TXN_START':'txn:start','TXN_END':_0x2ca608(0x7a9),'TXN_ROLLBACK':_0x2ca608(0x1c6),'TYPE_REGISTERED':_0x2ca608(0x61f),'TYPE_DROP':_0x2ca608(0x39c),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x2ca608(0x21c),'SYSTEM_ENV_RELEASE':_0x2ca608(0x67e),'TTL_EXPIRED':_0x2ca608(0x473),'TTL_SET':'ttl:set','TTL_CLEAR':_0x2ca608(0x542),'LICENSE_INVALID':_0x2ca608(0x6b9),'LICENSE_ADDED':_0x2ca608(0x211),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x56b7a0={'CREATING':'creating','RESETTING':'resetting','READY':'ready','DROPPING':'dropping','WAITING':_0x2ca608(0x30e),'ERROR':'error'},_0x43d5d1={'CREATED':_0x2ca608(0x1fe),'STARTING':_0x2ca608(0x7ab),'STARTED':_0x2ca608(0x3e9),'STOPPING':_0x2ca608(0x275),'STOPPED':_0x2ca608(0x447)},_0x4d7632={'CREATING':_0x2ca608(0x349),'READY':_0x2ca608(0x512),'HALTED':'halted','STOPPED':_0x2ca608(0x447),'RESETTING':_0x2ca608(0x29d)},_0x56746c=Object['freeze']({'POKE':'bus:poke','DRAIN':_0x2ca608(0x5ae),'TYPE_DROP':'bus:type_drop','PROC':_0x2ca608(0x739),'ENV_RELEASE':_0x2ca608(0x2e3)});return okdbEnums={'BUS_EVENTS':_0x56746c,'CHANGE_ACTIONS':_0x43075e,'EVENTS':_0x404b64,'INDEX_STATE':_0x56b7a0,'OKDB_STATE':_0x43d5d1,'VIEW_STATE':_0x4d7632},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x987863=_0x5411c3;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1e7277=require$$1$1,_0xf4462a=require$$1,_0x161feb=require$$2,_0x1f98b1=_0x1e7277[_0x987863(0x6ba)](_0xf4462a[_0x987863(0x2b6)](__dirname,_0x987863(0x306)),_0x987863(0x1f4))['trim'](),_0x30c079=_0x161feb['createPublicKey'](_0x1f98b1)[_0x987863(0x62f)]({'type':_0x987863(0x464),'format':_0x987863(0x609)}),_0x4efc4c=_0x161feb[_0x987863(0x78f)](_0x987863(0x755))[_0x987863(0x751)](_0x30c079)[_0x987863(0x2ab)]('hex')[_0x987863(0x7a7)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x1f98b1,'PUB_FINGERPRINT':_0x4efc4c},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x54229d=_0x5411c3;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xe2ea94=require$$2,{OKDBError:_0x425b58}=requireOkdbError(),{EVENTS:_0x48935e}=requireOkdbEnums(),_0x379c49=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x3ce500,LICENSE_TYPE_INTERNAL:_0x50d4a7,OPEN_LICENSE_MAX_DURATION_MS:_0x52c716}=_0x379c49,_0x4d1987=requireOkdbPubkey(),_0x527d5d={'LICENSED_BUILD':_0x54229d(0x434),'PUBLIC_KEY_PEM':_0x4d1987[_0x54229d(0x3b9)],'PUB_FINGERPRINT':_0x4d1987[_0x54229d(0x4a0)],'LICENSE_EXPIRED_ACTION':'log'},_0x385f4e=_0x54229d(0x259),_0xcfa781={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x2af888(_0xe1fbf){const _0x17a4c8=_0x54229d;await _0xe1fbf[_0x17a4c8(0x443)](_0x385f4e);}class _0x5bc160{constructor(_0xc725d0){const _0x988d64=_0x54229d;this['okdb']=_0xc725d0,this[_0x988d64(0x778)]=null;}async[_0x54229d(0x5bb)](){const _0x5b4ef7=_0x54229d,_0x21d4c9=this[_0x5b4ef7(0x3ea)][_0x5b4ef7(0x6cd)];if(!_0x21d4c9||!_0x21d4c9[_0x5b4ef7(0x6b6)](_0x385f4e)){this['_active']=null;return;}const _0x268f73=this['okdb']['id'];let _0x2b4a82=null;for(const {key:_0x2afa1f,value:_0x421ff1}of _0x21d4c9['getRange'](_0x385f4e)){const _0x51c470=this[_0x5b4ef7(0x6ea)](_0x421ff1,_0x268f73);_0x51c470==='active'&&!_0x2b4a82&&(_0x2b4a82={..._0x421ff1,'id':_0x2afa1f,'status':_0x51c470});}this['_active']=_0x2b4a82;if(this[_0x5b4ef7(0x778)]&&this[_0x5b4ef7(0x778)][_0x5b4ef7(0x297)]===_0x3ce500){const _0x5104d2=Math['ceil']((this[_0x5b4ef7(0x778)][_0x5b4ef7(0x337)]-Date[_0x5b4ef7(0x6a7)]())/0x5265c00);this[_0x5b4ef7(0x3ea)][_0x5b4ef7(0x547)]?.['warn'](_0x5b4ef7(0x2ee)+_0x5104d2+_0x5b4ef7(0x35f),{'feature':'license','licensee':this[_0x5b4ef7(0x778)]['licensee'],'expiresAt':new Date(this[_0x5b4ef7(0x778)][_0x5b4ef7(0x337)])[_0x5b4ef7(0x219)]()});}this[_0x5b4ef7(0x778)]&&this['_active'][_0x5b4ef7(0x297)]===_0x50d4a7&&this['okdb'][_0x5b4ef7(0x547)]?.[_0x5b4ef7(0x305)](_0x5b4ef7(0x497),{'feature':'license','licensee':this['_active'][_0x5b4ef7(0x5a8)]});}[_0x54229d(0x6ea)](_0x33d874,_0x4ff997){const _0x17f725=_0x54229d;if(!_0x33d874[_0x17f725(0x5e2)])return _0x17f725(0x536);let _0x44b484;try{_0x44b484=_0x379c49[_0x17f725(0x792)](_0x33d874[_0x17f725(0x5e2)]);}catch(_0x53946a){return _0x17f725(0x536);}try{const _0x39c6c2=_0xe2ea94[_0x17f725(0x66e)](null,_0x44b484['payload'],_0x527d5d[_0x17f725(0x3b9)],_0x44b484[_0x17f725(0x272)]);if(!_0x39c6c2)return _0x17f725(0x536);}catch(_0xe5594a){return _0x17f725(0x536);}if(_0x44b484[_0x17f725(0x68c)][_0x17f725(0x297)]===_0x50d4a7)return'active';if(_0x44b484[_0x17f725(0x68c)][_0x17f725(0x337)]<=Date[_0x17f725(0x6a7)]())return _0x17f725(0x2c6);if(_0x44b484[_0x17f725(0x68c)][_0x17f725(0x297)]===_0x3ce500)return _0x17f725(0x30f);if(!_0x33d874[_0x17f725(0x50b)])return _0x17f725(0x3fe);const _0x7cdf9f=_0x379c49[_0x17f725(0x18a)]({'tokenString':_0x33d874[_0x17f725(0x50b)],'nodeId':_0x4ff997,'rawBlobBuf':_0x44b484['rawBuf'],'pubKeyPem':_0x527d5d[_0x17f725(0x3b9)],'pubFingerprint':_0x527d5d[_0x17f725(0x4a0)]});if(_0x7cdf9f['reason']==='LICENSE_HASH_MISMATCH'||_0x7cdf9f[_0x17f725(0x781)]==='SIG_INVALID')return _0x17f725(0x688);if(_0x7cdf9f[_0x17f725(0x781)]===_0x17f725(0x389))return _0x17f725(0x2c6);if(!_0x7cdf9f[_0x17f725(0x207)])return _0x17f725(0x688);return _0x17f725(0x30f);}get[_0x54229d(0x30f)](){const _0x3bec0f=_0x54229d;return this[_0x3bec0f(0x778)];}get[_0x54229d(0x74b)](){const _0x3f9580=_0x54229d;return this[_0x3f9580(0x778)]??_0xcfa781;}[_0x54229d(0x74d)](_0x3c73de){const _0x1edea3=_0x54229d;if(_0x527d5d[_0x1edea3(0x420)]!=='true')return;const _0x55a063=this[_0x1edea3(0x74b)];if(!_0x55a063[_0x1edea3(0x429)]?.[_0x3c73de]){const _0x49ef8c=_0x55a063[_0x1edea3(0x2ba)]?_0x1edea3(0x485)+_0x3c73de+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x3c73de+_0x1edea3(0x616):_0x1edea3(0x461)+_0x3c73de+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x3c73de+'\x22.';throw new _0x425b58(_0x49ef8c,'LICENSE_FEATURE_DISABLED',{'feature':_0x3c73de});}}[_0x54229d(0x5f8)](_0x3582e8){const _0x6a00f9=_0x54229d;if(_0x527d5d[_0x6a00f9(0x420)]!==_0x6a00f9(0x434))return!![];return!!this[_0x6a00f9(0x74b)][_0x6a00f9(0x429)]?.[_0x3582e8];}[_0x54229d(0x6f1)](_0x4e155d){const _0x270c82=_0x54229d;if(_0x527d5d[_0x270c82(0x420)]!==_0x270c82(0x434))return![];const _0x2421b2=this[_0x270c82(0x74b)][_0x270c82(0x36a)]?.[_0x4e155d];return!(_0x2421b2===null||_0x2421b2===undefined||_0x2421b2===0x0);}[_0x54229d(0x5cf)](_0x4ced94,_0x307953){const _0x2a0bf9=_0x54229d;if(_0x527d5d['LICENSED_BUILD']!==_0x2a0bf9(0x434))return;const _0x213847=this[_0x2a0bf9(0x74b)],_0x288153=_0x213847['limits']?.[_0x4ced94];if(_0x288153===null||_0x288153===undefined||_0x288153===0x0)return;if(_0x307953>=_0x288153)throw new _0x425b58('License\x20limit\x20exceeded:\x20'+_0x4ced94+'\x20('+_0x307953+'/'+_0x288153+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x4ced94,'current':_0x307953,'max':_0x288153});}async['addLicense'](_0x2e3b57){const _0x15808b=_0x54229d;let _0x2861de;try{_0x2861de=_0x379c49[_0x15808b(0x792)](_0x2e3b57);}catch(_0x8b9317){throw new _0x425b58('Invalid\x20license\x20blob:\x20'+_0x8b9317[_0x15808b(0x246)],_0x15808b(0x745));}let _0x63303c;try{_0x63303c=_0xe2ea94[_0x15808b(0x66e)](null,_0x2861de[_0x15808b(0x4fe)],_0x527d5d['PUBLIC_KEY_PEM'],_0x2861de[_0x15808b(0x272)]);}catch(_0x5587c6){throw new _0x425b58(_0x15808b(0x4c1)+_0x5587c6[_0x15808b(0x246)],'LICENSE_INVALID');}if(!_0x63303c)throw new _0x425b58(_0x15808b(0x453)+(_0x15808b(0x342)+_0x527d5d[_0x15808b(0x4a0)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x15808b(0x745),{'expectedFingerprint':_0x527d5d[_0x15808b(0x4a0)]});if(_0x2861de[_0x15808b(0x68c)][_0x15808b(0x297)]===_0x3ce500){const _0xe4d7bc=_0x2861de[_0x15808b(0x68c)][_0x15808b(0x337)]-_0x2861de['decoded']['issuedAt'];if(_0xe4d7bc>_0x52c716)throw new _0x425b58(_0x15808b(0x58f)+Math['ceil'](_0xe4d7bc/(0x1e*0x5265c00))+_0x15808b(0x2da),_0x15808b(0x745));}const _0x51c5dc=this[_0x15808b(0x3ea)][_0x15808b(0x6cd)];await _0x2af888(_0x51c5dc);const _0x2767e2=_0x379c49[_0x15808b(0x4bd)](_0x2861de['rawBuf'])['toString'](_0x15808b(0x723));for(const {key:_0x5c9425,value:_0x2f831f}of _0x51c5dc[_0x15808b(0x433)](_0x385f4e)){if(_0x2f831f[_0x15808b(0x545)]===_0x2767e2)throw new _0x425b58(_0x15808b(0x4e6),_0x15808b(0x6c5),{'id':_0x5c9425});}const _0x4e2194=_0xe2ea94[_0x15808b(0x78f)](_0x15808b(0x755))['update']('okdb-license-id:')[_0x15808b(0x751)](_0x2861de['rawBuf'])['digest']('hex'),_0x5e5589=_0x4e2194[_0x15808b(0x7a7)](0x0,0x8)+'-'+_0x4e2194[_0x15808b(0x7a7)](0x8,0xc)+'-5'+_0x4e2194['slice'](0xd,0x10)+'-'+(parseInt(_0x4e2194[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x4e2194[_0x15808b(0x7a7)](0x11,0x14)+'-'+_0x4e2194[_0x15808b(0x7a7)](0x14,0x20),_0x43b8af={'blob':_0x2e3b57,'activation':null,'addedAt':Date[_0x15808b(0x6a7)](),'_licenseHash':_0x2767e2,'licensee':_0x2861de[_0x15808b(0x68c)]['licensee'],'expiresAt':_0x2861de[_0x15808b(0x68c)]['expiresAt'],'features':_0x2861de['decoded'][_0x15808b(0x429)],'limits':_0x2861de[_0x15808b(0x68c)][_0x15808b(0x36a)],'licenseType':_0x2861de['decoded'][_0x15808b(0x297)]};return await _0x51c5dc['put'](_0x385f4e,_0x5e5589,_0x43b8af),{'id':_0x5e5589,..._0x43b8af};}async['activateLicense'](_0x1a35ba){const _0x49dc04=_0x54229d;let _0x401b55;try{_0x401b55=_0x379c49[_0x49dc04(0x735)](_0x1a35ba);}catch(_0x3a3d52){throw new _0x425b58('Invalid\x20activation\x20token:\x20'+_0x3a3d52[_0x49dc04(0x246)],_0x49dc04(0x727));}const _0x29bf4c=_0x401b55[_0x49dc04(0x4bd)][_0x49dc04(0x202)](_0x49dc04(0x723)),_0x113e23=this[_0x49dc04(0x3ea)][_0x49dc04(0x6cd)];if(!_0x113e23||!_0x113e23[_0x49dc04(0x6b6)](_0x385f4e))throw new _0x425b58('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x49dc04(0x727));let _0x50a2a9=null,_0x54190d=null;for(const {key:_0x2532b4,value:_0x6d5c69}of _0x113e23[_0x49dc04(0x433)](_0x385f4e)){if(_0x6d5c69['_licenseHash']===_0x29bf4c){_0x50a2a9=_0x2532b4,_0x54190d=_0x6d5c69;break;}}if(!_0x50a2a9)throw new _0x425b58(_0x49dc04(0x6a1),_0x49dc04(0x727));const {rawBuf:_0xd3a342}=_0x379c49[_0x49dc04(0x792)](_0x54190d[_0x49dc04(0x5e2)]),_0x373f17=_0x379c49[_0x49dc04(0x18a)]({'tokenString':_0x1a35ba,'nodeId':this[_0x49dc04(0x3ea)]['id'],'rawBlobBuf':_0xd3a342,'pubKeyPem':_0x527d5d[_0x49dc04(0x3b9)],'pubFingerprint':_0x527d5d['PUB_FINGERPRINT']});if(!_0x373f17[_0x49dc04(0x207)])throw new _0x425b58(_0x49dc04(0x19b)+_0x373f17[_0x49dc04(0x781)],_0x49dc04(0x727),{'reason':_0x373f17['reason']});const _0x4dcffd={..._0x54190d,'activation':_0x1a35ba};return await _0x113e23[_0x49dc04(0x751)](_0x385f4e,_0x50a2a9,_0x4dcffd),{'id':_0x50a2a9,..._0x4dcffd};}async[_0x54229d(0x5a1)](_0x2ec136){const _0x1363cd=_0x54229d,_0x3f92b7=this['okdb'][_0x1363cd(0x6cd)];if(!_0x3f92b7||!_0x3f92b7[_0x1363cd(0x6b6)](_0x385f4e))return;await _0x3f92b7[_0x1363cd(0x43f)](_0x385f4e,_0x2ec136);}async[_0x54229d(0x6c3)](){const _0x76c4a0=_0x54229d,_0x450812=this[_0x76c4a0(0x3ea)][_0x76c4a0(0x6cd)];if(!_0x450812||!_0x450812['hasType'](_0x385f4e))return[];const _0xcba127=this[_0x76c4a0(0x3ea)]['id'],_0x441f73=[];for(const {key:_0x3136ca,value:_0x21e3ef}of _0x450812[_0x76c4a0(0x433)](_0x385f4e)){const _0x365d03=this['_computeStatus'](_0x21e3ef,_0xcba127);_0x441f73['push']({..._0x21e3ef,'id':_0x3136ca,'status':_0x365d03});}return _0x441f73;}[_0x54229d(0x19f)](){const _0x1b8ca6=_0x54229d,_0x59cadb=this['okdb'][_0x1b8ca6(0x6cd)];if(!_0x59cadb||!_0x59cadb['hasType'](_0x385f4e))return[];const _0xa2cbcc=this[_0x1b8ca6(0x3ea)]['id'],_0x41f618=[];for(const {key:_0x27e125,value:_0x23a6e5}of _0x59cadb[_0x1b8ca6(0x433)](_0x385f4e)){if(_0x23a6e5[_0x1b8ca6(0x545)]){if(_0x23a6e5[_0x1b8ca6(0x297)]===_0x3ce500)_0x41f618['push']({'licenseId':_0x27e125,'pin':null});else{const _0x13c429=Buffer[_0x1b8ca6(0x716)](_0x23a6e5[_0x1b8ca6(0x545)],_0x1b8ca6(0x723)),{pin:_0xa794af}=_0x379c49[_0x1b8ca6(0x6c4)](_0xa2cbcc,_0x13c429,_0x527d5d[_0x1b8ca6(0x4a0)]);_0x41f618['push']({'licenseId':_0x27e125,'pin':_0xa794af});}}}return _0x41f618;}async[_0x54229d(0x746)](){const _0x179b25=_0x54229d,_0x326ff5=this[_0x179b25(0x778)];await this['reload']();if(this[_0x179b25(0x778)]&&this['_active'][_0x179b25(0x297)]===_0x3ce500){const _0x6874ee=Math[_0x179b25(0x392)]((this['_active'][_0x179b25(0x337)]-Date[_0x179b25(0x6a7)]())/0x5265c00);this[_0x179b25(0x3ea)][_0x179b25(0x547)]?.['warn'](_0x179b25(0x2ee)+_0x6874ee+_0x179b25(0x35f),{'feature':_0x179b25(0x707),'licensee':this[_0x179b25(0x778)][_0x179b25(0x5a8)],'expiresAt':new Date(this[_0x179b25(0x778)][_0x179b25(0x337)])[_0x179b25(0x219)]()});}this['_active']&&this['_active'][_0x179b25(0x297)]===_0x50d4a7&&this['okdb']['log']?.['warn'](_0x179b25(0x497),{'feature':_0x179b25(0x707),'licensee':this['_active']['licensee']});if(_0x326ff5&&!this[_0x179b25(0x778)]){this[_0x179b25(0x3ea)][_0x179b25(0x547)]?.[_0x179b25(0x305)]('License\x20expired\x20or\x20invalidated',{'feature':_0x179b25(0x707)}),this[_0x179b25(0x3ea)][_0x179b25(0x2b0)]?.[_0x179b25(0x652)](_0x48935e[_0x179b25(0x745)],{'previous':_0x326ff5});const _0x24e8e0=this[_0x179b25(0x3ea)][_0x179b25(0x76b)]?.[_0x179b25(0x65f)]??_0x527d5d[_0x179b25(0x66d)];_0x24e8e0===_0x179b25(0x4a4)&&(this[_0x179b25(0x3ea)][_0x179b25(0x547)]?.[_0x179b25(0x3ba)](_0x179b25(0x54c),{'feature':_0x179b25(0x707)}),this[_0x179b25(0x3ea)][_0x179b25(0x5e4)]()['catch'](()=>{})['finally'](()=>process[_0x179b25(0x592)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x5bc160,'_C':_0x527d5d,'FREE_TIER':_0xcfa781},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x270959=_0x5411c3;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x16ad62=require$$0$2,_0x1c9c99=require$$1$1,_0x4e56da=require$$0,_0x1a676f=require$$1,_0x1f5b2f=_0x1a676f[_0x270959(0x2b6)](_0x4e56da[_0x270959(0x1d9)](),_0x270959(0x78a)),_0xabdfa6=0x3e8,_0x17f52b={'reset':_0x270959(0x5ec),'bold':_0x270959(0x267),'dim':_0x270959(0x51c),'red':_0x270959(0x1b9),'green':_0x270959(0x78d),'yellow':'\x1b[33m','blue':_0x270959(0x4aa),'magenta':_0x270959(0x419),'cyan':_0x270959(0x398),'white':_0x270959(0x6b7),'gray':_0x270959(0x588)},_0x4d66a=!process[_0x270959(0x5c6)][_0x270959(0x338)]||!!process.env.NO_COLOR,_0x4e3371=(_0x2393a0,_0x558651)=>_0x4d66a?_0x558651:''+_0x2393a0+_0x558651+_0x17f52b['reset'],_0x2537b9={'error':_0x17f52b[_0x270959(0x67b)],'warn':_0x17f52b[_0x270959(0x19d)],'info':_0x17f52b[_0x270959(0x462)],'debug':_0x17f52b['gray']},_0x4824f9={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x449a03(_0x321b1f,_0x3920bc=_0x270959(0x380)){const _0x479fdf=_0x270959,{level:_0x22d916,msg:_0x120f21,meta:_0x495a06,context:_0x4e8cbf,ts:_0x5da3b2}=_0x321b1f;if((_0x4824f9[_0x22d916]??0x1)<(_0x4824f9[_0x3920bc]??0x1))return;const _0x191916=_0x4e3371(_0x17f52b[_0x479fdf(0x266)],new Date(_0x5da3b2)['toISOString']()),_0x24f103=_0x4e3371(_0x2537b9[_0x22d916]??_0x17f52b[_0x479fdf(0x5f3)],_0x22d916[_0x479fdf(0x48a)](0x5));let _0x4c375f='\x20\x20'+_0x191916+'\x20'+_0x4e3371(_0x17f52b[_0x479fdf(0x732)],_0x24f103)+'\x20'+_0x120f21;if(_0x495a06&&Object[_0x479fdf(0x35c)](_0x495a06)[_0x479fdf(0x1b1)]>0x0){const _0x4f8479=Object['entries'](_0x495a06)['map'](([_0x1602e0,_0x24553e])=>_0x1602e0+'='+_0x24553e)[_0x479fdf(0x2b6)]('\x20');_0x4c375f+=_0x4e3371(_0x17f52b['dim'],_0x479fdf(0x39a)+_0x4f8479+']');}if(_0x4e8cbf!==undefined){const _0x1ffd7f=typeof _0x4e8cbf===_0x479fdf(0x336)?JSON[_0x479fdf(0x540)](_0x4e8cbf):String(_0x4e8cbf);_0x4c375f+=_0x4e3371(_0x17f52b['dim'],'\x20\x20'+_0x1ffd7f);}const _0x342486=_0x22d916===_0x479fdf(0x3ba)||_0x22d916===_0x479fdf(0x305)?process[_0x479fdf(0x391)][_0x479fdf(0x4f7)]['bind'](process[_0x479fdf(0x391)]):process[_0x479fdf(0x5c6)][_0x479fdf(0x4f7)][_0x479fdf(0x5e1)](process[_0x479fdf(0x5c6)]);_0x342486(_0x4c375f+'\x0a');}function _0x3a7bf0(_0x39249a,_0x4ebf92){const _0x4c4c30=_0x270959;if(_0x39249a===0xcc||_0x39249a>=0xc8&&_0x39249a<0x12c&&!_0x4ebf92){console[_0x4c4c30(0x547)](_0x4c4c30(0x7ad)+_0x4e3371(_0x17f52b[_0x4c4c30(0x3df)],'✓')+'\x0a');return;}if(_0x39249a>=0x190||_0x4ebf92?.[_0x4c4c30(0x3ba)]){const _0x129b61=_0x4ebf92?.[_0x4c4c30(0x3ba)]??_0x4ebf92?.[_0x4c4c30(0x246)]??_0x4c4c30(0x697)+_0x39249a;console['log'](_0x4c4c30(0x7ad)+_0x4e3371(_0x17f52b[_0x4c4c30(0x67b)],'✗')+'\x20'+_0x4e3371(_0x17f52b[_0x4c4c30(0x732)]+_0x17f52b[_0x4c4c30(0x67b)],String(_0x39249a))+'\x20\x20'+_0x129b61+'\x0a');return;}const _0x3ac431=Object[_0x4c4c30(0x6f7)][_0x4c4c30(0x60b)][_0x4c4c30(0x65a)](_0x4ebf92??{},_0x4c4c30(0x59d))?_0x4ebf92['result']:_0x4ebf92,_0x192492=_0x4ebf92?.[_0x4c4c30(0x2e5)];console[_0x4c4c30(0x547)](''),_0x3113f5(_0x3ac431,'\x20\x20');if(_0x192492?.[_0x4c4c30(0x1df)]!=null||_0x192492?.[_0x4c4c30(0x395)]!=null){const _0x491c14=[];if(_0x192492[_0x4c4c30(0x1df)]!=null)_0x491c14['push'](_0x192492[_0x4c4c30(0x1df)]+_0x4c4c30(0x205)+(_0x192492['count']!==0x1?'s':''));if(_0x192492['time']!=null)_0x491c14[_0x4c4c30(0x494)](_0x192492['time']+'ms');console[_0x4c4c30(0x547)](_0x4c4c30(0x7ad)+_0x4e3371(_0x17f52b[_0x4c4c30(0x60c)],_0x491c14[_0x4c4c30(0x2b6)](_0x4c4c30(0x563))));}console[_0x4c4c30(0x547)]('');}function _0x3113f5(_0x1efede,_0x3720b9=''){const _0x94719e=_0x270959;if(_0x1efede===null||_0x1efede===undefined){console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x60c)],_0x94719e(0x6fe)));return;}if(Array[_0x94719e(0x729)](_0x1efede)){if(_0x1efede[_0x94719e(0x1b1)]===0x0){console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x60c)],_0x94719e(0x788)));return;}if(_0x1efede[_0x94719e(0x595)](_0x1a5f7c=>_0x1a5f7c&&typeof _0x1a5f7c===_0x94719e(0x336)&&_0x94719e(0x5af)in _0x1a5f7c&&'value'in _0x1a5f7c)){_0xbd102(_0x1efede,_0x3720b9);return;}if(_0x1efede['every'](_0x200905=>_0x200905&&typeof _0x200905==='object'&&_0x94719e(0x737)in _0x200905&&_0x94719e(0x1df)in _0x200905)){_0x584af3(_0x1efede,_0x3720b9);return;}if(_0x1efede[_0x94719e(0x595)](_0x60f473=>typeof _0x60f473!==_0x94719e(0x336)||_0x60f473===null)){_0x1efede[_0x94719e(0x4ff)]((_0x11f905,_0x4ea802)=>console['log'](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x266)],_0x4ea802+0x1+'.')+'\x20'+_0x4e3371(_0x17f52b['white'],String(_0x11f905))));return;}_0x1efede[_0x94719e(0x4ff)]((_0x362e2c,_0x15b7cf)=>{const _0xccba77=_0x94719e;console['log'](_0x3720b9+_0x4e3371(_0x17f52b['dim'],'['+_0x15b7cf+']'));if(typeof _0x362e2c===_0xccba77(0x336)&&_0x362e2c!==null)_0x5198f1(_0x362e2c,_0x3720b9+'\x20\x20');else console['log'](_0x3720b9+'\x20\x20'+String(_0x362e2c));});return;}if(typeof _0x1efede===_0x94719e(0x336)){if(_0x94719e(0x5af)in _0x1efede&&_0x94719e(0x643)in _0x1efede&&Object['keys'](_0x1efede)[_0x94719e(0x1b1)]<=0x3){console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x732)]+_0x17f52b[_0x94719e(0x462)],String(_0x1efede[_0x94719e(0x5af)])));const _0x491bca=_0x1efede[_0x94719e(0x643)];if(_0x491bca&&typeof _0x491bca===_0x94719e(0x336))_0x5198f1(_0x491bca,_0x3720b9);else console['log'](_0x3720b9+_0x4e3371(_0x17f52b['white'],String(_0x491bca)));return;}_0x5198f1(_0x1efede,_0x3720b9);return;}console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x5f3)],String(_0x1efede)));}function _0x5198f1(_0x9db974,_0x54eda2=''){const _0x4cee93=_0x270959,_0x380537=Object[_0x4cee93(0x352)](_0x9db974);if(_0x380537['length']===0x0){console['log'](_0x54eda2+_0x4e3371(_0x17f52b[_0x4cee93(0x60c)],'{}'));return;}const _0x4b6675=Math['min'](0x1c,Math[_0x4cee93(0x46c)](..._0x380537['map'](([_0x5ef0b2])=>_0x5ef0b2[_0x4cee93(0x1b1)])));for(const [_0xf75bf0,_0x12cdaa]of _0x380537){const _0x38548c=_0x4e3371(_0x17f52b[_0x4cee93(0x462)],_0xf75bf0[_0x4cee93(0x48a)](_0x4b6675));if(_0x12cdaa===null||_0x12cdaa===undefined)console[_0x4cee93(0x547)](_0x54eda2+_0x38548c+'\x20\x20'+_0x4e3371(_0x17f52b[_0x4cee93(0x60c)],_0x4cee93(0x50a)));else{if(typeof _0x12cdaa===_0x4cee93(0x336)){const _0x3fc80d=JSON[_0x4cee93(0x540)](_0x12cdaa);_0x3fc80d[_0x4cee93(0x1b1)]<=0x50?console[_0x4cee93(0x547)](_0x54eda2+_0x38548c+'\x20\x20'+_0x4e3371(_0x17f52b[_0x4cee93(0x60c)],_0x3fc80d)):(console[_0x4cee93(0x547)](_0x54eda2+_0x38548c),_0x3113f5(_0x12cdaa,_0x54eda2+'\x20\x20'));}else{const _0x3a79e6=typeof _0x12cdaa===_0x4cee93(0x312)?_0x4e3371(_0x12cdaa?_0x17f52b[_0x4cee93(0x3df)]:_0x17f52b['yellow'],String(_0x12cdaa)):typeof _0x12cdaa===_0x4cee93(0x758)?_0x4e3371(_0x17f52b['magenta'],String(_0x12cdaa)):_0x4e3371(_0x17f52b[_0x4cee93(0x5f3)],String(_0x12cdaa));console[_0x4cee93(0x547)](_0x54eda2+_0x38548c+'\x20\x20'+_0x3a79e6);}}}}function _0xbd102(_0x2247ba,_0x6d6a99=''){const _0x17c81d=_0x270959,_0x516587=Math['min'](0x20,Math['max'](..._0x2247ba[_0x17c81d(0x2cc)](_0x33dd10=>String(_0x33dd10[_0x17c81d(0x5af)])['length'])));for(const {key:_0x2ebccf,value:_0x309f4d,score:_0x27deef,clock:_0x53d78f}of _0x2247ba){const _0x397062=_0x4e3371(_0x17f52b[_0x17c81d(0x732)]+_0x17f52b[_0x17c81d(0x462)],String(_0x2ebccf)[_0x17c81d(0x48a)](_0x516587)),_0x4e791d=_0x309f4d==null?_0x4e3371(_0x17f52b[_0x17c81d(0x60c)],_0x17c81d(0x50a)):typeof _0x309f4d===_0x17c81d(0x336)?_0x4e3371(_0x17f52b[_0x17c81d(0x60c)],JSON['stringify'](_0x309f4d)):_0x4e3371(_0x17f52b[_0x17c81d(0x5f3)],String(_0x309f4d)),_0x323af0=_0x27deef!=null?_0x4e3371(_0x17f52b[_0x17c81d(0x266)],'\x20\x20score:'+_0x27deef[_0x17c81d(0x26b)](0x4)):'',_0x504cad=_0x53d78f!=null?_0x4e3371(_0x17f52b[_0x17c81d(0x266)],'\x20\x20@'+_0x53d78f):'';console[_0x17c81d(0x547)](_0x6d6a99+_0x397062+'\x20\x20'+_0x4e791d+_0x323af0+_0x504cad);}}function _0x584af3(_0x4e5119,_0x1c90a5=''){const _0x59c82f=_0x270959,_0x403903=Math[_0x59c82f(0x4a8)](0x20,Math['max'](..._0x4e5119[_0x59c82f(0x2cc)](_0x507505=>_0x507505[_0x59c82f(0x737)][_0x59c82f(0x1b1)])));for(const {type:_0xf632cc,count:_0x31ccd6,fields:_0x5666d3}of _0x4e5119){if(_0xf632cc['startsWith']('~'))continue;const _0x590e2c=_0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x59c82f(0x462)],_0xf632cc[_0x59c82f(0x48a)](_0x403903)),_0x3ee374=_0x4e3371(_0x17f52b[_0x59c82f(0x22a)],String(_0x31ccd6)['padStart'](0x6))+_0x4e3371(_0x17f52b[_0x59c82f(0x60c)],_0x59c82f(0x4d7)),_0x4aca38=_0x5666d3&&Object[_0x59c82f(0x35c)](_0x5666d3)[_0x59c82f(0x1b1)]?_0x4e3371(_0x17f52b['dim'],_0x59c82f(0x642)+Object[_0x59c82f(0x35c)](_0x5666d3)['slice'](0x0,0x6)[_0x59c82f(0x2b6)](',\x20')+(Object[_0x59c82f(0x35c)](_0x5666d3)[_0x59c82f(0x1b1)]>0x6?'…':'')):'';console[_0x59c82f(0x547)](_0x1c90a5+_0x590e2c+'\x20\x20'+_0x3ee374+_0x4aca38);}}const _0x4a62f2=['types','type/','queue/',_0x270959(0x56d),_0x270959(0x480),_0x270959(0x2fe)];function _0x20051a(_0x396b40,_0x3d0ffb){const _0x17c002=_0x270959;if(_0x396b40[_0x17c002(0x72d)](_0x17c002(0x41e)))return _0x396b40;if(_0x396b40[_0x17c002(0x72d)]('/'))return _0x17c002(0x6e5)+_0x396b40;if(_0x396b40[_0x17c002(0x72d)]('env/'))return _0x17c002(0x41e)+_0x396b40;const _0x256cd9=_0x4a62f2[_0x17c002(0x7a8)](_0x3582fd=>_0x396b40===_0x3582fd[_0x17c002(0x1f7)](/\/$/,'')||_0x396b40['startsWith'](_0x3582fd));return _0x256cd9?_0x17c002(0x185)+_0x3d0ffb+'/'+_0x396b40:_0x17c002(0x41e)+_0x396b40;}function _0x45829d(_0x4bbb30){const _0x102bd2=_0x270959,_0x106b59={},_0x1e5baa=[];let _0x12c107=0x0;while(_0x12c107<_0x4bbb30[_0x102bd2(0x1b1)]){if((_0x4bbb30[_0x12c107]===_0x102bd2(0x657)||_0x4bbb30[_0x12c107]==='-e')&&_0x4bbb30[_0x12c107+0x1]&&!_0x4bbb30[_0x12c107+0x1][_0x102bd2(0x72d)]('-'))_0x106b59['env']=_0x4bbb30[++_0x12c107];else _0x4bbb30[_0x12c107]==='--help'||_0x4bbb30[_0x12c107]==='-h'?_0x106b59['help']=!![]:_0x1e5baa[_0x102bd2(0x494)](_0x4bbb30[_0x12c107]);_0x12c107++;}return{'flags':_0x106b59,'rest':_0x1e5baa};}const _0xa78d3a={'system':_0x270959(0x371),'envs':_0x270959(0x6ad),'types':'Types','data':'Records','indexes':_0x270959(0x35b),'fts':'Full-text\x20search','sync':'Sync','queue':_0x270959(0x4c3),'files':_0x270959(0x20c),'embeddings':_0x270959(0x566),'engines':_0x270959(0x675),'admin':_0x270959(0x460),'event':'Events','processor':_0x270959(0x34d)},_0x4aeee1=[_0x270959(0x256),_0x270959(0x71b),_0x270959(0x2bd),_0x270959(0x268),_0x270959(0x39e),_0x270959(0x37a),_0x270959(0x45e),_0x270959(0x2c9),_0x270959(0x261),_0x270959(0x64c),'engines','admin'];function _0x14615c(_0x2cc1ef){const _0x4a6537=_0x270959;return _0x2cc1ef[_0x4a6537(0x1f7)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x4a6537(0x3ff))['replace'](/^\/env\/:env/,_0x4a6537(0x61b))[_0x4a6537(0x1f7)](/^\//,'');}function _0x5b0abc(_0xabaf83,_0x303d04=''){const _0x33969a=_0x270959,_0x5ca3e6=_0xabaf83['http']['listRoutes']()[_0x33969a(0x3fb)](_0xf10ed8=>!_0xf10ed8[_0x33969a(0x2e5)]?.[_0x33969a(0x24f)]),_0x399431=_0x303d04?_0x5ca3e6[_0x33969a(0x3fb)](_0x3daaf4=>_0x3daaf4[_0x33969a(0x504)][_0x33969a(0x2be)]()[_0x33969a(0x70f)](_0x303d04[_0x33969a(0x2be)]())||(_0x3d7911(_0x3daaf4)??'')[_0x33969a(0x2be)]()[_0x33969a(0x70f)](_0x303d04[_0x33969a(0x2be)]())||_0x84b1d6(_0x3daaf4)[_0x33969a(0x7a8)](_0x1f1c01=>_0x1f1c01[_0x33969a(0x2be)]()[_0x33969a(0x70f)](_0x303d04[_0x33969a(0x2be)]()))):_0x5ca3e6;if(!_0x399431[_0x33969a(0x1b1)]){console['log'](_0x4e3371(_0x17f52b[_0x33969a(0x19d)],_0x33969a(0x321)+_0x303d04+'\x22\x0a'));return;}const _0x24b0c4=new Map();for(const _0x5c80c5 of _0x399431){const _0xcc0112=_0x84b1d6(_0x5c80c5)[0x0]??'other';if(!_0x24b0c4[_0x33969a(0x4e7)](_0xcc0112))_0x24b0c4[_0x33969a(0x238)](_0xcc0112,[]);_0x24b0c4[_0x33969a(0x5e0)](_0xcc0112)[_0x33969a(0x494)](_0x5c80c5);}const _0x4db983=[..._0x4aeee1[_0x33969a(0x3fb)](_0x3ef8bb=>_0x24b0c4['has'](_0x3ef8bb)),...[..._0x24b0c4[_0x33969a(0x35c)]()][_0x33969a(0x3fb)](_0x5a1e04=>!_0x4aeee1[_0x33969a(0x70f)](_0x5a1e04))];console[_0x33969a(0x547)]('');for(const _0x58fa21 of _0x4db983){const _0x637e23=_0x24b0c4[_0x33969a(0x5e0)](_0x58fa21);if(!_0x637e23?.[_0x33969a(0x1b1)])continue;console[_0x33969a(0x547)](_0x4e3371(_0x17f52b[_0x33969a(0x732)],'\x20\x20'+(_0xa78d3a[_0x58fa21]??_0x58fa21)));for(const _0x355452 of _0x637e23){const _0x2c1895=_0x4e3371(_0x17f52b[_0x33969a(0x22a)],_0x355452[_0x33969a(0x399)][_0x33969a(0x48a)](0x7)),_0x5ad8a9=_0x4e3371(_0x17f52b[_0x33969a(0x462)],_0x14615c(_0x355452[_0x33969a(0x504)])),_0x33acfa=_0x3d7911(_0x355452)?_0x4e3371(_0x17f52b[_0x33969a(0x60c)],'\x20\x20'+_0x3d7911(_0x355452)):'',_0x3772d4=_0x355452['operation']?.['id']?_0x4e3371(_0x17f52b[_0x33969a(0x266)],_0x33969a(0x39a)+_0x355452[_0x33969a(0x43b)]['id']+']'):'';console[_0x33969a(0x547)](_0x33969a(0x1d1)+_0x2c1895+'\x20'+_0x5ad8a9+_0x33acfa+_0x3772d4);}console[_0x33969a(0x547)]('');}}function _0x27259f(_0x4e3118,_0x51048f){const _0x1560b3=_0x270959,_0x21f0f2=_0x51048f[_0x1560b3(0x1f7)](/^\/api(\/env\/[^/]+)?\//,'')[_0x1560b3(0x5ed)]('/')[0x0],_0x452340=_0x4e3118[_0x1560b3(0x277)][_0x1560b3(0x33c)]()[_0x1560b3(0x3fb)](_0x7fc5ff=>_0x7fc5ff['path'][_0x1560b3(0x2be)]()[_0x1560b3(0x70f)](_0x21f0f2[_0x1560b3(0x2be)]()));if(!_0x452340['length']){console['log'](_0x4e3371(_0x17f52b[_0x1560b3(0x19d)],_0x1560b3(0x54a)+_0x51048f+'\x0a'));return;}console[_0x1560b3(0x547)]('');for(const _0x42b291 of _0x452340[_0x1560b3(0x7a7)](0x0,0xc)){for(const _0x4a9d00 of _0x598304(_0x42b291)){console['log'](_0x4a9d00);}console['log']('');}}function _0x3d7911(_0xaa2e11){const _0x907696=_0x270959;return _0xaa2e11['operation']?.[_0x907696(0x22e)]??_0xaa2e11[_0x907696(0x2e5)]?.[_0x907696(0x22e)]??'';}function _0x137e77(_0x550cc7){const _0x4726bb=_0x270959;return _0x550cc7[_0x4726bb(0x43b)]?.[_0x4726bb(0x4b0)]??_0x550cc7[_0x4726bb(0x2e5)]?.['description']??'';}function _0x84b1d6(_0x842e31){const _0xe9c596=_0x270959;return _0x842e31[_0xe9c596(0x43b)]?.[_0xe9c596(0x27b)]?.[_0xe9c596(0x1b1)]?_0x842e31[_0xe9c596(0x43b)][_0xe9c596(0x27b)]:_0x842e31[_0xe9c596(0x2e5)]?.[_0xe9c596(0x27b)]??[];}function _0x598304(_0xe40b11){const _0x5ce8f9=_0x270959,_0x16a2b7=[];_0x16a2b7['push']('\x20\x20'+_0x4e3371(_0x17f52b[_0x5ce8f9(0x732)]+_0x17f52b[_0x5ce8f9(0x22a)],_0xe40b11['method'][_0x5ce8f9(0x48a)](0x7))+'\x20'+_0x4e3371(_0x17f52b[_0x5ce8f9(0x732)]+_0x17f52b[_0x5ce8f9(0x462)],_0xe40b11[_0x5ce8f9(0x504)]));_0xe40b11[_0x5ce8f9(0x43b)]?.['id']&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],_0x5ce8f9(0x759)+_0xe40b11[_0x5ce8f9(0x43b)]['id']));_0x3d7911(_0xe40b11)&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x5f3)],_0x3d7911(_0xe40b11)));_0x137e77(_0xe40b11)&&_0x16a2b7['push'](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x60c)],_0x137e77(_0xe40b11)));_0x84b1d6(_0xe40b11)[_0x5ce8f9(0x1b1)]&&_0x16a2b7[_0x5ce8f9(0x494)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e3371(_0x17f52b['gray'],'tags:\x20'+_0x84b1d6(_0xe40b11)[_0x5ce8f9(0x2b6)](',\x20')));_0xe40b11[_0x5ce8f9(0x43b)]?.[_0x5ce8f9(0x6b8)]?.[_0x5ce8f9(0x557)]&&_0x16a2b7[_0x5ce8f9(0x494)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e3371(_0x17f52b['gray'],'access:\x20'+_0xe40b11[_0x5ce8f9(0x43b)][_0x5ce8f9(0x6b8)][_0x5ce8f9(0x557)]));_0xe40b11[_0x5ce8f9(0x43b)]?.[_0x5ce8f9(0x277)]?.[_0x5ce8f9(0x4b4)]&&_0xe40b11[_0x5ce8f9(0x43b)][_0x5ce8f9(0x277)][_0x5ce8f9(0x4b4)]!==_0x5ce8f9(0x1f0)&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],'transport:\x20'+_0xe40b11['operation'][_0x5ce8f9(0x277)]['transport']));if(_0xe40b11[_0x5ce8f9(0x43b)]?.[_0x5ce8f9(0x57a)]){const _0x4778d4=Object[_0x5ce8f9(0x35c)](_0xe40b11['operation'][_0x5ce8f9(0x57a)]['properties']||{});if(_0x4778d4[_0x5ce8f9(0x1b1)])_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],'input:\x20'+_0x4778d4['join'](',\x20')));}return _0xe40b11['meta']?.[_0x5ce8f9(0x6bd)]&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],_0x5ce8f9(0x1b3)+JSON[_0x5ce8f9(0x540)](_0xe40b11[_0x5ce8f9(0x2e5)][_0x5ce8f9(0x6bd)]))),_0x16a2b7;}async function _0x37bd43(_0x1d92d9,_0x53eec0,_0x1cfbfb,_0x2e2bce=null){const _0x473f9a=_0x270959,_0x51d585=_0x1cfbfb[_0x473f9a(0x2db)]('?'),_0x237c12=_0x51d585>=0x0?_0x1cfbfb[_0x473f9a(0x7a7)](0x0,_0x51d585):_0x1cfbfb,_0x4d26e6=_0x51d585>=0x0?_0x1cfbfb['slice'](_0x51d585+0x1):'',_0x276928=Object[_0x473f9a(0x26f)](new URLSearchParams(_0x4d26e6)[_0x473f9a(0x352)]());return _0x1d92d9['http'][_0x473f9a(0x27f)](_0x53eec0,_0x237c12,{'body':_0x2e2bce,'query':_0x276928,'headers':{'content-type':_0x473f9a(0x541)}},{'internal':!![]});}function _0x319d99(_0x90b9b1){const _0x46273f=_0x270959;if(!_0x90b9b1)return null;const _0x8f0a3a=_0x90b9b1['trim']();if(!_0x8f0a3a)return null;try{return JSON['parse'](_0x8f0a3a);}catch{}try{return JSON[_0x46273f(0x355)](_0x6d6112(_0x8f0a3a));}catch(_0x2da5b0){throw new SyntaxError(_0x2da5b0[_0x46273f(0x246)],{'cause':_0x2da5b0});}}function _0x6d6112(_0x50540f){const _0x2129ad=_0x270959;let _0x5b666a='',_0xf069f0=0x0;while(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)]){const _0x4b3fdd=_0x50540f[_0xf069f0];if(_0x4b3fdd==='\x22'){_0x5b666a+='\x22',_0xf069f0++;while(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)]&&_0x50540f[_0xf069f0]!=='\x22'){if(_0x50540f[_0xf069f0]==='\x5c'){_0x5b666a+=_0x50540f[_0xf069f0++];if(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)])_0x5b666a+=_0x50540f[_0xf069f0++];}else _0x5b666a+=_0x50540f[_0xf069f0++];}_0x5b666a+='\x22';if(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)])_0xf069f0++;continue;}if(_0x4b3fdd==='\x27'){_0x5b666a+='\x22',_0xf069f0++;while(_0xf069f0<_0x50540f['length']&&_0x50540f[_0xf069f0]!=='\x27'){if(_0x50540f[_0xf069f0]==='\x5c'&&_0x50540f[_0xf069f0+0x1]==='\x27')_0x5b666a+='\x27',_0xf069f0+=0x2;else _0x50540f[_0xf069f0]==='\x22'?(_0x5b666a+='\x5c\x22',_0xf069f0++):_0x5b666a+=_0x50540f[_0xf069f0++];}_0x5b666a+='\x22';if(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)])_0xf069f0++;continue;}if(_0x2129ad(0x600)[_0x2129ad(0x70f)](_0x4b3fdd)){_0x5b666a+=_0x4b3fdd,_0xf069f0++;continue;}let _0x3162bd='';while(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)]&&!_0x2129ad(0x247)['includes'](_0x50540f[_0xf069f0])&&_0x50540f[_0xf069f0]!=='\x20'&&_0x50540f[_0xf069f0]!=='\x09'&&_0x50540f[_0xf069f0]!=='\x0a'&&_0x50540f[_0xf069f0]!=='\x0d'){_0x3162bd+=_0x50540f[_0xf069f0++];}let _0x35f750=_0xf069f0;while(_0x35f750<_0x50540f[_0x2129ad(0x1b1)]&&(_0x50540f[_0x35f750]==='\x20'||_0x50540f[_0x35f750]==='\x09'))_0x35f750++;if(_0x50540f[_0x35f750]===':')_0x5b666a+='\x22'+_0x3162bd+'\x22';else _0x3162bd===_0x2129ad(0x434)||_0x3162bd==='false'||_0x3162bd===_0x2129ad(0x50a)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x2129ad(0x279)](_0x3162bd)?_0x5b666a+=_0x3162bd:_0x5b666a+='\x22'+_0x3162bd+'\x22';}return _0x5b666a[_0x2129ad(0x1f7)](/,(\s*[}\]])/g,'$1');}function _0xcec720(_0x47a154){const _0x40ab3e=_0x270959,_0x165fd3=[];let _0x4a9905=0x0;while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]){while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]&&(_0x47a154[_0x4a9905]==='\x20'||_0x47a154[_0x4a9905]==='\x09'))_0x4a9905++;if(_0x4a9905>=_0x47a154[_0x40ab3e(0x1b1)])break;const _0x522ab4=_0x47a154[_0x4a9905];if(_0x522ab4==='{'||_0x522ab4==='['){const _0x15fe03=_0x522ab4==='{'?'}':']',_0x56cc9d=_0x4a9905++;let _0xd37921=0x1,_0x3c5819=![],_0x490e50='';while(_0x4a9905<_0x47a154['length']&&_0xd37921>0x0){const _0x5e3166=_0x47a154[_0x4a9905];if(_0x3c5819){if(_0x5e3166==='\x5c')_0x4a9905++;else{if(_0x5e3166===_0x490e50)_0x3c5819=![];}}else{if(_0x5e3166==='\x22'||_0x5e3166==='\x27')_0x3c5819=!![],_0x490e50=_0x5e3166;else{if(_0x5e3166===_0x522ab4)_0xd37921++;else{if(_0x5e3166===_0x15fe03)_0xd37921--;}}}_0x4a9905++;}_0x165fd3[_0x40ab3e(0x494)](_0x47a154[_0x40ab3e(0x7a7)](_0x56cc9d,_0x4a9905));continue;}if(_0x522ab4==='\x22'||_0x522ab4==='\x27'){const _0x48e02e=_0x522ab4;_0x4a9905++;let _0x3f2aef='';while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]&&_0x47a154[_0x4a9905]!==_0x48e02e){if(_0x47a154[_0x4a9905]==='\x5c'&&_0x4a9905+0x1<_0x47a154['length'])_0x4a9905++,_0x3f2aef+=_0x47a154[_0x4a9905++];else _0x3f2aef+=_0x47a154[_0x4a9905++];}if(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)])_0x4a9905++;_0x165fd3['push'](_0x3f2aef);continue;}let _0x3ebdf2='';while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]&&_0x47a154[_0x4a9905]!=='\x20'&&_0x47a154[_0x4a9905]!=='\x09'&&_0x47a154[_0x4a9905]!=='{'&&_0x47a154[_0x4a9905]!=='['){_0x3ebdf2+=_0x47a154[_0x4a9905++];}if(_0x3ebdf2)_0x165fd3['push'](_0x3ebdf2);}return _0x165fd3;}function _0x4b9b48(_0x1c9844,_0x2e857f){const _0x1c1bbc=_0x270959,_0x1be30e=[..._0x1c9844['_envs']['keys']()]['filter'](_0x123892=>!_0x123892[_0x1c1bbc(0x72d)]('~'));console[_0x1c1bbc(0x547)](['',_0x4e3371(_0x17f52b['bold']+_0x17f52b['cyan'],_0x1c1bbc(0x2b4)),_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)]+_0x17f52b[_0x1c1bbc(0x462)],_0x1c1bbc(0x188))+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x50e))+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)]+_0x17f52b[_0x1c1bbc(0x462)],'║'),_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)]+_0x17f52b[_0x1c1bbc(0x462)],_0x1c1bbc(0x265)),'','\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],'server')+'\x20\x20http://localhost:'+_0x2e857f['port'],..._0x2e857f[_0x1c1bbc(0x619)]>0x1?['\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x543))+'\x20'+_0x2e857f[_0x1c1bbc(0x619)]+_0x1c1bbc(0x334)+_0x4e3371(_0x17f52b[_0x1c1bbc(0x266)],'(primary\x20=\x20processor)')]:[],'\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],'api')+_0x1c1bbc(0x291)+_0x2e857f[_0x1c1bbc(0x3a7)]+'/api','\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x504))+_0x1c1bbc(0x1d1)+_0x2e857f[_0x1c1bbc(0x3d8)],'\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],'id')+_0x1c1bbc(0x564)+_0x4e3371(_0x17f52b[_0x1c1bbc(0x266)],_0x1c9844['id']),'\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x71b))+_0x1c1bbc(0x1d1)+_0x1be30e[_0x1c1bbc(0x2cc)](_0x212abf=>_0x4e3371(_0x17f52b[_0x1c1bbc(0x462)],_0x212abf))[_0x1c1bbc(0x2b6)]('\x20\x20'),..._0x2e857f['noAdmin']?[]:['\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x731))+_0x1c1bbc(0x5c9)+_0x2e857f['port']+_0x1c1bbc(0x4b6)],'',_0x4e3371(_0x17f52b[_0x1c1bbc(0x60c)],'\x20\x20Type\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x1ce))+_0x1c1bbc(0x1a5)+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x3af))+'\x20to\x20browse\x20the\x20API,\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x592))+'\x20to\x20quit.'),''][_0x1c1bbc(0x2b6)]('\x0a'));}function _0x1f59e0(_0x3daf8a){const _0x27acdf=_0x270959;console[_0x27acdf(0x547)]('\x0a'+_0x4e3371(_0x17f52b[_0x27acdf(0x732)],_0x27acdf(0x5fb))+'\x20\x20'+_0x4e3371(_0x17f52b['dim'],_0x27acdf(0x2a0))+_0x27acdf(0x2e2)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x551))+_0x27acdf(0x4b9)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x551))+'\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x19d)],_0x27acdf(0x301))+_0x27acdf(0x3a0)+_0x4e3371(_0x17f52b['cyan'],'VERB')+'\x20'+_0x4e3371(_0x17f52b['cyan'],_0x27acdf(0x551))+'\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x19d)],_0x27acdf(0x34e))+_0x27acdf(0x208)+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],'Examples')+'\x0a\x20\x20\x20\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x380))+_0x27acdf(0x195)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],'envs')+_0x27acdf(0x31a)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x2bd))+_0x27acdf(0x28c)+_0x3daf8a[_0x27acdf(0x1a1)]+_0x27acdf(0x7ae)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],'type/users')+_0x27acdf(0x5f6)+_0x3daf8a['env']+_0x27acdf(0x458)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x627))+_0x27acdf(0x42c)+_0x3daf8a[_0x27acdf(0x1a1)]+_0x27acdf(0x704)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x1b4))+_0x27acdf(0x46d)+_0x3daf8a[_0x27acdf(0x1a1)]+_0x27acdf(0x76f)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x401))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x77b))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x796))+_0x27acdf(0x34f)+_0x4e3371(_0x17f52b['bold'],_0x27acdf(0x320))+'\x20\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],_0x27acdf(0x2b2))+_0x27acdf(0x2e2)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x679))+_0x27acdf(0x718)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x43c))+_0x27acdf(0x230)+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],_0x27acdf(0x52e))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x3e8))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],'type/users/item/alice\x20--env\x20staging')+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b['gray'],_0x27acdf(0x290))+'\x0a\x0a'+_0x4e3371(_0x17f52b[_0x27acdf(0x732)],_0x27acdf(0x32b))+_0x27acdf(0x2e2)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x369))+_0x27acdf(0x771)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x1a1))+_0x27acdf(0x4f3)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x3af))+'\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],_0x27acdf(0x760))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x4e3371(_0x17f52b['cyan'],_0x27acdf(0x7a6))+'\x20'+_0x4e3371(_0x17f52b['dim'],_0x27acdf(0x47f))+_0x27acdf(0x70b)+_0x4e3371(_0x17f52b['cyan'],_0x27acdf(0x6ef))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x1ce))+_0x27acdf(0x754)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x592))+'\x20'+_0x4e3371(_0x17f52b['dim'],_0x27acdf(0x311))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x42f182=![];async function _0x223e2f(_0xa9ee25,_0x40c946=0x0,_0x4ace98=null){const _0xeee120=_0x270959;_0x42f182&&(process[_0xeee120(0x391)][_0xeee120(0x4f7)](_0x4e3371(_0x17f52b['red'],_0xeee120(0x54d))),process['exit'](0x82));_0x42f182=!![],process[_0xeee120(0x5c6)][_0xeee120(0x4f7)]('\x0a'),process['stderr']['write'](_0x4e3371(_0x17f52b[_0xeee120(0x19d)],_0xeee120(0x28f)+(_0x4ace98?_0xeee120(0x1a8)+_0x4ace98+',\x20':'')+_0xeee120(0x666)));const _0x20cd9b=setTimeout(()=>{const _0x599da0=_0xeee120;process[_0x599da0(0x391)]['write'](_0x4e3371(_0x17f52b[_0x599da0(0x67b)],_0x599da0(0x32d))),process['exit'](0x1);},0x1388);try{await _0xa9ee25[_0xeee120(0x5e4)]();}catch(_0xc5dc8b){console[_0xeee120(0x3ba)](_0x4e3371(_0x17f52b[_0xeee120(0x67b)],'\x20\x20'+_0xc5dc8b[_0xeee120(0x246)]));}clearTimeout(_0x20cd9b),process[_0xeee120(0x391)]['write'](_0x4e3371(_0x17f52b[_0xeee120(0x60c)],_0xeee120(0x3fd))),process[_0xeee120(0x592)](_0x40c946);}function _0x11c628(_0x360d97){const _0x388922=_0x270959,_0x3d061b=_0x360d97[_0x388922(0x1a1)]!==_0x388922(0x45b)?_0x4e3371(_0x17f52b[_0x388922(0x19d)],'['+_0x360d97[_0x388922(0x1a1)]+']'):'';return _0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x388922(0x462)],'okdb')+_0x3d061b+_0x4e3371(_0x17f52b[_0x388922(0x266)],'>\x20');}const _0x49ed40=new Set(['GET',_0x270959(0x1cd),_0x270959(0x1ba),_0x270959(0x6d4),_0x270959(0x6e9)]);async function _0x1fe650(_0x22cfc2,_0x4b4d1c,_0x3ffef2,_0x52780c,_0x510a22,_0x223d25){const _0x462b09=_0x270959;_0x22cfc2=_0x22cfc2[_0x462b09(0x29c)]();if(!_0x22cfc2||_0x22cfc2[_0x462b09(0x72d)]('#'))return;const _0x4faa54=_0xcec720(_0x22cfc2),{flags:_0xb10630,rest:_0x2ead0d}=_0x45829d(_0x4faa54);if(!_0x2ead0d['length'])return;const _0x46a336=_0x2ead0d[0x0],_0x25baf1=_0x46a336['toUpperCase']();if(_0x25baf1===_0x462b09(0x448)){if(_0x2ead0d[0x1])_0x27259f(_0x4b4d1c,_0x20051a(_0x2ead0d[0x1],_0xb10630[_0x462b09(0x1a1)]??_0x510a22[_0x462b09(0x1a1)]));else _0x1f59e0(_0x510a22);return;}if(_0x25baf1===_0x462b09(0x23e)){const _0x37abbb=_0x2ead0d[0x1];if(!_0x37abbb){console[_0x462b09(0x547)](_0x4e3371(_0x17f52b['red'],_0x462b09(0x6cf)));return;}try{_0x4b4d1c['env'](_0x37abbb),_0x510a22['env']=_0x37abbb,_0x223d25?.['setPrompt'](_0x11c628(_0x510a22)),console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+'\x20active\x20env:\x20'+_0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x462b09(0x462)],_0x37abbb)+'\x0a');}catch{console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x67b)],'✗')+_0x462b09(0x698)+_0x4e3371(_0x17f52b['bold'],_0x37abbb)+_0x462b09(0x333)+_0x4e3371(_0x17f52b['dim'],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x25baf1===_0x462b09(0x18d)){const _0x3817bc=[..._0x4b4d1c[_0x462b09(0x221)][_0x462b09(0x35c)]()]['filter'](_0x2025d8=>!_0x2025d8[_0x462b09(0x72d)]('~'));console['log']('');for(const _0x279cc5 of _0x3817bc){const _0x5cafff=_0x279cc5===_0x510a22['env'];console[_0x462b09(0x547)]('\x20\x20'+(_0x5cafff?_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'●'):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],'○'))+'\x20\x20'+(_0x5cafff?_0x4e3371(_0x17f52b[_0x462b09(0x732)]+_0x17f52b[_0x462b09(0x462)],_0x279cc5):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x279cc5)));}console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b['dim'],_0x462b09(0x55b))+'\x20'+_0x4e3371(_0x17f52b[_0x462b09(0x462)],_0x510a22['env'])),console[_0x462b09(0x547)]('');return;}if(_0x25baf1===_0x462b09(0x3c2)){const _0x47e08f=[..._0x4b4d1c[_0x462b09(0x221)][_0x462b09(0x637)]()][_0x462b09(0x3fb)](_0x4d364f=>!_0x4d364f['name']['startsWith']('~'));console[_0x462b09(0x547)]('');const _0x479f5c=Math[_0x462b09(0x46c)](..._0x47e08f['map'](_0x1ac397=>_0x1ac397[_0x462b09(0x60a)]['length']));for(const _0x5367ef of _0x47e08f){const _0x4629ec=_0x5367ef[_0x462b09(0x60a)]===_0x510a22['env'],_0xda35f0=_0x4629ec?_0x4e3371(_0x17f52b['green'],'●'):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],'○'),_0xdc7684=_0x4629ec?_0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x462b09(0x462)],_0x5367ef[_0x462b09(0x60a)]['padEnd'](_0x479f5c)):_0x4e3371(_0x17f52b['dim'],_0x5367ef[_0x462b09(0x60a)][_0x462b09(0x48a)](_0x479f5c)),_0x103266=[..._0x5367ef[_0x462b09(0x799)][_0x462b09(0x35c)]()][_0x462b09(0x3fb)](_0x4208a3=>!_0x4208a3['startsWith']('~')),_0x2e3046=_0x103266['length']?_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x103266[_0x462b09(0x7a7)](0x0,0x5)[_0x462b09(0x2b6)](',\x20')+(_0x103266['length']>0x5?_0x462b09(0x58d)+(_0x103266[_0x462b09(0x1b1)]-0x5)+_0x462b09(0x5c2):'')):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x462b09(0x3d5));console[_0x462b09(0x547)]('\x20\x20'+_0xda35f0+'\x20\x20'+_0xdc7684+'\x20\x20'+_0x2e3046);}console[_0x462b09(0x547)]('');return;}if(_0x25baf1==='TYPES'){const _0x398a09=_0xb10630[_0x462b09(0x1a1)]??_0x2ead0d[0x1]??_0x510a22[_0x462b09(0x1a1)];try{const _0x3e809d=_0x4b4d1c[_0x462b09(0x1a1)](_0x398a09),_0x286b15=[..._0x3e809d[_0x462b09(0x799)][_0x462b09(0x35c)]()][_0x462b09(0x3fb)](_0x37d4dc=>!_0x37d4dc['startsWith']('~'))[_0x462b09(0x4ba)]();console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x286b15[_0x462b09(0x1b1)]+_0x462b09(0x5ba)+(_0x286b15[_0x462b09(0x1b1)]!==0x1?'s':'')+'\x20in\x20'+_0x398a09));for(const _0x3393db of _0x286b15){const _0x251374=_0x3e809d[_0x462b09(0x799)][_0x462b09(0x5e0)](_0x3393db),_0xa59ffe=_0x251374?.['data']?.[_0x462b09(0x359)]?.()??0x0,_0x26f869=_0x4e3371(_0x17f52b[_0x462b09(0x732)]+_0x17f52b[_0x462b09(0x462)],_0x3393db['padEnd'](0x1c));console[_0x462b09(0x547)](_0x462b09(0x1d1)+_0x26f869+'\x20\x20'+_0x4e3371(_0x17f52b['magenta'],String(_0xa59ffe)[_0x462b09(0x1d0)](0x6))+'\x20'+_0x4e3371(_0x17f52b['dim'],_0x462b09(0x4a2)));}console[_0x462b09(0x547)]('');}catch(_0x273d33){console['error'](_0x4e3371(_0x17f52b[_0x462b09(0x67b)],_0x462b09(0x7ad)+_0x273d33['message']+'\x0a'));}return;}if(_0x25baf1==='ROUTES'){_0x5b0abc(_0x4b4d1c,_0x2ead0d[_0x462b09(0x7a7)](0x1)[_0x462b09(0x2b6)]('\x20'));return;}if(_0x25baf1===_0x462b09(0x3e1)){const _0x122d1e=(_0x2ead0d[0x1]??'')[_0x462b09(0x2be)]();if(!_0x122d1e||_0x122d1e==='on')_0x52780c[_0x462b09(0x344)]=!![],_0x52780c[_0x462b09(0x407)]='info',console['log'](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+'\x20logs\x20on\x20\x20'+_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x462b09(0x282))+'\x0a');else{if(_0x122d1e==='off')_0x52780c[_0x462b09(0x344)]=![],console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x19d)],'○')+_0x462b09(0x73d));else _0x4824f9[_0x122d1e]!==undefined?(_0x52780c[_0x462b09(0x344)]=!![],_0x52780c[_0x462b09(0x407)]=_0x122d1e,console['log'](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+_0x462b09(0x1a7)+_0x4e3371(_0x17f52b[_0x462b09(0x732)],_0x122d1e)+'\x0a')):console[_0x462b09(0x3ba)](_0x4e3371(_0x17f52b[_0x462b09(0x67b)],_0x462b09(0x538)));}return;}if(_0x25baf1===_0x462b09(0x51b)||_0x25baf1==='QUIT'){await _0x223e2f(_0x4b4d1c,0x0);return;}if(_0x25baf1===_0x462b09(0x521)){const _0x28dfee=_0x462b09(0x193)+_0x3ffef2[_0x462b09(0x3a7)]+_0x462b09(0x4b6),_0x44001d=process['platform']==='win32'?_0x462b09(0x318)+_0x28dfee:process[_0x462b09(0x3be)]===_0x462b09(0x763)?'open\x20'+_0x28dfee:_0x462b09(0x27d)+_0x28dfee;require$$4['exec'](_0x44001d),console[_0x462b09(0x547)]('\x0a\x20\x20'+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+_0x462b09(0x5dc)+_0x4e3371(_0x17f52b[_0x462b09(0x462)],_0x28dfee)+'\x0a');return;}let _0x51a1ec,_0x2d40f6,_0x452ba2;if(_0x49ed40[_0x462b09(0x4e7)](_0x25baf1)){_0x51a1ec=_0x25baf1,_0x2d40f6=_0x2ead0d[0x1],_0x452ba2=_0x2ead0d[_0x462b09(0x7a7)](0x2);if(!_0x2d40f6){console['error'](_0x4e3371(_0x17f52b['red'],_0x462b09(0x3a4)+_0x46a336+_0x462b09(0x191)));return;}}else _0x51a1ec=null,_0x2d40f6=_0x2ead0d[0x0],_0x452ba2=_0x2ead0d[_0x462b09(0x7a7)](0x1);const _0x52dbce=_0xb10630[_0x462b09(0x1a1)]??_0x510a22[_0x462b09(0x1a1)],_0x3ed7e4=_0x20051a(_0x2d40f6,_0x52dbce);if(_0xb10630[_0x462b09(0x1ce)]){_0x27259f(_0x4b4d1c,_0x3ed7e4);return;}let _0x25637e=null;if(_0x452ba2[_0x462b09(0x1b1)]){const _0x14795f=_0x452ba2[_0x462b09(0x2b6)]('\x20');try{_0x25637e=_0x319d99(_0x14795f);}catch(_0x38068d){console[_0x462b09(0x3ba)](_0x4e3371(_0x17f52b[_0x462b09(0x67b)],_0x462b09(0x492)+_0x14795f+_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x38068d[_0x462b09(0x246)])+'\x0a'));return;}}if(!_0x51a1ec)_0x51a1ec=_0x25637e!==null?_0x462b09(0x1cd):_0x462b09(0x523);try{const _0x197c1a=await _0x37bd43(_0x4b4d1c,_0x51a1ec,_0x3ed7e4,_0x25637e);_0x3a7bf0(_0x197c1a['status'],_0x197c1a[_0x462b09(0x6bd)]);}catch(_0x3da489){console[_0x462b09(0x3ba)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x67b)],'✗')+'\x20'+_0x3da489[_0x462b09(0x246)]+'\x0a');}}class _0x42255d{constructor(){const _0x45a49a=_0x270959;this['children']=new Map(),this[_0x45a49a(0x4f5)]=null,this[_0x45a49a(0x47c)]=![];}}function _0x48e461(_0x1371b6){const _0x588edb=_0x270959,_0x16980e=new _0x42255d();for(const _0x455786 of _0x1371b6){if(_0x455786[_0x588edb(0x2e5)]?.[_0x588edb(0x24f)])continue;const _0x1e3c5e=_0x455786[_0x588edb(0x504)][_0x588edb(0x1f7)](/^\/api/,'')[_0x588edb(0x1f7)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x588edb(0x1f7)](/^\//,'');if(!_0x1e3c5e)continue;let _0x5e4c07=_0x16980e;for(const _0x429cdb of _0x1e3c5e['split']('/')['filter'](Boolean)){if(_0x429cdb[_0x588edb(0x72d)](':')){const _0x8d7b6d=_0x429cdb['slice'](0x1);if(!_0x5e4c07[_0x588edb(0x4f5)])_0x5e4c07['dynamic']={'param':_0x8d7b6d,'node':new _0x42255d()};_0x5e4c07=_0x5e4c07['dynamic'][_0x588edb(0x4b5)];}else{if(!_0x5e4c07[_0x588edb(0x6d2)][_0x588edb(0x4e7)](_0x429cdb))_0x5e4c07[_0x588edb(0x6d2)][_0x588edb(0x238)](_0x429cdb,new _0x42255d());_0x5e4c07=_0x5e4c07[_0x588edb(0x6d2)][_0x588edb(0x5e0)](_0x429cdb);}}_0x5e4c07['terminal']=!![];}return _0x16980e;}const _0xe980cd=new Map();function _0x5c0f57(_0x4e4c77,_0x209093,_0x3df441){const _0x5a2581=_0x270959,_0x80639c=_0xe980cd['get'](_0x4e4c77);if(_0x80639c&&_0x80639c['exp']>Date[_0x5a2581(0x6a7)]())return _0x80639c[_0x5a2581(0x6af)];const _0x454154=_0x3df441();return _0xe980cd['set'](_0x4e4c77,{'val':_0x454154,'exp':Date[_0x5a2581(0x6a7)]()+_0x209093}),_0x454154;}function _0x536d49(_0x1bc67a,_0x5c037e,_0x3284d0,_0x58e372){const _0xdecaa2=_0x270959,_0x104d2e=_0x5c037e['env']??_0x58e372[_0xdecaa2(0x1a1)];switch(_0x1bc67a){case'env':return[..._0x3284d0['_envs'][_0xdecaa2(0x35c)]()][_0xdecaa2(0x3fb)](_0x3f0154=>!_0x3f0154[_0xdecaa2(0x72d)]('~'));case _0xdecaa2(0x737):return _0x5c0f57('types:'+_0x104d2e,0x7d0,()=>{const _0xb0e76a=_0xdecaa2;try{return[..._0x3284d0[_0xb0e76a(0x1a1)](_0x104d2e)[_0xb0e76a(0x799)][_0xb0e76a(0x35c)]()][_0xb0e76a(0x3fb)](_0x579296=>!_0x579296[_0xb0e76a(0x72d)]('~'));}catch{return[];}});case'key':if(!_0x5c037e[_0xdecaa2(0x737)])return[];return _0x5c0f57(_0xdecaa2(0x522)+_0x104d2e+':'+_0x5c037e['type'],0x5dc,()=>{const _0x367c05=_0xdecaa2;try{const _0x289138=_0x3284d0['env'](_0x104d2e)[_0x367c05(0x799)][_0x367c05(0x5e0)](_0x5c037e['type']);if(!_0x289138?.[_0x367c05(0x268)])return[];const _0x53feec=[];for(const {key:_0x4a7997}of _0x289138['data'][_0x367c05(0x433)]({'limit':0x32})){_0x53feec['push'](String(_0x4a7997));if(_0x53feec['length']>=0x32)break;}return _0x53feec;}catch{return[];}});case _0xdecaa2(0x332):if(!_0x5c037e[_0xdecaa2(0x737)])return[];return _0x5c0f57(_0xdecaa2(0x610)+_0x104d2e+':'+_0x5c037e['type'],0x7d0,()=>{const _0x179611=_0xdecaa2;try{const _0x3e42ab=_0x3284d0[_0x179611(0x1a1)](_0x104d2e)['typeSubDbs'][_0x179611(0x5e0)](_0x5c037e[_0x179611(0x737)]);return _0x3e42ab?[..._0x3e42ab[_0x179611(0x1e8)]?.['keys']()??[]]:[];}catch{return[];}});case _0xdecaa2(0x602):if(!_0x5c037e[_0xdecaa2(0x737)])return[];return _0x5c0f57(_0xdecaa2(0x1f6)+_0x104d2e+':'+_0x5c037e[_0xdecaa2(0x737)],0x7d0,()=>{const _0x1ad923=_0xdecaa2;try{return _0x3284d0[_0x1ad923(0x37a)]?.['list']?.(_0x5c037e[_0x1ad923(0x737)],_0x3284d0[_0x1ad923(0x1a1)](_0x104d2e))?.[_0x1ad923(0x2cc)](_0x132025=>_0x132025[_0x1ad923(0x60a)])??[];}catch{return[];}});default:return[];}}function _0x163023(_0x50a9ef,_0x10446c,_0x30bedd,_0x268c99){const _0x5d7c0c=_0x270959,_0x1e613d=_0x50a9ef['endsWith']('/'),_0x18cd5d=_0x50a9ef[_0x5d7c0c(0x5ed)]('/'),_0x2d6352=_0x1e613d?_0x18cd5d[_0x5d7c0c(0x7a7)](0x0,-0x1):_0x18cd5d[_0x5d7c0c(0x7a7)](0x0,-0x1),_0x44cc3c=_0x1e613d?'':_0x18cd5d[_0x18cd5d[_0x5d7c0c(0x1b1)]-0x1];let _0x1960b5=_0x10446c;const _0x3d3ae2={};for(const _0x551721 of _0x2d6352){if(!_0x551721)continue;if(_0x1960b5['children']['has'](_0x551721))_0x1960b5=_0x1960b5[_0x5d7c0c(0x6d2)][_0x5d7c0c(0x5e0)](_0x551721);else{if(_0x1960b5[_0x5d7c0c(0x4f5)])_0x3d3ae2[_0x1960b5[_0x5d7c0c(0x4f5)][_0x5d7c0c(0x544)]]=_0x551721,_0x1960b5=_0x1960b5[_0x5d7c0c(0x4f5)]['node'];else return[];}}const _0x4d8475=_0x2d6352[_0x5d7c0c(0x3fb)](Boolean),_0x146cd3=_0x4d8475['length']?_0x4d8475[_0x5d7c0c(0x2b6)]('/')+'/':'',_0x5b5431=[];for(const [_0x302c88]of _0x1960b5[_0x5d7c0c(0x6d2)]){if(_0x302c88[_0x5d7c0c(0x72d)](_0x44cc3c))_0x5b5431[_0x5d7c0c(0x494)](_0x146cd3+_0x302c88);}if(_0x1960b5[_0x5d7c0c(0x4f5)])for(const _0x285899 of _0x536d49(_0x1960b5[_0x5d7c0c(0x4f5)]['param'],_0x3d3ae2,_0x30bedd,_0x268c99)){if(String(_0x285899)['startsWith'](_0x44cc3c))_0x5b5431[_0x5d7c0c(0x494)](_0x146cd3+_0x285899);}return _0x5b5431['slice'](0x0,0x64);}const _0x2b2532=[_0x270959(0x1ce),_0x270959(0x34c),'env',_0x270959(0x71b),'types','routes',_0x270959(0x7a6),_0x270959(0x6ef),_0x270959(0x592),_0x270959(0x69d)];function _0x4a122c(_0x3a106b,_0x56af88,_0x3678cb){return function _0x3b8c07(_0x515d97){const _0x336180=_0x5511;try{const _0xc5fe2c=_0x515d97[_0x336180(0x427)](/\s[{[]/),_0xf0d97d=_0xc5fe2c>=0x0?_0x515d97[_0x336180(0x7a7)](0x0,_0xc5fe2c):_0x515d97,_0x4386cd=_0xf0d97d['trimStart']();if(!_0x4386cd){const _0x5b1b95=[..._0x2b2532,...[..._0x3a106b[_0x336180(0x6d2)][_0x336180(0x35c)]()]][_0x336180(0x7a7)](0x0,0x64);return[_0x5b1b95,''];}const _0x543669=_0x4386cd[_0x336180(0x5ed)](/\s+/),_0x46153a=_0x543669[0x0],_0x2ede29=_0x46153a[_0x336180(0x26a)]();if(_0x543669[_0x336180(0x1b1)]===0x1){const _0x2e73af=_0x46153a[_0x336180(0x2be)](),_0x13cfe1=_0x2b2532[_0x336180(0x3fb)](_0xeb5bb5=>_0xeb5bb5[_0x336180(0x72d)](_0x2e73af)),_0x2b25e8=_0x163023(_0x46153a,_0x3a106b,_0x56af88,_0x3678cb),_0x5e4998=[...new Set([..._0x13cfe1,..._0x2b25e8])]['slice'](0x0,0x64);return[_0x5e4998,_0x46153a];}if(_0x49ed40['has'](_0x2ede29)&&_0x543669[_0x336180(0x1b1)]===0x2){const _0x4dfe80=_0x543669[0x1],_0x15d353=_0x163023(_0x4dfe80,_0x3a106b,_0x56af88,_0x3678cb);return[_0x15d353['map'](_0x108ea3=>_0x46153a+'\x20'+_0x108ea3),_0x46153a+'\x20'+_0x4dfe80];}if(!_0x49ed40[_0x336180(0x4e7)](_0x2ede29)&&_0x543669[_0x336180(0x1b1)]>0x1){const _0x23ffe7=_0x163023(_0x46153a,_0x3a106b,_0x56af88,_0x3678cb),_0x2ca0a0='\x20'+_0x543669['slice'](0x1)[_0x336180(0x2b6)]('\x20');return[_0x23ffe7[_0x336180(0x2cc)](_0x3806b4=>_0x3806b4+_0x2ca0a0),_0x46153a+_0x2ca0a0];}return[[],_0x515d97];}catch{return[[],_0x515d97];}};}async function _0x3ca1f4(_0x55f258,_0x54f880){const _0xa65b3d=_0x270959,_0x57d511={'enabled':!![],'level':_0x54f880[_0xa65b3d(0x3a2)]??_0xa65b3d(0x380)},_0x3627d1={'env':_0xa65b3d(0x45b)},_0x4fdb00={'current':null},_0x5e7e94=_0x48e461(_0x55f258['http'][_0xa65b3d(0x33c)]()),_0x255774=_0x4a122c(_0x5e7e94,_0x55f258,_0x3627d1);_0x55f258[_0xa65b3d(0x547)][_0xa65b3d(0x714)](_0x24163e=>{const _0x5e31e3=_0xa65b3d;if(!_0x57d511[_0x5e31e3(0x344)])return;_0x449a03(_0x24163e,_0x57d511[_0x5e31e3(0x407)]),_0x4fdb00[_0x5e31e3(0x534)]?.[_0x5e31e3(0x660)](!![]);}),_0x4b9b48(_0x55f258,_0x54f880);const _0x2d5461=_0x16ad62[_0xa65b3d(0x3d0)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x255774,'prompt':_0x11c628(_0x3627d1),'historySize':_0xabdfa6});try{const _0x228f16=_0x1c9c99[_0xa65b3d(0x6ba)](_0x1f5b2f,'utf8')[_0xa65b3d(0x5ed)]('\x0a')['filter'](Boolean);_0x2d5461['history']=_0x228f16[_0xa65b3d(0x605)]()['slice'](0x0,_0xabdfa6);}catch{}_0x4fdb00[_0xa65b3d(0x534)]=_0x2d5461,_0x2d5461['on'](_0xa65b3d(0x21d),async _0x2d5dff=>{const _0x75a7e0=_0xa65b3d;_0x2d5461[_0x75a7e0(0x795)]();try{await _0x1fe650(_0x2d5dff,_0x55f258,_0x54f880,_0x57d511,_0x3627d1,_0x2d5461);}catch(_0x45f2de){console['error'](_0x4e3371(_0x17f52b[_0x75a7e0(0x67b)],_0x75a7e0(0x511)+_0x45f2de['message']));}finally{_0x2d5461[_0x75a7e0(0x39b)](),_0x2d5461[_0x75a7e0(0x660)]();}}),_0x2d5461['on']('close',()=>{const _0x56c935=_0xa65b3d;try{const _0x26f041=[..._0x2d5461[_0x56c935(0x1f1)]][_0x56c935(0x605)]()[_0x56c935(0x3fb)](Boolean)['slice'](0x0,_0xabdfa6);_0x1c9c99[_0x56c935(0x639)](_0x1f5b2f,_0x26f041['join']('\x0a')+'\x0a');}catch{}_0x223e2f(_0x55f258,0x0);});let _0x328a79=0x0;return process['on']('SIGINT',()=>{const _0x596bda=_0xa65b3d;if(_0x42f182)return _0x223e2f(_0x55f258,0x82,_0x596bda(0x66a));if(_0x2d5461[_0x596bda(0x21d)]==='')return _0x223e2f(_0x55f258,0x0,_0x596bda(0x66a));const _0x45d57c=Date[_0x596bda(0x6a7)]();if(_0x45d57c-_0x328a79<0x5dc)return _0x223e2f(_0x55f258,0x0,_0x596bda(0x715));_0x328a79=_0x45d57c,process[_0x596bda(0x5c6)][_0x596bda(0x4f7)]('\x0a'),_0x2d5461['clearLine'](0x0),_0x2d5461[_0x596bda(0x660)](),process[_0x596bda(0x391)][_0x596bda(0x4f7)](_0x4e3371(_0x17f52b[_0x596bda(0x60c)],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0xa65b3d(0x2bc),()=>_0x223e2f(_0x55f258,0x0,_0xa65b3d(0x2bc))),process['on']('SIGBREAK',()=>_0x223e2f(_0x55f258,0x0,_0xa65b3d(0x44c))),_0x2d5461[_0xa65b3d(0x660)](),_0x2d5461;}return okdbShell={'start':_0x3ca1f4,'colorLog':_0x449a03,'lenientParse':_0x319d99,'_splitLine':_0xcec720,'_formatRouteHelpLines':_0x598304,'_routeSummary':_0x3d7911,'_routeTags':_0x84b1d6},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x402c6a=_0x5411c3;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5a350c,performance:_0x56cf54}=require$$0$3,_0x30cef4=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x402c6a(0x434),_0xb99ba6=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3ac0dc=process.env.OKDB_LOOP_LAG_ALL==='1',_0xffefe3=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4e9be4{constructor(){const _0x16e938=_0x402c6a;this[_0x16e938(0x344)]=_0x30cef4,this[_0x16e938(0x510)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x16e938(0x44a)]=![],this[_0x16e938(0x35d)]=(_0xc61a40,_0x3091e9)=>process[_0x16e938(0x391)][_0x16e938(0x4f7)](_0xc61a40+(_0x3091e9?'\x20'+JSON[_0x16e938(0x540)](_0x3091e9):'')+'\x0a');}[_0x402c6a(0x6a7)](){const _0x512017=_0x402c6a;return _0x56cf54[_0x512017(0x6a7)]();}[_0x402c6a(0x32a)](_0x46352c){const _0x58226d=_0x402c6a;if(typeof _0x46352c==='function')this[_0x58226d(0x35d)]=_0x46352c;}['note'](_0xced00d,_0x2b90ea,_0x3f881e){const _0x4d9f1e=_0x402c6a;if(!this['enabled'])return;let _0x3d8700=this[_0x4d9f1e(0x510)]['get'](_0xced00d);!_0x3d8700&&(_0x3d8700={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4d9f1e(0x510)][_0x4d9f1e(0x238)](_0xced00d,_0x3d8700)),_0x3d8700['ms']+=_0x2b90ea,_0x3d8700[_0x4d9f1e(0x1df)]+=0x1,_0x2b90ea>_0x3d8700['maxMs']&&(_0x3d8700[_0x4d9f1e(0x740)]=_0x2b90ea,_0x3d8700[_0x4d9f1e(0x618)]=_0x3f881e||'');}['start'](_0x23091a){const _0x49eb72=_0x402c6a;if(!this['enabled']||this[_0x49eb72(0x44a)])return;this[_0x49eb72(0x44a)]=!![];if(_0x23091a)this[_0x49eb72(0x35d)]=_0x23091a;this['_h']=_0x5a350c({'resolution':0xa}),this['_h'][_0x49eb72(0x47e)](),this[_0x49eb72(0x74a)]=setInterval(()=>this['_report'](),_0xb99ba6);if(this[_0x49eb72(0x74a)][_0x49eb72(0x6d1)])this[_0x49eb72(0x74a)][_0x49eb72(0x6d1)]();}[_0x402c6a(0x2dc)](_0x1f68cf){const _0x39904=_0x402c6a;if(!this[_0x39904(0x3ad)])this[_0x39904(0x3ad)]=new Set();this[_0x39904(0x3ad)]['add'](_0x1f68cf);if(!this['_started'])this[_0x39904(0x38c)]();}[_0x402c6a(0x445)](_0x56f58f){const _0x2b6cd9=_0x402c6a;this[_0x2b6cd9(0x3ad)]?.[_0x2b6cd9(0x614)](_0x56f58f);}[_0x402c6a(0x38c)](){const _0x1f7183=_0x402c6a;if(this[_0x1f7183(0x5d9)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x5a350c({'resolution':0xa}),this['_h'][_0x1f7183(0x47e)]());const _0x1e1e83=_0xb99ba6;this[_0x1f7183(0x580)]=setInterval(()=>{const _0x13d70a=_0x1f7183,_0x40e023=this['_h'];if(!_0x40e023)return;const _0x33862b=_0x40e023['percentile'](0x63)/0xf4240,_0x592d95=_0x40e023[_0x13d70a(0x46c)]/0xf4240,_0x42ab45=_0x40e023[_0x13d70a(0x6e1)]/0xf4240;_0x40e023[_0x13d70a(0x21f)]();if(this[_0x13d70a(0x3ad)])for(const _0x2430fa of this[_0x13d70a(0x3ad)]){try{_0x2430fa({'p99Ms':_0x33862b,'maxMs':_0x592d95,'meanMs':_0x42ab45,'reportMs':_0x1e1e83});}catch{}}},_0x1e1e83);if(this[_0x1f7183(0x580)][_0x1f7183(0x6d1)])this[_0x1f7183(0x580)][_0x1f7183(0x6d1)]();}[_0x402c6a(0x724)](){const _0x2dad8d=_0x402c6a,_0x479b88=this['_h'],_0x87c94e=_0x479b88[_0x2dad8d(0x46c)]/0xf4240,_0x53b8b9=_0x479b88[_0x2dad8d(0x1ed)](0x63)/0xf4240,_0x32571c=_0x479b88['mean']/0xf4240;_0x479b88[_0x2dad8d(0x21f)]();const _0x315052=[...this[_0x2dad8d(0x510)][_0x2dad8d(0x352)]()][_0x2dad8d(0x2cc)](([_0x1bf475,_0x5b7ff9])=>({'label':_0x1bf475,..._0x5b7ff9}))['sort']((_0x2f73da,_0x453138)=>_0x453138['ms']-_0x2f73da['ms'])[_0x2dad8d(0x7a7)](0x0,0x8);this[_0x2dad8d(0x510)][_0x2dad8d(0x22f)]();const _0x2f91d8=_0x315052['reduce']((_0x294738,_0x293d15)=>_0x294738+_0x293d15['ms'],0x0),_0x366e46=_0x315052['map'](_0x4bb5ff=>_0x4bb5ff[_0x2dad8d(0x52b)]+'='+_0x4bb5ff['ms'][_0x2dad8d(0x26b)](0x0)+_0x2dad8d(0x4db)+_0x4bb5ff[_0x2dad8d(0x1df)]+(_0x4bb5ff['maxMs']>0x5?_0x2dad8d(0x248)+_0x4bb5ff[_0x2dad8d(0x740)][_0x2dad8d(0x26b)](0x0)+'ms'+(_0x4bb5ff[_0x2dad8d(0x618)]?'\x20'+_0x4bb5ff['maxExtra']:'')+')':''));(_0x3ac0dc||_0x87c94e>=_0xffefe3)&&this['_log'](_0x2dad8d(0x1ca)+_0xb99ba6+_0x2dad8d(0x3d1)+_0x87c94e['toFixed'](0x0)+_0x2dad8d(0x1f5)+_0x53b8b9[_0x2dad8d(0x26b)](0x0)+_0x2dad8d(0x617)+_0x32571c[_0x2dad8d(0x26b)](0x0)+_0x2dad8d(0x520)+_0x2f91d8[_0x2dad8d(0x26b)](0x0)+'ms'+(_0x366e46[_0x2dad8d(0x1b1)]?'\x20│\x20'+_0x366e46['join']('\x20\x20'):''),{'feature':_0x2dad8d(0x41f)});if(this[_0x2dad8d(0x3ad)])for(const _0x121bfb of this[_0x2dad8d(0x3ad)]){try{_0x121bfb({'p99Ms':_0x53b8b9,'maxMs':_0x87c94e,'meanMs':_0x32571c,'reportMs':_0xb99ba6});}catch{}}}[_0x402c6a(0x687)](){const _0x188335=_0x402c6a;if(this[_0x188335(0x74a)])clearInterval(this[_0x188335(0x74a)]);if(this['_h'])this['_h'][_0x188335(0x42a)]();this[_0x188335(0x74a)]=null,this['_h']=null,this['_started']=![];}}const _0x1ce101=new _0x4e9be4();if(_0x1ce101['enabled'])_0x1ce101[_0x402c6a(0x45f)]();return okdbLoopMonitor={'LOOP':_0x1ce101},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x30f8e6=require$$1$1,_0x2bbe77=require$$1;let _0x3fcb87,_0x5de22a,_0xecba8c,_0x434b5b,_0x86dd26,_0x5e3445,_0x23f332,_0x56cb30=![];const _0x304a1a=new Set();let _0x3c5367=null;const _0x3163a1=new Map();function _0x672b50(){const _0x5806b7=_0x5511;if(_0x3fcb87!==undefined)return _0x3fcb87;_0x3fcb87=process.env.OKDB_DIAG==='1';if(!_0x3fcb87)return![];_0x5de22a=process.env.OKDB_DIAG_STACK==='1',_0x434b5b=Math[_0x5806b7(0x46c)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0xecba8c=new Array(_0x434b5b),_0x86dd26=0x0,_0x5e3445=0x0,_0x23f332=process.env.OKDB_DIAG_DIR||null;if(_0x23f332)try{_0x30f8e6[_0x5806b7(0x65b)](_0x23f332,{'recursive':!![]});}catch{}return!![];}function _0x4cb6d4(){return _0x3fcb87===undefined?_0x672b50():_0x3fcb87;}function _0x197896(_0x1ccc39,_0x2ded4b){const _0x2235d3=_0x5511;if(_0x3fcb87===undefined?!_0x672b50():!_0x3fcb87)return;let _0x387e83;if(_0x5de22a){const _0x198255=new Error()[_0x2235d3(0x2ae)]||'';_0x387e83=_0x198255[_0x2235d3(0x5ed)]('\x0a')[_0x2235d3(0x7a7)](0x3)[_0x2235d3(0x2cc)](_0x1a5e81=>_0x1a5e81['trim']())[_0x2235d3(0x3fb)](Boolean)[_0x2235d3(0x7a7)](0x0,0x8);}_0xecba8c[_0x86dd26]={'seq':_0x5e3445++,'t':Date[_0x2235d3(0x6a7)](),'env':_0x1ccc39,'kind':_0x2ded4b||'commit','stack':_0x387e83},_0x86dd26=(_0x86dd26+0x1)%_0x434b5b;}function _0x378d35(_0x4f0cdb){const _0x2599d1=_0x5511,_0x298053=[];for(let _0x119b6c=0x0;_0x119b6c<_0x434b5b;_0x119b6c++){const _0x4a0c09=_0xecba8c[(_0x86dd26-0x1-_0x119b6c+_0x434b5b*0x2)%_0x434b5b];if(!_0x4a0c09)continue;_0x298053[_0x2599d1(0x494)](_0x4a0c09);if(_0x298053[_0x2599d1(0x1b1)]>=_0x4f0cdb)break;}return _0x298053;}function _0x262bfb(_0x4d167c){const _0xaa87b6=_0x5511;try{process[_0xaa87b6(0x391)][_0xaa87b6(0x4f7)](_0x4d167c+'\x0a');}catch{}if(_0x23f332)try{_0x30f8e6[_0xaa87b6(0x654)](_0x2bbe77[_0xaa87b6(0x2b6)](_0x23f332,_0xaa87b6(0x54e)+process[_0xaa87b6(0x690)]+_0xaa87b6(0x532)),_0x4d167c+'\x0a');}catch{}}function _0x126def(_0x4a9139){const _0x5058c1=_0x5511,_0x5a59cd=_0x378d35(_0x4a9139);if(!_0x5a59cd['length'])return _0x5058c1(0x2ff);const _0x424625=Date['now']();return _0x5a59cd['map'](_0x5b35d9=>{const _0x5948da=_0x5058c1,_0x51afae=_0x5948da(0x597)+_0x5b35d9['seq']+'\x20-'+(_0x424625-_0x5b35d9['t'])+_0x5948da(0x3f7)+_0x5b35d9[_0x5948da(0x1a1)]+'\x20'+_0x5b35d9['kind'];return _0x5b35d9['stack']&&_0x5b35d9['stack']['length']?_0x51afae+'\x0a\x20\x20\x20\x20\x20\x20'+_0x5b35d9[_0x5948da(0x2ae)]['join'](_0x5948da(0x584)):_0x51afae;})[_0x5058c1(0x2b6)]('\x0a');}function _0x12a27e(_0x5eaa9f,_0x57830f){const _0x594bde=_0x5511,_0x17013f=_0x594bde(0x75c)+_0x5eaa9f+_0x594bde(0x5d6)+new Date()['toISOString']()+_0x594bde(0x5bd)+process['pid']+_0x594bde(0x24b),_0x37ebc9=[_0x17013f,_0x594bde(0x635)+(_0x57830f&&_0x57830f['stack']?_0x57830f[_0x594bde(0x2ae)][_0x594bde(0x5ed)]('\x0a')[0x0]:_0x57830f),_0x594bde(0x2d7)+(_0x5de22a?'':_0x594bde(0x1dd))+':',_0x126def(0x18),_0x1df4d1(),'='[_0x594bde(0x1f2)](_0x17013f['length']-0x1)];_0x262bfb(_0x37ebc9[_0x594bde(0x2b6)]('\x0a'));}function _0x30b5fd(_0x19d8f2){const _0x3fea34=_0x5511;if(!_0x4cb6d4())return;const _0x3d33ba=String(_0x19d8f2&&_0x19d8f2[_0x3fea34(0x246)]||_0x19d8f2||''),_0x191275=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3fea34(0x279)](_0x3d33ba);_0x12a27e(_0x191275?'ORPHAN\x20(env-closed\x20write)':_0x3fea34(0x6ff),_0x19d8f2);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x191275)return;try{console[_0x3fea34(0x3ba)](_0x19d8f2&&_0x19d8f2[_0x3fea34(0x2ae)]?_0x19d8f2[_0x3fea34(0x2ae)]:_0x19d8f2);}catch{}process['exit'](0x1);}function _0xdc4872(_0x116805){const _0x3a4664=_0x5511;if(!_0x4cb6d4())return;const _0x1ecd2d=String(_0x116805&&_0x116805[_0x3a4664(0x246)]||_0x116805||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3a4664(0x279)](_0x1ecd2d)&&_0x12a27e(_0x3a4664(0x3ca),_0x116805);}function _0x1df4d1(){const _0xaa9377=_0x5511,_0x2d4c5f=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x26ec77=![];for(const _0x55a634 of _0x304a1a){const _0x2c7fc9=_0x55a634&&_0x55a634['_envs'];if(!_0x2c7fc9)continue;for(const [_0x58f248,_0x40be70]of _0x2c7fc9){const _0x37abb0=_0x40be70&&_0x40be70[_0xaa9377(0x2d9)]&&_0x40be70[_0xaa9377(0x2d9)]['view'];if(!_0x37abb0)continue;let _0x296971,_0x431ec8;try{_0x296971=Atomics[_0xaa9377(0x578)](_0x37abb0,0x0),_0x431ec8=Atomics[_0xaa9377(0x578)](_0x37abb0,0x1);}catch{continue;}if(_0x296971===0x0)continue;_0x26ec77=!![];const _0x597cd6=_0x296971>0x0?_0xaa9377(0x55c):_0xaa9377(0x79d),_0x2fa43f=Date[_0xaa9377(0x6a7)]()-Math[_0xaa9377(0x2e8)](_0x296971)*0x3e8,_0x25a2e3=((()=>{const _0x1ccfff=_0xaa9377;try{return _0x40be70[_0x1ccfff(0x1c8)]&&_0x40be70[_0x1ccfff(0x1c8)]['status']?_0x40be70[_0x1ccfff(0x1c8)][_0x1ccfff(0x57d)]():null;}catch{return null;}})());_0x2d4c5f[_0xaa9377(0x494)]('\x20\x20env='+_0x58f248+_0xaa9377(0x26d)+_0x597cd6+_0xaa9377(0x528)+_0x2fa43f+_0xaa9377(0x75e)+_0x431ec8+(_0x25a2e3?_0xaa9377(0x583)+_0x25a2e3[_0xaa9377(0x440)]+_0xaa9377(0x791)+_0x25a2e3[_0xaa9377(0x402)]+_0xaa9377(0x734)+_0x25a2e3[_0xaa9377(0x31c)]+'}':''));}}if(!_0x26ec77)_0x2d4c5f[_0xaa9377(0x494)](_0xaa9377(0x335));return _0x2d4c5f[_0xaa9377(0x2b6)]('\x0a');}function _0x11af07(){const _0x49f475=_0x5511;if(!_0x4cb6d4())return;const _0x308b3e=Math[_0x49f475(0x46c)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2c3376=Date[_0x49f475(0x6a7)]();for(const _0x509490 of _0x304a1a){const _0x4a854b=_0x509490&&_0x509490[_0x49f475(0x221)];if(!_0x4a854b)continue;for(const [_0x11296a,_0xf71f1f]of _0x4a854b){const _0x2d6682=_0xf71f1f&&_0xf71f1f['_coordinator']&&_0xf71f1f[_0x49f475(0x2d9)][_0x49f475(0x1d3)];if(!_0x2d6682)continue;let _0x51b2b3;try{_0x51b2b3=Atomics[_0x49f475(0x578)](_0x2d6682,0x0);}catch{continue;}const _0x27d36b=_0x509490['path']+'|'+_0x11296a;if(_0x51b2b3<=0x0){_0x3163a1['delete'](_0x27d36b);continue;}const _0x2b072a=_0x2c3376-_0x51b2b3*0x3e8,_0x5deecb=_0x3163a1['get'](_0x27d36b);if(_0x2b072a<_0x308b3e)continue;if(_0x5deecb&&_0x2c3376-_0x5deecb[_0x49f475(0x69e)]<_0x308b3e)continue;_0x3163a1['set'](_0x27d36b,{'firstTs':_0x5deecb?_0x5deecb[_0x49f475(0x23b)]:_0x51b2b3,'dumpedAt':_0x2c3376});const _0xf20f27=_0x49f475(0x362)+_0x2b072a+_0x49f475(0x53f)+_0x11296a+_0x49f475(0x5d6)+new Date()['toISOString']()+_0x49f475(0x5bd)+process[_0x49f475(0x690)]+_0x49f475(0x24b);_0x262bfb([_0xf20f27,_0x1df4d1(),'='[_0x49f475(0x1f2)](_0xf20f27['length']-0x1)][_0x49f475(0x2b6)]('\x0a'));}}}function _0x2317e8(){const _0x37bb10=_0x5511;if(!_0x4cb6d4()||_0x56cb30)return;_0x56cb30=!![],process['prependListener'](_0x37bb10(0x6ff),_0x30b5fd),process[_0x37bb10(0x250)]('unhandledRejection',_0xdc4872);const _0x50a4ad=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3c5367=setInterval(_0x11af07,_0x50a4ad);if(_0x3c5367[_0x37bb10(0x6d1)])_0x3c5367[_0x37bb10(0x6d1)]();}function _0x2a388c(_0x1e29e4){const _0x15039d=_0x5511;if(!_0x4cb6d4()||!_0x1e29e4)return;_0x304a1a[_0x15039d(0x41a)](_0x1e29e4),_0x2317e8();}function _0x27a614(_0x366f39){const _0x1aea9c=_0x5511;_0x304a1a[_0x1aea9c(0x614)](_0x366f39);}function _0x2bffd9(){const _0x42f169=_0x5511;if(!_0x4cb6d4())return{'enabled':![],'hint':_0x42f169(0x226)};return{'enabled':!![],'stackCapture':!!_0x5de22a,'recentWrites':_0x378d35(0x10),'drain':_0x1df4d1()};}return okdbDiag={'isEnabled':_0x4cb6d4,'recordWrite':_0x197896,'installDiag':_0x2317e8,'registerOkdb':_0x2a388c,'unregisterOkdb':_0x27a614,'snapshot':_0x2bffd9},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x51f693=_0x5411c3;if(hasRequiredOkdbWriter)return okdbWriter[_0x51f693(0x577)];hasRequiredOkdbWriter=0x1;const {performance:_0x477bea}=require$$0$4,_0x3c9a37=requireOkdbDiag(),_0x3c6cb4=process.env.OKDB_COMMIT_MODE===_0x51f693(0x45e);class _0x31c22f{constructor(_0x1fea06){const _0x465c1a=_0x51f693;this[_0x465c1a(0x1a1)]=_0x1fea06,this[_0x465c1a(0x769)]=new Set(),this[_0x465c1a(0x4c0)]=new Map(),this['_committed']=0x0,this[_0x465c1a(0x5fc)]=[],this[_0x465c1a(0x71e)]=[],this['_highWater']=Math[_0x465c1a(0x46c)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x465c1a(0x229)]=0x0,this['_bpWaiters']=[],this[_0x465c1a(0x2c1)]=0x0,this[_0x465c1a(0x1e0)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this[_0x465c1a(0x44f)]=![];}async[_0x51f693(0x480)](_0x32021d,_0x3f56aa){const _0x857eba=_0x51f693;if(_0x3c9a37[_0x857eba(0x5c8)]())_0x3c9a37[_0x857eba(0x790)](this[_0x857eba(0x1a1)]?.['name'],_0x3f56aa);if(this[_0x857eba(0x2e4)]){const _0x2ca41e=new Error(_0x857eba(0x368));_0x2ca41e[_0x857eba(0x5cc)]=_0x857eba(0x4f9);throw _0x2ca41e;}if(this[_0x857eba(0x524)]>0x0){let _0x2cf27c=![];while(this[_0x857eba(0x229)]>=this[_0x857eba(0x524)]&&!this[_0x857eba(0x2e4)]){!_0x2cf27c&&(_0x2cf27c=!![],this[_0x857eba(0x2c1)]++),await new Promise(_0xa8fd6d=>this[_0x857eba(0x75f)]['push'](_0xa8fd6d));}if(this[_0x857eba(0x2e4)]){const _0x6f66f6=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x6f66f6[_0x857eba(0x5cc)]=_0x857eba(0x4f9);throw _0x6f66f6;}}this[_0x857eba(0x229)]++;const _0x280729=this['env']['_coordinator'];for(;;){while(this[_0x857eba(0x1e0)])await this['_held'];if(_0x280729)await _0x280729[_0x857eba(0x302)]();if(!this['_held'])break;if(_0x280729)_0x280729[_0x857eba(0x67c)]();}if(this[_0x857eba(0x2e4)]){if(_0x280729)_0x280729[_0x857eba(0x67c)]();this['_outstanding']--;if(this['_bpWaiters'][_0x857eba(0x1b1)]&&this[_0x857eba(0x229)]<this['_highWater'])this[_0x857eba(0x75f)][_0x857eba(0x6d9)]()();const _0x2097da=new Error(_0x857eba(0x368));_0x2097da[_0x857eba(0x5cc)]=_0x857eba(0x4f9);throw _0x2097da;}const _0x1e548e=_0x477bea['now']();if(_0x3c6cb4)try{const _0xfdc097=this[_0x857eba(0x1a1)]['db'][_0x857eba(0x1ff)](_0x32021d);this[_0x857eba(0x6f6)]++;if(this[_0x857eba(0x5fc)][_0x857eba(0x494)](_0x477bea[_0x857eba(0x6a7)]()-_0x1e548e)>0x100)this[_0x857eba(0x5fc)]['shift']();if(this[_0x857eba(0x71e)][_0x857eba(0x494)](_0x477bea['now']())>0x800)this[_0x857eba(0x71e)][_0x857eba(0x6d9)]();return _0xfdc097;}finally{this[_0x857eba(0x229)]--;if(this[_0x857eba(0x75f)][_0x857eba(0x1b1)]&&this[_0x857eba(0x229)]<this[_0x857eba(0x524)])this[_0x857eba(0x75f)][_0x857eba(0x6d9)]()();if(_0x280729)_0x280729[_0x857eba(0x67c)]();}let _0x51ddd3=null;const _0xd1ed72=()=>{const _0x1d82ba=_0x857eba,_0x34216f=_0x32021d();if(_0x34216f&&typeof _0x34216f[_0x1d82ba(0x1c9)]===_0x1d82ba(0x76e)&&!_0x51ddd3){this[_0x1d82ba(0x25d)]++;let _0x19d166;const _0x3b81e1=new Promise(_0x5df3bc=>_0x19d166=_0x5df3bc);this[_0x1d82ba(0x1e0)]=_0x3b81e1,_0x51ddd3=()=>{const _0xea8b8=_0x1d82ba;if(this[_0xea8b8(0x1e0)]===_0x3b81e1)this[_0xea8b8(0x1e0)]=null;_0x19d166();};}return _0x34216f;};let _0x3124c4;try{_0x3124c4=this[_0x857eba(0x1a1)]['db']['childTransaction'](_0xd1ed72);}catch(_0x49d686){_0x3124c4=Promise['reject'](_0x49d686);}(!_0x3124c4||typeof _0x3124c4['then']!==_0x857eba(0x76e))&&(this[_0x857eba(0x64d)]++,!this['_nestedWarned']&&(this[_0x857eba(0x44f)]=!![],console[_0x857eba(0x305)]('okdb-writer['+(this[_0x857eba(0x1a1)]?.[_0x857eba(0x60a)]??'?')+_0x857eba(0x58e))),_0x3124c4=Promise[_0x857eba(0x25c)](_0x3124c4));const _0x3b348b=()=>{if(_0x51ddd3)_0x51ddd3();};_0x3124c4[_0x857eba(0x1c9)](_0x3b348b,_0x3b348b),this['_inflight'][_0x857eba(0x41a)](_0x3124c4),this['_enqueuedAt']['set'](_0x3124c4,_0x1e548e);const _0x5bef19=()=>{const _0x3daae1=_0x857eba;this[_0x3daae1(0x769)][_0x3daae1(0x614)](_0x3124c4),this[_0x3daae1(0x4c0)]['delete'](_0x3124c4),this[_0x3daae1(0x6f6)]++,this[_0x3daae1(0x229)]--;this[_0x3daae1(0x75f)][_0x3daae1(0x1b1)]&&this[_0x3daae1(0x229)]<this['_highWater']&&this['_bpWaiters']['shift']()();if(this[_0x3daae1(0x5fc)][_0x3daae1(0x494)](_0x477bea[_0x3daae1(0x6a7)]()-_0x1e548e)>0x100)this[_0x3daae1(0x5fc)]['shift']();if(this[_0x3daae1(0x71e)][_0x3daae1(0x494)](_0x477bea['now']())>0x800)this[_0x3daae1(0x71e)][_0x3daae1(0x6d9)]();};_0x3124c4['then'](_0x5bef19,_0x5bef19);try{return await _0x3124c4;}finally{if(_0x280729)_0x280729[_0x857eba(0x67c)]();}}[_0x51f693(0x57d)](){const _0x3d4d93=_0x51f693,_0x33c618=_0x477bea['now']();let _0x3d3436=0x0;for(const _0x1390e1 of this[_0x3d4d93(0x4c0)]['values']()){const _0x1d0922=_0x33c618-_0x1390e1;if(_0x1d0922>_0x3d3436)_0x3d3436=_0x1d0922;}let _0x3e98fa=0x0;for(let _0x4b33a0=this[_0x3d4d93(0x71e)][_0x3d4d93(0x1b1)]-0x1;_0x4b33a0>=0x0;_0x4b33a0--){if(_0x33c618-this[_0x3d4d93(0x71e)][_0x4b33a0]>0x3e8)break;_0x3e98fa++;}let _0x15f16b=0x0;if(this['_durs']['length']){const _0x5f3eb9=[...this['_durs']][_0x3d4d93(0x4ba)]((_0x5686eb,_0x2e1c99)=>_0x5686eb-_0x2e1c99);_0x15f16b=_0x5f3eb9[Math[_0x3d4d93(0x4a8)](_0x5f3eb9[_0x3d4d93(0x1b1)]-0x1,Math[_0x3d4d93(0x1f9)](_0x5f3eb9[_0x3d4d93(0x1b1)]*0.99))];}return{'depth':this[_0x3d4d93(0x769)]['size'],'oldestPendingMs':Math[_0x3d4d93(0x40d)](_0x3d3436),'committed':this['_committed'],'commitsPerSec':_0x3e98fa,'commitP99Ms':Math['round'](_0x15f16b),'parkedNow':this['_bpWaiters'][_0x3d4d93(0x1b1)],'parkedTotal':this[_0x3d4d93(0x2c1)],'highWater':this[_0x3d4d93(0x524)]};}[_0x51f693(0x356)](){const _0x2b9b69=_0x51f693,_0x7f3596=_0x477bea['now']();return[...this['_enqueuedAt'][_0x2b9b69(0x637)]()][_0x2b9b69(0x2cc)](_0x1a2c61=>Math['round'](_0x7f3596-_0x1a2c61))[_0x2b9b69(0x4ba)]((_0x64470c,_0x3c8e4e)=>_0x3c8e4e-_0x64470c);}['markClosed'](){const _0x2f56e6=_0x51f693;this['_closed']=!![];for(const _0x1583fe of this[_0x2f56e6(0x75f)][_0x2f56e6(0x3e0)](0x0))_0x1583fe();}async[_0x51f693(0x55d)](){const _0x2e98ca=_0x51f693;let _0x18f2c8=0x0;while(this[_0x2e98ca(0x769)]['size']&&_0x18f2c8++<0x3e8){await Promise['allSettled']([...this[_0x2e98ca(0x769)]]);}}async['put'](_0x73b1fe,_0x3cde10,_0x58a929,_0x337dd1){const _0x1c27e2=_0x51f693;return this[_0x1c27e2(0x480)](()=>{const _0x1a68cc=_0x1c27e2;if(_0x337dd1===undefined)_0x73b1fe['putSync'](_0x3cde10,_0x58a929);else _0x73b1fe[_0x1a68cc(0x48f)](_0x3cde10,_0x58a929,_0x337dd1);},_0x1c27e2(0x590));}async[_0x51f693(0x43f)](_0x1ec362,_0x9bc519){const _0x592153=_0x51f693;return this[_0x592153(0x480)](()=>_0x1ec362[_0x592153(0x5b4)](_0x9bc519),_0x592153(0x1fd));}}async function _0x4130a2(_0x386f3a,_0x588f6e){const _0x4bd75e=_0x51f693;if(_0x588f6e==null)_0x588f6e=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x12e6ee=_0x386f3a?.['flushed'];if(!_0x12e6ee||typeof _0x12e6ee[_0x4bd75e(0x1c9)]!=='function')return;await Promise['race']([Promise[_0x4bd75e(0x25c)](_0x12e6ee)['catch'](()=>{}),new Promise(_0x41e301=>{const _0x3956df=_0x4bd75e,_0x5cb007=setTimeout(_0x41e301,_0x588f6e);if(_0x5cb007[_0x3956df(0x6d1)])_0x5cb007['unref']();})]);}catch{}}function _0x1a14a5(_0x503c14){const _0x56ae44=_0x51f693;if(_0x3c6cb4)return Promise[_0x56ae44(0x25c)]();const _0x3ed332=_0x503c14?.['committed'];return _0x3ed332&&typeof _0x3ed332[_0x56ae44(0x1c9)]===_0x56ae44(0x76e)?_0x3ed332:Promise[_0x56ae44(0x25c)]();}return okdbWriter[_0x51f693(0x577)]=_0x31c22f,okdbWriter[_0x51f693(0x577)][_0x51f693(0x4f6)]=_0x4130a2,okdbWriter['exports'][_0x51f693(0x327)]=_0x1a14a5,okdbWriter[_0x51f693(0x577)]['SYNC_COMMITS']=_0x3c6cb4,okdbWriter[_0x51f693(0x577)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x45513d=_0x5411c3;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x517dd0=require$$0,{SYNC_COMMITS:_0x1ec4f6}=requireOkdbWriter(),_0x52dece=_0x45513d(0x2f3);class _0x5c50e9{constructor(_0x178dd8,_0x19d30a,_0x21f777){const _0x4fb250=_0x45513d;this['_lock']=_0x178dd8,this[_0x4fb250(0x647)]=_0x19d30a,this[_0x4fb250(0x52a)]=_0x21f777,this[_0x4fb250(0x766)]=![],this[_0x4fb250(0x6b1)]=null,this['_heartbeatInFlight']=null;}[_0x45513d(0x706)](){const _0x107315=_0x45513d;if(this[_0x107315(0x766)])return![];try{const _0x4c879f=this[_0x107315(0x1b7)][_0x107315(0x2fd)]()[_0x107315(0x5e0)](this[_0x107315(0x647)]);if(!_0x4c879f||_0x4c879f[_0x107315(0x40f)]!==this[_0x107315(0x52a)])return![];const _0x5b37d6=_0x4c879f[_0x107315(0x1b8)]??_0x4c879f[_0x107315(0x40f)];if(_0x5b37d6+_0x4c879f[_0x107315(0x4a6)]<Date[_0x107315(0x6a7)]())return![];return!![];}catch{return!this[_0x107315(0x766)];}}[_0x45513d(0x74c)](){const _0x33c53a=_0x45513d;if(this[_0x33c53a(0x766)])return null;try{return this['_lock'][_0x33c53a(0x2fd)]()[_0x33c53a(0x5e0)](this[_0x33c53a(0x647)])??null;}catch{return null;}}async[_0x45513d(0x561)](_0x9780f7){const _0x218b45=_0x45513d;if(this['_released'])return;try{const _0x30a496=this[_0x218b45(0x1b7)][_0x218b45(0x2fd)]()[_0x218b45(0x5e0)](this[_0x218b45(0x647)]);if(!_0x30a496||_0x30a496[_0x218b45(0x40f)]!==this[_0x218b45(0x52a)])return;if(_0x1ec4f6)this['_lock']['_db']()[_0x218b45(0x48f)](this[_0x218b45(0x647)],{..._0x30a496,'ttlMs':_0x30a496[_0x218b45(0x4a6)]+_0x9780f7});else await this[_0x218b45(0x1b7)]['_db']()[_0x218b45(0x4cd)](this[_0x218b45(0x647)],{..._0x30a496,'ttlMs':_0x30a496[_0x218b45(0x4a6)]+_0x9780f7});}catch{}}async['release'](){const _0x10528d=_0x45513d;if(this[_0x10528d(0x766)])return;if(this['_heartbeatInFlight'])try{await this[_0x10528d(0x514)];}catch{}clearInterval(this[_0x10528d(0x6b1)]),this['_heartbeatTimer']=null,this[_0x10528d(0x766)]=!![];try{const _0xb27456=this[_0x10528d(0x1b7)][_0x10528d(0x2fd)]()['get'](this[_0x10528d(0x647)]);if(_0xb27456&&_0xb27456['acquiredAt']===this[_0x10528d(0x52a)]){if(_0x1ec4f6)this[_0x10528d(0x1b7)][_0x10528d(0x2fd)]()[_0x10528d(0x5b4)](this['_key']);else await this['_lock'][_0x10528d(0x2fd)]()[_0x10528d(0x43f)](this[_0x10528d(0x647)]);}}catch{}}[_0x45513d(0x5e6)](_0x3a9970,_0x4b4aa8){const _0x21b4b2=_0x45513d,_0x2af614=_0x4b4aa8??Math[_0x21b4b2(0x1f9)](_0x3a9970/0x3);this[_0x21b4b2(0x6b1)]=setInterval(()=>{const _0x21f3ff=_0x21b4b2;if(this[_0x21f3ff(0x766)])return;this[_0x21f3ff(0x514)]=((async()=>{const _0x410591=_0x21f3ff;try{const _0x53a74e=this['_lock'][_0x410591(0x2fd)]()[_0x410591(0x5e0)](this['_key']);if(!_0x53a74e||_0x53a74e[_0x410591(0x40f)]!==this['_acquiredAt']){this[_0x410591(0x766)]=!![],clearInterval(this[_0x410591(0x6b1)]),this[_0x410591(0x6b1)]=null;return;}if(_0x1ec4f6)this[_0x410591(0x1b7)][_0x410591(0x2fd)]()[_0x410591(0x48f)](this['_key'],{..._0x53a74e,'updatedAt':Date[_0x410591(0x6a7)]()});else await this[_0x410591(0x1b7)]['_db']()[_0x410591(0x4cd)](this[_0x410591(0x647)],{..._0x53a74e,'updatedAt':Date[_0x410591(0x6a7)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x2af614);if(this[_0x21b4b2(0x6b1)]['unref'])this[_0x21b4b2(0x6b1)][_0x21b4b2(0x6d1)]();}}class _0x2c8c68{constructor(_0x4bdfdf,{namespace:_0x5f1f17,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1986f7=_0x45513d;this[_0x1986f7(0x471)]=_0x4bdfdf,this['namespace']=_0x5f1f17,this['ttlMs']=ttlMs,this[_0x1986f7(0x581)]=heartbeatMs,this['_lockDb']=null;}[_0x45513d(0x2fd)](){const _0x1f0ddb=_0x45513d;return!this[_0x1f0ddb(0x6a8)]&&(this['_lockDb']=this[_0x1f0ddb(0x471)][_0x1f0ddb(0x748)](_0x52dece,{'dupSort':![]})),this[_0x1f0ddb(0x6a8)];}[_0x45513d(0x6c8)](){const _0xd78f8e=_0x45513d;return!this[_0xd78f8e(0x6fd)]&&(this[_0xd78f8e(0x6fd)]=this[_0xd78f8e(0x471)][_0xd78f8e(0x748)](_0x52dece+_0xd78f8e(0x733),{'dupSort':![]})),this[_0xd78f8e(0x6fd)];}['_key'](_0x1aa24e){return this['namespace']+':'+_0x1aa24e;}[_0x45513d(0x2e6)](_0x2e0e22){const _0x29fda3=_0x45513d;try{_0x1ec4f6?this[_0x29fda3(0x6c8)]()['putSync'](this['_key'](_0x2e0e22),Date[_0x29fda3(0x6a7)]()):this[_0x29fda3(0x6c8)]()[_0x29fda3(0x4cd)](this[_0x29fda3(0x647)](_0x2e0e22),Date['now']())?.[_0x29fda3(0x58b)]?.(()=>{});}catch{}}[_0x45513d(0x324)](_0x922420,_0x9994c9=0x3e8){const _0x13e225=_0x45513d;try{const _0x103830=this['_wantDb']()[_0x13e225(0x5e0)](this[_0x13e225(0x647)](_0x922420));return typeof _0x103830===_0x13e225(0x758)&&Date[_0x13e225(0x6a7)]()-_0x103830<_0x9994c9;}catch{return![];}}[_0x45513d(0x5c7)](_0x4c0afa){const _0x3b985e=_0x45513d,_0xfdf389=_0x4c0afa[_0x3b985e(0x1b8)]??_0x4c0afa[_0x3b985e(0x40f)];return _0xfdf389+_0x4c0afa[_0x3b985e(0x4a6)]<Date['now']();}static[_0x45513d(0x21e)](_0x39af36){const _0x101612=_0x45513d,_0x2bf487=_0x39af36?.[_0x101612(0x74c)];if(!_0x2bf487||typeof _0x2bf487[_0x101612(0x690)]!==_0x101612(0x758))return![];if(_0x2bf487[_0x101612(0x394)]!==_0x517dd0['hostname']())return![];if(_0x2bf487['pid']===process[_0x101612(0x690)])return![];try{return process[_0x101612(0x4fc)](_0x2bf487[_0x101612(0x690)],0x0),![];}catch(_0xf72548){return _0xf72548['code']===_0x101612(0x25a);}}async[_0x45513d(0x5fe)](_0x390136,_0x477458={},_0x2f734f={}){const _0x50ccdf=_0x45513d,_0x59337a=this[_0x50ccdf(0x647)](_0x390136),_0x50255a=_0x2f734f[_0x50ccdf(0x4a6)]??this[_0x50ccdf(0x4a6)],_0x1d688f=Date['now'](),_0x5eea6d={'holder':{'pid':process[_0x50ccdf(0x690)],'hostname':_0x517dd0[_0x50ccdf(0x394)](),..._0x477458},'acquiredAt':_0x1d688f,'updatedAt':_0x1d688f,'ttlMs':_0x50255a};let _0x45f165=![],_0x4891cb=null;try{const _0x12c1c9=()=>{const _0x9895f3=_0x50ccdf,_0x2ce280=this[_0x9895f3(0x2fd)]()['get'](_0x59337a);if(_0x2ce280&&!this['_isStale'](_0x2ce280)&&!_0x2c8c68[_0x9895f3(0x21e)](_0x2ce280)){const _0x42135c=_0x477458[_0x9895f3(0x38b)]!=null&&_0x2ce280[_0x9895f3(0x74c)][_0x9895f3(0x690)]===process[_0x9895f3(0x690)]&&_0x2ce280['holder'][_0x9895f3(0x38b)]===_0x477458[_0x9895f3(0x38b)];if(!_0x42135c){_0x45f165=![],_0x4891cb=_0x2ce280;return;}_0x5eea6d[_0x9895f3(0x40f)]<=_0x2ce280[_0x9895f3(0x40f)]&&(_0x5eea6d[_0x9895f3(0x40f)]=_0x2ce280[_0x9895f3(0x40f)]+0x1,_0x5eea6d['updatedAt']=_0x5eea6d[_0x9895f3(0x40f)]);}this[_0x9895f3(0x2fd)]()[_0x9895f3(0x4cd)](_0x59337a,_0x5eea6d),_0x45f165=!![],_0x4891cb=_0x5eea6d;};if(_0x1ec4f6)this[_0x50ccdf(0x2fd)]()[_0x50ccdf(0x1ff)](_0x12c1c9);else await this[_0x50ccdf(0x2fd)]()['childTransaction'](_0x12c1c9);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x45f165)return{'acquired':![],'handle':null,'current':_0x4891cb};const _0x57274b=new _0x5c50e9(this,_0x59337a,_0x5eea6d[_0x50ccdf(0x40f)]);return _0x57274b[_0x50ccdf(0x5e6)](_0x50255a,this['heartbeatMs']),{'acquired':!![],'handle':_0x57274b,'current':_0x4891cb};}['inspect'](_0x19cc5c){const _0x5da01d=_0x45513d;try{return this[_0x5da01d(0x2fd)]()[_0x5da01d(0x5e0)](this[_0x5da01d(0x647)](_0x19cc5c))??null;}catch{return null;}}[_0x45513d(0x772)](){const _0x1f719f=_0x45513d,_0x41d0dd=this['namespace']+':',_0x485660=[];try{for(const {key:_0x3b35b3,value:_0x454b80}of this[_0x1f719f(0x2fd)]()[_0x1f719f(0x433)]({'start':_0x41d0dd,'end':_0x41d0dd+'\xff'})){typeof _0x3b35b3===_0x1f719f(0x54f)&&_0x3b35b3[_0x1f719f(0x72d)](_0x41d0dd)&&_0x485660[_0x1f719f(0x494)]({'id':_0x3b35b3[_0x1f719f(0x7a7)](_0x41d0dd[_0x1f719f(0x1b1)]),'entry':_0x454b80});}}catch{}return _0x485660;}static['listAll'](_0x381b69){const _0x4a4edc=_0x45513d,_0x4f0df5=[];try{const _0x1fbfc1=_0x381b69[_0x4a4edc(0x748)](_0x52dece,{'dupSort':![]});for(const {key:_0xadbb9a,value:_0x18d861}of _0x1fbfc1[_0x4a4edc(0x433)]({})){if(typeof _0xadbb9a!==_0x4a4edc(0x54f))continue;const _0x3a2d90=_0xadbb9a['indexOf'](':');if(_0x3a2d90<0x1)continue;_0x4f0df5[_0x4a4edc(0x494)]({'namespace':_0xadbb9a[_0x4a4edc(0x7a7)](0x0,_0x3a2d90),'id':_0xadbb9a[_0x4a4edc(0x7a7)](_0x3a2d90+0x1),'entry':_0x18d861});}}catch{}return _0x4f0df5;}}return okdbLock={'OKDBLock':_0x2c8c68},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x56c6d7=_0x5411c3;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x48a730=require$$0,_0x17d07e=require$$1$2,_0x403477=require$$2,{LOOP:_0x5b89aa}=requireOkdbLoopMonitor(),{OKDBLock:_0x200f4c}=requireOkdbLock(),{SYNC_COMMITS:_0x4c34c9}=requireOkdbWriter(),_0x5b8670='~processes',_0x11e5a7=_0x56c6d7(0x4b5),_0x66c40d=_0x56c6d7(0x55f),_0x147395=_0x56c6d7(0x4ed),_0x1e284e=(_0x151e5e,_0xbda989)=>_0x151e5e+':'+_0xbda989,_0x20c1e7=(_0x355c64,_0x57fd99)=>_0x355c64+'::'+_0x57fd99,_0x32fd5b=(_0x2deeb4,_0x5cd3d7)=>_0x2deeb4+'/'+_0x5cd3d7,_0x33c90c=(_0x5963c0,_0x4b20b1)=>_0x5963c0+'#'+_0x4b20b1,_0x4b8e71=_0x53ad38=>{const _0x2d466a=_0x56c6d7;if(_0x53ad38?.['processKey'])return _0x53ad38[_0x2d466a(0x51a)];const _0x157806=_0x53ad38?.[_0x2d466a(0x2e1)];return typeof _0x157806==='string'&&_0x157806[_0x2d466a(0x70f)]('#')?_0x157806['slice'](0x0,_0x157806[_0x2d466a(0x2db)]('#')):_0x157806;},_0x46f492=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x9fad60=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4a1334=_0x46f492*0x3,_0xedac51=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4a1334*0x14),_0x5c550e=[_0x56c6d7(0x767),_0x56c6d7(0x3c9),_0x56c6d7(0x752),'processor:error',_0x56c6d7(0x3f6),_0x56c6d7(0x665)];let _0x9d12b7=null;function _0x284ea1(){const _0x5cb897=_0x56c6d7;if(_0x9d12b7==null)_0x9d12b7=Math['round']((Date[_0x5cb897(0x6a7)]()-process[_0x5cb897(0x6db)]()*0x3e8)/0x3e8)*0x3e8;return _0x9d12b7;}function _0x4cd821(_0x5688fc){const _0x224db6=_0x56c6d7;if(process.env.OKDB_PROCESS_KILL===_0x224db6(0x4ad))return![];if(_0x5688fc?.[_0x224db6(0x76b)]?.[_0x224db6(0x683)]&&typeof _0x5688fc['options'][_0x224db6(0x683)]===_0x224db6(0x336)&&_0x5688fc[_0x224db6(0x76b)][_0x224db6(0x683)][_0x224db6(0x4fc)]===![])return![];return!![];}function _0x5c03db(_0x37759e,_0x1d9e91){const _0x44fa15=_0x56c6d7,_0x4dfd5e=!!_0x1d9e91?.[_0x44fa15(0x1a4)];switch(_0x37759e){case _0x44fa15(0x5de):return{'controllable':_0x4dfd5e,'decommissionable':![],'killable':!![],'killConfirm':_0x44fa15(0x700)};case _0x44fa15(0x2b5):case _0x44fa15(0x29f):return{'controllable':_0x4dfd5e,'decommissionable':![],'killable':!![],'killConfirm':_0x44fa15(0x271)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x44fa15(0x42e):case _0x44fa15(0x284):case _0x44fa15(0x1ee):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x44fa15(0x50c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x46bb1d{constructor(_0x2d8071){const _0x2677c2=_0x56c6d7;this['okdb']=_0x2d8071,this['_statusEnv']=null,this[_0x2677c2(0x1cc)]=null,this['_desiredOverlay']=new Map(),this[_0x2677c2(0x7a2)]=null,this[_0x2677c2(0x72b)]=![],this['_isReader']=![],this['_processStartedAt']=_0x284ea1(),this[_0x2677c2(0x668)]=_0x1e284e(process[_0x2677c2(0x690)],this[_0x2677c2(0x526)]),this[_0x2677c2(0x199)]=_0x403477[_0x2677c2(0x20a)]()[_0x2677c2(0x7a7)](0x0,0x8),this[_0x2677c2(0x47d)]=_0x33c90c(this[_0x2677c2(0x668)],this[_0x2677c2(0x199)]),this['_startedAt']=Date[_0x2677c2(0x6a7)](),this['_kind']=null,this[_0x2677c2(0x27a)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x2677c2(0x326)]=null,this[_0x2677c2(0x5a0)]=null,this['_lastPublishAt']=0x0,this[_0x2677c2(0x4c7)]={},this[_0x2677c2(0x1d4)]=new Map(),this[_0x2677c2(0x67f)]=process[_0x2677c2(0x560)](),this[_0x2677c2(0x659)]=Date[_0x2677c2(0x6a7)](),this[_0x2677c2(0x489)]=0x0,this['_threadStats']=new Map();}get[_0x56c6d7(0x75d)](){const _0x38b411=_0x56c6d7;return this[_0x38b411(0x668)];}get[_0x56c6d7(0x5df)](){const _0x51bec0=_0x56c6d7;return this[_0x51bec0(0x47d)];}[_0x56c6d7(0x569)](_0xfe31b4,_0x3b86c7){const _0x57a8ed=_0x56c6d7,_0x215b7e=_0x5c03db(_0xfe31b4,_0x3b86c7);if(_0x215b7e[_0x57a8ed(0x6f9)]&&!_0x4cd821(this['okdb']))return{..._0x215b7e,'killable':![],'killConfirm':undefined};return _0x215b7e;}[_0x56c6d7(0x27e)](){const _0x4cb2b1=_0x56c6d7;return!!this[_0x4cb2b1(0x4e9)];}[_0x56c6d7(0x49f)](_0x460b4d){const _0x18e642=_0x56c6d7;Object['assign'](this[_0x18e642(0x4c7)],_0x460b4d||{});}[_0x56c6d7(0x32c)](_0x55b130){const _0xa30b5d=_0x56c6d7;if(_0x55b130)this[_0xa30b5d(0x4ab)]=_0x55b130;}[_0x56c6d7(0x18e)](_0x31b29e={}){const _0x4614a7=_0x56c6d7;return this[_0x4614a7(0x3ea)][_0x4614a7(0x308)](_0x31b29e);}[_0x56c6d7(0x1b0)](){const _0x3ae2d0=_0x56c6d7,_0x3ac374={};let _0x2118bf=0x0,_0x182b81=0x0;const _0x51faa6=new Set();for(const _0x1fc08f of this[_0x3ae2d0(0x606)]()){_0x182b81++;const _0x120b66=_0x1fc08f[_0x3ae2d0(0x304)];if(!_0x120b66)continue;if(_0x120b66[_0x3ae2d0(0x5e3)])_0x2118bf++;for(const _0x19c6bf of _0x120b66[_0x3ae2d0(0x1a4)]||[]){if(![_0x3ae2d0(0x4a3),'fanout'][_0x3ae2d0(0x70f)](_0x19c6bf[_0x3ae2d0(0x274)]))continue;(_0x19c6bf[_0x3ae2d0(0x4c4)]===_0x3ae2d0(0x372)||_0x19c6bf[_0x3ae2d0(0x4c4)]===_0x3ae2d0(0x64f))&&_0x19c6bf['cursorKey']&&_0x51faa6[_0x3ae2d0(0x41a)]((_0x19c6bf[_0x3ae2d0(0x1a1)]||_0x3ae2d0(0x45b))+':'+_0x19c6bf['cursorKey']);const _0x581e77=_0x19c6bf['env']||_0x3ae2d0(0x45b);(_0x3ac374[_0x581e77]||=[])['push']({..._0x19c6bf,'env':_0x581e77,'owner':{'pid':_0x1fc08f[_0x3ae2d0(0x690)]??null,'kind':_0x1fc08f['kind']??null}});}}for(const [_0x40e8b8,_0x219c68]of Object[_0x3ae2d0(0x352)](_0x3ac374)){for(const _0x270fd7 of _0x219c68){if(_0x270fd7[_0x3ae2d0(0x274)]===_0x3ae2d0(0x4a3)&&!_0x270fd7[_0x3ae2d0(0x2c8)]){const _0x4d9936=_0x40e8b8+':'+(_0x270fd7[_0x3ae2d0(0x582)]??'');if(!_0x51faa6[_0x3ae2d0(0x4e7)](_0x4d9936))_0x270fd7[_0x3ae2d0(0x2a7)]=!![];}}}return{'envs':_0x3ac374,'policy':null,'participation':{'participating':_0x2118bf,'total':_0x182b81},'source':_0x3ae2d0(0x4d1)};}[_0x56c6d7(0x5c0)](){const _0x284a24=_0x56c6d7,_0x5a7435=_0x38ff03=>{const _0x20caff=_0x5511;if(_0x38ff03[_0x20caff(0x4c4)]===_0x20caff(0x372)||_0x38ff03[_0x20caff(0x4c4)]==='building'||_0x38ff03[_0x20caff(0x4c4)]===_0x20caff(0x3ba))return 0x3;if(_0x38ff03['claimGated'])return 0x1;return 0x2;},_0x25d21b=new Map();for(const _0x467aa8 of this[_0x284a24(0x606)]()){for(const _0x242be3 of _0x467aa8[_0x284a24(0x304)]?.['processors']||[]){const _0x546e33={..._0x242be3,'owner':{'pid':_0x467aa8[_0x284a24(0x690)]??null,'kind':_0x467aa8['kind']??null,'host':_0x467aa8['host']??null}},_0x35e08b=_0x242be3['mode']===_0x284a24(0x4a3)?_0x284a24(0x26e)+(_0x242be3['env']??'')+'::'+(_0x242be3['cursorKey']??_0x242be3[_0x284a24(0x737)]??_0x242be3['id']):'inst:'+(_0x467aa8['nodeKey']??_0x467aa8[_0x284a24(0x51a)]??'')+'::'+(_0x242be3['env']??'')+'::'+_0x242be3['id'],_0x3860da=_0x25d21b[_0x284a24(0x5e0)](_0x35e08b);if(!_0x3860da||_0x5a7435(_0x546e33)>_0x5a7435(_0x3860da))_0x25d21b[_0x284a24(0x238)](_0x35e08b,_0x546e33);}}return[..._0x25d21b[_0x284a24(0x637)]()];}['clusterStatusView'](){const _0x42ae37=_0x56c6d7,_0x1b6a04=Date[_0x42ae37(0x6a7)](),_0x19c2d1=this[_0x42ae37(0x606)](),_0x2df2aa=_0x11483a=>Math[_0x42ae37(0x46c)](0x0,Math[_0x42ae37(0x40d)]((_0x1b6a04-(_0x11483a['startedAt']||_0x1b6a04))/0x3e8)),_0x1c766a=_0x19c2d1[_0x42ae37(0x4d9)](_0x1cf9e2=>_0x1cf9e2[_0x42ae37(0x3cb)]===_0x42ae37(0x5de)),_0x3df62d=_0x19c2d1[_0x42ae37(0x3fb)](_0x192920=>_0x192920[_0x42ae37(0x3cb)]===_0x42ae37(0x42e));if(_0x1c766a||_0x3df62d[_0x42ae37(0x1b1)])return{'primary':_0x1c766a?{'pid':_0x1c766a[_0x42ae37(0x690)],'uptime':_0x2df2aa(_0x1c766a)}:null,'workers':_0x3df62d['map'](_0x43e17d=>({'pid':_0x43e17d[_0x42ae37(0x690)],'uptime':_0x2df2aa(_0x43e17d)})),'workersConfigured':_0x1c766a?.['meta']?.['workersConfigured']??_0x3df62d[_0x42ae37(0x1b1)],'mode':_0x42ae37(0x543)};const _0x498830=_0x19c2d1['find'](_0x2baff7=>_0x2baff7[_0x42ae37(0x3cb)]===_0x42ae37(0x2b5)||_0x2baff7[_0x42ae37(0x3cb)]==='standalone'||_0x2baff7[_0x42ae37(0x3cb)]===_0x42ae37(0x3ac)),_0x19d63e=_0x498830?{'pid':_0x498830[_0x42ae37(0x690)],'uptime':_0x2df2aa(_0x498830)}:{'pid':process['pid'],'uptime':Math[_0x42ae37(0x46c)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x19d63e,'workers':[_0x19d63e],'workersConfigured':0x1,'mode':_0x42ae37(0x4a3)};}[_0x56c6d7(0x2cf)](){const _0x1cf497=_0x56c6d7;return this[_0x1cf497(0x5d8)]();}['treeView'](){const _0x12688f=_0x56c6d7,_0x1bfa02=new Map();for(const _0x3b35d5 of this[_0x12688f(0x5d8)]())_0x1bfa02['set'](_0x3b35d5[_0x12688f(0x51a)],{..._0x3b35d5,'children':[]});const _0xa01079=[];for(const _0x448299 of _0x1bfa02['values']()){const _0x365bed=_0x448299[_0x12688f(0x53b)]?_0x1bfa02[_0x12688f(0x5e0)](_0x448299['supervisorKey']):null;if(_0x365bed&&_0x365bed!==_0x448299)_0x365bed[_0x12688f(0x6d2)][_0x12688f(0x494)](_0x448299);else _0xa01079['push'](_0x448299);}const _0x337f51=(_0x2ebc1c,_0x5944d1)=>_0x2ebc1c[_0x12688f(0x3cb)]===_0x5944d1[_0x12688f(0x3cb)]?(_0x2ebc1c['pid']||0x0)-(_0x5944d1['pid']||0x0):(_0x2ebc1c[_0x12688f(0x3cb)]??'')<(_0x5944d1[_0x12688f(0x3cb)]??'')?-0x1:0x1,_0x4cc78d=_0x4fa917=>{const _0x3ee41e=_0x12688f;_0x4fa917[_0x3ee41e(0x4ba)](_0x337f51);for(const _0x3607fb of _0x4fa917)if(_0x3607fb[_0x3ee41e(0x6d2)][_0x3ee41e(0x1b1)])_0x4cc78d(_0x3607fb['children']);};return _0x4cc78d(_0xa01079),_0xa01079;}[_0x56c6d7(0x415)](_0x1d91ba){const _0xf0de54=_0x56c6d7;return this[_0xf0de54(0x5d8)]()[_0xf0de54(0x4d9)](_0x81a7d3=>_0x81a7d3[_0xf0de54(0x51a)]===_0x1d91ba)??null;}[_0x56c6d7(0x5d8)](_0x31e079=Date[_0x56c6d7(0x6a7)]()){const _0x602df3=_0x56c6d7,_0x5f32cd=new Map();for(const _0x51c99a of this['listNodes']()){const _0x2a387f=_0x4b8e71(_0x51c99a);let _0x1f940a=_0x5f32cd[_0x602df3(0x5e0)](_0x2a387f);!_0x1f940a&&(_0x1f940a={'processKey':_0x2a387f,'nodeKey':_0x2a387f,'pid':_0x51c99a[_0x602df3(0x690)],'ppid':_0x51c99a[_0x602df3(0x2ed)]??null,'host':_0x51c99a[_0x602df3(0x2d6)]??null,'kind':_0x51c99a[_0x602df3(0x3cb)],'role':null,'supervisorKey':_0x51c99a[_0x602df3(0x53b)]??null,'slot':_0x51c99a[_0x602df3(0x5ce)]??null,'slotKey':_0x51c99a[_0x602df3(0x678)]??null,'caps':_0x51c99a['caps']??null,'lifecycle':_0x51c99a[_0x602df3(0x63a)]??null,'uptime':Math[_0x602df3(0x46c)](0x0,Math[_0x602df3(0x40d)]((_0x31e079-(_0x51c99a[_0x602df3(0x314)]||_0x31e079))/0x3e8)),'startedAt':_0x51c99a['startedAt']??null,'meta':_0x51c99a[_0x602df3(0x2e5)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5f32cd[_0x602df3(0x238)](_0x2a387f,_0x1f940a));_0x1f940a[_0x602df3(0x1bf)][_0x602df3(0x494)]({'instanceId':_0x51c99a[_0x602df3(0x377)]??null,'role':_0x51c99a[_0x602df3(0x222)]??null,'listenAddr':_0x51c99a['listenAddr']??null,'lifecycle':_0x51c99a[_0x602df3(0x63a)]??null,'processing':_0x51c99a['processing']??null});if(!_0x1f940a[_0x602df3(0x222)]&&_0x51c99a[_0x602df3(0x222)])_0x1f940a[_0x602df3(0x222)]=_0x51c99a[_0x602df3(0x222)];if(!_0x1f940a[_0x602df3(0x41b)]&&_0x51c99a[_0x602df3(0x41b)])_0x1f940a[_0x602df3(0x41b)]=_0x51c99a[_0x602df3(0x41b)];if(!_0x1f940a[_0x602df3(0x304)]&&_0x51c99a[_0x602df3(0x304)])_0x1f940a[_0x602df3(0x304)]=_0x51c99a['processing'];if(!_0x1f940a[_0x602df3(0x5bf)]&&_0x51c99a[_0x602df3(0x5bf)])_0x1f940a[_0x602df3(0x5bf)]=_0x51c99a[_0x602df3(0x5bf)];if(!_0x1f940a[_0x602df3(0x70a)]&&_0x51c99a[_0x602df3(0x70a)])_0x1f940a[_0x602df3(0x70a)]=_0x51c99a['singletonClaims'];if(_0x1f940a[_0x602df3(0x56e)]==null&&_0x51c99a[_0x602df3(0x56e)])_0x1f940a[_0x602df3(0x56e)]=_0x51c99a['caps'];if(_0x51c99a[_0x602df3(0x55e)]&&(!_0x1f940a[_0x602df3(0x55e)]||(_0x51c99a[_0x602df3(0x55e)]['at']??0x0)>(_0x1f940a[_0x602df3(0x55e)]['at']??0x0)))_0x1f940a[_0x602df3(0x55e)]=_0x51c99a[_0x602df3(0x55e)];}return[..._0x5f32cd['values']()];}[_0x56c6d7(0x6f2)](){const _0x4c6c2d=_0x56c6d7,_0x11d2a0=[],_0x5b7e02={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2f81fe of this[_0x4c6c2d(0x5d8)]()){_0x11d2a0[_0x4c6c2d(0x494)]({'processKey':_0x2f81fe[_0x4c6c2d(0x51a)],'kind':_0x2f81fe[_0x4c6c2d(0x3cb)],'pid':_0x2f81fe[_0x4c6c2d(0x690)],'supervisorKey':_0x2f81fe[_0x4c6c2d(0x53b)],'meta':_0x2f81fe[_0x4c6c2d(0x2e5)]??null,'uptime':_0x2f81fe[_0x4c6c2d(0x6db)],'stats':_0x2f81fe[_0x4c6c2d(0x55e)]??null}),_0x5b7e02[_0x4c6c2d(0x683)]++;if(_0x2f81fe['stats']){_0x5b7e02[_0x4c6c2d(0x2d3)]+=_0x2f81fe['stats'][_0x4c6c2d(0x2d3)]||0x0,_0x5b7e02[_0x4c6c2d(0x262)]+=(_0x2f81fe[_0x4c6c2d(0x55e)][_0x4c6c2d(0x262)]||0x0)+(_0x2f81fe[_0x4c6c2d(0x55e)][_0x4c6c2d(0x451)]?.['heapUsed']||0x0);const _0x8ef75c=_0x2f81fe[_0x4c6c2d(0x55e)][_0x4c6c2d(0x451)];_0x8ef75c&&(_0x5b7e02[_0x4c6c2d(0x451)][_0x4c6c2d(0x1df)]+=_0x8ef75c[_0x4c6c2d(0x1df)]||0x0,_0x5b7e02[_0x4c6c2d(0x451)][_0x4c6c2d(0x2d8)]+=_0x8ef75c[_0x4c6c2d(0x2d8)]||0x0,_0x5b7e02[_0x4c6c2d(0x451)][_0x4c6c2d(0x34a)]+=_0x8ef75c['busy']||0x0);}}return{'totals':_0x5b7e02,'nodes':_0x11d2a0};}async[_0x56c6d7(0x6ef)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x15b23c=_0x56c6d7;this['_isWriter']=this[_0x15b23c(0x72b)]||!!writer,this[_0x15b23c(0x472)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x15b23c(0x4ac)]||(_0x17d07e[_0x15b23c(0x4cb)]?'http-server':_0x15b23c(0x2b5)),this[_0x15b23c(0x27a)]=supervisorKey??this[_0x15b23c(0x27a)],this[_0x15b23c(0x4ab)]=listenAddr??this[_0x15b23c(0x4ab)],this[_0x15b23c(0x2b9)](),await this[_0x15b23c(0x65c)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x108856=await this['okdb'][_0x15b23c(0x77e)](_0x5b8670,{'sync':![],'durability':_0x15b23c(0x1bc)});await _0x108856['ensureType'](_0x11e5a7),this['_statusEnv']=_0x108856;}return this[_0x15b23c(0x4e9)];}[_0x56c6d7(0x358)](){const _0x4098e3=_0x56c6d7;return this[_0x4098e3(0x3d3)]!==this['_statusEnv']&&(this[_0x4098e3(0x3d3)]=this['_statusEnv'],this[_0x4098e3(0x641)]=this[_0x4098e3(0x4e9)][_0x4098e3(0x63b)](_0x11e5a7)[_0x4098e3(0x268)]),this[_0x4098e3(0x641)];}['_putRowAsync'](_0x3db7b5){const _0x239661=_0x56c6d7;if(_0x4c34c9)return this[_0x239661(0x358)]()['putSync'](_0x3db7b5[_0x239661(0x2e1)],_0x3db7b5,0x1);const _0x4c319d=this['_nodeDb']()['put'](_0x3db7b5[_0x239661(0x2e1)],_0x3db7b5,0x1);if(_0x4c319d&&typeof _0x4c319d[_0x239661(0x1c9)]===_0x239661(0x76e))_0x4c319d[_0x239661(0x1c9)](undefined,()=>{});return _0x4c319d;}[_0x56c6d7(0x3f1)](_0xfdc8c3){const _0x106657=_0x56c6d7;return this[_0x106657(0x358)]()['putSync'](_0xfdc8c3['nodeKey'],_0xfdc8c3,0x1);}['_removeRowAsync'](_0x137294){const _0x54861c=_0x56c6d7;if(_0x4c34c9)try{return this['_nodeDb']()[_0x54861c(0x5b4)](_0x137294);}catch{return![];}const _0x32b908=this[_0x54861c(0x358)]()[_0x54861c(0x43f)](_0x137294);if(_0x32b908&&typeof _0x32b908[_0x54861c(0x1c9)]===_0x54861c(0x76e))_0x32b908[_0x54861c(0x1c9)](undefined,()=>{});return _0x32b908;}async[_0x56c6d7(0x6ab)](_0x1477aa){const _0x56c6bb=_0x56c6d7;if(!this[_0x56c6bb(0x4e9)]||!this[_0x56c6bb(0x72b)]||!_0x1477aa?.['nodeKey'])return;return this[_0x56c6bb(0x365)](_0x1477aa);}async['removeNode'](_0x59fe9d){const _0x3ba18f=_0x56c6d7;if(!this[_0x3ba18f(0x4e9)]||!this[_0x3ba18f(0x72b)]||!_0x59fe9d)return;const _0x26915a=_0x59fe9d[_0x3ba18f(0x70f)]('#'),_0x13254f=[];for(const {key:_0x494832}of this[_0x3ba18f(0x4e9)][_0x3ba18f(0x433)](_0x11e5a7)){if(_0x494832===_0x59fe9d||!_0x26915a&&typeof _0x494832===_0x3ba18f(0x54f)&&_0x494832['startsWith'](_0x59fe9d+'#'))_0x13254f[_0x3ba18f(0x494)](_0x494832);}for(const _0x20fb7e of _0x13254f){try{this[_0x3ba18f(0x358)]()['removeSync'](_0x20fb7e);}catch{}}}[_0x56c6d7(0x631)](_0x3b3c5f){const _0x5ea04b=_0x56c6d7;if(typeof _0x3b3c5f?.[_0x5ea04b(0x690)]!==_0x5ea04b(0x758))return![];if(_0x3b3c5f[_0x5ea04b(0x2d6)]!==_0x48a730['hostname']())return![];if(_0x3b3c5f[_0x5ea04b(0x690)]===process[_0x5ea04b(0x690)])return![];if(_0x3b3c5f[_0x5ea04b(0x337)]!=null&&_0x3b3c5f[_0x5ea04b(0x337)]<Date[_0x5ea04b(0x6a7)]()-_0xedac51)return!![];try{return process['kill'](_0x3b3c5f[_0x5ea04b(0x690)],0x0),![];}catch(_0x32c080){return _0x32c080['code']===_0x5ea04b(0x25a);}}[_0x56c6d7(0x606)](){const _0x460845=_0x56c6d7;if(!this['_statusEnv'])return[];try{this[_0x460845(0x4e9)]['db']?.[_0x460845(0x1e1)]?.();}catch{}const _0x2d5a9c=Date[_0x460845(0x6a7)](),_0x4e8860=_0x48a730['hostname'](),_0x4756cc=[];for(const {value:_0x48dc4a}of this[_0x460845(0x4e9)][_0x460845(0x433)](_0x11e5a7)){if(!_0x48dc4a)continue;let _0x3c56a6=null;_0x48dc4a[_0x460845(0x2d6)]===_0x4e8860&&typeof _0x48dc4a[_0x460845(0x690)]==='number'&&(_0x3c56a6=!this[_0x460845(0x631)](_0x48dc4a));if(_0x3c56a6===![])continue;const _0x3cb135=_0x48dc4a['expiresAt']==null||_0x48dc4a[_0x460845(0x337)]>=_0x2d5a9c;if(_0x3c56a6===!![]||_0x3cb135)_0x4756cc['push'](_0x48dc4a);}return _0x4756cc;}async[_0x56c6d7(0x6ce)](_0xa72859=0x0){const _0x5f4cc=_0x56c6d7;if(!this[_0x5f4cc(0x4e9)]||!this[_0x5f4cc(0x72b)])return;const _0x5346a8=Date[_0x5f4cc(0x6a7)]()-_0xa72859,_0xd56b6f=new Set(),_0x1ffc18=[],_0x1cb933=_0x48a730['hostname'](),_0x4eb2b2=require$$3['version'];for(const {key:_0x155143,value:_0x46b239}of this['_statusEnv']['getRange'](_0x11e5a7)){if(!_0x46b239)continue;const _0x5ca093=_0x46b239[_0x5f4cc(0x2d6)]===_0x1cb933&&typeof _0x46b239[_0x5f4cc(0x690)]===_0x5f4cc(0x758),_0x64977a=_0x5ca093?this[_0x5f4cc(0x631)](_0x46b239):_0x46b239[_0x5f4cc(0x337)]!=null&&_0x46b239[_0x5f4cc(0x337)]<_0x5346a8;if(_0x64977a)_0x1ffc18[_0x5f4cc(0x494)](_0x155143);else{_0xd56b6f['add'](_0x4b8e71(_0x46b239)??_0x155143);if(_0x46b239['version']&&_0x46b239[_0x5f4cc(0x214)]!==_0x4eb2b2){if(!this[_0x5f4cc(0x18f)])this[_0x5f4cc(0x18f)]=new Set();!this[_0x5f4cc(0x18f)][_0x5f4cc(0x4e7)](_0x46b239['version'])&&(this['_versionSkewWarned']['add'](_0x46b239[_0x5f4cc(0x214)]),this[_0x5f4cc(0x3ea)][_0x5f4cc(0x547)]?.[_0x5f4cc(0x305)]?.(_0x5f4cc(0x701)+(_0x46b239[_0x5f4cc(0x690)]??'?')+_0x5f4cc(0x798)+_0x46b239[_0x5f4cc(0x214)]+'\x20while\x20this\x20process\x20runs\x20'+_0x4eb2b2+_0x5f4cc(0x43e)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x5f4cc(0x2af)}));}}}for(const _0x84d5b of _0x1ffc18)this[_0x5f4cc(0x29a)](_0x84d5b);if(this[_0x5f4cc(0x2b9)]()){const _0x559885=[];for(const {key:_0x181447}of this[_0x5f4cc(0x621)](_0x5f4cc(0x4b5))){if(!_0xd56b6f[_0x5f4cc(0x4e7)](_0x181447)){if(_0x4c34c9)try{this[_0x5f4cc(0x1cc)]['removeSync'](_0x5f4cc(0x587)+_0x181447);}catch{}else _0x559885[_0x5f4cc(0x494)](this['_desired'][_0x5f4cc(0x43f)]('node/'+_0x181447));}}if(_0x559885[_0x5f4cc(0x1b1)])await Promise[_0x5f4cc(0x757)](_0x559885);}}['startHeartbeat'](_0x48028b=null){const _0x938c5c=_0x56c6d7;if(this[_0x938c5c(0x4f0)])return;if(!this['_isWriter']||!this[_0x938c5c(0x4e9)]){this['okdb']?.[_0x938c5c(0x547)]?.[_0x938c5c(0x305)]?.(_0x938c5c(0x770)+this[_0x938c5c(0x72b)]+_0x938c5c(0x720)+!!this[_0x938c5c(0x4e9)]+_0x938c5c(0x604),{'feature':_0x938c5c(0x683)});return;}this[_0x938c5c(0x5a0)]=_0x48028b,this[_0x938c5c(0x326)]=()=>this[_0x938c5c(0x21a)]();for(const _0x106a59 of _0x5c550e)this['okdb'][_0x938c5c(0x2b0)]['on'](_0x106a59,this[_0x938c5c(0x326)]);this[_0x938c5c(0x59f)]();const _0x15df8e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x46f492;this[_0x938c5c(0x4f0)]=setInterval(()=>{const _0x10f234=_0x938c5c;if(this[_0x10f234(0x5a0)])try{this[_0x10f234(0x5a0)]();}catch{}this[_0x10f234(0x59f)](),this[_0x10f234(0x6ce)]()[_0x10f234(0x58b)](()=>{});},_0x15df8e);if(this[_0x938c5c(0x4f0)][_0x938c5c(0x6d1)])this[_0x938c5c(0x4f0)]['unref']();}[_0x56c6d7(0x21a)](){const _0x215bc1=_0x56c6d7;if(!this[_0x215bc1(0x72b)]||!this[_0x215bc1(0x4e9)])return;if(Date[_0x215bc1(0x6a7)]()-this[_0x215bc1(0x220)]<_0x9fad60)return;this[_0x215bc1(0x59f)]();}[_0x56c6d7(0x59f)](){const _0x1911dc=_0x56c6d7;if(!this[_0x1911dc(0x72b)]||!this['_statusEnv'])return;this[_0x1911dc(0x220)]=Date[_0x1911dc(0x6a7)]();try{const _0x4dd5d4=[this[_0x1911dc(0x28d)]()];for(const _0x474e19 of this['_children']['values']())_0x4dd5d4[_0x1911dc(0x494)](this[_0x1911dc(0x296)](_0x474e19));const _0x43dbcc=_0x5b89aa[_0x1911dc(0x344)]?_0x5b89aa[_0x1911dc(0x6a7)]():0x0;for(const _0x1e7717 of _0x4dd5d4){try{this['_putRowSync'](_0x1e7717),this[_0x1911dc(0x49b)]=![];}catch(_0x4b4fbc){!this[_0x1911dc(0x49b)]&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x1911dc(0x547)]?.[_0x1911dc(0x305)]?.(_0x1911dc(0x2c0)+_0x4b4fbc[_0x1911dc(0x246)],{'feature':_0x1911dc(0x683)}));}}if(_0x5b89aa[_0x1911dc(0x344)])_0x5b89aa[_0x1911dc(0x1cb)]('registry-publish',_0x5b89aa['now']()-_0x43dbcc,'rows='+_0x4dd5d4[_0x1911dc(0x1b1)]+_0x1911dc(0x20d));}catch(_0x323c67){!this[_0x1911dc(0x49b)]&&(this['_publishFailWarned']=!![],this[_0x1911dc(0x3ea)]?.[_0x1911dc(0x547)]?.['warn']?.(_0x1911dc(0x2c0)+_0x323c67[_0x1911dc(0x246)],{'feature':_0x1911dc(0x683)}));}}async[_0x56c6d7(0x5c4)](){const _0x153ab1=_0x56c6d7;if(this[_0x153ab1(0x326)]){for(const _0x25a60d of _0x5c550e){try{this['okdb']['events']['off'](_0x25a60d,this['_onProcEvent']);}catch{}}this[_0x153ab1(0x326)]=null;}this[_0x153ab1(0x4f0)]&&(clearInterval(this[_0x153ab1(0x4f0)]),this[_0x153ab1(0x4f0)]=null);try{if(this[_0x153ab1(0x4e9)]&&this[_0x153ab1(0x72b)])await this['removeNode'](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0x170598=_0x56c6d7;if(!this[_0x170598(0x4e9)]||!this['_isWriter'])return;try{await this[_0x170598(0x649)](this[_0x170598(0x47d)]);}catch{}try{const _0x53e49e=[];for(const {value:_0x518efd}of this[_0x170598(0x4e9)][_0x170598(0x433)](_0x11e5a7)){if(_0x518efd?.[_0x170598(0x2ed)]===process[_0x170598(0x690)]&&_0x518efd[_0x170598(0x2e1)])_0x53e49e[_0x170598(0x494)](_0x518efd[_0x170598(0x2e1)]);}for(const _0xb03255 of _0x53e49e){try{await this['removeNode'](_0xb03255);}catch{}}}catch{}}async['publishOwnRow'](){const _0x709276=_0x56c6d7;return this[_0x709276(0x6ab)](this[_0x709276(0x28d)]());}async['publishChildRow'](_0x4aab8b){const _0x4d3c70=_0x56c6d7;if(!this[_0x4d3c70(0x4e9)]||!this[_0x4d3c70(0x72b)])return;return this['putNode'](this[_0x4d3c70(0x296)](_0x4aab8b));}['_buildChildRow']({pid:_0x141e2a,startedAt:_0x2acd06,kind:_0x326631,supervisorKey:_0x2dd928,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x4a850d=_0x56c6d7,_0x44ca4e=Date[_0x4a850d(0x6a7)](),_0x2319d7=_0x1e284e(_0x141e2a,_0x2acd06);return{'nodeKey':_0x33c90c(_0x2319d7,'0'),'processKey':_0x2319d7,'instanceId':'0','pid':_0x141e2a,'startedAt':_0x2acd06,'ppid':process[_0x4a850d(0x690)],'host':_0x48a730[_0x4a850d(0x394)](),'supervisorKey':_0x2dd928,'slot':slot,'slotKey':slotKey,'kind':_0x326631,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x44ca4e,'expiresAt':_0x44ca4e+_0x4a1334,'caps':this[_0x4a850d(0x569)](_0x326631,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x56c6d7(0x5b8)](_0x2fbec7){const _0x563865=_0x56c6d7;if(!_0x2fbec7?.[_0x563865(0x690)])return null;const _0x455651=_0x1e284e(_0x2fbec7['pid'],_0x2fbec7[_0x563865(0x314)]);this['_children'][_0x563865(0x238)](_0x455651,{..._0x2fbec7,'supervisorKey':_0x2fbec7['supervisorKey']??this[_0x563865(0x668)]});if(this['_isWriter'])await this[_0x563865(0x478)](this[_0x563865(0x1d4)]['get'](_0x455651))[_0x563865(0x58b)]?.(()=>{});return _0x455651;}['removeSupervisedChild'](_0x4514ad){const _0x15f80b=_0x56c6d7;if(!_0x4514ad)return;return this['_children'][_0x15f80b(0x614)](_0x4514ad),this[_0x15f80b(0x649)](_0x4514ad);}['_sampleOwnStats'](){const _0x48f0d6=_0x56c6d7,_0x164668=Date['now'](),_0x1db6b1=process[_0x48f0d6(0x560)](),_0x20cd2f=(_0x164668-this['_lastCpuAt'])*0x3e8;if(_0x20cd2f>=0x3d090){const _0x245d0a=_0x1db6b1['user']-this[_0x48f0d6(0x67f)][_0x48f0d6(0x468)]+(_0x1db6b1['system']-this[_0x48f0d6(0x67f)][_0x48f0d6(0x256)]),_0x54ed4d=_0x48a730['cpus']()['length']||0x1;this[_0x48f0d6(0x489)]=Math[_0x48f0d6(0x4a8)](0x64,Math[_0x48f0d6(0x40d)](_0x245d0a/(_0x20cd2f*_0x54ed4d)*0x64)),this['_lastCpuWindowMs']=Math[_0x48f0d6(0x40d)](_0x20cd2f/0x3e8),this[_0x48f0d6(0x67f)]=_0x1db6b1,this['_lastCpuAt']=_0x164668;}const _0x1b4757=process['memoryUsage'](),_0x47b4d7=this[_0x48f0d6(0x1b5)][_0x48f0d6(0x50f)];let _0x50c3eb=0x0;if(_0x47b4d7>0x0){const _0x2a5bcb=[this[_0x48f0d6(0x3ea)],...this['okdb'][_0x48f0d6(0x221)]?.[_0x48f0d6(0x637)]?.()??[]];for(const _0x354c48 of _0x2a5bcb){const _0x51b90e=_0x354c48[_0x48f0d6(0x6d7)]?.[_0x48f0d6(0x3cf)];if(_0x51b90e)_0x50c3eb+=_0x51b90e[_0x48f0d6(0x78e)][_0x48f0d6(0x34a)];}}let _0x3f379b=null;const _0x3c33d1=_0x47b4d7;if(_0x3c33d1>0x0){let _0x33ea28=0x0;for(const _0x4c69dc of this['_threadStats'][_0x48f0d6(0x637)]())_0x33ea28+=_0x4c69dc[_0x48f0d6(0x262)]||0x0;_0x3f379b={'count':_0x3c33d1,'heapUsed':_0x33ea28,'sandbox':_0x47b4d7,'busy':_0x50c3eb};}return{'rss':_0x1b4757[_0x48f0d6(0x2d3)],'heapUsed':_0x1b4757[_0x48f0d6(0x262)],'heapTotal':_0x1b4757[_0x48f0d6(0x4ae)],'external':_0x1b4757[_0x48f0d6(0x50d)],'cpuPct':this[_0x48f0d6(0x489)],'cpuWindowMs':this[_0x48f0d6(0x785)]??null,'threads':_0x3f379b,'at':_0x164668};}[_0x56c6d7(0x36b)](_0x13d60f,_0xf00d44){const _0x5d889d=_0x56c6d7;if(!_0x13d60f||!_0xf00d44)return;this[_0x5d889d(0x1b5)][_0x5d889d(0x238)](_0x13d60f,_0xf00d44);}[_0x56c6d7(0x6d0)](_0x2b36b0){const _0x1f15a2=_0x56c6d7;this[_0x1f15a2(0x1b5)][_0x1f15a2(0x614)](_0x2b36b0);}[_0x56c6d7(0x2e7)](_0x49c0c4,_0x3c3b5f,_0xf23c0c=undefined){const _0x526c4a=_0x56c6d7,_0x423f7b=this[_0x526c4a(0x1d4)][_0x526c4a(0x5e0)](_0x49c0c4);if(!_0x423f7b||!_0x3c3b5f)return;if(_0xf23c0c!==undefined)_0x423f7b['processing']=_0xf23c0c;_0x423f7b[_0x526c4a(0x55e)]={'rss':_0x3c3b5f['rss']??null,'heapUsed':_0x3c3b5f[_0x526c4a(0x262)]??null,'heapTotal':_0x3c3b5f['heapTotal']??null,'external':_0x3c3b5f[_0x526c4a(0x50d)]??null,'cpuPct':_0x3c3b5f['cpuPct']??null,'cpuWindowMs':_0x3c3b5f[_0x526c4a(0x483)]??null,'threads':_0x3c3b5f[_0x526c4a(0x451)]??null,'claims':_0x3c3b5f[_0x526c4a(0x343)]??null,'envsOpen':_0x3c3b5f[_0x526c4a(0x225)]??null,'at':Date[_0x526c4a(0x6a7)]()};}['_buildOwnRow'](){const _0x1cf188=_0x56c6d7,_0x1e965a=Date[_0x1cf188(0x6a7)](),_0x287692=this['okdb'][_0x1cf188(0x1fb)]||{},_0x333608=this[_0x1cf188(0x4ac)]||_0x1cf188(0x2b5);return{'nodeKey':this[_0x1cf188(0x47d)],'processKey':this[_0x1cf188(0x668)],'instanceId':this[_0x1cf188(0x199)],'pid':process['pid'],'startedAt':this[_0x1cf188(0x526)],'instanceStartedAt':this[_0x1cf188(0x684)],'ppid':typeof process[_0x1cf188(0x2ed)]===_0x1cf188(0x758)?process[_0x1cf188(0x2ed)]:null,'host':_0x48a730[_0x1cf188(0x394)](),'supervisorKey':this['_supervisorKey']??null,'version':require$$3[_0x1cf188(0x214)],'kind':_0x333608,'role':{'engines':!!_0x287692[_0x1cf188(0x5bf)],'processors':!!_0x287692[_0x1cf188(0x1a4)],'compaction':_0x287692[_0x1cf188(0x37b)],'http':_0x287692[_0x1cf188(0x277)]},'listenAddr':this[_0x1cf188(0x4ab)]??null,'heartbeatAt':_0x1e965a,'expiresAt':_0x1e965a+_0x4a1334,'caps':this['_caps'](_0x333608,_0x287692),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x1cf188(0x4c7)]},'processing':_0x287692[_0x1cf188(0x1a4)]?this[_0x1cf188(0x6dd)]():null,'engines':_0x287692['engines']?[...this['okdb']['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x1cf188(0x2e9)](),'writers':this[_0x1cf188(0x4d3)]()};}[_0x56c6d7(0x4d3)](){const _0x4e7d18=_0x56c6d7,_0x22cb5e={};try{for(const [_0x31ccf6,_0x259c5d]of this['okdb'][_0x4e7d18(0x221)]){try{const _0x1c5aa5=_0x259c5d['writerStatus']?.();if(!_0x1c5aa5)continue;if(!_0x1c5aa5[_0x4e7d18(0x440)]&&!_0x1c5aa5[_0x4e7d18(0x327)]&&!(_0x1c5aa5[_0x4e7d18(0x31c)]??0x0)&&!_0x1c5aa5[_0x4e7d18(0x18b)])continue;_0x22cb5e[_0x31ccf6]={'depth':_0x1c5aa5[_0x4e7d18(0x440)],'oldestPendingMs':_0x1c5aa5[_0x4e7d18(0x402)],'committed':_0x1c5aa5[_0x4e7d18(0x327)],'commitsPerSec':_0x1c5aa5[_0x4e7d18(0x69f)],'commitP99Ms':_0x1c5aa5[_0x4e7d18(0x3f5)],'parkedNow':_0x1c5aa5[_0x4e7d18(0x31c)]??0x0,'draining':!!_0x1c5aa5[_0x4e7d18(0x18b)]};}catch{}}}catch{}return Object[_0x4e7d18(0x35c)](_0x22cb5e)[_0x4e7d18(0x1b1)]?_0x22cb5e:null;}[_0x56c6d7(0x6c6)](){const _0x56b151=_0x56c6d7,_0x1462db=process['pid'],_0x233d4b=Date[_0x56b151(0x6a7)](),_0x29d95a=_0x26272d=>{const _0x58fecc=_0x56b151;if(!_0x26272d)return[];const _0x54bc06=[];try{for(const {id:_0xda0317,entry:_0x4a0b77}of _0x26272d[_0x58fecc(0x772)]()){if(_0x4a0b77?.['holder']?.['pid']!==_0x1462db)continue;const _0x1c5e7d=_0x4a0b77[_0x58fecc(0x1b8)]??_0x4a0b77[_0x58fecc(0x40f)]??0x0;if(_0x1c5e7d+(_0x4a0b77['ttlMs']??0x0)<_0x233d4b)continue;_0x54bc06['push'](_0xda0317);}}catch{}return _0x54bc06;},_0x3b2db5=_0x29d95a(this[_0x56b151(0x424)]('compact')),_0x1b5670=_0x29d95a(this[_0x56b151(0x424)](_0x56b151(0x45e)));if(!_0x3b2db5[_0x56b151(0x1b1)]&&!_0x1b5670[_0x56b151(0x1b1)])return null;return{'compact':_0x3b2db5,'replicate':_0x1b5670};}['_singletonLock'](_0x3aacb2){const _0x547285=_0x56c6d7;if(!this[_0x547285(0x3ea)]?.[_0x547285(0x442)])return null;if(!this[_0x547285(0x4ec)])this[_0x547285(0x4ec)]=new Map();let _0x17696a=this[_0x547285(0x4ec)][_0x547285(0x5e0)](_0x3aacb2);if(!_0x17696a)try{_0x17696a=new _0x200f4c(this[_0x547285(0x3ea)][_0x547285(0x442)],{'namespace':_0x3aacb2}),this['_singletonLocks'][_0x547285(0x238)](_0x3aacb2,_0x17696a);}catch{return null;}return _0x17696a;}[_0x56c6d7(0x6dd)](){const _0x59b68a=_0x56c6d7,_0x50389f=[];try{for(const [_0x46ecf7,_0x45a510]of this[_0x59b68a(0x3ea)][_0x59b68a(0x221)]){if(_0x46ecf7['startsWith']('~'))continue;for(const _0x2e0563 of _0x45a510[_0x59b68a(0x6c0)][_0x59b68a(0x59c)]())_0x50389f[_0x59b68a(0x494)]({..._0x2e0563,'env':_0x46ecf7});}}catch{}return{'participate':this['okdb']['processors']?.['_participate']??![],'processors':_0x50389f};}[_0x56c6d7(0x2b9)](){const _0x24e432=_0x56c6d7;if(this[_0x24e432(0x1cc)])return!![];const _0x467d6e=this[_0x24e432(0x3ea)]['_rootDb'];if(!_0x467d6e)return![];return this[_0x24e432(0x1cc)]=_0x467d6e['openDB'](_0x66c40d,{'dupSort':![]}),this[_0x24e432(0x7a2)]=_0x467d6e[_0x24e432(0x748)](_0x147395,{'dupSort':![]}),!![];}async[_0x56c6d7(0x65c)](){const _0x2cef2d=_0x56c6d7;if(!this[_0x2cef2d(0x2b9)]())return;const _0x37ac48=_0x2cef2d(0x339),_0x10ac05=0x1,_0x56aee5=this[_0x2cef2d(0x1cc)][_0x2cef2d(0x5e0)](_0x37ac48)??0x0;if(_0x56aee5>=_0x10ac05)return;const _0x3a1d2c=_0xa2603b=>{const _0x49be18=_0x2cef2d;if(_0xa2603b===_0x49be18(0x5d7))return'single';if(_0xa2603b==='async')return _0x49be18(0x52d);return _0xa2603b;};await this['okdb'][_0x2cef2d(0x6cd)][_0x2cef2d(0x1c8)]['transaction'](()=>{const _0x5f04f1=_0x2cef2d;for(const _0x385d59 of[_0x5f04f1(0x47a),_0x5f04f1(0x2f5)]){for(const {key:_0x22c517,value:_0x42658b}of this[_0x5f04f1(0x1cc)][_0x5f04f1(0x433)]({'start':_0x385d59,'end':_0x385d59+'\xff'})){if(typeof _0x22c517!==_0x5f04f1(0x54f)||!_0x22c517['startsWith'](_0x385d59))break;const _0x5a9f35=_0x3a1d2c(_0x42658b[_0x5f04f1(0x274)]);if(_0x5a9f35!==_0x42658b[_0x5f04f1(0x274)])this[_0x5f04f1(0x1cc)][_0x5f04f1(0x4cd)](_0x22c517,{..._0x42658b,'mode':_0x5a9f35});}}this['_desired'][_0x5f04f1(0x4cd)](_0x37ac48,_0x10ac05);});}[_0x56c6d7(0x4cc)](){const _0x487e80=_0x56c6d7;return!!this[_0x487e80(0x1cc)];}[_0x56c6d7(0x6a3)](_0x4d154a,_0x5175fa){const _0x56801=_0x56c6d7;if(!this['_ensureDesired']())return null;const _0x3e6266=_0x4d154a+'/'+_0x5175fa;return this['_refreshDesiredSnapshot'](),this[_0x56801(0x501)][_0x56801(0x5e0)](_0x3e6266)??this[_0x56801(0x1cc)]['get'](_0x3e6266)??null;}[_0x56c6d7(0x32e)](){const _0x362066=_0x56c6d7;if(!_0x4c34c9)return;try{this[_0x362066(0x3ea)][_0x362066(0x6cd)]?.['db']?.[_0x362066(0x1e1)]?.();}catch{}}async[_0x56c6d7(0x6dc)](_0x4a2558,_0x53c192,_0x54f9b5){const _0x5d6a26=_0x56c6d7;if(!this[_0x5d6a26(0x2b9)]())return null;const _0x51ad9b=_0x4a2558+'/'+_0x53c192;this[_0x5d6a26(0x32e)]();const _0x4f3905=this[_0x5d6a26(0x501)]['get'](_0x51ad9b)??this['_desired'][_0x5d6a26(0x5e0)](_0x51ad9b)??{'version':0x0},_0xffc0c6=(_0x4f3905[_0x5d6a26(0x214)]||0x0)+0x1,_0x1cd5e9={..._0x4f3905,..._0x54f9b5,'version':_0xffc0c6,'updatedAt':Date[_0x5d6a26(0x6a7)]()};this['_desiredOverlay'][_0x5d6a26(0x238)](_0x51ad9b,_0x1cd5e9);try{await this[_0x5d6a26(0x3ea)][_0x5d6a26(0x6cd)][_0x5d6a26(0x1c8)][_0x5d6a26(0x480)](()=>{const _0x237815=_0x5d6a26;this[_0x237815(0x1cc)][_0x237815(0x4cd)](_0x51ad9b,_0x1cd5e9);});}finally{if(this[_0x5d6a26(0x501)][_0x5d6a26(0x5e0)](_0x51ad9b)===_0x1cd5e9)this['_desiredOverlay'][_0x5d6a26(0x614)](_0x51ad9b);}return _0xffc0c6;}['listDesired'](_0x41a33d){const _0x4589c7=_0x56c6d7;if(!this[_0x4589c7(0x2b9)]())return[];this[_0x4589c7(0x32e)]();const _0x190eb8=_0x41a33d+'/',_0x12667b=[];for(const {key:_0x36a701,value:_0xc40d31}of this[_0x4589c7(0x1cc)]['getRange']({'start':_0x190eb8,'end':_0x190eb8+'\xff'})){if(typeof _0x36a701!=='string'||!_0x36a701[_0x4589c7(0x72d)](_0x190eb8))break;_0x12667b[_0x4589c7(0x494)]({'key':_0x36a701[_0x4589c7(0x7a7)](_0x190eb8[_0x4589c7(0x1b1)]),'value':_0xc40d31});}return _0x12667b;}[_0x56c6d7(0x484)](_0x13b810){const _0x32a1a3=_0x56c6d7;if(!this[_0x32a1a3(0x2b9)]())return null;return this['_cmd'][_0x32a1a3(0x5e0)](_0x13b810)??null;}async['bumpCmd'](_0x243a4a,_0x189de4,_0x173238={}){const _0x40c8d2=_0x56c6d7;if(!this[_0x40c8d2(0x2b9)]())return null;let _0xfe8cea;return await this[_0x40c8d2(0x3ea)][_0x40c8d2(0x6cd)]['_writer'][_0x40c8d2(0x480)](()=>{const _0x52903a=_0x40c8d2,_0x3aa41b=this[_0x52903a(0x7a2)]['get'](_0x243a4a)||{'epoch':0x0};_0xfe8cea=(_0x3aa41b[_0x52903a(0x7ac)]||0x0)+0x1,this['_cmd'][_0x52903a(0x4cd)](_0x243a4a,{..._0x3aa41b,..._0x173238,'cmd':_0x189de4,'epoch':_0xfe8cea,'updatedAt':Date[_0x52903a(0x6a7)]()});}),_0xfe8cea;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x46bb1d,'nodeKey':_0x1e284e,'logicalKey':_0x20c1e7,'slotKey':_0x32fd5b,'PROCESS_ENV':_0x5b8670,'NODE_TYPE':_0x11e5a7},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x42c138=_0x5411c3;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5c9e21=require$$0$5,{EVENTS:_0x25970d,CHANGE_ACTIONS:_0x509b79}=requireOkdbEnums(),{LOOP:_0x2d6303}=requireOkdbLoopMonitor(),_0x68b248=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x29cf3e=0x5,_0xc44711=0x2710;class _0x437e47 extends _0x5c9e21{constructor(_0x136f55,_0x39bfe6={}){const _0x5bb5f0=_0x5511;super(),this[_0x5bb5f0(0x3ea)]=_0x136f55,this[_0x5bb5f0(0x44d)]=_0x39bfe6[_0x5bb5f0(0x60d)]??_0x68b248,this[_0x5bb5f0(0x2a4)]=_0x39bfe6[_0x5bb5f0(0x329)]??_0x29cf3e,this[_0x5bb5f0(0x436)]=_0x39bfe6[_0x5bb5f0(0x3b1)]??_0xc44711,this[_0x5bb5f0(0x44a)]=![],this[_0x5bb5f0(0x57f)]=new Map(),this[_0x5bb5f0(0x63d)]=new Map(),this['_pending']=new Map(),this[_0x5bb5f0(0x476)]=null,this[_0x5bb5f0(0x4eb)]=![],this[_0x5bb5f0(0x435)]=new Set(),this[_0x5bb5f0(0x2bf)]=_0x211602=>this[_0x5bb5f0(0x38d)](_0x211602),this[_0x5bb5f0(0x400)]=_0x31a798=>this['_handlePoke'](_0x31a798),this[_0x5bb5f0(0x591)]=()=>this['stop']();}['start'](){const _0x2c43a7=_0x5511;if(this[_0x2c43a7(0x44a)])return;this[_0x2c43a7(0x44a)]=!![];for(const [_0x92b7ac,_0x3c3dcd]of this[_0x2c43a7(0x3ea)][_0x2c43a7(0x221)]){if(_0x92b7ac[_0x2c43a7(0x72d)]('~'))continue;try{_0x3c3dcd[_0x2c43a7(0x554)]();}catch{}}for(const [_0x14dadc,_0x437e83]of this[_0x2c43a7(0x3ea)][_0x2c43a7(0x221)]){if(_0x14dadc[_0x2c43a7(0x72d)]('~'))continue;try{this[_0x2c43a7(0x63d)][_0x2c43a7(0x238)](_0x14dadc,_0x437e83[_0x2c43a7(0x61a)]()||0x0);}catch{}}const {events:_0xe43901}=this[_0x2c43a7(0x3ea)];_0xe43901['on'](_0x25970d[_0x2c43a7(0x32f)],this[_0x2c43a7(0x2bf)]),_0xe43901['on'](_0x25970d['ITEM_UPDATE'],this[_0x2c43a7(0x2bf)]),_0xe43901['on'](_0x25970d['ITEM_REMOVE'],this['_onItem']),_0xe43901['on'](_0x25970d[_0x2c43a7(0x2f6)],this[_0x2c43a7(0x400)]),_0xe43901[_0x2c43a7(0x78b)](_0x25970d[_0x2c43a7(0x2ec)],this[_0x2c43a7(0x591)]);}['stop'](){const _0x1b60ca=_0x5511;if(!this[_0x1b60ca(0x44a)])return;this['_started']=![];const {events:_0x504bf5}=this[_0x1b60ca(0x3ea)];_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d['ITEM_CREATE'],this[_0x1b60ca(0x2bf)]),_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d[_0x1b60ca(0x470)],this[_0x1b60ca(0x2bf)]),_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d[_0x1b60ca(0x43d)],this[_0x1b60ca(0x2bf)]),_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d['SYSTEM_POKE'],this[_0x1b60ca(0x400)]);try{_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d['SYSTEM_STOPPED'],this['_onStop']);}catch{}this[_0x1b60ca(0x476)]&&(clearTimeout(this[_0x1b60ca(0x476)]),this[_0x1b60ca(0x476)]=null),this[_0x1b60ca(0x2a8)]['clear'](),this['_cursors']['clear'](),this[_0x1b60ca(0x63d)]['clear'](),this[_0x1b60ca(0x435)][_0x1b60ca(0x22f)]();}[_0x42c138(0x1e3)](_0x470683,_0x3388f6,_0x4be74f,_0x876a73){return _0x470683+'\x00'+_0x3388f6+'\x00'+_0x4be74f+'\x00'+_0x876a73;}[_0x42c138(0x3ab)](_0x33b59f,_0x13db2e,_0x8a339f,_0x5818a9){const _0x1a6a78=_0x42c138,_0x134817=this[_0x1a6a78(0x1e3)](_0x33b59f,_0x13db2e,_0x8a339f,_0x5818a9);if(this[_0x1a6a78(0x435)][_0x1a6a78(0x4e7)](_0x134817))return![];this[_0x1a6a78(0x435)][_0x1a6a78(0x41a)](_0x134817);if(this[_0x1a6a78(0x435)][_0x1a6a78(0x50f)]>this[_0x1a6a78(0x436)]){const _0xcfc240=this['_seen'][_0x1a6a78(0x637)]()[_0x1a6a78(0x64e)]()[_0x1a6a78(0x643)];this[_0x1a6a78(0x435)]['delete'](_0xcfc240);}return!![];}[_0x42c138(0x38d)](_0x329568){const _0x576ab7=_0x42c138;if(!this[_0x576ab7(0x44a)]||!_0x329568)return;const {env:_0xdda7a5,type:_0x47d07d,key:_0x475fdf,clock:_0x4d1e5d,origin:_0x44d16c,action:_0x2f0676,newValue:_0x588ed5,oldValue:_0x4ba765}=_0x329568;if(_0xdda7a5==null||_0x47d07d==null||_0x475fdf==null)return;if(typeof _0xdda7a5===_0x576ab7(0x54f)&&_0xdda7a5[_0x576ab7(0x72d)]('~'))return;if(typeof _0x47d07d===_0x576ab7(0x54f)&&_0x47d07d[_0x576ab7(0x72d)]('~'))return;if(!this[_0x576ab7(0x3ab)](_0xdda7a5,_0x47d07d,_0x475fdf,_0x4d1e5d))return;const _0x16284c=_0x2f0676===_0x509b79[_0x576ab7(0x3c8)]?_0x576ab7(0x43f):_0x576ab7(0x4cd);this[_0x576ab7(0x652)](_0x576ab7(0x49d),{'env':_0xdda7a5,'type':_0x47d07d,'key':_0x475fdf,'op':_0x16284c,'clock':_0x4d1e5d,'origin':_0x44d16c,'value':_0x16284c==='remove'?null:_0x588ed5,'prevValue':_0x4ba765});}['_handlePoke'](_0x143fb6){const _0x56dce2=_0x42c138;if(!this[_0x56dce2(0x44a)])return;if(!_0x143fb6||typeof _0x143fb6[_0x56dce2(0x1a1)]!==_0x56dce2(0x54f)||typeof _0x143fb6[_0x56dce2(0x737)]!==_0x56dce2(0x54f))return;const {env:_0x3a68ba,type:_0x1d65ec}=_0x143fb6;if(_0x3a68ba[_0x56dce2(0x72d)]('~')||_0x1d65ec[_0x56dce2(0x72d)]('~'))return;this[_0x56dce2(0x2a8)][_0x56dce2(0x238)](_0x3a68ba+'\x00'+_0x1d65ec,{'env':_0x3a68ba,'type':_0x1d65ec}),this[_0x56dce2(0x410)]();}[_0x42c138(0x410)](){const _0x5bf64f=_0x42c138;if(this[_0x5bf64f(0x476)])return;const _0x32cbd5=()=>{const _0x539bf5=_0x5bf64f;this[_0x539bf5(0x476)]=null,this[_0x539bf5(0x217)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x32cbd5,this[_0x5bf64f(0x2a4)]>0x0?this[_0x5bf64f(0x2a4)]:0x0);}async[_0x42c138(0x217)](){const _0x2c44bc=_0x42c138;if(this[_0x2c44bc(0x4eb)]){this[_0x2c44bc(0x410)]();return;}this[_0x2c44bc(0x4eb)]=!![];try{const _0x4dee06=[...this[_0x2c44bc(0x2a8)][_0x2c44bc(0x637)]()];this[_0x2c44bc(0x2a8)][_0x2c44bc(0x22f)]();let _0x41f7db=![];for(const {env:_0x3f4207,type:_0x125789}of _0x4dee06){try{const _0x5900c7=await this[_0x2c44bc(0x3ec)](_0x3f4207,_0x125789);if(_0x5900c7)_0x41f7db=!![];}catch{this['_pending'][_0x2c44bc(0x238)](_0x3f4207+'\x00'+_0x125789,{'env':_0x3f4207,'type':_0x125789}),_0x41f7db=!![];}}if(_0x41f7db||this['_pending'][_0x2c44bc(0x50f)]>0x0)this[_0x2c44bc(0x410)]();}finally{this['_draining']=![];}}async[_0x42c138(0x3ec)](_0x31beea,_0x1aa1aa){const _0x312f48=_0x42c138,_0x3c824e=await this[_0x312f48(0x3ea)][_0x312f48(0x7a3)](_0x31beea),_0x246d9a=_0x31beea+'\x00'+_0x1aa1aa;!this[_0x312f48(0x57f)][_0x312f48(0x4e7)](_0x246d9a)&&(!this[_0x312f48(0x63d)][_0x312f48(0x4e7)](_0x31beea)&&(_0x3c824e[_0x312f48(0x554)](),this[_0x312f48(0x63d)][_0x312f48(0x238)](_0x31beea,_0x3c824e['getClock']()||0x0)),this[_0x312f48(0x57f)]['set'](_0x246d9a,this['_baselines'][_0x312f48(0x5e0)](_0x31beea)));const _0x1e4167=this[_0x312f48(0x57f)][_0x312f48(0x5e0)](_0x246d9a),_0x560526=_0x3c824e[_0x312f48(0x61a)](_0x1aa1aa)||0x0;if(_0x560526<=_0x1e4167)return![];const _0x9f724d=_0x1e4167+this[_0x312f48(0x44d)],_0x28f341=Math['min'](_0x560526,_0x9f724d),_0x37c640=_0x2d6303[_0x312f48(0x344)]?_0x2d6303['now']():0x0,_0xe0754=Array['from'](_0x3c824e['getChanges'](_0x1aa1aa,_0x1e4167+0x1,_0x28f341));let _0x16c7b8=_0x1e4167;for(const _0x4adcdf of _0xe0754){const {clock:_0x41c0ff,key:_0x232099,action:_0x2e4677,origin:_0x99a6c4}=_0x4adcdf;if(_0x41c0ff>_0x16c7b8)_0x16c7b8=_0x41c0ff;if(_0x232099==null)continue;if(!this[_0x312f48(0x3ab)](_0x31beea,_0x1aa1aa,_0x232099,_0x41c0ff))continue;let _0x375a28,_0x1ad112;if(_0x2e4677===_0x509b79['REMOVE'])_0x375a28=_0x312f48(0x43f),_0x1ad112=null;else{const _0x124d5f=_0x3c824e[_0x312f48(0x5e0)](_0x1aa1aa,_0x232099);_0x124d5f==null?(_0x375a28=_0x312f48(0x43f),_0x1ad112=null):(_0x375a28='put',_0x1ad112=_0x124d5f);}this[_0x312f48(0x652)]('change',{'env':_0x31beea,'type':_0x1aa1aa,'key':_0x232099,'op':_0x375a28,'clock':_0x41c0ff,'origin':_0x99a6c4,'value':_0x1ad112});}if(_0x2d6303[_0x312f48(0x344)])_0x2d6303[_0x312f48(0x1cb)](_0x312f48(0x375)+_0x31beea+':'+_0x1aa1aa,_0x2d6303[_0x312f48(0x6a7)]()-_0x37c640,'n='+_0xe0754['length']);return this['_cursors'][_0x312f48(0x238)](_0x246d9a,Math['max'](_0x16c7b8,_0x28f341)),_0x3c824e['getClock'](_0x1aa1aa)>_0x28f341;}[_0x42c138(0x57d)](){const _0xb04b91=_0x42c138;return{'started':this[_0xb04b91(0x44a)],'quantum':this['_quantum'],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0xb04b91(0x26f)]([...this[_0xb04b91(0x57f)][_0xb04b91(0x352)]()][_0xb04b91(0x2cc)](([_0x525e63,_0x33974e])=>[_0x525e63[_0xb04b91(0x1f7)]('\x00',':'),_0x33974e])),'pending':this['_pending'][_0xb04b91(0x50f)],'seen':this[_0xb04b91(0x435)]['size']};}}return _0x437e47[_0x42c138(0x2dd)]=_0x68b248,okdbChangefeed={'OKDBChangefeed':_0x437e47},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x339483=_0x5411c3;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x17ab4a=require$$1$2,_0x4e111f=require$$1,{EVENTS:_0x3f607a}=requireOkdbEnums(),_0x15b4d2=require$$0,{slotKey:_0x1de56d}=requireOkdbProcessRegistry(),_0x12322e=0xfa,_0x248946=0xfa0,_0x3fa278=0x5,_0x2ee65e=0x2710,_0x3dc876=0xbb8,_0xc7f0de=0x7d0,_0x351d99='__okdbCluster',_0x406a30='ephemeral',_0x181425=_0x339483(0x547),_0x1e5b0e='stats',_0x21a543=[_0x3f607a[_0x339483(0x789)],_0x3f607a[_0x339483(0x559)],_0x3f607a[_0x339483(0x341)],_0x3f607a[_0x339483(0x736)],_0x3f607a[_0x339483(0x404)],_0x3f607a[_0x339483(0x51e)],_0x3f607a[_0x339483(0x4dc)],_0x3f607a[_0x339483(0x236)],_0x339483(0x3c9),'processor:progress',_0x339483(0x5be),_0x339483(0x3f6),'processor:resumed',_0x339483(0x752)],_0x5e51f7=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x1b3ab3({workers:_0x981a3f,makeOkdb:_0x5389c7,port:_0xa7f88d,primaryOkdb:_0x2d33cb,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x210b24=_0x339483;if(_0x17ab4a[_0x210b24(0x608)])return childEntry&&_0x17ab4a[_0x210b24(0x2d0)]({'exec':_0x4e111f[_0x210b24(0x2b6)](__dirname,_0x210b24(0x237)),'args':[],'execArgv':((()=>{const _0x20d077=_0x210b24,_0x165309=[];for(let _0x41ee5d=0x0;_0x41ee5d<process[_0x20d077(0x672)][_0x20d077(0x1b1)];_0x41ee5d++){const _0xbce612=process[_0x20d077(0x672)][_0x41ee5d];if(_0xbce612[_0x20d077(0x72d)](_0x20d077(0x70c))||_0xbce612[_0x20d077(0x72d)](_0x20d077(0x192))||_0xbce612['startsWith']('--inspect'))continue;if(_0xbce612==='-e'||_0xbce612===_0x20d077(0x710)||_0xbce612==='-p'||_0xbce612===_0x20d077(0x4a5)){_0x41ee5d++;continue;}_0x165309['push'](_0xbce612);}return _0x165309;})())}),_0x2f6b7c({'workers':_0x981a3f,'port':_0xa7f88d,'primaryOkdb':_0x2d33cb,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0xa7f88d});return _0x5bd428({'makeOkdb':_0x5389c7,'port':_0xa7f88d});}function _0x2f6b7c({workers:_0xd685a8,port:_0x4ae93d,primaryOkdb:_0x3e4a39,workerEnv:_0x3c4230,workerRole:_0x1cd070,listenAddr:_0x498a0d}){const _0x5352ea=_0x339483,_0x184054=new Map(),_0x117139=new Map();let _0x23fb44=![];const _0x633d6c=_0x53a374=>_0x53a374?.[_0x5352ea(0x3bc)],_0x152242=_0x62ad6b=>{const _0xeb9230=_0x5352ea,_0x4caf9f=_0x17ab4a[_0xeb9230(0x422)]({...process.env,..._0x3c4230||{},'OKDB_CLUSTER_SLOT':String(_0x62ad6b)});return _0x4caf9f[_0xeb9230(0x3bc)]=_0x62ad6b,_0x184054[_0xeb9230(0x238)](_0x4caf9f[_0xeb9230(0x509)][_0xeb9230(0x690)],{'worker':_0x4caf9f,'startedAt':Date[_0xeb9230(0x6a7)](),'slot':_0x62ad6b}),_0x4caf9f['on'](_0xeb9230(0x3ba),_0x2a27d8=>{const _0x212796=_0xeb9230;console[_0x212796(0x547)](_0x212796(0x3ce)+_0x4caf9f['process'][_0x212796(0x690)]+_0x212796(0x450)+(_0x2a27d8?.['message']??_0x2a27d8));}),_0x4caf9f['on'](_0xeb9230(0x372),()=>_0x80a272()),_0x4caf9f;},_0x36bab4=_0x37935b=>{const _0x37803d=_0x5352ea;for(const {worker:_0x38a586}of _0x184054[_0x37803d(0x637)]()){if(_0x38a586[_0x37803d(0x762)]()||!_0x38a586[_0x37803d(0x44e)]())continue;try{_0x38a586[_0x37803d(0x61d)](_0x37935b);}catch{}}};_0x3e4a39?.[_0x5352ea(0x308)]?.({'kind':_0x5352ea(0x5de),'listenAddr':_0x498a0d})[_0x5352ea(0x58b)](()=>{}),_0x3e4a39?.[_0x5352ea(0x683)]?.['setOwnMeta']?.({'workersConfigured':_0xd685a8});const _0x1d0fe3={'engines':!![],'processors':!![],'compaction':!![],..._0x1cd070,'http':!![]},_0x80a272=()=>{const _0x4d541a=_0x5352ea,_0x4f7715=_0x3e4a39?.[_0x4d541a(0x683)];if(!_0x4f7715||!_0x4f7715[_0x4d541a(0x72b)])return;const _0x635f6f=_0x4f7715[_0x4d541a(0x75d)];for(const {worker:_0x2b4491,startedAt:_0x91c386,slot:_0x331287,stats:_0x5e0886,processing:_0x375792}of _0x184054[_0x4d541a(0x637)]()){if(_0x2b4491[_0x4d541a(0x762)]())continue;const _0x2056ff=_0x4f7715[_0x4d541a(0x4cc)]?.()&&_0x4f7715[_0x4d541a(0x6a3)](_0x4d541a(0x5ce),_0x3c6145(_0x331287))?.[_0x4d541a(0x5a6)]===!![];_0x4f7715[_0x4d541a(0x478)]({'pid':_0x2b4491[_0x4d541a(0x509)]['pid'],'startedAt':_0x91c386,'kind':'http-server','supervisorKey':_0x635f6f,'slot':_0x331287,'slotKey':_0x3c6145(_0x331287),'role':_0x1d0fe3,'listenAddr':_0x498a0d,'lifecycle':_0x2056ff?'decommissioning':_0x4d541a(0x601),'processing':_0x375792??null,'stats':_0x5e0886??null})[_0x4d541a(0x58b)](()=>{});}},_0x3c6145=_0x4eedde=>_0x1de56d(_0x5352ea(0x79c)+_0x4ae93d,_0x4eedde),_0x236f41=_0x322014=>{const _0x1031b0=_0x5352ea,_0x41be67=_0x3e4a39?.[_0x1031b0(0x683)];if(!_0x41be67?.['hasDesired']?.())return![];return _0x41be67[_0x1031b0(0x6a3)](_0x1031b0(0x5ce),_0x3c6145(_0x322014))?.[_0x1031b0(0x5a6)]===!![];};for(let _0x26e2e6=0x0;_0x26e2e6<_0xd685a8;_0x26e2e6++){const _0x1e9874=_0x236f41(_0x26e2e6);_0x117139[_0x5352ea(0x238)](_0x26e2e6,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1e9874,'respawnTimer':null}),_0x1e9874?console[_0x5352ea(0x547)](_0x5352ea(0x1a6)+_0x26e2e6+_0x5352ea(0x6c7)):_0x152242(_0x26e2e6);}const _0x205ed3=()=>{const _0x29e15e=_0x5352ea,_0x38d903=_0x3e4a39?.[_0x29e15e(0x683)];if(!_0x38d903?.[_0x29e15e(0x72b)]||!_0x38d903[_0x29e15e(0x4cc)]?.())return;for(const [_0x32c946,_0x5afab1]of _0x117139['entries']()){const _0x155a9e=_0x38d903['getDesired'](_0x29e15e(0x5ce),_0x3c6145(_0x32c946)),_0x1c6423=_0x155a9e?.[_0x29e15e(0x5a6)]===!![],_0x32cba4=_0x155a9e?.[_0x29e15e(0x4fc)]===!![];if(_0x1c6423&&!_0x5afab1[_0x29e15e(0x76d)]){_0x5afab1['dead']=!![];_0x5afab1[_0x29e15e(0x4e8)]&&(clearTimeout(_0x5afab1[_0x29e15e(0x4e8)]),_0x5afab1[_0x29e15e(0x4e8)]=null);for(const {worker:_0x31764b}of _0x184054[_0x29e15e(0x637)]()){if(_0x633d6c(_0x31764b)!==_0x32c946||_0x31764b[_0x29e15e(0x762)]())continue;try{if(_0x32cba4)_0x31764b['process'][_0x29e15e(0x4fc)](_0x29e15e(0x694));else _0x31764b[_0x29e15e(0x44e)]()&&_0x31764b[_0x29e15e(0x438)]();}catch{}}console[_0x29e15e(0x547)](_0x29e15e(0x77d)+(_0x32cba4?_0x29e15e(0x3bd):_0x29e15e(0x4c9))+_0x29e15e(0x408)+_0x32c946+'\x20(durable\x20desired-state)');}else{if(!_0x1c6423&&_0x5afab1[_0x29e15e(0x76d)]&&_0x155a9e){_0x5afab1[_0x29e15e(0x76d)]=![],_0x5afab1[_0x29e15e(0x68e)]=[],_0x5afab1[_0x29e15e(0x5f5)]=0x0;const _0x3e2faf=[..._0x184054[_0x29e15e(0x637)]()]['some'](({worker:_0x2224e9})=>_0x633d6c(_0x2224e9)===_0x32c946&&!_0x2224e9[_0x29e15e(0x762)]());!_0x3e2faf&&!_0x23fb44&&(_0x152242(_0x32c946),console[_0x29e15e(0x547)](_0x29e15e(0x454)+_0x32c946));}}}},_0x304344=()=>{try{_0x205ed3();}catch{}};_0x3e4a39?.['events']?.['on']?.(_0x3f607a[_0x5352ea(0x487)],_0x304344);const _0x5499d9=[];if(_0x3e4a39?.[_0x5352ea(0x2b0)]?.['on'])for(const _0x1a751b of _0x21a543){const _0x28c60b=_0x415f65=>{_0x36bab4({[_0x351d99]:_0x406a30,'event':_0x1a751b,'data':_0x415f65??{}});};_0x3e4a39[_0x5352ea(0x2b0)]['on'](_0x1a751b,_0x28c60b),_0x5499d9[_0x5352ea(0x494)]({'event':_0x1a751b,'handler':_0x28c60b});}const _0x4e86fe=setInterval(()=>{_0x205ed3(),_0x80a272();},_0x5e51f7);_0x4e86fe['unref']?.();const _0x2c188b=(_0xd42045,_0x248897)=>{const _0x4a1485=_0x5352ea;if(!_0x248897||typeof _0x248897!=='object'||_0x248897[_0x351d99]!==_0x181425)return;if(!_0x3e4a39?.[_0x4a1485(0x547)]?.['ingest'])return;const _0x2c0990=_0x248897['entry']||{};_0x3e4a39[_0x4a1485(0x547)][_0x4a1485(0x7a4)]({..._0x2c0990,'msg':'[w'+_0x248897['slot']+']\x20'+(_0x2c0990[_0x4a1485(0x495)]??''),'meta':{..._0x2c0990['meta']||{},'worker':_0x248897[_0x4a1485(0x5ce)],'workerPid':_0x248897[_0x4a1485(0x690)]}});};_0x17ab4a['on']('message',_0x2c188b);const _0x112cde=(_0x292e7a,_0x2062c4)=>{const _0x1a3ae6=_0x5352ea;if(!_0x2062c4||typeof _0x2062c4!=='object'||_0x2062c4[_0x351d99]!==_0x1e5b0e)return;const _0x51b6e4=_0x184054['get'](_0x292e7a[_0x1a3ae6(0x509)][_0x1a3ae6(0x690)]);if(_0x51b6e4){_0x51b6e4['stats']={..._0x2062c4[_0x1a3ae6(0x55e)],'at':Date[_0x1a3ae6(0x6a7)]()};if(_0x2062c4[_0x1a3ae6(0x304)]!==undefined)_0x51b6e4['processing']=_0x2062c4[_0x1a3ae6(0x304)];}};_0x17ab4a['on'](_0x5352ea(0x246),_0x112cde),_0x17ab4a['on'](_0x5352ea(0x592),(_0x2721c5,_0x44400d,_0x477fcd)=>{const _0x82b161=_0x5352ea,_0x5e4aa7=_0x2721c5['process']['pid'],_0x2d1abd=_0x633d6c(_0x2721c5),_0x361fb5=_0x184054[_0x82b161(0x5e0)](_0x5e4aa7);if(_0x361fb5&&_0x3e4a39?.[_0x82b161(0x683)])_0x3e4a39[_0x82b161(0x683)]['removeNode'](_0x5e4aa7+':'+_0x361fb5[_0x82b161(0x314)])[_0x82b161(0x58b)](()=>{});_0x184054['delete'](_0x5e4aa7),console[_0x82b161(0x547)](_0x82b161(0x3ce)+_0x5e4aa7+_0x82b161(0x430)+(_0x2d1abd??'?')+_0x82b161(0x1a9)+(_0x82b161(0x397)+_0x44400d+',\x20signal='+(_0x477fcd??_0x82b161(0x552))+_0x82b161(0x777)+_0x184054[_0x82b161(0x50f)]+_0x82b161(0x589))),_0x80a272();if(_0x23fb44||_0x2d1abd==null)return;const _0x28bd9d=_0x117139[_0x82b161(0x5e0)](_0x2d1abd);if(!_0x28bd9d||_0x28bd9d[_0x82b161(0x76d)])return;const _0x17a6d2=Date[_0x82b161(0x6a7)]();_0x28bd9d['deaths'][_0x82b161(0x494)](_0x17a6d2),_0x28bd9d[_0x82b161(0x68e)]=_0x28bd9d[_0x82b161(0x68e)][_0x82b161(0x3fb)](_0x55a9e2=>_0x17a6d2-_0x55a9e2<=_0x2ee65e);if(_0x28bd9d['deaths'][_0x82b161(0x1b1)]>=_0x3fa278){_0x28bd9d[_0x82b161(0x76d)]=!![],console[_0x82b161(0x3ba)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x2d1abd+'\x20died\x20'+_0x28bd9d[_0x82b161(0x68e)][_0x82b161(0x1b1)]+_0x82b161(0x3eb)+(_0x2ee65e+_0x82b161(0x469)+_0x184054[_0x82b161(0x50f)]+_0x82b161(0x4e4)));return;}_0x28bd9d[_0x82b161(0x5f5)]++;const _0xb1cf89=Math[_0x82b161(0x4a8)](_0x248946,_0x12322e*0x2**(_0x28bd9d[_0x82b161(0x5f5)]-0x1));console['log'](_0x82b161(0x3cd)+_0x2d1abd+_0x82b161(0x30d)+_0xb1cf89+'ms\x20(attempt\x20'+_0x28bd9d[_0x82b161(0x5f5)]+')'),_0x28bd9d[_0x82b161(0x4e8)]=setTimeout(()=>{const _0x8ec9a8=_0x82b161;_0x28bd9d[_0x8ec9a8(0x4e8)]=null;if(_0x23fb44||_0x28bd9d[_0x8ec9a8(0x76d)])return;const _0xbdcdac=_0x152242(_0x2d1abd);_0xbdcdac[_0x8ec9a8(0x78b)](_0x8ec9a8(0x6fc),()=>{const _0x1837bb=_0x8ec9a8;if(_0x117139[_0x1837bb(0x5e0)](_0x2d1abd)===_0x28bd9d)_0x28bd9d['consecutiveFailures']=0x0;});},_0xb1cf89),_0x28bd9d[_0x82b161(0x4e8)][_0x82b161(0x6d1)]?.();});const _0x3b2ca8=[..._0x184054['keys']()];console[_0x5352ea(0x547)]('[okdb-cluster]\x20primary\x20pid='+process[_0x5352ea(0x690)]+_0x5352ea(0x2a1)+_0xd685a8+_0x5352ea(0x6bf)+_0x4ae93d+':\x20'+('['+_0x3b2ca8['join'](',\x20')+']'));const _0x792361={'_isClusterController':!![],'port':_0x4ae93d,'primaryOkdb':_0x3e4a39??null,'status'(){const _0x245a9d=_0x5352ea;return{'clustered':!![],'primaryPid':process[_0x245a9d(0x690)],'port':_0x4ae93d,'primaryRole':_0x3e4a39?.[_0x245a9d(0x222)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x184054[_0x245a9d(0x637)]()][_0x245a9d(0x2cc)](({worker:_0x1e31b3})=>({'pid':_0x1e31b3[_0x245a9d(0x509)][_0x245a9d(0x690)],'id':_0x1e31b3['id'],'dead':_0x1e31b3[_0x245a9d(0x762)]()}))};},async 'close'(){const _0x56d78a=_0x5352ea;_0x23fb44=!![];for(const _0x4480a4 of _0x117139[_0x56d78a(0x637)]()){_0x4480a4[_0x56d78a(0x76d)]=!![],_0x4480a4['respawnTimer']&&(clearTimeout(_0x4480a4['respawnTimer']),_0x4480a4[_0x56d78a(0x4e8)]=null);}clearInterval(_0x4e86fe),_0x17ab4a['off'](_0x56d78a(0x246),_0x2c188b),_0x17ab4a[_0x56d78a(0x4ad)](_0x56d78a(0x246),_0x112cde),_0x3e4a39?.['events']?.[_0x56d78a(0x4ad)]?.(_0x3f607a[_0x56d78a(0x487)],_0x304344);if(_0x3e4a39?.[_0x56d78a(0x2b0)]?.[_0x56d78a(0x4ad)])for(const {event:_0x122c9f,handler:_0x4a8791}of _0x5499d9){try{_0x3e4a39['events'][_0x56d78a(0x4ad)](_0x122c9f,_0x4a8791);}catch{}}_0x5499d9[_0x56d78a(0x1b1)]=0x0;const _0x52465f=[..._0x184054['values']()][_0x56d78a(0x2cc)](({worker:_0x1d3c01})=>_0x1d3c01);if(_0x52465f[_0x56d78a(0x1b1)]===0x0)return;await Promise['all'](_0x52465f['map'](_0x357912=>new Promise(_0x4752d1=>{const _0x3da97f=_0x56d78a;if(_0x357912[_0x3da97f(0x762)]()){_0x4752d1();return;}let _0x304c0c=![];const _0x22992b=()=>{if(_0x304c0c)return;_0x304c0c=!![];if(_0x25b1a3)clearTimeout(_0x25b1a3);_0x4752d1();};_0x357912[_0x3da97f(0x78b)](_0x3da97f(0x592),_0x22992b);const _0x25b1a3=setTimeout(()=>{try{_0x357912['process']['kill']();}catch{}},_0x3dc876+0x1f4);_0x25b1a3[_0x3da97f(0x6d1)]?.();try{_0x357912['disconnect']();}catch{try{_0x357912[_0x3da97f(0x509)][_0x3da97f(0x4fc)]();}catch{}}})));}};return _0x792361;}async function _0x5bd428({makeOkdb:_0x47ff9e,port:_0x21b9ed}){const _0x2df8c8=_0x339483,_0x780b4f=await _0x47ff9e();return _0x426577(_0x780b4f),_0x780b4f[_0x2df8c8(0x277)][_0x2df8c8(0x2b1)](_0x21b9ed);}function _0x426577(_0x4db56f){const _0x12c241=_0x339483;if(!_0x4db56f||_0x4db56f[_0x12c241(0x550)])return;_0x4db56f[_0x12c241(0x550)]=!![];try{const {OKDBChangefeed:_0x2f6aae}=requireOkdbChangefeed(),_0x44f146=_0x4db56f['_adminRelay'];if(_0x44f146&&typeof _0x44f146[_0x12c241(0x774)]===_0x12c241(0x76e)){const _0x53ffc6=new _0x2f6aae(_0x4db56f);_0x53ffc6[_0x12c241(0x45f)](),_0x44f146[_0x12c241(0x774)](_0x53ffc6),_0x4db56f[_0x12c241(0x722)]=_0x53ffc6;}}catch(_0x53b561){_0x4db56f[_0x12c241(0x547)]?.[_0x12c241(0x305)]?.(_0x12c241(0x212)+(_0x53b561?.[_0x12c241(0x246)]??_0x53b561),{'feature':_0x12c241(0x543)});}const _0x24c0e3=_0xdd9bed=>{const _0xf3c412=_0x12c241;if(!_0xdd9bed||typeof _0xdd9bed!=='object'||_0xdd9bed[_0x351d99]==null)return;if(_0xdd9bed[_0x351d99]===_0x406a30)try{_0x4db56f[_0xf3c412(0x200)]?.[_0xf3c412(0x4c2)]?.(_0xdd9bed[_0xf3c412(0x241)],_0xdd9bed[_0xf3c412(0x268)]);}catch{}};process['on'](_0x12c241(0x246),_0x24c0e3),_0x4db56f['_clusterOnMessage']=_0x24c0e3;{let _0x3ebe35=process[_0x12c241(0x560)](),_0x4fd255=Date[_0x12c241(0x6a7)]();const _0x2651af=()=>{const _0x38e835=_0x12c241;if(typeof process[_0x38e835(0x61d)]!=='function'||!process[_0x38e835(0x3a8)])return;const _0x273b26=Date[_0x38e835(0x6a7)](),_0x164745=process[_0x38e835(0x560)](),_0x2f6e2c=(_0x273b26-_0x4fd255)*0x3e8,_0x14c65f=_0x164745[_0x38e835(0x468)]-_0x3ebe35[_0x38e835(0x468)]+(_0x164745[_0x38e835(0x256)]-_0x3ebe35['system']),_0x595273=_0x2f6e2c>0x0?Math[_0x38e835(0x4a8)](0x64,Math[_0x38e835(0x40d)](_0x14c65f/(_0x2f6e2c*(_0x15b4d2['cpus']()[_0x38e835(0x1b1)]||0x1))*0x64)):0x0;_0x3ebe35=_0x164745,_0x4fd255=_0x273b26;const _0x59d950=process[_0x38e835(0x280)]();let _0x44c673=null;try{_0x44c673=_0x4db56f['role']?.[_0x38e835(0x1a4)]?_0x4db56f[_0x38e835(0x683)]?.[_0x38e835(0x6dd)]?.()??null:null;}catch{}try{process[_0x38e835(0x61d)]({[_0x351d99]:_0x1e5b0e,'stats':{'rss':_0x59d950[_0x38e835(0x2d3)],'heapUsed':_0x59d950[_0x38e835(0x262)],'heapTotal':_0x59d950[_0x38e835(0x4ae)],'external':_0x59d950[_0x38e835(0x50d)],'cpuPct':_0x595273,'cpuWindowMs':Math['round'](_0x2f6e2c/0x3e8)||null},'processing':_0x44c673});}catch{}},_0x59b58=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x51b44b=setInterval(_0x2651af,_0x59b58);_0x51b44b[_0x12c241(0x6d1)]?.(),_0x2651af();for(const _0x5cd8d3 of[_0x12c241(0x3f6),_0x12c241(0x665)]){_0x4db56f[_0x12c241(0x2b0)]?.['on']?.(_0x5cd8d3,()=>{try{_0x2651af();}catch{}});}}let _0x427553=![];const _0x4a6b50=async _0x5c1b01=>{const _0x1813bb=_0x12c241;if(_0x427553)return;_0x427553=!![];const _0x2a6831=setTimeout(()=>process[_0x1813bb(0x592)](_0x5c1b01),_0x3dc876);_0x2a6831[_0x1813bb(0x6d1)]?.();try{await _0x4db56f[_0x1813bb(0x5e4)]?.();}catch{}process['exit'](_0x5c1b01);};process['on'](_0x12c241(0x438),()=>_0x4a6b50(0x0));if(process[_0x12c241(0x3be)]!==_0x12c241(0x4dd)){const _0xe976f=setInterval(()=>{const _0x3c7444=_0x12c241;if(process[_0x3c7444(0x2ed)]===0x1)_0x4a6b50(0x0);},_0xc7f0de);_0xe976f[_0x12c241(0x6d1)]?.(),_0x4db56f[_0x12c241(0x36f)]=_0xe976f;}}return okdbCluster={'runClustered':_0x1b3ab3,'attachWorkerCluster':_0x426577},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x2ab882=_0x5411c3;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x28cab0=0x3c;function _0x3b4968(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x4e0990{constructor(){const _0x18ebc1=_0x5511;this['_totalRequests']=0x0,this['_totalReads']=0x0,this[_0x18ebc1(0x57e)]=0x0,this['_totalErrors']=0x0,this[_0x18ebc1(0x1ec)]=0x0,this[_0x18ebc1(0x2c4)]=0x0,this['_buckets']=Array[_0x18ebc1(0x716)]({'length':_0x28cab0},_0x3b4968),this[_0x18ebc1(0x506)]=0x0,this[_0x18ebc1(0x3c6)]=Date[_0x18ebc1(0x6a7)](),this[_0x18ebc1(0x74a)]=setInterval(()=>this[_0x18ebc1(0x685)](),0x3e8);if(this[_0x18ebc1(0x74a)]['unref'])this[_0x18ebc1(0x74a)]['unref']();}['_rotateBucket'](){const _0x5cddcc=_0x5511;this[_0x5cddcc(0x506)]=(this['_bucketIdx']+0x1)%_0x28cab0,this[_0x5cddcc(0x510)][this[_0x5cddcc(0x506)]]=_0x3b4968(),this[_0x5cddcc(0x3c6)]=Date['now']();}['record'](_0x343a7d,_0xb12d9e,_0x52ab16){const _0x32cd5f=_0x5511,_0x5ab360=/^(POST|PUT|PATCH|DELETE)$/i[_0x32cd5f(0x279)](_0x343a7d),_0x344524=this['_buckets'][this['_bucketIdx']];this[_0x32cd5f(0x2a3)]++,_0x344524['requests']++,_0x52ab16&&(this[_0x32cd5f(0x593)]++,_0x344524[_0x32cd5f(0x5bc)]++),_0x5ab360?(this[_0x32cd5f(0x57e)]++,this['_totalWriteMs']+=_0xb12d9e,_0x344524['writes']++,_0x344524[_0x32cd5f(0x565)]+=_0xb12d9e):(this[_0x32cd5f(0x1ae)]++,this[_0x32cd5f(0x1ec)]+=_0xb12d9e,_0x344524[_0x32cd5f(0x3da)]++,_0x344524[_0x32cd5f(0x1e4)]+=_0xb12d9e);}[_0x2ab882(0x55e)](){const _0x27af23=_0x2ab882;let _0x3d68bd=0x0,_0xdbc5f8=0x0,_0x2d32f5=0x0,_0x594ed1=0x0,_0x4ee96d=0x0,_0x375ad4=0x0;for(const _0x18a7c0 of this['_buckets']){_0x3d68bd+=_0x18a7c0['requests'],_0xdbc5f8+=_0x18a7c0[_0x27af23(0x3da)],_0x2d32f5+=_0x18a7c0[_0x27af23(0x1bd)],_0x594ed1+=_0x18a7c0['errors'],_0x4ee96d+=_0x18a7c0['readMs'],_0x375ad4+=_0x18a7c0[_0x27af23(0x565)];}const _0x56cd4b=_0x28cab0;return{'lifetime':{'requests':this['_totalRequests'],'reads':this[_0x27af23(0x1ae)],'writes':this['_totalWrites'],'errors':this[_0x27af23(0x593)],'avgReadMs':this[_0x27af23(0x1ae)]>0x0?+(this[_0x27af23(0x1ec)]/this[_0x27af23(0x1ae)])['toFixed'](0x2):null,'avgWriteMs':this[_0x27af23(0x57e)]>0x0?+(this[_0x27af23(0x2c4)]/this['_totalWrites'])[_0x27af23(0x26b)](0x2):null},'window':{'seconds':_0x56cd4b,'requests':_0x3d68bd,'reads':_0xdbc5f8,'writes':_0x2d32f5,'errors':_0x594ed1,'reqPerSec':+(_0x3d68bd/_0x56cd4b)['toFixed'](0x2),'readPerSec':+(_0xdbc5f8/_0x56cd4b)[_0x27af23(0x26b)](0x2),'writePerSec':+(_0x2d32f5/_0x56cd4b)[_0x27af23(0x26b)](0x2),'avgReadMs':_0xdbc5f8>0x0?+(_0x4ee96d/_0xdbc5f8)[_0x27af23(0x26b)](0x2):null,'avgWriteMs':_0x2d32f5>0x0?+(_0x375ad4/_0x2d32f5)['toFixed'](0x2):null}};}[_0x2ab882(0x5e4)](){clearInterval(this['_timer']);}}return okdbMetrics=_0x4e0990,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x3e2809=_0x5411c3;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x9831bb={'data':{'label':_0x3e2809(0x599),'scope':_0x3e2809(0x1a1),'description':_0x3e2809(0x299),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x310)},'write':{'label':'Write','summary':_0x3e2809(0x315)}}},'schema':{'label':_0x3e2809(0x1fa),'scope':'env','description':_0x3e2809(0x786),'operations':{'read':{'label':'Read','summary':_0x3e2809(0x693)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x686)}}},'search':{'label':_0x3e2809(0x2ac),'scope':_0x3e2809(0x1a1),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x3e2809(0x76c),'summary':_0x3e2809(0x4f2)}}},'queue':{'label':_0x3e2809(0x4c3),'scope':_0x3e2809(0x1a1),'description':_0x3e2809(0x57c),'operations':{'read':{'label':'Read','summary':_0x3e2809(0x5a9)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x738)},'work':{'label':'Work','summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':_0x3e2809(0x20c),'scope':_0x3e2809(0x1a1),'description':'Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x2f7)},'write':{'label':_0x3e2809(0x6bc),'summary':'Upload,\x20update\x20metadata,\x20and\x20delete\x20files.'}}},'functions':{'label':'Functions','scope':'env','description':_0x3e2809(0x378),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x1ad)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x533)},'run':{'label':_0x3e2809(0x70e),'summary':_0x3e2809(0x775)}}},'views':{'label':_0x3e2809(0x517),'scope':_0x3e2809(0x1a1),'description':'Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','operations':{'read':{'label':'Read','summary':'List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.'},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x499)}}},'env':{'label':_0x3e2809(0x6ad),'scope':_0x3e2809(0x1a1),'description':_0x3e2809(0x6d8),'operations':{'read':{'label':'Read','summary':_0x3e2809(0x669)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x2b3)}}},'auth':{'label':_0x3e2809(0x6a4),'scope':_0x3e2809(0x256),'description':_0x3e2809(0x4bf),'operations':{'read':{'label':_0x3e2809(0x474),'summary':'List\x20tokens\x20and\x20users.'},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x3e2809(0x371),'scope':_0x3e2809(0x256),'description':_0x3e2809(0x1a2),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x35a)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x18c)}}},'sync':{'label':'Sync','scope':_0x3e2809(0x256),'description':_0x3e2809(0x5db),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x5b6)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x4e0)},'peer':{'label':_0x3e2809(0x5b9),'summary':_0x3e2809(0x1b2),'machineOnly':!![]}}},'protected':{'label':_0x3e2809(0x42d),'scope':_0x3e2809(0x216),'description':_0x3e2809(0x527),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x47b)}}}},_0x1bbad9={'schema:read':[_0x3e2809(0x638),_0x3e2809(0x72c),_0x3e2809(0x5e5)]},_0x29338c=['read',_0x3e2809(0x194),_0x3e2809(0x2ca),_0x3e2809(0x4f7),_0x3e2809(0x73a),_0x3e2809(0x322)];function _0x40a412(){const _0x651845=_0x3e2809,_0x556d31=[];for(const [_0x5887be,_0x5ea913]of Object[_0x651845(0x352)](_0x9831bb)){for(const _0x2eb172 of Object[_0x651845(0x35c)](_0x5ea913['operations'])){_0x556d31[_0x651845(0x494)](_0x5887be+':'+_0x2eb172);}}return _0x556d31;}function _0x3fdc66(_0x5944c7){return _0x9831bb[_0x5944c7]||null;}function _0x50c9f3(_0x160b17,_0xd5353e){const _0x17ab9e=_0x3e2809;return _0x9831bb[_0x160b17]?.[_0x17ab9e(0x347)][_0xd5353e]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x9831bb,'IMPLIED_BY':_0x1bbad9,'OP_ORDER':_0x29338c,'listAllPermissions':_0x40a412,'getNamespaceMeta':_0x3fdc66,'getOperationMeta':_0x50c9f3},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x638ad7=_0x5411c3;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x52d51b}=requireOkdbAuthNamespaces(),_0x130539=new Set([_0x638ad7(0x6cc),_0x638ad7(0x194)]);function _0xacaed6(_0x3f3279,_0x46c4b4){const _0x2a410d=_0x638ad7;if(!Array[_0x2a410d(0x729)](_0x3f3279)||_0x3f3279['length']===0x0)return![];for(const _0x3f4271 of _0x3f3279){if(typeof _0x3f4271!==_0x2a410d(0x54f)||!_0x3f4271['includes'](':')){if(_0x3f4271==='*')return!![];continue;}const [_0x3b085e,_0x2ea8bd]=_0x3f4271[_0x2a410d(0x5ed)](':'),[_0x5c04c7,_0x464d2b]=_0x46c4b4['split'](':'),_0x301d0d=_0x3b085e==='*'||_0x3b085e===_0x5c04c7,_0x4fecff=_0x2ea8bd==='*'||_0x2ea8bd===_0x464d2b;if(_0x301d0d&&_0x4fecff)return!![];}const _0x999e03=_0x52d51b[_0x46c4b4];if(_0x999e03)for(const _0x23e886 of _0x999e03){if(_0xacaed6(_0x3f3279,_0x23e886))return!![];}return![];}function _0x4b83b7(_0x1a6e83,_0x1f0bdd){const _0x41d2d1=_0x638ad7,_0x2857fc=new Set();if(Array[_0x41d2d1(0x729)](_0x1a6e83)){for(const _0x5b746b of _0x1a6e83)_0x2857fc[_0x41d2d1(0x41a)](_0x5b746b);}if(Array['isArray'](_0x1f0bdd)){for(const _0x4c57ee of _0x1f0bdd)_0x2857fc[_0x41d2d1(0x41a)](_0x4c57ee);}return Array[_0x41d2d1(0x716)](_0x2857fc);}function _0x31aa08(_0x4eea8e){const _0x251191=_0x638ad7;if(typeof _0x4eea8e!==_0x251191(0x54f))return![];const [,_0x43fa90]=_0x4eea8e['split'](':');return _0x130539[_0x251191(0x4e7)](_0x43fa90);}function _0xa49263(_0x43ddf3){const _0xb9e2db=_0x638ad7;return _0x31aa08(_0x43ddf3)?'protected:read':_0xb9e2db(0x3d7);}function _0x743ab5(_0x4dd98f,_0x29993e){const _0x735fff=_0x638ad7;return _0x4b83b7(_0x4dd98f['permissions']||[],_0x29993e?(_0x4dd98f[_0x735fff(0x1bb)]||{})[_0x29993e]||[]:[]);}function _0x1d0a1c(_0x21ac7f){const _0x5eaa8e=_0x638ad7,_0x459c50=[];for(const _0x51b95f of _0x21ac7f[_0x5eaa8e(0x33c)]()){const _0x2f2a45=_0x51b95f[_0x5eaa8e(0x43b)]?.[_0x5eaa8e(0x557)];if(!_0x2f2a45)continue;_0x2f2a45[_0x5eaa8e(0x68d)]&&!_0x2f2a45[_0x5eaa8e(0x235)]&&_0x459c50['push'](_0x51b95f['method']+'\x20'+_0x51b95f[_0x5eaa8e(0x504)]+_0x5eaa8e(0x4fd)+(_0x51b95f['operation']['id']??'?')+')');}if(_0x459c50[_0x5eaa8e(0x1b1)])throw new Error(_0x5eaa8e(0x513)+_0x459c50[_0x5eaa8e(0x2b6)](_0x5eaa8e(0x7ad)));}return okdbAuthPermissions={'hasPermission':_0xacaed6,'unionPermissions':_0x4b83b7,'isReadOperation':_0x31aa08,'resolveProtectedGate':_0xa49263,'getEffectivePermissions':_0x743ab5,'assertEveryRouteHasPermission':_0x1d0a1c},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function _0x358f(){const _0x42f1c7=['PIN','[okdb]\x20port\x20','SCHEMA_VALIDATION_FAILED','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','LICENSE_INVALID','recheck','authMode','openDB','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','_timer','effective','holder','assertFeature','workersFlag','regex','bodyMode','update','processor:retry','[okdb]\x20backing\x20up\x20to\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','sha256','\x20cf-ray=','allSettled','number','id:\x20','req','createServer','\x0a===\x20OKDB_DIAG\x20','selfKey','ms\x20activeWriters=','_bpWaiters','[filter]','typesPerEnv','isDead','darwin','params','\x20\x20Common\x20causes:','_released','processor:progress','OKDB_HTTP_WORKERS\x20env','_inflight','_normalizeOAuthAuthResult','options','Query','dead','function','/type/users/query\x0a\x20\x20\x20\x20','registry\x20heartbeat\x20skipped\x20(writer=','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','list','_authOptions','attachFeed','Execute\x20functions\x20over\x20HTTP/MCP/shell.','\x20licenses',');\x20','_active',':\x20processor\x20(HTTP-silent),\x20','_jwksCache','DELETE\x20type/users/item/x','OKDBSchemaCollectionError','[okdb-cluster]\x20','createEnvironment','INTERNAL_ERROR','stdin','reason','_fetchJwks','INDEX_NOT_REGISTERED','Forbidden\x20—\x20no\x20permissions\x20available','_lastCpuWindowMs','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','\x27\x20on\x20type\x20\x27','(empty)','VIEW_PROGRESS','.kdb_history','once','groups','\x1b[32m','liveThreadStats','createHash','recordWrite','\x20oldestPendingMs=','decodeLicenseBlob','maxAge','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','pause','env/staging/info','\x20\x20Envs:\x20\x20\x20\x20','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','typeSubDbs','system:type_drop','__OKDB_PUB_FINGERPRINT__','cluster:','copy','[okdb]\x20loaded\x20config:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','[okdb]\x20reset\x20aborted','\x20\x20(name:\x20','_cmd','_openEnvLazy','ingest','\x20\x20(','logs','slice','some','txn:end','\x20\x20\x20\x20\x20\x20\x20','starting','epoch','\x0a\x20\x20','/types\x0a\x20\x20\x20\x20','/api/env/','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','UNPROCESSABLE_ENTITY','\x20\x20║','include','verifyActivation','draining','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','ENV','register','_versionSkewWarned','81720LBNpjL','\x20<path>\x20[json-body]','--watch','http://localhost:','query','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','EADDRINUSE','access-control-max-age','--no-admin','_instanceId','scrypt','Activation\x20invalid:\x20',',\x20got\x20','yellow','INDEX_HAS_CONSUMERS','getPins',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','env','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','processors','\x20for\x20commands,\x20','[okdb-cluster]\x20slot=','\x20log\x20level:\x20','received\x20',')\x20exited\x20','dropSchema','Invalid\x20token','address','List\x20functions\x20and\x20inspect\x20their\x20source.','_totalReads','\x20\x20\x20\x20path:\x20\x20\x20\x20','processingStatusView','length','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','body:\x20','type/users/query\x20{\x22active\x22:true}','_threadStats','okdb_session','_lock','updatedAt','\x1b[31m','PUT','grants','fast','writes','~tokens','instances','\x20references\x20','identity','field:resolver_registered','resetIndex','index:ready','MALFORMED_TOKEN','txn:rollback','OKDBForeignKeyDeleteError','_writer','then','loop-lag\x20','note','_desired','POST','help','cookieName','padStart','\x20\x20\x20\x20','server','view','_children','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20process','maxWrites','homedir','authenticateRequest','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','oauth','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','[okdb]\x20invalid\x20port:\x20','count','_held','resetReadTxn','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','_dedupeKey','readMs','formatCookie','hasCanonical','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','indexToDb','\x22.\x20Use:\x20create,\x20list,\x20revoke',',\x20stopping\x20workers…\x0a','assign','_totalReadMs','percentile','fn-runner','integer','standard','history','repeat','OKDBIndexHasConsumersError','utf8','ms\x20p99=','fts:','replace','[okdb]\x20invalid\x20log\x20level:\x20\x22','floor','Schema\x20&\x20Indexes','_role','[okdb]\x20exporting\x20env\x20\x22','raw-remove','created','transactionSync','_adminRelay','exec','toString','middlewares','iss','\x20result','selfAddress','valid','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','randomBytes','randomUUID','destroy','Files','\x20sync','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','shmbufNative','\x20+\x20','license:added','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','version','\x20MB)','gate','_drain','allowedAlgs','toISOString','_maybePublish','token','env:removed','line','_holderDead','reset','_lastPublishAt','_envs','role','expires','isBuffer','envsOpen','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','closeIdleConnections','\x0a-----END\x20CERTIFICATE-----\x0a','_outstanding','magenta','metrics','\x20\x20All\x20checks\x20passed.\x0a','parseInt','summary','clear','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','createPublicKey','--drop','Bearer\x20$1…','cookie','permission','INDEX_REGISTERED','okdb-http-worker-child.js','set','item:update','No\x20tokens.','firstTs','[okdb]\x20started\x20in\x20','./okdb-export.ndjson','USE','FEATURES','query.','event','sourceType','--address','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','database\x20path\x20not\x20writable:\x20','message','{}[]:,\x27\x22','(worst\x20','signCookie','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20===','[okdb]\x20export\x20complete','__writeCounter','importBlobs','hidden','prependListener','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Unsupported\x20JWT\x20alg:\x20','node:perf_hooks','handler','response','system','jwks_uri','servers','~licenses','ESRCH','build','resolve','_heldTotal','_getJwkKey',';\x20Secure','HTTP\x20server\x20already\x20running','files','heapUsed','_bestMatch','debug','\x20\x20╚═══════════════════════════╝','gray','\x1b[1m','data','loadEnvFile','toUpperCase','toFixed','--no-cluster','\x20phase=','1ofN:','fromEntries','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','confirm','sig','getHeader','mode','stopping','FOREIGN_KEY_VIOLATION','http','[okdb]\x20created\x20.kdbconfig','test','_supervisorKey','tags','targetType','xdg-open\x20','isActive','handle','memoryUsage','end','level:\x20info','INDEX_ALREADY_REGISTERED','queue-worker','closeAllConnections','credentials','cf-connecting-ip','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','ms\x0a','pathParams','\x20records…','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','_buildOwnRow','_shouldWrapResponse','\x20\x20[okdb]\x20','type/users\x20--help','\x20\x20\x20\x20\x20http://localhost:','Validation\x20failed:\x20','SIG_INVALID','kdb_admin_oauth_state','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','_buildChildRow','licenseType','_lookupByName','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','_removeRowAsync','--no-repl','trim','resetting','fetch','standalone','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','\x20forked\x20','sync:apply','_totalRequests','_flushDebounce','bootstrapBlocked','addSSE','unclaimed','_pending','\x20deleted','[okdb]\x20closed\x20cleanly\x0a','digest','Search','[okdb]\x20error:\x20','stack','migrations','events','listen','(on\x20any\x20path\x20command)','Create,\x20delete,\x20and\x20compact\x20environments.','\x20\x20╔═══════════════════════════╗','cli','join','config\x20http.workers','--types','_ensureDesired','_isFree','drop','SIGTERM','types','toLowerCase','_onItem','registry\x20publish\x20failing:\x20','_bpParkedTotal','false','statusCode','_totalWriteMs',':\x20connected\x0a\x0a','expired','setTtl','claimGated','queue','run','--username','map','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','OKDBInvalidValueError','nodesView','setupPrimary','--workers','keep-alive','rss','\x22\x20on\x20\x22','existsSync','host','recent\x20writes\x20(newest\x20first)','sandbox','_coordinator','\x20months\x20from\x20issuance)','indexOf','onWindow','CHANGEFEED_QUANTUM','Version\x20mismatch\x20for\x20','(none)','unknown','nodeKey','\x0a\x0a\x20\x20','bus:env_release','_closed','meta','signalWant','updateSupervisedChildStats','abs','_sampleOwnStats','node:events','282548TmseZG','SYSTEM_STOPPED','ppid','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20error:\x20failed\x20to\x20read\x20','question','\x20\x20(unlimited)','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','~lock','internal','procmodeack/','SYSTEM_POKE','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','registerIndex','issuer','sizeBefore','access-control-request-headers','rmSync','_db','processors/','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','registerType','<json-body>','beforeWrite','net','processing','warn','keys/public.pem','_jwksNegativeCache','_activateProcesses','pipe',';\x20SameSite=','\x27\x20doesn\x27t\x20exist','\x20env','\x20in\x20','waiting','active','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','/\x20quit\x20/\x20Ctrl+C','boolean','headers','startedAt','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','no-cache,\x20no-transform','_runMiddlewares','start\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','\x20\x20\x20\x20admin:\x20http://localhost:','parkedNow','columns','undefined','match','\x20\x20Flags','\x0a\x20\x20No\x20routes\x20matching\x20\x22','peer','writes=','isWanted','INVALID_INDEX_KEY','_onProcEvent','committed','--log-level','flushDebounce','setLogger','\x20\x20Shell\x20commands','noteListenAddr','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','_refreshDesiredSnapshot','ITEM_CREATE','configureAuth','x-okdb-raw-response','index','\x20not\x20found','\x20HTTP\x20workers\x20','\x20\x20(no\x20env\x20draining)','object','expiresAt','isTTY','__vocab/version','readUInt32BE','getAuthOptions','listRoutes','validateRouteInput','OKDBInvalidPrimaryKeyError','concat','HTTP_','FTS_DROP','Build\x20expects\x20public\x20key\x20fingerprint\x20','claims','enabled','tokenSecret','LICENSE_HASH_MISMATCH','operations','_license','creating','busy','toLocaleString','use','Processors','[body]','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','changed','--permissions','entries','\x22\x20(must\x20be\x20debug|info|warn|error)','--path','parse','inflightAgesMs','params.','_nodeDb','getCount','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','Indexes','keys','_log','writeUInt32BE','\x20day(s).','alloc','subject','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','OKDBIndexAlreadyRegisteredError','\x20\x20\x20\x20status:\x20\x20\x20\x20active','_putRowAsync','properties','./okdb-backup','okdb-writer:\x20env\x20closing\x20—\x20retry','use\x20<env>','limits','reportThreadStats','--token','Forbidden\x20—\x20requires\x20','data:\x20','_clusterOrphanWatch','Type\x20\x27','System','online','Unauthorized','VERSION_MISMATCH','feed:','uuid','instanceId','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','480632HqLRQV','fts','compaction','noCluster','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','event:\x20','charCodeAt','info','cookies','jwksTtlMs','cpus','\x0a[okdb]\x20error:\x20','dropFts','GONE','\x20\x20✓\x20Removed\x20license\x20','dropType','ACTIVATION_EXPIRED','outputSchema','processorId','_startAdmission','_handleInProcess','36PifAWI','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','JWT\x20issuer\x20mismatch','stderr','ceil','shmbuf/package.json','hostname','time','Release','(code=','\x1b[36m','method','\x20\x20[','resume','type:drop','getSecurityNotices','indexes','isFinite','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','context','logLevel','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Usage:\x20','\x20which\x20does\x20not\x20exist','Token\x20must\x20be\x20a\x20JWT','port','connected','setHeader','importFromFile','_markSeen','embedded','_windowCbs','known\x20field','routes','import','dedupeMax','blobs','syncPeers',')\x20to\x20your\x20license\x20vendor.','mcp','uri','ref:violation','[res]\x20','PUBLIC_KEY_PEM','error','\x20\x20\x20\x20license:\x20','__okdbSlot','hard-killed','platform','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','ENVS','[okdb]\x20starting…\x0a','doctor','destroyed','_lastTick','--changes','REMOVE','processor:ready','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','kind','__esModule','[okdb-cluster]\x20respawning\x20worker\x20slot=','[okdb-cluster]\x20worker\x20pid=','_sandbox','createInterface','ms\x20max=','crypto','_nodeDbFor','items','(no\x20types)','cluster:\x20ready\x20(','protected:write','dbPath','Payload\x20too\x20large','reads','hint','\x20\x20\x20\x20path:\x20\x20','item:create','BOOTSTRAP_LOCALHOST_ONLY','green','splice','LOGS','\x20(must\x20be\x201–65535)','equals','OKDBForeignKeyError','JWT\x20signature\x20verification\x20failed','forceAfterMs','createLoginState','types\x20--env\x20staging','started','okdb','\x20times\x20in\x20','_drainOne','[okdb]\x20unknown\x20token\x20action:\x20\x22','statuses','route','child_process','_putRowSync','sizeAfter','\x22:\x20','(?:','commitP99Ms','processor:paused','ms\x20env=','byteLength','OKDBVersionMismatchError','\x20\x20✓\x20Revoked\x20token\x20','filter','pin','\x20\x20[okdb]\x20closed\x20cleanly\x0a','pending','[env]','_onPoke','PUT\x20type/users/item/x\x20{\x22n\x22:1}','oldestPendingMs','array','INDEX_PROGRESS','Index\x20\x22','system:bus_state_change','level','\x20worker\x20slot=','\x0a\x20\x20okdb\x20doctor\x0a','OKDBTypeNotRegisteredError','\x20already\x20exists','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','round','OKDBNotFoundError','acquiredAt','_scheduleFlush','fts:drop','socket','searchParams','writeUInt8','getProcess','targetKey','guards','\x22\x20is\x20used\x20by:\x20','\x1b[35m','add','listenAddr','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','ES256','/api/','loop-lag','LICENSED_BUILD','ID\x20token\x20is\x20not\x20accepted','fork','tokenTtl','_singletonLock','signingInput','_okdb','search','isInteger','features','disable','timingSafeEqual','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','Protected\x20(gate)','http-server','--blobs','\x20(slot=','STATUS','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','getRange','true','_seen','_dedupeMax','--ttl','disconnect','readline','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','operation','--help','ITEM_REMOVE','\x20—\x20','remove','depth','issueToken','_rootDb','ensureType','base64','offWindow','origins','stopped','HELP','--version','_started','\x20\x20\x20\x20id:\x20\x20\x20\x20','SIGBREAK','_quantum','isConnected','_nestedWarned','\x20ipc\x20error:\x20','threads','audiences','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_getOidcDiscovery','\x20file','OKDBIndexNotRegisteredError','/type/users\x0a\x20\x20\x20\x20','default:\x20cores−1\x20=\x20',',\x20label:\x20','default','api','is\x20not\x20allowed','sync','start','Admin','Feature\x20not\x20licensed:\x20','cyan','cors','spki','base64url','\x20(expires\x20','763812dBOBgG','user','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','allowHeaders','Content-Type','max','\x20→\x20POST\x20/api/env/','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','--config','ITEM_UPDATE','_rawDb','_isReader','ttl:expired','Read','OKDBSchemaValidationError','_flushTimer','\x20writes\x20(','publishChildRow','clearTtl','procmode/','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','terminal','_rowKey','enable','[on|off|level]','transaction','fill','Index\x20\x27','cpuWindowMs','getCmd','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','BAD_GATEWAY','SYSTEM_PROC','access-control-allow-credentials','_lastCpuPct','padEnd','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','permissions',':\x20ping\x0a\x0a','passive\x20HTTP\x20worker(s)\x20serving\x20:','putSync','rawResponse','127.0.0.1','\x0a\x20\x20Invalid\x20JSON:\x20','consumeLoginState','push','msg','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','--label','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','types/env=','_publishFailWarned','\x20\x20\x20\x20features:\x20\x20','change','%),\x20','setOwnMeta','PUB_FINGERPRINT','authorization','records','single','shutdown','--print','ttlMs','already\x20in\x20use','min','kid','\x1b[34m','_listenAddr','_kind','off','heapTotal','peers=','description','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','readUInt8','\x20for\x20system\x20env','transport','node','/admin/index.html','_matchRoute','must\x20not\x20be\x20null','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','sort','OKDBTypeAlreadyRegisteredError','system:poke','licenseHash','Bearer\x20','API\x20tokens,\x20users,\x20and\x20credentials.','_enqueuedAt','License\x20signature\x20invalid:\x20','pushEphemeral','Queue','state','free\x20tier','PERMISSIONS','_ownMeta','\x20supervised)','decommissioned','constructor','isWorker','hasDesired','put','\x20\x20skipped=','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','1085068MjkmzO','workers','Lax','_collectWriterFacet','sse','\x20license(s)','\x20\x20✓\x20database\x20opened\x0a','\x20records','scope','find','TYPE_NOT_REGISTERED','ms/','INDEX_RESET','win32','logRequests','flatMap','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','x-forwarded-for','HEAD','\x20worker(s)\x20still\x20serving','isSetupMode','License\x20already\x20stored','has','respawnTimer','_statusEnv','mcp-session-id','_draining','_singletonLocks','~processes:cmd','backup','no\x20.kdbconfig\x20(using\x20defaults)','_hbTimer','shell','Execute\x20full-text\x20and\x20vector\x20searches.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','auth=','dynamic','flushLmdb','write','parseBearer','ENV_CLOSING_RETRY','remaining-fields','\x20\x20Tier:\x20\x20\x20\x20','kill','\x20(id:\x20','payload','forEach','https','_desiredOverlay','never','\x20has\x20illegal\x20binding\x20target\x20for\x20','path','\x20more)','_bucketIdx','SERVICE_UNAVAILABLE','stream','process','null','activation','force','external','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','size','_buckets','\x20\x20Error:\x20','ready','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','_heartbeatInFlight','noRepl','ALREADY_EXISTS','Views','allowMethods','perf_hooks','processKey','EXIT','\x1b[2m','url','INDEX_READY','system:ready','ms\x20busy=','OPEN','keys:','GET','_highWater','\x20\x20✗','_processStartedAt','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','\x20drainAge=','\x0a\x20\x20✓\x20License\x20added','_acquiredAt','label','\x20does\x20not\x20exist','fanout','Examples','[okdb]\x20importing\x20','\x22\x20already\x20exists','dropIndex','.log','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','current','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','invalid','OKDB_HTTP_WORKERS','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','isSystem','supervisorKey','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','\x22\x20matches\x20','x-requested-with','ms\x20on\x20env=','stringify','application/json','ttl:clear','cluster','param','_licenseHash','exportBlobs','log','revoke','title','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','migrate','Shutting\x20down\x20due\x20to\x20license\x20expiry','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','okdb-diag.','string','_clusterWorkerAttached','<path>','none','FORBIDDEN','_enableChangelog','changes','timeMachine','access','INVALID_PRIMARY_KEY','FTS_REGISTERED','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','active:','SWAP','drain','stats','~processes:desired','cpuUsage','extend','--password','\x20\x20·\x20\x20','\x20\x20\x20\x20\x20\x20','writeMs','Embeddings','index:reset','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','_caps','.okdb-write-test','Hint:\x20','roles','files/','caps','UNSUPPORTED_MEDIA_TYPE','isFile','_oidcDiscoveryCache','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','pathname','\x20(must\x20be\x20true\x20or\x20false)','bindings','writeUInt16BE','exports','load','Invalid\x20index\x20key\x20type\x20for\x20\x27','inputSchema','detachConsole','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','status','_totalWrites','_cursors','_admissionTimer','heartbeatMs','cursorKey','\x20writer{depth=','\x0a\x20\x20\x20\x20\x20\x20','VALIDATION_ERROR','config','node/','\x1b[90m','\x20worker(s)\x20remaining',';\x20Expires=','catch','licenses','\x20\x20+',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','raw-put','_onStop','exit','_totalErrors','okdb.http.listen(port)\x20in\x20each\x20worker.','every','\x20/\x20','\x20\x20#','OPTIONS','Data','init','activate','tierList','result','schema:drop','_publishNow','_onTick','removeLicense','_enforceOperationAccess','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x0a\x20\x20\x20\x20','--name','decommission','[okdb]\x20error:\x20--password\x20requires\x20--name','licensee','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','\x20\x20✓\x20OKDB\x20server\x20running','cause','\x27:\x20','[okdb]\x20invalid\x20','bus:drain','key','verifyCookie','fieldPath','Origin','remoteAddress','removeSync','exp','View\x20peer\x20status\x20and\x20replication\x20stats.','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','addSupervisedChild','Peer','\x20type','reload','errors','\x20pid=','processor:error','engines','processorsView','NOT_FOUND','\x20more','_validateOidcAccessToken','stopHeartbeat','json','stdout','_isStale','isEnabled','\x20\x20\x20http://localhost:','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','view:progress','code','config\x20file\x20valid:\x20','slot','assertLimit','argv','Unknown\x20error','_activateProcessesReader','last-event-id',';\x20Path=','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20@\x20','worker','_groupByProcess','_admissionStarted','matcher','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','\x20opening\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','primary','rowKey','get','bind','blob','participate','close','search:query','_startHeartbeat','jwksUri','okdb_session_','dirname','/([^/]+)','allocUnsafe','\x1b[0m','split','9rkZAZR','--log-requests','\x0a[okdb]\x20received\x20','clearCookie','Foreign\x20key\x20violation:\x20','white','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','consecutiveFailures','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','raw','isFeatureEnabled','NAME','fts:reset','\x20\x20Path\x20access','_durs','references','tryAcquire','(unset)','{}[]:,\x0a\x0d\x09\x20','running','ftsName','.kdbconfig',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','reverse','listNodes','setSchema','isPrimary','der','name','hasOwnProperty','dim','quantum','responseStatuses','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','idx:','makeOkdb','--grants','EXPIRES','delete','exposeHeaders','\x22\x20to\x20enable\x20it.','ms\x20mean=','maxExtra','clusterWorkers','getClock','env/:env','signature','send','Schema\x20validation\x20failed\x20for\x20','type:registered','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','listDesired','isAuthenticated','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','--open','Validation\x20failed','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','type/users/item/alice','OKDB_CODE_TO_HTTP_STATUS','[okdb]\x20opening\x20','\x20\x20Expected\x20one\x20of:','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','schema:set','index:registered','\x20\x20\x20\x20port:\x20\x20\x20\x20','export','createHmac','_nodeDead','unlinkSync','_cookieName','NOT_IMPLEMENTED','error:\x20','_runGuards','values','data:read','writeFileSync','lifecycle','_getType','_loginStates','_baselines','\x20already\x20in\x20use','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20(+','_nodeDbCache','\x20\x20·\x20','value','[okdb]\x20created\x20./okdb-data','\x20has\x20ambiguous\x20query/path\x20field:\x20','TYPE_ALREADY_REGISTERED','_key','userAdded','removeNode','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','embeddings','_nestedTotal','next','building','expiry','connection','emit','statSync','appendFileSync','_sockets','details','--env','Invalid\x20primary\x20key\x20type:\x20','_lastCpuAt','call','mkdirSync','_migrateVocab','_userRouteCount','header','onLicenseExpired','prompt','\x0a\x20\x20Joining\x20cluster\x20at\x20','BAD_REQUEST','RS256','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','processor:resumed','shutting\x20down…\x0a','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','_selfKey','List\x20environments\x20and\x20read\x20environment\x20info.','SIGINT','system:stopped','x5c','LICENSE_EXPIRED_ACTION','verify','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x20\x20\x20\x20addedAt:\x20\x20\x20','_wrapApiResponse','execArgv',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','noAdmin','Engines','ttl','aud','slotKey','--env\x20<name>','available','red','afterWrite','\x20fetching\x20','system:env_release','_lastCpuUsage','UNAUTHORIZED','guard','Forbidden','processes','_startedAt','_rotateBucket','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','stop','wrong_node','_dispatch','\x20SECURITY\x20NOTICE','index:drop','decoded','authRequired','deaths','[okdb]\x20imported\x20\x20types=','pid','maxBodyBytes','authenticateToken','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','SIGKILL','\x20documents\x20fail\x20validation','views','HTTP\x20','\x20environment\x20','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','unique:violation','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20',',\x20closing…\x0a','quit','dumpedAt','commitsPerSec','defaults','No\x20license\x20found\x20matching\x20this\x20activation\x20token','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','getDesired','Auth','email','tokenType','now','_lockDb','field','content-type','putNode','\x0a\x20\x20✓\x20License\x20activated','Environments','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','val','\x20\x20records=','_heartbeatTimer','username','\x20\x20Writes:\x20\x20','Access-Control-Request-Headers','[okdb]\x20exporting\x20blobs…','hasType','\x1b[37m','safety','license:invalid','readFileSync','_isClusterController','Write','body','./okdb-data','\x20HTTP\x20server(s)\x20on\x20port\x20','processor',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','listLicenses','derivePin','LICENSE_ALREADY_STORED','_collectSingletonClaims','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_wantDb','addedAt','sub','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','read','_systemEnv','reap','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','clearThreadStats','unref','children','OKDBError','PATCH','Unique\x20constraint\x20violated\x20on\x20',';\x20HttpOnly','functions','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','shift','Internal\x20error','uptime','setDesired','_buildProcessingFacet','[okdb]\x20invalid\x20config\x20\x22','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','createdAt','mean','\x20(expires\x20in\x20','__identity','Unknown\x20JWKS\x20kid:\x20','/api','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x20origin=','DELETE','_computeStatus','LABEL','../okdb','present','primaryOkdb','open','\x20\x20(need\x20≥\x2018)','hasLimit','runtimeProcessesView','\x0d[okdb]\x20blobs:\x20','\x20\x20✓\x20http\x20listening\x20on\x20','\x27,\x20cannot\x20map\x20to\x20\x27','_committed','prototype','\x20\x20\x20\x20licensee:\x20\x20','killable','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','listening','_wantDbHandle','(null)','uncaughtException','cluster-wide','process\x20','\x20\x20\x20\x20expires:\x20\x20\x20','\x20bytes,\x20need\x20>=\x2065)','/type/users/item/alice\x0a\x20\x20\x20\x20','nbf','isHeld','license','HTTP_CLUSTER_REMOVED','detectInputType','singletonClaims','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','--test','all','Run','includes','--eval','create','sourceKey','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','attach','SIGINT\x20(double-tap)','from','auth','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','114ensMrp','_validateOperationRequest','envs','is\x20required','discoveryTtlMs','_done','captureStackTrace','\x20statusEnv=','--key','_changefeed','hex','_report','failures','password','LICENSE_ACTIVATION_INVALID','--port','isArray','4654590SUUcsM','_isWriter','data:write','startsWith','origin','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','163322ZCQQjC','admin','bold',':want','\x20parkedNow=','decodeActivationToken','FTS_RESET','type','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','bus:proc','work','shmbuf.node','querySchema','\x20logs\x20off\x0a','category','Route\x20','maxMs'];_0x358f=function(){return _0x42f1c7;};return _0x358f();}function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x4d6eb9=require$$0$6,_0xacc883=require$$1$3,_0x48a878=require$$2;function _0x52b4a2(_0x14053f){const _0x398e00=_0x5511,_0x496988=String(_0x14053f||'')[_0x398e00(0x1f7)](/-/g,'+')[_0x398e00(0x1f7)](/_/g,'/'),_0xff73f0=_0x496988+'='[_0x398e00(0x1f2)]((0x4-(_0x496988['length']%0x4||0x4))%0x4);return Buffer[_0x398e00(0x716)](_0xff73f0,_0x398e00(0x444));}function _0x22d904(_0x48a05f){const _0x2f87ce=_0x5511;if(typeof _0x48a05f!==_0x2f87ce(0x54f))throw new Error(_0x2f87ce(0x1ab));const _0x36b980=_0x48a05f[_0x2f87ce(0x5ed)]('.');if(_0x36b980['length']!==0x3)throw new Error(_0x2f87ce(0x3a6));const [_0x5d2483,_0x4ab5fc,_0x1dd1f6]=_0x36b980,_0x15bfef=JSON[_0x2f87ce(0x355)](_0x52b4a2(_0x5d2483)[_0x2f87ce(0x202)](_0x2f87ce(0x1f4))),_0xb2284e=JSON[_0x2f87ce(0x355)](_0x52b4a2(_0x4ab5fc)[_0x2f87ce(0x202)](_0x2f87ce(0x1f4)));return{'header':_0x15bfef,'payload':_0xb2284e,'signature':_0x52b4a2(_0x1dd1f6),'signingInput':Buffer[_0x2f87ce(0x716)](_0x5d2483+'.'+_0x4ab5fc),'encodedHeader':_0x5d2483,'encodedPayload':_0x4ab5fc};}function _0x4fab81(_0xa02dbe){if(Array['isArray'](_0xa02dbe))return _0xa02dbe;if(_0xa02dbe==null)return[];return[_0xa02dbe];}function _0x1aa93d(_0x134034){const _0x3a1891=_0x5511,_0x17d18d=String(_0x134034||'')[_0x3a1891(0x31f)](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x17d18d[_0x3a1891(0x2b6)]('\x0a')+_0x3a1891(0x228);}function _0x4a33d0(_0x4b3fc0={}){const _0x28ee5e=_0x5511;if(_0x4b3fc0[_0x28ee5e(0x66c)]?.[0x0])return _0x48a878[_0x28ee5e(0x231)](_0x1aa93d(_0x4b3fc0[_0x28ee5e(0x66c)][0x0]));return _0x48a878[_0x28ee5e(0x231)]({'key':_0x4b3fc0,'format':'jwk'});}function _0x5f532b(_0x197ccf,_0x399719,_0x1e6fd8,_0x5586b7){const _0x1cc830=_0x5511;if(_0x197ccf===_0x1cc830(0x663))return _0x48a878[_0x1cc830(0x66e)]('RSA-SHA256',_0x1e6fd8,_0x399719,_0x5586b7);if(_0x197ccf===_0x1cc830(0x41d))return _0x48a878[_0x1cc830(0x66e)](_0x1cc830(0x755),_0x1e6fd8,{'key':_0x399719,'dsaEncoding':'ieee-p1363'},_0x5586b7);return![];}function _0x2fb168(_0x51dfc7){const _0x377220=_0x5511;if(typeof commonjsGlobal[_0x377220(0x29e)]===_0x377220(0x76e))return commonjsGlobal[_0x377220(0x29e)](_0x51dfc7,{'headers':{'accept':'application/json'}})[_0x377220(0x1c9)](async _0x5a8539=>{const _0x118c8c=_0x377220;if(!_0x5a8539['ok']){const _0x161a47=new Error(_0x118c8c(0x697)+_0x5a8539['status']+'\x20fetching\x20'+_0x51dfc7);_0x161a47[_0x118c8c(0x57d)]=_0x5a8539[_0x118c8c(0x57d)];throw _0x161a47;}return _0x5a8539[_0x118c8c(0x5c5)]();});return new Promise((_0x5f2d6f,_0x1e9aca)=>{const _0x5bdf6d=_0x377220,_0x300019=String(_0x51dfc7)[_0x5bdf6d(0x72d)]('https:')?_0xacc883:_0x4d6eb9,_0x865c91=_0x300019[_0x5bdf6d(0x5e0)](_0x51dfc7,{'headers':{'accept':_0x5bdf6d(0x541)}},_0x299cda=>{const _0x15becc=_0x5bdf6d;let _0x3c59ff='';_0x299cda['setEncoding'](_0x15becc(0x1f4)),_0x299cda['on'](_0x15becc(0x268),_0x284694=>{_0x3c59ff+=_0x284694;}),_0x299cda['on'](_0x15becc(0x281),()=>{const _0x7996bf=_0x15becc;if(_0x299cda[_0x7996bf(0x2c3)]<0xc8||_0x299cda['statusCode']>=0x12c){const _0x3a1447=new Error(_0x7996bf(0x697)+_0x299cda[_0x7996bf(0x2c3)]+_0x7996bf(0x67d)+_0x51dfc7);return _0x3a1447[_0x7996bf(0x57d)]=_0x299cda[_0x7996bf(0x2c3)],_0x1e9aca(_0x3a1447);}try{_0x5f2d6f(JSON['parse'](_0x3c59ff||'{}'));}catch(_0x1778b6){_0x1e9aca(_0x1778b6);}});});_0x865c91['on'](_0x5bdf6d(0x3ba),_0x1e9aca),_0x865c91['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x52b4a2,'parseJwt':_0x22d904,'normalizeAudience':_0x4fab81,'normalizePemCertificate':_0x1aa93d,'jwkToKeyObject':_0x4a33d0,'verifyJwtSignature':_0x5f532b,'fetchJson':_0x2fb168},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x5d5633=_0x5411c3;if(hasRequiredOkdbHttp)return okdbHttp[_0x5d5633(0x577)];hasRequiredOkdbHttp=0x1;const _0x301872=require$$0$6,{URL:_0x15e479}=require$$2$1,_0x1497ad=requireOkdbMetrics(),_0x126eeb=requireOkdbAuthTokens(),{hasPermission:_0x103ae3,unionPermissions:_0x540eab,resolveProtectedGate:_0x39651c}=requireOkdbAuthPermissions(),_0x474957={0x190:_0x5d5633(0x662),0x191:_0x5d5633(0x680),0x193:_0x5d5633(0x553),0x194:_0x5d5633(0x5c1),0x195:'METHOD_NOT_ALLOWED',0x198:'REQUEST_TIMEOUT',0x199:'CONFLICT',0x19a:_0x5d5633(0x386),0x19b:'LENGTH_REQUIRED',0x19d:'PAYLOAD_TOO_LARGE',0x19f:_0x5d5633(0x56f),0x1a6:_0x5d5633(0x187),0x1ad:'TOO_MANY_REQUESTS',0x1f4:_0x5d5633(0x77f),0x1f5:_0x5d5633(0x634),0x1f6:_0x5d5633(0x486),0x1f7:_0x5d5633(0x507),0x1f8:'GATEWAY_TIMEOUT'},_0x59cfaf={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x273263,timingSafeEqual:_0xb2fab6,parseBearer:_0x2ce7fb,randomToken:_0x13e04f,issueToken:_0xc4a5a6,authenticateToken:_0x175736}=_0x126eeb,{base64UrlDecode:_0x166aed,parseJwt:_0x1be0f0,normalizeAudience:_0x564998,normalizePemCertificate:_0x395b07,jwkToKeyObject:_0x6dd18d,verifyJwtSignature:_0xf110ca,fetchJson:_0x4fa889}=requireOkdbJwtUtils();function _0x113ee9(_0x53cea6){const _0x4f62cb=_0x5d5633;return(_0x53cea6||_0x4f62cb(0x523))[_0x4f62cb(0x26a)]();}function _0x81e0b3(_0x219038){const _0x44166b=_0x5d5633;if(Array[_0x44166b(0x729)](_0x219038))return _0x219038[_0x44166b(0x4df)](_0x81e0b3);return String(_0x219038||'')['split'](',')['map'](_0xb1703d=>_0xb1703d['trim']())[_0x44166b(0x3fb)](Boolean);}function _0x957522(..._0x55aa2b){const _0x4d0370=_0x5d5633;return[...new Set(_0x55aa2b[_0x4d0370(0x4df)](_0x81e0b3))]['join'](',\x20');}function _0x472d5a(_0x45c09f,_0x100cb0){const _0x1bf255=_0x5d5633;if(!_0x45c09f)return![];if(_0x100cb0==='*')return!![];if(_0x100cb0 instanceof RegExp)return _0x100cb0['test'](_0x45c09f);if(typeof _0x100cb0==='function')return!!_0x100cb0(_0x45c09f);if(Array['isArray'](_0x100cb0))return _0x100cb0[_0x1bf255(0x70f)](_0x45c09f);return _0x100cb0===_0x45c09f;}function _0x1907c1(_0x54e51a={},_0x2454db={},_0x5a9b8d=null){const _0x464999=_0x5d5633;if(!_0x2454db)return null;const _0x4ee163=_0x54e51a[_0x464999(0x72e)],_0x272c5f=_0x2454db[_0x464999(0x446)]??_0x2454db[_0x464999(0x72e)]??'*',_0x1c05bf=_0x272c5f==='*'?'*':_0x472d5a(_0x4ee163,_0x272c5f)?_0x4ee163:null;if(!_0x1c05bf)return null;const _0x3e29ce=_0x54e51a[_0x464999(0x2fb)],_0x1a97e6=_0x2454db[_0x464999(0x313)]??_0x2454db[_0x464999(0x46a)]??[_0x464999(0x6aa),_0x464999(0x4a1),_0x464999(0x4ea),_0x464999(0x5d3),_0x464999(0x53e)],_0x446349=_0x2454db['methods']??_0x2454db[_0x464999(0x518)]??(_0x5a9b8d?[_0x5a9b8d,_0x464999(0x598)]:['GET','POST',_0x464999(0x598)]),_0x4bdb9e=_0x2454db[_0x464999(0x615)]??[_0x464999(0x4ea)],_0x19f73f={'access-control-allow-origin':_0x1c05bf,'access-control-allow-methods':Array['isArray'](_0x446349)?_0x446349[_0x464999(0x2b6)](',\x20'):String(_0x446349),'access-control-allow-headers':_0x3e29ce?_0x957522(_0x1a97e6,_0x3e29ce):Array[_0x464999(0x729)](_0x1a97e6)?_0x1a97e6[_0x464999(0x2b6)](',\x20'):String(_0x1a97e6),'access-control-expose-headers':Array[_0x464999(0x729)](_0x4bdb9e)?_0x4bdb9e['join'](',\x20'):String(_0x4bdb9e),'vary':_0x957522(_0x464999(0x5b2),_0x1c05bf==='*'?'':_0x464999(0x5b2),_0x3e29ce?_0x464999(0x6b4):'')};if(_0x2454db[_0x464999(0x286)])_0x19f73f[_0x464999(0x488)]=_0x464999(0x434);if(Number['isFinite'](_0x2454db[_0x464999(0x793)]))_0x19f73f[_0x464999(0x197)]=String(_0x2454db[_0x464999(0x793)]);return _0x19f73f;}function _0x4eacc1(_0x433a4b){const _0x53f633=_0x5d5633,_0x727e35=[],_0x35c9f5={};let _0x2dcb03=![];_0x433a4b['endsWith']('/*')&&(_0x2dcb03=!![],_0x433a4b=_0x433a4b[_0x53f633(0x7a7)](0x0,-0x2),_0x727e35[_0x53f633(0x494)]('*'));let _0x2ad474=_0x433a4b['replace'](/\/+$/,'')[_0x53f633(0x1f7)](/\[([^\]]*)\]/g,(_0x49b6a5,_0x2e9344)=>{const _0x5ca4f8=_0x53f633,_0x2a8afb=_0x2e9344[_0x5ca4f8(0x1f7)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x4d2606,_0x2eb94b,_0x2522e1)=>{const _0x384de9=_0x5ca4f8;_0x727e35['push'](_0x2eb94b);if(_0x2522e1!==undefined)_0x35c9f5[_0x2eb94b]=_0x2522e1;return _0x384de9(0x5ea);});return _0x5ca4f8(0x3f4)+_0x2a8afb+')?';})[_0x53f633(0x1f7)](/\/:(\w+)/g,(_0x1f73af,_0x2e038b)=>{const _0x53a26c=_0x53f633;return _0x727e35[_0x53a26c(0x494)](_0x2e038b),_0x53a26c(0x5ea);});if(_0x2ad474==='')_0x2ad474='/';return{'keys':_0x727e35,'defaults':_0x35c9f5,'wildcard':_0x2dcb03,'regex':new RegExp(_0x2dcb03?'^'+_0x2ad474+'(?:/(.*))?$':'^'+_0x2ad474+'$')};}function _0x328e45(_0x5c9ae8){const _0x52dbb4=_0x5d5633;if(_0x5c9ae8==null)return _0x5c9ae8;return JSON['parse'](JSON[_0x52dbb4(0x540)](_0x5c9ae8));}function _0x1b02e0(_0x594246){const _0x1e4b44=_0x5d5633;if(_0x594246==null)return null;if(_0x594246[_0x1e4b44(0x737)]==='object'&&_0x594246['properties']&&!Array[_0x1e4b44(0x729)](_0x594246[_0x1e4b44(0x366)]))return _0x328e45(_0x594246);const _0x57bf6f=Object[_0x1e4b44(0x637)](_0x594246),_0x219701=_0x57bf6f[_0x1e4b44(0x1b1)]>0x0&&_0x57bf6f[_0x1e4b44(0x595)](_0x17015a=>{const _0x392b34=_0x1e4b44;return _0x17015a&&typeof _0x17015a===_0x392b34(0x336)&&!Array[_0x392b34(0x729)](_0x17015a)&&(Object[_0x392b34(0x6f7)][_0x392b34(0x60b)]['call'](_0x17015a,_0x392b34(0x737))||Object[_0x392b34(0x6f7)][_0x392b34(0x60b)][_0x392b34(0x65a)](_0x17015a,_0x392b34(0x366))||Object['prototype'][_0x392b34(0x60b)][_0x392b34(0x65a)](_0x17015a,_0x392b34(0x3d4))||Object['prototype'][_0x392b34(0x60b)][_0x392b34(0x65a)](_0x17015a,'default'));});if(_0x219701)return{'type':_0x1e4b44(0x336),'properties':_0x328e45(_0x594246),'required':[],'additionalProperties':![]};const _0x6546ed={},_0x523cc4=[];for(const [_0x2c4d77,_0x4636bf]of Object['entries'](_0x594246)){_0x6546ed[_0x2c4d77]=_0x37452a(_0x4636bf);if(_0x4636bf!==null&&_0x4636bf!==undefined)_0x523cc4['push'](_0x2c4d77);}return{'type':_0x1e4b44(0x336),'properties':_0x6546ed,'required':_0x523cc4,'additionalProperties':![]};}function _0x37452a(_0x3449ce){const _0x5d2178=_0x5d5633;if(_0x3449ce===null)return{'type':['null',_0x5d2178(0x54f),_0x5d2178(0x758),_0x5d2178(0x312),_0x5d2178(0x336),_0x5d2178(0x403)]};if(Array[_0x5d2178(0x729)](_0x3449ce))return{'type':_0x5d2178(0x403),'items':_0x3449ce[_0x5d2178(0x1b1)]>0x0?_0x37452a(_0x3449ce[0x0]):{}};switch(typeof _0x3449ce){case _0x5d2178(0x54f):return{'type':_0x5d2178(0x54f),'default':_0x3449ce};case _0x5d2178(0x758):return{'type':Number[_0x5d2178(0x428)](_0x3449ce)?_0x5d2178(0x1ef):_0x5d2178(0x758),'default':_0x3449ce};case _0x5d2178(0x312):return{'type':_0x5d2178(0x312),'default':_0x3449ce};case'object':{const _0x799d79={};for(const [_0x39e2a0,_0x27d8f9]of Object[_0x5d2178(0x352)](_0x3449ce))_0x799d79[_0x39e2a0]=_0x37452a(_0x27d8f9);return{'type':'object','properties':_0x799d79,'additionalProperties':!![],'default':_0x328e45(_0x3449ce)};}default:return{};}}function _0x2f1e55(_0x5ef719,_0x6a2af1){const _0x6a85e6=_0x5d5633,_0x289a7b=[];for(const _0xf200ea of _0x6a2af1[_0x6a85e6(0x35c)]){if(_0xf200ea==='*')continue;_0x289a7b[_0x6a85e6(0x494)]({'name':_0xf200ea,'required':!Object[_0x6a85e6(0x6f7)][_0x6a85e6(0x60b)][_0x6a85e6(0x65a)](_0x6a2af1[_0x6a85e6(0x6a0)],_0xf200ea),'default':_0x6a2af1[_0x6a85e6(0x6a0)][_0xf200ea]});}return _0x289a7b;}function _0x81b7e0(_0x182400={},_0x5ecb24){const _0x2d2957=_0x5d5633,_0x1a4776=_0x1b02e0(_0x182400['http']?.[_0x2d2957(0x73c)]??_0x182400[_0x2d2957(0x194)]??null),_0x3dc52c=_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x750)]??(_0x182400[_0x2d2957(0x5f7)]?'raw':_0x5ecb24[_0x2d2957(0x399)]==='GET'||_0x5ecb24[_0x2d2957(0x399)]===_0x2d2957(0x4e3)?'none':_0x2d2957(0x4fa));return{'querySchema':_0x1a4776,'bodyMode':_0x3dc52c,'bindings':_0x328e45(_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x575)]??{}),'statuses':_0x328e45(_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x3ee)]??(_0x182400[_0x2d2957(0x60e)]||[])),'transport':_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x4b4)]??(_0x182400[_0x2d2957(0x4d4)]?'sse':_0x182400[_0x2d2957(0x5f7)]?_0x2d2957(0x5f7):_0x2d2957(0x1f0)),'rawResponse':_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x490)]??!!_0x182400[_0x2d2957(0x490)],'cors':_0x328e45(_0x182400['http']?.[_0x2d2957(0x463)]??_0x182400[_0x2d2957(0x463)]??null)};}function _0x3566f7(_0xe9efd3){const _0x27e08e=_0x5d5633,_0x36937a=_0xe9efd3['meta']||{},_0x4737ec=_0x2f1e55(_0xe9efd3[_0x27e08e(0x504)],_0xe9efd3[_0x27e08e(0x5da)]),_0x1f073e=!!(_0x36937a['id']||_0x36937a[_0x27e08e(0x57a)]||_0x36937a['outputSchema']||_0x36937a[_0x27e08e(0x277)]||_0x36937a[_0x27e08e(0x3b5)]||_0x36937a['cli']||_0x36937a['access']||_0x36937a[_0x27e08e(0x6b8)]),_0xad8252=_0x81b7e0(_0x36937a,_0xe9efd3),_0x158f26=_0x36937a[_0x27e08e(0x57a)]?_0x328e45(_0x36937a['inputSchema']):null;return{'id':_0x36937a['id']??null,'summary':_0x36937a[_0x27e08e(0x22e)]??null,'description':_0x36937a[_0x27e08e(0x4b0)]??null,'tags':_0x328e45(_0x36937a['tags']??[]),'category':_0x36937a[_0x27e08e(0x73e)]??null,'safety':_0x328e45(_0x36937a[_0x27e08e(0x6b8)]??null),'access':_0x328e45(_0x36937a['access']??null),'inputSchema':_0x158f26,'outputSchema':_0x328e45(_0x36937a[_0x27e08e(0x38a)]??null),'examples':_0x328e45(_0x36937a['examples']??[]),'pathParams':_0x4737ec,'http':_0xad8252,'cli':_0x328e45(_0x36937a[_0x27e08e(0x2b5)]??null),'mcp':_0x328e45(_0x36937a[_0x27e08e(0x3b5)]??null),'legacy':{'params':_0x328e45(_0x36937a[_0x27e08e(0x764)]??null),'query':_0x328e45(_0x36937a['query']??null),'body':_0x328e45(_0x36937a[_0x27e08e(0x6bd)]??null),'response':_0x328e45(_0x36937a[_0x27e08e(0x255)]??null)},'transport':{'raw':!!_0x36937a[_0x27e08e(0x5f7)],'sse':!!_0x36937a[_0x27e08e(0x4d4)],'rawResponse':!!_0x36937a['rawResponse'],'cors':_0x328e45(_0x36937a[_0x27e08e(0x463)]??null)},'hasCanonical':_0x1f073e};}function _0xe346dd(_0x137d09,_0x3aaa60){const _0x36fb28=_0x5d5633;if(!_0x3aaa60?.[_0x36fb28(0x1e6)])return;if(!_0x3aaa60[_0x36fb28(0x57a)]||_0x3aaa60[_0x36fb28(0x57a)]['type']!==_0x36fb28(0x336)||!_0x3aaa60[_0x36fb28(0x57a)][_0x36fb28(0x366)])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x22315e=_0x3aaa60[_0x36fb28(0x57a)][_0x36fb28(0x366)]||{},_0x2fdd76=new Set(_0x3aaa60[_0x36fb28(0x28a)]['map'](_0x4b2c8b=>_0x4b2c8b[_0x36fb28(0x60a)])),_0x380289=new Set(Object[_0x36fb28(0x35c)](_0x3aaa60[_0x36fb28(0x277)]?.[_0x36fb28(0x73c)]?.[_0x36fb28(0x366)]||{})),_0x30cc19=new Set(Object[_0x36fb28(0x35c)](_0x3aaa60[_0x36fb28(0x277)]?.[_0x36fb28(0x575)]||{}));for(const _0x314cb0 of _0x3aaa60[_0x36fb28(0x28a)]){if(!_0x22315e[_0x314cb0['name']])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x2cd)+_0x314cb0[_0x36fb28(0x60a)]);}for(const _0x51f2c7 of _0x380289){if(!_0x22315e[_0x51f2c7])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x3c1)+_0x51f2c7);}for(const _0x176a2b of _0x30cc19){if(!_0x22315e[_0x176a2b])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+'\x20binding\x20references\x20missing\x20input\x20field:\x20'+_0x176a2b);}for(const _0x2b96b0 of _0x30cc19){if(_0x2fdd76[_0x36fb28(0x4e7)](_0x2b96b0))throw new Error('Route\x20'+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x4e1)+_0x2b96b0);if(_0x380289[_0x36fb28(0x4e7)](_0x2b96b0))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+_0x36fb28(0x69b)+_0x2b96b0);const _0x50f26c=_0x3aaa60[_0x36fb28(0x277)][_0x36fb28(0x575)][_0x2b96b0];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x50f26c)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0x50f26c)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x50f26c)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x36fb28(0x279)](_0x50f26c))throw new Error('Route\x20'+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+_0x36fb28(0x503)+_0x2b96b0+':\x20'+_0x50f26c);}for(const _0x28397b of _0x380289){if(_0x2fdd76[_0x36fb28(0x4e7)](_0x28397b))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x645)+_0x28397b);}const _0x9ce7bb=_0x3aaa60['http']?.[_0x36fb28(0x750)],_0x165e98=new Set(['none','remaining-fields','object','payload-or-self',_0x36fb28(0x403),_0x36fb28(0x5f7)]);if(!_0x165e98['has'](_0x9ce7bb))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x9ce7bb);if(_0x9ce7bb===_0x36fb28(0x5f7)&&!_0x137d09[_0x36fb28(0x2e5)]?.[_0x36fb28(0x5f7)])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+_0x36fb28(0x794));if(_0x3aaa60[_0x36fb28(0x3b5)]?.[_0x36fb28(0x189)]!==![]&&(_0x137d09['meta']?.[_0x36fb28(0x5f7)]||_0x137d09[_0x36fb28(0x2e5)]?.[_0x36fb28(0x4d4)]||_0x3aaa60['http']?.[_0x36fb28(0x4b4)]===_0x36fb28(0x508)))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x5b7)+_0x3aaa60[_0x36fb28(0x277)]?.[_0x36fb28(0x4b4)]);const _0x3e2870=Object[_0x36fb28(0x35c)](_0x22315e)[_0x36fb28(0x3fb)](_0x5ea1ac=>{const _0x82df4d=_0x36fb28;if(_0x2fdd76[_0x82df4d(0x4e7)](_0x5ea1ac))return![];if(_0x380289[_0x82df4d(0x4e7)](_0x5ea1ac))return![];if(_0x30cc19['has'](_0x5ea1ac))return![];return!![];});if(_0x9ce7bb===_0x36fb28(0x552)&&_0x3e2870['length']>0x0)throw new Error(_0x36fb28(0x73f)+_0x137d09['method']+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x62b)+_0x3e2870[_0x36fb28(0x2b6)](',\x20'));}function _0x12c166(_0x2f7fb7){const _0x123e04=_0x5d5633;if(Array[_0x123e04(0x729)](_0x2f7fb7))return _0x2f7fb7;if(_0x2f7fb7==null)return[];return[_0x2f7fb7];}function _0x25818b(_0x11a39d,_0x1d464a){const _0x4e56a2=_0x5d5633;return _0x12c166(_0x11a39d?.[_0x4e56a2(0x737)])[_0x4e56a2(0x70f)](_0x1d464a);}function _0x26cebf(_0x4682fd,_0x7f37ab){const _0x41fedd=_0x5d5633;if(_0x4682fd==null||typeof _0x4682fd!==_0x41fedd(0x54f))return _0x4682fd;const _0x27c228=_0x12c166(_0x7f37ab?.[_0x41fedd(0x737)]);if(_0x27c228['length']===0x0)return _0x4682fd;if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x50a))&&_0x4682fd===_0x41fedd(0x50a))return null;if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x312))){if(_0x4682fd===_0x41fedd(0x434))return!![];if(_0x4682fd===_0x41fedd(0x2c2))return![];}if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x1ef))&&/^-?\d+$/[_0x41fedd(0x279)](_0x4682fd))return Number[_0x41fedd(0x22d)](_0x4682fd,0xa);if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x758))&&/^-?(?:\d+|\d*\.\d+)$/[_0x41fedd(0x279)](_0x4682fd))return Number(_0x4682fd);return _0x4682fd;}function _0x135f27(_0x10c544){return _0x328e45(_0x10c544);}function _0x3156df(_0x289927,_0x4f760e={},_0x207aff={},_0x12e426=null,_0x41b7ea={}){const _0x16b547=_0x5d5633,_0x2b1f92=_0x289927?.[_0x16b547(0x43b)];if(!_0x2b1f92?.[_0x16b547(0x1e6)]||!_0x2b1f92[_0x16b547(0x57a)])return null;const _0x2edae5=_0x2b1f92[_0x16b547(0x57a)][_0x16b547(0x366)]||{},_0x4a3105=_0x2b1f92[_0x16b547(0x277)]?.['querySchema']?.['properties']||{},_0x44b4e3=_0x2b1f92[_0x16b547(0x277)]?.[_0x16b547(0x575)]||{},_0x4e045f=new Set((_0x2b1f92[_0x16b547(0x28a)]||[])['map'](_0x5925cf=>_0x5925cf[_0x16b547(0x60a)])),_0x5c0c30=new Set(Object[_0x16b547(0x35c)](_0x4a3105)),_0x4b6335={};for(const [_0x1e1d0a,_0x226f29]of Object['entries'](_0x2edae5)){Object[_0x16b547(0x6f7)][_0x16b547(0x60b)][_0x16b547(0x65a)](_0x226f29||{},_0x16b547(0x45b))&&(_0x4b6335[_0x1e1d0a]=_0x135f27(_0x226f29['default']));}for(const _0xbdff28 of _0x2b1f92['pathParams']||[]){if(!Object['prototype'][_0x16b547(0x60b)]['call'](_0x4f760e,_0xbdff28[_0x16b547(0x60a)]))continue;const _0x4cab80=_0x2edae5[_0xbdff28['name']]||{};_0x4b6335[_0xbdff28[_0x16b547(0x60a)]]=_0x26cebf(_0x4f760e[_0xbdff28['name']],_0x4cab80);}for(const [_0x5a0dc6,_0x15511c]of Object[_0x16b547(0x352)](_0x4a3105)){if(!Object[_0x16b547(0x6f7)][_0x16b547(0x60b)]['call'](_0x207aff,_0x5a0dc6))continue;_0x4b6335[_0x5a0dc6]=_0x26cebf(_0x207aff[_0x5a0dc6],_0x15511c||_0x2edae5[_0x5a0dc6]||{});}for(const [_0x2897fb,_0x1bf9df]of Object[_0x16b547(0x352)](_0x44b4e3)){if(typeof _0x1bf9df!==_0x16b547(0x54f))continue;let _0x1096b6;if(_0x1bf9df[_0x16b547(0x72d)](_0x16b547(0x357)))_0x1096b6=_0x4f760e[_0x1bf9df['slice'](0x7)];else{if(_0x1bf9df[_0x16b547(0x72d)](_0x16b547(0x240)))_0x1096b6=_0x207aff[_0x1bf9df[_0x16b547(0x7a7)](0x6)];else{if(_0x1bf9df===_0x16b547(0x6bd))_0x1096b6=_0x12e426;else{if(_0x1bf9df['startsWith']('body.'))_0x1096b6=_0x12e426?.[_0x1bf9df[_0x16b547(0x7a7)](0x5)];else{if(_0x1bf9df[_0x16b547(0x72d)]('headers.'))_0x1096b6=_0x41b7ea?.[_0x1bf9df[_0x16b547(0x7a7)](0x8)[_0x16b547(0x2be)]()]??_0x41b7ea?.[_0x1bf9df[_0x16b547(0x7a7)](0x8)];}}}}if(_0x1096b6!==undefined)_0x4b6335[_0x2897fb]=_0x1096b6;}const _0x26d326=_0x2b1f92['http']?.[_0x16b547(0x750)];if(_0x26d326!==_0x16b547(0x552)&&_0x26d326!=='raw'&&_0x12e426!=null){if(_0x26d326===_0x16b547(0x336))for(const [_0x2d47fd,_0x27406c]of Object[_0x16b547(0x352)](_0x2edae5)){if(_0x4e045f['has'](_0x2d47fd)||_0x5c0c30['has'](_0x2d47fd)||Object[_0x16b547(0x6f7)][_0x16b547(0x60b)][_0x16b547(0x65a)](_0x44b4e3,_0x2d47fd))continue;if(Object[_0x16b547(0x6f7)][_0x16b547(0x60b)]['call'](_0x12e426,_0x2d47fd))_0x4b6335[_0x2d47fd]=_0x12e426[_0x2d47fd];else{if(_0x25818b(_0x27406c,_0x16b547(0x336)))_0x4b6335[_0x2d47fd]=_0x12e426;}}else for(const [_0x26f7b4,_0x1b46e5]of Object[_0x16b547(0x352)](_0x12e426)){if(_0x4e045f[_0x16b547(0x4e7)](_0x26f7b4)||_0x5c0c30[_0x16b547(0x4e7)](_0x26f7b4)||Object['prototype'][_0x16b547(0x60b)][_0x16b547(0x65a)](_0x44b4e3,_0x26f7b4))continue;_0x4b6335[_0x26f7b4]=_0x1b46e5;}}return _0x4b6335;}function _0x1398e6(_0x50d65d,_0x5e3a69,_0x11c03c,_0x1b054e){const _0x320808=_0x5d5633;if(!_0x5e3a69)return;const _0x17a364=_0x12c166(_0x5e3a69[_0x320808(0x737)]);if(_0x50d65d===undefined)return;if(_0x50d65d===null){_0x17a364[_0x320808(0x1b1)]>0x0&&!_0x17a364['includes'](_0x320808(0x50a))&&_0x1b054e[_0x320808(0x494)]({'field':_0x11c03c,'message':_0x320808(0x4b8),'expected':_0x17a364['join']('|'),'actual':null});return;}if(_0x17a364[_0x320808(0x1b1)]===0x0)return;const _0x1ff372=_0x17a364['some'](_0x5f1eb4=>{const _0x2ddb4d=_0x320808;switch(_0x5f1eb4){case _0x2ddb4d(0x54f):return typeof _0x50d65d===_0x2ddb4d(0x54f);case _0x2ddb4d(0x1ef):return Number['isInteger'](_0x50d65d);case'number':return typeof _0x50d65d===_0x2ddb4d(0x758)&&Number['isFinite'](_0x50d65d);case _0x2ddb4d(0x312):return typeof _0x50d65d===_0x2ddb4d(0x312);case _0x2ddb4d(0x336):return _0x50d65d&&typeof _0x50d65d===_0x2ddb4d(0x336)&&!Array['isArray'](_0x50d65d);case _0x2ddb4d(0x403):return Array[_0x2ddb4d(0x729)](_0x50d65d);case _0x2ddb4d(0x50a):return _0x50d65d===null;default:return!![];}});if(!_0x1ff372){_0x1b054e[_0x320808(0x494)]({'field':_0x11c03c,'message':'must\x20be\x20'+_0x17a364['join']('|'),'expected':_0x17a364[_0x320808(0x2b6)]('|'),'actual':_0x50d65d});return;}Array[_0x320808(0x729)](_0x50d65d)&&_0x5e3a69[_0x320808(0x3d4)]&&_0x50d65d[_0x320808(0x4ff)]((_0xa92512,_0x5039e8)=>_0x1398e6(_0xa92512,_0x5e3a69[_0x320808(0x3d4)],_0x11c03c+'['+_0x5039e8+']',_0x1b054e));}function _0x10d068(_0xbc6ce4,_0x5cadbc){const _0x8df8e5=_0x5d5633,_0x42bbb8=_0xbc6ce4?.['operation'];if(!_0x42bbb8?.['hasCanonical']||!_0x42bbb8[_0x8df8e5(0x57a)])return null;const _0x5039de=_0x42bbb8[_0x8df8e5(0x57a)],_0x709f=_0x5039de[_0x8df8e5(0x366)]||{},_0x3a421e=new Set(_0x5039de['required']||[]),_0x331487=[];for(const _0x5b3f85 of _0x3a421e){_0x5cadbc[_0x5b3f85]===undefined&&_0x331487[_0x8df8e5(0x494)]({'field':_0x5b3f85,'message':_0x8df8e5(0x71c),'expected':_0x8df8e5(0x6ed),'actual':undefined});}if(_0x5039de['additionalProperties']===![])for(const _0x1e8112 of Object['keys'](_0x5cadbc||{})){!Object['prototype'][_0x8df8e5(0x60b)][_0x8df8e5(0x65a)](_0x709f,_0x1e8112)&&_0x331487[_0x8df8e5(0x494)]({'field':_0x1e8112,'message':_0x8df8e5(0x45d),'expected':_0x8df8e5(0x3ae),'actual':_0x5cadbc[_0x1e8112]});}for(const [_0x2e7810,_0x415a50]of Object[_0x8df8e5(0x352)](_0x709f)){_0x1398e6(_0x5cadbc[_0x2e7810],_0x415a50,_0x2e7810,_0x331487);}if(_0x331487[_0x8df8e5(0x1b1)]===0x0)return null;return{'code':_0x8df8e5(0x585),'errors':_0x331487};}function _0x5ba0c6(_0x41a024=[]){const _0x42ffe2=_0x5d5633;if(!Array[_0x42ffe2(0x729)](_0x41a024)||_0x41a024[_0x42ffe2(0x1b1)]===0x0)return null;const _0x45a1da=_0x41a024[_0x42ffe2(0x7a7)](0x0,0x3)[_0x42ffe2(0x2cc)]((_0x1fe016={})=>{const _0x282bad=_0x42ffe2,_0x3f496c=_0x1fe016[_0x282bad(0x6a9)]?_0x1fe016[_0x282bad(0x6a9)]+'\x20':'';return(''+_0x3f496c+(_0x1fe016['message']||'is\x20invalid'))[_0x282bad(0x29c)]();})[_0x42ffe2(0x2b6)](';\x20');return _0x41a024['length']>0x3?_0x45a1da+_0x42ffe2(0x640)+(_0x41a024['length']-0x3)+_0x42ffe2(0x505):_0x45a1da;}function _0x570026(_0x3fe5e4,_0x504063={}){const _0x314691=_0x5d5633,_0x3ebdbb=_0x504063?.['result']?.[_0x314691(0x3ba)]??_0x504063?.[_0x314691(0x3ba)]??_0x314691(0x5d1),_0x3051dc=_0x504063?.[_0x314691(0x59d)]?.[_0x314691(0x656)]??_0x504063?.[_0x314691(0x656)]??_0x3ebdbb?.['details']??null,_0x569dac=_0x504063?.[_0x314691(0x59d)]?.[_0x314691(0x5cc)]??_0x504063?.['code']??_0x3ebdbb?.[_0x314691(0x5cc)]??null,_0x55dc69=_0x504063?.[_0x314691(0x59d)]?.[_0x314691(0x246)]??_0x504063?.[_0x314691(0x246)]??_0x3ebdbb?.[_0x314691(0x246)]??null,_0x217675=typeof _0x3ebdbb===_0x314691(0x54f)?_0x3ebdbb:null,_0x3c794c=typeof _0x217675===_0x314691(0x54f)&&/^[A-Z0-9_]+$/[_0x314691(0x279)](_0x217675),_0x166bf3=_0x569dac??(_0x3c794c?_0x217675:null)??(_0x474957[_0x3fe5e4]||_0x314691(0x340)+_0x3fe5e4);let _0xc0f7=_0x55dc69;!_0xc0f7&&typeof _0x217675===_0x314691(0x54f)&&!_0x3c794c&&(_0xc0f7=_0x217675);if(!_0xc0f7&&_0x166bf3===_0x314691(0x585)){const _0x50da33=_0x5ba0c6(_0x3051dc);_0xc0f7=_0x50da33?_0x314691(0x292)+_0x50da33:_0x314691(0x625);}if(!_0xc0f7&&Array[_0x314691(0x729)](_0x3051dc)&&_0x3051dc[_0x314691(0x1b1)]>0x0){const _0x374f5d=_0x5ba0c6(_0x3051dc);if(_0x374f5d)_0xc0f7=_0x374f5d;}if(!_0xc0f7)_0xc0f7=_0x474957[_0x3fe5e4]||_0x314691(0x5d1);const _0x113113={'code':_0x166bf3,'message':_0xc0f7};if(_0x3051dc!=null)_0x113113[_0x314691(0x656)]=_0x3051dc;return _0x113113;}function _0x3f5b03(_0xd8da57){const _0xb1b0fc=_0x5d5633,_0x483c7f={};if(!_0xd8da57)return _0x483c7f;for(const _0x43897b of _0xd8da57[_0xb1b0fc(0x5ed)](';')){const _0x561796=_0x43897b[_0xb1b0fc(0x2db)]('=');if(_0x561796===-0x1)continue;const _0x19f9be=_0x43897b['slice'](0x0,_0x561796)[_0xb1b0fc(0x29c)](),_0x3f3906=_0x43897b[_0xb1b0fc(0x7a7)](_0x561796+0x1)['trim']();_0x483c7f[_0x19f9be]=decodeURIComponent(_0x3f3906);}return _0x483c7f;}function _0x466409(_0x2c9987,_0x323ee1){const _0x3e8aec=_0x5d5633;return _0x323ee1=_0x11fe7b(_0x323ee1),{'status':_0x323ee1[_0x3e8aec(0x57d)]??_0x2c9987[_0x3e8aec(0x57d)],'headers':{..._0x2c9987[_0x3e8aec(0x313)]||{},..._0x323ee1[_0x3e8aec(0x313)]||{}},'body':_0x323ee1['body']??_0x2c9987[_0x3e8aec(0x6bd)]};}function _0x4a87b9(_0x3086fa={}){const _0x3dc3ef=_0x5d5633;return _0x3086fa[_0x3dc3ef(0x4b4)]||(_0x3086fa[_0x3dc3ef(0x2f4)]?_0x3dc3ef(0x2f4):_0x3dc3ef(0x277));}function _0x4a56fd(_0x4accfd){const _0x324c2a=_0x5d5633;if(_0x4accfd[_0x324c2a(0x3a1)]?.['internal']===!![])return!![];if(_0x4accfd[_0x324c2a(0x3a1)]?.[_0x324c2a(0x717)]?.[_0x324c2a(0x622)]===!![])return!![];if(_0x4accfd[_0x324c2a(0x3a1)]?.[_0x324c2a(0x717)]?.['ok']===!![])return!![];return![];}function _0x47569f(_0x2e95e7,_0x4f3474){const _0x5b2cb3=_0x5d5633,_0x3a42c4=_0x4f3474[_0x5b2cb3(0x5ed)]('.');let _0x16d139=_0x2e95e7;for(const _0x4b5177 of _0x3a42c4){_0x16d139=_0x16d139?.[_0x4b5177];}return _0x16d139||null;}class _0x3f0d50{constructor(){const _0x50eb04=_0x5d5633;this[_0x50eb04(0x203)]=[],this[_0x50eb04(0x417)]=[],this['routes']=[],this[_0x50eb04(0x691)]=0x5*0x400*0x400,this[_0x50eb04(0x1d2)]=null,this[_0x50eb04(0x258)]=[],this[_0x50eb04(0x655)]=new Set(),this[_0x50eb04(0x717)]={'cookieName':'okdb_session','stateCookieName':_0x50eb04(0x294),'csrfCookieName':'kdb_admin_csrf'},this[_0x50eb04(0x773)]={},this['_loginStates']=new Map(),this['_oidcDiscoveryCache']=null,this[_0x50eb04(0x77a)]=null,this[_0x50eb04(0x307)]=new Map(),this['metrics']=new _0x1497ad(),this['_userPhase']=![],this[_0x50eb04(0x65d)]=0x0;}[_0x5d5633(0x330)](_0x2a8338={}){const _0x35db29=_0x5d5633;return this[_0x35db29(0x773)]=_0x2a8338||{},this[_0x35db29(0x747)]=_0x2a8338['mode']??_0x35db29(0x6ef),this['_authOptions'];}get[_0x5d5633(0x4e5)](){const _0x322c10=_0x5d5633;if(this[_0x322c10(0x426)]?.[_0x322c10(0x717)])return this['_okdb']['auth'][_0x322c10(0x4e5)];return![];}['getAuthOptions'](){const _0x1020ad=_0x5d5633;if(this[_0x1020ad(0x426)]?.['auth'])return this[_0x1020ad(0x426)][_0x1020ad(0x717)][_0x1020ad(0x33b)]();return this['_authOptions']||{};}['use'](_0x337a6c){this['middlewares']['push'](_0x337a6c);}[_0x5d5633(0x681)](_0x4858c1,_0x46b843){const _0x5003a2=_0x5d5633;this[_0x5003a2(0x417)][_0x5003a2(0x494)]({'match':_0x4858c1,'handler':_0x46b843});}[_0x5d5633(0x41a)](_0x1a1526,_0x47ed78,_0x525d77,_0x1a61a0={}){const _0x26362a=_0x5d5633,_0xdd9e72={'method':_0x113ee9(_0x1a1526),'path':_0x47ed78,'matcher':_0x4eacc1(_0x47ed78),'handler':_0x525d77,'meta':_0x1a61a0||{}},_0x5840fe=_0x3566f7(_0xdd9e72);_0xe346dd(_0xdd9e72,_0x5840fe),_0xdd9e72['operation']=_0x5840fe,_0xdd9e72['userAdded']=this['_userPhase']===!![];if(_0xdd9e72[_0x26362a(0x648)])this[_0x26362a(0x65d)]++;this[_0x26362a(0x3af)][_0x26362a(0x494)](_0xdd9e72);}['addRaw'](_0x284295,_0x122888,_0x7b7a24,_0x19229c={}){const _0x124b8b=_0x5d5633;this[_0x124b8b(0x41a)](_0x284295,_0x122888,_0x7b7a24,{..._0x19229c,'raw':!![]});}['_bestMatch'](_0x444869,_0x2ae309,{corsOnly:corsOnly=![]}={}){const _0x37f804=_0x5d5633;let _0x21a070=null,_0x3a2cf7=Infinity;for(const _0x20ec06 of this['routes']){if(corsOnly){if(!_0x20ec06[_0x37f804(0x2e5)]?.['cors'])continue;}else{if(_0x20ec06['method']!==_0x444869)continue;}if(!_0x20ec06[_0x37f804(0x5da)]['regex'][_0x37f804(0x279)](_0x2ae309))continue;const _0x37938c=_0x20ec06[_0x37f804(0x5da)]['keys']?.[_0x37f804(0x1b1)]??0x0;if(_0x37938c<_0x3a2cf7){_0x21a070=_0x20ec06,_0x3a2cf7=_0x37938c;if(_0x37938c===0x0)break;}}return _0x21a070;}[_0x5d5633(0x4b7)](_0x52c20d,_0x5c7881){const _0x3edf19=_0x5d5633,_0x2f8c18=_0x113ee9(_0x52c20d),_0x334e62=this[_0x3edf19(0x263)](_0x2f8c18,_0x5c7881);if(_0x334e62)return _0x334e62;if(_0x2f8c18===_0x3edf19(0x598))return this[_0x3edf19(0x263)](_0x2f8c18,_0x5c7881,{'corsOnly':!![]});return null;}['_shouldWrapResponse'](_0x2a325a,_0x300da4){const _0x4b7331=_0x5d5633;if(_0x2a325a?.[_0x4b7331(0x2e5)]?.[_0x4b7331(0x490)])return![];if(_0x300da4?.[_0x4b7331(0x313)]?.[_0x4b7331(0x331)])return![];return!![];}['listRoutes'](){const _0x3f8b7f=_0x5d5633;return this[_0x3f8b7f(0x3af)][_0x3f8b7f(0x3fb)](_0x335454=>!_0x335454[_0x3f8b7f(0x2e5)]?.[_0x3f8b7f(0x24f)])[_0x3f8b7f(0x2cc)](_0x40c9f0=>({'method':_0x40c9f0[_0x3f8b7f(0x399)],'path':_0x40c9f0['path'],'defaults':_0x40c9f0[_0x3f8b7f(0x5da)][_0x3f8b7f(0x6a0)],'meta':_0x40c9f0[_0x3f8b7f(0x2e5)],'operation':_0x40c9f0[_0x3f8b7f(0x43b)]}));}[_0x5d5633(0x2a6)](_0x15d288,_0x24d8e6,_0x46adea={}){const _0x21d017=_0x5d5633,{PassThrough:_0x2ab2ab}=require$$8;this[_0x21d017(0x41a)](_0x21d017(0x523),_0x15d288,({params:_0x139500,query:_0x2bb619,headers:_0x333c0a,context:_0x261851})=>{const _0x1b02ae=_0x21d017,_0x3d293e=new _0x2ab2ab();let _0x51870a=null;const _0x2860cd={};try{_0x261851?.[_0x1b02ae(0x75a)]?.[_0x1b02ae(0x412)]?.['setNoDelay'](!![]);}catch{}_0x3d293e[_0x1b02ae(0x4f7)](_0x1b02ae(0x2c5)),_0x51870a=setInterval(()=>{const _0x1c9c20=_0x1b02ae;try{_0x3d293e['write'](_0x1c9c20(0x48d));}catch{}},0x3a98);const _0x2ace49=(_0x5c67b8,_0x4dd92f,_0x25f135={})=>{const _0x5004ac=_0x1b02ae;try{const _0x454bf2=_0x25f135['raw']?String(_0x4dd92f??''):JSON[_0x5004ac(0x540)](_0x4dd92f);_0x25f135['id']!=null&&_0x3d293e[_0x5004ac(0x4f7)](_0x5004ac(0x759)+_0x25f135['id']+'\x0a');_0x3d293e[_0x5004ac(0x4f7)](_0x5004ac(0x37e)+_0x5c67b8+'\x0a');for(const _0x2e4b1b of _0x454bf2[_0x5004ac(0x5ed)]('\x0a')){_0x3d293e[_0x5004ac(0x4f7)](_0x5004ac(0x36e)+_0x2e4b1b+'\x0a');}_0x3d293e['write']('\x0a');}catch{}},_0x1e2466=()=>{const _0x1737e6=_0x1b02ae;_0x51870a&&(clearInterval(_0x51870a),_0x51870a=null);try{_0x3d293e[_0x1737e6(0x20b)]();}catch{}},_0x50a4f4=(_0x1be690,_0x2f2bc9)=>{_0x2860cd[_0x1be690]=_0x2f2bc9;};_0x261851?.['req']?.['on'](_0x1b02ae(0x5e4),_0x1e2466),_0x3d293e['on']('close',_0x1e2466);if(_0x261851?.['auth']&&_0x261851[_0x1b02ae(0x717)][_0x1b02ae(0x6ef)]!==!![]&&_0x261851[_0x1b02ae(0x717)][_0x1b02ae(0x622)]){const _0x4c2ce1={'headers':_0x333c0a??{},'cookies':_0x3f5b03(_0x333c0a?.[_0x1b02ae(0x234)]),'context':{},'socket':_0x261851?.[_0x1b02ae(0x75a)]?.[_0x1b02ae(0x412)]??{'remoteAddress':null}},_0x448a67=setInterval(async()=>{const _0x3acc6b=_0x1b02ae;try{const _0x39354f=await this[_0x3acc6b(0x1da)](_0x4c2ce1);if(_0x39354f?.[_0x3acc6b(0x6ef)]===!![]||_0x39354f?.['isAuthenticated'])return;_0x2ace49('auth',{'expired':!![]}),_0x1e2466();}catch{_0x1e2466();}},0xea60);_0x448a67['unref']?.(),_0x3d293e['on']('close',()=>clearInterval(_0x448a67));}const _0x1ac25e=_0x24d8e6({'send':_0x2ace49,'close':_0x1e2466,'params':_0x139500??{},'query':_0x2bb619??{},'headers':_0x333c0a??{},'context':_0x261851,'setHeader':_0x50a4f4});return typeof _0x1ac25e===_0x1b02ae(0x76e)&&_0x3d293e['on'](_0x1b02ae(0x5e4),_0x1ac25e),{'status':0xc8,'headers':{'content-type':'text/event-stream;\x20charset=utf-8','cache-control':_0x1b02ae(0x316),'connection':_0x1b02ae(0x2d2),'x-accel-buffering':'no',..._0x2860cd},'body':_0x3d293e};},{..._0x46adea,'sse':!![]});}async['_runGuards'](_0x5bfbe0,_0x17f111){const _0x1db957=_0x5d5633;for(const _0xf64f32 of this[_0x1db957(0x417)]){if(!_0xf64f32[_0x1db957(0x31f)](_0x5bfbe0))continue;const _0xe0b152=await _0xf64f32[_0x1db957(0x254)](_0x5bfbe0,_0x17f111);if(_0xe0b152===![])return![];}return!![];}async[_0x5d5633(0x317)](_0x1e4f0f,_0xda9ce0,_0x52b133){let _0x468516=0x0;const _0x4c9b7e=async()=>{const _0x4a193f=_0x5511,_0x1672fb=this[_0x4a193f(0x203)][_0x468516++];if(!_0x1672fb)return _0x52b133();return _0x1672fb(_0x1e4f0f,_0xda9ce0,_0x4c9b7e);};return _0x4c9b7e();}['_wrapApiResponse'](_0x3cae45,_0x5144ef){const _0x165b79=_0x5d5633,{status:status=0xc8,headers:headers={},body:_0x397e0b}=_0x3cae45;if(status>=0x12c&&status<0x190)return _0x3cae45;if(_0x5ce215(_0x397e0b))return _0x3cae45;if(Buffer[_0x165b79(0x224)](_0x397e0b))return _0x3cae45;if(typeof _0x397e0b===_0x165b79(0x54f))return _0x3cae45;const _0x1650f1={'time':+_0x5144ef[_0x165b79(0x26b)](0x2)};if(_0x397e0b?.['meta']&&typeof _0x397e0b[_0x165b79(0x2e5)]==='object'){const {time:_0x1b1171,..._0x4f0eaf}=_0x397e0b[_0x165b79(0x2e5)];Object[_0x165b79(0x1eb)](_0x1650f1,_0x4f0eaf);}let _0x36b47b;if(status>=0x190){const _0x1fca8d=_0x570026(status,_0x397e0b);_0x36b47b={'data':null,'error':_0x1fca8d,'meta':_0x1650f1};}else{if(status===0xcc||_0x397e0b==null)_0x36b47b={'data':null,'error':null,'meta':_0x1650f1};else{let _0x4f7348;if(_0x165b79(0x59d)in _0x397e0b)_0x4f7348=_0x397e0b['result'];else{const {meta:_0x3bd6c7,..._0x5dd3e0}=_0x397e0b;_0x4f7348=Object[_0x165b79(0x35c)](_0x5dd3e0)[_0x165b79(0x1b1)]>0x0?_0x5dd3e0:null;}_0x36b47b={'data':_0x4f7348,'error':null,'meta':_0x1650f1};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x36b47b};}async[_0x5d5633(0x27f)](_0x56bd09,_0x232f7a,_0x357271={},_0x5dc67f={}){const _0x1aa65c=_0x5d5633;_0x56bd09=_0x113ee9(_0x56bd09);const _0x4c0f66=this['_matchRoute'](_0x56bd09,_0x232f7a),_0x2919c0={'method':_0x56bd09,'path':_0x232f7a,'headers':_0x357271['headers']??{},'body':_0x357271[_0x1aa65c(0x6bd)]??null,'query':_0x357271[_0x1aa65c(0x194)]??{},'context':_0x5dc67f,'cookies':_0x3f5b03(_0x357271[_0x1aa65c(0x313)]?.[_0x1aa65c(0x234)]),'route':_0x4c0f66,'socket':{'remoteAddress':_0x357271[_0x1aa65c(0x5b3)]??'127.0.0.1'}};_0x2919c0[_0x1aa65c(0x3a1)]=_0x2919c0[_0x1aa65c(0x3a1)]||{};!_0x2919c0['context'][_0x1aa65c(0x717)]&&(_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)]=await this['authenticateRequest'](_0x2919c0));if(_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)]?.[_0x1aa65c(0x2a5)])return _0x11fe7b({'status':0x193,'body':{'error':{'code':_0x1aa65c(0x3de),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)]?.['user']&&!_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x468)]&&(_0x2919c0[_0x1aa65c(0x3a1)]['user']=_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)][_0x1aa65c(0x468)]);let _0x19d918=null;const _0x33d3b4={'status'(_0x2c8b89){const _0x51094=_0x1aa65c;_0x19d918=_0x19d918||{},_0x19d918[_0x51094(0x57d)]=_0x2c8b89;},'setHeader'(_0x201e5c,_0x77b86f){const _0x1dd3e0=_0x1aa65c;_0x19d918=_0x19d918||{},_0x19d918[_0x1dd3e0(0x313)]=_0x19d918[_0x1dd3e0(0x313)]||{};const _0x3b2b14=String(_0x201e5c)[_0x1dd3e0(0x2be)]();if(_0x3b2b14==='set-cookie'){const _0x1cbff5=_0x19d918[_0x1dd3e0(0x313)][_0x201e5c];if(!_0x1cbff5)_0x19d918[_0x1dd3e0(0x313)][_0x201e5c]=_0x77b86f;else{if(Array[_0x1dd3e0(0x729)](_0x1cbff5))_0x1cbff5[_0x1dd3e0(0x494)](_0x77b86f);else _0x19d918[_0x1dd3e0(0x313)][_0x201e5c]=[_0x1cbff5,_0x77b86f];}return;}_0x19d918['headers'][_0x201e5c]=_0x77b86f;},'send'(_0x3a54d8){const _0x1b44c2=_0x1aa65c;_0x19d918=_0x19d918||{},_0x19d918[_0x1b44c2(0x6bd)]=_0x3a54d8;}},_0x2299d7=await this[_0x1aa65c(0x636)](_0x2919c0,_0x33d3b4);if(!_0x2299d7)return _0x11fe7b(_0x19d918??{'status':0x193});const _0x1a7e86=this['_enforceOperationAccess'](_0x2919c0);if(_0x1a7e86)return _0x11fe7b(_0x1a7e86);const _0x21c8b8=this['_validateOperationRequest'](_0x2919c0);if(_0x21c8b8)return _0x11fe7b(_0x21c8b8);return await this[_0x1aa65c(0x317)](_0x2919c0,_0x33d3b4,async()=>{const _0x1c9d44=_0x1aa65c,_0x393e4e=await this[_0x1c9d44(0x689)](_0x2919c0);if(_0x19d918==null){_0x19d918=_0x393e4e;return;}_0x19d918=_0x466409(_0x19d918,_0x393e4e);}),_0x11fe7b(_0x19d918);}[_0x5d5633(0x5a2)](_0x33131d){const _0x31fb75=_0x5d5633,_0x5f2fa8=_0x33131d[_0x31fb75(0x3ef)]?.[_0x31fb75(0x43b)],_0xd064c1=_0x5f2fa8?.['access'];if(!_0x5f2fa8?.[_0x31fb75(0x1e6)]||!_0xd064c1)return null;if(_0x33131d['context']?.[_0x31fb75(0x717)]?.[_0x31fb75(0x6ef)]===!![]||_0x33131d['context']?.[_0x31fb75(0x717)]?.[_0x31fb75(0x53a)]===!![])return null;const _0x14e8ad=_0x4a87b9(_0x33131d['context']),_0x3ae4c5=Array[_0x31fb75(0x729)](_0xd064c1[_0x31fb75(0x452)])?_0xd064c1[_0x31fb75(0x452)]:null;if(_0xd064c1['internalOnly']&&_0x33131d[_0x31fb75(0x3a1)]?.[_0x31fb75(0x2f4)]!==!![])return{'status':0x193,'body':{'error':_0x31fb75(0x682)}};if(_0x3ae4c5&&_0x3ae4c5[_0x31fb75(0x1b1)]>0x0&&!_0x3ae4c5['includes'](_0x14e8ad)&&!(_0x14e8ad==='internal'&&_0x3ae4c5[_0x31fb75(0x70f)](_0x31fb75(0x4f1))))return{'status':0x193,'body':{'error':_0x31fb75(0x682)}};if(_0xd064c1['authRequired']&&!_0x4a56fd(_0x33131d))return{'status':0x191,'body':{'error':_0x31fb75(0x373)}};const _0x34fd28=_0xd064c1['permission'];if(!_0x34fd28)return null;if(_0x33131d['context']?.[_0x31fb75(0x717)]?.[_0x31fb75(0x737)]==='sync-node')return null;const _0x2641fa=_0x33131d[_0x31fb75(0x3a1)]?.[_0x31fb75(0x717)]?.['token'];if(!_0x2641fa){if(_0x33131d[_0x31fb75(0x3a1)]?.[_0x31fb75(0x717)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x31fb75(0x784)}};}if(!_0x33131d[_0x31fb75(0x764)]&&_0x33131d['route']?.['matcher']){const _0xb9aff5=_0x33131d[_0x31fb75(0x3ef)]['matcher'][_0x31fb75(0x74f)]['exec'](_0x33131d[_0x31fb75(0x504)]);_0xb9aff5&&(_0x33131d[_0x31fb75(0x764)]={},_0x33131d[_0x31fb75(0x3ef)][_0x31fb75(0x5da)][_0x31fb75(0x35c)][_0x31fb75(0x4ff)]((_0x3ea550,_0xfff6b2)=>{const _0x4ceac6=_0x31fb75,_0x97ee9=_0xb9aff5[_0xfff6b2+0x1];_0x33131d[_0x4ceac6(0x764)][_0x3ea550]=_0x97ee9?decodeURIComponent(_0x97ee9):_0x33131d['route'][_0x4ceac6(0x5da)][_0x4ceac6(0x6a0)][_0x3ea550]??undefined;}));}let _0x440717=null;_0xd064c1[_0x31fb75(0x4d8)]?.['env']&&(_0x440717=_0x47569f(_0x33131d,_0xd064c1[_0x31fb75(0x4d8)][_0x31fb75(0x1a1)]));if(_0x440717&&_0x440717[_0x31fb75(0x72d)]('~')){const _0x5ebaab=_0x39651c(_0x34fd28),_0x483301=_0x540eab(_0x2641fa[_0x31fb75(0x48c)]||[],(_0x2641fa['grants']||{})[_0x440717]||[]);if(!_0x103ae3(_0x483301,_0x5ebaab))return{'status':0x193,'body':{'error':_0x31fb75(0x36d)+_0x5ebaab+_0x31fb75(0x4b3)}};}const _0x33425b=_0x540eab(_0x2641fa[_0x31fb75(0x48c)]||[],_0x440717?(_0x2641fa[_0x31fb75(0x1bb)]||{})[_0x440717]||[]:[]);if(!_0x103ae3(_0x33425b,_0x34fd28))return{'status':0x193,'body':{'error':_0x31fb75(0x36d)+_0x34fd28}};return null;}[_0x5d5633(0x71a)](_0x2b9a65){const _0x3c9f02=_0x5d5633,_0x27cdd5=_0x2b9a65[_0x3c9f02(0x3ef)],_0x1770e1=_0x27cdd5?.[_0x3c9f02(0x43b)];if(!_0x1770e1?.[_0x3c9f02(0x1e6)]||!_0x1770e1[_0x3c9f02(0x57a)])return null;let _0x12e264=_0x2b9a65[_0x3c9f02(0x764)]??null;if(!_0x12e264&&_0x27cdd5?.[_0x3c9f02(0x5da)]){const _0x8b538d=_0x27cdd5[_0x3c9f02(0x5da)][_0x3c9f02(0x74f)][_0x3c9f02(0x201)](_0x2b9a65[_0x3c9f02(0x504)]);_0x8b538d&&(_0x12e264={},_0x27cdd5[_0x3c9f02(0x5da)][_0x3c9f02(0x35c)][_0x3c9f02(0x4ff)]((_0x506ff7,_0x300870)=>{const _0xa57615=_0x3c9f02,_0x571b45=_0x8b538d[_0x300870+0x1];_0x12e264[_0x506ff7]=_0x571b45?decodeURIComponent(_0x571b45):_0x27cdd5[_0xa57615(0x5da)][_0xa57615(0x6a0)][_0x506ff7]??undefined;}));}const _0x4a2287=_0x3156df(_0x27cdd5,_0x12e264??{},_0x2b9a65[_0x3c9f02(0x194)]??{},_0x2b9a65['body'],_0x2b9a65[_0x3c9f02(0x313)]??{}),_0x5980c8=_0x10d068(_0x27cdd5,_0x4a2287||{});if(!_0x5980c8)return null;const _0x430914=_0x5ba0c6(_0x5980c8[_0x3c9f02(0x5bc)]);return{'status':0x190,'body':{'error':_0x5980c8['code'],'code':_0x5980c8['code'],'message':_0x430914?_0x3c9f02(0x292)+_0x430914:_0x3c9f02(0x625),'details':_0x5980c8[_0x3c9f02(0x5bc)]}};}[_0x5d5633(0x33d)](_0x98e470,_0x26ce4a){const _0x2aeb50=_0x5d5633,_0x1de674=_0x10d068(_0x98e470,_0x26ce4a||{});if(!_0x1de674)return null;return{'code':_0x1de674['code'],'message':_0x5ba0c6(_0x1de674['errors'])?_0x2aeb50(0x292)+_0x5ba0c6(_0x1de674['errors']):_0x2aeb50(0x625),'details':_0x1de674[_0x2aeb50(0x5bc)]};}async[_0x5d5633(0x689)](_0x269fb4){const _0xe3699d=_0x5d5633;if(_0x269fb4[_0xe3699d(0x399)]===_0xe3699d(0x598)){const _0x830a3=this[_0xe3699d(0x263)](_0xe3699d(0x598),_0x269fb4[_0xe3699d(0x504)],{'corsOnly':!![]});if(_0x830a3)return{'status':0xcc,'headers':_0x1907c1(_0x269fb4[_0xe3699d(0x313)],_0x830a3[_0xe3699d(0x2e5)]['cors'],_0x830a3[_0xe3699d(0x399)])||{}};}const _0x709d9b=this[_0xe3699d(0x263)](_0x269fb4[_0xe3699d(0x399)],_0x269fb4[_0xe3699d(0x504)]);if(_0x709d9b){const _0x19652c=_0x709d9b[_0xe3699d(0x5da)]['regex'][_0xe3699d(0x201)](_0x269fb4['path']),_0x34dfbf={};_0x709d9b['matcher'][_0xe3699d(0x35c)]['forEach']((_0x125ab1,_0x186d95)=>{const _0x470431=_0xe3699d,_0x96190c=_0x19652c[_0x186d95+0x1];_0x34dfbf[_0x125ab1]=_0x96190c?decodeURIComponent(_0x96190c):_0x709d9b['matcher'][_0x470431(0x6a0)][_0x125ab1]??undefined;}),_0x269fb4['params']=_0x34dfbf;try{const _0x5e194a=await _0x709d9b[_0xe3699d(0x254)]({'params':_0x34dfbf,'body':_0x269fb4[_0xe3699d(0x6bd)],'query':_0x269fb4[_0xe3699d(0x194)],'headers':_0x269fb4[_0xe3699d(0x313)],'context':_0x269fb4[_0xe3699d(0x3a1)]}),_0x273fd4=_0x11fe7b(_0x5e194a),_0x6af241=_0x1907c1(_0x269fb4[_0xe3699d(0x313)],_0x709d9b[_0xe3699d(0x2e5)]?.[_0xe3699d(0x463)],_0x709d9b[_0xe3699d(0x399)]);if(!_0x6af241)return _0x273fd4;return{..._0x273fd4,'headers':{..._0x273fd4[_0xe3699d(0x313)]||{},..._0x6af241}};}catch(_0x2c78ba){const _0x4159e8=_0x2c78ba?.[_0xe3699d(0x57d)]||_0x59cfaf[_0x2c78ba?.[_0xe3699d(0x5cc)]]||0x1f4;return{'status':_0x4159e8,'body':{'error':_0x2c78ba[_0xe3699d(0x246)]||_0xe3699d(0x6da),'code':_0x2c78ba?.[_0xe3699d(0x5cc)]||_0x474957[_0x4159e8]||'HTTP_'+_0x4159e8,'message':_0x2c78ba?.[_0xe3699d(0x246)]||_0xe3699d(0x6da),..._0x2c78ba?.[_0xe3699d(0x656)]!=null?{'details':_0x2c78ba[_0xe3699d(0x656)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}[_0x5d5633(0x2b1)](_0x4469a3,_0x4e6493={}){const _0x3eea8f=_0x5d5633;if(typeof _0x4e6493==='string'||Array[_0x3eea8f(0x729)](_0x4e6493))_0x4e6493={'host':_0x4e6493};_0x4e6493=_0x4e6493??{};const _0x43ae63=Number(_0x4e6493[_0x3eea8f(0x4d1)])||0x0;if(_0x43ae63>=0x1||_0x4e6493[_0x3eea8f(0x611)]!=null||_0x4e6493[_0x3eea8f(0x6ee)]!=null){const _0x103804=new Error(_0x3eea8f(0x40c)+_0x3eea8f(0x72f)+_0x3eea8f(0x43a)+_0x3eea8f(0x594));_0x103804[_0x3eea8f(0x5cc)]=_0x3eea8f(0x708);throw _0x103804;}if(this[_0x3eea8f(0x1d2)])throw new Error(_0x3eea8f(0x260));const _0x39f6e4=_0x4e6493[_0x3eea8f(0x2d6)]==null?[undefined]:[][_0x3eea8f(0x33f)](_0x4e6493['host']);if(!_0x39f6e4[_0x3eea8f(0x1b1)]||_0x39f6e4[_0x3eea8f(0x7a8)](_0x5c9bda=>_0x5c9bda!==undefined&&(typeof _0x5c9bda!==_0x3eea8f(0x54f)||!_0x5c9bda))){const _0x44bb07=new Error(_0x3eea8f(0x6e6));_0x44bb07[_0x3eea8f(0x5cc)]='BAD_HOST';throw _0x44bb07;}_0x4469a3&&this[_0x3eea8f(0x717)][_0x3eea8f(0x1cf)]===_0x3eea8f(0x1b6)&&(this[_0x3eea8f(0x717)][_0x3eea8f(0x1cf)]=_0x3eea8f(0x5e8)+_0x4469a3,this[_0x3eea8f(0x426)]?.['auth']&&(this[_0x3eea8f(0x426)][_0x3eea8f(0x717)][_0x3eea8f(0x633)]=this[_0x3eea8f(0x717)][_0x3eea8f(0x1cf)]));const _0xa37640=this[_0x3eea8f(0x426)]?.[_0x3eea8f(0x76b)]?.['debug']?.[_0x3eea8f(0x4de)]??![],_0x9d3383=async(_0x55a715,_0x2665e7)=>{const _0x498aca=_0x3eea8f,_0x2f99b2=Date['now']();if(_0xa37640){const _0x3e17a4=_0x55a715[_0x498aca(0x51d)]||'/',_0x2a757d=_0x55a715[_0x498aca(0x313)]?.[_0x498aca(0x4a1)]?_0x55a715[_0x498aca(0x313)][_0x498aca(0x4a1)][_0x498aca(0x1f7)](/^Bearer\s+(\S{0,8})\S*/i,_0x498aca(0x233)):'-',_0x41320d=_0x55a715[_0x498aca(0x313)]?.['cf-ray']||'-',_0x499544=_0x55a715[_0x498aca(0x313)]?.[_0x498aca(0x287)]||_0x55a715[_0x498aca(0x313)]?.[_0x498aca(0x4e2)]||'-',_0x5e50cc=_0x55a715['headers']?.[_0x498aca(0x72e)]||'-';process[_0x498aca(0x5c6)]['write']('[req]\x20'+_0x55a715[_0x498aca(0x399)]['padEnd'](0x7)+'\x20'+_0x3e17a4[_0x498aca(0x48a)](0x2d)+'\x20'+(_0x498aca(0x4f4)+_0x2a757d+_0x498aca(0x6e8)+_0x5e50cc+_0x498aca(0x756)+_0x41320d+'\x20cf-ip='+_0x499544+'\x0a'));}try{const _0x3737b4=new _0x15e479(_0x55a715['url'],'http://'+_0x55a715[_0x498aca(0x313)][_0x498aca(0x2d6)]),_0x2d4157=this['_matchRoute'](_0x55a715[_0x498aca(0x399)],_0x3737b4['pathname']),_0x35f325=_0x2d4157?.['meta']?.[_0x498aca(0x5f7)]===!![];if(_0x35f325){const _0x4b76a0=_0x55a715[_0x498aca(0x313)]?.['content-length'];if(_0x4b76a0!=null){const _0xc14a3a=Number(_0x4b76a0);if(Number[_0x498aca(0x39f)](_0xc14a3a)&&_0xc14a3a>this[_0x498aca(0x691)]){_0x2665e7[_0x498aca(0x2c3)]=0x19d,_0x2665e7[_0x498aca(0x281)](_0x498aca(0x3d9));return;}}}const _0x137c88=_0x35f325?null:await _0x1b30dc(_0x55a715,this[_0x498aca(0x691)]),_0x5253f4=_0x35f325?_0x130746(_0x55a715,this['maxBodyBytes']):undefined,_0xec59ec=await this['handle'](_0x55a715[_0x498aca(0x399)],_0x3737b4[_0x498aca(0x573)],{'body':_0x137c88,'query':Object[_0x498aca(0x26f)](_0x3737b4[_0x498aca(0x413)][_0x498aca(0x352)]()),'headers':_0x55a715['headers']},{'req':_0x55a715,'res':_0x2665e7,'rawStream':_0x5253f4}),_0x39bf30=this[_0x498aca(0x4b7)](_0x55a715[_0x498aca(0x399)],_0x3737b4['pathname']),_0x1d873b=Date[_0x498aca(0x6a7)]()-_0x2f99b2,_0x78fac2=this[_0x498aca(0x28e)](_0x39bf30,_0xec59ec)?this[_0x498aca(0x671)](_0xec59ec,_0x1d873b):_0x11fe7b(_0xec59ec),_0x159cbb=(_0x78fac2['status']||0xc8)>=0x190;this[_0x498aca(0x22b)]['record'](_0x55a715[_0x498aca(0x399)],_0x1d873b,_0x159cbb),_0x2acb87(_0x2665e7,_0x78fac2);if(_0xa37640){const _0x2681ba=_0x78fac2[_0x498aca(0x57d)]||0xc8,_0xde3b2b=Date['now']()-_0x2f99b2;process['stdout'][_0x498aca(0x4f7)](_0x498aca(0x3b8)+_0x55a715[_0x498aca(0x399)]['padEnd'](0x7)+'\x20'+_0x3737b4[_0x498aca(0x573)][_0x498aca(0x48a)](0x2d)+'\x20'+_0x2681ba+'\x20\x20'+_0xde3b2b+_0x498aca(0x289));}}catch(_0x37e4a9){const _0x1a35a7=Date[_0x498aca(0x6a7)]()-_0x2f99b2;this[_0x498aca(0x22b)]['record'](_0x55a715[_0x498aca(0x399)],_0x1a35a7,!![]);const _0x5baeee=_0x37e4a9?.[_0x498aca(0x57d)]||0x1f4;_0x2665e7[_0x498aca(0x2c3)]=_0x5baeee,_0x5baeee===0x19d?_0x2665e7['end']('Payload\x20too\x20large'):_0x2665e7[_0x498aca(0x281)](_0x37e4a9[_0x498aca(0x246)]||_0x498aca(0x6da));}};this[_0x3eea8f(0x258)]=_0x39f6e4['map'](_0x3d2dd4=>{const _0x2940c6=_0x3eea8f,_0x352402=_0x301872['createServer'](_0x9d3383);_0x352402['on'](_0x2940c6(0x651),_0x6604cc=>{const _0x22888a=_0x2940c6;this[_0x22888a(0x655)][_0x22888a(0x41a)](_0x6604cc),_0x6604cc['on'](_0x22888a(0x5e4),()=>this[_0x22888a(0x655)]['delete'](_0x6604cc));});if(_0x3d2dd4===undefined)_0x352402[_0x2940c6(0x2b1)](_0x4469a3);else _0x352402['listen'](_0x4469a3,_0x3d2dd4);return _0x352402;}),this[_0x3eea8f(0x1d2)]=this[_0x3eea8f(0x258)][0x0];for(const _0x20ebb9 of this[_0x3eea8f(0x258)][_0x3eea8f(0x7a7)](0x1))_0x20ebb9['on'](_0x3eea8f(0x3ba),_0x19d30f=>this[_0x3eea8f(0x1d2)]?.[_0x3eea8f(0x652)](_0x3eea8f(0x3ba),_0x19d30f));const _0x3bef35=_0x34c89c(_0x4469a3,_0x4e6493[_0x3eea8f(0x2d6)]),_0x8f7b61=this[_0x3eea8f(0x426)];return _0x8f7b61?.[_0x3eea8f(0x683)]&&(_0x8f7b61['processes']['noteListenAddr'](_0x3bef35),require$$1$2[_0x3eea8f(0x4cb)]?_0x8f7b61[_0x3eea8f(0x5d2)]?.({'kind':'http-server'})[_0x3eea8f(0x58b)](()=>{}):_0x8f7b61[_0x3eea8f(0x308)]?.({'kind':_0x3eea8f(0x29f),'listenAddr':_0x3bef35})[_0x3eea8f(0x58b)](()=>{})),this[_0x3eea8f(0x1d2)];}async[_0x5d5633(0x5e4)](_0xce36ac={}){const _0x4a8c62=_0x5d5633,_0x4a2649=this['server'];this[_0x4a8c62(0x1d2)]=null;const _0x1164e5=this[_0x4a8c62(0x258)][_0x4a8c62(0x70f)](_0x4a2649)?this[_0x4a8c62(0x258)]:_0x4a2649?[_0x4a2649]:[];this[_0x4a8c62(0x258)]=[];if(_0x4a2649&&_0x4a2649[_0x4a8c62(0x6bb)]){try{await _0x4a2649[_0x4a8c62(0x5e4)]();}catch{}this['metrics']&&this[_0x4a8c62(0x22b)]['close']();return;}if(_0x1164e5['length']){const _0x5f301f=Number[_0x4a8c62(0x39f)](_0xce36ac['forceAfterMs'])?Math[_0x4a8c62(0x46c)](0x0,_0xce36ac[_0x4a8c62(0x3e6)]):0x3e8,_0x2a8afd=_0x2ec69f=>new Promise(_0x18e233=>{const _0x20bf84=_0x4a8c62;let _0x5b8cf4=![],_0x28ecde=null,_0x2857f1=null;const _0x4bbf4b=()=>{if(_0x5b8cf4)return;_0x5b8cf4=!![];if(_0x28ecde)clearTimeout(_0x28ecde);if(_0x2857f1)clearTimeout(_0x2857f1);_0x18e233();};try{_0x2ec69f['close'](_0x4bbf4b);}catch{_0x4bbf4b();return;}try{_0x2ec69f[_0x20bf84(0x227)]?.();}catch{}_0x28ecde=setTimeout(()=>{const _0x2ee950=_0x20bf84;try{_0x2ec69f[_0x2ee950(0x285)]?.();}catch{}for(const _0x1ca311 of this['_sockets']){try{_0x1ca311[_0x2ee950(0x20b)]();}catch{}}_0x2857f1=setTimeout(_0x4bbf4b,0x64),_0x2857f1[_0x2ee950(0x6d1)]?.();},_0x5f301f),_0x28ecde[_0x20bf84(0x6d1)]?.();});await Promise[_0x4a8c62(0x70d)](_0x1164e5['map'](_0x2a8afd));}this['metrics']&&this[_0x4a8c62(0x22b)][_0x4a8c62(0x5e4)]();}[_0x5d5633(0x249)](_0x5467e4,_0x258275,_0xc13afd=0x36ee80){const _0x5d72e3=_0x5d5633,_0x3a8095=Date['now'](),_0x3a1c16=Buffer[_0x5d72e3(0x716)](JSON[_0x5d72e3(0x540)]({'iat':_0x3a8095,'exp':_0x3a8095+_0xc13afd,..._0x5467e4}))[_0x5d72e3(0x202)](_0x5d72e3(0x465)),_0x21ade6=_0x273263(_0x3a1c16,_0x258275);return _0x3a1c16+'.'+_0x21ade6;}[_0x5d5633(0x1e5)](_0x4d24d5,_0x31dfdc={}){const _0x515008=_0x5d5633,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x515008(0x4d2),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x31dfdc;let _0x13be71=this[_0x515008(0x717)]['cookieName']+'='+_0x4d24d5;if(httpOnly)_0x13be71+=_0x515008(0x6d6);if(sameSite)_0x13be71+=_0x515008(0x30a)+sameSite;if(path)_0x13be71+=_0x515008(0x5d4)+path;if(secure)_0x13be71+=_0x515008(0x25f);if(Number['isFinite'](maxAge))_0x13be71+=';\x20Max-Age='+Math['max'](0x0,Math[_0x515008(0x1f9)](maxAge));if(expires instanceof Date)_0x13be71+=_0x515008(0x58a)+expires['toUTCString']();return _0x13be71;}[_0x5d5633(0x5f1)](_0x535817=this[_0x5d5633(0x717)][_0x5d5633(0x1cf)],_0xd977d2={}){const _0x3a3eed=_0x5d5633,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0xd977d2;let _0xde7e08=_0x535817+'=';if(httpOnly)_0xde7e08+=_0x3a3eed(0x6d6);if(sameSite)_0xde7e08+=_0x3a3eed(0x30a)+sameSite;if(path)_0xde7e08+=_0x3a3eed(0x5d4)+path;if(secure)_0xde7e08+=_0x3a3eed(0x25f);return _0xde7e08+=_0x3a3eed(0x6c1),_0xde7e08;}[_0x5d5633(0x5b0)](_0x2999e4,_0x74c52b){const _0x9ba899=_0x5d5633;if(!_0x2999e4)return null;const [_0x3c3864,_0x461118]=String(_0x2999e4)[_0x9ba899(0x5ed)]('.');if(!_0x3c3864||!_0x461118)return null;const _0x56e143=_0x273263(_0x3c3864,_0x74c52b);if(!_0xb2fab6(_0x461118,_0x56e143))return null;try{const _0x5e2a5e=JSON[_0x9ba899(0x355)](Buffer[_0x9ba899(0x716)](_0x3c3864,_0x9ba899(0x465))[_0x9ba899(0x202)]());if(_0x5e2a5e[_0x9ba899(0x5b5)]<=Date[_0x9ba899(0x6a7)]())return null;return _0x5e2a5e;}catch{return null;}}[_0x5d5633(0x4f8)](_0x173cf5){const _0x27688d=_0x5d5633;if(this[_0x27688d(0x426)]?.[_0x27688d(0x717)])return this['_okdb']['auth'][_0x27688d(0x4f8)](_0x173cf5);return _0x2ce7fb(_0x173cf5);}[_0x5d5633(0x441)](_0x26273f){const _0x1807d4=_0x5d5633;if(this[_0x1807d4(0x426)]?.[_0x1807d4(0x717)])return this[_0x1807d4(0x426)][_0x1807d4(0x717)][_0x1807d4(0x441)](_0x26273f);const _0x5c72fd=this[_0x1807d4(0x773)]?.[_0x1807d4(0x423)]??0x36ee80,_0x47b248=this['_authOptions']?.['tokenSecret'];return _0xc4a5a6(_0x26273f,_0x47b248,_0x5c72fd);}[_0x5d5633(0x692)](_0x32ff01){const _0x5a1704=_0x5d5633;if(this[_0x5a1704(0x426)]?.['auth'])return this[_0x5a1704(0x426)][_0x5a1704(0x717)][_0x5a1704(0x692)](_0x32ff01);const _0x5d385e=this[_0x5a1704(0x773)]?.[_0x5a1704(0x345)];return _0x175736(_0x32ff01,_0x5d385e);}async['authenticateRequest'](_0x88a548){const _0x248e8c=_0x5d5633;if(this[_0x248e8c(0x426)]?.['auth'])return this[_0x248e8c(0x426)][_0x248e8c(0x717)][_0x248e8c(0x1da)](_0x88a548);if(_0x88a548[_0x248e8c(0x3a1)]?.[_0x248e8c(0x2f4)]===!![]||this[_0x248e8c(0x747)]===_0x248e8c(0x6ef))return{'id':_0x248e8c(0x256),'username':_0x248e8c(0x256),'roles':[_0x248e8c(0x731)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x248e8c(0x256),'username':_0x248e8c(0x256),'roles':[_0x248e8c(0x731)],'isAuthenticated':!![],'isSystem':!![]}};const _0x33dda9=this[_0x248e8c(0x4f8)](_0x88a548[_0x248e8c(0x313)]?.[_0x248e8c(0x4a1)]),_0x3fa941=_0x88a548[_0x248e8c(0x381)]?.[this['auth'][_0x248e8c(0x1cf)]],_0x44258b=_0x33dda9||_0x3fa941;if(!_0x44258b)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x5a76df=this['authenticateToken'](_0x44258b);if(!_0x5a76df)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x578b1d={'id':_0x5a76df[_0x248e8c(0x6ca)]??null,'username':_0x5a76df[_0x248e8c(0x6b2)]??null,'roles':Array[_0x248e8c(0x729)](_0x5a76df[_0x248e8c(0x56c)])?_0x5a76df[_0x248e8c(0x56c)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x578b1d['id'],'username':_0x578b1d[_0x248e8c(0x6b2)],'roles':_0x578b1d[_0x248e8c(0x56c)],'isAuthenticated':!![],'isSystem':![],'user':_0x578b1d,'claims':_0x5a76df,'subject':_0x578b1d['id']};}async[_0x5d5633(0x5c3)](_0x5f4655,_0x1fc685={}){const _0x43935c=_0x5d5633,_0x122a93=_0x1be0f0(_0x5f4655),_0x6f417b=Array[_0x43935c(0x729)](_0x1fc685[_0x43935c(0x218)])&&_0x1fc685[_0x43935c(0x218)][_0x43935c(0x1b1)]>0x0?_0x1fc685[_0x43935c(0x218)]:[_0x43935c(0x663),'ES256'],_0x584eba=_0x122a93[_0x43935c(0x65e)]?.['alg'];if(!_0x6f417b[_0x43935c(0x70f)](_0x584eba))throw new Error(_0x43935c(0x252)+_0x584eba);if(!_0x122a93[_0x43935c(0x65e)]?.[_0x43935c(0x4a9)])throw new Error('JWT\x20is\x20missing\x20kid');const _0x35aa30=await this[_0x43935c(0x455)](_0x1fc685);if(!_0x35aa30?.[_0x43935c(0x257)])throw new Error('OIDC\x20discovery\x20missing\x20jwks_uri');const _0x5bac8b=await this[_0x43935c(0x25e)](_0x35aa30[_0x43935c(0x257)],_0x122a93[_0x43935c(0x65e)][_0x43935c(0x4a9)],_0x1fc685);if(!_0xf110ca(_0x584eba,_0x5bac8b,_0x122a93[_0x43935c(0x425)],_0x122a93[_0x43935c(0x61c)]))throw new Error(_0x43935c(0x3e5));const _0xe8088d=Math[_0x43935c(0x1f9)](Date[_0x43935c(0x6a7)]()/0x3e8),_0x342581=_0x122a93[_0x43935c(0x4fe)]||{};if(_0x342581[_0x43935c(0x204)]!==_0x35aa30[_0x43935c(0x2f9)])throw new Error(_0x43935c(0x390));const _0x5e8cfd=_0x1fc685['audience'];if(_0x5e8cfd){const _0x601f73=_0x564998(_0x342581[_0x43935c(0x677)]);if(!_0x601f73[_0x43935c(0x70f)](_0x5e8cfd))throw new Error('JWT\x20audience\x20mismatch');}if(typeof _0x342581['exp']!==_0x43935c(0x758)||_0x342581['exp']<=_0xe8088d)throw new Error('JWT\x20expired');if(_0x342581[_0x43935c(0x705)]!=null&&_0x342581[_0x43935c(0x705)]>_0xe8088d)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x342581['token_use']==='id')throw new Error(_0x43935c(0x421));return{'subject':_0x342581[_0x43935c(0x6ca)]??null,'email':_0x342581[_0x43935c(0x6a5)]??null,'scopes':typeof _0x342581[_0x43935c(0x4d8)]===_0x43935c(0x54f)?_0x342581[_0x43935c(0x4d8)]['split'](/\s+/)[_0x43935c(0x3fb)](Boolean):[],'claims':_0x342581,'tokenType':_0x43935c(0x557)};}async[_0x5d5633(0x455)](_0x2cb0ec={}){const _0x5be7e5=_0x5d5633,_0x793b3e=String(_0x2cb0ec['issuer']||'')['replace'](/\/+$/,'');if(!_0x793b3e)return null;const _0x150e5b=Number[_0x5be7e5(0x39f)](_0x2cb0ec[_0x5be7e5(0x71d)])?_0x2cb0ec[_0x5be7e5(0x71d)]:0xa*0x3c*0x3e8;if(this[_0x5be7e5(0x571)]?.[_0x5be7e5(0x2f9)]===_0x793b3e&&this['_oidcDiscoveryCache'][_0x5be7e5(0x337)]>Date[_0x5be7e5(0x6a7)]())return this[_0x5be7e5(0x571)]['value'];const _0x6ff472=await _0x4fa889(_0x793b3e+'/.well-known/openid-configuration'),_0x14f6ae={'issuer':_0x6ff472[_0x5be7e5(0x2f9)]||_0x793b3e,'authorization_endpoint':_0x2cb0ec['authorizationUrl']||_0x6ff472['authorization_endpoint'],'token_endpoint':_0x2cb0ec['tokenUrl']||_0x6ff472['token_endpoint'],'jwks_uri':_0x2cb0ec[_0x5be7e5(0x5e7)]||_0x6ff472['jwks_uri']};return this[_0x5be7e5(0x571)]={'issuer':_0x793b3e,'value':_0x14f6ae,'expiresAt':Date['now']()+_0x150e5b},_0x14f6ae;}async['_fetchJwks'](_0x37c54a,_0x633c70=0x5*0x3c*0x3e8){const _0xdb6167=_0x5d5633,_0x2c453a=await _0x4fa889(_0x37c54a),_0x202898=new Map();for(const _0x1b212d of _0x2c453a[_0xdb6167(0x35c)]||[]){if(!_0x1b212d?.[_0xdb6167(0x4a9)])continue;_0x202898[_0xdb6167(0x238)](_0x1b212d[_0xdb6167(0x4a9)],_0x6dd18d(_0x1b212d));}return this['_jwksCache']={'uri':_0x37c54a,'keys':_0x202898,'expiresAt':Date[_0xdb6167(0x6a7)]()+_0x633c70},this[_0xdb6167(0x77a)];}async['_getJwkKey'](_0x41d259,_0x2f4628,_0x1b356a={}){const _0x401984=_0x5d5633,_0x29147f=Number[_0x401984(0x39f)](_0x1b356a[_0x401984(0x382)])?_0x1b356a[_0x401984(0x382)]:0x5*0x3c*0x3e8,_0x28eae4=0x1e*0x3e8,_0x583618=this[_0x401984(0x307)][_0x401984(0x5e0)](_0x2f4628);if(_0x583618!==undefined&&_0x583618>Date[_0x401984(0x6a7)]())throw new Error(_0x401984(0x6e4)+_0x2f4628);(!this[_0x401984(0x77a)]||this['_jwksCache'][_0x401984(0x3b6)]!==_0x41d259||this[_0x401984(0x77a)][_0x401984(0x337)]<=Date[_0x401984(0x6a7)]())&&await this[_0x401984(0x782)](_0x41d259,_0x29147f);let _0x32cacf=this[_0x401984(0x77a)]?.[_0x401984(0x35c)]?.['get'](_0x2f4628);if(_0x32cacf)return _0x32cacf;await this[_0x401984(0x782)](_0x41d259,_0x29147f),_0x32cacf=this[_0x401984(0x77a)]?.[_0x401984(0x35c)]?.[_0x401984(0x5e0)](_0x2f4628);if(!_0x32cacf){this[_0x401984(0x307)][_0x401984(0x238)](_0x2f4628,Date[_0x401984(0x6a7)]()+_0x28eae4);throw new Error(_0x401984(0x6e4)+_0x2f4628);}return _0x32cacf;}[_0x5d5633(0x76a)](_0x44bd4a){const _0x327ca2=_0x5d5633;if(this[_0x327ca2(0x426)]?.[_0x327ca2(0x717)])return this['_okdb'][_0x327ca2(0x717)][_0x327ca2(0x76a)](_0x44bd4a);const _0x4eec9d=_0x44bd4a?.[_0x327ca2(0x343)]||{},_0x2f3a53={'sub':_0x44bd4a?.[_0x327ca2(0x361)]??_0x4eec9d['sub']??null,'email':_0x44bd4a?.['email']??_0x4eec9d[_0x327ca2(0x6a5)]??null,'name':_0x44bd4a?.['name']??_0x4eec9d[_0x327ca2(0x60a)]??_0x4eec9d['preferred_username']??null,'groups':_0x44bd4a?.[_0x327ca2(0x78c)]??_0x4eec9d['groups']??[],'roles':_0x44bd4a?.['roles']??_0x4eec9d[_0x327ca2(0x56c)]??[]};return{'type':_0x327ca2(0x1dc),'tokenType':_0x44bd4a?.[_0x327ca2(0x6a6)]??'access','subject':_0x2f3a53[_0x327ca2(0x6ca)],'email':_0x2f3a53[_0x327ca2(0x6a5)],'scopes':_0x44bd4a?.['scopes']??_0x4eec9d[_0x327ca2(0x4d8)]?.[_0x327ca2(0x5ed)]?.('\x20')?.[_0x327ca2(0x3fb)](Boolean)??[],'claims':_0x4eec9d,'user':_0x2f3a53,'isAuthenticated':!![]};}[_0x5d5633(0x3e7)](_0x2e8e0e={},_0x334f47=0x927c0){const _0x3da5c6=_0x5d5633;if(this['_okdb']?.[_0x3da5c6(0x717)])return this[_0x3da5c6(0x426)][_0x3da5c6(0x717)][_0x3da5c6(0x3e7)](_0x2e8e0e,_0x334f47);const _0x4c58ce=_0x13e04f(0x18);this['_loginStates'][_0x3da5c6(0x238)](_0x4c58ce,{..._0x2e8e0e,'exp':Date[_0x3da5c6(0x6a7)]()+_0x334f47});if(this[_0x3da5c6(0x63c)][_0x3da5c6(0x50f)]%0x32===0x0){const _0x114148=Date['now']();for(const [_0x4a52a0,_0x36963e]of this[_0x3da5c6(0x63c)]){if(_0x36963e[_0x3da5c6(0x5b5)]<=_0x114148)this[_0x3da5c6(0x63c)][_0x3da5c6(0x614)](_0x4a52a0);}}return _0x4c58ce;}[_0x5d5633(0x493)](_0x55e638){const _0xaa570=_0x5d5633;if(this[_0xaa570(0x426)]?.[_0xaa570(0x717)])return this[_0xaa570(0x426)][_0xaa570(0x717)][_0xaa570(0x493)](_0x55e638);if(!_0x55e638)return null;const _0x52c2e2=this[_0xaa570(0x63c)][_0xaa570(0x5e0)](_0x55e638);this['_loginStates'][_0xaa570(0x614)](_0x55e638);if(!_0x52c2e2)return null;if(_0x52c2e2['exp']<=Date['now']())return null;return _0x52c2e2;}}function _0x11fe7b(_0x201f11){const _0x44bcce=_0x5d5633;if(_0x201f11==null)return{'status':0xcc};if(Buffer[_0x44bcce(0x224)](_0x201f11)||_0x5ce215(_0x201f11))return{'status':0xc8,'body':_0x201f11};if(typeof _0x201f11==='object'&&_0x44bcce(0x57d)in _0x201f11){if(!(_0x44bcce(0x6bd)in _0x201f11)&&!_0x5ce215(_0x201f11[_0x44bcce(0x6bd)])){const {status:_0x896a3a,headers:_0x561adb,..._0x2820a9}=_0x201f11;if(Object[_0x44bcce(0x35c)](_0x2820a9)['length']>0x0)return{'status':_0x896a3a,'headers':_0x561adb,'body':_0x2820a9};}return _0x201f11;}return{'status':0xc8,'body':_0x201f11};}function _0x5ce215(_0x2dad4f){const _0x3e0881=_0x5d5633;return _0x2dad4f&&typeof _0x2dad4f[_0x3e0881(0x309)]===_0x3e0881(0x76e);}function _0x130746(_0x4d05d9,_0x6650ef){const _0x15fb2c=_0x5d5633,{PassThrough:_0x3adcd7}=require$$8;let _0x18823d=0x0,_0x3ad90f=![];const _0x3630f2=new _0x3adcd7();return _0x4d05d9['on'](_0x15fb2c(0x268),_0x5065e1=>{const _0x4e90fc=_0x15fb2c;if(_0x3ad90f)return;_0x18823d+=_0x5065e1[_0x4e90fc(0x1b1)];if(_0x18823d>_0x6650ef){_0x3ad90f=!![];const _0x272b9d=new Error('Payload\x20too\x20large');_0x272b9d[_0x4e90fc(0x57d)]=0x19d,_0x3630f2['destroy'](_0x272b9d);return;}if(!_0x3630f2[_0x4e90fc(0x3c5)])_0x3630f2['push'](_0x5065e1);}),_0x4d05d9['on'](_0x15fb2c(0x281),()=>{const _0x3f0611=_0x15fb2c;!_0x3ad90f&&!_0x3630f2[_0x3f0611(0x3c5)]&&(_0x3ad90f=!![],_0x3630f2[_0x3f0611(0x281)]());}),_0x4d05d9['on'](_0x15fb2c(0x3ba),_0x186bd0=>{const _0x5d140e=_0x15fb2c;if(!_0x3630f2[_0x5d140e(0x3c5)])_0x3630f2['destroy'](_0x186bd0);}),_0x4d05d9[_0x15fb2c(0x795)](),_0x3630f2['on'](_0x15fb2c(0x39b),()=>{const _0x481771=_0x15fb2c;if(!_0x3630f2['destroyed'])_0x4d05d9[_0x481771(0x39b)]();}),_0x3630f2;}function _0x1b30dc(_0xaa8847,_0x18a8a9){const _0x1b229c=_0x5d5633;if(_0xaa8847[_0x1b229c(0x399)]===_0x1b229c(0x523)||_0xaa8847[_0x1b229c(0x399)]===_0x1b229c(0x4e3))return null;const _0x18ec61=_0xaa8847[_0x1b229c(0x313)]?.['content-length'];if(_0x18ec61!=null){const _0x4ebf61=Number(_0x18ec61);if(Number[_0x1b229c(0x39f)](_0x4ebf61)&&_0x4ebf61>_0x18a8a9){const _0x5d30e6=new Error(_0x1b229c(0x3d9));_0x5d30e6[_0x1b229c(0x57d)]=0x19d;throw _0x5d30e6;}}return new Promise((_0xdcee5e,_0x30959f)=>{const _0x29ad43=_0x1b229c;let _0x2100f3='',_0x28f72f=0x0;_0xaa8847['on'](_0x29ad43(0x268),_0x3de3a0=>{const _0x56de24=_0x29ad43;_0x28f72f+=_0x3de3a0[_0x56de24(0x1b1)];if(_0x28f72f>_0x18a8a9){try{_0xaa8847['destroy']();}catch{}const _0x30b375=new Error(_0x56de24(0x3d9));_0x30b375['status']=0x19d,_0x30959f(_0x30b375);return;}_0x2100f3+=_0x3de3a0;}),_0xaa8847['on'](_0x29ad43(0x281),()=>{const _0x322163=_0x29ad43;if(!_0x2100f3)return _0xdcee5e(null);const _0x555262=_0xaa8847[_0x322163(0x313)]?.[_0x322163(0x6aa)]||'';if(_0x555262[_0x322163(0x70f)]('application/x-www-form-urlencoded')){const _0x410f54={};for(const [_0x2d9ce5,_0x486f32]of new URLSearchParams(_0x2100f3))_0x410f54[_0x2d9ce5]=_0x486f32;return _0xdcee5e(_0x410f54);}try{_0xdcee5e(JSON[_0x322163(0x355)](_0x2100f3));}catch(_0x4cf14c){_0x30959f(_0x4cf14c);}}),_0xaa8847['on'](_0x29ad43(0x3ba),_0x30959f);});}function _0x2acb87(_0x1ab42c,_0x1c7ec8){const _0x1520c8=_0x5d5633,{status:status=0xc8,headers:headers={},body:_0x15f22b}=_0x1c7ec8;_0x1ab42c[_0x1520c8(0x2c3)]=status;for(const [_0x1f8bb5,_0x212854]of Object[_0x1520c8(0x352)](headers)){_0x1ab42c[_0x1520c8(0x3a9)](_0x1f8bb5,_0x212854);}if(_0x15f22b==null){_0x1ab42c[_0x1520c8(0x281)]();return;}if(_0x5ce215(_0x15f22b)){_0x15f22b[_0x1520c8(0x309)](_0x1ab42c);return;}if(Buffer[_0x1520c8(0x224)](_0x15f22b)){_0x1ab42c[_0x1520c8(0x281)](_0x15f22b);return;}if(typeof _0x15f22b==='object'){!_0x1ab42c[_0x1520c8(0x273)](_0x1520c8(0x46b))&&_0x1ab42c[_0x1520c8(0x3a9)](_0x1520c8(0x46b),'application/json');_0x1ab42c[_0x1520c8(0x281)](JSON[_0x1520c8(0x540)](_0x15f22b));return;}_0x1ab42c['end'](String(_0x15f22b));}function _0x34c89c(_0x2ec589,_0xad40ba){const _0x25d0b2=_0x5d5633;if(_0xad40ba==null)return':'+_0x2ec589;return[][_0x25d0b2(0x33f)](_0xad40ba)[_0x25d0b2(0x2cc)](_0x55b7be=>(_0x55b7be['includes'](':')?'['+_0x55b7be+']':_0x55b7be)+':'+_0x2ec589)[_0x25d0b2(0x2b6)](',\x20');}return okdbHttp[_0x5d5633(0x577)]=_0x3f0d50,okdbHttp[_0x5d5633(0x577)]['formatListenAddr']=_0x34c89c,okdbHttp[_0x5d5633(0x577)][_0x5d5633(0x628)]=_0x59cfaf,okdbHttp['exports'];}var hasRequiredOkdb;function requireOkdb(){const _0x4756d7=_0x5411c3;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x4756d7(0x269)]();}catch{}const _0x17c7c1=require$$1,_0x408499=require$$1$1,{resolveWorkers:_0x39ef6a,isShmbufNative:_0x1e86d6}=requireOkdbWorkers();function _0x4473e3(_0x25e2a8){const _0x42d30b=_0x4756d7,_0xdab21=_0x25e2a8[_0x42d30b(0x7a7)](0x2),_0x71be1a={};let _0x5b8124=0x0;while(_0x5b8124<_0xdab21[_0x42d30b(0x1b1)]){const _0x4b371b=_0xdab21[_0x5b8124];if(_0x4b371b===_0x42d30b(0x728)||_0x4b371b==='-p')_0x71be1a[_0x42d30b(0x3a7)]=Number(_0xdab21[++_0x5b8124]);else{if(_0x4b371b===_0x42d30b(0x354)||_0x4b371b==='-d')_0x71be1a['path']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x721)||_0x4b371b==='-k')_0x71be1a[_0x42d30b(0x5af)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--config'||_0x4b371b==='-c')_0x71be1a[_0x42d30b(0x586)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x328))_0x71be1a['logLevel']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x29b))_0x71be1a[_0x42d30b(0x515)]=!![];else{if(_0x4b371b===_0x42d30b(0x198))_0x71be1a[_0x42d30b(0x674)]=!![];else{if(_0x4b371b===_0x42d30b(0x2d1))_0x71be1a[_0x42d30b(0x4d1)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--no-cluster')_0x71be1a[_0x42d30b(0x37c)]=!![];else{if(_0x4b371b===_0x42d30b(0x657)||_0x4b371b==='-e')_0x71be1a[_0x42d30b(0x1a1)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x2b8))_0x71be1a[_0x42d30b(0x2bd)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x3c7))_0x71be1a[_0x42d30b(0x555)]=!![];else{if(_0x4b371b===_0x42d30b(0x42f))_0x71be1a['blobs']=!![];else{if(_0x4b371b===_0x42d30b(0x232))_0x71be1a[_0x42d30b(0x2bb)]=!![];else{if(_0x4b371b===_0x42d30b(0x624)){const _0x5da554=[];while(_0x5b8124+0x1<_0xdab21['length']&&!_0xdab21[_0x5b8124+0x1][_0x42d30b(0x72d)]('--')){_0x5da554[_0x42d30b(0x494)](_0xdab21[++_0x5b8124]);}_0x71be1a['open']=_0x5da554[_0x42d30b(0x1b1)]>0x0?_0x5da554:!![];}else{if(_0x4b371b===_0x42d30b(0x5ef))_0x71be1a['logRequests']=!![];else{if(_0x4b371b===_0x42d30b(0x5a5))_0x71be1a[_0x42d30b(0x60a)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x562))_0x71be1a['password']=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--label')_0x71be1a[_0x42d30b(0x52b)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x351))_0x71be1a['permissions']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x612))_0x71be1a[_0x42d30b(0x1bb)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--ttl')_0x71be1a['ttl']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x36c))_0x71be1a[_0x42d30b(0x21b)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x2cb)||_0x4b371b==='-u')_0x71be1a[_0x42d30b(0x6b2)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x243))_0x71be1a[_0x42d30b(0x206)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x449)||_0x4b371b==='-v'){const _0xf54bfc=require$$3;console[_0x42d30b(0x547)](_0xf54bfc[_0x42d30b(0x214)]),process['exit'](0x0);}else(_0x4b371b===_0x42d30b(0x43c)||_0x4b371b==='-h')&&(_0x310703(),process[_0x42d30b(0x592)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x5b8124++;}return _0x71be1a;}function _0x310703(){const _0x58e6ee=_0x4756d7;console['log'](_0x58e6ee(0x5f4));}const _0x288549=new Set(['debug',_0x4756d7(0x380),'warn','error']);function _0x2f8070(_0x1b5f46){const _0x3e8b01=_0x4756d7,_0x58ee39=_0x1b5f46[_0x3e8b01(0x586)]?_0x17c7c1[_0x3e8b01(0x25c)](_0x1b5f46[_0x3e8b01(0x586)]):_0x17c7c1['resolve'](_0x3e8b01(0x603));let _0x33be81={};if(_0x408499[_0x3e8b01(0x2d5)](_0x58ee39))try{const _0x17707a=_0x408499[_0x3e8b01(0x6ba)](_0x58ee39,_0x3e8b01(0x1f4))[_0x3e8b01(0x1f7)](/^\uFEFF/,'');_0x33be81=JSON[_0x3e8b01(0x355)](_0x17707a),console[_0x3e8b01(0x547)](_0x3e8b01(0x79e)+_0x58ee39);}catch(_0x39898f){console[_0x3e8b01(0x3ba)](_0x3e8b01(0x568)+_0x58ee39+':\x20'+_0x39898f['message']),process['exit'](0x1);}const _0x116fd4={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x59e5c5={'port':_0x1b5f46['port']??_0x33be81[_0x3e8b01(0x3a7)]??_0x116fd4[_0x3e8b01(0x3a7)]??0x2124,'dbPath':_0x1b5f46['path']??_0x33be81[_0x3e8b01(0x504)]??_0x116fd4[_0x3e8b01(0x504)]??'./okdb-data','key':_0x1b5f46[_0x3e8b01(0x5af)]??_0x33be81[_0x3e8b01(0x5af)]??_0x116fd4['key']??undefined,'logLevel':_0x1b5f46[_0x3e8b01(0x3a2)]??_0x33be81['logLevel']??_0x116fd4[_0x3e8b01(0x3a2)]??_0x3e8b01(0x380),'noRepl':_0x1b5f46['noRepl']??_0x33be81['noRepl']??_0x116fd4['noRepl']??![],'noAdmin':_0x1b5f46['noAdmin']??_0x33be81[_0x3e8b01(0x674)]??_0x116fd4[_0x3e8b01(0x674)]??![],'admin':_0x33be81[_0x3e8b01(0x731)]??{},'api':_0x33be81[_0x3e8b01(0x45c)]??undefined,'auth':_0x33be81[_0x3e8b01(0x717)]??undefined,'mcp':_0x33be81['mcp']??undefined,'http':_0x33be81['http']??undefined,'timeMachine':_0x33be81[_0x3e8b01(0x556)]!==![]?_0x33be81['timeMachine']??{}:![],'processors':_0x33be81[_0x3e8b01(0x1a4)],'engines':_0x33be81[_0x3e8b01(0x5bf)],'compaction':_0x33be81[_0x3e8b01(0x37b)]};if(_0x1b5f46[_0x3e8b01(0x37c)])_0x59e5c5[_0x3e8b01(0x37c)]=!![];if(_0x1b5f46[_0x3e8b01(0x4d1)]!==undefined)_0x59e5c5[_0x3e8b01(0x74e)]=_0x1b5f46['workers'];_0x1b5f46[_0x3e8b01(0x6ef)]!==undefined&&(_0x59e5c5[_0x3e8b01(0x717)]=_0x59e5c5[_0x3e8b01(0x717)]||{},_0x59e5c5['auth'][_0x3e8b01(0x6ef)]=_0x1b5f46[_0x3e8b01(0x6ef)]);_0x1b5f46['logRequests']&&(_0x59e5c5[_0x3e8b01(0x264)]=_0x59e5c5[_0x3e8b01(0x264)]||{},_0x59e5c5[_0x3e8b01(0x264)][_0x3e8b01(0x4de)]=!![]);(!Number[_0x3e8b01(0x428)](_0x59e5c5[_0x3e8b01(0x3a7)])||_0x59e5c5[_0x3e8b01(0x3a7)]<0x1||_0x59e5c5[_0x3e8b01(0x3a7)]>0xffff)&&(console['error'](_0x3e8b01(0x1de)+_0x59e5c5[_0x3e8b01(0x3a7)]+_0x3e8b01(0x3e2)),process[_0x3e8b01(0x592)](0x1));!_0x288549[_0x3e8b01(0x4e7)](_0x59e5c5[_0x3e8b01(0x3a2)])&&(console[_0x3e8b01(0x3ba)](_0x3e8b01(0x1f8)+_0x59e5c5[_0x3e8b01(0x3a2)]+_0x3e8b01(0x353)),process[_0x3e8b01(0x592)](0x1));const _0xfb14e2=_0x59e5c5[_0x3e8b01(0x277)]?.[_0x3e8b01(0x2d6)];_0xfb14e2!==undefined&&!(typeof _0xfb14e2===_0x3e8b01(0x54f)&&_0xfb14e2)&&!(Array[_0x3e8b01(0x729)](_0xfb14e2)&&_0xfb14e2[_0x3e8b01(0x1b1)]&&_0xfb14e2['every'](_0x50eaeb=>typeof _0x50eaeb==='string'&&_0x50eaeb))&&(console[_0x3e8b01(0x3ba)](_0x3e8b01(0x626)+JSON['stringify'](_0xfb14e2)+_0x3e8b01(0x6ae)),process[_0x3e8b01(0x592)](0x1));for(const _0x49777f of _0x29f83b){_0x59e5c5[_0x49777f]!==undefined&&typeof _0x59e5c5[_0x49777f]!==_0x3e8b01(0x312)&&(console['error'](_0x3e8b01(0x6de)+_0x49777f+_0x3e8b01(0x3f3)+JSON[_0x3e8b01(0x540)](_0x59e5c5[_0x49777f])+_0x3e8b01(0x574)),process[_0x3e8b01(0x592)](0x1));}return _0x59e5c5;}const _0x29f83b=[_0x4756d7(0x1a4),'engines',_0x4756d7(0x37b)];function _0x17f4e3(_0x3b2f17){const _0x51d8ba=_0x4756d7;return!!(_0x3b2f17&&typeof _0x3b2f17===_0x51d8ba(0x336)&&!Array[_0x51d8ba(0x729)](_0x3b2f17)&&Object[_0x51d8ba(0x35c)](_0x3b2f17)[_0x51d8ba(0x1b1)]>0x0);}function _0x4caf29(_0x245f82){const _0x2cface=_0x4756d7;return{..._0x245f82['key']?{'encryptionKey':_0x245f82[_0x2cface(0x5af)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x1ac530=!process[_0x4756d7(0x5c6)][_0x4756d7(0x338)]||!!process.env.NO_COLOR;function _0x19cfb4(_0x3c2ef7,_0x1bc7de){return _0x1ac530?_0x1bc7de:'\x1b['+_0x3c2ef7+'m'+_0x1bc7de+'\x1b[0m';}function _0x3300f1(_0x1501a2){const _0x144b53=_0x4756d7;if(!_0x1501a2||_0x1501a2[_0x144b53(0x1b1)]===0x0)return;const _0xb96867='─'[_0x144b53(0x1f2)](0x38);process['stderr'][_0x144b53(0x4f7)]('\x0a'),process[_0x144b53(0x391)][_0x144b53(0x4f7)](_0x19cfb4('33','\x20\x20⚠\x20\x20'+_0x1501a2[_0x144b53(0x1b1)]+_0x144b53(0x68a)+(_0x1501a2[_0x144b53(0x1b1)]>0x1?'S':'')+'\x0a')),process[_0x144b53(0x391)]['write']('\x20\x20'+_0xb96867+'\x0a');for(const _0x4f8312 of _0x1501a2){const _0x5b4973=_0x4f8312[_0x144b53(0x407)]===_0x144b53(0x3ba)?_0x19cfb4('31',_0x144b53(0x525)):_0x19cfb4('33','\x20\x20⚠');process['stderr'][_0x144b53(0x4f7)](_0x5b4973+'\x20\x20'+_0x19cfb4('1',_0x4f8312[_0x144b53(0x549)])+'\x0a'),process[_0x144b53(0x391)][_0x144b53(0x4f7)](_0x144b53(0x7aa)+_0x4f8312[_0x144b53(0x246)]+'\x0a');if(_0x4f8312[_0x144b53(0x3db)])process['stderr'][_0x144b53(0x4f7)]('\x20\x20\x20\x20\x20\x20\x20'+_0x19cfb4('2',_0x144b53(0x56b)+_0x4f8312[_0x144b53(0x3db)])+'\x0a');process[_0x144b53(0x391)]['write']('\x0a');}process[_0x144b53(0x391)][_0x144b53(0x4f7)]('\x20\x20'+_0xb96867+'\x0a\x0a');}function _0x150920(_0x540747,_0x12e1bc,_0x4c8a45={}){const _0x56ffe4=_0x4756d7,_0x4e08a8=_0x540747[_0x56ffe4(0x277)][_0x56ffe4(0x2b1)](_0x12e1bc,_0x4c8a45);if(_0x4e08a8&&_0x4e08a8[_0x56ffe4(0x6bb)])return Promise[_0x56ffe4(0x25c)](_0x4e08a8);const _0x581775=_0x540747[_0x56ffe4(0x277)][_0x56ffe4(0x258)]?.[_0x56ffe4(0x1b1)]?_0x540747[_0x56ffe4(0x277)][_0x56ffe4(0x258)]:[_0x4e08a8];return new Promise((_0x315d8d,_0x4f7065)=>{const _0x2c397a=_0x56ffe4;_0x4e08a8['once']('error',_0x4f7065),Promise[_0x2c397a(0x70d)](_0x581775[_0x2c397a(0x2cc)](_0x1945ce=>_0x1945ce[_0x2c397a(0x6fc)]?null:new Promise(_0x4fd465=>_0x1945ce[_0x2c397a(0x78b)](_0x2c397a(0x6fc),_0x4fd465))))[_0x2c397a(0x1c9)](()=>_0x315d8d(_0x4e08a8));});}function _0x9e9136(_0x56963a){const _0x407217=_0x4756d7;return _0x56963a[_0x407217(0x277)]?.[_0x407217(0x2d6)]!==undefined?{'host':_0x56963a[_0x407217(0x277)][_0x407217(0x2d6)]}:{};}async function _0x19d876(_0x138360){const _0x29118c=_0x4756d7,_0x2579c5=require$$4$1;console[_0x29118c(0x547)](_0x29118c(0x409));let _0x588dd8=!![];const _0xb870d4=(_0x380aae,_0x218b29)=>{console['log']('\x20\x20'+(_0x380aae?'✓':'✗')+'\x20'+_0x218b29);if(!_0x380aae)_0x588dd8=![];},_0x5b70cb=Number(process['version'][_0x29118c(0x1f7)]('v','')[_0x29118c(0x5ed)]('.')[0x0]);_0xb870d4(_0x5b70cb>=0x12,'node\x20'+process[_0x29118c(0x214)]+(_0x5b70cb<0x12?_0x29118c(0x6f0):''));const _0x10cc73=_0x17c7c1['resolve'](_0x138360[_0x29118c(0x3d8)]);try{_0x408499[_0x29118c(0x65b)](_0x10cc73,{'recursive':!![]});const _0x4b1d32=_0x17c7c1['join'](_0x10cc73,_0x29118c(0x56a));_0x408499['writeFileSync'](_0x4b1d32,''),_0x408499[_0x29118c(0x632)](_0x4b1d32),_0xb870d4(!![],'database\x20path\x20writable:\x20'+_0x10cc73);}catch(_0x4bc24e){_0xb870d4(![],_0x29118c(0x245)+_0x10cc73+_0x29118c(0x7a5)+_0x4bc24e['message']+')');}const _0x55068f=await new Promise(_0x1c268e=>{const _0x3d9ae6=_0x29118c,_0x2d86a0=_0x2579c5[_0x3d9ae6(0x75b)]();_0x2d86a0[_0x3d9ae6(0x78b)](_0x3d9ae6(0x3ba),()=>_0x1c268e(![])),_0x2d86a0[_0x3d9ae6(0x78b)]('listening',()=>{const _0x234219=_0x3d9ae6;_0x2d86a0[_0x234219(0x5e4)](),_0x1c268e(!![]);}),_0x2d86a0[_0x3d9ae6(0x2b1)](_0x138360[_0x3d9ae6(0x3a7)],_0x3d9ae6(0x491));});_0xb870d4(_0x55068f,'port\x20'+_0x138360[_0x29118c(0x3a7)]+'\x20'+(_0x55068f?_0x29118c(0x67a):_0x29118c(0x4a7)));const _0x2de362=_0x17c7c1[_0x29118c(0x25c)](_0x29118c(0x603));if(_0x408499[_0x29118c(0x2d5)](_0x2de362))try{JSON['parse'](_0x408499[_0x29118c(0x6ba)](_0x2de362,'utf8')['replace'](/^\uFEFF/,'')),_0xb870d4(!![],_0x29118c(0x5cd)+_0x2de362);}catch(_0x266cd6){_0xb870d4(![],'config\x20file\x20invalid:\x20'+_0x266cd6['message']);}else _0xb870d4(!![],_0x29118c(0x4ef));if(_0x1e86d6()){const _0x5c36ff=_0x39ef6a(_0x138360,{'shmbufNative':!![]});_0xb870d4(!![],_0x29118c(0x3d6)+_0x5c36ff+'\x20worker'+(_0x5c36ff===0x1?'':'s')+')');}else _0xb870d4(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x55068f)try{const _0xc0ed91=require(_0x29118c(0x6ec)),_0x4491d4=new _0xc0ed91(_0x10cc73,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x4491d4[_0x29118c(0x6ef)]();try{await _0x4491d4[_0x29118c(0x683)][_0x29118c(0x6ef)]({'reader':!![]});const _0x359cda=_0x4491d4[_0x29118c(0x683)][_0x29118c(0x606)](),_0x326d95=_0x359cda[_0x29118c(0x3fb)](_0x29abc3=>_0x29abc3['supervisorKey']!=null)['length'];_0xb870d4(!![],'processes:\x20'+_0x359cda[_0x29118c(0x1b1)]+_0x29118c(0x1d7)+(_0x359cda['length']===0x1?'':'es')+'\x20('+_0x326d95+_0x29118c(0x4c8));}finally{await _0x4491d4[_0x29118c(0x5e4)]();}}catch{}console['log'](''),_0x588dd8?console[_0x29118c(0x547)](_0x29118c(0x22c)):(console[_0x29118c(0x547)]('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x29118c(0x592)](0x1));}async function _0x1cb293(){const _0x1fce4d=_0x4756d7,_0x234b21=_0x17c7c1[_0x1fce4d(0x25c)]('.kdbconfig');!_0x408499[_0x1fce4d(0x2d5)](_0x234b21)?(_0x408499['writeFileSync'](_0x234b21,JSON['stringify']({'port':0x2124,'path':_0x1fce4d(0x6be),'logLevel':_0x1fce4d(0x380),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x1fce4d(0x547)](_0x1fce4d(0x278))):console[_0x1fce4d(0x547)](_0x1fce4d(0x5d5));const _0x5415af=_0x17c7c1['resolve']('./okdb-data');!_0x408499[_0x1fce4d(0x2d5)](_0x5415af)?(_0x408499[_0x1fce4d(0x65b)](_0x5415af,{'recursive':!![]}),console[_0x1fce4d(0x547)](_0x1fce4d(0x644))):console['log'](_0x1fce4d(0x1d6)),console[_0x1fce4d(0x547)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x4dc58d(_0x5af489){const _0x55ff54=_0x4756d7,_0x4e20c6=_0x17c7c1[_0x55ff54(0x25c)](_0x5af489['dbPath']);if(!_0x408499[_0x55ff54(0x2d5)](_0x4e20c6)){console[_0x55ff54(0x547)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x4e20c6+_0x55ff54(0x52c));return;}const _0x116695=require$$0$2,_0x869944=_0x116695['createInterface']({'input':process[_0x55ff54(0x780)],'output':process[_0x55ff54(0x5c6)]}),_0x4020e7=await new Promise(_0x35c98c=>_0x869944[_0x55ff54(0x2f0)](_0x55ff54(0x66f)+_0x4e20c6+_0x55ff54(0x496),_0x35c98c));_0x869944[_0x55ff54(0x5e4)](),console[_0x55ff54(0x547)]('');if(_0x4020e7[_0x55ff54(0x29c)]()[_0x55ff54(0x2be)]()!=='yes'){console[_0x55ff54(0x547)](_0x55ff54(0x7a0));return;}let _0x11a280=null;try{_0x11a280=await _0x4adbdd(_0x4e20c6,_0x5af489,async _0x3679b6=>{const _0x40de07=_0x55ff54,_0x4f9229=_0x3679b6['_systemEnv'],_0x161554=_0x4f9229?.['db']?.['get']('__identity')??null,_0x56d7cc=[];if(_0x4f9229?.['hasType'](_0x40de07(0x259)))for(const {key:_0x4e79ad,value:_0x354bc4}of _0x4f9229[_0x40de07(0x433)](_0x40de07(0x259))){_0x56d7cc['push']({'key':_0x4e79ad,'value':_0x354bc4});}return{'identity':_0x161554,'licenses':_0x56d7cc};});}catch(_0x139221){console[_0x55ff54(0x547)](_0x55ff54(0x744)+_0x139221[_0x55ff54(0x246)]+_0x55ff54(0x1a0));}_0x408499[_0x55ff54(0x2fc)](_0x4e20c6,{'recursive':!![],'force':!![]}),console[_0x55ff54(0x547)]('[okdb]\x20reset:\x20'+_0x4e20c6+_0x55ff54(0x2a9));if(_0x11a280&&(_0x11a280[_0x55ff54(0x1c1)]||_0x11a280[_0x55ff54(0x58c)][_0x55ff54(0x1b1)]>0x0))try{await _0x4adbdd(_0x4e20c6,_0x5af489,async _0x156297=>{const _0x35f03a=_0x55ff54,_0x545cf7=_0x156297[_0x35f03a(0x6cd)];_0x11a280['identity']&&_0x545cf7['db'][_0x35f03a(0x48f)](_0x35f03a(0x6e3),_0x11a280[_0x35f03a(0x1c1)]);if(_0x11a280[_0x35f03a(0x58c)][_0x35f03a(0x1b1)]>0x0){if(!_0x545cf7['hasType'](_0x35f03a(0x259)))await _0x545cf7[_0x35f03a(0x300)]('~licenses');for(const {key:_0x4e744d,value:_0x533280}of _0x11a280[_0x35f03a(0x58c)]){await _0x545cf7[_0x35f03a(0x4cd)](_0x35f03a(0x259),_0x4e744d,_0x533280);}}});const _0x15fb87=[];if(_0x11a280[_0x55ff54(0x1c1)])_0x15fb87[_0x55ff54(0x494)]('node\x20identity');if(_0x11a280[_0x55ff54(0x58c)][_0x55ff54(0x1b1)]>0x0)_0x15fb87[_0x55ff54(0x494)](_0x11a280[_0x55ff54(0x58c)][_0x55ff54(0x1b1)]+_0x55ff54(0x4d5));console[_0x55ff54(0x547)]('[okdb]\x20preserved:\x20'+_0x15fb87[_0x55ff54(0x2b6)](_0x55ff54(0x210)));}catch(_0x16cc65){console[_0x55ff54(0x547)]('[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20'+_0x16cc65[_0x55ff54(0x246)]);}}async function _0x4adbdd(_0x3bc8c3,_0x5159a5,_0x10d758){const _0x12477b=_0x4756d7,_0x33575f=require$$5,_0x3652b6=new _0x33575f(_0x3bc8c3,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x4caf29(_0x5159a5)});await _0x3652b6[_0x12477b(0x6ef)]();try{return await _0x10d758(_0x3652b6);}finally{await _0x3652b6['close']();}}async function _0x40df23(_0x2c2a99,_0x94a531){const _0x48ef24=_0x4756d7,_0x485fd1=require$$5,_0x4eeb52=_0x17c7c1[_0x48ef24(0x25c)](_0x94a531['dbPath']);console['log'](_0x48ef24(0x629)+_0x4eeb52+'…');const _0x3c0fe5=new _0x485fd1(_0x4eeb52,_0x4caf29(_0x94a531));await _0x3c0fe5[_0x48ef24(0x6ef)](),console[_0x48ef24(0x547)](_0x48ef24(0x753)+_0x2c2a99+'…');const {envs:_0x3a161a}=await _0x3c0fe5['migrate'][_0x48ef24(0x4ee)](_0x2c2a99);for(const _0x161518 of _0x3a161a){const _0x151895=_0x161518['sizeBefore']>0x0?_0x48ef24(0x7a5)+(_0x161518[_0x48ef24(0x2fa)]/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0x161518[_0x48ef24(0x3f2)]/0x400/0x400)[_0x48ef24(0x26b)](0x2)+_0x48ef24(0x215):'';console['log']('\x20\x20✓\x20'+_0x161518[_0x48ef24(0x60a)]+'\x20\x20→\x20\x20'+_0x161518['dest']+_0x151895);}await _0x3c0fe5[_0x48ef24(0x5e4)](),console[_0x48ef24(0x547)]('[okdb]\x20backup\x20complete');}async function _0x408e93(_0x56f869,_0x4901fe,_0x3ec3bb){const _0x506909=_0x4756d7,_0x295544=require$$5,_0x39a766=_0x17c7c1[_0x506909(0x25c)](_0x4901fe[_0x506909(0x3d8)]),_0x32c1bd=_0x3ec3bb[_0x506909(0x1a1)]??_0x506909(0x45b),_0x546725=_0x3ec3bb[_0x506909(0x2bd)]?_0x3ec3bb[_0x506909(0x2bd)][_0x506909(0x5ed)](',')[_0x506909(0x2cc)](_0x491b59=>_0x491b59[_0x506909(0x29c)]()):null;console[_0x506909(0x547)]('[okdb]\x20opening\x20'+_0x39a766+'…');const _0x573000=new _0x295544(_0x39a766,_0x4caf29(_0x4901fe));await _0x573000[_0x506909(0x6ef)](),console['log'](_0x506909(0x1fc)+_0x32c1bd+'\x22\x20→\x20'+_0x56f869+'…');const _0x1e565c=await _0x573000['migrate']['exportToFile'](_0x56f869,{'envName':_0x32c1bd,'types':_0x546725,'includeChanges':!!_0x3ec3bb[_0x506909(0x555)]});console[_0x506909(0x547)]('[okdb]\x20exported\x20\x20types='+_0x1e565c['types']+'\x20\x20records='+_0x1e565c[_0x506909(0x4a2)]+'\x20\x20changes='+_0x1e565c[_0x506909(0x555)]);if(_0x3ec3bb[_0x506909(0x3b2)]){const _0x1a3295=_0x17c7c1[_0x506909(0x2b6)](_0x17c7c1[_0x506909(0x5e9)](_0x56f869),_0x506909(0x3b2));process[_0x506909(0x5c6)]['write'](_0x506909(0x6b5));const {count:_0x507f40,bytes:_0x3be1de}=await _0x573000[_0x506909(0x54b)][_0x506909(0x546)](_0x1a3295);console[_0x506909(0x547)](_0x506909(0x6f3)+_0x1a3295+_0x506909(0x7a5)+_0x507f40+_0x506909(0x456)+(_0x507f40!==0x1?'s':'')+',\x20'+(_0x3be1de/0x400/0x400)['toFixed'](0x2)+_0x506909(0x215));}await _0x573000[_0x506909(0x5e4)](),console[_0x506909(0x547)](_0x506909(0x24c));}async function _0x580f4a(_0x4127c9,_0x45658c,_0x36fa90){const _0x358646=_0x4756d7,_0x2dd63e=require$$5,_0x14d6b4=_0x17c7c1['resolve'](_0x45658c[_0x358646(0x3d8)]),_0x5cf7e6=_0x36fa90['env']??null,_0x569430=_0x36fa90[_0x358646(0x2bd)]?_0x36fa90['types']['split'](',')[_0x358646(0x2cc)](_0x3c2e18=>_0x3c2e18['trim']()):null,_0x1a1145=!!_0x36fa90['drop'];console[_0x358646(0x547)](_0x358646(0x629)+_0x14d6b4+'…');const _0x4f792a=new _0x2dd63e(_0x14d6b4,_0x4caf29(_0x45658c));await _0x4f792a[_0x358646(0x6ef)](),console[_0x358646(0x547)](_0x358646(0x52f)+_0x4127c9+'…');const _0x3d3142=await _0x4f792a[_0x358646(0x54b)][_0x358646(0x3aa)](_0x4127c9,{'envName':_0x5cf7e6,'types':_0x569430,'dropExisting':_0x1a1145,'includeChanges':!!_0x36fa90['changes'],'onProgress':({type:_0x4a59b5,count:_0x3782e3})=>{const _0x3e6df5=_0x358646;process['stdout'][_0x3e6df5(0x4f7)]('\x0d[okdb]\x20'+_0x4a59b5+':\x20'+_0x3782e3+_0x3e6df5(0x28b));}});process[_0x358646(0x5c6)][_0x358646(0x4f7)]('\x0a'),console[_0x358646(0x547)](_0x358646(0x68f)+_0x3d3142[_0x358646(0x2bd)]+_0x358646(0x6b0)+_0x3d3142[_0x358646(0x4a2)]+'\x20\x20changes='+_0x3d3142[_0x358646(0x555)]);if(_0x36fa90[_0x358646(0x3b2)]){const _0x35b99c=_0x17c7c1[_0x358646(0x2b6)](_0x17c7c1[_0x358646(0x5e9)](_0x4127c9),'blobs');if(_0x408499[_0x358646(0x2d5)](_0x35b99c)){const {imported:_0x3aa64a,skipped:_0x28d4d9}=await _0x4f792a[_0x358646(0x54b)][_0x358646(0x24e)](_0x35b99c);console['log']('[okdb]\x20blobs:\x20imported='+_0x3aa64a+_0x358646(0x4ce)+_0x28d4d9);}}await _0x4f792a[_0x358646(0x5e4)](),console['log']('[okdb]\x20import\x20complete');}async function _0x565d68(_0x25ea3d,_0x200a9f){const _0x1828d3=_0x4756d7;_0x200a9f[_0x1828d3(0x726)]&&!_0x200a9f[_0x1828d3(0x60a)]&&(console[_0x1828d3(0x3ba)](_0x1828d3(0x5a7)),process[_0x1828d3(0x592)](0x1));const _0x173f3a=_0x200a9f[_0x1828d3(0x48c)]?_0x200a9f[_0x1828d3(0x48c)]['split'](',')[_0x1828d3(0x2cc)](_0x7bac1=>_0x7bac1[_0x1828d3(0x29c)]())[_0x1828d3(0x3fb)](Boolean):[];let _0x153bca={};if(_0x200a9f[_0x1828d3(0x1bb)])try{_0x153bca=JSON[_0x1828d3(0x355)](_0x200a9f[_0x1828d3(0x1bb)]);if(typeof _0x153bca!=='object'||Array[_0x1828d3(0x729)](_0x153bca)||_0x153bca===null)throw new Error();}catch{console[_0x1828d3(0x3ba)](_0x1828d3(0x623)),process[_0x1828d3(0x592)](0x1);}const _0x58fde5=require$$5,{randomToken:_0x5a3d51,hashToken:_0x4d4cfd,hashPassword:_0x592d88}=requireOkdbAuthTokens(),_0x11547a=require$$2,_0x19f3d9=_0x17c7c1[_0x1828d3(0x25c)](_0x25ea3d[_0x1828d3(0x3d8)]),_0x2234c7=new _0x58fde5(_0x19f3d9,_0x4caf29(_0x25ea3d));await _0x2234c7[_0x1828d3(0x6ef)]();try{await _0x2234c7[_0x1828d3(0x717)]['_ensureTokensType']();if(_0x200a9f[_0x1828d3(0x60a)]){const _0x52556a=await _0x2234c7[_0x1828d3(0x717)][_0x1828d3(0x298)](_0x200a9f[_0x1828d3(0x60a)]);_0x52556a&&(console['error']('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x200a9f[_0x1828d3(0x60a)]+_0x1828d3(0x530)),process[_0x1828d3(0x592)](0x1));}const _0x3d629f=_0x5a3d51(0x20),_0x52e1d4=_0x4d4cfd(_0x3d629f),_0x5c4a8b=_0x200a9f[_0x1828d3(0x726)]?await _0x592d88(_0x200a9f[_0x1828d3(0x726)]):null,_0x305b8e=_0x11547a[_0x1828d3(0x20a)](),_0x343006={'tokenHash':_0x52e1d4,'name':_0x200a9f[_0x1828d3(0x60a)]||null,'passwordHash':_0x5c4a8b,'label':_0x200a9f[_0x1828d3(0x52b)]||null,'permissions':_0x173f3a,'grants':_0x153bca,'createdAt':Date['now'](),'lastUsedAt':null},_0x393537=_0x200a9f[_0x1828d3(0x676)]?{'ttl':Number(_0x200a9f[_0x1828d3(0x676)])}:undefined;await _0x2234c7[_0x1828d3(0x6cd)][_0x1828d3(0x4cd)](_0x1828d3(0x1be),_0x305b8e,_0x343006,_0x393537),console[_0x1828d3(0x547)]('\x0a\x20\x20\u2713\x20Token\x20created'),console[_0x1828d3(0x547)](_0x1828d3(0x251)+_0x305b8e),console[_0x1828d3(0x547)](_0x1828d3(0x5a3)+(_0x200a9f[_0x1828d3(0x60a)]||_0x1828d3(0x5ff))),console[_0x1828d3(0x547)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x200a9f[_0x1828d3(0x52b)]||_0x1828d3(0x5ff))),console[_0x1828d3(0x547)]('\x20\x20\x20\x20permissions:\x20'+(_0x173f3a['join'](',\x20')||_0x1828d3(0x2df))),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x1828d3(0x547)](_0x1828d3(0x1d1)+_0x3d629f+'\x0a');}finally{await _0x2234c7[_0x1828d3(0x5e4)]();}}async function _0x218981(_0x1b4a9c){const _0x234c49=_0x4756d7,_0x122c6f=require$$5,_0x1a2c4b=_0x17c7c1['resolve'](_0x1b4a9c[_0x234c49(0x3d8)]),_0x567af1=new _0x122c6f(_0x1a2c4b,_0x4caf29(_0x1b4a9c));await _0x567af1[_0x234c49(0x6ef)]();try{const _0x51825b=_0x567af1[_0x234c49(0x6cd)];if(!_0x51825b||!_0x51825b[_0x234c49(0x6b6)](_0x234c49(0x1be))){console[_0x234c49(0x547)]('No\x20tokens.');return;}const _0x1fd9b3=[];for(const {key:_0x339947,value:_0x3ef79d}of _0x51825b[_0x234c49(0x433)](_0x234c49(0x1be))){_0x1fd9b3[_0x234c49(0x494)]({'id':_0x339947,'name':_0x3ef79d[_0x234c49(0x60a)]||_0x234c49(0x5ff),'label':_0x3ef79d[_0x234c49(0x52b)]||_0x234c49(0x5ff),'permissions':Array[_0x234c49(0x729)](_0x3ef79d['permissions'])?_0x3ef79d['permissions']['join'](','):'','created':_0x3ef79d[_0x234c49(0x6e0)]?new Date(_0x3ef79d[_0x234c49(0x6e0)])[_0x234c49(0x219)]()[_0x234c49(0x7a7)](0x0,0xa):''});}if(_0x1fd9b3[_0x234c49(0x1b1)]===0x0){console[_0x234c49(0x547)](_0x234c49(0x23a));return;}const _0x5c332d=!process[_0x234c49(0x5c6)][_0x234c49(0x31d)]||process['stdout']['columns']>=0x64,_0xbfe3b=_0x5c332d?0x24:0xa,_0x32441d=['ID'[_0x234c49(0x48a)](_0xbfe3b),_0x234c49(0x5f9)['padEnd'](0x10),_0x234c49(0x6eb)[_0x234c49(0x48a)](0x14),_0x234c49(0x4c6)[_0x234c49(0x48a)](0x14),'CREATED'][_0x234c49(0x2b6)]('\x20\x20');console[_0x234c49(0x547)]('\x0a'+_0x32441d),console[_0x234c49(0x547)]('-'[_0x234c49(0x1f2)](_0x32441d[_0x234c49(0x1b1)]));for(const _0x50ac51 of _0x1fd9b3){const _0x4eb2ee=_0x5c332d?_0x50ac51['id']:_0x50ac51['id'][_0x234c49(0x7a7)](0x0,0x8)+'…';console['log']([_0x4eb2ee[_0x234c49(0x48a)](_0xbfe3b),_0x50ac51[_0x234c49(0x60a)][_0x234c49(0x7a7)](0x0,0x10)[_0x234c49(0x48a)](0x10),_0x50ac51[_0x234c49(0x52b)][_0x234c49(0x7a7)](0x0,0x14)['padEnd'](0x14),_0x50ac51[_0x234c49(0x48c)][_0x234c49(0x7a7)](0x0,0x14)[_0x234c49(0x48a)](0x14),_0x50ac51['created']][_0x234c49(0x2b6)]('\x20\x20'));}console['log']('');}finally{await _0x567af1[_0x234c49(0x5e4)]();}}async function _0x2392a9(_0x3373ba,_0x207c63){const _0x42968e=_0x4756d7;!_0x3373ba&&(console[_0x42968e(0x3ba)](_0x42968e(0x6cb)),process[_0x42968e(0x592)](0x1));const _0x186282=require$$5,_0x1ee6ba=_0x17c7c1[_0x42968e(0x25c)](_0x207c63['dbPath']),_0x4e77e4=new _0x186282(_0x1ee6ba,_0x4caf29(_0x207c63));await _0x4e77e4[_0x42968e(0x6ef)]();try{const _0x1d13bf=_0x4e77e4[_0x42968e(0x6cd)];(!_0x1d13bf||!_0x1d13bf[_0x42968e(0x6b6)](_0x42968e(0x1be)))&&(console[_0x42968e(0x3ba)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x3373ba+'\x22'),process[_0x42968e(0x592)](0x1));let _0x367b0d=null,_0x1f7434=null;const _0x1aabdf=_0x1d13bf[_0x42968e(0x5e0)](_0x42968e(0x1be),_0x3373ba);if(_0x1aabdf)_0x367b0d=_0x3373ba,_0x1f7434=_0x1aabdf;else{const _0x1f0900=[];for(const {key:_0x237b48,value:_0x56d8b1}of _0x1d13bf[_0x42968e(0x433)](_0x42968e(0x1be))){if(_0x237b48[_0x42968e(0x72d)](_0x3373ba))_0x1f0900['push']({'key':_0x237b48,'value':_0x56d8b1});}_0x1f0900[_0x42968e(0x1b1)]===0x0&&(console[_0x42968e(0x3ba)](_0x42968e(0x535)+_0x3373ba+'\x22'),process['exit'](0x1));if(_0x1f0900['length']>0x1){console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3373ba+_0x42968e(0x53d)+_0x1f0900[_0x42968e(0x1b1)]+'\x20tokens:');for(const _0x36870f of _0x1f0900){console['error']('\x20\x20'+_0x36870f[_0x42968e(0x5af)]+'\x20\x20(name:\x20'+(_0x36870f['value'][_0x42968e(0x60a)]||_0x42968e(0x5ff))+')');}process['exit'](0x1);}_0x367b0d=_0x1f0900[0x0][_0x42968e(0x5af)],_0x1f7434=_0x1f0900[0x0][_0x42968e(0x643)];}await _0x1d13bf[_0x42968e(0x43f)](_0x42968e(0x1be),_0x367b0d),console['log'](_0x42968e(0x3fa)+_0x367b0d+_0x42968e(0x7a1)+(_0x1f7434[_0x42968e(0x60a)]||_0x42968e(0x5ff))+_0x42968e(0x45a)+(_0x1f7434[_0x42968e(0x52b)]||_0x42968e(0x5ff))+')');}finally{await _0x4e77e4[_0x42968e(0x5e4)]();}}function _0x31c2a4(_0x26860a,_0x5533ed){const _0x82c3f7=_0x4756d7;if(!_0x26860a['activation'])return _0x82c3f7(0x3fe);const _0x40e651=_0x26860a['expiresAt'];if(!_0x40e651)return _0x82c3f7(0x30f);if(_0x5533ed>_0x40e651)return _0x82c3f7(0x2c6);return _0x82c3f7(0x30f);}function _0xf67d52(_0x399170){const _0x5d8d42=_0x4756d7;if(!_0x399170||typeof _0x399170!==_0x5d8d42(0x336))return'';const _0x2fdc95=Object[_0x5d8d42(0x352)](_0x399170)[_0x5d8d42(0x3fb)](([,_0x2a39a9])=>_0x2a39a9)['map'](([_0xeb3d74])=>_0xeb3d74);if(_0x2fdc95['length']===0x0)return'(none)';if(_0x2fdc95[_0x5d8d42(0x1b1)]<=0x3)return _0x2fdc95['join']('\x20');return _0x2fdc95['slice'](0x0,0x3)[_0x5d8d42(0x2b6)]('\x20')+('\x20+'+(_0x2fdc95[_0x5d8d42(0x1b1)]-0x3));}async function _0x4afb90(_0x25b970){const _0x120e9d=_0x4756d7,_0x11791d=require$$5,_0x264446=requireOkdbLicenseCodec(),{_C:_0x5aaa44}=requireOkdbLicense(),_0x443896=_0x17c7c1[_0x120e9d(0x25c)](_0x25b970[_0x120e9d(0x3d8)]),_0x38aa7d=new _0x11791d(_0x443896,_0x4caf29(_0x25b970));await _0x38aa7d[_0x120e9d(0x6ef)]();try{const _0x28fd59=_0x38aa7d['_systemEnv'],_0x19e5b5=_0x28fd59?.['db']?.[_0x120e9d(0x5e0)]?.(_0x120e9d(0x24d))??0x0,_0x1aa26f=[..._0x38aa7d[_0x120e9d(0x221)][_0x120e9d(0x35c)]()]['filter'](_0x21da5e=>!_0x21da5e['startsWith']('~'))[_0x120e9d(0x1b1)],_0x44fd47=_0x38aa7d[_0x120e9d(0x348)]?.[_0x120e9d(0x74b)];if(_0x44fd47){const _0x10f9ed=_0x44fd47[_0x120e9d(0x2ba)]===!![],_0x4031ff=_0x10f9ed?_0x120e9d(0x4c5):_0x38aa7d[_0x120e9d(0x348)][_0x120e9d(0x30f)]?.[_0x120e9d(0x5a8)]||'licensed';console[_0x120e9d(0x547)](''),console[_0x120e9d(0x547)](_0x120e9d(0x4fb)+_0x4031ff);const _0x3ef9c3=_0x44fd47[_0x120e9d(0x36a)]||{};if(_0x3ef9c3[_0x120e9d(0x1d8)]){const _0x12216e=Math[_0x120e9d(0x40d)](_0x19e5b5/_0x3ef9c3['maxWrites']*0x64);console[_0x120e9d(0x547)](_0x120e9d(0x6b3)+_0x19e5b5[_0x120e9d(0x34b)]()+'\x20/\x20'+_0x3ef9c3['maxWrites'][_0x120e9d(0x34b)]()+_0x120e9d(0x7a5)+_0x12216e+'%)');}else console[_0x120e9d(0x547)](_0x120e9d(0x6b3)+_0x19e5b5['toLocaleString']());_0x3ef9c3[_0x120e9d(0x71b)]?console[_0x120e9d(0x547)](_0x120e9d(0x797)+_0x1aa26f+_0x120e9d(0x596)+_0x3ef9c3[_0x120e9d(0x71b)]):console[_0x120e9d(0x547)](_0x120e9d(0x797)+_0x1aa26f),_0x5aaa44?.[_0x120e9d(0x4a0)]&&console['log'](_0x120e9d(0x6df)+_0x5aaa44[_0x120e9d(0x4a0)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x28fd59||!_0x28fd59[_0x120e9d(0x6b6)](_0x120e9d(0x259))){console['log'](''),console[_0x120e9d(0x547)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x120e9d(0x547)]('');return;}const _0x3eb3c2=[],_0x19a13c=Date['now'](),_0x240820=_0x38aa7d['id'],_0x49d4a6=_0x120e9d(0x79b);for(const {key:_0x21cd06,value:_0x5ab170}of _0x28fd59['getRange']('~licenses')){const _0x522b14=_0x5ab170[_0x120e9d(0x545)]?Buffer[_0x120e9d(0x716)](_0x5ab170[_0x120e9d(0x545)],_0x120e9d(0x723)):Buffer[_0x120e9d(0x360)](0x8);let _0x1d35a3='';try{_0x1d35a3=_0x264446[_0x120e9d(0x6c4)](_0x240820,_0x522b14,_0x49d4a6)['pin'];}catch{}_0x3eb3c2[_0x120e9d(0x494)]({'id':_0x21cd06,'licensee':_0x5ab170[_0x120e9d(0x5a8)]||'','expires':_0x5ab170[_0x120e9d(0x337)]?new Date(_0x5ab170[_0x120e9d(0x337)])[_0x120e9d(0x219)]()[_0x120e9d(0x7a7)](0x0,0xa):'','features':_0xf67d52(_0x5ab170[_0x120e9d(0x429)]),'pin':_0x1d35a3,'status':_0x31c2a4(_0x5ab170,_0x19a13c)});}if(_0x3eb3c2['length']===0x0){console[_0x120e9d(0x547)](''),console[_0x120e9d(0x547)](_0x120e9d(0x6c2)),console['log']('');return;}const _0xda598f=['\x20\x20'+'ID'[_0x120e9d(0x48a)](0xe),'LICENSEE'[_0x120e9d(0x48a)](0xe),_0x120e9d(0x613)[_0x120e9d(0x48a)](0xc),_0x120e9d(0x23f)[_0x120e9d(0x48a)](0x1e),_0x120e9d(0x741)['padEnd'](0xa),_0x120e9d(0x431)][_0x120e9d(0x2b6)]('\x20');console[_0x120e9d(0x547)]('\x0a'+_0xda598f);for(const _0xb898c2 of _0x3eb3c2){const _0xfa01d8=_0xb898c2['id'][_0x120e9d(0x7a7)](0x0,0x8)+'\u2026';console['log'](['\x20\x20'+_0xfa01d8[_0x120e9d(0x48a)](0xe),_0xb898c2['licensee']['slice'](0x0,0xe)[_0x120e9d(0x48a)](0xe),_0xb898c2[_0x120e9d(0x223)][_0x120e9d(0x48a)](0xc),_0xb898c2[_0x120e9d(0x429)][_0x120e9d(0x7a7)](0x0,0x1e)[_0x120e9d(0x48a)](0x1e),_0xb898c2[_0x120e9d(0x3fc)][_0x120e9d(0x48a)](0xa),_0xb898c2['status']]['join']('\x20'));}console[_0x120e9d(0x547)]('');}finally{await _0x38aa7d[_0x120e9d(0x5e4)]();}}async function _0x587af2(_0x51c5dd,_0x4f513){const _0x5bb99b=_0x4756d7,_0x23d135=require$$5,_0x23bfbc=requireOkdbLicenseCodec();let _0x58de05=_0x51c5dd;(_0x23bfbc[_0x5bb99b(0x709)](_0x51c5dd)==='path'||_0x408499[_0x5bb99b(0x2d5)](_0x51c5dd)&&_0x408499[_0x5bb99b(0x653)](_0x51c5dd)[_0x5bb99b(0x570)]())&&(_0x58de05=_0x408499[_0x5bb99b(0x6ba)](_0x51c5dd,_0x5bb99b(0x1f4))[_0x5bb99b(0x29c)]());const _0x15ceeb=_0x17c7c1[_0x5bb99b(0x25c)](_0x4f513[_0x5bb99b(0x3d8)]),_0x3d70eb=new _0x23d135(_0x15ceeb,_0x4caf29(_0x4f513));await _0x3d70eb[_0x5bb99b(0x6ef)]();try{let _0x4c6759;try{_0x4c6759=await _0x3d70eb[_0x5bb99b(0x58c)][_0x5bb99b(0x41a)]({'blob':_0x58de05});}catch(_0x3aa1bd){console[_0x5bb99b(0x3ba)](_0x5bb99b(0x2ad)+_0x3aa1bd['message']),process['exit'](0x1);}const _0x10ed2a=_0x4c6759['pin']||'',_0x1a7c8c=Object[_0x5bb99b(0x352)](_0x4c6759[_0x5bb99b(0x429)]||{})[_0x5bb99b(0x3fb)](([,_0x4dad10])=>_0x4dad10)[_0x5bb99b(0x2cc)](([_0xdeffe3])=>_0xdeffe3),_0x19129e=_0x4c6759[_0x5bb99b(0x36a)]||{},_0x1a8d45=[_0x19129e[_0x5bb99b(0x71b)]?'envs='+_0x19129e[_0x5bb99b(0x71b)]:null,_0x19129e[_0x5bb99b(0x761)]?_0x5bb99b(0x49a)+_0x19129e[_0x5bb99b(0x761)]:null,_0x19129e[_0x5bb99b(0x3b3)]?_0x5bb99b(0x4af)+_0x19129e[_0x5bb99b(0x3b3)]:null,_0x19129e['maxWrites']?_0x5bb99b(0x323)+_0x19129e[_0x5bb99b(0x1d8)]['toLocaleString']():null][_0x5bb99b(0x3fb)](Boolean)[_0x5bb99b(0x2b6)]('\x20\x20'),_0xe46018=_0x4c6759[_0x5bb99b(0x737)]!==_0x5bb99b(0x1f0);console[_0x5bb99b(0x547)](_0x4c6759[_0x5bb99b(0x350)]?_0x5bb99b(0x529):'\x0a\x20\x20\u2713\x20License\x20already\x20stored\x20(no\x20change)'),console[_0x5bb99b(0x547)](_0x5bb99b(0x64a)+_0x4c6759['id']),console[_0x5bb99b(0x547)](_0x5bb99b(0x6f8)+_0x4c6759[_0x5bb99b(0x5a8)]),console[_0x5bb99b(0x547)](_0x5bb99b(0x702)+(_0x4c6759[_0x5bb99b(0x337)]?new Date(_0x4c6759['expiresAt'])[_0x5bb99b(0x219)]()[_0x5bb99b(0x7a7)](0x0,0xa):_0x5bb99b(0x502))),console['log'](_0x5bb99b(0x49c)+(_0x1a7c8c['join'](',\x20')||_0x5bb99b(0x2df)));if(_0x1a8d45)console[_0x5bb99b(0x547)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x1a8d45);if(_0xe46018)console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x4c6759[_0x5bb99b(0x737)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x5bb99b(0x547)]('');else!_0x4c6759['needsActivation']?(console[_0x5bb99b(0x547)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x4c6759['status']),console[_0x5bb99b(0x547)]('')):(console[_0x5bb99b(0x547)](_0x5bb99b(0x1a3)+_0x10ed2a),console[_0x5bb99b(0x547)](_0x5bb99b(0x48b)),console['log'](''),console[_0x5bb99b(0x547)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x5bb99b(0x547)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x10ed2a+_0x5bb99b(0x3b4)),console[_0x5bb99b(0x547)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x5bb99b(0x547)](_0x5bb99b(0x667)),console['log'](''));}finally{await _0x3d70eb['close']();}}async function _0x2ff5ff(_0x3bfe01,_0x59e1ba){const _0x4c5b22=_0x4756d7,_0x1983e8=require$$5,_0x4ad32f=_0x17c7c1[_0x4c5b22(0x25c)](_0x59e1ba[_0x4c5b22(0x3d8)]),_0x574e7f=new _0x1983e8(_0x4ad32f,_0x4caf29(_0x59e1ba));await _0x574e7f[_0x4c5b22(0x6ef)]();try{let _0x5b6f94;try{_0x5b6f94=await _0x574e7f[_0x4c5b22(0x58c)][_0x4c5b22(0x59b)](_0x3bfe01);}catch(_0x20da66){console[_0x4c5b22(0x3ba)]('[okdb]\x20error:\x20'+_0x20da66[_0x4c5b22(0x246)]),console[_0x4c5b22(0x3ba)](''),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x765)),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x37d)),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x4cf)),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x20e)),console[_0x4c5b22(0x3ba)](''),process[_0x4c5b22(0x592)](0x1);}console[_0x4c5b22(0x547)](_0x4c5b22(0x6ac)),console['log'](_0x4c5b22(0x64a)+_0x5b6f94['id']),console[_0x4c5b22(0x547)](_0x4c5b22(0x6f8)+_0x5b6f94[_0x4c5b22(0x5a8)]),console['log'](_0x4c5b22(0x702)+(_0x5b6f94['expiresAt']?new Date(_0x5b6f94['expiresAt'])[_0x4c5b22(0x219)]()['slice'](0x0,0xa):_0x4c5b22(0x502))),console[_0x4c5b22(0x547)](_0x4c5b22(0x364)),console[_0x4c5b22(0x547)]('');}finally{await _0x574e7f['close']();}}async function _0x24b70b(_0x2a6bd6,_0x48659b){const _0x35b73e=_0x4756d7;!_0x2a6bd6&&(console[_0x35b73e(0x3ba)](_0x35b73e(0x270)),process[_0x35b73e(0x592)](0x1));const _0x54f36c=require$$5,_0xec4f86=requireOkdbLicenseCodec(),_0x19a5b6=_0x17c7c1[_0x35b73e(0x25c)](_0x48659b[_0x35b73e(0x3d8)]),_0x482548=new _0x54f36c(_0x19a5b6,_0x4caf29(_0x48659b));await _0x482548[_0x35b73e(0x6ef)]();try{const _0x3ee370=_0x482548[_0x35b73e(0x6cd)];(!_0x3ee370||!_0x3ee370[_0x35b73e(0x6b6)](_0x35b73e(0x259)))&&(console[_0x35b73e(0x3ba)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2a6bd6+'\x22'),process[_0x35b73e(0x592)](0x1));let _0x1722fc=null,_0x4ec0b0=null;const _0xede553=_0x3ee370[_0x35b73e(0x5e0)](_0x35b73e(0x259),_0x2a6bd6);if(_0xede553)_0x1722fc=_0x2a6bd6,_0x4ec0b0=_0xede553;else{const _0x502652=[];for(const {key:_0x244964,value:_0x8469aa}of _0x3ee370[_0x35b73e(0x433)](_0x35b73e(0x259))){if(_0x244964[_0x35b73e(0x72d)](_0x2a6bd6))_0x502652[_0x35b73e(0x494)]({'key':_0x244964,'value':_0x8469aa});}_0x502652[_0x35b73e(0x1b1)]===0x0&&(console[_0x35b73e(0x3ba)](_0x35b73e(0x38f)+_0x2a6bd6+'\x22'),process[_0x35b73e(0x592)](0x1)),_0x502652[_0x35b73e(0x1b1)]>0x1&&(console[_0x35b73e(0x3ba)](_0x35b73e(0x3c0)+_0x2a6bd6+_0x35b73e(0x53d)+_0x502652[_0x35b73e(0x1b1)]+_0x35b73e(0x776)),process[_0x35b73e(0x592)](0x1)),_0x1722fc=_0x502652[0x0][_0x35b73e(0x5af)],_0x4ec0b0=_0x502652[0x0][_0x35b73e(0x643)];}const _0x360ea7=Date['now'](),_0x4e07ea=_0x31c2a4(_0x4ec0b0,_0x360ea7),_0x5208dc=_0x482548['id'],_0x36c7ab='__OKDB_PUB_FINGERPRINT__';let _0x43d635='';try{const _0x461c06=Buffer[_0x35b73e(0x716)](_0x4ec0b0['_licenseHash'],_0x35b73e(0x723));_0x43d635=_0xec4f86[_0x35b73e(0x6c4)](_0x5208dc,_0x461c06,_0x36c7ab)[_0x35b73e(0x3fc)];}catch{}const _0x8d803f=_0x4ec0b0[_0x35b73e(0x429)]?Object[_0x35b73e(0x352)](_0x4ec0b0[_0x35b73e(0x429)])[_0x35b73e(0x3fb)](([,_0xb0bbaf])=>_0xb0bbaf)[_0x35b73e(0x2cc)](([_0x205a25])=>_0x205a25):[],_0x12f39d=_0x4ec0b0[_0x35b73e(0x36a)]||{},_0x2ee46a=_0x3ee370?.['db']?.['get']?.(_0x35b73e(0x24d))??0x0,_0x2fa1e4=[..._0x482548['_envs'][_0x35b73e(0x35c)]()][_0x35b73e(0x3fb)](_0x54dfca=>!_0x54dfca[_0x35b73e(0x72d)]('~'))[_0x35b73e(0x1b1)];console[_0x35b73e(0x547)]('\x0a\x20\x20License\x20details:'),console[_0x35b73e(0x547)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1722fc),console[_0x35b73e(0x547)](_0x35b73e(0x6f8)+(_0x4ec0b0[_0x35b73e(0x5a8)]||'')),console[_0x35b73e(0x547)](_0x35b73e(0x702)+(_0x4ec0b0[_0x35b73e(0x337)]?new Date(_0x4ec0b0['expiresAt'])['toISOString']()[_0x35b73e(0x7a7)](0x0,0xa):'')),console['log'](_0x35b73e(0x49c)+(_0x8d803f[_0x35b73e(0x2b6)](',\x20')||_0x35b73e(0x2df))),console[_0x35b73e(0x547)](_0x35b73e(0x1a3)+_0x43d635),console[_0x35b73e(0x547)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x4e07ea),console[_0x35b73e(0x547)](_0x35b73e(0x670)+new Date(_0x4ec0b0[_0x35b73e(0x6c9)])['toISOString']());if(_0x4e07ea===_0x35b73e(0x30f)){console[_0x35b73e(0x547)](''),console['log']('\x20\x20Usage:');if(_0x12f39d['maxWrites']){const _0x431b8e=Math[_0x35b73e(0x40d)](_0x2ee46a/_0x12f39d[_0x35b73e(0x1d8)]*0x64);console[_0x35b73e(0x547)](_0x35b73e(0x319)+_0x2ee46a[_0x35b73e(0x34b)]()+_0x35b73e(0x596)+_0x12f39d[_0x35b73e(0x1d8)][_0x35b73e(0x34b)]()+_0x35b73e(0x7a5)+_0x431b8e+'%)');}else console[_0x35b73e(0x547)](_0x35b73e(0x319)+_0x2ee46a[_0x35b73e(0x34b)]()+_0x35b73e(0x2f1));_0x12f39d[_0x35b73e(0x71b)]?console[_0x35b73e(0x547)](_0x35b73e(0x6fb)+_0x2fa1e4+'\x20/\x20'+_0x12f39d[_0x35b73e(0x71b)]):console[_0x35b73e(0x547)](_0x35b73e(0x6fb)+_0x2fa1e4+'\x20\x20(unlimited)');}console[_0x35b73e(0x547)]('');}finally{await _0x482548['close']();}}async function _0x18cc42(_0x504d1a,_0x4edfa5){const _0x417c71=_0x4756d7;!_0x504d1a&&(console['error'](_0x417c71(0x1d5)),process[_0x417c71(0x592)](0x1));const _0x54e16a=require$$5,_0x38b90f=_0x17c7c1[_0x417c71(0x25c)](_0x4edfa5[_0x417c71(0x3d8)]),_0x11883b=new _0x54e16a(_0x38b90f,_0x4caf29(_0x4edfa5));await _0x11883b[_0x417c71(0x6ef)]();try{const _0x5170bc=_0x11883b[_0x417c71(0x6cd)];(!_0x5170bc||!_0x5170bc[_0x417c71(0x6b6)](_0x417c71(0x259)))&&(console[_0x417c71(0x3ba)](_0x417c71(0x38f)+_0x504d1a+'\x22'),process[_0x417c71(0x592)](0x1));let _0x595101=null,_0x132633=null;const _0x211b47=_0x5170bc[_0x417c71(0x5e0)](_0x417c71(0x259),_0x504d1a);if(_0x211b47)_0x595101=_0x504d1a,_0x132633=_0x211b47;else{const _0x3efc09=[];for(const {key:_0x570004,value:_0x411dd7}of _0x5170bc[_0x417c71(0x433)]('~licenses')){if(_0x570004['startsWith'](_0x504d1a))_0x3efc09[_0x417c71(0x494)]({'key':_0x570004,'value':_0x411dd7});}_0x3efc09[_0x417c71(0x1b1)]===0x0&&(console[_0x417c71(0x3ba)](_0x417c71(0x38f)+_0x504d1a+'\x22'),process[_0x417c71(0x592)](0x1)),_0x3efc09[_0x417c71(0x1b1)]>0x1&&(console[_0x417c71(0x3ba)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x504d1a+_0x417c71(0x53d)+_0x3efc09[_0x417c71(0x1b1)]+'\x20licenses'),process[_0x417c71(0x592)](0x1)),_0x595101=_0x3efc09[0x0]['key'],_0x132633=_0x3efc09[0x0][_0x417c71(0x643)];}await _0x5170bc[_0x417c71(0x43f)]('~licenses',_0x595101),console[_0x417c71(0x547)](_0x417c71(0x387)+_0x595101+'\x20\x20(licensee:\x20'+(_0x132633[_0x417c71(0x5a8)]||'(unset)')+')');}finally{await _0x11883b[_0x417c71(0x5e4)]();}}async function _0x193c36(_0x48c212,_0x4c971a,_0x447c88){const _0x5c1e37=_0x4756d7;!_0x48c212&&(console[_0x5c1e37(0x3ba)](_0x5c1e37(0x699)),process[_0x5c1e37(0x592)](0x1));!_0x447c88[_0x5c1e37(0x21b)]&&!(_0x447c88[_0x5c1e37(0x6b2)]&&_0x447c88[_0x5c1e37(0x726)])&&(console['error'](_0x5c1e37(0x6a2)),process['exit'](0x1));const _0x39a3b8=_0x447c88[_0x5c1e37(0x206)]||_0x4c971a['sync']?.[_0x5c1e37(0x1ac)];!_0x39a3b8&&(console[_0x5c1e37(0x3ba)](_0x5c1e37(0x186)+_0x5c1e37(0x55a)+_0x5c1e37(0x5dd)),process[_0x5c1e37(0x592)](0x1));const _0x4da105=require$$5,_0x45025d=new _0x4da105(_0x4c971a['dbPath'],{'sync':{'address':_0x39a3b8,'auto_reconcile':![]}});await _0x45025d[_0x5c1e37(0x6ef)]();try{const _0xa2e79b=_0x45025d[_0x5c1e37(0x6cd)];if(_0xa2e79b&&_0xa2e79b[_0x5c1e37(0x6b6)](_0x5c1e37(0x1be))){let _0x5c679d=![];for(const _0x2dcf0e of _0xa2e79b['getRange'](_0x5c1e37(0x1be))){_0x5c679d=!![];break;}_0x5c679d&&console['log'](_0x5c1e37(0x749)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console['log'](_0x5c1e37(0x661)+_0x48c212+'…'),await _0x45025d[_0x5c1e37(0x45e)]['join'](_0x48c212[_0x5c1e37(0x1f7)](/\/+$/,''),{'token':_0x447c88['token'],'username':_0x447c88[_0x5c1e37(0x6b2)],'password':_0x447c88[_0x5c1e37(0x726)]}),console[_0x5c1e37(0x547)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x5c1e37(0x547)](_0x5c1e37(0x1e2));}finally{await _0x45025d['close']();}}async function _0x1bf842(){const _0x40b34b=_0x4756d7,_0x2cc0f6=Date['now'](),_0x40ee0b=_0x4473e3(process[_0x40b34b(0x5d0)]),_0x472ee6=_0x2f8070(_0x40ee0b),_0x86e40d=_0x17c7c1['resolve'](_0x472ee6[_0x40b34b(0x3d8)]);!_0x472ee6[_0x40b34b(0x515)]&&!process['stdin'][_0x40b34b(0x338)]&&(_0x472ee6[_0x40b34b(0x515)]=!![]);const _0x30d101=require$$5,{start:_0x2a1880,colorLog:_0x348116}=requireOkdbShell(),_0x2afded=require$$1$2,_0x1d7f8c={..._0x472ee6[_0x40b34b(0x5af)]?{'encryptionKey':_0x472ee6[_0x40b34b(0x5af)]}:{},..._0x472ee6[_0x40b34b(0x674)]?{'admin':![]}:_0x17f4e3(_0x472ee6[_0x40b34b(0x731)])?{'admin':_0x472ee6[_0x40b34b(0x731)]}:{},..._0x17f4e3(_0x472ee6['api'])?{'api':_0x472ee6['api']}:{},..._0x17f4e3(_0x472ee6[_0x40b34b(0x717)])?{'auth':_0x472ee6[_0x40b34b(0x717)]}:{},..._0x17f4e3(_0x472ee6[_0x40b34b(0x3b5)])?{'mcp':_0x472ee6['mcp']}:{},..._0x472ee6[_0x40b34b(0x556)]!==![]?{'timeMachine':_0x472ee6[_0x40b34b(0x556)]}:{},...Object['fromEntries'](_0x29f83b['filter'](_0xe82df7=>_0x472ee6[_0xe82df7]!==undefined)['map'](_0x4a1640=>[_0x4a1640,_0x472ee6[_0x4a1640]]))},_0x1911ec=_0x39ef6a(_0x472ee6);if(!_0x2afded[_0x40b34b(0x4cb)]){const _0x571d12=_0x1e86d6(),_0x1ea4ac=_0x472ee6[_0x40b34b(0x37c)]?_0x40b34b(0x26c):_0x472ee6['workersFlag']!=null&&_0x472ee6['workersFlag']!==''?_0x40b34b(0x2d1):process.env.OKDB_HTTP_WORKERS?_0x40b34b(0x768):_0x472ee6['http']?.[_0x40b34b(0x4d1)]!=null?_0x40b34b(0x2b7):_0x40b34b(0x459)+Math[_0x40b34b(0x46c)](0x1,require$$0[_0x40b34b(0x383)]()[_0x40b34b(0x1b1)]-0x1);process[_0x40b34b(0x5c6)]['write']('[okdb]\x20http\x20workers:\x20'+_0x1911ec+'\x20('+_0x1ea4ac+(!_0x571d12?_0x40b34b(0x673):'')+')\x0a');}if(_0x2afded['isWorker']){const _0x5d78bb={..._0x1d7f8c},_0x184247=new _0x30d101(_0x86e40d,_0x5d78bb);_0x184247[_0x40b34b(0x547)][_0x40b34b(0x57b)]?.();const _0x3bdd11=process.env.OKDB_CLUSTER_SLOT??'?',_0xb78719={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x153e06=_0xb78719[_0x472ee6[_0x40b34b(0x3a2)]]??_0xb78719[_0x40b34b(0x380)];_0x184247[_0x40b34b(0x547)]['attach'](_0x5d8398=>{const _0x12fcb8=_0x40b34b;if((_0xb78719[_0x5d8398[_0x12fcb8(0x407)]]??0x1)<_0x153e06)return;try{process[_0x12fcb8(0x61d)]?.({'__okdbCluster':_0x12fcb8(0x547),'slot':_0x3bdd11,'pid':process['pid'],'entry':_0x5d8398});}catch{}}),await _0x184247[_0x40b34b(0x6ef)]();const {attachWorkerCluster:_0x32e338}=requireOkdbCluster();_0x32e338(_0x184247),await _0x150920(_0x184247,_0x472ee6[_0x40b34b(0x3a7)],_0x9e9136(_0x472ee6));return;}if(_0x1911ec>0x1){const {runClustered:_0x15fa65}=requireOkdbCluster(),_0x3a7a31=new _0x30d101(_0x86e40d,{..._0x1d7f8c,'engines':![],'processors':![],'compaction':![]});await _0x3a7a31[_0x40b34b(0x6ef)]();const _0x1118cd=async()=>{const _0x3157ff=_0x40b34b,_0x474a37=new _0x30d101(_0x86e40d,{..._0x1d7f8c});return await _0x474a37[_0x3157ff(0x6ef)](),_0x474a37;},_0x476aec=Object['fromEntries'](_0x29f83b['map'](_0x160365=>[_0x160365,_0x1d7f8c[_0x160365]??!![]])),{formatListenAddr:_0x22c001}=requireOkdbHttp(),_0x470d03=_0x22c001(_0x472ee6[_0x40b34b(0x3a7)],_0x472ee6[_0x40b34b(0x277)]?.[_0x40b34b(0x2d6)]),_0x3eb08e=_0x15fa65({'workers':_0x1911ec,'makeOkdb':_0x1118cd,'port':_0x472ee6[_0x40b34b(0x3a7)],'primaryOkdb':_0x3a7a31,'workerRole':_0x476aec,'listenAddr':_0x470d03});let _0x5d5a42=![];async function _0x841ce6(_0x4da830){const _0x226361=_0x40b34b;_0x5d5a42&&(process[_0x226361(0x391)]['write'](_0x226361(0x63f)),process[_0x226361(0x592)](0x82));_0x5d5a42=!![],process[_0x226361(0x391)][_0x226361(0x4f7)](_0x226361(0x5f0)+(_0x4da830||_0x226361(0x4a4))+_0x226361(0x1ea));const _0x539980=setTimeout(()=>{const _0x305d7e=_0x226361;process[_0x305d7e(0x391)][_0x305d7e(0x4f7)](_0x305d7e(0x213)),process['exit'](0x0);},0xbb8);_0x539980[_0x226361(0x6d1)]?.();try{await _0x3eb08e[_0x226361(0x5e4)]();}catch(_0x522f16){process[_0x226361(0x391)]['write']('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x522f16?.[_0x226361(0x246)]??_0x522f16)+'\x0a');}try{await _0x3a7a31[_0x226361(0x5e4)]();}catch(_0x231f0b){process[_0x226361(0x391)][_0x226361(0x4f7)](_0x226361(0x5ca)+(_0x231f0b?.[_0x226361(0x246)]??_0x231f0b)+'\x0a');}process['exit'](0x0);}_0x472ee6[_0x40b34b(0x619)]=_0x1911ec;if(!_0x472ee6['noRepl']){_0x3a7a31[_0x40b34b(0x547)][_0x40b34b(0x57b)]?.(),_0x3300f1(_0x3a7a31[_0x40b34b(0x717)]?.[_0x40b34b(0x39d)]?.()??[]),await _0x2a1880(_0x3a7a31,_0x472ee6);return;}process[_0x40b34b(0x5c6)][_0x40b34b(0x4f7)]('[okdb]\x20cluster\x20primary\x20pid='+process['pid']+_0x40b34b(0x779)+_0x1911ec+'\x20'+(_0x40b34b(0x48e)+_0x472ee6[_0x40b34b(0x3a7)]+'\x0a')),console['log'](''),console[_0x40b34b(0x547)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x40b34b(0x547)](_0x40b34b(0x62e)+_0x472ee6['port']+'\x20\x20('+_0x1911ec+_0x40b34b(0x295)),console[_0x40b34b(0x547)](_0x40b34b(0x1af)+_0x86e40d),console[_0x40b34b(0x547)](_0x40b34b(0x288)+_0x3a7a31['id']),console[_0x40b34b(0x547)](_0x40b34b(0x572)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x6e5));!_0x472ee6[_0x40b34b(0x674)]&&console['log']('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x472ee6[_0x40b34b(0x3a7)]+'/admin/index.html');console[_0x40b34b(0x547)](''),_0x3300f1(_0x3a7a31['auth']?.[_0x40b34b(0x39d)]?.()??[]),process['on'](_0x40b34b(0x66a),()=>_0x841ce6('SIGINT')),process['on']('SIGTERM',()=>_0x841ce6(_0x40b34b(0x2bc))),process['on'](_0x40b34b(0x44c),()=>_0x841ce6(_0x40b34b(0x44c)));return;}const _0x249077=new _0x30d101(_0x86e40d,_0x1d7f8c);_0x249077[_0x40b34b(0x547)][_0x40b34b(0x57b)]?.();const _0x18ac6f=_0x249077[_0x40b34b(0x547)]['attach'](_0x1d2e54=>_0x348116(_0x1d2e54,_0x472ee6[_0x40b34b(0x3a2)]));if(_0x472ee6[_0x40b34b(0x515)])process['stdout'][_0x40b34b(0x4f7)](_0x40b34b(0x3c3));await _0x249077['open']();if(_0x472ee6[_0x40b34b(0x515)])process[_0x40b34b(0x5c6)][_0x40b34b(0x4f7)](_0x40b34b(0x4d6));try{await _0x150920(_0x249077,_0x472ee6[_0x40b34b(0x3a7)],_0x9e9136(_0x472ee6));}catch(_0x542e5b){_0x542e5b[_0x40b34b(0x5cc)]===_0x40b34b(0x196)&&(console['error'](_0x40b34b(0x742)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x63e)),process[_0x40b34b(0x592)](0x1));throw _0x542e5b;}if(_0x472ee6[_0x40b34b(0x515)]){const _0x35bbf1=_0x472ee6[_0x40b34b(0x277)]?.[_0x40b34b(0x2d6)]!==undefined?[][_0x40b34b(0x33f)](_0x472ee6[_0x40b34b(0x277)]['host'])[_0x40b34b(0x2b6)](',\x20')+'\x20':'';process[_0x40b34b(0x5c6)][_0x40b34b(0x4f7)](_0x40b34b(0x6f4)+_0x35bbf1+':'+_0x472ee6[_0x40b34b(0x3a7)]+'\x0a');}if(!_0x472ee6['noRepl'])_0x249077['log']['detachConsole']?.(),_0x18ac6f?.(),_0x3300f1(_0x249077[_0x40b34b(0x717)]?.[_0x40b34b(0x39d)]?.()??[]),await _0x2a1880(_0x249077,_0x472ee6);else{const _0x4ec72d=_0x17c7c1[_0x40b34b(0x2b6)](_0x86e40d,'okdb.pid');try{_0x408499[_0x40b34b(0x639)](_0x4ec72d,String(process[_0x40b34b(0x690)]));}catch{}const _0x842d41=Date['now']()-_0x2cc0f6;console[_0x40b34b(0x547)](''),console['log'](_0x40b34b(0x5aa)),console['log']('\x20\x20\x20\x20port:\x20\x20'+_0x472ee6[_0x40b34b(0x3a7)]),console['log'](_0x40b34b(0x3dc)+_0x86e40d),console[_0x40b34b(0x547)](_0x40b34b(0x44b)+_0x249077['id']);{const _0xa5e384=_0x249077[_0x40b34b(0x6cd)]?.['db']?.['get']?.(_0x40b34b(0x24d))??0x0,_0x15e834=[..._0x249077[_0x40b34b(0x221)][_0x40b34b(0x35c)]()][_0x40b34b(0x3fb)](_0x1446cb=>!_0x1446cb[_0x40b34b(0x72d)]('~'))['length'];if(_0x249077['_license']?.[_0x40b34b(0x30f)]?.['licenseType']===0x1){const _0x541866=Math[_0x40b34b(0x392)]((_0x249077[_0x40b34b(0x348)]['active'][_0x40b34b(0x337)]-Date[_0x40b34b(0x6a7)]())/0x5265c00);console['log'](_0x40b34b(0x1db)+_0x249077[_0x40b34b(0x348)][_0x40b34b(0x30f)][_0x40b34b(0x5a8)]+_0x40b34b(0x6e2)+_0x541866+_0x40b34b(0x1e7));}else{if(_0x249077[_0x40b34b(0x348)]?.[_0x40b34b(0x30f)]){const _0x48a11c=_0x249077[_0x40b34b(0x348)][_0x40b34b(0x30f)];console[_0x40b34b(0x547)](_0x40b34b(0x3bb)+_0x48a11c[_0x40b34b(0x5a8)]+_0x40b34b(0x466)+new Date(_0x48a11c[_0x40b34b(0x337)])['toISOString']()['slice'](0x0,0xa)+')');const _0xff6c7c=_0x48a11c[_0x40b34b(0x36a)]||{};if(_0xff6c7c[_0x40b34b(0x1d8)]){const _0x3ed02e=Math[_0x40b34b(0x40d)](_0xa5e384/_0xff6c7c[_0x40b34b(0x1d8)]*0x64);console[_0x40b34b(0x547)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xa5e384[_0x40b34b(0x34b)]()+_0x40b34b(0x596)+_0xff6c7c[_0x40b34b(0x1d8)][_0x40b34b(0x34b)]()+_0x40b34b(0x477)+_0x3ed02e+_0x40b34b(0x49e)+_0x15e834+(_0xff6c7c[_0x40b34b(0x71b)]?'/'+_0xff6c7c[_0x40b34b(0x71b)]:'')+_0x40b34b(0x30c)+(_0x15e834===0x1?'':'s'));}}else{if(_0x249077['_license']){const _0x9a3e2=_0x249077[_0x40b34b(0x348)]['getPins'](),_0x190f78=_0x9a3e2[_0x40b34b(0x1b1)]?_0x9a3e2[_0x40b34b(0x2cc)](_0x27a14a=>_0x27a14a[_0x40b34b(0x3fc)])[_0x40b34b(0x2b6)](',\x20'):'(add\x20a\x20license\x20first)',_0x450ec1=_0x249077[_0x40b34b(0x348)][_0x40b34b(0x74b)],_0x2c2646=_0x450ec1['limits'][_0x40b34b(0x1d8)]?Math[_0x40b34b(0x40d)](_0xa5e384/_0x450ec1['limits'][_0x40b34b(0x1d8)]*0x64):0x0;console[_0x40b34b(0x547)](_0x40b34b(0x2f2)),console[_0x40b34b(0x547)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xa5e384[_0x40b34b(0x34b)]()+'\x20/\x20'+_0x450ec1[_0x40b34b(0x36a)][_0x40b34b(0x1d8)][_0x40b34b(0x34b)]()+'\x20writes\x20('+_0x2c2646+_0x40b34b(0x49e)+_0x15e834+'\x20/\x20'+_0x450ec1[_0x40b34b(0x36a)]['envs']+'\x20envs'),console['log'](_0x40b34b(0x24a)+_0x190f78);}}}}console[_0x40b34b(0x547)](_0x40b34b(0x539)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x6e5));!_0x472ee6[_0x40b34b(0x674)]&&console[_0x40b34b(0x547)](_0x40b34b(0x31b)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x4b6));console[_0x40b34b(0x547)](''),console['log'](_0x40b34b(0x23c)+_0x842d41+'ms'),_0x3300f1(_0x249077[_0x40b34b(0x717)]?.[_0x40b34b(0x39d)]?.()??[]);let _0x4e4687=![];async function _0x517b10(_0x5facc5){const _0x55e315=_0x40b34b;_0x4e4687&&(process[_0x55e315(0x391)][_0x55e315(0x4f7)](_0x55e315(0x63f)),process[_0x55e315(0x592)](0x82));_0x4e4687=!![],process[_0x55e315(0x391)]['write']('\x0a[okdb]\x20received\x20'+(_0x5facc5||_0x55e315(0x4a4))+_0x55e315(0x69c));const _0xf9c775=setTimeout(()=>{const _0x131baa=_0x55e315;process[_0x131baa(0x391)][_0x131baa(0x4f7)](_0x131baa(0x713)),process['exit'](0x1);},0x1388);try{_0x408499[_0x55e315(0x632)](_0x4ec72d);}catch{}try{await _0x249077[_0x55e315(0x5e4)]();}catch(_0x434b12){process[_0x55e315(0x391)][_0x55e315(0x4f7)]('[okdb]\x20close\x20error:\x20'+(_0x434b12?.[_0x55e315(0x246)]??_0x434b12)+'\x0a');}clearTimeout(_0xf9c775),process[_0x55e315(0x391)][_0x55e315(0x4f7)](_0x55e315(0x2aa)),process[_0x55e315(0x592)](0x0);}process['on'](_0x40b34b(0x66a),()=>_0x517b10(_0x40b34b(0x66a))),process['on'](_0x40b34b(0x2bc),()=>_0x517b10(_0x40b34b(0x2bc))),process['on'](_0x40b34b(0x44c),()=>_0x517b10(_0x40b34b(0x44c)));}}const _0x29083d=new Set([_0x4756d7(0x214),_0x4756d7(0x3c4),'init',_0x4756d7(0x4ee),'export','import','reset',_0x4756d7(0x21b),_0x4756d7(0x2b6),'license']),_0x5b4494=process[_0x4756d7(0x5d0)][0x2];if(_0x5b4494===_0x4756d7(0x214))console[_0x4756d7(0x547)](require$$3[_0x4756d7(0x214)]),process[_0x4756d7(0x592)](0x0);else{if(_0x5b4494&&_0x29083d['has'](_0x5b4494)){const _0x4f25aa=process['argv'][_0x4756d7(0x7a7)](0x3),_0x1adcac=_0x4473e3([_0x4756d7(0x4b5),_0x4756d7(0x3ea),..._0x4f25aa]),_0x49c8e3=_0x2f8070(_0x1adcac),_0xea9ff1=new Set([_0x4756d7(0x354),'-d',_0x4756d7(0x721),'-k',_0x4756d7(0x46f),'-c','--port','-p',_0x4756d7(0x328),_0x4756d7(0x657),'-e',_0x4756d7(0x2b8),'--name',_0x4756d7(0x562),_0x4756d7(0x498),_0x4756d7(0x351),'--grants',_0x4756d7(0x437),_0x4756d7(0x36c),_0x4756d7(0x2cb),'-u',_0x4756d7(0x243)]);let _0x269b1a=null;for(let _0xfa014f=0x0;_0xfa014f<_0x4f25aa[_0x4756d7(0x1b1)];_0xfa014f++){if(_0xea9ff1['has'](_0x4f25aa[_0xfa014f])){_0xfa014f++;continue;}if(!_0x4f25aa[_0xfa014f]['startsWith']('-')){_0x269b1a=_0x4f25aa[_0xfa014f];break;}}(async()=>{const _0x594c8a=_0x4756d7;if(_0x5b4494===_0x594c8a(0x21b)){const _0x325252=process['argv'][0x3],_0x3a242c=process[_0x594c8a(0x5d0)][_0x594c8a(0x7a7)](0x4),_0x59f582=_0x4473e3([_0x594c8a(0x4b5),_0x594c8a(0x3ea),..._0x3a242c]),_0x102e87=_0x2f8070(_0x59f582),_0x2964e9=new Set(['--path','-d','--key','-k',_0x594c8a(0x46f),'-c','--port','-p',_0x594c8a(0x5a5),_0x594c8a(0x562),_0x594c8a(0x498),_0x594c8a(0x351),_0x594c8a(0x612),_0x594c8a(0x437),_0x594c8a(0x328),'--env','-e',_0x594c8a(0x2b8)]),_0x388377=[];for(let _0x20eede=0x0;_0x20eede<_0x3a242c[_0x594c8a(0x1b1)];_0x20eede++){if(_0x2964e9['has'](_0x3a242c[_0x20eede])){_0x20eede++;continue;}if(_0x3a242c[_0x20eede][_0x594c8a(0x72d)]('-'))continue;_0x388377[_0x594c8a(0x494)](_0x3a242c[_0x20eede]);}switch(_0x325252){case _0x594c8a(0x711):await _0x565d68(_0x102e87,_0x59f582);break;case _0x594c8a(0x772):await _0x218981(_0x102e87);break;case _0x594c8a(0x548):await _0x2392a9(_0x388377[0x0],_0x102e87);break;default:console['error'](_0x594c8a(0x3ed)+_0x325252+_0x594c8a(0x1e9)),process[_0x594c8a(0x592)](0x1);}return;}if(_0x5b4494===_0x594c8a(0x707)){const _0x1dba04=requireOkdbLicenseCodec(),_0x1a137b=process['argv'][_0x594c8a(0x7a7)](0x3),_0x321730=_0x4473e3([_0x594c8a(0x4b5),_0x594c8a(0x3ea),..._0x1a137b]),_0x349650=_0x2f8070(_0x321730),_0x215d27=new Set([_0x594c8a(0x354),'-d',_0x594c8a(0x721),'-k',_0x594c8a(0x46f),'-c',_0x594c8a(0x728),'-p','--log-level']),_0x1e3dfc=[];for(let _0x2ae298=0x0;_0x2ae298<_0x1a137b[_0x594c8a(0x1b1)];_0x2ae298++){if(_0x215d27[_0x594c8a(0x4e7)](_0x1a137b[_0x2ae298])){_0x2ae298++;continue;}if(_0x1a137b[_0x2ae298][_0x594c8a(0x72d)]('-'))continue;_0x1e3dfc['push'](_0x1a137b[_0x2ae298]);}const _0x282710=_0x1e3dfc[0x0]??null;if(_0x282710===_0x594c8a(0x43f))await _0x18cc42(_0x1e3dfc[0x1],_0x349650);else{if(!_0x282710)await _0x4afb90(_0x349650);else{let _0x42151d=_0x1dba04[_0x594c8a(0x709)](_0x282710);if(_0x42151d==='unknown'&&_0x408499['existsSync'](_0x282710))_0x42151d=_0x594c8a(0x504);if(_0x42151d==='path')try{const _0xde2541=_0x408499[_0x594c8a(0x6ba)](_0x282710,_0x594c8a(0x1f4))[_0x594c8a(0x29c)](),_0x34f461=_0x1dba04[_0x594c8a(0x709)](_0xde2541);if(_0x34f461===_0x594c8a(0x50b)){await _0x2ff5ff(_0xde2541,_0x349650);return;}await _0x587af2(_0x282710,_0x349650);return;}catch(_0x338e24){console[_0x594c8a(0x3ba)](_0x594c8a(0x2ef)+_0x282710+':\x20'+_0x338e24['message']),process[_0x594c8a(0x592)](0x1);}switch(_0x42151d){case _0x594c8a(0x5e2):await _0x587af2(_0x282710,_0x349650);break;case _0x594c8a(0x50b):await _0x2ff5ff(_0x282710,_0x349650);break;case _0x594c8a(0x376):await _0x24b70b(_0x282710,_0x349650);break;default:console[_0x594c8a(0x3ba)](_0x594c8a(0x6fa)+_0x282710+'\x22'),console['error'](''),console[_0x594c8a(0x3ba)](_0x594c8a(0x62a)),console[_0x594c8a(0x3ba)](_0x594c8a(0x4b1)),console['error'](_0x594c8a(0x244)),console[_0x594c8a(0x3ba)](_0x594c8a(0x64b)),console[_0x594c8a(0x3ba)](_0x594c8a(0x46e)),console['error'](''),console[_0x594c8a(0x3ba)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x594c8a(0x592)](0x1);}}}return;}switch(_0x5b4494){case _0x594c8a(0x3c4):await _0x19d876(_0x49c8e3);break;case _0x594c8a(0x59a):await _0x1cb293();break;case'reset':await _0x4dc58d(_0x49c8e3);break;case _0x594c8a(0x4ee):await _0x40df23(_0x269b1a??_0x17c7c1['resolve'](_0x594c8a(0x367)),_0x49c8e3);break;case _0x594c8a(0x62f):await _0x408e93(_0x269b1a??_0x17c7c1[_0x594c8a(0x25c)]('./okdb-export.ndjson'),_0x49c8e3,_0x1adcac);break;case _0x594c8a(0x3b0):await _0x580f4a(_0x269b1a??_0x17c7c1[_0x594c8a(0x25c)](_0x594c8a(0x23d)),_0x49c8e3,_0x1adcac);break;case _0x594c8a(0x2b6):await _0x193c36(_0x269b1a,_0x49c8e3,_0x1adcac);break;}})()['then'](()=>process[_0x4756d7(0x592)](0x0))[_0x4756d7(0x58b)](_0x100a87=>{const _0x3abb09=_0x4756d7;console[_0x3abb09(0x3ba)](_0x3abb09(0x384)+(_0x100a87[_0x3abb09(0x246)]||_0x100a87)+'\x0a'),process[_0x3abb09(0x592)](0x1);});}else _0x1bf842()[_0x4756d7(0x58b)](_0xeaccbf=>{const _0x401a6a=_0x4756d7;console[_0x401a6a(0x3ba)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x401a6a(0x3ba)](_0xeaccbf[_0x401a6a(0x2ae)]||_0xeaccbf),process[_0x401a6a(0x592)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x5411c3(0x577)]=okdb;