@kedem/okdb 2.1.0 → 2.1.1
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/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/embeddings/parts/embed-indexer-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
- package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +1 -1
- package/public/sections/engines/engine-ui-utils.js +1 -1
- package/public/sections/engines/index.ok.html +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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();}
|
|
2
|
+
'use strict';const _0x4d1b8e=_0x8225;(function(_0x4e317b,_0x355e79){const _0x203c62=_0x8225,_0x52a230=_0x4e317b();while(!![]){try{const _0x24a81e=-parseInt(_0x203c62(0x15e))/0x1*(-parseInt(_0x203c62(0x456))/0x2)+parseInt(_0x203c62(0x5af))/0x3*(parseInt(_0x203c62(0x325))/0x4)+parseInt(_0x203c62(0x252))/0x5+parseInt(_0x203c62(0x115))/0x6+parseInt(_0x203c62(0x4c9))/0x7*(parseInt(_0x203c62(0x238))/0x8)+parseInt(_0x203c62(0x4c7))/0x9+parseInt(_0x203c62(0x49d))/0xa*(-parseInt(_0x203c62(0x44e))/0xb);if(_0x24a81e===_0x355e79)break;else _0x52a230['push'](_0x52a230['shift']());}catch(_0x3a3585){_0x52a230['push'](_0x52a230['shift']());}}}(_0x580e,0x378cf));var require$$1=require('path'),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require(_0x4d1b8e(0x24a)),require$$0$3=require(_0x4d1b8e(0x388)),require$$0$1=require(_0x4d1b8e(0x48a)),require$$0$2=require(_0x4d1b8e(0x3f2)),require$$4=require('child_process'),require$$1$2=require(_0x4d1b8e(0x5cd)),require$$0$4=require('node:perf_hooks'),require$$0$5=require(_0x4d1b8e(0x1dd)),require$$0$6=require(_0x4d1b8e(0x52a));function getDefaultExportFromCjs(_0x10b221){const _0xccf0f5=_0x4d1b8e;return _0x10b221&&_0x10b221[_0xccf0f5(0x321)]&&Object[_0xccf0f5(0x1bc)]['hasOwnProperty'][_0xccf0f5(0x4ef)](_0x10b221,_0xccf0f5(0x3c2))?_0x10b221['default']:_0x10b221;}function _0x580e(){const _0x323985=['creating','--config','spki','reset','fts','decodeLicenseBlob','writeUInt8','\x1b[31m','OKDBVersionMismatchError','passive\x20HTTP\x20worker(s)\x20serving\x20:','./okdb-data','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','terminal','red','started','selfAddress','\x20months\x20from\x20issuance)','processes:\x20','2.1.1','_adminRelay','system:clock_change','INDEX_PROGRESS','Embeddings','commit','SIGBREAK','size','createdAt','types','_singletonLocks','start\x20','call','Full-text\x20search','OKDBIndexNotRegisteredError','\x20\x20\x20\x20path:\x20\x20\x20\x20','listNodes','--print','\x1b[33m','tags','sig','white','\x20\x20env=','config\x20file\x20invalid:\x20','~licenses','Bearer\x20','issuedAt','\x20\x20\x20\x20path:\x20\x20','_migrateVocab','_done','operation','%),\x20','logLevel','removeSupervisedChild','description','isFile','GET','\x20forked\x20','respawnTimer','LABEL','OKDBSchemaValidationError','_inflight','prompt','type/users/item/alice\x20--env\x20staging','next','base64url','_active','\x20references\x20','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','\x20envs',':\x20key\x20[','setLogger','role','uuid','keys','green','DELETE','\x20\x20·\x20\x20','[okdb]\x20port\x20','_clusterWorkerAttached','columns','noCluster','references','\x20to\x20quit.','revoke','decommission','_versionSkewWarned','type','\x20\x20\x20\x20features:\x20\x20','param','OKDBIndexHasConsumersError','node:events','disconnect','_admissionStarted','_nodeDbCache','_lastCpuAt','events','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved',')\x20exited\x20','length','children','data','_clusterOnMessage','percentile','importFromFile','<path>','setSchema','_dedupeMax','deregisterSelf','__okdbSlot','beforeWrite','tryAcquire','bus:type_drop','scrypt','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','INVALID_VALUE','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20for\x20commands,\x20','_hbTimer','key','charCodeAt','transactionSync','REMOVE','inflightAgesMs','view','Release','Indexes','\x20\x20(need\x20≥\x2018)','path','dirname','\x20license(s)','reverse','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','updatedAt','claims','export','[okdb]\x20http\x20workers:\x20','--help','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','ref:violation','[okdb]\x20preserved:\x20','exports','SWAP','single','--label','resetFts','pause','\x20drainAge=','\x20\x20✓\x20database\x20opened\x0a','every','TYPE_NOT_REGISTERED','\x0a[okdb]\x20received\x20','none','\x0a\x0a\x20\x20','\x20\x20@','setTtl','registry\x20heartbeat\x20skipped\x20(writer=','_drain','_acquiredAt','_groupByProcess','\x20\x20Writes:\x20\x20','getPins','(null)','~lock','ITEM_CREATE','active:','darwin','isWorker','processor:progress','\x20\x20\x20\x20\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/','dropping','processor:paused','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','[okdb]\x20backing\x20up\x20to\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20\x20\x20permissions:\x20','[okdb]\x20reset:\x20','\x22\x20→\x20','LICENSE_INVALID','OKDBTypeAlreadyRegisteredError','_onTick','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','processor:ready','files','padEnd','_isFree','ceil','DELETE\x20type/users/item/x','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','building','mkdirSync','message','dynamic','_lockDb','\x22.\x20Use:\x20create,\x20list,\x20revoke','INDEX_NOT_REGISTERED','unhandledRejection','process','mcp','host','stopped','\x20logs\x20off\x0a','Environments','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','function','_caps','--path','\x20\x20\x20\x20expires:\x20\x20\x20','updateSupervisedChildStats','commitsPerSec','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','isActive','kill','SYSTEM_PROC','heapTotal','decommissioned','_report','./okdb-backup','open','system:stopped','\x20\x20\x20\x20licensee:\x20\x20','ttlMs','714NrohfR','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','PUBLIC_KEY_PEM','epoch','\x20oldestPendingMs=','stop','primary','SCHEMA_COLLECTION_INVALID','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','/admin/index.html','okdb','Index\x20\x22','magenta','type/','uncaughtException','_durs','cyan','ref:violation_resolved','bold','processorsView','slot','INDEX_HAS_CONSUMERS','(empty)','item:remove','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','\x0a\x20\x20No\x20routes\x20matching\x20\x22','captureStackTrace','_heartbeatInFlight','workers','NAME','cluster','License\x20expired\x20or\x20invalidated','mean','indexes','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','current','\x20\x20[okdb]\x20','ROUTES','\x20tokens:','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','confirm','--inspect','_lastPublishAt','\x27,\x20cannot\x20map\x20to\x20\x27','_ensureTokensType','test','system','toFixed','log','registerIndex','_lastCpuWindowMs','\x20\x20Expected\x20one\x20of:','\x0d[okdb]\x20blobs:\x20','close','~processes','true','_started','some','false','createEnvironment','env:opened','sourceType','\x20supervised)','resolve','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','readFileSync','\x1b[37m','writes=','state','find','dead','clear','forEach','onLicenseExpired','_pending','standard','schema:set','instanceId','identity','ENVS','commitP99Ms','pin','pushEphemeral','types\x20--env\x20staging','818106ilNMdC','\x0a\x20\x20okdb\x20doctor\x0a','\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/','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','stack','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','createPublicKey','listening','./okdb-export.ndjson','\x20\x20Path\x20access','(code=','cpuUsage','_handleInProcess','win32','SIG_INVALID','_buckets','SIGINT','status','fast','\x20log\x20level:\x20','envsOpen','--address','database\x20path\x20not\x20writable:\x20','licenseId','note','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x0a\x20\x20','release','/api/','indexToDb','type/users/item/alice','\x20\x20✗','_nodeDb','queue/','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','cluster:\x20ready\x20(','heartbeatMs','\x20\x20\x20\x20port:\x20\x20','FOREIGN_KEY_VIOLATION','enabled','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','transaction','isConnected','\x20\x20\x20\x20\x20\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','decommissioning','_role','\x20\x20(name:\x20','_highWater','number','round','TYPES','PUT','_draining','\x20\x20(unlimited)','cluster:','_wantDb','SCHEMA_VALIDATION_FAILED','sizeBefore','off','_startHeartbeat','homedir','verifyActivation','history','\x20worker','allocUnsafe','value','_cmd','SYSTEM_POKE','\x20(expires\x20in\x20','includes','_removeRowAsync','blobs','entry','217766ZtLiOR','License\x20signature\x20invalid:\x20','null','api',']\x20already\x20maps\x20to\x20\x27','hidden','threads','open\x20','_isReader','activation','_outstanding','[okdb]\x20cluster\x20primary\x20pid=','typeSubDbs','\x20\x20\x20http://localhost:','\x20/\x20','dedupeMax','\x20died\x20','attach','dumpedAt','config','\x20\x20Error:\x20','[okdb]\x20cluster\x20close\x20error:\x20','publishChildRow','_putRowSync','sort','shift','fork','\x20logs\x20on\x20\x20','<json-body>','system:env_release','reportThreadStats','Hint:\x20','SYSTEM_STOPPED','records','\x27\x20on\x20type\x20\x27','resetting','POST','\x20licenses','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','dropFts','\x22\x20matches\x20','licenseHash','build','createHmac','running','putNode','payload','_clusterOrphanWatch','level','replace','raw-remove','emit','deaths','slotKey','isInteger','busy','OKDBTypeNotRegisteredError','assign','writeFileSync','_sampleOwnStats','_wantDbHandle','[okdb]\x20imported\x20\x20types=','SIGINT\x20(double-tap)','inputSchema','node','freeze','schema:drop','_onStop','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','decodeActivationToken','.kdbconfig','okdb.pid','writeUInt32BE','addSupervisedChild','_timer','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','setDesired','[okdb-cluster]\x20worker\x20pid=','(on\x20any\x20path\x20command)','now','permissions','hasOwnProperty','\x20pid=','item:create','\x20\x20╚═══════════════════════════╝','toString','loop-lag','okdb-http-worker-child.js','\x20parkedNow=','--port','\x20\x20\x20\x20limits:\x20\x20\x20\x20','singletonClaims','utf8','_instanceId','prototype','derivePin','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','INDEX_READY','_ownMeta','filter','\x20\x20✓\x20http\x20listening\x20on\x20:','cpuWindowMs','shutdown','clearLine','\x1b[90m','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x0a\x20\x20Joining\x20cluster\x20at\x20','runtimeProcessesView','[okdb]\x20reset\x20aborted','[okdb-cluster]\x20','_scheduleFlush','files/','user','delete','isArray','[okdb-cluster]\x20primary\x20pid=','(none)','\x20\x20Usage:\x20','\x20process','createServer','_onPoke','processor:retry','finally','_envs','_onProcEvent','\x20environment\x20','perf_hooks','handle','_flushDebounce','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','OKDBUniqueConstraintError','ftsName','fromEntries','draining','INVALID_INDEX_KEY','\x0a\x20\x20✓\x20License\x20added','_committed','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','execArgv','nodesView','\x20\x20·\x20','PUB_FINGERPRINT','has','--log-level','stopping','warn','item:update','parse','_buildProcessingFacet','race','sync:apply','\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','memoryUsage','No\x20tokens.','noRepl','_heartbeatTimer','__okdbCluster','--eval','_lock','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','FEATURES','routes','_onItem','.kdb_history','_seen','_db','(primary\x20=\x20processor)','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','\x20\x20\x20\x20port:\x20\x20\x20\x20','error','afterWrite','ttl:clear','\x20(durable\x20desired-state)','available','addedAt','exit','EXIT','dbPath','method','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','liveThreadStats','count','no\x20.kdbconfig\x20(using\x20defaults)','INDEX_REGISTERED','listAll','\x20\x20records=','listDesired','okdb-writer:\x20env\x20closing\x20—\x20retry','typesPerEnv','supervisorKey','\x20(expires\x20','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','Feature\x20not\x20licensed:\x20','procmode/','\x20sync','startedAt','remove','_kind','bind','_bpWaiters','isDead','\x20\x20✓\x20Removed\x20license\x20','\x0a\x20\x20✓\x20License\x20activated','_licenseHash','selfKey','unique:violation','processorId','nodeKey','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','shmbuf.node','detachConsole','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','\x20\x20\x20\x20','cluster-wide','auth','90096uCpwWH','isPrimary','stdout','\x20\x20changes=','digest','sandbox','use','fts:drop','pid','[okdb]\x20exported\x20\x20types=','\x27\x20is\x20already\x20registered','[okdb]\x20opening\x20','OKDBIndexAlreadyRegisteredError','--types','\x20writer{depth=','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','kind','openDB','../okdb','_participate','unknown','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','_released','logs','FTS_DROP','firstTs','1859580ccYCCm',')\x20to\x20your\x20license\x20vendor.','yes','timingSafeEqual','address','[okdb]\x20unknown\x20token\x20action:\x20\x22','\x20\x20Flags','_isStale','{}[]:,\x0a\x0d\x09\x20','init','change','Examples','--env\x20<name>','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','clusterStatusView','maxWrites','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','safety','_rawDb','registerFts','_key','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','env','\x20\x20\x20\x20\x20\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','\x20while\x20this\x20process\x20runs\x20','_statusEnv','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','[okdb]\x20importing\x20','load','_log','processing','hint','isWanted','standalone','\x20MB)','ready','\x20\x20\x20\x20license:\x20','clearTtl','\x0a\x20\x20✓\x20Token\x20created','\x20opening\x20','SIGTERM','stats','migrations','childTransaction','PERMISSIONS','toLowerCase','readUInt16BE','id:\x20','_activateProcesses','(unset)','maxExtra','../','/api/env/','getSecurityNotices','\x20\x20Envs:\x20\x20\x20\x20','_children','rawBuf','prependListener','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x20writes\x20(','createHash','engines','question','valid','rowKey','detectInputType','\x20+\x20','_markSeen','\x20\x20score:','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','admin','toUpperCase','already\x20in\x20use','\x22\x20(must\x20be\x20debug|info|warn|error)','[filter]','code','caps','\x0d[okdb]\x20','fieldPath','_rowKey','_startedAt','ttl','hostname','OKDB_HTTP_WORKERS\x20env','[okdb]\x20exporting\x20env\x20\x22','unlinkSync','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','depth','ephemeral','resetReadTxn','argv','OKDB_HTTP_WORKERS','assertFeature','\x0a\x20\x20\x20\x20\x20\x20','\x20\x20http://localhost:','\x20\x20\x20\x20id:\x20\x20\x20\x20','Types','http-server','removeLicense','processes','Records','--version','VERSION_MISMATCH','_baselines','\x27\x20already\x20registered','\x20\x20✓\x20OKDB\x20cluster\x20running','LICENSEE','\x20\x20\x20\x20usage:\x20\x20\x20','pending','queue','limits','workersConfigured','inst:','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','bus:proc','processingStatusView','get','drop','\x20does\x20not\x20exist','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20All\x20checks\x20passed.\x0a','index:registered','from','participate','ms/','addLicense','_systemEnv','USE','\x20\x20Common\x20causes:','access','--username','input:\x20','statSync','\x1b[2m','\x22\x20on\x20\x22','appendFileSync','push','backup','env/','other','reload','\x0a\x20\x20License\x20details:','dropSchema','expired','meta','unref','publishOwnRow','INDEX_RESET','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','time','putSync','[okdb]\x20loaded\x20config:\x20','--workers','/type/users/query\x0a\x20\x20\x20\x20','TYPE_ALREADY_REGISTERED','add','cursorKey','Foreign\x20key\x20violation:\x20','catch','getCount','signalWant','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','migrate','license','[okdb-cluster]\x20slot=','gray','then','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','OKDBError','sync','randomUUID','active','_supervisorKey','repeat','getChanges','--ttl','\x20statusEnv=','update','OKDB-PIN-V1:','getRange','debug','fts:registered','token','No\x20license\x20found\x20matching\x20this\x20activation\x20token','--password','listenAddr','functions','details','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','Invalid\x20primary\x20key\x20type:\x20','compact','\x20\x20\x20\x20\x20\x20','platform','hasDesired','options','Build\x20expects\x20public\x20key\x20fingerprint\x20','extend','--key','isHeld','treeView','max','licenses','MALFORMED_TOKEN','[okdb]\x20started\x20in\x20','boolean','entries','__esModule','offWindow','txn:end','listen','1128lUPWME','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','0123456789ABCDEFGHJKMNPQRSTVWXYZ','transport','cli','\x20to\x20browse\x20the\x20API,\x20','_flushTimer','committed','/\x20quit\x20/\x20Ctrl+C','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','loop-lag\x20','OKDBInvalidPrimaryKeyError','PUT\x20type/users/item/x\x20{\x22n\x22:1}','_coordinator','splice','doctor','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20\x20(','force','once','parkedNow','summary','stringify','system:proc','constructor','processors','ppid','logRequests','[okdb]\x20error:\x20--password\x20requires\x20--name','\x20\x20Type\x20','recordWrite','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','put','default:\x20cores−1\x20=\x20','License\x20limit\x20exceeded:\x20','syncPeers','shmbufNative','trim','\x20result','fts:reset','verify','LICENSE_EXPIRED_ACTION',':\x20expected\x20','_windowCbs','slice','_buildChildRow','_computeStatus','_publishFailWarned','--log-requests','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','onWindow','port','type:drop','_publishNow','\x0a\x20\x20\x20\x20','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_collectSingletonClaims','ms\x20busy=','ACTIVATION_EXPIRED','string','OKDBAlreadyExistsError','isEnabled','holder','~processes:cmd','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','[okdb]\x20created\x20.kdbconfig','reap','license:added','\x20bytes,\x20need\x20>=\x2065)','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','LICENSE_HASH_MISMATCH','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','Admin','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','_lastCpuPct','/type/users\x0a\x20\x20\x20\x20','_maybePublish','heapUsed','_getType','enable','SIGKILL','floor','\x20→\x20POST\x20/api/env/','\x20\x20Some\x20checks\x20failed.\x0a','--token','[okdb]\x20close\x20error:\x20','noAdmin','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','OKDBNotFoundError','stopHeartbeat','body','index:reset','processor:error','fill','quit','_ensureDesired','__vocab/version','processor:resumed','readline','UNIQUE_CONSTRAINT','getCmd','values','setOwnMeta','Sync','ITEM_UPDATE','effective','type/users','blob','name','\x20already\x20in\x20use','hex','_writer','\x20===','decoded','lifecycle','_enableChangelog','\x22\x20is\x20used\x20by:\x20','changes','__writeCounter','_startAdmission','removeSync','OPEN','sizeAfter','abs','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','_desired','activateLicense','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','exp','_processStartedAt','envs','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','\x20\x20║','expiry','processKey','created','OKDBForeignKeyError','object','\x20\x20\x20\x20\x20http://localhost:','start','existsSync','\x20│\x20','listRoutes','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','_enqueuedAt','\x20HTTP\x20server(s)\x20on\x20port\x20','wrong_node','registerType','min','byteLength','send','Index\x20\x27','\x0a\x20\x20Invalid\x20JSON:\x20','createInterface','_isWriter','acquiredAt','default','endsWith','--test','Invalid\x20activation\x20token:\x20','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','\x20worker\x20slot=','error:\x20','roles','VERB','list','\x20\x20\x20\x20\x20\x20\x20','toLocaleString','application/json','[okdb]\x20import\x20complete','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','_holderDead','OKDBInvalidValueError','Processors','\x20—\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','licensee','getDesired','copy','line','\x20SECURITY\x20NOTICE','uptime','\x1b[34m',',\x20closing…\x0a','_handlePoke','features','[okdb]\x20closed\x20cleanly\x0a','padStart','ITEM_REMOVE','Invalid\x20index\x20key\x20type\x20for\x20\x27','FTS_RESET','--changes','recheck','License\x20already\x20stored','targetType','randomBytes','_selfKey','dim','Files','~tokens','PATCH','ttl:expired','\x22\x20to\x20enable\x20it.','concat','node:crypto','worker','\x20MB\x20→\x20','isTTY','\x1b[1m','[body]','PIN','http://localhost:','resume','\x20day(s).','password','ms\x20p99=','\x20type','hard-killed','clusterWorkers','type/users\x20--help','\x20\x20⚠\x20\x20','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x27\x20doesn\x27t\x20exist','embedded','ms\x20(attempt\x20','startHeartbeat','SYNC_COMMITS','all','fts:','[okdb]\x20invalid\x20log\x20level:\x20\x22','\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','_nodeDead','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','external','invalid','txn:start','getProcess','~processes:desired','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','_refreshDesiredSnapshot','_threadStats','mode','\x20\x20(licensee:\x20','[okdb]\x20starting…\x0a','split','removeNode','idx:',',\x20got\x20','127.0.0.1','expiresAt','xdg-open\x20','licenseType','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20in\x20','config\x20http.workers','\x20\x20\x20\x20status:\x20\x20\x20\x20active','raw-put','flushDebounce','\x20\x20\x20\x20admin:\x20http://localhost:','\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','reason','waiting','setupPrimary','OKDBSchemaCollectionError','(worst\x20','indexOf','toISOString','_dedupeKey','__identity','_lastCpuUsage','index:progress','_listenAddr','/api','--open','namespace','readUInt8','\x20@\x20','CHANGEFEED_QUANTUM','OKDBForeignKeyDeleteError','\x20records','cpus','--name','\x20\x20\x20\x20graceful\x20shutdown\x0a','--env','[okdb]\x20invalid\x20','bus:drain','Invalid\x20license\x20blob:\x20','http','startsWith','_closed','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','system:ready','equals','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','_license','88vbOZTi','.okdb-write-test','expires','_putRowAsync','maxMs','--no-cluster','ENV','set','2qRMfqC','alloc','rss','keys:','env/:env','stdin','starting','free\x20tier','\x20\x20[','loadEnvFile','ms\x20env=','unique:violation_resolved','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','username','ttl:set','txn:rollback','index:ready','exportBlobs','[okdb]\x20blobs:\x20imported=','_collectWriterFacet','quantum','assertLimit','_rootDb','system:type_drop','timeMachine','FTS_REGISTERED','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','help','shutting\x20down…\x0a','_desiredOverlay','hasType','CREATED','write','ingest','\x0a===\x20OKDB_DIAG\x20','types:','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','_nodeDbFor','/type/users/item/alice\x0a\x20\x20\x20\x20','title','\x20\x20(no\x20env\x20draining)','Type\x20\x27','info','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','join','registry-publish','INDEX_ALREADY_REGISTERED','_buildOwnRow','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','[okdb]\x20error:\x20','\x20file','system:poke','crypto','sha256','getClock','targetKey','val','result','sourceKey','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','label','yellow',');\x20','ESRCH','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','consecutiveFailures','writeUInt16BE','config\x20file\x20valid:\x20','der','errors','\x1b[35m','1205420qZxbQn','ORPHAN\x20(env-closed\x20write)','noteListenAddr','type/users/query\x20{\x22active\x22:true}','drain','/types\x0a\x20\x20\x20\x20','readUInt32BE','dropType','online','_sandbox','killable','[okdb]\x20backup\x20complete','LICENSED_BUILD','map','\x20\x20[okdb]\x20closed\x20cleanly\x0a','LICENSE_ACTIVATION_INVALID','_cursors','claimGated','\x20deleted','_quantum','workersFlag','Cannot\x20delete\x20','_admissionTimer','version','register','index','index:drop','\x20\x20#','_openEnvLazy','trimStart','[okdb-cluster]\x20respawning\x20worker\x20slot=','stderr','type:registered','\x20(slot=','registry\x20publish\x20failing:\x20','connected','tags:\x20','create','\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','--permissions','1ofN:','server','2270844jjGTGs','--grants','91sDpPxp','\x20\x20+','markClosed','oldestPendingMs','types/env=','\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','\x1b[0m','[okdb]\x20created\x20./okdb-data'];_0x580e=function(){return _0x323985;};return _0x580e();}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x919ed0=require$$0,_0x421418=require$$1$1,_0x5ee506=require$$1;let _0x895745;function _0x5e6648(){const _0x4c19cf=_0x8225;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x895745!==undefined)return _0x895745;try{const _0x4a5c80=_0x5ee506[_0x4c19cf(0x551)](require[_0x4c19cf(0x100)]('shmbuf/package.json'));_0x895745=_0x421418[_0x4c19cf(0x3b2)](_0x5ee506[_0x4c19cf(0x482)](_0x4a5c80,_0x4c19cf(0x188),_0x4c19cf(0x54d),_0x4c19cf(0x231)));}catch{_0x895745=![];}return _0x895745;}function _0x129341(){const _0x44694e=_0x8225,_0xaba950=_0x919ed0[_0x44694e(0x43f)]()['length'];return Math['max'](0x1,_0xaba950-0x1);}function _0x304e48(_0x182218,_0x48231d={}){const _0x529ecd=_0x8225,_0x4d6525=_0x48231d[_0x529ecd(0x34a)]!==undefined?_0x48231d['shmbufNative']:_0x5e6648();let _0x4a10a6;if(_0x182218?.[_0x529ecd(0x520)])_0x4a10a6=0x1;else{let _0x52e393,_0x35c388;if(_0x182218?.['workersFlag']!==undefined&&_0x182218['workersFlag']!==null&&_0x182218[_0x529ecd(0x4b1)]!=='')_0x52e393=_0x182218[_0x529ecd(0x4b1)],_0x35c388=_0x529ecd(0x2ea);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x52e393=process.env.OKDB_HTTP_WORKERS,_0x35c388=_0x529ecd(0x2ad);else _0x182218?.[_0x529ecd(0x446)]?.[_0x529ecd(0x5cb)]!==undefined&&_0x182218[_0x529ecd(0x446)][_0x529ecd(0x5cb)]!==null&&_0x182218['http'][_0x529ecd(0x5cb)]!==''&&(_0x52e393=_0x182218[_0x529ecd(0x446)]['workers'],_0x35c388='http.workers');}if(_0x52e393===undefined)_0x4a10a6=_0x129341();else{const _0x459603=Number(_0x52e393);!Number[_0x529ecd(0x194)](_0x459603)||_0x459603<0x1?(console[_0x529ecd(0x1f0)](_0x529ecd(0x443)+_0x35c388+'='+JSON[_0x529ecd(0x33c)](_0x52e393)+_0x529ecd(0x25f)),_0x4a10a6=0x1):_0x4a10a6=_0x459603;}}return!_0x4d6525&&_0x4a10a6>0x1&&(console['warn'](_0x529ecd(0x47a)+(_0x529ecd(0x21f)+_0x4a10a6+').')),_0x4a10a6=0x1),_0x4a10a6;}return okdbWorkers={'isShmbufNative':_0x5e6648,'defaultWorkers':_0x129341,'resolveWorkers':_0x304e48},okdbWorkers;}var version=_0x4d1b8e(0x4e3),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x46c445=require$$0$1;function _0x353799(_0x4c1a4d,_0x163a7a){const _0x532186=_0x8225;return _0x46c445[_0x532186(0x189)]('sha256',_0x163a7a)[_0x532186(0x304)](_0x4c1a4d)[_0x532186(0x23c)]('base64url');}function _0x3bffe7(_0x458869,_0x39e7be){const _0x189091=_0x8225;if(typeof _0x458869!==_0x189091(0x361)||typeof _0x39e7be!=='string')return![];if(Buffer['byteLength'](_0x458869)!==Buffer[_0x189091(0x3bb)](_0x39e7be))return![];return _0x46c445[_0x189091(0x255)](Buffer['from'](_0x458869),Buffer[_0x189091(0x2cc)](_0x39e7be));}function _0x706a39(_0x522269){const _0x2c63bd=_0x8225;if(!_0x522269?.[_0x2c63bd(0x447)](_0x2c63bd(0x4fc)))return null;return _0x522269[_0x2c63bd(0x352)](0x7);}function _0x31b4ee(_0x77a2d0=0x20){const _0x4254bd=_0x8225;return _0x46c445[_0x4254bd(0x3e9)](_0x77a2d0)[_0x4254bd(0x1b3)](_0x4254bd(0x510));}function _0x105a4f(_0x3d8b53){const _0x4ce50d=_0x8225;return _0x46c445['createHash'](_0x4ce50d(0x48b))[_0x4ce50d(0x304)](_0x3d8b53)[_0x4ce50d(0x23c)]('hex');}function _0x4c6877(_0xe2886d,_0x1327ca,_0x186ce1=0x36ee80){const _0x5a37b7=_0x8225;if(!_0x1327ca)throw new Error('Token\x20secret\x20not\x20configured');const _0x219f89=Date[_0x5a37b7(0x1ad)](),_0x231f64=Buffer[_0x5a37b7(0x2cc)](JSON[_0x5a37b7(0x33c)]({'iat':_0x219f89,'exp':_0x219f89+_0x186ce1,'sub':_0xe2886d?.['id']??_0xe2886d?.['sub']??null,'username':_0xe2886d?.['username']??_0xe2886d?.[_0x5a37b7(0x392)]??null,'roles':Array['isArray'](_0xe2886d?.[_0x5a37b7(0x3c9)])?_0xe2886d[_0x5a37b7(0x3c9)]:[]}))['toString'](_0x5a37b7(0x510)),_0x4fb8a9=_0x353799(_0x231f64,_0x1327ca);return _0x231f64+'.'+_0x4fb8a9;}function _0x36a853(_0x4d6af4,_0x1c14af){const _0xf55d6=_0x8225;if(!_0x1c14af||typeof _0x4d6af4!==_0xf55d6(0x361))return null;const [_0x2c1660,_0x593c9b]=_0x4d6af4[_0xf55d6(0x41b)]('.');if(!_0x2c1660||!_0x593c9b)return null;const _0x402a19=_0x353799(_0x2c1660,_0x1c14af);if(!_0x3bffe7(_0x593c9b,_0x402a19))return null;try{const _0x46887f=JSON[_0xf55d6(0x1f2)](Buffer[_0xf55d6(0x2cc)](_0x2c1660,'base64url')[_0xf55d6(0x1b3)]()),_0x4f0168=0x7530;if(Date[_0xf55d6(0x1ad)]()>Number(_0x46887f?.['exp']??0x0)+_0x4f0168)return null;return _0x46887f;}catch{return null;}}async function _0x4ac399(_0x337a4a){return new Promise((_0x5e5337,_0x18557c)=>{const _0x3c8b90=_0x8225,_0x3b69ad=_0x46c445[_0x3c8b90(0x3e9)](0x10);_0x46c445[_0x3c8b90(0x541)](_0x337a4a,_0x3b69ad,0x40,(_0xfdf951,_0x4b299c)=>{const _0x5af352=_0x3c8b90;if(_0xfdf951)_0x18557c(_0xfdf951);_0x5e5337(_0x3b69ad[_0x5af352(0x1b3)](_0x5af352(0x394))+':'+_0x4b299c[_0x5af352(0x1b3)](_0x5af352(0x394)));});});}async function _0x55d802(_0x2d36e0,_0xddd2ac){const _0xd3f4d7=_0x8225,[_0x482a4d,_0x135255]=_0xddd2ac[_0xd3f4d7(0x41b)](':');if(!_0x482a4d||!_0x135255)return![];const _0x498bd0=Buffer['from'](_0x482a4d,_0xd3f4d7(0x394));return new Promise((_0x4a143c,_0x564e03)=>{const _0x73b0de=_0xd3f4d7;_0x46c445[_0x73b0de(0x541)](_0x2d36e0,_0x498bd0,0x40,(_0x2f1e4d,_0x376226)=>{const _0x504131=_0x73b0de;if(_0x2f1e4d)_0x564e03(_0x2f1e4d);_0x4a143c(_0x46c445[_0x504131(0x255)](_0x376226,Buffer['from'](_0x135255,_0x504131(0x394))));});});}return okdbAuthTokens={'hmac':_0x353799,'timingSafeEqual':_0x3bffe7,'parseBearer':_0x706a39,'randomToken':_0x31b4ee,'hashToken':_0x105a4f,'issueToken':_0x4c6877,'authenticateToken':_0x36a853,'hashPassword':_0x4ac399,'verifyPassword':_0x55d802},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x1cf4ea=_0x4d1b8e;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x15dc55=require$$0$2,_0x517d9d=_0x1cf4ea(0x328),_0x5dca80=new Uint8Array(0x100)[_0x1cf4ea(0x383)](0xff);for(let _0x2071e1=0x0;_0x2071e1<_0x517d9d[_0x1cf4ea(0x533)];_0x2071e1++){_0x5dca80[_0x517d9d[_0x1cf4ea(0x548)](_0x2071e1)]=_0x2071e1,_0x5dca80[_0x517d9d[_0x1cf4ea(0x548)](_0x2071e1)+0x20]=_0x2071e1;}_0x5dca80['O'[_0x1cf4ea(0x548)](0x0)]=0x0,_0x5dca80['o'[_0x1cf4ea(0x548)](0x0)]=0x0,_0x5dca80['I'[_0x1cf4ea(0x548)](0x0)]=0x1,_0x5dca80['i'[_0x1cf4ea(0x548)](0x0)]=0x1,_0x5dca80['L'['charCodeAt'](0x0)]=0x1,_0x5dca80['l'[_0x1cf4ea(0x548)](0x0)]=0x1;function _0x17d48a(_0x374330){const _0x1f71f1=_0x1cf4ea;let _0xce2280=0x0,_0x25c9e7=0x0,_0x4c55e6='';for(let _0x5a72e9=0x0;_0x5a72e9<_0x374330[_0x1f71f1(0x533)];_0x5a72e9++){_0x25c9e7=_0x25c9e7<<0x8|_0x374330[_0x5a72e9],_0xce2280+=0x8;while(_0xce2280>=0x5){_0xce2280-=0x5,_0x4c55e6+=_0x517d9d[_0x25c9e7>>>_0xce2280&0x1f];}}return _0xce2280>0x0&&(_0x4c55e6+=_0x517d9d[_0x25c9e7<<0x5-_0xce2280&0x1f]),_0x4c55e6;}function _0xfcebc6(_0x4455fd){const _0x9b9758=_0x1cf4ea;_0x4455fd=_0x4455fd[_0x9b9758(0x18f)](/-/g,'')[_0x9b9758(0x299)]();let _0x3d4ea2=0x0,_0x171ddc=0x0;const _0x5ac167=[];for(let _0x77adbe=0x0;_0x77adbe<_0x4455fd['length'];_0x77adbe++){const _0xe8c7a6=_0x5dca80[_0x4455fd[_0x9b9758(0x548)](_0x77adbe)];if(_0xe8c7a6===0xff)continue;_0x171ddc=_0x171ddc<<0x5|_0xe8c7a6,_0x3d4ea2+=0x5,_0x3d4ea2>=0x8&&(_0x3d4ea2-=0x8,_0x5ac167[_0x9b9758(0x2da)](_0x171ddc>>>_0x3d4ea2&0xff));}return Buffer[_0x9b9758(0x2cc)](_0x5ac167);}const _0x2e4597=[_0x1cf4ea(0x2fc),'embeddings',_0x1cf4ea(0x28f),_0x1cf4ea(0x4d5),_0x1cf4ea(0x46e),'views','mcp',_0x1cf4ea(0x587)],_0x4b899b=0x0,_0x51ee16=0x1,_0x59f518=0x2,_0x3122bf=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x35650b({issuedAt:_0xe89109,expiresAt:_0x56f783,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x4b899b}){const _0x14a944=_0x1cf4ea,_0x1866c5=Buffer[_0x14a944(0x2cc)](licensee,_0x14a944(0x1ba))['slice'](0x0,0x40),_0xe180b6=0x1+0x1+0x4+0x4+0x1+_0x1866c5[_0x14a944(0x533)]+0x2+0x10,_0x53dfc7=Buffer[_0x14a944(0x155)](_0xe180b6);let _0x361418=0x0;_0x53dfc7['writeUInt8'](0x1,_0x361418++),_0x53dfc7[_0x14a944(0x4d7)](licenseType,_0x361418++),_0x53dfc7['writeUInt32BE'](Math[_0x14a944(0x377)](_0xe89109/0x3e8),_0x361418),_0x361418+=0x4,_0x53dfc7[_0x14a944(0x1a6)](Math[_0x14a944(0x377)](_0x56f783/0x3e8),_0x361418),_0x361418+=0x4,_0x53dfc7[_0x14a944(0x4d7)](_0x1866c5[_0x14a944(0x533)],_0x361418++),_0x1866c5['copy'](_0x53dfc7,_0x361418),_0x361418+=_0x1866c5['length'];let _0x1f1c76=0x0;for(let _0x3bc781=0x0;_0x3bc781<_0x2e4597[_0x14a944(0x533)];_0x3bc781++){if(features[_0x2e4597[_0x3bc781]])_0x1f1c76|=0x1<<_0x3bc781;}_0x53dfc7[_0x14a944(0x498)](_0x1f1c76,_0x361418),_0x361418+=0x2;const _0x31e84c=[_0x14a944(0x3a8),_0x14a944(0x21c),_0x14a944(0x349),'maxWrites'];for(const _0x3a9aa3 of _0x31e84c){_0x53dfc7[_0x14a944(0x1a6)](limits[_0x3a9aa3]||0x0,_0x361418),_0x361418+=0x4;}return _0x53dfc7;}function _0x3b478a(_0x5070c6){const _0x169cd7=_0x1cf4ea;let _0x37e2c0=0x0;const _0x321f46=_0x5070c6[_0x169cd7(0x43a)](_0x37e2c0++),_0x1e85bb=_0x5070c6['readUInt8'](_0x37e2c0++),_0x3ab16a=_0x5070c6[_0x169cd7(0x4a3)](_0x37e2c0);_0x37e2c0+=0x4;const _0x242dc4=_0x5070c6[_0x169cd7(0x4a3)](_0x37e2c0);_0x37e2c0+=0x4;const _0x3717a9=_0x5070c6[_0x169cd7(0x43a)](_0x37e2c0++),_0x4b8522=_0x5070c6['slice'](_0x37e2c0,_0x37e2c0+_0x3717a9)['toString'](_0x169cd7(0x1ba));_0x37e2c0+=_0x3717a9;const _0x3a1000=_0x5070c6[_0x169cd7(0x280)](_0x37e2c0);_0x37e2c0+=0x2;const _0x2b023c={};for(let _0x20287f=0x0;_0x20287f<_0x2e4597['length'];_0x20287f++){_0x2b023c[_0x2e4597[_0x20287f]]=Boolean(_0x3a1000&0x1<<_0x20287f);}const _0x45a1e7=[_0x169cd7(0x3a8),_0x169cd7(0x21c),_0x169cd7(0x349),_0x169cd7(0x261)],_0x4d1a33={};for(const _0x3cb0f6 of _0x45a1e7){const _0x10b93a=_0x5070c6['readUInt32BE'](_0x37e2c0);_0x37e2c0+=0x4,_0x4d1a33[_0x3cb0f6]=_0x10b93a===0x0?null:_0x10b93a;}return{'v':_0x321f46,'licenseType':_0x1e85bb,'issuedAt':_0x3ab16a*0x3e8,'expiresAt':_0x242dc4*0x3e8,'licensee':_0x4b8522,'features':_0x2b023c,'limits':_0x4d1a33};}function _0x43fca0(_0x52252c,_0x1ab822){const _0x1d63d2=_0x1cf4ea,_0x1dc26=Buffer[_0x1d63d2(0x3f1)]([_0x52252c,_0x1ab822]),_0x25abac=_0x17d48a(_0x1dc26),_0x2c6b5b=[];for(let _0x15c174=0x0;_0x15c174<_0x25abac[_0x1d63d2(0x533)];_0x15c174+=0x8){_0x2c6b5b[_0x1d63d2(0x2da)](_0x25abac[_0x1d63d2(0x352)](_0x15c174,_0x15c174+0x8));}return _0x2c6b5b['join']('-');}function _0x386db5(_0x4cb2c5){const _0x8976f6=_0x1cf4ea;if(typeof _0x4cb2c5!==_0x8976f6(0x361))throw new Error(_0x8976f6(0x1fe));const _0xa912f8=_0xfcebc6(_0x4cb2c5[_0x8976f6(0x18f)](/-/g,''));if(_0xa912f8[_0x8976f6(0x533)]<0x41)throw new Error(_0x8976f6(0x207)+_0xa912f8['length']+_0x8976f6(0x36a));const _0x1dadf3=_0xa912f8[_0x8976f6(0x352)](0x0,_0xa912f8[_0x8976f6(0x533)]-0x40),_0x44c693=_0xa912f8[_0x8976f6(0x352)](_0xa912f8[_0x8976f6(0x533)]-0x40);let _0x50d0f6;try{_0x50d0f6=_0x3b478a(_0x1dadf3);}catch(_0xc0e01c){throw new Error(_0x8976f6(0x40f)+_0xc0e01c[_0x8976f6(0x58f)]);}return{'rawBuf':_0xa912f8,'payload':_0x1dadf3,'sig':_0x44c693,'decoded':_0x50d0f6};}function _0x14996b(_0x59e33d){const _0x2335e9=_0x1cf4ea;return _0x15dc55[_0x2335e9(0x28e)](_0x2335e9(0x48b))[_0x2335e9(0x304)](_0x59e33d)[_0x2335e9(0x23c)]()[_0x2335e9(0x352)](0x0,0x8);}function _0x1a3c0b(_0x1c5b8b,_0x39cd62,_0x3e340f){const _0x160975=_0x1cf4ea,_0x581bac=_0x160975(0x305)+_0x3e340f,_0x1eb91d=Buffer[_0x160975(0x3f1)]([Buffer['from'](_0x1c5b8b,'utf8'),_0x39cd62]),_0x57b232=_0x15dc55[_0x160975(0x189)]('sha256',_0x581bac)[_0x160975(0x304)](_0x1eb91d)['digest'](),_0x2eecd9=_0x17d48a(_0x57b232['slice'](0x0,0x5));return{'pin':_0x2eecd9,'pinHmac':_0x57b232};}function _0x2a9da5(_0x50ec9f,_0x1199ab,_0x3e22a1){const _0x6e79b7=_0x1cf4ea,_0x1e234b=Buffer[_0x6e79b7(0x155)](0x4d);let _0x1babe7=0x0;_0x1e234b[_0x6e79b7(0x4d7)](0x1,_0x1babe7++),_0x50ec9f[_0x6e79b7(0x3d8)](_0x1e234b,_0x1babe7),_0x1babe7+=0x8,_0x1e234b[_0x6e79b7(0x1a6)](_0x1199ab,_0x1babe7),_0x1babe7+=0x4,_0x3e22a1['copy'](_0x1e234b,_0x1babe7);const _0x5b243e=_0x17d48a(_0x1e234b),_0x1a1403=[];for(let _0x554b62=0x0;_0x554b62<_0x5b243e[_0x6e79b7(0x533)];_0x554b62+=0x6){_0x1a1403[_0x6e79b7(0x2da)](_0x5b243e[_0x6e79b7(0x352)](_0x554b62,_0x554b62+0x6));}return _0x1a1403[_0x6e79b7(0x482)]('-');}function _0x53deb7(_0x12128a){const _0x3e4f49=_0x1cf4ea;if(typeof _0x12128a!==_0x3e4f49(0x361))throw new Error(_0x3e4f49(0x24d));const _0x55e3e2=_0xfcebc6(_0x12128a[_0x3e4f49(0x18f)](/-/g,''));if(_0x55e3e2[_0x3e4f49(0x533)]!==0x4d)throw new Error(_0x3e4f49(0x3a2)+_0x55e3e2[_0x3e4f49(0x533)]);let _0x1c6f24=0x0;const _0x21e0be=_0x55e3e2[_0x3e4f49(0x43a)](_0x1c6f24++),_0x288dbb=_0x55e3e2[_0x3e4f49(0x352)](_0x1c6f24,_0x1c6f24+0x8);_0x1c6f24+=0x8;const _0x5566ba=_0x55e3e2['readUInt32BE'](_0x1c6f24);_0x1c6f24+=0x4;const _0x58e4cd=_0x55e3e2[_0x3e4f49(0x352)](_0x1c6f24);return{'v':_0x21e0be,'licenseHash':_0x288dbb,'expiry':_0x5566ba,'sig':_0x58e4cd};}function _0x5c479d({tokenString:_0xfa53c7,nodeId:_0x18bba3,rawBlobBuf:_0x378558,pubKeyPem:_0x57f9b4,pubFingerprint:_0x43d1a0}){const _0x5bac65=_0x1cf4ea;let _0x3898fc;try{_0x3898fc=_0x53deb7(_0xfa53c7);}catch(_0x536e3d){return{'valid':![],'reason':_0x5bac65(0x31d)};}const _0x2a23f2=_0x14996b(_0x378558);if(!_0x2a23f2[_0x5bac65(0x44b)](_0x3898fc[_0x5bac65(0x187)]))return{'valid':![],'reason':_0x5bac65(0x36c)};const {pinHmac:_0x5efd05}=_0x1a3c0b(_0x18bba3,_0x2a23f2,_0x43d1a0),_0x59056e=Buffer[_0x5bac65(0x155)](0x4);_0x59056e[_0x5bac65(0x1a6)](_0x3898fc[_0x5bac65(0x3ab)],0x0);const _0xba2681=Buffer[_0x5bac65(0x3f1)]([Buffer[_0x5bac65(0x2cc)]([_0x3898fc['v']]),_0x5efd05[_0x5bac65(0x352)](0x0,0x5),_0x3898fc[_0x5bac65(0x187)],_0x59056e]);try{const _0x3d6ee8=_0x15dc55[_0x5bac65(0x34e)](null,_0xba2681,_0x57f9b4,_0x3898fc[_0x5bac65(0x4f7)]);if(!_0x3d6ee8)return{'valid':![],'reason':_0x5bac65(0x123)};}catch(_0x4780f2){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x3898fc[_0x5bac65(0x3ab)]<Date[_0x5bac65(0x1ad)]()/0x3e8)return{'valid':![],'reason':_0x5bac65(0x360)};return{'valid':!![],'reason':'ok'};}function _0x301960(_0x2e247d){const _0x9fec19=_0x1cf4ea;if(typeof _0x2e247d!==_0x9fec19(0x361))return'unknown';const _0x485e5a=_0x2e247d[_0x9fec19(0x34b)]();if(_0x485e5a['startsWith']('/')||_0x485e5a[_0x9fec19(0x447)]('./')||_0x485e5a[_0x9fec19(0x447)](_0x9fec19(0x285))||/^[A-Za-z]:[\\/]/[_0x9fec19(0x5dc)](_0x485e5a))return _0x9fec19(0x550);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x9fec19(0x5dc)](_0x485e5a))return _0x9fec19(0x518);const _0x12c693=_0x485e5a[_0x9fec19(0x18f)](/[\s-]+/g,'')[_0x9fec19(0x533)];if(_0x12c693===0x7c)return _0x9fec19(0x167);if(_0x12c693>=0x95&&_0x12c693<=0xfc)return'blob';return _0x9fec19(0x24c);}return okdbLicenseCodec={'toBase32':_0x17d48a,'fromBase32':_0xfcebc6,'encodeLicensePayload':_0x35650b,'decodeLicensePayload':_0x3b478a,'encodeLicenseBlob':_0x43fca0,'decodeLicenseBlob':_0x386db5,'licenseHash':_0x14996b,'derivePin':_0x1a3c0b,'encodeActivationToken':_0x2a9da5,'decodeActivationToken':_0x53deb7,'verifyActivation':_0x5c479d,'detectInputType':_0x301960,'FEATURE_NAMES':_0x2e4597,'LICENSE_TYPE_STANDARD':_0x4b899b,'LICENSE_TYPE_OPEN':_0x51ee16,'LICENSE_TYPE_INTERNAL':_0x59f518,'OPEN_LICENSE_MAX_DURATION_MS':_0x3122bf},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x560d31 extends Error{constructor(_0x396a3c,_0x32826e,_0x13254d={}){const _0xff10a0=_0x8225;super(_0x396a3c),this[_0xff10a0(0x392)]=_0xff10a0(0x2fb),this[_0xff10a0(0x29d)]=_0x32826e,this[_0xff10a0(0x30e)]=_0x13254d,_0x13254d['cause']&&(this['cause']=_0x13254d['cause']),Error[_0xff10a0(0x5c9)](this,this[_0xff10a0(0x33e)]);}}class _0x10e21e extends _0x560d31{constructor(_0x13ac07,_0x51fc88,_0x2ce2a7,_0x151347){const _0x3a160f=_0x8225;super('Version\x20mismatch\x20for\x20'+_0x13ac07+'@'+_0x51fc88+_0x3a160f(0x350)+_0x2ce2a7+_0x3a160f(0x41e)+_0x151347,_0x3a160f(0x2b8),{'type':_0x13ac07,'key':_0x51fc88,'expectedVersion':_0x2ce2a7,'actualVersion':_0x151347}),this[_0x3a160f(0x392)]=_0x3a160f(0x4d9);}}class _0x58ac92 extends _0x560d31{constructor(_0x33531d,_0x6bbd49){const _0x38c853=_0x8225;super(_0x33531d+'@'+_0x6bbd49+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x33531d,'key':_0x6bbd49}),this['name']=_0x38c853(0x37e);}}class _0xd56ee4 extends _0x560d31{constructor(_0x228d4d,_0xed073){const _0x102b35=_0x8225;super(_0x228d4d+'@'+_0xed073+'\x20already\x20exists','ALREADY_EXISTS',{'type':_0x228d4d,'key':_0xed073}),this[_0x102b35(0x392)]=_0x102b35(0x362);}}class _0x4d24e7 extends _0x560d31{constructor(_0x6608a8,_0x27403a){const _0x8c45fe=_0x8225,_0x15aae7=typeof _0x27403a;super(_0x8c45fe(0x3e3)+_0x6608a8+'\x27:\x20'+_0x15aae7+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x27403a,_0x8c45fe(0x1e5),{'index':_0x6608a8,'key':_0x27403a,'keyType':_0x15aae7}),this[_0x8c45fe(0x392)]='OKDBInvalidIndexKeyError';}}class _0x4ee1de extends _0x560d31{constructor(_0x5a71ed){const _0x1308b7=_0x8225,_0x164a9e=typeof _0x5a71ed;super(_0x1308b7(0x310)+_0x164a9e+_0x1308b7(0x2a8)+_0x5a71ed,'INVALID_PRIMARY_KEY',{'key':_0x5a71ed,'keyType':_0x164a9e}),this['name']=_0x1308b7(0x331);}}class _0x5da129 extends _0x560d31{constructor(_0x3e785d){const _0x42aed8=_0x8225;super(_0x42aed8(0x47f)+_0x3e785d+_0x42aed8(0x405),_0x42aed8(0x566),{'type':_0x3e785d}),this[_0x42aed8(0x392)]=_0x42aed8(0x196);}}class _0x4c351f extends _0x560d31{constructor(_0x34ce30){const _0x5418d7=_0x8225;super(_0x5418d7(0x47f)+_0x34ce30+_0x5418d7(0x2ba),_0x5418d7(0x2ec),{'type':_0x34ce30}),this['name']=_0x5418d7(0x583);}}class _0x440416 extends _0x560d31{constructor(_0x35e8c0,_0x4726f6){const _0x240544=_0x8225;super(_0x240544(0x3bd)+_0x4726f6+_0x240544(0x180)+_0x35e8c0+_0x240544(0x405),_0x240544(0x593),{'type':_0x35e8c0,'index':_0x4726f6}),this[_0x240544(0x392)]=_0x240544(0x4f1);}}class _0x5e7c7c extends _0x560d31{constructor(_0x25306d,_0x38a889){const _0x69ddaa=_0x8225;super(_0x69ddaa(0x3bd)+_0x38a889+'\x27\x20on\x20type\x20\x27'+_0x25306d+_0x69ddaa(0x242),_0x69ddaa(0x484),{'type':_0x25306d,'index':_0x38a889}),this[_0x69ddaa(0x392)]=_0x69ddaa(0x244);}}class _0x2f593e extends _0x560d31{constructor(_0x32acfa,_0x44898c={}){const _0x1450c5=_0x8225;super(_0x32acfa,_0x1450c5(0x543),_0x44898c),this[_0x1450c5(0x392)]=_0x1450c5(0x3d2);}}class _0x11a201 extends _0x560d31{constructor(_0xf36389,_0x244192,_0x2af3a7,_0x2394eb,_0x137f37){const _0x138d2a=_0x8225;super('Unique\x20constraint\x20violated\x20on\x20'+_0xf36389+'@'+_0x244192+_0x138d2a(0x515)+_0x2af3a7+_0x138d2a(0x162)+_0x2394eb+_0x138d2a(0x5da)+_0x137f37+'\x27',_0x138d2a(0x389),{'type':_0xf36389,'index':_0x244192,'indexKey':_0x2af3a7,'existingKey':_0x2394eb,'conflictingKey':_0x137f37}),this['name']=_0x138d2a(0x1e1);}}class _0x8c25ef extends _0x560d31{constructor(_0x231e6b,_0x17e0e6,_0x4858b0){const _0x476b84=_0x8225;super('Schema\x20validation\x20failed\x20for\x20'+_0x231e6b+'@'+_0x17e0e6,_0x476b84(0x14d),{'type':_0x231e6b,'key':_0x17e0e6,'errors':_0x4858b0}),this[_0x476b84(0x392)]=_0x476b84(0x50b),this[_0x476b84(0x526)]=_0x231e6b,this['key']=_0x17e0e6,this[_0x476b84(0x49b)]=_0x4858b0;}}class _0x26880b extends _0x560d31{constructor(_0x232b14,_0x27a6b7){const _0x437413=_0x8225;super(_0x437413(0x59b)+_0x232b14+':\x20'+_0x27a6b7['length']+'\x20documents\x20fail\x20validation',_0x437413(0x5b6),{'type':_0x232b14,'failures':_0x27a6b7}),this[_0x437413(0x392)]=_0x437413(0x42e),this[_0x437413(0x526)]=_0x232b14,this['failures']=_0x27a6b7;}}class _0x59fe2b extends _0x560d31{constructor(_0x520fa1,_0x46e299,_0x3a7b03,_0x4dd3d4,_0x403bba){const _0x57b52b=_0x8225;super(_0x57b52b(0x2ef)+_0x520fa1+'@'+_0x46e299+'.'+_0x3a7b03+_0x57b52b(0x512)+_0x4dd3d4+'@'+_0x403bba+'\x20which\x20does\x20not\x20exist',_0x57b52b(0x13b),{'sourceType':_0x520fa1,'sourceKey':_0x46e299,'fieldPath':_0x3a7b03,'targetType':_0x4dd3d4,'targetKey':_0x403bba}),this[_0x57b52b(0x392)]=_0x57b52b(0x3ae),this[_0x57b52b(0xfe)]=_0x520fa1,this[_0x57b52b(0x490)]=_0x46e299,this[_0x57b52b(0x2a0)]=_0x3a7b03,this[_0x57b52b(0x3e8)]=_0x4dd3d4,this[_0x57b52b(0x48d)]=_0x403bba;}}class _0x5dd7fa extends _0x560d31{constructor(_0x17301c,_0x41f694,_0x218821){const _0x30be1f=_0x8225;super(_0x30be1f(0x4b2)+_0x17301c+'@'+_0x41f694+':\x20'+_0x218821[_0x30be1f(0x533)]+_0x30be1f(0x496),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x17301c,'targetKey':_0x41f694,'references':_0x218821}),this[_0x30be1f(0x392)]=_0x30be1f(0x43d),this[_0x30be1f(0x3e8)]=_0x17301c,this[_0x30be1f(0x48d)]=_0x41f694,this[_0x30be1f(0x521)]=_0x218821;}}class _0x15d17a extends _0x560d31{constructor(_0x5eaf54,_0xbcc0a3,_0x9abfc8){const _0x16f4e8=_0x8225;super(_0x16f4e8(0x5ba)+_0xbcc0a3+_0x16f4e8(0x2d8)+_0x5eaf54+_0x16f4e8(0x39a)+_0x9abfc8['map'](_0x4d819d=>_0x4d819d[_0x16f4e8(0x248)]+':'+_0x4d819d['name'])[_0x16f4e8(0x482)](',\x20'),_0x16f4e8(0x5c4),{'type':_0x5eaf54,'index':_0xbcc0a3,'usedBy':_0x9abfc8}),this['name']=_0x16f4e8(0x529);}}return okdbError={'OKDBError':_0x560d31,'OKDBVersionMismatchError':_0x10e21e,'OKDBNotFoundError':_0x58ac92,'OKDBAlreadyExistsError':_0xd56ee4,'OKDBInvalidIndexKeyError':_0x4d24e7,'OKDBInvalidPrimaryKeyError':_0x4ee1de,'OKDBTypeNotRegisteredError':_0x5da129,'OKDBTypeAlreadyRegisteredError':_0x4c351f,'OKDBIndexNotRegisteredError':_0x440416,'OKDBIndexAlreadyRegisteredError':_0x5e7c7c,'OKDBInvalidValueError':_0x2f593e,'OKDBUniqueConstraintError':_0x11a201,'OKDBSchemaValidationError':_0x8c25ef,'OKDBSchemaCollectionError':_0x26880b,'OKDBForeignKeyError':_0x59fe2b,'OKDBForeignKeyDeleteError':_0x5dd7fa,'OKDBIndexHasConsumersError':_0x15d17a},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4ca168=_0x4d1b8e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xe97974={'PUT':_0x4ca168(0x346),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x4ca168(0x5e0),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x4ca168(0x3b9),'TYPE_DROP':_0x4ca168(0x4a4),'FTS_REGISTER':_0x4ca168(0x265),'FTS_DROP':_0x4ca168(0x185),'FTS_RESET':_0x4ca168(0x561),'SCHEMA_SET':_0x4ca168(0x53a),'SCHEMA_DROP':_0x4ca168(0x2e0),'TTL_SET':_0x4ca168(0x56b),'TTL_CLEAR':_0x4ca168(0x277)},_0xda755e={'SYSTEM_READY':_0x4ca168(0x44a),'SYSTEM_STOPPED':_0x4ca168(0x5ac),'SYSTEM_CLOCK_CHANGE':_0x4ca168(0x4e5),'SYSTEM_POKE':_0x4ca168(0x489),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x4ca168(0x46d),'SYSTEM_PROC':_0x4ca168(0x33d),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4ca168(0x1b1),'ITEM_UPDATE':_0x4ca168(0x1f1),'ITEM_REMOVE':_0x4ca168(0x5c6),'INDEX_RESET':_0x4ca168(0x381),'INDEX_READY':_0x4ca168(0x466),'INDEX_PROGRESS':_0x4ca168(0x435),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4ca168(0x4b7),'INDEX_REGISTERED':_0x4ca168(0x2cb),'FTS_REGISTERED':_0x4ca168(0x308),'FTS_DROP':_0x4ca168(0x23f),'FTS_RESET':_0x4ca168(0x34d),'SCHEMA_SET':_0x4ca168(0x10d),'SCHEMA_DROP':_0x4ca168(0x1a0),'UNIQUE_VIOLATION':_0x4ca168(0x22d),'UNIQUE_VIOLATION_RESOLVED':_0x4ca168(0x461),'REF_VIOLATION':_0x4ca168(0x55b),'REF_VIOLATION_RESOLVED':_0x4ca168(0x5c0),'SYNC_APPLY':_0x4ca168(0x1f5),'TXN_START':_0x4ca168(0x412),'TXN_END':_0x4ca168(0x323),'TXN_ROLLBACK':_0x4ca168(0x465),'TYPE_REGISTERED':_0x4ca168(0x4bd),'TYPE_DROP':_0x4ca168(0x35a),'ENV_OPENED':_0x4ca168(0xfd),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x4ca168(0x17b),'TTL_EXPIRED':_0x4ca168(0x3ef),'TTL_SET':_0x4ca168(0x464),'TTL_CLEAR':_0x4ca168(0x20b),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x4ca168(0x369),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x44c782={'CREATING':_0x4ca168(0x4d1),'RESETTING':_0x4ca168(0x181),'READY':_0x4ca168(0x275),'DROPPING':_0x4ca168(0x57a),'WAITING':_0x4ca168(0x42c)},_0x51932c={'CREATED':_0x4ca168(0x3ad),'STARTING':_0x4ca168(0x45c),'STARTED':_0x4ca168(0x4df),'STOPPING':_0x4ca168(0x1ef),'STOPPED':_0x4ca168(0x598)},_0x3d459a={'CREATING':'creating','READY':_0x4ca168(0x275),'HALTED':'halted','STOPPED':_0x4ca168(0x598),'RESETTING':_0x4ca168(0x181)},_0x4a4b4a=Object[_0x4ca168(0x19f)]({'POKE':'bus:poke','DRAIN':_0x4ca168(0x444),'TYPE_DROP':_0x4ca168(0x540),'PROC':_0x4ca168(0x2c4),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x4a4b4a,'CHANGE_ACTIONS':_0xe97974,'EVENTS':_0xda755e,'INDEX_STATE':_0x44c782,'OKDB_STATE':_0x51932c,'VIEW_STATE':_0x3d459a},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x281e94=_0x4d1b8e;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x26ba74=require$$1$1,_0x1c3a1e=require$$1,_0x4e3ac7=require$$0$1,_0x4aca2a=_0x26ba74[_0x281e94(0x102)](_0x1c3a1e[_0x281e94(0x482)](__dirname,'keys/public.pem'),_0x281e94(0x1ba))[_0x281e94(0x34b)](),_0x543893=_0x4e3ac7[_0x281e94(0x11b)](_0x4aca2a)[_0x281e94(0x557)]({'type':_0x281e94(0x4d3),'format':_0x281e94(0x49a)}),_0x38c200=_0x4e3ac7[_0x281e94(0x28e)]('sha256')[_0x281e94(0x304)](_0x543893)['digest'](_0x281e94(0x394))[_0x281e94(0x352)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4aca2a,'PUB_FINGERPRINT':_0x38c200},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x51a586=_0x4d1b8e;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x10ff66=require$$0$1,{OKDBError:_0x18996c}=requireOkdbError(),{EVENTS:_0x48e7d1}=requireOkdbEnums(),_0x206f91=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x4c8483,LICENSE_TYPE_INTERNAL:_0x2d4f6d,OPEN_LICENSE_MAX_DURATION_MS:_0x1fb4a6}=_0x206f91,_0x26a57f=requireOkdbPubkey(),_0x458572={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x26a57f[_0x51a586(0x5b1)],'PUB_FINGERPRINT':_0x26a57f[_0x51a586(0x1ec)],'LICENSE_EXPIRED_ACTION':_0x51a586(0x5df)},_0x1b9df1=_0x51a586(0x4fb),_0x268d0c={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x233c24(_0x5bb0f9){const _0x2e547c=_0x51a586;!_0x5bb0f9[_0x2e547c(0x474)](_0x1b9df1)&&await _0x5bb0f9[_0x2e547c(0x3b9)](_0x1b9df1);}class _0x40c4a9{constructor(_0x1d05c2){const _0x3b87a5=_0x51a586;this['okdb']=_0x1d05c2,this[_0x3b87a5(0x511)]=null;}async[_0x51a586(0x2de)](){const _0x2c0653=_0x51a586,_0x15af2e=this[_0x2c0653(0x5b9)][_0x2c0653(0x2d0)];if(!_0x15af2e||!_0x15af2e[_0x2c0653(0x474)](_0x1b9df1)){this['_active']=null;return;}const _0x76e9ef=this['okdb']['id'];let _0x4e0b2b=null;for(const {key:_0x2e9237,value:_0x26948a}of _0x15af2e[_0x2c0653(0x306)](_0x1b9df1)){const _0x4a609f=this['_computeStatus'](_0x26948a,_0x76e9ef);_0x4a609f==='active'&&!_0x4e0b2b&&(_0x4e0b2b={..._0x26948a,'id':_0x2e9237,'status':_0x4a609f});}this[_0x2c0653(0x511)]=_0x4e0b2b;if(this[_0x2c0653(0x511)]&&this[_0x2c0653(0x511)][_0x2c0653(0x422)]===_0x4c8483){const _0x3e02dd=Math['ceil']((this[_0x2c0653(0x511)][_0x2c0653(0x420)]-Date[_0x2c0653(0x1ad)]())/0x5265c00);this['okdb'][_0x2c0653(0x5df)]?.[_0x2c0653(0x1f0)](_0x2c0653(0x5b0)+_0x3e02dd+_0x2c0653(0x3fb),{'feature':_0x2c0653(0x2f6),'licensee':this['_active'][_0x2c0653(0x3d6)],'expiresAt':new Date(this[_0x2c0653(0x511)][_0x2c0653(0x420)])[_0x2c0653(0x431)]()});}this[_0x2c0653(0x511)]&&this[_0x2c0653(0x511)]['licenseType']===_0x2d4f6d&&this[_0x2c0653(0x5b9)][_0x2c0653(0x5df)]?.[_0x2c0653(0x1f0)](_0x2c0653(0x345),{'feature':_0x2c0653(0x2f6),'licensee':this[_0x2c0653(0x511)][_0x2c0653(0x3d6)]});}[_0x51a586(0x354)](_0x5e4c6f,_0x5c8a36){const _0x4d06e7=_0x51a586;if(!_0x5e4c6f['blob'])return _0x4d06e7(0x411);let _0x4c8639;try{_0x4c8639=_0x206f91[_0x4d06e7(0x4d6)](_0x5e4c6f[_0x4d06e7(0x391)]);}catch(_0x27933d){return _0x4d06e7(0x411);}try{const _0x47af3a=_0x10ff66[_0x4d06e7(0x34e)](null,_0x4c8639[_0x4d06e7(0x18c)],_0x458572[_0x4d06e7(0x5b1)],_0x4c8639[_0x4d06e7(0x4f7)]);if(!_0x47af3a)return _0x4d06e7(0x411);}catch(_0x180870){return _0x4d06e7(0x411);}if(_0x4c8639[_0x4d06e7(0x397)][_0x4d06e7(0x422)]===_0x2d4f6d)return'active';if(_0x4c8639[_0x4d06e7(0x397)]['expiresAt']<=Date[_0x4d06e7(0x1ad)]())return _0x4d06e7(0x2e1);if(_0x4c8639[_0x4d06e7(0x397)][_0x4d06e7(0x422)]===_0x4c8483)return'active';if(!_0x5e4c6f['activation'])return _0x4d06e7(0x2be);const _0x478be0=_0x206f91[_0x4d06e7(0x152)]({'tokenString':_0x5e4c6f[_0x4d06e7(0x167)],'nodeId':_0x5c8a36,'rawBlobBuf':_0x4c8639['rawBuf'],'pubKeyPem':_0x458572[_0x4d06e7(0x5b1)],'pubFingerprint':_0x458572[_0x4d06e7(0x1ec)]});if(_0x478be0['reason']===_0x4d06e7(0x36c)||_0x478be0[_0x4d06e7(0x42b)]==='SIG_INVALID')return _0x4d06e7(0x3b8);if(_0x478be0[_0x4d06e7(0x42b)]===_0x4d06e7(0x360))return'expired';if(!_0x478be0['valid'])return _0x4d06e7(0x3b8);return _0x4d06e7(0x2fe);}get[_0x51a586(0x2fe)](){return this['_active'];}get[_0x51a586(0x38f)](){return this['_active']??_0x268d0c;}[_0x51a586(0x2ae)](_0x46c8d7){const _0xa4037=_0x51a586;if(_0x458572['LICENSED_BUILD']!==_0xa4037(0x5e6))return;const _0x4b2ab8=this[_0xa4037(0x38f)];if(!_0x4b2ab8['features']?.[_0x46c8d7]){const _0xac7dda=_0x4b2ab8[_0xa4037(0x589)]?_0xa4037(0x2c9)+_0x46c8d7+_0xa4037(0x415)+_0x46c8d7+_0xa4037(0x3f0):_0xa4037(0x220)+_0x46c8d7+_0xa4037(0x184)+_0x46c8d7+'\x22.';throw new _0x18996c(_0xac7dda,'LICENSE_FEATURE_DISABLED',{'feature':_0x46c8d7});}}['isFeatureEnabled'](_0x29f8b8){const _0x58e761=_0x51a586;if(_0x458572['LICENSED_BUILD']!==_0x58e761(0x5e6))return!![];return!!this[_0x58e761(0x38f)][_0x58e761(0x3df)]?.[_0x29f8b8];}[_0x51a586(0x46b)](_0x4c1e3f,_0x517720){const _0x1c2ede=_0x51a586;if(_0x458572[_0x1c2ede(0x4a9)]!=='true')return;const _0x26dd2e=this[_0x1c2ede(0x38f)],_0x4cdc8f=_0x26dd2e[_0x1c2ede(0x2c0)]?.[_0x4c1e3f];if(_0x4cdc8f===null||_0x4cdc8f===undefined||_0x4cdc8f===0x0)return;if(_0x517720>=_0x4cdc8f)throw new _0x18996c(_0x1c2ede(0x348)+_0x4c1e3f+'\x20('+_0x517720+'/'+_0x4cdc8f+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x4c1e3f,'current':_0x517720,'max':_0x4cdc8f});}async['addLicense'](_0x132191){const _0x2caaab=_0x51a586;let _0x594502;try{_0x594502=_0x206f91['decodeLicenseBlob'](_0x132191);}catch(_0x11ec78){throw new _0x18996c(_0x2caaab(0x445)+_0x11ec78[_0x2caaab(0x58f)],_0x2caaab(0x582));}let _0x1278a8;try{_0x1278a8=_0x10ff66[_0x2caaab(0x34e)](null,_0x594502[_0x2caaab(0x18c)],_0x458572[_0x2caaab(0x5b1)],_0x594502[_0x2caaab(0x4f7)]);}catch(_0x519d2a){throw new _0x18996c(_0x2caaab(0x15f)+_0x519d2a[_0x2caaab(0x58f)],_0x2caaab(0x582));}if(!_0x1278a8)throw new _0x18996c('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x2caaab(0x316)+_0x458572['PUB_FINGERPRINT']+'.\x20')+_0x2caaab(0x11a),_0x2caaab(0x582),{'expectedFingerprint':_0x458572[_0x2caaab(0x1ec)]});if(_0x594502['decoded'][_0x2caaab(0x422)]===_0x4c8483){const _0x339ddd=_0x594502[_0x2caaab(0x397)][_0x2caaab(0x420)]-_0x594502[_0x2caaab(0x397)][_0x2caaab(0x4fd)];if(_0x339ddd>_0x1fb4a6)throw new _0x18996c(_0x2caaab(0x3a5)+Math[_0x2caaab(0x58a)](_0x339ddd/(0x1e*0x5265c00))+_0x2caaab(0x4e1),_0x2caaab(0x582));}const _0xa24dfc=this['okdb']['_systemEnv'];await _0x233c24(_0xa24dfc);const _0x10e624=_0x206f91[_0x2caaab(0x187)](_0x594502[_0x2caaab(0x28a)])[_0x2caaab(0x1b3)](_0x2caaab(0x394));for(const {value:_0x3740c2}of _0xa24dfc['getRange'](_0x1b9df1)){if(_0x3740c2['_licenseHash']===_0x10e624)throw new _0x18996c(_0x2caaab(0x3e7),_0x2caaab(0x582));}const _0x4d3672=_0x10ff66[_0x2caaab(0x2fd)](),_0x4e93d7={'blob':_0x132191,'activation':null,'addedAt':Date[_0x2caaab(0x1ad)](),'_licenseHash':_0x10e624,'licensee':_0x594502['decoded'][_0x2caaab(0x3d6)],'expiresAt':_0x594502['decoded'][_0x2caaab(0x420)],'features':_0x594502[_0x2caaab(0x397)][_0x2caaab(0x3df)],'limits':_0x594502[_0x2caaab(0x397)]['limits'],'licenseType':_0x594502[_0x2caaab(0x397)]['licenseType']};return await _0xa24dfc[_0x2caaab(0x346)](_0x1b9df1,_0x4d3672,_0x4e93d7),{'id':_0x4d3672,..._0x4e93d7};}async['activateLicense'](_0x54025d){const _0x3fc83e=_0x51a586;let _0x3dcb97;try{_0x3dcb97=_0x206f91[_0x3fc83e(0x1a3)](_0x54025d);}catch(_0x3fc5b8){throw new _0x18996c(_0x3fc83e(0x3c5)+_0x3fc5b8[_0x3fc83e(0x58f)],_0x3fc83e(0x4ac));}const _0x528b02=_0x3dcb97[_0x3fc83e(0x187)][_0x3fc83e(0x1b3)]('hex'),_0x3ef339=this['okdb'][_0x3fc83e(0x2d0)];if(!_0x3ef339||!_0x3ef339[_0x3fc83e(0x474)](_0x1b9df1))throw new _0x18996c('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x3fc83e(0x4ac));let _0x13c3ed=null,_0x55f1a4=null;for(const {key:_0x3f4582,value:_0x181ed3}of _0x3ef339[_0x3fc83e(0x306)](_0x1b9df1)){if(_0x181ed3[_0x3fc83e(0x22b)]===_0x528b02){_0x13c3ed=_0x3f4582,_0x55f1a4=_0x181ed3;break;}}if(!_0x13c3ed)throw new _0x18996c(_0x3fc83e(0x30a),_0x3fc83e(0x4ac));const {rawBuf:_0x2eb2e8}=_0x206f91[_0x3fc83e(0x4d6)](_0x55f1a4[_0x3fc83e(0x391)]),_0x312781=_0x206f91[_0x3fc83e(0x152)]({'tokenString':_0x54025d,'nodeId':this[_0x3fc83e(0x5b9)]['id'],'rawBlobBuf':_0x2eb2e8,'pubKeyPem':_0x458572[_0x3fc83e(0x5b1)],'pubFingerprint':_0x458572[_0x3fc83e(0x1ec)]});if(!_0x312781[_0x3fc83e(0x291)])throw new _0x18996c('Activation\x20invalid:\x20'+_0x312781[_0x3fc83e(0x42b)],_0x3fc83e(0x4ac),{'reason':_0x312781[_0x3fc83e(0x42b)]});const _0x4921fa={..._0x55f1a4,'activation':_0x54025d};return await _0x3ef339[_0x3fc83e(0x304)](_0x1b9df1,_0x13c3ed,_0x4921fa),{'id':_0x13c3ed,..._0x4921fa};}async[_0x51a586(0x2b4)](_0xbe3397){const _0x353b06=_0x51a586,_0x585909=this[_0x353b06(0x5b9)][_0x353b06(0x2d0)];if(!_0x585909||!_0x585909['hasType'](_0x1b9df1))return;await _0x585909['remove'](_0x1b9df1,_0xbe3397);}async['listLicenses'](){const _0x536f97=_0x51a586,_0x62da5e=this['okdb'][_0x536f97(0x2d0)];if(!_0x62da5e||!_0x62da5e[_0x536f97(0x474)](_0x1b9df1))return[];const _0x451d39=this['okdb']['id'],_0x4bcbf8=[];for(const {key:_0x124d3f,value:_0x4e2e87}of _0x62da5e[_0x536f97(0x306)](_0x1b9df1)){const _0x11967e=this[_0x536f97(0x354)](_0x4e2e87,_0x451d39);_0x4bcbf8[_0x536f97(0x2da)]({..._0x4e2e87,'id':_0x124d3f,'status':_0x11967e});}return _0x4bcbf8;}['getPins'](){const _0x7f2ce7=_0x51a586,_0xcfbd47=this[_0x7f2ce7(0x5b9)][_0x7f2ce7(0x2d0)];if(!_0xcfbd47||!_0xcfbd47[_0x7f2ce7(0x474)](_0x1b9df1))return[];const _0x492352=this[_0x7f2ce7(0x5b9)]['id'],_0x584d46=[];for(const {key:_0xb81cd0,value:_0x221408}of _0xcfbd47[_0x7f2ce7(0x306)](_0x1b9df1)){if(_0x221408['_licenseHash']){if(_0x221408[_0x7f2ce7(0x422)]===_0x4c8483)_0x584d46[_0x7f2ce7(0x2da)]({'licenseId':_0xb81cd0,'pin':null});else{const _0x4615fe=Buffer[_0x7f2ce7(0x2cc)](_0x221408[_0x7f2ce7(0x22b)],_0x7f2ce7(0x394)),{pin:_0x22dd66}=_0x206f91[_0x7f2ce7(0x1bd)](_0x492352,_0x4615fe,_0x458572[_0x7f2ce7(0x1ec)]);_0x584d46[_0x7f2ce7(0x2da)]({'licenseId':_0xb81cd0,'pin':_0x22dd66});}}}return _0x584d46;}async[_0x51a586(0x3e6)](){const _0x533c58=_0x51a586,_0x1f7346=this['_active'];await this[_0x533c58(0x2de)]();if(this[_0x533c58(0x511)]&&this[_0x533c58(0x511)]['licenseType']===_0x4c8483){const _0x337809=Math['ceil']((this[_0x533c58(0x511)][_0x533c58(0x420)]-Date[_0x533c58(0x1ad)]())/0x5265c00);this[_0x533c58(0x5b9)][_0x533c58(0x5df)]?.[_0x533c58(0x1f0)](_0x533c58(0x5b0)+_0x337809+_0x533c58(0x3fb),{'feature':_0x533c58(0x2f6),'licensee':this[_0x533c58(0x511)]['licensee'],'expiresAt':new Date(this['_active'][_0x533c58(0x420)])['toISOString']()});}this['_active']&&this[_0x533c58(0x511)][_0x533c58(0x422)]===_0x2d4f6d&&this[_0x533c58(0x5b9)]['log']?.['warn'](_0x533c58(0x345),{'feature':_0x533c58(0x2f6),'licensee':this['_active'][_0x533c58(0x3d6)]});if(_0x1f7346&&!this[_0x533c58(0x511)]){this[_0x533c58(0x5b9)][_0x533c58(0x5df)]?.[_0x533c58(0x1f0)](_0x533c58(0x5ce),{'feature':_0x533c58(0x2f6)}),this['okdb'][_0x533c58(0x52f)]?.['emit'](_0x48e7d1[_0x533c58(0x582)],{'previous':_0x1f7346});const _0x45a25a=this[_0x533c58(0x5b9)][_0x533c58(0x315)]?.[_0x533c58(0x10a)]??_0x458572[_0x533c58(0x34f)];_0x45a25a===_0x533c58(0x1c4)&&(this[_0x533c58(0x5b9)][_0x533c58(0x5df)]?.[_0x533c58(0x209)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x533c58(0x2f6)}),this[_0x533c58(0x5b9)]['close']()[_0x533c58(0x2f0)](()=>{})[_0x533c58(0x1d9)](()=>process[_0x533c58(0x20f)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x40c4a9,'_C':_0x458572},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x1f879c=_0x4d1b8e;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x5f0e56=require$$0$3,_0x230a39=require$$1$1,_0x2954a9=require$$0,_0x50b437=require$$1,_0x13561f=_0x50b437[_0x1f879c(0x482)](_0x2954a9[_0x1f879c(0x151)](),_0x1f879c(0x203)),_0x553c10=0x3e8,_0x111821={'reset':_0x1f879c(0x4cf),'bold':_0x1f879c(0x3f6),'dim':_0x1f879c(0x2d7),'red':_0x1f879c(0x4d8),'green':'\x1b[32m','yellow':_0x1f879c(0x4f5),'blue':_0x1f879c(0x3dc),'magenta':_0x1f879c(0x49c),'cyan':'\x1b[36m','white':_0x1f879c(0x103),'gray':_0x1f879c(0x1c6)},_0x29178f=!process[_0x1f879c(0x23a)][_0x1f879c(0x3f5)]||!!process.env.NO_COLOR,_0x4216c2=(_0x3a2845,_0x1e2d8c)=>_0x29178f?_0x1e2d8c:''+_0x3a2845+_0x1e2d8c+_0x111821['reset'],_0x119789={'error':_0x111821['red'],'warn':_0x111821[_0x1f879c(0x493)],'info':_0x111821[_0x1f879c(0x5bf)],'debug':_0x111821[_0x1f879c(0x2f8)]},_0x3ad987={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x20c370(_0x5b41b1,_0x5d7445=_0x1f879c(0x480)){const _0x5e59dd=_0x1f879c,{level:_0x4bd829,msg:_0x5e85ea,meta:_0x365e58,context:_0x4a8f28,ts:_0x4054a8}=_0x5b41b1;if((_0x3ad987[_0x4bd829]??0x1)<(_0x3ad987[_0x5d7445]??0x1))return;const _0x173de5=_0x4216c2(_0x111821[_0x5e59dd(0x2f8)],new Date(_0x4054a8)[_0x5e59dd(0x431)]()),_0x4673d5=_0x4216c2(_0x119789[_0x4bd829]??_0x111821[_0x5e59dd(0x4f8)],_0x4bd829['padEnd'](0x5));let _0x54cb49='\x20\x20'+_0x173de5+'\x20'+_0x4216c2(_0x111821[_0x5e59dd(0x5c1)],_0x4673d5)+'\x20'+_0x5e85ea;if(_0x365e58&&Object[_0x5e59dd(0x519)](_0x365e58)[_0x5e59dd(0x533)]>0x0){const _0x4bf3de=Object[_0x5e59dd(0x320)](_0x365e58)[_0x5e59dd(0x4aa)](([_0xf22b72,_0x1b0290])=>_0xf22b72+'='+_0x1b0290)[_0x5e59dd(0x482)]('\x20');_0x54cb49+=_0x4216c2(_0x111821[_0x5e59dd(0x3eb)],_0x5e59dd(0x45e)+_0x4bf3de+']');}if(_0x4a8f28!==undefined){const _0x48628f=typeof _0x4a8f28===_0x5e59dd(0x3af)?JSON[_0x5e59dd(0x33c)](_0x4a8f28):String(_0x4a8f28);_0x54cb49+=_0x4216c2(_0x111821[_0x5e59dd(0x3eb)],'\x20\x20'+_0x48628f);}const _0x2ff7fb=_0x4bd829==='error'||_0x4bd829===_0x5e59dd(0x1f0)?process[_0x5e59dd(0x4bc)]['write'][_0x5e59dd(0x226)](process[_0x5e59dd(0x4bc)]):process['stdout'][_0x5e59dd(0x476)][_0x5e59dd(0x226)](process['stdout']);_0x2ff7fb(_0x54cb49+'\x0a');}function _0x479398(_0x28ba45,_0x313d29){const _0x53afdd=_0x1f879c;if(_0x28ba45===0xcc||_0x28ba45>=0xc8&&_0x28ba45<0x12c&&!_0x313d29){console[_0x53afdd(0x5df)](_0x53afdd(0x12f)+_0x4216c2(_0x111821[_0x53afdd(0x51a)],'✓')+'\x0a');return;}if(_0x28ba45>=0x190||_0x313d29?.['error']){const _0x55e652=_0x313d29?.['error']??_0x313d29?.['message']??'HTTP\x20'+_0x28ba45;console[_0x53afdd(0x5df)](_0x53afdd(0x12f)+_0x4216c2(_0x111821[_0x53afdd(0x4de)],'✗')+'\x20'+_0x4216c2(_0x111821[_0x53afdd(0x5c1)]+_0x111821['red'],String(_0x28ba45))+'\x20\x20'+_0x55e652+'\x0a');return;}const _0x3bd135=Object[_0x53afdd(0x1bc)][_0x53afdd(0x1af)]['call'](_0x313d29??{},_0x53afdd(0x48f))?_0x313d29['result']:_0x313d29,_0x119451=_0x313d29?.['meta'];console[_0x53afdd(0x5df)](''),_0x1e2de1(_0x3bd135,'\x20\x20');if(_0x119451?.[_0x53afdd(0x215)]!=null||_0x119451?.['time']!=null){const _0x81d2e8=[];if(_0x119451[_0x53afdd(0x215)]!=null)_0x81d2e8[_0x53afdd(0x2da)](_0x119451[_0x53afdd(0x215)]+_0x53afdd(0x34c)+(_0x119451['count']!==0x1?'s':''));if(_0x119451[_0x53afdd(0x2e7)]!=null)_0x81d2e8['push'](_0x119451[_0x53afdd(0x2e7)]+'ms');console[_0x53afdd(0x5df)](_0x53afdd(0x12f)+_0x4216c2(_0x111821[_0x53afdd(0x3eb)],_0x81d2e8['join'](_0x53afdd(0x51c))));}console['log']('');}function _0x1e2de1(_0x118a0b,_0x458179=''){const _0x3fa2e2=_0x1f879c;if(_0x118a0b===null||_0x118a0b===undefined){console[_0x3fa2e2(0x5df)](_0x458179+_0x4216c2(_0x111821[_0x3fa2e2(0x3eb)],_0x3fa2e2(0x572)));return;}if(Array[_0x3fa2e2(0x1d1)](_0x118a0b)){if(_0x118a0b[_0x3fa2e2(0x533)]===0x0){console[_0x3fa2e2(0x5df)](_0x458179+_0x4216c2(_0x111821[_0x3fa2e2(0x3eb)],_0x3fa2e2(0x5c5)));return;}if(_0x118a0b[_0x3fa2e2(0x565)](_0x2264cf=>_0x2264cf&&typeof _0x2264cf==='object'&&'key'in _0x2264cf&&_0x3fa2e2(0x156)in _0x2264cf)){_0x84da74(_0x118a0b,_0x458179);return;}if(_0x118a0b['every'](_0x33528e=>_0x33528e&&typeof _0x33528e==='object'&&_0x3fa2e2(0x526)in _0x33528e&&_0x3fa2e2(0x215)in _0x33528e)){_0x12380f(_0x118a0b,_0x458179);return;}if(_0x118a0b[_0x3fa2e2(0x565)](_0x29e603=>typeof _0x29e603!==_0x3fa2e2(0x3af)||_0x29e603===null)){_0x118a0b[_0x3fa2e2(0x109)]((_0x5b894e,_0x12485c)=>console[_0x3fa2e2(0x5df)](_0x458179+_0x4216c2(_0x111821[_0x3fa2e2(0x2f8)],_0x12485c+0x1+'.')+'\x20'+_0x4216c2(_0x111821[_0x3fa2e2(0x4f8)],String(_0x5b894e))));return;}_0x118a0b['forEach']((_0x43a3d0,_0x949a66)=>{const _0x38c0b6=_0x3fa2e2;console[_0x38c0b6(0x5df)](_0x458179+_0x4216c2(_0x111821[_0x38c0b6(0x3eb)],'['+_0x949a66+']'));if(typeof _0x43a3d0===_0x38c0b6(0x3af)&&_0x43a3d0!==null)_0x166ec4(_0x43a3d0,_0x458179+'\x20\x20');else console[_0x38c0b6(0x5df)](_0x458179+'\x20\x20'+String(_0x43a3d0));});return;}if(typeof _0x118a0b===_0x3fa2e2(0x3af)){if(_0x3fa2e2(0x547)in _0x118a0b&&_0x3fa2e2(0x156)in _0x118a0b&&Object['keys'](_0x118a0b)[_0x3fa2e2(0x533)]<=0x3){console[_0x3fa2e2(0x5df)](_0x458179+_0x4216c2(_0x111821['bold']+_0x111821[_0x3fa2e2(0x5bf)],String(_0x118a0b['key'])));const _0x2b68b1=_0x118a0b[_0x3fa2e2(0x156)];if(_0x2b68b1&&typeof _0x2b68b1===_0x3fa2e2(0x3af))_0x166ec4(_0x2b68b1,_0x458179);else console[_0x3fa2e2(0x5df)](_0x458179+_0x4216c2(_0x111821[_0x3fa2e2(0x4f8)],String(_0x2b68b1)));return;}_0x166ec4(_0x118a0b,_0x458179);return;}console[_0x3fa2e2(0x5df)](_0x458179+_0x4216c2(_0x111821[_0x3fa2e2(0x4f8)],String(_0x118a0b)));}function _0x166ec4(_0x2c3c9c,_0x2f84ad=''){const _0x3f7a32=_0x1f879c,_0x3bc96f=Object[_0x3f7a32(0x320)](_0x2c3c9c);if(_0x3bc96f[_0x3f7a32(0x533)]===0x0){console['log'](_0x2f84ad+_0x4216c2(_0x111821['dim'],'{}'));return;}const _0x392c4a=Math[_0x3f7a32(0x3ba)](0x1c,Math[_0x3f7a32(0x31b)](..._0x3bc96f[_0x3f7a32(0x4aa)](([_0x2e849b])=>_0x2e849b[_0x3f7a32(0x533)])));for(const [_0x5850d8,_0x45afba]of _0x3bc96f){const _0x141a93=_0x4216c2(_0x111821[_0x3f7a32(0x5bf)],_0x5850d8[_0x3f7a32(0x588)](_0x392c4a));if(_0x45afba===null||_0x45afba===undefined)console[_0x3f7a32(0x5df)](_0x2f84ad+_0x141a93+'\x20\x20'+_0x4216c2(_0x111821[_0x3f7a32(0x3eb)],_0x3f7a32(0x160)));else{if(typeof _0x45afba===_0x3f7a32(0x3af)){const _0x16d94d=JSON[_0x3f7a32(0x33c)](_0x45afba);_0x16d94d[_0x3f7a32(0x533)]<=0x50?console[_0x3f7a32(0x5df)](_0x2f84ad+_0x141a93+'\x20\x20'+_0x4216c2(_0x111821[_0x3f7a32(0x3eb)],_0x16d94d)):(console[_0x3f7a32(0x5df)](_0x2f84ad+_0x141a93),_0x1e2de1(_0x45afba,_0x2f84ad+'\x20\x20'));}else{const _0x3c191e=typeof _0x45afba===_0x3f7a32(0x31f)?_0x4216c2(_0x45afba?_0x111821[_0x3f7a32(0x51a)]:_0x111821['yellow'],String(_0x45afba)):typeof _0x45afba==='number'?_0x4216c2(_0x111821[_0x3f7a32(0x5bb)],String(_0x45afba)):_0x4216c2(_0x111821[_0x3f7a32(0x4f8)],String(_0x45afba));console['log'](_0x2f84ad+_0x141a93+'\x20\x20'+_0x3c191e);}}}}function _0x84da74(_0x6c9219,_0x2a721d=''){const _0x45cde5=_0x1f879c,_0x88c934=Math[_0x45cde5(0x3ba)](0x20,Math[_0x45cde5(0x31b)](..._0x6c9219[_0x45cde5(0x4aa)](_0x900896=>String(_0x900896[_0x45cde5(0x547)])['length'])));for(const {key:_0xbe4955,value:_0x47877a,score:_0x2d8e0c,clock:_0x12f38d}of _0x6c9219){const _0x5ae665=_0x4216c2(_0x111821['bold']+_0x111821[_0x45cde5(0x5bf)],String(_0xbe4955)[_0x45cde5(0x588)](_0x88c934)),_0x3ce3dd=_0x47877a==null?_0x4216c2(_0x111821[_0x45cde5(0x3eb)],_0x45cde5(0x160)):typeof _0x47877a===_0x45cde5(0x3af)?_0x4216c2(_0x111821[_0x45cde5(0x3eb)],JSON['stringify'](_0x47877a)):_0x4216c2(_0x111821['white'],String(_0x47877a)),_0x47fbfc=_0x2d8e0c!=null?_0x4216c2(_0x111821[_0x45cde5(0x2f8)],_0x45cde5(0x296)+_0x2d8e0c[_0x45cde5(0x5de)](0x4)):'',_0x4f1f55=_0x12f38d!=null?_0x4216c2(_0x111821['gray'],_0x45cde5(0x56a)+_0x12f38d):'';console[_0x45cde5(0x5df)](_0x2a721d+_0x5ae665+'\x20\x20'+_0x3ce3dd+_0x47fbfc+_0x4f1f55);}}function _0x12380f(_0x212901,_0x3398f0=''){const _0x2f0947=_0x1f879c,_0x177381=Math[_0x2f0947(0x3ba)](0x20,Math[_0x2f0947(0x31b)](..._0x212901[_0x2f0947(0x4aa)](_0x24c52b=>_0x24c52b[_0x2f0947(0x526)][_0x2f0947(0x533)])));for(const {type:_0x1a1121,count:_0x1f0cb8,fields:_0x3efb3d}of _0x212901){if(_0x1a1121['startsWith']('~'))continue;const _0xf69902=_0x4216c2(_0x111821[_0x2f0947(0x5c1)]+_0x111821['cyan'],_0x1a1121[_0x2f0947(0x588)](_0x177381)),_0x54e187=_0x4216c2(_0x111821[_0x2f0947(0x5bb)],String(_0x1f0cb8)[_0x2f0947(0x3e1)](0x6))+_0x4216c2(_0x111821['dim'],_0x2f0947(0x43e)),_0x5da419=_0x3efb3d&&Object[_0x2f0947(0x519)](_0x3efb3d)[_0x2f0947(0x533)]?_0x4216c2(_0x111821[_0x2f0947(0x3eb)],_0x2f0947(0x1eb)+Object[_0x2f0947(0x519)](_0x3efb3d)['slice'](0x0,0x6)[_0x2f0947(0x482)](',\x20')+(Object[_0x2f0947(0x519)](_0x3efb3d)['length']>0x6?'…':'')):'';console[_0x2f0947(0x5df)](_0x3398f0+_0xf69902+'\x20\x20'+_0x54e187+_0x5da419);}}const _0x50c0e9=[_0x1f879c(0x4ec),_0x1f879c(0x5bc),_0x1f879c(0x136),_0x1f879c(0x1ce),'transaction','processors/'];function _0x4d7f28(_0x1944e6,_0x314262){const _0x27806e=_0x1f879c;if(_0x1944e6[_0x27806e(0x447)]('/api/'))return _0x1944e6;if(_0x1944e6[_0x27806e(0x447)]('/'))return _0x27806e(0x437)+_0x1944e6;if(_0x1944e6['startsWith'](_0x27806e(0x2dc)))return _0x27806e(0x131)+_0x1944e6;const _0x2b70ca=_0x50c0e9[_0x27806e(0x5e8)](_0x3de004=>_0x1944e6===_0x3de004['replace'](/\/$/,'')||_0x1944e6[_0x27806e(0x447)](_0x3de004));return _0x2b70ca?_0x27806e(0x286)+_0x314262+'/'+_0x1944e6:_0x27806e(0x131)+_0x1944e6;}function _0x4e7c02(_0x31dd4d){const _0x287471=_0x1f879c,_0x4b3b1c={},_0x52c804=[];let _0x3a9e27=0x0;while(_0x3a9e27<_0x31dd4d['length']){if((_0x31dd4d[_0x3a9e27]===_0x287471(0x442)||_0x31dd4d[_0x3a9e27]==='-e')&&_0x31dd4d[_0x3a9e27+0x1]&&!_0x31dd4d[_0x3a9e27+0x1][_0x287471(0x447)]('-'))_0x4b3b1c[_0x287471(0x268)]=_0x31dd4d[++_0x3a9e27];else _0x31dd4d[_0x3a9e27]===_0x287471(0x559)||_0x31dd4d[_0x3a9e27]==='-h'?_0x4b3b1c[_0x287471(0x471)]=!![]:_0x52c804[_0x287471(0x2da)](_0x31dd4d[_0x3a9e27]);_0x3a9e27++;}return{'flags':_0x4b3b1c,'rest':_0x52c804};}const _0x4c3bd5={'system':'System','envs':_0x1f879c(0x59a),'types':_0x1f879c(0x2b2),'data':_0x1f879c(0x2b6),'indexes':_0x1f879c(0x54e),'fts':_0x1f879c(0x4f0),'sync':_0x1f879c(0x38d),'queue':'Queue','files':_0x1f879c(0x3ec),'embeddings':_0x1f879c(0x4e7),'engines':'Engines','admin':_0x1f879c(0x36e),'event':'Events','processor':_0x1f879c(0x3d3)},_0x196ce4=['system',_0x1f879c(0x3a8),_0x1f879c(0x4ec),_0x1f879c(0x535),_0x1f879c(0x5d0),'fts','sync',_0x1f879c(0x2bf),'files','embeddings',_0x1f879c(0x28f),_0x1f879c(0x298)];function _0x1eb6ef(_0x433a1c){const _0x2a1491=_0x1f879c;return _0x433a1c['replace'](/^\/api/,'')[_0x2a1491(0x18f)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x2a1491(0x18f)](/^\/env\/:env/,_0x2a1491(0x45a))[_0x2a1491(0x18f)](/^\//,'');}function _0x27f1ed(_0x18f797,_0x515883=''){const _0x35c3f2=_0x1f879c,_0x1c2703=_0x18f797[_0x35c3f2(0x446)][_0x35c3f2(0x3b4)]()[_0x35c3f2(0x1c1)](_0x341806=>!_0x341806['meta']?.['hidden']),_0x586a27=_0x515883?_0x1c2703[_0x35c3f2(0x1c1)](_0x482e6a=>_0x482e6a[_0x35c3f2(0x550)]['toLowerCase']()['includes'](_0x515883[_0x35c3f2(0x27f)]())||(_0x58d325(_0x482e6a)??'')[_0x35c3f2(0x27f)]()[_0x35c3f2(0x15a)](_0x515883[_0x35c3f2(0x27f)]())||_0x3e02e8(_0x482e6a)[_0x35c3f2(0x5e8)](_0x20904f=>_0x20904f[_0x35c3f2(0x27f)]()['includes'](_0x515883[_0x35c3f2(0x27f)]()))):_0x1c2703;if(!_0x586a27[_0x35c3f2(0x533)]){console['log'](_0x4216c2(_0x111821['yellow'],_0x35c3f2(0x5c8)+_0x515883+'\x22\x0a'));return;}const _0xb683b5=new Map();for(const _0x624492 of _0x586a27){const _0x328f45=_0x3e02e8(_0x624492)[0x0]??_0x35c3f2(0x2dd);if(!_0xb683b5[_0x35c3f2(0x1ed)](_0x328f45))_0xb683b5[_0x35c3f2(0x455)](_0x328f45,[]);_0xb683b5['get'](_0x328f45)[_0x35c3f2(0x2da)](_0x624492);}const _0xf5eff3=[..._0x196ce4['filter'](_0x315bdb=>_0xb683b5[_0x35c3f2(0x1ed)](_0x315bdb)),...[..._0xb683b5['keys']()][_0x35c3f2(0x1c1)](_0x5813a7=>!_0x196ce4['includes'](_0x5813a7))];console[_0x35c3f2(0x5df)]('');for(const _0xf72c9e of _0xf5eff3){const _0x1acc84=_0xb683b5[_0x35c3f2(0x2c6)](_0xf72c9e);if(!_0x1acc84?.[_0x35c3f2(0x533)])continue;console[_0x35c3f2(0x5df)](_0x4216c2(_0x111821[_0x35c3f2(0x5c1)],'\x20\x20'+(_0x4c3bd5[_0xf72c9e]??_0xf72c9e)));for(const _0x3b5048 of _0x1acc84){const _0x1b8853=_0x4216c2(_0x111821[_0x35c3f2(0x5bb)],_0x3b5048[_0x35c3f2(0x212)][_0x35c3f2(0x588)](0x7)),_0x315a80=_0x4216c2(_0x111821[_0x35c3f2(0x5bf)],_0x1eb6ef(_0x3b5048['path'])),_0x52fd72=_0x58d325(_0x3b5048)?_0x4216c2(_0x111821[_0x35c3f2(0x3eb)],'\x20\x20'+_0x58d325(_0x3b5048)):'',_0x84e6de=_0x3b5048[_0x35c3f2(0x501)]?.['id']?_0x4216c2(_0x111821[_0x35c3f2(0x2f8)],_0x35c3f2(0x45e)+_0x3b5048[_0x35c3f2(0x501)]['id']+']'):'';console[_0x35c3f2(0x5df)](_0x35c3f2(0x235)+_0x1b8853+'\x20'+_0x315a80+_0x52fd72+_0x84e6de);}console['log']('');}}function _0x432f3a(_0xd63804,_0x26c65a){const _0x1cf386=_0x1f879c,_0x171844=_0x26c65a[_0x1cf386(0x18f)](/^\/api(\/env\/[^/]+)?\//,'')[_0x1cf386(0x41b)]('/')[0x0],_0x4599da=_0xd63804[_0x1cf386(0x446)]['listRoutes']()[_0x1cf386(0x1c1)](_0x7d53aa=>_0x7d53aa[_0x1cf386(0x550)]['toLowerCase']()[_0x1cf386(0x15a)](_0x171844[_0x1cf386(0x27f)]()));if(!_0x4599da[_0x1cf386(0x533)]){console[_0x1cf386(0x5df)](_0x4216c2(_0x111821[_0x1cf386(0x493)],_0x1cf386(0x213)+_0x26c65a+'\x0a'));return;}console[_0x1cf386(0x5df)]('');for(const _0x13c400 of _0x4599da[_0x1cf386(0x352)](0x0,0xc)){for(const _0x2da779 of _0x541f27(_0x13c400)){console['log'](_0x2da779);}console['log']('');}}function _0x58d325(_0x166390){const _0x152cc2=_0x1f879c;return _0x166390['operation']?.[_0x152cc2(0x33b)]??_0x166390[_0x152cc2(0x2e2)]?.[_0x152cc2(0x33b)]??'';}function _0x319f6b(_0x3a02ea){const _0x31d55b=_0x1f879c;return _0x3a02ea[_0x31d55b(0x501)]?.[_0x31d55b(0x505)]??_0x3a02ea[_0x31d55b(0x2e2)]?.['description']??'';}function _0x3e02e8(_0x11abaa){const _0x4ac572=_0x1f879c;return _0x11abaa[_0x4ac572(0x501)]?.[_0x4ac572(0x4f6)]?.[_0x4ac572(0x533)]?_0x11abaa[_0x4ac572(0x501)][_0x4ac572(0x4f6)]:_0x11abaa[_0x4ac572(0x2e2)]?.[_0x4ac572(0x4f6)]??[];}function _0x541f27(_0x2feb60){const _0x1933fa=_0x1f879c,_0x28501c=[];_0x28501c[_0x1933fa(0x2da)]('\x20\x20'+_0x4216c2(_0x111821['bold']+_0x111821[_0x1933fa(0x5bb)],_0x2feb60[_0x1933fa(0x212)][_0x1933fa(0x588)](0x7))+'\x20'+_0x4216c2(_0x111821[_0x1933fa(0x5c1)]+_0x111821[_0x1933fa(0x5bf)],_0x2feb60[_0x1933fa(0x550)]));_0x2feb60[_0x1933fa(0x501)]?.['id']&&_0x28501c[_0x1933fa(0x2da)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4216c2(_0x111821['gray'],_0x1933fa(0x281)+_0x2feb60['operation']['id']));_0x58d325(_0x2feb60)&&_0x28501c[_0x1933fa(0x2da)](_0x1933fa(0x37d)+_0x4216c2(_0x111821['white'],_0x58d325(_0x2feb60)));_0x319f6b(_0x2feb60)&&_0x28501c[_0x1933fa(0x2da)](_0x1933fa(0x37d)+_0x4216c2(_0x111821['dim'],_0x319f6b(_0x2feb60)));_0x3e02e8(_0x2feb60)[_0x1933fa(0x533)]&&_0x28501c[_0x1933fa(0x2da)](_0x1933fa(0x37d)+_0x4216c2(_0x111821['gray'],_0x1933fa(0x4c1)+_0x3e02e8(_0x2feb60)[_0x1933fa(0x482)](',\x20')));_0x2feb60[_0x1933fa(0x501)]?.['safety']?.[_0x1933fa(0x2d3)]&&_0x28501c[_0x1933fa(0x2da)](_0x1933fa(0x37d)+_0x4216c2(_0x111821[_0x1933fa(0x2f8)],'access:\x20'+_0x2feb60[_0x1933fa(0x501)][_0x1933fa(0x263)][_0x1933fa(0x2d3)]));_0x2feb60[_0x1933fa(0x501)]?.[_0x1933fa(0x446)]?.[_0x1933fa(0x329)]&&_0x2feb60[_0x1933fa(0x501)][_0x1933fa(0x446)][_0x1933fa(0x329)]!==_0x1933fa(0x10c)&&_0x28501c['push'](_0x1933fa(0x37d)+_0x4216c2(_0x111821[_0x1933fa(0x2f8)],'transport:\x20'+_0x2feb60[_0x1933fa(0x501)]['http'][_0x1933fa(0x329)]));if(_0x2feb60[_0x1933fa(0x501)]?.[_0x1933fa(0x19d)]){const _0x217129=Object['keys'](_0x2feb60[_0x1933fa(0x501)][_0x1933fa(0x19d)]['properties']||{});if(_0x217129['length'])_0x28501c[_0x1933fa(0x2da)](_0x1933fa(0x37d)+_0x4216c2(_0x111821[_0x1933fa(0x2f8)],_0x1933fa(0x2d5)+_0x217129[_0x1933fa(0x482)](',\x20')));}return _0x2feb60['meta']?.[_0x1933fa(0x380)]&&_0x28501c['push'](_0x1933fa(0x37d)+_0x4216c2(_0x111821[_0x1933fa(0x2f8)],'body:\x20'+JSON['stringify'](_0x2feb60[_0x1933fa(0x2e2)][_0x1933fa(0x380)]))),_0x28501c;}async function _0x13204b(_0x139799,_0x31178b,_0x3f5af2,_0x3207b7=null){const _0x5ef342=_0x1f879c,_0x4df5d2=_0x3f5af2['indexOf']('?'),_0x461bb9=_0x4df5d2>=0x0?_0x3f5af2[_0x5ef342(0x352)](0x0,_0x4df5d2):_0x3f5af2,_0x4a6da9=_0x4df5d2>=0x0?_0x3f5af2[_0x5ef342(0x352)](_0x4df5d2+0x1):'',_0x1fae2e=Object['fromEntries'](new URLSearchParams(_0x4a6da9)[_0x5ef342(0x320)]());return _0x139799[_0x5ef342(0x446)][_0x5ef342(0x1de)](_0x31178b,_0x461bb9,{'body':_0x3207b7,'query':_0x1fae2e,'headers':{'content-type':_0x5ef342(0x3ce)}},{'internal':!![]});}function _0x400db9(_0x261341){const _0x3bb19a=_0x1f879c;if(!_0x261341)return null;const _0x308eb3=_0x261341['trim']();if(!_0x308eb3)return null;try{return JSON[_0x3bb19a(0x1f2)](_0x308eb3);}catch{}try{return JSON[_0x3bb19a(0x1f2)](_0x5a14c3(_0x308eb3));}catch(_0x2f9e69){throw new SyntaxError(_0x2f9e69['message'],{'cause':_0x2f9e69});}}function _0x5a14c3(_0x3ee7f3){const _0xa4407=_0x1f879c;let _0x27b94c='',_0x35d7eb=0x0;while(_0x35d7eb<_0x3ee7f3['length']){const _0xcaece2=_0x3ee7f3[_0x35d7eb];if(_0xcaece2==='\x22'){_0x27b94c+='\x22',_0x35d7eb++;while(_0x35d7eb<_0x3ee7f3['length']&&_0x3ee7f3[_0x35d7eb]!=='\x22'){if(_0x3ee7f3[_0x35d7eb]==='\x5c'){_0x27b94c+=_0x3ee7f3[_0x35d7eb++];if(_0x35d7eb<_0x3ee7f3[_0xa4407(0x533)])_0x27b94c+=_0x3ee7f3[_0x35d7eb++];}else _0x27b94c+=_0x3ee7f3[_0x35d7eb++];}_0x27b94c+='\x22';if(_0x35d7eb<_0x3ee7f3[_0xa4407(0x533)])_0x35d7eb++;continue;}if(_0xcaece2==='\x27'){_0x27b94c+='\x22',_0x35d7eb++;while(_0x35d7eb<_0x3ee7f3[_0xa4407(0x533)]&&_0x3ee7f3[_0x35d7eb]!=='\x27'){if(_0x3ee7f3[_0x35d7eb]==='\x5c'&&_0x3ee7f3[_0x35d7eb+0x1]==='\x27')_0x27b94c+='\x27',_0x35d7eb+=0x2;else _0x3ee7f3[_0x35d7eb]==='\x22'?(_0x27b94c+='\x5c\x22',_0x35d7eb++):_0x27b94c+=_0x3ee7f3[_0x35d7eb++];}_0x27b94c+='\x22';if(_0x35d7eb<_0x3ee7f3['length'])_0x35d7eb++;continue;}if(_0xa4407(0x25a)[_0xa4407(0x15a)](_0xcaece2)){_0x27b94c+=_0xcaece2,_0x35d7eb++;continue;}let _0x1627f4='';while(_0x35d7eb<_0x3ee7f3[_0xa4407(0x533)]&&!'{}[]:,\x27\x22'['includes'](_0x3ee7f3[_0x35d7eb])&&_0x3ee7f3[_0x35d7eb]!=='\x20'&&_0x3ee7f3[_0x35d7eb]!=='\x09'&&_0x3ee7f3[_0x35d7eb]!=='\x0a'&&_0x3ee7f3[_0x35d7eb]!=='\x0d'){_0x1627f4+=_0x3ee7f3[_0x35d7eb++];}let _0x11f960=_0x35d7eb;while(_0x11f960<_0x3ee7f3[_0xa4407(0x533)]&&(_0x3ee7f3[_0x11f960]==='\x20'||_0x3ee7f3[_0x11f960]==='\x09'))_0x11f960++;if(_0x3ee7f3[_0x11f960]===':')_0x27b94c+='\x22'+_0x1627f4+'\x22';else _0x1627f4===_0xa4407(0x5e6)||_0x1627f4===_0xa4407(0x5e9)||_0x1627f4===_0xa4407(0x160)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0xa4407(0x5dc)](_0x1627f4)?_0x27b94c+=_0x1627f4:_0x27b94c+='\x22'+_0x1627f4+'\x22';}return _0x27b94c[_0xa4407(0x18f)](/,(\s*[}\]])/g,'$1');}function _0x2bf7f1(_0x4d2a3e){const _0x1cb27c=_0x1f879c,_0x45e09c=[];let _0x4fe03a=0x0;while(_0x4fe03a<_0x4d2a3e[_0x1cb27c(0x533)]){while(_0x4fe03a<_0x4d2a3e[_0x1cb27c(0x533)]&&(_0x4d2a3e[_0x4fe03a]==='\x20'||_0x4d2a3e[_0x4fe03a]==='\x09'))_0x4fe03a++;if(_0x4fe03a>=_0x4d2a3e[_0x1cb27c(0x533)])break;const _0x325c41=_0x4d2a3e[_0x4fe03a];if(_0x325c41==='{'||_0x325c41==='['){const _0x49912e=_0x325c41==='{'?'}':']',_0x2ba2bf=_0x4fe03a++;let _0x14343d=0x1,_0x1874ca=![],_0x53279c='';while(_0x4fe03a<_0x4d2a3e[_0x1cb27c(0x533)]&&_0x14343d>0x0){const _0x1b0237=_0x4d2a3e[_0x4fe03a];if(_0x1874ca){if(_0x1b0237==='\x5c')_0x4fe03a++;else{if(_0x1b0237===_0x53279c)_0x1874ca=![];}}else{if(_0x1b0237==='\x22'||_0x1b0237==='\x27')_0x1874ca=!![],_0x53279c=_0x1b0237;else{if(_0x1b0237===_0x325c41)_0x14343d++;else{if(_0x1b0237===_0x49912e)_0x14343d--;}}}_0x4fe03a++;}_0x45e09c[_0x1cb27c(0x2da)](_0x4d2a3e[_0x1cb27c(0x352)](_0x2ba2bf,_0x4fe03a));continue;}if(_0x325c41==='\x22'||_0x325c41==='\x27'){const _0x3ca92a=_0x325c41;_0x4fe03a++;let _0x3d3fb6='';while(_0x4fe03a<_0x4d2a3e['length']&&_0x4d2a3e[_0x4fe03a]!==_0x3ca92a){if(_0x4d2a3e[_0x4fe03a]==='\x5c'&&_0x4fe03a+0x1<_0x4d2a3e[_0x1cb27c(0x533)])_0x4fe03a++,_0x3d3fb6+=_0x4d2a3e[_0x4fe03a++];else _0x3d3fb6+=_0x4d2a3e[_0x4fe03a++];}if(_0x4fe03a<_0x4d2a3e[_0x1cb27c(0x533)])_0x4fe03a++;_0x45e09c['push'](_0x3d3fb6);continue;}let _0x16c2a9='';while(_0x4fe03a<_0x4d2a3e[_0x1cb27c(0x533)]&&_0x4d2a3e[_0x4fe03a]!=='\x20'&&_0x4d2a3e[_0x4fe03a]!=='\x09'&&_0x4d2a3e[_0x4fe03a]!=='{'&&_0x4d2a3e[_0x4fe03a]!=='['){_0x16c2a9+=_0x4d2a3e[_0x4fe03a++];}if(_0x16c2a9)_0x45e09c['push'](_0x16c2a9);}return _0x45e09c;}function _0x324c34(_0x223863,_0x50bcc1){const _0x2e9800=_0x1f879c,_0x15da90=[..._0x223863['_envs'][_0x2e9800(0x519)]()][_0x2e9800(0x1c1)](_0x35bfd1=>!_0x35bfd1[_0x2e9800(0x447)]('~'));console['log'](['',_0x4216c2(_0x111821['bold']+_0x111821[_0x2e9800(0x5bf)],'\x20\x20╔═══════════════════════════╗'),_0x4216c2(_0x111821[_0x2e9800(0x5c1)]+_0x111821[_0x2e9800(0x5bf)],_0x2e9800(0x3aa))+_0x4216c2(_0x111821['bold'],_0x2e9800(0x5d6))+_0x4216c2(_0x111821[_0x2e9800(0x5c1)]+_0x111821['cyan'],'║'),_0x4216c2(_0x111821['bold']+_0x111821['cyan'],_0x2e9800(0x1b2)),'','\x20\x20'+_0x4216c2(_0x111821[_0x2e9800(0x51a)],'✓')+'\x20'+_0x4216c2(_0x111821['bold'],_0x2e9800(0x4c6))+_0x2e9800(0x2b0)+_0x50bcc1[_0x2e9800(0x359)],..._0x50bcc1[_0x2e9800(0x400)]>0x1?['\x20\x20'+_0x4216c2(_0x111821['green'],'✓')+'\x20'+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],'cluster')+'\x20'+_0x50bcc1[_0x2e9800(0x400)]+'\x20HTTP\x20workers\x20'+_0x4216c2(_0x111821[_0x2e9800(0x2f8)],_0x2e9800(0x206))]:[],'\x20\x20'+_0x4216c2(_0x111821['green'],'✓')+'\x20'+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],'api')+_0x2e9800(0x3b0)+_0x50bcc1[_0x2e9800(0x359)]+_0x2e9800(0x437),'\x20\x20'+_0x4216c2(_0x111821[_0x2e9800(0x51a)],'✓')+'\x20'+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],_0x2e9800(0x550))+_0x2e9800(0x235)+_0x50bcc1['dbPath'],'\x20\x20'+_0x4216c2(_0x111821[_0x2e9800(0x51a)],'✓')+'\x20'+_0x4216c2(_0x111821['bold'],'id')+_0x2e9800(0x312)+_0x4216c2(_0x111821[_0x2e9800(0x2f8)],_0x223863['id']),'\x20\x20'+_0x4216c2(_0x111821[_0x2e9800(0x51a)],'✓')+'\x20'+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],'envs')+_0x2e9800(0x235)+_0x15da90[_0x2e9800(0x4aa)](_0x2f3e8b=>_0x4216c2(_0x111821[_0x2e9800(0x5bf)],_0x2f3e8b))[_0x2e9800(0x482)]('\x20\x20'),..._0x50bcc1[_0x2e9800(0x37c)]?[]:['\x20\x20'+_0x4216c2(_0x111821['green'],'✓')+'\x20'+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],'admin')+_0x2e9800(0x16b)+_0x50bcc1['port']+_0x2e9800(0x5b8)],'',_0x4216c2(_0x111821[_0x2e9800(0x3eb)],_0x2e9800(0x343)+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],'help')+_0x2e9800(0x545)+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],_0x2e9800(0x201))+_0x2e9800(0x32b)+_0x4216c2(_0x111821[_0x2e9800(0x5c1)],'exit')+_0x2e9800(0x522)),''][_0x2e9800(0x482)]('\x0a'));}function _0x1bccc3(_0x5249fe){const _0x336e99=_0x1f879c;console['log']('\x0a'+_0x4216c2(_0x111821[_0x336e99(0x5c1)],_0x336e99(0x11e))+'\x20\x20'+_0x4216c2(_0x111821[_0x336e99(0x3eb)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0x336e99(0x569)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x539))+_0x336e99(0x58c)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x539))+'\x20'+_0x4216c2(_0x111821['yellow'],_0x336e99(0x17a))+'\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20'+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x3ca))+'\x20'+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x539))+'\x20'+_0x4216c2(_0x111821[_0x336e99(0x493)],_0x336e99(0x3f7))+_0x336e99(0x28c)+_0x4216c2(_0x111821[_0x336e99(0x3eb)],_0x336e99(0x25d))+_0x336e99(0x35c)+_0x4216c2(_0x111821['gray'],_0x336e99(0x480))+_0x336e99(0x269)+_0x4216c2(_0x111821[_0x336e99(0x2f8)],_0x336e99(0x3a8))+_0x336e99(0x140)+_0x4216c2(_0x111821['gray'],'types')+_0x336e99(0x579)+_0x5249fe[_0x336e99(0x268)]+_0x336e99(0x4a2)+_0x4216c2(_0x111821[_0x336e99(0x2f8)],_0x336e99(0x390))+_0x336e99(0x117)+_0x5249fe[_0x336e99(0x268)]+_0x336e99(0x371)+_0x4216c2(_0x111821[_0x336e99(0x2f8)],_0x336e99(0x133))+_0x336e99(0x423)+_0x5249fe[_0x336e99(0x268)]+_0x336e99(0x47c)+_0x4216c2(_0x111821['gray'],_0x336e99(0x4a0))+_0x336e99(0x378)+_0x5249fe['env']+_0x336e99(0x2eb)+_0x4216c2(_0x111821[_0x336e99(0x2f8)],_0x336e99(0x332))+'\x0a\x20\x20\x20\x20'+_0x4216c2(_0x111821['gray'],_0x336e99(0x58b))+'\x0a\x20\x20\x20\x20'+_0x4216c2(_0x111821[_0x336e99(0x2f8)],'env/staging/info')+_0x336e99(0x42a)+_0x4216c2(_0x111821[_0x336e99(0x5c1)],_0x336e99(0x258))+'\x20\x20'+_0x4216c2(_0x111821[_0x336e99(0x3eb)],_0x336e99(0x1ac))+_0x336e99(0x569)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x25e))+_0x336e99(0x357)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x559))+_0x336e99(0x40d)+_0x4216c2(_0x111821[_0x336e99(0x3eb)],_0x336e99(0x25d))+'\x0a\x20\x20\x20\x20'+_0x4216c2(_0x111821[_0x336e99(0x2f8)],_0x336e99(0x114))+_0x336e99(0x35c)+_0x4216c2(_0x111821[_0x336e99(0x2f8)],_0x336e99(0x50e))+_0x336e99(0x35c)+_0x4216c2(_0x111821['gray'],_0x336e99(0x401))+'\x0a\x0a'+_0x4216c2(_0x111821['bold'],'\x20\x20Shell\x20commands')+_0x336e99(0x569)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],'use\x20<env>')+'\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'+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x268))+_0x336e99(0x4c3)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],'routes')+'\x20'+_0x4216c2(_0x111821['dim'],_0x336e99(0x29c))+_0x336e99(0x449)+_0x4216c2(_0x111821['cyan'],_0x336e99(0x24f))+'\x20'+_0x4216c2(_0x111821[_0x336e99(0x3eb)],'[on|off|level]')+_0x336e99(0x44c)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],'open')+'\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'+_0x4216c2(_0x111821['cyan'],_0x336e99(0x471))+_0x336e99(0x4ce)+_0x4216c2(_0x111821[_0x336e99(0x5bf)],_0x336e99(0x20f))+'\x20'+_0x4216c2(_0x111821[_0x336e99(0x3eb)],_0x336e99(0x32e))+_0x336e99(0x441));}let _0x23be41=![];async function _0x3345bc(_0x4a68c6,_0x3be83a=0x0,_0x4442d0=null){const _0x5c2179=_0x1f879c;_0x23be41&&(process[_0x5c2179(0x4bc)][_0x5c2179(0x476)](_0x4216c2(_0x111821['red'],_0x5c2179(0x366))),process[_0x5c2179(0x20f)](0x82));_0x23be41=!![],process[_0x5c2179(0x23a)][_0x5c2179(0x476)]('\x0a'),process[_0x5c2179(0x4bc)][_0x5c2179(0x476)](_0x4216c2(_0x111821[_0x5c2179(0x493)],_0x5c2179(0x5d3)+(_0x4442d0?'received\x20'+_0x4442d0+',\x20':'')+_0x5c2179(0x472)));const _0x29059e=setTimeout(()=>{const _0x30f464=_0x5c2179;process[_0x30f464(0x4bc)][_0x30f464(0x476)](_0x4216c2(_0x111821['red'],_0x30f464(0x530))),process[_0x30f464(0x20f)](0x1);},0x1388);try{await _0x4a68c6['close']();}catch(_0x3dc502){console[_0x5c2179(0x209)](_0x4216c2(_0x111821[_0x5c2179(0x4de)],'\x20\x20'+_0x3dc502[_0x5c2179(0x58f)]));}clearTimeout(_0x29059e),process[_0x5c2179(0x4bc)]['write'](_0x4216c2(_0x111821['dim'],_0x5c2179(0x4ab))),process['exit'](_0x3be83a);}function _0x42c1d7(_0x2176ed){const _0x3e9431=_0x1f879c,_0x1832a5=_0x2176ed[_0x3e9431(0x268)]!==_0x3e9431(0x3c2)?_0x4216c2(_0x111821[_0x3e9431(0x493)],'['+_0x2176ed['env']+']'):'';return _0x4216c2(_0x111821[_0x3e9431(0x5c1)]+_0x111821['cyan'],'okdb')+_0x1832a5+_0x4216c2(_0x111821[_0x3e9431(0x2f8)],'>\x20');}const _0x3f33fc=new Set([_0x1f879c(0x507),'POST',_0x1f879c(0x148),_0x1f879c(0x3ee),_0x1f879c(0x51b)]);async function _0x339555(_0x3836d1,_0x3d7403,_0x119515,_0x449cc1,_0x47fe1e,_0x3a9085){const _0x3bcf3d=_0x1f879c;_0x3836d1=_0x3836d1['trim']();if(!_0x3836d1||_0x3836d1[_0x3bcf3d(0x447)]('#'))return;const _0x4c7c94=_0x2bf7f1(_0x3836d1),{flags:_0x1c7abb,rest:_0x33f6b5}=_0x4e7c02(_0x4c7c94);if(!_0x33f6b5[_0x3bcf3d(0x533)])return;const _0x33985a=_0x33f6b5[0x0],_0x4996fe=_0x33985a[_0x3bcf3d(0x299)]();if(_0x4996fe==='HELP'){if(_0x33f6b5[0x1])_0x432f3a(_0x3d7403,_0x4d7f28(_0x33f6b5[0x1],_0x1c7abb[_0x3bcf3d(0x268)]??_0x47fe1e[_0x3bcf3d(0x268)]));else _0x1bccc3(_0x47fe1e);return;}if(_0x4996fe===_0x3bcf3d(0x2d1)){const _0x9c5613=_0x33f6b5[0x1];if(!_0x9c5613){console[_0x3bcf3d(0x5df)](_0x4216c2(_0x111821[_0x3bcf3d(0x4de)],_0x3bcf3d(0x1e0)));return;}try{_0x3d7403[_0x3bcf3d(0x268)](_0x9c5613),_0x47fe1e[_0x3bcf3d(0x268)]=_0x9c5613,_0x3a9085?.['setPrompt'](_0x42c1d7(_0x47fe1e)),console[_0x3bcf3d(0x5df)]('\x0a\x20\x20'+_0x4216c2(_0x111821[_0x3bcf3d(0x51a)],'✓')+'\x20active\x20env:\x20'+_0x4216c2(_0x111821[_0x3bcf3d(0x5c1)]+_0x111821[_0x3bcf3d(0x5bf)],_0x9c5613)+'\x0a');}catch{console[_0x3bcf3d(0x5df)]('\x0a\x20\x20'+_0x4216c2(_0x111821['red'],'✗')+_0x3bcf3d(0x1dc)+_0x4216c2(_0x111821[_0x3bcf3d(0x5c1)],_0x9c5613)+'\x20not\x20found'+_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x4996fe===_0x3bcf3d(0x454)){const _0x2afabd=[..._0x3d7403[_0x3bcf3d(0x1da)]['keys']()]['filter'](_0x14004e=>!_0x14004e['startsWith']('~'));console[_0x3bcf3d(0x5df)]('');for(const _0x5a60f8 of _0x2afabd){const _0x2f3627=_0x5a60f8===_0x47fe1e['env'];console[_0x3bcf3d(0x5df)]('\x20\x20'+(_0x2f3627?_0x4216c2(_0x111821[_0x3bcf3d(0x51a)],'●'):_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],'○'))+'\x20\x20'+(_0x2f3627?_0x4216c2(_0x111821['bold']+_0x111821[_0x3bcf3d(0x5bf)],_0x5a60f8):_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],_0x5a60f8)));}console[_0x3bcf3d(0x5df)]('\x0a\x20\x20'+_0x4216c2(_0x111821['dim'],_0x3bcf3d(0x575))+'\x20'+_0x4216c2(_0x111821['cyan'],_0x47fe1e['env'])),console[_0x3bcf3d(0x5df)]('');return;}if(_0x4996fe===_0x3bcf3d(0x110)){const _0x55ab1c=[..._0x3d7403['_envs']['values']()][_0x3bcf3d(0x1c1)](_0x3177e1=>!_0x3177e1[_0x3bcf3d(0x392)][_0x3bcf3d(0x447)]('~'));console[_0x3bcf3d(0x5df)]('');const _0x52316e=Math[_0x3bcf3d(0x31b)](..._0x55ab1c[_0x3bcf3d(0x4aa)](_0x51c83a=>_0x51c83a[_0x3bcf3d(0x392)][_0x3bcf3d(0x533)]));for(const _0x3ba3c7 of _0x55ab1c){const _0x5ddc39=_0x3ba3c7[_0x3bcf3d(0x392)]===_0x47fe1e[_0x3bcf3d(0x268)],_0x3729df=_0x5ddc39?_0x4216c2(_0x111821[_0x3bcf3d(0x51a)],'●'):_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],'○'),_0x53be82=_0x5ddc39?_0x4216c2(_0x111821['bold']+_0x111821[_0x3bcf3d(0x5bf)],_0x3ba3c7[_0x3bcf3d(0x392)]['padEnd'](_0x52316e)):_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],_0x3ba3c7[_0x3bcf3d(0x392)][_0x3bcf3d(0x588)](_0x52316e)),_0x5ead24=[..._0x3ba3c7['typeSubDbs'][_0x3bcf3d(0x519)]()]['filter'](_0x4e2f2e=>!_0x4e2f2e[_0x3bcf3d(0x447)]('~')),_0x12aea5=_0x5ead24[_0x3bcf3d(0x533)]?_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],_0x5ead24[_0x3bcf3d(0x352)](0x0,0x5)[_0x3bcf3d(0x482)](',\x20')+(_0x5ead24[_0x3bcf3d(0x533)]>0x5?_0x3bcf3d(0x4ca)+(_0x5ead24[_0x3bcf3d(0x533)]-0x5)+'\x20more':'')):_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],'(no\x20types)');console[_0x3bcf3d(0x5df)]('\x20\x20'+_0x3729df+'\x20\x20'+_0x53be82+'\x20\x20'+_0x12aea5);}console[_0x3bcf3d(0x5df)]('');return;}if(_0x4996fe===_0x3bcf3d(0x147)){const _0xdd17d0=_0x1c7abb[_0x3bcf3d(0x268)]??_0x33f6b5[0x1]??_0x47fe1e[_0x3bcf3d(0x268)];try{const _0x3c1206=_0x3d7403['env'](_0xdd17d0),_0x18f8b8=[..._0x3c1206[_0x3bcf3d(0x16a)][_0x3bcf3d(0x519)]()]['filter'](_0xc84460=>!_0xc84460[_0x3bcf3d(0x447)]('~'))[_0x3bcf3d(0x176)]();console[_0x3bcf3d(0x5df)]('\x0a\x20\x20'+_0x4216c2(_0x111821['dim'],_0x18f8b8[_0x3bcf3d(0x533)]+_0x3bcf3d(0x3fe)+(_0x18f8b8[_0x3bcf3d(0x533)]!==0x1?'s':'')+_0x3bcf3d(0x424)+_0xdd17d0));for(const _0x343cbb of _0x18f8b8){const _0x2252c7=_0x3c1206[_0x3bcf3d(0x16a)][_0x3bcf3d(0x2c6)](_0x343cbb),_0x33f8cd=_0x2252c7?.['data']?.[_0x3bcf3d(0x2f1)]?.()??0x0,_0x730614=_0x4216c2(_0x111821[_0x3bcf3d(0x5c1)]+_0x111821[_0x3bcf3d(0x5bf)],_0x343cbb[_0x3bcf3d(0x588)](0x1c));console[_0x3bcf3d(0x5df)](_0x3bcf3d(0x235)+_0x730614+'\x20\x20'+_0x4216c2(_0x111821[_0x3bcf3d(0x5bb)],String(_0x33f8cd)['padStart'](0x6))+'\x20'+_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],_0x3bcf3d(0x17f)));}console[_0x3bcf3d(0x5df)]('');}catch(_0x3c3466){console[_0x3bcf3d(0x209)](_0x4216c2(_0x111821[_0x3bcf3d(0x4de)],_0x3bcf3d(0x12f)+_0x3c3466[_0x3bcf3d(0x58f)]+'\x0a'));}return;}if(_0x4996fe===_0x3bcf3d(0x5d4)){_0x27f1ed(_0x3d7403,_0x33f6b5[_0x3bcf3d(0x352)](0x1)['join']('\x20'));return;}if(_0x4996fe==='LOGS'){const _0x1fc05b=(_0x33f6b5[0x1]??'')['toLowerCase']();if(!_0x1fc05b||_0x1fc05b==='on')_0x449cc1[_0x3bcf3d(0x13c)]=!![],_0x449cc1[_0x3bcf3d(0x18e)]=_0x3bcf3d(0x480),console[_0x3bcf3d(0x5df)](_0x3bcf3d(0x12f)+_0x4216c2(_0x111821['green'],'✓')+_0x3bcf3d(0x179)+_0x4216c2(_0x111821['dim'],'level:\x20info')+'\x0a');else{if(_0x1fc05b===_0x3bcf3d(0x14f))_0x449cc1[_0x3bcf3d(0x13c)]=![],console[_0x3bcf3d(0x5df)]('\x0a\x20\x20'+_0x4216c2(_0x111821['yellow'],'○')+_0x3bcf3d(0x599));else _0x3ad987[_0x1fc05b]!==undefined?(_0x449cc1['enabled']=!![],_0x449cc1[_0x3bcf3d(0x18e)]=_0x1fc05b,console[_0x3bcf3d(0x5df)](_0x3bcf3d(0x12f)+_0x4216c2(_0x111821['green'],'✓')+_0x3bcf3d(0x128)+_0x4216c2(_0x111821[_0x3bcf3d(0x5c1)],_0x1fc05b)+'\x0a')):console['error'](_0x4216c2(_0x111821[_0x3bcf3d(0x4de)],_0x3bcf3d(0x470)));}return;}if(_0x4996fe===_0x3bcf3d(0x210)||_0x4996fe==='QUIT'){await _0x3345bc(_0x3d7403,0x0);return;}if(_0x4996fe===_0x3bcf3d(0x39f)){const _0x411bca=_0x3bcf3d(0x3f9)+_0x119515[_0x3bcf3d(0x359)]+_0x3bcf3d(0x5b8),_0x90b5cb=process[_0x3bcf3d(0x313)]===_0x3bcf3d(0x122)?_0x3bcf3d(0x4ee)+_0x411bca:process[_0x3bcf3d(0x313)]===_0x3bcf3d(0x576)?_0x3bcf3d(0x165)+_0x411bca:_0x3bcf3d(0x421)+_0x411bca;require$$4['exec'](_0x90b5cb),console[_0x3bcf3d(0x5df)](_0x3bcf3d(0x12f)+_0x4216c2(_0x111821[_0x3bcf3d(0x51a)],'✓')+_0x3bcf3d(0x279)+_0x4216c2(_0x111821[_0x3bcf3d(0x5bf)],_0x411bca)+'\x0a');return;}let _0x54d23a,_0x335708,_0x6f0f31;if(_0x3f33fc['has'](_0x4996fe)){_0x54d23a=_0x4996fe,_0x335708=_0x33f6b5[0x1],_0x6f0f31=_0x33f6b5[_0x3bcf3d(0x352)](0x2);if(!_0x335708){console[_0x3bcf3d(0x209)](_0x4216c2(_0x111821[_0x3bcf3d(0x4de)],_0x3bcf3d(0x1d4)+_0x33985a+'\x20<path>\x20[json-body]'));return;}}else _0x54d23a=null,_0x335708=_0x33f6b5[0x0],_0x6f0f31=_0x33f6b5[_0x3bcf3d(0x352)](0x1);const _0x4c3d95=_0x1c7abb['env']??_0x47fe1e[_0x3bcf3d(0x268)],_0x41e659=_0x4d7f28(_0x335708,_0x4c3d95);if(_0x1c7abb[_0x3bcf3d(0x471)]){_0x432f3a(_0x3d7403,_0x41e659);return;}let _0x30b81d=null;if(_0x6f0f31[_0x3bcf3d(0x533)]){const _0x234152=_0x6f0f31[_0x3bcf3d(0x482)]('\x20');try{_0x30b81d=_0x400db9(_0x234152);}catch(_0x59a8d3){console[_0x3bcf3d(0x209)](_0x4216c2(_0x111821['red'],_0x3bcf3d(0x3be)+_0x234152+'\x0a\x20\x20'+_0x4216c2(_0x111821[_0x3bcf3d(0x3eb)],_0x59a8d3[_0x3bcf3d(0x58f)])+'\x0a'));return;}}if(!_0x54d23a)_0x54d23a=_0x30b81d!==null?_0x3bcf3d(0x182):_0x3bcf3d(0x507);try{const _0x28e07d=await _0x13204b(_0x3d7403,_0x54d23a,_0x41e659,_0x30b81d);_0x479398(_0x28e07d[_0x3bcf3d(0x126)],_0x28e07d[_0x3bcf3d(0x380)]);}catch(_0x30e6df){console[_0x3bcf3d(0x209)]('\x0a\x20\x20'+_0x4216c2(_0x111821[_0x3bcf3d(0x4de)],'✗')+'\x20'+_0x30e6df[_0x3bcf3d(0x58f)]+'\x0a');}}class _0x3f2e5a{constructor(){const _0xe64d91=_0x1f879c;this[_0xe64d91(0x534)]=new Map(),this[_0xe64d91(0x590)]=null,this[_0xe64d91(0x4dd)]=![];}}function _0x211f3d(_0x51ec4){const _0x510fd5=_0x1f879c,_0x876bb=new _0x3f2e5a();for(const _0x3761e7 of _0x51ec4){if(_0x3761e7[_0x510fd5(0x2e2)]?.[_0x510fd5(0x163)])continue;const _0x573952=_0x3761e7[_0x510fd5(0x550)]['replace'](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x510fd5(0x18f)](/^\//,'');if(!_0x573952)continue;let _0x19733e=_0x876bb;for(const _0x3f33aa of _0x573952[_0x510fd5(0x41b)]('/')['filter'](Boolean)){if(_0x3f33aa[_0x510fd5(0x447)](':')){const _0x30a47d=_0x3f33aa[_0x510fd5(0x352)](0x1);if(!_0x19733e[_0x510fd5(0x590)])_0x19733e[_0x510fd5(0x590)]={'param':_0x30a47d,'node':new _0x3f2e5a()};_0x19733e=_0x19733e[_0x510fd5(0x590)]['node'];}else{if(!_0x19733e[_0x510fd5(0x534)][_0x510fd5(0x1ed)](_0x3f33aa))_0x19733e[_0x510fd5(0x534)][_0x510fd5(0x455)](_0x3f33aa,new _0x3f2e5a());_0x19733e=_0x19733e[_0x510fd5(0x534)]['get'](_0x3f33aa);}}_0x19733e['terminal']=!![];}return _0x876bb;}const _0x1464a6=new Map();function _0x2af8ee(_0x1aa406,_0x5be6a4,_0x390b89){const _0x803e81=_0x1f879c,_0x137f86=_0x1464a6[_0x803e81(0x2c6)](_0x1aa406);if(_0x137f86&&_0x137f86[_0x803e81(0x3a6)]>Date[_0x803e81(0x1ad)]())return _0x137f86[_0x803e81(0x48e)];const _0x496b51=_0x390b89();return _0x1464a6[_0x803e81(0x455)](_0x1aa406,{'val':_0x496b51,'exp':Date['now']()+_0x5be6a4}),_0x496b51;}function _0x4bfef5(_0x430caa,_0x14825e,_0x3dc460,_0x3a6f6b){const _0x4ced52=_0x1f879c,_0x279463=_0x14825e['env']??_0x3a6f6b[_0x4ced52(0x268)];switch(_0x430caa){case _0x4ced52(0x268):return[..._0x3dc460[_0x4ced52(0x1da)][_0x4ced52(0x519)]()][_0x4ced52(0x1c1)](_0xaca6c3=>!_0xaca6c3['startsWith']('~'));case _0x4ced52(0x526):return _0x2af8ee(_0x4ced52(0x479)+_0x279463,0x7d0,()=>{const _0x4cc9cf=_0x4ced52;try{return[..._0x3dc460[_0x4cc9cf(0x268)](_0x279463)[_0x4cc9cf(0x16a)]['keys']()]['filter'](_0x1d7fab=>!_0x1d7fab[_0x4cc9cf(0x447)]('~'));}catch{return[];}});case _0x4ced52(0x547):if(!_0x14825e['type'])return[];return _0x2af8ee(_0x4ced52(0x459)+_0x279463+':'+_0x14825e[_0x4ced52(0x526)],0x5dc,()=>{const _0x2ffe93=_0x4ced52;try{const _0x51fef0=_0x3dc460[_0x2ffe93(0x268)](_0x279463)['typeSubDbs']['get'](_0x14825e['type']);if(!_0x51fef0?.[_0x2ffe93(0x535)])return[];const _0x36f3ed=[];for(const {key:_0x444daa}of _0x51fef0[_0x2ffe93(0x535)][_0x2ffe93(0x306)]({'limit':0x32})){_0x36f3ed[_0x2ffe93(0x2da)](String(_0x444daa));if(_0x36f3ed['length']>=0x32)break;}return _0x36f3ed;}catch{return[];}});case _0x4ced52(0x4b6):if(!_0x14825e[_0x4ced52(0x526)])return[];return _0x2af8ee(_0x4ced52(0x41d)+_0x279463+':'+_0x14825e[_0x4ced52(0x526)],0x7d0,()=>{const _0x4e74d3=_0x4ced52;try{const _0x55a4bb=_0x3dc460['env'](_0x279463)[_0x4e74d3(0x16a)][_0x4e74d3(0x2c6)](_0x14825e[_0x4e74d3(0x526)]);return _0x55a4bb?[..._0x55a4bb[_0x4e74d3(0x132)]?.[_0x4e74d3(0x519)]()??[]]:[];}catch{return[];}});case _0x4ced52(0x1e2):if(!_0x14825e[_0x4ced52(0x526)])return[];return _0x2af8ee(_0x4ced52(0x40b)+_0x279463+':'+_0x14825e[_0x4ced52(0x526)],0x7d0,()=>{const _0xb2b5da=_0x4ced52;try{return _0x3dc460[_0xb2b5da(0x4d5)]?.['list']?.(_0x14825e[_0xb2b5da(0x526)],_0x3dc460[_0xb2b5da(0x268)](_0x279463))?.[_0xb2b5da(0x4aa)](_0x498adb=>_0x498adb[_0xb2b5da(0x392)])??[];}catch{return[];}});default:return[];}}function _0x430056(_0x156c4a,_0x593f2f,_0x317bed,_0x7ca2da){const _0x58c837=_0x1f879c,_0x19af39=_0x156c4a[_0x58c837(0x3c3)]('/'),_0x14a3c5=_0x156c4a['split']('/'),_0x1c405a=_0x19af39?_0x14a3c5[_0x58c837(0x352)](0x0,-0x1):_0x14a3c5[_0x58c837(0x352)](0x0,-0x1),_0x3592d0=_0x19af39?'':_0x14a3c5[_0x14a3c5['length']-0x1];let _0x3952f7=_0x593f2f;const _0x31bf55={};for(const _0x1bd5d9 of _0x1c405a){if(!_0x1bd5d9)continue;if(_0x3952f7[_0x58c837(0x534)]['has'](_0x1bd5d9))_0x3952f7=_0x3952f7[_0x58c837(0x534)][_0x58c837(0x2c6)](_0x1bd5d9);else{if(_0x3952f7[_0x58c837(0x590)])_0x31bf55[_0x3952f7['dynamic'][_0x58c837(0x528)]]=_0x1bd5d9,_0x3952f7=_0x3952f7['dynamic']['node'];else return[];}}const _0x24aa05=_0x1c405a['filter'](Boolean),_0x4b7f3d=_0x24aa05[_0x58c837(0x533)]?_0x24aa05[_0x58c837(0x482)]('/')+'/':'',_0x30153b=[];for(const [_0x21672a]of _0x3952f7[_0x58c837(0x534)]){if(_0x21672a[_0x58c837(0x447)](_0x3592d0))_0x30153b[_0x58c837(0x2da)](_0x4b7f3d+_0x21672a);}if(_0x3952f7[_0x58c837(0x590)])for(const _0xf57a2d of _0x4bfef5(_0x3952f7[_0x58c837(0x590)][_0x58c837(0x528)],_0x31bf55,_0x317bed,_0x7ca2da)){if(String(_0xf57a2d)[_0x58c837(0x447)](_0x3592d0))_0x30153b[_0x58c837(0x2da)](_0x4b7f3d+_0xf57a2d);}return _0x30153b[_0x58c837(0x352)](0x0,0x64);}const _0x16bddb=[_0x1f879c(0x471),_0x1f879c(0x23e),_0x1f879c(0x268),_0x1f879c(0x3a8),_0x1f879c(0x4ec),_0x1f879c(0x201),_0x1f879c(0x24f),'open',_0x1f879c(0x20f),_0x1f879c(0x384)];function _0x1ebcda(_0x3d8397,_0x1b39ce,_0x315c05){return function _0x2fd901(_0x5b5a5d){const _0x5c1d47=_0x8225;try{const _0x185be9=_0x5b5a5d['search'](/\s[{[]/),_0x432fda=_0x185be9>=0x0?_0x5b5a5d[_0x5c1d47(0x352)](0x0,_0x185be9):_0x5b5a5d,_0x17607f=_0x432fda[_0x5c1d47(0x4ba)]();if(!_0x17607f){const _0x4457d2=[..._0x16bddb,...[..._0x3d8397['children'][_0x5c1d47(0x519)]()]][_0x5c1d47(0x352)](0x0,0x64);return[_0x4457d2,''];}const _0x47535d=_0x17607f[_0x5c1d47(0x41b)](/\s+/),_0x24c9f1=_0x47535d[0x0],_0x494ad6=_0x24c9f1['toUpperCase']();if(_0x47535d['length']===0x1){const _0x3b2ec7=_0x24c9f1['toLowerCase'](),_0x316da3=_0x16bddb[_0x5c1d47(0x1c1)](_0x38c119=>_0x38c119[_0x5c1d47(0x447)](_0x3b2ec7)),_0xdcb13f=_0x430056(_0x24c9f1,_0x3d8397,_0x1b39ce,_0x315c05),_0x308ed7=[...new Set([..._0x316da3,..._0xdcb13f])][_0x5c1d47(0x352)](0x0,0x64);return[_0x308ed7,_0x24c9f1];}if(_0x3f33fc['has'](_0x494ad6)&&_0x47535d[_0x5c1d47(0x533)]===0x2){const _0xe8775f=_0x47535d[0x1],_0x56aa47=_0x430056(_0xe8775f,_0x3d8397,_0x1b39ce,_0x315c05);return[_0x56aa47[_0x5c1d47(0x4aa)](_0x43ea90=>_0x24c9f1+'\x20'+_0x43ea90),_0x24c9f1+'\x20'+_0xe8775f];}if(!_0x3f33fc[_0x5c1d47(0x1ed)](_0x494ad6)&&_0x47535d[_0x5c1d47(0x533)]>0x1){const _0x4f54f2=_0x430056(_0x24c9f1,_0x3d8397,_0x1b39ce,_0x315c05),_0x107f08='\x20'+_0x47535d[_0x5c1d47(0x352)](0x1)['join']('\x20');return[_0x4f54f2[_0x5c1d47(0x4aa)](_0x1de7fe=>_0x1de7fe+_0x107f08),_0x24c9f1+_0x107f08];}return[[],_0x5b5a5d];}catch{return[[],_0x5b5a5d];}};}async function _0x5003aa(_0x5da612,_0x1ac530){const _0x598625=_0x1f879c,_0x433ff0={'enabled':!![],'level':_0x1ac530[_0x598625(0x503)]??_0x598625(0x480)},_0x514d76={'env':_0x598625(0x3c2)},_0x5e9f46={'current':null},_0x1eb03c=_0x211f3d(_0x5da612['http'][_0x598625(0x3b4)]()),_0x5b9e7e=_0x1ebcda(_0x1eb03c,_0x5da612,_0x514d76);_0x5da612['log']['attach'](_0xd25fb9=>{const _0x5c094e=_0x598625;if(!_0x433ff0[_0x5c094e(0x13c)])return;_0x20c370(_0xd25fb9,_0x433ff0[_0x5c094e(0x18e)]),_0x5e9f46[_0x5c094e(0x5d2)]?.['prompt'](!![]);}),_0x324c34(_0x5da612,_0x1ac530);const _0x423cf5=_0x5f0e56[_0x598625(0x3bf)]({'input':process[_0x598625(0x45b)],'output':process[_0x598625(0x23a)],'terminal':!![],'completer':_0x5b9e7e,'prompt':_0x42c1d7(_0x514d76),'historySize':_0x553c10});try{const _0x1d51cd=_0x230a39[_0x598625(0x102)](_0x13561f,'utf8')[_0x598625(0x41b)]('\x0a')[_0x598625(0x1c1)](Boolean);_0x423cf5[_0x598625(0x153)]=_0x1d51cd[_0x598625(0x553)]()[_0x598625(0x352)](0x0,_0x553c10);}catch{}_0x5e9f46[_0x598625(0x5d2)]=_0x423cf5,_0x423cf5['on']('line',async _0x39f38a=>{const _0x1f6a7a=_0x598625;_0x423cf5[_0x1f6a7a(0x562)]();try{await _0x339555(_0x39f38a,_0x5da612,_0x1ac530,_0x433ff0,_0x514d76,_0x423cf5);}catch(_0x4a637f){console[_0x1f6a7a(0x209)](_0x4216c2(_0x111821['red'],_0x1f6a7a(0x172)+_0x4a637f[_0x1f6a7a(0x58f)]));}finally{_0x423cf5[_0x1f6a7a(0x3fa)](),_0x423cf5[_0x1f6a7a(0x50d)]();}}),_0x423cf5['on'](_0x598625(0x5e4),()=>{const _0x1b87c7=_0x598625;try{const _0x28627b=[..._0x423cf5[_0x1b87c7(0x153)]][_0x1b87c7(0x553)]()[_0x1b87c7(0x1c1)](Boolean)[_0x1b87c7(0x352)](0x0,_0x553c10);_0x230a39[_0x1b87c7(0x198)](_0x13561f,_0x28627b[_0x1b87c7(0x482)]('\x0a')+'\x0a');}catch{}_0x3345bc(_0x5da612,0x0);});let _0x5cf358=0x0;return process['on'](_0x598625(0x125),()=>{const _0x379a1e=_0x598625;if(_0x23be41)return _0x3345bc(_0x5da612,0x82,_0x379a1e(0x125));if(_0x423cf5[_0x379a1e(0x3d9)]==='')return _0x3345bc(_0x5da612,0x0,'SIGINT');const _0x42ca47=Date[_0x379a1e(0x1ad)]();if(_0x42ca47-_0x5cf358<0x5dc)return _0x3345bc(_0x5da612,0x0,_0x379a1e(0x19c));_0x5cf358=_0x42ca47,process[_0x379a1e(0x23a)][_0x379a1e(0x476)]('\x0a'),_0x423cf5[_0x379a1e(0x1c5)](0x0),_0x423cf5['prompt'](),process[_0x379a1e(0x4bc)]['write'](_0x4216c2(_0x111821['dim'],_0x379a1e(0x137)));}),process['on'](_0x598625(0x27a),()=>_0x3345bc(_0x5da612,0x0,_0x598625(0x27a))),process['on'](_0x598625(0x4e9),()=>_0x3345bc(_0x5da612,0x0,_0x598625(0x4e9))),_0x423cf5[_0x598625(0x50d)](),_0x423cf5;}return okdbShell={'start':_0x5003aa,'colorLog':_0x20c370,'lenientParse':_0x400db9,'_splitLine':_0x2bf7f1,'_formatRouteHelpLines':_0x541f27,'_routeSummary':_0x58d325,'_routeTags':_0x3e02e8},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3f6e93=_0x4d1b8e;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x51c9a8,performance:_0x120223}=require$$0$4,_0x46189f=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3f6e93(0x5e6),_0x2b0df5=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x56edb9=process.env.OKDB_LOOP_LAG_ALL==='1',_0x49cba3=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x265c13{constructor(){const _0x49af4f=_0x3f6e93;this[_0x49af4f(0x13c)]=_0x46189f,this[_0x49af4f(0x124)]=new Map(),this['_h']=null,this[_0x49af4f(0x1a8)]=null,this['_started']=![],this[_0x49af4f(0x26f)]=(_0x4aefa7,_0x38576f)=>process[_0x49af4f(0x4bc)]['write'](_0x4aefa7+(_0x38576f?'\x20'+JSON[_0x49af4f(0x33c)](_0x38576f):'')+'\x0a');}[_0x3f6e93(0x1ad)](){const _0x397030=_0x3f6e93;return _0x120223[_0x397030(0x1ad)]();}[_0x3f6e93(0x516)](_0x32ab01){const _0x57c52b=_0x3f6e93;if(typeof _0x32ab01===_0x57c52b(0x59d))this[_0x57c52b(0x26f)]=_0x32ab01;}[_0x3f6e93(0x12d)](_0x17ff48,_0x243904,_0x7dfd39){const _0x3b5a7c=_0x3f6e93;if(!this[_0x3b5a7c(0x13c)])return;let _0x1d2104=this[_0x3b5a7c(0x124)][_0x3b5a7c(0x2c6)](_0x17ff48);!_0x1d2104&&(_0x1d2104={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3b5a7c(0x124)]['set'](_0x17ff48,_0x1d2104)),_0x1d2104['ms']+=_0x243904,_0x1d2104[_0x3b5a7c(0x215)]+=0x1,_0x243904>_0x1d2104[_0x3b5a7c(0x452)]&&(_0x1d2104[_0x3b5a7c(0x452)]=_0x243904,_0x1d2104['maxExtra']=_0x7dfd39||'');}[_0x3f6e93(0x3b1)](_0x561b89){const _0x55e769=_0x3f6e93;if(!this[_0x55e769(0x13c)]||this[_0x55e769(0x5e7)])return;this[_0x55e769(0x5e7)]=!![];if(_0x561b89)this['_log']=_0x561b89;this['_h']=_0x51c9a8({'resolution':0xa}),this['_h'][_0x55e769(0x375)](),this['_timer']=setInterval(()=>this[_0x55e769(0x5a9)](),_0x2b0df5);if(this['_timer'][_0x55e769(0x2e3)])this[_0x55e769(0x1a8)][_0x55e769(0x2e3)]();}[_0x3f6e93(0x358)](_0x5b32b8){const _0x3490ce=_0x3f6e93;if(!this[_0x3490ce(0x351)])this[_0x3490ce(0x351)]=new Set();this[_0x3490ce(0x351)][_0x3490ce(0x2ed)](_0x5b32b8);if(!this[_0x3490ce(0x5e7)])this[_0x3490ce(0x39d)]();}[_0x3f6e93(0x322)](_0xdf34f){const _0x21d907=_0x3f6e93;this['_windowCbs']?.[_0x21d907(0x1d0)](_0xdf34f);}[_0x3f6e93(0x39d)](){const _0x5c863a=_0x3f6e93;if(this[_0x5c863a(0x52c)])return;this[_0x5c863a(0x52c)]=!![];!this['_h']&&(this['_h']=_0x51c9a8({'resolution':0xa}),this['_h']['enable']());const _0x45a259=_0x2b0df5;this['_admissionTimer']=setInterval(()=>{const _0x55dd86=_0x5c863a,_0x919312=this['_h'];if(!_0x919312)return;const _0x228331=_0x919312[_0x55dd86(0x537)](0x63)/0xf4240,_0x5b56da=_0x919312[_0x55dd86(0x31b)]/0xf4240,_0x5d6269=_0x919312[_0x55dd86(0x5cf)]/0xf4240;_0x919312['reset']();if(this['_windowCbs'])for(const _0x283840 of this[_0x55dd86(0x351)]){try{_0x283840({'p99Ms':_0x228331,'maxMs':_0x5b56da,'meanMs':_0x5d6269,'reportMs':_0x45a259});}catch{}}},_0x45a259);if(this['_admissionTimer'][_0x5c863a(0x2e3)])this[_0x5c863a(0x4b3)][_0x5c863a(0x2e3)]();}[_0x3f6e93(0x5a9)](){const _0x2ddb5e=_0x3f6e93,_0x168be4=this['_h'],_0x4d8d8a=_0x168be4[_0x2ddb5e(0x31b)]/0xf4240,_0xc4c6d0=_0x168be4['percentile'](0x63)/0xf4240,_0x1753da=_0x168be4[_0x2ddb5e(0x5cf)]/0xf4240;_0x168be4[_0x2ddb5e(0x4d4)]();const _0x471e8a=[...this[_0x2ddb5e(0x124)][_0x2ddb5e(0x320)]()]['map'](([_0xc63a40,_0x44e096])=>({'label':_0xc63a40,..._0x44e096}))[_0x2ddb5e(0x176)]((_0x5b19f8,_0x3908c2)=>_0x3908c2['ms']-_0x5b19f8['ms'])[_0x2ddb5e(0x352)](0x0,0x8);this['_buckets'][_0x2ddb5e(0x108)]();const _0x1448dd=_0x471e8a['reduce']((_0x49c588,_0x4dbc41)=>_0x49c588+_0x4dbc41['ms'],0x0),_0x3b8b5a=_0x471e8a[_0x2ddb5e(0x4aa)](_0x463b0d=>_0x463b0d[_0x2ddb5e(0x492)]+'='+_0x463b0d['ms'][_0x2ddb5e(0x5de)](0x0)+_0x2ddb5e(0x2ce)+_0x463b0d[_0x2ddb5e(0x215)]+(_0x463b0d['maxMs']>0x5?_0x2ddb5e(0x42f)+_0x463b0d['maxMs']['toFixed'](0x0)+'ms'+(_0x463b0d[_0x2ddb5e(0x284)]?'\x20'+_0x463b0d['maxExtra']:'')+')':''));(_0x56edb9||_0x4d8d8a>=_0x49cba3)&&this[_0x2ddb5e(0x26f)](_0x2ddb5e(0x330)+_0x2b0df5+'ms\x20max='+_0x4d8d8a[_0x2ddb5e(0x5de)](0x0)+_0x2ddb5e(0x3fd)+_0xc4c6d0['toFixed'](0x0)+'ms\x20mean='+_0x1753da[_0x2ddb5e(0x5de)](0x0)+_0x2ddb5e(0x35f)+_0x1448dd[_0x2ddb5e(0x5de)](0x0)+'ms'+(_0x3b8b5a[_0x2ddb5e(0x533)]?_0x2ddb5e(0x3b3)+_0x3b8b5a['join']('\x20\x20'):''),{'feature':_0x2ddb5e(0x1b4)});if(this[_0x2ddb5e(0x351)])for(const _0x282880 of this['_windowCbs']){try{_0x282880({'p99Ms':_0xc4c6d0,'maxMs':_0x4d8d8a,'meanMs':_0x1753da,'reportMs':_0x2b0df5});}catch{}}}[_0x3f6e93(0x5b4)](){const _0x5c1ffd=_0x3f6e93;if(this[_0x5c1ffd(0x1a8)])clearInterval(this[_0x5c1ffd(0x1a8)]);if(this['_h'])this['_h']['disable']();this['_timer']=null,this['_h']=null,this[_0x5c1ffd(0x5e7)]=![];}}const _0x245cb6=new _0x265c13();if(_0x245cb6['enabled'])_0x245cb6[_0x3f6e93(0x3b1)]();return okdbLoopMonitor={'LOOP':_0x245cb6},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x26ec76=require$$1$1,_0xbbf61=require$$1;let _0x33e2c9,_0x22f86b,_0x4693da,_0x348af9,_0x31c38f,_0x4a501b,_0x38955e,_0xb09d22=![];const _0x8e6c5f=new Set();let _0x42d944=null;const _0x25cc5a=new Map();function _0x507596(){const _0x50e673=_0x8225;if(_0x33e2c9!==undefined)return _0x33e2c9;_0x33e2c9=process.env.OKDB_DIAG==='1';if(!_0x33e2c9)return![];_0x22f86b=process.env.OKDB_DIAG_STACK==='1',_0x348af9=Math[_0x50e673(0x31b)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x4693da=new Array(_0x348af9),_0x31c38f=0x0,_0x4a501b=0x0,_0x38955e=process.env.OKDB_DIAG_DIR||null;if(_0x38955e)try{_0x26ec76[_0x50e673(0x58e)](_0x38955e,{'recursive':!![]});}catch{}return!![];}function _0x449fe8(){return _0x33e2c9===undefined?_0x507596():_0x33e2c9;}function _0x235d1e(_0x153823,_0xe7b5ae){const _0x190944=_0x8225;if(_0x33e2c9===undefined?!_0x507596():!_0x33e2c9)return;let _0x454397;if(_0x22f86b){const _0x19e09d=new Error()[_0x190944(0x119)]||'';_0x454397=_0x19e09d['split']('\x0a')[_0x190944(0x352)](0x3)[_0x190944(0x4aa)](_0x1f86fb=>_0x1f86fb[_0x190944(0x34b)]())[_0x190944(0x1c1)](Boolean)['slice'](0x0,0x8);}_0x4693da[_0x31c38f]={'seq':_0x4a501b++,'t':Date[_0x190944(0x1ad)](),'env':_0x153823,'kind':_0xe7b5ae||_0x190944(0x4e8),'stack':_0x454397},_0x31c38f=(_0x31c38f+0x1)%_0x348af9;}function _0x2d2fff(_0x35df02){const _0x1b5c41=_0x8225,_0x5ca9a0=[];for(let _0x4a551c=0x0;_0x4a551c<_0x348af9;_0x4a551c++){const _0x16bb02=_0x4693da[(_0x31c38f-0x1-_0x4a551c+_0x348af9*0x2)%_0x348af9];if(!_0x16bb02)continue;_0x5ca9a0[_0x1b5c41(0x2da)](_0x16bb02);if(_0x5ca9a0[_0x1b5c41(0x533)]>=_0x35df02)break;}return _0x5ca9a0;}function _0x4caee1(_0x630912){const _0x320689=_0x8225;try{process[_0x320689(0x4bc)][_0x320689(0x476)](_0x630912+'\x0a');}catch{}if(_0x38955e)try{_0x26ec76[_0x320689(0x2d9)](_0xbbf61[_0x320689(0x482)](_0x38955e,'okdb-diag.'+process[_0x320689(0x240)]+'.log'),_0x630912+'\x0a');}catch{}}function _0x4ebb0d(_0x4ca39c){const _0x265345=_0x8225,_0x539f8e=_0x2d2fff(_0x4ca39c);if(!_0x539f8e[_0x265345(0x533)])return _0x265345(0x30f);const _0x5bcac3=Date[_0x265345(0x1ad)]();return _0x539f8e[_0x265345(0x4aa)](_0x2215b0=>{const _0x1135f1=_0x265345,_0x24f96e=_0x1135f1(0x4b8)+_0x2215b0['seq']+'\x20-'+(_0x5bcac3-_0x2215b0['t'])+_0x1135f1(0x460)+_0x2215b0[_0x1135f1(0x268)]+'\x20'+_0x2215b0[_0x1135f1(0x248)];return _0x2215b0[_0x1135f1(0x119)]&&_0x2215b0[_0x1135f1(0x119)][_0x1135f1(0x533)]?_0x24f96e+_0x1135f1(0x2af)+_0x2215b0[_0x1135f1(0x119)][_0x1135f1(0x482)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x24f96e;})[_0x265345(0x482)]('\x0a');}function _0x5dd614(_0x4b4312,_0x4a7d53){const _0x4a80b9=_0x8225,_0x35ff45=_0x4a80b9(0x478)+_0x4b4312+_0x4a80b9(0x43b)+new Date()[_0x4a80b9(0x431)]()+_0x4a80b9(0x1b0)+process[_0x4a80b9(0x240)]+_0x4a80b9(0x396),_0x21ceaf=[_0x35ff45,_0x4a80b9(0x3c8)+(_0x4a7d53&&_0x4a7d53[_0x4a80b9(0x119)]?_0x4a7d53[_0x4a80b9(0x119)]['split']('\x0a')[0x0]:_0x4a7d53),'recent\x20writes\x20(newest\x20first)'+(_0x22f86b?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x4ebb0d(0x18),_0x4afcc4(),'='[_0x4a80b9(0x300)](_0x35ff45[_0x4a80b9(0x533)]-0x1)];_0x4caee1(_0x21ceaf[_0x4a80b9(0x482)]('\x0a'));}function _0xd54903(_0x3de658){const _0x4f64c2=_0x8225;if(!_0x449fe8())return;const _0x1c8caa=String(_0x3de658&&_0x3de658['message']||_0x3de658||''),_0x14c384=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4f64c2(0x5dc)](_0x1c8caa);_0x5dd614(_0x14c384?_0x4f64c2(0x49e):_0x4f64c2(0x5bd),_0x3de658);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x14c384)return;try{console[_0x4f64c2(0x209)](_0x3de658&&_0x3de658[_0x4f64c2(0x119)]?_0x3de658['stack']:_0x3de658);}catch{}process[_0x4f64c2(0x20f)](0x1);}function _0x40b475(_0x382cd0){const _0x5a2bd8=_0x8225;if(!_0x449fe8())return;const _0x149ae3=String(_0x382cd0&&_0x382cd0['message']||_0x382cd0||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5a2bd8(0x5dc)](_0x149ae3)&&_0x5dd614(_0x5a2bd8(0x35d),_0x382cd0);}function _0x4afcc4(){const _0x40ea42=_0x8225,_0x1c9087=[_0x40ea42(0x513)];let _0x4685a3=![];for(const _0x1cb04c of _0x8e6c5f){const _0x25b7b2=_0x1cb04c&&_0x1cb04c[_0x40ea42(0x1da)];if(!_0x25b7b2)continue;for(const [_0xd7f7ad,_0x223dd2]of _0x25b7b2){const _0x1e45d3=_0x223dd2&&_0x223dd2[_0x40ea42(0x333)]&&_0x223dd2['_coordinator'][_0x40ea42(0x54c)];if(!_0x1e45d3)continue;let _0x7b923a,_0x2b627e;try{_0x7b923a=Atomics[_0x40ea42(0x26e)](_0x1e45d3,0x0),_0x2b627e=Atomics[_0x40ea42(0x26e)](_0x1e45d3,0x1);}catch{continue;}if(_0x7b923a===0x0)continue;_0x4685a3=!![];const _0x1b3f4d=_0x7b923a>0x0?_0x40ea42(0x55e):_0x40ea42(0x3d8),_0x187644=Date[_0x40ea42(0x1ad)]()-Math[_0x40ea42(0x3a1)](_0x7b923a)*0x3e8,_0x210bd4=((()=>{const _0x12e703=_0x40ea42;try{return _0x223dd2[_0x12e703(0x395)]&&_0x223dd2['_writer'][_0x12e703(0x126)]?_0x223dd2[_0x12e703(0x395)][_0x12e703(0x126)]():null;}catch{return null;}})());_0x1c9087[_0x40ea42(0x2da)](_0x40ea42(0x4f9)+_0xd7f7ad+'\x20phase='+_0x1b3f4d+_0x40ea42(0x563)+_0x187644+'ms\x20activeWriters='+_0x2b627e+(_0x210bd4?_0x40ea42(0x246)+_0x210bd4[_0x40ea42(0x2a9)]+_0x40ea42(0x5b3)+_0x210bd4[_0x40ea42(0x4cc)]+_0x40ea42(0x1b6)+_0x210bd4[_0x40ea42(0x33a)]+'}':''));}}if(!_0x4685a3)_0x1c9087['push'](_0x40ea42(0x47e));return _0x1c9087[_0x40ea42(0x482)]('\x0a');}function _0x122a5f(){const _0x28f901=_0x8225;if(!_0x449fe8())return;const _0x227824=Math[_0x28f901(0x31b)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x1da81a=Date['now']();for(const _0x3e2d4a of _0x8e6c5f){const _0x5435d4=_0x3e2d4a&&_0x3e2d4a[_0x28f901(0x1da)];if(!_0x5435d4)continue;for(const [_0x333938,_0x44c402]of _0x5435d4){const _0x3641a1=_0x44c402&&_0x44c402['_coordinator']&&_0x44c402[_0x28f901(0x333)][_0x28f901(0x54c)];if(!_0x3641a1)continue;let _0x1168c7;try{_0x1168c7=Atomics[_0x28f901(0x26e)](_0x3641a1,0x0);}catch{continue;}const _0x3bc14b=_0x3e2d4a[_0x28f901(0x550)]+'|'+_0x333938;if(_0x1168c7<=0x0){_0x25cc5a['delete'](_0x3bc14b);continue;}const _0x2d7e5d=_0x1da81a-_0x1168c7*0x3e8,_0x5ae004=_0x25cc5a['get'](_0x3bc14b);if(_0x2d7e5d<_0x227824)continue;if(_0x5ae004&&_0x1da81a-_0x5ae004[_0x28f901(0x170)]<_0x227824)continue;_0x25cc5a[_0x28f901(0x455)](_0x3bc14b,{'firstTs':_0x5ae004?_0x5ae004[_0x28f901(0x251)]:_0x1168c7,'dumpedAt':_0x1da81a});const _0x337bd4='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x2d7e5d+'ms\x20on\x20env='+_0x333938+_0x28f901(0x43b)+new Date()[_0x28f901(0x431)]()+'\x20pid='+process[_0x28f901(0x240)]+_0x28f901(0x396);_0x4caee1([_0x337bd4,_0x4afcc4(),'='[_0x28f901(0x300)](_0x337bd4[_0x28f901(0x533)]-0x1)][_0x28f901(0x482)]('\x0a'));}}}function _0x903822(){const _0x154fbb=_0x8225;if(!_0x449fe8()||_0xb09d22)return;_0xb09d22=!![],process[_0x154fbb(0x28b)](_0x154fbb(0x5bd),_0xd54903),process['prependListener'](_0x154fbb(0x594),_0x40b475);const _0x17ecd1=Math[_0x154fbb(0x31b)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x42d944=setInterval(_0x122a5f,_0x17ecd1);if(_0x42d944['unref'])_0x42d944['unref']();}function _0x8371a5(_0x9220ba){const _0x536f02=_0x8225;if(!_0x449fe8()||!_0x9220ba)return;_0x8e6c5f[_0x536f02(0x2ed)](_0x9220ba),_0x903822();}function _0x5e3941(_0x2d8f28){_0x8e6c5f['delete'](_0x2d8f28);}function _0x2ab7ff(){const _0x4e3c18=_0x8225;if(!_0x449fe8())return{'enabled':![],'hint':_0x4e3c18(0x247)};return{'enabled':!![],'stackCapture':!!_0x22f86b,'recentWrites':_0x2d2fff(0x10),'drain':_0x4afcc4()};}return okdbDiag={'isEnabled':_0x449fe8,'recordWrite':_0x235d1e,'installDiag':_0x903822,'registerOkdb':_0x8371a5,'unregisterOkdb':_0x5e3941,'snapshot':_0x2ab7ff},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x29b535=_0x4d1b8e;if(hasRequiredOkdbWriter)return okdbWriter[_0x29b535(0x55d)];hasRequiredOkdbWriter=0x1;const {performance:_0x300725}=require$$0$5,_0x582b1f=requireOkdbDiag(),_0x294986=process.env.OKDB_COMMIT_MODE==='sync';class _0x275c15{constructor(_0x2dbe49){const _0x1f3aee=_0x29b535;this['env']=_0x2dbe49,this['_inflight']=new Set(),this['_enqueuedAt']=new Map(),this[_0x1f3aee(0x1e7)]=0x0,this[_0x1f3aee(0x5be)]=[],this[_0x1f3aee(0x500)]=[],this[_0x1f3aee(0x144)]=Math[_0x1f3aee(0x31b)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1f3aee(0x168)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0;}async['transaction'](_0x5f4779,_0x344a01){const _0x50f2ab=_0x29b535;if(_0x582b1f[_0x50f2ab(0x363)]())_0x582b1f[_0x50f2ab(0x344)](this[_0x50f2ab(0x268)]?.[_0x50f2ab(0x392)],_0x344a01);if(this[_0x50f2ab(0x448)]){const _0x2e9a0c=new Error(_0x50f2ab(0x21b));_0x2e9a0c[_0x50f2ab(0x29d)]='ENV_CLOSING_RETRY';throw _0x2e9a0c;}if(this['_highWater']>0x0){let _0x378993=![];while(this['_outstanding']>=this[_0x50f2ab(0x144)]&&!this[_0x50f2ab(0x448)]){!_0x378993&&(_0x378993=!![],this['_bpParkedTotal']++),await new Promise(_0x166f56=>this[_0x50f2ab(0x227)][_0x50f2ab(0x2da)](_0x166f56));}if(this[_0x50f2ab(0x448)]){const _0x53eb08=new Error(_0x50f2ab(0x21b));_0x53eb08[_0x50f2ab(0x29d)]='ENV_CLOSING_RETRY';throw _0x53eb08;}}this['_outstanding']++;const _0x1d3ea8=this[_0x50f2ab(0x268)][_0x50f2ab(0x333)];if(_0x1d3ea8)await _0x1d3ea8[_0x50f2ab(0x53e)]();if(this[_0x50f2ab(0x448)]){if(_0x1d3ea8)_0x1d3ea8['afterWrite']();this[_0x50f2ab(0x168)]--;if(this['_bpWaiters'][_0x50f2ab(0x533)]&&this[_0x50f2ab(0x168)]<this['_highWater'])this[_0x50f2ab(0x227)][_0x50f2ab(0x177)]()();const _0x2ec8c0=new Error(_0x50f2ab(0x21b));_0x2ec8c0[_0x50f2ab(0x29d)]='ENV_CLOSING_RETRY';throw _0x2ec8c0;}const _0x3c8096=_0x300725['now']();if(_0x294986)try{const _0x6daea8=this[_0x50f2ab(0x268)]['db'][_0x50f2ab(0x549)](_0x5f4779);this[_0x50f2ab(0x1e7)]++;if(this['_durs'][_0x50f2ab(0x2da)](_0x300725[_0x50f2ab(0x1ad)]()-_0x3c8096)>0x100)this['_durs']['shift']();if(this[_0x50f2ab(0x500)][_0x50f2ab(0x2da)](_0x300725[_0x50f2ab(0x1ad)]())>0x800)this['_done'][_0x50f2ab(0x177)]();return _0x6daea8;}finally{this[_0x50f2ab(0x168)]--;if(this[_0x50f2ab(0x227)][_0x50f2ab(0x533)]&&this[_0x50f2ab(0x168)]<this[_0x50f2ab(0x144)])this[_0x50f2ab(0x227)][_0x50f2ab(0x177)]()();if(_0x1d3ea8)_0x1d3ea8[_0x50f2ab(0x20a)]();}const _0x24bc17=this[_0x50f2ab(0x268)]['db'][_0x50f2ab(0x27d)](_0x5f4779);this[_0x50f2ab(0x50c)][_0x50f2ab(0x2ed)](_0x24bc17),this[_0x50f2ab(0x3b6)]['set'](_0x24bc17,_0x3c8096);const _0x3cfb50=()=>{const _0x3ad443=_0x50f2ab;this[_0x3ad443(0x50c)][_0x3ad443(0x1d0)](_0x24bc17),this[_0x3ad443(0x3b6)]['delete'](_0x24bc17),this[_0x3ad443(0x1e7)]++,this[_0x3ad443(0x168)]--;this['_bpWaiters'][_0x3ad443(0x533)]&&this['_outstanding']<this[_0x3ad443(0x144)]&&this[_0x3ad443(0x227)][_0x3ad443(0x177)]()();if(this[_0x3ad443(0x5be)]['push'](_0x300725[_0x3ad443(0x1ad)]()-_0x3c8096)>0x100)this['_durs']['shift']();if(this[_0x3ad443(0x500)][_0x3ad443(0x2da)](_0x300725[_0x3ad443(0x1ad)]())>0x800)this[_0x3ad443(0x500)]['shift']();};_0x24bc17[_0x50f2ab(0x2f9)](_0x3cfb50,_0x3cfb50);try{return await _0x24bc17;}finally{if(_0x1d3ea8)_0x1d3ea8['afterWrite']();}}['status'](){const _0x14cd93=_0x29b535,_0x1ef209=_0x300725[_0x14cd93(0x1ad)]();let _0x286d7d=0x0;for(const _0x5c9c22 of this[_0x14cd93(0x3b6)][_0x14cd93(0x38b)]()){const _0x1489dc=_0x1ef209-_0x5c9c22;if(_0x1489dc>_0x286d7d)_0x286d7d=_0x1489dc;}let _0x3f97db=0x0;for(let _0x329c8e=this[_0x14cd93(0x500)][_0x14cd93(0x533)]-0x1;_0x329c8e>=0x0;_0x329c8e--){if(_0x1ef209-this[_0x14cd93(0x500)][_0x329c8e]>0x3e8)break;_0x3f97db++;}let _0x5176ef=0x0;if(this[_0x14cd93(0x5be)]['length']){const _0x27924f=[...this[_0x14cd93(0x5be)]]['sort']((_0x43ccaa,_0x3766fe)=>_0x43ccaa-_0x3766fe);_0x5176ef=_0x27924f[Math[_0x14cd93(0x3ba)](_0x27924f[_0x14cd93(0x533)]-0x1,Math['floor'](_0x27924f['length']*0.99))];}return{'depth':this[_0x14cd93(0x50c)][_0x14cd93(0x4ea)],'oldestPendingMs':Math['round'](_0x286d7d),'committed':this[_0x14cd93(0x1e7)],'commitsPerSec':_0x3f97db,'commitP99Ms':Math['round'](_0x5176ef),'parkedNow':this[_0x14cd93(0x227)][_0x14cd93(0x533)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x14cd93(0x144)]};}[_0x29b535(0x54b)](){const _0x35d4d6=_0x29b535,_0x28953c=_0x300725[_0x35d4d6(0x1ad)]();return[...this[_0x35d4d6(0x3b6)][_0x35d4d6(0x38b)]()]['map'](_0xaa4fa4=>Math[_0x35d4d6(0x146)](_0x28953c-_0xaa4fa4))[_0x35d4d6(0x176)]((_0x4dae6e,_0x51e067)=>_0x51e067-_0x4dae6e);}[_0x29b535(0x4cb)](){const _0x49a73b=_0x29b535;this[_0x49a73b(0x448)]=!![];for(const _0x4dbdec of this['_bpWaiters'][_0x49a73b(0x334)](0x0))_0x4dbdec();}async[_0x29b535(0x4a1)](){const _0xb617a4=_0x29b535;let _0x48e550=0x0;while(this['_inflight'][_0xb617a4(0x4ea)]&&_0x48e550++<0x3e8){await Promise['allSettled']([...this[_0xb617a4(0x50c)]]);}}async['put'](_0x7fc149,_0x1cf68a,_0x143005,_0x29c136){const _0x1bb184=_0x29b535;return this[_0x1bb184(0x13e)](()=>{const _0x439abe=_0x1bb184;if(_0x29c136===undefined)_0x7fc149[_0x439abe(0x2e8)](_0x1cf68a,_0x143005);else _0x7fc149[_0x439abe(0x2e8)](_0x1cf68a,_0x143005,_0x29c136);},_0x1bb184(0x427));}async[_0x29b535(0x224)](_0x150192,_0x5b1d31){const _0x97cd8d=_0x29b535;return this[_0x97cd8d(0x13e)](()=>_0x150192[_0x97cd8d(0x39e)](_0x5b1d31),_0x97cd8d(0x190));}}async function _0x267184(_0x57ba40,_0x29c829){const _0x9596f8=_0x29b535;if(_0x29c829==null)_0x29c829=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x502606=_0x57ba40?.['flushed'];if(!_0x502606||typeof _0x502606[_0x9596f8(0x2f9)]!==_0x9596f8(0x59d))return;await Promise[_0x9596f8(0x1f4)]([Promise['resolve'](_0x502606)['catch'](()=>{}),new Promise(_0x355d97=>{const _0x3d676f=_0x9596f8,_0x48953d=setTimeout(_0x355d97,_0x29c829);if(_0x48953d['unref'])_0x48953d[_0x3d676f(0x2e3)]();})]);}catch{}}function _0x592c82(_0x4bfe16){const _0x2b0c65=_0x29b535;if(_0x294986)return Promise[_0x2b0c65(0x100)]();const _0x262a53=_0x4bfe16?.[_0x2b0c65(0x32d)];return _0x262a53&&typeof _0x262a53[_0x2b0c65(0x2f9)]===_0x2b0c65(0x59d)?_0x262a53:Promise[_0x2b0c65(0x100)]();}return okdbWriter[_0x29b535(0x55d)]=_0x275c15,okdbWriter[_0x29b535(0x55d)]['flushLmdb']=_0x267184,okdbWriter[_0x29b535(0x55d)]['committed']=_0x592c82,okdbWriter[_0x29b535(0x55d)][_0x29b535(0x409)]=_0x294986,okdbWriter[_0x29b535(0x55d)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x445734=_0x4d1b8e;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4647bb=require$$0,{SYNC_COMMITS:_0xb8e913}=requireOkdbWriter(),_0x171c14=_0x445734(0x573);class _0x8fdb40{constructor(_0x4eaec5,_0x5c288a,_0x5a7861){const _0x2b4857=_0x445734;this[_0x2b4857(0x1fd)]=_0x4eaec5,this[_0x2b4857(0x266)]=_0x5c288a,this['_acquiredAt']=_0x5a7861,this['_released']=![],this[_0x2b4857(0x1fa)]=null,this[_0x2b4857(0x5ca)]=null;}[_0x445734(0x319)](){const _0x3d7b97=_0x445734;if(this[_0x3d7b97(0x24e)])return![];try{const _0x21c3b9=this['_lock'][_0x3d7b97(0x205)]()['get'](this[_0x3d7b97(0x266)]);if(!_0x21c3b9||_0x21c3b9[_0x3d7b97(0x3c1)]!==this[_0x3d7b97(0x56e)])return![];const _0x2c0e25=_0x21c3b9[_0x3d7b97(0x555)]??_0x21c3b9[_0x3d7b97(0x3c1)];if(_0x2c0e25+_0x21c3b9[_0x3d7b97(0x5ae)]<Date[_0x3d7b97(0x1ad)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x422729=_0x445734;if(this[_0x422729(0x24e)])return null;try{return this['_lock'][_0x422729(0x205)]()[_0x422729(0x2c6)](this[_0x422729(0x266)])??null;}catch{return null;}}async[_0x445734(0x317)](_0x2e20a0){const _0x31c519=_0x445734;if(this[_0x31c519(0x24e)])return;try{const _0x4c6b4a=this[_0x31c519(0x1fd)][_0x31c519(0x205)]()['get'](this[_0x31c519(0x266)]);if(!_0x4c6b4a||_0x4c6b4a[_0x31c519(0x3c1)]!==this['_acquiredAt'])return;if(_0xb8e913)this[_0x31c519(0x1fd)][_0x31c519(0x205)]()[_0x31c519(0x2e8)](this['_key'],{..._0x4c6b4a,'ttlMs':_0x4c6b4a[_0x31c519(0x5ae)]+_0x2e20a0});else await this[_0x31c519(0x1fd)]['_db']()[_0x31c519(0x346)](this[_0x31c519(0x266)],{..._0x4c6b4a,'ttlMs':_0x4c6b4a[_0x31c519(0x5ae)]+_0x2e20a0});}catch{}}async[_0x445734(0x130)](){const _0x4a8475=_0x445734;if(this[_0x4a8475(0x24e)])return;if(this[_0x4a8475(0x5ca)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x4a8475(0x1fa)]),this['_heartbeatTimer']=null,this['_released']=!![];try{const _0x3db95e=this['_lock'][_0x4a8475(0x205)]()[_0x4a8475(0x2c6)](this[_0x4a8475(0x266)]);if(_0x3db95e&&_0x3db95e[_0x4a8475(0x3c1)]===this['_acquiredAt']){if(_0xb8e913)this[_0x4a8475(0x1fd)][_0x4a8475(0x205)]()['removeSync'](this[_0x4a8475(0x266)]);else await this[_0x4a8475(0x1fd)]['_db']()[_0x4a8475(0x224)](this['_key']);}}catch{}}[_0x445734(0x150)](_0x28edf0,_0x572d1f){const _0x3e968a=_0x445734,_0x84ac5c=_0x572d1f??Math['floor'](_0x28edf0/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x4bdcb1=_0x8225;if(this[_0x4bdcb1(0x24e)])return;this[_0x4bdcb1(0x5ca)]=((async()=>{const _0x38d2e5=_0x4bdcb1;try{const _0x2a9034=this[_0x38d2e5(0x1fd)]['_db']()[_0x38d2e5(0x2c6)](this[_0x38d2e5(0x266)]);if(!_0x2a9034||_0x2a9034[_0x38d2e5(0x3c1)]!==this[_0x38d2e5(0x56e)]){this[_0x38d2e5(0x24e)]=!![],clearInterval(this[_0x38d2e5(0x1fa)]),this[_0x38d2e5(0x1fa)]=null;return;}if(_0xb8e913)this['_lock'][_0x38d2e5(0x205)]()[_0x38d2e5(0x2e8)](this['_key'],{..._0x2a9034,'updatedAt':Date[_0x38d2e5(0x1ad)]()});else await this['_lock']['_db']()[_0x38d2e5(0x346)](this[_0x38d2e5(0x266)],{..._0x2a9034,'updatedAt':Date[_0x38d2e5(0x1ad)]()});}catch{}this[_0x38d2e5(0x5ca)]=null;})());},_0x84ac5c);if(this[_0x3e968a(0x1fa)][_0x3e968a(0x2e3)])this[_0x3e968a(0x1fa)][_0x3e968a(0x2e3)]();}}class _0x4d88a6{constructor(_0x123a42,{namespace:_0x9baf12,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3d12d8=_0x445734;this['_rawDb']=_0x123a42,this[_0x3d12d8(0x439)]=_0x9baf12,this['ttlMs']=ttlMs,this[_0x3d12d8(0x139)]=heartbeatMs,this[_0x3d12d8(0x591)]=null;}[_0x445734(0x205)](){const _0x23cede=_0x445734;return!this[_0x23cede(0x591)]&&(this[_0x23cede(0x591)]=this['_rawDb']['openDB'](_0x171c14,{'dupSort':![]})),this[_0x23cede(0x591)];}[_0x445734(0x14c)](){const _0x29e6a1=_0x445734;return!this[_0x29e6a1(0x19a)]&&(this[_0x29e6a1(0x19a)]=this[_0x29e6a1(0x264)][_0x29e6a1(0x249)](_0x171c14+':want',{'dupSort':![]})),this[_0x29e6a1(0x19a)];}[_0x445734(0x266)](_0xa00a25){const _0x36a303=_0x445734;return this[_0x36a303(0x439)]+':'+_0xa00a25;}[_0x445734(0x2f2)](_0x5623e4){const _0x38ec2a=_0x445734;try{_0xb8e913?this['_wantDb']()[_0x38ec2a(0x2e8)](this[_0x38ec2a(0x266)](_0x5623e4),Date[_0x38ec2a(0x1ad)]()):this[_0x38ec2a(0x14c)]()[_0x38ec2a(0x346)](this['_key'](_0x5623e4),Date['now']())?.[_0x38ec2a(0x2f0)]?.(()=>{});}catch{}}[_0x445734(0x272)](_0x572624,_0x582eaa=0x3e8){const _0x243cde=_0x445734;try{const _0x3ce9f1=this[_0x243cde(0x14c)]()[_0x243cde(0x2c6)](this[_0x243cde(0x266)](_0x572624));return typeof _0x3ce9f1===_0x243cde(0x145)&&Date[_0x243cde(0x1ad)]()-_0x3ce9f1<_0x582eaa;}catch{return![];}}['_isStale'](_0x1b4a52){const _0x40b10f=_0x445734,_0x413e2f=_0x1b4a52[_0x40b10f(0x555)]??_0x1b4a52[_0x40b10f(0x3c1)];return _0x413e2f+_0x1b4a52['ttlMs']<Date[_0x40b10f(0x1ad)]();}static['_holderDead'](_0x46cf5f){const _0x3e67a7=_0x445734,_0x4d0c32=_0x46cf5f?.[_0x3e67a7(0x364)];if(!_0x4d0c32||typeof _0x4d0c32[_0x3e67a7(0x240)]!==_0x3e67a7(0x145))return![];if(_0x4d0c32[_0x3e67a7(0x2a4)]!==_0x4647bb[_0x3e67a7(0x2a4)]())return![];if(_0x4d0c32[_0x3e67a7(0x240)]===process['pid'])return![];try{return process['kill'](_0x4d0c32[_0x3e67a7(0x240)],0x0),![];}catch(_0x5e74ed){return _0x5e74ed[_0x3e67a7(0x29d)]===_0x3e67a7(0x495);}}async[_0x445734(0x53f)](_0x11c594,_0x2cf51c={},_0x30187e={}){const _0x3390c9=_0x445734,_0x314007=this[_0x3390c9(0x266)](_0x11c594),_0x434c64=_0x30187e[_0x3390c9(0x5ae)]??this[_0x3390c9(0x5ae)],_0x4bf86b=Date['now'](),_0xe4bc9a={'holder':{'pid':process[_0x3390c9(0x240)],'hostname':_0x4647bb[_0x3390c9(0x2a4)](),..._0x2cf51c},'acquiredAt':_0x4bf86b,'updatedAt':_0x4bf86b,'ttlMs':_0x434c64};let _0x4322df=![],_0x306ec3=null;try{const _0x3f27a8=()=>{const _0x4e693e=_0x3390c9,_0x14e554=this[_0x4e693e(0x205)]()[_0x4e693e(0x2c6)](_0x314007);if(_0x14e554&&!this[_0x4e693e(0x259)](_0x14e554)&&!_0x4d88a6[_0x4e693e(0x3d1)](_0x14e554)){const _0x5839f5=_0x2cf51c[_0x4e693e(0x22e)]!=null&&_0x14e554[_0x4e693e(0x364)][_0x4e693e(0x240)]===process[_0x4e693e(0x240)]&&_0x14e554['holder'][_0x4e693e(0x22e)]===_0x2cf51c[_0x4e693e(0x22e)];if(!_0x5839f5){_0x4322df=![],_0x306ec3=_0x14e554;return;}_0xe4bc9a[_0x4e693e(0x3c1)]<=_0x14e554['acquiredAt']&&(_0xe4bc9a[_0x4e693e(0x3c1)]=_0x14e554[_0x4e693e(0x3c1)]+0x1,_0xe4bc9a['updatedAt']=_0xe4bc9a[_0x4e693e(0x3c1)]);}this[_0x4e693e(0x205)]()[_0x4e693e(0x346)](_0x314007,_0xe4bc9a),_0x4322df=!![],_0x306ec3=_0xe4bc9a;};if(_0xb8e913)this[_0x3390c9(0x205)]()['transactionSync'](_0x3f27a8);else await this[_0x3390c9(0x205)]()[_0x3390c9(0x27d)](_0x3f27a8);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x4322df)return{'acquired':![],'handle':null,'current':_0x306ec3};const _0x2453d4=new _0x8fdb40(this,_0x314007,_0xe4bc9a[_0x3390c9(0x3c1)]);return _0x2453d4[_0x3390c9(0x150)](_0x434c64,this[_0x3390c9(0x139)]),{'acquired':!![],'handle':_0x2453d4,'current':_0x306ec3};}['inspect'](_0x4f0f8e){const _0x5e448c=_0x445734;try{return this[_0x5e448c(0x205)]()[_0x5e448c(0x2c6)](this[_0x5e448c(0x266)](_0x4f0f8e))??null;}catch{return null;}}[_0x445734(0x3cb)](){const _0x5c8360=_0x445734,_0x19660d=this['namespace']+':',_0x1e6787=[];try{for(const {key:_0x1a3cd3,value:_0x5858fb}of this[_0x5c8360(0x205)]()['getRange']({'start':_0x19660d,'end':_0x19660d+'\xff'})){typeof _0x1a3cd3===_0x5c8360(0x361)&&_0x1a3cd3[_0x5c8360(0x447)](_0x19660d)&&_0x1e6787[_0x5c8360(0x2da)]({'id':_0x1a3cd3['slice'](_0x19660d['length']),'entry':_0x5858fb});}}catch{}return _0x1e6787;}static[_0x445734(0x218)](_0x75c92c){const _0xb7c871=_0x445734,_0x36844c=[];try{const _0x3f43e6=_0x75c92c[_0xb7c871(0x249)](_0x171c14,{'dupSort':![]});for(const {key:_0x43c032,value:_0xbe181c}of _0x3f43e6['getRange']({})){if(typeof _0x43c032!=='string')continue;const _0x3573f4=_0x43c032['indexOf'](':');if(_0x3573f4<0x1)continue;_0x36844c[_0xb7c871(0x2da)]({'namespace':_0x43c032[_0xb7c871(0x352)](0x0,_0x3573f4),'id':_0x43c032['slice'](_0x3573f4+0x1),'entry':_0xbe181c});}}catch{}return _0x36844c;}}return okdbLock={'OKDBLock':_0x4d88a6},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x13c903=_0x4d1b8e;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3cc1b8=require$$0,_0x5c4d25=require$$1$2,_0x117931=require$$0$1,{LOOP:_0x4bab0e}=requireOkdbLoopMonitor(),{OKDBLock:_0xf4452}=requireOkdbLock(),{SYNC_COMMITS:_0x2a6e2f}=requireOkdbWriter(),_0x221c35=_0x13c903(0x5e5),_0x192d77='node',_0x218904=_0x13c903(0x414),_0xa9c813=_0x13c903(0x365),_0x52d9a7=(_0x1a02f6,_0x578479)=>_0x1a02f6+':'+_0x578479,_0x2c6310=(_0x85b322,_0x12f6ee)=>_0x85b322+'::'+_0x12f6ee,_0xb3d611=(_0x797fc3,_0x542a1a)=>_0x797fc3+'/'+_0x542a1a,_0x558b0f=(_0x45d6f7,_0x1f21b2)=>_0x45d6f7+'#'+_0x1f21b2,_0x46cc06=_0x5db505=>{const _0x59b21f=_0x13c903;if(_0x5db505?.[_0x59b21f(0x3ac)])return _0x5db505['processKey'];const _0x54bff2=_0x5db505?.[_0x59b21f(0x22f)];return typeof _0x54bff2===_0x59b21f(0x361)&&_0x54bff2[_0x59b21f(0x15a)]('#')?_0x54bff2[_0x59b21f(0x352)](0x0,_0x54bff2[_0x59b21f(0x430)]('#')):_0x54bff2;},_0x43ced2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x3d2f29=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0xcc38fd=_0x43ced2*0x3,_0x4348fd=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x13c903(0x31b)](0x927c0,_0xcc38fd*0x14),_0x184c86=[_0x13c903(0x578),_0x13c903(0x586),_0x13c903(0x1d8),_0x13c903(0x382),_0x13c903(0x57b),_0x13c903(0x387)];let _0x36b480=null;function _0xec9cc7(){const _0x2774ea=_0x13c903;if(_0x36b480==null)_0x36b480=Math[_0x2774ea(0x146)]((Date[_0x2774ea(0x1ad)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x36b480;}function _0x13911d(_0x4a47f4){const _0x1ed90a=_0x13c903;if(process.env.OKDB_PROCESS_KILL===_0x1ed90a(0x14f))return![];if(_0x4a47f4?.[_0x1ed90a(0x315)]?.['processes']&&typeof _0x4a47f4[_0x1ed90a(0x315)]['processes']===_0x1ed90a(0x3af)&&_0x4a47f4[_0x1ed90a(0x315)]['processes'][_0x1ed90a(0x5a5)]===![])return![];return!![];}function _0x1f2eb3(_0x2d88fe,_0x1cfc88){const _0x4a6201=_0x13c903,_0x1c2ebb=!!_0x1cfc88?.[_0x4a6201(0x33f)];switch(_0x2d88fe){case _0x4a6201(0x5b5):return{'controllable':_0x1c2ebb,'decommissionable':![],'killable':!![],'killConfirm':_0x4a6201(0x236)};case'cli':case'standalone':return{'controllable':_0x1c2ebb,'decommissionable':![],'killable':!![],'killConfirm':_0x4a6201(0x5d7)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x4a6201(0x2b3):case'queue-worker':case'fn-runner':case _0x4a6201(0x3f3):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x4a6201(0x338)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3bae55{constructor(_0x40fee2){const _0x5bbb2b=_0x13c903;this[_0x5bbb2b(0x5b9)]=_0x40fee2,this['_statusEnv']=null,this[_0x5bbb2b(0x3a3)]=null,this[_0x5bbb2b(0x473)]=new Map(),this[_0x5bbb2b(0x157)]=null,this[_0x5bbb2b(0x3c0)]=![],this[_0x5bbb2b(0x166)]=![],this[_0x5bbb2b(0x3a7)]=_0xec9cc7(),this[_0x5bbb2b(0x3ea)]=_0x52d9a7(process[_0x5bbb2b(0x240)],this[_0x5bbb2b(0x3a7)]),this[_0x5bbb2b(0x1bb)]=_0x117931[_0x5bbb2b(0x2fd)]()[_0x5bbb2b(0x352)](0x0,0x8),this['_rowKey']=_0x558b0f(this['_selfKey'],this[_0x5bbb2b(0x1bb)]),this['_startedAt']=Date[_0x5bbb2b(0x1ad)](),this['_kind']=null,this[_0x5bbb2b(0x2ff)]=null,this[_0x5bbb2b(0x436)]=null,this[_0x5bbb2b(0x546)]=null,this[_0x5bbb2b(0x1db)]=null,this['_onTick']=null,this['_lastPublishAt']=0x0,this[_0x5bbb2b(0x1c0)]={},this[_0x5bbb2b(0x289)]=new Map(),this['_lastCpuUsage']=process[_0x5bbb2b(0x120)](),this['_lastCpuAt']=Date[_0x5bbb2b(0x1ad)](),this[_0x5bbb2b(0x370)]=0x0,this[_0x5bbb2b(0x417)]=new Map();}get[_0x13c903(0x22c)](){const _0xaf6dfb=_0x13c903;return this[_0xaf6dfb(0x3ea)];}get[_0x13c903(0x292)](){const _0xddddee=_0x13c903;return this[_0xddddee(0x2a1)];}['_caps'](_0x44586f,_0x36adf8){const _0x53dd52=_0x13c903,_0x27c6a7=_0x1f2eb3(_0x44586f,_0x36adf8);if(_0x27c6a7[_0x53dd52(0x4a7)]&&!_0x13911d(this[_0x53dd52(0x5b9)]))return{..._0x27c6a7,'killable':![],'killConfirm':undefined};return _0x27c6a7;}[_0x13c903(0x5a4)](){return!!this['_statusEnv'];}[_0x13c903(0x38c)](_0x561511){const _0x265cd2=_0x13c903;Object[_0x265cd2(0x197)](this[_0x265cd2(0x1c0)],_0x561511||{});}[_0x13c903(0x49f)](_0x4fb216){const _0x571cc8=_0x13c903;if(_0x4fb216)this[_0x571cc8(0x436)]=_0x4fb216;}[_0x13c903(0x4b5)](_0x184c7a={}){const _0x4f3578=_0x13c903;return this[_0x4f3578(0x5b9)][_0x4f3578(0x282)](_0x184c7a);}[_0x13c903(0x2c5)](){const _0x25808b=_0x13c903,_0x2db121={};let _0x5c10bd=0x0,_0x40d6c3=0x0;const _0x501706=new Set();for(const _0x1a0a07 of this[_0x25808b(0x4f3)]()){_0x40d6c3++;const _0x5c5334=_0x1a0a07[_0x25808b(0x270)];if(!_0x5c5334)continue;if(_0x5c5334[_0x25808b(0x2cd)])_0x5c10bd++;for(const _0x1c0145 of _0x5c5334['processors']||[]){if(!['single','fanout'][_0x25808b(0x15a)](_0x1c0145[_0x25808b(0x418)]))continue;(_0x1c0145['state']===_0x25808b(0x4a5)||_0x1c0145['state']===_0x25808b(0x58d))&&_0x1c0145[_0x25808b(0x2ee)]&&_0x501706[_0x25808b(0x2ed)]((_0x1c0145['env']||'default')+':'+_0x1c0145[_0x25808b(0x2ee)]);const _0x1bef36=_0x1c0145['env']||_0x25808b(0x3c2);(_0x2db121[_0x1bef36]||=[])[_0x25808b(0x2da)]({..._0x1c0145,'env':_0x1bef36,'owner':{'pid':_0x1a0a07[_0x25808b(0x240)]??null,'kind':_0x1a0a07[_0x25808b(0x248)]??null}});}}for(const [_0x5a3abc,_0x45944e]of Object[_0x25808b(0x320)](_0x2db121)){for(const _0x196be9 of _0x45944e){if(_0x196be9[_0x25808b(0x418)]===_0x25808b(0x55f)&&!_0x196be9[_0x25808b(0x4ae)]){const _0x5535c2=_0x5a3abc+':'+(_0x196be9[_0x25808b(0x2ee)]??'');if(!_0x501706[_0x25808b(0x1ed)](_0x5535c2))_0x196be9['unclaimed']=!![];}}}return{'envs':_0x2db121,'policy':null,'participation':{'participating':_0x5c10bd,'total':_0x40d6c3},'source':_0x25808b(0x5cb)};}[_0x13c903(0x5c2)](){const _0x4f83c2=_0x13c903,_0x3a26e5=_0x4b9bd8=>{const _0x4fa2fc=_0x8225;if(_0x4b9bd8['state']===_0x4fa2fc(0x4a5)||_0x4b9bd8['state']===_0x4fa2fc(0x58d)||_0x4b9bd8[_0x4fa2fc(0x105)]===_0x4fa2fc(0x209))return 0x3;if(_0x4b9bd8['claimGated'])return 0x1;return 0x2;},_0x20874f=new Map();for(const _0x433ec5 of this['listNodes']()){for(const _0x4b2b1c of _0x433ec5['processing']?.[_0x4f83c2(0x33f)]||[]){const _0x2e77f5={..._0x4b2b1c,'owner':{'pid':_0x433ec5['pid']??null,'kind':_0x433ec5['kind']??null,'host':_0x433ec5[_0x4f83c2(0x597)]??null}},_0x296222=_0x4b2b1c['mode']==='single'?_0x4f83c2(0x4c5)+(_0x4b2b1c[_0x4f83c2(0x268)]??'')+'::'+(_0x4b2b1c[_0x4f83c2(0x2ee)]??_0x4b2b1c[_0x4f83c2(0x526)]??_0x4b2b1c['id']):_0x4f83c2(0x2c2)+(_0x433ec5[_0x4f83c2(0x22f)]??_0x433ec5['processKey']??'')+'::'+(_0x4b2b1c['env']??'')+'::'+_0x4b2b1c['id'],_0x25772b=_0x20874f[_0x4f83c2(0x2c6)](_0x296222);if(!_0x25772b||_0x3a26e5(_0x2e77f5)>_0x3a26e5(_0x25772b))_0x20874f['set'](_0x296222,_0x2e77f5);}}return[..._0x20874f[_0x4f83c2(0x38b)]()];}[_0x13c903(0x260)](){const _0x5d6d87=_0x13c903,_0x520c94=Date[_0x5d6d87(0x1ad)](),_0x449279=this[_0x5d6d87(0x4f3)](),_0x586a54=_0x6c940c=>Math[_0x5d6d87(0x31b)](0x0,Math[_0x5d6d87(0x146)]((_0x520c94-(_0x6c940c[_0x5d6d87(0x223)]||_0x520c94))/0x3e8)),_0x1d4b47=_0x449279[_0x5d6d87(0x106)](_0x2e777e=>_0x2e777e[_0x5d6d87(0x248)]===_0x5d6d87(0x5b5)),_0x321322=_0x449279[_0x5d6d87(0x1c1)](_0x48db81=>_0x48db81[_0x5d6d87(0x248)]===_0x5d6d87(0x2b3));if(_0x1d4b47||_0x321322['length'])return{'primary':_0x1d4b47?{'pid':_0x1d4b47[_0x5d6d87(0x240)],'uptime':_0x586a54(_0x1d4b47)}:null,'workers':_0x321322[_0x5d6d87(0x4aa)](_0x4050a8=>({'pid':_0x4050a8['pid'],'uptime':_0x586a54(_0x4050a8)})),'workersConfigured':_0x1d4b47?.['meta']?.[_0x5d6d87(0x2c1)]??_0x321322[_0x5d6d87(0x533)],'mode':_0x5d6d87(0x5cd)};const _0x406fa5=_0x449279['find'](_0x58a983=>_0x58a983[_0x5d6d87(0x248)]==='cli'||_0x58a983[_0x5d6d87(0x248)]===_0x5d6d87(0x273)||_0x58a983['kind']===_0x5d6d87(0x406)),_0x1944cc=_0x406fa5?{'pid':_0x406fa5['pid'],'uptime':_0x586a54(_0x406fa5)}:{'pid':process['pid'],'uptime':Math['max'](0x0,Math['round'](process[_0x5d6d87(0x3db)]()))};return{'primary':_0x1944cc,'workers':[_0x1944cc],'workersConfigured':0x1,'mode':_0x5d6d87(0x55f)};}[_0x13c903(0x1ea)](){const _0x22b14c=_0x13c903;return this[_0x22b14c(0x56f)]();}[_0x13c903(0x31a)](){const _0x542c91=_0x13c903,_0x26edf2=new Map();for(const _0x405fbc of this['_groupByProcess']())_0x26edf2[_0x542c91(0x455)](_0x405fbc[_0x542c91(0x3ac)],{..._0x405fbc,'children':[]});const _0x5ba6de=[];for(const _0x37f4b3 of _0x26edf2['values']()){const _0x10db80=_0x37f4b3[_0x542c91(0x21d)]?_0x26edf2['get'](_0x37f4b3[_0x542c91(0x21d)]):null;if(_0x10db80&&_0x10db80!==_0x37f4b3)_0x10db80[_0x542c91(0x534)][_0x542c91(0x2da)](_0x37f4b3);else _0x5ba6de[_0x542c91(0x2da)](_0x37f4b3);}const _0xa31837=(_0xec03d5,_0x5ae790)=>_0xec03d5[_0x542c91(0x248)]===_0x5ae790['kind']?(_0xec03d5[_0x542c91(0x240)]||0x0)-(_0x5ae790['pid']||0x0):(_0xec03d5[_0x542c91(0x248)]??'')<(_0x5ae790['kind']??'')?-0x1:0x1,_0x2414de=_0x23dca9=>{const _0xba0009=_0x542c91;_0x23dca9[_0xba0009(0x176)](_0xa31837);for(const _0x134412 of _0x23dca9)if(_0x134412[_0xba0009(0x534)][_0xba0009(0x533)])_0x2414de(_0x134412['children']);};return _0x2414de(_0x5ba6de),_0x5ba6de;}[_0x13c903(0x413)](_0x9e5ade){const _0x535c50=_0x13c903;return this['_groupByProcess']()[_0x535c50(0x106)](_0x13d94a=>_0x13d94a[_0x535c50(0x3ac)]===_0x9e5ade)??null;}['_groupByProcess'](_0x47f171=Date['now']()){const _0x4b86d7=_0x13c903,_0x4ca0d9=new Map();for(const _0x350e3d of this['listNodes']()){const _0x273da5=_0x46cc06(_0x350e3d);let _0x8c5fa3=_0x4ca0d9[_0x4b86d7(0x2c6)](_0x273da5);!_0x8c5fa3&&(_0x8c5fa3={'processKey':_0x273da5,'nodeKey':_0x273da5,'pid':_0x350e3d[_0x4b86d7(0x240)],'ppid':_0x350e3d[_0x4b86d7(0x340)]??null,'host':_0x350e3d[_0x4b86d7(0x597)]??null,'kind':_0x350e3d[_0x4b86d7(0x248)],'role':null,'supervisorKey':_0x350e3d[_0x4b86d7(0x21d)]??null,'slot':_0x350e3d[_0x4b86d7(0x5c3)]??null,'slotKey':_0x350e3d[_0x4b86d7(0x193)]??null,'caps':_0x350e3d[_0x4b86d7(0x29e)]??null,'lifecycle':_0x350e3d['lifecycle']??null,'uptime':Math[_0x4b86d7(0x31b)](0x0,Math[_0x4b86d7(0x146)]((_0x47f171-(_0x350e3d[_0x4b86d7(0x223)]||_0x47f171))/0x3e8)),'startedAt':_0x350e3d[_0x4b86d7(0x223)]??null,'meta':_0x350e3d[_0x4b86d7(0x2e2)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4ca0d9[_0x4b86d7(0x455)](_0x273da5,_0x8c5fa3));_0x8c5fa3['instances'][_0x4b86d7(0x2da)]({'instanceId':_0x350e3d[_0x4b86d7(0x10e)]??null,'role':_0x350e3d[_0x4b86d7(0x517)]??null,'listenAddr':_0x350e3d[_0x4b86d7(0x30c)]??null,'lifecycle':_0x350e3d[_0x4b86d7(0x398)]??null,'processing':_0x350e3d[_0x4b86d7(0x270)]??null});if(!_0x8c5fa3[_0x4b86d7(0x517)]&&_0x350e3d['role'])_0x8c5fa3[_0x4b86d7(0x517)]=_0x350e3d[_0x4b86d7(0x517)];if(!_0x8c5fa3[_0x4b86d7(0x30c)]&&_0x350e3d[_0x4b86d7(0x30c)])_0x8c5fa3[_0x4b86d7(0x30c)]=_0x350e3d['listenAddr'];if(!_0x8c5fa3[_0x4b86d7(0x270)]&&_0x350e3d['processing'])_0x8c5fa3[_0x4b86d7(0x270)]=_0x350e3d['processing'];if(!_0x8c5fa3[_0x4b86d7(0x28f)]&&_0x350e3d[_0x4b86d7(0x28f)])_0x8c5fa3['engines']=_0x350e3d[_0x4b86d7(0x28f)];if(!_0x8c5fa3[_0x4b86d7(0x1b9)]&&_0x350e3d[_0x4b86d7(0x1b9)])_0x8c5fa3['singletonClaims']=_0x350e3d['singletonClaims'];if(_0x8c5fa3[_0x4b86d7(0x29e)]==null&&_0x350e3d[_0x4b86d7(0x29e)])_0x8c5fa3[_0x4b86d7(0x29e)]=_0x350e3d[_0x4b86d7(0x29e)];if(_0x350e3d[_0x4b86d7(0x27b)]&&(!_0x8c5fa3[_0x4b86d7(0x27b)]||(_0x350e3d[_0x4b86d7(0x27b)]['at']??0x0)>(_0x8c5fa3['stats']['at']??0x0)))_0x8c5fa3[_0x4b86d7(0x27b)]=_0x350e3d['stats'];}return[..._0x4ca0d9[_0x4b86d7(0x38b)]()];}[_0x13c903(0x1ca)](){const _0x340058=_0x13c903,_0x56043e=[],_0x18972d={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2e04f9 of this[_0x340058(0x56f)]()){_0x56043e[_0x340058(0x2da)]({'processKey':_0x2e04f9[_0x340058(0x3ac)],'kind':_0x2e04f9['kind'],'pid':_0x2e04f9['pid'],'supervisorKey':_0x2e04f9['supervisorKey'],'meta':_0x2e04f9[_0x340058(0x2e2)]??null,'uptime':_0x2e04f9['uptime'],'stats':_0x2e04f9[_0x340058(0x27b)]??null}),_0x18972d['processes']++;if(_0x2e04f9[_0x340058(0x27b)]){_0x18972d[_0x340058(0x458)]+=_0x2e04f9[_0x340058(0x27b)][_0x340058(0x458)]||0x0,_0x18972d[_0x340058(0x373)]+=(_0x2e04f9['stats'][_0x340058(0x373)]||0x0)+(_0x2e04f9['stats'][_0x340058(0x164)]?.[_0x340058(0x373)]||0x0);const _0x2f04aa=_0x2e04f9[_0x340058(0x27b)][_0x340058(0x164)];_0x2f04aa&&(_0x18972d[_0x340058(0x164)][_0x340058(0x215)]+=_0x2f04aa[_0x340058(0x215)]||0x0,_0x18972d[_0x340058(0x164)][_0x340058(0x23d)]+=_0x2f04aa[_0x340058(0x23d)]||0x0,_0x18972d[_0x340058(0x164)][_0x340058(0x195)]+=_0x2f04aa[_0x340058(0x195)]||0x0);}}return{'totals':_0x18972d,'nodes':_0x56043e};}async[_0x13c903(0x5ab)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2c306d=_0x13c903;this[_0x2c306d(0x3c0)]=this[_0x2c306d(0x3c0)]||!!writer,this['_isReader']=this[_0x2c306d(0x166)]||!!reader,this[_0x2c306d(0x225)]=kind||this['_kind']||(_0x5c4d25[_0x2c306d(0x577)]?'http-server':_0x2c306d(0x32a)),this[_0x2c306d(0x2ff)]=supervisorKey??this[_0x2c306d(0x2ff)],this[_0x2c306d(0x436)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x5c46e2=await this['okdb'][_0x2c306d(0x5ea)](_0x221c35,{'sync':![],'durability':_0x2c306d(0x127)});if(!_0x5c46e2[_0x2c306d(0x474)](_0x192d77))await _0x5c46e2[_0x2c306d(0x3b9)](_0x192d77);this[_0x2c306d(0x26b)]=_0x5c46e2;}return this[_0x2c306d(0x26b)];}[_0x13c903(0x135)](){const _0x4a982e=_0x13c903;return this[_0x4a982e(0x47b)]!==this[_0x4a982e(0x26b)]&&(this[_0x4a982e(0x47b)]=this[_0x4a982e(0x26b)],this[_0x4a982e(0x52d)]=this[_0x4a982e(0x26b)][_0x4a982e(0x374)](_0x192d77)['data']),this[_0x4a982e(0x52d)];}[_0x13c903(0x451)](_0x876cbe){const _0x13d6cb=_0x13c903;if(_0x2a6e2f)return this[_0x13d6cb(0x135)]()[_0x13d6cb(0x2e8)](_0x876cbe[_0x13d6cb(0x22f)],_0x876cbe,0x1);const _0x43fcb8=this['_nodeDb']()[_0x13d6cb(0x346)](_0x876cbe[_0x13d6cb(0x22f)],_0x876cbe,0x1);if(_0x43fcb8&&typeof _0x43fcb8[_0x13d6cb(0x2f9)]==='function')_0x43fcb8['then'](undefined,()=>{});return _0x43fcb8;}['_putRowSync'](_0x57e138){const _0x828a6a=_0x13c903;return this[_0x828a6a(0x135)]()[_0x828a6a(0x2e8)](_0x57e138['nodeKey'],_0x57e138,0x1);}[_0x13c903(0x15b)](_0x119ad1){const _0x26d92e=_0x13c903;if(_0x2a6e2f)try{return this['_nodeDb']()[_0x26d92e(0x39e)](_0x119ad1);}catch{return![];}const _0x1c3cce=this[_0x26d92e(0x135)]()['remove'](_0x119ad1);if(_0x1c3cce&&typeof _0x1c3cce[_0x26d92e(0x2f9)]===_0x26d92e(0x59d))_0x1c3cce['then'](undefined,()=>{});return _0x1c3cce;}async[_0x13c903(0x18b)](_0x3e7df8){const _0x209149=_0x13c903;if(!this[_0x209149(0x26b)]||!this[_0x209149(0x3c0)]||!_0x3e7df8?.[_0x209149(0x22f)])return;return this['_putRowAsync'](_0x3e7df8);}async[_0x13c903(0x41c)](_0x30a8ae){const _0x556325=_0x13c903;if(!this[_0x556325(0x26b)]||!this[_0x556325(0x3c0)]||!_0x30a8ae)return;const _0x3bef1e=_0x30a8ae[_0x556325(0x15a)]('#'),_0x2bbaec=[];for(const {key:_0x2eddc7}of this[_0x556325(0x26b)][_0x556325(0x306)](_0x192d77)){if(_0x2eddc7===_0x30a8ae||!_0x3bef1e&&typeof _0x2eddc7===_0x556325(0x361)&&_0x2eddc7['startsWith'](_0x30a8ae+'#'))_0x2bbaec[_0x556325(0x2da)](_0x2eddc7);}for(const _0x48d838 of _0x2bbaec){try{this[_0x556325(0x135)]()[_0x556325(0x39e)](_0x48d838);}catch{}}}[_0x13c903(0x40e)](_0x288071){const _0x19b3d8=_0x13c903;if(typeof _0x288071?.[_0x19b3d8(0x240)]!==_0x19b3d8(0x145))return![];if(_0x288071[_0x19b3d8(0x597)]!==_0x3cc1b8[_0x19b3d8(0x2a4)]())return![];if(_0x288071[_0x19b3d8(0x240)]===process[_0x19b3d8(0x240)])return![];if(_0x288071[_0x19b3d8(0x420)]!=null&&_0x288071[_0x19b3d8(0x420)]<Date['now']()-_0x4348fd)return!![];try{return process[_0x19b3d8(0x5a5)](_0x288071[_0x19b3d8(0x240)],0x0),![];}catch(_0x5dfae7){return _0x5dfae7[_0x19b3d8(0x29d)]===_0x19b3d8(0x495);}}[_0x13c903(0x4f3)](){const _0x4d355c=_0x13c903;if(!this[_0x4d355c(0x26b)])return[];try{this[_0x4d355c(0x26b)]['db']?.[_0x4d355c(0x2ab)]?.();}catch{}const _0x580c79=Date[_0x4d355c(0x1ad)](),_0xe71b7f=_0x3cc1b8[_0x4d355c(0x2a4)](),_0x12c631=[];for(const {value:_0x151c3e}of this['_statusEnv'][_0x4d355c(0x306)](_0x192d77)){if(!_0x151c3e)continue;let _0x1d4c3d=null;_0x151c3e[_0x4d355c(0x597)]===_0xe71b7f&&typeof _0x151c3e[_0x4d355c(0x240)]===_0x4d355c(0x145)&&(_0x1d4c3d=!this[_0x4d355c(0x40e)](_0x151c3e));if(_0x1d4c3d===![])continue;const _0x565642=_0x151c3e[_0x4d355c(0x420)]==null||_0x151c3e['expiresAt']>=_0x580c79;if(_0x1d4c3d===!![]||_0x565642)_0x12c631[_0x4d355c(0x2da)](_0x151c3e);}return _0x12c631;}async['reap'](_0x66d648=0x0){const _0x3cd49f=_0x13c903;if(!this[_0x3cd49f(0x26b)]||!this[_0x3cd49f(0x3c0)])return;const _0x100659=Date[_0x3cd49f(0x1ad)]()-_0x66d648,_0x578d0b=new Set(),_0x5aef1c=[],_0x123c89=_0x3cc1b8[_0x3cd49f(0x2a4)](),_0x42115c=require$$3[_0x3cd49f(0x4b4)];for(const {key:_0x4b55cf,value:_0x143e04}of this[_0x3cd49f(0x26b)][_0x3cd49f(0x306)](_0x192d77)){if(!_0x143e04)continue;const _0x573558=_0x143e04[_0x3cd49f(0x597)]===_0x123c89&&typeof _0x143e04[_0x3cd49f(0x240)]===_0x3cd49f(0x145),_0x5da75c=_0x573558?this[_0x3cd49f(0x40e)](_0x143e04):_0x143e04[_0x3cd49f(0x420)]!=null&&_0x143e04[_0x3cd49f(0x420)]<_0x100659;if(_0x5da75c)_0x5aef1c[_0x3cd49f(0x2da)](_0x4b55cf);else{_0x578d0b[_0x3cd49f(0x2ed)](_0x46cc06(_0x143e04)??_0x4b55cf);if(_0x143e04['version']&&_0x143e04[_0x3cd49f(0x4b4)]!==_0x42115c){if(!this[_0x3cd49f(0x525)])this[_0x3cd49f(0x525)]=new Set();!this['_versionSkewWarned']['has'](_0x143e04[_0x3cd49f(0x4b4)])&&(this[_0x3cd49f(0x525)][_0x3cd49f(0x2ed)](_0x143e04[_0x3cd49f(0x4b4)]),this[_0x3cd49f(0x5b9)][_0x3cd49f(0x5df)]?.[_0x3cd49f(0x1f0)]?.('process\x20'+(_0x143e04[_0x3cd49f(0x240)]??'?')+_0x3cd49f(0x234)+_0x143e04[_0x3cd49f(0x4b4)]+_0x3cd49f(0x26a)+_0x42115c+_0x3cd49f(0x3d4)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x3cd49f(0x27c)}));}}}for(const _0x5af2b7 of _0x5aef1c)this[_0x3cd49f(0x15b)](_0x5af2b7);if(this['_ensureDesired']()){const _0x35390d=[];for(const {key:_0x9a3ed2}of this[_0x3cd49f(0x21a)](_0x3cd49f(0x19e))){if(!_0x578d0b[_0x3cd49f(0x1ed)](_0x9a3ed2)){if(_0x2a6e2f)try{this[_0x3cd49f(0x3a3)]['removeSync']('node/'+_0x9a3ed2);}catch{}else _0x35390d['push'](this[_0x3cd49f(0x3a3)][_0x3cd49f(0x224)]('node/'+_0x9a3ed2));}}if(_0x35390d[_0x3cd49f(0x533)])await Promise['allSettled'](_0x35390d);}}[_0x13c903(0x408)](_0x35bdc5=null){const _0x316556=_0x13c903;if(this['_hbTimer'])return;if(!this[_0x316556(0x3c0)]||!this[_0x316556(0x26b)]){this[_0x316556(0x5b9)]?.[_0x316556(0x5df)]?.[_0x316556(0x1f0)]?.(_0x316556(0x56c)+this[_0x316556(0x3c0)]+_0x316556(0x303)+!!this[_0x316556(0x26b)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':_0x316556(0x2b5)});return;}this[_0x316556(0x584)]=_0x35bdc5,this['_onProcEvent']=()=>this[_0x316556(0x372)]();for(const _0x591fa0 of _0x184c86)this[_0x316556(0x5b9)]['events']['on'](_0x591fa0,this[_0x316556(0x1db)]);this[_0x316556(0x35b)]();const _0x4d4295=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x43ced2;this[_0x316556(0x546)]=setInterval(()=>{const _0x57d0bb=_0x316556;if(this['_onTick'])try{this['_onTick']();}catch{}this['_publishNow'](),this[_0x57d0bb(0x368)]()['catch'](()=>{});},_0x4d4295);if(this[_0x316556(0x546)]['unref'])this[_0x316556(0x546)][_0x316556(0x2e3)]();}[_0x13c903(0x372)](){const _0x284a33=_0x13c903;if(!this['_isWriter']||!this[_0x284a33(0x26b)])return;if(Date['now']()-this[_0x284a33(0x5d9)]<_0x3d2f29)return;this[_0x284a33(0x35b)]();}[_0x13c903(0x35b)](){const _0x4eddaa=_0x13c903;if(!this['_isWriter']||!this[_0x4eddaa(0x26b)])return;this[_0x4eddaa(0x5d9)]=Date[_0x4eddaa(0x1ad)]();try{const _0x49d28a=[this[_0x4eddaa(0x485)]()];for(const _0x1154d5 of this[_0x4eddaa(0x289)][_0x4eddaa(0x38b)]())_0x49d28a['push'](this[_0x4eddaa(0x353)](_0x1154d5));const _0x4f5a08=_0x4bab0e[_0x4eddaa(0x13c)]?_0x4bab0e[_0x4eddaa(0x1ad)]():0x0;for(const _0x455a15 of _0x49d28a){try{this[_0x4eddaa(0x175)](_0x455a15),this[_0x4eddaa(0x355)]=![];}catch(_0x1f2fcd){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x4eddaa(0x5b9)]?.[_0x4eddaa(0x5df)]?.['warn']?.(_0x4eddaa(0x4bf)+_0x1f2fcd[_0x4eddaa(0x58f)],{'feature':_0x4eddaa(0x2b5)}));}}if(_0x4bab0e[_0x4eddaa(0x13c)])_0x4bab0e[_0x4eddaa(0x12d)](_0x4eddaa(0x483),_0x4bab0e[_0x4eddaa(0x1ad)]()-_0x4f5a08,'rows='+_0x49d28a['length']+_0x4eddaa(0x222));}catch(_0x2e7933){!this[_0x4eddaa(0x355)]&&(this[_0x4eddaa(0x355)]=!![],this['okdb']?.[_0x4eddaa(0x5df)]?.[_0x4eddaa(0x1f0)]?.(_0x4eddaa(0x4bf)+_0x2e7933['message'],{'feature':'processes'}));}}async[_0x13c903(0x37f)](){const _0x246762=_0x13c903;if(this['_onProcEvent']){for(const _0x16ff43 of _0x184c86){try{this[_0x246762(0x5b9)][_0x246762(0x52f)][_0x246762(0x14f)](_0x16ff43,this[_0x246762(0x1db)]);}catch{}}this[_0x246762(0x1db)]=null;}this[_0x246762(0x546)]&&(clearInterval(this[_0x246762(0x546)]),this[_0x246762(0x546)]=null);try{if(this[_0x246762(0x26b)]&&this[_0x246762(0x3c0)])await this['removeNode'](this[_0x246762(0x2a1)]);}catch{}}async[_0x13c903(0x53c)](){const _0x3dde6c=_0x13c903;if(!this[_0x3dde6c(0x26b)]||!this[_0x3dde6c(0x3c0)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x5c8ce2=[];for(const {value:_0x16969a}of this[_0x3dde6c(0x26b)]['getRange'](_0x192d77)){if(_0x16969a?.['ppid']===process[_0x3dde6c(0x240)]&&_0x16969a[_0x3dde6c(0x22f)])_0x5c8ce2['push'](_0x16969a[_0x3dde6c(0x22f)]);}for(const _0x2f214d of _0x5c8ce2){try{await this['removeNode'](_0x2f214d);}catch{}}}catch{}}async[_0x13c903(0x2e4)](){const _0x37932a=_0x13c903;return this['putNode'](this[_0x37932a(0x485)]());}async[_0x13c903(0x174)](_0x213fad){const _0x4265cf=_0x13c903;if(!this['_statusEnv']||!this[_0x4265cf(0x3c0)])return;return this['putNode'](this[_0x4265cf(0x353)](_0x213fad));}[_0x13c903(0x353)]({pid:_0x44222e,startedAt:_0x495c6c,kind:_0x4493c9,supervisorKey:_0x3fea28,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3e1be2=_0x13c903,_0x5b4541=Date['now'](),_0x1396d2=_0x52d9a7(_0x44222e,_0x495c6c);return{'nodeKey':_0x558b0f(_0x1396d2,'0'),'processKey':_0x1396d2,'instanceId':'0','pid':_0x44222e,'startedAt':_0x495c6c,'ppid':process[_0x3e1be2(0x240)],'host':_0x3cc1b8[_0x3e1be2(0x2a4)](),'supervisorKey':_0x3fea28,'slot':slot,'slotKey':slotKey,'kind':_0x4493c9,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5b4541,'expiresAt':_0x5b4541+_0xcc38fd,'caps':this[_0x3e1be2(0x59e)](_0x4493c9,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x13c903(0x1a7)](_0x3c2c26){const _0x417f2c=_0x13c903;if(!_0x3c2c26?.[_0x417f2c(0x240)])return null;const _0x4786cf=_0x52d9a7(_0x3c2c26[_0x417f2c(0x240)],_0x3c2c26[_0x417f2c(0x223)]);this[_0x417f2c(0x289)][_0x417f2c(0x455)](_0x4786cf,{..._0x3c2c26,'supervisorKey':_0x3c2c26['supervisorKey']??this[_0x417f2c(0x3ea)]});if(this[_0x417f2c(0x3c0)])await this['publishChildRow'](this[_0x417f2c(0x289)][_0x417f2c(0x2c6)](_0x4786cf))[_0x417f2c(0x2f0)]?.(()=>{});return _0x4786cf;}[_0x13c903(0x504)](_0x9ed55b){const _0x1cea3a=_0x13c903;if(!_0x9ed55b)return;return this[_0x1cea3a(0x289)]['delete'](_0x9ed55b),this['removeNode'](_0x9ed55b);}[_0x13c903(0x199)](){const _0x3b9678=_0x13c903,_0x2a87c8=Date['now'](),_0x521264=process[_0x3b9678(0x120)](),_0x4156db=(_0x2a87c8-this[_0x3b9678(0x52e)])*0x3e8;if(_0x4156db>=0x3d090){const _0x2446b7=_0x521264['user']-this[_0x3b9678(0x434)]['user']+(_0x521264[_0x3b9678(0x5dd)]-this[_0x3b9678(0x434)]['system']),_0x1fd841=_0x3cc1b8[_0x3b9678(0x43f)]()['length']||0x1;this['_lastCpuPct']=Math[_0x3b9678(0x3ba)](0x64,Math[_0x3b9678(0x146)](_0x2446b7/(_0x4156db*_0x1fd841)*0x64)),this[_0x3b9678(0x5e1)]=Math['round'](_0x4156db/0x3e8),this[_0x3b9678(0x434)]=_0x521264,this['_lastCpuAt']=_0x2a87c8;}const _0x114adc=process['memoryUsage'](),_0x19b50e=this[_0x3b9678(0x417)][_0x3b9678(0x4ea)];let _0x425bec=0x0;if(_0x19b50e>0x0){const _0x3f01a7=[this[_0x3b9678(0x5b9)],...this['okdb'][_0x3b9678(0x1da)]?.['values']?.()??[]];for(const _0x5cac82 of _0x3f01a7){const _0x21f1bc=_0x5cac82[_0x3b9678(0x30d)]?.[_0x3b9678(0x4a6)];if(_0x21f1bc)_0x425bec+=_0x21f1bc[_0x3b9678(0x214)][_0x3b9678(0x195)];}}let _0x1a153d=null;const _0x42ea6d=_0x19b50e;if(_0x42ea6d>0x0){let _0x42ec0d=0x0;for(const _0x27c7d1 of this[_0x3b9678(0x417)][_0x3b9678(0x38b)]())_0x42ec0d+=_0x27c7d1[_0x3b9678(0x373)]||0x0;_0x1a153d={'count':_0x42ea6d,'heapUsed':_0x42ec0d,'sandbox':_0x19b50e,'busy':_0x425bec};}return{'rss':_0x114adc[_0x3b9678(0x458)],'heapUsed':_0x114adc[_0x3b9678(0x373)],'heapTotal':_0x114adc[_0x3b9678(0x5a7)],'external':_0x114adc[_0x3b9678(0x410)],'cpuPct':this[_0x3b9678(0x370)],'cpuWindowMs':this[_0x3b9678(0x5e1)]??null,'threads':_0x1a153d,'at':_0x2a87c8};}[_0x13c903(0x17c)](_0x587aad,_0x4a3dbf){const _0x5de761=_0x13c903;if(!_0x587aad||!_0x4a3dbf)return;this[_0x5de761(0x417)]['set'](_0x587aad,_0x4a3dbf);}['clearThreadStats'](_0x177fb8){const _0x5e07c7=_0x13c903;this[_0x5e07c7(0x417)][_0x5e07c7(0x1d0)](_0x177fb8);}[_0x13c903(0x5a1)](_0x2e291e,_0x3d9d25,_0x223d21=undefined){const _0x136b13=_0x13c903,_0x196682=this['_children'][_0x136b13(0x2c6)](_0x2e291e);if(!_0x196682||!_0x3d9d25)return;if(_0x223d21!==undefined)_0x196682[_0x136b13(0x270)]=_0x223d21;_0x196682[_0x136b13(0x27b)]={'rss':_0x3d9d25['rss']??null,'heapUsed':_0x3d9d25['heapUsed']??null,'heapTotal':_0x3d9d25[_0x136b13(0x5a7)]??null,'external':_0x3d9d25['external']??null,'cpuPct':_0x3d9d25['cpuPct']??null,'cpuWindowMs':_0x3d9d25[_0x136b13(0x1c3)]??null,'threads':_0x3d9d25['threads']??null,'claims':_0x3d9d25[_0x136b13(0x556)]??null,'envsOpen':_0x3d9d25[_0x136b13(0x129)]??null,'at':Date[_0x136b13(0x1ad)]()};}[_0x13c903(0x485)](){const _0x5a968a=_0x13c903,_0xf958e1=Date[_0x5a968a(0x1ad)](),_0x4220e8=this['okdb'][_0x5a968a(0x142)]||{},_0x4c7cf7=this[_0x5a968a(0x225)]||'cli';return{'nodeKey':this[_0x5a968a(0x2a1)],'processKey':this[_0x5a968a(0x3ea)],'instanceId':this[_0x5a968a(0x1bb)],'pid':process[_0x5a968a(0x240)],'startedAt':this[_0x5a968a(0x3a7)],'instanceStartedAt':this[_0x5a968a(0x2a2)],'ppid':typeof process[_0x5a968a(0x340)]==='number'?process[_0x5a968a(0x340)]:null,'host':_0x3cc1b8[_0x5a968a(0x2a4)](),'supervisorKey':this[_0x5a968a(0x2ff)]??null,'version':require$$3[_0x5a968a(0x4b4)],'kind':_0x4c7cf7,'role':{'engines':!!_0x4220e8[_0x5a968a(0x28f)],'processors':!!_0x4220e8['processors'],'compaction':_0x4220e8['compaction'],'http':_0x4220e8['http']},'listenAddr':this[_0x5a968a(0x436)]??null,'heartbeatAt':_0xf958e1,'expiresAt':_0xf958e1+_0xcc38fd,'caps':this[_0x5a968a(0x59e)](_0x4c7cf7,_0x4220e8),'lifecycle':{'state':_0x5a968a(0x18a),'desiredVersionApplied':null},'meta':{...this[_0x5a968a(0x1c0)]},'processing':_0x4220e8['processors']?this['_buildProcessingFacet']():null,'engines':_0x4220e8[_0x5a968a(0x28f)]?[...this[_0x5a968a(0x5b9)]['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this['_sampleOwnStats'](),'writers':this[_0x5a968a(0x469)]()};}['_collectWriterFacet'](){const _0x51e9c1=_0x13c903,_0xbbfd09={};try{for(const [_0x541b2f,_0x5bc931]of this['okdb'][_0x51e9c1(0x1da)]){try{const _0x160666=_0x5bc931['writerStatus']?.();if(!_0x160666)continue;if(!_0x160666[_0x51e9c1(0x2a9)]&&!_0x160666[_0x51e9c1(0x32d)]&&!(_0x160666['parkedNow']??0x0)&&!_0x160666['draining'])continue;_0xbbfd09[_0x541b2f]={'depth':_0x160666[_0x51e9c1(0x2a9)],'oldestPendingMs':_0x160666[_0x51e9c1(0x4cc)],'committed':_0x160666[_0x51e9c1(0x32d)],'commitsPerSec':_0x160666[_0x51e9c1(0x5a2)],'commitP99Ms':_0x160666[_0x51e9c1(0x111)],'parkedNow':_0x160666[_0x51e9c1(0x33a)]??0x0,'draining':!!_0x160666[_0x51e9c1(0x1e4)]};}catch{}}}catch{}return Object['keys'](_0xbbfd09)[_0x51e9c1(0x533)]?_0xbbfd09:null;}[_0x13c903(0x35e)](){const _0x46efb6=_0x13c903,_0x282d16=process['pid'],_0x22301c=Date['now'](),_0xaab5fb=_0x667729=>{const _0x1e16b0=_0x8225;if(!_0x667729)return[];const _0x52e83f=[];try{for(const {id:_0x457c6d,entry:_0x2ae976}of _0x667729[_0x1e16b0(0x3cb)]()){if(_0x2ae976?.[_0x1e16b0(0x364)]?.[_0x1e16b0(0x240)]!==_0x282d16)continue;const _0x5054f8=_0x2ae976['updatedAt']??_0x2ae976[_0x1e16b0(0x3c1)]??0x0;if(_0x5054f8+(_0x2ae976[_0x1e16b0(0x5ae)]??0x0)<_0x22301c)continue;_0x52e83f['push'](_0x457c6d);}}catch{}return _0x52e83f;},_0x3984c1=_0xaab5fb(this['_singletonLock'](_0x46efb6(0x311))),_0x5c9e06=_0xaab5fb(this['_singletonLock'](_0x46efb6(0x2fc)));if(!_0x3984c1[_0x46efb6(0x533)]&&!_0x5c9e06['length'])return null;return{'compact':_0x3984c1,'replicate':_0x5c9e06};}['_singletonLock'](_0x46287c){const _0x99345e=_0x13c903;if(!this[_0x99345e(0x5b9)]?.[_0x99345e(0x46c)])return null;if(!this[_0x99345e(0x4ed)])this[_0x99345e(0x4ed)]=new Map();let _0x5e212b=this[_0x99345e(0x4ed)][_0x99345e(0x2c6)](_0x46287c);if(!_0x5e212b)try{_0x5e212b=new _0xf4452(this[_0x99345e(0x5b9)]['_rootDb'],{'namespace':_0x46287c}),this[_0x99345e(0x4ed)][_0x99345e(0x455)](_0x46287c,_0x5e212b);}catch{return null;}return _0x5e212b;}['_buildProcessingFacet'](){const _0x7f8555=_0x13c903,_0x5c3415=[];try{for(const [_0x631611,_0x340bcc]of this[_0x7f8555(0x5b9)][_0x7f8555(0x1da)]){if(_0x631611['startsWith']('~'))continue;for(const _0x57e616 of _0x340bcc['processor']['tierList']())_0x5c3415[_0x7f8555(0x2da)]({..._0x57e616,'env':_0x631611});}}catch{}return{'participate':this[_0x7f8555(0x5b9)][_0x7f8555(0x33f)]?.[_0x7f8555(0x24b)]??![],'processors':_0x5c3415};}[_0x13c903(0x385)](){const _0x376740=_0x13c903;if(this[_0x376740(0x3a3)])return!![];const _0x12f9cf=this[_0x376740(0x5b9)][_0x376740(0x46c)];if(!_0x12f9cf)return![];return this[_0x376740(0x3a3)]=_0x12f9cf[_0x376740(0x249)](_0x218904,{'dupSort':![]}),this['_cmd']=_0x12f9cf[_0x376740(0x249)](_0xa9c813,{'dupSort':![]}),!![];}async[_0x13c903(0x4ff)](){const _0x46e6ef=_0x13c903;if(!this[_0x46e6ef(0x385)]())return;const _0x3f5d15=_0x46e6ef(0x386),_0x2bc57f=0x1,_0x58a656=this[_0x46e6ef(0x3a3)][_0x46e6ef(0x2c6)](_0x3f5d15)??0x0;if(_0x58a656>=_0x2bc57f)return;const _0x3f0fb5=_0x49e2a8=>{const _0xbac46c=_0x46e6ef;if(_0x49e2a8===_0xbac46c(0x3f3))return _0xbac46c(0x55f);if(_0x49e2a8==='async')return'fanout';return _0x49e2a8;};await this[_0x46e6ef(0x5b9)]['_systemEnv'][_0x46e6ef(0x395)][_0x46e6ef(0x13e)](()=>{const _0x45f1e3=_0x46e6ef;for(const _0x537cd6 of[_0x45f1e3(0x221),'procmodeack/']){for(const {key:_0x509762,value:_0x1de188}of this[_0x45f1e3(0x3a3)][_0x45f1e3(0x306)]({'start':_0x537cd6,'end':_0x537cd6+'\xff'})){if(typeof _0x509762!=='string'||!_0x509762['startsWith'](_0x537cd6))break;const _0x3b1e2c=_0x3f0fb5(_0x1de188['mode']);if(_0x3b1e2c!==_0x1de188[_0x45f1e3(0x418)])this[_0x45f1e3(0x3a3)][_0x45f1e3(0x346)](_0x509762,{..._0x1de188,'mode':_0x3b1e2c});}}this[_0x45f1e3(0x3a3)][_0x45f1e3(0x346)](_0x3f5d15,_0x2bc57f);});}[_0x13c903(0x314)](){const _0xaa4dcb=_0x13c903;return!!this[_0xaa4dcb(0x3a3)];}[_0x13c903(0x3d7)](_0x4ea254,_0x572e4b){const _0x1c2e49=_0x13c903;if(!this[_0x1c2e49(0x385)]())return null;const _0x33ede2=_0x4ea254+'/'+_0x572e4b;return this[_0x1c2e49(0x416)](),this[_0x1c2e49(0x473)][_0x1c2e49(0x2c6)](_0x33ede2)??this[_0x1c2e49(0x3a3)][_0x1c2e49(0x2c6)](_0x33ede2)??null;}['_refreshDesiredSnapshot'](){const _0x5735f6=_0x13c903;if(!_0x2a6e2f)return;try{this[_0x5735f6(0x5b9)]['_systemEnv']?.['db']?.[_0x5735f6(0x2ab)]?.();}catch{}}async[_0x13c903(0x1aa)](_0x4bd438,_0x5347a8,_0xca20ab){const _0x413834=_0x13c903;if(!this[_0x413834(0x385)]())return null;const _0x4115de=_0x4bd438+'/'+_0x5347a8;this[_0x413834(0x416)]();const _0x2769ed=this[_0x413834(0x473)][_0x413834(0x2c6)](_0x4115de)??this[_0x413834(0x3a3)][_0x413834(0x2c6)](_0x4115de)??{'version':0x0},_0x12af07=(_0x2769ed[_0x413834(0x4b4)]||0x0)+0x1,_0x10bd98={..._0x2769ed,..._0xca20ab,'version':_0x12af07,'updatedAt':Date['now']()};this[_0x413834(0x473)][_0x413834(0x455)](_0x4115de,_0x10bd98);try{await this[_0x413834(0x5b9)]['_systemEnv'][_0x413834(0x395)][_0x413834(0x13e)](()=>{this['_desired']['put'](_0x4115de,_0x10bd98);});}finally{if(this[_0x413834(0x473)]['get'](_0x4115de)===_0x10bd98)this['_desiredOverlay'][_0x413834(0x1d0)](_0x4115de);}return _0x12af07;}[_0x13c903(0x21a)](_0x9e19fa){const _0x2ffb2d=_0x13c903;if(!this[_0x2ffb2d(0x385)]())return[];this[_0x2ffb2d(0x416)]();const _0x406f80=_0x9e19fa+'/',_0x208195=[];for(const {key:_0x486e72,value:_0x74a341}of this['_desired'][_0x2ffb2d(0x306)]({'start':_0x406f80,'end':_0x406f80+'\xff'})){if(typeof _0x486e72!=='string'||!_0x486e72[_0x2ffb2d(0x447)](_0x406f80))break;_0x208195[_0x2ffb2d(0x2da)]({'key':_0x486e72[_0x2ffb2d(0x352)](_0x406f80[_0x2ffb2d(0x533)]),'value':_0x74a341});}return _0x208195;}[_0x13c903(0x38a)](_0x1b8ae6){const _0x35696e=_0x13c903;if(!this[_0x35696e(0x385)]())return null;return this['_cmd'][_0x35696e(0x2c6)](_0x1b8ae6)??null;}async['bumpCmd'](_0x1ac2bb,_0x3d90c3,_0x1617f8={}){const _0x25a3ec=_0x13c903;if(!this[_0x25a3ec(0x385)]())return null;let _0x279a77;return await this[_0x25a3ec(0x5b9)][_0x25a3ec(0x2d0)][_0x25a3ec(0x395)][_0x25a3ec(0x13e)](()=>{const _0x1dabfd=_0x25a3ec,_0x390ac8=this[_0x1dabfd(0x157)][_0x1dabfd(0x2c6)](_0x1ac2bb)||{'epoch':0x0};_0x279a77=(_0x390ac8[_0x1dabfd(0x5b2)]||0x0)+0x1,this['_cmd'][_0x1dabfd(0x346)](_0x1ac2bb,{..._0x390ac8,..._0x1617f8,'cmd':_0x3d90c3,'epoch':_0x279a77,'updatedAt':Date[_0x1dabfd(0x1ad)]()});}),_0x279a77;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3bae55,'nodeKey':_0x52d9a7,'logicalKey':_0x2c6310,'slotKey':_0xb3d611,'PROCESS_ENV':_0x221c35,'NODE_TYPE':_0x192d77},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5a2ea7=_0x4d1b8e;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x16e875=require$$0$6,{EVENTS:_0x435593,CHANGE_ACTIONS:_0x552cb6}=requireOkdbEnums(),{LOOP:_0x411ae2}=requireOkdbLoopMonitor(),_0x2116e0=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x458c3a=0x5,_0xc8ceeb=0x2710;class _0x4f94ba extends _0x16e875{constructor(_0xbbdf35,_0xf758a2={}){const _0x224f43=_0x8225;super(),this[_0x224f43(0x5b9)]=_0xbbdf35,this[_0x224f43(0x4b0)]=_0xf758a2[_0x224f43(0x46a)]??_0x2116e0,this[_0x224f43(0x1df)]=_0xf758a2[_0x224f43(0x428)]??_0x458c3a,this[_0x224f43(0x53b)]=_0xf758a2[_0x224f43(0x16d)]??_0xc8ceeb,this['_started']=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this[_0x224f43(0x10b)]=new Map(),this[_0x224f43(0x32c)]=null,this[_0x224f43(0x149)]=![],this[_0x224f43(0x204)]=new Set(),this[_0x224f43(0x202)]=_0x1443bf=>this[_0x224f43(0x121)](_0x1443bf),this['_onPoke']=_0xc5e43f=>this[_0x224f43(0x3de)](_0xc5e43f),this[_0x224f43(0x1a1)]=()=>this['stop']();}[_0x5a2ea7(0x3b1)](){const _0x103e62=_0x5a2ea7;if(this[_0x103e62(0x5e7)])return;this['_started']=!![];for(const [_0x531950,_0x56976f]of this[_0x103e62(0x5b9)][_0x103e62(0x1da)]){if(_0x531950['startsWith']('~'))continue;try{_0x56976f[_0x103e62(0x399)]();}catch{}}for(const [_0xfc52c,_0xeba9f4]of this[_0x103e62(0x5b9)][_0x103e62(0x1da)]){if(_0xfc52c['startsWith']('~'))continue;try{this['_baselines'][_0x103e62(0x455)](_0xfc52c,_0xeba9f4[_0x103e62(0x48c)]()||0x0);}catch{}}const {events:_0x47f69e}=this[_0x103e62(0x5b9)];_0x47f69e['on'](_0x435593[_0x103e62(0x574)],this[_0x103e62(0x202)]),_0x47f69e['on'](_0x435593[_0x103e62(0x38e)],this[_0x103e62(0x202)]),_0x47f69e['on'](_0x435593[_0x103e62(0x3e2)],this[_0x103e62(0x202)]),_0x47f69e['on'](_0x435593[_0x103e62(0x158)],this[_0x103e62(0x1d7)]),_0x47f69e[_0x103e62(0x339)](_0x435593['SYSTEM_STOPPED'],this['_onStop']);}[_0x5a2ea7(0x5b4)](){const _0x2e497d=_0x5a2ea7;if(!this[_0x2e497d(0x5e7)])return;this['_started']=![];const {events:_0x430b75}=this[_0x2e497d(0x5b9)];_0x430b75['off'](_0x435593[_0x2e497d(0x574)],this['_onItem']),_0x430b75[_0x2e497d(0x14f)](_0x435593[_0x2e497d(0x38e)],this[_0x2e497d(0x202)]),_0x430b75['off'](_0x435593['ITEM_REMOVE'],this['_onItem']),_0x430b75['off'](_0x435593['SYSTEM_POKE'],this[_0x2e497d(0x1d7)]);try{_0x430b75[_0x2e497d(0x14f)](_0x435593[_0x2e497d(0x17e)],this[_0x2e497d(0x1a1)]);}catch{}this[_0x2e497d(0x32c)]&&(clearTimeout(this[_0x2e497d(0x32c)]),this['_flushTimer']=null),this[_0x2e497d(0x10b)][_0x2e497d(0x108)](),this['_cursors'][_0x2e497d(0x108)](),this[_0x2e497d(0x2b9)][_0x2e497d(0x108)](),this[_0x2e497d(0x204)][_0x2e497d(0x108)]();}[_0x5a2ea7(0x432)](_0x986ae3,_0x47b718,_0x259f6b,_0x1070b6){return _0x986ae3+'\x00'+_0x47b718+'\x00'+_0x259f6b+'\x00'+_0x1070b6;}['_markSeen'](_0x528a45,_0x5909d3,_0x5dd56f,_0x46956b){const _0x305827=_0x5a2ea7,_0x54e6af=this[_0x305827(0x432)](_0x528a45,_0x5909d3,_0x5dd56f,_0x46956b);if(this['_seen'][_0x305827(0x1ed)](_0x54e6af))return![];this[_0x305827(0x204)]['add'](_0x54e6af);if(this['_seen']['size']>this[_0x305827(0x53b)]){const _0x4d94b7=this[_0x305827(0x204)][_0x305827(0x38b)]()[_0x305827(0x50f)]()[_0x305827(0x156)];this[_0x305827(0x204)][_0x305827(0x1d0)](_0x4d94b7);}return!![];}[_0x5a2ea7(0x121)](_0x562c74){const _0x1f4057=_0x5a2ea7;if(!this[_0x1f4057(0x5e7)]||!_0x562c74)return;const {env:_0x192630,type:_0x42c17e,key:_0x35fd0b,clock:_0x4dc2a5,origin:_0x33b24d,action:_0x349762,newValue:_0x2dd871,oldValue:_0x5a6c20}=_0x562c74;if(_0x192630==null||_0x42c17e==null||_0x35fd0b==null)return;if(typeof _0x192630===_0x1f4057(0x361)&&_0x192630[_0x1f4057(0x447)]('~'))return;if(typeof _0x42c17e===_0x1f4057(0x361)&&_0x42c17e[_0x1f4057(0x447)]('~'))return;if(!this[_0x1f4057(0x295)](_0x192630,_0x42c17e,_0x35fd0b,_0x4dc2a5))return;const _0x51d495=_0x349762===_0x552cb6[_0x1f4057(0x54a)]?_0x1f4057(0x224):'put';this[_0x1f4057(0x191)](_0x1f4057(0x25c),{'env':_0x192630,'type':_0x42c17e,'key':_0x35fd0b,'op':_0x51d495,'clock':_0x4dc2a5,'origin':_0x33b24d,'value':_0x51d495==='remove'?null:_0x2dd871,'prevValue':_0x5a6c20});}['_handlePoke'](_0x4d9e17){const _0x17854e=_0x5a2ea7;if(!this[_0x17854e(0x5e7)])return;if(!_0x4d9e17||typeof _0x4d9e17['env']!=='string'||typeof _0x4d9e17['type']!==_0x17854e(0x361))return;const {env:_0x2f3177,type:_0x4682d7}=_0x4d9e17;if(_0x2f3177[_0x17854e(0x447)]('~')||_0x4682d7[_0x17854e(0x447)]('~'))return;this['_pending'][_0x17854e(0x455)](_0x2f3177+'\x00'+_0x4682d7,{'env':_0x2f3177,'type':_0x4682d7}),this[_0x17854e(0x1cd)]();}[_0x5a2ea7(0x1cd)](){const _0x4e7966=_0x5a2ea7;if(this['_flushTimer'])return;const _0x9fa87b=()=>{const _0x5c9e15=_0x8225;this[_0x5c9e15(0x32c)]=null,this[_0x5c9e15(0x56d)]()[_0x5c9e15(0x2f0)](()=>{});};this['_flushTimer']=setTimeout(_0x9fa87b,this[_0x4e7966(0x1df)]>0x0?this[_0x4e7966(0x1df)]:0x0);}async[_0x5a2ea7(0x56d)](){const _0x52188f=_0x5a2ea7;if(this[_0x52188f(0x149)]){this[_0x52188f(0x1cd)]();return;}this[_0x52188f(0x149)]=!![];try{const _0x26f13f=[...this[_0x52188f(0x10b)][_0x52188f(0x38b)]()];this['_pending'][_0x52188f(0x108)]();let _0x381a1a=![];for(const {env:_0x286f67,type:_0x4fea94}of _0x26f13f){try{const _0x4e0096=await this['_drainOne'](_0x286f67,_0x4fea94);if(_0x4e0096)_0x381a1a=!![];}catch{this['_pending'][_0x52188f(0x455)](_0x286f67+'\x00'+_0x4fea94,{'env':_0x286f67,'type':_0x4fea94}),_0x381a1a=!![];}}if(_0x381a1a||this[_0x52188f(0x10b)][_0x52188f(0x4ea)]>0x0)this[_0x52188f(0x1cd)]();}finally{this[_0x52188f(0x149)]=![];}}async['_drainOne'](_0x117552,_0x34d2e6){const _0x9bfebe=_0x5a2ea7,_0x52a96d=await this[_0x9bfebe(0x5b9)][_0x9bfebe(0x4b9)](_0x117552),_0x274cdb=_0x117552+'\x00'+_0x34d2e6;!this[_0x9bfebe(0x4ad)][_0x9bfebe(0x1ed)](_0x274cdb)&&(!this[_0x9bfebe(0x2b9)][_0x9bfebe(0x1ed)](_0x117552)&&(_0x52a96d[_0x9bfebe(0x399)](),this[_0x9bfebe(0x2b9)]['set'](_0x117552,_0x52a96d[_0x9bfebe(0x48c)]()||0x0)),this[_0x9bfebe(0x4ad)][_0x9bfebe(0x455)](_0x274cdb,this[_0x9bfebe(0x2b9)]['get'](_0x117552)));const _0x58dab4=this[_0x9bfebe(0x4ad)][_0x9bfebe(0x2c6)](_0x274cdb),_0x3bd47d=_0x52a96d['getClock'](_0x34d2e6)||0x0;if(_0x3bd47d<=_0x58dab4)return![];const _0x1886c1=_0x58dab4+this[_0x9bfebe(0x4b0)],_0x5ddaee=Math['min'](_0x3bd47d,_0x1886c1),_0x19df95=_0x411ae2[_0x9bfebe(0x13c)]?_0x411ae2[_0x9bfebe(0x1ad)]():0x0,_0x1cc748=Array[_0x9bfebe(0x2cc)](_0x52a96d[_0x9bfebe(0x301)](_0x34d2e6,_0x58dab4+0x1,_0x5ddaee));let _0x381e98=_0x58dab4;for(const _0x278065 of _0x1cc748){const {clock:_0x3555aa,key:_0x414980,action:_0x26ecfe,origin:_0x5ad2e9}=_0x278065;if(_0x3555aa>_0x381e98)_0x381e98=_0x3555aa;if(_0x414980==null)continue;if(!this[_0x9bfebe(0x295)](_0x117552,_0x34d2e6,_0x414980,_0x3555aa))continue;let _0x5206a8,_0x17d1c1;if(_0x26ecfe===_0x552cb6[_0x9bfebe(0x54a)])_0x5206a8=_0x9bfebe(0x224),_0x17d1c1=null;else{const _0x5533f7=_0x52a96d[_0x9bfebe(0x2c6)](_0x34d2e6,_0x414980);_0x5533f7==null?(_0x5206a8=_0x9bfebe(0x224),_0x17d1c1=null):(_0x5206a8=_0x9bfebe(0x346),_0x17d1c1=_0x5533f7);}this[_0x9bfebe(0x191)](_0x9bfebe(0x25c),{'env':_0x117552,'type':_0x34d2e6,'key':_0x414980,'op':_0x5206a8,'clock':_0x3555aa,'origin':_0x5ad2e9,'value':_0x17d1c1});}if(_0x411ae2[_0x9bfebe(0x13c)])_0x411ae2[_0x9bfebe(0x12d)]('feed:'+_0x117552+':'+_0x34d2e6,_0x411ae2[_0x9bfebe(0x1ad)]()-_0x19df95,'n='+_0x1cc748['length']);return this[_0x9bfebe(0x4ad)][_0x9bfebe(0x455)](_0x274cdb,Math[_0x9bfebe(0x31b)](_0x381e98,_0x5ddaee)),_0x52a96d[_0x9bfebe(0x48c)](_0x34d2e6)>_0x5ddaee;}[_0x5a2ea7(0x126)](){const _0x5262d7=_0x5a2ea7;return{'started':this[_0x5262d7(0x5e7)],'quantum':this[_0x5262d7(0x4b0)],'flushDebounce':this[_0x5262d7(0x1df)],'cursors':Object[_0x5262d7(0x1e3)]([...this[_0x5262d7(0x4ad)][_0x5262d7(0x320)]()][_0x5262d7(0x4aa)](([_0x1f8f98,_0x465d01])=>[_0x1f8f98[_0x5262d7(0x18f)]('\x00',':'),_0x465d01])),'pending':this[_0x5262d7(0x10b)][_0x5262d7(0x4ea)],'seen':this[_0x5262d7(0x204)][_0x5262d7(0x4ea)]};}}return _0x4f94ba[_0x5a2ea7(0x43c)]=_0x2116e0,okdbChangefeed={'OKDBChangefeed':_0x4f94ba},okdbChangefeed;}function _0x8225(_0x126826,_0x3996bf){_0x126826=_0x126826-0xfd;const _0x580ecb=_0x580e();let _0x822595=_0x580ecb[_0x126826];return _0x822595;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5ad115=_0x4d1b8e;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x62ea60=require$$1$2,_0xedff3d=require$$1,{EVENTS:_0x34a1ef}=requireOkdbEnums(),_0x283438=require$$0,{slotKey:_0x35dfc5}=requireOkdbProcessRegistry(),_0x1de307=0xfa,_0x39df03=0xfa0,_0x1fbb74=0x5,_0x1c0db3=0x2710,_0x2a07c9=0xbb8,_0xd14ca9=0x7d0,_0x11c9f5=_0x5ad115(0x1fb),_0x91c89b=_0x5ad115(0x2aa),_0x831a95=_0x5ad115(0x5df),_0x2a12df='stats',_0x16a349=[_0x34a1ef['VIEW_PROGRESS'],_0x34a1ef[_0x5ad115(0x46f)],_0x34a1ef[_0x5ad115(0x250)],_0x34a1ef[_0x5ad115(0x3e4)],_0x34a1ef[_0x5ad115(0x4e6)],_0x34a1ef[_0x5ad115(0x1bf)],_0x34a1ef[_0x5ad115(0x2e5)],_0x34a1ef[_0x5ad115(0x217)],_0x5ad115(0x586),'processor:progress',_0x5ad115(0x382),_0x5ad115(0x57b),_0x5ad115(0x387),_0x5ad115(0x1d8)],_0x4bfe2e=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x5c809c({workers:_0x265054,makeOkdb:_0xac64a6,port:_0x1bdcaa,primaryOkdb:_0x4ae87b,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x3df4c2=_0x5ad115;if(_0x62ea60[_0x3df4c2(0x239)])return childEntry&&_0x62ea60[_0x3df4c2(0x42d)]({'exec':_0xedff3d[_0x3df4c2(0x482)](__dirname,_0x3df4c2(0x1b5)),'args':[],'execArgv':((()=>{const _0x104ca3=_0x3df4c2,_0x460d1e=[];for(let _0x585f7b=0x0;_0x585f7b<process['execArgv'][_0x104ca3(0x533)];_0x585f7b++){const _0x441e1a=process[_0x104ca3(0x1e9)][_0x585f7b];if(_0x441e1a[_0x104ca3(0x447)](_0x104ca3(0x3c4))||_0x441e1a[_0x104ca3(0x447)]('--watch')||_0x441e1a['startsWith'](_0x104ca3(0x5d8)))continue;if(_0x441e1a==='-e'||_0x441e1a===_0x104ca3(0x1fc)||_0x441e1a==='-p'||_0x441e1a===_0x104ca3(0x4f4)){_0x585f7b++;continue;}_0x460d1e[_0x104ca3(0x2da)](_0x441e1a);}return _0x460d1e;})())}),_0x2d5e6d({'workers':_0x265054,'port':_0x1bdcaa,'primaryOkdb':_0x4ae87b,'workerEnv':workerEnv});return _0xf49b51({'makeOkdb':_0xac64a6,'port':_0x1bdcaa});}function _0x2d5e6d({workers:_0x80fde0,port:_0x6cd813,primaryOkdb:_0x577a43,workerEnv:_0x1103da}){const _0x231f7f=_0x5ad115,_0x113708=new Map(),_0x41f8c8=new Map();let _0x142002=![];const _0x25965f=_0x31eee9=>_0x31eee9?.['__okdbSlot'],_0x49db89=_0x313431=>{const _0x2a7984=_0x8225,_0x70643e=_0x62ea60[_0x2a7984(0x178)]({...process.env,..._0x1103da||{},'OKDB_CLUSTER_SLOT':String(_0x313431)});return _0x70643e[_0x2a7984(0x53d)]=_0x313431,_0x113708[_0x2a7984(0x455)](_0x70643e[_0x2a7984(0x595)][_0x2a7984(0x240)],{'worker':_0x70643e,'startedAt':Date[_0x2a7984(0x1ad)](),'slot':_0x313431}),_0x70643e['on'](_0x2a7984(0x209),_0x13f7a3=>{const _0x1f30a6=_0x2a7984;console[_0x1f30a6(0x5df)](_0x1f30a6(0x1ab)+_0x70643e['process'][_0x1f30a6(0x240)]+'\x20ipc\x20error:\x20'+(_0x13f7a3?.[_0x1f30a6(0x58f)]??_0x13f7a3));}),_0x70643e['on'](_0x2a7984(0x4a5),()=>_0x686f34()),_0x70643e;},_0x462ef0=_0x12505e=>{const _0x2a9e65=_0x8225;for(const {worker:_0x17b190}of _0x113708[_0x2a9e65(0x38b)]()){if(_0x17b190[_0x2a9e65(0x228)]()||!_0x17b190[_0x2a9e65(0x13f)]())continue;try{_0x17b190['send'](_0x12505e);}catch{}}};_0x577a43?.[_0x231f7f(0x282)]?.({'kind':_0x231f7f(0x5b5),'listenAddr':':'+_0x6cd813})['catch'](()=>{}),_0x577a43?.[_0x231f7f(0x2b5)]?.[_0x231f7f(0x38c)]?.({'workersConfigured':_0x80fde0});const _0x26b75d={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x686f34=()=>{const _0x59da1a=_0x231f7f,_0x2e6189=_0x577a43?.[_0x59da1a(0x2b5)];if(!_0x2e6189||!_0x2e6189[_0x59da1a(0x3c0)])return;const _0x3549c0=_0x2e6189[_0x59da1a(0x22c)];for(const {worker:_0x5798b8,startedAt:_0x277a5f,slot:_0x59aac1,stats:_0xbcdf11,processing:_0x315479}of _0x113708[_0x59da1a(0x38b)]()){if(_0x5798b8[_0x59da1a(0x228)]())continue;const _0x229bbb=_0x2e6189['hasDesired']?.()&&_0x2e6189[_0x59da1a(0x3d7)](_0x59da1a(0x5c3),_0x310555(_0x59aac1))?.[_0x59da1a(0x524)]===!![];_0x2e6189['publishChildRow']({'pid':_0x5798b8[_0x59da1a(0x595)]['pid'],'startedAt':_0x277a5f,'kind':_0x59da1a(0x2b3),'supervisorKey':_0x3549c0,'slot':_0x59aac1,'slotKey':_0x310555(_0x59aac1),'role':_0x26b75d,'listenAddr':':'+_0x6cd813,'lifecycle':_0x229bbb?_0x59da1a(0x141):_0x59da1a(0x18a),'processing':_0x315479??null,'stats':_0xbcdf11??null})[_0x59da1a(0x2f0)](()=>{});}},_0x310555=_0x370550=>_0x35dfc5(_0x231f7f(0x14b)+_0x6cd813,_0x370550),_0x46f1e6=_0x39d427=>{const _0x524b81=_0x231f7f,_0x20f423=_0x577a43?.[_0x524b81(0x2b5)];if(!_0x20f423?.[_0x524b81(0x314)]?.())return![];return _0x20f423['getDesired'](_0x524b81(0x5c3),_0x310555(_0x39d427))?.[_0x524b81(0x524)]===!![];};for(let _0x39f392=0x0;_0x39f392<_0x80fde0;_0x39f392++){const _0x33020b=_0x46f1e6(_0x39f392);_0x41f8c8[_0x231f7f(0x455)](_0x39f392,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x33020b,'respawnTimer':null}),_0x33020b?console[_0x231f7f(0x5df)](_0x231f7f(0x2f7)+_0x39f392+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x49db89(_0x39f392);}const _0x5ca27a=()=>{const _0x5819e8=_0x231f7f,_0x59d78c=_0x577a43?.['processes'];if(!_0x59d78c?.[_0x5819e8(0x3c0)]||!_0x59d78c['hasDesired']?.())return;for(const [_0x579169,_0x4ddcc6]of _0x41f8c8[_0x5819e8(0x320)]()){const _0x162579=_0x59d78c[_0x5819e8(0x3d7)](_0x5819e8(0x5c3),_0x310555(_0x579169)),_0x971cc5=_0x162579?.[_0x5819e8(0x524)]===!![],_0x8d15b7=_0x162579?.['kill']===!![];if(_0x971cc5&&!_0x4ddcc6[_0x5819e8(0x107)]){_0x4ddcc6[_0x5819e8(0x107)]=!![];_0x4ddcc6[_0x5819e8(0x509)]&&(clearTimeout(_0x4ddcc6[_0x5819e8(0x509)]),_0x4ddcc6[_0x5819e8(0x509)]=null);for(const {worker:_0x5c206f}of _0x113708['values']()){if(_0x25965f(_0x5c206f)!==_0x579169||_0x5c206f[_0x5819e8(0x228)]())continue;try{if(_0x8d15b7)_0x5c206f['process'][_0x5819e8(0x5a5)](_0x5819e8(0x376));else _0x5c206f[_0x5819e8(0x13f)]()&&_0x5c206f[_0x5819e8(0x52b)]();}catch{}}console[_0x5819e8(0x5df)](_0x5819e8(0x1cc)+(_0x8d15b7?_0x5819e8(0x3ff):_0x5819e8(0x5a8))+_0x5819e8(0x3c7)+_0x579169+_0x5819e8(0x20c));}else{if(!_0x971cc5&&_0x4ddcc6[_0x5819e8(0x107)]&&_0x162579){_0x4ddcc6[_0x5819e8(0x107)]=![],_0x4ddcc6[_0x5819e8(0x192)]=[],_0x4ddcc6[_0x5819e8(0x497)]=0x0;const _0x5f10a2=[..._0x113708['values']()][_0x5819e8(0x5e8)](({worker:_0x46444c})=>_0x25965f(_0x46444c)===_0x579169&&!_0x46444c[_0x5819e8(0x228)]());!_0x5f10a2&&!_0x142002&&(_0x49db89(_0x579169),console['log'](_0x5819e8(0x5a3)+_0x579169));}}}},_0xcf4fb=()=>{try{_0x5ca27a();}catch{}};_0x577a43?.['events']?.['on']?.(_0x34a1ef[_0x231f7f(0x5a6)],_0xcf4fb);const _0x4efc9b=[];if(_0x577a43?.['events']?.['on'])for(const _0x5ccc45 of _0x16a349){const _0x781d7a=_0x48774c=>{_0x462ef0({[_0x11c9f5]:_0x91c89b,'event':_0x5ccc45,'data':_0x48774c??{}});};_0x577a43[_0x231f7f(0x52f)]['on'](_0x5ccc45,_0x781d7a),_0x4efc9b['push']({'event':_0x5ccc45,'handler':_0x781d7a});}const _0x21a52e=setInterval(()=>{_0x5ca27a(),_0x686f34();},_0x4bfe2e);_0x21a52e[_0x231f7f(0x2e3)]?.();const _0x197f97=(_0x57ef8,_0x49bf41)=>{const _0x599ec9=_0x231f7f;if(!_0x49bf41||typeof _0x49bf41!==_0x599ec9(0x3af)||_0x49bf41[_0x11c9f5]!==_0x831a95)return;if(!_0x577a43?.[_0x599ec9(0x5df)]?.[_0x599ec9(0x477)])return;const _0x4071a4=_0x49bf41[_0x599ec9(0x15d)]||{};_0x577a43[_0x599ec9(0x5df)]['ingest']({..._0x4071a4,'msg':'[w'+_0x49bf41[_0x599ec9(0x5c3)]+']\x20'+(_0x4071a4['msg']??''),'meta':{..._0x4071a4[_0x599ec9(0x2e2)]||{},'worker':_0x49bf41[_0x599ec9(0x5c3)],'workerPid':_0x49bf41[_0x599ec9(0x240)]}});};_0x62ea60['on'](_0x231f7f(0x58f),_0x197f97);const _0x1bc1a5=(_0x55a157,_0xba4a3d)=>{const _0x1131a1=_0x231f7f;if(!_0xba4a3d||typeof _0xba4a3d!=='object'||_0xba4a3d[_0x11c9f5]!==_0x2a12df)return;const _0x470ee1=_0x113708[_0x1131a1(0x2c6)](_0x55a157[_0x1131a1(0x595)][_0x1131a1(0x240)]);if(_0x470ee1){_0x470ee1[_0x1131a1(0x27b)]={..._0xba4a3d[_0x1131a1(0x27b)],'at':Date['now']()};if(_0xba4a3d[_0x1131a1(0x270)]!==undefined)_0x470ee1[_0x1131a1(0x270)]=_0xba4a3d[_0x1131a1(0x270)];}};_0x62ea60['on']('message',_0x1bc1a5),_0x62ea60['on'](_0x231f7f(0x20f),(_0x232814,_0x6c5e6b,_0x89320)=>{const _0x488704=_0x231f7f,_0x58d7d1=_0x232814[_0x488704(0x595)]['pid'],_0x2abdd3=_0x25965f(_0x232814),_0x3ec259=_0x113708['get'](_0x58d7d1);if(_0x3ec259&&_0x577a43?.[_0x488704(0x2b5)])_0x577a43[_0x488704(0x2b5)]['removeNode'](_0x58d7d1+':'+_0x3ec259[_0x488704(0x223)])['catch'](()=>{});_0x113708[_0x488704(0x1d0)](_0x58d7d1),console['log'](_0x488704(0x1ab)+_0x58d7d1+_0x488704(0x4be)+(_0x2abdd3??'?')+_0x488704(0x532)+(_0x488704(0x11f)+_0x6c5e6b+',\x20signal='+(_0x89320??_0x488704(0x568))+_0x488704(0x494)+_0x113708[_0x488704(0x4ea)]+'\x20worker(s)\x20remaining')),_0x686f34();if(_0x142002||_0x2abdd3==null)return;const _0xb258ee=_0x41f8c8[_0x488704(0x2c6)](_0x2abdd3);if(!_0xb258ee||_0xb258ee[_0x488704(0x107)])return;const _0xeda6b1=Date[_0x488704(0x1ad)]();_0xb258ee['deaths'][_0x488704(0x2da)](_0xeda6b1),_0xb258ee['deaths']=_0xb258ee['deaths']['filter'](_0x301245=>_0xeda6b1-_0x301245<=_0x1c0db3);if(_0xb258ee['deaths'][_0x488704(0x533)]>=_0x1fbb74){_0xb258ee['dead']=!![],console[_0x488704(0x209)](_0x488704(0x1e8)+_0x2abdd3+_0x488704(0x16e)+_0xb258ee['deaths'][_0x488704(0x533)]+'\x20times\x20in\x20'+(_0x1c0db3+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x113708[_0x488704(0x4ea)]+'\x20worker(s)\x20still\x20serving'));return;}_0xb258ee['consecutiveFailures']++;const _0x52259e=Math[_0x488704(0x3ba)](_0x39df03,_0x1de307*0x2**(_0xb258ee[_0x488704(0x497)]-0x1));console['log'](_0x488704(0x4bb)+_0x2abdd3+_0x488704(0x424)+_0x52259e+_0x488704(0x407)+_0xb258ee[_0x488704(0x497)]+')'),_0xb258ee['respawnTimer']=setTimeout(()=>{const _0x2e8ea2=_0x488704;_0xb258ee['respawnTimer']=null;if(_0x142002||_0xb258ee[_0x2e8ea2(0x107)])return;const _0x18b871=_0x49db89(_0x2abdd3);_0x18b871[_0x2e8ea2(0x339)](_0x2e8ea2(0x11c),()=>{const _0x4da756=_0x2e8ea2;if(_0x41f8c8[_0x4da756(0x2c6)](_0x2abdd3)===_0xb258ee)_0xb258ee[_0x4da756(0x497)]=0x0;});},_0x52259e),_0xb258ee[_0x488704(0x509)]['unref']?.();});const _0x5bca9d=[..._0x113708[_0x231f7f(0x519)]()];console[_0x231f7f(0x5df)](_0x231f7f(0x1d2)+process['pid']+_0x231f7f(0x508)+_0x80fde0+_0x231f7f(0x3b7)+_0x6cd813+':\x20'+('['+_0x5bca9d['join'](',\x20')+']'));const _0x1c33e8={'_isClusterController':!![],'port':_0x6cd813,'primaryOkdb':_0x577a43??null,'status'(){const _0x54bd1d=_0x231f7f;return{'clustered':!![],'primaryPid':process[_0x54bd1d(0x240)],'port':_0x6cd813,'primaryRole':_0x577a43?.[_0x54bd1d(0x517)]??null,'processorPid':null,'supervisorPid':process[_0x54bd1d(0x240)],'workers':[..._0x113708[_0x54bd1d(0x38b)]()]['map'](({worker:_0x4859b5})=>({'pid':_0x4859b5['process']['pid'],'id':_0x4859b5['id'],'dead':_0x4859b5['isDead']()}))};},async 'close'(){const _0x1ce4f2=_0x231f7f;_0x142002=!![];for(const _0x1bad1c of _0x41f8c8[_0x1ce4f2(0x38b)]()){_0x1bad1c[_0x1ce4f2(0x107)]=!![],_0x1bad1c[_0x1ce4f2(0x509)]&&(clearTimeout(_0x1bad1c[_0x1ce4f2(0x509)]),_0x1bad1c[_0x1ce4f2(0x509)]=null);}clearInterval(_0x21a52e),_0x62ea60[_0x1ce4f2(0x14f)](_0x1ce4f2(0x58f),_0x197f97),_0x62ea60['off'](_0x1ce4f2(0x58f),_0x1bc1a5),_0x577a43?.[_0x1ce4f2(0x52f)]?.[_0x1ce4f2(0x14f)]?.(_0x34a1ef[_0x1ce4f2(0x5a6)],_0xcf4fb);if(_0x577a43?.[_0x1ce4f2(0x52f)]?.[_0x1ce4f2(0x14f)])for(const {event:_0x337815,handler:_0x876f62}of _0x4efc9b){try{_0x577a43['events'][_0x1ce4f2(0x14f)](_0x337815,_0x876f62);}catch{}}_0x4efc9b['length']=0x0;const _0x4ca483=[..._0x113708[_0x1ce4f2(0x38b)]()][_0x1ce4f2(0x4aa)](({worker:_0x5b1ec7})=>_0x5b1ec7);if(_0x4ca483[_0x1ce4f2(0x533)]===0x0)return;await Promise[_0x1ce4f2(0x40a)](_0x4ca483[_0x1ce4f2(0x4aa)](_0x409f31=>new Promise(_0x3ed769=>{const _0x435d36=_0x1ce4f2;if(_0x409f31[_0x435d36(0x228)]()){_0x3ed769();return;}let _0x203f62=![];const _0x309cd7=()=>{if(_0x203f62)return;_0x203f62=!![];if(_0x39db4a)clearTimeout(_0x39db4a);_0x3ed769();};_0x409f31[_0x435d36(0x339)](_0x435d36(0x20f),_0x309cd7);const _0x39db4a=setTimeout(()=>{try{_0x409f31['process']['kill']();}catch{}},_0x2a07c9+0x1f4);_0x39db4a[_0x435d36(0x2e3)]?.();try{_0x409f31[_0x435d36(0x52b)]();}catch{try{_0x409f31[_0x435d36(0x595)][_0x435d36(0x5a5)]();}catch{}}})));}};return _0x1c33e8;}async function _0xf49b51({makeOkdb:_0x24d0bf,port:_0x38196c}){const _0x478392=_0x5ad115,_0x3b2f60=await _0x24d0bf();return _0x162c33(_0x3b2f60),_0x3b2f60['http'][_0x478392(0x324)](_0x38196c);}function _0x162c33(_0x1bb5c1){const _0x2722fa=_0x5ad115;if(!_0x1bb5c1||_0x1bb5c1[_0x2722fa(0x51e)])return;_0x1bb5c1[_0x2722fa(0x51e)]=!![];try{const {OKDBChangefeed:_0x43543d}=requireOkdbChangefeed(),_0x20daca=_0x1bb5c1['_adminRelay'];if(_0x20daca&&typeof _0x20daca['attachFeed']==='function'){const _0xcd2c25=new _0x43543d(_0x1bb5c1);_0xcd2c25[_0x2722fa(0x3b1)](),_0x20daca['attachFeed'](_0xcd2c25),_0x1bb5c1['_changefeed']=_0xcd2c25;}}catch(_0xde1c5){_0x1bb5c1[_0x2722fa(0x5df)]?.[_0x2722fa(0x1f0)]?.(_0x2722fa(0x3c6)+(_0xde1c5?.[_0x2722fa(0x58f)]??_0xde1c5),{'feature':'cluster'});}const _0x3cb9ab=_0x22e2b3=>{const _0x27c784=_0x2722fa;if(!_0x22e2b3||typeof _0x22e2b3!==_0x27c784(0x3af)||_0x22e2b3[_0x11c9f5]==null)return;if(_0x22e2b3[_0x11c9f5]===_0x91c89b)try{_0x1bb5c1[_0x27c784(0x4e4)]?.[_0x27c784(0x113)]?.(_0x22e2b3['event'],_0x22e2b3[_0x27c784(0x535)]);}catch{}};process['on']('message',_0x3cb9ab),_0x1bb5c1[_0x2722fa(0x536)]=_0x3cb9ab;{let _0x39712b=process[_0x2722fa(0x120)](),_0x5a57ac=Date[_0x2722fa(0x1ad)]();const _0x1f2f49=()=>{const _0x11b027=_0x2722fa;if(typeof process[_0x11b027(0x3bc)]!==_0x11b027(0x59d)||!process[_0x11b027(0x4c0)])return;const _0x347733=Date[_0x11b027(0x1ad)](),_0xdb6a7d=process[_0x11b027(0x120)](),_0xaaa31c=(_0x347733-_0x5a57ac)*0x3e8,_0x2744b2=_0xdb6a7d[_0x11b027(0x1cf)]-_0x39712b[_0x11b027(0x1cf)]+(_0xdb6a7d['system']-_0x39712b['system']),_0xa9aa46=_0xaaa31c>0x0?Math[_0x11b027(0x3ba)](0x64,Math[_0x11b027(0x146)](_0x2744b2/(_0xaaa31c*(_0x283438['cpus']()[_0x11b027(0x533)]||0x1))*0x64)):0x0;_0x39712b=_0xdb6a7d,_0x5a57ac=_0x347733;const _0x5f4df0=process[_0x11b027(0x1f7)]();let _0x198c7c=null;try{_0x198c7c=_0x1bb5c1[_0x11b027(0x517)]?.[_0x11b027(0x33f)]?_0x1bb5c1[_0x11b027(0x2b5)]?.[_0x11b027(0x1f3)]?.()??null:null;}catch{}try{process[_0x11b027(0x3bc)]({[_0x11c9f5]:_0x2a12df,'stats':{'rss':_0x5f4df0['rss'],'heapUsed':_0x5f4df0['heapUsed'],'heapTotal':_0x5f4df0[_0x11b027(0x5a7)],'external':_0x5f4df0[_0x11b027(0x410)],'cpuPct':_0xa9aa46,'cpuWindowMs':Math[_0x11b027(0x146)](_0xaaa31c/0x3e8)||null},'processing':_0x198c7c});}catch{}},_0x266dcb=Math[_0x2722fa(0x31b)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4055ad=setInterval(_0x1f2f49,_0x266dcb);_0x4055ad[_0x2722fa(0x2e3)]?.(),_0x1f2f49();for(const _0x257bb3 of[_0x2722fa(0x57b),_0x2722fa(0x387)]){_0x1bb5c1['events']?.['on']?.(_0x257bb3,()=>{try{_0x1f2f49();}catch{}});}}let _0x58798e=![];const _0x58a142=async _0xa8bcea=>{const _0x168ad4=_0x2722fa;if(_0x58798e)return;_0x58798e=!![];const _0x57bd14=setTimeout(()=>process['exit'](_0xa8bcea),_0x2a07c9);_0x57bd14[_0x168ad4(0x2e3)]?.();try{await _0x1bb5c1[_0x168ad4(0x5e4)]?.();}catch{}process['exit'](_0xa8bcea);};process['on'](_0x2722fa(0x52b),()=>_0x58a142(0x0));if(process[_0x2722fa(0x313)]!==_0x2722fa(0x122)){const _0x54ee43=setInterval(()=>{const _0x4cf2a4=_0x2722fa;if(process[_0x4cf2a4(0x340)]===0x1)_0x58a142(0x0);},_0xd14ca9);_0x54ee43['unref']?.(),_0x1bb5c1[_0x2722fa(0x18d)]=_0x54ee43;}}return okdbCluster={'runClustered':_0x5c809c,'attachWorkerCluster':_0x162c33},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0xe0bd2d=_0x4d1b8e;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0xe0bd2d(0x45f)]();}catch{}const _0x2817f4=require$$1,_0x152bdb=require$$1$1,{resolveWorkers:_0x1122ee,isShmbufNative:_0x39a348}=requireOkdbWorkers();function _0x26a0ee(_0x1abe86){const _0x455eab=_0xe0bd2d,_0x575f96=_0x1abe86[_0x455eab(0x352)](0x2),_0x212bd9={};let _0x51d1dc=0x0;while(_0x51d1dc<_0x575f96[_0x455eab(0x533)]){const _0x257296=_0x575f96[_0x51d1dc];if(_0x257296===_0x455eab(0x1b7)||_0x257296==='-p')_0x212bd9[_0x455eab(0x359)]=Number(_0x575f96[++_0x51d1dc]);else{if(_0x257296==='--path'||_0x257296==='-d')_0x212bd9[_0x455eab(0x550)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x318)||_0x257296==='-k')_0x212bd9[_0x455eab(0x547)]=_0x575f96[++_0x51d1dc];else{if(_0x257296==='--config'||_0x257296==='-c')_0x212bd9[_0x455eab(0x171)]=_0x575f96[++_0x51d1dc];else{if(_0x257296==='--log-level')_0x212bd9['logLevel']=_0x575f96[++_0x51d1dc];else{if(_0x257296==='--no-repl')_0x212bd9[_0x455eab(0x1f9)]=!![];else{if(_0x257296==='--no-admin')_0x212bd9['noAdmin']=!![];else{if(_0x257296===_0x455eab(0x2ea))_0x212bd9['workers']=_0x575f96[++_0x51d1dc];else{if(_0x257296==='--no-cluster')_0x212bd9[_0x455eab(0x520)]=!![];else{if(_0x257296==='--env'||_0x257296==='-e')_0x212bd9[_0x455eab(0x268)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x245))_0x212bd9[_0x455eab(0x4ec)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x3e5))_0x212bd9[_0x455eab(0x39b)]=!![];else{if(_0x257296==='--blobs')_0x212bd9[_0x455eab(0x15c)]=!![];else{if(_0x257296==='--drop')_0x212bd9[_0x455eab(0x2c7)]=!![];else{if(_0x257296===_0x455eab(0x438)){const _0x396c87=[];while(_0x51d1dc+0x1<_0x575f96[_0x455eab(0x533)]&&!_0x575f96[_0x51d1dc+0x1][_0x455eab(0x447)]('--')){_0x396c87[_0x455eab(0x2da)](_0x575f96[++_0x51d1dc]);}_0x212bd9['open']=_0x396c87[_0x455eab(0x533)]>0x0?_0x396c87:!![];}else{if(_0x257296===_0x455eab(0x356))_0x212bd9[_0x455eab(0x341)]=!![];else{if(_0x257296===_0x455eab(0x440))_0x212bd9[_0x455eab(0x392)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x30b))_0x212bd9[_0x455eab(0x3fc)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x560))_0x212bd9[_0x455eab(0x492)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x4c4))_0x212bd9[_0x455eab(0x1ae)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x4c8))_0x212bd9['grants']=_0x575f96[++_0x51d1dc];else{if(_0x257296==='--ttl')_0x212bd9['ttl']=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x37a))_0x212bd9['token']=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x2d4)||_0x257296==='-u')_0x212bd9[_0x455eab(0x463)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x12a))_0x212bd9[_0x455eab(0x4e0)]=_0x575f96[++_0x51d1dc];else{if(_0x257296===_0x455eab(0x2b7)||_0x257296==='-v'){const _0x370386=require$$3;console['log'](_0x370386[_0x455eab(0x4b4)]),process['exit'](0x0);}else(_0x257296===_0x455eab(0x559)||_0x257296==='-h')&&(_0xcb07d6(),process[_0x455eab(0x20f)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x51d1dc++;}return _0x212bd9;}function _0xcb07d6(){const _0x209f52=_0xe0bd2d;console[_0x209f52(0x5df)](_0x209f52(0x1f6));}const _0x101ef4=new Set(['debug','info',_0xe0bd2d(0x1f0),_0xe0bd2d(0x209)]);function _0x47f45b(_0x23b67b){const _0x28e851=_0xe0bd2d,_0x38741c=_0x23b67b[_0x28e851(0x171)]?_0x2817f4[_0x28e851(0x100)](_0x23b67b[_0x28e851(0x171)]):_0x2817f4['resolve'](_0x28e851(0x1a4));let _0x19bcff={};if(_0x152bdb[_0x28e851(0x3b2)](_0x38741c))try{const _0x59a8ef=_0x152bdb[_0x28e851(0x102)](_0x38741c,_0x28e851(0x1ba))[_0x28e851(0x18f)](/^\uFEFF/,'');_0x19bcff=JSON[_0x28e851(0x1f2)](_0x59a8ef),console[_0x28e851(0x5df)](_0x28e851(0x2e9)+_0x38741c);}catch(_0x26064a){console[_0x28e851(0x209)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x38741c+':\x20'+_0x26064a[_0x28e851(0x58f)]),process[_0x28e851(0x20f)](0x1);}const _0x3a1ffa={'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},_0x3e997a={'port':_0x23b67b[_0x28e851(0x359)]??_0x19bcff['port']??_0x3a1ffa[_0x28e851(0x359)]??0x2124,'dbPath':_0x23b67b['path']??_0x19bcff[_0x28e851(0x550)]??_0x3a1ffa['path']??_0x28e851(0x4db),'key':_0x23b67b[_0x28e851(0x547)]??_0x19bcff['key']??_0x3a1ffa[_0x28e851(0x547)]??undefined,'logLevel':_0x23b67b[_0x28e851(0x503)]??_0x19bcff[_0x28e851(0x503)]??_0x3a1ffa[_0x28e851(0x503)]??_0x28e851(0x480),'noRepl':_0x23b67b[_0x28e851(0x1f9)]??_0x19bcff[_0x28e851(0x1f9)]??_0x3a1ffa[_0x28e851(0x1f9)]??![],'noAdmin':_0x23b67b[_0x28e851(0x37c)]??_0x19bcff['noAdmin']??_0x3a1ffa[_0x28e851(0x37c)]??![],'admin':_0x19bcff['admin']??{},'api':_0x19bcff['api']??undefined,'auth':_0x19bcff[_0x28e851(0x237)]??undefined,'mcp':_0x19bcff[_0x28e851(0x596)]??undefined,'http':_0x19bcff[_0x28e851(0x446)]??undefined,'timeMachine':_0x19bcff[_0x28e851(0x46e)]!==![]?_0x19bcff['timeMachine']??{}:![]};if(_0x23b67b['noCluster'])_0x3e997a[_0x28e851(0x520)]=!![];if(_0x23b67b[_0x28e851(0x5cb)]!==undefined)_0x3e997a[_0x28e851(0x4b1)]=_0x23b67b['workers'];return _0x23b67b['open']!==undefined&&(_0x3e997a[_0x28e851(0x237)]=_0x3e997a[_0x28e851(0x237)]||{},_0x3e997a['auth']['open']=_0x23b67b[_0x28e851(0x5ab)]),_0x23b67b['logRequests']&&(_0x3e997a['debug']=_0x3e997a['debug']||{},_0x3e997a[_0x28e851(0x307)][_0x28e851(0x341)]=!![]),(!Number['isInteger'](_0x3e997a[_0x28e851(0x359)])||_0x3e997a['port']<0x1||_0x3e997a['port']>0xffff)&&(console[_0x28e851(0x209)]('[okdb]\x20invalid\x20port:\x20'+_0x3e997a[_0x28e851(0x359)]+'\x20(must\x20be\x201–65535)'),process[_0x28e851(0x20f)](0x1)),!_0x101ef4[_0x28e851(0x1ed)](_0x3e997a['logLevel'])&&(console['error'](_0x28e851(0x40c)+_0x3e997a[_0x28e851(0x503)]+_0x28e851(0x29b)),process[_0x28e851(0x20f)](0x1)),_0x3e997a;}function _0x1abe52(_0x252cb4){const _0x435cf4=_0xe0bd2d;return!!(_0x252cb4&&typeof _0x252cb4===_0x435cf4(0x3af)&&!Array[_0x435cf4(0x1d1)](_0x252cb4)&&Object[_0x435cf4(0x519)](_0x252cb4)[_0x435cf4(0x533)]>0x0);}function _0x417b72(_0x1c8468){const _0x2ea2f5=_0xe0bd2d;return{..._0x1c8468[_0x2ea2f5(0x547)]?{'encryptionKey':_0x1c8468[_0x2ea2f5(0x547)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x5c8689=!process[_0xe0bd2d(0x23a)][_0xe0bd2d(0x3f5)]||!!process.env.NO_COLOR;function _0x317f41(_0x3c9ac0,_0x48b3ac){const _0x125cc4=_0xe0bd2d;return _0x5c8689?_0x48b3ac:'\x1b['+_0x3c9ac0+'m'+_0x48b3ac+_0x125cc4(0x4cf);}function _0x5d7526(_0x10d0b5){const _0x584f72=_0xe0bd2d;if(!_0x10d0b5||_0x10d0b5[_0x584f72(0x533)]===0x0)return;const _0x3b46c1='─'[_0x584f72(0x300)](0x38);process['stderr'][_0x584f72(0x476)]('\x0a'),process[_0x584f72(0x4bc)][_0x584f72(0x476)](_0x317f41('33',_0x584f72(0x402)+_0x10d0b5[_0x584f72(0x533)]+_0x584f72(0x3da)+(_0x10d0b5['length']>0x1?'S':'')+'\x0a')),process[_0x584f72(0x4bc)][_0x584f72(0x476)]('\x20\x20'+_0x3b46c1+'\x0a');for(const _0x5849e5 of _0x10d0b5){const _0x4dc289=_0x5849e5[_0x584f72(0x18e)]===_0x584f72(0x209)?_0x317f41('31',_0x584f72(0x134)):_0x317f41('33','\x20\x20⚠');process[_0x584f72(0x4bc)]['write'](_0x4dc289+'\x20\x20'+_0x317f41('1',_0x5849e5[_0x584f72(0x47d)])+'\x0a'),process[_0x584f72(0x4bc)]['write'](_0x584f72(0x3cc)+_0x5849e5[_0x584f72(0x58f)]+'\x0a');if(_0x5849e5[_0x584f72(0x271)])process[_0x584f72(0x4bc)][_0x584f72(0x476)]('\x20\x20\x20\x20\x20\x20\x20'+_0x317f41('2',_0x584f72(0x17d)+_0x5849e5[_0x584f72(0x271)])+'\x0a');process[_0x584f72(0x4bc)][_0x584f72(0x476)]('\x0a');}process[_0x584f72(0x4bc)][_0x584f72(0x476)]('\x20\x20'+_0x3b46c1+'\x0a\x0a');}function _0x18d8ad(_0x1eacec,_0x1b3a56,_0x283e78={}){const _0x5a2301=_0xe0bd2d,_0x2b1573=_0x1eacec[_0x5a2301(0x446)]['listen'](_0x1b3a56,_0x283e78);if(_0x2b1573&&_0x2b1573['_isClusterController'])return Promise[_0x5a2301(0x100)](_0x2b1573);return new Promise((_0x245c0b,_0x2e6381)=>{const _0x5a12f7=_0x5a2301;_0x2b1573[_0x5a12f7(0x339)](_0x5a12f7(0x11c),_0x245c0b),_0x2b1573[_0x5a12f7(0x339)](_0x5a12f7(0x209),_0x2e6381);});}async function _0x33f9d4(_0x25d79f){const _0x10bea7=_0xe0bd2d,_0x26ebb4=require$$4$1;console[_0x10bea7(0x5df)](_0x10bea7(0x116));let _0x13bd0b=!![];const _0x2a334e=(_0x2fd45b,_0x549095)=>{const _0x687ea2=_0x10bea7;console[_0x687ea2(0x5df)]('\x20\x20'+(_0x2fd45b?'✓':'✗')+'\x20'+_0x549095);if(!_0x2fd45b)_0x13bd0b=![];},_0x33cc7c=Number(process[_0x10bea7(0x4b4)]['replace']('v','')['split']('.')[0x0]);_0x2a334e(_0x33cc7c>=0x12,'node\x20'+process[_0x10bea7(0x4b4)]+(_0x33cc7c<0x12?_0x10bea7(0x54f):''));const _0x1b622e=_0x2817f4[_0x10bea7(0x100)](_0x25d79f['dbPath']);try{_0x152bdb['mkdirSync'](_0x1b622e,{'recursive':!![]});const _0x1ba7a7=_0x2817f4[_0x10bea7(0x482)](_0x1b622e,_0x10bea7(0x44f));_0x152bdb[_0x10bea7(0x198)](_0x1ba7a7,''),_0x152bdb[_0x10bea7(0x2a7)](_0x1ba7a7),_0x2a334e(!![],'database\x20path\x20writable:\x20'+_0x1b622e);}catch(_0xac70e9){_0x2a334e(![],_0x10bea7(0x12b)+_0x1b622e+_0x10bea7(0x337)+_0xac70e9[_0x10bea7(0x58f)]+')');}const _0x405979=await new Promise(_0x1bf7e1=>{const _0xa2a9eb=_0x10bea7,_0x37c236=_0x26ebb4[_0xa2a9eb(0x1d6)]();_0x37c236[_0xa2a9eb(0x339)]('error',()=>_0x1bf7e1(![])),_0x37c236[_0xa2a9eb(0x339)]('listening',()=>{const _0x592178=_0xa2a9eb;_0x37c236[_0x592178(0x5e4)](),_0x1bf7e1(!![]);}),_0x37c236['listen'](_0x25d79f['port'],_0xa2a9eb(0x41f));});_0x2a334e(_0x405979,'port\x20'+_0x25d79f[_0x10bea7(0x359)]+'\x20'+(_0x405979?_0x10bea7(0x20d):_0x10bea7(0x29a)));const _0x3ff880=_0x2817f4['resolve'](_0x10bea7(0x1a4));if(_0x152bdb['existsSync'](_0x3ff880))try{JSON[_0x10bea7(0x1f2)](_0x152bdb[_0x10bea7(0x102)](_0x3ff880,_0x10bea7(0x1ba))[_0x10bea7(0x18f)](/^\uFEFF/,'')),_0x2a334e(!![],_0x10bea7(0x499)+_0x3ff880);}catch(_0x401752){_0x2a334e(![],_0x10bea7(0x4fa)+_0x401752['message']);}else _0x2a334e(!![],_0x10bea7(0x216));if(_0x39a348()){const _0x37b48b=_0x1122ee(_0x25d79f,{'shmbufNative':!![]});_0x2a334e(!![],_0x10bea7(0x138)+_0x37b48b+_0x10bea7(0x154)+(_0x37b48b===0x1?'':'s')+')');}else _0x2a334e(!![],_0x10bea7(0x36f));if(!_0x405979)try{const _0x1484b5=require(_0x10bea7(0x24a)),_0x2cdab9=new _0x1484b5(_0x1b622e,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x2cdab9['open']();try{await _0x2cdab9[_0x10bea7(0x2b5)][_0x10bea7(0x5ab)]({'reader':!![]});const _0x200606=_0x2cdab9['processes'][_0x10bea7(0x4f3)](),_0x316e0a=_0x200606['filter'](_0x4c37bc=>_0x4c37bc[_0x10bea7(0x21d)]!=null)['length'];_0x2a334e(!![],_0x10bea7(0x4e2)+_0x200606[_0x10bea7(0x533)]+_0x10bea7(0x1d5)+(_0x200606['length']===0x1?'':'es')+'\x20('+_0x316e0a+_0x10bea7(0xff));}finally{await _0x2cdab9['close']();}}catch{}console[_0x10bea7(0x5df)](''),_0x13bd0b?console['log'](_0x10bea7(0x2ca)):(console['log'](_0x10bea7(0x379)),process['exit'](0x1));}async function _0x59112e(){const _0x431adc=_0xe0bd2d,_0x598bcb=_0x2817f4['resolve'](_0x431adc(0x1a4));!_0x152bdb[_0x431adc(0x3b2)](_0x598bcb)?(_0x152bdb[_0x431adc(0x198)](_0x598bcb,JSON['stringify']({'port':0x2124,'path':_0x431adc(0x4db),'logLevel':_0x431adc(0x480),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x431adc(0x5df)](_0x431adc(0x367))):console[_0x431adc(0x5df)](_0x431adc(0x2f4));const _0x141783=_0x2817f4[_0x431adc(0x100)](_0x431adc(0x4db));!_0x152bdb[_0x431adc(0x3b2)](_0x141783)?(_0x152bdb[_0x431adc(0x58e)](_0x141783,{'recursive':!![]}),console['log'](_0x431adc(0x4d0))):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console['log']('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x3f594c(_0x12a671){const _0x5de400=_0xe0bd2d,_0x3c0660=_0x2817f4['resolve'](_0x12a671[_0x5de400(0x211)]);if(!_0x152bdb[_0x5de400(0x3b2)](_0x3c0660)){console['log']('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x3c0660+_0x5de400(0x2c8));return;}const _0x2535e1=require$$0$3,_0x10c5ac=_0x2535e1[_0x5de400(0x3bf)]({'input':process['stdin'],'output':process[_0x5de400(0x23a)]}),_0x3bfb4b=await new Promise(_0x59f135=>_0x10c5ac[_0x5de400(0x290)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x3c0660+_0x5de400(0x404),_0x59f135));_0x10c5ac[_0x5de400(0x5e4)](),console['log']('');if(_0x3bfb4b[_0x5de400(0x34b)]()[_0x5de400(0x27f)]()!==_0x5de400(0x254)){console['log'](_0x5de400(0x1cb));return;}let _0x11f121=null;try{_0x11f121=await _0x11d49e(_0x3c0660,_0x12a671,async _0x1735df=>{const _0x2a909a=_0x5de400,_0x1cebf5=_0x1735df[_0x2a909a(0x2d0)],_0x8fd823=_0x1cebf5?.['db']?.[_0x2a909a(0x2c6)](_0x2a909a(0x433))??null,_0x109fe7=[];if(_0x1cebf5?.[_0x2a909a(0x474)]('~licenses'))for(const {key:_0x1143ad,value:_0x217861}of _0x1cebf5[_0x2a909a(0x306)](_0x2a909a(0x4fb))){_0x109fe7[_0x2a909a(0x2da)]({'key':_0x1143ad,'value':_0x217861});}return{'identity':_0x8fd823,'licenses':_0x109fe7};});}catch(_0x1323c9){console[_0x5de400(0x5df)](_0x5de400(0x327)+_0x1323c9[_0x5de400(0x58f)]+_0x5de400(0x531));}_0x152bdb['rmSync'](_0x3c0660,{'recursive':!![],'force':!![]}),console[_0x5de400(0x5df)](_0x5de400(0x580)+_0x3c0660+_0x5de400(0x4af));if(_0x11f121&&(_0x11f121[_0x5de400(0x10f)]||_0x11f121[_0x5de400(0x31c)][_0x5de400(0x533)]>0x0))try{await _0x11d49e(_0x3c0660,_0x12a671,async _0x22e1e8=>{const _0xc13e=_0x5de400,_0x57e362=_0x22e1e8['_systemEnv'];_0x11f121[_0xc13e(0x10f)]&&_0x57e362['db']['putSync']('__identity',_0x11f121[_0xc13e(0x10f)]);if(_0x11f121[_0xc13e(0x31c)][_0xc13e(0x533)]>0x0){if(!_0x57e362['hasType']('~licenses'))await _0x57e362[_0xc13e(0x3b9)]('~licenses');for(const {key:_0x5cac5d,value:_0x2d5080}of _0x11f121['licenses']){await _0x57e362[_0xc13e(0x346)](_0xc13e(0x4fb),_0x5cac5d,_0x2d5080);}}});const _0x1fd905=[];if(_0x11f121[_0x5de400(0x10f)])_0x1fd905[_0x5de400(0x2da)]('node\x20identity');if(_0x11f121[_0x5de400(0x31c)][_0x5de400(0x533)]>0x0)_0x1fd905['push'](_0x11f121[_0x5de400(0x31c)][_0x5de400(0x533)]+_0x5de400(0x552));console[_0x5de400(0x5df)](_0x5de400(0x55c)+_0x1fd905[_0x5de400(0x482)](_0x5de400(0x294)));}catch(_0x28c376){console[_0x5de400(0x5df)](_0x5de400(0x3a9)+_0x28c376['message']);}}async function _0x11d49e(_0x503b32,_0x40e759,_0x447958){const _0x13555c=require$$5,_0x4fdb1a=new _0x13555c(_0x503b32,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x417b72(_0x40e759)});await _0x4fdb1a['open']();try{return await _0x447958(_0x4fdb1a);}finally{await _0x4fdb1a['close']();}}async function _0x31b284(_0x335f13,_0x2977b7){const _0x477c75=_0xe0bd2d,_0x4fc614=require$$5,_0x34bd0a=_0x2817f4[_0x477c75(0x100)](_0x2977b7[_0x477c75(0x211)]);console[_0x477c75(0x5df)](_0x477c75(0x243)+_0x34bd0a+'…');const _0x33351f=new _0x4fc614(_0x34bd0a,_0x417b72(_0x2977b7));await _0x33351f['open'](),console[_0x477c75(0x5df)](_0x477c75(0x57d)+_0x335f13+'…');const {envs:_0x268512}=await _0x33351f[_0x477c75(0x2f5)][_0x477c75(0x2db)](_0x335f13);for(const _0x19510f of _0x268512){const _0x3b7fbc=_0x19510f[_0x477c75(0x14e)]>0x0?_0x477c75(0x337)+(_0x19510f['sizeBefore']/0x400/0x400)[_0x477c75(0x5de)](0x2)+_0x477c75(0x3f4)+(_0x19510f[_0x477c75(0x3a0)]/0x400/0x400)[_0x477c75(0x5de)](0x2)+_0x477c75(0x274):'';console[_0x477c75(0x5df)]('\x20\x20✓\x20'+_0x19510f[_0x477c75(0x392)]+'\x20\x20→\x20\x20'+_0x19510f['dest']+_0x3b7fbc);}await _0x33351f[_0x477c75(0x5e4)](),console[_0x477c75(0x5df)](_0x477c75(0x4a8));}async function _0x103c8c(_0x253b62,_0x20b1be,_0x40dc55){const _0x127474=_0xe0bd2d,_0x5a3ee1=require$$5,_0x5b8448=_0x2817f4[_0x127474(0x100)](_0x20b1be[_0x127474(0x211)]),_0x517962=_0x40dc55[_0x127474(0x268)]??_0x127474(0x3c2),_0x1fb01a=_0x40dc55['types']?_0x40dc55[_0x127474(0x4ec)][_0x127474(0x41b)](',')[_0x127474(0x4aa)](_0x4b61f9=>_0x4b61f9['trim']()):null;console['log'](_0x127474(0x243)+_0x5b8448+'…');const _0x2f876b=new _0x5a3ee1(_0x5b8448,_0x417b72(_0x20b1be));await _0x2f876b[_0x127474(0x5ab)](),console['log'](_0x127474(0x2a6)+_0x517962+_0x127474(0x581)+_0x253b62+'…');const _0x3050ed=await _0x2f876b['migrate']['exportToFile'](_0x253b62,{'envName':_0x517962,'types':_0x1fb01a,'includeChanges':!!_0x40dc55[_0x127474(0x39b)]});console['log'](_0x127474(0x241)+_0x3050ed[_0x127474(0x4ec)]+_0x127474(0x219)+_0x3050ed[_0x127474(0x17f)]+_0x127474(0x23b)+_0x3050ed['changes']);if(_0x40dc55[_0x127474(0x15c)]){const _0x315ea1=_0x2817f4['join'](_0x2817f4[_0x127474(0x551)](_0x253b62),_0x127474(0x15c));process[_0x127474(0x23a)][_0x127474(0x476)]('[okdb]\x20exporting\x20blobs…');const {count:_0x3dd6c3,bytes:_0x33b885}=await _0x2f876b[_0x127474(0x2f5)][_0x127474(0x467)](_0x315ea1);console[_0x127474(0x5df)](_0x127474(0x5e3)+_0x315ea1+_0x127474(0x337)+_0x3dd6c3+_0x127474(0x488)+(_0x3dd6c3!==0x1?'s':'')+',\x20'+(_0x33b885/0x400/0x400)['toFixed'](0x2)+'\x20MB)');}await _0x2f876b[_0x127474(0x5e4)](),console[_0x127474(0x5df)]('[okdb]\x20export\x20complete');}async function _0x1038fb(_0x369aa0,_0x42bd91,_0x3ec710){const _0x594f70=_0xe0bd2d,_0x4ec14a=require$$5,_0xd213df=_0x2817f4[_0x594f70(0x100)](_0x42bd91[_0x594f70(0x211)]),_0xfd6cb0=_0x3ec710[_0x594f70(0x268)]??null,_0x10bddd=_0x3ec710[_0x594f70(0x4ec)]?_0x3ec710[_0x594f70(0x4ec)][_0x594f70(0x41b)](',')[_0x594f70(0x4aa)](_0x22c02f=>_0x22c02f[_0x594f70(0x34b)]()):null,_0x577a3d=!!_0x3ec710['drop'];console['log'](_0x594f70(0x243)+_0xd213df+'…');const _0x505072=new _0x4ec14a(_0xd213df,_0x417b72(_0x42bd91));await _0x505072[_0x594f70(0x5ab)](),console['log'](_0x594f70(0x26d)+_0x369aa0+'…');const _0x17b066=await _0x505072[_0x594f70(0x2f5)][_0x594f70(0x538)](_0x369aa0,{'envName':_0xfd6cb0,'types':_0x10bddd,'dropExisting':_0x577a3d,'includeChanges':!!_0x3ec710[_0x594f70(0x39b)],'onProgress':({type:_0xae2428,count:_0x3e5e30})=>{const _0x233d20=_0x594f70;process['stdout'][_0x233d20(0x476)](_0x233d20(0x29f)+_0xae2428+':\x20'+_0x3e5e30+'\x20records…');}});process[_0x594f70(0x23a)][_0x594f70(0x476)]('\x0a'),console['log'](_0x594f70(0x19b)+_0x17b066['types']+_0x594f70(0x219)+_0x17b066[_0x594f70(0x17f)]+'\x20\x20changes='+_0x17b066[_0x594f70(0x39b)]);if(_0x3ec710[_0x594f70(0x15c)]){const _0x333f39=_0x2817f4[_0x594f70(0x482)](_0x2817f4['dirname'](_0x369aa0),_0x594f70(0x15c));if(_0x152bdb[_0x594f70(0x3b2)](_0x333f39)){const {imported:_0x41f8e0,skipped:_0xc7ee6}=await _0x505072[_0x594f70(0x2f5)]['importBlobs'](_0x333f39);console['log'](_0x594f70(0x468)+_0x41f8e0+'\x20\x20skipped='+_0xc7ee6);}}await _0x505072[_0x594f70(0x5e4)](),console['log'](_0x594f70(0x3cf));}async function _0x23d57a(_0x112223,_0x3b9163){const _0x2c5acf=_0xe0bd2d;_0x3b9163['password']&&!_0x3b9163['name']&&(console[_0x2c5acf(0x209)](_0x2c5acf(0x342)),process['exit'](0x1));const _0x2beb50=_0x3b9163[_0x2c5acf(0x1ae)]?_0x3b9163[_0x2c5acf(0x1ae)][_0x2c5acf(0x41b)](',')[_0x2c5acf(0x4aa)](_0x43b55d=>_0x43b55d['trim']())[_0x2c5acf(0x1c1)](Boolean):[];let _0x4441de={};if(_0x3b9163['grants'])try{_0x4441de=JSON[_0x2c5acf(0x1f2)](_0x3b9163['grants']);if(typeof _0x4441de!=='object'||Array[_0x2c5acf(0x1d1)](_0x4441de)||_0x4441de===null)throw new Error();}catch{console['error'](_0x2c5acf(0x32f)),process[_0x2c5acf(0x20f)](0x1);}const _0x75c573=require$$5,{randomToken:_0xb64af6,hashToken:_0xe18571,hashPassword:_0x1f7e1e}=requireOkdbAuthTokens(),_0x48cfe8=require$$0$1,_0x3215c7=_0x2817f4['resolve'](_0x112223[_0x2c5acf(0x211)]),_0x4366b0=new _0x75c573(_0x3215c7,_0x417b72(_0x112223));await _0x4366b0[_0x2c5acf(0x5ab)]();try{await _0x4366b0[_0x2c5acf(0x237)][_0x2c5acf(0x5db)]();if(_0x3b9163[_0x2c5acf(0x392)]){const _0xc22f1d=await _0x4366b0[_0x2c5acf(0x237)]['_lookupByName'](_0x3b9163[_0x2c5acf(0x392)]);_0xc22f1d&&(console[_0x2c5acf(0x209)](_0x2c5acf(0x233)+_0x3b9163[_0x2c5acf(0x392)]+'\x22\x20already\x20exists'),process['exit'](0x1));}const _0x1b35d0=_0xb64af6(0x20),_0x114220=_0xe18571(_0x1b35d0),_0x49d836=_0x3b9163['password']?await _0x1f7e1e(_0x3b9163[_0x2c5acf(0x3fc)]):null,_0xe38d33=_0x48cfe8['randomUUID'](),_0x1e22c1={'tokenHash':_0x114220,'name':_0x3b9163['name']||null,'passwordHash':_0x49d836,'label':_0x3b9163[_0x2c5acf(0x492)]||null,'permissions':_0x2beb50,'grants':_0x4441de,'createdAt':Date[_0x2c5acf(0x1ad)](),'lastUsedAt':null},_0x5601d8=_0x3b9163[_0x2c5acf(0x2a3)]?{'ttl':Number(_0x3b9163['ttl'])}:undefined;await _0x4366b0['_systemEnv'][_0x2c5acf(0x346)]('~tokens',_0xe38d33,_0x1e22c1,_0x5601d8),console['log'](_0x2c5acf(0x278)),console[_0x2c5acf(0x5df)](_0x2c5acf(0x2c3)+_0xe38d33),console[_0x2c5acf(0x5df)](_0x2c5acf(0x3d0)+(_0x3b9163['name']||'(unset)')),console['log'](_0x2c5acf(0x544)+(_0x3b9163[_0x2c5acf(0x492)]||_0x2c5acf(0x283))),console[_0x2c5acf(0x5df)](_0x2c5acf(0x57f)+(_0x2beb50[_0x2c5acf(0x482)](',\x20')||_0x2c5acf(0x1d3))),console['log'](_0x2c5acf(0x26c)),console[_0x2c5acf(0x5df)](_0x2c5acf(0x235)+_0x1b35d0+'\x0a');}finally{await _0x4366b0[_0x2c5acf(0x5e4)]();}}async function _0x519940(_0xb64140){const _0x28a893=_0xe0bd2d,_0x427006=require$$5,_0x139964=_0x2817f4['resolve'](_0xb64140[_0x28a893(0x211)]),_0x52ba6a=new _0x427006(_0x139964,_0x417b72(_0xb64140));await _0x52ba6a[_0x28a893(0x5ab)]();try{const _0xf62fd=_0x52ba6a[_0x28a893(0x2d0)];if(!_0xf62fd||!_0xf62fd[_0x28a893(0x474)](_0x28a893(0x3ed))){console['log'](_0x28a893(0x1f8));return;}const _0x393b0f=[];for(const {key:_0x501f79,value:_0x1a3c93}of _0xf62fd[_0x28a893(0x306)](_0x28a893(0x3ed))){_0x393b0f[_0x28a893(0x2da)]({'id':_0x501f79,'name':_0x1a3c93[_0x28a893(0x392)]||_0x28a893(0x283),'label':_0x1a3c93[_0x28a893(0x492)]||'(unset)','permissions':Array['isArray'](_0x1a3c93['permissions'])?_0x1a3c93['permissions'][_0x28a893(0x482)](','):'','created':_0x1a3c93[_0x28a893(0x4eb)]?new Date(_0x1a3c93[_0x28a893(0x4eb)])[_0x28a893(0x431)]()[_0x28a893(0x352)](0x0,0xa):''});}if(_0x393b0f[_0x28a893(0x533)]===0x0){console[_0x28a893(0x5df)]('No\x20tokens.');return;}const _0xe47188=!process[_0x28a893(0x23a)][_0x28a893(0x51f)]||process[_0x28a893(0x23a)]['columns']>=0x64,_0x1e7adb=_0xe47188?0x24:0xa,_0x1fc47c=['ID'['padEnd'](_0x1e7adb),_0x28a893(0x5cc)[_0x28a893(0x588)](0x10),_0x28a893(0x50a)['padEnd'](0x14),_0x28a893(0x27e)[_0x28a893(0x588)](0x14),_0x28a893(0x475)][_0x28a893(0x482)]('\x20\x20');console[_0x28a893(0x5df)]('\x0a'+_0x1fc47c),console['log']('-'[_0x28a893(0x300)](_0x1fc47c[_0x28a893(0x533)]));for(const _0x5e162f of _0x393b0f){const _0x833ab=_0xe47188?_0x5e162f['id']:_0x5e162f['id'][_0x28a893(0x352)](0x0,0x8)+'…';console[_0x28a893(0x5df)]([_0x833ab[_0x28a893(0x588)](_0x1e7adb),_0x5e162f[_0x28a893(0x392)][_0x28a893(0x352)](0x0,0x10)[_0x28a893(0x588)](0x10),_0x5e162f[_0x28a893(0x492)][_0x28a893(0x352)](0x0,0x14)[_0x28a893(0x588)](0x14),_0x5e162f[_0x28a893(0x1ae)][_0x28a893(0x352)](0x0,0x14)[_0x28a893(0x588)](0x14),_0x5e162f['created']][_0x28a893(0x482)]('\x20\x20'));}console[_0x28a893(0x5df)]('');}finally{await _0x52ba6a[_0x28a893(0x5e4)]();}}async function _0x3b6ea1(_0x551d05,_0x1b38c4){const _0x4e5138=_0xe0bd2d;!_0x551d05&&(console['error']('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x4e5138(0x20f)](0x1));const _0x4f8f3b=require$$5,_0x568f7d=_0x2817f4['resolve'](_0x1b38c4[_0x4e5138(0x211)]),_0x319298=new _0x4f8f3b(_0x568f7d,_0x417b72(_0x1b38c4));await _0x319298['open']();try{const _0x3b3f5a=_0x319298['_systemEnv'];(!_0x3b3f5a||!_0x3b3f5a[_0x4e5138(0x474)](_0x4e5138(0x3ed)))&&(console[_0x4e5138(0x209)](_0x4e5138(0x57e)+_0x551d05+'\x22'),process[_0x4e5138(0x20f)](0x1));let _0x267f3f=null,_0x52e3b1=null;const _0x422670=_0x3b3f5a[_0x4e5138(0x2c6)](_0x4e5138(0x3ed),_0x551d05);if(_0x422670)_0x267f3f=_0x551d05,_0x52e3b1=_0x422670;else{const _0x299f57=[];for(const {key:_0x555ed9,value:_0x32b49e}of _0x3b3f5a[_0x4e5138(0x306)](_0x4e5138(0x3ed))){if(_0x555ed9[_0x4e5138(0x447)](_0x551d05))_0x299f57[_0x4e5138(0x2da)]({'key':_0x555ed9,'value':_0x32b49e});}_0x299f57['length']===0x0&&(console[_0x4e5138(0x209)](_0x4e5138(0x57e)+_0x551d05+'\x22'),process['exit'](0x1));if(_0x299f57[_0x4e5138(0x533)]>0x1){console[_0x4e5138(0x209)](_0x4e5138(0x262)+_0x551d05+_0x4e5138(0x186)+_0x299f57[_0x4e5138(0x533)]+_0x4e5138(0x5d5));for(const _0x5a6440 of _0x299f57){console[_0x4e5138(0x209)]('\x20\x20'+_0x5a6440[_0x4e5138(0x547)]+_0x4e5138(0x143)+(_0x5a6440[_0x4e5138(0x156)]['name']||_0x4e5138(0x283))+')');}process[_0x4e5138(0x20f)](0x1);}_0x267f3f=_0x299f57[0x0][_0x4e5138(0x547)],_0x52e3b1=_0x299f57[0x0][_0x4e5138(0x156)];}await _0x3b3f5a['remove'](_0x4e5138(0x3ed),_0x267f3f),console[_0x4e5138(0x5df)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x267f3f+_0x4e5138(0x143)+(_0x52e3b1[_0x4e5138(0x392)]||_0x4e5138(0x283))+',\x20label:\x20'+(_0x52e3b1['label']||_0x4e5138(0x283))+')');}finally{await _0x319298['close']();}}function _0x5bfc92(_0x42146d,_0x2b1c37){const _0x21a895=_0xe0bd2d;if(!_0x42146d[_0x21a895(0x167)])return _0x21a895(0x2be);const _0x1a0926=_0x42146d[_0x21a895(0x420)];if(!_0x1a0926)return _0x21a895(0x2fe);if(_0x2b1c37>_0x1a0926)return _0x21a895(0x2e1);return _0x21a895(0x2fe);}function _0x2852b6(_0x22d320){const _0x310289=_0xe0bd2d;if(!_0x22d320||typeof _0x22d320!==_0x310289(0x3af))return'';const _0xc09c0d=Object[_0x310289(0x320)](_0x22d320)[_0x310289(0x1c1)](([,_0x32795b])=>_0x32795b)[_0x310289(0x4aa)](([_0x17f19a])=>_0x17f19a);if(_0xc09c0d[_0x310289(0x533)]===0x0)return'(none)';if(_0xc09c0d[_0x310289(0x533)]<=0x3)return _0xc09c0d[_0x310289(0x482)]('\x20');return _0xc09c0d[_0x310289(0x352)](0x0,0x3)[_0x310289(0x482)]('\x20')+('\x20+'+(_0xc09c0d[_0x310289(0x533)]-0x3));}async function _0x19bcb0(_0x18d123){const _0x373f3c=_0xe0bd2d,_0x5dacd0=require$$5,_0xbb345f=requireOkdbLicenseCodec(),{_C:_0x183f38}=requireOkdbLicense(),_0x4fb354=_0x2817f4['resolve'](_0x18d123[_0x373f3c(0x211)]),_0xbd4613=new _0x5dacd0(_0x4fb354,_0x417b72(_0x18d123));await _0xbd4613[_0x373f3c(0x5ab)]();try{const _0x50ce76=_0xbd4613[_0x373f3c(0x2d0)],_0x2019ff=_0x50ce76?.['db']?.['get']?.('__writeCounter')??0x0,_0x586b83=[..._0xbd4613[_0x373f3c(0x1da)][_0x373f3c(0x519)]()][_0x373f3c(0x1c1)](_0x417690=>!_0x417690[_0x373f3c(0x447)]('~'))[_0x373f3c(0x533)],_0xc15e7f=_0xbd4613[_0x373f3c(0x44d)]?.[_0x373f3c(0x38f)];if(_0xc15e7f){const _0x552074=_0xc15e7f[_0x373f3c(0x589)]===!![],_0x1ef4a9=_0x552074?_0x373f3c(0x45d):_0xbd4613['_license'][_0x373f3c(0x2fe)]?.['licensee']||'licensed';console[_0x373f3c(0x5df)](''),console['log']('\x20\x20Tier:\x20\x20\x20\x20'+_0x1ef4a9);const _0x12172c=_0xc15e7f[_0x373f3c(0x2c0)]||{};if(_0x12172c[_0x373f3c(0x261)]){const _0x11266f=Math[_0x373f3c(0x146)](_0x2019ff/_0x12172c['maxWrites']*0x64);console[_0x373f3c(0x5df)](_0x373f3c(0x570)+_0x2019ff[_0x373f3c(0x3cd)]()+'\x20/\x20'+_0x12172c['maxWrites'][_0x373f3c(0x3cd)]()+'\x20\x20('+_0x11266f+'%)');}else console[_0x373f3c(0x5df)]('\x20\x20Writes:\x20\x20'+_0x2019ff['toLocaleString']());_0x12172c[_0x373f3c(0x3a8)]?console[_0x373f3c(0x5df)](_0x373f3c(0x288)+_0x586b83+_0x373f3c(0x16c)+_0x12172c[_0x373f3c(0x3a8)]):console[_0x373f3c(0x5df)](_0x373f3c(0x288)+_0x586b83),_0x183f38?.[_0x373f3c(0x1ec)]&&console[_0x373f3c(0x5df)](_0x373f3c(0x12e)+_0x183f38[_0x373f3c(0x1ec)]+_0x373f3c(0x1c7));}if(!_0x50ce76||!_0x50ce76['hasType']('~licenses')){console[_0x373f3c(0x5df)](''),console[_0x373f3c(0x5df)](_0x373f3c(0x585)),console[_0x373f3c(0x5df)]('');return;}const _0xc5007a=[],_0x35e8b1=Date[_0x373f3c(0x1ad)](),_0x577232=_0xbd4613['id'],_0x4f1303='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x5d853b,value:_0x25d8b5}of _0x50ce76['getRange']('~licenses')){const _0x5a8b8e=_0x25d8b5[_0x373f3c(0x22b)]?Buffer['from'](_0x25d8b5[_0x373f3c(0x22b)],'hex'):Buffer[_0x373f3c(0x457)](0x8);let _0x24d8d4='';try{_0x24d8d4=_0xbb345f['derivePin'](_0x577232,_0x5a8b8e,_0x4f1303)[_0x373f3c(0x112)];}catch{}_0xc5007a[_0x373f3c(0x2da)]({'id':_0x5d853b,'licensee':_0x25d8b5[_0x373f3c(0x3d6)]||'','expires':_0x25d8b5[_0x373f3c(0x420)]?new Date(_0x25d8b5[_0x373f3c(0x420)])[_0x373f3c(0x431)]()[_0x373f3c(0x352)](0x0,0xa):'','features':_0x2852b6(_0x25d8b5[_0x373f3c(0x3df)]),'pin':_0x24d8d4,'status':_0x5bfc92(_0x25d8b5,_0x35e8b1)});}if(_0xc5007a[_0x373f3c(0x533)]===0x0){console['log'](''),console[_0x373f3c(0x5df)](_0x373f3c(0x585)),console[_0x373f3c(0x5df)]('');return;}const _0x2d3458=['\x20\x20'+'ID'[_0x373f3c(0x588)](0xe),_0x373f3c(0x2bc)[_0x373f3c(0x588)](0xe),'EXPIRES'['padEnd'](0xc),_0x373f3c(0x200)['padEnd'](0x1e),_0x373f3c(0x3f8)[_0x373f3c(0x588)](0xa),'STATUS']['join']('\x20');console[_0x373f3c(0x5df)]('\x0a'+_0x2d3458);for(const _0x12b840 of _0xc5007a){const _0x678388=_0x12b840['id'][_0x373f3c(0x352)](0x0,0x8)+'\u2026';console['log'](['\x20\x20'+_0x678388[_0x373f3c(0x588)](0xe),_0x12b840[_0x373f3c(0x3d6)][_0x373f3c(0x352)](0x0,0xe)[_0x373f3c(0x588)](0xe),_0x12b840[_0x373f3c(0x450)]['padEnd'](0xc),_0x12b840[_0x373f3c(0x3df)][_0x373f3c(0x352)](0x0,0x1e)['padEnd'](0x1e),_0x12b840[_0x373f3c(0x112)][_0x373f3c(0x588)](0xa),_0x12b840[_0x373f3c(0x126)]]['join']('\x20'));}console[_0x373f3c(0x5df)]('');}finally{await _0xbd4613[_0x373f3c(0x5e4)]();}}async function _0x4a45be(_0x3b99e4,_0x571559){const _0x255b2d=_0xe0bd2d,_0x10baa4=require$$5,_0x4c07bc=requireOkdbLicenseCodec();let _0x51a281=_0x3b99e4;(_0x4c07bc['detectInputType'](_0x3b99e4)===_0x255b2d(0x550)||_0x152bdb[_0x255b2d(0x3b2)](_0x3b99e4)&&_0x152bdb[_0x255b2d(0x2d6)](_0x3b99e4)[_0x255b2d(0x506)]())&&(_0x51a281=_0x152bdb[_0x255b2d(0x102)](_0x3b99e4,_0x255b2d(0x1ba))['trim']());const _0x491541=_0x2817f4[_0x255b2d(0x100)](_0x571559[_0x255b2d(0x211)]),_0x73d045=new _0x10baa4(_0x491541,_0x417b72(_0x571559));await _0x73d045['open']();try{!_0x73d045['_license']&&(console[_0x255b2d(0x209)](_0x255b2d(0x5c7)),process[_0x255b2d(0x20f)](0x1));let _0x4e698f;try{_0x4e698f=await _0x73d045[_0x255b2d(0x44d)][_0x255b2d(0x2cf)](_0x51a281);}catch(_0xff50d9){console[_0x255b2d(0x209)](_0x255b2d(0x487)+_0xff50d9[_0x255b2d(0x58f)]),process[_0x255b2d(0x20f)](0x1);}const _0x50ffcf=_0x73d045['_license']['getPins'](),_0x35a033=_0x50ffcf[_0x255b2d(0x106)](_0x194e10=>_0x194e10[_0x255b2d(0x12c)]===_0x4e698f['id'])?.[_0x255b2d(0x112)]||'',_0x2b39d6=Object[_0x255b2d(0x320)](_0x4e698f[_0x255b2d(0x3df)]||{})[_0x255b2d(0x1c1)](([,_0x2c63f3])=>_0x2c63f3)[_0x255b2d(0x4aa)](([_0x5789f9])=>_0x5789f9),_0x1d6ee9=_0x4e698f[_0x255b2d(0x2c0)]||{},_0x8ca3d1=[_0x1d6ee9[_0x255b2d(0x3a8)]?'envs='+_0x1d6ee9[_0x255b2d(0x3a8)]:null,_0x1d6ee9[_0x255b2d(0x21c)]?_0x255b2d(0x4cd)+_0x1d6ee9[_0x255b2d(0x21c)]:null,_0x1d6ee9[_0x255b2d(0x349)]?'peers='+_0x1d6ee9['syncPeers']:null,_0x1d6ee9[_0x255b2d(0x261)]?_0x255b2d(0x104)+_0x1d6ee9['maxWrites'][_0x255b2d(0x3cd)]():null]['filter'](Boolean)['join']('\x20\x20'),_0x571c47=_0x4e698f[_0x255b2d(0x422)]===_0x4c07bc['LICENSE_TYPE_OPEN'];console[_0x255b2d(0x5df)](_0x255b2d(0x1e6)),console[_0x255b2d(0x5df)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e698f['id']),console[_0x255b2d(0x5df)](_0x255b2d(0x5ad)+_0x4e698f[_0x255b2d(0x3d6)]),console[_0x255b2d(0x5df)](_0x255b2d(0x5a0)+new Date(_0x4e698f['expiresAt'])[_0x255b2d(0x431)]()[_0x255b2d(0x352)](0x0,0xa)),console[_0x255b2d(0x5df)](_0x255b2d(0x527)+(_0x2b39d6[_0x255b2d(0x482)](',\x20')||_0x255b2d(0x1d3)));if(_0x8ca3d1)console[_0x255b2d(0x5df)](_0x255b2d(0x1b8)+_0x8ca3d1);_0x571c47?(console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x255b2d(0x5df)]('')):(console[_0x255b2d(0x5df)](_0x255b2d(0x101)+_0x35a033),console[_0x255b2d(0x5df)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console[_0x255b2d(0x5df)](''),console[_0x255b2d(0x5df)](_0x255b2d(0x336)),console['log']('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x35a033+_0x255b2d(0x253)),console[_0x255b2d(0x5df)](_0x255b2d(0x5d1)),console['log'](_0x255b2d(0x230)),console[_0x255b2d(0x5df)](''));}finally{await _0x73d045[_0x255b2d(0x5e4)]();}}async function _0x2aba44(_0x310ae1,_0x1b37e0){const _0x1d1080=_0xe0bd2d,_0x46ff8f=require$$5,_0x1b6b95=_0x2817f4[_0x1d1080(0x100)](_0x1b37e0['dbPath']),_0x340325=new _0x46ff8f(_0x1b6b95,_0x417b72(_0x1b37e0));await _0x340325[_0x1d1080(0x5ab)]();try{!_0x340325[_0x1d1080(0x44d)]&&(console[_0x1d1080(0x209)](_0x1d1080(0x5c7)),process['exit'](0x1));let _0x328324;try{_0x328324=await _0x340325[_0x1d1080(0x44d)][_0x1d1080(0x3a4)](_0x310ae1['trim']());}catch(_0x34dc7c){console['error'](_0x1d1080(0x487)+_0x34dc7c[_0x1d1080(0x58f)]),console[_0x1d1080(0x209)](''),console['error'](_0x1d1080(0x2d2)),console[_0x1d1080(0x209)](_0x1d1080(0x2f3)),console[_0x1d1080(0x209)](_0x1d1080(0x554)),console[_0x1d1080(0x209)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x1d1080(0x209)](''),process[_0x1d1080(0x20f)](0x1);}console['log'](_0x1d1080(0x22a)),console['log'](_0x1d1080(0x481)+_0x328324['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x328324['licensee']),console['log'](_0x1d1080(0x5a0)+new Date(_0x328324[_0x1d1080(0x420)])[_0x1d1080(0x431)]()['slice'](0x0,0xa)),console[_0x1d1080(0x5df)](_0x1d1080(0x426)),console[_0x1d1080(0x5df)]('');}finally{await _0x340325[_0x1d1080(0x5e4)]();}}async function _0x66da90(_0x4b9949,_0x36c5f2){const _0xf23fe=_0xe0bd2d;!_0x4b9949&&(console[_0xf23fe(0x209)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0xf23fe(0x20f)](0x1));const _0x2d7eb9=require$$5,_0xdb881f=requireOkdbLicenseCodec(),_0x43bab2=_0x2817f4[_0xf23fe(0x100)](_0x36c5f2[_0xf23fe(0x211)]),_0x586bfc=new _0x2d7eb9(_0x43bab2,_0x417b72(_0x36c5f2));await _0x586bfc[_0xf23fe(0x5ab)]();try{const _0x528ee0=_0x586bfc[_0xf23fe(0x2d0)];(!_0x528ee0||!_0x528ee0[_0xf23fe(0x474)](_0xf23fe(0x4fb)))&&(console[_0xf23fe(0x209)](_0xf23fe(0x462)+_0x4b9949+'\x22'),process[_0xf23fe(0x20f)](0x1));let _0x46a70a=null,_0x147573=null;const _0x54b65c=_0x528ee0[_0xf23fe(0x2c6)]('~licenses',_0x4b9949);if(_0x54b65c)_0x46a70a=_0x4b9949,_0x147573=_0x54b65c;else{const _0x45c3eb=[];for(const {key:_0x32115b,value:_0x1387a7}of _0x528ee0['getRange'](_0xf23fe(0x4fb))){if(_0x32115b[_0xf23fe(0x447)](_0x4b9949))_0x45c3eb[_0xf23fe(0x2da)]({'key':_0x32115b,'value':_0x1387a7});}_0x45c3eb[_0xf23fe(0x533)]===0x0&&(console[_0xf23fe(0x209)](_0xf23fe(0x462)+_0x4b9949+'\x22'),process['exit'](0x1)),_0x45c3eb[_0xf23fe(0x533)]>0x1&&(console['error'](_0xf23fe(0x262)+_0x4b9949+'\x22\x20matches\x20'+_0x45c3eb[_0xf23fe(0x533)]+'\x20licenses'),process['exit'](0x1)),_0x46a70a=_0x45c3eb[0x0]['key'],_0x147573=_0x45c3eb[0x0][_0xf23fe(0x156)];}const _0x25a57a=Date['now'](),_0x251a04=_0x5bfc92(_0x147573,_0x25a57a),_0x5a1ead=_0x586bfc['id'],_0x2ba6c0='__OKDB_PUB_FINGERPRINT__';let _0x4cecce='';try{const _0x3f99b2=Buffer['from'](_0x147573[_0xf23fe(0x22b)],_0xf23fe(0x394));_0x4cecce=_0xdb881f['derivePin'](_0x5a1ead,_0x3f99b2,_0x2ba6c0)['pin'];}catch{}const _0x4eb956=_0x147573[_0xf23fe(0x3df)]?Object[_0xf23fe(0x320)](_0x147573['features'])[_0xf23fe(0x1c1)](([,_0x54795a])=>_0x54795a)[_0xf23fe(0x4aa)](([_0x519b97])=>_0x519b97):[],_0x37a31a=_0x147573[_0xf23fe(0x2c0)]||{},_0x50f906=_0x528ee0?.['db']?.[_0xf23fe(0x2c6)]?.(_0xf23fe(0x39c))??0x0,_0x4bac1c=[..._0x586bfc[_0xf23fe(0x1da)][_0xf23fe(0x519)]()][_0xf23fe(0x1c1)](_0x188a5f=>!_0x188a5f[_0xf23fe(0x447)]('~'))[_0xf23fe(0x533)];console[_0xf23fe(0x5df)](_0xf23fe(0x2df)),console[_0xf23fe(0x5df)](_0xf23fe(0x481)+_0x46a70a),console[_0xf23fe(0x5df)](_0xf23fe(0x5ad)+(_0x147573[_0xf23fe(0x3d6)]||'')),console[_0xf23fe(0x5df)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x147573[_0xf23fe(0x420)]?new Date(_0x147573[_0xf23fe(0x420)])[_0xf23fe(0x431)]()['slice'](0x0,0xa):'')),console[_0xf23fe(0x5df)](_0xf23fe(0x527)+(_0x4eb956[_0xf23fe(0x482)](',\x20')||_0xf23fe(0x1d3))),console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x4cecce),console[_0xf23fe(0x5df)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x251a04),console[_0xf23fe(0x5df)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x147573[_0xf23fe(0x20e)])['toISOString']());if(_0x251a04===_0xf23fe(0x2fe)){console[_0xf23fe(0x5df)](''),console[_0xf23fe(0x5df)]('\x20\x20Usage:');if(_0x37a31a['maxWrites']){const _0x9abdc8=Math[_0xf23fe(0x146)](_0x50f906/_0x37a31a[_0xf23fe(0x261)]*0x64);console[_0xf23fe(0x5df)](_0xf23fe(0x3d5)+_0x50f906[_0xf23fe(0x3cd)]()+_0xf23fe(0x16c)+_0x37a31a['maxWrites'][_0xf23fe(0x3cd)]()+_0xf23fe(0x337)+_0x9abdc8+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x50f906[_0xf23fe(0x3cd)]()+_0xf23fe(0x14a));_0x37a31a['envs']?console['log'](_0xf23fe(0x2e6)+_0x4bac1c+_0xf23fe(0x16c)+_0x37a31a[_0xf23fe(0x3a8)]):console[_0xf23fe(0x5df)](_0xf23fe(0x2e6)+_0x4bac1c+_0xf23fe(0x14a));}console[_0xf23fe(0x5df)]('');}finally{await _0x586bfc[_0xf23fe(0x5e4)]();}}async function _0x32f8f9(_0x3abe47,_0x430016){const _0x1e688e=_0xe0bd2d;!_0x3abe47&&(console[_0x1e688e(0x209)](_0x1e688e(0x3b5)),process[_0x1e688e(0x20f)](0x1));const _0x18c38a=require$$5,_0x15f1bc=_0x2817f4[_0x1e688e(0x100)](_0x430016[_0x1e688e(0x211)]),_0x1f1a29=new _0x18c38a(_0x15f1bc,_0x417b72(_0x430016));await _0x1f1a29['open']();try{const _0x28cd47=_0x1f1a29[_0x1e688e(0x2d0)];(!_0x28cd47||!_0x28cd47[_0x1e688e(0x474)](_0x1e688e(0x4fb)))&&(console['error'](_0x1e688e(0x462)+_0x3abe47+'\x22'),process[_0x1e688e(0x20f)](0x1));let _0x226ce=null,_0x42d047=null;const _0x5e5428=_0x28cd47[_0x1e688e(0x2c6)](_0x1e688e(0x4fb),_0x3abe47);if(_0x5e5428)_0x226ce=_0x3abe47,_0x42d047=_0x5e5428;else{const _0x56d842=[];for(const {key:_0x42b1a1,value:_0x1f26e0}of _0x28cd47[_0x1e688e(0x306)](_0x1e688e(0x4fb))){if(_0x42b1a1[_0x1e688e(0x447)](_0x3abe47))_0x56d842[_0x1e688e(0x2da)]({'key':_0x42b1a1,'value':_0x1f26e0});}_0x56d842[_0x1e688e(0x533)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x3abe47+'\x22'),process[_0x1e688e(0x20f)](0x1)),_0x56d842[_0x1e688e(0x533)]>0x1&&(console[_0x1e688e(0x209)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3abe47+_0x1e688e(0x186)+_0x56d842[_0x1e688e(0x533)]+_0x1e688e(0x183)),process[_0x1e688e(0x20f)](0x1)),_0x226ce=_0x56d842[0x0]['key'],_0x42d047=_0x56d842[0x0][_0x1e688e(0x156)];}await _0x28cd47['remove'](_0x1e688e(0x4fb),_0x226ce),console[_0x1e688e(0x5df)](_0x1e688e(0x229)+_0x226ce+_0x1e688e(0x419)+(_0x42d047[_0x1e688e(0x3d6)]||_0x1e688e(0x283))+')');}finally{await _0x1f1a29['close']();}}async function _0xa1d75d(_0x2c073b,_0x246cc4,_0x41b636){const _0x3d090c=_0xe0bd2d;!_0x2c073b&&(console[_0x3d090c(0x209)](_0x3d090c(0x486)),process[_0x3d090c(0x20f)](0x1));!_0x41b636[_0x3d090c(0x309)]&&!(_0x41b636['username']&&_0x41b636[_0x3d090c(0x3fc)])&&(console['error'](_0x3d090c(0x1ff)),process[_0x3d090c(0x20f)](0x1));const _0x3f1b2d=_0x41b636[_0x3d090c(0x4e0)]||_0x246cc4[_0x3d090c(0x2fc)]?.[_0x3d090c(0x256)];!_0x3f1b2d&&(console['error'](_0x3d090c(0x542)+_0x3d090c(0x36d)+_0x3d090c(0x1c8)),process[_0x3d090c(0x20f)](0x1));const _0x55ba59=require$$5,_0x4bf6bc=new _0x55ba59(_0x246cc4[_0x3d090c(0x211)],{'sync':{'address':_0x3f1b2d,'auto_reconcile':![]}});await _0x4bf6bc['open']();try{const _0x5c9ed5=_0x4bf6bc[_0x3d090c(0x2d0)];if(_0x5c9ed5&&_0x5c9ed5[_0x3d090c(0x474)](_0x3d090c(0x3ed))){let _0x38edd8=![];for(const _0x156a8d of _0x5c9ed5['getRange'](_0x3d090c(0x3ed))){_0x38edd8=!![];break;}_0x38edd8&&console['log'](_0x3d090c(0x1be)+_0x3d090c(0x13d));}console[_0x3d090c(0x5df)](_0x3d090c(0x1c9)+_0x2c073b+'…'),await _0x4bf6bc[_0x3d090c(0x2fc)]['join'](_0x2c073b[_0x3d090c(0x18f)](/\/+$/,''),{'token':_0x41b636[_0x3d090c(0x309)],'username':_0x41b636['username'],'password':_0x41b636[_0x3d090c(0x3fc)]}),console[_0x3d090c(0x5df)](_0x3d090c(0x118)),console[_0x3d090c(0x5df)](_0x3d090c(0x297));}finally{await _0x4bf6bc[_0x3d090c(0x5e4)]();}}async function _0x16d3c4(){const _0x19fa47=_0xe0bd2d,_0x3f3518=Date[_0x19fa47(0x1ad)](),_0x1ceb9d=_0x26a0ee(process[_0x19fa47(0x2ac)]),_0x23ec25=_0x47f45b(_0x1ceb9d),_0x367e53=_0x2817f4[_0x19fa47(0x100)](_0x23ec25[_0x19fa47(0x211)]);!_0x23ec25['noRepl']&&!process[_0x19fa47(0x45b)]['isTTY']&&(_0x23ec25['noRepl']=!![]);const _0x4c34e2=require$$5,{start:_0x5dff88,colorLog:_0x56dfdc}=requireOkdbShell(),_0x5e6a2a=require$$1$2,_0x53f2ac={..._0x23ec25[_0x19fa47(0x547)]?{'encryptionKey':_0x23ec25[_0x19fa47(0x547)]}:{},..._0x23ec25[_0x19fa47(0x37c)]?{'admin':![]}:_0x1abe52(_0x23ec25[_0x19fa47(0x298)])?{'admin':_0x23ec25[_0x19fa47(0x298)]}:{},..._0x1abe52(_0x23ec25[_0x19fa47(0x161)])?{'api':_0x23ec25['api']}:{},..._0x1abe52(_0x23ec25[_0x19fa47(0x237)])?{'auth':_0x23ec25[_0x19fa47(0x237)]}:{},..._0x1abe52(_0x23ec25[_0x19fa47(0x596)])?{'mcp':_0x23ec25[_0x19fa47(0x596)]}:{},..._0x23ec25[_0x19fa47(0x46e)]!==![]?{'timeMachine':_0x23ec25[_0x19fa47(0x46e)]}:{}},_0x22abf4=_0x1122ee(_0x23ec25);if(!_0x5e6a2a[_0x19fa47(0x577)]){const _0xa99924=_0x39a348(),_0x33a81b=_0x23ec25[_0x19fa47(0x520)]?_0x19fa47(0x453):_0x23ec25['workersFlag']!=null&&_0x23ec25[_0x19fa47(0x4b1)]!==''?_0x19fa47(0x2ea):process.env.OKDB_HTTP_WORKERS?_0x19fa47(0x2a5):_0x23ec25[_0x19fa47(0x446)]?.[_0x19fa47(0x5cb)]!=null?_0x19fa47(0x425):_0x19fa47(0x347)+Math[_0x19fa47(0x31b)](0x1,require$$0[_0x19fa47(0x43f)]()[_0x19fa47(0x533)]-0x1);process[_0x19fa47(0x23a)]['write'](_0x19fa47(0x558)+_0x22abf4+'\x20('+_0x33a81b+(!_0xa99924?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x5e6a2a['isWorker']){const _0x534891={..._0x53f2ac},_0x2b11c9=new _0x4c34e2(_0x367e53,_0x534891);_0x2b11c9[_0x19fa47(0x5df)][_0x19fa47(0x232)]?.();const _0x21e161=process.env.OKDB_CLUSTER_SLOT??'?',_0x49006d={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x56c641=_0x49006d[_0x23ec25['logLevel']]??_0x49006d['info'];_0x2b11c9[_0x19fa47(0x5df)]['attach'](_0x3b4de3=>{const _0x1e2441=_0x19fa47;if((_0x49006d[_0x3b4de3[_0x1e2441(0x18e)]]??0x1)<_0x56c641)return;try{process[_0x1e2441(0x3bc)]?.({'__okdbCluster':'log','slot':_0x21e161,'pid':process[_0x1e2441(0x240)],'entry':_0x3b4de3});}catch{}}),await _0x2b11c9[_0x19fa47(0x5ab)]();const {attachWorkerCluster:_0x392461}=requireOkdbCluster();_0x392461(_0x2b11c9),await _0x18d8ad(_0x2b11c9,_0x23ec25[_0x19fa47(0x359)]);return;}if(_0x22abf4>0x1){const {runClustered:_0x5ca78f}=requireOkdbCluster(),_0x23fed4=new _0x4c34e2(_0x367e53,{..._0x53f2ac,'engines':![],'processors':![],'compaction':![]});await _0x23fed4[_0x19fa47(0x5ab)]();const _0x515d04=async()=>{const _0x358033=_0x19fa47,_0x3071f2=new _0x4c34e2(_0x367e53,{..._0x53f2ac});return await _0x3071f2[_0x358033(0x5ab)](),_0x3071f2;},_0x130aa4=_0x5ca78f({'workers':_0x22abf4,'makeOkdb':_0x515d04,'port':_0x23ec25[_0x19fa47(0x359)],'primaryOkdb':_0x23fed4});let _0x576892=![];async function _0x401cd7(_0x4f85ec){const _0x18f019=_0x19fa47;_0x576892&&(process['stderr'][_0x18f019(0x476)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x18f019(0x20f)](0x82));_0x576892=!![],process[_0x18f019(0x4bc)]['write'](_0x18f019(0x567)+(_0x4f85ec||'shutdown')+',\x20stopping\x20workers…\x0a');const _0x23140c=setTimeout(()=>{const _0x3ca892=_0x18f019;process[_0x3ca892(0x4bc)][_0x3ca892(0x476)](_0x3ca892(0x5b7)),process['exit'](0x0);},0xbb8);_0x23140c[_0x18f019(0x2e3)]?.();try{await _0x130aa4[_0x18f019(0x5e4)]();}catch(_0xca23db){process[_0x18f019(0x4bc)][_0x18f019(0x476)](_0x18f019(0x173)+(_0xca23db?.[_0x18f019(0x58f)]??_0xca23db)+'\x0a');}try{await _0x23fed4['close']();}catch(_0x2b15b3){process['stderr'][_0x18f019(0x476)](_0x18f019(0x55a)+(_0x2b15b3?.[_0x18f019(0x58f)]??_0x2b15b3)+'\x0a');}process['exit'](0x0);}_0x23ec25['clusterWorkers']=_0x22abf4;if(!_0x23ec25[_0x19fa47(0x1f9)]){_0x23fed4[_0x19fa47(0x5df)]['detachConsole']?.(),_0x5d7526(_0x23fed4['auth']?.['getSecurityNotices']?.()??[]),await _0x5dff88(_0x23fed4,_0x23ec25);return;}process[_0x19fa47(0x23a)][_0x19fa47(0x476)](_0x19fa47(0x169)+process[_0x19fa47(0x240)]+':\x20processor\x20(HTTP-silent),\x20'+_0x22abf4+'\x20'+(_0x19fa47(0x4da)+_0x23ec25[_0x19fa47(0x359)]+'\x0a')),console['log'](''),console[_0x19fa47(0x5df)](_0x19fa47(0x2bb)),console[_0x19fa47(0x5df)](_0x19fa47(0x208)+_0x23ec25[_0x19fa47(0x359)]+_0x19fa47(0x337)+_0x22abf4+_0x19fa47(0x491)),console[_0x19fa47(0x5df)](_0x19fa47(0x4f2)+_0x367e53),console[_0x19fa47(0x5df)](_0x19fa47(0x57c)+_0x23fed4['id']),console[_0x19fa47(0x5df)](_0x19fa47(0x59c)+_0x23ec25[_0x19fa47(0x359)]+_0x19fa47(0x437));!_0x23ec25[_0x19fa47(0x37c)]&&console[_0x19fa47(0x5df)]('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x23ec25[_0x19fa47(0x359)]+_0x19fa47(0x5b8));console[_0x19fa47(0x5df)](''),_0x5d7526(_0x23fed4[_0x19fa47(0x237)]?.['getSecurityNotices']?.()??[]),process['on'](_0x19fa47(0x125),()=>_0x401cd7(_0x19fa47(0x125))),process['on']('SIGTERM',()=>_0x401cd7(_0x19fa47(0x27a))),process['on'](_0x19fa47(0x4e9),()=>_0x401cd7(_0x19fa47(0x4e9)));return;}const _0x5a2676=new _0x4c34e2(_0x367e53,_0x53f2ac);_0x5a2676[_0x19fa47(0x5df)][_0x19fa47(0x232)]?.();const _0x47bc53=_0x5a2676[_0x19fa47(0x5df)][_0x19fa47(0x16f)](_0x29521f=>_0x56dfdc(_0x29521f,_0x23ec25[_0x19fa47(0x503)]));if(_0x23ec25[_0x19fa47(0x1f9)])process[_0x19fa47(0x23a)][_0x19fa47(0x476)](_0x19fa47(0x41a));await _0x5a2676[_0x19fa47(0x5ab)]();if(_0x23ec25['noRepl'])process[_0x19fa47(0x23a)][_0x19fa47(0x476)](_0x19fa47(0x564));try{await _0x18d8ad(_0x5a2676,_0x23ec25[_0x19fa47(0x359)]);}catch(_0x305fcb){_0x305fcb['code']==='EADDRINUSE'&&(console[_0x19fa47(0x209)](_0x19fa47(0x51d)+_0x23ec25[_0x19fa47(0x359)]+_0x19fa47(0x393)),process[_0x19fa47(0x20f)](0x1));throw _0x305fcb;}if(_0x23ec25[_0x19fa47(0x1f9)])process['stdout']['write'](_0x19fa47(0x1c2)+_0x23ec25[_0x19fa47(0x359)]+'\x0a');if(!_0x23ec25['noRepl'])_0x5a2676['log']['detachConsole']?.(),_0x47bc53?.(),_0x5d7526(_0x5a2676[_0x19fa47(0x237)]?.[_0x19fa47(0x287)]?.()??[]),await _0x5dff88(_0x5a2676,_0x23ec25);else{const _0x3a4b27=_0x2817f4[_0x19fa47(0x482)](_0x367e53,_0x19fa47(0x1a5));try{_0x152bdb[_0x19fa47(0x198)](_0x3a4b27,String(process['pid']));}catch{}const _0x4e133a=Date[_0x19fa47(0x1ad)]()-_0x3f3518;console[_0x19fa47(0x5df)](''),console[_0x19fa47(0x5df)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x19fa47(0x5df)](_0x19fa47(0x13a)+_0x23ec25[_0x19fa47(0x359)]),console['log'](_0x19fa47(0x4fe)+_0x367e53),console[_0x19fa47(0x5df)](_0x19fa47(0x2b1)+_0x5a2676['id']);{const _0x1ce5d3=_0x5a2676[_0x19fa47(0x2d0)]?.['db']?.[_0x19fa47(0x2c6)]?.('__writeCounter')??0x0,_0x42a0ab=[..._0x5a2676[_0x19fa47(0x1da)]['keys']()][_0x19fa47(0x1c1)](_0x10b619=>!_0x10b619[_0x19fa47(0x447)]('~'))[_0x19fa47(0x533)];if(_0x5a2676['_license']?.['active']?.['licenseType']===0x1){const _0x2fe157=Math['ceil']((_0x5a2676['_license'][_0x19fa47(0x2fe)][_0x19fa47(0x420)]-Date['now']())/0x5265c00);console['log'](_0x19fa47(0x326)+_0x5a2676[_0x19fa47(0x44d)]['active']['licensee']+_0x19fa47(0x159)+_0x2fe157+_0x19fa47(0x4dc));}else{if(_0x5a2676[_0x19fa47(0x44d)]?.[_0x19fa47(0x2fe)]){const _0x452faa=_0x5a2676[_0x19fa47(0x44d)]['active'];console[_0x19fa47(0x5df)](_0x19fa47(0x276)+_0x452faa['licensee']+_0x19fa47(0x21e)+new Date(_0x452faa[_0x19fa47(0x420)])[_0x19fa47(0x431)]()[_0x19fa47(0x352)](0x0,0xa)+')');const _0x2ecf12=_0x452faa[_0x19fa47(0x2c0)]||{};if(_0x2ecf12['maxWrites']){const _0x2e7e95=Math[_0x19fa47(0x146)](_0x1ce5d3/_0x2ecf12['maxWrites']*0x64);console[_0x19fa47(0x5df)](_0x19fa47(0x2bd)+_0x1ce5d3['toLocaleString']()+_0x19fa47(0x16c)+_0x2ecf12[_0x19fa47(0x261)][_0x19fa47(0x3cd)]()+_0x19fa47(0x28d)+_0x2e7e95+'%),\x20'+_0x42a0ab+(_0x2ecf12[_0x19fa47(0x3a8)]?'/'+_0x2ecf12[_0x19fa47(0x3a8)]:'')+'\x20env'+(_0x42a0ab===0x1?'':'s'));}}else{if(_0x5a2676[_0x19fa47(0x44d)]){const _0x5d7d43=_0x5a2676[_0x19fa47(0x44d)][_0x19fa47(0x571)](),_0x199eac=_0x5d7d43[_0x19fa47(0x533)]?_0x5d7d43[_0x19fa47(0x4aa)](_0x331d4a=>_0x331d4a[_0x19fa47(0x112)])[_0x19fa47(0x482)](',\x20'):'(add\x20a\x20license\x20first)',_0x3f2941=_0x5a2676[_0x19fa47(0x44d)][_0x19fa47(0x38f)],_0x4a7f32=_0x3f2941[_0x19fa47(0x2c0)]['maxWrites']?Math[_0x19fa47(0x146)](_0x1ce5d3/_0x3f2941['limits'][_0x19fa47(0x261)]*0x64):0x0;console['log'](_0x19fa47(0x2fa)),console[_0x19fa47(0x5df)](_0x19fa47(0x2bd)+_0x1ce5d3[_0x19fa47(0x3cd)]()+'\x20/\x20'+_0x3f2941[_0x19fa47(0x2c0)][_0x19fa47(0x261)][_0x19fa47(0x3cd)]()+_0x19fa47(0x28d)+_0x4a7f32+_0x19fa47(0x502)+_0x42a0ab+_0x19fa47(0x16c)+_0x3f2941[_0x19fa47(0x2c0)][_0x19fa47(0x3a8)]+_0x19fa47(0x514)),console[_0x19fa47(0x5df)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x199eac);}}}}console[_0x19fa47(0x5df)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x23ec25[_0x19fa47(0x359)]+_0x19fa47(0x437));!_0x23ec25[_0x19fa47(0x37c)]&&console[_0x19fa47(0x5df)](_0x19fa47(0x429)+_0x23ec25[_0x19fa47(0x359)]+_0x19fa47(0x5b8));console[_0x19fa47(0x5df)](''),console[_0x19fa47(0x5df)](_0x19fa47(0x31e)+_0x4e133a+'ms'),_0x5d7526(_0x5a2676[_0x19fa47(0x237)]?.[_0x19fa47(0x287)]?.()??[]);let _0x37908e=![];async function _0x358d79(_0x19ab98){const _0x495398=_0x19fa47;_0x37908e&&(process[_0x495398(0x4bc)][_0x495398(0x476)](_0x495398(0x36b)),process[_0x495398(0x20f)](0x82));_0x37908e=!![],process['stderr'][_0x495398(0x476)](_0x495398(0x567)+(_0x19ab98||'shutdown')+_0x495398(0x3dd));const _0x3c701d=setTimeout(()=>{const _0x2e046e=_0x495398;process['stderr'][_0x2e046e(0x476)]('[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a'),process[_0x2e046e(0x20f)](0x1);},0x1388);try{_0x152bdb[_0x495398(0x2a7)](_0x3a4b27);}catch{}try{await _0x5a2676[_0x495398(0x5e4)]();}catch(_0x5f56b8){process[_0x495398(0x4bc)][_0x495398(0x476)](_0x495398(0x37b)+(_0x5f56b8?.['message']??_0x5f56b8)+'\x0a');}clearTimeout(_0x3c701d),process[_0x495398(0x4bc)][_0x495398(0x476)](_0x495398(0x3e0)),process[_0x495398(0x20f)](0x0);}process['on'](_0x19fa47(0x125),()=>_0x358d79(_0x19fa47(0x125))),process['on'](_0x19fa47(0x27a),()=>_0x358d79(_0x19fa47(0x27a))),process['on']('SIGBREAK',()=>_0x358d79(_0x19fa47(0x4e9)));}}const _0x70f1c0=new Set([_0xe0bd2d(0x4b4),_0xe0bd2d(0x335),_0xe0bd2d(0x25b),_0xe0bd2d(0x2db),_0xe0bd2d(0x557),'import',_0xe0bd2d(0x4d4),_0xe0bd2d(0x309),'join',_0xe0bd2d(0x2f6)]),_0x5d5a89=process[_0xe0bd2d(0x2ac)][0x2];if(_0x5d5a89===_0xe0bd2d(0x4b4))console[_0xe0bd2d(0x5df)](require$$3[_0xe0bd2d(0x4b4)]),process['exit'](0x0);else{if(_0x5d5a89&&_0x70f1c0[_0xe0bd2d(0x1ed)](_0x5d5a89)){const _0x49be05=process[_0xe0bd2d(0x2ac)][_0xe0bd2d(0x352)](0x3),_0x490a78=_0x26a0ee([_0xe0bd2d(0x19e),'okdb',..._0x49be05]),_0x8f82=_0x47f45b(_0x490a78),_0xd5bc3f=new Set([_0xe0bd2d(0x59f),'-d',_0xe0bd2d(0x318),'-k',_0xe0bd2d(0x4d2),'-c',_0xe0bd2d(0x1b7),'-p',_0xe0bd2d(0x1ee),_0xe0bd2d(0x442),'-e',_0xe0bd2d(0x245),_0xe0bd2d(0x440),_0xe0bd2d(0x30b),_0xe0bd2d(0x560),_0xe0bd2d(0x4c4),'--grants',_0xe0bd2d(0x302),_0xe0bd2d(0x37a),_0xe0bd2d(0x2d4),'-u',_0xe0bd2d(0x12a)]);let _0x854b28=null;for(let _0x4bbb74=0x0;_0x4bbb74<_0x49be05['length'];_0x4bbb74++){if(_0xd5bc3f[_0xe0bd2d(0x1ed)](_0x49be05[_0x4bbb74])){_0x4bbb74++;continue;}if(!_0x49be05[_0x4bbb74][_0xe0bd2d(0x447)]('-')){_0x854b28=_0x49be05[_0x4bbb74];break;}}(async()=>{const _0xb918d4=_0xe0bd2d;if(_0x5d5a89===_0xb918d4(0x309)){const _0x344c9c=process[_0xb918d4(0x2ac)][0x3],_0x299dba=process[_0xb918d4(0x2ac)]['slice'](0x4),_0x4dac97=_0x26a0ee([_0xb918d4(0x19e),'okdb',..._0x299dba]),_0x3c0bdd=_0x47f45b(_0x4dac97),_0x5c7d71=new Set([_0xb918d4(0x59f),'-d',_0xb918d4(0x318),'-k','--config','-c',_0xb918d4(0x1b7),'-p',_0xb918d4(0x440),_0xb918d4(0x30b),_0xb918d4(0x560),_0xb918d4(0x4c4),_0xb918d4(0x4c8),'--ttl',_0xb918d4(0x1ee),_0xb918d4(0x442),'-e',_0xb918d4(0x245)]),_0x45f328=[];for(let _0x564642=0x0;_0x564642<_0x299dba[_0xb918d4(0x533)];_0x564642++){if(_0x5c7d71['has'](_0x299dba[_0x564642])){_0x564642++;continue;}if(_0x299dba[_0x564642][_0xb918d4(0x447)]('-'))continue;_0x45f328['push'](_0x299dba[_0x564642]);}switch(_0x344c9c){case _0xb918d4(0x4c2):await _0x23d57a(_0x3c0bdd,_0x4dac97);break;case _0xb918d4(0x3cb):await _0x519940(_0x3c0bdd);break;case _0xb918d4(0x523):await _0x3b6ea1(_0x45f328[0x0],_0x3c0bdd);break;default:console[_0xb918d4(0x209)](_0xb918d4(0x257)+_0x344c9c+_0xb918d4(0x592)),process[_0xb918d4(0x20f)](0x1);}return;}if(_0x5d5a89===_0xb918d4(0x2f6)){const _0x28acaf=requireOkdbLicenseCodec(),_0x38e3a9=process[_0xb918d4(0x2ac)]['slice'](0x3),_0x1e35a5=_0x26a0ee([_0xb918d4(0x19e),'okdb',..._0x38e3a9]),_0x274e8c=_0x47f45b(_0x1e35a5),_0x5698af=new Set([_0xb918d4(0x59f),'-d',_0xb918d4(0x318),'-k',_0xb918d4(0x4d2),'-c',_0xb918d4(0x1b7),'-p','--log-level']),_0x2e664e=[];for(let _0xec69bc=0x0;_0xec69bc<_0x38e3a9['length'];_0xec69bc++){if(_0x5698af[_0xb918d4(0x1ed)](_0x38e3a9[_0xec69bc])){_0xec69bc++;continue;}if(_0x38e3a9[_0xec69bc][_0xb918d4(0x447)]('-'))continue;_0x2e664e[_0xb918d4(0x2da)](_0x38e3a9[_0xec69bc]);}const _0x6e11d=_0x2e664e[0x0]??null;if(_0x6e11d==='remove')await _0x32f8f9(_0x2e664e[0x1],_0x274e8c);else{if(!_0x6e11d)await _0x19bcb0(_0x274e8c);else{let _0x3a306a=_0x28acaf[_0xb918d4(0x293)](_0x6e11d);if(_0x3a306a===_0xb918d4(0x24c)&&_0x152bdb[_0xb918d4(0x3b2)](_0x6e11d))_0x3a306a='path';if(_0x3a306a===_0xb918d4(0x550))try{const _0x3c6892=_0x152bdb[_0xb918d4(0x102)](_0x6e11d,'utf8')[_0xb918d4(0x34b)](),_0x14d9a2=_0x28acaf['detectInputType'](_0x3c6892);if(_0x14d9a2===_0xb918d4(0x167)){await _0x2aba44(_0x3c6892,_0x274e8c);return;}await _0x4a45be(_0x6e11d,_0x274e8c);return;}catch(_0x58cd35){console['error']('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x6e11d+':\x20'+_0x58cd35[_0xb918d4(0x58f)]),process[_0xb918d4(0x20f)](0x1);}switch(_0x3a306a){case _0xb918d4(0x391):await _0x4a45be(_0x6e11d,_0x274e8c);break;case'activation':await _0x2aba44(_0x6e11d,_0x274e8c);break;case'uuid':await _0x66da90(_0x6e11d,_0x274e8c);break;default:console['error'](_0xb918d4(0x1a9)+_0x6e11d+'\x22'),console[_0xb918d4(0x209)](''),console[_0xb918d4(0x209)](_0xb918d4(0x5e2)),console[_0xb918d4(0x209)](_0xb918d4(0x267)),console[_0xb918d4(0x209)](_0xb918d4(0x403)),console[_0xb918d4(0x209)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0xb918d4(0x209)]('\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file'),console['error'](''),console['error'](_0xb918d4(0x1a2)),process[_0xb918d4(0x20f)](0x1);}}}return;}switch(_0x5d5a89){case _0xb918d4(0x335):await _0x33f9d4(_0x8f82);break;case _0xb918d4(0x25b):await _0x59112e();break;case'reset':await _0x3f594c(_0x8f82);break;case _0xb918d4(0x2db):await _0x31b284(_0x854b28??_0x2817f4[_0xb918d4(0x100)](_0xb918d4(0x5aa)),_0x8f82);break;case _0xb918d4(0x557):await _0x103c8c(_0x854b28??_0x2817f4[_0xb918d4(0x100)](_0xb918d4(0x11d)),_0x8f82,_0x490a78);break;case'import':await _0x1038fb(_0x854b28??_0x2817f4[_0xb918d4(0x100)](_0xb918d4(0x11d)),_0x8f82,_0x490a78);break;case _0xb918d4(0x482):await _0xa1d75d(_0x854b28,_0x8f82,_0x490a78);break;}})()['then'](()=>process[_0xe0bd2d(0x20f)](0x0))['catch'](_0x320a67=>{const _0x43b1ce=_0xe0bd2d;console[_0x43b1ce(0x209)]('\x0a[okdb]\x20error:\x20'+(_0x320a67[_0x43b1ce(0x58f)]||_0x320a67)+'\x0a'),process['exit'](0x1);});}else _0x16d3c4()[_0xe0bd2d(0x2f0)](_0x3c7f65=>{const _0x2defed=_0xe0bd2d;console[_0x2defed(0x209)]('\x0a[okdb]\x20fatal\x20error:'),console['error'](_0x3c7f65[_0x2defed(0x119)]||_0x3c7f65),process[_0x2defed(0x20f)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x4d1b8e(0x55d)]=okdb;
|