@kedem/okdb 2.0.4 → 2.1.0
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/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/index.md +1 -0
- package/docs/manifest.json +2 -1
- package/docs/upgrade-2.1.md +74 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/sections/db/parts/db-overview.ok.js +1 -1
- package/public/sections/system/index.ok.html +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';function _0x1ef7(_0x4ea415,_0x79aa46){_0x4ea415=_0x4ea415-0x157;const _0x5e80da=_0x5e80();let _0x1ef7a9=_0x5e80da[_0x4ea415];return _0x1ef7a9;}const _0x18fcc0=_0x1ef7;(function(_0x100bf4,_0x1c9524){const _0x16e879=_0x1ef7,_0x2d4fed=_0x100bf4();while(!![]){try{const _0x332eb2=parseInt(_0x16e879(0x5f7))/0x1*(-parseInt(_0x16e879(0x462))/0x2)+-parseInt(_0x16e879(0x307))/0x3+parseInt(_0x16e879(0x49b))/0x4*(parseInt(_0x16e879(0x5ae))/0x5)+parseInt(_0x16e879(0x53f))/0x6*(-parseInt(_0x16e879(0x23c))/0x7)+parseInt(_0x16e879(0x30a))/0x8+-parseInt(_0x16e879(0x5c1))/0x9*(parseInt(_0x16e879(0x1f9))/0xa)+parseInt(_0x16e879(0x35e))/0xb*(parseInt(_0x16e879(0x39e))/0xc);if(_0x332eb2===_0x1c9524)break;else _0x2d4fed['push'](_0x2d4fed['shift']());}catch(_0x36d7e2){_0x2d4fed['push'](_0x2d4fed['shift']());}}}(_0x5e80,0xdcb8a));var require$$1=require(_0x18fcc0(0x15d)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x18fcc0(0x2e1)),require$$5=require('../okdb'),require$$0$3=require(_0x18fcc0(0x420)),require$$0$1=require(_0x18fcc0(0x2e3)),require$$0$2=require(_0x18fcc0(0x1ca)),require$$4=require('child_process'),require$$1$2=require(_0x18fcc0(0x5a3)),require$$0$4=require('node:perf_hooks'),require$$0$5=require('perf_hooks'),require$$0$6=require(_0x18fcc0(0x35b));function getDefaultExportFromCjs(_0x37d28c){const _0x342dc4=_0x18fcc0;return _0x37d28c&&_0x37d28c['__esModule']&&Object[_0x342dc4(0x5f4)]['hasOwnProperty']['call'](_0x37d28c,_0x342dc4(0x38d))?_0x37d28c[_0x342dc4(0x38d)]:_0x37d28c;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x167f49=require$$0,_0x39f02c=require$$1$1,_0x1e426e=require$$1;let _0x4189bd;function _0x56570a(){const _0x13d5a2=_0x1ef7;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x4189bd!==undefined)return _0x4189bd;try{const _0xdbb845=_0x1e426e[_0x13d5a2(0x3d9)](require[_0x13d5a2(0x58d)](_0x13d5a2(0x390)));_0x4189bd=_0x39f02c['existsSync'](_0x1e426e[_0x13d5a2(0x25d)](_0xdbb845,'build','Release','shmbuf.node'));}catch{_0x4189bd=![];}return _0x4189bd;}function _0x3df1f7(){const _0x261a61=_0x1ef7,_0x39999b=_0x167f49[_0x261a61(0x4da)]()[_0x261a61(0x26d)];return Math[_0x261a61(0x5e4)](0x1,_0x39999b-0x1);}function _0xd903c0(_0x386845,_0x55df80={}){const _0x2fd8ba=_0x1ef7,_0x42216b=_0x55df80[_0x2fd8ba(0x361)]!==undefined?_0x55df80[_0x2fd8ba(0x361)]:_0x56570a();let _0x4933c0;if(_0x386845?.['noCluster'])_0x4933c0=0x1;else{let _0x55830f,_0x55a1ba;if(_0x386845?.[_0x2fd8ba(0x496)]!==undefined&&_0x386845[_0x2fd8ba(0x496)]!==null&&_0x386845[_0x2fd8ba(0x496)]!=='')_0x55830f=_0x386845[_0x2fd8ba(0x496)],_0x55a1ba=_0x2fd8ba(0x1d8);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x55830f=process.env.OKDB_HTTP_WORKERS,_0x55a1ba='OKDB_HTTP_WORKERS';else _0x386845?.['http']?.[_0x2fd8ba(0x34e)]!==undefined&&_0x386845['http'][_0x2fd8ba(0x34e)]!==null&&_0x386845[_0x2fd8ba(0x309)][_0x2fd8ba(0x34e)]!==''&&(_0x55830f=_0x386845['http'][_0x2fd8ba(0x34e)],_0x55a1ba=_0x2fd8ba(0x2a6));}if(_0x55830f===undefined)_0x4933c0=_0x3df1f7();else{const _0x1b561b=Number(_0x55830f);!Number[_0x2fd8ba(0x397)](_0x1b561b)||_0x1b561b<0x1?(console[_0x2fd8ba(0x1da)]('[okdb]\x20invalid\x20'+_0x55a1ba+'='+JSON[_0x2fd8ba(0x536)](_0x55830f)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x4933c0=0x1):_0x4933c0=_0x1b561b;}}return!_0x42216b&&_0x4933c0>0x1&&(console[_0x2fd8ba(0x1da)](_0x2fd8ba(0x34d)+(_0x2fd8ba(0x4be)+_0x4933c0+').')),_0x4933c0=0x1),_0x4933c0;}return okdbWorkers={'isShmbufNative':_0x56570a,'defaultWorkers':_0x3df1f7,'resolveWorkers':_0xd903c0},okdbWorkers;}var version=_0x18fcc0(0x518),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x1750bc=require$$0$1;function _0x50fb9b(_0x5cce03,_0x5ca39a){const _0x398cad=_0x1ef7;return _0x1750bc[_0x398cad(0x501)](_0x398cad(0x596),_0x5ca39a)['update'](_0x5cce03)['digest'](_0x398cad(0x3cc));}function _0x46d80f(_0x60c562,_0x3b0a98){const _0x59d73a=_0x1ef7;if(typeof _0x60c562!==_0x59d73a(0x61d)||typeof _0x3b0a98!==_0x59d73a(0x61d))return![];if(Buffer['byteLength'](_0x60c562)!==Buffer[_0x59d73a(0x436)](_0x3b0a98))return![];return _0x1750bc[_0x59d73a(0x486)](Buffer[_0x59d73a(0x3e6)](_0x60c562),Buffer[_0x59d73a(0x3e6)](_0x3b0a98));}function _0x1edc4d(_0x286177){const _0x4ba0c0=_0x1ef7;if(!_0x286177?.[_0x4ba0c0(0x2e2)](_0x4ba0c0(0x356)))return null;return _0x286177[_0x4ba0c0(0x195)](0x7);}function _0x4e94cd(_0x325636=0x20){const _0x55dd66=_0x1ef7;return _0x1750bc[_0x55dd66(0x404)](_0x325636)['toString']('base64url');}function _0xc149e(_0x50521e){const _0x57672c=_0x1ef7;return _0x1750bc['createHash'](_0x57672c(0x596))[_0x57672c(0x2de)](_0x50521e)['digest']('hex');}function _0x1a282c(_0x3cc1e9,_0x44133d,_0x577965=0x36ee80){const _0x27a69f=_0x1ef7;if(!_0x44133d)throw new Error('Token\x20secret\x20not\x20configured');const _0x2e77f3=Date['now'](),_0x35b11e=Buffer[_0x27a69f(0x3e6)](JSON['stringify']({'iat':_0x2e77f3,'exp':_0x2e77f3+_0x577965,'sub':_0x3cc1e9?.['id']??_0x3cc1e9?.[_0x27a69f(0x415)]??null,'username':_0x3cc1e9?.[_0x27a69f(0x3e2)]??_0x3cc1e9?.[_0x27a69f(0x60c)]??null,'roles':Array[_0x27a69f(0x60f)](_0x3cc1e9?.[_0x27a69f(0x1e6)])?_0x3cc1e9['roles']:[]}))[_0x27a69f(0x2aa)](_0x27a69f(0x3cc)),_0x104e80=_0x50fb9b(_0x35b11e,_0x44133d);return _0x35b11e+'.'+_0x104e80;}function _0x35d347(_0x517203,_0x5ee432){const _0x2c0695=_0x1ef7;if(!_0x5ee432||typeof _0x517203!=='string')return null;const [_0xa35454,_0x3ee80a]=_0x517203[_0x2c0695(0x56e)]('.');if(!_0xa35454||!_0x3ee80a)return null;const _0x2cee3b=_0x50fb9b(_0xa35454,_0x5ee432);if(!_0x46d80f(_0x3ee80a,_0x2cee3b))return null;try{const _0x59a6a6=JSON['parse'](Buffer['from'](_0xa35454,_0x2c0695(0x3cc))[_0x2c0695(0x2aa)]()),_0xa014b8=0x7530;if(Date[_0x2c0695(0x464)]()>Number(_0x59a6a6?.[_0x2c0695(0x3a5)]??0x0)+_0xa014b8)return null;return _0x59a6a6;}catch{return null;}}async function _0x4e9be2(_0x2a0728){return new Promise((_0x4b62a8,_0x2e1301)=>{const _0x7946d5=_0x1ef7,_0x14619a=_0x1750bc['randomBytes'](0x10);_0x1750bc[_0x7946d5(0x318)](_0x2a0728,_0x14619a,0x40,(_0xac829a,_0x3ca117)=>{const _0x30394d=_0x7946d5;if(_0xac829a)_0x2e1301(_0xac829a);_0x4b62a8(_0x14619a['toString']('hex')+':'+_0x3ca117[_0x30394d(0x2aa)](_0x30394d(0x4eb)));});});}async function _0x3f9436(_0x375628,_0x18d801){const _0x46e0e3=_0x1ef7,[_0x246494,_0x8e2721]=_0x18d801[_0x46e0e3(0x56e)](':');if(!_0x246494||!_0x8e2721)return![];const _0x2ebf24=Buffer['from'](_0x246494,_0x46e0e3(0x4eb));return new Promise((_0x2fe993,_0x514a1b)=>{const _0x1dc875=_0x46e0e3;_0x1750bc[_0x1dc875(0x318)](_0x375628,_0x2ebf24,0x40,(_0x7e6a6b,_0x22df97)=>{const _0x1ec945=_0x1dc875;if(_0x7e6a6b)_0x514a1b(_0x7e6a6b);_0x2fe993(_0x1750bc[_0x1ec945(0x486)](_0x22df97,Buffer[_0x1ec945(0x3e6)](_0x8e2721,_0x1ec945(0x4eb))));});});}return okdbAuthTokens={'hmac':_0x50fb9b,'timingSafeEqual':_0x46d80f,'parseBearer':_0x1edc4d,'randomToken':_0x4e94cd,'hashToken':_0xc149e,'issueToken':_0x1a282c,'authenticateToken':_0x35d347,'hashPassword':_0x4e9be2,'verifyPassword':_0x3f9436},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x39a576=_0x18fcc0;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2f59ca=require$$0$2,_0x48dd1c=_0x39a576(0x409),_0x10b103=new Uint8Array(0x100)[_0x39a576(0x352)](0xff);for(let _0x37cc2d=0x0;_0x37cc2d<_0x48dd1c[_0x39a576(0x26d)];_0x37cc2d++){_0x10b103[_0x48dd1c[_0x39a576(0x50c)](_0x37cc2d)]=_0x37cc2d,_0x10b103[_0x48dd1c[_0x39a576(0x50c)](_0x37cc2d)+0x20]=_0x37cc2d;}_0x10b103['O'[_0x39a576(0x50c)](0x0)]=0x0,_0x10b103['o'[_0x39a576(0x50c)](0x0)]=0x0,_0x10b103['I'[_0x39a576(0x50c)](0x0)]=0x1,_0x10b103['i'[_0x39a576(0x50c)](0x0)]=0x1,_0x10b103['L'[_0x39a576(0x50c)](0x0)]=0x1,_0x10b103['l'[_0x39a576(0x50c)](0x0)]=0x1;function _0x3da56f(_0x261529){const _0xf81e0b=_0x39a576;let _0x5b85c7=0x0,_0x30d558=0x0,_0x43fa7d='';for(let _0x3c2e29=0x0;_0x3c2e29<_0x261529[_0xf81e0b(0x26d)];_0x3c2e29++){_0x30d558=_0x30d558<<0x8|_0x261529[_0x3c2e29],_0x5b85c7+=0x8;while(_0x5b85c7>=0x5){_0x5b85c7-=0x5,_0x43fa7d+=_0x48dd1c[_0x30d558>>>_0x5b85c7&0x1f];}}return _0x5b85c7>0x0&&(_0x43fa7d+=_0x48dd1c[_0x30d558<<0x5-_0x5b85c7&0x1f]),_0x43fa7d;}function _0x44ca1f(_0x396bc4){const _0x1b5dfe=_0x39a576;_0x396bc4=_0x396bc4['replace'](/-/g,'')[_0x1b5dfe(0x233)]();let _0x578be5=0x0,_0x1dfb97=0x0;const _0x3cabcf=[];for(let _0x56ae2f=0x0;_0x56ae2f<_0x396bc4[_0x1b5dfe(0x26d)];_0x56ae2f++){const _0x5df5c9=_0x10b103[_0x396bc4[_0x1b5dfe(0x50c)](_0x56ae2f)];if(_0x5df5c9===0xff)continue;_0x1dfb97=_0x1dfb97<<0x5|_0x5df5c9,_0x578be5+=0x5,_0x578be5>=0x8&&(_0x578be5-=0x8,_0x3cabcf[_0x1b5dfe(0x232)](_0x1dfb97>>>_0x578be5&0xff));}return Buffer[_0x1b5dfe(0x3e6)](_0x3cabcf);}const _0x3f719b=[_0x39a576(0x54f),_0x39a576(0x5bc),'engines',_0x39a576(0x31a),_0x39a576(0x5ba),_0x39a576(0x5d3),_0x39a576(0x16f),_0x39a576(0x235)],_0x5da598=0x0,_0x24cc6f=0x1,_0xfe88e0=0x2,_0x37c4d8=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x2ad782({issuedAt:_0x466544,expiresAt:_0x2cf9ec,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x5da598}){const _0x1d96e3=_0x39a576,_0x196c9e=Buffer[_0x1d96e3(0x3e6)](licensee,_0x1d96e3(0x39a))[_0x1d96e3(0x195)](0x0,0x40),_0x1cf5cd=0x1+0x1+0x4+0x4+0x1+_0x196c9e[_0x1d96e3(0x26d)]+0x2+0x10,_0x328341=Buffer[_0x1d96e3(0x5c5)](_0x1cf5cd);let _0x5362e6=0x0;_0x328341['writeUInt8'](0x1,_0x5362e6++),_0x328341[_0x1d96e3(0x220)](licenseType,_0x5362e6++),_0x328341[_0x1d96e3(0x1eb)](Math['floor'](_0x466544/0x3e8),_0x5362e6),_0x5362e6+=0x4,_0x328341[_0x1d96e3(0x1eb)](Math[_0x1d96e3(0x176)](_0x2cf9ec/0x3e8),_0x5362e6),_0x5362e6+=0x4,_0x328341[_0x1d96e3(0x220)](_0x196c9e[_0x1d96e3(0x26d)],_0x5362e6++),_0x196c9e[_0x1d96e3(0x500)](_0x328341,_0x5362e6),_0x5362e6+=_0x196c9e[_0x1d96e3(0x26d)];let _0x1119df=0x0;for(let _0x23bb10=0x0;_0x23bb10<_0x3f719b[_0x1d96e3(0x26d)];_0x23bb10++){if(features[_0x3f719b[_0x23bb10]])_0x1119df|=0x1<<_0x23bb10;}_0x328341[_0x1d96e3(0x320)](_0x1119df,_0x5362e6),_0x5362e6+=0x2;const _0x5d24a3=['envs',_0x1d96e3(0x2fa),_0x1d96e3(0x60e),_0x1d96e3(0x412)];for(const _0x53d7a3 of _0x5d24a3){_0x328341[_0x1d96e3(0x1eb)](limits[_0x53d7a3]||0x0,_0x5362e6),_0x5362e6+=0x4;}return _0x328341;}function _0x5a75cd(_0xcefaf6){const _0x3eadf6=_0x39a576;let _0x11fa98=0x0;const _0x269c13=_0xcefaf6[_0x3eadf6(0x2ac)](_0x11fa98++),_0x1c25b2=_0xcefaf6[_0x3eadf6(0x2ac)](_0x11fa98++),_0x23ff35=_0xcefaf6['readUInt32BE'](_0x11fa98);_0x11fa98+=0x4;const _0x14860e=_0xcefaf6[_0x3eadf6(0x4f7)](_0x11fa98);_0x11fa98+=0x4;const _0x3a103a=_0xcefaf6['readUInt8'](_0x11fa98++),_0x202967=_0xcefaf6[_0x3eadf6(0x195)](_0x11fa98,_0x11fa98+_0x3a103a)[_0x3eadf6(0x2aa)]('utf8');_0x11fa98+=_0x3a103a;const _0x1f69c7=_0xcefaf6[_0x3eadf6(0x495)](_0x11fa98);_0x11fa98+=0x2;const _0x28a626={};for(let _0x357396=0x0;_0x357396<_0x3f719b[_0x3eadf6(0x26d)];_0x357396++){_0x28a626[_0x3f719b[_0x357396]]=Boolean(_0x1f69c7&0x1<<_0x357396);}const _0x4fc01b=[_0x3eadf6(0x5b0),_0x3eadf6(0x2fa),'syncPeers',_0x3eadf6(0x412)],_0xf6beb7={};for(const _0x3bd9a7 of _0x4fc01b){const _0x374638=_0xcefaf6['readUInt32BE'](_0x11fa98);_0x11fa98+=0x4,_0xf6beb7[_0x3bd9a7]=_0x374638===0x0?null:_0x374638;}return{'v':_0x269c13,'licenseType':_0x1c25b2,'issuedAt':_0x23ff35*0x3e8,'expiresAt':_0x14860e*0x3e8,'licensee':_0x202967,'features':_0x28a626,'limits':_0xf6beb7};}function _0x11c8c2(_0x4113ec,_0x31b8bc){const _0xc49896=_0x39a576,_0x44ec06=Buffer[_0xc49896(0x182)]([_0x4113ec,_0x31b8bc]),_0xbea79=_0x3da56f(_0x44ec06),_0x2970dc=[];for(let _0x71c853=0x0;_0x71c853<_0xbea79[_0xc49896(0x26d)];_0x71c853+=0x8){_0x2970dc[_0xc49896(0x232)](_0xbea79[_0xc49896(0x195)](_0x71c853,_0x71c853+0x8));}return _0x2970dc['join']('-');}function _0x4cd539(_0x1e3588){const _0x5e3274=_0x39a576;if(typeof _0x1e3588!==_0x5e3274(0x61d))throw new Error(_0x5e3274(0x3be));const _0x14fffa=_0x44ca1f(_0x1e3588['replace'](/-/g,''));if(_0x14fffa[_0x5e3274(0x26d)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x14fffa[_0x5e3274(0x26d)]+_0x5e3274(0x5aa));const _0x3be96e=_0x14fffa['slice'](0x0,_0x14fffa[_0x5e3274(0x26d)]-0x40),_0x18e266=_0x14fffa[_0x5e3274(0x195)](_0x14fffa[_0x5e3274(0x26d)]-0x40);let _0x47b0be;try{_0x47b0be=_0x5a75cd(_0x3be96e);}catch(_0x2fadc7){throw new Error(_0x5e3274(0x1f6)+_0x2fadc7[_0x5e3274(0x408)]);}return{'rawBuf':_0x14fffa,'payload':_0x3be96e,'sig':_0x18e266,'decoded':_0x47b0be};}function _0x48b64a(_0xcec2c5){const _0x1b7e53=_0x39a576;return _0x2f59ca[_0x1b7e53(0x3cb)](_0x1b7e53(0x596))[_0x1b7e53(0x2de)](_0xcec2c5)[_0x1b7e53(0x578)]()['slice'](0x0,0x8);}function _0x16f115(_0x124af9,_0xda8ca1,_0x452c71){const _0x36b52f=_0x39a576,_0x5dfb9c=_0x36b52f(0x5be)+_0x452c71,_0x29b30d=Buffer[_0x36b52f(0x182)]([Buffer[_0x36b52f(0x3e6)](_0x124af9,_0x36b52f(0x39a)),_0xda8ca1]),_0x52796f=_0x2f59ca[_0x36b52f(0x501)]('sha256',_0x5dfb9c)[_0x36b52f(0x2de)](_0x29b30d)[_0x36b52f(0x578)](),_0xed41c8=_0x3da56f(_0x52796f[_0x36b52f(0x195)](0x0,0x5));return{'pin':_0xed41c8,'pinHmac':_0x52796f};}function _0x53de72(_0x24a1e4,_0x43b252,_0x325d47){const _0x2a6060=_0x39a576,_0x1de31f=Buffer[_0x2a6060(0x5c5)](0x4d);let _0x309220=0x0;_0x1de31f[_0x2a6060(0x220)](0x1,_0x309220++),_0x24a1e4[_0x2a6060(0x500)](_0x1de31f,_0x309220),_0x309220+=0x8,_0x1de31f['writeUInt32BE'](_0x43b252,_0x309220),_0x309220+=0x4,_0x325d47[_0x2a6060(0x500)](_0x1de31f,_0x309220);const _0x3ea807=_0x3da56f(_0x1de31f),_0x5bc01c=[];for(let _0x3c7293=0x0;_0x3c7293<_0x3ea807[_0x2a6060(0x26d)];_0x3c7293+=0x6){_0x5bc01c[_0x2a6060(0x232)](_0x3ea807['slice'](_0x3c7293,_0x3c7293+0x6));}return _0x5bc01c[_0x2a6060(0x25d)]('-');}function _0x2b93db(_0xcb9afc){const _0x23dd2f=_0x39a576;if(typeof _0xcb9afc!==_0x23dd2f(0x61d))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x4eb5a9=_0x44ca1f(_0xcb9afc['replace'](/-/g,''));if(_0x4eb5a9['length']!==0x4d)throw new Error(_0x23dd2f(0x48d)+_0x4eb5a9[_0x23dd2f(0x26d)]);let _0xf7e661=0x0;const _0x2cd6af=_0x4eb5a9[_0x23dd2f(0x2ac)](_0xf7e661++),_0xf18349=_0x4eb5a9[_0x23dd2f(0x195)](_0xf7e661,_0xf7e661+0x8);_0xf7e661+=0x8;const _0x487c8b=_0x4eb5a9[_0x23dd2f(0x4f7)](_0xf7e661);_0xf7e661+=0x4;const _0x3e16f5=_0x4eb5a9[_0x23dd2f(0x195)](_0xf7e661);return{'v':_0x2cd6af,'licenseHash':_0xf18349,'expiry':_0x487c8b,'sig':_0x3e16f5};}function _0x41b117({tokenString:_0x59b8a5,nodeId:_0x960370,rawBlobBuf:_0x3878d9,pubKeyPem:_0x48e81c,pubFingerprint:_0x3a4c44}){const _0x2961a1=_0x39a576;let _0x452c1f;try{_0x452c1f=_0x2b93db(_0x59b8a5);}catch(_0x443491){return{'valid':![],'reason':_0x2961a1(0x2ea)};}const _0x587ae9=_0x48b64a(_0x3878d9);if(!_0x587ae9[_0x2961a1(0x5bd)](_0x452c1f[_0x2961a1(0x1bc)]))return{'valid':![],'reason':_0x2961a1(0x4a3)};const {pinHmac:_0x2c726b}=_0x16f115(_0x960370,_0x587ae9,_0x3a4c44),_0x2d955a=Buffer[_0x2961a1(0x5c5)](0x4);_0x2d955a[_0x2961a1(0x1eb)](_0x452c1f[_0x2961a1(0x45d)],0x0);const _0x10823a=Buffer[_0x2961a1(0x182)]([Buffer['from']([_0x452c1f['v']]),_0x2c726b['slice'](0x0,0x5),_0x452c1f['licenseHash'],_0x2d955a]);try{const _0x2d4db8=_0x2f59ca[_0x2961a1(0x1e9)](null,_0x10823a,_0x48e81c,_0x452c1f['sig']);if(!_0x2d4db8)return{'valid':![],'reason':_0x2961a1(0x300)};}catch(_0x245e06){return{'valid':![],'reason':_0x2961a1(0x300)};}if(_0x452c1f[_0x2961a1(0x45d)]<Date[_0x2961a1(0x464)]()/0x3e8)return{'valid':![],'reason':_0x2961a1(0x49c)};return{'valid':!![],'reason':'ok'};}function _0x4243cf(_0x56501d){const _0x392de5=_0x39a576;if(typeof _0x56501d!=='string')return _0x392de5(0x585);const _0x1cf94f=_0x56501d[_0x392de5(0x288)]();if(_0x1cf94f['startsWith']('/')||_0x1cf94f['startsWith']('./')||_0x1cf94f['startsWith'](_0x392de5(0x2c1))||/^[A-Za-z]:[\\/]/[_0x392de5(0x4c0)](_0x1cf94f))return _0x392de5(0x15d);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x392de5(0x4c0)](_0x1cf94f))return _0x392de5(0x600);const _0x56feb0=_0x1cf94f[_0x392de5(0x197)](/[\s-]+/g,'')[_0x392de5(0x26d)];if(_0x56feb0===0x7c)return'activation';if(_0x56feb0>=0x95&&_0x56feb0<=0xfc)return'blob';return _0x392de5(0x585);}return okdbLicenseCodec={'toBase32':_0x3da56f,'fromBase32':_0x44ca1f,'encodeLicensePayload':_0x2ad782,'decodeLicensePayload':_0x5a75cd,'encodeLicenseBlob':_0x11c8c2,'decodeLicenseBlob':_0x4cd539,'licenseHash':_0x48b64a,'derivePin':_0x16f115,'encodeActivationToken':_0x53de72,'decodeActivationToken':_0x2b93db,'verifyActivation':_0x41b117,'detectInputType':_0x4243cf,'FEATURE_NAMES':_0x3f719b,'LICENSE_TYPE_STANDARD':_0x5da598,'LICENSE_TYPE_OPEN':_0x24cc6f,'LICENSE_TYPE_INTERNAL':_0xfe88e0,'OPEN_LICENSE_MAX_DURATION_MS':_0x37c4d8},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x2b88f2 extends Error{constructor(_0x3d633d,_0x2a6c75,_0x3cd91d={}){const _0x55cadc=_0x1ef7;super(_0x3d633d),this['name']='OKDBError',this[_0x55cadc(0x38c)]=_0x2a6c75,this['details']=_0x3cd91d,_0x3cd91d[_0x55cadc(0x4a1)]&&(this[_0x55cadc(0x4a1)]=_0x3cd91d['cause']),Error[_0x55cadc(0x3db)](this,this[_0x55cadc(0x51a)]);}}class _0x5b9d51 extends _0x2b88f2{constructor(_0x12bd69,_0x2ccaea,_0x15453f,_0xe6e61b){const _0x52df27=_0x1ef7;super(_0x52df27(0x4de)+_0x12bd69+'@'+_0x2ccaea+_0x52df27(0x620)+_0x15453f+',\x20got\x20'+_0xe6e61b,'VERSION_MISMATCH',{'type':_0x12bd69,'key':_0x2ccaea,'expectedVersion':_0x15453f,'actualVersion':_0xe6e61b}),this['name']='OKDBVersionMismatchError';}}class _0x2b619d extends _0x2b88f2{constructor(_0x100247,_0x14f0c6){const _0x13f1ad=_0x1ef7;super(_0x100247+'@'+_0x14f0c6+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x100247,'key':_0x14f0c6}),this[_0x13f1ad(0x60c)]=_0x13f1ad(0x40b);}}class _0x43ce4b extends _0x2b88f2{constructor(_0x3c405a,_0x548084){const _0x49bdc7=_0x1ef7;super(_0x3c405a+'@'+_0x548084+_0x49bdc7(0x33c),_0x49bdc7(0x327),{'type':_0x3c405a,'key':_0x548084}),this[_0x49bdc7(0x60c)]='OKDBAlreadyExistsError';}}class _0x392832 extends _0x2b88f2{constructor(_0x55fd02,_0xee9fc8){const _0x384349=_0x1ef7,_0x432e94=typeof _0xee9fc8;super(_0x384349(0x179)+_0x55fd02+_0x384349(0x2c7)+_0x432e94+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0xee9fc8,_0x384349(0x257),{'index':_0x55fd02,'key':_0xee9fc8,'keyType':_0x432e94}),this[_0x384349(0x60c)]='OKDBInvalidIndexKeyError';}}class _0x46913c extends _0x2b88f2{constructor(_0x131d22){const _0x321a36=_0x1ef7,_0x3bbea7=typeof _0x131d22;super(_0x321a36(0x243)+_0x3bbea7+_0x321a36(0x3c1)+_0x131d22,_0x321a36(0x542),{'key':_0x131d22,'keyType':_0x3bbea7}),this[_0x321a36(0x60c)]=_0x321a36(0x5bf);}}class _0x396bf8 extends _0x2b88f2{constructor(_0x141682){const _0x36530a=_0x1ef7;super('Type\x20\x27'+_0x141682+_0x36530a(0x208),'TYPE_NOT_REGISTERED',{'type':_0x141682}),this[_0x36530a(0x60c)]=_0x36530a(0x5ee);}}class _0x1a501e extends _0x2b88f2{constructor(_0x31b669){const _0x32f77f=_0x1ef7;super('Type\x20\x27'+_0x31b669+_0x32f77f(0x24e),_0x32f77f(0x2ee),{'type':_0x31b669}),this[_0x32f77f(0x60c)]=_0x32f77f(0x583);}}class _0x19003f extends _0x2b88f2{constructor(_0x1bd0a1,_0x5f1be2){const _0x1c60f1=_0x1ef7;super('Index\x20\x27'+_0x5f1be2+_0x1c60f1(0x3bf)+_0x1bd0a1+'\x27\x20doesn\x27t\x20exist',_0x1c60f1(0x5b8),{'type':_0x1bd0a1,'index':_0x5f1be2}),this[_0x1c60f1(0x60c)]='OKDBIndexNotRegisteredError';}}class _0x3eaa37 extends _0x2b88f2{constructor(_0x2a0943,_0x11210d){const _0x290c8a=_0x1ef7;super('Index\x20\x27'+_0x11210d+_0x290c8a(0x3bf)+_0x2a0943+'\x27\x20is\x20already\x20registered',_0x290c8a(0x343),{'type':_0x2a0943,'index':_0x11210d}),this['name']=_0x290c8a(0x1fb);}}class _0x5fe5bc extends _0x2b88f2{constructor(_0x40392c,_0x1d2d12={}){const _0x22e6e0=_0x1ef7;super(_0x40392c,_0x22e6e0(0x3c3),_0x1d2d12),this[_0x22e6e0(0x60c)]='OKDBInvalidValueError';}}class _0x32f960 extends _0x2b88f2{constructor(_0x139994,_0x23a9e5,_0x358ac4,_0x3f34cd,_0x8d6593){const _0x1cb9a4=_0x1ef7;super(_0x1cb9a4(0x178)+_0x139994+'@'+_0x23a9e5+_0x1cb9a4(0x4f0)+_0x358ac4+_0x1cb9a4(0x2d5)+_0x3f34cd+_0x1cb9a4(0x459)+_0x8d6593+'\x27',_0x1cb9a4(0x4ba),{'type':_0x139994,'index':_0x23a9e5,'indexKey':_0x358ac4,'existingKey':_0x3f34cd,'conflictingKey':_0x8d6593}),this['name']=_0x1cb9a4(0x1be);}}class _0x1ac16b extends _0x2b88f2{constructor(_0xba7ce0,_0x48effa,_0x1daf6d){const _0x1a7ca7=_0x1ef7;super(_0x1a7ca7(0x1e7)+_0xba7ce0+'@'+_0x48effa,_0x1a7ca7(0x5d9),{'type':_0xba7ce0,'key':_0x48effa,'errors':_0x1daf6d}),this['name']=_0x1a7ca7(0x30b),this[_0x1a7ca7(0x57e)]=_0xba7ce0,this['key']=_0x48effa,this['errors']=_0x1daf6d;}}class _0x1f8b9d extends _0x2b88f2{constructor(_0x53a50,_0x3c55a8){const _0x10c10b=_0x1ef7;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x53a50+':\x20'+_0x3c55a8[_0x10c10b(0x26d)]+_0x10c10b(0x228),_0x10c10b(0x3ee),{'type':_0x53a50,'failures':_0x3c55a8}),this[_0x10c10b(0x60c)]='OKDBSchemaCollectionError',this[_0x10c10b(0x57e)]=_0x53a50,this[_0x10c10b(0x2a9)]=_0x3c55a8;}}class _0x2d7d3d extends _0x2b88f2{constructor(_0x4184e3,_0x536b85,_0xcd97d1,_0x330384,_0x17da36){const _0x3767bf=_0x1ef7;super(_0x3767bf(0x44d)+_0x4184e3+'@'+_0x536b85+'.'+_0xcd97d1+_0x3767bf(0x1c7)+_0x330384+'@'+_0x17da36+_0x3767bf(0x19e),_0x3767bf(0x5ed),{'sourceType':_0x4184e3,'sourceKey':_0x536b85,'fieldPath':_0xcd97d1,'targetType':_0x330384,'targetKey':_0x17da36}),this['name']='OKDBForeignKeyError',this['sourceType']=_0x4184e3,this['sourceKey']=_0x536b85,this[_0x3767bf(0x455)]=_0xcd97d1,this[_0x3767bf(0x53c)]=_0x330384,this[_0x3767bf(0x2e8)]=_0x17da36;}}class _0x2ad671 extends _0x2b88f2{constructor(_0x38b8f6,_0x5a7768,_0x559488){const _0xe0a0e9=_0x1ef7;super(_0xe0a0e9(0x4b4)+_0x38b8f6+'@'+_0x5a7768+':\x20'+_0x559488[_0xe0a0e9(0x26d)]+_0xe0a0e9(0x5de),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x38b8f6,'targetKey':_0x5a7768,'references':_0x559488}),this[_0xe0a0e9(0x60c)]='OKDBForeignKeyDeleteError',this[_0xe0a0e9(0x53c)]=_0x38b8f6,this[_0xe0a0e9(0x2e8)]=_0x5a7768,this['references']=_0x559488;}}class _0x12c308 extends _0x2b88f2{constructor(_0x57d46c,_0x3765df,_0x5c3cf2){const _0x4f0d2f=_0x1ef7;super(_0x4f0d2f(0x27b)+_0x3765df+_0x4f0d2f(0x44a)+_0x57d46c+_0x4f0d2f(0x4ab)+_0x5c3cf2[_0x4f0d2f(0x32d)](_0x548c6b=>_0x548c6b[_0x4f0d2f(0x510)]+':'+_0x548c6b[_0x4f0d2f(0x60c)])[_0x4f0d2f(0x25d)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x57d46c,'index':_0x3765df,'usedBy':_0x5c3cf2}),this[_0x4f0d2f(0x60c)]=_0x4f0d2f(0x26f);}}return okdbError={'OKDBError':_0x2b88f2,'OKDBVersionMismatchError':_0x5b9d51,'OKDBNotFoundError':_0x2b619d,'OKDBAlreadyExistsError':_0x43ce4b,'OKDBInvalidIndexKeyError':_0x392832,'OKDBInvalidPrimaryKeyError':_0x46913c,'OKDBTypeNotRegisteredError':_0x396bf8,'OKDBTypeAlreadyRegisteredError':_0x1a501e,'OKDBIndexNotRegisteredError':_0x19003f,'OKDBIndexAlreadyRegisteredError':_0x3eaa37,'OKDBInvalidValueError':_0x5fe5bc,'OKDBUniqueConstraintError':_0x32f960,'OKDBSchemaValidationError':_0x1ac16b,'OKDBSchemaCollectionError':_0x1f8b9d,'OKDBForeignKeyError':_0x2d7d3d,'OKDBForeignKeyDeleteError':_0x2ad671,'OKDBIndexHasConsumersError':_0x12c308},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x325954=_0x18fcc0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x22b059={'PUT':'put','REMOVE':_0x325954(0x2cf),'INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x325954(0x556),'TYPE_REGISTER':_0x325954(0x2ba),'TYPE_DROP':'dropType','FTS_REGISTER':_0x325954(0x5b3),'FTS_DROP':_0x325954(0x271),'FTS_RESET':_0x325954(0x280),'SCHEMA_SET':_0x325954(0x5e8),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':_0x325954(0x388)},_0x156d74={'SYSTEM_READY':_0x325954(0x2a0),'SYSTEM_STOPPED':_0x325954(0x2d9),'SYSTEM_CLOCK_CHANGE':_0x325954(0x546),'SYSTEM_POKE':_0x325954(0x1f0),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x325954(0x4fa),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x325954(0x5ce),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x325954(0x281),'INDEX_RESET':_0x325954(0x470),'INDEX_READY':_0x325954(0x168),'INDEX_PROGRESS':_0x325954(0x5c4),'VIEW_PROGRESS':_0x325954(0x337),'INDEX_DROP':_0x325954(0x237),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x325954(0x3d4),'FTS_DROP':'fts:drop','FTS_RESET':_0x325954(0x2f7),'SCHEMA_SET':_0x325954(0x46c),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x325954(0x4aa),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x325954(0x262),'TXN_START':_0x325954(0x316),'TXN_END':_0x325954(0x54e),'TXN_ROLLBACK':_0x325954(0x209),'TYPE_REGISTERED':_0x325954(0x524),'TYPE_DROP':_0x325954(0x4a0),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x325954(0x494),'SYSTEM_ENV_RELEASE':_0x325954(0x4e2),'TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x325954(0x603),'LICENSE_ACTIVATED':_0x325954(0x47f),'LICENSE_REMOVED':_0x325954(0x294)},_0x1725db={'CREATING':'creating','RESETTING':_0x325954(0x250),'READY':'ready','DROPPING':_0x325954(0x550),'WAITING':_0x325954(0x44f)},_0x28959c={'CREATED':_0x325954(0x1cb),'STARTING':'starting','STARTED':_0x325954(0x458),'STOPPING':_0x325954(0x1f5),'STOPPED':_0x325954(0x376)},_0x7e12a7={'CREATING':_0x325954(0x261),'READY':_0x325954(0x17e),'HALTED':_0x325954(0x2c9),'STOPPED':_0x325954(0x376),'RESETTING':_0x325954(0x250)},_0x30d3ed=Object[_0x325954(0x399)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x325954(0x2d3),'PROC':_0x325954(0x323),'ENV_RELEASE':_0x325954(0x395)});return okdbEnums={'BUS_EVENTS':_0x30d3ed,'CHANGE_ACTIONS':_0x22b059,'EVENTS':_0x156d74,'INDEX_STATE':_0x1725db,'OKDB_STATE':_0x28959c,'VIEW_STATE':_0x7e12a7},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x5b7cb8=_0x18fcc0;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x4feda9=require$$1$1,_0x4051b0=require$$1,_0x48b436=require$$0$1,_0x4fa6a9=_0x4feda9[_0x5b7cb8(0x4c8)](_0x4051b0[_0x5b7cb8(0x25d)](__dirname,_0x5b7cb8(0x3de)),_0x5b7cb8(0x39a))[_0x5b7cb8(0x288)](),_0x5b5fc5=_0x48b436[_0x5b7cb8(0x544)](_0x4fa6a9)['export']({'type':'spki','format':_0x5b7cb8(0x44b)}),_0x17bf6e=_0x48b436[_0x5b7cb8(0x3cb)](_0x5b7cb8(0x596))[_0x5b7cb8(0x2de)](_0x5b5fc5)[_0x5b7cb8(0x578)](_0x5b7cb8(0x4eb))[_0x5b7cb8(0x195)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4fa6a9,'PUB_FINGERPRINT':_0x17bf6e},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5a3048=_0x18fcc0;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4081a6=require$$0$1,{OKDBError:_0x58694a}=requireOkdbError(),{EVENTS:_0x53ab9b}=requireOkdbEnums(),_0x1cc875=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x4d3ce9,LICENSE_TYPE_INTERNAL:_0x59b9c8,OPEN_LICENSE_MAX_DURATION_MS:_0x3f416f}=_0x1cc875,_0x4a2bf5=requireOkdbPubkey(),_0x19d7f4={'LICENSED_BUILD':_0x5a3048(0x373),'PUBLIC_KEY_PEM':_0x4a2bf5[_0x5a3048(0x4c7)],'PUB_FINGERPRINT':_0x4a2bf5['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':_0x5a3048(0x51d)},_0x199bc5=_0x5a3048(0x1bf),_0x5944b7={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3c34a5(_0x457f5e){const _0x365ebb=_0x5a3048;!_0x457f5e[_0x365ebb(0x211)](_0x199bc5)&&await _0x457f5e[_0x365ebb(0x2ba)](_0x199bc5);}class _0x29b3a9{constructor(_0x567dcf){this['okdb']=_0x567dcf,this['_active']=null;}async[_0x5a3048(0x615)](){const _0x21a8d6=_0x5a3048,_0x38acf5=this[_0x21a8d6(0x3c8)]['_systemEnv'];if(!_0x38acf5||!_0x38acf5[_0x21a8d6(0x211)](_0x199bc5)){this[_0x21a8d6(0x3b8)]=null;return;}const _0x22c2de=this[_0x21a8d6(0x3c8)]['id'];let _0x3bfe18=null;for(const {key:_0x3c720f,value:_0x2ff86d}of _0x38acf5[_0x21a8d6(0x45e)](_0x199bc5)){const _0x46db87=this[_0x21a8d6(0x564)](_0x2ff86d,_0x22c2de);_0x46db87===_0x21a8d6(0x33b)&&!_0x3bfe18&&(_0x3bfe18={..._0x2ff86d,'id':_0x3c720f,'status':_0x46db87});}this[_0x21a8d6(0x3b8)]=_0x3bfe18;if(this[_0x21a8d6(0x3b8)]&&this[_0x21a8d6(0x3b8)][_0x21a8d6(0x427)]===_0x4d3ce9){const _0x1be373=Math['ceil']((this['_active'][_0x21a8d6(0x560)]-Date[_0x21a8d6(0x464)]())/0x5265c00);this['okdb'][_0x21a8d6(0x51d)]?.[_0x21a8d6(0x1da)](_0x21a8d6(0x386)+_0x1be373+_0x21a8d6(0x3c2),{'feature':_0x21a8d6(0x2f5),'licensee':this[_0x21a8d6(0x3b8)][_0x21a8d6(0x2ae)],'expiresAt':new Date(this[_0x21a8d6(0x3b8)][_0x21a8d6(0x560)])['toISOString']()});}this[_0x21a8d6(0x3b8)]&&this['_active'][_0x21a8d6(0x427)]===_0x59b9c8&&this[_0x21a8d6(0x3c8)]['log']?.[_0x21a8d6(0x1da)](_0x21a8d6(0x3c0),{'feature':_0x21a8d6(0x2f5),'licensee':this[_0x21a8d6(0x3b8)][_0x21a8d6(0x2ae)]});}[_0x5a3048(0x564)](_0x11df65,_0x35c03c){const _0xc3f5ef=_0x5a3048;if(!_0x11df65[_0xc3f5ef(0x57b)])return _0xc3f5ef(0x516);let _0x575c5b;try{_0x575c5b=_0x1cc875[_0xc3f5ef(0x378)](_0x11df65['blob']);}catch(_0x120a19){return'invalid';}try{const _0x38defa=_0x4081a6[_0xc3f5ef(0x1e9)](null,_0x575c5b[_0xc3f5ef(0x251)],_0x19d7f4[_0xc3f5ef(0x4c7)],_0x575c5b['sig']);if(!_0x38defa)return _0xc3f5ef(0x516);}catch(_0x3b0eb1){return'invalid';}if(_0x575c5b[_0xc3f5ef(0x277)][_0xc3f5ef(0x427)]===_0x59b9c8)return _0xc3f5ef(0x33b);if(_0x575c5b[_0xc3f5ef(0x277)][_0xc3f5ef(0x560)]<=Date[_0xc3f5ef(0x464)]())return _0xc3f5ef(0x29d);if(_0x575c5b[_0xc3f5ef(0x277)][_0xc3f5ef(0x427)]===_0x4d3ce9)return _0xc3f5ef(0x33b);if(!_0x11df65['activation'])return _0xc3f5ef(0x1f1);const _0x4606d6=_0x1cc875['verifyActivation']({'tokenString':_0x11df65[_0xc3f5ef(0x4b8)],'nodeId':_0x35c03c,'rawBlobBuf':_0x575c5b['rawBuf'],'pubKeyPem':_0x19d7f4[_0xc3f5ef(0x4c7)],'pubFingerprint':_0x19d7f4['PUB_FINGERPRINT']});if(_0x4606d6['reason']==='LICENSE_HASH_MISMATCH'||_0x4606d6['reason']==='SIG_INVALID')return _0xc3f5ef(0x57f);if(_0x4606d6[_0xc3f5ef(0x1f7)]===_0xc3f5ef(0x49c))return _0xc3f5ef(0x29d);if(!_0x4606d6[_0xc3f5ef(0x53b)])return _0xc3f5ef(0x57f);return'active';}get['active'](){const _0xe48531=_0x5a3048;return this[_0xe48531(0x3b8)];}get[_0x5a3048(0x206)](){return this['_active']??_0x5944b7;}[_0x5a3048(0x2cb)](_0x340d0f){const _0x3ef164=_0x5a3048;if(_0x19d7f4['LICENSED_BUILD']!==_0x3ef164(0x373))return;const _0xc31213=this[_0x3ef164(0x206)];if(!_0xc31213['features']?.[_0x340d0f]){const _0x4f846d=_0xc31213[_0x3ef164(0x1a5)]?_0x3ef164(0x23f)+_0x340d0f+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x340d0f+_0x3ef164(0x5b9):_0x3ef164(0x319)+_0x340d0f+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x340d0f+'\x22.';throw new _0x58694a(_0x4f846d,_0x3ef164(0x437),{'feature':_0x340d0f});}}['isFeatureEnabled'](_0x49e142){const _0x4135c2=_0x5a3048;if(_0x19d7f4[_0x4135c2(0x276)]!=='true')return!![];return!!this[_0x4135c2(0x206)]['features']?.[_0x49e142];}[_0x5a3048(0x580)](_0x13faf6,_0x3200c8){const _0xd02da=_0x5a3048;if(_0x19d7f4[_0xd02da(0x276)]!==_0xd02da(0x373))return;const _0x1a8a29=this[_0xd02da(0x206)],_0x2e8f48=_0x1a8a29[_0xd02da(0x33f)]?.[_0x13faf6];if(_0x2e8f48===null||_0x2e8f48===undefined||_0x2e8f48===0x0)return;if(_0x3200c8>=_0x2e8f48)throw new _0x58694a(_0xd02da(0x2c3)+_0x13faf6+'\x20('+_0x3200c8+'/'+_0x2e8f48+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x13faf6,'current':_0x3200c8,'max':_0x2e8f48});}async[_0x5a3048(0x4d6)](_0x5df259){const _0x412f41=_0x5a3048;let _0x1a50dd;try{_0x1a50dd=_0x1cc875[_0x412f41(0x378)](_0x5df259);}catch(_0x3c2298){throw new _0x58694a(_0x412f41(0x18b)+_0x3c2298[_0x412f41(0x408)],_0x412f41(0x586));}let _0x4fa4f6;try{_0x4fa4f6=_0x4081a6[_0x412f41(0x1e9)](null,_0x1a50dd[_0x412f41(0x251)],_0x19d7f4[_0x412f41(0x4c7)],_0x1a50dd['sig']);}catch(_0x3c8c0f){throw new _0x58694a(_0x412f41(0x3a8)+_0x3c8c0f[_0x412f41(0x408)],_0x412f41(0x586));}if(!_0x4fa4f6)throw new _0x58694a('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x412f41(0x59e)+_0x19d7f4[_0x412f41(0x4bb)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','LICENSE_INVALID',{'expectedFingerprint':_0x19d7f4[_0x412f41(0x4bb)]});if(_0x1a50dd['decoded'][_0x412f41(0x427)]===_0x4d3ce9){const _0x2e336a=_0x1a50dd[_0x412f41(0x277)]['expiresAt']-_0x1a50dd['decoded'][_0x412f41(0x1c2)];if(_0x2e336a>_0x3f416f)throw new _0x58694a(_0x412f41(0x43c)+Math[_0x412f41(0x1c3)](_0x2e336a/(0x1e*0x5265c00))+_0x412f41(0x3e7),_0x412f41(0x586));}const _0x21b745=this[_0x412f41(0x3c8)][_0x412f41(0x52c)];await _0x3c34a5(_0x21b745);const _0x366025=_0x1cc875[_0x412f41(0x1bc)](_0x1a50dd[_0x412f41(0x41a)])[_0x412f41(0x2aa)](_0x412f41(0x4eb));for(const {value:_0x473a66}of _0x21b745[_0x412f41(0x45e)](_0x199bc5)){if(_0x473a66['_licenseHash']===_0x366025)throw new _0x58694a('License\x20already\x20stored',_0x412f41(0x586));}const _0x14446b=_0x4081a6[_0x412f41(0x298)](),_0x5c3844={'blob':_0x5df259,'activation':null,'addedAt':Date[_0x412f41(0x464)](),'_licenseHash':_0x366025,'licensee':_0x1a50dd[_0x412f41(0x277)][_0x412f41(0x2ae)],'expiresAt':_0x1a50dd[_0x412f41(0x277)][_0x412f41(0x560)],'features':_0x1a50dd[_0x412f41(0x277)]['features'],'limits':_0x1a50dd[_0x412f41(0x277)][_0x412f41(0x33f)],'licenseType':_0x1a50dd[_0x412f41(0x277)][_0x412f41(0x427)]};return await _0x21b745['put'](_0x199bc5,_0x14446b,_0x5c3844),{'id':_0x14446b,..._0x5c3844};}async[_0x5a3048(0x402)](_0x36ea25){const _0x21260b=_0x5a3048;let _0x3e5231;try{_0x3e5231=_0x1cc875['decodeActivationToken'](_0x36ea25);}catch(_0x20147a){throw new _0x58694a(_0x21260b(0x2bc)+_0x20147a[_0x21260b(0x408)],'LICENSE_ACTIVATION_INVALID');}const _0x3adb60=_0x3e5231[_0x21260b(0x1bc)][_0x21260b(0x2aa)]('hex'),_0x1dc87a=this[_0x21260b(0x3c8)]['_systemEnv'];if(!_0x1dc87a||!_0x1dc87a[_0x21260b(0x211)](_0x199bc5))throw new _0x58694a('No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_ACTIVATION_INVALID');let _0x2f404c=null,_0x39af2e=null;for(const {key:_0x37b697,value:_0xa8f50b}of _0x1dc87a['getRange'](_0x199bc5)){if(_0xa8f50b[_0x21260b(0x43b)]===_0x3adb60){_0x2f404c=_0x37b697,_0x39af2e=_0xa8f50b;break;}}if(!_0x2f404c)throw new _0x58694a(_0x21260b(0x2db),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x4e52a8}=_0x1cc875[_0x21260b(0x378)](_0x39af2e[_0x21260b(0x57b)]),_0x35000b=_0x1cc875[_0x21260b(0x4c9)]({'tokenString':_0x36ea25,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x4e52a8,'pubKeyPem':_0x19d7f4[_0x21260b(0x4c7)],'pubFingerprint':_0x19d7f4[_0x21260b(0x4bb)]});if(!_0x35000b['valid'])throw new _0x58694a('Activation\x20invalid:\x20'+_0x35000b[_0x21260b(0x1f7)],_0x21260b(0x35f),{'reason':_0x35000b[_0x21260b(0x1f7)]});const _0x39cc8e={..._0x39af2e,'activation':_0x36ea25};return await _0x1dc87a[_0x21260b(0x2de)](_0x199bc5,_0x2f404c,_0x39cc8e),{'id':_0x2f404c,..._0x39cc8e};}async['removeLicense'](_0x2a99fe){const _0x4b6755=_0x5a3048,_0x4d09df=this[_0x4b6755(0x3c8)][_0x4b6755(0x52c)];if(!_0x4d09df||!_0x4d09df[_0x4b6755(0x211)](_0x199bc5))return;await _0x4d09df[_0x4b6755(0x2cf)](_0x199bc5,_0x2a99fe);}async[_0x5a3048(0x1fd)](){const _0x455124=_0x5a3048,_0x5ac1d1=this[_0x455124(0x3c8)][_0x455124(0x52c)];if(!_0x5ac1d1||!_0x5ac1d1[_0x455124(0x211)](_0x199bc5))return[];const _0x1e8201=this[_0x455124(0x3c8)]['id'],_0x10366c=[];for(const {key:_0x297888,value:_0x5ca4f0}of _0x5ac1d1[_0x455124(0x45e)](_0x199bc5)){const _0xa878b=this[_0x455124(0x564)](_0x5ca4f0,_0x1e8201);_0x10366c[_0x455124(0x232)]({..._0x5ca4f0,'id':_0x297888,'status':_0xa878b});}return _0x10366c;}[_0x5a3048(0x4b6)](){const _0x28d101=_0x5a3048,_0x8b97aa=this[_0x28d101(0x3c8)]['_systemEnv'];if(!_0x8b97aa||!_0x8b97aa['hasType'](_0x199bc5))return[];const _0x1845f4=this[_0x28d101(0x3c8)]['id'],_0x95b6b2=[];for(const {key:_0x44c665,value:_0x193800}of _0x8b97aa['getRange'](_0x199bc5)){if(_0x193800[_0x28d101(0x43b)]){if(_0x193800[_0x28d101(0x427)]===_0x4d3ce9)_0x95b6b2[_0x28d101(0x232)]({'licenseId':_0x44c665,'pin':null});else{const _0x3ee26a=Buffer[_0x28d101(0x3e6)](_0x193800[_0x28d101(0x43b)],_0x28d101(0x4eb)),{pin:_0x3838ad}=_0x1cc875['derivePin'](_0x1845f4,_0x3ee26a,_0x19d7f4[_0x28d101(0x4bb)]);_0x95b6b2[_0x28d101(0x232)]({'licenseId':_0x44c665,'pin':_0x3838ad});}}}return _0x95b6b2;}async['recheck'](){const _0x23e922=_0x5a3048,_0x45e660=this['_active'];await this['reload']();if(this[_0x23e922(0x3b8)]&&this['_active'][_0x23e922(0x427)]===_0x4d3ce9){const _0x35a9ff=Math[_0x23e922(0x1c3)]((this[_0x23e922(0x3b8)][_0x23e922(0x560)]-Date[_0x23e922(0x464)]())/0x5265c00);this[_0x23e922(0x3c8)][_0x23e922(0x51d)]?.[_0x23e922(0x1da)](_0x23e922(0x386)+_0x35a9ff+_0x23e922(0x3c2),{'feature':'license','licensee':this['_active'][_0x23e922(0x2ae)],'expiresAt':new Date(this[_0x23e922(0x3b8)][_0x23e922(0x560)])[_0x23e922(0x429)]()});}this[_0x23e922(0x3b8)]&&this[_0x23e922(0x3b8)]['licenseType']===_0x59b9c8&&this[_0x23e922(0x3c8)][_0x23e922(0x51d)]?.[_0x23e922(0x1da)](_0x23e922(0x3c0),{'feature':_0x23e922(0x2f5),'licensee':this[_0x23e922(0x3b8)][_0x23e922(0x2ae)]});if(_0x45e660&&!this[_0x23e922(0x3b8)]){this[_0x23e922(0x3c8)][_0x23e922(0x51d)]?.[_0x23e922(0x1da)](_0x23e922(0x46a),{'feature':'license'}),this[_0x23e922(0x3c8)][_0x23e922(0x19d)]?.['emit'](_0x53ab9b['LICENSE_INVALID'],{'previous':_0x45e660});const _0x425145=this['okdb'][_0x23e922(0x1ae)]?.['onLicenseExpired']??_0x19d7f4[_0x23e922(0x431)];_0x425145===_0x23e922(0x344)&&(this[_0x23e922(0x3c8)][_0x23e922(0x51d)]?.[_0x23e922(0x4d4)](_0x23e922(0x48b),{'feature':_0x23e922(0x2f5)}),this[_0x23e922(0x3c8)][_0x23e922(0x284)]()[_0x23e922(0x60b)](()=>{})[_0x23e922(0x1d7)](()=>process[_0x23e922(0x185)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x29b3a9,'_C':_0x19d7f4},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x232606=_0x18fcc0;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x313287=require$$0$3,_0x38f45a=require$$1$1,_0x570bc9=require$$0,_0xdd6e6e=require$$1,_0x27e256=_0xdd6e6e[_0x232606(0x25d)](_0x570bc9['homedir'](),_0x232606(0x611)),_0x2a272d=0x3e8,_0x14f1a4={'reset':_0x232606(0x16b),'bold':_0x232606(0x2f0),'dim':_0x232606(0x346),'red':_0x232606(0x32e),'green':_0x232606(0x333),'yellow':_0x232606(0x5e0),'blue':_0x232606(0x22d),'magenta':'\x1b[35m','cyan':_0x232606(0x3fd),'white':_0x232606(0x1b1),'gray':'\x1b[90m'},_0x279c4f=!process[_0x232606(0x1a0)]['isTTY']||!!process.env.NO_COLOR,_0x4c6262=(_0x976651,_0x4c17ad)=>_0x279c4f?_0x4c17ad:''+_0x976651+_0x4c17ad+_0x14f1a4[_0x232606(0x4e0)],_0x2c766f={'error':_0x14f1a4[_0x232606(0x3ad)],'warn':_0x14f1a4[_0x232606(0x3b5)],'info':_0x14f1a4[_0x232606(0x460)],'debug':_0x14f1a4[_0x232606(0x4d9)]},_0x412b15={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x55cfba(_0x1fc3a4,_0x1de220=_0x232606(0x619)){const _0x44beef=_0x232606,{level:_0x3c2b9a,msg:_0x2e609e,meta:_0x1a7d7a,context:_0x5d6cd0,ts:_0x3aa4cb}=_0x1fc3a4;if((_0x412b15[_0x3c2b9a]??0x1)<(_0x412b15[_0x1de220]??0x1))return;const _0xa0f9d1=_0x4c6262(_0x14f1a4[_0x44beef(0x4d9)],new Date(_0x3aa4cb)['toISOString']()),_0x782f02=_0x4c6262(_0x2c766f[_0x3c2b9a]??_0x14f1a4[_0x44beef(0x20d)],_0x3c2b9a[_0x44beef(0x3df)](0x5));let _0x4f0be7='\x20\x20'+_0xa0f9d1+'\x20'+_0x4c6262(_0x14f1a4['bold'],_0x782f02)+'\x20'+_0x2e609e;if(_0x1a7d7a&&Object[_0x44beef(0x4b0)](_0x1a7d7a)[_0x44beef(0x26d)]>0x0){const _0x39dc60=Object[_0x44beef(0x192)](_0x1a7d7a)[_0x44beef(0x32d)](([_0x18fac7,_0x5c549d])=>_0x18fac7+'='+_0x5c549d)['join']('\x20');_0x4f0be7+=_0x4c6262(_0x14f1a4[_0x44beef(0x1ab)],_0x44beef(0x26e)+_0x39dc60+']');}if(_0x5d6cd0!==undefined){const _0x58886e=typeof _0x5d6cd0===_0x44beef(0x2c0)?JSON['stringify'](_0x5d6cd0):String(_0x5d6cd0);_0x4f0be7+=_0x4c6262(_0x14f1a4[_0x44beef(0x1ab)],'\x20\x20'+_0x58886e);}const _0x3a9312=_0x3c2b9a===_0x44beef(0x4d4)||_0x3c2b9a===_0x44beef(0x1da)?process['stderr'][_0x44beef(0x478)]['bind'](process[_0x44beef(0x545)]):process[_0x44beef(0x1a0)][_0x44beef(0x478)][_0x44beef(0x523)](process['stdout']);_0x3a9312(_0x4f0be7+'\x0a');}function _0x12e90e(_0x40ab12,_0x242358){const _0x4a4bf7=_0x232606;if(_0x40ab12===0xcc||_0x40ab12>=0xc8&&_0x40ab12<0x12c&&!_0x242358){console[_0x4a4bf7(0x51d)](_0x4a4bf7(0x3ea)+_0x4c6262(_0x14f1a4[_0x4a4bf7(0x2ff)],'✓')+'\x0a');return;}if(_0x40ab12>=0x190||_0x242358?.[_0x4a4bf7(0x4d4)]){const _0x3cf65d=_0x242358?.[_0x4a4bf7(0x4d4)]??_0x242358?.[_0x4a4bf7(0x408)]??_0x4a4bf7(0x419)+_0x40ab12;console[_0x4a4bf7(0x51d)](_0x4a4bf7(0x3ea)+_0x4c6262(_0x14f1a4[_0x4a4bf7(0x3ad)],'✗')+'\x20'+_0x4c6262(_0x14f1a4[_0x4a4bf7(0x465)]+_0x14f1a4['red'],String(_0x40ab12))+'\x20\x20'+_0x3cf65d+'\x0a');return;}const _0x3d77d4=Object[_0x4a4bf7(0x5f4)]['hasOwnProperty'][_0x4a4bf7(0x1bb)](_0x242358??{},_0x4a4bf7(0x2e9))?_0x242358[_0x4a4bf7(0x2e9)]:_0x242358,_0x43e646=_0x242358?.[_0x4a4bf7(0x1a8)];console[_0x4a4bf7(0x51d)](''),_0x2fc5c7(_0x3d77d4,'\x20\x20');if(_0x43e646?.['count']!=null||_0x43e646?.[_0x4a4bf7(0x5b5)]!=null){const _0x30f636=[];if(_0x43e646[_0x4a4bf7(0x22b)]!=null)_0x30f636[_0x4a4bf7(0x232)](_0x43e646[_0x4a4bf7(0x22b)]+_0x4a4bf7(0x15e)+(_0x43e646[_0x4a4bf7(0x22b)]!==0x1?'s':''));if(_0x43e646['time']!=null)_0x30f636[_0x4a4bf7(0x232)](_0x43e646[_0x4a4bf7(0x5b5)]+'ms');console[_0x4a4bf7(0x51d)](_0x4a4bf7(0x3ea)+_0x4c6262(_0x14f1a4[_0x4a4bf7(0x1ab)],_0x30f636[_0x4a4bf7(0x25d)](_0x4a4bf7(0x29a))));}console['log']('');}function _0x2fc5c7(_0x25850f,_0x2575af=''){const _0x2ff506=_0x232606;if(_0x25850f===null||_0x25850f===undefined){console['log'](_0x2575af+_0x4c6262(_0x14f1a4[_0x2ff506(0x1ab)],'(null)'));return;}if(Array[_0x2ff506(0x60f)](_0x25850f)){if(_0x25850f[_0x2ff506(0x26d)]===0x0){console[_0x2ff506(0x51d)](_0x2575af+_0x4c6262(_0x14f1a4[_0x2ff506(0x1ab)],_0x2ff506(0x238)));return;}if(_0x25850f[_0x2ff506(0x5cc)](_0x308331=>_0x308331&&typeof _0x308331==='object'&&_0x2ff506(0x4ff)in _0x308331&&_0x2ff506(0x4e6)in _0x308331)){_0x1175fd(_0x25850f,_0x2575af);return;}if(_0x25850f[_0x2ff506(0x5cc)](_0x2a43d5=>_0x2a43d5&&typeof _0x2a43d5===_0x2ff506(0x2c0)&&'type'in _0x2a43d5&&_0x2ff506(0x22b)in _0x2a43d5)){_0x4e81d2(_0x25850f,_0x2575af);return;}if(_0x25850f['every'](_0x480002=>typeof _0x480002!==_0x2ff506(0x2c0)||_0x480002===null)){_0x25850f['forEach']((_0x51e39c,_0x5e7669)=>console['log'](_0x2575af+_0x4c6262(_0x14f1a4[_0x2ff506(0x4d9)],_0x5e7669+0x1+'.')+'\x20'+_0x4c6262(_0x14f1a4[_0x2ff506(0x20d)],String(_0x51e39c))));return;}_0x25850f[_0x2ff506(0x5c9)]((_0x477aa1,_0x454a57)=>{const _0xc73ad8=_0x2ff506;console[_0xc73ad8(0x51d)](_0x2575af+_0x4c6262(_0x14f1a4[_0xc73ad8(0x1ab)],'['+_0x454a57+']'));if(typeof _0x477aa1==='object'&&_0x477aa1!==null)_0x5846cc(_0x477aa1,_0x2575af+'\x20\x20');else console['log'](_0x2575af+'\x20\x20'+String(_0x477aa1));});return;}if(typeof _0x25850f===_0x2ff506(0x2c0)){if('key'in _0x25850f&&_0x2ff506(0x4e6)in _0x25850f&&Object['keys'](_0x25850f)[_0x2ff506(0x26d)]<=0x3){console['log'](_0x2575af+_0x4c6262(_0x14f1a4[_0x2ff506(0x465)]+_0x14f1a4[_0x2ff506(0x460)],String(_0x25850f[_0x2ff506(0x4ff)])));const _0x597276=_0x25850f[_0x2ff506(0x4e6)];if(_0x597276&&typeof _0x597276===_0x2ff506(0x2c0))_0x5846cc(_0x597276,_0x2575af);else console[_0x2ff506(0x51d)](_0x2575af+_0x4c6262(_0x14f1a4[_0x2ff506(0x20d)],String(_0x597276)));return;}_0x5846cc(_0x25850f,_0x2575af);return;}console[_0x2ff506(0x51d)](_0x2575af+_0x4c6262(_0x14f1a4[_0x2ff506(0x20d)],String(_0x25850f)));}function _0x5846cc(_0x1c316b,_0x3e68af=''){const _0x12ae7c=_0x232606,_0x7d8e00=Object[_0x12ae7c(0x192)](_0x1c316b);if(_0x7d8e00[_0x12ae7c(0x26d)]===0x0){console[_0x12ae7c(0x51d)](_0x3e68af+_0x4c6262(_0x14f1a4[_0x12ae7c(0x1ab)],'{}'));return;}const _0x40870c=Math[_0x12ae7c(0x370)](0x1c,Math['max'](..._0x7d8e00['map'](([_0x274157])=>_0x274157['length'])));for(const [_0x3bd072,_0x289ab7]of _0x7d8e00){const _0x277452=_0x4c6262(_0x14f1a4[_0x12ae7c(0x460)],_0x3bd072[_0x12ae7c(0x3df)](_0x40870c));if(_0x289ab7===null||_0x289ab7===undefined)console[_0x12ae7c(0x51d)](_0x3e68af+_0x277452+'\x20\x20'+_0x4c6262(_0x14f1a4[_0x12ae7c(0x1ab)],_0x12ae7c(0x50d)));else{if(typeof _0x289ab7===_0x12ae7c(0x2c0)){const _0x92ea01=JSON['stringify'](_0x289ab7);_0x92ea01[_0x12ae7c(0x26d)]<=0x50?console[_0x12ae7c(0x51d)](_0x3e68af+_0x277452+'\x20\x20'+_0x4c6262(_0x14f1a4[_0x12ae7c(0x1ab)],_0x92ea01)):(console['log'](_0x3e68af+_0x277452),_0x2fc5c7(_0x289ab7,_0x3e68af+'\x20\x20'));}else{const _0x292438=typeof _0x289ab7===_0x12ae7c(0x3bd)?_0x4c6262(_0x289ab7?_0x14f1a4[_0x12ae7c(0x2ff)]:_0x14f1a4[_0x12ae7c(0x3b5)],String(_0x289ab7)):typeof _0x289ab7===_0x12ae7c(0x56a)?_0x4c6262(_0x14f1a4[_0x12ae7c(0x444)],String(_0x289ab7)):_0x4c6262(_0x14f1a4[_0x12ae7c(0x20d)],String(_0x289ab7));console[_0x12ae7c(0x51d)](_0x3e68af+_0x277452+'\x20\x20'+_0x292438);}}}}function _0x1175fd(_0x4bba4e,_0x429374=''){const _0x41bcf8=_0x232606,_0x22fcd3=Math[_0x41bcf8(0x370)](0x20,Math['max'](..._0x4bba4e[_0x41bcf8(0x32d)](_0x2e11aa=>String(_0x2e11aa[_0x41bcf8(0x4ff)])['length'])));for(const {key:_0x4ca414,value:_0x430b04,score:_0x14973a,clock:_0x20e726}of _0x4bba4e){const _0x1c8682=_0x4c6262(_0x14f1a4[_0x41bcf8(0x465)]+_0x14f1a4['cyan'],String(_0x4ca414)[_0x41bcf8(0x3df)](_0x22fcd3)),_0x46f947=_0x430b04==null?_0x4c6262(_0x14f1a4[_0x41bcf8(0x1ab)],'null'):typeof _0x430b04===_0x41bcf8(0x2c0)?_0x4c6262(_0x14f1a4[_0x41bcf8(0x1ab)],JSON[_0x41bcf8(0x536)](_0x430b04)):_0x4c6262(_0x14f1a4[_0x41bcf8(0x20d)],String(_0x430b04)),_0xcde322=_0x14973a!=null?_0x4c6262(_0x14f1a4[_0x41bcf8(0x4d9)],_0x41bcf8(0x3a4)+_0x14973a[_0x41bcf8(0x365)](0x4)):'',_0x1ebe06=_0x20e726!=null?_0x4c6262(_0x14f1a4[_0x41bcf8(0x4d9)],_0x41bcf8(0x52a)+_0x20e726):'';console[_0x41bcf8(0x51d)](_0x429374+_0x1c8682+'\x20\x20'+_0x46f947+_0xcde322+_0x1ebe06);}}function _0x4e81d2(_0x3819c9,_0x3df0e0=''){const _0x4a3e71=_0x232606,_0x227c56=Math[_0x4a3e71(0x370)](0x20,Math[_0x4a3e71(0x5e4)](..._0x3819c9['map'](_0x1a7014=>_0x1a7014[_0x4a3e71(0x57e)][_0x4a3e71(0x26d)])));for(const {type:_0x385b56,count:_0x4163c0,fields:_0x5927fb}of _0x3819c9){if(_0x385b56[_0x4a3e71(0x2e2)]('~'))continue;const _0x18c4af=_0x4c6262(_0x14f1a4['bold']+_0x14f1a4[_0x4a3e71(0x460)],_0x385b56[_0x4a3e71(0x3df)](_0x227c56)),_0x10741c=_0x4c6262(_0x14f1a4[_0x4a3e71(0x444)],String(_0x4163c0)[_0x4a3e71(0x4f2)](0x6))+_0x4c6262(_0x14f1a4[_0x4a3e71(0x1ab)],_0x4a3e71(0x2be)),_0x36961a=_0x5927fb&&Object[_0x4a3e71(0x4b0)](_0x5927fb)[_0x4a3e71(0x26d)]?_0x4c6262(_0x14f1a4[_0x4a3e71(0x1ab)],'\x20\x20·\x20'+Object['keys'](_0x5927fb)['slice'](0x0,0x6)[_0x4a3e71(0x25d)](',\x20')+(Object[_0x4a3e71(0x4b0)](_0x5927fb)[_0x4a3e71(0x26d)]>0x6?'…':'')):'';console[_0x4a3e71(0x51d)](_0x3df0e0+_0x18c4af+'\x20\x20'+_0x10741c+_0x36961a);}}const _0x5562fa=[_0x232606(0x22f),_0x232606(0x1df),_0x232606(0x40d),'files/','transaction',_0x232606(0x180)];function _0x304f78(_0x45e73c,_0xb9fc7d){const _0x5cac39=_0x232606;if(_0x45e73c[_0x5cac39(0x2e2)](_0x5cac39(0x4fc)))return _0x45e73c;if(_0x45e73c[_0x5cac39(0x2e2)]('/'))return _0x5cac39(0x605)+_0x45e73c;if(_0x45e73c[_0x5cac39(0x2e2)](_0x5cac39(0x3b4)))return'/api/'+_0x45e73c;const _0x279515=_0x5562fa[_0x5cac39(0x199)](_0x3dc2d3=>_0x45e73c===_0x3dc2d3[_0x5cac39(0x197)](/\/$/,'')||_0x45e73c[_0x5cac39(0x2e2)](_0x3dc2d3));return _0x279515?'/api/env/'+_0xb9fc7d+'/'+_0x45e73c:_0x5cac39(0x4fc)+_0x45e73c;}function _0x23c07c(_0x6b1a64){const _0x428c48=_0x232606,_0x2b32d5={},_0x2ab384=[];let _0x5c0e5c=0x0;while(_0x5c0e5c<_0x6b1a64[_0x428c48(0x26d)]){if((_0x6b1a64[_0x5c0e5c]===_0x428c48(0x207)||_0x6b1a64[_0x5c0e5c]==='-e')&&_0x6b1a64[_0x5c0e5c+0x1]&&!_0x6b1a64[_0x5c0e5c+0x1][_0x428c48(0x2e2)]('-'))_0x2b32d5['env']=_0x6b1a64[++_0x5c0e5c];else _0x6b1a64[_0x5c0e5c]==='--help'||_0x6b1a64[_0x5c0e5c]==='-h'?_0x2b32d5[_0x428c48(0x339)]=!![]:_0x2ab384[_0x428c48(0x232)](_0x6b1a64[_0x5c0e5c]);_0x5c0e5c++;}return{'flags':_0x2b32d5,'rest':_0x2ab384};}const _0x4d4507={'system':_0x232606(0x491),'envs':_0x232606(0x22c),'types':'Types','data':_0x232606(0x608),'indexes':_0x232606(0x3f0),'fts':'Full-text\x20search','sync':_0x232606(0x569),'queue':'Queue','files':'Files','embeddings':_0x232606(0x158),'engines':_0x232606(0x28c),'admin':_0x232606(0x1f3),'event':_0x232606(0x52d),'processor':_0x232606(0x39b)},_0x569c43=[_0x232606(0x392),_0x232606(0x5b0),'types',_0x232606(0x317),_0x232606(0x383),_0x232606(0x31a),_0x232606(0x54f),_0x232606(0x490),'files',_0x232606(0x5bc),_0x232606(0x5b4),_0x232606(0x480)];function _0x10b287(_0x3d9107){const _0x118d03=_0x232606;return _0x3d9107[_0x118d03(0x197)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x118d03(0x28d))['replace'](/^\/env\/:env/,_0x118d03(0x225))[_0x118d03(0x197)](/^\//,'');}function _0x444150(_0x463c15,_0x39f82e=''){const _0x53156c=_0x232606,_0x43b727=_0x463c15[_0x53156c(0x309)][_0x53156c(0x3f8)]()[_0x53156c(0x49f)](_0x1317b8=>!_0x1317b8[_0x53156c(0x1a8)]?.[_0x53156c(0x34f)]),_0x2d633d=_0x39f82e?_0x43b727['filter'](_0x566bb5=>_0x566bb5[_0x53156c(0x15d)][_0x53156c(0x454)]()['includes'](_0x39f82e[_0x53156c(0x454)]())||(_0x2bcadb(_0x566bb5)??'')['toLowerCase']()[_0x53156c(0x48a)](_0x39f82e['toLowerCase']())||_0x4f37ce(_0x566bb5)[_0x53156c(0x199)](_0x1faaee=>_0x1faaee[_0x53156c(0x454)]()['includes'](_0x39f82e[_0x53156c(0x454)]()))):_0x43b727;if(!_0x2d633d[_0x53156c(0x26d)]){console[_0x53156c(0x51d)](_0x4c6262(_0x14f1a4[_0x53156c(0x3b5)],_0x53156c(0x321)+_0x39f82e+'\x22\x0a'));return;}const _0x5122bb=new Map();for(const _0x4c8478 of _0x2d633d){const _0x4ab0b9=_0x4f37ce(_0x4c8478)[0x0]??_0x53156c(0x1ef);if(!_0x5122bb[_0x53156c(0x503)](_0x4ab0b9))_0x5122bb[_0x53156c(0x1e5)](_0x4ab0b9,[]);_0x5122bb[_0x53156c(0x242)](_0x4ab0b9)['push'](_0x4c8478);}const _0x593493=[..._0x569c43[_0x53156c(0x49f)](_0x5bfd4a=>_0x5122bb['has'](_0x5bfd4a)),...[..._0x5122bb['keys']()][_0x53156c(0x49f)](_0x4da420=>!_0x569c43[_0x53156c(0x48a)](_0x4da420))];console[_0x53156c(0x51d)]('');for(const _0x1192bf of _0x593493){const _0x3f2230=_0x5122bb[_0x53156c(0x242)](_0x1192bf);if(!_0x3f2230?.['length'])continue;console[_0x53156c(0x51d)](_0x4c6262(_0x14f1a4[_0x53156c(0x465)],'\x20\x20'+(_0x4d4507[_0x1192bf]??_0x1192bf)));for(const _0x4f8894 of _0x3f2230){const _0x115b09=_0x4c6262(_0x14f1a4[_0x53156c(0x444)],_0x4f8894['method'][_0x53156c(0x3df)](0x7)),_0x5582e8=_0x4c6262(_0x14f1a4[_0x53156c(0x460)],_0x10b287(_0x4f8894[_0x53156c(0x15d)])),_0x3564df=_0x2bcadb(_0x4f8894)?_0x4c6262(_0x14f1a4[_0x53156c(0x1ab)],'\x20\x20'+_0x2bcadb(_0x4f8894)):'',_0x343e73=_0x4f8894[_0x53156c(0x2ef)]?.['id']?_0x4c6262(_0x14f1a4['gray'],_0x53156c(0x26e)+_0x4f8894['operation']['id']+']'):'';console['log'](_0x53156c(0x5fb)+_0x115b09+'\x20'+_0x5582e8+_0x3564df+_0x343e73);}console[_0x53156c(0x51d)]('');}}function _0x56e8ac(_0x3746a3,_0x3b8d60){const _0x190b1f=_0x232606,_0x1eb6a6=_0x3b8d60[_0x190b1f(0x197)](/^\/api(\/env\/[^/]+)?\//,'')[_0x190b1f(0x56e)]('/')[0x0],_0x12f295=_0x3746a3['http'][_0x190b1f(0x3f8)]()['filter'](_0x1a903f=>_0x1a903f['path'][_0x190b1f(0x454)]()['includes'](_0x1eb6a6[_0x190b1f(0x454)]()));if(!_0x12f295[_0x190b1f(0x26d)]){console['log'](_0x4c6262(_0x14f1a4[_0x190b1f(0x3b5)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x3b8d60+'\x0a'));return;}console[_0x190b1f(0x51d)]('');for(const _0x4c2b17 of _0x12f295['slice'](0x0,0xc)){for(const _0x103697 of _0x1dc6e1(_0x4c2b17)){console[_0x190b1f(0x51d)](_0x103697);}console['log']('');}}function _0x2bcadb(_0x5830ba){const _0x2a6004=_0x232606;return _0x5830ba[_0x2a6004(0x2ef)]?.[_0x2a6004(0x213)]??_0x5830ba[_0x2a6004(0x1a8)]?.['summary']??'';}function _0x31f87b(_0x54152f){const _0x255dd9=_0x232606;return _0x54152f[_0x255dd9(0x2ef)]?.['description']??_0x54152f[_0x255dd9(0x1a8)]?.['description']??'';}function _0x4f37ce(_0x1145e4){const _0x39655b=_0x232606;return _0x1145e4[_0x39655b(0x2ef)]?.[_0x39655b(0x364)]?.[_0x39655b(0x26d)]?_0x1145e4['operation'][_0x39655b(0x364)]:_0x1145e4[_0x39655b(0x1a8)]?.[_0x39655b(0x364)]??[];}function _0x1dc6e1(_0x5ca511){const _0x2bf7a2=_0x232606,_0x1bc202=[];_0x1bc202['push']('\x20\x20'+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x465)]+_0x14f1a4[_0x2bf7a2(0x444)],_0x5ca511[_0x2bf7a2(0x348)][_0x2bf7a2(0x3df)](0x7))+'\x20'+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x465)]+_0x14f1a4[_0x2bf7a2(0x460)],_0x5ca511['path']));_0x5ca511[_0x2bf7a2(0x2ef)]?.['id']&&_0x1bc202[_0x2bf7a2(0x232)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4c6262(_0x14f1a4['gray'],_0x2bf7a2(0x2f1)+_0x5ca511['operation']['id']));_0x2bcadb(_0x5ca511)&&_0x1bc202[_0x2bf7a2(0x232)](_0x2bf7a2(0x4d7)+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x20d)],_0x2bcadb(_0x5ca511)));_0x31f87b(_0x5ca511)&&_0x1bc202['push'](_0x2bf7a2(0x4d7)+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x1ab)],_0x31f87b(_0x5ca511)));_0x4f37ce(_0x5ca511)[_0x2bf7a2(0x26d)]&&_0x1bc202['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4c6262(_0x14f1a4['gray'],_0x2bf7a2(0x1dd)+_0x4f37ce(_0x5ca511)[_0x2bf7a2(0x25d)](',\x20')));_0x5ca511[_0x2bf7a2(0x2ef)]?.[_0x2bf7a2(0x5ec)]?.[_0x2bf7a2(0x3af)]&&_0x1bc202['push'](_0x2bf7a2(0x4d7)+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x4d9)],_0x2bf7a2(0x1cf)+_0x5ca511[_0x2bf7a2(0x2ef)]['safety']['access']));_0x5ca511[_0x2bf7a2(0x2ef)]?.[_0x2bf7a2(0x309)]?.[_0x2bf7a2(0x36a)]&&_0x5ca511[_0x2bf7a2(0x2ef)]['http'][_0x2bf7a2(0x36a)]!==_0x2bf7a2(0x1b6)&&_0x1bc202[_0x2bf7a2(0x232)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x4d9)],_0x2bf7a2(0x351)+_0x5ca511[_0x2bf7a2(0x2ef)][_0x2bf7a2(0x309)][_0x2bf7a2(0x36a)]));if(_0x5ca511[_0x2bf7a2(0x2ef)]?.[_0x2bf7a2(0x430)]){const _0x1e8e29=Object[_0x2bf7a2(0x4b0)](_0x5ca511['operation'][_0x2bf7a2(0x430)][_0x2bf7a2(0x4d0)]||{});if(_0x1e8e29[_0x2bf7a2(0x26d)])_0x1bc202['push'](_0x2bf7a2(0x4d7)+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x4d9)],_0x2bf7a2(0x342)+_0x1e8e29[_0x2bf7a2(0x25d)](',\x20')));}return _0x5ca511[_0x2bf7a2(0x1a8)]?.[_0x2bf7a2(0x5d6)]&&_0x1bc202[_0x2bf7a2(0x232)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4c6262(_0x14f1a4[_0x2bf7a2(0x4d9)],'body:\x20'+JSON[_0x2bf7a2(0x536)](_0x5ca511[_0x2bf7a2(0x1a8)][_0x2bf7a2(0x5d6)]))),_0x1bc202;}async function _0x5d9c81(_0x4c48cc,_0x124b5a,_0xc06c3,_0x2cbf5c=null){const _0x47510a=_0x232606,_0x3857a4=_0xc06c3[_0x47510a(0x1fa)]('?'),_0x44c168=_0x3857a4>=0x0?_0xc06c3[_0x47510a(0x195)](0x0,_0x3857a4):_0xc06c3,_0x188599=_0x3857a4>=0x0?_0xc06c3[_0x47510a(0x195)](_0x3857a4+0x1):'',_0x16780f=Object[_0x47510a(0x1b8)](new URLSearchParams(_0x188599)[_0x47510a(0x192)]());return _0x4c48cc[_0x47510a(0x309)][_0x47510a(0x4d1)](_0x124b5a,_0x44c168,{'body':_0x2cbf5c,'query':_0x16780f,'headers':{'content-type':_0x47510a(0x396)}},{'internal':!![]});}function _0x1d8152(_0x37b6cb){const _0x3e28d7=_0x232606;if(!_0x37b6cb)return null;const _0x25f802=_0x37b6cb[_0x3e28d7(0x288)]();if(!_0x25f802)return null;try{return JSON[_0x3e28d7(0x519)](_0x25f802);}catch{}try{return JSON[_0x3e28d7(0x519)](_0x975efc(_0x25f802));}catch(_0x44185c){throw new SyntaxError(_0x44185c[_0x3e28d7(0x408)],{'cause':_0x44185c});}}function _0x975efc(_0x48d404){const _0x92fa05=_0x232606;let _0x2d6175='',_0x140f55=0x0;while(_0x140f55<_0x48d404['length']){const _0x413875=_0x48d404[_0x140f55];if(_0x413875==='\x22'){_0x2d6175+='\x22',_0x140f55++;while(_0x140f55<_0x48d404['length']&&_0x48d404[_0x140f55]!=='\x22'){if(_0x48d404[_0x140f55]==='\x5c'){_0x2d6175+=_0x48d404[_0x140f55++];if(_0x140f55<_0x48d404[_0x92fa05(0x26d)])_0x2d6175+=_0x48d404[_0x140f55++];}else _0x2d6175+=_0x48d404[_0x140f55++];}_0x2d6175+='\x22';if(_0x140f55<_0x48d404[_0x92fa05(0x26d)])_0x140f55++;continue;}if(_0x413875==='\x27'){_0x2d6175+='\x22',_0x140f55++;while(_0x140f55<_0x48d404['length']&&_0x48d404[_0x140f55]!=='\x27'){if(_0x48d404[_0x140f55]==='\x5c'&&_0x48d404[_0x140f55+0x1]==='\x27')_0x2d6175+='\x27',_0x140f55+=0x2;else _0x48d404[_0x140f55]==='\x22'?(_0x2d6175+='\x5c\x22',_0x140f55++):_0x2d6175+=_0x48d404[_0x140f55++];}_0x2d6175+='\x22';if(_0x140f55<_0x48d404[_0x92fa05(0x26d)])_0x140f55++;continue;}if(_0x92fa05(0x5a0)[_0x92fa05(0x48a)](_0x413875)){_0x2d6175+=_0x413875,_0x140f55++;continue;}let _0x1e006d='';while(_0x140f55<_0x48d404[_0x92fa05(0x26d)]&&!_0x92fa05(0x299)['includes'](_0x48d404[_0x140f55])&&_0x48d404[_0x140f55]!=='\x20'&&_0x48d404[_0x140f55]!=='\x09'&&_0x48d404[_0x140f55]!=='\x0a'&&_0x48d404[_0x140f55]!=='\x0d'){_0x1e006d+=_0x48d404[_0x140f55++];}let _0x65b87d=_0x140f55;while(_0x65b87d<_0x48d404[_0x92fa05(0x26d)]&&(_0x48d404[_0x65b87d]==='\x20'||_0x48d404[_0x65b87d]==='\x09'))_0x65b87d++;if(_0x48d404[_0x65b87d]===':')_0x2d6175+='\x22'+_0x1e006d+'\x22';else _0x1e006d===_0x92fa05(0x373)||_0x1e006d==='false'||_0x1e006d===_0x92fa05(0x50d)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x92fa05(0x4c0)](_0x1e006d)?_0x2d6175+=_0x1e006d:_0x2d6175+='\x22'+_0x1e006d+'\x22';}return _0x2d6175[_0x92fa05(0x197)](/,(\s*[}\]])/g,'$1');}function _0x47b145(_0x9f8a27){const _0x17418b=_0x232606,_0x3e9682=[];let _0x52f475=0x0;while(_0x52f475<_0x9f8a27[_0x17418b(0x26d)]){while(_0x52f475<_0x9f8a27[_0x17418b(0x26d)]&&(_0x9f8a27[_0x52f475]==='\x20'||_0x9f8a27[_0x52f475]==='\x09'))_0x52f475++;if(_0x52f475>=_0x9f8a27[_0x17418b(0x26d)])break;const _0x4bc7a2=_0x9f8a27[_0x52f475];if(_0x4bc7a2==='{'||_0x4bc7a2==='['){const _0x3fe634=_0x4bc7a2==='{'?'}':']',_0x47de0b=_0x52f475++;let _0x4c2f95=0x1,_0x2b60b8=![],_0x5e1849='';while(_0x52f475<_0x9f8a27[_0x17418b(0x26d)]&&_0x4c2f95>0x0){const _0x297317=_0x9f8a27[_0x52f475];if(_0x2b60b8){if(_0x297317==='\x5c')_0x52f475++;else{if(_0x297317===_0x5e1849)_0x2b60b8=![];}}else{if(_0x297317==='\x22'||_0x297317==='\x27')_0x2b60b8=!![],_0x5e1849=_0x297317;else{if(_0x297317===_0x4bc7a2)_0x4c2f95++;else{if(_0x297317===_0x3fe634)_0x4c2f95--;}}}_0x52f475++;}_0x3e9682[_0x17418b(0x232)](_0x9f8a27[_0x17418b(0x195)](_0x47de0b,_0x52f475));continue;}if(_0x4bc7a2==='\x22'||_0x4bc7a2==='\x27'){const _0x53c6a4=_0x4bc7a2;_0x52f475++;let _0x2cd5fa='';while(_0x52f475<_0x9f8a27[_0x17418b(0x26d)]&&_0x9f8a27[_0x52f475]!==_0x53c6a4){if(_0x9f8a27[_0x52f475]==='\x5c'&&_0x52f475+0x1<_0x9f8a27[_0x17418b(0x26d)])_0x52f475++,_0x2cd5fa+=_0x9f8a27[_0x52f475++];else _0x2cd5fa+=_0x9f8a27[_0x52f475++];}if(_0x52f475<_0x9f8a27[_0x17418b(0x26d)])_0x52f475++;_0x3e9682['push'](_0x2cd5fa);continue;}let _0x787b59='';while(_0x52f475<_0x9f8a27[_0x17418b(0x26d)]&&_0x9f8a27[_0x52f475]!=='\x20'&&_0x9f8a27[_0x52f475]!=='\x09'&&_0x9f8a27[_0x52f475]!=='{'&&_0x9f8a27[_0x52f475]!=='['){_0x787b59+=_0x9f8a27[_0x52f475++];}if(_0x787b59)_0x3e9682[_0x17418b(0x232)](_0x787b59);}return _0x3e9682;}function _0x32b7b5(_0x44935b,_0xc51d09){const _0xe36c7f=_0x232606,_0x1530d0=[..._0x44935b[_0xe36c7f(0x40a)]['keys']()][_0xe36c7f(0x49f)](_0x18e4f1=>!_0x18e4f1[_0xe36c7f(0x2e2)]('~'));console[_0xe36c7f(0x51d)](['',_0x4c6262(_0x14f1a4['bold']+_0x14f1a4[_0xe36c7f(0x460)],_0xe36c7f(0x165)),_0x4c6262(_0x14f1a4['bold']+_0x14f1a4['cyan'],_0xe36c7f(0x3ce))+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x302))+_0x4c6262(_0x14f1a4['bold']+_0x14f1a4[_0xe36c7f(0x460)],'║'),_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)]+_0x14f1a4[_0xe36c7f(0x460)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x2ff)],'✓')+'\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],'server')+_0xe36c7f(0x17f)+_0xc51d09[_0xe36c7f(0x345)],..._0xc51d09[_0xe36c7f(0x16d)]>0x1?['\x20\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x2ff)],'✓')+'\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x5a3))+'\x20'+_0xc51d09[_0xe36c7f(0x16d)]+_0xe36c7f(0x3f3)+_0x4c6262(_0x14f1a4['gray'],_0xe36c7f(0x4cc))]:[],'\x20\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x2ff)],'✓')+'\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x226))+_0xe36c7f(0x1e3)+_0xc51d09[_0xe36c7f(0x345)]+'/api','\x20\x20'+_0x4c6262(_0x14f1a4['green'],'✓')+'\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x15d))+_0xe36c7f(0x5fb)+_0xc51d09['dbPath'],'\x20\x20'+_0x4c6262(_0x14f1a4['green'],'✓')+'\x20'+_0x4c6262(_0x14f1a4['bold'],'id')+_0xe36c7f(0x5a4)+_0x4c6262(_0x14f1a4[_0xe36c7f(0x4d9)],_0x44935b['id']),'\x20\x20'+_0x4c6262(_0x14f1a4['green'],'✓')+'\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x5b0))+_0xe36c7f(0x5fb)+_0x1530d0['map'](_0x49d8f9=>_0x4c6262(_0x14f1a4[_0xe36c7f(0x460)],_0x49d8f9))['join']('\x20\x20'),..._0xc51d09[_0xe36c7f(0x58e)]?[]:['\x20\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x2ff)],'✓')+'\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],'admin')+_0xe36c7f(0x4d2)+_0xc51d09[_0xe36c7f(0x345)]+_0xe36c7f(0x362)],'',_0x4c6262(_0x14f1a4[_0xe36c7f(0x1ab)],'\x20\x20Type\x20'+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x339))+_0xe36c7f(0x59f)+_0x4c6262(_0x14f1a4[_0xe36c7f(0x465)],_0xe36c7f(0x4a2))+_0xe36c7f(0x173)+_0x4c6262(_0x14f1a4['bold'],_0xe36c7f(0x185))+_0xe36c7f(0x5b7)),'']['join']('\x0a'));}function _0x61c99d(_0x21d1bc){const _0x24d6a8=_0x232606;console[_0x24d6a8(0x51d)]('\x0a'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x465)],_0x24d6a8(0x4ef))+'\x20\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0x24d6a8(0x183)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],_0x24d6a8(0x1b7))+_0x24d6a8(0x1a4)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],'<path>')+'\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x3b5)],'<json-body>')+_0x24d6a8(0x355)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],_0x24d6a8(0x4ce))+'\x20'+_0x4c6262(_0x14f1a4['cyan'],_0x24d6a8(0x1b7))+'\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x3b5)],_0x24d6a8(0x4fb))+_0x24d6a8(0x366)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],_0x24d6a8(0x52f))+'\x0a\x20\x20\x20\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x619))+_0x24d6a8(0x42a)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x5b0))+_0x24d6a8(0x562)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x22f))+_0x24d6a8(0x3f9)+_0x21d1bc['env']+_0x24d6a8(0x538)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x3e4))+_0x24d6a8(0x2c4)+_0x21d1bc['env']+_0x24d6a8(0x4ec)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],'type/users/item/alice')+_0x24d6a8(0x221)+_0x21d1bc[_0x24d6a8(0x162)]+_0x24d6a8(0x368)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x1f8))+_0x24d6a8(0x266)+_0x21d1bc[_0x24d6a8(0x162)]+_0x24d6a8(0x172)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+'\x0a\x20\x20\x20\x20'+_0x4c6262(_0x14f1a4['gray'],'DELETE\x20type/users/item/x')+_0x24d6a8(0x435)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x1c4))+_0x24d6a8(0x19b)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x465)],_0x24d6a8(0x421))+'\x20\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],_0x24d6a8(0x4b2))+_0x24d6a8(0x183)+_0x4c6262(_0x14f1a4['cyan'],_0x24d6a8(0x164))+_0x24d6a8(0x37b)+_0x4c6262(_0x14f1a4['cyan'],_0x24d6a8(0x1e8))+'\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'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],'Examples')+_0x24d6a8(0x435)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x304))+_0x24d6a8(0x435)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x4d9)],_0x24d6a8(0x588))+_0x24d6a8(0x435)+_0x4c6262(_0x14f1a4['gray'],_0x24d6a8(0x4b3))+'\x0a\x0a'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x465)],_0x24d6a8(0x30c))+_0x24d6a8(0x183)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],_0x24d6a8(0x42f))+_0x24d6a8(0x5a8)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],_0x24d6a8(0x162))+'\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'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],_0x24d6a8(0x4a2))+'\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],_0x24d6a8(0x610))+_0x24d6a8(0x2b5)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],'logs')+'\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],'[on|off|level]')+_0x24d6a8(0x2d2)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],'open')+_0x24d6a8(0x40f)+_0x4c6262(_0x14f1a4['cyan'],_0x24d6a8(0x339))+_0x24d6a8(0x268)+_0x4c6262(_0x14f1a4[_0x24d6a8(0x460)],_0x24d6a8(0x185))+'\x20'+_0x4c6262(_0x14f1a4[_0x24d6a8(0x1ab)],'/\x20quit\x20/\x20Ctrl+C')+_0x24d6a8(0x4e9));}let _0x343892=![];async function _0x17f6c0(_0xe82b96,_0xf1e6fe=0x0,_0x2fa82f=null){const _0x279a18=_0x232606;_0x343892&&(process[_0x279a18(0x545)][_0x279a18(0x478)](_0x4c6262(_0x14f1a4['red'],_0x279a18(0x1d1))),process['exit'](0x82));_0x343892=!![],process[_0x279a18(0x1a0)]['write']('\x0a'),process[_0x279a18(0x545)]['write'](_0x4c6262(_0x14f1a4['yellow'],'\x20\x20[okdb]\x20'+(_0x2fa82f?_0x279a18(0x5d1)+_0x2fa82f+',\x20':'')+_0x279a18(0x217)));const _0x59be2c=setTimeout(()=>{const _0x582371=_0x279a18;process[_0x582371(0x545)][_0x582371(0x478)](_0x4c6262(_0x14f1a4[_0x582371(0x3ad)],_0x582371(0x1e4))),process[_0x582371(0x185)](0x1);},0x1388);try{await _0xe82b96['close']();}catch(_0x507176){console[_0x279a18(0x4d4)](_0x4c6262(_0x14f1a4[_0x279a18(0x3ad)],'\x20\x20'+_0x507176[_0x279a18(0x408)]));}clearTimeout(_0x59be2c),process[_0x279a18(0x545)]['write'](_0x4c6262(_0x14f1a4['dim'],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x279a18(0x185)](_0xf1e6fe);}function _0x1baf12(_0x4096f6){const _0xb4e9b0=_0x232606,_0xc6be64=_0x4096f6[_0xb4e9b0(0x162)]!=='default'?_0x4c6262(_0x14f1a4[_0xb4e9b0(0x3b5)],'['+_0x4096f6[_0xb4e9b0(0x162)]+']'):'';return _0x4c6262(_0x14f1a4[_0xb4e9b0(0x465)]+_0x14f1a4['cyan'],_0xb4e9b0(0x3c8))+_0xc6be64+_0x4c6262(_0x14f1a4[_0xb4e9b0(0x4d9)],'>\x20');}const _0x554dc5=new Set(['GET',_0x232606(0x54b),_0x232606(0x334),_0x232606(0x26b),'DELETE']);async function _0x2f5b49(_0x387e5d,_0x56f39d,_0x8d04e4,_0x1f7ddd,_0x5d1060,_0x2055f0){const _0x4e33d5=_0x232606;_0x387e5d=_0x387e5d[_0x4e33d5(0x288)]();if(!_0x387e5d||_0x387e5d[_0x4e33d5(0x2e2)]('#'))return;const _0x49be55=_0x47b145(_0x387e5d),{flags:_0x1fc68d,rest:_0x3b869f}=_0x23c07c(_0x49be55);if(!_0x3b869f[_0x4e33d5(0x26d)])return;const _0x5b9611=_0x3b869f[0x0],_0x126e5b=_0x5b9611[_0x4e33d5(0x233)]();if(_0x126e5b==='HELP'){if(_0x3b869f[0x1])_0x56e8ac(_0x56f39d,_0x304f78(_0x3b869f[0x1],_0x1fc68d[_0x4e33d5(0x162)]??_0x5d1060['env']));else _0x61c99d(_0x5d1060);return;}if(_0x126e5b===_0x4e33d5(0x514)){const _0x494bb1=_0x3b869f[0x1];if(!_0x494bb1){console[_0x4e33d5(0x51d)](_0x4c6262(_0x14f1a4['red'],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x56f39d['env'](_0x494bb1),_0x5d1060[_0x4e33d5(0x162)]=_0x494bb1,_0x2055f0?.[_0x4e33d5(0x38a)](_0x1baf12(_0x5d1060)),console['log'](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x2ff)],'✓')+_0x4e33d5(0x2ed)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x465)]+_0x14f1a4[_0x4e33d5(0x460)],_0x494bb1)+'\x0a');}catch{console[_0x4e33d5(0x51d)](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x3ad)],'✗')+_0x4e33d5(0x2cc)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x465)],_0x494bb1)+_0x4e33d5(0x54a)+_0x4c6262(_0x14f1a4['dim'],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x126e5b==='ENV'){const _0x5278dd=[..._0x56f39d[_0x4e33d5(0x40a)][_0x4e33d5(0x4b0)]()][_0x4e33d5(0x49f)](_0x1e131f=>!_0x1e131f[_0x4e33d5(0x2e2)]('~'));console[_0x4e33d5(0x51d)]('');for(const _0x290246 of _0x5278dd){const _0x36fbb3=_0x290246===_0x5d1060[_0x4e33d5(0x162)];console[_0x4e33d5(0x51d)]('\x20\x20'+(_0x36fbb3?_0x4c6262(_0x14f1a4['green'],'●'):_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],'○'))+'\x20\x20'+(_0x36fbb3?_0x4c6262(_0x14f1a4[_0x4e33d5(0x465)]+_0x14f1a4[_0x4e33d5(0x460)],_0x290246):_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],_0x290246)));}console['log'](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],'active:')+'\x20'+_0x4c6262(_0x14f1a4[_0x4e33d5(0x460)],_0x5d1060['env'])),console[_0x4e33d5(0x51d)]('');return;}if(_0x126e5b===_0x4e33d5(0x601)){const _0x5a7787=[..._0x56f39d['_envs'][_0x4e33d5(0x3fc)]()][_0x4e33d5(0x49f)](_0x4d30d3=>!_0x4d30d3[_0x4e33d5(0x60c)][_0x4e33d5(0x2e2)]('~'));console[_0x4e33d5(0x51d)]('');const _0x53fcd8=Math[_0x4e33d5(0x5e4)](..._0x5a7787[_0x4e33d5(0x32d)](_0x12d8b8=>_0x12d8b8['name'][_0x4e33d5(0x26d)]));for(const _0xa995e of _0x5a7787){const _0x1c8845=_0xa995e['name']===_0x5d1060['env'],_0x46dd00=_0x1c8845?_0x4c6262(_0x14f1a4['green'],'●'):_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],'○'),_0x3f0d1b=_0x1c8845?_0x4c6262(_0x14f1a4[_0x4e33d5(0x465)]+_0x14f1a4[_0x4e33d5(0x460)],_0xa995e['name'][_0x4e33d5(0x3df)](_0x53fcd8)):_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],_0xa995e[_0x4e33d5(0x60c)][_0x4e33d5(0x3df)](_0x53fcd8)),_0x2dc994=[..._0xa995e[_0x4e33d5(0x380)][_0x4e33d5(0x4b0)]()]['filter'](_0x543d10=>!_0x543d10[_0x4e33d5(0x2e2)]('~')),_0x523033=_0x2dc994[_0x4e33d5(0x26d)]?_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],_0x2dc994[_0x4e33d5(0x195)](0x0,0x5)[_0x4e33d5(0x25d)](',\x20')+(_0x2dc994['length']>0x5?_0x4e33d5(0x2e4)+(_0x2dc994[_0x4e33d5(0x26d)]-0x5)+_0x4e33d5(0x2f3):'')):_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],_0x4e33d5(0x439));console[_0x4e33d5(0x51d)]('\x20\x20'+_0x46dd00+'\x20\x20'+_0x3f0d1b+'\x20\x20'+_0x523033);}console[_0x4e33d5(0x51d)]('');return;}if(_0x126e5b===_0x4e33d5(0x163)){const _0x379846=_0x1fc68d[_0x4e33d5(0x162)]??_0x3b869f[0x1]??_0x5d1060[_0x4e33d5(0x162)];try{const _0x2e92f5=_0x56f39d[_0x4e33d5(0x162)](_0x379846),_0x42f0b0=[..._0x2e92f5[_0x4e33d5(0x380)][_0x4e33d5(0x4b0)]()][_0x4e33d5(0x49f)](_0x31c55e=>!_0x31c55e[_0x4e33d5(0x2e2)]('~'))['sort']();console[_0x4e33d5(0x51d)](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],_0x42f0b0[_0x4e33d5(0x26d)]+_0x4e33d5(0x54d)+(_0x42f0b0[_0x4e33d5(0x26d)]!==0x1?'s':'')+'\x20in\x20'+_0x379846));for(const _0x443d4a of _0x42f0b0){const _0x4b6e90=_0x2e92f5['typeSubDbs'][_0x4e33d5(0x242)](_0x443d4a),_0x3f0052=_0x4b6e90?.[_0x4e33d5(0x317)]?.[_0x4e33d5(0x278)]?.()??0x0,_0x46ba56=_0x4c6262(_0x14f1a4[_0x4e33d5(0x465)]+_0x14f1a4[_0x4e33d5(0x460)],_0x443d4a[_0x4e33d5(0x3df)](0x1c));console['log']('\x20\x20\x20\x20'+_0x46ba56+'\x20\x20'+_0x4c6262(_0x14f1a4[_0x4e33d5(0x444)],String(_0x3f0052)[_0x4e33d5(0x4f2)](0x6))+'\x20'+_0x4c6262(_0x14f1a4['dim'],_0x4e33d5(0x21e)));}console[_0x4e33d5(0x51d)]('');}catch(_0x479c32){console[_0x4e33d5(0x4d4)](_0x4c6262(_0x14f1a4[_0x4e33d5(0x3ad)],_0x4e33d5(0x3ea)+_0x479c32['message']+'\x0a'));}return;}if(_0x126e5b===_0x4e33d5(0x1ed)){_0x444150(_0x56f39d,_0x3b869f[_0x4e33d5(0x195)](0x1)[_0x4e33d5(0x25d)]('\x20'));return;}if(_0x126e5b===_0x4e33d5(0x1aa)){const _0x5a04c8=(_0x3b869f[0x1]??'')[_0x4e33d5(0x454)]();if(!_0x5a04c8||_0x5a04c8==='on')_0x1f7ddd['enabled']=!![],_0x1f7ddd[_0x4e33d5(0x37e)]='info',console['log'](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x2ff)],'✓')+_0x4e33d5(0x5f0)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x1ab)],_0x4e33d5(0x5df))+'\x0a');else{if(_0x5a04c8===_0x4e33d5(0x467))_0x1f7ddd[_0x4e33d5(0x521)]=![],console[_0x4e33d5(0x51d)]('\x0a\x20\x20'+_0x4c6262(_0x14f1a4[_0x4e33d5(0x3b5)],'○')+'\x20logs\x20off\x0a');else _0x412b15[_0x5a04c8]!==undefined?(_0x1f7ddd[_0x4e33d5(0x521)]=!![],_0x1f7ddd['level']=_0x5a04c8,console[_0x4e33d5(0x51d)](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4['green'],'✓')+_0x4e33d5(0x2b7)+_0x4c6262(_0x14f1a4['bold'],_0x5a04c8)+'\x0a')):console['error'](_0x4c6262(_0x14f1a4[_0x4e33d5(0x3ad)],_0x4e33d5(0x287)));}return;}if(_0x126e5b===_0x4e33d5(0x292)||_0x126e5b===_0x4e33d5(0x315)){await _0x17f6c0(_0x56f39d,0x0);return;}if(_0x126e5b===_0x4e33d5(0x598)){const _0x2a2f0e=_0x4e33d5(0x371)+_0x8d04e4[_0x4e33d5(0x345)]+_0x4e33d5(0x362),_0x1c993e=process[_0x4e33d5(0x200)]==='win32'?_0x4e33d5(0x249)+_0x2a2f0e:process[_0x4e33d5(0x200)]===_0x4e33d5(0x263)?'open\x20'+_0x2a2f0e:_0x4e33d5(0x438)+_0x2a2f0e;require$$4[_0x4e33d5(0x23d)](_0x1c993e),console['log'](_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4['green'],'✓')+_0x4e33d5(0x1e2)+_0x4c6262(_0x14f1a4[_0x4e33d5(0x460)],_0x2a2f0e)+'\x0a');return;}let _0x232e8c,_0x96cb09,_0x515285;if(_0x554dc5[_0x4e33d5(0x503)](_0x126e5b)){_0x232e8c=_0x126e5b,_0x96cb09=_0x3b869f[0x1],_0x515285=_0x3b869f['slice'](0x2);if(!_0x96cb09){console['error'](_0x4c6262(_0x14f1a4[_0x4e33d5(0x3ad)],_0x4e33d5(0x3e3)+_0x5b9611+'\x20<path>\x20[json-body]'));return;}}else _0x232e8c=null,_0x96cb09=_0x3b869f[0x0],_0x515285=_0x3b869f['slice'](0x1);const _0x7ea351=_0x1fc68d[_0x4e33d5(0x162)]??_0x5d1060[_0x4e33d5(0x162)],_0x61a967=_0x304f78(_0x96cb09,_0x7ea351);if(_0x1fc68d['help']){_0x56e8ac(_0x56f39d,_0x61a967);return;}let _0x514b6b=null;if(_0x515285[_0x4e33d5(0x26d)]){const _0x1da46d=_0x515285[_0x4e33d5(0x25d)]('\x20');try{_0x514b6b=_0x1d8152(_0x1da46d);}catch(_0x1cf5bb){console[_0x4e33d5(0x4d4)](_0x4c6262(_0x14f1a4[_0x4e33d5(0x3ad)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x1da46d+_0x4e33d5(0x3ea)+_0x4c6262(_0x14f1a4['dim'],_0x1cf5bb['message'])+'\x0a'));return;}}if(!_0x232e8c)_0x232e8c=_0x514b6b!==null?'POST':_0x4e33d5(0x3c9);try{const _0x33f8fc=await _0x5d9c81(_0x56f39d,_0x232e8c,_0x61a967,_0x514b6b);_0x12e90e(_0x33f8fc[_0x4e33d5(0x527)],_0x33f8fc['body']);}catch(_0x2b7e44){console['error']('\x0a\x20\x20'+_0x4c6262(_0x14f1a4[_0x4e33d5(0x3ad)],'✗')+'\x20'+_0x2b7e44['message']+'\x0a');}}class _0x76f5e6{constructor(){const _0x238999=_0x232606;this[_0x238999(0x577)]=new Map(),this[_0x238999(0x5a9)]=null,this[_0x238999(0x58c)]=![];}}function _0x19b484(_0x2f59e9){const _0x1e1500=_0x232606,_0x492c9b=new _0x76f5e6();for(const _0xf099e5 of _0x2f59e9){if(_0xf099e5['meta']?.['hidden'])continue;const _0x41a1e8=_0xf099e5['path'][_0x1e1500(0x197)](/^\/api/,'')[_0x1e1500(0x197)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x1e1500(0x197)](/^\//,'');if(!_0x41a1e8)continue;let _0x2c9f72=_0x492c9b;for(const _0xbef7bc of _0x41a1e8[_0x1e1500(0x56e)]('/')['filter'](Boolean)){if(_0xbef7bc[_0x1e1500(0x2e2)](':')){const _0x2fee99=_0xbef7bc[_0x1e1500(0x195)](0x1);if(!_0x2c9f72[_0x1e1500(0x5a9)])_0x2c9f72[_0x1e1500(0x5a9)]={'param':_0x2fee99,'node':new _0x76f5e6()};_0x2c9f72=_0x2c9f72[_0x1e1500(0x5a9)][_0x1e1500(0x5b6)];}else{if(!_0x2c9f72[_0x1e1500(0x577)][_0x1e1500(0x503)](_0xbef7bc))_0x2c9f72[_0x1e1500(0x577)][_0x1e1500(0x1e5)](_0xbef7bc,new _0x76f5e6());_0x2c9f72=_0x2c9f72[_0x1e1500(0x577)][_0x1e1500(0x242)](_0xbef7bc);}}_0x2c9f72[_0x1e1500(0x58c)]=!![];}return _0x492c9b;}const _0x479657=new Map();function _0x211285(_0x3428b3,_0x1e079a,_0x2a0cd2){const _0x58412b=_0x232606,_0x173bc7=_0x479657[_0x58412b(0x242)](_0x3428b3);if(_0x173bc7&&_0x173bc7[_0x58412b(0x3a5)]>Date[_0x58412b(0x464)]())return _0x173bc7[_0x58412b(0x379)];const _0x49434b=_0x2a0cd2();return _0x479657[_0x58412b(0x1e5)](_0x3428b3,{'val':_0x49434b,'exp':Date[_0x58412b(0x464)]()+_0x1e079a}),_0x49434b;}function _0x144fa3(_0x1f6eda,_0x344a43,_0x356bb3,_0x14950e){const _0x1e1e3d=_0x232606,_0x5ae405=_0x344a43[_0x1e1e3d(0x162)]??_0x14950e['env'];switch(_0x1f6eda){case'env':return[..._0x356bb3[_0x1e1e3d(0x40a)]['keys']()][_0x1e1e3d(0x49f)](_0x209612=>!_0x209612[_0x1e1e3d(0x2e2)]('~'));case _0x1e1e3d(0x57e):return _0x211285(_0x1e1e3d(0x4ac)+_0x5ae405,0x7d0,()=>{const _0x28b5b6=_0x1e1e3d;try{return[..._0x356bb3[_0x28b5b6(0x162)](_0x5ae405)[_0x28b5b6(0x380)][_0x28b5b6(0x4b0)]()][_0x28b5b6(0x49f)](_0x12326c=>!_0x12326c['startsWith']('~'));}catch{return[];}});case _0x1e1e3d(0x4ff):if(!_0x344a43[_0x1e1e3d(0x57e)])return[];return _0x211285('keys:'+_0x5ae405+':'+_0x344a43[_0x1e1e3d(0x57e)],0x5dc,()=>{const _0xc71e3e=_0x1e1e3d;try{const _0x457844=_0x356bb3[_0xc71e3e(0x162)](_0x5ae405)[_0xc71e3e(0x380)][_0xc71e3e(0x242)](_0x344a43[_0xc71e3e(0x57e)]);if(!_0x457844?.[_0xc71e3e(0x317)])return[];const _0x257156=[];for(const {key:_0x588731}of _0x457844[_0xc71e3e(0x317)][_0xc71e3e(0x45e)]({'limit':0x32})){_0x257156[_0xc71e3e(0x232)](String(_0x588731));if(_0x257156[_0xc71e3e(0x26d)]>=0x32)break;}return _0x257156;}catch{return[];}});case _0x1e1e3d(0x4c5):if(!_0x344a43[_0x1e1e3d(0x57e)])return[];return _0x211285(_0x1e1e3d(0x2a7)+_0x5ae405+':'+_0x344a43[_0x1e1e3d(0x57e)],0x7d0,()=>{const _0x142766=_0x1e1e3d;try{const _0x56893e=_0x356bb3[_0x142766(0x162)](_0x5ae405)[_0x142766(0x380)][_0x142766(0x242)](_0x344a43[_0x142766(0x57e)]);return _0x56893e?[..._0x56893e[_0x142766(0x248)]?.[_0x142766(0x4b0)]()??[]]:[];}catch{return[];}});case _0x1e1e3d(0x43a):if(!_0x344a43[_0x1e1e3d(0x57e)])return[];return _0x211285(_0x1e1e3d(0x5a7)+_0x5ae405+':'+_0x344a43['type'],0x7d0,()=>{const _0x91f5ee=_0x1e1e3d;try{return _0x356bb3[_0x91f5ee(0x31a)]?.[_0x91f5ee(0x5c3)]?.(_0x344a43[_0x91f5ee(0x57e)],_0x356bb3[_0x91f5ee(0x162)](_0x5ae405))?.[_0x91f5ee(0x32d)](_0x20f1b3=>_0x20f1b3[_0x91f5ee(0x60c)])??[];}catch{return[];}});default:return[];}}function _0x1b7968(_0x3f2683,_0xa2d630,_0x4aff60,_0x4ac642){const _0xee23c0=_0x232606,_0x3dd17c=_0x3f2683['endsWith']('/'),_0x431b07=_0x3f2683[_0xee23c0(0x56e)]('/'),_0x4b5444=_0x3dd17c?_0x431b07['slice'](0x0,-0x1):_0x431b07['slice'](0x0,-0x1),_0x1359a6=_0x3dd17c?'':_0x431b07[_0x431b07[_0xee23c0(0x26d)]-0x1];let _0x10ea6d=_0xa2d630;const _0x57b2ac={};for(const _0x2cf15c of _0x4b5444){if(!_0x2cf15c)continue;if(_0x10ea6d[_0xee23c0(0x577)]['has'](_0x2cf15c))_0x10ea6d=_0x10ea6d['children'][_0xee23c0(0x242)](_0x2cf15c);else{if(_0x10ea6d[_0xee23c0(0x5a9)])_0x57b2ac[_0x10ea6d['dynamic'][_0xee23c0(0x55a)]]=_0x2cf15c,_0x10ea6d=_0x10ea6d[_0xee23c0(0x5a9)]['node'];else return[];}}const _0x1bef41=_0x4b5444[_0xee23c0(0x49f)](Boolean),_0x60f88b=_0x1bef41[_0xee23c0(0x26d)]?_0x1bef41['join']('/')+'/':'',_0x3720eb=[];for(const [_0x58544f]of _0x10ea6d[_0xee23c0(0x577)]){if(_0x58544f['startsWith'](_0x1359a6))_0x3720eb[_0xee23c0(0x232)](_0x60f88b+_0x58544f);}if(_0x10ea6d[_0xee23c0(0x5a9)])for(const _0x501b7c of _0x144fa3(_0x10ea6d[_0xee23c0(0x5a9)]['param'],_0x57b2ac,_0x4aff60,_0x4ac642)){if(String(_0x501b7c)[_0xee23c0(0x2e2)](_0x1359a6))_0x3720eb[_0xee23c0(0x232)](_0x60f88b+_0x501b7c);}return _0x3720eb[_0xee23c0(0x195)](0x0,0x64);}const _0x160dd5=[_0x232606(0x339),_0x232606(0x3e5),_0x232606(0x162),_0x232606(0x5b0),'types',_0x232606(0x4a2),_0x232606(0x167),_0x232606(0x2ad),_0x232606(0x185),'quit'];function _0x2e51bf(_0x1a0520,_0x381f29,_0x5b2d75){return function _0xc43dfd(_0x42ec73){const _0x2a77f6=_0x1ef7;try{const _0x14b2b2=_0x42ec73[_0x2a77f6(0x51c)](/\s[{[]/),_0x44bf71=_0x14b2b2>=0x0?_0x42ec73[_0x2a77f6(0x195)](0x0,_0x14b2b2):_0x42ec73,_0x1207ca=_0x44bf71[_0x2a77f6(0x1b3)]();if(!_0x1207ca){const _0x167f00=[..._0x160dd5,...[..._0x1a0520[_0x2a77f6(0x577)]['keys']()]][_0x2a77f6(0x195)](0x0,0x64);return[_0x167f00,''];}const _0x46a845=_0x1207ca[_0x2a77f6(0x56e)](/\s+/),_0x2d91b0=_0x46a845[0x0],_0x4b6489=_0x2d91b0[_0x2a77f6(0x233)]();if(_0x46a845[_0x2a77f6(0x26d)]===0x1){const _0x3ffecd=_0x2d91b0[_0x2a77f6(0x454)](),_0x1aa8a4=_0x160dd5[_0x2a77f6(0x49f)](_0x3d33d7=>_0x3d33d7[_0x2a77f6(0x2e2)](_0x3ffecd)),_0x43cfe7=_0x1b7968(_0x2d91b0,_0x1a0520,_0x381f29,_0x5b2d75),_0x71bdb6=[...new Set([..._0x1aa8a4,..._0x43cfe7])][_0x2a77f6(0x195)](0x0,0x64);return[_0x71bdb6,_0x2d91b0];}if(_0x554dc5[_0x2a77f6(0x503)](_0x4b6489)&&_0x46a845[_0x2a77f6(0x26d)]===0x2){const _0xac60bd=_0x46a845[0x1],_0x381798=_0x1b7968(_0xac60bd,_0x1a0520,_0x381f29,_0x5b2d75);return[_0x381798[_0x2a77f6(0x32d)](_0xe5c014=>_0x2d91b0+'\x20'+_0xe5c014),_0x2d91b0+'\x20'+_0xac60bd];}if(!_0x554dc5[_0x2a77f6(0x503)](_0x4b6489)&&_0x46a845['length']>0x1){const _0xf07649=_0x1b7968(_0x2d91b0,_0x1a0520,_0x381f29,_0x5b2d75),_0x23f34c='\x20'+_0x46a845[_0x2a77f6(0x195)](0x1)['join']('\x20');return[_0xf07649[_0x2a77f6(0x32d)](_0x185120=>_0x185120+_0x23f34c),_0x2d91b0+_0x23f34c];}return[[],_0x42ec73];}catch{return[[],_0x42ec73];}};}async function _0x388091(_0x45b0e1,_0x2d34ad){const _0x5898a8=_0x232606,_0x407757={'enabled':!![],'level':_0x2d34ad[_0x5898a8(0x5f3)]??'info'},_0x21124b={'env':_0x5898a8(0x38d)},_0x2ff3ce={'current':null},_0x7ab35b=_0x19b484(_0x45b0e1[_0x5898a8(0x309)][_0x5898a8(0x3f8)]()),_0x45f7de=_0x2e51bf(_0x7ab35b,_0x45b0e1,_0x21124b);_0x45b0e1['log'][_0x5898a8(0x595)](_0x17c367=>{const _0x1c377b=_0x5898a8;if(!_0x407757[_0x1c377b(0x521)])return;_0x55cfba(_0x17c367,_0x407757['level']),_0x2ff3ce[_0x1c377b(0x4ad)]?.[_0x1c377b(0x335)](!![]);}),_0x32b7b5(_0x45b0e1,_0x2d34ad);const _0x409cdb=_0x313287[_0x5898a8(0x447)]({'input':process[_0x5898a8(0x440)],'output':process[_0x5898a8(0x1a0)],'terminal':!![],'completer':_0x45f7de,'prompt':_0x1baf12(_0x21124b),'historySize':_0x2a272d});try{const _0x30f184=_0x38f45a[_0x5898a8(0x4c8)](_0x27e256,_0x5898a8(0x39a))[_0x5898a8(0x56e)]('\x0a')[_0x5898a8(0x49f)](Boolean);_0x409cdb[_0x5898a8(0x239)]=_0x30f184[_0x5898a8(0x3e1)]()[_0x5898a8(0x195)](0x0,_0x2a272d);}catch{}_0x2ff3ce[_0x5898a8(0x4ad)]=_0x409cdb,_0x409cdb['on'](_0x5898a8(0x384),async _0x4b5c62=>{const _0x584cdf=_0x5898a8;_0x409cdb[_0x584cdf(0x4ee)]();try{await _0x2f5b49(_0x4b5c62,_0x45b0e1,_0x2d34ad,_0x407757,_0x21124b,_0x409cdb);}catch(_0x4246f8){console[_0x584cdf(0x4d4)](_0x4c6262(_0x14f1a4[_0x584cdf(0x3ad)],_0x584cdf(0x587)+_0x4246f8[_0x584cdf(0x408)]));}finally{_0x409cdb[_0x584cdf(0x552)](),_0x409cdb[_0x584cdf(0x335)]();}}),_0x409cdb['on'](_0x5898a8(0x284),()=>{const _0x2e4690=_0x5898a8;try{const _0x3a0c12=[..._0x409cdb['history']][_0x2e4690(0x3e1)]()[_0x2e4690(0x49f)](Boolean)[_0x2e4690(0x195)](0x0,_0x2a272d);_0x38f45a[_0x2e4690(0x3a7)](_0x27e256,_0x3a0c12[_0x2e4690(0x25d)]('\x0a')+'\x0a');}catch{}_0x17f6c0(_0x45b0e1,0x0);});let _0x362304=0x0;return process['on']('SIGINT',()=>{const _0x3e493d=_0x5898a8;if(_0x343892)return _0x17f6c0(_0x45b0e1,0x82,_0x3e493d(0x4ea));if(_0x409cdb[_0x3e493d(0x384)]==='')return _0x17f6c0(_0x45b0e1,0x0,'SIGINT');const _0x2f8405=Date[_0x3e493d(0x464)]();if(_0x2f8405-_0x362304<0x5dc)return _0x17f6c0(_0x45b0e1,0x0,'SIGINT\x20(double-tap)');_0x362304=_0x2f8405,process[_0x3e493d(0x1a0)][_0x3e493d(0x478)]('\x0a'),_0x409cdb[_0x3e493d(0x4d3)](0x0),_0x409cdb[_0x3e493d(0x335)](),process['stderr'][_0x3e493d(0x478)](_0x4c6262(_0x14f1a4[_0x3e493d(0x1ab)],_0x3e493d(0x5e5)));}),process['on'](_0x5898a8(0x61b),()=>_0x17f6c0(_0x45b0e1,0x0,_0x5898a8(0x61b))),process['on']('SIGBREAK',()=>_0x17f6c0(_0x45b0e1,0x0,'SIGBREAK')),_0x409cdb[_0x5898a8(0x335)](),_0x409cdb;}return okdbShell={'start':_0x388091,'colorLog':_0x55cfba,'lenientParse':_0x1d8152,'_splitLine':_0x47b145,'_formatRouteHelpLines':_0x1dc6e1,'_routeSummary':_0x2bcadb,'_routeTags':_0x4f37ce},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2f5642=_0x18fcc0;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x572a4c,performance:_0x110164}=require$$0$4,_0x2012f7=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x3dc8d4=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x44df3d=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5c3605=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x512ab0{constructor(){const _0xdfefcc=_0x1ef7;this[_0xdfefcc(0x521)]=_0x2012f7,this[_0xdfefcc(0x306)]=new Map(),this['_h']=null,this['_timer']=null,this[_0xdfefcc(0x461)]=![],this[_0xdfefcc(0x25a)]=(_0x482cb3,_0x6f6ef1)=>process[_0xdfefcc(0x545)]['write'](_0x482cb3+(_0x6f6ef1?'\x20'+JSON[_0xdfefcc(0x536)](_0x6f6ef1):'')+'\x0a');}[_0x2f5642(0x464)](){const _0xba2de5=_0x2f5642;return _0x110164[_0xba2de5(0x464)]();}['setLogger'](_0x22d23a){const _0x55b4e9=_0x2f5642;if(typeof _0x22d23a===_0x55b4e9(0x49d))this[_0x55b4e9(0x25a)]=_0x22d23a;}[_0x2f5642(0x53e)](_0x1b9db0,_0x44d305,_0x4320ba){const _0x4c9ad4=_0x2f5642;if(!this[_0x4c9ad4(0x521)])return;let _0x4d6b45=this['_buckets']['get'](_0x1b9db0);!_0x4d6b45&&(_0x4d6b45={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4c9ad4(0x306)][_0x4c9ad4(0x1e5)](_0x1b9db0,_0x4d6b45)),_0x4d6b45['ms']+=_0x44d305,_0x4d6b45[_0x4c9ad4(0x22b)]+=0x1,_0x44d305>_0x4d6b45[_0x4c9ad4(0x1c1)]&&(_0x4d6b45[_0x4c9ad4(0x1c1)]=_0x44d305,_0x4d6b45[_0x4c9ad4(0x2d1)]=_0x4320ba||'');}[_0x2f5642(0x509)](_0x44c986){const _0x312433=_0x2f5642;if(!this[_0x312433(0x521)]||this[_0x312433(0x461)])return;this[_0x312433(0x461)]=!![];if(_0x44c986)this['_log']=_0x44c986;this['_h']=_0x572a4c({'resolution':0xa}),this['_h'][_0x312433(0x28f)](),this[_0x312433(0x471)]=setInterval(()=>this[_0x312433(0x4ed)](),_0x3dc8d4);if(this['_timer'][_0x312433(0x52b)])this[_0x312433(0x471)][_0x312433(0x52b)]();}['onWindow'](_0x3ec734){const _0x22dca6=_0x2f5642;if(!this[_0x22dca6(0x5c7)])this[_0x22dca6(0x5c7)]=new Set();this[_0x22dca6(0x5c7)][_0x22dca6(0x1d2)](_0x3ec734);if(!this[_0x22dca6(0x461)])this[_0x22dca6(0x530)]();}[_0x2f5642(0x29c)](_0x241ce8){this['_windowCbs']?.['delete'](_0x241ce8);}[_0x2f5642(0x530)](){const _0x29f135=_0x2f5642;if(this[_0x29f135(0x543)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x572a4c({'resolution':0xa}),this['_h'][_0x29f135(0x28f)]());const _0x26df31=_0x3dc8d4;this[_0x29f135(0x256)]=setInterval(()=>{const _0x1c1a37=_0x29f135,_0x5be9d5=this['_h'];if(!_0x5be9d5)return;const _0x60eec3=_0x5be9d5['percentile'](0x63)/0xf4240,_0x26b528=_0x5be9d5[_0x1c1a37(0x5e4)]/0xf4240,_0x17276c=_0x5be9d5[_0x1c1a37(0x389)]/0xf4240;_0x5be9d5['reset']();if(this[_0x1c1a37(0x5c7)])for(const _0x1e3869 of this['_windowCbs']){try{_0x1e3869({'p99Ms':_0x60eec3,'maxMs':_0x26b528,'meanMs':_0x17276c,'reportMs':_0x26df31});}catch{}}},_0x26df31);if(this[_0x29f135(0x256)]['unref'])this[_0x29f135(0x256)][_0x29f135(0x52b)]();}[_0x2f5642(0x4ed)](){const _0x275ef1=_0x2f5642,_0xd17203=this['_h'],_0x51bca1=_0xd17203[_0x275ef1(0x5e4)]/0xf4240,_0x299fd9=_0xd17203[_0x275ef1(0x54c)](0x63)/0xf4240,_0x665d48=_0xd17203['mean']/0xf4240;_0xd17203[_0x275ef1(0x4e0)]();const _0x302aa9=[...this[_0x275ef1(0x306)]['entries']()][_0x275ef1(0x32d)](([_0x545596,_0x39c013])=>({'label':_0x545596,..._0x39c013}))[_0x275ef1(0x29e)]((_0x4c4112,_0x3b9e4c)=>_0x3b9e4c['ms']-_0x4c4112['ms'])[_0x275ef1(0x195)](0x0,0x8);this[_0x275ef1(0x306)][_0x275ef1(0x2d8)]();const _0x10be04=_0x302aa9[_0x275ef1(0x537)]((_0x56022e,_0x5d0253)=>_0x56022e+_0x5d0253['ms'],0x0),_0x3db007=_0x302aa9['map'](_0x13c28b=>_0x13c28b[_0x275ef1(0x25c)]+'='+_0x13c28b['ms']['toFixed'](0x0)+_0x275ef1(0x618)+_0x13c28b[_0x275ef1(0x22b)]+(_0x13c28b[_0x275ef1(0x1c1)]>0x5?'(worst\x20'+_0x13c28b['maxMs'][_0x275ef1(0x365)](0x0)+'ms'+(_0x13c28b[_0x275ef1(0x2d1)]?'\x20'+_0x13c28b[_0x275ef1(0x2d1)]:'')+')':''));(_0x44df3d||_0x51bca1>=_0x5c3605)&&this[_0x275ef1(0x25a)]('loop-lag\x20'+_0x3dc8d4+_0x275ef1(0x21f)+_0x51bca1[_0x275ef1(0x365)](0x0)+_0x275ef1(0x46f)+_0x299fd9[_0x275ef1(0x365)](0x0)+_0x275ef1(0x479)+_0x665d48[_0x275ef1(0x365)](0x0)+'ms\x20busy='+_0x10be04[_0x275ef1(0x365)](0x0)+'ms'+(_0x3db007[_0x275ef1(0x26d)]?_0x275ef1(0x593)+_0x3db007[_0x275ef1(0x25d)]('\x20\x20'):''),{'feature':_0x275ef1(0x551)});if(this[_0x275ef1(0x5c7)])for(const _0x44f7d4 of this[_0x275ef1(0x5c7)]){try{_0x44f7d4({'p99Ms':_0x299fd9,'maxMs':_0x51bca1,'meanMs':_0x665d48,'reportMs':_0x3dc8d4});}catch{}}}[_0x2f5642(0x187)](){const _0x23de4f=_0x2f5642;if(this[_0x23de4f(0x471)])clearInterval(this[_0x23de4f(0x471)]);if(this['_h'])this['_h'][_0x23de4f(0x4af)]();this[_0x23de4f(0x471)]=null,this['_h']=null,this[_0x23de4f(0x461)]=![];}}const _0x1c6d65=new _0x512ab0();if(_0x1c6d65[_0x2f5642(0x521)])_0x1c6d65['start']();return okdbLoopMonitor={'LOOP':_0x1c6d65},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x52560e=require$$1$1,_0x213d2b=require$$1;let _0x3ab52e,_0x347428,_0x4c2fae,_0x3eb113,_0x3cc045,_0x3aa4b1,_0x2ef8df,_0x47279e=![];const _0x366223=new Set();let _0x54dc7f=null;const _0x40542e=new Map();function _0x3c0f74(){const _0x1096e6=_0x1ef7;if(_0x3ab52e!==undefined)return _0x3ab52e;_0x3ab52e=process.env.OKDB_DIAG==='1';if(!_0x3ab52e)return![];_0x347428=process.env.OKDB_DIAG_STACK==='1',_0x3eb113=Math[_0x1096e6(0x5e4)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x4c2fae=new Array(_0x3eb113),_0x3cc045=0x0,_0x3aa4b1=0x0,_0x2ef8df=process.env.OKDB_DIAG_DIR||null;if(_0x2ef8df)try{_0x52560e[_0x1096e6(0x5c0)](_0x2ef8df,{'recursive':!![]});}catch{}return!![];}function _0xaee1c5(){return _0x3ab52e===undefined?_0x3c0f74():_0x3ab52e;}function _0x33e726(_0x4ed84b,_0x3b6934){const _0x1e155d=_0x1ef7;if(_0x3ab52e===undefined?!_0x3c0f74():!_0x3ab52e)return;let _0x59b72e;if(_0x347428){const _0x2d817a=new Error()[_0x1e155d(0x45a)]||'';_0x59b72e=_0x2d817a[_0x1e155d(0x56e)]('\x0a')[_0x1e155d(0x195)](0x3)['map'](_0x5bd43a=>_0x5bd43a['trim']())[_0x1e155d(0x49f)](Boolean)['slice'](0x0,0x8);}_0x4c2fae[_0x3cc045]={'seq':_0x3aa4b1++,'t':Date['now'](),'env':_0x4ed84b,'kind':_0x3b6934||_0x1e155d(0x45c),'stack':_0x59b72e},_0x3cc045=(_0x3cc045+0x1)%_0x3eb113;}function _0x2e0859(_0x37ff2a){const _0xc86042=_0x1ef7,_0x3c25f2=[];for(let _0x51b98f=0x0;_0x51b98f<_0x3eb113;_0x51b98f++){const _0x2cb2bd=_0x4c2fae[(_0x3cc045-0x1-_0x51b98f+_0x3eb113*0x2)%_0x3eb113];if(!_0x2cb2bd)continue;_0x3c25f2['push'](_0x2cb2bd);if(_0x3c25f2[_0xc86042(0x26d)]>=_0x37ff2a)break;}return _0x3c25f2;}function _0x34e53f(_0xb539da){const _0x2e915c=_0x1ef7;try{process[_0x2e915c(0x545)][_0x2e915c(0x478)](_0xb539da+'\x0a');}catch{}if(_0x2ef8df)try{_0x52560e['appendFileSync'](_0x213d2b[_0x2e915c(0x25d)](_0x2ef8df,_0x2e915c(0x446)+process['pid']+_0x2e915c(0x24b)),_0xb539da+'\x0a');}catch{}}function _0x29e66c(_0x439ea6){const _0xfa96e0=_0x1ef7,_0x53c575=_0x2e0859(_0x439ea6);if(!_0x53c575[_0xfa96e0(0x26d)])return _0xfa96e0(0x451);const _0x5a6b8a=Date['now']();return _0x53c575[_0xfa96e0(0x32d)](_0x2ae3eb=>{const _0x2995ca=_0xfa96e0,_0x42462d=_0x2995ca(0x363)+_0x2ae3eb[_0x2995ca(0x533)]+'\x20-'+(_0x5a6b8a-_0x2ae3eb['t'])+'ms\x20env='+_0x2ae3eb[_0x2995ca(0x162)]+'\x20'+_0x2ae3eb[_0x2995ca(0x510)];return _0x2ae3eb[_0x2995ca(0x45a)]&&_0x2ae3eb[_0x2995ca(0x45a)][_0x2995ca(0x26d)]?_0x42462d+_0x2995ca(0x47d)+_0x2ae3eb[_0x2995ca(0x45a)]['join'](_0x2995ca(0x47d)):_0x42462d;})[_0xfa96e0(0x25d)]('\x0a');}function _0x4ff528(_0x31589a,_0x5d9777){const _0x47de8a=_0x1ef7,_0x2eed50=_0x47de8a(0x413)+_0x31589a+_0x47de8a(0x28a)+new Date()[_0x47de8a(0x429)]()+'\x20pid='+process['pid']+_0x47de8a(0x3da),_0x58e96f=[_0x2eed50,_0x47de8a(0x329)+(_0x5d9777&&_0x5d9777[_0x47de8a(0x45a)]?_0x5d9777[_0x47de8a(0x45a)][_0x47de8a(0x56e)]('\x0a')[0x0]:_0x5d9777),'recent\x20writes\x20(newest\x20first)'+(_0x347428?'':_0x47de8a(0x3f4))+':',_0x29e66c(0x18),_0x3a11f0(),'='['repeat'](_0x2eed50[_0x47de8a(0x26d)]-0x1)];_0x34e53f(_0x58e96f['join']('\x0a'));}function _0x1f871c(_0x3118e3){const _0x4e2c20=_0x1ef7;if(!_0xaee1c5())return;const _0x5a7afd=String(_0x3118e3&&_0x3118e3[_0x4e2c20(0x408)]||_0x3118e3||''),_0x13b64e=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x5a7afd);_0x4ff528(_0x13b64e?_0x4e2c20(0x1ad):_0x4e2c20(0x553),_0x3118e3);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x13b64e)return;try{console['error'](_0x3118e3&&_0x3118e3[_0x4e2c20(0x45a)]?_0x3118e3[_0x4e2c20(0x45a)]:_0x3118e3);}catch{}process[_0x4e2c20(0x185)](0x1);}function _0x27c9b2(_0x26a44a){const _0x40ebd0=_0x1ef7;if(!_0xaee1c5())return;const _0x4e983f=String(_0x26a44a&&_0x26a44a[_0x40ebd0(0x408)]||_0x26a44a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x40ebd0(0x4c0)](_0x4e983f)&&_0x4ff528(_0x40ebd0(0x20f),_0x26a44a);}function _0x3a11f0(){const _0xa3ceb7=_0x1ef7,_0x58ae6a=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x387f84=![];for(const _0x1dca0a of _0x366223){const _0xa341cc=_0x1dca0a&&_0x1dca0a['_envs'];if(!_0xa341cc)continue;for(const [_0x1f1058,_0x16bd7c]of _0xa341cc){const _0x207eaa=_0x16bd7c&&_0x16bd7c[_0xa3ceb7(0x492)]&&_0x16bd7c['_coordinator'][_0xa3ceb7(0x36d)];if(!_0x207eaa)continue;let _0x5f2246,_0x3d37f1;try{_0x5f2246=Atomics['load'](_0x207eaa,0x0),_0x3d37f1=Atomics[_0xa3ceb7(0x3bb)](_0x207eaa,0x1);}catch{continue;}if(_0x5f2246===0x0)continue;_0x387f84=!![];const _0x3f12bf=_0x5f2246>0x0?_0xa3ceb7(0x3b3):_0xa3ceb7(0x500),_0xb3586b=Date[_0xa3ceb7(0x464)]()-Math['abs'](_0x5f2246)*0x3e8,_0x17210d=((()=>{const _0x68c3e7=_0xa3ceb7;try{return _0x16bd7c[_0x68c3e7(0x2b2)]&&_0x16bd7c[_0x68c3e7(0x2b2)][_0x68c3e7(0x527)]?_0x16bd7c['_writer'][_0x68c3e7(0x527)]():null;}catch{return null;}})());_0x58ae6a[_0xa3ceb7(0x232)](_0xa3ceb7(0x50e)+_0x1f1058+_0xa3ceb7(0x367)+_0x3f12bf+_0xa3ceb7(0x3d2)+_0xb3586b+_0xa3ceb7(0x2bd)+_0x3d37f1+(_0x17210d?_0xa3ceb7(0x34c)+_0x17210d[_0xa3ceb7(0x3b2)]+'\x20oldestPendingMs='+_0x17210d[_0xa3ceb7(0x161)]+_0xa3ceb7(0x4bd)+_0x17210d[_0xa3ceb7(0x2b6)]+'}':''));}}if(!_0x387f84)_0x58ae6a['push'](_0xa3ceb7(0x360));return _0x58ae6a[_0xa3ceb7(0x25d)]('\x0a');}function _0x27614f(){const _0x2698dd=_0x1ef7;if(!_0xaee1c5())return;const _0x375656=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x4b7359=Date[_0x2698dd(0x464)]();for(const _0x5dc1c7 of _0x366223){const _0x23fe25=_0x5dc1c7&&_0x5dc1c7[_0x2698dd(0x40a)];if(!_0x23fe25)continue;for(const [_0x3e13c5,_0x139a5d]of _0x23fe25){const _0x5b9302=_0x139a5d&&_0x139a5d[_0x2698dd(0x492)]&&_0x139a5d['_coordinator'][_0x2698dd(0x36d)];if(!_0x5b9302)continue;let _0x16dbfb;try{_0x16dbfb=Atomics['load'](_0x5b9302,0x0);}catch{continue;}const _0x2f99ce=_0x5dc1c7['path']+'|'+_0x3e13c5;if(_0x16dbfb<=0x0){_0x40542e[_0x2698dd(0x270)](_0x2f99ce);continue;}const _0x47a455=_0x4b7359-_0x16dbfb*0x3e8,_0x20ed42=_0x40542e['get'](_0x2f99ce);if(_0x47a455<_0x375656)continue;if(_0x20ed42&&_0x4b7359-_0x20ed42[_0x2698dd(0x592)]<_0x375656)continue;_0x40542e[_0x2698dd(0x1e5)](_0x2f99ce,{'firstTs':_0x20ed42?_0x20ed42[_0x2698dd(0x43d)]:_0x16dbfb,'dumpedAt':_0x4b7359});const _0x4155e3=_0x2698dd(0x186)+_0x47a455+'ms\x20on\x20env='+_0x3e13c5+_0x2698dd(0x28a)+new Date()[_0x2698dd(0x429)]()+_0x2698dd(0x50b)+process[_0x2698dd(0x597)]+_0x2698dd(0x3da);_0x34e53f([_0x4155e3,_0x3a11f0(),'='['repeat'](_0x4155e3[_0x2698dd(0x26d)]-0x1)][_0x2698dd(0x25d)]('\x0a'));}}}function _0x36a98b(){const _0x5975da=_0x1ef7;if(!_0xaee1c5()||_0x47279e)return;_0x47279e=!![],process[_0x5975da(0x2b3)](_0x5975da(0x553),_0x1f871c),process[_0x5975da(0x2b3)]('unhandledRejection',_0x27c9b2);const _0x52aec5=Math[_0x5975da(0x5e4)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x54dc7f=setInterval(_0x27614f,_0x52aec5);if(_0x54dc7f[_0x5975da(0x52b)])_0x54dc7f[_0x5975da(0x52b)]();}function _0x55f64d(_0x5a9947){if(!_0xaee1c5()||!_0x5a9947)return;_0x366223['add'](_0x5a9947),_0x36a98b();}function _0x1305b6(_0x2fce6a){const _0x97297f=_0x1ef7;_0x366223[_0x97297f(0x270)](_0x2fce6a);}function _0x5189e6(){if(!_0xaee1c5())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x347428,'recentWrites':_0x2e0859(0x10),'drain':_0x3a11f0()};}return okdbDiag={'isEnabled':_0xaee1c5,'recordWrite':_0x33e726,'installDiag':_0x36a98b,'registerOkdb':_0x55f64d,'unregisterOkdb':_0x1305b6,'snapshot':_0x5189e6},okdbDiag;}function _0x5e80(){const _0x2f59ec=['\x20\x20@','unref','_systemEnv','Events','\x20does\x20not\x20exist','Examples','_startAdmission','processKey','\x20times\x20in\x20','seq','FTS_RESET','\x20\x20\x20\x20path:\x20\x20','stringify','reduce','/types\x0a\x20\x20\x20\x20','then','(unset)','valid','targetType','raw-put','note','339522FgUUHj','--path','licenseId','INVALID_PRIMARY_KEY','_admissionStarted','createPublicKey','stderr','system:clock_change','statSync','_dedupeKey','ITEM_UPDATE','\x20not\x20found','POST','percentile','\x20type','txn:end','sync','dropping','loop-lag','resume','uncaughtException','_isStale','grants','resetIndex','_sandbox','state','\x20\x20\x20\x20admin:\x20http://localhost:','param','cli','_publishFailWarned','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','passive\x20HTTP\x20worker(s)\x20serving\x20:','sandbox','expiresAt','isPrimary','\x20\x20\x20\x20\x20\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','[okdb-cluster]\x20respawning\x20worker\x20slot=','_computeStatus','getClock','\x20\x20\x20\x20usage:\x20\x20\x20','config\x20file\x20invalid:\x20','already\x20in\x20use','Sync','number','_desiredOverlay','_ensureTokensType','\x20licenses','split','attachFeed','_drainOne','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','race','isHeld','INDEX_RESET','raw-remove','_onPoke','children','digest','inspect','auth','blob','processor:paused','_children','type','wrong_node','assertLimit','_servingEngines','_cursors','OKDBTypeAlreadyRegisteredError','_handleInProcess','unknown','LICENSE_INVALID','\x20\x20Error:\x20','type/users/item/alice\x20--env\x20staging','[okdb-cluster]\x20primary\x20pid=','\x20HTTP\x20server(s)\x20on\x20port\x20','single','terminal','resolve','noAdmin','rss','\x20file','user','dumpedAt','\x20│\x20','\x20(must\x20be\x201–65535)','attach','sha256','pid','OPEN','_ownMeta','functions','next','isTTY','[okdb]\x20cluster\x20primary\x20pid=','Build\x20expects\x20public\x20key\x20fingerprint\x20','\x20for\x20commands,\x20','{}[]:,\x0a\x0d\x09\x20','features','\x20SECURITY\x20NOTICE','cluster','\x20\x20\x20\x20\x20\x20','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','address','fts:','\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','dynamic','\x20bytes,\x20need\x20>=\x2065)','okdb-writer:\x20env\x20closing\x20—\x20retry','flushDebounce','[okdb]\x20starting…\x0a','252470uYpUPa','quantum','envs','_license','publishChildRow','registerFts','engines','time','node','\x20to\x20quit.','INDEX_NOT_REGISTERED','\x22\x20to\x20enable\x20it.','timeMachine','ttlMs','embeddings','equals','OKDB-PIN-V1:','OKDBInvalidPrimaryKeyError','mkdirSync','13086171FUAlpI','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','list','index:progress','allocUnsafe','_lastCpuUsage','_windowCbs','setupPrimary','forEach','resetReadTxn','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','every','alloc','item:create','\x0a\x20\x20✓\x20License\x20added','_rawDb','received\x20','_supervisorKey','views','put','\x0a[okdb]\x20fatal\x20error:','body','--no-cluster','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','SCHEMA_VALIDATION_FAILED','\x20\x20Expected\x20one\x20of:','--types','--address','\x20env','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','level:\x20info','\x1b[33m','_startHeartbeat','expires','\x20\x20\x20\x20port:\x20\x20\x20\x20','max','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','instances','isWanted','setSchema','\x0a\x20\x20okdb\x20doctor\x0a','default:\x20cores−1\x20=\x20','--grants','safety','FOREIGN_KEY_VIOLATION','OKDBTypeNotRegisteredError','_caps','\x20logs\x20on\x20\x20','\x20\x20(licensee:\x20','setDesired','logLevel','prototype','\x22\x20matches\x20','--log-requests','260193slKCDf','consecutiveFailures','getCmd','no\x20.kdbconfig\x20(using\x20defaults)','\x20\x20\x20\x20','existsSync','external','[okdb]\x20exporting\x20blobs…','cursorKey','uuid','ENVS','_putRowAsync','license:added','SIGBREAK','/api','bumpCmd','[okdb]\x20error:\x20failed\x20to\x20read\x20','Records','_highWater','slot','catch','name','\x20worker(s)\x20still\x20serving','syncPeers','isArray','[filter]','.kdb_history','[okdb]\x20loaded\x20config:\x20','envs=','putNode','reload','processorId','repeat','ms/','info','_closed','SIGTERM','processor:resumed','string','sizeBefore','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.',':\x20expected\x20','revoke','_cmd','Embeddings','_desired','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20died\x20','okdb-http-worker-child.js','path','\x20result','\x20\x20\x20\x20licensee:\x20\x20','\x20\x20\x20\x20features:\x20\x20','oldestPendingMs','env','TYPES','--env\x20<name>','\x20\x20╔═══════════════════════════╗','signalWant','logs','index:ready','running','./okdb-export.ndjson','\x1b[0m','[okdb-cluster]\x20worker\x20pid=','clusterWorkers','rmSync','mcp','\x20\x20(need\x20≥\x2018)','sizeAfter','/type/users/query\x0a\x20\x20\x20\x20','\x20to\x20browse\x20the\x20API,\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','ITEM_CREATE','floor','\x20—\x20','Unique\x20constraint\x20violated\x20on\x20','Invalid\x20index\x20key\x20type\x20for\x20\x27','debug','kill','_onItem','dbPath','ready','\x20\x20http://localhost:','processors/','[okdb-cluster]\x20slot=','concat','\x0a\x0a\x20\x20','--test','exit','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','stop','\x20\x20\x20\x20status:\x20\x20\x20\x20active','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','identity','Invalid\x20license\x20blob:\x20','password','[okdb]\x20invalid\x20log\x20level:\x20\x22','[okdb]\x20backing\x20up\x20to\x20','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',',\x20signal=','No\x20tokens.','entries','\x20\x20\x20\x20license:\x20','building','slice','_changefeed','replace','[okdb]\x20created\x20.kdbconfig','some','SYSTEM_POKE','\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','_draining','events','\x20which\x20does\x20not\x20exist','ESRCH','stdout','updatedAt','detachConsole','markClosed','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','_isFree','hint','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','meta','acquiredAt','LOGS','dim','_activateProcesses','ORPHAN\x20(env-closed\x20write)','options','_lastCpuAt','all','\x1b[37m','\x0a\x20\x20Joining\x20cluster\x20at\x20','trimStart','_nodeDb','_nodeDbCache','standard','<path>','fromEntries','writes=','_isWriter','call','licenseHash','INDEX_REGISTERED','OKDBUniqueConstraintError','~licenses','importFromFile','maxMs','issuedAt','ceil','env/staging/info',',\x20label:\x20','_onTick','\x20references\x20','treeView','transactionSync','node:crypto','created','role','online','blobs','access:\x20','afterWrite','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','add','--open',')\x20exited\x20','INDEX_PROGRESS','cluster:','finally','--workers','permissions','warn','\x20\x20✓\x20','peers=','tags:\x20','registry\x20publish\x20failing:\x20','type/','assign','OKDB_HTTP_WORKERS\x20env','\x20opening\x20','\x20\x20\x20\x20\x20http://localhost:','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','set','roles','Schema\x20validation\x20failed\x20for\x20','--help','verify','_heartbeatInFlight','writeUInt32BE','%),\x20','ROUTES','FEATURES','other','system:poke','pending','_done','Admin','\x20\x20✗','stopping','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','reason','type/users/query\x20{\x22active\x22:true}','10VyStaH','indexOf','OKDBIndexAlreadyRegisteredError','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','listLicenses','recordWrite','deregisterSelf','platform','licensed','_drain','--no-admin','init','_groupByProcess','effective','--env','\x27\x20doesn\x27t\x20exist','txn:rollback','__vocab/version','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','hostname','white','embedded','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','changes','hasType','\x20\x20\x20\x20limits:\x20\x20\x20\x20','summary','_singletonLocks','dedupeMax','--username','shutting\x20down…\x0a',':want','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','[okdb]\x20import\x20complete','_rootDb','_acquiredAt','\x22\x20already\x20exists','records','ms\x20max=','writeUInt8','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x0a[okdb]\x20error:\x20','_pending','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','env/:env','api','question','\x20documents\x20fail\x20validation','updateSupervisedChildStats','token','count','Environments','\x1b[34m','draining','types','[okdb]\x20close\x20error:\x20','\x20\x20\x20\x20permissions:\x20','push','toUpperCase','_ensureDesired','files','ms\x20(attempt\x20','index:drop','(empty)','history','_handlePoke','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','203wgtZPu','exec','create','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','database\x20path\x20writable:\x20','--label','get','Invalid\x20primary\x20key\x20type:\x20','respawnTimer','claims','clearThreadStats','noteListenAddr','indexToDb','start\x20','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','.log','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','round','\x27\x20already\x20registered','_heartbeatTimer','resetting','payload','\x20\x20records=','flushLmdb','--drop','.okdb-write-test','_admissionTimer','INVALID_INDEX_KEY','listDesired','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','_log','_collectWriterFacet','label','join','~processes','_role','exports','creating','sync:apply','darwin','_publishNow','\x20\x20\x20\x20addedAt:\x20\x20\x20','\x20→\x20POST\x20/api/env/','title','\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','_inflight','_singletonLock','PATCH','[okdb]\x20importing\x20','length','\x20\x20[','OKDBIndexHasConsumersError','delete','dropFts','_nodeDead','release','envsOpen','heapTotal','LICENSED_BUILD','decoded','getCount','\x20license(s)','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','Index\x20\x22','_threadStats','execArgv','[okdb]\x20invalid\x20port:\x20','ephemeral','resetFts','item:remove','[okdb]\x20error:\x20','\x20statusEnv=','close','find','__OKDB_PUB_FINGERPRINT__','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','trim','killable','\x20@\x20','isConnected','Engines','[env]','_collectSingletonClaims','enable','_quantum','getSecurityNotices','EXIT','argv','license:removed','_migrateVocab','mode','pin','randomUUID','{}[]:,\x27\x22','\x20\x20·\x20\x20','_buildProcessingFacet','offWindow','expired','sort','drain','system:ready','setOwnMeta','addSupervisedChild','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','fast','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','http.workers','idx:','process\x20','failures','toString','openDB','readUInt8','open','licensee','listenAddr','noRepl','[okdb]\x20port\x20','_writer','prependListener','_onProcEvent','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','parkedNow','\x20log\x20level:\x20','dest','size','registerType','--inspect','Invalid\x20activation\x20token:\x20','ms\x20activeWriters=','\x20records','__okdbSlot','object','../',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','License\x20limit\x20exceeded:\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/','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20',',\x20stopping\x20workers…\x0a','\x27:\x20','_baselines','halted','_lastCpuPct','assertFeature','\x20environment\x20','async','_markSeen','remove','\x20\x20\x20\x20expires:\x20\x20\x20','maxExtra','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','bus:type_drop','__writeCounter',']\x20already\x20maps\x20to\x20\x27','registry-publish','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','clear','system:stopped','types/env=','No\x20license\x20found\x20matching\x20this\x20activation\x20token','inflightAgesMs','isFile','update','[okdb]\x20created\x20./okdb-data','EXPIRES','net','startsWith','crypto','\x20\x20+','removeNode','_wantDb','./okdb-backup','targetKey','result','MALFORMED_TOKEN','detectInputType','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x20active\x20env:\x20','TYPE_ALREADY_REGISTERED','operation','\x1b[1m','id:\x20','workersConfigured','\x20more','cpuPct','license','beforeWrite','fts:reset','_statusEnv','win32','typesPerEnv','okdb.pid','config','processingStatusView','STATUS','green','SIG_INVALID','\x0d[okdb]\x20blobs:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','emit','types\x20--env\x20staging','\x20\x20⚠\x20\x20','_buckets','900447asIJGj','heapUsed','http','8964352uDkzUP','OKDBSchemaValidationError','\x20\x20Shell\x20commands','[okdb]\x20started\x20in\x20','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20writes\x20(','processor:progress','(add\x20a\x20license\x20first)','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','--config','memoryUsage','QUIT','txn:start','data','scrypt','Feature\x20not\x20licensed:\x20','fts','stats','[okdb]\x20exported\x20\x20types=','SYSTEM_PROC','_hbTimer','supervisorKey','writeUInt16BE','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20\x20All\x20checks\x20passed.\x0a','bus:proc','confirm','processorsView','hasDesired','ALREADY_EXISTS','\x20MB\x20→\x20','error:\x20','columns','--version','putSync','map','\x1b[31m','./okdb-data','processor:retry','LABEL','\x20\x20(unlimited)','\x1b[32m','PUT','prompt','removeSupervisedChild','view:progress','free\x20tier','help','--ttl','active','\x20already\x20exists','_lookupByName','dead','limits','listen','shift','input:\x20','INDEX_ALREADY_REGISTERED','shutdown','port','\x1b[2m','\x20\x20Usage:','method','_processStartedAt','\x20\x20Some\x20checks\x20failed.\x0a','processing','\x20writer{depth=','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','workers','hidden','cpuUsage','transport:\x20','fill','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','Bearer\x20',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_outstanding','\x20sync','listening','node:events','once','http-server','9305065roZHbU','LICENSE_ACTIVATION_INVALID','\x20\x20(no\x20env\x20draining)','shmbufNative','/admin/index.html','\x20\x20#','tags','toFixed','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x20phase=','/type/users/item/alice\x0a\x20\x20\x20\x20','_adminRelay','transport','loadEnvFile','fn-runner','view','\x20\x20Common\x20causes:','[okdb]\x20blobs:\x20imported=','min','http://localhost:','process','true','_dedupeMax','msg','stopped','_enqueuedAt','decodeLicenseBlob','val','listNodes','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','ttl','SYSTEM_STOPPED','level','_bpParkedTotal','typeSubDbs','ENV_CLOSING_RETRY','register','indexes','line','[okdb]\x20imported\x20\x20types=','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','_durs','clearTtl','mean','setPrompt','exportBlobs','code','default','holder','ingest','shmbuf/package.json','\x0a\x20\x20✓\x20License\x20activated','system','hard-killed','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','bus:env_release','application/json','isInteger','_onStop','freeze','utf8','Processors','disconnect','~processes:desired','36zkzlOJ','\x20records…','SYNC_COMMITS','migrate','unclaimed','_clusterWorkerAttached','\x20\x20score:','exp','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','writeFileSync','License\x20signature\x20invalid:\x20','change','127.0.0.1','fanout','cpuWindowMs','red','_refreshDesiredSnapshot','access','getChanges','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','depth','SWAP','env/','yellow','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','_scheduleFlush','_active','liveThreadStats','toLocaleString','load','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','boolean','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x27\x20on\x20type\x20\x27','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20day(s).','INVALID_VALUE','_bpWaiters','procmodeack/','\x0a\x20\x20License\x20details:','startedAt','okdb','GET','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','createHash','base64url','VIEW_PROGRESS','\x20\x20║','cluster-wide','CREATED','\x20\x20\x20\x20path:\x20\x20\x20\x20','\x20drainAge=','instanceId','fts:registered','primary','INDEX_READY','[okdb]\x20preserved:\x20','logRequests','dirname','\x20===','captureStackTrace','_nodeDbFor','_flushDebounce','keys/public.pem','padEnd','fork','reverse','username','\x20\x20Usage:\x20','type/users','use','from','\x20months\x20from\x20issuance)','__identity','cluster:\x20ready\x20(','\x0a\x20\x20','_removeRowAsync','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','--permissions','SCHEMA_COLLECTION_INVALID','--log-level','Indexes','doctor','--name','\x20HTTP\x20workers\x20','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_instanceId','_lockDb','createEnvironment','listRoutes','\x20\x20\x20\x20\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/','event','[okdb]\x20exporting\x20env\x20\x22','values','\x1b[36m','licenses','\x20worker\x20slot=','\x22.\x20Use:\x20create,\x20list,\x20revoke','\x20while\x20this\x20process\x20runs\x20','activateLicense','\x20\x20Writes:\x20\x20','randomBytes','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','message','0123456789ABCDEFGHJKMNPQRSTVWXYZ','_envs','OKDBNotFoundError','createdAt','queue/','\x20\x20✓\x20OKDB\x20server\x20running','\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','\x22\x20→\x20',');\x20','maxWrites','\x0a===\x20OKDB_DIAG\x20','getDesired','sub','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','REMOVE','\x20/\x20','HTTP\x20','rawBuf','--print','force','SIGKILL','--token','import','readline','\x20\x20Flags','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','_buildOwnRow','processor','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','removeSync','licenseType','_openEnvLazy','toISOString','\x20\x20\x20\x20\x20\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','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','version','runtimeProcessesView','\x20+\x20','use\x20<env>','inputSchema','LICENSE_EXPIRED_ACTION','_committed','ppid','--changes','\x0a\x20\x20\x20\x20','byteLength','LICENSE_FEATURE_DISABLED','xdg-open\x20','(no\x20types)','ftsName','_licenseHash','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','firstTs','_listenAddr','_flushTimer','stdin','nodesView','_lock','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','magenta','available','okdb-diag.','createInterface','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20(','\x22\x20on\x20\x22','der','FTS_REGISTERED','Foreign\x20key\x20violation:\x20','_buildChildRow','waiting','_lastPublishAt','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','.kdbconfig','caps','toLowerCase','fieldPath','busy','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','started','\x27,\x20cannot\x20map\x20to\x20\x27','stack','nodeKey','commit','expiry','getRange','tryAcquire','cyan','_started','4TXEwMd','[okdb]\x20opening\x20','now','bold','_getType','off','rowKey','pushEphemeral','License\x20expired\x20or\x20invalidated','decommission','schema:set','\x20(expires\x20in\x20','isWorker','ms\x20p99=','index:reset','_timer','_putRowSync','tierList','\x0a[okdb]\x20received\x20','_seen','publishOwnRow','none','write','ms\x20mean=','_selfKey','threads','--eval','\x0a\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','license:activated','admin','[okdb]\x20nothing\x20to\x20reset\x20—\x20','[okdb]\x20reset:\x20','\x20envs','export','standalone','timingSafeEqual','uptime','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','extend','includes','Shutting\x20down\x20due\x20to\x20license\x20expiry','_key','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','listAll','entry','queue','System','_coordinator','--key','env:removed','readUInt16BE','workersFlag','selfKey','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','decommissioned','CHANGEFEED_QUANTUM','92sJxekN','ACTIVATION_EXPIRED','function','startHeartbeat','filter','type:drop','cause','routes','LICENSE_HASH_MISMATCH','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20\x20⚠','_wantDbHandle','connected','feed:','processors','ref:violation','\x22\x20is\x20used\x20by:\x20','types:','current','noCluster','disable','keys','_isClusterController','(on\x20any\x20path\x20command)','type/users\x20--help','Cannot\x20delete\x20','\x22\x20(must\x20be\x20debug|info|warn|error)','getPins','EADDRINUSE','activation','worker','UNIQUE_CONSTRAINT','PUB_FINGERPRINT','~lock','\x20parkedNow=','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','_sampleOwnStats','test','isDead','\x20MB)','_versionSkewWarned','processor:error','index','derivePin','PUBLIC_KEY_PEM','readFileSync','verifyActivation','processes','database\x20path\x20not\x20writable:\x20','(primary\x20=\x20processor)','\x20forked\x20','VERB','lifecycle','properties','handle','\x20\x20\x20http://localhost:','clearLine','error','[okdb]\x20closed\x20cleanly\x0a','addLicense','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','--no-repl','gray','cpus','--port','host','deaths','Version\x20mismatch\x20for\x20','[okdb]\x20reset\x20aborted','reset','--password','system:env_release','_lastCpuWindowMs','port\x20','send','value','__okdbCluster','\x20\x20changes=','\x20\x20\x20\x20graceful\x20shutdown\x0a','SIGINT','hex','/type/users\x0a\x20\x20\x20\x20','_report','pause','\x20\x20Path\x20access',':\x20key\x20[','childTransaction','padStart','_isReader','_db','transaction','_released','readUInt32BE','unlinkSync','~tokens','system:type_drop','[body]','/api/','selfAddress','\x20\x20\x20\x20\x20\x20\x20','key','copy','createHmac','\x20worker(s)\x20remaining','has','\x20already\x20in\x20use','[okdb]\x20export\x20complete','config\x20file\x20valid:\x20','backup','node\x20','start','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x20pid=','charCodeAt','null','\x20\x20env=','singletonClaims','kind','[okdb-cluster]\x20','NAME','claimGated','USE','namespace','invalid','\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','2.0.4','parse','constructor','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','search','log','_rowKey','ITEM_REMOVE','heartbeatMs','enabled','_enableChangelog','bind','type:registered','_kind','(none)','status','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','\x20\x20(name:\x20'];_0x5e80=function(){return _0x2f59ec;};return _0x5e80();}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4b2159=_0x18fcc0;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x42e8b0}=require$$0$5,_0x479782=requireOkdbDiag(),_0x5b87fe=process.env.OKDB_COMMIT_MODE===_0x4b2159(0x54f);class _0x66f5fc{constructor(_0x6381d4){const _0x259516=_0x4b2159;this[_0x259516(0x162)]=_0x6381d4,this[_0x259516(0x269)]=new Set(),this[_0x259516(0x377)]=new Map(),this[_0x259516(0x432)]=0x0,this[_0x259516(0x387)]=[],this[_0x259516(0x1f2)]=[],this['_highWater']=Math[_0x259516(0x5e4)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x259516(0x358)]=0x0,this[_0x259516(0x3c4)]=[],this[_0x259516(0x37f)]=0x0;}async[_0x4b2159(0x4f5)](_0x476bdf,_0x5e1a7e){const _0x52b749=_0x4b2159;if(_0x479782['isEnabled']())_0x479782[_0x52b749(0x1fe)](this[_0x52b749(0x162)]?.['name'],_0x5e1a7e);if(this[_0x52b749(0x61a)]){const _0x113ae6=new Error(_0x52b749(0x5ab));_0x113ae6[_0x52b749(0x38c)]=_0x52b749(0x381);throw _0x113ae6;}if(this['_highWater']>0x0){let _0x217a38=![];while(this[_0x52b749(0x358)]>=this[_0x52b749(0x609)]&&!this['_closed']){!_0x217a38&&(_0x217a38=!![],this[_0x52b749(0x37f)]++),await new Promise(_0xccceea=>this['_bpWaiters']['push'](_0xccceea));}if(this[_0x52b749(0x61a)]){const _0x24354e=new Error(_0x52b749(0x5ab));_0x24354e[_0x52b749(0x38c)]=_0x52b749(0x381);throw _0x24354e;}}this[_0x52b749(0x358)]++;const _0x2abea4=this[_0x52b749(0x162)][_0x52b749(0x492)];if(_0x2abea4)await _0x2abea4[_0x52b749(0x2f6)]();if(this['_closed']){if(_0x2abea4)_0x2abea4[_0x52b749(0x1d0)]();this['_outstanding']--;if(this[_0x52b749(0x3c4)]['length']&&this[_0x52b749(0x358)]<this[_0x52b749(0x609)])this[_0x52b749(0x3c4)][_0x52b749(0x341)]()();const _0x90ee91=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x90ee91[_0x52b749(0x38c)]=_0x52b749(0x381);throw _0x90ee91;}const _0x3008ae=_0x42e8b0['now']();if(_0x5b87fe)try{const _0x3355a7=this[_0x52b749(0x162)]['db'][_0x52b749(0x1c9)](_0x476bdf);this['_committed']++;if(this[_0x52b749(0x387)]['push'](_0x42e8b0[_0x52b749(0x464)]()-_0x3008ae)>0x100)this['_durs'][_0x52b749(0x341)]();if(this[_0x52b749(0x1f2)][_0x52b749(0x232)](_0x42e8b0[_0x52b749(0x464)]())>0x800)this[_0x52b749(0x1f2)][_0x52b749(0x341)]();return _0x3355a7;}finally{this[_0x52b749(0x358)]--;if(this['_bpWaiters'][_0x52b749(0x26d)]&&this[_0x52b749(0x358)]<this['_highWater'])this['_bpWaiters']['shift']()();if(_0x2abea4)_0x2abea4[_0x52b749(0x1d0)]();}const _0x24c7eb=this['env']['db'][_0x52b749(0x4f1)](_0x476bdf);this[_0x52b749(0x269)][_0x52b749(0x1d2)](_0x24c7eb),this[_0x52b749(0x377)][_0x52b749(0x1e5)](_0x24c7eb,_0x3008ae);const _0x505752=()=>{const _0x26f869=_0x52b749;this['_inflight']['delete'](_0x24c7eb),this[_0x26f869(0x377)][_0x26f869(0x270)](_0x24c7eb),this[_0x26f869(0x432)]++,this[_0x26f869(0x358)]--;this[_0x26f869(0x3c4)][_0x26f869(0x26d)]&&this[_0x26f869(0x358)]<this[_0x26f869(0x609)]&&this['_bpWaiters'][_0x26f869(0x341)]()();if(this[_0x26f869(0x387)][_0x26f869(0x232)](_0x42e8b0[_0x26f869(0x464)]()-_0x3008ae)>0x100)this[_0x26f869(0x387)][_0x26f869(0x341)]();if(this[_0x26f869(0x1f2)]['push'](_0x42e8b0[_0x26f869(0x464)]())>0x800)this[_0x26f869(0x1f2)][_0x26f869(0x341)]();};_0x24c7eb[_0x52b749(0x539)](_0x505752,_0x505752);try{return await _0x24c7eb;}finally{if(_0x2abea4)_0x2abea4['afterWrite']();}}['status'](){const _0x82887b=_0x4b2159,_0x43b45a=_0x42e8b0[_0x82887b(0x464)]();let _0x99d433=0x0;for(const _0x492d9a of this[_0x82887b(0x377)][_0x82887b(0x3fc)]()){const _0x3bd723=_0x43b45a-_0x492d9a;if(_0x3bd723>_0x99d433)_0x99d433=_0x3bd723;}let _0x543885=0x0;for(let _0x55d42f=this[_0x82887b(0x1f2)][_0x82887b(0x26d)]-0x1;_0x55d42f>=0x0;_0x55d42f--){if(_0x43b45a-this[_0x82887b(0x1f2)][_0x55d42f]>0x3e8)break;_0x543885++;}let _0x1eb4e8=0x0;if(this[_0x82887b(0x387)]['length']){const _0x2f0a1e=[...this['_durs']][_0x82887b(0x29e)]((_0x50da50,_0x30ccba)=>_0x50da50-_0x30ccba);_0x1eb4e8=_0x2f0a1e[Math[_0x82887b(0x370)](_0x2f0a1e[_0x82887b(0x26d)]-0x1,Math['floor'](_0x2f0a1e[_0x82887b(0x26d)]*0.99))];}return{'depth':this[_0x82887b(0x269)][_0x82887b(0x2b9)],'oldestPendingMs':Math['round'](_0x99d433),'committed':this[_0x82887b(0x432)],'commitsPerSec':_0x543885,'commitP99Ms':Math[_0x82887b(0x24d)](_0x1eb4e8),'parkedNow':this['_bpWaiters']['length'],'parkedTotal':this[_0x82887b(0x37f)],'highWater':this[_0x82887b(0x609)]};}[_0x4b2159(0x2dc)](){const _0x3cf94c=_0x4b2159,_0x176cdf=_0x42e8b0[_0x3cf94c(0x464)]();return[...this['_enqueuedAt']['values']()][_0x3cf94c(0x32d)](_0x51a2af=>Math[_0x3cf94c(0x24d)](_0x176cdf-_0x51a2af))[_0x3cf94c(0x29e)]((_0x1451c9,_0xceb34f)=>_0xceb34f-_0x1451c9);}[_0x4b2159(0x1a3)](){const _0x158fda=_0x4b2159;this[_0x158fda(0x61a)]=!![];for(const _0x4c8804 of this[_0x158fda(0x3c4)]['splice'](0x0))_0x4c8804();}async[_0x4b2159(0x29f)](){const _0x6a5fb5=_0x4b2159;let _0xff3831=0x0;while(this[_0x6a5fb5(0x269)][_0x6a5fb5(0x2b9)]&&_0xff3831++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async['put'](_0x450130,_0x495444,_0x4fbb12,_0x398961){const _0x255407=_0x4b2159;return this[_0x255407(0x4f5)](()=>{const _0x37caa8=_0x255407;if(_0x398961===undefined)_0x450130['putSync'](_0x495444,_0x4fbb12);else _0x450130[_0x37caa8(0x32c)](_0x495444,_0x4fbb12,_0x398961);},_0x255407(0x53d));}async[_0x4b2159(0x2cf)](_0x290aae,_0xc2c659){const _0x4513ae=_0x4b2159;return this[_0x4513ae(0x4f5)](()=>_0x290aae[_0x4513ae(0x426)](_0xc2c659),_0x4513ae(0x575));}}async function _0x39415d(_0xbab52e,_0x2e053a){const _0x218b22=_0x4b2159;if(_0x2e053a==null)_0x2e053a=Math[_0x218b22(0x5e4)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1534f1=_0xbab52e?.['flushed'];if(!_0x1534f1||typeof _0x1534f1[_0x218b22(0x539)]!=='function')return;await Promise[_0x218b22(0x572)]([Promise[_0x218b22(0x58d)](_0x1534f1)[_0x218b22(0x60b)](()=>{}),new Promise(_0x5ea05f=>{const _0x1d0e07=_0x218b22,_0x395612=setTimeout(_0x5ea05f,_0x2e053a);if(_0x395612[_0x1d0e07(0x52b)])_0x395612[_0x1d0e07(0x52b)]();})]);}catch{}}function _0x767b07(_0x105124){const _0xd3302d=_0x4b2159;if(_0x5b87fe)return Promise[_0xd3302d(0x58d)]();const _0x34d03f=_0x105124?.['committed'];return _0x34d03f&&typeof _0x34d03f[_0xd3302d(0x539)]==='function'?_0x34d03f:Promise[_0xd3302d(0x58d)]();}return okdbWriter['exports']=_0x66f5fc,okdbWriter[_0x4b2159(0x260)][_0x4b2159(0x253)]=_0x39415d,okdbWriter[_0x4b2159(0x260)]['committed']=_0x767b07,okdbWriter[_0x4b2159(0x260)][_0x4b2159(0x3a0)]=_0x5b87fe,okdbWriter[_0x4b2159(0x260)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x449160=_0x18fcc0;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x551223=require$$0,{SYNC_COMMITS:_0x1c3a82}=requireOkdbWriter(),_0x459421=_0x449160(0x4bc);class _0x35d917{constructor(_0x3ddfec,_0x25f71f,_0x432225){const _0x5863e4=_0x449160;this[_0x5863e4(0x442)]=_0x3ddfec,this[_0x5863e4(0x48c)]=_0x25f71f,this['_acquiredAt']=_0x432225,this['_released']=![],this[_0x5863e4(0x24f)]=null,this[_0x5863e4(0x1ea)]=null;}[_0x449160(0x573)](){const _0x2434ea=_0x449160;if(this[_0x2434ea(0x4f6)])return![];try{const _0x517e4f=this[_0x2434ea(0x442)][_0x2434ea(0x4f4)]()[_0x2434ea(0x242)](this[_0x2434ea(0x48c)]);if(!_0x517e4f||_0x517e4f['acquiredAt']!==this[_0x2434ea(0x21c)])return![];const _0x180afc=_0x517e4f['updatedAt']??_0x517e4f[_0x2434ea(0x1a9)];if(_0x180afc+_0x517e4f[_0x2434ea(0x5bb)]<Date[_0x2434ea(0x464)]())return![];return!![];}catch{return!this['_released'];}}[_0x449160(0x38e)](){const _0x2db60b=_0x449160;if(this[_0x2db60b(0x4f6)])return null;try{return this['_lock'][_0x2db60b(0x4f4)]()[_0x2db60b(0x242)](this[_0x2db60b(0x48c)])??null;}catch{return null;}}async[_0x449160(0x489)](_0x5c1d98){const _0x6975b8=_0x449160;if(this[_0x6975b8(0x4f6)])return;try{const _0x294d81=this[_0x6975b8(0x442)][_0x6975b8(0x4f4)]()[_0x6975b8(0x242)](this['_key']);if(!_0x294d81||_0x294d81[_0x6975b8(0x1a9)]!==this[_0x6975b8(0x21c)])return;if(_0x1c3a82)this[_0x6975b8(0x442)][_0x6975b8(0x4f4)]()[_0x6975b8(0x32c)](this[_0x6975b8(0x48c)],{..._0x294d81,'ttlMs':_0x294d81[_0x6975b8(0x5bb)]+_0x5c1d98});else await this[_0x6975b8(0x442)]['_db']()['put'](this[_0x6975b8(0x48c)],{..._0x294d81,'ttlMs':_0x294d81['ttlMs']+_0x5c1d98});}catch{}}async[_0x449160(0x273)](){const _0x5b83a6=_0x449160;if(this[_0x5b83a6(0x4f6)])return;if(this[_0x5b83a6(0x1ea)])try{await this[_0x5b83a6(0x1ea)];}catch{}clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null,this[_0x5b83a6(0x4f6)]=!![];try{const _0x263c6d=this[_0x5b83a6(0x442)]['_db']()['get'](this[_0x5b83a6(0x48c)]);if(_0x263c6d&&_0x263c6d[_0x5b83a6(0x1a9)]===this['_acquiredAt']){if(_0x1c3a82)this[_0x5b83a6(0x442)][_0x5b83a6(0x4f4)]()['removeSync'](this[_0x5b83a6(0x48c)]);else await this['_lock'][_0x5b83a6(0x4f4)]()['remove'](this[_0x5b83a6(0x48c)]);}}catch{}}[_0x449160(0x5e1)](_0x9c38b5,_0xff8669){const _0x3720ad=_0x449160,_0x1301e9=_0xff8669??Math['floor'](_0x9c38b5/0x3);this[_0x3720ad(0x24f)]=setInterval(()=>{const _0x3b68c7=_0x3720ad;if(this[_0x3b68c7(0x4f6)])return;this['_heartbeatInFlight']=((async()=>{const _0x41d226=_0x3b68c7;try{const _0x24194c=this[_0x41d226(0x442)][_0x41d226(0x4f4)]()[_0x41d226(0x242)](this[_0x41d226(0x48c)]);if(!_0x24194c||_0x24194c[_0x41d226(0x1a9)]!==this['_acquiredAt']){this[_0x41d226(0x4f6)]=!![],clearInterval(this[_0x41d226(0x24f)]),this[_0x41d226(0x24f)]=null;return;}if(_0x1c3a82)this[_0x41d226(0x442)][_0x41d226(0x4f4)]()[_0x41d226(0x32c)](this[_0x41d226(0x48c)],{..._0x24194c,'updatedAt':Date['now']()});else await this['_lock']['_db']()[_0x41d226(0x5d4)](this[_0x41d226(0x48c)],{..._0x24194c,'updatedAt':Date['now']()});}catch{}this[_0x41d226(0x1ea)]=null;})());},_0x1301e9);if(this['_heartbeatTimer']['unref'])this[_0x3720ad(0x24f)]['unref']();}}class _0x4a6d7e{constructor(_0x554730,{namespace:_0x584db1,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x34dfe6=_0x449160;this['_rawDb']=_0x554730,this[_0x34dfe6(0x515)]=_0x584db1,this[_0x34dfe6(0x5bb)]=ttlMs,this[_0x34dfe6(0x520)]=heartbeatMs,this[_0x34dfe6(0x3f6)]=null;}[_0x449160(0x4f4)](){const _0x273320=_0x449160;return!this['_lockDb']&&(this[_0x273320(0x3f6)]=this[_0x273320(0x5d0)]['openDB'](_0x459421,{'dupSort':![]})),this['_lockDb'];}['_wantDb'](){const _0x2f4b90=_0x449160;return!this[_0x2f4b90(0x4a6)]&&(this['_wantDbHandle']=this[_0x2f4b90(0x5d0)][_0x2f4b90(0x2ab)](_0x459421+_0x2f4b90(0x218),{'dupSort':![]})),this[_0x2f4b90(0x4a6)];}[_0x449160(0x48c)](_0x5a8e25){const _0x58e287=_0x449160;return this[_0x58e287(0x515)]+':'+_0x5a8e25;}[_0x449160(0x166)](_0x3dac80){const _0x4ed87e=_0x449160;try{_0x1c3a82?this['_wantDb']()['putSync'](this[_0x4ed87e(0x48c)](_0x3dac80),Date['now']()):this[_0x4ed87e(0x2e6)]()[_0x4ed87e(0x5d4)](this[_0x4ed87e(0x48c)](_0x3dac80),Date['now']())?.[_0x4ed87e(0x60b)]?.(()=>{});}catch{}}[_0x449160(0x5e7)](_0x2da114,_0x26d126=0x3e8){const _0x3f97fb=_0x449160;try{const _0x53679e=this[_0x3f97fb(0x2e6)]()[_0x3f97fb(0x242)](this['_key'](_0x2da114));return typeof _0x53679e==='number'&&Date['now']()-_0x53679e<_0x26d126;}catch{return![];}}[_0x449160(0x554)](_0x264b3d){const _0x100a25=_0x449160,_0x304ec3=_0x264b3d['updatedAt']??_0x264b3d[_0x100a25(0x1a9)];return _0x304ec3+_0x264b3d['ttlMs']<Date['now']();}static['_holderDead'](_0x238d9a){const _0x23ee37=_0x449160,_0xbf4d16=_0x238d9a?.['holder'];if(!_0xbf4d16||typeof _0xbf4d16['pid']!=='number')return![];if(_0xbf4d16[_0x23ee37(0x20c)]!==_0x551223[_0x23ee37(0x20c)]())return![];if(_0xbf4d16[_0x23ee37(0x597)]===process[_0x23ee37(0x597)])return![];try{return process['kill'](_0xbf4d16['pid'],0x0),![];}catch(_0x24f8f1){return _0x24f8f1[_0x23ee37(0x38c)]===_0x23ee37(0x19f);}}async[_0x449160(0x45f)](_0x4287ce,_0x4e9222={},_0x2d2061={}){const _0x4f8e97=_0x449160,_0x16104a=this[_0x4f8e97(0x48c)](_0x4287ce),_0x44ab0a=_0x2d2061[_0x4f8e97(0x5bb)]??this[_0x4f8e97(0x5bb)],_0x204d5b=Date['now'](),_0x163480={'holder':{'pid':process[_0x4f8e97(0x597)],'hostname':_0x551223[_0x4f8e97(0x20c)](),..._0x4e9222},'acquiredAt':_0x204d5b,'updatedAt':_0x204d5b,'ttlMs':_0x44ab0a};let _0x16a9e9=![],_0x579c36=null;try{const _0x3e62c0=()=>{const _0x29c65f=_0x4f8e97,_0x197c80=this[_0x29c65f(0x4f4)]()['get'](_0x16104a);if(_0x197c80&&!this['_isStale'](_0x197c80)&&!_0x4a6d7e['_holderDead'](_0x197c80)){const _0x49efaf=_0x4e9222[_0x29c65f(0x616)]!=null&&_0x197c80['holder'][_0x29c65f(0x597)]===process['pid']&&_0x197c80[_0x29c65f(0x38e)][_0x29c65f(0x616)]===_0x4e9222['processorId'];if(!_0x49efaf){_0x16a9e9=![],_0x579c36=_0x197c80;return;}_0x163480['acquiredAt']<=_0x197c80[_0x29c65f(0x1a9)]&&(_0x163480[_0x29c65f(0x1a9)]=_0x197c80[_0x29c65f(0x1a9)]+0x1,_0x163480[_0x29c65f(0x1a1)]=_0x163480[_0x29c65f(0x1a9)]);}this[_0x29c65f(0x4f4)]()[_0x29c65f(0x5d4)](_0x16104a,_0x163480),_0x16a9e9=!![],_0x579c36=_0x163480;};if(_0x1c3a82)this[_0x4f8e97(0x4f4)]()[_0x4f8e97(0x1c9)](_0x3e62c0);else await this['_db']()[_0x4f8e97(0x4f1)](_0x3e62c0);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x16a9e9)return{'acquired':![],'handle':null,'current':_0x579c36};const _0xc650f4=new _0x35d917(this,_0x16104a,_0x163480[_0x4f8e97(0x1a9)]);return _0xc650f4[_0x4f8e97(0x5e1)](_0x44ab0a,this['heartbeatMs']),{'acquired':!![],'handle':_0xc650f4,'current':_0x579c36};}[_0x449160(0x579)](_0x1db8e){const _0x270182=_0x449160;try{return this[_0x270182(0x4f4)]()['get'](this[_0x270182(0x48c)](_0x1db8e))??null;}catch{return null;}}[_0x449160(0x5c3)](){const _0x2e191e=_0x449160,_0x422625=this[_0x2e191e(0x515)]+':',_0xd54923=[];try{for(const {key:_0x224a18,value:_0x325c5b}of this['_db']()['getRange']({'start':_0x422625,'end':_0x422625+'ÿ'})){typeof _0x224a18===_0x2e191e(0x61d)&&_0x224a18[_0x2e191e(0x2e2)](_0x422625)&&_0xd54923[_0x2e191e(0x232)]({'id':_0x224a18[_0x2e191e(0x195)](_0x422625['length']),'entry':_0x325c5b});}}catch{}return _0xd54923;}static[_0x449160(0x48e)](_0xb7f1a6){const _0x487e4e=_0x449160,_0x1ad3f9=[];try{const _0x4eab3a=_0xb7f1a6[_0x487e4e(0x2ab)](_0x459421,{'dupSort':![]});for(const {key:_0x26cf2b,value:_0x3ed88d}of _0x4eab3a[_0x487e4e(0x45e)]({})){if(typeof _0x26cf2b!==_0x487e4e(0x61d))continue;const _0x19b04d=_0x26cf2b[_0x487e4e(0x1fa)](':');if(_0x19b04d<0x1)continue;_0x1ad3f9['push']({'namespace':_0x26cf2b[_0x487e4e(0x195)](0x0,_0x19b04d),'id':_0x26cf2b[_0x487e4e(0x195)](_0x19b04d+0x1),'entry':_0x3ed88d});}}catch{}return _0x1ad3f9;}}return okdbLock={'OKDBLock':_0x4a6d7e},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x1c375d=_0x18fcc0;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x323964=require$$0,_0x26ef9c=require$$1$2,_0x2afafe=require$$0$1,{LOOP:_0x4497b6}=requireOkdbLoopMonitor(),{OKDBLock:_0x36d2e4}=requireOkdbLock(),{SYNC_COMMITS:_0x3ed81e}=requireOkdbWriter(),_0xe47bcb=_0x1c375d(0x25e),_0x1b6efc=_0x1c375d(0x5b6),_0xa36013=_0x1c375d(0x39d),_0x1b2ce5='~processes:cmd',_0x3cb075=(_0x168e3c,_0xe755b6)=>_0x168e3c+':'+_0xe755b6,_0x2a28f6=(_0x5bd8f1,_0x75534c)=>_0x5bd8f1+'::'+_0x75534c,_0xb2396c=(_0x37f943,_0x483f28)=>_0x37f943+'/'+_0x483f28,_0xe7be6c=(_0x5827c9,_0x347f3a)=>_0x5827c9+'#'+_0x347f3a,_0xcf541b=_0x3d7630=>{const _0x3ef155=_0x1c375d;if(_0x3d7630?.['processKey'])return _0x3d7630[_0x3ef155(0x531)];const _0x126ccc=_0x3d7630?.[_0x3ef155(0x45b)];return typeof _0x126ccc===_0x3ef155(0x61d)&&_0x126ccc[_0x3ef155(0x48a)]('#')?_0x126ccc[_0x3ef155(0x195)](0x0,_0x126ccc[_0x3ef155(0x1fa)]('#')):_0x126ccc;},_0x6f3ba5=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x36abce=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x42595b=_0x6f3ba5*0x3,_0x380821=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x42595b*0x14),_0x2561b0=[_0x1c375d(0x310),'processor:ready',_0x1c375d(0x330),_0x1c375d(0x4c4),_0x1c375d(0x57c),_0x1c375d(0x61c)];let _0x1da237=null;function _0x4dea5e(){if(_0x1da237==null)_0x1da237=Math['round']((Date['now']()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x1da237;}function _0x1649b8(_0x3fa5b1){const _0x2cfe7b=_0x1c375d;if(process.env.OKDB_PROCESS_KILL===_0x2cfe7b(0x467))return![];if(_0x3fa5b1?.[_0x2cfe7b(0x1ae)]?.[_0x2cfe7b(0x4ca)]&&typeof _0x3fa5b1[_0x2cfe7b(0x1ae)][_0x2cfe7b(0x4ca)]===_0x2cfe7b(0x2c0)&&_0x3fa5b1['options'][_0x2cfe7b(0x4ca)]['kill']===![])return![];return!![];}function _0x654614(_0x694008,_0x4a29b){const _0x57039a=_0x1c375d,_0x4e8373=!!_0x4a29b?.[_0x57039a(0x4a9)];switch(_0x694008){case _0x57039a(0x3d5):return{'controllable':_0x4e8373,'decommissionable':![],'killable':!![],'killConfirm':_0x57039a(0x3cf)};case _0x57039a(0x55b):case _0x57039a(0x485):return{'controllable':_0x4e8373,'decommissionable':![],'killable':!![],'killConfirm':_0x57039a(0x324)};case _0x57039a(0x20e):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x57039a(0x36c):case _0x57039a(0x4b9):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x57039a(0x41c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x38f4b0{constructor(_0x278f9a){const _0x2fc239=_0x1c375d;this[_0x2fc239(0x3c8)]=_0x278f9a,this[_0x2fc239(0x2f8)]=null,this['_desired']=null,this[_0x2fc239(0x56b)]=new Map(),this[_0x2fc239(0x157)]=null,this[_0x2fc239(0x1ba)]=![],this[_0x2fc239(0x4f3)]=![],this['_processStartedAt']=_0x4dea5e(),this[_0x2fc239(0x47a)]=_0x3cb075(process['pid'],this[_0x2fc239(0x349)]),this[_0x2fc239(0x3f5)]=_0x2afafe[_0x2fc239(0x298)]()['slice'](0x0,0x8),this['_rowKey']=_0xe7be6c(this[_0x2fc239(0x47a)],this['_instanceId']),this['_startedAt']=Date[_0x2fc239(0x464)](),this['_kind']=null,this[_0x2fc239(0x5d2)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x2fc239(0x2b4)]=null,this[_0x2fc239(0x1c6)]=null,this['_lastPublishAt']=0x0,this[_0x2fc239(0x599)]={},this['_children']=new Map(),this['_lastCpuUsage']=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x2fc239(0x464)](),this[_0x2fc239(0x2ca)]=0x0,this['_threadStats']=new Map();}get['selfKey'](){return this['_selfKey'];}get[_0x1c375d(0x468)](){const _0x3bb3c3=_0x1c375d;return this[_0x3bb3c3(0x51e)];}[_0x1c375d(0x5ef)](_0x370925,_0x2a98d6){const _0x55dbf0=_0x1c375d,_0x1d943b=_0x654614(_0x370925,_0x2a98d6);if(_0x1d943b[_0x55dbf0(0x289)]&&!_0x1649b8(this[_0x55dbf0(0x3c8)]))return{..._0x1d943b,'killable':![],'killConfirm':undefined};return _0x1d943b;}['isActive'](){return!!this['_statusEnv'];}[_0x1c375d(0x2a1)](_0x21189a){const _0x35e44f=_0x1c375d;Object[_0x35e44f(0x1e0)](this[_0x35e44f(0x599)],_0x21189a||{});}[_0x1c375d(0x247)](_0x3b541d){const _0x5c1c6e=_0x1c375d;if(_0x3b541d)this[_0x5c1c6e(0x43e)]=_0x3b541d;}[_0x1c375d(0x382)](_0x39b70d={}){const _0x155b4a=_0x1c375d;return this[_0x155b4a(0x3c8)]['_activateProcesses'](_0x39b70d);}[_0x1c375d(0x2fd)](){const _0x40ae26=_0x1c375d,_0x5f0f8e={};let _0x282f8c=0x0,_0x20a804=0x0;const _0x4ff65b=new Set();for(const _0x3de21d of this[_0x40ae26(0x37a)]()){_0x20a804++;const _0x4454c6=_0x3de21d[_0x40ae26(0x34b)];if(!_0x4454c6)continue;if(_0x4454c6['participate'])_0x282f8c++;for(const _0x2e66a2 of _0x4454c6[_0x40ae26(0x4a9)]||[]){if(![_0x40ae26(0x58b),_0x40ae26(0x3ab)][_0x40ae26(0x48a)](_0x2e66a2['mode']))continue;(_0x2e66a2[_0x40ae26(0x558)]===_0x40ae26(0x1cd)||_0x2e66a2[_0x40ae26(0x558)]===_0x40ae26(0x194))&&_0x2e66a2[_0x40ae26(0x5ff)]&&_0x4ff65b[_0x40ae26(0x1d2)]((_0x2e66a2[_0x40ae26(0x162)]||_0x40ae26(0x38d))+':'+_0x2e66a2[_0x40ae26(0x5ff)]);const _0x599308=_0x2e66a2[_0x40ae26(0x162)]||_0x40ae26(0x38d);(_0x5f0f8e[_0x599308]||=[])[_0x40ae26(0x232)]({..._0x2e66a2,'env':_0x599308,'owner':{'pid':_0x3de21d['pid']??null,'kind':_0x3de21d[_0x40ae26(0x510)]??null}});}}for(const [_0x29d14f,_0x292667]of Object['entries'](_0x5f0f8e)){for(const _0x5c4589 of _0x292667){if(_0x5c4589[_0x40ae26(0x296)]===_0x40ae26(0x58b)&&!_0x5c4589['claimGated']){const _0x3b820d=_0x29d14f+':'+(_0x5c4589['cursorKey']??'');if(!_0x4ff65b['has'](_0x3b820d))_0x5c4589[_0x40ae26(0x3a2)]=!![];}}}return{'envs':_0x5f0f8e,'policy':null,'participation':{'participating':_0x282f8c,'total':_0x20a804},'source':'workers'};}[_0x1c375d(0x325)](){const _0x83157f=_0x1c375d,_0x182523=_0x33b080=>{const _0x4986ec=_0x1ef7;if(_0x33b080['state']===_0x4986ec(0x1cd)||_0x33b080[_0x4986ec(0x558)]===_0x4986ec(0x194)||_0x33b080[_0x4986ec(0x558)]===_0x4986ec(0x4d4))return 0x3;if(_0x33b080[_0x4986ec(0x513)])return 0x1;return 0x2;},_0x1967b8=new Map();for(const _0x4fa82a of this[_0x83157f(0x37a)]()){for(const _0x58e7a of _0x4fa82a[_0x83157f(0x34b)]?.[_0x83157f(0x4a9)]||[]){const _0x3c9901={..._0x58e7a,'owner':{'pid':_0x4fa82a[_0x83157f(0x597)]??null,'kind':_0x4fa82a[_0x83157f(0x510)]??null,'host':_0x4fa82a[_0x83157f(0x4dc)]??null}},_0xcdb6b4=_0x58e7a[_0x83157f(0x296)]===_0x83157f(0x58b)?'1ofN:'+(_0x58e7a[_0x83157f(0x162)]??'')+'::'+(_0x58e7a[_0x83157f(0x5ff)]??_0x58e7a['type']??_0x58e7a['id']):'inst:'+(_0x4fa82a['nodeKey']??_0x4fa82a[_0x83157f(0x531)]??'')+'::'+(_0x58e7a['env']??'')+'::'+_0x58e7a['id'],_0x2db26a=_0x1967b8[_0x83157f(0x242)](_0xcdb6b4);if(!_0x2db26a||_0x182523(_0x3c9901)>_0x182523(_0x2db26a))_0x1967b8[_0x83157f(0x1e5)](_0xcdb6b4,_0x3c9901);}}return[..._0x1967b8[_0x83157f(0x3fc)]()];}['clusterStatusView'](){const _0x835464=_0x1c375d,_0x4e8c4b=Date[_0x835464(0x464)](),_0x231d0f=this[_0x835464(0x37a)](),_0x1d3881=_0x2ac413=>Math[_0x835464(0x5e4)](0x0,Math[_0x835464(0x24d)]((_0x4e8c4b-(_0x2ac413[_0x835464(0x3c7)]||_0x4e8c4b))/0x3e8)),_0x1987ab=_0x231d0f[_0x835464(0x285)](_0x329636=>_0x329636[_0x835464(0x510)]===_0x835464(0x3d5)),_0xb945aa=_0x231d0f['filter'](_0x2d652a=>_0x2d652a[_0x835464(0x510)]===_0x835464(0x35d));if(_0x1987ab||_0xb945aa[_0x835464(0x26d)])return{'primary':_0x1987ab?{'pid':_0x1987ab[_0x835464(0x597)],'uptime':_0x1d3881(_0x1987ab)}:null,'workers':_0xb945aa['map'](_0x46c6c3=>({'pid':_0x46c6c3[_0x835464(0x597)],'uptime':_0x1d3881(_0x46c6c3)})),'workersConfigured':_0x1987ab?.['meta']?.[_0x835464(0x2f2)]??_0xb945aa[_0x835464(0x26d)],'mode':_0x835464(0x5a3)};const _0x409df3=_0x231d0f[_0x835464(0x285)](_0x2c6a43=>_0x2c6a43['kind']===_0x835464(0x55b)||_0x2c6a43[_0x835464(0x510)]===_0x835464(0x485)||_0x2c6a43[_0x835464(0x510)]===_0x835464(0x20e)),_0x116f93=_0x409df3?{'pid':_0x409df3[_0x835464(0x597)],'uptime':_0x1d3881(_0x409df3)}:{'pid':process[_0x835464(0x597)],'uptime':Math['max'](0x0,Math[_0x835464(0x24d)](process[_0x835464(0x487)]()))};return{'primary':_0x116f93,'workers':[_0x116f93],'workersConfigured':0x1,'mode':'single'};}[_0x1c375d(0x441)](){const _0x28d052=_0x1c375d;return this[_0x28d052(0x205)]();}[_0x1c375d(0x1c8)](){const _0x4cb75d=_0x1c375d,_0x433ab4=new Map();for(const _0x287ae8 of this[_0x4cb75d(0x205)]())_0x433ab4[_0x4cb75d(0x1e5)](_0x287ae8[_0x4cb75d(0x531)],{..._0x287ae8,'children':[]});const _0x550dbf=[];for(const _0x2db861 of _0x433ab4[_0x4cb75d(0x3fc)]()){const _0x2bb9d5=_0x2db861[_0x4cb75d(0x31f)]?_0x433ab4[_0x4cb75d(0x242)](_0x2db861['supervisorKey']):null;if(_0x2bb9d5&&_0x2bb9d5!==_0x2db861)_0x2bb9d5[_0x4cb75d(0x577)]['push'](_0x2db861);else _0x550dbf[_0x4cb75d(0x232)](_0x2db861);}const _0x2945bd=(_0x23c51a,_0x4ebe94)=>_0x23c51a['kind']===_0x4ebe94[_0x4cb75d(0x510)]?(_0x23c51a['pid']||0x0)-(_0x4ebe94[_0x4cb75d(0x597)]||0x0):(_0x23c51a[_0x4cb75d(0x510)]??'')<(_0x4ebe94[_0x4cb75d(0x510)]??'')?-0x1:0x1,_0x3c3309=_0x3796f5=>{const _0x1e9e43=_0x4cb75d;_0x3796f5[_0x1e9e43(0x29e)](_0x2945bd);for(const _0x44bad0 of _0x3796f5)if(_0x44bad0[_0x1e9e43(0x577)][_0x1e9e43(0x26d)])_0x3c3309(_0x44bad0[_0x1e9e43(0x577)]);};return _0x3c3309(_0x550dbf),_0x550dbf;}['getProcess'](_0x1770b2){const _0x47e32b=_0x1c375d;return this['_groupByProcess']()['find'](_0x254874=>_0x254874[_0x47e32b(0x531)]===_0x1770b2)??null;}[_0x1c375d(0x205)](_0x1aec1f=Date[_0x1c375d(0x464)]()){const _0x2fd1d6=_0x1c375d,_0x2df3a1=new Map();for(const _0x27e541 of this[_0x2fd1d6(0x37a)]()){const _0x5417c9=_0xcf541b(_0x27e541);let _0x256703=_0x2df3a1[_0x2fd1d6(0x242)](_0x5417c9);!_0x256703&&(_0x256703={'processKey':_0x5417c9,'nodeKey':_0x5417c9,'pid':_0x27e541[_0x2fd1d6(0x597)],'ppid':_0x27e541[_0x2fd1d6(0x433)]??null,'host':_0x27e541['host']??null,'kind':_0x27e541[_0x2fd1d6(0x510)],'role':null,'supervisorKey':_0x27e541[_0x2fd1d6(0x31f)]??null,'slot':_0x27e541[_0x2fd1d6(0x60a)]??null,'slotKey':_0x27e541['slotKey']??null,'caps':_0x27e541[_0x2fd1d6(0x453)]??null,'lifecycle':_0x27e541[_0x2fd1d6(0x4cf)]??null,'uptime':Math[_0x2fd1d6(0x5e4)](0x0,Math[_0x2fd1d6(0x24d)]((_0x1aec1f-(_0x27e541[_0x2fd1d6(0x3c7)]||_0x1aec1f))/0x3e8)),'startedAt':_0x27e541[_0x2fd1d6(0x3c7)]??null,'meta':_0x27e541[_0x2fd1d6(0x1a8)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x2df3a1[_0x2fd1d6(0x1e5)](_0x5417c9,_0x256703));_0x256703[_0x2fd1d6(0x5e6)]['push']({'instanceId':_0x27e541[_0x2fd1d6(0x3d3)]??null,'role':_0x27e541[_0x2fd1d6(0x1cc)]??null,'listenAddr':_0x27e541['listenAddr']??null,'lifecycle':_0x27e541[_0x2fd1d6(0x4cf)]??null,'processing':_0x27e541[_0x2fd1d6(0x34b)]??null});if(!_0x256703[_0x2fd1d6(0x1cc)]&&_0x27e541['role'])_0x256703[_0x2fd1d6(0x1cc)]=_0x27e541['role'];if(!_0x256703[_0x2fd1d6(0x2af)]&&_0x27e541[_0x2fd1d6(0x2af)])_0x256703[_0x2fd1d6(0x2af)]=_0x27e541['listenAddr'];if(!_0x256703[_0x2fd1d6(0x34b)]&&_0x27e541[_0x2fd1d6(0x34b)])_0x256703['processing']=_0x27e541[_0x2fd1d6(0x34b)];if(!_0x256703[_0x2fd1d6(0x5b4)]&&_0x27e541[_0x2fd1d6(0x5b4)])_0x256703[_0x2fd1d6(0x5b4)]=_0x27e541['engines'];if(!_0x256703['singletonClaims']&&_0x27e541['singletonClaims'])_0x256703[_0x2fd1d6(0x50f)]=_0x27e541[_0x2fd1d6(0x50f)];if(_0x256703[_0x2fd1d6(0x453)]==null&&_0x27e541[_0x2fd1d6(0x453)])_0x256703[_0x2fd1d6(0x453)]=_0x27e541[_0x2fd1d6(0x453)];if(_0x27e541['stats']&&(!_0x256703[_0x2fd1d6(0x31b)]||(_0x27e541[_0x2fd1d6(0x31b)]['at']??0x0)>(_0x256703[_0x2fd1d6(0x31b)]['at']??0x0)))_0x256703['stats']=_0x27e541['stats'];}return[..._0x2df3a1[_0x2fd1d6(0x3fc)]()];}[_0x1c375d(0x42d)](){const _0x3cb4df=_0x1c375d,_0x3ed5b3=[],_0x2da240={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x212b4d of this['_groupByProcess']()){_0x3ed5b3[_0x3cb4df(0x232)]({'processKey':_0x212b4d[_0x3cb4df(0x531)],'kind':_0x212b4d[_0x3cb4df(0x510)],'pid':_0x212b4d[_0x3cb4df(0x597)],'supervisorKey':_0x212b4d[_0x3cb4df(0x31f)],'meta':_0x212b4d[_0x3cb4df(0x1a8)]??null,'uptime':_0x212b4d[_0x3cb4df(0x487)],'stats':_0x212b4d['stats']??null}),_0x2da240[_0x3cb4df(0x4ca)]++;if(_0x212b4d[_0x3cb4df(0x31b)]){_0x2da240['rss']+=_0x212b4d['stats']['rss']||0x0,_0x2da240[_0x3cb4df(0x308)]+=(_0x212b4d[_0x3cb4df(0x31b)][_0x3cb4df(0x308)]||0x0)+(_0x212b4d['stats'][_0x3cb4df(0x47b)]?.[_0x3cb4df(0x308)]||0x0);const _0x3e3073=_0x212b4d[_0x3cb4df(0x31b)][_0x3cb4df(0x47b)];_0x3e3073&&(_0x2da240['threads'][_0x3cb4df(0x22b)]+=_0x3e3073['count']||0x0,_0x2da240['threads'][_0x3cb4df(0x55f)]+=_0x3e3073[_0x3cb4df(0x55f)]||0x0,_0x2da240['threads']['busy']+=_0x3e3073[_0x3cb4df(0x456)]||0x0);}}return{'totals':_0x2da240,'nodes':_0x3ed5b3};}async[_0x1c375d(0x2ad)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3afd96=_0x1c375d;this[_0x3afd96(0x1ba)]=this['_isWriter']||!!writer,this[_0x3afd96(0x4f3)]=this[_0x3afd96(0x4f3)]||!!reader,this[_0x3afd96(0x525)]=kind||this['_kind']||(_0x26ef9c['isWorker']?_0x3afd96(0x35d):_0x3afd96(0x55b)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x3afd96(0x43e)],this['_ensureDesired'](),await this[_0x3afd96(0x295)]();if(!writer&&!reader)return null;if(!this[_0x3afd96(0x2f8)]){const _0x30ef36=await this[_0x3afd96(0x3c8)][_0x3afd96(0x3f7)](_0xe47bcb,{'sync':![],'durability':_0x3afd96(0x2a4)});if(!_0x30ef36[_0x3afd96(0x211)](_0x1b6efc))await _0x30ef36[_0x3afd96(0x2ba)](_0x1b6efc);this[_0x3afd96(0x2f8)]=_0x30ef36;}return this[_0x3afd96(0x2f8)];}['_nodeDb'](){const _0x361943=_0x1c375d;return this[_0x361943(0x3dc)]!==this['_statusEnv']&&(this[_0x361943(0x3dc)]=this[_0x361943(0x2f8)],this[_0x361943(0x1b5)]=this[_0x361943(0x2f8)][_0x361943(0x466)](_0x1b6efc)[_0x361943(0x317)]),this[_0x361943(0x1b5)];}[_0x1c375d(0x602)](_0x1843c6){const _0x1e745c=_0x1c375d;if(_0x3ed81e)return this[_0x1e745c(0x1b4)]()[_0x1e745c(0x32c)](_0x1843c6[_0x1e745c(0x45b)],_0x1843c6,0x1);const _0x556b38=this['_nodeDb']()['put'](_0x1843c6[_0x1e745c(0x45b)],_0x1843c6,0x1);if(_0x556b38&&typeof _0x556b38[_0x1e745c(0x539)]===_0x1e745c(0x49d))_0x556b38[_0x1e745c(0x539)](undefined,()=>{});return _0x556b38;}[_0x1c375d(0x472)](_0x3fa1f0){const _0x2e6f70=_0x1c375d;return this[_0x2e6f70(0x1b4)]()[_0x2e6f70(0x32c)](_0x3fa1f0['nodeKey'],_0x3fa1f0,0x1);}[_0x1c375d(0x3eb)](_0x40f490){const _0x536b7e=_0x1c375d;if(_0x3ed81e)try{return this[_0x536b7e(0x1b4)]()[_0x536b7e(0x426)](_0x40f490);}catch{return![];}const _0xe09eee=this[_0x536b7e(0x1b4)]()[_0x536b7e(0x2cf)](_0x40f490);if(_0xe09eee&&typeof _0xe09eee['then']===_0x536b7e(0x49d))_0xe09eee[_0x536b7e(0x539)](undefined,()=>{});return _0xe09eee;}async[_0x1c375d(0x614)](_0x155fcb){const _0x1658d6=_0x1c375d;if(!this[_0x1658d6(0x2f8)]||!this[_0x1658d6(0x1ba)]||!_0x155fcb?.['nodeKey'])return;return this[_0x1658d6(0x602)](_0x155fcb);}async['removeNode'](_0x17ac12){const _0x716834=_0x1c375d;if(!this[_0x716834(0x2f8)]||!this['_isWriter']||!_0x17ac12)return;const _0x3d0448=_0x17ac12[_0x716834(0x48a)]('#'),_0x1ad651=[];for(const {key:_0x389557}of this['_statusEnv'][_0x716834(0x45e)](_0x1b6efc)){if(_0x389557===_0x17ac12||!_0x3d0448&&typeof _0x389557==='string'&&_0x389557[_0x716834(0x2e2)](_0x17ac12+'#'))_0x1ad651['push'](_0x389557);}for(const _0x386d62 of _0x1ad651){try{this[_0x716834(0x1b4)]()['removeSync'](_0x386d62);}catch{}}}[_0x1c375d(0x272)](_0x2189a2){const _0x2455b6=_0x1c375d;if(typeof _0x2189a2?.[_0x2455b6(0x597)]!==_0x2455b6(0x56a))return![];if(_0x2189a2[_0x2455b6(0x4dc)]!==_0x323964[_0x2455b6(0x20c)]())return![];if(_0x2189a2[_0x2455b6(0x597)]===process[_0x2455b6(0x597)])return![];if(_0x2189a2[_0x2455b6(0x560)]!=null&&_0x2189a2[_0x2455b6(0x560)]<Date[_0x2455b6(0x464)]()-_0x380821)return!![];try{return process['kill'](_0x2189a2[_0x2455b6(0x597)],0x0),![];}catch(_0x4a7fe7){return _0x4a7fe7['code']===_0x2455b6(0x19f);}}[_0x1c375d(0x37a)](){const _0x34d6d3=_0x1c375d;if(!this[_0x34d6d3(0x2f8)])return[];try{this[_0x34d6d3(0x2f8)]['db']?.['resetReadTxn']?.();}catch{}const _0x3fd4fd=Date[_0x34d6d3(0x464)](),_0x241f44=_0x323964[_0x34d6d3(0x20c)](),_0x391a52=[];for(const {value:_0x320170}of this['_statusEnv'][_0x34d6d3(0x45e)](_0x1b6efc)){if(!_0x320170)continue;let _0x643a97=null;_0x320170['host']===_0x241f44&&typeof _0x320170[_0x34d6d3(0x597)]===_0x34d6d3(0x56a)&&(_0x643a97=!this[_0x34d6d3(0x272)](_0x320170));if(_0x643a97===![])continue;const _0x3ed437=_0x320170[_0x34d6d3(0x560)]==null||_0x320170['expiresAt']>=_0x3fd4fd;if(_0x643a97===!![]||_0x3ed437)_0x391a52[_0x34d6d3(0x232)](_0x320170);}return _0x391a52;}async['reap'](_0x2f842c=0x0){const _0x315539=_0x1c375d;if(!this['_statusEnv']||!this[_0x315539(0x1ba)])return;const _0x17a2fc=Date[_0x315539(0x464)]()-_0x2f842c,_0x2c3d01=new Set(),_0x4e2458=[],_0x4ad591=_0x323964[_0x315539(0x20c)](),_0x3eb7ab=require$$3[_0x315539(0x42c)];for(const {key:_0x2ea365,value:_0x11d566}of this[_0x315539(0x2f8)]['getRange'](_0x1b6efc)){if(!_0x11d566)continue;const _0x5c2792=_0x11d566['host']===_0x4ad591&&typeof _0x11d566[_0x315539(0x597)]==='number',_0x3fa39d=_0x5c2792?this['_nodeDead'](_0x11d566):_0x11d566[_0x315539(0x560)]!=null&&_0x11d566[_0x315539(0x560)]<_0x17a2fc;if(_0x3fa39d)_0x4e2458['push'](_0x2ea365);else{_0x2c3d01['add'](_0xcf541b(_0x11d566)??_0x2ea365);if(_0x11d566[_0x315539(0x42c)]&&_0x11d566[_0x315539(0x42c)]!==_0x3eb7ab){if(!this['_versionSkewWarned'])this[_0x315539(0x4c3)]=new Set();!this[_0x315539(0x4c3)][_0x315539(0x503)](_0x11d566[_0x315539(0x42c)])&&(this['_versionSkewWarned']['add'](_0x11d566['version']),this[_0x315539(0x3c8)][_0x315539(0x51d)]?.[_0x315539(0x1da)]?.(_0x315539(0x2a8)+(_0x11d566[_0x315539(0x597)]??'?')+_0x315539(0x416)+_0x11d566['version']+_0x315539(0x401)+_0x3eb7ab+_0x315539(0x177)+_0x315539(0x18f),{'feature':'migrations'}));}}}for(const _0x241ee5 of _0x4e2458)this[_0x315539(0x3eb)](_0x241ee5);if(this[_0x315539(0x234)]()){const _0x447f8c=[];for(const {key:_0x232121}of this['listDesired'](_0x315539(0x5b6))){if(!_0x2c3d01['has'](_0x232121)){if(_0x3ed81e)try{this[_0x315539(0x159)][_0x315539(0x426)]('node/'+_0x232121);}catch{}else _0x447f8c[_0x315539(0x232)](this[_0x315539(0x159)][_0x315539(0x2cf)]('node/'+_0x232121));}}if(_0x447f8c[_0x315539(0x26d)])await Promise['allSettled'](_0x447f8c);}}[_0x1c375d(0x49e)](_0x8335f6=null){const _0x10edfe=_0x1c375d;if(this[_0x10edfe(0x31e)])return;if(!this[_0x10edfe(0x1ba)]||!this['_statusEnv']){this['okdb']?.[_0x10edfe(0x51d)]?.[_0x10edfe(0x1da)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x10edfe(0x283)+!!this['_statusEnv']+_0x10edfe(0x357),{'feature':_0x10edfe(0x4ca)});return;}this[_0x10edfe(0x1c6)]=_0x8335f6,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x18577e of _0x2561b0)this[_0x10edfe(0x3c8)][_0x10edfe(0x19d)]['on'](_0x18577e,this[_0x10edfe(0x2b4)]);this[_0x10edfe(0x264)]();const _0x3c0c2c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x6f3ba5;this[_0x10edfe(0x31e)]=setInterval(()=>{const _0x1a6fb7=_0x10edfe;if(this[_0x1a6fb7(0x1c6)])try{this[_0x1a6fb7(0x1c6)]();}catch{}this[_0x1a6fb7(0x264)](),this['reap']()['catch'](()=>{});},_0x3c0c2c);if(this[_0x10edfe(0x31e)]['unref'])this['_hbTimer'][_0x10edfe(0x52b)]();}['_maybePublish'](){const _0x5f0826=_0x1c375d;if(!this[_0x5f0826(0x1ba)]||!this['_statusEnv'])return;if(Date[_0x5f0826(0x464)]()-this[_0x5f0826(0x450)]<_0x36abce)return;this[_0x5f0826(0x264)]();}[_0x1c375d(0x264)](){const _0x3f2838=_0x1c375d;if(!this[_0x3f2838(0x1ba)]||!this[_0x3f2838(0x2f8)])return;this['_lastPublishAt']=Date[_0x3f2838(0x464)]();try{const _0x315d72=[this[_0x3f2838(0x423)]()];for(const _0x5eb69f of this[_0x3f2838(0x57d)][_0x3f2838(0x3fc)]())_0x315d72[_0x3f2838(0x232)](this[_0x3f2838(0x44e)](_0x5eb69f));const _0x5c9d42=_0x4497b6[_0x3f2838(0x521)]?_0x4497b6[_0x3f2838(0x464)]():0x0;for(const _0x2af09c of _0x315d72){try{this[_0x3f2838(0x472)](_0x2af09c),this[_0x3f2838(0x55c)]=![];}catch(_0x4fdeca){!this['_publishFailWarned']&&(this[_0x3f2838(0x55c)]=!![],this[_0x3f2838(0x3c8)]?.[_0x3f2838(0x51d)]?.[_0x3f2838(0x1da)]?.(_0x3f2838(0x1de)+_0x4fdeca[_0x3f2838(0x408)],{'feature':_0x3f2838(0x4ca)}));}}if(_0x4497b6[_0x3f2838(0x521)])_0x4497b6[_0x3f2838(0x53e)](_0x3f2838(0x2d6),_0x4497b6[_0x3f2838(0x464)]()-_0x5c9d42,'rows='+_0x315d72[_0x3f2838(0x26d)]+_0x3f2838(0x359));}catch(_0x3d8c70){!this[_0x3f2838(0x55c)]&&(this[_0x3f2838(0x55c)]=!![],this[_0x3f2838(0x3c8)]?.[_0x3f2838(0x51d)]?.['warn']?.(_0x3f2838(0x1de)+_0x3d8c70[_0x3f2838(0x408)],{'feature':'processes'}));}}async['stopHeartbeat'](){const _0x5aa580=_0x1c375d;if(this[_0x5aa580(0x2b4)]){for(const _0x7d6c90 of _0x2561b0){try{this['okdb'][_0x5aa580(0x19d)][_0x5aa580(0x467)](_0x7d6c90,this[_0x5aa580(0x2b4)]);}catch{}}this[_0x5aa580(0x2b4)]=null;}this[_0x5aa580(0x31e)]&&(clearInterval(this[_0x5aa580(0x31e)]),this[_0x5aa580(0x31e)]=null);try{if(this[_0x5aa580(0x2f8)]&&this[_0x5aa580(0x1ba)])await this[_0x5aa580(0x2e5)](this['_rowKey']);}catch{}}async[_0x1c375d(0x1ff)](){const _0x49aba3=_0x1c375d;if(!this['_statusEnv']||!this[_0x49aba3(0x1ba)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x239248=[];for(const {value:_0x56eb24}of this['_statusEnv']['getRange'](_0x1b6efc)){if(_0x56eb24?.[_0x49aba3(0x433)]===process[_0x49aba3(0x597)]&&_0x56eb24['nodeKey'])_0x239248[_0x49aba3(0x232)](_0x56eb24['nodeKey']);}for(const _0x13b22b of _0x239248){try{await this[_0x49aba3(0x2e5)](_0x13b22b);}catch{}}}catch{}}async[_0x1c375d(0x476)](){const _0x3fed6f=_0x1c375d;return this[_0x3fed6f(0x614)](this[_0x3fed6f(0x423)]());}async[_0x1c375d(0x5b2)](_0x2e220c){const _0x1bea0c=_0x1c375d;if(!this['_statusEnv']||!this[_0x1bea0c(0x1ba)])return;return this['putNode'](this['_buildChildRow'](_0x2e220c));}[_0x1c375d(0x44e)]({pid:_0x397f17,startedAt:_0x35d040,kind:_0x2ed148,supervisorKey:_0x205a72,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x1c375d(0x169),meta:meta=null,stats:stats=null}){const _0x399a41=_0x1c375d,_0x3fe316=Date[_0x399a41(0x464)](),_0x3ec3dd=_0x3cb075(_0x397f17,_0x35d040);return{'nodeKey':_0xe7be6c(_0x3ec3dd,'0'),'processKey':_0x3ec3dd,'instanceId':'0','pid':_0x397f17,'startedAt':_0x35d040,'ppid':process[_0x399a41(0x597)],'host':_0x323964[_0x399a41(0x20c)](),'supervisorKey':_0x205a72,'slot':slot,'slotKey':slotKey,'kind':_0x2ed148,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x3fe316,'expiresAt':_0x3fe316+_0x42595b,'caps':this[_0x399a41(0x5ef)](_0x2ed148,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x1c375d(0x2a2)](_0x1d73dc){const _0x461cdc=_0x1c375d;if(!_0x1d73dc?.[_0x461cdc(0x597)])return null;const _0x1e88a1=_0x3cb075(_0x1d73dc[_0x461cdc(0x597)],_0x1d73dc[_0x461cdc(0x3c7)]);this[_0x461cdc(0x57d)][_0x461cdc(0x1e5)](_0x1e88a1,{..._0x1d73dc,'supervisorKey':_0x1d73dc['supervisorKey']??this[_0x461cdc(0x47a)]});if(this[_0x461cdc(0x1ba)])await this[_0x461cdc(0x5b2)](this[_0x461cdc(0x57d)][_0x461cdc(0x242)](_0x1e88a1))[_0x461cdc(0x60b)]?.(()=>{});return _0x1e88a1;}[_0x1c375d(0x336)](_0x52f637){const _0x5e9c80=_0x1c375d;if(!_0x52f637)return;return this[_0x5e9c80(0x57d)][_0x5e9c80(0x270)](_0x52f637),this[_0x5e9c80(0x2e5)](_0x52f637);}[_0x1c375d(0x4bf)](){const _0x4111bf=_0x1c375d,_0x47b75e=Date[_0x4111bf(0x464)](),_0x11f401=process[_0x4111bf(0x350)](),_0x23efe0=(_0x47b75e-this[_0x4111bf(0x1af)])*0x3e8;if(_0x23efe0>=0x3d090){const _0x39ecf9=_0x11f401[_0x4111bf(0x591)]-this[_0x4111bf(0x5c6)][_0x4111bf(0x591)]+(_0x11f401['system']-this[_0x4111bf(0x5c6)][_0x4111bf(0x392)]),_0x4f9959=_0x323964['cpus']()[_0x4111bf(0x26d)]||0x1;this['_lastCpuPct']=Math[_0x4111bf(0x370)](0x64,Math[_0x4111bf(0x24d)](_0x39ecf9/(_0x23efe0*_0x4f9959)*0x64)),this[_0x4111bf(0x4e3)]=Math[_0x4111bf(0x24d)](_0x23efe0/0x3e8),this[_0x4111bf(0x5c6)]=_0x11f401,this[_0x4111bf(0x1af)]=_0x47b75e;}const _0x13bc07=process[_0x4111bf(0x314)](),_0xd44b97=this[_0x4111bf(0x27c)][_0x4111bf(0x2b9)];let _0x2b105e=0x0;if(_0xd44b97>0x0){const _0x64e23c=[this[_0x4111bf(0x3c8)],...this['okdb'][_0x4111bf(0x40a)]?.[_0x4111bf(0x3fc)]?.()??[]];for(const _0x4d31ad of _0x64e23c){const _0x58a091=_0x4d31ad[_0x4111bf(0x59a)]?.[_0x4111bf(0x557)];if(_0x58a091)_0x2b105e+=_0x58a091[_0x4111bf(0x3b9)][_0x4111bf(0x456)];}}let _0x4b4acc=null;const _0x1b2161=_0xd44b97;if(_0x1b2161>0x0){let _0x1bd36e=0x0;for(const _0x1c12fa of this['_threadStats'][_0x4111bf(0x3fc)]())_0x1bd36e+=_0x1c12fa[_0x4111bf(0x308)]||0x0;_0x4b4acc={'count':_0x1b2161,'heapUsed':_0x1bd36e,'sandbox':_0xd44b97,'busy':_0x2b105e};}return{'rss':_0x13bc07[_0x4111bf(0x58f)],'heapUsed':_0x13bc07[_0x4111bf(0x308)],'heapTotal':_0x13bc07[_0x4111bf(0x275)],'external':_0x13bc07['external'],'cpuPct':this[_0x4111bf(0x2ca)],'cpuWindowMs':this[_0x4111bf(0x4e3)]??null,'threads':_0x4b4acc,'at':_0x47b75e};}['reportThreadStats'](_0x4f3702,_0x34a6e9){const _0x5edbae=_0x1c375d;if(!_0x4f3702||!_0x34a6e9)return;this[_0x5edbae(0x27c)][_0x5edbae(0x1e5)](_0x4f3702,_0x34a6e9);}[_0x1c375d(0x246)](_0x451555){const _0x50ee23=_0x1c375d;this[_0x50ee23(0x27c)][_0x50ee23(0x270)](_0x451555);}[_0x1c375d(0x229)](_0x49b254,_0x429cd0,_0x30a254=undefined){const _0x182216=_0x1c375d,_0x9a26ad=this[_0x182216(0x57d)][_0x182216(0x242)](_0x49b254);if(!_0x9a26ad||!_0x429cd0)return;if(_0x30a254!==undefined)_0x9a26ad[_0x182216(0x34b)]=_0x30a254;_0x9a26ad['stats']={'rss':_0x429cd0['rss']??null,'heapUsed':_0x429cd0[_0x182216(0x308)]??null,'heapTotal':_0x429cd0[_0x182216(0x275)]??null,'external':_0x429cd0[_0x182216(0x5fd)]??null,'cpuPct':_0x429cd0[_0x182216(0x2f4)]??null,'cpuWindowMs':_0x429cd0[_0x182216(0x3ac)]??null,'threads':_0x429cd0[_0x182216(0x47b)]??null,'claims':_0x429cd0[_0x182216(0x245)]??null,'envsOpen':_0x429cd0[_0x182216(0x274)]??null,'at':Date[_0x182216(0x464)]()};}[_0x1c375d(0x423)](){const _0x5d679b=_0x1c375d,_0x3a8204=Date[_0x5d679b(0x464)](),_0x398bcf=this['okdb'][_0x5d679b(0x25f)]||{},_0x34f7fb=this[_0x5d679b(0x525)]||_0x5d679b(0x55b);return{'nodeKey':this['_rowKey'],'processKey':this[_0x5d679b(0x47a)],'instanceId':this[_0x5d679b(0x3f5)],'pid':process['pid'],'startedAt':this['_processStartedAt'],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x5d679b(0x433)]===_0x5d679b(0x56a)?process[_0x5d679b(0x433)]:null,'host':_0x323964[_0x5d679b(0x20c)](),'supervisorKey':this[_0x5d679b(0x5d2)]??null,'version':require$$3[_0x5d679b(0x42c)],'kind':_0x34f7fb,'role':{'engines':!!_0x398bcf[_0x5d679b(0x5b4)],'processors':!!_0x398bcf[_0x5d679b(0x4a9)],'compaction':_0x398bcf['compaction'],'http':_0x398bcf['http']},'listenAddr':this[_0x5d679b(0x43e)]??null,'heartbeatAt':_0x3a8204,'expiresAt':_0x3a8204+_0x42595b,'caps':this[_0x5d679b(0x5ef)](_0x34f7fb,_0x398bcf),'lifecycle':{'state':_0x5d679b(0x169),'desiredVersionApplied':null},'meta':{...this[_0x5d679b(0x599)]},'processing':_0x398bcf[_0x5d679b(0x4a9)]?this[_0x5d679b(0x29b)]():null,'engines':_0x398bcf[_0x5d679b(0x5b4)]?[...this[_0x5d679b(0x3c8)][_0x5d679b(0x581)]??[]]:null,'singletonClaims':this[_0x5d679b(0x28e)](),'stats':this[_0x5d679b(0x4bf)](),'writers':this[_0x5d679b(0x25b)]()};}[_0x1c375d(0x25b)](){const _0x34eaeb=_0x1c375d,_0x4b1cb5={};try{for(const [_0xe782b,_0x2eecbb]of this[_0x34eaeb(0x3c8)][_0x34eaeb(0x40a)]){try{const _0x46919d=_0x2eecbb['writerStatus']?.();if(!_0x46919d)continue;if(!_0x46919d[_0x34eaeb(0x3b2)]&&!_0x46919d['committed']&&!(_0x46919d[_0x34eaeb(0x2b6)]??0x0)&&!_0x46919d[_0x34eaeb(0x22e)])continue;_0x4b1cb5[_0xe782b]={'depth':_0x46919d[_0x34eaeb(0x3b2)],'oldestPendingMs':_0x46919d[_0x34eaeb(0x161)],'committed':_0x46919d['committed'],'commitsPerSec':_0x46919d['commitsPerSec'],'commitP99Ms':_0x46919d['commitP99Ms'],'parkedNow':_0x46919d[_0x34eaeb(0x2b6)]??0x0,'draining':!!_0x46919d[_0x34eaeb(0x22e)]};}catch{}}}catch{}return Object[_0x34eaeb(0x4b0)](_0x4b1cb5)[_0x34eaeb(0x26d)]?_0x4b1cb5:null;}[_0x1c375d(0x28e)](){const _0x10aa17=_0x1c375d,_0x560769=process['pid'],_0x228cf3=Date[_0x10aa17(0x464)](),_0x58e0c6=_0x1ec432=>{const _0x44f73c=_0x10aa17;if(!_0x1ec432)return[];const _0xc5c99a=[];try{for(const {id:_0x41a0e4,entry:_0x2de196}of _0x1ec432[_0x44f73c(0x5c3)]()){if(_0x2de196?.[_0x44f73c(0x38e)]?.['pid']!==_0x560769)continue;const _0x424117=_0x2de196[_0x44f73c(0x1a1)]??_0x2de196[_0x44f73c(0x1a9)]??0x0;if(_0x424117+(_0x2de196[_0x44f73c(0x5bb)]??0x0)<_0x228cf3)continue;_0xc5c99a[_0x44f73c(0x232)](_0x41a0e4);}}catch{}return _0xc5c99a;},_0x4a0289=_0x58e0c6(this[_0x10aa17(0x26a)]('compact')),_0xf87222=_0x58e0c6(this[_0x10aa17(0x26a)]('sync'));if(!_0x4a0289[_0x10aa17(0x26d)]&&!_0xf87222[_0x10aa17(0x26d)])return null;return{'compact':_0x4a0289,'replicate':_0xf87222};}[_0x1c375d(0x26a)](_0x4127f0){const _0x4b07cf=_0x1c375d;if(!this[_0x4b07cf(0x3c8)]?.[_0x4b07cf(0x21b)])return null;if(!this[_0x4b07cf(0x214)])this['_singletonLocks']=new Map();let _0x5cb46a=this[_0x4b07cf(0x214)]['get'](_0x4127f0);if(!_0x5cb46a)try{_0x5cb46a=new _0x36d2e4(this[_0x4b07cf(0x3c8)][_0x4b07cf(0x21b)],{'namespace':_0x4127f0}),this[_0x4b07cf(0x214)][_0x4b07cf(0x1e5)](_0x4127f0,_0x5cb46a);}catch{return null;}return _0x5cb46a;}[_0x1c375d(0x29b)](){const _0x24bd44=_0x1c375d,_0x2afcab=[];try{for(const [_0x464a8f,_0x25e08f]of this[_0x24bd44(0x3c8)][_0x24bd44(0x40a)]){if(_0x464a8f['startsWith']('~'))continue;for(const _0x2c2730 of _0x25e08f[_0x24bd44(0x424)][_0x24bd44(0x473)]())_0x2afcab[_0x24bd44(0x232)]({..._0x2c2730,'env':_0x464a8f});}}catch{}return{'participate':this['okdb'][_0x24bd44(0x4a9)]?.['_participate']??![],'processors':_0x2afcab};}[_0x1c375d(0x234)](){const _0x3e6e81=_0x1c375d;if(this[_0x3e6e81(0x159)])return!![];const _0x375868=this[_0x3e6e81(0x3c8)]['_rootDb'];if(!_0x375868)return![];return this['_desired']=_0x375868[_0x3e6e81(0x2ab)](_0xa36013,{'dupSort':![]}),this[_0x3e6e81(0x157)]=_0x375868[_0x3e6e81(0x2ab)](_0x1b2ce5,{'dupSort':![]}),!![];}async[_0x1c375d(0x295)](){const _0x100f54=_0x1c375d;if(!this[_0x100f54(0x234)]())return;const _0x387f39=_0x100f54(0x20a),_0x5a6ab6=0x1,_0x1e97cd=this[_0x100f54(0x159)][_0x100f54(0x242)](_0x387f39)??0x0;if(_0x1e97cd>=_0x5a6ab6)return;const _0x35f96d=_0x20fbac=>{const _0x3bf457=_0x100f54;if(_0x20fbac===_0x3bf457(0x4b9))return _0x3bf457(0x58b);if(_0x20fbac===_0x3bf457(0x2cd))return'fanout';return _0x20fbac;};await this[_0x100f54(0x3c8)][_0x100f54(0x52c)][_0x100f54(0x2b2)][_0x100f54(0x4f5)](()=>{const _0x58d2ed=_0x100f54;for(const _0xb06cc of['procmode/',_0x58d2ed(0x3c5)]){for(const {key:_0x2eede5,value:_0x69d021}of this[_0x58d2ed(0x159)][_0x58d2ed(0x45e)]({'start':_0xb06cc,'end':_0xb06cc+'ÿ'})){if(typeof _0x2eede5!==_0x58d2ed(0x61d)||!_0x2eede5[_0x58d2ed(0x2e2)](_0xb06cc))break;const _0x279f76=_0x35f96d(_0x69d021[_0x58d2ed(0x296)]);if(_0x279f76!==_0x69d021[_0x58d2ed(0x296)])this[_0x58d2ed(0x159)][_0x58d2ed(0x5d4)](_0x2eede5,{..._0x69d021,'mode':_0x279f76});}}this['_desired'][_0x58d2ed(0x5d4)](_0x387f39,_0x5a6ab6);});}[_0x1c375d(0x326)](){const _0x309088=_0x1c375d;return!!this[_0x309088(0x159)];}[_0x1c375d(0x414)](_0x239442,_0x1831f8){const _0x43f5c7=_0x1c375d;if(!this['_ensureDesired']())return null;const _0x47b88e=_0x239442+'/'+_0x1831f8;return this[_0x43f5c7(0x3ae)](),this[_0x43f5c7(0x56b)][_0x43f5c7(0x242)](_0x47b88e)??this[_0x43f5c7(0x159)][_0x43f5c7(0x242)](_0x47b88e)??null;}['_refreshDesiredSnapshot'](){const _0x595ae7=_0x1c375d;if(!_0x3ed81e)return;try{this['okdb']['_systemEnv']?.['db']?.[_0x595ae7(0x5ca)]?.();}catch{}}async[_0x1c375d(0x5f2)](_0x100372,_0x106cf6,_0x4589f0){const _0x3d9663=_0x1c375d;if(!this[_0x3d9663(0x234)]())return null;const _0x1609a5=_0x100372+'/'+_0x106cf6;this[_0x3d9663(0x3ae)]();const _0x2d2ce2=this[_0x3d9663(0x56b)][_0x3d9663(0x242)](_0x1609a5)??this[_0x3d9663(0x159)]['get'](_0x1609a5)??{'version':0x0},_0x3e77eb=(_0x2d2ce2[_0x3d9663(0x42c)]||0x0)+0x1,_0x2621bf={..._0x2d2ce2,..._0x4589f0,'version':_0x3e77eb,'updatedAt':Date[_0x3d9663(0x464)]()};this[_0x3d9663(0x56b)][_0x3d9663(0x1e5)](_0x1609a5,_0x2621bf);try{await this[_0x3d9663(0x3c8)]['_systemEnv'][_0x3d9663(0x2b2)][_0x3d9663(0x4f5)](()=>{const _0x46a2ac=_0x3d9663;this[_0x46a2ac(0x159)]['put'](_0x1609a5,_0x2621bf);});}finally{if(this[_0x3d9663(0x56b)][_0x3d9663(0x242)](_0x1609a5)===_0x2621bf)this[_0x3d9663(0x56b)][_0x3d9663(0x270)](_0x1609a5);}return _0x3e77eb;}[_0x1c375d(0x258)](_0xae0eae){const _0x156ef4=_0x1c375d;if(!this[_0x156ef4(0x234)]())return[];this[_0x156ef4(0x3ae)]();const _0x37bda8=_0xae0eae+'/',_0x40a5fe=[];for(const {key:_0x9bf73c,value:_0x10014c}of this[_0x156ef4(0x159)][_0x156ef4(0x45e)]({'start':_0x37bda8,'end':_0x37bda8+'ÿ'})){if(typeof _0x9bf73c!=='string'||!_0x9bf73c[_0x156ef4(0x2e2)](_0x37bda8))break;_0x40a5fe['push']({'key':_0x9bf73c[_0x156ef4(0x195)](_0x37bda8[_0x156ef4(0x26d)]),'value':_0x10014c});}return _0x40a5fe;}[_0x1c375d(0x5f9)](_0x2c84b7){const _0x7007ce=_0x1c375d;if(!this[_0x7007ce(0x234)]())return null;return this['_cmd'][_0x7007ce(0x242)](_0x2c84b7)??null;}async[_0x1c375d(0x606)](_0x3eac5f,_0xe6f6de,_0x18d721={}){const _0x537e20=_0x1c375d;if(!this[_0x537e20(0x234)]())return null;let _0x2b513f;return await this[_0x537e20(0x3c8)][_0x537e20(0x52c)][_0x537e20(0x2b2)][_0x537e20(0x4f5)](()=>{const _0x448fa1=_0x537e20,_0x52181b=this['_cmd'][_0x448fa1(0x242)](_0x3eac5f)||{'epoch':0x0};_0x2b513f=(_0x52181b['epoch']||0x0)+0x1,this[_0x448fa1(0x157)]['put'](_0x3eac5f,{..._0x52181b,..._0x18d721,'cmd':_0xe6f6de,'epoch':_0x2b513f,'updatedAt':Date[_0x448fa1(0x464)]()});}),_0x2b513f;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x38f4b0,'nodeKey':_0x3cb075,'logicalKey':_0x2a28f6,'slotKey':_0xb2396c,'PROCESS_ENV':_0xe47bcb,'NODE_TYPE':_0x1b6efc},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x410e28=_0x18fcc0;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4ff2e4=require$$0$6,{EVENTS:_0x4fe08e,CHANGE_ACTIONS:_0x587afc}=requireOkdbEnums(),{LOOP:_0x42fe17}=requireOkdbLoopMonitor(),_0x1b395d=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0xcc9963=0x5,_0x101b47=0x2710;class _0x316853 extends _0x4ff2e4{constructor(_0x194bf7,_0x1bd7dc={}){const _0x1483eb=_0x1ef7;super(),this[_0x1483eb(0x3c8)]=_0x194bf7,this[_0x1483eb(0x290)]=_0x1bd7dc[_0x1483eb(0x5af)]??_0x1b395d,this[_0x1483eb(0x3dd)]=_0x1bd7dc[_0x1483eb(0x5ac)]??_0xcc9963,this[_0x1483eb(0x374)]=_0x1bd7dc[_0x1483eb(0x215)]??_0x101b47,this['_started']=![],this['_cursors']=new Map(),this[_0x1483eb(0x2c8)]=new Map(),this['_pending']=new Map(),this[_0x1483eb(0x43f)]=null,this['_draining']=![],this[_0x1483eb(0x475)]=new Set(),this['_onItem']=_0x5a16a5=>this[_0x1483eb(0x584)](_0x5a16a5),this[_0x1483eb(0x576)]=_0xe39980=>this[_0x1483eb(0x23a)](_0xe39980),this['_onStop']=()=>this[_0x1483eb(0x187)]();}[_0x410e28(0x509)](){const _0x1f5452=_0x410e28;if(this['_started'])return;this[_0x1f5452(0x461)]=!![];for(const [_0x5af9af,_0xc6d36]of this[_0x1f5452(0x3c8)][_0x1f5452(0x40a)]){if(_0x5af9af[_0x1f5452(0x2e2)]('~'))continue;try{_0xc6d36[_0x1f5452(0x522)]();}catch{}}for(const [_0x39d245,_0x52a4bd]of this[_0x1f5452(0x3c8)][_0x1f5452(0x40a)]){if(_0x39d245[_0x1f5452(0x2e2)]('~'))continue;try{this[_0x1f5452(0x2c8)][_0x1f5452(0x1e5)](_0x39d245,_0x52a4bd['getClock']()||0x0);}catch{}}const {events:_0x47dda7}=this[_0x1f5452(0x3c8)];_0x47dda7['on'](_0x4fe08e[_0x1f5452(0x175)],this[_0x1f5452(0x17c)]),_0x47dda7['on'](_0x4fe08e[_0x1f5452(0x549)],this[_0x1f5452(0x17c)]),_0x47dda7['on'](_0x4fe08e[_0x1f5452(0x51f)],this[_0x1f5452(0x17c)]),_0x47dda7['on'](_0x4fe08e[_0x1f5452(0x19a)],this[_0x1f5452(0x576)]),_0x47dda7[_0x1f5452(0x35c)](_0x4fe08e[_0x1f5452(0x37d)],this[_0x1f5452(0x398)]);}[_0x410e28(0x187)](){const _0x205202=_0x410e28;if(!this['_started'])return;this['_started']=![];const {events:_0x5d82a2}=this[_0x205202(0x3c8)];_0x5d82a2[_0x205202(0x467)](_0x4fe08e[_0x205202(0x175)],this[_0x205202(0x17c)]),_0x5d82a2['off'](_0x4fe08e[_0x205202(0x549)],this[_0x205202(0x17c)]),_0x5d82a2['off'](_0x4fe08e[_0x205202(0x51f)],this[_0x205202(0x17c)]),_0x5d82a2[_0x205202(0x467)](_0x4fe08e[_0x205202(0x19a)],this['_onPoke']);try{_0x5d82a2[_0x205202(0x467)](_0x4fe08e[_0x205202(0x37d)],this[_0x205202(0x398)]);}catch{}this[_0x205202(0x43f)]&&(clearTimeout(this['_flushTimer']),this[_0x205202(0x43f)]=null),this[_0x205202(0x223)][_0x205202(0x2d8)](),this['_cursors'][_0x205202(0x2d8)](),this[_0x205202(0x2c8)]['clear'](),this[_0x205202(0x475)]['clear']();}[_0x410e28(0x548)](_0x1c3f60,_0x30e1bb,_0x2dd3f0,_0x556cf5){return _0x1c3f60+'\x00'+_0x30e1bb+'\x00'+_0x2dd3f0+'\x00'+_0x556cf5;}[_0x410e28(0x2ce)](_0x530038,_0x121779,_0x2d9f12,_0x32d925){const _0x3efdf6=_0x410e28,_0xdad287=this['_dedupeKey'](_0x530038,_0x121779,_0x2d9f12,_0x32d925);if(this['_seen'][_0x3efdf6(0x503)](_0xdad287))return![];this[_0x3efdf6(0x475)][_0x3efdf6(0x1d2)](_0xdad287);if(this[_0x3efdf6(0x475)]['size']>this[_0x3efdf6(0x374)]){const _0x37a101=this[_0x3efdf6(0x475)][_0x3efdf6(0x3fc)]()[_0x3efdf6(0x59b)]()[_0x3efdf6(0x4e6)];this['_seen'][_0x3efdf6(0x270)](_0x37a101);}return!![];}[_0x410e28(0x584)](_0x5949dd){const _0x3b7f17=_0x410e28;if(!this[_0x3b7f17(0x461)]||!_0x5949dd)return;const {env:_0x269ddb,type:_0x5dc174,key:_0x2c63c0,clock:_0x2046f6,origin:_0x488371,action:_0x3efda2,newValue:_0x2a6c20,oldValue:_0x8629b6}=_0x5949dd;if(_0x269ddb==null||_0x5dc174==null||_0x2c63c0==null)return;if(typeof _0x269ddb===_0x3b7f17(0x61d)&&_0x269ddb['startsWith']('~'))return;if(typeof _0x5dc174===_0x3b7f17(0x61d)&&_0x5dc174[_0x3b7f17(0x2e2)]('~'))return;if(!this[_0x3b7f17(0x2ce)](_0x269ddb,_0x5dc174,_0x2c63c0,_0x2046f6))return;const _0x335d57=_0x3efda2===_0x587afc[_0x3b7f17(0x417)]?'remove':'put';this[_0x3b7f17(0x303)](_0x3b7f17(0x3a9),{'env':_0x269ddb,'type':_0x5dc174,'key':_0x2c63c0,'op':_0x335d57,'clock':_0x2046f6,'origin':_0x488371,'value':_0x335d57==='remove'?null:_0x2a6c20,'prevValue':_0x8629b6});}['_handlePoke'](_0x3bfbee){const _0x5a1124=_0x410e28;if(!this[_0x5a1124(0x461)])return;if(!_0x3bfbee||typeof _0x3bfbee[_0x5a1124(0x162)]!==_0x5a1124(0x61d)||typeof _0x3bfbee[_0x5a1124(0x57e)]!=='string')return;const {env:_0x17002f,type:_0x304ab5}=_0x3bfbee;if(_0x17002f[_0x5a1124(0x2e2)]('~')||_0x304ab5[_0x5a1124(0x2e2)]('~'))return;this['_pending'][_0x5a1124(0x1e5)](_0x17002f+'\x00'+_0x304ab5,{'env':_0x17002f,'type':_0x304ab5}),this[_0x5a1124(0x3b7)]();}[_0x410e28(0x3b7)](){const _0x5eb7c7=_0x410e28;if(this[_0x5eb7c7(0x43f)])return;const _0x177cea=()=>{const _0x8f1559=_0x5eb7c7;this[_0x8f1559(0x43f)]=null,this[_0x8f1559(0x202)]()[_0x8f1559(0x60b)](()=>{});};this[_0x5eb7c7(0x43f)]=setTimeout(_0x177cea,this[_0x5eb7c7(0x3dd)]>0x0?this['_flushDebounce']:0x0);}async[_0x410e28(0x202)](){const _0x210908=_0x410e28;if(this[_0x210908(0x19c)]){this[_0x210908(0x3b7)]();return;}this['_draining']=!![];try{const _0x36e74b=[...this['_pending'][_0x210908(0x3fc)]()];this[_0x210908(0x223)][_0x210908(0x2d8)]();let _0x42b098=![];for(const {env:_0x7b9aaa,type:_0x3107a4}of _0x36e74b){try{const _0xedf580=await this['_drainOne'](_0x7b9aaa,_0x3107a4);if(_0xedf580)_0x42b098=!![];}catch{this['_pending']['set'](_0x7b9aaa+'\x00'+_0x3107a4,{'env':_0x7b9aaa,'type':_0x3107a4}),_0x42b098=!![];}}if(_0x42b098||this[_0x210908(0x223)][_0x210908(0x2b9)]>0x0)this[_0x210908(0x3b7)]();}finally{this['_draining']=![];}}async[_0x410e28(0x570)](_0x437c59,_0x2b1f76){const _0x9e8bbe=_0x410e28,_0x2c2f61=await this['okdb'][_0x9e8bbe(0x428)](_0x437c59),_0xcb7279=_0x437c59+'\x00'+_0x2b1f76;!this['_cursors'][_0x9e8bbe(0x503)](_0xcb7279)&&(!this['_baselines'][_0x9e8bbe(0x503)](_0x437c59)&&(_0x2c2f61[_0x9e8bbe(0x522)](),this[_0x9e8bbe(0x2c8)]['set'](_0x437c59,_0x2c2f61[_0x9e8bbe(0x565)]()||0x0)),this[_0x9e8bbe(0x582)][_0x9e8bbe(0x1e5)](_0xcb7279,this[_0x9e8bbe(0x2c8)][_0x9e8bbe(0x242)](_0x437c59)));const _0x97b37a=this[_0x9e8bbe(0x582)][_0x9e8bbe(0x242)](_0xcb7279),_0x13ef1d=_0x2c2f61[_0x9e8bbe(0x565)](_0x2b1f76)||0x0;if(_0x13ef1d<=_0x97b37a)return![];const _0x1d04ca=_0x97b37a+this[_0x9e8bbe(0x290)],_0xc432fb=Math[_0x9e8bbe(0x370)](_0x13ef1d,_0x1d04ca),_0x4411e8=_0x42fe17[_0x9e8bbe(0x521)]?_0x42fe17[_0x9e8bbe(0x464)]():0x0,_0x101ce6=Array[_0x9e8bbe(0x3e6)](_0x2c2f61[_0x9e8bbe(0x3b0)](_0x2b1f76,_0x97b37a+0x1,_0xc432fb));let _0x3e8045=_0x97b37a;for(const _0x1edae6 of _0x101ce6){const {clock:_0x4092d8,key:_0x43f55e,action:_0x2911cd,origin:_0x21efe0}=_0x1edae6;if(_0x4092d8>_0x3e8045)_0x3e8045=_0x4092d8;if(_0x43f55e==null)continue;if(!this['_markSeen'](_0x437c59,_0x2b1f76,_0x43f55e,_0x4092d8))continue;let _0x523621,_0x2eb473;if(_0x2911cd===_0x587afc['REMOVE'])_0x523621=_0x9e8bbe(0x2cf),_0x2eb473=null;else{const _0xaf3054=_0x2c2f61[_0x9e8bbe(0x242)](_0x2b1f76,_0x43f55e);_0xaf3054==null?(_0x523621=_0x9e8bbe(0x2cf),_0x2eb473=null):(_0x523621=_0x9e8bbe(0x5d4),_0x2eb473=_0xaf3054);}this[_0x9e8bbe(0x303)](_0x9e8bbe(0x3a9),{'env':_0x437c59,'type':_0x2b1f76,'key':_0x43f55e,'op':_0x523621,'clock':_0x4092d8,'origin':_0x21efe0,'value':_0x2eb473});}if(_0x42fe17['enabled'])_0x42fe17['note'](_0x9e8bbe(0x4a8)+_0x437c59+':'+_0x2b1f76,_0x42fe17[_0x9e8bbe(0x464)]()-_0x4411e8,'n='+_0x101ce6[_0x9e8bbe(0x26d)]);return this['_cursors'][_0x9e8bbe(0x1e5)](_0xcb7279,Math['max'](_0x3e8045,_0xc432fb)),_0x2c2f61[_0x9e8bbe(0x565)](_0x2b1f76)>_0xc432fb;}[_0x410e28(0x527)](){const _0xada0d1=_0x410e28;return{'started':this[_0xada0d1(0x461)],'quantum':this[_0xada0d1(0x290)],'flushDebounce':this[_0xada0d1(0x3dd)],'cursors':Object[_0xada0d1(0x1b8)]([...this[_0xada0d1(0x582)]['entries']()][_0xada0d1(0x32d)](([_0x46be2d,_0x278a33])=>[_0x46be2d[_0xada0d1(0x197)]('\x00',':'),_0x278a33])),'pending':this['_pending'][_0xada0d1(0x2b9)],'seen':this[_0xada0d1(0x475)][_0xada0d1(0x2b9)]};}}return _0x316853[_0x410e28(0x49a)]=_0x1b395d,okdbChangefeed={'OKDBChangefeed':_0x316853},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x12b638=_0x18fcc0;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0xec9fc3=require$$1$2,_0x41b325=require$$1,{EVENTS:_0x2405f9}=requireOkdbEnums(),_0x2869d0=require$$0,{slotKey:_0x1ab4fd}=requireOkdbProcessRegistry(),_0x62fdd8=0xfa,_0x5c21e8=0xfa0,_0x4002b6=0x5,_0x543f27=0x2710,_0x1d4b78=0xbb8,_0x406541=0x7d0,_0x302f1a=_0x12b638(0x4e7),_0x278bb1=_0x12b638(0x27f),_0x432aea=_0x12b638(0x51d),_0x2514de=_0x12b638(0x31b),_0x5d36ef=[_0x2405f9[_0x12b638(0x3cd)],_0x2405f9[_0x12b638(0x44c)],_0x2405f9['FTS_DROP'],_0x2405f9[_0x12b638(0x534)],_0x2405f9[_0x12b638(0x1d5)],_0x2405f9[_0x12b638(0x3d6)],_0x2405f9[_0x12b638(0x574)],_0x2405f9[_0x12b638(0x1bd)],'processor:ready',_0x12b638(0x310),_0x12b638(0x4c4),_0x12b638(0x57c),_0x12b638(0x61c),_0x12b638(0x330)],_0x27ff02=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x40fd60({workers:_0x219ba2,makeOkdb:_0x27f8b2,port:_0x2528e5,primaryOkdb:_0x4ded0b,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x23aa3b=_0x12b638;if(_0xec9fc3[_0x23aa3b(0x561)])return childEntry&&_0xec9fc3[_0x23aa3b(0x5c8)]({'exec':_0x41b325[_0x23aa3b(0x25d)](__dirname,_0x23aa3b(0x15c)),'args':[],'execArgv':((()=>{const _0x5b7689=_0x23aa3b,_0x86dfe4=[];for(let _0x5b7f47=0x0;_0x5b7f47<process['execArgv'][_0x5b7689(0x26d)];_0x5b7f47++){const _0x22f6a0=process[_0x5b7689(0x27d)][_0x5b7f47];if(_0x22f6a0[_0x5b7689(0x2e2)](_0x5b7689(0x184))||_0x22f6a0[_0x5b7689(0x2e2)]('--watch')||_0x22f6a0[_0x5b7689(0x2e2)](_0x5b7689(0x2bb)))continue;if(_0x22f6a0==='-e'||_0x22f6a0===_0x5b7689(0x47c)||_0x22f6a0==='-p'||_0x22f6a0===_0x5b7689(0x41b)){_0x5b7f47++;continue;}_0x86dfe4[_0x5b7689(0x232)](_0x22f6a0);}return _0x86dfe4;})())}),_0x556269({'workers':_0x219ba2,'port':_0x2528e5,'primaryOkdb':_0x4ded0b,'workerEnv':workerEnv});return _0xb6c3c7({'makeOkdb':_0x27f8b2,'port':_0x2528e5});}function _0x556269({workers:_0x5e80e9,port:_0x50d205,primaryOkdb:_0x492b77,workerEnv:_0x52a56f}){const _0x596fbf=_0x12b638,_0x473df4=new Map(),_0x1e9808=new Map();let _0x598973=![];const _0x2d391c=_0x5b0e88=>_0x5b0e88?.[_0x596fbf(0x2bf)],_0x5466a5=_0x17fa31=>{const _0x434fe7=_0x596fbf,_0xb67af0=_0xec9fc3[_0x434fe7(0x3e0)]({...process.env,..._0x52a56f||{},'OKDB_CLUSTER_SLOT':String(_0x17fa31)});return _0xb67af0['__okdbSlot']=_0x17fa31,_0x473df4[_0x434fe7(0x1e5)](_0xb67af0[_0x434fe7(0x372)][_0x434fe7(0x597)],{'worker':_0xb67af0,'startedAt':Date[_0x434fe7(0x464)](),'slot':_0x17fa31}),_0xb67af0['on'](_0x434fe7(0x4d4),_0x4330ee=>{const _0x1f67f8=_0x434fe7;console[_0x1f67f8(0x51d)](_0x1f67f8(0x16c)+_0xb67af0[_0x1f67f8(0x372)][_0x1f67f8(0x597)]+'\x20ipc\x20error:\x20'+(_0x4330ee?.[_0x1f67f8(0x408)]??_0x4330ee));}),_0xb67af0['on'](_0x434fe7(0x1cd),()=>_0x138063()),_0xb67af0;},_0x36fc72=_0x4710fa=>{const _0x562954=_0x596fbf;for(const {worker:_0x48bccc}of _0x473df4[_0x562954(0x3fc)]()){if(_0x48bccc['isDead']()||!_0x48bccc['isConnected']())continue;try{_0x48bccc['send'](_0x4710fa);}catch{}}};_0x492b77?.[_0x596fbf(0x1ac)]?.({'kind':_0x596fbf(0x3d5),'listenAddr':':'+_0x50d205})['catch'](()=>{}),_0x492b77?.[_0x596fbf(0x4ca)]?.['setOwnMeta']?.({'workersConfigured':_0x5e80e9});const _0x3cfa53={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x138063=()=>{const _0x4a7d2b=_0x596fbf,_0x3d9920=_0x492b77?.['processes'];if(!_0x3d9920||!_0x3d9920[_0x4a7d2b(0x1ba)])return;const _0x5af679=_0x3d9920[_0x4a7d2b(0x497)];for(const {worker:_0x3bc1aa,startedAt:_0x409c91,slot:_0x24fbb0,stats:_0x5ef47a,processing:_0x4f119e}of _0x473df4[_0x4a7d2b(0x3fc)]()){if(_0x3bc1aa['isDead']())continue;const _0x3637e8=_0x3d9920[_0x4a7d2b(0x326)]?.()&&_0x3d9920['getDesired'](_0x4a7d2b(0x60a),_0x4480a8(_0x24fbb0))?.['decommission']===!![];_0x3d9920[_0x4a7d2b(0x5b2)]({'pid':_0x3bc1aa[_0x4a7d2b(0x372)][_0x4a7d2b(0x597)],'startedAt':_0x409c91,'kind':'http-server','supervisorKey':_0x5af679,'slot':_0x24fbb0,'slotKey':_0x4480a8(_0x24fbb0),'role':_0x3cfa53,'listenAddr':':'+_0x50d205,'lifecycle':_0x3637e8?'decommissioning':'running','processing':_0x4f119e??null,'stats':_0x5ef47a??null})['catch'](()=>{});}},_0x4480a8=_0x233e94=>_0x1ab4fd(_0x596fbf(0x1d6)+_0x50d205,_0x233e94),_0x2411ea=_0x13ec9d=>{const _0x182f05=_0x596fbf,_0x66e33e=_0x492b77?.['processes'];if(!_0x66e33e?.[_0x182f05(0x326)]?.())return![];return _0x66e33e['getDesired'](_0x182f05(0x60a),_0x4480a8(_0x13ec9d))?.[_0x182f05(0x46b)]===!![];};for(let _0x279a52=0x0;_0x279a52<_0x5e80e9;_0x279a52++){const _0x1b7b27=_0x2411ea(_0x279a52);_0x1e9808[_0x596fbf(0x1e5)](_0x279a52,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1b7b27,'respawnTimer':null}),_0x1b7b27?console[_0x596fbf(0x51d)](_0x596fbf(0x181)+_0x279a52+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x5466a5(_0x279a52);}const _0x220e8c=()=>{const _0x206d19=_0x596fbf,_0x3e6917=_0x492b77?.['processes'];if(!_0x3e6917?.[_0x206d19(0x1ba)]||!_0x3e6917[_0x206d19(0x326)]?.())return;for(const [_0xd27a66,_0xe276c9]of _0x1e9808['entries']()){const _0x259c78=_0x3e6917[_0x206d19(0x414)](_0x206d19(0x60a),_0x4480a8(_0xd27a66)),_0x1242b8=_0x259c78?.[_0x206d19(0x46b)]===!![],_0x514910=_0x259c78?.[_0x206d19(0x17b)]===!![];if(_0x1242b8&&!_0xe276c9[_0x206d19(0x33e)]){_0xe276c9[_0x206d19(0x33e)]=!![];_0xe276c9[_0x206d19(0x244)]&&(clearTimeout(_0xe276c9[_0x206d19(0x244)]),_0xe276c9['respawnTimer']=null);for(const {worker:_0x312143}of _0x473df4[_0x206d19(0x3fc)]()){if(_0x2d391c(_0x312143)!==_0xd27a66||_0x312143[_0x206d19(0x4c1)]())continue;try{if(_0x514910)_0x312143[_0x206d19(0x372)][_0x206d19(0x17b)](_0x206d19(0x41d));else _0x312143[_0x206d19(0x28b)]()&&_0x312143[_0x206d19(0x39c)]();}catch{}}console[_0x206d19(0x51d)](_0x206d19(0x511)+(_0x514910?_0x206d19(0x393):_0x206d19(0x499))+_0x206d19(0x3ff)+_0xd27a66+'\x20(durable\x20desired-state)');}else{if(!_0x1242b8&&_0xe276c9[_0x206d19(0x33e)]&&_0x259c78){_0xe276c9[_0x206d19(0x33e)]=![],_0xe276c9[_0x206d19(0x4dd)]=[],_0xe276c9[_0x206d19(0x5f8)]=0x0;const _0x3fec8f=[..._0x473df4[_0x206d19(0x3fc)]()][_0x206d19(0x199)](({worker:_0x4f30c3})=>_0x2d391c(_0x4f30c3)===_0xd27a66&&!_0x4f30c3['isDead']());!_0x3fec8f&&!_0x598973&&(_0x5466a5(_0xd27a66),console[_0x206d19(0x51d)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0xd27a66));}}}},_0x445438=()=>{try{_0x220e8c();}catch{}};_0x492b77?.['events']?.['on']?.(_0x2405f9[_0x596fbf(0x31d)],_0x445438);const _0x17aa65=[];if(_0x492b77?.[_0x596fbf(0x19d)]?.['on'])for(const _0x4f4708 of _0x5d36ef){const _0xeb9ca7=_0xf3f544=>{_0x36fc72({[_0x302f1a]:_0x278bb1,'event':_0x4f4708,'data':_0xf3f544??{}});};_0x492b77['events']['on'](_0x4f4708,_0xeb9ca7),_0x17aa65[_0x596fbf(0x232)]({'event':_0x4f4708,'handler':_0xeb9ca7});}const _0x336459=setInterval(()=>{_0x220e8c(),_0x138063();},_0x27ff02);_0x336459['unref']?.();const _0x10ecf2=(_0x368527,_0xe28f0b)=>{const _0xcac75c=_0x596fbf;if(!_0xe28f0b||typeof _0xe28f0b!==_0xcac75c(0x2c0)||_0xe28f0b[_0x302f1a]!==_0x432aea)return;if(!_0x492b77?.[_0xcac75c(0x51d)]?.[_0xcac75c(0x38f)])return;const _0x17013e=_0xe28f0b[_0xcac75c(0x48f)]||{};_0x492b77[_0xcac75c(0x51d)]['ingest']({..._0x17013e,'msg':'[w'+_0xe28f0b[_0xcac75c(0x60a)]+']\x20'+(_0x17013e[_0xcac75c(0x375)]??''),'meta':{..._0x17013e[_0xcac75c(0x1a8)]||{},'worker':_0xe28f0b[_0xcac75c(0x60a)],'workerPid':_0xe28f0b[_0xcac75c(0x597)]}});};_0xec9fc3['on']('message',_0x10ecf2);const _0x528817=(_0xe24d4d,_0x334015)=>{const _0x1f261c=_0x596fbf;if(!_0x334015||typeof _0x334015!==_0x1f261c(0x2c0)||_0x334015[_0x302f1a]!==_0x2514de)return;const _0x24914d=_0x473df4[_0x1f261c(0x242)](_0xe24d4d[_0x1f261c(0x372)][_0x1f261c(0x597)]);if(_0x24914d){_0x24914d[_0x1f261c(0x31b)]={..._0x334015[_0x1f261c(0x31b)],'at':Date[_0x1f261c(0x464)]()};if(_0x334015[_0x1f261c(0x34b)]!==undefined)_0x24914d[_0x1f261c(0x34b)]=_0x334015[_0x1f261c(0x34b)];}};_0xec9fc3['on'](_0x596fbf(0x408),_0x528817),_0xec9fc3['on'](_0x596fbf(0x185),(_0x43e090,_0x6e8069,_0x6e2c7)=>{const _0x2f82e7=_0x596fbf,_0xdb0c9d=_0x43e090[_0x2f82e7(0x372)][_0x2f82e7(0x597)],_0x37ce8e=_0x2d391c(_0x43e090),_0x492217=_0x473df4[_0x2f82e7(0x242)](_0xdb0c9d);if(_0x492217&&_0x492b77?.[_0x2f82e7(0x4ca)])_0x492b77['processes'][_0x2f82e7(0x2e5)](_0xdb0c9d+':'+_0x492217['startedAt'])[_0x2f82e7(0x60b)](()=>{});_0x473df4[_0x2f82e7(0x270)](_0xdb0c9d),console[_0x2f82e7(0x51d)](_0x2f82e7(0x16c)+_0xdb0c9d+'\x20(slot='+(_0x37ce8e??'?')+_0x2f82e7(0x1d4)+('(code='+_0x6e8069+_0x2f82e7(0x190)+(_0x6e2c7??_0x2f82e7(0x477))+_0x2f82e7(0x411)+_0x473df4[_0x2f82e7(0x2b9)]+_0x2f82e7(0x502))),_0x138063();if(_0x598973||_0x37ce8e==null)return;const _0x542c91=_0x1e9808[_0x2f82e7(0x242)](_0x37ce8e);if(!_0x542c91||_0x542c91[_0x2f82e7(0x33e)])return;const _0x41c980=Date[_0x2f82e7(0x464)]();_0x542c91[_0x2f82e7(0x4dd)][_0x2f82e7(0x232)](_0x41c980),_0x542c91[_0x2f82e7(0x4dd)]=_0x542c91[_0x2f82e7(0x4dd)][_0x2f82e7(0x49f)](_0x20baee=>_0x41c980-_0x20baee<=_0x543f27);if(_0x542c91[_0x2f82e7(0x4dd)][_0x2f82e7(0x26d)]>=_0x4002b6){_0x542c91[_0x2f82e7(0x33e)]=!![],console[_0x2f82e7(0x4d4)](_0x2f82e7(0x2a3)+_0x37ce8e+_0x2f82e7(0x15b)+_0x542c91[_0x2f82e7(0x4dd)]['length']+_0x2f82e7(0x532)+(_0x543f27+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x473df4[_0x2f82e7(0x2b9)]+_0x2f82e7(0x60d)));return;}_0x542c91['consecutiveFailures']++;const _0x2a36a1=Math[_0x2f82e7(0x370)](_0x5c21e8,_0x62fdd8*0x2**(_0x542c91[_0x2f82e7(0x5f8)]-0x1));console[_0x2f82e7(0x51d)](_0x2f82e7(0x563)+_0x37ce8e+'\x20in\x20'+_0x2a36a1+_0x2f82e7(0x236)+_0x542c91[_0x2f82e7(0x5f8)]+')'),_0x542c91[_0x2f82e7(0x244)]=setTimeout(()=>{const _0x4c6430=_0x2f82e7;_0x542c91[_0x4c6430(0x244)]=null;if(_0x598973||_0x542c91[_0x4c6430(0x33e)])return;const _0xf1829d=_0x5466a5(_0x37ce8e);_0xf1829d[_0x4c6430(0x35c)](_0x4c6430(0x35a),()=>{const _0x23e827=_0x4c6430;if(_0x1e9808[_0x23e827(0x242)](_0x37ce8e)===_0x542c91)_0x542c91['consecutiveFailures']=0x0;});},_0x2a36a1),_0x542c91[_0x2f82e7(0x244)][_0x2f82e7(0x52b)]?.();});const _0x11be16=[..._0x473df4[_0x596fbf(0x4b0)]()];console[_0x596fbf(0x51d)](_0x596fbf(0x589)+process[_0x596fbf(0x597)]+_0x596fbf(0x4cd)+_0x5e80e9+_0x596fbf(0x58a)+_0x50d205+':\x20'+('['+_0x11be16[_0x596fbf(0x25d)](',\x20')+']'));const _0x460cac={'_isClusterController':!![],'port':_0x50d205,'primaryOkdb':_0x492b77??null,'status'(){const _0x17ce10=_0x596fbf;return{'clustered':!![],'primaryPid':process[_0x17ce10(0x597)],'port':_0x50d205,'primaryRole':_0x492b77?.[_0x17ce10(0x1cc)]??null,'processorPid':null,'supervisorPid':process[_0x17ce10(0x597)],'workers':[..._0x473df4[_0x17ce10(0x3fc)]()][_0x17ce10(0x32d)](({worker:_0x4d2abb})=>({'pid':_0x4d2abb[_0x17ce10(0x372)]['pid'],'id':_0x4d2abb['id'],'dead':_0x4d2abb['isDead']()}))};},async 'close'(){const _0x14c196=_0x596fbf;_0x598973=!![];for(const _0x518a44 of _0x1e9808[_0x14c196(0x3fc)]()){_0x518a44[_0x14c196(0x33e)]=!![],_0x518a44[_0x14c196(0x244)]&&(clearTimeout(_0x518a44[_0x14c196(0x244)]),_0x518a44[_0x14c196(0x244)]=null);}clearInterval(_0x336459),_0xec9fc3[_0x14c196(0x467)](_0x14c196(0x408),_0x10ecf2),_0xec9fc3[_0x14c196(0x467)](_0x14c196(0x408),_0x528817),_0x492b77?.['events']?.[_0x14c196(0x467)]?.(_0x2405f9[_0x14c196(0x31d)],_0x445438);if(_0x492b77?.['events']?.[_0x14c196(0x467)])for(const {event:_0x5094e6,handler:_0x5a76ee}of _0x17aa65){try{_0x492b77[_0x14c196(0x19d)][_0x14c196(0x467)](_0x5094e6,_0x5a76ee);}catch{}}_0x17aa65[_0x14c196(0x26d)]=0x0;const _0x2adf59=[..._0x473df4[_0x14c196(0x3fc)]()]['map'](({worker:_0x294f99})=>_0x294f99);if(_0x2adf59[_0x14c196(0x26d)]===0x0)return;await Promise[_0x14c196(0x1b0)](_0x2adf59[_0x14c196(0x32d)](_0x5ea255=>new Promise(_0x140efd=>{const _0x5bce32=_0x14c196;if(_0x5ea255[_0x5bce32(0x4c1)]()){_0x140efd();return;}let _0x1748b6=![];const _0x7304d1=()=>{if(_0x1748b6)return;_0x1748b6=!![];if(_0x3561a7)clearTimeout(_0x3561a7);_0x140efd();};_0x5ea255['once']('exit',_0x7304d1);const _0x3561a7=setTimeout(()=>{const _0x165cb5=_0x5bce32;try{_0x5ea255[_0x165cb5(0x372)][_0x165cb5(0x17b)]();}catch{}},_0x1d4b78+0x1f4);_0x3561a7[_0x5bce32(0x52b)]?.();try{_0x5ea255[_0x5bce32(0x39c)]();}catch{try{_0x5ea255[_0x5bce32(0x372)][_0x5bce32(0x17b)]();}catch{}}})));}};return _0x460cac;}async function _0xb6c3c7({makeOkdb:_0x2abb32,port:_0x5380ed}){const _0x57d9f9=_0x12b638,_0x26c861=await _0x2abb32();return _0x4feb74(_0x26c861),_0x26c861[_0x57d9f9(0x309)][_0x57d9f9(0x340)](_0x5380ed);}function _0x4feb74(_0x42dbf4){const _0x507eb2=_0x12b638;if(!_0x42dbf4||_0x42dbf4[_0x507eb2(0x3a3)])return;_0x42dbf4[_0x507eb2(0x3a3)]=!![];try{const {OKDBChangefeed:_0x5a28ac}=requireOkdbChangefeed(),_0x3c1849=_0x42dbf4[_0x507eb2(0x369)];if(_0x3c1849&&typeof _0x3c1849['attachFeed']===_0x507eb2(0x49d)){const _0x547b78=new _0x5a28ac(_0x42dbf4);_0x547b78['start'](),_0x3c1849[_0x507eb2(0x56f)](_0x547b78),_0x42dbf4[_0x507eb2(0x196)]=_0x547b78;}}catch(_0x691658){_0x42dbf4['log']?.['warn']?.(_0x507eb2(0x42b)+(_0x691658?.[_0x507eb2(0x408)]??_0x691658),{'feature':_0x507eb2(0x5a3)});}const _0x296682=_0x202993=>{const _0x10c6fc=_0x507eb2;if(!_0x202993||typeof _0x202993!==_0x10c6fc(0x2c0)||_0x202993[_0x302f1a]==null)return;if(_0x202993[_0x302f1a]===_0x278bb1)try{_0x42dbf4[_0x10c6fc(0x369)]?.[_0x10c6fc(0x469)]?.(_0x202993[_0x10c6fc(0x3fa)],_0x202993[_0x10c6fc(0x317)]);}catch{}};process['on'](_0x507eb2(0x408),_0x296682),_0x42dbf4['_clusterOnMessage']=_0x296682;{let _0x3172f2=process[_0x507eb2(0x350)](),_0x247aeb=Date[_0x507eb2(0x464)]();const _0x590a39=()=>{const _0x44802f=_0x507eb2;if(typeof process['send']!=='function'||!process[_0x44802f(0x4a7)])return;const _0x170013=Date[_0x44802f(0x464)](),_0x1e914a=process[_0x44802f(0x350)](),_0x726831=(_0x170013-_0x247aeb)*0x3e8,_0x5e6776=_0x1e914a[_0x44802f(0x591)]-_0x3172f2[_0x44802f(0x591)]+(_0x1e914a[_0x44802f(0x392)]-_0x3172f2['system']),_0x4fc9b5=_0x726831>0x0?Math[_0x44802f(0x370)](0x64,Math[_0x44802f(0x24d)](_0x5e6776/(_0x726831*(_0x2869d0['cpus']()[_0x44802f(0x26d)]||0x1))*0x64)):0x0;_0x3172f2=_0x1e914a,_0x247aeb=_0x170013;const _0x5967f6=process[_0x44802f(0x314)]();let _0x56826c=null;try{_0x56826c=_0x42dbf4[_0x44802f(0x1cc)]?.['processors']?_0x42dbf4[_0x44802f(0x4ca)]?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process[_0x44802f(0x4e5)]({[_0x302f1a]:_0x2514de,'stats':{'rss':_0x5967f6[_0x44802f(0x58f)],'heapUsed':_0x5967f6['heapUsed'],'heapTotal':_0x5967f6[_0x44802f(0x275)],'external':_0x5967f6[_0x44802f(0x5fd)],'cpuPct':_0x4fc9b5,'cpuWindowMs':Math['round'](_0x726831/0x3e8)||null},'processing':_0x56826c});}catch{}},_0x4ff3b4=Math[_0x507eb2(0x5e4)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x78af3a=setInterval(_0x590a39,_0x4ff3b4);_0x78af3a[_0x507eb2(0x52b)]?.(),_0x590a39();for(const _0x539378 of[_0x507eb2(0x57c),_0x507eb2(0x61c)]){_0x42dbf4[_0x507eb2(0x19d)]?.['on']?.(_0x539378,()=>{try{_0x590a39();}catch{}});}}let _0x2ec05e=![];const _0x301614=async _0x1519d9=>{const _0x5dd80a=_0x507eb2;if(_0x2ec05e)return;_0x2ec05e=!![];const _0x4a0ebd=setTimeout(()=>process[_0x5dd80a(0x185)](_0x1519d9),_0x1d4b78);_0x4a0ebd[_0x5dd80a(0x52b)]?.();try{await _0x42dbf4['close']?.();}catch{}process['exit'](_0x1519d9);};process['on']('disconnect',()=>_0x301614(0x0));if(process['platform']!==_0x507eb2(0x2f9)){const _0x2c58eb=setInterval(()=>{const _0x233021=_0x507eb2;if(process[_0x233021(0x433)]===0x1)_0x301614(0x0);},_0x406541);_0x2c58eb[_0x507eb2(0x52b)]?.(),_0x42dbf4['_clusterOrphanWatch']=_0x2c58eb;}}return okdbCluster={'runClustered':_0x40fd60,'attachWorkerCluster':_0x4feb74},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x48504d=_0x18fcc0;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x48504d(0x36b)]();}catch{}const _0x289685=require$$1,_0x59da27=require$$1$1,{resolveWorkers:_0x4df2bc,isShmbufNative:_0x550ceb}=requireOkdbWorkers();function _0x2f5057(_0x5bbb2b){const _0x11761d=_0x48504d,_0x5b32a7=_0x5bbb2b['slice'](0x2),_0x5cd269={};let _0x46ae80=0x0;while(_0x46ae80<_0x5b32a7[_0x11761d(0x26d)]){const _0x560938=_0x5b32a7[_0x46ae80];if(_0x560938===_0x11761d(0x4db)||_0x560938==='-p')_0x5cd269[_0x11761d(0x345)]=Number(_0x5b32a7[++_0x46ae80]);else{if(_0x560938===_0x11761d(0x540)||_0x560938==='-d')_0x5cd269[_0x11761d(0x15d)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x493)||_0x560938==='-k')_0x5cd269[_0x11761d(0x4ff)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x313)||_0x560938==='-c')_0x5cd269[_0x11761d(0x2fc)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x3ef))_0x5cd269['logLevel']=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x4d8))_0x5cd269['noRepl']=!![];else{if(_0x560938===_0x11761d(0x203))_0x5cd269[_0x11761d(0x58e)]=!![];else{if(_0x560938===_0x11761d(0x1d8))_0x5cd269[_0x11761d(0x34e)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x5d7))_0x5cd269[_0x11761d(0x4ae)]=!![];else{if(_0x560938==='--env'||_0x560938==='-e')_0x5cd269['env']=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x5db))_0x5cd269['types']=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x434))_0x5cd269[_0x11761d(0x210)]=!![];else{if(_0x560938==='--blobs')_0x5cd269[_0x11761d(0x1ce)]=!![];else{if(_0x560938===_0x11761d(0x254))_0x5cd269['drop']=!![];else{if(_0x560938===_0x11761d(0x1d3)){const _0x143d58=[];while(_0x46ae80+0x1<_0x5b32a7[_0x11761d(0x26d)]&&!_0x5b32a7[_0x46ae80+0x1][_0x11761d(0x2e2)]('--')){_0x143d58[_0x11761d(0x232)](_0x5b32a7[++_0x46ae80]);}_0x5cd269[_0x11761d(0x2ad)]=_0x143d58[_0x11761d(0x26d)]>0x0?_0x143d58:!![];}else{if(_0x560938===_0x11761d(0x5f6))_0x5cd269[_0x11761d(0x3d8)]=!![];else{if(_0x560938==='--name')_0x5cd269['name']=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x4e1))_0x5cd269[_0x11761d(0x18c)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x241))_0x5cd269['label']=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x3ed))_0x5cd269[_0x11761d(0x1d9)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x5eb))_0x5cd269['grants']=_0x5b32a7[++_0x46ae80];else{if(_0x560938==='--ttl')_0x5cd269[_0x11761d(0x37c)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x41e))_0x5cd269[_0x11761d(0x22a)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x216)||_0x560938==='-u')_0x5cd269['username']=_0x5b32a7[++_0x46ae80];else{if(_0x560938==='--address')_0x5cd269[_0x11761d(0x4fd)]=_0x5b32a7[++_0x46ae80];else{if(_0x560938===_0x11761d(0x32b)||_0x560938==='-v'){const _0x2f749b=require$$3;console['log'](_0x2f749b['version']),process[_0x11761d(0x185)](0x0);}else(_0x560938===_0x11761d(0x1e8)||_0x560938==='-h')&&(_0x3b5b1e(),process[_0x11761d(0x185)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x46ae80++;}return _0x5cd269;}function _0x3b5b1e(){const _0x560814=_0x48504d;console[_0x560814(0x51d)](_0x560814(0x517));}const _0x4b59ae=new Set([_0x48504d(0x17a),_0x48504d(0x619),_0x48504d(0x1da),'error']);function _0xdb26cf(_0x36d3f4){const _0x4ca445=_0x48504d,_0x3eda0a=_0x36d3f4[_0x4ca445(0x2fc)]?_0x289685[_0x4ca445(0x58d)](_0x36d3f4[_0x4ca445(0x2fc)]):_0x289685[_0x4ca445(0x58d)](_0x4ca445(0x452));let _0x2cb545={};if(_0x59da27[_0x4ca445(0x5fc)](_0x3eda0a))try{const _0x22d336=_0x59da27[_0x4ca445(0x4c8)](_0x3eda0a,_0x4ca445(0x39a))[_0x4ca445(0x197)](/^\uFEFF/,'');_0x2cb545=JSON[_0x4ca445(0x519)](_0x22d336),console['log'](_0x4ca445(0x612)+_0x3eda0a);}catch(_0x55cdc0){console[_0x4ca445(0x4d4)](_0x4ca445(0x2c5)+_0x3eda0a+':\x20'+_0x55cdc0[_0x4ca445(0x408)]),process[_0x4ca445(0x185)](0x1);}const _0x458aac={'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},_0x4aecfa={'port':_0x36d3f4[_0x4ca445(0x345)]??_0x2cb545['port']??_0x458aac[_0x4ca445(0x345)]??0x2124,'dbPath':_0x36d3f4[_0x4ca445(0x15d)]??_0x2cb545['path']??_0x458aac[_0x4ca445(0x15d)]??_0x4ca445(0x32f),'key':_0x36d3f4[_0x4ca445(0x4ff)]??_0x2cb545['key']??_0x458aac[_0x4ca445(0x4ff)]??undefined,'logLevel':_0x36d3f4[_0x4ca445(0x5f3)]??_0x2cb545[_0x4ca445(0x5f3)]??_0x458aac[_0x4ca445(0x5f3)]??_0x4ca445(0x619),'noRepl':_0x36d3f4[_0x4ca445(0x2b0)]??_0x2cb545['noRepl']??_0x458aac[_0x4ca445(0x2b0)]??![],'noAdmin':_0x36d3f4[_0x4ca445(0x58e)]??_0x2cb545['noAdmin']??_0x458aac['noAdmin']??![],'admin':_0x2cb545['admin']??{},'api':_0x2cb545[_0x4ca445(0x226)]??undefined,'auth':_0x2cb545[_0x4ca445(0x57a)]??undefined,'mcp':_0x2cb545[_0x4ca445(0x16f)]??undefined,'http':_0x2cb545[_0x4ca445(0x309)]??undefined,'timeMachine':_0x2cb545[_0x4ca445(0x5ba)]!==![]?_0x2cb545[_0x4ca445(0x5ba)]??{}:![]};if(_0x36d3f4[_0x4ca445(0x4ae)])_0x4aecfa[_0x4ca445(0x4ae)]=!![];if(_0x36d3f4[_0x4ca445(0x34e)]!==undefined)_0x4aecfa[_0x4ca445(0x496)]=_0x36d3f4[_0x4ca445(0x34e)];return _0x36d3f4[_0x4ca445(0x2ad)]!==undefined&&(_0x4aecfa[_0x4ca445(0x57a)]=_0x4aecfa[_0x4ca445(0x57a)]||{},_0x4aecfa['auth'][_0x4ca445(0x2ad)]=_0x36d3f4[_0x4ca445(0x2ad)]),_0x36d3f4[_0x4ca445(0x3d8)]&&(_0x4aecfa[_0x4ca445(0x17a)]=_0x4aecfa[_0x4ca445(0x17a)]||{},_0x4aecfa[_0x4ca445(0x17a)][_0x4ca445(0x3d8)]=!![]),(!Number[_0x4ca445(0x397)](_0x4aecfa[_0x4ca445(0x345)])||_0x4aecfa[_0x4ca445(0x345)]<0x1||_0x4aecfa['port']>0xffff)&&(console['error'](_0x4ca445(0x27e)+_0x4aecfa[_0x4ca445(0x345)]+_0x4ca445(0x594)),process[_0x4ca445(0x185)](0x1)),!_0x4b59ae[_0x4ca445(0x503)](_0x4aecfa['logLevel'])&&(console[_0x4ca445(0x4d4)](_0x4ca445(0x18d)+_0x4aecfa[_0x4ca445(0x5f3)]+_0x4ca445(0x4b5)),process[_0x4ca445(0x185)](0x1)),_0x4aecfa;}function _0x391055(_0x5547f1){const _0x23b49a=_0x48504d;return!!(_0x5547f1&&typeof _0x5547f1===_0x23b49a(0x2c0)&&!Array[_0x23b49a(0x60f)](_0x5547f1)&&Object['keys'](_0x5547f1)['length']>0x0);}function _0x1e6362(_0x4f0a82){const _0x484c85=_0x48504d;return{..._0x4f0a82[_0x484c85(0x4ff)]?{'encryptionKey':_0x4f0a82['key']}:{},'engines':![],'processors':![],'compaction':![]};}const _0x1264c8=!process[_0x48504d(0x1a0)][_0x48504d(0x59c)]||!!process.env.NO_COLOR;function _0x2a79d2(_0x22aa96,_0x274247){const _0x4fe118=_0x48504d;return _0x1264c8?_0x274247:'\x1b['+_0x22aa96+'m'+_0x274247+_0x4fe118(0x16b);}function _0x5d25ff(_0x3c7fc4){const _0x5cdc40=_0x48504d;if(!_0x3c7fc4||_0x3c7fc4[_0x5cdc40(0x26d)]===0x0)return;const _0x3c8b2f='─'[_0x5cdc40(0x617)](0x38);process[_0x5cdc40(0x545)]['write']('\x0a'),process[_0x5cdc40(0x545)][_0x5cdc40(0x478)](_0x2a79d2('33',_0x5cdc40(0x305)+_0x3c7fc4[_0x5cdc40(0x26d)]+_0x5cdc40(0x5a2)+(_0x3c7fc4[_0x5cdc40(0x26d)]>0x1?'S':'')+'\x0a')),process['stderr'][_0x5cdc40(0x478)]('\x20\x20'+_0x3c8b2f+'\x0a');for(const _0x2e5d9d of _0x3c7fc4){const _0x449e64=_0x2e5d9d[_0x5cdc40(0x37e)]===_0x5cdc40(0x4d4)?_0x2a79d2('31',_0x5cdc40(0x1f4)):_0x2a79d2('33',_0x5cdc40(0x4a5));process['stderr'][_0x5cdc40(0x478)](_0x449e64+'\x20\x20'+_0x2a79d2('1',_0x2e5d9d[_0x5cdc40(0x267)])+'\x0a'),process[_0x5cdc40(0x545)][_0x5cdc40(0x478)](_0x5cdc40(0x4fe)+_0x2e5d9d[_0x5cdc40(0x408)]+'\x0a');if(_0x2e5d9d[_0x5cdc40(0x1a6)])process[_0x5cdc40(0x545)][_0x5cdc40(0x478)](_0x5cdc40(0x4fe)+_0x2a79d2('2','Hint:\x20'+_0x2e5d9d[_0x5cdc40(0x1a6)])+'\x0a');process[_0x5cdc40(0x545)][_0x5cdc40(0x478)]('\x0a');}process[_0x5cdc40(0x545)][_0x5cdc40(0x478)]('\x20\x20'+_0x3c8b2f+'\x0a\x0a');}function _0x53732d(_0x1d38a7,_0x4a6f64,_0x20062f={}){const _0x3f3a33=_0x48504d,_0x1595a1=_0x1d38a7['http'][_0x3f3a33(0x340)](_0x4a6f64,_0x20062f);if(_0x1595a1&&_0x1595a1[_0x3f3a33(0x4b1)])return Promise[_0x3f3a33(0x58d)](_0x1595a1);return new Promise((_0x1efcad,_0x808b66)=>{const _0x33dbd9=_0x3f3a33;_0x1595a1[_0x33dbd9(0x35c)](_0x33dbd9(0x35a),_0x1efcad),_0x1595a1[_0x33dbd9(0x35c)](_0x33dbd9(0x4d4),_0x808b66);});}async function _0x588282(_0x517358){const _0x455f18=_0x48504d,_0xf861e2=require$$4$1;console[_0x455f18(0x51d)](_0x455f18(0x5e9));let _0x54b7da=!![];const _0x4b9e05=(_0x27341f,_0x38acda)=>{console['log']('\x20\x20'+(_0x27341f?'✓':'✗')+'\x20'+_0x38acda);if(!_0x27341f)_0x54b7da=![];},_0x3b176d=Number(process[_0x455f18(0x42c)][_0x455f18(0x197)]('v','')['split']('.')[0x0]);_0x4b9e05(_0x3b176d>=0x12,_0x455f18(0x508)+process['version']+(_0x3b176d<0x12?_0x455f18(0x170):''));const _0x2c6a67=_0x289685[_0x455f18(0x58d)](_0x517358[_0x455f18(0x17d)]);try{_0x59da27[_0x455f18(0x5c0)](_0x2c6a67,{'recursive':!![]});const _0x2a58d3=_0x289685[_0x455f18(0x25d)](_0x2c6a67,_0x455f18(0x255));_0x59da27['writeFileSync'](_0x2a58d3,''),_0x59da27[_0x455f18(0x4f8)](_0x2a58d3),_0x4b9e05(!![],_0x455f18(0x240)+_0x2c6a67);}catch(_0x5b65fb){_0x4b9e05(![],_0x455f18(0x4cb)+_0x2c6a67+_0x455f18(0x449)+_0x5b65fb['message']+')');}const _0x4c697b=await new Promise(_0x392589=>{const _0x46b515=_0x455f18,_0x34e882=_0xf861e2['createServer']();_0x34e882[_0x46b515(0x35c)](_0x46b515(0x4d4),()=>_0x392589(![])),_0x34e882['once'](_0x46b515(0x35a),()=>{const _0x3f31aa=_0x46b515;_0x34e882[_0x3f31aa(0x284)](),_0x392589(!![]);}),_0x34e882['listen'](_0x517358[_0x46b515(0x345)],_0x46b515(0x3aa));});_0x4b9e05(_0x4c697b,_0x455f18(0x4e4)+_0x517358['port']+'\x20'+(_0x4c697b?_0x455f18(0x445):_0x455f18(0x568)));const _0x20f38c=_0x289685[_0x455f18(0x58d)](_0x455f18(0x452));if(_0x59da27[_0x455f18(0x5fc)](_0x20f38c))try{JSON[_0x455f18(0x519)](_0x59da27[_0x455f18(0x4c8)](_0x20f38c,_0x455f18(0x39a))[_0x455f18(0x197)](/^\uFEFF/,'')),_0x4b9e05(!![],_0x455f18(0x506)+_0x20f38c);}catch(_0x254905){_0x4b9e05(![],_0x455f18(0x567)+_0x254905[_0x455f18(0x408)]);}else _0x4b9e05(!![],_0x455f18(0x5fa));if(_0x550ceb()){const _0x17d203=_0x4df2bc(_0x517358,{'shmbufNative':!![]});_0x4b9e05(!![],_0x455f18(0x3e9)+_0x17d203+'\x20worker'+(_0x17d203===0x1?'':'s')+')');}else _0x4b9e05(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x4c697b)try{const _0xfd7857=require('../okdb'),_0x57af73=new _0xfd7857(_0x2c6a67,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x57af73['open']();try{await _0x57af73['processes']['open']({'reader':!![]});const _0x2a3f81=_0x57af73[_0x455f18(0x4ca)][_0x455f18(0x37a)](),_0x1ac56f=_0x2a3f81[_0x455f18(0x49f)](_0x94ba3e=>_0x94ba3e[_0x455f18(0x31f)]!=null)[_0x455f18(0x26d)];_0x4b9e05(!![],'processes:\x20'+_0x2a3f81[_0x455f18(0x26d)]+'\x20process'+(_0x2a3f81[_0x455f18(0x26d)]===0x1?'':'es')+'\x20('+_0x1ac56f+'\x20supervised)');}finally{await _0x57af73[_0x455f18(0x284)]();}}catch{}console[_0x455f18(0x51d)](''),_0x54b7da?console['log'](_0x455f18(0x322)):(console[_0x455f18(0x51d)](_0x455f18(0x34a)),process[_0x455f18(0x185)](0x1));}async function _0x515359(){const _0x5dc82a=_0x48504d,_0x4f3ab5=_0x289685[_0x5dc82a(0x58d)](_0x5dc82a(0x452));!_0x59da27['existsSync'](_0x4f3ab5)?(_0x59da27[_0x5dc82a(0x3a7)](_0x4f3ab5,JSON['stringify']({'port':0x2124,'path':_0x5dc82a(0x32f),'logLevel':_0x5dc82a(0x619),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x5dc82a(0x51d)](_0x5dc82a(0x198))):console[_0x5dc82a(0x51d)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0xa60e60=_0x289685[_0x5dc82a(0x58d)](_0x5dc82a(0x32f));!_0x59da27[_0x5dc82a(0x5fc)](_0xa60e60)?(_0x59da27[_0x5dc82a(0x5c0)](_0xa60e60,{'recursive':!![]}),console[_0x5dc82a(0x51d)](_0x5dc82a(0x2df))):console['log'](_0x5dc82a(0x4a4)),console[_0x5dc82a(0x51d)](_0x5dc82a(0x224));}async function _0x20c5b6(_0x209707){const _0xab22db=_0x48504d,_0x588406=_0x289685['resolve'](_0x209707[_0xab22db(0x17d)]);if(!_0x59da27['existsSync'](_0x588406)){console[_0xab22db(0x51d)](_0xab22db(0x481)+_0x588406+_0xab22db(0x52e));return;}const _0x2666c7=require$$0$3,_0x4204de=_0x2666c7[_0xab22db(0x447)]({'input':process[_0xab22db(0x440)],'output':process[_0xab22db(0x1a0)]}),_0x51962c=await new Promise(_0x1b5ee9=>_0x4204de[_0xab22db(0x227)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x588406+_0xab22db(0x5cb),_0x1b5ee9));_0x4204de[_0xab22db(0x284)](),console[_0xab22db(0x51d)]('');if(_0x51962c['trim']()[_0xab22db(0x454)]()!=='yes'){console['log'](_0xab22db(0x4df));return;}let _0x424a5a=null;try{_0x424a5a=await _0x3f0acd(_0x588406,_0x209707,async _0x56d4c9=>{const _0x291862=_0xab22db,_0x1ce86a=_0x56d4c9[_0x291862(0x52c)],_0x365b6e=_0x1ce86a?.['db']?.['get'](_0x291862(0x3e8))??null,_0x38d080=[];if(_0x1ce86a?.[_0x291862(0x211)](_0x291862(0x1bf)))for(const {key:_0xc0c469,value:_0xf71d6}of _0x1ce86a['getRange'](_0x291862(0x1bf))){_0x38d080[_0x291862(0x232)]({'key':_0xc0c469,'value':_0xf71d6});}return{'identity':_0x365b6e,'licenses':_0x38d080};});}catch(_0x24f5f1){console['log']('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x24f5f1['message']+_0xab22db(0x2c2));}_0x59da27[_0xab22db(0x16e)](_0x588406,{'recursive':!![],'force':!![]}),console[_0xab22db(0x51d)](_0xab22db(0x482)+_0x588406+'\x20deleted');if(_0x424a5a&&(_0x424a5a[_0xab22db(0x18a)]||_0x424a5a[_0xab22db(0x3fe)][_0xab22db(0x26d)]>0x0))try{await _0x3f0acd(_0x588406,_0x209707,async _0x2455b9=>{const _0x488bc4=_0xab22db,_0x2a692d=_0x2455b9[_0x488bc4(0x52c)];_0x424a5a[_0x488bc4(0x18a)]&&_0x2a692d['db'][_0x488bc4(0x32c)](_0x488bc4(0x3e8),_0x424a5a[_0x488bc4(0x18a)]);if(_0x424a5a[_0x488bc4(0x3fe)][_0x488bc4(0x26d)]>0x0){if(!_0x2a692d['hasType'](_0x488bc4(0x1bf)))await _0x2a692d[_0x488bc4(0x2ba)](_0x488bc4(0x1bf));for(const {key:_0xc69fac,value:_0x1c454}of _0x424a5a[_0x488bc4(0x3fe)]){await _0x2a692d[_0x488bc4(0x5d4)](_0x488bc4(0x1bf),_0xc69fac,_0x1c454);}}});const _0xf1d946=[];if(_0x424a5a[_0xab22db(0x18a)])_0xf1d946['push']('node\x20identity');if(_0x424a5a[_0xab22db(0x3fe)][_0xab22db(0x26d)]>0x0)_0xf1d946[_0xab22db(0x232)](_0x424a5a['licenses']['length']+_0xab22db(0x279));console[_0xab22db(0x51d)](_0xab22db(0x3d7)+_0xf1d946[_0xab22db(0x25d)](_0xab22db(0x42e)));}catch(_0xb9dc24){console[_0xab22db(0x51d)](_0xab22db(0x189)+_0xb9dc24['message']);}}async function _0x3f0acd(_0x4145d4,_0x40acaa,_0x3e15ce){const _0x229455=_0x48504d,_0x3d0eb0=require$$5,_0x299d3e=new _0x3d0eb0(_0x4145d4,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x1e6362(_0x40acaa)});await _0x299d3e[_0x229455(0x2ad)]();try{return await _0x3e15ce(_0x299d3e);}finally{await _0x299d3e[_0x229455(0x284)]();}}async function _0x36fcad(_0x178e3d,_0xd2a1e7){const _0x400eb9=_0x48504d,_0x1cabc2=require$$5,_0x45a08b=_0x289685[_0x400eb9(0x58d)](_0xd2a1e7[_0x400eb9(0x17d)]);console[_0x400eb9(0x51d)](_0x400eb9(0x463)+_0x45a08b+'…');const _0xc9f717=new _0x1cabc2(_0x45a08b,_0x1e6362(_0xd2a1e7));await _0xc9f717['open'](),console['log'](_0x400eb9(0x18e)+_0x178e3d+'…');const {envs:_0x482095}=await _0xc9f717[_0x400eb9(0x3a1)][_0x400eb9(0x507)](_0x178e3d);for(const _0x5d8637 of _0x482095){const _0x3bd67d=_0x5d8637[_0x400eb9(0x61e)]>0x0?_0x400eb9(0x449)+(_0x5d8637[_0x400eb9(0x61e)]/0x400/0x400)[_0x400eb9(0x365)](0x2)+_0x400eb9(0x328)+(_0x5d8637[_0x400eb9(0x171)]/0x400/0x400)[_0x400eb9(0x365)](0x2)+_0x400eb9(0x4c2):'';console[_0x400eb9(0x51d)](_0x400eb9(0x1db)+_0x5d8637['name']+'\x20\x20→\x20\x20'+_0x5d8637[_0x400eb9(0x2b8)]+_0x3bd67d);}await _0xc9f717[_0x400eb9(0x284)](),console[_0x400eb9(0x51d)]('[okdb]\x20backup\x20complete');}async function _0x2e9e12(_0x3ab779,_0x450cf2,_0x373201){const _0x3dc144=_0x48504d,_0x30ffad=require$$5,_0x2a41ab=_0x289685['resolve'](_0x450cf2[_0x3dc144(0x17d)]),_0x2d7c3e=_0x373201[_0x3dc144(0x162)]??'default',_0x15a9c8=_0x373201[_0x3dc144(0x22f)]?_0x373201[_0x3dc144(0x22f)]['split'](',')[_0x3dc144(0x32d)](_0x141870=>_0x141870[_0x3dc144(0x288)]()):null;console[_0x3dc144(0x51d)](_0x3dc144(0x463)+_0x2a41ab+'…');const _0x4c2f0e=new _0x30ffad(_0x2a41ab,_0x1e6362(_0x450cf2));await _0x4c2f0e['open'](),console['log'](_0x3dc144(0x3fb)+_0x2d7c3e+_0x3dc144(0x410)+_0x3ab779+'…');const _0x33e62f=await _0x4c2f0e[_0x3dc144(0x3a1)]['exportToFile'](_0x3ab779,{'envName':_0x2d7c3e,'types':_0x15a9c8,'includeChanges':!!_0x373201[_0x3dc144(0x210)]});console[_0x3dc144(0x51d)](_0x3dc144(0x31c)+_0x33e62f[_0x3dc144(0x22f)]+_0x3dc144(0x252)+_0x33e62f['records']+_0x3dc144(0x4e8)+_0x33e62f['changes']);if(_0x373201[_0x3dc144(0x1ce)]){const _0x50f71f=_0x289685[_0x3dc144(0x25d)](_0x289685[_0x3dc144(0x3d9)](_0x3ab779),_0x3dc144(0x1ce));process[_0x3dc144(0x1a0)][_0x3dc144(0x478)](_0x3dc144(0x5fe));const {count:_0x56c778,bytes:_0x45ff2a}=await _0x4c2f0e[_0x3dc144(0x3a1)][_0x3dc144(0x38b)](_0x50f71f);console['log'](_0x3dc144(0x301)+_0x50f71f+_0x3dc144(0x449)+_0x56c778+_0x3dc144(0x590)+(_0x56c778!==0x1?'s':'')+',\x20'+(_0x45ff2a/0x400/0x400)[_0x3dc144(0x365)](0x2)+_0x3dc144(0x4c2));}await _0x4c2f0e[_0x3dc144(0x284)](),console[_0x3dc144(0x51d)](_0x3dc144(0x505));}async function _0x2e27cb(_0x7c4ed6,_0x1da71d,_0x4a535b){const _0x53a564=_0x48504d,_0x48b007=require$$5,_0x135994=_0x289685[_0x53a564(0x58d)](_0x1da71d[_0x53a564(0x17d)]),_0xf5a53=_0x4a535b[_0x53a564(0x162)]??null,_0x5ca867=_0x4a535b['types']?_0x4a535b[_0x53a564(0x22f)][_0x53a564(0x56e)](',')[_0x53a564(0x32d)](_0x465eba=>_0x465eba[_0x53a564(0x288)]()):null,_0x9443cd=!!_0x4a535b['drop'];console[_0x53a564(0x51d)](_0x53a564(0x463)+_0x135994+'…');const _0x1313a8=new _0x48b007(_0x135994,_0x1e6362(_0x1da71d));await _0x1313a8['open'](),console[_0x53a564(0x51d)](_0x53a564(0x26c)+_0x7c4ed6+'…');const _0x4ae934=await _0x1313a8[_0x53a564(0x3a1)][_0x53a564(0x1c0)](_0x7c4ed6,{'envName':_0xf5a53,'types':_0x5ca867,'dropExisting':_0x9443cd,'includeChanges':!!_0x4a535b[_0x53a564(0x210)],'onProgress':({type:_0x16a1cb,count:_0x55a157})=>{const _0x1f889e=_0x53a564;process[_0x1f889e(0x1a0)][_0x1f889e(0x478)]('\x0d[okdb]\x20'+_0x16a1cb+':\x20'+_0x55a157+_0x1f889e(0x39f));}});process['stdout'][_0x53a564(0x478)]('\x0a'),console[_0x53a564(0x51d)](_0x53a564(0x385)+_0x4ae934[_0x53a564(0x22f)]+_0x53a564(0x252)+_0x4ae934[_0x53a564(0x21e)]+_0x53a564(0x4e8)+_0x4ae934[_0x53a564(0x210)]);if(_0x4a535b['blobs']){const _0x1882f7=_0x289685[_0x53a564(0x25d)](_0x289685[_0x53a564(0x3d9)](_0x7c4ed6),_0x53a564(0x1ce));if(_0x59da27[_0x53a564(0x5fc)](_0x1882f7)){const {imported:_0x52f702,skipped:_0x22f5ed}=await _0x1313a8[_0x53a564(0x3a1)]['importBlobs'](_0x1882f7);console[_0x53a564(0x51d)](_0x53a564(0x36f)+_0x52f702+'\x20\x20skipped='+_0x22f5ed);}}await _0x1313a8[_0x53a564(0x284)](),console['log'](_0x53a564(0x21a));}async function _0x4436ae(_0x61c8c,_0xa30e98){const _0x60719d=_0x48504d;_0xa30e98[_0x60719d(0x18c)]&&!_0xa30e98[_0x60719d(0x60c)]&&(console['error']('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x60719d(0x185)](0x1));const _0x30f3c2=_0xa30e98['permissions']?_0xa30e98[_0x60719d(0x1d9)][_0x60719d(0x56e)](',')[_0x60719d(0x32d)](_0x224fd1=>_0x224fd1[_0x60719d(0x288)]())[_0x60719d(0x49f)](Boolean):[];let _0x46e905={};if(_0xa30e98[_0x60719d(0x555)])try{_0x46e905=JSON[_0x60719d(0x519)](_0xa30e98[_0x60719d(0x555)]);if(typeof _0x46e905!=='object'||Array[_0x60719d(0x60f)](_0x46e905)||_0x46e905===null)throw new Error();}catch{console[_0x60719d(0x4d4)](_0x60719d(0x571)),process[_0x60719d(0x185)](0x1);}const _0x178d76=require$$5,{randomToken:_0x306849,hashToken:_0x29e760,hashPassword:_0x412780}=requireOkdbAuthTokens(),_0x4bb477=require$$0$1,_0x4d89ac=_0x289685[_0x60719d(0x58d)](_0x61c8c['dbPath']),_0x454c5d=new _0x178d76(_0x4d89ac,_0x1e6362(_0x61c8c));await _0x454c5d[_0x60719d(0x2ad)]();try{await _0x454c5d[_0x60719d(0x57a)][_0x60719d(0x56c)]();if(_0xa30e98[_0x60719d(0x60c)]){const _0x3ff3df=await _0x454c5d['auth'][_0x60719d(0x33d)](_0xa30e98['name']);_0x3ff3df&&(console[_0x60719d(0x4d4)](_0x60719d(0x20b)+_0xa30e98[_0x60719d(0x60c)]+_0x60719d(0x21d)),process[_0x60719d(0x185)](0x1));}const _0x257b4a=_0x306849(0x20),_0x3fd134=_0x29e760(_0x257b4a),_0x7234a1=_0xa30e98[_0x60719d(0x18c)]?await _0x412780(_0xa30e98[_0x60719d(0x18c)]):null,_0x23861b=_0x4bb477[_0x60719d(0x298)](),_0x2a9b3c={'tokenHash':_0x3fd134,'name':_0xa30e98[_0x60719d(0x60c)]||null,'passwordHash':_0x7234a1,'label':_0xa30e98['label']||null,'permissions':_0x30f3c2,'grants':_0x46e905,'createdAt':Date[_0x60719d(0x464)](),'lastUsedAt':null},_0x1ff021=_0xa30e98[_0x60719d(0x37c)]?{'ttl':Number(_0xa30e98[_0x60719d(0x37c)])}:undefined;await _0x454c5d[_0x60719d(0x52c)][_0x60719d(0x5d4)](_0x60719d(0x4f9),_0x23861b,_0x2a9b3c,_0x1ff021),console[_0x60719d(0x51d)]('\x0a\x20\x20✓\x20Token\x20created'),console[_0x60719d(0x51d)](_0x60719d(0x5c2)+_0x23861b),console[_0x60719d(0x51d)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xa30e98[_0x60719d(0x60c)]||_0x60719d(0x53a))),console[_0x60719d(0x51d)](_0x60719d(0x406)+(_0xa30e98[_0x60719d(0x25c)]||_0x60719d(0x53a))),console[_0x60719d(0x51d)](_0x60719d(0x231)+(_0x30f3c2[_0x60719d(0x25d)](',\x20')||_0x60719d(0x526))),console[_0x60719d(0x51d)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x60719d(0x51d)](_0x60719d(0x5fb)+_0x257b4a+'\x0a');}finally{await _0x454c5d[_0x60719d(0x284)]();}}async function _0x3cf802(_0x53e820){const _0x2bde62=_0x48504d,_0x3901ca=require$$5,_0x13a677=_0x289685[_0x2bde62(0x58d)](_0x53e820[_0x2bde62(0x17d)]),_0x2fac1a=new _0x3901ca(_0x13a677,_0x1e6362(_0x53e820));await _0x2fac1a['open']();try{const _0x626b1d=_0x2fac1a['_systemEnv'];if(!_0x626b1d||!_0x626b1d[_0x2bde62(0x211)](_0x2bde62(0x4f9))){console[_0x2bde62(0x51d)]('No\x20tokens.');return;}const _0x3de0e2=[];for(const {key:_0x1ab57a,value:_0x169f07}of _0x626b1d['getRange'](_0x2bde62(0x4f9))){_0x3de0e2[_0x2bde62(0x232)]({'id':_0x1ab57a,'name':_0x169f07[_0x2bde62(0x60c)]||'(unset)','label':_0x169f07[_0x2bde62(0x25c)]||'(unset)','permissions':Array[_0x2bde62(0x60f)](_0x169f07[_0x2bde62(0x1d9)])?_0x169f07[_0x2bde62(0x1d9)][_0x2bde62(0x25d)](','):'','created':_0x169f07['createdAt']?new Date(_0x169f07[_0x2bde62(0x40c)])[_0x2bde62(0x429)]()[_0x2bde62(0x195)](0x0,0xa):''});}if(_0x3de0e2['length']===0x0){console[_0x2bde62(0x51d)](_0x2bde62(0x191));return;}const _0x1c52bb=!process[_0x2bde62(0x1a0)][_0x2bde62(0x32a)]||process[_0x2bde62(0x1a0)][_0x2bde62(0x32a)]>=0x64,_0x177665=_0x1c52bb?0x24:0xa,_0x43655e=['ID'[_0x2bde62(0x3df)](_0x177665),_0x2bde62(0x512)['padEnd'](0x10),_0x2bde62(0x331)[_0x2bde62(0x3df)](0x14),'PERMISSIONS'['padEnd'](0x14),_0x2bde62(0x3d0)][_0x2bde62(0x25d)]('\x20\x20');console[_0x2bde62(0x51d)]('\x0a'+_0x43655e),console[_0x2bde62(0x51d)]('-'[_0x2bde62(0x617)](_0x43655e[_0x2bde62(0x26d)]));for(const _0x25bf7c of _0x3de0e2){const _0x5a27fe=_0x1c52bb?_0x25bf7c['id']:_0x25bf7c['id'][_0x2bde62(0x195)](0x0,0x8)+'…';console['log']([_0x5a27fe[_0x2bde62(0x3df)](_0x177665),_0x25bf7c[_0x2bde62(0x60c)]['slice'](0x0,0x10)[_0x2bde62(0x3df)](0x10),_0x25bf7c[_0x2bde62(0x25c)]['slice'](0x0,0x14)['padEnd'](0x14),_0x25bf7c[_0x2bde62(0x1d9)]['slice'](0x0,0x14)['padEnd'](0x14),_0x25bf7c[_0x2bde62(0x1cb)]]['join']('\x20\x20'));}console['log']('');}finally{await _0x2fac1a[_0x2bde62(0x284)]();}}async function _0x49ac27(_0x926ce2,_0x3ba9aa){const _0x4b9c56=_0x48504d;!_0x926ce2&&(console[_0x4b9c56(0x4d4)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x4b9c56(0x185)](0x1));const _0x4a6df4=require$$5,_0x3ab3f4=_0x289685['resolve'](_0x3ba9aa['dbPath']),_0xd5def4=new _0x4a6df4(_0x3ab3f4,_0x1e6362(_0x3ba9aa));await _0xd5def4[_0x4b9c56(0x2ad)]();try{const _0x59a0eb=_0xd5def4[_0x4b9c56(0x52c)];(!_0x59a0eb||!_0x59a0eb[_0x4b9c56(0x211)]('~tokens'))&&(console[_0x4b9c56(0x4d4)](_0x4b9c56(0x448)+_0x926ce2+'\x22'),process[_0x4b9c56(0x185)](0x1));let _0x2b0a96=null,_0x587e80=null;const _0x3c1dad=_0x59a0eb[_0x4b9c56(0x242)](_0x4b9c56(0x4f9),_0x926ce2);if(_0x3c1dad)_0x2b0a96=_0x926ce2,_0x587e80=_0x3c1dad;else{const _0x2b2106=[];for(const {key:_0x49b5fc,value:_0x37fdb3}of _0x59a0eb[_0x4b9c56(0x45e)](_0x4b9c56(0x4f9))){if(_0x49b5fc[_0x4b9c56(0x2e2)](_0x926ce2))_0x2b2106[_0x4b9c56(0x232)]({'key':_0x49b5fc,'value':_0x37fdb3});}_0x2b2106[_0x4b9c56(0x26d)]===0x0&&(console['error'](_0x4b9c56(0x448)+_0x926ce2+'\x22'),process['exit'](0x1));if(_0x2b2106[_0x4b9c56(0x26d)]>0x1){console[_0x4b9c56(0x4d4)](_0x4b9c56(0x30e)+_0x926ce2+_0x4b9c56(0x5f5)+_0x2b2106[_0x4b9c56(0x26d)]+'\x20tokens:');for(const _0x1038c8 of _0x2b2106){console[_0x4b9c56(0x4d4)]('\x20\x20'+_0x1038c8[_0x4b9c56(0x4ff)]+_0x4b9c56(0x529)+(_0x1038c8[_0x4b9c56(0x4e6)][_0x4b9c56(0x60c)]||_0x4b9c56(0x53a))+')');}process[_0x4b9c56(0x185)](0x1);}_0x2b0a96=_0x2b2106[0x0][_0x4b9c56(0x4ff)],_0x587e80=_0x2b2106[0x0][_0x4b9c56(0x4e6)];}await _0x59a0eb[_0x4b9c56(0x2cf)]('~tokens',_0x2b0a96),console[_0x4b9c56(0x51d)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x2b0a96+_0x4b9c56(0x529)+(_0x587e80[_0x4b9c56(0x60c)]||_0x4b9c56(0x53a))+_0x4b9c56(0x1c5)+(_0x587e80['label']||_0x4b9c56(0x53a))+')');}finally{await _0xd5def4[_0x4b9c56(0x284)]();}}function _0x550f4d(_0x3116a2,_0x2eb37f){const _0x13de3c=_0x48504d;if(!_0x3116a2[_0x13de3c(0x4b8)])return _0x13de3c(0x1f1);const _0x3c5cd=_0x3116a2[_0x13de3c(0x560)];if(!_0x3c5cd)return _0x13de3c(0x33b);if(_0x2eb37f>_0x3c5cd)return _0x13de3c(0x29d);return _0x13de3c(0x33b);}function _0x2f6a18(_0x3934f2){const _0x2e5abf=_0x48504d;if(!_0x3934f2||typeof _0x3934f2!==_0x2e5abf(0x2c0))return'';const _0x1de0a9=Object[_0x2e5abf(0x192)](_0x3934f2)['filter'](([,_0x2f0415])=>_0x2f0415)[_0x2e5abf(0x32d)](([_0x335a47])=>_0x335a47);if(_0x1de0a9['length']===0x0)return _0x2e5abf(0x526);if(_0x1de0a9[_0x2e5abf(0x26d)]<=0x3)return _0x1de0a9[_0x2e5abf(0x25d)]('\x20');return _0x1de0a9['slice'](0x0,0x3)[_0x2e5abf(0x25d)]('\x20')+('\x20+'+(_0x1de0a9[_0x2e5abf(0x26d)]-0x3));}async function _0x180818(_0x5de477){const _0x1f71ad=_0x48504d,_0xa22a0d=require$$5,_0x18a5ca=requireOkdbLicenseCodec(),{_C:_0x5ac126}=requireOkdbLicense(),_0xf5a8e7=_0x289685['resolve'](_0x5de477[_0x1f71ad(0x17d)]),_0x31323e=new _0xa22a0d(_0xf5a8e7,_0x1e6362(_0x5de477));await _0x31323e[_0x1f71ad(0x2ad)]();try{const _0x4e4a59=_0x31323e['_systemEnv'],_0x1346fb=_0x4e4a59?.['db']?.['get']?.(_0x1f71ad(0x2d4))??0x0,_0x39cb05=[..._0x31323e[_0x1f71ad(0x40a)][_0x1f71ad(0x4b0)]()][_0x1f71ad(0x49f)](_0x2c9c24=>!_0x2c9c24['startsWith']('~'))[_0x1f71ad(0x26d)],_0x41da8d=_0x31323e[_0x1f71ad(0x5b1)]?.[_0x1f71ad(0x206)];if(_0x41da8d){const _0x549087=_0x41da8d[_0x1f71ad(0x1a5)]===!![],_0x23b44e=_0x549087?_0x1f71ad(0x338):_0x31323e['_license'][_0x1f71ad(0x33b)]?.[_0x1f71ad(0x2ae)]||_0x1f71ad(0x201);console[_0x1f71ad(0x51d)](''),console[_0x1f71ad(0x51d)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x23b44e);const _0x367f55=_0x41da8d[_0x1f71ad(0x33f)]||{};if(_0x367f55[_0x1f71ad(0x412)]){const _0x1ab06c=Math[_0x1f71ad(0x24d)](_0x1346fb/_0x367f55[_0x1f71ad(0x412)]*0x64);console[_0x1f71ad(0x51d)]('\x20\x20Writes:\x20\x20'+_0x1346fb[_0x1f71ad(0x3ba)]()+_0x1f71ad(0x418)+_0x367f55[_0x1f71ad(0x412)][_0x1f71ad(0x3ba)]()+_0x1f71ad(0x449)+_0x1ab06c+'%)');}else console[_0x1f71ad(0x51d)](_0x1f71ad(0x403)+_0x1346fb[_0x1f71ad(0x3ba)]());_0x367f55[_0x1f71ad(0x5b0)]?console['log'](_0x1f71ad(0x354)+_0x39cb05+_0x1f71ad(0x418)+_0x367f55[_0x1f71ad(0x5b0)]):console[_0x1f71ad(0x51d)](_0x1f71ad(0x354)+_0x39cb05),_0x5ac126?.['PUB_FINGERPRINT']&&console[_0x1f71ad(0x51d)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x5ac126[_0x1f71ad(0x4bb)]+_0x1f71ad(0x3ec));}if(!_0x4e4a59||!_0x4e4a59[_0x1f71ad(0x211)](_0x1f71ad(0x1bf))){console[_0x1f71ad(0x51d)](''),console[_0x1f71ad(0x51d)](_0x1f71ad(0x5d8)),console[_0x1f71ad(0x51d)]('');return;}const _0x3273ef=[],_0x33c683=Date['now'](),_0x5626ff=_0x31323e['id'],_0x43c201=_0x1f71ad(0x286);for(const {key:_0x90fe45,value:_0x4e4f91}of _0x4e4a59[_0x1f71ad(0x45e)](_0x1f71ad(0x1bf))){const _0x1d68a0=_0x4e4f91[_0x1f71ad(0x43b)]?Buffer['from'](_0x4e4f91['_licenseHash'],_0x1f71ad(0x4eb)):Buffer[_0x1f71ad(0x5cd)](0x8);let _0x15389e='';try{_0x15389e=_0x18a5ca[_0x1f71ad(0x4c6)](_0x5626ff,_0x1d68a0,_0x43c201)[_0x1f71ad(0x297)];}catch{}_0x3273ef[_0x1f71ad(0x232)]({'id':_0x90fe45,'licensee':_0x4e4f91[_0x1f71ad(0x2ae)]||'','expires':_0x4e4f91[_0x1f71ad(0x560)]?new Date(_0x4e4f91[_0x1f71ad(0x560)])[_0x1f71ad(0x429)]()['slice'](0x0,0xa):'','features':_0x2f6a18(_0x4e4f91['features']),'pin':_0x15389e,'status':_0x550f4d(_0x4e4f91,_0x33c683)});}if(_0x3273ef[_0x1f71ad(0x26d)]===0x0){console[_0x1f71ad(0x51d)](''),console['log'](_0x1f71ad(0x5d8)),console['log']('');return;}const _0x298a35=['\x20\x20'+'ID'[_0x1f71ad(0x3df)](0xe),'LICENSEE'[_0x1f71ad(0x3df)](0xe),_0x1f71ad(0x2e0)[_0x1f71ad(0x3df)](0xc),_0x1f71ad(0x1ee)[_0x1f71ad(0x3df)](0x1e),'PIN'['padEnd'](0xa),_0x1f71ad(0x2fe)][_0x1f71ad(0x25d)]('\x20');console['log']('\x0a'+_0x298a35);for(const _0x1316d8 of _0x3273ef){const _0x345291=_0x1316d8['id'][_0x1f71ad(0x195)](0x0,0x8)+'…';console[_0x1f71ad(0x51d)](['\x20\x20'+_0x345291[_0x1f71ad(0x3df)](0xe),_0x1316d8[_0x1f71ad(0x2ae)]['slice'](0x0,0xe)['padEnd'](0xe),_0x1316d8[_0x1f71ad(0x5e2)][_0x1f71ad(0x3df)](0xc),_0x1316d8['features']['slice'](0x0,0x1e)['padEnd'](0x1e),_0x1316d8[_0x1f71ad(0x297)][_0x1f71ad(0x3df)](0xa),_0x1316d8[_0x1f71ad(0x527)]][_0x1f71ad(0x25d)]('\x20'));}console[_0x1f71ad(0x51d)]('');}finally{await _0x31323e[_0x1f71ad(0x284)]();}}async function _0x5ec7f7(_0x4ffc88,_0x43d00c){const _0x516fbb=_0x48504d,_0x5dd2fc=require$$5,_0x236632=requireOkdbLicenseCodec();let _0x4e655a=_0x4ffc88;(_0x236632[_0x516fbb(0x2eb)](_0x4ffc88)===_0x516fbb(0x15d)||_0x59da27[_0x516fbb(0x5fc)](_0x4ffc88)&&_0x59da27[_0x516fbb(0x547)](_0x4ffc88)[_0x516fbb(0x2dd)]())&&(_0x4e655a=_0x59da27['readFileSync'](_0x4ffc88,'utf8')['trim']());const _0xa44304=_0x289685[_0x516fbb(0x58d)](_0x43d00c[_0x516fbb(0x17d)]),_0xb4b05f=new _0x5dd2fc(_0xa44304,_0x1e6362(_0x43d00c));await _0xb4b05f[_0x516fbb(0x2ad)]();try{!_0xb4b05f['_license']&&(console[_0x516fbb(0x4d4)](_0x516fbb(0x457)),process['exit'](0x1));let _0x3f26d;try{_0x3f26d=await _0xb4b05f[_0x516fbb(0x5b1)][_0x516fbb(0x4d6)](_0x4e655a);}catch(_0x25125a){console[_0x516fbb(0x4d4)](_0x516fbb(0x282)+_0x25125a[_0x516fbb(0x408)]),process[_0x516fbb(0x185)](0x1);}const _0x81a538=_0xb4b05f['_license'][_0x516fbb(0x4b6)](),_0x71c5d0=_0x81a538[_0x516fbb(0x285)](_0x5e6496=>_0x5e6496[_0x516fbb(0x541)]===_0x3f26d['id'])?.[_0x516fbb(0x297)]||'',_0x596ca0=Object[_0x516fbb(0x192)](_0x3f26d[_0x516fbb(0x5a1)]||{})[_0x516fbb(0x49f)](([,_0x3dcdae])=>_0x3dcdae)[_0x516fbb(0x32d)](([_0x5232fa])=>_0x5232fa),_0x3e368c=_0x3f26d[_0x516fbb(0x33f)]||{},_0x2fa634=[_0x3e368c[_0x516fbb(0x5b0)]?_0x516fbb(0x613)+_0x3e368c[_0x516fbb(0x5b0)]:null,_0x3e368c['typesPerEnv']?_0x516fbb(0x2da)+_0x3e368c['typesPerEnv']:null,_0x3e368c[_0x516fbb(0x60e)]?_0x516fbb(0x1dc)+_0x3e368c[_0x516fbb(0x60e)]:null,_0x3e368c['maxWrites']?_0x516fbb(0x1b9)+_0x3e368c[_0x516fbb(0x412)][_0x516fbb(0x3ba)]():null]['filter'](Boolean)[_0x516fbb(0x25d)]('\x20\x20'),_0x1290bf=_0x3f26d[_0x516fbb(0x427)]===_0x236632['LICENSE_TYPE_OPEN'];console[_0x516fbb(0x51d)](_0x516fbb(0x5cf)),console[_0x516fbb(0x51d)](_0x516fbb(0x353)+_0x3f26d['id']),console[_0x516fbb(0x51d)](_0x516fbb(0x15f)+_0x3f26d['licensee']),console[_0x516fbb(0x51d)](_0x516fbb(0x2d0)+new Date(_0x3f26d[_0x516fbb(0x560)])[_0x516fbb(0x429)]()[_0x516fbb(0x195)](0x0,0xa)),console[_0x516fbb(0x51d)](_0x516fbb(0x160)+(_0x596ca0[_0x516fbb(0x25d)](',\x20')||_0x516fbb(0x526)));if(_0x2fa634)console[_0x516fbb(0x51d)](_0x516fbb(0x212)+_0x2fa634);_0x1290bf?(console[_0x516fbb(0x51d)](_0x516fbb(0x219)),console[_0x516fbb(0x51d)]('')):(console[_0x516fbb(0x51d)](_0x516fbb(0x47e)+_0x71c5d0),console['log'](_0x516fbb(0x528)),console[_0x516fbb(0x51d)](''),console['log']('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console[_0x516fbb(0x51d)](_0x516fbb(0x2d7)+_0x71c5d0+')\x20to\x20your\x20license\x20vendor.'),console[_0x516fbb(0x51d)](_0x516fbb(0x488)),console['log'](_0x516fbb(0x27a)),console[_0x516fbb(0x51d)](''));}finally{await _0xb4b05f[_0x516fbb(0x284)]();}}async function _0x25b539(_0x5a4377,_0x282877){const _0x37d780=_0x48504d,_0x5eb6de=require$$5,_0x54717d=_0x289685[_0x37d780(0x58d)](_0x282877[_0x37d780(0x17d)]),_0x2e1484=new _0x5eb6de(_0x54717d,_0x1e6362(_0x282877));await _0x2e1484[_0x37d780(0x2ad)]();try{!_0x2e1484[_0x37d780(0x5b1)]&&(console['error'](_0x37d780(0x457)),process[_0x37d780(0x185)](0x1));let _0x5f0482;try{_0x5f0482=await _0x2e1484[_0x37d780(0x5b1)][_0x37d780(0x402)](_0x5a4377['trim']());}catch(_0x3a7701){console[_0x37d780(0x4d4)](_0x37d780(0x282)+_0x3a7701[_0x37d780(0x408)]),console[_0x37d780(0x4d4)](''),console[_0x37d780(0x4d4)](_0x37d780(0x36e)),console[_0x37d780(0x4d4)](_0x37d780(0x312)),console[_0x37d780(0x4d4)](_0x37d780(0x55d)),console['error'](_0x37d780(0x15a)),console[_0x37d780(0x4d4)](''),process[_0x37d780(0x185)](0x1);}console[_0x37d780(0x51d)](_0x37d780(0x391)),console[_0x37d780(0x51d)](_0x37d780(0x353)+_0x5f0482['id']),console[_0x37d780(0x51d)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x5f0482[_0x37d780(0x2ae)]),console[_0x37d780(0x51d)](_0x37d780(0x2d0)+new Date(_0x5f0482[_0x37d780(0x560)])['toISOString']()[_0x37d780(0x195)](0x0,0xa)),console[_0x37d780(0x51d)](_0x37d780(0x188)),console[_0x37d780(0x51d)]('');}finally{await _0x2e1484[_0x37d780(0x284)]();}}async function _0x35bdb2(_0x10347d,_0x300cc1){const _0x33f877=_0x48504d;!_0x10347d&&(console[_0x33f877(0x4d4)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x33f877(0x185)](0x1));const _0x1f9dde=require$$5,_0x2df380=requireOkdbLicenseCodec(),_0x4e7aa2=_0x289685[_0x33f877(0x58d)](_0x300cc1[_0x33f877(0x17d)]),_0x58b7cd=new _0x1f9dde(_0x4e7aa2,_0x1e6362(_0x300cc1));await _0x58b7cd[_0x33f877(0x2ad)]();try{const _0x215ac0=_0x58b7cd[_0x33f877(0x52c)];(!_0x215ac0||!_0x215ac0[_0x33f877(0x211)]('~licenses'))&&(console[_0x33f877(0x4d4)](_0x33f877(0x1a7)+_0x10347d+'\x22'),process[_0x33f877(0x185)](0x1));let _0x1fc933=null,_0x4a8c33=null;const _0x338b0c=_0x215ac0[_0x33f877(0x242)](_0x33f877(0x1bf),_0x10347d);if(_0x338b0c)_0x1fc933=_0x10347d,_0x4a8c33=_0x338b0c;else{const _0x51374e=[];for(const {key:_0x521fd0,value:_0x397271}of _0x215ac0[_0x33f877(0x45e)]('~licenses')){if(_0x521fd0['startsWith'](_0x10347d))_0x51374e[_0x33f877(0x232)]({'key':_0x521fd0,'value':_0x397271});}_0x51374e[_0x33f877(0x26d)]===0x0&&(console['error'](_0x33f877(0x1a7)+_0x10347d+'\x22'),process[_0x33f877(0x185)](0x1)),_0x51374e[_0x33f877(0x26d)]>0x1&&(console[_0x33f877(0x4d4)](_0x33f877(0x30e)+_0x10347d+'\x22\x20matches\x20'+_0x51374e[_0x33f877(0x26d)]+_0x33f877(0x56d)),process[_0x33f877(0x185)](0x1)),_0x1fc933=_0x51374e[0x0][_0x33f877(0x4ff)],_0x4a8c33=_0x51374e[0x0][_0x33f877(0x4e6)];}const _0x47ae7a=Date[_0x33f877(0x464)](),_0xb18b85=_0x550f4d(_0x4a8c33,_0x47ae7a),_0xabb22a=_0x58b7cd['id'],_0x1700ef=_0x33f877(0x286);let _0x552fdc='';try{const _0xf9ca58=Buffer[_0x33f877(0x3e6)](_0x4a8c33['_licenseHash'],_0x33f877(0x4eb));_0x552fdc=_0x2df380[_0x33f877(0x4c6)](_0xabb22a,_0xf9ca58,_0x1700ef)['pin'];}catch{}const _0x599930=_0x4a8c33['features']?Object['entries'](_0x4a8c33[_0x33f877(0x5a1)])[_0x33f877(0x49f)](([,_0x5edf0])=>_0x5edf0)[_0x33f877(0x32d)](([_0x284434])=>_0x284434):[],_0x1cd038=_0x4a8c33['limits']||{},_0x35cbfe=_0x215ac0?.['db']?.['get']?.(_0x33f877(0x2d4))??0x0,_0x1f81ef=[..._0x58b7cd[_0x33f877(0x40a)][_0x33f877(0x4b0)]()]['filter'](_0x577281=>!_0x577281[_0x33f877(0x2e2)]('~'))[_0x33f877(0x26d)];console[_0x33f877(0x51d)](_0x33f877(0x3c6)),console[_0x33f877(0x51d)](_0x33f877(0x353)+_0x1fc933),console[_0x33f877(0x51d)](_0x33f877(0x15f)+(_0x4a8c33[_0x33f877(0x2ae)]||'')),console[_0x33f877(0x51d)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x4a8c33[_0x33f877(0x560)]?new Date(_0x4a8c33[_0x33f877(0x560)])['toISOString']()[_0x33f877(0x195)](0x0,0xa):'')),console[_0x33f877(0x51d)]('\x20\x20\x20\x20features:\x20\x20'+(_0x599930[_0x33f877(0x25d)](',\x20')||_0x33f877(0x526))),console['log'](_0x33f877(0x47e)+_0x552fdc),console[_0x33f877(0x51d)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0xb18b85),console['log'](_0x33f877(0x265)+new Date(_0x4a8c33['addedAt'])['toISOString']());if(_0xb18b85===_0x33f877(0x33b)){console[_0x33f877(0x51d)](''),console[_0x33f877(0x51d)](_0x33f877(0x347));if(_0x1cd038[_0x33f877(0x412)]){const _0x2035c1=Math[_0x33f877(0x24d)](_0x35cbfe/_0x1cd038[_0x33f877(0x412)]*0x64);console[_0x33f877(0x51d)](_0x33f877(0x50a)+_0x35cbfe[_0x33f877(0x3ba)]()+_0x33f877(0x418)+_0x1cd038['maxWrites'][_0x33f877(0x3ba)]()+_0x33f877(0x449)+_0x2035c1+'%)');}else console[_0x33f877(0x51d)](_0x33f877(0x50a)+_0x35cbfe[_0x33f877(0x3ba)]()+_0x33f877(0x332));_0x1cd038[_0x33f877(0x5b0)]?console[_0x33f877(0x51d)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x1f81ef+_0x33f877(0x418)+_0x1cd038[_0x33f877(0x5b0)]):console[_0x33f877(0x51d)](_0x33f877(0x422)+_0x1f81ef+_0x33f877(0x332));}console[_0x33f877(0x51d)]('');}finally{await _0x58b7cd['close']();}}async function _0x227676(_0x21172d,_0x18ecd4){const _0x533679=_0x48504d;!_0x21172d&&(console['error']('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x533679(0x185)](0x1));const _0x47d168=require$$5,_0x2675a7=_0x289685['resolve'](_0x18ecd4['dbPath']),_0x36a3d8=new _0x47d168(_0x2675a7,_0x1e6362(_0x18ecd4));await _0x36a3d8[_0x533679(0x2ad)]();try{const _0x5cfd7f=_0x36a3d8['_systemEnv'];(!_0x5cfd7f||!_0x5cfd7f[_0x533679(0x211)]('~licenses'))&&(console['error'](_0x533679(0x1a7)+_0x21172d+'\x22'),process[_0x533679(0x185)](0x1));let _0x2a165b=null,_0x179114=null;const _0x40b32e=_0x5cfd7f['get']('~licenses',_0x21172d);if(_0x40b32e)_0x2a165b=_0x21172d,_0x179114=_0x40b32e;else{const _0x44d939=[];for(const {key:_0x1788e3,value:_0x3ccba8}of _0x5cfd7f['getRange'](_0x533679(0x1bf))){if(_0x1788e3['startsWith'](_0x21172d))_0x44d939['push']({'key':_0x1788e3,'value':_0x3ccba8});}_0x44d939[_0x533679(0x26d)]===0x0&&(console['error'](_0x533679(0x1a7)+_0x21172d+'\x22'),process[_0x533679(0x185)](0x1)),_0x44d939[_0x533679(0x26d)]>0x1&&(console[_0x533679(0x4d4)](_0x533679(0x30e)+_0x21172d+_0x533679(0x5f5)+_0x44d939[_0x533679(0x26d)]+_0x533679(0x56d)),process[_0x533679(0x185)](0x1)),_0x2a165b=_0x44d939[0x0][_0x533679(0x4ff)],_0x179114=_0x44d939[0x0]['value'];}await _0x5cfd7f[_0x533679(0x2cf)](_0x533679(0x1bf),_0x2a165b),console[_0x533679(0x51d)]('\x20\x20✓\x20Removed\x20license\x20'+_0x2a165b+_0x533679(0x5f1)+(_0x179114['licensee']||_0x533679(0x53a))+')');}finally{await _0x36a3d8[_0x533679(0x284)]();}}async function _0x52004d(_0x45c4f8,_0x529c29,_0x550946){const _0x3e2a82=_0x48504d;!_0x45c4f8&&(console['error'](_0x3e2a82(0x24c)),process[_0x3e2a82(0x185)](0x1));!_0x550946['token']&&!(_0x550946[_0x3e2a82(0x3e2)]&&_0x550946['password'])&&(console[_0x3e2a82(0x4d4)](_0x3e2a82(0x2ec)),process[_0x3e2a82(0x185)](0x1));const _0x46f3e1=_0x550946[_0x3e2a82(0x4fd)]||_0x529c29[_0x3e2a82(0x54f)]?.[_0x3e2a82(0x5a6)];!_0x46f3e1&&(console[_0x3e2a82(0x4d4)](_0x3e2a82(0x3a6)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x3e2a82(0x185)](0x1));const _0x1e053b=require$$5,_0x251747=new _0x1e053b(_0x529c29[_0x3e2a82(0x17d)],{'sync':{'address':_0x46f3e1,'auto_reconcile':![]}});await _0x251747[_0x3e2a82(0x2ad)]();try{const _0x5554ca=_0x251747['_systemEnv'];if(_0x5554ca&&_0x5554ca[_0x3e2a82(0x211)](_0x3e2a82(0x4f9))){let _0x11720d=![];for(const _0x8f60d of _0x5554ca['getRange']('~tokens')){_0x11720d=!![];break;}_0x11720d&&console[_0x3e2a82(0x51d)](_0x3e2a82(0x3b1)+_0x3e2a82(0x61f));}console['log'](_0x3e2a82(0x1b2)+_0x45c4f8+'…'),await _0x251747[_0x3e2a82(0x54f)][_0x3e2a82(0x25d)](_0x45c4f8[_0x3e2a82(0x197)](/\/+$/,''),{'token':_0x550946[_0x3e2a82(0x22a)],'username':_0x550946[_0x3e2a82(0x3e2)],'password':_0x550946['password']}),console[_0x3e2a82(0x51d)](_0x3e2a82(0x443)),console[_0x3e2a82(0x51d)](_0x3e2a82(0x5a5));}finally{await _0x251747[_0x3e2a82(0x284)]();}}async function _0x5d1641(){const _0x42cbff=_0x48504d,_0x3062f1=Date[_0x42cbff(0x464)](),_0xc5404b=_0x2f5057(process[_0x42cbff(0x293)]),_0x53a111=_0xdb26cf(_0xc5404b),_0x3d26e9=_0x289685['resolve'](_0x53a111[_0x42cbff(0x17d)]);!_0x53a111[_0x42cbff(0x2b0)]&&!process[_0x42cbff(0x440)][_0x42cbff(0x59c)]&&(_0x53a111[_0x42cbff(0x2b0)]=!![]);const _0x3e2653=require$$5,{start:_0x247001,colorLog:_0xe5e6d5}=requireOkdbShell(),_0x47e865=require$$1$2,_0x4d1a06={..._0x53a111[_0x42cbff(0x4ff)]?{'encryptionKey':_0x53a111[_0x42cbff(0x4ff)]}:{},..._0x53a111[_0x42cbff(0x58e)]?{'admin':![]}:_0x391055(_0x53a111[_0x42cbff(0x480)])?{'admin':_0x53a111[_0x42cbff(0x480)]}:{},..._0x391055(_0x53a111[_0x42cbff(0x226)])?{'api':_0x53a111[_0x42cbff(0x226)]}:{},..._0x391055(_0x53a111[_0x42cbff(0x57a)])?{'auth':_0x53a111[_0x42cbff(0x57a)]}:{},..._0x391055(_0x53a111[_0x42cbff(0x16f)])?{'mcp':_0x53a111[_0x42cbff(0x16f)]}:{},..._0x53a111['timeMachine']!==![]?{'timeMachine':_0x53a111['timeMachine']}:{}},_0x3ce806=_0x4df2bc(_0x53a111);if(!_0x47e865[_0x42cbff(0x46e)]){const _0x4c4019=_0x550ceb(),_0x3b7b06=_0x53a111[_0x42cbff(0x4ae)]?_0x42cbff(0x5d7):_0x53a111[_0x42cbff(0x496)]!=null&&_0x53a111[_0x42cbff(0x496)]!==''?_0x42cbff(0x1d8):process.env.OKDB_HTTP_WORKERS?_0x42cbff(0x1e1):_0x53a111['http']?.[_0x42cbff(0x34e)]!=null?'config\x20http.workers':_0x42cbff(0x5ea)+Math[_0x42cbff(0x5e4)](0x1,require$$0[_0x42cbff(0x4da)]()[_0x42cbff(0x26d)]-0x1);process[_0x42cbff(0x1a0)][_0x42cbff(0x478)]('[okdb]\x20http\x20workers:\x20'+_0x3ce806+'\x20('+_0x3b7b06+(!_0x4c4019?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x47e865[_0x42cbff(0x46e)]){const _0x9f1f3={..._0x4d1a06},_0x52a6c9=new _0x3e2653(_0x3d26e9,_0x9f1f3);_0x52a6c9[_0x42cbff(0x51d)]['detachConsole']?.();const _0x1aac09=process.env.OKDB_CLUSTER_SLOT??'?',_0x58782f={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x11330d=_0x58782f[_0x53a111[_0x42cbff(0x5f3)]]??_0x58782f[_0x42cbff(0x619)];_0x52a6c9[_0x42cbff(0x51d)][_0x42cbff(0x595)](_0x5705a3=>{const _0x5ef468=_0x42cbff;if((_0x58782f[_0x5705a3[_0x5ef468(0x37e)]]??0x1)<_0x11330d)return;try{process[_0x5ef468(0x4e5)]?.({'__okdbCluster':'log','slot':_0x1aac09,'pid':process[_0x5ef468(0x597)],'entry':_0x5705a3});}catch{}}),await _0x52a6c9[_0x42cbff(0x2ad)]();const {attachWorkerCluster:_0x1b1685}=requireOkdbCluster();_0x1b1685(_0x52a6c9),await _0x53732d(_0x52a6c9,_0x53a111['port']);return;}if(_0x3ce806>0x1){const {runClustered:_0x484722}=requireOkdbCluster(),_0x46962e=new _0x3e2653(_0x3d26e9,{..._0x4d1a06,'engines':![],'processors':![],'compaction':![]});await _0x46962e['open']();const _0x47d804=async()=>{const _0x7b8cbd=_0x42cbff,_0x12099a=new _0x3e2653(_0x3d26e9,{..._0x4d1a06});return await _0x12099a[_0x7b8cbd(0x2ad)](),_0x12099a;},_0x2d2e98=_0x484722({'workers':_0x3ce806,'makeOkdb':_0x47d804,'port':_0x53a111[_0x42cbff(0x345)],'primaryOkdb':_0x46962e});let _0x2dce93=![];async function _0xc5824(_0x59291a){const _0x35eb84=_0x42cbff;_0x2dce93&&(process[_0x35eb84(0x545)][_0x35eb84(0x478)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x35eb84(0x185)](0x82));_0x2dce93=!![],process[_0x35eb84(0x545)][_0x35eb84(0x478)](_0x35eb84(0x474)+(_0x59291a||_0x35eb84(0x344))+_0x35eb84(0x2c6));const _0x3614b3=setTimeout(()=>{const _0x8f3422=_0x35eb84;process[_0x8f3422(0x545)][_0x8f3422(0x478)](_0x8f3422(0x2a5)),process[_0x8f3422(0x185)](0x0);},0xbb8);_0x3614b3[_0x35eb84(0x52b)]?.();try{await _0x2d2e98['close']();}catch(_0x5b5314){process['stderr']['write']('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x5b5314?.[_0x35eb84(0x408)]??_0x5b5314)+'\x0a');}try{await _0x46962e[_0x35eb84(0x284)]();}catch(_0x19c9e2){process[_0x35eb84(0x545)][_0x35eb84(0x478)](_0x35eb84(0x3ca)+(_0x19c9e2?.[_0x35eb84(0x408)]??_0x19c9e2)+'\x0a');}process['exit'](0x0);}_0x53a111[_0x42cbff(0x16d)]=_0x3ce806;if(!_0x53a111['noRepl']){_0x46962e[_0x42cbff(0x51d)]['detachConsole']?.(),_0x5d25ff(_0x46962e[_0x42cbff(0x57a)]?.[_0x42cbff(0x291)]?.()??[]),await _0x247001(_0x46962e,_0x53a111);return;}process[_0x42cbff(0x1a0)][_0x42cbff(0x478)](_0x42cbff(0x59d)+process['pid']+':\x20processor\x20(HTTP-silent),\x20'+_0x3ce806+'\x20'+(_0x42cbff(0x55e)+_0x53a111[_0x42cbff(0x345)]+'\x0a')),console[_0x42cbff(0x51d)](''),console['log']('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x42cbff(0x51d)](_0x42cbff(0x5e3)+_0x53a111['port']+_0x42cbff(0x449)+_0x3ce806+_0x42cbff(0x259)),console[_0x42cbff(0x51d)](_0x42cbff(0x3d1)+_0x3d26e9),console['log'](_0x42cbff(0x405)+_0x46962e['id']),console[_0x42cbff(0x51d)](_0x42cbff(0x3b6)+_0x53a111['port']+_0x42cbff(0x605));!_0x53a111[_0x42cbff(0x58e)]&&console[_0x42cbff(0x51d)](_0x42cbff(0x407)+_0x53a111[_0x42cbff(0x345)]+_0x42cbff(0x362));console[_0x42cbff(0x51d)](''),_0x5d25ff(_0x46962e[_0x42cbff(0x57a)]?.[_0x42cbff(0x291)]?.()??[]),process['on']('SIGINT',()=>_0xc5824(_0x42cbff(0x4ea))),process['on'](_0x42cbff(0x61b),()=>_0xc5824(_0x42cbff(0x61b))),process['on'](_0x42cbff(0x604),()=>_0xc5824(_0x42cbff(0x604)));return;}const _0x1e4b73=new _0x3e2653(_0x3d26e9,_0x4d1a06);_0x1e4b73[_0x42cbff(0x51d)][_0x42cbff(0x1a2)]?.();const _0x45f358=_0x1e4b73[_0x42cbff(0x51d)][_0x42cbff(0x595)](_0x5c61e3=>_0xe5e6d5(_0x5c61e3,_0x53a111['logLevel']));if(_0x53a111['noRepl'])process[_0x42cbff(0x1a0)][_0x42cbff(0x478)](_0x42cbff(0x5ad));await _0x1e4b73[_0x42cbff(0x2ad)]();if(_0x53a111['noRepl'])process[_0x42cbff(0x1a0)][_0x42cbff(0x478)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x53732d(_0x1e4b73,_0x53a111[_0x42cbff(0x345)]);}catch(_0x3ffd47){_0x3ffd47['code']===_0x42cbff(0x4b7)&&(console[_0x42cbff(0x4d4)](_0x42cbff(0x2b1)+_0x53a111[_0x42cbff(0x345)]+_0x42cbff(0x504)),process[_0x42cbff(0x185)](0x1));throw _0x3ffd47;}if(_0x53a111[_0x42cbff(0x2b0)])process['stdout'][_0x42cbff(0x478)]('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x53a111[_0x42cbff(0x345)]+'\x0a');if(!_0x53a111[_0x42cbff(0x2b0)])_0x1e4b73[_0x42cbff(0x51d)]['detachConsole']?.(),_0x45f358?.(),_0x5d25ff(_0x1e4b73[_0x42cbff(0x57a)]?.[_0x42cbff(0x291)]?.()??[]),await _0x247001(_0x1e4b73,_0x53a111);else{const _0x4a659c=_0x289685[_0x42cbff(0x25d)](_0x3d26e9,_0x42cbff(0x2fb));try{_0x59da27['writeFileSync'](_0x4a659c,String(process[_0x42cbff(0x597)]));}catch{}const _0x7ad843=Date[_0x42cbff(0x464)]()-_0x3062f1;console[_0x42cbff(0x51d)](''),console[_0x42cbff(0x51d)](_0x42cbff(0x40e)),console[_0x42cbff(0x51d)]('\x20\x20\x20\x20port:\x20\x20'+_0x53a111[_0x42cbff(0x345)]),console[_0x42cbff(0x51d)](_0x42cbff(0x535)+_0x3d26e9),console[_0x42cbff(0x51d)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x1e4b73['id']);{const _0x46cbd1=_0x1e4b73[_0x42cbff(0x52c)]?.['db']?.['get']?.(_0x42cbff(0x2d4))??0x0,_0x3b099f=[..._0x1e4b73[_0x42cbff(0x40a)][_0x42cbff(0x4b0)]()][_0x42cbff(0x49f)](_0x277e3a=>!_0x277e3a[_0x42cbff(0x2e2)]('~'))[_0x42cbff(0x26d)];if(_0x1e4b73[_0x42cbff(0x5b1)]?.['active']?.[_0x42cbff(0x427)]===0x1){const _0x1e5ad0=Math[_0x42cbff(0x1c3)]((_0x1e4b73[_0x42cbff(0x5b1)]['active'][_0x42cbff(0x560)]-Date[_0x42cbff(0x464)]())/0x5265c00);console['log'](_0x42cbff(0x394)+_0x1e4b73[_0x42cbff(0x5b1)][_0x42cbff(0x33b)]['licensee']+_0x42cbff(0x46d)+_0x1e5ad0+_0x42cbff(0x24a));}else{if(_0x1e4b73['_license']?.[_0x42cbff(0x33b)]){const _0x13aa88=_0x1e4b73[_0x42cbff(0x5b1)][_0x42cbff(0x33b)];console[_0x42cbff(0x51d)](_0x42cbff(0x193)+_0x13aa88[_0x42cbff(0x2ae)]+'\x20(expires\x20'+new Date(_0x13aa88['expiresAt'])[_0x42cbff(0x429)]()[_0x42cbff(0x195)](0x0,0xa)+')');const _0x1cb906=_0x13aa88[_0x42cbff(0x33f)]||{};if(_0x1cb906['maxWrites']){const _0x34fbc5=Math[_0x42cbff(0x24d)](_0x46cbd1/_0x1cb906['maxWrites']*0x64);console[_0x42cbff(0x51d)](_0x42cbff(0x566)+_0x46cbd1[_0x42cbff(0x3ba)]()+_0x42cbff(0x418)+_0x1cb906[_0x42cbff(0x412)][_0x42cbff(0x3ba)]()+_0x42cbff(0x30f)+_0x34fbc5+_0x42cbff(0x1ec)+_0x3b099f+(_0x1cb906[_0x42cbff(0x5b0)]?'/'+_0x1cb906[_0x42cbff(0x5b0)]:'')+_0x42cbff(0x5dd)+(_0x3b099f===0x1?'':'s'));}}else{if(_0x1e4b73[_0x42cbff(0x5b1)]){const _0x2b622c=_0x1e4b73['_license'][_0x42cbff(0x4b6)](),_0xe5b04a=_0x2b622c[_0x42cbff(0x26d)]?_0x2b622c[_0x42cbff(0x32d)](_0x596b5c=>_0x596b5c[_0x42cbff(0x297)])[_0x42cbff(0x25d)](',\x20'):_0x42cbff(0x311),_0xc20d08=_0x1e4b73[_0x42cbff(0x5b1)][_0x42cbff(0x206)],_0x2aaff1=_0xc20d08[_0x42cbff(0x33f)]['maxWrites']?Math[_0x42cbff(0x24d)](_0x46cbd1/_0xc20d08[_0x42cbff(0x33f)]['maxWrites']*0x64):0x0;console[_0x42cbff(0x51d)]('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x42cbff(0x51d)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x46cbd1[_0x42cbff(0x3ba)]()+_0x42cbff(0x418)+_0xc20d08[_0x42cbff(0x33f)][_0x42cbff(0x412)][_0x42cbff(0x3ba)]()+_0x42cbff(0x30f)+_0x2aaff1+_0x42cbff(0x1ec)+_0x3b099f+_0x42cbff(0x418)+_0xc20d08['limits']['envs']+_0x42cbff(0x483)),console[_0x42cbff(0x51d)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0xe5b04a);}}}}console['log']('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x53a111[_0x42cbff(0x345)]+_0x42cbff(0x605));!_0x53a111[_0x42cbff(0x58e)]&&console[_0x42cbff(0x51d)](_0x42cbff(0x559)+_0x53a111[_0x42cbff(0x345)]+_0x42cbff(0x362));console[_0x42cbff(0x51d)](''),console[_0x42cbff(0x51d)](_0x42cbff(0x30d)+_0x7ad843+'ms'),_0x5d25ff(_0x1e4b73[_0x42cbff(0x57a)]?.[_0x42cbff(0x291)]?.()??[]);let _0x5353ca=![];async function _0x5ddcd1(_0x1bf477){const _0x487f63=_0x42cbff;_0x5353ca&&(process[_0x487f63(0x545)][_0x487f63(0x478)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x487f63(0x185)](0x82));_0x5353ca=!![],process['stderr'][_0x487f63(0x478)](_0x487f63(0x474)+(_0x1bf477||'shutdown')+',\x20closing…\x0a');const _0x5a0802=setTimeout(()=>{const _0x59c345=_0x487f63;process[_0x59c345(0x545)][_0x59c345(0x478)](_0x59c345(0x498)),process[_0x59c345(0x185)](0x1);},0x1388);try{_0x59da27[_0x487f63(0x4f8)](_0x4a659c);}catch{}try{await _0x1e4b73[_0x487f63(0x284)]();}catch(_0x40e6c2){process[_0x487f63(0x545)][_0x487f63(0x478)](_0x487f63(0x230)+(_0x40e6c2?.[_0x487f63(0x408)]??_0x40e6c2)+'\x0a');}clearTimeout(_0x5a0802),process[_0x487f63(0x545)][_0x487f63(0x478)](_0x487f63(0x4d5)),process[_0x487f63(0x185)](0x0);}process['on'](_0x42cbff(0x4ea),()=>_0x5ddcd1(_0x42cbff(0x4ea))),process['on'](_0x42cbff(0x61b),()=>_0x5ddcd1(_0x42cbff(0x61b))),process['on'](_0x42cbff(0x604),()=>_0x5ddcd1(_0x42cbff(0x604)));}}const _0x56c8dc=new Set([_0x48504d(0x42c),_0x48504d(0x3f1),'init',_0x48504d(0x507),'export',_0x48504d(0x41f),'reset',_0x48504d(0x22a),_0x48504d(0x25d),_0x48504d(0x2f5)]),_0x496575=process[_0x48504d(0x293)][0x2];if(_0x496575===_0x48504d(0x42c))console[_0x48504d(0x51d)](require$$3[_0x48504d(0x42c)]),process[_0x48504d(0x185)](0x0);else{if(_0x496575&&_0x56c8dc['has'](_0x496575)){const _0x555da0=process[_0x48504d(0x293)][_0x48504d(0x195)](0x3),_0x550780=_0x2f5057([_0x48504d(0x5b6),'okdb',..._0x555da0]),_0x14e1bd=_0xdb26cf(_0x550780),_0x5578cc=new Set([_0x48504d(0x540),'-d',_0x48504d(0x493),'-k',_0x48504d(0x313),'-c',_0x48504d(0x4db),'-p','--log-level',_0x48504d(0x207),'-e',_0x48504d(0x5db),_0x48504d(0x3f2),_0x48504d(0x4e1),_0x48504d(0x241),_0x48504d(0x3ed),_0x48504d(0x5eb),_0x48504d(0x33a),_0x48504d(0x41e),_0x48504d(0x216),'-u',_0x48504d(0x5dc)]);let _0x25309a=null;for(let _0x41b274=0x0;_0x41b274<_0x555da0['length'];_0x41b274++){if(_0x5578cc[_0x48504d(0x503)](_0x555da0[_0x41b274])){_0x41b274++;continue;}if(!_0x555da0[_0x41b274][_0x48504d(0x2e2)]('-')){_0x25309a=_0x555da0[_0x41b274];break;}}(async()=>{const _0x38e288=_0x48504d;if(_0x496575===_0x38e288(0x22a)){const _0x5b3941=process[_0x38e288(0x293)][0x3],_0xff5164=process[_0x38e288(0x293)]['slice'](0x4),_0x1fd49d=_0x2f5057([_0x38e288(0x5b6),_0x38e288(0x3c8),..._0xff5164]),_0x150b63=_0xdb26cf(_0x1fd49d),_0x46b50d=new Set([_0x38e288(0x540),'-d','--key','-k',_0x38e288(0x313),'-c',_0x38e288(0x4db),'-p',_0x38e288(0x3f2),_0x38e288(0x4e1),'--label',_0x38e288(0x3ed),_0x38e288(0x5eb),_0x38e288(0x33a),_0x38e288(0x3ef),_0x38e288(0x207),'-e',_0x38e288(0x5db)]),_0x25d82a=[];for(let _0x563abd=0x0;_0x563abd<_0xff5164[_0x38e288(0x26d)];_0x563abd++){if(_0x46b50d[_0x38e288(0x503)](_0xff5164[_0x563abd])){_0x563abd++;continue;}if(_0xff5164[_0x563abd]['startsWith']('-'))continue;_0x25d82a[_0x38e288(0x232)](_0xff5164[_0x563abd]);}switch(_0x5b3941){case _0x38e288(0x23e):await _0x4436ae(_0x150b63,_0x1fd49d);break;case _0x38e288(0x5c3):await _0x3cf802(_0x150b63);break;case _0x38e288(0x621):await _0x49ac27(_0x25d82a[0x0],_0x150b63);break;default:console[_0x38e288(0x4d4)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x5b3941+_0x38e288(0x400)),process['exit'](0x1);}return;}if(_0x496575===_0x38e288(0x2f5)){const _0x560a68=requireOkdbLicenseCodec(),_0x2f210e=process[_0x38e288(0x293)]['slice'](0x3),_0x328e7f=_0x2f5057(['node',_0x38e288(0x3c8),..._0x2f210e]),_0x404746=_0xdb26cf(_0x328e7f),_0x21bd11=new Set([_0x38e288(0x540),'-d',_0x38e288(0x493),'-k',_0x38e288(0x313),'-c','--port','-p',_0x38e288(0x3ef)]),_0x552633=[];for(let _0x4bad6e=0x0;_0x4bad6e<_0x2f210e[_0x38e288(0x26d)];_0x4bad6e++){if(_0x21bd11[_0x38e288(0x503)](_0x2f210e[_0x4bad6e])){_0x4bad6e++;continue;}if(_0x2f210e[_0x4bad6e]['startsWith']('-'))continue;_0x552633['push'](_0x2f210e[_0x4bad6e]);}const _0x278b9f=_0x552633[0x0]??null;if(_0x278b9f===_0x38e288(0x2cf))await _0x227676(_0x552633[0x1],_0x404746);else{if(!_0x278b9f)await _0x180818(_0x404746);else{let _0xe8081f=_0x560a68[_0x38e288(0x2eb)](_0x278b9f);if(_0xe8081f===_0x38e288(0x585)&&_0x59da27[_0x38e288(0x5fc)](_0x278b9f))_0xe8081f='path';if(_0xe8081f===_0x38e288(0x15d))try{const _0x25c3db=_0x59da27[_0x38e288(0x4c8)](_0x278b9f,'utf8')[_0x38e288(0x288)](),_0x1e9d93=_0x560a68['detectInputType'](_0x25c3db);if(_0x1e9d93===_0x38e288(0x4b8)){await _0x25b539(_0x25c3db,_0x404746);return;}await _0x5ec7f7(_0x278b9f,_0x404746);return;}catch(_0x398bc6){console[_0x38e288(0x4d4)](_0x38e288(0x607)+_0x278b9f+':\x20'+_0x398bc6[_0x38e288(0x408)]),process[_0x38e288(0x185)](0x1);}switch(_0xe8081f){case _0x38e288(0x57b):await _0x5ec7f7(_0x278b9f,_0x404746);break;case _0x38e288(0x4b8):await _0x25b539(_0x278b9f,_0x404746);break;case _0x38e288(0x600):await _0x35bdb2(_0x278b9f,_0x404746);break;default:console['error'](_0x38e288(0x1fc)+_0x278b9f+'\x22'),console[_0x38e288(0x4d4)](''),console[_0x38e288(0x4d4)](_0x38e288(0x5da)),console[_0x38e288(0x4d4)](_0x38e288(0x425)),console[_0x38e288(0x4d4)](_0x38e288(0x3bc)),console['error'](_0x38e288(0x51b)),console[_0x38e288(0x4d4)](_0x38e288(0x174)),console[_0x38e288(0x4d4)](''),console['error'](_0x38e288(0x23b)),process['exit'](0x1);}}}return;}switch(_0x496575){case _0x38e288(0x3f1):await _0x588282(_0x14e1bd);break;case _0x38e288(0x204):await _0x515359();break;case _0x38e288(0x4e0):await _0x20c5b6(_0x14e1bd);break;case _0x38e288(0x507):await _0x36fcad(_0x25309a??_0x289685[_0x38e288(0x58d)](_0x38e288(0x2e7)),_0x14e1bd);break;case _0x38e288(0x484):await _0x2e9e12(_0x25309a??_0x289685[_0x38e288(0x58d)](_0x38e288(0x16a)),_0x14e1bd,_0x550780);break;case _0x38e288(0x41f):await _0x2e27cb(_0x25309a??_0x289685['resolve']('./okdb-export.ndjson'),_0x14e1bd,_0x550780);break;case _0x38e288(0x25d):await _0x52004d(_0x25309a,_0x14e1bd,_0x550780);break;}})()['then'](()=>process[_0x48504d(0x185)](0x0))[_0x48504d(0x60b)](_0xc728ad=>{const _0x50e940=_0x48504d;console[_0x50e940(0x4d4)](_0x50e940(0x222)+(_0xc728ad['message']||_0xc728ad)+'\x0a'),process[_0x50e940(0x185)](0x1);});}else _0x5d1641()[_0x48504d(0x60b)](_0x343c32=>{const _0x34b5e3=_0x48504d;console[_0x34b5e3(0x4d4)](_0x34b5e3(0x5d5)),console['error'](_0x343c32[_0x34b5e3(0x45a)]||_0x343c32),process[_0x34b5e3(0x185)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x18fcc0(0x260)]=okdb;
|
|
2
|
+
'use strict';function _0x19c4(_0x51a16e,_0x4869cf){_0x51a16e=_0x51a16e-0x194;const _0x5003dd=_0x5003();let _0x19c404=_0x5003dd[_0x51a16e];return _0x19c404;}const _0x2e4d80=_0x19c4;(function(_0x20e811,_0x6b9afe){const _0x11da28=_0x19c4,_0x19d893=_0x20e811();while(!![]){try{const _0x31d089=-parseInt(_0x11da28(0x37d))/0x1+-parseInt(_0x11da28(0x549))/0x2*(parseInt(_0x11da28(0x342))/0x3)+parseInt(_0x11da28(0x2e7))/0x4*(-parseInt(_0x11da28(0x1e5))/0x5)+-parseInt(_0x11da28(0x332))/0x6*(parseInt(_0x11da28(0x494))/0x7)+parseInt(_0x11da28(0x1ad))/0x8*(parseInt(_0x11da28(0x1c0))/0x9)+parseInt(_0x11da28(0x39b))/0xa+parseInt(_0x11da28(0x3b8))/0xb;if(_0x31d089===_0x6b9afe)break;else _0x19d893['push'](_0x19d893['shift']());}catch(_0x297a64){_0x19d893['push'](_0x19d893['shift']());}}}(_0x5003,0x1c460));var require$$1=require(_0x2e4d80(0x307)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require('../okdb'),require$$0$3=require(_0x2e4d80(0x3a4)),require$$0$1=require(_0x2e4d80(0x417)),require$$0$2=require(_0x2e4d80(0x4d6)),require$$4=require(_0x2e4d80(0x49a)),require$$1$2=require(_0x2e4d80(0x1f4)),require$$0$4=require(_0x2e4d80(0x57a)),require$$0$5=require(_0x2e4d80(0x56c)),require$$0$6=require(_0x2e4d80(0x652));function getDefaultExportFromCjs(_0x1d0cba){const _0x35886b=_0x2e4d80;return _0x1d0cba&&_0x1d0cba[_0x35886b(0x5da)]&&Object[_0x35886b(0x227)][_0x35886b(0x2ca)][_0x35886b(0x45c)](_0x1d0cba,_0x35886b(0x5fd))?_0x1d0cba['default']:_0x1d0cba;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x14f6e4=require$$0,_0x2cfe8f=require$$1$1,_0x1178ac=require$$1;let _0x2922c3;function _0x277f85(){const _0x48e9e0=_0x19c4;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x2922c3!==undefined)return _0x2922c3;try{const _0x20aae3=_0x1178ac['dirname'](require[_0x48e9e0(0x64c)](_0x48e9e0(0x3c7)));_0x2922c3=_0x2cfe8f['existsSync'](_0x1178ac[_0x48e9e0(0x482)](_0x20aae3,_0x48e9e0(0x477),'Release',_0x48e9e0(0x312)));}catch{_0x2922c3=![];}return _0x2922c3;}function _0x5b0f18(){const _0x1c94db=_0x19c4,_0x513b24=_0x14f6e4[_0x1c94db(0x356)]()[_0x1c94db(0x548)];return Math[_0x1c94db(0x3c6)](0x1,_0x513b24-0x1);}function _0x1a48a2(_0x546bf0,_0xefea1={}){const _0x27b579=_0x19c4,_0x2708fa=_0xefea1[_0x27b579(0x296)]!==undefined?_0xefea1['shmbufNative']:_0x277f85();let _0x4dc7ef;if(_0x546bf0?.[_0x27b579(0x629)])_0x4dc7ef=0x1;else{let _0x260c37,_0x41f66f;if(_0x546bf0?.[_0x27b579(0x464)]!==undefined&&_0x546bf0[_0x27b579(0x464)]!==null&&_0x546bf0[_0x27b579(0x464)]!=='')_0x260c37=_0x546bf0[_0x27b579(0x464)],_0x41f66f='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x260c37=process.env.OKDB_HTTP_WORKERS,_0x41f66f='OKDB_HTTP_WORKERS';else _0x546bf0?.[_0x27b579(0x468)]?.[_0x27b579(0x62c)]!==undefined&&_0x546bf0[_0x27b579(0x468)][_0x27b579(0x62c)]!==null&&_0x546bf0[_0x27b579(0x468)][_0x27b579(0x62c)]!==''&&(_0x260c37=_0x546bf0[_0x27b579(0x468)][_0x27b579(0x62c)],_0x41f66f=_0x27b579(0x458));}if(_0x260c37===undefined)_0x4dc7ef=_0x5b0f18();else{const _0x115335=Number(_0x260c37);!Number[_0x27b579(0x497)](_0x115335)||_0x115335<0x1?(console[_0x27b579(0x21d)](_0x27b579(0x571)+_0x41f66f+'='+JSON['stringify'](_0x260c37)+_0x27b579(0x25e)),_0x4dc7ef=0x1):_0x4dc7ef=_0x115335;}}return!_0x2708fa&&_0x4dc7ef>0x1&&(console[_0x27b579(0x21d)](_0x27b579(0x5e8)+('(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20'+_0x4dc7ef+').')),_0x4dc7ef=0x1),_0x4dc7ef;}return okdbWorkers={'isShmbufNative':_0x277f85,'defaultWorkers':_0x5b0f18,'resolveWorkers':_0x1a48a2},okdbWorkers;}var version=_0x2e4d80(0x53f),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x1c1d46=require$$0$1;function _0x2c16f9(_0x52643e,_0x5b6aa4){const _0x4a750a=_0x19c4;return _0x1c1d46[_0x4a750a(0x2e3)]('sha256',_0x5b6aa4)['update'](_0x52643e)['digest'](_0x4a750a(0x5c2));}function _0x17d33c(_0x54136a,_0x375cc3){const _0x180f6b=_0x19c4;if(typeof _0x54136a!=='string'||typeof _0x375cc3!==_0x180f6b(0x4c7))return![];if(Buffer[_0x180f6b(0x490)](_0x54136a)!==Buffer[_0x180f6b(0x490)](_0x375cc3))return![];return _0x1c1d46['timingSafeEqual'](Buffer[_0x180f6b(0x373)](_0x54136a),Buffer[_0x180f6b(0x373)](_0x375cc3));}function _0x46c1f1(_0x365e43){const _0xbdcabd=_0x19c4;if(!_0x365e43?.['startsWith'](_0xbdcabd(0x3ad)))return null;return _0x365e43[_0xbdcabd(0x30b)](0x7);}function _0x499ab9(_0x54223e=0x20){const _0xcc151e=_0x19c4;return _0x1c1d46[_0xcc151e(0x3e6)](_0x54223e)[_0xcc151e(0x201)](_0xcc151e(0x5c2));}function _0x5e6665(_0x453154){const _0x2f32e7=_0x19c4;return _0x1c1d46[_0x2f32e7(0x2fc)](_0x2f32e7(0x355))['update'](_0x453154)[_0x2f32e7(0x410)](_0x2f32e7(0x2ef));}function _0x4859c1(_0x449089,_0x48c30f,_0x14a548=0x36ee80){const _0x5205ba=_0x19c4;if(!_0x48c30f)throw new Error(_0x5205ba(0x573));const _0x20245f=Date[_0x5205ba(0x600)](),_0x42c079=Buffer['from'](JSON[_0x5205ba(0x42a)]({'iat':_0x20245f,'exp':_0x20245f+_0x14a548,'sub':_0x449089?.['id']??_0x449089?.['sub']??null,'username':_0x449089?.[_0x5205ba(0x3f5)]??_0x449089?.['name']??null,'roles':Array[_0x5205ba(0x2b1)](_0x449089?.['roles'])?_0x449089[_0x5205ba(0x364)]:[]}))[_0x5205ba(0x201)](_0x5205ba(0x5c2)),_0x51d047=_0x2c16f9(_0x42c079,_0x48c30f);return _0x42c079+'.'+_0x51d047;}function _0x468821(_0x375b44,_0x568a17){const _0x403cb6=_0x19c4;if(!_0x568a17||typeof _0x375b44!=='string')return null;const [_0x7f3e74,_0x139be9]=_0x375b44[_0x403cb6(0x32a)]('.');if(!_0x7f3e74||!_0x139be9)return null;const _0x23fa8c=_0x2c16f9(_0x7f3e74,_0x568a17);if(!_0x17d33c(_0x139be9,_0x23fa8c))return null;try{const _0x422a7f=JSON[_0x403cb6(0x1ec)](Buffer['from'](_0x7f3e74,_0x403cb6(0x5c2))[_0x403cb6(0x201)]()),_0x43d843=0x7530;if(Date[_0x403cb6(0x600)]()>Number(_0x422a7f?.[_0x403cb6(0x2bd)]??0x0)+_0x43d843)return null;return _0x422a7f;}catch{return null;}}async function _0x4f2955(_0x4ecfc5){return new Promise((_0x4f315d,_0x11b4ce)=>{const _0x175895=_0x19c4,_0x56805a=_0x1c1d46[_0x175895(0x3e6)](0x10);_0x1c1d46[_0x175895(0x46a)](_0x4ecfc5,_0x56805a,0x40,(_0x91818e,_0x3e25fe)=>{const _0x2dc7fe=_0x175895;if(_0x91818e)_0x11b4ce(_0x91818e);_0x4f315d(_0x56805a[_0x2dc7fe(0x201)](_0x2dc7fe(0x2ef))+':'+_0x3e25fe[_0x2dc7fe(0x201)]('hex'));});});}async function _0x2b79f5(_0x53cd39,_0xdbf6a){const _0x2281cd=_0x19c4,[_0x3d1648,_0x325b0e]=_0xdbf6a[_0x2281cd(0x32a)](':');if(!_0x3d1648||!_0x325b0e)return![];const _0x58cace=Buffer[_0x2281cd(0x373)](_0x3d1648,'hex');return new Promise((_0x81df,_0x2562a5)=>{_0x1c1d46['scrypt'](_0x53cd39,_0x58cace,0x40,(_0xf058b7,_0x165f44)=>{const _0x102c85=_0x19c4;if(_0xf058b7)_0x2562a5(_0xf058b7);_0x81df(_0x1c1d46[_0x102c85(0x3d8)](_0x165f44,Buffer['from'](_0x325b0e,_0x102c85(0x2ef))));});});}return okdbAuthTokens={'hmac':_0x2c16f9,'timingSafeEqual':_0x17d33c,'parseBearer':_0x46c1f1,'randomToken':_0x499ab9,'hashToken':_0x5e6665,'issueToken':_0x4859c1,'authenticateToken':_0x468821,'hashPassword':_0x4f2955,'verifyPassword':_0x2b79f5},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x1cfcdf=_0x2e4d80;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x61e1b=require$$0$2,_0x3d0407='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x582bb1=new Uint8Array(0x100)[_0x1cfcdf(0x384)](0xff);for(let _0x3bcd94=0x0;_0x3bcd94<_0x3d0407[_0x1cfcdf(0x548)];_0x3bcd94++){_0x582bb1[_0x3d0407[_0x1cfcdf(0x5e9)](_0x3bcd94)]=_0x3bcd94,_0x582bb1[_0x3d0407[_0x1cfcdf(0x5e9)](_0x3bcd94)+0x20]=_0x3bcd94;}_0x582bb1['O'[_0x1cfcdf(0x5e9)](0x0)]=0x0,_0x582bb1['o'[_0x1cfcdf(0x5e9)](0x0)]=0x0,_0x582bb1['I'[_0x1cfcdf(0x5e9)](0x0)]=0x1,_0x582bb1['i'['charCodeAt'](0x0)]=0x1,_0x582bb1['L'[_0x1cfcdf(0x5e9)](0x0)]=0x1,_0x582bb1['l'[_0x1cfcdf(0x5e9)](0x0)]=0x1;function _0x57b5cb(_0x4f2141){const _0x1f1958=_0x1cfcdf;let _0x47f9bc=0x0,_0x599ba3=0x0,_0x4e505b='';for(let _0x31517c=0x0;_0x31517c<_0x4f2141[_0x1f1958(0x548)];_0x31517c++){_0x599ba3=_0x599ba3<<0x8|_0x4f2141[_0x31517c],_0x47f9bc+=0x8;while(_0x47f9bc>=0x5){_0x47f9bc-=0x5,_0x4e505b+=_0x3d0407[_0x599ba3>>>_0x47f9bc&0x1f];}}return _0x47f9bc>0x0&&(_0x4e505b+=_0x3d0407[_0x599ba3<<0x5-_0x47f9bc&0x1f]),_0x4e505b;}function _0x4a0aaf(_0x44864a){const _0x4d1ba9=_0x1cfcdf;_0x44864a=_0x44864a[_0x4d1ba9(0x53d)](/-/g,'')[_0x4d1ba9(0x615)]();let _0x10d987=0x0,_0x363ee0=0x0;const _0x55be6f=[];for(let _0x365f1e=0x0;_0x365f1e<_0x44864a['length'];_0x365f1e++){const _0x399a03=_0x582bb1[_0x44864a[_0x4d1ba9(0x5e9)](_0x365f1e)];if(_0x399a03===0xff)continue;_0x363ee0=_0x363ee0<<0x5|_0x399a03,_0x10d987+=0x5,_0x10d987>=0x8&&(_0x10d987-=0x8,_0x55be6f[_0x4d1ba9(0x26a)](_0x363ee0>>>_0x10d987&0xff));}return Buffer['from'](_0x55be6f);}const _0x399b16=['sync',_0x1cfcdf(0x5f5),_0x1cfcdf(0x5f1),_0x1cfcdf(0x5c9),_0x1cfcdf(0x38a),_0x1cfcdf(0x2c7),_0x1cfcdf(0x38d),'files'],_0xdd5b34=0x0,_0x445a92=0x1,_0x4299db=0x2,_0xad5c36=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x3c8cb3({issuedAt:_0x34781f,expiresAt:_0xb38f1c,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0xdd5b34}){const _0x2b357c=_0x1cfcdf,_0x28d9c2=Buffer[_0x2b357c(0x373)](licensee,_0x2b357c(0x2a0))[_0x2b357c(0x30b)](0x0,0x40),_0x263bd5=0x1+0x1+0x4+0x4+0x1+_0x28d9c2['length']+0x2+0x10,_0x100eb1=Buffer['allocUnsafe'](_0x263bd5);let _0x145a57=0x0;_0x100eb1[_0x2b357c(0x306)](0x1,_0x145a57++),_0x100eb1[_0x2b357c(0x306)](licenseType,_0x145a57++),_0x100eb1[_0x2b357c(0x391)](Math[_0x2b357c(0x51a)](_0x34781f/0x3e8),_0x145a57),_0x145a57+=0x4,_0x100eb1[_0x2b357c(0x391)](Math['floor'](_0xb38f1c/0x3e8),_0x145a57),_0x145a57+=0x4,_0x100eb1['writeUInt8'](_0x28d9c2[_0x2b357c(0x548)],_0x145a57++),_0x28d9c2[_0x2b357c(0x1f6)](_0x100eb1,_0x145a57),_0x145a57+=_0x28d9c2['length'];let _0x2e1fa4=0x0;for(let _0x2f051f=0x0;_0x2f051f<_0x399b16[_0x2b357c(0x548)];_0x2f051f++){if(features[_0x399b16[_0x2f051f]])_0x2e1fa4|=0x1<<_0x2f051f;}_0x100eb1[_0x2b357c(0x1f0)](_0x2e1fa4,_0x145a57),_0x145a57+=0x2;const _0xbad815=['envs',_0x2b357c(0x24a),_0x2b357c(0x411),_0x2b357c(0x3aa)];for(const _0x7bf9cd of _0xbad815){_0x100eb1['writeUInt32BE'](limits[_0x7bf9cd]||0x0,_0x145a57),_0x145a57+=0x4;}return _0x100eb1;}function _0x889971(_0xf4dc6b){const _0x342649=_0x1cfcdf;let _0x4fec70=0x0;const _0x30c141=_0xf4dc6b[_0x342649(0x1e0)](_0x4fec70++),_0x48d3b4=_0xf4dc6b[_0x342649(0x1e0)](_0x4fec70++),_0xa44ca2=_0xf4dc6b[_0x342649(0x5f4)](_0x4fec70);_0x4fec70+=0x4;const _0x218ce8=_0xf4dc6b[_0x342649(0x5f4)](_0x4fec70);_0x4fec70+=0x4;const _0x13c6fc=_0xf4dc6b[_0x342649(0x1e0)](_0x4fec70++),_0x2ea302=_0xf4dc6b[_0x342649(0x30b)](_0x4fec70,_0x4fec70+_0x13c6fc)[_0x342649(0x201)](_0x342649(0x2a0));_0x4fec70+=_0x13c6fc;const _0x82fe80=_0xf4dc6b[_0x342649(0x241)](_0x4fec70);_0x4fec70+=0x2;const _0x50bebf={};for(let _0x265164=0x0;_0x265164<_0x399b16[_0x342649(0x548)];_0x265164++){_0x50bebf[_0x399b16[_0x265164]]=Boolean(_0x82fe80&0x1<<_0x265164);}const _0x3469f3=[_0x342649(0x444),_0x342649(0x24a),'syncPeers','maxWrites'],_0x30a04a={};for(const _0x573f23 of _0x3469f3){const _0x1363df=_0xf4dc6b[_0x342649(0x5f4)](_0x4fec70);_0x4fec70+=0x4,_0x30a04a[_0x573f23]=_0x1363df===0x0?null:_0x1363df;}return{'v':_0x30c141,'licenseType':_0x48d3b4,'issuedAt':_0xa44ca2*0x3e8,'expiresAt':_0x218ce8*0x3e8,'licensee':_0x2ea302,'features':_0x50bebf,'limits':_0x30a04a};}function _0x445841(_0x1487f3,_0x387eaa){const _0x57cbbf=_0x1cfcdf,_0x3eabb1=Buffer[_0x57cbbf(0x4c9)]([_0x1487f3,_0x387eaa]),_0x43b9f0=_0x57b5cb(_0x3eabb1),_0x1c7bda=[];for(let _0x496db3=0x0;_0x496db3<_0x43b9f0[_0x57cbbf(0x548)];_0x496db3+=0x8){_0x1c7bda['push'](_0x43b9f0[_0x57cbbf(0x30b)](_0x496db3,_0x496db3+0x8));}return _0x1c7bda[_0x57cbbf(0x482)]('-');}function _0x59307c(_0xf1e99a){const _0x50914e=_0x1cfcdf;if(typeof _0xf1e99a!==_0x50914e(0x4c7))throw new Error(_0x50914e(0x5f6));const _0x2d028a=_0x4a0aaf(_0xf1e99a[_0x50914e(0x53d)](/-/g,''));if(_0x2d028a[_0x50914e(0x548)]<0x41)throw new Error(_0x50914e(0x541)+_0x2d028a[_0x50914e(0x548)]+_0x50914e(0x262));const _0x239689=_0x2d028a[_0x50914e(0x30b)](0x0,_0x2d028a[_0x50914e(0x548)]-0x40),_0x3f1234=_0x2d028a['slice'](_0x2d028a[_0x50914e(0x548)]-0x40);let _0x5e4efe;try{_0x5e4efe=_0x889971(_0x239689);}catch(_0x5d4e5a){throw new Error(_0x50914e(0x331)+_0x5d4e5a[_0x50914e(0x34d)]);}return{'rawBuf':_0x2d028a,'payload':_0x239689,'sig':_0x3f1234,'decoded':_0x5e4efe};}function _0x5b8994(_0x11b960){const _0x501d37=_0x1cfcdf;return _0x61e1b['createHash'](_0x501d37(0x355))[_0x501d37(0x5ae)](_0x11b960)[_0x501d37(0x410)]()[_0x501d37(0x30b)](0x0,0x8);}function _0x5d84e7(_0x4ca81d,_0x28b9c3,_0x599def){const _0x57ea35=_0x1cfcdf,_0x448634=_0x57ea35(0x4c8)+_0x599def,_0x3cfb66=Buffer[_0x57ea35(0x4c9)]([Buffer[_0x57ea35(0x373)](_0x4ca81d,_0x57ea35(0x2a0)),_0x28b9c3]),_0x3dc72e=_0x61e1b[_0x57ea35(0x2e3)]('sha256',_0x448634)[_0x57ea35(0x5ae)](_0x3cfb66)[_0x57ea35(0x410)](),_0x36a81f=_0x57b5cb(_0x3dc72e[_0x57ea35(0x30b)](0x0,0x5));return{'pin':_0x36a81f,'pinHmac':_0x3dc72e};}function _0x46b036(_0xc0d8aa,_0x56c52f,_0xb3573f){const _0x4e8a45=_0x1cfcdf,_0x4fe835=Buffer['allocUnsafe'](0x4d);let _0x18d59f=0x0;_0x4fe835[_0x4e8a45(0x306)](0x1,_0x18d59f++),_0xc0d8aa[_0x4e8a45(0x1f6)](_0x4fe835,_0x18d59f),_0x18d59f+=0x8,_0x4fe835['writeUInt32BE'](_0x56c52f,_0x18d59f),_0x18d59f+=0x4,_0xb3573f[_0x4e8a45(0x1f6)](_0x4fe835,_0x18d59f);const _0x2d38b4=_0x57b5cb(_0x4fe835),_0x203947=[];for(let _0xfbd00c=0x0;_0xfbd00c<_0x2d38b4[_0x4e8a45(0x548)];_0xfbd00c+=0x6){_0x203947[_0x4e8a45(0x26a)](_0x2d38b4[_0x4e8a45(0x30b)](_0xfbd00c,_0xfbd00c+0x6));}return _0x203947[_0x4e8a45(0x482)]('-');}function _0x54a3bb(_0x267b49){const _0x39a652=_0x1cfcdf;if(typeof _0x267b49!==_0x39a652(0x4c7))throw new Error(_0x39a652(0x582));const _0x5679b8=_0x4a0aaf(_0x267b49[_0x39a652(0x53d)](/-/g,''));if(_0x5679b8['length']!==0x4d)throw new Error(_0x39a652(0x2ee)+_0x5679b8[_0x39a652(0x548)]);let _0x219a4e=0x0;const _0x2cdf0d=_0x5679b8[_0x39a652(0x1e0)](_0x219a4e++),_0x2601e3=_0x5679b8['slice'](_0x219a4e,_0x219a4e+0x8);_0x219a4e+=0x8;const _0x36ddf4=_0x5679b8[_0x39a652(0x5f4)](_0x219a4e);_0x219a4e+=0x4;const _0x53c8c1=_0x5679b8[_0x39a652(0x30b)](_0x219a4e);return{'v':_0x2cdf0d,'licenseHash':_0x2601e3,'expiry':_0x36ddf4,'sig':_0x53c8c1};}function _0x241816({tokenString:_0x3bbd57,nodeId:_0x4c2a5a,rawBlobBuf:_0x571cbf,pubKeyPem:_0x45335c,pubFingerprint:_0x3a9450}){const _0xd22863=_0x1cfcdf;let _0x522467;try{_0x522467=_0x54a3bb(_0x3bbd57);}catch(_0x214b49){return{'valid':![],'reason':_0xd22863(0x26d)};}const _0x37651f=_0x5b8994(_0x571cbf);if(!_0x37651f[_0xd22863(0x37a)](_0x522467[_0xd22863(0x485)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x4cfb13}=_0x5d84e7(_0x4c2a5a,_0x37651f,_0x3a9450),_0x1ea1b0=Buffer[_0xd22863(0x2c4)](0x4);_0x1ea1b0[_0xd22863(0x391)](_0x522467[_0xd22863(0x5cd)],0x0);const _0x3ea210=Buffer[_0xd22863(0x4c9)]([Buffer['from']([_0x522467['v']]),_0x4cfb13[_0xd22863(0x30b)](0x0,0x5),_0x522467[_0xd22863(0x485)],_0x1ea1b0]);try{const _0x53a905=_0x61e1b[_0xd22863(0x657)](null,_0x3ea210,_0x45335c,_0x522467[_0xd22863(0x525)]);if(!_0x53a905)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x499373){return{'valid':![],'reason':_0xd22863(0x328)};}if(_0x522467[_0xd22863(0x5cd)]<Date[_0xd22863(0x600)]()/0x3e8)return{'valid':![],'reason':_0xd22863(0x5a8)};return{'valid':!![],'reason':'ok'};}function _0x36f2bc(_0x2de4a4){const _0x1a3ad5=_0x1cfcdf;if(typeof _0x2de4a4!==_0x1a3ad5(0x4c7))return _0x1a3ad5(0x2f6);const _0xae47fc=_0x2de4a4[_0x1a3ad5(0x560)]();if(_0xae47fc[_0x1a3ad5(0x52f)]('/')||_0xae47fc[_0x1a3ad5(0x52f)]('./')||_0xae47fc['startsWith'](_0x1a3ad5(0x63a))||/^[A-Za-z]:[\\/]/['test'](_0xae47fc))return _0x1a3ad5(0x307);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0xae47fc))return _0x1a3ad5(0x605);const _0x4e20ae=_0xae47fc[_0x1a3ad5(0x53d)](/[\s-]+/g,'')[_0x1a3ad5(0x548)];if(_0x4e20ae===0x7c)return _0x1a3ad5(0x2b4);if(_0x4e20ae>=0x95&&_0x4e20ae<=0xfc)return _0x1a3ad5(0x324);return _0x1a3ad5(0x2f6);}return okdbLicenseCodec={'toBase32':_0x57b5cb,'fromBase32':_0x4a0aaf,'encodeLicensePayload':_0x3c8cb3,'decodeLicensePayload':_0x889971,'encodeLicenseBlob':_0x445841,'decodeLicenseBlob':_0x59307c,'licenseHash':_0x5b8994,'derivePin':_0x5d84e7,'encodeActivationToken':_0x46b036,'decodeActivationToken':_0x54a3bb,'verifyActivation':_0x241816,'detectInputType':_0x36f2bc,'FEATURE_NAMES':_0x399b16,'LICENSE_TYPE_STANDARD':_0xdd5b34,'LICENSE_TYPE_OPEN':_0x445a92,'LICENSE_TYPE_INTERNAL':_0x4299db,'OPEN_LICENSE_MAX_DURATION_MS':_0xad5c36},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x5cdef6 extends Error{constructor(_0x878672,_0x5ef2a4,_0x1630c3={}){const _0x115e9d=_0x19c4;super(_0x878672),this[_0x115e9d(0x1ae)]=_0x115e9d(0x39e),this[_0x115e9d(0x4f4)]=_0x5ef2a4,this[_0x115e9d(0x1b6)]=_0x1630c3,_0x1630c3[_0x115e9d(0x5fb)]&&(this['cause']=_0x1630c3[_0x115e9d(0x5fb)]),Error[_0x115e9d(0x286)](this,this[_0x115e9d(0x4b3)]);}}class _0x4912d7 extends _0x5cdef6{constructor(_0x27f47f,_0x220cd6,_0x340fbe,_0x1a6675){const _0x4df5eb=_0x19c4;super(_0x4df5eb(0x29d)+_0x27f47f+'@'+_0x220cd6+_0x4df5eb(0x4e6)+_0x340fbe+_0x4df5eb(0x4ff)+_0x1a6675,_0x4df5eb(0x362),{'type':_0x27f47f,'key':_0x220cd6,'expectedVersion':_0x340fbe,'actualVersion':_0x1a6675}),this[_0x4df5eb(0x1ae)]=_0x4df5eb(0x2d7);}}class _0x42466b extends _0x5cdef6{constructor(_0x39def5,_0x3c4663){const _0x3a3bb8=_0x19c4;super(_0x39def5+'@'+_0x3c4663+_0x3a3bb8(0x439),_0x3a3bb8(0x59c),{'type':_0x39def5,'key':_0x3c4663}),this[_0x3a3bb8(0x1ae)]=_0x3a3bb8(0x459);}}class _0x242cb4 extends _0x5cdef6{constructor(_0x4f506b,_0x2bb2ca){const _0x1c2795=_0x19c4;super(_0x4f506b+'@'+_0x2bb2ca+'\x20already\x20exists','ALREADY_EXISTS',{'type':_0x4f506b,'key':_0x2bb2ca}),this[_0x1c2795(0x1ae)]=_0x1c2795(0x2db);}}class _0x2a2935 extends _0x5cdef6{constructor(_0x1f51fb,_0xdbe6dc){const _0x911ab6=_0x19c4,_0x97d50d=typeof _0xdbe6dc;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x1f51fb+_0x911ab6(0x5be)+_0x97d50d+_0x911ab6(0x1c3)+_0xdbe6dc,_0x911ab6(0x288),{'index':_0x1f51fb,'key':_0xdbe6dc,'keyType':_0x97d50d}),this['name']='OKDBInvalidIndexKeyError';}}class _0x57e69c extends _0x5cdef6{constructor(_0x554625){const _0x5fdfed=_0x19c4,_0x3b0d73=typeof _0x554625;super(_0x5fdfed(0x20c)+_0x3b0d73+_0x5fdfed(0x501)+_0x554625,_0x5fdfed(0x25d),{'key':_0x554625,'keyType':_0x3b0d73}),this['name']=_0x5fdfed(0x2b0);}}class _0x15a8d8 extends _0x5cdef6{constructor(_0x2721c){const _0x160ea0=_0x19c4;super(_0x160ea0(0x606)+_0x2721c+_0x160ea0(0x595),'TYPE_NOT_REGISTERED',{'type':_0x2721c}),this['name']=_0x160ea0(0x372);}}class _0x108b7a extends _0x5cdef6{constructor(_0x2df9e2){const _0x4be201=_0x19c4;super(_0x4be201(0x606)+_0x2df9e2+_0x4be201(0x403),'TYPE_ALREADY_REGISTERED',{'type':_0x2df9e2}),this[_0x4be201(0x1ae)]=_0x4be201(0x430);}}class _0x1ba1be extends _0x5cdef6{constructor(_0x15c572,_0x24abde){const _0x576323=_0x19c4;super(_0x576323(0x58f)+_0x24abde+_0x576323(0x32e)+_0x15c572+_0x576323(0x595),_0x576323(0x36d),{'type':_0x15c572,'index':_0x24abde}),this[_0x576323(0x1ae)]='OKDBIndexNotRegisteredError';}}class _0x59b144 extends _0x5cdef6{constructor(_0xc55300,_0x530a20){const _0x95c883=_0x19c4;super(_0x95c883(0x58f)+_0x530a20+'\x27\x20on\x20type\x20\x27'+_0xc55300+_0x95c883(0x1bd),_0x95c883(0x535),{'type':_0xc55300,'index':_0x530a20}),this[_0x95c883(0x1ae)]=_0x95c883(0x330);}}class _0x372e5b extends _0x5cdef6{constructor(_0x2a9ca8,_0x48d294={}){const _0x45d84c=_0x19c4;super(_0x2a9ca8,'INVALID_VALUE',_0x48d294),this[_0x45d84c(0x1ae)]='OKDBInvalidValueError';}}class _0x24a1ae extends _0x5cdef6{constructor(_0x59610e,_0x1fc312,_0x5d94c1,_0x11f998,_0x16899b){const _0x41d6b6=_0x19c4;super('Unique\x20constraint\x20violated\x20on\x20'+_0x59610e+'@'+_0x1fc312+_0x41d6b6(0x27c)+_0x5d94c1+_0x41d6b6(0x30e)+_0x11f998+_0x41d6b6(0x3f2)+_0x16899b+'\x27',_0x41d6b6(0x19d),{'type':_0x59610e,'index':_0x1fc312,'indexKey':_0x5d94c1,'existingKey':_0x11f998,'conflictingKey':_0x16899b}),this['name']=_0x41d6b6(0x52c);}}class _0x58a7c2 extends _0x5cdef6{constructor(_0x236b77,_0xa8695b,_0x179ae1){const _0x504773=_0x19c4;super('Schema\x20validation\x20failed\x20for\x20'+_0x236b77+'@'+_0xa8695b,_0x504773(0x5d7),{'type':_0x236b77,'key':_0xa8695b,'errors':_0x179ae1}),this[_0x504773(0x1ae)]=_0x504773(0x344),this['type']=_0x236b77,this['key']=_0xa8695b,this[_0x504773(0x623)]=_0x179ae1;}}class _0x4a61d3 extends _0x5cdef6{constructor(_0x16bbcb,_0x5cadee){const _0x2b4f48=_0x19c4;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x16bbcb+':\x20'+_0x5cadee[_0x2b4f48(0x548)]+_0x2b4f48(0x60b),_0x2b4f48(0x3c0),{'type':_0x16bbcb,'failures':_0x5cadee}),this[_0x2b4f48(0x1ae)]=_0x2b4f48(0x294),this[_0x2b4f48(0x2cb)]=_0x16bbcb,this['failures']=_0x5cadee;}}class _0x45109c extends _0x5cdef6{constructor(_0x4e6fed,_0x28932d,_0x246183,_0x2c9ac8,_0x2801fb){const _0x40a48b=_0x19c4;super(_0x40a48b(0x43f)+_0x4e6fed+'@'+_0x28932d+'.'+_0x246183+_0x40a48b(0x31b)+_0x2c9ac8+'@'+_0x2801fb+'\x20which\x20does\x20not\x20exist',_0x40a48b(0x4de),{'sourceType':_0x4e6fed,'sourceKey':_0x28932d,'fieldPath':_0x246183,'targetType':_0x2c9ac8,'targetKey':_0x2801fb}),this[_0x40a48b(0x1ae)]='OKDBForeignKeyError',this[_0x40a48b(0x354)]=_0x4e6fed,this['sourceKey']=_0x28932d,this[_0x40a48b(0x54b)]=_0x246183,this[_0x40a48b(0x1c2)]=_0x2c9ac8,this['targetKey']=_0x2801fb;}}class _0x581517 extends _0x5cdef6{constructor(_0xa3a56b,_0x489f0c,_0x32d59e){const _0x14f800=_0x19c4;super('Cannot\x20delete\x20'+_0xa3a56b+'@'+_0x489f0c+':\x20'+_0x32d59e[_0x14f800(0x548)]+_0x14f800(0x557),_0x14f800(0x5a0),{'targetType':_0xa3a56b,'targetKey':_0x489f0c,'references':_0x32d59e}),this['name']='OKDBForeignKeyDeleteError',this[_0x14f800(0x1c2)]=_0xa3a56b,this[_0x14f800(0x524)]=_0x489f0c,this[_0x14f800(0x594)]=_0x32d59e;}}class _0x2cc685 extends _0x5cdef6{constructor(_0x468410,_0x440af2,_0x59e308){const _0x5136d9=_0x19c4;super(_0x5136d9(0x4e7)+_0x440af2+_0x5136d9(0x1b1)+_0x468410+_0x5136d9(0x614)+_0x59e308[_0x5136d9(0x2c1)](_0x1896c3=>_0x1896c3[_0x5136d9(0x2e2)]+':'+_0x1896c3[_0x5136d9(0x1ae)])[_0x5136d9(0x482)](',\x20'),_0x5136d9(0x447),{'type':_0x468410,'index':_0x440af2,'usedBy':_0x59e308}),this['name']='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x5cdef6,'OKDBVersionMismatchError':_0x4912d7,'OKDBNotFoundError':_0x42466b,'OKDBAlreadyExistsError':_0x242cb4,'OKDBInvalidIndexKeyError':_0x2a2935,'OKDBInvalidPrimaryKeyError':_0x57e69c,'OKDBTypeNotRegisteredError':_0x15a8d8,'OKDBTypeAlreadyRegisteredError':_0x108b7a,'OKDBIndexNotRegisteredError':_0x1ba1be,'OKDBIndexAlreadyRegisteredError':_0x59b144,'OKDBInvalidValueError':_0x372e5b,'OKDBUniqueConstraintError':_0x24a1ae,'OKDBSchemaValidationError':_0x58a7c2,'OKDBSchemaCollectionError':_0x4a61d3,'OKDBForeignKeyError':_0x45109c,'OKDBForeignKeyDeleteError':_0x581517,'OKDBIndexHasConsumersError':_0x2cc685},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2a2f94=_0x2e4d80;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x10c25d={'PUT':_0x2a2f94(0x359),'REMOVE':_0x2a2f94(0x53b),'INDEX_DROP':_0x2a2f94(0x27d),'INDEX_REGISTER':_0x2a2f94(0x1de),'INDEX_RESET':_0x2a2f94(0x488),'TYPE_REGISTER':_0x2a2f94(0x4c1),'TYPE_DROP':_0x2a2f94(0x450),'FTS_REGISTER':_0x2a2f94(0x2a3),'FTS_DROP':_0x2a2f94(0x3b0),'FTS_RESET':_0x2a2f94(0x547),'SCHEMA_SET':_0x2a2f94(0x599),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x2a2f94(0x4ad),'TTL_CLEAR':'clearTtl'},_0x564611={'SYSTEM_READY':_0x2a2f94(0x445),'SYSTEM_STOPPED':_0x2a2f94(0x3bf),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2a2f94(0x598),'SYSTEM_DRAIN':_0x2a2f94(0x308),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x2a2f94(0x627),'SYSTEM_BUS_STATE_CHANGE':_0x2a2f94(0x1bb),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x2a2f94(0x235),'INDEX_RESET':_0x2a2f94(0x628),'INDEX_READY':_0x2a2f94(0x3c1),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x2a2f94(0x5ee),'INDEX_DROP':_0x2a2f94(0x2a7),'INDEX_REGISTERED':_0x2a2f94(0x1ba),'FTS_REGISTERED':_0x2a2f94(0x579),'FTS_DROP':_0x2a2f94(0x506),'FTS_RESET':_0x2a2f94(0x570),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2a2f94(0x404),'UNIQUE_VIOLATION':_0x2a2f94(0x22a),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x2a2f94(0x402),'REF_VIOLATION_RESOLVED':_0x2a2f94(0x619),'SYNC_APPLY':_0x2a2f94(0x326),'TXN_START':_0x2a2f94(0x327),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2a2f94(0x5cb),'TYPE_REGISTERED':_0x2a2f94(0x4ae),'TYPE_DROP':_0x2a2f94(0x41f),'ENV_OPENED':_0x2a2f94(0x546),'ENV_REMOVED':_0x2a2f94(0x1ce),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x2a2f94(0x3cb),'TTL_CLEAR':_0x2a2f94(0x313),'LICENSE_INVALID':_0x2a2f94(0x383),'LICENSE_ADDED':_0x2a2f94(0x2f3),'LICENSE_ACTIVATED':_0x2a2f94(0x28b),'LICENSE_REMOVED':_0x2a2f94(0x423)},_0x1d4695={'CREATING':'creating','RESETTING':'resetting','READY':_0x2a2f94(0x41e),'DROPPING':'dropping','WAITING':'waiting'},_0x422109={'CREATED':'created','STARTING':'starting','STARTED':_0x2a2f94(0x48e),'STOPPING':_0x2a2f94(0x261),'STOPPED':_0x2a2f94(0x63f)},_0x19275f={'CREATING':_0x2a2f94(0x275),'READY':_0x2a2f94(0x41e),'HALTED':_0x2a2f94(0x59a),'STOPPED':_0x2a2f94(0x63f),'RESETTING':_0x2a2f94(0x277)},_0x351c24=Object[_0x2a2f94(0x496)]({'POKE':_0x2a2f94(0x194),'DRAIN':_0x2a2f94(0x461),'TYPE_DROP':_0x2a2f94(0x2f5),'PROC':_0x2a2f94(0x237),'ENV_RELEASE':_0x2a2f94(0x221)});return okdbEnums={'BUS_EVENTS':_0x351c24,'CHANGE_ACTIONS':_0x10c25d,'EVENTS':_0x564611,'INDEX_STATE':_0x1d4695,'OKDB_STATE':_0x422109,'VIEW_STATE':_0x19275f},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0xd48690=_0x2e4d80;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x30ffa7=require$$1$1,_0x34afe4=require$$1,_0x257df6=require$$0$1,_0x583cfd=_0x30ffa7[_0xd48690(0x60f)](_0x34afe4['join'](__dirname,'keys/public.pem'),_0xd48690(0x2a0))[_0xd48690(0x560)](),_0x42bc26=_0x257df6[_0xd48690(0x521)](_0x583cfd)[_0xd48690(0x59f)]({'type':_0xd48690(0x465),'format':'der'}),_0x140533=_0x257df6[_0xd48690(0x2fc)](_0xd48690(0x355))[_0xd48690(0x5ae)](_0x42bc26)[_0xd48690(0x410)](_0xd48690(0x2ef))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x583cfd,'PUB_FINGERPRINT':_0x140533},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x2ce59e=_0x2e4d80;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4d5e01=require$$0$1,{OKDBError:_0x1d1f15}=requireOkdbError(),{EVENTS:_0x1c0cdc}=requireOkdbEnums(),_0xa25475=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x4150b3,LICENSE_TYPE_INTERNAL:_0x6b36ec,OPEN_LICENSE_MAX_DURATION_MS:_0x3cb2d1}=_0xa25475,_0x3668e3=requireOkdbPubkey(),_0x4169de={'LICENSED_BUILD':_0x2ce59e(0x50d),'PUBLIC_KEY_PEM':_0x3668e3['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x3668e3[_0x2ce59e(0x45d)],'LICENSE_EXPIRED_ACTION':'log'},_0x2a9531=_0x2ce59e(0x48a),_0x16943e={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x467d34(_0x4b0d82){const _0x2d0bd2=_0x2ce59e;!_0x4b0d82[_0x2d0bd2(0x54f)](_0x2a9531)&&await _0x4b0d82[_0x2d0bd2(0x4c1)](_0x2a9531);}class _0x34de06{constructor(_0x41af33){const _0x56af38=_0x2ce59e;this[_0x56af38(0x3e7)]=_0x41af33,this[_0x56af38(0x5f3)]=null;}async[_0x2ce59e(0x1c9)](){const _0x1ea0dc=_0x2ce59e,_0x21c199=this[_0x1ea0dc(0x3e7)][_0x1ea0dc(0x633)];if(!_0x21c199||!_0x21c199[_0x1ea0dc(0x54f)](_0x2a9531)){this[_0x1ea0dc(0x5f3)]=null;return;}const _0x701a81=this[_0x1ea0dc(0x3e7)]['id'];let _0x55356b=null;for(const {key:_0x2d1404,value:_0x233395}of _0x21c199[_0x1ea0dc(0x3a2)](_0x2a9531)){const _0x5140fb=this[_0x1ea0dc(0x4d4)](_0x233395,_0x701a81);_0x5140fb===_0x1ea0dc(0x219)&&!_0x55356b&&(_0x55356b={..._0x233395,'id':_0x2d1404,'status':_0x5140fb});}this['_active']=_0x55356b;if(this[_0x1ea0dc(0x5f3)]&&this[_0x1ea0dc(0x5f3)][_0x1ea0dc(0x5c1)]===_0x4150b3){const _0x3c57d7=Math['ceil']((this[_0x1ea0dc(0x5f3)]['expiresAt']-Date[_0x1ea0dc(0x600)]())/0x5265c00);this[_0x1ea0dc(0x3e7)][_0x1ea0dc(0x581)]?.[_0x1ea0dc(0x21d)](_0x1ea0dc(0x37c)+_0x3c57d7+'\x20day(s).',{'feature':'license','licensee':this[_0x1ea0dc(0x5f3)][_0x1ea0dc(0x320)],'expiresAt':new Date(this[_0x1ea0dc(0x5f3)][_0x1ea0dc(0x554)])['toISOString']()});}this[_0x1ea0dc(0x5f3)]&&this[_0x1ea0dc(0x5f3)]['licenseType']===_0x6b36ec&&this[_0x1ea0dc(0x3e7)][_0x1ea0dc(0x581)]?.[_0x1ea0dc(0x21d)](_0x1ea0dc(0x604),{'feature':'license','licensee':this[_0x1ea0dc(0x5f3)][_0x1ea0dc(0x320)]});}['_computeStatus'](_0xa3007e,_0x59c9eb){const _0xc34ba2=_0x2ce59e;if(!_0xa3007e[_0xc34ba2(0x324)])return _0xc34ba2(0x591);let _0x1c827b;try{_0x1c827b=_0xa25475[_0xc34ba2(0x20d)](_0xa3007e[_0xc34ba2(0x324)]);}catch(_0x54ffc3){return _0xc34ba2(0x591);}try{const _0xeb7a21=_0x4d5e01[_0xc34ba2(0x657)](null,_0x1c827b[_0xc34ba2(0x4e1)],_0x4169de[_0xc34ba2(0x21f)],_0x1c827b[_0xc34ba2(0x525)]);if(!_0xeb7a21)return _0xc34ba2(0x591);}catch(_0x274f4a){return'invalid';}if(_0x1c827b[_0xc34ba2(0x4d7)][_0xc34ba2(0x5c1)]===_0x6b36ec)return _0xc34ba2(0x219);if(_0x1c827b[_0xc34ba2(0x4d7)][_0xc34ba2(0x554)]<=Date['now']())return _0xc34ba2(0x4fd);if(_0x1c827b[_0xc34ba2(0x4d7)]['licenseType']===_0x4150b3)return _0xc34ba2(0x219);if(!_0xa3007e['activation'])return _0xc34ba2(0x418);const _0x1dfa82=_0xa25475[_0xc34ba2(0x478)]({'tokenString':_0xa3007e['activation'],'nodeId':_0x59c9eb,'rawBlobBuf':_0x1c827b[_0xc34ba2(0x3ba)],'pubKeyPem':_0x4169de[_0xc34ba2(0x21f)],'pubFingerprint':_0x4169de[_0xc34ba2(0x45d)]});if(_0x1dfa82['reason']===_0xc34ba2(0x22e)||_0x1dfa82['reason']===_0xc34ba2(0x328))return _0xc34ba2(0x5dd);if(_0x1dfa82[_0xc34ba2(0x626)]===_0xc34ba2(0x5a8))return _0xc34ba2(0x4fd);if(!_0x1dfa82['valid'])return _0xc34ba2(0x5dd);return'active';}get['active'](){const _0x54abea=_0x2ce59e;return this[_0x54abea(0x5f3)];}get[_0x2ce59e(0x1db)](){const _0x1a29fa=_0x2ce59e;return this[_0x1a29fa(0x5f3)]??_0x16943e;}[_0x2ce59e(0x2b8)](_0x3ca34a){const _0x1c0edc=_0x2ce59e;if(_0x4169de['LICENSED_BUILD']!==_0x1c0edc(0x50d))return;const _0x24f936=this[_0x1c0edc(0x1db)];if(!_0x24f936[_0x1c0edc(0x198)]?.[_0x3ca34a]){const _0xda9ff9=_0x24f936[_0x1c0edc(0x3b3)]?_0x1c0edc(0x2b9)+_0x3ca34a+_0x1c0edc(0x316)+_0x3ca34a+_0x1c0edc(0x428):'Feature\x20not\x20licensed:\x20'+_0x3ca34a+_0x1c0edc(0x4fb)+_0x3ca34a+'\x22.';throw new _0x1d1f15(_0xda9ff9,'LICENSE_FEATURE_DISABLED',{'feature':_0x3ca34a});}}[_0x2ce59e(0x645)](_0x10a0cd){const _0x668dba=_0x2ce59e;if(_0x4169de['LICENSED_BUILD']!==_0x668dba(0x50d))return!![];return!!this[_0x668dba(0x1db)][_0x668dba(0x198)]?.[_0x10a0cd];}['assertLimit'](_0x179024,_0x48780b){const _0x50d830=_0x2ce59e;if(_0x4169de[_0x50d830(0x4da)]!==_0x50d830(0x50d))return;const _0xa0ebea=this[_0x50d830(0x1db)],_0x2794b8=_0xa0ebea[_0x50d830(0x52b)]?.[_0x179024];if(_0x2794b8===null||_0x2794b8===undefined||_0x2794b8===0x0)return;if(_0x48780b>=_0x2794b8)throw new _0x1d1f15('License\x20limit\x20exceeded:\x20'+_0x179024+'\x20('+_0x48780b+'/'+_0x2794b8+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x179024,'current':_0x48780b,'max':_0x2794b8});}async['addLicense'](_0x43ef00){const _0x121989=_0x2ce59e;let _0xde70d2;try{_0xde70d2=_0xa25475['decodeLicenseBlob'](_0x43ef00);}catch(_0x5ebc8e){throw new _0x1d1f15('Invalid\x20license\x20blob:\x20'+_0x5ebc8e['message'],'LICENSE_INVALID');}let _0x48df33;try{_0x48df33=_0x4d5e01[_0x121989(0x657)](null,_0xde70d2[_0x121989(0x4e1)],_0x4169de[_0x121989(0x21f)],_0xde70d2[_0x121989(0x525)]);}catch(_0x718624){throw new _0x1d1f15('License\x20signature\x20invalid:\x20'+_0x718624[_0x121989(0x34d)],_0x121989(0x5b4));}if(!_0x48df33)throw new _0x1d1f15(_0x121989(0x3c9)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x4169de[_0x121989(0x45d)]+'.\x20')+_0x121989(0x21b),'LICENSE_INVALID',{'expectedFingerprint':_0x4169de[_0x121989(0x45d)]});if(_0xde70d2[_0x121989(0x4d7)]['licenseType']===_0x4150b3){const _0x18e6a3=_0xde70d2[_0x121989(0x4d7)]['expiresAt']-_0xde70d2[_0x121989(0x4d7)][_0x121989(0x2d8)];if(_0x18e6a3>_0x3cb2d1)throw new _0x1d1f15(_0x121989(0x1a9)+Math[_0x121989(0x20e)](_0x18e6a3/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)','LICENSE_INVALID');}const _0x3eb22e=this[_0x121989(0x3e7)][_0x121989(0x633)];await _0x467d34(_0x3eb22e);const _0x2ba33b=_0xa25475[_0x121989(0x485)](_0xde70d2[_0x121989(0x3ba)])['toString'](_0x121989(0x2ef));for(const {value:_0x26e18a}of _0x3eb22e[_0x121989(0x3a2)](_0x2a9531)){if(_0x26e18a[_0x121989(0x5f9)]===_0x2ba33b)throw new _0x1d1f15(_0x121989(0x366),'LICENSE_INVALID');}const _0x2d8885=_0x4d5e01['randomUUID'](),_0x74bafd={'blob':_0x43ef00,'activation':null,'addedAt':Date[_0x121989(0x600)](),'_licenseHash':_0x2ba33b,'licensee':_0xde70d2[_0x121989(0x4d7)][_0x121989(0x320)],'expiresAt':_0xde70d2[_0x121989(0x4d7)][_0x121989(0x554)],'features':_0xde70d2[_0x121989(0x4d7)]['features'],'limits':_0xde70d2['decoded'][_0x121989(0x52b)],'licenseType':_0xde70d2[_0x121989(0x4d7)][_0x121989(0x5c1)]};return await _0x3eb22e[_0x121989(0x359)](_0x2a9531,_0x2d8885,_0x74bafd),{'id':_0x2d8885,..._0x74bafd};}async[_0x2ce59e(0x263)](_0x8feed0){const _0x8357a3=_0x2ce59e;let _0xdf5277;try{_0xdf5277=_0xa25475['decodeActivationToken'](_0x8feed0);}catch(_0x3b7554){throw new _0x1d1f15('Invalid\x20activation\x20token:\x20'+_0x3b7554[_0x8357a3(0x34d)],_0x8357a3(0x346));}const _0x1bc97d=_0xdf5277[_0x8357a3(0x485)][_0x8357a3(0x201)]('hex'),_0x524307=this['okdb'][_0x8357a3(0x633)];if(!_0x524307||!_0x524307[_0x8357a3(0x54f)](_0x2a9531))throw new _0x1d1f15('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x8357a3(0x346));let _0x417374=null,_0x1fd6c1=null;for(const {key:_0xf3c0cb,value:_0x311dc7}of _0x524307['getRange'](_0x2a9531)){if(_0x311dc7['_licenseHash']===_0x1bc97d){_0x417374=_0xf3c0cb,_0x1fd6c1=_0x311dc7;break;}}if(!_0x417374)throw new _0x1d1f15(_0x8357a3(0x561),_0x8357a3(0x346));const {rawBuf:_0x4bbc44}=_0xa25475[_0x8357a3(0x20d)](_0x1fd6c1[_0x8357a3(0x324)]),_0x3b9ce7=_0xa25475[_0x8357a3(0x478)]({'tokenString':_0x8feed0,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x4bbc44,'pubKeyPem':_0x4169de['PUBLIC_KEY_PEM'],'pubFingerprint':_0x4169de[_0x8357a3(0x45d)]});if(!_0x3b9ce7[_0x8357a3(0x5b1)])throw new _0x1d1f15(_0x8357a3(0x4f2)+_0x3b9ce7[_0x8357a3(0x626)],_0x8357a3(0x346),{'reason':_0x3b9ce7[_0x8357a3(0x626)]});const _0x2161ef={..._0x1fd6c1,'activation':_0x8feed0};return await _0x524307[_0x8357a3(0x5ae)](_0x2a9531,_0x417374,_0x2161ef),{'id':_0x417374,..._0x2161ef};}async[_0x2ce59e(0x3cd)](_0x5d8a8e){const _0x12c354=_0x2ce59e,_0x103896=this[_0x12c354(0x3e7)][_0x12c354(0x633)];if(!_0x103896||!_0x103896[_0x12c354(0x54f)](_0x2a9531))return;await _0x103896['remove'](_0x2a9531,_0x5d8a8e);}async[_0x2ce59e(0x3a0)](){const _0xb3a898=_0x2ce59e,_0x23ac05=this[_0xb3a898(0x3e7)][_0xb3a898(0x633)];if(!_0x23ac05||!_0x23ac05['hasType'](_0x2a9531))return[];const _0xe9db91=this['okdb']['id'],_0x22d59d=[];for(const {key:_0x430534,value:_0x3ff142}of _0x23ac05[_0xb3a898(0x3a2)](_0x2a9531)){const _0x1a5393=this[_0xb3a898(0x4d4)](_0x3ff142,_0xe9db91);_0x22d59d['push']({..._0x3ff142,'id':_0x430534,'status':_0x1a5393});}return _0x22d59d;}[_0x2ce59e(0x4b8)](){const _0x3c3e59=_0x2ce59e,_0x2c07e5=this['okdb']['_systemEnv'];if(!_0x2c07e5||!_0x2c07e5[_0x3c3e59(0x54f)](_0x2a9531))return[];const _0x2f2ab=this['okdb']['id'],_0x2f29c3=[];for(const {key:_0x34531c,value:_0x40416b}of _0x2c07e5['getRange'](_0x2a9531)){if(_0x40416b[_0x3c3e59(0x5f9)]){if(_0x40416b[_0x3c3e59(0x5c1)]===_0x4150b3)_0x2f29c3[_0x3c3e59(0x26a)]({'licenseId':_0x34531c,'pin':null});else{const _0x185177=Buffer[_0x3c3e59(0x373)](_0x40416b['_licenseHash'],_0x3c3e59(0x2ef)),{pin:_0x412af8}=_0xa25475['derivePin'](_0x2f2ab,_0x185177,_0x4169de[_0x3c3e59(0x45d)]);_0x2f29c3[_0x3c3e59(0x26a)]({'licenseId':_0x34531c,'pin':_0x412af8});}}}return _0x2f29c3;}async[_0x2ce59e(0x55b)](){const _0xf941df=_0x2ce59e,_0x4e1d88=this['_active'];await this[_0xf941df(0x1c9)]();if(this[_0xf941df(0x5f3)]&&this[_0xf941df(0x5f3)][_0xf941df(0x5c1)]===_0x4150b3){const _0x514dd7=Math[_0xf941df(0x20e)]((this[_0xf941df(0x5f3)]['expiresAt']-Date[_0xf941df(0x600)]())/0x5265c00);this[_0xf941df(0x3e7)]['log']?.[_0xf941df(0x21d)](_0xf941df(0x37c)+_0x514dd7+_0xf941df(0x504),{'feature':_0xf941df(0x363),'licensee':this[_0xf941df(0x5f3)][_0xf941df(0x320)],'expiresAt':new Date(this[_0xf941df(0x5f3)]['expiresAt'])[_0xf941df(0x61e)]()});}this['_active']&&this[_0xf941df(0x5f3)]['licenseType']===_0x6b36ec&&this[_0xf941df(0x3e7)]['log']?.[_0xf941df(0x21d)](_0xf941df(0x604),{'feature':'license','licensee':this[_0xf941df(0x5f3)]['licensee']});if(_0x4e1d88&&!this[_0xf941df(0x5f3)]){this[_0xf941df(0x3e7)]['log']?.[_0xf941df(0x21d)](_0xf941df(0x374),{'feature':_0xf941df(0x363)}),this[_0xf941df(0x3e7)][_0xf941df(0x51f)]?.[_0xf941df(0x4d8)](_0x1c0cdc[_0xf941df(0x5b4)],{'previous':_0x4e1d88});const _0x4a9c35=this['okdb'][_0xf941df(0x254)]?.[_0xf941df(0x3fa)]??_0x4169de[_0xf941df(0x1fc)];_0x4a9c35==='shutdown'&&(this[_0xf941df(0x3e7)][_0xf941df(0x581)]?.[_0xf941df(0x196)](_0xf941df(0x4f5),{'feature':_0xf941df(0x363)}),this[_0xf941df(0x3e7)][_0xf941df(0x527)]()['catch'](()=>{})['finally'](()=>process[_0xf941df(0x350)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x34de06,'_C':_0x4169de},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x56862e=_0x2e4d80;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x39480a=require$$0$3,_0x2d9e6f=require$$1$1,_0x361f48=require$$0,_0x58eac0=require$$1,_0x2e5ace=_0x58eac0[_0x56862e(0x482)](_0x361f48[_0x56862e(0x2c0)](),_0x56862e(0x64e)),_0x20c09c=0x3e8,_0x2d98e7={'reset':_0x56862e(0x580),'bold':'\x1b[1m','dim':'\x1b[2m','red':'\x1b[31m','green':_0x56862e(0x349),'yellow':_0x56862e(0x487),'blue':'\x1b[34m','magenta':_0x56862e(0x5bb),'cyan':_0x56862e(0x280),'white':_0x56862e(0x442),'gray':_0x56862e(0x463)},_0xbde8ba=!process[_0x56862e(0x2f8)]['isTTY']||!!process.env.NO_COLOR,_0x3fa65c=(_0x3c02c1,_0x4a1790)=>_0xbde8ba?_0x4a1790:''+_0x3c02c1+_0x4a1790+_0x2d98e7['reset'],_0x53a416={'error':_0x2d98e7[_0x56862e(0x642)],'warn':_0x2d98e7['yellow'],'info':_0x2d98e7[_0x56862e(0x1d7)],'debug':_0x2d98e7[_0x56862e(0x26c)]},_0x36ac0a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x1b7c91(_0x3e3146,_0x21d34f=_0x56862e(0x420)){const _0x8eb49c=_0x56862e,{level:_0x31308b,msg:_0x2b30f4,meta:_0x3d20a9,context:_0x3c55d1,ts:_0x44f6e3}=_0x3e3146;if((_0x36ac0a[_0x31308b]??0x1)<(_0x36ac0a[_0x21d34f]??0x1))return;const _0x118b41=_0x3fa65c(_0x2d98e7[_0x8eb49c(0x26c)],new Date(_0x44f6e3)[_0x8eb49c(0x61e)]()),_0x12341f=_0x3fa65c(_0x53a416[_0x31308b]??_0x2d98e7[_0x8eb49c(0x39a)],_0x31308b['padEnd'](0x5));let _0x4e6be9='\x20\x20'+_0x118b41+'\x20'+_0x3fa65c(_0x2d98e7[_0x8eb49c(0x35d)],_0x12341f)+'\x20'+_0x2b30f4;if(_0x3d20a9&&Object[_0x8eb49c(0x222)](_0x3d20a9)[_0x8eb49c(0x548)]>0x0){const _0x4c68fe=Object[_0x8eb49c(0x57f)](_0x3d20a9)['map'](([_0x2490a1,_0x496d7d])=>_0x2490a1+'='+_0x496d7d)[_0x8eb49c(0x482)]('\x20');_0x4e6be9+=_0x3fa65c(_0x2d98e7[_0x8eb49c(0x4eb)],_0x8eb49c(0x583)+_0x4c68fe+']');}if(_0x3c55d1!==undefined){const _0xd2bad2=typeof _0x3c55d1===_0x8eb49c(0x305)?JSON[_0x8eb49c(0x42a)](_0x3c55d1):String(_0x3c55d1);_0x4e6be9+=_0x3fa65c(_0x2d98e7[_0x8eb49c(0x4eb)],'\x20\x20'+_0xd2bad2);}const _0x6e78ab=_0x31308b===_0x8eb49c(0x196)||_0x31308b===_0x8eb49c(0x21d)?process['stderr'][_0x8eb49c(0x5b8)][_0x8eb49c(0x608)](process[_0x8eb49c(0x1eb)]):process[_0x8eb49c(0x2f8)]['write'][_0x8eb49c(0x608)](process[_0x8eb49c(0x2f8)]);_0x6e78ab(_0x4e6be9+'\x0a');}function _0x372ef0(_0x4fa435,_0x5c407a){const _0x4593de=_0x56862e;if(_0x4fa435===0xcc||_0x4fa435>=0xc8&&_0x4fa435<0x12c&&!_0x5c407a){console[_0x4593de(0x581)]('\x0a\x20\x20'+_0x3fa65c(_0x2d98e7[_0x4593de(0x48c)],'✓')+'\x0a');return;}if(_0x4fa435>=0x190||_0x5c407a?.[_0x4593de(0x196)]){const _0x26a4b0=_0x5c407a?.[_0x4593de(0x196)]??_0x5c407a?.[_0x4593de(0x34d)]??_0x4593de(0x220)+_0x4fa435;console[_0x4593de(0x581)](_0x4593de(0x5bc)+_0x3fa65c(_0x2d98e7['red'],'✗')+'\x20'+_0x3fa65c(_0x2d98e7[_0x4593de(0x35d)]+_0x2d98e7['red'],String(_0x4fa435))+'\x20\x20'+_0x26a4b0+'\x0a');return;}const _0x15b22b=Object[_0x4593de(0x227)]['hasOwnProperty'][_0x4593de(0x45c)](_0x5c407a??{},'result')?_0x5c407a[_0x4593de(0x50b)]:_0x5c407a,_0x1d9429=_0x5c407a?.[_0x4593de(0x5d6)];console[_0x4593de(0x581)](''),_0x2c3623(_0x15b22b,'\x20\x20');if(_0x1d9429?.[_0x4593de(0x60d)]!=null||_0x1d9429?.['time']!=null){const _0xc6167a=[];if(_0x1d9429[_0x4593de(0x60d)]!=null)_0xc6167a[_0x4593de(0x26a)](_0x1d9429[_0x4593de(0x60d)]+_0x4593de(0x358)+(_0x1d9429[_0x4593de(0x60d)]!==0x1?'s':''));if(_0x1d9429[_0x4593de(0x3ab)]!=null)_0xc6167a[_0x4593de(0x26a)](_0x1d9429['time']+'ms');console[_0x4593de(0x581)]('\x0a\x20\x20'+_0x3fa65c(_0x2d98e7[_0x4593de(0x4eb)],_0xc6167a['join'](_0x4593de(0x348))));}console[_0x4593de(0x581)]('');}function _0x2c3623(_0x1fd26c,_0xf7fd50=''){const _0x4fbfec=_0x56862e;if(_0x1fd26c===null||_0x1fd26c===undefined){console[_0x4fbfec(0x581)](_0xf7fd50+_0x3fa65c(_0x2d98e7[_0x4fbfec(0x4eb)],_0x4fbfec(0x4ed)));return;}if(Array['isArray'](_0x1fd26c)){if(_0x1fd26c['length']===0x0){console[_0x4fbfec(0x581)](_0xf7fd50+_0x3fa65c(_0x2d98e7['dim'],_0x4fbfec(0x1e1)));return;}if(_0x1fd26c[_0x4fbfec(0x585)](_0x90fb47=>_0x90fb47&&typeof _0x90fb47===_0x4fbfec(0x305)&&'key'in _0x90fb47&&_0x4fbfec(0x333)in _0x90fb47)){_0x402fc5(_0x1fd26c,_0xf7fd50);return;}if(_0x1fd26c[_0x4fbfec(0x585)](_0x5e4417=>_0x5e4417&&typeof _0x5e4417===_0x4fbfec(0x305)&&_0x4fbfec(0x2cb)in _0x5e4417&&_0x4fbfec(0x60d)in _0x5e4417)){_0x3736ef(_0x1fd26c,_0xf7fd50);return;}if(_0x1fd26c[_0x4fbfec(0x585)](_0x1b70c4=>typeof _0x1b70c4!==_0x4fbfec(0x305)||_0x1b70c4===null)){_0x1fd26c['forEach']((_0x5921ca,_0x13343f)=>console[_0x4fbfec(0x581)](_0xf7fd50+_0x3fa65c(_0x2d98e7[_0x4fbfec(0x26c)],_0x13343f+0x1+'.')+'\x20'+_0x3fa65c(_0x2d98e7[_0x4fbfec(0x39a)],String(_0x5921ca))));return;}_0x1fd26c[_0x4fbfec(0x5ce)]((_0x482d7f,_0x1a9765)=>{const _0x328d04=_0x4fbfec;console[_0x328d04(0x581)](_0xf7fd50+_0x3fa65c(_0x2d98e7[_0x328d04(0x4eb)],'['+_0x1a9765+']'));if(typeof _0x482d7f===_0x328d04(0x305)&&_0x482d7f!==null)_0x346080(_0x482d7f,_0xf7fd50+'\x20\x20');else console[_0x328d04(0x581)](_0xf7fd50+'\x20\x20'+String(_0x482d7f));});return;}if(typeof _0x1fd26c===_0x4fbfec(0x305)){if('key'in _0x1fd26c&&'value'in _0x1fd26c&&Object[_0x4fbfec(0x222)](_0x1fd26c)['length']<=0x3){console['log'](_0xf7fd50+_0x3fa65c(_0x2d98e7[_0x4fbfec(0x35d)]+_0x2d98e7[_0x4fbfec(0x1d7)],String(_0x1fd26c[_0x4fbfec(0x1be)])));const _0x3029c1=_0x1fd26c[_0x4fbfec(0x333)];if(_0x3029c1&&typeof _0x3029c1==='object')_0x346080(_0x3029c1,_0xf7fd50);else console[_0x4fbfec(0x581)](_0xf7fd50+_0x3fa65c(_0x2d98e7['white'],String(_0x3029c1)));return;}_0x346080(_0x1fd26c,_0xf7fd50);return;}console[_0x4fbfec(0x581)](_0xf7fd50+_0x3fa65c(_0x2d98e7[_0x4fbfec(0x39a)],String(_0x1fd26c)));}function _0x346080(_0x297497,_0x3f5d63=''){const _0x2f9af0=_0x56862e,_0x50c1fc=Object['entries'](_0x297497);if(_0x50c1fc['length']===0x0){console[_0x2f9af0(0x581)](_0x3f5d63+_0x3fa65c(_0x2d98e7[_0x2f9af0(0x4eb)],'{}'));return;}const _0x2a0041=Math['min'](0x1c,Math[_0x2f9af0(0x3c6)](..._0x50c1fc['map'](([_0x435cf8])=>_0x435cf8[_0x2f9af0(0x548)])));for(const [_0x1596e0,_0x11599f]of _0x50c1fc){const _0x4e4180=_0x3fa65c(_0x2d98e7[_0x2f9af0(0x1d7)],_0x1596e0[_0x2f9af0(0x453)](_0x2a0041));if(_0x11599f===null||_0x11599f===undefined)console[_0x2f9af0(0x581)](_0x3f5d63+_0x4e4180+'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x2f9af0(0x4eb)],_0x2f9af0(0x4ba)));else{if(typeof _0x11599f===_0x2f9af0(0x305)){const _0xb1b2df=JSON['stringify'](_0x11599f);_0xb1b2df['length']<=0x50?console[_0x2f9af0(0x581)](_0x3f5d63+_0x4e4180+'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x2f9af0(0x4eb)],_0xb1b2df)):(console[_0x2f9af0(0x581)](_0x3f5d63+_0x4e4180),_0x2c3623(_0x11599f,_0x3f5d63+'\x20\x20'));}else{const _0xcbbbf6=typeof _0x11599f===_0x2f9af0(0x218)?_0x3fa65c(_0x11599f?_0x2d98e7[_0x2f9af0(0x48c)]:_0x2d98e7[_0x2f9af0(0x19b)],String(_0x11599f)):typeof _0x11599f==='number'?_0x3fa65c(_0x2d98e7['magenta'],String(_0x11599f)):_0x3fa65c(_0x2d98e7[_0x2f9af0(0x39a)],String(_0x11599f));console[_0x2f9af0(0x581)](_0x3f5d63+_0x4e4180+'\x20\x20'+_0xcbbbf6);}}}}function _0x402fc5(_0xc1fab4,_0x398976=''){const _0x1d520d=_0x56862e,_0x388c79=Math[_0x1d520d(0x243)](0x20,Math['max'](..._0xc1fab4[_0x1d520d(0x2c1)](_0x5433f0=>String(_0x5433f0['key'])[_0x1d520d(0x548)])));for(const {key:_0x5edb00,value:_0x3eae27,score:_0x44f609,clock:_0x1cf8d5}of _0xc1fab4){const _0x4f6cb5=_0x3fa65c(_0x2d98e7[_0x1d520d(0x35d)]+_0x2d98e7[_0x1d520d(0x1d7)],String(_0x5edb00)[_0x1d520d(0x453)](_0x388c79)),_0x45d099=_0x3eae27==null?_0x3fa65c(_0x2d98e7[_0x1d520d(0x4eb)],_0x1d520d(0x4ba)):typeof _0x3eae27===_0x1d520d(0x305)?_0x3fa65c(_0x2d98e7[_0x1d520d(0x4eb)],JSON['stringify'](_0x3eae27)):_0x3fa65c(_0x2d98e7['white'],String(_0x3eae27)),_0x8399d0=_0x44f609!=null?_0x3fa65c(_0x2d98e7['gray'],_0x1d520d(0x5bf)+_0x44f609[_0x1d520d(0x310)](0x4)):'',_0x39d34e=_0x1cf8d5!=null?_0x3fa65c(_0x2d98e7[_0x1d520d(0x26c)],_0x1d520d(0x2d4)+_0x1cf8d5):'';console[_0x1d520d(0x581)](_0x398976+_0x4f6cb5+'\x20\x20'+_0x45d099+_0x8399d0+_0x39d34e);}}function _0x3736ef(_0x1db5d1,_0x5d8928=''){const _0x4e47b7=_0x56862e,_0x4ea743=Math[_0x4e47b7(0x243)](0x20,Math[_0x4e47b7(0x3c6)](..._0x1db5d1[_0x4e47b7(0x2c1)](_0x16f6d3=>_0x16f6d3[_0x4e47b7(0x2cb)][_0x4e47b7(0x548)])));for(const {type:_0x118168,count:_0x2452b2,fields:_0x4a2dce}of _0x1db5d1){if(_0x118168['startsWith']('~'))continue;const _0x15e3d5=_0x3fa65c(_0x2d98e7['bold']+_0x2d98e7[_0x4e47b7(0x1d7)],_0x118168[_0x4e47b7(0x453)](_0x4ea743)),_0x4c2e69=_0x3fa65c(_0x2d98e7[_0x4e47b7(0x64f)],String(_0x2452b2)[_0x4e47b7(0x223)](0x6))+_0x3fa65c(_0x2d98e7[_0x4e47b7(0x4eb)],_0x4e47b7(0x239)),_0x5519b2=_0x4a2dce&&Object[_0x4e47b7(0x222)](_0x4a2dce)[_0x4e47b7(0x548)]?_0x3fa65c(_0x2d98e7[_0x4e47b7(0x4eb)],_0x4e47b7(0x2e8)+Object['keys'](_0x4a2dce)[_0x4e47b7(0x30b)](0x0,0x6)[_0x4e47b7(0x482)](',\x20')+(Object[_0x4e47b7(0x222)](_0x4a2dce)[_0x4e47b7(0x548)]>0x6?'…':'')):'';console[_0x4e47b7(0x581)](_0x5d8928+_0x15e3d5+'\x20\x20'+_0x4c2e69+_0x5519b2);}}const _0x58630d=[_0x56862e(0x1ea),_0x56862e(0x1b4),_0x56862e(0x3ff),_0x56862e(0x1a0),'transaction',_0x56862e(0x5d5)];function _0x462c8e(_0x4fff72,_0x413cfa){const _0x581a55=_0x56862e;if(_0x4fff72[_0x581a55(0x52f)]('/api/'))return _0x4fff72;if(_0x4fff72['startsWith']('/'))return _0x581a55(0x1e8)+_0x4fff72;if(_0x4fff72[_0x581a55(0x52f)](_0x581a55(0x4f6)))return _0x581a55(0x378)+_0x4fff72;const _0x44ac5a=_0x58630d[_0x581a55(0x292)](_0xe51a13=>_0x4fff72===_0xe51a13[_0x581a55(0x53d)](/\/$/,'')||_0x4fff72['startsWith'](_0xe51a13));return _0x44ac5a?_0x581a55(0x2ec)+_0x413cfa+'/'+_0x4fff72:_0x581a55(0x378)+_0x4fff72;}function _0x4f1d95(_0x1a993d){const _0x1a9559=_0x56862e,_0x3d49f7={},_0x4e7b3a=[];let _0x2dae46=0x0;while(_0x2dae46<_0x1a993d[_0x1a9559(0x548)]){if((_0x1a993d[_0x2dae46]==='--env'||_0x1a993d[_0x2dae46]==='-e')&&_0x1a993d[_0x2dae46+0x1]&&!_0x1a993d[_0x2dae46+0x1][_0x1a9559(0x52f)]('-'))_0x3d49f7[_0x1a9559(0x408)]=_0x1a993d[++_0x2dae46];else _0x1a993d[_0x2dae46]===_0x1a9559(0x48b)||_0x1a993d[_0x2dae46]==='-h'?_0x3d49f7[_0x1a9559(0x2af)]=!![]:_0x4e7b3a[_0x1a9559(0x26a)](_0x1a993d[_0x2dae46]);_0x2dae46++;}return{'flags':_0x3d49f7,'rest':_0x4e7b3a};}const _0x30655c={'system':_0x56862e(0x5c3),'envs':'Environments','types':_0x56862e(0x3ca),'data':_0x56862e(0x578),'indexes':'Indexes','fts':_0x56862e(0x61f),'sync':_0x56862e(0x650),'queue':_0x56862e(0x1aa),'files':_0x56862e(0x3ac),'embeddings':_0x56862e(0x4d3),'engines':_0x56862e(0x3e2),'admin':_0x56862e(0x5ff),'event':_0x56862e(0x19c),'processor':_0x56862e(0x44b)},_0x1373ce=[_0x56862e(0x5e0),_0x56862e(0x444),_0x56862e(0x1ea),_0x56862e(0x491),'indexes',_0x56862e(0x5c9),_0x56862e(0x5a3),_0x56862e(0x4ee),_0x56862e(0x3a6),_0x56862e(0x5f5),_0x56862e(0x5f1),_0x56862e(0x405)];function _0x11a37e(_0x22a8e1){const _0x316118=_0x56862e;return _0x22a8e1[_0x316118(0x53d)](/^\/api/,'')[_0x316118(0x53d)](/^\[\/env\/:env=[^\]]*\]/,_0x316118(0x244))[_0x316118(0x53d)](/^\/env\/:env/,'env/:env')[_0x316118(0x53d)](/^\//,'');}function _0x5d4b7e(_0x1035a0,_0x4f933c=''){const _0x628d76=_0x56862e,_0x1605bf=_0x1035a0['http'][_0x628d76(0x601)]()[_0x628d76(0x1d8)](_0x522017=>!_0x522017[_0x628d76(0x5d6)]?.[_0x628d76(0x233)]),_0x51cf28=_0x4f933c?_0x1605bf['filter'](_0x4be7c6=>_0x4be7c6[_0x628d76(0x307)][_0x628d76(0x216)]()['includes'](_0x4f933c[_0x628d76(0x216)]())||(_0x2b3a6f(_0x4be7c6)??'')['toLowerCase']()[_0x628d76(0x481)](_0x4f933c['toLowerCase']())||_0x3e9da9(_0x4be7c6)[_0x628d76(0x292)](_0x4bfa4b=>_0x4bfa4b['toLowerCase']()[_0x628d76(0x481)](_0x4f933c[_0x628d76(0x216)]()))):_0x1605bf;if(!_0x51cf28['length']){console[_0x628d76(0x581)](_0x3fa65c(_0x2d98e7['yellow'],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x4f933c+'\x22\x0a'));return;}const _0x4eb957=new Map();for(const _0x427558 of _0x51cf28){const _0x43737=_0x3e9da9(_0x427558)[0x0]??_0x628d76(0x588);if(!_0x4eb957['has'](_0x43737))_0x4eb957[_0x628d76(0x389)](_0x43737,[]);_0x4eb957[_0x628d76(0x61a)](_0x43737)[_0x628d76(0x26a)](_0x427558);}const _0x397c29=[..._0x1373ce['filter'](_0x4c525e=>_0x4eb957[_0x628d76(0x3e4)](_0x4c525e)),...[..._0x4eb957[_0x628d76(0x222)]()][_0x628d76(0x1d8)](_0x5353b0=>!_0x1373ce[_0x628d76(0x481)](_0x5353b0))];console[_0x628d76(0x581)]('');for(const _0xb711ce of _0x397c29){const _0x23472b=_0x4eb957['get'](_0xb711ce);if(!_0x23472b?.['length'])continue;console['log'](_0x3fa65c(_0x2d98e7['bold'],'\x20\x20'+(_0x30655c[_0xb711ce]??_0xb711ce)));for(const _0x4dcd8c of _0x23472b){const _0x4baefa=_0x3fa65c(_0x2d98e7[_0x628d76(0x64f)],_0x4dcd8c[_0x628d76(0x284)][_0x628d76(0x453)](0x7)),_0x2db6f9=_0x3fa65c(_0x2d98e7[_0x628d76(0x1d7)],_0x11a37e(_0x4dcd8c[_0x628d76(0x307)])),_0x3ea9f4=_0x2b3a6f(_0x4dcd8c)?_0x3fa65c(_0x2d98e7[_0x628d76(0x4eb)],'\x20\x20'+_0x2b3a6f(_0x4dcd8c)):'',_0x3272bc=_0x4dcd8c[_0x628d76(0x203)]?.['id']?_0x3fa65c(_0x2d98e7[_0x628d76(0x26c)],_0x628d76(0x583)+_0x4dcd8c[_0x628d76(0x203)]['id']+']'):'';console[_0x628d76(0x581)]('\x20\x20\x20\x20'+_0x4baefa+'\x20'+_0x2db6f9+_0x3ea9f4+_0x3272bc);}console['log']('');}}function _0x9b5c24(_0x2ae5e0,_0x4349fa){const _0x244e39=_0x56862e,_0x126fd2=_0x4349fa[_0x244e39(0x53d)](/^\/api(\/env\/[^/]+)?\//,'')[_0x244e39(0x32a)]('/')[0x0],_0xec987e=_0x2ae5e0[_0x244e39(0x468)]['listRoutes']()[_0x244e39(0x1d8)](_0x598636=>_0x598636['path']['toLowerCase']()[_0x244e39(0x481)](_0x126fd2[_0x244e39(0x216)]()));if(!_0xec987e[_0x244e39(0x548)]){console[_0x244e39(0x581)](_0x3fa65c(_0x2d98e7[_0x244e39(0x19b)],_0x244e39(0x3e3)+_0x4349fa+'\x0a'));return;}console[_0x244e39(0x581)]('');for(const _0x344d24 of _0xec987e['slice'](0x0,0xc)){for(const _0x378ce3 of _0x3879a8(_0x344d24)){console['log'](_0x378ce3);}console['log']('');}}function _0x2b3a6f(_0x764794){const _0x43b1e7=_0x56862e;return _0x764794[_0x43b1e7(0x203)]?.[_0x43b1e7(0x493)]??_0x764794[_0x43b1e7(0x5d6)]?.[_0x43b1e7(0x493)]??'';}function _0x1c952e(_0xbae97b){const _0x579921=_0x56862e;return _0xbae97b[_0x579921(0x203)]?.['description']??_0xbae97b[_0x579921(0x5d6)]?.['description']??'';}function _0x3e9da9(_0x22bd71){const _0xb37c00=_0x56862e;return _0x22bd71['operation']?.[_0xb37c00(0x42b)]?.[_0xb37c00(0x548)]?_0x22bd71[_0xb37c00(0x203)][_0xb37c00(0x42b)]:_0x22bd71[_0xb37c00(0x5d6)]?.[_0xb37c00(0x42b)]??[];}function _0x3879a8(_0xaac3fd){const _0x1094ff=_0x56862e,_0x2891df=[];_0x2891df[_0x1094ff(0x26a)]('\x20\x20'+_0x3fa65c(_0x2d98e7['bold']+_0x2d98e7[_0x1094ff(0x64f)],_0xaac3fd[_0x1094ff(0x284)][_0x1094ff(0x453)](0x7))+'\x20'+_0x3fa65c(_0x2d98e7[_0x1094ff(0x35d)]+_0x2d98e7['cyan'],_0xaac3fd['path']));_0xaac3fd[_0x1094ff(0x203)]?.['id']&&_0x2891df[_0x1094ff(0x26a)](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x26c)],_0x1094ff(0x2ea)+_0xaac3fd[_0x1094ff(0x203)]['id']));_0x2b3a6f(_0xaac3fd)&&_0x2891df[_0x1094ff(0x26a)](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x39a)],_0x2b3a6f(_0xaac3fd)));_0x1c952e(_0xaac3fd)&&_0x2891df[_0x1094ff(0x26a)](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x4eb)],_0x1c952e(_0xaac3fd)));_0x3e9da9(_0xaac3fd)[_0x1094ff(0x548)]&&_0x2891df[_0x1094ff(0x26a)](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x26c)],'tags:\x20'+_0x3e9da9(_0xaac3fd)['join'](',\x20')));_0xaac3fd['operation']?.['safety']?.[_0x1094ff(0x2bc)]&&_0x2891df[_0x1094ff(0x26a)](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x26c)],_0x1094ff(0x225)+_0xaac3fd['operation']['safety'][_0x1094ff(0x2bc)]));_0xaac3fd['operation']?.['http']?.[_0x1094ff(0x559)]&&_0xaac3fd[_0x1094ff(0x203)][_0x1094ff(0x468)][_0x1094ff(0x559)]!=='standard'&&_0x2891df[_0x1094ff(0x26a)](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x26c)],_0x1094ff(0x274)+_0xaac3fd[_0x1094ff(0x203)]['http'][_0x1094ff(0x559)]));if(_0xaac3fd['operation']?.['inputSchema']){const _0x594732=Object[_0x1094ff(0x222)](_0xaac3fd[_0x1094ff(0x203)][_0x1094ff(0x457)][_0x1094ff(0x232)]||{});if(_0x594732[_0x1094ff(0x548)])_0x2891df['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3fa65c(_0x2d98e7[_0x1094ff(0x26c)],_0x1094ff(0x2e9)+_0x594732['join'](',\x20')));}return _0xaac3fd[_0x1094ff(0x5d6)]?.[_0x1094ff(0x5a1)]&&_0x2891df['push'](_0x1094ff(0x1cb)+_0x3fa65c(_0x2d98e7[_0x1094ff(0x26c)],_0x1094ff(0x3d2)+JSON[_0x1094ff(0x42a)](_0xaac3fd[_0x1094ff(0x5d6)]['body']))),_0x2891df;}async function _0x1c8a42(_0x28984c,_0x3d46cd,_0x2cd1b1,_0x54bf88=null){const _0x4d2965=_0x56862e,_0x107e35=_0x2cd1b1['indexOf']('?'),_0x41b21c=_0x107e35>=0x0?_0x2cd1b1['slice'](0x0,_0x107e35):_0x2cd1b1,_0xf3f0b9=_0x107e35>=0x0?_0x2cd1b1[_0x4d2965(0x30b)](_0x107e35+0x1):'',_0xecf87c=Object[_0x4d2965(0x406)](new URLSearchParams(_0xf3f0b9)[_0x4d2965(0x57f)]());return _0x28984c[_0x4d2965(0x468)][_0x4d2965(0x4ce)](_0x3d46cd,_0x41b21c,{'body':_0x54bf88,'query':_0xecf87c,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x243fda(_0x54337c){const _0x34c4e9=_0x56862e;if(!_0x54337c)return null;const _0x10faf5=_0x54337c[_0x34c4e9(0x560)]();if(!_0x10faf5)return null;try{return JSON['parse'](_0x10faf5);}catch{}try{return JSON['parse'](_0x555740(_0x10faf5));}catch(_0x30b254){throw new SyntaxError(_0x30b254[_0x34c4e9(0x34d)],{'cause':_0x30b254});}}function _0x555740(_0x4c2620){const _0x31009d=_0x56862e;let _0x2ad234='',_0x2c4327=0x0;while(_0x2c4327<_0x4c2620[_0x31009d(0x548)]){const _0x2c3074=_0x4c2620[_0x2c4327];if(_0x2c3074==='\x22'){_0x2ad234+='\x22',_0x2c4327++;while(_0x2c4327<_0x4c2620[_0x31009d(0x548)]&&_0x4c2620[_0x2c4327]!=='\x22'){if(_0x4c2620[_0x2c4327]==='\x5c'){_0x2ad234+=_0x4c2620[_0x2c4327++];if(_0x2c4327<_0x4c2620['length'])_0x2ad234+=_0x4c2620[_0x2c4327++];}else _0x2ad234+=_0x4c2620[_0x2c4327++];}_0x2ad234+='\x22';if(_0x2c4327<_0x4c2620[_0x31009d(0x548)])_0x2c4327++;continue;}if(_0x2c3074==='\x27'){_0x2ad234+='\x22',_0x2c4327++;while(_0x2c4327<_0x4c2620[_0x31009d(0x548)]&&_0x4c2620[_0x2c4327]!=='\x27'){if(_0x4c2620[_0x2c4327]==='\x5c'&&_0x4c2620[_0x2c4327+0x1]==='\x27')_0x2ad234+='\x27',_0x2c4327+=0x2;else _0x4c2620[_0x2c4327]==='\x22'?(_0x2ad234+='\x5c\x22',_0x2c4327++):_0x2ad234+=_0x4c2620[_0x2c4327++];}_0x2ad234+='\x22';if(_0x2c4327<_0x4c2620['length'])_0x2c4327++;continue;}if(_0x31009d(0x40c)[_0x31009d(0x481)](_0x2c3074)){_0x2ad234+=_0x2c3074,_0x2c4327++;continue;}let _0x29c2f6='';while(_0x2c4327<_0x4c2620[_0x31009d(0x548)]&&!'{}[]:,\x27\x22'[_0x31009d(0x481)](_0x4c2620[_0x2c4327])&&_0x4c2620[_0x2c4327]!=='\x20'&&_0x4c2620[_0x2c4327]!=='\x09'&&_0x4c2620[_0x2c4327]!=='\x0a'&&_0x4c2620[_0x2c4327]!=='\x0d'){_0x29c2f6+=_0x4c2620[_0x2c4327++];}let _0xc4824e=_0x2c4327;while(_0xc4824e<_0x4c2620[_0x31009d(0x548)]&&(_0x4c2620[_0xc4824e]==='\x20'||_0x4c2620[_0xc4824e]==='\x09'))_0xc4824e++;if(_0x4c2620[_0xc4824e]===':')_0x2ad234+='\x22'+_0x29c2f6+'\x22';else _0x29c2f6==='true'||_0x29c2f6===_0x31009d(0x518)||_0x29c2f6==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x31009d(0x3d6)](_0x29c2f6)?_0x2ad234+=_0x29c2f6:_0x2ad234+='\x22'+_0x29c2f6+'\x22';}return _0x2ad234[_0x31009d(0x53d)](/,(\s*[}\]])/g,'$1');}function _0x248a59(_0x3e67b5){const _0x5b46e4=_0x56862e,_0x17a44e=[];let _0xdc1e5c=0x0;while(_0xdc1e5c<_0x3e67b5['length']){while(_0xdc1e5c<_0x3e67b5[_0x5b46e4(0x548)]&&(_0x3e67b5[_0xdc1e5c]==='\x20'||_0x3e67b5[_0xdc1e5c]==='\x09'))_0xdc1e5c++;if(_0xdc1e5c>=_0x3e67b5[_0x5b46e4(0x548)])break;const _0x25955d=_0x3e67b5[_0xdc1e5c];if(_0x25955d==='{'||_0x25955d==='['){const _0x42a9d2=_0x25955d==='{'?'}':']',_0x5c65c0=_0xdc1e5c++;let _0x578a6c=0x1,_0x238708=![],_0x374973='';while(_0xdc1e5c<_0x3e67b5['length']&&_0x578a6c>0x0){const _0x142b3f=_0x3e67b5[_0xdc1e5c];if(_0x238708){if(_0x142b3f==='\x5c')_0xdc1e5c++;else{if(_0x142b3f===_0x374973)_0x238708=![];}}else{if(_0x142b3f==='\x22'||_0x142b3f==='\x27')_0x238708=!![],_0x374973=_0x142b3f;else{if(_0x142b3f===_0x25955d)_0x578a6c++;else{if(_0x142b3f===_0x42a9d2)_0x578a6c--;}}}_0xdc1e5c++;}_0x17a44e[_0x5b46e4(0x26a)](_0x3e67b5[_0x5b46e4(0x30b)](_0x5c65c0,_0xdc1e5c));continue;}if(_0x25955d==='\x22'||_0x25955d==='\x27'){const _0x5909b0=_0x25955d;_0xdc1e5c++;let _0x5f15e6='';while(_0xdc1e5c<_0x3e67b5[_0x5b46e4(0x548)]&&_0x3e67b5[_0xdc1e5c]!==_0x5909b0){if(_0x3e67b5[_0xdc1e5c]==='\x5c'&&_0xdc1e5c+0x1<_0x3e67b5['length'])_0xdc1e5c++,_0x5f15e6+=_0x3e67b5[_0xdc1e5c++];else _0x5f15e6+=_0x3e67b5[_0xdc1e5c++];}if(_0xdc1e5c<_0x3e67b5['length'])_0xdc1e5c++;_0x17a44e[_0x5b46e4(0x26a)](_0x5f15e6);continue;}let _0x30b90d='';while(_0xdc1e5c<_0x3e67b5['length']&&_0x3e67b5[_0xdc1e5c]!=='\x20'&&_0x3e67b5[_0xdc1e5c]!=='\x09'&&_0x3e67b5[_0xdc1e5c]!=='{'&&_0x3e67b5[_0xdc1e5c]!=='['){_0x30b90d+=_0x3e67b5[_0xdc1e5c++];}if(_0x30b90d)_0x17a44e[_0x5b46e4(0x26a)](_0x30b90d);}return _0x17a44e;}function _0x4fc600(_0x4eebde,_0x41bc39){const _0x561bc8=_0x56862e,_0x5ed5b0=[..._0x4eebde[_0x561bc8(0x25b)][_0x561bc8(0x222)]()][_0x561bc8(0x1d8)](_0x30a6a9=>!_0x30a6a9[_0x561bc8(0x52f)]('~'));console[_0x561bc8(0x581)](['',_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)]+_0x2d98e7[_0x561bc8(0x1d7)],_0x561bc8(0x1cc)),_0x3fa65c(_0x2d98e7['bold']+_0x2d98e7[_0x561bc8(0x1d7)],_0x561bc8(0x452))+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x281))+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)]+_0x2d98e7['cyan'],'║'),_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)]+_0x2d98e7[_0x561bc8(0x1d7)],_0x561bc8(0x1e6)),'','\x20\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x48c)],'✓')+'\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],'server')+_0x561bc8(0x2d3)+_0x41bc39[_0x561bc8(0x53e)],..._0x41bc39['clusterWorkers']>0x1?['\x20\x20'+_0x3fa65c(_0x2d98e7['green'],'✓')+'\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x1f4))+'\x20'+_0x41bc39[_0x561bc8(0x2de)]+_0x561bc8(0x60a)+_0x3fa65c(_0x2d98e7[_0x561bc8(0x26c)],_0x561bc8(0x5dc))]:[],'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x48c)],'✓')+'\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x2c5))+'\x20\x20\x20\x20\x20http://localhost:'+_0x41bc39['port']+_0x561bc8(0x1e8),'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x48c)],'✓')+'\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x307))+_0x561bc8(0x602)+_0x41bc39[_0x561bc8(0x352)],'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x48c)],'✓')+'\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],'id')+_0x561bc8(0x2c8)+_0x3fa65c(_0x2d98e7[_0x561bc8(0x26c)],_0x4eebde['id']),'\x20\x20'+_0x3fa65c(_0x2d98e7['green'],'✓')+'\x20'+_0x3fa65c(_0x2d98e7['bold'],_0x561bc8(0x444))+_0x561bc8(0x602)+_0x5ed5b0[_0x561bc8(0x2c1)](_0x1e5d0e=>_0x3fa65c(_0x2d98e7[_0x561bc8(0x1d7)],_0x1e5d0e))[_0x561bc8(0x482)]('\x20\x20'),..._0x41bc39['noAdmin']?[]:['\x20\x20'+_0x3fa65c(_0x2d98e7['green'],'✓')+'\x20'+_0x3fa65c(_0x2d98e7['bold'],_0x561bc8(0x405))+'\x20\x20\x20http://localhost:'+_0x41bc39[_0x561bc8(0x53e)]+_0x561bc8(0x4d0)],'',_0x3fa65c(_0x2d98e7[_0x561bc8(0x4eb)],_0x561bc8(0x515)+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x2af))+_0x561bc8(0x335)+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x1ac))+'\x20to\x20browse\x20the\x20API,\x20'+_0x3fa65c(_0x2d98e7[_0x561bc8(0x35d)],_0x561bc8(0x350))+_0x561bc8(0x32c)),''][_0x561bc8(0x482)]('\x0a'));}function _0x520347(_0x57d58b){const _0x2edc89=_0x56862e;console[_0x2edc89(0x581)]('\x0a'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x35d)],'\x20\x20Path\x20access')+'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x4eb)],_0x2edc89(0x4d2))+_0x2edc89(0x317)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],_0x2edc89(0x33c))+_0x2edc89(0x29c)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],_0x2edc89(0x33c))+'\x20'+_0x3fa65c(_0x2d98e7['yellow'],_0x2edc89(0x46f))+_0x2edc89(0x2a6)+_0x3fa65c(_0x2d98e7['cyan'],'VERB')+'\x20'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],_0x2edc89(0x33c))+'\x20'+_0x3fa65c(_0x2d98e7['yellow'],'[body]')+_0x2edc89(0x36c)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x4eb)],_0x2edc89(0x28c))+_0x2edc89(0x5e3)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],_0x2edc89(0x420))+_0x2edc89(0x5fe)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],_0x2edc89(0x444))+_0x2edc89(0x5f2)+_0x3fa65c(_0x2d98e7['gray'],_0x2edc89(0x1ea))+_0x2edc89(0x3a1)+_0x57d58b[_0x2edc89(0x408)]+_0x2edc89(0x56a)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],'type/users')+_0x2edc89(0x206)+_0x57d58b['env']+'/type/users\x0a\x20\x20\x20\x20'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],'type/users/item/alice')+_0x2edc89(0x229)+_0x57d58b[_0x2edc89(0x408)]+_0x2edc89(0x4c2)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],_0x2edc89(0x268))+'\x20→\x20POST\x20/api/env/'+_0x57d58b[_0x2edc89(0x408)]+_0x2edc89(0x498)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],_0x2edc89(0x1f9))+'\x0a\x20\x20\x20\x20'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],_0x2edc89(0x245))+_0x2edc89(0x5e3)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],'env/staging/info')+_0x2edc89(0x1cf)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x35d)],'\x20\x20Flags')+'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x4eb)],_0x2edc89(0x309))+_0x2edc89(0x317)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],'--env\x20<name>')+_0x2edc89(0x1d6)+_0x3fa65c(_0x2d98e7['cyan'],_0x2edc89(0x48b))+_0x2edc89(0x1a4)+_0x3fa65c(_0x2d98e7['dim'],'Examples')+_0x2edc89(0x5e3)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x26c)],'types\x20--env\x20staging')+_0x2edc89(0x5e3)+_0x3fa65c(_0x2d98e7['gray'],'type/users/item/alice\x20--env\x20staging')+_0x2edc89(0x5e3)+_0x3fa65c(_0x2d98e7['gray'],_0x2edc89(0x213))+'\x0a\x0a'+_0x3fa65c(_0x2d98e7['bold'],_0x2edc89(0x4af))+_0x2edc89(0x317)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],_0x2edc89(0x285))+_0x2edc89(0x2cd)+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],_0x2edc89(0x408))+'\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'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],'routes')+'\x20'+_0x3fa65c(_0x2d98e7['dim'],_0x2edc89(0x577))+_0x2edc89(0x397)+_0x3fa65c(_0x2d98e7['cyan'],_0x2edc89(0x4c0))+'\x20'+_0x3fa65c(_0x2d98e7['dim'],_0x2edc89(0x486))+_0x2edc89(0x3d5)+_0x3fa65c(_0x2d98e7['cyan'],_0x2edc89(0x37b))+'\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'+_0x3fa65c(_0x2d98e7[_0x2edc89(0x1d7)],_0x2edc89(0x2af))+'\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'+_0x3fa65c(_0x2d98e7['cyan'],_0x2edc89(0x350))+'\x20'+_0x3fa65c(_0x2d98e7['dim'],_0x2edc89(0x620))+_0x2edc89(0x3af));}let _0x4bfb16=![];async function _0x418834(_0x214fb3,_0x5e163d=0x0,_0x2c6ce6=null){const _0x2319fa=_0x56862e;_0x4bfb16&&(process['stderr'][_0x2319fa(0x5b8)](_0x3fa65c(_0x2d98e7[_0x2319fa(0x642)],'\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a')),process[_0x2319fa(0x350)](0x82));_0x4bfb16=!![],process[_0x2319fa(0x2f8)][_0x2319fa(0x5b8)]('\x0a'),process[_0x2319fa(0x1eb)]['write'](_0x3fa65c(_0x2d98e7['yellow'],_0x2319fa(0x381)+(_0x2c6ce6?_0x2319fa(0x34f)+_0x2c6ce6+',\x20':'')+_0x2319fa(0x388)));const _0x26e6ef=setTimeout(()=>{const _0x4e6c89=_0x2319fa;process[_0x4e6c89(0x1eb)][_0x4e6c89(0x5b8)](_0x3fa65c(_0x2d98e7[_0x4e6c89(0x642)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process[_0x4e6c89(0x350)](0x1);},0x1388);try{await _0x214fb3[_0x2319fa(0x527)]();}catch(_0xf64a0){console['error'](_0x3fa65c(_0x2d98e7['red'],'\x20\x20'+_0xf64a0['message']));}clearTimeout(_0x26e6ef),process[_0x2319fa(0x1eb)]['write'](_0x3fa65c(_0x2d98e7[_0x2319fa(0x4eb)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process['exit'](_0x5e163d);}function _0x47acfb(_0xf7f3f3){const _0x9130ce=_0x56862e,_0x2f698c=_0xf7f3f3[_0x9130ce(0x408)]!==_0x9130ce(0x5fd)?_0x3fa65c(_0x2d98e7[_0x9130ce(0x19b)],'['+_0xf7f3f3[_0x9130ce(0x408)]+']'):'';return _0x3fa65c(_0x2d98e7[_0x9130ce(0x35d)]+_0x2d98e7['cyan'],'okdb')+_0x2f698c+_0x3fa65c(_0x2d98e7[_0x9130ce(0x26c)],'>\x20');}const _0x6ad927=new Set([_0x56862e(0x2ad),_0x56862e(0x644),_0x56862e(0x632),_0x56862e(0x466),'DELETE']);async function _0x217d5f(_0x2a70ce,_0x589310,_0x1e1f9f,_0x4247df,_0x5aaac6,_0x3a9b48){const _0x476056=_0x56862e;_0x2a70ce=_0x2a70ce['trim']();if(!_0x2a70ce||_0x2a70ce[_0x476056(0x52f)]('#'))return;const _0x126a4a=_0x248a59(_0x2a70ce),{flags:_0x17620e,rest:_0x17b797}=_0x4f1d95(_0x126a4a);if(!_0x17b797['length'])return;const _0x280ebc=_0x17b797[0x0],_0x51c2df=_0x280ebc[_0x476056(0x615)]();if(_0x51c2df===_0x476056(0x5d4)){if(_0x17b797[0x1])_0x9b5c24(_0x589310,_0x462c8e(_0x17b797[0x1],_0x17620e['env']??_0x5aaac6['env']));else _0x520347(_0x5aaac6);return;}if(_0x51c2df===_0x476056(0x545)){const _0x542744=_0x17b797[0x1];if(!_0x542744){console[_0x476056(0x581)](_0x3fa65c(_0x2d98e7[_0x476056(0x642)],_0x476056(0x603)));return;}try{_0x589310[_0x476056(0x408)](_0x542744),_0x5aaac6['env']=_0x542744,_0x3a9b48?.[_0x476056(0x431)](_0x47acfb(_0x5aaac6)),console[_0x476056(0x581)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x48c)],'✓')+_0x476056(0x1f5)+_0x3fa65c(_0x2d98e7[_0x476056(0x35d)]+_0x2d98e7[_0x476056(0x1d7)],_0x542744)+'\x0a');}catch{console[_0x476056(0x581)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x642)],'✗')+_0x476056(0x337)+_0x3fa65c(_0x2d98e7['bold'],_0x542744)+_0x476056(0x347)+_0x3fa65c(_0x2d98e7['dim'],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x51c2df==='ENV'){const _0x21120a=[..._0x589310[_0x476056(0x25b)][_0x476056(0x222)]()]['filter'](_0x3e40b8=>!_0x3e40b8[_0x476056(0x52f)]('~'));console[_0x476056(0x581)]('');for(const _0x1576cf of _0x21120a){const _0x5e3ba7=_0x1576cf===_0x5aaac6['env'];console['log']('\x20\x20'+(_0x5e3ba7?_0x3fa65c(_0x2d98e7['green'],'●'):_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],'○'))+'\x20\x20'+(_0x5e3ba7?_0x3fa65c(_0x2d98e7[_0x476056(0x35d)]+_0x2d98e7[_0x476056(0x1d7)],_0x1576cf):_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x1576cf)));}console[_0x476056(0x581)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x476056(0x2ff))+'\x20'+_0x3fa65c(_0x2d98e7[_0x476056(0x1d7)],_0x5aaac6[_0x476056(0x408)])),console[_0x476056(0x581)]('');return;}if(_0x51c2df===_0x476056(0x5d8)){const _0x2e57cf=[..._0x589310[_0x476056(0x25b)][_0x476056(0x28e)]()][_0x476056(0x1d8)](_0xf03bb5=>!_0xf03bb5[_0x476056(0x1ae)][_0x476056(0x52f)]('~'));console[_0x476056(0x581)]('');const _0x2c0fd2=Math['max'](..._0x2e57cf[_0x476056(0x2c1)](_0x3fdbc2=>_0x3fdbc2[_0x476056(0x1ae)][_0x476056(0x548)]));for(const _0x397b00 of _0x2e57cf){const _0x4e1fd5=_0x397b00['name']===_0x5aaac6['env'],_0x2ea652=_0x4e1fd5?_0x3fa65c(_0x2d98e7['green'],'●'):_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],'○'),_0x501ef8=_0x4e1fd5?_0x3fa65c(_0x2d98e7['bold']+_0x2d98e7[_0x476056(0x1d7)],_0x397b00[_0x476056(0x1ae)]['padEnd'](_0x2c0fd2)):_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x397b00[_0x476056(0x1ae)][_0x476056(0x453)](_0x2c0fd2)),_0x165926=[..._0x397b00[_0x476056(0x5db)]['keys']()][_0x476056(0x1d8)](_0x55865c=>!_0x55865c[_0x476056(0x52f)]('~')),_0x1efdc5=_0x165926['length']?_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x165926[_0x476056(0x30b)](0x0,0x5)['join'](',\x20')+(_0x165926[_0x476056(0x548)]>0x5?_0x476056(0x1c5)+(_0x165926['length']-0x5)+_0x476056(0x618):'')):_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x476056(0x22d));console[_0x476056(0x581)]('\x20\x20'+_0x2ea652+'\x20\x20'+_0x501ef8+'\x20\x20'+_0x1efdc5);}console[_0x476056(0x581)]('');return;}if(_0x51c2df===_0x476056(0x567)){const _0x29dc35=_0x17620e[_0x476056(0x408)]??_0x17b797[0x1]??_0x5aaac6[_0x476056(0x408)];try{const _0x4e7c84=_0x589310['env'](_0x29dc35),_0x4c2977=[..._0x4e7c84['typeSubDbs'][_0x476056(0x222)]()][_0x476056(0x1d8)](_0xaddcc4=>!_0xaddcc4[_0x476056(0x52f)]('~'))[_0x476056(0x484)]();console[_0x476056(0x581)]('\x0a\x20\x20'+_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x4c2977[_0x476056(0x548)]+'\x20type'+(_0x4c2977[_0x476056(0x548)]!==0x1?'s':'')+_0x476056(0x31e)+_0x29dc35));for(const _0x2a0fee of _0x4c2977){const _0x10f376=_0x4e7c84[_0x476056(0x5db)][_0x476056(0x61a)](_0x2a0fee),_0x5573b6=_0x10f376?.[_0x476056(0x491)]?.['getCount']?.()??0x0,_0x1f6bc5=_0x3fa65c(_0x2d98e7[_0x476056(0x35d)]+_0x2d98e7[_0x476056(0x1d7)],_0x2a0fee[_0x476056(0x453)](0x1c));console[_0x476056(0x581)](_0x476056(0x602)+_0x1f6bc5+'\x20\x20'+_0x3fa65c(_0x2d98e7[_0x476056(0x64f)],String(_0x5573b6)[_0x476056(0x223)](0x6))+'\x20'+_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x476056(0x382)));}console[_0x476056(0x581)]('');}catch(_0x1a2d96){console[_0x476056(0x196)](_0x3fa65c(_0x2d98e7['red'],'\x0a\x20\x20'+_0x1a2d96['message']+'\x0a'));}return;}if(_0x51c2df==='ROUTES'){_0x5d4b7e(_0x589310,_0x17b797[_0x476056(0x30b)](0x1)['join']('\x20'));return;}if(_0x51c2df===_0x476056(0x228)){const _0x5da754=(_0x17b797[0x1]??'')[_0x476056(0x216)]();if(!_0x5da754||_0x5da754==='on')_0x4247df[_0x476056(0x648)]=!![],_0x4247df['level']=_0x476056(0x420),console['log'](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x48c)],'✓')+_0x476056(0x44d)+_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x476056(0x507))+'\x0a');else{if(_0x5da754===_0x476056(0x3e8))_0x4247df[_0x476056(0x648)]=![],console[_0x476056(0x581)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x19b)],'○')+_0x476056(0x302));else _0x36ac0a[_0x5da754]!==undefined?(_0x4247df[_0x476056(0x648)]=!![],_0x4247df['level']=_0x5da754,console[_0x476056(0x581)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7['green'],'✓')+_0x476056(0x3f0)+_0x3fa65c(_0x2d98e7[_0x476056(0x35d)],_0x5da754)+'\x0a')):console[_0x476056(0x196)](_0x3fa65c(_0x2d98e7[_0x476056(0x642)],'\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]'));}return;}if(_0x51c2df===_0x476056(0x5b5)||_0x51c2df===_0x476056(0x520)){await _0x418834(_0x589310,0x0);return;}if(_0x51c2df==='OPEN'){const _0x373fc2=_0x476056(0x27a)+_0x1e1f9f[_0x476056(0x53e)]+_0x476056(0x4d0),_0x3598b9=process[_0x476056(0x522)]===_0x476056(0x1ff)?_0x476056(0x512)+_0x373fc2:process[_0x476056(0x522)]===_0x476056(0x2d0)?_0x476056(0x242)+_0x373fc2:_0x476056(0x34e)+_0x373fc2;require$$4[_0x476056(0x419)](_0x3598b9),console[_0x476056(0x581)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x48c)],'✓')+_0x476056(0x4fa)+_0x3fa65c(_0x2d98e7[_0x476056(0x1d7)],_0x373fc2)+'\x0a');return;}let _0x1eeb78,_0x3744e7,_0x41ed14;if(_0x6ad927[_0x476056(0x3e4)](_0x51c2df)){_0x1eeb78=_0x51c2df,_0x3744e7=_0x17b797[0x1],_0x41ed14=_0x17b797[_0x476056(0x30b)](0x2);if(!_0x3744e7){console['error'](_0x3fa65c(_0x2d98e7['red'],'\x20\x20Usage:\x20'+_0x280ebc+'\x20<path>\x20[json-body]'));return;}}else _0x1eeb78=null,_0x3744e7=_0x17b797[0x0],_0x41ed14=_0x17b797[_0x476056(0x30b)](0x1);const _0x3fe97e=_0x17620e['env']??_0x5aaac6[_0x476056(0x408)],_0x7a8f40=_0x462c8e(_0x3744e7,_0x3fe97e);if(_0x17620e[_0x476056(0x2af)]){_0x9b5c24(_0x589310,_0x7a8f40);return;}let _0x492cbb=null;if(_0x41ed14['length']){const _0x38be6c=_0x41ed14[_0x476056(0x482)]('\x20');try{_0x492cbb=_0x243fda(_0x38be6c);}catch(_0x17b876){console['error'](_0x3fa65c(_0x2d98e7[_0x476056(0x642)],_0x476056(0x5ea)+_0x38be6c+_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7[_0x476056(0x4eb)],_0x17b876[_0x476056(0x34d)])+'\x0a'));return;}}if(!_0x1eeb78)_0x1eeb78=_0x492cbb!==null?_0x476056(0x644):_0x476056(0x2ad);try{const _0x1cf4df=await _0x1c8a42(_0x589310,_0x1eeb78,_0x7a8f40,_0x492cbb);_0x372ef0(_0x1cf4df[_0x476056(0x1d5)],_0x1cf4df[_0x476056(0x5a1)]);}catch(_0x2bb0ee){console[_0x476056(0x196)](_0x476056(0x5bc)+_0x3fa65c(_0x2d98e7['red'],'✗')+'\x20'+_0x2bb0ee[_0x476056(0x34d)]+'\x0a');}}class _0x39aa92{constructor(){const _0x56de14=_0x56862e;this[_0x56de14(0x2d6)]=new Map(),this[_0x56de14(0x3d9)]=null,this[_0x56de14(0x58b)]=![];}}function _0x23a01c(_0x323fb8){const _0x265566=_0x56862e,_0x5780f3=new _0x39aa92();for(const _0x196cbf of _0x323fb8){if(_0x196cbf[_0x265566(0x5d6)]?.[_0x265566(0x233)])continue;const _0x3da5b3=_0x196cbf[_0x265566(0x307)]['replace'](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x265566(0x53d)](/^\//,'');if(!_0x3da5b3)continue;let _0x7a702f=_0x5780f3;for(const _0x39f6b9 of _0x3da5b3[_0x265566(0x32a)]('/')['filter'](Boolean)){if(_0x39f6b9[_0x265566(0x52f)](':')){const _0x349176=_0x39f6b9['slice'](0x1);if(!_0x7a702f['dynamic'])_0x7a702f['dynamic']={'param':_0x349176,'node':new _0x39aa92()};_0x7a702f=_0x7a702f[_0x265566(0x3d9)][_0x265566(0x276)];}else{if(!_0x7a702f[_0x265566(0x2d6)][_0x265566(0x3e4)](_0x39f6b9))_0x7a702f[_0x265566(0x2d6)][_0x265566(0x389)](_0x39f6b9,new _0x39aa92());_0x7a702f=_0x7a702f['children']['get'](_0x39f6b9);}}_0x7a702f[_0x265566(0x58b)]=!![];}return _0x5780f3;}const _0x24465f=new Map();function _0x188f39(_0x5f2674,_0x39c1b1,_0x24f2cc){const _0x4a2c16=_0x56862e,_0x2caf57=_0x24465f[_0x4a2c16(0x61a)](_0x5f2674);if(_0x2caf57&&_0x2caf57['exp']>Date[_0x4a2c16(0x600)]())return _0x2caf57[_0x4a2c16(0x4e9)];const _0x3cfae1=_0x24f2cc();return _0x24465f[_0x4a2c16(0x389)](_0x5f2674,{'val':_0x3cfae1,'exp':Date[_0x4a2c16(0x600)]()+_0x39c1b1}),_0x3cfae1;}function _0x2bf215(_0x1d9f45,_0x46a91b,_0x3346ae,_0x16b697){const _0x44fe48=_0x56862e,_0x5de447=_0x46a91b[_0x44fe48(0x408)]??_0x16b697[_0x44fe48(0x408)];switch(_0x1d9f45){case'env':return[..._0x3346ae[_0x44fe48(0x25b)][_0x44fe48(0x222)]()][_0x44fe48(0x1d8)](_0x31fcdd=>!_0x31fcdd[_0x44fe48(0x52f)]('~'));case _0x44fe48(0x2cb):return _0x188f39(_0x44fe48(0x208)+_0x5de447,0x7d0,()=>{const _0x1b0dbd=_0x44fe48;try{return[..._0x3346ae[_0x1b0dbd(0x408)](_0x5de447)['typeSubDbs']['keys']()][_0x1b0dbd(0x1d8)](_0x373ba5=>!_0x373ba5[_0x1b0dbd(0x52f)]('~'));}catch{return[];}});case'key':if(!_0x46a91b[_0x44fe48(0x2cb)])return[];return _0x188f39(_0x44fe48(0x590)+_0x5de447+':'+_0x46a91b[_0x44fe48(0x2cb)],0x5dc,()=>{const _0x102e2d=_0x44fe48;try{const _0x1c6841=_0x3346ae['env'](_0x5de447)[_0x102e2d(0x5db)][_0x102e2d(0x61a)](_0x46a91b[_0x102e2d(0x2cb)]);if(!_0x1c6841?.[_0x102e2d(0x491)])return[];const _0x447d96=[];for(const {key:_0x378513}of _0x1c6841['data'][_0x102e2d(0x3a2)]({'limit':0x32})){_0x447d96[_0x102e2d(0x26a)](String(_0x378513));if(_0x447d96[_0x102e2d(0x548)]>=0x32)break;}return _0x447d96;}catch{return[];}});case _0x44fe48(0x2e5):if(!_0x46a91b[_0x44fe48(0x2cb)])return[];return _0x188f39('idx:'+_0x5de447+':'+_0x46a91b[_0x44fe48(0x2cb)],0x7d0,()=>{const _0x39d5a7=_0x44fe48;try{const _0x52f317=_0x3346ae['env'](_0x5de447)[_0x39d5a7(0x5db)][_0x39d5a7(0x61a)](_0x46a91b[_0x39d5a7(0x2cb)]);return _0x52f317?[..._0x52f317[_0x39d5a7(0x338)]?.[_0x39d5a7(0x222)]()??[]]:[];}catch{return[];}});case _0x44fe48(0x2a5):if(!_0x46a91b[_0x44fe48(0x2cb)])return[];return _0x188f39(_0x44fe48(0x367)+_0x5de447+':'+_0x46a91b[_0x44fe48(0x2cb)],0x7d0,()=>{const _0x39be5f=_0x44fe48;try{return _0x3346ae[_0x39be5f(0x5c9)]?.[_0x39be5f(0x4bf)]?.(_0x46a91b[_0x39be5f(0x2cb)],_0x3346ae['env'](_0x5de447))?.['map'](_0x300487=>_0x300487[_0x39be5f(0x1ae)])??[];}catch{return[];}});default:return[];}}function _0x3deb8d(_0x41c8b7,_0x9c6500,_0x13aa4c,_0x3b9ad3){const _0x3d7b96=_0x56862e,_0x47bfcd=_0x41c8b7[_0x3d7b96(0x42d)]('/'),_0x5450ee=_0x41c8b7[_0x3d7b96(0x32a)]('/'),_0x280fc6=_0x47bfcd?_0x5450ee['slice'](0x0,-0x1):_0x5450ee[_0x3d7b96(0x30b)](0x0,-0x1),_0x53a155=_0x47bfcd?'':_0x5450ee[_0x5450ee[_0x3d7b96(0x548)]-0x1];let _0x3b4fd7=_0x9c6500;const _0x5007b1={};for(const _0x1faff7 of _0x280fc6){if(!_0x1faff7)continue;if(_0x3b4fd7[_0x3d7b96(0x2d6)][_0x3d7b96(0x3e4)](_0x1faff7))_0x3b4fd7=_0x3b4fd7[_0x3d7b96(0x2d6)][_0x3d7b96(0x61a)](_0x1faff7);else{if(_0x3b4fd7['dynamic'])_0x5007b1[_0x3b4fd7[_0x3d7b96(0x3d9)][_0x3d7b96(0x20b)]]=_0x1faff7,_0x3b4fd7=_0x3b4fd7[_0x3d7b96(0x3d9)][_0x3d7b96(0x276)];else return[];}}const _0x41908d=_0x280fc6[_0x3d7b96(0x1d8)](Boolean),_0x1c2849=_0x41908d[_0x3d7b96(0x548)]?_0x41908d[_0x3d7b96(0x482)]('/')+'/':'',_0x4a49c3=[];for(const [_0x11d0b8]of _0x3b4fd7[_0x3d7b96(0x2d6)]){if(_0x11d0b8[_0x3d7b96(0x52f)](_0x53a155))_0x4a49c3[_0x3d7b96(0x26a)](_0x1c2849+_0x11d0b8);}if(_0x3b4fd7[_0x3d7b96(0x3d9)])for(const _0x122d14 of _0x2bf215(_0x3b4fd7[_0x3d7b96(0x3d9)][_0x3d7b96(0x20b)],_0x5007b1,_0x13aa4c,_0x3b9ad3)){if(String(_0x122d14)[_0x3d7b96(0x52f)](_0x53a155))_0x4a49c3[_0x3d7b96(0x26a)](_0x1c2849+_0x122d14);}return _0x4a49c3[_0x3d7b96(0x30b)](0x0,0x64);}const _0x3a1f9b=[_0x56862e(0x2af),'use',_0x56862e(0x408),_0x56862e(0x444),_0x56862e(0x1ea),_0x56862e(0x1ac),'logs',_0x56862e(0x37b),_0x56862e(0x350),_0x56862e(0x3f1)];function _0x4a123c(_0x2d34a1,_0x4c0d8d,_0x4e97b1){return function _0x1d281f(_0x187810){const _0x3f5e48=_0x19c4;try{const _0x407638=_0x187810[_0x3f5e48(0x5b0)](/\s[{[]/),_0x341bc0=_0x407638>=0x0?_0x187810[_0x3f5e48(0x30b)](0x0,_0x407638):_0x187810,_0x18bedc=_0x341bc0[_0x3f5e48(0x38e)]();if(!_0x18bedc){const _0x1bf36c=[..._0x3a1f9b,...[..._0x2d34a1['children'][_0x3f5e48(0x222)]()]]['slice'](0x0,0x64);return[_0x1bf36c,''];}const _0x1121bb=_0x18bedc[_0x3f5e48(0x32a)](/\s+/),_0x5e1e40=_0x1121bb[0x0],_0xd8f535=_0x5e1e40[_0x3f5e48(0x615)]();if(_0x1121bb[_0x3f5e48(0x548)]===0x1){const _0x57c83a=_0x5e1e40[_0x3f5e48(0x216)](),_0x1804f3=_0x3a1f9b[_0x3f5e48(0x1d8)](_0x28bbff=>_0x28bbff[_0x3f5e48(0x52f)](_0x57c83a)),_0xf5b373=_0x3deb8d(_0x5e1e40,_0x2d34a1,_0x4c0d8d,_0x4e97b1),_0x46a76b=[...new Set([..._0x1804f3,..._0xf5b373])]['slice'](0x0,0x64);return[_0x46a76b,_0x5e1e40];}if(_0x6ad927[_0x3f5e48(0x3e4)](_0xd8f535)&&_0x1121bb[_0x3f5e48(0x548)]===0x2){const _0x233154=_0x1121bb[0x1],_0x221725=_0x3deb8d(_0x233154,_0x2d34a1,_0x4c0d8d,_0x4e97b1);return[_0x221725[_0x3f5e48(0x2c1)](_0x1218b4=>_0x5e1e40+'\x20'+_0x1218b4),_0x5e1e40+'\x20'+_0x233154];}if(!_0x6ad927[_0x3f5e48(0x3e4)](_0xd8f535)&&_0x1121bb[_0x3f5e48(0x548)]>0x1){const _0x36fb99=_0x3deb8d(_0x5e1e40,_0x2d34a1,_0x4c0d8d,_0x4e97b1),_0x1e7449='\x20'+_0x1121bb[_0x3f5e48(0x30b)](0x1)[_0x3f5e48(0x482)]('\x20');return[_0x36fb99[_0x3f5e48(0x2c1)](_0x539904=>_0x539904+_0x1e7449),_0x5e1e40+_0x1e7449];}return[[],_0x187810];}catch{return[[],_0x187810];}};}async function _0x1a5dc5(_0x2806de,_0x4c3646){const _0x24cd3e=_0x56862e,_0x57bc17={'enabled':!![],'level':_0x4c3646['logLevel']??_0x24cd3e(0x420)},_0x3df276={'env':_0x24cd3e(0x5fd)},_0x101ef1={'current':null},_0x1b0dac=_0x23a01c(_0x2806de[_0x24cd3e(0x468)][_0x24cd3e(0x601)]()),_0x216589=_0x4a123c(_0x1b0dac,_0x2806de,_0x3df276);_0x2806de[_0x24cd3e(0x581)]['attach'](_0xd568c=>{const _0x78416e=_0x24cd3e;if(!_0x57bc17['enabled'])return;_0x1b7c91(_0xd568c,_0x57bc17[_0x78416e(0x5c7)]),_0x101ef1[_0x78416e(0x427)]?.[_0x78416e(0x49b)](!![]);}),_0x4fc600(_0x2806de,_0x4c3646);const _0x2e1b9f=_0x39480a[_0x24cd3e(0x21a)]({'input':process['stdin'],'output':process[_0x24cd3e(0x2f8)],'terminal':!![],'completer':_0x216589,'prompt':_0x47acfb(_0x3df276),'historySize':_0x20c09c});try{const _0x3c3e62=_0x2d9e6f['readFileSync'](_0x2e5ace,_0x24cd3e(0x2a0))[_0x24cd3e(0x32a)]('\x0a')[_0x24cd3e(0x1d8)](Boolean);_0x2e1b9f[_0x24cd3e(0x30f)]=_0x3c3e62[_0x24cd3e(0x3de)]()[_0x24cd3e(0x30b)](0x0,_0x20c09c);}catch{}_0x101ef1[_0x24cd3e(0x427)]=_0x2e1b9f,_0x2e1b9f['on'](_0x24cd3e(0x589),async _0x472199=>{const _0x1f98df=_0x24cd3e;_0x2e1b9f[_0x1f98df(0x385)]();try{await _0x217d5f(_0x472199,_0x2806de,_0x4c3646,_0x57bc17,_0x3df276,_0x2e1b9f);}catch(_0x5b9e0d){console[_0x1f98df(0x196)](_0x3fa65c(_0x2d98e7[_0x1f98df(0x642)],_0x1f98df(0x63d)+_0x5b9e0d[_0x1f98df(0x34d)]));}finally{_0x2e1b9f[_0x1f98df(0x2fd)](),_0x2e1b9f[_0x1f98df(0x49b)]();}}),_0x2e1b9f['on'](_0x24cd3e(0x527),()=>{const _0x319ce8=_0x24cd3e;try{const _0x4ebe2d=[..._0x2e1b9f[_0x319ce8(0x30f)]]['reverse']()[_0x319ce8(0x1d8)](Boolean)[_0x319ce8(0x30b)](0x0,_0x20c09c);_0x2d9e6f[_0x319ce8(0x3b9)](_0x2e5ace,_0x4ebe2d[_0x319ce8(0x482)]('\x0a')+'\x0a');}catch{}_0x418834(_0x2806de,0x0);});let _0x25da5a=0x0;return process['on'](_0x24cd3e(0x2d1),()=>{const _0x319d42=_0x24cd3e;if(_0x4bfb16)return _0x418834(_0x2806de,0x82,_0x319d42(0x2d1));if(_0x2e1b9f[_0x319d42(0x589)]==='')return _0x418834(_0x2806de,0x0,'SIGINT');const _0x1a91b2=Date[_0x319d42(0x600)]();if(_0x1a91b2-_0x25da5a<0x5dc)return _0x418834(_0x2806de,0x0,_0x319d42(0x31f));_0x25da5a=_0x1a91b2,process[_0x319d42(0x2f8)][_0x319d42(0x5b8)]('\x0a'),_0x2e1b9f['clearLine'](0x0),_0x2e1b9f[_0x319d42(0x49b)](),process[_0x319d42(0x1eb)][_0x319d42(0x5b8)](_0x3fa65c(_0x2d98e7['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on']('SIGTERM',()=>_0x418834(_0x2806de,0x0,'SIGTERM')),process['on'](_0x24cd3e(0x1bc),()=>_0x418834(_0x2806de,0x0,_0x24cd3e(0x1bc))),_0x2e1b9f[_0x24cd3e(0x49b)](),_0x2e1b9f;}return okdbShell={'start':_0x1a5dc5,'colorLog':_0x1b7c91,'lenientParse':_0x243fda,'_splitLine':_0x248a59,'_formatRouteHelpLines':_0x3879a8,'_routeSummary':_0x2b3a6f,'_routeTags':_0x3e9da9},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0xcda253=_0x2e4d80;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x34f306,performance:_0x1dc745}=require$$0$4,_0x38e67a=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0xcda253(0x50d),_0x5f5420=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5544f6=process.env.OKDB_LOOP_LAG_ALL==='1',_0x575bdf=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5989c3{constructor(){const _0x51964d=_0xcda253;this[_0x51964d(0x648)]=_0x38e67a,this['_buckets']=new Map(),this['_h']=null,this[_0x51964d(0x4e2)]=null,this[_0x51964d(0x4fc)]=![],this['_log']=(_0x589d49,_0x4103c6)=>process[_0x51964d(0x1eb)][_0x51964d(0x5b8)](_0x589d49+(_0x4103c6?'\x20'+JSON[_0x51964d(0x42a)](_0x4103c6):'')+'\x0a');}['now'](){const _0x4965a8=_0xcda253;return _0x1dc745[_0x4965a8(0x600)]();}[_0xcda253(0x5cc)](_0xa0d70a){const _0x2dbf84=_0xcda253;if(typeof _0xa0d70a===_0x2dbf84(0x4a0))this[_0x2dbf84(0x1fe)]=_0xa0d70a;}[_0xcda253(0x37f)](_0x183ba1,_0x1b12fe,_0x684e94){const _0x4b972e=_0xcda253;if(!this['enabled'])return;let _0x5cc0ea=this[_0x4b972e(0x612)][_0x4b972e(0x61a)](_0x183ba1);!_0x5cc0ea&&(_0x5cc0ea={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x4b972e(0x389)](_0x183ba1,_0x5cc0ea)),_0x5cc0ea['ms']+=_0x1b12fe,_0x5cc0ea[_0x4b972e(0x60d)]+=0x1,_0x1b12fe>_0x5cc0ea[_0x4b972e(0x65a)]&&(_0x5cc0ea[_0x4b972e(0x65a)]=_0x1b12fe,_0x5cc0ea[_0x4b972e(0x46b)]=_0x684e94||'');}[_0xcda253(0x22c)](_0x47101f){const _0x5238dd=_0xcda253;if(!this[_0x5238dd(0x648)]||this[_0x5238dd(0x4fc)])return;this[_0x5238dd(0x4fc)]=!![];if(_0x47101f)this['_log']=_0x47101f;this['_h']=_0x34f306({'resolution':0xa}),this['_h'][_0x5238dd(0x3a7)](),this['_timer']=setInterval(()=>this[_0x5238dd(0x65c)](),_0x5f5420);if(this[_0x5238dd(0x4e2)][_0x5238dd(0x2f9)])this['_timer'][_0x5238dd(0x2f9)]();}[_0xcda253(0x375)](_0x2954a0){const _0x1adc4f=_0xcda253;if(!this['_windowCbs'])this[_0x1adc4f(0x393)]=new Set();this['_windowCbs']['add'](_0x2954a0);if(!this[_0x1adc4f(0x4fc)])this[_0x1adc4f(0x3ee)]();}[_0xcda253(0x371)](_0x201007){const _0x281901=_0xcda253;this['_windowCbs']?.[_0x281901(0x48d)](_0x201007);}[_0xcda253(0x3ee)](){const _0x6a2e14=_0xcda253;if(this[_0x6a2e14(0x2dd)])return;this[_0x6a2e14(0x2dd)]=!![];!this['_h']&&(this['_h']=_0x34f306({'resolution':0xa}),this['_h'][_0x6a2e14(0x3a7)]());const _0x6c2942=_0x5f5420;this[_0x6a2e14(0x534)]=setInterval(()=>{const _0x1d6469=_0x6a2e14,_0x1a5ccb=this['_h'];if(!_0x1a5ccb)return;const _0x228366=_0x1a5ccb['percentile'](0x63)/0xf4240,_0x132824=_0x1a5ccb[_0x1d6469(0x3c6)]/0xf4240,_0x1b8602=_0x1a5ccb[_0x1d6469(0x42e)]/0xf4240;_0x1a5ccb[_0x1d6469(0x293)]();if(this[_0x1d6469(0x393)])for(const _0x531633 of this[_0x1d6469(0x393)]){try{_0x531633({'p99Ms':_0x228366,'maxMs':_0x132824,'meanMs':_0x1b8602,'reportMs':_0x6c2942});}catch{}}},_0x6c2942);if(this[_0x6a2e14(0x534)][_0x6a2e14(0x2f9)])this[_0x6a2e14(0x534)][_0x6a2e14(0x2f9)]();}[_0xcda253(0x65c)](){const _0x13f25b=_0xcda253,_0x37171c=this['_h'],_0x2608a0=_0x37171c[_0x13f25b(0x3c6)]/0xf4240,_0x5eda90=_0x37171c['percentile'](0x63)/0xf4240,_0x1ba59e=_0x37171c[_0x13f25b(0x42e)]/0xf4240;_0x37171c['reset']();const _0x57f2f9=[...this[_0x13f25b(0x612)][_0x13f25b(0x57f)]()][_0x13f25b(0x2c1)](([_0x152a67,_0x4f137d])=>({'label':_0x152a67,..._0x4f137d}))[_0x13f25b(0x484)]((_0x8b99ae,_0x5da7ed)=>_0x5da7ed['ms']-_0x8b99ae['ms'])[_0x13f25b(0x30b)](0x0,0x8);this['_buckets'][_0x13f25b(0x1dc)]();const _0x156501=_0x57f2f9[_0x13f25b(0x5b6)]((_0x14b1e5,_0x43bbc6)=>_0x14b1e5+_0x43bbc6['ms'],0x0),_0xc5b36b=_0x57f2f9[_0x13f25b(0x2c1)](_0x19a1e5=>_0x19a1e5['label']+'='+_0x19a1e5['ms'][_0x13f25b(0x310)](0x0)+_0x13f25b(0x1fd)+_0x19a1e5[_0x13f25b(0x60d)]+(_0x19a1e5[_0x13f25b(0x65a)]>0x5?_0x13f25b(0x4e3)+_0x19a1e5[_0x13f25b(0x65a)][_0x13f25b(0x310)](0x0)+'ms'+(_0x19a1e5['maxExtra']?'\x20'+_0x19a1e5[_0x13f25b(0x46b)]:'')+')':''));(_0x5544f6||_0x2608a0>=_0x575bdf)&&this[_0x13f25b(0x1fe)](_0x13f25b(0x304)+_0x5f5420+'ms\x20max='+_0x2608a0[_0x13f25b(0x310)](0x0)+_0x13f25b(0x51b)+_0x5eda90[_0x13f25b(0x310)](0x0)+'ms\x20mean='+_0x1ba59e['toFixed'](0x0)+_0x13f25b(0x2a8)+_0x156501['toFixed'](0x0)+'ms'+(_0xc5b36b[_0x13f25b(0x548)]?_0x13f25b(0x270)+_0xc5b36b[_0x13f25b(0x482)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x13f25b(0x393)])for(const _0x3c39d3 of this[_0x13f25b(0x393)]){try{_0x3c39d3({'p99Ms':_0x5eda90,'maxMs':_0x2608a0,'meanMs':_0x1ba59e,'reportMs':_0x5f5420});}catch{}}}['stop'](){const _0x2dbad9=_0xcda253;if(this[_0x2dbad9(0x4e2)])clearInterval(this[_0x2dbad9(0x4e2)]);if(this['_h'])this['_h'][_0x2dbad9(0x23a)]();this[_0x2dbad9(0x4e2)]=null,this['_h']=null,this[_0x2dbad9(0x4fc)]=![];}}const _0x2dfe5c=new _0x5989c3();if(_0x2dfe5c[_0xcda253(0x648)])_0x2dfe5c[_0xcda253(0x22c)]();return okdbLoopMonitor={'LOOP':_0x2dfe5c},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x54a00a=require$$1$1,_0x16c417=require$$1;let _0x5b1983,_0x490556,_0x4c3a10,_0x37ea5e,_0x17a3a4,_0x420041,_0x3d7e08,_0x4cf9cf=![];const _0x398f03=new Set();let _0x5f0c18=null;const _0x44bb32=new Map();function _0x2315d6(){const _0x223a85=_0x19c4;if(_0x5b1983!==undefined)return _0x5b1983;_0x5b1983=process.env.OKDB_DIAG==='1';if(!_0x5b1983)return![];_0x490556=process.env.OKDB_DIAG_STACK==='1',_0x37ea5e=Math[_0x223a85(0x3c6)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x4c3a10=new Array(_0x37ea5e),_0x17a3a4=0x0,_0x420041=0x0,_0x3d7e08=process.env.OKDB_DIAG_DIR||null;if(_0x3d7e08)try{_0x54a00a[_0x223a85(0x303)](_0x3d7e08,{'recursive':!![]});}catch{}return!![];}function _0x4108a2(){return _0x5b1983===undefined?_0x2315d6():_0x5b1983;}function _0x5d7498(_0x16747,_0x129606){const _0x1dc762=_0x19c4;if(_0x5b1983===undefined?!_0x2315d6():!_0x5b1983)return;let _0x4a7918;if(_0x490556){const _0x2bd870=new Error()[_0x1dc762(0x25c)]||'';_0x4a7918=_0x2bd870[_0x1dc762(0x32a)]('\x0a')[_0x1dc762(0x30b)](0x3)[_0x1dc762(0x2c1)](_0x51c739=>_0x51c739[_0x1dc762(0x560)]())[_0x1dc762(0x1d8)](Boolean)['slice'](0x0,0x8);}_0x4c3a10[_0x17a3a4]={'seq':_0x420041++,'t':Date[_0x1dc762(0x600)](),'env':_0x16747,'kind':_0x129606||_0x1dc762(0x499),'stack':_0x4a7918},_0x17a3a4=(_0x17a3a4+0x1)%_0x37ea5e;}function _0x17e3e8(_0x3bc96d){const _0x11976d=_0x19c4,_0x1a81b3=[];for(let _0x7c84ab=0x0;_0x7c84ab<_0x37ea5e;_0x7c84ab++){const _0x40ea90=_0x4c3a10[(_0x17a3a4-0x1-_0x7c84ab+_0x37ea5e*0x2)%_0x37ea5e];if(!_0x40ea90)continue;_0x1a81b3[_0x11976d(0x26a)](_0x40ea90);if(_0x1a81b3[_0x11976d(0x548)]>=_0x3bc96d)break;}return _0x1a81b3;}function _0x357a3f(_0x3d6b74){const _0x1310d6=_0x19c4;try{process[_0x1310d6(0x1eb)][_0x1310d6(0x5b8)](_0x3d6b74+'\x0a');}catch{}if(_0x3d7e08)try{_0x54a00a['appendFileSync'](_0x16c417[_0x1310d6(0x482)](_0x3d7e08,_0x1310d6(0x2ab)+process[_0x1310d6(0x4cb)]+_0x1310d6(0x4b2)),_0x3d6b74+'\x0a');}catch{}}function _0x2129b7(_0x5cbb08){const _0x66d1b4=_0x19c4,_0x49c2b1=_0x17e3e8(_0x5cbb08);if(!_0x49c2b1[_0x66d1b4(0x548)])return _0x66d1b4(0x412);const _0x38cf4e=Date['now']();return _0x49c2b1[_0x66d1b4(0x2c1)](_0x2ef878=>{const _0x3aed64=_0x66d1b4,_0xb34f64=_0x3aed64(0x64d)+_0x2ef878['seq']+'\x20-'+(_0x38cf4e-_0x2ef878['t'])+_0x3aed64(0x58a)+_0x2ef878[_0x3aed64(0x408)]+'\x20'+_0x2ef878[_0x3aed64(0x2e2)];return _0x2ef878[_0x3aed64(0x25c)]&&_0x2ef878['stack'][_0x3aed64(0x548)]?_0xb34f64+_0x3aed64(0x4a8)+_0x2ef878[_0x3aed64(0x25c)]['join'](_0x3aed64(0x4a8)):_0xb34f64;})[_0x66d1b4(0x482)]('\x0a');}function _0xbe0744(_0x173337,_0x2d50f7){const _0x5e130c=_0x19c4,_0x574d27=_0x5e130c(0x207)+_0x173337+'\x20@\x20'+new Date()[_0x5e130c(0x61e)]()+'\x20pid='+process['pid']+_0x5e130c(0x64a),_0x373369=[_0x574d27,_0x5e130c(0x3dd)+(_0x2d50f7&&_0x2d50f7[_0x5e130c(0x25c)]?_0x2d50f7[_0x5e130c(0x25c)][_0x5e130c(0x32a)]('\x0a')[0x0]:_0x2d50f7),_0x5e130c(0x425)+(_0x490556?'':_0x5e130c(0x1d9))+':',_0x2129b7(0x18),_0x534c1a(),'='[_0x5e130c(0x4ac)](_0x574d27['length']-0x1)];_0x357a3f(_0x373369[_0x5e130c(0x482)]('\x0a'));}function _0x1231a4(_0x2ef652){const _0x4bdd49=_0x19c4;if(!_0x4108a2())return;const _0x5b1fd8=String(_0x2ef652&&_0x2ef652[_0x4bdd49(0x34d)]||_0x2ef652||''),_0x46b289=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4bdd49(0x3d6)](_0x5b1fd8);_0xbe0744(_0x46b289?_0x4bdd49(0x4d9):'uncaughtException',_0x2ef652);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x46b289)return;try{console[_0x4bdd49(0x196)](_0x2ef652&&_0x2ef652[_0x4bdd49(0x25c)]?_0x2ef652[_0x4bdd49(0x25c)]:_0x2ef652);}catch{}process[_0x4bdd49(0x350)](0x1);}function _0x568240(_0x8faa0){const _0x2d1c9b=_0x19c4;if(!_0x4108a2())return;const _0x37fd5f=String(_0x8faa0&&_0x8faa0[_0x2d1c9b(0x34d)]||_0x8faa0||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2d1c9b(0x3d6)](_0x37fd5f)&&_0xbe0744(_0x2d1c9b(0x584),_0x8faa0);}function _0x534c1a(){const _0x45d719=_0x19c4,_0xd2e390=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x37986b=![];for(const _0x4aa256 of _0x398f03){const _0x5d0b5f=_0x4aa256&&_0x4aa256['_envs'];if(!_0x5d0b5f)continue;for(const [_0x2f3f48,_0x1a8b05]of _0x5d0b5f){const _0x2a08d2=_0x1a8b05&&_0x1a8b05['_coordinator']&&_0x1a8b05[_0x45d719(0x264)][_0x45d719(0x3df)];if(!_0x2a08d2)continue;let _0x1cc561,_0x512c44;try{_0x1cc561=Atomics[_0x45d719(0x50f)](_0x2a08d2,0x0),_0x512c44=Atomics['load'](_0x2a08d2,0x1);}catch{continue;}if(_0x1cc561===0x0)continue;_0x37986b=!![];const _0xa14604=_0x1cc561>0x0?'SWAP':_0x45d719(0x1f6),_0x2bd695=Date[_0x45d719(0x600)]()-Math[_0x45d719(0x357)](_0x1cc561)*0x3e8,_0x334b98=((()=>{const _0x2746a9=_0x45d719;try{return _0x1a8b05['_writer']&&_0x1a8b05['_writer'][_0x2746a9(0x1d5)]?_0x1a8b05[_0x2746a9(0x3da)]['status']():null;}catch{return null;}})());_0xd2e390[_0x45d719(0x26a)]('\x20\x20env='+_0x2f3f48+'\x20phase='+_0xa14604+_0x45d719(0x409)+_0x2bd695+_0x45d719(0x568)+_0x512c44+(_0x334b98?'\x20writer{depth='+_0x334b98[_0x45d719(0x656)]+_0x45d719(0x460)+_0x334b98[_0x45d719(0x5c5)]+'\x20parkedNow='+_0x334b98[_0x45d719(0x562)]+'}':''));}}if(!_0x37986b)_0xd2e390[_0x45d719(0x26a)](_0x45d719(0x2bb));return _0xd2e390[_0x45d719(0x482)]('\x0a');}function _0x493ca8(){const _0x5a7be5=_0x19c4;if(!_0x4108a2())return;const _0x10ca98=Math[_0x5a7be5(0x3c6)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x3c4196=Date[_0x5a7be5(0x600)]();for(const _0x3b3861 of _0x398f03){const _0x9ada14=_0x3b3861&&_0x3b3861[_0x5a7be5(0x25b)];if(!_0x9ada14)continue;for(const [_0x53195a,_0xff4b45]of _0x9ada14){const _0xcdb29f=_0xff4b45&&_0xff4b45[_0x5a7be5(0x264)]&&_0xff4b45[_0x5a7be5(0x264)][_0x5a7be5(0x3df)];if(!_0xcdb29f)continue;let _0x293a9d;try{_0x293a9d=Atomics[_0x5a7be5(0x50f)](_0xcdb29f,0x0);}catch{continue;}const _0x123b9e=_0x3b3861[_0x5a7be5(0x307)]+'|'+_0x53195a;if(_0x293a9d<=0x0){_0x44bb32[_0x5a7be5(0x48d)](_0x123b9e);continue;}const _0x2f6e59=_0x3c4196-_0x293a9d*0x3e8,_0x23731a=_0x44bb32[_0x5a7be5(0x61a)](_0x123b9e);if(_0x2f6e59<_0x10ca98)continue;if(_0x23731a&&_0x3c4196-_0x23731a[_0x5a7be5(0x472)]<_0x10ca98)continue;_0x44bb32[_0x5a7be5(0x389)](_0x123b9e,{'firstTs':_0x23731a?_0x23731a[_0x5a7be5(0x5d9)]:_0x293a9d,'dumpedAt':_0x3c4196});const _0x14cf18=_0x5a7be5(0x1f7)+_0x2f6e59+_0x5a7be5(0x4fe)+_0x53195a+_0x5a7be5(0x4a7)+new Date()[_0x5a7be5(0x61e)]()+_0x5a7be5(0x61b)+process['pid']+'\x20===';_0x357a3f([_0x14cf18,_0x534c1a(),'='[_0x5a7be5(0x4ac)](_0x14cf18[_0x5a7be5(0x548)]-0x1)][_0x5a7be5(0x482)]('\x0a'));}}}function _0x4937d3(){const _0x4dfec1=_0x19c4;if(!_0x4108a2()||_0x4cf9cf)return;_0x4cf9cf=!![],process[_0x4dfec1(0x41d)](_0x4dfec1(0x437),_0x1231a4),process[_0x4dfec1(0x41d)](_0x4dfec1(0x60c),_0x568240);const _0x3487ef=Math[_0x4dfec1(0x3c6)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x5f0c18=setInterval(_0x493ca8,_0x3487ef);if(_0x5f0c18['unref'])_0x5f0c18['unref']();}function _0x18335(_0xb74cf9){const _0x59297c=_0x19c4;if(!_0x4108a2()||!_0xb74cf9)return;_0x398f03[_0x59297c(0x55d)](_0xb74cf9),_0x4937d3();}function _0x105e31(_0x5a3f5c){const _0x29479f=_0x19c4;_0x398f03[_0x29479f(0x48d)](_0x5a3f5c);}function _0x85fc3b(){const _0x218660=_0x19c4;if(!_0x4108a2())return{'enabled':![],'hint':_0x218660(0x44f)};return{'enabled':!![],'stackCapture':!!_0x490556,'recentWrites':_0x17e3e8(0x10),'drain':_0x534c1a()};}return okdbDiag={'isEnabled':_0x4108a2,'recordWrite':_0x5d7498,'installDiag':_0x4937d3,'registerOkdb':_0x18335,'unregisterOkdb':_0x105e31,'snapshot':_0x85fc3b},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x19b176=_0x2e4d80;if(hasRequiredOkdbWriter)return okdbWriter[_0x19b176(0x2fb)];hasRequiredOkdbWriter=0x1;const {performance:_0x5004c6}=require$$0$5,_0xfe96a1=requireOkdbDiag(),_0x5acce1=process.env.OKDB_COMMIT_MODE===_0x19b176(0x5a3);class _0x48fdcb{constructor(_0x3d3b8c){const _0x3a391c=_0x19b176;this[_0x3a391c(0x408)]=_0x3d3b8c,this['_inflight']=new Set(),this[_0x3a391c(0x5aa)]=new Map(),this[_0x3a391c(0x62f)]=0x0,this[_0x3a391c(0x3a5)]=[],this[_0x3a391c(0x4b4)]=[],this[_0x3a391c(0x45f)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3a391c(0x5eb)]=0x0,this[_0x3a391c(0x23e)]=[],this['_bpParkedTotal']=0x0;}async[_0x19b176(0x59b)](_0x3dcd75,_0x339e84){const _0x56e040=_0x19b176;if(_0xfe96a1[_0x56e040(0x334)]())_0xfe96a1['recordWrite'](this[_0x56e040(0x408)]?.['name'],_0x339e84);if(this[_0x56e040(0x475)]){const _0x274740=new Error(_0x56e040(0x621));_0x274740[_0x56e040(0x4f4)]=_0x56e040(0x287);throw _0x274740;}if(this[_0x56e040(0x45f)]>0x0){let _0x352cf1=![];while(this[_0x56e040(0x5eb)]>=this[_0x56e040(0x45f)]&&!this[_0x56e040(0x475)]){!_0x352cf1&&(_0x352cf1=!![],this[_0x56e040(0x56d)]++),await new Promise(_0x45b633=>this['_bpWaiters'][_0x56e040(0x26a)](_0x45b633));}if(this['_closed']){const _0x3c7c90=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x3c7c90[_0x56e040(0x4f4)]=_0x56e040(0x287);throw _0x3c7c90;}}this[_0x56e040(0x5eb)]++;const _0x3e9fd0=this[_0x56e040(0x408)][_0x56e040(0x264)];if(_0x3e9fd0)await _0x3e9fd0[_0x56e040(0x214)]();if(this[_0x56e040(0x475)]){if(_0x3e9fd0)_0x3e9fd0['afterWrite']();this[_0x56e040(0x5eb)]--;if(this[_0x56e040(0x23e)][_0x56e040(0x548)]&&this[_0x56e040(0x5eb)]<this[_0x56e040(0x45f)])this[_0x56e040(0x23e)][_0x56e040(0x259)]()();const _0x4a2874=new Error(_0x56e040(0x621));_0x4a2874[_0x56e040(0x4f4)]=_0x56e040(0x287);throw _0x4a2874;}const _0x39c9a0=_0x5004c6[_0x56e040(0x600)]();if(_0x5acce1)try{const _0x57c57c=this[_0x56e040(0x408)]['db'][_0x56e040(0x39c)](_0x3dcd75);this[_0x56e040(0x62f)]++;if(this[_0x56e040(0x3a5)][_0x56e040(0x26a)](_0x5004c6['now']()-_0x39c9a0)>0x100)this[_0x56e040(0x3a5)][_0x56e040(0x259)]();if(this['_done'][_0x56e040(0x26a)](_0x5004c6[_0x56e040(0x600)]())>0x800)this[_0x56e040(0x4b4)][_0x56e040(0x259)]();return _0x57c57c;}finally{this[_0x56e040(0x5eb)]--;if(this[_0x56e040(0x23e)]['length']&&this[_0x56e040(0x5eb)]<this['_highWater'])this['_bpWaiters'][_0x56e040(0x259)]()();if(_0x3e9fd0)_0x3e9fd0[_0x56e040(0x432)]();}const _0x24db10=this[_0x56e040(0x408)]['db'][_0x56e040(0x62b)](_0x3dcd75);this['_inflight'][_0x56e040(0x55d)](_0x24db10),this[_0x56e040(0x5aa)][_0x56e040(0x389)](_0x24db10,_0x39c9a0);const _0x5d1b66=()=>{const _0x34832c=_0x56e040;this[_0x34832c(0x4f7)][_0x34832c(0x48d)](_0x24db10),this['_enqueuedAt'][_0x34832c(0x48d)](_0x24db10),this[_0x34832c(0x62f)]++,this[_0x34832c(0x5eb)]--;this['_bpWaiters'][_0x34832c(0x548)]&&this[_0x34832c(0x5eb)]<this['_highWater']&&this[_0x34832c(0x23e)][_0x34832c(0x259)]()();if(this[_0x34832c(0x3a5)][_0x34832c(0x26a)](_0x5004c6['now']()-_0x39c9a0)>0x100)this[_0x34832c(0x3a5)][_0x34832c(0x259)]();if(this[_0x34832c(0x4b4)][_0x34832c(0x26a)](_0x5004c6[_0x34832c(0x600)]())>0x800)this['_done'][_0x34832c(0x259)]();};_0x24db10[_0x56e040(0x500)](_0x5d1b66,_0x5d1b66);try{return await _0x24db10;}finally{if(_0x3e9fd0)_0x3e9fd0[_0x56e040(0x432)]();}}['status'](){const _0x486c46=_0x19b176,_0x5aa557=_0x5004c6[_0x486c46(0x600)]();let _0x3bf9f6=0x0;for(const _0x366bb2 of this[_0x486c46(0x5aa)][_0x486c46(0x28e)]()){const _0x3b3782=_0x5aa557-_0x366bb2;if(_0x3b3782>_0x3bf9f6)_0x3bf9f6=_0x3b3782;}let _0x5ad799=0x0;for(let _0x39ef62=this[_0x486c46(0x4b4)][_0x486c46(0x548)]-0x1;_0x39ef62>=0x0;_0x39ef62--){if(_0x5aa557-this[_0x486c46(0x4b4)][_0x39ef62]>0x3e8)break;_0x5ad799++;}let _0x249c85=0x0;if(this[_0x486c46(0x3a5)][_0x486c46(0x548)]){const _0x2049f6=[...this[_0x486c46(0x3a5)]]['sort']((_0x309eac,_0x11d097)=>_0x309eac-_0x11d097);_0x249c85=_0x2049f6[Math[_0x486c46(0x243)](_0x2049f6['length']-0x1,Math[_0x486c46(0x51a)](_0x2049f6[_0x486c46(0x548)]*0.99))];}return{'depth':this[_0x486c46(0x4f7)][_0x486c46(0x4e5)],'oldestPendingMs':Math[_0x486c46(0x32b)](_0x3bf9f6),'committed':this['_committed'],'commitsPerSec':_0x5ad799,'commitP99Ms':Math[_0x486c46(0x32b)](_0x249c85),'parkedNow':this[_0x486c46(0x23e)][_0x486c46(0x548)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x486c46(0x45f)]};}[_0x19b176(0x28f)](){const _0x2e6a3e=_0x19b176,_0x2be84c=_0x5004c6[_0x2e6a3e(0x600)]();return[...this[_0x2e6a3e(0x5aa)][_0x2e6a3e(0x28e)]()][_0x2e6a3e(0x2c1)](_0x42bc93=>Math[_0x2e6a3e(0x32b)](_0x2be84c-_0x42bc93))['sort']((_0x3c5da9,_0x46689f)=>_0x46689f-_0x3c5da9);}[_0x19b176(0x376)](){const _0x54a77d=_0x19b176;this['_closed']=!![];for(const _0x396aae of this[_0x54a77d(0x23e)][_0x54a77d(0x1a2)](0x0))_0x396aae();}async[_0x19b176(0x655)](){const _0x1738f8=_0x19b176;let _0xbbed7d=0x0;while(this['_inflight'][_0x1738f8(0x4e5)]&&_0xbbed7d++<0x3e8){await Promise[_0x1738f8(0x422)]([...this['_inflight']]);}}async['put'](_0xbda0ce,_0x5e44b0,_0x45f19c,_0x2cbbd9){const _0x13d0e8=_0x19b176;return this[_0x13d0e8(0x59b)](()=>{const _0xaaea25=_0x13d0e8;if(_0x2cbbd9===undefined)_0xbda0ce[_0xaaea25(0x659)](_0x5e44b0,_0x45f19c);else _0xbda0ce[_0xaaea25(0x659)](_0x5e44b0,_0x45f19c,_0x2cbbd9);},_0x13d0e8(0x514));}async[_0x19b176(0x53b)](_0x26af1f,_0x5b5366){const _0x3aad81=_0x19b176;return this['transaction'](()=>_0x26af1f[_0x3aad81(0x315)](_0x5b5366),_0x3aad81(0x23f));}}async function _0x37ad0d(_0x49ec9b,_0x4acc9b){const _0x31df69=_0x19b176;if(_0x4acc9b==null)_0x4acc9b=Math[_0x31df69(0x3c6)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xf85141=_0x49ec9b?.[_0x31df69(0x55c)];if(!_0xf85141||typeof _0xf85141[_0x31df69(0x500)]!=='function')return;await Promise['race']([Promise[_0x31df69(0x64c)](_0xf85141)[_0x31df69(0x536)](()=>{}),new Promise(_0x4f9052=>{const _0x1b3586=_0x31df69,_0x2d5f67=setTimeout(_0x4f9052,_0x4acc9b);if(_0x2d5f67[_0x1b3586(0x2f9)])_0x2d5f67[_0x1b3586(0x2f9)]();})]);}catch{}}function _0x56fe79(_0x575504){const _0x2f8f3b=_0x19b176;if(_0x5acce1)return Promise[_0x2f8f3b(0x64c)]();const _0x6980d0=_0x575504?.[_0x2f8f3b(0x51e)];return _0x6980d0&&typeof _0x6980d0[_0x2f8f3b(0x500)]===_0x2f8f3b(0x4a0)?_0x6980d0:Promise[_0x2f8f3b(0x64c)]();}return okdbWriter['exports']=_0x48fdcb,okdbWriter[_0x19b176(0x2fb)][_0x19b176(0x5d0)]=_0x37ad0d,okdbWriter[_0x19b176(0x2fb)][_0x19b176(0x51e)]=_0x56fe79,okdbWriter[_0x19b176(0x2fb)][_0x19b176(0x448)]=_0x5acce1,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x2c6580=_0x2e4d80;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x34b2bf=require$$0,{SYNC_COMMITS:_0x296575}=requireOkdbWriter(),_0x266da9='~lock';class _0x403cff{constructor(_0x2e18b1,_0x4c1b91,_0x8dd107){const _0x17ffea=_0x19c4;this[_0x17ffea(0x4f3)]=_0x2e18b1,this[_0x17ffea(0x1e9)]=_0x4c1b91,this[_0x17ffea(0x4df)]=_0x8dd107,this['_released']=![],this[_0x17ffea(0x1ee)]=null,this[_0x17ffea(0x5ca)]=null;}['isHeld'](){const _0x3cc297=_0x19c4;if(this[_0x3cc297(0x49e)])return![];try{const _0x7ec1a=this[_0x3cc297(0x4f3)][_0x3cc297(0x3e0)]()[_0x3cc297(0x61a)](this[_0x3cc297(0x1e9)]);if(!_0x7ec1a||_0x7ec1a[_0x3cc297(0x1fa)]!==this[_0x3cc297(0x4df)])return![];const _0x16af4d=_0x7ec1a['updatedAt']??_0x7ec1a['acquiredAt'];if(_0x16af4d+_0x7ec1a[_0x3cc297(0x4a1)]<Date[_0x3cc297(0x600)]())return![];return!![];}catch{return!this['_released'];}}[_0x2c6580(0x4b5)](){const _0x52e838=_0x2c6580;if(this['_released'])return null;try{return this[_0x52e838(0x4f3)][_0x52e838(0x3e0)]()[_0x52e838(0x61a)](this[_0x52e838(0x1e9)])??null;}catch{return null;}}async[_0x2c6580(0x510)](_0x195ac7){const _0x43db47=_0x2c6580;if(this[_0x43db47(0x49e)])return;try{const _0x1e3662=this[_0x43db47(0x4f3)][_0x43db47(0x3e0)]()[_0x43db47(0x61a)](this[_0x43db47(0x1e9)]);if(!_0x1e3662||_0x1e3662['acquiredAt']!==this[_0x43db47(0x4df)])return;if(_0x296575)this[_0x43db47(0x4f3)][_0x43db47(0x3e0)]()['putSync'](this[_0x43db47(0x1e9)],{..._0x1e3662,'ttlMs':_0x1e3662['ttlMs']+_0x195ac7});else await this[_0x43db47(0x4f3)]['_db']()['put'](this[_0x43db47(0x1e9)],{..._0x1e3662,'ttlMs':_0x1e3662[_0x43db47(0x4a1)]+_0x195ac7});}catch{}}async['release'](){const _0x3f782e=_0x2c6580;if(this['_released'])return;if(this[_0x3f782e(0x5ca)])try{await this[_0x3f782e(0x5ca)];}catch{}clearInterval(this[_0x3f782e(0x1ee)]),this[_0x3f782e(0x1ee)]=null,this[_0x3f782e(0x49e)]=!![];try{const _0x1ae1cd=this[_0x3f782e(0x4f3)][_0x3f782e(0x3e0)]()[_0x3f782e(0x61a)](this[_0x3f782e(0x1e9)]);if(_0x1ae1cd&&_0x1ae1cd[_0x3f782e(0x1fa)]===this['_acquiredAt']){if(_0x296575)this[_0x3f782e(0x4f3)][_0x3f782e(0x3e0)]()[_0x3f782e(0x315)](this[_0x3f782e(0x1e9)]);else await this[_0x3f782e(0x4f3)][_0x3f782e(0x3e0)]()[_0x3f782e(0x53b)](this[_0x3f782e(0x1e9)]);}}catch{}}['_startHeartbeat'](_0x18d3bd,_0x2e3a53){const _0xa1f71e=_0x2c6580,_0x3f2b73=_0x2e3a53??Math['floor'](_0x18d3bd/0x3);this[_0xa1f71e(0x1ee)]=setInterval(()=>{const _0x2b6864=_0xa1f71e;if(this['_released'])return;this[_0x2b6864(0x5ca)]=((async()=>{const _0x39b124=_0x2b6864;try{const _0x2477ee=this['_lock'][_0x39b124(0x3e0)]()[_0x39b124(0x61a)](this['_key']);if(!_0x2477ee||_0x2477ee['acquiredAt']!==this['_acquiredAt']){this[_0x39b124(0x49e)]=!![],clearInterval(this[_0x39b124(0x1ee)]),this[_0x39b124(0x1ee)]=null;return;}if(_0x296575)this['_lock']['_db']()[_0x39b124(0x659)](this[_0x39b124(0x1e9)],{..._0x2477ee,'updatedAt':Date[_0x39b124(0x600)]()});else await this['_lock'][_0x39b124(0x3e0)]()[_0x39b124(0x359)](this['_key'],{..._0x2477ee,'updatedAt':Date[_0x39b124(0x600)]()});}catch{}this[_0x39b124(0x5ca)]=null;})());},_0x3f2b73);if(this['_heartbeatTimer'][_0xa1f71e(0x2f9)])this[_0xa1f71e(0x1ee)][_0xa1f71e(0x2f9)]();}}class _0x508d12{constructor(_0x3975ff,{namespace:_0x4f0836,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x109028=_0x2c6580;this[_0x109028(0x2f2)]=_0x3975ff,this[_0x109028(0x3c4)]=_0x4f0836,this[_0x109028(0x4a1)]=ttlMs,this[_0x109028(0x61c)]=heartbeatMs,this[_0x109028(0x5de)]=null;}[_0x2c6580(0x3e0)](){const _0x3ac98a=_0x2c6580;return!this[_0x3ac98a(0x5de)]&&(this[_0x3ac98a(0x5de)]=this['_rawDb'][_0x3ac98a(0x398)](_0x266da9,{'dupSort':![]})),this['_lockDb'];}[_0x2c6580(0x3d1)](){const _0x43dabd=_0x2c6580;return!this[_0x43dabd(0x323)]&&(this['_wantDbHandle']=this[_0x43dabd(0x2f2)][_0x43dabd(0x398)](_0x266da9+_0x43dabd(0x416),{'dupSort':![]})),this['_wantDbHandle'];}['_key'](_0xafd814){const _0x280f34=_0x2c6580;return this[_0x280f34(0x3c4)]+':'+_0xafd814;}[_0x2c6580(0x2c3)](_0x5912ba){const _0x4630d6=_0x2c6580;try{_0x296575?this[_0x4630d6(0x3d1)]()['putSync'](this[_0x4630d6(0x1e9)](_0x5912ba),Date['now']()):this['_wantDb']()[_0x4630d6(0x359)](this[_0x4630d6(0x1e9)](_0x5912ba),Date[_0x4630d6(0x600)]())?.[_0x4630d6(0x536)]?.(()=>{});}catch{}}[_0x2c6580(0x558)](_0x1d709c,_0x369950=0x3e8){const _0x4ca14e=_0x2c6580;try{const _0x391345=this['_wantDb']()[_0x4ca14e(0x61a)](this[_0x4ca14e(0x1e9)](_0x1d709c));return typeof _0x391345===_0x4ca14e(0x543)&&Date[_0x4ca14e(0x600)]()-_0x391345<_0x369950;}catch{return![];}}[_0x2c6580(0x1c7)](_0x4751a7){const _0x335a0e=_0x2c6580,_0x546b98=_0x4751a7['updatedAt']??_0x4751a7['acquiredAt'];return _0x546b98+_0x4751a7[_0x335a0e(0x4a1)]<Date[_0x335a0e(0x600)]();}static[_0x2c6580(0x299)](_0x37be5c){const _0x3bf0a2=_0x2c6580,_0x101a3a=_0x37be5c?.['holder'];if(!_0x101a3a||typeof _0x101a3a[_0x3bf0a2(0x4cb)]!==_0x3bf0a2(0x543))return![];if(_0x101a3a[_0x3bf0a2(0x39f)]!==_0x34b2bf['hostname']())return![];if(_0x101a3a['pid']===process[_0x3bf0a2(0x4cb)])return![];try{return process['kill'](_0x101a3a[_0x3bf0a2(0x4cb)],0x0),![];}catch(_0x2d9b6e){return _0x2d9b6e[_0x3bf0a2(0x4f4)]===_0x3bf0a2(0x55a);}}async[_0x2c6580(0x45b)](_0x369f81,_0x54afc0={},_0x52548d={}){const _0x176684=_0x2c6580,_0x51007e=this[_0x176684(0x1e9)](_0x369f81),_0x43830e=_0x52548d[_0x176684(0x4a1)]??this['ttlMs'],_0x4d8176=Date['now'](),_0x4e2097={'holder':{'pid':process['pid'],'hostname':_0x34b2bf[_0x176684(0x39f)](),..._0x54afc0},'acquiredAt':_0x4d8176,'updatedAt':_0x4d8176,'ttlMs':_0x43830e};let _0x4c5416=![],_0x2964cf=null;try{const _0x275107=()=>{const _0x340ab3=_0x176684,_0x209958=this['_db']()[_0x340ab3(0x61a)](_0x51007e);if(_0x209958&&!this[_0x340ab3(0x1c7)](_0x209958)&&!_0x508d12['_holderDead'](_0x209958)){const _0x10eff5=_0x54afc0[_0x340ab3(0x5ab)]!=null&&_0x209958[_0x340ab3(0x4b5)][_0x340ab3(0x4cb)]===process[_0x340ab3(0x4cb)]&&_0x209958[_0x340ab3(0x4b5)][_0x340ab3(0x5ab)]===_0x54afc0[_0x340ab3(0x5ab)];if(!_0x10eff5){_0x4c5416=![],_0x2964cf=_0x209958;return;}_0x4e2097['acquiredAt']<=_0x209958[_0x340ab3(0x1fa)]&&(_0x4e2097[_0x340ab3(0x1fa)]=_0x209958[_0x340ab3(0x1fa)]+0x1,_0x4e2097[_0x340ab3(0x2a1)]=_0x4e2097[_0x340ab3(0x1fa)]);}this[_0x340ab3(0x3e0)]()[_0x340ab3(0x359)](_0x51007e,_0x4e2097),_0x4c5416=!![],_0x2964cf=_0x4e2097;};if(_0x296575)this[_0x176684(0x3e0)]()[_0x176684(0x39c)](_0x275107);else await this[_0x176684(0x3e0)]()[_0x176684(0x62b)](_0x275107);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x4c5416)return{'acquired':![],'handle':null,'current':_0x2964cf};const _0x13d6fa=new _0x403cff(this,_0x51007e,_0x4e2097[_0x176684(0x1fa)]);return _0x13d6fa[_0x176684(0x1c1)](_0x43830e,this[_0x176684(0x61c)]),{'acquired':!![],'handle':_0x13d6fa,'current':_0x2964cf};}[_0x2c6580(0x396)](_0xff90c4){const _0x304b06=_0x2c6580;try{return this[_0x304b06(0x3e0)]()[_0x304b06(0x61a)](this[_0x304b06(0x1e9)](_0xff90c4))??null;}catch{return null;}}[_0x2c6580(0x4bf)](){const _0x397ee9=_0x2c6580,_0x2613c0=this[_0x397ee9(0x3c4)]+':',_0x2be4a4=[];try{for(const {key:_0x476e47,value:_0x3b987d}of this[_0x397ee9(0x3e0)]()[_0x397ee9(0x3a2)]({'start':_0x2613c0,'end':_0x2613c0+'ÿ'})){typeof _0x476e47==='string'&&_0x476e47['startsWith'](_0x2613c0)&&_0x2be4a4[_0x397ee9(0x26a)]({'id':_0x476e47[_0x397ee9(0x30b)](_0x2613c0[_0x397ee9(0x548)]),'entry':_0x3b987d});}}catch{}return _0x2be4a4;}static[_0x2c6580(0x3bd)](_0x1bc1e1){const _0xd3ddc3=_0x2c6580,_0x482557=[];try{const _0x15e4e8=_0x1bc1e1[_0xd3ddc3(0x398)](_0x266da9,{'dupSort':![]});for(const {key:_0x1cca31,value:_0x4a930f}of _0x15e4e8[_0xd3ddc3(0x3a2)]({})){if(typeof _0x1cca31!==_0xd3ddc3(0x4c7))continue;const _0x490108=_0x1cca31['indexOf'](':');if(_0x490108<0x1)continue;_0x482557['push']({'namespace':_0x1cca31[_0xd3ddc3(0x30b)](0x0,_0x490108),'id':_0x1cca31[_0xd3ddc3(0x30b)](_0x490108+0x1),'entry':_0x4a930f});}}catch{}return _0x482557;}}return okdbLock={'OKDBLock':_0x508d12},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x49be05=_0x2e4d80;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x40bc4a=require$$0,_0x677692=require$$1$2,_0x318e04=require$$0$1,{LOOP:_0x1456da}=requireOkdbLoopMonitor(),{OKDBLock:_0x11a446}=requireOkdbLock(),{SYNC_COMMITS:_0x237ac0}=requireOkdbWriter(),_0x452c0b=_0x49be05(0x653),_0x4faa8e=_0x49be05(0x276),_0x2d85d8=_0x49be05(0x4a4),_0x1cd33f='~processes:cmd',_0x12c1a8=(_0x50caf6,_0x54a874)=>_0x50caf6+':'+_0x54a874,_0x2fc967=(_0x3b2b82,_0x21be58)=>_0x3b2b82+'::'+_0x21be58,_0x16ec9e=(_0x2e71c1,_0x6ce1b5)=>_0x2e71c1+'/'+_0x6ce1b5,_0x1bceeb=(_0x11ae33,_0x4a87f8)=>_0x11ae33+'#'+_0x4a87f8,_0x1dc0f6=_0x350589=>{const _0x4deee3=_0x49be05;if(_0x350589?.[_0x4deee3(0x27e)])return _0x350589[_0x4deee3(0x27e)];const _0x43620c=_0x350589?.['nodeKey'];return typeof _0x43620c==='string'&&_0x43620c[_0x4deee3(0x481)]('#')?_0x43620c['slice'](0x0,_0x43620c['indexOf']('#')):_0x43620c;},_0x2849a2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x354dce=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x622167=_0x2849a2*0x3,_0x1c8bb9=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x49be05(0x3c6)](0x927c0,_0x622167*0x14),_0x44adea=[_0x49be05(0x2ba),_0x49be05(0x586),_0x49be05(0x314),_0x49be05(0x36b),_0x49be05(0x24e),_0x49be05(0x2fa)];let _0x5f43fd=null;function _0x2a66fe(){const _0x1aeb07=_0x49be05;if(_0x5f43fd==null)_0x5f43fd=Math[_0x1aeb07(0x32b)]((Date[_0x1aeb07(0x600)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x5f43fd;}function _0x4e9cc3(_0x342ab3){const _0x5f3b63=_0x49be05;if(process.env.OKDB_PROCESS_KILL===_0x5f3b63(0x3e8))return![];if(_0x342ab3?.[_0x5f3b63(0x254)]?.[_0x5f3b63(0x3b2)]&&typeof _0x342ab3[_0x5f3b63(0x254)][_0x5f3b63(0x3b2)]===_0x5f3b63(0x305)&&_0x342ab3['options'][_0x5f3b63(0x3b2)][_0x5f3b63(0x2b2)]===![])return![];return!![];}function _0x183fae(_0x5795d9,_0x4399c3){const _0x294436=_0x49be05,_0x431820=!!_0x4399c3?.[_0x294436(0x639)];switch(_0x5795d9){case'primary':return{'controllable':_0x431820,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x294436(0x607):case _0x294436(0x552):return{'controllable':_0x431820,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x294436(0x49d):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x294436(0x3ef):case'queue-worker':case'fn-runner':case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x294436(0x563)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x18bc46{constructor(_0x48cc8e){const _0x30ea3b=_0x49be05;this[_0x30ea3b(0x3e7)]=_0x48cc8e,this[_0x30ea3b(0x470)]=null,this['_desired']=null,this[_0x30ea3b(0x336)]=new Map(),this[_0x30ea3b(0x51c)]=null,this['_isWriter']=![],this[_0x30ea3b(0x39d)]=![],this[_0x30ea3b(0x62a)]=_0x2a66fe(),this[_0x30ea3b(0x587)]=_0x12c1a8(process[_0x30ea3b(0x4cb)],this[_0x30ea3b(0x62a)]),this[_0x30ea3b(0x26e)]=_0x318e04['randomUUID']()['slice'](0x0,0x8),this[_0x30ea3b(0x462)]=_0x1bceeb(this[_0x30ea3b(0x587)],this['_instanceId']),this[_0x30ea3b(0x3b1)]=Date[_0x30ea3b(0x600)](),this['_kind']=null,this[_0x30ea3b(0x212)]=null,this[_0x30ea3b(0x278)]=null,this[_0x30ea3b(0x392)]=null,this['_onProcEvent']=null,this['_onTick']=null,this[_0x30ea3b(0x5ec)]=0x0,this[_0x30ea3b(0x59d)]={},this[_0x30ea3b(0x24d)]=new Map(),this['_lastCpuUsage']=process[_0x30ea3b(0x377)](),this[_0x30ea3b(0x643)]=Date[_0x30ea3b(0x600)](),this[_0x30ea3b(0x3fc)]=0x0,this[_0x30ea3b(0x3bb)]=new Map();}get[_0x49be05(0x441)](){const _0x4d948d=_0x49be05;return this[_0x4d948d(0x587)];}get[_0x49be05(0x4e4)](){const _0x3b4ef1=_0x49be05;return this[_0x3b4ef1(0x462)];}[_0x49be05(0x5df)](_0x3fc1d8,_0x9f8779){const _0x302c52=_0x49be05,_0x3cfa33=_0x183fae(_0x3fc1d8,_0x9f8779);if(_0x3cfa33[_0x302c52(0x43d)]&&!_0x4e9cc3(this[_0x302c52(0x3e7)]))return{..._0x3cfa33,'killable':![],'killConfirm':undefined};return _0x3cfa33;}[_0x49be05(0x1f8)](){return!!this['_statusEnv'];}[_0x49be05(0x1b2)](_0x255205){const _0x2b68ae=_0x49be05;Object[_0x2b68ae(0x413)](this[_0x2b68ae(0x59d)],_0x255205||{});}[_0x49be05(0x4ea)](_0x3e85f7){if(_0x3e85f7)this['_listenAddr']=_0x3e85f7;}[_0x49be05(0x647)](_0x35d099={}){const _0x4dde8f=_0x49be05;return this[_0x4dde8f(0x3e7)][_0x4dde8f(0x42f)](_0x35d099);}['processingStatusView'](){const _0x4cf3b1=_0x49be05,_0x16a874={};let _0x19e20e=0x0,_0x428b1a=0x0;const _0x43ef9d=new Set();for(const _0x5bcc33 of this[_0x4cf3b1(0x35e)]()){_0x428b1a++;const _0x127f3b=_0x5bcc33['processing'];if(!_0x127f3b)continue;if(_0x127f3b['participate'])_0x19e20e++;for(const _0x4cac71 of _0x127f3b['processors']||[]){if(![_0x4cf3b1(0x438),_0x4cf3b1(0x31d)][_0x4cf3b1(0x481)](_0x4cac71['mode']))continue;(_0x4cac71[_0x4cf3b1(0x258)]==='online'||_0x4cac71[_0x4cf3b1(0x258)]===_0x4cf3b1(0x1c6))&&_0x4cac71[_0x4cf3b1(0x2fe)]&&_0x43ef9d['add']((_0x4cac71[_0x4cf3b1(0x408)]||_0x4cf3b1(0x5fd))+':'+_0x4cac71[_0x4cf3b1(0x2fe)]);const _0x23e29e=_0x4cac71[_0x4cf3b1(0x408)]||_0x4cf3b1(0x5fd);(_0x16a874[_0x23e29e]||=[])[_0x4cf3b1(0x26a)]({..._0x4cac71,'env':_0x23e29e,'owner':{'pid':_0x5bcc33[_0x4cf3b1(0x4cb)]??null,'kind':_0x5bcc33[_0x4cf3b1(0x2e2)]??null}});}}for(const [_0x36e1fe,_0x17420a]of Object[_0x4cf3b1(0x57f)](_0x16a874)){for(const _0x1604b6 of _0x17420a){if(_0x1604b6['mode']===_0x4cf3b1(0x438)&&!_0x1604b6[_0x4cf3b1(0x40f)]){const _0x12e2f1=_0x36e1fe+':'+(_0x1604b6[_0x4cf3b1(0x2fe)]??'');if(!_0x43ef9d['has'](_0x12e2f1))_0x1604b6['unclaimed']=!![];}}}return{'envs':_0x16a874,'policy':null,'participation':{'participating':_0x19e20e,'total':_0x428b1a},'source':_0x4cf3b1(0x62c)};}[_0x49be05(0x467)](){const _0x444dba=_0x49be05,_0x472f1e=_0x5e913c=>{const _0xf21cb5=_0x19c4;if(_0x5e913c['state']==='online'||_0x5e913c[_0xf21cb5(0x258)]==='building'||_0x5e913c[_0xf21cb5(0x258)]===_0xf21cb5(0x196))return 0x3;if(_0x5e913c[_0xf21cb5(0x40f)])return 0x1;return 0x2;},_0x461b93=new Map();for(const _0x5a5c86 of this[_0x444dba(0x35e)]()){for(const _0x5b3c03 of _0x5a5c86[_0x444dba(0x252)]?.[_0x444dba(0x639)]||[]){const _0x226d5f={..._0x5b3c03,'owner':{'pid':_0x5a5c86[_0x444dba(0x4cb)]??null,'kind':_0x5a5c86[_0x444dba(0x2e2)]??null,'host':_0x5a5c86[_0x444dba(0x2c2)]??null}},_0x2d87a4=_0x5b3c03[_0x444dba(0x34c)]===_0x444dba(0x438)?_0x444dba(0x47e)+(_0x5b3c03['env']??'')+'::'+(_0x5b3c03['cursorKey']??_0x5b3c03[_0x444dba(0x2cb)]??_0x5b3c03['id']):_0x444dba(0x424)+(_0x5a5c86['nodeKey']??_0x5a5c86['processKey']??'')+'::'+(_0x5b3c03[_0x444dba(0x408)]??'')+'::'+_0x5b3c03['id'],_0x1a10d6=_0x461b93['get'](_0x2d87a4);if(!_0x1a10d6||_0x472f1e(_0x226d5f)>_0x472f1e(_0x1a10d6))_0x461b93['set'](_0x2d87a4,_0x226d5f);}}return[..._0x461b93[_0x444dba(0x28e)]()];}['clusterStatusView'](){const _0x5efa1a=_0x49be05,_0x5dee35=Date[_0x5efa1a(0x600)](),_0x16f4fa=this[_0x5efa1a(0x35e)](),_0x133dee=_0x54dad3=>Math[_0x5efa1a(0x3c6)](0x0,Math[_0x5efa1a(0x32b)]((_0x5dee35-(_0x54dad3[_0x5efa1a(0x32d)]||_0x5dee35))/0x3e8)),_0x19b0d2=_0x16f4fa[_0x5efa1a(0x4bd)](_0x3be3a5=>_0x3be3a5[_0x5efa1a(0x2e2)]===_0x5efa1a(0x502)),_0x208e3a=_0x16f4fa[_0x5efa1a(0x1d8)](_0x35cd2f=>_0x35cd2f[_0x5efa1a(0x2e2)]==='http-server');if(_0x19b0d2||_0x208e3a['length'])return{'primary':_0x19b0d2?{'pid':_0x19b0d2['pid'],'uptime':_0x133dee(_0x19b0d2)}:null,'workers':_0x208e3a[_0x5efa1a(0x2c1)](_0x1522d1=>({'pid':_0x1522d1[_0x5efa1a(0x4cb)],'uptime':_0x133dee(_0x1522d1)})),'workersConfigured':_0x19b0d2?.[_0x5efa1a(0x5d6)]?.['workersConfigured']??_0x208e3a[_0x5efa1a(0x548)],'mode':_0x5efa1a(0x1f4)};const _0x1ff306=_0x16f4fa[_0x5efa1a(0x4bd)](_0xca9255=>_0xca9255[_0x5efa1a(0x2e2)]===_0x5efa1a(0x607)||_0xca9255[_0x5efa1a(0x2e2)]===_0x5efa1a(0x552)||_0xca9255[_0x5efa1a(0x2e2)]===_0x5efa1a(0x49d)),_0x35d34a=_0x1ff306?{'pid':_0x1ff306['pid'],'uptime':_0x133dee(_0x1ff306)}:{'pid':process[_0x5efa1a(0x4cb)],'uptime':Math[_0x5efa1a(0x3c6)](0x0,Math[_0x5efa1a(0x32b)](process[_0x5efa1a(0x4db)]()))};return{'primary':_0x35d34a,'workers':[_0x35d34a],'workersConfigured':0x1,'mode':_0x5efa1a(0x438)};}[_0x49be05(0x42c)](){return this['_groupByProcess']();}['treeView'](){const _0x177057=_0x49be05,_0x9ecb2a=new Map();for(const _0x45c2b7 of this[_0x177057(0x46e)]())_0x9ecb2a['set'](_0x45c2b7[_0x177057(0x27e)],{..._0x45c2b7,'children':[]});const _0xa890aa=[];for(const _0x102871 of _0x9ecb2a[_0x177057(0x28e)]()){const _0x2c833b=_0x102871['supervisorKey']?_0x9ecb2a[_0x177057(0x61a)](_0x102871['supervisorKey']):null;if(_0x2c833b&&_0x2c833b!==_0x102871)_0x2c833b[_0x177057(0x2d6)][_0x177057(0x26a)](_0x102871);else _0xa890aa['push'](_0x102871);}const _0x4a7452=(_0x5217f1,_0x359e6f)=>_0x5217f1['kind']===_0x359e6f['kind']?(_0x5217f1[_0x177057(0x4cb)]||0x0)-(_0x359e6f[_0x177057(0x4cb)]||0x0):(_0x5217f1[_0x177057(0x2e2)]??'')<(_0x359e6f[_0x177057(0x2e2)]??'')?-0x1:0x1,_0x27090f=_0x122ae8=>{const _0x2690af=_0x177057;_0x122ae8[_0x2690af(0x484)](_0x4a7452);for(const _0x31676f of _0x122ae8)if(_0x31676f[_0x2690af(0x2d6)][_0x2690af(0x548)])_0x27090f(_0x31676f['children']);};return _0x27090f(_0xa890aa),_0xa890aa;}[_0x49be05(0x3fb)](_0x795580){const _0x2da662=_0x49be05;return this[_0x2da662(0x46e)]()[_0x2da662(0x4bd)](_0x5d57ab=>_0x5d57ab[_0x2da662(0x27e)]===_0x795580)??null;}[_0x49be05(0x46e)](_0x225f19=Date[_0x49be05(0x600)]()){const _0x39f87d=_0x49be05,_0x5f4197=new Map();for(const _0x2555b5 of this[_0x39f87d(0x35e)]()){const _0x17b268=_0x1dc0f6(_0x2555b5);let _0xe8b61e=_0x5f4197[_0x39f87d(0x61a)](_0x17b268);!_0xe8b61e&&(_0xe8b61e={'processKey':_0x17b268,'nodeKey':_0x17b268,'pid':_0x2555b5[_0x39f87d(0x4cb)],'ppid':_0x2555b5[_0x39f87d(0x215)]??null,'host':_0x2555b5['host']??null,'kind':_0x2555b5[_0x39f87d(0x2e2)],'role':null,'supervisorKey':_0x2555b5[_0x39f87d(0x54d)]??null,'slot':_0x2555b5[_0x39f87d(0x529)]??null,'slotKey':_0x2555b5[_0x39f87d(0x3db)]??null,'caps':_0x2555b5[_0x39f87d(0x20f)]??null,'lifecycle':_0x2555b5[_0x39f87d(0x29e)]??null,'uptime':Math[_0x39f87d(0x3c6)](0x0,Math[_0x39f87d(0x32b)]((_0x225f19-(_0x2555b5[_0x39f87d(0x32d)]||_0x225f19))/0x3e8)),'startedAt':_0x2555b5['startedAt']??null,'meta':_0x2555b5[_0x39f87d(0x5d6)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5f4197[_0x39f87d(0x389)](_0x17b268,_0xe8b61e));_0xe8b61e['instances'][_0x39f87d(0x26a)]({'instanceId':_0x2555b5[_0x39f87d(0x3be)]??null,'role':_0x2555b5[_0x39f87d(0x5e7)]??null,'listenAddr':_0x2555b5[_0x39f87d(0x249)]??null,'lifecycle':_0x2555b5[_0x39f87d(0x29e)]??null,'processing':_0x2555b5[_0x39f87d(0x252)]??null});if(!_0xe8b61e[_0x39f87d(0x5e7)]&&_0x2555b5['role'])_0xe8b61e['role']=_0x2555b5[_0x39f87d(0x5e7)];if(!_0xe8b61e[_0x39f87d(0x249)]&&_0x2555b5[_0x39f87d(0x249)])_0xe8b61e[_0x39f87d(0x249)]=_0x2555b5[_0x39f87d(0x249)];if(!_0xe8b61e['processing']&&_0x2555b5[_0x39f87d(0x252)])_0xe8b61e['processing']=_0x2555b5['processing'];if(!_0xe8b61e[_0x39f87d(0x5f1)]&&_0x2555b5[_0x39f87d(0x5f1)])_0xe8b61e[_0x39f87d(0x5f1)]=_0x2555b5[_0x39f87d(0x5f1)];if(!_0xe8b61e[_0x39f87d(0x50c)]&&_0x2555b5[_0x39f87d(0x50c)])_0xe8b61e['singletonClaims']=_0x2555b5[_0x39f87d(0x50c)];if(_0xe8b61e[_0x39f87d(0x20f)]==null&&_0x2555b5['caps'])_0xe8b61e[_0x39f87d(0x20f)]=_0x2555b5[_0x39f87d(0x20f)];if(_0x2555b5[_0x39f87d(0x436)]&&(!_0xe8b61e[_0x39f87d(0x436)]||(_0x2555b5[_0x39f87d(0x436)]['at']??0x0)>(_0xe8b61e[_0x39f87d(0x436)]['at']??0x0)))_0xe8b61e[_0x39f87d(0x436)]=_0x2555b5[_0x39f87d(0x436)];}return[..._0x5f4197[_0x39f87d(0x28e)]()];}[_0x49be05(0x2cc)](){const _0x35ab5f=_0x49be05,_0x20fa37=[],_0x27ad40={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x105380 of this['_groupByProcess']()){_0x20fa37[_0x35ab5f(0x26a)]({'processKey':_0x105380[_0x35ab5f(0x27e)],'kind':_0x105380[_0x35ab5f(0x2e2)],'pid':_0x105380[_0x35ab5f(0x4cb)],'supervisorKey':_0x105380[_0x35ab5f(0x54d)],'meta':_0x105380[_0x35ab5f(0x5d6)]??null,'uptime':_0x105380[_0x35ab5f(0x4db)],'stats':_0x105380[_0x35ab5f(0x436)]??null}),_0x27ad40[_0x35ab5f(0x3b2)]++;if(_0x105380['stats']){_0x27ad40[_0x35ab5f(0x4a9)]+=_0x105380[_0x35ab5f(0x436)][_0x35ab5f(0x4a9)]||0x0,_0x27ad40[_0x35ab5f(0x394)]+=(_0x105380[_0x35ab5f(0x436)][_0x35ab5f(0x394)]||0x0)+(_0x105380[_0x35ab5f(0x436)][_0x35ab5f(0x434)]?.[_0x35ab5f(0x394)]||0x0);const _0x48f891=_0x105380[_0x35ab5f(0x436)][_0x35ab5f(0x434)];_0x48f891&&(_0x27ad40['threads'][_0x35ab5f(0x60d)]+=_0x48f891['count']||0x0,_0x27ad40['threads'][_0x35ab5f(0x26b)]+=_0x48f891[_0x35ab5f(0x26b)]||0x0,_0x27ad40[_0x35ab5f(0x434)][_0x35ab5f(0x523)]+=_0x48f891['busy']||0x0);}}return{'totals':_0x27ad40,'nodes':_0x20fa37};}async[_0x49be05(0x37b)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x345e20=_0x49be05;this[_0x345e20(0x5ed)]=this['_isWriter']||!!writer,this[_0x345e20(0x39d)]=this[_0x345e20(0x39d)]||!!reader,this[_0x345e20(0x1f2)]=kind||this[_0x345e20(0x1f2)]||(_0x677692[_0x345e20(0x56f)]?'http-server':_0x345e20(0x607)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x345e20(0x278)],this['_ensureDesired'](),await this[_0x345e20(0x415)]();if(!writer&&!reader)return null;if(!this[_0x345e20(0x470)]){const _0x18023d=await this[_0x345e20(0x3e7)][_0x345e20(0x1a5)](_0x452c0b,{'sync':![],'durability':'fast'});if(!_0x18023d[_0x345e20(0x54f)](_0x4faa8e))await _0x18023d[_0x345e20(0x4c1)](_0x4faa8e);this[_0x345e20(0x470)]=_0x18023d;}return this[_0x345e20(0x470)];}[_0x49be05(0x251)](){const _0x3bb0e6=_0x49be05;return this['_nodeDbFor']!==this[_0x3bb0e6(0x470)]&&(this['_nodeDbFor']=this[_0x3bb0e6(0x470)],this[_0x3bb0e6(0x550)]=this[_0x3bb0e6(0x470)][_0x3bb0e6(0x2be)](_0x4faa8e)[_0x3bb0e6(0x491)]),this[_0x3bb0e6(0x550)];}[_0x49be05(0x3d3)](_0xf5f75d){const _0x541a90=_0x49be05;if(_0x237ac0)return this['_nodeDb']()[_0x541a90(0x659)](_0xf5f75d[_0x541a90(0x44e)],_0xf5f75d,0x1);const _0x55276e=this[_0x541a90(0x251)]()[_0x541a90(0x359)](_0xf5f75d[_0x541a90(0x44e)],_0xf5f75d,0x1);if(_0x55276e&&typeof _0x55276e['then']==='function')_0x55276e[_0x541a90(0x500)](undefined,()=>{});return _0x55276e;}['_putRowSync'](_0x2454aa){const _0x59e4da=_0x49be05;return this[_0x59e4da(0x251)]()[_0x59e4da(0x659)](_0x2454aa[_0x59e4da(0x44e)],_0x2454aa,0x1);}[_0x49be05(0x1b8)](_0x42c463){const _0x14db89=_0x49be05;if(_0x237ac0)try{return this['_nodeDb']()[_0x14db89(0x315)](_0x42c463);}catch{return![];}const _0x47f736=this[_0x14db89(0x251)]()[_0x14db89(0x53b)](_0x42c463);if(_0x47f736&&typeof _0x47f736['then']==='function')_0x47f736[_0x14db89(0x500)](undefined,()=>{});return _0x47f736;}async[_0x49be05(0x3e5)](_0x95b53e){const _0xac49cf=_0x49be05;if(!this[_0xac49cf(0x470)]||!this['_isWriter']||!_0x95b53e?.['nodeKey'])return;return this[_0xac49cf(0x3d3)](_0x95b53e);}async['removeNode'](_0x4a9d45){const _0x2fa38a=_0x49be05;if(!this[_0x2fa38a(0x470)]||!this[_0x2fa38a(0x5ed)]||!_0x4a9d45)return;const _0x40f72c=_0x4a9d45[_0x2fa38a(0x481)]('#'),_0x3282d7=[];for(const {key:_0xbaecb5}of this[_0x2fa38a(0x470)]['getRange'](_0x4faa8e)){if(_0xbaecb5===_0x4a9d45||!_0x40f72c&&typeof _0xbaecb5===_0x2fa38a(0x4c7)&&_0xbaecb5['startsWith'](_0x4a9d45+'#'))_0x3282d7[_0x2fa38a(0x26a)](_0xbaecb5);}for(const _0x561ad9 of _0x3282d7){try{this['_nodeDb']()[_0x2fa38a(0x315)](_0x561ad9);}catch{}}}['_nodeDead'](_0x5ffa51){const _0x117a3b=_0x49be05;if(typeof _0x5ffa51?.[_0x117a3b(0x4cb)]!==_0x117a3b(0x543))return![];if(_0x5ffa51[_0x117a3b(0x2c2)]!==_0x40bc4a[_0x117a3b(0x39f)]())return![];if(_0x5ffa51[_0x117a3b(0x4cb)]===process['pid'])return![];if(_0x5ffa51[_0x117a3b(0x554)]!=null&&_0x5ffa51['expiresAt']<Date[_0x117a3b(0x600)]()-_0x1c8bb9)return!![];try{return process[_0x117a3b(0x2b2)](_0x5ffa51[_0x117a3b(0x4cb)],0x0),![];}catch(_0x40ab8c){return _0x40ab8c['code']==='ESRCH';}}[_0x49be05(0x35e)](){const _0x37857f=_0x49be05;if(!this['_statusEnv'])return[];try{this[_0x37857f(0x470)]['db']?.['resetReadTxn']?.();}catch{}const _0x3d74d2=Date[_0x37857f(0x600)](),_0x4771f3=_0x40bc4a[_0x37857f(0x39f)](),_0x85168d=[];for(const {value:_0x3559d8}of this['_statusEnv'][_0x37857f(0x3a2)](_0x4faa8e)){if(!_0x3559d8)continue;let _0x3d3d58=null;_0x3559d8[_0x37857f(0x2c2)]===_0x4771f3&&typeof _0x3559d8[_0x37857f(0x4cb)]===_0x37857f(0x543)&&(_0x3d3d58=!this[_0x37857f(0x592)](_0x3559d8));if(_0x3d3d58===![])continue;const _0x1b87c4=_0x3559d8['expiresAt']==null||_0x3559d8[_0x37857f(0x554)]>=_0x3d74d2;if(_0x3d3d58===!![]||_0x1b87c4)_0x85168d['push'](_0x3559d8);}return _0x85168d;}async[_0x49be05(0x474)](_0x48e3e8=0x0){const _0x4b23bd=_0x49be05;if(!this[_0x4b23bd(0x470)]||!this[_0x4b23bd(0x5ed)])return;const _0x5e6efb=Date[_0x4b23bd(0x600)]()-_0x48e3e8,_0x40d942=new Set(),_0x577e02=[],_0x12fd8c=_0x40bc4a[_0x4b23bd(0x39f)](),_0x55b181=require$$3['version'];for(const {key:_0x4b9886,value:_0x1b0bfb}of this[_0x4b23bd(0x470)][_0x4b23bd(0x3a2)](_0x4faa8e)){if(!_0x1b0bfb)continue;const _0x57e663=_0x1b0bfb[_0x4b23bd(0x2c2)]===_0x12fd8c&&typeof _0x1b0bfb[_0x4b23bd(0x4cb)]===_0x4b23bd(0x543),_0x3afaef=_0x57e663?this[_0x4b23bd(0x592)](_0x1b0bfb):_0x1b0bfb[_0x4b23bd(0x554)]!=null&&_0x1b0bfb['expiresAt']<_0x5e6efb;if(_0x3afaef)_0x577e02[_0x4b23bd(0x26a)](_0x4b9886);else{_0x40d942[_0x4b23bd(0x55d)](_0x1dc0f6(_0x1b0bfb)??_0x4b9886);if(_0x1b0bfb['version']&&_0x1b0bfb['version']!==_0x55b181){if(!this[_0x4b23bd(0x617)])this[_0x4b23bd(0x617)]=new Set();!this['_versionSkewWarned'][_0x4b23bd(0x3e4)](_0x1b0bfb[_0x4b23bd(0x35a)])&&(this[_0x4b23bd(0x617)][_0x4b23bd(0x55d)](_0x1b0bfb[_0x4b23bd(0x35a)]),this['okdb']['log']?.['warn']?.(_0x4b23bd(0x19e)+(_0x1b0bfb[_0x4b23bd(0x4cb)]??'?')+_0x4b23bd(0x47c)+_0x1b0bfb[_0x4b23bd(0x35a)]+_0x4b23bd(0x3c3)+_0x55b181+_0x4b23bd(0x508)+_0x4b23bd(0x3b7),{'feature':_0x4b23bd(0x54c)}));}}}for(const _0x20cfd6 of _0x577e02)this['_removeRowAsync'](_0x20cfd6);if(this[_0x4b23bd(0x2a2)]()){const _0x25cee0=[];for(const {key:_0x378c00}of this[_0x4b23bd(0x36e)](_0x4b23bd(0x276))){if(!_0x40d942['has'](_0x378c00)){if(_0x237ac0)try{this['_desired'][_0x4b23bd(0x315)](_0x4b23bd(0x4b9)+_0x378c00);}catch{}else _0x25cee0[_0x4b23bd(0x26a)](this['_desired'][_0x4b23bd(0x53b)]('node/'+_0x378c00));}}if(_0x25cee0['length'])await Promise[_0x4b23bd(0x422)](_0x25cee0);}}[_0x49be05(0x3a9)](_0x53a9cb=null){const _0x1669c5=_0x49be05;if(this[_0x1669c5(0x392)])return;if(!this[_0x1669c5(0x5ed)]||!this[_0x1669c5(0x470)]){this[_0x1669c5(0x3e7)]?.[_0x1669c5(0x581)]?.[_0x1669c5(0x21d)]?.(_0x1669c5(0x1b9)+this['_isWriter']+_0x1669c5(0x2e0)+!!this[_0x1669c5(0x470)]+_0x1669c5(0x553),{'feature':'processes'});return;}this[_0x1669c5(0x480)]=_0x53a9cb,this[_0x1669c5(0x5c6)]=()=>this[_0x1669c5(0x199)]();for(const _0x190ec3 of _0x44adea)this[_0x1669c5(0x3e7)][_0x1669c5(0x51f)]['on'](_0x190ec3,this[_0x1669c5(0x5c6)]);this[_0x1669c5(0x1a1)]();const _0x2dba0c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2849a2;this[_0x1669c5(0x392)]=setInterval(()=>{const _0xfddb1c=_0x1669c5;if(this['_onTick'])try{this[_0xfddb1c(0x480)]();}catch{}this[_0xfddb1c(0x1a1)](),this[_0xfddb1c(0x474)]()[_0xfddb1c(0x536)](()=>{});},_0x2dba0c);if(this[_0x1669c5(0x392)][_0x1669c5(0x2f9)])this['_hbTimer'][_0x1669c5(0x2f9)]();}[_0x49be05(0x199)](){const _0x3209be=_0x49be05;if(!this[_0x3209be(0x5ed)]||!this[_0x3209be(0x470)])return;if(Date['now']()-this['_lastPublishAt']<_0x354dce)return;this['_publishNow']();}[_0x49be05(0x1a1)](){const _0x2c43d8=_0x49be05;if(!this[_0x2c43d8(0x5ed)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x2c43d8(0x600)]();try{const _0x5ad86c=[this[_0x2c43d8(0x637)]()];for(const _0x38ae96 of this[_0x2c43d8(0x24d)][_0x2c43d8(0x28e)]())_0x5ad86c[_0x2c43d8(0x26a)](this['_buildChildRow'](_0x38ae96));const _0x47d9f7=_0x1456da[_0x2c43d8(0x648)]?_0x1456da[_0x2c43d8(0x600)]():0x0;for(const _0xe5361c of _0x5ad86c){try{this['_putRowSync'](_0xe5361c),this[_0x2c43d8(0x449)]=![];}catch(_0x4394d3){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x2c43d8(0x3e7)]?.[_0x2c43d8(0x581)]?.[_0x2c43d8(0x21d)]?.(_0x2c43d8(0x3dc)+_0x4394d3[_0x2c43d8(0x34d)],{'feature':_0x2c43d8(0x3b2)}));}}if(_0x1456da[_0x2c43d8(0x648)])_0x1456da[_0x2c43d8(0x37f)](_0x2c43d8(0x36a),_0x1456da[_0x2c43d8(0x600)]()-_0x47d9f7,_0x2c43d8(0x62d)+_0x5ad86c[_0x2c43d8(0x548)]+'\x20sync');}catch(_0x33e0f4){!this[_0x2c43d8(0x449)]&&(this[_0x2c43d8(0x449)]=!![],this['okdb']?.[_0x2c43d8(0x581)]?.[_0x2c43d8(0x21d)]?.(_0x2c43d8(0x3dc)+_0x33e0f4[_0x2c43d8(0x34d)],{'feature':_0x2c43d8(0x3b2)}));}}async[_0x49be05(0x634)](){const _0x31433a=_0x49be05;if(this[_0x31433a(0x5c6)]){for(const _0xb62644 of _0x44adea){try{this[_0x31433a(0x3e7)]['events']['off'](_0xb62644,this[_0x31433a(0x5c6)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this[_0x31433a(0x392)]),this['_hbTimer']=null);try{if(this[_0x31433a(0x470)]&&this[_0x31433a(0x5ed)])await this[_0x31433a(0x5e2)](this[_0x31433a(0x462)]);}catch{}}async[_0x49be05(0x2d5)](){const _0x343023=_0x49be05;if(!this[_0x343023(0x470)]||!this['_isWriter'])return;try{await this[_0x343023(0x5e2)](this[_0x343023(0x462)]);}catch{}try{const _0x563512=[];for(const {value:_0x28df41}of this[_0x343023(0x470)][_0x343023(0x3a2)](_0x4faa8e)){if(_0x28df41?.[_0x343023(0x215)]===process['pid']&&_0x28df41[_0x343023(0x44e)])_0x563512[_0x343023(0x26a)](_0x28df41[_0x343023(0x44e)]);}for(const _0x55c969 of _0x563512){try{await this[_0x343023(0x5e2)](_0x55c969);}catch{}}}catch{}}async['publishOwnRow'](){const _0x553b95=_0x49be05;return this[_0x553b95(0x3e5)](this['_buildOwnRow']());}async[_0x49be05(0x31c)](_0x3c798f){const _0x2335be=_0x49be05;if(!this[_0x2335be(0x470)]||!this['_isWriter'])return;return this[_0x2335be(0x3e5)](this['_buildChildRow'](_0x3c798f));}[_0x49be05(0x5d3)]({pid:_0x2df583,startedAt:_0x4a3d13,kind:_0x12139f,supervisorKey:_0x2c0af7,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x49be05(0x4f1),meta:meta=null,stats:stats=null}){const _0x2c8f9d=_0x49be05,_0x32c8de=Date['now'](),_0x274a21=_0x12c1a8(_0x2df583,_0x4a3d13);return{'nodeKey':_0x1bceeb(_0x274a21,'0'),'processKey':_0x274a21,'instanceId':'0','pid':_0x2df583,'startedAt':_0x4a3d13,'ppid':process[_0x2c8f9d(0x4cb)],'host':_0x40bc4a['hostname'](),'supervisorKey':_0x2c0af7,'slot':slot,'slotKey':slotKey,'kind':_0x12139f,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x32c8de,'expiresAt':_0x32c8de+_0x622167,'caps':this[_0x2c8f9d(0x5df)](_0x12139f,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x17cbc7){const _0x43e4fc=_0x49be05;if(!_0x17cbc7?.[_0x43e4fc(0x4cb)])return null;const _0x23db63=_0x12c1a8(_0x17cbc7[_0x43e4fc(0x4cb)],_0x17cbc7[_0x43e4fc(0x32d)]);this[_0x43e4fc(0x24d)][_0x43e4fc(0x389)](_0x23db63,{..._0x17cbc7,'supervisorKey':_0x17cbc7[_0x43e4fc(0x54d)]??this[_0x43e4fc(0x587)]});if(this[_0x43e4fc(0x5ed)])await this[_0x43e4fc(0x31c)](this[_0x43e4fc(0x24d)][_0x43e4fc(0x61a)](_0x23db63))[_0x43e4fc(0x536)]?.(()=>{});return _0x23db63;}[_0x49be05(0x2f0)](_0x2c67de){const _0x287a50=_0x49be05;if(!_0x2c67de)return;return this[_0x287a50(0x24d)][_0x287a50(0x48d)](_0x2c67de),this[_0x287a50(0x5e2)](_0x2c67de);}['_sampleOwnStats'](){const _0x10abab=_0x49be05,_0x3b89dc=Date[_0x10abab(0x600)](),_0x1f09ca=process[_0x10abab(0x377)](),_0x1ece0b=(_0x3b89dc-this[_0x10abab(0x643)])*0x3e8;if(_0x1ece0b>=0x3d090){const _0x3abe9f=_0x1f09ca['user']-this[_0x10abab(0x533)][_0x10abab(0x257)]+(_0x1f09ca[_0x10abab(0x5e0)]-this[_0x10abab(0x533)]['system']),_0x3cd4d1=_0x40bc4a[_0x10abab(0x356)]()[_0x10abab(0x548)]||0x1;this[_0x10abab(0x3fc)]=Math[_0x10abab(0x243)](0x64,Math[_0x10abab(0x32b)](_0x3abe9f/(_0x1ece0b*_0x3cd4d1)*0x64)),this[_0x10abab(0x20a)]=Math[_0x10abab(0x32b)](_0x1ece0b/0x3e8),this[_0x10abab(0x533)]=_0x1f09ca,this[_0x10abab(0x643)]=_0x3b89dc;}const _0x2e2b6c=process[_0x10abab(0x50a)](),_0x3862fc=this[_0x10abab(0x3bb)][_0x10abab(0x4e5)];let _0x23a13f=0x0;if(_0x3862fc>0x0){const _0x19fcb4=[this[_0x10abab(0x3e7)],...this[_0x10abab(0x3e7)]['_envs']?.['values']?.()??[]];for(const _0x1c2f1d of _0x19fcb4){const _0x242f44=_0x1c2f1d['functions']?.[_0x10abab(0x55e)];if(_0x242f44)_0x23a13f+=_0x242f44['liveThreadStats'][_0x10abab(0x523)];}}let _0x4b5809=null;const _0x31b541=_0x3862fc;if(_0x31b541>0x0){let _0x40ebc4=0x0;for(const _0x3aafae of this[_0x10abab(0x3bb)][_0x10abab(0x28e)]())_0x40ebc4+=_0x3aafae[_0x10abab(0x394)]||0x0;_0x4b5809={'count':_0x31b541,'heapUsed':_0x40ebc4,'sandbox':_0x3862fc,'busy':_0x23a13f};}return{'rss':_0x2e2b6c['rss'],'heapUsed':_0x2e2b6c['heapUsed'],'heapTotal':_0x2e2b6c[_0x10abab(0x1e4)],'external':_0x2e2b6c[_0x10abab(0x503)],'cpuPct':this[_0x10abab(0x3fc)],'cpuWindowMs':this[_0x10abab(0x20a)]??null,'threads':_0x4b5809,'at':_0x3b89dc};}[_0x49be05(0x426)](_0x434de8,_0x8502b1){const _0x2df67f=_0x49be05;if(!_0x434de8||!_0x8502b1)return;this[_0x2df67f(0x3bb)]['set'](_0x434de8,_0x8502b1);}['clearThreadStats'](_0x4931fe){const _0x2b94f1=_0x49be05;this[_0x2b94f1(0x3bb)]['delete'](_0x4931fe);}[_0x49be05(0x3f8)](_0x3b8c62,_0x2e6f90,_0x3a8d10=undefined){const _0x177f24=_0x49be05,_0x3b8cf9=this['_children'][_0x177f24(0x61a)](_0x3b8c62);if(!_0x3b8cf9||!_0x2e6f90)return;if(_0x3a8d10!==undefined)_0x3b8cf9[_0x177f24(0x252)]=_0x3a8d10;_0x3b8cf9['stats']={'rss':_0x2e6f90[_0x177f24(0x4a9)]??null,'heapUsed':_0x2e6f90[_0x177f24(0x394)]??null,'heapTotal':_0x2e6f90[_0x177f24(0x1e4)]??null,'external':_0x2e6f90[_0x177f24(0x503)]??null,'cpuPct':_0x2e6f90[_0x177f24(0x4bc)]??null,'cpuWindowMs':_0x2e6f90['cpuWindowMs']??null,'threads':_0x2e6f90['threads']??null,'claims':_0x2e6f90[_0x177f24(0x283)]??null,'envsOpen':_0x2e6f90[_0x177f24(0x35c)]??null,'at':Date[_0x177f24(0x600)]()};}[_0x49be05(0x637)](){const _0x1258d3=_0x49be05,_0x1c4c20=Date[_0x1258d3(0x600)](),_0x57f914=this['okdb'][_0x1258d3(0x33a)]||{},_0x1fab4c=this[_0x1258d3(0x1f2)]||_0x1258d3(0x607);return{'nodeKey':this[_0x1258d3(0x462)],'processKey':this[_0x1258d3(0x587)],'instanceId':this[_0x1258d3(0x26e)],'pid':process[_0x1258d3(0x4cb)],'startedAt':this[_0x1258d3(0x62a)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1258d3(0x215)]==='number'?process[_0x1258d3(0x215)]:null,'host':_0x40bc4a[_0x1258d3(0x39f)](),'supervisorKey':this[_0x1258d3(0x212)]??null,'version':require$$3[_0x1258d3(0x35a)],'kind':_0x1fab4c,'role':{'engines':!!_0x57f914[_0x1258d3(0x5f1)],'processors':!!_0x57f914['processors'],'compaction':_0x57f914[_0x1258d3(0x631)],'http':_0x57f914['http']},'listenAddr':this[_0x1258d3(0x278)]??null,'heartbeatAt':_0x1c4c20,'expiresAt':_0x1c4c20+_0x622167,'caps':this[_0x1258d3(0x5df)](_0x1fab4c,_0x57f914),'lifecycle':{'state':_0x1258d3(0x4f1),'desiredVersionApplied':null},'meta':{...this[_0x1258d3(0x59d)]},'processing':_0x57f914[_0x1258d3(0x639)]?this[_0x1258d3(0x57e)]():null,'engines':_0x57f914[_0x1258d3(0x5f1)]?[...this[_0x1258d3(0x3e7)][_0x1258d3(0x556)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x1258d3(0x246)](),'writers':this[_0x1258d3(0x240)]()};}[_0x49be05(0x240)](){const _0x363f8b=_0x49be05,_0x36170a={};try{for(const [_0x21956e,_0x227432]of this['okdb'][_0x363f8b(0x25b)]){try{const _0x1a95d0=_0x227432['writerStatus']?.();if(!_0x1a95d0)continue;if(!_0x1a95d0[_0x363f8b(0x656)]&&!_0x1a95d0[_0x363f8b(0x51e)]&&!(_0x1a95d0[_0x363f8b(0x562)]??0x0)&&!_0x1a95d0['draining'])continue;_0x36170a[_0x21956e]={'depth':_0x1a95d0[_0x363f8b(0x656)],'oldestPendingMs':_0x1a95d0[_0x363f8b(0x5c5)],'committed':_0x1a95d0[_0x363f8b(0x51e)],'commitsPerSec':_0x1a95d0[_0x363f8b(0x369)],'commitP99Ms':_0x1a95d0[_0x363f8b(0x613)],'parkedNow':_0x1a95d0[_0x363f8b(0x562)]??0x0,'draining':!!_0x1a95d0[_0x363f8b(0x469)]};}catch{}}}catch{}return Object[_0x363f8b(0x222)](_0x36170a)[_0x363f8b(0x548)]?_0x36170a:null;}[_0x49be05(0x26f)](){const _0x20778e=_0x49be05,_0x259f7e=process['pid'],_0x102b59=Date[_0x20778e(0x600)](),_0x5449b9=_0x4efebf=>{const _0xbf216=_0x20778e;if(!_0x4efebf)return[];const _0x23e37b=[];try{for(const {id:_0x3469c0,entry:_0x179b11}of _0x4efebf[_0xbf216(0x4bf)]()){if(_0x179b11?.[_0xbf216(0x4b5)]?.[_0xbf216(0x4cb)]!==_0x259f7e)continue;const _0xc53783=_0x179b11[_0xbf216(0x2a1)]??_0x179b11[_0xbf216(0x1fa)]??0x0;if(_0xc53783+(_0x179b11[_0xbf216(0x4a1)]??0x0)<_0x102b59)continue;_0x23e37b[_0xbf216(0x26a)](_0x3469c0);}}catch{}return _0x23e37b;},_0x19d82b=_0x5449b9(this[_0x20778e(0x530)]('compact')),_0x5641fe=_0x5449b9(this['_singletonLock'](_0x20778e(0x5a3)));if(!_0x19d82b[_0x20778e(0x548)]&&!_0x5641fe['length'])return null;return{'compact':_0x19d82b,'replicate':_0x5641fe};}[_0x49be05(0x530)](_0x3a76bc){const _0x55ee8a=_0x49be05;if(!this[_0x55ee8a(0x3e7)]?.['_rootDb'])return null;if(!this[_0x55ee8a(0x255)])this['_singletonLocks']=new Map();let _0x1706f6=this[_0x55ee8a(0x255)][_0x55ee8a(0x61a)](_0x3a76bc);if(!_0x1706f6)try{_0x1706f6=new _0x11a446(this[_0x55ee8a(0x3e7)][_0x55ee8a(0x23c)],{'namespace':_0x3a76bc}),this['_singletonLocks'][_0x55ee8a(0x389)](_0x3a76bc,_0x1706f6);}catch{return null;}return _0x1706f6;}[_0x49be05(0x57e)](){const _0x4dbeda=_0x49be05,_0x133cd5=[];try{for(const [_0x456b54,_0x2ecd69]of this[_0x4dbeda(0x3e7)][_0x4dbeda(0x25b)]){if(_0x456b54['startsWith']('~'))continue;for(const _0x43affa of _0x2ecd69[_0x4dbeda(0x57d)][_0x4dbeda(0x446)]())_0x133cd5[_0x4dbeda(0x26a)]({..._0x43affa,'env':_0x456b54});}}catch{}return{'participate':this[_0x4dbeda(0x3e7)][_0x4dbeda(0x639)]?.[_0x4dbeda(0x361)]??![],'processors':_0x133cd5};}['_ensureDesired'](){const _0x2d4361=_0x49be05;if(this[_0x2d4361(0x4a3)])return!![];const _0xabd0ae=this[_0x2d4361(0x3e7)][_0x2d4361(0x23c)];if(!_0xabd0ae)return![];return this[_0x2d4361(0x4a3)]=_0xabd0ae[_0x2d4361(0x398)](_0x2d85d8,{'dupSort':![]}),this[_0x2d4361(0x51c)]=_0xabd0ae[_0x2d4361(0x398)](_0x1cd33f,{'dupSort':![]}),!![];}async[_0x49be05(0x415)](){const _0x1470a6=_0x49be05;if(!this[_0x1470a6(0x2a2)]())return;const _0x41b253=_0x1470a6(0x2f4),_0x412288=0x1,_0x5213be=this[_0x1470a6(0x4a3)][_0x1470a6(0x61a)](_0x41b253)??0x0;if(_0x5213be>=_0x412288)return;const _0x24146f=_0x53cf97=>{const _0x436e97=_0x1470a6;if(_0x53cf97===_0x436e97(0x1d1))return'single';if(_0x53cf97===_0x436e97(0x2e1))return _0x436e97(0x31d);return _0x53cf97;};await this[_0x1470a6(0x3e7)][_0x1470a6(0x633)][_0x1470a6(0x3da)]['transaction'](()=>{const _0x301755=_0x1470a6;for(const _0x2d1298 of['procmode/',_0x301755(0x5bd)]){for(const {key:_0x3335e2,value:_0x5bb4ae}of this[_0x301755(0x4a3)][_0x301755(0x3a2)]({'start':_0x2d1298,'end':_0x2d1298+'ÿ'})){if(typeof _0x3335e2!==_0x301755(0x4c7)||!_0x3335e2[_0x301755(0x52f)](_0x2d1298))break;const _0x520821=_0x24146f(_0x5bb4ae[_0x301755(0x34c)]);if(_0x520821!==_0x5bb4ae[_0x301755(0x34c)])this[_0x301755(0x4a3)][_0x301755(0x359)](_0x3335e2,{..._0x5bb4ae,'mode':_0x520821});}}this[_0x301755(0x4a3)]['put'](_0x41b253,_0x412288);});}['hasDesired'](){const _0x1f9128=_0x49be05;return!!this[_0x1f9128(0x4a3)];}[_0x49be05(0x611)](_0x2b259c,_0x219e6c){const _0x22c980=_0x49be05;if(!this[_0x22c980(0x2a2)]())return null;const _0x28013d=_0x2b259c+'/'+_0x219e6c;return this[_0x22c980(0x435)](),this[_0x22c980(0x336)]['get'](_0x28013d)??this['_desired']['get'](_0x28013d)??null;}[_0x49be05(0x435)](){const _0x4d5d29=_0x49be05;if(!_0x237ac0)return;try{this[_0x4d5d29(0x3e7)][_0x4d5d29(0x633)]?.['db']?.[_0x4d5d29(0x638)]?.();}catch{}}async[_0x49be05(0x4c4)](_0x54f4ad,_0x338058,_0x436181){const _0x404f07=_0x49be05;if(!this[_0x404f07(0x2a2)]())return null;const _0x4954b4=_0x54f4ad+'/'+_0x338058;this['_refreshDesiredSnapshot']();const _0x43701f=this['_desiredOverlay'][_0x404f07(0x61a)](_0x4954b4)??this['_desired'][_0x404f07(0x61a)](_0x4954b4)??{'version':0x0},_0x1d8fe3=(_0x43701f[_0x404f07(0x35a)]||0x0)+0x1,_0x1aac3e={..._0x43701f,..._0x436181,'version':_0x1d8fe3,'updatedAt':Date[_0x404f07(0x600)]()};this[_0x404f07(0x336)][_0x404f07(0x389)](_0x4954b4,_0x1aac3e);try{await this[_0x404f07(0x3e7)][_0x404f07(0x633)][_0x404f07(0x3da)]['transaction'](()=>{const _0x24443c=_0x404f07;this[_0x24443c(0x4a3)][_0x24443c(0x359)](_0x4954b4,_0x1aac3e);});}finally{if(this[_0x404f07(0x336)][_0x404f07(0x61a)](_0x4954b4)===_0x1aac3e)this[_0x404f07(0x336)][_0x404f07(0x48d)](_0x4954b4);}return _0x1d8fe3;}[_0x49be05(0x36e)](_0xa1bca3){const _0x2eb673=_0x49be05;if(!this['_ensureDesired']())return[];this['_refreshDesiredSnapshot']();const _0x4d6ee2=_0xa1bca3+'/',_0x1d57fd=[];for(const {key:_0x45d6de,value:_0x414cca}of this[_0x2eb673(0x4a3)]['getRange']({'start':_0x4d6ee2,'end':_0x4d6ee2+'ÿ'})){if(typeof _0x45d6de!=='string'||!_0x45d6de['startsWith'](_0x4d6ee2))break;_0x1d57fd[_0x2eb673(0x26a)]({'key':_0x45d6de[_0x2eb673(0x30b)](_0x4d6ee2[_0x2eb673(0x548)]),'value':_0x414cca});}return _0x1d57fd;}['getCmd'](_0x102aa1){const _0x252bc1=_0x49be05;if(!this[_0x252bc1(0x2a2)]())return null;return this[_0x252bc1(0x51c)][_0x252bc1(0x61a)](_0x102aa1)??null;}async[_0x49be05(0x2bf)](_0x2a834a,_0xfd8042,_0x3149cf={}){const _0x9f4509=_0x49be05;if(!this[_0x9f4509(0x2a2)]())return null;let _0x52f112;return await this[_0x9f4509(0x3e7)][_0x9f4509(0x633)][_0x9f4509(0x3da)]['transaction'](()=>{const _0x53de5f=_0x9f4509,_0x4e30f0=this[_0x53de5f(0x51c)][_0x53de5f(0x61a)](_0x2a834a)||{'epoch':0x0};_0x52f112=(_0x4e30f0['epoch']||0x0)+0x1,this[_0x53de5f(0x51c)][_0x53de5f(0x359)](_0x2a834a,{..._0x4e30f0,..._0x3149cf,'cmd':_0xfd8042,'epoch':_0x52f112,'updatedAt':Date['now']()});}),_0x52f112;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x18bc46,'nodeKey':_0x12c1a8,'logicalKey':_0x2fc967,'slotKey':_0x16ec9e,'PROCESS_ENV':_0x452c0b,'NODE_TYPE':_0x4faa8e},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x28b498=_0x2e4d80;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x12e90d=require$$0$6,{EVENTS:_0x37efe5,CHANGE_ACTIONS:_0x42453d}=requireOkdbEnums(),{LOOP:_0x517784}=requireOkdbLoopMonitor(),_0x27e8bc=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4515a3=0x5,_0x4de980=0x2710;class _0x45ff34 extends _0x12e90d{constructor(_0x601660,_0x24e3bb={}){const _0x30ce99=_0x19c4;super(),this[_0x30ce99(0x3e7)]=_0x601660,this[_0x30ce99(0x234)]=_0x24e3bb[_0x30ce99(0x202)]??_0x27e8bc,this[_0x30ce99(0x35f)]=_0x24e3bb['flushDebounce']??_0x4515a3,this[_0x30ce99(0x511)]=_0x24e3bb[_0x30ce99(0x407)]??_0x4de980,this[_0x30ce99(0x4fc)]=![],this['_cursors']=new Map(),this[_0x30ce99(0x3a8)]=new Map(),this[_0x30ce99(0x236)]=new Map(),this[_0x30ce99(0x61d)]=null,this[_0x30ce99(0x50e)]=![],this[_0x30ce99(0x41c)]=new Set(),this[_0x30ce99(0x1da)]=_0x2701d6=>this['_handleInProcess'](_0x2701d6),this[_0x30ce99(0x30a)]=_0x3eb6cf=>this[_0x30ce99(0x44a)](_0x3eb6cf),this[_0x30ce99(0x519)]=()=>this[_0x30ce99(0x49c)]();}['start'](){const _0x2d20df=_0x19c4;if(this[_0x2d20df(0x4fc)])return;this[_0x2d20df(0x4fc)]=!![];for(const [_0x2b240e,_0x5acdb9]of this[_0x2d20df(0x3e7)][_0x2d20df(0x25b)]){if(_0x2b240e[_0x2d20df(0x52f)]('~'))continue;try{_0x5acdb9[_0x2d20df(0x542)]();}catch{}}for(const [_0x382553,_0x4f8e3a]of this[_0x2d20df(0x3e7)][_0x2d20df(0x25b)]){if(_0x382553[_0x2d20df(0x52f)]('~'))continue;try{this['_baselines'][_0x2d20df(0x389)](_0x382553,_0x4f8e3a['getClock']()||0x0);}catch{}}const {events:_0x120fd3}=this[_0x2d20df(0x3e7)];_0x120fd3['on'](_0x37efe5[_0x2d20df(0x298)],this['_onItem']),_0x120fd3['on'](_0x37efe5['ITEM_UPDATE'],this[_0x2d20df(0x1da)]),_0x120fd3['on'](_0x37efe5[_0x2d20df(0x238)],this[_0x2d20df(0x1da)]),_0x120fd3['on'](_0x37efe5[_0x2d20df(0x33d)],this[_0x2d20df(0x30a)]),_0x120fd3[_0x2d20df(0x27b)](_0x37efe5[_0x2d20df(0x4c3)],this['_onStop']);}['stop'](){const _0x384a5c=_0x19c4;if(!this[_0x384a5c(0x4fc)])return;this[_0x384a5c(0x4fc)]=![];const {events:_0x244320}=this[_0x384a5c(0x3e7)];_0x244320[_0x384a5c(0x3e8)](_0x37efe5[_0x384a5c(0x298)],this[_0x384a5c(0x1da)]),_0x244320['off'](_0x37efe5[_0x384a5c(0x272)],this[_0x384a5c(0x1da)]),_0x244320[_0x384a5c(0x3e8)](_0x37efe5[_0x384a5c(0x238)],this[_0x384a5c(0x1da)]),_0x244320[_0x384a5c(0x3e8)](_0x37efe5[_0x384a5c(0x33d)],this[_0x384a5c(0x30a)]);try{_0x244320[_0x384a5c(0x3e8)](_0x37efe5['SYSTEM_STOPPED'],this['_onStop']);}catch{}this[_0x384a5c(0x61d)]&&(clearTimeout(this[_0x384a5c(0x61d)]),this[_0x384a5c(0x61d)]=null),this[_0x384a5c(0x236)]['clear'](),this[_0x384a5c(0x63c)][_0x384a5c(0x1dc)](),this[_0x384a5c(0x3a8)][_0x384a5c(0x1dc)](),this[_0x384a5c(0x41c)][_0x384a5c(0x1dc)]();}[_0x28b498(0x551)](_0x509006,_0x540628,_0xe1cc06,_0x575158){return _0x509006+'\x00'+_0x540628+'\x00'+_0xe1cc06+'\x00'+_0x575158;}[_0x28b498(0x5b9)](_0x5804c9,_0x21f357,_0x304417,_0x2f7a6d){const _0x475504=_0x28b498,_0x42980b=this[_0x475504(0x551)](_0x5804c9,_0x21f357,_0x304417,_0x2f7a6d);if(this['_seen'][_0x475504(0x3e4)](_0x42980b))return![];this[_0x475504(0x41c)][_0x475504(0x55d)](_0x42980b);if(this[_0x475504(0x41c)][_0x475504(0x4e5)]>this[_0x475504(0x511)]){const _0x3b0d70=this[_0x475504(0x41c)][_0x475504(0x28e)]()[_0x475504(0x44c)]()[_0x475504(0x333)];this[_0x475504(0x41c)][_0x475504(0x48d)](_0x3b0d70);}return!![];}['_handleInProcess'](_0x90b3c){const _0x2aa827=_0x28b498;if(!this[_0x2aa827(0x4fc)]||!_0x90b3c)return;const {env:_0x167199,type:_0x158eac,key:_0x36f6c1,clock:_0x4a7284,origin:_0x4dc2e3,action:_0x20fb56,newValue:_0x3d10f1,oldValue:_0x3326d6}=_0x90b3c;if(_0x167199==null||_0x158eac==null||_0x36f6c1==null)return;if(typeof _0x167199===_0x2aa827(0x4c7)&&_0x167199[_0x2aa827(0x52f)]('~'))return;if(typeof _0x158eac===_0x2aa827(0x4c7)&&_0x158eac[_0x2aa827(0x52f)]('~'))return;if(!this['_markSeen'](_0x167199,_0x158eac,_0x36f6c1,_0x4a7284))return;const _0x5c3c60=_0x20fb56===_0x42453d['REMOVE']?_0x2aa827(0x53b):_0x2aa827(0x359);this[_0x2aa827(0x4d8)](_0x2aa827(0x2f1),{'env':_0x167199,'type':_0x158eac,'key':_0x36f6c1,'op':_0x5c3c60,'clock':_0x4a7284,'origin':_0x4dc2e3,'value':_0x5c3c60==='remove'?null:_0x3d10f1,'prevValue':_0x3326d6});}[_0x28b498(0x44a)](_0x14e751){const _0x839769=_0x28b498;if(!this[_0x839769(0x4fc)])return;if(!_0x14e751||typeof _0x14e751[_0x839769(0x408)]!==_0x839769(0x4c7)||typeof _0x14e751['type']!==_0x839769(0x4c7))return;const {env:_0x116e3f,type:_0xfdb290}=_0x14e751;if(_0x116e3f[_0x839769(0x52f)]('~')||_0xfdb290[_0x839769(0x52f)]('~'))return;this[_0x839769(0x236)][_0x839769(0x389)](_0x116e3f+'\x00'+_0xfdb290,{'env':_0x116e3f,'type':_0xfdb290}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x4f5349=_0x28b498;if(this[_0x4f5349(0x61d)])return;const _0x10f153=()=>{const _0x2ca56f=_0x4f5349;this['_flushTimer']=null,this[_0x2ca56f(0x3e9)]()[_0x2ca56f(0x536)](()=>{});};this[_0x4f5349(0x61d)]=setTimeout(_0x10f153,this[_0x4f5349(0x35f)]>0x0?this[_0x4f5349(0x35f)]:0x0);}async['_drain'](){const _0x5159f8=_0x28b498;if(this['_draining']){this[_0x5159f8(0x5a6)]();return;}this['_draining']=!![];try{const _0x1e96bb=[...this[_0x5159f8(0x236)][_0x5159f8(0x28e)]()];this[_0x5159f8(0x236)][_0x5159f8(0x1dc)]();let _0x27fb43=![];for(const {env:_0x5e8ab1,type:_0x5e3fc1}of _0x1e96bb){try{const _0x2c5e14=await this[_0x5159f8(0x3fe)](_0x5e8ab1,_0x5e3fc1);if(_0x2c5e14)_0x27fb43=!![];}catch{this[_0x5159f8(0x236)][_0x5159f8(0x389)](_0x5e8ab1+'\x00'+_0x5e3fc1,{'env':_0x5e8ab1,'type':_0x5e3fc1}),_0x27fb43=!![];}}if(_0x27fb43||this[_0x5159f8(0x236)]['size']>0x0)this[_0x5159f8(0x5a6)]();}finally{this['_draining']=![];}}async[_0x28b498(0x3fe)](_0x15bc92,_0x3fcae9){const _0x36b006=_0x28b498,_0x4d854c=await this[_0x36b006(0x3e7)][_0x36b006(0x1a8)](_0x15bc92),_0x3242a1=_0x15bc92+'\x00'+_0x3fcae9;!this['_cursors']['has'](_0x3242a1)&&(!this[_0x36b006(0x3a8)][_0x36b006(0x3e4)](_0x15bc92)&&(_0x4d854c['_enableChangelog'](),this[_0x36b006(0x3a8)][_0x36b006(0x389)](_0x15bc92,_0x4d854c['getClock']()||0x0)),this[_0x36b006(0x63c)]['set'](_0x3242a1,this[_0x36b006(0x3a8)][_0x36b006(0x61a)](_0x15bc92)));const _0x2b86f5=this[_0x36b006(0x63c)][_0x36b006(0x61a)](_0x3242a1),_0x562d3f=_0x4d854c[_0x36b006(0x4cd)](_0x3fcae9)||0x0;if(_0x562d3f<=_0x2b86f5)return![];const _0x2b45a5=_0x2b86f5+this[_0x36b006(0x234)],_0x1d2bf4=Math[_0x36b006(0x243)](_0x562d3f,_0x2b45a5),_0x2c0fb4=_0x517784[_0x36b006(0x648)]?_0x517784[_0x36b006(0x600)]():0x0,_0x142def=Array[_0x36b006(0x373)](_0x4d854c[_0x36b006(0x1cd)](_0x3fcae9,_0x2b86f5+0x1,_0x1d2bf4));let _0x92d27a=_0x2b86f5;for(const _0x5610ad of _0x142def){const {clock:_0x42c531,key:_0x461eb0,action:_0x54e356,origin:_0x7e3497}=_0x5610ad;if(_0x42c531>_0x92d27a)_0x92d27a=_0x42c531;if(_0x461eb0==null)continue;if(!this[_0x36b006(0x5b9)](_0x15bc92,_0x3fcae9,_0x461eb0,_0x42c531))continue;let _0xda55,_0x510c97;if(_0x54e356===_0x42453d[_0x36b006(0x489)])_0xda55=_0x36b006(0x53b),_0x510c97=null;else{const _0x2dda31=_0x4d854c['get'](_0x3fcae9,_0x461eb0);_0x2dda31==null?(_0xda55='remove',_0x510c97=null):(_0xda55='put',_0x510c97=_0x2dda31);}this['emit']('change',{'env':_0x15bc92,'type':_0x3fcae9,'key':_0x461eb0,'op':_0xda55,'clock':_0x42c531,'origin':_0x7e3497,'value':_0x510c97});}if(_0x517784['enabled'])_0x517784['note']('feed:'+_0x15bc92+':'+_0x3fcae9,_0x517784[_0x36b006(0x600)]()-_0x2c0fb4,'n='+_0x142def[_0x36b006(0x548)]);return this[_0x36b006(0x63c)]['set'](_0x3242a1,Math[_0x36b006(0x3c6)](_0x92d27a,_0x1d2bf4)),_0x4d854c[_0x36b006(0x4cd)](_0x3fcae9)>_0x1d2bf4;}[_0x28b498(0x1d5)](){const _0x2b2e56=_0x28b498;return{'started':this[_0x2b2e56(0x4fc)],'quantum':this[_0x2b2e56(0x234)],'flushDebounce':this[_0x2b2e56(0x35f)],'cursors':Object[_0x2b2e56(0x406)]([...this[_0x2b2e56(0x63c)][_0x2b2e56(0x57f)]()][_0x2b2e56(0x2c1)](([_0x5e1c47,_0x45b54b])=>[_0x5e1c47['replace']('\x00',':'),_0x45b54b])),'pending':this['_pending']['size'],'seen':this[_0x2b2e56(0x41c)]['size']};}}return _0x45ff34['CHANGEFEED_QUANTUM']=_0x27e8bc,okdbChangefeed={'OKDBChangefeed':_0x45ff34},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2e1ee8=_0x2e4d80;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x99dc57=require$$1$2,_0x3ecb2c=require$$1,{EVENTS:_0x55924e}=requireOkdbEnums(),_0x407a7f=require$$0,{slotKey:_0x2c845b}=requireOkdbProcessRegistry(),_0xf37272=0xfa,_0x4dbf54=0xfa0,_0x11f468=0x5,_0x17791d=0x2710,_0x11cd04=0xbb8,_0x337092=0x7d0,_0x25418a=_0x2e1ee8(0x610),_0xbad322=_0x2e1ee8(0x248),_0x9a56b2=_0x2e1ee8(0x581),_0x4dbaa3=_0x2e1ee8(0x436),_0x26d6e7=[_0x55924e[_0x2e1ee8(0x401)],_0x55924e['FTS_REGISTERED'],_0x55924e[_0x2e1ee8(0x4ec)],_0x55924e[_0x2e1ee8(0x5c4)],_0x55924e['INDEX_PROGRESS'],_0x55924e[_0x2e1ee8(0x495)],_0x55924e[_0x2e1ee8(0x5f8)],_0x55924e['INDEX_REGISTERED'],_0x2e1ee8(0x586),'processor:progress',_0x2e1ee8(0x36b),_0x2e1ee8(0x24e),_0x2e1ee8(0x2fa),_0x2e1ee8(0x314)],_0x37c0cb=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4d2d72({workers:_0x559635,makeOkdb:_0xb4356a,port:_0x573256,primaryOkdb:_0x21aaf3,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x1f5b9b=_0x2e1ee8;if(_0x99dc57[_0x1f5b9b(0x52d)])return childEntry&&_0x99dc57[_0x1f5b9b(0x209)]({'exec':_0x3ecb2c[_0x1f5b9b(0x482)](__dirname,_0x1f5b9b(0x2c9)),'args':[],'execArgv':((()=>{const _0xe51f0=_0x1f5b9b,_0x5421fc=[];for(let _0x28900a=0x0;_0x28900a<process['execArgv'][_0xe51f0(0x548)];_0x28900a++){const _0x52fd06=process['execArgv'][_0x28900a];if(_0x52fd06[_0xe51f0(0x52f)](_0xe51f0(0x43b))||_0x52fd06['startsWith'](_0xe51f0(0x271))||_0x52fd06[_0xe51f0(0x52f)](_0xe51f0(0x1b0)))continue;if(_0x52fd06==='-e'||_0x52fd06===_0xe51f0(0x34a)||_0x52fd06==='-p'||_0x52fd06==='--print'){_0x28900a++;continue;}_0x5421fc[_0xe51f0(0x26a)](_0x52fd06);}return _0x5421fc;})())}),_0x545e4e({'workers':_0x559635,'port':_0x573256,'primaryOkdb':_0x21aaf3,'workerEnv':workerEnv});return _0x139880({'makeOkdb':_0xb4356a,'port':_0x573256});}function _0x545e4e({workers:_0x1816c8,port:_0x4ee860,primaryOkdb:_0x4d8d28,workerEnv:_0x224c46}){const _0xe6716e=_0x2e1ee8,_0x4fa08a=new Map(),_0x2514c9=new Map();let _0x5ac99d=![];const _0x46b825=_0x479870=>_0x479870?.[_0xe6716e(0x53c)],_0x458345=_0x243d40=>{const _0x142c51=_0xe6716e,_0x5cd244=_0x99dc57[_0x142c51(0x624)]({...process.env,..._0x224c46||{},'OKDB_CLUSTER_SLOT':String(_0x243d40)});return _0x5cd244[_0x142c51(0x53c)]=_0x243d40,_0x4fa08a['set'](_0x5cd244['process'][_0x142c51(0x4cb)],{'worker':_0x5cd244,'startedAt':Date[_0x142c51(0x600)](),'slot':_0x243d40}),_0x5cd244['on'](_0x142c51(0x196),_0x552e7f=>{const _0x516612=_0x142c51;console[_0x516612(0x581)](_0x516612(0x25a)+_0x5cd244[_0x516612(0x4ef)][_0x516612(0x4cb)]+_0x516612(0x40a)+(_0x552e7f?.[_0x516612(0x34d)]??_0x552e7f));}),_0x5cd244['on'](_0x142c51(0x565),()=>_0x3a8f21()),_0x5cd244;},_0x35267b=_0x4494d9=>{const _0x4a1eee=_0xe6716e;for(const {worker:_0x192552}of _0x4fa08a[_0x4a1eee(0x28e)]()){if(_0x192552[_0x4a1eee(0x30c)]()||!_0x192552['isConnected']())continue;try{_0x192552[_0x4a1eee(0x5cf)](_0x4494d9);}catch{}}};_0x4d8d28?.['_activateProcesses']?.({'kind':_0xe6716e(0x502),'listenAddr':':'+_0x4ee860})[_0xe6716e(0x536)](()=>{}),_0x4d8d28?.[_0xe6716e(0x3b2)]?.['setOwnMeta']?.({'workersConfigured':_0x1816c8});const _0x439dc5={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x3a8f21=()=>{const _0x404aeb=_0xe6716e,_0x4834f1=_0x4d8d28?.[_0x404aeb(0x3b2)];if(!_0x4834f1||!_0x4834f1['_isWriter'])return;const _0x323bc9=_0x4834f1[_0x404aeb(0x441)];for(const {worker:_0x7f4621,startedAt:_0x2ea2fe,slot:_0x215cc9,stats:_0x2078af,processing:_0x15af5d}of _0x4fa08a['values']()){if(_0x7f4621[_0x404aeb(0x30c)]())continue;const _0x2a48fe=_0x4834f1[_0x404aeb(0x1af)]?.()&&_0x4834f1[_0x404aeb(0x611)](_0x404aeb(0x529),_0x36ba56(_0x215cc9))?.[_0x404aeb(0x1b7)]===!![];_0x4834f1[_0x404aeb(0x31c)]({'pid':_0x7f4621[_0x404aeb(0x4ef)][_0x404aeb(0x4cb)],'startedAt':_0x2ea2fe,'kind':_0x404aeb(0x3ef),'supervisorKey':_0x323bc9,'slot':_0x215cc9,'slotKey':_0x36ba56(_0x215cc9),'role':_0x439dc5,'listenAddr':':'+_0x4ee860,'lifecycle':_0x2a48fe?_0x404aeb(0x1ca):'running','processing':_0x15af5d??null,'stats':_0x2078af??null})['catch'](()=>{});}},_0x36ba56=_0x2ac0d4=>_0x2c845b(_0xe6716e(0x1b5)+_0x4ee860,_0x2ac0d4),_0x17139d=_0x468101=>{const _0x4f12ba=_0xe6716e,_0x72df2b=_0x4d8d28?.[_0x4f12ba(0x3b2)];if(!_0x72df2b?.[_0x4f12ba(0x1af)]?.())return![];return _0x72df2b[_0x4f12ba(0x611)](_0x4f12ba(0x529),_0x36ba56(_0x468101))?.[_0x4f12ba(0x1b7)]===!![];};for(let _0x1b8d4e=0x0;_0x1b8d4e<_0x1816c8;_0x1b8d4e++){const _0x41b706=_0x17139d(_0x1b8d4e);_0x2514c9[_0xe6716e(0x389)](_0x1b8d4e,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x41b706,'respawnTimer':null}),_0x41b706?console['log'](_0xe6716e(0x630)+_0x1b8d4e+_0xe6716e(0x370)):_0x458345(_0x1b8d4e);}const _0x250fff=()=>{const _0x302501=_0xe6716e,_0x424f75=_0x4d8d28?.[_0x302501(0x3b2)];if(!_0x424f75?.['_isWriter']||!_0x424f75[_0x302501(0x1af)]?.())return;for(const [_0x34eaea,_0x49a210]of _0x2514c9[_0x302501(0x57f)]()){const _0x11d80d=_0x424f75[_0x302501(0x611)](_0x302501(0x529),_0x36ba56(_0x34eaea)),_0x162ef0=_0x11d80d?.[_0x302501(0x1b7)]===!![],_0x1a004d=_0x11d80d?.['kill']===!![];if(_0x162ef0&&!_0x49a210['dead']){_0x49a210[_0x302501(0x273)]=!![];_0x49a210[_0x302501(0x24c)]&&(clearTimeout(_0x49a210[_0x302501(0x24c)]),_0x49a210['respawnTimer']=null);for(const {worker:_0xf3f1be}of _0x4fa08a[_0x302501(0x28e)]()){if(_0x46b825(_0xf3f1be)!==_0x34eaea||_0xf3f1be['isDead']())continue;try{if(_0x1a004d)_0xf3f1be['process'][_0x302501(0x2b2)](_0x302501(0x3f4));else _0xf3f1be[_0x302501(0x5fc)]()&&_0xf3f1be['disconnect']();}catch{}}console[_0x302501(0x581)](_0x302501(0x2cf)+(_0x1a004d?_0x302501(0x4aa):_0x302501(0x19a))+_0x302501(0x572)+_0x34eaea+_0x302501(0x47b));}else{if(!_0x162ef0&&_0x49a210['dead']&&_0x11d80d){_0x49a210[_0x302501(0x273)]=![],_0x49a210[_0x302501(0x325)]=[],_0x49a210[_0x302501(0x28d)]=0x0;const _0x45e388=[..._0x4fa08a[_0x302501(0x28e)]()]['some'](({worker:_0x35f331})=>_0x46b825(_0x35f331)===_0x34eaea&&!_0x35f331[_0x302501(0x30c)]());!_0x45e388&&!_0x5ac99d&&(_0x458345(_0x34eaea),console[_0x302501(0x581)](_0x302501(0x564)+_0x34eaea));}}}},_0x4fd743=()=>{try{_0x250fff();}catch{}};_0x4d8d28?.[_0xe6716e(0x51f)]?.['on']?.(_0x55924e[_0xe6716e(0x658)],_0x4fd743);const _0x92202=[];if(_0x4d8d28?.[_0xe6716e(0x51f)]?.['on'])for(const _0x3e3e1c of _0x26d6e7){const _0xf34f47=_0x58aaef=>{_0x35267b({[_0x25418a]:_0xbad322,'event':_0x3e3e1c,'data':_0x58aaef??{}});};_0x4d8d28[_0xe6716e(0x51f)]['on'](_0x3e3e1c,_0xf34f47),_0x92202[_0xe6716e(0x26a)]({'event':_0x3e3e1c,'handler':_0xf34f47});}const _0x460a18=setInterval(()=>{_0x250fff(),_0x3a8f21();},_0x37c0cb);_0x460a18[_0xe6716e(0x2f9)]?.();const _0x392468=(_0x20d120,_0x55d42a)=>{const _0x1058cc=_0xe6716e;if(!_0x55d42a||typeof _0x55d42a!==_0x1058cc(0x305)||_0x55d42a[_0x25418a]!==_0x9a56b2)return;if(!_0x4d8d28?.[_0x1058cc(0x581)]?.['ingest'])return;const _0x4770cf=_0x55d42a['entry']||{};_0x4d8d28[_0x1058cc(0x581)][_0x1058cc(0x4d5)]({..._0x4770cf,'msg':'[w'+_0x55d42a[_0x1058cc(0x529)]+']\x20'+(_0x4770cf[_0x1058cc(0x3d0)]??''),'meta':{..._0x4770cf[_0x1058cc(0x5d6)]||{},'worker':_0x55d42a['slot'],'workerPid':_0x55d42a[_0x1058cc(0x4cb)]}});};_0x99dc57['on'](_0xe6716e(0x34d),_0x392468);const _0x34df90=(_0x1431e1,_0x1f2704)=>{const _0x472dda=_0xe6716e;if(!_0x1f2704||typeof _0x1f2704!=='object'||_0x1f2704[_0x25418a]!==_0x4dbaa3)return;const _0x867174=_0x4fa08a[_0x472dda(0x61a)](_0x1431e1[_0x472dda(0x4ef)]['pid']);if(_0x867174){_0x867174[_0x472dda(0x436)]={..._0x1f2704[_0x472dda(0x436)],'at':Date[_0x472dda(0x600)]()};if(_0x1f2704[_0x472dda(0x252)]!==undefined)_0x867174[_0x472dda(0x252)]=_0x1f2704['processing'];}};_0x99dc57['on']('message',_0x34df90),_0x99dc57['on'](_0xe6716e(0x350),(_0x37135d,_0x131ab4,_0x27cb7d)=>{const _0x49619a=_0xe6716e,_0x367795=_0x37135d[_0x49619a(0x4ef)][_0x49619a(0x4cb)],_0x4483dd=_0x46b825(_0x37135d),_0x165777=_0x4fa08a[_0x49619a(0x61a)](_0x367795);if(_0x165777&&_0x4d8d28?.[_0x49619a(0x3b2)])_0x4d8d28[_0x49619a(0x3b2)]['removeNode'](_0x367795+':'+_0x165777[_0x49619a(0x32d)])['catch'](()=>{});_0x4fa08a[_0x49619a(0x48d)](_0x367795),console[_0x49619a(0x581)]('[okdb-cluster]\x20worker\x20pid='+_0x367795+_0x49619a(0x1d2)+(_0x4483dd??'?')+_0x49619a(0x2df)+(_0x49619a(0x1ef)+_0x131ab4+_0x49619a(0x46c)+(_0x27cb7d??_0x49619a(0x1f1))+_0x49619a(0x2a4)+_0x4fa08a['size']+_0x49619a(0x343))),_0x3a8f21();if(_0x5ac99d||_0x4483dd==null)return;const _0x3f2829=_0x2514c9[_0x49619a(0x61a)](_0x4483dd);if(!_0x3f2829||_0x3f2829['dead'])return;const _0x31d3b2=Date[_0x49619a(0x600)]();_0x3f2829['deaths'][_0x49619a(0x26a)](_0x31d3b2),_0x3f2829[_0x49619a(0x325)]=_0x3f2829[_0x49619a(0x325)][_0x49619a(0x1d8)](_0x4caae4=>_0x31d3b2-_0x4caae4<=_0x17791d);if(_0x3f2829['deaths'][_0x49619a(0x548)]>=_0x11f468){_0x3f2829[_0x49619a(0x273)]=!![],console[_0x49619a(0x196)](_0x49619a(0x289)+_0x4483dd+_0x49619a(0x473)+_0x3f2829[_0x49619a(0x325)][_0x49619a(0x548)]+_0x49619a(0x353)+(_0x17791d+_0x49619a(0x345)+_0x4fa08a[_0x49619a(0x4e5)]+_0x49619a(0x4be)));return;}_0x3f2829['consecutiveFailures']++;const _0x53941a=Math['min'](_0x4dbf54,_0xf37272*0x2**(_0x3f2829[_0x49619a(0x28d)]-0x1));console[_0x49619a(0x581)](_0x49619a(0x5d1)+_0x4483dd+'\x20in\x20'+_0x53941a+_0x49619a(0x3ec)+_0x3f2829[_0x49619a(0x28d)]+')'),_0x3f2829[_0x49619a(0x24c)]=setTimeout(()=>{const _0x12fa0f=_0x49619a;_0x3f2829[_0x12fa0f(0x24c)]=null;if(_0x5ac99d||_0x3f2829[_0x12fa0f(0x273)])return;const _0x12a578=_0x458345(_0x4483dd);_0x12a578[_0x12fa0f(0x27b)]('listening',()=>{const _0x2eb505=_0x12fa0f;if(_0x2514c9[_0x2eb505(0x61a)](_0x4483dd)===_0x3f2829)_0x3f2829[_0x2eb505(0x28d)]=0x0;});},_0x53941a),_0x3f2829['respawnTimer'][_0x49619a(0x2f9)]?.();});const _0x1bbedd=[..._0x4fa08a[_0xe6716e(0x222)]()];console['log']('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0x1816c8+_0xe6716e(0x2d2)+_0x4ee860+':\x20'+('['+_0x1bbedd['join'](',\x20')+']'));const _0x1f8e82={'_isClusterController':!![],'port':_0x4ee860,'primaryOkdb':_0x4d8d28??null,'status'(){const _0x2e93c2=_0xe6716e;return{'clustered':!![],'primaryPid':process[_0x2e93c2(0x4cb)],'port':_0x4ee860,'primaryRole':_0x4d8d28?.[_0x2e93c2(0x5e7)]??null,'processorPid':null,'supervisorPid':process[_0x2e93c2(0x4cb)],'workers':[..._0x4fa08a[_0x2e93c2(0x28e)]()][_0x2e93c2(0x2c1)](({worker:_0x243a82})=>({'pid':_0x243a82[_0x2e93c2(0x4ef)][_0x2e93c2(0x4cb)],'id':_0x243a82['id'],'dead':_0x243a82[_0x2e93c2(0x30c)]()}))};},async 'close'(){const _0x3f6616=_0xe6716e;_0x5ac99d=!![];for(const _0x91a83b of _0x2514c9[_0x3f6616(0x28e)]()){_0x91a83b['dead']=!![],_0x91a83b[_0x3f6616(0x24c)]&&(clearTimeout(_0x91a83b[_0x3f6616(0x24c)]),_0x91a83b[_0x3f6616(0x24c)]=null);}clearInterval(_0x460a18),_0x99dc57['off'](_0x3f6616(0x34d),_0x392468),_0x99dc57['off'](_0x3f6616(0x34d),_0x34df90),_0x4d8d28?.[_0x3f6616(0x51f)]?.['off']?.(_0x55924e[_0x3f6616(0x658)],_0x4fd743);if(_0x4d8d28?.[_0x3f6616(0x51f)]?.[_0x3f6616(0x3e8)])for(const {event:_0x580df3,handler:_0xb64361}of _0x92202){try{_0x4d8d28[_0x3f6616(0x51f)][_0x3f6616(0x3e8)](_0x580df3,_0xb64361);}catch{}}_0x92202[_0x3f6616(0x548)]=0x0;const _0x3ec915=[..._0x4fa08a[_0x3f6616(0x28e)]()][_0x3f6616(0x2c1)](({worker:_0x47c837})=>_0x47c837);if(_0x3ec915[_0x3f6616(0x548)]===0x0)return;await Promise[_0x3f6616(0x58d)](_0x3ec915[_0x3f6616(0x2c1)](_0x2e6d73=>new Promise(_0x4f445d=>{const _0x4d4d35=_0x3f6616;if(_0x2e6d73[_0x4d4d35(0x30c)]()){_0x4f445d();return;}let _0x238976=![];const _0x2e211f=()=>{if(_0x238976)return;_0x238976=!![];if(_0x289bde)clearTimeout(_0x289bde);_0x4f445d();};_0x2e6d73[_0x4d4d35(0x27b)](_0x4d4d35(0x350),_0x2e211f);const _0x289bde=setTimeout(()=>{const _0x543575=_0x4d4d35;try{_0x2e6d73[_0x543575(0x4ef)][_0x543575(0x2b2)]();}catch{}},_0x11cd04+0x1f4);_0x289bde[_0x4d4d35(0x2f9)]?.();try{_0x2e6d73['disconnect']();}catch{try{_0x2e6d73[_0x4d4d35(0x4ef)]['kill']();}catch{}}})));}};return _0x1f8e82;}async function _0x139880({makeOkdb:_0x804ddf,port:_0x160d34}){const _0x5ddd23=_0x2e1ee8,_0x430ba5=await _0x804ddf();return _0x6d929f(_0x430ba5),_0x430ba5[_0x5ddd23(0x468)][_0x5ddd23(0x64b)](_0x160d34);}function _0x6d929f(_0x2a0f32){const _0x5efa01=_0x2e1ee8;if(!_0x2a0f32||_0x2a0f32[_0x5efa01(0x1f3)])return;_0x2a0f32[_0x5efa01(0x1f3)]=!![];try{const {OKDBChangefeed:_0x5494b1}=requireOkdbChangefeed(),_0x572781=_0x2a0f32['_adminRelay'];if(_0x572781&&typeof _0x572781[_0x5efa01(0x5e5)]===_0x5efa01(0x4a0)){const _0x313dbb=new _0x5494b1(_0x2a0f32);_0x313dbb[_0x5efa01(0x22c)](),_0x572781[_0x5efa01(0x5e5)](_0x313dbb),_0x2a0f32[_0x5efa01(0x30d)]=_0x313dbb;}}catch(_0x2f1a6b){_0x2a0f32['log']?.[_0x5efa01(0x21d)]?.(_0x5efa01(0x47d)+(_0x2f1a6b?.['message']??_0x2f1a6b),{'feature':_0x5efa01(0x1f4)});}const _0x2ab22f=_0x249e64=>{const _0x27050e=_0x5efa01;if(!_0x249e64||typeof _0x249e64!==_0x27050e(0x305)||_0x249e64[_0x25418a]==null)return;if(_0x249e64[_0x25418a]===_0xbad322)try{_0x2a0f32['_adminRelay']?.['pushEphemeral']?.(_0x249e64[_0x27050e(0x1d3)],_0x249e64[_0x27050e(0x491)]);}catch{}};process['on'](_0x5efa01(0x34d),_0x2ab22f),_0x2a0f32['_clusterOnMessage']=_0x2ab22f;{let _0x37bb2b=process['cpuUsage'](),_0x569b23=Date['now']();const _0x3d7784=()=>{const _0x275897=_0x5efa01;if(typeof process[_0x275897(0x5cf)]!=='function'||!process[_0x275897(0x217)])return;const _0x20bdb6=Date[_0x275897(0x600)](),_0x1bbdb5=process['cpuUsage'](),_0x490364=(_0x20bdb6-_0x569b23)*0x3e8,_0x1f24f3=_0x1bbdb5[_0x275897(0x257)]-_0x37bb2b['user']+(_0x1bbdb5[_0x275897(0x5e0)]-_0x37bb2b[_0x275897(0x5e0)]),_0x53a4d8=_0x490364>0x0?Math['min'](0x64,Math[_0x275897(0x32b)](_0x1f24f3/(_0x490364*(_0x407a7f[_0x275897(0x356)]()['length']||0x1))*0x64)):0x0;_0x37bb2b=_0x1bbdb5,_0x569b23=_0x20bdb6;const _0x11c7b5=process[_0x275897(0x50a)]();let _0x18119c=null;try{_0x18119c=_0x2a0f32[_0x275897(0x5e7)]?.['processors']?_0x2a0f32['processes']?.[_0x275897(0x57e)]?.()??null:null;}catch{}try{process[_0x275897(0x5cf)]({[_0x25418a]:_0x4dbaa3,'stats':{'rss':_0x11c7b5[_0x275897(0x4a9)],'heapUsed':_0x11c7b5[_0x275897(0x394)],'heapTotal':_0x11c7b5[_0x275897(0x1e4)],'external':_0x11c7b5[_0x275897(0x503)],'cpuPct':_0x53a4d8,'cpuWindowMs':Math[_0x275897(0x32b)](_0x490364/0x3e8)||null},'processing':_0x18119c});}catch{}},_0x4ed52a=Math[_0x5efa01(0x3c6)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x26b58b=setInterval(_0x3d7784,_0x4ed52a);_0x26b58b['unref']?.(),_0x3d7784();for(const _0x439799 of[_0x5efa01(0x24e),_0x5efa01(0x2fa)]){_0x2a0f32['events']?.['on']?.(_0x439799,()=>{try{_0x3d7784();}catch{}});}}let _0x2a3a41=![];const _0x1bfc9f=async _0x1f7681=>{const _0x2001fa=_0x5efa01;if(_0x2a3a41)return;_0x2a3a41=!![];const _0x1af84d=setTimeout(()=>process[_0x2001fa(0x350)](_0x1f7681),_0x11cd04);_0x1af84d[_0x2001fa(0x2f9)]?.();try{await _0x2a0f32[_0x2001fa(0x527)]?.();}catch{}process['exit'](_0x1f7681);};process['on']('disconnect',()=>_0x1bfc9f(0x0));if(process['platform']!==_0x5efa01(0x1ff)){const _0x46f2ae=setInterval(()=>{const _0x131ac9=_0x5efa01;if(process[_0x131ac9(0x215)]===0x1)_0x1bfc9f(0x0);},_0x337092);_0x46f2ae['unref']?.(),_0x2a0f32['_clusterOrphanWatch']=_0x46f2ae;}}return okdbCluster={'runClustered':_0x4d2d72,'attachWorkerCluster':_0x6d929f},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x5ed52c=_0x2e4d80;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x5ed52c(0x3e1)]();}catch{}const _0x4a0cbe=require$$1,_0x46e1f8=require$$1$1,{resolveWorkers:_0x6361bf,isShmbufNative:_0x19b215}=requireOkdbWorkers();function _0x3e4438(_0x274940){const _0x2b62ac=_0x5ed52c,_0x3d0e27=_0x274940[_0x2b62ac(0x30b)](0x2),_0x47ccb5={};let _0x1d4c2c=0x0;while(_0x1d4c2c<_0x3d0e27[_0x2b62ac(0x548)]){const _0xe571ab=_0x3d0e27[_0x1d4c2c];if(_0xe571ab==='--port'||_0xe571ab==='-p')_0x47ccb5[_0x2b62ac(0x53e)]=Number(_0x3d0e27[++_0x1d4c2c]);else{if(_0xe571ab===_0x2b62ac(0x5e4)||_0xe571ab==='-d')_0x47ccb5[_0x2b62ac(0x307)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x395)||_0xe571ab==='-k')_0x47ccb5[_0x2b62ac(0x1be)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x635)||_0xe571ab==='-c')_0x47ccb5['config']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x279))_0x47ccb5['logLevel']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab==='--no-repl')_0x47ccb5[_0x2b62ac(0x538)]=!![];else{if(_0xe571ab===_0x2b62ac(0x36f))_0x47ccb5[_0x2b62ac(0x1dd)]=!![];else{if(_0xe571ab===_0x2b62ac(0x625))_0x47ccb5['workers']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab==='--no-cluster')_0x47ccb5[_0x2b62ac(0x629)]=!![];else{if(_0xe571ab==='--env'||_0xe571ab==='-e')_0x47ccb5['env']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x2ed))_0x47ccb5['types']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x2aa))_0x47ccb5['changes']=!![];else{if(_0xe571ab==='--blobs')_0x47ccb5[_0x2b62ac(0x297)]=!![];else{if(_0xe571ab==='--drop')_0x47ccb5['drop']=!![];else{if(_0xe571ab===_0x2b62ac(0x616)){const _0x1a9388=[];while(_0x1d4c2c+0x1<_0x3d0e27[_0x2b62ac(0x548)]&&!_0x3d0e27[_0x1d4c2c+0x1][_0x2b62ac(0x52f)]('--')){_0x1a9388[_0x2b62ac(0x26a)](_0x3d0e27[++_0x1d4c2c]);}_0x47ccb5[_0x2b62ac(0x37b)]=_0x1a9388[_0x2b62ac(0x548)]>0x0?_0x1a9388:!![];}else{if(_0xe571ab==='--log-requests')_0x47ccb5['logRequests']=!![];else{if(_0xe571ab==='--name')_0x47ccb5['name']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x318))_0x47ccb5[_0x2b62ac(0x1fb)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x400))_0x47ccb5[_0x2b62ac(0x3c8)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab==='--permissions')_0x47ccb5['permissions']=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x54e))_0x47ccb5[_0x2b62ac(0x528)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x339))_0x47ccb5[_0x2b62ac(0x532)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x2ae))_0x47ccb5[_0x2b62ac(0x3f6)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x566)||_0xe571ab==='-u')_0x47ccb5[_0x2b62ac(0x3f5)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x516))_0x47ccb5[_0x2b62ac(0x609)]=_0x3d0e27[++_0x1d4c2c];else{if(_0xe571ab===_0x2b62ac(0x260)||_0xe571ab==='-v'){const _0x2c3d5d=require$$3;console[_0x2b62ac(0x581)](_0x2c3d5d['version']),process[_0x2b62ac(0x350)](0x0);}else(_0xe571ab==='--help'||_0xe571ab==='-h')&&(_0x53d1b5(),process[_0x2b62ac(0x350)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x1d4c2c++;}return _0x47ccb5;}function _0x53d1b5(){const _0x491824=_0x5ed52c;console[_0x491824(0x581)](_0x491824(0x492));}const _0x33faea=new Set([_0x5ed52c(0x49f),_0x5ed52c(0x420),_0x5ed52c(0x21d),'error']);function _0x196dfc(_0x29b9e8){const _0x18ae13=_0x5ed52c,_0x480aa2=_0x29b9e8[_0x18ae13(0x51d)]?_0x4a0cbe[_0x18ae13(0x64c)](_0x29b9e8[_0x18ae13(0x51d)]):_0x4a0cbe[_0x18ae13(0x64c)]('.kdbconfig');let _0x4b9f3a={};if(_0x46e1f8[_0x18ae13(0x34b)](_0x480aa2))try{const _0x38a5ca=_0x46e1f8['readFileSync'](_0x480aa2,_0x18ae13(0x2a0))['replace'](/^\uFEFF/,'');_0x4b9f3a=JSON[_0x18ae13(0x1ec)](_0x38a5ca),console[_0x18ae13(0x581)]('[okdb]\x20loaded\x20config:\x20'+_0x480aa2);}catch(_0x3809d2){console[_0x18ae13(0x196)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x480aa2+':\x20'+_0x3809d2['message']),process[_0x18ae13(0x350)](0x1);}const _0x566acc={'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},_0x30d809={'port':_0x29b9e8[_0x18ae13(0x53e)]??_0x4b9f3a[_0x18ae13(0x53e)]??_0x566acc[_0x18ae13(0x53e)]??0x2124,'dbPath':_0x29b9e8[_0x18ae13(0x307)]??_0x4b9f3a[_0x18ae13(0x307)]??_0x566acc[_0x18ae13(0x307)]??_0x18ae13(0x593),'key':_0x29b9e8['key']??_0x4b9f3a[_0x18ae13(0x1be)]??_0x566acc[_0x18ae13(0x1be)]??undefined,'logLevel':_0x29b9e8['logLevel']??_0x4b9f3a['logLevel']??_0x566acc[_0x18ae13(0x1a7)]??'info','noRepl':_0x29b9e8[_0x18ae13(0x538)]??_0x4b9f3a[_0x18ae13(0x538)]??_0x566acc[_0x18ae13(0x538)]??![],'noAdmin':_0x29b9e8[_0x18ae13(0x1dd)]??_0x4b9f3a[_0x18ae13(0x1dd)]??_0x566acc[_0x18ae13(0x1dd)]??![],'admin':_0x4b9f3a[_0x18ae13(0x405)]??{},'api':_0x4b9f3a[_0x18ae13(0x2c5)]??undefined,'auth':_0x4b9f3a['auth']??undefined,'mcp':_0x4b9f3a['mcp']??undefined,'http':_0x4b9f3a['http']??undefined,'timeMachine':_0x4b9f3a['timeMachine']!==![]?_0x4b9f3a[_0x18ae13(0x38a)]??{}:![]};if(_0x29b9e8[_0x18ae13(0x629)])_0x30d809['noCluster']=!![];if(_0x29b9e8['workers']!==undefined)_0x30d809[_0x18ae13(0x464)]=_0x29b9e8[_0x18ae13(0x62c)];return _0x29b9e8[_0x18ae13(0x37b)]!==undefined&&(_0x30d809['auth']=_0x30d809[_0x18ae13(0x65b)]||{},_0x30d809[_0x18ae13(0x65b)][_0x18ae13(0x37b)]=_0x29b9e8[_0x18ae13(0x37b)]),_0x29b9e8[_0x18ae13(0x456)]&&(_0x30d809['debug']=_0x30d809[_0x18ae13(0x49f)]||{},_0x30d809[_0x18ae13(0x49f)]['logRequests']=!![]),(!Number[_0x18ae13(0x497)](_0x30d809[_0x18ae13(0x53e)])||_0x30d809['port']<0x1||_0x30d809['port']>0xffff)&&(console[_0x18ae13(0x196)](_0x18ae13(0x509)+_0x30d809[_0x18ae13(0x53e)]+_0x18ae13(0x56b)),process[_0x18ae13(0x350)](0x1)),!_0x33faea[_0x18ae13(0x3e4)](_0x30d809[_0x18ae13(0x1a7)])&&(console[_0x18ae13(0x196)](_0x18ae13(0x4f9)+_0x30d809[_0x18ae13(0x1a7)]+_0x18ae13(0x5fa)),process['exit'](0x1)),_0x30d809;}function _0x46d0db(_0x3326cd){const _0x2573f8=_0x5ed52c;return!!(_0x3326cd&&typeof _0x3326cd===_0x2573f8(0x305)&&!Array[_0x2573f8(0x2b1)](_0x3326cd)&&Object[_0x2573f8(0x222)](_0x3326cd)['length']>0x0);}function _0xb84be7(_0x556a14){const _0xc7e410=_0x5ed52c;return{..._0x556a14[_0xc7e410(0x1be)]?{'encryptionKey':_0x556a14['key']}:{},'engines':![],'processors':![],'compaction':![]};}const _0x120e47=!process['stdout'][_0x5ed52c(0x5a4)]||!!process.env.NO_COLOR;function _0x2b0f55(_0x10a913,_0xfb9e40){const _0x2a2940=_0x5ed52c;return _0x120e47?_0xfb9e40:'\x1b['+_0x10a913+'m'+_0xfb9e40+_0x2a2940(0x580);}function _0x22e0bc(_0x5d7f31){const _0x1f7cec=_0x5ed52c;if(!_0x5d7f31||_0x5d7f31[_0x1f7cec(0x548)]===0x0)return;const _0x2cce37='─'[_0x1f7cec(0x4ac)](0x38);process['stderr'][_0x1f7cec(0x5b8)]('\x0a'),process[_0x1f7cec(0x1eb)][_0x1f7cec(0x5b8)](_0x2b0f55('33',_0x1f7cec(0x40e)+_0x5d7f31[_0x1f7cec(0x548)]+'\x20SECURITY\x20NOTICE'+(_0x5d7f31['length']>0x1?'S':'')+'\x0a')),process[_0x1f7cec(0x1eb)][_0x1f7cec(0x5b8)]('\x20\x20'+_0x2cce37+'\x0a');for(const _0x8b7311 of _0x5d7f31){const _0x3dd0e5=_0x8b7311[_0x1f7cec(0x5c7)]===_0x1f7cec(0x196)?_0x2b0f55('31',_0x1f7cec(0x340)):_0x2b0f55('33','\x20\x20⚠');process[_0x1f7cec(0x1eb)][_0x1f7cec(0x5b8)](_0x3dd0e5+'\x20\x20'+_0x2b0f55('1',_0x8b7311[_0x1f7cec(0x2b5)])+'\x0a'),process[_0x1f7cec(0x1eb)]['write'](_0x1f7cec(0x224)+_0x8b7311[_0x1f7cec(0x34d)]+'\x0a');if(_0x8b7311[_0x1f7cec(0x57b)])process[_0x1f7cec(0x1eb)]['write'](_0x1f7cec(0x224)+_0x2b0f55('2',_0x1f7cec(0x40b)+_0x8b7311['hint'])+'\x0a');process[_0x1f7cec(0x1eb)][_0x1f7cec(0x5b8)]('\x0a');}process['stderr'][_0x1f7cec(0x5b8)]('\x20\x20'+_0x2cce37+'\x0a\x0a');}function _0x4d8d16(_0x272989,_0x2b2cdb,_0x379746={}){const _0x40f8fa=_0x5ed52c,_0x184460=_0x272989['http']['listen'](_0x2b2cdb,_0x379746);if(_0x184460&&_0x184460[_0x40f8fa(0x231)])return Promise['resolve'](_0x184460);return new Promise((_0x5aeba0,_0x16a011)=>{const _0x2501ac=_0x40f8fa;_0x184460[_0x2501ac(0x27b)]('listening',_0x5aeba0),_0x184460[_0x2501ac(0x27b)](_0x2501ac(0x196),_0x16a011);});}async function _0x153344(_0x1db143){const _0x67410b=_0x5ed52c,_0x1fceda=require$$4$1;console[_0x67410b(0x581)](_0x67410b(0x440));let _0x1a6873=!![];const _0x3d9334=(_0x2bbfd9,_0x183396)=>{const _0xa7e0e1=_0x67410b;console[_0xa7e0e1(0x581)]('\x20\x20'+(_0x2bbfd9?'✓':'✗')+'\x20'+_0x183396);if(!_0x2bbfd9)_0x1a6873=![];},_0x2a2bc8=Number(process[_0x67410b(0x35a)]['replace']('v','')['split']('.')[0x0]);_0x3d9334(_0x2a2bc8>=0x12,_0x67410b(0x5b2)+process[_0x67410b(0x35a)]+(_0x2a2bc8<0x12?_0x67410b(0x443):''));const _0x56bb5b=_0x4a0cbe[_0x67410b(0x64c)](_0x1db143[_0x67410b(0x352)]);try{_0x46e1f8[_0x67410b(0x303)](_0x56bb5b,{'recursive':!![]});const _0xc5ee57=_0x4a0cbe[_0x67410b(0x482)](_0x56bb5b,'.okdb-write-test');_0x46e1f8[_0x67410b(0x3b9)](_0xc5ee57,''),_0x46e1f8[_0x67410b(0x479)](_0xc5ee57),_0x3d9334(!![],'database\x20path\x20writable:\x20'+_0x56bb5b);}catch(_0x588a50){_0x3d9334(![],_0x67410b(0x48f)+_0x56bb5b+_0x67410b(0x62e)+_0x588a50[_0x67410b(0x34d)]+')');}const _0x5f5883=await new Promise(_0x49d997=>{const _0x2190ee=_0x67410b,_0x222f85=_0x1fceda[_0x2190ee(0x380)]();_0x222f85['once']('error',()=>_0x49d997(![])),_0x222f85[_0x2190ee(0x27b)](_0x2190ee(0x3b5),()=>{const _0x3ea406=_0x2190ee;_0x222f85[_0x3ea406(0x527)](),_0x49d997(!![]);}),_0x222f85[_0x2190ee(0x64b)](_0x1db143[_0x2190ee(0x53e)],_0x2190ee(0x266));});_0x3d9334(_0x5f5883,'port\x20'+_0x1db143[_0x67410b(0x53e)]+'\x20'+(_0x5f5883?_0x67410b(0x596):_0x67410b(0x29b)));const _0x2ac35c=_0x4a0cbe[_0x67410b(0x64c)]('.kdbconfig');if(_0x46e1f8['existsSync'](_0x2ac35c))try{JSON[_0x67410b(0x1ec)](_0x46e1f8[_0x67410b(0x60f)](_0x2ac35c,'utf8')[_0x67410b(0x53d)](/^\uFEFF/,'')),_0x3d9334(!![],_0x67410b(0x4dc)+_0x2ac35c);}catch(_0x36cdd6){_0x3d9334(![],_0x67410b(0x200)+_0x36cdd6[_0x67410b(0x34d)]);}else _0x3d9334(!![],_0x67410b(0x2da));if(_0x19b215()){const _0x422b5e=_0x6361bf(_0x1db143,{'shmbufNative':!![]});_0x3d9334(!![],_0x67410b(0x636)+_0x422b5e+'\x20worker'+(_0x422b5e===0x1?'':'s')+')');}else _0x3d9334(!![],_0x67410b(0x3b4));if(!_0x5f5883)try{const _0x3840b5=require(_0x67410b(0x4bb)),_0x4357cc=new _0x3840b5(_0x56bb5b,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x4357cc['open']();try{await _0x4357cc[_0x67410b(0x3b2)][_0x67410b(0x37b)]({'reader':!![]});const _0x1ff9fa=_0x4357cc['processes'][_0x67410b(0x35e)](),_0x4295ff=_0x1ff9fa[_0x67410b(0x1d8)](_0x49e1cc=>_0x49e1cc[_0x67410b(0x54d)]!=null)['length'];_0x3d9334(!![],'processes:\x20'+_0x1ff9fa[_0x67410b(0x548)]+_0x67410b(0x4ab)+(_0x1ff9fa[_0x67410b(0x548)]===0x1?'':'es')+'\x20('+_0x4295ff+'\x20supervised)');}finally{await _0x4357cc[_0x67410b(0x527)]();}}catch{}console[_0x67410b(0x581)](''),_0x1a6873?console['log'](_0x67410b(0x47f)):(console['log']('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x67410b(0x350)](0x1));}async function _0xfb94a2(){const _0x2908ff=_0x5ed52c,_0x1bd54b=_0x4a0cbe[_0x2908ff(0x64c)](_0x2908ff(0x4c6));!_0x46e1f8[_0x2908ff(0x34b)](_0x1bd54b)?(_0x46e1f8[_0x2908ff(0x3b9)](_0x1bd54b,JSON[_0x2908ff(0x42a)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x2908ff(0x420),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x2908ff(0x581)]('[okdb]\x20created\x20.kdbconfig')):console[_0x2908ff(0x581)](_0x2908ff(0x210));const _0x2a0958=_0x4a0cbe[_0x2908ff(0x64c)](_0x2908ff(0x593));!_0x46e1f8['existsSync'](_0x2a0958)?(_0x46e1f8[_0x2908ff(0x303)](_0x2a0958,{'recursive':!![]}),console[_0x2908ff(0x581)](_0x2908ff(0x341))):console['log'](_0x2908ff(0x40d)),console[_0x2908ff(0x581)](_0x2908ff(0x38b));}async function _0x24fe93(_0x369158){const _0x40307f=_0x5ed52c,_0x1197c3=_0x4a0cbe['resolve'](_0x369158['dbPath']);if(!_0x46e1f8[_0x40307f(0x34b)](_0x1197c3)){console[_0x40307f(0x581)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x1197c3+'\x20does\x20not\x20exist');return;}const _0x1553aa=require$$0$3,_0x17245d=_0x1553aa[_0x40307f(0x21a)]({'input':process[_0x40307f(0x29f)],'output':process['stdout']}),_0xe12b95=await new Promise(_0x1879b4=>_0x17245d[_0x40307f(0x38c)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x1197c3+'?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x1879b4));_0x17245d[_0x40307f(0x527)](),console[_0x40307f(0x581)]('');if(_0xe12b95[_0x40307f(0x560)]()[_0x40307f(0x216)]()!==_0x40307f(0x555)){console[_0x40307f(0x581)](_0x40307f(0x1a6));return;}let _0x290ae1=null;try{_0x290ae1=await _0x5a582e(_0x1197c3,_0x369158,async _0x30580a=>{const _0x19535e=_0x40307f,_0x9f8216=_0x30580a[_0x19535e(0x633)],_0x4679e7=_0x9f8216?.['db']?.[_0x19535e(0x61a)](_0x19535e(0x3ce))??null,_0x1864e8=[];if(_0x9f8216?.[_0x19535e(0x54f)](_0x19535e(0x48a)))for(const {key:_0xaaa2eb,value:_0x136348}of _0x9f8216[_0x19535e(0x3a2)](_0x19535e(0x48a))){_0x1864e8[_0x19535e(0x26a)]({'key':_0xaaa2eb,'value':_0x136348});}return{'identity':_0x4679e7,'licenses':_0x1864e8};});}catch(_0x7e7c89){console['log'](_0x40307f(0x476)+_0x7e7c89[_0x40307f(0x34d)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x46e1f8[_0x40307f(0x24f)](_0x1197c3,{'recursive':!![],'force':!![]}),console[_0x40307f(0x581)](_0x40307f(0x654)+_0x1197c3+_0x40307f(0x301));if(_0x290ae1&&(_0x290ae1[_0x40307f(0x537)]||_0x290ae1['licenses'][_0x40307f(0x548)]>0x0))try{await _0x5a582e(_0x1197c3,_0x369158,async _0x3f02ec=>{const _0x310591=_0x40307f,_0x32a35e=_0x3f02ec[_0x310591(0x633)];_0x290ae1[_0x310591(0x537)]&&_0x32a35e['db'][_0x310591(0x659)]('__identity',_0x290ae1[_0x310591(0x537)]);if(_0x290ae1[_0x310591(0x290)][_0x310591(0x548)]>0x0){if(!_0x32a35e[_0x310591(0x54f)]('~licenses'))await _0x32a35e['registerType'](_0x310591(0x48a));for(const {key:_0x23e623,value:_0x270154}of _0x290ae1[_0x310591(0x290)]){await _0x32a35e['put'](_0x310591(0x48a),_0x23e623,_0x270154);}}});const _0x5959e1=[];if(_0x290ae1[_0x40307f(0x537)])_0x5959e1[_0x40307f(0x26a)]('node\x20identity');if(_0x290ae1[_0x40307f(0x290)][_0x40307f(0x548)]>0x0)_0x5959e1[_0x40307f(0x26a)](_0x290ae1[_0x40307f(0x290)][_0x40307f(0x548)]+_0x40307f(0x4a5));console[_0x40307f(0x581)](_0x40307f(0x4dd)+_0x5959e1[_0x40307f(0x482)]('\x20+\x20'));}catch(_0x41e31d){console[_0x40307f(0x581)](_0x40307f(0x250)+_0x41e31d[_0x40307f(0x34d)]);}}async function _0x5a582e(_0xca6865,_0x1fa484,_0x1f3d37){const _0x14deba=_0x5ed52c,_0x5e8717=require$$5,_0x3b54f3=new _0x5e8717(_0xca6865,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0xb84be7(_0x1fa484)});await _0x3b54f3[_0x14deba(0x37b)]();try{return await _0x1f3d37(_0x3b54f3);}finally{await _0x3b54f3[_0x14deba(0x527)]();}}async function _0x221481(_0x3c11b9,_0x51031d){const _0x48e227=_0x5ed52c,_0x517062=require$$5,_0x2c691d=_0x4a0cbe[_0x48e227(0x64c)](_0x51031d[_0x48e227(0x352)]);console['log']('[okdb]\x20opening\x20'+_0x2c691d+'…');const _0x1c4bb8=new _0x517062(_0x2c691d,_0xb84be7(_0x51031d));await _0x1c4bb8[_0x48e227(0x37b)](),console[_0x48e227(0x581)](_0x48e227(0x1ed)+_0x3c11b9+'…');const {envs:_0x58d734}=await _0x1c4bb8[_0x48e227(0x23b)]['backup'](_0x3c11b9);for(const _0xa6a22a of _0x58d734){const _0x13a91a=_0xa6a22a[_0x48e227(0x204)]>0x0?_0x48e227(0x62e)+(_0xa6a22a['sizeBefore']/0x400/0x400)[_0x48e227(0x310)](0x2)+'\x20MB\x20→\x20'+(_0xa6a22a[_0x48e227(0x33f)]/0x400/0x400)[_0x48e227(0x310)](0x2)+_0x48e227(0x1a3):'';console[_0x48e227(0x581)]('\x20\x20✓\x20'+_0xa6a22a[_0x48e227(0x1ae)]+'\x20\x20→\x20\x20'+_0xa6a22a[_0x48e227(0x24b)]+_0x13a91a);}await _0x1c4bb8[_0x48e227(0x527)](),console[_0x48e227(0x581)]('[okdb]\x20backup\x20complete');}async function _0x203a43(_0x2646ef,_0x194158,_0x400be8){const _0x19b226=_0x5ed52c,_0x399da2=require$$5,_0x36ae5c=_0x4a0cbe['resolve'](_0x194158[_0x19b226(0x352)]),_0x33faef=_0x400be8[_0x19b226(0x408)]??_0x19b226(0x5fd),_0x3bff66=_0x400be8[_0x19b226(0x1ea)]?_0x400be8['types'][_0x19b226(0x32a)](',')[_0x19b226(0x2c1)](_0xec9cd5=>_0xec9cd5[_0x19b226(0x560)]()):null;console['log'](_0x19b226(0x365)+_0x36ae5c+'…');const _0x377c6c=new _0x399da2(_0x36ae5c,_0xb84be7(_0x194158));await _0x377c6c['open'](),console[_0x19b226(0x581)](_0x19b226(0x3ea)+_0x33faef+_0x19b226(0x5e1)+_0x2646ef+'…');const _0x359ad3=await _0x377c6c[_0x19b226(0x23b)]['exportToFile'](_0x2646ef,{'envName':_0x33faef,'types':_0x3bff66,'includeChanges':!!_0x400be8['changes']});console['log'](_0x19b226(0x27f)+_0x359ad3[_0x19b226(0x1ea)]+_0x19b226(0x4c5)+_0x359ad3[_0x19b226(0x382)]+_0x19b226(0x21c)+_0x359ad3[_0x19b226(0x3fd)]);if(_0x400be8[_0x19b226(0x297)]){const _0x286a4b=_0x4a0cbe[_0x19b226(0x482)](_0x4a0cbe['dirname'](_0x2646ef),'blobs');process['stdout'][_0x19b226(0x5b8)](_0x19b226(0x1c4));const {count:_0x9e5352,bytes:_0x145dd1}=await _0x377c6c[_0x19b226(0x23b)][_0x19b226(0x5ef)](_0x286a4b);console['log'](_0x19b226(0x2a9)+_0x286a4b+_0x19b226(0x62e)+_0x9e5352+_0x19b226(0x58c)+(_0x9e5352!==0x1?'s':'')+',\x20'+(_0x145dd1/0x400/0x400)[_0x19b226(0x310)](0x2)+'\x20MB)');}await _0x377c6c['close'](),console['log'](_0x19b226(0x540));}async function _0x7fc0e1(_0x4ff3df,_0x288feb,_0x446ba4){const _0x35013a=_0x5ed52c,_0x468f48=require$$5,_0x57040d=_0x4a0cbe[_0x35013a(0x64c)](_0x288feb[_0x35013a(0x352)]),_0x7f1b8a=_0x446ba4['env']??null,_0x2adff0=_0x446ba4[_0x35013a(0x1ea)]?_0x446ba4[_0x35013a(0x1ea)][_0x35013a(0x32a)](',')[_0x35013a(0x2c1)](_0x359d47=>_0x359d47[_0x35013a(0x560)]()):null,_0x1908de=!!_0x446ba4[_0x35013a(0x569)];console[_0x35013a(0x581)]('[okdb]\x20opening\x20'+_0x57040d+'…');const _0x5afa53=new _0x468f48(_0x57040d,_0xb84be7(_0x288feb));await _0x5afa53['open'](),console['log']('[okdb]\x20importing\x20'+_0x4ff3df+'…');const _0x52e508=await _0x5afa53[_0x35013a(0x23b)][_0x35013a(0x269)](_0x4ff3df,{'envName':_0x7f1b8a,'types':_0x2adff0,'dropExisting':_0x1908de,'includeChanges':!!_0x446ba4[_0x35013a(0x3fd)],'onProgress':({type:_0x2b6ebc,count:_0x595ae2})=>{const _0x29b7ea=_0x35013a;process['stdout']['write'](_0x29b7ea(0x2e6)+_0x2b6ebc+':\x20'+_0x595ae2+_0x29b7ea(0x544));}});process[_0x35013a(0x2f8)][_0x35013a(0x5b8)]('\x0a'),console[_0x35013a(0x581)](_0x35013a(0x5ba)+_0x52e508[_0x35013a(0x1ea)]+_0x35013a(0x4c5)+_0x52e508[_0x35013a(0x382)]+_0x35013a(0x21c)+_0x52e508[_0x35013a(0x3fd)]);if(_0x446ba4[_0x35013a(0x297)]){const _0x215c3c=_0x4a0cbe[_0x35013a(0x482)](_0x4a0cbe[_0x35013a(0x1e7)](_0x4ff3df),_0x35013a(0x297));if(_0x46e1f8[_0x35013a(0x34b)](_0x215c3c)){const {imported:_0x32d37b,skipped:_0x45162f}=await _0x5afa53[_0x35013a(0x23b)][_0x35013a(0x4e8)](_0x215c3c);console[_0x35013a(0x581)]('[okdb]\x20blobs:\x20imported='+_0x32d37b+_0x35013a(0x4b0)+_0x45162f);}}await _0x5afa53['close'](),console[_0x35013a(0x581)](_0x35013a(0x4b7));}async function _0x5f3378(_0x38991a,_0x34cf76){const _0x159427=_0x5ed52c;_0x34cf76[_0x159427(0x1fb)]&&!_0x34cf76[_0x159427(0x1ae)]&&(console[_0x159427(0x196)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process['exit'](0x1));const _0x236c82=_0x34cf76[_0x159427(0x421)]?_0x34cf76[_0x159427(0x421)][_0x159427(0x32a)](',')[_0x159427(0x2c1)](_0x232459=>_0x232459[_0x159427(0x560)]())[_0x159427(0x1d8)](Boolean):[];let _0x10add={};if(_0x34cf76['grants'])try{_0x10add=JSON[_0x159427(0x1ec)](_0x34cf76[_0x159427(0x528)]);if(typeof _0x10add!==_0x159427(0x305)||Array[_0x159427(0x2b1)](_0x10add)||_0x10add===null)throw new Error();}catch{console[_0x159427(0x196)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x159427(0x350)](0x1);}const _0x56f89c=require$$5,{randomToken:_0x188979,hashToken:_0x450adf,hashPassword:_0x1b7839}=requireOkdbAuthTokens(),_0x51e272=require$$0$1,_0x365e29=_0x4a0cbe['resolve'](_0x38991a['dbPath']),_0x2d42cd=new _0x56f89c(_0x365e29,_0xb84be7(_0x38991a));await _0x2d42cd[_0x159427(0x37b)]();try{await _0x2d42cd[_0x159427(0x65b)]['_ensureTokensType']();if(_0x34cf76[_0x159427(0x1ae)]){const _0x3227ee=await _0x2d42cd[_0x159427(0x65b)][_0x159427(0x4b6)](_0x34cf76[_0x159427(0x1ae)]);_0x3227ee&&(console[_0x159427(0x196)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x34cf76[_0x159427(0x1ae)]+_0x159427(0x1d4)),process[_0x159427(0x350)](0x1));}const _0x9c36fc=_0x188979(0x20),_0x3e7bc4=_0x450adf(_0x9c36fc),_0x164f45=_0x34cf76[_0x159427(0x1fb)]?await _0x1b7839(_0x34cf76['password']):null,_0x4b413a=_0x51e272[_0x159427(0x256)](),_0x3e341f={'tokenHash':_0x3e7bc4,'name':_0x34cf76[_0x159427(0x1ae)]||null,'passwordHash':_0x164f45,'label':_0x34cf76[_0x159427(0x3c8)]||null,'permissions':_0x236c82,'grants':_0x10add,'createdAt':Date[_0x159427(0x600)](),'lastUsedAt':null},_0x59de3c=_0x34cf76['ttl']?{'ttl':Number(_0x34cf76[_0x159427(0x532)])}:undefined;await _0x2d42cd[_0x159427(0x633)][_0x159427(0x359)](_0x159427(0x55f),_0x4b413a,_0x3e341f,_0x59de3c),console[_0x159427(0x581)]('\x0a\x20\x20✓\x20Token\x20created'),console[_0x159427(0x581)](_0x159427(0x483)+_0x4b413a),console['log'](_0x159427(0x649)+(_0x34cf76[_0x159427(0x1ae)]||_0x159427(0x433))),console[_0x159427(0x581)](_0x159427(0x4b1)+(_0x34cf76[_0x159427(0x3c8)]||_0x159427(0x433))),console[_0x159427(0x581)]('\x20\x20\x20\x20permissions:\x20'+(_0x236c82['join'](',\x20')||_0x159427(0x1c8))),console[_0x159427(0x581)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x159427(0x581)]('\x20\x20\x20\x20'+_0x9c36fc+'\x0a');}finally{await _0x2d42cd[_0x159427(0x527)]();}}async function _0xba4ad1(_0x567b3b){const _0x4c9ca3=_0x5ed52c,_0x181574=require$$5,_0x5e753c=_0x4a0cbe[_0x4c9ca3(0x64c)](_0x567b3b[_0x4c9ca3(0x352)]),_0x33100a=new _0x181574(_0x5e753c,_0xb84be7(_0x567b3b));await _0x33100a[_0x4c9ca3(0x37b)]();try{const _0x102843=_0x33100a[_0x4c9ca3(0x633)];if(!_0x102843||!_0x102843[_0x4c9ca3(0x54f)](_0x4c9ca3(0x55f))){console[_0x4c9ca3(0x581)](_0x4c9ca3(0x2f7));return;}const _0x176f6c=[];for(const {key:_0xa527c5,value:_0x316a84}of _0x102843['getRange'](_0x4c9ca3(0x55f))){_0x176f6c[_0x4c9ca3(0x26a)]({'id':_0xa527c5,'name':_0x316a84[_0x4c9ca3(0x1ae)]||_0x4c9ca3(0x433),'label':_0x316a84[_0x4c9ca3(0x3c8)]||_0x4c9ca3(0x433),'permissions':Array[_0x4c9ca3(0x2b1)](_0x316a84[_0x4c9ca3(0x421)])?_0x316a84[_0x4c9ca3(0x421)]['join'](','):'','created':_0x316a84[_0x4c9ca3(0x319)]?new Date(_0x316a84[_0x4c9ca3(0x319)])[_0x4c9ca3(0x61e)]()['slice'](0x0,0xa):''});}if(_0x176f6c['length']===0x0){console[_0x4c9ca3(0x581)](_0x4c9ca3(0x2f7));return;}const _0x39b2ca=!process[_0x4c9ca3(0x2f8)]['columns']||process[_0x4c9ca3(0x2f8)]['columns']>=0x64,_0x1c314a=_0x39b2ca?0x24:0xa,_0x5a5331=['ID'[_0x4c9ca3(0x453)](_0x1c314a),_0x4c9ca3(0x3cc)['padEnd'](0x10),'LABEL'[_0x4c9ca3(0x453)](0x14),_0x4c9ca3(0x379)['padEnd'](0x14),'CREATED'][_0x4c9ca3(0x482)]('\x20\x20');console['log']('\x0a'+_0x5a5331),console[_0x4c9ca3(0x581)]('-'[_0x4c9ca3(0x4ac)](_0x5a5331['length']));for(const _0x4b0a1b of _0x176f6c){const _0x1d60d=_0x39b2ca?_0x4b0a1b['id']:_0x4b0a1b['id'][_0x4c9ca3(0x30b)](0x0,0x8)+'…';console['log']([_0x1d60d[_0x4c9ca3(0x453)](_0x1c314a),_0x4b0a1b[_0x4c9ca3(0x1ae)][_0x4c9ca3(0x30b)](0x0,0x10)['padEnd'](0x10),_0x4b0a1b[_0x4c9ca3(0x3c8)]['slice'](0x0,0x14)['padEnd'](0x14),_0x4b0a1b['permissions'][_0x4c9ca3(0x30b)](0x0,0x14)[_0x4c9ca3(0x453)](0x14),_0x4b0a1b['created']][_0x4c9ca3(0x482)]('\x20\x20'));}console[_0x4c9ca3(0x581)]('');}finally{await _0x33100a['close']();}}async function _0x1ee8b3(_0x1a5e6a,_0x52a895){const _0x2c32b4=_0x5ed52c;!_0x1a5e6a&&(console[_0x2c32b4(0x196)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x2c32b4(0x350)](0x1));const _0x7dca7c=require$$5,_0x28bc72=_0x4a0cbe['resolve'](_0x52a895[_0x2c32b4(0x352)]),_0x26fa4b=new _0x7dca7c(_0x28bc72,_0xb84be7(_0x52a895));await _0x26fa4b['open']();try{const _0x6f2aae=_0x26fa4b[_0x2c32b4(0x633)];(!_0x6f2aae||!_0x6f2aae[_0x2c32b4(0x54f)](_0x2c32b4(0x55f)))&&(console[_0x2c32b4(0x196)](_0x2c32b4(0x195)+_0x1a5e6a+'\x22'),process[_0x2c32b4(0x350)](0x1));let _0x4263b4=null,_0x586ed6=null;const _0x483eaa=_0x6f2aae['get'](_0x2c32b4(0x55f),_0x1a5e6a);if(_0x483eaa)_0x4263b4=_0x1a5e6a,_0x586ed6=_0x483eaa;else{const _0x8d1b9b=[];for(const {key:_0x4d5f86,value:_0x35be40}of _0x6f2aae[_0x2c32b4(0x3a2)](_0x2c32b4(0x55f))){if(_0x4d5f86[_0x2c32b4(0x52f)](_0x1a5e6a))_0x8d1b9b['push']({'key':_0x4d5f86,'value':_0x35be40});}_0x8d1b9b['length']===0x0&&(console[_0x2c32b4(0x196)](_0x2c32b4(0x195)+_0x1a5e6a+'\x22'),process['exit'](0x1));if(_0x8d1b9b[_0x2c32b4(0x548)]>0x1){console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x1a5e6a+'\x22\x20matches\x20'+_0x8d1b9b[_0x2c32b4(0x548)]+_0x2c32b4(0x2e4));for(const _0x57ceee of _0x8d1b9b){console['error']('\x20\x20'+_0x57ceee['key']+_0x2c32b4(0x56e)+(_0x57ceee[_0x2c32b4(0x333)][_0x2c32b4(0x1ae)]||_0x2c32b4(0x433))+')');}process[_0x2c32b4(0x350)](0x1);}_0x4263b4=_0x8d1b9b[0x0][_0x2c32b4(0x1be)],_0x586ed6=_0x8d1b9b[0x0][_0x2c32b4(0x333)];}await _0x6f2aae[_0x2c32b4(0x53b)](_0x2c32b4(0x55f),_0x4263b4),console[_0x2c32b4(0x581)](_0x2c32b4(0x3c5)+_0x4263b4+_0x2c32b4(0x56e)+(_0x586ed6['name']||_0x2c32b4(0x433))+_0x2c32b4(0x4f8)+(_0x586ed6[_0x2c32b4(0x3c8)]||_0x2c32b4(0x433))+')');}finally{await _0x26fa4b['close']();}}function _0xcb1ecb(_0x142786,_0x4ffcd5){const _0x2d61cf=_0x5ed52c;if(!_0x142786['activation'])return'pending';const _0x3fac77=_0x142786['expiresAt'];if(!_0x3fac77)return _0x2d61cf(0x219);if(_0x4ffcd5>_0x3fac77)return _0x2d61cf(0x4fd);return _0x2d61cf(0x219);}function _0x43d904(_0x6b8fde){const _0x11a4a7=_0x5ed52c;if(!_0x6b8fde||typeof _0x6b8fde!=='object')return'';const _0x5b1633=Object[_0x11a4a7(0x57f)](_0x6b8fde)[_0x11a4a7(0x1d8)](([,_0x1e6fdd])=>_0x1e6fdd)[_0x11a4a7(0x2c1)](([_0x528577])=>_0x528577);if(_0x5b1633[_0x11a4a7(0x548)]===0x0)return _0x11a4a7(0x1c8);if(_0x5b1633[_0x11a4a7(0x548)]<=0x3)return _0x5b1633['join']('\x20');return _0x5b1633[_0x11a4a7(0x30b)](0x0,0x3)[_0x11a4a7(0x482)]('\x20')+('\x20+'+(_0x5b1633[_0x11a4a7(0x548)]-0x3));}async function _0x53735f(_0x3911ee){const _0x210424=_0x5ed52c,_0x4ace35=require$$5,_0x10a50d=requireOkdbLicenseCodec(),{_C:_0x206b17}=requireOkdbLicense(),_0x31f65a=_0x4a0cbe[_0x210424(0x64c)](_0x3911ee[_0x210424(0x352)]),_0x46ce14=new _0x4ace35(_0x31f65a,_0xb84be7(_0x3911ee));await _0x46ce14['open']();try{const _0x25c5f1=_0x46ce14[_0x210424(0x633)],_0x1ee898=_0x25c5f1?.['db']?.[_0x210424(0x61a)]?.(_0x210424(0x45a))??0x0,_0x408d6a=[..._0x46ce14[_0x210424(0x25b)][_0x210424(0x222)]()][_0x210424(0x1d8)](_0x540d87=>!_0x540d87[_0x210424(0x52f)]('~'))[_0x210424(0x548)],_0x4c4cfe=_0x46ce14['_license']?.[_0x210424(0x1db)];if(_0x4c4cfe){const _0x1c5456=_0x4c4cfe['_isFree']===!![],_0x12084b=_0x1c5456?'free\x20tier':_0x46ce14[_0x210424(0x368)][_0x210424(0x219)]?.['licensee']||_0x210424(0x54a);console[_0x210424(0x581)](''),console[_0x210424(0x581)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x12084b);const _0x33a506=_0x4c4cfe[_0x210424(0x52b)]||{};if(_0x33a506[_0x210424(0x3aa)]){const _0x10e946=Math[_0x210424(0x32b)](_0x1ee898/_0x33a506[_0x210424(0x3aa)]*0x64);console[_0x210424(0x581)](_0x210424(0x539)+_0x1ee898[_0x210424(0x4ca)]()+_0x210424(0x3ae)+_0x33a506['maxWrites'][_0x210424(0x4ca)]()+_0x210424(0x62e)+_0x10e946+'%)');}else console[_0x210424(0x581)](_0x210424(0x539)+_0x1ee898[_0x210424(0x4ca)]());_0x33a506[_0x210424(0x444)]?console[_0x210424(0x581)](_0x210424(0x429)+_0x408d6a+_0x210424(0x3ae)+_0x33a506[_0x210424(0x444)]):console['log'](_0x210424(0x429)+_0x408d6a),_0x206b17?.[_0x210424(0x45d)]&&console['log'](_0x210424(0x2c6)+_0x206b17[_0x210424(0x45d)]+_0x210424(0x3f7));}if(!_0x25c5f1||!_0x25c5f1['hasType']('~licenses')){console[_0x210424(0x581)](''),console['log']('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x301339=[],_0x126ffe=Date[_0x210424(0x600)](),_0xe822e2=_0x46ce14['id'],_0x5b02d6=_0x210424(0x47a);for(const {key:_0x32b3bf,value:_0x210024}of _0x25c5f1[_0x210424(0x3a2)]('~licenses')){const _0x398233=_0x210024[_0x210424(0x5f9)]?Buffer[_0x210424(0x373)](_0x210024[_0x210424(0x5f9)],_0x210424(0x2ef)):Buffer[_0x210424(0x3a3)](0x8);let _0x1f1d9a='';try{_0x1f1d9a=_0x10a50d['derivePin'](_0xe822e2,_0x398233,_0x5b02d6)[_0x210424(0x5d2)];}catch{}_0x301339[_0x210424(0x26a)]({'id':_0x32b3bf,'licensee':_0x210024['licensee']||'','expires':_0x210024[_0x210424(0x554)]?new Date(_0x210024[_0x210424(0x554)])['toISOString']()[_0x210424(0x30b)](0x0,0xa):'','features':_0x43d904(_0x210024['features']),'pin':_0x1f1d9a,'status':_0xcb1ecb(_0x210024,_0x126ffe)});}if(_0x301339['length']===0x0){console[_0x210424(0x581)](''),console[_0x210424(0x581)](_0x210424(0x32f)),console[_0x210424(0x581)]('');return;}const _0x34c9dc=['\x20\x20'+'ID'[_0x210424(0x453)](0xe),_0x210424(0x321)[_0x210424(0x453)](0xe),_0x210424(0x2d9)[_0x210424(0x453)](0xc),_0x210424(0x33e)['padEnd'](0x1e),_0x210424(0x4a6)[_0x210424(0x453)](0xa),'STATUS']['join']('\x20');console[_0x210424(0x581)]('\x0a'+_0x34c9dc);for(const _0x502963 of _0x301339){const _0x41d013=_0x502963['id'][_0x210424(0x30b)](0x0,0x8)+'…';console[_0x210424(0x581)](['\x20\x20'+_0x41d013[_0x210424(0x453)](0xe),_0x502963[_0x210424(0x320)]['slice'](0x0,0xe)['padEnd'](0xe),_0x502963[_0x210424(0x1df)]['padEnd'](0xc),_0x502963[_0x210424(0x198)]['slice'](0x0,0x1e)['padEnd'](0x1e),_0x502963[_0x210424(0x5d2)]['padEnd'](0xa),_0x502963[_0x210424(0x1d5)]]['join']('\x20'));}console[_0x210424(0x581)]('');}finally{await _0x46ce14[_0x210424(0x527)]();}}async function _0x28c6ca(_0x4d1e8c,_0x493404){const _0x38ed5e=_0x5ed52c,_0x48bcc0=require$$5,_0x34e6bc=requireOkdbLicenseCodec();let _0x2743e6=_0x4d1e8c;(_0x34e6bc[_0x38ed5e(0x28a)](_0x4d1e8c)===_0x38ed5e(0x307)||_0x46e1f8['existsSync'](_0x4d1e8c)&&_0x46e1f8['statSync'](_0x4d1e8c)[_0x38ed5e(0x3cf)]())&&(_0x2743e6=_0x46e1f8[_0x38ed5e(0x60f)](_0x4d1e8c,'utf8')['trim']());const _0x1222ee=_0x4a0cbe[_0x38ed5e(0x64c)](_0x493404[_0x38ed5e(0x352)]),_0x5a07d2=new _0x48bcc0(_0x1222ee,_0xb84be7(_0x493404));await _0x5a07d2[_0x38ed5e(0x37b)]();try{!_0x5a07d2[_0x38ed5e(0x368)]&&(console[_0x38ed5e(0x196)](_0x38ed5e(0x45e)),process[_0x38ed5e(0x350)](0x1));let _0x4be1ea;try{_0x4be1ea=await _0x5a07d2[_0x38ed5e(0x368)]['addLicense'](_0x2743e6);}catch(_0x34de2c){console[_0x38ed5e(0x196)](_0x38ed5e(0x5ac)+_0x34de2c[_0x38ed5e(0x34d)]),process[_0x38ed5e(0x350)](0x1);}const _0xecf0e5=_0x5a07d2[_0x38ed5e(0x368)][_0x38ed5e(0x4b8)](),_0x41cb31=_0xecf0e5[_0x38ed5e(0x4bd)](_0x7ad817=>_0x7ad817['licenseId']===_0x4be1ea['id'])?.['pin']||'',_0x2296bd=Object['entries'](_0x4be1ea[_0x38ed5e(0x198)]||{})[_0x38ed5e(0x1d8)](([,_0x394188])=>_0x394188)[_0x38ed5e(0x2c1)](([_0x3e1b64])=>_0x3e1b64),_0x421372=_0x4be1ea['limits']||{},_0x34411f=[_0x421372[_0x38ed5e(0x444)]?'envs='+_0x421372[_0x38ed5e(0x444)]:null,_0x421372[_0x38ed5e(0x24a)]?'types/env='+_0x421372[_0x38ed5e(0x24a)]:null,_0x421372['syncPeers']?_0x38ed5e(0x3b6)+_0x421372['syncPeers']:null,_0x421372[_0x38ed5e(0x3aa)]?'writes='+_0x421372[_0x38ed5e(0x3aa)][_0x38ed5e(0x4ca)]():null]['filter'](Boolean)['join']('\x20\x20'),_0x541f53=_0x4be1ea['licenseType']===_0x34e6bc[_0x38ed5e(0x3ed)];console[_0x38ed5e(0x581)](_0x38ed5e(0x3eb)),console[_0x38ed5e(0x581)](_0x38ed5e(0x205)+_0x4be1ea['id']),console['log'](_0x38ed5e(0x5e6)+_0x4be1ea[_0x38ed5e(0x320)]),console['log'](_0x38ed5e(0x5b3)+new Date(_0x4be1ea['expiresAt'])['toISOString']()[_0x38ed5e(0x30b)](0x0,0xa)),console[_0x38ed5e(0x581)]('\x20\x20\x20\x20features:\x20\x20'+(_0x2296bd['join'](',\x20')||_0x38ed5e(0x1c8)));if(_0x34411f)console['log'](_0x38ed5e(0x3bc)+_0x34411f);_0x541f53?(console[_0x38ed5e(0x581)](_0x38ed5e(0x52a)),console[_0x38ed5e(0x581)]('')):(console[_0x38ed5e(0x581)](_0x38ed5e(0x5ad)+_0x41cb31),console[_0x38ed5e(0x581)](_0x38ed5e(0x35b)),console[_0x38ed5e(0x581)](''),console[_0x38ed5e(0x581)]('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console[_0x38ed5e(0x581)](_0x38ed5e(0x53a)+_0x41cb31+_0x38ed5e(0x41a)),console[_0x38ed5e(0x581)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x38ed5e(0x581)](_0x38ed5e(0x5a2)),console[_0x38ed5e(0x581)](''));}finally{await _0x5a07d2[_0x38ed5e(0x527)]();}}async function _0x5426d1(_0x118d0b,_0x886d67){const _0x4bff22=_0x5ed52c,_0x587aa9=require$$5,_0x2b16e5=_0x4a0cbe[_0x4bff22(0x64c)](_0x886d67[_0x4bff22(0x352)]),_0x2b5c4d=new _0x587aa9(_0x2b16e5,_0xb84be7(_0x886d67));await _0x2b5c4d[_0x4bff22(0x37b)]();try{!_0x2b5c4d[_0x4bff22(0x368)]&&(console[_0x4bff22(0x196)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x4bff22(0x350)](0x1));let _0x3f2233;try{_0x3f2233=await _0x2b5c4d[_0x4bff22(0x368)][_0x4bff22(0x263)](_0x118d0b[_0x4bff22(0x560)]());}catch(_0x8b1710){console[_0x4bff22(0x196)]('[okdb]\x20error:\x20'+_0x8b1710[_0x4bff22(0x34d)]),console[_0x4bff22(0x196)](''),console[_0x4bff22(0x196)](_0x4bff22(0x5f7)),console['error'](_0x4bff22(0x22f)),console['error'](_0x4bff22(0x1d0)),console[_0x4bff22(0x196)](_0x4bff22(0x329)),console[_0x4bff22(0x196)](''),process['exit'](0x1);}console[_0x4bff22(0x581)](_0x4bff22(0x322)),console['log'](_0x4bff22(0x205)+_0x3f2233['id']),console[_0x4bff22(0x581)](_0x4bff22(0x5e6)+_0x3f2233['licensee']),console[_0x4bff22(0x581)](_0x4bff22(0x5b3)+new Date(_0x3f2233[_0x4bff22(0x554)])['toISOString']()[_0x4bff22(0x30b)](0x0,0xa)),console[_0x4bff22(0x581)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x4bff22(0x581)]('');}finally{await _0x2b5c4d['close']();}}async function _0x4ba856(_0x4d509e,_0x1fec63){const _0xab4215=_0x5ed52c;!_0x4d509e&&(console[_0xab4215(0x196)](_0xab4215(0x641)),process[_0xab4215(0x350)](0x1));const _0x4066a3=require$$5,_0x4a0694=requireOkdbLicenseCodec(),_0xa0fadf=_0x4a0cbe[_0xab4215(0x64c)](_0x1fec63[_0xab4215(0x352)]),_0x1bbb6d=new _0x4066a3(_0xa0fadf,_0xb84be7(_0x1fec63));await _0x1bbb6d[_0xab4215(0x37b)]();try{const _0x342987=_0x1bbb6d['_systemEnv'];(!_0x342987||!_0x342987[_0xab4215(0x54f)](_0xab4215(0x48a)))&&(console[_0xab4215(0x196)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x4d509e+'\x22'),process[_0xab4215(0x350)](0x1));let _0x2cafb4=null,_0x424678=null;const _0x2a4abf=_0x342987['get'](_0xab4215(0x48a),_0x4d509e);if(_0x2a4abf)_0x2cafb4=_0x4d509e,_0x424678=_0x2a4abf;else{const _0x47821e=[];for(const {key:_0x2a826a,value:_0x237f70}of _0x342987[_0xab4215(0x3a2)]('~licenses')){if(_0x2a826a['startsWith'](_0x4d509e))_0x47821e[_0xab4215(0x26a)]({'key':_0x2a826a,'value':_0x237f70});}_0x47821e[_0xab4215(0x548)]===0x0&&(console[_0xab4215(0x196)](_0xab4215(0x1ab)+_0x4d509e+'\x22'),process[_0xab4215(0x350)](0x1)),_0x47821e[_0xab4215(0x548)]>0x1&&(console['error'](_0xab4215(0x2b3)+_0x4d509e+_0xab4215(0x651)+_0x47821e[_0xab4215(0x548)]+_0xab4215(0x253)),process[_0xab4215(0x350)](0x1)),_0x2cafb4=_0x47821e[0x0]['key'],_0x424678=_0x47821e[0x0][_0xab4215(0x333)];}const _0x15cee3=Date['now'](),_0x6c3fc8=_0xcb1ecb(_0x424678,_0x15cee3),_0x41a4f1=_0x1bbb6d['id'],_0x299c7d=_0xab4215(0x47a);let _0x526b99='';try{const _0x165417=Buffer['from'](_0x424678['_licenseHash'],_0xab4215(0x2ef));_0x526b99=_0x4a0694[_0xab4215(0x29a)](_0x41a4f1,_0x165417,_0x299c7d)['pin'];}catch{}const _0x3dc7ba=_0x424678[_0xab4215(0x198)]?Object[_0xab4215(0x57f)](_0x424678['features'])[_0xab4215(0x1d8)](([,_0x17e3ec])=>_0x17e3ec)[_0xab4215(0x2c1)](([_0x18d55e])=>_0x18d55e):[],_0xe9a811=_0x424678[_0xab4215(0x52b)]||{},_0x44fa9=_0x342987?.['db']?.[_0xab4215(0x61a)]?.(_0xab4215(0x45a))??0x0,_0x109841=[..._0x1bbb6d[_0xab4215(0x25b)][_0xab4215(0x222)]()][_0xab4215(0x1d8)](_0xbf3de9=>!_0xbf3de9['startsWith']('~'))[_0xab4215(0x548)];console[_0xab4215(0x581)](_0xab4215(0x226)),console[_0xab4215(0x581)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2cafb4),console[_0xab4215(0x581)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0x424678[_0xab4215(0x320)]||'')),console[_0xab4215(0x581)](_0xab4215(0x5b3)+(_0x424678[_0xab4215(0x554)]?new Date(_0x424678[_0xab4215(0x554)])[_0xab4215(0x61e)]()[_0xab4215(0x30b)](0x0,0xa):'')),console[_0xab4215(0x581)](_0xab4215(0x4e0)+(_0x3dc7ba[_0xab4215(0x482)](',\x20')||_0xab4215(0x1c8))),console[_0xab4215(0x581)](_0xab4215(0x5ad)+_0x526b99),console[_0xab4215(0x581)](_0xab4215(0x3d7)+_0x6c3fc8),console[_0xab4215(0x581)](_0xab4215(0x52e)+new Date(_0x424678['addedAt'])['toISOString']());if(_0x6c3fc8==='active'){console[_0xab4215(0x581)](''),console[_0xab4215(0x581)]('\x20\x20Usage:');if(_0xe9a811[_0xab4215(0x3aa)]){const _0x3eb734=Math[_0xab4215(0x32b)](_0x44fa9/_0xe9a811[_0xab4215(0x3aa)]*0x64);console[_0xab4215(0x581)](_0xab4215(0x19f)+_0x44fa9['toLocaleString']()+_0xab4215(0x3ae)+_0xe9a811[_0xab4215(0x3aa)][_0xab4215(0x4ca)]()+'\x20\x20('+_0x3eb734+'%)');}else console[_0xab4215(0x581)](_0xab4215(0x19f)+_0x44fa9[_0xab4215(0x4ca)]()+_0xab4215(0x300));_0xe9a811['envs']?console['log'](_0xab4215(0x597)+_0x109841+_0xab4215(0x3ae)+_0xe9a811[_0xab4215(0x444)]):console['log'](_0xab4215(0x597)+_0x109841+'\x20\x20(unlimited)');}console[_0xab4215(0x581)]('');}finally{await _0x1bbb6d[_0xab4215(0x527)]();}}async function _0x4fe222(_0x556c46,_0x1e2c31){const _0x3065c8=_0x5ed52c;!_0x556c46&&(console['error']('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x3065c8(0x350)](0x1));const _0x52d690=require$$5,_0x3db7d5=_0x4a0cbe[_0x3065c8(0x64c)](_0x1e2c31[_0x3065c8(0x352)]),_0x437a54=new _0x52d690(_0x3db7d5,_0xb84be7(_0x1e2c31));await _0x437a54[_0x3065c8(0x37b)]();try{const _0x390153=_0x437a54['_systemEnv'];(!_0x390153||!_0x390153[_0x3065c8(0x54f)](_0x3065c8(0x48a)))&&(console['error'](_0x3065c8(0x1ab)+_0x556c46+'\x22'),process[_0x3065c8(0x350)](0x1));let _0x201aea=null,_0x40d1d9=null;const _0x2d2925=_0x390153['get'](_0x3065c8(0x48a),_0x556c46);if(_0x2d2925)_0x201aea=_0x556c46,_0x40d1d9=_0x2d2925;else{const _0x52655b=[];for(const {key:_0x3166d2,value:_0x299f33}of _0x390153['getRange'](_0x3065c8(0x48a))){if(_0x3166d2[_0x3065c8(0x52f)](_0x556c46))_0x52655b[_0x3065c8(0x26a)]({'key':_0x3166d2,'value':_0x299f33});}_0x52655b[_0x3065c8(0x548)]===0x0&&(console['error'](_0x3065c8(0x1ab)+_0x556c46+'\x22'),process[_0x3065c8(0x350)](0x1)),_0x52655b['length']>0x1&&(console['error'](_0x3065c8(0x2b3)+_0x556c46+_0x3065c8(0x651)+_0x52655b[_0x3065c8(0x548)]+_0x3065c8(0x253)),process[_0x3065c8(0x350)](0x1)),_0x201aea=_0x52655b[0x0]['key'],_0x40d1d9=_0x52655b[0x0][_0x3065c8(0x333)];}await _0x390153['remove'](_0x3065c8(0x48a),_0x201aea),console['log']('\x20\x20✓\x20Removed\x20license\x20'+_0x201aea+'\x20\x20(licensee:\x20'+(_0x40d1d9[_0x3065c8(0x320)]||_0x3065c8(0x433))+')');}finally{await _0x437a54[_0x3065c8(0x527)]();}}async function _0x4c083b(_0x5bb228,_0x7ae217,_0x5c037d){const _0x1a7929=_0x5ed52c;!_0x5bb228&&(console[_0x1a7929(0x196)](_0x1a7929(0x1e2)),process['exit'](0x1));!_0x5c037d['token']&&!(_0x5c037d[_0x1a7929(0x3f5)]&&_0x5c037d[_0x1a7929(0x1fb)])&&(console[_0x1a7929(0x196)](_0x1a7929(0x211)),process['exit'](0x1));const _0x4a6774=_0x5c037d['selfAddress']||_0x7ae217[_0x1a7929(0x5a3)]?.[_0x1a7929(0x4cc)];!_0x4a6774&&(console[_0x1a7929(0x196)](_0x1a7929(0x351)+_0x1a7929(0x3f9)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x1a7929(0x350)](0x1));const _0x2b36f1=require$$5,_0x4dd08e=new _0x2b36f1(_0x7ae217[_0x1a7929(0x352)],{'sync':{'address':_0x4a6774,'auto_reconcile':![]}});await _0x4dd08e[_0x1a7929(0x37b)]();try{const _0x39d22f=_0x4dd08e['_systemEnv'];if(_0x39d22f&&_0x39d22f[_0x1a7929(0x54f)](_0x1a7929(0x55f))){let _0x1bacae=![];for(const _0x20fa11 of _0x39d22f[_0x1a7929(0x3a2)]('~tokens')){_0x1bacae=!![];break;}_0x1bacae&&console[_0x1a7929(0x581)](_0x1a7929(0x311)+_0x1a7929(0x576));}console[_0x1a7929(0x581)](_0x1a7929(0x454)+_0x5bb228+'…'),await _0x4dd08e[_0x1a7929(0x5a3)][_0x1a7929(0x482)](_0x5bb228[_0x1a7929(0x53d)](/\/+$/,''),{'token':_0x5c037d[_0x1a7929(0x3f6)],'username':_0x5c037d[_0x1a7929(0x3f5)],'password':_0x5c037d[_0x1a7929(0x1fb)]}),console[_0x1a7929(0x581)](_0x1a7929(0x517)),console[_0x1a7929(0x581)](_0x1a7929(0x4cf));}finally{await _0x4dd08e[_0x1a7929(0x527)]();}}async function _0x586ac3(){const _0x2b7568=_0x5ed52c,_0x4f1977=Date[_0x2b7568(0x600)](),_0xa54e87=_0x3e4438(process[_0x2b7568(0x1b3)]),_0x15dca6=_0x196dfc(_0xa54e87),_0x9e8786=_0x4a0cbe['resolve'](_0x15dca6[_0x2b7568(0x352)]);!_0x15dca6[_0x2b7568(0x538)]&&!process['stdin'][_0x2b7568(0x5a4)]&&(_0x15dca6['noRepl']=!![]);const _0x53f3ca=require$$5,{start:_0x2b5d79,colorLog:_0x500643}=requireOkdbShell(),_0x5446e1=require$$1$2,_0x12f65e={..._0x15dca6[_0x2b7568(0x1be)]?{'encryptionKey':_0x15dca6[_0x2b7568(0x1be)]}:{},..._0x15dca6['noAdmin']?{'admin':![]}:_0x46d0db(_0x15dca6[_0x2b7568(0x405)])?{'admin':_0x15dca6['admin']}:{},..._0x46d0db(_0x15dca6[_0x2b7568(0x2c5)])?{'api':_0x15dca6['api']}:{},..._0x46d0db(_0x15dca6[_0x2b7568(0x65b)])?{'auth':_0x15dca6[_0x2b7568(0x65b)]}:{},..._0x46d0db(_0x15dca6['mcp'])?{'mcp':_0x15dca6[_0x2b7568(0x38d)]}:{},..._0x15dca6[_0x2b7568(0x38a)]!==![]?{'timeMachine':_0x15dca6[_0x2b7568(0x38a)]}:{}},_0xdcf65e=_0x6361bf(_0x15dca6);if(!_0x5446e1[_0x2b7568(0x56f)]){const _0x57c439=_0x19b215(),_0x5d8df7=_0x15dca6[_0x2b7568(0x629)]?_0x2b7568(0x57c):_0x15dca6[_0x2b7568(0x464)]!=null&&_0x15dca6['workersFlag']!==''?_0x2b7568(0x625):process.env.OKDB_HTTP_WORKERS?'OKDB_HTTP_WORKERS\x20env':_0x15dca6[_0x2b7568(0x468)]?.['workers']!=null?_0x2b7568(0x3d4):_0x2b7568(0x4d1)+Math['max'](0x1,require$$0[_0x2b7568(0x356)]()[_0x2b7568(0x548)]-0x1);process[_0x2b7568(0x2f8)]['write'](_0x2b7568(0x63e)+_0xdcf65e+'\x20('+_0x5d8df7+(!_0x57c439?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x5446e1['isWorker']){const _0x1afa5c={..._0x12f65e},_0x3b738c=new _0x53f3ca(_0x9e8786,_0x1afa5c);_0x3b738c[_0x2b7568(0x581)]['detachConsole']?.();const _0x2f10ac=process.env.OKDB_CLUSTER_SLOT??'?',_0x39f719={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x50466d=_0x39f719[_0x15dca6[_0x2b7568(0x1a7)]]??_0x39f719[_0x2b7568(0x420)];_0x3b738c['log'][_0x2b7568(0x33b)](_0x3c699c=>{const _0x5f4649=_0x2b7568;if((_0x39f719[_0x3c699c[_0x5f4649(0x5c7)]]??0x1)<_0x50466d)return;try{process[_0x5f4649(0x5cf)]?.({'__okdbCluster':_0x5f4649(0x581),'slot':_0x2f10ac,'pid':process[_0x5f4649(0x4cb)],'entry':_0x3c699c});}catch{}}),await _0x3b738c[_0x2b7568(0x37b)]();const {attachWorkerCluster:_0x542250}=requireOkdbCluster();_0x542250(_0x3b738c),await _0x4d8d16(_0x3b738c,_0x15dca6[_0x2b7568(0x53e)]);return;}if(_0xdcf65e>0x1){const {runClustered:_0x442c94}=requireOkdbCluster(),_0x3ab699=new _0x53f3ca(_0x9e8786,{..._0x12f65e,'engines':![],'processors':![],'compaction':![]});await _0x3ab699[_0x2b7568(0x37b)]();const _0x3ba3ed=async()=>{const _0x53991e=_0x2b7568,_0x353e58=new _0x53f3ca(_0x9e8786,{..._0x12f65e});return await _0x353e58[_0x53991e(0x37b)](),_0x353e58;},_0x4aad07=_0x442c94({'workers':_0xdcf65e,'makeOkdb':_0x3ba3ed,'port':_0x15dca6[_0x2b7568(0x53e)],'primaryOkdb':_0x3ab699});let _0x18d97b=![];async function _0x3a3e17(_0x54928e){const _0x36dfd1=_0x2b7568;_0x18d97b&&(process[_0x36dfd1(0x1eb)][_0x36dfd1(0x5b8)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x36dfd1(0x350)](0x82));_0x18d97b=!![],process[_0x36dfd1(0x1eb)][_0x36dfd1(0x5b8)](_0x36dfd1(0x387)+(_0x54928e||_0x36dfd1(0x471))+_0x36dfd1(0x230));const _0xf48401=setTimeout(()=>{const _0x205eff=_0x36dfd1;process['stderr'][_0x205eff(0x5b8)](_0x205eff(0x455)),process[_0x205eff(0x350)](0x0);},0xbb8);_0xf48401[_0x36dfd1(0x2f9)]?.();try{await _0x4aad07['close']();}catch(_0x41f8c8){process['stderr'][_0x36dfd1(0x5b8)]('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x41f8c8?.['message']??_0x41f8c8)+'\x0a');}try{await _0x3ab699['close']();}catch(_0x3fbc34){process[_0x36dfd1(0x1eb)][_0x36dfd1(0x5b8)](_0x36dfd1(0x4f0)+(_0x3fbc34?.[_0x36dfd1(0x34d)]??_0x3fbc34)+'\x0a');}process[_0x36dfd1(0x350)](0x0);}_0x15dca6[_0x2b7568(0x2de)]=_0xdcf65e;if(!_0x15dca6[_0x2b7568(0x538)]){_0x3ab699[_0x2b7568(0x581)][_0x2b7568(0x43c)]?.(),_0x22e0bc(_0x3ab699[_0x2b7568(0x65b)]?.[_0x2b7568(0x531)]?.()??[]),await _0x2b5d79(_0x3ab699,_0x15dca6);return;}process[_0x2b7568(0x2f8)][_0x2b7568(0x5b8)](_0x2b7568(0x31a)+process[_0x2b7568(0x4cb)]+_0x2b7568(0x2b6)+_0xdcf65e+'\x20'+(_0x2b7568(0x43e)+_0x15dca6[_0x2b7568(0x53e)]+'\x0a')),console[_0x2b7568(0x581)](''),console[_0x2b7568(0x581)](_0x2b7568(0x2ac)),console[_0x2b7568(0x581)](_0x2b7568(0x43a)+_0x15dca6[_0x2b7568(0x53e)]+'\x20\x20('+_0xdcf65e+_0x2b7568(0x2ce)),console[_0x2b7568(0x581)](_0x2b7568(0x60e)+_0x9e8786),console[_0x2b7568(0x581)](_0x2b7568(0x46d)+_0x3ab699['id']),console['log'](_0x2b7568(0x526)+_0x15dca6[_0x2b7568(0x53e)]+_0x2b7568(0x1e8));!_0x15dca6[_0x2b7568(0x1dd)]&&console['log'](_0x2b7568(0x58e)+_0x15dca6[_0x2b7568(0x53e)]+_0x2b7568(0x4d0));console['log'](''),_0x22e0bc(_0x3ab699[_0x2b7568(0x65b)]?.[_0x2b7568(0x531)]?.()??[]),process['on'](_0x2b7568(0x2d1),()=>_0x3a3e17(_0x2b7568(0x2d1))),process['on'](_0x2b7568(0x5c0),()=>_0x3a3e17(_0x2b7568(0x5c0))),process['on'](_0x2b7568(0x1bc),()=>_0x3a3e17(_0x2b7568(0x1bc)));return;}const _0x465472=new _0x53f3ca(_0x9e8786,_0x12f65e);_0x465472[_0x2b7568(0x581)]['detachConsole']?.();const _0x468371=_0x465472[_0x2b7568(0x581)][_0x2b7568(0x33b)](_0x254aed=>_0x500643(_0x254aed,_0x15dca6['logLevel']));if(_0x15dca6['noRepl'])process['stdout'][_0x2b7568(0x5b8)](_0x2b7568(0x63b));await _0x465472[_0x2b7568(0x37b)]();if(_0x15dca6[_0x2b7568(0x538)])process[_0x2b7568(0x2f8)][_0x2b7568(0x5b8)](_0x2b7568(0x41b));try{await _0x4d8d16(_0x465472,_0x15dca6[_0x2b7568(0x53e)]);}catch(_0x5e1c3e){_0x5e1c3e['code']===_0x2b7568(0x513)&&(console[_0x2b7568(0x196)](_0x2b7568(0x360)+_0x15dca6[_0x2b7568(0x53e)]+_0x2b7568(0x5af)),process[_0x2b7568(0x350)](0x1));throw _0x5e1c3e;}if(_0x15dca6[_0x2b7568(0x538)])process['stdout'][_0x2b7568(0x5b8)](_0x2b7568(0x386)+_0x15dca6[_0x2b7568(0x53e)]+'\x0a');if(!_0x15dca6['noRepl'])_0x465472['log'][_0x2b7568(0x43c)]?.(),_0x468371?.(),_0x22e0bc(_0x465472['auth']?.[_0x2b7568(0x531)]?.()??[]),await _0x2b5d79(_0x465472,_0x15dca6);else{const _0x2c27a1=_0x4a0cbe[_0x2b7568(0x482)](_0x9e8786,_0x2b7568(0x282));try{_0x46e1f8[_0x2b7568(0x3b9)](_0x2c27a1,String(process[_0x2b7568(0x4cb)]));}catch{}const _0x46aaa5=Date[_0x2b7568(0x600)]()-_0x4f1977;console[_0x2b7568(0x581)](''),console[_0x2b7568(0x581)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x2b7568(0x581)](_0x2b7568(0x267)+_0x15dca6[_0x2b7568(0x53e)]),console[_0x2b7568(0x581)](_0x2b7568(0x575)+_0x9e8786),console[_0x2b7568(0x581)](_0x2b7568(0x265)+_0x465472['id']);{const _0x300fea=_0x465472['_systemEnv']?.['db']?.[_0x2b7568(0x61a)]?.('__writeCounter')??0x0,_0x442c8a=[..._0x465472[_0x2b7568(0x25b)][_0x2b7568(0x222)]()][_0x2b7568(0x1d8)](_0x54f6a0=>!_0x54f6a0['startsWith']('~'))[_0x2b7568(0x548)];if(_0x465472[_0x2b7568(0x368)]?.['active']?.[_0x2b7568(0x5c1)]===0x1){const _0x40f51a=Math['ceil']((_0x465472[_0x2b7568(0x368)][_0x2b7568(0x219)][_0x2b7568(0x554)]-Date[_0x2b7568(0x600)]())/0x5265c00);console[_0x2b7568(0x581)](_0x2b7568(0x1bf)+_0x465472[_0x2b7568(0x368)][_0x2b7568(0x219)][_0x2b7568(0x320)]+'\x20(expires\x20in\x20'+_0x40f51a+_0x2b7568(0x4a2));}else{if(_0x465472[_0x2b7568(0x368)]?.['active']){const _0x3f66ff=_0x465472['_license'][_0x2b7568(0x219)];console[_0x2b7568(0x581)]('\x20\x20\x20\x20license:\x20'+_0x3f66ff[_0x2b7568(0x320)]+_0x2b7568(0x3f3)+new Date(_0x3f66ff[_0x2b7568(0x554)])[_0x2b7568(0x61e)]()[_0x2b7568(0x30b)](0x0,0xa)+')');const _0x1cde76=_0x3f66ff['limits']||{};if(_0x1cde76['maxWrites']){const _0x2e474a=Math[_0x2b7568(0x32b)](_0x300fea/_0x1cde76['maxWrites']*0x64);console[_0x2b7568(0x581)](_0x2b7568(0x291)+_0x300fea[_0x2b7568(0x4ca)]()+_0x2b7568(0x3ae)+_0x1cde76[_0x2b7568(0x3aa)]['toLocaleString']()+_0x2b7568(0x574)+_0x2e474a+_0x2b7568(0x23d)+_0x442c8a+(_0x1cde76['envs']?'/'+_0x1cde76[_0x2b7568(0x444)]:'')+'\x20env'+(_0x442c8a===0x1?'':'s'));}}else{if(_0x465472[_0x2b7568(0x368)]){const _0x25e6a3=_0x465472[_0x2b7568(0x368)]['getPins'](),_0x28461d=_0x25e6a3[_0x2b7568(0x548)]?_0x25e6a3[_0x2b7568(0x2c1)](_0x522516=>_0x522516['pin'])[_0x2b7568(0x482)](',\x20'):_0x2b7568(0x505),_0x249814=_0x465472[_0x2b7568(0x368)][_0x2b7568(0x1db)],_0x3cca3d=_0x249814['limits'][_0x2b7568(0x3aa)]?Math['round'](_0x300fea/_0x249814['limits']['maxWrites']*0x64):0x0;console[_0x2b7568(0x581)](_0x2b7568(0x5a7)),console[_0x2b7568(0x581)](_0x2b7568(0x291)+_0x300fea['toLocaleString']()+_0x2b7568(0x3ae)+_0x249814[_0x2b7568(0x52b)][_0x2b7568(0x3aa)]['toLocaleString']()+_0x2b7568(0x574)+_0x3cca3d+_0x2b7568(0x23d)+_0x442c8a+_0x2b7568(0x3ae)+_0x249814[_0x2b7568(0x52b)][_0x2b7568(0x444)]+_0x2b7568(0x295)),console['log'](_0x2b7568(0x5c8)+_0x28461d);}}}}console['log'](_0x2b7568(0x2eb)+_0x15dca6[_0x2b7568(0x53e)]+_0x2b7568(0x1e8));!_0x15dca6[_0x2b7568(0x1dd)]&&console[_0x2b7568(0x581)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x15dca6[_0x2b7568(0x53e)]+_0x2b7568(0x4d0));console[_0x2b7568(0x581)](''),console[_0x2b7568(0x581)](_0x2b7568(0x5b7)+_0x46aaa5+'ms'),_0x22e0bc(_0x465472[_0x2b7568(0x65b)]?.[_0x2b7568(0x531)]?.()??[]);let _0x328fa9=![];async function _0x37f8ca(_0x1aa068){const _0x5cb953=_0x2b7568;_0x328fa9&&(process['stderr'][_0x5cb953(0x5b8)](_0x5cb953(0x646)),process[_0x5cb953(0x350)](0x82));_0x328fa9=!![],process[_0x5cb953(0x1eb)][_0x5cb953(0x5b8)](_0x5cb953(0x387)+(_0x1aa068||_0x5cb953(0x471))+_0x5cb953(0x1e3));const _0x2b0515=setTimeout(()=>{const _0x52c543=_0x5cb953;process[_0x52c543(0x1eb)]['write'](_0x52c543(0x197)),process[_0x52c543(0x350)](0x1);},0x1388);try{_0x46e1f8[_0x5cb953(0x479)](_0x2c27a1);}catch{}try{await _0x465472[_0x5cb953(0x527)]();}catch(_0x20dc83){process[_0x5cb953(0x1eb)]['write'](_0x5cb953(0x25f)+(_0x20dc83?.[_0x5cb953(0x34d)]??_0x20dc83)+'\x0a');}clearTimeout(_0x2b0515),process[_0x5cb953(0x1eb)][_0x5cb953(0x5b8)](_0x5cb953(0x247)),process[_0x5cb953(0x350)](0x0);}process['on'](_0x2b7568(0x2d1),()=>_0x37f8ca(_0x2b7568(0x2d1))),process['on'](_0x2b7568(0x5c0),()=>_0x37f8ca(_0x2b7568(0x5c0))),process['on'](_0x2b7568(0x1bc),()=>_0x37f8ca(_0x2b7568(0x1bc)));}}const _0x3a0616=new Set(['version','doctor','init',_0x5ed52c(0x390),'export',_0x5ed52c(0x5f0),_0x5ed52c(0x293),_0x5ed52c(0x3f6),_0x5ed52c(0x482),'license']),_0x654cbe=process[_0x5ed52c(0x1b3)][0x2];if(_0x654cbe===_0x5ed52c(0x35a))console[_0x5ed52c(0x581)](require$$3['version']),process[_0x5ed52c(0x350)](0x0);else{if(_0x654cbe&&_0x3a0616[_0x5ed52c(0x3e4)](_0x654cbe)){const _0x39d04e=process['argv']['slice'](0x3),_0x50c84c=_0x3e4438([_0x5ed52c(0x276),_0x5ed52c(0x3e7),..._0x39d04e]),_0x533972=_0x196dfc(_0x50c84c),_0x5251bf=new Set(['--path','-d',_0x5ed52c(0x395),'-k',_0x5ed52c(0x635),'-c',_0x5ed52c(0x22b),'-p',_0x5ed52c(0x279),_0x5ed52c(0x21e),'-e',_0x5ed52c(0x2ed),_0x5ed52c(0x3c2),_0x5ed52c(0x318),_0x5ed52c(0x400),_0x5ed52c(0x37e),'--grants',_0x5ed52c(0x339),'--token',_0x5ed52c(0x566),'-u',_0x5ed52c(0x516)]);let _0xfec2b=null;for(let _0xab601a=0x0;_0xab601a<_0x39d04e[_0x5ed52c(0x548)];_0xab601a++){if(_0x5251bf[_0x5ed52c(0x3e4)](_0x39d04e[_0xab601a])){_0xab601a++;continue;}if(!_0x39d04e[_0xab601a]['startsWith']('-')){_0xfec2b=_0x39d04e[_0xab601a];break;}}(async()=>{const _0x1e7987=_0x5ed52c;if(_0x654cbe===_0x1e7987(0x3f6)){const _0x459721=process[_0x1e7987(0x1b3)][0x3],_0x5b0bfb=process['argv']['slice'](0x4),_0x11e72d=_0x3e4438([_0x1e7987(0x276),_0x1e7987(0x3e7),..._0x5b0bfb]),_0x3b1914=_0x196dfc(_0x11e72d),_0x40fad5=new Set([_0x1e7987(0x5e4),'-d',_0x1e7987(0x395),'-k','--config','-c','--port','-p',_0x1e7987(0x3c2),'--password',_0x1e7987(0x400),_0x1e7987(0x37e),_0x1e7987(0x54e),_0x1e7987(0x339),_0x1e7987(0x279),_0x1e7987(0x21e),'-e','--types']),_0x4992af=[];for(let _0x3aeb9c=0x0;_0x3aeb9c<_0x5b0bfb[_0x1e7987(0x548)];_0x3aeb9c++){if(_0x40fad5[_0x1e7987(0x3e4)](_0x5b0bfb[_0x3aeb9c])){_0x3aeb9c++;continue;}if(_0x5b0bfb[_0x3aeb9c][_0x1e7987(0x52f)]('-'))continue;_0x4992af[_0x1e7987(0x26a)](_0x5b0bfb[_0x3aeb9c]);}switch(_0x459721){case _0x1e7987(0x5a5):await _0x5f3378(_0x3b1914,_0x11e72d);break;case _0x1e7987(0x4bf):await _0xba4ad1(_0x3b1914);break;case _0x1e7987(0x399):await _0x1ee8b3(_0x4992af[0x0],_0x3b1914);break;default:console[_0x1e7987(0x196)](_0x1e7987(0x414)+_0x459721+'\x22.\x20Use:\x20create,\x20list,\x20revoke'),process[_0x1e7987(0x350)](0x1);}return;}if(_0x654cbe===_0x1e7987(0x363)){const _0x1b5817=requireOkdbLicenseCodec(),_0x218239=process[_0x1e7987(0x1b3)][_0x1e7987(0x30b)](0x3),_0x51f0c7=_0x3e4438([_0x1e7987(0x276),_0x1e7987(0x3e7),..._0x218239]),_0x4f2d0f=_0x196dfc(_0x51f0c7),_0x2a7dc0=new Set(['--path','-d',_0x1e7987(0x395),'-k','--config','-c',_0x1e7987(0x22b),'-p',_0x1e7987(0x279)]),_0xd86aec=[];for(let _0x4dd51c=0x0;_0x4dd51c<_0x218239['length'];_0x4dd51c++){if(_0x2a7dc0[_0x1e7987(0x3e4)](_0x218239[_0x4dd51c])){_0x4dd51c++;continue;}if(_0x218239[_0x4dd51c]['startsWith']('-'))continue;_0xd86aec[_0x1e7987(0x26a)](_0x218239[_0x4dd51c]);}const _0x54542e=_0xd86aec[0x0]??null;if(_0x54542e===_0x1e7987(0x53b))await _0x4fe222(_0xd86aec[0x1],_0x4f2d0f);else{if(!_0x54542e)await _0x53735f(_0x4f2d0f);else{let _0x1debf2=_0x1b5817[_0x1e7987(0x28a)](_0x54542e);if(_0x1debf2===_0x1e7987(0x2f6)&&_0x46e1f8[_0x1e7987(0x34b)](_0x54542e))_0x1debf2='path';if(_0x1debf2===_0x1e7987(0x307))try{const _0x40bc2d=_0x46e1f8[_0x1e7987(0x60f)](_0x54542e,_0x1e7987(0x2a0))['trim'](),_0x4df6ca=_0x1b5817['detectInputType'](_0x40bc2d);if(_0x4df6ca==='activation'){await _0x5426d1(_0x40bc2d,_0x4f2d0f);return;}await _0x28c6ca(_0x54542e,_0x4f2d0f);return;}catch(_0x2e0be2){console[_0x1e7987(0x196)](_0x1e7987(0x451)+_0x54542e+':\x20'+_0x2e0be2[_0x1e7987(0x34d)]),process['exit'](0x1);}switch(_0x1debf2){case _0x1e7987(0x324):await _0x28c6ca(_0x54542e,_0x4f2d0f);break;case'activation':await _0x5426d1(_0x54542e,_0x4f2d0f);break;case'uuid':await _0x4ba856(_0x54542e,_0x4f2d0f);break;default:console[_0x1e7987(0x196)](_0x1e7987(0x5a9)+_0x54542e+'\x22'),console[_0x1e7987(0x196)](''),console[_0x1e7987(0x196)]('\x20\x20Expected\x20one\x20of:'),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console['error'](_0x1e7987(0x622)),console[_0x1e7987(0x196)](_0x1e7987(0x640)),console[_0x1e7987(0x196)]('\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file'),console[_0x1e7987(0x196)](''),console[_0x1e7987(0x196)](_0x1e7987(0x2dc)),process[_0x1e7987(0x350)](0x1);}}}return;}switch(_0x654cbe){case'doctor':await _0x153344(_0x533972);break;case'init':await _0xfb94a2();break;case _0x1e7987(0x293):await _0x24fe93(_0x533972);break;case _0x1e7987(0x390):await _0x221481(_0xfec2b??_0x4a0cbe[_0x1e7987(0x64c)]('./okdb-backup'),_0x533972);break;case _0x1e7987(0x59f):await _0x203a43(_0xfec2b??_0x4a0cbe['resolve'](_0x1e7987(0x38f)),_0x533972,_0x50c84c);break;case _0x1e7987(0x5f0):await _0x7fc0e1(_0xfec2b??_0x4a0cbe[_0x1e7987(0x64c)]('./okdb-export.ndjson'),_0x533972,_0x50c84c);break;case _0x1e7987(0x482):await _0x4c083b(_0xfec2b,_0x533972,_0x50c84c);break;}})()[_0x5ed52c(0x500)](()=>process[_0x5ed52c(0x350)](0x0))[_0x5ed52c(0x536)](_0x4911cd=>{const _0x298fa2=_0x5ed52c;console['error'](_0x298fa2(0x59e)+(_0x4911cd['message']||_0x4911cd)+'\x0a'),process[_0x298fa2(0x350)](0x1);});}else _0x586ac3()['catch'](_0x6888c5=>{const _0x552fc8=_0x5ed52c;console[_0x552fc8(0x196)](_0x552fc8(0x2b7)),console[_0x552fc8(0x196)](_0x6888c5[_0x552fc8(0x25c)]||_0x6888c5),process[_0x552fc8(0x350)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;function _0x5003(){const _0x1b56a4=['\x20process','repeat','setTtl','type:registered','\x20\x20Shell\x20commands','\x20\x20skipped=','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','.log','constructor','_done','holder','_lookupByName','[okdb]\x20import\x20complete','getPins','node/','null','../okdb','cpuPct','find','\x20worker(s)\x20still\x20serving','list','logs','registerType','/type/users/item/alice\x0a\x20\x20\x20\x20','SYSTEM_STOPPED','setDesired','\x20\x20records=','.kdbconfig','string','OKDB-PIN-V1:','concat','toLocaleString','pid','address','getClock','handle','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','/admin/index.html','default:\x20cores−1\x20=\x20','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','Embeddings','_computeStatus','ingest','node:crypto','decoded','emit','ORPHAN\x20(env-closed\x20write)','LICENSED_BUILD','uptime','config\x20file\x20valid:\x20','[okdb]\x20preserved:\x20','FOREIGN_KEY_VIOLATION','_acquiredAt','\x20\x20\x20\x20features:\x20\x20','payload','_timer','(worst\x20','rowKey','size',':\x20expected\x20','Index\x20\x22','importBlobs','val','noteListenAddr','dim','FTS_DROP','(null)','queue','process','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','running','Activation\x20invalid:\x20','_lock','code','Shutting\x20down\x20due\x20to\x20license\x20expiry','env/','_inflight',',\x20label:\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20opening\x20','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','_started','expired','ms\x20on\x20env=',',\x20got\x20','then','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','primary','external','\x20day(s).','(add\x20a\x20license\x20first)','fts:drop','level:\x20info','\x20—\x20','[okdb]\x20invalid\x20port:\x20','memoryUsage','result','singletonClaims','true','_draining','load','extend','_dedupeMax','start\x20','EADDRINUSE','raw-put','\x20\x20Type\x20','--address','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','false','_onStop','floor','ms\x20p99=','_cmd','config','committed','events','QUIT','createPublicKey','platform','busy','targetKey','sig','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','close','grants','slot','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','limits','OKDBUniqueConstraintError','isPrimary','\x20\x20\x20\x20addedAt:\x20\x20\x20','startsWith','_singletonLock','getSecurityNotices','ttl','_lastCpuUsage','_admissionTimer','INDEX_ALREADY_REGISTERED','catch','identity','noRepl','\x20\x20Writes:\x20\x20','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','remove','__okdbSlot','replace','port','2.1.0','[okdb]\x20export\x20complete','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','_enableChangelog','number','\x20records…','USE','env:opened','resetFts','length','10174FXXIwy','licensed','fieldPath','migrations','supervisorKey','--grants','hasType','_nodeDbCache','_dedupeKey','standalone',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','expiresAt','yes','_servingEngines','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','isWanted','transport','ESRCH','recheck','flushed','add','_sandbox','~tokens','trim','No\x20license\x20found\x20matching\x20this\x20activation\x20token','parkedNow','force','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','online','--username','TYPES','ms\x20activeWriters=','drop','/types\x0a\x20\x20\x20\x20','\x20(must\x20be\x201–65535)','perf_hooks','_bpParkedTotal','\x20\x20(name:\x20','isWorker','fts:reset','[okdb]\x20invalid\x20','\x20worker\x20slot=','Token\x20secret\x20not\x20configured','\x20writes\x20(','\x20\x20\x20\x20path:\x20\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','[filter]','Records','fts:registered','node:perf_hooks','hint','--no-cluster','processor','_buildProcessingFacet','entries','\x1b[0m','log','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20\x20[','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','every','processor:ready','_selfKey','other','line','ms\x20env=','terminal','\x20file','all','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','Index\x20\x27','keys:','invalid','_nodeDead','./okdb-data','references','\x27\x20doesn\x27t\x20exist','available','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','system:poke','setSchema','halted','transaction','NOT_FOUND','_ownMeta','\x0a[okdb]\x20error:\x20','export','FOREIGN_KEY_DELETE_RESTRICTED','body','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','sync','isTTY','create','_scheduleFlush','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','ACTIVATION_EXPIRED','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','_enqueuedAt','processorId','[okdb]\x20error:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','update','\x20already\x20in\x20use','search','valid','node\x20','\x20\x20\x20\x20expires:\x20\x20\x20','LICENSE_INVALID','EXIT','reduce','[okdb]\x20started\x20in\x20','write','_markSeen','[okdb]\x20imported\x20\x20types=','\x1b[35m','\x0a\x20\x20','procmodeack/','\x27:\x20','\x20\x20score:','SIGTERM','licenseType','base64url','System','FTS_RESET','oldestPendingMs','_onProcEvent','level','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','fts','_heartbeatInFlight','txn:rollback','setLogger','expiry','forEach','send','flushLmdb','[okdb-cluster]\x20respawning\x20worker\x20slot=','pin','_buildChildRow','HELP','processors/','meta','SCHEMA_VALIDATION_FAILED','ENVS','firstTs','__esModule','typeSubDbs','(primary\x20=\x20processor)','wrong_node','_lockDb','_caps','system','\x22\x20→\x20','removeNode','\x0a\x20\x20\x20\x20','--path','attachFeed','\x20\x20\x20\x20licensee:\x20\x20','role','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','charCodeAt','\x0a\x20\x20Invalid\x20JSON:\x20','_outstanding','_lastPublishAt','_isWriter','view:progress','exportBlobs','import','engines','\x20\x20\x20\x20\x20\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','_active','readUInt32BE','embeddings','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x20\x20Common\x20causes:','INDEX_RESET','_licenseHash','\x22\x20(must\x20be\x20debug|info|warn|error)','cause','isConnected','default','\x20\x20\x20\x20\x20\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','Admin','now','listRoutes','\x20\x20\x20\x20','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','uuid','Type\x20\x27','cli','bind','selfAddress','\x20HTTP\x20workers\x20','\x20documents\x20fail\x20validation','unhandledRejection','count','\x20\x20\x20\x20path:\x20\x20\x20\x20','readFileSync','__okdbCluster','getDesired','_buckets','commitP99Ms','\x22\x20is\x20used\x20by:\x20','toUpperCase','--open','_versionSkewWarned','\x20more','ref:violation_resolved','get','\x20pid=','heartbeatMs','_flushTimer','toISOString','Full-text\x20search','/\x20quit\x20/\x20Ctrl+C','okdb-writer:\x20env\x20closing\x20—\x20retry','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','errors','fork','--workers','reason','system:proc','index:reset','noCluster','_processStartedAt','childTransaction','workers','rows=','\x20\x20(','_committed','[okdb-cluster]\x20slot=','compaction','PUT','_systemEnv','stopHeartbeat','--config','cluster:\x20ready\x20(','_buildOwnRow','resetReadTxn','processors','../','[okdb]\x20starting…\x0a','_cursors','\x20\x20Error:\x20','[okdb]\x20http\x20workers:\x20','stopped','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','red','_lastCpuAt','POST','isFeatureEnabled','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','register','enabled','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x20===','listen','resolve','\x20\x20#','.kdb_history','magenta','Sync','\x22\x20matches\x20','node:events','~processes','[okdb]\x20reset:\x20','drain','depth','verify','SYSTEM_PROC','putSync','maxMs','auth','_report','bus:poke','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','error','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','features','_maybePublish','decommissioned','yellow','Events','UNIQUE_CONSTRAINT','process\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','files/','_publishNow','splice','\x20MB)','\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','createEnvironment','[okdb]\x20reset\x20aborted','logLevel','_openEnvLazy','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','Queue','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','routes','2120QKAYSI','name','hasDesired','--inspect','\x22\x20on\x20\x22','setOwnMeta','argv','type/','cluster:','details','decommission','_removeRowAsync','registry\x20heartbeat\x20skipped\x20(writer=','index:registered','system:bus_state_change','SIGBREAK','\x27\x20is\x20already\x20registered','key','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','7497YAbxRg','_startHeartbeat','targetType','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','[okdb]\x20exporting\x20blobs…','\x20\x20+','building','_isStale','(none)','reload','decommissioning','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20╔═══════════════════════════╗','getChanges','env:removed','\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','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','worker','\x20(slot=','event','\x22\x20already\x20exists','status','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','cyan','filter','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_onItem','effective','clear','noAdmin','registerIndex','expires','readUInt8','(empty)','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>',',\x20closing…\x0a','heapTotal','25ZlGSiN','\x20\x20╚═══════════════════════════╝','dirname','/api','_key','types','stderr','parse','[okdb]\x20backing\x20up\x20to\x20','_heartbeatTimer','(code=','writeUInt16BE','none','_kind','_clusterWorkerAttached','cluster','\x20active\x20env:\x20','copy','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','isActive','PUT\x20type/users/item/x\x20{\x22n\x22:1}','acquiredAt','password','LICENSE_EXPIRED_ACTION','ms/','_log','win32','config\x20file\x20invalid:\x20','toString','quantum','operation','sizeBefore','\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\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x0a===\x20OKDB_DIAG\x20','types:','setupPrimary','_lastCpuWindowMs','param','Invalid\x20primary\x20key\x20type:\x20','decodeLicenseBlob','ceil','caps','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','_supervisorKey','type/users\x20--help','beforeWrite','ppid','toLowerCase','connected','boolean','active','createInterface','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20\x20changes=','warn','--env','PUBLIC_KEY_PEM','HTTP\x20','bus:env_release','keys','padStart','\x20\x20\x20\x20\x20\x20\x20','access:\x20','\x0a\x20\x20License\x20details:','prototype','LOGS','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','unique:violation','--port','start','(no\x20types)','LICENSE_HASH_MISMATCH','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.',',\x20stopping\x20workers…\x0a','_isClusterController','properties','hidden','_quantum','item:remove','_pending','bus:proc','ITEM_REMOVE','\x20records','disable','migrate','_rootDb','%),\x20','_bpWaiters','raw-remove','_collectWriterFacet','readUInt16BE','open\x20','min','[env]','DELETE\x20type/users/item/x','_sampleOwnStats','[okdb]\x20closed\x20cleanly\x0a','ephemeral','listenAddr','typesPerEnv','dest','respawnTimer','_children','processor:paused','rmSync','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','_nodeDb','processing','\x20licenses','options','_singletonLocks','randomUUID','user','state','shift','[okdb-cluster]\x20worker\x20pid=','_envs','stack','INVALID_PRIMARY_KEY','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','[okdb]\x20close\x20error:\x20','--version','stopping','\x20bytes,\x20need\x20>=\x2065)','activateLicense','_coordinator','\x20\x20\x20\x20id:\x20\x20\x20\x20','127.0.0.1','\x20\x20\x20\x20port:\x20\x20','type/users/query\x20{\x22active\x22:true}','importFromFile','push','sandbox','gray','MALFORMED_TOKEN','_instanceId','_collectSingletonClaims','\x20│\x20','--watch','ITEM_UPDATE','dead','transport:\x20','creating','node','resetting','_listenAddr','--log-level','http://localhost:','once',':\x20key\x20[','dropIndex','processKey','[okdb]\x20exported\x20\x20types=','\x1b[36m','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','okdb.pid','claims','method','use\x20<env>','captureStackTrace','ENV_CLOSING_RETRY','INVALID_INDEX_KEY','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','detectInputType','license:activated','Examples','consecutiveFailures','values','inflightAgesMs','licenses','\x20\x20\x20\x20usage:\x20\x20\x20','some','reset','OKDBSchemaCollectionError','\x20envs','shmbufNative','blobs','ITEM_CREATE','_holderDead','derivePin','already\x20in\x20use','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','Version\x20mismatch\x20for\x20','lifecycle','stdin','utf8','updatedAt','_ensureDesired','registerFts',');\x20','ftsName','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','index:drop','ms\x20busy=','\x0d[okdb]\x20blobs:\x20','--changes','okdb-diag.','\x20\x20✓\x20OKDB\x20cluster\x20running','GET','--token','help','OKDBInvalidPrimaryKeyError','isArray','kill','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','activation','title',':\x20processor\x20(HTTP-silent),\x20','\x0a[okdb]\x20fatal\x20error:','assertFeature','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','processor:progress','\x20\x20(no\x20env\x20draining)','access','exp','_getType','bumpCmd','homedir','map','host','signalWant','allocUnsafe','api','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','views','\x20\x20\x20\x20\x20\x20','okdb-http-worker-child.js','hasOwnProperty','type','runtimeProcessesView','\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','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','[okdb-cluster]\x20','darwin','SIGINT','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20\x20http://localhost:','\x20\x20@','deregisterSelf','children','OKDBVersionMismatchError','issuedAt','EXPIRES','no\x20.kdbconfig\x20(using\x20defaults)','OKDBAlreadyExistsError','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','_admissionStarted','clusterWorkers',')\x20exited\x20','\x20statusEnv=','async','kind','createHmac','\x20tokens:','index','\x0d[okdb]\x20','137176TSSFFW','\x20\x20·\x20','input:\x20','id:\x20','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','/api/env/','--types','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','hex','removeSupervisedChild','change','_rawDb','license:added','__vocab/version','bus:type_drop','unknown','No\x20tokens.','stdout','unref','processor:resumed','exports','createHash','resume','cursorKey','active:','\x20\x20(unlimited)','\x20deleted','\x20logs\x20off\x0a','mkdirSync','loop-lag\x20','object','writeUInt8','path','system:drain','(on\x20any\x20path\x20command)','_onPoke','slice','isDead','_changefeed',']\x20already\x20maps\x20to\x20\x27','history','toFixed','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','shmbuf.node','ttl:clear','processor:retry','removeSync','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x0a\x0a\x20\x20','--password','createdAt','[okdb]\x20cluster\x20primary\x20pid=','\x20references\x20','publishChildRow','fanout','\x20in\x20','SIGINT\x20(double-tap)','licensee','LICENSEE','\x0a\x20\x20✓\x20License\x20activated','_wantDbHandle','blob','deaths','sync:apply','txn:start','SIG_INVALID','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','split','round','\x20to\x20quit.','startedAt','\x27\x20on\x20type\x20\x27','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','OKDBIndexAlreadyRegisteredError','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','28794wohpwu','value','isEnabled','\x20for\x20commands,\x20','_desiredOverlay','\x20environment\x20','indexToDb','--ttl','_role','attach','<path>','SYSTEM_POKE','FEATURES','sizeAfter','\x20\x20✗','[okdb]\x20created\x20./okdb-data','9iyycaA','\x20worker(s)\x20remaining','OKDBSchemaValidationError','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','LICENSE_ACTIVATION_INVALID','\x20not\x20found','\x20\x20·\x20\x20','\x1b[32m','--eval','existsSync','mode','message','xdg-open\x20','received\x20','exit','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','dbPath','\x20times\x20in\x20','sourceType','sha256','cpus','abs','\x20result','put','version','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','envsOpen','bold','listNodes','_flushDebounce','[okdb]\x20port\x20','_participate','VERSION_MISMATCH','license','roles','[okdb]\x20opening\x20','License\x20already\x20stored','fts:','_license','commitsPerSec','registry-publish','processor:error','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','INDEX_NOT_REGISTERED','listDesired','--no-admin','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','offWindow','OKDBTypeNotRegisteredError','from','License\x20expired\x20or\x20invalidated','onWindow','markClosed','cpuUsage','/api/','PERMISSIONS','equals','open','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','22796BIPqyO','--permissions','note','createServer','\x20\x20[okdb]\x20','records','license:invalid','fill','pause','\x20\x20✓\x20http\x20listening\x20on\x20:','\x0a[okdb]\x20received\x20','shutting\x20down…\x0a','set','timeMachine','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','question','mcp','trimStart','./okdb-export.ndjson','backup','writeUInt32BE','_hbTimer','_windowCbs','heapUsed','--key','inspect','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','openDB','revoke','white','817560nPseCz','transactionSync','_isReader','OKDBError','hostname','listLicenses','\x20\x20\x20\x20\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/','getRange','alloc','readline','_durs','files','enable','_baselines','startHeartbeat','maxWrites','time','Files','Bearer\x20','\x20/\x20','\x20\x20\x20\x20graceful\x20shutdown\x0a','dropFts','_startedAt','processes','_isFree','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','listening','peers=','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','2415523upYoHm','writeFileSync','rawBuf','_threadStats','\x20\x20\x20\x20limits:\x20\x20\x20\x20','listAll','instanceId','system:stopped','SCHEMA_COLLECTION_INVALID','index:ready','--name','\x20while\x20this\x20process\x20runs\x20','namespace','\x20\x20✓\x20Revoked\x20token\x20','max','shmbuf/package.json','label','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','Types','ttl:set','NAME','removeLicense','__identity','isFile','msg','_wantDb','body:\x20','_putRowAsync','config\x20http.workers','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','test','\x20\x20\x20\x20status:\x20\x20\x20\x20','timingSafeEqual','dynamic','_writer','slotKey','registry\x20publish\x20failing:\x20','error:\x20','reverse','view','_db','loadEnvFile','Engines','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','has','putNode','randomBytes','okdb','off','_drain','[okdb]\x20exporting\x20env\x20\x22','\x0a\x20\x20✓\x20License\x20added','ms\x20(attempt\x20','LICENSE_TYPE_OPEN','_startAdmission','http-server','\x20log\x20level:\x20','quit','\x27,\x20cannot\x20map\x20to\x20\x27','\x20(expires\x20','SIGKILL','username','token','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','updateSupervisedChildStats','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','onLicenseExpired','getProcess','_lastCpuPct','changes','_drainOne','queue/','--label','VIEW_PROGRESS','ref:violation','\x27\x20already\x20registered','schema:drop','admin','fromEntries','dedupeMax','env','\x20drainAge=','\x20ipc\x20error:\x20','Hint:\x20','{}[]:,\x0a\x0d\x09\x20','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20\x20⚠\x20\x20','claimGated','digest','syncPeers','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','assign','[okdb]\x20unknown\x20token\x20action:\x20\x22','_migrateVocab',':want','crypto','pending','exec',')\x20to\x20your\x20license\x20vendor.','\x20\x20✓\x20database\x20opened\x0a','_seen','prependListener','ready','type:drop','info','permissions','allSettled','license:removed','inst:','recent\x20writes\x20(newest\x20first)','reportThreadStats','current','\x22\x20to\x20enable\x20it.','\x20\x20Envs:\x20\x20\x20\x20','stringify','tags','nodesView','endsWith','mean','_activateProcesses','OKDBTypeAlreadyRegisteredError','setPrompt','afterWrite','(unset)','threads','_refreshDesiredSnapshot','stats','uncaughtException','single','\x20does\x20not\x20exist','\x20\x20\x20\x20port:\x20\x20\x20\x20','--test','detachConsole','killable','passive\x20HTTP\x20worker(s)\x20serving\x20:','Foreign\x20key\x20violation:\x20','\x0a\x20\x20okdb\x20doctor\x0a','selfKey','\x1b[37m','\x20\x20(need\x20≥\x2018)','envs','system:ready','tierList','INDEX_HAS_CONSUMERS','SYNC_COMMITS','_publishFailWarned','_handlePoke','Processors','next','\x20logs\x20on\x20\x20','nodeKey','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','dropType','[okdb]\x20error:\x20failed\x20to\x20read\x20','\x20\x20║','padEnd','\x0a\x20\x20Joining\x20cluster\x20at\x20','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','logRequests','inputSchema','http.workers','OKDBNotFoundError','__writeCounter','tryAcquire','call','PUB_FINGERPRINT','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','_highWater','\x20oldestPendingMs=','bus:drain','_rowKey','\x1b[90m','workersFlag','spki','PATCH','processorsView','http','draining','scrypt','maxExtra',',\x20signal=','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','_groupByProcess','<json-body>','_statusEnv','shutdown','dumpedAt','\x20died\x20','reap','_closed','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','build','verifyActivation','unlinkSync','__OKDB_PUB_FINGERPRINT__','\x20(durable\x20desired-state)','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','1ofN:','\x20\x20All\x20checks\x20passed.\x0a','_onTick','includes','join','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','sort','licenseHash','[on|off|level]','\x1b[33m','resetIndex','REMOVE','~licenses','--help','green','delete','started','database\x20path\x20not\x20writable:\x20','byteLength','data','\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','summary','287GkpCqa','INDEX_READY','freeze','isInteger','/type/users/query\x0a\x20\x20\x20\x20','commit','child_process','prompt','stop','embedded','_released','debug','function','ttlMs','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','_desired','~processes:desired','\x20license(s)','PIN','\x20@\x20','\x0a\x20\x20\x20\x20\x20\x20','rss','hard-killed'];_0x5003=function(){return _0x1b56a4;};return _0x5003();}
|